From faf31c8141eedc70810239ebc8a110bef55f74ec Mon Sep 17 00:00:00 2001 From: wwwwwwwww <526125649@qq.com> Date: Fri, 26 Jun 2026 11:49:35 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=B3=E4=B8=8B?= =?UTF-8?q?=E8=A7=92=E8=81=94=E7=B3=BB=E6=88=91=E4=BB=AC=E6=95=B4=E4=BD=93?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{index-DAaavCN6.js => index-C1APw6hP.js} | 180 ++++++------ video-gen-admin/dist/index.html | 72 ++--- video-gen-admin/src/App.tsx | 2 + .../src/pages/AdminContactRequests.tsx | 270 ++++++++++++++++++ video-gen-admin/tsconfig.tsbuildinfo | 2 +- video-gen-api/app/api/v1/__init__.py | 2 + video-gen-api/app/api/v1/contact.py | 140 +++++++++ video-gen-api/app/main.py | 1 + video-gen-api/app/models/contact_request.py | 17 ++ video-gen-api/app/schemas/contact.py | 31 ++ video-gen-api/videogen_api.egg-info/PKG-INFO | 8 +- .../videogen_api.egg-info/SOURCES.txt | 140 +++++++++ .../videogen_api.egg-info/requires.txt | 11 +- .../{index-Dm7vTAAt.js => index-Di-nQw13.js} | 188 ++++++------ video-gen-app/dist/index.html | 72 ++--- video-gen-app/src/api/index.ts | 13 + .../src/components/Layout/AppLayout.tsx | 215 +++++++++++++- 17 files changed, 1104 insertions(+), 260 deletions(-) rename video-gen-admin/dist/assets/{index-DAaavCN6.js => index-C1APw6hP.js} (80%) create mode 100644 video-gen-admin/src/pages/AdminContactRequests.tsx create mode 100644 video-gen-api/app/api/v1/contact.py create mode 100644 video-gen-api/app/models/contact_request.py create mode 100644 video-gen-api/app/schemas/contact.py rename video-gen-app/dist/assets/{index-Dm7vTAAt.js => index-Di-nQw13.js} (75%) diff --git a/video-gen-admin/dist/assets/index-DAaavCN6.js b/video-gen-admin/dist/assets/index-C1APw6hP.js similarity index 80% rename from video-gen-admin/dist/assets/index-DAaavCN6.js rename to video-gen-admin/dist/assets/index-C1APw6hP.js index ce4648bf..afcdfcae 100644 --- a/video-gen-admin/dist/assets/index-DAaavCN6.js +++ b/video-gen-admin/dist/assets/index-C1APw6hP.js @@ -156,7 +156,7 @@ html body { & > ${t}-header`]:{borderRadius:`0 0 ${Y(c)} ${Y(c)}`}},[`> ${t}-header`]:{position:`relative`,display:`flex`,flexWrap:`nowrap`,alignItems:`flex-start`,padding:a,color:p,lineHeight:g,cursor:`pointer`,transition:`all ${S}, visibility 0s`,...Qc(e),[`> ${t}-title`]:{flex:`auto`},[`${t}-expand-icon`]:{height:T,display:`flex`,alignItems:`center`,marginInlineEnd:v},[`${t}-arrow`]:{...Yc(),fontSize:C,transition:`transform ${S}`,svg:{transition:`transform ${S}`}},[`${t}-title`]:{marginInlineEnd:`auto`}},[`${t}-collapsible-header`]:{cursor:`default`,[`${t}-title`]:{flex:`none`,cursor:`pointer`},[`${t}-expand-icon`]:{cursor:`pointer`}},[`${t}-collapsible-icon`]:{cursor:`unset`,[`${t}-expand-icon`]:{cursor:`pointer`}}},[`${t}-panel`]:{color:f,backgroundColor:n,borderTop:D,[`& > ${t}-body`]:{padding:w},"&-hidden":{display:`none`}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:o,paddingInlineStart:x,[`> ${t}-expand-icon`]:{marginInlineStart:e.calc(y).sub(x).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:y}}},"&-large":{[`> ${t}-item`]:{fontSize:h,lineHeight:_,[`> ${t}-header`]:{padding:s,paddingInlineStart:r,[`> ${t}-expand-icon`]:{height:E,marginInlineStart:e.calc(b).sub(r).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:b}}},[`${t}-item:last-child`]:{borderBottom:0,[`> ${t}-panel`]:{borderRadius:`0 0 ${Y(c)} ${Y(c)}`}},[`& ${t}-item-disabled > ${t}-header`]:{"&, & > .arrow":{color:m,cursor:`not-allowed`}},[`&${t}-icon-placement-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,marginInlineEnd:0,marginInlineStart:v}}}}}}},kg=e=>{let{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow`;return{[`${t}-rtl`]:{[n]:{transform:`rotate(180deg)`}}}},Ag=e=>{let{componentCls:t,headerBg:n,borderlessContentPadding:r,borderlessContentBg:i,colorBorder:a}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${a}`},[` > ${t}-item:last-child, > ${t}-item:last-child ${t}-header - `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-panel`]:{backgroundColor:i,borderTop:0},[`> ${t}-item > ${t}-panel > ${t}-body`]:{padding:r}}}},jg=e=>{let{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:`transparent`,border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-panel`]:{backgroundColor:`transparent`,border:0,[`> ${t}-body`]:{paddingBlock:n}}}}}},Mg=rl(`Collapse`,e=>{let t=gs(e,{collapseHeaderPaddingSM:`${Y(e.paddingXS)} ${Y(e.paddingSM)}`,collapseHeaderPaddingLG:`${Y(e.padding)} ${Y(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return[Og(t),Ag(t),jg(t),kg(t),bh(t)]},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`})),Ng=Object.assign(S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,expandIcon:i,className:a,style:o,classNames:s,styles:c}=li(`collapse`),{prefixCls:l,className:u,rootClassName:d,style:f,bordered:p=!0,ghost:m,size:h,expandIconPlacement:g,expandIconPosition:_,children:v,destroyInactivePanel:y,destroyOnHidden:b,expandIcon:x,classNames:C,styles:w}=e,T=th(e=>h??e??`middle`),E=n(`collapse`,l),D=n(),[O,k]=Mg(E),A=g??_??`start`,j={...e,size:T,bordered:p,expandIconPlacement:A},[M,N]=Fd([s,C],[c,w],{props:j}),P=x??i,F=S.useCallback((e={})=>Pp(typeof P==`function`?P(e):S.createElement(mg,{rotate:e.isActive?r===`rtl`?-90:90:void 0,"aria-label":e.isActive?`expanded`:`collapsed`}),e=>({className:J(e.className,`${E}-arrow`)})),[P,E,r]),I=J(`${E}-icon-placement-${A}`,{[`${E}-borderless`]:!p,[`${E}-rtl`]:r===`rtl`,[`${E}-ghost`]:!!m,[`${E}-large`]:T===`large`,[`${E}-small`]:T===`small`},a,u,d,O,k,M.root),L=S.useMemo(()=>({...Wm(D),motionAppear:!1,leavedClassName:`${E}-panel-hidden`}),[D,E]),R=S.useMemo(()=>v?Cr(v).map(e=>e):null,[v]);return S.createElement(Eg,{ref:t,openMotion:L,...Sr(e,[`rootClassName`]),expandIcon:F,prefixCls:E,className:I,style:{...N.root,...o,...f},classNames:M,styles:N,destroyOnHidden:b??y},R)}),{Panel:Dg}),Pg=e=>e instanceof dg?e:new dg(e),Fg=(e,t)=>{let{r:n,g:r,b:i,a}=e.toRgb(),o=new cg(e.toRgbString()).onBackground(t).toHsv();return a<=.5?o.v>.5:n*.299+r*.587+i*.114>192},Ig=e=>{let{paddingInline:t,onlyIconSize:n,borderColorDisabled:r}=e;return gs(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n,colorBorderDisabled:r})},Lg=e=>{let t=e.contentFontSize??e.fontSize,n=e.contentFontSizeSM??e.fontSize,r=e.contentFontSizeLG??e.fontSizeLG,i=e.contentLineHeight??Os(t),a=e.contentLineHeightSM??Os(n),o=e.contentLineHeightLG??Os(r),s=Fg(new dg(e.colorBgSolid),`#fff`)?`#000`:`#fff`,c=Ds.reduce((t,n)=>({...t,[`${n}ShadowColor`]:`0 ${Y(e.controlOutlineWidth)} 0 ${Bc(e[`${n}1`],e.colorBgContainer)}`}),{}),l=e.colorBgContainerDisabled,u=e.colorBgContainerDisabled;return{...c,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:`transparent`,defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:`inherit`,onlyIconSizeSM:`inherit`,onlyIconSizeLG:`inherit`,groupBorderColor:e.colorPrimaryHover,linkHoverBg:`transparent`,textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:s,contentFontSize:t,contentFontSizeSM:n,contentFontSizeLG:r,contentLineHeight:i,contentLineHeightSM:a,contentLineHeightLG:o,paddingBlock:Math.max((e.controlHeight-t*i)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-n*a)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-r*o)/2-e.lineWidth,0),defaultBgDisabled:l,dashedBgDisabled:u}},Rg=e=>{let{componentCls:t,antCls:n,lineWidth:r}=e,[i,a]=ol(n,`btn`);return{[t]:[{[i(`border-width`)]:r,[i(`border-color`)]:`#000`,[i(`border-color-hover`)]:a(`border-color`),[i(`border-color-active`)]:a(`border-color`),[i(`border-color-disabled`)]:a(`border-color`),[i(`border-style`)]:`solid`,[i(`text-color`)]:`#000`,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`),[i(`text-color-disabled`)]:a(`text-color`),[i(`bg-color`)]:`#ddd`,[i(`bg-color-hover`)]:a(`bg-color`),[i(`bg-color-active`)]:a(`bg-color`),[i(`bg-color-disabled`)]:e.colorBgContainerDisabled,[i(`bg-color-container`)]:e.colorBgContainer,[i(`shadow`)]:`none`},{border:[a(`border-width`),a(`border-style`),a(`border-color`)].join(` `),color:a(`text-color`),backgroundColor:a(`bg-color`),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[a(`border-width`),a(`border-style`),a(`border-color-hover`)].join(` `),color:a(`text-color-hover`),backgroundColor:a(`bg-color-hover`)},"&:active":{border:[a(`border-width`),a(`border-style`),a(`border-color-active`)].join(` `),color:a(`text-color-active`),backgroundColor:a(`bg-color-active`)}}},{[`&${t}-variant-solid`]:{[i(`solid-bg-color`)]:a(`color-base`),[i(`solid-bg-color-hover`)]:a(`color-hover`),[i(`solid-bg-color-active`)]:a(`color-active`),[i(`border-color`)]:`transparent`,[i(`text-color`)]:e.colorTextLightSolid,[i(`bg-color`)]:a(`solid-bg-color`),[i(`bg-color-hover`)]:a(`solid-bg-color-hover`),[i(`bg-color-active`)]:a(`solid-bg-color-active`),boxShadow:a(`shadow`)},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`border-color`)]:a(`color-base`),[i(`border-color-hover`)]:a(`color-hover`),[i(`border-color-active`)]:a(`color-active`),[i(`bg-color`)]:a(`bg-color-container`),[i(`text-color`)]:a(`color-base`),[i(`text-color-hover`)]:a(`color-hover`),[i(`text-color-active`)]:a(`color-active`),boxShadow:a(`shadow`)},[`&${t}-variant-dashed`]:{[i(`border-style`)]:`dashed`,[i(`bg-color-disabled`)]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[i(`border-color`)]:`transparent`,[i(`text-color`)]:a(`color-base`),[i(`bg-color`)]:a(`color-light`),[i(`bg-color-hover`)]:a(`color-light-hover`),[i(`bg-color-active`)]:a(`color-light-active`)},[`&${t}-variant-text, &${t}-variant-link`]:{[i(`border-color`)]:`transparent`,[i(`text-color`)]:a(`color-base`),[i(`text-color-hover`)]:a(`color-hover`),[i(`text-color-active`)]:a(`color-active`),[i(`bg-color`)]:`transparent`,[i(`bg-color-hover`)]:`transparent`,[i(`bg-color-active`)]:`transparent`,[`&:disabled, &${e.componentCls}-disabled`]:{background:`transparent`,borderColor:`transparent`}},[`&${t}-variant-text`]:{[i(`bg-color-hover`)]:a(`color-light`),[i(`bg-color-active`)]:a(`color-light-active`)}},{[`&${t}-variant-link`]:{[i(`color-base`)]:e.colorLink,[i(`color-hover`)]:e.colorLinkHover,[i(`color-active`)]:e.colorLinkActive,[i(`bg-color-hover`)]:e.linkHoverBg},[`&${t}-color-primary`]:{[i(`color-base`)]:e.colorPrimary,[i(`color-hover`)]:e.colorPrimaryHover,[i(`color-active`)]:e.colorPrimaryActive,[i(`color-light`)]:e.colorPrimaryBg,[i(`color-light-hover`)]:e.colorPrimaryBgHover,[i(`color-light-active`)]:e.colorPrimaryBorder,[i(`shadow`)]:e.primaryShadow,[`&${t}-variant-solid`]:{[i(`text-color`)]:e.primaryColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)}},[`&${t}-color-dangerous`]:{[i(`color-base`)]:e.colorError,[i(`color-hover`)]:e.colorErrorHover,[i(`color-active`)]:e.colorErrorActive,[i(`color-light`)]:e.colorErrorBg,[i(`color-light-hover`)]:e.colorErrorBgFilledHover,[i(`color-light-active`)]:e.colorErrorBgActive,[i(`shadow`)]:e.dangerShadow,[`&${t}-variant-solid`]:{[i(`text-color`)]:e.dangerColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)}},[`&${t}-color-default`]:{[i(`solid-bg-color`)]:e.colorBgSolid,[i(`solid-bg-color-hover`)]:e.colorBgSolidHover,[i(`solid-bg-color-active`)]:e.colorBgSolidActive,[i(`color-base`)]:e.defaultBorderColor,[i(`color-hover`)]:e.defaultHoverBorderColor,[i(`color-active`)]:e.defaultActiveBorderColor,[i(`color-light`)]:e.colorFillTertiary,[i(`color-light-hover`)]:e.colorFillSecondary,[i(`color-light-active`)]:e.colorFill,[i(`text-color`)]:e.defaultColor,[i(`text-color-hover`)]:e.defaultHoverColor,[i(`text-color-active`)]:e.defaultActiveColor,[i(`shadow`)]:e.defaultShadow,[`&${t}-variant-outlined`]:{[i(`bg-color-disabled`)]:e.defaultBgDisabled},[`&${t}-variant-solid`]:{[i(`text-color`)]:e.solidTextColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)},[`&${t}-variant-filled, &${t}-variant-text`]:{[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`text-color`)]:e.defaultColor,[i(`text-color-hover`)]:e.defaultHoverColor,[i(`text-color-active`)]:e.defaultActiveColor,[i(`bg-color-container`)]:e.defaultBg,[i(`bg-color-hover`)]:e.defaultHoverBg,[i(`bg-color-active`)]:e.defaultActiveBg},[`&${t}-variant-text`]:{[i(`text-color`)]:e.textTextColor,[i(`text-color-hover`)]:e.textTextHoverColor,[i(`text-color-active`)]:e.textTextActiveColor,[i(`bg-color-hover`)]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`text-color`)]:e.defaultGhostColor,[i(`border-color`)]:e.defaultGhostBorderColor}}}},Ds.map(n=>{let r=e[`${n}6`],a=e[`${n}1`],o=e[`${n}Hover`],s=e[`${n}2`],c=e[`${n}3`],l=e[`${n}Active`],u=e[`${n}ShadowColor`];return{[`&${t}-color-${n}`]:{[i(`color-base`)]:r,[i(`color-hover`)]:o,[i(`color-active`)]:l,[i(`color-light`)]:a,[i(`color-light-hover`)]:s,[i(`color-light-active`)]:c,[i(`shadow`)]:u}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:`not-allowed`,borderColor:e.colorBorderDisabled,background:a(`bg-color-disabled`),color:e.colorTextDisabled,boxShadow:`none`}},{[`&${t}-background-ghost`]:{[i(`bg-color`)]:e.ghostBg,[i(`bg-color-hover`)]:e.ghostBg,[i(`bg-color-active`)]:e.ghostBg,[i(`shadow`)]:`none`,[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`bg-color-hover`)]:e.ghostBg,[i(`bg-color-active`)]:e.ghostBg}}}]}},zg=e=>{let{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:i,motionDurationSlow:a,motionEaseInOut:o,iconGap:s,calc:c}=e;return{[t]:{outline:`none`,position:`relative`,display:`inline-flex`,gap:s,alignItems:`center`,justifyContent:`center`,fontWeight:r,whiteSpace:`nowrap`,textAlign:`center`,backgroundImage:`none`,cursor:`pointer`,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:`none`,touchAction:`manipulation`,...Uh(),"&:disabled > *":{pointerEvents:`none`},[`${t}-icon > svg`]:Yc(),"> a":{color:`currentColor`},"&:not(:disabled)":Qc(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:`0.34em`},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:`-0.34em`,letterSpacing:`0.34em`},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:`none`}},[`&${t}-loading`]:{opacity:i,cursor:`default`},[`${t}-loading-icon`]:{transition:[`width`,`opacity`,`margin`].map(e=>`${e} ${a} ${o}`).join(`,`)},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:c(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:c(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:`row-reverse`,[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:c(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:c(s).mul(-1).equal()}}}}}},Bg=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:`50%`}),Vg=(e,t=``)=>{let{componentCls:n,controlHeight:r,fontSize:i,borderRadius:a,buttonPaddingHorizontal:o,iconCls:s,buttonPaddingVertical:c,buttonIconOnlyFontSize:l}=e;return[{[t]:{fontSize:i,height:r,padding:`${Y(c)} ${Y(o)}`,borderRadius:a,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:l}}}},{[`${n}${n}-circle${t}`]:Bg(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},Hg=e=>Vg(gs(e,{fontSize:e.contentFontSize}),e.componentCls),Ug=e=>Vg(gs(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM}),`${e.componentCls}-sm`),Wg=e=>Vg(gs(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG}),`${e.componentCls}-lg`),Gg=e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:`100%`}}}},Kg=rl(`Button`,e=>{let t=Ig(e);return[zg(t),Hg(t),Ug(t),Wg(t),Gg(t),Rg(t),ag(t)]},Lg,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function qg(e,t,n,r){let{focusElCls:i,focus:a,borderElCls:o}=n,s=o?`> *`:``,c=[`hover`,a?`focus`:null,`active`].filter(Boolean).map(e=>`&:${e} ${s}`).join(`,`);return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{[c]:{zIndex:3},...i?{[`&${i}`]:{zIndex:3}}:{},[`&[disabled] ${s}`]:{zIndex:0}}}}function Jg(e,t,n){let{borderElCls:r}=n,i=r?`> ${r}`:``;return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Yg(e,t={focus:!0}){let{componentCls:n}=e,{componentCls:r}=t,i=r||n,a=`${i}-compact`;return{[a]:{...qg(e,a,t,i),...Jg(i,a,t)}}}function Xg(e,t,n){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{"&:hover,&:focus,&:active":{zIndex:3},"&[disabled]":{zIndex:0}}}}function see(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function cee(e){let t=`${e.componentCls}-compact-vertical`;return{[t]:{...Xg(e,t,e.componentCls),...see(e.componentCls,t)}}}var lee=e=>{let{antCls:t,componentCls:n,lineWidth:r,calc:i,colorBgContainer:a}=e,o=`${n}-variant-solid:not([disabled])`,s=i(r).mul(-1).equal(),[c,l]=ol(t,`btn`),u=e=>({[`${n}-compact${e?`-vertical`:``}-item`]:{[c(`compact-connect-border-color`)]:l(`bg-color-hover`),[`&${o}`]:{transition:`none`,[`& + ${o}:before`]:[{position:`absolute`,backgroundColor:l(`compact-connect-border-color`),content:`""`},e?{top:s,insetInline:s,height:r}:{insetBlock:s,insetInlineStart:s,width:r}],"&:hover:before":{display:`none`}}}});return[u(),u(!0),{[`${o}${n}-color-default`]:{[c(`compact-connect-border-color`)]:`color-mix(in srgb, ${l(`bg-color-hover`)} 75%, ${a})`}}]},uee=al([`Button`,`compact`],e=>{let t=Ig(e);return[Yg(t),cee(t),lee(t)]},Lg);function dee(e){if(hd(e)){let t=e?.delay;return t=pd(t)?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}var fee={default:[`default`,`outlined`],primary:[`primary`,`solid`],dashed:[`default`,`dashed`],link:[`link`,`link`],text:[`default`,`text`]},Zg=S.forwardRef((e,t)=>{let{_skipSemantic:n,loading:r=!1,prefixCls:i,color:a,variant:o,type:s,danger:c=!1,shape:l,size:u,disabled:d,className:f,rootClassName:p,children:m,icon:h,iconPosition:g,iconPlacement:_,ghost:v=!1,block:y=!1,htmlType:b=`button`,classNames:x,styles:C,style:w,autoInsertSpace:T,autoFocus:E,...D}=e,O=Cr(m),k=s||`default`,{getPrefixCls:A,direction:j,autoInsertSpace:M,className:N,style:P,classNames:F,styles:I,loadingIcon:L,shape:R,color:z,variant:B}=li(`button`),V=l||R||`default`,[H,U]=(0,S.useMemo)(()=>{if(a&&o)return[a,o];if(s||c){let e=fee[k]||[];return c?[`danger`,e[1]]:e}return z&&B?[z,B]:[`default`,`outlined`]},[a,o,s,c,z,B,k]),[W,ee]=(0,S.useMemo)(()=>v&&U===`solid`?[H,`outlined`]:[H,U],[H,U,v]),te=W===`danger`,ne=te?`dangerous`:W,re=T??M??!0,ie=A(`btn`,i),[ae,G]=Kg(ie),oe=(0,S.useContext)(zp),K=d??oe,se=(0,S.useContext)(ch),ce=(0,S.useMemo)(()=>dee(r),[r]),[q,le]=(0,S.useState)(ce.loading),[ue,de]=(0,S.useState)(!1),fe=(0,S.useRef)(null),pe=er(t,fe),me=O.length===1&&!h&&!ph(ee),he=(0,S.useRef)(!0);S.useEffect(()=>(he.current=!1,()=>{he.current=!0}),[]),zn(()=>{let e=null;ce.delay>0?e=setTimeout(()=>{e=null,le(!0)},ce.delay):le(ce.loading);function t(){e&&=(clearTimeout(e),null)}return t},[ce.delay,ce.loading]),(0,S.useEffect)(()=>{if(!fe.current||!re)return;let e=fe.current.textContent||``;me&&dh(e)?ue||de(!0):ue&&de(!1)}),(0,S.useEffect)(()=>{E&&fe.current&&fe.current.focus()},[]);let ge=S.useCallback(t=>{if(q||K){t.preventDefault();return}e.onClick?.((`href`in e,t))},[e.onClick,q,K]),{compactSize:_e,compactItemClassnames:ve}=ih(ie,j),ye=th(e=>u??_e??se??e),be=q?`loading`:h,xe=_??g??`start`,Se=Sr(D,[`navigate`]),Ce={...e,type:k,color:W,variant:ee,danger:te,shape:V,size:ye,disabled:K,loading:q,iconPlacement:xe},[we,Te]=Fd([n?void 0:F,x],[n?void 0:I,C],{props:Ce}),Ee=J(ie,ae,G,{[`${ie}-${V}`]:V!==`default`&&V!==`square`&&V,[`${ie}-${k}`]:k,[`${ie}-dangerous`]:c,[`${ie}-color-${ne}`]:ne,[`${ie}-variant-${ee}`]:ee,[`${ie}-lg`]:ye===`large`,[`${ie}-sm`]:ye===`small`,[`${ie}-icon-only`]:!m&&m!==0&&!!be,[`${ie}-background-ghost`]:v&&!ph(ee),[`${ie}-loading`]:q,[`${ie}-two-chinese-chars`]:ue&&re&&!q,[`${ie}-block`]:y,[`${ie}-rtl`]:j===`rtl`,[`${ie}-icon-end`]:xe===`end`},ve,f,p,N,we.root),De={...Te.root,...P,...w},Oe={className:we.icon,style:Te.icon},ke=e=>S.createElement(gh,{prefixCls:ie,...Oe},e),Ae=S.createElement(iee,{existIcon:!!h,prefixCls:ie,loading:q,mount:he.current,...Oe}),je=hd(r)&&r.icon||L,Me;Me=h&&!q?ke(h):r&&je?ke(je):Ae;let Ne=fd(m)?hh(m,me&&re,Te.content,we.content):null;if(Se.href!==void 0)return S.createElement(`a`,{...Se,className:J(Ee,{[`${ie}-disabled`]:K}),href:K?void 0:Se.href,style:De,onClick:ge,ref:pe,tabIndex:K?-1:0,"aria-disabled":K},Me,Ne);let Pe=S.createElement(`button`,{...D,type:b,className:Ee,style:De,onClick:ge,disabled:K,ref:pe},Me,Ne,ve&&S.createElement(uee,{prefixCls:ie}));return ph(ee)||(Pe=S.createElement(eh,{component:`Button`,disabled:q},Pe)),Pe});Zg.Group=lh,Zg.__ANT_BUTTON=!0;var Qg=e=>{let{type:t,children:n,prefixCls:r,buttonProps:i,close:a,autoFocus:o,emitEvent:s,isSilent:c,quitOnNullishReturnValue:l,actionFn:u}=e,d=S.useRef(!1),f=S.useRef(null),[p,m]=Vn(!1),h=(...e)=>{a?.(...e)};S.useEffect(()=>{let e=null;return o&&(e=setTimeout(()=>{f.current?.focus({preventScroll:!0})})),()=>{e&&clearTimeout(e)}},[o]);let g=e=>{_d(e)&&(m(!0),e.then((...e)=>{m(!1,!0),h.apply(void 0,e),d.current=!1},e=>{if(m(!1,!0),d.current=!1,!c?.())return Promise.reject(e)}))},_=e=>{if(d.current)return;if(d.current=!0,!u){h();return}let t;if(s){if(t=u(e),l&&!_d(t)){d.current=!1,h(e);return}}else if(u.length)t=u(a),d.current=!1;else if(t=u(),!_d(t)){h();return}g(t)};return S.createElement(Zg,{...fh(t),onClick:_,loading:p,prefixCls:r,...i,ref:f},n)},$g=S.createContext({}),{Provider:e_}=$g,t_=()=>{let{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:r,mergedOkCancel:i,rootPrefixCls:a,close:o,onCancel:s,onConfirm:c,onClose:l}=(0,S.useContext)($g);return i?S.createElement(Qg,{isSilent:r,actionFn:s,close:(...e)=>{o?.(...e),c?.(!1),l?.()},autoFocus:e===`cancel`,buttonProps:t,prefixCls:`${a}-btn`},n):null},n_=()=>{let{autoFocusButton:e,close:t,isSilent:n,okButtonProps:r,rootPrefixCls:i,okTextLocale:a,okType:o,onConfirm:s,onOk:c,onClose:l}=(0,S.useContext)($g);return S.createElement(Qg,{isSilent:n,type:o||`primary`,actionFn:c,close:(...e)=>{t?.(...e),s?.(!0),l?.()},autoFocus:e===`ok`,buttonProps:r,prefixCls:`${i}-btn`},a)},r_=S.createContext({});function i_(e,t,n){let r=t;return!r&&n&&(r=`${e}-${n}`),r}function a_(e,t){let n=e[`page${t?`Y`:`X`}Offset`],r=`scroll${t?`Top`:`Left`}`;if(typeof n!=`number`){let t=e.document;n=t.documentElement[r],typeof n!=`number`&&(n=t.body[r])}return n}function o_(e){let t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,i=r.defaultView||r.parentWindow;return n.left+=a_(i),n.top+=a_(i,!0),n}function s_(e,t=!1){if(cp(e)){let n=e.nodeName.toLowerCase(),r=[`input`,`select`,`textarea`,`button`].includes(n)||e.isContentEditable||n===`a`&&!!e.getAttribute(`href`),i=e.getAttribute(`tabindex`),a=Number(i),o=null;return i&&!Number.isNaN(a)?o=a:r&&o===null&&(o=0),r&&e.disabled&&(o=null),o!==null&&(o>=0||t&&o<0)}return!1}function c_(e,t=!1){let n=[...e.querySelectorAll(`*`)].filter(e=>s_(e,t));return s_(e,t)&&n.unshift(e),n}function l_(e,t){if(!e)return;e.focus(t);let{cursor:n}=t||{};if(n&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){let t=e.value.length;switch(n){case`start`:e.setSelectionRange(0,0);break;case`end`:e.setSelectionRange(t,t);break;default:e.setSelectionRange(0,t)}}}var u_=null,d_=[],f_=new Map,p_=new Map;function m_(){return d_[d_.length-1]}function h_(e){let t=m_();if(e&&t){let n;for(let[e,r]of f_.entries())if(r===t){n=e;break}let r=p_.get(n);return!!r&&(r===e||r.contains(e))}return!1}function g_(e){let{activeElement:t}=document;return e===t||e.contains(t)}function __(){let e=m_(),{activeElement:t}=document;if(!h_(t))if(e&&!g_(e)){let t=c_(e);(t.includes(u_)?u_:t[0])?.focus({preventScroll:!0})}else u_=t}function v_(e){if(e.key===`Tab`){let{activeElement:t}=document,n=c_(m_()),r=n[n.length-1];e.shiftKey&&t===n[0]?u_=r:!e.shiftKey&&t===r&&(u_=n[0])}}function y_(e,t){return e&&(f_.set(t,e),d_=d_.filter(t=>t!==e),d_.push(e),window.addEventListener(`focusin`,__),window.addEventListener(`keydown`,v_,!0),__()),()=>{u_=null,d_=d_.filter(t=>t!==e),f_.delete(t),p_.delete(t),d_.length===0&&(window.removeEventListener(`focusin`,__),window.removeEventListener(`keydown`,v_,!0))}}function b_(e,t){let n=(0,S.useRef)(0),[r,i]=(0,S.useState)(0);(0,S.useEffect)(()=>{n.current=0},t),(0,S.useEffect)(()=>{let[t,r]=e(n.current);return r||(n.current+=1,i(e=>e+1)),t},[...t,r])}function x_(e,t){let n=zf(),r=(0,S.useRef)(t);return r.current=t,b_(t=>{if(!e)return[void 0,!0];let i=r.current();return i?[y_(i,n),!0]:[void 0,t>=1]},[n,e]),[e=>{e&&p_.set(n,e)}]}var S_=S.memo(({children:e})=>e,(e,{shouldUpdate:t})=>!t);function C_(){return C_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,className:r,style:i,title:a,ariaId:o,footer:s,closable:c,closeIcon:l,onClose:u,children:d,bodyStyle:f,bodyProps:p,modalRender:m,onMouseDown:h,onMouseUp:g,holderRef:_,visible:v,forceRender:y,width:b,height:x,classNames:C,styles:w,isFixedPos:T,focusTrap:E}=e,{panel:D}=S.useContext(r_),O=(0,S.useRef)(null),k=er(_,D,O),[A]=x_(v&&T&&E!==!1,()=>O.current);S.useImperativeHandle(t,()=>({focus:()=>{O.current?.focus({preventScroll:!0})}}));let j={};b!==void 0&&(j.width=b),x!==void 0&&(j.height=x);let M=s?S.createElement(`div`,{className:J(`${n}-footer`,C?.footer),style:{...w?.footer}},s):null,N=a?S.createElement(`div`,{className:J(`${n}-header`,C?.header),style:{...w?.header}},S.createElement(`div`,{className:J(`${n}-title`,C?.title),id:o,style:{...w?.title}},a)):null,P=(0,S.useMemo)(()=>typeof c==`object`&&c?c:c?{closeIcon:l??S.createElement(`span`,{className:`${n}-close-x`})}:{},[c,l,n]),F=Vu(P,!0),I=typeof c==`object`&&c.disabled,L=c?S.createElement(`button`,C_({type:`button`,onClick:u,"aria-label":`Close`},F,{className:`${n}-close`,disabled:I}),P.closeIcon):null,R=S.createElement(`div`,{className:J(`${n}-container`,C?.container),style:w?.container},L,N,S.createElement(`div`,C_({className:J(`${n}-body`,C?.body),style:{...f,...w?.body}},p),d),M);return S.createElement(`div`,{key:`dialog-element`,role:`dialog`,"aria-labelledby":a?o:null,"aria-modal":`true`,ref:k,style:{...i,...j},className:J(n,r),onMouseDown:h,onMouseUp:g,tabIndex:-1,onFocus:e=>{A(e.target)}},S.createElement(S_,{shouldUpdate:v||y},m?m(R):R))});function T_(){return T_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,title:r,style:i,className:a,visible:o,forceRender:s,destroyOnHidden:c,motionName:l,ariaId:u,onVisibleChanged:d,mousePosition:f}=e,p=(0,S.useRef)(null),m=(0,S.useRef)(null);S.useImperativeHandle(t,()=>({...m.current,inMotion:p.current.inMotion,enableMotion:p.current.enableMotion}));let[h,g]=S.useState(),_={};h&&(_.transformOrigin=h);function v(){if(!p.current?.nativeElement)return;let e=o_(p.current.nativeElement);g(f&&(f.x||f.y)?`${f.x-e.left}px ${f.y-e.top}px`:``)}return S.createElement(Iu,{visible:o,onVisibleChanged:d,onAppearPrepare:v,onEnterPrepare:v,forceRender:s,motionName:l,removeOnLeave:c,ref:p},({className:t,style:o},s)=>S.createElement(w_,T_({},e,{ref:m,title:r,ariaId:u,prefixCls:n,holderRef:s,style:{...o,...i,..._},className:J(a,t)})))});function D_(){return D_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t,style:n,visible:r,maskProps:i,motionName:a,className:o}=e;return S.createElement(Iu,{key:`mask`,visible:r,motionName:a,leavedClassName:`${t}-mask-hidden`},({className:e,style:r},a)=>S.createElement(`div`,D_({ref:a,style:{...r,...n},className:J(`${t}-mask`,e,o)},i)))};function k_(){return k_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t=`rc-dialog`,zIndex:n,visible:r=!1,focusTriggerAfterClose:i=!0,wrapStyle:a,wrapClassName:o,wrapProps:s,onClose:c,afterOpenChange:l,afterClose:u,transitionName:d,animation:f,closable:p=!0,mask:m=!0,maskTransitionName:h,maskAnimation:g,maskClosable:_=!0,maskStyle:v,maskProps:y,rootClassName:b,rootStyle:x,classNames:C,styles:w}=e,T=(0,S.useRef)(null),E=(0,S.useRef)(null),D=(0,S.useRef)(null),[O,k]=S.useState(r),[A,j]=S.useState(!1),M=zf();function N(){di(E.current,document.activeElement)||(T.current=document.activeElement)}function P(){di(E.current,document.activeElement)||D.current?.focus()}function F(){if(k(!1),m&&T.current&&i){try{T.current.focus({preventScroll:!0})}catch{}T.current=null}O&&u?.()}function I(e){e?P():F(),l?.(e)}function L(e){c?.(e)}let R=(0,S.useRef)(!1),z=null;_&&(z=e=>{E.current===e.target&&R.current&&L(e)});function B(e){R.current=e.target===E.current}(0,S.useEffect)(()=>{r?(R.current=!1,k(!0),N(),E.current&&j(getComputedStyle(E.current).position===`fixed`)):O&&D.current.enableMotion()&&!D.current.inMotion()&&F()},[r]);let V={zIndex:n,...a,...w?.wrapper,display:O?null:`none`};return S.createElement(`div`,k_({className:J(`${t}-root`,b),style:x},Vu(e,{data:!0})),S.createElement(O_,{prefixCls:t,visible:m&&r,motionName:i_(t,h,g),style:{zIndex:n,...v,...w?.mask},maskProps:y,className:C?.mask}),S.createElement(`div`,k_({className:J(`${t}-wrap`,o,C?.wrapper),ref:E,onClick:z,onMouseDown:B,style:V},s),S.createElement(E_,k_({},e,{isFixedPos:A,ref:D,closable:p,ariaId:M,prefixCls:t,visible:r&&O,onClose:L,onVisibleChanged:I,motionName:i_(t,d,f)}))))};function j_(){return j_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{visible:t,getContainer:n,forceRender:r,destroyOnHidden:i=!1,afterClose:a,closable:o,panelRef:s,keyboard:c=!0,onClose:l}=e,[u,d]=S.useState(t),f=S.useMemo(()=>({panel:s}),[s]);return S.useEffect(()=>{t&&d(!0)},[t]),!r&&i&&!u?null:S.createElement(r_.Provider,{value:f},S.createElement(Xf,{open:t||r||u,onEsc:({top:e,event:t})=>{if(e&&c){t.stopPropagation(),l?.(t);return}},autoDestroy:!1,getContainer:n,autoLock:t||u},S.createElement(A_,j_({},e,{destroyOnHidden:i,afterClose:()=>{let{afterClose:e}=(o&&typeof o==`object`?o:{})||{};e?.(),a?.(),d(!1)}}))))},N_=`RC_FORM_INTERNAL_HOOKS`,P_=()=>{br(!1,`Can not find FormContext. Please make sure you wrap Field under Form.`)},F_=S.createContext({getFieldValue:P_,getFieldsValue:P_,getFieldError:P_,getFieldWarning:P_,getFieldsError:P_,isFieldsTouched:P_,isFieldTouched:P_,isFieldValidating:P_,isFieldsValidating:P_,resetFields:P_,setFields:P_,setFieldValue:P_,setFieldsValue:P_,validateFields:P_,submit:P_,getInternalHooks:()=>(P_(),{dispatch:P_,initEntityValue:P_,registerField:P_,useSubscribe:P_,setInitialValues:P_,destroyForm:P_,setCallbacks:P_,registerWatch:P_,getFields:P_,setValidateMessages:P_,setPreserve:P_,getInitialValue:P_})}),I_=S.createContext(null);function L_(e){return e==null?[]:Array.isArray(e)?e:[e]}function R_(e){return e&&!!e._init}function z_(){return{default:`Validation error on field %s`,required:`%s is required`,enum:`%s must be one of %s`,whitespace:`%s cannot be empty`,date:{format:`%s date %s is invalid for format %s`,parse:`%s date could not be parsed, %s is invalid `,invalid:`%s date %s is invalid`},types:{string:`%s is not a %s`,method:`%s is not a %s (function)`,array:`%s is not an %s`,object:`%s is not an %s`,number:`%s is not a %s`,date:`%s is not a %s`,boolean:`%s is not a %s`,integer:`%s is not an %s`,float:`%s is not a %s`,regexp:`%s is not a valid %s`,email:`%s is not a valid %s`,tel:`%s is not a valid %s`,url:`%s is not a valid %s`,hex:`%s is not a valid %s`},string:{len:`%s must be exactly %s characters`,min:`%s must be at least %s characters`,max:`%s cannot be longer than %s characters`,range:`%s must be between %s and %s characters`},number:{len:`%s must equal %s`,min:`%s cannot be less than %s`,max:`%s cannot be greater than %s`,range:`%s must be between %s and %s`},array:{len:`%s must be exactly %s in length`,min:`%s cannot be less than %s in length`,max:`%s cannot be greater than %s in length`,range:`%s must be between %s and %s in length`},pattern:{mismatch:`%s value %s does not match pattern %s`},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var B_=z_();function V_(e){try{return Function.toString.call(e).indexOf(`[native code]`)!==-1}catch{return typeof e==`function`}}function H_(e,t,n){if(ns())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&$o(i,n.prototype),i}function U_(e){var t=typeof Map==`function`?new Map:void 0;return U_=function(e){if(e===null||!V_(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return H_(e,arguments,ts(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),$o(n,e)},U_(e)}var W_=/%[sdj%]/g,G_=function(){};function K_(e){if(!e||!e.length)return null;var t={};return e.forEach(function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)}),t}function q_(e){var t=[...arguments].slice(1),n=0,r=t.length;return typeof e==`function`?e.apply(null,t):typeof e==`string`?e.replace(W_,function(e){if(e===`%%`)return`%`;if(n>=r)return e;switch(e){case`%s`:return String(t[n++]);case`%d`:return Number(t[n++]);case`%j`:try{return JSON.stringify(t[n++])}catch{return`[Circular]`}break;default:return e}}):e}function J_(e){return e===`string`||e===`url`||e===`hex`||e===`email`||e===`date`||e===`pattern`||e===`tel`}function Y_(e,t){return!!(e==null||t===`array`&&Array.isArray(e)&&!e.length||J_(t)&&typeof e==`string`&&!e)}function X_(e,t,n){var r=[],i=0,a=e.length;function o(e){r.push.apply(r,Zr(e||[])),i++,i===a&&n(r)}e.forEach(function(e){t(e,o)})}function Z_(e,t,n){var r=0,i=e.length;function a(o){if(o&&o.length){n(o);return}var s=r;r+=1,se.max?r.push(q_(i.messages[u].max,e.fullField,e.max)):o&&s&&(le.max)&&r.push(q_(i.messages[u].range,e.fullField,e.min,e.max))},lv=function(e,t,n,r,i,a){e.required&&(!n.hasOwnProperty(e.field)||Y_(t,a||e.type))&&r.push(q_(i.messages.required,e.fullField))},uv,dv=(function(){if(uv)return uv;var e=`[a-fA-F\\d:]`,t=function(t){return t&&t.includeBoundaries?`(?:(?<=\\s|^)(?=${e})|(?<=${e})(?=\\s|\$))`:``},n=`(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}`,r=`[a-fA-F\\d]{1,4}`,i=`(?:${[`(?:${r}:){7}(?:${r}|:)`,`(?:${r}:){6}(?:${n}|:${r}|:)`,`(?:${r}:){5}(?::${n}|(?::${r}){1,2}|:)`,`(?:${r}:){4}(?:(?::${r}){0,1}:${n}|(?::${r}){1,3}|:)`,`(?:${r}:){3}(?:(?::${r}){0,2}:${n}|(?::${r}){1,4}|:)`,`(?:${r}:){2}(?:(?::${r}){0,3}:${n}|(?::${r}){1,5}|:)`,`(?:${r}:){1}(?:(?::${r}){0,4}:${n}|(?::${r}){1,6}|:)`,`(?::(?:(?::${r}){0,5}:${n}|(?::${r}){1,7}|:))`].join(`|`)})(?:%[0-9a-zA-Z]{1,})?`,a=RegExp(`(?:^${n}\$)|(?:^${i}\$)`),o=RegExp(`^${n}\$`),s=RegExp(`^${i}\$`),c=function(e){return e&&e.exact?a:RegExp(`(?:${t(e)}${n}${t(e)})|(?:${t(e)}${i}${t(e)})`,`g`)};c.v4=function(e){return e&&e.exact?o:RegExp(`${t(e)}${n}${t(e)}`,`g`)},c.v6=function(e){return e&&e.exact?s:RegExp(`${t(e)}${i}${t(e)}`,`g`)};var l=`(?:(?:(?:[a-z]+:)?//)|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|${c.v4().source}|${c.v6().source}|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?`;return uv=RegExp(`(?:^${l}\$)`,`i`),uv}),fv={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tel:/^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},pv={integer:function(e){return pv.number(e)&&parseInt(e,10)===e},float:function(e){return pv.number(e)&&!pv.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime==`function`&&typeof e.getMonth==`function`&&typeof e.getYear==`function`&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e==`number`},object:function(e){return zo(e)===`object`&&!pv.array(e)},method:function(e){return typeof e==`function`},email:function(e){return typeof e==`string`&&e.length<=320&&!!e.match(fv.email)},tel:function(e){return typeof e==`string`&&e.length<=32&&!!e.match(fv.tel)},url:function(e){return typeof e==`string`&&e.length<=2048&&!!e.match(dv())},hex:function(e){return typeof e==`string`&&!!e.match(fv.hex)}},mv={required:lv,whitespace:function(e,t,n,r,i){(/^\s+$/.test(t)||t===``)&&r.push(q_(i.messages.whitespace,e.fullField))},type:function(e,t,n,r,i){if(e.required&&t===void 0){lv(e,t,n,r,i);return}var a=[`integer`,`float`,`array`,`regexp`,`object`,`method`,`email`,`tel`,`number`,`date`,`url`,`hex`],o=e.type;a.indexOf(o)>-1?pv[o](t)||r.push(q_(i.messages.types[o],e.fullField,e.type)):o&&zo(t)!==e.type&&r.push(q_(i.messages.types[o],e.fullField,e.type))},range:cv,enum:ov,pattern:sv},hv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();mv.required(e,t,r,a,i)}n(a)},gv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t==null&&!e.required)return n();mv.required(e,t,r,a,i,`array`),t!=null&&(mv.type(e,t,r,a,i),mv.range(e,t,r,a,i))}n(a)},_v=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();mv.required(e,t,r,a,i),t!==void 0&&mv.type(e,t,r,a,i)}n(a)},vv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t,`date`)&&!e.required)return n();if(mv.required(e,t,r,a,i),!Y_(t,`date`)){var o=t instanceof Date?t:new Date(t);mv.type(e,o,r,a,i),o&&mv.range(e,o.getTime(),r,a,i)}}n(a)},yv=`enum`,bv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();mv.required(e,t,r,a,i),t!==void 0&&mv[yv](e,t,r,a,i)}n(a)},xv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();mv.required(e,t,r,a,i),t!==void 0&&(mv.type(e,t,r,a,i),mv.range(e,t,r,a,i))}n(a)},Sv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();mv.required(e,t,r,a,i),t!==void 0&&(mv.type(e,t,r,a,i),mv.range(e,t,r,a,i))}n(a)},Cv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();mv.required(e,t,r,a,i),t!==void 0&&mv.type(e,t,r,a,i)}n(a)},wv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t===``&&(t=void 0),Y_(t)&&!e.required)return n();mv.required(e,t,r,a,i),t!==void 0&&(mv.type(e,t,r,a,i),mv.range(e,t,r,a,i))}n(a)},Tv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();mv.required(e,t,r,a,i),t!==void 0&&mv.type(e,t,r,a,i)}n(a)},Ev=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t,`string`)&&!e.required)return n();mv.required(e,t,r,a,i),Y_(t,`string`)||mv.pattern(e,t,r,a,i)}n(a)},Dv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();mv.required(e,t,r,a,i),Y_(t)||mv.type(e,t,r,a,i)}n(a)},Ov=function(e,t,n,r,i){var a=[],o=Array.isArray(t)?`array`:zo(t);mv.required(e,t,r,a,i,o),n(a)},kv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t,`string`)&&!e.required)return n();mv.required(e,t,r,a,i,`string`),Y_(t,`string`)||(mv.type(e,t,r,a,i),mv.range(e,t,r,a,i),mv.pattern(e,t,r,a,i),e.whitespace===!0&&mv.whitespace(e,t,r,a,i))}n(a)},Av=function(e,t,n,r,i){var a=e.type,o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t,a)&&!e.required)return n();mv.required(e,t,r,o,i,a),Y_(t,a)||mv.type(e,t,r,o,i)}n(o)},jv={string:kv,method:Cv,number:wv,boolean:_v,regexp:Dv,integer:Sv,float:xv,array:gv,object:Tv,enum:bv,pattern:Ev,date:vv,url:Av,hex:Av,email:Av,tel:Av,required:Ov,any:hv},Mv=function(){function e(t){Yo(this,e),Ko(this,`rules`,null),Ko(this,`_messages`,B_),this.define(t)}return Zo(e,[{key:`define`,value:function(e){var t=this;if(!e)throw Error(`Cannot configure a schema with no rules`);if(zo(e)!==`object`||Array.isArray(e))throw Error(`Rules must be an object`);this.rules={},Object.keys(e).forEach(function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]})}},{key:`messages`,value:function(e){return e&&(this._messages=iv(z_(),e)),this._messages}},{key:`validate`,value:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=t,o=r,s=i;if(typeof o==`function`&&(s=o,o={}),!this.rules||Object.keys(this.rules).length===0)return s&&s(null,a),Promise.resolve(a);function c(e){var t=[],n={};function r(e){if(Array.isArray(e)){var n;t=(n=t).concat.apply(n,Zr(e))}else t.push(e)}for(var i=0;i0&&arguments[0]!==void 0?arguments[0]:[],l=Array.isArray(c)?c:[c];!o.suppressWarning&&l.length&&e.warning(`async-validator:`,l),l.length&&r.message!==void 0&&r.message!==null&&(l=[].concat(r.message));var u=l.map(rv(r,a));if(o.first&&u.length)return d[r.field]=1,n(u);if(!i)n(u);else{if(r.required&&!t.value)return r.message===void 0?o.error&&(u=[o.error(r,q_(o.messages.required,r.field))]):u=[].concat(r.message).map(rv(r,a)),n(u);var f={};r.defaultField&&Object.keys(t.value).map(function(e){f[e]=r.defaultField}),f=Jo(Jo({},f),t.rule.fields);var p={};Object.keys(f).forEach(function(e){var t=f[e];p[e]=(Array.isArray(t)?t:[t]).map(s.bind(null,e))});var m=new e(p);m.messages(o.messages),t.rule.options&&(t.rule.options.messages=o.messages,t.rule.options.error=o.error),m.validate(t.value,t.rule.options||o,function(e){var t=[];u&&u.length&&t.push.apply(t,Zr(u)),e&&e.length&&t.push.apply(t,Zr(e)),n(t.length?t:null)})}}var l;if(r.asyncValidator)l=r.asyncValidator(r,t.value,c,t.source,o);else if(r.validator){try{l=r.validator(r,t.value,c,t.source,o)}catch(e){var u,f;(u=(f=console).error)==null||u.call(f,e),o.suppressValidatorError||setTimeout(function(){throw e},0),c(e.message)}l===!0?c():l===!1?c(typeof r.message==`function`?r.message(r.fullField||r.field):r.message||`${r.fullField||r.field} fails`):l instanceof Array?c(l):l instanceof Error&&c(l.message)}l&&l.then&&l.then(function(){return c()},function(e){return c(e)})},function(e){c(e)},a)}},{key:`getType`,value:function(e){if(e.type===void 0&&e.pattern instanceof RegExp&&(e.type=`pattern`),typeof e.validator!=`function`&&e.type&&!jv.hasOwnProperty(e.type))throw Error(q_(`Unknown rule type %s`,e.type));return e.type||`string`}},{key:`getValidationMethod`,value:function(e){if(typeof e.validator==`function`)return e.validator;var t=Object.keys(e),n=t.indexOf(`message`);return n!==-1&&t.splice(n,1),t.length===1&&t[0]===`required`?jv.required:jv[this.getType(e)]||void 0}}]),e}();Ko(Mv,`register`,function(e,t){if(typeof t!=`function`)throw Error(`Cannot register a validator by type, validator is not a function`);jv[e]=t}),Ko(Mv,`warning`,G_),Ko(Mv,`messages`,B_),Ko(Mv,`validators`,jv);var Nv="'${name}' is not a valid ${type}",Pv={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Nv,method:Nv,array:Nv,object:Nv,number:Nv,date:Nv,boolean:Nv,integer:Nv,float:Nv,regexp:Nv,email:Nv,tel:Nv,url:Nv,hex:Nv},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},Fv=Mv;function Iv(e,t){return e.replace(/\\?\$\{\w+\}/g,e=>e.startsWith(`\\`)?e.slice(1):t[e.slice(2,-1)])}var Lv=`CODE_LOGIC_ERROR`;async function Rv(e,t,n,r,i){let a={...n};if(delete a.ruleIndex,Fv.warning=()=>void 0,a.validator){let e=a.validator;a.validator=(...t)=>{try{return e(...t)}catch(e){return console.error(e),Promise.reject(Lv)}}}let o=null;a&&a.type===`array`&&a.defaultField&&(o=a.defaultField,delete a.defaultField);let s=new Fv({[e]:[a]}),c=fr(Pv,r.validateMessages);s.messages(c);let l=[];try{await Promise.resolve(s.validate({[e]:t},{...r}))}catch(e){e.errors&&(l=e.errors.map(({message:e},t)=>{let n=e===Lv?c.default:e;return S.isValidElement(n)?S.cloneElement(n,{key:`error_${t}`}):n}))}if(!l.length&&o&&Array.isArray(t)&&t.length>0)return(await Promise.all(t.map((t,n)=>Rv(`${e}.${n}`,t,o,r,i)))).reduce((e,t)=>[...e,...t],[]);let u={...n,name:e,enum:(n.enum||[]).join(`, `),...i};return l.map(e=>typeof e==`string`?Iv(e,u):e)}function zv(e,t,n,r,i,a){let o=e.join(`.`),s=n.map((e,t)=>{let n=e.validator,r={...e,ruleIndex:t};return n&&(r.validator=(e,t,r)=>{let i=!1,a=n(e,t,(...e)=>{Promise.resolve().then(()=>{br(!i,"Your validator function has already return a promise. `callback` will be ignored."),i||r(...e)})});i=a&&typeof a.then==`function`&&typeof a.catch==`function`,br(i,"`callback` is deprecated. Please return a promise instead."),i&&a.then(()=>{r()}).catch(e=>{r(e||` `)})}),r}).sort(({warningOnly:e,ruleIndex:t},{warningOnly:n,ruleIndex:r})=>!!e==!!n?t-r:e?1:-1),c;if(i===!0)c=new Promise(async(e,n)=>{for(let e=0;eRv(o,t,e,r,a).then(t=>({errors:t,rule:e})));c=(i?Vv(e):Bv(e)).then(e=>Promise.reject(e))}return c.catch(e=>e),c}async function Bv(e){return Promise.all(e).then(e=>[].concat(...e))}async function Vv(e){let t=0;return new Promise(n=>{e.forEach(r=>{r.then(r=>{r.errors.length&&n([r]),t+=1,t===e.length&&n([])})})})}function Hv(e){return L_(e)}function Uv(e,t){let n={};return t.forEach(t=>{let r=ar(e,t);n=sr(n,t,r)}),n}function Wv(e,t,n=!1){return e&&e.some(e=>Gv(t,e,n))}function Gv(e,t,n=!1){return!e||!t||!n&&e.length!==t.length?!1:t.every((t,n)=>e[n]===t)}function Kv(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(e),r=Object.keys(t);return[...new Set([...n,...r])].every(n=>{let r=e[n],i=t[n];return typeof r==`function`&&typeof i==`function`?!0:r===i})}function qv(e,...t){let n=t[0];return n&&n.target&&typeof n.target==`object`&&e in n.target?n.target[e]:n}function Jv(e,t,n){let{length:r}=e;if(t<0||t>=r||n<0||n>=r)return e;let i=e[t],a=t-n;return a>0?[...e.slice(0,n),i,...e.slice(n,t),...e.slice(t+1,r)]:a<0?[...e.slice(0,t),...e.slice(t+1,n+1),i,...e.slice(n+1,r)]:e}var Yv=e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},Xv=class{namePathList=[];taskId=0;watcherList=new Set;form;constructor(e){this.form=e}register(e){return this.watcherList.add(e),()=>{this.watcherList.delete(e)}}notify(e){e.forEach(e=>{this.namePathList.every(t=>!Gv(t,e))&&this.namePathList.push(e)}),this.doBatch()}doBatch(){this.taskId+=1;let e=this.taskId;Yv(()=>{if(e===this.taskId&&this.watcherList.size){let e=this.form.getForm(),t=e.getFieldsValue(),n=e.getFieldsValue(!0);this.watcherList.forEach(e=>{e(t,n,this.namePathList)}),this.namePathList=[]}})}};async function Zv(){return new Promise(e=>{Yv(()=>{ri(()=>{e()})})})}function Qv(){return Qv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{preserve:e,isListField:t,name:n}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(t,e,Hv(n)),this.cancelRegisterFunc=null};getNamePath=()=>{let{name:e,fieldContext:t}=this.props,{prefixName:n=[]}=t;return e===void 0?[]:[...n,...e]};getRules=()=>{let{rules:e=[],fieldContext:t}=this.props;return e.map(e=>typeof e==`function`?e(t):e)};reRender(){this.mounted&&this.forceUpdate()}refresh=()=>{this.mounted&&this.setState(({resetCount:e})=>({resetCount:e+1}))};metaCache=null;triggerMetaEvent=e=>{let{onMetaChange:t}=this.props;if(t){let n={...this.getMeta(),destroy:e};Ti(this.metaCache,n)||t(n),this.metaCache=n}else this.metaCache=null};onStoreChange=(e,t,n)=>{let{shouldUpdate:r,dependencies:i=[],onReset:a}=this.props,{store:o}=n,s=this.getNamePath(),c=this.getValue(e),l=this.getValue(o),u=t&&Wv(t,s);switch(n.type===`valueUpdate`&&n.source===`external`&&!Ti(c,l)&&(this.touched=!0,this.dirty=!0,this.validatePromise=null,this.errors=$v,this.warnings=ey,this.triggerMetaEvent()),n.type){case`reset`:if(!t||u){this.touched=!1,this.dirty=!1,this.validatePromise=void 0,this.errors=$v,this.warnings=ey,this.triggerMetaEvent(),a?.(),this.refresh();return}break;case`remove`:if(r&&ty(r,e,o,c,l,n)){this.reRender();return}break;case`setField`:{let{data:i}=n;if(u){`touched`in i&&(this.touched=i.touched),`validating`in i&&!(`originRCField`in i)&&(this.validatePromise=i.validating?Promise.resolve([]):null),`errors`in i&&(this.errors=i.errors||$v),`warnings`in i&&(this.warnings=i.warnings||ey),this.dirty=!0,this.triggerMetaEvent(),this.reRender();return}else if(`value`in i&&Wv(t,s,!0)){this.reRender();return}if(r&&!s.length&&ty(r,e,o,c,l,n)){this.reRender();return}break}case`dependenciesUpdate`:if(i.map(Hv).some(e=>Wv(n.relatedFields,e))){this.reRender();return}break;default:if(u||(!i.length||s.length||r)&&ty(r,e,o,c,l,n)){this.reRender();return}break}r===!0&&this.reRender()};validateRules=e=>{let t=this.getNamePath(),n=this.getValue(),{triggerName:r,validateOnly:i=!1,delayFrame:a}=e||{},o=Promise.resolve().then(async()=>{if(!this.mounted)return[];let{validateFirst:i=!1,messageVariables:s,validateDebounce:c}=this.props;a&&await Zv();let l=this.getRules();if(r&&(l=l.filter(e=>e).filter(e=>{let{validateTrigger:t}=e;return t?L_(t).includes(r):!0})),c&&r&&(await new Promise(e=>{setTimeout(e,c)}),this.validatePromise!==o))return[];let u=zv(t,n,l,e,i,s);return u.catch(e=>e).then((e=$v)=>{if(this.validatePromise===o){this.validatePromise=null;let t=[],n=[];e.forEach?.(({rule:{warningOnly:e},errors:r=$v})=>{e?n.push(...r):t.push(...r)}),this.errors=t,this.warnings=n,this.triggerMetaEvent(),this.reRender()}}),u});return i?o:(this.validatePromise=o,this.dirty=!0,this.errors=$v,this.warnings=ey,this.triggerMetaEvent(),this.reRender(),o)};isFieldValidating=()=>!!this.validatePromise;isFieldTouched=()=>this.touched;isFieldDirty=()=>{if(this.dirty||this.props.initialValue!==void 0)return!0;let{fieldContext:e}=this.props,{getInitialValue:t}=e.getInternalHooks(N_);return t(this.getNamePath())!==void 0};getErrors=()=>this.errors;getWarnings=()=>this.warnings;isListField=()=>this.props.isListField;isList=()=>this.props.isList;isPreserve=()=>this.props.preserve;getMeta=()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:this.validatePromise===null});getOnlyChild=e=>{if(typeof e==`function`){let t=this.getMeta();return{...this.getOnlyChild(e(this.getControlled(),t,this.props.fieldContext)),isFunction:!0}}let t=Cr(e);return t.length!==1||!S.isValidElement(t[0])?{child:t,isFunction:!1}:{child:t[0],isFunction:!1}};getValue=e=>{let{getFieldsValue:t}=this.props.fieldContext,n=this.getNamePath();return ar(e||t(!0),n)};getControlled=(e={})=>{let{name:t,trigger:n=`onChange`,validateTrigger:r,getValueFromEvent:i,normalize:a,valuePropName:o=`value`,getValueProps:s,fieldContext:c}=this.props,l=r===void 0?c.validateTrigger:r,u=this.getNamePath(),{getInternalHooks:d,getFieldsValue:f}=c,{dispatch:p}=d(N_),m=this.getValue(),h=s||(e=>({[o]:e})),g=e[n],_=t===void 0?{}:h(m),v={...e,..._};return v[n]=(...e)=>{this.touched=!0,this.dirty=!0,this.triggerMetaEvent();let t;t=i?i(...e):qv(o,...e),a&&(t=a(t,m,f(!0))),t!==m&&p({type:`updateValue`,namePath:u,value:t}),g&&g(...e)},L_(l||[]).forEach(e=>{let t=v[e];v[e]=(...n)=>{t&&t(...n);let{rules:r}=this.props;r&&r.length&&p({type:`validateField`,namePath:u,triggerName:e})}}),v};render(){let{resetCount:e}=this.state,{children:t}=this.props,{child:n,isFunction:r}=this.getOnlyChild(t),i;return r?i=n:S.isValidElement(n)?i=S.cloneElement(n,this.getControlled(n.props)):(br(!n,"`children` of Field is not validate ReactElement."),i=n),S.createElement(S.Fragment,{key:e},i)}};function ry({name:e,...t}){let n=S.useContext(F_),r=S.useContext(I_),i=e===void 0?void 0:Hv(e),a=t.isListField??!!r,o=`keep`;return a||(o=`_${(i||[]).join(`_`)}`),S.createElement(ny,Qv({key:o,name:i,isListField:a},t,{fieldContext:n}))}function iy({name:e,initialValue:t,children:n,rules:r,validateTrigger:i,isListField:a}){let o=S.useContext(F_),s=S.useContext(I_),c=S.useRef({keys:[],id:0}).current,l=S.useMemo(()=>[...Hv(o.prefixName)||[],...Hv(e)],[o.prefixName,e]),u=S.useMemo(()=>({...o,prefixName:l}),[o,l]),d=S.useMemo(()=>({getKey:e=>{let t=l.length,n=e[t];return[c.keys[n],e.slice(t+1)]}}),[c,l]);return typeof n==`function`?S.createElement(I_.Provider,{value:d},S.createElement(F_.Provider,{value:u},S.createElement(ry,{name:[],shouldUpdate:(e,t,{source:n})=>n===`internal`?!1:e!==t,rules:r,validateTrigger:i,initialValue:t,isList:!0,isListField:a??!!s},({value:e=[],onChange:t},r)=>{let{getFieldValue:i}=o,a=()=>i(l||[])||[],s={add:(e,n)=>{let r=a();n>=0&&n<=r.length?(c.keys=[...c.keys.slice(0,n),c.id,...c.keys.slice(n)],t([...r.slice(0,n),e,...r.slice(n)])):(c.keys=[...c.keys,c.id],t([...r,e])),c.id+=1},remove:e=>{let n=a(),r=new Set(Array.isArray(e)?e:[e]);r.size<=0||(c.keys=c.keys.filter((e,t)=>!r.has(t)),t(n.filter((e,t)=>!r.has(t))))},move(e,n){if(e===n)return;let r=a();e<0||e>=r.length||n<0||n>=r.length||(c.keys=Jv(c.keys,e,n),t(Jv(r,e,n)))}},u=e||[];return Array.isArray(u)||(u=[]),n(u.map((e,t)=>{let n=c.keys[t];return n===void 0&&(c.keys[t]=c.id,n=c.keys[t],c.id+=1),{name:t,key:n,isListField:!0}}),s,r)}))):(br(!1,`Form.List only accepts function as children.`),null)}function ay(e){let t=!1,n=e.length,r=[];return e.length?new Promise((i,a)=>{e.forEach((e,o)=>{e.catch(e=>(t=!0,e)).then(e=>{--n,r[o]=e,!(n>0)&&(t&&a(r),i(r))})})}):Promise.resolve([])}var oy=`__@field_split__`;function sy(e){return e.map(e=>`${typeof e}:${e}`).join(oy)}var cy=class{kvs=new Map;set(e,t){this.kvs.set(sy(e),t)}get(e){return this.kvs.get(sy(e))}getAsPrefix(e){let t=sy(e),n=t+oy,r=[],i=this.kvs.get(t);return i!==void 0&&r.push(i),this.kvs.forEach((e,t)=>{t.startsWith(n)&&r.push(e)}),r}update(e,t){let n=t(this.get(e));n?this.set(e,n):this.delete(e)}delete(e){this.kvs.delete(sy(e))}map(e){return[...this.kvs.entries()].map(([t,n])=>e({key:t.split(oy).map(e=>{let[,t,n]=e.match(/^([^:]*):(.*)$/);return t===`number`?Number(n):n}),value:n}))}toJSON(){let e={};return this.map(({key:t,value:n})=>(e[t.join(`.`)]=n,null)),e}},ly=class{formHooked=!1;forceRootUpdate;subscribable=!0;store={};fieldEntities=[];initialValues={};callbacks={};validateMessages=null;preserve=null;lastValidatePromise=null;watcherCenter=new Xv(this);constructor(e){this.forceRootUpdate=e}getForm=()=>({getFieldValue:this.getFieldValue,getFieldsValue:this.getFieldsValue,getFieldError:this.getFieldError,getFieldWarning:this.getFieldWarning,getFieldsError:this.getFieldsError,isFieldsTouched:this.isFieldsTouched,isFieldTouched:this.isFieldTouched,isFieldValidating:this.isFieldValidating,isFieldsValidating:this.isFieldsValidating,resetFields:this.resetFields,setFields:this.setFields,setFieldValue:this.setFieldValue,setFieldsValue:this.setFieldsValue,validateFields:this.validateFields,submit:this.submit,_init:!0,getInternalHooks:this.getInternalHooks});getInternalHooks=e=>e===`RC_FORM_INTERNAL_HOOKS`?(this.formHooked=!0,{dispatch:this.dispatch,initEntityValue:this.initEntityValue,registerField:this.registerField,useSubscribe:this.useSubscribe,setInitialValues:this.setInitialValues,destroyForm:this.destroyForm,setCallbacks:this.setCallbacks,setValidateMessages:this.setValidateMessages,getFields:this.getFields,setPreserve:this.setPreserve,getInitialValue:this.getInitialValue,registerWatch:this.registerWatch}):(br(!1,"`getInternalHooks` is internal usage. Should not call directly."),null);useSubscribe=e=>{this.subscribable=e};prevWithoutPreserves=null;setInitialValues=(e,t)=>{if(this.initialValues=e||{},t){let t=fr(e,this.store);this.prevWithoutPreserves?.map(({key:n})=>{t=sr(t,n,ar(e,n))}),this.prevWithoutPreserves=null,this.updateStore(t)}};destroyForm=e=>{if(e)this.updateStore({});else{let e=new cy;this.getFieldEntities(!0).forEach(t=>{this.isMergedPreserve(t.isPreserve())||e.set(t.getNamePath(),!0)}),this.prevWithoutPreserves=e}};getInitialValue=e=>{let t=ar(this.initialValues,e);return e.length?fr(t):t};setCallbacks=e=>{this.callbacks=e};setValidateMessages=e=>{this.validateMessages=e};setPreserve=e=>{this.preserve=e};registerWatch=e=>this.watcherCenter.register(e);notifyWatch=(e=[])=>{this.watcherCenter.notify(e)};timeoutId=null;warningUnhooked=()=>{};updateStore=e=>{this.store=e};getFieldEntities=(e=!1)=>e?this.fieldEntities.filter(e=>e.getNamePath().length):this.fieldEntities;getFieldsMap=(e=!1)=>{let t=new cy;return this.getFieldEntities(e).forEach(e=>{let n=e.getNamePath();t.set(n,e)}),t};getFieldEntitiesForNamePathList=(e,t=!1)=>{if(!e)return this.getFieldEntities(!0);let n=this.getFieldsMap(!0);return t?e.flatMap(e=>{let t=Hv(e),r=n.getAsPrefix(t);return r.length?r:[{INVALIDATE_NAME_PATH:t}]}):e.map(e=>{let t=Hv(e);return n.get(t)||{INVALIDATE_NAME_PATH:Hv(e)}})};getFieldsValue=(e,t)=>{this.warningUnhooked();let n,r;if(e===!0||Array.isArray(e)?(n=e,r=t):e&&typeof e==`object`&&(r=e.filter),n===!0&&!r)return this.store;let i=this.getFieldEntitiesForNamePathList(Array.isArray(n)?n:null,!0),a=[],o=[];i.forEach(e=>{let t=e.INVALIDATE_NAME_PATH||e.getNamePath();if(e.isList?.()){o.push(t);return}if(!r)a.push(t);else{let n=`getMeta`in e?e.getMeta():null;r(n)&&a.push(t)}});let s=Uv(this.store,a.map(Hv));return o.forEach(e=>{ar(s,e)||(s=sr(s,e,[]))}),s};getFieldValue=e=>{this.warningUnhooked();let t=Hv(e);return ar(this.store,t)};getFieldsError=e=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(e).map((t,n)=>t&&!t.INVALIDATE_NAME_PATH?{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}:{name:Hv(e[n]),errors:[],warnings:[]}));getFieldError=e=>{this.warningUnhooked();let t=Hv(e);return this.getFieldsError([t])[0].errors};getFieldWarning=e=>{this.warningUnhooked();let t=Hv(e);return this.getFieldsError([t])[0].warnings};isFieldsTouched=(...e)=>{this.warningUnhooked();let[t,n]=e,r,i=!1;e.length===0?r=null:e.length===1?Array.isArray(t)?(r=t.map(Hv),i=!1):(r=null,i=t):(r=t.map(Hv),i=n);let a=this.getFieldEntities(!0),o=e=>e.isFieldTouched();if(!r)return i?a.every(e=>o(e)||e.isList()):a.some(o);let s=new cy;r.forEach(e=>{s.set(e,[])}),a.forEach(e=>{let t=e.getNamePath();r.forEach(n=>{n.every((e,n)=>t[n]===e)&&s.update(n,t=>[...t,e])})});let c=e=>e.some(o),l=s.map(({value:e})=>e);return i?l.every(c):l.some(c)};isFieldTouched=e=>(this.warningUnhooked(),this.isFieldsTouched([e]));isFieldsValidating=e=>{this.warningUnhooked();let t=this.getFieldEntities();if(!e)return t.some(e=>e.isFieldValidating());let n=e.map(Hv);return t.some(e=>Wv(n,e.getNamePath())&&e.isFieldValidating())};isFieldValidating=e=>(this.warningUnhooked(),this.isFieldsValidating([e]));resetWithFieldInitialValue=(e={})=>{let t=new cy,n=this.getFieldEntities(!0);n.forEach(e=>{let{initialValue:n}=e.props,r=e.getNamePath();if(n!==void 0){let i=t.get(r)||new Set;i.add({entity:e,value:n}),t.set(r,i)}});let r=n=>{n.forEach(n=>{let{initialValue:r}=n.props;if(r!==void 0){let r=n.getNamePath();if(this.getInitialValue(r)!==void 0)br(!1,`Form already set 'initialValues' with path '${r.join(`.`)}'. Field can not overwrite it.`);else{let i=t.get(r);if(i&&i.size>1)br(!1,`Multiple Field with path '${r.join(`.`)}' set 'initialValue'. Can not decide which one to pick.`);else if(i){let t=this.getFieldValue(r);!n.isListField()&&(!e.skipExist||t===void 0)&&this.updateStore(sr(this.store,r,[...i][0].value))}}}})},i;e.entities?i=e.entities:e.namePathList?(i=[],e.namePathList.forEach(e=>{let n=t.get(e);n&&i.push(...[...n].map(e=>e.entity))})):i=n,r(i)};resetFields=e=>{this.warningUnhooked();let t=this.store;if(!e){this.updateStore(fr(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(t,null,{type:`reset`}),this.notifyWatch();return}let n=e.map(Hv);n.forEach(e=>{let t=this.getInitialValue(e);this.updateStore(sr(this.store,e,t))}),this.resetWithFieldInitialValue({namePathList:n}),this.notifyObservers(t,n,{type:`reset`}),this.notifyWatch(n)};setFields=e=>{this.warningUnhooked();let t=this.store,n=[];e.forEach(e=>{let{name:r,...i}=e,a=Hv(r);n.push(a),`value`in i&&this.updateStore(sr(this.store,a,i.value)),this.notifyObservers(t,[a],{type:`setField`,data:e})}),this.notifyWatch(n)};getFields=()=>this.getFieldEntities(!0).map(e=>{let t=e.getNamePath(),n={...e.getMeta(),name:t,value:this.getFieldValue(t)};return Object.defineProperty(n,`originRCField`,{value:!0}),n});initEntityValue=e=>{let{initialValue:t}=e.props;if(t!==void 0){let n=e.getNamePath();ar(this.store,n)===void 0&&this.updateStore(sr(this.store,n,t))}};isMergedPreserve=e=>(e===void 0?this.preserve:e)??!0;registerField=e=>{this.fieldEntities.push(e);let t=e.getNamePath();if(this.notifyWatch([t]),e.props.initialValue!==void 0){let t=this.store;this.resetWithFieldInitialValue({entities:[e],skipExist:!0}),this.notifyObservers(t,[e.getNamePath()],{type:`valueUpdate`,source:`internal`})}return(n,r,i=[])=>{if(this.fieldEntities=this.fieldEntities.filter(t=>t!==e),!this.isMergedPreserve(r)&&(!n||i.length>1)){let e=n?void 0:this.getInitialValue(t);if(t.length&&this.getFieldValue(t)!==e&&this.fieldEntities.every(e=>!Gv(e.getNamePath(),t))){let n=this.store;this.updateStore(sr(n,t,e,!0)),this.notifyObservers(n,[t],{type:`remove`}),this.triggerDependenciesUpdate(n,t)}}this.notifyWatch([t])}};dispatch=e=>{switch(e.type){case`updateValue`:{let{namePath:t,value:n}=e;this.updateValue(t,n);break}case`validateField`:{let{namePath:t,triggerName:n}=e;this.validateFields([t],{triggerName:n});break}default:}};notifyObservers=(e,t,n)=>{if(this.subscribable){let r={...n,store:this.getFieldsValue(!0)};this.getFieldEntities().forEach(({onStoreChange:n})=>{n(e,t,r)})}else this.forceRootUpdate()};triggerDependenciesUpdate=(e,t)=>{let n=this.getDependencyChildrenFields(t);return n.length&&this.validateFields(n,{delayFrame:!0}),this.notifyObservers(e,n,{type:`dependenciesUpdate`,relatedFields:[t,...n]}),n};updateValue=(e,t)=>{let n=Hv(e),r=this.store;this.updateStore(sr(this.store,n,t)),this.notifyObservers(r,[n],{type:`valueUpdate`,source:`internal`}),this.notifyWatch([n]);let i=this.triggerDependenciesUpdate(r,n),{onValuesChange:a}=this.callbacks;if(a){let e=Uv(this.store,[n]);a(e,sr(this.getFieldsValue(),n,ar(e,n)))}this.triggerOnFieldsChange([n,...i])};setFieldsValue=e=>{this.warningUnhooked();let t=this.store;if(e){let t=fr(this.store,e);this.updateStore(t)}this.notifyObservers(t,null,{type:`valueUpdate`,source:`external`}),this.notifyWatch()};setFieldValue=(e,t)=>{this.setFields([{name:e,value:t,errors:[],warnings:[],touched:!0}])};getDependencyChildrenFields=e=>{let t=new Set,n=[],r=new cy;this.getFieldEntities().forEach(e=>{let{dependencies:t}=e.props;(t||[]).forEach(t=>{let n=Hv(t);r.update(n,(t=new Set)=>(t.add(e),t))})});let i=e=>{(r.get(e)||new Set).forEach(e=>{if(!t.has(e)){t.add(e);let r=e.getNamePath();e.isFieldDirty()&&r.length&&(n.push(r),i(r))}})};return i(e),n};triggerOnFieldsChange=(e,t)=>{let{onFieldsChange:n}=this.callbacks;if(n){let r=this.getFields();if(t){let e=new cy;t.forEach(({name:t,errors:n})=>{e.set(t,n)}),r.forEach(t=>{t.errors=e.get(t.name)||t.errors})}let i=r.filter(({name:t})=>Wv(e,t));i.length&&n(i,r)}};validateFields=(e,t)=>{this.warningUnhooked();let n,r;Array.isArray(e)||typeof e==`string`||typeof t==`string`?(n=e,r=t):r=e;let i=!!n,a=i?n.map(Hv):[],o=[...a],s=[],c=String(Date.now()),l=new Set,{recursive:u,dirty:d}=r||{};this.getFieldEntities(!0).forEach(e=>{let t=e.getNamePath();if(i||((!e.isList()||!a.some(e=>Gv(e,t,!0)))&&o.push(t),a.push(t)),!(!e.props.rules||!e.props.rules.length)&&!(d&&!e.isFieldDirty())&&(l.add(t.join(c)),!i||Wv(a,t,u))){let n=e.validateRules({validateMessages:{...Pv,...this.validateMessages},...r});s.push(n.then(()=>({name:t,errors:[],warnings:[]})).catch(e=>{let n=[],r=[];return e.forEach?.(({rule:{warningOnly:e},errors:t})=>{e?r.push(...t):n.push(...t)}),n.length?Promise.reject({name:t,errors:n,warnings:r}):{name:t,errors:n,warnings:r}}))}});let f=ay(s);this.lastValidatePromise=f,f.catch(e=>e).then(e=>{let t=e.map(({name:e})=>e);this.notifyObservers(this.store,t,{type:`validateFinish`}),this.triggerOnFieldsChange(t,e)});let p=f.then(()=>this.lastValidatePromise===f?Promise.resolve(this.getFieldsValue(o)):Promise.reject([])).catch(e=>{let t=e.filter(e=>e&&e.errors.length),n=t[0]?.errors?.[0];return Promise.reject({message:n,values:this.getFieldsValue(a),errorFields:t,outOfDate:this.lastValidatePromise!==f})});p.catch(e=>e);let m=a.filter(e=>l.has(e.join(c)));return this.triggerOnFieldsChange(m),p};submit=()=>{this.warningUnhooked(),this.validateFields().then(e=>{let{onFinish:t}=this.callbacks;if(t)try{t(e)}catch(e){console.error(e)}}).catch(e=>{let{onFinishFailed:t}=this.callbacks;t&&t(e)})}};function uy(e){let t=S.useRef(null),[,n]=S.useState({});return t.current||(e?t.current=e:t.current=new ly(()=>{n({})}).getForm()),[t.current]}var dy=S.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),fy=({validateMessages:e,onFormChange:t,onFormFinish:n,children:r})=>{let i=S.useContext(dy),a=S.useRef({});return S.createElement(dy.Provider,{value:{...i,validateMessages:{...i.validateMessages,...e},triggerFormChange:(e,n)=>{t&&t(e,{changedFields:n,forms:a.current}),i.triggerFormChange(e,n)},triggerFormFinish:(e,t)=>{n&&n(e,{values:t,forms:a.current}),i.triggerFormFinish(e,t)},registerForm:(e,t)=>{e&&(a.current={...a.current,[e]:t}),i.registerForm(e,t)},unregisterForm:e=>{let t={...a.current};delete t[e],a.current=t,i.unregisterForm(e)}}},r)};function py(){return py=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let g=S.useRef(null),_=S.useContext(dy),[v]=uy(r),{useSubscribe:y,setInitialValues:b,setCallbacks:x,setValidateMessages:C,setPreserve:w,destroyForm:T}=v.getInternalHooks(N_);S.useImperativeHandle(h,()=>({...v,nativeElement:g.current})),S.useEffect(()=>(_.registerForm(e,v),()=>{_.unregisterForm(e)}),[_,v,e]),C({..._.validateMessages,...s}),x({onValuesChange:l,onFieldsChange:(t,...n)=>{_.triggerFormChange(e,t),u&&u(t,...n)},onFinish:t=>{_.triggerFormFinish(e,t),d&&d(t)},onFinishFailed:f}),w(i);let E=S.useRef(null);b(t,!E.current),E.current||=!0,S.useEffect(()=>()=>T(p),[]);let D,O=typeof a==`function`;D=O?a(v.getFieldsValue(!0),v):a,y(!O);let k=S.useRef(null);S.useEffect(()=>{Kv(k.current||[],n||[])||v.setFields(n||[]),k.current=n},[n,v]);let A=S.useMemo(()=>({...v,validateTrigger:c}),[v,c]),j=S.createElement(I_.Provider,{value:null},S.createElement(F_.Provider,{value:A},D));return o===!1?j:S.createElement(o,py({},m,{ref:g,onSubmit:e=>{e.preventDefault(),e.stopPropagation(),v.submit()},onReset:e=>{e.preventDefault(),v.resetFields(),m.onReset?.(e)}}),j)};function hy(e){try{return JSON.stringify(e)}catch{return Math.random()}}function gy(...e){let[t,n={}]=e,r=R_(n)?{form:n}:n,i=r.form,[a,o]=(0,S.useState)(()=>typeof t==`function`?t({}):void 0),s=(0,S.useMemo)(()=>hy(a),[a]),c=(0,S.useRef)(s);c.current=s;let l=(0,S.useContext)(F_),u=i||l,d=u&&u._init,{getFieldsValue:f,getInternalHooks:p}=u,{registerWatch:m}=p(N_),h=In((e,n)=>{let i=r.preserve?n??f(!0):e??f(),s=typeof t==`function`?t(i):ar(i,Hv(t));hy(a)!==hy(s)&&o(s)});return(0,S.useEffect)(()=>{d&&h()},[d,typeof t==`function`?t:JSON.stringify(t)]),(0,S.useEffect)(()=>{if(d)return m((e,t)=>{h(e,t)})},[d]),a}var _y=S.forwardRef(my);_y.FormProvider=fy,_y.Field=ry,_y.List=iy,_y.useForm=uy,_y.useWatch=gy;var vy=S.createContext({labelAlign:`right`,layout:`horizontal`,itemRef:()=>{}}),yy=S.createContext(null),by=e=>{let t=Sr(e,[`prefixCls`]);return S.createElement(fy,{...t})},xy=S.createContext({prefixCls:``}),Sy=S.createContext({}),Cy=({children:e,status:t,override:n})=>{let r=S.useContext(Sy),i=S.useMemo(()=>{let e={...r};return n&&delete e.isFormItemInput,t&&(delete e.status,delete e.hasFeedback,delete e.feedbackIcon),e},[t,n,r]);return S.createElement(Sy.Provider,{value:i},e)},wy=S.createContext(void 0),Ty=e=>{let{space:t,form:n,children:r}=e;if(!fd(r))return null;let i=r;return n&&(i=S.createElement(Cy,{override:!0,status:!0},i)),t&&(i=S.createElement(ah,null,i)),i},Ey=e=>{if(Ln()&&window.document.documentElement){let t=Array.isArray(e)?e:[e],{documentElement:n}=window.document;return t.some(e=>e in n.style)}return!1},Dy=(e,t)=>{if(!Ey(e))return!1;let n=document.createElement(`div`),r=n.style[e];return n.style[e]=t,n.style[e]!==r};function Oy(e,t){return!Array.isArray(e)&&t!==void 0?Dy(e,t):Ey(e)}var ky=()=>Ln()&&window.document.documentElement;function Ay(e,t,n){return(0,S.useMemo)(()=>({trap:t??!0,focusTriggerAfterClose:n??!0,...e}),[e,t,n])}var jy=e=>{let{prefixCls:t,className:n,style:r,size:i,shape:a}=e,o=J({[`${t}-lg`]:i===`large`,[`${t}-sm`]:i===`small`}),s=J({[`${t}-circle`]:a===`circle`,[`${t}-square`]:a===`square`,[`${t}-round`]:a===`round`}),c=S.useMemo(()=>pd(i)?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return S.createElement(`span`,{className:J(t,o,s,n),style:{...c,...r}})},My=new Lo(`ant-skeleton-loading`,{"0%":{backgroundPosition:`100% 50%`},"100%":{backgroundPosition:`0 50%`}}),Ny=e=>({height:e,lineHeight:Y(e)}),Py=e=>({width:e,...Ny(e)}),Fy=e=>({background:e.skeletonLoadingBackground,backgroundSize:`400% 100%`,animationName:My,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:`ease`,animationIterationCount:`infinite`}),Iy=(e,t)=>({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal(),...Ny(e)}),Ly=e=>{let{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:i,controlHeightSM:a}=e;return{[t]:{display:`inline-block`,verticalAlign:`top`,background:n,...Py(r)},[`${t}${t}-circle`]:{borderRadius:`50%`},[`${t}${t}-lg`]:{...Py(i)},[`${t}${t}-sm`]:{...Py(a)}}},Ry=e=>{let{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:i,controlHeightSM:a,gradientFromColor:o,calc:s}=e;return{[r]:{display:`inline-block`,verticalAlign:`top`,background:o,borderRadius:n,...Iy(t,s)},[`${r}-lg`]:{...Iy(i,s)},[`${r}-sm`]:{...Iy(a,s)}}},zy=e=>{let{gradientFromColor:t,borderRadiusSM:n,imageSizeBase:r,calc:i}=e;return{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,verticalAlign:`middle`,background:t,borderRadius:n,...Py(i(r).mul(2).equal())}},pee=e=>({[e.skeletonNodeCls]:{...zy(e)}}),mee=e=>{let{skeletonImageCls:t,imageSizeBase:n,calc:r}=e;return{[t]:{...zy(e),[`${t}-path`]:{fill:`#bfbfbf`},[`${t}-svg`]:{...Py(n),maxWidth:r(n).mul(4).equal(),maxHeight:r(n).mul(4).equal()},[`${t}-svg${t}-svg-circle`]:{borderRadius:`50%`}},[`${t}${t}-circle`]:{borderRadius:`50%`}}},By=(e,t,n)=>{let{skeletonButtonCls:r}=e;return{[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:`50%`},[`${n}${r}-round`]:{borderRadius:t}}},Vy=(e,t)=>({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal(),...Ny(e)}),hee=e=>{let{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:i,controlHeightSM:a,gradientFromColor:o,calc:s}=e;return{[n]:{display:`inline-block`,verticalAlign:`top`,background:o,borderRadius:t,width:s(r).mul(2).equal(),minWidth:s(r).mul(2).equal(),...Vy(r,s)},...By(e,r,n),[`${n}-lg`]:{...Vy(i,s)},...By(e,i,`${n}-lg`),[`${n}-sm`]:{...Vy(a,s)},...By(e,a,`${n}-sm`)}},gee=e=>{let{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:i,skeletonButtonCls:a,skeletonInputCls:o,skeletonNodeCls:s,skeletonImageCls:c,controlHeight:l,controlHeightLG:u,controlHeightSM:d,gradientFromColor:f,padding:p,marginSM:m,borderRadius:h,titleHeight:g,blockRadius:_,paragraphLiHeight:v,controlHeightXS:y,paragraphMarginTop:b}=e;return{[t]:{display:`table`,width:`100%`,[`${t}-header`]:{display:`table-cell`,paddingInlineEnd:p,verticalAlign:`top`,[n]:{display:`inline-block`,verticalAlign:`top`,background:f,...Py(l)},[`${n}-circle`]:{borderRadius:`50%`},[`${n}-lg`]:{...Py(u)},[`${n}-sm`]:{...Py(d)}},[`${t}-section`]:{display:`table-cell`,width:`100%`,verticalAlign:`top`,[r]:{width:`100%`,height:g,background:f,borderRadius:_,[`+ ${i}`]:{marginBlockStart:d}},[i]:{padding:0,"> li":{width:`100%`,height:v,listStyle:`none`,background:f,borderRadius:_,"+ li":{marginBlockStart:y}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:`61%`}},[`&-round ${t}-section`]:{[`${r}, ${i} > li`]:{borderRadius:h}}},[`${t}-with-avatar ${t}-section`]:{[r]:{marginBlockStart:m,[`+ ${i}`]:{marginBlockStart:b}}},[`${t}${t}-element`]:{display:`inline-block`,width:`auto`,...hee(e),...Ly(e),...Ry(e),...pee(e),...mee(e)},[`${t}${t}-block`]:{width:`100%`,[a]:{width:`100%`},[o]:{width:`100%`}},[`${t}${t}-active`]:{[` + `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-panel`]:{backgroundColor:i,borderTop:0},[`> ${t}-item > ${t}-panel > ${t}-body`]:{padding:r}}}},jg=e=>{let{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:`transparent`,border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-panel`]:{backgroundColor:`transparent`,border:0,[`> ${t}-body`]:{paddingBlock:n}}}}}},Mg=rl(`Collapse`,e=>{let t=gs(e,{collapseHeaderPaddingSM:`${Y(e.paddingXS)} ${Y(e.paddingSM)}`,collapseHeaderPaddingLG:`${Y(e.padding)} ${Y(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return[Og(t),Ag(t),jg(t),kg(t),bh(t)]},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`})),Ng=Object.assign(S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,expandIcon:i,className:a,style:o,classNames:s,styles:c}=li(`collapse`),{prefixCls:l,className:u,rootClassName:d,style:f,bordered:p=!0,ghost:m,size:h,expandIconPlacement:g,expandIconPosition:_,children:v,destroyInactivePanel:y,destroyOnHidden:b,expandIcon:x,classNames:C,styles:w}=e,T=th(e=>h??e??`middle`),E=n(`collapse`,l),D=n(),[O,k]=Mg(E),A=g??_??`start`,j={...e,size:T,bordered:p,expandIconPlacement:A},[M,N]=Fd([s,C],[c,w],{props:j}),P=x??i,F=S.useCallback((e={})=>Pp(typeof P==`function`?P(e):S.createElement(mg,{rotate:e.isActive?r===`rtl`?-90:90:void 0,"aria-label":e.isActive?`expanded`:`collapsed`}),e=>({className:J(e.className,`${E}-arrow`)})),[P,E,r]),I=J(`${E}-icon-placement-${A}`,{[`${E}-borderless`]:!p,[`${E}-rtl`]:r===`rtl`,[`${E}-ghost`]:!!m,[`${E}-large`]:T===`large`,[`${E}-small`]:T===`small`},a,u,d,O,k,M.root),L=S.useMemo(()=>({...Wm(D),motionAppear:!1,leavedClassName:`${E}-panel-hidden`}),[D,E]),R=S.useMemo(()=>v?Cr(v).map(e=>e):null,[v]);return S.createElement(Eg,{ref:t,openMotion:L,...Sr(e,[`rootClassName`]),expandIcon:F,prefixCls:E,className:I,style:{...N.root,...o,...f},classNames:M,styles:N,destroyOnHidden:b??y},R)}),{Panel:Dg}),Pg=e=>e instanceof dg?e:new dg(e),Fg=(e,t)=>{let{r:n,g:r,b:i,a}=e.toRgb(),o=new cg(e.toRgbString()).onBackground(t).toHsv();return a<=.5?o.v>.5:n*.299+r*.587+i*.114>192},Ig=e=>{let{paddingInline:t,onlyIconSize:n,borderColorDisabled:r}=e;return gs(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n,colorBorderDisabled:r})},Lg=e=>{let t=e.contentFontSize??e.fontSize,n=e.contentFontSizeSM??e.fontSize,r=e.contentFontSizeLG??e.fontSizeLG,i=e.contentLineHeight??Os(t),a=e.contentLineHeightSM??Os(n),o=e.contentLineHeightLG??Os(r),s=Fg(new dg(e.colorBgSolid),`#fff`)?`#000`:`#fff`,c=Ds.reduce((t,n)=>({...t,[`${n}ShadowColor`]:`0 ${Y(e.controlOutlineWidth)} 0 ${Bc(e[`${n}1`],e.colorBgContainer)}`}),{}),l=e.colorBgContainerDisabled,u=e.colorBgContainerDisabled;return{...c,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:`transparent`,defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:`inherit`,onlyIconSizeSM:`inherit`,onlyIconSizeLG:`inherit`,groupBorderColor:e.colorPrimaryHover,linkHoverBg:`transparent`,textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:s,contentFontSize:t,contentFontSizeSM:n,contentFontSizeLG:r,contentLineHeight:i,contentLineHeightSM:a,contentLineHeightLG:o,paddingBlock:Math.max((e.controlHeight-t*i)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-n*a)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-r*o)/2-e.lineWidth,0),defaultBgDisabled:l,dashedBgDisabled:u}},Rg=e=>{let{componentCls:t,antCls:n,lineWidth:r}=e,[i,a]=ol(n,`btn`);return{[t]:[{[i(`border-width`)]:r,[i(`border-color`)]:`#000`,[i(`border-color-hover`)]:a(`border-color`),[i(`border-color-active`)]:a(`border-color`),[i(`border-color-disabled`)]:a(`border-color`),[i(`border-style`)]:`solid`,[i(`text-color`)]:`#000`,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`),[i(`text-color-disabled`)]:a(`text-color`),[i(`bg-color`)]:`#ddd`,[i(`bg-color-hover`)]:a(`bg-color`),[i(`bg-color-active`)]:a(`bg-color`),[i(`bg-color-disabled`)]:e.colorBgContainerDisabled,[i(`bg-color-container`)]:e.colorBgContainer,[i(`shadow`)]:`none`},{border:[a(`border-width`),a(`border-style`),a(`border-color`)].join(` `),color:a(`text-color`),backgroundColor:a(`bg-color`),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[a(`border-width`),a(`border-style`),a(`border-color-hover`)].join(` `),color:a(`text-color-hover`),backgroundColor:a(`bg-color-hover`)},"&:active":{border:[a(`border-width`),a(`border-style`),a(`border-color-active`)].join(` `),color:a(`text-color-active`),backgroundColor:a(`bg-color-active`)}}},{[`&${t}-variant-solid`]:{[i(`solid-bg-color`)]:a(`color-base`),[i(`solid-bg-color-hover`)]:a(`color-hover`),[i(`solid-bg-color-active`)]:a(`color-active`),[i(`border-color`)]:`transparent`,[i(`text-color`)]:e.colorTextLightSolid,[i(`bg-color`)]:a(`solid-bg-color`),[i(`bg-color-hover`)]:a(`solid-bg-color-hover`),[i(`bg-color-active`)]:a(`solid-bg-color-active`),boxShadow:a(`shadow`)},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`border-color`)]:a(`color-base`),[i(`border-color-hover`)]:a(`color-hover`),[i(`border-color-active`)]:a(`color-active`),[i(`bg-color`)]:a(`bg-color-container`),[i(`text-color`)]:a(`color-base`),[i(`text-color-hover`)]:a(`color-hover`),[i(`text-color-active`)]:a(`color-active`),boxShadow:a(`shadow`)},[`&${t}-variant-dashed`]:{[i(`border-style`)]:`dashed`,[i(`bg-color-disabled`)]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[i(`border-color`)]:`transparent`,[i(`text-color`)]:a(`color-base`),[i(`bg-color`)]:a(`color-light`),[i(`bg-color-hover`)]:a(`color-light-hover`),[i(`bg-color-active`)]:a(`color-light-active`)},[`&${t}-variant-text, &${t}-variant-link`]:{[i(`border-color`)]:`transparent`,[i(`text-color`)]:a(`color-base`),[i(`text-color-hover`)]:a(`color-hover`),[i(`text-color-active`)]:a(`color-active`),[i(`bg-color`)]:`transparent`,[i(`bg-color-hover`)]:`transparent`,[i(`bg-color-active`)]:`transparent`,[`&:disabled, &${e.componentCls}-disabled`]:{background:`transparent`,borderColor:`transparent`}},[`&${t}-variant-text`]:{[i(`bg-color-hover`)]:a(`color-light`),[i(`bg-color-active`)]:a(`color-light-active`)}},{[`&${t}-variant-link`]:{[i(`color-base`)]:e.colorLink,[i(`color-hover`)]:e.colorLinkHover,[i(`color-active`)]:e.colorLinkActive,[i(`bg-color-hover`)]:e.linkHoverBg},[`&${t}-color-primary`]:{[i(`color-base`)]:e.colorPrimary,[i(`color-hover`)]:e.colorPrimaryHover,[i(`color-active`)]:e.colorPrimaryActive,[i(`color-light`)]:e.colorPrimaryBg,[i(`color-light-hover`)]:e.colorPrimaryBgHover,[i(`color-light-active`)]:e.colorPrimaryBorder,[i(`shadow`)]:e.primaryShadow,[`&${t}-variant-solid`]:{[i(`text-color`)]:e.primaryColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)}},[`&${t}-color-dangerous`]:{[i(`color-base`)]:e.colorError,[i(`color-hover`)]:e.colorErrorHover,[i(`color-active`)]:e.colorErrorActive,[i(`color-light`)]:e.colorErrorBg,[i(`color-light-hover`)]:e.colorErrorBgFilledHover,[i(`color-light-active`)]:e.colorErrorBgActive,[i(`shadow`)]:e.dangerShadow,[`&${t}-variant-solid`]:{[i(`text-color`)]:e.dangerColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)}},[`&${t}-color-default`]:{[i(`solid-bg-color`)]:e.colorBgSolid,[i(`solid-bg-color-hover`)]:e.colorBgSolidHover,[i(`solid-bg-color-active`)]:e.colorBgSolidActive,[i(`color-base`)]:e.defaultBorderColor,[i(`color-hover`)]:e.defaultHoverBorderColor,[i(`color-active`)]:e.defaultActiveBorderColor,[i(`color-light`)]:e.colorFillTertiary,[i(`color-light-hover`)]:e.colorFillSecondary,[i(`color-light-active`)]:e.colorFill,[i(`text-color`)]:e.defaultColor,[i(`text-color-hover`)]:e.defaultHoverColor,[i(`text-color-active`)]:e.defaultActiveColor,[i(`shadow`)]:e.defaultShadow,[`&${t}-variant-outlined`]:{[i(`bg-color-disabled`)]:e.defaultBgDisabled},[`&${t}-variant-solid`]:{[i(`text-color`)]:e.solidTextColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)},[`&${t}-variant-filled, &${t}-variant-text`]:{[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`text-color`)]:e.defaultColor,[i(`text-color-hover`)]:e.defaultHoverColor,[i(`text-color-active`)]:e.defaultActiveColor,[i(`bg-color-container`)]:e.defaultBg,[i(`bg-color-hover`)]:e.defaultHoverBg,[i(`bg-color-active`)]:e.defaultActiveBg},[`&${t}-variant-text`]:{[i(`text-color`)]:e.textTextColor,[i(`text-color-hover`)]:e.textTextHoverColor,[i(`text-color-active`)]:e.textTextActiveColor,[i(`bg-color-hover`)]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`text-color`)]:e.defaultGhostColor,[i(`border-color`)]:e.defaultGhostBorderColor}}}},Ds.map(n=>{let r=e[`${n}6`],a=e[`${n}1`],o=e[`${n}Hover`],s=e[`${n}2`],c=e[`${n}3`],l=e[`${n}Active`],u=e[`${n}ShadowColor`];return{[`&${t}-color-${n}`]:{[i(`color-base`)]:r,[i(`color-hover`)]:o,[i(`color-active`)]:l,[i(`color-light`)]:a,[i(`color-light-hover`)]:s,[i(`color-light-active`)]:c,[i(`shadow`)]:u}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:`not-allowed`,borderColor:e.colorBorderDisabled,background:a(`bg-color-disabled`),color:e.colorTextDisabled,boxShadow:`none`}},{[`&${t}-background-ghost`]:{[i(`bg-color`)]:e.ghostBg,[i(`bg-color-hover`)]:e.ghostBg,[i(`bg-color-active`)]:e.ghostBg,[i(`shadow`)]:`none`,[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`bg-color-hover`)]:e.ghostBg,[i(`bg-color-active`)]:e.ghostBg}}}]}},zg=e=>{let{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:i,motionDurationSlow:a,motionEaseInOut:o,iconGap:s,calc:c}=e;return{[t]:{outline:`none`,position:`relative`,display:`inline-flex`,gap:s,alignItems:`center`,justifyContent:`center`,fontWeight:r,whiteSpace:`nowrap`,textAlign:`center`,backgroundImage:`none`,cursor:`pointer`,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:`none`,touchAction:`manipulation`,...Uh(),"&:disabled > *":{pointerEvents:`none`},[`${t}-icon > svg`]:Yc(),"> a":{color:`currentColor`},"&:not(:disabled)":Qc(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:`0.34em`},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:`-0.34em`,letterSpacing:`0.34em`},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:`none`}},[`&${t}-loading`]:{opacity:i,cursor:`default`},[`${t}-loading-icon`]:{transition:[`width`,`opacity`,`margin`].map(e=>`${e} ${a} ${o}`).join(`,`)},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:c(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:c(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:`row-reverse`,[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:c(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:c(s).mul(-1).equal()}}}}}},Bg=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:`50%`}),Vg=(e,t=``)=>{let{componentCls:n,controlHeight:r,fontSize:i,borderRadius:a,buttonPaddingHorizontal:o,iconCls:s,buttonPaddingVertical:c,buttonIconOnlyFontSize:l}=e;return[{[t]:{fontSize:i,height:r,padding:`${Y(c)} ${Y(o)}`,borderRadius:a,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:l}}}},{[`${n}${n}-circle${t}`]:Bg(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},Hg=e=>Vg(gs(e,{fontSize:e.contentFontSize}),e.componentCls),Ug=e=>Vg(gs(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM}),`${e.componentCls}-sm`),Wg=e=>Vg(gs(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG}),`${e.componentCls}-lg`),Gg=e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:`100%`}}}},Kg=rl(`Button`,e=>{let t=Ig(e);return[zg(t),Hg(t),Ug(t),Wg(t),Gg(t),Rg(t),ag(t)]},Lg,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function qg(e,t,n,r){let{focusElCls:i,focus:a,borderElCls:o}=n,s=o?`> *`:``,c=[`hover`,a?`focus`:null,`active`].filter(Boolean).map(e=>`&:${e} ${s}`).join(`,`);return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{[c]:{zIndex:3},...i?{[`&${i}`]:{zIndex:3}}:{},[`&[disabled] ${s}`]:{zIndex:0}}}}function Jg(e,t,n){let{borderElCls:r}=n,i=r?`> ${r}`:``;return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Yg(e,t={focus:!0}){let{componentCls:n}=e,{componentCls:r}=t,i=r||n,a=`${i}-compact`;return{[a]:{...qg(e,a,t,i),...Jg(i,a,t)}}}function Xg(e,t,n){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{"&:hover,&:focus,&:active":{zIndex:3},"&[disabled]":{zIndex:0}}}}function see(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function cee(e){let t=`${e.componentCls}-compact-vertical`;return{[t]:{...Xg(e,t,e.componentCls),...see(e.componentCls,t)}}}var lee=e=>{let{antCls:t,componentCls:n,lineWidth:r,calc:i,colorBgContainer:a}=e,o=`${n}-variant-solid:not([disabled])`,s=i(r).mul(-1).equal(),[c,l]=ol(t,`btn`),u=e=>({[`${n}-compact${e?`-vertical`:``}-item`]:{[c(`compact-connect-border-color`)]:l(`bg-color-hover`),[`&${o}`]:{transition:`none`,[`& + ${o}:before`]:[{position:`absolute`,backgroundColor:l(`compact-connect-border-color`),content:`""`},e?{top:s,insetInline:s,height:r}:{insetBlock:s,insetInlineStart:s,width:r}],"&:hover:before":{display:`none`}}}});return[u(),u(!0),{[`${o}${n}-color-default`]:{[c(`compact-connect-border-color`)]:`color-mix(in srgb, ${l(`bg-color-hover`)} 75%, ${a})`}}]},uee=al([`Button`,`compact`],e=>{let t=Ig(e);return[Yg(t),cee(t),lee(t)]},Lg);function dee(e){if(hd(e)){let t=e?.delay;return t=pd(t)?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}var fee={default:[`default`,`outlined`],primary:[`primary`,`solid`],dashed:[`default`,`dashed`],link:[`link`,`link`],text:[`default`,`text`]},Zg=S.forwardRef((e,t)=>{let{_skipSemantic:n,loading:r=!1,prefixCls:i,color:a,variant:o,type:s,danger:c=!1,shape:l,size:u,disabled:d,className:f,rootClassName:p,children:m,icon:h,iconPosition:g,iconPlacement:_,ghost:v=!1,block:y=!1,htmlType:b=`button`,classNames:x,styles:C,style:w,autoInsertSpace:T,autoFocus:E,...D}=e,O=Cr(m),k=s||`default`,{getPrefixCls:A,direction:j,autoInsertSpace:M,className:N,style:P,classNames:F,styles:I,loadingIcon:L,shape:R,color:z,variant:B}=li(`button`),V=l||R||`default`,[H,U]=(0,S.useMemo)(()=>{if(a&&o)return[a,o];if(s||c){let e=fee[k]||[];return c?[`danger`,e[1]]:e}return z&&B?[z,B]:[`default`,`outlined`]},[a,o,s,c,z,B,k]),[W,ee]=(0,S.useMemo)(()=>v&&U===`solid`?[H,`outlined`]:[H,U],[H,U,v]),te=W===`danger`,ne=te?`dangerous`:W,re=T??M??!0,ie=A(`btn`,i),[ae,G]=Kg(ie),oe=(0,S.useContext)(zp),K=d??oe,se=(0,S.useContext)(ch),ce=(0,S.useMemo)(()=>dee(r),[r]),[q,le]=(0,S.useState)(ce.loading),[ue,de]=(0,S.useState)(!1),fe=(0,S.useRef)(null),pe=er(t,fe),me=O.length===1&&!h&&!ph(ee),he=(0,S.useRef)(!0);S.useEffect(()=>(he.current=!1,()=>{he.current=!0}),[]),zn(()=>{let e=null;ce.delay>0?e=setTimeout(()=>{e=null,le(!0)},ce.delay):le(ce.loading);function t(){e&&=(clearTimeout(e),null)}return t},[ce.delay,ce.loading]),(0,S.useEffect)(()=>{if(!fe.current||!re)return;let e=fe.current.textContent||``;me&&dh(e)?ue||de(!0):ue&&de(!1)}),(0,S.useEffect)(()=>{E&&fe.current&&fe.current.focus()},[]);let ge=S.useCallback(t=>{if(q||K){t.preventDefault();return}e.onClick?.((`href`in e,t))},[e.onClick,q,K]),{compactSize:_e,compactItemClassnames:ve}=ih(ie,j),ye=th(e=>u??_e??se??e),be=q?`loading`:h,xe=_??g??`start`,Se=Sr(D,[`navigate`]),Ce={...e,type:k,color:W,variant:ee,danger:te,shape:V,size:ye,disabled:K,loading:q,iconPlacement:xe},[we,Te]=Fd([n?void 0:F,x],[n?void 0:I,C],{props:Ce}),Ee=J(ie,ae,G,{[`${ie}-${V}`]:V!==`default`&&V!==`square`&&V,[`${ie}-${k}`]:k,[`${ie}-dangerous`]:c,[`${ie}-color-${ne}`]:ne,[`${ie}-variant-${ee}`]:ee,[`${ie}-lg`]:ye===`large`,[`${ie}-sm`]:ye===`small`,[`${ie}-icon-only`]:!m&&m!==0&&!!be,[`${ie}-background-ghost`]:v&&!ph(ee),[`${ie}-loading`]:q,[`${ie}-two-chinese-chars`]:ue&&re&&!q,[`${ie}-block`]:y,[`${ie}-rtl`]:j===`rtl`,[`${ie}-icon-end`]:xe===`end`},ve,f,p,N,we.root),De={...Te.root,...P,...w},Oe={className:we.icon,style:Te.icon},ke=e=>S.createElement(gh,{prefixCls:ie,...Oe},e),Ae=S.createElement(iee,{existIcon:!!h,prefixCls:ie,loading:q,mount:he.current,...Oe}),je=hd(r)&&r.icon||L,Me;Me=h&&!q?ke(h):r&&je?ke(je):Ae;let Ne=fd(m)?hh(m,me&&re,Te.content,we.content):null;if(Se.href!==void 0)return S.createElement(`a`,{...Se,className:J(Ee,{[`${ie}-disabled`]:K}),href:K?void 0:Se.href,style:De,onClick:ge,ref:pe,tabIndex:K?-1:0,"aria-disabled":K},Me,Ne);let Pe=S.createElement(`button`,{...D,type:b,className:Ee,style:De,onClick:ge,disabled:K,ref:pe},Me,Ne,ve&&S.createElement(uee,{prefixCls:ie}));return ph(ee)||(Pe=S.createElement(eh,{component:`Button`,disabled:q},Pe)),Pe});Zg.Group=lh,Zg.__ANT_BUTTON=!0;var Qg=e=>{let{type:t,children:n,prefixCls:r,buttonProps:i,close:a,autoFocus:o,emitEvent:s,isSilent:c,quitOnNullishReturnValue:l,actionFn:u}=e,d=S.useRef(!1),f=S.useRef(null),[p,m]=Vn(!1),h=(...e)=>{a?.(...e)};S.useEffect(()=>{let e=null;return o&&(e=setTimeout(()=>{f.current?.focus({preventScroll:!0})})),()=>{e&&clearTimeout(e)}},[o]);let g=e=>{_d(e)&&(m(!0),e.then((...e)=>{m(!1,!0),h.apply(void 0,e),d.current=!1},e=>{if(m(!1,!0),d.current=!1,!c?.())return Promise.reject(e)}))},_=e=>{if(d.current)return;if(d.current=!0,!u){h();return}let t;if(s){if(t=u(e),l&&!_d(t)){d.current=!1,h(e);return}}else if(u.length)t=u(a),d.current=!1;else if(t=u(),!_d(t)){h();return}g(t)};return S.createElement(Zg,{...fh(t),onClick:_,loading:p,prefixCls:r,...i,ref:f},n)},$g=S.createContext({}),{Provider:e_}=$g,t_=()=>{let{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:r,mergedOkCancel:i,rootPrefixCls:a,close:o,onCancel:s,onConfirm:c,onClose:l}=(0,S.useContext)($g);return i?S.createElement(Qg,{isSilent:r,actionFn:s,close:(...e)=>{o?.(...e),c?.(!1),l?.()},autoFocus:e===`cancel`,buttonProps:t,prefixCls:`${a}-btn`},n):null},n_=()=>{let{autoFocusButton:e,close:t,isSilent:n,okButtonProps:r,rootPrefixCls:i,okTextLocale:a,okType:o,onConfirm:s,onOk:c,onClose:l}=(0,S.useContext)($g);return S.createElement(Qg,{isSilent:n,type:o||`primary`,actionFn:c,close:(...e)=>{t?.(...e),s?.(!0),l?.()},autoFocus:e===`ok`,buttonProps:r,prefixCls:`${i}-btn`},a)},r_=S.createContext({});function i_(e,t,n){let r=t;return!r&&n&&(r=`${e}-${n}`),r}function a_(e,t){let n=e[`page${t?`Y`:`X`}Offset`],r=`scroll${t?`Top`:`Left`}`;if(typeof n!=`number`){let t=e.document;n=t.documentElement[r],typeof n!=`number`&&(n=t.body[r])}return n}function o_(e){let t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,i=r.defaultView||r.parentWindow;return n.left+=a_(i),n.top+=a_(i,!0),n}function s_(e,t=!1){if(cp(e)){let n=e.nodeName.toLowerCase(),r=[`input`,`select`,`textarea`,`button`].includes(n)||e.isContentEditable||n===`a`&&!!e.getAttribute(`href`),i=e.getAttribute(`tabindex`),a=Number(i),o=null;return i&&!Number.isNaN(a)?o=a:r&&o===null&&(o=0),r&&e.disabled&&(o=null),o!==null&&(o>=0||t&&o<0)}return!1}function c_(e,t=!1){let n=[...e.querySelectorAll(`*`)].filter(e=>s_(e,t));return s_(e,t)&&n.unshift(e),n}function l_(e,t){if(!e)return;e.focus(t);let{cursor:n}=t||{};if(n&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){let t=e.value.length;switch(n){case`start`:e.setSelectionRange(0,0);break;case`end`:e.setSelectionRange(t,t);break;default:e.setSelectionRange(0,t)}}}var u_=null,d_=[],f_=new Map,p_=new Map;function m_(){return d_[d_.length-1]}function h_(e){let t=m_();if(e&&t){let n;for(let[e,r]of f_.entries())if(r===t){n=e;break}let r=p_.get(n);return!!r&&(r===e||r.contains(e))}return!1}function g_(e){let{activeElement:t}=document;return e===t||e.contains(t)}function __(){let e=m_(),{activeElement:t}=document;if(!h_(t))if(e&&!g_(e)){let t=c_(e);(t.includes(u_)?u_:t[0])?.focus({preventScroll:!0})}else u_=t}function v_(e){if(e.key===`Tab`){let{activeElement:t}=document,n=c_(m_()),r=n[n.length-1];e.shiftKey&&t===n[0]?u_=r:!e.shiftKey&&t===r&&(u_=n[0])}}function y_(e,t){return e&&(f_.set(t,e),d_=d_.filter(t=>t!==e),d_.push(e),window.addEventListener(`focusin`,__),window.addEventListener(`keydown`,v_,!0),__()),()=>{u_=null,d_=d_.filter(t=>t!==e),f_.delete(t),p_.delete(t),d_.length===0&&(window.removeEventListener(`focusin`,__),window.removeEventListener(`keydown`,v_,!0))}}function b_(e,t){let n=(0,S.useRef)(0),[r,i]=(0,S.useState)(0);(0,S.useEffect)(()=>{n.current=0},t),(0,S.useEffect)(()=>{let[t,r]=e(n.current);return r||(n.current+=1,i(e=>e+1)),t},[...t,r])}function x_(e,t){let n=zf(),r=(0,S.useRef)(t);return r.current=t,b_(t=>{if(!e)return[void 0,!0];let i=r.current();return i?[y_(i,n),!0]:[void 0,t>=1]},[n,e]),[e=>{e&&p_.set(n,e)}]}var S_=S.memo(({children:e})=>e,(e,{shouldUpdate:t})=>!t);function C_(){return C_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,className:r,style:i,title:a,ariaId:o,footer:s,closable:c,closeIcon:l,onClose:u,children:d,bodyStyle:f,bodyProps:p,modalRender:m,onMouseDown:h,onMouseUp:g,holderRef:_,visible:v,forceRender:y,width:b,height:x,classNames:C,styles:w,isFixedPos:T,focusTrap:E}=e,{panel:D}=S.useContext(r_),O=(0,S.useRef)(null),k=er(_,D,O),[A]=x_(v&&T&&E!==!1,()=>O.current);S.useImperativeHandle(t,()=>({focus:()=>{O.current?.focus({preventScroll:!0})}}));let j={};b!==void 0&&(j.width=b),x!==void 0&&(j.height=x);let M=s?S.createElement(`div`,{className:J(`${n}-footer`,C?.footer),style:{...w?.footer}},s):null,N=a?S.createElement(`div`,{className:J(`${n}-header`,C?.header),style:{...w?.header}},S.createElement(`div`,{className:J(`${n}-title`,C?.title),id:o,style:{...w?.title}},a)):null,P=(0,S.useMemo)(()=>typeof c==`object`&&c?c:c?{closeIcon:l??S.createElement(`span`,{className:`${n}-close-x`})}:{},[c,l,n]),F=Vu(P,!0),I=typeof c==`object`&&c.disabled,L=c?S.createElement(`button`,C_({type:`button`,onClick:u,"aria-label":`Close`},F,{className:`${n}-close`,disabled:I}),P.closeIcon):null,R=S.createElement(`div`,{className:J(`${n}-container`,C?.container),style:w?.container},L,N,S.createElement(`div`,C_({className:J(`${n}-body`,C?.body),style:{...f,...w?.body}},p),d),M);return S.createElement(`div`,{key:`dialog-element`,role:`dialog`,"aria-labelledby":a?o:null,"aria-modal":`true`,ref:k,style:{...i,...j},className:J(n,r),onMouseDown:h,onMouseUp:g,tabIndex:-1,onFocus:e=>{A(e.target)}},S.createElement(S_,{shouldUpdate:v||y},m?m(R):R))});function T_(){return T_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,title:r,style:i,className:a,visible:o,forceRender:s,destroyOnHidden:c,motionName:l,ariaId:u,onVisibleChanged:d,mousePosition:f}=e,p=(0,S.useRef)(null),m=(0,S.useRef)(null);S.useImperativeHandle(t,()=>({...m.current,inMotion:p.current.inMotion,enableMotion:p.current.enableMotion}));let[h,g]=S.useState(),_={};h&&(_.transformOrigin=h);function v(){if(!p.current?.nativeElement)return;let e=o_(p.current.nativeElement);g(f&&(f.x||f.y)?`${f.x-e.left}px ${f.y-e.top}px`:``)}return S.createElement(Iu,{visible:o,onVisibleChanged:d,onAppearPrepare:v,onEnterPrepare:v,forceRender:s,motionName:l,removeOnLeave:c,ref:p},({className:t,style:o},s)=>S.createElement(w_,T_({},e,{ref:m,title:r,ariaId:u,prefixCls:n,holderRef:s,style:{...o,...i,..._},className:J(a,t)})))});function D_(){return D_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t,style:n,visible:r,maskProps:i,motionName:a,className:o}=e;return S.createElement(Iu,{key:`mask`,visible:r,motionName:a,leavedClassName:`${t}-mask-hidden`},({className:e,style:r},a)=>S.createElement(`div`,D_({ref:a,style:{...r,...n},className:J(`${t}-mask`,e,o)},i)))};function k_(){return k_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t=`rc-dialog`,zIndex:n,visible:r=!1,focusTriggerAfterClose:i=!0,wrapStyle:a,wrapClassName:o,wrapProps:s,onClose:c,afterOpenChange:l,afterClose:u,transitionName:d,animation:f,closable:p=!0,mask:m=!0,maskTransitionName:h,maskAnimation:g,maskClosable:_=!0,maskStyle:v,maskProps:y,rootClassName:b,rootStyle:x,classNames:C,styles:w}=e,T=(0,S.useRef)(null),E=(0,S.useRef)(null),D=(0,S.useRef)(null),[O,k]=S.useState(r),[A,j]=S.useState(!1),M=zf();function N(){di(E.current,document.activeElement)||(T.current=document.activeElement)}function P(){di(E.current,document.activeElement)||D.current?.focus()}function F(){if(k(!1),m&&T.current&&i){try{T.current.focus({preventScroll:!0})}catch{}T.current=null}O&&u?.()}function I(e){e?P():F(),l?.(e)}function L(e){c?.(e)}let R=(0,S.useRef)(!1),z=null;_&&(z=e=>{E.current===e.target&&R.current&&L(e)});function B(e){R.current=e.target===E.current}(0,S.useEffect)(()=>{r?(R.current=!1,k(!0),N(),E.current&&j(getComputedStyle(E.current).position===`fixed`)):O&&D.current.enableMotion()&&!D.current.inMotion()&&F()},[r]);let V={zIndex:n,...a,...w?.wrapper,display:O?null:`none`};return S.createElement(`div`,k_({className:J(`${t}-root`,b),style:x},Vu(e,{data:!0})),S.createElement(O_,{prefixCls:t,visible:m&&r,motionName:i_(t,h,g),style:{zIndex:n,...v,...w?.mask},maskProps:y,className:C?.mask}),S.createElement(`div`,k_({className:J(`${t}-wrap`,o,C?.wrapper),ref:E,onClick:z,onMouseDown:B,style:V},s),S.createElement(E_,k_({},e,{isFixedPos:A,ref:D,closable:p,ariaId:M,prefixCls:t,visible:r&&O,onClose:L,onVisibleChanged:I,motionName:i_(t,d,f)}))))};function j_(){return j_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{visible:t,getContainer:n,forceRender:r,destroyOnHidden:i=!1,afterClose:a,closable:o,panelRef:s,keyboard:c=!0,onClose:l}=e,[u,d]=S.useState(t),f=S.useMemo(()=>({panel:s}),[s]);return S.useEffect(()=>{t&&d(!0)},[t]),!r&&i&&!u?null:S.createElement(r_.Provider,{value:f},S.createElement(Xf,{open:t||r||u,onEsc:({top:e,event:t})=>{if(e&&c){t.stopPropagation(),l?.(t);return}},autoDestroy:!1,getContainer:n,autoLock:t||u},S.createElement(A_,j_({},e,{destroyOnHidden:i,afterClose:()=>{let{afterClose:e}=(o&&typeof o==`object`?o:{})||{};e?.(),a?.(),d(!1)}}))))},N_=`RC_FORM_INTERNAL_HOOKS`,P_=()=>{br(!1,`Can not find FormContext. Please make sure you wrap Field under Form.`)},F_=S.createContext({getFieldValue:P_,getFieldsValue:P_,getFieldError:P_,getFieldWarning:P_,getFieldsError:P_,isFieldsTouched:P_,isFieldTouched:P_,isFieldValidating:P_,isFieldsValidating:P_,resetFields:P_,setFields:P_,setFieldValue:P_,setFieldsValue:P_,validateFields:P_,submit:P_,getInternalHooks:()=>(P_(),{dispatch:P_,initEntityValue:P_,registerField:P_,useSubscribe:P_,setInitialValues:P_,destroyForm:P_,setCallbacks:P_,registerWatch:P_,getFields:P_,setValidateMessages:P_,setPreserve:P_,getInitialValue:P_})}),I_=S.createContext(null);function L_(e){return e==null?[]:Array.isArray(e)?e:[e]}function R_(e){return e&&!!e._init}function z_(){return{default:`Validation error on field %s`,required:`%s is required`,enum:`%s must be one of %s`,whitespace:`%s cannot be empty`,date:{format:`%s date %s is invalid for format %s`,parse:`%s date could not be parsed, %s is invalid `,invalid:`%s date %s is invalid`},types:{string:`%s is not a %s`,method:`%s is not a %s (function)`,array:`%s is not an %s`,object:`%s is not an %s`,number:`%s is not a %s`,date:`%s is not a %s`,boolean:`%s is not a %s`,integer:`%s is not an %s`,float:`%s is not a %s`,regexp:`%s is not a valid %s`,email:`%s is not a valid %s`,tel:`%s is not a valid %s`,url:`%s is not a valid %s`,hex:`%s is not a valid %s`},string:{len:`%s must be exactly %s characters`,min:`%s must be at least %s characters`,max:`%s cannot be longer than %s characters`,range:`%s must be between %s and %s characters`},number:{len:`%s must equal %s`,min:`%s cannot be less than %s`,max:`%s cannot be greater than %s`,range:`%s must be between %s and %s`},array:{len:`%s must be exactly %s in length`,min:`%s cannot be less than %s in length`,max:`%s cannot be greater than %s in length`,range:`%s must be between %s and %s in length`},pattern:{mismatch:`%s value %s does not match pattern %s`},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var B_=z_();function V_(e){try{return Function.toString.call(e).indexOf(`[native code]`)!==-1}catch{return typeof e==`function`}}function H_(e,t,n){if(ns())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&$o(i,n.prototype),i}function U_(e){var t=typeof Map==`function`?new Map:void 0;return U_=function(e){if(e===null||!V_(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return H_(e,arguments,ts(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),$o(n,e)},U_(e)}var W_=/%[sdj%]/g,G_=function(){};function K_(e){if(!e||!e.length)return null;var t={};return e.forEach(function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)}),t}function q_(e){var t=[...arguments].slice(1),n=0,r=t.length;return typeof e==`function`?e.apply(null,t):typeof e==`string`?e.replace(W_,function(e){if(e===`%%`)return`%`;if(n>=r)return e;switch(e){case`%s`:return String(t[n++]);case`%d`:return Number(t[n++]);case`%j`:try{return JSON.stringify(t[n++])}catch{return`[Circular]`}break;default:return e}}):e}function J_(e){return e===`string`||e===`url`||e===`hex`||e===`email`||e===`date`||e===`pattern`||e===`tel`}function Y_(e,t){return!!(e==null||t===`array`&&Array.isArray(e)&&!e.length||J_(t)&&typeof e==`string`&&!e)}function X_(e,t,n){var r=[],i=0,a=e.length;function o(e){r.push.apply(r,Zr(e||[])),i++,i===a&&n(r)}e.forEach(function(e){t(e,o)})}function Z_(e,t,n){var r=0,i=e.length;function a(o){if(o&&o.length){n(o);return}var s=r;r+=1,se.max?r.push(q_(i.messages[u].max,e.fullField,e.max)):o&&s&&(le.max)&&r.push(q_(i.messages[u].range,e.fullField,e.min,e.max))},lv=function(e,t,n,r,i,a){e.required&&(!n.hasOwnProperty(e.field)||Y_(t,a||e.type))&&r.push(q_(i.messages.required,e.fullField))},uv,dv=(function(){if(uv)return uv;var e=`[a-fA-F\\d:]`,t=function(t){return t&&t.includeBoundaries?`(?:(?<=\\s|^)(?=${e})|(?<=${e})(?=\\s|\$))`:``},n=`(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}`,r=`[a-fA-F\\d]{1,4}`,i=`(?:${[`(?:${r}:){7}(?:${r}|:)`,`(?:${r}:){6}(?:${n}|:${r}|:)`,`(?:${r}:){5}(?::${n}|(?::${r}){1,2}|:)`,`(?:${r}:){4}(?:(?::${r}){0,1}:${n}|(?::${r}){1,3}|:)`,`(?:${r}:){3}(?:(?::${r}){0,2}:${n}|(?::${r}){1,4}|:)`,`(?:${r}:){2}(?:(?::${r}){0,3}:${n}|(?::${r}){1,5}|:)`,`(?:${r}:){1}(?:(?::${r}){0,4}:${n}|(?::${r}){1,6}|:)`,`(?::(?:(?::${r}){0,5}:${n}|(?::${r}){1,7}|:))`].join(`|`)})(?:%[0-9a-zA-Z]{1,})?`,a=RegExp(`(?:^${n}\$)|(?:^${i}\$)`),o=RegExp(`^${n}\$`),s=RegExp(`^${i}\$`),c=function(e){return e&&e.exact?a:RegExp(`(?:${t(e)}${n}${t(e)})|(?:${t(e)}${i}${t(e)})`,`g`)};c.v4=function(e){return e&&e.exact?o:RegExp(`${t(e)}${n}${t(e)}`,`g`)},c.v6=function(e){return e&&e.exact?s:RegExp(`${t(e)}${i}${t(e)}`,`g`)};var l=`(?:(?:(?:[a-z]+:)?//)|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|${c.v4().source}|${c.v6().source}|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?`;return uv=RegExp(`(?:^${l}\$)`,`i`),uv}),fv={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tel:/^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},pv={integer:function(e){return pv.number(e)&&parseInt(e,10)===e},float:function(e){return pv.number(e)&&!pv.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime==`function`&&typeof e.getMonth==`function`&&typeof e.getYear==`function`&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e==`number`},object:function(e){return zo(e)===`object`&&!pv.array(e)},method:function(e){return typeof e==`function`},email:function(e){return typeof e==`string`&&e.length<=320&&!!e.match(fv.email)},tel:function(e){return typeof e==`string`&&e.length<=32&&!!e.match(fv.tel)},url:function(e){return typeof e==`string`&&e.length<=2048&&!!e.match(dv())},hex:function(e){return typeof e==`string`&&!!e.match(fv.hex)}},mv={required:lv,whitespace:function(e,t,n,r,i){(/^\s+$/.test(t)||t===``)&&r.push(q_(i.messages.whitespace,e.fullField))},type:function(e,t,n,r,i){if(e.required&&t===void 0){lv(e,t,n,r,i);return}var a=[`integer`,`float`,`array`,`regexp`,`object`,`method`,`email`,`tel`,`number`,`date`,`url`,`hex`],o=e.type;a.indexOf(o)>-1?pv[o](t)||r.push(q_(i.messages.types[o],e.fullField,e.type)):o&&zo(t)!==e.type&&r.push(q_(i.messages.types[o],e.fullField,e.type))},range:cv,enum:ov,pattern:sv},hv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();mv.required(e,t,r,a,i)}n(a)},gv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t==null&&!e.required)return n();mv.required(e,t,r,a,i,`array`),t!=null&&(mv.type(e,t,r,a,i),mv.range(e,t,r,a,i))}n(a)},_v=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();mv.required(e,t,r,a,i),t!==void 0&&mv.type(e,t,r,a,i)}n(a)},vv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t,`date`)&&!e.required)return n();if(mv.required(e,t,r,a,i),!Y_(t,`date`)){var o=t instanceof Date?t:new Date(t);mv.type(e,o,r,a,i),o&&mv.range(e,o.getTime(),r,a,i)}}n(a)},yv=`enum`,bv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();mv.required(e,t,r,a,i),t!==void 0&&mv[yv](e,t,r,a,i)}n(a)},xv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();mv.required(e,t,r,a,i),t!==void 0&&(mv.type(e,t,r,a,i),mv.range(e,t,r,a,i))}n(a)},Sv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();mv.required(e,t,r,a,i),t!==void 0&&(mv.type(e,t,r,a,i),mv.range(e,t,r,a,i))}n(a)},Cv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();mv.required(e,t,r,a,i),t!==void 0&&mv.type(e,t,r,a,i)}n(a)},wv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t===``&&(t=void 0),Y_(t)&&!e.required)return n();mv.required(e,t,r,a,i),t!==void 0&&(mv.type(e,t,r,a,i),mv.range(e,t,r,a,i))}n(a)},Tv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();mv.required(e,t,r,a,i),t!==void 0&&mv.type(e,t,r,a,i)}n(a)},Ev=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t,`string`)&&!e.required)return n();mv.required(e,t,r,a,i),Y_(t,`string`)||mv.pattern(e,t,r,a,i)}n(a)},Dv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();mv.required(e,t,r,a,i),Y_(t)||mv.type(e,t,r,a,i)}n(a)},Ov=function(e,t,n,r,i){var a=[],o=Array.isArray(t)?`array`:zo(t);mv.required(e,t,r,a,i,o),n(a)},kv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t,`string`)&&!e.required)return n();mv.required(e,t,r,a,i,`string`),Y_(t,`string`)||(mv.type(e,t,r,a,i),mv.range(e,t,r,a,i),mv.pattern(e,t,r,a,i),e.whitespace===!0&&mv.whitespace(e,t,r,a,i))}n(a)},Av=function(e,t,n,r,i){var a=e.type,o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t,a)&&!e.required)return n();mv.required(e,t,r,o,i,a),Y_(t,a)||mv.type(e,t,r,o,i)}n(o)},jv={string:kv,method:Cv,number:wv,boolean:_v,regexp:Dv,integer:Sv,float:xv,array:gv,object:Tv,enum:bv,pattern:Ev,date:vv,url:Av,hex:Av,email:Av,tel:Av,required:Ov,any:hv},Mv=function(){function e(t){Yo(this,e),Ko(this,`rules`,null),Ko(this,`_messages`,B_),this.define(t)}return Zo(e,[{key:`define`,value:function(e){var t=this;if(!e)throw Error(`Cannot configure a schema with no rules`);if(zo(e)!==`object`||Array.isArray(e))throw Error(`Rules must be an object`);this.rules={},Object.keys(e).forEach(function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]})}},{key:`messages`,value:function(e){return e&&(this._messages=iv(z_(),e)),this._messages}},{key:`validate`,value:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=t,o=r,s=i;if(typeof o==`function`&&(s=o,o={}),!this.rules||Object.keys(this.rules).length===0)return s&&s(null,a),Promise.resolve(a);function c(e){var t=[],n={};function r(e){if(Array.isArray(e)){var n;t=(n=t).concat.apply(n,Zr(e))}else t.push(e)}for(var i=0;i0&&arguments[0]!==void 0?arguments[0]:[],l=Array.isArray(c)?c:[c];!o.suppressWarning&&l.length&&e.warning(`async-validator:`,l),l.length&&r.message!==void 0&&r.message!==null&&(l=[].concat(r.message));var u=l.map(rv(r,a));if(o.first&&u.length)return d[r.field]=1,n(u);if(!i)n(u);else{if(r.required&&!t.value)return r.message===void 0?o.error&&(u=[o.error(r,q_(o.messages.required,r.field))]):u=[].concat(r.message).map(rv(r,a)),n(u);var f={};r.defaultField&&Object.keys(t.value).map(function(e){f[e]=r.defaultField}),f=Jo(Jo({},f),t.rule.fields);var p={};Object.keys(f).forEach(function(e){var t=f[e];p[e]=(Array.isArray(t)?t:[t]).map(s.bind(null,e))});var m=new e(p);m.messages(o.messages),t.rule.options&&(t.rule.options.messages=o.messages,t.rule.options.error=o.error),m.validate(t.value,t.rule.options||o,function(e){var t=[];u&&u.length&&t.push.apply(t,Zr(u)),e&&e.length&&t.push.apply(t,Zr(e)),n(t.length?t:null)})}}var l;if(r.asyncValidator)l=r.asyncValidator(r,t.value,c,t.source,o);else if(r.validator){try{l=r.validator(r,t.value,c,t.source,o)}catch(e){var u,f;(u=(f=console).error)==null||u.call(f,e),o.suppressValidatorError||setTimeout(function(){throw e},0),c(e.message)}l===!0?c():l===!1?c(typeof r.message==`function`?r.message(r.fullField||r.field):r.message||`${r.fullField||r.field} fails`):l instanceof Array?c(l):l instanceof Error&&c(l.message)}l&&l.then&&l.then(function(){return c()},function(e){return c(e)})},function(e){c(e)},a)}},{key:`getType`,value:function(e){if(e.type===void 0&&e.pattern instanceof RegExp&&(e.type=`pattern`),typeof e.validator!=`function`&&e.type&&!jv.hasOwnProperty(e.type))throw Error(q_(`Unknown rule type %s`,e.type));return e.type||`string`}},{key:`getValidationMethod`,value:function(e){if(typeof e.validator==`function`)return e.validator;var t=Object.keys(e),n=t.indexOf(`message`);return n!==-1&&t.splice(n,1),t.length===1&&t[0]===`required`?jv.required:jv[this.getType(e)]||void 0}}]),e}();Ko(Mv,`register`,function(e,t){if(typeof t!=`function`)throw Error(`Cannot register a validator by type, validator is not a function`);jv[e]=t}),Ko(Mv,`warning`,G_),Ko(Mv,`messages`,B_),Ko(Mv,`validators`,jv);var Nv="'${name}' is not a valid ${type}",Pv={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Nv,method:Nv,array:Nv,object:Nv,number:Nv,date:Nv,boolean:Nv,integer:Nv,float:Nv,regexp:Nv,email:Nv,tel:Nv,url:Nv,hex:Nv},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},Fv=Mv;function Iv(e,t){return e.replace(/\\?\$\{\w+\}/g,e=>e.startsWith(`\\`)?e.slice(1):t[e.slice(2,-1)])}var Lv=`CODE_LOGIC_ERROR`;async function Rv(e,t,n,r,i){let a={...n};if(delete a.ruleIndex,Fv.warning=()=>void 0,a.validator){let e=a.validator;a.validator=(...t)=>{try{return e(...t)}catch(e){return console.error(e),Promise.reject(Lv)}}}let o=null;a&&a.type===`array`&&a.defaultField&&(o=a.defaultField,delete a.defaultField);let s=new Fv({[e]:[a]}),c=fr(Pv,r.validateMessages);s.messages(c);let l=[];try{await Promise.resolve(s.validate({[e]:t},{...r}))}catch(e){e.errors&&(l=e.errors.map(({message:e},t)=>{let n=e===Lv?c.default:e;return S.isValidElement(n)?S.cloneElement(n,{key:`error_${t}`}):n}))}if(!l.length&&o&&Array.isArray(t)&&t.length>0)return(await Promise.all(t.map((t,n)=>Rv(`${e}.${n}`,t,o,r,i)))).reduce((e,t)=>[...e,...t],[]);let u={...n,name:e,enum:(n.enum||[]).join(`, `),...i};return l.map(e=>typeof e==`string`?Iv(e,u):e)}function zv(e,t,n,r,i,a){let o=e.join(`.`),s=n.map((e,t)=>{let n=e.validator,r={...e,ruleIndex:t};return n&&(r.validator=(e,t,r)=>{let i=!1,a=n(e,t,(...e)=>{Promise.resolve().then(()=>{br(!i,"Your validator function has already return a promise. `callback` will be ignored."),i||r(...e)})});i=a&&typeof a.then==`function`&&typeof a.catch==`function`,br(i,"`callback` is deprecated. Please return a promise instead."),i&&a.then(()=>{r()}).catch(e=>{r(e||` `)})}),r}).sort(({warningOnly:e,ruleIndex:t},{warningOnly:n,ruleIndex:r})=>!!e==!!n?t-r:e?1:-1),c;if(i===!0)c=new Promise(async(e,n)=>{for(let e=0;eRv(o,t,e,r,a).then(t=>({errors:t,rule:e})));c=(i?Vv(e):Bv(e)).then(e=>Promise.reject(e))}return c.catch(e=>e),c}async function Bv(e){return Promise.all(e).then(e=>[].concat(...e))}async function Vv(e){let t=0;return new Promise(n=>{e.forEach(r=>{r.then(r=>{r.errors.length&&n([r]),t+=1,t===e.length&&n([])})})})}function Hv(e){return L_(e)}function Uv(e,t){let n={};return t.forEach(t=>{let r=ar(e,t);n=sr(n,t,r)}),n}function Wv(e,t,n=!1){return e&&e.some(e=>Gv(t,e,n))}function Gv(e,t,n=!1){return!e||!t||!n&&e.length!==t.length?!1:t.every((t,n)=>e[n]===t)}function Kv(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(e),r=Object.keys(t);return[...new Set([...n,...r])].every(n=>{let r=e[n],i=t[n];return typeof r==`function`&&typeof i==`function`?!0:r===i})}function qv(e,...t){let n=t[0];return n&&n.target&&typeof n.target==`object`&&e in n.target?n.target[e]:n}function Jv(e,t,n){let{length:r}=e;if(t<0||t>=r||n<0||n>=r)return e;let i=e[t],a=t-n;return a>0?[...e.slice(0,n),i,...e.slice(n,t),...e.slice(t+1,r)]:a<0?[...e.slice(0,t),...e.slice(t+1,n+1),i,...e.slice(n+1,r)]:e}var Yv=e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},Xv=class{namePathList=[];taskId=0;watcherList=new Set;form;constructor(e){this.form=e}register(e){return this.watcherList.add(e),()=>{this.watcherList.delete(e)}}notify(e){e.forEach(e=>{this.namePathList.every(t=>!Gv(t,e))&&this.namePathList.push(e)}),this.doBatch()}doBatch(){this.taskId+=1;let e=this.taskId;Yv(()=>{if(e===this.taskId&&this.watcherList.size){let e=this.form.getForm(),t=e.getFieldsValue(),n=e.getFieldsValue(!0);this.watcherList.forEach(e=>{e(t,n,this.namePathList)}),this.namePathList=[]}})}};async function Zv(){return new Promise(e=>{Yv(()=>{ri(()=>{e()})})})}function Qv(){return Qv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{preserve:e,isListField:t,name:n}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(t,e,Hv(n)),this.cancelRegisterFunc=null};getNamePath=()=>{let{name:e,fieldContext:t}=this.props,{prefixName:n=[]}=t;return e===void 0?[]:[...n,...e]};getRules=()=>{let{rules:e=[],fieldContext:t}=this.props;return e.map(e=>typeof e==`function`?e(t):e)};reRender(){this.mounted&&this.forceUpdate()}refresh=()=>{this.mounted&&this.setState(({resetCount:e})=>({resetCount:e+1}))};metaCache=null;triggerMetaEvent=e=>{let{onMetaChange:t}=this.props;if(t){let n={...this.getMeta(),destroy:e};Ti(this.metaCache,n)||t(n),this.metaCache=n}else this.metaCache=null};onStoreChange=(e,t,n)=>{let{shouldUpdate:r,dependencies:i=[],onReset:a}=this.props,{store:o}=n,s=this.getNamePath(),c=this.getValue(e),l=this.getValue(o),u=t&&Wv(t,s);switch(n.type===`valueUpdate`&&n.source===`external`&&!Ti(c,l)&&(this.touched=!0,this.dirty=!0,this.validatePromise=null,this.errors=$v,this.warnings=ey,this.triggerMetaEvent()),n.type){case`reset`:if(!t||u){this.touched=!1,this.dirty=!1,this.validatePromise=void 0,this.errors=$v,this.warnings=ey,this.triggerMetaEvent(),a?.(),this.refresh();return}break;case`remove`:if(r&&ty(r,e,o,c,l,n)){this.reRender();return}break;case`setField`:{let{data:i}=n;if(u){`touched`in i&&(this.touched=i.touched),`validating`in i&&!(`originRCField`in i)&&(this.validatePromise=i.validating?Promise.resolve([]):null),`errors`in i&&(this.errors=i.errors||$v),`warnings`in i&&(this.warnings=i.warnings||ey),this.dirty=!0,this.triggerMetaEvent(),this.reRender();return}else if(`value`in i&&Wv(t,s,!0)){this.reRender();return}if(r&&!s.length&&ty(r,e,o,c,l,n)){this.reRender();return}break}case`dependenciesUpdate`:if(i.map(Hv).some(e=>Wv(n.relatedFields,e))){this.reRender();return}break;default:if(u||(!i.length||s.length||r)&&ty(r,e,o,c,l,n)){this.reRender();return}break}r===!0&&this.reRender()};validateRules=e=>{let t=this.getNamePath(),n=this.getValue(),{triggerName:r,validateOnly:i=!1,delayFrame:a}=e||{},o=Promise.resolve().then(async()=>{if(!this.mounted)return[];let{validateFirst:i=!1,messageVariables:s,validateDebounce:c}=this.props;a&&await Zv();let l=this.getRules();if(r&&(l=l.filter(e=>e).filter(e=>{let{validateTrigger:t}=e;return t?L_(t).includes(r):!0})),c&&r&&(await new Promise(e=>{setTimeout(e,c)}),this.validatePromise!==o))return[];let u=zv(t,n,l,e,i,s);return u.catch(e=>e).then((e=$v)=>{if(this.validatePromise===o){this.validatePromise=null;let t=[],n=[];e.forEach?.(({rule:{warningOnly:e},errors:r=$v})=>{e?n.push(...r):t.push(...r)}),this.errors=t,this.warnings=n,this.triggerMetaEvent(),this.reRender()}}),u});return i?o:(this.validatePromise=o,this.dirty=!0,this.errors=$v,this.warnings=ey,this.triggerMetaEvent(),this.reRender(),o)};isFieldValidating=()=>!!this.validatePromise;isFieldTouched=()=>this.touched;isFieldDirty=()=>{if(this.dirty||this.props.initialValue!==void 0)return!0;let{fieldContext:e}=this.props,{getInitialValue:t}=e.getInternalHooks(N_);return t(this.getNamePath())!==void 0};getErrors=()=>this.errors;getWarnings=()=>this.warnings;isListField=()=>this.props.isListField;isList=()=>this.props.isList;isPreserve=()=>this.props.preserve;getMeta=()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:this.validatePromise===null});getOnlyChild=e=>{if(typeof e==`function`){let t=this.getMeta();return{...this.getOnlyChild(e(this.getControlled(),t,this.props.fieldContext)),isFunction:!0}}let t=Cr(e);return t.length!==1||!S.isValidElement(t[0])?{child:t,isFunction:!1}:{child:t[0],isFunction:!1}};getValue=e=>{let{getFieldsValue:t}=this.props.fieldContext,n=this.getNamePath();return ar(e||t(!0),n)};getControlled=(e={})=>{let{name:t,trigger:n=`onChange`,validateTrigger:r,getValueFromEvent:i,normalize:a,valuePropName:o=`value`,getValueProps:s,fieldContext:c}=this.props,l=r===void 0?c.validateTrigger:r,u=this.getNamePath(),{getInternalHooks:d,getFieldsValue:f}=c,{dispatch:p}=d(N_),m=this.getValue(),h=s||(e=>({[o]:e})),g=e[n],_=t===void 0?{}:h(m),v={...e,..._};return v[n]=(...e)=>{this.touched=!0,this.dirty=!0,this.triggerMetaEvent();let t;t=i?i(...e):qv(o,...e),a&&(t=a(t,m,f(!0))),t!==m&&p({type:`updateValue`,namePath:u,value:t}),g&&g(...e)},L_(l||[]).forEach(e=>{let t=v[e];v[e]=(...n)=>{t&&t(...n);let{rules:r}=this.props;r&&r.length&&p({type:`validateField`,namePath:u,triggerName:e})}}),v};render(){let{resetCount:e}=this.state,{children:t}=this.props,{child:n,isFunction:r}=this.getOnlyChild(t),i;return r?i=n:S.isValidElement(n)?i=S.cloneElement(n,this.getControlled(n.props)):(br(!n,"`children` of Field is not validate ReactElement."),i=n),S.createElement(S.Fragment,{key:e},i)}};function ry({name:e,...t}){let n=S.useContext(F_),r=S.useContext(I_),i=e===void 0?void 0:Hv(e),a=t.isListField??!!r,o=`keep`;return a||(o=`_${(i||[]).join(`_`)}`),S.createElement(ny,Qv({key:o,name:i,isListField:a},t,{fieldContext:n}))}function iy({name:e,initialValue:t,children:n,rules:r,validateTrigger:i,isListField:a}){let o=S.useContext(F_),s=S.useContext(I_),c=S.useRef({keys:[],id:0}).current,l=S.useMemo(()=>[...Hv(o.prefixName)||[],...Hv(e)],[o.prefixName,e]),u=S.useMemo(()=>({...o,prefixName:l}),[o,l]),d=S.useMemo(()=>({getKey:e=>{let t=l.length,n=e[t];return[c.keys[n],e.slice(t+1)]}}),[c,l]);return typeof n==`function`?S.createElement(I_.Provider,{value:d},S.createElement(F_.Provider,{value:u},S.createElement(ry,{name:[],shouldUpdate:(e,t,{source:n})=>n===`internal`?!1:e!==t,rules:r,validateTrigger:i,initialValue:t,isList:!0,isListField:a??!!s},({value:e=[],onChange:t},r)=>{let{getFieldValue:i}=o,a=()=>i(l||[])||[],s={add:(e,n)=>{let r=a();n>=0&&n<=r.length?(c.keys=[...c.keys.slice(0,n),c.id,...c.keys.slice(n)],t([...r.slice(0,n),e,...r.slice(n)])):(c.keys=[...c.keys,c.id],t([...r,e])),c.id+=1},remove:e=>{let n=a(),r=new Set(Array.isArray(e)?e:[e]);r.size<=0||(c.keys=c.keys.filter((e,t)=>!r.has(t)),t(n.filter((e,t)=>!r.has(t))))},move(e,n){if(e===n)return;let r=a();e<0||e>=r.length||n<0||n>=r.length||(c.keys=Jv(c.keys,e,n),t(Jv(r,e,n)))}},u=e||[];return Array.isArray(u)||(u=[]),n(u.map((e,t)=>{let n=c.keys[t];return n===void 0&&(c.keys[t]=c.id,n=c.keys[t],c.id+=1),{name:t,key:n,isListField:!0}}),s,r)}))):(br(!1,`Form.List only accepts function as children.`),null)}function ay(e){let t=!1,n=e.length,r=[];return e.length?new Promise((i,a)=>{e.forEach((e,o)=>{e.catch(e=>(t=!0,e)).then(e=>{--n,r[o]=e,!(n>0)&&(t&&a(r),i(r))})})}):Promise.resolve([])}var oy=`__@field_split__`;function sy(e){return e.map(e=>`${typeof e}:${e}`).join(oy)}var cy=class{kvs=new Map;set(e,t){this.kvs.set(sy(e),t)}get(e){return this.kvs.get(sy(e))}getAsPrefix(e){let t=sy(e),n=t+oy,r=[],i=this.kvs.get(t);return i!==void 0&&r.push(i),this.kvs.forEach((e,t)=>{t.startsWith(n)&&r.push(e)}),r}update(e,t){let n=t(this.get(e));n?this.set(e,n):this.delete(e)}delete(e){this.kvs.delete(sy(e))}map(e){return[...this.kvs.entries()].map(([t,n])=>e({key:t.split(oy).map(e=>{let[,t,n]=e.match(/^([^:]*):(.*)$/);return t===`number`?Number(n):n}),value:n}))}toJSON(){let e={};return this.map(({key:t,value:n})=>(e[t.join(`.`)]=n,null)),e}},ly=class{formHooked=!1;forceRootUpdate;subscribable=!0;store={};fieldEntities=[];initialValues={};callbacks={};validateMessages=null;preserve=null;lastValidatePromise=null;watcherCenter=new Xv(this);constructor(e){this.forceRootUpdate=e}getForm=()=>({getFieldValue:this.getFieldValue,getFieldsValue:this.getFieldsValue,getFieldError:this.getFieldError,getFieldWarning:this.getFieldWarning,getFieldsError:this.getFieldsError,isFieldsTouched:this.isFieldsTouched,isFieldTouched:this.isFieldTouched,isFieldValidating:this.isFieldValidating,isFieldsValidating:this.isFieldsValidating,resetFields:this.resetFields,setFields:this.setFields,setFieldValue:this.setFieldValue,setFieldsValue:this.setFieldsValue,validateFields:this.validateFields,submit:this.submit,_init:!0,getInternalHooks:this.getInternalHooks});getInternalHooks=e=>e===`RC_FORM_INTERNAL_HOOKS`?(this.formHooked=!0,{dispatch:this.dispatch,initEntityValue:this.initEntityValue,registerField:this.registerField,useSubscribe:this.useSubscribe,setInitialValues:this.setInitialValues,destroyForm:this.destroyForm,setCallbacks:this.setCallbacks,setValidateMessages:this.setValidateMessages,getFields:this.getFields,setPreserve:this.setPreserve,getInitialValue:this.getInitialValue,registerWatch:this.registerWatch}):(br(!1,"`getInternalHooks` is internal usage. Should not call directly."),null);useSubscribe=e=>{this.subscribable=e};prevWithoutPreserves=null;setInitialValues=(e,t)=>{if(this.initialValues=e||{},t){let t=fr(e,this.store);this.prevWithoutPreserves?.map(({key:n})=>{t=sr(t,n,ar(e,n))}),this.prevWithoutPreserves=null,this.updateStore(t)}};destroyForm=e=>{if(e)this.updateStore({});else{let e=new cy;this.getFieldEntities(!0).forEach(t=>{this.isMergedPreserve(t.isPreserve())||e.set(t.getNamePath(),!0)}),this.prevWithoutPreserves=e}};getInitialValue=e=>{let t=ar(this.initialValues,e);return e.length?fr(t):t};setCallbacks=e=>{this.callbacks=e};setValidateMessages=e=>{this.validateMessages=e};setPreserve=e=>{this.preserve=e};registerWatch=e=>this.watcherCenter.register(e);notifyWatch=(e=[])=>{this.watcherCenter.notify(e)};timeoutId=null;warningUnhooked=()=>{};updateStore=e=>{this.store=e};getFieldEntities=(e=!1)=>e?this.fieldEntities.filter(e=>e.getNamePath().length):this.fieldEntities;getFieldsMap=(e=!1)=>{let t=new cy;return this.getFieldEntities(e).forEach(e=>{let n=e.getNamePath();t.set(n,e)}),t};getFieldEntitiesForNamePathList=(e,t=!1)=>{if(!e)return this.getFieldEntities(!0);let n=this.getFieldsMap(!0);return t?e.flatMap(e=>{let t=Hv(e),r=n.getAsPrefix(t);return r.length?r:[{INVALIDATE_NAME_PATH:t}]}):e.map(e=>{let t=Hv(e);return n.get(t)||{INVALIDATE_NAME_PATH:Hv(e)}})};getFieldsValue=(e,t)=>{this.warningUnhooked();let n,r;if(e===!0||Array.isArray(e)?(n=e,r=t):e&&typeof e==`object`&&(r=e.filter),n===!0&&!r)return this.store;let i=this.getFieldEntitiesForNamePathList(Array.isArray(n)?n:null,!0),a=[],o=[];i.forEach(e=>{let t=e.INVALIDATE_NAME_PATH||e.getNamePath();if(e.isList?.()){o.push(t);return}if(!r)a.push(t);else{let n=`getMeta`in e?e.getMeta():null;r(n)&&a.push(t)}});let s=Uv(this.store,a.map(Hv));return o.forEach(e=>{ar(s,e)||(s=sr(s,e,[]))}),s};getFieldValue=e=>{this.warningUnhooked();let t=Hv(e);return ar(this.store,t)};getFieldsError=e=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(e).map((t,n)=>t&&!t.INVALIDATE_NAME_PATH?{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}:{name:Hv(e[n]),errors:[],warnings:[]}));getFieldError=e=>{this.warningUnhooked();let t=Hv(e);return this.getFieldsError([t])[0].errors};getFieldWarning=e=>{this.warningUnhooked();let t=Hv(e);return this.getFieldsError([t])[0].warnings};isFieldsTouched=(...e)=>{this.warningUnhooked();let[t,n]=e,r,i=!1;e.length===0?r=null:e.length===1?Array.isArray(t)?(r=t.map(Hv),i=!1):(r=null,i=t):(r=t.map(Hv),i=n);let a=this.getFieldEntities(!0),o=e=>e.isFieldTouched();if(!r)return i?a.every(e=>o(e)||e.isList()):a.some(o);let s=new cy;r.forEach(e=>{s.set(e,[])}),a.forEach(e=>{let t=e.getNamePath();r.forEach(n=>{n.every((e,n)=>t[n]===e)&&s.update(n,t=>[...t,e])})});let c=e=>e.some(o),l=s.map(({value:e})=>e);return i?l.every(c):l.some(c)};isFieldTouched=e=>(this.warningUnhooked(),this.isFieldsTouched([e]));isFieldsValidating=e=>{this.warningUnhooked();let t=this.getFieldEntities();if(!e)return t.some(e=>e.isFieldValidating());let n=e.map(Hv);return t.some(e=>Wv(n,e.getNamePath())&&e.isFieldValidating())};isFieldValidating=e=>(this.warningUnhooked(),this.isFieldsValidating([e]));resetWithFieldInitialValue=(e={})=>{let t=new cy,n=this.getFieldEntities(!0);n.forEach(e=>{let{initialValue:n}=e.props,r=e.getNamePath();if(n!==void 0){let i=t.get(r)||new Set;i.add({entity:e,value:n}),t.set(r,i)}});let r=n=>{n.forEach(n=>{let{initialValue:r}=n.props;if(r!==void 0){let r=n.getNamePath();if(this.getInitialValue(r)!==void 0)br(!1,`Form already set 'initialValues' with path '${r.join(`.`)}'. Field can not overwrite it.`);else{let i=t.get(r);if(i&&i.size>1)br(!1,`Multiple Field with path '${r.join(`.`)}' set 'initialValue'. Can not decide which one to pick.`);else if(i){let t=this.getFieldValue(r);!n.isListField()&&(!e.skipExist||t===void 0)&&this.updateStore(sr(this.store,r,[...i][0].value))}}}})},i;e.entities?i=e.entities:e.namePathList?(i=[],e.namePathList.forEach(e=>{let n=t.get(e);n&&i.push(...[...n].map(e=>e.entity))})):i=n,r(i)};resetFields=e=>{this.warningUnhooked();let t=this.store;if(!e){this.updateStore(fr(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(t,null,{type:`reset`}),this.notifyWatch();return}let n=e.map(Hv);n.forEach(e=>{let t=this.getInitialValue(e);this.updateStore(sr(this.store,e,t))}),this.resetWithFieldInitialValue({namePathList:n}),this.notifyObservers(t,n,{type:`reset`}),this.notifyWatch(n)};setFields=e=>{this.warningUnhooked();let t=this.store,n=[];e.forEach(e=>{let{name:r,...i}=e,a=Hv(r);n.push(a),`value`in i&&this.updateStore(sr(this.store,a,i.value)),this.notifyObservers(t,[a],{type:`setField`,data:e})}),this.notifyWatch(n)};getFields=()=>this.getFieldEntities(!0).map(e=>{let t=e.getNamePath(),n={...e.getMeta(),name:t,value:this.getFieldValue(t)};return Object.defineProperty(n,`originRCField`,{value:!0}),n});initEntityValue=e=>{let{initialValue:t}=e.props;if(t!==void 0){let n=e.getNamePath();ar(this.store,n)===void 0&&this.updateStore(sr(this.store,n,t))}};isMergedPreserve=e=>(e===void 0?this.preserve:e)??!0;registerField=e=>{this.fieldEntities.push(e);let t=e.getNamePath();if(this.notifyWatch([t]),e.props.initialValue!==void 0){let t=this.store;this.resetWithFieldInitialValue({entities:[e],skipExist:!0}),this.notifyObservers(t,[e.getNamePath()],{type:`valueUpdate`,source:`internal`})}return(n,r,i=[])=>{if(this.fieldEntities=this.fieldEntities.filter(t=>t!==e),!this.isMergedPreserve(r)&&(!n||i.length>1)){let e=n?void 0:this.getInitialValue(t);if(t.length&&this.getFieldValue(t)!==e&&this.fieldEntities.every(e=>!Gv(e.getNamePath(),t))){let n=this.store;this.updateStore(sr(n,t,e,!0)),this.notifyObservers(n,[t],{type:`remove`}),this.triggerDependenciesUpdate(n,t)}}this.notifyWatch([t])}};dispatch=e=>{switch(e.type){case`updateValue`:{let{namePath:t,value:n}=e;this.updateValue(t,n);break}case`validateField`:{let{namePath:t,triggerName:n}=e;this.validateFields([t],{triggerName:n});break}default:}};notifyObservers=(e,t,n)=>{if(this.subscribable){let r={...n,store:this.getFieldsValue(!0)};this.getFieldEntities().forEach(({onStoreChange:n})=>{n(e,t,r)})}else this.forceRootUpdate()};triggerDependenciesUpdate=(e,t)=>{let n=this.getDependencyChildrenFields(t);return n.length&&this.validateFields(n,{delayFrame:!0}),this.notifyObservers(e,n,{type:`dependenciesUpdate`,relatedFields:[t,...n]}),n};updateValue=(e,t)=>{let n=Hv(e),r=this.store;this.updateStore(sr(this.store,n,t)),this.notifyObservers(r,[n],{type:`valueUpdate`,source:`internal`}),this.notifyWatch([n]);let i=this.triggerDependenciesUpdate(r,n),{onValuesChange:a}=this.callbacks;if(a){let e=Uv(this.store,[n]);a(e,sr(this.getFieldsValue(),n,ar(e,n)))}this.triggerOnFieldsChange([n,...i])};setFieldsValue=e=>{this.warningUnhooked();let t=this.store;if(e){let t=fr(this.store,e);this.updateStore(t)}this.notifyObservers(t,null,{type:`valueUpdate`,source:`external`}),this.notifyWatch()};setFieldValue=(e,t)=>{this.setFields([{name:e,value:t,errors:[],warnings:[],touched:!0}])};getDependencyChildrenFields=e=>{let t=new Set,n=[],r=new cy;this.getFieldEntities().forEach(e=>{let{dependencies:t}=e.props;(t||[]).forEach(t=>{let n=Hv(t);r.update(n,(t=new Set)=>(t.add(e),t))})});let i=e=>{(r.get(e)||new Set).forEach(e=>{if(!t.has(e)){t.add(e);let r=e.getNamePath();e.isFieldDirty()&&r.length&&(n.push(r),i(r))}})};return i(e),n};triggerOnFieldsChange=(e,t)=>{let{onFieldsChange:n}=this.callbacks;if(n){let r=this.getFields();if(t){let e=new cy;t.forEach(({name:t,errors:n})=>{e.set(t,n)}),r.forEach(t=>{t.errors=e.get(t.name)||t.errors})}let i=r.filter(({name:t})=>Wv(e,t));i.length&&n(i,r)}};validateFields=(e,t)=>{this.warningUnhooked();let n,r;Array.isArray(e)||typeof e==`string`||typeof t==`string`?(n=e,r=t):r=e;let i=!!n,a=i?n.map(Hv):[],o=[...a],s=[],c=String(Date.now()),l=new Set,{recursive:u,dirty:d}=r||{};this.getFieldEntities(!0).forEach(e=>{let t=e.getNamePath();if(i||((!e.isList()||!a.some(e=>Gv(e,t,!0)))&&o.push(t),a.push(t)),!(!e.props.rules||!e.props.rules.length)&&!(d&&!e.isFieldDirty())&&(l.add(t.join(c)),!i||Wv(a,t,u))){let n=e.validateRules({validateMessages:{...Pv,...this.validateMessages},...r});s.push(n.then(()=>({name:t,errors:[],warnings:[]})).catch(e=>{let n=[],r=[];return e.forEach?.(({rule:{warningOnly:e},errors:t})=>{e?r.push(...t):n.push(...t)}),n.length?Promise.reject({name:t,errors:n,warnings:r}):{name:t,errors:n,warnings:r}}))}});let f=ay(s);this.lastValidatePromise=f,f.catch(e=>e).then(e=>{let t=e.map(({name:e})=>e);this.notifyObservers(this.store,t,{type:`validateFinish`}),this.triggerOnFieldsChange(t,e)});let p=f.then(()=>this.lastValidatePromise===f?Promise.resolve(this.getFieldsValue(o)):Promise.reject([])).catch(e=>{let t=e.filter(e=>e&&e.errors.length),n=t[0]?.errors?.[0];return Promise.reject({message:n,values:this.getFieldsValue(a),errorFields:t,outOfDate:this.lastValidatePromise!==f})});p.catch(e=>e);let m=a.filter(e=>l.has(e.join(c)));return this.triggerOnFieldsChange(m),p};submit=()=>{this.warningUnhooked(),this.validateFields().then(e=>{let{onFinish:t}=this.callbacks;if(t)try{t(e)}catch(e){console.error(e)}}).catch(e=>{let{onFinishFailed:t}=this.callbacks;t&&t(e)})}};function uy(e){let t=S.useRef(null),[,n]=S.useState({});return t.current||(e?t.current=e:t.current=new ly(()=>{n({})}).getForm()),[t.current]}var dy=S.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),fy=({validateMessages:e,onFormChange:t,onFormFinish:n,children:r})=>{let i=S.useContext(dy),a=S.useRef({});return S.createElement(dy.Provider,{value:{...i,validateMessages:{...i.validateMessages,...e},triggerFormChange:(e,n)=>{t&&t(e,{changedFields:n,forms:a.current}),i.triggerFormChange(e,n)},triggerFormFinish:(e,t)=>{n&&n(e,{values:t,forms:a.current}),i.triggerFormFinish(e,t)},registerForm:(e,t)=>{e&&(a.current={...a.current,[e]:t}),i.registerForm(e,t)},unregisterForm:e=>{let t={...a.current};delete t[e],a.current=t,i.unregisterForm(e)}}},r)};function py(){return py=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let g=S.useRef(null),_=S.useContext(dy),[v]=uy(r),{useSubscribe:y,setInitialValues:b,setCallbacks:x,setValidateMessages:C,setPreserve:w,destroyForm:T}=v.getInternalHooks(N_);S.useImperativeHandle(h,()=>({...v,nativeElement:g.current})),S.useEffect(()=>(_.registerForm(e,v),()=>{_.unregisterForm(e)}),[_,v,e]),C({..._.validateMessages,...s}),x({onValuesChange:l,onFieldsChange:(t,...n)=>{_.triggerFormChange(e,t),u&&u(t,...n)},onFinish:t=>{_.triggerFormFinish(e,t),d&&d(t)},onFinishFailed:f}),w(i);let E=S.useRef(null);b(t,!E.current),E.current||=!0,S.useEffect(()=>()=>T(p),[]);let D,O=typeof a==`function`;D=O?a(v.getFieldsValue(!0),v):a,y(!O);let k=S.useRef(null);S.useEffect(()=>{Kv(k.current||[],n||[])||v.setFields(n||[]),k.current=n},[n,v]);let A=S.useMemo(()=>({...v,validateTrigger:c}),[v,c]),j=S.createElement(I_.Provider,{value:null},S.createElement(F_.Provider,{value:A},D));return o===!1?j:S.createElement(o,py({},m,{ref:g,onSubmit:e=>{e.preventDefault(),e.stopPropagation(),v.submit()},onReset:e=>{e.preventDefault(),v.resetFields(),m.onReset?.(e)}}),j)};function hy(e){try{return JSON.stringify(e)}catch{return Math.random()}}function gy(...e){let[t,n={}]=e,r=R_(n)?{form:n}:n,i=r.form,[a,o]=(0,S.useState)(()=>typeof t==`function`?t({}):void 0),s=(0,S.useMemo)(()=>hy(a),[a]),c=(0,S.useRef)(s);c.current=s;let l=(0,S.useContext)(F_),u=i||l,d=u&&u._init,{getFieldsValue:f,getInternalHooks:p}=u,{registerWatch:m}=p(N_),h=In((e,n)=>{let i=r.preserve?n??f(!0):e??f(),s=typeof t==`function`?t(i):ar(i,Hv(t));hy(a)!==hy(s)&&o(s)});return(0,S.useEffect)(()=>{d&&h()},[d,typeof t==`function`?t:JSON.stringify(t)]),(0,S.useEffect)(()=>{if(d)return m((e,t)=>{h(e,t)})},[d]),a}var _y=S.forwardRef(my);_y.FormProvider=fy,_y.Field=ry,_y.List=iy,_y.useForm=uy,_y.useWatch=gy;var vy=S.createContext({labelAlign:`right`,layout:`horizontal`,itemRef:()=>{}}),yy=S.createContext(null),by=e=>{let t=Sr(e,[`prefixCls`]);return S.createElement(fy,{...t})},xy=S.createContext({prefixCls:``}),Sy=S.createContext({}),Cy=({children:e,status:t,override:n})=>{let r=S.useContext(Sy),i=S.useMemo(()=>{let e={...r};return n&&delete e.isFormItemInput,t&&(delete e.status,delete e.hasFeedback,delete e.feedbackIcon),e},[t,n,r]);return S.createElement(Sy.Provider,{value:i},e)},wy=S.createContext(void 0),Ty=e=>{let{space:t,form:n,children:r}=e;if(!fd(r))return null;let i=r;return n&&(i=S.createElement(Cy,{override:!0,status:!0},i)),t&&(i=S.createElement(ah,null,i)),i},Ey=e=>{if(Ln()&&window.document.documentElement){let t=Array.isArray(e)?e:[e],{documentElement:n}=window.document;return t.some(e=>e in n.style)}return!1},Dy=(e,t)=>{if(!Ey(e))return!1;let n=document.createElement(`div`),r=n.style[e];return n.style[e]=t,n.style[e]!==r};function Oy(e,t){return!Array.isArray(e)&&t!==void 0?Dy(e,t):Ey(e)}var ky=()=>Ln()&&window.document.documentElement;function Ay(e,t,n){return(0,S.useMemo)(()=>({trap:t??!0,focusTriggerAfterClose:n??!0,...e}),[e,t,n])}var jy=e=>{let{prefixCls:t,className:n,style:r,size:i,shape:a}=e,o=J({[`${t}-lg`]:i===`large`,[`${t}-sm`]:i===`small`}),s=J({[`${t}-circle`]:a===`circle`,[`${t}-square`]:a===`square`,[`${t}-round`]:a===`round`}),c=S.useMemo(()=>pd(i)?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return S.createElement(`span`,{className:J(t,o,s,n),style:{...c,...r}})},My=new Lo(`ant-skeleton-loading`,{"0%":{backgroundPosition:`100% 50%`},"100%":{backgroundPosition:`0 50%`}}),Ny=e=>({height:e,lineHeight:Y(e)}),Py=e=>({width:e,...Ny(e)}),Fy=e=>({background:e.skeletonLoadingBackground,backgroundSize:`400% 100%`,animationName:My,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:`ease`,animationIterationCount:`infinite`}),Iy=(e,t)=>({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal(),...Ny(e)}),pee=e=>{let{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:i,controlHeightSM:a}=e;return{[t]:{display:`inline-block`,verticalAlign:`top`,background:n,...Py(r)},[`${t}${t}-circle`]:{borderRadius:`50%`},[`${t}${t}-lg`]:{...Py(i)},[`${t}${t}-sm`]:{...Py(a)}}},mee=e=>{let{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:i,controlHeightSM:a,gradientFromColor:o,calc:s}=e;return{[r]:{display:`inline-block`,verticalAlign:`top`,background:o,borderRadius:n,...Iy(t,s)},[`${r}-lg`]:{...Iy(i,s)},[`${r}-sm`]:{...Iy(a,s)}}},Ly=e=>{let{gradientFromColor:t,borderRadiusSM:n,imageSizeBase:r,calc:i}=e;return{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,verticalAlign:`middle`,background:t,borderRadius:n,...Py(i(r).mul(2).equal())}},hee=e=>({[e.skeletonNodeCls]:{...Ly(e)}}),gee=e=>{let{skeletonImageCls:t,imageSizeBase:n,calc:r}=e;return{[t]:{...Ly(e),[`${t}-path`]:{fill:`#bfbfbf`},[`${t}-svg`]:{...Py(n),maxWidth:r(n).mul(4).equal(),maxHeight:r(n).mul(4).equal()},[`${t}-svg${t}-svg-circle`]:{borderRadius:`50%`}},[`${t}${t}-circle`]:{borderRadius:`50%`}}},Ry=(e,t,n)=>{let{skeletonButtonCls:r}=e;return{[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:`50%`},[`${n}${r}-round`]:{borderRadius:t}}},zy=(e,t)=>({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal(),...Ny(e)}),_ee=e=>{let{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:i,controlHeightSM:a,gradientFromColor:o,calc:s}=e;return{[n]:{display:`inline-block`,verticalAlign:`top`,background:o,borderRadius:t,width:s(r).mul(2).equal(),minWidth:s(r).mul(2).equal(),...zy(r,s)},...Ry(e,r,n),[`${n}-lg`]:{...zy(i,s)},...Ry(e,i,`${n}-lg`),[`${n}-sm`]:{...zy(a,s)},...Ry(e,a,`${n}-sm`)}},vee=e=>{let{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:i,skeletonButtonCls:a,skeletonInputCls:o,skeletonNodeCls:s,skeletonImageCls:c,controlHeight:l,controlHeightLG:u,controlHeightSM:d,gradientFromColor:f,padding:p,marginSM:m,borderRadius:h,titleHeight:g,blockRadius:_,paragraphLiHeight:v,controlHeightXS:y,paragraphMarginTop:b}=e;return{[t]:{display:`table`,width:`100%`,[`${t}-header`]:{display:`table-cell`,paddingInlineEnd:p,verticalAlign:`top`,[n]:{display:`inline-block`,verticalAlign:`top`,background:f,...Py(l)},[`${n}-circle`]:{borderRadius:`50%`},[`${n}-lg`]:{...Py(u)},[`${n}-sm`]:{...Py(d)}},[`${t}-section`]:{display:`table-cell`,width:`100%`,verticalAlign:`top`,[r]:{width:`100%`,height:g,background:f,borderRadius:_,[`+ ${i}`]:{marginBlockStart:d}},[i]:{padding:0,"> li":{width:`100%`,height:v,listStyle:`none`,background:f,borderRadius:_,"+ li":{marginBlockStart:y}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:`61%`}},[`&-round ${t}-section`]:{[`${r}, ${i} > li`]:{borderRadius:h}}},[`${t}-with-avatar ${t}-section`]:{[r]:{marginBlockStart:m,[`+ ${i}`]:{marginBlockStart:b}}},[`${t}${t}-element`]:{display:`inline-block`,width:`auto`,..._ee(e),...pee(e),...mee(e),...hee(e),...gee(e)},[`${t}${t}-block`]:{width:`100%`,[a]:{width:`100%`},[o]:{width:`100%`}},[`${t}${t}-active`]:{[` ${r}, ${i} > li, ${n}, @@ -164,12 +164,12 @@ html body { ${o}, ${s}, ${c} - `]:{...Fy(e)}}}},Hy=rl(`Skeleton`,e=>{let{componentCls:t,calc:n}=e;return gee(gs(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonNodeCls:`${t}-node`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:`1.4s`}))},e=>{let{colorFillContent:t,colorFill:n}=e,r=t,i=n;return{color:r,colorGradientEnd:i,gradientFromColor:r,gradientToColor:i,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[[`color`,`gradientFromColor`],[`colorGradientEnd`,`gradientToColor`]]}),_ee=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,active:a,style:o,styles:s,shape:c=`circle`,size:l,...u}=e,{getPrefixCls:d}=S.useContext(oi),f=d(`skeleton`,t),[p,m]=Hy(f),h=th(e=>l??e),g=J(f,`${f}-element`,{[`${f}-active`]:a},r?.root,n,i,p,m);return S.createElement(`div`,{className:g,style:s?.root},S.createElement(jy,{prefixCls:`${f}-avatar`,className:r?.content,style:{...s?.content,...o},shape:c,size:h,...u}))},vee=e=>{let{prefixCls:t,className:n,rootClassName:r,classNames:i,active:a,style:o,styles:s,block:c=!1,size:l,...u}=e,{getPrefixCls:d}=S.useContext(oi),f=d(`skeleton`,t),[p,m]=Hy(f),h=th(e=>l??e),g=J(f,`${f}-element`,{[`${f}-active`]:a,[`${f}-block`]:c},i?.root,n,r,p,m);return S.createElement(`div`,{className:g,style:s?.root},S.createElement(jy,{prefixCls:`${f}-button`,className:i?.content,style:{...s?.content,...o},size:h,...u}))},Uy=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,internalClassName:a,style:o,styles:s,active:c,children:l}=e,{getPrefixCls:u}=S.useContext(oi),d=u(`skeleton`,t),[f,p]=Hy(d),m=J(d,`${d}-element`,{[`${d}-active`]:c},f,r?.root,n,i,p);return S.createElement(`div`,{className:m,style:s?.root},S.createElement(`div`,{className:J(r?.content,a||`${d}-node`),style:{...s?.content,...o}},l))},yee=e=>{let{getPrefixCls:t}=S.useContext(oi),n=t(`skeleton`,e.prefixCls);return S.createElement(Uy,{...e,internalClassName:`${n}-image`},S.createElement(`svg`,{viewBox:`0 0 1098 1024`,xmlns:`http://www.w3.org/2000/svg`,className:`${n}-image-svg`},S.createElement(`title`,null,`Image placeholder`),S.createElement(`path`,{d:`M365.7 329.1q0 45.8-32 77.7t-77.7 32-77.7-32-32-77.7 32-77.6 77.7-32 77.7 32 32 77.6M951 548.6v256H146.3V694.9L329 512l91.5 91.4L713 311zm54.8-402.3H91.4q-7.4 0-12.8 5.4T73 164.6v694.8q0 7.5 5.5 12.9t12.8 5.4h914.3q7.5 0 12.9-5.4t5.4-12.9V164.6q0-7.5-5.4-12.9t-12.9-5.4m91.4 18.3v694.8q0 37.8-26.8 64.6t-64.6 26.9H91.4q-37.7 0-64.6-26.9T0 859.4V164.6q0-37.8 26.8-64.6T91.4 73h914.3q37.8 0 64.6 26.9t26.8 64.6`,className:`${n}-image-path`})))},bee=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,active:a,block:o,style:s,styles:c,size:l,...u}=e,{getPrefixCls:d}=S.useContext(oi),f=d(`skeleton`,t),[p,m]=Hy(f),h=th(e=>l??e),g=J(f,`${f}-element`,{[`${f}-active`]:a,[`${f}-block`]:o},r?.root,n,i,p,m);return S.createElement(`div`,{className:g,style:c?.root},S.createElement(jy,{prefixCls:`${f}-input`,className:r?.content,style:{...c?.content,...s},size:h,...u}))},xee=(e,t)=>{let{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},See=e=>{let{prefixCls:t,className:n,style:r,rows:i=0}=e,a=Array.from({length:i}).map((t,n)=>S.createElement(`li`,{key:n,style:{width:xee(n,e)}}));return S.createElement(`ul`,{className:J(t,n),style:r},a)},Cee=({prefixCls:e,className:t,width:n,style:r})=>S.createElement(`h3`,{className:J(e,t),style:{width:n,...r}});function Wy(e){return hd(e)?e:{}}function wee(e,t){return e&&!t?{size:`large`,shape:`square`}:{size:`large`,shape:`circle`}}function Tee(e,t){return!e&&t?{width:`38%`}:e&&t?{width:`50%`}:{}}function Eee(e,t){let n={};return(!e||!t)&&(n.width=`61%`),!e&&t?n.rows=3:n.rows=2,n}var Gy=e=>{let{prefixCls:t,loading:n,className:r,rootClassName:i,classNames:a,style:o,styles:s,children:c,avatar:l=!1,title:u=!0,paragraph:d=!0,active:f,round:p}=e,{getPrefixCls:m,direction:h,className:g,style:_,classNames:v,styles:y}=li(`skeleton`),b=m(`skeleton`,t),[x,C]=Hy(b),w={...e,avatar:l,title:u,paragraph:d},[T,E]=Fd([v,a],[y,s],{props:w});if(n||!(`loading`in e)){let e=!!l,t=!!u,n=!!d,a;if(e){let e={className:T.avatar,prefixCls:`${b}-avatar`,...wee(t,n),...Wy(l),style:E.avatar};a=S.createElement(`div`,{className:J(T.header,`${b}-header`),style:E.header},S.createElement(jy,{...e}))}let s;if(t||n){let r;if(t){let t={className:T.title,prefixCls:`${b}-title`,...Tee(e,n),...Wy(u),style:E.title};r=S.createElement(Cee,{...t})}let i;if(n){let n={className:T.paragraph,prefixCls:`${b}-paragraph`,...Eee(e,t),...Wy(d),style:E.paragraph};i=S.createElement(See,{...n})}s=S.createElement(`div`,{className:J(T.section,`${b}-section`),style:E.section},r,i)}let c=J(b,{[`${b}-with-avatar`]:e,[`${b}-active`]:f,[`${b}-rtl`]:h===`rtl`,[`${b}-round`]:p},T.root,g,r,i,x,C);return S.createElement(`div`,{className:c,style:{...E.root,..._,...o}},a,s)}return c??null};Gy.Button=vee,Gy.Avatar=_ee,Gy.Input=bee,Gy.Image=yee,Gy.Node=Uy;var Ky=Gy;function qy(){}var Dee=S.createContext({add:qy,remove:qy});function Jy(e){let t=S.useContext(Dee),n=S.useRef(null);return In(r=>{if(r){let i=e?r.querySelector(e):r;i&&(t.add(i),n.current=i)}else t.remove(n.current)})}var Yy=()=>{let{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=(0,S.useContext)($g);return S.createElement(Zg,{onClick:n,...e},t)},Xy=()=>{let{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:r,onOk:i}=(0,S.useContext)($g);return S.createElement(Zg,{...fh(n),loading:e,onClick:i,...t},r)};function Zy(e,t){return S.createElement(`span`,{className:`${e}-close-x`},t||S.createElement(Rl,{className:`${e}-close-icon`}))}var Qy=e=>{let{okText:t,okType:n=`primary`,cancelText:r,confirmLoading:i,onOk:a,onCancel:o,okButtonProps:s,cancelButtonProps:c,footer:l}=e,[u]=cd(`Modal`,od()),d=t||u?.okText,f=r||u?.cancelText,p=S.useMemo(()=>({confirmLoading:i,okButtonProps:s,cancelButtonProps:c,okTextLocale:d,cancelTextLocale:f,okType:n,onOk:a,onCancel:o}),[i,s,c,d,f,n,a,o]),m;return typeof l==`function`||l===void 0?(m=S.createElement(S.Fragment,null,S.createElement(Yy,null),S.createElement(Xy,null)),typeof l==`function`&&(m=l(m,{OkBtn:Xy,CancelBtn:Yy})),m=S.createElement(e_,{value:p},m)):m=l,S.createElement(Bp,{disabled:!1},m)},Oee=e=>{let{componentCls:t}=e;return{[t]:{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`}}}},kee=e=>{let{componentCls:t}=e;return{[t]:{position:`relative`,maxWidth:`100%`,minHeight:1}}},Aee=(e,t)=>{let{componentCls:n,gridColumns:r,antCls:i}=e,[a,o]=ol(i,`grid`),[,s]=ol(i,`col`),c={};for(let e=r;e>=0;e--)e===0?(c[`${n}${t}-${e}`]={display:`none`},c[`${n}-push-${e}`]={insetInlineStart:`auto`},c[`${n}-pull-${e}`]={insetInlineEnd:`auto`},c[`${n}${t}-push-${e}`]={insetInlineStart:`auto`},c[`${n}${t}-pull-${e}`]={insetInlineEnd:`auto`},c[`${n}${t}-offset-${e}`]={marginInlineStart:0},c[`${n}${t}-order-${e}`]={order:0}):(c[`${n}${t}-${e}`]=[{[a(`display`)]:`block`,display:`block`},{display:o(`display`),flex:`0 0 ${e/r*100}%`,maxWidth:`${e/r*100}%`}],c[`${n}${t}-push-${e}`]={insetInlineStart:`${e/r*100}%`},c[`${n}${t}-pull-${e}`]={insetInlineEnd:`${e/r*100}%`},c[`${n}${t}-offset-${e}`]={marginInlineStart:`${e/r*100}%`},c[`${n}${t}-order-${e}`]={order:e});return c[`${n}${t}-flex`]={flex:s(`${t.replace(/-/,``)}-flex`)},c},$y=(e,t)=>Aee(e,t),jee=(e,t,n)=>({[`@media (min-width: ${Y(t)})`]:{...$y(e,n)}}),Mee=()=>({}),Nee=()=>({}),Pee=rl(`Grid`,Oee,Mee),eb=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin,xxxl:e.screenXXXLMin}),tb=rl(`Grid`,e=>{let t=gs(e,{gridColumns:24}),n=eb(t);return delete n.xs,[kee(t),$y(t,``),$y(t,`-xs`),Object.keys(n).map(e=>jee(t,n[e],`-${e}`)).reduce((e,t)=>({...e,...t}),{})]},Nee);function nb(e){return{position:e,inset:0}}var rb=e=>{let{componentCls:t,antCls:n}=e;return[{[`${t}-root`]:{[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]:{transform:`none`,opacity:0,animationDuration:e.motionDurationSlow,userSelect:`none`},[`${t}${n}-zoom-leave ${t}-container`]:{pointerEvents:`none`},[`${t}-mask`]:{...nb(`fixed`),zIndex:e.zIndexPopupBase,height:`100%`,backgroundColor:e.colorBgMask,pointerEvents:`none`,[`&${t}-mask-blur`]:{backdropFilter:`blur(4px)`},[`${t}-hidden`]:{display:`none`}},[`${t}-wrap`]:{...nb(`fixed`),zIndex:e.zIndexPopupBase,overflow:`auto`,outline:0,WebkitOverflowScrolling:`touch`}}},{[`${t}-root`]:wh(e)}]},ib=e=>{let{componentCls:t,motionDurationMid:n}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:`rtl`},[`${t}-centered`]:{textAlign:`center`,"&::before":{display:`inline-block`,width:0,height:`100%`,verticalAlign:`middle`,content:`""`},[t]:{top:0,display:`inline-block`,paddingBottom:0,textAlign:`start`,verticalAlign:`middle`}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:`calc(100vw - 16px)`,margin:`${Y(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:{...Jc(e),pointerEvents:`none`,position:`relative`,top:100,width:`auto`,maxWidth:`calc(100vw - ${Y(e.calc(e.margin).mul(2).equal())})`,margin:`0 auto`,"&:focus-visible":{borderRadius:e.borderRadiusLG,...Zc(e)},[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:`break-word`},[`${t}-container`]:{position:`relative`,backgroundColor:e.contentBg,backgroundClip:`padding-box`,border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:`auto`,padding:e.contentPadding},[`${t}-close`]:{position:`absolute`,top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:`none`,background:`transparent`,borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:`pointer`,transition:[`color`,`background-color`].map(e=>`${e} ${n}`).join(`, `),"&-x":{display:`flex`,fontSize:e.fontSizeLG,fontStyle:`normal`,lineHeight:Y(e.modalCloseBtnSize),justifyContent:`center`,textTransform:`none`,textRendering:`auto`},"&:disabled":{pointerEvents:`none`},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:`none`},"&:active":{backgroundColor:e.colorBgTextActive},...Qc(e)},[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:`break-word`,padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`${Y(e.margin)} auto`}},[`${t}-footer`]:{textAlign:`end`,background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:`hidden`}}},{[`${t}-pure-panel`]:{top:`auto`,padding:0,display:`flex`,flexDirection:`column`,[`${t}-container, + `]:{...Fy(e)}}}},By=rl(`Skeleton`,e=>{let{componentCls:t,calc:n}=e;return vee(gs(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonNodeCls:`${t}-node`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:`1.4s`}))},e=>{let{colorFillContent:t,colorFill:n}=e,r=t,i=n;return{color:r,colorGradientEnd:i,gradientFromColor:r,gradientToColor:i,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[[`color`,`gradientFromColor`],[`colorGradientEnd`,`gradientToColor`]]}),yee=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,active:a,style:o,styles:s,shape:c=`circle`,size:l,...u}=e,{getPrefixCls:d}=S.useContext(oi),f=d(`skeleton`,t),[p,m]=By(f),h=th(e=>l??e),g=J(f,`${f}-element`,{[`${f}-active`]:a},r?.root,n,i,p,m);return S.createElement(`div`,{className:g,style:s?.root},S.createElement(jy,{prefixCls:`${f}-avatar`,className:r?.content,style:{...s?.content,...o},shape:c,size:h,...u}))},bee=e=>{let{prefixCls:t,className:n,rootClassName:r,classNames:i,active:a,style:o,styles:s,block:c=!1,size:l,...u}=e,{getPrefixCls:d}=S.useContext(oi),f=d(`skeleton`,t),[p,m]=By(f),h=th(e=>l??e),g=J(f,`${f}-element`,{[`${f}-active`]:a,[`${f}-block`]:c},i?.root,n,r,p,m);return S.createElement(`div`,{className:g,style:s?.root},S.createElement(jy,{prefixCls:`${f}-button`,className:i?.content,style:{...s?.content,...o},size:h,...u}))},Vy=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,internalClassName:a,style:o,styles:s,active:c,children:l}=e,{getPrefixCls:u}=S.useContext(oi),d=u(`skeleton`,t),[f,p]=By(d),m=J(d,`${d}-element`,{[`${d}-active`]:c},f,r?.root,n,i,p);return S.createElement(`div`,{className:m,style:s?.root},S.createElement(`div`,{className:J(r?.content,a||`${d}-node`),style:{...s?.content,...o}},l))},xee=e=>{let{getPrefixCls:t}=S.useContext(oi),n=t(`skeleton`,e.prefixCls);return S.createElement(Vy,{...e,internalClassName:`${n}-image`},S.createElement(`svg`,{viewBox:`0 0 1098 1024`,xmlns:`http://www.w3.org/2000/svg`,className:`${n}-image-svg`},S.createElement(`title`,null,`Image placeholder`),S.createElement(`path`,{d:`M365.7 329.1q0 45.8-32 77.7t-77.7 32-77.7-32-32-77.7 32-77.6 77.7-32 77.7 32 32 77.6M951 548.6v256H146.3V694.9L329 512l91.5 91.4L713 311zm54.8-402.3H91.4q-7.4 0-12.8 5.4T73 164.6v694.8q0 7.5 5.5 12.9t12.8 5.4h914.3q7.5 0 12.9-5.4t5.4-12.9V164.6q0-7.5-5.4-12.9t-12.9-5.4m91.4 18.3v694.8q0 37.8-26.8 64.6t-64.6 26.9H91.4q-37.7 0-64.6-26.9T0 859.4V164.6q0-37.8 26.8-64.6T91.4 73h914.3q37.8 0 64.6 26.9t26.8 64.6`,className:`${n}-image-path`})))},See=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,active:a,block:o,style:s,styles:c,size:l,...u}=e,{getPrefixCls:d}=S.useContext(oi),f=d(`skeleton`,t),[p,m]=By(f),h=th(e=>l??e),g=J(f,`${f}-element`,{[`${f}-active`]:a,[`${f}-block`]:o},r?.root,n,i,p,m);return S.createElement(`div`,{className:g,style:c?.root},S.createElement(jy,{prefixCls:`${f}-input`,className:r?.content,style:{...c?.content,...s},size:h,...u}))},Cee=(e,t)=>{let{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},wee=e=>{let{prefixCls:t,className:n,style:r,rows:i=0}=e,a=Array.from({length:i}).map((t,n)=>S.createElement(`li`,{key:n,style:{width:Cee(n,e)}}));return S.createElement(`ul`,{className:J(t,n),style:r},a)},Tee=({prefixCls:e,className:t,width:n,style:r})=>S.createElement(`h3`,{className:J(e,t),style:{width:n,...r}});function Hy(e){return hd(e)?e:{}}function Eee(e,t){return e&&!t?{size:`large`,shape:`square`}:{size:`large`,shape:`circle`}}function Dee(e,t){return!e&&t?{width:`38%`}:e&&t?{width:`50%`}:{}}function Oee(e,t){let n={};return(!e||!t)&&(n.width=`61%`),!e&&t?n.rows=3:n.rows=2,n}var Uy=e=>{let{prefixCls:t,loading:n,className:r,rootClassName:i,classNames:a,style:o,styles:s,children:c,avatar:l=!1,title:u=!0,paragraph:d=!0,active:f,round:p}=e,{getPrefixCls:m,direction:h,className:g,style:_,classNames:v,styles:y}=li(`skeleton`),b=m(`skeleton`,t),[x,C]=By(b),w={...e,avatar:l,title:u,paragraph:d},[T,E]=Fd([v,a],[y,s],{props:w});if(n||!(`loading`in e)){let e=!!l,t=!!u,n=!!d,a;if(e){let e={className:T.avatar,prefixCls:`${b}-avatar`,...Eee(t,n),...Hy(l),style:E.avatar};a=S.createElement(`div`,{className:J(T.header,`${b}-header`),style:E.header},S.createElement(jy,{...e}))}let s;if(t||n){let r;if(t){let t={className:T.title,prefixCls:`${b}-title`,...Dee(e,n),...Hy(u),style:E.title};r=S.createElement(Tee,{...t})}let i;if(n){let n={className:T.paragraph,prefixCls:`${b}-paragraph`,...Oee(e,t),...Hy(d),style:E.paragraph};i=S.createElement(wee,{...n})}s=S.createElement(`div`,{className:J(T.section,`${b}-section`),style:E.section},r,i)}let c=J(b,{[`${b}-with-avatar`]:e,[`${b}-active`]:f,[`${b}-rtl`]:h===`rtl`,[`${b}-round`]:p},T.root,g,r,i,x,C);return S.createElement(`div`,{className:c,style:{...E.root,..._,...o}},a,s)}return c??null};Uy.Button=bee,Uy.Avatar=yee,Uy.Input=See,Uy.Image=xee,Uy.Node=Vy;var Wy=Uy;function Gy(){}var kee=S.createContext({add:Gy,remove:Gy});function Ky(e){let t=S.useContext(kee),n=S.useRef(null);return In(r=>{if(r){let i=e?r.querySelector(e):r;i&&(t.add(i),n.current=i)}else t.remove(n.current)})}var qy=()=>{let{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=(0,S.useContext)($g);return S.createElement(Zg,{onClick:n,...e},t)},Jy=()=>{let{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:r,onOk:i}=(0,S.useContext)($g);return S.createElement(Zg,{...fh(n),loading:e,onClick:i,...t},r)};function Yy(e,t){return S.createElement(`span`,{className:`${e}-close-x`},t||S.createElement(Rl,{className:`${e}-close-icon`}))}var Xy=e=>{let{okText:t,okType:n=`primary`,cancelText:r,confirmLoading:i,onOk:a,onCancel:o,okButtonProps:s,cancelButtonProps:c,footer:l}=e,[u]=cd(`Modal`,od()),d=t||u?.okText,f=r||u?.cancelText,p=S.useMemo(()=>({confirmLoading:i,okButtonProps:s,cancelButtonProps:c,okTextLocale:d,cancelTextLocale:f,okType:n,onOk:a,onCancel:o}),[i,s,c,d,f,n,a,o]),m;return typeof l==`function`||l===void 0?(m=S.createElement(S.Fragment,null,S.createElement(qy,null),S.createElement(Jy,null)),typeof l==`function`&&(m=l(m,{OkBtn:Jy,CancelBtn:qy})),m=S.createElement(e_,{value:p},m)):m=l,S.createElement(Bp,{disabled:!1},m)},Aee=e=>{let{componentCls:t}=e;return{[t]:{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`}}}},jee=e=>{let{componentCls:t}=e;return{[t]:{position:`relative`,maxWidth:`100%`,minHeight:1}}},Mee=(e,t)=>{let{componentCls:n,gridColumns:r,antCls:i}=e,[a,o]=ol(i,`grid`),[,s]=ol(i,`col`),c={};for(let e=r;e>=0;e--)e===0?(c[`${n}${t}-${e}`]={display:`none`},c[`${n}-push-${e}`]={insetInlineStart:`auto`},c[`${n}-pull-${e}`]={insetInlineEnd:`auto`},c[`${n}${t}-push-${e}`]={insetInlineStart:`auto`},c[`${n}${t}-pull-${e}`]={insetInlineEnd:`auto`},c[`${n}${t}-offset-${e}`]={marginInlineStart:0},c[`${n}${t}-order-${e}`]={order:0}):(c[`${n}${t}-${e}`]=[{[a(`display`)]:`block`,display:`block`},{display:o(`display`),flex:`0 0 ${e/r*100}%`,maxWidth:`${e/r*100}%`}],c[`${n}${t}-push-${e}`]={insetInlineStart:`${e/r*100}%`},c[`${n}${t}-pull-${e}`]={insetInlineEnd:`${e/r*100}%`},c[`${n}${t}-offset-${e}`]={marginInlineStart:`${e/r*100}%`},c[`${n}${t}-order-${e}`]={order:e});return c[`${n}${t}-flex`]={flex:s(`${t.replace(/-/,``)}-flex`)},c},Zy=(e,t)=>Mee(e,t),Nee=(e,t,n)=>({[`@media (min-width: ${Y(t)})`]:{...Zy(e,n)}}),Pee=()=>({}),Fee=()=>({}),Iee=rl(`Grid`,Aee,Pee),Qy=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin,xxxl:e.screenXXXLMin}),$y=rl(`Grid`,e=>{let t=gs(e,{gridColumns:24}),n=Qy(t);return delete n.xs,[jee(t),Zy(t,``),Zy(t,`-xs`),Object.keys(n).map(e=>Nee(t,n[e],`-${e}`)).reduce((e,t)=>({...e,...t}),{})]},Fee);function eb(e){return{position:e,inset:0}}var tb=e=>{let{componentCls:t,antCls:n}=e;return[{[`${t}-root`]:{[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]:{transform:`none`,opacity:0,animationDuration:e.motionDurationSlow,userSelect:`none`},[`${t}${n}-zoom-leave ${t}-container`]:{pointerEvents:`none`},[`${t}-mask`]:{...eb(`fixed`),zIndex:e.zIndexPopupBase,height:`100%`,backgroundColor:e.colorBgMask,pointerEvents:`none`,[`&${t}-mask-blur`]:{backdropFilter:`blur(4px)`},[`${t}-hidden`]:{display:`none`}},[`${t}-wrap`]:{...eb(`fixed`),zIndex:e.zIndexPopupBase,overflow:`auto`,outline:0,WebkitOverflowScrolling:`touch`}}},{[`${t}-root`]:wh(e)}]},nb=e=>{let{componentCls:t,motionDurationMid:n}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:`rtl`},[`${t}-centered`]:{textAlign:`center`,"&::before":{display:`inline-block`,width:0,height:`100%`,verticalAlign:`middle`,content:`""`},[t]:{top:0,display:`inline-block`,paddingBottom:0,textAlign:`start`,verticalAlign:`middle`}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:`calc(100vw - 16px)`,margin:`${Y(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:{...Jc(e),pointerEvents:`none`,position:`relative`,top:100,width:`auto`,maxWidth:`calc(100vw - ${Y(e.calc(e.margin).mul(2).equal())})`,margin:`0 auto`,"&:focus-visible":{borderRadius:e.borderRadiusLG,...Zc(e)},[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:`break-word`},[`${t}-container`]:{position:`relative`,backgroundColor:e.contentBg,backgroundClip:`padding-box`,border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:`auto`,padding:e.contentPadding},[`${t}-close`]:{position:`absolute`,top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:`none`,background:`transparent`,borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:`pointer`,transition:[`color`,`background-color`].map(e=>`${e} ${n}`).join(`, `),"&-x":{display:`flex`,fontSize:e.fontSizeLG,fontStyle:`normal`,lineHeight:Y(e.modalCloseBtnSize),justifyContent:`center`,textTransform:`none`,textRendering:`auto`},"&:disabled":{pointerEvents:`none`},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:`none`},"&:active":{backgroundColor:e.colorBgTextActive},...Qc(e)},[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:`break-word`,padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`${Y(e.margin)} auto`}},[`${t}-footer`]:{textAlign:`end`,background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:`hidden`}}},{[`${t}-pure-panel`]:{top:`auto`,padding:0,display:`flex`,flexDirection:`column`,[`${t}-container, ${t}-body, - ${t}-confirm-body-wrapper`]:{display:`flex`,flexDirection:`column`,flex:`auto`},[`${t}-confirm-body`]:{marginBottom:`auto`}}}]},ab=e=>{let{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:`rtl`,[`${t}-confirm-body`]:{direction:`rtl`}}}}},ob=e=>{let{componentCls:t}=e,n=eb(e),r={...n};delete r.xs;let i=`--${t.replace(`.`,``)}-`,a=Object.keys(r).map(e=>({[`@media (min-width: ${Y(r[e])})`]:{width:`var(${i}${e}-width)`}}));return{[`${t}-root`]:{[t]:[].concat(Zr(Object.keys(n).map((e,t)=>{let r=Object.keys(n)[t-1];return r?{[`${i}${e}-width`]:`var(${i}${r}-width)`}:null})),[{width:`var(${i}xs-width)`}],Zr(a))}}},sb=e=>{let t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return gs(e,{modalHeaderHeight:e.calc(e.calc(r).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},cb=e=>({footerBg:`transparent`,headerBg:`transparent`,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${Y(e.paddingMD)} ${Y(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${Y(e.padding)} ${Y(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:`none`,headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${Y(e.paddingXS)} ${Y(e.padding)}`:0,footerBorderTop:e.wireframe?`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:`none`,footerBorderRadius:e.wireframe?`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${Y(e.padding*2)} ${Y(e.padding*2)} ${Y(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM,mask:!0}),lb=rl(`Modal`,e=>{let t=sb(e);return[ib(t),ab(t),rb(t),rg(t,`zoom`),ob(t)]},cb,{unitless:{titleLineHeight:!0}}),ub;ky()&&document.documentElement.addEventListener(`click`,e=>{ub={x:e.pageX,y:e.pageY},setTimeout(()=>{ub=null},100)},!0);var db=e=>{let{prefixCls:t,className:n,rootClassName:r,open:i,wrapClassName:a,centered:o,getContainer:s,style:c,width:l=520,footer:u,classNames:d,styles:f,children:p,loading:m,confirmLoading:h,zIndex:g,mousePosition:_,onOk:v,onCancel:y,okButtonProps:b,cancelButtonProps:x,destroyOnHidden:C,destroyOnClose:w,panelRef:T=null,closable:E,mask:D,modalRender:O,maskClosable:k,focusTriggerAfterClose:A,focusable:j,...M}=e,{getPopupContainer:N,getPrefixCls:P,direction:F,className:I,style:L,classNames:R,styles:z,centered:B,cancelButtonProps:V,okButtonProps:H,mask:U}=li(`modal`),{modal:W}=S.useContext(oi),[ee,te]=S.useMemo(()=>typeof E==`boolean`?[void 0,void 0]:[E?.afterClose,E?.onClose],[E]),ne=P(`modal`,t),re=P(),[ie,ae,G]=Od(D,U,ne,k),oe=Ay(j,ie,A),K=e=>{h||(y?.(e),te?.())},se=e=>{v?.(e),te?.()},ce=bf(ne),[q,le]=lb(ne,ce),ue=J(a,{[`${ne}-centered`]:o??B,[`${ne}-wrap-rtl`]:F===`rtl`}),de=u!==null&&!m?S.createElement(Qy,{...e,okButtonProps:{...H,...b},onOk:se,cancelButtonProps:{...V,...x},onCancel:K}):null,[fe,pe,me,he]=Td(yd(e),yd(W),{closable:!0,closeIcon:S.createElement(Rl,{className:`${ne}-close-icon`}),closeIconRender:e=>Zy(ne,e)}),ge=fe?{disabled:me,closeIcon:pe,afterClose:ee,...he}:!1,_e=O?e=>S.createElement(`div`,{className:`${ne}-render`},O(e)):void 0,ve=$n(T,Jy(`.${ne}-${O?`render`:`container`}`)),[ye,be]=Yd(`Modal`,g),xe={...e,width:l,panelRef:T,focusTriggerAfterClose:oe.focusTriggerAfterClose,focusable:oe,mask:ie,maskClosable:G,zIndex:ye},[Se,Ce]=Fd([R,d,ae],[z,f],{props:xe}),[we,Te]=S.useMemo(()=>hd(l)?[void 0,l]:[l,void 0],[l]),Ee=S.useMemo(()=>{let e={};return Te&&Object.keys(Te).forEach(t=>{let n=Te[t];fd(n)&&(e[`--${ne}-${t}-width`]=pd(n)?`${n}px`:n)}),e},[ne,Te]);return S.createElement(Ty,{form:!0,space:!0},S.createElement(Ud.Provider,{value:be},S.createElement(M_,{width:we,...M,zIndex:ye,getContainer:s===void 0?N:s,prefixCls:ne,rootClassName:J(q,r,le,ce,Se.root),rootStyle:Ce.root,footer:de,visible:i,mousePosition:_??ub,onClose:K,closable:ge,closeIcon:pe,transitionName:Gm(re,`zoom`,e.transitionName),maskTransitionName:Gm(re,`fade`,e.maskTransitionName),mask:ie,maskClosable:G,className:J(q,n,I),style:{...L,...c,...Ee},classNames:{...Se,wrapper:J(Se.wrapper,ue)},styles:Ce,panelRef:ve,destroyOnHidden:C??w,modalRender:_e,focusTriggerAfterClose:oe.focusTriggerAfterClose,focusTrap:oe.trap},m?S.createElement(Ky,{active:!0,title:!1,paragraph:{rows:4},className:`${ne}-body-skeleton`}):p)))},fb=e=>{let{componentCls:t,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:i,fontSize:a,lineHeight:o,modalTitleHeight:s,fontHeight:c,confirmBodyPadding:l}=e,u=`${t}-confirm`;return{[u]:{"&-rtl":{direction:`rtl`},[`${e.antCls}-modal-header`]:{display:`none`},[`${u}-body-wrapper`]:{...Xc()},[`&${t} ${t}-body`]:{padding:l},[`${u}-body`]:{display:`flex`,flexWrap:`nowrap`,alignItems:`start`,[`> ${e.iconCls}`]:{flex:`none`,fontSize:i,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(c).sub(i).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(s).sub(i).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:`flex`,flexDirection:`column`,flex:`auto`,rowGap:e.marginXS,maxWidth:`calc(100% - ${Y(e.marginSM)})`},[`${u}-body-no-icon ${u}-paragraph`]:{maxWidth:`100%`},[`${e.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${Y(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${u}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:r},[`${u}-container`]:{color:e.colorText,fontSize:a,lineHeight:o},[`${u}-btns`]:{textAlign:`end`,marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${u}-error ${u}-body > ${e.iconCls}`]:{color:e.colorError},[`${u}-warning ${u}-body > ${e.iconCls}, - ${u}-confirm ${u}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${u}-info ${u}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${u}-success ${u}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},pb=al([`Modal`,`confirm`],e=>fb(sb(e)),cb,{order:-1e3}),mb=e=>{let{prefixCls:t,icon:n,okText:r,cancelText:i,confirmPrefixCls:a,type:o,okCancel:s,footer:c,locale:l,autoFocusButton:u,focusable:d,...f}=e,p=n;if(!n&&n!==null)switch(o){case`info`:p=S.createElement(Wl,null);break;case`success`:p=S.createElement(Ml,null);break;case`error`:p=S.createElement(Fl,null);break;default:p=S.createElement(Vl,null)}let m=s??o===`confirm`,h=S.useMemo(()=>{let e=d?.autoFocusButton||u;return e||e===null?e:`ok`},[u,d?.autoFocusButton]),[g]=cd(`Modal`),_=l||g,v=r||(m?_?.okText:_?.justOkText),y=i||_?.cancelText,{closable:b}=f,{onClose:x}=hd(b)?b:{},C=S.useMemo(()=>({autoFocusButton:h,cancelTextLocale:y,okTextLocale:v,mergedOkCancel:m,onClose:x,...f}),[h,y,v,m,x,f]),w=S.createElement(S.Fragment,null,S.createElement(t_,null),S.createElement(n_,null)),T=fd(e.title)&&e.title!==``,E=fd(p),D=`${a}-body`;return S.createElement(`div`,{className:`${a}-body-wrapper`},S.createElement(`div`,{className:J(D,{[`${D}-has-title`]:T,[`${D}-no-icon`]:!E})},p,S.createElement(`div`,{className:`${a}-paragraph`},T&&S.createElement(`span`,{className:`${a}-title`},e.title),S.createElement(`div`,{className:`${a}-content`},e.content))),c===void 0||typeof c==`function`?S.createElement(e_,{value:C},S.createElement(`div`,{className:`${a}-btns`},typeof c==`function`?c(w,{OkBtn:n_,CancelBtn:t_}):w)):c,S.createElement(pb,{prefixCls:t}))},hb=e=>{let{close:t,zIndex:n,maskStyle:r,direction:i,prefixCls:a,wrapClassName:o,rootPrefixCls:s,bodyStyle:c,closable:l=!1,onConfirm:u,styles:d,title:f,mask:p,maskClosable:m,okButtonProps:h,cancelButtonProps:g}=e,{cancelButtonProps:_,okButtonProps:v}=li(`modal`),y=`${a}-confirm`,b=e.width||416,x=e.style||{},C=J(y,`${y}-${e.type}`,{[`${y}-rtl`]:i===`rtl`},e.className),w=S.useMemo(()=>{let e=Dd(p,m);return e.closable??=!1,e},[p,m]),[,T]=Kc(),E=S.useMemo(()=>n===void 0?T.zIndexPopupBase+Gd:n,[n,T]);return S.createElement(db,{...e,className:C,wrapClassName:J({[`${y}-centered`]:!!e.centered},o),onCancel:()=>{t?.({triggerCancel:!0}),u?.(!1)},title:f,footer:null,transitionName:Gm(s||``,`zoom`,e.transitionName),maskTransitionName:Gm(s||``,`fade`,e.maskTransitionName),mask:w,style:x,styles:{body:c,mask:r,...d},width:b,zIndex:E,closable:l},S.createElement(mb,{...e,confirmPrefixCls:y,okButtonProps:{...v,...h},cancelButtonProps:{..._,...g}}))},gb=e=>{let{rootPrefixCls:t,iconPrefixCls:n,direction:r,theme:i}=e;return S.createElement(am,{prefixCls:t,iconPrefixCls:n,direction:r,theme:i},S.createElement(hb,{...e}))},_b=[],vb=``;function yb(){return vb}var bb=e=>{let{prefixCls:t,getContainer:n,direction:r}=e,i=od(),a=(0,S.useContext)(oi),o=yb()||a.getPrefixCls(),s=t||`${o}-modal`,c=n;return c===!1&&(c=void 0),S.createElement(gb,{...e,rootPrefixCls:o,prefixCls:s,iconPrefixCls:a.iconPrefixCls,theme:a.theme,direction:r??a.direction,locale:a.locale?.Modal??i,getContainer:c})};function xb(e){let t=rm(),n=document.createDocumentFragment(),r={...e,close:s,open:!0},i;function a(...t){t.some(e=>e?.triggerCancel)&&e.onCancel?.(()=>{},...t.slice(1));for(let e=0;e<_b.length;e++)if(_b[e]===s){_b.splice(e,1);break}Rm(n).then(()=>{})}let o=e=>{clearTimeout(i),i=setTimeout(()=>{let r=t.getPrefixCls(void 0,yb()),i=t.getIconPrefixCls(),a=t.getTheme(),o=S.createElement(bb,{...e});Lm(S.createElement(am,{prefixCls:r,iconPrefixCls:i,theme:a},typeof t.holderRender==`function`?t.holderRender(o):o),n)})};function s(...t){r={...r,open:!1,afterClose:()=>{typeof e.afterClose==`function`&&e.afterClose(),a.apply(this,t)}},o(r)}function c(e){r=typeof e==`function`?e(r):{...r,...e},o(r)}return o(r),_b.push(s),{destroy:s,update:c}}function Sb(e){return{...e,type:`warning`}}function Cb(e){return{...e,type:`info`}}function wb(e){return{...e,type:`success`}}function Tb(e){return{...e,type:`error`}}function Eb(e){return{...e,type:`confirm`}}function Db({rootPrefixCls:e}){vb=e}var Ob=S.forwardRef((e,t)=>{let{afterClose:n,config:r,...i}=e,[a,o]=S.useState(!0),[s,c]=S.useState(r),{direction:l,getPrefixCls:u}=S.useContext(oi),d=u(`modal`),f=u(),p=()=>{n(),s.afterClose?.()},m=(...e)=>{o(!1),e.some(e=>e?.triggerCancel)&&s.onCancel?.(()=>{},...e.slice(1))};S.useImperativeHandle(t,()=>({destroy:m,update:e=>{c(t=>{let n=typeof e==`function`?e(t):e;return{...t,...n}})}}));let h=s.okCancel??s.type===`confirm`,[g]=cd(`Modal`,td.Modal);return S.createElement(gb,{prefixCls:d,rootPrefixCls:f,...s,close:m,open:a,afterClose:p,okText:s.okText||(h?g?.okText:g?.justOkText),direction:s.direction||l,cancelText:s.cancelText||g?.cancelText,...i})}),kb=0,Ab=S.memo(S.forwardRef((e,t)=>{let[n,r]=zd();return S.useImperativeHandle(t,()=>({patchElement:r}),[r]),S.createElement(S.Fragment,null,n)}));function jb(){let e=S.useRef(null),[t,n]=S.useState([]);S.useEffect(()=>{t.length&&(Zr(t).forEach(e=>{e()}),n([]))},[t]);let r=S.useCallback(t=>function(r){kb+=1;let i=S.createRef(),a,o=new Promise(e=>{a=e}),s=!1,c,l=S.createElement(Ob,{key:`modal-${kb}`,config:t(r),ref:i,afterClose:()=>{c?.()},isSilent:()=>s,onConfirm:e=>{a(e)}});return c=e.current?.patchElement(l),c&&_b.push(c),{destroy:()=>{function e(){i.current?.destroy()}i.current?e():n(t=>[].concat(Zr(t),[e]))},update:e=>{function t(){i.current?.update(e)}i.current?t():n(e=>[].concat(Zr(e),[t]))},then:e=>(s=!0,o.then(e))}},[]);return[S.useMemo(()=>({info:r(Cb),success:r(wb),error:r(Tb),warning:r(Sb),confirm:r(Eb)}),[r]),S.createElement(Ab,{key:`modal-holder`,ref:e})]}var Mb=e=>{let{componentCls:t,notificationMarginEdge:n,animationMaxHeight:r}=e,i=`${t}-notice`,a=new Lo(`antNotificationFadeIn`,{"0%":{transform:`translate3d(100%, 0, 0)`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,opacity:1}}),o=new Lo(`antNotificationTopFadeIn`,{"0%":{top:-r,opacity:0},"100%":{top:0,opacity:1}}),s=new Lo(`antNotificationBottomFadeIn`,{"0%":{bottom:e.calc(r).mul(-1).equal(),opacity:0},"100%":{bottom:0,opacity:1}}),c=new Lo(`antNotificationLeftFadeIn`,{"0%":{transform:`translate3d(-100%, 0, 0)`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,opacity:1}});return{[t]:{[`&${t}-top, &${t}-bottom`]:{marginInline:0,[i]:{marginInline:`auto auto`}},[`&${t}-top`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:o}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:s}},[`&${t}-topRight, &${t}-bottomRight`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:a}},[`&${t}-topLeft, &${t}-bottomLeft`]:{marginRight:{value:0,_skip_check_:!0},marginLeft:{value:n,_skip_check_:!0},[i]:{marginInlineEnd:`auto`,marginInlineStart:0},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:c}}}}},Fee=[`top`,`topLeft`,`topRight`,`bottom`,`bottomLeft`,`bottomRight`],Nb={topLeft:`left`,topRight:`right`,bottomLeft:`left`,bottomRight:`right`,top:`left`,bottom:`left`},Pb=(e,t)=>{let{componentCls:n}=e;return{[`${n}-${t}`]:{[`&${n}-stack > ${n}-notice-wrapper`]:{[t.startsWith(`top`)?`top`:`bottom`]:0,[Nb[t]]:{value:0,_skip_check_:!0}}}}},Fb=e=>{let t={};for(let n=1;n ${e.componentCls}-notice`]:{opacity:0,transition:`opacity ${e.motionDurationMid}`}};return{[`&:not(:nth-last-child(-n+${e.notificationStackLayer}))`]:{opacity:0,overflow:`hidden`,color:`transparent`,pointerEvents:`none`},...t}},Ib=e=>{let t={};for(let n=1;n{let{componentCls:t}=e;return{[`${t}-stack`]:{[`& > ${t}-notice-wrapper`]:{transition:`transform ${e.motionDurationSlow}, backdrop-filter 0s`,willChange:`transform, opacity`,position:`absolute`,...Fb(e)}},[`${t}-stack:not(${t}-stack-expanded)`]:{[`& > ${t}-notice-wrapper`]:{...Ib(e)}},[`${t}-stack${t}-stack-expanded`]:{[`& > ${t}-notice-wrapper`]:{"&:not(:nth-last-child(-n + 1))":{opacity:1,overflow:`unset`,color:`inherit`,pointerEvents:`auto`,[`& > ${e.componentCls}-notice`]:{opacity:1}},"&:after":{content:`""`,position:`absolute`,height:e.margin,width:`100%`,insetInline:0,bottom:e.calc(e.margin).mul(-1).equal(),background:`transparent`,pointerEvents:`auto`}}},...Fee.map(t=>Pb(e,t)).reduce((e,t)=>({...e,...t}),{})}},Rb=e=>{let{iconCls:t,componentCls:n,boxShadow:r,fontSizeLG:i,notificationMarginBottom:a,borderRadiusLG:o,colorSuccess:s,colorInfo:c,colorWarning:l,colorError:u,colorTextHeading:d,notificationBg:f,notificationPadding:p,notificationMarginEdge:m,progressBg:h,notificationProgressHeight:g,fontSize:_,lineHeight:v,width:y,notificationIconSize:b,colorText:x,colorSuccessBg:S,colorErrorBg:C,colorInfoBg:w,colorWarningBg:T,motionDurationMid:E}=e,D=`${n}-notice`;return{position:`relative`,marginBottom:a,marginInlineStart:`auto`,background:f,borderRadius:o,boxShadow:r,[D]:{padding:p,width:y,maxWidth:`calc(100vw - ${Y(e.calc(m).mul(2).equal())})`,lineHeight:v,wordWrap:`break-word`,borderRadius:o,overflow:`hidden`,"&-success":S?{background:S}:{},"&-error":C?{background:C}:{},"&-info":w?{background:w}:{},"&-warning":T?{background:T}:{}},[`${D}-title`]:{marginBottom:e.marginXS,color:d,fontSize:i,lineHeight:e.lineHeightLG},[`${D}-description`]:{fontSize:_,color:x,marginTop:e.marginXS,"&:first-child":{marginTop:0,marginInlineEnd:e.marginSM}},[`${D}-closable ${D}-title`]:{paddingInlineEnd:e.paddingLG},[`${D}-with-icon ${D}-title`]:{marginBottom:e.marginXS,marginInlineStart:e.calc(e.marginSM).add(b).equal(),fontSize:i},[`${D}-with-icon ${D}-description`]:{marginInlineStart:e.calc(e.marginSM).add(b).equal(),fontSize:_},[`${D}-icon`]:{position:`absolute`,fontSize:b,lineHeight:1,[`&-success${t}`]:{color:s},[`&-info${t}`]:{color:c},[`&-warning${t}`]:{color:l},[`&-error${t}`]:{color:u}},[`${D}-close`]:{position:`absolute`,top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:`none`,width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:[`color`,`background-color`].map(e=>`${e} ${E}`).join(`, `),display:`flex`,alignItems:`center`,justifyContent:`center`,background:`none`,border:`none`,"&:hover":{color:e.colorIconHover,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},...Qc(e)},[`${D}-progress`]:{position:`absolute`,display:`block`,appearance:`none`,inlineSize:`calc(100% - ${Y(o)} * 2)`,left:{_skip_check_:!0,value:o},right:{_skip_check_:!0,value:o},bottom:0,blockSize:g,border:0,"&, &::-webkit-progress-bar":{borderRadius:o,backgroundColor:`rgba(0, 0, 0, 0.04)`},"&::-moz-progress-bar":{background:h},"&::-webkit-progress-value":{borderRadius:o,background:h}},[`${D}-actions`]:{float:`right`,marginTop:e.marginSM}}},zb=e=>{let{componentCls:t,notificationMarginBottom:n,notificationMarginEdge:r,motionDurationMid:i,motionEaseInOut:a}=e,o=`${t}-notice`,s=new Lo(`antNotificationFadeOut`,{"0%":{maxHeight:e.animationMaxHeight,marginBottom:n},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[t]:{...Jc(e),position:`fixed`,zIndex:e.zIndexPopup,marginRight:{value:r,_skip_check_:!0},[`${t}-hook-holder`]:{position:`relative`},[`${t}-fade-appear-prepare`]:{opacity:`0 !important`},[`${t}-fade-enter, ${t}-fade-appear`]:{animationDuration:e.motionDurationMid,animationTimingFunction:a,animationFillMode:`both`,opacity:0,animationPlayState:`paused`},[`${t}-fade-leave`]:{animationTimingFunction:a,animationFillMode:`both`,animationDuration:i,animationPlayState:`paused`},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationPlayState:`running`},[`${t}-fade-leave${t}-fade-leave-active`]:{animationName:s,animationPlayState:`running`},"&-rtl":{direction:`rtl`,[`${o}-actions`]:{float:`left`}}}},{[t]:{[`${o}-wrapper`]:Rb(e)}}]},Bb=e=>({zIndexPopup:e.zIndexPopupBase+Gd+50,width:384,progressBg:`linear-gradient(90deg, ${e.colorPrimaryBorderHover}, ${e.colorPrimary})`,colorSuccessBg:void 0,colorErrorBg:void 0,colorInfoBg:void 0,colorWarningBg:void 0}),Vb=e=>{let t=e.paddingMD,n=e.paddingLG;return gs(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationIconSize:e.calc(e.fontSizeLG).mul(e.lineHeightLG).equal(),notificationCloseButtonSize:e.calc(e.controlHeightLG).mul(.55).equal(),notificationMarginBottom:e.margin,notificationPadding:`${Y(e.paddingMD)} ${Y(e.paddingContentHorizontalLG)}`,notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationStackLayer:3,notificationProgressHeight:2})},Hb=rl(`Notification`,e=>{let t=Vb(e);return[zb(t),Mb(t),Lb(t)]},Bb);function Ub(e,t){return t===null||t===!1?null:t||S.createElement(Rl,{className:`${e}-close-icon`})}var Wb={success:Ml,info:Wl,error:Fl,warning:Vl},Gb=e=>{let{prefixCls:t,icon:n,type:r,title:i,description:a,actions:o,role:s=`alert`,styles:c,classNames:l}=e,u=null;return n?u=S.createElement(`span`,{className:J(`${t}-icon`,l.icon),style:c.icon},n):r&&(u=S.createElement(Wb[r]||null,{className:J(`${t}-icon`,l.icon,`${t}-icon-${r}`),style:c.icon})),S.createElement(`div`,{className:J({[`${t}-with-icon`]:u}),role:s},u,i&&S.createElement(`div`,{className:J(`${t}-title`,l.title),style:c.title},i),a&&S.createElement(`div`,{className:J(`${t}-description`,l.description),style:c.description},a),o&&S.createElement(`div`,{className:J(`${t}-actions`,l.actions),style:c.actions},o))};function Kb(e,t,n){let r;switch(e){case`top`:r={left:`50%`,transform:`translateX(-50%)`,right:`auto`,top:t,bottom:`auto`};break;case`topLeft`:r={left:0,top:t,bottom:`auto`};break;case`topRight`:r={right:0,top:t,bottom:`auto`};break;case`bottom`:r={left:`50%`,transform:`translateX(-50%)`,right:`auto`,top:`auto`,bottom:n};break;case`bottomLeft`:r={left:0,top:`auto`,bottom:n};break;default:r={right:0,top:`auto`,bottom:n};break}return r}function qb(e){return{motionName:`${e}-fade`}}function Jb(e,t,n){return e===void 0?t?.closeIcon===void 0?n?.closeIcon:t.closeIcon:e}var Yb=24,Xb=4.5,Zb=`topRight`,Qb=({children:e,prefixCls:t})=>{let n=bf(t),[r,i]=Hb(t,n);return S.createElement(um,{classNames:{list:J(r,i,n)}},e)},$b=(e,{prefixCls:t,key:n})=>S.createElement(Qb,{prefixCls:t,key:n},e),ex=S.forwardRef((e,t)=>{let{top:n,bottom:r,prefixCls:i,getContainer:a,maxCount:o,rtl:s,onAllRemoved:c,stack:l,duration:u=Xb,pauseOnHover:d=!0,showProgress:f}=e,{getPrefixCls:p,getPopupContainer:m,direction:h}=li(`notification`),{notification:g}=(0,S.useContext)(oi),[,_]=Kc(),v=i||p(`notification`),y=(0,S.useMemo)(()=>pd(u)&&u>0?u:!1,[u]),[b,x]=vm({prefixCls:v,style:e=>Kb(e,n??Yb,r??Yb),className:()=>J({[`${v}-rtl`]:s??h===`rtl`}),motion:()=>qb(v),closable:{closeIcon:Ub(v)},duration:y,getContainer:()=>a?.()||m?.()||document.body,maxCount:o,pauseOnHover:d,showProgress:f,onAllRemoved:c,renderNotifications:$b,stack:l===!1?!1:{threshold:hd(l)?l?.threshold:void 0,offset:8,gap:_.margin}}),[C,w]=Fd([g?.classNames,e?.classNames],[g?.styles,e?.styles],{props:e});return S.useImperativeHandle(t,()=>({...b,prefixCls:v,notification:g,classNames:C,styles:w})),x});function tx(e){let t=S.useRef(null);Dr(`Notification`);let{notification:n}=S.useContext(oi);return[S.useMemo(()=>{let r=r=>{if(!t.current)return;let{open:i,prefixCls:a,notification:o,classNames:s,styles:c}=t.current,l=o?.className||{},u=o?.style||{},d=`${a}-notice`,{title:f,message:p,description:m,icon:h,type:g,btn:_,actions:v,className:y,style:b,role:x=`alert`,closeIcon:C,closable:w,classNames:T={},styles:E={},...D}=r,O=f??p,k=v??_,A=Ub(d,Jb(C,e,o)),[j,M,,N]=wd(yd({...e||{},...r}),yd(n),{closable:!0,closeIcon:A}),P=j?{onClose:hd(w)?w.onClose:void 0,closeIcon:M,...N}:!1,F=Pd(T,{props:r}),I=Pd(E,{props:r}),L=kd(void 0,s,F),R=jd(c,I);return i({placement:e?.placement??Zb,...D,content:S.createElement(Gb,{prefixCls:d,icon:h,type:g,title:O,description:m,actions:k,role:x,classNames:L,styles:R}),className:J({[`${d}-${g}`]:g},y,l,L.root),style:{...u,...R.root,...b},closable:P})},i={open:r,destroy:e=>{e===void 0?t.current?.destroy():t.current?.close(e)}};return[`success`,`info`,`warning`,`error`].forEach(e=>{i[e]=t=>r({...t,type:e})}),i},[e,n]),S.createElement(ex,{key:`notification-holder`,...e,ref:t})]}function nx(e){return tx(e)}var rx=S.createContext({}),ix=S.createContext({message:{},notification:{},modal:{}}),ax=rl(`App`,e=>{let{componentCls:t,colorText:n,fontSize:r,lineHeight:i,fontFamily:a}=e;return{[t]:{color:n,fontSize:r,lineHeight:i,fontFamily:a,[`&${t}-rtl`]:{direction:`rtl`}}}},()=>({})),ox=e=>{let{prefixCls:t,children:n,className:r,rootClassName:i,message:a,notification:o,style:s,component:c=`div`}=e,{direction:l,getPrefixCls:u,className:d,style:f}=li(`app`),p=u(`app`,t),[m,h]=ax(p),g=J(m,p,r,i,h,{[`${p}-rtl`]:l===`rtl`}),_=(0,S.useContext)(rx),v=S.useMemo(()=>({message:{..._.message,...a},notification:{..._.notification,...o}}),[a,o,_.message,_.notification]),[y,b]=Fm(v.message),[x,C]=nx(v.notification),[w,T]=jb(),E=S.useMemo(()=>({message:y,notification:x,modal:w}),[y,x,w]);Dr(`App`)(!(h&&c===!1),`usage`,"When using cssVar, ensure `component` is assigned a valid React component string.");let D=c===!1?S.Fragment:c,O={className:J(d,g),style:{...f,...s}};return S.createElement(ix.Provider,{value:E},S.createElement(rx.Provider,{value:v},S.createElement(D,{...c===!1?void 0:O},T,b,C,n)))},sx=()=>S.useContext(ix),cx=ox;cx.useApp=sx;function lx(e){return t=>S.createElement(am,{theme:{token:{motion:!1,zIndexPopupBase:0}}},S.createElement(e,{...t}))}var ux=(e,t,n,r,i)=>lx(a=>{let{prefixCls:o,style:s}=a,c=S.useRef(null),[l,u]=S.useState(0),[d,f]=S.useState(0),[p,m]=Hn(!1,a.open),{getPrefixCls:h}=S.useContext(oi),g=h(r||`select`,o);S.useEffect(()=>{if(m(!0),typeof ResizeObserver<`u`){let e=new ResizeObserver(e=>{let t=e[0].target;u(t.offsetHeight+8),f(t.offsetWidth)}),t=setInterval(()=>{let n=i?`.${i(g)}`:`.${g}-dropdown`,r=c.current?.querySelector(n);r&&(clearInterval(t),e.observe(r))},10);return()=>{clearInterval(t),e.disconnect()}}},[g]);let _={...a,style:{...s,margin:0},open:p,getPopupContainer:()=>c.current};n&&(_=n(_)),t&&(_={..._,[t]:{overflow:{adjustX:!1,adjustY:!1}}});let v={paddingBottom:l,position:`relative`,minWidth:d};return S.createElement(`div`,{ref:c,style:v},S.createElement(e,{..._}))}),dx=(e,t,n,r,i=!1,a,o)=>{let s=(0,S.useMemo)(()=>typeof n==`boolean`?{allowClear:n}:n&&typeof n==`object`?n:{allowClear:!1},[n]);return(0,S.useMemo)(()=>{let e=!i&&s.allowClear!==!1&&(t.length||a)&&!(o===`combobox`&&a===``);return{allowClear:e,clearIcon:e?s.clearIcon||r||`×`:null}},[s,r,i,t.length,a,o])},fx=S.createContext(null);function px(){return S.useContext(fx)}function mx(e=250){let t=S.useRef(null),n=S.useRef(null);S.useEffect(()=>()=>{window.clearTimeout(n.current)},[]);function r(r){(r||t.current===null)&&(t.current=r),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current=null},e)}return[()=>t.current,r]}function hx(e,t){return e.filter(e=>e).some(e=>e.contains(t)||e===t)}function gx(e,t,n,r){let i=In(i=>{if(r)return;let a=i.target;a.shadowRoot&&i.composed&&(a=i.composedPath()[0]||a),i._ori_target&&(a=i._ori_target),t&&!hx(e(),a)&&n(!1)});S.useEffect(()=>(window.addEventListener(`mousedown`,i),()=>window.removeEventListener(`mousedown`,i)),[i])}function _x(){return _x=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let t=e===!0?0:1;return{bottomLeft:{points:[`tl`,`bl`],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},bottomRight:{points:[`tr`,`br`],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},topLeft:{points:[`bl`,`tl`],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},topRight:{points:[`br`,`tr`],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`}}},yx=S.forwardRef((e,t)=>{let{prefixCls:n,disabled:r,visible:i,children:a,popupElement:o,animation:s,transitionName:c,popupStyle:l,popupClassName:u,direction:d=`ltr`,placement:f,builtinPlacements:p,popupMatchSelectWidth:m,popupRender:h,popupAlign:g,getPopupContainer:_,empty:v,onPopupVisibleChange:y,onPopupMouseEnter:b,onPopupMouseDown:x,onPopupBlur:C,...w}=e,T=`${n}-dropdown`,E=o;h&&(E=h(o));let D=S.useMemo(()=>p||vx(m),[p,m]),O=s?`${T}-${s}`:c,k=typeof m==`number`,A=S.useMemo(()=>k?null:m===!1?`minWidth`:`width`,[m,k]),j=l;k&&(j={...l,width:m});let M=S.useRef(null);return S.useImperativeHandle(t,()=>({getPopupElement:()=>M.current?.popupElement})),S.createElement(jp,_x({},w,{showAction:y?[`click`]:[],hideAction:y?[`click`]:[],popupPlacement:f||(d===`rtl`?`bottomRight`:`bottomLeft`),builtinPlacements:D,prefixCls:T,popupMotion:{motionName:O},popup:S.createElement(`div`,{onMouseEnter:b,onMouseDown:x,onBlur:C},E),ref:M,stretch:A,popupAlign:g,popupVisible:i,getPopupContainer:_,popupClassName:J(u,{[`${T}-empty`]:v}),popupStyle:j,onPopupVisibleChange:y}),a)});function bx(e,t){let{key:n}=e,r;return`value`in e&&({value:r}=e),n??(r===void 0?`rc-index-key-${t}`:r)}function xx(e){return e!==void 0&&!Number.isNaN(e)}function Sx(e,t){let{label:n,value:r,options:i,groupLabel:a}=e||{},o=n||(t?`children`:`label`);return{label:o,value:r||`value`,options:i||`options`,groupLabel:a||o}}function Iee(e,{fieldNames:t,childrenAsData:n}={}){let r=[],{label:i,value:a,options:o,groupLabel:s}=Sx(t,!1);function c(e,t){Array.isArray(e)&&e.forEach(e=>{if(t||!(o in e)){let n=e[a];r.push({key:bx(e,r.length),groupOption:t,data:e,label:e[i],value:n})}else{let t=e[s];t===void 0&&n&&(t=e.label),r.push({key:bx(e,r.length),group:!0,data:e,label:t}),c(e[o],!0)}})}return c(e,!1),r}function Cx(e){let t={...e};return`props`in t||Object.defineProperty(t,`props`,{get(){return br(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var Lee=(e,t,n)=>{if(!t||!t.length)return null;let r=!1,i=(e,[t,...n])=>{if(!t)return[e];let a=e.split(t);return r||=a.length>1,a.reduce((e,t)=>[...e,...i(t,n)],[]).filter(Boolean)},a=i(e,t);return r?n===void 0?a:a.slice(0,n):null};function wx(e){let{visible:t,values:n}=e;return t?S.createElement(`span`,{"aria-live":`polite`,style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},`${n.slice(0,50).map(({label:e,value:t})=>[`number`,`string`].includes(typeof e)?e:t).join(`, `)}`,n.length>50?`, ...`:null):null}var Tx=e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},Ex=(e,t=1)=>{if(t<=0){e();return}Tx(()=>{Ex(e,t-1)})};function Dx(e,t,n,r){let[i,a]=(0,S.useState)(!1);(0,S.useEffect)(()=>{a(!0)},[]);let[o,s]=Hn(e,t),[c,l]=(0,S.useState)(!1),u=i?o:!1,d=r(u),f=(0,S.useRef)(0),p=In(e=>{n&&d!==e&&n(e),s(e)});return[u,d,In((e,t={})=>{let{cancelFun:n}=t;f.current+=1;let r=f.current,i=typeof e==`boolean`?e:!d;l(!i);function a(){r===f.current&&!n?.()&&(p(i),l(!1))}i?a():Ex(()=>{a()})}),c]}function Ox(e){let{children:t,...n}=e;return t?S.createElement(`div`,n,t):null}var kx=S.createContext(null);function Ax(){return S.useContext(kx)}var jx=S.forwardRef((e,t)=>{let{onChange:n,onKeyDown:r,onBlur:i,style:a,syncWidth:o,value:s,className:c,autoComplete:l,...u}=e,{prefixCls:d,mode:f,onSearch:p,onSearchSubmit:m,onInputBlur:h,autoFocus:g,tokenWithEnter:_,placeholder:v,components:{input:y=`input`}}=Ax(),{id:b,classNames:x,styles:C,open:w,activeDescendantId:T,role:E,disabled:D}=px()||{},O=J(`${d}-input`,x?.input,c),k=S.useRef(!1),A=S.useRef(null),j=S.useRef(null);S.useImperativeHandle(t,()=>j.current);let M=e=>{let{value:t}=e.target;if(_&&A.current&&/[\r\n]/.test(A.current)){let e=A.current.replace(/[\r\n]+$/,``).replace(/\r\n/g,` `).replace(/[\r\n]/g,` `);t=t.replace(e,A.current)}A.current=null,p&&p(t,!0,k.current),n?.(e)},N=e=>{let{key:t}=e,{value:n}=e.currentTarget;t===`Enter`&&f===`tags`&&!w&&!k.current&&m&&m(n),r?.(e)},P=e=>{h?.(),i?.(e)},F=()=>{k.current=!0},I=e=>{if(k.current=!1,f!==`combobox`){let{value:t}=e.currentTarget;p?.(t,!0,!1)}},L=e=>{let{clipboardData:t}=e;A.current=t?.getData(`text`)||``},[R,z]=S.useState(void 0);zn(()=>{let e=j.current;if(o&&e){e.style.width=`0px`;let t=e.scrollWidth;z(t),e.style.width=``}},[o,s]);let B={id:b,type:f===`combobox`?`text`:`search`,...u,ref:j,style:{...C?.input,...a,"--select-input-width":R},autoFocus:g,autoComplete:l||`off`,className:O,disabled:D,value:s||``,onChange:M,onKeyDown:N,onBlur:P,onPaste:L,onCompositionStart:F,onCompositionEnd:I,role:E||`combobox`,"aria-expanded":w||!1,"aria-haspopup":`listbox`,"aria-owns":w?`${b}_list`:void 0,"aria-autocomplete":`list`,"aria-controls":w?`${b}_list`:void 0,"aria-activedescendant":w?T:void 0};if(S.isValidElement(y)){let t=y.props||{},n={placeholder:e.placeholder||v,...B,...t};return Object.keys(t).forEach(e=>{let r=t[e];typeof r==`function`&&(n[e]=(...t)=>{r(...t),B[e]?.(...t)})}),n.ref=$n(y.ref,B.ref),S.cloneElement(y,n)}let V=y;return S.createElement(V,B)});function Mx(e){let{prefixCls:t,placeholder:n,displayValues:r}=Ax(),{classNames:i,styles:a}=px(),{show:o=!0}=e;return r.length?null:S.createElement(`div`,{className:J(`${t}-placeholder`,i?.placeholder),style:{visibility:o?`visible`:`hidden`,...a?.placeholder}},n)}var Nx=S.createContext(null);function Px(e){return Array.isArray(e)?e:e===void 0?[]:[e]}typeof window<`u`&&window.document&&window.document.documentElement;function Fx(e){return e!=null}function Ix(e){return!e&&e!==0}function Lx(e){return[`string`,`number`].includes(typeof e)}function Rx(e){let t;return e&&(Lx(e.title)?t=e.title.toString():Lx(e.label)&&(t=e.label.toString())),t}function zx(){return zx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,searchValue:r,activeValue:i,displayValues:a,maxLength:o,mode:s,components:c}=Ax(),{triggerOpen:l,title:u,showSearch:d,classNames:f,styles:p}=px(),m=S.useContext(Nx),[h,g]=S.useState(!1),_=s===`combobox`,v=a[0],y=S.useMemo(()=>_&&i&&!h&&l?i:d?r:``,[_,i,h,l,r,d]),[b,x,C,w]=S.useMemo(()=>{let e,t,n;if(v&&m?.flattenOptions){let r=m.flattenOptions.find(e=>e.value===v.value);r?.data&&(e=r.data.className,t=r.data.style,n=Rx(r.data))}return v&&!n&&(n=Rx(v)),u!==void 0&&(n=u),[e,t,n,!!e||!!t]},[v,m?.flattenOptions,u]);S.useEffect(()=>{_&&g(!1)},[_,i]);let T=v&&v.label!==null&&v.label!==void 0&&String(v.label).trim()!==``,E=_&&c?.input?null:v?w?S.createElement(`div`,{className:J(`${n}-content-value`,b),style:{...y?{visibility:`hidden`}:{},...x},title:C},v.label):v.label:S.createElement(Mx,{show:!y});return S.createElement(`div`,{className:J(`${n}-content`,T&&`${n}-content-has-value`,y&&`${n}-content-has-search-value`,w&&`${n}-content-has-option-style`,f?.content),style:p?.content,title:w?void 0:C},E,S.createElement(jx,zx({ref:t},e,{value:y,maxLength:s===`combobox`?o:void 0,onChange:t=>{g(!0),e.onChange?.(t)}})))}),Vx=void 0;function Hx(e,t){let{prefixCls:n,invalidate:r,item:i,renderItem:a,responsive:o,responsiveDisabled:s,registerSize:c,itemKey:l,className:u,style:d,children:f,display:p,order:m,component:h=`div`,...g}=e,_=o&&!p;function v(e){c(l,e)}S.useEffect(()=>()=>{v(null)},[]);let y=a&&i!==Vx?a(i,{index:m}):f,b;r||(b={opacity:+!_,height:_?0:Vx,overflowY:_?`hidden`:Vx,order:o?m:Vx,pointerEvents:_?`none`:Vx,position:_?`absolute`:Vx});let x={};_&&(x[`aria-hidden`]=!0);let C=S.createElement(h,hg({className:J(!r&&n,u),style:{...b,...d}},x,g,{ref:t}),y);return o&&(C=S.createElement(Wr,{onResize:({offsetWidth:e})=>{v(e)},disabled:s},C)),C}var Ux=S.forwardRef(Hx);function Wx(e){if(typeof MessageChannel>`u`)ri(e);else{let t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function Gx(){let e=S.useRef(null);return t=>{e.current||(e.current=[],Wx(()=>{(0,Jf.unstable_batchedUpdates)(()=>{e.current.forEach(e=>{e()}),e.current=null})})),e.current.push(t)}}function Kx(e,t){let[n,r]=S.useState(t);return[n,In(t=>{e(()=>{r(t)})})]}var qx=S.createContext(null),Jx=S.forwardRef((e,t)=>{let n=S.useContext(qx);if(!n){let{component:n=`div`,...r}=e;return S.createElement(n,hg({},r,{ref:t}))}let{className:r,...i}=n,{className:a,...o}=e;return S.createElement(qx.Provider,{value:null},S.createElement(Ux,hg({ref:t,className:J(r,a)},i,o)))}),Yx=`responsive`,Xx=`invalidate`;function Zx(e){return`+ ${e.length} ...`}function Qx(e,t){let{prefixCls:n=`rc-overflow`,data:r=[],renderItem:i,renderRawItem:a,itemKey:o,itemWidth:s=10,ssr:c,style:l,className:u,maxCount:d,renderRest:f,renderRawRest:p,prefix:m,suffix:h,component:g=`div`,itemComponent:_,onVisibleChange:v,...y}=e,b=c===`full`,x=Gx(),[C,w]=Kx(x,null),T=C||0,[E,D]=Kx(x,new Map),[O,k]=Kx(x,0),[A,j]=Kx(x,0),[M,N]=Kx(x,0),[P,F]=Kx(x,0),[I,L]=(0,S.useState)(null),[R,z]=(0,S.useState)(null),B=S.useMemo(()=>R===null&&b?2**53-1:R||0,[R,C]),[V,H]=(0,S.useState)(!1),U=`${n}-item`,W=Math.max(O,A),ee=d===Yx,te=r.length&&ee,ne=d===Xx,re=te||typeof d==`number`&&r.length>d,ie=(0,S.useMemo)(()=>{let e=r;return te?e=C===null&&b?r:r.slice(0,Math.min(r.length,T/s)):typeof d==`number`&&(e=r.slice(0,d)),e},[r,s,C,d,te]),ae=(0,S.useMemo)(()=>te?r.slice(B+1):r.slice(ie.length),[r,ie,te,B]),G=(0,S.useCallback)((e,t)=>typeof o==`function`?o(e):(o&&e?.[o])??t,[o]),oe=(0,S.useCallback)(i||(e=>e),[i]);function K(e,t,n){R===e&&(t===void 0||t===I)||(z(e),n||(H(e{let r=new Map(n);return t===null?r.delete(e):r.set(e,t),r})}function q(e,t){j(t),k(A)}function le(e,t){N(t)}function ue(e,t){F(t)}function de(e){return E.get(G(ie[e],e))}zn(()=>{if(T&&typeof W==`number`&&ie){let e=M+P,t=ie.length,n=t-1;if(!t){K(0,null);return}for(let r=0;rT){K(r-1,e-t-P+A);break}}h&&de(0)+P>T&&L(null)}},[T,E,A,M,P,G,ie]);let fe=V&&!!ae.length,pe={};I!==null&&te&&(pe={position:`absolute`,top:0,insetInlineStart:I});let me={prefixCls:U,responsive:te,component:_,invalidate:ne},he=a?(e,t)=>{let n=G(e,t);return S.createElement(qx.Provider,{key:n,value:{...me,order:t,item:e,itemKey:n,registerSize:ce,display:t<=B}},a(e,t))}:(e,t)=>{let n=G(e,t);return S.createElement(Ux,hg({},me,{order:t,key:n,item:e,renderItem:oe,itemKey:n,registerSize:ce,display:t<=B}))},ge={order:fe?B:2**53-1,className:`${U}-rest`,registerSize:q,display:fe},_e=f||Zx,ve=p?S.createElement(qx.Provider,{value:{...me,...ge}},p(ae)):S.createElement(Ux,hg({},me,ge),typeof _e==`function`?_e(ae):_e),ye=S.createElement(g,hg({className:J(!ne&&n,u),style:l,ref:t},y),m&&S.createElement(Ux,hg({},me,{responsive:ee,responsiveDisabled:!te,order:-1,className:`${U}-prefix`,registerSize:le,display:!0}),m),ie.map(he),re?ve:null,h&&S.createElement(Ux,hg({},me,{responsive:ee,responsiveDisabled:!te,order:B,className:`${U}-suffix`,registerSize:ue,display:!0,style:pe}),h));return ee?S.createElement(Wr,{onResize:se,disabled:!te},ye):ye}var $x=S.forwardRef(Qx);$x.Item=Jx,$x.RESPONSIVE=Yx,$x.INVALIDATE=Xx;var eS=$x,tS=e=>{let{className:t,style:n,customizeIcon:r,customizeIconProps:i,children:a,onMouseDown:o,onClick:s}=e,c=typeof r==`function`?r(i):r;return S.createElement(`span`,{className:t,onMouseDown:e=>{e.preventDefault(),o?.(e)},style:{userSelect:`none`,WebkitUserSelect:`none`,...n},unselectable:`on`,onClick:s,"aria-hidden":!0},c===void 0?S.createElement(`span`,{className:J(t.split(/\s+/).map(e=>`${e}-icon`))},a):c)};function nS(){return nS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{e.preventDefault(),e.stopPropagation()},aS=S.forwardRef(function({inputProps:e},t){let{prefixCls:n,displayValues:r,searchValue:i,mode:a,onSelectorRemove:o,removeIcon:s}=Ax(),{disabled:c,showSearch:l,triggerOpen:u,rawOpen:d,toggleOpen:f,autoClearSearchValue:p,tagRender:m,maxTagPlaceholder:h,maxTagTextLength:g,maxTagCount:_,classNames:v,styles:y}=px(),b=`${n}-selection-item`,x=i;!d&&a===`multiple`&&p!==!1&&(x=``);let C=l&&x||``,w=l&&!c,T=s??`×`,E=h??(e=>`+ ${e.length} ...`),D=m,O=e=>{f(e)},k=e=>{o?.(e)},A=(e,t,n,r,i)=>S.createElement(`span`,{title:Rx(e),className:J(b,{[`${b}-disabled`]:n},v?.item),style:y?.item},S.createElement(`span`,{className:J(`${b}-content`,v?.itemContent),style:y?.itemContent},t),r&&S.createElement(tS,{className:J(`${b}-remove`,v?.itemRemove),style:y?.itemRemove,onMouseDown:iS,onClick:i,customizeIcon:T},`×`)),j=(e,t,n,r,i,a,o)=>S.createElement(`span`,{onMouseDown:e=>{iS(e),O(!u)}},D({label:t,value:e,index:o?.index,disabled:n,closable:r,onClose:i,isMaxTag:!!a}));return S.createElement(eS,{prefixCls:`${n}-content`,className:v?.content,style:y?.content,prefix:!r.length&&!C&&S.createElement(Mx,null),data:r,renderItem:(e,t)=>{let{disabled:n,label:r,value:i}=e,a=!c&&!n,o=r;if(typeof g==`number`&&(typeof r==`string`||typeof r==`number`)){let e=String(o);e.length>g&&(o=`${e.slice(0,g)}...`)}let s=t=>{t&&t.stopPropagation(),k(e)};return typeof D==`function`?j(i,o,n,a,s,void 0,t):A(e,o,n,a,s)},renderRest:e=>{if(!r.length)return null;let t=typeof E==`function`?E(e):E;return typeof D==`function`?j(void 0,t,!1,!1,void 0,!0):A({title:t},t,!1)},suffix:S.createElement(jx,nS({ref:t,disabled:c,readOnly:!w},e,{value:C||``,syncWidth:!0})),itemKey:rS,maxCount:_})}),oS=S.forwardRef(function(e,t){let{multiple:n,onInputKeyDown:r,tabIndex:i}=Ax(),a=px(),{showSearch:o}=a,s={...Vu(a,{aria:!0}),onKeyDown:r,readOnly:!o,tabIndex:i};return n?S.createElement(aS,{ref:t,inputProps:s}):S.createElement(Bx,{ref:t,inputProps:s})});function sS(e){return e&&![om.ESC,om.SHIFT,om.BACKSPACE,om.TAB,om.WIN_KEY,om.ALT,om.META,om.WIN_KEY_RIGHT,om.CTRL,om.SEMICOLON,om.EQUALS,om.CAPS_LOCK,om.CONTEXT_MENU,om.UP,om.LEFT,om.RIGHT,om.F1,om.F2,om.F3,om.F4,om.F5,om.F6,om.F7,om.F8,om.F9,om.F10,om.F11,om.F12].includes(e)}function cS(){return cS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{which:t}=e,n=F.current instanceof HTMLTextAreaElement;!n&&D&&(t===om.UP||t===om.DOWN)&&e.preventDefault(),x&&x(e),!(n&&!D&&~[om.UP,om.DOWN,om.LEFT,om.RIGHT].indexOf(t))&&!(e.ctrlKey||e.altKey||e.metaKey)&&sS(t)&&O(!0)});S.useImperativeHandle(t,()=>({focus:e=>{(F.current||P.current).focus?.(e)},blur:()=>{(F.current||P.current).blur?.()},nativeElement:kr(P.current)}));let L=In(e=>{if(!A){let t=kr(F.current);e.nativeEvent._ori_target=t;let n=t===e.target||t?.contains(e.target);t&&!n&&e.preventDefault();let r=D&&!l&&(f===`combobox`||k)||D&&l&&n;e.nativeEvent._select_lazy?D&&O(!1):(F.current?.focus(),r||O())}y?.(e)}),{root:R}=T,z=Sr(E,lS),B=Vu(z,{aria:!0}),V=Object.keys(B),H={...e,onInputKeyDown:I};if(R){let e=R.props||{},t={...e,...z};return Object.keys(e).forEach(n=>{let r=e[n],i=z[n];typeof r==`function`&&typeof i==`function`&&(t[n]=(...e)=>{i(...e),r(...e)})}),S.isValidElement(R)?S.cloneElement(R,{...t,ref:$n(R.ref,P)}):S.createElement(R,cS({},t,{ref:P}))}return S.createElement(kx.Provider,{value:H},S.createElement(`div`,cS({},Sr(z,V),{ref:P,className:r,style:i,onMouseDown:L}),S.createElement(Ox,{className:J(`${n}-prefix`,M?.prefix),style:N?.prefix},a),S.createElement(oS,{ref:F}),S.createElement(Ox,{className:J(`${n}-suffix`,{[`${n}-suffix-loading`]:j},M?.suffix),style:N?.suffix},o),s&&S.createElement(Ox,{className:J(`${n}-clear`,M?.clear),style:N?.clear,onMouseDown:e=>{e.nativeEvent._select_lazy=!0,b?.(e)}},s),c))});function dS(e,t,n){return S.useMemo(()=>{let{root:r,input:i}=e||{};return n&&(r=n()),t&&(i=t()),{root:r,input:i}},[e,t,n])}function fS(){return fS=Object.assign?Object.assign.bind():function(e){for(var t=1;te===`tags`||e===`multiple`,mS=S.forwardRef((e,t)=>{let{id:n,prefixCls:r,className:i,styles:a,classNames:o,showSearch:s,tagRender:c,showScrollBar:l=`optional`,direction:u,omitDomProps:d,displayValues:f,onDisplayValuesChange:p,emptyOptions:m,notFoundContent:h=`Not Found`,onClear:g,maxCount:_,placeholder:v,mode:y,disabled:b,loading:x,getInputElement:C,getRawInputElement:w,open:T,defaultOpen:E,onPopupVisibleChange:D,activeValue:O,onActiveValueChange:k,activeDescendantId:A,searchValue:j,autoClearSearchValue:M,onSearch:N,onSearchSplit:P,tokenSeparators:F,allowClear:I,prefix:L,suffix:R,suffixIcon:z,clearIcon:B,OptionList:V,animation:H,transitionName:U,popupStyle:W,popupClassName:ee,popupMatchSelectWidth:te,popupRender:ne,popupAlign:re,placement:ie,builtinPlacements:ae,getPopupContainer:G,showAction:oe=[],onFocus:K,onBlur:se,onKeyUp:ce,onKeyDown:q,onMouseDown:le,components:ue,...de}=e,fe=pS(y),pe=S.useRef(null),me=S.useRef(null),he=S.useRef(null),[ge,_e]=S.useState(!1);S.useImperativeHandle(t,()=>({focus:pe.current?.focus,blur:pe.current?.blur,scrollTo:e=>he.current?.scrollTo(e),nativeElement:kr(pe.current)}));let ve=dS(ue,C,w),ye=S.useMemo(()=>{if(y!==`combobox`)return j;let e=f[0]?.value;return typeof e==`string`||typeof e==`number`?String(e):``},[j,y,f]),be=y===`combobox`&&typeof C==`function`&&C()||null,xe=!h&&m,[Se,Ce,we,Te]=Dx(E||!1,T,D,e=>b||xe?!1:e),Ee=S.useMemo(()=>(F||[]).some(e=>[` + ${t}-confirm-body-wrapper`]:{display:`flex`,flexDirection:`column`,flex:`auto`},[`${t}-confirm-body`]:{marginBottom:`auto`}}}]},rb=e=>{let{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:`rtl`,[`${t}-confirm-body`]:{direction:`rtl`}}}}},ib=e=>{let{componentCls:t}=e,n=Qy(e),r={...n};delete r.xs;let i=`--${t.replace(`.`,``)}-`,a=Object.keys(r).map(e=>({[`@media (min-width: ${Y(r[e])})`]:{width:`var(${i}${e}-width)`}}));return{[`${t}-root`]:{[t]:[].concat(Zr(Object.keys(n).map((e,t)=>{let r=Object.keys(n)[t-1];return r?{[`${i}${e}-width`]:`var(${i}${r}-width)`}:null})),[{width:`var(${i}xs-width)`}],Zr(a))}}},ab=e=>{let t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return gs(e,{modalHeaderHeight:e.calc(e.calc(r).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},ob=e=>({footerBg:`transparent`,headerBg:`transparent`,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${Y(e.paddingMD)} ${Y(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${Y(e.padding)} ${Y(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:`none`,headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${Y(e.paddingXS)} ${Y(e.padding)}`:0,footerBorderTop:e.wireframe?`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:`none`,footerBorderRadius:e.wireframe?`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${Y(e.padding*2)} ${Y(e.padding*2)} ${Y(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM,mask:!0}),sb=rl(`Modal`,e=>{let t=ab(e);return[nb(t),rb(t),tb(t),rg(t,`zoom`),ib(t)]},ob,{unitless:{titleLineHeight:!0}}),cb;ky()&&document.documentElement.addEventListener(`click`,e=>{cb={x:e.pageX,y:e.pageY},setTimeout(()=>{cb=null},100)},!0);var lb=e=>{let{prefixCls:t,className:n,rootClassName:r,open:i,wrapClassName:a,centered:o,getContainer:s,style:c,width:l=520,footer:u,classNames:d,styles:f,children:p,loading:m,confirmLoading:h,zIndex:g,mousePosition:_,onOk:v,onCancel:y,okButtonProps:b,cancelButtonProps:x,destroyOnHidden:C,destroyOnClose:w,panelRef:T=null,closable:E,mask:D,modalRender:O,maskClosable:k,focusTriggerAfterClose:A,focusable:j,...M}=e,{getPopupContainer:N,getPrefixCls:P,direction:F,className:I,style:L,classNames:R,styles:z,centered:B,cancelButtonProps:V,okButtonProps:H,mask:U}=li(`modal`),{modal:W}=S.useContext(oi),[ee,te]=S.useMemo(()=>typeof E==`boolean`?[void 0,void 0]:[E?.afterClose,E?.onClose],[E]),ne=P(`modal`,t),re=P(),[ie,ae,G]=Od(D,U,ne,k),oe=Ay(j,ie,A),K=e=>{h||(y?.(e),te?.())},se=e=>{v?.(e),te?.()},ce=bf(ne),[q,le]=sb(ne,ce),ue=J(a,{[`${ne}-centered`]:o??B,[`${ne}-wrap-rtl`]:F===`rtl`}),de=u!==null&&!m?S.createElement(Xy,{...e,okButtonProps:{...H,...b},onOk:se,cancelButtonProps:{...V,...x},onCancel:K}):null,[fe,pe,me,he]=Td(yd(e),yd(W),{closable:!0,closeIcon:S.createElement(Rl,{className:`${ne}-close-icon`}),closeIconRender:e=>Yy(ne,e)}),ge=fe?{disabled:me,closeIcon:pe,afterClose:ee,...he}:!1,_e=O?e=>S.createElement(`div`,{className:`${ne}-render`},O(e)):void 0,ve=$n(T,Ky(`.${ne}-${O?`render`:`container`}`)),[ye,be]=Yd(`Modal`,g),xe={...e,width:l,panelRef:T,focusTriggerAfterClose:oe.focusTriggerAfterClose,focusable:oe,mask:ie,maskClosable:G,zIndex:ye},[Se,Ce]=Fd([R,d,ae],[z,f],{props:xe}),[we,Te]=S.useMemo(()=>hd(l)?[void 0,l]:[l,void 0],[l]),Ee=S.useMemo(()=>{let e={};return Te&&Object.keys(Te).forEach(t=>{let n=Te[t];fd(n)&&(e[`--${ne}-${t}-width`]=pd(n)?`${n}px`:n)}),e},[ne,Te]);return S.createElement(Ty,{form:!0,space:!0},S.createElement(Ud.Provider,{value:be},S.createElement(M_,{width:we,...M,zIndex:ye,getContainer:s===void 0?N:s,prefixCls:ne,rootClassName:J(q,r,le,ce,Se.root),rootStyle:Ce.root,footer:de,visible:i,mousePosition:_??cb,onClose:K,closable:ge,closeIcon:pe,transitionName:Gm(re,`zoom`,e.transitionName),maskTransitionName:Gm(re,`fade`,e.maskTransitionName),mask:ie,maskClosable:G,className:J(q,n,I),style:{...L,...c,...Ee},classNames:{...Se,wrapper:J(Se.wrapper,ue)},styles:Ce,panelRef:ve,destroyOnHidden:C??w,modalRender:_e,focusTriggerAfterClose:oe.focusTriggerAfterClose,focusTrap:oe.trap},m?S.createElement(Wy,{active:!0,title:!1,paragraph:{rows:4},className:`${ne}-body-skeleton`}):p)))},ub=e=>{let{componentCls:t,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:i,fontSize:a,lineHeight:o,modalTitleHeight:s,fontHeight:c,confirmBodyPadding:l}=e,u=`${t}-confirm`;return{[u]:{"&-rtl":{direction:`rtl`},[`${e.antCls}-modal-header`]:{display:`none`},[`${u}-body-wrapper`]:{...Xc()},[`&${t} ${t}-body`]:{padding:l},[`${u}-body`]:{display:`flex`,flexWrap:`nowrap`,alignItems:`start`,[`> ${e.iconCls}`]:{flex:`none`,fontSize:i,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(c).sub(i).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(s).sub(i).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:`flex`,flexDirection:`column`,flex:`auto`,rowGap:e.marginXS,maxWidth:`calc(100% - ${Y(e.marginSM)})`},[`${u}-body-no-icon ${u}-paragraph`]:{maxWidth:`100%`},[`${e.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${Y(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${u}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:r},[`${u}-container`]:{color:e.colorText,fontSize:a,lineHeight:o},[`${u}-btns`]:{textAlign:`end`,marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${u}-error ${u}-body > ${e.iconCls}`]:{color:e.colorError},[`${u}-warning ${u}-body > ${e.iconCls}, + ${u}-confirm ${u}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${u}-info ${u}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${u}-success ${u}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},db=al([`Modal`,`confirm`],e=>ub(ab(e)),ob,{order:-1e3}),fb=e=>{let{prefixCls:t,icon:n,okText:r,cancelText:i,confirmPrefixCls:a,type:o,okCancel:s,footer:c,locale:l,autoFocusButton:u,focusable:d,...f}=e,p=n;if(!n&&n!==null)switch(o){case`info`:p=S.createElement(Wl,null);break;case`success`:p=S.createElement(Ml,null);break;case`error`:p=S.createElement(Fl,null);break;default:p=S.createElement(Vl,null)}let m=s??o===`confirm`,h=S.useMemo(()=>{let e=d?.autoFocusButton||u;return e||e===null?e:`ok`},[u,d?.autoFocusButton]),[g]=cd(`Modal`),_=l||g,v=r||(m?_?.okText:_?.justOkText),y=i||_?.cancelText,{closable:b}=f,{onClose:x}=hd(b)?b:{},C=S.useMemo(()=>({autoFocusButton:h,cancelTextLocale:y,okTextLocale:v,mergedOkCancel:m,onClose:x,...f}),[h,y,v,m,x,f]),w=S.createElement(S.Fragment,null,S.createElement(t_,null),S.createElement(n_,null)),T=fd(e.title)&&e.title!==``,E=fd(p),D=`${a}-body`;return S.createElement(`div`,{className:`${a}-body-wrapper`},S.createElement(`div`,{className:J(D,{[`${D}-has-title`]:T,[`${D}-no-icon`]:!E})},p,S.createElement(`div`,{className:`${a}-paragraph`},T&&S.createElement(`span`,{className:`${a}-title`},e.title),S.createElement(`div`,{className:`${a}-content`},e.content))),c===void 0||typeof c==`function`?S.createElement(e_,{value:C},S.createElement(`div`,{className:`${a}-btns`},typeof c==`function`?c(w,{OkBtn:n_,CancelBtn:t_}):w)):c,S.createElement(db,{prefixCls:t}))},pb=e=>{let{close:t,zIndex:n,maskStyle:r,direction:i,prefixCls:a,wrapClassName:o,rootPrefixCls:s,bodyStyle:c,closable:l=!1,onConfirm:u,styles:d,title:f,mask:p,maskClosable:m,okButtonProps:h,cancelButtonProps:g}=e,{cancelButtonProps:_,okButtonProps:v}=li(`modal`),y=`${a}-confirm`,b=e.width||416,x=e.style||{},C=J(y,`${y}-${e.type}`,{[`${y}-rtl`]:i===`rtl`},e.className),w=S.useMemo(()=>{let e=Dd(p,m);return e.closable??=!1,e},[p,m]),[,T]=Kc(),E=S.useMemo(()=>n===void 0?T.zIndexPopupBase+Gd:n,[n,T]);return S.createElement(lb,{...e,className:C,wrapClassName:J({[`${y}-centered`]:!!e.centered},o),onCancel:()=>{t?.({triggerCancel:!0}),u?.(!1)},title:f,footer:null,transitionName:Gm(s||``,`zoom`,e.transitionName),maskTransitionName:Gm(s||``,`fade`,e.maskTransitionName),mask:w,style:x,styles:{body:c,mask:r,...d},width:b,zIndex:E,closable:l},S.createElement(fb,{...e,confirmPrefixCls:y,okButtonProps:{...v,...h},cancelButtonProps:{..._,...g}}))},mb=e=>{let{rootPrefixCls:t,iconPrefixCls:n,direction:r,theme:i}=e;return S.createElement(am,{prefixCls:t,iconPrefixCls:n,direction:r,theme:i},S.createElement(pb,{...e}))},hb=[],gb=``;function _b(){return gb}var vb=e=>{let{prefixCls:t,getContainer:n,direction:r}=e,i=od(),a=(0,S.useContext)(oi),o=_b()||a.getPrefixCls(),s=t||`${o}-modal`,c=n;return c===!1&&(c=void 0),S.createElement(mb,{...e,rootPrefixCls:o,prefixCls:s,iconPrefixCls:a.iconPrefixCls,theme:a.theme,direction:r??a.direction,locale:a.locale?.Modal??i,getContainer:c})};function yb(e){let t=rm(),n=document.createDocumentFragment(),r={...e,close:s,open:!0},i;function a(...t){t.some(e=>e?.triggerCancel)&&e.onCancel?.(()=>{},...t.slice(1));for(let e=0;e{})}let o=e=>{clearTimeout(i),i=setTimeout(()=>{let r=t.getPrefixCls(void 0,_b()),i=t.getIconPrefixCls(),a=t.getTheme(),o=S.createElement(vb,{...e});Lm(S.createElement(am,{prefixCls:r,iconPrefixCls:i,theme:a},typeof t.holderRender==`function`?t.holderRender(o):o),n)})};function s(...t){r={...r,open:!1,afterClose:()=>{typeof e.afterClose==`function`&&e.afterClose(),a.apply(this,t)}},o(r)}function c(e){r=typeof e==`function`?e(r):{...r,...e},o(r)}return o(r),hb.push(s),{destroy:s,update:c}}function bb(e){return{...e,type:`warning`}}function xb(e){return{...e,type:`info`}}function Sb(e){return{...e,type:`success`}}function Cb(e){return{...e,type:`error`}}function wb(e){return{...e,type:`confirm`}}function Tb({rootPrefixCls:e}){gb=e}var Eb=S.forwardRef((e,t)=>{let{afterClose:n,config:r,...i}=e,[a,o]=S.useState(!0),[s,c]=S.useState(r),{direction:l,getPrefixCls:u}=S.useContext(oi),d=u(`modal`),f=u(),p=()=>{n(),s.afterClose?.()},m=(...e)=>{o(!1),e.some(e=>e?.triggerCancel)&&s.onCancel?.(()=>{},...e.slice(1))};S.useImperativeHandle(t,()=>({destroy:m,update:e=>{c(t=>{let n=typeof e==`function`?e(t):e;return{...t,...n}})}}));let h=s.okCancel??s.type===`confirm`,[g]=cd(`Modal`,td.Modal);return S.createElement(mb,{prefixCls:d,rootPrefixCls:f,...s,close:m,open:a,afterClose:p,okText:s.okText||(h?g?.okText:g?.justOkText),direction:s.direction||l,cancelText:s.cancelText||g?.cancelText,...i})}),Db=0,Ob=S.memo(S.forwardRef((e,t)=>{let[n,r]=zd();return S.useImperativeHandle(t,()=>({patchElement:r}),[r]),S.createElement(S.Fragment,null,n)}));function kb(){let e=S.useRef(null),[t,n]=S.useState([]);S.useEffect(()=>{t.length&&(Zr(t).forEach(e=>{e()}),n([]))},[t]);let r=S.useCallback(t=>function(r){Db+=1;let i=S.createRef(),a,o=new Promise(e=>{a=e}),s=!1,c,l=S.createElement(Eb,{key:`modal-${Db}`,config:t(r),ref:i,afterClose:()=>{c?.()},isSilent:()=>s,onConfirm:e=>{a(e)}});return c=e.current?.patchElement(l),c&&hb.push(c),{destroy:()=>{function e(){i.current?.destroy()}i.current?e():n(t=>[].concat(Zr(t),[e]))},update:e=>{function t(){i.current?.update(e)}i.current?t():n(e=>[].concat(Zr(e),[t]))},then:e=>(s=!0,o.then(e))}},[]);return[S.useMemo(()=>({info:r(xb),success:r(Sb),error:r(Cb),warning:r(bb),confirm:r(wb)}),[r]),S.createElement(Ob,{key:`modal-holder`,ref:e})]}var Ab=e=>{let{componentCls:t,notificationMarginEdge:n,animationMaxHeight:r}=e,i=`${t}-notice`,a=new Lo(`antNotificationFadeIn`,{"0%":{transform:`translate3d(100%, 0, 0)`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,opacity:1}}),o=new Lo(`antNotificationTopFadeIn`,{"0%":{top:-r,opacity:0},"100%":{top:0,opacity:1}}),s=new Lo(`antNotificationBottomFadeIn`,{"0%":{bottom:e.calc(r).mul(-1).equal(),opacity:0},"100%":{bottom:0,opacity:1}}),c=new Lo(`antNotificationLeftFadeIn`,{"0%":{transform:`translate3d(-100%, 0, 0)`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,opacity:1}});return{[t]:{[`&${t}-top, &${t}-bottom`]:{marginInline:0,[i]:{marginInline:`auto auto`}},[`&${t}-top`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:o}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:s}},[`&${t}-topRight, &${t}-bottomRight`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:a}},[`&${t}-topLeft, &${t}-bottomLeft`]:{marginRight:{value:0,_skip_check_:!0},marginLeft:{value:n,_skip_check_:!0},[i]:{marginInlineEnd:`auto`,marginInlineStart:0},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:c}}}}},Lee=[`top`,`topLeft`,`topRight`,`bottom`,`bottomLeft`,`bottomRight`],jb={topLeft:`left`,topRight:`right`,bottomLeft:`left`,bottomRight:`right`,top:`left`,bottom:`left`},Mb=(e,t)=>{let{componentCls:n}=e;return{[`${n}-${t}`]:{[`&${n}-stack > ${n}-notice-wrapper`]:{[t.startsWith(`top`)?`top`:`bottom`]:0,[jb[t]]:{value:0,_skip_check_:!0}}}}},Nb=e=>{let t={};for(let n=1;n ${e.componentCls}-notice`]:{opacity:0,transition:`opacity ${e.motionDurationMid}`}};return{[`&:not(:nth-last-child(-n+${e.notificationStackLayer}))`]:{opacity:0,overflow:`hidden`,color:`transparent`,pointerEvents:`none`},...t}},Pb=e=>{let t={};for(let n=1;n{let{componentCls:t}=e;return{[`${t}-stack`]:{[`& > ${t}-notice-wrapper`]:{transition:`transform ${e.motionDurationSlow}, backdrop-filter 0s`,willChange:`transform, opacity`,position:`absolute`,...Nb(e)}},[`${t}-stack:not(${t}-stack-expanded)`]:{[`& > ${t}-notice-wrapper`]:{...Pb(e)}},[`${t}-stack${t}-stack-expanded`]:{[`& > ${t}-notice-wrapper`]:{"&:not(:nth-last-child(-n + 1))":{opacity:1,overflow:`unset`,color:`inherit`,pointerEvents:`auto`,[`& > ${e.componentCls}-notice`]:{opacity:1}},"&:after":{content:`""`,position:`absolute`,height:e.margin,width:`100%`,insetInline:0,bottom:e.calc(e.margin).mul(-1).equal(),background:`transparent`,pointerEvents:`auto`}}},...Lee.map(t=>Mb(e,t)).reduce((e,t)=>({...e,...t}),{})}},Ib=e=>{let{iconCls:t,componentCls:n,boxShadow:r,fontSizeLG:i,notificationMarginBottom:a,borderRadiusLG:o,colorSuccess:s,colorInfo:c,colorWarning:l,colorError:u,colorTextHeading:d,notificationBg:f,notificationPadding:p,notificationMarginEdge:m,progressBg:h,notificationProgressHeight:g,fontSize:_,lineHeight:v,width:y,notificationIconSize:b,colorText:x,colorSuccessBg:S,colorErrorBg:C,colorInfoBg:w,colorWarningBg:T,motionDurationMid:E}=e,D=`${n}-notice`;return{position:`relative`,marginBottom:a,marginInlineStart:`auto`,background:f,borderRadius:o,boxShadow:r,[D]:{padding:p,width:y,maxWidth:`calc(100vw - ${Y(e.calc(m).mul(2).equal())})`,lineHeight:v,wordWrap:`break-word`,borderRadius:o,overflow:`hidden`,"&-success":S?{background:S}:{},"&-error":C?{background:C}:{},"&-info":w?{background:w}:{},"&-warning":T?{background:T}:{}},[`${D}-title`]:{marginBottom:e.marginXS,color:d,fontSize:i,lineHeight:e.lineHeightLG},[`${D}-description`]:{fontSize:_,color:x,marginTop:e.marginXS,"&:first-child":{marginTop:0,marginInlineEnd:e.marginSM}},[`${D}-closable ${D}-title`]:{paddingInlineEnd:e.paddingLG},[`${D}-with-icon ${D}-title`]:{marginBottom:e.marginXS,marginInlineStart:e.calc(e.marginSM).add(b).equal(),fontSize:i},[`${D}-with-icon ${D}-description`]:{marginInlineStart:e.calc(e.marginSM).add(b).equal(),fontSize:_},[`${D}-icon`]:{position:`absolute`,fontSize:b,lineHeight:1,[`&-success${t}`]:{color:s},[`&-info${t}`]:{color:c},[`&-warning${t}`]:{color:l},[`&-error${t}`]:{color:u}},[`${D}-close`]:{position:`absolute`,top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:`none`,width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:[`color`,`background-color`].map(e=>`${e} ${E}`).join(`, `),display:`flex`,alignItems:`center`,justifyContent:`center`,background:`none`,border:`none`,"&:hover":{color:e.colorIconHover,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},...Qc(e)},[`${D}-progress`]:{position:`absolute`,display:`block`,appearance:`none`,inlineSize:`calc(100% - ${Y(o)} * 2)`,left:{_skip_check_:!0,value:o},right:{_skip_check_:!0,value:o},bottom:0,blockSize:g,border:0,"&, &::-webkit-progress-bar":{borderRadius:o,backgroundColor:`rgba(0, 0, 0, 0.04)`},"&::-moz-progress-bar":{background:h},"&::-webkit-progress-value":{borderRadius:o,background:h}},[`${D}-actions`]:{float:`right`,marginTop:e.marginSM}}},Lb=e=>{let{componentCls:t,notificationMarginBottom:n,notificationMarginEdge:r,motionDurationMid:i,motionEaseInOut:a}=e,o=`${t}-notice`,s=new Lo(`antNotificationFadeOut`,{"0%":{maxHeight:e.animationMaxHeight,marginBottom:n},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[t]:{...Jc(e),position:`fixed`,zIndex:e.zIndexPopup,marginRight:{value:r,_skip_check_:!0},[`${t}-hook-holder`]:{position:`relative`},[`${t}-fade-appear-prepare`]:{opacity:`0 !important`},[`${t}-fade-enter, ${t}-fade-appear`]:{animationDuration:e.motionDurationMid,animationTimingFunction:a,animationFillMode:`both`,opacity:0,animationPlayState:`paused`},[`${t}-fade-leave`]:{animationTimingFunction:a,animationFillMode:`both`,animationDuration:i,animationPlayState:`paused`},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationPlayState:`running`},[`${t}-fade-leave${t}-fade-leave-active`]:{animationName:s,animationPlayState:`running`},"&-rtl":{direction:`rtl`,[`${o}-actions`]:{float:`left`}}}},{[t]:{[`${o}-wrapper`]:Ib(e)}}]},Rb=e=>({zIndexPopup:e.zIndexPopupBase+Gd+50,width:384,progressBg:`linear-gradient(90deg, ${e.colorPrimaryBorderHover}, ${e.colorPrimary})`,colorSuccessBg:void 0,colorErrorBg:void 0,colorInfoBg:void 0,colorWarningBg:void 0}),zb=e=>{let t=e.paddingMD,n=e.paddingLG;return gs(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationIconSize:e.calc(e.fontSizeLG).mul(e.lineHeightLG).equal(),notificationCloseButtonSize:e.calc(e.controlHeightLG).mul(.55).equal(),notificationMarginBottom:e.margin,notificationPadding:`${Y(e.paddingMD)} ${Y(e.paddingContentHorizontalLG)}`,notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationStackLayer:3,notificationProgressHeight:2})},Bb=rl(`Notification`,e=>{let t=zb(e);return[Lb(t),Ab(t),Fb(t)]},Rb);function Vb(e,t){return t===null||t===!1?null:t||S.createElement(Rl,{className:`${e}-close-icon`})}var Hb={success:Ml,info:Wl,error:Fl,warning:Vl},Ub=e=>{let{prefixCls:t,icon:n,type:r,title:i,description:a,actions:o,role:s=`alert`,styles:c,classNames:l}=e,u=null;return n?u=S.createElement(`span`,{className:J(`${t}-icon`,l.icon),style:c.icon},n):r&&(u=S.createElement(Hb[r]||null,{className:J(`${t}-icon`,l.icon,`${t}-icon-${r}`),style:c.icon})),S.createElement(`div`,{className:J({[`${t}-with-icon`]:u}),role:s},u,i&&S.createElement(`div`,{className:J(`${t}-title`,l.title),style:c.title},i),a&&S.createElement(`div`,{className:J(`${t}-description`,l.description),style:c.description},a),o&&S.createElement(`div`,{className:J(`${t}-actions`,l.actions),style:c.actions},o))};function Wb(e,t,n){let r;switch(e){case`top`:r={left:`50%`,transform:`translateX(-50%)`,right:`auto`,top:t,bottom:`auto`};break;case`topLeft`:r={left:0,top:t,bottom:`auto`};break;case`topRight`:r={right:0,top:t,bottom:`auto`};break;case`bottom`:r={left:`50%`,transform:`translateX(-50%)`,right:`auto`,top:`auto`,bottom:n};break;case`bottomLeft`:r={left:0,top:`auto`,bottom:n};break;default:r={right:0,top:`auto`,bottom:n};break}return r}function Gb(e){return{motionName:`${e}-fade`}}function Kb(e,t,n){return e===void 0?t?.closeIcon===void 0?n?.closeIcon:t.closeIcon:e}var qb=24,Jb=4.5,Yb=`topRight`,Xb=({children:e,prefixCls:t})=>{let n=bf(t),[r,i]=Bb(t,n);return S.createElement(um,{classNames:{list:J(r,i,n)}},e)},Zb=(e,{prefixCls:t,key:n})=>S.createElement(Xb,{prefixCls:t,key:n},e),Qb=S.forwardRef((e,t)=>{let{top:n,bottom:r,prefixCls:i,getContainer:a,maxCount:o,rtl:s,onAllRemoved:c,stack:l,duration:u=Jb,pauseOnHover:d=!0,showProgress:f}=e,{getPrefixCls:p,getPopupContainer:m,direction:h}=li(`notification`),{notification:g}=(0,S.useContext)(oi),[,_]=Kc(),v=i||p(`notification`),y=(0,S.useMemo)(()=>pd(u)&&u>0?u:!1,[u]),[b,x]=vm({prefixCls:v,style:e=>Wb(e,n??qb,r??qb),className:()=>J({[`${v}-rtl`]:s??h===`rtl`}),motion:()=>Gb(v),closable:{closeIcon:Vb(v)},duration:y,getContainer:()=>a?.()||m?.()||document.body,maxCount:o,pauseOnHover:d,showProgress:f,onAllRemoved:c,renderNotifications:Zb,stack:l===!1?!1:{threshold:hd(l)?l?.threshold:void 0,offset:8,gap:_.margin}}),[C,w]=Fd([g?.classNames,e?.classNames],[g?.styles,e?.styles],{props:e});return S.useImperativeHandle(t,()=>({...b,prefixCls:v,notification:g,classNames:C,styles:w})),x});function $b(e){let t=S.useRef(null);Dr(`Notification`);let{notification:n}=S.useContext(oi);return[S.useMemo(()=>{let r=r=>{if(!t.current)return;let{open:i,prefixCls:a,notification:o,classNames:s,styles:c}=t.current,l=o?.className||{},u=o?.style||{},d=`${a}-notice`,{title:f,message:p,description:m,icon:h,type:g,btn:_,actions:v,className:y,style:b,role:x=`alert`,closeIcon:C,closable:w,classNames:T={},styles:E={},...D}=r,O=f??p,k=v??_,A=Vb(d,Kb(C,e,o)),[j,M,,N]=wd(yd({...e||{},...r}),yd(n),{closable:!0,closeIcon:A}),P=j?{onClose:hd(w)?w.onClose:void 0,closeIcon:M,...N}:!1,F=Pd(T,{props:r}),I=Pd(E,{props:r}),L=kd(void 0,s,F),R=jd(c,I);return i({placement:e?.placement??Yb,...D,content:S.createElement(Ub,{prefixCls:d,icon:h,type:g,title:O,description:m,actions:k,role:x,classNames:L,styles:R}),className:J({[`${d}-${g}`]:g},y,l,L.root),style:{...u,...R.root,...b},closable:P})},i={open:r,destroy:e=>{e===void 0?t.current?.destroy():t.current?.close(e)}};return[`success`,`info`,`warning`,`error`].forEach(e=>{i[e]=t=>r({...t,type:e})}),i},[e,n]),S.createElement(Qb,{key:`notification-holder`,...e,ref:t})]}function ex(e){return $b(e)}var tx=S.createContext({}),nx=S.createContext({message:{},notification:{},modal:{}}),rx=rl(`App`,e=>{let{componentCls:t,colorText:n,fontSize:r,lineHeight:i,fontFamily:a}=e;return{[t]:{color:n,fontSize:r,lineHeight:i,fontFamily:a,[`&${t}-rtl`]:{direction:`rtl`}}}},()=>({})),ix=e=>{let{prefixCls:t,children:n,className:r,rootClassName:i,message:a,notification:o,style:s,component:c=`div`}=e,{direction:l,getPrefixCls:u,className:d,style:f}=li(`app`),p=u(`app`,t),[m,h]=rx(p),g=J(m,p,r,i,h,{[`${p}-rtl`]:l===`rtl`}),_=(0,S.useContext)(tx),v=S.useMemo(()=>({message:{..._.message,...a},notification:{..._.notification,...o}}),[a,o,_.message,_.notification]),[y,b]=Fm(v.message),[x,C]=ex(v.notification),[w,T]=kb(),E=S.useMemo(()=>({message:y,notification:x,modal:w}),[y,x,w]);Dr(`App`)(!(h&&c===!1),`usage`,"When using cssVar, ensure `component` is assigned a valid React component string.");let D=c===!1?S.Fragment:c,O={className:J(d,g),style:{...f,...s}};return S.createElement(nx.Provider,{value:E},S.createElement(tx.Provider,{value:v},S.createElement(D,{...c===!1?void 0:O},T,b,C,n)))},ax=()=>S.useContext(nx),ox=ix;ox.useApp=ax;function sx(e){return t=>S.createElement(am,{theme:{token:{motion:!1,zIndexPopupBase:0}}},S.createElement(e,{...t}))}var cx=(e,t,n,r,i)=>sx(a=>{let{prefixCls:o,style:s}=a,c=S.useRef(null),[l,u]=S.useState(0),[d,f]=S.useState(0),[p,m]=Hn(!1,a.open),{getPrefixCls:h}=S.useContext(oi),g=h(r||`select`,o);S.useEffect(()=>{if(m(!0),typeof ResizeObserver<`u`){let e=new ResizeObserver(e=>{let t=e[0].target;u(t.offsetHeight+8),f(t.offsetWidth)}),t=setInterval(()=>{let n=i?`.${i(g)}`:`.${g}-dropdown`,r=c.current?.querySelector(n);r&&(clearInterval(t),e.observe(r))},10);return()=>{clearInterval(t),e.disconnect()}}},[g]);let _={...a,style:{...s,margin:0},open:p,getPopupContainer:()=>c.current};n&&(_=n(_)),t&&(_={..._,[t]:{overflow:{adjustX:!1,adjustY:!1}}});let v={paddingBottom:l,position:`relative`,minWidth:d};return S.createElement(`div`,{ref:c,style:v},S.createElement(e,{..._}))}),lx=(e,t,n,r,i=!1,a,o)=>{let s=(0,S.useMemo)(()=>typeof n==`boolean`?{allowClear:n}:n&&typeof n==`object`?n:{allowClear:!1},[n]);return(0,S.useMemo)(()=>{let e=!i&&s.allowClear!==!1&&(t.length||a)&&!(o===`combobox`&&a===``);return{allowClear:e,clearIcon:e?s.clearIcon||r||`×`:null}},[s,r,i,t.length,a,o])},ux=S.createContext(null);function dx(){return S.useContext(ux)}function fx(e=250){let t=S.useRef(null),n=S.useRef(null);S.useEffect(()=>()=>{window.clearTimeout(n.current)},[]);function r(r){(r||t.current===null)&&(t.current=r),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current=null},e)}return[()=>t.current,r]}function px(e,t){return e.filter(e=>e).some(e=>e.contains(t)||e===t)}function mx(e,t,n,r){let i=In(i=>{if(r)return;let a=i.target;a.shadowRoot&&i.composed&&(a=i.composedPath()[0]||a),i._ori_target&&(a=i._ori_target),t&&!px(e(),a)&&n(!1)});S.useEffect(()=>(window.addEventListener(`mousedown`,i),()=>window.removeEventListener(`mousedown`,i)),[i])}function hx(){return hx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let t=e===!0?0:1;return{bottomLeft:{points:[`tl`,`bl`],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},bottomRight:{points:[`tr`,`br`],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},topLeft:{points:[`bl`,`tl`],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},topRight:{points:[`br`,`tr`],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`}}},_x=S.forwardRef((e,t)=>{let{prefixCls:n,disabled:r,visible:i,children:a,popupElement:o,animation:s,transitionName:c,popupStyle:l,popupClassName:u,direction:d=`ltr`,placement:f,builtinPlacements:p,popupMatchSelectWidth:m,popupRender:h,popupAlign:g,getPopupContainer:_,empty:v,onPopupVisibleChange:y,onPopupMouseEnter:b,onPopupMouseDown:x,onPopupBlur:C,...w}=e,T=`${n}-dropdown`,E=o;h&&(E=h(o));let D=S.useMemo(()=>p||gx(m),[p,m]),O=s?`${T}-${s}`:c,k=typeof m==`number`,A=S.useMemo(()=>k?null:m===!1?`minWidth`:`width`,[m,k]),j=l;k&&(j={...l,width:m});let M=S.useRef(null);return S.useImperativeHandle(t,()=>({getPopupElement:()=>M.current?.popupElement})),S.createElement(jp,hx({},w,{showAction:y?[`click`]:[],hideAction:y?[`click`]:[],popupPlacement:f||(d===`rtl`?`bottomRight`:`bottomLeft`),builtinPlacements:D,prefixCls:T,popupMotion:{motionName:O},popup:S.createElement(`div`,{onMouseEnter:b,onMouseDown:x,onBlur:C},E),ref:M,stretch:A,popupAlign:g,popupVisible:i,getPopupContainer:_,popupClassName:J(u,{[`${T}-empty`]:v}),popupStyle:j,onPopupVisibleChange:y}),a)});function vx(e,t){let{key:n}=e,r;return`value`in e&&({value:r}=e),n??(r===void 0?`rc-index-key-${t}`:r)}function yx(e){return e!==void 0&&!Number.isNaN(e)}function bx(e,t){let{label:n,value:r,options:i,groupLabel:a}=e||{},o=n||(t?`children`:`label`);return{label:o,value:r||`value`,options:i||`options`,groupLabel:a||o}}function Ree(e,{fieldNames:t,childrenAsData:n}={}){let r=[],{label:i,value:a,options:o,groupLabel:s}=bx(t,!1);function c(e,t){Array.isArray(e)&&e.forEach(e=>{if(t||!(o in e)){let n=e[a];r.push({key:vx(e,r.length),groupOption:t,data:e,label:e[i],value:n})}else{let t=e[s];t===void 0&&n&&(t=e.label),r.push({key:vx(e,r.length),group:!0,data:e,label:t}),c(e[o],!0)}})}return c(e,!1),r}function xx(e){let t={...e};return`props`in t||Object.defineProperty(t,`props`,{get(){return br(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var zee=(e,t,n)=>{if(!t||!t.length)return null;let r=!1,i=(e,[t,...n])=>{if(!t)return[e];let a=e.split(t);return r||=a.length>1,a.reduce((e,t)=>[...e,...i(t,n)],[]).filter(Boolean)},a=i(e,t);return r?n===void 0?a:a.slice(0,n):null};function Sx(e){let{visible:t,values:n}=e;return t?S.createElement(`span`,{"aria-live":`polite`,style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},`${n.slice(0,50).map(({label:e,value:t})=>[`number`,`string`].includes(typeof e)?e:t).join(`, `)}`,n.length>50?`, ...`:null):null}var Cx=e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},wx=(e,t=1)=>{if(t<=0){e();return}Cx(()=>{wx(e,t-1)})};function Tx(e,t,n,r){let[i,a]=(0,S.useState)(!1);(0,S.useEffect)(()=>{a(!0)},[]);let[o,s]=Hn(e,t),[c,l]=(0,S.useState)(!1),u=i?o:!1,d=r(u),f=(0,S.useRef)(0),p=In(e=>{n&&d!==e&&n(e),s(e)});return[u,d,In((e,t={})=>{let{cancelFun:n}=t;f.current+=1;let r=f.current,i=typeof e==`boolean`?e:!d;l(!i);function a(){r===f.current&&!n?.()&&(p(i),l(!1))}i?a():wx(()=>{a()})}),c]}function Ex(e){let{children:t,...n}=e;return t?S.createElement(`div`,n,t):null}var Dx=S.createContext(null);function Ox(){return S.useContext(Dx)}var kx=S.forwardRef((e,t)=>{let{onChange:n,onKeyDown:r,onBlur:i,style:a,syncWidth:o,value:s,className:c,autoComplete:l,...u}=e,{prefixCls:d,mode:f,onSearch:p,onSearchSubmit:m,onInputBlur:h,autoFocus:g,tokenWithEnter:_,placeholder:v,components:{input:y=`input`}}=Ox(),{id:b,classNames:x,styles:C,open:w,activeDescendantId:T,role:E,disabled:D}=dx()||{},O=J(`${d}-input`,x?.input,c),k=S.useRef(!1),A=S.useRef(null),j=S.useRef(null);S.useImperativeHandle(t,()=>j.current);let M=e=>{let{value:t}=e.target;if(_&&A.current&&/[\r\n]/.test(A.current)){let e=A.current.replace(/[\r\n]+$/,``).replace(/\r\n/g,` `).replace(/[\r\n]/g,` `);t=t.replace(e,A.current)}A.current=null,p&&p(t,!0,k.current),n?.(e)},N=e=>{let{key:t}=e,{value:n}=e.currentTarget;t===`Enter`&&f===`tags`&&!w&&!k.current&&m&&m(n),r?.(e)},P=e=>{h?.(),i?.(e)},F=()=>{k.current=!0},I=e=>{if(k.current=!1,f!==`combobox`){let{value:t}=e.currentTarget;p?.(t,!0,!1)}},L=e=>{let{clipboardData:t}=e;A.current=t?.getData(`text`)||``},[R,z]=S.useState(void 0);zn(()=>{let e=j.current;if(o&&e){e.style.width=`0px`;let t=e.scrollWidth;z(t),e.style.width=``}},[o,s]);let B={id:b,type:f===`combobox`?`text`:`search`,...u,ref:j,style:{...C?.input,...a,"--select-input-width":R},autoFocus:g,autoComplete:l||`off`,className:O,disabled:D,value:s||``,onChange:M,onKeyDown:N,onBlur:P,onPaste:L,onCompositionStart:F,onCompositionEnd:I,role:E||`combobox`,"aria-expanded":w||!1,"aria-haspopup":`listbox`,"aria-owns":w?`${b}_list`:void 0,"aria-autocomplete":`list`,"aria-controls":w?`${b}_list`:void 0,"aria-activedescendant":w?T:void 0};if(S.isValidElement(y)){let t=y.props||{},n={placeholder:e.placeholder||v,...B,...t};return Object.keys(t).forEach(e=>{let r=t[e];typeof r==`function`&&(n[e]=(...t)=>{r(...t),B[e]?.(...t)})}),n.ref=$n(y.ref,B.ref),S.cloneElement(y,n)}let V=y;return S.createElement(V,B)});function Ax(e){let{prefixCls:t,placeholder:n,displayValues:r}=Ox(),{classNames:i,styles:a}=dx(),{show:o=!0}=e;return r.length?null:S.createElement(`div`,{className:J(`${t}-placeholder`,i?.placeholder),style:{visibility:o?`visible`:`hidden`,...a?.placeholder}},n)}var jx=S.createContext(null);function Mx(e){return Array.isArray(e)?e:e===void 0?[]:[e]}typeof window<`u`&&window.document&&window.document.documentElement;function Nx(e){return e!=null}function Px(e){return!e&&e!==0}function Fx(e){return[`string`,`number`].includes(typeof e)}function Ix(e){let t;return e&&(Fx(e.title)?t=e.title.toString():Fx(e.label)&&(t=e.label.toString())),t}function Lx(){return Lx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,searchValue:r,activeValue:i,displayValues:a,maxLength:o,mode:s,components:c}=Ox(),{triggerOpen:l,title:u,showSearch:d,classNames:f,styles:p}=dx(),m=S.useContext(jx),[h,g]=S.useState(!1),_=s===`combobox`,v=a[0],y=S.useMemo(()=>_&&i&&!h&&l?i:d?r:``,[_,i,h,l,r,d]),[b,x,C,w]=S.useMemo(()=>{let e,t,n;if(v&&m?.flattenOptions){let r=m.flattenOptions.find(e=>e.value===v.value);r?.data&&(e=r.data.className,t=r.data.style,n=Ix(r.data))}return v&&!n&&(n=Ix(v)),u!==void 0&&(n=u),[e,t,n,!!e||!!t]},[v,m?.flattenOptions,u]);S.useEffect(()=>{_&&g(!1)},[_,i]);let T=v&&v.label!==null&&v.label!==void 0&&String(v.label).trim()!==``,E=_&&c?.input?null:v?w?S.createElement(`div`,{className:J(`${n}-content-value`,b),style:{...y?{visibility:`hidden`}:{},...x},title:C},v.label):v.label:S.createElement(Ax,{show:!y});return S.createElement(`div`,{className:J(`${n}-content`,T&&`${n}-content-has-value`,y&&`${n}-content-has-search-value`,w&&`${n}-content-has-option-style`,f?.content),style:p?.content,title:w?void 0:C},E,S.createElement(kx,Lx({ref:t},e,{value:y,maxLength:s===`combobox`?o:void 0,onChange:t=>{g(!0),e.onChange?.(t)}})))}),zx=void 0;function Bx(e,t){let{prefixCls:n,invalidate:r,item:i,renderItem:a,responsive:o,responsiveDisabled:s,registerSize:c,itemKey:l,className:u,style:d,children:f,display:p,order:m,component:h=`div`,...g}=e,_=o&&!p;function v(e){c(l,e)}S.useEffect(()=>()=>{v(null)},[]);let y=a&&i!==zx?a(i,{index:m}):f,b;r||(b={opacity:+!_,height:_?0:zx,overflowY:_?`hidden`:zx,order:o?m:zx,pointerEvents:_?`none`:zx,position:_?`absolute`:zx});let x={};_&&(x[`aria-hidden`]=!0);let C=S.createElement(h,hg({className:J(!r&&n,u),style:{...b,...d}},x,g,{ref:t}),y);return o&&(C=S.createElement(Wr,{onResize:({offsetWidth:e})=>{v(e)},disabled:s},C)),C}var Vx=S.forwardRef(Bx);function Hx(e){if(typeof MessageChannel>`u`)ri(e);else{let t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function Ux(){let e=S.useRef(null);return t=>{e.current||(e.current=[],Hx(()=>{(0,Jf.unstable_batchedUpdates)(()=>{e.current.forEach(e=>{e()}),e.current=null})})),e.current.push(t)}}function Wx(e,t){let[n,r]=S.useState(t);return[n,In(t=>{e(()=>{r(t)})})]}var Gx=S.createContext(null),Kx=S.forwardRef((e,t)=>{let n=S.useContext(Gx);if(!n){let{component:n=`div`,...r}=e;return S.createElement(n,hg({},r,{ref:t}))}let{className:r,...i}=n,{className:a,...o}=e;return S.createElement(Gx.Provider,{value:null},S.createElement(Vx,hg({ref:t,className:J(r,a)},i,o)))}),qx=`responsive`,Jx=`invalidate`;function Yx(e){return`+ ${e.length} ...`}function Xx(e,t){let{prefixCls:n=`rc-overflow`,data:r=[],renderItem:i,renderRawItem:a,itemKey:o,itemWidth:s=10,ssr:c,style:l,className:u,maxCount:d,renderRest:f,renderRawRest:p,prefix:m,suffix:h,component:g=`div`,itemComponent:_,onVisibleChange:v,...y}=e,b=c===`full`,x=Ux(),[C,w]=Wx(x,null),T=C||0,[E,D]=Wx(x,new Map),[O,k]=Wx(x,0),[A,j]=Wx(x,0),[M,N]=Wx(x,0),[P,F]=Wx(x,0),[I,L]=(0,S.useState)(null),[R,z]=(0,S.useState)(null),B=S.useMemo(()=>R===null&&b?2**53-1:R||0,[R,C]),[V,H]=(0,S.useState)(!1),U=`${n}-item`,W=Math.max(O,A),ee=d===qx,te=r.length&&ee,ne=d===Jx,re=te||typeof d==`number`&&r.length>d,ie=(0,S.useMemo)(()=>{let e=r;return te?e=C===null&&b?r:r.slice(0,Math.min(r.length,T/s)):typeof d==`number`&&(e=r.slice(0,d)),e},[r,s,C,d,te]),ae=(0,S.useMemo)(()=>te?r.slice(B+1):r.slice(ie.length),[r,ie,te,B]),G=(0,S.useCallback)((e,t)=>typeof o==`function`?o(e):(o&&e?.[o])??t,[o]),oe=(0,S.useCallback)(i||(e=>e),[i]);function K(e,t,n){R===e&&(t===void 0||t===I)||(z(e),n||(H(e{let r=new Map(n);return t===null?r.delete(e):r.set(e,t),r})}function q(e,t){j(t),k(A)}function le(e,t){N(t)}function ue(e,t){F(t)}function de(e){return E.get(G(ie[e],e))}zn(()=>{if(T&&typeof W==`number`&&ie){let e=M+P,t=ie.length,n=t-1;if(!t){K(0,null);return}for(let r=0;rT){K(r-1,e-t-P+A);break}}h&&de(0)+P>T&&L(null)}},[T,E,A,M,P,G,ie]);let fe=V&&!!ae.length,pe={};I!==null&&te&&(pe={position:`absolute`,top:0,insetInlineStart:I});let me={prefixCls:U,responsive:te,component:_,invalidate:ne},he=a?(e,t)=>{let n=G(e,t);return S.createElement(Gx.Provider,{key:n,value:{...me,order:t,item:e,itemKey:n,registerSize:ce,display:t<=B}},a(e,t))}:(e,t)=>{let n=G(e,t);return S.createElement(Vx,hg({},me,{order:t,key:n,item:e,renderItem:oe,itemKey:n,registerSize:ce,display:t<=B}))},ge={order:fe?B:2**53-1,className:`${U}-rest`,registerSize:q,display:fe},_e=f||Yx,ve=p?S.createElement(Gx.Provider,{value:{...me,...ge}},p(ae)):S.createElement(Vx,hg({},me,ge),typeof _e==`function`?_e(ae):_e),ye=S.createElement(g,hg({className:J(!ne&&n,u),style:l,ref:t},y),m&&S.createElement(Vx,hg({},me,{responsive:ee,responsiveDisabled:!te,order:-1,className:`${U}-prefix`,registerSize:le,display:!0}),m),ie.map(he),re?ve:null,h&&S.createElement(Vx,hg({},me,{responsive:ee,responsiveDisabled:!te,order:B,className:`${U}-suffix`,registerSize:ue,display:!0,style:pe}),h));return ee?S.createElement(Wr,{onResize:se,disabled:!te},ye):ye}var Zx=S.forwardRef(Xx);Zx.Item=Kx,Zx.RESPONSIVE=qx,Zx.INVALIDATE=Jx;var Qx=Zx,$x=e=>{let{className:t,style:n,customizeIcon:r,customizeIconProps:i,children:a,onMouseDown:o,onClick:s}=e,c=typeof r==`function`?r(i):r;return S.createElement(`span`,{className:t,onMouseDown:e=>{e.preventDefault(),o?.(e)},style:{userSelect:`none`,WebkitUserSelect:`none`,...n},unselectable:`on`,onClick:s,"aria-hidden":!0},c===void 0?S.createElement(`span`,{className:J(t.split(/\s+/).map(e=>`${e}-icon`))},a):c)};function eS(){return eS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{e.preventDefault(),e.stopPropagation()},rS=S.forwardRef(function({inputProps:e},t){let{prefixCls:n,displayValues:r,searchValue:i,mode:a,onSelectorRemove:o,removeIcon:s}=Ox(),{disabled:c,showSearch:l,triggerOpen:u,rawOpen:d,toggleOpen:f,autoClearSearchValue:p,tagRender:m,maxTagPlaceholder:h,maxTagTextLength:g,maxTagCount:_,classNames:v,styles:y}=dx(),b=`${n}-selection-item`,x=i;!d&&a===`multiple`&&p!==!1&&(x=``);let C=l&&x||``,w=l&&!c,T=s??`×`,E=h??(e=>`+ ${e.length} ...`),D=m,O=e=>{f(e)},k=e=>{o?.(e)},A=(e,t,n,r,i)=>S.createElement(`span`,{title:Ix(e),className:J(b,{[`${b}-disabled`]:n},v?.item),style:y?.item},S.createElement(`span`,{className:J(`${b}-content`,v?.itemContent),style:y?.itemContent},t),r&&S.createElement($x,{className:J(`${b}-remove`,v?.itemRemove),style:y?.itemRemove,onMouseDown:nS,onClick:i,customizeIcon:T},`×`)),j=(e,t,n,r,i,a,o)=>S.createElement(`span`,{onMouseDown:e=>{nS(e),O(!u)}},D({label:t,value:e,index:o?.index,disabled:n,closable:r,onClose:i,isMaxTag:!!a}));return S.createElement(Qx,{prefixCls:`${n}-content`,className:v?.content,style:y?.content,prefix:!r.length&&!C&&S.createElement(Ax,null),data:r,renderItem:(e,t)=>{let{disabled:n,label:r,value:i}=e,a=!c&&!n,o=r;if(typeof g==`number`&&(typeof r==`string`||typeof r==`number`)){let e=String(o);e.length>g&&(o=`${e.slice(0,g)}...`)}let s=t=>{t&&t.stopPropagation(),k(e)};return typeof D==`function`?j(i,o,n,a,s,void 0,t):A(e,o,n,a,s)},renderRest:e=>{if(!r.length)return null;let t=typeof E==`function`?E(e):E;return typeof D==`function`?j(void 0,t,!1,!1,void 0,!0):A({title:t},t,!1)},suffix:S.createElement(kx,eS({ref:t,disabled:c,readOnly:!w},e,{value:C||``,syncWidth:!0})),itemKey:tS,maxCount:_})}),iS=S.forwardRef(function(e,t){let{multiple:n,onInputKeyDown:r,tabIndex:i}=Ox(),a=dx(),{showSearch:o}=a,s={...Vu(a,{aria:!0}),onKeyDown:r,readOnly:!o,tabIndex:i};return n?S.createElement(rS,{ref:t,inputProps:s}):S.createElement(Rx,{ref:t,inputProps:s})});function aS(e){return e&&![om.ESC,om.SHIFT,om.BACKSPACE,om.TAB,om.WIN_KEY,om.ALT,om.META,om.WIN_KEY_RIGHT,om.CTRL,om.SEMICOLON,om.EQUALS,om.CAPS_LOCK,om.CONTEXT_MENU,om.UP,om.LEFT,om.RIGHT,om.F1,om.F2,om.F3,om.F4,om.F5,om.F6,om.F7,om.F8,om.F9,om.F10,om.F11,om.F12].includes(e)}function oS(){return oS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{which:t}=e,n=F.current instanceof HTMLTextAreaElement;!n&&D&&(t===om.UP||t===om.DOWN)&&e.preventDefault(),x&&x(e),!(n&&!D&&~[om.UP,om.DOWN,om.LEFT,om.RIGHT].indexOf(t))&&!(e.ctrlKey||e.altKey||e.metaKey)&&aS(t)&&O(!0)});S.useImperativeHandle(t,()=>({focus:e=>{(F.current||P.current).focus?.(e)},blur:()=>{(F.current||P.current).blur?.()},nativeElement:kr(P.current)}));let L=In(e=>{if(!A){let t=kr(F.current);e.nativeEvent._ori_target=t;let n=t===e.target||t?.contains(e.target);t&&!n&&e.preventDefault();let r=D&&!l&&(f===`combobox`||k)||D&&l&&n;e.nativeEvent._select_lazy?D&&O(!1):(F.current?.focus(),r||O())}y?.(e)}),{root:R}=T,z=Sr(E,sS),B=Vu(z,{aria:!0}),V=Object.keys(B),H={...e,onInputKeyDown:I};if(R){let e=R.props||{},t={...e,...z};return Object.keys(e).forEach(n=>{let r=e[n],i=z[n];typeof r==`function`&&typeof i==`function`&&(t[n]=(...e)=>{i(...e),r(...e)})}),S.isValidElement(R)?S.cloneElement(R,{...t,ref:$n(R.ref,P)}):S.createElement(R,oS({},t,{ref:P}))}return S.createElement(Dx.Provider,{value:H},S.createElement(`div`,oS({},Sr(z,V),{ref:P,className:r,style:i,onMouseDown:L}),S.createElement(Ex,{className:J(`${n}-prefix`,M?.prefix),style:N?.prefix},a),S.createElement(iS,{ref:F}),S.createElement(Ex,{className:J(`${n}-suffix`,{[`${n}-suffix-loading`]:j},M?.suffix),style:N?.suffix},o),s&&S.createElement(Ex,{className:J(`${n}-clear`,M?.clear),style:N?.clear,onMouseDown:e=>{e.nativeEvent._select_lazy=!0,b?.(e)}},s),c))});function lS(e,t,n){return S.useMemo(()=>{let{root:r,input:i}=e||{};return n&&(r=n()),t&&(i=t()),{root:r,input:i}},[e,t,n])}function uS(){return uS=Object.assign?Object.assign.bind():function(e){for(var t=1;te===`tags`||e===`multiple`,fS=S.forwardRef((e,t)=>{let{id:n,prefixCls:r,className:i,styles:a,classNames:o,showSearch:s,tagRender:c,showScrollBar:l=`optional`,direction:u,omitDomProps:d,displayValues:f,onDisplayValuesChange:p,emptyOptions:m,notFoundContent:h=`Not Found`,onClear:g,maxCount:_,placeholder:v,mode:y,disabled:b,loading:x,getInputElement:C,getRawInputElement:w,open:T,defaultOpen:E,onPopupVisibleChange:D,activeValue:O,onActiveValueChange:k,activeDescendantId:A,searchValue:j,autoClearSearchValue:M,onSearch:N,onSearchSplit:P,tokenSeparators:F,allowClear:I,prefix:L,suffix:R,suffixIcon:z,clearIcon:B,OptionList:V,animation:H,transitionName:U,popupStyle:W,popupClassName:ee,popupMatchSelectWidth:te,popupRender:ne,popupAlign:re,placement:ie,builtinPlacements:ae,getPopupContainer:G,showAction:oe=[],onFocus:K,onBlur:se,onKeyUp:ce,onKeyDown:q,onMouseDown:le,components:ue,...de}=e,fe=dS(y),pe=S.useRef(null),me=S.useRef(null),he=S.useRef(null),[ge,_e]=S.useState(!1);S.useImperativeHandle(t,()=>({focus:pe.current?.focus,blur:pe.current?.blur,scrollTo:e=>he.current?.scrollTo(e),nativeElement:kr(pe.current)}));let ve=lS(ue,C,w),ye=S.useMemo(()=>{if(y!==`combobox`)return j;let e=f[0]?.value;return typeof e==`string`||typeof e==`number`?String(e):``},[j,y,f]),be=y===`combobox`&&typeof C==`function`&&C()||null,xe=!h&&m,[Se,Ce,we,Te]=Tx(E||!1,T,D,e=>b||xe?!1:e),Ee=S.useMemo(()=>(F||[]).some(e=>[` `,`\r -`].includes(e)),[F]),De=(e,t,n)=>{if(fe&&xx(_)&&f.length>=_)return;let r=!0,i=e;k?.(null);let a=Lee(e,F,xx(_)?_-f.length:void 0),o=n?null:a;return y!==`combobox`&&o&&(i=``,P?.(o),we(!1),r=!1),N&&ye!==i&&N(i,{source:t?`typing`:`effect`}),e&&t&&r&&we(!0),r},Oe=e=>{!e||!e.trim()||N(e,{source:`submit`})};S.useEffect(()=>{!Se&&!fe&&y!==`combobox`&&De(``,!1,!1)},[Se]),S.useEffect(()=>{b&&(we(!1),_e(!1))},[b,Ce]);let[ke,Ae]=mx(),je=S.useRef(!1),Me=e=>{let t=ke(),{key:n}=e,r=n===`Enter`,i=n===` `;if(r||i){let t=y===`combobox`;(i&&!(t||s)||r&&!t)&&e.preventDefault(),Ce||we(!0)}if(Ae(!!ye),n===`Backspace`&&!t&&fe&&!ye&&f.length){let e=[...f],t=null;for(let n=e.length-1;n>=0;--n){let r=e[n];if(!r.disabled){e.splice(n,1),t=r;break}}t&&p(e,{type:`remove`,values:[t]})}Ce&&(!r||!je.current)&&!i&&(r&&(je.current=!0),he.current?.onKeyDown(e)),q?.(e)},Ne=(e,...t)=>{Ce&&he.current?.onKeyUp(e,...t),e.key===`Enter`&&(je.current=!1),ce?.(e,...t)},Pe=In(e=>{p(f.filter(t=>t!==e),{type:`remove`,values:[e]})}),Fe=()=>{je.current=!1},Ie=()=>[kr(pe.current),me.current?.getPopupElement()];gx(Ie,Ce,we,!!ve.root);let Le=S.useRef(!1),Re=e=>{_e(!0),b||(oe.includes(`focus`)&&we(!0),K?.(e))},ze=()=>{Ce&&!Le.current&&we(!1,{cancelFun:()=>hx(Ie(),document.activeElement)})},Be=e=>{_e(!1),ye&&(y===`tags`?N(ye,{source:`submit`}):y===`multiple`&&N(``,{source:`blur`})),ze(),b||se?.(e)},Ve=(e,...t)=>{let{target:n}=e;(me.current?.getPopupElement())?.contains(n)&&we&&we(!0),le?.(e,...t),Le.current=!0,Ex(()=>{Le.current=!1})},[,He]=S.useState({});function Ue(){He({})}let We;ve.root&&(We=e=>{we(e)});let Ge=S.useMemo(()=>({...e,notFoundContent:h,open:Ce,triggerOpen:Ce,rawOpen:Se,id:n,showSearch:s,multiple:fe,toggleOpen:we,showScrollBar:l,styles:a,classNames:o,lockOptions:Te}),[e,h,we,n,s,fe,Ce,Se,l,a,o,Te]),Ke=S.useMemo(()=>{let e=R??z;return typeof e==`function`?e({searchValue:ye,open:Ce,focused:ge,showSearch:s,loading:x}):e},[R,z,ye,Ce,ge,s,x]),qe=()=>{g?.(),pe.current?.focus(),p([],{type:`clear`,values:f}),De(``,!1,!1)},{allowClear:Je,clearIcon:Ye}=dx(r,f,I,B,b,ye,y),Xe=S.createElement(V,{ref:he}),Ze=J(r,i,{[`${r}-focused`]:ge,[`${r}-multiple`]:fe,[`${r}-single`]:!fe,[`${r}-allow-clear`]:Je,[`${r}-show-arrow`]:Ke!=null,[`${r}-disabled`]:b,[`${r}-loading`]:x,[`${r}-open`]:Ce,[`${r}-customize-input`]:be,[`${r}-show-search`]:s}),Qe=S.createElement(uS,fS({},de,{ref:pe,prefixCls:r,className:Ze,focused:ge,prefix:L,suffix:Ke,clearIcon:Ye,multiple:fe,mode:y,displayValues:f,placeholder:v,searchValue:ye,activeValue:O,onSearch:De,onSearchSubmit:Oe,onInputBlur:Fe,onFocus:Re,onBlur:Be,onClearMouseDown:qe,onKeyDown:Me,onKeyUp:Ne,onSelectorRemove:Pe,tokenWithEnter:Ee,onMouseDown:Ve,components:ve}));return Qe=S.createElement(yx,{ref:me,disabled:b,prefixCls:r,visible:Ce,popupElement:Xe,animation:H,transitionName:U,popupStyle:W,popupClassName:ee,direction:u,popupMatchSelectWidth:te,popupRender:ne,popupAlign:re,placement:ie,builtinPlacements:ae,getPopupContainer:G,empty:m,onPopupVisibleChange:We,onPopupMouseEnter:Ue,onPopupMouseDown:Ve,onPopupBlur:ze},Qe),S.createElement(fx.Provider,{value:Ge},S.createElement(wx,{visible:ge&&!Ce,values:f}),Qe)}),hS=()=>null;hS.isSelectOptGroup=!0;var gS=()=>null;gS.isSelectOption=!0;var _S=S.forwardRef(({height:e,offsetY:t,offsetX:n,children:r,prefixCls:i,onInnerResize:a,innerProps:o,rtl:s,extra:c},l)=>{let u={},d={display:`flex`,flexDirection:`column`};return t!==void 0&&(u={height:e,position:`relative`,overflow:`hidden`},d={...d,transform:`translateY(${t}px)`,[s?`marginRight`:`marginLeft`]:-n,position:`absolute`,left:0,right:0,top:0}),S.createElement(`div`,{style:u},S.createElement(Wr,{onResize:({offsetHeight:e})=>{e&&a&&a()}},S.createElement(`div`,hg({style:d,className:J({[`${i}-holder-inner`]:i}),ref:l},o),r,c)))});_S.displayName=`Filler`;function vS({children:e,setRef:t}){let n=S.useCallback(e=>{t(e)},[]);return S.cloneElement(e,{ref:n})}function yS(e,t,n,r,i,a,o,{getKey:s}){return e.slice(t,n+1).map((e,n)=>{let c=o(e,t+n,{style:{width:r},offsetX:i}),l=s(e);return S.createElement(vS,{key:l,setRef:t=>a(e,t)},c)})}function bS(e,t,n){let r=e.length,i=t.length,a,o;if(r===0&&i===0)return null;r{let a=bS(r||[],e||[],t);a?.index!==void 0&&(n?.(a.index),o(e[a.index])),i(e)},[e]),[a]}var SS=typeof navigator==`object`&&/Firefox/i.test(navigator.userAgent),CS=((e,t,n,r)=>{let i=(0,S.useRef)(!1),a=(0,S.useRef)(null);function o(){clearTimeout(a.current),i.current=!0,a.current=setTimeout(()=>{i.current=!1},50)}let s=(0,S.useRef)({top:e,bottom:t,left:n,right:r});return s.current.top=e,s.current.bottom=t,s.current.left=n,s.current.right=r,(e,t,n=!1)=>{let r=e?t<0&&s.current.left||t>0&&s.current.right:t<0&&s.current.top||t>0&&s.current.bottom;return n&&r?(clearTimeout(a.current),i.current=!1):(!r||i.current)&&o(),!i.current&&r}});function wS(e,t,n,r,i,a,o){let s=(0,S.useRef)(0),c=(0,S.useRef)(null),l=(0,S.useRef)(null),u=(0,S.useRef)(!1),d=CS(t,n,r,i);function f(e,t){if(ri.cancel(c.current),d(!1,t))return;let n=e;if(!n._virtualHandled)n._virtualHandled=!0;else return;s.current+=t,l.current=t,SS||n.preventDefault(),c.current=ri(()=>{let e=u.current?10:1;o(s.current*e,!1),s.current=0})}function p(e,t){o(t,!0),SS||e.preventDefault()}let m=(0,S.useRef)(null),h=(0,S.useRef)(null);function g(t){if(!e)return;ri.cancel(h.current),h.current=ri(()=>{m.current=null},2);let{deltaX:n,deltaY:r,shiftKey:i}=t,o=n,s=r;(m.current===`sx`||!m.current&&i&&r&&!n)&&(o=r,s=0,m.current=`sx`);let c=Math.abs(o),l=Math.abs(s);m.current===null&&(m.current=a&&c>l?`x`:`y`),m.current===`y`?f(t,s):p(t,o)}function _(t){e&&(u.current=t.detail===l.current)}return[g,_]}function TS(e,t,n,r){let[i,a]=S.useMemo(()=>[new Map,[]],[e,n.id,r]);return(o,s=o)=>{let c=i.get(o),l=i.get(s);if(c===void 0||l===void 0){let u=e.length;for(let d=a.length;d{let e=!1;a.current.forEach((t,n)=>{if(t&&t.offsetParent){let{offsetHeight:r}=t,{marginTop:i,marginBottom:a}=getComputedStyle(t),s=DS(i),c=DS(a),l=r+s+c;o.current.get(n)!==l&&(o.current.set(n,l),e=!0)}}),e&&i(e=>e+1)};if(e)t();else{s.current+=1;let e=s.current;Promise.resolve().then(()=>{e===s.current&&t()})}}function u(r,i){let o=e(r),s=a.current.get(o);i?(a.current.set(o,i),l()):a.current.delete(o),!s!=!i&&(i?t?.(r):n?.(r))}return(0,S.useEffect)(()=>c,[]),[u,l,o.current,r]}var kS=14/15;function AS(e,t,n){let r=(0,S.useRef)(!1),i=(0,S.useRef)(0),a=(0,S.useRef)(0),o=(0,S.useRef)(null),s=(0,S.useRef)(null),c,l=e=>{if(r.current){let t=Math.ceil(e.touches[0].pageX),r=Math.ceil(e.touches[0].pageY),o=i.current-t,c=a.current-r,l=Math.abs(o)>Math.abs(c);l?i.current=t:a.current=r;let u=n(l,l?o:c,!1,e);u&&e.preventDefault(),clearInterval(s.current),u&&(s.current=setInterval(()=>{l?o*=kS:c*=kS;let e=Math.floor(l?o:c);(!n(l,e,!0)||Math.abs(e)<=.1)&&clearInterval(s.current)},16))}},u=()=>{r.current=!1,c()},d=e=>{c(),e.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(e.touches[0].pageX),a.current=Math.ceil(e.touches[0].pageY),o.current=e.target,o.current.addEventListener(`touchmove`,l,{passive:!1}),o.current.addEventListener(`touchend`,u,{passive:!0}))};c=()=>{o.current&&(o.current.removeEventListener(`touchmove`,l),o.current.removeEventListener(`touchend`,u))},zn(()=>(e&&t.current.addEventListener(`touchstart`,d,{passive:!0}),()=>{t.current?.removeEventListener(`touchstart`,d),c(),clearInterval(s.current)}),[e])}function jS(e){return Math.floor(e**.5)}function MS(e,t){return(`touches`in e?e.touches[0]:e)[t?`pageX`:`pageY`]-window[t?`scrollX`:`scrollY`]}function NS(e,t,n){S.useEffect(()=>{let r=t.current;if(e&&r){let e=!1,t,i,a=()=>{ri.cancel(t)},o=()=>{a(),t=ri(()=>{n(i),o()})},s=()=>{e=!1,a()},c=t=>{if(t.target.draggable||t.button!==0)return;let n=t;n._virtualHandled||(n._virtualHandled=!0,e=!0)},l=t=>{if(e){let e=MS(t,!1),{top:n,bottom:s}=r.getBoundingClientRect();e<=n?(i=-jS(n-e),o()):e>=s?(i=jS(e-s),o()):a()}};return r.addEventListener(`mousedown`,c),r.ownerDocument.addEventListener(`mouseup`,s),r.ownerDocument.addEventListener(`mousemove`,l),r.ownerDocument.addEventListener(`dragend`,s),()=>{r.removeEventListener(`mousedown`,c),r.ownerDocument.removeEventListener(`mouseup`,s),r.ownerDocument.removeEventListener(`mousemove`,l),r.ownerDocument.removeEventListener(`dragend`,s),a()}}},[e])}var PS=10;function FS(e,t,n,r,i,a,o,s){let c=S.useRef(),[l,u]=S.useState(null);return zn(()=>{if(l&&l.times({...e}));return}a();let{targetAlign:s,originAlign:c,index:d,offset:f}=l,p=e.current.clientHeight,m=!1,h=s,g=null;if(p){let a=s||c,u=0,_=0,v=0,y=Math.min(t.length-1,d);for(let e=0;e<=y;e+=1){let a=i(t[e]);_=u;let o=n.get(a);v=_+(o===void 0?r:o),u=v}let b=a===`top`?f:p-f;for(let e=y;e>=0;--e){let r=i(t[e]),a=n.get(r);if(a===void 0){m=!0;break}if(b-=a,b<=0)break}switch(a){case`top`:g=_-f;break;case`bottom`:g=v-p+f;break;default:{let{scrollTop:t}=e.current,n=t+p;_n&&(h=`bottom`)}}g!==null&&o(g),g!==l.lastTop&&(m=!0)}m&&u({...l,times:l.times+1,targetAlign:h,lastTop:g})}},[l,e.current]),e=>{if(e==null){s();return}if(ri.cancel(c.current),typeof e==`number`)o(e);else if(e&&typeof e==`object`){let n,{align:r}=e;`index`in e?{index:n}=e:n=t.findIndex(t=>i(t)===e.key);let{offset:a=0}=e;u({times:0,index:n,offset:a,originAlign:r})}}}var IS=S.forwardRef((e,t)=>{let{prefixCls:n,rtl:r,scrollOffset:i,scrollRange:a,onStartMove:o,onStopMove:s,onScroll:c,horizontal:l,spinSize:u,containerSize:d,style:f,thumbStyle:p,showScrollBar:m}=e,[h,g]=S.useState(!1),[_,v]=S.useState(null),[y,b]=S.useState(null),x=!r,C=S.useRef(),w=S.useRef(),[T,E]=S.useState(m),D=S.useRef(),O=()=>{m===!0||m===!1||(clearTimeout(D.current),E(!0),D.current=setTimeout(()=>{E(!1)},3e3))},k=a-d||0,A=d-u||0,j=S.useMemo(()=>i===0||k===0?0:i/k*A,[i,k,A]),M=e=>{e.stopPropagation(),e.preventDefault()},N=S.useRef({top:j,dragging:h,pageY:_,startTop:y});N.current={top:j,dragging:h,pageY:_,startTop:y};let P=e=>{g(!0),v(MS(e,l)),b(N.current.top),o(),e.stopPropagation(),e.preventDefault()};S.useEffect(()=>{let e=e=>{e.preventDefault()},t=C.current,n=w.current;return t.addEventListener(`touchstart`,e,{passive:!1}),n.addEventListener(`touchstart`,P,{passive:!1}),()=>{t.removeEventListener(`touchstart`,e),n.removeEventListener(`touchstart`,P)}},[]);let F=S.useRef();F.current=k;let I=S.useRef();I.current=A,S.useEffect(()=>{if(h){let e,t=t=>{let{dragging:n,pageY:r,startTop:i}=N.current;ri.cancel(e);let a=C.current.getBoundingClientRect(),o=d/(l?a.width:a.height);if(n){let n=(MS(t,l)-r)*o,a=i;!x&&l?a-=n:a+=n;let s=F.current,u=I.current,d=u?a/u:0,f=Math.ceil(d*s);f=Math.max(f,0),f=Math.min(f,s),e=ri(()=>{c(f,l)})}},n=()=>{g(!1),s()};return window.addEventListener(`mousemove`,t,{passive:!0}),window.addEventListener(`touchmove`,t,{passive:!0}),window.addEventListener(`mouseup`,n,{passive:!0}),window.addEventListener(`touchend`,n,{passive:!0}),()=>{window.removeEventListener(`mousemove`,t),window.removeEventListener(`touchmove`,t),window.removeEventListener(`mouseup`,n),window.removeEventListener(`touchend`,n),ri.cancel(e)}}},[h]),S.useEffect(()=>(O(),()=>{clearTimeout(D.current)}),[i]),S.useImperativeHandle(t,()=>({delayHidden:O}));let L=`${n}-scrollbar`,R={position:`absolute`,visibility:T?null:`hidden`},z={position:`absolute`,borderRadius:99,background:`var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))`,cursor:`pointer`,userSelect:`none`};return l?(Object.assign(R,{height:8,left:0,right:0,bottom:0}),Object.assign(z,{height:`100%`,width:u,[x?`left`:`right`]:j})):(Object.assign(R,{width:8,top:0,bottom:0,[x?`right`:`left`]:0}),Object.assign(z,{width:`100%`,height:u,top:j})),S.createElement(`div`,{ref:C,className:J(L,{[`${L}-horizontal`]:l,[`${L}-vertical`]:!l,[`${L}-visible`]:T}),style:{...R,...f},onMouseDown:M,onMouseMove:O},S.createElement(`div`,{ref:w,className:J(`${L}-thumb`,{[`${L}-thumb-moving`]:h}),style:{...z,...p},onMouseDown:P}))}),LS=20;function RS(e=0,t=0){let n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,LS),Math.floor(n)}var zS=[],BS={overflowY:`auto`,overflowAnchor:`none`};function VS(e,t){let{prefixCls:n=`rc-virtual-list`,className:r,height:i,itemHeight:a,fullHeight:o=!0,style:s,data:c,children:l,itemKey:u,virtual:d,direction:f,scrollWidth:p,component:m=`div`,onScroll:h,onVirtualScroll:g,onVisibleChange:_,innerProps:v,extraRender:y,styles:b,showScrollBar:x=`optional`,...C}=e,w=S.useCallback(e=>typeof u==`function`?u(e):e?.[u],[u]),[T,E,D,O]=OS(w,null,null),k=!!(d!==!1&&i&&a),A=S.useMemo(()=>Object.values(D.maps).reduce((e,t)=>e+t,0),[D.id,D.maps]),j=k&&c&&(Math.max(a*c.length,A)>i||!!p),M=f===`rtl`,N=J(n,{[`${n}-rtl`]:M},r),P=c||zS,F=(0,S.useRef)(),I=(0,S.useRef)(),L=(0,S.useRef)(),[R,z]=(0,S.useState)(0),[B,V]=(0,S.useState)(0),[H,U]=(0,S.useState)(!1),W=()=>{U(!0)},ee=()=>{U(!1)},te={getKey:w};function ne(e){z(t=>{let n;n=typeof e==`function`?e(t):e;let r=ge(n);return F.current.scrollTop=r,r})}let re=(0,S.useRef)({start:0,end:P.length}),ie=(0,S.useRef)(),[ae]=xS(P,w);ie.current=ae;let{scrollHeight:G,start:oe,end:K,offset:se}=S.useMemo(()=>{if(!k)return{scrollHeight:void 0,start:0,end:P.length-1,offset:void 0};if(!j)return{scrollHeight:I.current?.offsetHeight||0,start:0,end:P.length-1,offset:void 0};let e=0,t,n,r,o=P.length;for(let s=0;s=R&&t===void 0&&(t=s,n=e),u>R+i&&r===void 0&&(r=s),e=u}return t===void 0&&(t=0,n=0,r=Math.ceil(i/a)),r===void 0&&(r=P.length-1),r=Math.min(r+1,P.length-1),{scrollHeight:e,start:t,end:r,offset:n}},[j,k,R,P,O,i]);re.current.start=oe,re.current.end=K,S.useLayoutEffect(()=>{let e=D.getRecord();if(e.size===1){let t=Array.from(e.keys())[0],n=e.get(t),r=P[oe];if(r&&n===void 0&&w(r)===t){let e=D.get(t)-a;ne(t=>t+e)}}D.resetRecord()},[G]);let[ce,q]=S.useState({width:0,height:i}),le=e=>{q({width:e.offsetWidth,height:e.offsetHeight})},ue=(0,S.useRef)(),de=(0,S.useRef)(),fe=S.useMemo(()=>RS(ce.width,p),[ce.width,p]),pe=S.useMemo(()=>RS(ce.height,G),[ce.height,G]),me=G-i,he=(0,S.useRef)(me);he.current=me;function ge(e){let t=e;return Number.isNaN(he.current)||(t=Math.min(t,he.current)),t=Math.max(t,0),t}let _e=R<=0,ve=R>=me,ye=B<=0,be=B>=p,xe=CS(_e,ve,ye,be),Se=()=>({x:M?-B:B,y:R}),Ce=(0,S.useRef)(Se()),we=In(e=>{if(g){let t={...Se(),...e};(Ce.current.x!==t.x||Ce.current.y!==t.y)&&(g(t),Ce.current=t)}});function Te(e,t){let n=e;t?((0,Jf.flushSync)(()=>{V(n)}),we()):ne(n)}function Ee(e){let{scrollTop:t}=e.currentTarget;t!==R&&ne(t),h?.(e),we()}let De=e=>{let t=e,n=p?p-ce.width:0;return t=Math.max(t,0),t=Math.min(t,n),t},Oe=In((e,t)=>{t?((0,Jf.flushSync)(()=>{V(t=>De(t+(M?-e:e)))}),we()):ne(t=>t+e)}),[ke,Ae]=wS(k,_e,ve,ye,be,!!p,Oe);AS(k,F,(e,t,n,r)=>{let i=r;return xe(e,t,n)?!1:!i||!i._virtualHandled?(i&&(i._virtualHandled=!0),ke({preventDefault(){},deltaX:e?t:0,deltaY:e?0:t}),!0):!1}),NS(j,F,e=>{ne(t=>t+e)}),zn(()=>{function e(e){let t=_e&&e.detail<0,n=ve&&e.detail>0;k&&!t&&!n&&e.preventDefault()}let t=F.current;return t.addEventListener(`wheel`,ke,{passive:!1}),t.addEventListener(`DOMMouseScroll`,Ae,{passive:!0}),t.addEventListener(`MozMousePixelScroll`,e,{passive:!1}),()=>{t.removeEventListener(`wheel`,ke),t.removeEventListener(`DOMMouseScroll`,Ae),t.removeEventListener(`MozMousePixelScroll`,e)}},[k,_e,ve]),zn(()=>{if(p){let e=De(B);V(e),we({x:e})}},[ce.width,p]);let je=()=>{ue.current?.delayHidden(),de.current?.delayHidden()},Me=FS(F,P,D,a,w,()=>E(!0),ne,je);S.useImperativeHandle(t,()=>({nativeElement:L.current,getScrollInfo:Se,scrollTo:e=>{function t(e){return e&&typeof e==`object`&&(`left`in e||`top`in e)}t(e)?(e.left!==void 0&&V(De(e.left)),Me(e.top)):Me(e)}})),zn(()=>{_&&_(P.slice(oe,K+1),P)},[oe,K,P]);let Ne=TS(P,w,D,a),Pe=y?.({start:oe,end:K,virtual:j,offsetX:B,offsetY:se,rtl:M,getSize:Ne}),Fe=yS(P,oe,K,p,B,T,l,te),Ie=null;i&&(Ie={[o?`height`:`maxHeight`]:i,...BS},k&&(Ie.overflowY=`hidden`,p&&(Ie.overflowX=`hidden`),H&&(Ie.pointerEvents=`none`)));let Le={};return M&&(Le.dir=`rtl`),S.createElement(`div`,hg({ref:L,style:{...s,position:`relative`},className:N},Le,C),S.createElement(Wr,{onResize:le},S.createElement(m,{className:`${n}-holder`,style:Ie,ref:F,onScroll:Ee,onMouseEnter:je},S.createElement(_S,{prefixCls:n,height:G,offsetX:B,offsetY:se,scrollWidth:p,onInnerResize:E,ref:I,innerProps:v,rtl:M,extra:Pe},Fe))),j&&G>i&&S.createElement(IS,{ref:ue,prefixCls:n,scrollOffset:R,scrollRange:G,rtl:M,onScroll:Te,onStartMove:W,onStopMove:ee,spinSize:pe,containerSize:ce.height,style:b?.verticalScrollBar,thumbStyle:b?.verticalScrollBarThumb,showScrollBar:x}),j&&p>ce.width&&S.createElement(IS,{ref:de,prefixCls:n,scrollOffset:B,scrollRange:p,rtl:M,onScroll:Te,onStartMove:W,onStopMove:ee,spinSize:fe,containerSize:ce.width,horizontal:!0,style:b?.horizontalScrollBar,thumbStyle:b?.horizontalScrollBarThumb,showScrollBar:x}))}var HS=S.forwardRef(VS);HS.displayName=`List`;var US=HS;function WS(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}function GS(){return GS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,id:r,open:i,multiple:a,mode:o,searchValue:s,toggleOpen:c,notFoundContent:l,onPopupScroll:u,showScrollBar:d,lockOptions:f}=px(),{maxCount:p,flattenOptions:m,onActiveValue:h,defaultActiveFirstOption:g,onSelect:_,menuItemSelectedIcon:v,rawValues:y,fieldNames:b,virtual:x,direction:C,listHeight:w,listItemHeight:T,optionRender:E,classNames:D,styles:O}=S.useContext(Nx),k=`${n}-item`,A=Gn(()=>m,[i,f],(e,t)=>t[0]&&!t[1]),j=S.useRef(null),M=S.useMemo(()=>a&&xx(p)&&y?.size>=p,[a,p,y?.size]),N=e=>{e.preventDefault()},P=e=>{j.current?.scrollTo(typeof e==`number`?{index:e}:e)},F=S.useCallback(e=>o===`combobox`?!1:y.has(e),[o,[...y].toString(),y.size]),I=(e,t=1)=>{let n=A.length;for(let r=0;rI(0)),z=(e,t=!1)=>{R(e);let n={source:t?`keyboard`:`mouse`},r=A[e];if(!r){h(null,-1,n);return}h(r.value,e,n)};(0,S.useEffect)(()=>{z(g===!1?-1:I(0))},[A.length,s]);let B=S.useCallback(e=>o===`combobox`?String(e).toLowerCase()===s.toLowerCase():y.has(e),[o,s,[...y].toString(),y.size]);(0,S.useEffect)(()=>{let e;if(!a&&i&&y.size===1){let t=Array.from(y)[0],n=A.findIndex(({data:e})=>s?String(e.value).startsWith(s):e.value===t);n!==-1&&(z(n),e=setTimeout(()=>{P(n)}))}return i&&j.current?.scrollTo(void 0),()=>clearTimeout(e)},[i,s]);let V=e=>{e!==void 0&&_(e,{selected:!y.has(e)}),a||c(!1)};if(S.useImperativeHandle(t,()=>({onKeyDown:e=>{let{which:t,ctrlKey:n}=e;switch(t){case om.N:case om.P:case om.UP:case om.DOWN:{let e=0;if(t===om.UP?e=-1:t===om.DOWN?e=1:WS()&&n&&(t===om.N?e=1:t===om.P&&(e=-1)),e!==0){let t=I(L+e,e);P(t),z(t,!0)}break}case om.TAB:case om.ENTER:{let t=A[L];if(!t||t.data.disabled)return V(void 0);!M||y.has(t.value)?V(t.value):V(void 0),i&&e.preventDefault();break}case om.ESC:c(!1),i&&e.stopPropagation()}},onKeyUp:()=>{},scrollTo:e=>{P(e)}})),A.length===0)return S.createElement(`div`,{role:`listbox`,id:`${r}_list`,className:`${k}-empty`,onMouseDown:N},l);let H=Object.keys(b).map(e=>b[e]),U=e=>e.label;function W(e,t){let{group:n}=e;return{role:n?`presentation`:`option`,id:`${r}_list_${t}`}}let ee=e=>{let t=A[e];if(!t)return null;let n=t.data||{},{value:r,disabled:i}=n,{group:a}=t,o=Vu(n,!0),s=U(t);return t?S.createElement(`div`,GS({"aria-label":typeof s==`string`&&!a?s:null},o,{key:e},W(t,e),{"aria-selected":B(r),"aria-disabled":i}),r):null},te={role:`listbox`,id:`${r}_list`};return S.createElement(S.Fragment,null,x&&S.createElement(`div`,GS({},te,{style:{height:0,width:0,overflow:`hidden`}}),ee(L-1),ee(L),ee(L+1)),S.createElement(US,{itemKey:`key`,ref:j,data:A,height:w,itemHeight:T,fullHeight:!1,onMouseDown:N,onScroll:u,virtual:x,direction:C,innerProps:x?null:te,showScrollBar:d,className:D?.popup?.list,style:O?.popup?.list},(e,t)=>{let{group:n,groupOption:r,data:i,label:a,value:o}=e,{key:s}=i;if(n){let e=i.title??(KS(a)?a.toString():void 0);return S.createElement(`div`,{className:J(k,`${k}-group`,i.className),title:e},a===void 0?s:a)}let{disabled:c,title:l,children:u,style:d,className:f,...p}=i,m=Sr(p,H),h=F(o),g=c||!h&&M,_=`${k}-option`,y=J(k,_,f,D?.popup?.listItem,{[`${_}-grouped`]:r,[`${_}-active`]:L===t&&!g,[`${_}-disabled`]:g,[`${_}-selected`]:h}),b=U(e),C=!v||typeof v==`function`||h,w=typeof b==`number`?b:b||o,T=KS(w)?w.toString():void 0;return l!==void 0&&(T=l),S.createElement(`div`,GS({},Vu(m),x?{}:W(e,t),{"aria-selected":x?void 0:B(o),"aria-disabled":g,className:y,title:T,onMouseMove:()=>{L===t||g||z(t)},onClick:()=>{g||V(o)},style:{...O?.popup?.listItem,...d}}),S.createElement(`div`,{className:`${_}-content`},typeof E==`function`?E(e,{index:t}):w),S.isValidElement(v)||h,C&&S.createElement(tS,{className:`${k}-option-state`,customizeIcon:v,customizeIconProps:{value:o,disabled:g,isSelected:h}},h?`✓`:null))}))}),JS=((e,t)=>{let n=S.useRef({values:new Map,options:new Map});return[S.useMemo(()=>{let{values:r,options:i}=n.current,a=e.map(e=>e.label===void 0?{...e,label:r.get(e.value)?.label}:e),o=new Map,s=new Map;return a.forEach(e=>{o.set(e.value,e),s.set(e.value,t.get(e.value)||i.get(e.value))}),n.current.values=o,n.current.options=s,a},[e,t]),S.useCallback(e=>t.get(e)||n.current.options.get(e),[t])]});function YS(e,t){return Px(e).join(``).toUpperCase().includes(t)}var XS=((e,t,n,r,i)=>S.useMemo(()=>{if(!n||r===!1)return e;let{options:a,label:o,value:s}=t,c=[],l=typeof r==`function`,u=n.toUpperCase(),d=l?r:(e,t)=>i&&i.length?i.some(e=>YS(t[e],u)):t[a]?YS(t[o===`children`?`label`:o],u):YS(t[s],u),f=l?e=>Cx(e):e=>e;return e.forEach(e=>{if(e[a]){if(d(n,f(e)))c.push(e);else{let t=e[a].filter(e=>d(n,f(e)));t.length&&c.push({...e,[a]:t})}return}d(n,f(e))&&c.push(e)}),c},[e,r,i,n,t]));function ZS(e){let{key:t,props:{children:n,value:r,...i}}=e;return{key:t,value:r===void 0?t:r,children:n,...i}}function QS(e,t=!1){return Cr(e).map((e,n)=>{if(!S.isValidElement(e)||!e.type)return null;let{type:{isSelectOptGroup:r},key:i,props:{children:a,...o}}=e;return t||!r?ZS(e):{key:`__RC_SELECT_GRP__${i===null?n:i}__`,label:i,...o,options:QS(a)}}).filter(e=>e)}var $S=(e,t,n,r,i)=>S.useMemo(()=>{let a=e;e||(a=QS(t));let o=new Map,s=new Map,c=(e,t,n)=>{n&&typeof n==`string`&&e.set(t[n],t)},l=(e,t=!1)=>{for(let a=0;a{c(s,u,e)}),c(s,u,i)):l(u[n.options],!0)}};return l(a),{options:a,valueOptions:o,labelOptions:s}},[e,t,n,r,i]);function eC(e){let t=S.useRef();return t.current=e,S.useCallback((...e)=>t.current(...e),[])}function tC(e,t,n){let{filterOption:r,searchValue:i,optionFilterProp:a,filterSort:o,onSearch:s,autoClearSearchValue:c}=t;return S.useMemo(()=>{let t=typeof e==`object`,l={filterOption:r,searchValue:i,optionFilterProp:a,filterSort:o,onSearch:s,autoClearSearchValue:c,...t?e:{}};return[t||n===`combobox`||n===`tags`||n===`multiple`&&e===void 0?!0:e,l]},[n,e,r,i,a,o,s,c])}function nC(){return nC=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,mode:r,prefixCls:i=`rc-select`,backfill:a,fieldNames:o,showSearch:s,searchValue:c,onSearch:l,autoClearSearchValue:u,filterOption:d,optionFilterProp:f,filterSort:p,onSelect:m,onDeselect:h,onActive:g,popupMatchSelectWidth:_=!0,optionLabelProp:v,options:y,optionRender:b,children:x,defaultActiveFirstOption:C,menuItemSelectedIcon:w,virtual:T,direction:E,listHeight:D=200,listItemHeight:O=20,labelRender:k,value:A,defaultValue:j,labelInValue:M,onChange:N,maxCount:P,classNames:F,styles:I,...L}=e,[R,z]=tC(s,{searchValue:c,onSearch:l,autoClearSearchValue:u,filterOption:d,optionFilterProp:f,filterSort:p},r),{filterOption:B,searchValue:V,optionFilterProp:H,filterSort:U,onSearch:W,autoClearSearchValue:ee=!0}=z,te=S.useMemo(()=>H?Array.isArray(H)?H:[H]:[],[H]),ne=zf(n),re=pS(r),ie=!!(!y&&x),ae=S.useMemo(()=>B===void 0&&r===`combobox`?!1:B,[B,r]),G=S.useMemo(()=>Sx(o,ie),[JSON.stringify(o),ie]),[oe,K]=Hn(``,V),se=oe||``,ce=$S(y,x,G,te,v),{valueOptions:q,labelOptions:le,options:ue}=ce,de=S.useCallback(e=>Px(e).map(e=>{let t,n,r,i;iC(e)?t=e:(n=e.label,t=e.value);let a=q.get(t);return a&&(n===void 0&&(n=a?.[v||G.label]),r=a?.disabled,i=a?.title),{label:n,value:t,key:t,disabled:r,title:i}}),[G,v,q]),[fe,pe]=Hn(j,A),[me,he]=JS(S.useMemo(()=>{let e=de(re&&fe===null?[]:fe);return r===`combobox`&&Ix(e[0]?.value)?[]:e},[fe,de,r,re]),q),ge=S.useMemo(()=>{if(!r&&me.length===1){let e=me[0];if(e.value===null&&(e.label===null||e.label===void 0))return[]}return me.map(e=>({...e,label:(typeof k==`function`?k(e):e.label)??e.value}))},[r,me,k]),_e=S.useMemo(()=>new Set(me.map(e=>e.value)),[me]);S.useEffect(()=>{if(r===`combobox`){let e=me[0]?.value;K(Fx(e)?String(e):``)}},[me]);let ve=eC((e,t)=>{let n=t??e;return{[G.value]:e,[G.label]:n}}),ye=XS(S.useMemo(()=>{if(r!==`tags`)return ue;let e=[...ue],t=e=>q.has(e);return[...me].sort((e,t)=>e.value{let r=n.value;t(r)||e.push(ve(r,n.label))}),e},[ve,ue,q,me,r]),G,se,ae,te),be=S.useMemo(()=>{let e=e=>te.length?te.some(t=>e?.[t]===se):e?.value===se;return r!==`tags`||!se||ye.some(t=>e(t))||ye.some(e=>e[G.value]===se)?ye:[ve(se),...ye]},[ve,te,r,ye,se,G]),xe=e=>[...e].sort((e,t)=>U(e,t,{searchValue:se})).map(e=>Array.isArray(e.options)?{...e,options:e.options.length>0?xe(e.options):e.options}:e),Se=S.useMemo(()=>U?xe(be):be,[be,U,se]),Ce=S.useMemo(()=>Iee(Se,{fieldNames:G,childrenAsData:ie}),[Se,G,ie]),we=e=>{let t=de(e);if(pe(t),N&&(t.length!==me.length||t.some((e,t)=>me[t]?.value!==e?.value))){let e=M?t.map(({label:e,value:t})=>({label:e,value:t})):t.map(e=>e.value),n=t.map(e=>Cx(he(e.value)));N(re?e:e[0],re?n:n[0])}},[Te,Ee]=S.useState(null),[De,Oe]=S.useState(0),ke=C===void 0?r!==`combobox`:C,Ae=S.useRef(),je=S.useCallback((e,t,{source:n=`keyboard`}={})=>{Oe(t),a&&r===`combobox`&&e!==null&&n===`keyboard`&&Ee(String(e));let i=Promise.resolve().then(()=>{Ae.current===i&&g?.(e)});Ae.current=i},[a,r,g]),Me=(e,t,n)=>{let r=()=>{let t=he(e);return[M?{label:t?.[G.label],value:e}:e,Cx(t)]};if(t&&m){let[e,t]=r();m(e,t)}else if(!t&&h&&n!==`clear`){let[e,t]=r();h(e,t)}},Ne=eC((e,t)=>{let n,i=re?t.selected:!0;n=i?re?[...me,e]:[e]:me.filter(t=>t.value!==e),we(n),Me(e,i),r===`combobox`?Ee(``):(!pS||ee)&&(K(``),Ee(``))}),Pe=(e,t)=>{we(e);let{type:n,values:r}=t;(n===`remove`||n===`clear`)&&r.forEach(e=>{Me(e.value,!1,n)})},Fe=(e,t)=>{if(K(e),Ee(null),t.source===`submit`){let t=(e||``).trim();t&&(we(Array.from(new Set([..._e,t]))),Me(t,!0),K(``));return}t.source!==`blur`&&(r===`combobox`&&we(e),W?.(e))},Ie=e=>{let t=e;r!==`tags`&&(t=e.map(e=>le.get(e)?.value).filter(e=>e!==void 0));let n=Array.from(new Set([..._e,...t]));we(n),n.forEach(e=>{Me(e,!0)})},Le=S.useMemo(()=>{let e=T!==!1&&_!==!1;return{...ce,flattenOptions:Ce,onActiveValue:je,defaultActiveFirstOption:ke,onSelect:Ne,menuItemSelectedIcon:w,rawValues:_e,fieldNames:G,virtual:e,direction:E,listHeight:D,listItemHeight:O,childrenAsData:ie,maxCount:P,optionRender:b,classNames:F,styles:I}},[P,ce,Ce,je,ke,Ne,w,_e,G,T,_,E,D,O,ie,b,F,I]);return S.createElement(Nx.Provider,{value:Le},S.createElement(mS,nC({},L,{id:ne,prefixCls:i,ref:t,omitDomProps:rC,mode:r,classNames:F,styles:I,displayValues:ge,onDisplayValuesChange:Pe,maxCount:P,direction:E,showSearch:R,searchValue:se,onSearch:Fe,autoClearSearchValue:ee,onSearchSplit:Ie,popupMatchSelectWidth:_,OptionList:qS,emptyOptions:!Ce.length,activeValue:Te,activeDescendantId:`${ne}_list_${De}`})))});aC.Option=gS,aC.OptGroup=hS;var oC=aC,sC=(e,t,n)=>J({[`${e}-status-success`]:t===`success`,[`${e}-status-warning`]:t===`warning`,[`${e}-status-error`]:t===`error`,[`${e}-status-validating`]:t===`validating`,[`${e}-has-feedback`]:n}),cC=(e,t)=>t||e,lC=()=>{let[,e]=Kc(),[t]=cd(`Empty`),n=new Rs(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return S.createElement(`svg`,{style:n,width:`184`,height:`152`,viewBox:`0 0 184 152`,xmlns:`http://www.w3.org/2000/svg`},S.createElement(`title`,null,t?.description||`Empty`),S.createElement(`g`,{fill:`none`,fillRule:`evenodd`},S.createElement(`g`,{transform:`translate(24 31.7)`},S.createElement(`ellipse`,{fillOpacity:`.8`,fill:`#F5F5F7`,cx:`67.8`,cy:`106.9`,rx:`67.8`,ry:`12.7`}),S.createElement(`path`,{fill:`#aeb8c2`,d:`M122 69.7 98.1 40.2a6 6 0 0 0-4.6-2.2H42.1a6 6 0 0 0-4.6 2.2l-24 29.5V85H122z`}),S.createElement(`path`,{fill:`#f5f5f7`,d:`M33.8 0h68a4 4 0 0 1 4 4v93.3a4 4 0 0 1-4 4h-68a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4`}),S.createElement(`path`,{fill:`#dce0e6`,d:`M42.7 10h50.2a2 2 0 0 1 2 2v25a2 2 0 0 1-2 2H42.7a2 2 0 0 1-2-2V12a2 2 0 0 1 2-2m.2 39.8h49.8a2.3 2.3 0 1 1 0 4.5H42.9a2.3 2.3 0 0 1 0-4.5m0 11.7h49.8a2.3 2.3 0 1 1 0 4.6H42.9a2.3 2.3 0 0 1 0-4.6m79 43.5a7 7 0 0 1-6.8 5.4H20.5a7 7 0 0 1-6.7-5.4l-.2-1.8V69.7h26.3c2.9 0 5.2 2.4 5.2 5.4s2.4 5.4 5.3 5.4h34.8c2.9 0 5.3-2.4 5.3-5.4s2.3-5.4 5.2-5.4H122v33.5q0 1-.2 1.8`})),S.createElement(`path`,{fill:`#dce0e6`,d:`m149.1 33.3-6.8 2.6a1 1 0 0 1-1.3-1.2l2-6.2q-4.1-4.5-4.2-10.4c0-10 10.1-18.1 22.6-18.1S184 8.1 184 18.1s-10.1 18-22.6 18q-6.8 0-12.3-2.8`}),S.createElement(`g`,{fill:`#fff`,transform:`translate(149.7 15.4)`},S.createElement(`circle`,{cx:`20.7`,cy:`3.2`,r:`2.8`}),S.createElement(`path`,{d:`M5.7 5.6H0L2.9.7zM9.3.7h5v5h-5z`}))))},uC=()=>{let[,e]=Kc(),[t]=cd(`Empty`),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:i,colorBgContainer:a}=e,{borderColor:o,shadowColor:s,contentColor:c}=(0,S.useMemo)(()=>({borderColor:new Rs(n).onBackground(a).toHexString(),shadowColor:new Rs(r).onBackground(a).toHexString(),contentColor:new Rs(i).onBackground(a).toHexString()}),[n,r,i,a]);return S.createElement(`svg`,{width:`64`,height:`41`,viewBox:`0 0 64 41`,xmlns:`http://www.w3.org/2000/svg`},S.createElement(`title`,null,t?.description||`Empty`),S.createElement(`g`,{transform:`translate(0 1)`,fill:`none`,fillRule:`evenodd`},S.createElement(`ellipse`,{fill:s,cx:`32`,cy:`33`,rx:`32`,ry:`7`}),S.createElement(`g`,{fillRule:`nonzero`,stroke:o},S.createElement(`path`,{d:`M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z`}),S.createElement(`path`,{d:`M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3`,fill:c}))))},dC=e=>{let{componentCls:t,margin:n,marginXS:r,marginXL:i,fontSize:a,lineHeight:o}=e;return{[t]:{marginInline:r,fontSize:a,lineHeight:o,textAlign:`center`,[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:`100%`},svg:{maxWidth:`100%`,height:`100%`,margin:`auto`}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:i,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},fC=rl(`Empty`,e=>{let{componentCls:t,controlHeightLG:n,calc:r}=e;return dC(gs(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()}))}),pC=S.createElement(lC,null),mC=S.createElement(uC,null),hC=e=>{let{className:t,rootClassName:n,prefixCls:r,image:i,description:a,children:o,imageStyle:s,style:c,classNames:l,styles:u,...d}=e,{getPrefixCls:f,direction:p,className:m,style:h,classNames:g,styles:_,image:v}=li(`empty`),y=f(`empty`,r),[b,x]=fC(y),[C,w]=Fd([g,l],[_,u],{props:e}),[T]=cd(`Empty`),E=a===void 0?T?.description:a,D=typeof E==`string`?E:`empty`,O=i??v??pC,k=null;return k=typeof O==`string`?S.createElement(`img`,{draggable:!1,alt:D,src:O}):O,S.createElement(`div`,{className:J(b,x,y,m,{[`${y}-normal`]:O===mC,[`${y}-rtl`]:p===`rtl`},t,n,C.root),style:{...w.root,...h,...c},...d},S.createElement(`div`,{className:J(`${y}-image`,C.image),style:{...s,...w.image}},k),E&&S.createElement(`div`,{className:J(`${y}-description`,C.description),style:w.description},E),o&&S.createElement(`div`,{className:J(`${y}-footer`,C.footer),style:w.footer},o))};hC.PRESENTED_IMAGE_DEFAULT=pC,hC.PRESENTED_IMAGE_SIMPLE=mC;var gC=e=>{let{componentName:t}=e,{getPrefixCls:n}=(0,S.useContext)(oi),r=n(`empty`);switch(t){case`Table`:case`List`:return S.createElement(hC,{image:hC.PRESENTED_IMAGE_SIMPLE});case`Select`:case`TreeSelect`:case`Cascader`:case`Transfer`:case`Mentions`:return S.createElement(hC,{image:hC.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case`Table.filter`:return null;default:return S.createElement(hC,null)}},_C=(e,t,n)=>{let{variant:r,[e]:i}=S.useContext(oi),a=S.useContext(wy),o=i?.variant,s;s=t===void 0?n===!1?`borderless`:a??o??r??`outlined`:t;let c=ai.includes(s);return[s,c]},vC=e=>{let t={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e===`scroll`?`scroll`:`visible`,dynamicInset:!0};return{bottomLeft:{...t,points:[`tl`,`bl`],offset:[0,4]},bottomRight:{...t,points:[`tr`,`br`],offset:[0,4]},topLeft:{...t,points:[`bl`,`tl`],offset:[0,-4]},topRight:{...t,points:[`br`,`tr`],offset:[0,-4]}}};function yC(e,t){return e||vC(t)}var bC=e=>{let{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:i}=e;return{position:`relative`,display:`block`,minHeight:t,padding:i,color:e.colorText,fontWeight:`normal`,fontSize:n,lineHeight:r,boxSizing:`border-box`}},Ree=e=>{let{antCls:t,componentCls:n}=e,r=`${n}-item`,i=`&${t}-slide-up-enter${t}-slide-up-enter-active`,a=`&${t}-slide-up-appear${t}-slide-up-appear-active`,o=`&${t}-slide-up-leave${t}-slide-up-leave-active`,s=`${n}-dropdown-placement-`,c=`${r}-option-selected`;return[{[`${n}-dropdown`]:{...Jc(e),position:`absolute`,top:-9999,zIndex:e.zIndexPopup,boxSizing:`border-box`,padding:e.paddingXXS,overflow:`hidden`,fontSize:e.fontSize,fontVariant:`initial`,backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,[` +`].includes(e)),[F]),De=(e,t,n)=>{if(fe&&yx(_)&&f.length>=_)return;let r=!0,i=e;k?.(null);let a=zee(e,F,yx(_)?_-f.length:void 0),o=n?null:a;return y!==`combobox`&&o&&(i=``,P?.(o),we(!1),r=!1),N&&ye!==i&&N(i,{source:t?`typing`:`effect`}),e&&t&&r&&we(!0),r},Oe=e=>{!e||!e.trim()||N(e,{source:`submit`})};S.useEffect(()=>{!Se&&!fe&&y!==`combobox`&&De(``,!1,!1)},[Se]),S.useEffect(()=>{b&&(we(!1),_e(!1))},[b,Ce]);let[ke,Ae]=fx(),je=S.useRef(!1),Me=e=>{let t=ke(),{key:n}=e,r=n===`Enter`,i=n===` `;if(r||i){let t=y===`combobox`;(i&&!(t||s)||r&&!t)&&e.preventDefault(),Ce||we(!0)}if(Ae(!!ye),n===`Backspace`&&!t&&fe&&!ye&&f.length){let e=[...f],t=null;for(let n=e.length-1;n>=0;--n){let r=e[n];if(!r.disabled){e.splice(n,1),t=r;break}}t&&p(e,{type:`remove`,values:[t]})}Ce&&(!r||!je.current)&&!i&&(r&&(je.current=!0),he.current?.onKeyDown(e)),q?.(e)},Ne=(e,...t)=>{Ce&&he.current?.onKeyUp(e,...t),e.key===`Enter`&&(je.current=!1),ce?.(e,...t)},Pe=In(e=>{p(f.filter(t=>t!==e),{type:`remove`,values:[e]})}),Fe=()=>{je.current=!1},Ie=()=>[kr(pe.current),me.current?.getPopupElement()];mx(Ie,Ce,we,!!ve.root);let Le=S.useRef(!1),Re=e=>{_e(!0),b||(oe.includes(`focus`)&&we(!0),K?.(e))},ze=()=>{Ce&&!Le.current&&we(!1,{cancelFun:()=>px(Ie(),document.activeElement)})},Be=e=>{_e(!1),ye&&(y===`tags`?N(ye,{source:`submit`}):y===`multiple`&&N(``,{source:`blur`})),ze(),b||se?.(e)},Ve=(e,...t)=>{let{target:n}=e;(me.current?.getPopupElement())?.contains(n)&&we&&we(!0),le?.(e,...t),Le.current=!0,wx(()=>{Le.current=!1})},[,He]=S.useState({});function Ue(){He({})}let We;ve.root&&(We=e=>{we(e)});let Ge=S.useMemo(()=>({...e,notFoundContent:h,open:Ce,triggerOpen:Ce,rawOpen:Se,id:n,showSearch:s,multiple:fe,toggleOpen:we,showScrollBar:l,styles:a,classNames:o,lockOptions:Te}),[e,h,we,n,s,fe,Ce,Se,l,a,o,Te]),Ke=S.useMemo(()=>{let e=R??z;return typeof e==`function`?e({searchValue:ye,open:Ce,focused:ge,showSearch:s,loading:x}):e},[R,z,ye,Ce,ge,s,x]),qe=()=>{g?.(),pe.current?.focus(),p([],{type:`clear`,values:f}),De(``,!1,!1)},{allowClear:Je,clearIcon:Ye}=lx(r,f,I,B,b,ye,y),Xe=S.createElement(V,{ref:he}),Ze=J(r,i,{[`${r}-focused`]:ge,[`${r}-multiple`]:fe,[`${r}-single`]:!fe,[`${r}-allow-clear`]:Je,[`${r}-show-arrow`]:Ke!=null,[`${r}-disabled`]:b,[`${r}-loading`]:x,[`${r}-open`]:Ce,[`${r}-customize-input`]:be,[`${r}-show-search`]:s}),Qe=S.createElement(cS,uS({},de,{ref:pe,prefixCls:r,className:Ze,focused:ge,prefix:L,suffix:Ke,clearIcon:Ye,multiple:fe,mode:y,displayValues:f,placeholder:v,searchValue:ye,activeValue:O,onSearch:De,onSearchSubmit:Oe,onInputBlur:Fe,onFocus:Re,onBlur:Be,onClearMouseDown:qe,onKeyDown:Me,onKeyUp:Ne,onSelectorRemove:Pe,tokenWithEnter:Ee,onMouseDown:Ve,components:ve}));return Qe=S.createElement(_x,{ref:me,disabled:b,prefixCls:r,visible:Ce,popupElement:Xe,animation:H,transitionName:U,popupStyle:W,popupClassName:ee,direction:u,popupMatchSelectWidth:te,popupRender:ne,popupAlign:re,placement:ie,builtinPlacements:ae,getPopupContainer:G,empty:m,onPopupVisibleChange:We,onPopupMouseEnter:Ue,onPopupMouseDown:Ve,onPopupBlur:ze},Qe),S.createElement(ux.Provider,{value:Ge},S.createElement(Sx,{visible:ge&&!Ce,values:f}),Qe)}),pS=()=>null;pS.isSelectOptGroup=!0;var mS=()=>null;mS.isSelectOption=!0;var hS=S.forwardRef(({height:e,offsetY:t,offsetX:n,children:r,prefixCls:i,onInnerResize:a,innerProps:o,rtl:s,extra:c},l)=>{let u={},d={display:`flex`,flexDirection:`column`};return t!==void 0&&(u={height:e,position:`relative`,overflow:`hidden`},d={...d,transform:`translateY(${t}px)`,[s?`marginRight`:`marginLeft`]:-n,position:`absolute`,left:0,right:0,top:0}),S.createElement(`div`,{style:u},S.createElement(Wr,{onResize:({offsetHeight:e})=>{e&&a&&a()}},S.createElement(`div`,hg({style:d,className:J({[`${i}-holder-inner`]:i}),ref:l},o),r,c)))});hS.displayName=`Filler`;function gS({children:e,setRef:t}){let n=S.useCallback(e=>{t(e)},[]);return S.cloneElement(e,{ref:n})}function _S(e,t,n,r,i,a,o,{getKey:s}){return e.slice(t,n+1).map((e,n)=>{let c=o(e,t+n,{style:{width:r},offsetX:i}),l=s(e);return S.createElement(gS,{key:l,setRef:t=>a(e,t)},c)})}function vS(e,t,n){let r=e.length,i=t.length,a,o;if(r===0&&i===0)return null;r{let a=vS(r||[],e||[],t);a?.index!==void 0&&(n?.(a.index),o(e[a.index])),i(e)},[e]),[a]}var bS=typeof navigator==`object`&&/Firefox/i.test(navigator.userAgent),xS=((e,t,n,r)=>{let i=(0,S.useRef)(!1),a=(0,S.useRef)(null);function o(){clearTimeout(a.current),i.current=!0,a.current=setTimeout(()=>{i.current=!1},50)}let s=(0,S.useRef)({top:e,bottom:t,left:n,right:r});return s.current.top=e,s.current.bottom=t,s.current.left=n,s.current.right=r,(e,t,n=!1)=>{let r=e?t<0&&s.current.left||t>0&&s.current.right:t<0&&s.current.top||t>0&&s.current.bottom;return n&&r?(clearTimeout(a.current),i.current=!1):(!r||i.current)&&o(),!i.current&&r}});function SS(e,t,n,r,i,a,o){let s=(0,S.useRef)(0),c=(0,S.useRef)(null),l=(0,S.useRef)(null),u=(0,S.useRef)(!1),d=xS(t,n,r,i);function f(e,t){if(ri.cancel(c.current),d(!1,t))return;let n=e;if(!n._virtualHandled)n._virtualHandled=!0;else return;s.current+=t,l.current=t,bS||n.preventDefault(),c.current=ri(()=>{let e=u.current?10:1;o(s.current*e,!1),s.current=0})}function p(e,t){o(t,!0),bS||e.preventDefault()}let m=(0,S.useRef)(null),h=(0,S.useRef)(null);function g(t){if(!e)return;ri.cancel(h.current),h.current=ri(()=>{m.current=null},2);let{deltaX:n,deltaY:r,shiftKey:i}=t,o=n,s=r;(m.current===`sx`||!m.current&&i&&r&&!n)&&(o=r,s=0,m.current=`sx`);let c=Math.abs(o),l=Math.abs(s);m.current===null&&(m.current=a&&c>l?`x`:`y`),m.current===`y`?f(t,s):p(t,o)}function _(t){e&&(u.current=t.detail===l.current)}return[g,_]}function CS(e,t,n,r){let[i,a]=S.useMemo(()=>[new Map,[]],[e,n.id,r]);return(o,s=o)=>{let c=i.get(o),l=i.get(s);if(c===void 0||l===void 0){let u=e.length;for(let d=a.length;d{let e=!1;a.current.forEach((t,n)=>{if(t&&t.offsetParent){let{offsetHeight:r}=t,{marginTop:i,marginBottom:a}=getComputedStyle(t),s=TS(i),c=TS(a),l=r+s+c;o.current.get(n)!==l&&(o.current.set(n,l),e=!0)}}),e&&i(e=>e+1)};if(e)t();else{s.current+=1;let e=s.current;Promise.resolve().then(()=>{e===s.current&&t()})}}function u(r,i){let o=e(r),s=a.current.get(o);i?(a.current.set(o,i),l()):a.current.delete(o),!s!=!i&&(i?t?.(r):n?.(r))}return(0,S.useEffect)(()=>c,[]),[u,l,o.current,r]}var DS=14/15;function OS(e,t,n){let r=(0,S.useRef)(!1),i=(0,S.useRef)(0),a=(0,S.useRef)(0),o=(0,S.useRef)(null),s=(0,S.useRef)(null),c,l=e=>{if(r.current){let t=Math.ceil(e.touches[0].pageX),r=Math.ceil(e.touches[0].pageY),o=i.current-t,c=a.current-r,l=Math.abs(o)>Math.abs(c);l?i.current=t:a.current=r;let u=n(l,l?o:c,!1,e);u&&e.preventDefault(),clearInterval(s.current),u&&(s.current=setInterval(()=>{l?o*=DS:c*=DS;let e=Math.floor(l?o:c);(!n(l,e,!0)||Math.abs(e)<=.1)&&clearInterval(s.current)},16))}},u=()=>{r.current=!1,c()},d=e=>{c(),e.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(e.touches[0].pageX),a.current=Math.ceil(e.touches[0].pageY),o.current=e.target,o.current.addEventListener(`touchmove`,l,{passive:!1}),o.current.addEventListener(`touchend`,u,{passive:!0}))};c=()=>{o.current&&(o.current.removeEventListener(`touchmove`,l),o.current.removeEventListener(`touchend`,u))},zn(()=>(e&&t.current.addEventListener(`touchstart`,d,{passive:!0}),()=>{t.current?.removeEventListener(`touchstart`,d),c(),clearInterval(s.current)}),[e])}function kS(e){return Math.floor(e**.5)}function AS(e,t){return(`touches`in e?e.touches[0]:e)[t?`pageX`:`pageY`]-window[t?`scrollX`:`scrollY`]}function jS(e,t,n){S.useEffect(()=>{let r=t.current;if(e&&r){let e=!1,t,i,a=()=>{ri.cancel(t)},o=()=>{a(),t=ri(()=>{n(i),o()})},s=()=>{e=!1,a()},c=t=>{if(t.target.draggable||t.button!==0)return;let n=t;n._virtualHandled||(n._virtualHandled=!0,e=!0)},l=t=>{if(e){let e=AS(t,!1),{top:n,bottom:s}=r.getBoundingClientRect();e<=n?(i=-kS(n-e),o()):e>=s?(i=kS(e-s),o()):a()}};return r.addEventListener(`mousedown`,c),r.ownerDocument.addEventListener(`mouseup`,s),r.ownerDocument.addEventListener(`mousemove`,l),r.ownerDocument.addEventListener(`dragend`,s),()=>{r.removeEventListener(`mousedown`,c),r.ownerDocument.removeEventListener(`mouseup`,s),r.ownerDocument.removeEventListener(`mousemove`,l),r.ownerDocument.removeEventListener(`dragend`,s),a()}}},[e])}var MS=10;function NS(e,t,n,r,i,a,o,s){let c=S.useRef(),[l,u]=S.useState(null);return zn(()=>{if(l&&l.times({...e}));return}a();let{targetAlign:s,originAlign:c,index:d,offset:f}=l,p=e.current.clientHeight,m=!1,h=s,g=null;if(p){let a=s||c,u=0,_=0,v=0,y=Math.min(t.length-1,d);for(let e=0;e<=y;e+=1){let a=i(t[e]);_=u;let o=n.get(a);v=_+(o===void 0?r:o),u=v}let b=a===`top`?f:p-f;for(let e=y;e>=0;--e){let r=i(t[e]),a=n.get(r);if(a===void 0){m=!0;break}if(b-=a,b<=0)break}switch(a){case`top`:g=_-f;break;case`bottom`:g=v-p+f;break;default:{let{scrollTop:t}=e.current,n=t+p;_n&&(h=`bottom`)}}g!==null&&o(g),g!==l.lastTop&&(m=!0)}m&&u({...l,times:l.times+1,targetAlign:h,lastTop:g})}},[l,e.current]),e=>{if(e==null){s();return}if(ri.cancel(c.current),typeof e==`number`)o(e);else if(e&&typeof e==`object`){let n,{align:r}=e;`index`in e?{index:n}=e:n=t.findIndex(t=>i(t)===e.key);let{offset:a=0}=e;u({times:0,index:n,offset:a,originAlign:r})}}}var PS=S.forwardRef((e,t)=>{let{prefixCls:n,rtl:r,scrollOffset:i,scrollRange:a,onStartMove:o,onStopMove:s,onScroll:c,horizontal:l,spinSize:u,containerSize:d,style:f,thumbStyle:p,showScrollBar:m}=e,[h,g]=S.useState(!1),[_,v]=S.useState(null),[y,b]=S.useState(null),x=!r,C=S.useRef(),w=S.useRef(),[T,E]=S.useState(m),D=S.useRef(),O=()=>{m===!0||m===!1||(clearTimeout(D.current),E(!0),D.current=setTimeout(()=>{E(!1)},3e3))},k=a-d||0,A=d-u||0,j=S.useMemo(()=>i===0||k===0?0:i/k*A,[i,k,A]),M=e=>{e.stopPropagation(),e.preventDefault()},N=S.useRef({top:j,dragging:h,pageY:_,startTop:y});N.current={top:j,dragging:h,pageY:_,startTop:y};let P=e=>{g(!0),v(AS(e,l)),b(N.current.top),o(),e.stopPropagation(),e.preventDefault()};S.useEffect(()=>{let e=e=>{e.preventDefault()},t=C.current,n=w.current;return t.addEventListener(`touchstart`,e,{passive:!1}),n.addEventListener(`touchstart`,P,{passive:!1}),()=>{t.removeEventListener(`touchstart`,e),n.removeEventListener(`touchstart`,P)}},[]);let F=S.useRef();F.current=k;let I=S.useRef();I.current=A,S.useEffect(()=>{if(h){let e,t=t=>{let{dragging:n,pageY:r,startTop:i}=N.current;ri.cancel(e);let a=C.current.getBoundingClientRect(),o=d/(l?a.width:a.height);if(n){let n=(AS(t,l)-r)*o,a=i;!x&&l?a-=n:a+=n;let s=F.current,u=I.current,d=u?a/u:0,f=Math.ceil(d*s);f=Math.max(f,0),f=Math.min(f,s),e=ri(()=>{c(f,l)})}},n=()=>{g(!1),s()};return window.addEventListener(`mousemove`,t,{passive:!0}),window.addEventListener(`touchmove`,t,{passive:!0}),window.addEventListener(`mouseup`,n,{passive:!0}),window.addEventListener(`touchend`,n,{passive:!0}),()=>{window.removeEventListener(`mousemove`,t),window.removeEventListener(`touchmove`,t),window.removeEventListener(`mouseup`,n),window.removeEventListener(`touchend`,n),ri.cancel(e)}}},[h]),S.useEffect(()=>(O(),()=>{clearTimeout(D.current)}),[i]),S.useImperativeHandle(t,()=>({delayHidden:O}));let L=`${n}-scrollbar`,R={position:`absolute`,visibility:T?null:`hidden`},z={position:`absolute`,borderRadius:99,background:`var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))`,cursor:`pointer`,userSelect:`none`};return l?(Object.assign(R,{height:8,left:0,right:0,bottom:0}),Object.assign(z,{height:`100%`,width:u,[x?`left`:`right`]:j})):(Object.assign(R,{width:8,top:0,bottom:0,[x?`right`:`left`]:0}),Object.assign(z,{width:`100%`,height:u,top:j})),S.createElement(`div`,{ref:C,className:J(L,{[`${L}-horizontal`]:l,[`${L}-vertical`]:!l,[`${L}-visible`]:T}),style:{...R,...f},onMouseDown:M,onMouseMove:O},S.createElement(`div`,{ref:w,className:J(`${L}-thumb`,{[`${L}-thumb-moving`]:h}),style:{...z,...p},onMouseDown:P}))}),FS=20;function IS(e=0,t=0){let n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,FS),Math.floor(n)}var LS=[],RS={overflowY:`auto`,overflowAnchor:`none`};function zS(e,t){let{prefixCls:n=`rc-virtual-list`,className:r,height:i,itemHeight:a,fullHeight:o=!0,style:s,data:c,children:l,itemKey:u,virtual:d,direction:f,scrollWidth:p,component:m=`div`,onScroll:h,onVirtualScroll:g,onVisibleChange:_,innerProps:v,extraRender:y,styles:b,showScrollBar:x=`optional`,...C}=e,w=S.useCallback(e=>typeof u==`function`?u(e):e?.[u],[u]),[T,E,D,O]=ES(w,null,null),k=!!(d!==!1&&i&&a),A=S.useMemo(()=>Object.values(D.maps).reduce((e,t)=>e+t,0),[D.id,D.maps]),j=k&&c&&(Math.max(a*c.length,A)>i||!!p),M=f===`rtl`,N=J(n,{[`${n}-rtl`]:M},r),P=c||LS,F=(0,S.useRef)(),I=(0,S.useRef)(),L=(0,S.useRef)(),[R,z]=(0,S.useState)(0),[B,V]=(0,S.useState)(0),[H,U]=(0,S.useState)(!1),W=()=>{U(!0)},ee=()=>{U(!1)},te={getKey:w};function ne(e){z(t=>{let n;n=typeof e==`function`?e(t):e;let r=ge(n);return F.current.scrollTop=r,r})}let re=(0,S.useRef)({start:0,end:P.length}),ie=(0,S.useRef)(),[ae]=yS(P,w);ie.current=ae;let{scrollHeight:G,start:oe,end:K,offset:se}=S.useMemo(()=>{if(!k)return{scrollHeight:void 0,start:0,end:P.length-1,offset:void 0};if(!j)return{scrollHeight:I.current?.offsetHeight||0,start:0,end:P.length-1,offset:void 0};let e=0,t,n,r,o=P.length;for(let s=0;s=R&&t===void 0&&(t=s,n=e),u>R+i&&r===void 0&&(r=s),e=u}return t===void 0&&(t=0,n=0,r=Math.ceil(i/a)),r===void 0&&(r=P.length-1),r=Math.min(r+1,P.length-1),{scrollHeight:e,start:t,end:r,offset:n}},[j,k,R,P,O,i]);re.current.start=oe,re.current.end=K,S.useLayoutEffect(()=>{let e=D.getRecord();if(e.size===1){let t=Array.from(e.keys())[0],n=e.get(t),r=P[oe];if(r&&n===void 0&&w(r)===t){let e=D.get(t)-a;ne(t=>t+e)}}D.resetRecord()},[G]);let[ce,q]=S.useState({width:0,height:i}),le=e=>{q({width:e.offsetWidth,height:e.offsetHeight})},ue=(0,S.useRef)(),de=(0,S.useRef)(),fe=S.useMemo(()=>IS(ce.width,p),[ce.width,p]),pe=S.useMemo(()=>IS(ce.height,G),[ce.height,G]),me=G-i,he=(0,S.useRef)(me);he.current=me;function ge(e){let t=e;return Number.isNaN(he.current)||(t=Math.min(t,he.current)),t=Math.max(t,0),t}let _e=R<=0,ve=R>=me,ye=B<=0,be=B>=p,xe=xS(_e,ve,ye,be),Se=()=>({x:M?-B:B,y:R}),Ce=(0,S.useRef)(Se()),we=In(e=>{if(g){let t={...Se(),...e};(Ce.current.x!==t.x||Ce.current.y!==t.y)&&(g(t),Ce.current=t)}});function Te(e,t){let n=e;t?((0,Jf.flushSync)(()=>{V(n)}),we()):ne(n)}function Ee(e){let{scrollTop:t}=e.currentTarget;t!==R&&ne(t),h?.(e),we()}let De=e=>{let t=e,n=p?p-ce.width:0;return t=Math.max(t,0),t=Math.min(t,n),t},Oe=In((e,t)=>{t?((0,Jf.flushSync)(()=>{V(t=>De(t+(M?-e:e)))}),we()):ne(t=>t+e)}),[ke,Ae]=SS(k,_e,ve,ye,be,!!p,Oe);OS(k,F,(e,t,n,r)=>{let i=r;return xe(e,t,n)?!1:!i||!i._virtualHandled?(i&&(i._virtualHandled=!0),ke({preventDefault(){},deltaX:e?t:0,deltaY:e?0:t}),!0):!1}),jS(j,F,e=>{ne(t=>t+e)}),zn(()=>{function e(e){let t=_e&&e.detail<0,n=ve&&e.detail>0;k&&!t&&!n&&e.preventDefault()}let t=F.current;return t.addEventListener(`wheel`,ke,{passive:!1}),t.addEventListener(`DOMMouseScroll`,Ae,{passive:!0}),t.addEventListener(`MozMousePixelScroll`,e,{passive:!1}),()=>{t.removeEventListener(`wheel`,ke),t.removeEventListener(`DOMMouseScroll`,Ae),t.removeEventListener(`MozMousePixelScroll`,e)}},[k,_e,ve]),zn(()=>{if(p){let e=De(B);V(e),we({x:e})}},[ce.width,p]);let je=()=>{ue.current?.delayHidden(),de.current?.delayHidden()},Me=NS(F,P,D,a,w,()=>E(!0),ne,je);S.useImperativeHandle(t,()=>({nativeElement:L.current,getScrollInfo:Se,scrollTo:e=>{function t(e){return e&&typeof e==`object`&&(`left`in e||`top`in e)}t(e)?(e.left!==void 0&&V(De(e.left)),Me(e.top)):Me(e)}})),zn(()=>{_&&_(P.slice(oe,K+1),P)},[oe,K,P]);let Ne=CS(P,w,D,a),Pe=y?.({start:oe,end:K,virtual:j,offsetX:B,offsetY:se,rtl:M,getSize:Ne}),Fe=_S(P,oe,K,p,B,T,l,te),Ie=null;i&&(Ie={[o?`height`:`maxHeight`]:i,...RS},k&&(Ie.overflowY=`hidden`,p&&(Ie.overflowX=`hidden`),H&&(Ie.pointerEvents=`none`)));let Le={};return M&&(Le.dir=`rtl`),S.createElement(`div`,hg({ref:L,style:{...s,position:`relative`},className:N},Le,C),S.createElement(Wr,{onResize:le},S.createElement(m,{className:`${n}-holder`,style:Ie,ref:F,onScroll:Ee,onMouseEnter:je},S.createElement(hS,{prefixCls:n,height:G,offsetX:B,offsetY:se,scrollWidth:p,onInnerResize:E,ref:I,innerProps:v,rtl:M,extra:Pe},Fe))),j&&G>i&&S.createElement(PS,{ref:ue,prefixCls:n,scrollOffset:R,scrollRange:G,rtl:M,onScroll:Te,onStartMove:W,onStopMove:ee,spinSize:pe,containerSize:ce.height,style:b?.verticalScrollBar,thumbStyle:b?.verticalScrollBarThumb,showScrollBar:x}),j&&p>ce.width&&S.createElement(PS,{ref:de,prefixCls:n,scrollOffset:B,scrollRange:p,rtl:M,onScroll:Te,onStartMove:W,onStopMove:ee,spinSize:fe,containerSize:ce.width,horizontal:!0,style:b?.horizontalScrollBar,thumbStyle:b?.horizontalScrollBarThumb,showScrollBar:x}))}var BS=S.forwardRef(zS);BS.displayName=`List`;var VS=BS;function HS(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}function US(){return US=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,id:r,open:i,multiple:a,mode:o,searchValue:s,toggleOpen:c,notFoundContent:l,onPopupScroll:u,showScrollBar:d,lockOptions:f}=dx(),{maxCount:p,flattenOptions:m,onActiveValue:h,defaultActiveFirstOption:g,onSelect:_,menuItemSelectedIcon:v,rawValues:y,fieldNames:b,virtual:x,direction:C,listHeight:w,listItemHeight:T,optionRender:E,classNames:D,styles:O}=S.useContext(jx),k=`${n}-item`,A=Gn(()=>m,[i,f],(e,t)=>t[0]&&!t[1]),j=S.useRef(null),M=S.useMemo(()=>a&&yx(p)&&y?.size>=p,[a,p,y?.size]),N=e=>{e.preventDefault()},P=e=>{j.current?.scrollTo(typeof e==`number`?{index:e}:e)},F=S.useCallback(e=>o===`combobox`?!1:y.has(e),[o,[...y].toString(),y.size]),I=(e,t=1)=>{let n=A.length;for(let r=0;rI(0)),z=(e,t=!1)=>{R(e);let n={source:t?`keyboard`:`mouse`},r=A[e];if(!r){h(null,-1,n);return}h(r.value,e,n)};(0,S.useEffect)(()=>{z(g===!1?-1:I(0))},[A.length,s]);let B=S.useCallback(e=>o===`combobox`?String(e).toLowerCase()===s.toLowerCase():y.has(e),[o,s,[...y].toString(),y.size]);(0,S.useEffect)(()=>{let e;if(!a&&i&&y.size===1){let t=Array.from(y)[0],n=A.findIndex(({data:e})=>s?String(e.value).startsWith(s):e.value===t);n!==-1&&(z(n),e=setTimeout(()=>{P(n)}))}return i&&j.current?.scrollTo(void 0),()=>clearTimeout(e)},[i,s]);let V=e=>{e!==void 0&&_(e,{selected:!y.has(e)}),a||c(!1)};if(S.useImperativeHandle(t,()=>({onKeyDown:e=>{let{which:t,ctrlKey:n}=e;switch(t){case om.N:case om.P:case om.UP:case om.DOWN:{let e=0;if(t===om.UP?e=-1:t===om.DOWN?e=1:HS()&&n&&(t===om.N?e=1:t===om.P&&(e=-1)),e!==0){let t=I(L+e,e);P(t),z(t,!0)}break}case om.TAB:case om.ENTER:{let t=A[L];if(!t||t.data.disabled)return V(void 0);!M||y.has(t.value)?V(t.value):V(void 0),i&&e.preventDefault();break}case om.ESC:c(!1),i&&e.stopPropagation()}},onKeyUp:()=>{},scrollTo:e=>{P(e)}})),A.length===0)return S.createElement(`div`,{role:`listbox`,id:`${r}_list`,className:`${k}-empty`,onMouseDown:N},l);let H=Object.keys(b).map(e=>b[e]),U=e=>e.label;function W(e,t){let{group:n}=e;return{role:n?`presentation`:`option`,id:`${r}_list_${t}`}}let ee=e=>{let t=A[e];if(!t)return null;let n=t.data||{},{value:r,disabled:i}=n,{group:a}=t,o=Vu(n,!0),s=U(t);return t?S.createElement(`div`,US({"aria-label":typeof s==`string`&&!a?s:null},o,{key:e},W(t,e),{"aria-selected":B(r),"aria-disabled":i}),r):null},te={role:`listbox`,id:`${r}_list`};return S.createElement(S.Fragment,null,x&&S.createElement(`div`,US({},te,{style:{height:0,width:0,overflow:`hidden`}}),ee(L-1),ee(L),ee(L+1)),S.createElement(VS,{itemKey:`key`,ref:j,data:A,height:w,itemHeight:T,fullHeight:!1,onMouseDown:N,onScroll:u,virtual:x,direction:C,innerProps:x?null:te,showScrollBar:d,className:D?.popup?.list,style:O?.popup?.list},(e,t)=>{let{group:n,groupOption:r,data:i,label:a,value:o}=e,{key:s}=i;if(n){let e=i.title??(WS(a)?a.toString():void 0);return S.createElement(`div`,{className:J(k,`${k}-group`,i.className),title:e},a===void 0?s:a)}let{disabled:c,title:l,children:u,style:d,className:f,...p}=i,m=Sr(p,H),h=F(o),g=c||!h&&M,_=`${k}-option`,y=J(k,_,f,D?.popup?.listItem,{[`${_}-grouped`]:r,[`${_}-active`]:L===t&&!g,[`${_}-disabled`]:g,[`${_}-selected`]:h}),b=U(e),C=!v||typeof v==`function`||h,w=typeof b==`number`?b:b||o,T=WS(w)?w.toString():void 0;return l!==void 0&&(T=l),S.createElement(`div`,US({},Vu(m),x?{}:W(e,t),{"aria-selected":x?void 0:B(o),"aria-disabled":g,className:y,title:T,onMouseMove:()=>{L===t||g||z(t)},onClick:()=>{g||V(o)},style:{...O?.popup?.listItem,...d}}),S.createElement(`div`,{className:`${_}-content`},typeof E==`function`?E(e,{index:t}):w),S.isValidElement(v)||h,C&&S.createElement($x,{className:`${k}-option-state`,customizeIcon:v,customizeIconProps:{value:o,disabled:g,isSelected:h}},h?`✓`:null))}))}),KS=((e,t)=>{let n=S.useRef({values:new Map,options:new Map});return[S.useMemo(()=>{let{values:r,options:i}=n.current,a=e.map(e=>e.label===void 0?{...e,label:r.get(e.value)?.label}:e),o=new Map,s=new Map;return a.forEach(e=>{o.set(e.value,e),s.set(e.value,t.get(e.value)||i.get(e.value))}),n.current.values=o,n.current.options=s,a},[e,t]),S.useCallback(e=>t.get(e)||n.current.options.get(e),[t])]});function qS(e,t){return Mx(e).join(``).toUpperCase().includes(t)}var JS=((e,t,n,r,i)=>S.useMemo(()=>{if(!n||r===!1)return e;let{options:a,label:o,value:s}=t,c=[],l=typeof r==`function`,u=n.toUpperCase(),d=l?r:(e,t)=>i&&i.length?i.some(e=>qS(t[e],u)):t[a]?qS(t[o===`children`?`label`:o],u):qS(t[s],u),f=l?e=>xx(e):e=>e;return e.forEach(e=>{if(e[a]){if(d(n,f(e)))c.push(e);else{let t=e[a].filter(e=>d(n,f(e)));t.length&&c.push({...e,[a]:t})}return}d(n,f(e))&&c.push(e)}),c},[e,r,i,n,t]));function YS(e){let{key:t,props:{children:n,value:r,...i}}=e;return{key:t,value:r===void 0?t:r,children:n,...i}}function XS(e,t=!1){return Cr(e).map((e,n)=>{if(!S.isValidElement(e)||!e.type)return null;let{type:{isSelectOptGroup:r},key:i,props:{children:a,...o}}=e;return t||!r?YS(e):{key:`__RC_SELECT_GRP__${i===null?n:i}__`,label:i,...o,options:XS(a)}}).filter(e=>e)}var ZS=(e,t,n,r,i)=>S.useMemo(()=>{let a=e;e||(a=XS(t));let o=new Map,s=new Map,c=(e,t,n)=>{n&&typeof n==`string`&&e.set(t[n],t)},l=(e,t=!1)=>{for(let a=0;a{c(s,u,e)}),c(s,u,i)):l(u[n.options],!0)}};return l(a),{options:a,valueOptions:o,labelOptions:s}},[e,t,n,r,i]);function QS(e){let t=S.useRef();return t.current=e,S.useCallback((...e)=>t.current(...e),[])}function $S(e,t,n){let{filterOption:r,searchValue:i,optionFilterProp:a,filterSort:o,onSearch:s,autoClearSearchValue:c}=t;return S.useMemo(()=>{let t=typeof e==`object`,l={filterOption:r,searchValue:i,optionFilterProp:a,filterSort:o,onSearch:s,autoClearSearchValue:c,...t?e:{}};return[t||n===`combobox`||n===`tags`||n===`multiple`&&e===void 0?!0:e,l]},[n,e,r,i,a,o,s,c])}function eC(){return eC=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,mode:r,prefixCls:i=`rc-select`,backfill:a,fieldNames:o,showSearch:s,searchValue:c,onSearch:l,autoClearSearchValue:u,filterOption:d,optionFilterProp:f,filterSort:p,onSelect:m,onDeselect:h,onActive:g,popupMatchSelectWidth:_=!0,optionLabelProp:v,options:y,optionRender:b,children:x,defaultActiveFirstOption:C,menuItemSelectedIcon:w,virtual:T,direction:E,listHeight:D=200,listItemHeight:O=20,labelRender:k,value:A,defaultValue:j,labelInValue:M,onChange:N,maxCount:P,classNames:F,styles:I,...L}=e,[R,z]=$S(s,{searchValue:c,onSearch:l,autoClearSearchValue:u,filterOption:d,optionFilterProp:f,filterSort:p},r),{filterOption:B,searchValue:V,optionFilterProp:H,filterSort:U,onSearch:W,autoClearSearchValue:ee=!0}=z,te=S.useMemo(()=>H?Array.isArray(H)?H:[H]:[],[H]),ne=zf(n),re=dS(r),ie=!!(!y&&x),ae=S.useMemo(()=>B===void 0&&r===`combobox`?!1:B,[B,r]),G=S.useMemo(()=>bx(o,ie),[JSON.stringify(o),ie]),[oe,K]=Hn(``,V),se=oe||``,ce=ZS(y,x,G,te,v),{valueOptions:q,labelOptions:le,options:ue}=ce,de=S.useCallback(e=>Mx(e).map(e=>{let t,n,r,i;nC(e)?t=e:(n=e.label,t=e.value);let a=q.get(t);return a&&(n===void 0&&(n=a?.[v||G.label]),r=a?.disabled,i=a?.title),{label:n,value:t,key:t,disabled:r,title:i}}),[G,v,q]),[fe,pe]=Hn(j,A),[me,he]=KS(S.useMemo(()=>{let e=de(re&&fe===null?[]:fe);return r===`combobox`&&Px(e[0]?.value)?[]:e},[fe,de,r,re]),q),ge=S.useMemo(()=>{if(!r&&me.length===1){let e=me[0];if(e.value===null&&(e.label===null||e.label===void 0))return[]}return me.map(e=>({...e,label:(typeof k==`function`?k(e):e.label)??e.value}))},[r,me,k]),_e=S.useMemo(()=>new Set(me.map(e=>e.value)),[me]);S.useEffect(()=>{if(r===`combobox`){let e=me[0]?.value;K(Nx(e)?String(e):``)}},[me]);let ve=QS((e,t)=>{let n=t??e;return{[G.value]:e,[G.label]:n}}),ye=JS(S.useMemo(()=>{if(r!==`tags`)return ue;let e=[...ue],t=e=>q.has(e);return[...me].sort((e,t)=>e.value{let r=n.value;t(r)||e.push(ve(r,n.label))}),e},[ve,ue,q,me,r]),G,se,ae,te),be=S.useMemo(()=>{let e=e=>te.length?te.some(t=>e?.[t]===se):e?.value===se;return r!==`tags`||!se||ye.some(t=>e(t))||ye.some(e=>e[G.value]===se)?ye:[ve(se),...ye]},[ve,te,r,ye,se,G]),xe=e=>[...e].sort((e,t)=>U(e,t,{searchValue:se})).map(e=>Array.isArray(e.options)?{...e,options:e.options.length>0?xe(e.options):e.options}:e),Se=S.useMemo(()=>U?xe(be):be,[be,U,se]),Ce=S.useMemo(()=>Ree(Se,{fieldNames:G,childrenAsData:ie}),[Se,G,ie]),we=e=>{let t=de(e);if(pe(t),N&&(t.length!==me.length||t.some((e,t)=>me[t]?.value!==e?.value))){let e=M?t.map(({label:e,value:t})=>({label:e,value:t})):t.map(e=>e.value),n=t.map(e=>xx(he(e.value)));N(re?e:e[0],re?n:n[0])}},[Te,Ee]=S.useState(null),[De,Oe]=S.useState(0),ke=C===void 0?r!==`combobox`:C,Ae=S.useRef(),je=S.useCallback((e,t,{source:n=`keyboard`}={})=>{Oe(t),a&&r===`combobox`&&e!==null&&n===`keyboard`&&Ee(String(e));let i=Promise.resolve().then(()=>{Ae.current===i&&g?.(e)});Ae.current=i},[a,r,g]),Me=(e,t,n)=>{let r=()=>{let t=he(e);return[M?{label:t?.[G.label],value:e}:e,xx(t)]};if(t&&m){let[e,t]=r();m(e,t)}else if(!t&&h&&n!==`clear`){let[e,t]=r();h(e,t)}},Ne=QS((e,t)=>{let n,i=re?t.selected:!0;n=i?re?[...me,e]:[e]:me.filter(t=>t.value!==e),we(n),Me(e,i),r===`combobox`?Ee(``):(!dS||ee)&&(K(``),Ee(``))}),Pe=(e,t)=>{we(e);let{type:n,values:r}=t;(n===`remove`||n===`clear`)&&r.forEach(e=>{Me(e.value,!1,n)})},Fe=(e,t)=>{if(K(e),Ee(null),t.source===`submit`){let t=(e||``).trim();t&&(we(Array.from(new Set([..._e,t]))),Me(t,!0),K(``));return}t.source!==`blur`&&(r===`combobox`&&we(e),W?.(e))},Ie=e=>{let t=e;r!==`tags`&&(t=e.map(e=>le.get(e)?.value).filter(e=>e!==void 0));let n=Array.from(new Set([..._e,...t]));we(n),n.forEach(e=>{Me(e,!0)})},Le=S.useMemo(()=>{let e=T!==!1&&_!==!1;return{...ce,flattenOptions:Ce,onActiveValue:je,defaultActiveFirstOption:ke,onSelect:Ne,menuItemSelectedIcon:w,rawValues:_e,fieldNames:G,virtual:e,direction:E,listHeight:D,listItemHeight:O,childrenAsData:ie,maxCount:P,optionRender:b,classNames:F,styles:I}},[P,ce,Ce,je,ke,Ne,w,_e,G,T,_,E,D,O,ie,b,F,I]);return S.createElement(jx.Provider,{value:Le},S.createElement(fS,eC({},L,{id:ne,prefixCls:i,ref:t,omitDomProps:tC,mode:r,classNames:F,styles:I,displayValues:ge,onDisplayValuesChange:Pe,maxCount:P,direction:E,showSearch:R,searchValue:se,onSearch:Fe,autoClearSearchValue:ee,onSearchSplit:Ie,popupMatchSelectWidth:_,OptionList:GS,emptyOptions:!Ce.length,activeValue:Te,activeDescendantId:`${ne}_list_${De}`})))});rC.Option=mS,rC.OptGroup=pS;var iC=rC,aC=(e,t,n)=>J({[`${e}-status-success`]:t===`success`,[`${e}-status-warning`]:t===`warning`,[`${e}-status-error`]:t===`error`,[`${e}-status-validating`]:t===`validating`,[`${e}-has-feedback`]:n}),oC=(e,t)=>t||e,sC=()=>{let[,e]=Kc(),[t]=cd(`Empty`),n=new Rs(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return S.createElement(`svg`,{style:n,width:`184`,height:`152`,viewBox:`0 0 184 152`,xmlns:`http://www.w3.org/2000/svg`},S.createElement(`title`,null,t?.description||`Empty`),S.createElement(`g`,{fill:`none`,fillRule:`evenodd`},S.createElement(`g`,{transform:`translate(24 31.7)`},S.createElement(`ellipse`,{fillOpacity:`.8`,fill:`#F5F5F7`,cx:`67.8`,cy:`106.9`,rx:`67.8`,ry:`12.7`}),S.createElement(`path`,{fill:`#aeb8c2`,d:`M122 69.7 98.1 40.2a6 6 0 0 0-4.6-2.2H42.1a6 6 0 0 0-4.6 2.2l-24 29.5V85H122z`}),S.createElement(`path`,{fill:`#f5f5f7`,d:`M33.8 0h68a4 4 0 0 1 4 4v93.3a4 4 0 0 1-4 4h-68a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4`}),S.createElement(`path`,{fill:`#dce0e6`,d:`M42.7 10h50.2a2 2 0 0 1 2 2v25a2 2 0 0 1-2 2H42.7a2 2 0 0 1-2-2V12a2 2 0 0 1 2-2m.2 39.8h49.8a2.3 2.3 0 1 1 0 4.5H42.9a2.3 2.3 0 0 1 0-4.5m0 11.7h49.8a2.3 2.3 0 1 1 0 4.6H42.9a2.3 2.3 0 0 1 0-4.6m79 43.5a7 7 0 0 1-6.8 5.4H20.5a7 7 0 0 1-6.7-5.4l-.2-1.8V69.7h26.3c2.9 0 5.2 2.4 5.2 5.4s2.4 5.4 5.3 5.4h34.8c2.9 0 5.3-2.4 5.3-5.4s2.3-5.4 5.2-5.4H122v33.5q0 1-.2 1.8`})),S.createElement(`path`,{fill:`#dce0e6`,d:`m149.1 33.3-6.8 2.6a1 1 0 0 1-1.3-1.2l2-6.2q-4.1-4.5-4.2-10.4c0-10 10.1-18.1 22.6-18.1S184 8.1 184 18.1s-10.1 18-22.6 18q-6.8 0-12.3-2.8`}),S.createElement(`g`,{fill:`#fff`,transform:`translate(149.7 15.4)`},S.createElement(`circle`,{cx:`20.7`,cy:`3.2`,r:`2.8`}),S.createElement(`path`,{d:`M5.7 5.6H0L2.9.7zM9.3.7h5v5h-5z`}))))},cC=()=>{let[,e]=Kc(),[t]=cd(`Empty`),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:i,colorBgContainer:a}=e,{borderColor:o,shadowColor:s,contentColor:c}=(0,S.useMemo)(()=>({borderColor:new Rs(n).onBackground(a).toHexString(),shadowColor:new Rs(r).onBackground(a).toHexString(),contentColor:new Rs(i).onBackground(a).toHexString()}),[n,r,i,a]);return S.createElement(`svg`,{width:`64`,height:`41`,viewBox:`0 0 64 41`,xmlns:`http://www.w3.org/2000/svg`},S.createElement(`title`,null,t?.description||`Empty`),S.createElement(`g`,{transform:`translate(0 1)`,fill:`none`,fillRule:`evenodd`},S.createElement(`ellipse`,{fill:s,cx:`32`,cy:`33`,rx:`32`,ry:`7`}),S.createElement(`g`,{fillRule:`nonzero`,stroke:o},S.createElement(`path`,{d:`M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z`}),S.createElement(`path`,{d:`M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3`,fill:c}))))},lC=e=>{let{componentCls:t,margin:n,marginXS:r,marginXL:i,fontSize:a,lineHeight:o}=e;return{[t]:{marginInline:r,fontSize:a,lineHeight:o,textAlign:`center`,[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:`100%`},svg:{maxWidth:`100%`,height:`100%`,margin:`auto`}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:i,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},uC=rl(`Empty`,e=>{let{componentCls:t,controlHeightLG:n,calc:r}=e;return lC(gs(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()}))}),dC=S.createElement(sC,null),fC=S.createElement(cC,null),pC=e=>{let{className:t,rootClassName:n,prefixCls:r,image:i,description:a,children:o,imageStyle:s,style:c,classNames:l,styles:u,...d}=e,{getPrefixCls:f,direction:p,className:m,style:h,classNames:g,styles:_,image:v}=li(`empty`),y=f(`empty`,r),[b,x]=uC(y),[C,w]=Fd([g,l],[_,u],{props:e}),[T]=cd(`Empty`),E=a===void 0?T?.description:a,D=typeof E==`string`?E:`empty`,O=i??v??dC,k=null;return k=typeof O==`string`?S.createElement(`img`,{draggable:!1,alt:D,src:O}):O,S.createElement(`div`,{className:J(b,x,y,m,{[`${y}-normal`]:O===fC,[`${y}-rtl`]:p===`rtl`},t,n,C.root),style:{...w.root,...h,...c},...d},S.createElement(`div`,{className:J(`${y}-image`,C.image),style:{...s,...w.image}},k),E&&S.createElement(`div`,{className:J(`${y}-description`,C.description),style:w.description},E),o&&S.createElement(`div`,{className:J(`${y}-footer`,C.footer),style:w.footer},o))};pC.PRESENTED_IMAGE_DEFAULT=dC,pC.PRESENTED_IMAGE_SIMPLE=fC;var mC=e=>{let{componentName:t}=e,{getPrefixCls:n}=(0,S.useContext)(oi),r=n(`empty`);switch(t){case`Table`:case`List`:return S.createElement(pC,{image:pC.PRESENTED_IMAGE_SIMPLE});case`Select`:case`TreeSelect`:case`Cascader`:case`Transfer`:case`Mentions`:return S.createElement(pC,{image:pC.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case`Table.filter`:return null;default:return S.createElement(pC,null)}},hC=(e,t,n)=>{let{variant:r,[e]:i}=S.useContext(oi),a=S.useContext(wy),o=i?.variant,s;s=t===void 0?n===!1?`borderless`:a??o??r??`outlined`:t;let c=ai.includes(s);return[s,c]},gC=e=>{let t={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e===`scroll`?`scroll`:`visible`,dynamicInset:!0};return{bottomLeft:{...t,points:[`tl`,`bl`],offset:[0,4]},bottomRight:{...t,points:[`tr`,`br`],offset:[0,4]},topLeft:{...t,points:[`bl`,`tl`],offset:[0,-4]},topRight:{...t,points:[`br`,`tr`],offset:[0,-4]}}};function _C(e,t){return e||gC(t)}var vC=e=>{let{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:i}=e;return{position:`relative`,display:`block`,minHeight:t,padding:i,color:e.colorText,fontWeight:`normal`,fontSize:n,lineHeight:r,boxSizing:`border-box`}},Bee=e=>{let{antCls:t,componentCls:n}=e,r=`${n}-item`,i=`&${t}-slide-up-enter${t}-slide-up-enter-active`,a=`&${t}-slide-up-appear${t}-slide-up-appear-active`,o=`&${t}-slide-up-leave${t}-slide-up-leave-active`,s=`${n}-dropdown-placement-`,c=`${r}-option-selected`;return[{[`${n}-dropdown`]:{...Jc(e),position:`absolute`,top:-9999,zIndex:e.zIndexPopup,boxSizing:`border-box`,padding:e.paddingXXS,overflow:`hidden`,fontSize:e.fontSize,fontVariant:`initial`,backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,[` ${i}${s}bottomLeft, ${a}${s}bottomLeft `]:{animationName:Nh},[` @@ -180,20 +180,20 @@ html body { `]:{animationName:Fh},[`${o}${s}bottomLeft`]:{animationName:Ph},[` ${o}${s}topLeft, ${o}${s}topRight - `]:{animationName:Ih},"&-hidden":{display:`none`},[r]:{...bC(e),cursor:`pointer`,transition:`background-color ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:`default`},"&-option":{display:`flex`,"&-content":{flex:`auto`,...qc},"&-state":{flex:`none`,display:`flex`,alignItems:`center`},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${r}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:`not-allowed`},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":{...bC(e),color:e.colorTextDisabled}},[`${c}:has(+ ${c})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${c}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:`rtl`}}},Hh(e,`slide-up`),Hh(e,`slide-down`),Mh(e,`move-up`),Mh(e,`move-down`)]},zee=e=>{let{componentCls:t}=e;return{[`&${t}-customize`]:{border:0,padding:0,fontSize:`inherit`,lineHeight:`inherit`,[`${t}-placeholder`]:{display:`none`},[`${t}-content`]:{margin:0,padding:0,"&-value":{display:`none`}}}}},xC=4,Bee=e=>{let{componentCls:t,calc:n,iconCls:r,paddingXS:i,paddingXXS:a,INTERNAL_FIXED_ITEM_MARGIN:o,lineWidth:s,colorIcon:c,colorIconHover:l,inputPaddingHorizontalBase:u,antCls:d}=e,[f,p]=ol(d,`select`);return{"&-multiple":{[f(`multi-item-background`)]:e.multipleItemBg,[f(`multi-item-border-color`)]:`transparent`,[f(`multi-item-border-radius`)]:e.borderRadiusSM,[f(`multi-item-height`)]:e.multipleItemHeight,[f(`multi-padding-base`)]:`calc((${p(`height`)} - ${p(`multi-item-height`)}) / 2)`,[f(`multi-padding-vertical`)]:`calc(${p(`multi-padding-base`)} - ${o} - ${s})`,[f(`multi-item-padding-horizontal`)]:`calc(${u} - ${p(`multi-padding-vertical`)} - ${s} * 2)`,paddingBlock:p(`multi-padding-vertical`),paddingInlineStart:`calc(${p(`multi-padding-base`)} - ${s})`,[`${t}-prefix`]:{marginInlineStart:p(`multi-item-padding-horizontal`)},[`${t}-prefix + ${t}-content`]:{[`${t}-placeholder`]:{insetInlineStart:0},[`${t}-content-item${t}-content-item-suffix`]:{marginInlineStart:0}},[`${t}-placeholder`]:{position:`absolute`,lineHeight:p(`line-height`),insetInlineStart:p(`multi-item-padding-horizontal`),width:`calc(100% - ${p(`multi-item-padding-horizontal`)})`,top:`50%`,transform:`translateY(-50%)`},[`${t}-content`]:{flexWrap:`wrap`,alignItems:`center`,lineHeight:1,"&-item-prefix":{height:p(`font-size`)},"&-item":{lineHeight:1,maxWidth:`calc(100% - ${xC}px)`},[`${t}-content-item-prefix + ${t}-content-item-suffix, - ${t}-content-item-suffix:first-child`]:{marginInlineStart:p(`multi-item-padding-horizontal`)},[`${t}-selection-item`]:{lineHeight:`calc(${p(`multi-item-height`)} - ${s} * 2)`,border:`${s} solid ${p(`multi-item-border-color`)}`,display:`flex`,marginBlock:o,marginInlineEnd:n(o).mul(2).equal(),background:p(`multi-item-background`),borderRadius:p(`multi-item-border-radius`),paddingInlineStart:i,paddingInlineEnd:a,transition:[`height`,`line-height`,`padding`].map(t=>`${t} ${e.motionDurationSlow}`).join(`,`),"&-content":{...qc,marginInlineEnd:a},"&-remove":{...Yc(),display:`inline-flex`,alignItems:`center`,color:c,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${r}`]:{verticalAlign:`-0.2em`},"&:hover":{color:l}}},[`${t}-input`]:{lineHeight:n(o).mul(2).add(p(`multi-item-height`)).equal(),width:`calc(var(--select-input-width, 0) * 1px)`,minWidth:xC,maxWidth:`100%`,transition:`line-height ${e.motionDurationSlow}`}},[`&${t}-sm`]:{[f(`multi-item-height`)]:e.multipleItemHeightSM,[f(`multi-item-border-radius`)]:e.borderRadiusXS},[`&${t}-lg`]:{[f(`multi-item-height`)]:e.multipleItemHeightLG,[f(`multi-item-border-radius`)]:e.borderRadius},[`&${t}-filled`]:{[f(`multi-item-border-color`)]:e.colorSplit,[f(`multi-item-background`)]:e.colorBgContainer,[`&${t}-disabled`]:{[f(`multi-item-border-color`)]:`transparent`}}}}},SC=(e,t)=>{let{componentCls:n,antCls:r}=e,[i]=ol(r,`select`),{border:a,borderHover:o,borderActive:s,borderOutline:c}=t,l=t.background||e.selectorBg||e.colorBgContainer;return{[i(`border-color`)]:a,[i(`background-color`)]:l,[i(`color`)]:t.color||e.colorText,[`&:not(${n}-disabled)`]:{"&:hover":{[i(`border-color`)]:o,[i(`background-color`)]:t.backgroundHover||l},[`&${n}-focused`]:{[i(`border-color`)]:s,[i(`background-color`)]:t.backgroundActive||l,boxShadow:`0 0 0 ${Y(e.controlOutlineWidth)} ${c}`}},[`&${n}-disabled`]:{[i(`border-color`)]:t.borderDisabled||t.border,[i(`background-color`)]:t.backgroundDisabled||t.background}}},CC=(e,t,n,r={},i={},a)=>{let{componentCls:o}=e;return{[`&${o}-${t}`]:[SC(e,n),{[`&${o}-status-error`]:SC(e,{...n,color:r.color||e.colorError,...r}),[`&${o}-status-warning`]:SC(e,{...n,color:i.color||e.colorWarning,...i})},a]}},Vee=e=>{let{componentCls:t,fontHeight:n,controlHeight:r,iconCls:i,antCls:a,calc:o}=e,[s,c]=ol(a,`select`);return{[t]:[{[s(`border-radius`)]:e.borderRadius,[s(`border-color`)]:`#000`,[s(`border-size`)]:e.lineWidth,[s(`background-color`)]:e.colorBgContainer,[s(`font-size`)]:e.fontSize,[s(`line-height`)]:e.lineHeight,[s(`font-height`)]:n,[s(`color`)]:e.colorText,[s(`height`)]:r,[s(`padding-horizontal`)]:o(e.paddingSM).sub(e.lineWidth).equal(),[s(`padding-vertical`)]:`calc((${c(`height`)} - ${c(`font-height`)}) / 2 - ${c(`border-size`)})`,...Jc(e,!0),display:`inline-flex`,flexWrap:`nowrap`,position:`relative`,transition:`all ${e.motionDurationSlow}`,alignItems:`flex-start`,outline:0,cursor:`pointer`,borderRadius:c(`border-radius`),borderWidth:c(`border-size`),borderStyle:e.lineType,borderColor:c(`border-color`),background:c(`background-color`),fontSize:c(`font-size`),lineHeight:c(`line-height`),color:c(`color`),paddingInline:c(`padding-horizontal`),paddingBlock:c(`padding-vertical`),[`${t}-prefix`]:{flex:`none`,lineHeight:1},[`${t}-placeholder`]:{...qc,color:e.colorTextPlaceholder,pointerEvents:`none`,zIndex:1},[`${t}-content`]:{flex:`auto`,minWidth:0,position:`relative`,display:`flex`,marginInlineEnd:o(e.paddingXXS).mul(1.5).equal(),"&:before":{content:`"\\a0"`,width:0,overflow:`hidden`},"&-value":{visibility:`inherit`},"input[readonly]":{cursor:`inherit`,caretColor:`transparent`}},[`${t}-suffix`]:{flex:`none`,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,"> :not(:last-child)":{marginInlineEnd:e.marginXS}},[`${t}-prefix, ${t}-suffix`]:{alignSelf:`center`,[i]:{verticalAlign:`top`}},"&-disabled":{background:e.colorBgContainerDisabled,color:e.colorTextDisabled,cursor:`not-allowed`,input:{cursor:`not-allowed`}},"&-sm":{[s(`height`)]:e.controlHeightSM,[s(`padding-horizontal`)]:o(e.paddingXS).sub(e.lineWidth).equal(),[s(`border-radius`)]:e.borderRadiusSM,[`${t}-clear`]:{insetInlineEnd:c(`padding-horizontal`)}},"&-lg":{[s(`height`)]:e.controlHeightLG,[s(`font-size`)]:e.fontSizeLG,[s(`line-height`)]:e.lineHeightLG,[s(`font-height`)]:e.fontHeightLG,[s(`border-radius`)]:e.borderRadiusLG}},{[`&:not(${t}-customize)`]:{[`${t}-input`]:{outline:`none`,background:`transparent`,appearance:`none`,border:0,margin:0,padding:0,color:c(`color`),"&::-webkit-search-cancel-button":{display:`none`,appearance:`none`}}}},{[`&-single:not(${t}-customize)`]:{[`${t}-input`]:{position:`absolute`,inset:0,lineHeight:`calc(${c(`font-height`)} + ${c(`padding-vertical`)} * 2)`},[`${t}-content`]:{...qc,alignSelf:`center`,"&-has-value":{display:`block`,"&:before":{display:`none`}},"&-has-search-value":{color:`transparent`},"&-value":{transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,zIndex:1}},[`&${t}-open ${t}-content`]:{color:e.colorTextPlaceholder,"&-has-search-value":{color:`transparent`}}}},{[`&-show-search:not(${t}-customize-input):not(${t}-disabled)`]:{cursor:`text`}},Bee(e),CC(e,`outlined`,{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:e.activeOutlineColor,borderDisabled:e.colorBorderDisabled},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError,borderOutline:e.colorErrorOutline},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning,borderOutline:e.colorWarningOutline}),CC(e,`filled`,{border:`transparent`,borderHover:`transparent`,borderActive:e.activeBorderColor,borderOutline:`transparent`,borderDisabled:e.colorBorderDisabled,background:e.colorFillTertiary,backgroundHover:e.colorFillSecondary,backgroundActive:e.colorBgContainer},{background:e.colorErrorBg,backgroundHover:e.colorErrorBgHover,borderActive:e.colorError},{background:e.colorWarningBg,backgroundHover:e.colorWarningBgHover,borderActive:e.colorWarning}),CC(e,`borderless`,{border:`transparent`,borderHover:`transparent`,borderActive:`transparent`,borderOutline:`transparent`,background:`transparent`}),CC(e,`underlined`,{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:`transparent`},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning},{borderRadius:0,borderTopColor:`transparent`,borderInlineColor:`transparent`}),zee(e)]}},Hee=e=>{let{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:i,controlHeightSM:a,controlHeightLG:o,paddingXXS:s,controlPaddingHorizontal:c,zIndexPopupBase:l,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:p,colorBgContainer:m,colorFillSecondary:h,colorBgContainerDisabled:g,colorTextDisabled:_,colorPrimaryHover:v,colorPrimary:y,controlOutline:b}=e,x=s*2,S=r*2,C=Math.min(i-x,i-S),w=Math.min(a-x,a-S),T=Math.min(o-x,o-S);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:l+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:p,optionPadding:`${(i-t*n)/2}px ${c}px`,optionFontSize:t,optionLineHeight:n,optionHeight:i,selectorBg:m,clearBg:m,singleItemHeightLG:o,multipleItemBg:h,multipleItemBorderColor:`transparent`,multipleItemHeight:C,multipleItemHeightSM:w,multipleItemHeightLG:T,multipleSelectorBgDisabled:g,multipleItemColorDisabled:_,multipleItemBorderColorDisabled:`transparent`,showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:v,activeBorderColor:y,activeOutlineColor:b,selectAffixPadding:s}},wC=e=>{let{antCls:t,componentCls:n,motionDurationMid:r,inputPaddingHorizontalBase:i}=e,a={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:`50%`}};return{[n]:{...Jc(e),[`${n}-selection-item`]:{flex:1,fontWeight:`normal`,position:`relative`,userSelect:`none`,...qc,[`> ${t}-typography`]:{display:`inline`}},[`${n}-prefix`]:{flex:`none`,marginInlineEnd:e.selectAffixPadding},[`${n}-clear`]:{position:`absolute`,top:`50%`,insetInlineStart:`auto`,insetInlineEnd:i,zIndex:1,display:`inline-block`,width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:`normal`,lineHeight:1,textAlign:`center`,textTransform:`none`,cursor:`pointer`,opacity:0,transition:[`color`,`opacity`].map(e=>`${e} ${r} ease`).join(`, `),textRendering:`auto`,transform:`translateZ(0)`,"&:before":{display:`block`},"&:hover":{color:e.colorIcon}},"@media(hover:none)":a,"&:hover":a},[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(i).add(e.fontSize).add(e.paddingXS).equal()}}}}}},TC=e=>{let{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:`100%`}}},wC(e),Ree(e),{[`${t}-rtl`]:{direction:`rtl`}},Yg(e,{focusElCls:`${t}-focused`})]},EC=rl(`Select`,(e,{rootPrefixCls:t})=>{let n=gs(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(e.lineWidth).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[TC(n),Vee(n)]},Hee,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}}),DC={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z`}}]},name:`check`,theme:`outlined`};function OC(){return OC=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,OC({},e,{ref:t,icon:DC}))),AC={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z`}}]},name:`down`,theme:`outlined`};function jC(){return jC=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,jC({},e,{ref:t,icon:AC}))),NC={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z`}}]},name:`search`,theme:`outlined`};function PC(){return PC=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,PC({},e,{ref:t,icon:NC})));function IC({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:n,removeIcon:r,loading:i,loadingIcon:a,multiple:o,hasFeedback:s,showSuffixIcon:c,feedbackIcon:l,showArrow:u,componentName:d}){let f=t??S.createElement(Fl,null),p=t=>e===null&&!s&&!u?null:S.createElement(S.Fragment,null,c!==!1&&t,s&&l),m=null;m=e===void 0?i?p(a??S.createElement(xm,{spin:!0})):({open:e,showSearch:t})=>p(e&&t?S.createElement(FC,null):S.createElement(MC,null)):p(e);let h=null;h=n===void 0?o?S.createElement(kC,null):null:n;let g=null;return g=r===void 0?S.createElement(Rl,null):r,{clearIcon:f,suffixIcon:m,itemIcon:h,removeIcon:g}}function LC(e){return S.useMemo(()=>{if(e)return(...t)=>S.createElement(Ty,{space:!0},e.apply(void 0,t))},[e])}function RC(e,t){return t===void 0?e!==null:t}var zC=`SECRET_COMBOBOX_MODE_DO_NOT_USE`,BC=S.forwardRef((e,t)=>{let{prefixCls:n,bordered:r,className:i,rootClassName:a,getPopupContainer:o,popupClassName:s,dropdownClassName:c,listHeight:l=256,placement:u,listItemHeight:d,size:f,disabled:p,notFoundContent:m,status:h,builtinPlacements:g,dropdownMatchSelectWidth:_,popupMatchSelectWidth:v,direction:y,style:b,allowClear:x,variant:C,popupStyle:w,dropdownStyle:T,transitionName:E,tagRender:D,maxCount:O,prefix:k,dropdownRender:A,popupRender:j,onDropdownVisibleChange:M,onOpenChange:N,styles:P,classNames:F,...I}=e,{getPopupContainer:L,getPrefixCls:R,renderEmpty:z,direction:B,virtual:V,popupMatchSelectWidth:H,popupOverflow:U}=S.useContext(oi),{showSearch:W,style:ee,styles:te,className:ne,classNames:re}=li(`select`),[,ie]=Kc(),ae=d??ie?.controlHeight,G=R(`select`,n),oe=R(),K=y??B,{compactSize:se,compactItemClassnames:ce}=ih(G,K),[q,le]=_C(`select`,C,r),ue=bf(G),[de,fe]=EC(G,ue),pe=S.useMemo(()=>{let{mode:t}=e;if(t!==`combobox`)return t===zC?`combobox`:t},[e.mode]),me=pe===`multiple`||pe===`tags`,he=RC(e.suffixIcon,e.showArrow),ge=v??_??H,_e=LC(j||A),ve=N||M,{status:ye,hasFeedback:be,isFormItemInput:xe,feedbackIcon:Se}=S.useContext(Sy),Ce=cC(ye,h),we;we=m===void 0?pe===`combobox`?null:z?.(`Select`)||S.createElement(gC,{componentName:`Select`}):m;let{suffixIcon:Te,itemIcon:Ee,removeIcon:De,clearIcon:Oe}=IC({...I,multiple:me,hasFeedback:be,feedbackIcon:Se,showSuffixIcon:he,prefixCls:G,componentName:`Select`}),ke=x===!0?{clearIcon:Oe}:x,Ae=Sr(I,[`suffixIcon`,`itemIcon`]),je=th(e=>f??se??e),Me=S.useContext(zp),Ne=p??Me,Pe={...e,variant:q,status:Ce,disabled:Ne,size:je},[Fe,Ie]=Fd([re,F],[te,P],{props:Pe},{popup:{_default:`root`}}),Le=J(Fe.popup?.root,s,c,{[`${G}-dropdown-${K}`]:K===`rtl`},a,fe,ue,de),Re={...Ie.popup?.root,...w??T},ze=J({[`${G}-lg`]:je===`large`,[`${G}-sm`]:je===`small`,[`${G}-rtl`]:K===`rtl`,[`${G}-${q}`]:le,[`${G}-in-form-item`]:xe},sC(G,Ce,be),ce,ne,i,Fe.root,a,fe,ue,de),Be=S.useMemo(()=>u===void 0?K===`rtl`?`bottomRight`:`bottomLeft`:u,[u,K]),[Ve]=Yd(`SelectLike`,Ie.popup?.root?.zIndex??Re?.zIndex);return S.createElement(oC,{ref:t,virtual:V,classNames:Fe,styles:Ie,showSearch:W,...Ae,style:{...Ie.root,...ee,...b},popupMatchSelectWidth:ge,transitionName:Gm(oe,`slide-up`,E),builtinPlacements:yC(g,U),listHeight:l,listItemHeight:ae,mode:pe,prefixCls:G,placement:Be,direction:K,prefix:k,suffixIcon:Te,menuItemSelectedIcon:Ee,removeIcon:De,allowClear:ke,notFoundContent:we,className:ze,getPopupContainer:o||L,popupClassName:Le,disabled:Ne,popupStyle:{...Ie.popup?.root,...Re,zIndex:Ve},maxCount:me?O:void 0,tagRender:me?D:void 0,popupRender:_e,onPopupVisibleChange:ve})}),VC=ux(BC,`popupAlign`);BC.SECRET_COMBOBOX_MODE_DO_NOT_USE=zC,BC.Option=gS,BC.OptGroup=hS,BC._InternalPanelDoNotUseOrYouWillBeFired=VC;var HC=[`xxxl`,`xxl`,`xl`,`lg`,`md`,`sm`,`xs`],UC=[].concat(HC).reverse(),WC=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`,xxxl:`(min-width: ${e.screenXXXL}px)`}),GC=e=>{let t=e,n=[].concat(HC).reverse();return n.forEach((e,r)=>{let i=e.toUpperCase(),a=`screen${i}Min`,o=`screen${i}`;if(!(t[a]<=t[o]))throw Error(`${a}<=${o} fails : !(${t[a]}<=${t[o]})`);if(r{if(t){for(let n of HC)if(e[n]&&t?.[n]!==void 0)return t[n]}},qC=()=>{let[,e]=Kc(),t=WC(GC(e));return S.useMemo(()=>{let e=new Map,n=-1,r={};return{responsiveMap:t,matchHandlers:{},dispatch(t){return r=t,e.forEach(e=>{e(r)}),e.size>=1},subscribe(t){return e.size||this.register(),n+=1,e.set(n,t),t(r),n},unsubscribe(t){e.delete(t),e.size||this.unregister()},register(){Object.entries(t).forEach(([e,t])=>{let n=({matches:t})=>{this.dispatch({...r,[e]:t})},i=window.matchMedia(t);typeof i?.addEventListener==`function`&&i.addEventListener(`change`,n),this.matchHandlers[t]={mql:i,listener:n},n(i)})},unregister(){Object.values(t).forEach(e=>{let t=this.matchHandlers[e];typeof t?.mql?.removeEventListener==`function`&&t.mql.removeEventListener(`change`,t?.listener)}),e.clear()}}},[t])};function JC(e=!0,t={}){let n=(0,S.useRef)(t),[,r]=Ed(),i=qC();return zn(()=>{let t=i.subscribe(t=>{n.current=t,e&&r()});return()=>i.unsubscribe(t)},[]),n.current}var YC=S.createContext({}),XC=e=>{let{antCls:t,componentCls:n,iconCls:r,avatarBg:i,avatarColor:a,containerSize:o,containerSizeLG:s,containerSizeSM:c,textFontSize:l,textFontSizeLG:u,textFontSizeSM:d,iconFontSize:f,iconFontSizeLG:p,iconFontSizeSM:m,borderRadius:h,borderRadiusLG:g,borderRadiusSM:_,lineWidth:v,lineType:y}=e,b=(e,t,i,a)=>({width:e,height:e,borderRadius:`50%`,fontSize:t,[`&${n}-square`]:{borderRadius:a},[`&${n}-icon`]:{fontSize:i,[`> ${r}`]:{margin:0}}});return{[n]:{...Jc(e),position:`relative`,display:`inline-flex`,justifyContent:`center`,alignItems:`center`,overflow:`hidden`,color:a,whiteSpace:`nowrap`,textAlign:`center`,verticalAlign:`middle`,background:i,border:`${Y(v)} ${y} transparent`,"&-image":{background:`transparent`},[`${t}-image-img`]:{display:`block`},...b(o,l,f,h),"&-lg":{...b(s,u,p,g)},"&-sm":{...b(c,d,m,_)},"> img":{display:`block`,width:`100%`,height:`100%`,objectFit:`cover`}}}},ZC=e=>{let{componentCls:t,groupBorderColor:n,groupOverlapping:r,groupSpace:i}=e;return{[`${t}-group`]:{display:`inline-flex`,[t]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:r}},[`${t}-group-popover`]:{[`${t} + ${t}`]:{marginInlineStart:i}}}},QC=rl(`Avatar`,e=>{let{colorTextLightSolid:t,colorTextPlaceholder:n}=e,r=gs(e,{avatarBg:n,avatarColor:t});return[XC(r),ZC(r)]},e=>{let{controlHeight:t,controlHeightLG:n,controlHeightSM:r,fontSize:i,fontSizeLG:a,fontSizeXL:o,fontSizeHeading3:s,marginXS:c,marginXXS:l,colorBorderBg:u}=e;return{containerSize:t,containerSizeLG:n,containerSizeSM:r,textFontSize:i,textFontSizeLG:i,textFontSizeSM:i,iconFontSize:Math.round((a+o)/2),iconFontSizeLG:s,iconFontSizeSM:i,groupSpace:l,groupOverlapping:-c,groupBorderColor:u}}),$C=S.forwardRef((e,t)=>{let{prefixCls:n,shape:r,size:i,src:a,srcSet:o,icon:s,className:c,rootClassName:l,style:u,alt:d,draggable:f,children:p,crossOrigin:m,gap:h=4,onError:g,..._}=e,[v,y]=S.useState(1),[b,x]=S.useState(!1),[C,w]=S.useState(!0),T=S.useRef(null),E=S.useRef(null),D=$n(t,T),{getPrefixCls:O,className:k,style:A}=li(`avatar`),j=S.useContext(YC),M=()=>{if(!E.current||!T.current)return;let e=E.current.offsetWidth,t=T.current.offsetWidth;e!==0&&t!==0&&h*2{x(!0)},[]),S.useEffect(()=>{w(!0),y(1)},[a]),S.useEffect(M,[h]);let N=()=>{g?.()!==!1&&w(!1)},P=th(e=>i??j?.size??e??`medium`),F=JC(Object.keys(hd(P)&&P||{}).some(e=>HC.includes(e))),I=S.useMemo(()=>{if(!hd(P))return{};let e=P[HC.find(e=>F[e])];return e?{width:e,height:e,fontSize:e&&(s||p)?e/2:18}:{}},[F,P,s,p]),L=O(`avatar`,n),R=bf(L),[z,B]=QC(L,R),V=J({[`${L}-lg`]:P===`large`,[`${L}-sm`]:P===`small`}),H=S.isValidElement(a),U=J(L,V,k,`${L}-${r||j?.shape||`circle`}`,{[`${L}-image`]:H||a&&C,[`${L}-icon`]:!!s},B,R,c,l,z),W=pd(P)?{width:P,height:P,fontSize:s?P/2:18}:{},ee;if(typeof a==`string`&&C)ee=S.createElement(`img`,{src:a,draggable:f,srcSet:o,onError:N,alt:d,crossOrigin:m});else if(H)ee=a;else if(s)ee=s;else if(b||v!==1){let e=`scale(${v})`,t={msTransform:e,WebkitTransform:e,transform:e};ee=S.createElement(Wr,{onResize:M},S.createElement(`span`,{className:`${L}-string`,ref:E,style:t},p))}else ee=S.createElement(`span`,{className:`${L}-string`,style:{opacity:0},ref:E},p);return S.createElement(`span`,{..._,style:{...W,...I,...A,...u},className:U,ref:D},ee)}),ew=e=>e?typeof e==`function`?e():e:null,tw=e=>{let{children:t,prefixCls:n,id:r,classNames:i,styles:a,className:o,style:s}=e;return S.createElement(`div`,{id:r,className:J(`${n}-container`,i?.container,o),style:{...a?.container,...s},role:`tooltip`},typeof t==`function`?t():t)},nw={shiftX:64,adjustY:1},rw={adjustX:1,shiftY:!0},iw=[0,0],aw={left:{points:[`cr`,`cl`],overflow:rw,offset:[-4,0],targetOffset:iw},right:{points:[`cl`,`cr`],overflow:rw,offset:[4,0],targetOffset:iw},top:{points:[`bc`,`tc`],overflow:nw,offset:[0,-4],targetOffset:iw},bottom:{points:[`tc`,`bc`],overflow:nw,offset:[0,4],targetOffset:iw},topLeft:{points:[`bl`,`tl`],overflow:nw,offset:[0,-4],targetOffset:iw},leftTop:{points:[`tr`,`tl`],overflow:rw,offset:[-4,0],targetOffset:iw},topRight:{points:[`br`,`tr`],overflow:nw,offset:[0,-4],targetOffset:iw},rightTop:{points:[`tl`,`tr`],overflow:rw,offset:[4,0],targetOffset:iw},bottomRight:{points:[`tr`,`br`],overflow:nw,offset:[0,4],targetOffset:iw},rightBottom:{points:[`bl`,`br`],overflow:rw,offset:[4,0],targetOffset:iw},bottomLeft:{points:[`tl`,`bl`],overflow:nw,offset:[0,4],targetOffset:iw},leftBottom:{points:[`br`,`bl`],overflow:rw,offset:[-4,0],targetOffset:iw}};function ow(){return ow=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{trigger:n=[`hover`],mouseEnterDelay:r=0,mouseLeaveDelay:i=.1,prefixCls:a=`rc-tooltip`,children:o,onVisibleChange:s,afterVisibleChange:c,motion:l,placement:u=`right`,align:d={},destroyOnHidden:f=!1,defaultVisible:p,getTooltipContainer:m,arrowContent:h,overlay:g,id:_,showArrow:v=!0,classNames:y,styles:b,...x}=e,C=zf(_),w=(0,S.useRef)(null);(0,S.useImperativeHandle)(t,()=>w.current);let T={...x};`visible`in e&&(T.popupVisible=e.visible);let E=S.useMemo(()=>{if(!v)return!1;let e=v===!0?{}:v;return{...e,className:J(e.className,y?.arrow),style:{...e.style,...b?.arrow},content:e.content??h}},[v,y?.arrow,b?.arrow,h]);return S.createElement(jp,ow({popupClassName:y?.root,prefixCls:a,popup:S.createElement(tw,{key:`content`,prefixCls:a,id:C,classNames:y,styles:b},g),action:n,builtinPlacements:aw,popupPlacement:u,ref:w,popupAlign:d,getPopupContainer:m,onOpenChange:s,afterOpenChange:c,popupMotion:l,defaultPopupVisible:p,autoDestroy:f,mouseLeaveDelay:i,popupStyle:b?.root,mouseEnterDelay:r,arrow:E,uniqueContainerClassName:y?.uniqueContainer,uniqueContainerStyle:b?.uniqueContainer},T),({open:e})=>{let t=S.Children.only(o),n={"aria-describedby":g&&e?C:void 0};return S.cloneElement(t,n)})});function cw(e){let{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,i=t/2,a=i,o=r*1/Math.sqrt(2),s=i-r*(1-1/Math.sqrt(2)),c=i-1/Math.sqrt(2)*n,l=r*(Math.sqrt(2)-1)+1/Math.sqrt(2)*n,u=2*i-c,d=l,f=2*i-o,p=s,m=2*i-0,h=a,g=i*Math.sqrt(2)+r*(Math.sqrt(2)-2),_=r*(Math.sqrt(2)-1),v=`polygon(${_}px 100%, 50% ${_}px, ${2*i-_}px 100%, ${_}px 100%)`;return{arrowShadowWidth:g,arrowPath:`path('M 0 ${a} A ${r} ${r} 0 0 0 ${o} ${s} L ${c} ${l} A ${n} ${n} 0 0 1 ${u} ${d} L ${f} ${p} A ${r} ${r} 0 0 0 ${m} ${h} Z')`,arrowPolygon:v}}var lw=(e,t,n)=>{let{sizePopupArrow:r,arrowPolygon:i,arrowPath:a,arrowShadowWidth:o,borderRadiusXS:s,calc:c}=e;return{pointerEvents:`none`,width:r,height:r,overflow:`hidden`,"&::before":{position:`absolute`,bottom:0,insetInlineStart:0,width:r,height:c(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[i,a]},content:`""`},"&::after":{content:`""`,position:`absolute`,width:o,height:o,bottom:0,insetInline:0,margin:`auto`,borderRadius:{_skip_check_:!0,value:`0 0 ${Y(s)} 0`},transform:`translateY(50%) rotate(-135deg)`,boxShadow:n,zIndex:0,background:`transparent`}}};function uw(e){let{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?8:r}}function dw(e,t){return e?t:{}}var fw=(e,t,n)=>{let{componentCls:r,boxShadowPopoverArrow:i,arrowOffsetVertical:a,arrowOffsetHorizontal:o,antCls:s}=e,[c]=ol(s,`tooltip`),{arrowDistance:l=0,arrowPlacement:u={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:{[`${r}-arrow`]:[{position:`absolute`,zIndex:1,display:`block`,...lw(e,t,i),"&:before":{background:t}}],...dw(!!u.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(`,`)]:{bottom:l,transform:`translateY(100%) rotate(180deg)`},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:`50%`},transform:`translateX(-50%) translateY(100%) rotate(180deg)`},"&-placement-topLeft":{[c(`arrow-offset-x`)]:o,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:o}}},"&-placement-topRight":{[c(`arrow-offset-x`)]:`calc(100% - ${Y(o)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:o}}}}),...dw(!!u.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(`,`)]:{top:l,transform:`translateY(-100%)`},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:`50%`},transform:`translateX(-50%) translateY(-100%)`},"&-placement-bottomLeft":{[c(`arrow-offset-x`)]:o,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:o}}},"&-placement-bottomRight":{[c(`arrow-offset-x`)]:`calc(100% - ${Y(o)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:o}}}}),...dw(!!u.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(`,`)]:{right:{_skip_check_:!0,value:l},transform:`translateX(100%) rotate(90deg)`},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:`50%`},transform:`translateY(-50%) translateX(100%) rotate(90deg)`},[`&-placement-leftTop > ${r}-arrow`]:{top:a},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:a}}),...dw(!!u.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(`,`)]:{left:{_skip_check_:!0,value:l},transform:`translateX(-100%) rotate(-90deg)`},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:`50%`},transform:`translateY(-50%) translateX(-100%) rotate(-90deg)`},[`&-placement-rightTop > ${r}-arrow`]:{top:a},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:a}})}}};function pw(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};let i=hd(r)?r:{},a={};switch(e){case`top`:case`bottom`:a.shiftX=t.arrowOffsetHorizontal*2+n,a.shiftY=!0,a.adjustY=!0;break;case`left`:case`right`:a.shiftY=t.arrowOffsetVertical*2+n,a.shiftX=!0,a.adjustX=!0;break}let o={...a,...i};return o.shiftX||(o.adjustX=!0),o.shiftY||(o.adjustY=!0),o}var mw={left:{points:[`cr`,`cl`]},right:{points:[`cl`,`cr`]},top:{points:[`bc`,`tc`]},bottom:{points:[`tc`,`bc`]},topLeft:{points:[`bl`,`tl`]},leftTop:{points:[`tr`,`tl`]},topRight:{points:[`br`,`tr`]},rightTop:{points:[`tl`,`tr`]},bottomRight:{points:[`tr`,`br`]},rightBottom:{points:[`bl`,`br`]},bottomLeft:{points:[`tl`,`bl`]},leftBottom:{points:[`br`,`bl`]}},hw={topLeft:{points:[`bl`,`tc`]},leftTop:{points:[`tr`,`cl`]},topRight:{points:[`br`,`tc`]},rightTop:{points:[`tl`,`cr`]},bottomRight:{points:[`tr`,`bc`]},rightBottom:{points:[`bl`,`cr`]},bottomLeft:{points:[`tl`,`bc`]},leftBottom:{points:[`br`,`cl`]}},gw=new Set([`topLeft`,`topRight`,`bottomLeft`,`bottomRight`,`leftTop`,`leftBottom`,`rightTop`,`rightBottom`]);function _w(e){let{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:i,borderRadius:a,visibleFirst:o}=e,s=t/2,c={},l=uw({contentRadius:a,limitVerticalRadius:!0});return Object.keys(mw).forEach(e=>{let a={...r&&hw[e]||mw[e],offset:[0,0],dynamicInset:!0};switch(c[e]=a,gw.has(e)&&(a.autoArrow=!1),e){case`top`:case`topLeft`:case`topRight`:a.offset[1]=-s-i;break;case`bottom`:case`bottomLeft`:case`bottomRight`:a.offset[1]=s+i;break;case`left`:case`leftTop`:case`leftBottom`:a.offset[0]=-s-i;break;case`right`:case`rightTop`:case`rightBottom`:a.offset[0]=s+i;break}if(r)switch(e){case`topLeft`:case`bottomLeft`:a.offset[0]=-l.arrowOffsetHorizontal-s;break;case`topRight`:case`bottomRight`:a.offset[0]=l.arrowOffsetHorizontal+s;break;case`leftTop`:case`rightTop`:a.offset[1]=-l.arrowOffsetHorizontal*2+s;break;case`leftBottom`:case`rightBottom`:a.offset[1]=l.arrowOffsetHorizontal*2-s;break}a.overflow=pw(e,l,t,n),o&&(a.htmlRegion=`visibleFirst`)}),c}var vw=S.createContext(!1),yw=(e,t)=>{let n=e=>typeof e==`boolean`?{show:e}:e||{};return S.useMemo(()=>{let r=n(e),i=n(t);return{...i,...r,show:r.show??i.show??!0}},[e,t])},bw=`50%`,xw=e=>{let{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:i,tooltipBg:a,tooltipBorderRadius:o,zIndexPopup:s,controlHeight:c,boxShadowSecondary:l,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:p,antCls:m}=e,[h,g]=ol(m,`tooltip`),_=t(o).add(p).add(f).equal(),v={minWidth:t(o).mul(2).add(p).equal(),minHeight:c,padding:`${Y(e.calc(u).div(2).equal())} ${Y(d)}`,color:g(`overlay-color`,i),textAlign:`start`,textDecoration:`none`,wordWrap:`break-word`,backgroundColor:a,borderRadius:o,boxShadow:l,boxSizing:`border-box`},y={[h(`valid-offset-x`)]:g(`arrow-offset-x`,`var(--arrow-x)`),transformOrigin:[g(`valid-offset-x`,bw),`var(--arrow-y, ${bw})`].join(` `)};return[{[n]:{...Jc(e),position:`absolute`,zIndex:s,display:`block`,width:`max-content`,maxWidth:r,visibility:`visible`,...y,"&-hidden":{display:`none`},[h(`arrow-background-color`)]:a,[`${n}-container`]:[v,wh(e,!0)],[`&:has(~ ${n}-unique-container)`]:{[`${n}-container`]:{border:`none`,background:`transparent`,boxShadow:`none`}},[[`&-placement-topLeft`,`&-placement-topRight`,`&-placement-bottomLeft`,`&-placement-bottomRight`].join(`,`)]:{minWidth:_},[[`&-placement-left`,`&-placement-leftTop`,`&-placement-leftBottom`,`&-placement-right`,`&-placement-rightTop`,`&-placement-rightBottom`].join(`,`)]:{[`${n}-inner`]:{borderRadius:e.min(o,8)}},[`${n}-content`]:{position:`relative`},...sl(e,(e,{darkColor:t})=>({[`&${n}-${e}`]:{[`${n}-container`]:{backgroundColor:t},[`${n}-arrow`]:{[h(`arrow-background-color`)]:t}}})),"&-rtl":{direction:`rtl`}}},fw(e,g(`arrow-background-color`)),{[`${n}-pure`]:{position:`relative`,maxWidth:`none`,margin:e.sizePopupArrow}},{[`${n}-unique-container`]:{...v,...y,position:`absolute`,zIndex:t(s).sub(1).equal(),"&-hidden":{display:`none`},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},Sw=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...uw({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...cw(gs(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),Cw=(e,t,n=!0)=>rl(`Tooltip`,e=>{let{borderRadius:t,colorTextLightSolid:n,colorBgSpotlight:r,maxWidth:i}=e;return[xw(gs(e,{tooltipMaxWidth:i,tooltipColor:n,tooltipBorderRadius:t,tooltipBg:r})),rg(e,`zoom-big-fast`)]},Sw,{resetStyle:!1,injectStyle:n})(e,t),ww=Ds.map(e=>`${e}-inverse`),Tw=[`success`,`processing`,`error`,`default`,`warning`];function Ew(e,t=!0){return t?[].concat(Zr(ww),Zr(Ds)).includes(e):Ds.includes(e)}function Dw(e){return Tw.includes(e)}var Ow=(e,t,n)=>{let r=Ew(n),[i]=ol(e,`tooltip`),a=J({[`${t}-${n}`]:n&&r}),o={},s={},c=Pg(n).toRgb(),l=(.299*c.r+.587*c.g+.114*c.b)/255<.5?`#FFF`:`#000`;return n&&!r&&(o.background=n,o[i(`overlay-color`)]=l,s[i(`arrow-background-color`)]=n),{className:a,overlayStyle:o,arrowStyle:s}},kw=e=>{let{prefixCls:t,className:n,placement:r=`top`,title:i,color:a,overlayInnerStyle:o,classNames:s,styles:c}=e,{getPrefixCls:l}=S.useContext(oi),u=l(`tooltip`,t),d=l(),f=bf(u),[p,m]=Cw(u,f),h=Ow(d,u,a),g=h.arrowStyle,_=S.useMemo(()=>({container:{...o,...h.overlayStyle}}),[o,h.overlayStyle]),v={...e,placement:r},[y,b]=Fd([s],[_,c],{props:v}),x=J(f,p,m,u,`${u}-pure`,`${u}-placement-${r}`,n,h.className);return S.createElement(`div`,{className:x,style:g},S.createElement(`div`,{className:`${u}-arrow`}),S.createElement(tw,{...e,className:p,prefixCls:u,classNames:y,styles:b},i))},Aw=S.forwardRef((e,t)=>{let{prefixCls:n,openClassName:r,getTooltipContainer:i,color:a,children:o,afterOpenChange:s,arrow:c,destroyTooltipOnHide:l,destroyOnHidden:u,title:d,overlay:f,trigger:p,builtinPlacements:m,autoAdjustOverflow:h=!0,motion:g,getPopupContainer:_,placement:v=`top`,mouseEnterDelay:y=.1,mouseLeaveDelay:b=.1,rootClassName:x,styles:C,classNames:w,onOpenChange:T,overlayInnerStyle:E,overlayStyle:D,overlayClassName:O,...k}=e,[,A]=Kc(),j=e[`data-popover-inject`],{getPopupContainer:M,getPrefixCls:N,direction:P,...F}=li(`tooltip`),{className:I,style:L,classNames:R,styles:z,arrow:B,trigger:V}=j?{}:F,H=yw(c,B),U=H.show,W=p||V||`hover`,ee=_||M,te=u??!!l,ne=S.useContext(vw);Dr(`Tooltip`);let re=S.useRef(null),ie=()=>{re.current?.forceAlign()};S.useImperativeHandle(t,()=>({forceAlign:ie,nativeElement:re.current?.nativeElement,popupElement:re.current?.popupElement}));let[ae,G]=Hn(e.defaultOpen??!1,e.open),oe=!d&&!f&&d!==0,K=e=>{G(oe?!1:e),!oe&&T&&T(e)},se=S.useMemo(()=>m||_w({arrowPointAtCenter:H?.pointAtCenter??!1,autoAdjustOverflow:h,arrowWidth:U?A.sizePopupArrow:0,borderRadius:A.borderRadius,offset:A.marginXXS,visibleFirst:!0}),[H,m,A,U,h]),ce=S.useMemo(()=>d===0?d:f||d||``,[f,d]),q=S.createElement(Ty,{space:!0,form:!0},typeof ce==`function`?ce():ce),le={...e,trigger:W,builtinPlacements:se,getPopupContainer:ee,destroyOnHidden:te},[ue,de]=Fd([R,w],[z,C],{props:le}),fe=N(`tooltip`,n),pe=N(),me=ae;(!(`open`in e)&&oe||ne)&&(me=!1);let he=S.isValidElement(o)&&!Mp(o)?o:S.createElement(`span`,null,o),ge=he.props,_e=!ge.className||typeof ge.className==`string`?J(ge.className,r||`${fe}-open`):ge.className,ve=bf(fe),[ye,be]=Cw(fe,ve,!j),xe=Ow(pe,fe,a),Se=xe.arrowStyle,Ce=J(ve,ye,be),we=J(O,{[`${fe}-rtl`]:P===`rtl`},xe.className,x,Ce,I,ue.root),[Te,Ee]=Yd(`Tooltip`,k.zIndex),De={...de.container,...E,...xe.overlayStyle},Oe=S.createElement(sw,{unique:!0,...k,zIndex:Te,showArrow:U,placement:v,mouseEnterDelay:y,mouseLeaveDelay:b,prefixCls:fe,classNames:{root:we,container:ue.container,arrow:ue.arrow,uniqueContainer:J(Ce,ue.container)},styles:{root:{...Se,...de.root,...L,...D},container:De,uniqueContainer:De,arrow:de.arrow},ref:re,overlay:q,visible:me,onVisibleChange:K,afterVisibleChange:s,arrowContent:S.createElement(`span`,{className:`${fe}-arrow-content`}),motion:{motionName:Gm(pe,`zoom-big-fast`,typeof g?.motionName==`string`?g?.motionName:void 0),motionDeadline:1e3},trigger:W,builtinPlacements:se,getTooltipContainer:ee,destroyOnHidden:te},me?Pp(he,{className:_e}):he);return S.createElement(Ud.Provider,{value:Ee},Oe)});Aw._InternalPanelDoNotUseOrYouWillBeFired=kw,Aw.UniqueProvider=Rp;var jw=`50%`,Mw=e=>{let{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:i,innerPadding:a,boxShadowSecondary:o,colorTextHeading:s,borderRadiusLG:c,zIndexPopup:l,titleMarginBottom:u,colorBgElevated:d,popoverBg:f,titleBorderBottom:p,innerContentPadding:m,titlePadding:h,antCls:g}=e,[_,v]=ol(g,`tooltip`);return[{[t]:{...Jc(e),position:`absolute`,top:0,left:{_skip_check_:!0,value:0},zIndex:l,fontWeight:`normal`,whiteSpace:`normal`,textAlign:`start`,cursor:`auto`,userSelect:`text`,[_(`valid-offset-x`)]:v(`arrow-offset-x`,`var(--arrow-x)`),transformOrigin:[v(`valid-offset-x`,jw),`var(--arrow-y, ${jw})`].join(` `),[_(`arrow-background-color`)]:d,width:`max-content`,maxWidth:`100vw`,"&-rtl":{direction:`rtl`},"&-hidden":{display:`none`},[`${t}-content`]:{position:`relative`},[`${t}-container`]:{backgroundColor:f,backgroundClip:`padding-box`,borderRadius:c,boxShadow:o,padding:a},[`${t}-title`]:{minWidth:r,marginBottom:u,color:s,fontWeight:i,borderBottom:p,padding:h},[`${t}-content`]:{color:n,padding:m}}},fw(e,v(`arrow-background-color`)),{[`${t}-pure`]:{position:`relative`,maxWidth:`none`,margin:e.sizePopupArrow,display:`inline-block`}}]},Nw=e=>{let{componentCls:t,antCls:n}=e,[r]=ol(n,`tooltip`);return{[t]:Ds.map(n=>{let i=e[`${n}6`];return{[`&${t}-${n}`]:{[r(`arrow-background-color`)]:i,[`${t}-inner`]:{backgroundColor:i},[`${t}-arrow`]:{background:`transparent`}}}})}},Pw=rl(`Popover`,e=>{let{colorBgElevated:t,colorText:n}=e,r=gs(e,{popoverBg:t,popoverColor:n});return[Mw(r),Nw(r),rg(r,`zoom-big`)]},e=>{let{lineWidth:t,controlHeight:n,fontHeight:r,padding:i,wireframe:a,zIndexPopupBase:o,borderRadiusLG:s,marginXS:c,lineType:l,colorSplit:u,paddingSM:d}=e,f=n-r,p=f/2,m=f/2-t,h=i;return{titleMinWidth:177,zIndexPopup:o+30,...cw(e),...uw({contentRadius:s,limitVerticalRadius:!0}),innerPadding:a?0:12,titleMarginBottom:a?0:c,titlePadding:a?`${p}px ${h}px ${m}px`:0,titleBorderBottom:a?`${t}px ${l} ${u}`:`none`,innerContentPadding:a?`${d}px ${h}px`:0}},{resetStyle:!1,deprecatedTokens:[[`width`,`titleMinWidth`],[`minWidth`,`titleMinWidth`]]}),Fw=e=>{let{title:t,content:n,prefixCls:r,classNames:i,styles:a}=e;return!t&&!n?null:S.createElement(S.Fragment,null,t&&S.createElement(`div`,{className:J(`${r}-title`,i?.title),style:a?.title},t),n&&S.createElement(`div`,{className:J(`${r}-content`,i?.content),style:a?.content},n))},Iw=e=>{let{hashId:t,prefixCls:n,className:r,style:i,placement:a=`top`,title:o,content:s,children:c,classNames:l,styles:u}=e,d=ew(o),f=ew(s),p={...e,placement:a},[m,h]=Fd([l],[u],{props:p}),g=J(t,n,`${n}-pure`,`${n}-placement-${a}`,r);return S.createElement(`div`,{className:g,style:i},S.createElement(`div`,{className:`${n}-arrow`}),S.createElement(tw,{...e,className:t,prefixCls:n,classNames:m,styles:h},c||S.createElement(Fw,{prefixCls:n,title:d,content:f,classNames:m,styles:h})))},Lw=e=>{let{prefixCls:t,className:n,...r}=e,{getPrefixCls:i}=S.useContext(oi),a=i(`popover`,t),[o,s]=Pw(a);return S.createElement(Iw,{...r,prefixCls:a,hashId:o,className:J(n,s)})},Rw=S.forwardRef((e,t)=>{let{prefixCls:n,title:r,content:i,overlayClassName:a,placement:o=`top`,trigger:s,children:c,mouseEnterDelay:l=.1,mouseLeaveDelay:u=.1,onOpenChange:d,overlayStyle:f={},styles:p,classNames:m,motion:h,arrow:g,..._}=e,{getPrefixCls:v,className:y,style:b,classNames:x,styles:C,arrow:w,trigger:T}=li(`popover`),E=v(`popover`,n),[D,O]=Pw(E),k=v(),A=yw(g,w),j=s||T||`hover`,M={...e,placement:o,trigger:j,mouseEnterDelay:l,mouseLeaveDelay:u,overlayStyle:f,styles:p,classNames:m},[N,P]=Fd([x,m],[C,p],{props:M}),F=J(a,D,O,y,N.root),[I,L]=Hn(e.defaultOpen??!1,e.open),R=e=>{L(e),d?.(e)},z=ew(r),B=ew(i);return S.createElement(Aw,{unique:!1,arrow:A,placement:o,trigger:j,mouseEnterDelay:l,mouseLeaveDelay:u,..._,prefixCls:E,classNames:{root:F,container:N.container,arrow:N.arrow},styles:{root:{...P.root,...b,...f},container:P.container,arrow:P.arrow},ref:t,open:I,onOpenChange:R,overlay:z||B?S.createElement(Fw,{prefixCls:E,title:z,content:B,classNames:N,styles:P}):null,motion:{motionName:Gm(k,`zoom-big`,typeof h?.motionName==`string`?h?.motionName:void 0)},"data-popover-inject":!0},c)});Rw._InternalPanelDoNotUseOrYouWillBeFired=Lw;var zw=e=>{let{size:t,shape:n}=S.useContext(YC),r=S.useMemo(()=>({size:e.size||t,shape:e.shape||n}),[e.size,e.shape,t,n]);return S.createElement(YC.Provider,{value:r},e.children)},Bw=e=>{let{getPrefixCls:t,direction:n}=S.useContext(oi),{prefixCls:r,className:i,rootClassName:a,style:o,maxCount:s,maxStyle:c,size:l,shape:u,maxPopoverPlacement:d,maxPopoverTrigger:f,children:p,max:m}=e,h=t(`avatar`,r),g=`${h}-group`,_=bf(h),[v,y]=QC(h,_),b=J(g,{[`${g}-rtl`]:n===`rtl`},y,_,i,a,v),x=Cr(p).map((e,t)=>Pp(e,{key:`avatar-key-${t}`})),C=m?.count||s,w=x.length;if(C&&CS.createElement(Al,Uw({},e,{ref:t,icon:Hw}))),{ESC:Gw,TAB:Kw}=om;function qw({visible:e,triggerRef:t,onVisibleChange:n,autoFocus:r,overlayRef:i}){let a=S.useRef(!1),o=()=>{e&&(t.current?.focus?.(),n?.(!1))},s=()=>i.current?.focus?(i.current.focus(),a.current=!0,!0):!1,c=e=>{switch(e.keyCode){case Gw:o();break;case Kw:{let t=!1;a.current||(t=s()),t?e.preventDefault():o();break}}};S.useEffect(()=>e?(window.addEventListener(`keydown`,c),r&&ri(s,3),()=>{window.removeEventListener(`keydown`,c),a.current=!1}):()=>{a.current=!1},[e])}var Jw=(0,S.forwardRef)((e,t)=>{let{overlay:n,arrow:r,prefixCls:i}=e,a=(0,S.useMemo)(()=>{let e;return e=typeof n==`function`?n():n,e},[n]),o=$n(t,ir(a));return S.createElement(S.Fragment,null,r&&S.createElement(`div`,{className:`${i}-arrow`}),S.cloneElement(a,{ref:tr(a)?o:void 0}))}),Yw={adjustX:1,adjustY:1},Xw=[0,0],Zw={topLeft:{points:[`bl`,`tl`],overflow:Yw,offset:[0,-4],targetOffset:Xw},top:{points:[`bc`,`tc`],overflow:Yw,offset:[0,-4],targetOffset:Xw},topRight:{points:[`br`,`tr`],overflow:Yw,offset:[0,-4],targetOffset:Xw},bottomLeft:{points:[`tl`,`bl`],overflow:Yw,offset:[0,4],targetOffset:Xw},bottom:{points:[`tc`,`bc`],overflow:Yw,offset:[0,4],targetOffset:Xw},bottomRight:{points:[`tr`,`br`],overflow:Yw,offset:[0,4],targetOffset:Xw}};function Qw(){return Qw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{arrow:n=!1,prefixCls:r=`rc-dropdown`,transitionName:i,animation:a,align:o,placement:s=`bottomLeft`,placements:c=Zw,getPopupContainer:l,showAction:u,hideAction:d,overlayClassName:f,overlayStyle:p,visible:m,trigger:h=[`hover`],autoFocus:g,overlay:_,children:v,onVisibleChange:y,...b}=e,[x,C]=S.useState(),w=`visible`in e?m:x,T=a?`${r}-${a}`:i,E=S.useRef(null),D=S.useRef(null),O=S.useRef(null);S.useImperativeHandle(t,()=>E.current);let k=e=>{C(e),y?.(e)};qw({visible:w,triggerRef:O,onVisibleChange:k,autoFocus:g,overlayRef:D});let A=t=>{let{onOverlayClick:n}=e;C(!1),n&&n(t)},j=()=>S.createElement(Jw,{ref:D,overlay:_,prefixCls:r,arrow:n}),M=()=>typeof _==`function`?j:j(),N=()=>{let{minOverlayWidthMatchTrigger:t,alignPoint:n}=e;return`minOverlayWidthMatchTrigger`in e?t:!n},P=S.cloneElement(v,{className:J(v.props?.className,w&&(()=>{let{openClassName:t}=e;return t===void 0?`${r}-open`:t})()),ref:tr(v)?$n(O,ir(v)):void 0}),F=d;return!F&&h.indexOf(`contextMenu`)!==-1&&(F=[`click`]),S.createElement(jp,Qw({builtinPlacements:c},b,{prefixCls:r,ref:E,popupClassName:J(f,{[`${r}-show-arrow`]:n}),popupStyle:p,action:h,showAction:u,hideAction:F,popupPlacement:s,popupAlign:o,popupMotion:{motionName:T},popupVisible:w,stretch:N()?`minWidth`:``,popup:M(),onOpenChange:k,onPopupClick:A,getPopupContainer:l}),P)}),eT=S.createContext(null);function tT(e,t){return`${e}-${t}`}function nT(e){return tT(S.useContext(eT),e)}var rT=S.createContext(null);function iT(e,t){let n={...e};return Object.keys(t).forEach(e=>{let r=t[e];r!==void 0&&(n[e]=r)}),n}function aT({children:e,locked:t,...n}){let r=S.useContext(rT),i=Gn(()=>iT(r,n),[r,n],(e,n)=>!t&&(e[0]!==n[0]||!Ti(e[1],n[1],!0)));return S.createElement(rT.Provider,{value:i},e)}var oT=[],sT=S.createContext(null);function cT(){return S.useContext(sT)}var lT=S.createContext(oT);function uT(e){let t=S.useContext(lT);return S.useMemo(()=>e===void 0?t:[...t,e],[t,e])}var dT=S.createContext(null),fT=S.createContext({}),{LEFT:pT,RIGHT:mT,UP:hT,DOWN:gT,ENTER:_T,ESC:vT,HOME:yT,END:bT}=om,xT=[hT,gT,pT,mT];function ST(e,t,n,r){let i=`prev`,a=`next`,o=`children`,s=`parent`;if(e===`inline`&&r===_T)return{inlineTrigger:!0};let c={[hT]:i,[gT]:a},l={[pT]:n?a:i,[mT]:n?i:a,[gT]:o,[_T]:o},u={[hT]:i,[gT]:a,[_T]:o,[vT]:s,[pT]:n?o:s,[mT]:n?s:o};switch({inline:c,horizontal:l,vertical:u,inlineSub:c,horizontalSub:u,verticalSub:u}[`${e}${t?``:`Sub`}`]?.[r]){case i:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case s:return{offset:-1,sibling:!1};case o:return{offset:1,sibling:!1};default:return null}}function CT(e){let t=e;for(;t;){if(t.getAttribute(`data-menu-list`))return t;t=t.parentElement}return null}function wT(e,t){let n=e||document.activeElement;for(;n;){if(t.has(n))return n;n=n.parentElement}return null}function TT(e,t){return c_(e,!0).filter(e=>t.has(e))}function ET(e,t,n,r=1){if(!e)return null;let i=TT(e,t),a=i.length,o=i.findIndex(e=>n===e);return r<0?o===-1?o=a-1:--o:r>0&&(o+=1),o=(o+a)%a,i[o]}var DT=(e,t)=>{let n=new Set,r=new Map,i=new Map;return e.forEach(e=>{let a=document.querySelector(`[data-menu-id='${tT(t,e)}']`);a&&(n.add(a),i.set(a,e),r.set(e,a))}),{elements:n,key2element:r,element2key:i}};function OT(e,t,n,r,i,a,o,s,c,l){let u=S.useRef(),d=S.useRef();d.current=t;let f=()=>{ri.cancel(u.current)};return S.useEffect(()=>()=>{f()},[]),p=>{let{which:m}=p;if([...xT,_T,vT,yT,bT].includes(m)){let l=a(),h=DT(l,r),{elements:g,key2element:_,element2key:v}=h,y=wT(_.get(t),g),b=v.get(y),x=ST(e,o(b,!0).length===1,n,m);if(!x&&m!==yT&&m!==bT)return;(xT.includes(m)||[yT,bT].includes(m))&&p.preventDefault();let S=e=>{if(e){let t=e,n=e.querySelector(`a`);n?.getAttribute(`href`)&&(t=n);let r=v.get(e);s(r),f(),u.current=ri(()=>{d.current===r&&t.focus()})}};if([yT,bT].includes(m)||x.sibling||!y){let t;t=!y||e===`inline`?i.current:CT(y);let n,r=TT(t,g);n=m===yT?r[0]:m===bT?r[r.length-1]:ET(t,g,y,x.offset),S(n)}else if(x.inlineTrigger)c(b);else if(x.offset>0)c(b,!0),f(),u.current=ri(()=>{h=DT(l,r);let e=y.getAttribute(`aria-controls`);S(ET(document.getElementById(e),h.elements))},5);else if(x.offset<0){let e=o(b,!0),t=e[e.length-2],n=_.get(t);c(t,!1),S(n)}}l?.(p)}}function kT(e){Promise.resolve().then(e)}var AT=`__RC_UTIL_PATH_SPLIT__`,jT=e=>e.join(AT),MT=e=>e.split(AT),NT=`rc-menu-more`;function PT(){let[,e]=S.useState({}),t=(0,S.useRef)(new Map),n=(0,S.useRef)(new Map),[r,i]=S.useState([]),a=(0,S.useRef)(0),o=(0,S.useRef)(!1),s=()=>{o.current||e({})},c=(0,S.useCallback)((e,r)=>{let i=jT(r);n.current.set(i,e),t.current.set(e,i),a.current+=1;let o=a.current;kT(()=>{o===a.current&&s()})},[]),l=(0,S.useCallback)((e,r)=>{let i=jT(r);n.current.delete(i),t.current.delete(e)},[]),u=(0,S.useCallback)(e=>{i(e)},[]),d=(0,S.useCallback)((e,n)=>{let i=MT(t.current.get(e)||``);return n&&r.includes(i[0])&&i.unshift(NT),i},[r]),f=(0,S.useCallback)((e,t)=>e.filter(e=>e!==void 0).some(e=>d(e,!0).includes(t)),[d]),p=()=>{let e=[...t.current.keys()];return r.length&&e.push(NT),e},m=(0,S.useCallback)(e=>{let r=`${t.current.get(e)}${AT}`,i=new Set;return[...n.current.keys()].forEach(e=>{e.startsWith(r)&&i.add(n.current.get(e))}),i},[]);return S.useEffect(()=>()=>{o.current=!0},[]),{registerPath:c,unregisterPath:l,refreshOverflowKeys:u,isSubPathKey:f,getKeyPath:d,getKeys:p,getSubPathKeys:m}}function FT(e){let t=S.useRef(e);t.current=e;let n=S.useCallback((...e)=>t.current?.(...e),[]);return e?n:void 0}function IT(e,t,n,r){let{activeKey:i,onActive:a,onInactive:o}=S.useContext(rT),s={active:i===e};return t||(s.onMouseEnter=t=>{n?.({key:e,domEvent:t}),a(e)},s.onMouseLeave=t=>{r?.({key:e,domEvent:t}),o(e)}),s}function LT(e){let{mode:t,rtl:n,inlineIndent:r}=S.useContext(rT);if(t!==`inline`)return null;let i=e;return n?{paddingRight:i*r}:{paddingLeft:i*r}}function RT({icon:e,props:t,children:n}){let r;return e===null||e===!1?null:(typeof e==`function`?r=S.createElement(e,{...t}):typeof e!=`boolean`&&(r=e),r||n||null)}function zT({item:e,...t}){return Object.defineProperty(t,`item`,{get:()=>(br(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function BT(){return BT=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{style:n,className:r,eventKey:i,warnKey:a,disabled:o,itemIcon:s,children:c,role:l,onMouseEnter:u,onMouseLeave:d,onClick:f,onKeyDown:p,onFocus:m,...h}=e,g=nT(i),{prefixCls:_,onItemClick:v,disabled:y,overflowDisabled:b,itemIcon:x,selectedKeys:C,onActive:w}=S.useContext(rT),{_internalRenderMenuItem:T}=S.useContext(fT),E=`${_}-item`,D=S.useRef(),O=S.useRef(),k=y||o,A=er(t,O),j=uT(i),M=e=>({key:i,keyPath:[...j].reverse(),item:D.current,domEvent:e}),N=s||x,{active:P,...F}=IT(i,k,u,d),I=C.includes(i),L=LT(j.length),R=e=>{if(k)return;let t=M(e);f?.(zT(t)),v(t)},z=e=>{if(p?.(e),e.which===om.ENTER){let t=M(e);f?.(zT(t)),v(t)}},B=e=>{w(i),m?.(e)},V={};e.role===`option`&&(V[`aria-selected`]=I);let H=S.createElement(VT,BT({ref:D,elementRef:A,role:l===null?`none`:l||`menuitem`,tabIndex:o?null:-1,"data-menu-id":b&&g?null:g},Sr(h,[`extra`]),F,V,{component:`li`,"aria-disabled":o,style:{...L,...n},className:J(E,{[`${E}-active`]:P,[`${E}-selected`]:I,[`${E}-disabled`]:k},r),onClick:R,onKeyDown:z,onFocus:B}),c,S.createElement(RT,{props:{...e,isSelected:I},icon:N}));return T&&(H=T(H,e,{selected:I})),H});function UT(e,t){let{eventKey:n}=e,r=cT(),i=uT(n);return S.useEffect(()=>{if(r)return r.registerPath(n,i),()=>{r.unregisterPath(n,i)}},[i]),r?null:S.createElement(HT,BT({},e,{ref:t}))}var WT=S.forwardRef(UT);function GT(){return GT=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:i,mode:a,rtl:o}=S.useContext(rT);return S.createElement(`ul`,GT({className:J(i,o&&`${i}-rtl`,`${i}-sub`,`${i}-${a===`inline`?`inline`:`vertical`}`,e),role:`menu`},n,{"data-menu-list":!0,ref:r}),t)});function qT(e,t){return Cr(e).map((e,n)=>{if(S.isValidElement(e)){let{key:r}=e,i=e.props?.eventKey??r;i??=`tmp_key-${[...t,n].join(`-`)}`;let a={key:i,eventKey:i};return S.cloneElement(e,a)}return e})}var JT={adjustX:1,adjustY:1},YT={topLeft:{points:[`bl`,`tl`],overflow:JT},topRight:{points:[`br`,`tr`],overflow:JT},bottomLeft:{points:[`tl`,`bl`],overflow:JT},bottomRight:{points:[`tr`,`br`],overflow:JT},leftTop:{points:[`tr`,`tl`],overflow:JT},leftBottom:{points:[`br`,`bl`],overflow:JT},rightTop:{points:[`tl`,`tr`],overflow:JT},rightBottom:{points:[`bl`,`br`],overflow:JT}},XT={topLeft:{points:[`bl`,`tl`],overflow:JT},topRight:{points:[`br`,`tr`],overflow:JT},bottomLeft:{points:[`tl`,`bl`],overflow:JT},bottomRight:{points:[`tr`,`br`],overflow:JT},rightTop:{points:[`tr`,`tl`],overflow:JT},rightBottom:{points:[`br`,`bl`],overflow:JT},leftTop:{points:[`tl`,`tr`],overflow:JT},leftBottom:{points:[`bl`,`br`],overflow:JT}};function ZT(e,t,n){if(t)return t;if(n)return n[e]||n.other}var QT={horizontal:`bottomLeft`,vertical:`rightTop`,"vertical-left":`rightTop`,"vertical-right":`leftTop`};function $T({prefixCls:e,visible:t,children:n,popup:r,popupStyle:i,popupClassName:a,popupOffset:o,disabled:s,mode:c,onVisibleChange:l}){let{getPopupContainer:u,rtl:d,subMenuOpenDelay:f,subMenuCloseDelay:p,builtinPlacements:m,triggerSubMenuAction:h,forceSubMenuRender:g,rootClassName:_,motion:v,defaultMotions:y}=S.useContext(rT),[b,x]=S.useState(!1),C=d?{...XT,...m}:{...YT,...m},w=QT[c],T=ZT(c,v,y),E=S.useRef(T);c!==`inline`&&(E.current=T);let D={...E.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},O=S.useRef();return S.useEffect(()=>(O.current=ri(()=>{x(t)}),()=>{ri.cancel(O.current)}),[t]),S.createElement(jp,{prefixCls:e,popupClassName:J(`${e}-popup`,{[`${e}-rtl`]:d},a,_),stretch:c===`horizontal`?`minWidth`:null,getPopupContainer:u,builtinPlacements:C,popupPlacement:w,popupVisible:b,popup:r,popupStyle:i,popupAlign:o&&{offset:o},action:s?[]:[h],mouseEnterDelay:f,mouseLeaveDelay:p,onPopupVisibleChange:l,forceRender:g,popupMotion:D,fresh:!0},n)}function eE(){return eE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current&&f(!1)},[l]);let m={...ZT(i,s,c)};n.length>1&&(m.motionAppear=!1);let h=m.onVisibleChanged;return m.onVisibleChanged=e=>(!u.current&&!e&&f(!0),h?.(e)),d?null:S.createElement(aT,{mode:i,locked:!u.current},S.createElement(Iu,eE({visible:p},m,{forceRender:o,removeOnLeave:!1,leavedClassName:`${a}-hidden`}),({className:t,style:n})=>S.createElement(KT,{id:e,className:t,style:n},r)))}function nE(){return nE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{style:n,className:r,styles:i,classNames:a,title:o,eventKey:s,warnKey:c,disabled:l,internalPopupClose:u,children:d,itemIcon:f,expandIcon:p,popupClassName:m,popupOffset:h,popupStyle:g,onClick:_,onMouseEnter:v,onMouseLeave:y,onTitleClick:b,onTitleMouseEnter:x,onTitleMouseLeave:C,popupRender:w,...T}=e,E=nT(s),{prefixCls:D,mode:O,openKeys:k,disabled:A,overflowDisabled:j,activeKey:M,selectedKeys:N,itemIcon:P,expandIcon:F,onItemClick:I,onOpenChange:L,onActive:R,popupRender:z}=S.useContext(rT),{_internalRenderSubMenuItem:B}=S.useContext(fT),{isSubPathKey:V}=S.useContext(dT),H=uT(),U=`${D}-submenu`,W=A||l,ee=S.useRef(),te=S.useRef(),ne=f??P,re=p??F,ie=k.includes(s),ae=!j&&ie,G=V(N,s),{active:oe,...K}=IT(s,W,x,C),[se,ce]=S.useState(!1),q=e=>{W||ce(e)},le=e=>{q(!0),v?.({key:s,domEvent:e})},ue=e=>{q(!1),y?.({key:s,domEvent:e})},de=S.useMemo(()=>oe||(O===`inline`?!1:se||V([M],s)),[O,oe,M,se,s,V]),fe=LT(H.length),pe=e=>{W||(b?.({key:s,domEvent:e}),O===`inline`&&L(s,!ie))},me=FT(e=>{_?.(zT(e)),I(e)}),he=e=>{O!==`inline`&&L(s,e)},ge=()=>{R(s)},_e=E&&`${E}-popup`,ve=S.useMemo(()=>S.createElement(RT,{icon:O===`horizontal`?void 0:re,props:{...e,isOpen:ae,isSubMenu:!0}},S.createElement(`i`,{className:`${U}-arrow`})),[O,re,e,ae,U]),ye=S.createElement(`div`,nE({role:`menuitem`,style:fe,className:`${U}-title`,tabIndex:W?null:-1,ref:ee,title:typeof o==`string`?o:null,"data-menu-id":j&&E?null:E,"aria-expanded":ae,"aria-haspopup":!0,"aria-controls":_e,"aria-disabled":W,onClick:pe,onFocus:ge},K),o,ve),be=S.useRef(O);O!==`inline`&&H.length>1?be.current=`vertical`:be.current=O;let xe=be.current,Se=S.useMemo(()=>{let t=S.createElement(aT,{classNames:a,styles:i,mode:xe===`horizontal`?`vertical`:xe},S.createElement(KT,{id:_e,ref:te},d)),n=w||z;return n?n(t,{item:e,keys:H}):t},[w,z,H,_e,d,e,xe]);if(!j){let e=be.current;ye=S.createElement($T,{mode:e,prefixCls:U,visible:!u&&ae&&O!==`inline`,popupClassName:m,popupOffset:h,popupStyle:g,popup:Se,disabled:W,onVisibleChange:he},ye)}let Ce=S.createElement(eS.Item,nE({ref:t,role:`none`},T,{component:`li`,style:n,className:J(U,`${U}-${O}`,r,{[`${U}-open`]:ae,[`${U}-active`]:de,[`${U}-selected`]:G,[`${U}-disabled`]:W}),onMouseEnter:le,onMouseLeave:ue}),ye,!j&&S.createElement(tE,{id:_e,open:ae,keyPath:H},d));return B&&(Ce=B(Ce,e,{selected:G,active:de,open:ae,disabled:W})),S.createElement(aT,{classNames:a,styles:i,onItemClick:me,mode:O===`horizontal`?`vertical`:O,itemIcon:ne,expandIcon:re},Ce)}),iE=S.forwardRef((e,t)=>{let{eventKey:n,children:r}=e,i=uT(n),a=qT(r,i),o=cT();S.useEffect(()=>{if(o)return o.registerPath(n,i),()=>{o.unregisterPath(n,i)}},[i]);let s;return s=o?a:S.createElement(rE,nE({ref:t},e),a),S.createElement(lT.Provider,{value:i},s)});function aE({className:e,style:t}){let{prefixCls:n}=S.useContext(rT);return cT()?null:S.createElement(`li`,{role:`separator`,className:J(`${n}-item-divider`,e),style:t})}function oE(){return oE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:n,title:r,eventKey:i,children:a,...o}=e,{prefixCls:s,classNames:c,styles:l}=S.useContext(rT),u=`${s}-item-group`;return S.createElement(`li`,oE({ref:t,role:`presentation`},o,{onClick:e=>e.stopPropagation(),className:J(u,n)}),S.createElement(`div`,{role:`presentation`,className:J(`${u}-title`,c?.listTitle),style:l?.listTitle,title:typeof r==`string`?r:void 0},r),S.createElement(`ul`,{role:`group`,className:J(`${u}-list`,c?.list),style:l?.list},a))}),cE=S.forwardRef((e,t)=>{let{eventKey:n,children:r}=e,i=qT(r,uT(n));return cT()?i:S.createElement(sE,oE({ref:t},Sr(e,[`warnKey`])),i)});function lE(){return lE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(e&&typeof e==`object`){let{label:c,children:l,key:u,type:d,extra:f,...p}=e,m=u??`tmp-${s}`;return l||d===`group`?d===`group`?S.createElement(i,lE({key:m},p,{title:c}),uE(l,t,n)):S.createElement(a,lE({key:m},p,{title:c}),uE(l,t,n)):d===`divider`?S.createElement(o,lE({key:m},p)):S.createElement(r,lE({key:m},p,{extra:f}),c,(!!f||f===0)&&S.createElement(`span`,{className:`${n}-item-extra`},f))}return null}).filter(e=>e)}function dE(e,t,n,r,i){let a=e,o={divider:aE,item:WT,group:cE,submenu:iE,...r};return t&&(a=uE(t,o,i)),qT(a,n)}function fE(){return fE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n=`rc-menu`,rootClassName:r,style:i,className:a,styles:o,classNames:s,tabIndex:c=0,items:l,children:u,direction:d,id:f,mode:p=`vertical`,inlineCollapsed:m,disabled:h,disabledOverflow:g,subMenuOpenDelay:_=.1,subMenuCloseDelay:v=.1,forceSubMenuRender:y,defaultOpenKeys:b,openKeys:x,activeKey:C,defaultActiveFirst:w,selectable:T=!0,multiple:E=!1,defaultSelectedKeys:D,selectedKeys:O,onSelect:k,onDeselect:A,inlineIndent:j=24,motion:M,defaultMotions:N,triggerSubMenuAction:P=`hover`,builtinPlacements:F,itemIcon:I,expandIcon:L,overflowedIndicator:R=`...`,overflowedIndicatorPopupClassName:z,getPopupContainer:B,onClick:V,onOpenChange:H,onKeyDown:U,openAnimation:W,openTransitionName:ee,_internalRenderMenuItem:te,_internalRenderSubMenuItem:ne,_internalComponents:re,popupRender:ie,...ae}=e,[G,oe]=S.useMemo(()=>[dE(u,l,pE,re,n),dE(u,l,pE,{},n)],[u,l,re]),[K,se]=S.useState(!1),ce=S.useRef(),q=zf(f?`rc-menu-uuid-${f}`:`rc-menu-uuid`),le=d===`rtl`,[ue,de]=Hn(b,x),fe=ue||pE,pe=(e,t=!1)=>{function n(){de(e),H?.(e)}t?(0,Jf.flushSync)(n):n()},[me,he]=S.useState(fe),ge=S.useRef(!1),[_e,ve]=S.useMemo(()=>(p===`inline`||p===`vertical`)&&m?[`vertical`,m]:[p,!1],[p,m]),ye=_e===`inline`,[be,xe]=S.useState(_e),[Se,Ce]=S.useState(ve);S.useEffect(()=>{xe(_e),Ce(ve),ge.current&&(ye?de(me):pe(pE))},[_e,ve]);let[we,Te]=S.useState(0),Ee=we>=G.length-1||be!==`horizontal`||g;S.useEffect(()=>{ye&&he(fe)},[fe]),S.useEffect(()=>(ge.current=!0,()=>{ge.current=!1}),[]);let{registerPath:De,unregisterPath:Oe,refreshOverflowKeys:ke,isSubPathKey:Ae,getKeyPath:je,getKeys:Me,getSubPathKeys:Ne}=PT(),Pe=S.useMemo(()=>({registerPath:De,unregisterPath:Oe}),[De,Oe]),Fe=S.useMemo(()=>({isSubPathKey:Ae}),[Ae]);S.useEffect(()=>{ke(Ee?pE:G.slice(we+1).map(e=>e.key))},[we,Ee]);let[Ie,Le]=Hn(C||w&&G[0]?.key,C),Re=FT(e=>{Le(e)}),ze=FT(()=>{Le(void 0)});(0,S.useImperativeHandle)(t,()=>({list:ce.current,focus:e=>{let t=Me(),{elements:n,key2element:r,element2key:i}=DT(t,q),a=TT(ce.current,n),o;o=Ie&&t.includes(Ie)?Ie:a[0]?i.get(a[0]):G.find(e=>!e.props.disabled)?.key;let s=r.get(o);o&&s&&s?.focus?.(e)},findItem:({key:e})=>{let{key2element:t}=DT(Me(),q);return t.get(e)||null}}));let[Be,Ve]=Hn(D||[],O),He=S.useMemo(()=>Array.isArray(Be)?Be:Be==null?pE:[Be],[Be]),Ue=e=>{if(T){let{key:t}=e,n=He.includes(t),r;r=E?n?He.filter(e=>e!==t):[...He,t]:[t],Ve(r);let i={...e,selectedKeys:r};n?A?.(i):k?.(i)}!E&&fe.length&&be!==`inline`&&pe(pE)},We=FT(e=>{V?.(zT(e)),Ue(e)}),Ge=FT((e,t)=>{let n=fe.filter(t=>t!==e);if(t)n.push(e);else if(be!==`inline`){let t=Ne(e);n=n.filter(e=>!t.has(e))}Ti(fe,n,!0)||pe(n,!0)}),Ke=OT(be,Ie,le,q,ce,Me,je,Le,(e,t)=>{Ge(e,t??!fe.includes(e))},U);S.useEffect(()=>{se(!0)},[]);let qe=S.useMemo(()=>({_internalRenderMenuItem:te,_internalRenderSubMenuItem:ne}),[te,ne]),Je=be!==`horizontal`||g?G:G.map((e,t)=>S.createElement(aT,{key:e.key,overflowDisabled:t>we,classNames:s,styles:o},e)),Ye=S.createElement(eS,fE({id:f,ref:ce,prefixCls:`${n}-overflow`,component:`ul`,itemComponent:WT,className:J(n,`${n}-root`,`${n}-${be}`,a,{[`${n}-inline-collapsed`]:Se,[`${n}-rtl`]:le},r),dir:d,style:i,role:`menu`,tabIndex:c,data:Je,renderRawItem:e=>e,renderRawRest:e=>{let t=e.length,n=t?G.slice(-t):null;return S.createElement(iE,{eventKey:NT,title:R,disabled:Ee,internalPopupClose:t===0,popupClassName:z},n)},maxCount:be!==`horizontal`||g?eS.INVALIDATE:eS.RESPONSIVE,ssr:`full`,"data-menu-list":!0,onVisibleChange:e=>{Te(e)},onKeyDown:Ke},ae));return S.createElement(fT.Provider,{value:qe},S.createElement(eT.Provider,{value:q},S.createElement(aT,{prefixCls:n,rootClassName:r,classNames:s,styles:o,mode:be,openKeys:fe,rtl:le,disabled:h,motion:K?M:null,defaultMotions:K?N:null,activeKey:Ie,onActive:Re,onInactive:ze,selectedKeys:He,inlineIndent:j,subMenuOpenDelay:_,subMenuCloseDelay:v,forceSubMenuRender:y,builtinPlacements:F,triggerSubMenuAction:P,getPopupContainer:B,itemIcon:I,expandIcon:L,onItemClick:We,onOpenChange:Ge,popupRender:ie},S.createElement(dT.Provider,{value:Fe},Ye),S.createElement(`div`,{style:{display:`none`},"aria-hidden":!0},S.createElement(sT.Provider,{value:Pe},oe)))))});mE.Item=WT,mE.SubMenu=iE,mE.ItemGroup=cE,mE.Divider=aE;var hE={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z`}}]},name:`bars`,theme:`outlined`};function gE(){return gE=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,gE({},e,{ref:t,icon:hE}))),vE=S.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),yE=e=>{let{antCls:t,componentCls:n,colorText:r,footerBg:i,headerHeight:a,headerPadding:o,headerColor:s,footerPadding:c,fontSize:l,bodyBg:u,headerBg:d}=e;return{[n]:{display:`flex`,flex:`auto`,flexDirection:`column`,minHeight:0,background:u,"&, *":{boxSizing:`border-box`},[`&${n}-has-sider`]:{flexDirection:`row`,[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:`0 0 auto`},"&-rtl":{direction:`rtl`}},[`${n}-header`]:{height:a,padding:o,color:s,lineHeight:Y(a),background:d,[`${t}-menu`]:{lineHeight:`inherit`}},[`${n}-footer`]:{padding:c,color:r,fontSize:l,background:i},[`${n}-content`]:{flex:`auto`,color:r,minHeight:0}}},bE=e=>{let{colorBgLayout:t,controlHeight:n,controlHeightLG:r,colorText:i,controlHeightSM:a,marginXXS:o,colorTextLightSolid:s,colorBgContainer:c}=e,l=r*1.25;return{colorBgHeader:`#001529`,colorBgBody:t,colorBgTrigger:`#002140`,bodyBg:t,headerBg:`#001529`,headerHeight:n*2,headerPadding:`0 ${l}px`,headerColor:i,footerPadding:`${a}px ${l}px`,footerBg:t,siderBg:`#001529`,triggerHeight:r+o*2,triggerBg:`#002140`,triggerColor:s,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:c,lightTriggerBg:c,lightTriggerColor:i}},xE=[[`colorBgBody`,`bodyBg`],[`colorBgHeader`,`headerBg`],[`colorBgTrigger`,`triggerBg`]],SE=rl(`Layout`,yE,bE,{deprecatedTokens:xE}),CE=rl([`Layout`,`Sider`],e=>{let{componentCls:t,siderBg:n,motionDurationMid:r,motionDurationSlow:i,antCls:a,triggerHeight:o,triggerColor:s,triggerBg:c,headerHeight:l,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:f,lightSiderBg:p,lightTriggerColor:m,lightTriggerBg:h,bodyBg:g}=e;return{[t]:{position:`relative`,minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:o},"&-right":{order:1},[`${t}-children`]:{height:`100%`,marginTop:-.1,paddingTop:.1,[`${a}-menu${a}-menu-inline-collapsed`]:{width:`auto`}},[`&-zero-width ${t}-children`]:{overflow:`hidden`},[`${t}-trigger`]:{position:`fixed`,bottom:0,zIndex:1,height:o,color:s,lineHeight:Y(o),textAlign:`center`,background:c,cursor:`pointer`,transition:`all ${r}`},[`${t}-zero-width-trigger`]:{position:`absolute`,top:l,insetInlineEnd:e.calc(u).mul(-1).equal(),zIndex:1,width:u,height:d,color:s,fontSize:e.fontSizeXL,display:`flex`,alignItems:`center`,justifyContent:`center`,background:n,borderRadius:`0 ${Y(f)} ${Y(f)} 0`,cursor:`pointer`,transition:`background-color ${i} ease`,"&::after":{position:`absolute`,inset:0,background:`transparent`,transition:`all ${i}`,content:`""`},"&:hover::after":{background:`rgba(255, 255, 255, 0.2)`},"&-right":{insetInlineStart:e.calc(u).mul(-1).equal(),borderRadius:`${Y(f)} 0 0 ${Y(f)}`}},"&-light":{background:p,[`${t}-trigger`]:{color:m,background:h},[`${t}-zero-width-trigger`]:{color:m,background:h,border:`1px solid ${g}`,borderInlineStart:0}}}}},bE,{deprecatedTokens:xE}),wE={xs:`479.98px`,sm:`575.98px`,md:`767.98px`,lg:`991.98px`,xl:`1199.98px`,xxl:`1599.98px`,xxxl:`1839.98px`},TE=e=>!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),EE=S.createContext({}),DE=(()=>{let e=0;return(t=``)=>(e+=1,`${t}${e}`)})(),OE=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,trigger:i,children:a,defaultCollapsed:o=!1,theme:s=`dark`,style:c={},collapsible:l=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:f=80,zeroWidthTriggerStyle:p,breakpoint:m,onCollapse:h,onBreakpoint:g,..._}=e,{siderHook:v}=(0,S.useContext)(vE),[y,b]=(0,S.useState)(`collapsed`in e?e.collapsed:o),[x,C]=(0,S.useState)(!1);(0,S.useEffect)(()=>{`collapsed`in e&&b(e.collapsed)},[e.collapsed]);let w=(t,n)=>{`collapsed`in e||b(t),h?.(t,n)},{getPrefixCls:T,direction:E}=(0,S.useContext)(oi),D=T(`layout-sider`,n),[O,k]=CE(D),A=(0,S.useRef)(null);A.current=e=>{C(e.matches),g?.(e.matches),y!==e.matches&&w(e.matches,`responsive`)},(0,S.useEffect)(()=>{function e(e){return A.current?.(e)}let t;return window?.matchMedia!==void 0&&m&&m in wE&&(t=window.matchMedia(`screen and (max-width: ${wE[m]})`),typeof t?.addEventListener==`function`&&t.addEventListener(`change`,e),e(t)),()=>{typeof t?.removeEventListener==`function`&&t.removeEventListener(`change`,e)}},[m]),(0,S.useEffect)(()=>{let e=DE(`ant-sider-`);return v.addSider(e),()=>v.removeSider(e)},[]);let j=()=>{w(!y,`clickTrigger`)},M=Sr(_,[`collapsed`]),N=y?f:d,P=TE(N)?`${N}px`:String(N),F=Number.parseFloat(String(f||0))===0?S.createElement(`span`,{onClick:j,className:J(`${D}-zero-width-trigger`,`${D}-zero-width-trigger-${u?`right`:`left`}`),style:p},i||S.createElement(_E,null)):null,I=E===`rtl`==!u,L={expanded:I?S.createElement(mg,null):S.createElement(Ww,null),collapsed:I?S.createElement(Ww,null):S.createElement(mg,null)}[y?`collapsed`:`expanded`],R=i===null?null:F||S.createElement(`div`,{className:`${D}-trigger`,onClick:j,style:{width:P}},i||L),z={...c,flex:`0 0 ${P}`,maxWidth:P,minWidth:P,width:P},B=J(D,`${D}-${s}`,{[`${D}-collapsed`]:!!y,[`${D}-has-trigger`]:l&&i!==null&&!F,[`${D}-below`]:!!x,[`${D}-zero-width`]:Number.parseFloat(P)===0},r,O,k),V=S.useMemo(()=>({siderCollapsed:y}),[y]);return S.createElement(EE.Provider,{value:V},S.createElement(`aside`,{className:B,...M,style:z,ref:t},S.createElement(`div`,{className:`${D}-children`},a),l||x&&F?R:null))}),kE={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z`}}]},name:`ellipsis`,theme:`outlined`};function AE(){return AE=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,AE({},e,{ref:t,icon:kE}))),ME=(0,S.createContext)({prefixCls:``,firstLevel:!0,inlineCollapsed:!1,styles:null,classNames:null}),NE=e=>{let{prefixCls:t,className:n,dashed:r,...i}=e,{getPrefixCls:a}=S.useContext(oi),o=J({[`${a(`menu`,t)}-item-divider-dashed`]:!!r},n);return S.createElement(aE,{className:o,...i})},PE=e=>{let{className:t,children:n,icon:r,title:i,danger:a,extra:o}=e,{prefixCls:s,firstLevel:c,direction:l,disableMenuItemTitleTooltip:u,tooltip:d,inlineCollapsed:f,styles:p,classNames:m}=S.useContext(ME),h=e=>{let t=n?.[0],i=S.createElement(`span`,{className:J(`${s}-title-content`,c?m?.itemContent:m?.subMenu?.itemContent,{[`${s}-title-content-with-extra`]:!!o||o===0}),style:c?p?.itemContent:p?.subMenu?.itemContent},n);return(!r||S.isValidElement(n)&&n.type===`span`)&&n&&e&&c&&typeof t==`string`?S.createElement(`div`,{className:`${s}-inline-collapsed-noicon`},t.charAt(0)):i},{siderCollapsed:g}=S.useContext(EE),_=i;i===void 0?_=c?n:``:i===!1&&(_=``);let v=d===!1?void 0:d,y=v&&v.title!==void 0?v.title:_,b={...v??null,title:y};!g&&!f&&(b.title=null,b.open=!1);let x=Cr(n).length,C=S.createElement(WT,{...Sr(e,[`title`,`icon`,`danger`]),className:J(c?m?.item:m?.subMenu?.item,{[`${s}-item-danger`]:a,[`${s}-item-only-child`]:(r?x+1:x)===1},t),style:{...c?p?.item:p?.subMenu?.item,...e.style},title:typeof i==`string`?i:void 0},Pp(r,e=>({className:J(`${s}-item-icon`,c?m?.itemIcon:m?.subMenu?.itemIcon,e.className),style:{...c?p?.itemIcon:p?.subMenu?.itemIcon,...e.style}})),h(f));if(!u&&d!==!1){let e=v&&v.placement?v.placement:l===`rtl`?`left`:`right`,t=`${s}-inline-collapsed-tooltip`,n=e=>({...e,root:J(t,e?.root)}),r=v&&typeof v.classNames==`function`?e=>n(v.classNames(e)):n(v?.classNames);C=S.createElement(Aw,{...b,placement:e,classNames:r},C)}return C},FE=S.createContext(null),IE=S.forwardRef((e,t)=>{let{children:n,...r}=e,i=S.useContext(FE),a=S.useMemo(()=>({...i,...r}),[i,r.prefixCls,r.mode,r.selectable,r.rootClassName]),o=rr(n),s=er(t,o?ir(n):null);return S.createElement(FE.Provider,{value:a},S.createElement(Ty,{space:!0},o?S.cloneElement(n,{ref:s}):n))}),LE=e=>{let{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:i,lineWidth:a,lineType:o,itemPaddingInline:s}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${Y(a)} ${o} ${i}`,boxShadow:`none`,"&::after":{display:`block`,clear:`both`,height:0,content:`"\\20"`},[`${t}-item, ${t}-submenu`]:{position:`relative`,display:`inline-block`,verticalAlign:`bottom`,paddingInline:s},[`> ${t}-item:hover, + `]:{animationName:Ih},"&-hidden":{display:`none`},[r]:{...vC(e),cursor:`pointer`,transition:`background-color ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:`default`},"&-option":{display:`flex`,"&-content":{flex:`auto`,...qc},"&-state":{flex:`none`,display:`flex`,alignItems:`center`},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${r}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:`not-allowed`},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":{...vC(e),color:e.colorTextDisabled}},[`${c}:has(+ ${c})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${c}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:`rtl`}}},Hh(e,`slide-up`),Hh(e,`slide-down`),Mh(e,`move-up`),Mh(e,`move-down`)]},Vee=e=>{let{componentCls:t}=e;return{[`&${t}-customize`]:{border:0,padding:0,fontSize:`inherit`,lineHeight:`inherit`,[`${t}-placeholder`]:{display:`none`},[`${t}-content`]:{margin:0,padding:0,"&-value":{display:`none`}}}}},yC=4,Hee=e=>{let{componentCls:t,calc:n,iconCls:r,paddingXS:i,paddingXXS:a,INTERNAL_FIXED_ITEM_MARGIN:o,lineWidth:s,colorIcon:c,colorIconHover:l,inputPaddingHorizontalBase:u,antCls:d}=e,[f,p]=ol(d,`select`);return{"&-multiple":{[f(`multi-item-background`)]:e.multipleItemBg,[f(`multi-item-border-color`)]:`transparent`,[f(`multi-item-border-radius`)]:e.borderRadiusSM,[f(`multi-item-height`)]:e.multipleItemHeight,[f(`multi-padding-base`)]:`calc((${p(`height`)} - ${p(`multi-item-height`)}) / 2)`,[f(`multi-padding-vertical`)]:`calc(${p(`multi-padding-base`)} - ${o} - ${s})`,[f(`multi-item-padding-horizontal`)]:`calc(${u} - ${p(`multi-padding-vertical`)} - ${s} * 2)`,paddingBlock:p(`multi-padding-vertical`),paddingInlineStart:`calc(${p(`multi-padding-base`)} - ${s})`,[`${t}-prefix`]:{marginInlineStart:p(`multi-item-padding-horizontal`)},[`${t}-prefix + ${t}-content`]:{[`${t}-placeholder`]:{insetInlineStart:0},[`${t}-content-item${t}-content-item-suffix`]:{marginInlineStart:0}},[`${t}-placeholder`]:{position:`absolute`,lineHeight:p(`line-height`),insetInlineStart:p(`multi-item-padding-horizontal`),width:`calc(100% - ${p(`multi-item-padding-horizontal`)})`,top:`50%`,transform:`translateY(-50%)`},[`${t}-content`]:{flexWrap:`wrap`,alignItems:`center`,lineHeight:1,"&-item-prefix":{height:p(`font-size`)},"&-item":{lineHeight:1,maxWidth:`calc(100% - ${yC}px)`},[`${t}-content-item-prefix + ${t}-content-item-suffix, + ${t}-content-item-suffix:first-child`]:{marginInlineStart:p(`multi-item-padding-horizontal`)},[`${t}-selection-item`]:{lineHeight:`calc(${p(`multi-item-height`)} - ${s} * 2)`,border:`${s} solid ${p(`multi-item-border-color`)}`,display:`flex`,marginBlock:o,marginInlineEnd:n(o).mul(2).equal(),background:p(`multi-item-background`),borderRadius:p(`multi-item-border-radius`),paddingInlineStart:i,paddingInlineEnd:a,transition:[`height`,`line-height`,`padding`].map(t=>`${t} ${e.motionDurationSlow}`).join(`,`),"&-content":{...qc,marginInlineEnd:a},"&-remove":{...Yc(),display:`inline-flex`,alignItems:`center`,color:c,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${r}`]:{verticalAlign:`-0.2em`},"&:hover":{color:l}}},[`${t}-input`]:{lineHeight:n(o).mul(2).add(p(`multi-item-height`)).equal(),width:`calc(var(--select-input-width, 0) * 1px)`,minWidth:yC,maxWidth:`100%`,transition:`line-height ${e.motionDurationSlow}`}},[`&${t}-sm`]:{[f(`multi-item-height`)]:e.multipleItemHeightSM,[f(`multi-item-border-radius`)]:e.borderRadiusXS},[`&${t}-lg`]:{[f(`multi-item-height`)]:e.multipleItemHeightLG,[f(`multi-item-border-radius`)]:e.borderRadius},[`&${t}-filled`]:{[f(`multi-item-border-color`)]:e.colorSplit,[f(`multi-item-background`)]:e.colorBgContainer,[`&${t}-disabled`]:{[f(`multi-item-border-color`)]:`transparent`}}}}},bC=(e,t)=>{let{componentCls:n,antCls:r}=e,[i]=ol(r,`select`),{border:a,borderHover:o,borderActive:s,borderOutline:c}=t,l=t.background||e.selectorBg||e.colorBgContainer;return{[i(`border-color`)]:a,[i(`background-color`)]:l,[i(`color`)]:t.color||e.colorText,[`&:not(${n}-disabled)`]:{"&:hover":{[i(`border-color`)]:o,[i(`background-color`)]:t.backgroundHover||l},[`&${n}-focused`]:{[i(`border-color`)]:s,[i(`background-color`)]:t.backgroundActive||l,boxShadow:`0 0 0 ${Y(e.controlOutlineWidth)} ${c}`}},[`&${n}-disabled`]:{[i(`border-color`)]:t.borderDisabled||t.border,[i(`background-color`)]:t.backgroundDisabled||t.background}}},xC=(e,t,n,r={},i={},a)=>{let{componentCls:o}=e;return{[`&${o}-${t}`]:[bC(e,n),{[`&${o}-status-error`]:bC(e,{...n,color:r.color||e.colorError,...r}),[`&${o}-status-warning`]:bC(e,{...n,color:i.color||e.colorWarning,...i})},a]}},Uee=e=>{let{componentCls:t,fontHeight:n,controlHeight:r,iconCls:i,antCls:a,calc:o}=e,[s,c]=ol(a,`select`);return{[t]:[{[s(`border-radius`)]:e.borderRadius,[s(`border-color`)]:`#000`,[s(`border-size`)]:e.lineWidth,[s(`background-color`)]:e.colorBgContainer,[s(`font-size`)]:e.fontSize,[s(`line-height`)]:e.lineHeight,[s(`font-height`)]:n,[s(`color`)]:e.colorText,[s(`height`)]:r,[s(`padding-horizontal`)]:o(e.paddingSM).sub(e.lineWidth).equal(),[s(`padding-vertical`)]:`calc((${c(`height`)} - ${c(`font-height`)}) / 2 - ${c(`border-size`)})`,...Jc(e,!0),display:`inline-flex`,flexWrap:`nowrap`,position:`relative`,transition:`all ${e.motionDurationSlow}`,alignItems:`flex-start`,outline:0,cursor:`pointer`,borderRadius:c(`border-radius`),borderWidth:c(`border-size`),borderStyle:e.lineType,borderColor:c(`border-color`),background:c(`background-color`),fontSize:c(`font-size`),lineHeight:c(`line-height`),color:c(`color`),paddingInline:c(`padding-horizontal`),paddingBlock:c(`padding-vertical`),[`${t}-prefix`]:{flex:`none`,lineHeight:1},[`${t}-placeholder`]:{...qc,color:e.colorTextPlaceholder,pointerEvents:`none`,zIndex:1},[`${t}-content`]:{flex:`auto`,minWidth:0,position:`relative`,display:`flex`,marginInlineEnd:o(e.paddingXXS).mul(1.5).equal(),"&:before":{content:`"\\a0"`,width:0,overflow:`hidden`},"&-value":{visibility:`inherit`},"input[readonly]":{cursor:`inherit`,caretColor:`transparent`}},[`${t}-suffix`]:{flex:`none`,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,"> :not(:last-child)":{marginInlineEnd:e.marginXS}},[`${t}-prefix, ${t}-suffix`]:{alignSelf:`center`,[i]:{verticalAlign:`top`}},"&-disabled":{background:e.colorBgContainerDisabled,color:e.colorTextDisabled,cursor:`not-allowed`,input:{cursor:`not-allowed`}},"&-sm":{[s(`height`)]:e.controlHeightSM,[s(`padding-horizontal`)]:o(e.paddingXS).sub(e.lineWidth).equal(),[s(`border-radius`)]:e.borderRadiusSM,[`${t}-clear`]:{insetInlineEnd:c(`padding-horizontal`)}},"&-lg":{[s(`height`)]:e.controlHeightLG,[s(`font-size`)]:e.fontSizeLG,[s(`line-height`)]:e.lineHeightLG,[s(`font-height`)]:e.fontHeightLG,[s(`border-radius`)]:e.borderRadiusLG}},{[`&:not(${t}-customize)`]:{[`${t}-input`]:{outline:`none`,background:`transparent`,appearance:`none`,border:0,margin:0,padding:0,color:c(`color`),"&::-webkit-search-cancel-button":{display:`none`,appearance:`none`}}}},{[`&-single:not(${t}-customize)`]:{[`${t}-input`]:{position:`absolute`,inset:0,lineHeight:`calc(${c(`font-height`)} + ${c(`padding-vertical`)} * 2)`},[`${t}-content`]:{...qc,alignSelf:`center`,"&-has-value":{display:`block`,"&:before":{display:`none`}},"&-has-search-value":{color:`transparent`},"&-value":{transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,zIndex:1}},[`&${t}-open ${t}-content`]:{color:e.colorTextPlaceholder,"&-has-search-value":{color:`transparent`}}}},{[`&-show-search:not(${t}-customize-input):not(${t}-disabled)`]:{cursor:`text`}},Hee(e),xC(e,`outlined`,{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:e.activeOutlineColor,borderDisabled:e.colorBorderDisabled},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError,borderOutline:e.colorErrorOutline},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning,borderOutline:e.colorWarningOutline}),xC(e,`filled`,{border:`transparent`,borderHover:`transparent`,borderActive:e.activeBorderColor,borderOutline:`transparent`,borderDisabled:e.colorBorderDisabled,background:e.colorFillTertiary,backgroundHover:e.colorFillSecondary,backgroundActive:e.colorBgContainer},{background:e.colorErrorBg,backgroundHover:e.colorErrorBgHover,borderActive:e.colorError},{background:e.colorWarningBg,backgroundHover:e.colorWarningBgHover,borderActive:e.colorWarning}),xC(e,`borderless`,{border:`transparent`,borderHover:`transparent`,borderActive:`transparent`,borderOutline:`transparent`,background:`transparent`}),xC(e,`underlined`,{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:`transparent`},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning},{borderRadius:0,borderTopColor:`transparent`,borderInlineColor:`transparent`}),Vee(e)]}},Wee=e=>{let{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:i,controlHeightSM:a,controlHeightLG:o,paddingXXS:s,controlPaddingHorizontal:c,zIndexPopupBase:l,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:p,colorBgContainer:m,colorFillSecondary:h,colorBgContainerDisabled:g,colorTextDisabled:_,colorPrimaryHover:v,colorPrimary:y,controlOutline:b}=e,x=s*2,S=r*2,C=Math.min(i-x,i-S),w=Math.min(a-x,a-S),T=Math.min(o-x,o-S);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:l+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:p,optionPadding:`${(i-t*n)/2}px ${c}px`,optionFontSize:t,optionLineHeight:n,optionHeight:i,selectorBg:m,clearBg:m,singleItemHeightLG:o,multipleItemBg:h,multipleItemBorderColor:`transparent`,multipleItemHeight:C,multipleItemHeightSM:w,multipleItemHeightLG:T,multipleSelectorBgDisabled:g,multipleItemColorDisabled:_,multipleItemBorderColorDisabled:`transparent`,showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:v,activeBorderColor:y,activeOutlineColor:b,selectAffixPadding:s}},SC=e=>{let{antCls:t,componentCls:n,motionDurationMid:r,inputPaddingHorizontalBase:i}=e,a={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:`50%`}};return{[n]:{...Jc(e),[`${n}-selection-item`]:{flex:1,fontWeight:`normal`,position:`relative`,userSelect:`none`,...qc,[`> ${t}-typography`]:{display:`inline`}},[`${n}-prefix`]:{flex:`none`,marginInlineEnd:e.selectAffixPadding},[`${n}-clear`]:{position:`absolute`,top:`50%`,insetInlineStart:`auto`,insetInlineEnd:i,zIndex:1,display:`inline-block`,width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:`normal`,lineHeight:1,textAlign:`center`,textTransform:`none`,cursor:`pointer`,opacity:0,transition:[`color`,`opacity`].map(e=>`${e} ${r} ease`).join(`, `),textRendering:`auto`,transform:`translateZ(0)`,"&:before":{display:`block`},"&:hover":{color:e.colorIcon}},"@media(hover:none)":a,"&:hover":a},[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(i).add(e.fontSize).add(e.paddingXS).equal()}}}}}},CC=e=>{let{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:`100%`}}},SC(e),Bee(e),{[`${t}-rtl`]:{direction:`rtl`}},Yg(e,{focusElCls:`${t}-focused`})]},wC=rl(`Select`,(e,{rootPrefixCls:t})=>{let n=gs(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(e.lineWidth).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[CC(n),Uee(n)]},Wee,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}}),TC={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z`}}]},name:`check`,theme:`outlined`};function EC(){return EC=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,EC({},e,{ref:t,icon:TC}))),OC={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z`}}]},name:`down`,theme:`outlined`};function kC(){return kC=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,kC({},e,{ref:t,icon:OC}))),jC={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z`}}]},name:`search`,theme:`outlined`};function MC(){return MC=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,MC({},e,{ref:t,icon:jC})));function PC({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:n,removeIcon:r,loading:i,loadingIcon:a,multiple:o,hasFeedback:s,showSuffixIcon:c,feedbackIcon:l,showArrow:u,componentName:d}){let f=t??S.createElement(Fl,null),p=t=>e===null&&!s&&!u?null:S.createElement(S.Fragment,null,c!==!1&&t,s&&l),m=null;m=e===void 0?i?p(a??S.createElement(xm,{spin:!0})):({open:e,showSearch:t})=>p(e&&t?S.createElement(NC,null):S.createElement(AC,null)):p(e);let h=null;h=n===void 0?o?S.createElement(DC,null):null:n;let g=null;return g=r===void 0?S.createElement(Rl,null):r,{clearIcon:f,suffixIcon:m,itemIcon:h,removeIcon:g}}function FC(e){return S.useMemo(()=>{if(e)return(...t)=>S.createElement(Ty,{space:!0},e.apply(void 0,t))},[e])}function IC(e,t){return t===void 0?e!==null:t}var LC=`SECRET_COMBOBOX_MODE_DO_NOT_USE`,RC=S.forwardRef((e,t)=>{let{prefixCls:n,bordered:r,className:i,rootClassName:a,getPopupContainer:o,popupClassName:s,dropdownClassName:c,listHeight:l=256,placement:u,listItemHeight:d,size:f,disabled:p,notFoundContent:m,status:h,builtinPlacements:g,dropdownMatchSelectWidth:_,popupMatchSelectWidth:v,direction:y,style:b,allowClear:x,variant:C,popupStyle:w,dropdownStyle:T,transitionName:E,tagRender:D,maxCount:O,prefix:k,dropdownRender:A,popupRender:j,onDropdownVisibleChange:M,onOpenChange:N,styles:P,classNames:F,...I}=e,{getPopupContainer:L,getPrefixCls:R,renderEmpty:z,direction:B,virtual:V,popupMatchSelectWidth:H,popupOverflow:U}=S.useContext(oi),{showSearch:W,style:ee,styles:te,className:ne,classNames:re}=li(`select`),[,ie]=Kc(),ae=d??ie?.controlHeight,G=R(`select`,n),oe=R(),K=y??B,{compactSize:se,compactItemClassnames:ce}=ih(G,K),[q,le]=hC(`select`,C,r),ue=bf(G),[de,fe]=wC(G,ue),pe=S.useMemo(()=>{let{mode:t}=e;if(t!==`combobox`)return t===LC?`combobox`:t},[e.mode]),me=pe===`multiple`||pe===`tags`,he=IC(e.suffixIcon,e.showArrow),ge=v??_??H,_e=FC(j||A),ve=N||M,{status:ye,hasFeedback:be,isFormItemInput:xe,feedbackIcon:Se}=S.useContext(Sy),Ce=oC(ye,h),we;we=m===void 0?pe===`combobox`?null:z?.(`Select`)||S.createElement(mC,{componentName:`Select`}):m;let{suffixIcon:Te,itemIcon:Ee,removeIcon:De,clearIcon:Oe}=PC({...I,multiple:me,hasFeedback:be,feedbackIcon:Se,showSuffixIcon:he,prefixCls:G,componentName:`Select`}),ke=x===!0?{clearIcon:Oe}:x,Ae=Sr(I,[`suffixIcon`,`itemIcon`]),je=th(e=>f??se??e),Me=S.useContext(zp),Ne=p??Me,Pe={...e,variant:q,status:Ce,disabled:Ne,size:je},[Fe,Ie]=Fd([re,F],[te,P],{props:Pe},{popup:{_default:`root`}}),Le=J(Fe.popup?.root,s,c,{[`${G}-dropdown-${K}`]:K===`rtl`},a,fe,ue,de),Re={...Ie.popup?.root,...w??T},ze=J({[`${G}-lg`]:je===`large`,[`${G}-sm`]:je===`small`,[`${G}-rtl`]:K===`rtl`,[`${G}-${q}`]:le,[`${G}-in-form-item`]:xe},aC(G,Ce,be),ce,ne,i,Fe.root,a,fe,ue,de),Be=S.useMemo(()=>u===void 0?K===`rtl`?`bottomRight`:`bottomLeft`:u,[u,K]),[Ve]=Yd(`SelectLike`,Ie.popup?.root?.zIndex??Re?.zIndex);return S.createElement(iC,{ref:t,virtual:V,classNames:Fe,styles:Ie,showSearch:W,...Ae,style:{...Ie.root,...ee,...b},popupMatchSelectWidth:ge,transitionName:Gm(oe,`slide-up`,E),builtinPlacements:_C(g,U),listHeight:l,listItemHeight:ae,mode:pe,prefixCls:G,placement:Be,direction:K,prefix:k,suffixIcon:Te,menuItemSelectedIcon:Ee,removeIcon:De,allowClear:ke,notFoundContent:we,className:ze,getPopupContainer:o||L,popupClassName:Le,disabled:Ne,popupStyle:{...Ie.popup?.root,...Re,zIndex:Ve},maxCount:me?O:void 0,tagRender:me?D:void 0,popupRender:_e,onPopupVisibleChange:ve})}),zC=cx(RC,`popupAlign`);RC.SECRET_COMBOBOX_MODE_DO_NOT_USE=LC,RC.Option=mS,RC.OptGroup=pS,RC._InternalPanelDoNotUseOrYouWillBeFired=zC;var BC=[`xxxl`,`xxl`,`xl`,`lg`,`md`,`sm`,`xs`],VC=[].concat(BC).reverse(),HC=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`,xxxl:`(min-width: ${e.screenXXXL}px)`}),UC=e=>{let t=e,n=[].concat(BC).reverse();return n.forEach((e,r)=>{let i=e.toUpperCase(),a=`screen${i}Min`,o=`screen${i}`;if(!(t[a]<=t[o]))throw Error(`${a}<=${o} fails : !(${t[a]}<=${t[o]})`);if(r{if(t){for(let n of BC)if(e[n]&&t?.[n]!==void 0)return t[n]}},GC=()=>{let[,e]=Kc(),t=HC(UC(e));return S.useMemo(()=>{let e=new Map,n=-1,r={};return{responsiveMap:t,matchHandlers:{},dispatch(t){return r=t,e.forEach(e=>{e(r)}),e.size>=1},subscribe(t){return e.size||this.register(),n+=1,e.set(n,t),t(r),n},unsubscribe(t){e.delete(t),e.size||this.unregister()},register(){Object.entries(t).forEach(([e,t])=>{let n=({matches:t})=>{this.dispatch({...r,[e]:t})},i=window.matchMedia(t);typeof i?.addEventListener==`function`&&i.addEventListener(`change`,n),this.matchHandlers[t]={mql:i,listener:n},n(i)})},unregister(){Object.values(t).forEach(e=>{let t=this.matchHandlers[e];typeof t?.mql?.removeEventListener==`function`&&t.mql.removeEventListener(`change`,t?.listener)}),e.clear()}}},[t])};function KC(e=!0,t={}){let n=(0,S.useRef)(t),[,r]=Ed(),i=GC();return zn(()=>{let t=i.subscribe(t=>{n.current=t,e&&r()});return()=>i.unsubscribe(t)},[]),n.current}var qC=S.createContext({}),JC=e=>{let{antCls:t,componentCls:n,iconCls:r,avatarBg:i,avatarColor:a,containerSize:o,containerSizeLG:s,containerSizeSM:c,textFontSize:l,textFontSizeLG:u,textFontSizeSM:d,iconFontSize:f,iconFontSizeLG:p,iconFontSizeSM:m,borderRadius:h,borderRadiusLG:g,borderRadiusSM:_,lineWidth:v,lineType:y}=e,b=(e,t,i,a)=>({width:e,height:e,borderRadius:`50%`,fontSize:t,[`&${n}-square`]:{borderRadius:a},[`&${n}-icon`]:{fontSize:i,[`> ${r}`]:{margin:0}}});return{[n]:{...Jc(e),position:`relative`,display:`inline-flex`,justifyContent:`center`,alignItems:`center`,overflow:`hidden`,color:a,whiteSpace:`nowrap`,textAlign:`center`,verticalAlign:`middle`,background:i,border:`${Y(v)} ${y} transparent`,"&-image":{background:`transparent`},[`${t}-image-img`]:{display:`block`},...b(o,l,f,h),"&-lg":{...b(s,u,p,g)},"&-sm":{...b(c,d,m,_)},"> img":{display:`block`,width:`100%`,height:`100%`,objectFit:`cover`}}}},YC=e=>{let{componentCls:t,groupBorderColor:n,groupOverlapping:r,groupSpace:i}=e;return{[`${t}-group`]:{display:`inline-flex`,[t]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:r}},[`${t}-group-popover`]:{[`${t} + ${t}`]:{marginInlineStart:i}}}},XC=rl(`Avatar`,e=>{let{colorTextLightSolid:t,colorTextPlaceholder:n}=e,r=gs(e,{avatarBg:n,avatarColor:t});return[JC(r),YC(r)]},e=>{let{controlHeight:t,controlHeightLG:n,controlHeightSM:r,fontSize:i,fontSizeLG:a,fontSizeXL:o,fontSizeHeading3:s,marginXS:c,marginXXS:l,colorBorderBg:u}=e;return{containerSize:t,containerSizeLG:n,containerSizeSM:r,textFontSize:i,textFontSizeLG:i,textFontSizeSM:i,iconFontSize:Math.round((a+o)/2),iconFontSizeLG:s,iconFontSizeSM:i,groupSpace:l,groupOverlapping:-c,groupBorderColor:u}}),ZC=S.forwardRef((e,t)=>{let{prefixCls:n,shape:r,size:i,src:a,srcSet:o,icon:s,className:c,rootClassName:l,style:u,alt:d,draggable:f,children:p,crossOrigin:m,gap:h=4,onError:g,..._}=e,[v,y]=S.useState(1),[b,x]=S.useState(!1),[C,w]=S.useState(!0),T=S.useRef(null),E=S.useRef(null),D=$n(t,T),{getPrefixCls:O,className:k,style:A}=li(`avatar`),j=S.useContext(qC),M=()=>{if(!E.current||!T.current)return;let e=E.current.offsetWidth,t=T.current.offsetWidth;e!==0&&t!==0&&h*2{x(!0)},[]),S.useEffect(()=>{w(!0),y(1)},[a]),S.useEffect(M,[h]);let N=()=>{g?.()!==!1&&w(!1)},P=th(e=>i??j?.size??e??`medium`),F=KC(Object.keys(hd(P)&&P||{}).some(e=>BC.includes(e))),I=S.useMemo(()=>{if(!hd(P))return{};let e=P[BC.find(e=>F[e])];return e?{width:e,height:e,fontSize:e&&(s||p)?e/2:18}:{}},[F,P,s,p]),L=O(`avatar`,n),R=bf(L),[z,B]=XC(L,R),V=J({[`${L}-lg`]:P===`large`,[`${L}-sm`]:P===`small`}),H=S.isValidElement(a),U=J(L,V,k,`${L}-${r||j?.shape||`circle`}`,{[`${L}-image`]:H||a&&C,[`${L}-icon`]:!!s},B,R,c,l,z),W=pd(P)?{width:P,height:P,fontSize:s?P/2:18}:{},ee;if(typeof a==`string`&&C)ee=S.createElement(`img`,{src:a,draggable:f,srcSet:o,onError:N,alt:d,crossOrigin:m});else if(H)ee=a;else if(s)ee=s;else if(b||v!==1){let e=`scale(${v})`,t={msTransform:e,WebkitTransform:e,transform:e};ee=S.createElement(Wr,{onResize:M},S.createElement(`span`,{className:`${L}-string`,ref:E,style:t},p))}else ee=S.createElement(`span`,{className:`${L}-string`,style:{opacity:0},ref:E},p);return S.createElement(`span`,{..._,style:{...W,...I,...A,...u},className:U,ref:D},ee)}),QC=e=>e?typeof e==`function`?e():e:null,$C=e=>{let{children:t,prefixCls:n,id:r,classNames:i,styles:a,className:o,style:s}=e;return S.createElement(`div`,{id:r,className:J(`${n}-container`,i?.container,o),style:{...a?.container,...s},role:`tooltip`},typeof t==`function`?t():t)},ew={shiftX:64,adjustY:1},tw={adjustX:1,shiftY:!0},nw=[0,0],rw={left:{points:[`cr`,`cl`],overflow:tw,offset:[-4,0],targetOffset:nw},right:{points:[`cl`,`cr`],overflow:tw,offset:[4,0],targetOffset:nw},top:{points:[`bc`,`tc`],overflow:ew,offset:[0,-4],targetOffset:nw},bottom:{points:[`tc`,`bc`],overflow:ew,offset:[0,4],targetOffset:nw},topLeft:{points:[`bl`,`tl`],overflow:ew,offset:[0,-4],targetOffset:nw},leftTop:{points:[`tr`,`tl`],overflow:tw,offset:[-4,0],targetOffset:nw},topRight:{points:[`br`,`tr`],overflow:ew,offset:[0,-4],targetOffset:nw},rightTop:{points:[`tl`,`tr`],overflow:tw,offset:[4,0],targetOffset:nw},bottomRight:{points:[`tr`,`br`],overflow:ew,offset:[0,4],targetOffset:nw},rightBottom:{points:[`bl`,`br`],overflow:tw,offset:[4,0],targetOffset:nw},bottomLeft:{points:[`tl`,`bl`],overflow:ew,offset:[0,4],targetOffset:nw},leftBottom:{points:[`br`,`bl`],overflow:tw,offset:[-4,0],targetOffset:nw}};function iw(){return iw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{trigger:n=[`hover`],mouseEnterDelay:r=0,mouseLeaveDelay:i=.1,prefixCls:a=`rc-tooltip`,children:o,onVisibleChange:s,afterVisibleChange:c,motion:l,placement:u=`right`,align:d={},destroyOnHidden:f=!1,defaultVisible:p,getTooltipContainer:m,arrowContent:h,overlay:g,id:_,showArrow:v=!0,classNames:y,styles:b,...x}=e,C=zf(_),w=(0,S.useRef)(null);(0,S.useImperativeHandle)(t,()=>w.current);let T={...x};`visible`in e&&(T.popupVisible=e.visible);let E=S.useMemo(()=>{if(!v)return!1;let e=v===!0?{}:v;return{...e,className:J(e.className,y?.arrow),style:{...e.style,...b?.arrow},content:e.content??h}},[v,y?.arrow,b?.arrow,h]);return S.createElement(jp,iw({popupClassName:y?.root,prefixCls:a,popup:S.createElement($C,{key:`content`,prefixCls:a,id:C,classNames:y,styles:b},g),action:n,builtinPlacements:rw,popupPlacement:u,ref:w,popupAlign:d,getPopupContainer:m,onOpenChange:s,afterOpenChange:c,popupMotion:l,defaultPopupVisible:p,autoDestroy:f,mouseLeaveDelay:i,popupStyle:b?.root,mouseEnterDelay:r,arrow:E,uniqueContainerClassName:y?.uniqueContainer,uniqueContainerStyle:b?.uniqueContainer},T),({open:e})=>{let t=S.Children.only(o),n={"aria-describedby":g&&e?C:void 0};return S.cloneElement(t,n)})});function ow(e){let{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,i=t/2,a=i,o=r*1/Math.sqrt(2),s=i-r*(1-1/Math.sqrt(2)),c=i-1/Math.sqrt(2)*n,l=r*(Math.sqrt(2)-1)+1/Math.sqrt(2)*n,u=2*i-c,d=l,f=2*i-o,p=s,m=2*i-0,h=a,g=i*Math.sqrt(2)+r*(Math.sqrt(2)-2),_=r*(Math.sqrt(2)-1),v=`polygon(${_}px 100%, 50% ${_}px, ${2*i-_}px 100%, ${_}px 100%)`;return{arrowShadowWidth:g,arrowPath:`path('M 0 ${a} A ${r} ${r} 0 0 0 ${o} ${s} L ${c} ${l} A ${n} ${n} 0 0 1 ${u} ${d} L ${f} ${p} A ${r} ${r} 0 0 0 ${m} ${h} Z')`,arrowPolygon:v}}var sw=(e,t,n)=>{let{sizePopupArrow:r,arrowPolygon:i,arrowPath:a,arrowShadowWidth:o,borderRadiusXS:s,calc:c}=e;return{pointerEvents:`none`,width:r,height:r,overflow:`hidden`,"&::before":{position:`absolute`,bottom:0,insetInlineStart:0,width:r,height:c(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[i,a]},content:`""`},"&::after":{content:`""`,position:`absolute`,width:o,height:o,bottom:0,insetInline:0,margin:`auto`,borderRadius:{_skip_check_:!0,value:`0 0 ${Y(s)} 0`},transform:`translateY(50%) rotate(-135deg)`,boxShadow:n,zIndex:0,background:`transparent`}}};function cw(e){let{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?8:r}}function lw(e,t){return e?t:{}}var uw=(e,t,n)=>{let{componentCls:r,boxShadowPopoverArrow:i,arrowOffsetVertical:a,arrowOffsetHorizontal:o,antCls:s}=e,[c]=ol(s,`tooltip`),{arrowDistance:l=0,arrowPlacement:u={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:{[`${r}-arrow`]:[{position:`absolute`,zIndex:1,display:`block`,...sw(e,t,i),"&:before":{background:t}}],...lw(!!u.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(`,`)]:{bottom:l,transform:`translateY(100%) rotate(180deg)`},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:`50%`},transform:`translateX(-50%) translateY(100%) rotate(180deg)`},"&-placement-topLeft":{[c(`arrow-offset-x`)]:o,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:o}}},"&-placement-topRight":{[c(`arrow-offset-x`)]:`calc(100% - ${Y(o)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:o}}}}),...lw(!!u.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(`,`)]:{top:l,transform:`translateY(-100%)`},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:`50%`},transform:`translateX(-50%) translateY(-100%)`},"&-placement-bottomLeft":{[c(`arrow-offset-x`)]:o,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:o}}},"&-placement-bottomRight":{[c(`arrow-offset-x`)]:`calc(100% - ${Y(o)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:o}}}}),...lw(!!u.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(`,`)]:{right:{_skip_check_:!0,value:l},transform:`translateX(100%) rotate(90deg)`},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:`50%`},transform:`translateY(-50%) translateX(100%) rotate(90deg)`},[`&-placement-leftTop > ${r}-arrow`]:{top:a},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:a}}),...lw(!!u.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(`,`)]:{left:{_skip_check_:!0,value:l},transform:`translateX(-100%) rotate(-90deg)`},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:`50%`},transform:`translateY(-50%) translateX(-100%) rotate(-90deg)`},[`&-placement-rightTop > ${r}-arrow`]:{top:a},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:a}})}}};function dw(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};let i=hd(r)?r:{},a={};switch(e){case`top`:case`bottom`:a.shiftX=t.arrowOffsetHorizontal*2+n,a.shiftY=!0,a.adjustY=!0;break;case`left`:case`right`:a.shiftY=t.arrowOffsetVertical*2+n,a.shiftX=!0,a.adjustX=!0;break}let o={...a,...i};return o.shiftX||(o.adjustX=!0),o.shiftY||(o.adjustY=!0),o}var fw={left:{points:[`cr`,`cl`]},right:{points:[`cl`,`cr`]},top:{points:[`bc`,`tc`]},bottom:{points:[`tc`,`bc`]},topLeft:{points:[`bl`,`tl`]},leftTop:{points:[`tr`,`tl`]},topRight:{points:[`br`,`tr`]},rightTop:{points:[`tl`,`tr`]},bottomRight:{points:[`tr`,`br`]},rightBottom:{points:[`bl`,`br`]},bottomLeft:{points:[`tl`,`bl`]},leftBottom:{points:[`br`,`bl`]}},pw={topLeft:{points:[`bl`,`tc`]},leftTop:{points:[`tr`,`cl`]},topRight:{points:[`br`,`tc`]},rightTop:{points:[`tl`,`cr`]},bottomRight:{points:[`tr`,`bc`]},rightBottom:{points:[`bl`,`cr`]},bottomLeft:{points:[`tl`,`bc`]},leftBottom:{points:[`br`,`cl`]}},mw=new Set([`topLeft`,`topRight`,`bottomLeft`,`bottomRight`,`leftTop`,`leftBottom`,`rightTop`,`rightBottom`]);function hw(e){let{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:i,borderRadius:a,visibleFirst:o}=e,s=t/2,c={},l=cw({contentRadius:a,limitVerticalRadius:!0});return Object.keys(fw).forEach(e=>{let a={...r&&pw[e]||fw[e],offset:[0,0],dynamicInset:!0};switch(c[e]=a,mw.has(e)&&(a.autoArrow=!1),e){case`top`:case`topLeft`:case`topRight`:a.offset[1]=-s-i;break;case`bottom`:case`bottomLeft`:case`bottomRight`:a.offset[1]=s+i;break;case`left`:case`leftTop`:case`leftBottom`:a.offset[0]=-s-i;break;case`right`:case`rightTop`:case`rightBottom`:a.offset[0]=s+i;break}if(r)switch(e){case`topLeft`:case`bottomLeft`:a.offset[0]=-l.arrowOffsetHorizontal-s;break;case`topRight`:case`bottomRight`:a.offset[0]=l.arrowOffsetHorizontal+s;break;case`leftTop`:case`rightTop`:a.offset[1]=-l.arrowOffsetHorizontal*2+s;break;case`leftBottom`:case`rightBottom`:a.offset[1]=l.arrowOffsetHorizontal*2-s;break}a.overflow=dw(e,l,t,n),o&&(a.htmlRegion=`visibleFirst`)}),c}var gw=S.createContext(!1),_w=(e,t)=>{let n=e=>typeof e==`boolean`?{show:e}:e||{};return S.useMemo(()=>{let r=n(e),i=n(t);return{...i,...r,show:r.show??i.show??!0}},[e,t])},vw=`50%`,yw=e=>{let{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:i,tooltipBg:a,tooltipBorderRadius:o,zIndexPopup:s,controlHeight:c,boxShadowSecondary:l,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:p,antCls:m}=e,[h,g]=ol(m,`tooltip`),_=t(o).add(p).add(f).equal(),v={minWidth:t(o).mul(2).add(p).equal(),minHeight:c,padding:`${Y(e.calc(u).div(2).equal())} ${Y(d)}`,color:g(`overlay-color`,i),textAlign:`start`,textDecoration:`none`,wordWrap:`break-word`,backgroundColor:a,borderRadius:o,boxShadow:l,boxSizing:`border-box`},y={[h(`valid-offset-x`)]:g(`arrow-offset-x`,`var(--arrow-x)`),transformOrigin:[g(`valid-offset-x`,vw),`var(--arrow-y, ${vw})`].join(` `)};return[{[n]:{...Jc(e),position:`absolute`,zIndex:s,display:`block`,width:`max-content`,maxWidth:r,visibility:`visible`,...y,"&-hidden":{display:`none`},[h(`arrow-background-color`)]:a,[`${n}-container`]:[v,wh(e,!0)],[`&:has(~ ${n}-unique-container)`]:{[`${n}-container`]:{border:`none`,background:`transparent`,boxShadow:`none`}},[[`&-placement-topLeft`,`&-placement-topRight`,`&-placement-bottomLeft`,`&-placement-bottomRight`].join(`,`)]:{minWidth:_},[[`&-placement-left`,`&-placement-leftTop`,`&-placement-leftBottom`,`&-placement-right`,`&-placement-rightTop`,`&-placement-rightBottom`].join(`,`)]:{[`${n}-inner`]:{borderRadius:e.min(o,8)}},[`${n}-content`]:{position:`relative`},...sl(e,(e,{darkColor:t})=>({[`&${n}-${e}`]:{[`${n}-container`]:{backgroundColor:t},[`${n}-arrow`]:{[h(`arrow-background-color`)]:t}}})),"&-rtl":{direction:`rtl`}}},uw(e,g(`arrow-background-color`)),{[`${n}-pure`]:{position:`relative`,maxWidth:`none`,margin:e.sizePopupArrow}},{[`${n}-unique-container`]:{...v,...y,position:`absolute`,zIndex:t(s).sub(1).equal(),"&-hidden":{display:`none`},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},bw=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...cw({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...ow(gs(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),xw=(e,t,n=!0)=>rl(`Tooltip`,e=>{let{borderRadius:t,colorTextLightSolid:n,colorBgSpotlight:r,maxWidth:i}=e;return[yw(gs(e,{tooltipMaxWidth:i,tooltipColor:n,tooltipBorderRadius:t,tooltipBg:r})),rg(e,`zoom-big-fast`)]},bw,{resetStyle:!1,injectStyle:n})(e,t),Sw=Ds.map(e=>`${e}-inverse`),Cw=[`success`,`processing`,`error`,`default`,`warning`];function ww(e,t=!0){return t?[].concat(Zr(Sw),Zr(Ds)).includes(e):Ds.includes(e)}function Tw(e){return Cw.includes(e)}var Ew=(e,t,n)=>{let r=ww(n),[i]=ol(e,`tooltip`),a=J({[`${t}-${n}`]:n&&r}),o={},s={},c=Pg(n).toRgb(),l=(.299*c.r+.587*c.g+.114*c.b)/255<.5?`#FFF`:`#000`;return n&&!r&&(o.background=n,o[i(`overlay-color`)]=l,s[i(`arrow-background-color`)]=n),{className:a,overlayStyle:o,arrowStyle:s}},Dw=e=>{let{prefixCls:t,className:n,placement:r=`top`,title:i,color:a,overlayInnerStyle:o,classNames:s,styles:c}=e,{getPrefixCls:l}=S.useContext(oi),u=l(`tooltip`,t),d=l(),f=bf(u),[p,m]=xw(u,f),h=Ew(d,u,a),g=h.arrowStyle,_=S.useMemo(()=>({container:{...o,...h.overlayStyle}}),[o,h.overlayStyle]),v={...e,placement:r},[y,b]=Fd([s],[_,c],{props:v}),x=J(f,p,m,u,`${u}-pure`,`${u}-placement-${r}`,n,h.className);return S.createElement(`div`,{className:x,style:g},S.createElement(`div`,{className:`${u}-arrow`}),S.createElement($C,{...e,className:p,prefixCls:u,classNames:y,styles:b},i))},Ow=S.forwardRef((e,t)=>{let{prefixCls:n,openClassName:r,getTooltipContainer:i,color:a,children:o,afterOpenChange:s,arrow:c,destroyTooltipOnHide:l,destroyOnHidden:u,title:d,overlay:f,trigger:p,builtinPlacements:m,autoAdjustOverflow:h=!0,motion:g,getPopupContainer:_,placement:v=`top`,mouseEnterDelay:y=.1,mouseLeaveDelay:b=.1,rootClassName:x,styles:C,classNames:w,onOpenChange:T,overlayInnerStyle:E,overlayStyle:D,overlayClassName:O,...k}=e,[,A]=Kc(),j=e[`data-popover-inject`],{getPopupContainer:M,getPrefixCls:N,direction:P,...F}=li(`tooltip`),{className:I,style:L,classNames:R,styles:z,arrow:B,trigger:V}=j?{}:F,H=_w(c,B),U=H.show,W=p||V||`hover`,ee=_||M,te=u??!!l,ne=S.useContext(gw);Dr(`Tooltip`);let re=S.useRef(null),ie=()=>{re.current?.forceAlign()};S.useImperativeHandle(t,()=>({forceAlign:ie,nativeElement:re.current?.nativeElement,popupElement:re.current?.popupElement}));let[ae,G]=Hn(e.defaultOpen??!1,e.open),oe=!d&&!f&&d!==0,K=e=>{G(oe?!1:e),!oe&&T&&T(e)},se=S.useMemo(()=>m||hw({arrowPointAtCenter:H?.pointAtCenter??!1,autoAdjustOverflow:h,arrowWidth:U?A.sizePopupArrow:0,borderRadius:A.borderRadius,offset:A.marginXXS,visibleFirst:!0}),[H,m,A,U,h]),ce=S.useMemo(()=>d===0?d:f||d||``,[f,d]),q=S.createElement(Ty,{space:!0,form:!0},typeof ce==`function`?ce():ce),le={...e,trigger:W,builtinPlacements:se,getPopupContainer:ee,destroyOnHidden:te},[ue,de]=Fd([R,w],[z,C],{props:le}),fe=N(`tooltip`,n),pe=N(),me=ae;(!(`open`in e)&&oe||ne)&&(me=!1);let he=S.isValidElement(o)&&!Mp(o)?o:S.createElement(`span`,null,o),ge=he.props,_e=!ge.className||typeof ge.className==`string`?J(ge.className,r||`${fe}-open`):ge.className,ve=bf(fe),[ye,be]=xw(fe,ve,!j),xe=Ew(pe,fe,a),Se=xe.arrowStyle,Ce=J(ve,ye,be),we=J(O,{[`${fe}-rtl`]:P===`rtl`},xe.className,x,Ce,I,ue.root),[Te,Ee]=Yd(`Tooltip`,k.zIndex),De={...de.container,...E,...xe.overlayStyle},Oe=S.createElement(aw,{unique:!0,...k,zIndex:Te,showArrow:U,placement:v,mouseEnterDelay:y,mouseLeaveDelay:b,prefixCls:fe,classNames:{root:we,container:ue.container,arrow:ue.arrow,uniqueContainer:J(Ce,ue.container)},styles:{root:{...Se,...de.root,...L,...D},container:De,uniqueContainer:De,arrow:de.arrow},ref:re,overlay:q,visible:me,onVisibleChange:K,afterVisibleChange:s,arrowContent:S.createElement(`span`,{className:`${fe}-arrow-content`}),motion:{motionName:Gm(pe,`zoom-big-fast`,typeof g?.motionName==`string`?g?.motionName:void 0),motionDeadline:1e3},trigger:W,builtinPlacements:se,getTooltipContainer:ee,destroyOnHidden:te},me?Pp(he,{className:_e}):he);return S.createElement(Ud.Provider,{value:Ee},Oe)});Ow._InternalPanelDoNotUseOrYouWillBeFired=Dw,Ow.UniqueProvider=Rp;var kw=`50%`,Aw=e=>{let{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:i,innerPadding:a,boxShadowSecondary:o,colorTextHeading:s,borderRadiusLG:c,zIndexPopup:l,titleMarginBottom:u,colorBgElevated:d,popoverBg:f,titleBorderBottom:p,innerContentPadding:m,titlePadding:h,antCls:g}=e,[_,v]=ol(g,`tooltip`);return[{[t]:{...Jc(e),position:`absolute`,top:0,left:{_skip_check_:!0,value:0},zIndex:l,fontWeight:`normal`,whiteSpace:`normal`,textAlign:`start`,cursor:`auto`,userSelect:`text`,[_(`valid-offset-x`)]:v(`arrow-offset-x`,`var(--arrow-x)`),transformOrigin:[v(`valid-offset-x`,kw),`var(--arrow-y, ${kw})`].join(` `),[_(`arrow-background-color`)]:d,width:`max-content`,maxWidth:`100vw`,"&-rtl":{direction:`rtl`},"&-hidden":{display:`none`},[`${t}-content`]:{position:`relative`},[`${t}-container`]:{backgroundColor:f,backgroundClip:`padding-box`,borderRadius:c,boxShadow:o,padding:a},[`${t}-title`]:{minWidth:r,marginBottom:u,color:s,fontWeight:i,borderBottom:p,padding:h},[`${t}-content`]:{color:n,padding:m}}},uw(e,v(`arrow-background-color`)),{[`${t}-pure`]:{position:`relative`,maxWidth:`none`,margin:e.sizePopupArrow,display:`inline-block`}}]},jw=e=>{let{componentCls:t,antCls:n}=e,[r]=ol(n,`tooltip`);return{[t]:Ds.map(n=>{let i=e[`${n}6`];return{[`&${t}-${n}`]:{[r(`arrow-background-color`)]:i,[`${t}-inner`]:{backgroundColor:i},[`${t}-arrow`]:{background:`transparent`}}}})}},Mw=rl(`Popover`,e=>{let{colorBgElevated:t,colorText:n}=e,r=gs(e,{popoverBg:t,popoverColor:n});return[Aw(r),jw(r),rg(r,`zoom-big`)]},e=>{let{lineWidth:t,controlHeight:n,fontHeight:r,padding:i,wireframe:a,zIndexPopupBase:o,borderRadiusLG:s,marginXS:c,lineType:l,colorSplit:u,paddingSM:d}=e,f=n-r,p=f/2,m=f/2-t,h=i;return{titleMinWidth:177,zIndexPopup:o+30,...ow(e),...cw({contentRadius:s,limitVerticalRadius:!0}),innerPadding:a?0:12,titleMarginBottom:a?0:c,titlePadding:a?`${p}px ${h}px ${m}px`:0,titleBorderBottom:a?`${t}px ${l} ${u}`:`none`,innerContentPadding:a?`${d}px ${h}px`:0}},{resetStyle:!1,deprecatedTokens:[[`width`,`titleMinWidth`],[`minWidth`,`titleMinWidth`]]}),Nw=e=>{let{title:t,content:n,prefixCls:r,classNames:i,styles:a}=e;return!t&&!n?null:S.createElement(S.Fragment,null,t&&S.createElement(`div`,{className:J(`${r}-title`,i?.title),style:a?.title},t),n&&S.createElement(`div`,{className:J(`${r}-content`,i?.content),style:a?.content},n))},Pw=e=>{let{hashId:t,prefixCls:n,className:r,style:i,placement:a=`top`,title:o,content:s,children:c,classNames:l,styles:u}=e,d=QC(o),f=QC(s),p={...e,placement:a},[m,h]=Fd([l],[u],{props:p}),g=J(t,n,`${n}-pure`,`${n}-placement-${a}`,r);return S.createElement(`div`,{className:g,style:i},S.createElement(`div`,{className:`${n}-arrow`}),S.createElement($C,{...e,className:t,prefixCls:n,classNames:m,styles:h},c||S.createElement(Nw,{prefixCls:n,title:d,content:f,classNames:m,styles:h})))},Fw=e=>{let{prefixCls:t,className:n,...r}=e,{getPrefixCls:i}=S.useContext(oi),a=i(`popover`,t),[o,s]=Mw(a);return S.createElement(Pw,{...r,prefixCls:a,hashId:o,className:J(n,s)})},Iw=S.forwardRef((e,t)=>{let{prefixCls:n,title:r,content:i,overlayClassName:a,placement:o=`top`,trigger:s,children:c,mouseEnterDelay:l=.1,mouseLeaveDelay:u=.1,onOpenChange:d,overlayStyle:f={},styles:p,classNames:m,motion:h,arrow:g,..._}=e,{getPrefixCls:v,className:y,style:b,classNames:x,styles:C,arrow:w,trigger:T}=li(`popover`),E=v(`popover`,n),[D,O]=Mw(E),k=v(),A=_w(g,w),j=s||T||`hover`,M={...e,placement:o,trigger:j,mouseEnterDelay:l,mouseLeaveDelay:u,overlayStyle:f,styles:p,classNames:m},[N,P]=Fd([x,m],[C,p],{props:M}),F=J(a,D,O,y,N.root),[I,L]=Hn(e.defaultOpen??!1,e.open),R=e=>{L(e),d?.(e)},z=QC(r),B=QC(i);return S.createElement(Ow,{unique:!1,arrow:A,placement:o,trigger:j,mouseEnterDelay:l,mouseLeaveDelay:u,..._,prefixCls:E,classNames:{root:F,container:N.container,arrow:N.arrow},styles:{root:{...P.root,...b,...f},container:P.container,arrow:P.arrow},ref:t,open:I,onOpenChange:R,overlay:z||B?S.createElement(Nw,{prefixCls:E,title:z,content:B,classNames:N,styles:P}):null,motion:{motionName:Gm(k,`zoom-big`,typeof h?.motionName==`string`?h?.motionName:void 0)},"data-popover-inject":!0},c)});Iw._InternalPanelDoNotUseOrYouWillBeFired=Fw;var Lw=e=>{let{size:t,shape:n}=S.useContext(qC),r=S.useMemo(()=>({size:e.size||t,shape:e.shape||n}),[e.size,e.shape,t,n]);return S.createElement(qC.Provider,{value:r},e.children)},Rw=e=>{let{getPrefixCls:t,direction:n}=S.useContext(oi),{prefixCls:r,className:i,rootClassName:a,style:o,maxCount:s,maxStyle:c,size:l,shape:u,maxPopoverPlacement:d,maxPopoverTrigger:f,children:p,max:m}=e,h=t(`avatar`,r),g=`${h}-group`,_=bf(h),[v,y]=XC(h,_),b=J(g,{[`${g}-rtl`]:n===`rtl`},y,_,i,a,v),x=Cr(p).map((e,t)=>Pp(e,{key:`avatar-key-${t}`})),C=m?.count||s,w=x.length;if(C&&CS.createElement(Al,Vw({},e,{ref:t,icon:Bw}))),{ESC:Uw,TAB:Ww}=om;function Gw({visible:e,triggerRef:t,onVisibleChange:n,autoFocus:r,overlayRef:i}){let a=S.useRef(!1),o=()=>{e&&(t.current?.focus?.(),n?.(!1))},s=()=>i.current?.focus?(i.current.focus(),a.current=!0,!0):!1,c=e=>{switch(e.keyCode){case Uw:o();break;case Ww:{let t=!1;a.current||(t=s()),t?e.preventDefault():o();break}}};S.useEffect(()=>e?(window.addEventListener(`keydown`,c),r&&ri(s,3),()=>{window.removeEventListener(`keydown`,c),a.current=!1}):()=>{a.current=!1},[e])}var Kw=(0,S.forwardRef)((e,t)=>{let{overlay:n,arrow:r,prefixCls:i}=e,a=(0,S.useMemo)(()=>{let e;return e=typeof n==`function`?n():n,e},[n]),o=$n(t,ir(a));return S.createElement(S.Fragment,null,r&&S.createElement(`div`,{className:`${i}-arrow`}),S.cloneElement(a,{ref:tr(a)?o:void 0}))}),qw={adjustX:1,adjustY:1},Jw=[0,0],Yw={topLeft:{points:[`bl`,`tl`],overflow:qw,offset:[0,-4],targetOffset:Jw},top:{points:[`bc`,`tc`],overflow:qw,offset:[0,-4],targetOffset:Jw},topRight:{points:[`br`,`tr`],overflow:qw,offset:[0,-4],targetOffset:Jw},bottomLeft:{points:[`tl`,`bl`],overflow:qw,offset:[0,4],targetOffset:Jw},bottom:{points:[`tc`,`bc`],overflow:qw,offset:[0,4],targetOffset:Jw},bottomRight:{points:[`tr`,`br`],overflow:qw,offset:[0,4],targetOffset:Jw}};function Xw(){return Xw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{arrow:n=!1,prefixCls:r=`rc-dropdown`,transitionName:i,animation:a,align:o,placement:s=`bottomLeft`,placements:c=Yw,getPopupContainer:l,showAction:u,hideAction:d,overlayClassName:f,overlayStyle:p,visible:m,trigger:h=[`hover`],autoFocus:g,overlay:_,children:v,onVisibleChange:y,...b}=e,[x,C]=S.useState(),w=`visible`in e?m:x,T=a?`${r}-${a}`:i,E=S.useRef(null),D=S.useRef(null),O=S.useRef(null);S.useImperativeHandle(t,()=>E.current);let k=e=>{C(e),y?.(e)};Gw({visible:w,triggerRef:O,onVisibleChange:k,autoFocus:g,overlayRef:D});let A=t=>{let{onOverlayClick:n}=e;C(!1),n&&n(t)},j=()=>S.createElement(Kw,{ref:D,overlay:_,prefixCls:r,arrow:n}),M=()=>typeof _==`function`?j:j(),N=()=>{let{minOverlayWidthMatchTrigger:t,alignPoint:n}=e;return`minOverlayWidthMatchTrigger`in e?t:!n},P=S.cloneElement(v,{className:J(v.props?.className,w&&(()=>{let{openClassName:t}=e;return t===void 0?`${r}-open`:t})()),ref:tr(v)?$n(O,ir(v)):void 0}),F=d;return!F&&h.indexOf(`contextMenu`)!==-1&&(F=[`click`]),S.createElement(jp,Xw({builtinPlacements:c},b,{prefixCls:r,ref:E,popupClassName:J(f,{[`${r}-show-arrow`]:n}),popupStyle:p,action:h,showAction:u,hideAction:F,popupPlacement:s,popupAlign:o,popupMotion:{motionName:T},popupVisible:w,stretch:N()?`minWidth`:``,popup:M(),onOpenChange:k,onPopupClick:A,getPopupContainer:l}),P)}),Qw=S.createContext(null);function $w(e,t){return`${e}-${t}`}function eT(e){return $w(S.useContext(Qw),e)}var tT=S.createContext(null);function nT(e,t){let n={...e};return Object.keys(t).forEach(e=>{let r=t[e];r!==void 0&&(n[e]=r)}),n}function rT({children:e,locked:t,...n}){let r=S.useContext(tT),i=Gn(()=>nT(r,n),[r,n],(e,n)=>!t&&(e[0]!==n[0]||!Ti(e[1],n[1],!0)));return S.createElement(tT.Provider,{value:i},e)}var iT=[],aT=S.createContext(null);function oT(){return S.useContext(aT)}var sT=S.createContext(iT);function cT(e){let t=S.useContext(sT);return S.useMemo(()=>e===void 0?t:[...t,e],[t,e])}var lT=S.createContext(null),uT=S.createContext({}),{LEFT:dT,RIGHT:fT,UP:pT,DOWN:mT,ENTER:hT,ESC:gT,HOME:_T,END:vT}=om,yT=[pT,mT,dT,fT];function bT(e,t,n,r){let i=`prev`,a=`next`,o=`children`,s=`parent`;if(e===`inline`&&r===hT)return{inlineTrigger:!0};let c={[pT]:i,[mT]:a},l={[dT]:n?a:i,[fT]:n?i:a,[mT]:o,[hT]:o},u={[pT]:i,[mT]:a,[hT]:o,[gT]:s,[dT]:n?o:s,[fT]:n?s:o};switch({inline:c,horizontal:l,vertical:u,inlineSub:c,horizontalSub:u,verticalSub:u}[`${e}${t?``:`Sub`}`]?.[r]){case i:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case s:return{offset:-1,sibling:!1};case o:return{offset:1,sibling:!1};default:return null}}function xT(e){let t=e;for(;t;){if(t.getAttribute(`data-menu-list`))return t;t=t.parentElement}return null}function ST(e,t){let n=e||document.activeElement;for(;n;){if(t.has(n))return n;n=n.parentElement}return null}function CT(e,t){return c_(e,!0).filter(e=>t.has(e))}function wT(e,t,n,r=1){if(!e)return null;let i=CT(e,t),a=i.length,o=i.findIndex(e=>n===e);return r<0?o===-1?o=a-1:--o:r>0&&(o+=1),o=(o+a)%a,i[o]}var TT=(e,t)=>{let n=new Set,r=new Map,i=new Map;return e.forEach(e=>{let a=document.querySelector(`[data-menu-id='${$w(t,e)}']`);a&&(n.add(a),i.set(a,e),r.set(e,a))}),{elements:n,key2element:r,element2key:i}};function ET(e,t,n,r,i,a,o,s,c,l){let u=S.useRef(),d=S.useRef();d.current=t;let f=()=>{ri.cancel(u.current)};return S.useEffect(()=>()=>{f()},[]),p=>{let{which:m}=p;if([...yT,hT,gT,_T,vT].includes(m)){let l=a(),h=TT(l,r),{elements:g,key2element:_,element2key:v}=h,y=ST(_.get(t),g),b=v.get(y),x=bT(e,o(b,!0).length===1,n,m);if(!x&&m!==_T&&m!==vT)return;(yT.includes(m)||[_T,vT].includes(m))&&p.preventDefault();let S=e=>{if(e){let t=e,n=e.querySelector(`a`);n?.getAttribute(`href`)&&(t=n);let r=v.get(e);s(r),f(),u.current=ri(()=>{d.current===r&&t.focus()})}};if([_T,vT].includes(m)||x.sibling||!y){let t;t=!y||e===`inline`?i.current:xT(y);let n,r=CT(t,g);n=m===_T?r[0]:m===vT?r[r.length-1]:wT(t,g,y,x.offset),S(n)}else if(x.inlineTrigger)c(b);else if(x.offset>0)c(b,!0),f(),u.current=ri(()=>{h=TT(l,r);let e=y.getAttribute(`aria-controls`);S(wT(document.getElementById(e),h.elements))},5);else if(x.offset<0){let e=o(b,!0),t=e[e.length-2],n=_.get(t);c(t,!1),S(n)}}l?.(p)}}function DT(e){Promise.resolve().then(e)}var OT=`__RC_UTIL_PATH_SPLIT__`,kT=e=>e.join(OT),AT=e=>e.split(OT),jT=`rc-menu-more`;function MT(){let[,e]=S.useState({}),t=(0,S.useRef)(new Map),n=(0,S.useRef)(new Map),[r,i]=S.useState([]),a=(0,S.useRef)(0),o=(0,S.useRef)(!1),s=()=>{o.current||e({})},c=(0,S.useCallback)((e,r)=>{let i=kT(r);n.current.set(i,e),t.current.set(e,i),a.current+=1;let o=a.current;DT(()=>{o===a.current&&s()})},[]),l=(0,S.useCallback)((e,r)=>{let i=kT(r);n.current.delete(i),t.current.delete(e)},[]),u=(0,S.useCallback)(e=>{i(e)},[]),d=(0,S.useCallback)((e,n)=>{let i=AT(t.current.get(e)||``);return n&&r.includes(i[0])&&i.unshift(jT),i},[r]),f=(0,S.useCallback)((e,t)=>e.filter(e=>e!==void 0).some(e=>d(e,!0).includes(t)),[d]),p=()=>{let e=[...t.current.keys()];return r.length&&e.push(jT),e},m=(0,S.useCallback)(e=>{let r=`${t.current.get(e)}${OT}`,i=new Set;return[...n.current.keys()].forEach(e=>{e.startsWith(r)&&i.add(n.current.get(e))}),i},[]);return S.useEffect(()=>()=>{o.current=!0},[]),{registerPath:c,unregisterPath:l,refreshOverflowKeys:u,isSubPathKey:f,getKeyPath:d,getKeys:p,getSubPathKeys:m}}function NT(e){let t=S.useRef(e);t.current=e;let n=S.useCallback((...e)=>t.current?.(...e),[]);return e?n:void 0}function PT(e,t,n,r){let{activeKey:i,onActive:a,onInactive:o}=S.useContext(tT),s={active:i===e};return t||(s.onMouseEnter=t=>{n?.({key:e,domEvent:t}),a(e)},s.onMouseLeave=t=>{r?.({key:e,domEvent:t}),o(e)}),s}function FT(e){let{mode:t,rtl:n,inlineIndent:r}=S.useContext(tT);if(t!==`inline`)return null;let i=e;return n?{paddingRight:i*r}:{paddingLeft:i*r}}function IT({icon:e,props:t,children:n}){let r;return e===null||e===!1?null:(typeof e==`function`?r=S.createElement(e,{...t}):typeof e!=`boolean`&&(r=e),r||n||null)}function LT({item:e,...t}){return Object.defineProperty(t,`item`,{get:()=>(br(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function RT(){return RT=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{style:n,className:r,eventKey:i,warnKey:a,disabled:o,itemIcon:s,children:c,role:l,onMouseEnter:u,onMouseLeave:d,onClick:f,onKeyDown:p,onFocus:m,...h}=e,g=eT(i),{prefixCls:_,onItemClick:v,disabled:y,overflowDisabled:b,itemIcon:x,selectedKeys:C,onActive:w}=S.useContext(tT),{_internalRenderMenuItem:T}=S.useContext(uT),E=`${_}-item`,D=S.useRef(),O=S.useRef(),k=y||o,A=er(t,O),j=cT(i),M=e=>({key:i,keyPath:[...j].reverse(),item:D.current,domEvent:e}),N=s||x,{active:P,...F}=PT(i,k,u,d),I=C.includes(i),L=FT(j.length),R=e=>{if(k)return;let t=M(e);f?.(LT(t)),v(t)},z=e=>{if(p?.(e),e.which===om.ENTER){let t=M(e);f?.(LT(t)),v(t)}},B=e=>{w(i),m?.(e)},V={};e.role===`option`&&(V[`aria-selected`]=I);let H=S.createElement(zT,RT({ref:D,elementRef:A,role:l===null?`none`:l||`menuitem`,tabIndex:o?null:-1,"data-menu-id":b&&g?null:g},Sr(h,[`extra`]),F,V,{component:`li`,"aria-disabled":o,style:{...L,...n},className:J(E,{[`${E}-active`]:P,[`${E}-selected`]:I,[`${E}-disabled`]:k},r),onClick:R,onKeyDown:z,onFocus:B}),c,S.createElement(IT,{props:{...e,isSelected:I},icon:N}));return T&&(H=T(H,e,{selected:I})),H});function VT(e,t){let{eventKey:n}=e,r=oT(),i=cT(n);return S.useEffect(()=>{if(r)return r.registerPath(n,i),()=>{r.unregisterPath(n,i)}},[i]),r?null:S.createElement(BT,RT({},e,{ref:t}))}var HT=S.forwardRef(VT);function UT(){return UT=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:i,mode:a,rtl:o}=S.useContext(tT);return S.createElement(`ul`,UT({className:J(i,o&&`${i}-rtl`,`${i}-sub`,`${i}-${a===`inline`?`inline`:`vertical`}`,e),role:`menu`},n,{"data-menu-list":!0,ref:r}),t)});function GT(e,t){return Cr(e).map((e,n)=>{if(S.isValidElement(e)){let{key:r}=e,i=e.props?.eventKey??r;i??=`tmp_key-${[...t,n].join(`-`)}`;let a={key:i,eventKey:i};return S.cloneElement(e,a)}return e})}var KT={adjustX:1,adjustY:1},qT={topLeft:{points:[`bl`,`tl`],overflow:KT},topRight:{points:[`br`,`tr`],overflow:KT},bottomLeft:{points:[`tl`,`bl`],overflow:KT},bottomRight:{points:[`tr`,`br`],overflow:KT},leftTop:{points:[`tr`,`tl`],overflow:KT},leftBottom:{points:[`br`,`bl`],overflow:KT},rightTop:{points:[`tl`,`tr`],overflow:KT},rightBottom:{points:[`bl`,`br`],overflow:KT}},JT={topLeft:{points:[`bl`,`tl`],overflow:KT},topRight:{points:[`br`,`tr`],overflow:KT},bottomLeft:{points:[`tl`,`bl`],overflow:KT},bottomRight:{points:[`tr`,`br`],overflow:KT},rightTop:{points:[`tr`,`tl`],overflow:KT},rightBottom:{points:[`br`,`bl`],overflow:KT},leftTop:{points:[`tl`,`tr`],overflow:KT},leftBottom:{points:[`bl`,`br`],overflow:KT}};function YT(e,t,n){if(t)return t;if(n)return n[e]||n.other}var XT={horizontal:`bottomLeft`,vertical:`rightTop`,"vertical-left":`rightTop`,"vertical-right":`leftTop`};function ZT({prefixCls:e,visible:t,children:n,popup:r,popupStyle:i,popupClassName:a,popupOffset:o,disabled:s,mode:c,onVisibleChange:l}){let{getPopupContainer:u,rtl:d,subMenuOpenDelay:f,subMenuCloseDelay:p,builtinPlacements:m,triggerSubMenuAction:h,forceSubMenuRender:g,rootClassName:_,motion:v,defaultMotions:y}=S.useContext(tT),[b,x]=S.useState(!1),C=d?{...JT,...m}:{...qT,...m},w=XT[c],T=YT(c,v,y),E=S.useRef(T);c!==`inline`&&(E.current=T);let D={...E.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},O=S.useRef();return S.useEffect(()=>(O.current=ri(()=>{x(t)}),()=>{ri.cancel(O.current)}),[t]),S.createElement(jp,{prefixCls:e,popupClassName:J(`${e}-popup`,{[`${e}-rtl`]:d},a,_),stretch:c===`horizontal`?`minWidth`:null,getPopupContainer:u,builtinPlacements:C,popupPlacement:w,popupVisible:b,popup:r,popupStyle:i,popupAlign:o&&{offset:o},action:s?[]:[h],mouseEnterDelay:f,mouseLeaveDelay:p,onPopupVisibleChange:l,forceRender:g,popupMotion:D,fresh:!0},n)}function QT(){return QT=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current&&f(!1)},[l]);let m={...YT(i,s,c)};n.length>1&&(m.motionAppear=!1);let h=m.onVisibleChanged;return m.onVisibleChanged=e=>(!u.current&&!e&&f(!0),h?.(e)),d?null:S.createElement(rT,{mode:i,locked:!u.current},S.createElement(Iu,QT({visible:p},m,{forceRender:o,removeOnLeave:!1,leavedClassName:`${a}-hidden`}),({className:t,style:n})=>S.createElement(WT,{id:e,className:t,style:n},r)))}function eE(){return eE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{style:n,className:r,styles:i,classNames:a,title:o,eventKey:s,warnKey:c,disabled:l,internalPopupClose:u,children:d,itemIcon:f,expandIcon:p,popupClassName:m,popupOffset:h,popupStyle:g,onClick:_,onMouseEnter:v,onMouseLeave:y,onTitleClick:b,onTitleMouseEnter:x,onTitleMouseLeave:C,popupRender:w,...T}=e,E=eT(s),{prefixCls:D,mode:O,openKeys:k,disabled:A,overflowDisabled:j,activeKey:M,selectedKeys:N,itemIcon:P,expandIcon:F,onItemClick:I,onOpenChange:L,onActive:R,popupRender:z}=S.useContext(tT),{_internalRenderSubMenuItem:B}=S.useContext(uT),{isSubPathKey:V}=S.useContext(lT),H=cT(),U=`${D}-submenu`,W=A||l,ee=S.useRef(),te=S.useRef(),ne=f??P,re=p??F,ie=k.includes(s),ae=!j&&ie,G=V(N,s),{active:oe,...K}=PT(s,W,x,C),[se,ce]=S.useState(!1),q=e=>{W||ce(e)},le=e=>{q(!0),v?.({key:s,domEvent:e})},ue=e=>{q(!1),y?.({key:s,domEvent:e})},de=S.useMemo(()=>oe||(O===`inline`?!1:se||V([M],s)),[O,oe,M,se,s,V]),fe=FT(H.length),pe=e=>{W||(b?.({key:s,domEvent:e}),O===`inline`&&L(s,!ie))},me=NT(e=>{_?.(LT(e)),I(e)}),he=e=>{O!==`inline`&&L(s,e)},ge=()=>{R(s)},_e=E&&`${E}-popup`,ve=S.useMemo(()=>S.createElement(IT,{icon:O===`horizontal`?void 0:re,props:{...e,isOpen:ae,isSubMenu:!0}},S.createElement(`i`,{className:`${U}-arrow`})),[O,re,e,ae,U]),ye=S.createElement(`div`,eE({role:`menuitem`,style:fe,className:`${U}-title`,tabIndex:W?null:-1,ref:ee,title:typeof o==`string`?o:null,"data-menu-id":j&&E?null:E,"aria-expanded":ae,"aria-haspopup":!0,"aria-controls":_e,"aria-disabled":W,onClick:pe,onFocus:ge},K),o,ve),be=S.useRef(O);O!==`inline`&&H.length>1?be.current=`vertical`:be.current=O;let xe=be.current,Se=S.useMemo(()=>{let t=S.createElement(rT,{classNames:a,styles:i,mode:xe===`horizontal`?`vertical`:xe},S.createElement(WT,{id:_e,ref:te},d)),n=w||z;return n?n(t,{item:e,keys:H}):t},[w,z,H,_e,d,e,xe]);if(!j){let e=be.current;ye=S.createElement(ZT,{mode:e,prefixCls:U,visible:!u&&ae&&O!==`inline`,popupClassName:m,popupOffset:h,popupStyle:g,popup:Se,disabled:W,onVisibleChange:he},ye)}let Ce=S.createElement(Qx.Item,eE({ref:t,role:`none`},T,{component:`li`,style:n,className:J(U,`${U}-${O}`,r,{[`${U}-open`]:ae,[`${U}-active`]:de,[`${U}-selected`]:G,[`${U}-disabled`]:W}),onMouseEnter:le,onMouseLeave:ue}),ye,!j&&S.createElement($T,{id:_e,open:ae,keyPath:H},d));return B&&(Ce=B(Ce,e,{selected:G,active:de,open:ae,disabled:W})),S.createElement(rT,{classNames:a,styles:i,onItemClick:me,mode:O===`horizontal`?`vertical`:O,itemIcon:ne,expandIcon:re},Ce)}),nE=S.forwardRef((e,t)=>{let{eventKey:n,children:r}=e,i=cT(n),a=GT(r,i),o=oT();S.useEffect(()=>{if(o)return o.registerPath(n,i),()=>{o.unregisterPath(n,i)}},[i]);let s;return s=o?a:S.createElement(tE,eE({ref:t},e),a),S.createElement(sT.Provider,{value:i},s)});function rE({className:e,style:t}){let{prefixCls:n}=S.useContext(tT);return oT()?null:S.createElement(`li`,{role:`separator`,className:J(`${n}-item-divider`,e),style:t})}function iE(){return iE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:n,title:r,eventKey:i,children:a,...o}=e,{prefixCls:s,classNames:c,styles:l}=S.useContext(tT),u=`${s}-item-group`;return S.createElement(`li`,iE({ref:t,role:`presentation`},o,{onClick:e=>e.stopPropagation(),className:J(u,n)}),S.createElement(`div`,{role:`presentation`,className:J(`${u}-title`,c?.listTitle),style:l?.listTitle,title:typeof r==`string`?r:void 0},r),S.createElement(`ul`,{role:`group`,className:J(`${u}-list`,c?.list),style:l?.list},a))}),oE=S.forwardRef((e,t)=>{let{eventKey:n,children:r}=e,i=GT(r,cT(n));return oT()?i:S.createElement(aE,iE({ref:t},Sr(e,[`warnKey`])),i)});function sE(){return sE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(e&&typeof e==`object`){let{label:c,children:l,key:u,type:d,extra:f,...p}=e,m=u??`tmp-${s}`;return l||d===`group`?d===`group`?S.createElement(i,sE({key:m},p,{title:c}),cE(l,t,n)):S.createElement(a,sE({key:m},p,{title:c}),cE(l,t,n)):d===`divider`?S.createElement(o,sE({key:m},p)):S.createElement(r,sE({key:m},p,{extra:f}),c,(!!f||f===0)&&S.createElement(`span`,{className:`${n}-item-extra`},f))}return null}).filter(e=>e)}function lE(e,t,n,r,i){let a=e,o={divider:rE,item:HT,group:oE,submenu:nE,...r};return t&&(a=cE(t,o,i)),GT(a,n)}function uE(){return uE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n=`rc-menu`,rootClassName:r,style:i,className:a,styles:o,classNames:s,tabIndex:c=0,items:l,children:u,direction:d,id:f,mode:p=`vertical`,inlineCollapsed:m,disabled:h,disabledOverflow:g,subMenuOpenDelay:_=.1,subMenuCloseDelay:v=.1,forceSubMenuRender:y,defaultOpenKeys:b,openKeys:x,activeKey:C,defaultActiveFirst:w,selectable:T=!0,multiple:E=!1,defaultSelectedKeys:D,selectedKeys:O,onSelect:k,onDeselect:A,inlineIndent:j=24,motion:M,defaultMotions:N,triggerSubMenuAction:P=`hover`,builtinPlacements:F,itemIcon:I,expandIcon:L,overflowedIndicator:R=`...`,overflowedIndicatorPopupClassName:z,getPopupContainer:B,onClick:V,onOpenChange:H,onKeyDown:U,openAnimation:W,openTransitionName:ee,_internalRenderMenuItem:te,_internalRenderSubMenuItem:ne,_internalComponents:re,popupRender:ie,...ae}=e,[G,oe]=S.useMemo(()=>[lE(u,l,dE,re,n),lE(u,l,dE,{},n)],[u,l,re]),[K,se]=S.useState(!1),ce=S.useRef(),q=zf(f?`rc-menu-uuid-${f}`:`rc-menu-uuid`),le=d===`rtl`,[ue,de]=Hn(b,x),fe=ue||dE,pe=(e,t=!1)=>{function n(){de(e),H?.(e)}t?(0,Jf.flushSync)(n):n()},[me,he]=S.useState(fe),ge=S.useRef(!1),[_e,ve]=S.useMemo(()=>(p===`inline`||p===`vertical`)&&m?[`vertical`,m]:[p,!1],[p,m]),ye=_e===`inline`,[be,xe]=S.useState(_e),[Se,Ce]=S.useState(ve);S.useEffect(()=>{xe(_e),Ce(ve),ge.current&&(ye?de(me):pe(dE))},[_e,ve]);let[we,Te]=S.useState(0),Ee=we>=G.length-1||be!==`horizontal`||g;S.useEffect(()=>{ye&&he(fe)},[fe]),S.useEffect(()=>(ge.current=!0,()=>{ge.current=!1}),[]);let{registerPath:De,unregisterPath:Oe,refreshOverflowKeys:ke,isSubPathKey:Ae,getKeyPath:je,getKeys:Me,getSubPathKeys:Ne}=MT(),Pe=S.useMemo(()=>({registerPath:De,unregisterPath:Oe}),[De,Oe]),Fe=S.useMemo(()=>({isSubPathKey:Ae}),[Ae]);S.useEffect(()=>{ke(Ee?dE:G.slice(we+1).map(e=>e.key))},[we,Ee]);let[Ie,Le]=Hn(C||w&&G[0]?.key,C),Re=NT(e=>{Le(e)}),ze=NT(()=>{Le(void 0)});(0,S.useImperativeHandle)(t,()=>({list:ce.current,focus:e=>{let t=Me(),{elements:n,key2element:r,element2key:i}=TT(t,q),a=CT(ce.current,n),o;o=Ie&&t.includes(Ie)?Ie:a[0]?i.get(a[0]):G.find(e=>!e.props.disabled)?.key;let s=r.get(o);o&&s&&s?.focus?.(e)},findItem:({key:e})=>{let{key2element:t}=TT(Me(),q);return t.get(e)||null}}));let[Be,Ve]=Hn(D||[],O),He=S.useMemo(()=>Array.isArray(Be)?Be:Be==null?dE:[Be],[Be]),Ue=e=>{if(T){let{key:t}=e,n=He.includes(t),r;r=E?n?He.filter(e=>e!==t):[...He,t]:[t],Ve(r);let i={...e,selectedKeys:r};n?A?.(i):k?.(i)}!E&&fe.length&&be!==`inline`&&pe(dE)},We=NT(e=>{V?.(LT(e)),Ue(e)}),Ge=NT((e,t)=>{let n=fe.filter(t=>t!==e);if(t)n.push(e);else if(be!==`inline`){let t=Ne(e);n=n.filter(e=>!t.has(e))}Ti(fe,n,!0)||pe(n,!0)}),Ke=ET(be,Ie,le,q,ce,Me,je,Le,(e,t)=>{Ge(e,t??!fe.includes(e))},U);S.useEffect(()=>{se(!0)},[]);let qe=S.useMemo(()=>({_internalRenderMenuItem:te,_internalRenderSubMenuItem:ne}),[te,ne]),Je=be!==`horizontal`||g?G:G.map((e,t)=>S.createElement(rT,{key:e.key,overflowDisabled:t>we,classNames:s,styles:o},e)),Ye=S.createElement(Qx,uE({id:f,ref:ce,prefixCls:`${n}-overflow`,component:`ul`,itemComponent:HT,className:J(n,`${n}-root`,`${n}-${be}`,a,{[`${n}-inline-collapsed`]:Se,[`${n}-rtl`]:le},r),dir:d,style:i,role:`menu`,tabIndex:c,data:Je,renderRawItem:e=>e,renderRawRest:e=>{let t=e.length,n=t?G.slice(-t):null;return S.createElement(nE,{eventKey:jT,title:R,disabled:Ee,internalPopupClose:t===0,popupClassName:z},n)},maxCount:be!==`horizontal`||g?Qx.INVALIDATE:Qx.RESPONSIVE,ssr:`full`,"data-menu-list":!0,onVisibleChange:e=>{Te(e)},onKeyDown:Ke},ae));return S.createElement(uT.Provider,{value:qe},S.createElement(Qw.Provider,{value:q},S.createElement(rT,{prefixCls:n,rootClassName:r,classNames:s,styles:o,mode:be,openKeys:fe,rtl:le,disabled:h,motion:K?M:null,defaultMotions:K?N:null,activeKey:Ie,onActive:Re,onInactive:ze,selectedKeys:He,inlineIndent:j,subMenuOpenDelay:_,subMenuCloseDelay:v,forceSubMenuRender:y,builtinPlacements:F,triggerSubMenuAction:P,getPopupContainer:B,itemIcon:I,expandIcon:L,onItemClick:We,onOpenChange:Ge,popupRender:ie},S.createElement(lT.Provider,{value:Fe},Ye),S.createElement(`div`,{style:{display:`none`},"aria-hidden":!0},S.createElement(aT.Provider,{value:Pe},oe)))))});fE.Item=HT,fE.SubMenu=nE,fE.ItemGroup=oE,fE.Divider=rE;var pE={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z`}}]},name:`bars`,theme:`outlined`};function mE(){return mE=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,mE({},e,{ref:t,icon:pE}))),gE=S.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),_E=e=>{let{antCls:t,componentCls:n,colorText:r,footerBg:i,headerHeight:a,headerPadding:o,headerColor:s,footerPadding:c,fontSize:l,bodyBg:u,headerBg:d}=e;return{[n]:{display:`flex`,flex:`auto`,flexDirection:`column`,minHeight:0,background:u,"&, *":{boxSizing:`border-box`},[`&${n}-has-sider`]:{flexDirection:`row`,[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:`0 0 auto`},"&-rtl":{direction:`rtl`}},[`${n}-header`]:{height:a,padding:o,color:s,lineHeight:Y(a),background:d,[`${t}-menu`]:{lineHeight:`inherit`}},[`${n}-footer`]:{padding:c,color:r,fontSize:l,background:i},[`${n}-content`]:{flex:`auto`,color:r,minHeight:0}}},vE=e=>{let{colorBgLayout:t,controlHeight:n,controlHeightLG:r,colorText:i,controlHeightSM:a,marginXXS:o,colorTextLightSolid:s,colorBgContainer:c}=e,l=r*1.25;return{colorBgHeader:`#001529`,colorBgBody:t,colorBgTrigger:`#002140`,bodyBg:t,headerBg:`#001529`,headerHeight:n*2,headerPadding:`0 ${l}px`,headerColor:i,footerPadding:`${a}px ${l}px`,footerBg:t,siderBg:`#001529`,triggerHeight:r+o*2,triggerBg:`#002140`,triggerColor:s,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:c,lightTriggerBg:c,lightTriggerColor:i}},yE=[[`colorBgBody`,`bodyBg`],[`colorBgHeader`,`headerBg`],[`colorBgTrigger`,`triggerBg`]],bE=rl(`Layout`,_E,vE,{deprecatedTokens:yE}),xE=rl([`Layout`,`Sider`],e=>{let{componentCls:t,siderBg:n,motionDurationMid:r,motionDurationSlow:i,antCls:a,triggerHeight:o,triggerColor:s,triggerBg:c,headerHeight:l,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:f,lightSiderBg:p,lightTriggerColor:m,lightTriggerBg:h,bodyBg:g}=e;return{[t]:{position:`relative`,minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:o},"&-right":{order:1},[`${t}-children`]:{height:`100%`,marginTop:-.1,paddingTop:.1,[`${a}-menu${a}-menu-inline-collapsed`]:{width:`auto`}},[`&-zero-width ${t}-children`]:{overflow:`hidden`},[`${t}-trigger`]:{position:`fixed`,bottom:0,zIndex:1,height:o,color:s,lineHeight:Y(o),textAlign:`center`,background:c,cursor:`pointer`,transition:`all ${r}`},[`${t}-zero-width-trigger`]:{position:`absolute`,top:l,insetInlineEnd:e.calc(u).mul(-1).equal(),zIndex:1,width:u,height:d,color:s,fontSize:e.fontSizeXL,display:`flex`,alignItems:`center`,justifyContent:`center`,background:n,borderRadius:`0 ${Y(f)} ${Y(f)} 0`,cursor:`pointer`,transition:`background-color ${i} ease`,"&::after":{position:`absolute`,inset:0,background:`transparent`,transition:`all ${i}`,content:`""`},"&:hover::after":{background:`rgba(255, 255, 255, 0.2)`},"&-right":{insetInlineStart:e.calc(u).mul(-1).equal(),borderRadius:`${Y(f)} 0 0 ${Y(f)}`}},"&-light":{background:p,[`${t}-trigger`]:{color:m,background:h},[`${t}-zero-width-trigger`]:{color:m,background:h,border:`1px solid ${g}`,borderInlineStart:0}}}}},vE,{deprecatedTokens:yE}),SE={xs:`479.98px`,sm:`575.98px`,md:`767.98px`,lg:`991.98px`,xl:`1199.98px`,xxl:`1599.98px`,xxxl:`1839.98px`},CE=e=>!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),wE=S.createContext({}),TE=(()=>{let e=0;return(t=``)=>(e+=1,`${t}${e}`)})(),EE=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,trigger:i,children:a,defaultCollapsed:o=!1,theme:s=`dark`,style:c={},collapsible:l=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:f=80,zeroWidthTriggerStyle:p,breakpoint:m,onCollapse:h,onBreakpoint:g,..._}=e,{siderHook:v}=(0,S.useContext)(gE),[y,b]=(0,S.useState)(`collapsed`in e?e.collapsed:o),[x,C]=(0,S.useState)(!1);(0,S.useEffect)(()=>{`collapsed`in e&&b(e.collapsed)},[e.collapsed]);let w=(t,n)=>{`collapsed`in e||b(t),h?.(t,n)},{getPrefixCls:T,direction:E}=(0,S.useContext)(oi),D=T(`layout-sider`,n),[O,k]=xE(D),A=(0,S.useRef)(null);A.current=e=>{C(e.matches),g?.(e.matches),y!==e.matches&&w(e.matches,`responsive`)},(0,S.useEffect)(()=>{function e(e){return A.current?.(e)}let t;return window?.matchMedia!==void 0&&m&&m in SE&&(t=window.matchMedia(`screen and (max-width: ${SE[m]})`),typeof t?.addEventListener==`function`&&t.addEventListener(`change`,e),e(t)),()=>{typeof t?.removeEventListener==`function`&&t.removeEventListener(`change`,e)}},[m]),(0,S.useEffect)(()=>{let e=TE(`ant-sider-`);return v.addSider(e),()=>v.removeSider(e)},[]);let j=()=>{w(!y,`clickTrigger`)},M=Sr(_,[`collapsed`]),N=y?f:d,P=CE(N)?`${N}px`:String(N),F=Number.parseFloat(String(f||0))===0?S.createElement(`span`,{onClick:j,className:J(`${D}-zero-width-trigger`,`${D}-zero-width-trigger-${u?`right`:`left`}`),style:p},i||S.createElement(hE,null)):null,I=E===`rtl`==!u,L={expanded:I?S.createElement(mg,null):S.createElement(Hw,null),collapsed:I?S.createElement(Hw,null):S.createElement(mg,null)}[y?`collapsed`:`expanded`],R=i===null?null:F||S.createElement(`div`,{className:`${D}-trigger`,onClick:j,style:{width:P}},i||L),z={...c,flex:`0 0 ${P}`,maxWidth:P,minWidth:P,width:P},B=J(D,`${D}-${s}`,{[`${D}-collapsed`]:!!y,[`${D}-has-trigger`]:l&&i!==null&&!F,[`${D}-below`]:!!x,[`${D}-zero-width`]:Number.parseFloat(P)===0},r,O,k),V=S.useMemo(()=>({siderCollapsed:y}),[y]);return S.createElement(wE.Provider,{value:V},S.createElement(`aside`,{className:B,...M,style:z,ref:t},S.createElement(`div`,{className:`${D}-children`},a),l||x&&F?R:null))}),DE={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z`}}]},name:`ellipsis`,theme:`outlined`};function OE(){return OE=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,OE({},e,{ref:t,icon:DE}))),AE=(0,S.createContext)({prefixCls:``,firstLevel:!0,inlineCollapsed:!1,styles:null,classNames:null}),jE=e=>{let{prefixCls:t,className:n,dashed:r,...i}=e,{getPrefixCls:a}=S.useContext(oi),o=J({[`${a(`menu`,t)}-item-divider-dashed`]:!!r},n);return S.createElement(rE,{className:o,...i})},ME=e=>{let{className:t,children:n,icon:r,title:i,danger:a,extra:o}=e,{prefixCls:s,firstLevel:c,direction:l,disableMenuItemTitleTooltip:u,tooltip:d,inlineCollapsed:f,styles:p,classNames:m}=S.useContext(AE),h=e=>{let t=n?.[0],i=S.createElement(`span`,{className:J(`${s}-title-content`,c?m?.itemContent:m?.subMenu?.itemContent,{[`${s}-title-content-with-extra`]:!!o||o===0}),style:c?p?.itemContent:p?.subMenu?.itemContent},n);return(!r||S.isValidElement(n)&&n.type===`span`)&&n&&e&&c&&typeof t==`string`?S.createElement(`div`,{className:`${s}-inline-collapsed-noicon`},t.charAt(0)):i},{siderCollapsed:g}=S.useContext(wE),_=i;i===void 0?_=c?n:``:i===!1&&(_=``);let v=d===!1?void 0:d,y=v&&v.title!==void 0?v.title:_,b={...v??null,title:y};!g&&!f&&(b.title=null,b.open=!1);let x=Cr(n).length,C=S.createElement(HT,{...Sr(e,[`title`,`icon`,`danger`]),className:J(c?m?.item:m?.subMenu?.item,{[`${s}-item-danger`]:a,[`${s}-item-only-child`]:(r?x+1:x)===1},t),style:{...c?p?.item:p?.subMenu?.item,...e.style},title:typeof i==`string`?i:void 0},Pp(r,e=>({className:J(`${s}-item-icon`,c?m?.itemIcon:m?.subMenu?.itemIcon,e.className),style:{...c?p?.itemIcon:p?.subMenu?.itemIcon,...e.style}})),h(f));if(!u&&d!==!1){let e=v&&v.placement?v.placement:l===`rtl`?`left`:`right`,t=`${s}-inline-collapsed-tooltip`,n=e=>({...e,root:J(t,e?.root)}),r=v&&typeof v.classNames==`function`?e=>n(v.classNames(e)):n(v?.classNames);C=S.createElement(Ow,{...b,placement:e,classNames:r},C)}return C},NE=S.createContext(null),PE=S.forwardRef((e,t)=>{let{children:n,...r}=e,i=S.useContext(NE),a=S.useMemo(()=>({...i,...r}),[i,r.prefixCls,r.mode,r.selectable,r.rootClassName]),o=rr(n),s=er(t,o?ir(n):null);return S.createElement(NE.Provider,{value:a},S.createElement(Ty,{space:!0},o?S.cloneElement(n,{ref:s}):n))}),FE=e=>{let{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:i,lineWidth:a,lineType:o,itemPaddingInline:s}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${Y(a)} ${o} ${i}`,boxShadow:`none`,"&::after":{display:`block`,clear:`both`,height:0,content:`"\\20"`},[`${t}-item, ${t}-submenu`]:{position:`relative`,display:`inline-block`,verticalAlign:`bottom`,paddingInline:s},[`> ${t}-item:hover, > ${t}-item-active, - > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:`transparent`},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color`,`background-color`].map(e=>`${e} ${n}`).join(`,`)},[`${t}-submenu-arrow`]:{display:`none`}}}},RE=({componentCls:e,menuArrowOffset:t,calc:n})=>({[`${e}-rtl`]:{direction:`rtl`},[`${e}-submenu-rtl`]:{transformOrigin:`100% 0`},[`${e}-rtl${e}-vertical, - ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${Y(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${Y(t)})`}}}}),zE=e=>Zc(e),BE=(e,t)=>{let{componentCls:n,itemColor:r,itemSelectedColor:i,subMenuItemSelectedColor:a,groupTitleColor:o,itemBg:s,subMenuItemBg:c,itemSelectedBg:l,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:f,motionDurationSlow:p,motionEaseInOut:m,motionEaseOut:h,itemPaddingInline:g,motionDurationMid:_,itemHoverColor:v,lineType:y,colorSplit:b,itemDisabledColor:x,dangerItemColor:S,dangerItemHoverColor:C,dangerItemSelectedColor:w,dangerItemActiveBg:T,dangerItemSelectedBg:E,popupBg:D,itemHoverBg:O,itemActiveBg:k,menuSubMenuBg:A,horizontalItemSelectedColor:j,horizontalItemSelectedBg:M,horizontalItemBorderRadius:N,horizontalItemHoverBg:P}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:s,[`&${n}-root:focus-visible`]:{...zE(e)},[`${n}-item`]:{"&-group-title, &-extra":{color:o}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:a},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:{...zE(e)}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${x} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:v}},[`${n}-submenu:not(${n}-submenu-selected)`]:{[`> ${n}-submenu-title:hover`]:{color:v}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:k}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:k}}},[`${n}-item-danger`]:{color:S,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:C}},[`&${n}-item:active`]:{background:T}},[`${n}-item a`]:{"&, &:hover":{color:`inherit`}},[`${n}-item-selected`]:{color:i,[`&${n}-item-danger`]:{color:w},"a, a:hover":{color:`inherit`}},[`& ${n}-item-selected`]:{backgroundColor:l,[`&${n}-item-danger`]:{backgroundColor:E}},[`&${n}-submenu > ${n}`]:{backgroundColor:A},[`&${n}-popup > ${n}`]:{backgroundColor:D},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:D},[`&${n}-horizontal`]:{...t===`dark`?{borderBottom:0}:{},[`> ${n}-item, > ${n}-submenu`]:{top:f,marginTop:e.calc(f).mul(-1).equal(),marginBottom:0,borderRadius:N,"&::after":{position:`absolute`,insetInline:g,bottom:0,borderBottom:`${Y(u)} solid transparent`,transition:`border-color ${p} ${m}`,content:`""`},"&:hover, &-active, &-open":{background:P,"&::after":{borderBottomWidth:u,borderBottomColor:j}},"&-selected":{color:j,backgroundColor:M,"&:hover":{backgroundColor:M},"&::after":{borderBottomWidth:u,borderBottomColor:j}}}},[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${Y(f)} ${y} ${b}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:c},[`${n}-item`]:{position:`relative`,"&::after":{position:`absolute`,insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${Y(d)} solid ${i}`,transform:`scaleY(0.0001)`,opacity:0,transition:[`transform`,`opacity`].map(e=>`${e} ${_} ${h}`).join(`,`),content:`""`},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:w}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:`scaleY(1)`,opacity:1,transition:[`transform`,`opacity`].map(e=>`${e} ${_} ${m}`).join(`,`)}}}}}},VE=e=>{let{componentCls:t,itemHeight:n,itemMarginInline:r,padding:i,menuArrowSize:a,marginXS:o,itemMarginBlock:s,itemWidth:c,itemPaddingInline:l}=e,u=e.calc(a).add(i).add(o).equal();return{[`${t}-item`]:{position:`relative`,overflow:`hidden`},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:Y(n),paddingInline:l,overflow:`hidden`,textOverflow:`ellipsis`,marginInline:r,marginBlock:s,width:c},[`> ${t}-item, + > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:`transparent`},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color`,`background-color`].map(e=>`${e} ${n}`).join(`,`)},[`${t}-submenu-arrow`]:{display:`none`}}}},IE=({componentCls:e,menuArrowOffset:t,calc:n})=>({[`${e}-rtl`]:{direction:`rtl`},[`${e}-submenu-rtl`]:{transformOrigin:`100% 0`},[`${e}-rtl${e}-vertical, + ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${Y(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${Y(t)})`}}}}),LE=e=>Zc(e),RE=(e,t)=>{let{componentCls:n,itemColor:r,itemSelectedColor:i,subMenuItemSelectedColor:a,groupTitleColor:o,itemBg:s,subMenuItemBg:c,itemSelectedBg:l,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:f,motionDurationSlow:p,motionEaseInOut:m,motionEaseOut:h,itemPaddingInline:g,motionDurationMid:_,itemHoverColor:v,lineType:y,colorSplit:b,itemDisabledColor:x,dangerItemColor:S,dangerItemHoverColor:C,dangerItemSelectedColor:w,dangerItemActiveBg:T,dangerItemSelectedBg:E,popupBg:D,itemHoverBg:O,itemActiveBg:k,menuSubMenuBg:A,horizontalItemSelectedColor:j,horizontalItemSelectedBg:M,horizontalItemBorderRadius:N,horizontalItemHoverBg:P}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:s,[`&${n}-root:focus-visible`]:{...LE(e)},[`${n}-item`]:{"&-group-title, &-extra":{color:o}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:a},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:{...LE(e)}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${x} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:v}},[`${n}-submenu:not(${n}-submenu-selected)`]:{[`> ${n}-submenu-title:hover`]:{color:v}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:k}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:k}}},[`${n}-item-danger`]:{color:S,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:C}},[`&${n}-item:active`]:{background:T}},[`${n}-item a`]:{"&, &:hover":{color:`inherit`}},[`${n}-item-selected`]:{color:i,[`&${n}-item-danger`]:{color:w},"a, a:hover":{color:`inherit`}},[`& ${n}-item-selected`]:{backgroundColor:l,[`&${n}-item-danger`]:{backgroundColor:E}},[`&${n}-submenu > ${n}`]:{backgroundColor:A},[`&${n}-popup > ${n}`]:{backgroundColor:D},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:D},[`&${n}-horizontal`]:{...t===`dark`?{borderBottom:0}:{},[`> ${n}-item, > ${n}-submenu`]:{top:f,marginTop:e.calc(f).mul(-1).equal(),marginBottom:0,borderRadius:N,"&::after":{position:`absolute`,insetInline:g,bottom:0,borderBottom:`${Y(u)} solid transparent`,transition:`border-color ${p} ${m}`,content:`""`},"&:hover, &-active, &-open":{background:P,"&::after":{borderBottomWidth:u,borderBottomColor:j}},"&-selected":{color:j,backgroundColor:M,"&:hover":{backgroundColor:M},"&::after":{borderBottomWidth:u,borderBottomColor:j}}}},[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${Y(f)} ${y} ${b}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:c},[`${n}-item`]:{position:`relative`,"&::after":{position:`absolute`,insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${Y(d)} solid ${i}`,transform:`scaleY(0.0001)`,opacity:0,transition:[`transform`,`opacity`].map(e=>`${e} ${_} ${h}`).join(`,`),content:`""`},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:w}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:`scaleY(1)`,opacity:1,transition:[`transform`,`opacity`].map(e=>`${e} ${_} ${m}`).join(`,`)}}}}}},zE=e=>{let{componentCls:t,itemHeight:n,itemMarginInline:r,padding:i,menuArrowSize:a,marginXS:o,itemMarginBlock:s,itemWidth:c,itemPaddingInline:l}=e,u=e.calc(a).add(i).add(o).equal();return{[`${t}-item`]:{position:`relative`,overflow:`hidden`},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:Y(n),paddingInline:l,overflow:`hidden`,textOverflow:`ellipsis`,marginInline:r,marginBlock:s,width:c},[`> ${t}-item, > ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:Y(n)},[`${t}-item-group-list ${t}-submenu-title, - ${t}-submenu-title`]:{paddingInlineEnd:u}}},HE=e=>{let{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:i,dropdownWidth:a,controlHeightLG:o,motionEaseOut:s,paddingXL:c,itemMarginInline:l,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:f,paddingXS:p,boxShadowSecondary:m,collapsedWidth:h,collapsedIconSize:g}=e,_={height:r,lineHeight:Y(r),listStylePosition:`inside`,listStyleType:`disc`};return[{[t]:{"&-inline, &-vertical":{[`&${t}-root`]:{boxShadow:`none`},...VE(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...VE(e),boxShadow:m}}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:a,maxHeight:`calc(100vh - ${Y(e.calc(o).mul(2.5).equal())})`,padding:`0`,overflow:`hidden`,borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:`hidden`,overflowY:`auto`}}},{[`${t}-inline`]:{width:`100%`,[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:`flex`,alignItems:`center`,transition:[`border-color ${f}`,`background-color ${f}`,`padding ${d} ${s}`].join(`,`),[`> ${t}-title-content`]:{flex:`auto`,minWidth:0,overflow:`hidden`,textOverflow:`ellipsis`},"> *":{flex:`none`}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:`none`,[`& > ${t}-submenu > ${t}-submenu-title`]:_,[`& ${t}-item-group-title`]:{paddingInlineStart:c}},[`${t}-item`]:_}},{[`${t}-inline-collapsed`]:{width:h,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:u,textAlign:`center`}}},[`> ${t}-item, + ${t}-submenu-title`]:{paddingInlineEnd:u}}},BE=e=>{let{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:i,dropdownWidth:a,controlHeightLG:o,motionEaseOut:s,paddingXL:c,itemMarginInline:l,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:f,paddingXS:p,boxShadowSecondary:m,collapsedWidth:h,collapsedIconSize:g}=e,_={height:r,lineHeight:Y(r),listStylePosition:`inside`,listStyleType:`disc`};return[{[t]:{"&-inline, &-vertical":{[`&${t}-root`]:{boxShadow:`none`},...zE(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...zE(e),boxShadow:m}}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:a,maxHeight:`calc(100vh - ${Y(e.calc(o).mul(2.5).equal())})`,padding:`0`,overflow:`hidden`,borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:`hidden`,overflowY:`auto`}}},{[`${t}-inline`]:{width:`100%`,[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:`flex`,alignItems:`center`,transition:[`border-color ${f}`,`background-color ${f}`,`padding ${d} ${s}`].join(`,`),[`> ${t}-title-content`]:{flex:`auto`,minWidth:0,overflow:`hidden`,textOverflow:`ellipsis`},"> *":{flex:`none`}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:`none`,[`& > ${t}-submenu > ${t}-submenu-title`]:_,[`& ${t}-item-group-title`]:{paddingInlineStart:c}},[`${t}-item`]:_}},{[`${t}-inline-collapsed`]:{width:h,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:u,textAlign:`center`}}},[`> ${t}-item, > ${t}-item-group > ${t}-item-group-list > ${t}-item, > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title, > ${t}-submenu > ${t}-submenu-title`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,insetInlineStart:0,paddingInline:`calc(50% - ${Y(e.calc(g).div(2).equal())} - ${Y(l)})`,textOverflow:`clip`,[` ${t}-submenu-arrow, ${t}-submenu-expand-icon - `]:{opacity:0},[`> ${t}-title-content`]:{width:0,opacity:0,overflow:`hidden`},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:g,lineHeight:Y(r),"+ span":{display:`inline-block`,width:0,opacity:0,overflow:`hidden`,marginInlineStart:0}}},[`${t}-item-icon, ${n}`]:{display:`inline-block`},"&-tooltip":{pointerEvents:`none`,[`${t}-item-icon, ${n}`]:{display:`none`},"a, a:hover":{color:i}},[`${t}-item-group-title`]:{...qc,paddingInline:p}}}]},UE=e=>{let{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:i,motionEaseOut:a,iconCls:o,iconSize:s,iconMarginInlineEnd:c}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:`relative`,display:`block`,margin:0,whiteSpace:`nowrap`,cursor:`pointer`,transition:[`border-color ${n}`,`background-color ${n}`,`padding calc(${n} + 0.1s) ${i}`].join(`,`),[`${t}-item-icon, ${o}`]:{minWidth:s,fontSize:s,transition:[`font-size ${r} ${a}`,`margin ${n} ${i}`,`color ${n}`].join(`,`),"+ span":{marginInlineStart:c,opacity:1,transition:[`opacity ${n} ${i}`,`margin ${n}`,`color ${n}`].join(`,`)}},[`${t}-item-icon`]:{...Yc()},[`&${t}-item-only-child`]:{[`> ${o}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:`none !important`,cursor:`not-allowed`,"&::after":{borderColor:`transparent !important`},a:{color:`inherit !important`,cursor:`not-allowed`,pointerEvents:`none`},[`> ${t}-submenu-title`]:{color:`inherit !important`,cursor:`not-allowed`}}}},WE=e=>{let{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:i,menuArrowSize:a,menuArrowOffset:o}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:`absolute`,top:`50%`,insetInlineEnd:e.margin,width:a,color:`currentcolor`,transform:`translateY(-50%)`,transition:[`transform`,`opacity`].map(e=>`${e} ${n}`).join(`,`)},"&-arrow":{"&::before, &::after":{position:`absolute`,width:e.calc(a).mul(.6).equal(),height:e.calc(a).mul(.15).equal(),backgroundColor:`currentcolor`,borderRadius:i,transition:[`background-color`,`transform`,`top`,`color`].map(e=>`${e} ${n} ${r}`).join(`,`),content:`""`},"&::before":{transform:`rotate(45deg) translateY(${Y(e.calc(o).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${Y(o)})`}}}}},Uee=e=>{let{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:i,motionDurationMid:a,motionEaseInOut:o,paddingXS:s,padding:c,colorSplit:l,lineWidth:u,zIndexPopup:d,borderRadiusLG:f,subMenuItemBorderRadius:p,menuArrowSize:m,menuArrowOffset:h,lineType:g,groupTitleLineHeight:_,groupTitleFontSize:v}=e;return[{"":{[n]:{...Xc(),"&-hidden":{display:`none`}}},[`${n}-submenu-hidden`]:{display:`none`}},{[n]:{...Jc(e),...Xc(),marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:`none`,outline:`none`,transition:`width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:`none`},"&-overflow":{display:`flex`,[`${n}-item`]:{flex:`none`}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${Y(s)} ${Y(c)}`,fontSize:v,lineHeight:_,transition:`all ${i}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color`,`background-color`].map(e=>`${e} ${i} ${o}`).join(`,`)},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${i}`,`background-color ${i}`,`padding ${a}`].map(e=>`${e} ${o}`).join(`,`)},[`${n}-submenu ${n}-sub`]:{cursor:`initial`,transition:[`background-color`,`padding`].map(e=>`${e} ${i} ${o}`).join(`,`)},[`${n}-title-content`]:{transition:`color ${i}`,"&-with-extra":{display:`inline-flex`,alignItems:`center`,width:`100%`},[`> ${t}-typography-ellipsis-single-line`]:{display:`inline`,verticalAlign:`unset`},[`${n}-item-extra`]:{marginInlineStart:`auto`,paddingInlineStart:e.padding}},[`${n}-item a`]:{"&::before":{position:`absolute`,inset:0,backgroundColor:`transparent`,content:`""`}},[`${n}-item-divider`]:{overflow:`hidden`,lineHeight:0,borderColor:l,borderStyle:g,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:`dashed`}},...UE(e),[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${Y(e.calc(r).mul(2).equal())} ${Y(c)}`}}},"&-submenu":{"&-popup":{position:`absolute`,zIndex:d,borderRadius:f,boxShadow:`none`,transformOrigin:`0 0`,[`&${n}-submenu`]:{background:`transparent`},"&::before":{position:`absolute`,inset:0,zIndex:-1,width:`100%`,height:`100%`,opacity:0,content:`""`},[`> ${n}`]:{borderRadius:f,...UE(e),...WE(e),[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:p},[`${n}-submenu-title::after`]:{transition:`transform ${i} ${o}`}}},"&-placement-leftTop, &-placement-bottomRight":{transformOrigin:`100% 0`},"&-placement-leftBottom, &-placement-topRight":{transformOrigin:`100% 100%`},"&-placement-rightBottom, &-placement-topLeft":{transformOrigin:`0 100%`},"&-placement-bottomLeft, &-placement-rightTop":{transformOrigin:`0 0`},"&-placement-leftTop, &-placement-leftBottom":{paddingInlineEnd:e.paddingXS},"&-placement-rightTop, &-placement-rightBottom":{paddingInlineStart:e.paddingXS},"&-placement-topRight, &-placement-topLeft":{paddingBottom:e.paddingXS},"&-placement-bottomRight, &-placement-bottomLeft":{paddingTop:e.paddingXS}},...WE(e),[`&-inline-collapsed ${n}-submenu-arrow, - &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${Y(h)})`},"&::after":{transform:`rotate(45deg) translateX(${Y(e.calc(h).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${Y(e.calc(m).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${Y(e.calc(h).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${Y(h)})`}}}},{[`${t}-layout-header`]:{[n]:{lineHeight:`inherit`}}}]},Wee=e=>{let{colorPrimary:t,colorError:n,colorTextDisabled:r,colorErrorBg:i,colorText:a,colorTextDescription:o,colorBgContainer:s,colorFillAlter:c,colorFillContent:l,lineWidth:u,lineWidthBold:d,controlItemBgActive:f,colorBgTextHover:p,controlHeightLG:m,lineHeight:h,colorBgElevated:g,marginXXS:_,padding:v,fontSize:y,controlHeightSM:b,fontSizeLG:x,colorTextLightSolid:S,colorErrorHover:C}=e,w=e.activeBarWidth??0,T=e.activeBarBorderWidth??u,E=e.itemMarginInline??e.marginXXS,D=new Rs(S).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:a,itemColor:a,colorItemTextHover:a,itemHoverColor:a,colorItemTextHoverHorizontal:t,horizontalItemHoverColor:t,colorGroupTitle:o,groupTitleColor:o,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:s,itemBg:s,colorItemBgHover:p,itemHoverBg:p,colorItemBgActive:l,itemActiveBg:f,colorSubItemBg:c,subMenuItemBg:c,colorItemBgSelected:f,itemSelectedBg:f,colorItemBgSelectedHorizontal:`transparent`,horizontalItemSelectedBg:`transparent`,colorActiveBarWidth:0,activeBarWidth:w,colorActiveBarHeight:d,activeBarHeight:d,colorActiveBarBorderSize:u,activeBarBorderWidth:T,colorItemTextDisabled:r,itemDisabledColor:r,colorDangerItemText:n,dangerItemColor:n,colorDangerItemTextHover:n,dangerItemHoverColor:n,colorDangerItemTextSelected:n,dangerItemSelectedColor:n,colorDangerItemBgActive:i,dangerItemActiveBg:i,colorDangerItemBgSelected:i,dangerItemSelectedBg:i,itemMarginInline:E,horizontalItemBorderRadius:0,horizontalItemHoverBg:`transparent`,itemHeight:m,groupTitleLineHeight:h,collapsedWidth:m*2,popupBg:g,itemMarginBlock:_,itemPaddingInline:v,horizontalLineHeight:`${m*1.15}px`,iconSize:y,iconMarginInlineEnd:b-y,collapsedIconSize:x,groupTitleFontSize:y,darkItemDisabledColor:new Rs(S).setA(.25).toRgbString(),darkItemColor:D,darkDangerItemColor:n,darkItemBg:`#001529`,darkPopupBg:`#001529`,darkSubMenuItemBg:`#000c17`,darkItemSelectedColor:S,darkItemSelectedBg:t,darkDangerItemSelectedBg:n,darkItemHoverBg:`transparent`,darkGroupTitleColor:D,darkItemHoverColor:S,darkDangerItemHoverColor:C,darkDangerItemSelectedColor:S,darkDangerItemActiveBg:n,itemWidth:w?`calc(100% + ${T}px)`:`calc(100% - ${E*2}px)`}},Gee=(e,t=e,n=!0)=>rl(`Menu`,e=>{let{colorBgElevated:t,controlHeightLG:n,fontSize:r,darkItemColor:i,darkDangerItemColor:a,darkItemBg:o,darkSubMenuItemBg:s,darkItemSelectedColor:c,darkItemSelectedBg:l,darkDangerItemSelectedBg:u,darkItemHoverBg:d,darkGroupTitleColor:f,darkItemHoverColor:p,darkItemDisabledColor:m,darkDangerItemHoverColor:h,darkDangerItemSelectedColor:g,darkDangerItemActiveBg:_,popupBg:v,darkPopupBg:y}=e,b=e.calc(r).div(7).mul(5).equal(),x=gs(e,{menuArrowSize:b,menuHorizontalHeight:e.calc(n).mul(1.15).equal(),menuArrowOffset:e.calc(b).mul(.25).equal(),menuSubMenuBg:t,calc:e.calc,popupBg:v}),S=gs(x,{itemColor:i,itemHoverColor:p,groupTitleColor:f,itemSelectedColor:c,subMenuItemSelectedColor:c,itemBg:o,popupBg:y,subMenuItemBg:s,itemActiveBg:`transparent`,itemSelectedBg:l,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:d,itemDisabledColor:m,dangerItemColor:a,dangerItemHoverColor:h,dangerItemSelectedColor:g,dangerItemActiveBg:_,dangerItemSelectedBg:u,menuSubMenuBg:s,horizontalItemSelectedColor:c,horizontalItemSelectedBg:l});return[Uee(x),LE(x),HE(x),BE(x,`light`),BE(S,`dark`),RE(x),bh(x),Hh(x,`slide-up`),Hh(x,`slide-down`),rg(x,`zoom-big`)]},Wee,{deprecatedTokens:[[`colorGroupTitle`,`groupTitleColor`],[`radiusItem`,`itemBorderRadius`],[`radiusSubMenuItem`,`subMenuItemBorderRadius`],[`colorItemText`,`itemColor`],[`colorItemTextHover`,`itemHoverColor`],[`colorItemTextHoverHorizontal`,`horizontalItemHoverColor`],[`colorItemTextSelected`,`itemSelectedColor`],[`colorItemTextSelectedHorizontal`,`horizontalItemSelectedColor`],[`colorItemTextDisabled`,`itemDisabledColor`],[`colorDangerItemText`,`dangerItemColor`],[`colorDangerItemTextHover`,`dangerItemHoverColor`],[`colorDangerItemTextSelected`,`dangerItemSelectedColor`],[`colorDangerItemBgActive`,`dangerItemActiveBg`],[`colorDangerItemBgSelected`,`dangerItemSelectedBg`],[`colorItemBg`,`itemBg`],[`colorItemBgHover`,`itemHoverBg`],[`colorSubItemBg`,`subMenuItemBg`],[`colorItemBgActive`,`itemActiveBg`],[`colorItemBgSelectedHorizontal`,`horizontalItemSelectedBg`],[`colorActiveBarWidth`,`activeBarWidth`],[`colorActiveBarHeight`,`activeBarHeight`],[`colorActiveBarBorderSize`,`activeBarBorderWidth`],[`colorItemBgSelected`,`itemSelectedBg`]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(e,t),GE=e=>{let{popupClassName:t,icon:n,title:r,theme:i}=e,a=S.useContext(ME),{prefixCls:o,inlineCollapsed:s,theme:c,classNames:l,styles:u}=a,d=uT(),f;if(!n)f=s&&!d.length&&r&&typeof r==`string`?S.createElement(`div`,{className:`${o}-inline-collapsed-noicon`},r.charAt(0)):S.createElement(`span`,{className:`${o}-title-content`},r);else{let e=S.isValidElement(r)&&r.type===`span`;f=S.createElement(S.Fragment,null,Pp(n,e=>({className:J(e.className,`${o}-item-icon`,l?.itemIcon),style:{...e.style,...u?.itemIcon}})),e?r:S.createElement(`span`,{className:`${o}-title-content`},r))}let p=S.useMemo(()=>({...a,firstLevel:!1}),[a]),[m]=Yd(`Menu`);return S.createElement(ME.Provider,{value:p},S.createElement(iE,{...Sr(e,[`icon`]),title:f,classNames:{list:l?.subMenu?.list,listTitle:l?.subMenu?.itemTitle},styles:{list:u?.subMenu?.list,listTitle:u?.subMenu?.itemTitle},popupClassName:J(o,t,l?.popup?.root,`${o}-${i||c}`),popupStyle:{zIndex:m,...e.popupStyle,...u?.popup?.root}}))};function KE(e){return e===null||e===!1}var Kee={item:PE,submenu:GE,divider:NE},qee=(0,S.forwardRef)((e,t)=>{let n=S.useContext(FE),r=n||{},{prefixCls:i,className:a,style:o,theme:s=`light`,expandIcon:c,_internalDisableMenuItemTitleTooltip:l,tooltip:u,inlineCollapsed:d,siderCollapsed:f,rootClassName:p,mode:m,selectable:h,onClick:g,overflowedIndicatorPopupClassName:_,classNames:v,styles:y,...b}=e,{menu:x}=S.useContext(oi),{getPrefixCls:C,getPopupContainer:w,direction:T,className:E,style:D,classNames:O,styles:k}=li(`menu`),A=C(),j=Sr(b,[`collapsedWidth`]);r.validator?.({mode:m});let M=In((...e)=>{g?.(...e),r.onClick?.()}),N=r.mode||m,P=h??r.selectable,F=d??f,I={...e,mode:N,inlineCollapsed:F,selectable:P,theme:s},[L,R]=Fd([O,v],[k,y],{props:I},{popup:{_default:`root`},subMenu:{_default:`item`}}),z={horizontal:{motionName:`${A}-slide-up`},inline:Wm(A),other:{motionName:`${A}-zoom-big`}},B=C(`menu`,i||r.prefixCls),V=bf(B),[H,U]=Gee(B,V,!n),W=J(`${B}-${s}`,E,a),ee=S.useMemo(()=>{if(typeof c==`function`||KE(c))return c||null;if(typeof r.expandIcon==`function`||KE(r.expandIcon))return r.expandIcon||null;if(typeof x?.expandIcon==`function`||KE(x?.expandIcon))return x?.expandIcon||null;let e=c??r?.expandIcon??x?.expandIcon;return Pp(e,{className:J(`${B}-submenu-expand-icon`,S.isValidElement(e)?e.props?.className:void 0)})},[c,r?.expandIcon,x?.expandIcon,B]),te=S.useMemo(()=>({prefixCls:B,inlineCollapsed:F||!1,direction:T,firstLevel:!0,theme:s,mode:N,disableMenuItemTitleTooltip:l,tooltip:u,classNames:L,styles:R}),[B,F,T,l,s,N,L,R,u]);return S.createElement(FE.Provider,{value:null},S.createElement(ME.Provider,{value:te},S.createElement(mE,{getPopupContainer:w,overflowedIndicator:S.createElement(jE,null),overflowedIndicatorPopupClassName:J(B,`${B}-${s}`,_),classNames:{list:L.list,listTitle:L.itemTitle},styles:{list:R.list,listTitle:R.itemTitle},mode:N,selectable:P,onClick:M,...j,inlineCollapsed:F,style:{...R.root,...D,...o},className:W,prefixCls:B,direction:T,defaultMotions:z,expandIcon:ee,ref:t,rootClassName:J(p,H,r.rootClassName,U,V,L.root),_internalComponents:Kee})))}),qE=(0,S.forwardRef)((e,t)=>{let n=(0,S.useRef)(null),r=S.useContext(EE);return(0,S.useImperativeHandle)(t,()=>({menu:n.current,focus:e=>{n.current?.focus(e)}})),S.createElement(qee,{ref:n,...e,...r})});qE.Item=PE,qE.SubMenu=GE,qE.Divider=NE,qE.ItemGroup=cE;var Jee=e=>{let{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:i}=e,a=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${a}`]:{[`&${a}-danger:not(${a}-disabled)`]:{color:r,"&:hover":{color:i,backgroundColor:r}}}}}},Yee=e=>{let{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:i,sizePopupArrow:a,antCls:o,iconCls:s,motionDurationMid:c,paddingBlock:l,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:f,fontSizeIcon:p,controlPaddingHorizontal:m,colorBgElevated:h}=e;return[{[t]:{position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:`block`,"&::before":{position:`absolute`,insetBlock:e.calc(a).div(2).sub(i).equal(),zIndex:-9999,opacity:1e-4,content:`""`},"&-menu-vertical":{maxHeight:`100vh`,overflowY:`auto`},[`&-trigger${o}-btn`]:{[`& > ${s}-down, & > ${o}-btn-icon > ${s}-down`]:{fontSize:p}},[`${t}-wrap`]:{position:`relative`,[`${o}-btn > ${s}-down`]:{fontSize:p},[`${s}-down::before`]:{transition:`transform ${c}`}},[`${t}-wrap-open`]:{[`${s}-down::before`]:{transform:`rotate(180deg)`}},"&-hidden, &-menu-hidden, &-menu-submenu-hidden":{display:`none`},[`&${o}-slide-down-enter${o}-slide-down-enter-active${t}-placement-bottomLeft, + `]:{opacity:0},[`> ${t}-title-content`]:{width:0,opacity:0,overflow:`hidden`},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:g,lineHeight:Y(r),"+ span":{display:`inline-block`,width:0,opacity:0,overflow:`hidden`,marginInlineStart:0}}},[`${t}-item-icon, ${n}`]:{display:`inline-block`},"&-tooltip":{pointerEvents:`none`,[`${t}-item-icon, ${n}`]:{display:`none`},"a, a:hover":{color:i}},[`${t}-item-group-title`]:{...qc,paddingInline:p}}}]},VE=e=>{let{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:i,motionEaseOut:a,iconCls:o,iconSize:s,iconMarginInlineEnd:c}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:`relative`,display:`block`,margin:0,whiteSpace:`nowrap`,cursor:`pointer`,transition:[`border-color ${n}`,`background-color ${n}`,`padding calc(${n} + 0.1s) ${i}`].join(`,`),[`${t}-item-icon, ${o}`]:{minWidth:s,fontSize:s,transition:[`font-size ${r} ${a}`,`margin ${n} ${i}`,`color ${n}`].join(`,`),"+ span":{marginInlineStart:c,opacity:1,transition:[`opacity ${n} ${i}`,`margin ${n}`,`color ${n}`].join(`,`)}},[`${t}-item-icon`]:{...Yc()},[`&${t}-item-only-child`]:{[`> ${o}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:`none !important`,cursor:`not-allowed`,"&::after":{borderColor:`transparent !important`},a:{color:`inherit !important`,cursor:`not-allowed`,pointerEvents:`none`},[`> ${t}-submenu-title`]:{color:`inherit !important`,cursor:`not-allowed`}}}},HE=e=>{let{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:i,menuArrowSize:a,menuArrowOffset:o}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:`absolute`,top:`50%`,insetInlineEnd:e.margin,width:a,color:`currentcolor`,transform:`translateY(-50%)`,transition:[`transform`,`opacity`].map(e=>`${e} ${n}`).join(`,`)},"&-arrow":{"&::before, &::after":{position:`absolute`,width:e.calc(a).mul(.6).equal(),height:e.calc(a).mul(.15).equal(),backgroundColor:`currentcolor`,borderRadius:i,transition:[`background-color`,`transform`,`top`,`color`].map(e=>`${e} ${n} ${r}`).join(`,`),content:`""`},"&::before":{transform:`rotate(45deg) translateY(${Y(e.calc(o).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${Y(o)})`}}}}},Gee=e=>{let{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:i,motionDurationMid:a,motionEaseInOut:o,paddingXS:s,padding:c,colorSplit:l,lineWidth:u,zIndexPopup:d,borderRadiusLG:f,subMenuItemBorderRadius:p,menuArrowSize:m,menuArrowOffset:h,lineType:g,groupTitleLineHeight:_,groupTitleFontSize:v}=e;return[{"":{[n]:{...Xc(),"&-hidden":{display:`none`}}},[`${n}-submenu-hidden`]:{display:`none`}},{[n]:{...Jc(e),...Xc(),marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:`none`,outline:`none`,transition:`width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:`none`},"&-overflow":{display:`flex`,[`${n}-item`]:{flex:`none`}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${Y(s)} ${Y(c)}`,fontSize:v,lineHeight:_,transition:`all ${i}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color`,`background-color`].map(e=>`${e} ${i} ${o}`).join(`,`)},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${i}`,`background-color ${i}`,`padding ${a}`].map(e=>`${e} ${o}`).join(`,`)},[`${n}-submenu ${n}-sub`]:{cursor:`initial`,transition:[`background-color`,`padding`].map(e=>`${e} ${i} ${o}`).join(`,`)},[`${n}-title-content`]:{transition:`color ${i}`,"&-with-extra":{display:`inline-flex`,alignItems:`center`,width:`100%`},[`> ${t}-typography-ellipsis-single-line`]:{display:`inline`,verticalAlign:`unset`},[`${n}-item-extra`]:{marginInlineStart:`auto`,paddingInlineStart:e.padding}},[`${n}-item a`]:{"&::before":{position:`absolute`,inset:0,backgroundColor:`transparent`,content:`""`}},[`${n}-item-divider`]:{overflow:`hidden`,lineHeight:0,borderColor:l,borderStyle:g,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:`dashed`}},...VE(e),[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${Y(e.calc(r).mul(2).equal())} ${Y(c)}`}}},"&-submenu":{"&-popup":{position:`absolute`,zIndex:d,borderRadius:f,boxShadow:`none`,transformOrigin:`0 0`,[`&${n}-submenu`]:{background:`transparent`},"&::before":{position:`absolute`,inset:0,zIndex:-1,width:`100%`,height:`100%`,opacity:0,content:`""`},[`> ${n}`]:{borderRadius:f,...VE(e),...HE(e),[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:p},[`${n}-submenu-title::after`]:{transition:`transform ${i} ${o}`}}},"&-placement-leftTop, &-placement-bottomRight":{transformOrigin:`100% 0`},"&-placement-leftBottom, &-placement-topRight":{transformOrigin:`100% 100%`},"&-placement-rightBottom, &-placement-topLeft":{transformOrigin:`0 100%`},"&-placement-bottomLeft, &-placement-rightTop":{transformOrigin:`0 0`},"&-placement-leftTop, &-placement-leftBottom":{paddingInlineEnd:e.paddingXS},"&-placement-rightTop, &-placement-rightBottom":{paddingInlineStart:e.paddingXS},"&-placement-topRight, &-placement-topLeft":{paddingBottom:e.paddingXS},"&-placement-bottomRight, &-placement-bottomLeft":{paddingTop:e.paddingXS}},...HE(e),[`&-inline-collapsed ${n}-submenu-arrow, + &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${Y(h)})`},"&::after":{transform:`rotate(45deg) translateX(${Y(e.calc(h).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${Y(e.calc(m).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${Y(e.calc(h).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${Y(h)})`}}}},{[`${t}-layout-header`]:{[n]:{lineHeight:`inherit`}}}]},Kee=e=>{let{colorPrimary:t,colorError:n,colorTextDisabled:r,colorErrorBg:i,colorText:a,colorTextDescription:o,colorBgContainer:s,colorFillAlter:c,colorFillContent:l,lineWidth:u,lineWidthBold:d,controlItemBgActive:f,colorBgTextHover:p,controlHeightLG:m,lineHeight:h,colorBgElevated:g,marginXXS:_,padding:v,fontSize:y,controlHeightSM:b,fontSizeLG:x,colorTextLightSolid:S,colorErrorHover:C}=e,w=e.activeBarWidth??0,T=e.activeBarBorderWidth??u,E=e.itemMarginInline??e.marginXXS,D=new Rs(S).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:a,itemColor:a,colorItemTextHover:a,itemHoverColor:a,colorItemTextHoverHorizontal:t,horizontalItemHoverColor:t,colorGroupTitle:o,groupTitleColor:o,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:s,itemBg:s,colorItemBgHover:p,itemHoverBg:p,colorItemBgActive:l,itemActiveBg:f,colorSubItemBg:c,subMenuItemBg:c,colorItemBgSelected:f,itemSelectedBg:f,colorItemBgSelectedHorizontal:`transparent`,horizontalItemSelectedBg:`transparent`,colorActiveBarWidth:0,activeBarWidth:w,colorActiveBarHeight:d,activeBarHeight:d,colorActiveBarBorderSize:u,activeBarBorderWidth:T,colorItemTextDisabled:r,itemDisabledColor:r,colorDangerItemText:n,dangerItemColor:n,colorDangerItemTextHover:n,dangerItemHoverColor:n,colorDangerItemTextSelected:n,dangerItemSelectedColor:n,colorDangerItemBgActive:i,dangerItemActiveBg:i,colorDangerItemBgSelected:i,dangerItemSelectedBg:i,itemMarginInline:E,horizontalItemBorderRadius:0,horizontalItemHoverBg:`transparent`,itemHeight:m,groupTitleLineHeight:h,collapsedWidth:m*2,popupBg:g,itemMarginBlock:_,itemPaddingInline:v,horizontalLineHeight:`${m*1.15}px`,iconSize:y,iconMarginInlineEnd:b-y,collapsedIconSize:x,groupTitleFontSize:y,darkItemDisabledColor:new Rs(S).setA(.25).toRgbString(),darkItemColor:D,darkDangerItemColor:n,darkItemBg:`#001529`,darkPopupBg:`#001529`,darkSubMenuItemBg:`#000c17`,darkItemSelectedColor:S,darkItemSelectedBg:t,darkDangerItemSelectedBg:n,darkItemHoverBg:`transparent`,darkGroupTitleColor:D,darkItemHoverColor:S,darkDangerItemHoverColor:C,darkDangerItemSelectedColor:S,darkDangerItemActiveBg:n,itemWidth:w?`calc(100% + ${T}px)`:`calc(100% - ${E*2}px)`}},qee=(e,t=e,n=!0)=>rl(`Menu`,e=>{let{colorBgElevated:t,controlHeightLG:n,fontSize:r,darkItemColor:i,darkDangerItemColor:a,darkItemBg:o,darkSubMenuItemBg:s,darkItemSelectedColor:c,darkItemSelectedBg:l,darkDangerItemSelectedBg:u,darkItemHoverBg:d,darkGroupTitleColor:f,darkItemHoverColor:p,darkItemDisabledColor:m,darkDangerItemHoverColor:h,darkDangerItemSelectedColor:g,darkDangerItemActiveBg:_,popupBg:v,darkPopupBg:y}=e,b=e.calc(r).div(7).mul(5).equal(),x=gs(e,{menuArrowSize:b,menuHorizontalHeight:e.calc(n).mul(1.15).equal(),menuArrowOffset:e.calc(b).mul(.25).equal(),menuSubMenuBg:t,calc:e.calc,popupBg:v}),S=gs(x,{itemColor:i,itemHoverColor:p,groupTitleColor:f,itemSelectedColor:c,subMenuItemSelectedColor:c,itemBg:o,popupBg:y,subMenuItemBg:s,itemActiveBg:`transparent`,itemSelectedBg:l,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:d,itemDisabledColor:m,dangerItemColor:a,dangerItemHoverColor:h,dangerItemSelectedColor:g,dangerItemActiveBg:_,dangerItemSelectedBg:u,menuSubMenuBg:s,horizontalItemSelectedColor:c,horizontalItemSelectedBg:l});return[Gee(x),FE(x),BE(x),RE(x,`light`),RE(S,`dark`),IE(x),bh(x),Hh(x,`slide-up`),Hh(x,`slide-down`),rg(x,`zoom-big`)]},Kee,{deprecatedTokens:[[`colorGroupTitle`,`groupTitleColor`],[`radiusItem`,`itemBorderRadius`],[`radiusSubMenuItem`,`subMenuItemBorderRadius`],[`colorItemText`,`itemColor`],[`colorItemTextHover`,`itemHoverColor`],[`colorItemTextHoverHorizontal`,`horizontalItemHoverColor`],[`colorItemTextSelected`,`itemSelectedColor`],[`colorItemTextSelectedHorizontal`,`horizontalItemSelectedColor`],[`colorItemTextDisabled`,`itemDisabledColor`],[`colorDangerItemText`,`dangerItemColor`],[`colorDangerItemTextHover`,`dangerItemHoverColor`],[`colorDangerItemTextSelected`,`dangerItemSelectedColor`],[`colorDangerItemBgActive`,`dangerItemActiveBg`],[`colorDangerItemBgSelected`,`dangerItemSelectedBg`],[`colorItemBg`,`itemBg`],[`colorItemBgHover`,`itemHoverBg`],[`colorSubItemBg`,`subMenuItemBg`],[`colorItemBgActive`,`itemActiveBg`],[`colorItemBgSelectedHorizontal`,`horizontalItemSelectedBg`],[`colorActiveBarWidth`,`activeBarWidth`],[`colorActiveBarHeight`,`activeBarHeight`],[`colorActiveBarBorderSize`,`activeBarBorderWidth`],[`colorItemBgSelected`,`itemSelectedBg`]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(e,t),UE=e=>{let{popupClassName:t,icon:n,title:r,theme:i}=e,a=S.useContext(AE),{prefixCls:o,inlineCollapsed:s,theme:c,classNames:l,styles:u}=a,d=cT(),f;if(!n)f=s&&!d.length&&r&&typeof r==`string`?S.createElement(`div`,{className:`${o}-inline-collapsed-noicon`},r.charAt(0)):S.createElement(`span`,{className:`${o}-title-content`},r);else{let e=S.isValidElement(r)&&r.type===`span`;f=S.createElement(S.Fragment,null,Pp(n,e=>({className:J(e.className,`${o}-item-icon`,l?.itemIcon),style:{...e.style,...u?.itemIcon}})),e?r:S.createElement(`span`,{className:`${o}-title-content`},r))}let p=S.useMemo(()=>({...a,firstLevel:!1}),[a]),[m]=Yd(`Menu`);return S.createElement(AE.Provider,{value:p},S.createElement(nE,{...Sr(e,[`icon`]),title:f,classNames:{list:l?.subMenu?.list,listTitle:l?.subMenu?.itemTitle},styles:{list:u?.subMenu?.list,listTitle:u?.subMenu?.itemTitle},popupClassName:J(o,t,l?.popup?.root,`${o}-${i||c}`),popupStyle:{zIndex:m,...e.popupStyle,...u?.popup?.root}}))};function WE(e){return e===null||e===!1}var Jee={item:ME,submenu:UE,divider:jE},Yee=(0,S.forwardRef)((e,t)=>{let n=S.useContext(NE),r=n||{},{prefixCls:i,className:a,style:o,theme:s=`light`,expandIcon:c,_internalDisableMenuItemTitleTooltip:l,tooltip:u,inlineCollapsed:d,siderCollapsed:f,rootClassName:p,mode:m,selectable:h,onClick:g,overflowedIndicatorPopupClassName:_,classNames:v,styles:y,...b}=e,{menu:x}=S.useContext(oi),{getPrefixCls:C,getPopupContainer:w,direction:T,className:E,style:D,classNames:O,styles:k}=li(`menu`),A=C(),j=Sr(b,[`collapsedWidth`]);r.validator?.({mode:m});let M=In((...e)=>{g?.(...e),r.onClick?.()}),N=r.mode||m,P=h??r.selectable,F=d??f,I={...e,mode:N,inlineCollapsed:F,selectable:P,theme:s},[L,R]=Fd([O,v],[k,y],{props:I},{popup:{_default:`root`},subMenu:{_default:`item`}}),z={horizontal:{motionName:`${A}-slide-up`},inline:Wm(A),other:{motionName:`${A}-zoom-big`}},B=C(`menu`,i||r.prefixCls),V=bf(B),[H,U]=qee(B,V,!n),W=J(`${B}-${s}`,E,a),ee=S.useMemo(()=>{if(typeof c==`function`||WE(c))return c||null;if(typeof r.expandIcon==`function`||WE(r.expandIcon))return r.expandIcon||null;if(typeof x?.expandIcon==`function`||WE(x?.expandIcon))return x?.expandIcon||null;let e=c??r?.expandIcon??x?.expandIcon;return Pp(e,{className:J(`${B}-submenu-expand-icon`,S.isValidElement(e)?e.props?.className:void 0)})},[c,r?.expandIcon,x?.expandIcon,B]),te=S.useMemo(()=>({prefixCls:B,inlineCollapsed:F||!1,direction:T,firstLevel:!0,theme:s,mode:N,disableMenuItemTitleTooltip:l,tooltip:u,classNames:L,styles:R}),[B,F,T,l,s,N,L,R,u]);return S.createElement(NE.Provider,{value:null},S.createElement(AE.Provider,{value:te},S.createElement(fE,{getPopupContainer:w,overflowedIndicator:S.createElement(kE,null),overflowedIndicatorPopupClassName:J(B,`${B}-${s}`,_),classNames:{list:L.list,listTitle:L.itemTitle},styles:{list:R.list,listTitle:R.itemTitle},mode:N,selectable:P,onClick:M,...j,inlineCollapsed:F,style:{...R.root,...D,...o},className:W,prefixCls:B,direction:T,defaultMotions:z,expandIcon:ee,ref:t,rootClassName:J(p,H,r.rootClassName,U,V,L.root),_internalComponents:Jee})))}),GE=(0,S.forwardRef)((e,t)=>{let n=(0,S.useRef)(null),r=S.useContext(wE);return(0,S.useImperativeHandle)(t,()=>({menu:n.current,focus:e=>{n.current?.focus(e)}})),S.createElement(Yee,{ref:n,...e,...r})});GE.Item=ME,GE.SubMenu=UE,GE.Divider=jE,GE.ItemGroup=oE;var Xee=e=>{let{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:i}=e,a=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${a}`]:{[`&${a}-danger:not(${a}-disabled)`]:{color:r,"&:hover":{color:i,backgroundColor:r}}}}}},Zee=e=>{let{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:i,sizePopupArrow:a,antCls:o,iconCls:s,motionDurationMid:c,paddingBlock:l,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:f,fontSizeIcon:p,controlPaddingHorizontal:m,colorBgElevated:h}=e;return[{[t]:{position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:`block`,"&::before":{position:`absolute`,insetBlock:e.calc(a).div(2).sub(i).equal(),zIndex:-9999,opacity:1e-4,content:`""`},"&-menu-vertical":{maxHeight:`100vh`,overflowY:`auto`},[`&-trigger${o}-btn`]:{[`& > ${s}-down, & > ${o}-btn-icon > ${s}-down`]:{fontSize:p}},[`${t}-wrap`]:{position:`relative`,[`${o}-btn > ${s}-down`]:{fontSize:p},[`${s}-down::before`]:{transition:`transform ${c}`}},[`${t}-wrap-open`]:{[`${s}-down::before`]:{transform:`rotate(180deg)`}},"&-hidden, &-menu-hidden, &-menu-submenu-hidden":{display:`none`},[`&${o}-slide-down-enter${o}-slide-down-enter-active${t}-placement-bottomLeft, &${o}-slide-down-appear${o}-slide-down-appear-active${t}-placement-bottomLeft, &${o}-slide-down-enter${o}-slide-down-enter-active${t}-placement-bottom, &${o}-slide-down-appear${o}-slide-down-appear-active${t}-placement-bottom, @@ -207,46 +207,46 @@ html body { &${o}-slide-down-leave${o}-slide-down-leave-active${t}-placement-bottom, &${o}-slide-down-leave${o}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:Ph},[`&${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-topLeft, &${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-top, - &${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-topRight`]:{animationName:Ih}}},fw(e,h,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${n}`]:{position:`relative`,margin:0},[`${n}-submenu-popup`]:{position:`absolute`,zIndex:r,background:`transparent`,boxShadow:`none`,transformOrigin:`0 0`,"ul, li":{listStyle:`none`,margin:0}},[`${t}, ${t}-menu-submenu`]:{...Jc(e),[n]:{padding:d,listStyleType:`none`,backgroundColor:h,backgroundClip:`padding-box`,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,...Qc(e),"&:empty":{padding:0,boxShadow:`none`},[`${n}-item-group-title`]:{padding:`${Y(l)} ${Y(m)}`,color:e.colorTextDescription,transition:`all ${c}`},[`${n}-item`]:{position:`relative`,display:`flex`,alignItems:`center`},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:`auto`,"&-with-extra":{display:`inline-flex`,alignItems:`center`,width:`100%`},"> a":{color:`inherit`,transition:`all ${c}`,"&:hover":{color:`inherit`},"&::after":{position:`absolute`,inset:0,content:`""`}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:`auto`,fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:{display:`flex`,margin:0,padding:`${Y(l)} ${Y(m)}`,color:e.colorText,fontWeight:`normal`,fontSize:u,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${c}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...Qc(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:`not-allowed`,"&:hover":{color:f,backgroundColor:h,cursor:`not-allowed`},a:{pointerEvents:`none`}},"&-divider":{height:1,margin:`${Y(e.marginXXS)} 0`,overflow:`hidden`,lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:`absolute`,insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:`0 !important`,color:e.colorIcon,fontSize:p,fontStyle:`normal`}}},[`${n}-item-group-list`]:{margin:`0 ${Y(e.marginXS)}`,padding:0,listStyle:`none`},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(m).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:`relative`},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:h,cursor:`not-allowed`}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[Hh(e,`slide-up`),Hh(e,`slide-down`),Mh(e,`move-up`),Mh(e,`move-down`),rg(e,`zoom-big`)]]},Xee=rl(`Dropdown`,e=>{let{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:i}=e,a=gs(e,{menuCls:`${i}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[Yee(a),Jee(a)]},e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...uw({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...cw(e)}),{resetStyle:!1}),JE=e=>{let{menu:t,arrow:n,prefixCls:r,children:i,trigger:a,disabled:o,dropdownRender:s,popupRender:c,getPopupContainer:l,overlayClassName:u,rootClassName:d,overlayStyle:f,open:p,onOpenChange:m,mouseEnterDelay:h=.15,mouseLeaveDelay:g=.1,autoAdjustOverflow:_=!0,placement:v=``,transitionName:y,classNames:b,styles:x,destroyPopupOnHide:C,destroyOnHidden:w}=e,{getPrefixCls:T,direction:E,getPopupContainer:D,className:O,style:k,classNames:A,styles:j}=li(`dropdown`),M={...e,mouseEnterDelay:h,mouseLeaveDelay:g,autoAdjustOverflow:_},[N,P]=Fd([A,b],[j,x],{props:M}),F={...k,...f,...P.root},I=c||s;Dr(`Dropdown`);let L=S.useMemo(()=>{let e=T();return y===void 0?v.includes(`top`)?`${e}-slide-down`:`${e}-slide-up`:y},[T,v,y]),R=S.useMemo(()=>v?v.includes(`Center`)?v.slice(0,v.indexOf(`Center`)):v:E===`rtl`?`bottomRight`:`bottomLeft`,[v,E]),z=T(`dropdown`,r),B=bf(z),[V,H]=Xee(z,B),[,U]=Kc(),W=S.Children.only(vd(i)?S.createElement(`span`,null,i):i),ee=Pp(W,{className:J(`${z}-trigger`,{[`${z}-rtl`]:E===`rtl`},W.props.className),disabled:W.props.disabled??o}),te=o?[]:a,ne=!!te?.includes(`contextMenu`),[re,ie]=Hn(!1,p),ae=In(e=>{m?.(e,{source:`trigger`}),ie(e)}),G=J(u,d,V,H,B,O,N.root,{[`${z}-rtl`]:E===`rtl`}),oe=_w({arrowPointAtCenter:hd(n)&&n.pointAtCenter,autoAdjustOverflow:_,offset:U.marginXXS,arrowWidth:n?U.sizePopupArrow:0,borderRadius:U.borderRadius}),K=In(()=>{t?.selectable&&t?.multiple||(m?.(!1,{source:`menu`}),ie(!1))}),se=()=>{let e=Sr(N,[`root`]),n=Sr(P,[`root`]),r;return t?.items&&(r=S.createElement(qE,{...t,classNames:{...e,subMenu:{...e}},styles:{...n,subMenu:{...n}}})),I&&(r=I(r)),r=S.Children.only(typeof r==`string`?S.createElement(`span`,null,r):r),S.createElement(IE,{prefixCls:`${z}-menu`,rootClassName:J(H,B),expandIcon:S.createElement(`span`,{className:`${z}-menu-submenu-arrow`},E===`rtl`?S.createElement(Ww,{className:`${z}-menu-submenu-arrow-icon`}):S.createElement(mg,{className:`${z}-menu-submenu-arrow-icon`})),mode:`vertical`,selectable:!1,onClick:K,validator:({mode:e})=>{}},r)},[ce,q]=Yd(`Dropdown`,F.zIndex),le=S.createElement($w,{alignPoint:ne,...Sr(e,[`rootClassName`,`onOpenChange`]),mouseEnterDelay:h,mouseLeaveDelay:g,visible:re,builtinPlacements:oe,arrow:!!n,overlayClassName:G,prefixCls:z,getPopupContainer:l||D,transitionName:L,trigger:te,overlay:se,placement:R,onVisibleChange:ae,overlayStyle:{...F,zIndex:ce},autoDestroy:w??C},ee);return ce&&(le=S.createElement(Ud.Provider,{value:q},le)),le},Zee=ux(JE,`align`,void 0,`dropdown`,e=>e);JE._InternalPanelDoNotUseOrYouWillBeFired=e=>S.createElement(Zee,{...e},S.createElement(`span`,null));var YE=Zg,XE=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e){(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekday=r()})(e,(function(){return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,n=this.$W,r=(n{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_localeData=r()})(e,(function(){return function(e,t,n){var r=t.prototype,i=function(e){return e&&(e.indexOf?e:e.s)},a=function(e,t,n,r,a){var o=e.name?e:e.$locale(),s=i(o[t]),c=i(o[n]),l=s||c.map((function(e){return e.slice(0,r)}));if(!a)return l;var u=o.weekStart;return l.map((function(e,t){return l[(t+(u||0))%7]}))},o=function(){return n.Ls[n.locale()]},s=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}(e.formats[t.toUpperCase()])},c=function(){var e=this;return{months:function(t){return t?t.format(`MMMM`):a(e,`months`)},monthsShort:function(t){return t?t.format(`MMM`):a(e,`monthsShort`,`months`,3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format(`dddd`):a(e,`weekdays`)},weekdaysMin:function(t){return t?t.format(`dd`):a(e,`weekdaysMin`,`weekdays`,2)},weekdaysShort:function(t){return t?t.format(`ddd`):a(e,`weekdaysShort`,`weekdays`,3)},longDateFormat:function(t){return s(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return c.bind(this)()},n.localeData=function(){var e=o();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(t){return s(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return a(o(),`months`)},n.monthsShort=function(){return a(o(),`monthsShort`,`months`,3)},n.weekdays=function(e){return a(o(),`weekdays`,null,null,e)},n.weekdaysShort=function(e){return a(o(),`weekdaysShort`,`weekdays`,3,e)},n.weekdaysMin=function(e){return a(o(),`weekdaysMin`,`weekdays`,2,e)}}}))})),ete=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekOfYear=r()})(e,(function(){var e=`week`,t=`year`;return function(n,r,i){var a=r.prototype;a.week=function(n){if(n===void 0&&(n=null),n!==null)return this.add(7*(n-this.week()),`day`);var r=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var a=i(this).startOf(t).add(1,t).date(r),o=i(this).endOf(e);if(a.isBefore(o))return 1}var s=i(this).startOf(t).date(r).startOf(e).subtract(1,`millisecond`),c=this.diff(s,e,!0);return c<0?i(this).startOf(`week`).week():Math.ceil(c)},a.weeks=function(e){return e===void 0&&(e=null),this.week(e)}}}))})),tte=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekYear=r()})(e,(function(){return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return t===1&&e===11?n+1:e===0&&t>=52?n-1:n}}}))})),nte=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),rte=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),ZE=c(XE()),ite=c(Qee()),ate=c($ee()),ote=c(ete()),ste=c(tte()),cte=c(nte()),lte=c(rte());ZE.default.extend(lte.default),ZE.default.extend(cte.default),ZE.default.extend(ite.default),ZE.default.extend(ate.default),ZE.default.extend(ote.default),ZE.default.extend(ste.default),ZE.default.extend(function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=(e||``).replace(`Wo`,`wo`);return r.bind(this)(t)}});var ute={bn_BD:`bn-bd`,by_BY:`be`,en_GB:`en-gb`,en_US:`en`,fr_BE:`fr`,fr_CA:`fr-ca`,hy_AM:`hy-am`,kmr_IQ:`ku`,nl_BE:`nl-be`,pt_BR:`pt-br`,zh_CN:`zh-cn`,zh_HK:`zh-hk`,zh_TW:`zh-tw`},QE=function(e){return ute[e]||e.split(`_`)[0]},$E=function(e){return!ZE.default.isDayjs(e)||e instanceof ZE.default?e:(0,ZE.default)(e.valueOf())},eD={getNow:function(){var e=(0,ZE.default)();return typeof e.tz==`function`?e.tz():e},getFixedDate:function(e){return(0,ZE.default)(e,[`YYYY-M-DD`,`YYYY-MM-DD`])},getEndDate:function(e){return $E(e).endOf(`month`)},getWeekDay:function(e){var t=$E(e).locale(`en`);return t.weekday()+t.localeData().firstDayOfWeek()},getYear:function(e){return $E(e).year()},getMonth:function(e){return $E(e).month()},getDate:function(e){return $E(e).date()},getHour:function(e){return $E(e).hour()},getMinute:function(e){return $E(e).minute()},getSecond:function(e){return $E(e).second()},getMillisecond:function(e){return $E(e).millisecond()},addYear:function(e,t){return $E(e).add(t,`year`)},addMonth:function(e,t){return $E(e).add(t,`month`)},addDate:function(e,t){return $E(e).add(t,`day`)},setYear:function(e,t){return $E(e).year(t)},setMonth:function(e,t){return $E(e).month(t)},setDate:function(e,t){return $E(e).date(t)},setHour:function(e,t){return $E(e).hour(t)},setMinute:function(e,t){return $E(e).minute(t)},setSecond:function(e,t){return $E(e).second(t)},setMillisecond:function(e,t){return $E(e).millisecond(t)},isAfter:function(e,t){return $E(e).isAfter($E(t))},isValidate:function(e){return $E(e).isValid()},locale:{getWeekFirstDay:function(e){return(0,ZE.default)().locale(QE(e)).localeData().firstDayOfWeek()},getWeekFirstDate:function(e,t){return $E(t).locale(QE(e)).weekday(0)},getWeek:function(e,t){return $E(t).locale(QE(e)).week()},getShortWeekDays:function(e){return(0,ZE.default)().locale(QE(e)).localeData().weekdaysMin()},getShortMonths:function(e){return(0,ZE.default)().locale(QE(e)).localeData().monthsShort()},format:function(e,t,n){return $E(t).locale(QE(e)).format(n)},parse:function(e,t,n){for(var r=QE(e),i=0;ie.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:`0`,r=String(e);r.lengthe.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=kD(S.useState([!1,!1]),2),i=r[0],a=r[1];return[S.useMemo(function(){return i.map(function(r,i){if(r)return!0;var a=e[i];return a?!!(!n[i]&&!a||a&&t(a,{activeIndex:i})):!1})},[e,i,t,n]),function(e,t){a(function(n){return _D(n,t,e)})}]}function ID(e){"@babel/helpers - typeof";return ID=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ID(e)}function LD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function RD(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&(o=t.addDate(o,-7)),o}function DO(e,t){var n=t.generateConfig,r=t.locale,i=t.format;return e?typeof i==`function`?i(e):n.locale.format(r.locale,e,i):``}function OO(e,t,n){var r=t,i=[`getHour`,`getMinute`,`getSecond`,`getMillisecond`];return[`setHour`,`setMinute`,`setSecond`,`setMillisecond`].forEach(function(t,a){r=n?e[t](r,e[i[a]](n)):e[t](r,0)}),r}function kO(e,t,n,r,i){return In(function(a,o){return!!(n&&n(a,o)||r&&e.isAfter(r,a)&&!CO(e,t,r,a,o.type)||i&&e.isAfter(a,i)&&!CO(e,t,i,a,o.type))})}function AO(e){"@babel/helpers - typeof";return AO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},AO(e)}function jO(e,t,n){return S.useMemo(function(){var r=gD(yD(e,t,n)),i=r[0],a=AO(i)===`object`&&i.type===`mask`?i.format:null;return[r.map(function(e){return typeof e==`string`||typeof e==`function`?e:e.format}),a]},[e,t,n])}function MO(e,t,n){return typeof e[0]==`function`||n?!0:t}function NO(e){"@babel/helpers - typeof";return NO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},NO(e)}function PO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function FO(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;return S.useMemo(function(){var n=e&&gD(e);return t&&n&&(n[1]=n[1]||n[0]),n},[e,t])}function $O(e,t){var n=e.generateConfig,r=e.locale,i=e.picker,a=i===void 0?`date`:i,o=e.prefixCls,s=o===void 0?`rc-picker`:o,c=e.previewValue,l=c===void 0?`hover`:c,u=e.styles,d=u===void 0?{}:u,f=e.classNames,p=f===void 0?{}:f,m=e.order,h=m===void 0?!0:m,g=e.components,_=g===void 0?{}:g,v=e.inputRender,y=e.allowClear,b=e.clearIcon,x=e.needConfirm,C=e.multiple,w=e.format,T=e.inputReadOnly,E=e.disabledDate,D=e.minDate,O=e.maxDate,k=e.showTime,A=e.value,j=e.defaultValue,M=e.pickerValue,N=e.defaultPickerValue,P=QO(A),F=QO(j),I=QO(M),L=QO(N),R=a===`date`&&k?`datetime`:a,z=R===`time`||R===`datetime`,B=z||C,V=x??z,H=KO(lO(e),4),U=H[0],W=H[1],ee=H[2],te=H[3],ne=WD(r,W),re=S.useMemo(function(){return uO(R,ee,te,U,ne)},[R,ee,te,U,ne]),ie=S.useMemo(function(){return HO(HO({},e),{},{previewValue:l,prefixCls:s,locale:ne,picker:a,styles:d,classNames:p,order:h,components:HO({input:v},_),clearIcon:fO(s,y,b),showTime:re,value:P,defaultValue:F,pickerValue:I,defaultPickerValue:L},t?.())},[e]),ae=KO(jO(R,ne,w),2),G=ae[0],oe=ae[1],K=MO(G,T,C),se=kO(n,r,E,D,O),ce=zO(n,a,se,re);return[S.useMemo(function(){return HO(HO({},ie),{},{needConfirm:V,inputReadOnly:K,disabledDate:se})},[ie,V,K,se]),R,B,G,oe,ce]}function ek(e,t){return ak(e)||ik(e,t)||nk(e,t)||tk()}function tk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nk(e,t){if(e){if(typeof e==`string`)return rk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rk(e,t)}}function rk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,i=sk(ok(n.every(function(e){return e})?!1:e,t||!1,r),2),a=i[0],o=i[1];function s(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!t.inherit||a)&&o(e,t.force)}return[a,s]}function mk(e){var t=S.useRef();return S.useImperativeHandle(e,function(){return{nativeElement:t.current?.nativeElement,focus:function(e){var n;(n=t.current)==null||n.focus(e)},blur:function(){var e;(e=t.current)==null||e.blur()}}}),t}function hk(e,t){return bk(e)||yk(e,t)||_k(e,t)||gk()}function gk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _k(e,t){if(e){if(typeof e==`string`)return vk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vk(e,t)}}function vk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=S.useRef(t);r.current=t,Bn(function(){if(e)r.current(e);else{var t=ri(function(){r.current(e)},n);return function(){ri.cancel(t)}}},[e])}function Ck(e,t){return Ok(e)||Dk(e,t)||Tk(e,t)||wk()}function wk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tk(e,t){if(e){if(typeof e==`string`)return Ek(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ek(e,t)}}function Ek(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=Ck(S.useState(0),2),i=r[0],a=r[1],o=Ck(S.useState(!1),2),s=o[0],c=o[1],l=S.useRef([]),u=S.useRef(null),d=S.useRef(null),f=function(e){u.current=e};return Sk(s||n,function(){s||(l.current=[],f(null))}),S.useEffect(function(){s&&l.current.push(i)},[s,i]),[s,function(e){c(e)},function(e){return e&&(d.current=e),d.current},i,a,function(n){var r=l.current,i=new Set(r.filter(function(e){return n[e]||t[e]})),a=+(r[r.length-1]===0);return i.size>=2||e[a]?null:a},l.current,f,function(e){return u.current===e}]}function Ak(e){"@babel/helpers - typeof";return Ak=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ak(e)}function jk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mk(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n8&&arguments[8]!==void 0?arguments[8]:Xk,l=arguments.length>9&&arguments[9]!==void 0?arguments[9]:Xk,u=arguments.length>10&&arguments[10]!==void 0?arguments[10]:Xk,d=arguments.length>11?arguments[11]:void 0,f=arguments.length>12?arguments[12]:void 0,p=arguments.length>13?arguments[13]:void 0,m=o===`time`,h=a||0,g=function(t){var r=e.getNow();return m&&(r=OO(e,r)),c[t]||n[t]||r},_=Uk(l,2),v=_[0],y=_[1],b=Uk(Hn(function(){return g(0)},v),2),x=b[0],C=b[1],w=Uk(Hn(function(){return g(1)},y),2),T=w[0],E=w[1],D=S.useMemo(function(){var t=[x,T][h];return m?t:OO(e,t,u[h])},[m,x,T,h,e,u]),O=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`panel`,a=[C,E][h];a(n);var s=[x,T];s[h]=n,d&&(!CO(e,t,x,s[0],o)||!CO(e,t,T,s[1],o))&&d(s,{source:i,range:h===1?`end`:`start`,mode:r})},k=function(n,r){if(s){var i={date:`month`,week:`month`,month:`year`,quarter:`year`}[o];if(i&&!CO(e,t,n,r,i)||o===`year`&&n&&Math.floor(e.getYear(n)/10)!==Math.floor(e.getYear(r)/10))return Yk(e,o,r,-1)}return r},A=S.useRef(null);return zn(function(){if(i&&!c[h]){var t=m?null:e.getNow();if(A.current!==null&&A.current!==h?t=[x,T][h^1]:n[h]?t=h===0?n[0]:k(n[0],n[1]):n[h^1]&&(t=n[h^1]),t){f&&e.isAfter(f,t)&&(t=f);var r=s?Yk(e,o,t,1):t;p&&e.isAfter(r,p)&&(t=s?Yk(e,o,p,-1):p),O(t,`reset`)}}},[i,h,n[h]]),S.useEffect(function(){i?A.current=h:A.current=null},[i,h]),zn(function(){i&&c&&c[h]&&O(c[h],`reset`)},[i,h]),[D,O]}function Qk(e,t){return rA(e)||nA(e,t)||eA(e,t)||$k()}function $k(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eA(e,t){if(e){if(typeof e==`string`)return tA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tA(e,t)}}function tA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:2,o=[],s=n>=1?n|0:1,c=e;c<=t;c+=s){var l=i.includes(c);(!l||!r)&&o.push({label:hD(c,a),value:c,disabled:l})}return o}function UA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t||{},i=r.use12Hours,a=r.hourStep,o=a===void 0?1:a,s=r.minuteStep,c=s===void 0?1:s,l=r.secondStep,u=l===void 0?1:l,d=r.millisecondStep,f=d===void 0?100:d,p=r.hideDisabledOptions,m=r.disabledTime,h=r.disabledHours,g=r.disabledMinutes,_=r.disabledSeconds,v=S.useMemo(function(){return n||e.getNow()},[n,e]),y=S.useCallback(function(e){var t=m?.(e)||{};return[t.disabledHours||h||VA,t.disabledMinutes||g||VA,t.disabledSeconds||_||VA,t.disabledMilliseconds||VA]},[m,h,g,_]),b=FA(S.useMemo(function(){return y(v)},[v,y]),4),x=b[0],C=b[1],w=b[2],T=b[3],E=S.useCallback(function(e,t,n,r){var a=HA(0,23,o,p,e());return[i?a.map(function(e){return jA(jA({},e),{},{label:hD(e.value%12||12,2)})}):a,function(e){return HA(0,59,c,p,t(e))},function(e,t){return HA(0,59,u,p,n(e,t))},function(e,t,n){return HA(0,999,f,p,r(e,t,n),3)}]},[p,o,i,f,c,u]),D=FA(S.useMemo(function(){return E(x,C,w,T)},[E,x,C,w,T]),4),O=D[0],k=D[1],A=D[2],j=D[3];return[function(t,n){var r=function(){return O},i=k,a=A,o=j;if(n){var s=FA(y(n),4),c=s[0],l=s[1],u=s[2],d=s[3],f=FA(E(c,l,u,d),4),p=f[0],m=f[1],h=f[2],g=f[3];r=function(){return p},i=m,a=h,o=g}return OA(t,r,i,a,o,e)},O,k,A,j]}function WA(e,t){return YA(e)||JA(e,t)||KA(e,t)||GA()}function GA(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KA(e,t){if(e){if(typeof e==`string`)return qA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qA(e,t)}}function qA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;fe(e),_?.(e),t&&pe(e)},he=function(e,t){ie(e),t&&me(t),pe(t,e)},ge=function(e){if(le(e),me(e),re!==x){var t=[`decade`,`year`],n=[].concat(t,[`month`]),r={quarter:[].concat(t,[`quarter`]),week:[].concat(LN(n),[`week`]),date:[].concat(LN(n),[`date`])}[x]||n,i=r[r.indexOf(re)+1];i&&he(i,e)}},_e=S.useMemo(function(){var e,t;if(Array.isArray(T)){var n=VN(T,2);e=n[0],t=n[1]}else e=T;return!e&&!t?null:(e||=t,t||=e,a.isAfter(e,t)?[t,e]:[e,t])},[T,a]),ve=OD(E,D,O),ye=A[ae]||qN[ae]||Fj,be=S.useMemo(function(){return{classNames:P?.popup??n??{},styles:F?.popup??r??{}}},[P,n,F,r]),xe=S.useContext(cj),Se=S.useMemo(function(){return NN(NN({},xe),{},{hideHeader:j})},[xe,j]),Ce=`${I}-panel`,we=vD(e,[`showWeek`,`prevIcon`,`nextIcon`,`superPrevIcon`,`superNextIcon`,`disabledDate`,`minDate`,`maxDate`,`onHover`]);return S.createElement(ij.Provider,{value:be},S.createElement(cj.Provider,{value:Se},S.createElement(`div`,{ref:L,tabIndex:l,className:J(Ce,PN({},`${Ce}-rtl`,o===`rtl`))},S.createElement(ye,jN({},we,{showTime:ee,prefixCls:I,locale:U,generateConfig:a,onModeChange:he,pickerValue:de,onPickerValueChange:function(e){me(e,!0)},value:ce[0],onSelect:ge,values:ce,cellRender:ve,hoverRangeValue:_e,hoverValue:w})))))}var YN=S.memo(S.forwardRef(JN));function XN(e){"@babel/helpers - typeof";return XN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},XN(e)}function ZN(){return ZN=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function NP(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function PP(e){var t=e.icon,n=e.type,r=MP(e,kP),i=S.useContext(nD),a=i.prefixCls,o=i.classNames,s=i.styles;return t?S.createElement(`span`,jP({className:J(`${a}-${n}`,o.suffix),style:s.suffix},r),t):null}function FP(e){var t=e.onClear,n=MP(e,AP);return S.createElement(PP,jP({},n,{type:`clear`,role:`button`,onMouseDown:function(e){e.preventDefault()},onClick:function(e){e.stopPropagation(),t()}}))}function IP(e){"@babel/helpers - typeof";return IP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},IP(e)}function LP(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function RP(e,t){for(var n=0;n=a&&e<=o)return r;var s=Math.min(Math.abs(e-a),Math.abs(e-o));se.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var sF=S.forwardRef(function(e,t){var n=e.className,r=e.active,i=e.showActiveCls,a=i===void 0?!0:i,o=e.suffixIcon,s=e.format,c=e.validateFormat,l=e.onChange;e.onInput;var u=e.helped,d=e.onHelp,f=e.onSubmit,p=e.onKeyDown,m=e.preserveInvalidOnBlur,h=m===void 0?!1:m,g=e.invalid,_=e.clearIcon,v=aF(e,JP),y=e.value,b=e.onFocus,x=e.onBlur,C=e.onMouseUp,w=S.useContext(nD),T=w.prefixCls,E=w.input,D=E===void 0?`input`:E,O=w.classNames,k=w.styles,A=`${T}-input`,j=$P(S.useState(!1),2),M=j[0],N=j[1],P=$P(S.useState(y),2),F=P[0],I=P[1],L=$P(S.useState(``),2),R=L[0],z=L[1],B=$P(S.useState(null),2),V=B[0],H=B[1],U=$P(S.useState(null),2),W=U[0],ee=U[1],te=F||``;S.useEffect(function(){I(y)},[y]);var ne=S.useRef(null),re=S.useRef(null),ie=S.useRef(!1);S.useImperativeHandle(t,function(){return{nativeElement:ne.current,inputElement:re.current,focus:function(e){re.current.focus(e)},blur:function(){re.current.blur()}}});var ae=S.useMemo(function(){return new GP(s||``)},[s]),G=$P(S.useMemo(function(){return u?[0,0]:ae.getSelection(V)},[ae,V,u]),2),oe=G[0],K=G[1],se=function(e){e&&e!==s&&e!==y&&d()},ce=In(function(e){c(e)&&l(e),I(e),se(e)}),q=function(e){if(!s){var t=e.target.value;se(t),I(t),l(t)}},le=function(e){if(ie.current){e.preventDefault();return}var t=e.clipboardData.getData(`text`);c(t)&&ce(t)},ue=function(){ie.current=!0},de=function(e){var t=e.target.selectionStart;H(ae.getMaskCellIndex(t)),ee({}),C?.(e),ie.current=!1},fe=function(e){N(!0),H(0),z(``),b(e)},pe=function(e){x(e)},me=function(e){N(!1),pe(e)};Sk(r,function(){!r&&!h&&I(y)});var he=function(e){e.key===`Enter`&&c(te)&&f(),p?.(e)},ge=function(e){if(ie.current){e.preventDefault();return}he(e);var t=e.key,n=null,r=null,i=K-oe,a=s.slice(oe,K),o=function(e){H(function(t){var n=t+e;return n=Math.max(n,0),n=Math.min(n,ae.size()-1),n})},c=function(e){var t=$P(KP(a),3),n=t[0],r=t[1],i=t[2],o=te.slice(oe,K),s=Number(o);if(isNaN(s))return String(i||(e>0?n:r));var c=s+e,l=r-n+1;return String(n+(l+c-n)%l)};switch(t){case`Backspace`:case`Delete`:n=``,r=a;break;case`ArrowLeft`:n=``,o(-1);break;case`ArrowRight`:n=``,o(1);break;case`ArrowUp`:n=``,r=c(1);break;case`ArrowDown`:n=``,r=c(-1);break;default:isNaN(Number(t))||(n=R+t,r=n);break}n!==null&&(z(n),n.length>=i&&(o(1),z(``))),r!==null&&ce((te.slice(0,oe)+hD(r,i)+te.slice(K)).slice(0,s.length)),ee({})},_e=S.useRef();zn(function(){if(!(!M||!s||ie.current)){if(!ae.match(te)){ce(s);return}return re.current.setSelectionRange(oe,K),_e.current=ri(function(){re.current.setSelectionRange(oe,K)}),function(){ri.cancel(_e.current)}}},[ae,s,M,te,V,oe,K,W,ce]);var ve=s?{onFocus:fe,onBlur:me,onKeyDown:ge,onMouseDown:ue,onMouseUp:de,onPaste:le}:{};return S.createElement(`div`,{ref:ne,className:J(A,XP(XP({},`${A}-active`,r&&a),`${A}-placeholder`,u),n)},S.createElement(D,YP({ref:re,"aria-invalid":g,autoComplete:`off`},v,{onKeyDown:he,onBlur:pe},ve,{value:te,onChange:q,className:O.input,style:k.input})),S.createElement(PP,{type:`suffix`,icon:o}),_)}),cF=`id.prefix.clearIcon.suffixIcon.separator.activeIndex.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.value.onChange.onSubmit.onInputChange.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onActiveInfo.placement.onMouseDown.required.aria-required.autoFocus.tabIndex`.split(`.`),lF=[`index`];function uF(){return uF=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function TF(e,t){var n=e.id,r=e.prefix,i=e.clearIcon,a=e.suffixIcon,o=e.separator,s=o===void 0?`~`:o,c=e.activeIndex;e.activeHelp,e.allHelp;var l=e.focused;e.onFocus,e.onBlur,e.onKeyDown,e.locale,e.generateConfig;var u=e.placeholder,d=e.className,f=e.style,p=e.onClick,m=e.onClear,h=e.value;e.onChange,e.onSubmit,e.onInputChange,e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var g=e.disabled,_=e.invalid;e.inputReadOnly;var v=e.direction;e.onOpenChange;var y=e.onActiveInfo;e.placement;var b=e.onMouseDown;e.required,e[`aria-required`];var x=e.autoFocus,C=e.tabIndex,w=CF(e,cF),T=v===`rtl`,E=S.useContext(nD),D=E.prefixCls,O=E.classNames,k=E.styles,A=S.useMemo(function(){if(typeof n==`string`)return[n];var e=n||{};return[e.start,e.end]},[n]),j=S.useRef(),M=S.useRef(),N=S.useRef(),P=function(e){return[M,N][e]?.current};S.useImperativeHandle(t,function(){return{nativeElement:j.current,focus:function(e){if(SF(e)===`object`){var t,n=e||{},r=n.index,i=r===void 0?0:r,a=CF(n,lF);(t=P(i))==null||t.focus(a)}else{var o;(o=P(e??0))==null||o.focus()}},blur:function(){var e,t;(e=P(0))==null||e.blur(),(t=P(1))==null||t.blur()}}});var F=OP(w),I=S.useMemo(function(){return Array.isArray(u)?u:[u,u]},[u]),L=gF(EP(fF(fF({},e),{},{id:A,placeholder:I})),1)[0],R=gF(S.useState({position:`absolute`,width:0}),2),z=R[0],B=R[1],V=In(function(){var e=P(c);if(e){var t=e.nativeElement.getBoundingClientRect(),n=j.current.getBoundingClientRect(),r=t.left-n.left;B(function(e){return fF(fF({},e),{},{width:t.width,left:r})}),y([t.left,t.right,n.width])}});S.useEffect(function(){V()},[c]);var H=i&&(h[0]&&!g[0]||h[1]&&!g[1]),U=x&&!g[0],W=x&&!U&&!g[1];return S.createElement(Wr,{onResize:V},S.createElement(`div`,uF({},F,{className:J(D,`${D}-range`,pF(pF(pF(pF({},`${D}-focused`,l),`${D}-disabled`,g.every(function(e){return e})),`${D}-invalid`,_.some(function(e){return e})),`${D}-rtl`,T),d),style:f,ref:j,onClick:p,onMouseDown:function(e){var t=e.target;t!==M.current.inputElement&&t!==N.current.inputElement&&e.preventDefault(),b?.(e)}}),r&&S.createElement(`div`,{className:J(`${D}-prefix`,O.prefix),style:k.prefix},r),S.createElement(sF,uF({ref:M},L(0),{className:`${D}-input-start`,autoFocus:U,tabIndex:C,"date-range":`start`})),S.createElement(`div`,{className:`${D}-range-separator`},s),S.createElement(sF,uF({ref:N},L(1),{className:`${D}-input-end`,autoFocus:W,tabIndex:C,"date-range":`end`})),S.createElement(`div`,{className:`${D}-active-bar`,style:z}),S.createElement(PP,{type:`suffix`,icon:a}),H&&S.createElement(FP,{icon:i,onClear:m})))}var EF=S.forwardRef(TF);function DF(e){"@babel/helpers - typeof";return DF=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},DF(e)}function OF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kF(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0&&G.current.focus({index:n})}ue(!0),ae?.(e)},Qe=function(){Be(null),ue(!1,{force:!0})},$e=GF(S.useState(null),2),et=$e[0],tt=$e[1],nt=GF(S.useState(null),2),rt=nt[0],it=nt[1],at=S.useMemo(function(){return rt||_e},[_e,rt]);S.useEffect(function(){q||it(null)},[q]);var ot=GF(S.useState([0,0,0]),2),st=ot[0],ct=ot[1],lt=function(e,t){p===`hover`&&(it(e),tt(t))},ut=xk(W,ee),dt=function(e){lt(e,`preset`)},ft=function(e){Be(e)&&(xe(`preset-click`),ue(!1,{force:!0}))},pt=function(e){Xe(e)},mt=function(e){lt(e?Ye(e,Se):null,`cell`)},ht=function(e){ue(!0),Oe(e)},gt=function(){xe(`panel`)},_t=function(e){he(_D(_e,Se,e)),!g&&!a&&i===Fe&&Xe(e)},vt=function(){ue(!1)},yt=OD(ne,re,ie,QF(Se)),bt=_e[Se]||null,xt=In(function(e){return c(e,{activeIndex:Se})}),St=S.useMemo(function(){var e=Vu(r,!1);return Sr(r,[].concat(IF(Object.keys(e)),[`onChange`,`onCalendarChange`,`style`,`className`,`onPanelChange`,`disabledTime`,`classNames`,`styles`]))},[r]),Ct=S.createElement(yP,FF({},St,{showNow:Le,showTime:Ae,range:!0,multiplePanel:Ie,activeInfo:st,disabledDate:Ve,onFocus:ht,onBlur:ke,onPanelMouseDown:gt,picker:k,mode:Pe,internalMode:Fe,onPanelChange:Je,format:s,value:bt,isInvalid:xt,onChange:null,onSelect:_t,pickerValue:Ke,defaultOpenValue:gD(M?.defaultOpenValue)[Se],onPickerValueChange:qe,hoverValue:at,onHover:mt,needConfirm:g,onSubmit:Xe,onOk:ge,presets:ut,onPresetHover:dt,onPresetSubmit:ft,onNow:pt,cellRender:yt,classNames:K,styles:se})),wt=function(e,t){he(Ye(e,t))},Tt=function(){xe(`input`)},Et=function(e,t){var n=Te.length,r=Te[n-1];if(n&&r!==t&&g&&!y[r]&&!De(r)&&_e[r]){G.current.focus({index:r});return}xe(`input`),ue(!0,{inherit:!0}),Se!==t&&q&&!g&&a&&Xe(null,!0),Ce(t),Oe(e,t)},Dt=function(e,t){ue(!1),!g&&xe()===`input`&&ze(Se,we(_e)===null),ke(e,t)},Ot=function(e,t){e.key===`Tab`&&Xe(null,!0),_?.(e,t)},kt=S.useMemo(function(){return{prefixCls:l,locale:D,generateConfig:O,button:te.button,input:te.input,classNames:K,styles:se}},[l,D,O,te.button,te.input,K,se]);return zn(function(){q&&Se!==void 0&&Je(null,k,!1)},[q,Se,k]),zn(function(){var e=xe();!q&&e===`input`&&(ue(!1),Xe(null,!0)),!q&&a&&!g&&e===`panel`&&(ue(!0),Xe())},[q]),S.createElement(nD.Provider,{value:kt},S.createElement(cD,FF({},xD(r),{popupElement:Ct,popupStyle:se.popup.root,popupClassName:J(u,K.popup.root),visible:q,onClose:vt,range:!0}),S.createElement(EF,FF({},r,{ref:G,className:J(r.className,u,K.root),style:VF(VF({},se.root),r.style),suffixIcon:V,activeIndex:ye||q?Se:null,activeHelp:!!rt,allHelp:!!rt&&et===`preset`,focused:ye,onFocus:Et,onBlur:Dt,onKeyDown:Ot,onSubmit:Xe,value:at,maskFormat:s,onChange:wt,onInputChange:Tt,format:o,inputReadOnly:B,disabled:v,open:q,onOpenChange:ue,onClick:Ze,onClear:Qe,invalid:Ue,onInvalid:We,onActiveInfo:ct}))))}var eI=S.forwardRef($F);function tI(e){var t=e.prefixCls,n=e.value,r=e.onRemove,i=e.removeIcon,a=i===void 0?`×`:i,o=e.formatDate,s=e.disabled,c=e.maxTagCount,l=e.placeholder,u=`${t}-selector`,d=`${t}-selection`,f=`${d}-overflow`;function p(e,t){return S.createElement(`span`,{className:J(`${d}-item`),title:typeof e==`string`?e:null},S.createElement(`span`,{className:`${d}-item-content`},e),!s&&t&&S.createElement(`span`,{onMouseDown:function(e){e.preventDefault()},onClick:t,className:`${d}-item-remove`},a))}function m(e){return p(o(e),function(t){t&&t.stopPropagation(),r(e)})}function h(e){return p(`+ ${e.length} ...`)}return S.createElement(`div`,{className:u},S.createElement(eS,{prefixCls:f,data:n,renderItem:m,renderRest:h,itemKey:function(e){return o(e)},maxCount:c}),!n.length&&S.createElement(`span`,{className:`${t}-selection-placeholder`},l))}function nI(e){"@babel/helpers - typeof";return nI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},nI(e)}var rI=`id.open.prefix.clearIcon.suffixIcon.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.internalPicker.value.onChange.onSubmit.onInputChange.multiple.maxTagCount.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onMouseDown.required.aria-required.autoFocus.tabIndex.removeIcon`.split(`.`);function iI(){return iI=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _I(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function vI(e,t){e.id;var n=e.open,r=e.prefix,i=e.clearIcon,a=e.suffixIcon;e.activeHelp,e.allHelp;var o=e.focused;e.onFocus,e.onBlur,e.onKeyDown;var s=e.locale,c=e.generateConfig,l=e.placeholder,u=e.className,d=e.style,f=e.onClick,p=e.onClear,m=e.internalPicker,h=e.value,g=e.onChange,_=e.onSubmit;e.onInputChange;var v=e.multiple,y=e.maxTagCount;e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var b=e.disabled,x=e.invalid;e.inputReadOnly;var C=e.direction;e.onOpenChange;var w=e.onMouseDown;e.required,e[`aria-required`];var T=e.autoFocus,E=e.tabIndex,D=e.removeIcon,O=gI(e,rI),k=C===`rtl`,A=S.useContext(nD),j=A.prefixCls,M=A.classNames,N=A.styles,P=S.useRef(),F=S.useRef();S.useImperativeHandle(t,function(){return{nativeElement:P.current,focus:function(e){var t;(t=F.current)==null||t.focus(e)},blur:function(){var e;(e=F.current)==null||e.blur()}}});var I=OP(O),L=function(e){g([e])},R=function(e){g(h.filter(function(t){return t&&!CO(c,s,t,e,m)})),n||_()},z=uI(EP(oI(oI({},e),{},{onChange:L}),function(e){return{value:e.valueTexts[0]||``,active:o}}),2),B=z[0],V=z[1],H=!!(i&&h.length&&!b),U=v?S.createElement(S.Fragment,null,S.createElement(tI,{prefixCls:j,value:h,onRemove:R,formatDate:V,maxTagCount:y,disabled:b,removeIcon:D,placeholder:l}),S.createElement(`input`,{className:`${j}-multiple-input`,value:h.map(V).join(`,`),ref:F,readOnly:!0,autoFocus:T,tabIndex:E}),S.createElement(PP,{type:`suffix`,icon:a}),H&&S.createElement(FP,{icon:i,onClear:p})):S.createElement(sF,iI({ref:F},B(),{autoFocus:T,tabIndex:E,suffixIcon:a,clearIcon:H&&S.createElement(FP,{icon:i,onClear:p}),showActiveCls:!1}));return S.createElement(`div`,iI({},I,{className:J(j,sI(sI(sI(sI(sI({},`${j}-multiple`,v),`${j}-focused`,o),`${j}-disabled`,b),`${j}-invalid`,x),`${j}-rtl`,k),u),style:d,ref:P,onClick:f,onMouseDown:function(e){e.target!==F.current?.inputElement&&e.preventDefault(),w?.(e)}}),r&&S.createElement(`div`,{className:J(`${j}-prefix`,M.prefix),style:N.prefix},r),U)}var yI=S.forwardRef(vI);function bI(e){"@babel/helpers - typeof";return bI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},bI(e)}function xI(){return xI=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne??{...t,__INTERNAL__:{itemRef:e=>t=>{let r=WI(e);t?n.current[r]=t:delete n.current[r]}},scrollToField:(e,t={})=>{let{focus:n,...i}=t,a=GI(e,r);a&&(hf(a,{scrollMode:`if-needed`,block:`nearest`,...i}),n&&r.focusField(e))},focusField:e=>{let t=r.getFieldInstance(e);typeof t?.focus==`function`?t.focus():GI(e,r)?.focus?.()},getFieldInstance:e=>{let t=WI(e);return n.current[t]}},[e,t]);return[r]}var qI=S.createContext(void 0),JI=qI.Provider,YI=S.createContext(void 0),fte=YI.Provider;function XI(){return XI=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n=`rc-checkbox`,className:r,style:i,checked:a,disabled:o,defaultChecked:s=!1,type:c=`checkbox`,title:l,onChange:u,...d}=e,f=(0,S.useRef)(null),p=(0,S.useRef)(null),[m,h]=Hn(s,a);(0,S.useImperativeHandle)(t,()=>({focus:e=>{f.current?.focus(e)},blur:()=>{f.current?.blur()},input:f.current,nativeElement:p.current}));let g=J(n,r,{[`${n}-checked`]:m,[`${n}-disabled`]:o});return S.createElement(`span`,{className:g,title:l,style:i,ref:p},S.createElement(`input`,XI({},d,{className:`${n}-input`,ref:f,onChange:t=>{o||(`checked`in e||h(t.target.checked),u?.({target:{...e,type:c,checked:t.target.checked},stopPropagation(){t.stopPropagation()},preventDefault(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:o,checked:!!m,type:c})))});function QI(e){let t=S.useRef(null),n=()=>{ri.cancel(t.current),t.current=null};return[()=>{n(),t.current=ri(()=>{t.current=null})},r=>{t.current&&(r.stopPropagation(),n()),e?.(r)}]}var pte=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:{...Jc(e),display:`inline-block`,fontSize:0,[`&${r}-rtl`]:{direction:`rtl`},[`&${r}-block`]:{display:`flex`},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:`none`},"&-vertical":{display:`flex`,flexDirection:`column`,rowGap:e.marginXS,[`${t}-wrapper`]:{marginInlineEnd:0}}}}},mte=e=>{let{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,colorPrimaryHover:i,radioSize:a,motionDurationSlow:o,motionDurationMid:s,motionEaseInOutCirc:c,colorBgContainer:l,colorBorder:u,lineWidth:d,colorBgContainerDisabled:f,colorTextDisabled:p,paddingXS:m,dotColorDisabled:h,dotSize:g,lineType:_,radioColor:v,radioBgColor:y}=e;return{[`${t}-wrapper`]:{...Jc(e),display:`inline-flex`,alignItems:`baseline`,marginInlineStart:0,marginInlineEnd:n,cursor:`pointer`,"&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:`rtl`},"&-disabled":{cursor:`not-allowed`,color:e.colorTextDisabled},"&::after":{display:`inline-block`,width:0,overflow:`hidden`,content:`"\\a0"`},"&-block":{flex:1,justifyContent:`center`},[t]:{...Jc(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:`calc(${a} * 1px)`,height:`calc(${a} * 1px)`,backgroundColor:l,border:`${Y(d)} ${_} ${u}`,borderRadius:`50%`,transition:`all ${s}`,flex:`none`,"&:after":{content:`""`,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%) scale(0)`,width:`calc(${g} * 1px)`,height:`calc(${g} * 1px)`,backgroundColor:v,borderRadius:`50%`,transformOrigin:`50% 50%`,opacity:0,transition:`all ${o} ${c}`},[`${t}-input`]:{position:`absolute`,inset:0,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:Zc(e)},[`&:hover:not(${t}-wrapper-disabled) ${t}`]:{borderColor:r},[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:i,borderColor:`transparent`},[`${t}-checked`]:{backgroundColor:y,borderColor:r,"&::after":{transform:`translate(-50%, -50%)`,opacity:1}},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:f,borderColor:u,"&::after":{backgroundColor:h}},[`${t}-disabled + span`]:{color:p,cursor:`not-allowed`},[`span${t} + *`]:{paddingInlineStart:m,paddingInlineEnd:m}}}},hte=e=>{let{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:i,lineType:a,colorBorder:o,motionDurationMid:s,buttonPaddingInline:c,fontSize:l,buttonBg:u,fontSizeLG:d,controlHeightLG:f,controlHeightSM:p,paddingXS:m,borderRadius:h,borderRadiusSM:g,borderRadiusLG:_,buttonCheckedBg:v,buttonSolidCheckedColor:y,colorTextDisabled:b,colorBgContainerDisabled:x,buttonCheckedBgDisabled:S,buttonCheckedColorDisabled:C,colorPrimary:w,colorPrimaryHover:T,colorPrimaryActive:E,buttonSolidCheckedBg:D,buttonSolidCheckedHoverBg:O,buttonSolidCheckedActiveBg:k,calc:A}=e;return{[`${r}-button-wrapper`]:{position:`relative`,display:`inline-block`,height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:l,lineHeight:Y(A(n).sub(A(i).mul(2)).equal()),background:u,border:`${Y(i)} ${a} ${o}`,borderBlockStartWidth:A(i).add(.02).equal(),borderInlineEndWidth:i,cursor:`pointer`,transition:[`color`,`background-color`,`box-shadow`].map(e=>`${e} ${s}`).join(`,`),a:{color:t},[`> ${r}-button`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:`100%`,height:`100%`},"&:not(:last-child)":{marginInlineEnd:A(i).mul(-1).equal()},"&:first-child":{borderInlineStart:`${Y(i)} ${a} ${o}`,borderStartStartRadius:h,borderEndStartRadius:h},"&:last-child":{borderStartEndRadius:h,borderEndEndRadius:h},"&:first-child:last-child":{borderRadius:h},[`${r}-group-large &`]:{height:f,fontSize:d,lineHeight:Y(A(f).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:_,borderEndStartRadius:_},"&:last-child":{borderStartEndRadius:_,borderEndEndRadius:_}},[`${r}-group-small &`]:{height:p,paddingInline:A(m).sub(i).equal(),paddingBlock:0,lineHeight:Y(A(p).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g}},"&:hover":{position:`relative`,color:w},"&:has(:focus-visible)":Zc(e),[`${r}, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:`none`},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:w,background:v,borderColor:w,"&::before":{backgroundColor:w},"&:first-child":{borderColor:w},"&:hover":{color:T,borderColor:T,"&::before":{backgroundColor:T}},"&:active":{color:E,borderColor:E,"&::before":{backgroundColor:E}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:y,background:D,borderColor:D,"&:hover":{color:y,background:O,borderColor:O},"&:active":{color:y,background:k,borderColor:k}},"&-disabled":{color:b,backgroundColor:x,borderColor:o,cursor:`not-allowed`,"&:first-child, &:hover":{color:b,backgroundColor:x,borderColor:o}},[`&-disabled${r}-button-wrapper-checked`]:{color:C,backgroundColor:S,borderColor:o,boxShadow:`none`},"&-block":{flex:1,textAlign:`center`}}}},$I=rl(`Radio`,e=>{let{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${Y(n)} ${t}`,i=gs(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[pte(i),mte(i),hte(i)]},e=>{let{wireframe:t,padding:n,marginXS:r,lineWidth:i,fontSizeLG:a,colorText:o,colorBgContainer:s,colorTextDisabled:c,controlItemBgActiveDisabled:l,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:f,colorPrimaryActive:p,colorWhite:m}=e,h=a;return{radioSize:h,dotSize:t?h-8:h-(4+i)*2,dotColorDisabled:c,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:p,buttonBg:s,buttonCheckedBg:s,buttonColor:o,buttonCheckedBgDisabled:l,buttonCheckedColorDisabled:c,buttonPaddingInline:n-i,wrapperMarginInlineEnd:r,radioColor:t?d:m,radioBgColor:t?s:d}},{unitless:{radioSize:!0,dotSize:!0}}),eL=S.forwardRef((e,t)=>{let n=S.useContext(qI),r=S.useContext(YI),{getPrefixCls:i,direction:a,className:o,style:s,classNames:c,styles:l}=li(`radio`),u=$n(t,S.useRef(null)),{isFormItemInput:d}=S.useContext(Sy),f=t=>{e.onChange?.(t),n?.onChange?.(t)},{prefixCls:p,className:m,rootClassName:h,children:g,style:_,title:v,classNames:y,styles:b,...x}=e,C=i(`radio`,p),w=(n?.optionType||r)===`button`,T=w?`${C}-button`:C,E=bf(C),[D,O]=$I(C,E),k={...x},A=S.useContext(zp),j=k.checked;n&&(k.name=n.name,k.onChange=f,j=e.value===n.value,k.disabled=k.disabled??n.disabled),k.disabled=k.disabled??A;let M={...e,...k,checked:j},[N,P]=Fd([c,y],[l,b],{props:M}),F=J(`${T}-wrapper`,{[`${T}-wrapper-checked`]:j,[`${T}-wrapper-disabled`]:k.disabled,[`${T}-wrapper-rtl`]:a===`rtl`,[`${T}-wrapper-in-form-item`]:d,[`${T}-wrapper-block`]:!!n?.block},o,m,h,N.root,D,O,E),[I,L]=QI(k.onClick);return S.createElement(eh,{component:`Radio`,disabled:k.disabled},S.createElement(`label`,{className:F,style:{...P.root,...s,..._},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:v,onClick:I},S.createElement(ZI,{...k,checked:j,className:J(N.icon,{[qm]:!w}),style:P.icon,type:`radio`,prefixCls:T,ref:u,onClick:L}),g===void 0?null:S.createElement(`span`,{className:J(`${T}-label`,N.label),style:P.label},g)))}),gte=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=S.useContext(oi),{name:i}=S.useContext(Sy),a=zf(WI(i)),{prefixCls:o,className:s,rootClassName:c,options:l,buttonStyle:u=`outline`,disabled:d,children:f,size:p,style:m,id:h,optionType:g,name:_=a,defaultValue:v,value:y,block:b=!1,onChange:x,onMouseEnter:C,onMouseLeave:w,onFocus:T,onBlur:E,orientation:D,vertical:O,role:k=`radiogroup`}=e,[A,j]=Hn(v,y),M=S.useCallback(t=>{let n=A,r=t.target.value;`value`in e||j(r),r!==n&&x?.(t)},[A,j,x]),N=n(`radio`,o),P=`${N}-group`,F=bf(N),[I,L]=$I(N,F),R=f;l&&l.length>0&&(R=l.map(e=>typeof e==`string`||pd(e)?S.createElement(eL,{key:e.toString(),prefixCls:N,disabled:d,value:e,checked:A===e},e):S.createElement(eL,{key:`radio-group-value-options-${e.value}`,prefixCls:N,disabled:e.disabled||d,value:e.value,checked:A===e.value,title:e.title,style:e.style,className:e.className,id:e.id,required:e.required},e.label)));let z=th(p),[,B]=Rd(D,O),V=J(P,`${P}-${u}`,{[`${P}-large`]:z===`large`,[`${P}-small`]:z===`small`,[`${P}-rtl`]:r===`rtl`,[`${P}-block`]:b},s,c,I,L,F),H=S.useMemo(()=>({onChange:M,value:A,disabled:d,name:_,optionType:g,block:b}),[M,A,d,_,g,b]);return S.createElement(`div`,{...Vu(e,{aria:!0,data:!0}),role:k,className:J(V,{[`${N}-group-vertical`]:B}),style:m,onMouseEnter:C,onMouseLeave:w,onFocus:T,onBlur:E,id:h,ref:t},S.createElement(JI,{value:H},R))}),_te=S.memo(gte),vte=S.forwardRef((e,t)=>{let{getPrefixCls:n}=S.useContext(oi),{prefixCls:r,...i}=e,a=n(`radio`,r);return S.createElement(fte,{value:`button`},S.createElement(eL,{prefixCls:a,...i,type:`radio`,ref:t}))}),tL=eL;tL.Button=vte,tL.Group=_te,tL.__ANT_RADIO=!0;function nL(e){return gs(e,{inputAffixPadding:e.paddingXXS})}var rL=e=>{let{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:a,controlHeightLG:o,fontSizeLG:s,lineHeightLG:c,paddingSM:l,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:p,colorPrimary:m,controlOutlineWidth:h,controlOutline:g,colorErrorOutline:_,colorWarningOutline:v,colorBgContainer:y,inputFontSize:b,inputFontSizeLG:x,inputFontSizeSM:S}=e,C=b||n,w=S||C,T=x||s,E=Math.round((t-C*r)/2*10)/10-i,D=Math.round((a-w*r)/2*10)/10-i,O=Math.ceil((o-T*c)/2*10)/10-i;return{paddingBlock:Math.max(E,0),paddingBlockSM:Math.max(D,0),paddingBlockLG:Math.max(O,0),paddingInline:l-i,paddingInlineSM:u-i,paddingInlineLG:d-i,addonBg:f,activeBorderColor:m,hoverBorderColor:p,activeShadow:`0 0 0 ${h}px ${g}`,errorActiveShadow:`0 0 0 ${h}px ${_}`,warningActiveShadow:`0 0 0 ${h}px ${v}`,hoverBg:y,activeBg:y,inputFontSize:C,inputFontSizeLG:T,inputFontSizeSM:w}},yte=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),iL=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorderDisabled,boxShadow:`none`,cursor:`not-allowed`,opacity:1,"input[disabled], textarea[disabled]":{cursor:`not-allowed`},"&:hover:not([disabled])":{...yte(gs(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),aL=(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}}),oL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...aL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),sL=(e,t)=>({"&-outlined":{...aL(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...iL(e)},...oL(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...oL(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),cL=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),bte=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...cL(e,{status:`error`,addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...cL(e,{status:`warning`,addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...iL(e)}}}}),lL=(e,t)=>{let{componentCls:n}=e;return{"&-borderless":{background:`transparent`,border:`none`,paddingBlock:e.calc(e.paddingBlock).add(e.lineWidth).equal(),[`&${n}-sm, &${n}-affix-wrapper-sm`]:{paddingBlock:e.calc(e.paddingBlockSM).add(e.lineWidth).equal()},[`&${n}-lg, &${n}-affix-wrapper-lg`]:{paddingBlock:e.calc(e.paddingBlockLG).add(e.lineWidth).equal()},"&: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}}},uL=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:`transparent`,"input&, & input, textarea&, & textarea":{color:t?.inputColor??`unset`},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),dL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...uL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),fL=(e,t)=>({"&-filled":{...uL(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...iL(e)},...dL(e,{status:`error`,bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError}),...dL(e,{status:`warning`,bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning}),...t}}),pL=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),xte=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:`static`}},...pL(e,{status:`error`,addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...pL(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:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),mL=(e,t)=>({background:e.colorBgContainer,borderWidth:`${Y(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),hL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...mL(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`}}),gL=(e,t)=>({"&-underlined":{...mL(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`},...hL(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...hL(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),_L=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:`none`},"&:placeholder-shown":{textOverflow:`ellipsis`}}),vL=e=>{let{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=e;return{padding:`${Y(t)} ${Y(i)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},yL=e=>({padding:`${Y(e.paddingBlockSM)} ${Y(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),bL=(e,t={})=>({position:`relative`,display:`inline-block`,width:`100%`,minWidth:0,padding:`${Y(e.paddingBlock)} ${Y(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,..._L(e.colorTextPlaceholder),"&-lg":{...vL(e),...t.largeStyle},"&-sm":{...yL(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:`rtl`}}),Ste=e=>{let{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`]:{...vL(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...yL(e)},[`&-lg ${n}-select-single`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single`]:{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 ${Y(e.paddingInline)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.inputFontSize,textAlign:`center`,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${Y(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${Y(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{backgroundColor:`inherit`,border:`${Y(e.lineWidth)} ${e.lineType} transparent`,boxShadow:`none`}},[`${n}-cascader-picker`]:{margin:`-9px ${Y(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}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select`]:{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`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:`block`,...Xc(),[`${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},[` + &${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-topRight`]:{animationName:Ih}}},uw(e,h,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${n}`]:{position:`relative`,margin:0},[`${n}-submenu-popup`]:{position:`absolute`,zIndex:r,background:`transparent`,boxShadow:`none`,transformOrigin:`0 0`,"ul, li":{listStyle:`none`,margin:0}},[`${t}, ${t}-menu-submenu`]:{...Jc(e),[n]:{padding:d,listStyleType:`none`,backgroundColor:h,backgroundClip:`padding-box`,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,...Qc(e),"&:empty":{padding:0,boxShadow:`none`},[`${n}-item-group-title`]:{padding:`${Y(l)} ${Y(m)}`,color:e.colorTextDescription,transition:`all ${c}`},[`${n}-item`]:{position:`relative`,display:`flex`,alignItems:`center`},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:`auto`,"&-with-extra":{display:`inline-flex`,alignItems:`center`,width:`100%`},"> a":{color:`inherit`,transition:`all ${c}`,"&:hover":{color:`inherit`},"&::after":{position:`absolute`,inset:0,content:`""`}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:`auto`,fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:{display:`flex`,margin:0,padding:`${Y(l)} ${Y(m)}`,color:e.colorText,fontWeight:`normal`,fontSize:u,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${c}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...Qc(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:`not-allowed`,"&:hover":{color:f,backgroundColor:h,cursor:`not-allowed`},a:{pointerEvents:`none`}},"&-divider":{height:1,margin:`${Y(e.marginXXS)} 0`,overflow:`hidden`,lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:`absolute`,insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:`0 !important`,color:e.colorIcon,fontSize:p,fontStyle:`normal`}}},[`${n}-item-group-list`]:{margin:`0 ${Y(e.marginXS)}`,padding:0,listStyle:`none`},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(m).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:`relative`},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:h,cursor:`not-allowed`}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[Hh(e,`slide-up`),Hh(e,`slide-down`),Mh(e,`move-up`),Mh(e,`move-down`),rg(e,`zoom-big`)]]},Qee=rl(`Dropdown`,e=>{let{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:i}=e,a=gs(e,{menuCls:`${i}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[Zee(a),Xee(a)]},e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...cw({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...ow(e)}),{resetStyle:!1}),KE=e=>{let{menu:t,arrow:n,prefixCls:r,children:i,trigger:a,disabled:o,dropdownRender:s,popupRender:c,getPopupContainer:l,overlayClassName:u,rootClassName:d,overlayStyle:f,open:p,onOpenChange:m,mouseEnterDelay:h=.15,mouseLeaveDelay:g=.1,autoAdjustOverflow:_=!0,placement:v=``,transitionName:y,classNames:b,styles:x,destroyPopupOnHide:C,destroyOnHidden:w}=e,{getPrefixCls:T,direction:E,getPopupContainer:D,className:O,style:k,classNames:A,styles:j}=li(`dropdown`),M={...e,mouseEnterDelay:h,mouseLeaveDelay:g,autoAdjustOverflow:_},[N,P]=Fd([A,b],[j,x],{props:M}),F={...k,...f,...P.root},I=c||s;Dr(`Dropdown`);let L=S.useMemo(()=>{let e=T();return y===void 0?v.includes(`top`)?`${e}-slide-down`:`${e}-slide-up`:y},[T,v,y]),R=S.useMemo(()=>v?v.includes(`Center`)?v.slice(0,v.indexOf(`Center`)):v:E===`rtl`?`bottomRight`:`bottomLeft`,[v,E]),z=T(`dropdown`,r),B=bf(z),[V,H]=Qee(z,B),[,U]=Kc(),W=S.Children.only(vd(i)?S.createElement(`span`,null,i):i),ee=Pp(W,{className:J(`${z}-trigger`,{[`${z}-rtl`]:E===`rtl`},W.props.className),disabled:W.props.disabled??o}),te=o?[]:a,ne=!!te?.includes(`contextMenu`),[re,ie]=Hn(!1,p),ae=In(e=>{m?.(e,{source:`trigger`}),ie(e)}),G=J(u,d,V,H,B,O,N.root,{[`${z}-rtl`]:E===`rtl`}),oe=hw({arrowPointAtCenter:hd(n)&&n.pointAtCenter,autoAdjustOverflow:_,offset:U.marginXXS,arrowWidth:n?U.sizePopupArrow:0,borderRadius:U.borderRadius}),K=In(()=>{t?.selectable&&t?.multiple||(m?.(!1,{source:`menu`}),ie(!1))}),se=()=>{let e=Sr(N,[`root`]),n=Sr(P,[`root`]),r;return t?.items&&(r=S.createElement(GE,{...t,classNames:{...e,subMenu:{...e}},styles:{...n,subMenu:{...n}}})),I&&(r=I(r)),r=S.Children.only(typeof r==`string`?S.createElement(`span`,null,r):r),S.createElement(PE,{prefixCls:`${z}-menu`,rootClassName:J(H,B),expandIcon:S.createElement(`span`,{className:`${z}-menu-submenu-arrow`},E===`rtl`?S.createElement(Hw,{className:`${z}-menu-submenu-arrow-icon`}):S.createElement(mg,{className:`${z}-menu-submenu-arrow-icon`})),mode:`vertical`,selectable:!1,onClick:K,validator:({mode:e})=>{}},r)},[ce,q]=Yd(`Dropdown`,F.zIndex),le=S.createElement(Zw,{alignPoint:ne,...Sr(e,[`rootClassName`,`onOpenChange`]),mouseEnterDelay:h,mouseLeaveDelay:g,visible:re,builtinPlacements:oe,arrow:!!n,overlayClassName:G,prefixCls:z,getPopupContainer:l||D,transitionName:L,trigger:te,overlay:se,placement:R,onVisibleChange:ae,overlayStyle:{...F,zIndex:ce},autoDestroy:w??C},ee);return ce&&(le=S.createElement(Ud.Provider,{value:q},le)),le},$ee=cx(KE,`align`,void 0,`dropdown`,e=>e);KE._InternalPanelDoNotUseOrYouWillBeFired=e=>S.createElement($ee,{...e},S.createElement(`span`,null));var qE=Zg,JE=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e){(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekday=r()})(e,(function(){return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,n=this.$W,r=(n{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_localeData=r()})(e,(function(){return function(e,t,n){var r=t.prototype,i=function(e){return e&&(e.indexOf?e:e.s)},a=function(e,t,n,r,a){var o=e.name?e:e.$locale(),s=i(o[t]),c=i(o[n]),l=s||c.map((function(e){return e.slice(0,r)}));if(!a)return l;var u=o.weekStart;return l.map((function(e,t){return l[(t+(u||0))%7]}))},o=function(){return n.Ls[n.locale()]},s=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}(e.formats[t.toUpperCase()])},c=function(){var e=this;return{months:function(t){return t?t.format(`MMMM`):a(e,`months`)},monthsShort:function(t){return t?t.format(`MMM`):a(e,`monthsShort`,`months`,3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format(`dddd`):a(e,`weekdays`)},weekdaysMin:function(t){return t?t.format(`dd`):a(e,`weekdaysMin`,`weekdays`,2)},weekdaysShort:function(t){return t?t.format(`ddd`):a(e,`weekdaysShort`,`weekdays`,3)},longDateFormat:function(t){return s(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return c.bind(this)()},n.localeData=function(){var e=o();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(t){return s(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return a(o(),`months`)},n.monthsShort=function(){return a(o(),`monthsShort`,`months`,3)},n.weekdays=function(e){return a(o(),`weekdays`,null,null,e)},n.weekdaysShort=function(e){return a(o(),`weekdaysShort`,`weekdays`,3,e)},n.weekdaysMin=function(e){return a(o(),`weekdaysMin`,`weekdays`,2,e)}}}))})),nte=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekOfYear=r()})(e,(function(){var e=`week`,t=`year`;return function(n,r,i){var a=r.prototype;a.week=function(n){if(n===void 0&&(n=null),n!==null)return this.add(7*(n-this.week()),`day`);var r=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var a=i(this).startOf(t).add(1,t).date(r),o=i(this).endOf(e);if(a.isBefore(o))return 1}var s=i(this).startOf(t).date(r).startOf(e).subtract(1,`millisecond`),c=this.diff(s,e,!0);return c<0?i(this).startOf(`week`).week():Math.ceil(c)},a.weeks=function(e){return e===void 0&&(e=null),this.week(e)}}}))})),rte=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekYear=r()})(e,(function(){return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return t===1&&e===11?n+1:e===0&&t>=52?n-1:n}}}))})),ite=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),ate=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),YE=c(JE()),ote=c(ete()),ste=c(tte()),cte=c(nte()),lte=c(rte()),ute=c(ite()),dte=c(ate());YE.default.extend(dte.default),YE.default.extend(ute.default),YE.default.extend(ote.default),YE.default.extend(ste.default),YE.default.extend(cte.default),YE.default.extend(lte.default),YE.default.extend(function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=(e||``).replace(`Wo`,`wo`);return r.bind(this)(t)}});var fte={bn_BD:`bn-bd`,by_BY:`be`,en_GB:`en-gb`,en_US:`en`,fr_BE:`fr`,fr_CA:`fr-ca`,hy_AM:`hy-am`,kmr_IQ:`ku`,nl_BE:`nl-be`,pt_BR:`pt-br`,zh_CN:`zh-cn`,zh_HK:`zh-hk`,zh_TW:`zh-tw`},XE=function(e){return fte[e]||e.split(`_`)[0]},ZE=function(e){return!YE.default.isDayjs(e)||e instanceof YE.default?e:(0,YE.default)(e.valueOf())},QE={getNow:function(){var e=(0,YE.default)();return typeof e.tz==`function`?e.tz():e},getFixedDate:function(e){return(0,YE.default)(e,[`YYYY-M-DD`,`YYYY-MM-DD`])},getEndDate:function(e){return ZE(e).endOf(`month`)},getWeekDay:function(e){var t=ZE(e).locale(`en`);return t.weekday()+t.localeData().firstDayOfWeek()},getYear:function(e){return ZE(e).year()},getMonth:function(e){return ZE(e).month()},getDate:function(e){return ZE(e).date()},getHour:function(e){return ZE(e).hour()},getMinute:function(e){return ZE(e).minute()},getSecond:function(e){return ZE(e).second()},getMillisecond:function(e){return ZE(e).millisecond()},addYear:function(e,t){return ZE(e).add(t,`year`)},addMonth:function(e,t){return ZE(e).add(t,`month`)},addDate:function(e,t){return ZE(e).add(t,`day`)},setYear:function(e,t){return ZE(e).year(t)},setMonth:function(e,t){return ZE(e).month(t)},setDate:function(e,t){return ZE(e).date(t)},setHour:function(e,t){return ZE(e).hour(t)},setMinute:function(e,t){return ZE(e).minute(t)},setSecond:function(e,t){return ZE(e).second(t)},setMillisecond:function(e,t){return ZE(e).millisecond(t)},isAfter:function(e,t){return ZE(e).isAfter(ZE(t))},isValidate:function(e){return ZE(e).isValid()},locale:{getWeekFirstDay:function(e){return(0,YE.default)().locale(XE(e)).localeData().firstDayOfWeek()},getWeekFirstDate:function(e,t){return ZE(t).locale(XE(e)).weekday(0)},getWeek:function(e,t){return ZE(t).locale(XE(e)).week()},getShortWeekDays:function(e){return(0,YE.default)().locale(XE(e)).localeData().weekdaysMin()},getShortMonths:function(e){return(0,YE.default)().locale(XE(e)).localeData().monthsShort()},format:function(e,t,n){return ZE(t).locale(XE(e)).format(n)},parse:function(e,t,n){for(var r=XE(e),i=0;ie.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:`0`,r=String(e);r.lengthe.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=DD(S.useState([!1,!1]),2),i=r[0],a=r[1];return[S.useMemo(function(){return i.map(function(r,i){if(r)return!0;var a=e[i];return a?!!(!n[i]&&!a||a&&t(a,{activeIndex:i})):!1})},[e,i,t,n]),function(e,t){a(function(n){return hD(n,t,e)})}]}function PD(e){"@babel/helpers - typeof";return PD=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},PD(e)}function FD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ID(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&(o=t.addDate(o,-7)),o}function TO(e,t){var n=t.generateConfig,r=t.locale,i=t.format;return e?typeof i==`function`?i(e):n.locale.format(r.locale,e,i):``}function EO(e,t,n){var r=t,i=[`getHour`,`getMinute`,`getSecond`,`getMillisecond`];return[`setHour`,`setMinute`,`setSecond`,`setMillisecond`].forEach(function(t,a){r=n?e[t](r,e[i[a]](n)):e[t](r,0)}),r}function DO(e,t,n,r,i){return In(function(a,o){return!!(n&&n(a,o)||r&&e.isAfter(r,a)&&!xO(e,t,r,a,o.type)||i&&e.isAfter(a,i)&&!xO(e,t,i,a,o.type))})}function OO(e){"@babel/helpers - typeof";return OO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},OO(e)}function kO(e,t,n){return S.useMemo(function(){var r=mD(_D(e,t,n)),i=r[0],a=OO(i)===`object`&&i.type===`mask`?i.format:null;return[r.map(function(e){return typeof e==`string`||typeof e==`function`?e:e.format}),a]},[e,t,n])}function AO(e,t,n){return typeof e[0]==`function`||n?!0:t}function jO(e){"@babel/helpers - typeof";return jO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},jO(e)}function MO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function NO(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;return S.useMemo(function(){var n=e&&mD(e);return t&&n&&(n[1]=n[1]||n[0]),n},[e,t])}function ZO(e,t){var n=e.generateConfig,r=e.locale,i=e.picker,a=i===void 0?`date`:i,o=e.prefixCls,s=o===void 0?`rc-picker`:o,c=e.previewValue,l=c===void 0?`hover`:c,u=e.styles,d=u===void 0?{}:u,f=e.classNames,p=f===void 0?{}:f,m=e.order,h=m===void 0?!0:m,g=e.components,_=g===void 0?{}:g,v=e.inputRender,y=e.allowClear,b=e.clearIcon,x=e.needConfirm,C=e.multiple,w=e.format,T=e.inputReadOnly,E=e.disabledDate,D=e.minDate,O=e.maxDate,k=e.showTime,A=e.value,j=e.defaultValue,M=e.pickerValue,N=e.defaultPickerValue,P=XO(A),F=XO(j),I=XO(M),L=XO(N),R=a===`date`&&k?`datetime`:a,z=R===`time`||R===`datetime`,B=z||C,V=x??z,H=WO(sO(e),4),U=H[0],W=H[1],ee=H[2],te=H[3],ne=HD(r,W),re=S.useMemo(function(){return cO(R,ee,te,U,ne)},[R,ee,te,U,ne]),ie=S.useMemo(function(){return BO(BO({},e),{},{previewValue:l,prefixCls:s,locale:ne,picker:a,styles:d,classNames:p,order:h,components:BO({input:v},_),clearIcon:uO(s,y,b),showTime:re,value:P,defaultValue:F,pickerValue:I,defaultPickerValue:L},t?.())},[e]),ae=WO(kO(R,ne,w),2),G=ae[0],oe=ae[1],K=AO(G,T,C),se=DO(n,r,E,D,O),ce=LO(n,a,se,re);return[S.useMemo(function(){return BO(BO({},ie),{},{needConfirm:V,inputReadOnly:K,disabledDate:se})},[ie,V,K,se]),R,B,G,oe,ce]}function QO(e,t){return rk(e)||nk(e,t)||ek(e,t)||$O()}function $O(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ek(e,t){if(e){if(typeof e==`string`)return tk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tk(e,t)}}function tk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,i=ak(ik(n.every(function(e){return e})?!1:e,t||!1,r),2),a=i[0],o=i[1];function s(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!t.inherit||a)&&o(e,t.force)}return[a,s]}function fk(e){var t=S.useRef();return S.useImperativeHandle(e,function(){return{nativeElement:t.current?.nativeElement,focus:function(e){var n;(n=t.current)==null||n.focus(e)},blur:function(){var e;(e=t.current)==null||e.blur()}}}),t}function pk(e,t){return vk(e)||_k(e,t)||hk(e,t)||mk()}function mk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hk(e,t){if(e){if(typeof e==`string`)return gk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gk(e,t)}}function gk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=S.useRef(t);r.current=t,Bn(function(){if(e)r.current(e);else{var t=ri(function(){r.current(e)},n);return function(){ri.cancel(t)}}},[e])}function xk(e,t){return Ek(e)||Tk(e,t)||Ck(e,t)||Sk()}function Sk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ck(e,t){if(e){if(typeof e==`string`)return wk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wk(e,t)}}function wk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=xk(S.useState(0),2),i=r[0],a=r[1],o=xk(S.useState(!1),2),s=o[0],c=o[1],l=S.useRef([]),u=S.useRef(null),d=S.useRef(null),f=function(e){u.current=e};return bk(s||n,function(){s||(l.current=[],f(null))}),S.useEffect(function(){s&&l.current.push(i)},[s,i]),[s,function(e){c(e)},function(e){return e&&(d.current=e),d.current},i,a,function(n){var r=l.current,i=new Set(r.filter(function(e){return n[e]||t[e]})),a=+(r[r.length-1]===0);return i.size>=2||e[a]?null:a},l.current,f,function(e){return u.current===e}]}function Ok(e){"@babel/helpers - typeof";return Ok=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ok(e)}function kk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ak(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n8&&arguments[8]!==void 0?arguments[8]:Jk,l=arguments.length>9&&arguments[9]!==void 0?arguments[9]:Jk,u=arguments.length>10&&arguments[10]!==void 0?arguments[10]:Jk,d=arguments.length>11?arguments[11]:void 0,f=arguments.length>12?arguments[12]:void 0,p=arguments.length>13?arguments[13]:void 0,m=o===`time`,h=a||0,g=function(t){var r=e.getNow();return m&&(r=EO(e,r)),c[t]||n[t]||r},_=Vk(l,2),v=_[0],y=_[1],b=Vk(Hn(function(){return g(0)},v),2),x=b[0],C=b[1],w=Vk(Hn(function(){return g(1)},y),2),T=w[0],E=w[1],D=S.useMemo(function(){var t=[x,T][h];return m?t:EO(e,t,u[h])},[m,x,T,h,e,u]),O=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`panel`,a=[C,E][h];a(n);var s=[x,T];s[h]=n,d&&(!xO(e,t,x,s[0],o)||!xO(e,t,T,s[1],o))&&d(s,{source:i,range:h===1?`end`:`start`,mode:r})},k=function(n,r){if(s){var i={date:`month`,week:`month`,month:`year`,quarter:`year`}[o];if(i&&!xO(e,t,n,r,i)||o===`year`&&n&&Math.floor(e.getYear(n)/10)!==Math.floor(e.getYear(r)/10))return qk(e,o,r,-1)}return r},A=S.useRef(null);return zn(function(){if(i&&!c[h]){var t=m?null:e.getNow();if(A.current!==null&&A.current!==h?t=[x,T][h^1]:n[h]?t=h===0?n[0]:k(n[0],n[1]):n[h^1]&&(t=n[h^1]),t){f&&e.isAfter(f,t)&&(t=f);var r=s?qk(e,o,t,1):t;p&&e.isAfter(r,p)&&(t=s?qk(e,o,p,-1):p),O(t,`reset`)}}},[i,h,n[h]]),S.useEffect(function(){i?A.current=h:A.current=null},[i,h]),zn(function(){i&&c&&c[h]&&O(c[h],`reset`)},[i,h]),[D,O]}function Xk(e,t){return tA(e)||eA(e,t)||Qk(e,t)||Zk()}function Zk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qk(e,t){if(e){if(typeof e==`string`)return $k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $k(e,t)}}function $k(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:2,o=[],s=n>=1?n|0:1,c=e;c<=t;c+=s){var l=i.includes(c);(!l||!r)&&o.push({label:pD(c,a),value:c,disabled:l})}return o}function VA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t||{},i=r.use12Hours,a=r.hourStep,o=a===void 0?1:a,s=r.minuteStep,c=s===void 0?1:s,l=r.secondStep,u=l===void 0?1:l,d=r.millisecondStep,f=d===void 0?100:d,p=r.hideDisabledOptions,m=r.disabledTime,h=r.disabledHours,g=r.disabledMinutes,_=r.disabledSeconds,v=S.useMemo(function(){return n||e.getNow()},[n,e]),y=S.useCallback(function(e){var t=m?.(e)||{};return[t.disabledHours||h||zA,t.disabledMinutes||g||zA,t.disabledSeconds||_||zA,t.disabledMilliseconds||zA]},[m,h,g,_]),b=NA(S.useMemo(function(){return y(v)},[v,y]),4),x=b[0],C=b[1],w=b[2],T=b[3],E=S.useCallback(function(e,t,n,r){var a=BA(0,23,o,p,e());return[i?a.map(function(e){return kA(kA({},e),{},{label:pD(e.value%12||12,2)})}):a,function(e){return BA(0,59,c,p,t(e))},function(e,t){return BA(0,59,u,p,n(e,t))},function(e,t,n){return BA(0,999,f,p,r(e,t,n),3)}]},[p,o,i,f,c,u]),D=NA(S.useMemo(function(){return E(x,C,w,T)},[E,x,C,w,T]),4),O=D[0],k=D[1],A=D[2],j=D[3];return[function(t,n){var r=function(){return O},i=k,a=A,o=j;if(n){var s=NA(y(n),4),c=s[0],l=s[1],u=s[2],d=s[3],f=NA(E(c,l,u,d),4),p=f[0],m=f[1],h=f[2],g=f[3];r=function(){return p},i=m,a=h,o=g}return EA(t,r,i,a,o,e)},O,k,A,j]}function HA(e,t){return qA(e)||KA(e,t)||WA(e,t)||UA()}function UA(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WA(e,t){if(e){if(typeof e==`string`)return GA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GA(e,t)}}function GA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;fe(e),_?.(e),t&&pe(e)},he=function(e,t){ie(e),t&&me(t),pe(t,e)},ge=function(e){if(le(e),me(e),re!==x){var t=[`decade`,`year`],n=[].concat(t,[`month`]),r={quarter:[].concat(t,[`quarter`]),week:[].concat(FN(n),[`week`]),date:[].concat(FN(n),[`date`])}[x]||n,i=r[r.indexOf(re)+1];i&&he(i,e)}},_e=S.useMemo(function(){var e,t;if(Array.isArray(T)){var n=zN(T,2);e=n[0],t=n[1]}else e=T;return!e&&!t?null:(e||=t,t||=e,a.isAfter(e,t)?[t,e]:[e,t])},[T,a]),ve=ED(E,D,O),ye=A[ae]||GN[ae]||Nj,be=S.useMemo(function(){return{classNames:P?.popup??n??{},styles:F?.popup??r??{}}},[P,n,F,r]),xe=S.useContext(oj),Se=S.useMemo(function(){return jN(jN({},xe),{},{hideHeader:j})},[xe,j]),Ce=`${I}-panel`,we=gD(e,[`showWeek`,`prevIcon`,`nextIcon`,`superPrevIcon`,`superNextIcon`,`disabledDate`,`minDate`,`maxDate`,`onHover`]);return S.createElement(nj.Provider,{value:be},S.createElement(oj.Provider,{value:Se},S.createElement(`div`,{ref:L,tabIndex:l,className:J(Ce,MN({},`${Ce}-rtl`,o===`rtl`))},S.createElement(ye,kN({},we,{showTime:ee,prefixCls:I,locale:U,generateConfig:a,onModeChange:he,pickerValue:de,onPickerValueChange:function(e){me(e,!0)},value:ce[0],onSelect:ge,values:ce,cellRender:ve,hoverRangeValue:_e,hoverValue:w})))))}var qN=S.memo(S.forwardRef(KN));function JN(e){"@babel/helpers - typeof";return JN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},JN(e)}function YN(){return YN=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jP(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function MP(e){var t=e.icon,n=e.type,r=AP(e,DP),i=S.useContext(eD),a=i.prefixCls,o=i.classNames,s=i.styles;return t?S.createElement(`span`,kP({className:J(`${a}-${n}`,o.suffix),style:s.suffix},r),t):null}function NP(e){var t=e.onClear,n=AP(e,OP);return S.createElement(MP,kP({},n,{type:`clear`,role:`button`,onMouseDown:function(e){e.preventDefault()},onClick:function(e){e.stopPropagation(),t()}}))}function PP(e){"@babel/helpers - typeof";return PP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},PP(e)}function FP(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function IP(e,t){for(var n=0;n=a&&e<=o)return r;var s=Math.min(Math.abs(e-a),Math.abs(e-o));se.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var aF=S.forwardRef(function(e,t){var n=e.className,r=e.active,i=e.showActiveCls,a=i===void 0?!0:i,o=e.suffixIcon,s=e.format,c=e.validateFormat,l=e.onChange;e.onInput;var u=e.helped,d=e.onHelp,f=e.onSubmit,p=e.onKeyDown,m=e.preserveInvalidOnBlur,h=m===void 0?!1:m,g=e.invalid,_=e.clearIcon,v=rF(e,KP),y=e.value,b=e.onFocus,x=e.onBlur,C=e.onMouseUp,w=S.useContext(eD),T=w.prefixCls,E=w.input,D=E===void 0?`input`:E,O=w.classNames,k=w.styles,A=`${T}-input`,j=ZP(S.useState(!1),2),M=j[0],N=j[1],P=ZP(S.useState(y),2),F=P[0],I=P[1],L=ZP(S.useState(``),2),R=L[0],z=L[1],B=ZP(S.useState(null),2),V=B[0],H=B[1],U=ZP(S.useState(null),2),W=U[0],ee=U[1],te=F||``;S.useEffect(function(){I(y)},[y]);var ne=S.useRef(null),re=S.useRef(null),ie=S.useRef(!1);S.useImperativeHandle(t,function(){return{nativeElement:ne.current,inputElement:re.current,focus:function(e){re.current.focus(e)},blur:function(){re.current.blur()}}});var ae=S.useMemo(function(){return new UP(s||``)},[s]),G=ZP(S.useMemo(function(){return u?[0,0]:ae.getSelection(V)},[ae,V,u]),2),oe=G[0],K=G[1],se=function(e){e&&e!==s&&e!==y&&d()},ce=In(function(e){c(e)&&l(e),I(e),se(e)}),q=function(e){if(!s){var t=e.target.value;se(t),I(t),l(t)}},le=function(e){if(ie.current){e.preventDefault();return}var t=e.clipboardData.getData(`text`);c(t)&&ce(t)},ue=function(){ie.current=!0},de=function(e){var t=e.target.selectionStart;H(ae.getMaskCellIndex(t)),ee({}),C?.(e),ie.current=!1},fe=function(e){N(!0),H(0),z(``),b(e)},pe=function(e){x(e)},me=function(e){N(!1),pe(e)};bk(r,function(){!r&&!h&&I(y)});var he=function(e){e.key===`Enter`&&c(te)&&f(),p?.(e)},ge=function(e){if(ie.current){e.preventDefault();return}he(e);var t=e.key,n=null,r=null,i=K-oe,a=s.slice(oe,K),o=function(e){H(function(t){var n=t+e;return n=Math.max(n,0),n=Math.min(n,ae.size()-1),n})},c=function(e){var t=ZP(WP(a),3),n=t[0],r=t[1],i=t[2],o=te.slice(oe,K),s=Number(o);if(isNaN(s))return String(i||(e>0?n:r));var c=s+e,l=r-n+1;return String(n+(l+c-n)%l)};switch(t){case`Backspace`:case`Delete`:n=``,r=a;break;case`ArrowLeft`:n=``,o(-1);break;case`ArrowRight`:n=``,o(1);break;case`ArrowUp`:n=``,r=c(1);break;case`ArrowDown`:n=``,r=c(-1);break;default:isNaN(Number(t))||(n=R+t,r=n);break}n!==null&&(z(n),n.length>=i&&(o(1),z(``))),r!==null&&ce((te.slice(0,oe)+pD(r,i)+te.slice(K)).slice(0,s.length)),ee({})},_e=S.useRef();zn(function(){if(!(!M||!s||ie.current)){if(!ae.match(te)){ce(s);return}return re.current.setSelectionRange(oe,K),_e.current=ri(function(){re.current.setSelectionRange(oe,K)}),function(){ri.cancel(_e.current)}}},[ae,s,M,te,V,oe,K,W,ce]);var ve=s?{onFocus:fe,onBlur:me,onKeyDown:ge,onMouseDown:ue,onMouseUp:de,onPaste:le}:{};return S.createElement(`div`,{ref:ne,className:J(A,JP(JP({},`${A}-active`,r&&a),`${A}-placeholder`,u),n)},S.createElement(D,qP({ref:re,"aria-invalid":g,autoComplete:`off`},v,{onKeyDown:he,onBlur:pe},ve,{value:te,onChange:q,className:O.input,style:k.input})),S.createElement(MP,{type:`suffix`,icon:o}),_)}),oF=`id.prefix.clearIcon.suffixIcon.separator.activeIndex.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.value.onChange.onSubmit.onInputChange.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onActiveInfo.placement.onMouseDown.required.aria-required.autoFocus.tabIndex`.split(`.`),sF=[`index`];function cF(){return cF=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function CF(e,t){var n=e.id,r=e.prefix,i=e.clearIcon,a=e.suffixIcon,o=e.separator,s=o===void 0?`~`:o,c=e.activeIndex;e.activeHelp,e.allHelp;var l=e.focused;e.onFocus,e.onBlur,e.onKeyDown,e.locale,e.generateConfig;var u=e.placeholder,d=e.className,f=e.style,p=e.onClick,m=e.onClear,h=e.value;e.onChange,e.onSubmit,e.onInputChange,e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var g=e.disabled,_=e.invalid;e.inputReadOnly;var v=e.direction;e.onOpenChange;var y=e.onActiveInfo;e.placement;var b=e.onMouseDown;e.required,e[`aria-required`];var x=e.autoFocus,C=e.tabIndex,w=xF(e,oF),T=v===`rtl`,E=S.useContext(eD),D=E.prefixCls,O=E.classNames,k=E.styles,A=S.useMemo(function(){if(typeof n==`string`)return[n];var e=n||{};return[e.start,e.end]},[n]),j=S.useRef(),M=S.useRef(),N=S.useRef(),P=function(e){return[M,N][e]?.current};S.useImperativeHandle(t,function(){return{nativeElement:j.current,focus:function(e){if(bF(e)===`object`){var t,n=e||{},r=n.index,i=r===void 0?0:r,a=xF(n,sF);(t=P(i))==null||t.focus(a)}else{var o;(o=P(e??0))==null||o.focus()}},blur:function(){var e,t;(e=P(0))==null||e.blur(),(t=P(1))==null||t.blur()}}});var F=EP(w),I=S.useMemo(function(){return Array.isArray(u)?u:[u,u]},[u]),L=mF(wP(uF(uF({},e),{},{id:A,placeholder:I})),1)[0],R=mF(S.useState({position:`absolute`,width:0}),2),z=R[0],B=R[1],V=In(function(){var e=P(c);if(e){var t=e.nativeElement.getBoundingClientRect(),n=j.current.getBoundingClientRect(),r=t.left-n.left;B(function(e){return uF(uF({},e),{},{width:t.width,left:r})}),y([t.left,t.right,n.width])}});S.useEffect(function(){V()},[c]);var H=i&&(h[0]&&!g[0]||h[1]&&!g[1]),U=x&&!g[0],W=x&&!U&&!g[1];return S.createElement(Wr,{onResize:V},S.createElement(`div`,cF({},F,{className:J(D,`${D}-range`,dF(dF(dF(dF({},`${D}-focused`,l),`${D}-disabled`,g.every(function(e){return e})),`${D}-invalid`,_.some(function(e){return e})),`${D}-rtl`,T),d),style:f,ref:j,onClick:p,onMouseDown:function(e){var t=e.target;t!==M.current.inputElement&&t!==N.current.inputElement&&e.preventDefault(),b?.(e)}}),r&&S.createElement(`div`,{className:J(`${D}-prefix`,O.prefix),style:k.prefix},r),S.createElement(aF,cF({ref:M},L(0),{className:`${D}-input-start`,autoFocus:U,tabIndex:C,"date-range":`start`})),S.createElement(`div`,{className:`${D}-range-separator`},s),S.createElement(aF,cF({ref:N},L(1),{className:`${D}-input-end`,autoFocus:W,tabIndex:C,"date-range":`end`})),S.createElement(`div`,{className:`${D}-active-bar`,style:z}),S.createElement(MP,{type:`suffix`,icon:a}),H&&S.createElement(NP,{icon:i,onClear:m})))}var wF=S.forwardRef(CF);function TF(e){"@babel/helpers - typeof";return TF=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},TF(e)}function EF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function DF(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0&&G.current.focus({index:n})}ue(!0),ae?.(e)},Qe=function(){Be(null),ue(!1,{force:!0})},$e=UF(S.useState(null),2),et=$e[0],tt=$e[1],nt=UF(S.useState(null),2),rt=nt[0],it=nt[1],at=S.useMemo(function(){return rt||_e},[_e,rt]);S.useEffect(function(){q||it(null)},[q]);var ot=UF(S.useState([0,0,0]),2),st=ot[0],ct=ot[1],lt=function(e,t){p===`hover`&&(it(e),tt(t))},ut=yk(W,ee),dt=function(e){lt(e,`preset`)},ft=function(e){Be(e)&&(xe(`preset-click`),ue(!1,{force:!0}))},pt=function(e){Xe(e)},mt=function(e){lt(e?Ye(e,Se):null,`cell`)},ht=function(e){ue(!0),Oe(e)},gt=function(){xe(`panel`)},_t=function(e){he(hD(_e,Se,e)),!g&&!a&&i===Fe&&Xe(e)},vt=function(){ue(!1)},yt=ED(ne,re,ie,XF(Se)),bt=_e[Se]||null,xt=In(function(e){return c(e,{activeIndex:Se})}),St=S.useMemo(function(){var e=Vu(r,!1);return Sr(r,[].concat(PF(Object.keys(e)),[`onChange`,`onCalendarChange`,`style`,`className`,`onPanelChange`,`disabledTime`,`classNames`,`styles`]))},[r]),Ct=S.createElement(_P,NF({},St,{showNow:Le,showTime:Ae,range:!0,multiplePanel:Ie,activeInfo:st,disabledDate:Ve,onFocus:ht,onBlur:ke,onPanelMouseDown:gt,picker:k,mode:Pe,internalMode:Fe,onPanelChange:Je,format:s,value:bt,isInvalid:xt,onChange:null,onSelect:_t,pickerValue:Ke,defaultOpenValue:mD(M?.defaultOpenValue)[Se],onPickerValueChange:qe,hoverValue:at,onHover:mt,needConfirm:g,onSubmit:Xe,onOk:ge,presets:ut,onPresetHover:dt,onPresetSubmit:ft,onNow:pt,cellRender:yt,classNames:K,styles:se})),wt=function(e,t){he(Ye(e,t))},Tt=function(){xe(`input`)},Et=function(e,t){var n=Te.length,r=Te[n-1];if(n&&r!==t&&g&&!y[r]&&!De(r)&&_e[r]){G.current.focus({index:r});return}xe(`input`),ue(!0,{inherit:!0}),Se!==t&&q&&!g&&a&&Xe(null,!0),Ce(t),Oe(e,t)},Dt=function(e,t){ue(!1),!g&&xe()===`input`&&ze(Se,we(_e)===null),ke(e,t)},Ot=function(e,t){e.key===`Tab`&&Xe(null,!0),_?.(e,t)},kt=S.useMemo(function(){return{prefixCls:l,locale:D,generateConfig:O,button:te.button,input:te.input,classNames:K,styles:se}},[l,D,O,te.button,te.input,K,se]);return zn(function(){q&&Se!==void 0&&Je(null,k,!1)},[q,Se,k]),zn(function(){var e=xe();!q&&e===`input`&&(ue(!1),Xe(null,!0)),!q&&a&&!g&&e===`panel`&&(ue(!0),Xe())},[q]),S.createElement(eD.Provider,{value:kt},S.createElement(oD,NF({},yD(r),{popupElement:Ct,popupStyle:se.popup.root,popupClassName:J(u,K.popup.root),visible:q,onClose:vt,range:!0}),S.createElement(wF,NF({},r,{ref:G,className:J(r.className,u,K.root),style:zF(zF({},se.root),r.style),suffixIcon:V,activeIndex:ye||q?Se:null,activeHelp:!!rt,allHelp:!!rt&&et===`preset`,focused:ye,onFocus:Et,onBlur:Dt,onKeyDown:Ot,onSubmit:Xe,value:at,maskFormat:s,onChange:wt,onInputChange:Tt,format:o,inputReadOnly:B,disabled:v,open:q,onOpenChange:ue,onClick:Ze,onClear:Qe,invalid:Ue,onInvalid:We,onActiveInfo:ct}))))}var QF=S.forwardRef(ZF);function $F(e){var t=e.prefixCls,n=e.value,r=e.onRemove,i=e.removeIcon,a=i===void 0?`×`:i,o=e.formatDate,s=e.disabled,c=e.maxTagCount,l=e.placeholder,u=`${t}-selector`,d=`${t}-selection`,f=`${d}-overflow`;function p(e,t){return S.createElement(`span`,{className:J(`${d}-item`),title:typeof e==`string`?e:null},S.createElement(`span`,{className:`${d}-item-content`},e),!s&&t&&S.createElement(`span`,{onMouseDown:function(e){e.preventDefault()},onClick:t,className:`${d}-item-remove`},a))}function m(e){return p(o(e),function(t){t&&t.stopPropagation(),r(e)})}function h(e){return p(`+ ${e.length} ...`)}return S.createElement(`div`,{className:u},S.createElement(Qx,{prefixCls:f,data:n,renderItem:m,renderRest:h,itemKey:function(e){return o(e)},maxCount:c}),!n.length&&S.createElement(`span`,{className:`${t}-selection-placeholder`},l))}function eI(e){"@babel/helpers - typeof";return eI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},eI(e)}var tI=`id.open.prefix.clearIcon.suffixIcon.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.internalPicker.value.onChange.onSubmit.onInputChange.multiple.maxTagCount.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onMouseDown.required.aria-required.autoFocus.tabIndex.removeIcon`.split(`.`);function nI(){return nI=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hI(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function gI(e,t){e.id;var n=e.open,r=e.prefix,i=e.clearIcon,a=e.suffixIcon;e.activeHelp,e.allHelp;var o=e.focused;e.onFocus,e.onBlur,e.onKeyDown;var s=e.locale,c=e.generateConfig,l=e.placeholder,u=e.className,d=e.style,f=e.onClick,p=e.onClear,m=e.internalPicker,h=e.value,g=e.onChange,_=e.onSubmit;e.onInputChange;var v=e.multiple,y=e.maxTagCount;e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var b=e.disabled,x=e.invalid;e.inputReadOnly;var C=e.direction;e.onOpenChange;var w=e.onMouseDown;e.required,e[`aria-required`];var T=e.autoFocus,E=e.tabIndex,D=e.removeIcon,O=mI(e,tI),k=C===`rtl`,A=S.useContext(eD),j=A.prefixCls,M=A.classNames,N=A.styles,P=S.useRef(),F=S.useRef();S.useImperativeHandle(t,function(){return{nativeElement:P.current,focus:function(e){var t;(t=F.current)==null||t.focus(e)},blur:function(){var e;(e=F.current)==null||e.blur()}}});var I=EP(O),L=function(e){g([e])},R=function(e){g(h.filter(function(t){return t&&!xO(c,s,t,e,m)})),n||_()},z=cI(wP(iI(iI({},e),{},{onChange:L}),function(e){return{value:e.valueTexts[0]||``,active:o}}),2),B=z[0],V=z[1],H=!!(i&&h.length&&!b),U=v?S.createElement(S.Fragment,null,S.createElement($F,{prefixCls:j,value:h,onRemove:R,formatDate:V,maxTagCount:y,disabled:b,removeIcon:D,placeholder:l}),S.createElement(`input`,{className:`${j}-multiple-input`,value:h.map(V).join(`,`),ref:F,readOnly:!0,autoFocus:T,tabIndex:E}),S.createElement(MP,{type:`suffix`,icon:a}),H&&S.createElement(NP,{icon:i,onClear:p})):S.createElement(aF,nI({ref:F},B(),{autoFocus:T,tabIndex:E,suffixIcon:a,clearIcon:H&&S.createElement(NP,{icon:i,onClear:p}),showActiveCls:!1}));return S.createElement(`div`,nI({},I,{className:J(j,aI(aI(aI(aI(aI({},`${j}-multiple`,v),`${j}-focused`,o),`${j}-disabled`,b),`${j}-invalid`,x),`${j}-rtl`,k),u),style:d,ref:P,onClick:f,onMouseDown:function(e){e.target!==F.current?.inputElement&&e.preventDefault(),w?.(e)}}),r&&S.createElement(`div`,{className:J(`${j}-prefix`,M.prefix),style:N.prefix},r),U)}var _I=S.forwardRef(gI);function vI(e){"@babel/helpers - typeof";return vI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},vI(e)}function yI(){return yI=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne??{...t,__INTERNAL__:{itemRef:e=>t=>{let r=HI(e);t?n.current[r]=t:delete n.current[r]}},scrollToField:(e,t={})=>{let{focus:n,...i}=t,a=UI(e,r);a&&(hf(a,{scrollMode:`if-needed`,block:`nearest`,...i}),n&&r.focusField(e))},focusField:e=>{let t=r.getFieldInstance(e);typeof t?.focus==`function`?t.focus():UI(e,r)?.focus?.()},getFieldInstance:e=>{let t=HI(e);return n.current[t]}},[e,t]);return[r]}var GI=S.createContext(void 0),KI=GI.Provider,qI=S.createContext(void 0),mte=qI.Provider;function JI(){return JI=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n=`rc-checkbox`,className:r,style:i,checked:a,disabled:o,defaultChecked:s=!1,type:c=`checkbox`,title:l,onChange:u,...d}=e,f=(0,S.useRef)(null),p=(0,S.useRef)(null),[m,h]=Hn(s,a);(0,S.useImperativeHandle)(t,()=>({focus:e=>{f.current?.focus(e)},blur:()=>{f.current?.blur()},input:f.current,nativeElement:p.current}));let g=J(n,r,{[`${n}-checked`]:m,[`${n}-disabled`]:o});return S.createElement(`span`,{className:g,title:l,style:i,ref:p},S.createElement(`input`,JI({},d,{className:`${n}-input`,ref:f,onChange:t=>{o||(`checked`in e||h(t.target.checked),u?.({target:{...e,type:c,checked:t.target.checked},stopPropagation(){t.stopPropagation()},preventDefault(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:o,checked:!!m,type:c})))});function XI(e){let t=S.useRef(null),n=()=>{ri.cancel(t.current),t.current=null};return[()=>{n(),t.current=ri(()=>{t.current=null})},r=>{t.current&&(r.stopPropagation(),n()),e?.(r)}]}var hte=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:{...Jc(e),display:`inline-block`,fontSize:0,[`&${r}-rtl`]:{direction:`rtl`},[`&${r}-block`]:{display:`flex`},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:`none`},"&-vertical":{display:`flex`,flexDirection:`column`,rowGap:e.marginXS,[`${t}-wrapper`]:{marginInlineEnd:0}}}}},gte=e=>{let{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,colorPrimaryHover:i,radioSize:a,motionDurationSlow:o,motionDurationMid:s,motionEaseInOutCirc:c,colorBgContainer:l,colorBorder:u,lineWidth:d,colorBgContainerDisabled:f,colorTextDisabled:p,paddingXS:m,dotColorDisabled:h,dotSize:g,lineType:_,radioColor:v,radioBgColor:y}=e;return{[`${t}-wrapper`]:{...Jc(e),display:`inline-flex`,alignItems:`baseline`,marginInlineStart:0,marginInlineEnd:n,cursor:`pointer`,"&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:`rtl`},"&-disabled":{cursor:`not-allowed`,color:e.colorTextDisabled},"&::after":{display:`inline-block`,width:0,overflow:`hidden`,content:`"\\a0"`},"&-block":{flex:1,justifyContent:`center`},[t]:{...Jc(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:`calc(${a} * 1px)`,height:`calc(${a} * 1px)`,backgroundColor:l,border:`${Y(d)} ${_} ${u}`,borderRadius:`50%`,transition:`all ${s}`,flex:`none`,"&:after":{content:`""`,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%) scale(0)`,width:`calc(${g} * 1px)`,height:`calc(${g} * 1px)`,backgroundColor:v,borderRadius:`50%`,transformOrigin:`50% 50%`,opacity:0,transition:`all ${o} ${c}`},[`${t}-input`]:{position:`absolute`,inset:0,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:Zc(e)},[`&:hover:not(${t}-wrapper-disabled) ${t}`]:{borderColor:r},[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:i,borderColor:`transparent`},[`${t}-checked`]:{backgroundColor:y,borderColor:r,"&::after":{transform:`translate(-50%, -50%)`,opacity:1}},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:f,borderColor:u,"&::after":{backgroundColor:h}},[`${t}-disabled + span`]:{color:p,cursor:`not-allowed`},[`span${t} + *`]:{paddingInlineStart:m,paddingInlineEnd:m}}}},_te=e=>{let{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:i,lineType:a,colorBorder:o,motionDurationMid:s,buttonPaddingInline:c,fontSize:l,buttonBg:u,fontSizeLG:d,controlHeightLG:f,controlHeightSM:p,paddingXS:m,borderRadius:h,borderRadiusSM:g,borderRadiusLG:_,buttonCheckedBg:v,buttonSolidCheckedColor:y,colorTextDisabled:b,colorBgContainerDisabled:x,buttonCheckedBgDisabled:S,buttonCheckedColorDisabled:C,colorPrimary:w,colorPrimaryHover:T,colorPrimaryActive:E,buttonSolidCheckedBg:D,buttonSolidCheckedHoverBg:O,buttonSolidCheckedActiveBg:k,calc:A}=e;return{[`${r}-button-wrapper`]:{position:`relative`,display:`inline-block`,height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:l,lineHeight:Y(A(n).sub(A(i).mul(2)).equal()),background:u,border:`${Y(i)} ${a} ${o}`,borderBlockStartWidth:A(i).add(.02).equal(),borderInlineEndWidth:i,cursor:`pointer`,transition:[`color`,`background-color`,`box-shadow`].map(e=>`${e} ${s}`).join(`,`),a:{color:t},[`> ${r}-button`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:`100%`,height:`100%`},"&:not(:last-child)":{marginInlineEnd:A(i).mul(-1).equal()},"&:first-child":{borderInlineStart:`${Y(i)} ${a} ${o}`,borderStartStartRadius:h,borderEndStartRadius:h},"&:last-child":{borderStartEndRadius:h,borderEndEndRadius:h},"&:first-child:last-child":{borderRadius:h},[`${r}-group-large &`]:{height:f,fontSize:d,lineHeight:Y(A(f).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:_,borderEndStartRadius:_},"&:last-child":{borderStartEndRadius:_,borderEndEndRadius:_}},[`${r}-group-small &`]:{height:p,paddingInline:A(m).sub(i).equal(),paddingBlock:0,lineHeight:Y(A(p).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g}},"&:hover":{position:`relative`,color:w},"&:has(:focus-visible)":Zc(e),[`${r}, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:`none`},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:w,background:v,borderColor:w,"&::before":{backgroundColor:w},"&:first-child":{borderColor:w},"&:hover":{color:T,borderColor:T,"&::before":{backgroundColor:T}},"&:active":{color:E,borderColor:E,"&::before":{backgroundColor:E}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:y,background:D,borderColor:D,"&:hover":{color:y,background:O,borderColor:O},"&:active":{color:y,background:k,borderColor:k}},"&-disabled":{color:b,backgroundColor:x,borderColor:o,cursor:`not-allowed`,"&:first-child, &:hover":{color:b,backgroundColor:x,borderColor:o}},[`&-disabled${r}-button-wrapper-checked`]:{color:C,backgroundColor:S,borderColor:o,boxShadow:`none`},"&-block":{flex:1,textAlign:`center`}}}},ZI=rl(`Radio`,e=>{let{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${Y(n)} ${t}`,i=gs(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[hte(i),gte(i),_te(i)]},e=>{let{wireframe:t,padding:n,marginXS:r,lineWidth:i,fontSizeLG:a,colorText:o,colorBgContainer:s,colorTextDisabled:c,controlItemBgActiveDisabled:l,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:f,colorPrimaryActive:p,colorWhite:m}=e,h=a;return{radioSize:h,dotSize:t?h-8:h-(4+i)*2,dotColorDisabled:c,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:p,buttonBg:s,buttonCheckedBg:s,buttonColor:o,buttonCheckedBgDisabled:l,buttonCheckedColorDisabled:c,buttonPaddingInline:n-i,wrapperMarginInlineEnd:r,radioColor:t?d:m,radioBgColor:t?s:d}},{unitless:{radioSize:!0,dotSize:!0}}),QI=S.forwardRef((e,t)=>{let n=S.useContext(GI),r=S.useContext(qI),{getPrefixCls:i,direction:a,className:o,style:s,classNames:c,styles:l}=li(`radio`),u=$n(t,S.useRef(null)),{isFormItemInput:d}=S.useContext(Sy),f=t=>{e.onChange?.(t),n?.onChange?.(t)},{prefixCls:p,className:m,rootClassName:h,children:g,style:_,title:v,classNames:y,styles:b,...x}=e,C=i(`radio`,p),w=(n?.optionType||r)===`button`,T=w?`${C}-button`:C,E=bf(C),[D,O]=ZI(C,E),k={...x},A=S.useContext(zp),j=k.checked;n&&(k.name=n.name,k.onChange=f,j=e.value===n.value,k.disabled=k.disabled??n.disabled),k.disabled=k.disabled??A;let M={...e,...k,checked:j},[N,P]=Fd([c,y],[l,b],{props:M}),F=J(`${T}-wrapper`,{[`${T}-wrapper-checked`]:j,[`${T}-wrapper-disabled`]:k.disabled,[`${T}-wrapper-rtl`]:a===`rtl`,[`${T}-wrapper-in-form-item`]:d,[`${T}-wrapper-block`]:!!n?.block},o,m,h,N.root,D,O,E),[I,L]=XI(k.onClick);return S.createElement(eh,{component:`Radio`,disabled:k.disabled},S.createElement(`label`,{className:F,style:{...P.root,...s,..._},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:v,onClick:I},S.createElement(YI,{...k,checked:j,className:J(N.icon,{[qm]:!w}),style:P.icon,type:`radio`,prefixCls:T,ref:u,onClick:L}),g===void 0?null:S.createElement(`span`,{className:J(`${T}-label`,N.label),style:P.label},g)))}),vte=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=S.useContext(oi),{name:i}=S.useContext(Sy),a=zf(HI(i)),{prefixCls:o,className:s,rootClassName:c,options:l,buttonStyle:u=`outline`,disabled:d,children:f,size:p,style:m,id:h,optionType:g,name:_=a,defaultValue:v,value:y,block:b=!1,onChange:x,onMouseEnter:C,onMouseLeave:w,onFocus:T,onBlur:E,orientation:D,vertical:O,role:k=`radiogroup`}=e,[A,j]=Hn(v,y),M=S.useCallback(t=>{let n=A,r=t.target.value;`value`in e||j(r),r!==n&&x?.(t)},[A,j,x]),N=n(`radio`,o),P=`${N}-group`,F=bf(N),[I,L]=ZI(N,F),R=f;l&&l.length>0&&(R=l.map(e=>typeof e==`string`||pd(e)?S.createElement(QI,{key:e.toString(),prefixCls:N,disabled:d,value:e,checked:A===e},e):S.createElement(QI,{key:`radio-group-value-options-${e.value}`,prefixCls:N,disabled:e.disabled||d,value:e.value,checked:A===e.value,title:e.title,style:e.style,className:e.className,id:e.id,required:e.required},e.label)));let z=th(p),[,B]=Rd(D,O),V=J(P,`${P}-${u}`,{[`${P}-large`]:z===`large`,[`${P}-small`]:z===`small`,[`${P}-rtl`]:r===`rtl`,[`${P}-block`]:b},s,c,I,L,F),H=S.useMemo(()=>({onChange:M,value:A,disabled:d,name:_,optionType:g,block:b}),[M,A,d,_,g,b]);return S.createElement(`div`,{...Vu(e,{aria:!0,data:!0}),role:k,className:J(V,{[`${N}-group-vertical`]:B}),style:m,onMouseEnter:C,onMouseLeave:w,onFocus:T,onBlur:E,id:h,ref:t},S.createElement(KI,{value:H},R))}),yte=S.memo(vte),bte=S.forwardRef((e,t)=>{let{getPrefixCls:n}=S.useContext(oi),{prefixCls:r,...i}=e,a=n(`radio`,r);return S.createElement(mte,{value:`button`},S.createElement(QI,{prefixCls:a,...i,type:`radio`,ref:t}))}),$I=QI;$I.Button=bte,$I.Group=yte,$I.__ANT_RADIO=!0;function eL(e){return gs(e,{inputAffixPadding:e.paddingXXS})}var tL=e=>{let{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:a,controlHeightLG:o,fontSizeLG:s,lineHeightLG:c,paddingSM:l,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:p,colorPrimary:m,controlOutlineWidth:h,controlOutline:g,colorErrorOutline:_,colorWarningOutline:v,colorBgContainer:y,inputFontSize:b,inputFontSizeLG:x,inputFontSizeSM:S}=e,C=b||n,w=S||C,T=x||s,E=Math.round((t-C*r)/2*10)/10-i,D=Math.round((a-w*r)/2*10)/10-i,O=Math.ceil((o-T*c)/2*10)/10-i;return{paddingBlock:Math.max(E,0),paddingBlockSM:Math.max(D,0),paddingBlockLG:Math.max(O,0),paddingInline:l-i,paddingInlineSM:u-i,paddingInlineLG:d-i,addonBg:f,activeBorderColor:m,hoverBorderColor:p,activeShadow:`0 0 0 ${h}px ${g}`,errorActiveShadow:`0 0 0 ${h}px ${_}`,warningActiveShadow:`0 0 0 ${h}px ${v}`,hoverBg:y,activeBg:y,inputFontSize:C,inputFontSizeLG:T,inputFontSizeSM:w}},xte=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),nL=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorderDisabled,boxShadow:`none`,cursor:`not-allowed`,opacity:1,"input[disabled], textarea[disabled]":{cursor:`not-allowed`},"&:hover:not([disabled])":{...xte(gs(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),rL=(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}}),iL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...rL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),aL=(e,t)=>({"&-outlined":{...rL(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...nL(e)},...iL(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...iL(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),oL=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),Ste=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...oL(e,{status:`error`,addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...oL(e,{status:`warning`,addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...nL(e)}}}}),sL=(e,t)=>{let{componentCls:n}=e;return{"&-borderless":{background:`transparent`,border:`none`,paddingBlock:e.calc(e.paddingBlock).add(e.lineWidth).equal(),[`&${n}-sm, &${n}-affix-wrapper-sm`]:{paddingBlock:e.calc(e.paddingBlockSM).add(e.lineWidth).equal()},[`&${n}-lg, &${n}-affix-wrapper-lg`]:{paddingBlock:e.calc(e.paddingBlockLG).add(e.lineWidth).equal()},"&: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}}},cL=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:`transparent`,"input&, & input, textarea&, & textarea":{color:t?.inputColor??`unset`},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),lL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...cL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),uL=(e,t)=>({"&-filled":{...cL(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...nL(e)},...lL(e,{status:`error`,bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError}),...lL(e,{status:`warning`,bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning}),...t}}),dL=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),Cte=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:`static`}},...dL(e,{status:`error`,addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...dL(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:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),fL=(e,t)=>({background:e.colorBgContainer,borderWidth:`${Y(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),pL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...fL(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`}}),mL=(e,t)=>({"&-underlined":{...fL(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`},...pL(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...pL(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),hL=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:`none`},"&:placeholder-shown":{textOverflow:`ellipsis`}}),gL=e=>{let{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=e;return{padding:`${Y(t)} ${Y(i)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},_L=e=>({padding:`${Y(e.paddingBlockSM)} ${Y(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),vL=(e,t={})=>({position:`relative`,display:`inline-block`,width:`100%`,minWidth:0,padding:`${Y(e.paddingBlock)} ${Y(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...hL(e.colorTextPlaceholder),"&-lg":{...gL(e),...t.largeStyle},"&-sm":{..._L(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:`rtl`}}),wte=e=>{let{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`]:{...gL(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{..._L(e)},[`&-lg ${n}-select-single`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single`]:{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 ${Y(e.paddingInline)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.inputFontSize,textAlign:`center`,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${Y(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${Y(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{backgroundColor:`inherit`,border:`${Y(e.lineWidth)} ${e.lineType} transparent`,boxShadow:`none`}},[`${n}-cascader-picker`]:{margin:`-9px ${Y(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}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select`]:{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`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:`block`,...Xc(),[`${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},[` & > ${t}-affix-wrapper, & > ${t}-number-affix-wrapper, & > ${n}-picker-range @@ -259,16 +259,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho & > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child, & > ${n}-select:last-child, & > ${n}-cascader-picker:last-child ${t}, - & > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:`top`},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{}}}}},Cte=e=>{let{componentCls:t,controlHeightSM:n,lineWidth:r,calc:i}=e,a=i(n).sub(i(r).mul(2)).sub(16).div(2).equal();return{[t]:{...Jc(e),...bL(e),...sL(e),...fL(e),...lL(e),...gL(e),'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:`none`}}}},wte=e=>{let{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:`pointer`,transition:`color ${e.motionDurationSlow}`,border:`none`,outline:`none`,backgroundColor:`transparent`,"&:hover":{color:e.colorIcon},"&:focus-visible":{color:e.colorIcon,borderRadius:e.borderRadiusSM,...Zc(e)},"&:active":{color:e.colorText},"&-hidden":{visibility:`hidden`},"&-has-suffix":{margin:`0 ${Y(e.inputAffixPadding)}`}}}},Tte=e=>{let{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:a,colorIconHover:o,iconCls:s}=e,c=`${t}-affix-wrapper`,l=`${t}-affix-wrapper-disabled`;return{[c]:{...bL(e),display:`inline-flex`,"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:`inherit`,border:`none`,borderRadius:0,outline:`none`,background:`transparent`,color:`inherit`,"&::-ms-reveal":{display:`none`},"&:focus":{boxShadow:`none !important`}},"&::before":{display:`inline-block`,width:0,visibility:`hidden`,content:`"\\a0"`},[t]:{"&-prefix, &-suffix":{display:`flex`,flex:`none`,alignItems:`center`,"> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:`ltr`},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}},...wte(e),[`${s}${t}-password-icon`]:{color:a,cursor:`pointer`,transition:`all ${i}`,"&:hover":{color:o}}},[`${t}-underlined`]:{borderRadius:0},[l]:{[`${s}${t}-password-icon`]:{color:a,cursor:`not-allowed`,"&:hover":{color:a}}}}},Ete=e=>{let{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:{...Jc(e),...Ste(e),"&-rtl":{direction:`rtl`},"&-wrapper":{display:`inline-block`,width:`100%`,textAlign:`start`,verticalAlign:`top`,"&-rtl":{direction:`rtl`},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}},...bte(e),...xte(e),[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}}},Dte=e=>{let{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},xL=rl([`Input`,`Shared`],e=>{let t=gs(e,nL(e));return[Cte(t),Tte(t)]},rL,{resetFont:!1}),SL=rl([`Input`,`Component`],e=>{let t=gs(e,nL(e));return[Ete(t),Dte(t),Yg(t,{focus:!0,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},rL,{resetFont:!1}),Ote=e=>{let{multipleSelectItemHeight:t,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:i}=e,a=e.max(e.calc(n).sub(r).equal(),0);return{basePadding:a,containerPadding:e.max(e.calc(a).sub(i).equal(),0),itemHeight:Y(t),itemLineHeight:Y(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},kte=e=>{let{componentCls:t,iconCls:n,borderRadiusSM:r,motionDurationSlow:i,paddingXS:a,multipleItemColorDisabled:o,multipleItemBorderColorDisabled:s,colorIcon:c,colorIconHover:l,INTERNAL_FIXED_ITEM_MARGIN:u}=e;return{[`${t}-selection-overflow`]:{position:`relative`,display:`flex`,flex:`auto`,flexWrap:`wrap`,maxWidth:`100%`,"&-item":{flex:`none`,alignSelf:`center`,maxWidth:`calc(100% - 4px)`,display:`inline-flex`},[`${t}-selection-item`]:{display:`flex`,alignSelf:`center`,flex:`none`,boxSizing:`border-box`,maxWidth:`100%`,marginBlock:u,borderRadius:r,cursor:`default`,transition:[`font-size`,`line-height`,`height`].map(e=>`${e} ${i}`).join(`, `),marginInlineEnd:e.calc(u).mul(2).equal(),paddingInlineStart:a,paddingInlineEnd:e.calc(a).div(2).equal(),[`${t}-disabled&`]:{color:o,borderColor:s,cursor:`not-allowed`},"&-content":{display:`inline-block`,marginInlineEnd:e.calc(a).div(2).equal(),overflow:`hidden`,whiteSpace:`pre`,textOverflow:`ellipsis`},"&-remove":{...Yc(),display:`inline-flex`,alignItems:`center`,color:c,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${n}`]:{verticalAlign:`-0.2em`},"&:hover":{color:l}}}}}},CL=(e,t)=>{let{componentCls:n,controlHeight:r}=e,i=t?`${n}-${t}`:``,a=Ote(e);return[{[`${n}-multiple${i}`]:{paddingBlock:a.containerPadding,paddingInlineStart:a.basePadding,minHeight:r,[`${n}-selection-item`]:{height:a.itemHeight,lineHeight:Y(a.itemLineHeight)}}}]},Ate=e=>{let{componentCls:t,calc:n,lineWidth:r}=e,i=gs(e,{fontHeight:e.fontSize,selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS,controlHeight:e.controlHeightSM}),a=gs(e,{fontHeight:n(e.multipleItemHeightLG).sub(n(r).mul(2).equal()).equal(),fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius,controlHeight:e.controlHeightLG});return[CL(i,`small`),CL(e),CL(a,`large`),{[`${t}${t}-multiple`]:{width:`100%`,cursor:`text`,[`${t}-selector`]:{flex:`auto`,padding:0,position:`relative`,"&:after":{margin:0},[`${t}-selection-placeholder`]:{position:`absolute`,top:`50%`,insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:0,transform:`translateY(-50%)`,transition:`all ${e.motionDurationSlow}`,overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`,flex:1,color:e.colorTextPlaceholder,pointerEvents:`none`}},...kte(e),[`${t}-multiple-input`]:{width:0,height:0,border:0,visibility:`hidden`,position:`absolute`,zIndex:-1}}}]},jte=e=>{let{pickerCellCls:t,pickerCellInnerCls:n,cellHeight:r,borderRadiusSM:i,motionDurationMid:a,cellHoverBg:o,lineWidth:s,lineType:c,colorPrimary:l,cellActiveWithRangeBg:u,colorTextLightSolid:d,colorTextDisabled:f,cellBgDisabled:p,colorFillSecondary:m}=e;return{"&::before":{position:`absolute`,top:`50%`,insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:r,transform:`translateY(-50%)`,content:`""`,pointerEvents:`none`},[n]:{position:`relative`,zIndex:2,display:`inline-block`,minWidth:r,height:r,lineHeight:Y(r),borderRadius:i,transition:`background-color ${a}`},[`&:hover:not(${t}-in-view):not(${t}-disabled), + & > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:`top`},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{}}}}},Tte=e=>{let{componentCls:t,controlHeightSM:n,lineWidth:r,calc:i}=e,a=i(n).sub(i(r).mul(2)).sub(16).div(2).equal();return{[t]:{...Jc(e),...vL(e),...aL(e),...uL(e),...sL(e),...mL(e),'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:`none`}}}},Ete=e=>{let{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:`pointer`,transition:`color ${e.motionDurationSlow}`,border:`none`,outline:`none`,backgroundColor:`transparent`,"&:hover":{color:e.colorIcon},"&:focus-visible":{color:e.colorIcon,borderRadius:e.borderRadiusSM,...Zc(e)},"&:active":{color:e.colorText},"&-hidden":{visibility:`hidden`},"&-has-suffix":{margin:`0 ${Y(e.inputAffixPadding)}`}}}},Dte=e=>{let{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:a,colorIconHover:o,iconCls:s}=e,c=`${t}-affix-wrapper`,l=`${t}-affix-wrapper-disabled`;return{[c]:{...vL(e),display:`inline-flex`,"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:`inherit`,border:`none`,borderRadius:0,outline:`none`,background:`transparent`,color:`inherit`,"&::-ms-reveal":{display:`none`},"&:focus":{boxShadow:`none !important`}},"&::before":{display:`inline-block`,width:0,visibility:`hidden`,content:`"\\a0"`},[t]:{"&-prefix, &-suffix":{display:`flex`,flex:`none`,alignItems:`center`,"> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:`ltr`},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}},...Ete(e),[`${s}${t}-password-icon`]:{color:a,cursor:`pointer`,transition:`all ${i}`,"&:hover":{color:o}}},[`${t}-underlined`]:{borderRadius:0},[l]:{[`${s}${t}-password-icon`]:{color:a,cursor:`not-allowed`,"&:hover":{color:a}}}}},Ote=e=>{let{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:{...Jc(e),...wte(e),"&-rtl":{direction:`rtl`},"&-wrapper":{display:`inline-block`,width:`100%`,textAlign:`start`,verticalAlign:`top`,"&-rtl":{direction:`rtl`},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}},...Ste(e),...Cte(e),[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}}},kte=e=>{let{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},yL=rl([`Input`,`Shared`],e=>{let t=gs(e,eL(e));return[Tte(t),Dte(t)]},tL,{resetFont:!1}),bL=rl([`Input`,`Component`],e=>{let t=gs(e,eL(e));return[Ote(t),kte(t),Yg(t,{focus:!0,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},tL,{resetFont:!1}),Ate=e=>{let{multipleSelectItemHeight:t,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:i}=e,a=e.max(e.calc(n).sub(r).equal(),0);return{basePadding:a,containerPadding:e.max(e.calc(a).sub(i).equal(),0),itemHeight:Y(t),itemLineHeight:Y(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},jte=e=>{let{componentCls:t,iconCls:n,borderRadiusSM:r,motionDurationSlow:i,paddingXS:a,multipleItemColorDisabled:o,multipleItemBorderColorDisabled:s,colorIcon:c,colorIconHover:l,INTERNAL_FIXED_ITEM_MARGIN:u}=e;return{[`${t}-selection-overflow`]:{position:`relative`,display:`flex`,flex:`auto`,flexWrap:`wrap`,maxWidth:`100%`,"&-item":{flex:`none`,alignSelf:`center`,maxWidth:`calc(100% - 4px)`,display:`inline-flex`},[`${t}-selection-item`]:{display:`flex`,alignSelf:`center`,flex:`none`,boxSizing:`border-box`,maxWidth:`100%`,marginBlock:u,borderRadius:r,cursor:`default`,transition:[`font-size`,`line-height`,`height`].map(e=>`${e} ${i}`).join(`, `),marginInlineEnd:e.calc(u).mul(2).equal(),paddingInlineStart:a,paddingInlineEnd:e.calc(a).div(2).equal(),[`${t}-disabled&`]:{color:o,borderColor:s,cursor:`not-allowed`},"&-content":{display:`inline-block`,marginInlineEnd:e.calc(a).div(2).equal(),overflow:`hidden`,whiteSpace:`pre`,textOverflow:`ellipsis`},"&-remove":{...Yc(),display:`inline-flex`,alignItems:`center`,color:c,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${n}`]:{verticalAlign:`-0.2em`},"&:hover":{color:l}}}}}},xL=(e,t)=>{let{componentCls:n,controlHeight:r}=e,i=t?`${n}-${t}`:``,a=Ate(e);return[{[`${n}-multiple${i}`]:{paddingBlock:a.containerPadding,paddingInlineStart:a.basePadding,minHeight:r,[`${n}-selection-item`]:{height:a.itemHeight,lineHeight:Y(a.itemLineHeight)}}}]},Mte=e=>{let{componentCls:t,calc:n,lineWidth:r}=e,i=gs(e,{fontHeight:e.fontSize,selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS,controlHeight:e.controlHeightSM}),a=gs(e,{fontHeight:n(e.multipleItemHeightLG).sub(n(r).mul(2).equal()).equal(),fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius,controlHeight:e.controlHeightLG});return[xL(i,`small`),xL(e),xL(a,`large`),{[`${t}${t}-multiple`]:{width:`100%`,cursor:`text`,[`${t}-selector`]:{flex:`auto`,padding:0,position:`relative`,"&:after":{margin:0},[`${t}-selection-placeholder`]:{position:`absolute`,top:`50%`,insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:0,transform:`translateY(-50%)`,transition:`all ${e.motionDurationSlow}`,overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`,flex:1,color:e.colorTextPlaceholder,pointerEvents:`none`}},...jte(e),[`${t}-multiple-input`]:{width:0,height:0,border:0,visibility:`hidden`,position:`absolute`,zIndex:-1}}}]},Nte=e=>{let{pickerCellCls:t,pickerCellInnerCls:n,cellHeight:r,borderRadiusSM:i,motionDurationMid:a,cellHoverBg:o,lineWidth:s,lineType:c,colorPrimary:l,cellActiveWithRangeBg:u,colorTextLightSolid:d,colorTextDisabled:f,cellBgDisabled:p,colorFillSecondary:m}=e;return{"&::before":{position:`absolute`,top:`50%`,insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:r,transform:`translateY(-50%)`,content:`""`,pointerEvents:`none`},[n]:{position:`relative`,zIndex:2,display:`inline-block`,minWidth:r,height:r,lineHeight:Y(r),borderRadius:i,transition:`background-color ${a}`},[`&:hover:not(${t}-in-view):not(${t}-disabled), &:hover:not(${t}-selected):not(${t}-range-start):not(${t}-range-end):not(${t}-disabled)`]:{[n]:{background:o}},[`&-in-view${t}-today ${n}`]:{"&::before":{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:1,border:`${Y(s)} ${c} ${l}`,borderRadius:i,content:`""`}},[`&-in-view${t}-in-range, &-in-view${t}-range-start, &-in-view${t}-range-end`]:{position:`relative`,[`&:not(${t}-disabled):before`]:{background:u}},[`&-in-view${t}-selected, &-in-view${t}-range-start, - &-in-view${t}-range-end`]:{[`&:not(${t}-disabled) ${n}`]:{color:d,background:l},[`&${t}-disabled ${n}`]:{background:m}},[`&-in-view${t}-range-start:not(${t}-disabled):before`]:{insetInlineStart:`50%`},[`&-in-view${t}-range-end:not(${t}-disabled):before`]:{insetInlineEnd:`50%`},[`&-in-view${t}-range-start:not(${t}-range-end) ${n}`]:{borderStartStartRadius:i,borderEndStartRadius:i,borderStartEndRadius:0,borderEndEndRadius:0},[`&-in-view${t}-range-end:not(${t}-range-start) ${n}`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:i,borderEndEndRadius:i},"&-disabled":{color:f,cursor:`not-allowed`,[n]:{background:`transparent`},"&::before":{background:p}},[`&-disabled${t}-today ${n}::before`]:{borderColor:f}}},Mte=e=>{let{componentCls:t,pickerCellCls:n,pickerCellInnerCls:r,pickerYearMonthCellWidth:i,pickerControlIconSize:a,cellWidth:o,paddingSM:s,paddingXS:c,paddingXXS:l,colorBgContainer:u,lineWidth:d,lineType:f,borderRadiusLG:p,colorPrimary:m,colorTextHeading:h,colorSplit:g,pickerControlIconBorderWidth:_,colorIcon:v,textHeight:y,motionDurationMid:b,colorIconHover:x,fontWeightStrong:S,cellHeight:C,pickerCellPaddingVertical:w,colorTextDisabled:T,colorText:E,fontSize:D,motionDurationSlow:O,withoutTimeCellHeight:k,pickerQuarterPanelContentHeight:A,borderRadiusSM:j,colorTextLightSolid:M,cellHoverBg:N,timeColumnHeight:P,timeColumnWidth:F,timeCellHeight:I,controlItemBgActive:L,marginXXS:R,pickerDatePanelPaddingHorizontal:z,pickerControlIconMargin:B}=e,V=e.calc(o).mul(7).add(e.calc(z).mul(2)).equal();return{[t]:{"&-panel":{display:`inline-flex`,flexDirection:`column`,textAlign:`center`,background:u,borderRadius:p,outline:`none`,"&-focused":{borderColor:m},"&-rtl":{[`${t}-prev-icon, + &-in-view${t}-range-end`]:{[`&:not(${t}-disabled) ${n}`]:{color:d,background:l},[`&${t}-disabled ${n}`]:{background:m}},[`&-in-view${t}-range-start:not(${t}-disabled):before`]:{insetInlineStart:`50%`},[`&-in-view${t}-range-end:not(${t}-disabled):before`]:{insetInlineEnd:`50%`},[`&-in-view${t}-range-start:not(${t}-range-end) ${n}`]:{borderStartStartRadius:i,borderEndStartRadius:i,borderStartEndRadius:0,borderEndEndRadius:0},[`&-in-view${t}-range-end:not(${t}-range-start) ${n}`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:i,borderEndEndRadius:i},"&-disabled":{color:f,cursor:`not-allowed`,[n]:{background:`transparent`},"&::before":{background:p}},[`&-disabled${t}-today ${n}::before`]:{borderColor:f}}},Pte=e=>{let{componentCls:t,pickerCellCls:n,pickerCellInnerCls:r,pickerYearMonthCellWidth:i,pickerControlIconSize:a,cellWidth:o,paddingSM:s,paddingXS:c,paddingXXS:l,colorBgContainer:u,lineWidth:d,lineType:f,borderRadiusLG:p,colorPrimary:m,colorTextHeading:h,colorSplit:g,pickerControlIconBorderWidth:_,colorIcon:v,textHeight:y,motionDurationMid:b,colorIconHover:x,fontWeightStrong:S,cellHeight:C,pickerCellPaddingVertical:w,colorTextDisabled:T,colorText:E,fontSize:D,motionDurationSlow:O,withoutTimeCellHeight:k,pickerQuarterPanelContentHeight:A,borderRadiusSM:j,colorTextLightSolid:M,cellHoverBg:N,timeColumnHeight:P,timeColumnWidth:F,timeCellHeight:I,controlItemBgActive:L,marginXXS:R,pickerDatePanelPaddingHorizontal:z,pickerControlIconMargin:B}=e,V=e.calc(o).mul(7).add(e.calc(z).mul(2)).equal();return{[t]:{"&-panel":{display:`inline-flex`,flexDirection:`column`,textAlign:`center`,background:u,borderRadius:p,outline:`none`,"&-focused":{borderColor:m},"&-rtl":{[`${t}-prev-icon, ${t}-super-prev-icon`]:{transform:`rotate(45deg)`},[`${t}-next-icon, - ${t}-super-next-icon`]:{transform:`rotate(-135deg)`},[`${t}-time-panel`]:{[`${t}-content`]:{direction:`ltr`,"> *":{direction:`rtl`}}}}},"&-decade-panel, &-year-panel, &-quarter-panel, &-month-panel, &-week-panel, &-date-panel, &-time-panel":{display:`flex`,flexDirection:`column`,width:V},"&-header":{display:`flex`,padding:`0 ${Y(c)}`,color:h,borderBottom:`${Y(d)} ${f} ${g}`,"> *":{flex:`none`},button:{padding:0,color:v,lineHeight:Y(y),background:`transparent`,border:0,cursor:`pointer`,transition:`color ${b}`,fontSize:`inherit`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,"&:empty":{display:`none`}},"> button":{minWidth:`1.6em`,fontSize:D,"&:hover":{color:x},"&:disabled":{opacity:.25,pointerEvents:`none`}},"&-view":{flex:`auto`,fontWeight:S,lineHeight:Y(y),"> button":{color:`inherit`,fontWeight:`inherit`,verticalAlign:`top`,"&:not(:first-child)":{marginInlineStart:c},"&:hover":{color:m}}}},"&-prev-icon, &-next-icon, &-super-prev-icon, &-super-next-icon":{position:`relative`,width:a,height:a,"&::before":{position:`absolute`,top:0,insetInlineStart:0,width:a,height:a,border:`0 solid currentcolor`,borderBlockStartWidth:_,borderInlineStartWidth:_,content:`""`}},"&-super-prev-icon, &-super-next-icon":{"&::after":{position:`absolute`,top:B,insetInlineStart:B,display:`inline-block`,width:a,height:a,border:`0 solid currentcolor`,borderBlockStartWidth:_,borderInlineStartWidth:_,content:`""`}},"&-prev-icon, &-super-prev-icon":{transform:`rotate(-45deg)`},"&-next-icon, &-super-next-icon":{transform:`rotate(135deg)`},"&-content":{width:`100%`,tableLayout:`fixed`,borderCollapse:`collapse`,"th, td":{position:`relative`,minWidth:C,fontWeight:`normal`},th:{height:e.calc(C).add(e.calc(w).mul(2)).equal(),color:E,verticalAlign:`middle`}},"&-cell":{padding:`${Y(w)} 0`,color:T,cursor:`pointer`,"&-in-view":{color:E},...jte(e)},"&-decade-panel, &-year-panel, &-quarter-panel, &-month-panel":{[`${t}-content`]:{height:e.calc(k).mul(4).equal()},[r]:{padding:`0 ${Y(c)}`}},"&-quarter-panel":{[`${t}-content`]:{height:A}},"&-decade-panel":{[r]:{padding:`0 ${Y(e.calc(c).div(2).equal())}`},[`${t}-cell::before`]:{display:`none`}},"&-year-panel, &-quarter-panel, &-month-panel":{[`${t}-body`]:{padding:`0 ${Y(c)}`},[r]:{width:i}},"&-date-panel":{[`${t}-body`]:{padding:`${Y(c)} ${Y(z)}`},[`${t}-content th`]:{boxSizing:`border-box`,padding:0}},"&-week-panel-row":{td:{"&:before":{transition:`background-color ${b}`},"&:first-child:before":{borderStartStartRadius:j,borderEndStartRadius:j},"&:last-child:before":{borderStartEndRadius:j,borderEndEndRadius:j}},"&:hover td:before":{background:N},"&-range-start td, &-range-end td, &-selected td, &-hover td":{[`&${n}`]:{"&:before":{background:m},[`&${t}-cell-week`]:{color:new Rs(M).setA(.5).toHexString()},[r]:{color:M}}},"&-range-hover td:before":{background:L}},"&-week-panel, &-date-panel-show-week":{[`${t}-body`]:{padding:`${Y(c)} ${Y(s)}`},[`${t}-content th`]:{width:`auto`}},"&-datetime-panel":{display:`flex`,[`${t}-time-panel`]:{borderInlineStart:`${Y(d)} ${f} ${g}`},[`${t}-date-panel, + ${t}-super-next-icon`]:{transform:`rotate(-135deg)`},[`${t}-time-panel`]:{[`${t}-content`]:{direction:`ltr`,"> *":{direction:`rtl`}}}}},"&-decade-panel, &-year-panel, &-quarter-panel, &-month-panel, &-week-panel, &-date-panel, &-time-panel":{display:`flex`,flexDirection:`column`,width:V},"&-header":{display:`flex`,padding:`0 ${Y(c)}`,color:h,borderBottom:`${Y(d)} ${f} ${g}`,"> *":{flex:`none`},button:{padding:0,color:v,lineHeight:Y(y),background:`transparent`,border:0,cursor:`pointer`,transition:`color ${b}`,fontSize:`inherit`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,"&:empty":{display:`none`}},"> button":{minWidth:`1.6em`,fontSize:D,"&:hover":{color:x},"&:disabled":{opacity:.25,pointerEvents:`none`}},"&-view":{flex:`auto`,fontWeight:S,lineHeight:Y(y),"> button":{color:`inherit`,fontWeight:`inherit`,verticalAlign:`top`,"&:not(:first-child)":{marginInlineStart:c},"&:hover":{color:m}}}},"&-prev-icon, &-next-icon, &-super-prev-icon, &-super-next-icon":{position:`relative`,width:a,height:a,"&::before":{position:`absolute`,top:0,insetInlineStart:0,width:a,height:a,border:`0 solid currentcolor`,borderBlockStartWidth:_,borderInlineStartWidth:_,content:`""`}},"&-super-prev-icon, &-super-next-icon":{"&::after":{position:`absolute`,top:B,insetInlineStart:B,display:`inline-block`,width:a,height:a,border:`0 solid currentcolor`,borderBlockStartWidth:_,borderInlineStartWidth:_,content:`""`}},"&-prev-icon, &-super-prev-icon":{transform:`rotate(-45deg)`},"&-next-icon, &-super-next-icon":{transform:`rotate(135deg)`},"&-content":{width:`100%`,tableLayout:`fixed`,borderCollapse:`collapse`,"th, td":{position:`relative`,minWidth:C,fontWeight:`normal`},th:{height:e.calc(C).add(e.calc(w).mul(2)).equal(),color:E,verticalAlign:`middle`}},"&-cell":{padding:`${Y(w)} 0`,color:T,cursor:`pointer`,"&-in-view":{color:E},...Nte(e)},"&-decade-panel, &-year-panel, &-quarter-panel, &-month-panel":{[`${t}-content`]:{height:e.calc(k).mul(4).equal()},[r]:{padding:`0 ${Y(c)}`}},"&-quarter-panel":{[`${t}-content`]:{height:A}},"&-decade-panel":{[r]:{padding:`0 ${Y(e.calc(c).div(2).equal())}`},[`${t}-cell::before`]:{display:`none`}},"&-year-panel, &-quarter-panel, &-month-panel":{[`${t}-body`]:{padding:`0 ${Y(c)}`},[r]:{width:i}},"&-date-panel":{[`${t}-body`]:{padding:`${Y(c)} ${Y(z)}`},[`${t}-content th`]:{boxSizing:`border-box`,padding:0}},"&-week-panel-row":{td:{"&:before":{transition:`background-color ${b}`},"&:first-child:before":{borderStartStartRadius:j,borderEndStartRadius:j},"&:last-child:before":{borderStartEndRadius:j,borderEndEndRadius:j}},"&:hover td:before":{background:N},"&-range-start td, &-range-end td, &-selected td, &-hover td":{[`&${n}`]:{"&:before":{background:m},[`&${t}-cell-week`]:{color:new Rs(M).setA(.5).toHexString()},[r]:{color:M}}},"&-range-hover td:before":{background:L}},"&-week-panel, &-date-panel-show-week":{[`${t}-body`]:{padding:`${Y(c)} ${Y(s)}`},[`${t}-content th`]:{width:`auto`}},"&-datetime-panel":{display:`flex`,[`${t}-time-panel`]:{borderInlineStart:`${Y(d)} ${f} ${g}`},[`${t}-date-panel, ${t}-time-panel`]:{transition:`opacity ${O}`},"&-active":{[`${t}-date-panel, - ${t}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:`auto`,minWidth:`auto`,[`${t}-content`]:{display:`flex`,flex:`auto`,height:P},"&-column":{flex:`1 0 auto`,width:F,margin:`${Y(l)} 0`,padding:0,overflowY:`auto`,textAlign:`start`,listStyle:`none`,transition:`background-color ${b}`,overflowX:`hidden`,"&::-webkit-scrollbar":{width:8,backgroundColor:`transparent`},"&::-webkit-scrollbar-thumb":{backgroundColor:e.colorTextTertiary,borderRadius:e.borderRadiusSM},"&":{scrollbarWidth:`thin`,scrollbarColor:`${e.colorTextTertiary} transparent`},"&::after":{display:`block`,height:`calc(100% - ${Y(I)})`,content:`""`},"&:not(:first-child)":{borderInlineStart:`${Y(d)} ${f} ${g}`},"&-active":{background:new Rs(L).setA(.2).toHexString()},"> li":{margin:0,padding:0,[`&${t}-time-panel-cell`]:{marginInline:R,[`${t}-time-panel-cell-inner`]:{display:`block`,width:e.calc(F).sub(e.calc(R).mul(2)).equal(),height:I,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:e.calc(F).sub(I).div(2).equal(),color:E,lineHeight:Y(I),borderRadius:j,cursor:`pointer`,transition:`background-color ${b}`,"&:hover":{background:N}},"&-selected":{[`${t}-time-panel-cell-inner`]:{background:L}},"&-disabled":{[`${t}-time-panel-cell-inner`]:{color:T,background:`transparent`,cursor:`not-allowed`}}}}}}}}},Nte=e=>{let{componentCls:t,textHeight:n,lineWidth:r,paddingSM:i,antCls:a,colorPrimary:o,cellActiveWithRangeBg:s,colorPrimaryBorder:c,lineType:l,colorSplit:u}=e;return{[`${t}-dropdown`]:{[`${t}-footer`]:{borderTop:`${Y(r)} ${l} ${u}`,"&-extra":{padding:`0 ${Y(i)}`,lineHeight:Y(e.calc(n).sub(e.calc(r).mul(2)).equal()),textAlign:`start`,"&:not(:last-child)":{borderBottom:`${Y(r)} ${l} ${u}`}}},[`${t}-panels + ${t}-footer ${t}-ranges`]:{justifyContent:`space-between`},[`${t}-ranges`]:{marginBlock:0,paddingInline:Y(i),overflow:`hidden`,textAlign:`start`,listStyle:`none`,display:`flex`,justifyContent:`center`,alignItems:`center`,"> li":{lineHeight:Y(e.calc(n).sub(e.calc(r).mul(2)).equal()),display:`inline-block`},[`${t}-now-btn-disabled`]:{pointerEvents:`none`,color:e.colorTextDisabled},[`${t}-preset > ${a}-tag-blue`]:{color:o,background:s,borderColor:c,cursor:`pointer`},[`${t}-ok`]:{paddingBlock:e.calc(r).mul(2).equal(),marginInlineStart:`auto`}}}}},Pte=e=>{let{componentCls:t,controlHeightLG:n,paddingXXS:r,padding:i}=e;return{pickerCellCls:`${t}-cell`,pickerCellInnerCls:`${t}-cell-inner`,pickerYearMonthCellWidth:e.calc(n).mul(1.5).equal(),pickerQuarterPanelContentHeight:e.calc(n).mul(1.4).equal(),pickerCellPaddingVertical:e.calc(r).add(e.calc(r).div(2)).equal(),pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconMargin:4,pickerControlIconBorderWidth:1.5,pickerDatePanelPaddingHorizontal:e.calc(i).add(e.calc(r).div(2)).equal()}},Fte=e=>{let{colorBgContainerDisabled:t,controlHeight:n,controlHeightSM:r,controlHeightLG:i,paddingXXS:a,lineWidth:o}=e,s=a*2,c=o*2,l=Math.min(n-s,n-c),u=Math.min(r-s,r-c),d=Math.min(i-s,i-c);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(a/2),cellHoverBg:e.controlItemBgHover,cellActiveWithRangeBg:e.controlItemBgActive,cellHoverWithRangeBg:new Rs(e.colorPrimary).lighten(35).toHexString(),cellRangeBorderColor:new Rs(e.colorPrimary).lighten(20).toHexString(),cellBgDisabled:t,timeColumnWidth:i*1.4,timeColumnHeight:224,timeCellHeight:28,cellWidth:r*1.5,cellHeight:r,textHeight:i,withoutTimeCellHeight:i*1.65,multipleItemBg:e.colorFillSecondary,multipleItemBorderColor:`transparent`,multipleItemHeight:l,multipleItemHeightSM:u,multipleItemHeightLG:d,multipleSelectorBgDisabled:t,multipleItemColorDisabled:e.colorTextDisabled,multipleItemBorderColorDisabled:`transparent`}},Ite=e=>({...rL(e),...Fte(e),...cw(e),presetsWidth:120,presetsMaxWidth:200,zIndexPopup:e.zIndexPopupBase+50}),Lte=e=>{let{componentCls:t}=e;return{[t]:[{...sL(e),...gL(e),...fL(e),...lL(e)},{"&-outlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-filled":{[`&${t}-multiple ${t}-selection-item`]:{background:e.colorBgContainer,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}},"&-borderless":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-underlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}}}]}},wL=(e,t)=>({padding:`${Y(e)} ${Y(t)}`}),Rte=e=>{let{componentCls:t,colorError:n,colorWarning:r}=e;return{[`${t}:not(${t}-disabled):not([disabled])`]:{[`&${t}-status-error`]:{[`${t}-active-bar`]:{background:n}},[`&${t}-status-warning`]:{[`${t}-active-bar`]:{background:r}}}}},zte=e=>{let{componentCls:t,antCls:n,paddingInline:r,lineWidth:i,lineType:a,colorBorder:o,borderRadius:s,motionDurationMid:c,colorTextDisabled:l,colorTextPlaceholder:u,colorTextQuaternary:d,fontSizeLG:f,inputFontSizeLG:p,fontSizeSM:m,inputFontSizeSM:h,controlHeightSM:g,paddingInlineSM:_,paddingXS:v,marginXS:y,colorIcon:b,lineWidthBold:x,colorPrimary:S,motionDurationSlow:C,zIndexPopup:w,paddingXXS:T,sizePopupArrow:E,colorBgElevated:D,borderRadiusLG:O,boxShadowSecondary:k,borderRadiusSM:A,colorSplit:j,cellHoverBg:M,presetsWidth:N,presetsMaxWidth:P,boxShadowPopoverArrow:F,fontHeight:I,lineHeightLG:L}=e;return[{[t]:{...Jc(e),...wL(e.paddingBlock,e.paddingInline),position:`relative`,display:`inline-flex`,alignItems:`center`,lineHeight:1,borderRadius:s,transition:[`border`,`box-shadow`,`background-color`].map(e=>`${e} ${c}`).join(`, `),[`${t}-prefix`]:{flex:`0 0 auto`,marginInlineEnd:e.inputAffixPadding},[`${t}-input`]:{position:`relative`,display:`inline-flex`,alignItems:`center`,width:`100%`,"> input":{position:`relative`,display:`inline-block`,width:`100%`,color:`inherit`,fontSize:e.inputFontSize??e.fontSize,lineHeight:e.lineHeight,transition:`all ${c}`,..._L(u),flex:`auto`,minWidth:1,height:`auto`,padding:0,background:`transparent`,border:0,fontFamily:`inherit`,"&:focus":{boxShadow:`none`,outline:0},"&[disabled]":{background:`transparent`,color:l,cursor:`not-allowed`}},"&-placeholder":{"> input":{color:u}}},"&-large":{...wL(e.paddingBlockLG,e.paddingInlineLG),borderRadius:e.borderRadiusLG,[`${t}-input > input`]:{fontSize:p??f,lineHeight:L}},"&-small":{...wL(e.paddingBlockSM,e.paddingInlineSM),borderRadius:e.borderRadiusSM,[`${t}-input > input`]:{fontSize:h??m}},[`${t}-suffix`]:{display:`flex`,flex:`none`,alignSelf:`center`,marginInlineStart:e.calc(v).div(2).equal(),color:d,lineHeight:1,pointerEvents:`none`,transition:[`opacity`,`color`].map(e=>`${e} ${c}`).join(`, `),"> *":{verticalAlign:`top`,"&:not(:last-child)":{marginInlineEnd:y}}},[`${t}-clear`]:{position:`absolute`,top:`50%`,insetInlineEnd:0,color:d,lineHeight:1,transform:`translateY(-50%)`,cursor:`pointer`,opacity:0,transition:[`opacity`,`color`].map(e=>`${e} ${c}`).join(`, `),"> *":{verticalAlign:`top`},"&:hover":{color:b}},"&:hover":{[`${t}-clear`]:{opacity:1},[`${t}-suffix:not(:last-child)`]:{opacity:0}},[`${t}-separator`]:{position:`relative`,display:`inline-block`,width:`1em`,height:f,color:d,fontSize:f,verticalAlign:`top`,cursor:`default`,[`${t}-focused &`]:{color:b},[`${t}-range-separator &`]:{[`${t}-disabled &`]:{cursor:`not-allowed`}}},"&-range":{position:`relative`,display:`inline-flex`,[`${t}-active-bar`]:{bottom:e.calc(i).mul(-1).equal(),height:x,background:S,opacity:0,transition:`all ${C} ease-out`,pointerEvents:`none`},[`&${t}-focused`]:{[`${t}-active-bar`]:{opacity:1}},[`${t}-range-separator`]:{alignItems:`center`,padding:`0 ${Y(v)}`,lineHeight:1}},"&-range, &-multiple":{[`${t}-clear`]:{insetInlineEnd:r},[`&${t}-small`]:{[`${t}-clear`]:{insetInlineEnd:_}}},"&-dropdown":{...Jc(e),...Mte(e),pointerEvents:`none`,position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:w,[`&${t}-dropdown-hidden`]:{display:`none`},"&-rtl":{direction:`rtl`},[`&${t}-dropdown-placement-bottomLeft, + ${t}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:`auto`,minWidth:`auto`,[`${t}-content`]:{display:`flex`,flex:`auto`,height:P},"&-column":{flex:`1 0 auto`,width:F,margin:`${Y(l)} 0`,padding:0,overflowY:`auto`,textAlign:`start`,listStyle:`none`,transition:`background-color ${b}`,overflowX:`hidden`,"&::-webkit-scrollbar":{width:8,backgroundColor:`transparent`},"&::-webkit-scrollbar-thumb":{backgroundColor:e.colorTextTertiary,borderRadius:e.borderRadiusSM},"&":{scrollbarWidth:`thin`,scrollbarColor:`${e.colorTextTertiary} transparent`},"&::after":{display:`block`,height:`calc(100% - ${Y(I)})`,content:`""`},"&:not(:first-child)":{borderInlineStart:`${Y(d)} ${f} ${g}`},"&-active":{background:new Rs(L).setA(.2).toHexString()},"> li":{margin:0,padding:0,[`&${t}-time-panel-cell`]:{marginInline:R,[`${t}-time-panel-cell-inner`]:{display:`block`,width:e.calc(F).sub(e.calc(R).mul(2)).equal(),height:I,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:e.calc(F).sub(I).div(2).equal(),color:E,lineHeight:Y(I),borderRadius:j,cursor:`pointer`,transition:`background-color ${b}`,"&:hover":{background:N}},"&-selected":{[`${t}-time-panel-cell-inner`]:{background:L}},"&-disabled":{[`${t}-time-panel-cell-inner`]:{color:T,background:`transparent`,cursor:`not-allowed`}}}}}}}}},Fte=e=>{let{componentCls:t,textHeight:n,lineWidth:r,paddingSM:i,antCls:a,colorPrimary:o,cellActiveWithRangeBg:s,colorPrimaryBorder:c,lineType:l,colorSplit:u}=e;return{[`${t}-dropdown`]:{[`${t}-footer`]:{borderTop:`${Y(r)} ${l} ${u}`,"&-extra":{padding:`0 ${Y(i)}`,lineHeight:Y(e.calc(n).sub(e.calc(r).mul(2)).equal()),textAlign:`start`,"&:not(:last-child)":{borderBottom:`${Y(r)} ${l} ${u}`}}},[`${t}-panels + ${t}-footer ${t}-ranges`]:{justifyContent:`space-between`},[`${t}-ranges`]:{marginBlock:0,paddingInline:Y(i),overflow:`hidden`,textAlign:`start`,listStyle:`none`,display:`flex`,justifyContent:`center`,alignItems:`center`,"> li":{lineHeight:Y(e.calc(n).sub(e.calc(r).mul(2)).equal()),display:`inline-block`},[`${t}-now-btn-disabled`]:{pointerEvents:`none`,color:e.colorTextDisabled},[`${t}-preset > ${a}-tag-blue`]:{color:o,background:s,borderColor:c,cursor:`pointer`},[`${t}-ok`]:{paddingBlock:e.calc(r).mul(2).equal(),marginInlineStart:`auto`}}}}},Ite=e=>{let{componentCls:t,controlHeightLG:n,paddingXXS:r,padding:i}=e;return{pickerCellCls:`${t}-cell`,pickerCellInnerCls:`${t}-cell-inner`,pickerYearMonthCellWidth:e.calc(n).mul(1.5).equal(),pickerQuarterPanelContentHeight:e.calc(n).mul(1.4).equal(),pickerCellPaddingVertical:e.calc(r).add(e.calc(r).div(2)).equal(),pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconMargin:4,pickerControlIconBorderWidth:1.5,pickerDatePanelPaddingHorizontal:e.calc(i).add(e.calc(r).div(2)).equal()}},Lte=e=>{let{colorBgContainerDisabled:t,controlHeight:n,controlHeightSM:r,controlHeightLG:i,paddingXXS:a,lineWidth:o}=e,s=a*2,c=o*2,l=Math.min(n-s,n-c),u=Math.min(r-s,r-c),d=Math.min(i-s,i-c);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(a/2),cellHoverBg:e.controlItemBgHover,cellActiveWithRangeBg:e.controlItemBgActive,cellHoverWithRangeBg:new Rs(e.colorPrimary).lighten(35).toHexString(),cellRangeBorderColor:new Rs(e.colorPrimary).lighten(20).toHexString(),cellBgDisabled:t,timeColumnWidth:i*1.4,timeColumnHeight:224,timeCellHeight:28,cellWidth:r*1.5,cellHeight:r,textHeight:i,withoutTimeCellHeight:i*1.65,multipleItemBg:e.colorFillSecondary,multipleItemBorderColor:`transparent`,multipleItemHeight:l,multipleItemHeightSM:u,multipleItemHeightLG:d,multipleSelectorBgDisabled:t,multipleItemColorDisabled:e.colorTextDisabled,multipleItemBorderColorDisabled:`transparent`}},Rte=e=>({...tL(e),...Lte(e),...ow(e),presetsWidth:120,presetsMaxWidth:200,zIndexPopup:e.zIndexPopupBase+50}),zte=e=>{let{componentCls:t}=e;return{[t]:[{...aL(e),...mL(e),...uL(e),...sL(e)},{"&-outlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-filled":{[`&${t}-multiple ${t}-selection-item`]:{background:e.colorBgContainer,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}},"&-borderless":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-underlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}}}]}},SL=(e,t)=>({padding:`${Y(e)} ${Y(t)}`}),Bte=e=>{let{componentCls:t,colorError:n,colorWarning:r}=e;return{[`${t}:not(${t}-disabled):not([disabled])`]:{[`&${t}-status-error`]:{[`${t}-active-bar`]:{background:n}},[`&${t}-status-warning`]:{[`${t}-active-bar`]:{background:r}}}}},Vte=e=>{let{componentCls:t,antCls:n,paddingInline:r,lineWidth:i,lineType:a,colorBorder:o,borderRadius:s,motionDurationMid:c,colorTextDisabled:l,colorTextPlaceholder:u,colorTextQuaternary:d,fontSizeLG:f,inputFontSizeLG:p,fontSizeSM:m,inputFontSizeSM:h,controlHeightSM:g,paddingInlineSM:_,paddingXS:v,marginXS:y,colorIcon:b,lineWidthBold:x,colorPrimary:S,motionDurationSlow:C,zIndexPopup:w,paddingXXS:T,sizePopupArrow:E,colorBgElevated:D,borderRadiusLG:O,boxShadowSecondary:k,borderRadiusSM:A,colorSplit:j,cellHoverBg:M,presetsWidth:N,presetsMaxWidth:P,boxShadowPopoverArrow:F,fontHeight:I,lineHeightLG:L}=e;return[{[t]:{...Jc(e),...SL(e.paddingBlock,e.paddingInline),position:`relative`,display:`inline-flex`,alignItems:`center`,lineHeight:1,borderRadius:s,transition:[`border`,`box-shadow`,`background-color`].map(e=>`${e} ${c}`).join(`, `),[`${t}-prefix`]:{flex:`0 0 auto`,marginInlineEnd:e.inputAffixPadding},[`${t}-input`]:{position:`relative`,display:`inline-flex`,alignItems:`center`,width:`100%`,"> input":{position:`relative`,display:`inline-block`,width:`100%`,color:`inherit`,fontSize:e.inputFontSize??e.fontSize,lineHeight:e.lineHeight,transition:`all ${c}`,...hL(u),flex:`auto`,minWidth:1,height:`auto`,padding:0,background:`transparent`,border:0,fontFamily:`inherit`,"&:focus":{boxShadow:`none`,outline:0},"&[disabled]":{background:`transparent`,color:l,cursor:`not-allowed`}},"&-placeholder":{"> input":{color:u}}},"&-large":{...SL(e.paddingBlockLG,e.paddingInlineLG),borderRadius:e.borderRadiusLG,[`${t}-input > input`]:{fontSize:p??f,lineHeight:L}},"&-small":{...SL(e.paddingBlockSM,e.paddingInlineSM),borderRadius:e.borderRadiusSM,[`${t}-input > input`]:{fontSize:h??m}},[`${t}-suffix`]:{display:`flex`,flex:`none`,alignSelf:`center`,marginInlineStart:e.calc(v).div(2).equal(),color:d,lineHeight:1,pointerEvents:`none`,transition:[`opacity`,`color`].map(e=>`${e} ${c}`).join(`, `),"> *":{verticalAlign:`top`,"&:not(:last-child)":{marginInlineEnd:y}}},[`${t}-clear`]:{position:`absolute`,top:`50%`,insetInlineEnd:0,color:d,lineHeight:1,transform:`translateY(-50%)`,cursor:`pointer`,opacity:0,transition:[`opacity`,`color`].map(e=>`${e} ${c}`).join(`, `),"> *":{verticalAlign:`top`},"&:hover":{color:b}},"&:hover":{[`${t}-clear`]:{opacity:1},[`${t}-suffix:not(:last-child)`]:{opacity:0}},[`${t}-separator`]:{position:`relative`,display:`inline-block`,width:`1em`,height:f,color:d,fontSize:f,verticalAlign:`top`,cursor:`default`,[`${t}-focused &`]:{color:b},[`${t}-range-separator &`]:{[`${t}-disabled &`]:{cursor:`not-allowed`}}},"&-range":{position:`relative`,display:`inline-flex`,[`${t}-active-bar`]:{bottom:e.calc(i).mul(-1).equal(),height:x,background:S,opacity:0,transition:`all ${C} ease-out`,pointerEvents:`none`},[`&${t}-focused`]:{[`${t}-active-bar`]:{opacity:1}},[`${t}-range-separator`]:{alignItems:`center`,padding:`0 ${Y(v)}`,lineHeight:1}},"&-range, &-multiple":{[`${t}-clear`]:{insetInlineEnd:r},[`&${t}-small`]:{[`${t}-clear`]:{insetInlineEnd:_}}},"&-dropdown":{...Jc(e),...Pte(e),pointerEvents:`none`,position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:w,[`&${t}-dropdown-hidden`]:{display:`none`},"&-rtl":{direction:`rtl`},[`&${t}-dropdown-placement-bottomLeft, &${t}-dropdown-placement-bottomRight`]:{[`${t}-range-arrow`]:{top:0,display:`block`,transform:`translateY(-100%)`}},[`&${t}-dropdown-placement-topLeft, &${t}-dropdown-placement-topRight`]:{[`${t}-range-arrow`]:{bottom:0,display:`block`,transform:`translateY(100%) rotate(180deg)`}},[`&${n}-slide-up-appear, &${n}-slide-up-enter`]:{[`${t}-range-arrow${t}-range-arrow`]:{transition:`none`}},[`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topLeft, &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topRight, @@ -278,25 +278,25 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomLeft, &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomRight`]:{animationName:Nh},[`&${n}-slide-up-leave ${t}-panel-container`]:{pointerEvents:`none`},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topLeft, &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topRight`]:{animationName:Ih},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomLeft, - &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomRight`]:{animationName:Ph},[`${t}-panel > ${t}-time-panel`]:{paddingTop:T},[`${t}-range-wrapper`]:{display:`flex`,position:`relative`},[`${t}-range-arrow`]:{position:`absolute`,zIndex:1,display:`none`,paddingInline:e.calc(r).mul(1.5).equal(),boxSizing:`content-box`,transition:`all ${C} ease-out`,...lw(e,D,F),"&:before":{insetInlineStart:e.calc(r).mul(1.5).equal()}},[`${t}-panel-container`]:{overflow:`hidden`,verticalAlign:`top`,background:D,borderRadius:O,boxShadow:k,transition:`margin ${C}`,display:`inline-block`,pointerEvents:`auto`,[`${t}-panel-layout`]:{display:`flex`,flexWrap:`nowrap`,alignItems:`stretch`},[`${t}-presets`]:{display:`flex`,flexDirection:`column`,minWidth:N,maxWidth:P,ul:{height:0,flex:`auto`,listStyle:`none`,overflow:`auto`,margin:0,padding:v,borderInlineEnd:`${Y(i)} ${a} ${j}`,li:{...qc,borderRadius:A,paddingInline:v,paddingBlock:e.calc(g).sub(I).div(2).equal(),cursor:`pointer`,transition:`all ${C}`,"+ li":{marginTop:y},"&:hover":{background:M}}}},[`${t}-panels`]:{display:`inline-flex`,flexWrap:`nowrap`,"&:last-child":{[`${t}-panel`]:{borderWidth:0}}},[`${t}-panel`]:{verticalAlign:`top`,background:`transparent`,borderRadius:0,borderWidth:0,[`${t}-content, table`]:{textAlign:`center`},"&-focused":{borderColor:o}}}},"&-dropdown-range":{padding:`${Y(e.calc(E).mul(2).div(3).equal())} 0`,"&-hidden":{display:`none`}},"&-rtl":{direction:`rtl`,[`${t}-separator`]:{transform:`scale(-1, 1)`},[`${t}-footer`]:{"&-extra":{direction:`rtl`}}}}},Hh(e,`slide-up`),Hh(e,`slide-down`),Mh(e,`move-up`),Mh(e,`move-down`)]},TL=rl(`DatePicker`,e=>{let t=gs(nL(e),Pte(e),{inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[Nte(t),zte(t),Lte(t),Rte(t),Ate(t),Yg(e,{focusElCls:`${e.componentCls}-focused`})]},Ite),Bte={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z`}},{tag:`path`,attrs:{d:`M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z`}}]},name:`plus`,theme:`outlined`};function EL(){return EL=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,EL({},e,{ref:t,icon:Bte}))),Vte=c(o(((e,t)=>{t.exports=a,t.exports.isMobile=a,t.exports.default=a;var n=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,i=/android|ipad|playbook|silk/i;function a(e){e||={};let t=e.ua;if(!t&&typeof navigator<`u`&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers[`user-agent`]==`string`&&(t=t.headers[`user-agent`]),typeof t!=`string`)return!1;let a=n.test(t)&&!r.test(t)||!!e.tablet&&i.test(t);return!a&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf(`Macintosh`)!==-1&&t.indexOf(`Safari`)!==-1&&(a=!0),a}}))()),OL,Hte=()=>(OL===void 0&&(OL=(0,Vte.default)()),OL),kL=(0,S.createContext)(null),Ute=e=>{let{activeTabOffset:t,horizontal:n,rtl:r,indicator:i={}}=e,{size:a,align:o=`center`}=i,[s,c]=(0,S.useState)(),l=(0,S.useRef)(),u=S.useCallback(e=>typeof a==`function`?a(e):typeof a==`number`?a:e,[a]);function d(){ri.cancel(l.current)}return(0,S.useEffect)(()=>{let e={};if(t)if(n){e.width=u(t.width);let n=r?`right`:`left`;o===`start`&&(e[n]=t[n]),o===`center`&&(e[n]=t[n]+t.width/2,e.transform=r?`translateX(50%)`:`translateX(-50%)`),o===`end`&&(e[n]=t[n]+t.width,e.transform=`translateX(-100%)`)}else e.height=u(t.height),o===`start`&&(e.top=t.top),o===`center`&&(e.top=t.top+t.height/2,e.transform=`translateY(-50%)`),o===`end`&&(e.top=t.top+t.height,e.transform=`translateY(-100%)`);return d(),l.current=ri(()=>{s&&e&&Object.keys(e).every(t=>{let n=e[t],r=s[t];return typeof n==`number`&&typeof r==`number`?Math.round(n)===Math.round(r):n===r})||c(e)}),d},[JSON.stringify(t),n,r,o,u]),{style:s}},AL={width:0,height:0,left:0,top:0};function Wte(e,t,n){return(0,S.useMemo)(()=>{let n=new Map,r=t.get(e[0]?.key)||AL,i=r.left+r.width;for(let r=0;re.key).join(`_`),t,n])}function jL(e,t){let n=S.useRef(e),[,r]=S.useState({});function i(e){let i=typeof e==`function`?e(n.current):e;i!==n.current&&t(i,n.current),n.current=i,r({})}return[n.current,i]}var Gte=.1,ML=.01,NL=20,PL=.995**NL;function FL(e,t){let[n,r]=(0,S.useState)(),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(),u=(0,S.useRef)();function d(e){let{screenX:t,screenY:n}=e.touches[0];r({x:t,y:n}),window.clearInterval(u.current)}function f(e){if(!n)return;let{screenX:o,screenY:c}=e.touches[0];r({x:o,y:c});let u=o-n.x,d=c-n.y;t(u,d);let f=Date.now();a(f),s(f-i),l({x:u,y:d})}function p(){if(n&&(r(null),l(null),c)){let e=c.x/o,n=c.y/o;if(Math.max(Math.abs(e),Math.abs(n)){if(Math.abs(r)o?(i=n,m.current=`x`):(i=r,m.current=`y`),t(-i,-i)&&e.preventDefault()}let g=(0,S.useRef)(null);g.current={onTouchStart:d,onTouchMove:f,onTouchEnd:p,onWheel:h},S.useEffect(()=>{function t(e){g.current.onTouchStart(e)}function n(e){g.current.onTouchMove(e)}function r(e){g.current.onTouchEnd(e)}function i(e){g.current.onWheel(e)}return document.addEventListener(`touchmove`,n,{passive:!1}),document.addEventListener(`touchend`,r,{passive:!0}),e.current.addEventListener(`touchstart`,t,{passive:!0}),e.current.addEventListener(`wheel`,i,{passive:!1}),()=>{document.removeEventListener(`touchmove`,n),document.removeEventListener(`touchend`,r)}},[])}function IL(e){let[t,n]=(0,S.useState)(0),r=(0,S.useRef)(0),i=(0,S.useRef)();return i.current=e,Bn(()=>{i.current?.()},[t]),()=>{r.current===t&&(r.current+=1,n(r.current))}}function LL(e){let t=(0,S.useRef)([]),[,n]=(0,S.useState)({}),r=(0,S.useRef)(typeof e==`function`?e():e),i=IL(()=>{let e=r.current;t.current.forEach(t=>{e=t(e)}),t.current=[],r.current=e,n({})});function a(e){t.current.push(e),i()}return[r.current,a]}var RL={width:0,height:0,left:0,top:0,right:0};function zL(e,t,n,r,i,a,{tabs:o,tabPosition:s,rtl:c}){let l,u,d;return[`top`,`bottom`].includes(s)?(l=`width`,u=c?`right`:`left`,d=Math.abs(n)):(l=`height`,u=`top`,d=-n),(0,S.useMemo)(()=>{if(!o.length)return[0,0];let n=o.length,r=n;for(let i=0;iMath.floor(d+t)){r=i-1;break}}let i=0;for(let t=n-1;t>=0;--t)if((e.get(o[t].key)||RL)[u]r?[0,-1]:[i,r]},[e,t,r,i,a,d,s,o.map(e=>e.key).join(`_`),c])}function BL(e){let t;return e instanceof Map?(t={},e.forEach((e,n)=>{t[n]=e})):t=e,JSON.stringify(t)}var VL=`TABS_DQ`;function HL(e){return String(e).replace(/"/g,VL)}function UL(e,t,n,r){return!(!n||r||e===!1||e===void 0&&(t===!1||t===null))}var WL=S.forwardRef((e,t)=>{let{prefixCls:n,editable:r,locale:i,style:a}=e;return!r||r.showAdd===!1?null:S.createElement(`button`,{ref:t,type:`button`,className:`${n}-nav-add`,style:a,"aria-label":i?.addAriaLabel||`Add tab`,onClick:e=>{r.onEdit(`add`,{event:e})}},r.addIcon||`+`)}),GL=S.forwardRef((e,t)=>{let{position:n,prefixCls:r,extra:i}=e;if(!i)return null;let a,o={};return typeof i==`object`&&!S.isValidElement(i)?o=i:o.right=i,n===`right`&&(a=o.right),n===`left`&&(a=o.left),a?S.createElement(`div`,{className:`${r}-extra-content`,ref:t},a):null});function KL(){return KL=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,id:r,tabs:i,locale:a,mobile:o,more:s={},style:c,className:l,editable:u,tabBarGutter:d,rtl:f,removeAriaLabel:p,onTabClick:m,getPopupContainer:h,popupClassName:g,popupStyle:_}=e,[v,y]=(0,S.useState)(!1),[b,x]=(0,S.useState)(null),{icon:C=`More`}=s,w=`${r}-more-popup`,T=`${n}-dropdown`,E=b===null?null:`${w}-${b}`,D=a?.dropdownAriaLabel;function O(e,t){e.preventDefault(),e.stopPropagation(),u.onEdit(`remove`,{key:t,event:e})}let k=S.createElement(mE,{onClick:({key:e,domEvent:t})=>{m(e,t),y(!1)},prefixCls:`${T}-menu`,id:w,tabIndex:-1,role:`listbox`,"aria-activedescendant":E,selectedKeys:[b],"aria-label":D===void 0?`expanded dropdown`:D},i.map(e=>{let{closable:t,disabled:n,closeIcon:i,key:a,label:o}=e,s=UL(t,i,u,n);return S.createElement(WT,{key:a,id:`${w}-${a}`,role:`option`,"aria-controls":r&&`${r}-panel-${a}`,disabled:n},S.createElement(`span`,null,o),s&&S.createElement(`button`,{type:`button`,"aria-label":p||`remove`,tabIndex:0,className:`${T}-menu-item-remove`,onClick:e=>{e.stopPropagation(),O(e,a)}},i||u.removeIcon||`×`))}));function A(e){let t=i.filter(e=>!e.disabled),n=t.findIndex(e=>e.key===b)||0,r=t.length;for(let i=0;i{let e=document.getElementById(E);e?.scrollIntoView&&e.scrollIntoView(!1)},[E,b]),(0,S.useEffect)(()=>{v||x(null)},[v]);let M={marginInlineStart:d};i.length||(M.visibility=`hidden`,M.order=1);let N=J(g,{[`${T}-rtl`]:f}),P=o?null:S.createElement($w,KL({prefixCls:T,overlay:k,visible:i.length?v:!1,onVisibleChange:y,overlayClassName:N,overlayStyle:_,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:h},s),S.createElement(`button`,{type:`button`,className:`${n}-nav-more`,style:M,"aria-haspopup":`listbox`,"aria-controls":w,id:`${r}-more`,"aria-expanded":v,onKeyDown:j},C));return S.createElement(`div`,{className:J(`${n}-nav-operations`,l),style:c,ref:t},P,S.createElement(WL,{prefixCls:n,locale:a,editable:u}))}),JL=S.memo(qL,(e,t)=>t.tabMoving),YL=e=>{let{prefixCls:t,id:n,active:r,focus:i,tab:{key:a,label:o,disabled:s,closeIcon:c,icon:l},closable:u,renderWrapper:d,removeAriaLabel:f,editable:p,onClick:m,onFocus:h,onBlur:g,onKeyDown:_,onMouseDown:v,onMouseUp:y,style:b,className:x,tabCount:C,currentPosition:w}=e,T=`${t}-tab`,E=UL(u,c,p,s);function D(e){s||m(e)}function O(e){e.preventDefault(),e.stopPropagation(),p.onEdit(`remove`,{key:a,event:e})}let k=S.useMemo(()=>l&&typeof o==`string`?S.createElement(`span`,null,o):o,[o,l]),A=S.useRef(null);S.useEffect(()=>{i&&A.current&&A.current.focus()},[i]);let j=S.createElement(`div`,{key:a,"data-node-key":HL(a),className:J(T,x,{[`${T}-with-remove`]:E,[`${T}-active`]:r,[`${T}-disabled`]:s,[`${T}-focus`]:i}),style:b,onClick:D},S.createElement(`div`,{ref:A,role:`tab`,"aria-selected":r,id:n&&`${n}-tab-${a}`,className:`${T}-btn`,"aria-controls":n&&`${n}-panel-${a}`,"aria-disabled":s,tabIndex:s?null:r?0:-1,onClick:e=>{e.stopPropagation(),D(e)},onKeyDown:_,onMouseDown:v,onMouseUp:y,onFocus:h,onBlur:g},i&&S.createElement(`div`,{"aria-live":`polite`,style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},`Tab ${w} of ${C}`),l&&S.createElement(`span`,{className:`${T}-icon`},l),o&&k),E&&S.createElement(`button`,{type:`button`,"aria-label":f||`remove`,tabIndex:r?0:-1,className:`${T}-remove`,onClick:e=>{e.stopPropagation(),O(e)}},c||p.removeIcon||`×`));return d?d(j):j};function XL(){return XL=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{offsetWidth:n,offsetHeight:r,offsetTop:i,offsetLeft:a}=e,{width:o,height:s,left:c,top:l}=e.getBoundingClientRect();return Math.abs(o-n)<1?[o,s,c-t.left,l-t.top]:[n,r,a,i]},QL=e=>{let{offsetWidth:t=0,offsetHeight:n=0}=e.current||{};if(e.current){let{width:n,height:r}=e.current.getBoundingClientRect();if(Math.abs(n-t)<1)return[n,r]}return[t,n]},$L=(e,t)=>e[+!t],eR=S.forwardRef((e,t)=>{let{className:n,style:r,id:i,animated:a,activeKey:o,rtl:s,extra:c,editable:l,locale:u,tabPosition:d,tabBarGutter:f,children:p,onTabClick:m,onTabScroll:h,indicator:g,classNames:_,styles:v}=e,{prefixCls:y,tabs:b}=S.useContext(kL),x=(0,S.useRef)(null),C=(0,S.useRef)(null),w=(0,S.useRef)(null),T=(0,S.useRef)(null),E=(0,S.useRef)(null),D=(0,S.useRef)(null),O=(0,S.useRef)(null),k=d===`top`||d===`bottom`,[A,j]=jL(0,(e,t)=>{k&&h&&h({direction:e>t?`left`:`right`})}),[M,N]=jL(0,(e,t)=>{!k&&h&&h({direction:e>t?`top`:`bottom`})}),[P,F]=(0,S.useState)([0,0]),[I,L]=(0,S.useState)([0,0]),[R,z]=(0,S.useState)([0,0]),[B,V]=(0,S.useState)([0,0]),[H,U]=LL(new Map),W=Wte(b,H,I[0]),ee=$L(P,k),te=$L(I,k),ne=$L(R,k),re=$L(B,k),ie=Math.floor(ee)K?K:e}let ce=(0,S.useRef)(null),[q,le]=(0,S.useState)();function ue(){le(Date.now())}function de(){ce.current&&clearTimeout(ce.current)}FL(T,(e,t)=>{function n(e,t){e(e=>se(e+t))}return ie?(k?n(j,e):n(N,t),de(),ue(),!0):!1}),(0,S.useEffect)(()=>(de(),q&&(ce.current=setTimeout(()=>{le(0)},100)),de),[q]);let[fe,pe]=zL(W,ae,k?A:M,te,ne,re,{...e,tabs:b}),me=In((e=o)=>{let t=W.get(e)||{width:0,height:0,left:0,right:0,top:0};if(k){let e=A;s?t.rightA+ae&&(e=t.right+t.width-ae):t.left<-A?e=-t.left:t.left+t.width>-A+ae&&(e=-(t.left+t.width-ae)),N(0),j(se(e))}else{let e=M;t.top<-M?e=-t.top:t.top+t.height>-M+ae&&(e=-(t.top+t.height-ae)),j(0),N(se(e))}}),[he,ge]=(0,S.useState)(),[_e,ve]=(0,S.useState)(!1),ye=b.filter(e=>!e.disabled).map(e=>e.key),be=e=>{let t=ye.indexOf(he||o),n=ye.length,r=ye[(t+e+n)%n];ge(r)},xe=(e,t)=>{let n=ye.indexOf(e),r=b.find(t=>t.key===e);UL(r?.closable,r?.closeIcon,l,r?.disabled)&&(t.preventDefault(),t.stopPropagation(),l.onEdit(`remove`,{key:e,event:t}),n===ye.length-1?be(-1):be(1))},Se=(e,t)=>{ve(!0),t.button===1&&xe(e,t)},Ce=e=>{let{code:t}=e,n=s&&k,r=ye[0],i=ye[ye.length-1];switch(t){case`ArrowLeft`:k&&be(n?1:-1);break;case`ArrowRight`:k&&be(n?-1:1);break;case`ArrowUp`:e.preventDefault(),k||be(-1);break;case`ArrowDown`:e.preventDefault(),k||be(1);break;case`Home`:e.preventDefault(),ge(r);break;case`End`:e.preventDefault(),ge(i);break;case`Enter`:case`Space`:e.preventDefault(),m(he??o,e);break;case`Backspace`:case`Delete`:xe(he,e);break}},we={};k?we.marginInlineStart=f:we.marginTop=f;let Te=b.map((e,t)=>{let{key:n}=e;return S.createElement(YL,{id:i,prefixCls:y,key:n,tab:e,className:_?.item,style:t===0?v?.item:{...we,...v?.item},closable:e.closable,editable:l,active:n===o,focus:n===he,renderWrapper:p,removeAriaLabel:u?.removeAriaLabel,tabCount:ye.length,currentPosition:t+1,onClick:e=>{m(n,e)},onKeyDown:Ce,onFocus:()=>{_e||ge(n),me(n),ue(),T.current&&(s||(T.current.scrollLeft=0),T.current.scrollTop=0)},onBlur:()=>{ge(void 0)},onMouseDown:e=>Se(n,e),onMouseUp:()=>{ve(!1)}})}),Ee=()=>U(()=>{let e=new Map,t=E.current?.getBoundingClientRect();return b.forEach(({key:n})=>{let r=E.current?.querySelector(`[data-node-key="${HL(n)}"]`);if(r){let[i,a,o,s]=ZL(r,t);e.set(n,{width:i,height:a,left:o,top:s})}}),e});(0,S.useEffect)(()=>{Ee()},[b.map(e=>e.key).join(`_`)]);let De=IL(()=>{let e=QL(x),t=QL(C),n=QL(w);F([e[0]-t[0]-n[0],e[1]-t[1]-n[1]]);let r=QL(O);z(r),V(QL(D));let i=QL(E);L([i[0]-r[0],i[1]-r[1]]),Ee()}),Oe=b.slice(0,fe),ke=b.slice(pe+1),Ae=[...Oe,...ke],je=W.get(o),{style:Me}=Ute({activeTabOffset:je,horizontal:k,indicator:g,rtl:s});(0,S.useEffect)(()=>{me()},[o,oe,K,BL(je),BL(W),k]),(0,S.useEffect)(()=>{De()},[s]);let Ne=!!Ae.length,Pe=`${y}-nav-wrap`,Fe,Ie,Le,Re;return k?s?(Ie=A>0,Fe=A!==K):(Fe=A<0,Ie=A!==oe):(Le=M<0,Re=M!==oe),S.createElement(Wr,{onResize:De},S.createElement(`div`,{ref:er(t,x),role:`tablist`,"aria-orientation":k?`horizontal`:`vertical`,className:J(`${y}-nav`,n,_?.header),style:{...v?.header,...r},onKeyDown:()=>{ue()}},S.createElement(GL,{ref:C,position:`left`,extra:c,prefixCls:y}),S.createElement(Wr,{onResize:De},S.createElement(`div`,{className:J(Pe,{[`${Pe}-ping-left`]:Fe,[`${Pe}-ping-right`]:Ie,[`${Pe}-ping-top`]:Le,[`${Pe}-ping-bottom`]:Re}),ref:T},S.createElement(Wr,{onResize:De},S.createElement(`div`,{ref:E,className:`${y}-nav-list`,style:{transform:`translate(${A}px, ${M}px)`,transition:q?`none`:void 0}},Te,S.createElement(WL,{ref:O,prefixCls:y,locale:u,editable:l,style:{...Te.length===0?void 0:we,visibility:Ne?`hidden`:null}}),S.createElement(`div`,{className:J(`${y}-ink-bar`,_?.indicator,{[`${y}-ink-bar-animated`]:a.inkBar}),style:{...Me,...v?.indicator}}))))),S.createElement(JL,XL({},e,{removeAriaLabel:u?.removeAriaLabel,ref:D,prefixCls:y,tabs:Ae,className:!Ne&&G,popupStyle:v?.popup,tabMoving:!!q})),S.createElement(GL,{ref:w,position:`right`,extra:c,prefixCls:y})))}),tR=({renderTabBar:e,...t})=>e?e(t,eR):S.createElement(eR,t),nR=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,id:a,active:o,tabKey:s,children:c}=e,l=S.Children.count(c)>0;return S.createElement(`div`,{id:a&&`${a}-panel-${s}`,role:`tabpanel`,tabIndex:o&&l?0:-1,"aria-labelledby":a&&`${a}-tab-${s}`,"aria-hidden":!o,style:i,className:J(n,o&&`${n}-active`,r),ref:t},c)});function rR(){return rR=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:t,activeKey:n,animated:r,tabPosition:i,destroyOnHidden:a,contentStyle:o,contentClassName:s}=e,{prefixCls:c,tabs:l}=S.useContext(kL),u=r.tabPane,d=`${c}-tabpane`;return S.createElement(`div`,{className:J(`${c}-content-holder`)},S.createElement(`div`,{className:J(`${c}-content`,`${c}-content-${i}`,{[`${c}-content-animated`]:u})},l.map(e=>{let{key:i,forceRender:c,style:l,className:f,destroyOnHidden:p,...m}=e,h=i===n;return S.createElement(Iu,rR({key:i,visible:h,forceRender:c,removeOnLeave:!!(a??p),leavedClassName:`${d}-hidden`},r.tabPaneMotion),({style:e,className:n},r)=>S.createElement(nR,rR({},m,{prefixCls:d,id:t,tabKey:i,animated:u,active:h,style:{...o,...l,...e},className:J(s,f,n),ref:r})))})))};function aR(e={inkBar:!0,tabPane:!1}){let t;return t=e===!1?{inkBar:!1,tabPane:!1}:e===!0?{inkBar:!0,tabPane:!1}:{inkBar:!0,...typeof e==`object`?e:{}},t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}function oR(){return oR=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,prefixCls:r=`rc-tabs`,className:i,items:a,direction:o,activeKey:s,defaultActiveKey:c,editable:l,animated:u,tabPosition:d=`top`,tabBarGutter:f,tabBarStyle:p,tabBarExtraContent:m,locale:h,more:g,destroyOnHidden:_,renderTabBar:v,onChange:y,onTabClick:b,onTabScroll:x,getPopupContainer:C,popupClassName:w,indicator:T,classNames:E,styles:D,...O}=e,k=S.useMemo(()=>(a||[]).filter(e=>e&&typeof e==`object`&&`key`in e),[a]),A=o===`rtl`,j=aR(u),[M,N]=(0,S.useState)(!1);(0,S.useEffect)(()=>{N(Hte())},[]);let[P,F]=Hn(c??k[0]?.key,s),[I,L]=(0,S.useState)(()=>k.findIndex(e=>e.key===P));(0,S.useEffect)(()=>{let e=k.findIndex(e=>e.key===P);e===-1&&(e=Math.max(0,Math.min(I,k.length-1)),F(k[e]?.key)),L(e)},[k.map(e=>e.key).join(`_`),P,I]);let[R,z]=Hn(null,n);(0,S.useEffect)(()=>{n||(z(`rc-tabs-${sR}`),sR+=1)},[]);function B(e,t){b?.(e,t);let n=e!==P;F(e),n&&y?.(e)}let V={id:R,activeKey:P,animated:j,tabPosition:d,rtl:A,mobile:M},H={...V,editable:l,locale:h,more:g,tabBarGutter:f,onTabClick:B,onTabScroll:x,extra:m,style:p,getPopupContainer:C,popupClassName:J(w,E?.popup),indicator:T,styles:D,classNames:E},U=S.useMemo(()=>({tabs:k,prefixCls:r}),[k,r]);return S.createElement(kL.Provider,{value:U},S.createElement(`div`,oR({ref:t,id:n,className:J(r,`${r}-${d}`,{[`${r}-mobile`]:M,[`${r}-editable`]:l,[`${r}-rtl`]:A},i)},O),S.createElement(tR,oR({},H,{renderTabBar:v})),S.createElement(iR,oR({destroyOnHidden:_},V,{contentStyle:D?.content,contentClassName:E?.content,animated:j}))))}),lR={motionAppear:!1,motionEnter:!0,motionLeave:!0};function uR(e,t={inkBar:!0,tabPane:!1}){let n;return n=t===!1?{inkBar:!1,tabPane:!1}:t===!0?{inkBar:!0,tabPane:!0}:{inkBar:!0,...hd(t)?t:{}},n.tabPane&&(n.tabPaneMotion={...lR,motionName:Gm(e,`switch`)}),n}function dR(e){return e.filter(e=>e)}function fR(e,t){return e?e.map(e=>({...e,destroyOnHidden:e.destroyOnHidden??e.destroyInactiveTabPane})):dR(Cr(t).map(e=>{if(S.isValidElement(e)){let{key:t,props:n}=e,{tab:r,...i}=n||{};return{key:String(t),...i,label:r}}return null}))}var pR=e=>{let{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:`none`,"&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:`absolute`,transition:`none`,inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[Hh(e,`slide-up`),Hh(e,`slide-down`)]]},mR=e=>{let{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:a,itemSelectedColor:o}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${Y(e.lineWidth)} ${e.lineType} ${a}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:o,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:Zc(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:`none`},[`${t}-ink-bar`]:{visibility:`hidden`}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:Y(i)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:Y(i)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Y(e.borderRadiusLG)} 0 0 ${Y(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},hR=e=>{let{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{[`${t}-dropdown`]:{...Jc(e),position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:`block`,"&-hidden":{display:`none`},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${Y(r)} 0`,overflowX:`hidden`,overflowY:`auto`,textAlign:{_skip_check_:!0,value:`left`},listStyleType:`none`,backgroundColor:e.colorBgContainer,backgroundClip:`padding-box`,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,"&-item":{...qc,display:`flex`,alignItems:`center`,minWidth:e.tabsDropdownWidth,margin:0,padding:`${Y(e.paddingXXS)} ${Y(e.paddingSM)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:`nowrap`},"&-remove":{flex:`none`,marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:`transparent`,border:0,cursor:`pointer`,"&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:`transparent`,cursor:`not-allowed`}}}}}}},gR=e=>{let{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:a,verticalItemMargin:o,motionDurationSlow:s,calc:c}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:`column`,[`> ${t}-nav, > div > ${t}-nav`]:{margin:i,"&::before":{position:`absolute`,right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${r}`,content:`''`},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:[`width`,`left`,`right`].map(e=>`${e} ${s}`).join(`, `)}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav, - > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:`column`,minWidth:c(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:a,textAlign:`center`},[`${t}-tab + ${t}-tab`]:{margin:o},[`${t}-nav-wrap`]:{flexDirection:`column`,"&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:[`height`,`top`].map(e=>`${e} ${s}`).join(`, `)}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:`1 0 auto`,flexDirection:`column`}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:Y(c(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:c(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},_R=e=>{let{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:a,horizontalItemPaddingSM:o,horizontalItemPaddingLG:s}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:o,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:i,minHeight:i}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${Y(e.borderRadius)} ${Y(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${Y(e.borderRadius)} ${Y(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Y(e.borderRadius)} ${Y(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Y(e.borderRadius)} 0 0 ${Y(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:a,minHeight:a}}}}}},vR=e=>{let{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:a,horizontalItemPadding:o,itemSelectedColor:s,itemColor:c}=e,l=`${t}-tab`;return{[l]:{position:`relative`,WebkitTouchCallout:`none`,WebkitTapHighlightColor:`transparent`,display:`inline-flex`,alignItems:`center`,padding:o,fontSize:e.titleFontSize,background:`transparent`,border:0,outline:`none`,cursor:`pointer`,color:c,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:`none`,transition:`all ${e.motionDurationSlow}`,[`${l}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":{flex:`none`,lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:`transparent`,border:`none`,outline:`none`,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading},...Qc(e)},"&:hover":{color:r},[`&${l}-active ${l}-btn`]:{color:s},[`&${l}-focus ${l}-btn:focus-visible`]:Zc(e),[`&${l}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`},[`&${l}-disabled ${l}-btn, &${l}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${l}-remove ${i}`]:{margin:0,verticalAlign:`middle`},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${l} + ${l}`]:{margin:{_skip_check_:!0,value:a}}}},yR=e=>{let{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:a}=e;return{[`${t}-rtl`]:{direction:`rtl`,[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:e.marginSM}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:e.marginXS},marginLeft:{_skip_check_:!0,value:a(e.marginXXS).mul(-1).equal()},[r]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:i},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:`rtl`},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:`right`}}}}},bR=e=>{let{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:a,itemActiveColor:o,colorBorderSecondary:s}=e;return{[t]:{...Jc(e),display:`flex`,[`> ${t}-nav, > div > ${t}-nav`]:{position:`relative`,display:`flex`,flex:`none`,alignItems:`center`,[`${t}-nav-wrap`]:{position:`relative`,display:`flex`,flex:`auto`,alignSelf:`stretch`,overflow:`hidden`,whiteSpace:`nowrap`,transform:`translate(0)`,"&::before, &::after":{position:`absolute`,zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:`''`,pointerEvents:`none`}},[`${t}-nav-list`]:{position:`relative`,display:`flex`,transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:`flex`,alignSelf:`stretch`},[`${t}-nav-operations-hidden`]:{position:`absolute`,visibility:`hidden`,pointerEvents:`none`},[`${t}-nav-more`]:{position:`relative`,padding:n,background:`transparent`,border:0,color:e.colorText,"&::after":{position:`absolute`,right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:`translateY(100%)`,content:`''`}},[`${t}-nav-add`]:{minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:i},background:`transparent`,border:`${Y(e.lineWidth)} ${e.lineType} ${s}`,borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`,outline:`none`,cursor:`pointer`,color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:a},"&:active, &:focus:not(:focus-visible)":{color:o},...Qc(e,-3)}},[`${t}-extra-content`]:{flex:`none`},[`${t}-ink-bar`]:{position:`absolute`,background:e.inkBarColor,pointerEvents:`none`},...vR(e),[`${t}-content`]:{position:`relative`,width:`100%`},[`${t}-content-holder`]:{flex:`auto`,minWidth:0,minHeight:0},[`${t}-tabpane`]:{...Qc(e),"&-hidden":{display:`none`}}},[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:`auto`}}}}}},xR=rl(`Tabs`,e=>{let t=gs(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${Y(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${Y(e.horizontalItemGutter)}`});return[_R(t),yR(t),gR(t),hR(t),mR(t),bR(t),pR(t)]},e=>{let{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:a}=e,o=t||a,s=n||i,c=r||a+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:o,cardHeightSM:s,cardHeightLG:c,cardPadding:`${(o-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(s-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(c-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:``,horizontalItemMarginRTL:``,horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}}),SR=()=>null,CR=S.forwardRef((e,t)=>{let{type:n,className:r,rootClassName:i,size:a,onEdit:o,hideAdd:s,centered:c,addIcon:l,removeIcon:u,moreIcon:d,more:f,popupClassName:p,children:m,items:h,animated:g,style:_,indicatorSize:v,indicator:y,classNames:b,styles:x,destroyInactiveTabPane:C,destroyOnHidden:w,tabPlacement:T,tabPosition:E,...D}=e,{prefixCls:O}=D,{getPrefixCls:k,direction:A,getPopupContainer:j,className:M,style:N,classNames:P,styles:F}=li(`tabs`),{tabs:I}=S.useContext(oi),L=k(`tabs`,O),R=bf(L),[z,B]=xR(L,R),V=S.useRef(null);S.useImperativeHandle(t,()=>({nativeElement:V.current}));let H;n===`editable-card`&&(H={onEdit:(e,{key:t,event:n})=>{o?.(e===`add`?n:t,e)},removeIcon:u??I?.removeIcon??S.createElement(Rl,null),addIcon:(l??I?.addIcon)||S.createElement(DL,null),showAdd:s!==!0});let U=k(),W=th(a),ee=fR(h,m),te=uR(L,g),ne={align:y?.align??I?.indicator?.align,size:y?.size??v??I?.indicator?.size??I?.indicatorSize},re=S.useMemo(()=>{let e=T??E??void 0,t=A===`rtl`;switch(e){case`start`:return t?`right`:`left`;case`end`:return t?`left`:`right`;default:return e}},[T,E,A]),ie={...e,size:W,tabPlacement:re,items:ee},[ae,G]=Fd([P,b],[F,x],{props:ie},{popup:{_default:`root`}});return S.createElement(cR,{ref:V,direction:A,getPopupContainer:j,...D,items:ee,className:J({[`${L}-large`]:W===`large`,[`${L}-small`]:W===`small`,[`${L}-card`]:[`card`,`editable-card`].includes(n),[`${L}-editable-card`]:n===`editable-card`,[`${L}-centered`]:c},M,r,i,ae.root,z,B,R),classNames:{...ae,popup:J(p,z,B,R,ae.popup?.root)},styles:G,style:{...G.root,...N,..._},editable:H,more:{icon:I?.more?.icon??I?.moreIcon??d??S.createElement(jE,null),transitionName:`${U}-slide-up`,...f},prefixCls:L,animated:te,indicator:ne,destroyOnHidden:w??C,tabPosition:re})});CR.TabPane=SR;var wR=({prefixCls:e,className:t,hoverable:n=!0,...r})=>{let{getPrefixCls:i}=S.useContext(oi),a=i(`card`,e),o=J(`${a}-grid`,t,{[`${a}-grid-hoverable`]:n});return S.createElement(`div`,{...r,className:o})},TR=e=>{let{antCls:t,componentCls:n,headerHeight:r,headerPadding:i,tabsMarginBottom:a}=e;return{display:`flex`,justifyContent:`center`,flexDirection:`column`,minHeight:r,marginBottom:-1,padding:`0 ${Y(i)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`,...Xc(),"&-wrapper":{width:`100%`,display:`flex`,alignItems:`center`},"&-title":{display:`inline-block`,flex:1,...qc,[` + &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomRight`]:{animationName:Ph},[`${t}-panel > ${t}-time-panel`]:{paddingTop:T},[`${t}-range-wrapper`]:{display:`flex`,position:`relative`},[`${t}-range-arrow`]:{position:`absolute`,zIndex:1,display:`none`,paddingInline:e.calc(r).mul(1.5).equal(),boxSizing:`content-box`,transition:`all ${C} ease-out`,...sw(e,D,F),"&:before":{insetInlineStart:e.calc(r).mul(1.5).equal()}},[`${t}-panel-container`]:{overflow:`hidden`,verticalAlign:`top`,background:D,borderRadius:O,boxShadow:k,transition:`margin ${C}`,display:`inline-block`,pointerEvents:`auto`,[`${t}-panel-layout`]:{display:`flex`,flexWrap:`nowrap`,alignItems:`stretch`},[`${t}-presets`]:{display:`flex`,flexDirection:`column`,minWidth:N,maxWidth:P,ul:{height:0,flex:`auto`,listStyle:`none`,overflow:`auto`,margin:0,padding:v,borderInlineEnd:`${Y(i)} ${a} ${j}`,li:{...qc,borderRadius:A,paddingInline:v,paddingBlock:e.calc(g).sub(I).div(2).equal(),cursor:`pointer`,transition:`all ${C}`,"+ li":{marginTop:y},"&:hover":{background:M}}}},[`${t}-panels`]:{display:`inline-flex`,flexWrap:`nowrap`,"&:last-child":{[`${t}-panel`]:{borderWidth:0}}},[`${t}-panel`]:{verticalAlign:`top`,background:`transparent`,borderRadius:0,borderWidth:0,[`${t}-content, table`]:{textAlign:`center`},"&-focused":{borderColor:o}}}},"&-dropdown-range":{padding:`${Y(e.calc(E).mul(2).div(3).equal())} 0`,"&-hidden":{display:`none`}},"&-rtl":{direction:`rtl`,[`${t}-separator`]:{transform:`scale(-1, 1)`},[`${t}-footer`]:{"&-extra":{direction:`rtl`}}}}},Hh(e,`slide-up`),Hh(e,`slide-down`),Mh(e,`move-up`),Mh(e,`move-down`)]},CL=rl(`DatePicker`,e=>{let t=gs(eL(e),Ite(e),{inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[Fte(t),Vte(t),zte(t),Bte(t),Mte(t),Yg(e,{focusElCls:`${e.componentCls}-focused`})]},Rte),Hte={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z`}},{tag:`path`,attrs:{d:`M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z`}}]},name:`plus`,theme:`outlined`};function wL(){return wL=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,wL({},e,{ref:t,icon:Hte}))),Ute=c(o(((e,t)=>{t.exports=a,t.exports.isMobile=a,t.exports.default=a;var n=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,i=/android|ipad|playbook|silk/i;function a(e){e||={};let t=e.ua;if(!t&&typeof navigator<`u`&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers[`user-agent`]==`string`&&(t=t.headers[`user-agent`]),typeof t!=`string`)return!1;let a=n.test(t)&&!r.test(t)||!!e.tablet&&i.test(t);return!a&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf(`Macintosh`)!==-1&&t.indexOf(`Safari`)!==-1&&(a=!0),a}}))()),EL,Wte=()=>(EL===void 0&&(EL=(0,Ute.default)()),EL),DL=(0,S.createContext)(null),Gte=e=>{let{activeTabOffset:t,horizontal:n,rtl:r,indicator:i={}}=e,{size:a,align:o=`center`}=i,[s,c]=(0,S.useState)(),l=(0,S.useRef)(),u=S.useCallback(e=>typeof a==`function`?a(e):typeof a==`number`?a:e,[a]);function d(){ri.cancel(l.current)}return(0,S.useEffect)(()=>{let e={};if(t)if(n){e.width=u(t.width);let n=r?`right`:`left`;o===`start`&&(e[n]=t[n]),o===`center`&&(e[n]=t[n]+t.width/2,e.transform=r?`translateX(50%)`:`translateX(-50%)`),o===`end`&&(e[n]=t[n]+t.width,e.transform=`translateX(-100%)`)}else e.height=u(t.height),o===`start`&&(e.top=t.top),o===`center`&&(e.top=t.top+t.height/2,e.transform=`translateY(-50%)`),o===`end`&&(e.top=t.top+t.height,e.transform=`translateY(-100%)`);return d(),l.current=ri(()=>{s&&e&&Object.keys(e).every(t=>{let n=e[t],r=s[t];return typeof n==`number`&&typeof r==`number`?Math.round(n)===Math.round(r):n===r})||c(e)}),d},[JSON.stringify(t),n,r,o,u]),{style:s}},OL={width:0,height:0,left:0,top:0};function Kte(e,t,n){return(0,S.useMemo)(()=>{let n=new Map,r=t.get(e[0]?.key)||OL,i=r.left+r.width;for(let r=0;re.key).join(`_`),t,n])}function kL(e,t){let n=S.useRef(e),[,r]=S.useState({});function i(e){let i=typeof e==`function`?e(n.current):e;i!==n.current&&t(i,n.current),n.current=i,r({})}return[n.current,i]}var qte=.1,AL=.01,jL=20,ML=.995**jL;function Jte(e,t){let[n,r]=(0,S.useState)(),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(),u=(0,S.useRef)();function d(e){let{screenX:t,screenY:n}=e.touches[0];r({x:t,y:n}),window.clearInterval(u.current)}function f(e){if(!n)return;let{screenX:o,screenY:c}=e.touches[0];r({x:o,y:c});let u=o-n.x,d=c-n.y;t(u,d);let f=Date.now();a(f),s(f-i),l({x:u,y:d})}function p(){if(n&&(r(null),l(null),c)){let e=c.x/o,n=c.y/o;if(Math.max(Math.abs(e),Math.abs(n)){if(Math.abs(r)o?(i=n,m.current=`x`):(i=r,m.current=`y`),t(-i,-i)&&e.preventDefault()}let g=(0,S.useRef)(null);g.current={onTouchStart:d,onTouchMove:f,onTouchEnd:p,onWheel:h},S.useEffect(()=>{function t(e){g.current.onTouchStart(e)}function n(e){g.current.onTouchMove(e)}function r(e){g.current.onTouchEnd(e)}function i(e){g.current.onWheel(e)}return document.addEventListener(`touchmove`,n,{passive:!1}),document.addEventListener(`touchend`,r,{passive:!0}),e.current.addEventListener(`touchstart`,t,{passive:!0}),e.current.addEventListener(`wheel`,i,{passive:!1}),()=>{document.removeEventListener(`touchmove`,n),document.removeEventListener(`touchend`,r)}},[])}function NL(e){let[t,n]=(0,S.useState)(0),r=(0,S.useRef)(0),i=(0,S.useRef)();return i.current=e,Bn(()=>{i.current?.()},[t]),()=>{r.current===t&&(r.current+=1,n(r.current))}}function PL(e){let t=(0,S.useRef)([]),[,n]=(0,S.useState)({}),r=(0,S.useRef)(typeof e==`function`?e():e),i=NL(()=>{let e=r.current;t.current.forEach(t=>{e=t(e)}),t.current=[],r.current=e,n({})});function a(e){t.current.push(e),i()}return[r.current,a]}var FL={width:0,height:0,left:0,top:0,right:0};function IL(e,t,n,r,i,a,{tabs:o,tabPosition:s,rtl:c}){let l,u,d;return[`top`,`bottom`].includes(s)?(l=`width`,u=c?`right`:`left`,d=Math.abs(n)):(l=`height`,u=`top`,d=-n),(0,S.useMemo)(()=>{if(!o.length)return[0,0];let n=o.length,r=n;for(let i=0;iMath.floor(d+t)){r=i-1;break}}let i=0;for(let t=n-1;t>=0;--t)if((e.get(o[t].key)||FL)[u]r?[0,-1]:[i,r]},[e,t,r,i,a,d,s,o.map(e=>e.key).join(`_`),c])}function LL(e){let t;return e instanceof Map?(t={},e.forEach((e,n)=>{t[n]=e})):t=e,JSON.stringify(t)}var RL=`TABS_DQ`;function zL(e){return String(e).replace(/"/g,RL)}function BL(e,t,n,r){return!(!n||r||e===!1||e===void 0&&(t===!1||t===null))}var VL=S.forwardRef((e,t)=>{let{prefixCls:n,editable:r,locale:i,style:a}=e;return!r||r.showAdd===!1?null:S.createElement(`button`,{ref:t,type:`button`,className:`${n}-nav-add`,style:a,"aria-label":i?.addAriaLabel||`Add tab`,onClick:e=>{r.onEdit(`add`,{event:e})}},r.addIcon||`+`)}),HL=S.forwardRef((e,t)=>{let{position:n,prefixCls:r,extra:i}=e;if(!i)return null;let a,o={};return typeof i==`object`&&!S.isValidElement(i)?o=i:o.right=i,n===`right`&&(a=o.right),n===`left`&&(a=o.left),a?S.createElement(`div`,{className:`${r}-extra-content`,ref:t},a):null});function UL(){return UL=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,id:r,tabs:i,locale:a,mobile:o,more:s={},style:c,className:l,editable:u,tabBarGutter:d,rtl:f,removeAriaLabel:p,onTabClick:m,getPopupContainer:h,popupClassName:g,popupStyle:_}=e,[v,y]=(0,S.useState)(!1),[b,x]=(0,S.useState)(null),{icon:C=`More`}=s,w=`${r}-more-popup`,T=`${n}-dropdown`,E=b===null?null:`${w}-${b}`,D=a?.dropdownAriaLabel;function O(e,t){e.preventDefault(),e.stopPropagation(),u.onEdit(`remove`,{key:t,event:e})}let k=S.createElement(fE,{onClick:({key:e,domEvent:t})=>{m(e,t),y(!1)},prefixCls:`${T}-menu`,id:w,tabIndex:-1,role:`listbox`,"aria-activedescendant":E,selectedKeys:[b],"aria-label":D===void 0?`expanded dropdown`:D},i.map(e=>{let{closable:t,disabled:n,closeIcon:i,key:a,label:o}=e,s=BL(t,i,u,n);return S.createElement(HT,{key:a,id:`${w}-${a}`,role:`option`,"aria-controls":r&&`${r}-panel-${a}`,disabled:n},S.createElement(`span`,null,o),s&&S.createElement(`button`,{type:`button`,"aria-label":p||`remove`,tabIndex:0,className:`${T}-menu-item-remove`,onClick:e=>{e.stopPropagation(),O(e,a)}},i||u.removeIcon||`×`))}));function A(e){let t=i.filter(e=>!e.disabled),n=t.findIndex(e=>e.key===b)||0,r=t.length;for(let i=0;i{let e=document.getElementById(E);e?.scrollIntoView&&e.scrollIntoView(!1)},[E,b]),(0,S.useEffect)(()=>{v||x(null)},[v]);let M={marginInlineStart:d};i.length||(M.visibility=`hidden`,M.order=1);let N=J(g,{[`${T}-rtl`]:f}),P=o?null:S.createElement(Zw,UL({prefixCls:T,overlay:k,visible:i.length?v:!1,onVisibleChange:y,overlayClassName:N,overlayStyle:_,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:h},s),S.createElement(`button`,{type:`button`,className:`${n}-nav-more`,style:M,"aria-haspopup":`listbox`,"aria-controls":w,id:`${r}-more`,"aria-expanded":v,onKeyDown:j},C));return S.createElement(`div`,{className:J(`${n}-nav-operations`,l),style:c,ref:t},P,S.createElement(VL,{prefixCls:n,locale:a,editable:u}))}),GL=S.memo(WL,(e,t)=>t.tabMoving),KL=e=>{let{prefixCls:t,id:n,active:r,focus:i,tab:{key:a,label:o,disabled:s,closeIcon:c,icon:l},closable:u,renderWrapper:d,removeAriaLabel:f,editable:p,onClick:m,onFocus:h,onBlur:g,onKeyDown:_,onMouseDown:v,onMouseUp:y,style:b,className:x,tabCount:C,currentPosition:w}=e,T=`${t}-tab`,E=BL(u,c,p,s);function D(e){s||m(e)}function O(e){e.preventDefault(),e.stopPropagation(),p.onEdit(`remove`,{key:a,event:e})}let k=S.useMemo(()=>l&&typeof o==`string`?S.createElement(`span`,null,o):o,[o,l]),A=S.useRef(null);S.useEffect(()=>{i&&A.current&&A.current.focus()},[i]);let j=S.createElement(`div`,{key:a,"data-node-key":zL(a),className:J(T,x,{[`${T}-with-remove`]:E,[`${T}-active`]:r,[`${T}-disabled`]:s,[`${T}-focus`]:i}),style:b,onClick:D},S.createElement(`div`,{ref:A,role:`tab`,"aria-selected":r,id:n&&`${n}-tab-${a}`,className:`${T}-btn`,"aria-controls":n&&`${n}-panel-${a}`,"aria-disabled":s,tabIndex:s?null:r?0:-1,onClick:e=>{e.stopPropagation(),D(e)},onKeyDown:_,onMouseDown:v,onMouseUp:y,onFocus:h,onBlur:g},i&&S.createElement(`div`,{"aria-live":`polite`,style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},`Tab ${w} of ${C}`),l&&S.createElement(`span`,{className:`${T}-icon`},l),o&&k),E&&S.createElement(`button`,{type:`button`,"aria-label":f||`remove`,tabIndex:r?0:-1,className:`${T}-remove`,onClick:e=>{e.stopPropagation(),O(e)}},c||p.removeIcon||`×`));return d?d(j):j};function qL(){return qL=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{offsetWidth:n,offsetHeight:r,offsetTop:i,offsetLeft:a}=e,{width:o,height:s,left:c,top:l}=e.getBoundingClientRect();return Math.abs(o-n)<1?[o,s,c-t.left,l-t.top]:[n,r,a,i]},YL=e=>{let{offsetWidth:t=0,offsetHeight:n=0}=e.current||{};if(e.current){let{width:n,height:r}=e.current.getBoundingClientRect();if(Math.abs(n-t)<1)return[n,r]}return[t,n]},XL=(e,t)=>e[+!t],ZL=S.forwardRef((e,t)=>{let{className:n,style:r,id:i,animated:a,activeKey:o,rtl:s,extra:c,editable:l,locale:u,tabPosition:d,tabBarGutter:f,children:p,onTabClick:m,onTabScroll:h,indicator:g,classNames:_,styles:v}=e,{prefixCls:y,tabs:b}=S.useContext(DL),x=(0,S.useRef)(null),C=(0,S.useRef)(null),w=(0,S.useRef)(null),T=(0,S.useRef)(null),E=(0,S.useRef)(null),D=(0,S.useRef)(null),O=(0,S.useRef)(null),k=d===`top`||d===`bottom`,[A,j]=kL(0,(e,t)=>{k&&h&&h({direction:e>t?`left`:`right`})}),[M,N]=kL(0,(e,t)=>{!k&&h&&h({direction:e>t?`top`:`bottom`})}),[P,F]=(0,S.useState)([0,0]),[I,L]=(0,S.useState)([0,0]),[R,z]=(0,S.useState)([0,0]),[B,V]=(0,S.useState)([0,0]),[H,U]=PL(new Map),W=Kte(b,H,I[0]),ee=XL(P,k),te=XL(I,k),ne=XL(R,k),re=XL(B,k),ie=Math.floor(ee)K?K:e}let ce=(0,S.useRef)(null),[q,le]=(0,S.useState)();function ue(){le(Date.now())}function de(){ce.current&&clearTimeout(ce.current)}Jte(T,(e,t)=>{function n(e,t){e(e=>se(e+t))}return ie?(k?n(j,e):n(N,t),de(),ue(),!0):!1}),(0,S.useEffect)(()=>(de(),q&&(ce.current=setTimeout(()=>{le(0)},100)),de),[q]);let[fe,pe]=IL(W,ae,k?A:M,te,ne,re,{...e,tabs:b}),me=In((e=o)=>{let t=W.get(e)||{width:0,height:0,left:0,right:0,top:0};if(k){let e=A;s?t.rightA+ae&&(e=t.right+t.width-ae):t.left<-A?e=-t.left:t.left+t.width>-A+ae&&(e=-(t.left+t.width-ae)),N(0),j(se(e))}else{let e=M;t.top<-M?e=-t.top:t.top+t.height>-M+ae&&(e=-(t.top+t.height-ae)),j(0),N(se(e))}}),[he,ge]=(0,S.useState)(),[_e,ve]=(0,S.useState)(!1),ye=b.filter(e=>!e.disabled).map(e=>e.key),be=e=>{let t=ye.indexOf(he||o),n=ye.length,r=ye[(t+e+n)%n];ge(r)},xe=(e,t)=>{let n=ye.indexOf(e),r=b.find(t=>t.key===e);BL(r?.closable,r?.closeIcon,l,r?.disabled)&&(t.preventDefault(),t.stopPropagation(),l.onEdit(`remove`,{key:e,event:t}),n===ye.length-1?be(-1):be(1))},Se=(e,t)=>{ve(!0),t.button===1&&xe(e,t)},Ce=e=>{let{code:t}=e,n=s&&k,r=ye[0],i=ye[ye.length-1];switch(t){case`ArrowLeft`:k&&be(n?1:-1);break;case`ArrowRight`:k&&be(n?-1:1);break;case`ArrowUp`:e.preventDefault(),k||be(-1);break;case`ArrowDown`:e.preventDefault(),k||be(1);break;case`Home`:e.preventDefault(),ge(r);break;case`End`:e.preventDefault(),ge(i);break;case`Enter`:case`Space`:e.preventDefault(),m(he??o,e);break;case`Backspace`:case`Delete`:xe(he,e);break}},we={};k?we.marginInlineStart=f:we.marginTop=f;let Te=b.map((e,t)=>{let{key:n}=e;return S.createElement(KL,{id:i,prefixCls:y,key:n,tab:e,className:_?.item,style:t===0?v?.item:{...we,...v?.item},closable:e.closable,editable:l,active:n===o,focus:n===he,renderWrapper:p,removeAriaLabel:u?.removeAriaLabel,tabCount:ye.length,currentPosition:t+1,onClick:e=>{m(n,e)},onKeyDown:Ce,onFocus:()=>{_e||ge(n),me(n),ue(),T.current&&(s||(T.current.scrollLeft=0),T.current.scrollTop=0)},onBlur:()=>{ge(void 0)},onMouseDown:e=>Se(n,e),onMouseUp:()=>{ve(!1)}})}),Ee=()=>U(()=>{let e=new Map,t=E.current?.getBoundingClientRect();return b.forEach(({key:n})=>{let r=E.current?.querySelector(`[data-node-key="${zL(n)}"]`);if(r){let[i,a,o,s]=JL(r,t);e.set(n,{width:i,height:a,left:o,top:s})}}),e});(0,S.useEffect)(()=>{Ee()},[b.map(e=>e.key).join(`_`)]);let De=NL(()=>{let e=YL(x),t=YL(C),n=YL(w);F([e[0]-t[0]-n[0],e[1]-t[1]-n[1]]);let r=YL(O);z(r),V(YL(D));let i=YL(E);L([i[0]-r[0],i[1]-r[1]]),Ee()}),Oe=b.slice(0,fe),ke=b.slice(pe+1),Ae=[...Oe,...ke],je=W.get(o),{style:Me}=Gte({activeTabOffset:je,horizontal:k,indicator:g,rtl:s});(0,S.useEffect)(()=>{me()},[o,oe,K,LL(je),LL(W),k]),(0,S.useEffect)(()=>{De()},[s]);let Ne=!!Ae.length,Pe=`${y}-nav-wrap`,Fe,Ie,Le,Re;return k?s?(Ie=A>0,Fe=A!==K):(Fe=A<0,Ie=A!==oe):(Le=M<0,Re=M!==oe),S.createElement(Wr,{onResize:De},S.createElement(`div`,{ref:er(t,x),role:`tablist`,"aria-orientation":k?`horizontal`:`vertical`,className:J(`${y}-nav`,n,_?.header),style:{...v?.header,...r},onKeyDown:()=>{ue()}},S.createElement(HL,{ref:C,position:`left`,extra:c,prefixCls:y}),S.createElement(Wr,{onResize:De},S.createElement(`div`,{className:J(Pe,{[`${Pe}-ping-left`]:Fe,[`${Pe}-ping-right`]:Ie,[`${Pe}-ping-top`]:Le,[`${Pe}-ping-bottom`]:Re}),ref:T},S.createElement(Wr,{onResize:De},S.createElement(`div`,{ref:E,className:`${y}-nav-list`,style:{transform:`translate(${A}px, ${M}px)`,transition:q?`none`:void 0}},Te,S.createElement(VL,{ref:O,prefixCls:y,locale:u,editable:l,style:{...Te.length===0?void 0:we,visibility:Ne?`hidden`:null}}),S.createElement(`div`,{className:J(`${y}-ink-bar`,_?.indicator,{[`${y}-ink-bar-animated`]:a.inkBar}),style:{...Me,...v?.indicator}}))))),S.createElement(GL,qL({},e,{removeAriaLabel:u?.removeAriaLabel,ref:D,prefixCls:y,tabs:Ae,className:!Ne&&G,popupStyle:v?.popup,tabMoving:!!q})),S.createElement(HL,{ref:w,position:`right`,extra:c,prefixCls:y})))}),QL=({renderTabBar:e,...t})=>e?e(t,ZL):S.createElement(ZL,t),$L=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,id:a,active:o,tabKey:s,children:c}=e,l=S.Children.count(c)>0;return S.createElement(`div`,{id:a&&`${a}-panel-${s}`,role:`tabpanel`,tabIndex:o&&l?0:-1,"aria-labelledby":a&&`${a}-tab-${s}`,"aria-hidden":!o,style:i,className:J(n,o&&`${n}-active`,r),ref:t},c)});function eR(){return eR=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:t,activeKey:n,animated:r,tabPosition:i,destroyOnHidden:a,contentStyle:o,contentClassName:s}=e,{prefixCls:c,tabs:l}=S.useContext(DL),u=r.tabPane,d=`${c}-tabpane`;return S.createElement(`div`,{className:J(`${c}-content-holder`)},S.createElement(`div`,{className:J(`${c}-content`,`${c}-content-${i}`,{[`${c}-content-animated`]:u})},l.map(e=>{let{key:i,forceRender:c,style:l,className:f,destroyOnHidden:p,...m}=e,h=i===n;return S.createElement(Iu,eR({key:i,visible:h,forceRender:c,removeOnLeave:!!(a??p),leavedClassName:`${d}-hidden`},r.tabPaneMotion),({style:e,className:n},r)=>S.createElement($L,eR({},m,{prefixCls:d,id:t,tabKey:i,animated:u,active:h,style:{...o,...l,...e},className:J(s,f,n),ref:r})))})))};function nR(e={inkBar:!0,tabPane:!1}){let t;return t=e===!1?{inkBar:!1,tabPane:!1}:e===!0?{inkBar:!0,tabPane:!1}:{inkBar:!0,...typeof e==`object`?e:{}},t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}function rR(){return rR=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,prefixCls:r=`rc-tabs`,className:i,items:a,direction:o,activeKey:s,defaultActiveKey:c,editable:l,animated:u,tabPosition:d=`top`,tabBarGutter:f,tabBarStyle:p,tabBarExtraContent:m,locale:h,more:g,destroyOnHidden:_,renderTabBar:v,onChange:y,onTabClick:b,onTabScroll:x,getPopupContainer:C,popupClassName:w,indicator:T,classNames:E,styles:D,...O}=e,k=S.useMemo(()=>(a||[]).filter(e=>e&&typeof e==`object`&&`key`in e),[a]),A=o===`rtl`,j=nR(u),[M,N]=(0,S.useState)(!1);(0,S.useEffect)(()=>{N(Wte())},[]);let[P,F]=Hn(c??k[0]?.key,s),[I,L]=(0,S.useState)(()=>k.findIndex(e=>e.key===P));(0,S.useEffect)(()=>{let e=k.findIndex(e=>e.key===P);e===-1&&(e=Math.max(0,Math.min(I,k.length-1)),F(k[e]?.key)),L(e)},[k.map(e=>e.key).join(`_`),P,I]);let[R,z]=Hn(null,n);(0,S.useEffect)(()=>{n||(z(`rc-tabs-${iR}`),iR+=1)},[]);function B(e,t){b?.(e,t);let n=e!==P;F(e),n&&y?.(e)}let V={id:R,activeKey:P,animated:j,tabPosition:d,rtl:A,mobile:M},H={...V,editable:l,locale:h,more:g,tabBarGutter:f,onTabClick:B,onTabScroll:x,extra:m,style:p,getPopupContainer:C,popupClassName:J(w,E?.popup),indicator:T,styles:D,classNames:E},U=S.useMemo(()=>({tabs:k,prefixCls:r}),[k,r]);return S.createElement(DL.Provider,{value:U},S.createElement(`div`,rR({ref:t,id:n,className:J(r,`${r}-${d}`,{[`${r}-mobile`]:M,[`${r}-editable`]:l,[`${r}-rtl`]:A},i)},O),S.createElement(QL,rR({},H,{renderTabBar:v})),S.createElement(tR,rR({destroyOnHidden:_},V,{contentStyle:D?.content,contentClassName:E?.content,animated:j}))))}),oR={motionAppear:!1,motionEnter:!0,motionLeave:!0};function sR(e,t={inkBar:!0,tabPane:!1}){let n;return n=t===!1?{inkBar:!1,tabPane:!1}:t===!0?{inkBar:!0,tabPane:!0}:{inkBar:!0,...hd(t)?t:{}},n.tabPane&&(n.tabPaneMotion={...oR,motionName:Gm(e,`switch`)}),n}function cR(e){return e.filter(e=>e)}function lR(e,t){return e?e.map(e=>({...e,destroyOnHidden:e.destroyOnHidden??e.destroyInactiveTabPane})):cR(Cr(t).map(e=>{if(S.isValidElement(e)){let{key:t,props:n}=e,{tab:r,...i}=n||{};return{key:String(t),...i,label:r}}return null}))}var uR=e=>{let{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:`none`,"&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:`absolute`,transition:`none`,inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[Hh(e,`slide-up`),Hh(e,`slide-down`)]]},dR=e=>{let{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:a,itemSelectedColor:o}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${Y(e.lineWidth)} ${e.lineType} ${a}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:o,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:Zc(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:`none`},[`${t}-ink-bar`]:{visibility:`hidden`}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:Y(i)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:Y(i)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Y(e.borderRadiusLG)} 0 0 ${Y(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},fR=e=>{let{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{[`${t}-dropdown`]:{...Jc(e),position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:`block`,"&-hidden":{display:`none`},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${Y(r)} 0`,overflowX:`hidden`,overflowY:`auto`,textAlign:{_skip_check_:!0,value:`left`},listStyleType:`none`,backgroundColor:e.colorBgContainer,backgroundClip:`padding-box`,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,"&-item":{...qc,display:`flex`,alignItems:`center`,minWidth:e.tabsDropdownWidth,margin:0,padding:`${Y(e.paddingXXS)} ${Y(e.paddingSM)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:`nowrap`},"&-remove":{flex:`none`,marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:`transparent`,border:0,cursor:`pointer`,"&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:`transparent`,cursor:`not-allowed`}}}}}}},pR=e=>{let{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:a,verticalItemMargin:o,motionDurationSlow:s,calc:c}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:`column`,[`> ${t}-nav, > div > ${t}-nav`]:{margin:i,"&::before":{position:`absolute`,right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${r}`,content:`''`},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:[`width`,`left`,`right`].map(e=>`${e} ${s}`).join(`, `)}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav, + > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:`column`,minWidth:c(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:a,textAlign:`center`},[`${t}-tab + ${t}-tab`]:{margin:o},[`${t}-nav-wrap`]:{flexDirection:`column`,"&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:[`height`,`top`].map(e=>`${e} ${s}`).join(`, `)}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:`1 0 auto`,flexDirection:`column`}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:Y(c(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:c(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},mR=e=>{let{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:a,horizontalItemPaddingSM:o,horizontalItemPaddingLG:s}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:o,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:i,minHeight:i}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${Y(e.borderRadius)} ${Y(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${Y(e.borderRadius)} ${Y(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Y(e.borderRadius)} ${Y(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Y(e.borderRadius)} 0 0 ${Y(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:a,minHeight:a}}}}}},hR=e=>{let{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:a,horizontalItemPadding:o,itemSelectedColor:s,itemColor:c}=e,l=`${t}-tab`;return{[l]:{position:`relative`,WebkitTouchCallout:`none`,WebkitTapHighlightColor:`transparent`,display:`inline-flex`,alignItems:`center`,padding:o,fontSize:e.titleFontSize,background:`transparent`,border:0,outline:`none`,cursor:`pointer`,color:c,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:`none`,transition:`all ${e.motionDurationSlow}`,[`${l}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":{flex:`none`,lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:`transparent`,border:`none`,outline:`none`,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading},...Qc(e)},"&:hover":{color:r},[`&${l}-active ${l}-btn`]:{color:s},[`&${l}-focus ${l}-btn:focus-visible`]:Zc(e),[`&${l}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`},[`&${l}-disabled ${l}-btn, &${l}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${l}-remove ${i}`]:{margin:0,verticalAlign:`middle`},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${l} + ${l}`]:{margin:{_skip_check_:!0,value:a}}}},gR=e=>{let{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:a}=e;return{[`${t}-rtl`]:{direction:`rtl`,[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:e.marginSM}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:e.marginXS},marginLeft:{_skip_check_:!0,value:a(e.marginXXS).mul(-1).equal()},[r]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:i},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:`rtl`},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:`right`}}}}},_R=e=>{let{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:a,itemActiveColor:o,colorBorderSecondary:s}=e;return{[t]:{...Jc(e),display:`flex`,[`> ${t}-nav, > div > ${t}-nav`]:{position:`relative`,display:`flex`,flex:`none`,alignItems:`center`,[`${t}-nav-wrap`]:{position:`relative`,display:`flex`,flex:`auto`,alignSelf:`stretch`,overflow:`hidden`,whiteSpace:`nowrap`,transform:`translate(0)`,"&::before, &::after":{position:`absolute`,zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:`''`,pointerEvents:`none`}},[`${t}-nav-list`]:{position:`relative`,display:`flex`,transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:`flex`,alignSelf:`stretch`},[`${t}-nav-operations-hidden`]:{position:`absolute`,visibility:`hidden`,pointerEvents:`none`},[`${t}-nav-more`]:{position:`relative`,padding:n,background:`transparent`,border:0,color:e.colorText,"&::after":{position:`absolute`,right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:`translateY(100%)`,content:`''`}},[`${t}-nav-add`]:{minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:i},background:`transparent`,border:`${Y(e.lineWidth)} ${e.lineType} ${s}`,borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`,outline:`none`,cursor:`pointer`,color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:a},"&:active, &:focus:not(:focus-visible)":{color:o},...Qc(e,-3)}},[`${t}-extra-content`]:{flex:`none`},[`${t}-ink-bar`]:{position:`absolute`,background:e.inkBarColor,pointerEvents:`none`},...hR(e),[`${t}-content`]:{position:`relative`,width:`100%`},[`${t}-content-holder`]:{flex:`auto`,minWidth:0,minHeight:0},[`${t}-tabpane`]:{...Qc(e),"&-hidden":{display:`none`}}},[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:`auto`}}}}}},vR=rl(`Tabs`,e=>{let t=gs(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${Y(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${Y(e.horizontalItemGutter)}`});return[mR(t),gR(t),pR(t),fR(t),dR(t),_R(t),uR(t)]},e=>{let{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:a}=e,o=t||a,s=n||i,c=r||a+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:o,cardHeightSM:s,cardHeightLG:c,cardPadding:`${(o-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(s-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(c-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:``,horizontalItemMarginRTL:``,horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}}),yR=()=>null,bR=S.forwardRef((e,t)=>{let{type:n,className:r,rootClassName:i,size:a,onEdit:o,hideAdd:s,centered:c,addIcon:l,removeIcon:u,moreIcon:d,more:f,popupClassName:p,children:m,items:h,animated:g,style:_,indicatorSize:v,indicator:y,classNames:b,styles:x,destroyInactiveTabPane:C,destroyOnHidden:w,tabPlacement:T,tabPosition:E,...D}=e,{prefixCls:O}=D,{getPrefixCls:k,direction:A,getPopupContainer:j,className:M,style:N,classNames:P,styles:F}=li(`tabs`),{tabs:I}=S.useContext(oi),L=k(`tabs`,O),R=bf(L),[z,B]=vR(L,R),V=S.useRef(null);S.useImperativeHandle(t,()=>({nativeElement:V.current}));let H;n===`editable-card`&&(H={onEdit:(e,{key:t,event:n})=>{o?.(e===`add`?n:t,e)},removeIcon:u??I?.removeIcon??S.createElement(Rl,null),addIcon:(l??I?.addIcon)||S.createElement(TL,null),showAdd:s!==!0});let U=k(),W=th(a),ee=lR(h,m),te=sR(L,g),ne={align:y?.align??I?.indicator?.align,size:y?.size??v??I?.indicator?.size??I?.indicatorSize},re=S.useMemo(()=>{let e=T??E??void 0,t=A===`rtl`;switch(e){case`start`:return t?`right`:`left`;case`end`:return t?`left`:`right`;default:return e}},[T,E,A]),ie={...e,size:W,tabPlacement:re,items:ee},[ae,G]=Fd([P,b],[F,x],{props:ie},{popup:{_default:`root`}});return S.createElement(aR,{ref:V,direction:A,getPopupContainer:j,...D,items:ee,className:J({[`${L}-large`]:W===`large`,[`${L}-small`]:W===`small`,[`${L}-card`]:[`card`,`editable-card`].includes(n),[`${L}-editable-card`]:n===`editable-card`,[`${L}-centered`]:c},M,r,i,ae.root,z,B,R),classNames:{...ae,popup:J(p,z,B,R,ae.popup?.root)},styles:G,style:{...G.root,...N,..._},editable:H,more:{icon:I?.more?.icon??I?.moreIcon??d??S.createElement(kE,null),transitionName:`${U}-slide-up`,...f},prefixCls:L,animated:te,indicator:ne,destroyOnHidden:w??C,tabPosition:re})});bR.TabPane=yR;var xR=({prefixCls:e,className:t,hoverable:n=!0,...r})=>{let{getPrefixCls:i}=S.useContext(oi),a=i(`card`,e),o=J(`${a}-grid`,t,{[`${a}-grid-hoverable`]:n});return S.createElement(`div`,{...r,className:o})},SR=e=>{let{antCls:t,componentCls:n,headerHeight:r,headerPadding:i,tabsMarginBottom:a}=e;return{display:`flex`,justifyContent:`center`,flexDirection:`column`,minHeight:r,marginBottom:-1,padding:`0 ${Y(i)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`,...Xc(),"&-wrapper":{width:`100%`,display:`flex`,alignItems:`center`},"&-title":{display:`inline-block`,flex:1,...qc,[` > ${n}-typography, > ${n}-typography-edit-content - `]:{insetInlineStart:0,marginTop:0,marginBottom:0}},[`${t}-tabs-top`]:{clear:`both`,marginBottom:a,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,"&-bar":{borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}}},ER=e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:i}=e;return{width:`33.33%`,padding:t,border:0,borderRadius:0,boxShadow:` + `]:{insetInlineStart:0,marginTop:0,marginBottom:0}},[`${t}-tabs-top`]:{clear:`both`,marginBottom:a,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,"&-bar":{borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}}},CR=e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:i}=e;return{width:`33.33%`,padding:t,border:0,borderRadius:0,boxShadow:` ${Y(i)} 0 0 0 ${n}, 0 ${Y(i)} 0 0 ${n}, ${Y(i)} ${Y(i)} 0 0 ${n}, ${Y(i)} 0 0 0 ${n} inset, 0 ${Y(i)} 0 0 ${n} inset; - `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:`relative`,zIndex:1,boxShadow:r}}},DR=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:a,actionsBg:o}=e;return{margin:0,padding:0,listStyle:`none`,background:o,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${a}`,display:`flex`,borderRadius:`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`,...Xc(),"& > li":{margin:r,color:e.colorTextDescription,textAlign:`center`,"> span":{position:`relative`,display:`block`,minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,"&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:`inline-block`,width:`100%`,color:e.colorIcon,lineHeight:Y(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:Y(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${a}`}}}},OR=e=>({margin:`${Y(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:`flex`,...Xc(),"&-avatar":{paddingInlineEnd:e.padding},"&-section":{overflow:`hidden`,flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,...qc},"&-description":{color:e.colorTextDescription}}),kR=e=>{let{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${Y(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${Y(e.padding)} ${Y(i)}`}}},AR=e=>{let{componentCls:t}=e;return{overflow:`hidden`,[`${t}-body`]:{userSelect:`none`}}},jR=e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:a,bodyPadding:o,extraColor:s,motionDurationMid:c}=e;return{[t]:{...Jc(e),position:`relative`,background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:a},[`${t}-head`]:TR(e),[`${t}-extra`]:{marginInlineStart:`auto`,color:s,fontWeight:`normal`,fontSize:e.fontSize},[`${t}-body`]:{padding:o,borderRadius:`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`,"&:first-child":{borderStartStartRadius:e.borderRadiusLG,borderStartEndRadius:e.borderRadiusLG},"&:not(:last-child)":{borderEndStartRadius:0,borderEndEndRadius:0}},[`${t}-grid`]:ER(e),[`${t}-cover`]:{"> *":{display:`block`,width:`100%`,borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:DR(e),[`${t}-meta`]:OR(e)},[`${t}-bordered`]:{border:`${Y(e.lineWidth)} ${e.lineType} ${i}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:`pointer`,transition:[`box-shadow`,`border-color`].map(e=>`${e} ${c}`).join(`, `),"&:hover":{borderColor:`transparent`,boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0 `,[`&:not(:has(> ${t}-head))`]:{borderRadius:0},[`${t}-body`]:{display:`flex`,flexWrap:`wrap`},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:r}}},[`${t}-type-inner`]:kR(e),[`${t}-loading`]:AR(e),[`${t}-rtl`]:{direction:`rtl`}}},MR=e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:a}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${Y(r)}`,fontSize:a,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:`flex`,alignItems:`center`}}}}},NR=rl(`Card`,e=>{let t=gs(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[jR(t),MR(t)]},e=>({headerBg:`transparent`,headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:e.bodyPadding??e.paddingLG,headerPadding:e.headerPadding??e.paddingLG})),PR=e=>{let{actionClasses:t,actions:n=[],actionStyle:r}=e;return S.createElement(`ul`,{className:t,style:r},n.map((e,t)=>{let r=`action-${t}`;return S.createElement(`li`,{style:{width:`${100/n.length}%`},key:r},S.createElement(`span`,null,e))}))},FR=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,extra:o,headStyle:s={},bodyStyle:c={},title:l,loading:u,bordered:d,variant:f,size:p,type:m,cover:h,actions:g,tabList:_,children:v,activeTabKey:y,defaultActiveTabKey:b,tabBarExtraContent:x,hoverable:C,tabProps:w={},classNames:T,styles:E,...D}=e,{getPrefixCls:O,direction:k,className:A,style:j,classNames:M,styles:N}=li(`card`),[P]=_C(`card`,f,d),F=th(p),I={...e,size:F,variant:P},[L,R]=Fd([M,T],[N,E],{props:I}),z=t=>{e.onTabChange?.(t)},B=S.useMemo(()=>Cr(v),[v]),V=S.useMemo(()=>B.some(e=>S.isValidElement(e)&&e.type===wR),[B]),H=O(`card`,n),[U,W]=NR(H),ee=S.createElement(Ky,{loading:!0,active:!0,paragraph:{rows:4},title:!1},v),te=y!==void 0,ne={...w,[te?`activeKey`:`defaultActiveKey`]:te?y:b,tabBarExtraContent:x},re,ie=F===`small`?F:`large`,ae=_?S.createElement(CR,{size:ie,...ne,className:`${H}-head-tabs`,onChange:z,items:_.map(({tab:e,...t})=>({label:e,...t}))}):null;if(l||o||ae){let e=J(`${H}-head`,L.header),t=J(`${H}-head-title`,L.title),n=J(`${H}-extra`,L.extra),r={...s,...R.header};re=S.createElement(`div`,{className:e,style:r},S.createElement(`div`,{className:`${H}-head-wrapper`},l&&S.createElement(`div`,{className:t,style:R.title},l),o&&S.createElement(`div`,{className:n,style:R.extra},o)),ae)}let G=J(`${H}-cover`,L.cover),oe=h?S.createElement(`div`,{className:G,style:R.cover},h):null,K=J(`${H}-body`,L.body),se={...c,...R.body},ce=u||B.length?S.createElement(`div`,{className:K,style:se},u?ee:v):null,q=J(`${H}-actions`,L.actions),le=g?.length?S.createElement(PR,{actionClasses:q,actionStyle:R.actions,actions:g}):null,ue=Sr(D,[`onTabChange`]),de=J(H,A,{[`${H}-loading`]:u,[`${H}-bordered`]:P!==`borderless`,[`${H}-hoverable`]:C,[`${H}-contain-grid`]:V,[`${H}-contain-tabs`]:_?.length,[`${H}-small`]:F===`small`,[`${H}-type-${m}`]:!!m,[`${H}-rtl`]:k===`rtl`},r,i,U,W,L.root),fe={...R.root,...j,...a};return S.createElement(`div`,{ref:t,...ue,className:de,style:fe},re,oe,ce,le)}),IR=e=>{let{prefixCls:t,className:n,avatar:r,title:i,description:a,style:o,classNames:s,styles:c,...l}=e,{getPrefixCls:u,className:d,style:f,classNames:p,styles:m}=li(`cardMeta`),h=`${u(`card`,t)}-meta`,[g,_]=Fd([p,s],[m,c],{props:e}),v=J(h,n,d,g.root),y={...f,..._.root,...o},b=J(`${h}-avatar`,g.avatar),x=J(`${h}-title`,g.title),C=J(`${h}-description`,g.description),w=J(`${h}-section`,g.section),T=r?S.createElement(`div`,{className:b,style:_.avatar},r):null,E=i?S.createElement(`div`,{className:x,style:_.title},i):null,D=a?S.createElement(`div`,{className:C,style:_.description},a):null,O=E||D?S.createElement(`div`,{className:w,style:_.section},E,D):null;return S.createElement(`div`,{...l,className:v,style:y},T,O)},LR=FR;LR.Grid=wR,LR.Meta=IR;function RR(e,t,n){var r=n||{},i=r.noTrailing,a=i===void 0?!1:i,o=r.noLeading,s=o===void 0?!1:o,c=r.debounceMode,l=c===void 0?void 0:c,u,d=!1,f=0;function p(){u&&clearTimeout(u)}function m(e){var t=(e||{}).upcomingOnly,n=t===void 0?!1:t;p(),d=!n}function h(){var n=[...arguments],r=this,i=Date.now()-f;if(d)return;function o(){f=Date.now(),t.apply(r,n)}function c(){u=void 0}!s&&l&&!u&&o(),p(),l===void 0&&i>e?s?(f=Date.now(),a||(u=setTimeout(l?c:o,e))):o():a!==!0&&(u=setTimeout(l?c:o,l===void 0?e-i:e))}return h.cancel=m,h}function zR(e,t,n){var r=(n||{}).atBegin;return RR(e,t,{debounceMode:(r===void 0?!1:r)!==!1})}function BR(e,t){return e[t]}function VR(e,t){return`${e}-${t}`}function HR(e){return e&&e.type&&e.type.isTreeNode}function UR(e,t){return e??t}function WR(e){let{title:t,_title:n,key:r,children:i}=e||{},a=t||`title`;return{title:a,_title:n||[a],key:r||`key`,children:i||`children`}}function GR(e){function t(e){return Cr(e).map(e=>{if(!HR(e))return br(!e,`Tree/TreeNode can only accept TreeNode as children.`),null;let{key:n}=e,{children:r,...i}=e.props,a={key:n,...i},o=t(r);return o.length&&(a.children=o),a}).filter(e=>e)}return t(e)}function KR(e,t,n){let{_title:r,key:i,children:a}=WR(n),o=new Set(t===!0?[]:t),s=[];function c(e,n=null){return e.map((l,u)=>{let d=VR(n?n.pos:`0`,u),f=UR(l[i],d),p;for(let e=0;ee[a]:typeof a==`function`&&(u=e=>a(e)):u=(e,t)=>UR(e[s],t);function d(n,r,i,a){let o=n?n[l]:e,s=n?VR(i.pos,r):`0`,c=n?[...a,n]:[];n&&t({node:n,index:r,pos:s,key:u(n,s),parentPos:i.node?i.pos:null,level:i.level+1,nodes:c}),o&&o.forEach((e,t)=>{d(e,t,{node:n,pos:s,level:i?i.level+1:-1},c)})}d(null)}function JR(e,{initWrapper:t,processEntity:n,onProcessFinished:r,externalGetKey:i,childrenPropName:a,fieldNames:o}={},s){let c=i||s,l={},u={},d={posEntities:l,keyEntities:u};return t&&(d=t(d)||d),qR(e,e=>{let{node:t,index:r,pos:i,key:a,parentPos:o,level:s,nodes:c}=e,f={node:t,nodes:c,index:r,key:a,pos:i,level:s},p=UR(a,i);l[i]=f,u[p]=f,f.parent=l[o],f.parent&&(f.parent.children=f.parent.children||[],f.parent.children.push(f)),n&&n(f,d)},{externalGetKey:c,childrenPropName:a,fieldNames:o}),r&&r(d),d}function YR(e,t,n,r){return e===!1?!1:e||!t&&!n||t&&r&&!n}function XR(e,{expandedKeys:t,selectedKeys:n,loadedKeys:r,loadingKeys:i,checkedKeys:a,halfCheckedKeys:o,dragOverNodeKey:s,dropPosition:c,keyEntities:l}){let u=BR(l,e);return{eventKey:e,expanded:t.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:r.indexOf(e)!==-1,loading:i.indexOf(e)!==-1,checked:a.indexOf(e)!==-1,halfChecked:o.indexOf(e)!==-1,pos:String(u?u.pos:``),dragOver:s===e&&c===0,dragOverGapTop:s===e&&c===-1,dragOverGapBottom:s===e&&c===1}}function ZR(e){let{data:t,expanded:n,selected:r,checked:i,loaded:a,loading:o,halfChecked:s,dragOver:c,dragOverGapTop:l,dragOverGapBottom:u,pos:d,active:f,eventKey:p}=e,m={...t,expanded:n,selected:r,checked:i,loaded:a,loading:o,halfChecked:s,dragOver:c,dragOverGapTop:l,dragOverGapBottom:u,pos:d,active:f,key:p};return`props`in m||Object.defineProperty(m,`props`,{get(){return br(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}function QR(e,t){let n=new Set;return e.forEach(e=>{t.has(e)||n.add(e)}),n}function $R(e){let{disabled:t,disableCheckbox:n,checkable:r}=e||{};return!!(t||n)||r===!1}function ez(e,t,n,r){let i=new Set(e),a=new Set;for(let e=0;e<=n;e+=1)(t.get(e)||new Set).forEach(e=>{let{key:t,node:n,children:a=[]}=e;i.has(t)&&!r(n)&&a.filter(e=>!r(e.node)).forEach(e=>{i.add(e.key)})});let o=new Set;for(let e=n;e>=0;--e)(t.get(e)||new Set).forEach(e=>{let{parent:t,node:n}=e;if(r(n)||!e.parent||o.has(e.parent.key))return;if(r(e.parent.node)){o.add(t.key);return}let s=!0,c=!1;(t.children||[]).filter(e=>!r(e.node)).forEach(({key:e})=>{let t=i.has(e);s&&!t&&(s=!1),!c&&(t||a.has(e))&&(c=!0)}),s&&i.add(t.key),c&&a.add(t.key),o.add(t.key)});return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(QR(a,i))}}function tz(e,t,n,r,i){let a=new Set(e),o=new Set(t);for(let e=0;e<=r;e+=1)(n.get(e)||new Set).forEach(e=>{let{key:t,node:n,children:r=[]}=e;!a.has(t)&&!o.has(t)&&!i(n)&&r.filter(e=>!i(e.node)).forEach(e=>{a.delete(e.key)})});o=new Set;let s=new Set;for(let e=r;e>=0;--e)(n.get(e)||new Set).forEach(e=>{let{parent:t,node:n}=e;if(i(n)||!e.parent||s.has(e.parent.key))return;if(i(e.parent.node)){s.add(t.key);return}let r=!0,c=!1;(t.children||[]).filter(e=>!i(e.node)).forEach(({key:e})=>{let t=a.has(e);r&&!t&&(r=!1),!c&&(t||o.has(e))&&(c=!0)}),r||a.delete(t.key),c&&o.add(t.key),s.add(t.key)});return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(QR(o,a))}}function nz(e,t,n,r){let i=[],a;a=r||$R;let o=new Set(e.filter(e=>{let t=!!BR(n,e);return t||i.push(e),t})),s=new Map,c=0;Object.keys(n).forEach(e=>{let t=n[e],{level:r}=t,i=s.get(r);i||(i=new Set,s.set(r,i)),i.add(t),c=Math.max(c,r)}),br(!i.length,`Tree missing follow keys: ${i.slice(0,100).map(e=>`'${e}'`).join(`, `)}`);let l;return l=t===!0?ez(o,s,c,a):tz(o,t.halfCheckedKeys,s,c,a),l}var rz=e=>{let{checkboxCls:t,checkboxSize:n,lineWidth:r}=e,i=`${t}-wrapper`;return[{[`${t}-group`]:{...Jc(e),display:`inline-flex`,flexWrap:`wrap`,columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[i]:{...Jc(e),display:`inline-flex`,alignItems:`baseline`,cursor:`pointer`,"&:after":{display:`inline-block`,width:0,overflow:`hidden`,content:`'\\a0'`},[`& + ${i}`]:{marginInlineStart:0},[`&${i}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}},[t]:{...Jc(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:n,height:n,direction:`ltr`,backgroundColor:e.colorBgContainer,border:`${Y(r)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:`separate`,transition:`all ${e.motionDurationSlow}`,flex:`none`,...Uh(),"&:after":{boxSizing:`border-box`,position:`absolute`,top:`calc(${n} / 2 - ${r})`,insetInlineStart:`calc(${n} / 4 - ${r})`,display:`table`,width:e.calc(n).div(14).mul(5).equal(),height:e.calc(n).div(14).mul(8).equal(),border:`${Y(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:`rotate(45deg) scale(0) translate(-50%,-50%)`,opacity:0,content:`""`,transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`,...Uh()},[`${t}-input`]:{position:`absolute`,inset:`calc(-1 * (${r}))`,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:Zc(e),"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[` + `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:`relative`,zIndex:1,boxShadow:r}}},wR=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:a,actionsBg:o}=e;return{margin:0,padding:0,listStyle:`none`,background:o,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${a}`,display:`flex`,borderRadius:`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`,...Xc(),"& > li":{margin:r,color:e.colorTextDescription,textAlign:`center`,"> span":{position:`relative`,display:`block`,minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,"&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:`inline-block`,width:`100%`,color:e.colorIcon,lineHeight:Y(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:Y(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${a}`}}}},TR=e=>({margin:`${Y(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:`flex`,...Xc(),"&-avatar":{paddingInlineEnd:e.padding},"&-section":{overflow:`hidden`,flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,...qc},"&-description":{color:e.colorTextDescription}}),ER=e=>{let{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${Y(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${Y(e.padding)} ${Y(i)}`}}},DR=e=>{let{componentCls:t}=e;return{overflow:`hidden`,[`${t}-body`]:{userSelect:`none`}}},OR=e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:a,bodyPadding:o,extraColor:s,motionDurationMid:c}=e;return{[t]:{...Jc(e),position:`relative`,background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:a},[`${t}-head`]:SR(e),[`${t}-extra`]:{marginInlineStart:`auto`,color:s,fontWeight:`normal`,fontSize:e.fontSize},[`${t}-body`]:{padding:o,borderRadius:`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`,"&:first-child":{borderStartStartRadius:e.borderRadiusLG,borderStartEndRadius:e.borderRadiusLG},"&:not(:last-child)":{borderEndStartRadius:0,borderEndEndRadius:0}},[`${t}-grid`]:CR(e),[`${t}-cover`]:{"> *":{display:`block`,width:`100%`,borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:wR(e),[`${t}-meta`]:TR(e)},[`${t}-bordered`]:{border:`${Y(e.lineWidth)} ${e.lineType} ${i}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:`pointer`,transition:[`box-shadow`,`border-color`].map(e=>`${e} ${c}`).join(`, `),"&:hover":{borderColor:`transparent`,boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0 `,[`&:not(:has(> ${t}-head))`]:{borderRadius:0},[`${t}-body`]:{display:`flex`,flexWrap:`wrap`},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:r}}},[`${t}-type-inner`]:ER(e),[`${t}-loading`]:DR(e),[`${t}-rtl`]:{direction:`rtl`}}},kR=e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:a}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${Y(r)}`,fontSize:a,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:`flex`,alignItems:`center`}}}}},AR=rl(`Card`,e=>{let t=gs(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[OR(t),kR(t)]},e=>({headerBg:`transparent`,headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:e.bodyPadding??e.paddingLG,headerPadding:e.headerPadding??e.paddingLG})),jR=e=>{let{actionClasses:t,actions:n=[],actionStyle:r}=e;return S.createElement(`ul`,{className:t,style:r},n.map((e,t)=>{let r=`action-${t}`;return S.createElement(`li`,{style:{width:`${100/n.length}%`},key:r},S.createElement(`span`,null,e))}))},MR=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,extra:o,headStyle:s={},bodyStyle:c={},title:l,loading:u,bordered:d,variant:f,size:p,type:m,cover:h,actions:g,tabList:_,children:v,activeTabKey:y,defaultActiveTabKey:b,tabBarExtraContent:x,hoverable:C,tabProps:w={},classNames:T,styles:E,...D}=e,{getPrefixCls:O,direction:k,className:A,style:j,classNames:M,styles:N}=li(`card`),[P]=hC(`card`,f,d),F=th(p),I={...e,size:F,variant:P},[L,R]=Fd([M,T],[N,E],{props:I}),z=t=>{e.onTabChange?.(t)},B=S.useMemo(()=>Cr(v),[v]),V=S.useMemo(()=>B.some(e=>S.isValidElement(e)&&e.type===xR),[B]),H=O(`card`,n),[U,W]=AR(H),ee=S.createElement(Wy,{loading:!0,active:!0,paragraph:{rows:4},title:!1},v),te=y!==void 0,ne={...w,[te?`activeKey`:`defaultActiveKey`]:te?y:b,tabBarExtraContent:x},re,ie=F===`small`?F:`large`,ae=_?S.createElement(bR,{size:ie,...ne,className:`${H}-head-tabs`,onChange:z,items:_.map(({tab:e,...t})=>({label:e,...t}))}):null;if(l||o||ae){let e=J(`${H}-head`,L.header),t=J(`${H}-head-title`,L.title),n=J(`${H}-extra`,L.extra),r={...s,...R.header};re=S.createElement(`div`,{className:e,style:r},S.createElement(`div`,{className:`${H}-head-wrapper`},l&&S.createElement(`div`,{className:t,style:R.title},l),o&&S.createElement(`div`,{className:n,style:R.extra},o)),ae)}let G=J(`${H}-cover`,L.cover),oe=h?S.createElement(`div`,{className:G,style:R.cover},h):null,K=J(`${H}-body`,L.body),se={...c,...R.body},ce=u||B.length?S.createElement(`div`,{className:K,style:se},u?ee:v):null,q=J(`${H}-actions`,L.actions),le=g?.length?S.createElement(jR,{actionClasses:q,actionStyle:R.actions,actions:g}):null,ue=Sr(D,[`onTabChange`]),de=J(H,A,{[`${H}-loading`]:u,[`${H}-bordered`]:P!==`borderless`,[`${H}-hoverable`]:C,[`${H}-contain-grid`]:V,[`${H}-contain-tabs`]:_?.length,[`${H}-small`]:F===`small`,[`${H}-type-${m}`]:!!m,[`${H}-rtl`]:k===`rtl`},r,i,U,W,L.root),fe={...R.root,...j,...a};return S.createElement(`div`,{ref:t,...ue,className:de,style:fe},re,oe,ce,le)}),NR=e=>{let{prefixCls:t,className:n,avatar:r,title:i,description:a,style:o,classNames:s,styles:c,...l}=e,{getPrefixCls:u,className:d,style:f,classNames:p,styles:m}=li(`cardMeta`),h=`${u(`card`,t)}-meta`,[g,_]=Fd([p,s],[m,c],{props:e}),v=J(h,n,d,g.root),y={...f,..._.root,...o},b=J(`${h}-avatar`,g.avatar),x=J(`${h}-title`,g.title),C=J(`${h}-description`,g.description),w=J(`${h}-section`,g.section),T=r?S.createElement(`div`,{className:b,style:_.avatar},r):null,E=i?S.createElement(`div`,{className:x,style:_.title},i):null,D=a?S.createElement(`div`,{className:C,style:_.description},a):null,O=E||D?S.createElement(`div`,{className:w,style:_.section},E,D):null;return S.createElement(`div`,{...l,className:v,style:y},T,O)},PR=MR;PR.Grid=xR,PR.Meta=NR;function FR(e,t,n){var r=n||{},i=r.noTrailing,a=i===void 0?!1:i,o=r.noLeading,s=o===void 0?!1:o,c=r.debounceMode,l=c===void 0?void 0:c,u,d=!1,f=0;function p(){u&&clearTimeout(u)}function m(e){var t=(e||{}).upcomingOnly,n=t===void 0?!1:t;p(),d=!n}function h(){var n=[...arguments],r=this,i=Date.now()-f;if(d)return;function o(){f=Date.now(),t.apply(r,n)}function c(){u=void 0}!s&&l&&!u&&o(),p(),l===void 0&&i>e?s?(f=Date.now(),a||(u=setTimeout(l?c:o,e))):o():a!==!0&&(u=setTimeout(l?c:o,l===void 0?e-i:e))}return h.cancel=m,h}function IR(e,t,n){var r=(n||{}).atBegin;return FR(e,t,{debounceMode:(r===void 0?!1:r)!==!1})}function LR(e,t){return e[t]}function RR(e,t){return`${e}-${t}`}function zR(e){return e&&e.type&&e.type.isTreeNode}function BR(e,t){return e??t}function VR(e){let{title:t,_title:n,key:r,children:i}=e||{},a=t||`title`;return{title:a,_title:n||[a],key:r||`key`,children:i||`children`}}function HR(e){function t(e){return Cr(e).map(e=>{if(!zR(e))return br(!e,`Tree/TreeNode can only accept TreeNode as children.`),null;let{key:n}=e,{children:r,...i}=e.props,a={key:n,...i},o=t(r);return o.length&&(a.children=o),a}).filter(e=>e)}return t(e)}function UR(e,t,n){let{_title:r,key:i,children:a}=VR(n),o=new Set(t===!0?[]:t),s=[];function c(e,n=null){return e.map((l,u)=>{let d=RR(n?n.pos:`0`,u),f=BR(l[i],d),p;for(let e=0;ee[a]:typeof a==`function`&&(u=e=>a(e)):u=(e,t)=>BR(e[s],t);function d(n,r,i,a){let o=n?n[l]:e,s=n?RR(i.pos,r):`0`,c=n?[...a,n]:[];n&&t({node:n,index:r,pos:s,key:u(n,s),parentPos:i.node?i.pos:null,level:i.level+1,nodes:c}),o&&o.forEach((e,t)=>{d(e,t,{node:n,pos:s,level:i?i.level+1:-1},c)})}d(null)}function GR(e,{initWrapper:t,processEntity:n,onProcessFinished:r,externalGetKey:i,childrenPropName:a,fieldNames:o}={},s){let c=i||s,l={},u={},d={posEntities:l,keyEntities:u};return t&&(d=t(d)||d),WR(e,e=>{let{node:t,index:r,pos:i,key:a,parentPos:o,level:s,nodes:c}=e,f={node:t,nodes:c,index:r,key:a,pos:i,level:s},p=BR(a,i);l[i]=f,u[p]=f,f.parent=l[o],f.parent&&(f.parent.children=f.parent.children||[],f.parent.children.push(f)),n&&n(f,d)},{externalGetKey:c,childrenPropName:a,fieldNames:o}),r&&r(d),d}function KR(e,t,n,r){return e===!1?!1:e||!t&&!n||t&&r&&!n}function qR(e,{expandedKeys:t,selectedKeys:n,loadedKeys:r,loadingKeys:i,checkedKeys:a,halfCheckedKeys:o,dragOverNodeKey:s,dropPosition:c,keyEntities:l}){let u=LR(l,e);return{eventKey:e,expanded:t.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:r.indexOf(e)!==-1,loading:i.indexOf(e)!==-1,checked:a.indexOf(e)!==-1,halfChecked:o.indexOf(e)!==-1,pos:String(u?u.pos:``),dragOver:s===e&&c===0,dragOverGapTop:s===e&&c===-1,dragOverGapBottom:s===e&&c===1}}function JR(e){let{data:t,expanded:n,selected:r,checked:i,loaded:a,loading:o,halfChecked:s,dragOver:c,dragOverGapTop:l,dragOverGapBottom:u,pos:d,active:f,eventKey:p}=e,m={...t,expanded:n,selected:r,checked:i,loaded:a,loading:o,halfChecked:s,dragOver:c,dragOverGapTop:l,dragOverGapBottom:u,pos:d,active:f,key:p};return`props`in m||Object.defineProperty(m,`props`,{get(){return br(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}function YR(e,t){let n=new Set;return e.forEach(e=>{t.has(e)||n.add(e)}),n}function XR(e){let{disabled:t,disableCheckbox:n,checkable:r}=e||{};return!!(t||n)||r===!1}function ZR(e,t,n,r){let i=new Set(e),a=new Set;for(let e=0;e<=n;e+=1)(t.get(e)||new Set).forEach(e=>{let{key:t,node:n,children:a=[]}=e;i.has(t)&&!r(n)&&a.filter(e=>!r(e.node)).forEach(e=>{i.add(e.key)})});let o=new Set;for(let e=n;e>=0;--e)(t.get(e)||new Set).forEach(e=>{let{parent:t,node:n}=e;if(r(n)||!e.parent||o.has(e.parent.key))return;if(r(e.parent.node)){o.add(t.key);return}let s=!0,c=!1;(t.children||[]).filter(e=>!r(e.node)).forEach(({key:e})=>{let t=i.has(e);s&&!t&&(s=!1),!c&&(t||a.has(e))&&(c=!0)}),s&&i.add(t.key),c&&a.add(t.key),o.add(t.key)});return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(YR(a,i))}}function QR(e,t,n,r,i){let a=new Set(e),o=new Set(t);for(let e=0;e<=r;e+=1)(n.get(e)||new Set).forEach(e=>{let{key:t,node:n,children:r=[]}=e;!a.has(t)&&!o.has(t)&&!i(n)&&r.filter(e=>!i(e.node)).forEach(e=>{a.delete(e.key)})});o=new Set;let s=new Set;for(let e=r;e>=0;--e)(n.get(e)||new Set).forEach(e=>{let{parent:t,node:n}=e;if(i(n)||!e.parent||s.has(e.parent.key))return;if(i(e.parent.node)){s.add(t.key);return}let r=!0,c=!1;(t.children||[]).filter(e=>!i(e.node)).forEach(({key:e})=>{let t=a.has(e);r&&!t&&(r=!1),!c&&(t||o.has(e))&&(c=!0)}),r||a.delete(t.key),c&&o.add(t.key),s.add(t.key)});return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(YR(o,a))}}function $R(e,t,n,r){let i=[],a;a=r||XR;let o=new Set(e.filter(e=>{let t=!!LR(n,e);return t||i.push(e),t})),s=new Map,c=0;Object.keys(n).forEach(e=>{let t=n[e],{level:r}=t,i=s.get(r);i||(i=new Set,s.set(r,i)),i.add(t),c=Math.max(c,r)}),br(!i.length,`Tree missing follow keys: ${i.slice(0,100).map(e=>`'${e}'`).join(`, `)}`);let l;return l=t===!0?ZR(o,s,c,a):QR(o,t.halfCheckedKeys,s,c,a),l}var ez=e=>{let{checkboxCls:t,checkboxSize:n,lineWidth:r}=e,i=`${t}-wrapper`;return[{[`${t}-group`]:{...Jc(e),display:`inline-flex`,flexWrap:`wrap`,columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[i]:{...Jc(e),display:`inline-flex`,alignItems:`baseline`,cursor:`pointer`,"&:after":{display:`inline-block`,width:0,overflow:`hidden`,content:`'\\a0'`},[`& + ${i}`]:{marginInlineStart:0},[`&${i}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}},[t]:{...Jc(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:n,height:n,direction:`ltr`,backgroundColor:e.colorBgContainer,border:`${Y(r)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:`separate`,transition:`all ${e.motionDurationSlow}`,flex:`none`,...Uh(),"&:after":{boxSizing:`border-box`,position:`absolute`,top:`calc(${n} / 2 - ${r})`,insetInlineStart:`calc(${n} / 4 - ${r})`,display:`table`,width:e.calc(n).div(14).mul(5).equal(),height:e.calc(n).div(14).mul(8).equal(),border:`${Y(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:`rotate(45deg) scale(0) translate(-50%,-50%)`,opacity:0,content:`""`,transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`,...Uh()},[`${t}-input`]:{position:`absolute`,inset:`calc(-1 * (${r}))`,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:Zc(e),"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[` ${i}:not(${i}-disabled), ${t}:not(${t}-disabled) - `]:{[`&:hover ${t}`]:{borderColor:e.colorPrimary}},[`${i}:not(${i}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[`${t}-checked`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:`rotate(45deg) scale(1) translate(-50%,-50%)`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`,...Uh()},[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[t]:{"&-indeterminate":{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:`50%`,insetInlineStart:`50%`,width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:`translate(-50%, -50%) scale(1)`,opacity:1,content:`""`},"&:hover":{backgroundColor:e.colorBgContainer,borderColor:e.colorPrimary}}}},{[`${i}-disabled`]:{cursor:`not-allowed`},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate::after`]:{background:e.colorTextDisabled}}}]};function iz(e,t){return rz(gs(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}var az=rl(`Checkbox`,(e,{prefixCls:t})=>[iz(t,e)]),oz=S.createContext(null),sz=S.forwardRef((e,t)=>{let{prefixCls:n,children:r,indeterminate:i=!1,onMouseEnter:a,onMouseLeave:o,skipGroup:s=!1,disabled:c,rootClassName:l,className:u,style:d,classNames:f,styles:p,name:m,value:h,checked:g,defaultChecked:_,onChange:v,...y}=e,{getPrefixCls:b,direction:x,className:C,style:w,classNames:T,styles:E}=li(`checkbox`),D=S.useContext(oz),{isFormItemInput:O}=S.useContext(Sy),k=S.useContext(zp),A=(D?.disabled||c)??k,[j,M]=Hn(_,g),N=j,P=In(e=>{M(e.target.checked),v?.(e),!s&&D?.toggleOption&&D.toggleOption({label:r,value:h})});D&&!s&&(N=D.value.includes(h));let F=S.useRef(null),I=er(t,F);S.useEffect(()=>{if(!(s||!D))return D.registerValue(h),()=>{D.cancelValue(h)}},[h,s]),S.useEffect(()=>{F.current?.input&&(F.current.input.indeterminate=i)},[i]);let L=b(`checkbox`,n),R=bf(L),[z,B]=az(L,R),V={...y},H={...e,indeterminate:i,disabled:A,checked:N},[U,W]=Fd([T,f],[E,p],{props:H}),ee=J(`${L}-wrapper`,{[`${L}-rtl`]:x===`rtl`,[`${L}-wrapper-checked`]:N,[`${L}-wrapper-disabled`]:A,[`${L}-wrapper-in-form-item`]:O},C,u,U.root,l,B,R,z),te=J(U.icon,{[`${L}-indeterminate`]:i},qm,z),[ne,re]=QI(V.onClick);return S.createElement(eh,{component:`Checkbox`,disabled:A},S.createElement(`label`,{className:ee,style:{...W.root,...w,...d},onMouseEnter:a,onMouseLeave:o,onClick:ne},S.createElement(ZI,{...V,name:!s&&D?D.name:m,checked:N,onClick:re,onChange:P,prefixCls:L,className:te,style:W.icon,disabled:A,ref:I,value:h}),fd(r)&&S.createElement(`span`,{className:J(`${L}-label`,U.label),style:W.label},r)))}),cz=S.forwardRef((e,t)=>{let{defaultValue:n,children:r,options:i=[],prefixCls:a,className:o,rootClassName:s,style:c,onChange:l,role:u=`group`,...d}=e,{getPrefixCls:f,direction:p}=S.useContext(oi),[m,h]=S.useState(d.value||n||[]),[g,_]=S.useState([]);S.useEffect(()=>{`value`in d&&h(d.value||[])},[d.value]);let v=S.useMemo(()=>i.map(e=>typeof e==`string`||pd(e)?{label:e,value:e}:e),[i]),y=e=>{_(t=>t.filter(t=>t!==e))},b=e=>{_(t=>[].concat(Zr(t),[e]))},x=e=>{let t=m.indexOf(e.value),n=Zr(m);t===-1?n.push(e.value):n.splice(t,1),`value`in d||h(n),l?.(n.filter(e=>g.includes(e)).sort((e,t)=>v.findIndex(t=>t.value===e)-v.findIndex(e=>e.value===t)))},C=f(`checkbox`,a),w=`${C}-group`,T=bf(C),[E,D]=az(C,T),O=Sr(d,[`value`,`disabled`]),k=i.length?v.map(e=>S.createElement(sz,{prefixCls:C,key:e.value.toString(),disabled:`disabled`in e?e.disabled:d.disabled,value:e.value,checked:m.includes(e.value),onChange:e.onChange,className:J(`${w}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):r,A=S.useMemo(()=>({toggleOption:x,value:m,disabled:d.disabled,name:d.name,registerValue:b,cancelValue:y}),[x,m,d.disabled,d.name,b,y]),j=J(w,{[`${w}-rtl`]:p===`rtl`},o,s,D,T,E);return S.createElement(`div`,{className:j,style:c,role:u,...O,ref:t},S.createElement(oz.Provider,{value:A},k))}),lz=sz;lz.Group=cz,lz.__ANT_CHECKBOX=!0;var uz=(0,S.createContext)({});function dz(e){return e===`auto`?`1 1 auto`:pd(e)?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}var fz=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=S.useContext(oi),{gutter:i,wrap:a}=S.useContext(uz),{prefixCls:o,span:s,order:c,offset:l,push:u,pull:d,className:f,children:p,flex:m,style:h,...g}=e,_=n(`col`,o),v=n(),[y,b]=tb(_),[x]=ol(v,`col`),C={},w={};UC.forEach(t=>{let n={},i=e[t];pd(i)?n.span=i:hd(i)&&(n=i||{}),delete g[t],w={...w,[`${_}-${t}-${n.span}`]:fd(n.span),[`${_}-${t}-order-${n.order}`]:n.order||n.order===0,[`${_}-${t}-offset-${n.offset}`]:n.offset||n.offset===0,[`${_}-${t}-push-${n.push}`]:n.push||n.push===0,[`${_}-${t}-pull-${n.pull}`]:n.pull||n.pull===0,[`${_}-rtl`]:r===`rtl`},n.flex&&(w[`${_}-${t}-flex`]=!0,C[x(`${t}-flex`)]=dz(n.flex))});let T=J(_,{[`${_}-${s}`]:s!==void 0,[`${_}-order-${c}`]:c,[`${_}-offset-${l}`]:l,[`${_}-push-${u}`]:u,[`${_}-pull-${d}`]:d},f,w,y,b),E={};return i?.[0]&&(E.paddingInline=pd(i[0])?`${i[0]/2}px`:`calc(${i[0]} / 2)`),m&&(E.flex=dz(m),a===!1&&!E.minWidth&&(E.minWidth=0)),S.createElement(`div`,{...g,style:{...E,...h,...C},className:T,ref:t},p)});function pz(e,t){let n=[void 0,void 0],r=Array.isArray(e)?e:[e,void 0],i=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0};return r.forEach((e,t)=>{if(hd(e))for(let r=0;r{let[n,r]=S.useState(()=>md(e)?e:``),i=()=>{if(md(e)&&r(e),hd(e))for(let n=0;n{i()},[JSON.stringify(e),t]),n},hz=S.forwardRef((e,t)=>{let{prefixCls:n,justify:r,align:i,className:a,style:o,children:s,gutter:c=0,wrap:l,...u}=e,{getPrefixCls:d,direction:f}=S.useContext(oi),p=JC(!0,null),m=mz(i,p),h=mz(r,p),g=d(`row`,n),[_,v]=Pee(g),y=pz(c,p),b=J(g,{[`${g}-no-wrap`]:l===!1,[`${g}-${h}`]:h,[`${g}-${m}`]:m,[`${g}-rtl`]:f===`rtl`},a,_,v),x={};y?.[0]&&(x.marginInline=pd(y[0])?`${y[0]/-2}px`:`calc(${y[0]} / -2)`);let[C,w]=y;x.rowGap=w;let T=S.useMemo(()=>({gutter:[C,w],wrap:l}),[C,w,l]);return S.createElement(uz.Provider,{value:T},S.createElement(`div`,{...u,className:b,style:{...x,...o},ref:t},s))}),gz=fz,_z=e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},vz=e=>{let{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:a,orientationMargin:o,verticalMarginInline:s}=e,c=`${t}-rail`;return{[t]:{...Jc(e),borderBlockStart:`${Y(i)} solid ${r}`,[c]:{borderBlockStart:`${Y(i)} solid ${r}`},"&-vertical":{position:`relative`,top:`-0.06em`,display:`inline-block`,height:`0.9em`,marginInline:s,marginBlock:0,verticalAlign:`middle`,borderTop:0,borderInlineStart:`${Y(i)} solid ${r}`},"&-horizontal":{display:`flex`,clear:`both`,width:`100%`,minWidth:`100%`,margin:`${Y(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:`flex`,alignItems:`center`,margin:`${Y(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:`nowrap`,textAlign:`center`,borderBlockStart:`0 ${r}`,[`${c}-start, ${c}-end`]:{width:`50%`,borderBlockStartColor:`inherit`,borderBlockEnd:0,content:`''`}},[`&-horizontal${t}-with-text-start`]:{[`${c}-start`]:{width:`calc(${o} * 100%)`},[`${c}-end`]:{width:`calc(100% - ${o} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{[`${c}-start`]:{width:`calc(100% - ${o} * 100%)`},[`${c}-end`]:{width:`calc(${o} * 100%)`}},[`${t}-inner-text`]:{display:`inline-block`,paddingBlock:0,paddingInline:a},"&-dashed":{background:`none`,borderColor:r,borderStyle:`dashed`,borderWidth:`${Y(i)} 0 0`,[c]:{borderBlockStart:`${Y(i)} dashed ${r}`}},[`&-horizontal${t}-with-text${t}-dashed`]:{[`${c}-start, ${c}-end`]:{borderStyle:`dashed none none`}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:`none`,borderColor:r,borderStyle:`dotted`,borderWidth:`${Y(i)} 0 0`,[c]:{borderBlockStart:`${Y(i)} dotted ${r}`}},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:`dotted none none`}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{[`${c}-start`]:{width:0},[`${c}-end`]:{width:`100%`},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{[`${c}-start`]:{width:`100%`},[`${c}-end`]:{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}}}},yz=rl(`Divider`,e=>{let t=gs(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[vz(t),_z(t)]},e=>({textPaddingInline:`1em`,orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}}),bz=[`left`,`right`,`center`,`start`,`end`],xz=e=>{let{getPrefixCls:t,direction:n,className:r,style:i,classNames:a,styles:o}=li(`divider`),{prefixCls:s,type:c,orientation:l,vertical:u,titlePlacement:d,orientationMargin:f,className:p,rootClassName:m,children:h,dashed:g,variant:_=`solid`,plain:v,style:y,size:b,classNames:x,styles:C,...w}=e,T=t(`divider`,s),E=`${T}-rail`,[D,O]=yz(T),k=th(b),A=!!h,j=bz.includes(l||``),M=S.useMemo(()=>{let e=d??(j?l:`center`);return e===`left`?n===`rtl`?`end`:`start`:e===`right`?n===`rtl`?`start`:`end`:e},[n,l,d,j]),N=M===`start`&&f!=null,P=M===`end`&&f!=null,[F,I]=Rd(l,u,c),L={...e,orientation:F,titlePlacement:M,size:k},[R,z]=Fd([a,x],[o,C],{props:L}),B=J(T,r,D,O,`${T}-${F}`,{[`${T}-with-text`]:A,[`${T}-with-text-${M}`]:A,[`${T}-dashed`]:!!g,[`${T}-${_}`]:_!==`solid`,[`${T}-plain`]:!!v,[`${T}-rtl`]:n===`rtl`,[`${T}-no-default-orientation-margin-start`]:N,[`${T}-no-default-orientation-margin-end`]:P,[`${T}-md`]:k===`medium`||k===`middle`,[`${T}-sm`]:k===`small`,[E]:!h,[R.rail]:R.rail&&!h},p,m,R.root),V=S.useMemo(()=>pd(f)?f:/^\d+$/.test(f)?Number(f):f,[f]),H={marginInlineStart:N?V:void 0,marginInlineEnd:P?V:void 0};return S.createElement(`div`,{className:B,style:{...i,...z.root,...h?{}:z.rail,...y},...w,role:`separator`},h&&!I&&S.createElement(S.Fragment,null,S.createElement(`div`,{className:J(E,`${E}-start`,R.rail),style:z.rail}),S.createElement(`span`,{className:J(`${T}-inner-text`,R.content),style:{...H,...z.content}},h),S.createElement(`div`,{className:J(E,`${E}-end`,R.rail),style:z.rail})))},Sz={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`minus`,theme:`outlined`};function Cz(){return Cz=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Cz({},e,{ref:t,icon:Sz}))),Tz={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z`}}]},name:`up`,theme:`outlined`};function Ez(){return Ez=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Ez({},e,{ref:t,icon:Tz})));function Oz(){return typeof BigInt==`function`}function kz(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function Az(e){var t=e.trim(),n=t.startsWith(`-`);n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,`$1`).replace(/\.0*$/,``).replace(/^0+/,``),t.startsWith(`.`)&&(t=`0${t}`);var r=t||`0`,i=r.split(`.`),a=i[0]||`0`,o=i[1]||`0`;a===`0`&&o===`0`&&(n=!1);var s=n?`-`:``;return{negative:n,negativeStr:s,trimStr:r,integerStr:a,decimalStr:o,fullStr:`${s}${r}`}}function jz(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes(`e`)}function Mz(e){var t=Uo(e.toLowerCase().split(`e`),2),n=t[0],r=t[1],i=r===void 0?`0`:r,a=n.startsWith(`-`),o=Uo((a?n.slice(1):n).split(`.`),2),s=o[0],c=s===void 0?`0`:s,l=o[1],u=l===void 0?``:l;return{decimal:u,digits:`${c}${u}`.replace(/^0+/,``)||`0`,exponent:Number(i),integer:c,negative:a}}function Nz(e){var t=e.decimal,n=e.digits,r=e.exponent,i=e.integer,a=e.negative;if(n===`0`)return`0`;var o=i.replace(/^0+/,``).length,s=(t.match(/^0*/)||[``])[0].length,c=(o||-s)+r,l=``;return l=c<=0?`0.${`0`.repeat(-c)}${n}`:c>=n.length?`${n}${`0`.repeat(c-n.length)}`:`${n.slice(0,c)}.${n.slice(c)}`,`${a?`-`:``}${l}`}function Pz(e){return e.exponent>=0?Math.max(0,e.decimal.length-e.exponent):Math.abs(e.exponent)+e.decimal.length}function Fz(e){var t=String(e);return jz(e)?Pz(Mz(t)):t.includes(`.`)&&Lz(t)?t.length-t.indexOf(`.`)-1:0}function Iz(e){var t=String(e);if(jz(e)){if(e>2**53-1)return String(Oz()?BigInt(e).toString():2**53-1);if(e<-(2**53-1))return String(Oz()?BigInt(e).toString():-(2**53-1));var n=Mz(t),r=Pz(n);t=r>100?Nz(n):e.toFixed(r)}return Az(t).fullStr}function Lz(e){return typeof e==`number`?!Number.isNaN(e):e?/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e):!1}var Rz=function(){function e(t){if(Yo(this,e),Ko(this,`origin`,``),Ko(this,`negative`,void 0),Ko(this,`integer`,void 0),Ko(this,`decimal`,void 0),Ko(this,`decimalLen`,void 0),Ko(this,`empty`,void 0),Ko(this,`nan`,void 0),kz(t)){this.empty=!0;return}if(this.origin=String(t),t===`-`||Number.isNaN(t)){this.nan=!0;return}var n=t;if(jz(n)&&(n=Number(n)),n=typeof n==`string`?n:Iz(n),Lz(n)){var r=Az(n);this.negative=r.negative;var i=r.trimStr.split(`.`);this.integer=BigInt(i[0]);var a=i[1]||`0`;this.decimal=BigInt(a),this.decimalLen=a.length}else this.nan=!0}return Zo(e,[{key:`getMark`,value:function(){return this.negative?`-`:``}},{key:`getIntegerStr`,value:function(){return this.integer.toString()}},{key:`getDecimalStr`,value:function(){return this.decimal.toString().padStart(this.decimalLen,`0`)}},{key:`alignDecimal`,value:function(e){var t=`${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(e,`0`)}`;return BigInt(t)}},{key:`negate`,value:function(){var t=new e(this.toString());return t.negative=!t.negative,t}},{key:`cal`,value:function(t,n,r){var i=Math.max(this.getDecimalStr().length,t.getDecimalStr().length),a=n(this.alignDecimal(i),t.alignDecimal(i)).toString(),o=r(i),s=Az(a),c=`${s.negativeStr}${s.trimStr.padStart(o+1,`0`)}`;return new e(`${c.slice(0,-o)}.${c.slice(-o)}`)}},{key:`add`,value:function(t){if(this.isInvalidate())return new e(t);var n=new e(t);return n.isInvalidate()?this:this.cal(n,function(e,t){return e+t},function(e){return e})}},{key:`multi`,value:function(t){var n=new e(t);return this.isInvalidate()||n.isInvalidate()?new e(NaN):this.cal(n,function(e,t){return e*t},function(e){return e*2})}},{key:`isEmpty`,value:function(){return this.empty}},{key:`isNaN`,value:function(){return this.nan}},{key:`isInvalidate`,value:function(){return this.isEmpty()||this.isNaN()}},{key:`equals`,value:function(e){return this.toString()===e?.toString()}},{key:`lessEquals`,value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:`toNumber`,value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:`toString`,value:function(){return!(arguments.length>0&&arguments[0]!==void 0)||arguments[0]?this.isInvalidate()?``:Az(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr:this.origin}}]),e}(),zz=function(){function e(t){if(Yo(this,e),Ko(this,`origin`,``),Ko(this,`number`,void 0),Ko(this,`empty`,void 0),kz(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return Zo(e,[{key:`negate`,value:function(){return new e(-this.toNumber())}},{key:`add`,value:function(t){if(this.isInvalidate())return new e(t);var n=Number(t);if(Number.isNaN(n))return this;var r=this.number+n;if(r>2**53-1)return new e(2**53-1);if(r<-(2**53-1))return new e(-(2**53-1));var i=Math.max(Fz(this.number),Fz(n));return new e(r.toFixed(i))}},{key:`multi`,value:function(t){var n=Number(t);if(this.isInvalidate()||Number.isNaN(n))return new e(NaN);var r=this.number*n;if(r>2**53-1)return new e(2**53-1);if(r<-(2**53-1))return new e(-(2**53-1));var i=Math.max(Fz(this.number),Fz(n));return new e(r.toFixed(i))}},{key:`isEmpty`,value:function(){return this.empty}},{key:`isNaN`,value:function(){return Number.isNaN(this.number)}},{key:`isInvalidate`,value:function(){return this.isEmpty()||this.isNaN()}},{key:`equals`,value:function(e){return this.toNumber()===e?.toNumber()}},{key:`lessEquals`,value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:`toNumber`,value:function(){return this.number}},{key:`toString`,value:function(){return!(arguments.length>0&&arguments[0]!==void 0)||arguments[0]?this.isInvalidate()?``:jz(this.number)&&Fz(this.number)>100?String(this.number):Iz(this.number):this.origin}}]),e}();function Bz(e){return Oz()?new Rz(e):new zz(e)}function Vz(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===``)return``;var i=Az(e),a=i.negativeStr,o=i.integerStr,s=i.decimalStr,c=`${t}${s}`,l=`${a}${o}`;if(n>=0){var u=Number(s[n]);return u>=5&&!r?Vz(Bz(e).add(`${a}0.${`0`.repeat(n)}${10-u}`).toString(),t,n,r):n===0?l:`${l}${t}${s.padEnd(n,`0`).slice(0,n)}`}return c===`.0`?l:`${l}${c}`}var Hz=Bz;function Uz(e,t){return typeof Proxy<`u`&&e?new Proxy(e,{get(e,n){if(t[n])return t[n];let r=e[n];return typeof r==`function`?r.bind(e):r}}):e}function Wz(e,t){let n=(0,S.useRef)(null);function r(){try{let{selectionStart:t,selectionEnd:r,value:i}=e;n.current={start:t,end:r,value:i,beforeTxt:i.substring(0,t),afterTxt:i.substring(r)}}catch{}}function i(){if(e&&n.current&&t)try{let{value:t}=e,{beforeTxt:r,afterTxt:i,start:a}=n.current,o=t.length;if(t.startsWith(r))o=r.length;else if(t.endsWith(i))o=t.length-n.current.afterTxt.length;else{let e=r[a-1],n=t.indexOf(e,a-1);n!==-1&&(o=n+1)}e.setSelectionRange(o,o)}catch(e){br(!1,`Something warning of cursor restore. Please fire issue about this: ${e.message}`)}}return[r,i]}var Gz=200,Kz=600;function qz({prefixCls:e,action:t,children:n,disabled:r,className:i,style:a,onStep:o}){let s=t===`up`,c=S.useRef(),l=S.useRef([]),u=()=>{clearTimeout(c.current)},d=e=>{e.preventDefault(),u(),o(s,`handler`);function t(){o(s,`handler`),c.current=setTimeout(t,Gz)}c.current=setTimeout(t,Kz)};S.useEffect(()=>()=>{u(),l.current.forEach(e=>{ri.cancel(e)})},[]);let f=`${e}-action`,p=J(f,`${f}-${t}`,{[`${f}-${t}-disabled`]:r},i),m=()=>l.current.push(ri(u));return S.createElement(`span`,{unselectable:`on`,role:`button`,onMouseUp:m,onMouseLeave:m,onMouseDown:e=>{d(e)},"aria-label":s?`Increase Value`:`Decrease Value`,"aria-disabled":r,className:p,style:a},n||S.createElement(`span`,{unselectable:`on`,className:`${e}-action-${t}-inner`}))}function Jz(e){let t=typeof e==`number`?Iz(e):Az(e).fullStr;return t.includes(`.`)?Az(t.replace(/(\d)\.(\d)/g,`$1$2.`)).fullStr:e+`0`}var Yz=(()=>{let e=(0,S.useRef)(0),t=()=>{ri.cancel(e.current)};return(0,S.useEffect)(()=>t,[]),n=>{t(),e.current=ri(()=>{n()})}});function Xz(){return Xz=Object.assign?Object.assign.bind():function(e){for(var t=1;te||t.isEmpty()?t.toString():t.toNumber(),Qz=e=>{let t=Hz(e);return t.isInvalidate()?null:t},$z=S.forwardRef((e,t)=>{let{mode:n=`input`,prefixCls:r=`rc-input-number`,className:i,style:a,classNames:o,styles:s,min:c,max:l,step:u=1,defaultValue:d,value:f,disabled:p,readOnly:m,upHandler:h,downHandler:g,keyboard:_,changeOnWheel:v=!1,controls:y=!0,prefix:b,suffix:x,stringMode:C,parser:w,formatter:T,precision:E,decimalSeparator:D,onChange:O,onInput:k,onPressEnter:A,onStep:j,onMouseDown:M,onClick:N,onMouseUp:P,onMouseLeave:F,onMouseMove:I,onMouseEnter:L,onMouseOut:R,changeOnBlur:z=!0,...B}=e,[V,H]=S.useState(!1),U=S.useRef(!1),W=S.useRef(!1),ee=S.useRef(!1),te=S.useRef(null),ne=S.useRef(null);S.useImperativeHandle(t,()=>Uz(ne.current,{focus:e=>{l_(ne.current,e)},blur:()=>{ne.current?.blur()},nativeElement:te.current}));let[re,ie]=S.useState(()=>Hz(f??d));function ae(e){f===void 0&&ie(e)}let G=S.useCallback((e,t)=>{if(!t)return E>=0?E:Math.max(Fz(e),Fz(u))},[E,u]),oe=S.useCallback(e=>{let t=String(e);if(w)return w(t);let n=t;return D&&(n=n.replace(D,`.`)),n.replace(/[^\w.-]+/g,``)},[w,D]),K=S.useRef(``),se=S.useCallback((e,t)=>{if(T)return T(e,{userTyping:t,input:String(K.current)});let n=typeof e==`number`?Iz(e):e;if(!t){let e=G(n,t);Lz(n)&&(D||e>=0)&&(n=Vz(n,D||`.`,e))}return n},[T,G,D]),[ce,q]=S.useState(()=>{let e=d??f;return re.isInvalidate()&&[`string`,`number`].includes(typeof e)?Number.isNaN(e)?``:e:se(re.toString(),!1)});K.current=ce;function le(e,t){q(se(e.isInvalidate()?e.toString(!1):e.toString(!t),t))}let ue=S.useMemo(()=>Qz(l),[l,E]),de=S.useMemo(()=>Qz(c),[c,E]),fe=S.useMemo(()=>!ue||!re||re.isInvalidate()?!1:ue.lessEquals(re),[ue,re]),pe=S.useMemo(()=>!de||!re||re.isInvalidate()?!1:re.lessEquals(de),[de,re]),[me,he]=Wz(ne.current,V),ge=e=>ue&&!e.lessEquals(ue)?ue:de&&!de.lessEquals(e)?de:null,_e=e=>!ge(e),ve=(e,t)=>{let n=e,r=_e(n)||n.isEmpty();if(!n.isEmpty()&&!t&&(n=ge(n)||n,r=!0),!m&&!p&&r){let e=n.toString(),r=G(e,t);return r>=0&&(n=Hz(Vz(e,`.`,r)),_e(n)||(n=Hz(Vz(e,`.`,r,!0)))),n.equals(re)||(ae(n),O?.(n.isEmpty()?null:Zz(C,n)),f===void 0&&le(n,t)),n}return re},ye=Yz(),be=e=>{if(me(),K.current=e,q(e),!W.current){let t=Hz(oe(e));t.isNaN()||ve(t,!0)}k?.(e),ye(()=>{let t=e;w||(t=e.replace(/。/g,`.`)),t!==e&&be(t)})},xe=()=>{W.current=!0},Se=()=>{W.current=!1,be(ne.current.value)},Ce=e=>{be(e.target.value)},we=In((e,t)=>{if(e&&fe||!e&&pe)return;U.current=!1;let n=Hz(ee.current?Jz(u):u);e||(n=n.negate());let r=ve((re||Hz(0)).add(n.toString()),!1);j?.(Zz(C,r),{offset:ee.current?Jz(u):u,type:e?`up`:`down`,emitter:t}),ne.current?.focus()}),Te=e=>{let t=Hz(oe(ce)),n;n=t.isNaN()?ve(re,e):ve(t,e),f===void 0?n.isNaN()||le(n,!1):le(re,!1)},Ee=()=>{U.current=!0},De=e=>{let{key:t,shiftKey:n}=e;U.current=!0,ee.current=n,t===`Enter`&&(W.current||(U.current=!1),Te(!1),A?.(e)),_!==!1&&!W.current&&[`Up`,`ArrowUp`,`Down`,`ArrowDown`].includes(t)&&(we(t===`Up`||t===`ArrowUp`,`keyboard`),e.preventDefault())},Oe=()=>{U.current=!1,ee.current=!1};S.useEffect(()=>{if(v&&V){let e=e=>{we(e.deltaY<0,`wheel`),e.preventDefault()},t=ne.current;if(t)return t.addEventListener(`wheel`,e,{passive:!1}),()=>t.removeEventListener(`wheel`,e)}});let ke=()=>{z&&Te(!1),H(!1),U.current=!1},Ae=e=>{ne.current&&e.target!==ne.current&&(ne.current.focus(),e.preventDefault()),M?.(e)};Bn(()=>{re.isInvalidate()||le(re,!1)},[E,T]),Bn(()=>{let e=Hz(f);ie(e);let t=Hz(oe(ce));(!e.equals(t)||!U.current||T)&&le(e,U.current)},[f]),Bn(()=>{T&&he()},[ce]);let je={prefixCls:r,onStep:we,className:o?.action,style:s?.action},Me=S.createElement(qz,Xz({},je,{action:`up`,disabled:fe}),h),Ne=S.createElement(qz,Xz({},je,{action:`down`,disabled:pe}),g);return S.createElement(`div`,{ref:te,className:J(r,`${r}-mode-${n}`,i,o?.root,{[`${r}-focused`]:V,[`${r}-disabled`]:p,[`${r}-readonly`]:m,[`${r}-not-a-number`]:re.isNaN(),[`${r}-out-of-range`]:!re.isInvalidate()&&!_e(re)}),style:{...s?.root,...a},onMouseDown:Ae,onMouseUp:P,onMouseLeave:F,onMouseMove:I,onMouseEnter:L,onMouseOut:R,onClick:N,onFocus:()=>{H(!0)},onBlur:ke,onKeyDown:De,onKeyUp:Oe,onCompositionStart:xe,onCompositionEnd:Se,onBeforeInput:Ee},n===`spinner`&&y&&Ne,b!==void 0&&S.createElement(`div`,{className:J(`${r}-prefix`,o?.prefix),style:s?.prefix},b),S.createElement(`input`,Xz({autoComplete:`off`,role:`spinbutton`,"aria-valuemin":c,"aria-valuemax":l,"aria-valuenow":re.isInvalidate()?null:re.toString(),step:u,ref:ne,className:J(`${r}-input`,o?.input),style:s?.input,value:ce,onChange:Ce,disabled:p,readOnly:m},B)),x!==void 0&&S.createElement(`div`,{className:J(`${r}-suffix`,o?.suffix),style:s?.suffix},x),n===`spinner`&&y&&Me,n===`input`&&y&&S.createElement(`div`,{className:J(`${r}-actions`,o?.actions),style:s?.actions},Me,Ne))}),eB=e=>{let{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:a,fontSizeLG:o,fontSizeSM:s,borderRadiusLG:c,borderRadiusSM:l,colorBgContainerDisabled:u,lineWidth:d,antCls:f}=e,[p,m]=ol(f,`space`);return{[t]:[{display:`inline-flex`,alignItems:`center`,gap:0,whiteSpace:`nowrap`,paddingInline:r,margin:0,borderWidth:d,borderStyle:`solid`,borderRadius:n,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:o,borderRadius:c},"&-small":{paddingInline:a,borderRadius:l,fontSize:s},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[p(`addon-border-color`)]:i,[p(`addon-background`)]:u,[p(`addon-border-color-outlined`)]:i,[p(`addon-background-filled`)]:u,borderColor:m(`addon-border-color`),background:m(`addon-background`),"&-variant-outlined":{[p(`addon-border-color`)]:m(`addon-border-color-outlined`)},"&-variant-filled":{[p(`addon-border-color`)]:`transparent`,[p(`addon-background`)]:m(`addon-background-filled`),[`&${t}-disabled`]:{[p(`addon-border-color`)]:i,[p(`addon-background`)]:u}},"&-variant-borderless":{border:`none`,background:`transparent`},"&-variant-underlined":{border:`none`,background:`transparent`}},{"&-status-error":{[p(`addon-border-color-outlined`)]:e.colorError,[p(`addon-background-filled`)]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[p(`addon-border-color-outlined`)]:e.colorWarning,[p(`addon-background-filled`)]:e.colorWarningBg,color:e.colorWarning}}]}},tB=rl([`Space`,`Addon`],e=>[eB(e),Yg(e,{focus:!1})]),nB=S.forwardRef((e,t)=>{let{className:n,children:r,style:i,prefixCls:a,variant:o=`outlined`,disabled:s,status:c,...l}=e,{getPrefixCls:u,direction:d}=S.useContext(oi),f=u(`space-addon`,a),[p,m]=tB(f),{compactItemClassnames:h,compactSize:g}=ih(f,d),_=sC(f,c),v=J(f,p,h,m,`${f}-variant-${o}`,_,{[`${f}-${g}`]:g,[`${f}-disabled`]:s},n);return S.createElement(`div`,{ref:t,className:v,style:i,...l},r)}),rB=e=>{let t=e.handleVisible??`auto`,n=e.controlHeightSM-e.lineWidth*2;return{...rL(e),controlWidth:90,handleWidth:n,handleFontSize:e.fontSize/2,handleVisible:t,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new Rs(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:+(t===!0),handleVisibleWidth:t===!0?n:0}},iB=e=>{let{componentCls:t,lineWidth:n,lineType:r,borderRadius:i,inputFontSizeSM:a,inputFontSizeLG:o,colorError:s,paddingInlineSM:c,paddingBlockSM:l,paddingBlockLG:u,paddingInlineLG:d,colorIcon:f,colorTextDisabled:p,motionDurationMid:m,handleHoverColor:h,handleOpacity:g,paddingInline:_,paddingBlock:v,handleBg:y,handleActiveBg:b,inputAffixPadding:x,borderRadiusSM:S,controlWidth:C,handleBorderColor:w,filledHandleBg:T,lineHeightLG:E,antCls:D}=e,O=`${Y(n)} ${r} ${w}`,[k,A]=ol(D,`input-number`);return[{[t]:{...Jc(e),...bL(e),[k(`input-padding-block`)]:Y(v),[k(`input-padding-inline`)]:Y(_),display:`inline-flex`,width:C,margin:0,paddingBlock:0,borderRadius:i,...sL(e,{[`${t}-actions`]:{background:y,[`${t}-action-down`]:{borderBlockStart:O}}}),...fL(e,{[`${t}-actions`]:{background:T,[`${t}-action-down`]:{borderBlockStart:O}},"&:focus-within":{[`${t}-actions`]:{background:y}}}),...gL(e,{[`${t}-actions`]:{background:y,[`${t}-action-down`]:{borderBlockStart:O}}}),...lL(e),[`&${t}-borderless`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(v).add(n).equal())},[`&${t}-borderless${t}-sm`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(l).add(n).equal())},[`&${t}-borderless${t}-lg`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(u).add(n).equal())},"&-rtl":{direction:`rtl`,[`${t}-input`]:{direction:`rtl`}},[`&${t}-out-of-range`]:{[`${t}-input`]:{color:s}},[`${t}-input`]:{...Jc(e),width:`100%`,paddingBlock:A(`input-padding-block`),textAlign:`start`,backgroundColor:`transparent`,border:0,borderRadius:0,outline:0,transition:`all ${m} linear`,appearance:`textfield`,fontSize:`inherit`,lineHeight:`inherit`,..._L(e.colorTextPlaceholder),'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:`none`}},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1},[`&-disabled ${t}-input`]:{cursor:`not-allowed`,color:e.colorTextDisabled}}},{[t]:{[`${t}-action`]:{...Yc(),userSelect:`none`,overflow:`hidden`,fontWeight:`bold`,lineHeight:0,textAlign:`center`,cursor:`pointer`,transition:`all ${m} linear`,[`&:active:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{background:b},[`&:hover:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{color:h},[`&${t}-action-up-disabled, &${t}-action-down-disabled`]:{cursor:`not-allowed`,color:p}},"&-mode-input":{overflow:`hidden`,[`${t}-actions`]:{position:`absolute`,insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:g,height:`100%`,borderRadius:0,display:`flex`,flexDirection:`column`,alignItems:`stretch`,transition:`all ${m}`,overflow:`hidden`,[`${t}-action`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,flex:`auto`,height:`40%`,marginInlineEnd:0,fontSize:e.handleFontSize}},[`&:hover ${t}-actions, &-focused ${t}-actions`]:{width:e.handleWidth,opacity:1},[`${t}-action`]:{color:f,height:`50%`,borderInlineStart:O,[`&:hover:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{height:`60%`}},[`&${t}-disabled, &${t}-readonly`]:{[`${t}-actions`]:{display:`none`}}},[`&${t}-mode-spinner`]:{padding:0,width:`auto`,[`${t}-action`]:{flex:`none`,paddingInline:A(`input-padding-inline`),"&-up":{borderInlineStart:O},"&-down":{borderInlineEnd:O}},[`${t}-input`]:{textAlign:`center`,paddingInline:A(`input-padding-inline`)}}}},{[t]:{"&-lg":{[k(`input-padding-block`)]:Y(u),[k(`input-padding-inline`)]:Y(d),paddingBlock:0,fontSize:o,lineHeight:E},"&-sm":{[k(`input-padding-block`)]:Y(l),[k(`input-padding-inline`)]:Y(c),paddingBlock:0,fontSize:a,borderRadius:S}}},{[t]:{[`${t}-prefix, ${t}-suffix`]:{display:`flex`,flex:`none`,alignItems:`center`,alignSelf:`center`,pointerEvents:`none`},[`${t}-prefix`]:{marginInlineEnd:x},[`${t}-suffix`]:{height:`100%`,marginInlineStart:x,transition:`margin ${m}`},[`&:hover:not(${t}-without-controls)`]:{[`${t}-suffix`]:{marginInlineEnd:e.handleWidth}}}}]},aB=e=>{let{componentCls:t,antCls:n}=e;return{[`${t}-addon`]:{[`&:has(${n}-select)`]:{border:0,padding:0}}}},oB=rl(`InputNumber`,e=>{let t=gs(e,nL(e));return[iB(t),aB(t),Yg(t)]},rB,{unitless:{handleOpacity:!0},resetFont:!1}),sB=S.forwardRef((e,t)=>{let n=S.useRef(null);S.useImperativeHandle(t,()=>n.current);let{rootClassName:r,size:i,disabled:a,prefixCls:o,addonBefore:s,addonAfter:c,prefix:l,suffix:u,bordered:d,readOnly:f,status:p,controls:m=!0,variant:h,className:g,style:_,classNames:v,styles:y,mode:b,...x}=e,{direction:C,className:w,style:T,styles:E,classNames:D}=li(`inputNumber`),O=S.useContext(zp),k=a??O,A=S.useMemo(()=>!m||k||f?!1:m,[m,k,f]),{compactSize:j,compactItemClassnames:M}=ih(o,C),N=b===`spinner`?S.createElement(DL,null):S.createElement(Dz,null),P=b===`spinner`?S.createElement(wz,null):S.createElement(MC,null),F=typeof A==`boolean`?A:void 0;hd(A)&&(N=A.upIcon||N,P=A.downIcon||P);let{hasFeedback:I,isFormItemInput:L,feedbackIcon:R}=S.useContext(Sy),z=th(e=>i??j??e),[B,V]=_C(`inputNumber`,h,d),H=I&&S.createElement(S.Fragment,null,R),U={...e,size:z,disabled:k,controls:A},[W,ee]=Fd([D,v],[E,y],{props:U});return S.createElement($z,{ref:n,mode:b,disabled:k,className:J(g,r,W.root,w,M,sC(o,p,I),{[`${o}-${B}`]:V,[`${o}-lg`]:z===`large`,[`${o}-sm`]:z===`small`,[`${o}-rtl`]:C===`rtl`,[`${o}-in-form-item`]:L,[`${o}-without-controls`]:!A}),style:{...ee.root,...T,..._},upHandler:N,downHandler:P,prefixCls:o,readOnly:f,controls:F,prefix:l,suffix:H||u,classNames:W,styles:ee,...x})}),cB=S.forwardRef((e,t)=>{let{addonBefore:n,addonAfter:r,prefixCls:i,className:a,status:o,rootClassName:s,...c}=e,{getPrefixCls:l}=li(`inputNumber`),u=l(`input-number`,i),{status:d}=S.useContext(Sy),f=cC(d,o),p=bf(u),[m,h]=oB(u,p),g=n||r,_=S.createElement(sB,{ref:t,...c,prefixCls:u,status:f,className:J(h,p,m,a),rootClassName:g?void 0:s});if(g){let t=t=>t?S.createElement(nB,{className:J(`${u}-addon`,h,m),variant:e.variant,disabled:e.disabled,status:f},S.createElement(Ty,{form:!0},t)):null,i=t(n),a=t(r);return S.createElement(sh,{rootClassName:s},i,_,a)}return _}),lB=cB;lB._InternalPanelDoNotUseOrYouWillBeFired=e=>S.createElement(am,{theme:{components:{InputNumber:{handleVisible:!0}}}},S.createElement(cB,{...e}));function uB(e){return!!(e.addonBefore||e.addonAfter)}function dB(e){return!!(e.prefix||e.suffix||e.allowClear)}function fB(e,t,n){let r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart==`number`&&typeof t.selectionEnd==`number`&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=(...e)=>{t.setSelectionRange(...e)},i}function pB(e,t,n,r){if(!n)return;let i=t;if(t.type===`click`){i=fB(t,e,``),n(i);return}if(e.type!==`file`&&r!==void 0){i=fB(t,e,r),n(i);return}n(i)}function mB(){return mB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{inputElement:n,children:r,prefixCls:i,prefix:a,suffix:o,addonBefore:s,addonAfter:c,className:l,style:u,disabled:d,readOnly:f,focused:p,triggerFocus:m,allowClear:h,value:g,handleReset:_,hidden:v,classes:y,classNames:b,dataAttrs:x,styles:C,components:w,onClear:T}=e,E=r??n,D=w?.affixWrapper||`span`,O=w?.groupWrapper||`span`,k=w?.wrapper||`span`,A=w?.groupAddon||`span`,j=(0,S.useRef)(null),M=e=>{j.current?.contains(e.target)&&m?.()},N=dB(e),P=(0,S.cloneElement)(E,{value:g,className:J(E.props?.className,!N&&b?.variant)||null}),F=(0,S.useRef)(null);if(S.useImperativeHandle(t,()=>({nativeElement:F.current||j.current})),N){let e=null;if(h){let t=!d&&!f&&g,n=`${i}-clear-icon`,r=typeof h==`object`&&h?.clearIcon?h.clearIcon:`✖`;e=S.createElement(`button`,{type:`button`,tabIndex:-1,onClick:e=>{_?.(e),T?.()},onMouseDown:e=>e.preventDefault(),className:J(n,{[`${n}-hidden`]:!t,[`${n}-has-suffix`]:!!o})},r)}let t=`${i}-affix-wrapper`,n=J(t,{[`${i}-disabled`]:d,[`${t}-disabled`]:d,[`${t}-focused`]:p,[`${t}-readonly`]:f,[`${t}-input-with-clear-btn`]:o&&h&&g},y?.affixWrapper,b?.affixWrapper,b?.variant),r=(o||h)&&S.createElement(`span`,{className:J(`${i}-suffix`,b?.suffix),style:C?.suffix},e,o);P=S.createElement(D,mB({className:n,style:C?.affixWrapper,onClick:M},x?.affixWrapper,{ref:j}),a&&S.createElement(`span`,{className:J(`${i}-prefix`,b?.prefix),style:C?.prefix},a),P,r)}if(uB(e)){let e=`${i}-group`,t=`${e}-addon`,n=`${e}-wrapper`,r=J(`${i}-wrapper`,e,y?.wrapper,b?.wrapper),a=J(n,{[`${n}-disabled`]:d},y?.group,b?.groupWrapper);P=S.createElement(O,{className:a,ref:F},S.createElement(k,{className:r},s&&S.createElement(A,{className:t},s),P,c&&S.createElement(A,{className:t},c)))}return S.cloneElement(P,{className:J(P.props?.className,l)||null,style:{...P.props?.style,...u},hidden:v})});function gB(e,t){return S.useMemo(()=>{let n={};t&&(n.show=typeof t==`object`&&t.formatter?t.formatter:!!t),n={...n,...e};let{show:r,...i}=n;return{...i,show:!!r,showFormatter:typeof r==`function`?r:void 0,strategy:i.strategy||(e=>e.length)}},[e,t])}function _B(){return _B=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{autoComplete:n,onChange:r,onFocus:i,onBlur:a,onPressEnter:o,onKeyDown:s,onKeyUp:c,prefixCls:l=`rc-input`,disabled:u,htmlSize:d,className:f,maxLength:p,suffix:m,showCount:h,count:g,type:_=`text`,classes:v,classNames:y,styles:b,onCompositionStart:x,onCompositionEnd:C,...w}=e,[T,E]=(0,S.useState)(!1),D=(0,S.useRef)(!1),O=(0,S.useRef)(!1),k=(0,S.useRef)(null),A=(0,S.useRef)(null),j=e=>{k.current&&l_(k.current,e)},[M,N]=Hn(e.defaultValue,e.value),P=M==null?``:String(M),[F,I]=(0,S.useState)(null),L=gB(g,h),R=L.max||p,z=L.strategy(P),B=!!R&&z>R;(0,S.useImperativeHandle)(t,()=>({focus:j,blur:()=>{k.current?.blur()},setSelectionRange:(e,t,n)=>{k.current?.setSelectionRange(e,t,n)},select:()=>{k.current?.select()},input:k.current,nativeElement:A.current?.nativeElement||k.current})),(0,S.useEffect)(()=>{O.current&&=!1,E(e=>e&&u?!1:e)},[u]);let V=(e,t,n)=>{let i=t;if(!D.current&&L.exceedFormatter&&L.max&&L.strategy(t)>L.max)i=L.exceedFormatter(t,{max:L.max}),t!==i&&I([k.current?.selectionStart||0,k.current?.selectionEnd||0]);else if(n.source===`compositionEnd`)return;N(i),k.current&&pB(k.current,e,r,i)};(0,S.useEffect)(()=>{F&&k.current?.setSelectionRange(...F)},[F]);let H=e=>{V(e,e.target.value,{source:`change`})},U=e=>{D.current=!1,V(e,e.currentTarget.value,{source:`compositionEnd`}),C?.(e)},W=e=>{o&&e.key===`Enter`&&!O.current&&!e.nativeEvent.isComposing&&(O.current=!0,o(e)),s?.(e)},ee=e=>{e.key===`Enter`&&(O.current=!1),c?.(e)},te=e=>{E(!0),i?.(e)},ne=e=>{O.current&&=!1,E(!1),a?.(e)},re=e=>{N(``),j(),k.current&&pB(k.current,e,r)},ie=B&&`${l}-out-of-range`;return S.createElement(hB,_B({},w,{prefixCls:l,className:J(f,ie),handleReset:re,value:P,focused:T,triggerFocus:j,suffix:(()=>{let e=Number(R)>0;if(m||L.show){let t=L.showFormatter?L.showFormatter({value:P,count:z,maxLength:R}):`${z}${e?` / ${R}`:``}`;return S.createElement(S.Fragment,null,L.show&&S.createElement(`span`,{className:J(`${l}-show-count-suffix`,{[`${l}-show-count-has-suffix`]:!!m},y?.count),style:{...b?.count}},t),m)}return null})(),disabled:u,classes:v,classNames:y,styles:b,ref:A}),(()=>{let t=Sr(e,[`prefixCls`,`onPressEnter`,`addonBefore`,`addonAfter`,`prefix`,`suffix`,`allowClear`,`defaultValue`,`showCount`,`count`,`classes`,`htmlSize`,`styles`,`classNames`,`onClear`]);return S.createElement(`input`,_B({autoComplete:n},t,{onChange:H,onFocus:te,onBlur:ne,onKeyDown:W,onKeyUp:ee,className:J(l,{[`${l}-disabled`]:u},y?.input),style:b?.input,ref:k,size:d,type:_,onCompositionStart:e=>{D.current=!0,x?.(e)},onCompositionEnd:U}))})())}),yB=e=>{let t;return hd(e)&&e?.clearIcon?t=e:e&&(t={clearIcon:S.createElement(Fl,null)}),t};function bB(e,t){let n=(0,S.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute(`type`)===`password`&&e.current?.input.hasAttribute(`value`)&&e.current?.input.removeAttribute(`value`)}))};return(0,S.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[]),r}function xB(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var SB=(0,S.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,status:i,size:a,disabled:o,onBlur:s,onFocus:c,suffix:l,allowClear:u,addonAfter:d,addonBefore:f,className:p,style:m,styles:h,rootClassName:g,onChange:_,classNames:v,variant:y,...b}=e,{getPrefixCls:x,direction:C,allowClear:w,autoComplete:T,className:E,style:D,classNames:O,styles:k}=li(`input`),A=x(`input`,n),j=(0,S.useRef)(null),M=bf(A),[N,P]=xL(A,g);SL(A,M);let{compactSize:F,compactItemClassnames:I}=ih(A,C),L=th(e=>a??F??e),R=S.useContext(zp),z=o??R,B={...e,size:L,disabled:z},[V,H]=Fd([O,v],[k,h],{props:B}),{status:U,hasFeedback:W,feedbackIcon:ee}=(0,S.useContext)(Sy),te=cC(U,i);(0,S.useRef)(xB(e)||!!W);let ne=bB(j,!0),re=e=>{ne(),s?.(e)},ie=e=>{ne(),c?.(e)},ae=e=>{ne(),_?.(e)},G=(W||l)&&S.createElement(S.Fragment,null,l,W&&ee),oe=yB(u??w),[K,se]=_C(`input`,y,r);return S.createElement(vB,{ref:$n(t,j),prefixCls:A,autoComplete:T,...b,disabled:z,onBlur:re,onFocus:ie,style:{...H.root,...D,...m},styles:H,suffix:G,allowClear:oe,className:J(p,g,P,M,I,E,V.root),onChange:ae,addonBefore:f&&S.createElement(Ty,{form:!0,space:!0},f),addonAfter:d&&S.createElement(Ty,{form:!0,space:!0},d),classNames:{...V,input:J({[`${A}-sm`]:L===`small`,[`${A}-lg`]:L===`large`,[`${A}-rtl`]:C===`rtl`},V.input,N),variant:J({[`${A}-${K}`]:se},sC(A,te)),affixWrapper:J({[`${A}-affix-wrapper-sm`]:L===`small`,[`${A}-affix-wrapper-lg`]:L===`large`,[`${A}-affix-wrapper-rtl`]:C===`rtl`},N),wrapper:J({[`${A}-group-rtl`]:C===`rtl`},N),groupWrapper:J({[`${A}-group-wrapper-sm`]:L===`small`,[`${A}-group-wrapper-lg`]:L===`large`,[`${A}-group-wrapper-rtl`]:C===`rtl`,[`${A}-group-wrapper-${K}`]:se},sC(`${A}-group-wrapper`,te,W),N)}})}),CB={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z`}}]},name:`swap-right`,theme:`outlined`};function wB(){return wB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,wB({},e,{ref:t,icon:CB}))),EB=(e,t,n,r,i,a)=>{let{classNames:o,styles:s}=li(e),[c,l]=Fd([o,t],[s,n],{props:a},{popup:{_default:`root`}});return S.useMemo(()=>[{...c,popup:{...c.popup,root:J(c.popup?.root,r)}},{...l,popup:{...l.popup,root:{...l.popup?.root,...i}}}],[c,l,r,i])};function DB(e,t,n){return n===void 0?t===`year`&&e.lang.yearPlaceholder?e.lang.yearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.quarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.monthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.weekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.placeholder:e.lang.placeholder:n}function OB(e,t,n){return n===void 0?t===`year`&&e.lang.yearPlaceholder?e.lang.rangeYearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.rangeQuarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.rangeMonthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.rangeWeekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.rangePlaceholder:e.lang.rangePlaceholder:n}function kB(e,t){let{allowClear:n=!0}=e,{clearIcon:r,removeIcon:i}=IC({...e,prefixCls:t,componentName:`DatePicker`});return[S.useMemo(()=>n===!1?!1:{clearIcon:r,...n===!0?{}:n},[n,r]),i]}var[AB,jB]=[`week`,`WeekPicker`],[MB,NB]=[`month`,`MonthPicker`],[PB,FB]=[`year`,`YearPicker`],[IB,LB]=[`quarter`,`QuarterPicker`],[RB,zB]=[`time`,`TimePicker`],BB={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z`}}]},name:`calendar`,theme:`outlined`};function VB(){return VB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,VB({},e,{ref:t,icon:BB}))),UB={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`};function WB(){return WB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,WB({},e,{ref:t,icon:UB}))),KB=({picker:e,hasFeedback:t,feedbackIcon:n,suffixIcon:r})=>r===null||r===!1?null:r===!0||r===void 0?S.createElement(S.Fragment,null,e===RB?S.createElement(GB,null):S.createElement(HB,null),t&&n):r,qB=e=>S.createElement(Zg,{size:`small`,type:`primary`,...e});function JB(e){return(0,S.useMemo)(()=>({button:qB,...e}),[e])}var YB=e=>(0,S.forwardRef)((t,n)=>{let{prefixCls:r,getPopupContainer:i,components:a,className:o,style:s,classNames:c,styles:l,placement:u,size:d,disabled:f,bordered:p=!0,placeholder:m,status:h,variant:g,picker:_,dropdownClassName:v,popupClassName:y,popupStyle:b,rootClassName:x,suffixIcon:C,separator:w,...T}=t,[E,D]=EB(_===RB?`timePicker`:`datePicker`,c,l,y||v,b),O=S.useRef(null),{getPrefixCls:k,direction:A,getPopupContainer:j,rangePicker:M}=(0,S.useContext)(oi),N=k(`picker`,r),{compactSize:P,compactItemClassnames:F}=ih(N,A),I=k(),L=w??M?.separator,[R,z]=_C(`rangePicker`,g,p),B=bf(N),[V,H]=TL(N,B),U=J(V,H,B,x),[W]=kB(t,N),ee=JB(a),te=th(e=>d??P??e),ne=S.useContext(zp),re=f??ne,{hasFeedback:ie,status:ae,feedbackIcon:G}=(0,S.useContext)(Sy),oe=KB({picker:_,hasFeedback:ie,feedbackIcon:G,suffixIcon:C});(0,S.useImperativeHandle)(n,()=>O.current);let[K]=cd(`Calendar`,Qu),se=fr(K,t.locale||{}),[ce]=Yd(`DatePicker`,D?.popup?.root?.zIndex);return S.createElement(Ty,{space:!0},S.createElement(eI,{separator:S.createElement(`span`,{"aria-label":`to`,className:`${N}-separator`},L??S.createElement(TB,null)),disabled:re,ref:O,placement:u,placeholder:OB(se,_,m),suffixIcon:oe,prevIcon:S.createElement(`span`,{className:`${N}-prev-icon`}),nextIcon:S.createElement(`span`,{className:`${N}-next-icon`}),superPrevIcon:S.createElement(`span`,{className:`${N}-super-prev-icon`}),superNextIcon:S.createElement(`span`,{className:`${N}-super-next-icon`}),transitionName:`${I}-slide-up`,picker:_,...T,locale:se.lang,getPopupContainer:i||j,generateConfig:e,components:ee,direction:A,prefixCls:N,rootClassName:U,className:J({[`${N}-large`]:te===`large`,[`${N}-small`]:te===`small`,[`${N}-${R}`]:z},sC(N,cC(ae,h),ie),F,o,M?.className),style:{...M?.style,...s},classNames:E,styles:{...D,popup:{...D.popup,root:{...D.popup.root,zIndex:ce}}},allowClear:W}))}),XB=e=>{let t=(t,n)=>{let r=n===zB?`timePicker`:`datePicker`;return(0,S.forwardRef)((i,a)=>{let{prefixCls:o,getPopupContainer:s,components:c,style:l,className:u,size:d,bordered:f,placement:p,placeholder:m,disabled:h,status:g,variant:_,onCalendarChange:v,classNames:y,styles:b,dropdownClassName:x,popupClassName:C,popupStyle:w,rootClassName:T,suffixIcon:E,...D}=i,{suffixIcon:O}=li(n===zB?`timePicker`:`datePicker`),{getPrefixCls:k,direction:A,getPopupContainer:j,[r]:M}=(0,S.useContext)(oi),N=k(`picker`,o),{compactSize:P,compactItemClassnames:F}=ih(N,A),I=th(e=>d??P??e),L=S.useContext(zp),R=h??L,z={...i,size:I,disabled:R,status:g,variant:_},[B,V]=EB(r,y,b,C||x,w,z),H=S.useRef(null),[U,W]=_C(`datePicker`,_,f),ee=bf(N),[te,ne]=TL(N,ee),re=J(te,ne,ee,T);(0,S.useImperativeHandle)(a,()=>H.current);let ie={showToday:!0},ae=t||i.picker,G=k(),{onSelect:oe,multiple:K}=D,se=oe&&t===`time`&&!K,ce=(e,t,n)=>{v?.(e,t,n),se&&oe(e)},[q,le]=kB(i,N),ue=JB(c),{hasFeedback:de,status:fe,feedbackIcon:pe}=(0,S.useContext)(Sy),me=KB({picker:ae,hasFeedback:de,feedbackIcon:pe,suffixIcon:E===void 0?O:E}),[he]=cd(`DatePicker`,Qu),ge=fr(he,i.locale||{}),[_e]=Yd(`DatePicker`,V?.popup?.root?.zIndex);return S.createElement(Ty,{space:!0},S.createElement(RI,{ref:H,placeholder:DB(ge,ae,m),suffixIcon:me,placement:p,prevIcon:S.createElement(`span`,{className:`${N}-prev-icon`}),nextIcon:S.createElement(`span`,{className:`${N}-next-icon`}),superPrevIcon:S.createElement(`span`,{className:`${N}-super-prev-icon`}),superNextIcon:S.createElement(`span`,{className:`${N}-super-next-icon`}),transitionName:`${G}-slide-up`,picker:t,onCalendarChange:ce,...ie,...D,locale:ge.lang,getPopupContainer:s||j,generateConfig:e,components:ue,direction:A,disabled:R,prefixCls:N,rootClassName:re,className:J({[`${N}-large`]:I===`large`,[`${N}-small`]:I===`small`,[`${N}-${U}`]:W},sC(N,cC(fe,g),de),F,M?.className,u),style:{...M?.style,...l},classNames:B,styles:{...V,popup:{...V.popup,root:{...V.popup.root,zIndex:_e}}},allowClear:q,removeIcon:le}))})},n=t(),r=t(AB,jB),i=t(MB,NB),a=t(PB,FB),o=t(IB,LB);return{DatePicker:n,WeekPicker:r,MonthPicker:i,YearPicker:a,TimePicker:t(RB,zB),QuarterPicker:o}},ZB=e=>{let{DatePicker:t,WeekPicker:n,MonthPicker:r,YearPicker:i,TimePicker:a,QuarterPicker:o}=XB(e),s=YB(e),c=t;return c.WeekPicker=n,c.MonthPicker=r,c.YearPicker=i,c.RangePicker=s,c.TimePicker=a,c.QuarterPicker=o,c},QB=ZB(eD);QB._InternalPanelDoNotUseOrYouWillBeFired=ux(QB,`popupAlign`,void 0,`picker`),QB._InternalRangePanelDoNotUseOrYouWillBeFired=ux(QB.RangePicker,`popupAlign`,void 0,`picker`),QB.generatePicker=ZB;var $B={xxxl:4,xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},eV=S.createContext(null),tV=e=>Cr(e).map(e=>({...e?.props,key:e.key}));function nV(e,t,n){let r=S.useMemo(()=>t||tV(n),[t,n]);return S.useMemo(()=>r.map(({span:t,...n})=>t===`filled`?{...n,filled:!0}:{...n,span:pd(t)?t:KC(e,t)}),[r,e])}function rV(e,t){let n=[],r=[],i=!1,a=0;return e.filter(e=>e).forEach(e=>{let{filled:o,...s}=e;if(o){r.push(s),n.push(r),r=[],a=0;return}let c=t-a;a+=e.span||1,a>=t?(a>t?(i=!0,r.push({...s,span:c})):r.push(s),n.push(r),r=[],a=0):r.push(s)}),r.length>0&&n.push(r),n=n.map(e=>{let n=e.reduce((e,t)=>e+(t.span||1),0);if(n{let[n,r]=(0,S.useMemo)(()=>rV(t,e),[t,e]);return n},aV=e=>e.children,oV=e=>{let{itemPrefixCls:t,component:n,span:r,className:i,style:a,labelStyle:o,contentStyle:s,bordered:c,label:l,content:u,colon:d,type:f,styles:p,classNames:m}=e,h=n,{classNames:g,styles:_}=S.useContext(eV),[v,y]=Fd([g,m],[_,p],{props:e}),b={...o,...y.label},x={...s,...y.content};return c?S.createElement(h,{colSpan:r,style:a,className:J(i,{[`${t}-item-${f}`]:f===`label`||f===`content`,[v.label]:v.label&&f===`label`,[v.content]:v.content&&f===`content`})},fd(l)&&S.createElement(`span`,{style:b},l),fd(u)&&S.createElement(`span`,{style:x},u)):S.createElement(h,{className:J(`${t}-item`,i),style:a,colSpan:r},S.createElement(`div`,{className:`${t}-item-container`},fd(l)&&S.createElement(`span`,{style:b,className:J(`${t}-item-label`,v.label,{[`${t}-item-no-colon`]:!d})},l),fd(u)&&S.createElement(`span`,{style:x,className:J(`${t}-item-content`,v.content)},u)))};function sV(e,{colon:t,prefixCls:n,bordered:r},{component:i,type:a,showLabel:o,showContent:s,labelStyle:c,contentStyle:l,styles:u}){return e.map(({label:e,children:d,prefixCls:f=n,className:p,style:m,labelStyle:h,contentStyle:g,span:_=1,key:v,styles:y,classNames:b},x)=>typeof i==`string`?S.createElement(oV,{key:`${a}-${v||x}`,className:p,style:m,classNames:b,styles:{label:{...c,...u?.label,...h,...y?.label},content:{...l,...u?.content,...g,...y?.content}},span:_,colon:t,component:i,itemPrefixCls:f,bordered:r,label:o?e:null,content:s?d:null,type:a}):[S.createElement(oV,{key:`label-${v||x}`,className:p,style:{...c,...u?.label,...m,...h,...y?.label},span:1,colon:t,component:i[0],itemPrefixCls:f,bordered:r,label:e,type:`label`}),S.createElement(oV,{key:`content-${v||x}`,className:p,style:{...l,...u?.content,...m,...g,...y?.content},span:_*2-1,component:i[1],itemPrefixCls:f,bordered:r,content:d,type:`content`})])}var cV=e=>{let t=S.useContext(eV),{prefixCls:n,vertical:r,row:i,index:a,bordered:o}=e;return r?S.createElement(S.Fragment,null,S.createElement(`tr`,{key:`label-${a}`,className:`${n}-row`},sV(i,e,{component:`th`,type:`label`,showLabel:!0,...t})),S.createElement(`tr`,{key:`content-${a}`,className:`${n}-row`},sV(i,e,{component:`td`,type:`content`,showContent:!0,...t}))):S.createElement(`tr`,{key:a,className:`${n}-row`},sV(i,e,{component:o?[`th`,`td`]:`td`,type:`item`,showLabel:!0,showContent:!0,...t}))},lV=e=>{let{componentCls:t,labelBg:n}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:`auto`},[`${t}-row`]:{borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:`none`,"> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.padding)} ${Y(e.paddingLG)}`,borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:`none`}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:n,"&::after":{display:`none`}}}},[`&${t}-medium`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.paddingSM)} ${Y(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.paddingXS)} ${Y(e.padding)}`}}}}}},uV=e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:r,itemPaddingEnd:i,colonMarginRight:a,colonMarginLeft:o,titleMarginBottom:s}=e;return{[t]:{...Jc(e),...lV(e),"&-rtl":{direction:`rtl`},[`${t}-header`]:{display:`flex`,alignItems:`center`,marginBottom:s},[`${t}-title`]:{...qc,flex:`auto`,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG},[`${t}-extra`]:{marginInlineStart:`auto`,color:n,fontSize:e.fontSize},[`${t}-view`]:{width:`100%`,borderRadius:e.borderRadiusLG,table:{width:`100%`,tableLayout:`fixed`,borderCollapse:`collapse`}},[`${t}-row`]:{"> th, > td":{paddingBottom:r,paddingInlineEnd:i},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:`none`,"> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:`normal`,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:`start`,"&::after":{content:`":"`,position:`relative`,top:-.5,marginInline:`${Y(o)} ${Y(a)}`},[`&${t}-item-no-colon::after`]:{content:`""`}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:`""`}},[`${t}-item-content`]:{display:`table-cell`,flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:`break-word`,overflowWrap:`break-word`},[`${t}-item`]:{paddingBottom:0,verticalAlign:`top`,"&-container":{display:`flex`,[`${t}-item-label`]:{display:`inline-flex`,alignItems:`baseline`},[`${t}-item-content`]:{display:`inline-flex`,alignItems:`baseline`,minWidth:`1em`}}},"&-medium":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}}}},dV=rl(`Descriptions`,e=>uV(gs(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText})),fV=e=>{let{prefixCls:t,title:n,extra:r,column:i,colon:a=!0,bordered:o,layout:s,children:c,className:l,rootClassName:u,style:d,size:f,labelStyle:p,contentStyle:m,styles:h,items:g,classNames:_,...v}=e,{getPrefixCls:y,direction:b,className:x,style:C,classNames:w,styles:T}=li(`descriptions`),E=y(`descriptions`,t),D=JC(),O=S.useMemo(()=>pd(i)?i:KC(D,{...$B,...i})??3,[D,i]),k=nV(D,g,c),A=th(f),j=iV(O,k),[M,N]=dV(E),P={...e,column:O,items:k,size:A},[F,I]=Fd([w,_],[T,h],{props:P}),L=S.useMemo(()=>({labelStyle:p,contentStyle:m,styles:{label:I.label,content:I.content},classNames:{label:F.label,content:F.content}}),[p,m,I.label,I.content,F.label,F.content]);return S.createElement(eV.Provider,{value:L},S.createElement(`div`,{className:J(E,x,F.root,{[`${E}-medium`]:A===`medium`||A===`middle`,[`${E}-small`]:A===`small`,[`${E}-bordered`]:!!o,[`${E}-rtl`]:b===`rtl`},l,u,M,N),style:{...C,...I.root,...d},...v},(n||r)&&S.createElement(`div`,{className:J(`${E}-header`,F.header),style:I.header},n&&S.createElement(`div`,{className:J(`${E}-title`,F.title),style:I.title},n),r&&S.createElement(`div`,{className:J(`${E}-extra`,F.extra),style:I.extra},r)),S.createElement(`div`,{className:`${E}-view`},S.createElement(`table`,null,S.createElement(`tbody`,null,j.map((e,t)=>S.createElement(cV,{key:t,index:t,colon:a,prefixCls:E,vertical:s===`vertical`,bordered:o,row:e})))))))};fV.Item=aV;var pV=S.createContext(null),mV=S.createContext({});function hV(){return hV=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t,className:n,containerRef:r,...i}=e,{panel:a}=S.useContext(mV),o=er(a,r);return S.createElement(`div`,hV({className:J(`${t}-section`,n),role:`dialog`,ref:o},Vu(e,{aria:!0}),{"aria-modal":`true`},i))};function _V(e){let{prefixCls:t,direction:n,className:r,style:i,maxSize:a,containerRef:o,currentSize:s,onResize:c,onResizeEnd:l,onResizeStart:u}=e,[d,f]=S.useState(!1),[p,m]=S.useState(0),[h,g]=S.useState(0),_=n===`left`||n===`right`,v=In(e=>{e.preventDefault(),e.stopPropagation(),f(!0),m(_?e.clientX:e.clientY);let t;if(typeof s==`number`)t=s;else if(o?.current){let e=o.current.getBoundingClientRect();t=_?e.width:e.height}g(t),u?.(t)}),y=In(e=>{if(!d)return;let t=(_?e.clientX:e.clientY)-p;(n===`right`||n===`bottom`)&&(t=-t);let r=h+t;r<0&&(r=0),a&&r>a&&(r=a),c?.(r)}),b=S.useCallback(()=>{if(d&&(f(!1),o?.current)){let e=o.current.getBoundingClientRect(),t=_?e.width:e.height;l?.(t)}},[d,o,l,_]);return S.useEffect(()=>{if(d)return document.addEventListener(`mousemove`,y),document.addEventListener(`mouseup`,b),()=>{document.removeEventListener(`mousemove`,y),document.removeEventListener(`mouseup`,b)}},[d,y,b]),{dragElementProps:{className:J(`${t}-dragger`,`${t}-dragger-${n}`,{[`${t}-dragger-dragging`]:d,[`${t}-dragger-horizontal`]:_,[`${t}-dragger-vertical`]:!_},r),style:i,onMouseDown:v},isDragging:d}}function vV(e){if(typeof e==`string`){let t=Number(e.replace(/px$/i,``));if(parseFloat(e)===t&&br(!1,"Invalid value type of `width` or `height` which should be number type instead."),!Number.isNaN(t))return t}return e}function yV(e,t,n,r,i){let[a]=x_(t&&(r??i!==!1),e);return S.useEffect(()=>{t&&n===!0&&e()?.focus({preventScroll:!0})},[t]),a}function bV(){return bV=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,open:r,placement:i,inline:a,push:o,forceRender:s,autoFocus:c,focusTrap:l,classNames:u,rootClassName:d,rootStyle:f,zIndex:p,className:m,id:h,style:g,motion:_,width:v,height:y,size:b,maxSize:x,children:C,mask:w,maskClosable:T,maskMotion:E,maskClassName:D,maskStyle:O,afterOpenChange:k,onClose:A,onMouseEnter:j,onMouseOver:M,onMouseLeave:N,onClick:P,onKeyDown:F,onKeyUp:I,styles:L,drawerRender:R,resizable:z,defaultSize:B}=e,V=S.useRef(null);S.useImperativeHandle(t,()=>V.current);let H=yV(()=>V.current,r,c,l,w),[U,W]=S.useState(!1),ee=S.useContext(pV),te;te=typeof o==`boolean`?o?{}:{distance:0}:o||{};let ne=te?.distance??ee?.pushDistance??180,re=S.useMemo(()=>({pushDistance:ne,push:()=>{W(!0)},pull:()=>{W(!1)}}),[ne]);S.useEffect(()=>{r?ee?.push?.():ee?.pull?.()},[r]),S.useEffect(()=>()=>{ee?.pull?.()},[]);let ie=S.createElement(Iu,bV({key:`mask`},E,{visible:w&&r}),({className:e,style:t},i)=>S.createElement(`div`,{className:J(`${n}-mask`,e,u?.mask,D),style:{...t,...O,...L?.mask},onClick:T&&r?A:void 0,ref:i})),ae=typeof _==`function`?_(i):_,[G,oe]=S.useState(),K=i===`left`||i===`right`,se=S.useMemo(()=>vV(b??(K?v:y)??G??B??(K?378:void 0)),[b,v,y,B,K,G]),ce=S.useMemo(()=>{let e={};if(U&&ne)switch(i){case`top`:e.transform=`translateY(${ne}px)`;break;case`bottom`:e.transform=`translateY(${-ne}px)`;break;case`left`:e.transform=`translateX(${ne}px)`;break;default:e.transform=`translateX(${-ne}px)`;break}return K?e.width=vV(se):e.height=vV(se),e},[U,ne,i,K,se]),q=S.useRef(null),le=!!z,ue=typeof z==`object`&&z||{},de=In(e=>{oe(e),ue.onResize?.(e)}),{dragElementProps:fe,isDragging:pe}=_V({prefixCls:`${n}-resizable`,direction:i,className:u?.dragger,style:L?.dragger,maxSize:x,containerRef:q,currentSize:se,onResize:de,onResizeStart:ue.onResizeStart,onResizeEnd:ue.onResizeEnd}),me={onMouseEnter:j,onMouseOver:M,onMouseLeave:N,onClick:P,onKeyDown:F,onKeyUp:I,onFocus:e=>{H(e.target)}},he=S.createElement(Iu,bV({key:`panel`},ae,{visible:r,forceRender:s,onVisibleChanged:k,removeOnLeave:!1,leavedClassName:`${n}-content-wrapper-hidden`}),({className:t,style:r},i)=>{let a=S.createElement(gV,bV({id:h,containerRef:i,prefixCls:n,className:J(m,u?.section),style:{...g,...L?.section}},Vu(e,{aria:!0}),me),C);return S.createElement(`div`,bV({ref:q,className:J(`${n}-content-wrapper`,pe&&`${n}-content-wrapper-dragging`,u?.wrapper,!pe&&t),style:{...r,...ce,...L?.wrapper}},Vu(e,{data:!0})),le&&S.createElement(`div`,fe),R?R(a):a)}),ge={...f};return p&&(ge.zIndex=p),S.createElement(pV.Provider,{value:re},S.createElement(`div`,{className:J(n,`${n}-${i}`,d,{[`${n}-open`]:r,[`${n}-inline`]:a}),style:ge,tabIndex:-1,ref:V},ie,he))}),SV=e=>{let{open:t=!1,prefixCls:n=`rc-drawer`,placement:r=`right`,autoFocus:i=!0,keyboard:a=!0,width:o,height:s,size:c,maxSize:l,mask:u=!0,maskClosable:d=!0,getContainer:f,forceRender:p,afterOpenChange:m,destroyOnHidden:h,onMouseEnter:g,onMouseOver:_,onMouseLeave:v,onClick:y,onKeyDown:b,onKeyUp:x,onClose:C,resizable:w,defaultSize:T,focusTriggerAfterClose:E,panelRef:D}=e,[O,k]=S.useState(!1),[A,j]=S.useState(!1);zn(()=>{j(!0)},[]);let M=A?t:!1,N=S.useRef(null),P=S.useRef(null);zn(()=>{M&&(P.current=document.activeElement)},[M]);let F=e=>{k(e),m?.(e),!e&&E!==!1&&P.current&&!N.current?.contains(P.current)&&P.current?.focus({preventScroll:!0})},I=S.useMemo(()=>({panel:D}),[D]);if(!p&&!O&&!M&&h)return null;let L={onMouseEnter:g,onMouseOver:_,onMouseLeave:v,onClick:y,onKeyDown:b,onKeyUp:x},R={...e,open:M,prefixCls:n,placement:r,autoFocus:i,keyboard:a,width:o,height:s,size:c,maxSize:l,defaultSize:T,mask:u,maskClosable:d,inline:f===!1,afterOpenChange:F,ref:N,resizable:w,...L};return S.createElement(mV.Provider,{value:I},S.createElement(Xf,{open:M||p||O,autoDestroy:!1,getContainer:f,autoLock:u&&(M||O),onEsc:({top:e,event:t})=>{e&&a&&(t.stopPropagation(),C?.(t))}},S.createElement(xV,R)))},CV=e=>{let{prefixCls:t,ariaId:n,title:r,footer:i,extra:a,closable:o,loading:s,onClose:c,headerStyle:l,bodyStyle:u,footerStyle:d,children:f,classNames:p,styles:m}=e,h=li(`drawer`),{classNames:g,styles:_,closable:v}=h,[y,b]=Fd([g,p],[_,m],{props:{...e,closable:o??v}}),x=S.useMemo(()=>{let e=o??v;if(e!==!1)return hd(e)&&e?.placement===`end`?`end`:`start`},[o,v]),C=S.useCallback(e=>S.createElement(`button`,{type:`button`,onClick:c,className:J(`${t}-close`,{[`${t}-close-${x}`]:x===`end`},y.close),style:b.close},e),[c,t,x,y.close,b.close]),[w,T]=Td(yd(e),yd(h),{closable:!0,closeIconRender:C}),E=()=>!r&&!w?null:S.createElement(`div`,{style:{...b.header,...l},className:J(`${t}-header`,y.header,{[`${t}-header-close-only`]:w&&!r&&!a})},S.createElement(`div`,{className:`${t}-header-title`},x===`start`&&T,r&&S.createElement(`div`,{className:J(`${t}-title`,y.title),style:b.title,id:n},r)),a&&S.createElement(`div`,{className:J(`${t}-extra`,y.extra),style:b.extra},a),x===`end`&&T),D=()=>i?S.createElement(`div`,{className:J(`${t}-footer`,y.footer),style:{...b.footer,...d}},i):null;return S.createElement(S.Fragment,null,E(),S.createElement(`div`,{className:J(`${t}-body`,y.body),style:{...b.body,...u}},s?S.createElement(Ky,{active:!0,title:!1,paragraph:{rows:5},className:`${t}-body-skeleton`}):f),D())},wV=e=>{let t=`100%`;return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},TV=(e,t)=>({"&-enter, &-appear":{...e,"&-active":t},"&-leave":{...t,"&-active":e}}),EV=(e,t)=>({"&-enter, &-appear, &-leave":{"&-start":{transition:`none`},"&-active":{transition:`all ${t}`}},...TV({opacity:e},{opacity:1})}),DV=(e,t)=>[EV(.7,t),TV({transform:wV(e)},{transform:`none`})],OV=e=>{let{componentCls:t,motionDurationSlow:n}=e;return{[t]:{[`${t}-mask-motion`]:EV(0,n),[`${t}-panel-motion`]:[`left`,`right`,`top`,`bottom`].reduce((e,t)=>({...e,[`&-${t}`]:DV(t,n)}),{})}}},kV=e=>{let{borderRadiusSM:t,componentCls:n,zIndexPopup:r,colorBgMask:i,colorBgElevated:a,motionDurationSlow:o,motionDurationMid:s,paddingXS:c,padding:l,paddingLG:u,fontSizeLG:d,lineHeightLG:f,lineWidth:p,lineType:m,colorSplit:h,marginXS:g,colorIcon:_,colorIconHover:v,colorBgTextHover:y,colorBgTextActive:b,colorText:x,fontWeightStrong:S,footerPaddingBlock:C,footerPaddingInline:w,draggerSize:T,calc:E}=e,D=`${n}-content-wrapper`,O=`${n}-resizable-dragger`;return{[n]:{position:`fixed`,inset:0,zIndex:r,pointerEvents:`none`,color:x,"&-pure":{position:`relative`,background:a,display:`flex`,flexDirection:`column`,pointerEvents:`auto`,[`&${n}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${n}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${n}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${n}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:`absolute`},[`${n}-mask`]:{position:`absolute`,inset:0,zIndex:r,background:i,pointerEvents:`auto`,[`&${n}-mask-blur`]:{backdropFilter:`blur(4px)`}},[D]:{position:`absolute`,zIndex:r,maxWidth:`100vw`,transition:`all ${o}`,"&-hidden":{display:`none`}},[`&-left > ${D}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${D}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${D}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${D}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${n}-section`]:{display:`flex`,flexDirection:`column`,width:`100%`,height:`100%`,overflow:`auto`,background:a,pointerEvents:`auto`},[`${n}-header`]:{display:`flex`,flex:0,alignItems:`center`,padding:`${Y(l)} ${Y(u)}`,fontSize:d,lineHeight:f,borderBottom:`${Y(p)} ${m} ${h}`,"&-title":{display:`flex`,flex:1,alignItems:`center`,minWidth:0,minHeight:0}},[`${n}-extra`]:{flex:`none`},[`${n}-close`]:{display:`inline-flex`,width:E(d).add(c).equal(),height:E(d).add(c).equal(),borderRadius:t,justifyContent:`center`,alignItems:`center`,color:_,fontWeight:S,fontSize:d,fontStyle:`normal`,lineHeight:1,textAlign:`center`,textTransform:`none`,textDecoration:`none`,background:`transparent`,border:0,cursor:`pointer`,transition:`all ${s}`,textRendering:`auto`,[`&${n}-close-end`]:{marginInlineStart:g},[`&:not(${n}-close-end)`]:{marginInlineEnd:g},"&:hover":{color:v,backgroundColor:y,textDecoration:`none`},"&:active":{backgroundColor:b},...Qc(e)},[`${n}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:d,lineHeight:f},[`${n}-body`]:{flex:1,minWidth:0,minHeight:0,padding:u,overflow:`auto`,[`${n}-body-skeleton`]:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`}},[`${n}-footer`]:{flexShrink:0,padding:`${Y(C)} ${Y(w)}`,borderTop:`${Y(p)} ${m} ${h}`},[O]:{position:`absolute`,zIndex:1,backgroundColor:`transparent`,userSelect:`none`,pointerEvents:`auto`,"&:hover":{backgroundColor:e.colorPrimary,opacity:.2},"&-dragging":{backgroundColor:e.colorPrimary,opacity:.3}},[`${O}-left`]:{top:0,bottom:0,right:{_skip_check_:!0,value:0},width:T,cursor:`col-resize`},[`${O}-right`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},width:T,cursor:`col-resize`},[`${O}-top`]:{insetInline:0,bottom:0,height:T,cursor:`row-resize`},[`${O}-bottom`]:{insetInline:0,top:0,height:T,cursor:`row-resize`},[`${D}-dragging`]:{userSelect:`none`,transition:`none`,willChange:`width, height`,[`${n}-content`]:{pointerEvents:`none`},[`${n}-section`]:{pointerEvents:`none`}},"&-rtl":{direction:`rtl`}}}},AV=rl(`Drawer`,e=>{let t=gs(e,{});return[kV(t),OV(t)]},e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding,draggerSize:4})),jV={distance:180},MV=378,NV={motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},PV=e=>{let{rootClassName:t,size:n,defaultSize:r=MV,height:i,width:a,mask:o,push:s=jV,open:c,afterOpenChange:l,onClose:u,prefixCls:d,getContainer:f,panelRef:p=null,style:m,className:h,resizable:g,"aria-labelledby":_,focusable:v,maskClosable:y,maskStyle:b,drawerStyle:x,contentWrapperStyle:C,destroyOnClose:w,destroyOnHidden:T,...E}=e,{placement:D}=E,O=zf(),k=E.title?O:void 0,{getPopupContainer:A,getPrefixCls:j,direction:M,className:N,style:P,classNames:F,styles:I,mask:L}=li(`drawer`),R=j(`drawer`,d),[z,B]=AV(R),V=f===void 0&&A?()=>A(document.body):f,H=S.useMemo(()=>pd(n)?n:n===`large`?736:n===`default`?MV:typeof n==`string`?/^\d+(\.\d+)?$/.test(n)?Number(n):n:!D||D===`left`||D===`right`?a:i,[n,D,a,i]),U={motionName:Gm(R,`mask-motion`),...NV},W=e=>({motionName:Gm(R,`panel-motion-${e}`),...NV}),ee=$n(p,Jy()),[te,ne]=Yd(`Drawer`,E.zIndex),[re,ie,ae]=Od(o,L,R,y),G=Ay(v,V!==!1&&re),{classNames:oe,styles:K,rootStyle:se}=E,ce={...e,zIndex:te,panelRef:p,mask:re,maskClosable:ae,defaultSize:r,push:s,focusable:G},[q,le]=Fd([F,oe],[I,K],{props:ce}),ue=J({"no-mask":!re,[`${R}-rtl`]:M===`rtl`},t,z,B,q.root);return S.createElement(Ty,{form:!0,space:!0},S.createElement(Ud.Provider,{value:ne},S.createElement(SV,{prefixCls:R,onClose:u,maskMotion:U,motion:W,...E,classNames:{mask:J(q.mask,ie.mask),section:q.section,wrapper:q.wrapper,dragger:q.dragger},styles:{mask:{...le.mask,...b},section:{...le.section,...x},wrapper:{...le.wrapper,...C},dragger:le.dragger},open:c,mask:re,maskClosable:ae,push:s,size:H,defaultSize:r,style:{...P,...m},rootStyle:{...se,...le.root},className:J(N,h),rootClassName:ue,getContainer:V,afterOpenChange:l,panelRef:ee,zIndex:te,...g?{resizable:g}:{},"aria-labelledby":_??k,destroyOnHidden:T??w,focusTriggerAfterClose:G.focusTriggerAfterClose,focusTrap:G.trap},S.createElement(CV,{prefixCls:R,size:n,...E,ariaId:k,onClose:u}))))};PV._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,style:n,className:r,placement:i=`right`,...a}=e,{getPrefixCls:o}=S.useContext(oi),s=o(`drawer`,t),[c,l]=AV(s),u=J(s,`${s}-pure`,`${s}-${i}`,c,l,r);return S.createElement(`div`,{className:u,style:n},S.createElement(CV,{prefixCls:s,...a}))};var FV=PV;function IV(e){return[`small`,`middle`,`medium`,`large`].includes(e)}function LV(e){return e?pd(e):!1}var RV=S.createContext({latestIndex:0}),zV=RV.Provider,BV=e=>{let{className:t,prefix:n,index:r,children:i,separator:a,style:o,classNames:s,styles:c}=e,{latestIndex:l}=S.useContext(RV);return fd(i)?S.createElement(S.Fragment,null,S.createElement(`div`,{className:t,style:o},i),r{let{componentCls:t,antCls:n}=e;return{[t]:{display:`inline-flex`,"&-rtl":{direction:`rtl`},"&-vertical":{flexDirection:`column`},"&-align":{flexDirection:`column`,"&-center":{alignItems:`center`},"&-start":{alignItems:`flex-start`},"&-end":{alignItems:`flex-end`},"&-baseline":{alignItems:`baseline`}},[`${t}-item:empty`]:{display:`none`},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:`block`}}}},HV=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},UV=rl(`Space`,e=>{let t=gs(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[VV(t),HV(t)]},()=>({}),{resetStyle:!1}),WV=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,size:i,className:a,style:o,classNames:s,styles:c}=li(`space`),{size:l=i??`small`,align:u,className:d,rootClassName:f,children:p,direction:m,orientation:h,prefixCls:g,split:_,separator:v,style:y,vertical:b,wrap:x=!1,classNames:C,styles:w,...T}=e,[E,D]=Array.isArray(l)?l:[l,l],O=IV(D),k=IV(E),A=LV(D),j=LV(E),M=Cr(p,{keepEmpty:!0}),[N,P]=Rd(h,b,m),F=u===void 0&&!P?`center`:u,I=v??_,L=n(`space`,g),[R,z]=UV(L),B={...e,size:l,orientation:N,align:F},[V,H]=Fd([s,C],[c,w],{props:B}),U=J(L,a,R,`${L}-${N}`,{[`${L}-rtl`]:r===`rtl`,[`${L}-align-${F}`]:F,[`${L}-gap-row-${D}`]:O,[`${L}-gap-col-${E}`]:k},d,f,z,V.root),W=J(`${L}-item`,V.item),ee=M.map((e,t)=>{let n=e?.key||`${W}-${t}`;return S.createElement(BV,{prefix:L,classNames:V,styles:H,className:W,key:n,index:t,separator:I,style:H.item},e)}),te=S.useMemo(()=>({latestIndex:M.reduce((e,t,n)=>fd(t)?n:e,0)}),[M]);if(M.length===0)return null;let ne={};return x&&(ne.flexWrap=`wrap`),!k&&j&&(ne.columnGap=E),!O&&A&&(ne.rowGap=D),S.createElement(`div`,{ref:t,className:U,style:{...ne,...H.root,...o,...y},...T},S.createElement(zV,{value:te},ee))});WV.Compact=sh,WV.Addon=nB;var GV=e=>{let{getPopupContainer:t,getPrefixCls:n,direction:r}=S.useContext(oi),{prefixCls:i,type:a=`default`,danger:o,disabled:s,loading:c,onClick:l,htmlType:u,children:d,className:f,menu:p,arrow:m,autoFocus:h,trigger:g,align:_,open:v,onOpenChange:y,placement:b,getPopupContainer:x,href:C,icon:w=S.createElement(jE,null),title:T,buttonsRender:E=e=>e,mouseEnterDelay:D,mouseLeaveDelay:O,overlayClassName:k,overlayStyle:A,destroyOnHidden:j,destroyPopupOnHide:M,dropdownRender:N,popupRender:P,...F}=e,I=n(`dropdown`,i),L=`${I}-button`,R={menu:p,arrow:m,autoFocus:h,align:_,disabled:s,trigger:s?[]:g,onOpenChange:y,getPopupContainer:x||t,mouseEnterDelay:D,mouseLeaveDelay:O,classNames:{root:k},styles:{root:A},destroyOnHidden:j,popupRender:P||N},{compactSize:z,compactItemClassnames:B}=ih(I,r),V=J(L,B,f);`destroyPopupOnHide`in e&&(R.destroyPopupOnHide=M),`open`in e&&(R.open=v),`placement`in e?R.placement=b:R.placement=r===`rtl`?`bottomLeft`:`bottomRight`;let[H,U]=E([S.createElement(YE,{type:a,danger:o,disabled:s,loading:c,onClick:l,htmlType:u,href:C,title:T},d),S.createElement(YE,{type:a,danger:o,icon:w})]);return S.createElement(WV.Compact,{className:V,size:z,block:!0,...F},H,S.createElement(JE,{...R},U))};GV.__ANT_BUTTON=!0;var KV=JE;KV.Button=GV;var qV={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z`}}]},name:`file-text`,theme:`outlined`};function JV(){return JV=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,JV({},e,{ref:t,icon:qV}))),XV=(e,t)=>fd(e)?hd(e)&&!(0,S.isValidElement)(e)?{...t,...e}:{...t,title:e}:null;function ZV(e){let[t,n]=S.useState(e);return S.useEffect(()=>{let t=setTimeout(()=>{n(e)},e.length?0:10);return()=>{clearTimeout(t)}},[e]),t}var QV=e=>{let{componentCls:t,motionDurationFast:n,motionEaseInOut:r}=e,i=`${t}-show-help`,a=`${t}-show-help-item`;return{[i]:{transition:`opacity ${n} ${r}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[a]:{overflow:`hidden`,transition:`${[`height`,`opacity`,`transform`].map(e=>`${e} ${n} ${r}`).join(`, `)} !important`,[`&${a}-appear, &${a}-enter`]:{transform:`translateY(-5px)`,opacity:0,"&-active":{transform:`translateY(0)`,opacity:1}},[`&${a}-leave-active`]:{transform:`translateY(-5px)`}}}}},$V=e=>({legend:{display:`block`,width:`100%`,marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:`inherit`,border:0,borderBottom:`${Y(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, input[type='radio']:focus, input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${Y(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:`block`,paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),eH=(e,t)=>{let{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},tH=e=>{let{componentCls:t}=e;return{[t]:{...Jc(e),...$V(e),[`${t}-text`]:{display:`inline-block`,paddingInlineEnd:e.paddingSM},"&-small":{...eH(e,e.controlHeightSM)},"&-large":{...eH(e,e.controlHeightLG)}}}},nH=e=>{let{formItemCls:t,iconCls:n,rootPrefixCls:r,antCls:i,labelRequiredMarkColor:a,labelColor:o,labelFontSize:s,labelHeight:c,labelColonMarginInlineStart:l,labelColonMarginInlineEnd:u,itemMarginBottom:d}=e,[f]=ol(i,`grid`);return{[t]:{...Jc(e),marginBottom:d,verticalAlign:`top`,"&-with-help":{transition:`none`},[`&-hidden, - &-hidden${i}-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:c,color:o,fontSize:s,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:`top`},[`&${t}-required`]:{"&::before":{display:`inline-block`,marginInlineEnd:e.marginXXS,color:a,fontSize:e.fontSize,fontFamily:`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:l,marginInlineEnd:u},[`&${t}-no-colon::after`]:{content:`"\\a0"`}}},[`${t}-control`]:{[f(`display`)]:`flex`,flexDirection:`column`,flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:`100%`},"&-input":{position:`relative`,display:`flex`,alignItems:`center`,minHeight:e.controlHeight,"&-content":{flex:`auto`,maxWidth:`100%`,[`&:has(> ${i}-switch:only-child, > ${i}-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:Wh,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:`none`,"&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}}}},rH=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:`initial`,textAlign:`start`,"> label":{margin:0,"&::after":{visibility:`hidden`}}}),iH=e=>{let{antCls:t,formItemCls:n}=e;return{[`${n}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:`1 1 0`,minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:`unset`}},[`${t}-col-24${n}-label, - ${t}-col-xl-24${n}-label`]:rH(e)}}},aH=e=>{let{componentCls:t,formItemCls:n,inlineItemMarginBottom:r}=e;return{[`${t}-inline`]:{display:`flex`,flexWrap:`wrap`,[`${n}-inline`]:{flex:`none`,marginInlineEnd:e.margin,marginBottom:r,"&-row":{flexWrap:`nowrap`},[`> ${n}-label, - > ${n}-control`]:{display:`inline-block`,verticalAlign:`top`},[`> ${n}-label`]:{flex:`none`},[`${t}-text`]:{display:`inline-block`},[`${n}-has-feedback`]:{display:`inline-block`}}}}},oH=e=>{let{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${n} ${n}-label`]:rH(e),[`${t}:not(${t}-inline)`]:{[n]:{flexWrap:`wrap`,[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:`0 0 100%`,maxWidth:`100%`}}}}}},sH=e=>{let{componentCls:t,formItemCls:n,antCls:r}=e;return{[`${n}-vertical`]:{[`${n}-row`]:{flexDirection:`column`},[`${n}-label > label`]:{height:`auto`},[`${n}-control`]:{width:`100%`},[`${n}-label, + `]:{[`&:hover ${t}`]:{borderColor:e.colorPrimary}},[`${i}:not(${i}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[`${t}-checked`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:`rotate(45deg) scale(1) translate(-50%,-50%)`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`,...Uh()},[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[t]:{"&-indeterminate":{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:`50%`,insetInlineStart:`50%`,width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:`translate(-50%, -50%) scale(1)`,opacity:1,content:`""`},"&:hover":{backgroundColor:e.colorBgContainer,borderColor:e.colorPrimary}}}},{[`${i}-disabled`]:{cursor:`not-allowed`},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate::after`]:{background:e.colorTextDisabled}}}]};function tz(e,t){return ez(gs(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}var nz=rl(`Checkbox`,(e,{prefixCls:t})=>[tz(t,e)]),rz=S.createContext(null),iz=S.forwardRef((e,t)=>{let{prefixCls:n,children:r,indeterminate:i=!1,onMouseEnter:a,onMouseLeave:o,skipGroup:s=!1,disabled:c,rootClassName:l,className:u,style:d,classNames:f,styles:p,name:m,value:h,checked:g,defaultChecked:_,onChange:v,...y}=e,{getPrefixCls:b,direction:x,className:C,style:w,classNames:T,styles:E}=li(`checkbox`),D=S.useContext(rz),{isFormItemInput:O}=S.useContext(Sy),k=S.useContext(zp),A=(D?.disabled||c)??k,[j,M]=Hn(_,g),N=j,P=In(e=>{M(e.target.checked),v?.(e),!s&&D?.toggleOption&&D.toggleOption({label:r,value:h})});D&&!s&&(N=D.value.includes(h));let F=S.useRef(null),I=er(t,F);S.useEffect(()=>{if(!(s||!D))return D.registerValue(h),()=>{D.cancelValue(h)}},[h,s]),S.useEffect(()=>{F.current?.input&&(F.current.input.indeterminate=i)},[i]);let L=b(`checkbox`,n),R=bf(L),[z,B]=nz(L,R),V={...y},H={...e,indeterminate:i,disabled:A,checked:N},[U,W]=Fd([T,f],[E,p],{props:H}),ee=J(`${L}-wrapper`,{[`${L}-rtl`]:x===`rtl`,[`${L}-wrapper-checked`]:N,[`${L}-wrapper-disabled`]:A,[`${L}-wrapper-in-form-item`]:O},C,u,U.root,l,B,R,z),te=J(U.icon,{[`${L}-indeterminate`]:i},qm,z),[ne,re]=XI(V.onClick);return S.createElement(eh,{component:`Checkbox`,disabled:A},S.createElement(`label`,{className:ee,style:{...W.root,...w,...d},onMouseEnter:a,onMouseLeave:o,onClick:ne},S.createElement(YI,{...V,name:!s&&D?D.name:m,checked:N,onClick:re,onChange:P,prefixCls:L,className:te,style:W.icon,disabled:A,ref:I,value:h}),fd(r)&&S.createElement(`span`,{className:J(`${L}-label`,U.label),style:W.label},r)))}),az=S.forwardRef((e,t)=>{let{defaultValue:n,children:r,options:i=[],prefixCls:a,className:o,rootClassName:s,style:c,onChange:l,role:u=`group`,...d}=e,{getPrefixCls:f,direction:p}=S.useContext(oi),[m,h]=S.useState(d.value||n||[]),[g,_]=S.useState([]);S.useEffect(()=>{`value`in d&&h(d.value||[])},[d.value]);let v=S.useMemo(()=>i.map(e=>typeof e==`string`||pd(e)?{label:e,value:e}:e),[i]),y=e=>{_(t=>t.filter(t=>t!==e))},b=e=>{_(t=>[].concat(Zr(t),[e]))},x=e=>{let t=m.indexOf(e.value),n=Zr(m);t===-1?n.push(e.value):n.splice(t,1),`value`in d||h(n),l?.(n.filter(e=>g.includes(e)).sort((e,t)=>v.findIndex(t=>t.value===e)-v.findIndex(e=>e.value===t)))},C=f(`checkbox`,a),w=`${C}-group`,T=bf(C),[E,D]=nz(C,T),O=Sr(d,[`value`,`disabled`]),k=i.length?v.map(e=>S.createElement(iz,{prefixCls:C,key:e.value.toString(),disabled:`disabled`in e?e.disabled:d.disabled,value:e.value,checked:m.includes(e.value),onChange:e.onChange,className:J(`${w}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):r,A=S.useMemo(()=>({toggleOption:x,value:m,disabled:d.disabled,name:d.name,registerValue:b,cancelValue:y}),[x,m,d.disabled,d.name,b,y]),j=J(w,{[`${w}-rtl`]:p===`rtl`},o,s,D,T,E);return S.createElement(`div`,{className:j,style:c,role:u,...O,ref:t},S.createElement(rz.Provider,{value:A},k))}),oz=iz;oz.Group=az,oz.__ANT_CHECKBOX=!0;var sz=(0,S.createContext)({});function cz(e){return e===`auto`?`1 1 auto`:pd(e)?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}var lz=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=S.useContext(oi),{gutter:i,wrap:a}=S.useContext(sz),{prefixCls:o,span:s,order:c,offset:l,push:u,pull:d,className:f,children:p,flex:m,style:h,...g}=e,_=n(`col`,o),v=n(),[y,b]=$y(_),[x]=ol(v,`col`),C={},w={};VC.forEach(t=>{let n={},i=e[t];pd(i)?n.span=i:hd(i)&&(n=i||{}),delete g[t],w={...w,[`${_}-${t}-${n.span}`]:fd(n.span),[`${_}-${t}-order-${n.order}`]:n.order||n.order===0,[`${_}-${t}-offset-${n.offset}`]:n.offset||n.offset===0,[`${_}-${t}-push-${n.push}`]:n.push||n.push===0,[`${_}-${t}-pull-${n.pull}`]:n.pull||n.pull===0,[`${_}-rtl`]:r===`rtl`},n.flex&&(w[`${_}-${t}-flex`]=!0,C[x(`${t}-flex`)]=cz(n.flex))});let T=J(_,{[`${_}-${s}`]:s!==void 0,[`${_}-order-${c}`]:c,[`${_}-offset-${l}`]:l,[`${_}-push-${u}`]:u,[`${_}-pull-${d}`]:d},f,w,y,b),E={};return i?.[0]&&(E.paddingInline=pd(i[0])?`${i[0]/2}px`:`calc(${i[0]} / 2)`),m&&(E.flex=cz(m),a===!1&&!E.minWidth&&(E.minWidth=0)),S.createElement(`div`,{...g,style:{...E,...h,...C},className:T,ref:t},p)});function uz(e,t){let n=[void 0,void 0],r=Array.isArray(e)?e:[e,void 0],i=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0};return r.forEach((e,t)=>{if(hd(e))for(let r=0;r{let[n,r]=S.useState(()=>md(e)?e:``),i=()=>{if(md(e)&&r(e),hd(e))for(let n=0;n{i()},[JSON.stringify(e),t]),n},fz=S.forwardRef((e,t)=>{let{prefixCls:n,justify:r,align:i,className:a,style:o,children:s,gutter:c=0,wrap:l,...u}=e,{getPrefixCls:d,direction:f}=S.useContext(oi),p=KC(!0,null),m=dz(i,p),h=dz(r,p),g=d(`row`,n),[_,v]=Iee(g),y=uz(c,p),b=J(g,{[`${g}-no-wrap`]:l===!1,[`${g}-${h}`]:h,[`${g}-${m}`]:m,[`${g}-rtl`]:f===`rtl`},a,_,v),x={};y?.[0]&&(x.marginInline=pd(y[0])?`${y[0]/-2}px`:`calc(${y[0]} / -2)`);let[C,w]=y;x.rowGap=w;let T=S.useMemo(()=>({gutter:[C,w],wrap:l}),[C,w,l]);return S.createElement(sz.Provider,{value:T},S.createElement(`div`,{...u,className:b,style:{...x,...o},ref:t},s))}),pz=lz,mz=e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},hz=e=>{let{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:a,orientationMargin:o,verticalMarginInline:s}=e,c=`${t}-rail`;return{[t]:{...Jc(e),borderBlockStart:`${Y(i)} solid ${r}`,[c]:{borderBlockStart:`${Y(i)} solid ${r}`},"&-vertical":{position:`relative`,top:`-0.06em`,display:`inline-block`,height:`0.9em`,marginInline:s,marginBlock:0,verticalAlign:`middle`,borderTop:0,borderInlineStart:`${Y(i)} solid ${r}`},"&-horizontal":{display:`flex`,clear:`both`,width:`100%`,minWidth:`100%`,margin:`${Y(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:`flex`,alignItems:`center`,margin:`${Y(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:`nowrap`,textAlign:`center`,borderBlockStart:`0 ${r}`,[`${c}-start, ${c}-end`]:{width:`50%`,borderBlockStartColor:`inherit`,borderBlockEnd:0,content:`''`}},[`&-horizontal${t}-with-text-start`]:{[`${c}-start`]:{width:`calc(${o} * 100%)`},[`${c}-end`]:{width:`calc(100% - ${o} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{[`${c}-start`]:{width:`calc(100% - ${o} * 100%)`},[`${c}-end`]:{width:`calc(${o} * 100%)`}},[`${t}-inner-text`]:{display:`inline-block`,paddingBlock:0,paddingInline:a},"&-dashed":{background:`none`,borderColor:r,borderStyle:`dashed`,borderWidth:`${Y(i)} 0 0`,[c]:{borderBlockStart:`${Y(i)} dashed ${r}`}},[`&-horizontal${t}-with-text${t}-dashed`]:{[`${c}-start, ${c}-end`]:{borderStyle:`dashed none none`}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:`none`,borderColor:r,borderStyle:`dotted`,borderWidth:`${Y(i)} 0 0`,[c]:{borderBlockStart:`${Y(i)} dotted ${r}`}},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:`dotted none none`}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{[`${c}-start`]:{width:0},[`${c}-end`]:{width:`100%`},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{[`${c}-start`]:{width:`100%`},[`${c}-end`]:{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}}}},gz=rl(`Divider`,e=>{let t=gs(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[hz(t),mz(t)]},e=>({textPaddingInline:`1em`,orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}}),_z=[`left`,`right`,`center`,`start`,`end`],vz=e=>{let{getPrefixCls:t,direction:n,className:r,style:i,classNames:a,styles:o}=li(`divider`),{prefixCls:s,type:c,orientation:l,vertical:u,titlePlacement:d,orientationMargin:f,className:p,rootClassName:m,children:h,dashed:g,variant:_=`solid`,plain:v,style:y,size:b,classNames:x,styles:C,...w}=e,T=t(`divider`,s),E=`${T}-rail`,[D,O]=gz(T),k=th(b),A=!!h,j=_z.includes(l||``),M=S.useMemo(()=>{let e=d??(j?l:`center`);return e===`left`?n===`rtl`?`end`:`start`:e===`right`?n===`rtl`?`start`:`end`:e},[n,l,d,j]),N=M===`start`&&f!=null,P=M===`end`&&f!=null,[F,I]=Rd(l,u,c),L={...e,orientation:F,titlePlacement:M,size:k},[R,z]=Fd([a,x],[o,C],{props:L}),B=J(T,r,D,O,`${T}-${F}`,{[`${T}-with-text`]:A,[`${T}-with-text-${M}`]:A,[`${T}-dashed`]:!!g,[`${T}-${_}`]:_!==`solid`,[`${T}-plain`]:!!v,[`${T}-rtl`]:n===`rtl`,[`${T}-no-default-orientation-margin-start`]:N,[`${T}-no-default-orientation-margin-end`]:P,[`${T}-md`]:k===`medium`||k===`middle`,[`${T}-sm`]:k===`small`,[E]:!h,[R.rail]:R.rail&&!h},p,m,R.root),V=S.useMemo(()=>pd(f)?f:/^\d+$/.test(f)?Number(f):f,[f]),H={marginInlineStart:N?V:void 0,marginInlineEnd:P?V:void 0};return S.createElement(`div`,{className:B,style:{...i,...z.root,...h?{}:z.rail,...y},...w,role:`separator`},h&&!I&&S.createElement(S.Fragment,null,S.createElement(`div`,{className:J(E,`${E}-start`,R.rail),style:z.rail}),S.createElement(`span`,{className:J(`${T}-inner-text`,R.content),style:{...H,...z.content}},h),S.createElement(`div`,{className:J(E,`${E}-end`,R.rail),style:z.rail})))},yz={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`minus`,theme:`outlined`};function bz(){return bz=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,bz({},e,{ref:t,icon:yz}))),Sz={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z`}}]},name:`up`,theme:`outlined`};function Cz(){return Cz=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Cz({},e,{ref:t,icon:Sz})));function Tz(){return typeof BigInt==`function`}function Ez(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function Dz(e){var t=e.trim(),n=t.startsWith(`-`);n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,`$1`).replace(/\.0*$/,``).replace(/^0+/,``),t.startsWith(`.`)&&(t=`0${t}`);var r=t||`0`,i=r.split(`.`),a=i[0]||`0`,o=i[1]||`0`;a===`0`&&o===`0`&&(n=!1);var s=n?`-`:``;return{negative:n,negativeStr:s,trimStr:r,integerStr:a,decimalStr:o,fullStr:`${s}${r}`}}function Oz(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes(`e`)}function kz(e){var t=Uo(e.toLowerCase().split(`e`),2),n=t[0],r=t[1],i=r===void 0?`0`:r,a=n.startsWith(`-`),o=Uo((a?n.slice(1):n).split(`.`),2),s=o[0],c=s===void 0?`0`:s,l=o[1],u=l===void 0?``:l;return{decimal:u,digits:`${c}${u}`.replace(/^0+/,``)||`0`,exponent:Number(i),integer:c,negative:a}}function Az(e){var t=e.decimal,n=e.digits,r=e.exponent,i=e.integer,a=e.negative;if(n===`0`)return`0`;var o=i.replace(/^0+/,``).length,s=(t.match(/^0*/)||[``])[0].length,c=(o||-s)+r,l=``;return l=c<=0?`0.${`0`.repeat(-c)}${n}`:c>=n.length?`${n}${`0`.repeat(c-n.length)}`:`${n.slice(0,c)}.${n.slice(c)}`,`${a?`-`:``}${l}`}function jz(e){return e.exponent>=0?Math.max(0,e.decimal.length-e.exponent):Math.abs(e.exponent)+e.decimal.length}function Mz(e){var t=String(e);return Oz(e)?jz(kz(t)):t.includes(`.`)&&Pz(t)?t.length-t.indexOf(`.`)-1:0}function Nz(e){var t=String(e);if(Oz(e)){if(e>2**53-1)return String(Tz()?BigInt(e).toString():2**53-1);if(e<-(2**53-1))return String(Tz()?BigInt(e).toString():-(2**53-1));var n=kz(t),r=jz(n);t=r>100?Az(n):e.toFixed(r)}return Dz(t).fullStr}function Pz(e){return typeof e==`number`?!Number.isNaN(e):e?/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e):!1}var Fz=function(){function e(t){if(Yo(this,e),Ko(this,`origin`,``),Ko(this,`negative`,void 0),Ko(this,`integer`,void 0),Ko(this,`decimal`,void 0),Ko(this,`decimalLen`,void 0),Ko(this,`empty`,void 0),Ko(this,`nan`,void 0),Ez(t)){this.empty=!0;return}if(this.origin=String(t),t===`-`||Number.isNaN(t)){this.nan=!0;return}var n=t;if(Oz(n)&&(n=Number(n)),n=typeof n==`string`?n:Nz(n),Pz(n)){var r=Dz(n);this.negative=r.negative;var i=r.trimStr.split(`.`);this.integer=BigInt(i[0]);var a=i[1]||`0`;this.decimal=BigInt(a),this.decimalLen=a.length}else this.nan=!0}return Zo(e,[{key:`getMark`,value:function(){return this.negative?`-`:``}},{key:`getIntegerStr`,value:function(){return this.integer.toString()}},{key:`getDecimalStr`,value:function(){return this.decimal.toString().padStart(this.decimalLen,`0`)}},{key:`alignDecimal`,value:function(e){var t=`${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(e,`0`)}`;return BigInt(t)}},{key:`negate`,value:function(){var t=new e(this.toString());return t.negative=!t.negative,t}},{key:`cal`,value:function(t,n,r){var i=Math.max(this.getDecimalStr().length,t.getDecimalStr().length),a=n(this.alignDecimal(i),t.alignDecimal(i)).toString(),o=r(i),s=Dz(a),c=`${s.negativeStr}${s.trimStr.padStart(o+1,`0`)}`;return new e(`${c.slice(0,-o)}.${c.slice(-o)}`)}},{key:`add`,value:function(t){if(this.isInvalidate())return new e(t);var n=new e(t);return n.isInvalidate()?this:this.cal(n,function(e,t){return e+t},function(e){return e})}},{key:`multi`,value:function(t){var n=new e(t);return this.isInvalidate()||n.isInvalidate()?new e(NaN):this.cal(n,function(e,t){return e*t},function(e){return e*2})}},{key:`isEmpty`,value:function(){return this.empty}},{key:`isNaN`,value:function(){return this.nan}},{key:`isInvalidate`,value:function(){return this.isEmpty()||this.isNaN()}},{key:`equals`,value:function(e){return this.toString()===e?.toString()}},{key:`lessEquals`,value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:`toNumber`,value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:`toString`,value:function(){return!(arguments.length>0&&arguments[0]!==void 0)||arguments[0]?this.isInvalidate()?``:Dz(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr:this.origin}}]),e}(),Iz=function(){function e(t){if(Yo(this,e),Ko(this,`origin`,``),Ko(this,`number`,void 0),Ko(this,`empty`,void 0),Ez(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return Zo(e,[{key:`negate`,value:function(){return new e(-this.toNumber())}},{key:`add`,value:function(t){if(this.isInvalidate())return new e(t);var n=Number(t);if(Number.isNaN(n))return this;var r=this.number+n;if(r>2**53-1)return new e(2**53-1);if(r<-(2**53-1))return new e(-(2**53-1));var i=Math.max(Mz(this.number),Mz(n));return new e(r.toFixed(i))}},{key:`multi`,value:function(t){var n=Number(t);if(this.isInvalidate()||Number.isNaN(n))return new e(NaN);var r=this.number*n;if(r>2**53-1)return new e(2**53-1);if(r<-(2**53-1))return new e(-(2**53-1));var i=Math.max(Mz(this.number),Mz(n));return new e(r.toFixed(i))}},{key:`isEmpty`,value:function(){return this.empty}},{key:`isNaN`,value:function(){return Number.isNaN(this.number)}},{key:`isInvalidate`,value:function(){return this.isEmpty()||this.isNaN()}},{key:`equals`,value:function(e){return this.toNumber()===e?.toNumber()}},{key:`lessEquals`,value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:`toNumber`,value:function(){return this.number}},{key:`toString`,value:function(){return!(arguments.length>0&&arguments[0]!==void 0)||arguments[0]?this.isInvalidate()?``:Oz(this.number)&&Mz(this.number)>100?String(this.number):Nz(this.number):this.origin}}]),e}();function Lz(e){return Tz()?new Fz(e):new Iz(e)}function Rz(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===``)return``;var i=Dz(e),a=i.negativeStr,o=i.integerStr,s=i.decimalStr,c=`${t}${s}`,l=`${a}${o}`;if(n>=0){var u=Number(s[n]);return u>=5&&!r?Rz(Lz(e).add(`${a}0.${`0`.repeat(n)}${10-u}`).toString(),t,n,r):n===0?l:`${l}${t}${s.padEnd(n,`0`).slice(0,n)}`}return c===`.0`?l:`${l}${c}`}var zz=Lz;function Bz(e,t){return typeof Proxy<`u`&&e?new Proxy(e,{get(e,n){if(t[n])return t[n];let r=e[n];return typeof r==`function`?r.bind(e):r}}):e}function Vz(e,t){let n=(0,S.useRef)(null);function r(){try{let{selectionStart:t,selectionEnd:r,value:i}=e;n.current={start:t,end:r,value:i,beforeTxt:i.substring(0,t),afterTxt:i.substring(r)}}catch{}}function i(){if(e&&n.current&&t)try{let{value:t}=e,{beforeTxt:r,afterTxt:i,start:a}=n.current,o=t.length;if(t.startsWith(r))o=r.length;else if(t.endsWith(i))o=t.length-n.current.afterTxt.length;else{let e=r[a-1],n=t.indexOf(e,a-1);n!==-1&&(o=n+1)}e.setSelectionRange(o,o)}catch(e){br(!1,`Something warning of cursor restore. Please fire issue about this: ${e.message}`)}}return[r,i]}var Hz=200,Uz=600;function Wz({prefixCls:e,action:t,children:n,disabled:r,className:i,style:a,onStep:o}){let s=t===`up`,c=S.useRef(),l=S.useRef([]),u=()=>{clearTimeout(c.current)},d=e=>{e.preventDefault(),u(),o(s,`handler`);function t(){o(s,`handler`),c.current=setTimeout(t,Hz)}c.current=setTimeout(t,Uz)};S.useEffect(()=>()=>{u(),l.current.forEach(e=>{ri.cancel(e)})},[]);let f=`${e}-action`,p=J(f,`${f}-${t}`,{[`${f}-${t}-disabled`]:r},i),m=()=>l.current.push(ri(u));return S.createElement(`span`,{unselectable:`on`,role:`button`,onMouseUp:m,onMouseLeave:m,onMouseDown:e=>{d(e)},"aria-label":s?`Increase Value`:`Decrease Value`,"aria-disabled":r,className:p,style:a},n||S.createElement(`span`,{unselectable:`on`,className:`${e}-action-${t}-inner`}))}function Gz(e){let t=typeof e==`number`?Nz(e):Dz(e).fullStr;return t.includes(`.`)?Dz(t.replace(/(\d)\.(\d)/g,`$1$2.`)).fullStr:e+`0`}var Kz=(()=>{let e=(0,S.useRef)(0),t=()=>{ri.cancel(e.current)};return(0,S.useEffect)(()=>t,[]),n=>{t(),e.current=ri(()=>{n()})}});function qz(){return qz=Object.assign?Object.assign.bind():function(e){for(var t=1;te||t.isEmpty()?t.toString():t.toNumber(),Yz=e=>{let t=zz(e);return t.isInvalidate()?null:t},Xz=S.forwardRef((e,t)=>{let{mode:n=`input`,prefixCls:r=`rc-input-number`,className:i,style:a,classNames:o,styles:s,min:c,max:l,step:u=1,defaultValue:d,value:f,disabled:p,readOnly:m,upHandler:h,downHandler:g,keyboard:_,changeOnWheel:v=!1,controls:y=!0,prefix:b,suffix:x,stringMode:C,parser:w,formatter:T,precision:E,decimalSeparator:D,onChange:O,onInput:k,onPressEnter:A,onStep:j,onMouseDown:M,onClick:N,onMouseUp:P,onMouseLeave:F,onMouseMove:I,onMouseEnter:L,onMouseOut:R,changeOnBlur:z=!0,...B}=e,[V,H]=S.useState(!1),U=S.useRef(!1),W=S.useRef(!1),ee=S.useRef(!1),te=S.useRef(null),ne=S.useRef(null);S.useImperativeHandle(t,()=>Bz(ne.current,{focus:e=>{l_(ne.current,e)},blur:()=>{ne.current?.blur()},nativeElement:te.current}));let[re,ie]=S.useState(()=>zz(f??d));function ae(e){f===void 0&&ie(e)}let G=S.useCallback((e,t)=>{if(!t)return E>=0?E:Math.max(Mz(e),Mz(u))},[E,u]),oe=S.useCallback(e=>{let t=String(e);if(w)return w(t);let n=t;return D&&(n=n.replace(D,`.`)),n.replace(/[^\w.-]+/g,``)},[w,D]),K=S.useRef(``),se=S.useCallback((e,t)=>{if(T)return T(e,{userTyping:t,input:String(K.current)});let n=typeof e==`number`?Nz(e):e;if(!t){let e=G(n,t);Pz(n)&&(D||e>=0)&&(n=Rz(n,D||`.`,e))}return n},[T,G,D]),[ce,q]=S.useState(()=>{let e=d??f;return re.isInvalidate()&&[`string`,`number`].includes(typeof e)?Number.isNaN(e)?``:e:se(re.toString(),!1)});K.current=ce;function le(e,t){q(se(e.isInvalidate()?e.toString(!1):e.toString(!t),t))}let ue=S.useMemo(()=>Yz(l),[l,E]),de=S.useMemo(()=>Yz(c),[c,E]),fe=S.useMemo(()=>!ue||!re||re.isInvalidate()?!1:ue.lessEquals(re),[ue,re]),pe=S.useMemo(()=>!de||!re||re.isInvalidate()?!1:re.lessEquals(de),[de,re]),[me,he]=Vz(ne.current,V),ge=e=>ue&&!e.lessEquals(ue)?ue:de&&!de.lessEquals(e)?de:null,_e=e=>!ge(e),ve=(e,t)=>{let n=e,r=_e(n)||n.isEmpty();if(!n.isEmpty()&&!t&&(n=ge(n)||n,r=!0),!m&&!p&&r){let e=n.toString(),r=G(e,t);return r>=0&&(n=zz(Rz(e,`.`,r)),_e(n)||(n=zz(Rz(e,`.`,r,!0)))),n.equals(re)||(ae(n),O?.(n.isEmpty()?null:Jz(C,n)),f===void 0&&le(n,t)),n}return re},ye=Kz(),be=e=>{if(me(),K.current=e,q(e),!W.current){let t=zz(oe(e));t.isNaN()||ve(t,!0)}k?.(e),ye(()=>{let t=e;w||(t=e.replace(/。/g,`.`)),t!==e&&be(t)})},xe=()=>{W.current=!0},Se=()=>{W.current=!1,be(ne.current.value)},Ce=e=>{be(e.target.value)},we=In((e,t)=>{if(e&&fe||!e&&pe)return;U.current=!1;let n=zz(ee.current?Gz(u):u);e||(n=n.negate());let r=ve((re||zz(0)).add(n.toString()),!1);j?.(Jz(C,r),{offset:ee.current?Gz(u):u,type:e?`up`:`down`,emitter:t}),ne.current?.focus()}),Te=e=>{let t=zz(oe(ce)),n;n=t.isNaN()?ve(re,e):ve(t,e),f===void 0?n.isNaN()||le(n,!1):le(re,!1)},Ee=()=>{U.current=!0},De=e=>{let{key:t,shiftKey:n}=e;U.current=!0,ee.current=n,t===`Enter`&&(W.current||(U.current=!1),Te(!1),A?.(e)),_!==!1&&!W.current&&[`Up`,`ArrowUp`,`Down`,`ArrowDown`].includes(t)&&(we(t===`Up`||t===`ArrowUp`,`keyboard`),e.preventDefault())},Oe=()=>{U.current=!1,ee.current=!1};S.useEffect(()=>{if(v&&V){let e=e=>{we(e.deltaY<0,`wheel`),e.preventDefault()},t=ne.current;if(t)return t.addEventListener(`wheel`,e,{passive:!1}),()=>t.removeEventListener(`wheel`,e)}});let ke=()=>{z&&Te(!1),H(!1),U.current=!1},Ae=e=>{ne.current&&e.target!==ne.current&&(ne.current.focus(),e.preventDefault()),M?.(e)};Bn(()=>{re.isInvalidate()||le(re,!1)},[E,T]),Bn(()=>{let e=zz(f);ie(e);let t=zz(oe(ce));(!e.equals(t)||!U.current||T)&&le(e,U.current)},[f]),Bn(()=>{T&&he()},[ce]);let je={prefixCls:r,onStep:we,className:o?.action,style:s?.action},Me=S.createElement(Wz,qz({},je,{action:`up`,disabled:fe}),h),Ne=S.createElement(Wz,qz({},je,{action:`down`,disabled:pe}),g);return S.createElement(`div`,{ref:te,className:J(r,`${r}-mode-${n}`,i,o?.root,{[`${r}-focused`]:V,[`${r}-disabled`]:p,[`${r}-readonly`]:m,[`${r}-not-a-number`]:re.isNaN(),[`${r}-out-of-range`]:!re.isInvalidate()&&!_e(re)}),style:{...s?.root,...a},onMouseDown:Ae,onMouseUp:P,onMouseLeave:F,onMouseMove:I,onMouseEnter:L,onMouseOut:R,onClick:N,onFocus:()=>{H(!0)},onBlur:ke,onKeyDown:De,onKeyUp:Oe,onCompositionStart:xe,onCompositionEnd:Se,onBeforeInput:Ee},n===`spinner`&&y&&Ne,b!==void 0&&S.createElement(`div`,{className:J(`${r}-prefix`,o?.prefix),style:s?.prefix},b),S.createElement(`input`,qz({autoComplete:`off`,role:`spinbutton`,"aria-valuemin":c,"aria-valuemax":l,"aria-valuenow":re.isInvalidate()?null:re.toString(),step:u,ref:ne,className:J(`${r}-input`,o?.input),style:s?.input,value:ce,onChange:Ce,disabled:p,readOnly:m},B)),x!==void 0&&S.createElement(`div`,{className:J(`${r}-suffix`,o?.suffix),style:s?.suffix},x),n===`spinner`&&y&&Me,n===`input`&&y&&S.createElement(`div`,{className:J(`${r}-actions`,o?.actions),style:s?.actions},Me,Ne))}),Zz=e=>{let{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:a,fontSizeLG:o,fontSizeSM:s,borderRadiusLG:c,borderRadiusSM:l,colorBgContainerDisabled:u,lineWidth:d,antCls:f}=e,[p,m]=ol(f,`space`);return{[t]:[{display:`inline-flex`,alignItems:`center`,gap:0,whiteSpace:`nowrap`,paddingInline:r,margin:0,borderWidth:d,borderStyle:`solid`,borderRadius:n,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:o,borderRadius:c},"&-small":{paddingInline:a,borderRadius:l,fontSize:s},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[p(`addon-border-color`)]:i,[p(`addon-background`)]:u,[p(`addon-border-color-outlined`)]:i,[p(`addon-background-filled`)]:u,borderColor:m(`addon-border-color`),background:m(`addon-background`),"&-variant-outlined":{[p(`addon-border-color`)]:m(`addon-border-color-outlined`)},"&-variant-filled":{[p(`addon-border-color`)]:`transparent`,[p(`addon-background`)]:m(`addon-background-filled`),[`&${t}-disabled`]:{[p(`addon-border-color`)]:i,[p(`addon-background`)]:u}},"&-variant-borderless":{border:`none`,background:`transparent`},"&-variant-underlined":{border:`none`,background:`transparent`}},{"&-status-error":{[p(`addon-border-color-outlined`)]:e.colorError,[p(`addon-background-filled`)]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[p(`addon-border-color-outlined`)]:e.colorWarning,[p(`addon-background-filled`)]:e.colorWarningBg,color:e.colorWarning}}]}},Qz=rl([`Space`,`Addon`],e=>[Zz(e),Yg(e,{focus:!1})]),$z=S.forwardRef((e,t)=>{let{className:n,children:r,style:i,prefixCls:a,variant:o=`outlined`,disabled:s,status:c,...l}=e,{getPrefixCls:u,direction:d}=S.useContext(oi),f=u(`space-addon`,a),[p,m]=Qz(f),{compactItemClassnames:h,compactSize:g}=ih(f,d),_=aC(f,c),v=J(f,p,h,m,`${f}-variant-${o}`,_,{[`${f}-${g}`]:g,[`${f}-disabled`]:s},n);return S.createElement(`div`,{ref:t,className:v,style:i,...l},r)}),eB=e=>{let t=e.handleVisible??`auto`,n=e.controlHeightSM-e.lineWidth*2;return{...tL(e),controlWidth:90,handleWidth:n,handleFontSize:e.fontSize/2,handleVisible:t,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new Rs(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:+(t===!0),handleVisibleWidth:t===!0?n:0}},tB=e=>{let{componentCls:t,lineWidth:n,lineType:r,borderRadius:i,inputFontSizeSM:a,inputFontSizeLG:o,colorError:s,paddingInlineSM:c,paddingBlockSM:l,paddingBlockLG:u,paddingInlineLG:d,colorIcon:f,colorTextDisabled:p,motionDurationMid:m,handleHoverColor:h,handleOpacity:g,paddingInline:_,paddingBlock:v,handleBg:y,handleActiveBg:b,inputAffixPadding:x,borderRadiusSM:S,controlWidth:C,handleBorderColor:w,filledHandleBg:T,lineHeightLG:E,antCls:D}=e,O=`${Y(n)} ${r} ${w}`,[k,A]=ol(D,`input-number`);return[{[t]:{...Jc(e),...vL(e),[k(`input-padding-block`)]:Y(v),[k(`input-padding-inline`)]:Y(_),display:`inline-flex`,width:C,margin:0,paddingBlock:0,borderRadius:i,...aL(e,{[`${t}-actions`]:{background:y,[`${t}-action-down`]:{borderBlockStart:O}}}),...uL(e,{[`${t}-actions`]:{background:T,[`${t}-action-down`]:{borderBlockStart:O}},"&:focus-within":{[`${t}-actions`]:{background:y}}}),...mL(e,{[`${t}-actions`]:{background:y,[`${t}-action-down`]:{borderBlockStart:O}}}),...sL(e),[`&${t}-borderless`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(v).add(n).equal())},[`&${t}-borderless${t}-sm`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(l).add(n).equal())},[`&${t}-borderless${t}-lg`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(u).add(n).equal())},"&-rtl":{direction:`rtl`,[`${t}-input`]:{direction:`rtl`}},[`&${t}-out-of-range`]:{[`${t}-input`]:{color:s}},[`${t}-input`]:{...Jc(e),width:`100%`,paddingBlock:A(`input-padding-block`),textAlign:`start`,backgroundColor:`transparent`,border:0,borderRadius:0,outline:0,transition:`all ${m} linear`,appearance:`textfield`,fontSize:`inherit`,lineHeight:`inherit`,...hL(e.colorTextPlaceholder),'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:`none`}},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1},[`&-disabled ${t}-input`]:{cursor:`not-allowed`,color:e.colorTextDisabled}}},{[t]:{[`${t}-action`]:{...Yc(),userSelect:`none`,overflow:`hidden`,fontWeight:`bold`,lineHeight:0,textAlign:`center`,cursor:`pointer`,transition:`all ${m} linear`,[`&:active:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{background:b},[`&:hover:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{color:h},[`&${t}-action-up-disabled, &${t}-action-down-disabled`]:{cursor:`not-allowed`,color:p}},"&-mode-input":{overflow:`hidden`,[`${t}-actions`]:{position:`absolute`,insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:g,height:`100%`,borderRadius:0,display:`flex`,flexDirection:`column`,alignItems:`stretch`,transition:`all ${m}`,overflow:`hidden`,[`${t}-action`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,flex:`auto`,height:`40%`,marginInlineEnd:0,fontSize:e.handleFontSize}},[`&:hover ${t}-actions, &-focused ${t}-actions`]:{width:e.handleWidth,opacity:1},[`${t}-action`]:{color:f,height:`50%`,borderInlineStart:O,[`&:hover:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{height:`60%`}},[`&${t}-disabled, &${t}-readonly`]:{[`${t}-actions`]:{display:`none`}}},[`&${t}-mode-spinner`]:{padding:0,width:`auto`,[`${t}-action`]:{flex:`none`,paddingInline:A(`input-padding-inline`),"&-up":{borderInlineStart:O},"&-down":{borderInlineEnd:O}},[`${t}-input`]:{textAlign:`center`,paddingInline:A(`input-padding-inline`)}}}},{[t]:{"&-lg":{[k(`input-padding-block`)]:Y(u),[k(`input-padding-inline`)]:Y(d),paddingBlock:0,fontSize:o,lineHeight:E},"&-sm":{[k(`input-padding-block`)]:Y(l),[k(`input-padding-inline`)]:Y(c),paddingBlock:0,fontSize:a,borderRadius:S}}},{[t]:{[`${t}-prefix, ${t}-suffix`]:{display:`flex`,flex:`none`,alignItems:`center`,alignSelf:`center`,pointerEvents:`none`},[`${t}-prefix`]:{marginInlineEnd:x},[`${t}-suffix`]:{height:`100%`,marginInlineStart:x,transition:`margin ${m}`},[`&:hover:not(${t}-without-controls)`]:{[`${t}-suffix`]:{marginInlineEnd:e.handleWidth}}}}]},nB=e=>{let{componentCls:t,antCls:n}=e;return{[`${t}-addon`]:{[`&:has(${n}-select)`]:{border:0,padding:0}}}},rB=rl(`InputNumber`,e=>{let t=gs(e,eL(e));return[tB(t),nB(t),Yg(t)]},eB,{unitless:{handleOpacity:!0},resetFont:!1}),iB=S.forwardRef((e,t)=>{let n=S.useRef(null);S.useImperativeHandle(t,()=>n.current);let{rootClassName:r,size:i,disabled:a,prefixCls:o,addonBefore:s,addonAfter:c,prefix:l,suffix:u,bordered:d,readOnly:f,status:p,controls:m=!0,variant:h,className:g,style:_,classNames:v,styles:y,mode:b,...x}=e,{direction:C,className:w,style:T,styles:E,classNames:D}=li(`inputNumber`),O=S.useContext(zp),k=a??O,A=S.useMemo(()=>!m||k||f?!1:m,[m,k,f]),{compactSize:j,compactItemClassnames:M}=ih(o,C),N=b===`spinner`?S.createElement(TL,null):S.createElement(wz,null),P=b===`spinner`?S.createElement(xz,null):S.createElement(AC,null),F=typeof A==`boolean`?A:void 0;hd(A)&&(N=A.upIcon||N,P=A.downIcon||P);let{hasFeedback:I,isFormItemInput:L,feedbackIcon:R}=S.useContext(Sy),z=th(e=>i??j??e),[B,V]=hC(`inputNumber`,h,d),H=I&&S.createElement(S.Fragment,null,R),U={...e,size:z,disabled:k,controls:A},[W,ee]=Fd([D,v],[E,y],{props:U});return S.createElement(Xz,{ref:n,mode:b,disabled:k,className:J(g,r,W.root,w,M,aC(o,p,I),{[`${o}-${B}`]:V,[`${o}-lg`]:z===`large`,[`${o}-sm`]:z===`small`,[`${o}-rtl`]:C===`rtl`,[`${o}-in-form-item`]:L,[`${o}-without-controls`]:!A}),style:{...ee.root,...T,..._},upHandler:N,downHandler:P,prefixCls:o,readOnly:f,controls:F,prefix:l,suffix:H||u,classNames:W,styles:ee,...x})}),aB=S.forwardRef((e,t)=>{let{addonBefore:n,addonAfter:r,prefixCls:i,className:a,status:o,rootClassName:s,...c}=e,{getPrefixCls:l}=li(`inputNumber`),u=l(`input-number`,i),{status:d}=S.useContext(Sy),f=oC(d,o),p=bf(u),[m,h]=rB(u,p),g=n||r,_=S.createElement(iB,{ref:t,...c,prefixCls:u,status:f,className:J(h,p,m,a),rootClassName:g?void 0:s});if(g){let t=t=>t?S.createElement($z,{className:J(`${u}-addon`,h,m),variant:e.variant,disabled:e.disabled,status:f},S.createElement(Ty,{form:!0},t)):null,i=t(n),a=t(r);return S.createElement(sh,{rootClassName:s},i,_,a)}return _}),oB=aB;oB._InternalPanelDoNotUseOrYouWillBeFired=e=>S.createElement(am,{theme:{components:{InputNumber:{handleVisible:!0}}}},S.createElement(aB,{...e}));function sB(e){return!!(e.addonBefore||e.addonAfter)}function cB(e){return!!(e.prefix||e.suffix||e.allowClear)}function lB(e,t,n){let r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart==`number`&&typeof t.selectionEnd==`number`&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=(...e)=>{t.setSelectionRange(...e)},i}function uB(e,t,n,r){if(!n)return;let i=t;if(t.type===`click`){i=lB(t,e,``),n(i);return}if(e.type!==`file`&&r!==void 0){i=lB(t,e,r),n(i);return}n(i)}function dB(){return dB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{inputElement:n,children:r,prefixCls:i,prefix:a,suffix:o,addonBefore:s,addonAfter:c,className:l,style:u,disabled:d,readOnly:f,focused:p,triggerFocus:m,allowClear:h,value:g,handleReset:_,hidden:v,classes:y,classNames:b,dataAttrs:x,styles:C,components:w,onClear:T}=e,E=r??n,D=w?.affixWrapper||`span`,O=w?.groupWrapper||`span`,k=w?.wrapper||`span`,A=w?.groupAddon||`span`,j=(0,S.useRef)(null),M=e=>{j.current?.contains(e.target)&&m?.()},N=cB(e),P=(0,S.cloneElement)(E,{value:g,className:J(E.props?.className,!N&&b?.variant)||null}),F=(0,S.useRef)(null);if(S.useImperativeHandle(t,()=>({nativeElement:F.current||j.current})),N){let e=null;if(h){let t=!d&&!f&&g,n=`${i}-clear-icon`,r=typeof h==`object`&&h?.clearIcon?h.clearIcon:`✖`;e=S.createElement(`button`,{type:`button`,tabIndex:-1,onClick:e=>{_?.(e),T?.()},onMouseDown:e=>e.preventDefault(),className:J(n,{[`${n}-hidden`]:!t,[`${n}-has-suffix`]:!!o})},r)}let t=`${i}-affix-wrapper`,n=J(t,{[`${i}-disabled`]:d,[`${t}-disabled`]:d,[`${t}-focused`]:p,[`${t}-readonly`]:f,[`${t}-input-with-clear-btn`]:o&&h&&g},y?.affixWrapper,b?.affixWrapper,b?.variant),r=(o||h)&&S.createElement(`span`,{className:J(`${i}-suffix`,b?.suffix),style:C?.suffix},e,o);P=S.createElement(D,dB({className:n,style:C?.affixWrapper,onClick:M},x?.affixWrapper,{ref:j}),a&&S.createElement(`span`,{className:J(`${i}-prefix`,b?.prefix),style:C?.prefix},a),P,r)}if(sB(e)){let e=`${i}-group`,t=`${e}-addon`,n=`${e}-wrapper`,r=J(`${i}-wrapper`,e,y?.wrapper,b?.wrapper),a=J(n,{[`${n}-disabled`]:d},y?.group,b?.groupWrapper);P=S.createElement(O,{className:a,ref:F},S.createElement(k,{className:r},s&&S.createElement(A,{className:t},s),P,c&&S.createElement(A,{className:t},c)))}return S.cloneElement(P,{className:J(P.props?.className,l)||null,style:{...P.props?.style,...u},hidden:v})});function pB(e,t){return S.useMemo(()=>{let n={};t&&(n.show=typeof t==`object`&&t.formatter?t.formatter:!!t),n={...n,...e};let{show:r,...i}=n;return{...i,show:!!r,showFormatter:typeof r==`function`?r:void 0,strategy:i.strategy||(e=>e.length)}},[e,t])}function mB(){return mB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{autoComplete:n,onChange:r,onFocus:i,onBlur:a,onPressEnter:o,onKeyDown:s,onKeyUp:c,prefixCls:l=`rc-input`,disabled:u,htmlSize:d,className:f,maxLength:p,suffix:m,showCount:h,count:g,type:_=`text`,classes:v,classNames:y,styles:b,onCompositionStart:x,onCompositionEnd:C,...w}=e,[T,E]=(0,S.useState)(!1),D=(0,S.useRef)(!1),O=(0,S.useRef)(!1),k=(0,S.useRef)(null),A=(0,S.useRef)(null),j=e=>{k.current&&l_(k.current,e)},[M,N]=Hn(e.defaultValue,e.value),P=M==null?``:String(M),[F,I]=(0,S.useState)(null),L=pB(g,h),R=L.max||p,z=L.strategy(P),B=!!R&&z>R;(0,S.useImperativeHandle)(t,()=>({focus:j,blur:()=>{k.current?.blur()},setSelectionRange:(e,t,n)=>{k.current?.setSelectionRange(e,t,n)},select:()=>{k.current?.select()},input:k.current,nativeElement:A.current?.nativeElement||k.current})),(0,S.useEffect)(()=>{O.current&&=!1,E(e=>e&&u?!1:e)},[u]);let V=(e,t,n)=>{let i=t;if(!D.current&&L.exceedFormatter&&L.max&&L.strategy(t)>L.max)i=L.exceedFormatter(t,{max:L.max}),t!==i&&I([k.current?.selectionStart||0,k.current?.selectionEnd||0]);else if(n.source===`compositionEnd`)return;N(i),k.current&&uB(k.current,e,r,i)};(0,S.useEffect)(()=>{F&&k.current?.setSelectionRange(...F)},[F]);let H=e=>{V(e,e.target.value,{source:`change`})},U=e=>{D.current=!1,V(e,e.currentTarget.value,{source:`compositionEnd`}),C?.(e)},W=e=>{o&&e.key===`Enter`&&!O.current&&!e.nativeEvent.isComposing&&(O.current=!0,o(e)),s?.(e)},ee=e=>{e.key===`Enter`&&(O.current=!1),c?.(e)},te=e=>{E(!0),i?.(e)},ne=e=>{O.current&&=!1,E(!1),a?.(e)},re=e=>{N(``),j(),k.current&&uB(k.current,e,r)},ie=B&&`${l}-out-of-range`;return S.createElement(fB,mB({},w,{prefixCls:l,className:J(f,ie),handleReset:re,value:P,focused:T,triggerFocus:j,suffix:(()=>{let e=Number(R)>0;if(m||L.show){let t=L.showFormatter?L.showFormatter({value:P,count:z,maxLength:R}):`${z}${e?` / ${R}`:``}`;return S.createElement(S.Fragment,null,L.show&&S.createElement(`span`,{className:J(`${l}-show-count-suffix`,{[`${l}-show-count-has-suffix`]:!!m},y?.count),style:{...b?.count}},t),m)}return null})(),disabled:u,classes:v,classNames:y,styles:b,ref:A}),(()=>{let t=Sr(e,[`prefixCls`,`onPressEnter`,`addonBefore`,`addonAfter`,`prefix`,`suffix`,`allowClear`,`defaultValue`,`showCount`,`count`,`classes`,`htmlSize`,`styles`,`classNames`,`onClear`]);return S.createElement(`input`,mB({autoComplete:n},t,{onChange:H,onFocus:te,onBlur:ne,onKeyDown:W,onKeyUp:ee,className:J(l,{[`${l}-disabled`]:u},y?.input),style:b?.input,ref:k,size:d,type:_,onCompositionStart:e=>{D.current=!0,x?.(e)},onCompositionEnd:U}))})())}),gB=e=>{let t;return hd(e)&&e?.clearIcon?t=e:e&&(t={clearIcon:S.createElement(Fl,null)}),t};function _B(e,t){let n=(0,S.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute(`type`)===`password`&&e.current?.input.hasAttribute(`value`)&&e.current?.input.removeAttribute(`value`)}))};return(0,S.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[]),r}function vB(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var yB=(0,S.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,status:i,size:a,disabled:o,onBlur:s,onFocus:c,suffix:l,allowClear:u,addonAfter:d,addonBefore:f,className:p,style:m,styles:h,rootClassName:g,onChange:_,classNames:v,variant:y,...b}=e,{getPrefixCls:x,direction:C,allowClear:w,autoComplete:T,className:E,style:D,classNames:O,styles:k}=li(`input`),A=x(`input`,n),j=(0,S.useRef)(null),M=bf(A),[N,P]=yL(A,g);bL(A,M);let{compactSize:F,compactItemClassnames:I}=ih(A,C),L=th(e=>a??F??e),R=S.useContext(zp),z=o??R,B={...e,size:L,disabled:z},[V,H]=Fd([O,v],[k,h],{props:B}),{status:U,hasFeedback:W,feedbackIcon:ee}=(0,S.useContext)(Sy),te=oC(U,i);(0,S.useRef)(vB(e)||!!W);let ne=_B(j,!0),re=e=>{ne(),s?.(e)},ie=e=>{ne(),c?.(e)},ae=e=>{ne(),_?.(e)},G=(W||l)&&S.createElement(S.Fragment,null,l,W&&ee),oe=gB(u??w),[K,se]=hC(`input`,y,r);return S.createElement(hB,{ref:$n(t,j),prefixCls:A,autoComplete:T,...b,disabled:z,onBlur:re,onFocus:ie,style:{...H.root,...D,...m},styles:H,suffix:G,allowClear:oe,className:J(p,g,P,M,I,E,V.root),onChange:ae,addonBefore:f&&S.createElement(Ty,{form:!0,space:!0},f),addonAfter:d&&S.createElement(Ty,{form:!0,space:!0},d),classNames:{...V,input:J({[`${A}-sm`]:L===`small`,[`${A}-lg`]:L===`large`,[`${A}-rtl`]:C===`rtl`},V.input,N),variant:J({[`${A}-${K}`]:se},aC(A,te)),affixWrapper:J({[`${A}-affix-wrapper-sm`]:L===`small`,[`${A}-affix-wrapper-lg`]:L===`large`,[`${A}-affix-wrapper-rtl`]:C===`rtl`},N),wrapper:J({[`${A}-group-rtl`]:C===`rtl`},N),groupWrapper:J({[`${A}-group-wrapper-sm`]:L===`small`,[`${A}-group-wrapper-lg`]:L===`large`,[`${A}-group-wrapper-rtl`]:C===`rtl`,[`${A}-group-wrapper-${K}`]:se},aC(`${A}-group-wrapper`,te,W),N)}})}),bB={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z`}}]},name:`swap-right`,theme:`outlined`};function xB(){return xB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,xB({},e,{ref:t,icon:bB}))),CB=(e,t,n,r,i,a)=>{let{classNames:o,styles:s}=li(e),[c,l]=Fd([o,t],[s,n],{props:a},{popup:{_default:`root`}});return S.useMemo(()=>[{...c,popup:{...c.popup,root:J(c.popup?.root,r)}},{...l,popup:{...l.popup,root:{...l.popup?.root,...i}}}],[c,l,r,i])};function wB(e,t,n){return n===void 0?t===`year`&&e.lang.yearPlaceholder?e.lang.yearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.quarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.monthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.weekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.placeholder:e.lang.placeholder:n}function TB(e,t,n){return n===void 0?t===`year`&&e.lang.yearPlaceholder?e.lang.rangeYearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.rangeQuarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.rangeMonthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.rangeWeekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.rangePlaceholder:e.lang.rangePlaceholder:n}function EB(e,t){let{allowClear:n=!0}=e,{clearIcon:r,removeIcon:i}=PC({...e,prefixCls:t,componentName:`DatePicker`});return[S.useMemo(()=>n===!1?!1:{clearIcon:r,...n===!0?{}:n},[n,r]),i]}var[DB,OB]=[`week`,`WeekPicker`],[kB,AB]=[`month`,`MonthPicker`],[jB,MB]=[`year`,`YearPicker`],[NB,PB]=[`quarter`,`QuarterPicker`],[FB,IB]=[`time`,`TimePicker`],LB={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z`}}]},name:`calendar`,theme:`outlined`};function RB(){return RB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,RB({},e,{ref:t,icon:LB}))),BB={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`};function VB(){return VB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,VB({},e,{ref:t,icon:BB}))),UB=({picker:e,hasFeedback:t,feedbackIcon:n,suffixIcon:r})=>r===null||r===!1?null:r===!0||r===void 0?S.createElement(S.Fragment,null,e===FB?S.createElement(HB,null):S.createElement(zB,null),t&&n):r,WB=e=>S.createElement(Zg,{size:`small`,type:`primary`,...e});function GB(e){return(0,S.useMemo)(()=>({button:WB,...e}),[e])}var KB=e=>(0,S.forwardRef)((t,n)=>{let{prefixCls:r,getPopupContainer:i,components:a,className:o,style:s,classNames:c,styles:l,placement:u,size:d,disabled:f,bordered:p=!0,placeholder:m,status:h,variant:g,picker:_,dropdownClassName:v,popupClassName:y,popupStyle:b,rootClassName:x,suffixIcon:C,separator:w,...T}=t,[E,D]=CB(_===FB?`timePicker`:`datePicker`,c,l,y||v,b),O=S.useRef(null),{getPrefixCls:k,direction:A,getPopupContainer:j,rangePicker:M}=(0,S.useContext)(oi),N=k(`picker`,r),{compactSize:P,compactItemClassnames:F}=ih(N,A),I=k(),L=w??M?.separator,[R,z]=hC(`rangePicker`,g,p),B=bf(N),[V,H]=CL(N,B),U=J(V,H,B,x),[W]=EB(t,N),ee=GB(a),te=th(e=>d??P??e),ne=S.useContext(zp),re=f??ne,{hasFeedback:ie,status:ae,feedbackIcon:G}=(0,S.useContext)(Sy),oe=UB({picker:_,hasFeedback:ie,feedbackIcon:G,suffixIcon:C});(0,S.useImperativeHandle)(n,()=>O.current);let[K]=cd(`Calendar`,Qu),se=fr(K,t.locale||{}),[ce]=Yd(`DatePicker`,D?.popup?.root?.zIndex);return S.createElement(Ty,{space:!0},S.createElement(QF,{separator:S.createElement(`span`,{"aria-label":`to`,className:`${N}-separator`},L??S.createElement(SB,null)),disabled:re,ref:O,placement:u,placeholder:TB(se,_,m),suffixIcon:oe,prevIcon:S.createElement(`span`,{className:`${N}-prev-icon`}),nextIcon:S.createElement(`span`,{className:`${N}-next-icon`}),superPrevIcon:S.createElement(`span`,{className:`${N}-super-prev-icon`}),superNextIcon:S.createElement(`span`,{className:`${N}-super-next-icon`}),transitionName:`${I}-slide-up`,picker:_,...T,locale:se.lang,getPopupContainer:i||j,generateConfig:e,components:ee,direction:A,prefixCls:N,rootClassName:U,className:J({[`${N}-large`]:te===`large`,[`${N}-small`]:te===`small`,[`${N}-${R}`]:z},aC(N,oC(ae,h),ie),F,o,M?.className),style:{...M?.style,...s},classNames:E,styles:{...D,popup:{...D.popup,root:{...D.popup.root,zIndex:ce}}},allowClear:W}))}),qB=e=>{let t=(t,n)=>{let r=n===IB?`timePicker`:`datePicker`;return(0,S.forwardRef)((i,a)=>{let{prefixCls:o,getPopupContainer:s,components:c,style:l,className:u,size:d,bordered:f,placement:p,placeholder:m,disabled:h,status:g,variant:_,onCalendarChange:v,classNames:y,styles:b,dropdownClassName:x,popupClassName:C,popupStyle:w,rootClassName:T,suffixIcon:E,...D}=i,{suffixIcon:O}=li(n===IB?`timePicker`:`datePicker`),{getPrefixCls:k,direction:A,getPopupContainer:j,[r]:M}=(0,S.useContext)(oi),N=k(`picker`,o),{compactSize:P,compactItemClassnames:F}=ih(N,A),I=th(e=>d??P??e),L=S.useContext(zp),R=h??L,z={...i,size:I,disabled:R,status:g,variant:_},[B,V]=CB(r,y,b,C||x,w,z),H=S.useRef(null),[U,W]=hC(`datePicker`,_,f),ee=bf(N),[te,ne]=CL(N,ee),re=J(te,ne,ee,T);(0,S.useImperativeHandle)(a,()=>H.current);let ie={showToday:!0},ae=t||i.picker,G=k(),{onSelect:oe,multiple:K}=D,se=oe&&t===`time`&&!K,ce=(e,t,n)=>{v?.(e,t,n),se&&oe(e)},[q,le]=EB(i,N),ue=GB(c),{hasFeedback:de,status:fe,feedbackIcon:pe}=(0,S.useContext)(Sy),me=UB({picker:ae,hasFeedback:de,feedbackIcon:pe,suffixIcon:E===void 0?O:E}),[he]=cd(`DatePicker`,Qu),ge=fr(he,i.locale||{}),[_e]=Yd(`DatePicker`,V?.popup?.root?.zIndex);return S.createElement(Ty,{space:!0},S.createElement(II,{ref:H,placeholder:wB(ge,ae,m),suffixIcon:me,placement:p,prevIcon:S.createElement(`span`,{className:`${N}-prev-icon`}),nextIcon:S.createElement(`span`,{className:`${N}-next-icon`}),superPrevIcon:S.createElement(`span`,{className:`${N}-super-prev-icon`}),superNextIcon:S.createElement(`span`,{className:`${N}-super-next-icon`}),transitionName:`${G}-slide-up`,picker:t,onCalendarChange:ce,...ie,...D,locale:ge.lang,getPopupContainer:s||j,generateConfig:e,components:ue,direction:A,disabled:R,prefixCls:N,rootClassName:re,className:J({[`${N}-large`]:I===`large`,[`${N}-small`]:I===`small`,[`${N}-${U}`]:W},aC(N,oC(fe,g),de),F,M?.className,u),style:{...M?.style,...l},classNames:B,styles:{...V,popup:{...V.popup,root:{...V.popup.root,zIndex:_e}}},allowClear:q,removeIcon:le}))})},n=t(),r=t(DB,OB),i=t(kB,AB),a=t(jB,MB),o=t(NB,PB);return{DatePicker:n,WeekPicker:r,MonthPicker:i,YearPicker:a,TimePicker:t(FB,IB),QuarterPicker:o}},JB=e=>{let{DatePicker:t,WeekPicker:n,MonthPicker:r,YearPicker:i,TimePicker:a,QuarterPicker:o}=qB(e),s=KB(e),c=t;return c.WeekPicker=n,c.MonthPicker=r,c.YearPicker=i,c.RangePicker=s,c.TimePicker=a,c.QuarterPicker=o,c},YB=JB(QE);YB._InternalPanelDoNotUseOrYouWillBeFired=cx(YB,`popupAlign`,void 0,`picker`),YB._InternalRangePanelDoNotUseOrYouWillBeFired=cx(YB.RangePicker,`popupAlign`,void 0,`picker`),YB.generatePicker=JB;var XB={xxxl:4,xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},ZB=S.createContext(null),QB=e=>Cr(e).map(e=>({...e?.props,key:e.key}));function $B(e,t,n){let r=S.useMemo(()=>t||QB(n),[t,n]);return S.useMemo(()=>r.map(({span:t,...n})=>t===`filled`?{...n,filled:!0}:{...n,span:pd(t)?t:WC(e,t)}),[r,e])}function eV(e,t){let n=[],r=[],i=!1,a=0;return e.filter(e=>e).forEach(e=>{let{filled:o,...s}=e;if(o){r.push(s),n.push(r),r=[],a=0;return}let c=t-a;a+=e.span||1,a>=t?(a>t?(i=!0,r.push({...s,span:c})):r.push(s),n.push(r),r=[],a=0):r.push(s)}),r.length>0&&n.push(r),n=n.map(e=>{let n=e.reduce((e,t)=>e+(t.span||1),0);if(n{let[n,r]=(0,S.useMemo)(()=>eV(t,e),[t,e]);return n},nV=e=>e.children,rV=e=>{let{itemPrefixCls:t,component:n,span:r,className:i,style:a,labelStyle:o,contentStyle:s,bordered:c,label:l,content:u,colon:d,type:f,styles:p,classNames:m}=e,h=n,{classNames:g,styles:_}=S.useContext(ZB),[v,y]=Fd([g,m],[_,p],{props:e}),b={...o,...y.label},x={...s,...y.content};return c?S.createElement(h,{colSpan:r,style:a,className:J(i,{[`${t}-item-${f}`]:f===`label`||f===`content`,[v.label]:v.label&&f===`label`,[v.content]:v.content&&f===`content`})},fd(l)&&S.createElement(`span`,{style:b},l),fd(u)&&S.createElement(`span`,{style:x},u)):S.createElement(h,{className:J(`${t}-item`,i),style:a,colSpan:r},S.createElement(`div`,{className:`${t}-item-container`},fd(l)&&S.createElement(`span`,{style:b,className:J(`${t}-item-label`,v.label,{[`${t}-item-no-colon`]:!d})},l),fd(u)&&S.createElement(`span`,{style:x,className:J(`${t}-item-content`,v.content)},u)))};function iV(e,{colon:t,prefixCls:n,bordered:r},{component:i,type:a,showLabel:o,showContent:s,labelStyle:c,contentStyle:l,styles:u}){return e.map(({label:e,children:d,prefixCls:f=n,className:p,style:m,labelStyle:h,contentStyle:g,span:_=1,key:v,styles:y,classNames:b},x)=>typeof i==`string`?S.createElement(rV,{key:`${a}-${v||x}`,className:p,style:m,classNames:b,styles:{label:{...c,...u?.label,...h,...y?.label},content:{...l,...u?.content,...g,...y?.content}},span:_,colon:t,component:i,itemPrefixCls:f,bordered:r,label:o?e:null,content:s?d:null,type:a}):[S.createElement(rV,{key:`label-${v||x}`,className:p,style:{...c,...u?.label,...m,...h,...y?.label},span:1,colon:t,component:i[0],itemPrefixCls:f,bordered:r,label:e,type:`label`}),S.createElement(rV,{key:`content-${v||x}`,className:p,style:{...l,...u?.content,...m,...g,...y?.content},span:_*2-1,component:i[1],itemPrefixCls:f,bordered:r,content:d,type:`content`})])}var aV=e=>{let t=S.useContext(ZB),{prefixCls:n,vertical:r,row:i,index:a,bordered:o}=e;return r?S.createElement(S.Fragment,null,S.createElement(`tr`,{key:`label-${a}`,className:`${n}-row`},iV(i,e,{component:`th`,type:`label`,showLabel:!0,...t})),S.createElement(`tr`,{key:`content-${a}`,className:`${n}-row`},iV(i,e,{component:`td`,type:`content`,showContent:!0,...t}))):S.createElement(`tr`,{key:a,className:`${n}-row`},iV(i,e,{component:o?[`th`,`td`]:`td`,type:`item`,showLabel:!0,showContent:!0,...t}))},oV=e=>{let{componentCls:t,labelBg:n}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:`auto`},[`${t}-row`]:{borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:`none`,"> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.padding)} ${Y(e.paddingLG)}`,borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:`none`}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:n,"&::after":{display:`none`}}}},[`&${t}-medium`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.paddingSM)} ${Y(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.paddingXS)} ${Y(e.padding)}`}}}}}},sV=e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:r,itemPaddingEnd:i,colonMarginRight:a,colonMarginLeft:o,titleMarginBottom:s}=e;return{[t]:{...Jc(e),...oV(e),"&-rtl":{direction:`rtl`},[`${t}-header`]:{display:`flex`,alignItems:`center`,marginBottom:s},[`${t}-title`]:{...qc,flex:`auto`,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG},[`${t}-extra`]:{marginInlineStart:`auto`,color:n,fontSize:e.fontSize},[`${t}-view`]:{width:`100%`,borderRadius:e.borderRadiusLG,table:{width:`100%`,tableLayout:`fixed`,borderCollapse:`collapse`}},[`${t}-row`]:{"> th, > td":{paddingBottom:r,paddingInlineEnd:i},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:`none`,"> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:`normal`,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:`start`,"&::after":{content:`":"`,position:`relative`,top:-.5,marginInline:`${Y(o)} ${Y(a)}`},[`&${t}-item-no-colon::after`]:{content:`""`}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:`""`}},[`${t}-item-content`]:{display:`table-cell`,flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:`break-word`,overflowWrap:`break-word`},[`${t}-item`]:{paddingBottom:0,verticalAlign:`top`,"&-container":{display:`flex`,[`${t}-item-label`]:{display:`inline-flex`,alignItems:`baseline`},[`${t}-item-content`]:{display:`inline-flex`,alignItems:`baseline`,minWidth:`1em`}}},"&-medium":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}}}},cV=rl(`Descriptions`,e=>sV(gs(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText})),lV=e=>{let{prefixCls:t,title:n,extra:r,column:i,colon:a=!0,bordered:o,layout:s,children:c,className:l,rootClassName:u,style:d,size:f,labelStyle:p,contentStyle:m,styles:h,items:g,classNames:_,...v}=e,{getPrefixCls:y,direction:b,className:x,style:C,classNames:w,styles:T}=li(`descriptions`),E=y(`descriptions`,t),D=KC(),O=S.useMemo(()=>pd(i)?i:WC(D,{...XB,...i})??3,[D,i]),k=$B(D,g,c),A=th(f),j=tV(O,k),[M,N]=cV(E),P={...e,column:O,items:k,size:A},[F,I]=Fd([w,_],[T,h],{props:P}),L=S.useMemo(()=>({labelStyle:p,contentStyle:m,styles:{label:I.label,content:I.content},classNames:{label:F.label,content:F.content}}),[p,m,I.label,I.content,F.label,F.content]);return S.createElement(ZB.Provider,{value:L},S.createElement(`div`,{className:J(E,x,F.root,{[`${E}-medium`]:A===`medium`||A===`middle`,[`${E}-small`]:A===`small`,[`${E}-bordered`]:!!o,[`${E}-rtl`]:b===`rtl`},l,u,M,N),style:{...C,...I.root,...d},...v},(n||r)&&S.createElement(`div`,{className:J(`${E}-header`,F.header),style:I.header},n&&S.createElement(`div`,{className:J(`${E}-title`,F.title),style:I.title},n),r&&S.createElement(`div`,{className:J(`${E}-extra`,F.extra),style:I.extra},r)),S.createElement(`div`,{className:`${E}-view`},S.createElement(`table`,null,S.createElement(`tbody`,null,j.map((e,t)=>S.createElement(aV,{key:t,index:t,colon:a,prefixCls:E,vertical:s===`vertical`,bordered:o,row:e})))))))};lV.Item=nV;var uV=S.createContext(null),dV=S.createContext({});function fV(){return fV=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t,className:n,containerRef:r,...i}=e,{panel:a}=S.useContext(dV),o=er(a,r);return S.createElement(`div`,fV({className:J(`${t}-section`,n),role:`dialog`,ref:o},Vu(e,{aria:!0}),{"aria-modal":`true`},i))};function mV(e){let{prefixCls:t,direction:n,className:r,style:i,maxSize:a,containerRef:o,currentSize:s,onResize:c,onResizeEnd:l,onResizeStart:u}=e,[d,f]=S.useState(!1),[p,m]=S.useState(0),[h,g]=S.useState(0),_=n===`left`||n===`right`,v=In(e=>{e.preventDefault(),e.stopPropagation(),f(!0),m(_?e.clientX:e.clientY);let t;if(typeof s==`number`)t=s;else if(o?.current){let e=o.current.getBoundingClientRect();t=_?e.width:e.height}g(t),u?.(t)}),y=In(e=>{if(!d)return;let t=(_?e.clientX:e.clientY)-p;(n===`right`||n===`bottom`)&&(t=-t);let r=h+t;r<0&&(r=0),a&&r>a&&(r=a),c?.(r)}),b=S.useCallback(()=>{if(d&&(f(!1),o?.current)){let e=o.current.getBoundingClientRect(),t=_?e.width:e.height;l?.(t)}},[d,o,l,_]);return S.useEffect(()=>{if(d)return document.addEventListener(`mousemove`,y),document.addEventListener(`mouseup`,b),()=>{document.removeEventListener(`mousemove`,y),document.removeEventListener(`mouseup`,b)}},[d,y,b]),{dragElementProps:{className:J(`${t}-dragger`,`${t}-dragger-${n}`,{[`${t}-dragger-dragging`]:d,[`${t}-dragger-horizontal`]:_,[`${t}-dragger-vertical`]:!_},r),style:i,onMouseDown:v},isDragging:d}}function hV(e){if(typeof e==`string`){let t=Number(e.replace(/px$/i,``));if(parseFloat(e)===t&&br(!1,"Invalid value type of `width` or `height` which should be number type instead."),!Number.isNaN(t))return t}return e}function gV(e,t,n,r,i){let[a]=x_(t&&(r??i!==!1),e);return S.useEffect(()=>{t&&n===!0&&e()?.focus({preventScroll:!0})},[t]),a}function _V(){return _V=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,open:r,placement:i,inline:a,push:o,forceRender:s,autoFocus:c,focusTrap:l,classNames:u,rootClassName:d,rootStyle:f,zIndex:p,className:m,id:h,style:g,motion:_,width:v,height:y,size:b,maxSize:x,children:C,mask:w,maskClosable:T,maskMotion:E,maskClassName:D,maskStyle:O,afterOpenChange:k,onClose:A,onMouseEnter:j,onMouseOver:M,onMouseLeave:N,onClick:P,onKeyDown:F,onKeyUp:I,styles:L,drawerRender:R,resizable:z,defaultSize:B}=e,V=S.useRef(null);S.useImperativeHandle(t,()=>V.current);let H=gV(()=>V.current,r,c,l,w),[U,W]=S.useState(!1),ee=S.useContext(uV),te;te=typeof o==`boolean`?o?{}:{distance:0}:o||{};let ne=te?.distance??ee?.pushDistance??180,re=S.useMemo(()=>({pushDistance:ne,push:()=>{W(!0)},pull:()=>{W(!1)}}),[ne]);S.useEffect(()=>{r?ee?.push?.():ee?.pull?.()},[r]),S.useEffect(()=>()=>{ee?.pull?.()},[]);let ie=S.createElement(Iu,_V({key:`mask`},E,{visible:w&&r}),({className:e,style:t},i)=>S.createElement(`div`,{className:J(`${n}-mask`,e,u?.mask,D),style:{...t,...O,...L?.mask},onClick:T&&r?A:void 0,ref:i})),ae=typeof _==`function`?_(i):_,[G,oe]=S.useState(),K=i===`left`||i===`right`,se=S.useMemo(()=>hV(b??(K?v:y)??G??B??(K?378:void 0)),[b,v,y,B,K,G]),ce=S.useMemo(()=>{let e={};if(U&&ne)switch(i){case`top`:e.transform=`translateY(${ne}px)`;break;case`bottom`:e.transform=`translateY(${-ne}px)`;break;case`left`:e.transform=`translateX(${ne}px)`;break;default:e.transform=`translateX(${-ne}px)`;break}return K?e.width=hV(se):e.height=hV(se),e},[U,ne,i,K,se]),q=S.useRef(null),le=!!z,ue=typeof z==`object`&&z||{},de=In(e=>{oe(e),ue.onResize?.(e)}),{dragElementProps:fe,isDragging:pe}=mV({prefixCls:`${n}-resizable`,direction:i,className:u?.dragger,style:L?.dragger,maxSize:x,containerRef:q,currentSize:se,onResize:de,onResizeStart:ue.onResizeStart,onResizeEnd:ue.onResizeEnd}),me={onMouseEnter:j,onMouseOver:M,onMouseLeave:N,onClick:P,onKeyDown:F,onKeyUp:I,onFocus:e=>{H(e.target)}},he=S.createElement(Iu,_V({key:`panel`},ae,{visible:r,forceRender:s,onVisibleChanged:k,removeOnLeave:!1,leavedClassName:`${n}-content-wrapper-hidden`}),({className:t,style:r},i)=>{let a=S.createElement(pV,_V({id:h,containerRef:i,prefixCls:n,className:J(m,u?.section),style:{...g,...L?.section}},Vu(e,{aria:!0}),me),C);return S.createElement(`div`,_V({ref:q,className:J(`${n}-content-wrapper`,pe&&`${n}-content-wrapper-dragging`,u?.wrapper,!pe&&t),style:{...r,...ce,...L?.wrapper}},Vu(e,{data:!0})),le&&S.createElement(`div`,fe),R?R(a):a)}),ge={...f};return p&&(ge.zIndex=p),S.createElement(uV.Provider,{value:re},S.createElement(`div`,{className:J(n,`${n}-${i}`,d,{[`${n}-open`]:r,[`${n}-inline`]:a}),style:ge,tabIndex:-1,ref:V},ie,he))}),yV=e=>{let{open:t=!1,prefixCls:n=`rc-drawer`,placement:r=`right`,autoFocus:i=!0,keyboard:a=!0,width:o,height:s,size:c,maxSize:l,mask:u=!0,maskClosable:d=!0,getContainer:f,forceRender:p,afterOpenChange:m,destroyOnHidden:h,onMouseEnter:g,onMouseOver:_,onMouseLeave:v,onClick:y,onKeyDown:b,onKeyUp:x,onClose:C,resizable:w,defaultSize:T,focusTriggerAfterClose:E,panelRef:D}=e,[O,k]=S.useState(!1),[A,j]=S.useState(!1);zn(()=>{j(!0)},[]);let M=A?t:!1,N=S.useRef(null),P=S.useRef(null);zn(()=>{M&&(P.current=document.activeElement)},[M]);let F=e=>{k(e),m?.(e),!e&&E!==!1&&P.current&&!N.current?.contains(P.current)&&P.current?.focus({preventScroll:!0})},I=S.useMemo(()=>({panel:D}),[D]);if(!p&&!O&&!M&&h)return null;let L={onMouseEnter:g,onMouseOver:_,onMouseLeave:v,onClick:y,onKeyDown:b,onKeyUp:x},R={...e,open:M,prefixCls:n,placement:r,autoFocus:i,keyboard:a,width:o,height:s,size:c,maxSize:l,defaultSize:T,mask:u,maskClosable:d,inline:f===!1,afterOpenChange:F,ref:N,resizable:w,...L};return S.createElement(dV.Provider,{value:I},S.createElement(Xf,{open:M||p||O,autoDestroy:!1,getContainer:f,autoLock:u&&(M||O),onEsc:({top:e,event:t})=>{e&&a&&(t.stopPropagation(),C?.(t))}},S.createElement(vV,R)))},bV=e=>{let{prefixCls:t,ariaId:n,title:r,footer:i,extra:a,closable:o,loading:s,onClose:c,headerStyle:l,bodyStyle:u,footerStyle:d,children:f,classNames:p,styles:m}=e,h=li(`drawer`),{classNames:g,styles:_,closable:v}=h,[y,b]=Fd([g,p],[_,m],{props:{...e,closable:o??v}}),x=S.useMemo(()=>{let e=o??v;if(e!==!1)return hd(e)&&e?.placement===`end`?`end`:`start`},[o,v]),C=S.useCallback(e=>S.createElement(`button`,{type:`button`,onClick:c,className:J(`${t}-close`,{[`${t}-close-${x}`]:x===`end`},y.close),style:b.close},e),[c,t,x,y.close,b.close]),[w,T]=Td(yd(e),yd(h),{closable:!0,closeIconRender:C}),E=()=>!r&&!w?null:S.createElement(`div`,{style:{...b.header,...l},className:J(`${t}-header`,y.header,{[`${t}-header-close-only`]:w&&!r&&!a})},S.createElement(`div`,{className:`${t}-header-title`},x===`start`&&T,r&&S.createElement(`div`,{className:J(`${t}-title`,y.title),style:b.title,id:n},r)),a&&S.createElement(`div`,{className:J(`${t}-extra`,y.extra),style:b.extra},a),x===`end`&&T),D=()=>i?S.createElement(`div`,{className:J(`${t}-footer`,y.footer),style:{...b.footer,...d}},i):null;return S.createElement(S.Fragment,null,E(),S.createElement(`div`,{className:J(`${t}-body`,y.body),style:{...b.body,...u}},s?S.createElement(Wy,{active:!0,title:!1,paragraph:{rows:5},className:`${t}-body-skeleton`}):f),D())},xV=e=>{let t=`100%`;return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},SV=(e,t)=>({"&-enter, &-appear":{...e,"&-active":t},"&-leave":{...t,"&-active":e}}),CV=(e,t)=>({"&-enter, &-appear, &-leave":{"&-start":{transition:`none`},"&-active":{transition:`all ${t}`}},...SV({opacity:e},{opacity:1})}),wV=(e,t)=>[CV(.7,t),SV({transform:xV(e)},{transform:`none`})],TV=e=>{let{componentCls:t,motionDurationSlow:n}=e;return{[t]:{[`${t}-mask-motion`]:CV(0,n),[`${t}-panel-motion`]:[`left`,`right`,`top`,`bottom`].reduce((e,t)=>({...e,[`&-${t}`]:wV(t,n)}),{})}}},EV=e=>{let{borderRadiusSM:t,componentCls:n,zIndexPopup:r,colorBgMask:i,colorBgElevated:a,motionDurationSlow:o,motionDurationMid:s,paddingXS:c,padding:l,paddingLG:u,fontSizeLG:d,lineHeightLG:f,lineWidth:p,lineType:m,colorSplit:h,marginXS:g,colorIcon:_,colorIconHover:v,colorBgTextHover:y,colorBgTextActive:b,colorText:x,fontWeightStrong:S,footerPaddingBlock:C,footerPaddingInline:w,draggerSize:T,calc:E}=e,D=`${n}-content-wrapper`,O=`${n}-resizable-dragger`;return{[n]:{position:`fixed`,inset:0,zIndex:r,pointerEvents:`none`,color:x,"&-pure":{position:`relative`,background:a,display:`flex`,flexDirection:`column`,pointerEvents:`auto`,[`&${n}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${n}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${n}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${n}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:`absolute`},[`${n}-mask`]:{position:`absolute`,inset:0,zIndex:r,background:i,pointerEvents:`auto`,[`&${n}-mask-blur`]:{backdropFilter:`blur(4px)`}},[D]:{position:`absolute`,zIndex:r,maxWidth:`100vw`,transition:`all ${o}`,"&-hidden":{display:`none`}},[`&-left > ${D}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${D}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${D}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${D}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${n}-section`]:{display:`flex`,flexDirection:`column`,width:`100%`,height:`100%`,overflow:`auto`,background:a,pointerEvents:`auto`},[`${n}-header`]:{display:`flex`,flex:0,alignItems:`center`,padding:`${Y(l)} ${Y(u)}`,fontSize:d,lineHeight:f,borderBottom:`${Y(p)} ${m} ${h}`,"&-title":{display:`flex`,flex:1,alignItems:`center`,minWidth:0,minHeight:0}},[`${n}-extra`]:{flex:`none`},[`${n}-close`]:{display:`inline-flex`,width:E(d).add(c).equal(),height:E(d).add(c).equal(),borderRadius:t,justifyContent:`center`,alignItems:`center`,color:_,fontWeight:S,fontSize:d,fontStyle:`normal`,lineHeight:1,textAlign:`center`,textTransform:`none`,textDecoration:`none`,background:`transparent`,border:0,cursor:`pointer`,transition:`all ${s}`,textRendering:`auto`,[`&${n}-close-end`]:{marginInlineStart:g},[`&:not(${n}-close-end)`]:{marginInlineEnd:g},"&:hover":{color:v,backgroundColor:y,textDecoration:`none`},"&:active":{backgroundColor:b},...Qc(e)},[`${n}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:d,lineHeight:f},[`${n}-body`]:{flex:1,minWidth:0,minHeight:0,padding:u,overflow:`auto`,[`${n}-body-skeleton`]:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`}},[`${n}-footer`]:{flexShrink:0,padding:`${Y(C)} ${Y(w)}`,borderTop:`${Y(p)} ${m} ${h}`},[O]:{position:`absolute`,zIndex:1,backgroundColor:`transparent`,userSelect:`none`,pointerEvents:`auto`,"&:hover":{backgroundColor:e.colorPrimary,opacity:.2},"&-dragging":{backgroundColor:e.colorPrimary,opacity:.3}},[`${O}-left`]:{top:0,bottom:0,right:{_skip_check_:!0,value:0},width:T,cursor:`col-resize`},[`${O}-right`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},width:T,cursor:`col-resize`},[`${O}-top`]:{insetInline:0,bottom:0,height:T,cursor:`row-resize`},[`${O}-bottom`]:{insetInline:0,top:0,height:T,cursor:`row-resize`},[`${D}-dragging`]:{userSelect:`none`,transition:`none`,willChange:`width, height`,[`${n}-content`]:{pointerEvents:`none`},[`${n}-section`]:{pointerEvents:`none`}},"&-rtl":{direction:`rtl`}}}},DV=rl(`Drawer`,e=>{let t=gs(e,{});return[EV(t),TV(t)]},e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding,draggerSize:4})),OV={distance:180},kV=378,AV={motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},jV=e=>{let{rootClassName:t,size:n,defaultSize:r=kV,height:i,width:a,mask:o,push:s=OV,open:c,afterOpenChange:l,onClose:u,prefixCls:d,getContainer:f,panelRef:p=null,style:m,className:h,resizable:g,"aria-labelledby":_,focusable:v,maskClosable:y,maskStyle:b,drawerStyle:x,contentWrapperStyle:C,destroyOnClose:w,destroyOnHidden:T,...E}=e,{placement:D}=E,O=zf(),k=E.title?O:void 0,{getPopupContainer:A,getPrefixCls:j,direction:M,className:N,style:P,classNames:F,styles:I,mask:L}=li(`drawer`),R=j(`drawer`,d),[z,B]=DV(R),V=f===void 0&&A?()=>A(document.body):f,H=S.useMemo(()=>pd(n)?n:n===`large`?736:n===`default`?kV:typeof n==`string`?/^\d+(\.\d+)?$/.test(n)?Number(n):n:!D||D===`left`||D===`right`?a:i,[n,D,a,i]),U={motionName:Gm(R,`mask-motion`),...AV},W=e=>({motionName:Gm(R,`panel-motion-${e}`),...AV}),ee=$n(p,Ky()),[te,ne]=Yd(`Drawer`,E.zIndex),[re,ie,ae]=Od(o,L,R,y),G=Ay(v,V!==!1&&re),{classNames:oe,styles:K,rootStyle:se}=E,ce={...e,zIndex:te,panelRef:p,mask:re,maskClosable:ae,defaultSize:r,push:s,focusable:G},[q,le]=Fd([F,oe],[I,K],{props:ce}),ue=J({"no-mask":!re,[`${R}-rtl`]:M===`rtl`},t,z,B,q.root);return S.createElement(Ty,{form:!0,space:!0},S.createElement(Ud.Provider,{value:ne},S.createElement(yV,{prefixCls:R,onClose:u,maskMotion:U,motion:W,...E,classNames:{mask:J(q.mask,ie.mask),section:q.section,wrapper:q.wrapper,dragger:q.dragger},styles:{mask:{...le.mask,...b},section:{...le.section,...x},wrapper:{...le.wrapper,...C},dragger:le.dragger},open:c,mask:re,maskClosable:ae,push:s,size:H,defaultSize:r,style:{...P,...m},rootStyle:{...se,...le.root},className:J(N,h),rootClassName:ue,getContainer:V,afterOpenChange:l,panelRef:ee,zIndex:te,...g?{resizable:g}:{},"aria-labelledby":_??k,destroyOnHidden:T??w,focusTriggerAfterClose:G.focusTriggerAfterClose,focusTrap:G.trap},S.createElement(bV,{prefixCls:R,size:n,...E,ariaId:k,onClose:u}))))};jV._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,style:n,className:r,placement:i=`right`,...a}=e,{getPrefixCls:o}=S.useContext(oi),s=o(`drawer`,t),[c,l]=DV(s),u=J(s,`${s}-pure`,`${s}-${i}`,c,l,r);return S.createElement(`div`,{className:u,style:n},S.createElement(bV,{prefixCls:s,...a}))};var MV=jV;function NV(e){return[`small`,`middle`,`medium`,`large`].includes(e)}function PV(e){return e?pd(e):!1}var FV=S.createContext({latestIndex:0}),IV=FV.Provider,LV=e=>{let{className:t,prefix:n,index:r,children:i,separator:a,style:o,classNames:s,styles:c}=e,{latestIndex:l}=S.useContext(FV);return fd(i)?S.createElement(S.Fragment,null,S.createElement(`div`,{className:t,style:o},i),r{let{componentCls:t,antCls:n}=e;return{[t]:{display:`inline-flex`,"&-rtl":{direction:`rtl`},"&-vertical":{flexDirection:`column`},"&-align":{flexDirection:`column`,"&-center":{alignItems:`center`},"&-start":{alignItems:`flex-start`},"&-end":{alignItems:`flex-end`},"&-baseline":{alignItems:`baseline`}},[`${t}-item:empty`]:{display:`none`},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:`block`}}}},zV=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},BV=rl(`Space`,e=>{let t=gs(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[RV(t),zV(t)]},()=>({}),{resetStyle:!1}),VV=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,size:i,className:a,style:o,classNames:s,styles:c}=li(`space`),{size:l=i??`small`,align:u,className:d,rootClassName:f,children:p,direction:m,orientation:h,prefixCls:g,split:_,separator:v,style:y,vertical:b,wrap:x=!1,classNames:C,styles:w,...T}=e,[E,D]=Array.isArray(l)?l:[l,l],O=NV(D),k=NV(E),A=PV(D),j=PV(E),M=Cr(p,{keepEmpty:!0}),[N,P]=Rd(h,b,m),F=u===void 0&&!P?`center`:u,I=v??_,L=n(`space`,g),[R,z]=BV(L),B={...e,size:l,orientation:N,align:F},[V,H]=Fd([s,C],[c,w],{props:B}),U=J(L,a,R,`${L}-${N}`,{[`${L}-rtl`]:r===`rtl`,[`${L}-align-${F}`]:F,[`${L}-gap-row-${D}`]:O,[`${L}-gap-col-${E}`]:k},d,f,z,V.root),W=J(`${L}-item`,V.item),ee=M.map((e,t)=>{let n=e?.key||`${W}-${t}`;return S.createElement(LV,{prefix:L,classNames:V,styles:H,className:W,key:n,index:t,separator:I,style:H.item},e)}),te=S.useMemo(()=>({latestIndex:M.reduce((e,t,n)=>fd(t)?n:e,0)}),[M]);if(M.length===0)return null;let ne={};return x&&(ne.flexWrap=`wrap`),!k&&j&&(ne.columnGap=E),!O&&A&&(ne.rowGap=D),S.createElement(`div`,{ref:t,className:U,style:{...ne,...H.root,...o,...y},...T},S.createElement(IV,{value:te},ee))});VV.Compact=sh,VV.Addon=$z;var HV=e=>{let{getPopupContainer:t,getPrefixCls:n,direction:r}=S.useContext(oi),{prefixCls:i,type:a=`default`,danger:o,disabled:s,loading:c,onClick:l,htmlType:u,children:d,className:f,menu:p,arrow:m,autoFocus:h,trigger:g,align:_,open:v,onOpenChange:y,placement:b,getPopupContainer:x,href:C,icon:w=S.createElement(kE,null),title:T,buttonsRender:E=e=>e,mouseEnterDelay:D,mouseLeaveDelay:O,overlayClassName:k,overlayStyle:A,destroyOnHidden:j,destroyPopupOnHide:M,dropdownRender:N,popupRender:P,...F}=e,I=n(`dropdown`,i),L=`${I}-button`,R={menu:p,arrow:m,autoFocus:h,align:_,disabled:s,trigger:s?[]:g,onOpenChange:y,getPopupContainer:x||t,mouseEnterDelay:D,mouseLeaveDelay:O,classNames:{root:k},styles:{root:A},destroyOnHidden:j,popupRender:P||N},{compactSize:z,compactItemClassnames:B}=ih(I,r),V=J(L,B,f);`destroyPopupOnHide`in e&&(R.destroyPopupOnHide=M),`open`in e&&(R.open=v),`placement`in e?R.placement=b:R.placement=r===`rtl`?`bottomLeft`:`bottomRight`;let[H,U]=E([S.createElement(qE,{type:a,danger:o,disabled:s,loading:c,onClick:l,htmlType:u,href:C,title:T},d),S.createElement(qE,{type:a,danger:o,icon:w})]);return S.createElement(VV.Compact,{className:V,size:z,block:!0,...F},H,S.createElement(KE,{...R},U))};HV.__ANT_BUTTON=!0;var UV=KE;UV.Button=HV;var WV={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z`}}]},name:`file-text`,theme:`outlined`};function GV(){return GV=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,GV({},e,{ref:t,icon:WV}))),qV=(e,t)=>fd(e)?hd(e)&&!(0,S.isValidElement)(e)?{...t,...e}:{...t,title:e}:null;function JV(e){let[t,n]=S.useState(e);return S.useEffect(()=>{let t=setTimeout(()=>{n(e)},e.length?0:10);return()=>{clearTimeout(t)}},[e]),t}var YV=e=>{let{componentCls:t,motionDurationFast:n,motionEaseInOut:r}=e,i=`${t}-show-help`,a=`${t}-show-help-item`;return{[i]:{transition:`opacity ${n} ${r}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[a]:{overflow:`hidden`,transition:`${[`height`,`opacity`,`transform`].map(e=>`${e} ${n} ${r}`).join(`, `)} !important`,[`&${a}-appear, &${a}-enter`]:{transform:`translateY(-5px)`,opacity:0,"&-active":{transform:`translateY(0)`,opacity:1}},[`&${a}-leave-active`]:{transform:`translateY(-5px)`}}}}},XV=e=>({legend:{display:`block`,width:`100%`,marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:`inherit`,border:0,borderBottom:`${Y(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, input[type='radio']:focus, input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${Y(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:`block`,paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),ZV=(e,t)=>{let{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},QV=e=>{let{componentCls:t}=e;return{[t]:{...Jc(e),...XV(e),[`${t}-text`]:{display:`inline-block`,paddingInlineEnd:e.paddingSM},"&-small":{...ZV(e,e.controlHeightSM)},"&-large":{...ZV(e,e.controlHeightLG)}}}},$V=e=>{let{formItemCls:t,iconCls:n,rootPrefixCls:r,antCls:i,labelRequiredMarkColor:a,labelColor:o,labelFontSize:s,labelHeight:c,labelColonMarginInlineStart:l,labelColonMarginInlineEnd:u,itemMarginBottom:d}=e,[f]=ol(i,`grid`);return{[t]:{...Jc(e),marginBottom:d,verticalAlign:`top`,"&-with-help":{transition:`none`},[`&-hidden, + &-hidden${i}-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:c,color:o,fontSize:s,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:`top`},[`&${t}-required`]:{"&::before":{display:`inline-block`,marginInlineEnd:e.marginXXS,color:a,fontSize:e.fontSize,fontFamily:`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:l,marginInlineEnd:u},[`&${t}-no-colon::after`]:{content:`"\\a0"`}}},[`${t}-control`]:{[f(`display`)]:`flex`,flexDirection:`column`,flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:`100%`},"&-input":{position:`relative`,display:`flex`,alignItems:`center`,minHeight:e.controlHeight,"&-content":{flex:`auto`,maxWidth:`100%`,[`&:has(> ${i}-switch:only-child, > ${i}-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:Wh,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:`none`,"&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}}}},eH=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:`initial`,textAlign:`start`,"> label":{margin:0,"&::after":{visibility:`hidden`}}}),tH=e=>{let{antCls:t,formItemCls:n}=e;return{[`${n}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:`1 1 0`,minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:`unset`}},[`${t}-col-24${n}-label, + ${t}-col-xl-24${n}-label`]:eH(e)}}},nH=e=>{let{componentCls:t,formItemCls:n,inlineItemMarginBottom:r}=e;return{[`${t}-inline`]:{display:`flex`,flexWrap:`wrap`,[`${n}-inline`]:{flex:`none`,marginInlineEnd:e.margin,marginBottom:r,"&-row":{flexWrap:`nowrap`},[`> ${n}-label, + > ${n}-control`]:{display:`inline-block`,verticalAlign:`top`},[`> ${n}-label`]:{flex:`none`},[`${t}-text`]:{display:`inline-block`},[`${n}-has-feedback`]:{display:`inline-block`}}}}},rH=e=>{let{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${n} ${n}-label`]:eH(e),[`${t}:not(${t}-inline)`]:{[n]:{flexWrap:`wrap`,[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:`0 0 100%`,maxWidth:`100%`}}}}}},iH=e=>{let{componentCls:t,formItemCls:n,antCls:r}=e;return{[`${n}-vertical`]:{[`${n}-row`]:{flexDirection:`column`},[`${n}-label > label`]:{height:`auto`},[`${n}-control`]:{width:`100%`},[`${n}-label, ${r}-col-24${n}-label, - ${r}-col-xl-24${n}-label`]:rH(e)},[`@media (max-width: ${Y(e.screenXSMax)})`]:[oH(e),{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-xs-24${n}-label`]:rH(e)}}}],[`@media (max-width: ${Y(e.screenSMMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-sm-24${n}-label`]:rH(e)}}},[`@media (max-width: ${Y(e.screenMDMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-md-24${n}-label`]:rH(e)}}},[`@media (max-width: ${Y(e.screenLGMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-lg-24${n}-label`]:rH(e)}}}}},cH=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}),lH=(e,t)=>gs(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),uH=rl(`Form`,(e,{rootPrefixCls:t})=>{let n=lH(e,t);return[tH(n),nH(n),QV(n),iH(n),aH(n),sH(n),bh(n),Wh]},cH,{order:-1e3}),dH=[];function fH(e,t,n,r=0){return{key:typeof e==`string`?e:`${t}-${r}`,error:e,errorStatus:n}}var pH=({help:e,helpStatus:t,errors:n=dH,warnings:r=dH,className:i,fieldId:a,onVisibleChanged:o})=>{let{prefixCls:s}=S.useContext(xy),c=`${s}-item-explain`,l=bf(s),[u,d]=uH(s,l),f=S.useMemo(()=>Wm(s),[s]),p=ZV(n),m=ZV(r),h=S.useMemo(()=>fd(e)?[fH(e,`help`,t)]:[].concat(Zr(p.map((e,t)=>fH(e,`error`,`error`,t))),Zr(m.map((e,t)=>fH(e,`warning`,`warning`,t)))),[e,t,p,m]),g=S.useMemo(()=>{let e={};return h.forEach(({key:t})=>{e[t]=(e[t]||0)+1}),h.map((t,n)=>({...t,key:e[t.key]>1?`${t.key}-fallback-${n}`:t.key}))},[h]),_={};return a&&(_.id=`${a}_help`),S.createElement(Iu,{motionDeadline:f.motionDeadline,motionName:`${s}-show-help`,visible:!!g.length,onVisibleChanged:o},e=>{let{className:t,style:n}=e;return S.createElement(`div`,{..._,className:J(c,t,d,l,i,u),style:n},S.createElement(Fu,{keys:g,...Wm(s),motionName:`${s}-show-help-item`,component:!1},e=>{let{key:t,error:n,errorStatus:r,className:i,style:a}=e;return S.createElement(`div`,{key:t,className:J(i,{[`${c}-${r}`]:r}),style:a},n)}))})},mH=S.forwardRef((e,t)=>{let n=S.useContext(zp),{getPrefixCls:r,direction:i,requiredMark:a,colon:o,scrollToFirstError:s,className:c,style:l,styles:u,classNames:d,tooltip:f}=li(`form`),{prefixCls:p,className:m,rootClassName:h,size:g,disabled:_=n,form:v,colon:y,labelAlign:b,labelWrap:x,labelCol:C,wrapperCol:w,layout:T=`horizontal`,scrollToFirstError:E,requiredMark:D,onFinishFailed:O,name:k,style:A,feedbackIcons:j,variant:M,classNames:N,styles:P,tooltip:F,...I}=e,L=th(g),R=S.useContext(xf),z=S.useMemo(()=>D===void 0?a===void 0?!0:a:D,[D,a]),B=y??o,V={...f,...F},H=r(`form`,p),U=bf(H),[W,ee]=uH(H,U),te={...e,size:L,disabled:_,layout:T,colon:B,requiredMark:z},[ne,re]=Fd([d,N],[u,P],{props:te}),ie=J(H,`${H}-${T}`,{[`${H}-hide-required-mark`]:z===!1,[`${H}-rtl`]:i===`rtl`,[`${H}-large`]:L===`large`,[`${H}-small`]:L===`small`},ee,U,W,c,m,h,ne.root),[ae]=KI(v),{__INTERNAL__:G}=ae;G.name=k;let oe=S.useMemo(()=>({name:k,labelAlign:b,labelCol:C,labelWrap:x,wrapperCol:w,layout:T,colon:B,requiredMark:z,itemRef:G.itemRef,form:ae,feedbackIcons:j,tooltip:V,classNames:ne,styles:re}),[k,b,C,w,T,B,z,ae,j,ne,re,V]),K=S.useRef(null);S.useImperativeHandle(t,()=>({...ae,nativeElement:K.current?.nativeElement}));let se=(e,t)=>{if(e){let n={block:`nearest`};hd(e)&&(n={...n,...e}),ae.scrollToField(t,n)}},ce=e=>{if(O?.(e),e.errorFields.length){let t=e.errorFields[0].name;if(E!==void 0){se(E,t);return}s!==void 0&&se(s,t)}};return S.createElement(wy.Provider,{value:M},S.createElement(Bp,{disabled:_},S.createElement(Vp.Provider,{value:L},S.createElement(by,{validateMessages:R},S.createElement(vy.Provider,{value:oe},S.createElement(Cy,{status:!0},S.createElement(_y,{id:k,...I,name:k,onFinishFailed:ce,form:ae,ref:K,style:{...re?.root,...l,...A},className:ie})))))))});function hH(e){if(typeof e==`function`)return e;let t=Cr(e);return t.length<=1?t[0]:t}var gH=()=>{let{status:e,errors:t=[],warnings:n=[]}=S.useContext(Sy);return{status:e,errors:t,warnings:n}};gH.Context=Sy;function _H(e){let[t,n]=S.useState(e),r=S.useRef(null),i=S.useRef([]),a=S.useRef(!1);S.useEffect(()=>(a.current=!1,()=>{a.current=!0,ri.cancel(r.current),r.current=null}),[]);function o(e){a.current||(r.current===null&&(i.current=[],r.current=ri(()=>{r.current=null,n(e=>{let t=e;return i.current.forEach(e=>{t=e(t)}),t})})),i.current.push(e))}return[t,o]}var vH=()=>{let{itemRef:e}=S.useContext(vy),t=S.useRef({});function n(n,r){let i=r&&typeof r==`object`&&ir(r),a=n.join(`_`);return(t.current.name!==a||t.current.originRef!==i)&&(t.current.name=a,t.current.originRef=i,t.current.ref=$n(e(n),i)),t.current.ref}return n},yH=e=>{let{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${t}-control`]:{display:`flex`}}}},bH=al([`Form`,`item-item`],(e,{rootPrefixCls:t})=>yH(lH(e,t))),xH=24,SH=e=>{let{prefixCls:t,status:n,labelCol:r,wrapperCol:i,children:a,errors:o,warnings:s,_internalItemRender:c,extra:l,help:u,fieldId:d,marginBottom:f,onErrorVisibleChanged:p,label:m}=e,h=`${t}-item`,g=S.useContext(vy),{classNames:_,styles:v}=g,y=S.useMemo(()=>{let e={...i||g.wrapperCol||{}};return m===null&&!r&&!i&&g.labelCol&&[void 0].concat(Zr(UC)).forEach(t=>{let n=t?[t]:[],r=ar(g.labelCol,n),i=hd(r)?r:{},a=ar(e,n),o=hd(a)?a:{};`span`in i&&!(`offset`in o)&&i.span{let{labelCol:e,wrapperCol:t,...n}=g;return n},[g]),C=S.useRef(null),[w,T]=S.useState(0);zn(()=>{l&&C.current?T(C.current.clientHeight):T(0)},[l]);let E=S.createElement(`div`,{className:`${h}-control-input`},S.createElement(`div`,{className:J(`${h}-control-input-content`,_?.content),style:v?.content},a)),D=S.useMemo(()=>({prefixCls:t,status:n}),[t,n]),O=f!==null||o.length||s.length?S.createElement(xy.Provider,{value:D},S.createElement(pH,{fieldId:d,errors:o,warnings:s,help:u,helpStatus:n,className:`${h}-explain-connected`,onVisibleChanged:p})):null,k={};d&&(k.id=`${d}_extra`);let A=l?S.createElement(`div`,{...k,className:`${h}-extra`,ref:C},l):null,j=O||A?S.createElement(`div`,{className:`${h}-additional`,style:f?{minHeight:f+w}:{}},O,A):null,M=c&&c.mark===`pro_table_render`&&c.render?c.render(e,{input:E,errorList:O,extra:A}):S.createElement(S.Fragment,null,E,j);return S.createElement(vy.Provider,{value:x},S.createElement(fz,{...y,className:b},M),S.createElement(bH,{prefixCls:t}))},CH={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`};function wH(){return wH=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,wH({},e,{ref:t,icon:CH}))),EH=({prefixCls:e,label:t,htmlFor:n,labelCol:r,labelAlign:i,colon:a,required:o,requiredMark:s,tooltip:c,vertical:l})=>{let[u]=cd(`Form`),{labelAlign:d,labelCol:f,labelWrap:p,colon:m,classNames:h,styles:g,tooltip:_}=S.useContext(vy);if(!t)return null;let v=r||f||{},y=i||d,b=`${e}-item-label`,x=J(b,y===`left`&&`${b}-left`,v.className,{[`${b}-wrap`]:!!p}),C=t,w=a===!0||m!==!1&&a!==!1;w&&!l&&typeof t==`string`&&t.trim()&&(C=t.replace(/[:|:]\s*$/,``));let T=XV(c,_);if(T){let t=S.createElement(Aw,{...T},S.createElement(`span`,{className:`${e}-item-tooltip`,onClick:e=>{e.preventDefault()},tabIndex:-1},T.icon||T.children||S.createElement(TH,null)));C=S.createElement(S.Fragment,null,C,t)}let E=s===`optional`,D=typeof s==`function`,O=s===!1;D?C=s(C,{required:!!o}):E&&!o&&(C=S.createElement(S.Fragment,null,C,S.createElement(`span`,{className:`${e}-item-optional`,title:``},u?.optional||td.Form?.optional)));let k;O?k=`hidden`:(E||D)&&(k=`optional`);let A=J(h?.label,{[`${e}-item-required`]:o,[`${e}-item-required-mark-${k}`]:k,[`${e}-item-no-colon`]:!w});return S.createElement(fz,{...v,className:x},S.createElement(`label`,{htmlFor:n,className:A,style:g?.label,title:typeof t==`string`?t:``},C))},DH={success:Ml,warning:Vl,error:Fl,validating:xm};function OH({children:e,errors:t,warnings:n,hasFeedback:r,validateStatus:i,prefixCls:a,meta:o,noStyle:s,name:c}){let l=`${a}-item`,{feedbackIcons:u}=S.useContext(vy),d=UI(t,n,o,null,!!r,i),{isFormItemInput:f,status:p,hasFeedback:m,feedbackIcon:h,name:g}=S.useContext(Sy),_=S.useMemo(()=>{let e;if(r){let i=r!==!0&&r.icons||u,a=d&&i?.({status:d,errors:t,warnings:n})?.[d],o=d?DH[d]:null;e=a!==!1&&o?S.createElement(`span`,{className:J(`${l}-feedback-icon`,`${l}-feedback-icon-${d}`)},a||S.createElement(o,null)):null}let i={status:d||``,errors:t,warnings:n,hasFeedback:!!r,feedbackIcon:e,isFormItemInput:!0,name:c};return s&&(i.status=(d??p)||``,i.isFormItemInput=f,i.hasFeedback=!!(r??m),i.feedbackIcon=r===void 0?h:i.feedbackIcon,i.name=c??g),i},[d,r,s,f,p]);return S.createElement(Sy.Provider,{value:_},e)}function kH(e){let{prefixCls:t,className:n,rootClassName:r,style:i,help:a,errors:o,warnings:s,validateStatus:c,meta:l,hasFeedback:u,hidden:d,children:f,fieldId:p,required:m,isRequired:h,onSubItemMetaChange:g,layout:_,name:v,...y}=e,b=`${t}-item`,{requiredMark:x,layout:C}=S.useContext(vy),w=_||C,T=w===`vertical`,E=S.useRef(null),D=ZV(o),O=ZV(s),k=fd(a),A=!!(k||o.length||s.length),j=!!E.current&&cp(E.current),[M,N]=S.useState(null);zn(()=>{if(A&&E.current){let e=getComputedStyle(E.current);N(Number.parseInt(e.marginBottom,10))}},[A,j]);let P=e=>{e||N(null)},F=((e=!1)=>UI(e?D:l.errors,e?O:l.warnings,l,``,!!u,c))(),I=J(b,n,r,{[`${b}-with-help`]:k||D.length||O.length,[`${b}-has-feedback`]:F&&u,[`${b}-has-success`]:F===`success`,[`${b}-has-warning`]:F===`warning`,[`${b}-has-error`]:F===`error`,[`${b}-is-validating`]:F===`validating`,[`${b}-hidden`]:d,[`${b}-${w}`]:w});return S.createElement(`div`,{className:I,style:i,ref:E},S.createElement(hz,{className:`${b}-row`,...Sr(y,`_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`.split(`.`))},S.createElement(EH,{htmlFor:p,...e,requiredMark:x,required:m??h,prefixCls:t,vertical:T}),S.createElement(SH,{...e,...l,errors:D,warnings:O,prefixCls:t,status:F,help:a,marginBottom:M,onErrorVisibleChanged:P},S.createElement(yy.Provider,{value:g},S.createElement(OH,{prefixCls:t,meta:l,errors:l.errors,warnings:l.warnings,hasFeedback:u,validateStatus:F,name:v},f)))),!!M&&S.createElement(`div`,{className:`${b}-margin-offset`,style:{marginBottom:-M}}))}var AH=`__SPLIT__`;function jH(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>{let r=e[n],i=t[n];return r===i||typeof r==`function`||typeof i==`function`})}var MH=S.memo(e=>e.children,(e,t)=>jH(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every((e,n)=>e===t.childProps[n]));function NH(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function PH(e){let{name:t,noStyle:n,className:r,dependencies:i,prefixCls:a,shouldUpdate:o,rules:s,children:c,required:l,label:u,messageVariables:d,trigger:f=`onChange`,validateTrigger:p,hidden:m,help:h,layout:g}=e,{getPrefixCls:_}=S.useContext(oi),{name:v}=S.useContext(vy),y=hH(c),b=typeof y==`function`,x=S.useContext(yy),{validateTrigger:C}=S.useContext(F_),w=fd(p)?p:C,T=fd(t),E=_(`form`,a),D=bf(E),[O,k]=uH(E,D);Dr(`Form.Item`);let A=S.useContext(I_),j=S.useRef(null),[M,N]=_H({}),[P,F]=Vn(()=>NH()),I=e=>{let t=A?.getKey(e.name);if(F(e.destroy?NH():e,!0),n&&h!==!1&&x){let n=e.name;if(e.destroy)n=j.current||n;else if(t!==void 0){let[e,r]=t;n=[e].concat(Zr(r)),j.current=n}x(e,n)}},L=(e,t)=>{N(n=>{let r={...n},i=[].concat(Zr(e.name.slice(0,-1)),Zr(t)).join(AH);return e.destroy?delete r[i]:r[i]=e,r})},[R,z]=S.useMemo(()=>{let e=Zr(P.errors),t=Zr(P.warnings);return Object.values(M).forEach(n=>{e.push.apply(e,Zr(n.errors||[])),t.push.apply(t,Zr(n.warnings||[]))}),[e,t]},[M,P.errors,P.warnings]),B=vH();function V(i,a,o){return n&&!m?S.createElement(OH,{prefixCls:E,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:P,errors:R,warnings:z,noStyle:!0,name:t},i):S.createElement(kH,{key:`row`,...e,className:J(r,k,D,O),prefixCls:E,fieldId:a,isRequired:o,errors:R,warnings:z,meta:P,onSubItemMetaChange:L,layout:g,name:t},i)}if(!T&&!b&&!i)return V(y);let H={};return typeof u==`string`?H.label=u:t&&(H.label=String(t)),d&&(H={...H,...d}),S.createElement(ry,{...e,messageVariables:H,trigger:f,validateTrigger:w,onMetaChange:I},(n,r,a)=>{let c=VI(t).length&&r?r.name:[],u=HI(c,v),d=l===void 0?s?.some(e=>{if(hd(e)&&e.required&&!e.warningOnly)return!0;if(typeof e==`function`){let t=e(a);return t?.required&&!t?.warningOnly}return!1}):l,p={...n},m=null;if(Array.isArray(y)&&T)m=y;else if(!(b&&(!(o||i)||T))&&!(i&&!b&&!T))if(S.isValidElement(y)){let t={...y.props,...p};if(t.id||=u,h||R.length>0||z.length>0||e.extra){let n=[];(h||R.length>0)&&n.push(`${u}_help`),e.extra&&n.push(`${u}_extra`),t[`aria-describedby`]=n.join(` `)}R.length>0&&(t[`aria-invalid`]=`true`),d&&(t[`aria-required`]=`true`),tr(y)&&(t.ref=B(c,y)),new Set([].concat(Zr(VI(f)),Zr(VI(w)))).forEach(e=>{t[e]=(...t)=>{p[e]?.(...t),y.props[e]?.(...t)}});let n=[t[`aria-required`],t[`aria-invalid`],t[`aria-describedby`]];m=S.createElement(MH,{control:p,update:y,childProps:n},Pp(y,t))}else m=b&&(o||i)&&!T?y(a):y;return V(m,u,d)})}var FH=PH;FH.useStatus=gH;var IH=({prefixCls:e,children:t,...n})=>{let{getPrefixCls:r}=S.useContext(oi),i=r(`form`,e),a=S.useMemo(()=>({prefixCls:i,status:`error`}),[i]);return S.createElement(iy,{...n},(e,n,r)=>S.createElement(xy.Provider,{value:a},t(e.map(e=>({...e,fieldKey:e.key})),n,{errors:r.errors,warnings:r.warnings})))};function LH(){let{form:e}=S.useContext(vy);return e}var X=mH;X.Item=FH,X.List=IH,X.ErrorList=pH,X.useForm=KI,X.useFormInstance=LH,X.useWatch=gy,X.Provider=by;var RH=S.createContext(null);function zH(e){return new Promise(t=>{if(!e){t(!1);return}let n=document.createElement(`img`);n.onerror=()=>t(!1),n.onload=()=>t(!0),n.src=e})}function BH(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}var VH={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function HH(e,t,n,r){let i=(0,S.useRef)(null),a=(0,S.useRef)([]),[o,s]=(0,S.useState)(VH),c=e=>{s(VH),Ti(VH,o)||r?.({transform:VH,action:e})},l=(e,t)=>{i.current===null&&(a.current=[],i.current=ri(()=>{s(e=>{let n=e;return a.current.forEach(e=>{n={...n,...e}}),i.current=null,r?.({transform:n,action:t}),n})})),a.current.push({...o,...e})};return{transform:o,resetTransform:c,updateTransform:l,dispatchZoomChange:(r,i,a,s,c)=>{let{width:u,height:d,offsetWidth:f,offsetHeight:p,offsetLeft:m,offsetTop:h}=e.current,g=r,_=o.scale*r;_>n?(_=n,g=n/o.scale):_r){if(t>0)return{[e]:a};if(t<0&&ir)return{[e]:t<0?a:-a};return{}}function WH(e,t,n,r){let{width:i,height:a}=BH(),o=null;return e<=i&&t<=a?o={x:0,y:0}:(e>i||t>a)&&(o={...UH(`x`,n,e,i),...UH(`y`,r,t,a)}),o}function GH(e,t,n,r,i,a,o){let{rotate:s,scale:c,x:l,y:u}=i,[d,f]=(0,S.useState)(!1),p=(0,S.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),m=e=>{!t||e.button!==0||(e.preventDefault(),e.stopPropagation(),p.current={diffX:e.pageX-l,diffY:e.pageY-u,transformX:l,transformY:u},f(!0))},h=e=>{n&&d&&a({x:e.pageX-p.current.diffX,y:e.pageY-p.current.diffY},`move`)},g=()=>{if(n&&d){f(!1);let{transformX:t,transformY:n}=p.current;if(!(l!==t&&u!==n))return;let r=e.current.offsetWidth*c,i=e.current.offsetHeight*c,{left:o,top:d}=e.current.getBoundingClientRect(),m=s%180!=0,h=WH(m?i:r,m?r:i,o,d);h&&a({...h},`dragRebound`)}};return(0,S.useEffect)(()=>{if(t){window.addEventListener(`mouseup`,g,!1),window.addEventListener(`mousemove`,h,!1);try{window.top!==window.self&&(window.top.addEventListener(`mouseup`,g,!1),window.top.addEventListener(`mousemove`,h,!1))}catch(e){`${e}`}}return()=>{window.removeEventListener(`mouseup`,g),window.removeEventListener(`mousemove`,h);try{window.top?.removeEventListener(`mouseup`,g),window.top?.removeEventListener(`mousemove`,h)}catch{}}},[n,d,l,u,s,t]),{isMoving:d,onMouseDown:m,onMouseMove:h,onMouseUp:g,onWheel:e=>{if(!n||e.deltaY==0)return;let t=Math.abs(e.deltaY/100),i=1+Math.min(t,1)*r;e.deltaY>0&&(i=1/i),o(i,`wheel`,e.clientX,e.clientY)}}}function KH({src:e,isCustomPlaceholder:t,fallback:n}){let[r,i]=(0,S.useState)(t?`loading`:`normal`),a=(0,S.useRef)(!1),o=r===`error`;(0,S.useEffect)(()=>{let t=!0;return zH(e).then(e=>{!e&&t&&i(`error`)}),()=>{t=!1}},[e]),(0,S.useEffect)(()=>{t&&!a.current?i(`loading`):o&&i(`normal`)},[e]);let s=()=>{i(`normal`)};return[e=>{a.current=!1,r===`loading`&&e?.complete&&(e.naturalWidth||e.naturalHeight)&&(a.current=!0,s())},o&&n?{src:n}:{onLoad:s,src:e},r]}function qH(e,t){let n=e.x-t.x,r=e.y-t.y;return Math.hypot(n,r)}function JH(e,t,n,r){let i=qH(e,n),a=qH(t,r);if(i===0&&a===0)return[e.x,e.y];let o=i/(i+a);return[e.x+o*(t.x-e.x),e.y+o*(t.y-e.y)]}function YH(e,t,n,r,i,a,o){let{rotate:s,scale:c,x:l,y:u}=i,[d,f]=(0,S.useState)(!1),p=(0,S.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:`none`}),m=e=>{p.current={...p.current,...e}};return(0,S.useEffect)(()=>{let e=e=>{e.preventDefault()};return n&&t&&window.addEventListener(`touchmove`,e,{passive:!1}),()=>{window.removeEventListener(`touchmove`,e)}},[n,t]),{isTouching:d,onTouchStart:e=>{if(!t)return;e.stopPropagation(),f(!0);let{touches:n=[]}=e;n.length>1?m({point1:{x:n[0].clientX,y:n[0].clientY},point2:{x:n[1].clientX,y:n[1].clientY},eventType:`touchZoom`}):m({point1:{x:n[0].clientX-l,y:n[0].clientY-u},eventType:`move`})},onTouchMove:e=>{let{touches:t=[]}=e,{point1:n,point2:r,eventType:i}=p.current;if(t.length>1&&i===`touchZoom`){let e={x:t[0].clientX,y:t[0].clientY},i={x:t[1].clientX,y:t[1].clientY},[a,s]=JH(n,r,e,i);o(qH(e,i)/qH(n,r),`touchZoom`,a,s,!0),m({point1:e,point2:i,eventType:`touchZoom`})}else i===`move`&&(a({x:t[0].clientX-n.x,y:t[0].clientY-n.y},`move`),m({eventType:`move`}))},onTouchEnd:()=>{if(!n)return;if(d&&f(!1),m({eventType:`none`}),r>c)return a({x:0,y:0,scale:r},`touchZoom`);let t=e.current.offsetWidth*c,i=e.current.offsetHeight*c,{left:o,top:l}=e.current.getBoundingClientRect(),u=s%180!=0,p=WH(u?i:t,u?t:i,o,l);p&&a({...p},`dragRebound`)}}}function XH(e){let{prefixCls:t,icon:n,onClick:r,className:i,style:a}=e;return S.createElement(`button`,{className:J(`${t}-close`,i),style:a,onClick:r},n)}function ZH(e){let{prefixCls:t,showProgress:n,current:r,count:i,showSwitch:a,classNames:o,styles:s,icons:c,image:l,transform:u,countRender:d,actionsRender:f,scale:p,minScale:m,maxScale:h,onActive:g,onFlipY:_,onFlipX:v,onRotateLeft:y,onRotateRight:b,onZoomOut:x,onZoomIn:C,onClose:w,onReset:T}=e,{left:E,right:D,prev:O,next:k,flipY:A,flipX:j,rotateLeft:M,rotateRight:N,zoomOut:P,zoomIn:F}=c,I=n&&S.createElement(`div`,{className:`${t}-progress`},d?d(r+1,i):S.createElement(`bdi`,null,`${r+1} / ${i}`)),L=`${t}-actions-action`,R=({type:e,disabled:t,onClick:n,icon:r})=>S.createElement(`button`,{type:`button`,key:e,className:J(L,`${L}-${e}`,{[`${L}-disabled`]:!!t}),onClick:n,disabled:!!t,"aria-label":e},r),z=a?R({icon:O??E,onClick:()=>g(-1),type:`prev`,disabled:r===0}):void 0,B=a?R({icon:k??D,onClick:()=>g(1),type:`next`,disabled:r===i-1}):void 0,V=R({icon:A,onClick:_,type:`flipY`}),H=R({icon:j,onClick:v,type:`flipX`}),U=R({icon:M,onClick:y,type:`rotateLeft`}),W=R({icon:N,onClick:b,type:`rotateRight`}),ee=R({icon:P,onClick:x,type:`zoomOut`,disabled:p<=m}),te=R({icon:F,onClick:C,type:`zoomIn`,disabled:p===h}),ne=S.createElement(`div`,{className:J(`${t}-actions`,o.actions),style:s.actions},V,H,U,W,ee,te);return S.createElement(`div`,{className:J(`${t}-footer`,o.footer),style:s.footer},I,f?f(ne,{icons:{prevIcon:z,nextIcon:B,flipYIcon:V,flipXIcon:H,rotateLeftIcon:U,rotateRightIcon:W,zoomOutIcon:ee,zoomInIcon:te},actions:{onActive:g,onFlipY:_,onFlipX:v,onRotateLeft:y,onRotateRight:b,onZoomOut:x,onZoomIn:C,onReset:T,onClose:w},transform:u,current:r,total:i,image:l}):ne)}function QH(e){let{prefixCls:t,onActive:n,current:r,count:i,icons:{left:a,right:o,prev:s,next:c}}=e,l=`${t}-switch`,u=r===0,d=r===i-1;return S.createElement(S.Fragment,null,S.createElement(`button`,{className:J(l,`${l}-prev`,{[`${l}-disabled`]:u}),onClick:()=>n(-1),disabled:u},s??a),S.createElement(`button`,{type:`button`,className:J(l,`${l}-next`,{[`${l}-disabled`]:d}),onClick:()=>n(1),disabled:d},c??o))}function $H(){return $H=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let[i,a]=KH({src:t,fallback:e});return S.createElement(`img`,$H({ref:e=>{n.current=e,i(e)}},r,a))},tU=e=>{let{prefixCls:t,rootClassName:n,src:r,alt:i,imageInfo:a,fallback:o,movable:s=!0,onClose:c,open:l,afterOpenChange:u,maskClosable:d=!0,icons:f={},closeIcon:p,getContainer:m,current:h=0,count:g=1,countRender:_,scaleStep:v=.5,minScale:y=1,maxScale:b=50,motionName:x=`fade`,imageRender:C,imgCommonProps:w,actionsRender:T,onTransform:E,onChange:D,classNames:O={},styles:k={},mousePosition:A,zIndex:j,focusTrap:M=!0}=e,N=(0,S.useRef)(),P=(0,S.useRef)(null),F=(0,S.useRef)(null),I=(0,S.useContext)(RH),L=I&&g>1,R=I&&g>=1,[z,B]=(0,S.useState)(!0),{transform:V,resetTransform:H,updateTransform:U,dispatchZoomChange:W}=HH(N,y,b,E),{isMoving:ee,onMouseDown:te,onWheel:ne}=GH(N,s,l,v,V,U,W),{isTouching:re,onTouchStart:ie,onTouchMove:ae,onTouchEnd:G}=YH(N,s,l,y,V,U,W),{rotate:oe,scale:K}=V;(0,S.useEffect)(()=>{z||B(!0)},[z]),(0,S.useEffect)(()=>{l||H(`close`)},[l]);let se=S.createElement(eU,$H({},w,{width:e.width,height:e.height,imgRef:N,className:`${t}-img`,alt:i,style:{transform:`translate3d(${V.x}px, ${V.y}px, 0) scale3d(${V.flipX?`-`:``}${K}, ${V.flipY?`-`:``}${K}, 1) rotate(${oe}deg)`,transitionDuration:(!z||re)&&`0s`},fallback:o,src:r,onWheel:ne,onMouseDown:te,onDoubleClick:e=>{l&&(K===1?W(1+v,`doubleClick`,e.clientX,e.clientY):U({x:0,y:0,scale:1},`doubleClick`))},onTouchStart:ie,onTouchMove:ae,onTouchEnd:G,onTouchCancel:G})),ce={url:r,alt:i,...a},q=()=>{W(1+v,`zoomIn`)},le=()=>{W(1/(1+v),`zoomOut`)},ue=()=>{U({rotate:oe+90},`rotateRight`)},de=()=>{U({rotate:oe-90},`rotateLeft`)},fe=()=>{U({flipX:!V.flipX},`flipX`)},pe=()=>{U({flipY:!V.flipY},`flipY`)},me=()=>{H(`reset`)},he=e=>{let t=h+e;t>=0&&t<=g-1&&(B(!1),H(e<0?`prev`:`next`),D?.(t,h))},ge=In(e=>{if(l){let{keyCode:t}=e;L&&(t===om.LEFT?he(-1):t===om.RIGHT&&he(1))}});(0,S.useEffect)(()=>{if(l)return window.addEventListener(`keydown`,ge),()=>{window.removeEventListener(`keydown`,ge)}},[l]);let[_e,ve]=(0,S.useState)(!1);S.useEffect(()=>{l&&ve(!0)},[l]);let ye=e=>{e||(ve(!1),F.current?.focus?.(),F.current=null),u?.(e)},[be,xe]=(0,S.useState)(!1);zn(()=>{l&&xe(!0)},[l]);let Se=({top:e})=>{e&&c?.()};zn(()=>{l&&(F.current=document.activeElement)},[l]),x_(M&&l&&be,()=>P.current);let Ce={...k.body};return A&&(Ce.transformOrigin=`${A.x}px ${A.y}px`),S.createElement(Xf,{open:be&&l,autoDestroy:!1,getContainer:m,autoLock:_e,onEsc:Se},S.createElement(Iu,{motionName:x,visible:be&&l,motionAppear:!0,motionEnter:!0,motionLeave:!0,onVisibleChanged:ye},({className:e,style:r})=>{let a={...k.root,...r};return j&&(a.zIndex=j),S.createElement(`div`,{ref:P,className:J(t,n,O.root,e,{[`${t}-movable`]:s,[`${t}-moving`]:ee}),style:a,role:`dialog`,"aria-modal":`true`,"aria-label":i,tabIndex:-1},S.createElement(`div`,{className:J(`${t}-mask`,O.mask),style:k.mask,onClick:d?c:void 0}),S.createElement(`div`,{className:J(`${t}-body`,O.body),style:Ce},C?C(se,{transform:V,image:ce,...I?{current:h}:{}}):se),p!==!1&&p!==null&&S.createElement(XH,{prefixCls:t,icon:p===!0?f.close:p||f.close,onClick:c,className:O.close,style:k.close}),L&&S.createElement(QH,{prefixCls:t,current:h,count:g,icons:f,onActive:he}),S.createElement(ZH,{prefixCls:t,showProgress:R,current:h,count:g,showSwitch:L,classNames:O,styles:k,image:ce,transform:V,icons:f,countRender:_,actionsRender:T,scale:K,minScale:y,maxScale:b,onActive:he,onFlipY:pe,onFlipX:fe,onRotateLeft:de,onRotateRight:ue,onZoomOut:le,onZoomIn:q,onClose:c,onReset:me}))}))},nU=[`crossOrigin`,`decoding`,`draggable`,`loading`,`referrerPolicy`,`sizes`,`srcSet`,`useMap`,`alt`,`fetchPriority`];function rU(e){let[t,n]=S.useState({}),r=S.useCallback((e,t)=>(n(n=>({...n,[e]:t})),()=>{n(t=>{let n={...t};return delete n[e],n})}),[]);return[S.useMemo(()=>e?e.map(e=>{if(typeof e==`string`)return{data:{src:e}};let t={};return Object.keys(e).forEach(n=>{[`src`,...nU].includes(n)&&(t[n]=e[n])}),{data:t}}):Object.keys(t).reduce((e,n)=>{let{canPreview:r,data:i}=t[n];return r&&e.push({data:i,id:n}),e},[]),[e,t]),r,!!e]}function iU(){return iU=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{open:c,onOpenChange:l,current:u,onChange:d,...f}=o&&typeof o==`object`?o:{},[p,m,h]=rU(a),[g,_]=Hn(0,u),[v,y]=(0,S.useState)(!1),{src:b,...x}=p[g]?.data||{},[C,w]=Hn(!!c,c),T=In(e=>{w(e),e!==C&&l?.(e,{current:g})}),[E,D]=(0,S.useState)(null),O=S.useCallback((e,t,n,r)=>{let i=h?p.findIndex(e=>e.data.src===t):p.findIndex(t=>t.id===e);_(i<0?0:i),T(!0),D({x:n,y:r}),y(!0)},[p,h]);S.useEffect(()=>{C?v||_(0):y(!1)},[C]);let k=(e,t)=>{_(e),d?.(e,t)},A=()=>{T(!1),D(null)},j=S.useMemo(()=>({register:m,onPreview:O}),[m,O]);return S.createElement(RH.Provider,{value:j},r,S.createElement(tU,iU({"aria-hidden":!C,open:C,prefixCls:e,onClose:A,mousePosition:E,imgCommonProps:x,src:b,fallback:s,icons:i,current:g,count:p.length,onChange:k},f,{classNames:t?.popup,styles:n?.popup})))},oU=0;function sU(e,t){let[n]=S.useState(()=>(oU+=1,String(oU))),r=S.useContext(RH),i={data:t,canPreview:e};return S.useEffect(()=>{if(r)return r.register(n,i)},[]),S.useEffect(()=>{r&&r.register(n,i)},[e,t]),n}function cU(){return cU=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t=`rc-image`,previewPrefixCls:n=`${t}-preview`,rootClassName:r,className:i,style:a,classNames:o={},styles:s={},width:c,height:l,src:u,alt:d,placeholder:f,fallback:p,preview:m=!0,onClick:h,onError:g,onKeyDown:_,...v}=e,y=(0,S.useContext)(RH),b=!!m,{src:x,open:C,onOpenChange:w,cover:T,rootClassName:E,...D}=m&&typeof m==`object`?m:{},O=typeof T==`object`&&T.placement&&T.placement||`center`,k=typeof T==`object`&&T.coverNode?T.coverNode:T,[A,j]=Hn(!!C,C),[M,N]=(0,S.useState)(null),P=e=>{j(e),w?.(e)},F=()=>{P(!1)},I=f&&f!==!0,L=x??u,[R,z,B]=KH({src:u,isCustomPlaceholder:I,fallback:p}),V=(0,S.useMemo)(()=>{let t={};return nU.forEach(n=>{e[n]!==void 0&&(t[n]=e[n])}),t},nU.map(t=>e[t])),H=sU(b,(0,S.useMemo)(()=>({...V,src:L}),[L,V])),U=e=>{let t=e.target.getBoundingClientRect(),n=t.x+t.width/2,r=t.y+t.height/2;y?y.onPreview(H,L,n,r):(N({x:n,y:r}),P(!0)),h?.(e)},W=e=>{if(_?.(e),b&&(e.key===`Enter`||e.key===` `)){e.preventDefault();let t=e.target.getBoundingClientRect(),n=t.x+t.width/2,r=t.y+t.height/2;y?y.onPreview(H,L,n,r):(N({x:n,y:r}),P(!0))}};return S.createElement(S.Fragment,null,S.createElement(`div`,cU({},v,{className:J(t,r,o.root,{[`${t}-error`]:B===`error`}),onClick:b?U:h,role:b?`button`:v.role,tabIndex:b&&v.tabIndex==null?0:v.tabIndex,"aria-label":b?v[`aria-label`]??d:v[`aria-label`],onKeyDown:W,style:{width:c,height:l,...s.root}}),S.createElement(`img`,cU({},V,{className:J(`${t}-img`,{[`${t}-img-placeholder`]:f===!0},o.image,i),style:{height:l,...s.image,...a},ref:R},z,{width:c,height:l,onError:g})),B===`loading`&&S.createElement(`div`,{"aria-hidden":`true`,className:`${t}-placeholder`},f),T!==!1&&b&&S.createElement(`div`,{className:J(`${t}-cover`,o.cover,`${t}-cover-${O}`),style:{display:a?.display===`none`?`none`:void 0,...s.cover}},k)),!y&&b&&S.createElement(tU,cU({"aria-hidden":!A,open:A,prefixCls:n,onClose:F,mousePosition:M,src:L,alt:d,imageInfo:{width:c,height:l},fallback:p,imgCommonProps:V},D,{classNames:o?.popup,styles:s?.popup,rootClassName:J(E,r)})))};lU.PreviewGroup=aU;var uU=lU,dU=(e,t,n,r,i,a,o)=>{let[s]=Yd(`ImagePreview`,e?.zIndex),[c,l]=Od(e?.mask,t?.mask,`${n}-preview`);return S.useMemo(()=>{if(!e)return e;let{cover:u,getContainer:d,closeIcon:f,rootClassName:p}=e,{closeIcon:m}=t??{};return{motionName:Gm(`${n}-preview`,`fade`),...e,...o?{cover:u??o}:{},icons:a,getContainer:d??i,zIndex:s,closeIcon:f??m,rootClassName:J(r,p),mask:c,blurClassName:l.mask}},[e,t,n,r,i,o,a,s,c,l])};function fU(e){return(0,S.isValidElement)(e)?[e,void 0]:typeof e==`boolean`||hd(e)?[void 0,e]:[void 0,void 0]}function pU(e){let t=(0,S.useMemo)(()=>typeof e==`boolean`?e?{}:null:hd(e)?e:{},[e]);return(0,S.useMemo)(()=>{if(!t)return[t,``,``];let{open:e,onOpenChange:n,cover:r,actionsRender:i,visible:a,onVisibleChange:o,rootClassName:s,maskClassName:c,mask:l,forceRender:u,destroyOnClose:d,toolbarRender:f,...p}=t,m;n?m=n:o&&(m=(e,t)=>{let{current:n}=t||{};n===void 0?o(e,!e):o(e,!e,n)});let[h,g]=fU(l);return[{...p,open:e??a,onOpenChange:m,cover:r??h,mask:g,actionsRender:i??f},s,c]},[t])}var mU={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z`}},{tag:`path`,attrs:{d:`M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z`}}]},name:`rotate-left`,theme:`outlined`};function hU(){return hU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,hU({},e,{ref:t,icon:mU}))),_U={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z`}},{tag:`path`,attrs:{d:`M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z`}}]},name:`rotate-right`,theme:`outlined`};function vU(){return vU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,vU({},e,{ref:t,icon:_U}))),bU={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`swap`,theme:`outlined`};function xU(){return xU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,xU({},e,{ref:t,icon:bU}))),CU={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z`}}]},name:`zoom-in`,theme:`outlined`};function wU(){return wU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,wU({},e,{ref:t,icon:CU}))),EU={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z`}}]},name:`zoom-out`,theme:`outlined`};function DU(){return DU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,DU({},e,{ref:t,icon:EU}))),kU=e=>({position:e||`absolute`,inset:0}),AU=e=>{let{componentCls:t,motionDurationSlow:n,colorTextLightSolid:r}=e;return{[t]:{[`${t}-cover`]:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,color:r,background:new Rs(`#000`).setA(.3).toRgbString(),cursor:`pointer`,opacity:0,transition:`opacity ${n}`},"&:hover, &:focus-visible":{[`${t}-cover`]:{opacity:1}},[`${t}-cover-top`]:{inset:`0 0 auto 0`,justifyContent:`center`},[`${t}-cover-bottom`]:{inset:`auto 0 0 0`,justifyContent:`center`}}}},jU=e=>{let{motionEaseOut:t,previewCls:n,motionDurationSlow:r,componentCls:i,colorBgMask:a,marginXL:o,marginSM:s,margin:c,colorTextLightSolid:l,paddingSM:u,paddingLG:d,previewOperationHoverColor:f,previewOperationColorDisabled:p,previewOperationSize:m,zIndexPopup:h}=e,g=new Rs(a).setA(.1),_=g.clone().setA(.2),v={position:`absolute`,color:l,backgroundColor:g.toRgbString(),borderRadius:`50%`,padding:u,outline:0,border:0,cursor:`pointer`,transition:`all ${r}`,display:`flex`,fontSize:m,"&:hover":{backgroundColor:_.toRgbString()},"&:active":{backgroundColor:g.toRgbString()},"&:focus-visible":Zc(e)};return{[`${i}-preview`]:{textAlign:`center`,inset:0,position:`fixed`,userSelect:`none`,zIndex:h,[`${n}-mask`]:{inset:0,position:`absolute`,background:a,backdropFilter:`blur(0px)`,transition:`backdrop-filter ${r}`,[`&${i}-preview-mask-blur`]:{backdropFilter:`blur(4px)`},[`&${i}-preview-mask-hidden`]:{display:`none`}},[`${n}-body`]:{...kU(),"pointer-events":`none`,display:`flex`,alignItems:`center`,justifyContent:`center`,"> *":{pointerEvents:`auto`}},[`${n}-img`]:{maxWidth:`100%`,maxHeight:`70%`,verticalAlign:`middle`,transform:`scale3d(1, 1, 1)`,transition:`transform ${r} ${t} 0s`},[`&-movable ${n}-img`]:{cursor:`grab`},[`&-moving ${n}-img`]:{cursor:`grabbing`},[`${n}-close`]:{...v,top:s,insetInlineEnd:s},[`${n}-switch`]:{...v,top:`50%`,transform:`translateY(-50%)`,"&-disabled":{"&, &:hover, &:active":{color:p,background:`transparent`,cursor:`not-allowed`}},"&-prev":{insetInlineStart:s},"&-next":{insetInlineEnd:s}},[`${n}-footer`]:{position:`absolute`,bottom:o,left:{_skip_check_:!0,value:`50%`},display:`flex`,flexDirection:`column`,alignItems:`center`,color:e.previewOperationColor,transform:`translateX(-50%)`,gap:c},[`${n}-actions`]:{display:`flex`,gap:u,padding:`0 ${Y(d)}`,backgroundColor:g.toRgbString(),borderRadius:100,fontSize:m,"&-action":{color:`inherit`,background:`transparent`,border:0,font:`inherit`,padding:u,cursor:`pointer`,transition:`all ${r}`,display:`flex`,[`&:not(${n}-actions-action-disabled):hover`]:{color:f},"&:focus-visible":Zc(e),"&-disabled":{color:p,cursor:`not-allowed`}}}}}},MU=e=>{let{componentCls:t}=e;return{[t]:{position:`relative`,display:`inline-block`,...Qc(e),[`${t}-img`]:{width:`100%`,height:`auto`,verticalAlign:`middle`},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:`url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')`,backgroundRepeat:`no-repeat`,backgroundPosition:`center center`,backgroundSize:`30%`},[`${t}-placeholder`]:{...kU()}}}},NU=e=>{let{previewCls:t,motionDurationSlow:n}=e;return{[t]:{"&-fade":{transition:`opacity ${n}`,"&-enter, &-appear":{opacity:0,[`${t}-body`]:{transform:`scale(0)`},"&-active":{opacity:1,[`${t}-body`]:{transform:`scale(1)`,transition:`transform ${n}`}}},"&-leave":{opacity:1,"&-active":{opacity:0,[`${t}-body`]:{transform:`scale(0)`,transition:`transform ${n}`}}}}}}},PU=rl(`Image`,e=>{let t=gs(e,{previewCls:`${e.componentCls}-preview`,imagePreviewSwitchSize:e.controlHeightLG});return[MU(t),AU(t),jU(t),NU(t)]},e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new Rs(e.colorTextLightSolid).setA(.65).toRgbString(),previewOperationHoverColor:new Rs(e.colorTextLightSolid).setA(.85).toRgbString(),previewOperationColorDisabled:new Rs(e.colorTextLightSolid).setA(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5})),FU={rotateLeft:S.createElement(gU,null),rotateRight:S.createElement(yU,null),zoomIn:S.createElement(TU,null),zoomOut:S.createElement(OU,null),close:S.createElement(Rl,null),left:S.createElement(Ww,null),right:S.createElement(mg,null),flipX:S.createElement(SU,null),flipY:S.createElement(SU,{rotate:90})},IU=({previewPrefixCls:e,preview:t,classNames:n,styles:r,...i})=>{let{getPrefixCls:a,getPopupContainer:o,direction:s,preview:c,classNames:l,styles:u}=li(`image`),d=a(`image`,e),f=`${d}-preview`,p=bf(d),[m,h]=PU(d,p),g=J(m,h,p),[_,v,y]=pU(t),[b,x,C]=pU(c),w=S.useMemo(()=>({...FU,left:s===`rtl`?S.createElement(mg,null):S.createElement(Ww,null),right:s===`rtl`?S.createElement(Ww,null):S.createElement(mg,null)}),[s]),T=dU(_,b,d,g,o,FU),{mask:E,blurClassName:D}=T??{},O={...i,classNames:n,styles:r},[k,A]=Fd([l,n,{cover:J(C,y),popup:{root:J(x,v),mask:J({[`${d}-preview-mask-hidden`]:!E},D)}}],[u,r],{props:O},{popup:{_default:`root`}});return S.createElement(uU.PreviewGroup,{preview:T,previewPrefixCls:f,icons:w,...i,classNames:k,styles:A})},LU=e=>{let{prefixCls:t,preview:n,className:r,rootClassName:i,style:a,styles:o,classNames:s,wrapperStyle:c,fallback:l,...u}=e,{getPrefixCls:d,getPopupContainer:f,className:p,style:m,preview:h,styles:g,classNames:_,fallback:v}=li(`image`),y=d(`image`,t),b=bf(y),[x,C]=PU(y,b),w=J(i,x,C,b),T=J(r,x,p),[E,D,O]=pU(n),[k,A,j]=pU(h),M=dU(E,k,y,w,f,FU,!0),N={...e,preview:M},P=S.useMemo(()=>({cover:J(j,O),popup:{root:J(A,D)}}),[D,O,A,j]),{mask:F,blurClassName:I}=M??{},L=S.useMemo(()=>({mask:J({[`${y}-preview-mask-hidden`]:!F},I)}),[F,y,I]),[R,z]=Fd(S.useMemo(()=>[_,s,P,{popup:L}],[_,s,P,L]),[g,{root:c},o],{props:N},{popup:{_default:`root`}}),B={...m,...a},V=l??v;return S.createElement(uU,{prefixCls:y,preview:M||!1,rootClassName:w,className:T,style:B,fallback:V,...u,classNames:R,styles:z})};LU.PreviewGroup=IU;var RU=e=>{let{getPrefixCls:t,direction:n}=(0,S.useContext)(oi),{prefixCls:r,className:i}=e,a=t(`input-group`,r),[o,s]=SL(t(`input`)),c=J(a,s,{[`${a}-lg`]:e.size===`large`,[`${a}-sm`]:e.size===`small`,[`${a}-compact`]:e.compact,[`${a}-rtl`]:n===`rtl`},o,i),l=(0,S.useContext)(Sy),u=(0,S.useMemo)(()=>({...l,isFormItemInput:!1}),[l]);return S.createElement(Sy.Provider,{value:u},S.createElement(WV.Compact,{className:c,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))},zU=e=>{let{componentCls:t,paddingXS:n}=e;return{[t]:{display:`inline-flex`,alignItems:`center`,flexWrap:`nowrap`,columnGap:n,[`${t}-input-wrapper`]:{position:`relative`,[`${t}-mask-icon`]:{position:`absolute`,zIndex:`1`,top:`50%`,right:`50%`,transform:`translate(50%, -50%)`,pointerEvents:`none`},[`${t}-mask-input`]:{color:`transparent`,caretColor:e.colorText,"&::selection":{color:`transparent`}},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":`none`,margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":`textfield`}},"&-rtl":{direction:`rtl`},[`${t}-input`]:{textAlign:`center`,paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},BU=rl([`Input`,`OTP`],e=>zU(gs(e,nL(e))),rL),VU=S.forwardRef((e,t)=>{let{className:n,value:r,onChange:i,onActiveChange:a,index:o,mask:s,onFocus:c,...l}=e,{getPrefixCls:u}=S.useContext(oi),d=u(`otp`),f=typeof s==`string`?s:r,p=S.useRef(null);S.useImperativeHandle(t,()=>p.current);let m=e=>{i(o,e.target.value)},h=()=>{ri(()=>{let e=p.current?.input;document.activeElement===e&&e&&e.select()})},g=e=>{c?.(e),h()},_=e=>{let{key:t,ctrlKey:n,metaKey:i}=e;t===`ArrowLeft`?a(o-1):t===`ArrowRight`?a(o+1):t===`z`&&(n||i)?e.preventDefault():t===`Backspace`&&!r&&a(o-1),h()};return S.createElement(`span`,{className:`${d}-input-wrapper`,role:`presentation`},s&&r!==``&&r!==void 0&&S.createElement(`span`,{className:`${d}-mask-icon`,"aria-hidden":`true`},f),S.createElement(SB,{"aria-label":`OTP Input ${o+1}`,type:s===!0?`password`:`text`,...l,ref:p,value:r,onInput:m,onFocus:g,onKeyDown:_,onMouseDown:h,onMouseUp:h,className:J(n,{[`${d}-mask-input`]:s})}))});function HU(e){return(e||``).split(``)}var UU=e=>{let{index:t,prefixCls:n,separator:r,className:i,style:a}=e,o=typeof r==`function`?r(t):r;return o?S.createElement(`span`,{className:J(`${n}-separator`,i),style:a},o):null},WU=S.forwardRef((e,t)=>{let{prefixCls:n,length:r=6,size:i,defaultValue:a,value:o,onChange:s,formatter:c,separator:l,variant:u,disabled:d,status:f,autoFocus:p,mask:m,type:h,autoComplete:g,onInput:_,onFocus:v,inputMode:y,classNames:b,styles:x,className:C,style:w,...T}=e,{classNames:E,styles:D,getPrefixCls:O,direction:k,style:A,className:j}=li(`otp`),M=O(`otp`,n),N={...e,length:r},[P,F]=Fd([E,b],[D,x],{props:N}),I=Vu(T,{aria:!0,data:!0,attr:!0}),[L,R]=BU(M),z=th(e=>i??e),B=S.useContext(Sy),V=cC(B.status,f),H=S.useMemo(()=>({...B,status:V,hasFeedback:!1,feedbackIcon:null}),[B,V]),U=S.useRef(null),W=S.useRef({});S.useImperativeHandle(t,()=>({focus:()=>{W.current[0]?.focus()},blur:()=>{for(let e=0;ec?c(e):e,[te,ne]=S.useState(()=>HU(ee(a||``)));S.useEffect(()=>{o!==void 0&&ne(HU(o))},[o]);let re=In(e=>{ne(e),_&&_(e),s&&e.length===r&&e.every(e=>e)&&e.some((e,t)=>te[t]!==e)&&s(e.join(``))}),ie=In((e,t)=>{let n=Zr(te);for(let t=0;t=0&&!n[e];--e)n.pop();return n=HU(ee(n.map(e=>e||` `).join(``))).map((e,t)=>e===` `&&!n[t]?n[t]:e),n}),ae=(e,t)=>{let n=ie(e,t),i=Math.min(e+t.length,r-1);i!==e&&n[e]!==void 0&&W.current[i]?.focus(),re(n)},G=e=>{W.current[e]?.focus()},oe=(e,t)=>{for(let e=0;e{let n=`otp-${t}`,i=te[t]||``;return S.createElement(S.Fragment,{key:n},S.createElement(VU,{ref:e=>{W.current[t]=e},index:t,size:z,htmlSize:1,className:J(P.input,`${M}-input`),style:F.input,onChange:ae,value:i,onActiveChange:G,autoFocus:t===0&&p,onFocus:e=>oe(e,t),...K}),tS.createElement(Al,KU({},e,{ref:t,icon:GU}))),JU={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z`}}]},name:`eye`,theme:`outlined`};function YU(){return YU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,YU({},e,{ref:t,icon:JU}))),ZU=e=>e?S.createElement(XU,null):S.createElement(qU,null),QU={click:`onClick`,hover:`onMouseOver`},$U=S.forwardRef((e,t)=>{let{disabled:n,action:r=`click`,visibilityToggle:i=!0,iconRender:a=ZU,suffix:o}=e,s=S.useContext(zp),c=n??s,l=hd(i)&&i.visible!==void 0,[u,d]=(0,S.useState)(()=>l?i.visible:!1),f=(0,S.useRef)(null);S.useEffect(()=>{l&&d(i.visible)},[l,i]);let p=bB(f),m=()=>{if(c)return;u&&p();let e=!u;d(e),hd(i)&&i.onVisibleChange?.(e)},h=e=>{let t=QU[r]||``,n=a(u),i={[t]:m,className:`${e}-icon`,key:`passwordIcon`,onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}};return S.cloneElement(S.isValidElement(n)?n:S.createElement(`span`,null,n),i)},{className:g,prefixCls:_,inputPrefixCls:v,size:y,...b}=e,{getPrefixCls:x}=S.useContext(oi),C=x(`input`,v),w=x(`input-password`,_),T=i&&h(w),E=J(w,g,{[`${w}-${y}`]:!!y}),D={...Sr(b,[`suffix`,`iconRender`,`visibilityToggle`]),type:u?`text`:`password`,className:E,prefixCls:C,suffix:S.createElement(S.Fragment,null,T,o)};return y&&(D.size=y),S.createElement(SB,{ref:$n(t,f),...D})}),eW=rl([`Input`,`Search`],e=>{let{componentCls:t}=e,n=`${t}-btn`;return{[t]:{width:`100%`,[n]:{"&-filled":{background:e.colorFillTertiary,"&:not(:disabled)":{"&:hover":{background:e.colorFillSecondary},"&:active":{background:e.colorFill}}}}}}}),tW=S.forwardRef((e,t)=>{let{prefixCls:n,inputPrefixCls:r,className:i,size:a,style:o,enterButton:s=!1,addonAfter:c,loading:l,disabled:u,onSearch:d,onChange:f,onCompositionStart:p,onCompositionEnd:m,variant:h,onPressEnter:g,classNames:_,styles:v,hidden:y,...b}=e,{direction:x,getPrefixCls:C,classNames:w,styles:T}=li(`inputSearch`),E={...e,enterButton:s},[D,O]=Fd([w,_],[T,v],{props:E},{button:{_default:`root`}}),k=S.useRef(!1),A=C(`input-search`,n),j=C(`input`,r),[M,N]=eW(A),{compactSize:P}=ih(A,x),F=th(e=>a??P??e),I=S.useRef(null),L=e=>{e?.target&&e.type===`click`&&d&&d(e.target.value,e,{source:`clear`}),f?.(e)},R=e=>{document.activeElement===I.current?.input&&e.preventDefault()},z=e=>{d&&d(I.current?.input?.value,e,{source:`input`})},B=e=>{k.current||l||(g?.(e),z(e))},V=typeof s==`boolean`?S.createElement(FC,null):null,H=`${A}-btn`,U=J(H,{[`${H}-${h}`]:h}),W,ee=s||{},te=ee.type&&ee.type.__ANT_BUTTON===!0;W=te||ee.type===`button`?Pp(ee,{onMouseDown:R,onClick:e=>{ee?.props?.onClick?.(e),z(e)},key:`enterButton`,...te?{className:U,size:F}:{}}):S.createElement(Zg,{classNames:D.button,styles:O.button,className:U,color:s?`primary`:`default`,size:F,disabled:u,key:`enterButton`,onMouseDown:R,onClick:z,loading:l,icon:V,variant:h===`borderless`||h===`filled`||h===`underlined`?`text`:s?`solid`:void 0},s),c&&(W=[W,Pp(c,{key:`addonAfter`})]);let ne=J(A,N,{[`${A}-rtl`]:x===`rtl`,[`${A}-${F}`]:!!F,[`${A}-with-button`]:!!s},i,M,D.root),re=e=>{k.current=!0,p?.(e)},ie=e=>{k.current=!1,m?.(e)},ae=Vu(b,{data:!0}),G=Sr({...b,classNames:Sr(D,[`button`,`root`]),styles:Sr(O,[`button`,`root`]),prefixCls:j,type:`search`,size:F,variant:h,onPressEnter:B,onCompositionStart:re,onCompositionEnd:ie,onChange:L,disabled:u},Object.keys(ae));return S.createElement(sh,{className:ne,style:{...o,...O.root},...ae,hidden:y},S.createElement(SB,{ref:$n(I,t),...G}),W)}),nW=` + ${r}-col-xl-24${n}-label`]:eH(e)},[`@media (max-width: ${Y(e.screenXSMax)})`]:[rH(e),{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-xs-24${n}-label`]:eH(e)}}}],[`@media (max-width: ${Y(e.screenSMMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-sm-24${n}-label`]:eH(e)}}},[`@media (max-width: ${Y(e.screenMDMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-md-24${n}-label`]:eH(e)}}},[`@media (max-width: ${Y(e.screenLGMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-lg-24${n}-label`]:eH(e)}}}}},aH=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}),oH=(e,t)=>gs(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),sH=rl(`Form`,(e,{rootPrefixCls:t})=>{let n=oH(e,t);return[QV(n),$V(n),YV(n),tH(n),nH(n),iH(n),bh(n),Wh]},aH,{order:-1e3}),cH=[];function lH(e,t,n,r=0){return{key:typeof e==`string`?e:`${t}-${r}`,error:e,errorStatus:n}}var uH=({help:e,helpStatus:t,errors:n=cH,warnings:r=cH,className:i,fieldId:a,onVisibleChanged:o})=>{let{prefixCls:s}=S.useContext(xy),c=`${s}-item-explain`,l=bf(s),[u,d]=sH(s,l),f=S.useMemo(()=>Wm(s),[s]),p=JV(n),m=JV(r),h=S.useMemo(()=>fd(e)?[lH(e,`help`,t)]:[].concat(Zr(p.map((e,t)=>lH(e,`error`,`error`,t))),Zr(m.map((e,t)=>lH(e,`warning`,`warning`,t)))),[e,t,p,m]),g=S.useMemo(()=>{let e={};return h.forEach(({key:t})=>{e[t]=(e[t]||0)+1}),h.map((t,n)=>({...t,key:e[t.key]>1?`${t.key}-fallback-${n}`:t.key}))},[h]),_={};return a&&(_.id=`${a}_help`),S.createElement(Iu,{motionDeadline:f.motionDeadline,motionName:`${s}-show-help`,visible:!!g.length,onVisibleChanged:o},e=>{let{className:t,style:n}=e;return S.createElement(`div`,{..._,className:J(c,t,d,l,i,u),style:n},S.createElement(Fu,{keys:g,...Wm(s),motionName:`${s}-show-help-item`,component:!1},e=>{let{key:t,error:n,errorStatus:r,className:i,style:a}=e;return S.createElement(`div`,{key:t,className:J(i,{[`${c}-${r}`]:r}),style:a},n)}))})},dH=S.forwardRef((e,t)=>{let n=S.useContext(zp),{getPrefixCls:r,direction:i,requiredMark:a,colon:o,scrollToFirstError:s,className:c,style:l,styles:u,classNames:d,tooltip:f}=li(`form`),{prefixCls:p,className:m,rootClassName:h,size:g,disabled:_=n,form:v,colon:y,labelAlign:b,labelWrap:x,labelCol:C,wrapperCol:w,layout:T=`horizontal`,scrollToFirstError:E,requiredMark:D,onFinishFailed:O,name:k,style:A,feedbackIcons:j,variant:M,classNames:N,styles:P,tooltip:F,...I}=e,L=th(g),R=S.useContext(xf),z=S.useMemo(()=>D===void 0?a===void 0?!0:a:D,[D,a]),B=y??o,V={...f,...F},H=r(`form`,p),U=bf(H),[W,ee]=sH(H,U),te={...e,size:L,disabled:_,layout:T,colon:B,requiredMark:z},[ne,re]=Fd([d,N],[u,P],{props:te}),ie=J(H,`${H}-${T}`,{[`${H}-hide-required-mark`]:z===!1,[`${H}-rtl`]:i===`rtl`,[`${H}-large`]:L===`large`,[`${H}-small`]:L===`small`},ee,U,W,c,m,h,ne.root),[ae]=WI(v),{__INTERNAL__:G}=ae;G.name=k;let oe=S.useMemo(()=>({name:k,labelAlign:b,labelCol:C,labelWrap:x,wrapperCol:w,layout:T,colon:B,requiredMark:z,itemRef:G.itemRef,form:ae,feedbackIcons:j,tooltip:V,classNames:ne,styles:re}),[k,b,C,w,T,B,z,ae,j,ne,re,V]),K=S.useRef(null);S.useImperativeHandle(t,()=>({...ae,nativeElement:K.current?.nativeElement}));let se=(e,t)=>{if(e){let n={block:`nearest`};hd(e)&&(n={...n,...e}),ae.scrollToField(t,n)}},ce=e=>{if(O?.(e),e.errorFields.length){let t=e.errorFields[0].name;if(E!==void 0){se(E,t);return}s!==void 0&&se(s,t)}};return S.createElement(wy.Provider,{value:M},S.createElement(Bp,{disabled:_},S.createElement(Vp.Provider,{value:L},S.createElement(by,{validateMessages:R},S.createElement(vy.Provider,{value:oe},S.createElement(Cy,{status:!0},S.createElement(_y,{id:k,...I,name:k,onFinishFailed:ce,form:ae,ref:K,style:{...re?.root,...l,...A},className:ie})))))))});function fH(e){if(typeof e==`function`)return e;let t=Cr(e);return t.length<=1?t[0]:t}var pH=()=>{let{status:e,errors:t=[],warnings:n=[]}=S.useContext(Sy);return{status:e,errors:t,warnings:n}};pH.Context=Sy;function mH(e){let[t,n]=S.useState(e),r=S.useRef(null),i=S.useRef([]),a=S.useRef(!1);S.useEffect(()=>(a.current=!1,()=>{a.current=!0,ri.cancel(r.current),r.current=null}),[]);function o(e){a.current||(r.current===null&&(i.current=[],r.current=ri(()=>{r.current=null,n(e=>{let t=e;return i.current.forEach(e=>{t=e(t)}),t})})),i.current.push(e))}return[t,o]}var hH=()=>{let{itemRef:e}=S.useContext(vy),t=S.useRef({});function n(n,r){let i=r&&typeof r==`object`&&ir(r),a=n.join(`_`);return(t.current.name!==a||t.current.originRef!==i)&&(t.current.name=a,t.current.originRef=i,t.current.ref=$n(e(n),i)),t.current.ref}return n},gH=e=>{let{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${t}-control`]:{display:`flex`}}}},_H=al([`Form`,`item-item`],(e,{rootPrefixCls:t})=>gH(oH(e,t))),vH=24,yH=e=>{let{prefixCls:t,status:n,labelCol:r,wrapperCol:i,children:a,errors:o,warnings:s,_internalItemRender:c,extra:l,help:u,fieldId:d,marginBottom:f,onErrorVisibleChanged:p,label:m}=e,h=`${t}-item`,g=S.useContext(vy),{classNames:_,styles:v}=g,y=S.useMemo(()=>{let e={...i||g.wrapperCol||{}};return m===null&&!r&&!i&&g.labelCol&&[void 0].concat(Zr(VC)).forEach(t=>{let n=t?[t]:[],r=ar(g.labelCol,n),i=hd(r)?r:{},a=ar(e,n),o=hd(a)?a:{};`span`in i&&!(`offset`in o)&&i.span{let{labelCol:e,wrapperCol:t,...n}=g;return n},[g]),C=S.useRef(null),[w,T]=S.useState(0);zn(()=>{l&&C.current?T(C.current.clientHeight):T(0)},[l]);let E=S.createElement(`div`,{className:`${h}-control-input`},S.createElement(`div`,{className:J(`${h}-control-input-content`,_?.content),style:v?.content},a)),D=S.useMemo(()=>({prefixCls:t,status:n}),[t,n]),O=f!==null||o.length||s.length?S.createElement(xy.Provider,{value:D},S.createElement(uH,{fieldId:d,errors:o,warnings:s,help:u,helpStatus:n,className:`${h}-explain-connected`,onVisibleChanged:p})):null,k={};d&&(k.id=`${d}_extra`);let A=l?S.createElement(`div`,{...k,className:`${h}-extra`,ref:C},l):null,j=O||A?S.createElement(`div`,{className:`${h}-additional`,style:f?{minHeight:f+w}:{}},O,A):null,M=c&&c.mark===`pro_table_render`&&c.render?c.render(e,{input:E,errorList:O,extra:A}):S.createElement(S.Fragment,null,E,j);return S.createElement(vy.Provider,{value:x},S.createElement(lz,{...y,className:b},M),S.createElement(_H,{prefixCls:t}))},bH={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`};function xH(){return xH=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,xH({},e,{ref:t,icon:bH}))),CH=({prefixCls:e,label:t,htmlFor:n,labelCol:r,labelAlign:i,colon:a,required:o,requiredMark:s,tooltip:c,vertical:l})=>{let[u]=cd(`Form`),{labelAlign:d,labelCol:f,labelWrap:p,colon:m,classNames:h,styles:g,tooltip:_}=S.useContext(vy);if(!t)return null;let v=r||f||{},y=i||d,b=`${e}-item-label`,x=J(b,y===`left`&&`${b}-left`,v.className,{[`${b}-wrap`]:!!p}),C=t,w=a===!0||m!==!1&&a!==!1;w&&!l&&typeof t==`string`&&t.trim()&&(C=t.replace(/[:|:]\s*$/,``));let T=qV(c,_);if(T){let t=S.createElement(Ow,{...T},S.createElement(`span`,{className:`${e}-item-tooltip`,onClick:e=>{e.preventDefault()},tabIndex:-1},T.icon||T.children||S.createElement(SH,null)));C=S.createElement(S.Fragment,null,C,t)}let E=s===`optional`,D=typeof s==`function`,O=s===!1;D?C=s(C,{required:!!o}):E&&!o&&(C=S.createElement(S.Fragment,null,C,S.createElement(`span`,{className:`${e}-item-optional`,title:``},u?.optional||td.Form?.optional)));let k;O?k=`hidden`:(E||D)&&(k=`optional`);let A=J(h?.label,{[`${e}-item-required`]:o,[`${e}-item-required-mark-${k}`]:k,[`${e}-item-no-colon`]:!w});return S.createElement(lz,{...v,className:x},S.createElement(`label`,{htmlFor:n,className:A,style:g?.label,title:typeof t==`string`?t:``},C))},wH={success:Ml,warning:Vl,error:Fl,validating:xm};function TH({children:e,errors:t,warnings:n,hasFeedback:r,validateStatus:i,prefixCls:a,meta:o,noStyle:s,name:c}){let l=`${a}-item`,{feedbackIcons:u}=S.useContext(vy),d=VI(t,n,o,null,!!r,i),{isFormItemInput:f,status:p,hasFeedback:m,feedbackIcon:h,name:g}=S.useContext(Sy),_=S.useMemo(()=>{let e;if(r){let i=r!==!0&&r.icons||u,a=d&&i?.({status:d,errors:t,warnings:n})?.[d],o=d?wH[d]:null;e=a!==!1&&o?S.createElement(`span`,{className:J(`${l}-feedback-icon`,`${l}-feedback-icon-${d}`)},a||S.createElement(o,null)):null}let i={status:d||``,errors:t,warnings:n,hasFeedback:!!r,feedbackIcon:e,isFormItemInput:!0,name:c};return s&&(i.status=(d??p)||``,i.isFormItemInput=f,i.hasFeedback=!!(r??m),i.feedbackIcon=r===void 0?h:i.feedbackIcon,i.name=c??g),i},[d,r,s,f,p]);return S.createElement(Sy.Provider,{value:_},e)}function EH(e){let{prefixCls:t,className:n,rootClassName:r,style:i,help:a,errors:o,warnings:s,validateStatus:c,meta:l,hasFeedback:u,hidden:d,children:f,fieldId:p,required:m,isRequired:h,onSubItemMetaChange:g,layout:_,name:v,...y}=e,b=`${t}-item`,{requiredMark:x,layout:C}=S.useContext(vy),w=_||C,T=w===`vertical`,E=S.useRef(null),D=JV(o),O=JV(s),k=fd(a),A=!!(k||o.length||s.length),j=!!E.current&&cp(E.current),[M,N]=S.useState(null);zn(()=>{if(A&&E.current){let e=getComputedStyle(E.current);N(Number.parseInt(e.marginBottom,10))}},[A,j]);let P=e=>{e||N(null)},F=((e=!1)=>VI(e?D:l.errors,e?O:l.warnings,l,``,!!u,c))(),I=J(b,n,r,{[`${b}-with-help`]:k||D.length||O.length,[`${b}-has-feedback`]:F&&u,[`${b}-has-success`]:F===`success`,[`${b}-has-warning`]:F===`warning`,[`${b}-has-error`]:F===`error`,[`${b}-is-validating`]:F===`validating`,[`${b}-hidden`]:d,[`${b}-${w}`]:w});return S.createElement(`div`,{className:I,style:i,ref:E},S.createElement(fz,{className:`${b}-row`,...Sr(y,`_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`.split(`.`))},S.createElement(CH,{htmlFor:p,...e,requiredMark:x,required:m??h,prefixCls:t,vertical:T}),S.createElement(yH,{...e,...l,errors:D,warnings:O,prefixCls:t,status:F,help:a,marginBottom:M,onErrorVisibleChanged:P},S.createElement(yy.Provider,{value:g},S.createElement(TH,{prefixCls:t,meta:l,errors:l.errors,warnings:l.warnings,hasFeedback:u,validateStatus:F,name:v},f)))),!!M&&S.createElement(`div`,{className:`${b}-margin-offset`,style:{marginBottom:-M}}))}var DH=`__SPLIT__`;function OH(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>{let r=e[n],i=t[n];return r===i||typeof r==`function`||typeof i==`function`})}var kH=S.memo(e=>e.children,(e,t)=>OH(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every((e,n)=>e===t.childProps[n]));function AH(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function jH(e){let{name:t,noStyle:n,className:r,dependencies:i,prefixCls:a,shouldUpdate:o,rules:s,children:c,required:l,label:u,messageVariables:d,trigger:f=`onChange`,validateTrigger:p,hidden:m,help:h,layout:g}=e,{getPrefixCls:_}=S.useContext(oi),{name:v}=S.useContext(vy),y=fH(c),b=typeof y==`function`,x=S.useContext(yy),{validateTrigger:C}=S.useContext(F_),w=fd(p)?p:C,T=fd(t),E=_(`form`,a),D=bf(E),[O,k]=sH(E,D);Dr(`Form.Item`);let A=S.useContext(I_),j=S.useRef(null),[M,N]=mH({}),[P,F]=Vn(()=>AH()),I=e=>{let t=A?.getKey(e.name);if(F(e.destroy?AH():e,!0),n&&h!==!1&&x){let n=e.name;if(e.destroy)n=j.current||n;else if(t!==void 0){let[e,r]=t;n=[e].concat(Zr(r)),j.current=n}x(e,n)}},L=(e,t)=>{N(n=>{let r={...n},i=[].concat(Zr(e.name.slice(0,-1)),Zr(t)).join(DH);return e.destroy?delete r[i]:r[i]=e,r})},[R,z]=S.useMemo(()=>{let e=Zr(P.errors),t=Zr(P.warnings);return Object.values(M).forEach(n=>{e.push.apply(e,Zr(n.errors||[])),t.push.apply(t,Zr(n.warnings||[]))}),[e,t]},[M,P.errors,P.warnings]),B=hH();function V(i,a,o){return n&&!m?S.createElement(TH,{prefixCls:E,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:P,errors:R,warnings:z,noStyle:!0,name:t},i):S.createElement(EH,{key:`row`,...e,className:J(r,k,D,O),prefixCls:E,fieldId:a,isRequired:o,errors:R,warnings:z,meta:P,onSubItemMetaChange:L,layout:g,name:t},i)}if(!T&&!b&&!i)return V(y);let H={};return typeof u==`string`?H.label=u:t&&(H.label=String(t)),d&&(H={...H,...d}),S.createElement(ry,{...e,messageVariables:H,trigger:f,validateTrigger:w,onMetaChange:I},(n,r,a)=>{let c=zI(t).length&&r?r.name:[],u=BI(c,v),d=l===void 0?s?.some(e=>{if(hd(e)&&e.required&&!e.warningOnly)return!0;if(typeof e==`function`){let t=e(a);return t?.required&&!t?.warningOnly}return!1}):l,p={...n},m=null;if(Array.isArray(y)&&T)m=y;else if(!(b&&(!(o||i)||T))&&!(i&&!b&&!T))if(S.isValidElement(y)){let t={...y.props,...p};if(t.id||=u,h||R.length>0||z.length>0||e.extra){let n=[];(h||R.length>0)&&n.push(`${u}_help`),e.extra&&n.push(`${u}_extra`),t[`aria-describedby`]=n.join(` `)}R.length>0&&(t[`aria-invalid`]=`true`),d&&(t[`aria-required`]=`true`),tr(y)&&(t.ref=B(c,y)),new Set([].concat(Zr(zI(f)),Zr(zI(w)))).forEach(e=>{t[e]=(...t)=>{p[e]?.(...t),y.props[e]?.(...t)}});let n=[t[`aria-required`],t[`aria-invalid`],t[`aria-describedby`]];m=S.createElement(kH,{control:p,update:y,childProps:n},Pp(y,t))}else m=b&&(o||i)&&!T?y(a):y;return V(m,u,d)})}var MH=jH;MH.useStatus=pH;var NH=({prefixCls:e,children:t,...n})=>{let{getPrefixCls:r}=S.useContext(oi),i=r(`form`,e),a=S.useMemo(()=>({prefixCls:i,status:`error`}),[i]);return S.createElement(iy,{...n},(e,n,r)=>S.createElement(xy.Provider,{value:a},t(e.map(e=>({...e,fieldKey:e.key})),n,{errors:r.errors,warnings:r.warnings})))};function PH(){let{form:e}=S.useContext(vy);return e}var X=dH;X.Item=MH,X.List=NH,X.ErrorList=uH,X.useForm=WI,X.useFormInstance=PH,X.useWatch=gy,X.Provider=by;var FH=S.createContext(null);function IH(e){return new Promise(t=>{if(!e){t(!1);return}let n=document.createElement(`img`);n.onerror=()=>t(!1),n.onload=()=>t(!0),n.src=e})}function LH(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}var RH={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function zH(e,t,n,r){let i=(0,S.useRef)(null),a=(0,S.useRef)([]),[o,s]=(0,S.useState)(RH),c=e=>{s(RH),Ti(RH,o)||r?.({transform:RH,action:e})},l=(e,t)=>{i.current===null&&(a.current=[],i.current=ri(()=>{s(e=>{let n=e;return a.current.forEach(e=>{n={...n,...e}}),i.current=null,r?.({transform:n,action:t}),n})})),a.current.push({...o,...e})};return{transform:o,resetTransform:c,updateTransform:l,dispatchZoomChange:(r,i,a,s,c)=>{let{width:u,height:d,offsetWidth:f,offsetHeight:p,offsetLeft:m,offsetTop:h}=e.current,g=r,_=o.scale*r;_>n?(_=n,g=n/o.scale):_r){if(t>0)return{[e]:a};if(t<0&&ir)return{[e]:t<0?a:-a};return{}}function VH(e,t,n,r){let{width:i,height:a}=LH(),o=null;return e<=i&&t<=a?o={x:0,y:0}:(e>i||t>a)&&(o={...BH(`x`,n,e,i),...BH(`y`,r,t,a)}),o}function HH(e,t,n,r,i,a,o){let{rotate:s,scale:c,x:l,y:u}=i,[d,f]=(0,S.useState)(!1),p=(0,S.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),m=e=>{!t||e.button!==0||(e.preventDefault(),e.stopPropagation(),p.current={diffX:e.pageX-l,diffY:e.pageY-u,transformX:l,transformY:u},f(!0))},h=e=>{n&&d&&a({x:e.pageX-p.current.diffX,y:e.pageY-p.current.diffY},`move`)},g=()=>{if(n&&d){f(!1);let{transformX:t,transformY:n}=p.current;if(!(l!==t&&u!==n))return;let r=e.current.offsetWidth*c,i=e.current.offsetHeight*c,{left:o,top:d}=e.current.getBoundingClientRect(),m=s%180!=0,h=VH(m?i:r,m?r:i,o,d);h&&a({...h},`dragRebound`)}};return(0,S.useEffect)(()=>{if(t){window.addEventListener(`mouseup`,g,!1),window.addEventListener(`mousemove`,h,!1);try{window.top!==window.self&&(window.top.addEventListener(`mouseup`,g,!1),window.top.addEventListener(`mousemove`,h,!1))}catch(e){`${e}`}}return()=>{window.removeEventListener(`mouseup`,g),window.removeEventListener(`mousemove`,h);try{window.top?.removeEventListener(`mouseup`,g),window.top?.removeEventListener(`mousemove`,h)}catch{}}},[n,d,l,u,s,t]),{isMoving:d,onMouseDown:m,onMouseMove:h,onMouseUp:g,onWheel:e=>{if(!n||e.deltaY==0)return;let t=Math.abs(e.deltaY/100),i=1+Math.min(t,1)*r;e.deltaY>0&&(i=1/i),o(i,`wheel`,e.clientX,e.clientY)}}}function UH({src:e,isCustomPlaceholder:t,fallback:n}){let[r,i]=(0,S.useState)(t?`loading`:`normal`),a=(0,S.useRef)(!1),o=r===`error`;(0,S.useEffect)(()=>{let t=!0;return IH(e).then(e=>{!e&&t&&i(`error`)}),()=>{t=!1}},[e]),(0,S.useEffect)(()=>{t&&!a.current?i(`loading`):o&&i(`normal`)},[e]);let s=()=>{i(`normal`)};return[e=>{a.current=!1,r===`loading`&&e?.complete&&(e.naturalWidth||e.naturalHeight)&&(a.current=!0,s())},o&&n?{src:n}:{onLoad:s,src:e},r]}function WH(e,t){let n=e.x-t.x,r=e.y-t.y;return Math.hypot(n,r)}function GH(e,t,n,r){let i=WH(e,n),a=WH(t,r);if(i===0&&a===0)return[e.x,e.y];let o=i/(i+a);return[e.x+o*(t.x-e.x),e.y+o*(t.y-e.y)]}function KH(e,t,n,r,i,a,o){let{rotate:s,scale:c,x:l,y:u}=i,[d,f]=(0,S.useState)(!1),p=(0,S.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:`none`}),m=e=>{p.current={...p.current,...e}};return(0,S.useEffect)(()=>{let e=e=>{e.preventDefault()};return n&&t&&window.addEventListener(`touchmove`,e,{passive:!1}),()=>{window.removeEventListener(`touchmove`,e)}},[n,t]),{isTouching:d,onTouchStart:e=>{if(!t)return;e.stopPropagation(),f(!0);let{touches:n=[]}=e;n.length>1?m({point1:{x:n[0].clientX,y:n[0].clientY},point2:{x:n[1].clientX,y:n[1].clientY},eventType:`touchZoom`}):m({point1:{x:n[0].clientX-l,y:n[0].clientY-u},eventType:`move`})},onTouchMove:e=>{let{touches:t=[]}=e,{point1:n,point2:r,eventType:i}=p.current;if(t.length>1&&i===`touchZoom`){let e={x:t[0].clientX,y:t[0].clientY},i={x:t[1].clientX,y:t[1].clientY},[a,s]=GH(n,r,e,i);o(WH(e,i)/WH(n,r),`touchZoom`,a,s,!0),m({point1:e,point2:i,eventType:`touchZoom`})}else i===`move`&&(a({x:t[0].clientX-n.x,y:t[0].clientY-n.y},`move`),m({eventType:`move`}))},onTouchEnd:()=>{if(!n)return;if(d&&f(!1),m({eventType:`none`}),r>c)return a({x:0,y:0,scale:r},`touchZoom`);let t=e.current.offsetWidth*c,i=e.current.offsetHeight*c,{left:o,top:l}=e.current.getBoundingClientRect(),u=s%180!=0,p=VH(u?i:t,u?t:i,o,l);p&&a({...p},`dragRebound`)}}}function qH(e){let{prefixCls:t,icon:n,onClick:r,className:i,style:a}=e;return S.createElement(`button`,{className:J(`${t}-close`,i),style:a,onClick:r},n)}function JH(e){let{prefixCls:t,showProgress:n,current:r,count:i,showSwitch:a,classNames:o,styles:s,icons:c,image:l,transform:u,countRender:d,actionsRender:f,scale:p,minScale:m,maxScale:h,onActive:g,onFlipY:_,onFlipX:v,onRotateLeft:y,onRotateRight:b,onZoomOut:x,onZoomIn:C,onClose:w,onReset:T}=e,{left:E,right:D,prev:O,next:k,flipY:A,flipX:j,rotateLeft:M,rotateRight:N,zoomOut:P,zoomIn:F}=c,I=n&&S.createElement(`div`,{className:`${t}-progress`},d?d(r+1,i):S.createElement(`bdi`,null,`${r+1} / ${i}`)),L=`${t}-actions-action`,R=({type:e,disabled:t,onClick:n,icon:r})=>S.createElement(`button`,{type:`button`,key:e,className:J(L,`${L}-${e}`,{[`${L}-disabled`]:!!t}),onClick:n,disabled:!!t,"aria-label":e},r),z=a?R({icon:O??E,onClick:()=>g(-1),type:`prev`,disabled:r===0}):void 0,B=a?R({icon:k??D,onClick:()=>g(1),type:`next`,disabled:r===i-1}):void 0,V=R({icon:A,onClick:_,type:`flipY`}),H=R({icon:j,onClick:v,type:`flipX`}),U=R({icon:M,onClick:y,type:`rotateLeft`}),W=R({icon:N,onClick:b,type:`rotateRight`}),ee=R({icon:P,onClick:x,type:`zoomOut`,disabled:p<=m}),te=R({icon:F,onClick:C,type:`zoomIn`,disabled:p===h}),ne=S.createElement(`div`,{className:J(`${t}-actions`,o.actions),style:s.actions},V,H,U,W,ee,te);return S.createElement(`div`,{className:J(`${t}-footer`,o.footer),style:s.footer},I,f?f(ne,{icons:{prevIcon:z,nextIcon:B,flipYIcon:V,flipXIcon:H,rotateLeftIcon:U,rotateRightIcon:W,zoomOutIcon:ee,zoomInIcon:te},actions:{onActive:g,onFlipY:_,onFlipX:v,onRotateLeft:y,onRotateRight:b,onZoomOut:x,onZoomIn:C,onReset:T,onClose:w},transform:u,current:r,total:i,image:l}):ne)}function YH(e){let{prefixCls:t,onActive:n,current:r,count:i,icons:{left:a,right:o,prev:s,next:c}}=e,l=`${t}-switch`,u=r===0,d=r===i-1;return S.createElement(S.Fragment,null,S.createElement(`button`,{className:J(l,`${l}-prev`,{[`${l}-disabled`]:u}),onClick:()=>n(-1),disabled:u},s??a),S.createElement(`button`,{type:`button`,className:J(l,`${l}-next`,{[`${l}-disabled`]:d}),onClick:()=>n(1),disabled:d},c??o))}function XH(){return XH=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let[i,a]=UH({src:t,fallback:e});return S.createElement(`img`,XH({ref:e=>{n.current=e,i(e)}},r,a))},QH=e=>{let{prefixCls:t,rootClassName:n,src:r,alt:i,imageInfo:a,fallback:o,movable:s=!0,onClose:c,open:l,afterOpenChange:u,maskClosable:d=!0,icons:f={},closeIcon:p,getContainer:m,current:h=0,count:g=1,countRender:_,scaleStep:v=.5,minScale:y=1,maxScale:b=50,motionName:x=`fade`,imageRender:C,imgCommonProps:w,actionsRender:T,onTransform:E,onChange:D,classNames:O={},styles:k={},mousePosition:A,zIndex:j,focusTrap:M=!0}=e,N=(0,S.useRef)(),P=(0,S.useRef)(null),F=(0,S.useRef)(null),I=(0,S.useContext)(FH),L=I&&g>1,R=I&&g>=1,[z,B]=(0,S.useState)(!0),{transform:V,resetTransform:H,updateTransform:U,dispatchZoomChange:W}=zH(N,y,b,E),{isMoving:ee,onMouseDown:te,onWheel:ne}=HH(N,s,l,v,V,U,W),{isTouching:re,onTouchStart:ie,onTouchMove:ae,onTouchEnd:G}=KH(N,s,l,y,V,U,W),{rotate:oe,scale:K}=V;(0,S.useEffect)(()=>{z||B(!0)},[z]),(0,S.useEffect)(()=>{l||H(`close`)},[l]);let se=S.createElement(ZH,XH({},w,{width:e.width,height:e.height,imgRef:N,className:`${t}-img`,alt:i,style:{transform:`translate3d(${V.x}px, ${V.y}px, 0) scale3d(${V.flipX?`-`:``}${K}, ${V.flipY?`-`:``}${K}, 1) rotate(${oe}deg)`,transitionDuration:(!z||re)&&`0s`},fallback:o,src:r,onWheel:ne,onMouseDown:te,onDoubleClick:e=>{l&&(K===1?W(1+v,`doubleClick`,e.clientX,e.clientY):U({x:0,y:0,scale:1},`doubleClick`))},onTouchStart:ie,onTouchMove:ae,onTouchEnd:G,onTouchCancel:G})),ce={url:r,alt:i,...a},q=()=>{W(1+v,`zoomIn`)},le=()=>{W(1/(1+v),`zoomOut`)},ue=()=>{U({rotate:oe+90},`rotateRight`)},de=()=>{U({rotate:oe-90},`rotateLeft`)},fe=()=>{U({flipX:!V.flipX},`flipX`)},pe=()=>{U({flipY:!V.flipY},`flipY`)},me=()=>{H(`reset`)},he=e=>{let t=h+e;t>=0&&t<=g-1&&(B(!1),H(e<0?`prev`:`next`),D?.(t,h))},ge=In(e=>{if(l){let{keyCode:t}=e;L&&(t===om.LEFT?he(-1):t===om.RIGHT&&he(1))}});(0,S.useEffect)(()=>{if(l)return window.addEventListener(`keydown`,ge),()=>{window.removeEventListener(`keydown`,ge)}},[l]);let[_e,ve]=(0,S.useState)(!1);S.useEffect(()=>{l&&ve(!0)},[l]);let ye=e=>{e||(ve(!1),F.current?.focus?.(),F.current=null),u?.(e)},[be,xe]=(0,S.useState)(!1);zn(()=>{l&&xe(!0)},[l]);let Se=({top:e})=>{e&&c?.()};zn(()=>{l&&(F.current=document.activeElement)},[l]),x_(M&&l&&be,()=>P.current);let Ce={...k.body};return A&&(Ce.transformOrigin=`${A.x}px ${A.y}px`),S.createElement(Xf,{open:be&&l,autoDestroy:!1,getContainer:m,autoLock:_e,onEsc:Se},S.createElement(Iu,{motionName:x,visible:be&&l,motionAppear:!0,motionEnter:!0,motionLeave:!0,onVisibleChanged:ye},({className:e,style:r})=>{let a={...k.root,...r};return j&&(a.zIndex=j),S.createElement(`div`,{ref:P,className:J(t,n,O.root,e,{[`${t}-movable`]:s,[`${t}-moving`]:ee}),style:a,role:`dialog`,"aria-modal":`true`,"aria-label":i,tabIndex:-1},S.createElement(`div`,{className:J(`${t}-mask`,O.mask),style:k.mask,onClick:d?c:void 0}),S.createElement(`div`,{className:J(`${t}-body`,O.body),style:Ce},C?C(se,{transform:V,image:ce,...I?{current:h}:{}}):se),p!==!1&&p!==null&&S.createElement(qH,{prefixCls:t,icon:p===!0?f.close:p||f.close,onClick:c,className:O.close,style:k.close}),L&&S.createElement(YH,{prefixCls:t,current:h,count:g,icons:f,onActive:he}),S.createElement(JH,{prefixCls:t,showProgress:R,current:h,count:g,showSwitch:L,classNames:O,styles:k,image:ce,transform:V,icons:f,countRender:_,actionsRender:T,scale:K,minScale:y,maxScale:b,onActive:he,onFlipY:pe,onFlipX:fe,onRotateLeft:de,onRotateRight:ue,onZoomOut:le,onZoomIn:q,onClose:c,onReset:me}))}))},$H=[`crossOrigin`,`decoding`,`draggable`,`loading`,`referrerPolicy`,`sizes`,`srcSet`,`useMap`,`alt`,`fetchPriority`];function eU(e){let[t,n]=S.useState({}),r=S.useCallback((e,t)=>(n(n=>({...n,[e]:t})),()=>{n(t=>{let n={...t};return delete n[e],n})}),[]);return[S.useMemo(()=>e?e.map(e=>{if(typeof e==`string`)return{data:{src:e}};let t={};return Object.keys(e).forEach(n=>{[`src`,...$H].includes(n)&&(t[n]=e[n])}),{data:t}}):Object.keys(t).reduce((e,n)=>{let{canPreview:r,data:i}=t[n];return r&&e.push({data:i,id:n}),e},[]),[e,t]),r,!!e]}function tU(){return tU=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{open:c,onOpenChange:l,current:u,onChange:d,...f}=o&&typeof o==`object`?o:{},[p,m,h]=eU(a),[g,_]=Hn(0,u),[v,y]=(0,S.useState)(!1),{src:b,...x}=p[g]?.data||{},[C,w]=Hn(!!c,c),T=In(e=>{w(e),e!==C&&l?.(e,{current:g})}),[E,D]=(0,S.useState)(null),O=S.useCallback((e,t,n,r)=>{let i=h?p.findIndex(e=>e.data.src===t):p.findIndex(t=>t.id===e);_(i<0?0:i),T(!0),D({x:n,y:r}),y(!0)},[p,h]);S.useEffect(()=>{C?v||_(0):y(!1)},[C]);let k=(e,t)=>{_(e),d?.(e,t)},A=()=>{T(!1),D(null)},j=S.useMemo(()=>({register:m,onPreview:O}),[m,O]);return S.createElement(FH.Provider,{value:j},r,S.createElement(QH,tU({"aria-hidden":!C,open:C,prefixCls:e,onClose:A,mousePosition:E,imgCommonProps:x,src:b,fallback:s,icons:i,current:g,count:p.length,onChange:k},f,{classNames:t?.popup,styles:n?.popup})))},rU=0;function iU(e,t){let[n]=S.useState(()=>(rU+=1,String(rU))),r=S.useContext(FH),i={data:t,canPreview:e};return S.useEffect(()=>{if(r)return r.register(n,i)},[]),S.useEffect(()=>{r&&r.register(n,i)},[e,t]),n}function aU(){return aU=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t=`rc-image`,previewPrefixCls:n=`${t}-preview`,rootClassName:r,className:i,style:a,classNames:o={},styles:s={},width:c,height:l,src:u,alt:d,placeholder:f,fallback:p,preview:m=!0,onClick:h,onError:g,onKeyDown:_,...v}=e,y=(0,S.useContext)(FH),b=!!m,{src:x,open:C,onOpenChange:w,cover:T,rootClassName:E,...D}=m&&typeof m==`object`?m:{},O=typeof T==`object`&&T.placement&&T.placement||`center`,k=typeof T==`object`&&T.coverNode?T.coverNode:T,[A,j]=Hn(!!C,C),[M,N]=(0,S.useState)(null),P=e=>{j(e),w?.(e)},F=()=>{P(!1)},I=f&&f!==!0,L=x??u,[R,z,B]=UH({src:u,isCustomPlaceholder:I,fallback:p}),V=(0,S.useMemo)(()=>{let t={};return $H.forEach(n=>{e[n]!==void 0&&(t[n]=e[n])}),t},$H.map(t=>e[t])),H=iU(b,(0,S.useMemo)(()=>({...V,src:L}),[L,V])),U=e=>{let t=e.target.getBoundingClientRect(),n=t.x+t.width/2,r=t.y+t.height/2;y?y.onPreview(H,L,n,r):(N({x:n,y:r}),P(!0)),h?.(e)},W=e=>{if(_?.(e),b&&(e.key===`Enter`||e.key===` `)){e.preventDefault();let t=e.target.getBoundingClientRect(),n=t.x+t.width/2,r=t.y+t.height/2;y?y.onPreview(H,L,n,r):(N({x:n,y:r}),P(!0))}};return S.createElement(S.Fragment,null,S.createElement(`div`,aU({},v,{className:J(t,r,o.root,{[`${t}-error`]:B===`error`}),onClick:b?U:h,role:b?`button`:v.role,tabIndex:b&&v.tabIndex==null?0:v.tabIndex,"aria-label":b?v[`aria-label`]??d:v[`aria-label`],onKeyDown:W,style:{width:c,height:l,...s.root}}),S.createElement(`img`,aU({},V,{className:J(`${t}-img`,{[`${t}-img-placeholder`]:f===!0},o.image,i),style:{height:l,...s.image,...a},ref:R},z,{width:c,height:l,onError:g})),B===`loading`&&S.createElement(`div`,{"aria-hidden":`true`,className:`${t}-placeholder`},f),T!==!1&&b&&S.createElement(`div`,{className:J(`${t}-cover`,o.cover,`${t}-cover-${O}`),style:{display:a?.display===`none`?`none`:void 0,...s.cover}},k)),!y&&b&&S.createElement(QH,aU({"aria-hidden":!A,open:A,prefixCls:n,onClose:F,mousePosition:M,src:L,alt:d,imageInfo:{width:c,height:l},fallback:p,imgCommonProps:V},D,{classNames:o?.popup,styles:s?.popup,rootClassName:J(E,r)})))};oU.PreviewGroup=nU;var sU=oU,cU=(e,t,n,r,i,a,o)=>{let[s]=Yd(`ImagePreview`,e?.zIndex),[c,l]=Od(e?.mask,t?.mask,`${n}-preview`);return S.useMemo(()=>{if(!e)return e;let{cover:u,getContainer:d,closeIcon:f,rootClassName:p}=e,{closeIcon:m}=t??{};return{motionName:Gm(`${n}-preview`,`fade`),...e,...o?{cover:u??o}:{},icons:a,getContainer:d??i,zIndex:s,closeIcon:f??m,rootClassName:J(r,p),mask:c,blurClassName:l.mask}},[e,t,n,r,i,o,a,s,c,l])};function lU(e){return(0,S.isValidElement)(e)?[e,void 0]:typeof e==`boolean`||hd(e)?[void 0,e]:[void 0,void 0]}function uU(e){let t=(0,S.useMemo)(()=>typeof e==`boolean`?e?{}:null:hd(e)?e:{},[e]);return(0,S.useMemo)(()=>{if(!t)return[t,``,``];let{open:e,onOpenChange:n,cover:r,actionsRender:i,visible:a,onVisibleChange:o,rootClassName:s,maskClassName:c,mask:l,forceRender:u,destroyOnClose:d,toolbarRender:f,...p}=t,m;n?m=n:o&&(m=(e,t)=>{let{current:n}=t||{};n===void 0?o(e,!e):o(e,!e,n)});let[h,g]=lU(l);return[{...p,open:e??a,onOpenChange:m,cover:r??h,mask:g,actionsRender:i??f},s,c]},[t])}var dU={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z`}},{tag:`path`,attrs:{d:`M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z`}}]},name:`rotate-left`,theme:`outlined`};function fU(){return fU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,fU({},e,{ref:t,icon:dU}))),mU={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z`}},{tag:`path`,attrs:{d:`M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z`}}]},name:`rotate-right`,theme:`outlined`};function hU(){return hU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,hU({},e,{ref:t,icon:mU}))),_U={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`swap`,theme:`outlined`};function vU(){return vU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,vU({},e,{ref:t,icon:_U}))),bU={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z`}}]},name:`zoom-in`,theme:`outlined`};function xU(){return xU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,xU({},e,{ref:t,icon:bU}))),CU={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z`}}]},name:`zoom-out`,theme:`outlined`};function wU(){return wU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,wU({},e,{ref:t,icon:CU}))),EU=e=>({position:e||`absolute`,inset:0}),DU=e=>{let{componentCls:t,motionDurationSlow:n,colorTextLightSolid:r}=e;return{[t]:{[`${t}-cover`]:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,color:r,background:new Rs(`#000`).setA(.3).toRgbString(),cursor:`pointer`,opacity:0,transition:`opacity ${n}`},"&:hover, &:focus-visible":{[`${t}-cover`]:{opacity:1}},[`${t}-cover-top`]:{inset:`0 0 auto 0`,justifyContent:`center`},[`${t}-cover-bottom`]:{inset:`auto 0 0 0`,justifyContent:`center`}}}},OU=e=>{let{motionEaseOut:t,previewCls:n,motionDurationSlow:r,componentCls:i,colorBgMask:a,marginXL:o,marginSM:s,margin:c,colorTextLightSolid:l,paddingSM:u,paddingLG:d,previewOperationHoverColor:f,previewOperationColorDisabled:p,previewOperationSize:m,zIndexPopup:h}=e,g=new Rs(a).setA(.1),_=g.clone().setA(.2),v={position:`absolute`,color:l,backgroundColor:g.toRgbString(),borderRadius:`50%`,padding:u,outline:0,border:0,cursor:`pointer`,transition:`all ${r}`,display:`flex`,fontSize:m,"&:hover":{backgroundColor:_.toRgbString()},"&:active":{backgroundColor:g.toRgbString()},"&:focus-visible":Zc(e)};return{[`${i}-preview`]:{textAlign:`center`,inset:0,position:`fixed`,userSelect:`none`,zIndex:h,[`${n}-mask`]:{inset:0,position:`absolute`,background:a,backdropFilter:`blur(0px)`,transition:`backdrop-filter ${r}`,[`&${i}-preview-mask-blur`]:{backdropFilter:`blur(4px)`},[`&${i}-preview-mask-hidden`]:{display:`none`}},[`${n}-body`]:{...EU(),"pointer-events":`none`,display:`flex`,alignItems:`center`,justifyContent:`center`,"> *":{pointerEvents:`auto`}},[`${n}-img`]:{maxWidth:`100%`,maxHeight:`70%`,verticalAlign:`middle`,transform:`scale3d(1, 1, 1)`,transition:`transform ${r} ${t} 0s`},[`&-movable ${n}-img`]:{cursor:`grab`},[`&-moving ${n}-img`]:{cursor:`grabbing`},[`${n}-close`]:{...v,top:s,insetInlineEnd:s},[`${n}-switch`]:{...v,top:`50%`,transform:`translateY(-50%)`,"&-disabled":{"&, &:hover, &:active":{color:p,background:`transparent`,cursor:`not-allowed`}},"&-prev":{insetInlineStart:s},"&-next":{insetInlineEnd:s}},[`${n}-footer`]:{position:`absolute`,bottom:o,left:{_skip_check_:!0,value:`50%`},display:`flex`,flexDirection:`column`,alignItems:`center`,color:e.previewOperationColor,transform:`translateX(-50%)`,gap:c},[`${n}-actions`]:{display:`flex`,gap:u,padding:`0 ${Y(d)}`,backgroundColor:g.toRgbString(),borderRadius:100,fontSize:m,"&-action":{color:`inherit`,background:`transparent`,border:0,font:`inherit`,padding:u,cursor:`pointer`,transition:`all ${r}`,display:`flex`,[`&:not(${n}-actions-action-disabled):hover`]:{color:f},"&:focus-visible":Zc(e),"&-disabled":{color:p,cursor:`not-allowed`}}}}}},kU=e=>{let{componentCls:t}=e;return{[t]:{position:`relative`,display:`inline-block`,...Qc(e),[`${t}-img`]:{width:`100%`,height:`auto`,verticalAlign:`middle`},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:`url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')`,backgroundRepeat:`no-repeat`,backgroundPosition:`center center`,backgroundSize:`30%`},[`${t}-placeholder`]:{...EU()}}}},AU=e=>{let{previewCls:t,motionDurationSlow:n}=e;return{[t]:{"&-fade":{transition:`opacity ${n}`,"&-enter, &-appear":{opacity:0,[`${t}-body`]:{transform:`scale(0)`},"&-active":{opacity:1,[`${t}-body`]:{transform:`scale(1)`,transition:`transform ${n}`}}},"&-leave":{opacity:1,"&-active":{opacity:0,[`${t}-body`]:{transform:`scale(0)`,transition:`transform ${n}`}}}}}}},jU=rl(`Image`,e=>{let t=gs(e,{previewCls:`${e.componentCls}-preview`,imagePreviewSwitchSize:e.controlHeightLG});return[kU(t),DU(t),OU(t),AU(t)]},e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new Rs(e.colorTextLightSolid).setA(.65).toRgbString(),previewOperationHoverColor:new Rs(e.colorTextLightSolid).setA(.85).toRgbString(),previewOperationColorDisabled:new Rs(e.colorTextLightSolid).setA(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5})),MU={rotateLeft:S.createElement(pU,null),rotateRight:S.createElement(gU,null),zoomIn:S.createElement(SU,null),zoomOut:S.createElement(TU,null),close:S.createElement(Rl,null),left:S.createElement(Hw,null),right:S.createElement(mg,null),flipX:S.createElement(yU,null),flipY:S.createElement(yU,{rotate:90})},NU=({previewPrefixCls:e,preview:t,classNames:n,styles:r,...i})=>{let{getPrefixCls:a,getPopupContainer:o,direction:s,preview:c,classNames:l,styles:u}=li(`image`),d=a(`image`,e),f=`${d}-preview`,p=bf(d),[m,h]=jU(d,p),g=J(m,h,p),[_,v,y]=uU(t),[b,x,C]=uU(c),w=S.useMemo(()=>({...MU,left:s===`rtl`?S.createElement(mg,null):S.createElement(Hw,null),right:s===`rtl`?S.createElement(Hw,null):S.createElement(mg,null)}),[s]),T=cU(_,b,d,g,o,MU),{mask:E,blurClassName:D}=T??{},O={...i,classNames:n,styles:r},[k,A]=Fd([l,n,{cover:J(C,y),popup:{root:J(x,v),mask:J({[`${d}-preview-mask-hidden`]:!E},D)}}],[u,r],{props:O},{popup:{_default:`root`}});return S.createElement(sU.PreviewGroup,{preview:T,previewPrefixCls:f,icons:w,...i,classNames:k,styles:A})},PU=e=>{let{prefixCls:t,preview:n,className:r,rootClassName:i,style:a,styles:o,classNames:s,wrapperStyle:c,fallback:l,...u}=e,{getPrefixCls:d,getPopupContainer:f,className:p,style:m,preview:h,styles:g,classNames:_,fallback:v}=li(`image`),y=d(`image`,t),b=bf(y),[x,C]=jU(y,b),w=J(i,x,C,b),T=J(r,x,p),[E,D,O]=uU(n),[k,A,j]=uU(h),M=cU(E,k,y,w,f,MU,!0),N={...e,preview:M},P=S.useMemo(()=>({cover:J(j,O),popup:{root:J(A,D)}}),[D,O,A,j]),{mask:F,blurClassName:I}=M??{},L=S.useMemo(()=>({mask:J({[`${y}-preview-mask-hidden`]:!F},I)}),[F,y,I]),[R,z]=Fd(S.useMemo(()=>[_,s,P,{popup:L}],[_,s,P,L]),[g,{root:c},o],{props:N},{popup:{_default:`root`}}),B={...m,...a},V=l??v;return S.createElement(sU,{prefixCls:y,preview:M||!1,rootClassName:w,className:T,style:B,fallback:V,...u,classNames:R,styles:z})};PU.PreviewGroup=NU;var FU=e=>{let{getPrefixCls:t,direction:n}=(0,S.useContext)(oi),{prefixCls:r,className:i}=e,a=t(`input-group`,r),[o,s]=bL(t(`input`)),c=J(a,s,{[`${a}-lg`]:e.size===`large`,[`${a}-sm`]:e.size===`small`,[`${a}-compact`]:e.compact,[`${a}-rtl`]:n===`rtl`},o,i),l=(0,S.useContext)(Sy),u=(0,S.useMemo)(()=>({...l,isFormItemInput:!1}),[l]);return S.createElement(Sy.Provider,{value:u},S.createElement(VV.Compact,{className:c,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))},IU=e=>{let{componentCls:t,paddingXS:n}=e;return{[t]:{display:`inline-flex`,alignItems:`center`,flexWrap:`nowrap`,columnGap:n,[`${t}-input-wrapper`]:{position:`relative`,[`${t}-mask-icon`]:{position:`absolute`,zIndex:`1`,top:`50%`,right:`50%`,transform:`translate(50%, -50%)`,pointerEvents:`none`},[`${t}-mask-input`]:{color:`transparent`,caretColor:e.colorText,"&::selection":{color:`transparent`}},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":`none`,margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":`textfield`}},"&-rtl":{direction:`rtl`},[`${t}-input`]:{textAlign:`center`,paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},LU=rl([`Input`,`OTP`],e=>IU(gs(e,eL(e))),tL),RU=S.forwardRef((e,t)=>{let{className:n,value:r,onChange:i,onActiveChange:a,index:o,mask:s,onFocus:c,...l}=e,{getPrefixCls:u}=S.useContext(oi),d=u(`otp`),f=typeof s==`string`?s:r,p=S.useRef(null);S.useImperativeHandle(t,()=>p.current);let m=e=>{i(o,e.target.value)},h=()=>{ri(()=>{let e=p.current?.input;document.activeElement===e&&e&&e.select()})},g=e=>{c?.(e),h()},_=e=>{let{key:t,ctrlKey:n,metaKey:i}=e;t===`ArrowLeft`?a(o-1):t===`ArrowRight`?a(o+1):t===`z`&&(n||i)?e.preventDefault():t===`Backspace`&&!r&&a(o-1),h()};return S.createElement(`span`,{className:`${d}-input-wrapper`,role:`presentation`},s&&r!==``&&r!==void 0&&S.createElement(`span`,{className:`${d}-mask-icon`,"aria-hidden":`true`},f),S.createElement(yB,{"aria-label":`OTP Input ${o+1}`,type:s===!0?`password`:`text`,...l,ref:p,value:r,onInput:m,onFocus:g,onKeyDown:_,onMouseDown:h,onMouseUp:h,className:J(n,{[`${d}-mask-input`]:s})}))});function zU(e){return(e||``).split(``)}var BU=e=>{let{index:t,prefixCls:n,separator:r,className:i,style:a}=e,o=typeof r==`function`?r(t):r;return o?S.createElement(`span`,{className:J(`${n}-separator`,i),style:a},o):null},VU=S.forwardRef((e,t)=>{let{prefixCls:n,length:r=6,size:i,defaultValue:a,value:o,onChange:s,formatter:c,separator:l,variant:u,disabled:d,status:f,autoFocus:p,mask:m,type:h,autoComplete:g,onInput:_,onFocus:v,inputMode:y,classNames:b,styles:x,className:C,style:w,...T}=e,{classNames:E,styles:D,getPrefixCls:O,direction:k,style:A,className:j}=li(`otp`),M=O(`otp`,n),N={...e,length:r},[P,F]=Fd([E,b],[D,x],{props:N}),I=Vu(T,{aria:!0,data:!0,attr:!0}),[L,R]=LU(M),z=th(e=>i??e),B=S.useContext(Sy),V=oC(B.status,f),H=S.useMemo(()=>({...B,status:V,hasFeedback:!1,feedbackIcon:null}),[B,V]),U=S.useRef(null),W=S.useRef({});S.useImperativeHandle(t,()=>({focus:()=>{W.current[0]?.focus()},blur:()=>{for(let e=0;ec?c(e):e,[te,ne]=S.useState(()=>zU(ee(a||``)));S.useEffect(()=>{o!==void 0&&ne(zU(o))},[o]);let re=In(e=>{ne(e),_&&_(e),s&&e.length===r&&e.every(e=>e)&&e.some((e,t)=>te[t]!==e)&&s(e.join(``))}),ie=In((e,t)=>{let n=Zr(te);for(let t=0;t=0&&!n[e];--e)n.pop();return n=zU(ee(n.map(e=>e||` `).join(``))).map((e,t)=>e===` `&&!n[t]?n[t]:e),n}),ae=(e,t)=>{let n=ie(e,t),i=Math.min(e+t.length,r-1);i!==e&&n[e]!==void 0&&W.current[i]?.focus(),re(n)},G=e=>{W.current[e]?.focus()},oe=(e,t)=>{for(let e=0;e{let n=`otp-${t}`,i=te[t]||``;return S.createElement(S.Fragment,{key:n},S.createElement(RU,{ref:e=>{W.current[t]=e},index:t,size:z,htmlSize:1,className:J(P.input,`${M}-input`),style:F.input,onChange:ae,value:i,onActiveChange:G,autoFocus:t===0&&p,onFocus:e=>oe(e,t),...K}),tS.createElement(Al,UU({},e,{ref:t,icon:HU}))),GU={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z`}}]},name:`eye`,theme:`outlined`};function KU(){return KU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,KU({},e,{ref:t,icon:GU}))),JU=e=>e?S.createElement(qU,null):S.createElement(WU,null),YU={click:`onClick`,hover:`onMouseOver`},XU=S.forwardRef((e,t)=>{let{disabled:n,action:r=`click`,visibilityToggle:i=!0,iconRender:a=JU,suffix:o}=e,s=S.useContext(zp),c=n??s,l=hd(i)&&i.visible!==void 0,[u,d]=(0,S.useState)(()=>l?i.visible:!1),f=(0,S.useRef)(null);S.useEffect(()=>{l&&d(i.visible)},[l,i]);let p=_B(f),m=()=>{if(c)return;u&&p();let e=!u;d(e),hd(i)&&i.onVisibleChange?.(e)},h=e=>{let t=YU[r]||``,n=a(u),i={[t]:m,className:`${e}-icon`,key:`passwordIcon`,onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}};return S.cloneElement(S.isValidElement(n)?n:S.createElement(`span`,null,n),i)},{className:g,prefixCls:_,inputPrefixCls:v,size:y,...b}=e,{getPrefixCls:x}=S.useContext(oi),C=x(`input`,v),w=x(`input-password`,_),T=i&&h(w),E=J(w,g,{[`${w}-${y}`]:!!y}),D={...Sr(b,[`suffix`,`iconRender`,`visibilityToggle`]),type:u?`text`:`password`,className:E,prefixCls:C,suffix:S.createElement(S.Fragment,null,T,o)};return y&&(D.size=y),S.createElement(yB,{ref:$n(t,f),...D})}),ZU=rl([`Input`,`Search`],e=>{let{componentCls:t}=e,n=`${t}-btn`;return{[t]:{width:`100%`,[n]:{"&-filled":{background:e.colorFillTertiary,"&:not(:disabled)":{"&:hover":{background:e.colorFillSecondary},"&:active":{background:e.colorFill}}}}}}}),QU=S.forwardRef((e,t)=>{let{prefixCls:n,inputPrefixCls:r,className:i,size:a,style:o,enterButton:s=!1,addonAfter:c,loading:l,disabled:u,onSearch:d,onChange:f,onCompositionStart:p,onCompositionEnd:m,variant:h,onPressEnter:g,classNames:_,styles:v,hidden:y,...b}=e,{direction:x,getPrefixCls:C,classNames:w,styles:T}=li(`inputSearch`),E={...e,enterButton:s},[D,O]=Fd([w,_],[T,v],{props:E},{button:{_default:`root`}}),k=S.useRef(!1),A=C(`input-search`,n),j=C(`input`,r),[M,N]=ZU(A),{compactSize:P}=ih(A,x),F=th(e=>a??P??e),I=S.useRef(null),L=e=>{e?.target&&e.type===`click`&&d&&d(e.target.value,e,{source:`clear`}),f?.(e)},R=e=>{document.activeElement===I.current?.input&&e.preventDefault()},z=e=>{d&&d(I.current?.input?.value,e,{source:`input`})},B=e=>{k.current||l||(g?.(e),z(e))},V=typeof s==`boolean`?S.createElement(NC,null):null,H=`${A}-btn`,U=J(H,{[`${H}-${h}`]:h}),W,ee=s||{},te=ee.type&&ee.type.__ANT_BUTTON===!0;W=te||ee.type===`button`?Pp(ee,{onMouseDown:R,onClick:e=>{ee?.props?.onClick?.(e),z(e)},key:`enterButton`,...te?{className:U,size:F}:{}}):S.createElement(Zg,{classNames:D.button,styles:O.button,className:U,color:s?`primary`:`default`,size:F,disabled:u,key:`enterButton`,onMouseDown:R,onClick:z,loading:l,icon:V,variant:h===`borderless`||h===`filled`||h===`underlined`?`text`:s?`solid`:void 0},s),c&&(W=[W,Pp(c,{key:`addonAfter`})]);let ne=J(A,N,{[`${A}-rtl`]:x===`rtl`,[`${A}-${F}`]:!!F,[`${A}-with-button`]:!!s},i,M,D.root),re=e=>{k.current=!0,p?.(e)},ie=e=>{k.current=!1,m?.(e)},ae=Vu(b,{data:!0}),G=Sr({...b,classNames:Sr(D,[`button`,`root`]),styles:Sr(O,[`button`,`root`]),prefixCls:j,type:`search`,size:F,variant:h,onPressEnter:B,onCompositionStart:re,onCompositionEnd:ie,onChange:L,disabled:u},Object.keys(ae));return S.createElement(sh,{className:ne,style:{...o,...O.root},...ae,hidden:y},S.createElement(yB,{ref:$n(I,t),...G}),W)}),$U=` min-height:0 !important; max-height:none !important; height:0 !important; @@ -307,10 +307,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho top:0 !important; right:0 !important; pointer-events: none !important; -`,rW=[`letter-spacing`,`line-height`,`padding-top`,`padding-bottom`,`font-family`,`font-weight`,`font-size`,`font-variant`,`text-rendering`,`text-transform`,`width`,`text-indent`,`padding-left`,`padding-right`,`border-width`,`box-sizing`,`word-break`,`white-space`],iW={},aW;function oW(e,t=!1){let n=e.getAttribute(`id`)||e.getAttribute(`data-reactid`)||e.getAttribute(`name`);if(t&&iW[n])return iW[n];let r=window.getComputedStyle(e),i=r.getPropertyValue(`box-sizing`)||r.getPropertyValue(`-moz-box-sizing`)||r.getPropertyValue(`-webkit-box-sizing`),a=parseFloat(r.getPropertyValue(`padding-bottom`))+parseFloat(r.getPropertyValue(`padding-top`)),o=parseFloat(r.getPropertyValue(`border-bottom-width`))+parseFloat(r.getPropertyValue(`border-top-width`)),s={sizingStyle:rW.map(e=>`${e}:${r.getPropertyValue(e)}`).join(`;`),paddingSize:a,borderSize:o,boxSizing:i};return t&&n&&(iW[n]=s),s}function sW(e,t=!1,n=null,r=null){aW||(aW=document.createElement(`textarea`),aW.setAttribute(`tab-index`,`-1`),aW.setAttribute(`aria-hidden`,`true`),aW.setAttribute(`name`,`hiddenTextarea`),document.body.appendChild(aW)),e.getAttribute(`wrap`)?aW.setAttribute(`wrap`,e.getAttribute(`wrap`)):aW.removeAttribute(`wrap`);let{paddingSize:i,borderSize:a,boxSizing:o,sizingStyle:s}=oW(e,t);aW.setAttribute(`style`,`${s};${nW}`),aW.value=e.value||e.placeholder||``;let c,l,u,d=aW.scrollHeight;if(o===`border-box`?d+=a:o===`content-box`&&(d-=i),n!==null||r!==null){aW.value=` `;let e=aW.scrollHeight-i;n!==null&&(c=e*n,o===`border-box`&&(c=c+i+a),d=Math.max(c,d)),r!==null&&(l=e*r,o===`border-box`&&(l=l+i+a),u=d>l?``:`hidden`,d=Math.min(l,d))}let f={height:d,overflowY:u,resize:`none`};return c&&(f.minHeight=c),l&&(f.maxHeight=l),f}function cW(){return cW=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,defaultValue:r,value:i,autoSize:a,onResize:o,className:s,style:c,disabled:l,onChange:u,onInternalAutoSize:d,...f}=e,[p,m]=Hn(r,i),h=p??``,g=e=>{m(e.target.value),u?.(e)},_=S.useRef();S.useImperativeHandle(t,()=>({textArea:_.current}));let[v,y]=S.useMemo(()=>a&&typeof a==`object`?[a.minRows,a.maxRows]:[],[a]),b=!!a,[x,C]=S.useState(dW),[w,T]=S.useState(),E=()=>{C(lW)};zn(()=>{b&&E()},[i,v,y,b]),zn(()=>{if(x===lW)C(uW);else if(x===uW){let e=sW(_.current,!1,v,y);C(dW),T(e)}},[x]);let D=S.useRef(),O=()=>{ri.cancel(D.current)},k=e=>{x===dW&&(o?.(e),a&&(O(),D.current=ri(()=>{E()})))};S.useEffect(()=>O,[]);let A=b?w:null,j={...c,...A};return(x===lW||x===uW)&&(j.overflowY=`hidden`,j.overflowX=`hidden`),S.createElement(Wr,{onResize:k,disabled:!(a||o)},S.createElement(`textarea`,cW({},f,{ref:_,style:j,className:J(n,s,{[`${n}-disabled`]:l}),disabled:l,value:h,onChange:g})))});function pW(){return pW=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let[O,k]=Hn(e,t),A=O==null?``:String(O),[j,M]=S.useState(!1),N=S.useRef(!1),[P,F]=S.useState(null),I=(0,S.useRef)(null),L=(0,S.useRef)(null),R=()=>L.current?.textArea,z=()=>{R().focus()};(0,S.useImperativeHandle)(D,()=>({resizableTextArea:L.current,focus:z,blur:()=>{R().blur()},nativeElement:I.current?.nativeElement||R()})),(0,S.useEffect)(()=>{M(e=>!h&&e)},[h]);let[B,V]=S.useState(null);S.useEffect(()=>{B&&R().setSelectionRange(...B)},[B]);let H=gB(f,d),U=H.max??o,W=Number(U)>0,ee=H.strategy(A),te=!!U&&ee>U,ne=(e,t)=>{let n=t;!N.current&&H.exceedFormatter&&H.max&&H.strategy(t)>H.max&&(n=H.exceedFormatter(t,{max:H.max}),t!==n&&V([R().selectionStart||0,R().selectionEnd||0])),k(n),pB(e.currentTarget,e,i,n)},re=e=>{N.current=!0,s?.(e)},ie=e=>{N.current=!1,ne(e,e.currentTarget.value),c?.(e)},ae=e=>{ne(e,e.target.value)},G=e=>{e.key===`Enter`&&x&&!e.nativeEvent.isComposing&&x(e),T?.(e)},oe=e=>{M(!0),n?.(e)},K=e=>{M(!1),r?.(e)},se=e=>{k(``),z(),pB(R(),e,i)},ce=l,q;H.show&&(q=H.showFormatter?H.showFormatter({value:A,count:ee,maxLength:U}):`${ee}${W?` / ${U}`:``}`,ce=S.createElement(S.Fragment,null,ce,S.createElement(`span`,{className:J(`${u}-data-count`,_?.count),style:v?.count},q)));let le=e=>{y?.(e),R()?.style.height&&F(!0)},ue=!w&&!d&&!a;return S.createElement(hB,{ref:I,value:A,allowClear:a,handleReset:se,suffix:ce,prefixCls:u,classNames:{..._,affixWrapper:J(_?.affixWrapper,{[`${u}-show-count`]:d,[`${u}-textarea-allow-clear`]:a})},disabled:h,focused:j,className:J(p,te&&`${u}-out-of-range`),style:{...m,...P&&!ue?{height:`auto`}:{}},dataAttrs:{affixWrapper:{"data-count":typeof q==`string`?q:void 0}},hidden:g,readOnly:C,onClear:b},S.createElement(fW,pW({},E,{autoSize:w,maxLength:o,onKeyDown:G,onChange:ae,onFocus:oe,onBlur:K,onCompositionStart:re,onCompositionEnd:ie,className:J(_?.textarea),style:{resize:m?.resize,...v?.textarea},disabled:h,prefixCls:u,onResize:le,ref:L,readOnly:C})))}),hW=e=>{let{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:`100%`,height:`auto`,minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:`bottom`,transition:`all ${e.motionDurationSlow}`,resize:`vertical`,[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:`auto`},[r]:{position:`relative`,"&-show-count":{[`${t}-data-count`]:{position:`absolute`,bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:`nowrap`,pointerEvents:`none`}},[` +`,eW=[`letter-spacing`,`line-height`,`padding-top`,`padding-bottom`,`font-family`,`font-weight`,`font-size`,`font-variant`,`text-rendering`,`text-transform`,`width`,`text-indent`,`padding-left`,`padding-right`,`border-width`,`box-sizing`,`word-break`,`white-space`],tW={},nW;function rW(e,t=!1){let n=e.getAttribute(`id`)||e.getAttribute(`data-reactid`)||e.getAttribute(`name`);if(t&&tW[n])return tW[n];let r=window.getComputedStyle(e),i=r.getPropertyValue(`box-sizing`)||r.getPropertyValue(`-moz-box-sizing`)||r.getPropertyValue(`-webkit-box-sizing`),a=parseFloat(r.getPropertyValue(`padding-bottom`))+parseFloat(r.getPropertyValue(`padding-top`)),o=parseFloat(r.getPropertyValue(`border-bottom-width`))+parseFloat(r.getPropertyValue(`border-top-width`)),s={sizingStyle:eW.map(e=>`${e}:${r.getPropertyValue(e)}`).join(`;`),paddingSize:a,borderSize:o,boxSizing:i};return t&&n&&(tW[n]=s),s}function iW(e,t=!1,n=null,r=null){nW||(nW=document.createElement(`textarea`),nW.setAttribute(`tab-index`,`-1`),nW.setAttribute(`aria-hidden`,`true`),nW.setAttribute(`name`,`hiddenTextarea`),document.body.appendChild(nW)),e.getAttribute(`wrap`)?nW.setAttribute(`wrap`,e.getAttribute(`wrap`)):nW.removeAttribute(`wrap`);let{paddingSize:i,borderSize:a,boxSizing:o,sizingStyle:s}=rW(e,t);nW.setAttribute(`style`,`${s};${$U}`),nW.value=e.value||e.placeholder||``;let c,l,u,d=nW.scrollHeight;if(o===`border-box`?d+=a:o===`content-box`&&(d-=i),n!==null||r!==null){nW.value=` `;let e=nW.scrollHeight-i;n!==null&&(c=e*n,o===`border-box`&&(c=c+i+a),d=Math.max(c,d)),r!==null&&(l=e*r,o===`border-box`&&(l=l+i+a),u=d>l?``:`hidden`,d=Math.min(l,d))}let f={height:d,overflowY:u,resize:`none`};return c&&(f.minHeight=c),l&&(f.maxHeight=l),f}function aW(){return aW=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,defaultValue:r,value:i,autoSize:a,onResize:o,className:s,style:c,disabled:l,onChange:u,onInternalAutoSize:d,...f}=e,[p,m]=Hn(r,i),h=p??``,g=e=>{m(e.target.value),u?.(e)},_=S.useRef();S.useImperativeHandle(t,()=>({textArea:_.current}));let[v,y]=S.useMemo(()=>a&&typeof a==`object`?[a.minRows,a.maxRows]:[],[a]),b=!!a,[x,C]=S.useState(cW),[w,T]=S.useState(),E=()=>{C(oW)};zn(()=>{b&&E()},[i,v,y,b]),zn(()=>{if(x===oW)C(sW);else if(x===sW){let e=iW(_.current,!1,v,y);C(cW),T(e)}},[x]);let D=S.useRef(),O=()=>{ri.cancel(D.current)},k=e=>{x===cW&&(o?.(e),a&&(O(),D.current=ri(()=>{E()})))};S.useEffect(()=>O,[]);let A=b?w:null,j={...c,...A};return(x===oW||x===sW)&&(j.overflowY=`hidden`,j.overflowX=`hidden`),S.createElement(Wr,{onResize:k,disabled:!(a||o)},S.createElement(`textarea`,aW({},f,{ref:_,style:j,className:J(n,s,{[`${n}-disabled`]:l}),disabled:l,value:h,onChange:g})))});function uW(){return uW=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let[O,k]=Hn(e,t),A=O==null?``:String(O),[j,M]=S.useState(!1),N=S.useRef(!1),[P,F]=S.useState(null),I=(0,S.useRef)(null),L=(0,S.useRef)(null),R=()=>L.current?.textArea,z=()=>{R().focus()};(0,S.useImperativeHandle)(D,()=>({resizableTextArea:L.current,focus:z,blur:()=>{R().blur()},nativeElement:I.current?.nativeElement||R()})),(0,S.useEffect)(()=>{M(e=>!h&&e)},[h]);let[B,V]=S.useState(null);S.useEffect(()=>{B&&R().setSelectionRange(...B)},[B]);let H=pB(f,d),U=H.max??o,W=Number(U)>0,ee=H.strategy(A),te=!!U&&ee>U,ne=(e,t)=>{let n=t;!N.current&&H.exceedFormatter&&H.max&&H.strategy(t)>H.max&&(n=H.exceedFormatter(t,{max:H.max}),t!==n&&V([R().selectionStart||0,R().selectionEnd||0])),k(n),uB(e.currentTarget,e,i,n)},re=e=>{N.current=!0,s?.(e)},ie=e=>{N.current=!1,ne(e,e.currentTarget.value),c?.(e)},ae=e=>{ne(e,e.target.value)},G=e=>{e.key===`Enter`&&x&&!e.nativeEvent.isComposing&&x(e),T?.(e)},oe=e=>{M(!0),n?.(e)},K=e=>{M(!1),r?.(e)},se=e=>{k(``),z(),uB(R(),e,i)},ce=l,q;H.show&&(q=H.showFormatter?H.showFormatter({value:A,count:ee,maxLength:U}):`${ee}${W?` / ${U}`:``}`,ce=S.createElement(S.Fragment,null,ce,S.createElement(`span`,{className:J(`${u}-data-count`,_?.count),style:v?.count},q)));let le=e=>{y?.(e),R()?.style.height&&F(!0)},ue=!w&&!d&&!a;return S.createElement(fB,{ref:I,value:A,allowClear:a,handleReset:se,suffix:ce,prefixCls:u,classNames:{..._,affixWrapper:J(_?.affixWrapper,{[`${u}-show-count`]:d,[`${u}-textarea-allow-clear`]:a})},disabled:h,focused:j,className:J(p,te&&`${u}-out-of-range`),style:{...m,...P&&!ue?{height:`auto`}:{}},dataAttrs:{affixWrapper:{"data-count":typeof q==`string`?q:void 0}},hidden:g,readOnly:C,onClear:b},S.createElement(lW,uW({},E,{autoSize:w,maxLength:o,onKeyDown:G,onChange:ae,onFocus:oe,onBlur:K,onCompositionStart:re,onCompositionEnd:ie,className:J(_?.textarea),style:{resize:m?.resize,...v?.textarea},disabled:h,prefixCls:u,onResize:le,ref:L,readOnly:C})))}),fW=e=>{let{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:`100%`,height:`auto`,minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:`bottom`,transition:`all ${e.motionDurationSlow}`,resize:`vertical`,[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:`auto`},[r]:{position:`relative`,"&-show-count":{[`${t}-data-count`]:{position:`absolute`,bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:`nowrap`,pointerEvents:`none`}},[` &-allow-clear > ${t}, &-affix-wrapper${r}-has-feedback ${t} - `]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:`inherit`,border:`none`,outline:`none`,background:`transparent`,minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:`none !important`}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:`absolute`,insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:`absolute`,top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:`inline-flex`,alignItems:`center`,margin:`auto`,pointerEvents:`none`}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:`ltr`,insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},gW=rl([`Input`,`TextArea`],e=>hW(gs(e,nL(e))),rL,{resetFont:!1}),_W=(0,S.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,size:i,disabled:a,status:o,allowClear:s,classNames:c,rootClassName:l,className:u,style:d,styles:f,variant:p,showCount:m,onMouseDown:h,onResize:g,..._}=e,{getPrefixCls:v,direction:y,allowClear:b,autoComplete:x,className:C,style:w,classNames:T,styles:E}=li(`textArea`),D=S.useContext(zp),O=a??D,{status:k,hasFeedback:A,feedbackIcon:j}=S.useContext(Sy),M=cC(k,o),[N,P]=Fd([T,c],[E,f],{props:e}),F=S.useRef(null);S.useImperativeHandle(t,()=>({resizableTextArea:F.current?.resizableTextArea,focus:e=>{l_(F.current?.resizableTextArea?.textArea,e)},blur:()=>F.current?.blur(),nativeElement:F.current?.nativeElement||null}));let I=v(`input`,n),L=bf(I),[R,z]=xL(I,l);gW(I,L);let{compactSize:B,compactItemClassnames:V}=ih(I,y),H=th(e=>i??B??e),[U,W]=_C(`textArea`,p,r),ee=yB(s??b),[te,ne]=S.useState(!1),[re,ie]=S.useState(!1),ae=e=>{ne(!0),h?.(e);let t=()=>{ne(!1),document.removeEventListener(`mouseup`,t)};document.addEventListener(`mouseup`,t)},G=e=>{if(g?.(e),te&&typeof getComputedStyle==`function`){let e=F.current?.nativeElement?.querySelector(`textarea`);e&&getComputedStyle(e).resize===`both`&&ie(!0)}};return S.createElement(mW,{autoComplete:x,..._,style:{...P.root,...w,...d},styles:P,disabled:O,allowClear:ee,className:J(z,L,u,l,V,C,N.root,{[`${I}-textarea-affix-wrapper-resize-dirty`]:re}),classNames:{...N,textarea:J({[`${I}-sm`]:H===`small`,[`${I}-lg`]:H===`large`},R,N.textarea,te&&`${I}-mouse-active`),variant:J({[`${I}-${U}`]:W},sC(I,M)),affixWrapper:J(`${I}-textarea-affix-wrapper`,{[`${I}-affix-wrapper-rtl`]:y===`rtl`,[`${I}-affix-wrapper-sm`]:H===`small`,[`${I}-affix-wrapper-lg`]:H===`large`,[`${I}-textarea-show-count`]:m||e.count?.show},R)},prefixCls:I,suffix:A&&S.createElement(`span`,{className:`${I}-textarea-suffix`},j),showCount:m,ref:F,onResize:G,onMouseDown:ae})}),vW=SB;vW.Group=RU,vW.Search=tW,vW.TextArea=_W,vW.Password=$U,vW.OTP=WU;function yW(e,t,n){return typeof n==`boolean`?n:e.length?!0:Cr(t).some(e=>e.type===OE)}var bW=({suffixCls:e,tagName:t,displayName:n})=>n=>S.forwardRef((r,i)=>S.createElement(n,{ref:i,suffixCls:e,tagName:t,...r})),xW=S.forwardRef((e,t)=>{let{prefixCls:n,suffixCls:r,className:i,tagName:a,...o}=e,{getPrefixCls:s}=S.useContext(oi),c=s(`layout`,n),[l]=SE(c),u=r?`${c}-${r}`:c;return S.createElement(a,{className:J(n||u,i,l),ref:t,...o})}),SW=S.forwardRef((e,t)=>{let{direction:n}=S.useContext(oi),[r,i]=S.useState([]),{prefixCls:a,className:o,rootClassName:s,children:c,hasSider:l,tagName:u,style:d,...f}=e,p=Sr(f,[`suffixCls`]),{getPrefixCls:m,className:h,style:g}=li(`layout`),_=m(`layout`,a),v=yW(r,c,l),[y,b]=SE(_),x=J(_,{[`${_}-has-sider`]:v,[`${_}-rtl`]:n===`rtl`},h,o,s,y,b),C=S.useMemo(()=>({siderHook:{addSider:e=>{i(t=>[].concat(Zr(t),[e]))},removeSider:e=>{i(t=>t.filter(t=>t!==e))}}}),[]);return S.createElement(vE.Provider,{value:C},S.createElement(u,{ref:t,className:x,style:{...g,...d},...p},c))}),CW=bW({tagName:`div`,displayName:`Layout`})(SW),wW=bW({suffixCls:`header`,tagName:`header`,displayName:`Header`})(xW),TW=bW({suffixCls:`footer`,tagName:`footer`,displayName:`Footer`})(xW),EW=bW({suffixCls:`content`,tagName:`main`,displayName:`Content`})(xW),DW=CW;DW.Header=wW,DW.Footer=TW,DW.Content=EW,DW.Sider=OE,DW._InternalSiderContext=EE;var OW={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z`}}]},name:`double-left`,theme:`outlined`};function kW(){return kW=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,kW({},e,{ref:t,icon:OW}))),jW={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z`}}]},name:`double-right`,theme:`outlined`};function MW(){return MW=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,MW({},e,{ref:t,icon:jW}))),PW={items_per_page:`条/页`,jump_to:`跳至`,jump_to_confirm:`确定`,page:`页`,prev_page:`上一页`,next_page:`下一页`,prev_5:`向前 5 页`,next_5:`向后 5 页`,prev_3:`向前 3 页`,next_3:`向后 3 页`,page_size:`页码`},FW=[10,20,50,100],IW=e=>{let{pageSizeOptions:t=FW,locale:n,changeSize:r,pageSize:i,goButton:a,quickGo:o,rootPrefixCls:s,disabled:c,buildOptionText:l,showSizeChanger:u,sizeChangerRender:d}=e,[f,p]=S.useState(``),m=S.useMemo(()=>!f||Number.isNaN(f)?void 0:Number(f),[f]),h=typeof l==`function`?l:e=>`${e} ${n.items_per_page}`,g=e=>{let t=e.target.value;/^\d*$/.test(t)&&p(t)},_=e=>{a||f===``||(p(``),!(e.relatedTarget&&(e.relatedTarget.className.includes(`${s}-item-link`)||e.relatedTarget.className.includes(`${s}-item`)))&&o?.(m))},v=e=>{f!==``&&(e.keyCode===om.ENTER||e.type===`click`)&&(p(``),o?.(m))},y=()=>t.some(e=>e.toString()===i.toString())?t:t.concat([i]).sort((e,t)=>(Number.isNaN(Number(e))?0:Number(e))-(Number.isNaN(Number(t))?0:Number(t))),b=`${s}-options`;if(!u&&!o)return null;let x=null,C=null,w=null;return u&&d&&(x=d({disabled:c,size:i,onSizeChange:e=>{r?.(Number(e))},"aria-label":n.page_size,className:`${b}-size-changer`,options:y().map(e=>({label:h(e),value:e}))})),o&&(a&&(w=typeof a==`boolean`?S.createElement(`button`,{type:`button`,onClick:v,onKeyUp:v,disabled:c,className:`${b}-quick-jumper-button`},n.jump_to_confirm):S.createElement(`span`,{onClick:v,onKeyUp:v},a)),C=S.createElement(`div`,{className:`${b}-quick-jumper`},n.jump_to,S.createElement(`input`,{disabled:c,type:`text`,value:f,onChange:g,onKeyUp:v,onBlur:_,"aria-label":n.page}),n.page,w)),S.createElement(`li`,{className:b},x,C)},LW=e=>{let{rootPrefixCls:t,page:n,active:r,className:i,style:a,showTitle:o,onClick:s,onKeyPress:c,itemRender:l}=e,u=`${t}-item`,d=J(u,`${u}-${n}`,{[`${u}-active`]:r,[`${u}-disabled`]:!n},i),f=()=>{s(n)},p=e=>{c(e,s,n)},m=l(n,`page`,S.createElement(`a`,{rel:`nofollow`},n));return m?S.createElement(`li`,{title:o?String(n):null,className:d,style:a,onClick:f,onKeyDown:p,tabIndex:0},m):null};function RW(){return RW=Object.assign?Object.assign.bind():function(e){for(var t=1;tn;function BW(){}function VW(e){let t=Number(e);return typeof t==`number`&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function HW(e,t,n){let r=e===void 0?t:e;return Math.floor((n-1)/r)+1}var UW=e=>{let{prefixCls:t=`rc-pagination`,selectPrefixCls:n=`rc-select`,className:r,classNames:i,styles:a,current:o,defaultCurrent:s=1,total:c=0,pageSize:l,defaultPageSize:u=10,onChange:d=BW,hideOnSinglePage:f,align:p,showPrevNextJumpers:m=!0,showQuickJumper:h,showLessItems:g,showTitle:_=!0,onShowSizeChange:v=BW,locale:y=PW,style:b,totalBoundaryShowSizeChanger:x=50,disabled:C,simple:w,showTotal:T,showSizeChanger:E=c>x,sizeChangerRender:D,pageSizeOptions:O,itemRender:k=zW,jumpPrevIcon:A,jumpNextIcon:j,prevIcon:M,nextIcon:N}=e,P=S.useRef(null),[F,I]=Hn(u,l),[L,R]=Hn(s,o),z=Math.max(1,Math.min(L,HW(void 0,F,c))),[B,V]=S.useState(z);(0,S.useEffect)(()=>{V(z)},[z]),`current`in e;let H=Math.max(1,z-(g?3:5)),U=Math.min(HW(void 0,F,c),z+(g?3:5));function W(n,r){let i=n||S.createElement(`button`,{type:`button`,"aria-label":r,className:`${t}-item-link`});return typeof n==`function`&&(i=S.createElement(n,e)),i}function ee(e){let t=e.target.value,n=HW(void 0,F,c),r;return r=t===``?t:Number.isNaN(Number(t))?B:t>=n?n:Number(t),r}function te(e){return VW(e)&&e!==z&&VW(c)&&c>0}let ne=c>F?h:!1;function re(e){(e.keyCode===om.UP||e.keyCode===om.DOWN)&&e.preventDefault()}function ie(e){let t=ee(e);switch(t!==B&&V(t),e.keyCode){case om.ENTER:oe(t);break;case om.UP:oe(t-1);break;case om.DOWN:oe(t+1);break;default:break}}function ae(e){oe(ee(e))}function G(e){let t=HW(e,F,c),n=z>t&&t!==0?t:z;I(e),V(n),v?.(z,e),R(n),d?.(n,e)}function oe(e){if(te(e)&&!C){let t=HW(void 0,F,c),n=e;return e>t?n=t:e<1&&(n=1),n!==B&&V(n),R(n),d?.(n,F),n}return z}let K=z>1,se=zc?c:z*F])),Se=null,Ce=HW(void 0,F,c);if(f&&c<=F)return null;let we=[],Te={rootPrefixCls:t,onClick:oe,onKeyPress:de,showTitle:_,itemRender:k,page:-1,className:i?.item,style:a?.item},Ee=z-1>0?z-1:0,De=z+1=Me*2&&z!==3&&(we[0]=S.cloneElement(we[0],{className:J(`${t}-item-after-jump-prev`,we[0].props.className)}),we.unshift(ye)),Ce-z>=Me*2&&z!==Ce-2){let e=we[we.length-1];we[we.length-1]=S.cloneElement(e,{className:J(`${t}-item-before-jump-next`,e.props.className)}),we.push(Se)}a!==1&&we.unshift(S.createElement(LW,RW({},Te,{key:1,page:1}))),o!==Ce&&we.push(S.createElement(LW,RW({},Te,{key:Ce,page:Ce})))}let Ne=ge(Ee);if(Ne){let e=!K||!Ce;Ne=S.createElement(`li`,{title:_?y.prev_page:null,onClick:ce,tabIndex:e?null:0,onKeyDown:fe,className:J(`${t}-prev`,i?.item,{[`${t}-disabled`]:e}),style:a?.item,"aria-disabled":e},Ne)}let Pe=_e(De);if(Pe){let e,n;w?(e=!se,n=K?0:null):(e=!se||!Ce,n=e?null:0),Pe=S.createElement(`li`,{title:_?y.next_page:null,onClick:q,tabIndex:n,onKeyDown:pe,className:J(`${t}-next`,i?.item,{[`${t}-disabled`]:e}),style:a?.item,"aria-disabled":e},Pe)}let Fe=J(t,r,{[`${t}-start`]:p===`start`,[`${t}-center`]:p===`center`,[`${t}-end`]:p===`end`,[`${t}-simple`]:w,[`${t}-disabled`]:C});return S.createElement(`ul`,RW({className:Fe,style:b,ref:P},be),xe,Ne,w?je:we,Pe,S.createElement(IW,{locale:y,rootPrefixCls:t,disabled:C,selectPrefixCls:n,changeSize:G,pageSize:F,pageSizeOptions:O,quickGo:ne?oe:null,goButton:Ae,showSizeChanger:E,sizeChangerRender:D}))},WW=e=>{let{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:`not-allowed`,[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`}},"&:focus-visible":{cursor:`not-allowed`,[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`}}},[`&${t}-disabled`]:{cursor:`not-allowed`,[`${t}-item`]:{cursor:`not-allowed`,backgroundColor:`transparent`,"&:hover, &:active":{backgroundColor:`transparent`},a:{color:e.colorTextDisabled,backgroundColor:`transparent`,border:`none`,cursor:`not-allowed`},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:hover, &:active":{backgroundColor:`transparent`},[`${t}-simple&`]:{backgroundColor:`transparent`,"&:hover, &:active":{backgroundColor:`transparent`}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},GW=e=>{let{componentCls:t}=e;return{[`&${t}-small ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-quick-jumper":{input:{...yL(e),width:e.paginationMiniQuickJumperInputWidth}}}}},KW=e=>{let{componentCls:t}=e;return{[`&${t}-large ${t}-options`]:{"&-quick-jumper":{input:{...vL(e)}}}}},qW=e=>{let{componentCls:t,antCls:n}=e,[,r]=ol(n,`pagination`);return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:r(`item-size-actual`),lineHeight:r(`item-size-actual`),verticalAlign:`top`,[`${t}-item-link`]:{height:r(`item-size-actual`),backgroundColor:`transparent`,border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:r(`item-size-actual`),lineHeight:r(`item-size-actual`)}}},[`${t}-simple-pager`]:{display:`inline-flex`,alignItems:`center`,height:r(`item-size-actual`),marginInlineEnd:r(`item-spacing-actual`),input:{boxSizing:`border-box`,height:`100%`,width:e.quickJumperInputWidth,padding:`0 ${Y(e.paginationItemPaddingInline)}`,textAlign:`center`,backgroundColor:e.itemInputBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:`none`,transition:`border-color ${e.motionDurationMid}`,color:`inherit`,"&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${Y(e.inputOutlineOffset)} 0 ${Y(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:`not-allowed`}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:`transparent`}}}},[`&${t}-small`]:{[`${t}-simple-pager`]:{input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},JW=e=>{let{componentCls:t,antCls:n}=e,[,r]=ol(n,`pagination`);return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:`relative`,[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:`auto`}},[`${t}-item-ellipsis`]:{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:`block`,margin:`auto`,color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:`center`,textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[` + `]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:`inherit`,border:`none`,outline:`none`,background:`transparent`,minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:`none !important`}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:`absolute`,insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:`absolute`,top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:`inline-flex`,alignItems:`center`,margin:`auto`,pointerEvents:`none`}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:`ltr`,insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},pW=rl([`Input`,`TextArea`],e=>fW(gs(e,eL(e))),tL,{resetFont:!1}),mW=(0,S.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,size:i,disabled:a,status:o,allowClear:s,classNames:c,rootClassName:l,className:u,style:d,styles:f,variant:p,showCount:m,onMouseDown:h,onResize:g,..._}=e,{getPrefixCls:v,direction:y,allowClear:b,autoComplete:x,className:C,style:w,classNames:T,styles:E}=li(`textArea`),D=S.useContext(zp),O=a??D,{status:k,hasFeedback:A,feedbackIcon:j}=S.useContext(Sy),M=oC(k,o),[N,P]=Fd([T,c],[E,f],{props:e}),F=S.useRef(null);S.useImperativeHandle(t,()=>({resizableTextArea:F.current?.resizableTextArea,focus:e=>{l_(F.current?.resizableTextArea?.textArea,e)},blur:()=>F.current?.blur(),nativeElement:F.current?.nativeElement||null}));let I=v(`input`,n),L=bf(I),[R,z]=yL(I,l);pW(I,L);let{compactSize:B,compactItemClassnames:V}=ih(I,y),H=th(e=>i??B??e),[U,W]=hC(`textArea`,p,r),ee=gB(s??b),[te,ne]=S.useState(!1),[re,ie]=S.useState(!1),ae=e=>{ne(!0),h?.(e);let t=()=>{ne(!1),document.removeEventListener(`mouseup`,t)};document.addEventListener(`mouseup`,t)},G=e=>{if(g?.(e),te&&typeof getComputedStyle==`function`){let e=F.current?.nativeElement?.querySelector(`textarea`);e&&getComputedStyle(e).resize===`both`&&ie(!0)}};return S.createElement(dW,{autoComplete:x,..._,style:{...P.root,...w,...d},styles:P,disabled:O,allowClear:ee,className:J(z,L,u,l,V,C,N.root,{[`${I}-textarea-affix-wrapper-resize-dirty`]:re}),classNames:{...N,textarea:J({[`${I}-sm`]:H===`small`,[`${I}-lg`]:H===`large`},R,N.textarea,te&&`${I}-mouse-active`),variant:J({[`${I}-${U}`]:W},aC(I,M)),affixWrapper:J(`${I}-textarea-affix-wrapper`,{[`${I}-affix-wrapper-rtl`]:y===`rtl`,[`${I}-affix-wrapper-sm`]:H===`small`,[`${I}-affix-wrapper-lg`]:H===`large`,[`${I}-textarea-show-count`]:m||e.count?.show},R)},prefixCls:I,suffix:A&&S.createElement(`span`,{className:`${I}-textarea-suffix`},j),showCount:m,ref:F,onResize:G,onMouseDown:ae})}),hW=yB;hW.Group=FU,hW.Search=QU,hW.TextArea=mW,hW.Password=XU,hW.OTP=VU;function gW(e,t,n){return typeof n==`boolean`?n:e.length?!0:Cr(t).some(e=>e.type===EE)}var _W=({suffixCls:e,tagName:t,displayName:n})=>n=>S.forwardRef((r,i)=>S.createElement(n,{ref:i,suffixCls:e,tagName:t,...r})),vW=S.forwardRef((e,t)=>{let{prefixCls:n,suffixCls:r,className:i,tagName:a,...o}=e,{getPrefixCls:s}=S.useContext(oi),c=s(`layout`,n),[l]=bE(c),u=r?`${c}-${r}`:c;return S.createElement(a,{className:J(n||u,i,l),ref:t,...o})}),yW=S.forwardRef((e,t)=>{let{direction:n}=S.useContext(oi),[r,i]=S.useState([]),{prefixCls:a,className:o,rootClassName:s,children:c,hasSider:l,tagName:u,style:d,...f}=e,p=Sr(f,[`suffixCls`]),{getPrefixCls:m,className:h,style:g}=li(`layout`),_=m(`layout`,a),v=gW(r,c,l),[y,b]=bE(_),x=J(_,{[`${_}-has-sider`]:v,[`${_}-rtl`]:n===`rtl`},h,o,s,y,b),C=S.useMemo(()=>({siderHook:{addSider:e=>{i(t=>[].concat(Zr(t),[e]))},removeSider:e=>{i(t=>t.filter(t=>t!==e))}}}),[]);return S.createElement(gE.Provider,{value:C},S.createElement(u,{ref:t,className:x,style:{...g,...d},...p},c))}),bW=_W({tagName:`div`,displayName:`Layout`})(yW),xW=_W({suffixCls:`header`,tagName:`header`,displayName:`Header`})(vW),SW=_W({suffixCls:`footer`,tagName:`footer`,displayName:`Footer`})(vW),CW=_W({suffixCls:`content`,tagName:`main`,displayName:`Content`})(vW),wW=bW;wW.Header=xW,wW.Footer=SW,wW.Content=CW,wW.Sider=EE,wW._InternalSiderContext=wE;var TW={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z`}}]},name:`double-left`,theme:`outlined`};function EW(){return EW=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,EW({},e,{ref:t,icon:TW}))),OW={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z`}}]},name:`double-right`,theme:`outlined`};function kW(){return kW=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,kW({},e,{ref:t,icon:OW}))),jW={items_per_page:`条/页`,jump_to:`跳至`,jump_to_confirm:`确定`,page:`页`,prev_page:`上一页`,next_page:`下一页`,prev_5:`向前 5 页`,next_5:`向后 5 页`,prev_3:`向前 3 页`,next_3:`向后 3 页`,page_size:`页码`},MW=[10,20,50,100],NW=e=>{let{pageSizeOptions:t=MW,locale:n,changeSize:r,pageSize:i,goButton:a,quickGo:o,rootPrefixCls:s,disabled:c,buildOptionText:l,showSizeChanger:u,sizeChangerRender:d}=e,[f,p]=S.useState(``),m=S.useMemo(()=>!f||Number.isNaN(f)?void 0:Number(f),[f]),h=typeof l==`function`?l:e=>`${e} ${n.items_per_page}`,g=e=>{let t=e.target.value;/^\d*$/.test(t)&&p(t)},_=e=>{a||f===``||(p(``),!(e.relatedTarget&&(e.relatedTarget.className.includes(`${s}-item-link`)||e.relatedTarget.className.includes(`${s}-item`)))&&o?.(m))},v=e=>{f!==``&&(e.keyCode===om.ENTER||e.type===`click`)&&(p(``),o?.(m))},y=()=>t.some(e=>e.toString()===i.toString())?t:t.concat([i]).sort((e,t)=>(Number.isNaN(Number(e))?0:Number(e))-(Number.isNaN(Number(t))?0:Number(t))),b=`${s}-options`;if(!u&&!o)return null;let x=null,C=null,w=null;return u&&d&&(x=d({disabled:c,size:i,onSizeChange:e=>{r?.(Number(e))},"aria-label":n.page_size,className:`${b}-size-changer`,options:y().map(e=>({label:h(e),value:e}))})),o&&(a&&(w=typeof a==`boolean`?S.createElement(`button`,{type:`button`,onClick:v,onKeyUp:v,disabled:c,className:`${b}-quick-jumper-button`},n.jump_to_confirm):S.createElement(`span`,{onClick:v,onKeyUp:v},a)),C=S.createElement(`div`,{className:`${b}-quick-jumper`},n.jump_to,S.createElement(`input`,{disabled:c,type:`text`,value:f,onChange:g,onKeyUp:v,onBlur:_,"aria-label":n.page}),n.page,w)),S.createElement(`li`,{className:b},x,C)},PW=e=>{let{rootPrefixCls:t,page:n,active:r,className:i,style:a,showTitle:o,onClick:s,onKeyPress:c,itemRender:l}=e,u=`${t}-item`,d=J(u,`${u}-${n}`,{[`${u}-active`]:r,[`${u}-disabled`]:!n},i),f=()=>{s(n)},p=e=>{c(e,s,n)},m=l(n,`page`,S.createElement(`a`,{rel:`nofollow`},n));return m?S.createElement(`li`,{title:o?String(n):null,className:d,style:a,onClick:f,onKeyDown:p,tabIndex:0},m):null};function FW(){return FW=Object.assign?Object.assign.bind():function(e){for(var t=1;tn;function LW(){}function RW(e){let t=Number(e);return typeof t==`number`&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function zW(e,t,n){let r=e===void 0?t:e;return Math.floor((n-1)/r)+1}var BW=e=>{let{prefixCls:t=`rc-pagination`,selectPrefixCls:n=`rc-select`,className:r,classNames:i,styles:a,current:o,defaultCurrent:s=1,total:c=0,pageSize:l,defaultPageSize:u=10,onChange:d=LW,hideOnSinglePage:f,align:p,showPrevNextJumpers:m=!0,showQuickJumper:h,showLessItems:g,showTitle:_=!0,onShowSizeChange:v=LW,locale:y=jW,style:b,totalBoundaryShowSizeChanger:x=50,disabled:C,simple:w,showTotal:T,showSizeChanger:E=c>x,sizeChangerRender:D,pageSizeOptions:O,itemRender:k=IW,jumpPrevIcon:A,jumpNextIcon:j,prevIcon:M,nextIcon:N}=e,P=S.useRef(null),[F,I]=Hn(u,l),[L,R]=Hn(s,o),z=Math.max(1,Math.min(L,zW(void 0,F,c))),[B,V]=S.useState(z);(0,S.useEffect)(()=>{V(z)},[z]),`current`in e;let H=Math.max(1,z-(g?3:5)),U=Math.min(zW(void 0,F,c),z+(g?3:5));function W(n,r){let i=n||S.createElement(`button`,{type:`button`,"aria-label":r,className:`${t}-item-link`});return typeof n==`function`&&(i=S.createElement(n,e)),i}function ee(e){let t=e.target.value,n=zW(void 0,F,c),r;return r=t===``?t:Number.isNaN(Number(t))?B:t>=n?n:Number(t),r}function te(e){return RW(e)&&e!==z&&RW(c)&&c>0}let ne=c>F?h:!1;function re(e){(e.keyCode===om.UP||e.keyCode===om.DOWN)&&e.preventDefault()}function ie(e){let t=ee(e);switch(t!==B&&V(t),e.keyCode){case om.ENTER:oe(t);break;case om.UP:oe(t-1);break;case om.DOWN:oe(t+1);break;default:break}}function ae(e){oe(ee(e))}function G(e){let t=zW(e,F,c),n=z>t&&t!==0?t:z;I(e),V(n),v?.(z,e),R(n),d?.(n,e)}function oe(e){if(te(e)&&!C){let t=zW(void 0,F,c),n=e;return e>t?n=t:e<1&&(n=1),n!==B&&V(n),R(n),d?.(n,F),n}return z}let K=z>1,se=zc?c:z*F])),Se=null,Ce=zW(void 0,F,c);if(f&&c<=F)return null;let we=[],Te={rootPrefixCls:t,onClick:oe,onKeyPress:de,showTitle:_,itemRender:k,page:-1,className:i?.item,style:a?.item},Ee=z-1>0?z-1:0,De=z+1=Me*2&&z!==3&&(we[0]=S.cloneElement(we[0],{className:J(`${t}-item-after-jump-prev`,we[0].props.className)}),we.unshift(ye)),Ce-z>=Me*2&&z!==Ce-2){let e=we[we.length-1];we[we.length-1]=S.cloneElement(e,{className:J(`${t}-item-before-jump-next`,e.props.className)}),we.push(Se)}a!==1&&we.unshift(S.createElement(PW,FW({},Te,{key:1,page:1}))),o!==Ce&&we.push(S.createElement(PW,FW({},Te,{key:Ce,page:Ce})))}let Ne=ge(Ee);if(Ne){let e=!K||!Ce;Ne=S.createElement(`li`,{title:_?y.prev_page:null,onClick:ce,tabIndex:e?null:0,onKeyDown:fe,className:J(`${t}-prev`,i?.item,{[`${t}-disabled`]:e}),style:a?.item,"aria-disabled":e},Ne)}let Pe=_e(De);if(Pe){let e,n;w?(e=!se,n=K?0:null):(e=!se||!Ce,n=e?null:0),Pe=S.createElement(`li`,{title:_?y.next_page:null,onClick:q,tabIndex:n,onKeyDown:pe,className:J(`${t}-next`,i?.item,{[`${t}-disabled`]:e}),style:a?.item,"aria-disabled":e},Pe)}let Fe=J(t,r,{[`${t}-start`]:p===`start`,[`${t}-center`]:p===`center`,[`${t}-end`]:p===`end`,[`${t}-simple`]:w,[`${t}-disabled`]:C});return S.createElement(`ul`,FW({className:Fe,style:b,ref:P},be),xe,Ne,w?je:we,Pe,S.createElement(NW,{locale:y,rootPrefixCls:t,disabled:C,selectPrefixCls:n,changeSize:G,pageSize:F,pageSizeOptions:O,quickGo:ne?oe:null,goButton:Ae,showSizeChanger:E,sizeChangerRender:D}))},VW=e=>{let{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:`not-allowed`,[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`}},"&:focus-visible":{cursor:`not-allowed`,[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`}}},[`&${t}-disabled`]:{cursor:`not-allowed`,[`${t}-item`]:{cursor:`not-allowed`,backgroundColor:`transparent`,"&:hover, &:active":{backgroundColor:`transparent`},a:{color:e.colorTextDisabled,backgroundColor:`transparent`,border:`none`,cursor:`not-allowed`},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:hover, &:active":{backgroundColor:`transparent`},[`${t}-simple&`]:{backgroundColor:`transparent`,"&:hover, &:active":{backgroundColor:`transparent`}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},HW=e=>{let{componentCls:t}=e;return{[`&${t}-small ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-quick-jumper":{input:{..._L(e),width:e.paginationMiniQuickJumperInputWidth}}}}},UW=e=>{let{componentCls:t}=e;return{[`&${t}-large ${t}-options`]:{"&-quick-jumper":{input:{...gL(e)}}}}},WW=e=>{let{componentCls:t,antCls:n}=e,[,r]=ol(n,`pagination`);return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:r(`item-size-actual`),lineHeight:r(`item-size-actual`),verticalAlign:`top`,[`${t}-item-link`]:{height:r(`item-size-actual`),backgroundColor:`transparent`,border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:r(`item-size-actual`),lineHeight:r(`item-size-actual`)}}},[`${t}-simple-pager`]:{display:`inline-flex`,alignItems:`center`,height:r(`item-size-actual`),marginInlineEnd:r(`item-spacing-actual`),input:{boxSizing:`border-box`,height:`100%`,width:e.quickJumperInputWidth,padding:`0 ${Y(e.paginationItemPaddingInline)}`,textAlign:`center`,backgroundColor:e.itemInputBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:`none`,transition:`border-color ${e.motionDurationMid}`,color:`inherit`,"&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${Y(e.inputOutlineOffset)} 0 ${Y(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:`not-allowed`}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:`transparent`}}}},[`&${t}-small`]:{[`${t}-simple-pager`]:{input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},GW=e=>{let{componentCls:t,antCls:n}=e,[,r]=ol(n,`pagination`);return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:`relative`,[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:`auto`}},[`${t}-item-ellipsis`]:{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:`block`,margin:`auto`,color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:`center`,textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[` ${t}-prev, ${t}-jump-prev, ${t}-jump-next @@ -319,21 +319,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${t}-next, ${t}-jump-prev, ${t}-jump-next - `]:{display:`inline-block`,minWidth:r(`item-size-actual`),height:r(`item-size-actual`),color:e.colorText,fontFamily:e.fontFamily,lineHeight:r(`item-size-actual`),textAlign:`center`,verticalAlign:`middle`,listStyle:`none`,borderRadius:e.borderRadius,cursor:`pointer`,transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:`pointer`,userSelect:`none`},[`${t}-item-link`]:{display:`block`,width:`100%`,height:`100%`,padding:0,fontSize:e.fontSizeSM,textAlign:`center`,backgroundColor:`transparent`,border:`${Y(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:`none`,transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:`transparent`}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:`inline-block`,marginInlineStart:e.margin,verticalAlign:`middle`,"&-size-changer":{width:`auto`},"&-quick-jumper":{display:`inline-block`,height:r(`item-size-actual`),marginInlineStart:e.marginXS,lineHeight:r(`item-size-actual`),verticalAlign:`baseline`,input:{...bL(e),...aL(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow}),"&[disabled]":{...iL(e)},width:e.quickJumperInputWidth,height:r(`item-size-actual`),boxSizing:`border-box`,margin:0,marginInlineStart:r(`item-spacing-actual`),marginInlineEnd:r(`item-spacing-actual`)}}}}},YW=e=>{let{componentCls:t,antCls:n}=e,[,r]=ol(n,`pagination`);return{[`${t}-item`]:{display:`inline-block`,minWidth:r(`item-size-actual`),height:r(`item-size-actual`),marginInlineEnd:r(`item-spacing-actual`),fontFamily:e.fontFamily,lineHeight:Y(e.calc(r(`item-size-actual`)).sub(2).equal()),textAlign:`center`,verticalAlign:`middle`,listStyle:`none`,backgroundColor:e.itemBg,border:`${Y(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:`pointer`,userSelect:`none`,a:{display:`block`,padding:`0 ${Y(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:`none`}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.itemActiveColor},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.itemActiveColorHover}}}}},XW=e=>{let{componentCls:t,antCls:n}=e,[r,i]=ol(n,`pagination`);return{[t]:{[r(`item-size-actual`)]:Y(e.itemSize),[r(`item-spacing-actual`)]:Y(e.marginXS),"&-small":{[r(`item-size-actual`)]:Y(e.itemSizeSM),[r(`item-spacing-actual`)]:Y(e.marginXXS)},"&-large":{[r(`item-size-actual`)]:Y(e.itemSizeLG),[r(`item-spacing-actual`)]:Y(e.marginSM)},...Jc(e),display:`flex`,alignItems:`center`,"&-start":{justifyContent:`start`},"&-center":{justifyContent:`center`},"&-end":{justifyContent:`end`},"ul, ol":{margin:0,padding:0,listStyle:`none`},"&::after":{display:`block`,clear:`both`,height:0,overflow:`hidden`,visibility:`hidden`,content:`""`},[`${t}-total-text`]:{display:`inline-block`,height:i(`item-size-actual`),marginInlineEnd:i(`item-spacing-actual`),lineHeight:Y(e.calc(i(`item-size-actual`)).sub(2).equal()),verticalAlign:`middle`},...YW(e),...JW(e),...qW(e),...GW(e),...KW(e),...WW(e),[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:`none`}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:`none`}}},[`&${e.componentCls}-rtl`]:{direction:`rtl`}}},ZW=e=>{let{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:{...Qc(e)},[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0},...Zc(e)}},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:Zc(e)}}}},QW=e=>({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemSizeLG:e.controlHeightLG,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0,...rL(e)}),$W=e=>gs(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:`0.13em`},nL(e)),eG=rl(`Pagination`,e=>{let t=$W(e);return[XW(t),ZW(t)]},QW),tG=e=>{let{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},nG=al([`Pagination`,`bordered`],e=>tG($W(e)),QW);function rG(e){return(0,S.useMemo)(()=>typeof e==`boolean`?[e,{}]:hd(e)?[!0,e]:[void 0,void 0],[e])}var iG=e=>{let{align:t,prefixCls:n,selectPrefixCls:r,className:i,rootClassName:a,style:o,size:s,locale:c,responsive:l,showSizeChanger:u,selectComponentClass:d,pageSizeOptions:f,styles:p,classNames:m,...h}=e,{xs:g}=JC(l),[,_]=Kc(),{getPrefixCls:v,direction:y,showSizeChanger:b,className:x,style:C,classNames:w,styles:T,totalBoundaryShowSizeChanger:E}=li(`pagination`),D=v(`pagination`,n),[O,k]=eG(D),A=th(s),j=A===`small`||!!(g&&!A&&l),M={...e,size:A},[N,P]=Fd([w,m],[T,p],{props:M}),[F]=cd(`Pagination`,Hu),I={...F,...c},[L,R]=rG(u),[z,B]=rG(b),V=L??z,H=R??B,U=d||BC,W=S.useMemo(()=>f?f.map(Number):void 0,[f]),ee=e=>{let{disabled:t,size:n,onSizeChange:r,"aria-label":i,className:a,options:o}=e,{className:s,onChange:c}=H||{},l=o.find(e=>String(e.value)===String(n))?.value;return S.createElement(U,{disabled:t,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:e=>e.parentNode,"aria-label":i,options:o,...H,value:l,onChange:(e,t)=>{r?.(e),c?.(e,t)},size:A,className:J(a,s)})},te=S.useMemo(()=>{let e=S.createElement(`span`,{className:`${D}-item-ellipsis`},`•••`);return{prevIcon:S.createElement(`button`,{className:`${D}-item-link`,type:`button`,tabIndex:-1},y===`rtl`?S.createElement(mg,null):S.createElement(Ww,null)),nextIcon:S.createElement(`button`,{className:`${D}-item-link`,type:`button`,tabIndex:-1},y===`rtl`?S.createElement(Ww,null):S.createElement(mg,null)),jumpPrevIcon:S.createElement(`a`,{className:`${D}-item-link`},S.createElement(`div`,{className:`${D}-item-container`},y===`rtl`?S.createElement(NW,{className:`${D}-item-link-icon`}):S.createElement(AW,{className:`${D}-item-link-icon`}),e)),jumpNextIcon:S.createElement(`a`,{className:`${D}-item-link`},S.createElement(`div`,{className:`${D}-item-container`},y===`rtl`?S.createElement(AW,{className:`${D}-item-link-icon`}):S.createElement(NW,{className:`${D}-item-link-icon`}),e))}},[y,D]),ne=v(`select`,r),re=J({[`${D}-${t}`]:!!t,[`${D}-${A}`]:A,[`${D}-mini`]:j,[`${D}-rtl`]:y===`rtl`,[`${D}-bordered`]:_.wireframe},x,i,a,N.root,O,k),ie={...P.root,...C,...o};return S.createElement(S.Fragment,null,_.wireframe&&S.createElement(nG,{prefixCls:D}),S.createElement(UW,{...te,...h,styles:P,classNames:N,style:ie,prefixCls:D,selectPrefixCls:ne,className:re,locale:I,pageSizeOptions:W,showSizeChanger:V,totalBoundaryShowSizeChanger:h.totalBoundaryShowSizeChanger??E,sizeChangerRender:ee}))},aG=100,oG=aG/5,sG=aG/2-oG/2,cG=sG*2*Math.PI,lG=50,uG=e=>{let{dotClassName:t,style:n,hasCircleCls:r}=e;return S.createElement(`circle`,{className:J(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:sG,cx:lG,cy:lG,strokeWidth:oG,style:n})},dG=({percent:e,prefixCls:t})=>{let n=`${t}-dot`,r=`${n}-holder`,i=`${r}-hidden`,[a,o]=S.useState(!1);zn(()=>{e!==0&&o(!0)},[e!==0]);let s=Math.max(Math.min(e,100),0);if(!a)return null;let c={strokeDashoffset:`${cG/4}`,strokeDasharray:`${cG*s/100} ${cG*(100-s)/100}`};return S.createElement(`span`,{className:J(r,`${n}-progress`,{[i]:s<=0})},S.createElement(`svg`,{viewBox:`0 0 ${aG} ${aG}`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":s},S.createElement(uG,{dotClassName:n,hasCircleCls:!0}),S.createElement(uG,{dotClassName:n,style:c})))};function fG(e){let{prefixCls:t,percent:n=0,className:r,style:i}=e,a=`${t}-dot`,o=`${a}-holder`,s=`${o}-hidden`;return S.createElement(S.Fragment,null,S.createElement(`span`,{className:J(o,r,n>0&&s),style:i},S.createElement(`span`,{className:J(a,`${t}-dot-spin`)},[1,2,3,4].map(e=>S.createElement(`i`,{className:`${t}-dot-item`,key:e})))),S.createElement(dG,{prefixCls:t,percent:n}))}function pG(e){let{prefixCls:t,indicator:n,percent:r,className:i,style:a}=e,o=`${t}-dot`;return n&&S.isValidElement(n)?Pp(n,e=>({className:J(e.className,o,i),style:{...e.style,...a},percent:r})):S.createElement(fG,{prefixCls:t,percent:r,className:i,style:a})}var mG=new Lo(`antSpinMove`,{to:{opacity:1}}),hG=new Lo(`antRotate`,{to:{transform:`rotate(405deg)`}}),gG=e=>{let{componentCls:t}=e,n=`${t}-section`;return{[t]:{...Jc(e),position:`relative`,"&-rtl":{direction:`rtl`},[`&${n}, ${n}`]:{display:`flex`,alignItems:`center`,flexDirection:`column`,gap:e.paddingSM,color:e.colorPrimary},[`&${n}`]:{display:`inline-flex`},[n]:{position:`absolute`,top:`50%`,left:{_skip_check_:!0,value:`50%`},transform:`translate(-50%, -50%)`,zIndex:1},[`${t}-description`]:{fontSize:e.fontSize,lineHeight:1},[`${t}-container`]:{position:`relative`,transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:`100%`,height:`100%`,background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:`""`,pointerEvents:`none`}},"&-spinning":{[`${t}-description`]:{textShadow:`0 0px 5px ${e.colorBgContainer}`},[`${t}-container`]:{clear:`both`,opacity:.5,userSelect:`none`,pointerEvents:`none`,"&::after":{opacity:.4,pointerEvents:`auto`}}},"&-fullscreen":{position:`fixed`,inset:0,backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,opacity:0,pointerEvents:`none`,transition:`all ${e.motionDurationMid}`,[`&${t}-spinning`]:{opacity:1,pointerEvents:`auto`},[n]:{color:e.colorWhite,[`${t}-description`]:{color:e.colorTextLightSolid}}}}}},_G=e=>{let{componentCls:t,antCls:n,motionDurationSlow:r}=e,[i,a]=ol(n,`spin`);return{[t]:{[i(`dot-holder-size`)]:e.dotSize,[i(`dot-item-size`)]:`calc((${a(`dot-holder-size`)} - ${e.marginXXS} / 2) / 2)`,[`${t}-dot`]:{"&-holder":{width:`1em`,height:`1em`,fontSize:a(`dot-holder-size`),display:`inline-block`,transition:[`transform`,`opacity`].map(e=>`${e} ${r} ease`).join(`, `),transformOrigin:`50% 50%`,lineHeight:1,"&-hidden":{transform:`scale(0.3)`,opacity:0}},position:`relative`,display:`inline-block`,fontSize:a(`dot-holder-size`),width:`1em`,height:`1em`,"&-spin":{transform:`rotate(45deg)`,animationName:hG,animationDuration:`1.2s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`},"&-item":{position:`absolute`,display:`block`,width:a(`dot-item-size`),height:a(`dot-item-size`),background:`currentColor`,borderRadius:`100%`,transform:`scale(0.75)`,transformOrigin:`50% 50%`,opacity:.3,animationName:mG,animationDuration:`1s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`,animationDirection:`alternate`,"&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:`0s`},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:`0.4s`},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:`0.8s`},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:`1.2s`}},"&-progress":{position:`absolute`,left:`50%`,top:0,transform:`translateX(-50%)`},"&-circle":{strokeLinecap:`round`,transition:[`stroke-dashoffset`,`stroke-dasharray`,`stroke`,`stroke-width`,`opacity`].map(e=>`${e} ${r} ease`).join(`,`),fillOpacity:0,stroke:`currentcolor`},"&-circle-bg":{stroke:e.colorFillSecondary}}}}},vG=e=>{let{componentCls:t}=e,[n]=ol(e.antCls,`spin`);return{[t]:{"&-sm":{[n(`dot-holder-size`)]:e.dotSizeSM},"&-lg":{[n(`dot-holder-size`)]:e.dotSizeLG}}}},yG=rl(`Spin`,e=>{let t=gs(e,{spinDotDefault:e.colorTextDescription});return[gG(t),_G(t),vG(t)]},e=>{let{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:n}}),bG=200,xG=[[30,.05],[70,.03],[96,.01]];function SG(e,t){let[n,r]=S.useState(0),i=S.useRef(null),a=t===`auto`;return S.useEffect(()=>(a&&e&&(r(0),i.current=setInterval(()=>{r(e=>{let t=100-e;for(let n=0;n{i.current&&=(clearInterval(i.current),null)}),[a,e]),a?n:t}var CG;function wG(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}var TG=e=>{let{prefixCls:t,spinning:n=!0,delay:r=0,className:i,rootClassName:a,size:o,tip:s,description:c,wrapperClassName:l,style:u,children:d,fullscreen:f=!1,indicator:p,percent:m,classNames:h,styles:g,..._}=e,{getPrefixCls:v,direction:y,indicator:b,className:x,style:C,classNames:w,styles:T}=li(`spin`),E=v(`spin`,t),[D,O]=yG(E),[k,A]=S.useState(()=>n&&!wG(n,r)),j=SG(k,m);S.useEffect(()=>{if(n){let e=zR(r,()=>{A(!0)});return e(),()=>{e?.cancel?.()}}A(!1)},[r,n]);let M=th(e=>o??e),N=c??s,P={...e,size:M,spinning:k,tip:N,description:N,fullscreen:f,children:d,percent:j},[F,I]=Fd([w,h],[T,g],{props:P}),L=p??b??CG,R=d!==void 0,z=R||f,B=S.createElement(S.Fragment,null,S.createElement(pG,{className:J(F.indicator),style:I.indicator,prefixCls:E,indicator:L,percent:j}),N&&S.createElement(`div`,{className:J(`${E}-description`,F.tip,F.description),style:{...I.tip,...I.description}},N));return S.createElement(`div`,{className:J(E,{[`${E}-sm`]:M===`small`,[`${E}-lg`]:M===`large`,[`${E}-spinning`]:k,[`${E}-rtl`]:y===`rtl`,[`${E}-fullscreen`]:f},a,F.root,f&&F.mask,z?l:[`${E}-section`,F.section],x,i,D,O),style:{...I.root,...z?{}:I.section,...f?I.mask:{},...C,...u},"aria-live":`polite`,"aria-busy":k,..._},k&&(z?S.createElement(`div`,{className:J(`${E}-section`,F.section),style:I.section},B):B),R&&S.createElement(`div`,{className:J(`${E}-container`,F.container),style:I.container},d))};TG.setDefaultIndicator=e=>{CG=e};var EG=(e,t={})=>!fd(e)&&t?.skipEmpty?[]:Array.isArray(e)?e:[e],DG=null,OG=e=>e(),kG=[],AG={};function jG(){let{getContainer:e,duration:t,rtl:n,maxCount:r,top:i}=AG,a=e?.()||document.body;return{getContainer:()=>a,duration:t,rtl:n,maxCount:r,top:i}}var MG=S.forwardRef((e,t)=>{let{messageConfig:n,sync:r}=e,{getPrefixCls:i}=(0,S.useContext)(oi),a=AG.prefixCls||i(`message`),o=(0,S.useContext)(rx),[s,c]=Pm({...n,prefixCls:a,...o.message});return S.useImperativeHandle(t,()=>{let e={...s};return Object.keys(e).forEach(t=>{e[t]=(...e)=>(r(),s[t].apply(s,e))}),{instance:e,sync:r}}),c}),NG=S.forwardRef((e,t)=>{let[n,r]=S.useState(jG),i=()=>{r(jG)};S.useEffect(i,[]);let a=rm(),o=a.getRootPrefixCls(),s=a.getIconPrefixCls(),c=a.getTheme(),l=S.createElement(MG,{ref:t,sync:i,messageConfig:n});return S.createElement(am,{prefixCls:o,iconPrefixCls:s,theme:c},a.holderRender?a.holderRender(l):l)}),PG=()=>{if(!DG){let e=document.createDocumentFragment(),t={fragment:e};DG=t,OG(()=>{Lm(S.createElement(NG,{ref:e=>{let{instance:n,sync:r}=e||{};Promise.resolve().then(()=>{!t.instance&&n&&(t.instance=n,t.sync=r,PG())})}}),e)});return}DG.instance&&(kG.forEach(e=>{let{type:t,skipped:n}=e;if(!n)switch(t){case`open`:OG(()=>{let t=DG.instance.open({...AG,...e.config});t?.then(e.resolve),e.setCloseFn(t)});break;case`destroy`:OG(()=>{DG?.instance.destroy(e.key)});break;default:OG(()=>{var n;let r=(n=DG.instance)[t].apply(n,Zr(e.args));r?.then(e.resolve),e.setCloseFn(r)})}}),kG=[])};function FG(e){AG={...AG,...e},OG(()=>{DG?.sync?.()})}function IG(e){let t=Om(t=>{let n,r={type:`open`,config:e,resolve:t,setCloseFn:e=>{n=e}};return kG.push(r),()=>{n?OG(()=>{n()}):r.skipped=!0}});return PG(),t}function LG(e,t){let n=Om(n=>{let r,i={type:e,args:t,resolve:n,setCloseFn:e=>{r=e}};return kG.push(i),()=>{r?OG(()=>{r()}):i.skipped=!0}});return PG(),n}var RG=e=>{kG.push({type:`destroy`,key:e}),PG()},zG=[`success`,`info`,`warning`,`error`,`loading`],BG={open:IG,destroy:RG,config:FG,useMessage:Fm,_InternalPanelDoNotUseOrYouWillBeFired:Em};zG.forEach(e=>{BG[e]=(...t)=>LG(e,t)});var VG=lx(e=>{let{prefixCls:t,className:n,closeIcon:r,closable:i,type:a,title:o,children:s,footer:c,classNames:l,styles:u,...d}=e,{getPrefixCls:f}=S.useContext(oi),{className:p,style:m,classNames:h,styles:g}=li(`modal`),_=f(),v=t||f(`modal`),y=bf(_),[b,x]=lb(v,y),[C,w]=Fd([h,l],[g,u],{props:e}),T=`${v}-confirm`,E={};return E=a?{closable:i??!1,title:``,footer:``,children:S.createElement(mb,{...e,prefixCls:v,confirmPrefixCls:T,rootPrefixCls:_,content:s})}:{closable:i??!0,title:o,footer:c!==null&&S.createElement(Qy,{...e}),children:s},S.createElement(w_,{prefixCls:v,className:J(b,`${v}-pure-panel`,a&&T,a&&`${T}-${a}`,n,p,x,y,C.root),style:{...m,...w.root},...d,closeIcon:Zy(v,r),closable:i,classNames:C,styles:w,...E})});function HG(e){return xb(Sb(e))}var UG=db;UG.useModal=jb,UG.info=function(e){return xb(Cb(e))},UG.success=function(e){return xb(wb(e))},UG.error=function(e){return xb(Tb(e))},UG.warning=HG,UG.warn=HG,UG.confirm=function(e){return xb(Eb(e))},UG.destroyAll=function(){for(;_b.length;){let e=_b.pop();e&&e()}},UG.config=Db,UG._InternalPanelDoNotUseOrYouWillBeFired=VG;var WG=rl(`Popconfirm`,e=>{let{componentCls:t,iconCls:n,antCls:r,zIndexPopup:i,colorText:a,colorWarning:o,marginXXS:s,marginXS:c,fontSize:l,fontWeightStrong:u,colorTextHeading:d}=e;return{[t]:{zIndex:i,[`&${r}-popover`]:{fontSize:l},[`${t}-message`]:{marginBottom:c,display:`flex`,flexWrap:`nowrap`,alignItems:`start`,[`> ${t}-message-icon ${n}`]:{color:o,fontSize:l,lineHeight:1,marginInlineEnd:c},[`${t}-title`]:{fontWeight:u,color:d,"&:only-child":{fontWeight:`normal`}},[`${t}-description`]:{marginTop:s,color:a}},[`${t}-buttons`]:{textAlign:`end`,whiteSpace:`nowrap`,button:{marginInlineStart:c}}}}},e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1}),GG=e=>{let{prefixCls:t,okButtonProps:n,cancelButtonProps:r,title:i,description:a,cancelText:o,okText:s,okType:c=`primary`,icon:l=S.createElement(Vl,null),showCancel:u=!0,close:d,onConfirm:f,onCancel:p,onPopupClick:m,classNames:h,styles:g}=e,{getPrefixCls:_}=S.useContext(oi),[v]=cd(`Popconfirm`,td.Popconfirm),y=ew(i),b=ew(a);return S.createElement(`div`,{className:`${t}-inner-content`,onClick:m},S.createElement(`div`,{className:`${t}-message`},l&&S.createElement(`span`,{className:`${t}-message-icon`},l),S.createElement(`div`,{className:`${t}-message-text`},y&&S.createElement(`div`,{className:J(`${t}-title`,h?.title),style:g?.title},y),b&&S.createElement(`div`,{className:J(`${t}-description`,h?.content),style:g?.content},b))),S.createElement(`div`,{className:`${t}-buttons`},u&&S.createElement(Zg,{onClick:p,size:`small`,...r},o||v?.cancelText),S.createElement(Qg,{buttonProps:{size:`small`,...fh(c),...n},actionFn:f,close:d,prefixCls:_(`btn`),quitOnNullishReturnValue:!0,emitEvent:!0},s||v?.okText)))},KG=e=>{let{prefixCls:t,placement:n,className:r,style:i,...a}=e,{getPrefixCls:o}=S.useContext(oi),s=o(`popconfirm`,t);return WG(s),S.createElement(Lw,{placement:n,className:J(s,r),style:i,content:S.createElement(GG,{prefixCls:s,...a})})},qG=S.forwardRef((e,t)=>{let{prefixCls:n,placement:r=`top`,trigger:i,okType:a=`primary`,icon:o=S.createElement(Vl,null),children:s,overlayClassName:c,onOpenChange:l,overlayStyle:u,styles:d,arrow:f,classNames:p,...m}=e,{getPrefixCls:h,className:g,style:_,classNames:v,styles:y,arrow:b,trigger:x}=li(`popconfirm`),[C,w]=Hn(e.defaultOpen??!1,e.open),T=yw(f,b),E=i||x||`click`,D=e=>{w(e),l?.(e)},O=()=>{D(!1)},k=t=>e.onConfirm?.call(void 0,t),A=t=>{D(!1),e.onCancel?.call(void 0,t)},j=t=>{let{disabled:n=!1}=e;n||D(t)},M=h(`popconfirm`,n),N={...e,placement:r,trigger:E,okType:a,overlayStyle:u,styles:d,classNames:p},[P,F]=Fd([v,p],[y,d],{props:N}),I=J(M,g,c,P.root);return WG(M),S.createElement(Rw,{arrow:T,...Sr(m,[`title`]),trigger:E,placement:r,onOpenChange:j,open:C,ref:t,classNames:{root:I,container:P.container,arrow:P.arrow},styles:{root:{..._,...F.root,...u},container:F.container,arrow:F.arrow},content:S.createElement(GG,{okType:a,icon:o,...e,prefixCls:M,close:O,onConfirm:k,onCancel:A,classNames:P,styles:F}),"data-popover-inject":!0},s)});qG._InternalPanelDoNotUseOrYouWillBeFired=KG;var JG={percent:0,prefixCls:`rc-progress`,strokeColor:`#2db7f5`,strokeLinecap:`round`,strokeWidth:1,railColor:`#D9D9D9`,railWidth:1,gapPosition:`bottom`,loading:!1},YG=()=>{let e=(0,S.useRef)([]),t=(0,S.useRef)(null);return(0,S.useEffect)(()=>{let n=Date.now(),r=!1;e.current.forEach(e=>{if(!e)return;r=!0;let i=e.style;i.transitionDuration=`.3s, .3s, .3s, .06s`,t.current&&n-t.current<100&&(i.transitionDuration=`0s, 0s`)}),r&&(t.current=Date.now())}),e.current},XG=({bg:e,children:t})=>S.createElement(`div`,{style:{width:`100%`,height:`100%`,background:e}},t);function ZG(e,t){return Object.keys(e).map(n=>{let r=`${Math.floor(parseFloat(n)*t)}%`;return`${e[n]} ${r}`})}var QG=S.forwardRef((e,t)=>{let{prefixCls:n,color:r,gradientId:i,radius:a,className:o,style:s,ptg:c,strokeLinecap:l,strokeWidth:u,size:d,gapDegree:f}=e,p=r&&typeof r==`object`,m=p?`#FFF`:void 0,h=d/2,g=S.createElement(`circle`,{className:J(`${n}-circle-path`,o),r:a,cx:h,cy:h,stroke:m,strokeLinecap:l,strokeWidth:u,opacity:c===0?0:1,style:s,ref:t});if(!p)return g;let _=`${i}-conic`,v=f?`${180+f/2}deg`:`0deg`,y=ZG(r,(360-f)/360),b=ZG(r,1),x=`conic-gradient(from ${v}, ${y.join(`, `)})`,C=`linear-gradient(to ${f?`bottom`:`top`}, ${b.join(`, `)})`;return S.createElement(S.Fragment,null,S.createElement(`mask`,{id:_},g),S.createElement(`foreignObject`,{x:0,y:0,width:d,height:d,mask:`url(#${_})`},S.createElement(XG,{bg:C},S.createElement(XG,{bg:x}))))}),$G=(e,t,n,r,i,a,o,s,c,l,u=0)=>{let d=n/100*360*((360-a)/360),f=a===0?0:{bottom:0,top:180,left:90,right:-90}[o],p=(100-r)/100*t;return c===`round`&&r!==100&&(p+=l/2,p>=t&&(p=t-.01)),{stroke:typeof s==`string`?s:void 0,strokeDasharray:`${t}px ${e}`,strokeDashoffset:p+u,transform:`rotate(${i+d+f}deg)`,transformOrigin:`50px 50px`,transition:`stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s`,fillOpacity:0}},eK=(({id:e,loading:t})=>{if(!t)return{indeterminateStyleProps:{},indeterminateStyleAnimation:null};let n=`${e}-indeterminate-animate`;return{indeterminateStyleProps:{transform:`rotate(0deg)`,animation:`${n} 1s linear infinite`},indeterminateStyleAnimation:S.createElement(`style`,null,`@keyframes ${n} { + `]:{display:`inline-block`,minWidth:r(`item-size-actual`),height:r(`item-size-actual`),color:e.colorText,fontFamily:e.fontFamily,lineHeight:r(`item-size-actual`),textAlign:`center`,verticalAlign:`middle`,listStyle:`none`,borderRadius:e.borderRadius,cursor:`pointer`,transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:`pointer`,userSelect:`none`},[`${t}-item-link`]:{display:`block`,width:`100%`,height:`100%`,padding:0,fontSize:e.fontSizeSM,textAlign:`center`,backgroundColor:`transparent`,border:`${Y(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:`none`,transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:`transparent`}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:`inline-block`,marginInlineStart:e.margin,verticalAlign:`middle`,"&-size-changer":{width:`auto`},"&-quick-jumper":{display:`inline-block`,height:r(`item-size-actual`),marginInlineStart:e.marginXS,lineHeight:r(`item-size-actual`),verticalAlign:`baseline`,input:{...vL(e),...rL(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow}),"&[disabled]":{...nL(e)},width:e.quickJumperInputWidth,height:r(`item-size-actual`),boxSizing:`border-box`,margin:0,marginInlineStart:r(`item-spacing-actual`),marginInlineEnd:r(`item-spacing-actual`)}}}}},KW=e=>{let{componentCls:t,antCls:n}=e,[,r]=ol(n,`pagination`);return{[`${t}-item`]:{display:`inline-block`,minWidth:r(`item-size-actual`),height:r(`item-size-actual`),marginInlineEnd:r(`item-spacing-actual`),fontFamily:e.fontFamily,lineHeight:Y(e.calc(r(`item-size-actual`)).sub(2).equal()),textAlign:`center`,verticalAlign:`middle`,listStyle:`none`,backgroundColor:e.itemBg,border:`${Y(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:`pointer`,userSelect:`none`,a:{display:`block`,padding:`0 ${Y(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:`none`}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.itemActiveColor},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.itemActiveColorHover}}}}},qW=e=>{let{componentCls:t,antCls:n}=e,[r,i]=ol(n,`pagination`);return{[t]:{[r(`item-size-actual`)]:Y(e.itemSize),[r(`item-spacing-actual`)]:Y(e.marginXS),"&-small":{[r(`item-size-actual`)]:Y(e.itemSizeSM),[r(`item-spacing-actual`)]:Y(e.marginXXS)},"&-large":{[r(`item-size-actual`)]:Y(e.itemSizeLG),[r(`item-spacing-actual`)]:Y(e.marginSM)},...Jc(e),display:`flex`,alignItems:`center`,"&-start":{justifyContent:`start`},"&-center":{justifyContent:`center`},"&-end":{justifyContent:`end`},"ul, ol":{margin:0,padding:0,listStyle:`none`},"&::after":{display:`block`,clear:`both`,height:0,overflow:`hidden`,visibility:`hidden`,content:`""`},[`${t}-total-text`]:{display:`inline-block`,height:i(`item-size-actual`),marginInlineEnd:i(`item-spacing-actual`),lineHeight:Y(e.calc(i(`item-size-actual`)).sub(2).equal()),verticalAlign:`middle`},...KW(e),...GW(e),...WW(e),...HW(e),...UW(e),...VW(e),[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:`none`}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:`none`}}},[`&${e.componentCls}-rtl`]:{direction:`rtl`}}},JW=e=>{let{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:{...Qc(e)},[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0},...Zc(e)}},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:Zc(e)}}}},YW=e=>({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemSizeLG:e.controlHeightLG,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0,...tL(e)}),XW=e=>gs(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:`0.13em`},eL(e)),ZW=rl(`Pagination`,e=>{let t=XW(e);return[qW(t),JW(t)]},YW),QW=e=>{let{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},$W=al([`Pagination`,`bordered`],e=>QW(XW(e)),YW);function eG(e){return(0,S.useMemo)(()=>typeof e==`boolean`?[e,{}]:hd(e)?[!0,e]:[void 0,void 0],[e])}var tG=e=>{let{align:t,prefixCls:n,selectPrefixCls:r,className:i,rootClassName:a,style:o,size:s,locale:c,responsive:l,showSizeChanger:u,selectComponentClass:d,pageSizeOptions:f,styles:p,classNames:m,...h}=e,{xs:g}=KC(l),[,_]=Kc(),{getPrefixCls:v,direction:y,showSizeChanger:b,className:x,style:C,classNames:w,styles:T,totalBoundaryShowSizeChanger:E}=li(`pagination`),D=v(`pagination`,n),[O,k]=ZW(D),A=th(s),j=A===`small`||!!(g&&!A&&l),M={...e,size:A},[N,P]=Fd([w,m],[T,p],{props:M}),[F]=cd(`Pagination`,Hu),I={...F,...c},[L,R]=eG(u),[z,B]=eG(b),V=L??z,H=R??B,U=d||RC,W=S.useMemo(()=>f?f.map(Number):void 0,[f]),ee=e=>{let{disabled:t,size:n,onSizeChange:r,"aria-label":i,className:a,options:o}=e,{className:s,onChange:c}=H||{},l=o.find(e=>String(e.value)===String(n))?.value;return S.createElement(U,{disabled:t,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:e=>e.parentNode,"aria-label":i,options:o,...H,value:l,onChange:(e,t)=>{r?.(e),c?.(e,t)},size:A,className:J(a,s)})},te=S.useMemo(()=>{let e=S.createElement(`span`,{className:`${D}-item-ellipsis`},`•••`);return{prevIcon:S.createElement(`button`,{className:`${D}-item-link`,type:`button`,tabIndex:-1},y===`rtl`?S.createElement(mg,null):S.createElement(Hw,null)),nextIcon:S.createElement(`button`,{className:`${D}-item-link`,type:`button`,tabIndex:-1},y===`rtl`?S.createElement(Hw,null):S.createElement(mg,null)),jumpPrevIcon:S.createElement(`a`,{className:`${D}-item-link`},S.createElement(`div`,{className:`${D}-item-container`},y===`rtl`?S.createElement(AW,{className:`${D}-item-link-icon`}):S.createElement(DW,{className:`${D}-item-link-icon`}),e)),jumpNextIcon:S.createElement(`a`,{className:`${D}-item-link`},S.createElement(`div`,{className:`${D}-item-container`},y===`rtl`?S.createElement(DW,{className:`${D}-item-link-icon`}):S.createElement(AW,{className:`${D}-item-link-icon`}),e))}},[y,D]),ne=v(`select`,r),re=J({[`${D}-${t}`]:!!t,[`${D}-${A}`]:A,[`${D}-mini`]:j,[`${D}-rtl`]:y===`rtl`,[`${D}-bordered`]:_.wireframe},x,i,a,N.root,O,k),ie={...P.root,...C,...o};return S.createElement(S.Fragment,null,_.wireframe&&S.createElement($W,{prefixCls:D}),S.createElement(BW,{...te,...h,styles:P,classNames:N,style:ie,prefixCls:D,selectPrefixCls:ne,className:re,locale:I,pageSizeOptions:W,showSizeChanger:V,totalBoundaryShowSizeChanger:h.totalBoundaryShowSizeChanger??E,sizeChangerRender:ee}))},nG=100,rG=nG/5,iG=nG/2-rG/2,aG=iG*2*Math.PI,oG=50,sG=e=>{let{dotClassName:t,style:n,hasCircleCls:r}=e;return S.createElement(`circle`,{className:J(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:iG,cx:oG,cy:oG,strokeWidth:rG,style:n})},cG=({percent:e,prefixCls:t})=>{let n=`${t}-dot`,r=`${n}-holder`,i=`${r}-hidden`,[a,o]=S.useState(!1);zn(()=>{e!==0&&o(!0)},[e!==0]);let s=Math.max(Math.min(e,100),0);if(!a)return null;let c={strokeDashoffset:`${aG/4}`,strokeDasharray:`${aG*s/100} ${aG*(100-s)/100}`};return S.createElement(`span`,{className:J(r,`${n}-progress`,{[i]:s<=0})},S.createElement(`svg`,{viewBox:`0 0 ${nG} ${nG}`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":s},S.createElement(sG,{dotClassName:n,hasCircleCls:!0}),S.createElement(sG,{dotClassName:n,style:c})))};function lG(e){let{prefixCls:t,percent:n=0,className:r,style:i}=e,a=`${t}-dot`,o=`${a}-holder`,s=`${o}-hidden`;return S.createElement(S.Fragment,null,S.createElement(`span`,{className:J(o,r,n>0&&s),style:i},S.createElement(`span`,{className:J(a,`${t}-dot-spin`)},[1,2,3,4].map(e=>S.createElement(`i`,{className:`${t}-dot-item`,key:e})))),S.createElement(cG,{prefixCls:t,percent:n}))}function uG(e){let{prefixCls:t,indicator:n,percent:r,className:i,style:a}=e,o=`${t}-dot`;return n&&S.isValidElement(n)?Pp(n,e=>({className:J(e.className,o,i),style:{...e.style,...a},percent:r})):S.createElement(lG,{prefixCls:t,percent:r,className:i,style:a})}var dG=new Lo(`antSpinMove`,{to:{opacity:1}}),fG=new Lo(`antRotate`,{to:{transform:`rotate(405deg)`}}),pG=e=>{let{componentCls:t}=e,n=`${t}-section`;return{[t]:{...Jc(e),position:`relative`,"&-rtl":{direction:`rtl`},[`&${n}, ${n}`]:{display:`flex`,alignItems:`center`,flexDirection:`column`,gap:e.paddingSM,color:e.colorPrimary},[`&${n}`]:{display:`inline-flex`},[n]:{position:`absolute`,top:`50%`,left:{_skip_check_:!0,value:`50%`},transform:`translate(-50%, -50%)`,zIndex:1},[`${t}-description`]:{fontSize:e.fontSize,lineHeight:1},[`${t}-container`]:{position:`relative`,transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:`100%`,height:`100%`,background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:`""`,pointerEvents:`none`}},"&-spinning":{[`${t}-description`]:{textShadow:`0 0px 5px ${e.colorBgContainer}`},[`${t}-container`]:{clear:`both`,opacity:.5,userSelect:`none`,pointerEvents:`none`,"&::after":{opacity:.4,pointerEvents:`auto`}}},"&-fullscreen":{position:`fixed`,inset:0,backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,opacity:0,pointerEvents:`none`,transition:`all ${e.motionDurationMid}`,[`&${t}-spinning`]:{opacity:1,pointerEvents:`auto`},[n]:{color:e.colorWhite,[`${t}-description`]:{color:e.colorTextLightSolid}}}}}},mG=e=>{let{componentCls:t,antCls:n,motionDurationSlow:r}=e,[i,a]=ol(n,`spin`);return{[t]:{[i(`dot-holder-size`)]:e.dotSize,[i(`dot-item-size`)]:`calc((${a(`dot-holder-size`)} - ${e.marginXXS} / 2) / 2)`,[`${t}-dot`]:{"&-holder":{width:`1em`,height:`1em`,fontSize:a(`dot-holder-size`),display:`inline-block`,transition:[`transform`,`opacity`].map(e=>`${e} ${r} ease`).join(`, `),transformOrigin:`50% 50%`,lineHeight:1,"&-hidden":{transform:`scale(0.3)`,opacity:0}},position:`relative`,display:`inline-block`,fontSize:a(`dot-holder-size`),width:`1em`,height:`1em`,"&-spin":{transform:`rotate(45deg)`,animationName:fG,animationDuration:`1.2s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`},"&-item":{position:`absolute`,display:`block`,width:a(`dot-item-size`),height:a(`dot-item-size`),background:`currentColor`,borderRadius:`100%`,transform:`scale(0.75)`,transformOrigin:`50% 50%`,opacity:.3,animationName:dG,animationDuration:`1s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`,animationDirection:`alternate`,"&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:`0s`},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:`0.4s`},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:`0.8s`},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:`1.2s`}},"&-progress":{position:`absolute`,left:`50%`,top:0,transform:`translateX(-50%)`},"&-circle":{strokeLinecap:`round`,transition:[`stroke-dashoffset`,`stroke-dasharray`,`stroke`,`stroke-width`,`opacity`].map(e=>`${e} ${r} ease`).join(`,`),fillOpacity:0,stroke:`currentcolor`},"&-circle-bg":{stroke:e.colorFillSecondary}}}}},hG=e=>{let{componentCls:t}=e,[n]=ol(e.antCls,`spin`);return{[t]:{"&-sm":{[n(`dot-holder-size`)]:e.dotSizeSM},"&-lg":{[n(`dot-holder-size`)]:e.dotSizeLG}}}},gG=rl(`Spin`,e=>{let t=gs(e,{spinDotDefault:e.colorTextDescription});return[pG(t),mG(t),hG(t)]},e=>{let{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:n}}),_G=200,vG=[[30,.05],[70,.03],[96,.01]];function yG(e,t){let[n,r]=S.useState(0),i=S.useRef(null),a=t===`auto`;return S.useEffect(()=>(a&&e&&(r(0),i.current=setInterval(()=>{r(e=>{let t=100-e;for(let n=0;n{i.current&&=(clearInterval(i.current),null)}),[a,e]),a?n:t}var bG;function xG(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}var SG=e=>{let{prefixCls:t,spinning:n=!0,delay:r=0,className:i,rootClassName:a,size:o,tip:s,description:c,wrapperClassName:l,style:u,children:d,fullscreen:f=!1,indicator:p,percent:m,classNames:h,styles:g,..._}=e,{getPrefixCls:v,direction:y,indicator:b,className:x,style:C,classNames:w,styles:T}=li(`spin`),E=v(`spin`,t),[D,O]=gG(E),[k,A]=S.useState(()=>n&&!xG(n,r)),j=yG(k,m);S.useEffect(()=>{if(n){let e=IR(r,()=>{A(!0)});return e(),()=>{e?.cancel?.()}}A(!1)},[r,n]);let M=th(e=>o??e),N=c??s,P={...e,size:M,spinning:k,tip:N,description:N,fullscreen:f,children:d,percent:j},[F,I]=Fd([w,h],[T,g],{props:P}),L=p??b??bG,R=d!==void 0,z=R||f,B=S.createElement(S.Fragment,null,S.createElement(uG,{className:J(F.indicator),style:I.indicator,prefixCls:E,indicator:L,percent:j}),N&&S.createElement(`div`,{className:J(`${E}-description`,F.tip,F.description),style:{...I.tip,...I.description}},N));return S.createElement(`div`,{className:J(E,{[`${E}-sm`]:M===`small`,[`${E}-lg`]:M===`large`,[`${E}-spinning`]:k,[`${E}-rtl`]:y===`rtl`,[`${E}-fullscreen`]:f},a,F.root,f&&F.mask,z?l:[`${E}-section`,F.section],x,i,D,O),style:{...I.root,...z?{}:I.section,...f?I.mask:{},...C,...u},"aria-live":`polite`,"aria-busy":k,..._},k&&(z?S.createElement(`div`,{className:J(`${E}-section`,F.section),style:I.section},B):B),R&&S.createElement(`div`,{className:J(`${E}-container`,F.container),style:I.container},d))};SG.setDefaultIndicator=e=>{bG=e};var CG=(e,t={})=>!fd(e)&&t?.skipEmpty?[]:Array.isArray(e)?e:[e],wG=null,TG=e=>e(),EG=[],DG={};function OG(){let{getContainer:e,duration:t,rtl:n,maxCount:r,top:i}=DG,a=e?.()||document.body;return{getContainer:()=>a,duration:t,rtl:n,maxCount:r,top:i}}var kG=S.forwardRef((e,t)=>{let{messageConfig:n,sync:r}=e,{getPrefixCls:i}=(0,S.useContext)(oi),a=DG.prefixCls||i(`message`),o=(0,S.useContext)(tx),[s,c]=Pm({...n,prefixCls:a,...o.message});return S.useImperativeHandle(t,()=>{let e={...s};return Object.keys(e).forEach(t=>{e[t]=(...e)=>(r(),s[t].apply(s,e))}),{instance:e,sync:r}}),c}),AG=S.forwardRef((e,t)=>{let[n,r]=S.useState(OG),i=()=>{r(OG)};S.useEffect(i,[]);let a=rm(),o=a.getRootPrefixCls(),s=a.getIconPrefixCls(),c=a.getTheme(),l=S.createElement(kG,{ref:t,sync:i,messageConfig:n});return S.createElement(am,{prefixCls:o,iconPrefixCls:s,theme:c},a.holderRender?a.holderRender(l):l)}),jG=()=>{if(!wG){let e=document.createDocumentFragment(),t={fragment:e};wG=t,TG(()=>{Lm(S.createElement(AG,{ref:e=>{let{instance:n,sync:r}=e||{};Promise.resolve().then(()=>{!t.instance&&n&&(t.instance=n,t.sync=r,jG())})}}),e)});return}wG.instance&&(EG.forEach(e=>{let{type:t,skipped:n}=e;if(!n)switch(t){case`open`:TG(()=>{let t=wG.instance.open({...DG,...e.config});t?.then(e.resolve),e.setCloseFn(t)});break;case`destroy`:TG(()=>{wG?.instance.destroy(e.key)});break;default:TG(()=>{var n;let r=(n=wG.instance)[t].apply(n,Zr(e.args));r?.then(e.resolve),e.setCloseFn(r)})}}),EG=[])};function MG(e){DG={...DG,...e},TG(()=>{wG?.sync?.()})}function NG(e){let t=Om(t=>{let n,r={type:`open`,config:e,resolve:t,setCloseFn:e=>{n=e}};return EG.push(r),()=>{n?TG(()=>{n()}):r.skipped=!0}});return jG(),t}function PG(e,t){let n=Om(n=>{let r,i={type:e,args:t,resolve:n,setCloseFn:e=>{r=e}};return EG.push(i),()=>{r?TG(()=>{r()}):i.skipped=!0}});return jG(),n}var FG=e=>{EG.push({type:`destroy`,key:e}),jG()},IG=[`success`,`info`,`warning`,`error`,`loading`],LG={open:NG,destroy:FG,config:MG,useMessage:Fm,_InternalPanelDoNotUseOrYouWillBeFired:Em};IG.forEach(e=>{LG[e]=(...t)=>PG(e,t)});var RG=sx(e=>{let{prefixCls:t,className:n,closeIcon:r,closable:i,type:a,title:o,children:s,footer:c,classNames:l,styles:u,...d}=e,{getPrefixCls:f}=S.useContext(oi),{className:p,style:m,classNames:h,styles:g}=li(`modal`),_=f(),v=t||f(`modal`),y=bf(_),[b,x]=sb(v,y),[C,w]=Fd([h,l],[g,u],{props:e}),T=`${v}-confirm`,E={};return E=a?{closable:i??!1,title:``,footer:``,children:S.createElement(fb,{...e,prefixCls:v,confirmPrefixCls:T,rootPrefixCls:_,content:s})}:{closable:i??!0,title:o,footer:c!==null&&S.createElement(Xy,{...e}),children:s},S.createElement(w_,{prefixCls:v,className:J(b,`${v}-pure-panel`,a&&T,a&&`${T}-${a}`,n,p,x,y,C.root),style:{...m,...w.root},...d,closeIcon:Yy(v,r),closable:i,classNames:C,styles:w,...E})});function zG(e){return yb(bb(e))}var BG=lb;BG.useModal=kb,BG.info=function(e){return yb(xb(e))},BG.success=function(e){return yb(Sb(e))},BG.error=function(e){return yb(Cb(e))},BG.warning=zG,BG.warn=zG,BG.confirm=function(e){return yb(wb(e))},BG.destroyAll=function(){for(;hb.length;){let e=hb.pop();e&&e()}},BG.config=Tb,BG._InternalPanelDoNotUseOrYouWillBeFired=RG;var VG=rl(`Popconfirm`,e=>{let{componentCls:t,iconCls:n,antCls:r,zIndexPopup:i,colorText:a,colorWarning:o,marginXXS:s,marginXS:c,fontSize:l,fontWeightStrong:u,colorTextHeading:d}=e;return{[t]:{zIndex:i,[`&${r}-popover`]:{fontSize:l},[`${t}-message`]:{marginBottom:c,display:`flex`,flexWrap:`nowrap`,alignItems:`start`,[`> ${t}-message-icon ${n}`]:{color:o,fontSize:l,lineHeight:1,marginInlineEnd:c},[`${t}-title`]:{fontWeight:u,color:d,"&:only-child":{fontWeight:`normal`}},[`${t}-description`]:{marginTop:s,color:a}},[`${t}-buttons`]:{textAlign:`end`,whiteSpace:`nowrap`,button:{marginInlineStart:c}}}}},e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1}),HG=e=>{let{prefixCls:t,okButtonProps:n,cancelButtonProps:r,title:i,description:a,cancelText:o,okText:s,okType:c=`primary`,icon:l=S.createElement(Vl,null),showCancel:u=!0,close:d,onConfirm:f,onCancel:p,onPopupClick:m,classNames:h,styles:g}=e,{getPrefixCls:_}=S.useContext(oi),[v]=cd(`Popconfirm`,td.Popconfirm),y=QC(i),b=QC(a);return S.createElement(`div`,{className:`${t}-inner-content`,onClick:m},S.createElement(`div`,{className:`${t}-message`},l&&S.createElement(`span`,{className:`${t}-message-icon`},l),S.createElement(`div`,{className:`${t}-message-text`},y&&S.createElement(`div`,{className:J(`${t}-title`,h?.title),style:g?.title},y),b&&S.createElement(`div`,{className:J(`${t}-description`,h?.content),style:g?.content},b))),S.createElement(`div`,{className:`${t}-buttons`},u&&S.createElement(Zg,{onClick:p,size:`small`,...r},o||v?.cancelText),S.createElement(Qg,{buttonProps:{size:`small`,...fh(c),...n},actionFn:f,close:d,prefixCls:_(`btn`),quitOnNullishReturnValue:!0,emitEvent:!0},s||v?.okText)))},UG=e=>{let{prefixCls:t,placement:n,className:r,style:i,...a}=e,{getPrefixCls:o}=S.useContext(oi),s=o(`popconfirm`,t);return VG(s),S.createElement(Fw,{placement:n,className:J(s,r),style:i,content:S.createElement(HG,{prefixCls:s,...a})})},WG=S.forwardRef((e,t)=>{let{prefixCls:n,placement:r=`top`,trigger:i,okType:a=`primary`,icon:o=S.createElement(Vl,null),children:s,overlayClassName:c,onOpenChange:l,overlayStyle:u,styles:d,arrow:f,classNames:p,...m}=e,{getPrefixCls:h,className:g,style:_,classNames:v,styles:y,arrow:b,trigger:x}=li(`popconfirm`),[C,w]=Hn(e.defaultOpen??!1,e.open),T=_w(f,b),E=i||x||`click`,D=e=>{w(e),l?.(e)},O=()=>{D(!1)},k=t=>e.onConfirm?.call(void 0,t),A=t=>{D(!1),e.onCancel?.call(void 0,t)},j=t=>{let{disabled:n=!1}=e;n||D(t)},M=h(`popconfirm`,n),N={...e,placement:r,trigger:E,okType:a,overlayStyle:u,styles:d,classNames:p},[P,F]=Fd([v,p],[y,d],{props:N}),I=J(M,g,c,P.root);return VG(M),S.createElement(Iw,{arrow:T,...Sr(m,[`title`]),trigger:E,placement:r,onOpenChange:j,open:C,ref:t,classNames:{root:I,container:P.container,arrow:P.arrow},styles:{root:{..._,...F.root,...u},container:F.container,arrow:F.arrow},content:S.createElement(HG,{okType:a,icon:o,...e,prefixCls:M,close:O,onConfirm:k,onCancel:A,classNames:P,styles:F}),"data-popover-inject":!0},s)});WG._InternalPanelDoNotUseOrYouWillBeFired=UG;var GG={percent:0,prefixCls:`rc-progress`,strokeColor:`#2db7f5`,strokeLinecap:`round`,strokeWidth:1,railColor:`#D9D9D9`,railWidth:1,gapPosition:`bottom`,loading:!1},KG=()=>{let e=(0,S.useRef)([]),t=(0,S.useRef)(null);return(0,S.useEffect)(()=>{let n=Date.now(),r=!1;e.current.forEach(e=>{if(!e)return;r=!0;let i=e.style;i.transitionDuration=`.3s, .3s, .3s, .06s`,t.current&&n-t.current<100&&(i.transitionDuration=`0s, 0s`)}),r&&(t.current=Date.now())}),e.current},qG=({bg:e,children:t})=>S.createElement(`div`,{style:{width:`100%`,height:`100%`,background:e}},t);function JG(e,t){return Object.keys(e).map(n=>{let r=`${Math.floor(parseFloat(n)*t)}%`;return`${e[n]} ${r}`})}var YG=S.forwardRef((e,t)=>{let{prefixCls:n,color:r,gradientId:i,radius:a,className:o,style:s,ptg:c,strokeLinecap:l,strokeWidth:u,size:d,gapDegree:f}=e,p=r&&typeof r==`object`,m=p?`#FFF`:void 0,h=d/2,g=S.createElement(`circle`,{className:J(`${n}-circle-path`,o),r:a,cx:h,cy:h,stroke:m,strokeLinecap:l,strokeWidth:u,opacity:c===0?0:1,style:s,ref:t});if(!p)return g;let _=`${i}-conic`,v=f?`${180+f/2}deg`:`0deg`,y=JG(r,(360-f)/360),b=JG(r,1),x=`conic-gradient(from ${v}, ${y.join(`, `)})`,C=`linear-gradient(to ${f?`bottom`:`top`}, ${b.join(`, `)})`;return S.createElement(S.Fragment,null,S.createElement(`mask`,{id:_},g),S.createElement(`foreignObject`,{x:0,y:0,width:d,height:d,mask:`url(#${_})`},S.createElement(qG,{bg:C},S.createElement(qG,{bg:x}))))}),XG=(e,t,n,r,i,a,o,s,c,l,u=0)=>{let d=n/100*360*((360-a)/360),f=a===0?0:{bottom:0,top:180,left:90,right:-90}[o],p=(100-r)/100*t;return c===`round`&&r!==100&&(p+=l/2,p>=t&&(p=t-.01)),{stroke:typeof s==`string`?s:void 0,strokeDasharray:`${t}px ${e}`,strokeDashoffset:p+u,transform:`rotate(${i+d+f}deg)`,transformOrigin:`50px 50px`,transition:`stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s`,fillOpacity:0}},ZG=(({id:e,loading:t})=>{if(!t)return{indeterminateStyleProps:{},indeterminateStyleAnimation:null};let n=`${e}-indeterminate-animate`;return{indeterminateStyleProps:{transform:`rotate(0deg)`,animation:`${n} 1s linear infinite`},indeterminateStyleAnimation:S.createElement(`style`,null,`@keyframes ${n} { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } - }`)}});function tK(){return tK=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:t,prefixCls:n,classNames:r={},styles:i={},steps:a,strokeWidth:o,railWidth:s,gapDegree:c=0,gapPosition:l,railColor:u,strokeLinecap:d,style:f,className:p,strokeColor:m,percent:h,loading:g,..._}={...JG,...e},v=zf(t),y=`${v}-gradient`,b=50-o/2,x=Math.PI*2*b,C=c>0?90+c/2:-90,w=x*((360-c)/360),{count:T,gap:E}=typeof a==`object`?a:{count:a,gap:2},D=nK(h),O=nK(m),k=O.find(e=>e&&typeof e==`object`),A=k&&typeof k==`object`?`butt`:d,{indeterminateStyleProps:j,indeterminateStyleAnimation:M}=eK({id:v,loading:g}),N=$G(x,w,0,100,C,c,l,u,A,o),P=YG(),F=()=>{let e=0;return D.map((t,a)=>{let s=O[a]||O[O.length-1],u=$G(x,w,e,t,C,c,l,s,A,o);return e+=t,S.createElement(QG,{key:a,color:s,ptg:t,radius:b,prefixCls:n,gradientId:y,className:r.track,style:{...u,...j,...i.track},strokeLinecap:A,strokeWidth:o,gapDegree:c,ref:e=>{P[a]=e},size:100})}).reverse()},I=()=>{let e=Math.round(T*(D[0]/100)),t=100/T,a=0;return Array(T).fill(null).map((s,d)=>{let f=d<=e-1?O[0]:u,p=f&&typeof f==`object`?`url(#${y})`:void 0,m=$G(x,w,a,t,C,c,l,f,`butt`,o,E);return a+=(w-m.strokeDashoffset+E)*100/w,S.createElement(`circle`,{key:d,className:J(`${n}-circle-path`,r.track),r:b,cx:50,cy:50,stroke:p,strokeWidth:o,opacity:1,style:{...m,...i.track},ref:e=>{P[d]=e}})})};return S.createElement(`svg`,tK({className:J(`${n}-circle`,r.root,p),viewBox:`0 0 100 100`,style:{...i.root,...f},id:t,role:`presentation`},_),!T&&S.createElement(`circle`,{className:J(`${n}-circle-rail`,r.rail),r:b,cx:50,cy:50,stroke:u,strokeLinecap:A,strokeWidth:s||o,style:{...N,...i.rail}}),T?I():F(),M)};function iK(e){return!e||e<0?0:e>100?100:e}function aK({success:e}){let t;return e&&`percent`in e&&(t=e.percent),t}var oK=({percent:e,success:t})=>{let n=iK(aK({success:t}));return[n,iK(iK(e)-n)]},sK=({success:e={},strokeColor:t})=>{let{strokeColor:n}=e;return[n||Zs.green,t||null]},cK=(e,t,n)=>{let r=-1,i=-1;if(t===`step`){let t=n.steps,a=n.strokeWidth;typeof e==`string`||e===void 0?(r=e===`small`?2:14,i=a??8):pd(e)?[r,i]=[e,e]:[r=14,i=8]=Array.isArray(e)?e:[e.width,e.height],r*=t}else if(t===`line`){let t=n?.strokeWidth;typeof e==`string`||e===void 0?i=t||(e===`small`?6:8):pd(e)?[r,i]=[e,e]:[r=-1,i=8]=Array.isArray(e)?e:[e.width,e.height]}else (t===`circle`||t===`dashboard`)&&(typeof e==`string`||e===void 0?[r,i]=e===`small`?[60,60]:[120,120]:pd(e)?[r,i]=[e,e]:Array.isArray(e)&&(r=e[0]??e[1]??120,i=e[0]??e[1]??120));return[r,i]},lK=3,uK=e=>lK/e*100,dK=[`root`,`body`,`indicator`],fK=e=>{let{prefixCls:t,classNames:n,styles:r,railColor:i,trailColor:a,strokeLinecap:o=`round`,gapPosition:s,gapPlacement:c,gapDegree:l,width:u=120,type:d,children:f,success:p,size:m=u,steps:h}=e,{direction:g}=li(`progress`),_=i??a,[v,y]=cK(m,`circle`),{strokeWidth:b}=e;b===void 0&&(b=Math.max(uK(v),6));let x={width:v,height:y,fontSize:v*.15+6},C=S.useMemo(()=>{if(l||l===0)return l;if(d===`dashboard`)return 75},[l,d]),w=oK(e),T=S.useMemo(()=>{let e=(c??s)||d===`dashboard`&&`bottom`||void 0,t=g===`rtl`;switch(e){case`start`:return t?`right`:`left`;case`end`:return t?`left`:`right`;default:return e}},[g,c,s,d]),E=Object.prototype.toString.call(e.strokeColor)===`[object Object]`,D=sK({success:p,strokeColor:e.strokeColor}),O=J(`${t}-body`,{[`${t}-circle-gradient`]:E},n.body),k=S.createElement(rK,{steps:h,percent:h?w[1]:w,strokeWidth:b,railWidth:b,strokeColor:h?D[1]:D,strokeLinecap:o,railColor:_,prefixCls:t,gapDegree:C,gapPosition:T,classNames:Sr(n,dK),styles:Sr(r,dK)}),A=v<=20,j=S.createElement(`div`,{className:O,style:{...x,...r.body}},k,!A&&f);return A?S.createElement(Aw,{title:f},j):j},pK=`--progress-line-stroke-color`,mK=e=>{let t=e?`100%`:`-100%`;return new Lo(`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}})},hK=e=>{let{componentCls:t,iconCls:n}=e;return{[t]:{...Jc(e),display:`inline-flex`,"&-rtl":{direction:`rtl`},[`${t}-indicator`]:{color:e.colorText,lineHeight:1,whiteSpace:`nowrap`,verticalAlign:`middle`,wordBreak:`normal`,[n]:{fontSize:e.fontSize}},[`&${t}-status-exception`]:{[`${t}-indicator`]:{color:e.colorError}},[`&${t}-status-success`]:{[`${t}-indicator`]:{color:e.colorSuccess}}}}},gK=e=>{let{componentCls:t}=e;return{[`${t}-line`]:{position:`relative`,width:`100%`,fontSize:e.fontSize,[`${t}-body`]:{display:`inline-flex`,alignItems:`center`,width:`100%`,gap:e.marginXS},[`${t}-rail`]:{flex:`auto`,background:e.remainingColor,borderRadius:e.lineBorderRadius,position:`relative`,width:`100%`,overflow:`hidden`},[`&${t}-status-active`]:{[`${t}-track:after`]:{content:`""`,position:`absolute`,inset:0,backgroundColor:e.colorBgContainer,borderRadius:`inherit`,opacity:0,animationName:mK(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:`infinite`}},[`${t}-track`]:{position:`absolute`,insetInlineStart:0,insetBlock:0,borderRadius:`inherit`,background:e.defaultColor,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,minWidth:`max-content`,display:`flex`,alignItems:`center`,"&-success":{background:e.colorSuccess}},[`&${t}-status-exception`]:{[`${t}-track`]:{background:e.colorError}},[`&${t}-status-success`]:{[`${t}-track`]:{background:e.colorSuccess}},[`${t}-indicator-outer`]:{[`&${t}-indicator-start`]:{order:-1}},[`${t}-body-layout-bottom`]:{flexDirection:`column`,alignItems:`center`,gap:e.marginXXS},[`${t}-indicator${t}-indicator-inner`]:{color:e.colorWhite,paddingInline:e.paddingXXS,width:`100%`,display:`flex`,justifyContent:`center`,[`&${t}-indicator-end`]:{justifyContent:`end`},[`&${t}-indicator-start`]:{justifyContent:`start`},[`&${t}-indicator-bright`]:{color:`rgba(0, 0, 0, 0.45)`}}}}},_K=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-circle`]:{[`${t}-circle-rail`]:{stroke:e.remainingColor},[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-body`]:{position:`relative`,lineHeight:1,backgroundColor:`transparent`},[`${t}-indicator`]:{position:`absolute`,insetBlockStart:`50%`,insetInlineStart:0,width:`100%`,margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:`normal`,textAlign:`center`,transform:`translateY(-50%)`,[n]:{fontSize:e.circleIconFontSize}},[`&${t}-status-exception`]:{[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}}},[`&${t}-status-success`]:{[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:`bottom`}}}},vK=e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:`inline-block`,"&-body":{display:`flex`,flexDirection:`row`,alignItems:`center`,gap:e.progressStepMarginInlineEnd,[`${t}-indicator`]:{marginInlineStart:e.marginXS}},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}},yK=e=>{let{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-indicator ${n}`]:{fontSize:e.fontSizeSM}}}},bK=rl(`Progress`,e=>{let t=e.calc(e.marginXXS).div(2).equal(),n=gs(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:`2.4s`});return[hK(n),gK(n),_K(n),vK(n),yK(n)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:`1em`,circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`})),xK=e=>{let t=[];return Object.keys(e).forEach(n=>{let r=Number.parseFloat(n.replace(/%/g,``));Number.isNaN(r)||t.push({key:r,value:e[n]})}),t=t.sort((e,t)=>e.key-t.key),t.map(({key:e,value:t})=>`${t} ${e}%`).join(`, `)},SK=(e,t)=>{let{from:n=Zs.blue,to:r=Zs.blue,direction:i=t===`rtl`?`to left`:`to right`,...a}=e;if(Object.keys(a).length!==0){let e=`linear-gradient(${i}, ${xK(a)})`;return{background:e,[pK]:e}}let o=`linear-gradient(${i}, ${n}, ${r})`;return{background:o,[pK]:o}},CK=e=>{let{prefixCls:t,classNames:n,styles:r,direction:i,percent:a,size:o,strokeWidth:s,strokeColor:c,strokeLinecap:l=`round`,children:u,railColor:d,trailColor:f,percentPosition:p,success:m}=e,{align:h,type:g}=p,_=d??f,v=l===`square`||l===`butt`?0:void 0,[y,b]=cK(o??[-1,s||(o===`small`?6:8)],`line`,{strokeWidth:s}),x={backgroundColor:_||void 0,borderRadius:v,height:b},C=`${t}-track`,w=c&&typeof c!=`string`?SK(c,i):{[pK]:c,background:c},T={width:`${iK(a)}%`,height:b,borderRadius:v,...w},E=aK(e),D={width:`${iK(E)}%`,height:b,borderRadius:v,backgroundColor:m?.strokeColor};return S.createElement(`div`,{className:J(`${t}-body`,n.body,{[`${t}-body-layout-bottom`]:h===`center`&&g===`outer`}),style:{width:y>0?y:`100%`,...r.body}},S.createElement(`div`,{className:J(`${t}-rail`,n.rail),style:{...x,...r.rail}},S.createElement(`div`,{className:J(C,n.track),style:{...T,...r.track}},g===`inner`&&u),E!==void 0&&S.createElement(`div`,{className:J(C,`${C}-success`,n.track),style:{...D,...r.track}})),g===`outer`&&u)},wK=e=>{let{classNames:t,styles:n,size:r,steps:i,rounding:a=Math.round,percent:o=0,strokeWidth:s=8,strokeColor:c,railColor:l,trailColor:u,prefixCls:d,children:f}=e,p=a(o/100*i),[m,h]=cK(r??[r===`small`?2:14,s],`step`,{steps:i,strokeWidth:s}),g=m/i,_=Array.from({length:i}),v=l??u;for(let e=0;e{let{prefixCls:n,className:r,rootClassName:i,classNames:a,styles:o,steps:s,strokeColor:c,percent:l=0,size:u=`medium`,showInfo:d=!0,type:f=`line`,status:p,format:m,style:h,percentPosition:g={},..._}=e,{align:v=`end`,type:y=`outer`}=g,b=Array.isArray(c)?c[0]:c,x=typeof c==`string`||Array.isArray(c)?c:void 0,C=S.useMemo(()=>b?new Rs(typeof b==`string`?b:Object.values(b)[0]).isLight():!1,[c]),w=S.useMemo(()=>{let t=aK(e);return Number.parseInt(t===void 0?(l??0)?.toString():(t??0)?.toString(),10)},[l,e.success]),T=S.useMemo(()=>!TK.includes(p)&&w>=100?`success`:p||`normal`,[p,w]),{getPrefixCls:E,direction:D,className:O,style:k,classNames:A,styles:j}=li(`progress`),M=E(`progress`,n),[N,P]=bK(M),F={...e,percent:l,type:f,size:u,showInfo:d,percentPosition:g},[I,L]=Fd([A,a],[j,o],{props:F}),R=f===`line`,z=R&&!s,B=S.useMemo(()=>{if(!d)return null;let t=aK(e),n,r=m||(e=>`${e}%`),i=R&&C&&y===`inner`;return y===`inner`||m||T!==`exception`&&T!==`success`?n=r(iK(l),iK(t)):T===`exception`?n=R?S.createElement(Fl,null):S.createElement(Rl,null):T===`success`&&(n=R?S.createElement(Ml,null):S.createElement(kC,null)),S.createElement(`span`,{className:J(`${M}-indicator`,{[`${M}-indicator-bright`]:i,[`${M}-indicator-${v}`]:z,[`${M}-indicator-${y}`]:z},I.indicator),style:L.indicator,title:typeof n==`string`?n:void 0},n)},[d,l,w,T,f,M,m,R,C,y,v,z,I.indicator,L.indicator]),V={...e,classNames:I,styles:L},H;f===`line`?H=s?S.createElement(wK,{...V,strokeColor:x,prefixCls:M,steps:hd(s)?s.count:s},B):S.createElement(CK,{...V,strokeColor:b,prefixCls:M,direction:D,percentPosition:{align:v,type:y}},B):(f===`circle`||f===`dashboard`)&&(H=S.createElement(fK,{...V,strokeColor:b,prefixCls:M,progressStatus:T},B));let U=J(M,`${M}-status-${T}`,{[`${M}-${f===`dashboard`&&`circle`||f}`]:f!==`line`,[`${M}-inline-circle`]:f===`circle`&&cK(u,`circle`)[0]<=20,[`${M}-line`]:z,[`${M}-line-align-${v}`]:z,[`${M}-line-position-${y}`]:z,[`${M}-steps`]:s,[`${M}-show-info`]:d,[`${M}-small`]:u===`small`,[`${M}-rtl`]:D===`rtl`},O,r,i,I.root,N,P);return S.createElement(`div`,{ref:t,style:{...k,...L.root,...h},className:U,role:`progressbar`,"aria-valuenow":w,"aria-valuemin":0,"aria-valuemax":100,...Sr(_,[`railColor`,`trailColor`,`strokeWidth`,`width`,`gapDegree`,`gapPosition`,`gapPlacement`,`strokeLinecap`,`success`])},H)}),DK={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z`}}]},name:`reload`,theme:`outlined`};function OK(){return OK=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,OK({},e,{ref:t,icon:DK}))),AK=hz,jK=e=>{let{value:t,formatter:n,precision:r,decimalSeparator:i,groupSeparator:a=``,prefixCls:o}=e,s;if(typeof n==`function`)s=n(t);else{let e=String(t),n=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(!n||e===`-`)s=e;else{let e=n[1],t=n[2]||`0`,c=n[4]||``;t=t.replace(/\B(?=(\d{3})+(?!\d))/g,a),pd(r)&&(c=c.padEnd(r,`0`).slice(0,r>0?r:0)),c&&=`${i}${c}`,s=[S.createElement(`span`,{key:`int`,className:`${o}-content-value-int`},e,t),c&&S.createElement(`span`,{key:`decimal`,className:`${o}-content-value-decimal`},c)]}}return S.createElement(`span`,{className:`${o}-content-value`},s)},MK=e=>{let{componentCls:t,marginXXS:n,padding:r,colorTextDescription:i,titleFontSize:a,colorTextHeading:o,contentFontSize:s,fontFamily:c}=e;return{[t]:{...Jc(e),[`${t}-header`]:{paddingBottom:n,[`${t}-title`]:{color:i,fontSize:a}},[`${t}-skeleton`]:{paddingTop:r},[`${t}-content`]:{color:o,fontSize:s,fontFamily:c,[`${t}-content-value`]:{display:`inline-block`,direction:`ltr`},[`${t}-content-prefix, ${t}-content-suffix`]:{display:`inline-block`},[`${t}-content-prefix`]:{marginInlineEnd:n},[`${t}-content-suffix`]:{marginInlineStart:n}}}}},NK=rl(`Statistic`,e=>MK(gs(e,{})),e=>{let{fontSizeHeading3:t,fontSize:n}=e;return{titleFontSize:n,contentFontSize:t}}),PK=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,valueStyle:o,value:s=0,title:c,valueRender:l,prefix:u,suffix:d,loading:f=!1,formatter:p,precision:m,decimalSeparator:h=`.`,groupSeparator:g=`,`,onMouseEnter:_,onMouseLeave:v,styles:y,classNames:b,...x}=e,{getPrefixCls:C,direction:w,className:T,style:E,classNames:D,styles:O}=li(`statistic`),k=C(`statistic`,n),[A,j]=NK(k),M={...e,decimalSeparator:h,groupSeparator:g,loading:f,value:s},[N,P]=Fd([D,b],[O,y],{props:M}),F=S.createElement(jK,{decimalSeparator:h,groupSeparator:g,prefixCls:k,formatter:p,precision:m,value:s}),I=J(k,{[`${k}-rtl`]:w===`rtl`},T,r,i,N.root,A,j),L=J(`${k}-header`,N.header),R=J(`${k}-title`,N.title),z=J(`${k}-content`,N.content),B=J(`${k}-content-prefix`,N.prefix),V=J(`${k}-content-suffix`,N.suffix),H=S.useRef(null);S.useImperativeHandle(t,()=>({nativeElement:H.current}));let U=Vu(x,{aria:!0,data:!0});return S.createElement(`div`,{...U,className:I,style:{...P.root,...E,...a},ref:H,onMouseEnter:_,onMouseLeave:v},c&&S.createElement(`div`,{className:L,style:P.header},S.createElement(`div`,{className:R,style:P.title},c)),S.createElement(Ky,{paragraph:!1,loading:f,className:`${k}-skeleton`,active:!0},S.createElement(`div`,{className:z,style:{...o,...P.content}},u&&S.createElement(`span`,{className:B,style:P.prefix},u),typeof l==`function`?l(F):F,d&&S.createElement(`span`,{className:V,style:P.suffix},d))))}),FK=[[`Y`,1e3*60*60*24*365],[`M`,1e3*60*60*24*30],[`D`,1e3*60*60*24],[`H`,1e3*60*60],[`m`,1e3*60],[`s`,1e3],[`S`,1]];function IK(e,t){let n=e,r=/\[[^\]]*]/g,i=(t.match(r)||[]).map(e=>e.slice(1,-1)),a=t.replace(r,`[]`),o=FK.reduce((e,[t,r])=>{if(e.includes(t)){let i=Math.floor(n/r);return n-=i*r,e.replace(RegExp(`${t}+`,`g`),e=>{let t=e.length;return i.toString().padStart(t,`0`)})}return e},a),s=0;return o.replace(r,()=>{let e=i[s];return s+=1,e})}function LK(e,t,n){let{format:r=``}=t,i=new Date(e).getTime(),a=Date.now();return IK(Math.max(n?i-a:a-i,0),r)}var RK=1e3/60;function zK(e){return new Date(e).getTime()}var BK=e=>{let{value:t,format:n=`HH:mm:ss`,onChange:r,onFinish:i,type:a,...o}=e,s=a===`countdown`,[c,l]=S.useState(null),u=In(()=>{let e=Date.now(),n=zK(t);l({});let a=s?n-e:e-n;return r?.(a),s&&n{let e,t=()=>{u()||window.clearInterval(e)},n=()=>{e=window.setInterval(t,RK)},r=()=>{window.clearInterval(e)};return n(),()=>{r()}},[t,s]),S.useEffect(()=>{l({})},[]);let d=(e,t)=>c?LK(e,{...t,format:n},s):`-`,f=e=>Pp(e,{title:void 0});return S.createElement(PK,{...o,value:t,valueRender:f,formatter:d})},VK=S.memo(e=>S.createElement(BK,{...e,type:`countdown`}));PK.Timer=BK,PK.Countdown=VK;var HK=PK;function UK(e){let{prefixCls:t,className:n,style:r,status:i}=e,a=`${t}-rail`;return S.createElement(`div`,{className:J(a,`${a}-${i}`,n),style:r})}var WK=S.createContext({}),GK=S.createContext(null);function KK(){return KK=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:n,style:r,children:i,...a}=e,{prefixCls:o,classNames:s,styles:c}=S.useContext(GK),{className:l,style:u}=S.useContext(qK),d=`${o}-item`;return S.createElement(`div`,KK({},Vu(a,!1),{ref:t,className:J(`${d}-icon`,s.itemIcon,l,n),style:{...c.itemIcon,...u,...r}}),i)});function YK(){return YK=Object.assign?Object.assign.bind():function(e){for(var t=1;t{g?.(e),f(c)},N.onKeyDown=e=>{let{which:t}=e;(t===om.ENTER||t===om.SPACE)&&f(c)});let P=w||`wait`,F=XK(_),I=XK(v),L=J(p,`${p}-${P}`,{[`${p}-custom`]:C,[`${p}-active`]:s,[`${p}-disabled`]:x===!0,[`${p}-empty-header`]:!F&&!I},T,n.item,D.root),R=S.createElement(JK,null);u&&(R=u(R,{...j,components:{Icon:JK}}));let z=S.createElement(`div`,{className:J(`${p}-wrapper`,n.itemWrapper,D.wrapper),style:{...r.itemWrapper,...O.wrapper}},S.createElement(qK.Provider,{value:{className:D.icon,style:O.icon}},R),S.createElement(`div`,{className:J(`${p}-section`,n.itemSection,D.section),style:{...r.itemSection,...O.section}},S.createElement(`div`,{className:J(`${p}-header`,n.itemHeader,D.header),style:{...r.itemHeader,...O.header}},F&&S.createElement(`div`,{className:J(`${p}-title`,n.itemTitle,D.title),style:{...r.itemTitle,...O.title}},_),I&&S.createElement(`div`,{title:typeof v==`string`?v:void 0,className:J(`${p}-subtitle`,n.itemSubtitle,D.subtitle),style:{...r.itemSubtitle,...O.subtitle}},v),!a&&S.createElement(UK,{prefixCls:p,className:J(n.itemRail,D.rail),style:{...r.itemRail,...O.rail},status:m?w:o})),XK(A)&&S.createElement(`div`,{className:J(`${p}-content`,n.itemContent,D.content),style:{...r.itemContent,...O.content}},A))),B=S.createElement(h,YK({},k,N,{className:L,style:{...r.item,...O.root,...E}}),d?d(z):z);return l&&(B=l(B,j)||null),B}function QK(){return QK=Object.assign?Object.assign.bind():function(e){for(var t=1;t(m||[]).filter(Boolean),[m]),T=S.useMemo(()=>w.map(({status:e},t)=>{let n=f+t;return e||(n===d?u:n{p&&d!==e&&p(e)},{root:D=`div`,item:O=`div`}=l||{},k=S.useMemo(()=>({prefixCls:t,classNames:i,styles:a,ItemComponent:O}),[t,i,a,O]),A=(e,n)=>{let r=f+n,o=T[n],s=T[n+1],c={...e,status:o};return S.createElement(ZK,{key:r,prefixCls:t,classNames:i,styles:a,data:c,nextStatus:s,active:r===d,index:r,last:w.length-1===n,iconRender:h,itemRender:g,itemWrapperRender:_,onClick:p&&E})};return S.createElement(D,QK({className:C,style:{...n,...a?.root}},v),S.createElement(GK.Provider,{value:k},w.map(A)))}var tq=eq,nq=S.createContext(null),rq=e=>{let{prefixCls:t}=e;return S.createElement(`svg`,{className:`${t}-panel-arrow`,viewBox:`0 0 100 100`,xmlns:`http://www.w3.org/2000/svg`,preserveAspectRatio:`none`},S.createElement(`title`,null,`Arrow`),S.createElement(`path`,{d:`M 0 0 L 100 50 L 0 100`}))},iq=e=>{let{prefixCls:t,rootPrefixCls:n,children:r,percent:i}=e,a=`${t}-item-progress-icon`,o=`${a}-circle`,[,s]=ol(n,`cmp-steps`),c=`calc(${s(`progress-radius`)} * 2 * ${Math.PI*i/100}) 9999`;return S.createElement(S.Fragment,null,S.createElement(`svg`,{className:`${a}-svg`,viewBox:`0 0 100 100`,width:`100%`,height:`100%`,xmlns:`http://www.w3.org/2000/svg`,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":i},S.createElement(`title`,null,`Progress`),S.createElement(`circle`,{className:J(o,`${o}-rail`)}),S.createElement(`circle`,{className:J(o,`${o}-ptg`),strokeDasharray:c,transform:`rotate(-90 50 50)`})),r)},aq=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-item`,[i,a]=ol(n,`cmp-steps`);return{[`${t}-horizontal`]:{[`> ${r}`]:{flex:`1 1 auto`,minWidth:e.iconSize,[`${r}-rail`]:{[i(`horizontal-rail-margin`)]:`calc(${a(`icon-size-max`)} / 2 + ${a(`item-wrapper-padding-top`)})`,position:`static`,marginTop:a(`horizontal-rail-margin`),width:`auto`,borderBlockStartWidth:a(`rail-size`),flex:1,minWidth:0,alignSelf:`flex-start`,transform:`translateY(-50%)`}}}}},oq=e=>{let{componentCls:t,customIconFontSize:n,motionDurationSlow:r,iconSize:i,lineWidth:a,lineType:o,antCls:s}=e,c=`${t}-item`,[l,u]=ol(s,`cmp-steps`);return{[t]:{[l(`icon-size`)]:i,[l(`icon-border-width`)]:a,[`${c}-icon`]:{width:u(`icon-size`),height:u(`icon-size`),margin:0,flex:`none`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:e.iconFontSize,fontFamily:e.fontFamily,lineHeight:u(`icon-size`),textAlign:`center`,borderRadius:u(`icon-size`),border:`${u(`icon-border-width`)} ${o} transparent`,transition:[`background-color`,`border`,`color`,`inset`,`transform`].map(e=>`${e} ${r}`).join(`, `),zIndex:1},[`${c}-custom ${c}-icon`]:{background:`none`,border:0,fontSize:n}}}},sq=e=>{let{componentCls:t,inlineDotSize:n,paddingXS:r,lineWidth:i,antCls:a,calc:o}=e,s=o(r).add(i).equal(),c=`${t}-item`,[l,u]=ol(a,`cmp-steps`);return{[`${t}-inline`]:{[l(`items-offset`)]:`0`,[l(`item-wrapper-padding-top`)]:s,display:`inline-flex`,"&:before":{content:`""`,flex:u(`items-offset`)},[c]:{[l(`title-vertical-row-gap`)]:r,[l(`icon-size`)]:n,[l(`icon-size-active`)]:n,[l(`title-font-size`)]:e.fontSizeSM,[l(`title-line-height`)]:e.lineHeightSM,[l(`item-title-color`)]:e.colorTextSecondary,[l(`subtitle-font-size`)]:e.fontSizeSM,[l(`subtitle-line-height`)]:e.lineHeightSM,[l(`item-subtitle-color`)]:e.colorTextQuaternary,[l(`rail-size`)]:e.lineWidth,[l(`title-horizontal-rail-gap`)]:`0px`,flex:1,"&-wrapper":{paddingInline:e.paddingXXS,marginInline:e.calc(e.marginXXS).div(2).equal(),borderRadius:e.borderRadiusSM,cursor:`pointer`,transition:`background-color ${e.motionDurationMid}`,"&:hover":{background:e.controlItemBgHover}},"&-icon":{[`${c}-icon-dot`]:{"&:after":{display:`none`}}},"&-title":{fontWeight:`normal`,whiteSpace:`nowrap`},"&-content":{display:`none`}}}}};function cq(e){return(e||`--ant-not-exist`).replace(/var\((.*)\)/,`$1`)}var lq=(e,t,n)=>{let{calc:r,componentCls:i,descriptionMaxWidth:a,antCls:o}=e,s=`${i}-item`,[,c]=ol(o,`cmp-steps`);return{[`@container style(${cq(a)})`]:[{[`${s}-icon`]:{marginInlineStart:r(a).sub(c(`icon-size`)).div(2).equal()},[`${s}-rail`]:{width:`auto`,insetInlineStart:r(a).add(c(`icon-size`)).div(2).add(t).equal(),insetInlineEnd:r(a).sub(c(`icon-size`)).div(2).sub(t).mul(-1).equal()}},n]}},uq=e=>{let{componentCls:t,descriptionMaxWidth:n,marginXS:r,fontHeightLG:i,margin:a,paddingSM:o,marginXXS:s,antCls:c,calc:l}=e,u=`${t}-item`,[d,f]=ol(c,`cmp-steps`);return{[t]:{[d(`icon-size-max`)]:`max(${f(`icon-size`)}, ${f(`icon-size-active`,f(`icon-size`))})`,[`${u}-icon`]:{marginBlockStart:`calc((${f(`heading-height`)} - ${f(`icon-size`)}) / 2)`}},[`${t}-title-horizontal`]:{[d(`title-horizontal-item-margin`)]:a,[d(`title-horizontal-rail-margin`)]:a,[d(`title-horizontal-title-height`)]:i,[d(`heading-height`)]:`max(${f(`icon-size`)}, ${f(`title-horizontal-title-height`)})`,[`&${t}-horizontal, &${t}-horizontal-alternate`]:{[`${u}:not(:first-child)`]:{marginInlineStart:f(`title-horizontal-item-margin`)},[`${u}:last-child`]:{flex:`0 1 auto`},[`${u}-wrapper`]:{columnGap:e.marginXS}},[`&${t}-vertical`]:{[`${u}-wrapper`]:{columnGap:e.margin},[`${u}-empty-header`]:{[`${u}-header`]:{minHeight:`auto`},[`${u}-content`]:{marginTop:l(f(`heading-height`)).sub(e.fontHeight).div(2).equal()}}},[`${u}-section`]:{flex:1,minWidth:0},[`${u}-header`]:{minHeight:f(`heading-height`)},[`${u}-title`]:{flex:`0 1 auto`},[`${u}-content`]:{maxWidth:n},[`${u}-subtitle`]:{flex:`0 9999 auto`},[`&${t}-horizontal ${u}-rail`]:{[d(`item-wrapper-padding-top`)]:`0px`,flex:`1 1 0%`,marginInlineStart:f(`title-horizontal-rail-margin`)}},[`${t}-title-vertical`]:{[d(`title-vertical-row-gap`)]:o,[d(`title-horizontal-rail-gap`)]:s,[d(`heading-height`)]:f(`icon-size-max`),[`> ${u}`]:{flex:`1 1 0%`,[`${u}-wrapper`]:{flexDirection:`column`,rowGap:f(`title-vertical-row-gap`),alignItems:`center`},[`${u}-section`]:{alignSelf:`stretch`},[`${u}-header`]:{flexDirection:`column`,alignItems:`center`},[`${u}-title, ${u}-subtitle, ${u}-content`]:{textAlign:`center`,maxWidth:`100%`},[`${u}-subtitle`]:{margin:0},[`${u}-rail`]:{position:`absolute`,top:0,width:`calc(100% - ${f(`icon-size`)} - ${f(`title-horizontal-rail-gap`)} * 2)`,insetInlineStart:`calc(50% + ${f(`icon-size`)} / 2 + ${f(`title-horizontal-rail-gap`)})`}},...lq(e,r,{[`${u}:last-child`]:{flex:`none`},[`${u}-icon`]:{alignSelf:`flex-start`},[`${u}-section`]:{width:n}})}}},dq=e=>{let{componentCls:t,fontSizeIcon:n,navContentMaxWidth:r,navArrowColor:i,colorPrimary:a,motionDurationSlow:o,antCls:s,calc:c}=e,l=`${t}-item`,u=a,[d,f]=ol(s,`cmp-steps`);return{[`${t}${t}-navigation`]:{[l.repeat(4)]:{display:`flex`,justifyContent:`center`,position:`relative`,flex:1,marginInlineStart:0,[`${l}-wrapper`]:{paddingBlock:e.paddingSM},[`${l}-section`]:{maxWidth:r},[`${l}-rail`]:{display:`none`},"&:before":{position:`absolute`,display:`block`,backgroundColor:u,transition:`all ${o}`,transitionTimingFunction:`ease-out`,content:`""`},"&:not(:last-child):after":{position:`absolute`,display:`block`,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${i}`,borderBottom:`none`,borderInlineStart:`none`,borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${i}`,content:`""`},[`&${l}-active`]:{[d(`item-content-active-color`)]:f(`item-content-color`),[d(`item-icon-active-bg-color`)]:f(`item-icon-bg-color`),[d(`item-icon-active-border-color`)]:f(`item-icon-border-color`),[d(`item-icon-active-text-color`)]:f(`item-icon-text-color`)}},[`&${t}-horizontal`]:{[l]:{"&:before":{bottom:0,insetInlineStart:`50%`,width:0,height:e.lineWidthBold},[`&${l}-active:before`]:{insetInlineStart:0,width:`100%`},"&:not(:last-child):after":{top:`50%`,insetInlineStart:c(n).div(2).mul(-1).add(`100%`).equal(),width:n,height:n,transform:`translateY(-50%) rotate(45deg)`}}},[`&${t}-vertical`]:{[l.repeat(4)]:{[`${l}-content`]:{padding:0},"&:before":{insetInlineEnd:0,top:`50%`,width:e.lineWidthBold,height:0},[`&${l}-active::before`]:{top:0,height:`100%`},"&:not(:last-child):after":{left:{_skip_check_:!0,value:`50%`},top:`100%`,width:c(n).div(3).mul(2).equal(),height:c(n).div(3).mul(2).equal(),transform:`translateY(-50%) translateX(-50%) rotate(135deg)`}}}}}},fq=e=>{let{componentCls:t,lineWidthBold:n,borderRadius:r,borderRadiusSM:i,motionDurationMid:a,paddingXS:o,lineType:s,paddingSM:c,antCls:l,calc:u}=e,d=`${t}-item`,[f,p]=ol(l,`cmp-steps`),m=`${Y(n)} ${s} ${p(`panel-border-color`)}`;return{[`${t}${t}-panel`]:[{[`${d}-rail`]:{display:`none`},[`&${t}-horizontal`]:{alignItems:`stretch`,[d]:{flex:1,margin:0}}},{"&":{[f(`panel-padding`)]:c,[f(`item-border-radius`)]:r,[d]:{[f(`panel-bg-color`)]:p(`item-icon-bg-color`),[f(`panel-border-color`)]:p(`item-icon-border-color`),[f(`panel-active-bg-color`)]:p(`item-icon-active-bg-color`),[f(`panel-active-border-color`)]:p(`item-icon-active-border-color`),[f(`panel-title-height`)]:`calc(${p(`title-font-size`)} * ${p(`title-line-height`)})`,[f(`item-base-height`)]:u(p(`panel-padding`)).mul(2).add(p(`icon-size`)).add(p(`panel-title-height`)).equal(),[f(`item-base-width`)]:`calc(${p(`item-base-height`)} * 0.7071)`,transition:`background-color ${a}`}},[`${d}-icon`]:{display:`none`},[`${d}-header`]:{minHeight:`auto`},[`${t}-panel-arrow`]:{position:`absolute`,top:u(n).mul(-1).equal(),insetInlineStart:`100%`,zIndex:1,height:u(n).mul(2).add(`100%`).equal(),width:p(`item-base-width`),overflow:`visible`,strokeLinecap:`round`,path:{fill:p(`panel-bg-color`),stroke:p(`panel-border-color`),strokeWidth:n,vectorEffect:`non-scaling-stroke`,transition:`fill ${a}`}},[`${d}:last-child ${t}-panel-arrow`]:{display:`none`},[d]:{padding:p(`panel-padding`),background:p(`panel-bg-color`),position:`relative`,borderBlock:m,"&:not(:first-child)":{paddingInlineStart:`calc(${p(`panel-padding`)} + ${p(`item-base-width`)})`},"&:first-child":{borderInlineStart:m,borderStartStartRadius:p(`item-border-radius`),borderEndStartRadius:p(`item-border-radius`)},"&:last-child":{borderInlineEnd:m,borderStartEndRadius:p(`item-border-radius`),borderEndEndRadius:p(`item-border-radius`)},"&-active":{background:p(`panel-active-bg-color`),borderColor:p(`panel-active-border-color`),[`${t}-panel-arrow`]:{path:{fill:p(`panel-active-bg-color`),stroke:p(`panel-active-border-color`)}},[`${d}-title, ${d}-subtitle, ${d}-content`]:{color:p(`item-icon-active-text-color`)}}}},{[`&${t}-small`]:{[f(`panel-padding`)]:o,[f(`item-border-radius`)]:i}},{[`&${t}-filled`]:{[d]:{"&:not(:first-child)":{clipPath:`polygon(${[`${Y(n)} 0`,`calc(100% + ${p(`item-base-width`)}) 0`,`calc(100% + ${p(`item-base-width`)}) 100%`,`${Y(n)} 100%`,`calc(${p(`item-base-width`)} + ${Y(n)}) 50%`].join(`,`)})`}}}},{[`&${t}-outlined`]:{[`${t}-panel-arrow`]:{top:u(n).div(2).mul(-1).equal(),height:u(n).add(`100%`).equal()}}}]}},pq=e=>{let{calc:t,antCls:n,componentCls:r,lineWidthBold:i,motionDurationSlow:a}=e,o=`${r}-item`,[s,c]=ol(n,`cmp-steps`),l=t(i).add(i).equal();return{[`${r}${r}-with-progress`]:{[s(`item-wrapper-padding-top`)]:l,[`${o}${o}-process`]:{[`${o}-icon`]:{position:`relative`}},[`${o}-progress-icon`]:{"&-svg":{[s(`svg-size`)]:t(l).mul(2).add(c(`icon-size`)).equal(),[s(`icon-size-ptg-unitless`)]:`calc(100 / tan(atan2(${c(`svg-size`)}, 1px)))`,fontSize:c(`svg-size`),lineHeight:c(`icon-size-ptg-unitless`),position:`absolute`,inset:t(l).mul(-1).equal(),width:`auto`,height:`auto`},"&-circle":{lineHeight:c(`icon-size-ptg-unitless`),strokeWidth:t(c(`icon-size-ptg-unitless`)).mul(i).equal(),[s(`progress-radius`)]:t(c(`svg-size`)).sub(i).mul(c(`icon-size-ptg-unitless`)).div(2).equal(),r:c(`progress-radius`),fill:`none`,cx:50,cy:50,transition:`all ${a} ease-in-out`,"&-rail":{stroke:e.colorSplit},"&-ptg":{stroke:e.colorPrimary}}}}}},mq=e=>{let{componentCls:t,iconSize:n,dotSize:r,dotCurrentSize:i,marginXXS:a,lineWidthBold:o,fontSizeSM:s,antCls:c}=e,l=`${t}-item`,[u,d]=ol(c,`cmp-steps`);return{[`${t}${t}-dot`]:{[u(`icon-size-active`)]:i,[u(`icon-size`)]:r,[u(`dot-icon-size`)]:r,[u(`dot-icon-border-width`)]:o,[u(`rail-size`)]:o,[u(`icon-border-width`)]:o,[`${l}-custom ${l}-icon`]:{fontSize:s},[`${l}-icon`]:{position:`relative`,"&:after":{content:`""`,width:n,height:n,display:`block`,position:`absolute`,top:`50%`,left:{_skip_check_:!0,value:`50%`},transform:`translate(-50%, -50%)`}},[`${l}-active ${l}-icon`]:{[u(`icon-size`)]:d(`icon-size-active`)},[`&${t}-horizontal`]:{[`&, &${t}-small`]:lq(e,a)}}}},hq=e=>{let{componentCls:t,lineWidthBold:n,antCls:r}=e,i=`${t}-item`,[,a]=ol(r,`cmp-steps`);return{[`${t}${t}-rtl`]:{direction:`rtl`,[`&${t}-navigation${t}-horizontal`]:{[`${i}:after`]:{transform:`translateY(-50%) rotate(-45deg)`}},[`&${t}-panel`]:{[`${t}-panel-arrow`]:{transform:`scaleX(-1)`},[`&${t}-filled`]:{[i]:{"&:not(:first-child)":{clipPath:`polygon(${[`calc(0px - ${a(`item-base-width`)}) 0px`,`calc(100% - ${Y(n)}) 0px`,`calc(100% - ${a(`item-base-width`)} - ${Y(n)}) 50%`,`calc(100% - ${Y(n)}) 100%`,`calc(0px - ${a(`item-base-width`)}) 100%`].join(`,`)})`}}}}}}},gq=e=>{let{componentCls:t,iconSizeSM:n,fontSize:r,lineHeight:i,marginXS:a,fontHeight:o,marginSM:s,paddingXS:c,antCls:l}=e,[u]=ol(l,`cmp-steps`);return{[`${t}${t}-small`]:{[u(`icon-size`)]:n,[u(`title-horizontal-item-margin`)]:s,[u(`title-vertical-row-gap`)]:c,[u(`title-font-size`)]:r,[u(`title-line-height`)]:i,[u(`title-horizontal-rail-margin`)]:a,[u(`title-horizontal-title-height`)]:o,[`&${t}-horizontal${t}-title-vertical`]:lq(e,a)}}},_q=`wait`,vq=`process`,yq=`finish`,bq=`error`,xq=e=>{let{componentCls:t,colorTextDisabled:n,colorTextLightSolid:r,colorPrimary:i,colorTextLabel:a,colorError:o,colorErrorHover:s,colorErrorBgFilledHover:c,colorFillTertiary:l,colorErrorBg:u,colorPrimaryBgHover:d,colorPrimaryBg:f,colorText:p,colorTextDescription:m,colorBgContainer:h,colorPrimaryHover:g,lineType:_,antCls:v}=e,y=`${t}-item`,[b,x]=ol(v,`cmp-steps`);return{[t]:[{[y]:{[b(`item-solid-line-color`)]:`#000`,[b(`item-title-color`)]:`#000`,[b(`item-content-color`)]:`#000`,[b(`item-subtitle-color`)]:x(`item-content-color`),[b(`item-icon-custom-color`)]:`#000`,[b(`item-icon-bg-color`)]:`#000`,[b(`item-icon-border-color`)]:`#000`,[b(`item-icon-text-color`)]:`#fff`,[b(`item-icon-dot-color`)]:`#000`,[b(`item-icon-dot-bg-color`)]:x(`item-icon-dot-color`),[b(`item-icon-dot-border-color`)]:x(`item-icon-dot-color`),[b(`item-text-hover-color`)]:`#000`,[b(`item-icon-bg-hover-color`)]:x(`item-icon-bg-color`),[b(`item-icon-border-hover-color`)]:x(`item-icon-border-color`),[b(`item-icon-text-hover-color`)]:x(`item-icon-text-color`),[b(`item-content-active-color`)]:x(`item-content-color`),[b(`item-icon-active-bg-color`)]:x(`item-icon-bg-color`),[b(`item-icon-active-border-color`)]:x(`item-icon-border-color`),[b(`item-icon-active-text-color`)]:x(`item-icon-text-color`),[b(`item-process-rail-line-style`)]:_},[`${y}-rail`]:{borderColor:x(`item-solid-line-color`)},[`${y}-custom ${y}-icon`]:{color:x(`item-icon-custom-color`)},[`${y}-title`]:{color:x(`item-title-color`)},[`${y}-subtitle`]:{color:x(`item-subtitle-color`)},[`${y}-content`]:{color:x(`item-content-color`)},[`${y}-active ${y}-icon`]:{},[`${y}-active ${y}-content`]:{color:x(`item-content-active-color`)},[`${y}[role='button']:not(${y}-active):hover`]:{[`${y}-title, ${y}-content`]:{color:x(`item-text-hover-color`)}},[`&:not(${t}-dot)`]:{[`${y}:not(${y}-custom)`]:{[`${y}-icon`]:{background:x(`item-icon-bg-color`),borderColor:x(`item-icon-border-color`),color:x(`item-icon-text-color`)},[`&[role='button']:not(${y}-active):hover`]:{[`${y}-icon`]:{background:x(`item-icon-bg-hover-color`),borderColor:x(`item-icon-border-hover-color`),color:x(`item-icon-text-hover-color`)}},[`&${y}-active`]:{[`${y}-icon`]:{background:x(`item-icon-active-bg-color`),borderColor:x(`item-icon-active-border-color`),color:x(`item-icon-active-text-color`)}}}},[`&${t}-dot`]:{[`${y}-icon`]:{background:x(`item-icon-dot-bg-color`),borderColor:x(`item-icon-dot-border-color`),color:x(`item-icon-dot-color`),[`&${y}-icon-dot-custom`]:{background:`transparent`,border:`none`}}}},{[`${y}-${_q}`]:{[b(`item-icon-custom-color`)]:n,[b(`item-title-color`)]:m,[b(`item-content-color`)]:m,[b(`item-content-active-color`)]:p,[b(`item-text-hover-color`)]:g},[`${y}-rail-${_q}`]:{[b(`item-solid-line-color`)]:n},[`${y}-${vq}`]:{[b(`item-icon-custom-color`)]:i,[b(`item-title-color`)]:p,[b(`item-content-color`)]:m,[b(`item-content-active-color`)]:p,[b(`item-text-hover-color`)]:g},[`${y}-rail-${vq}`]:{[b(`item-solid-line-color`)]:i,[b(`rail-line-style`)]:x(`item-process-rail-line-style`)},[`${y}-${yq}`]:{[b(`item-icon-custom-color`)]:i,[b(`item-title-color`)]:p,[b(`item-content-color`)]:m,[b(`item-content-active-color`)]:p,[b(`item-text-hover-color`)]:g},[`${y}-rail-${yq}`]:{[b(`item-solid-line-color`)]:i},[`${y}-${bq}`]:{[b(`item-icon-custom-color`)]:o,[b(`item-title-color`)]:o,[b(`item-content-color`)]:o,[b(`item-content-active-color`)]:o,[b(`item-text-hover-color`)]:s},[`${y}-rail-${bq}`]:{[b(`item-solid-line-color`)]:o}},{[`&${t}-filled`]:{[y]:{[b(`item-icon-dot-border-color`)]:`transparent`},[`${y}-${_q}`]:{[b(`item-icon-bg-color`)]:l,[b(`item-icon-border-color`)]:`transparent`,[b(`item-icon-text-color`)]:a,[b(`item-icon-dot-bg-color`)]:n,[b(`item-icon-bg-hover-color`)]:d,[b(`item-icon-border-hover-color`)]:`transparent`,[b(`item-icon-text-hover-color`)]:i,[b(`item-icon-active-bg-color`)]:i,[b(`item-icon-active-border-color`)]:`transparent`,[b(`item-icon-active-text-color`)]:r},[`${y}-${vq}, ${y}-${yq}`]:{[b(`item-icon-bg-color`)]:f,[b(`item-icon-border-color`)]:`transparent`,[b(`item-icon-text-color`)]:i,[b(`item-icon-dot-bg-color`)]:i,[b(`item-icon-bg-hover-color`)]:d,[b(`item-icon-border-hover-color`)]:`transparent`,[b(`item-icon-text-hover-color`)]:i,[b(`item-icon-active-bg-color`)]:i,[b(`item-icon-active-border-color`)]:`transparent`,[b(`item-icon-active-text-color`)]:r},[`${y}-${bq}`]:{[b(`item-icon-bg-color`)]:u,[b(`item-icon-border-color`)]:`transparent`,[b(`item-icon-text-color`)]:o,[b(`item-icon-dot-bg-color`)]:o,[b(`item-icon-bg-hover-color`)]:c,[b(`item-icon-border-hover-color`)]:`transparent`,[b(`item-icon-text-hover-color`)]:o,[b(`item-icon-active-bg-color`)]:o,[b(`item-icon-active-border-color`)]:`transparent`,[b(`item-icon-active-text-color`)]:r}}},{[`&${t}-outlined`]:{[y]:{[b(`item-icon-dot-bg-color`)]:`transparent`},[`${y}-${_q}`]:{[b(`item-icon-bg-color`)]:h,[b(`item-icon-border-color`)]:n,[b(`item-icon-text-color`)]:n,[b(`item-icon-dot-color`)]:n,[b(`item-icon-bg-hover-color`)]:`transparent`,[b(`item-icon-border-hover-color`)]:g,[b(`item-icon-text-hover-color`)]:g,[b(`item-icon-active-bg-color`)]:l},[`${y}-${vq}, ${y}-${yq}`]:{[b(`item-icon-bg-color`)]:h,[b(`item-icon-border-color`)]:i,[b(`item-icon-text-color`)]:i,[b(`item-icon-dot-color`)]:i,[b(`item-icon-bg-hover-color`)]:`transparent`,[b(`item-icon-border-hover-color`)]:g,[b(`item-icon-text-hover-color`)]:g,[b(`item-icon-active-bg-color`)]:f},[`${y}-${bq}`]:{[b(`item-icon-bg-color`)]:h,[b(`item-icon-border-color`)]:o,[b(`item-icon-text-color`)]:o,[b(`item-icon-dot-color`)]:o,[b(`item-icon-bg-hover-color`)]:`transparent`,[b(`item-icon-border-hover-color`)]:s,[b(`item-icon-text-hover-color`)]:s,[b(`item-icon-active-bg-color`)]:u}}}]}},Sq=e=>{let{componentCls:t,marginXXS:n,paddingSM:r,controlHeight:i,antCls:a,calc:o}=e,s=`${t}-item`,[c,l]=ol(a,`cmp-steps`);return{[`${t}-vertical`]:{[c(`vertical-rail-margin`)]:o(n).mul(1.5).equal(),flexDirection:`column`,alignItems:`stretch`,[`> ${s}`]:{minHeight:o(i).mul(1.5).equal(),paddingBottom:r,"&:last-child":{paddingBottom:0},[`${s}-icon`]:{marginInlineStart:`calc((${l(`icon-size-max`)} - ${l(`icon-size`)}) / 2)`},[`${s}-rail`]:{[c(`rail-offset`)]:o(l(`heading-height`)).sub(l(`icon-size`)).div(2).equal(),borderInlineStartWidth:l(`rail-size`),position:`absolute`,top:o(l(`icon-size`)).add(l(`item-wrapper-padding-top`)).add(l(`rail-offset`)).add(l(`vertical-rail-margin`)).equal(),insetInlineStart:o(l(`icon-size-max`)).div(2).equal(),bottom:o(l(`vertical-rail-margin`)).sub(l(`rail-offset`)).equal(),marginInlineStart:`calc(${l(`rail-size`)} / -2)`}}}}},Cq=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-item`,[i,a]=ol(n,`cmp-steps`);return{[t]:{[i(`title-font-size`)]:e.fontSizeLG,[i(`title-line-height`)]:e.lineHeightLG,[i(`subtitle-font-size`)]:e.fontSize,[i(`subtitle-line-height`)]:e.lineHeight,[i(`item-wrapper-padding-top`)]:`0px`,[i(`rail-size`)]:e.lineWidth,[i(`rail-line-style`)]:e.lineType,...Jc(e),display:`flex`,flexWrap:`nowrap`,alignItems:`flex-start`,[r]:{flex:`none`,position:`relative`},[`${r}-wrapper`]:{display:`flex`,flexWrap:`nowrap`,paddingTop:a(`item-wrapper-padding-top`)},[`${r}-header`]:{display:`flex`,flexWrap:`nowrap`,alignItems:`center`},[`${r}-title`]:{color:e.colorText,fontSize:a(`title-font-size`),lineHeight:a(`title-line-height`),wordBreak:`break-word`},[`${r}-subtitle`]:{color:e.colorTextDescription,fontWeight:`normal`,fontSize:a(`subtitle-font-size`),lineHeight:a(`subtitle-line-height`),marginInlineStart:e.marginXS,wordBreak:`break-word`},[`${r}-content`]:{color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:`break-word`},[`${r}-rail`]:{borderStyle:a(`rail-line-style`),borderWidth:0},[`${r}-title, ${r}-subtitle, ${r}-content, ${r}-rail`]:{transition:`all ${e.motionDurationSlow}`},[`&${t}-ellipsis`]:{[`${r}-title, ${r}-subtitle, ${r}-content`]:qc},[`${r}[role='button']:not(${r}-active):hover`]:{cursor:`pointer`}}}},wq=rl(`Steps`,e=>{let t=gs(e,{inlineDotSize:6});return[Cq(t),oq(t),Sq(t),aq(t),uq(t),gq(t),mq(t),xq(t),dq(t),fq(t),sq(t),pq(t),hq(t)]},e=>({titleLineHeight:e.controlHeight,customIconSize:e.controlHeight,customIconTop:0,customIconFontSize:e.controlHeightSM,iconSize:e.controlHeight,iconTop:-.5,iconFontSize:e.fontSize,iconSizeSM:e.fontSizeHeading3,dotSize:e.controlHeight/4,dotCurrentSize:e.controlHeightLG/4,navArrowColor:e.colorTextDisabled,navContentMaxWidth:`unset`,descriptionMaxWidth:void 0,waitIconColor:e.wireframe?e.colorTextDisabled:e.colorTextLabel,waitIconBgColor:e.wireframe?e.colorBgContainer:e.colorFillContent,waitIconBorderColor:e.wireframe?e.colorTextDisabled:`transparent`,finishIconBgColor:e.wireframe?e.colorBgContainer:e.controlItemBgActive,finishIconBorderColor:e.wireframe?e.colorPrimary:e.controlItemBgActive})),Tq={itemIcon:qm},Eq=e=>{let{size:t,className:n,rootClassName:r,style:i,variant:a=`filled`,type:o,classNames:s,styles:c,direction:l,orientation:u,responsive:d=!0,progressDot:f,labelPlacement:p,titlePlacement:m,ellipsis:h,offset:g=0,items:_,percent:v,current:y=0,onChange:b,iconRender:x,...C}=e,w=S.useContext(nq),T=li(`steps`),{getPrefixCls:E,direction:D,className:O,style:k}=T,A,j,M={};w?M={root:w.rootComponent,item:w.itemComponent}:{classNames:A,styles:j}=T;let N=E(),P=E(`steps`,e.prefixCls),F=`${P}-item-icon`,[I,L]=wq(P),[R]=ol(N,`cmp-steps`),z=th(t),B=S.useMemo(()=>(_||[]).filter(Boolean),[_]),{xs:V}=JC(d),H=S.useMemo(()=>o&&o!==`default`?o:f?`dot`:o,[f,o]),U=H===`inline`,W=H===`dot`||H===`inline`,ee=S.useMemo(()=>H===`dot`&&typeof f==`function`?f:void 0,[H,f]),te=S.useMemo(()=>H===`panel`?`horizontal`:d&&V||(u||l)===`vertical`?`vertical`:`horizontal`,[u,l,H,d,V]),ne=S.useMemo(()=>W||te===`vertical`?te===`vertical`?`horizontal`:`vertical`:o===`navigation`?`horizontal`:m||p||`horizontal`,[W,p,te,m,o]),re=U?void 0:v,ie={...e,variant:a,size:z,type:H,orientation:te,titlePlacement:ne,current:y,percent:re,responsive:d,offset:g},[ae,G]=Fd([Tq,A,s],[j,c],{props:ie}),oe=(e,t)=>{let{item:n,index:r,active:i,components:{Icon:a}}=t,{status:o,icon:s}=n,c=null;if(W||s)c=s;else switch(o){case`finish`:c=S.createElement(kC,{className:`${F}-finish`});break;case`error`:c=S.createElement(Rl,{className:`${F}-error`});break;default:{let e=S.createElement(`span`,{className:`${F}-number`},t.index+1);o===`process`&&re!==void 0&&(e=S.createElement(iq,{prefixCls:P,rootPrefixCls:N,percent:re},e)),c=e}}let l=S.createElement(a,null,c);return x?l=x(l,{index:r,active:i,item:n,components:{Icon:a}}):typeof ee==`function`&&(l=ee(l,{index:r,...n})),l},K=(e,t)=>{let n=e;return U&&t.item.content&&(n=S.createElement(Aw,{destroyOnHidden:!0,title:t.item.content},e)),S.createElement(eh,{component:`Steps`,disabled:t.item.disabled||!b,colorSource:a===`filled`?`color`:null},n)},se=H===`panel`?e=>S.createElement(S.Fragment,null,e,S.createElement(rq,{prefixCls:P})):void 0,ce={[R(`items-offset`)]:`${g}`,...k,...i},q=J(O,`${P}-${a}`,{[`${P}-${H}`]:H===`dot`?!1:H,[`${P}-rtl`]:D===`rtl`,[`${P}-dot`]:W,[`${P}-ellipsis`]:h,[`${P}-with-progress`]:re!==void 0,[`${P}-small`]:z===`small`},n,r,I,L);return S.createElement(tq,{...C,prefixCls:P,className:q,style:ce,classNames:ae,styles:G,orientation:te,titlePlacement:ne,components:M,current:y,items:B,onChange:b,iconRender:oe,itemRender:K,itemWrapperRender:se})};function Dq(){return Dq=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let[h,g]=Hn(r??!1,n);function _(e,t){let n=h;return i||(n=e,g(n),l?.(n,t)),n}function v(e){e.which===om.LEFT?_(!1,e):e.which===om.RIGHT&&_(!0,e),u?.(e)}function y(e){let t=_(!h,e);c?.(t,e)}let b=J(e,t,{[`${e}-checked`]:h,[`${e}-disabled`]:i});return S.createElement(`button`,Dq({},p,{type:`button`,role:`switch`,"aria-checked":h,disabled:i,className:b,ref:m,onKeyDown:v,onClick:y}),a,S.createElement(`span`,{className:`${e}-inner`},S.createElement(`span`,{className:J(`${e}-inner-checked`,f?.content),style:d?.content},o),S.createElement(`span`,{className:J(`${e}-inner-unchecked`,f?.content),style:d?.content},s)))});Oq.displayName=`Switch`;var kq=e=>{let{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:i,innerMinMarginSM:a,innerMaxMarginSM:o,handleSizeSM:s,calc:c}=e,l=`${t}-inner`,u=Y(c(s).add(c(r).mul(2)).equal()),d=Y(c(o).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:i,height:n,lineHeight:Y(n),[`${t}-inner`]:{paddingInlineStart:o,paddingInlineEnd:a,[`${l}-checked, ${l}-unchecked`]:{minHeight:n},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${l}-unchecked`]:{marginTop:c(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:s,height:s},[`${t}-loading-icon`]:{top:c(c(s).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:o,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${Y(c(s).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:c(e.marginXXS).div(2).equal(),marginInlineEnd:c(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:c(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:c(e.marginXXS).div(2).equal()}}}}}}},Aq=e=>{let{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:`relative`,top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:`top`},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},jq=e=>{let{componentCls:t,trackPadding:n,handleBg:r,handleShadow:i,handleSize:a,calc:o}=e,s=`${t}-handle`;return{[t]:{[s]:{position:`absolute`,top:n,insetInlineStart:n,width:a,height:a,transition:`all ${e.switchDuration} ease-in-out`,...Uh(),"&::before":{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:o(a).div(2).equal(),boxShadow:i,transition:`all ${e.switchDuration} ease-in-out`,content:`""`,...Uh()}},[`&${t}-checked ${s}`]:{insetInlineStart:`calc(100% - ${Y(o(a).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${s}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${s}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},Mq=e=>{let{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:i,innerMaxMargin:a,handleSize:o,switchDuration:s,calc:c}=e,l=`${t}-inner`,u=Y(c(o).add(c(r).mul(2)).equal()),d=Y(c(a).mul(2).equal());return{[t]:{[l]:{display:`block`,overflow:`hidden`,borderRadius:100,height:`100%`,paddingInlineStart:a,paddingInlineEnd:i,transition:[`padding-inline-start`,`padding-inline-end`].map(e=>`${e} ${s} ease-in-out`).join(`, `),...Uh(),[`${l}-checked, ${l}-unchecked`]:{display:`block`,color:e.colorTextLightSolid,fontSize:e.fontSizeSM,pointerEvents:`none`,minHeight:n,transition:[`margin-inline-start`,`margin-inline-end`].map(e=>`${e} ${s} ease-in-out`).join(`, `),...Uh()},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${l}-unchecked`]:{marginTop:c(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${l}`]:{paddingInlineStart:i,paddingInlineEnd:a,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:c(r).mul(2).equal(),marginInlineEnd:c(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:c(r).mul(-1).mul(2).equal(),marginInlineEnd:c(r).mul(2).equal()}}}}}},Nq=e=>{let{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:{...Jc(e),position:`relative`,display:`inline-block`,boxSizing:`border-box`,minWidth:r,height:n,lineHeight:Y(n),verticalAlign:`middle`,background:e.colorTextQuaternary,border:`0`,borderRadius:100,cursor:`pointer`,transition:`all ${e.motionDurationMid}`,userSelect:`none`,...Uh(),[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary},...Qc(e),[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:`not-allowed`,opacity:e.switchDisabledOpacity,"*":{boxShadow:`none`,cursor:`not-allowed`}},[`&${t}-rtl`]:{direction:`rtl`}}}},Pq=rl(`Switch`,e=>{let t=gs(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:`-30%`});return[Nq(t),Mq(t),jq(t),Aq(t),kq(t)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:i}=e,a=t*n,o=r/2,s=a-4,c=o-4;return{trackHeight:a,trackHeightSM:o,trackMinWidth:s*2+8,trackMinWidthSM:c*2+4,trackPadding:2,handleBg:i,handleSize:s,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new Rs(`#00230b`).setA(.2).toRgbString()}`,innerMinMargin:s/2,innerMaxMargin:s+2+4,innerMinMarginSM:c/2,innerMaxMarginSM:c+2+4}}),Fq=S.forwardRef((e,t)=>{let{prefixCls:n,size:r,disabled:i,loading:a,className:o,rootClassName:s,style:c,checked:l,value:u,defaultChecked:d,defaultValue:f,onChange:p,styles:m,classNames:h,...g}=e,[_,v]=Hn(d??f??!1,l??u),{getPrefixCls:y,direction:b,className:x,style:C,classNames:w,styles:T}=li(`switch`),E=S.useContext(zp),D=(i??E)||a,O=y(`switch`,n),[k,A]=Pq(O),j=th(r),M={...e,size:j,disabled:D},[N,P]=Fd([w,h],[T,m],{props:M}),F=S.createElement(`div`,{className:J(`${O}-handle`,N.indicator),style:P.indicator},a&&S.createElement(xm,{className:`${O}-loading-icon`})),I=J(x,{[`${O}-small`]:j===`small`,[`${O}-loading`]:a,[`${O}-rtl`]:b===`rtl`},o,s,N.root,k,A),L={...P.root,...C,...c},R=(...e)=>{v(e[0]),p?.(...e)};return S.createElement(eh,{component:`Switch`,disabled:D},S.createElement(Oq,{...g,classNames:N,styles:P,checked:_,onChange:R,prefixCls:O,className:I,style:L,disabled:D,ref:t,loadingIcon:F}))});Fq.__ANT_SWITCH=!0;var Iq={},Lq=`rc-table-internal-hook`;function Rq(e){let t=S.createContext(void 0);return{Context:t,Provider:({value:e,children:n})=>{let r=S.useRef(e);r.current=e;let[i]=S.useState(()=>({getValue:()=>r.current,listeners:new Set}));return zn(()=>{(0,Jf.unstable_batchedUpdates)(()=>{i.listeners.forEach(t=>{t(e)})})},[e]),S.createElement(t.Provider,{value:i},n)},defaultValue:e}}function zq(e,t){let n=In(typeof t==`function`?t:e=>{if(t===void 0)return e;if(!Array.isArray(t))return e[t];let n={};return t.forEach(t=>{n[t]=e[t]}),n}),r=S.useContext(e?.Context),{listeners:i,getValue:a}=r||{},o=S.useRef();o.current=n(r?a():e?.defaultValue);let[,s]=S.useState({});return zn(()=>{if(!r)return;function e(e){let t=n(e);Ti(o.current,t,!0)||s({})}return i.add(e),()=>{i.delete(e)}},[r]),o.current}function Bq(){return Bq=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let s=i?{ref:o}:{},c=S.useRef(0),l=S.useRef(a);return t()===null?((!r||r(l.current,a))&&(c.current+=1),l.current=a,S.createElement(e.Provider,{value:c.current},S.createElement(n,Bq({},a,s)))):S.createElement(n,Bq({},a,s))};return i?S.forwardRef(a):a}function r(e,n){let r=tr(e),i=(n,i)=>{let a=r?{ref:i}:{};return t(),S.createElement(e,Bq({},n,a))};return S.memo(r?S.forwardRef(i):i,n)}return{makeImmutable:n,responseImmutable:r,useImmutableMark:t}}var{makeImmutable:Kte,responseImmutable:qte,useImmutableMark:Jte}=Vq(),{makeImmutable:Hq,responseImmutable:Uq,useImmutableMark:Wq}=Vq(),Gq=Rq(),Kq=S.createContext({renderWithProps:!1}),qq=`RC_TABLE_KEY`;function Jq(e){return e==null?[]:Array.isArray(e)?e:[e]}function Yq(e){let t=[],n={};return e.forEach(e=>{let{key:r,dataIndex:i}=e||{},a=r||Jq(i).join(`-`)||qq;for(;n[a];)a=`${a}_next`;n[a]=!0,t.push(a)}),t}function Xq(e){return e!=null}function Zq(e){return typeof e==`number`&&!Number.isNaN(e)}function Qq(e){return e&&typeof e==`object`&&!Array.isArray(e)&&!S.isValidElement(e)}function $q(e,t,n,r,i,a){let o=S.useContext(Kq);return Gn(()=>{if(Xq(r))return[r];let a=ar(e,t==null||t===``?[]:Array.isArray(t)?t:[t]),s=a,c;if(i){let t=i(a,e,n);Qq(t)?(s=t.children,c=t.props,o.renderWithProps=!0):s=t}return[s,c]},[Wq(),e,r,t,i,n],(e,t)=>{if(a){let[,n]=e,[,r]=t;return a(r,n)}return o.renderWithProps?!0:!Ti(e,t,!0)})}function eJ(e,t,n,r){let i=e+t-1;return e<=r&&i>=n}function tJ(e,t){return zq(Gq,n=>[eJ(e,t||1,n.hoverStartRow,n.hoverEndRow),n.onHover])}function nJ(){return nJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let r,i=e===!0?{showTitle:!0}:e;return i&&(i.showTitle||t===`header`)&&(typeof n==`string`||typeof n==`number`?r=n.toString():S.isValidElement(n)&&typeof n.props?.children==`string`&&(r=n.props?.children)),r},iJ=S.memo(e=>{let{component:t,children:n,ellipsis:r,scope:i,prefixCls:a,className:o,style:s,align:c,record:l,render:u,dataIndex:d,renderIndex:f,shouldCellUpdate:p,index:m,rowType:h,colSpan:g,rowSpan:_,fixStart:v,fixEnd:y,fixedStartShadow:b,fixedEndShadow:x,offsetFixedStartShadow:C,offsetFixedEndShadow:w,zIndex:T,zIndexReverse:E,appendNode:D,additionalProps:O={},isSticky:k}=e,A=`${a}-cell`,{allColumnsFixedLeft:j,rowHoverable:M}=zq(Gq,[`allColumnsFixedLeft`,`rowHoverable`]),[N,P]=$q(l,d,f,n,u,p),F={},I=typeof v==`number`&&!j,L=typeof y==`number`&&!j,[R,z]=zq(Gq,({scrollInfo:e})=>{if(!I&&!L)return[!1,!1];let[t,n]=e;return[(I&&b&&t)-C>=1,(L&&x&&n-t)-w>1]});I&&(F.insetInlineStart=v,F[`--z-offset`]=T,F[`--z-offset-reverse`]=E),L&&(F.insetInlineEnd=y,F[`--z-offset`]=T,F[`--z-offset-reverse`]=E);let B=P?.colSpan??O.colSpan??g??1,V=P?.rowSpan??O.rowSpan??_??1,[H,U]=tJ(m,V),W=In(e=>{l&&U(m,m+V-1),O?.onMouseEnter?.(e)}),ee=In(e=>{l&&U(-1,-1),O?.onMouseLeave?.(e)});if(B===0||V===0)return null;let te=O.title??rJ({rowType:h,ellipsis:r,children:N}),ne=J(A,o,{[`${A}-fix`]:I||L,[`${A}-fix-start`]:I,[`${A}-fix-end`]:L,[`${A}-fix-start-shadow`]:b,[`${A}-fix-start-shadow-show`]:b&&R,[`${A}-fix-end-shadow`]:x,[`${A}-fix-end-shadow-show`]:x&&z,[`${A}-ellipsis`]:r,[`${A}-with-append`]:D,[`${A}-fix-sticky`]:(I||L)&&k,[`${A}-row-hover`]:!P&&H},O.className,P?.className),re={};c&&(re.textAlign=c);let ie={...P?.style,...F,...re,...O.style,...s},ae=N;return typeof ae==`object`&&!Array.isArray(ae)&&!S.isValidElement(ae)&&(ae=null),r&&(b||x)&&(ae=S.createElement(`span`,{className:`${A}-content`},ae)),S.createElement(t,nJ({},P,O,{className:ne,style:ie,title:te,scope:i,onMouseEnter:M?W:void 0,onMouseLeave:M?ee:void 0,colSpan:B===1?null:B,rowSpan:V===1?null:V}),D,ae)});function aJ(e){return e.fixed===`start`}function oJ(e){return e.fixed===`end`}function sJ(e,t,n,r){let i=n[e]||{},a=n[t]||{},o=null,s=null;aJ(i)&&aJ(a)?o=r.start[e]:oJ(a)&&oJ(i)&&(s=r.end[t]);let c=!1,l=!1,u=0,d=0;o!==null&&(c=!n[t+1]||!aJ(n[t+1]),u=n.length*2-e,d=n.length+e),s!==null&&(l=!n[e-1]||!oJ(n[e-1]),u=t,d=n.length-t);let f=0,p=0;if(c)for(let t=0;tt;--e)oJ(n[e])||(p+=r.widths[e]||0);return{fixStart:o,fixEnd:s,fixedStartShadow:c,fixedEndShadow:l,offsetFixedStartShadow:f,offsetFixedEndShadow:p,isSticky:r.isSticky,zIndex:u,zIndexReverse:d}}var cJ=S.createContext({});function lJ(){return lJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:t,index:n,children:r,colSpan:i=1,rowSpan:a,align:o}=e,{prefixCls:s}=zq(Gq,[`prefixCls`]),{scrollColumnIndex:c,stickyOffsets:l,flattenColumns:u}=S.useContext(cJ),d=n+i-1+1===c?i+1:i,f=S.useMemo(()=>sJ(n,n+d-1,u,l),[n,d,u,l]);return S.createElement(iJ,lJ({className:t,index:n,component:`td`,prefixCls:s,record:null,dataIndex:null,align:o,colSpan:d,rowSpan:a,render:()=>r},f))},dJ=e=>{let{children:t,...n}=e;return S.createElement(`tr`,n,t)},fJ=e=>{let{children:t}=e;return t};fJ.Row=dJ,fJ.Cell=uJ;var pJ=Uq(e=>{let{children:t,stickyOffsets:n,flattenColumns:r}=e,i=zq(Gq,`prefixCls`),a=r.length-1,o=r[a],s=S.useMemo(()=>({stickyOffsets:n,flattenColumns:r,scrollColumnIndex:o?.scrollbar?a:null}),[o,r,a,n]);return S.createElement(cJ.Provider,{value:s},S.createElement(`tfoot`,{className:`${i}-summary`},t))}),mJ=fJ;function hJ(e){return null}function gJ(e){return null}function _J(e,t,n,r,i,a,o){let s=a(t,o);e.push({record:t,indent:n,index:o,rowKey:s});let c=i?.has(s);if(t&&Array.isArray(t[r])&&c)for(let o=0;o{if(n?.size){let i=[];for(let a=0;a({record:e,indent:0,index:t,rowKey:r(e,t)}))},[e,t,n,r])}function yJ(e,t,n,r){let i=zq(Gq,[`prefixCls`,`fixedInfoList`,`flattenColumns`,`expandableType`,`expandRowByClick`,`onTriggerExpand`,`rowClassName`,`expandedRowClassName`,`indentSize`,`expandIcon`,`expandedRowRender`,`expandIconColumnIndex`,`expandedKeys`,`childrenColumnName`,`rowExpandable`,`onRow`]),{flattenColumns:a,expandableType:o,expandedKeys:s,childrenColumnName:c,onTriggerExpand:l,rowExpandable:u,onRow:d,expandRowByClick:f,rowClassName:p}=i,m=o===`nest`,h=o===`row`&&(!u||u(e)),g=h||m,_=s&&s.has(t),v=c&&e&&e[c],y=In(l),b=d?.(e,n),x=b?.onClick,S=(t,...n)=>{f&&g&&l(e,t),x?.(t,...n)},C;typeof p==`string`?C=p:typeof p==`function`&&(C=p(e,n,r));let w=Yq(a);return{...i,columnsKey:w,nestExpandable:m,expanded:_,hasNestChildren:v,record:e,onTriggerExpand:y,rowSupportExpand:h,expandable:g,rowProps:{...b,className:J(C,b?.className),onClick:S}}}var bJ=e=>{let{prefixCls:t,children:n,component:r,cellComponent:i,className:a,expanded:o,colSpan:s,isEmpty:c,stickyOffset:l=0}=e,{scrollbarSize:u,fixHeader:d,fixColumn:f,componentWidth:p,horizonScroll:m}=zq(Gq,[`scrollbarSize`,`fixHeader`,`fixColumn`,`componentWidth`,`horizonScroll`]),h=n;return(c?m&&p:f)&&(h=S.createElement(`div`,{style:{width:p-l-(d&&!c?u:0),position:`sticky`,left:l,overflow:`hidden`},className:`${t}-expanded-row-fixed`},h)),S.createElement(r,{className:a,style:{display:o?null:`none`}},S.createElement(iJ,{component:i,prefixCls:t,colSpan:s},h))};function xJ({prefixCls:e,record:t,onExpand:n,expanded:r,expandable:i}){let a=`${e}-row-expand-icon`;if(!i)return S.createElement(`span`,{className:J(a,`${e}-row-spaced`)});let o=e=>{n(t,e),e.stopPropagation()};return S.createElement(`span`,{className:J(a,{[`${e}-row-expanded`]:r,[`${e}-row-collapsed`]:!r}),onClick:o})}function SJ(e,t,n){let r=[];function i(e){(e||[]).forEach((e,a)=>{r.push(t(e,a)),i(e[n])})}return i(e),r}function CJ(e,t,n,r){return typeof e==`string`?e:typeof e==`function`?e(t,n,r):``}function wJ(){return wJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:t,style:n,classNames:r,styles:i,record:a,index:o,renderIndex:s,rowKey:c,rowKeys:l,indent:u=0,rowComponent:d,cellComponent:f,scopeCellComponent:p,expandedRowInfo:m}=e,h=yJ(a,c,o,u),{prefixCls:g,flattenColumns:_,expandedRowClassName:v,expandedRowRender:y,rowProps:b,expanded:x,rowSupportExpand:C}=h,w=S.useRef(!1);w.current||=x;let T=CJ(v,a,o,u),E=S.createElement(d,wJ({},b,{"data-row-key":c,className:J(t,`${g}-row`,`${g}-row-level-${u}`,b?.className,r.row,{[T]:u>=1}),style:{...n,...b?.style,...i.row}}),_.map((e,t)=>{let{render:n,dataIndex:c,className:d}=e,{key:_,fixedInfo:v,appendCellNode:y,additionalCellProps:b}=TJ(h,e,t,u,o,l,m?.offset);return S.createElement(iJ,wJ({className:J(d,r.cell),style:i.cell,ellipsis:e.ellipsis,align:e.align,scope:e.rowScope,component:e.rowScope?p:f,prefixCls:g,key:_,record:a,index:o,renderIndex:s,dataIndex:c,render:n,shouldCellUpdate:e.shouldCellUpdate},v,{appendNode:y,additionalProps:b}))})),D;if(C&&(w.current||x)){let e=y(a,o,u+1,x);D=S.createElement(bJ,{expanded:x,className:J(`${g}-expanded-row`,`${g}-expanded-row-level-${u+1}`,T),prefixCls:g,component:d,cellComponent:f,colSpan:m?m.colSpan:_.length,isEmpty:!1,stickyOffset:m?.sticky},e)}return S.createElement(S.Fragment,null,E,D)}),DJ=e=>{let{columnKey:t,onColumnResize:n,title:r}=e,i=S.useRef(null);return zn(()=>{i.current&&n(t,i.current.offsetWidth)},[]),S.createElement(Wr,{data:t},S.createElement(`td`,{ref:i,style:{paddingTop:0,paddingBottom:0,borderTop:0,borderBottom:0,height:0}},S.createElement(`div`,{style:{height:0,overflow:`hidden`,fontWeight:`bold`}},r||`\xA0`)))},OJ=({prefixCls:e,columnsKey:t,onColumnResize:n,columns:r})=>{let i=S.useRef(null),{measureRowRender:a}=zq(Gq,[`measureRowRender`]),o=S.createElement(`tr`,{"aria-hidden":`true`,className:`${e}-measure-row`,style:{height:0},ref:i},S.createElement(Wr.Collection,{onBatchResize:e=>{cp(i.current)&&e.forEach(({data:e,size:t})=>{n(e,t.offsetWidth)})}},t.map(e=>{let t=r.find(t=>t.key===e)?.title,i=S.isValidElement(t)?S.cloneElement(t,{ref:null}):t;return S.createElement(DJ,{key:e,columnKey:e,onColumnResize:n,title:i})})));return typeof a==`function`?a(o):o},kJ=Uq(e=>{let{data:t,measureColumnWidth:n}=e,{prefixCls:r,getComponent:i,onColumnResize:a,flattenColumns:o,getRowKey:s,expandedKeys:c,childrenColumnName:l,emptyNode:u,classNames:d,styles:f,expandedRowOffset:p=0,colWidths:m}=zq(Gq,[`prefixCls`,`getComponent`,`onColumnResize`,`flattenColumns`,`getRowKey`,`expandedKeys`,`childrenColumnName`,`emptyNode`,`classNames`,`styles`,`expandedRowOffset`,`fixedInfoList`,`colWidths`]),{body:h={}}=d||{},{body:g={}}=f||{},_=vJ(t,l,c,s),v=S.useMemo(()=>_.map(e=>e.rowKey),[_]),y=S.useRef({renderWithProps:!1}),b=S.useMemo(()=>{let e=o.length-p,t=0;for(let e=0;e{let{record:n,indent:r,index:i,rowKey:a}=e;return S.createElement(EJ,{classNames:h,styles:g,key:a,rowKey:a,rowKeys:v,record:n,index:t,renderIndex:i,rowComponent:C,cellComponent:w,scopeCellComponent:T,indent:r,expandedRowInfo:b})}):S.createElement(bJ,{expanded:!0,className:`${r}-placeholder`,prefixCls:r,component:C,cellComponent:w,colSpan:o.length,isEmpty:!0},u);let D=Yq(o);return S.createElement(Kq.Provider,{value:y.current},S.createElement(x,{style:g.wrapper,className:J(`${r}-tbody`,h.wrapper)},n&&S.createElement(OJ,{prefixCls:r,columnsKey:D,onColumnResize:a,columns:o}),E))}),AJ=`RC_TABLE_INTERNAL_COL_DEFINE`;function jJ(e){let{expandable:t,...n}=e,r;return r=`expandable`in e?{...n,...t}:n,r.showExpandColumn===!1&&(r.expandIconColumnIndex=-1),r}function MJ(){return MJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{colWidths:t,columns:n,columCount:r}=e,{tableLayout:i}=zq(Gq,[`tableLayout`]),a=[],o=r||n.length,s=!1;for(let e=o-1;e>=0;--e){let r=t[e],o=n&&n[e],c,l;if(o&&(c=o[AJ],i===`auto`&&(l=o.minWidth)),r||l||c||s){let{columnType:t,...n}=c||{};a.unshift(S.createElement(`col`,MJ({key:e,style:{width:r,minWidth:l}},n))),s=!0}}return a.length>0?S.createElement(`colgroup`,null,a):null};function PJ(e,t){return(0,S.useMemo)(()=>{let n=[];for(let r=0;r{let{className:n,style:r,noData:i,columns:a,flattenColumns:o,colWidths:s,colGroup:c,columCount:l,stickyOffsets:u,direction:d,fixHeader:f,stickyTopOffset:p,stickyBottomOffset:m,stickyClassName:h,scrollX:g,tableLayout:_=`fixed`,onScroll:v,maxContentScroll:y,children:b,...x}=e,{prefixCls:C,scrollbarSize:w,isSticky:T,getComponent:E}=zq(Gq,[`prefixCls`,`scrollbarSize`,`isSticky`,`getComponent`]),D=E([`header`,`table`],`table`),O=T&&!f?0:w,k=S.useRef(null),A=S.useCallback(e=>{Qn(t,e),Qn(k,e)},[]);S.useEffect(()=>{function e(e){let{currentTarget:t,deltaX:n}=e;if(n){let{scrollLeft:r,scrollWidth:i,clientWidth:a}=t,o=i-a,s=r+n;d===`rtl`?(s=Math.max(-o,s),s=Math.min(0,s)):(s=Math.min(o,s),s=Math.max(0,s)),v({currentTarget:t,scrollLeft:s}),e.preventDefault()}}let t=k.current;return t?.addEventListener(`wheel`,e,{passive:!1}),()=>{t?.removeEventListener(`wheel`,e)}},[]);let j=o[o.length-1],M={fixed:j?j.fixed:null,scrollbar:!0,onHeaderCell:()=>({className:`${C}-cell-scrollbar`})},N=(0,S.useMemo)(()=>O?[...a,M]:a,[O,a]),P=(0,S.useMemo)(()=>O?[...o,M]:o,[O,o]),F=(0,S.useMemo)(()=>{let{start:e,end:t}=u;return{...u,start:e,end:[...t.map(e=>e+O),0],isSticky:T}},[O,u,T]),I=PJ(s,l),L=(0,S.useMemo)(()=>{let e=!I||!I.length||I.every(e=>!e);return i||e},[i,I]);return S.createElement(`div`,{style:{overflow:`hidden`,...T?{top:p,bottom:m}:{},...r},ref:A,className:J(n,{[h]:!!h})},S.createElement(D,{style:{tableLayout:_,minWidth:`100%`,width:g}},L?c:S.createElement(NJ,{colWidths:[...I,O],columCount:l+1,columns:P}),b({...x,stickyOffsets:F,columns:N,flattenColumns:P})))}),IJ=S.memo(FJ);function LJ(){return LJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{cells:t,stickyOffsets:n,flattenColumns:r,rowComponent:i,cellComponent:a,onHeaderRow:o,index:s,classNames:c,styles:l}=e,{prefixCls:u}=zq(Gq,[`prefixCls`]),d;o&&(d=o(t.map(e=>e.column),s));let f=Yq(t.map(e=>e.column));return S.createElement(i,LJ({},d,{className:c.row,style:l.row}),t.map((e,t)=>{let{column:i,colStart:o,colEnd:s,colSpan:c}=e,l=sJ(o,s,r,n),d=i?.onHeaderCell?.(i)||{};return S.createElement(iJ,LJ({},e,{scope:i.title?c>1?`colgroup`:`col`:null,ellipsis:i.ellipsis,align:i.align,component:a,prefixCls:u,key:f[t]},l,{additionalProps:d,rowType:`header`}))}))};function zJ(e,t,n){let r=[];function i(e,a,o=0){r[o]=r[o]||[];let s=a;return e.filter(Boolean).map(e=>{let a={key:e.key,className:J(e.className,t.cell)||``,style:n.cell,children:e.title,column:e,colStart:s},c=1,l=e.children;return l&&l.length>0&&(c=i(l,s,o+1).reduce((e,t)=>e+t,0),a.hasSubColumns=!0),`colSpan`in e&&({colSpan:c}=e),`rowSpan`in e&&(a.rowSpan=e.rowSpan),a.colSpan=c,a.colEnd=a.colStart+c-1,r[o].push(a),s+=c,c})}i(e,0);let a=r.length;for(let e=0;e{!(`rowSpan`in t)&&!t.hasSubColumns&&(t.rowSpan=a-e)});return r}var BJ=Uq(e=>{let{stickyOffsets:t,columns:n,flattenColumns:r,onHeaderRow:i}=e,{prefixCls:a,getComponent:o,classNames:s,styles:c}=zq(Gq,[`prefixCls`,`getComponent`,`classNames`,`styles`]),{header:l={}}=s||{},{header:u={}}=c||{},d=S.useMemo(()=>zJ(n,l,u),[n,l,u]),f=o([`header`,`wrapper`],`thead`),p=o([`header`,`row`],`tr`),m=o([`header`,`cell`],`th`);return S.createElement(f,{className:J(`${a}-thead`,l.wrapper),style:u.wrapper},d.map((e,n)=>S.createElement(RJ,{classNames:l,styles:u,key:n,flattenColumns:r,cells:e,stickyOffsets:t,rowComponent:p,cellComponent:m,onHeaderRow:i,index:n})))});function VJ(e,t=``){return typeof t==`number`?t:t.endsWith(`%`)?e*parseFloat(t)/100:null}function HJ(e,t,n){return S.useMemo(()=>{if(t&&t>0){let r=0,i=0;e.forEach(e=>{let n=VJ(t,e.width);n?r+=n:i+=1});let a=Math.max(t,n),o=Math.max(a-r,i),s=i,c=o/i,l=0,u=e.map(e=>{let n={...e},r=VJ(t,n.width);if(r)n.width=r;else{let e=Math.floor(c);n.width=s===1?o:e,o-=e,--s}return l+=n.width,n});if(l{let r=Math.floor(t.width*e);t.width=n===u.length-1?o:r,o-=r})}return[u,Math.max(l,a)]}return[e,t]},[e,t,n])}function UJ(e){return Cr(e).filter(e=>S.isValidElement(e)).map(e=>{let{key:t,props:n}=e,{children:r,...i}=n,a={key:t,...i};return r&&(a.children=UJ(r)),a})}function WJ(e){return e.filter(e=>e&&typeof e==`object`&&!e.hidden).map(e=>{let t=e.children;return t&&t.length>0?{...e,children:WJ(t)}:e})}function GJ(e,t=`key`){return e.filter(e=>e&&typeof e==`object`).reduce((e,n,r)=>{let{fixed:i}=n,a=i===!0||i===`left`?`start`:i===`right`?`end`:i,o=`${t}-${r}`,s=n.children;return s&&s.length>0?[...e,...GJ(s,o).map(e=>({...e,fixed:e.fixed??a}))]:[...e,{key:o,...n,fixed:a}]},[])}function KJ({prefixCls:e,columns:t,children:n,expandable:r,expandedKeys:i,columnTitle:a,getRowKey:o,onTriggerExpand:s,expandIcon:c,rowExpandable:l,expandIconColumnIndex:u,expandedRowOffset:d=0,direction:f,expandRowByClick:p,columnWidth:m,fixed:h,scrollWidth:g,clientWidth:_},v){let y=S.useMemo(()=>WJ((t||UJ(n)||[]).slice()),[t,n]),b=S.useMemo(()=>{if(r){let t=y.slice();if(!t.includes(Iq)){let e=u||0,n=e===0&&(h===`right`||h===`end`)?y.length:e;n>=0&&t.splice(n,0,Iq)}let n=t.indexOf(Iq);t=t.filter((e,t)=>e!==Iq||t===n);let r=y[n],f;f=h||(r?r.fixed:null);let g={[AJ]:{className:`${e}-expand-icon-col`,columnType:`EXPAND_COLUMN`},title:a,fixed:f,className:`${e}-row-expand-icon-cell`,width:m,render:(t,n,r)=>{let a=o(n,r),u=c({prefixCls:e,expanded:i.has(a),expandable:l?l(n):!0,record:n,onExpand:s});return p?S.createElement(`span`,{onClick:e=>e.stopPropagation()},u):u}};return t.map((e,t)=>{let n=e===Iq?g:e;return te!==Iq)},[r,y,o,i,c,f,d]),x=S.useMemo(()=>{let e=b;return v&&(e=v(e)),e.length||(e=[{render:()=>null}]),e},[v,b,f]),[C,w]=HJ(S.useMemo(()=>GJ(x),[x,f,g]),g,_);return[x,C,w]}function qJ(e,t,n){let r=jJ(e),{expandIcon:i,expandedRowKeys:a,defaultExpandedRowKeys:o,defaultExpandAllRows:s,expandedRowRender:c,onExpand:l,onExpandedRowsChange:u,childrenColumnName:d}=r,f=i||xJ,p=d||`children`,m=S.useMemo(()=>c?`row`:e.expandable&&e.internalHooks===`rc-table-internal-hook`&&e.expandable.__PARENT_RENDER_ICON__||t.some(e=>e&&typeof e==`object`&&e[p])?`nest`:!1,[!!c,t]),[h,g]=S.useState(()=>o||(s?SJ(t,n,p):[])),_=S.useMemo(()=>new Set(a||h||[]),[a,h]);return[r,m,_,f,p,S.useCallback(e=>{let r=n(e,t.indexOf(e)),i,a=_.has(r);a?(_.delete(r),i=[..._]):i=[..._,r],g(i),l&&l(!a,e),u&&u(i)},[n,_,t,l,u])]}function JJ(e,t){let n=S.useMemo(()=>e.map((n,r)=>sJ(r,r,e,t)),[e,t]);return Gn(()=>n,[n],(e,t)=>!Ti(e,t))}function YJ(e){let t=(0,S.useRef)(e),[,n]=(0,S.useState)({}),r=(0,S.useRef)(null),i=(0,S.useRef)([]);function a(e){i.current.push(e);let a=Promise.resolve();r.current=a,a.then(()=>{if(r.current===a){let e=i.current,a=t.current;i.current=[],e.forEach(e=>{t.current=e(t.current)}),r.current=null,a!==t.current&&n({})}})}return(0,S.useEffect)(()=>()=>{r.current=null},[]),[t.current,a]}function XJ(e){let t=(0,S.useRef)(e||null),n=(0,S.useRef)(null);function r(){clearTimeout(n.current)}function i(e){t.current=e,r(),n.current=setTimeout(()=>{t.current=null,n.current=void 0},100)}function a(){return t.current}return(0,S.useEffect)(()=>r,[]),[i,a]}function ZJ(){let[e,t]=S.useState(-1),[n,r]=S.useState(-1);return[e,n,S.useCallback((e,n)=>{t(e),r(n)},[])]}var QJ=Ln()?window:null;function $J(e,t){let{offsetHeader:n=0,offsetSummary:r=0,offsetScroll:i=0,getContainer:a=()=>QJ}=typeof e==`object`?e:{},o=a()||QJ,s=!!e;return S.useMemo(()=>({isSticky:s,stickyClassName:s?`${t}-sticky-holder`:``,offsetHeader:n,offsetSummary:r,offsetScroll:i,container:o}),[s,i,n,r,t,o])}function eY(e,t){return(0,S.useMemo)(()=>{let n=t.length,r=(n,r,i)=>{let a=[],o=0;for(let s=n;s!==r;s+=i)a.push(o),t[s].fixed&&(o+=e[s]||0);return a};return{start:r(0,n,1),end:r(n-1,-1,-1).reverse(),widths:e}},[e,t])}var tY=e=>{let{children:t,className:n,style:r}=e;return S.createElement(`div`,{className:n,style:r},t)};function nY(e){let t=kr(e).getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}var rY=`mouseup`,iY=`mousemove`,aY=`scroll`,oY=`resize`,sY=S.forwardRef((e,t)=>{let{scrollBodyRef:n,onScroll:r,offsetScroll:i,container:a,direction:o}=e,s=zq(Gq,`prefixCls`),c=n.current?.scrollWidth||0,l=n.current?.clientWidth||0,u=c&&l/c*l,d=S.useRef(null),[f,p]=YJ({scrollLeft:0,isHiddenScrollBar:!0}),m=S.useRef({delta:0,x:0}),[h,g]=S.useState(!1),_=S.useRef(null);S.useEffect(()=>()=>{ri.cancel(_.current)},[]);let v=()=>{g(!1)},y=e=>{e.persist(),m.current.delta=e.pageX-f.scrollLeft,m.current.x=0,g(!0),e.preventDefault()},b=e=>{let{buttons:t}=e||window?.event;if(!h||t===0){h&&g(!1);return}let n=m.current.x+e.pageX-m.current.x-m.current.delta,i=o===`rtl`;n=Math.max(i?u-l:0,Math.min(i?0:l-u,n)),(!i||Math.abs(n)+Math.abs(u){ri.cancel(_.current),_.current=ri(()=>{if(!n.current)return;let e=nY(n.current).top,t=e+n.current.offsetHeight,r=a===window?document.documentElement.scrollTop+window.innerHeight:nY(a).top+a.clientHeight;t-kf()<=r||e>=r-i?p(e=>({...e,isHiddenScrollBar:!0})):p(e=>({...e,isHiddenScrollBar:!1}))})},C=e=>{p(t=>({...t,scrollLeft:e/c*l||0}))};return S.useImperativeHandle(t,()=>({setScrollLeft:C,checkScrollBarVisible:x})),S.useEffect(()=>(document.body.addEventListener(rY,v,!1),document.body.addEventListener(iY,b,!1),x(),()=>{document.body.removeEventListener(rY,v),document.body.removeEventListener(iY,b)}),[u,h]),S.useEffect(()=>{if(n.current){let e=[],t=kr(n.current);for(;t;)e.push(t),t=t.parentElement;return e.forEach(e=>{e.addEventListener(aY,x,!1)}),window.addEventListener(oY,x,!1),window.addEventListener(aY,x,!1),a.addEventListener(aY,x,!1),()=>{e.forEach(e=>{e.removeEventListener(aY,x)}),window.removeEventListener(oY,x),window.removeEventListener(aY,x),a.removeEventListener(aY,x)}}},[a]),S.useEffect(()=>{f.isHiddenScrollBar||p(e=>{let t=n.current;return t?{...e,scrollLeft:t.scrollLeft/t.scrollWidth*t.clientWidth}:e})},[f.isHiddenScrollBar]),c<=l||!u||f.isHiddenScrollBar?null:S.createElement(`div`,{style:{height:kf(),width:l,bottom:i},className:`${s}-sticky-scroll`},S.createElement(`div`,{onMouseDown:y,ref:d,className:J(`${s}-sticky-scroll-bar`,{[`${s}-sticky-scroll-bar-active`]:h}),style:{width:`${u}px`,transform:`translate3d(${f.scrollLeft}px, 0, 0)`}}))});function cY(){return cY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let n={rowKey:`key`,prefixCls:lY,emptyText:fY,...e},{prefixCls:r,className:i,rowClassName:a,style:o,classNames:s,styles:c,data:l,rowKey:u,scroll:d,tableLayout:f,direction:p,title:m,footer:h,summary:g,caption:_,id:v,showHeader:y,components:b,emptyText:x,onRow:C,onHeaderRow:w,measureRowRender:T,onScroll:E,internalHooks:D,transformColumns:O,internalRefs:k,tailor:A,getContainerWidth:j,sticky:M,rowHoverable:N=!0}=n,P=l||uY,F=!!P.length,I=D===Lq,L=S.useCallback((e,t)=>ar(b,e)||t,[b]),R=S.useMemo(()=>typeof u==`function`?u:e=>e&&e[u],[u]),z=L([`body`]),[B,V,H]=ZJ(),[U,W,ee,te,ne,re]=qJ(n,P,R),ie=d?.x,[ae,G]=S.useState(0),[oe,K,se]=KJ({...n,...U,expandable:!!U.expandedRowRender,columnTitle:U.columnTitle,expandedKeys:ee,getRowKey:R,onTriggerExpand:re,expandIcon:te,expandIconColumnIndex:U.expandIconColumnIndex,direction:p,scrollWidth:I&&A&&typeof ie==`number`?ie:null,clientWidth:ae},I?O:null),ce=se??ie,q=S.useMemo(()=>({columns:oe,flattenColumns:K}),[oe,K]),le=S.useRef(null),ue=S.useRef(null),de=S.useRef(null),fe=S.useRef(null);S.useImperativeHandle(t,()=>({nativeElement:le.current,scrollTo:e=>{if(de.current instanceof HTMLElement){let{index:t,top:n,key:r,offset:i}=e;if(Zq(n))de.current?.scrollTo({top:n});else{let e=r??R(P[t]),n=de.current.querySelector(`[data-row-key="${e}"]`);if(n)if(!i)n.scrollIntoView();else{let e=n.offsetTop;de.current.scrollTo({top:e+i})}}}else de.current?.scrollTo&&de.current.scrollTo(e)}}));let pe=S.useRef(null),[me,he]=S.useState(!1),[ge,_e]=S.useState(!1),[ve,ye]=S.useState(new Map),be=Yq(K).map(e=>ve.get(e)),xe=S.useMemo(()=>be,[be.join(`_`)]),Se=eY(xe,K),Ce=d&&Xq(d.y),we=d&&Xq(ce)||!!U.fixed,Te=we&&K.some(({fixed:e})=>e),Ee=S.useRef(null),{isSticky:De,offsetHeader:Oe,offsetSummary:ke,offsetScroll:Ae,stickyClassName:je,container:Me}=$J(M,r),Ne=S.useMemo(()=>g?.(P),[g,P]),Pe=(Ce||De)&&S.isValidElement(Ne)&&Ne.type===fJ&&Ne.props.fixed,Fe,Ie,Le;Ce&&(Ie={overflowY:F?`scroll`:`auto`,maxHeight:d.y}),we&&(Fe={overflowX:`auto`},Ce||(Ie={overflowY:`hidden`}),Le={width:ce===!0?`auto`:ce,minWidth:`100%`});let Re=S.useCallback((e,t)=>{ye(n=>{if(n.get(e)!==t){let r=new Map(n);return r.set(e,t),r}return n})},[]),[ze,Be]=XJ(null);function Ve(e,t){t&&(typeof t==`function`?t(e):t.scrollLeft!==e&&(t.scrollLeft=e,t.scrollLeft!==e&&setTimeout(()=>{t.scrollLeft=e},0)))}let[He,Ue]=S.useState([0,0]),We=In(({currentTarget:e,scrollLeft:t})=>{let n=typeof t==`number`?t:e.scrollLeft,r=e||dY;(!Be()||Be()===r)&&(ze(r),Ve(n,ue.current),Ve(n,de.current),Ve(n,pe.current),Ve(n,Ee.current?.setScrollLeft));let i=e||ue.current;if(i){let e=I&&A&&typeof ce==`number`?ce:i.scrollWidth,t=i.clientWidth,r=Math.abs(n);if(Ue(n=>{let i=[r,e-t];return Ti(n,i)?n:i}),e===t){he(!1),_e(!1);return}he(r>0),_e(r{We(e),E?.(e)}),Ke=()=>{we&&de.current?We({currentTarget:kr(de.current),scrollLeft:de.current?.scrollLeft}):(he(!1),_e(!1))},qe=e=>{Ee.current?.checkScrollBarVisible();let t=e??le.current?.offsetWidth??0;I&&j&&le.current&&(t=j(le.current,t)||t),t!==ae&&(Ke(),G(t))};zn(()=>{we&&qe()},[we]);let Je=S.useRef(!1);S.useEffect(()=>{Je.current&&Ke()},[we,l,oe.length]),S.useEffect(()=>{Je.current=!0},[]);let[Ye,Xe]=S.useState(0);zn(()=>{(!A||!I)&&(de.current instanceof Element?Xe(Af(de.current).width):Xe(Af(fe.current).width))},[]),S.useEffect(()=>{I&&k&&(k.body.current=de.current)});let Ze=S.useCallback(e=>S.createElement(S.Fragment,null,S.createElement(BJ,e),Pe===`top`&&S.createElement(pJ,e,Ne)),[Pe,Ne]),Qe=S.useCallback(e=>S.createElement(pJ,e,Ne),[Ne]),$e=L([`table`],`table`),et=S.useMemo(()=>f||(Te?ce===`max-content`?`auto`:`fixed`:Ce||De||K.some(({ellipsis:e})=>e)?`fixed`:`auto`),[Ce,Te,K,f,De]),tt,nt={colWidths:xe,columCount:K.length,stickyOffsets:Se,onHeaderRow:w,fixHeader:Ce,scroll:d},rt=S.useMemo(()=>F?null:typeof x==`function`?x():x,[F,x]),it=S.createElement(kJ,{data:P,measureColumnWidth:Ce||we||De}),at=S.createElement(NJ,{colWidths:K.map(({width:e})=>e),columns:K}),ot=_==null?void 0:S.createElement(`caption`,{className:`${r}-caption`},_),st=Vu(n,{data:!0}),ct=Vu(n,{aria:!0});if(Ce||De){let e;typeof z==`function`?(e=z(P,{scrollbarSize:Ye,ref:de,onScroll:We}),nt.colWidths=K.map(({width:e},t)=>{let n=t===K.length-1?e-Ye:e;return typeof n==`number`&&!Number.isNaN(n)?n:0})):e=S.createElement(`div`,{style:{...Fe,...Ie},onScroll:Ge,ref:de,className:`${r}-body`},S.createElement($e,cY({style:{...Le,tableLayout:et}},ct),ot,at,it,!Pe&&Ne&&S.createElement(pJ,{stickyOffsets:Se,flattenColumns:K},Ne)));let t={noData:!P.length,maxContentScroll:we&&ce===`max-content`,...nt,...q,direction:p,stickyClassName:je,scrollX:ce,tableLayout:et,onScroll:We};tt=S.createElement(S.Fragment,null,y!==!1&&S.createElement(IJ,cY({},t,{stickyTopOffset:Oe,className:`${r}-header`,ref:ue,colGroup:at}),Ze),e,Pe&&Pe!==`top`&&S.createElement(IJ,cY({},t,{stickyBottomOffset:ke,className:`${r}-summary`,ref:pe,colGroup:at}),Qe),De&&de.current&&de.current instanceof Element&&S.createElement(sY,{ref:Ee,offsetScroll:Ae,scrollBodyRef:de,onScroll:We,container:Me,direction:p}))}else tt=S.createElement(`div`,{style:{...Fe,...Ie,...c?.content},className:J(`${r}-content`,s?.content),onScroll:We,ref:de},S.createElement($e,cY({style:{...Le,tableLayout:et}},ct),ot,at,y!==!1&&S.createElement(BJ,cY({},nt,q)),it,Ne&&S.createElement(pJ,{stickyOffsets:Se,flattenColumns:K},Ne)));let lt={...o};De&&(lt[`--columns-count`]=K.length);let ut=S.createElement(`div`,cY({className:J(r,i,{[`${r}-rtl`]:p===`rtl`,[`${r}-fix-start-shadow`]:we,[`${r}-fix-end-shadow`]:we,[`${r}-fix-start-shadow-show`]:we&&me,[`${r}-fix-end-shadow-show`]:we&&ge,[`${r}-layout-fixed`]:f===`fixed`,[`${r}-fixed-header`]:Ce,[`${r}-fixed-column`]:Te,[`${r}-scroll-horizontal`]:we,[`${r}-has-fix-start`]:K[0]?.fixed,[`${r}-has-fix-end`]:K[K.length-1]?.fixed===`end`}),style:lt,id:v,ref:le},st),m&&S.createElement(tY,{className:J(`${r}-title`,s?.title),style:c?.title},m(P)),S.createElement(`div`,{ref:fe,className:J(`${r}-container`,s?.section),style:c?.section},tt),h&&S.createElement(tY,{className:J(`${r}-footer`,s?.footer),style:c?.footer},h(P)));we&&(ut=S.createElement(Wr,{onResize:({offsetWidth:e})=>qe(e)},ut));let dt=JJ(K,Se),ft=S.useMemo(()=>({scrollX:ce,scrollInfo:He,classNames:s,styles:c,prefixCls:r,getComponent:L,scrollbarSize:Ye,direction:p,fixedInfoList:dt,isSticky:De,componentWidth:ae,fixHeader:Ce,fixColumn:Te,horizonScroll:we,tableLayout:et,rowClassName:a,expandedRowClassName:U.expandedRowClassName,expandIcon:te,expandableType:W,expandRowByClick:U.expandRowByClick,expandedRowRender:U.expandedRowRender,expandedRowOffset:U.expandedRowOffset,onTriggerExpand:re,expandIconColumnIndex:U.expandIconColumnIndex,indentSize:U.indentSize,allColumnsFixedLeft:K.every(e=>e.fixed===`start`),emptyNode:rt,columns:oe,flattenColumns:K,onColumnResize:Re,colWidths:xe,hoverStartRow:B,hoverEndRow:V,onHover:H,rowExpandable:U.rowExpandable,onRow:C,getRowKey:R,expandedKeys:ee,childrenColumnName:ne,rowHoverable:N,measureRowRender:T}),[ce,He,s,c,r,L,Ye,p,dt,De,ae,Ce,Te,we,et,a,U.expandedRowClassName,te,W,U.expandRowByClick,U.expandedRowRender,U.expandedRowOffset,re,U.expandIconColumnIndex,U.indentSize,rt,oe,K,Re,xe,B,V,H,U.rowExpandable,C,R,ee,ne,N,T]);return S.createElement(Gq.Provider,{value:ft},ut)}),mY=e=>Hq(pY,e),hY=mY();hY.EXPAND_COLUMN=Iq,hY.INTERNAL_HOOKS=Lq,hY.Column=hJ,hY.ColumnGroup=gJ,hY.Summary=mJ;var gY=Rq(null),_Y=Rq(null);function vY(){return vY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{rowInfo:t,column:n,colIndex:r,indent:i,index:a,component:o,renderIndex:s,record:c,style:l,className:u,inverse:d,getHeight:f}=e,{render:p,dataIndex:m,className:h,width:g}=n,{columnsOffset:_}=zq(_Y,[`columnsOffset`]),{key:v,fixedInfo:y,appendCellNode:b,additionalCellProps:x}=TJ(t,n,r,i,a),{style:C,colSpan:w=1,rowSpan:T=1}=x,E=yY(r-1,w,_),D=w>1?g-E:0,O={...C,...l,flex:`0 0 ${E}px`,width:`${E}px`,marginRight:D,pointerEvents:`auto`},k=S.useMemo(()=>d?T<=1:w===0||T===0||T>1,[T,w,d]);k?O.visibility=`hidden`:d&&(O.height=f?.(T));let A=k?()=>null:p,j={};return(T===0||w===0)&&(j.rowSpan=1,j.colSpan=1),S.createElement(iJ,vY({className:J(h,u),ellipsis:n.ellipsis,align:n.align,scope:n.rowScope,component:o,prefixCls:t.prefixCls,key:v,record:c,index:a,renderIndex:s,dataIndex:m,render:A,shouldCellUpdate:n.shouldCellUpdate},y,{appendNode:b,additionalProps:{...x,style:O,...j}}))};function xY(){return xY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{data:n,index:r,className:i,rowKey:a,style:o,extra:s,getHeight:c,...l}=e,{record:u,indent:d,index:f}=n,{scrollX:p,flattenColumns:m,prefixCls:h,fixColumn:g,componentWidth:_}=zq(Gq,[`prefixCls`,`flattenColumns`,`fixColumn`,`componentWidth`,`scrollX`]),{getComponent:v}=zq(gY,[`getComponent`]),y=yJ(u,a,r,d),b=v([`body`,`row`],`div`),x=v([`body`,`cell`],`div`),{rowSupportExpand:C,expanded:w,rowProps:T,expandedRowRender:E,expandedRowClassName:D}=y,O;if(C&&w){let e=E(u,r,d+1,w),t=CJ(D,u,r,d),n={};g&&(n={style:{"--virtual-width":`${_}px`}});let i=`${h}-expanded-row-cell`;O=S.createElement(b,{className:J(`${h}-expanded-row`,`${h}-expanded-row-level-${d+1}`,t)},S.createElement(iJ,{component:x,prefixCls:h,className:J(i,{[`${i}-fixed`]:g}),additionalProps:n},e))}let k={...o,width:p};s&&(k.position=`absolute`,k.pointerEvents=`none`);let A=S.createElement(b,xY({},T,l,{"data-row-key":a,ref:C?null:t,className:J(i,`${h}-row`,T?.className,{[`${h}-row-extra`]:s}),style:{...k,...T?.style}}),m.map((e,t)=>S.createElement(bY,{key:t,component:x,rowInfo:y,column:e,colIndex:t,indent:d,index:r,renderIndex:f,record:u,inverse:s,getHeight:c})));return C?S.createElement(`div`,{ref:t},A,O):A})),CY=Uq(S.forwardRef((e,t)=>{let{data:n,onScroll:r}=e,{flattenColumns:i,onColumnResize:a,getRowKey:o,expandedKeys:s,prefixCls:c,childrenColumnName:l,scrollX:u,direction:d}=zq(Gq,[`flattenColumns`,`onColumnResize`,`getRowKey`,`prefixCls`,`expandedKeys`,`childrenColumnName`,`scrollX`,`direction`]),{sticky:f,scrollY:p,listItemHeight:m,getComponent:h,onScroll:g}=zq(gY),_=S.useRef(null),v=vJ(n,l,s,o),y=S.useMemo(()=>{let e=0;return i.map(({width:t,minWidth:n,key:r})=>{let i=Math.max(t||0,n||0);return e+=i,[r,i,e]})},[i]),b=S.useMemo(()=>y.map(e=>e[2]),[y]);S.useEffect(()=>{y.forEach(([e,t])=>{a(e,t)})},[y]),S.useImperativeHandle(t,()=>{let e={scrollTo:e=>{let{offset:t,...n}=e;t?_.current?.scrollTo({...n,offset:t,align:`top`}):_.current?.scrollTo(e)},nativeElement:_.current?.nativeElement};return Object.defineProperty(e,`scrollLeft`,{get:()=>_.current?.getScrollInfo().x||0,set:e=>{_.current?.scrollTo({left:e})}}),Object.defineProperty(e,`scrollTop`,{get:()=>_.current?.getScrollInfo().y||0,set:e=>{_.current?.scrollTo({top:e})}}),e});let x=(e,t)=>{let n=v[t]?.record,{onCell:r}=e;return r?r(n,t)?.rowSpan??1:1},C=e=>{let{start:t,end:n,getSize:r,offsetY:a}=e;if(n<0)return null;let s=i.filter(e=>x(e,t)===0),c=t;for(let e=t;e>=0;--e)if(s=s.filter(t=>x(t,e)===0),!s.length){c=e;break}let l=i.filter(e=>x(e,n)!==1),u=n;for(let e=n;ex(t,e)!==1),!l.length){u=Math.max(e-1,n);break}let d=[];for(let e=c;e<=u;e+=1)v[e]&&i.some(t=>x(t,e)>1)&&d.push(e);return d.map(e=>{let t=v[e],n=o(t.record,e),i=t=>{let i=e+t-1,a=v[i];if(!a||!a.record){let e=Math.min(i,v.length-1),t=v[e],a=r(n,o(t.record,e));return a.bottom-a.top}let s=r(n,o(a.record,i));return s.bottom-s.top},s=r(n);return S.createElement(SY,{key:e,data:t,rowKey:n,index:e,style:{top:-a+s.top},extra:!0,getHeight:i})})},w=S.useMemo(()=>({columnsOffset:b}),[b]),T=`${c}-tbody`,E=h([`body`,`wrapper`]),D={};return f&&(D.position=`sticky`,D.bottom=0,typeof f==`object`&&f.offsetScroll&&(D.bottom=f.offsetScroll)),S.createElement(_Y.Provider,{value:w},S.createElement(US,{fullHeight:!1,ref:_,prefixCls:`${T}-virtual`,styles:{horizontalScrollBar:D},className:T,height:p,itemHeight:m||24,data:v,itemKey:e=>o(e.record),component:E,scrollWidth:u,direction:d,onVirtualScroll:({x:e})=>{r({currentTarget:_.current?.nativeElement,scrollLeft:e})},onScroll:g,extraRender:C},(e,t,n)=>{let r=o(e.record,t);return S.createElement(SY,{data:e,rowKey:r,index:t,style:n.style})}))}));function wY(){return wY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{ref:n,onScroll:r}=t;return S.createElement(CY,{ref:n,data:e,onScroll:r})},EY=S.forwardRef((e,t)=>{let{data:n,columns:r,scroll:i,sticky:a,prefixCls:o=lY,className:s,listItemHeight:c,components:l,onScroll:u}=e,{x:d,y:f}=i||{};typeof d!=`number`&&(d=1),typeof f!=`number`&&(f=500);let p=In((e,t)=>ar(l,e)||t),m=In(u),h=S.useMemo(()=>({sticky:a,scrollY:f,listItemHeight:c,getComponent:p,onScroll:m}),[a,f,c,p,m]);return S.createElement(gY.Provider,{value:h},S.createElement(hY,wY({},e,{className:J(s,`${o}-virtual`),scroll:{...i,x:d},components:{...l,body:n?.length?TY:void 0},columns:r,internalHooks:Lq,tailor:!0,ref:t})))}),DY=e=>Hq(EY,e);DY();var OY=e=>null,kY=e=>null,AY=S.createContext(null),jY=S.createContext({}),MY=S.memo(({prefixCls:e,level:t,isStart:n,isEnd:r})=>{let i=`${e}-indent-unit`,a=[];for(let e=0;e{let{eventKey:t,className:n,style:r,dragOver:i,dragOverGapTop:a,dragOverGapBottom:o,isLeaf:s,isStart:c,isEnd:l,expanded:u,selected:d,checked:f,halfChecked:p,loading:m,domRef:h,active:g,data:_,onMouseMove:v,selectable:y,treeId:b,...x}=e,C=Lf(b,t),w=S.useContext(AY),{classNames:T,styles:E}=w||{},D=S.useContext(jY),O=S.useRef(null),[k,A]=S.useState(!1),j=!!(w.disabled||e.disabled||D.nodeDisabled?.(_)),M=S.useMemo(()=>!w.checkable||e.checkable===!1?!1:w.checkable,[w.checkable,e.checkable]),N=t=>{j||w.onNodeSelect(t,ZR(e))},P=t=>{j||!M||e.disableCheckbox||w.onNodeCheck(t,ZR(e),!f)},F=S.useMemo(()=>typeof y==`boolean`?y:w.selectable,[y,w.selectable]),I=t=>{w.onNodeClick(t,ZR(e)),F?N(t):P(t)},L=t=>{w.onNodeDoubleClick(t,ZR(e))},R=t=>{w.onNodeMouseEnter(t,ZR(e))},z=t=>{w.onNodeMouseLeave(t,ZR(e))},B=t=>{w.onNodeContextMenu(t,ZR(e))},V=S.useMemo(()=>!!(w.draggable&&(!w.draggable.nodeDraggable||w.draggable.nodeDraggable(_))),[w.draggable,_]),H=t=>{t.stopPropagation(),A(!0),w.onNodeDragStart(t,e);try{t.dataTransfer.setData(`text/plain`,``)}catch{}},U=t=>{t.preventDefault(),t.stopPropagation(),w.onNodeDragEnter(t,e)},W=t=>{t.preventDefault(),t.stopPropagation(),w.onNodeDragOver(t,e)},ee=t=>{t.stopPropagation(),w.onNodeDragLeave(t,e)},te=t=>{t.stopPropagation(),A(!1),w.onNodeDragEnd(t,e)},ne=t=>{t.preventDefault(),t.stopPropagation(),A(!1),w.onNodeDrop(t,e)},re=t=>{m||w.onNodeExpand(t,ZR(e))},ie=S.useMemo(()=>{let{children:e}=BR(w.keyEntities,t)||{};return!!(e||[]).length},[w.keyEntities,t]),ae=S.useMemo(()=>YR(s,w.loadData,ie,e.loaded),[s,w.loadData,ie,e.loaded]);S.useEffect(()=>{m||typeof w.loadData==`function`&&u&&!ae&&!e.loaded&&w.onNodeLoad(ZR(e))},[m,w.loadData,w.onNodeLoad,u,ae,e]);let G=S.useMemo(()=>w.draggable?.icon?S.createElement(`span`,{className:`${w.prefixCls}-draggable-icon`},w.draggable.icon):null,[w.draggable]),oe=t=>{let n=e.switcherIcon||w.switcherIcon;return typeof n==`function`?n({...e,isLeaf:t}):n},K=()=>{if(ae){let e=oe(!0);return e===!1?null:S.createElement(`span`,{className:J(`${w.prefixCls}-switcher`,`${w.prefixCls}-switcher-noop`)},e)}let e=oe(!1);return e===!1?null:S.createElement(`span`,{onClick:re,className:J(`${w.prefixCls}-switcher`,`${w.prefixCls}-switcher_${u?PY:FY}`)},e)},se=S.useMemo(()=>{if(!M)return null;let t=typeof M==`boolean`?null:M;return S.createElement(`span`,{className:J(`${w.prefixCls}-checkbox`,{[`${w.prefixCls}-checkbox-checked`]:f,[`${w.prefixCls}-checkbox-indeterminate`]:!f&&p,[`${w.prefixCls}-checkbox-disabled`]:j||e.disableCheckbox}),onClick:P,role:`checkbox`,"aria-checked":p?`mixed`:f,"aria-disabled":j||e.disableCheckbox,"aria-labelledby":C},t)},[M,f,p,j,e.disableCheckbox,C]),ce=S.useMemo(()=>ae?null:u?PY:FY,[ae,u]),q=S.useMemo(()=>S.createElement(`span`,{className:J(T?.itemIcon,`${w.prefixCls}-iconEle`,`${w.prefixCls}-icon__${ce||`docu`}`,{[`${w.prefixCls}-icon_loading`]:m}),style:E?.itemIcon}),[w.prefixCls,ce,m]),le=S.useMemo(()=>{let n=!!w.draggable;return!e.disabled&&n&&w.dragOverNodeKey===t?w.dropIndicatorRender({dropPosition:w.dropPosition,dropLevelOffset:w.dropLevelOffset,indent:w.indent,prefixCls:w.prefixCls,direction:w.direction}):null},[w.dropPosition,w.dropLevelOffset,w.indent,w.prefixCls,w.direction,w.draggable,w.dragOverNodeKey,w.dropIndicatorRender]),ue=S.useMemo(()=>{let{title:t=IY}=e,n=`${w.prefixCls}-node-content-wrapper`,r;if(w.showIcon){let t=e.icon||w.icon;r=t?S.createElement(`span`,{className:J(T?.itemIcon,`${w.prefixCls}-iconEle`,`${w.prefixCls}-icon__customize`),style:E?.itemIcon},typeof t==`function`?t(e):t):q}else w.loadData&&m&&(r=q);let i;return i=typeof t==`function`?t(_):w.titleRender?w.titleRender(_):t,S.createElement(`span`,{ref:O,title:typeof t==`string`?t:``,className:J(n,`${n}-${ce||`normal`}`,{[`${w.prefixCls}-node-selected`]:!j&&(d||k)}),onMouseEnter:R,onMouseLeave:z,onContextMenu:B,onClick:I,onDoubleClick:L},r,S.createElement(`span`,{className:J(`${w.prefixCls}-title`,T?.itemTitle),style:E?.itemTitle},i),le)},[w.prefixCls,w.showIcon,e,w.icon,q,w.titleRender,_,ce,R,z,B,I,L]),de=Vu(x,{aria:!0,data:!0}),{level:fe}=BR(w.keyEntities,t)||{},pe=l[l.length-1],me=!j&&V,he=w.draggingNodeKey===t;return S.createElement(`div`,NY({ref:h,role:`treeitem`,id:C,"aria-expanded":ae?void 0:u,"aria-selected":F&&!j?d:void 0,"aria-checked":M&&!j?p?`mixed`:f:void 0,"aria-disabled":j,className:J(n,`${w.prefixCls}-treenode`,T?.item,{[`${w.prefixCls}-treenode-disabled`]:j,[`${w.prefixCls}-treenode-switcher-${u?`open`:`close`}`]:!s,[`${w.prefixCls}-treenode-checkbox-checked`]:f,[`${w.prefixCls}-treenode-checkbox-indeterminate`]:p,[`${w.prefixCls}-treenode-selected`]:d,[`${w.prefixCls}-treenode-loading`]:m,[`${w.prefixCls}-treenode-active`]:g,[`${w.prefixCls}-treenode-leaf-last`]:pe,[`${w.prefixCls}-treenode-draggable`]:V,dragging:he,"drop-target":w.dropTargetKey===t,"drop-container":w.dropContainerKey===t,"drag-over":!j&&i,"drag-over-gap-top":!j&&a,"drag-over-gap-bottom":!j&&o,"filter-node":w.filterTreeNode?.(ZR(e)),[`${w.prefixCls}-treenode-leaf`]:ae}),style:{...r,...E?.item},draggable:me,onDragStart:me?H:void 0,onDragEnter:V?U:void 0,onDragOver:V?W:void 0,onDragLeave:V?ee:void 0,onDrop:V?ne:void 0,onDragEnd:V?te:void 0,onMouseMove:v},de),S.createElement(MY,{prefixCls:w.prefixCls,level:fe,isStart:c,isEnd:l}),G,K(),se,ue)};LY.isTreeNode=1;function RY(e,t){if(!e)return[];let n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function zY(e,t){let n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function BY(e){return e.split(`-`)}function VY(e,t){let n=[],r=BR(t,e);function i(e=[]){e.forEach(({key:e,children:t})=>{n.push(e),i(t)})}return i(r.children),n}function HY(e){if(e.parent){let t=BY(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function UY(e){let t=BY(e.pos);return Number(t[t.length-1])===0}function WY(e,t,n,r,i,a,o,s,c,l){let{clientX:u,clientY:d}=e,{top:f,height:p}=e.target.getBoundingClientRect(),m=((l===`rtl`?-1:1)*((i?.x||0)-u)-12)/r,h=c.filter(e=>s[e]?.children?.length),g=BR(s,n.eventKey);if(de.key===g.key),t=o[e<=0?0:e-1].key;g=BR(s,t)}let _=g.key,v=g,y=g.key,b=0,x=0;if(!h.includes(_))for(let e=0;e-1.5?a({dragNode:S,dropNode:C,dropPosition:1})?b=1:w=!1:a({dragNode:S,dropNode:C,dropPosition:0})?b=0:a({dragNode:S,dropNode:C,dropPosition:1})?b=1:w=!1:a({dragNode:S,dropNode:C,dropPosition:1})?b=1:w=!1,{dropPosition:b,dropLevelOffset:x,dropTargetKey:g.key,dropTargetPos:g.pos,dragOverNodeKey:y,dropContainerKey:b===0?null:g.parent?.key||null,dropAllowed:w}}function GY(e,t){if(!e)return;let{multiple:n}=t;return n?e.slice():e.length?[e[0]]:e}function KY(e){if(!e)return null;let t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(typeof e==`object`)t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return br(!1,"`checkedKeys` is not an array or an object"),null;return t}function qY(e,t){let n=new Set;function r(e){if(n.has(e))return;let i=BR(t,e);if(!i)return;n.add(e);let{parent:a,node:o}=i;o.disabled||a&&r(a.key)}return(e||[]).forEach(e=>{r(e)}),[...n]}var JY={},YY=`SELECT_ALL`,XY=`SELECT_INVERT`,ZY=`SELECT_NONE`,QY=[],$Y=(e,t,n=[])=>((t||[]).forEach(t=>{n.push(t),hd(t)&&e in t&&$Y(e,t[e],n)}),n),eX=(e,t)=>{let{preserveSelectedRowKeys:n,selectedRowKeys:r,defaultSelectedRowKeys:i,getCheckboxProps:a,getTitleCheckboxProps:o,onChange:s,onSelect:c,onSelectAll:l,onSelectInvert:u,onSelectNone:d,onSelectMultiple:f,columnWidth:p,type:m,selections:h,fixed:g,renderCell:_,hideSelectAll:v,checkStrictly:y=!0}=t||{},{prefixCls:b,data:x,pageData:C,getRecordByKey:w,getRowKey:T,expandType:E,childrenColumnName:D,locale:O,getPopupContainer:k}=e,A=Dr(`Table`),[j,M]=Id(e=>e),[N,P]=Hn(i||QY,r),F=N??QY,I=S.useRef(new Map),L=(0,S.useCallback)(e=>{if(n){let t=new Map;e.forEach(e=>{let n=w(e);!n&&I.current.has(e)&&(n=I.current.get(e)),t.set(e,n)}),I.current=t}},[w,n]);S.useEffect(()=>{L(F)},[F,L]);let R=(0,S.useMemo)(()=>$Y(D,C),[D,C]),{keyEntities:z}=(0,S.useMemo)(()=>{if(y)return{keyEntities:null};let e=x;if(n){let t=new Set(R.map(T)),n=Array.from(I.current).reduce((e,[n,r])=>t.has(n)?e:e.concat(r),[]);e=[].concat(Zr(e),Zr(n))}return JR(e,{externalGetKey:T,childrenPropName:D})},[x,T,y,D,n,R]),B=(0,S.useMemo)(()=>{let e=new Map;return R.forEach((t,n)=>{let r=T(t,n),i=(a?a(t):null)||{};e.set(r,i)}),e},[R,T,a]),V=(0,S.useCallback)(e=>{let t=T(e),n;return n=B.has(t)?B.get(T(e)):a?a(e):void 0,!!n?.disabled},[B,T]),[H,U]=(0,S.useMemo)(()=>{if(y)return[F,[]];let{checkedKeys:e,halfCheckedKeys:t}=nz(F,!0,z,V);return[e||[],t]},[F,y,z,V]),W=(0,S.useMemo)(()=>{let e=m===`radio`?H.slice(0,1):H;return new Set(e)},[H,m]),ee=(0,S.useMemo)(()=>m===`radio`?new Set:new Set(U),[U,m]);S.useEffect(()=>{t||P(QY)},[!!t]);let te=(0,S.useCallback)((e,t)=>{let r,i;L(e),n?(r=e,i=e.map(e=>I.current.get(e))):(r=[],i=[],e.forEach(e=>{let t=w(e);t!==void 0&&(r.push(e),i.push(t))})),P(r),s?.(r,i,{type:t})},[P,w,s,n]),ne=(0,S.useCallback)((e,t,n,r)=>{if(c){let i=n.map(w);c(w(e),t,i,r)}te(n,`single`)},[c,w,te]),re=(0,S.useMemo)(()=>!h||v?null:(h===!0?[YY,XY,ZY]:h).map(e=>e===`SELECT_ALL`?{key:`all`,text:O.selectionAll,onSelect(){te(x.map((e,t)=>T(e,t)).filter(e=>!B.get(e)?.disabled||W.has(e)),`all`)}}:e===`SELECT_INVERT`?{key:`invert`,text:O.selectInvert,onSelect(){let e=new Set(W);C.forEach((t,n)=>{let r=T(t,n);B.get(r)?.disabled||(e.has(r)?e.delete(r):e.add(r))});let t=Array.from(e);u&&(A.deprecated(!1,`onSelectInvert`,`onChange`),u(t)),te(t,`invert`)}}:e===`SELECT_NONE`?{key:`none`,text:O.selectNone,onSelect(){d?.(),te(Array.from(W).filter(e=>B.get(e)?.disabled),`none`)}}:e).map(e=>({...e,onSelect:(...t)=>{e.onSelect?.(...t),M(null)}})),[h,v,O.selectionAll,O.selectInvert,O.selectNone,B,W,x,C,T,u,te]);return[(0,S.useCallback)(e=>{if(!t)return e.filter(e=>e!==JY);let n=Zr(e),r=new Set(W),i=R.map(T).filter(e=>!B.get(e).disabled),a=i.every(e=>r.has(e)),s=i.some(e=>r.has(e)),c=()=>{let e=[];a?i.forEach(t=>{r.delete(t),e.push(t)}):i.forEach(t=>{r.has(t)||(r.add(t),e.push(t))});let t=Array.from(r);l?.(!a,t.map(w),e.map(w)),te(t,`all`),M(null)},u,d;if(m!==`radio`){let e;if(re){let t={getPopupContainer:k,items:re.map((e,t)=>{let{key:n,text:r,onSelect:a}=e;return{key:n??t,onClick:()=>{a?.(i)},label:r}})};e=S.createElement(`div`,{className:`${b}-selection-extra`},S.createElement(KV,{menu:t,getPopupContainer:k},S.createElement(`span`,null,S.createElement(MC,null))))}let t=R.map((e,t)=>{let n=T(e,t),i=B.get(n)||{};return{checked:r.has(n),...i}}).filter(({disabled:e})=>e),n=!!t.length&&t.length===R.length,l=n&&t.every(({checked:e})=>e),f=n&&t.some(({checked:e})=>e),p=o?.()||{},{onChange:m,disabled:h}=p;d=S.createElement(lz,{"aria-label":e?`Custom selection`:`Select all`,...p,checked:n?l:!!R.length&&a,indeterminate:n?!l&&f:!a&&s,onChange:e=>{c(),m?.(e)},disabled:h??(R.length===0||n),skipGroup:!0}),u=!v&&S.createElement(`div`,{className:`${b}-selection`},d,e)}let x;x=m===`radio`?(e,t,n)=>{let i=T(t,n),a=r.has(i),o=B.get(i);return{node:S.createElement(tL,{...o,checked:a,onClick:e=>{e.stopPropagation(),o?.onClick?.(e)},onChange:e=>{r.has(i)||ne(i,!0,[i],e.nativeEvent),o?.onChange?.(e)}}),checked:a}}:(e,t,n)=>{let a=T(t,n),o=r.has(a),s=ee.has(a),c=B.get(a),l;return l=E===`nest`?s:c?.indeterminate??s,{node:S.createElement(lz,{...c,indeterminate:l,checked:o,skipGroup:!0,onClick:e=>{e.stopPropagation(),c?.onClick?.(e)},onChange:e=>{let{nativeEvent:t}=e,{shiftKey:n}=t,s=i.indexOf(a),l=H.some(e=>i.includes(e));if(n&&y&&l){let e=j(s,i,r),t=Array.from(r);f?.(!o,t.map(w),e.map(w)),te(t,`multiple`)}else{let e=H;if(y){let n=o?RY(e,a):zY(e,a);ne(a,!o,n,t)}else{let{checkedKeys:n,halfCheckedKeys:r}=nz([].concat(Zr(e),[a]),!0,z,V),i=n;if(o){let e=new Set(n);e.delete(a),i=nz(Array.from(e),{checked:!1,halfCheckedKeys:r},z,V).checkedKeys}ne(a,!o,i,t)}}M(o?null:s),c?.onChange?.(e)}}),checked:o}};let C=(e,t,n)=>{let{node:r,checked:i}=x(e,t,n);return _?_(i,t,n,r):r};if(!n.includes(JY))if(n.findIndex(e=>e.RC_TABLE_INTERNAL_COL_DEFINE?.columnType===`EXPAND_COLUMN`)===0){let[e,...t]=n;n=[e,JY].concat(Zr(t))}else n=[JY].concat(Zr(n));let D=n.indexOf(JY);n=n.filter((e,t)=>e!==JY||t===D);let O=n[D-1],A=n[D+1],N=g;N===void 0&&(A?.fixed===void 0?O?.fixed!==void 0&&(N=O.fixed):N=A.fixed),N&&O&&O.RC_TABLE_INTERNAL_COL_DEFINE?.columnType===`EXPAND_COLUMN`&&O.fixed===void 0&&(O.fixed=N);let P=J(`${b}-selection-col`,{[`${b}-selection-col-with-dropdown`]:h&&m===`checkbox`}),F={fixed:N,width:p,className:`${b}-selection-column`,title:t?.columnTitle?typeof t.columnTitle==`function`?t.columnTitle(d):t.columnTitle:u,render:C,onCell:t.onCell,align:t.align,[AJ]:{className:P}};return n.map(e=>e===JY?F:e)},[T,R,t,H,W,ee,p,re,E,B,f,ne,V]),W]};function tX(e){return t=>{let{prefixCls:n,onExpand:r,record:i,expanded:a,expandable:o}=t,s=`${n}-row-expand-icon`;return S.createElement(`button`,{type:`button`,onClick:e=>{r(i,e),e.stopPropagation()},className:J(s,{[`${s}-spaced`]:!o,[`${s}-expanded`]:o&&a,[`${s}-collapsed`]:o&&!a}),"aria-label":a?e.collapse:e.expand,"aria-expanded":a})}}function nX(e){return(t,n)=>{let r=t.querySelector(`.${e}-container`),i=n;if(r){let e=getComputedStyle(r),t=Number.parseInt(e.borderLeftWidth,10),a=Number.parseInt(e.borderRightWidth,10);i=n-t-a}return i}}var rX=(e,t)=>`key`in e&&fd(e.key)?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join(`.`):e.dataIndex:t;function iX(e,t){return t?`${t}-${e}`:`${e}`}var aX=(e,t)=>typeof e==`function`?e(t):e,oX=(e,t)=>{let n=aX(e,t);return Object.prototype.toString.call(n)===`[object Object]`?``:n},sX={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z`}}]},name:`filter`,theme:`filled`};function cX(){return cX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,cX({},e,{ref:t,icon:sX}))),uX=e=>{let{dropPosition:t,dropLevelOffset:n,indent:r}=e,i={pointerEvents:`none`,position:`absolute`,right:0,backgroundColor:`red`,height:2};switch(t){case-1:i.top=0,i.left=-n*r;break;case 1:i.bottom=0,i.left=-n*r;break;case 0:i.bottom=0,i.left=r;break}return S.createElement(`div`,{style:i})};function dX(e,t){let[n,r]=S.useState(!1);zn(()=>{if(n)return e(),()=>{t()}},[n]),zn(()=>(r(!0),()=>{r(!1)}),[])}function fX(){return fX=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:n,style:r,motion:i,motionNodes:a,motionType:o,onMotionStart:s,onMotionEnd:c,active:l,treeNodeRequiredProps:u,...d}=e,[f,p]=S.useState(!0),{prefixCls:m}=S.useContext(AY),h=a&&o!==`hide`;zn(()=>{a&&h!==f&&p(h)},[a]);let g=()=>{a&&s()},_=S.useRef(!1),v=()=>{a&&!_.current&&(_.current=!0,c())};return dX(g,v),a?S.createElement(Iu,fX({ref:t,visible:f},i,{motionAppear:o===`show`,onVisibleChanged:e=>{h===e&&v()}}),({className:e,style:t},n)=>S.createElement(`div`,{ref:n,className:J(`${m}-treenode-motion`,e),style:t},a.map(e=>{let{data:{...t},title:n,key:r,isStart:i,isEnd:a}=e;delete t.children;let o=XR(r,u);return S.createElement(LY,fX({},t,o,{title:n,active:l,data:e.data,key:r,isStart:i,isEnd:a}))}))):S.createElement(LY,fX({domRef:t,className:n,style:r},d,{active:l}))});function mX(e=[],t=[]){let n=e.length,r=t.length;if(Math.abs(n-r)!==1)return{add:!1,key:null};function i(e,t){let n=new Map;e.forEach(e=>{n.set(e,!0)});let r=t.filter(e=>!n.has(e));return r.length===1?r[0]:null}return ne.key===n)+1],i=t.findIndex(e=>e.key===n);if(r){let e=t.findIndex(e=>e.key===r.key);return t.slice(i+1,e)}return t.slice(i+1)}function gX(){return gX=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,data:r,selectable:i,checkable:a,expandedKeys:o,selectedKeys:s,checkedKeys:c,loadedKeys:l,loadingKeys:u,halfCheckedKeys:d,keyEntities:f,disabled:p,dragging:m,dragOverNodeKey:h,dropPosition:g,motion:_,height:v,itemHeight:y,virtual:b,scrollWidth:x,focusable:C,activeItem:w,tabIndex:T,onKeyDown:E,onFocus:D,onBlur:O,onMouseDown:k,onMouseUp:A,onActiveChange:j,onListChangeStart:M,onListChangeEnd:N,...P}=e,F=zf(),I=S.useRef(null),L=S.useRef(null);S.useImperativeHandle(t,()=>({scrollTo:e=>{I.current.scrollTo(e)},getIndentWidth:()=>L.current.offsetWidth}));let[R,z]=S.useState(o),[B,V]=S.useState(r),[H,U]=S.useState(r),[W,ee]=S.useState([]),[te,ne]=S.useState(null),re=S.useRef(r);re.current=r;function ie(){let e=re.current;V(e),U(e),ee([]),ne(null),N()}zn(()=>{z(o);let e=mX(R,o);if(e.key!==null)if(e.add){let t=B.findIndex(({key:t})=>t===e.key),n=xX(hX(B,r,e.key),b,v,y),i=B.slice();i.splice(t+1,0,bX),U(i),ee(n),ne(`show`)}else{let t=r.findIndex(({key:t})=>t===e.key),n=xX(hX(r,B,e.key),b,v,y),i=r.slice();i.splice(t+1,0,bX),U(i),ee(n),ne(`hide`)}else B!==r&&(V(r),U(r))},[o,r]),S.useEffect(()=>{m||ie()},[m]);let ae=_?H:r,G={expandedKeys:o,selectedKeys:s,loadedKeys:l,loadingKeys:u,checkedKeys:c,halfCheckedKeys:d,dragOverNodeKey:h,dropPosition:g,keyEntities:f};return S.createElement(S.Fragment,null,S.createElement(`div`,{className:`${n}-treenode`,"aria-hidden":!0,style:{position:`absolute`,pointerEvents:`none`,visibility:`hidden`,height:0,overflow:`hidden`,border:0,padding:0}},S.createElement(`div`,{className:`${n}-indent`},S.createElement(`div`,{ref:L,className:`${n}-indent-unit`}))),S.createElement(US,gX({},P,{data:ae,itemKey:SX,height:v,fullHeight:!1,virtual:b,itemHeight:y,scrollWidth:x,prefixCls:`${n}-list`,ref:I,role:`tree`,tabIndex:C!==!1&&!p?T:void 0,"aria-activedescendant":w?Lf(F,w.key):void 0,onKeyDown:E,onFocus:D,onBlur:O,onMouseDown:k,onMouseUp:A,onVisibleChange:e=>{e.every(e=>SX(e)!==_X)&&ie()}}),e=>{let{pos:t,data:{...n},title:r,key:i,isStart:a,isEnd:o}=e,s=UR(i,t);delete n.key,delete n.children;let c=XR(s,G);return S.createElement(pX,gX({},n,c,{title:r,active:!!w&&i===w.key,pos:t,data:e.data,isStart:a,isEnd:o,motion:_,motionNodes:i===_X?W:null,motionType:te,onMotionStart:M,onMotionEnd:ie,treeNodeRequiredProps:G,treeId:F,onMouseMove:()=>{j(null)}}))}))});function wX(){return wX=Object.assign?Object.assign.bind():function(e){for(var t=1;t!0,expandAction:!1};static TreeNode=LY;destroyed=!1;delayedDragEnterLogic;loadingRetryTimes={};state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],activeKey:null,listChanging:!1,prevProps:null,fieldNames:WR()};dragStartMousePosition=null;dragNodeProps=null;currentMouseOverDroppableNodeKey=null;focusedByMouse=!1;listRef=S.createRef();componentDidMount(){this.destroyed=!1,this.onUpdated()}componentDidUpdate(){this.onUpdated()}onUpdated(){let{activeKey:e,itemScrollOffset:t=0}=this.props;e!==void 0&&e!==this.state.activeKey&&(this.setState({activeKey:e}),e!==null&&this.scrollTo({key:e,offset:t}))}componentWillUnmount(){window.removeEventListener(`dragend`,this.onWindowDragEnd),this.destroyed=!0}static getDerivedStateFromProps(e,t){let{prevProps:n}=t,r={prevProps:e};function i(t){return!n&&e.hasOwnProperty(t)||n&&n[t]!==e[t]}let a,{fieldNames:o}=t;if(i(`fieldNames`)&&(o=WR(e.fieldNames),r.fieldNames=o),i(`treeData`)?{treeData:a}=e:i(`children`)&&(br(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),a=GR(e.children)),a){r.treeData=a;let e=JR(a,{fieldNames:o});r.keyEntities={[_X]:yX,...e.keyEntities}}let s=r.keyEntities||t.keyEntities;if(i(`expandedKeys`)||n&&i(`autoExpandParent`))r.expandedKeys=e.autoExpandParent||!n&&e.defaultExpandParent?qY(e.expandedKeys,s):e.expandedKeys;else if(!n&&e.defaultExpandAll){let e={...s};delete e[_X];let t=[];Object.keys(e).forEach(n=>{let r=e[n];r.children&&r.children.length&&t.push(r.key)}),r.expandedKeys=t}else !n&&e.defaultExpandedKeys&&(r.expandedKeys=e.autoExpandParent||e.defaultExpandParent?qY(e.defaultExpandedKeys,s):e.defaultExpandedKeys);if(r.expandedKeys||delete r.expandedKeys,(a||r.expandedKeys)&&(r.flattenNodes=KR(a||t.treeData,r.expandedKeys||t.expandedKeys,o)),e.selectable&&(i(`selectedKeys`)?r.selectedKeys=GY(e.selectedKeys,e):!n&&e.defaultSelectedKeys&&(r.selectedKeys=GY(e.defaultSelectedKeys,e))),e.checkable){let o;if(i(`checkedKeys`)?o=KY(e.checkedKeys)||{}:!n&&e.defaultCheckedKeys?o=KY(e.defaultCheckedKeys)||{}:a&&(o=KY(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),o){let{checkedKeys:t=[],halfCheckedKeys:n=[]}=o;if(!e.checkStrictly){let e=nz(t,!0,s);({checkedKeys:t,halfCheckedKeys:n}=e)}r.checkedKeys=t,r.halfCheckedKeys=n}}return i(`loadedKeys`)&&(r.loadedKeys=e.loadedKeys),r}onNodeDragStart=(e,t)=>{let{expandedKeys:n,keyEntities:r}=this.state,{onDragStart:i}=this.props,{eventKey:a}=t;this.dragNodeProps=t,this.dragStartMousePosition={x:e.clientX,y:e.clientY};let o=RY(n,a);this.setState({draggingNodeKey:a,dragChildrenKeys:VY(a,r),indent:this.listRef.current.getIndentWidth()}),this.setExpandedKeys(o),window.addEventListener(`dragend`,this.onWindowDragEnd),i?.({event:e,node:ZR(t)})};onNodeDragEnter=(e,t)=>{let{expandedKeys:n,keyEntities:r,dragChildrenKeys:i,flattenNodes:a,indent:o}=this.state,{onDragEnter:s,onExpand:c,allowDrop:l,direction:u}=this.props,{pos:d,eventKey:f}=t;if(this.currentMouseOverDroppableNodeKey!==f&&(this.currentMouseOverDroppableNodeKey=f),!this.dragNodeProps){this.resetDragState();return}let{dropPosition:p,dropLevelOffset:m,dropTargetKey:h,dropContainerKey:g,dropTargetPos:_,dropAllowed:v,dragOverNodeKey:y}=WY(e,this.dragNodeProps,t,o,this.dragStartMousePosition,l,a,r,n,u);if(i.includes(h)||!v){this.resetDragState();return}if(this.delayedDragEnterLogic||={},Object.keys(this.delayedDragEnterLogic).forEach(e=>{clearTimeout(this.delayedDragEnterLogic[e])}),this.dragNodeProps.eventKey!==t.eventKey&&(e.persist(),this.delayedDragEnterLogic[d]=window.setTimeout(()=>{if(this.state.draggingNodeKey===null)return;let i=[...n],a=BR(r,t.eventKey);a&&(a.children||[]).length&&(i=zY(n,t.eventKey)),this.props.hasOwnProperty(`expandedKeys`)||this.setExpandedKeys(i),c?.(i,{node:ZR(t),expanded:!0,nativeEvent:e.nativeEvent})},800)),this.dragNodeProps.eventKey===h&&m===0){this.resetDragState();return}this.setState({dragOverNodeKey:y,dropPosition:p,dropLevelOffset:m,dropTargetKey:h,dropContainerKey:g,dropTargetPos:_,dropAllowed:v}),s?.({event:e,node:ZR(t),expandedKeys:n})};onNodeDragOver=(e,t)=>{let{dragChildrenKeys:n,flattenNodes:r,keyEntities:i,expandedKeys:a,indent:o}=this.state,{onDragOver:s,allowDrop:c,direction:l}=this.props;if(!this.dragNodeProps)return;let{dropPosition:u,dropLevelOffset:d,dropTargetKey:f,dropContainerKey:p,dropTargetPos:m,dropAllowed:h,dragOverNodeKey:g}=WY(e,this.dragNodeProps,t,o,this.dragStartMousePosition,c,r,i,a,l);n.includes(f)||!h||(this.dragNodeProps.eventKey===f&&d===0?this.state.dropPosition===null&&this.state.dropLevelOffset===null&&this.state.dropTargetKey===null&&this.state.dropContainerKey===null&&this.state.dropTargetPos===null&&this.state.dropAllowed===!1&&this.state.dragOverNodeKey===null||this.resetDragState():u===this.state.dropPosition&&d===this.state.dropLevelOffset&&f===this.state.dropTargetKey&&p===this.state.dropContainerKey&&m===this.state.dropTargetPos&&h===this.state.dropAllowed&&g===this.state.dragOverNodeKey||this.setState({dropPosition:u,dropLevelOffset:d,dropTargetKey:f,dropContainerKey:p,dropTargetPos:m,dropAllowed:h,dragOverNodeKey:g}),s?.({event:e,node:ZR(t)}))};onNodeDragLeave=(e,t)=>{this.currentMouseOverDroppableNodeKey===t.eventKey&&!e.currentTarget.contains(e.relatedTarget)&&(this.resetDragState(),this.currentMouseOverDroppableNodeKey=null);let{onDragLeave:n}=this.props;n?.({event:e,node:ZR(t)})};onWindowDragEnd=e=>{this.onNodeDragEnd(e,null,!0),window.removeEventListener(`dragend`,this.onWindowDragEnd)};onNodeDragEnd=(e,t)=>{let{onDragEnd:n}=this.props;this.setState({dragOverNodeKey:null}),this.cleanDragState(),n?.({event:e,node:ZR(t)}),this.dragNodeProps=null,window.removeEventListener(`dragend`,this.onWindowDragEnd)};onNodeDrop=(e,t,n=!1)=>{let{dragChildrenKeys:r,dropPosition:i,dropTargetKey:a,dropTargetPos:o,dropAllowed:s}=this.state;if(!s)return;let{onDrop:c}=this.props;if(this.setState({dragOverNodeKey:null}),this.cleanDragState(),a===null)return;let l={...XR(a,this.getTreeNodeRequiredProps()),active:this.getActiveItem()?.key===a,data:BR(this.state.keyEntities,a).node};br(!r.includes(a),`Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.`);let u=BY(o),d={event:e,node:ZR(l),dragNode:this.dragNodeProps?ZR(this.dragNodeProps):null,dragNodesKeys:[this.dragNodeProps.eventKey].concat(r),dropToGap:i!==0,dropPosition:i+Number(u[u.length-1])};n||c?.(d),this.dragNodeProps=null};resetDragState(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}cleanDragState=()=>{let{draggingNodeKey:e}=this.state;e!==null&&this.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),this.dragStartMousePosition=null,this.currentMouseOverDroppableNodeKey=null};triggerExpandActionExpand=(e,t)=>{let{expandedKeys:n,flattenNodes:r}=this.state,{expanded:i,key:a,isLeaf:o}=t;if(o||e.shiftKey||e.metaKey||e.ctrlKey)return;let s=r.filter(e=>e.key===a)[0],c=ZR({...XR(a,this.getTreeNodeRequiredProps()),data:s.data});this.setExpandedKeys(i?RY(n,a):zY(n,a)),this.onNodeExpand(e,c)};onNodeClick=(e,t)=>{let{onClick:n,expandAction:r}=this.props;r===`click`&&this.triggerExpandActionExpand(e,t),n?.(e,t)};onNodeDoubleClick=(e,t)=>{let{onDoubleClick:n,expandAction:r}=this.props;r===`doubleClick`&&this.triggerExpandActionExpand(e,t),n?.(e,t)};onNodeSelect=(e,t)=>{let{selectedKeys:n}=this.state,{keyEntities:r,fieldNames:i}=this.state,{onSelect:a,multiple:o}=this.props,{selected:s}=t,c=t[i.key],l=!s;n=l?o?zY(n,c):[c]:RY(n,c);let u=n.map(e=>{let t=BR(r,e);return t?t.node:null}).filter(Boolean);this.setUncontrolledState({selectedKeys:n}),a?.(n,{event:`select`,selected:l,node:t,selectedNodes:u,nativeEvent:e.nativeEvent})};onNodeCheck=(e,t,n)=>{let{keyEntities:r,checkedKeys:i,halfCheckedKeys:a}=this.state,{checkStrictly:o,onCheck:s}=this.props,{key:c}=t,l,u={event:`check`,node:t,checked:n,nativeEvent:e.nativeEvent};if(o){let e=n?zY(i,c):RY(i,c);l={checked:e,halfChecked:RY(a,c)},u.checkedNodes=e.map(e=>BR(r,e)).filter(Boolean).map(e=>e.node),this.setUncontrolledState({checkedKeys:e})}else{let{checkedKeys:e,halfCheckedKeys:t}=nz([...i,c],!0,r);if(!n){let n=new Set(e);n.delete(c),{checkedKeys:e,halfCheckedKeys:t}=nz(Array.from(n),{checked:!1,halfCheckedKeys:t},r)}l=e,u.checkedNodes=[],u.checkedNodesPositions=[],u.halfCheckedKeys=t,e.forEach(e=>{let t=BR(r,e);if(!t)return;let{node:n,pos:i}=t;u.checkedNodes.push(n),u.checkedNodesPositions.push({node:n,pos:i})}),this.setUncontrolledState({checkedKeys:e},!1,{halfCheckedKeys:t})}s?.(l,u)};onNodeLoad=e=>{let{key:t}=e,{keyEntities:n}=this.state;if(BR(n,t)?.children?.length)return;let r=new Promise((n,r)=>{this.setState(({loadedKeys:i=[],loadingKeys:a=[]})=>{let{loadData:o,onLoad:s}=this.props;return!o||i.includes(t)||a.includes(t)?null:(o(e).then(()=>{let{loadedKeys:r}=this.state,i=zY(r,t);s?.(i,{event:`load`,node:e}),this.setUncontrolledState({loadedKeys:i}),this.setState(e=>({loadingKeys:RY(e.loadingKeys,t)})),n()}).catch(e=>{if(this.setState(e=>({loadingKeys:RY(e.loadingKeys,t)})),this.loadingRetryTimes[t]=(this.loadingRetryTimes[t]||0)+1,this.loadingRetryTimes[t]>=TX){let{loadedKeys:e}=this.state;br(!1,"Retry for `loadData` many times but still failed. No more retry."),this.setUncontrolledState({loadedKeys:zY(e,t)}),n()}r(e)}),{loadingKeys:zY(a,t)})})});return r.catch(()=>{}),r};onNodeMouseEnter=(e,t)=>{let{onMouseEnter:n}=this.props;n?.({event:e,node:t})};onNodeMouseLeave=(e,t)=>{let{onMouseLeave:n}=this.props;n?.({event:e,node:t})};onNodeContextMenu=(e,t)=>{let{onRightClick:n}=this.props;n&&(e.preventDefault(),n({event:e,node:t}))};onMouseDown=e=>{this.focusedByMouse=!0;let{onMouseDown:t}=this.props;t?.(e)};onMouseUp=e=>{this.focusedByMouse=!1;let{onMouseUp:t}=this.props;t?.(e)};onFocus=(...e)=>{let{onFocus:t,disabled:n}=this.props,{activeKey:r,selectedKeys:i,flattenNodes:a}=this.state;if(!this.focusedByMouse&&!n&&r===null){let e=i.find(e=>a.some(t=>t.key===e));e===void 0?this.onActiveChange(a?.[0]?.key||null):this.onActiveChange(e)}t?.(...e)};onBlur=(...e)=>{this.focusedByMouse=!1;let{onBlur:t}=this.props;this.onActiveChange(null),t?.(...e)};getTreeNodeRequiredProps=()=>{let{expandedKeys:e,selectedKeys:t,loadedKeys:n,loadingKeys:r,checkedKeys:i,halfCheckedKeys:a,dragOverNodeKey:o,dropPosition:s,keyEntities:c}=this.state;return{expandedKeys:e||[],selectedKeys:t||[],loadedKeys:n||[],loadingKeys:r||[],checkedKeys:i||[],halfCheckedKeys:a||[],dragOverNodeKey:o,dropPosition:s,keyEntities:c}};setExpandedKeys=e=>{let{treeData:t,fieldNames:n}=this.state,r=KR(t,e,n);this.setUncontrolledState({expandedKeys:e,flattenNodes:r},!0)};onNodeExpand=(e,t)=>{let{expandedKeys:n}=this.state,{listChanging:r,fieldNames:i}=this.state,{onExpand:a,loadData:o}=this.props,{expanded:s}=t,c=t[i.key];if(r)return;let l=n.includes(c),u=!s;if(br(s&&l||!s&&!l,`Expand state not sync with index check`),n=u?zY(n,c):RY(n,c),this.setExpandedKeys(n),a?.(n,{node:t,expanded:u,nativeEvent:e.nativeEvent}),u&&o){let e=this.onNodeLoad(t);e&&e.then(()=>{let e=KR(this.state.treeData,n,i);this.setUncontrolledState({flattenNodes:e})}).catch(()=>{let{expandedKeys:e}=this.state,t=RY(e,c);this.setExpandedKeys(t)})}};onListChangeStart=()=>{this.setUncontrolledState({listChanging:!0})};onListChangeEnd=()=>{setTimeout(()=>{this.setUncontrolledState({listChanging:!1})})};onActiveChange=e=>{let{activeKey:t}=this.state,{onActiveChange:n,itemScrollOffset:r=0}=this.props;t!==e&&(this.setState({activeKey:e}),e!==null&&this.scrollTo({key:e,offset:r}),n?.(e))};getActiveItem=()=>{let{activeKey:e,flattenNodes:t}=this.state;return e===null?null:t.find(({key:t})=>t===e)||null};offsetActiveKey=e=>{let{flattenNodes:t,activeKey:n}=this.state,r=t.findIndex(({key:e})=>e===n);r===-1&&e<0&&(r=t.length),r=(r+e+t.length)%t.length;let i=t[r];if(i){let{key:e}=i;this.onActiveChange(e)}else this.onActiveChange(null)};onKeyDown=e=>{let{activeKey:t,expandedKeys:n,checkedKeys:r,flattenNodes:i,keyEntities:a}=this.state,{onKeyDown:o,checkable:s,selectable:c,disabled:l,loadData:u}=this.props;if(l)return;switch(e.key){case`ArrowUp`:this.offsetActiveKey(-1),e.preventDefault();break;case`ArrowDown`:this.offsetActiveKey(1),e.preventDefault();break;case`Home`:this.onActiveChange(i?.[0]?.key),e.preventDefault();break;case`End`:this.onActiveChange(i?.[i.length-1]?.key),e.preventDefault();break}let d=this.getActiveItem();if(d&&d.data){let i=ZR({...XR(t,this.getTreeNodeRequiredProps()),data:d.data,active:!0}),o=!!BR(a,t)?.children?.length,l=!YR(d.data.isLeaf,u,o,i.loaded),f=s&&!i.disabled&&i.checkable!==!1&&!i.disableCheckbox,p=!s&&c&&!i.disabled&&i.selectable!==!1;switch(e.key){case`ArrowLeft`:l&&n.includes(t)?this.onNodeExpand({},i):d.parent&&this.onActiveChange(d.parent.key),e.preventDefault();break;case`ArrowRight`:l&&!n.includes(t)?this.onNodeExpand({},i):d.children&&d.children.length&&this.onActiveChange(d.children[0].key),e.preventDefault();break;case`Enter`:l?(e.preventDefault(),this.onNodeExpand({},i)):f?r.includes(t)||(e.preventDefault(),this.onNodeCheck({},i,!0)):p&&!i.selected&&(e.preventDefault(),this.onNodeSelect({},i));break;case` `:f?(e.preventDefault(),this.onNodeCheck({},i,!r.includes(t))):p&&(e.preventDefault(),this.onNodeSelect({},i));break}}o?.(e)};setUncontrolledState=(e,t=!1,n=null)=>{if(!this.destroyed){let r=!1,i=!0,a={};Object.keys(e).forEach(t=>{if(this.props.hasOwnProperty(t)){i=!1;return}r=!0,a[t]=e[t]}),r&&(!t||i)&&this.setState({...a,...n})}};scrollTo=e=>{this.listRef.current.scrollTo(e)};render(){let{flattenNodes:e,keyEntities:t,draggingNodeKey:n,dropLevelOffset:r,dropContainerKey:i,dropTargetKey:a,dropPosition:o,dragOverNodeKey:s,indent:c}=this.state,{prefixCls:l,className:u,style:d,styles:f,classNames:p,showLine:m,focusable:h,tabIndex:g=0,selectable:_,showIcon:v,icon:y,switcherIcon:b,draggable:x,checkable:C,checkStrictly:w,disabled:T,motion:E,loadData:D,filterTreeNode:O,height:k,itemHeight:A,scrollWidth:j,virtual:M,titleRender:N,dropIndicatorRender:P,onContextMenu:F,onScroll:I,direction:L,rootClassName:R,rootStyle:z}=this.props,B=Vu(this.props,{aria:!0,data:!0}),V;x&&(V=typeof x==`object`?x:typeof x==`function`?{nodeDraggable:x}:{});let H={styles:f,classNames:p,prefixCls:l,selectable:_,showIcon:v,icon:y,switcherIcon:b,draggable:V,draggingNodeKey:n,checkable:C,checkStrictly:w,disabled:T,keyEntities:t,dropLevelOffset:r,dropContainerKey:i,dropTargetKey:a,dropPosition:o,dragOverNodeKey:s,indent:c,direction:L,dropIndicatorRender:P,loadData:D,filterTreeNode:O,titleRender:N,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return S.createElement(AY.Provider,{value:H},S.createElement(`div`,{className:J(l,u,R,{[`${l}-show-line`]:m}),style:z},S.createElement(CX,wX({ref:this.listRef,prefixCls:l,style:d,data:e,disabled:T,selectable:_,checkable:!!C,motion:E,dragging:n!==null,height:k,itemHeight:A,virtual:M,focusable:h,tabIndex:g,activeItem:this.getActiveItem(),onFocus:this.onFocus,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:F,onScroll:I,scrollWidth:j},this.getTreeNodeRequiredProps(),B))))}},DX={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z`}}]},name:`file`,theme:`outlined`};function OX(){return OX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,OX({},e,{ref:t,icon:DX}))),AX={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z`}}]},name:`folder-open`,theme:`outlined`};function jX(){return jX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,jX({},e,{ref:t,icon:AX}))),NX={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z`}}]},name:`folder`,theme:`outlined`};function PX(){return PX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,PX({},e,{ref:t,icon:NX}))),IX={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z`}}]},name:`holder`,theme:`outlined`};function LX(){return LX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,LX({},e,{ref:t,icon:IX}))),zX=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:n,directoryNodeSelectedColor:r,motionDurationMid:i,borderRadius:a,controlItemBgHover:o})=>({[`${e}${e}-directory ${t}`]:{[`${e}-node-content-wrapper`]:{position:`static`,[`&:has(${e}-drop-indicator)`]:{position:`relative`},[`> *:not(${e}-drop-indicator)`]:{position:`relative`},"&:hover":{background:`transparent`},"&:before":{position:`absolute`,inset:0,transition:`background-color ${i}`,content:`""`,borderRadius:a},"&:hover:before":{background:o}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:n,borderRadius:a,[`${e}-switcher, ${e}-draggable-icon`]:{color:r},[`${e}-node-content-wrapper`]:{color:r,background:`transparent`,"&, &:hover":{color:r},"&:before, &:hover:before":{background:n}}}}}),BX=new Lo(`ant-tree-node-fx-do-not-use`,{"0%":{opacity:0},"100%":{opacity:1}}),VX=(e,t)=>({[`.${e}-switcher-icon`]:{display:`inline-block`,fontSize:10,verticalAlign:`baseline`,svg:{transition:`transform ${t.motionDurationSlow}`}}}),HX=(e,t)=>({[`.${e}-drop-indicator`]:{position:`absolute`,zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:`none`,"&:after":{position:`absolute`,top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:`transparent`,border:`${Y(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:`50%`,content:`""`}}}),UX=(e,t)=>{let{treeCls:n,treeNodeCls:r,treeNodePadding:i,titleHeight:a,indentSize:o,switcherSize:s,motionDurationMid:c,nodeSelectedBg:l,nodeHoverBg:u,colorTextQuaternary:d,controlItemBgActiveDisabled:f}=t;return{[n]:{...Jc(t),"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:`rtl`},[`&${n}-rtl ${n}-switcher_close ${n}-switcher-icon svg`]:{transform:`rotate(90deg)`},[`${n}-list`]:{"&:focus-visible":{outline:`none`,[`${r}-active ${n}-node-content-wrapper`]:{...Zc(t)}}},[`${n}-list-holder-inner`]:{alignItems:`flex-start`},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:`stretch`,[`${n}-node-content-wrapper`]:{flex:`auto`},[`${r}.dragging:after`]:{position:`absolute`,inset:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:BX,animationDuration:t.motionDurationSlow,animationPlayState:`running`,animationFillMode:`forwards`,content:`""`,pointerEvents:`none`,borderRadius:t.borderRadius}}},[r]:{display:`flex`,alignItems:`flex-start`,marginBottom:i,lineHeight:Y(a),position:`relative`,"&:before":{content:`""`,position:`absolute`,zIndex:1,insetInlineStart:0,width:`100%`,top:`100%`,height:i},[`&-disabled ${n}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:`not-allowed`,"&:hover":{background:`transparent`}},[`${n}-checkbox-disabled + ${n}-node-selected,&${r}-disabled${r}-selected ${n}-node-content-wrapper`]:{backgroundColor:f},[`${n}-checkbox-disabled`]:{pointerEvents:`unset`},[`&:not(${r}-disabled)`]:{[`${n}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${n}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${r}-disabled).filter-node ${n}-title`]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:`grab`,[`${n}-draggable-icon`]:{flexShrink:0,width:s,textAlign:`center`,visibility:`visible`,color:d},[`&${r}-disabled ${n}-draggable-icon`]:{visibility:`hidden`}}},[`${n}-indent`]:{alignSelf:`stretch`,whiteSpace:`nowrap`,userSelect:`none`,"&-unit":{display:`inline-block`,width:o}},[`${n}-draggable-icon`]:{visibility:`hidden`},[`${n}-switcher, ${n}-checkbox`]:{marginInlineEnd:t.calc(t.calc(s).sub(t.controlInteractiveSize)).div(2).equal()},[`${n}-checkbox`]:{flexShrink:0,alignSelf:`flex-start`,marginBlockStart:t.calc(t.calc(a).sub(t.controlInteractiveSize)).div(2).equal()},[`${n}-switcher`]:{...VX(e,t),position:`relative`,flex:`none`,alignSelf:`stretch`,width:s,textAlign:`center`,cursor:`pointer`,userSelect:`none`,transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:`unset`},"&:before":{pointerEvents:`none`,content:`""`,width:s,height:a,position:`absolute`,left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${n}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${n}-switcher-icon svg`]:{transform:`rotate(-90deg)`},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:`relative`,zIndex:1,display:`inline-block`,width:`100%`,height:`100%`,"&:before":{position:`absolute`,top:0,insetInlineEnd:t.calc(s).div(2).equal(),bottom:t.calc(i).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:`""`},"&:after":{position:`absolute`,width:t.calc(t.calc(s).div(2).equal()).mul(.8).equal(),height:t.calc(a).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:`""`}}},[`${n}-node-content-wrapper`]:{position:`relative`,minHeight:a,paddingBlock:0,paddingInline:t.paddingXS,background:`transparent`,borderRadius:t.borderRadius,cursor:`pointer`,transition:[`all ${c}`,`border 0s`,`line-height 0s`,`box-shadow 0s`].join(`, `),...HX(e,t),"&:hover":{backgroundColor:u},[`&${n}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:l},[`${n}-iconEle`]:{display:`inline-block`,width:s,height:a,textAlign:`center`,verticalAlign:`top`,"&:empty":{display:`none`}}},[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:`transparent`},[`${r}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${t.colorPrimary}`},"&-show-line":{[`${n}-indent-unit`]:{position:`relative`,height:`100%`,"&:before":{position:`absolute`,top:0,insetInlineEnd:t.calc(s).div(2).equal(),bottom:t.calc(i).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:`""`},"&-end:before":{display:`none`}},[`${n}-switcher`]:{background:`transparent`,"&-line-icon":{verticalAlign:`-0.15em`}}},[`${r}-leaf-last ${n}-switcher-leaf-line:before`]:{top:`auto !important`,bottom:`auto !important`,height:`${Y(t.calc(a).div(2).equal())} !important`}}}},WX=(e,t,n=!0)=>{let r=`.${e}`,i=gs(t,{treeCls:r,treeNodeCls:`${r}-treenode`,treeNodePadding:t.calc(t.paddingXS).div(2).equal()});return[UX(e,i),n&&zX(i)].filter(Boolean)},GX=e=>{let{controlHeightSM:t,controlItemBgHover:n,controlItemBgActive:r}=e,i=t;return{titleHeight:i,switcherSize:i,indentSize:i,nodeHoverBg:n,nodeHoverColor:e.colorText,nodeSelectedBg:r,nodeSelectedColor:e.colorText}},KX=rl(`Tree`,(e,{prefixCls:t})=>[{[e.componentCls]:iz(`${t}-checkbox`,e)},WX(t,e),bh(e)],e=>{let{colorTextLightSolid:t,colorPrimary:n}=e;return{...GX(e),directoryNodeSelectedColor:t,directoryNodeSelectedBg:n}}),qX=e=>{let{dropPosition:t,dropLevelOffset:n,prefixCls:r,indent:i,direction:a=`ltr`}=e,o=a===`ltr`?`left`:`right`,s=a===`ltr`?`right`:`left`,c={[o]:-n*i+4,[s]:0};switch(t){case-1:c.top=-3;break;case 1:c.bottom=-3;break;default:c.bottom=-3,c[o]=i+4;break}return S.createElement(`div`,{style:c,className:`${r}-drop-indicator`})},JX={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z`}}]},name:`caret-down`,theme:`filled`};function YX(){return YX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,YX({},e,{ref:t,icon:JX}))),ZX={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}},{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`minus-square`,theme:`outlined`};function QX(){return QX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,QX({},e,{ref:t,icon:ZX}))),eZ={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}},{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`plus-square`,theme:`outlined`};function tZ(){return tZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,tZ({},e,{ref:t,icon:eZ}))),rZ=e=>{let{prefixCls:t,switcherIcon:n,treeNodeProps:r,showLine:i,switcherLoadingIcon:a}=e,{isLeaf:o,expanded:s,loading:c}=r;if(c)return S.isValidElement(a)?a:S.createElement(xm,{className:`${t}-switcher-loading-icon`});let l;if(hd(i)&&(l=i.showLeafIcon),o){if(!i)return null;if(typeof l!=`boolean`&&l){let e=typeof l==`function`?l(r):l,n=`${t}-switcher-line-custom-icon`;return S.isValidElement(e)?Pp(e,{className:J(e.props?.className,n)}):e}return l?S.createElement(kX,{className:`${t}-switcher-line-icon`}):S.createElement(`span`,{className:`${t}-switcher-leaf-line`})}let u=`${t}-switcher-icon`,d=typeof n==`function`?n(r):n;return S.isValidElement(d)?Pp(d,{className:J(d.props?.className,i?`${t}-switcher-line-icon`:u)}):d===void 0?i?s?S.createElement($X,{className:`${t}-switcher-line-icon`}):S.createElement(nZ,{className:`${t}-switcher-line-icon`}):S.createElement(XX,{className:u}):d},iZ=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,className:i,style:a,classNames:o,styles:s}=li(`tree`),{virtual:c}=S.useContext(oi),{prefixCls:l,className:u,showIcon:d=!1,showLine:f,switcherIcon:p,switcherLoadingIcon:m,blockNode:h=!1,children:g,checkable:_=!1,selectable:v=!0,draggable:y,disabled:b,motion:x,style:C,rootClassName:w,classNames:T,styles:E,icon:D}=e,O=S.useContext(zp),k=b??O,A=n(`tree`,l),j=n(),M=x??{...Wm(j),motionAppear:!1},N={...e,showIcon:d,blockNode:h,checkable:_,selectable:v,disabled:k,motion:M},[P,F]=Fd([o,T],[s,E],{props:N}),I={...N,showLine:!!f,icon:D,dropIndicatorRender:qX},[L,R]=KX(A),[,z]=Kc(),B=z.paddingXS/2+(z.Tree?.titleHeight||z.controlHeightSM),V=S.useMemo(()=>{if(!y)return!1;let e={};switch(typeof y){case`function`:e.nodeDraggable=y;break;case`object`:e={...y};break;default:break}return e.icon!==!1&&(e.icon=e.icon||S.createElement(RX,null)),e},[y]),H=e=>S.createElement(rZ,{prefixCls:A,switcherIcon:p,switcherLoadingIcon:m,treeNodeProps:e,showLine:f});return S.createElement(EX,{itemHeight:B,ref:t,virtual:c,...I,prefixCls:A,className:J({[`${A}-icon-hide`]:!d,[`${A}-block-node`]:h,[`${A}-unselectable`]:!v,[`${A}-rtl`]:r===`rtl`,[`${A}-disabled`]:k},i,u,L,R),style:{...a,...C},rootClassName:J(P.root,w),rootStyle:F.root,classNames:P,styles:F,direction:r,checkable:_&&S.createElement(`span`,{className:`${A}-checkbox-inner`}),selectable:v,switcherIcon:H,draggable:V},g)}),aZ=0,oZ=1,sZ=2;function cZ(e,t,n){let{key:r,children:i}=n;function a(e){let a=e[r],o=e[i];t(a,e)!==!1&&cZ(o||[],t,n)}e.forEach(a)}function lZ({treeData:e,expandedKeys:t,startKey:n,endKey:r,fieldNames:i}){let a=[],o=aZ;if(n&&n===r)return[n];if(!n||!r)return[];function s(e){return e===n||e===r}return cZ(e,e=>{if(o===sZ)return!1;if(s(e)){if(a.push(e),o===aZ)o=oZ;else if(o===oZ)return o=sZ,!1}else o===oZ&&a.push(e);return t.includes(e)},WR(i)),a}function uZ(e,t,n){let r=Zr(t),i=[];return cZ(e,(e,t)=>{let n=r.indexOf(e);return n!==-1&&(i.push(t),r.splice(n,1)),!!r.length},WR(n)),i}function dZ(e){let{isLeaf:t,expanded:n}=e;return t?S.createElement(kX,null):n?S.createElement(MX,null):S.createElement(FX,null)}function fZ({treeData:e,children:t}){return e||GR(t)}var pZ=S.forwardRef((e,t)=>{let{defaultExpandAll:n,defaultExpandParent:r,defaultExpandedKeys:i,...a}=e,o=S.useRef(null),s=S.useRef(null),c=()=>{let{keyEntities:e}=JR(fZ(a),{fieldNames:a.fieldNames}),t,o=a.expandedKeys||i||[];return t=n?Object.keys(e):r?qY(o,e):o,t},[l,u]=S.useState(a.selectedKeys||a.defaultSelectedKeys||[]),[d,f]=S.useState(()=>c());S.useEffect(()=>{`selectedKeys`in a&&u(a.selectedKeys)},[a.selectedKeys]),S.useEffect(()=>{`expandedKeys`in a&&f(a.expandedKeys)},[a.expandedKeys]);let p=(e,t)=>(`expandedKeys`in a||f(e),a.onExpand?.(e,t)),m=(e,t)=>{let{multiple:n,fieldNames:r}=a,{node:i,nativeEvent:c}=t,{key:l=``}=i,f=fZ(a),p={...t,selected:!0},m=c?.ctrlKey||c?.metaKey,h=c?.shiftKey,g;n&&m?(g=e,o.current=l,s.current=g,p.selectedNodes=uZ(f,g,r)):n&&h?(g=Array.from(new Set([].concat(Zr(s.current||[]),Zr(lZ({treeData:f,expandedKeys:d,startKey:l,endKey:o.current,fieldNames:r}))))),p.selectedNodes=uZ(f,g,r)):(g=[l],o.current=l,s.current=g,p.selectedNodes=uZ(f,g,r)),a.onSelect?.(g,p),`selectedKeys`in a||u(g)},{getPrefixCls:h,direction:g}=S.useContext(oi),{prefixCls:_,className:v,showIcon:y=!0,expandAction:b=`click`,...x}=a,C=h(`tree`,_),w=J(`${C}-directory`,{[`${C}-directory-rtl`]:g===`rtl`},v);return S.createElement(iZ,{icon:dZ,ref:t,blockNode:!0,...x,showIcon:y,expandAction:b,prefixCls:C,className:w,expandedKeys:d,selectedKeys:l,onSelect:m,onExpand:p})}),mZ=iZ;mZ.DirectoryTree=pZ,mZ.TreeNode=LY;var hZ=e=>{let{value:t,filterSearch:n,tablePrefixCls:r,locale:i,onChange:a}=e;return n?S.createElement(`div`,{className:`${r}-filter-dropdown-search`},S.createElement(SB,{prefix:S.createElement(FC,null),placeholder:i.filterSearchPlaceholder,onChange:a,value:t,htmlSize:1,className:`${r}-filter-dropdown-search-input`})):null},gZ=e=>{let{keyCode:t}=e;t===om.ENTER&&e.stopPropagation()},_Z=S.forwardRef((e,t)=>S.createElement(`div`,{className:e.className,onClick:e=>e.stopPropagation(),onKeyDown:gZ,ref:t},e.children));function vZ(e){let t=[];return(e||[]).forEach(({value:e,children:n})=>{t.push(e),n&&(t=[].concat(Zr(t),Zr(vZ(n))))}),t}function yZ(e){return e.some(({children:e})=>e)}var bZ=(e,t)=>typeof t==`string`||pd(t)?t.toString().toLowerCase().includes(e):!1,xZ=e=>{let{filters:t,prefixCls:n,filteredKeys:r,filterMultiple:i,searchValue:a,normalizedSearchValue:o,filterSearch:s}=e;return t.map((e,t)=>{let c=String(e.value);if(e.children)return{key:c||t,label:e.text,popupClassName:`${n}-dropdown-submenu`,children:xZ({filters:e.children,prefixCls:n,filteredKeys:r,filterMultiple:i,searchValue:a,normalizedSearchValue:o,filterSearch:s})};let l=i?lz:tL,u={key:e.value===void 0?t:c,label:S.createElement(S.Fragment,null,S.createElement(l,{checked:r.includes(c)}),S.createElement(`span`,null,e.text))};return o?typeof s==`function`?s(o,e)?u:null:bZ(o,e.text)?u:null:u})};function SZ(e){return e||[]}var CZ=e=>{let{tablePrefixCls:t,prefixCls:n,column:r,dropdownPrefixCls:i,columnKey:a,filterOnClose:o,filterMultiple:s,filterMode:c=`menu`,filterSearch:l=!1,filterState:u,triggerFilter:d,locale:f,children:p,getPopupContainer:m,rootClassName:h}=e,{filterResetToDefaultFilteredValue:g,defaultFilteredValue:_,filterDropdownProps:v={},filterDropdownOpen:y,onFilterDropdownOpenChange:b}=r,[x,C]=S.useState(!1),w=S.useContext(vw),T=!!(u&&(u.filteredKeys?.length||u.forceFiltered)),E=e=>{C(e),v.onOpenChange?.(e),b?.(e)},D=v.open??y??x,O=u?.filteredKeys,[k,A]=Hd(SZ(O)),j=({selectedKeys:e})=>{A(e)},M=(e,{node:t,checked:n})=>{j(s?{selectedKeys:e}:{selectedKeys:n&&t.key?[t.key]:[]})};S.useEffect(()=>{x&&j({selectedKeys:SZ(O)})},[O]);let[N,P]=S.useState([]),F=e=>{P(e)},[I,L]=S.useState(``),R=S.useMemo(()=>I.trim().toLowerCase(),[I]),z=e=>{let{value:t}=e.target;L(t)};S.useEffect(()=>{x||L(``)},[x]);let B=e=>{let t=e?.length?e:null;if(t===null&&(!u||!u.filteredKeys)||Ti(t,u?.filteredKeys,!0))return null;d({column:r,key:a,filteredKeys:t})},V=()=>{E(!1),B(k())},H=({confirm:e,closeDropdown:t}={confirm:!1,closeDropdown:!1})=>{e&&B([]),t&&E(!1),L(``),A(g?(_||[]).map(String):[])},U=({closeDropdown:e}={closeDropdown:!0})=>{e&&E(!1),B(k())},W=(e,t)=>{t.source===`trigger`&&(e&&O!==void 0&&A(SZ(O)),E(e),!e&&!r.filterDropdown&&o&&V())},ee=J({[`${i}-menu-without-submenu`]:!yZ(r.filters||[])}),te=e=>{e.target.checked?A(vZ(r?.filters).map(String)):A([])},ne=({filters:e})=>(e||[]).map((e,t)=>{let n=String(e.value),r={title:e.text,key:e.value===void 0?String(t):n};return e.children&&(r.children=ne({filters:e.children})),r}),re=e=>({...e,text:e.title,value:e.key,children:e.children?.map(re)||[]}),ie,{direction:ae,renderEmpty:G}=S.useContext(oi);if(typeof r.filterDropdown==`function`)ie=r.filterDropdown({prefixCls:`${i}-custom`,setSelectedKeys:e=>j({selectedKeys:e}),selectedKeys:k(),confirm:U,clearFilters:H,filters:r.filters,visible:D,close:()=>{E(!1)}});else if(r.filterDropdown)ie=r.filterDropdown;else{let e=k()||[];ie=S.createElement(S.Fragment,null,(()=>{let a=G?.(`Table.filter`)??S.createElement(hC,{image:hC.PRESENTED_IMAGE_SIMPLE,description:f.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:`16px 0`}});if((r.filters||[]).length===0)return a;if(c===`tree`)return S.createElement(S.Fragment,null,S.createElement(hZ,{filterSearch:l,value:I,onChange:z,tablePrefixCls:t,locale:f}),S.createElement(`div`,{className:`${t}-filter-dropdown-tree`},s?S.createElement(lz,{checked:e.length===vZ(r.filters).length,indeterminate:e.length>0&&e.lengthtypeof l==`function`?l(I,re(e)):bZ(R,e.title):void 0})));let o=xZ({filters:r.filters||[],filterSearch:l,prefixCls:n,filteredKeys:k(),filterMultiple:s,searchValue:I,normalizedSearchValue:R}),u=o.every(e=>e===null);return S.createElement(S.Fragment,null,S.createElement(hZ,{filterSearch:l,value:I,onChange:z,tablePrefixCls:t,locale:f}),u?a:S.createElement(qE,{selectable:!0,multiple:s,prefixCls:`${i}-menu`,className:ee,onSelect:j,onDeselect:j,selectedKeys:e,getPopupContainer:m,openKeys:N,onOpenChange:F,items:o}))})(),S.createElement(`div`,{className:`${n}-dropdown-btns`},S.createElement(Zg,{type:`link`,size:`small`,disabled:g?Ti((_||[]).map(String),e,!0):e.length===0,onClick:()=>H()},f.filterReset),S.createElement(Zg,{type:`primary`,size:`small`,onClick:V},f.filterConfirm)))}r.filterDropdown&&(ie=S.createElement(IE,{selectable:void 0},ie)),ie=S.createElement(_Z,{className:`${n}-dropdown`},ie);let oe=(()=>{let e;return e=typeof r.filterIcon==`function`?r.filterIcon(T):r.filterIcon?r.filterIcon:S.createElement(lX,null),S.createElement(`span`,{role:`button`,tabIndex:-1,className:J(`${n}-trigger`,{active:T}),onClick:e=>{e.stopPropagation()}},e)})();if(w)return S.createElement(`div`,{className:`${n}-column`},S.createElement(`span`,{className:`${t}-column-title`},p),oe);let K=dd({trigger:[`click`],placement:ae===`rtl`?`bottomLeft`:`bottomRight`,children:oe,getPopupContainer:m},{...v,rootClassName:J(h,v.rootClassName),open:D,onOpenChange:W,popupRender:()=>typeof v?.dropdownRender==`function`?v.dropdownRender(ie):ie});return S.createElement(`div`,{className:`${n}-column`},S.createElement(`span`,{className:`${t}-column-title`},p),S.createElement(KV,{...K}))},wZ=(e,t,n)=>{let r=[];return(e||[]).forEach((e,i)=>{let a=iX(i,n),o=e.filterDropdown!==void 0;if(e.filters||o||`onFilter`in e)if(`filteredValue`in e){let t=e.filteredValue;o||(t=t?.map(String)??t),r.push({column:e,key:rX(e,a),filteredKeys:t,forceFiltered:e.filtered})}else r.push({column:e,key:rX(e,a),filteredKeys:t&&e.defaultFilteredValue?e.defaultFilteredValue:void 0,forceFiltered:e.filtered});`children`in e&&(r=[].concat(Zr(r),Zr(wZ(e.children,t,a))))}),r};function TZ(e,t,n,r,i,a,o,s,c){return n.map((n,l)=>{let u=iX(l,s),{filterOnClose:d=!0,filterMultiple:f=!0,filterMode:p,filterSearch:m}=n,h=n;if(h.filters||h.filterDropdown){let s=rX(h,u),l=r.find(({key:e})=>s===e);h={...h,title:r=>S.createElement(CZ,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:h,columnKey:s,filterState:l,filterOnClose:d,filterMultiple:f,filterMode:p,filterSearch:m,triggerFilter:a,locale:i,getPopupContainer:o,rootClassName:c},aX(n.title,r))}}return`children`in h&&(h={...h,children:TZ(e,t,h.children,r,i,a,o,u,c)}),h})}var EZ=e=>{let t={};return e.forEach(({key:e,filteredKeys:n,column:r})=>{let i=e,{filters:a,filterDropdown:o}=r;o?t[i]=n||null:Array.isArray(n)?t[i]=vZ(a).filter(e=>n.includes(String(e))):t[i]=null}),t},DZ=(e,t,n)=>t.reduce((e,r)=>{let{column:{onFilter:i,filters:a},filteredKeys:o}=r;if(i&&o&&o.length){let r=vZ(a),s=new Map;r.forEach(e=>{let t=String(e);s.has(t)||s.set(t,e)});let c=o.map(e=>{let t=String(e);return s.get(t)??e});return(e=>e.reduce((e,r)=>{let a={...r};return a[n]&&(a[n]=DZ(a[n],t,n)),c.some(e=>i(e,a))&&e.push(a),e},[]))(e)}return e},e),OZ=e=>e.flatMap(e=>`children`in e?[e].concat(Zr(OZ(e.children||[]))):[e]),kZ=e=>{let{prefixCls:t,dropdownPrefixCls:n,mergedColumns:r,onFilterChange:i,getPopupContainer:a,locale:o,rootClassName:s}=e;Dr(`Table`);let c=S.useMemo(()=>OZ(r||[]),[r]),[l,u]=S.useState(()=>wZ(c,!0)),d=S.useMemo(()=>{let e=wZ(c,!1);if(e.length===0)return e;let t=!0;if(e.forEach(({filteredKeys:e})=>{e!==void 0&&(t=!1)}),t){let e=(c||[]).map((e,t)=>rX(e,iX(t)));return l.filter(({key:t})=>e.includes(t)).map(t=>{let n=c[e.indexOf(t.key)];return{...t,column:{...t.column,...n},forceFiltered:n.filtered}})}return e},[c,l]),f=S.useMemo(()=>EZ(d),[d]),p=e=>{let t=d.filter(({key:t})=>t!==e.key);t.push(e),u(t),i(EZ(t),t)};return[e=>TZ(t,n,e,d,o,p,a,void 0,s),d,f]},AZ=(e,t,n)=>{let r=S.useRef({});function i(i){if(!r.current||r.current.data!==e||r.current.childrenColumnName!==t||r.current.getRowKey!==n){let i=new Map;function a(e){e.forEach((e,r)=>{let o=n(e,r);i.set(o,e),hd(e)&&t in e&&a(e[t]||[])})}a(e),r.current={data:e,childrenColumnName:t,kvMap:i,getRowKey:n}}return r.current.kvMap?.get(i)}return[i]};function jZ(e,t){let n={current:e.current,pageSize:e.pageSize},r=hd(t)?t:{};return Object.keys(r).forEach(t=>{let r=e[t];typeof r!=`function`&&(n[t]=r)}),n}function MZ(e,t,n){let{total:r=0,...i}=hd(n)?n:{},[a,o]=(0,S.useState)(()=>({current:`defaultCurrent`in i?i.defaultCurrent:1,pageSize:`defaultPageSize`in i?i.defaultPageSize:10})),s=dd(a,i,{total:r>0?r:e}),c=Math.ceil((r||e)/s.pageSize);s.current>c&&(s.current=c||1);let l=(e,t)=>{o({current:e??1,pageSize:t||s.pageSize})},u=(e,r)=>{n&&n.onChange?.(e,r),l(e,r),t(e,r||s?.pageSize)};return n===!1?[{},()=>{}]:[{...s,onChange:u},l]}var NZ={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z`}}]},name:`caret-down`,theme:`outlined`};function PZ(){return PZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,PZ({},e,{ref:t,icon:NZ}))),IZ={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z`}}]},name:`caret-up`,theme:`outlined`};function LZ(){return LZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,LZ({},e,{ref:t,icon:IZ}))),zZ=`ascend`,BZ=`descend`,VZ=e=>e.sorter&&typeof e.sorter==`object`&&pd(e.sorter.multiple)?e.sorter.multiple:!1,HZ=e=>typeof e==`function`?e:hd(e)&&e.compare?e.compare:!1,UZ=(e,t)=>t?e[e.indexOf(t)+1]:e[0],WZ=(e,t,n)=>{let r=[],i=(e,t)=>{r.push({column:e,key:rX(e,t),multiplePriority:VZ(e),sortOrder:e.sortOrder})};return(e||[]).forEach((e,a)=>{let o=iX(a,n);e.children?(`sortOrder`in e&&i(e,o),r=[].concat(Zr(r),Zr(WZ(e.children,t,o)))):e.sorter&&(`sortOrder`in e?i(e,o):t&&e.defaultSortOrder&&r.push({column:e,key:rX(e,o),multiplePriority:VZ(e),sortOrder:e.defaultSortOrder}))}),r},GZ=(e,t,n,r,i,a,o,s,c)=>(t||[]).map((t,l)=>{let u=iX(l,s),d=t;if(d.sorter){let s=d.sortDirections||i,l=d.showSorterTooltip===void 0?o:d.showSorterTooltip,f=rX(d,u),p=n.find(({key:e})=>e===f),m=p?p.sortOrder:null,h=UZ(s,m),g;if(t.sortIcon)g=t.sortIcon({sortOrder:m});else{let t=s.includes(zZ)&&S.createElement(RZ,{className:J(`${e}-column-sorter-up`,{active:m===zZ})}),n=s.includes(BZ)&&S.createElement(FZ,{className:J(`${e}-column-sorter-down`,{active:m===BZ})});g=S.createElement(`span`,{className:J(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(t&&n)})},S.createElement(`span`,{className:`${e}-column-sorter-inner`,"aria-hidden":`true`},t,n))}let{cancelSort:_,triggerAsc:v,triggerDesc:y}=a||{},b=_;h===BZ?b=y:h===zZ&&(b=v);let x=hd(l)?{title:b,...l}:{title:b};d={...d,className:J(d.className,{[`${e}-column-sort`]:m}),title:n=>{let r=`${e}-column-sorters`,i=S.createElement(`span`,{className:`${e}-column-title`},aX(t.title,n)),a=S.createElement(`div`,{className:r},i,g);return l?typeof l!=`boolean`&&l?.target===`sorter-icon`?S.createElement(`div`,{className:J(r,`${r}-tooltip-target-sorter`)},i,S.createElement(Aw,{...x},g)):S.createElement(Aw,{...x},a):a},onHeaderCell:n=>{let i=t.onHeaderCell?.(n)||{},a=i.onClick,o=i.onKeyDown;i.onClick=e=>{r({column:t,key:f,sortOrder:h,multiplePriority:VZ(t)}),a?.(e)},i.onKeyDown=e=>{e.keyCode===om.ENTER&&(r({column:t,key:f,sortOrder:h,multiplePriority:VZ(t)}),o?.(e))};let s=oX(t.title,{}),l=s?.toString();return m&&(i[`aria-sort`]=m===`ascend`?`ascending`:`descending`),i[`aria-description`]=c?.sortable,i[`aria-label`]=l||``,i.className=J(i.className,`${e}-column-has-sorters`),i.tabIndex=0,t.ellipsis&&(i.title=(s??``).toString()),i}}}return`children`in d&&(d={...d,children:GZ(e,d.children,n,r,i,a,o,u,c)}),d}),KZ=e=>{let{column:t,sortOrder:n}=e;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}},qZ=e=>{let t=e.filter(({sortOrder:e})=>e).map(KZ);return t.length===0&&e.length?{...KZ(e[e.length-1]),column:void 0,order:void 0,field:void 0,columnKey:void 0}:t.length<=1?t[0]||{}:t},JZ=(e,t,n)=>{let r=t.slice().sort((e,t)=>t.multiplePriority-e.multiplePriority),i=e.slice(),a=r.filter(({column:{sorter:e},sortOrder:t})=>HZ(e)&&t);return a.length?i.sort((e,t)=>{for(let n=0;n{let r=e[n];return r?{...e,[n]:JZ(r,t,n)}:e}):i},YZ=e=>{let{prefixCls:t,mergedColumns:n,sortDirections:r,tableLocale:i,showSorterTooltip:a,onSorterChange:o,globalLocale:s}=e,[c,l]=S.useState(()=>WZ(n,!0)),u=(e,t)=>{let n=[];return e.forEach((e,r)=>{let i=iX(r,t);if(n.push(rX(e,i)),Array.isArray(e.children)){let t=u(e.children,i);n.push.apply(n,Zr(t))}}),n},d=S.useMemo(()=>{let e=!0,t=WZ(n,!1);if(!t.length){let e=u(n);return c.filter(({key:t})=>e.includes(t))}let r=[];function i(t){e?r.push(t):r.push({...t,sortOrder:null})}let a=null;return t.forEach(t=>{a===null?(i(t),t.sortOrder&&(t.multiplePriority===!1?e=!1:a=!0)):(a&&t.multiplePriority!==!1||(e=!1),i(t))}),r},[n,c]),f=S.useMemo(()=>{let e=d.map(({column:e,sortOrder:t})=>({column:e,order:t}));return{sortColumns:e,sortColumn:e[0]?.column,sortOrder:e[0]?.order}},[d]),p=e=>{let t;t=e.multiplePriority===!1||!d.length||d[0].multiplePriority===!1?[e]:[].concat(Zr(d.filter(({key:t})=>t!==e.key)),[e]),l(t),o(qZ(t),t)};return[e=>GZ(t,e,d,p,r,i,a,void 0,s),d,f,()=>qZ(d)]},XZ=(e,t)=>e.map(e=>{let n={...e};return n.title=aX(e.title,t),`children`in n&&(n.children=XZ(n.children,t)),n}),ZZ=e=>[S.useCallback(t=>XZ(t,e),[e])],QZ=mY((e,t)=>{let{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),$Z=DY((e,t)=>{let{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),eQ=e=>{let{componentCls:t,lineWidth:n,lineType:r,tableBorderColor:i,tableHeaderBg:a,tablePaddingVertical:o,tablePaddingHorizontal:s,calc:c}=e,l=`${Y(n)} ${r} ${i}`,u=(e,r,i)=>({[`&${t}-${e}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"> table > tbody > tr > th, > table > tbody > tr > td":{[`> ${t}-expanded-row-fixed`]:{margin:`${Y(c(r).mul(-1).equal())} + }`)}});function QG(){return QG=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:t,prefixCls:n,classNames:r={},styles:i={},steps:a,strokeWidth:o,railWidth:s,gapDegree:c=0,gapPosition:l,railColor:u,strokeLinecap:d,style:f,className:p,strokeColor:m,percent:h,loading:g,..._}={...GG,...e},v=zf(t),y=`${v}-gradient`,b=50-o/2,x=Math.PI*2*b,C=c>0?90+c/2:-90,w=x*((360-c)/360),{count:T,gap:E}=typeof a==`object`?a:{count:a,gap:2},D=$G(h),O=$G(m),k=O.find(e=>e&&typeof e==`object`),A=k&&typeof k==`object`?`butt`:d,{indeterminateStyleProps:j,indeterminateStyleAnimation:M}=ZG({id:v,loading:g}),N=XG(x,w,0,100,C,c,l,u,A,o),P=KG(),F=()=>{let e=0;return D.map((t,a)=>{let s=O[a]||O[O.length-1],u=XG(x,w,e,t,C,c,l,s,A,o);return e+=t,S.createElement(YG,{key:a,color:s,ptg:t,radius:b,prefixCls:n,gradientId:y,className:r.track,style:{...u,...j,...i.track},strokeLinecap:A,strokeWidth:o,gapDegree:c,ref:e=>{P[a]=e},size:100})}).reverse()},I=()=>{let e=Math.round(T*(D[0]/100)),t=100/T,a=0;return Array(T).fill(null).map((s,d)=>{let f=d<=e-1?O[0]:u,p=f&&typeof f==`object`?`url(#${y})`:void 0,m=XG(x,w,a,t,C,c,l,f,`butt`,o,E);return a+=(w-m.strokeDashoffset+E)*100/w,S.createElement(`circle`,{key:d,className:J(`${n}-circle-path`,r.track),r:b,cx:50,cy:50,stroke:p,strokeWidth:o,opacity:1,style:{...m,...i.track},ref:e=>{P[d]=e}})})};return S.createElement(`svg`,QG({className:J(`${n}-circle`,r.root,p),viewBox:`0 0 100 100`,style:{...i.root,...f},id:t,role:`presentation`},_),!T&&S.createElement(`circle`,{className:J(`${n}-circle-rail`,r.rail),r:b,cx:50,cy:50,stroke:u,strokeLinecap:A,strokeWidth:s||o,style:{...N,...i.rail}}),T?I():F(),M)};function tK(e){return!e||e<0?0:e>100?100:e}function nK({success:e}){let t;return e&&`percent`in e&&(t=e.percent),t}var rK=({percent:e,success:t})=>{let n=tK(nK({success:t}));return[n,tK(tK(e)-n)]},iK=({success:e={},strokeColor:t})=>{let{strokeColor:n}=e;return[n||Zs.green,t||null]},aK=(e,t,n)=>{let r=-1,i=-1;if(t===`step`){let t=n.steps,a=n.strokeWidth;typeof e==`string`||e===void 0?(r=e===`small`?2:14,i=a??8):pd(e)?[r,i]=[e,e]:[r=14,i=8]=Array.isArray(e)?e:[e.width,e.height],r*=t}else if(t===`line`){let t=n?.strokeWidth;typeof e==`string`||e===void 0?i=t||(e===`small`?6:8):pd(e)?[r,i]=[e,e]:[r=-1,i=8]=Array.isArray(e)?e:[e.width,e.height]}else (t===`circle`||t===`dashboard`)&&(typeof e==`string`||e===void 0?[r,i]=e===`small`?[60,60]:[120,120]:pd(e)?[r,i]=[e,e]:Array.isArray(e)&&(r=e[0]??e[1]??120,i=e[0]??e[1]??120));return[r,i]},oK=3,sK=e=>oK/e*100,cK=[`root`,`body`,`indicator`],lK=e=>{let{prefixCls:t,classNames:n,styles:r,railColor:i,trailColor:a,strokeLinecap:o=`round`,gapPosition:s,gapPlacement:c,gapDegree:l,width:u=120,type:d,children:f,success:p,size:m=u,steps:h}=e,{direction:g}=li(`progress`),_=i??a,[v,y]=aK(m,`circle`),{strokeWidth:b}=e;b===void 0&&(b=Math.max(sK(v),6));let x={width:v,height:y,fontSize:v*.15+6},C=S.useMemo(()=>{if(l||l===0)return l;if(d===`dashboard`)return 75},[l,d]),w=rK(e),T=S.useMemo(()=>{let e=(c??s)||d===`dashboard`&&`bottom`||void 0,t=g===`rtl`;switch(e){case`start`:return t?`right`:`left`;case`end`:return t?`left`:`right`;default:return e}},[g,c,s,d]),E=Object.prototype.toString.call(e.strokeColor)===`[object Object]`,D=iK({success:p,strokeColor:e.strokeColor}),O=J(`${t}-body`,{[`${t}-circle-gradient`]:E},n.body),k=S.createElement(eK,{steps:h,percent:h?w[1]:w,strokeWidth:b,railWidth:b,strokeColor:h?D[1]:D,strokeLinecap:o,railColor:_,prefixCls:t,gapDegree:C,gapPosition:T,classNames:Sr(n,cK),styles:Sr(r,cK)}),A=v<=20,j=S.createElement(`div`,{className:O,style:{...x,...r.body}},k,!A&&f);return A?S.createElement(Ow,{title:f},j):j},uK=`--progress-line-stroke-color`,dK=e=>{let t=e?`100%`:`-100%`;return new Lo(`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}})},fK=e=>{let{componentCls:t,iconCls:n}=e;return{[t]:{...Jc(e),display:`inline-flex`,"&-rtl":{direction:`rtl`},[`${t}-indicator`]:{color:e.colorText,lineHeight:1,whiteSpace:`nowrap`,verticalAlign:`middle`,wordBreak:`normal`,[n]:{fontSize:e.fontSize}},[`&${t}-status-exception`]:{[`${t}-indicator`]:{color:e.colorError}},[`&${t}-status-success`]:{[`${t}-indicator`]:{color:e.colorSuccess}}}}},pK=e=>{let{componentCls:t}=e;return{[`${t}-line`]:{position:`relative`,width:`100%`,fontSize:e.fontSize,[`${t}-body`]:{display:`inline-flex`,alignItems:`center`,width:`100%`,gap:e.marginXS},[`${t}-rail`]:{flex:`auto`,background:e.remainingColor,borderRadius:e.lineBorderRadius,position:`relative`,width:`100%`,overflow:`hidden`},[`&${t}-status-active`]:{[`${t}-track:after`]:{content:`""`,position:`absolute`,inset:0,backgroundColor:e.colorBgContainer,borderRadius:`inherit`,opacity:0,animationName:dK(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:`infinite`}},[`${t}-track`]:{position:`absolute`,insetInlineStart:0,insetBlock:0,borderRadius:`inherit`,background:e.defaultColor,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,minWidth:`max-content`,display:`flex`,alignItems:`center`,"&-success":{background:e.colorSuccess}},[`&${t}-status-exception`]:{[`${t}-track`]:{background:e.colorError}},[`&${t}-status-success`]:{[`${t}-track`]:{background:e.colorSuccess}},[`${t}-indicator-outer`]:{[`&${t}-indicator-start`]:{order:-1}},[`${t}-body-layout-bottom`]:{flexDirection:`column`,alignItems:`center`,gap:e.marginXXS},[`${t}-indicator${t}-indicator-inner`]:{color:e.colorWhite,paddingInline:e.paddingXXS,width:`100%`,display:`flex`,justifyContent:`center`,[`&${t}-indicator-end`]:{justifyContent:`end`},[`&${t}-indicator-start`]:{justifyContent:`start`},[`&${t}-indicator-bright`]:{color:`rgba(0, 0, 0, 0.45)`}}}}},mK=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-circle`]:{[`${t}-circle-rail`]:{stroke:e.remainingColor},[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-body`]:{position:`relative`,lineHeight:1,backgroundColor:`transparent`},[`${t}-indicator`]:{position:`absolute`,insetBlockStart:`50%`,insetInlineStart:0,width:`100%`,margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:`normal`,textAlign:`center`,transform:`translateY(-50%)`,[n]:{fontSize:e.circleIconFontSize}},[`&${t}-status-exception`]:{[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}}},[`&${t}-status-success`]:{[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:`bottom`}}}},hK=e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:`inline-block`,"&-body":{display:`flex`,flexDirection:`row`,alignItems:`center`,gap:e.progressStepMarginInlineEnd,[`${t}-indicator`]:{marginInlineStart:e.marginXS}},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}},gK=e=>{let{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-indicator ${n}`]:{fontSize:e.fontSizeSM}}}},_K=rl(`Progress`,e=>{let t=e.calc(e.marginXXS).div(2).equal(),n=gs(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:`2.4s`});return[fK(n),pK(n),mK(n),hK(n),gK(n)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:`1em`,circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`})),vK=e=>{let t=[];return Object.keys(e).forEach(n=>{let r=Number.parseFloat(n.replace(/%/g,``));Number.isNaN(r)||t.push({key:r,value:e[n]})}),t=t.sort((e,t)=>e.key-t.key),t.map(({key:e,value:t})=>`${t} ${e}%`).join(`, `)},yK=(e,t)=>{let{from:n=Zs.blue,to:r=Zs.blue,direction:i=t===`rtl`?`to left`:`to right`,...a}=e;if(Object.keys(a).length!==0){let e=`linear-gradient(${i}, ${vK(a)})`;return{background:e,[uK]:e}}let o=`linear-gradient(${i}, ${n}, ${r})`;return{background:o,[uK]:o}},bK=e=>{let{prefixCls:t,classNames:n,styles:r,direction:i,percent:a,size:o,strokeWidth:s,strokeColor:c,strokeLinecap:l=`round`,children:u,railColor:d,trailColor:f,percentPosition:p,success:m}=e,{align:h,type:g}=p,_=d??f,v=l===`square`||l===`butt`?0:void 0,[y,b]=aK(o??[-1,s||(o===`small`?6:8)],`line`,{strokeWidth:s}),x={backgroundColor:_||void 0,borderRadius:v,height:b},C=`${t}-track`,w=c&&typeof c!=`string`?yK(c,i):{[uK]:c,background:c},T={width:`${tK(a)}%`,height:b,borderRadius:v,...w},E=nK(e),D={width:`${tK(E)}%`,height:b,borderRadius:v,backgroundColor:m?.strokeColor};return S.createElement(`div`,{className:J(`${t}-body`,n.body,{[`${t}-body-layout-bottom`]:h===`center`&&g===`outer`}),style:{width:y>0?y:`100%`,...r.body}},S.createElement(`div`,{className:J(`${t}-rail`,n.rail),style:{...x,...r.rail}},S.createElement(`div`,{className:J(C,n.track),style:{...T,...r.track}},g===`inner`&&u),E!==void 0&&S.createElement(`div`,{className:J(C,`${C}-success`,n.track),style:{...D,...r.track}})),g===`outer`&&u)},xK=e=>{let{classNames:t,styles:n,size:r,steps:i,rounding:a=Math.round,percent:o=0,strokeWidth:s=8,strokeColor:c,railColor:l,trailColor:u,prefixCls:d,children:f}=e,p=a(o/100*i),[m,h]=aK(r??[r===`small`?2:14,s],`step`,{steps:i,strokeWidth:s}),g=m/i,_=Array.from({length:i}),v=l??u;for(let e=0;e{let{prefixCls:n,className:r,rootClassName:i,classNames:a,styles:o,steps:s,strokeColor:c,percent:l=0,size:u=`medium`,showInfo:d=!0,type:f=`line`,status:p,format:m,style:h,percentPosition:g={},..._}=e,{align:v=`end`,type:y=`outer`}=g,b=Array.isArray(c)?c[0]:c,x=typeof c==`string`||Array.isArray(c)?c:void 0,C=S.useMemo(()=>b?new Rs(typeof b==`string`?b:Object.values(b)[0]).isLight():!1,[c]),w=S.useMemo(()=>{let t=nK(e);return Number.parseInt(t===void 0?(l??0)?.toString():(t??0)?.toString(),10)},[l,e.success]),T=S.useMemo(()=>!SK.includes(p)&&w>=100?`success`:p||`normal`,[p,w]),{getPrefixCls:E,direction:D,className:O,style:k,classNames:A,styles:j}=li(`progress`),M=E(`progress`,n),[N,P]=_K(M),F={...e,percent:l,type:f,size:u,showInfo:d,percentPosition:g},[I,L]=Fd([A,a],[j,o],{props:F}),R=f===`line`,z=R&&!s,B=S.useMemo(()=>{if(!d)return null;let t=nK(e),n,r=m||(e=>`${e}%`),i=R&&C&&y===`inner`;return y===`inner`||m||T!==`exception`&&T!==`success`?n=r(tK(l),tK(t)):T===`exception`?n=R?S.createElement(Fl,null):S.createElement(Rl,null):T===`success`&&(n=R?S.createElement(Ml,null):S.createElement(DC,null)),S.createElement(`span`,{className:J(`${M}-indicator`,{[`${M}-indicator-bright`]:i,[`${M}-indicator-${v}`]:z,[`${M}-indicator-${y}`]:z},I.indicator),style:L.indicator,title:typeof n==`string`?n:void 0},n)},[d,l,w,T,f,M,m,R,C,y,v,z,I.indicator,L.indicator]),V={...e,classNames:I,styles:L},H;f===`line`?H=s?S.createElement(xK,{...V,strokeColor:x,prefixCls:M,steps:hd(s)?s.count:s},B):S.createElement(bK,{...V,strokeColor:b,prefixCls:M,direction:D,percentPosition:{align:v,type:y}},B):(f===`circle`||f===`dashboard`)&&(H=S.createElement(lK,{...V,strokeColor:b,prefixCls:M,progressStatus:T},B));let U=J(M,`${M}-status-${T}`,{[`${M}-${f===`dashboard`&&`circle`||f}`]:f!==`line`,[`${M}-inline-circle`]:f===`circle`&&aK(u,`circle`)[0]<=20,[`${M}-line`]:z,[`${M}-line-align-${v}`]:z,[`${M}-line-position-${y}`]:z,[`${M}-steps`]:s,[`${M}-show-info`]:d,[`${M}-small`]:u===`small`,[`${M}-rtl`]:D===`rtl`},O,r,i,I.root,N,P);return S.createElement(`div`,{ref:t,style:{...k,...L.root,...h},className:U,role:`progressbar`,"aria-valuenow":w,"aria-valuemin":0,"aria-valuemax":100,...Sr(_,[`railColor`,`trailColor`,`strokeWidth`,`width`,`gapDegree`,`gapPosition`,`gapPlacement`,`strokeLinecap`,`success`])},H)}),wK={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z`}}]},name:`reload`,theme:`outlined`};function TK(){return TK=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,TK({},e,{ref:t,icon:wK}))),DK=fz,OK=e=>{let{value:t,formatter:n,precision:r,decimalSeparator:i,groupSeparator:a=``,prefixCls:o}=e,s;if(typeof n==`function`)s=n(t);else{let e=String(t),n=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(!n||e===`-`)s=e;else{let e=n[1],t=n[2]||`0`,c=n[4]||``;t=t.replace(/\B(?=(\d{3})+(?!\d))/g,a),pd(r)&&(c=c.padEnd(r,`0`).slice(0,r>0?r:0)),c&&=`${i}${c}`,s=[S.createElement(`span`,{key:`int`,className:`${o}-content-value-int`},e,t),c&&S.createElement(`span`,{key:`decimal`,className:`${o}-content-value-decimal`},c)]}}return S.createElement(`span`,{className:`${o}-content-value`},s)},kK=e=>{let{componentCls:t,marginXXS:n,padding:r,colorTextDescription:i,titleFontSize:a,colorTextHeading:o,contentFontSize:s,fontFamily:c}=e;return{[t]:{...Jc(e),[`${t}-header`]:{paddingBottom:n,[`${t}-title`]:{color:i,fontSize:a}},[`${t}-skeleton`]:{paddingTop:r},[`${t}-content`]:{color:o,fontSize:s,fontFamily:c,[`${t}-content-value`]:{display:`inline-block`,direction:`ltr`},[`${t}-content-prefix, ${t}-content-suffix`]:{display:`inline-block`},[`${t}-content-prefix`]:{marginInlineEnd:n},[`${t}-content-suffix`]:{marginInlineStart:n}}}}},AK=rl(`Statistic`,e=>kK(gs(e,{})),e=>{let{fontSizeHeading3:t,fontSize:n}=e;return{titleFontSize:n,contentFontSize:t}}),jK=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,valueStyle:o,value:s=0,title:c,valueRender:l,prefix:u,suffix:d,loading:f=!1,formatter:p,precision:m,decimalSeparator:h=`.`,groupSeparator:g=`,`,onMouseEnter:_,onMouseLeave:v,styles:y,classNames:b,...x}=e,{getPrefixCls:C,direction:w,className:T,style:E,classNames:D,styles:O}=li(`statistic`),k=C(`statistic`,n),[A,j]=AK(k),M={...e,decimalSeparator:h,groupSeparator:g,loading:f,value:s},[N,P]=Fd([D,b],[O,y],{props:M}),F=S.createElement(OK,{decimalSeparator:h,groupSeparator:g,prefixCls:k,formatter:p,precision:m,value:s}),I=J(k,{[`${k}-rtl`]:w===`rtl`},T,r,i,N.root,A,j),L=J(`${k}-header`,N.header),R=J(`${k}-title`,N.title),z=J(`${k}-content`,N.content),B=J(`${k}-content-prefix`,N.prefix),V=J(`${k}-content-suffix`,N.suffix),H=S.useRef(null);S.useImperativeHandle(t,()=>({nativeElement:H.current}));let U=Vu(x,{aria:!0,data:!0});return S.createElement(`div`,{...U,className:I,style:{...P.root,...E,...a},ref:H,onMouseEnter:_,onMouseLeave:v},c&&S.createElement(`div`,{className:L,style:P.header},S.createElement(`div`,{className:R,style:P.title},c)),S.createElement(Wy,{paragraph:!1,loading:f,className:`${k}-skeleton`,active:!0},S.createElement(`div`,{className:z,style:{...o,...P.content}},u&&S.createElement(`span`,{className:B,style:P.prefix},u),typeof l==`function`?l(F):F,d&&S.createElement(`span`,{className:V,style:P.suffix},d))))}),MK=[[`Y`,1e3*60*60*24*365],[`M`,1e3*60*60*24*30],[`D`,1e3*60*60*24],[`H`,1e3*60*60],[`m`,1e3*60],[`s`,1e3],[`S`,1]];function NK(e,t){let n=e,r=/\[[^\]]*]/g,i=(t.match(r)||[]).map(e=>e.slice(1,-1)),a=t.replace(r,`[]`),o=MK.reduce((e,[t,r])=>{if(e.includes(t)){let i=Math.floor(n/r);return n-=i*r,e.replace(RegExp(`${t}+`,`g`),e=>{let t=e.length;return i.toString().padStart(t,`0`)})}return e},a),s=0;return o.replace(r,()=>{let e=i[s];return s+=1,e})}function PK(e,t,n){let{format:r=``}=t,i=new Date(e).getTime(),a=Date.now();return NK(Math.max(n?i-a:a-i,0),r)}var FK=1e3/60;function IK(e){return new Date(e).getTime()}var LK=e=>{let{value:t,format:n=`HH:mm:ss`,onChange:r,onFinish:i,type:a,...o}=e,s=a===`countdown`,[c,l]=S.useState(null),u=In(()=>{let e=Date.now(),n=IK(t);l({});let a=s?n-e:e-n;return r?.(a),s&&n{let e,t=()=>{u()||window.clearInterval(e)},n=()=>{e=window.setInterval(t,FK)},r=()=>{window.clearInterval(e)};return n(),()=>{r()}},[t,s]),S.useEffect(()=>{l({})},[]);let d=(e,t)=>c?PK(e,{...t,format:n},s):`-`,f=e=>Pp(e,{title:void 0});return S.createElement(jK,{...o,value:t,valueRender:f,formatter:d})},RK=S.memo(e=>S.createElement(LK,{...e,type:`countdown`}));jK.Timer=LK,jK.Countdown=RK;var zK=jK;function BK(e){let{prefixCls:t,className:n,style:r,status:i}=e,a=`${t}-rail`;return S.createElement(`div`,{className:J(a,`${a}-${i}`,n),style:r})}var VK=S.createContext({}),HK=S.createContext(null);function UK(){return UK=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:n,style:r,children:i,...a}=e,{prefixCls:o,classNames:s,styles:c}=S.useContext(HK),{className:l,style:u}=S.useContext(WK),d=`${o}-item`;return S.createElement(`div`,UK({},Vu(a,!1),{ref:t,className:J(`${d}-icon`,s.itemIcon,l,n),style:{...c.itemIcon,...u,...r}}),i)});function KK(){return KK=Object.assign?Object.assign.bind():function(e){for(var t=1;t{g?.(e),f(c)},N.onKeyDown=e=>{let{which:t}=e;(t===om.ENTER||t===om.SPACE)&&f(c)});let P=w||`wait`,F=qK(_),I=qK(v),L=J(p,`${p}-${P}`,{[`${p}-custom`]:C,[`${p}-active`]:s,[`${p}-disabled`]:x===!0,[`${p}-empty-header`]:!F&&!I},T,n.item,D.root),R=S.createElement(GK,null);u&&(R=u(R,{...j,components:{Icon:GK}}));let z=S.createElement(`div`,{className:J(`${p}-wrapper`,n.itemWrapper,D.wrapper),style:{...r.itemWrapper,...O.wrapper}},S.createElement(WK.Provider,{value:{className:D.icon,style:O.icon}},R),S.createElement(`div`,{className:J(`${p}-section`,n.itemSection,D.section),style:{...r.itemSection,...O.section}},S.createElement(`div`,{className:J(`${p}-header`,n.itemHeader,D.header),style:{...r.itemHeader,...O.header}},F&&S.createElement(`div`,{className:J(`${p}-title`,n.itemTitle,D.title),style:{...r.itemTitle,...O.title}},_),I&&S.createElement(`div`,{title:typeof v==`string`?v:void 0,className:J(`${p}-subtitle`,n.itemSubtitle,D.subtitle),style:{...r.itemSubtitle,...O.subtitle}},v),!a&&S.createElement(BK,{prefixCls:p,className:J(n.itemRail,D.rail),style:{...r.itemRail,...O.rail},status:m?w:o})),qK(A)&&S.createElement(`div`,{className:J(`${p}-content`,n.itemContent,D.content),style:{...r.itemContent,...O.content}},A))),B=S.createElement(h,KK({},k,N,{className:L,style:{...r.item,...O.root,...E}}),d?d(z):z);return l&&(B=l(B,j)||null),B}function YK(){return YK=Object.assign?Object.assign.bind():function(e){for(var t=1;t(m||[]).filter(Boolean),[m]),T=S.useMemo(()=>w.map(({status:e},t)=>{let n=f+t;return e||(n===d?u:n{p&&d!==e&&p(e)},{root:D=`div`,item:O=`div`}=l||{},k=S.useMemo(()=>({prefixCls:t,classNames:i,styles:a,ItemComponent:O}),[t,i,a,O]),A=(e,n)=>{let r=f+n,o=T[n],s=T[n+1],c={...e,status:o};return S.createElement(JK,{key:r,prefixCls:t,classNames:i,styles:a,data:c,nextStatus:s,active:r===d,index:r,last:w.length-1===n,iconRender:h,itemRender:g,itemWrapperRender:_,onClick:p&&E})};return S.createElement(D,YK({className:C,style:{...n,...a?.root}},v),S.createElement(HK.Provider,{value:k},w.map(A)))}var QK=ZK,$K=S.createContext(null),eq=e=>{let{prefixCls:t}=e;return S.createElement(`svg`,{className:`${t}-panel-arrow`,viewBox:`0 0 100 100`,xmlns:`http://www.w3.org/2000/svg`,preserveAspectRatio:`none`},S.createElement(`title`,null,`Arrow`),S.createElement(`path`,{d:`M 0 0 L 100 50 L 0 100`}))},tq=e=>{let{prefixCls:t,rootPrefixCls:n,children:r,percent:i}=e,a=`${t}-item-progress-icon`,o=`${a}-circle`,[,s]=ol(n,`cmp-steps`),c=`calc(${s(`progress-radius`)} * 2 * ${Math.PI*i/100}) 9999`;return S.createElement(S.Fragment,null,S.createElement(`svg`,{className:`${a}-svg`,viewBox:`0 0 100 100`,width:`100%`,height:`100%`,xmlns:`http://www.w3.org/2000/svg`,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":i},S.createElement(`title`,null,`Progress`),S.createElement(`circle`,{className:J(o,`${o}-rail`)}),S.createElement(`circle`,{className:J(o,`${o}-ptg`),strokeDasharray:c,transform:`rotate(-90 50 50)`})),r)},nq=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-item`,[i,a]=ol(n,`cmp-steps`);return{[`${t}-horizontal`]:{[`> ${r}`]:{flex:`1 1 auto`,minWidth:e.iconSize,[`${r}-rail`]:{[i(`horizontal-rail-margin`)]:`calc(${a(`icon-size-max`)} / 2 + ${a(`item-wrapper-padding-top`)})`,position:`static`,marginTop:a(`horizontal-rail-margin`),width:`auto`,borderBlockStartWidth:a(`rail-size`),flex:1,minWidth:0,alignSelf:`flex-start`,transform:`translateY(-50%)`}}}}},rq=e=>{let{componentCls:t,customIconFontSize:n,motionDurationSlow:r,iconSize:i,lineWidth:a,lineType:o,antCls:s}=e,c=`${t}-item`,[l,u]=ol(s,`cmp-steps`);return{[t]:{[l(`icon-size`)]:i,[l(`icon-border-width`)]:a,[`${c}-icon`]:{width:u(`icon-size`),height:u(`icon-size`),margin:0,flex:`none`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:e.iconFontSize,fontFamily:e.fontFamily,lineHeight:u(`icon-size`),textAlign:`center`,borderRadius:u(`icon-size`),border:`${u(`icon-border-width`)} ${o} transparent`,transition:[`background-color`,`border`,`color`,`inset`,`transform`].map(e=>`${e} ${r}`).join(`, `),zIndex:1},[`${c}-custom ${c}-icon`]:{background:`none`,border:0,fontSize:n}}}},iq=e=>{let{componentCls:t,inlineDotSize:n,paddingXS:r,lineWidth:i,antCls:a,calc:o}=e,s=o(r).add(i).equal(),c=`${t}-item`,[l,u]=ol(a,`cmp-steps`);return{[`${t}-inline`]:{[l(`items-offset`)]:`0`,[l(`item-wrapper-padding-top`)]:s,display:`inline-flex`,"&:before":{content:`""`,flex:u(`items-offset`)},[c]:{[l(`title-vertical-row-gap`)]:r,[l(`icon-size`)]:n,[l(`icon-size-active`)]:n,[l(`title-font-size`)]:e.fontSizeSM,[l(`title-line-height`)]:e.lineHeightSM,[l(`item-title-color`)]:e.colorTextSecondary,[l(`subtitle-font-size`)]:e.fontSizeSM,[l(`subtitle-line-height`)]:e.lineHeightSM,[l(`item-subtitle-color`)]:e.colorTextQuaternary,[l(`rail-size`)]:e.lineWidth,[l(`title-horizontal-rail-gap`)]:`0px`,flex:1,"&-wrapper":{paddingInline:e.paddingXXS,marginInline:e.calc(e.marginXXS).div(2).equal(),borderRadius:e.borderRadiusSM,cursor:`pointer`,transition:`background-color ${e.motionDurationMid}`,"&:hover":{background:e.controlItemBgHover}},"&-icon":{[`${c}-icon-dot`]:{"&:after":{display:`none`}}},"&-title":{fontWeight:`normal`,whiteSpace:`nowrap`},"&-content":{display:`none`}}}}};function aq(e){return(e||`--ant-not-exist`).replace(/var\((.*)\)/,`$1`)}var oq=(e,t,n)=>{let{calc:r,componentCls:i,descriptionMaxWidth:a,antCls:o}=e,s=`${i}-item`,[,c]=ol(o,`cmp-steps`);return{[`@container style(${aq(a)})`]:[{[`${s}-icon`]:{marginInlineStart:r(a).sub(c(`icon-size`)).div(2).equal()},[`${s}-rail`]:{width:`auto`,insetInlineStart:r(a).add(c(`icon-size`)).div(2).add(t).equal(),insetInlineEnd:r(a).sub(c(`icon-size`)).div(2).sub(t).mul(-1).equal()}},n]}},sq=e=>{let{componentCls:t,descriptionMaxWidth:n,marginXS:r,fontHeightLG:i,margin:a,paddingSM:o,marginXXS:s,antCls:c,calc:l}=e,u=`${t}-item`,[d,f]=ol(c,`cmp-steps`);return{[t]:{[d(`icon-size-max`)]:`max(${f(`icon-size`)}, ${f(`icon-size-active`,f(`icon-size`))})`,[`${u}-icon`]:{marginBlockStart:`calc((${f(`heading-height`)} - ${f(`icon-size`)}) / 2)`}},[`${t}-title-horizontal`]:{[d(`title-horizontal-item-margin`)]:a,[d(`title-horizontal-rail-margin`)]:a,[d(`title-horizontal-title-height`)]:i,[d(`heading-height`)]:`max(${f(`icon-size`)}, ${f(`title-horizontal-title-height`)})`,[`&${t}-horizontal, &${t}-horizontal-alternate`]:{[`${u}:not(:first-child)`]:{marginInlineStart:f(`title-horizontal-item-margin`)},[`${u}:last-child`]:{flex:`0 1 auto`},[`${u}-wrapper`]:{columnGap:e.marginXS}},[`&${t}-vertical`]:{[`${u}-wrapper`]:{columnGap:e.margin},[`${u}-empty-header`]:{[`${u}-header`]:{minHeight:`auto`},[`${u}-content`]:{marginTop:l(f(`heading-height`)).sub(e.fontHeight).div(2).equal()}}},[`${u}-section`]:{flex:1,minWidth:0},[`${u}-header`]:{minHeight:f(`heading-height`)},[`${u}-title`]:{flex:`0 1 auto`},[`${u}-content`]:{maxWidth:n},[`${u}-subtitle`]:{flex:`0 9999 auto`},[`&${t}-horizontal ${u}-rail`]:{[d(`item-wrapper-padding-top`)]:`0px`,flex:`1 1 0%`,marginInlineStart:f(`title-horizontal-rail-margin`)}},[`${t}-title-vertical`]:{[d(`title-vertical-row-gap`)]:o,[d(`title-horizontal-rail-gap`)]:s,[d(`heading-height`)]:f(`icon-size-max`),[`> ${u}`]:{flex:`1 1 0%`,[`${u}-wrapper`]:{flexDirection:`column`,rowGap:f(`title-vertical-row-gap`),alignItems:`center`},[`${u}-section`]:{alignSelf:`stretch`},[`${u}-header`]:{flexDirection:`column`,alignItems:`center`},[`${u}-title, ${u}-subtitle, ${u}-content`]:{textAlign:`center`,maxWidth:`100%`},[`${u}-subtitle`]:{margin:0},[`${u}-rail`]:{position:`absolute`,top:0,width:`calc(100% - ${f(`icon-size`)} - ${f(`title-horizontal-rail-gap`)} * 2)`,insetInlineStart:`calc(50% + ${f(`icon-size`)} / 2 + ${f(`title-horizontal-rail-gap`)})`}},...oq(e,r,{[`${u}:last-child`]:{flex:`none`},[`${u}-icon`]:{alignSelf:`flex-start`},[`${u}-section`]:{width:n}})}}},cq=e=>{let{componentCls:t,fontSizeIcon:n,navContentMaxWidth:r,navArrowColor:i,colorPrimary:a,motionDurationSlow:o,antCls:s,calc:c}=e,l=`${t}-item`,u=a,[d,f]=ol(s,`cmp-steps`);return{[`${t}${t}-navigation`]:{[l.repeat(4)]:{display:`flex`,justifyContent:`center`,position:`relative`,flex:1,marginInlineStart:0,[`${l}-wrapper`]:{paddingBlock:e.paddingSM},[`${l}-section`]:{maxWidth:r},[`${l}-rail`]:{display:`none`},"&:before":{position:`absolute`,display:`block`,backgroundColor:u,transition:`all ${o}`,transitionTimingFunction:`ease-out`,content:`""`},"&:not(:last-child):after":{position:`absolute`,display:`block`,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${i}`,borderBottom:`none`,borderInlineStart:`none`,borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${i}`,content:`""`},[`&${l}-active`]:{[d(`item-content-active-color`)]:f(`item-content-color`),[d(`item-icon-active-bg-color`)]:f(`item-icon-bg-color`),[d(`item-icon-active-border-color`)]:f(`item-icon-border-color`),[d(`item-icon-active-text-color`)]:f(`item-icon-text-color`)}},[`&${t}-horizontal`]:{[l]:{"&:before":{bottom:0,insetInlineStart:`50%`,width:0,height:e.lineWidthBold},[`&${l}-active:before`]:{insetInlineStart:0,width:`100%`},"&:not(:last-child):after":{top:`50%`,insetInlineStart:c(n).div(2).mul(-1).add(`100%`).equal(),width:n,height:n,transform:`translateY(-50%) rotate(45deg)`}}},[`&${t}-vertical`]:{[l.repeat(4)]:{[`${l}-content`]:{padding:0},"&:before":{insetInlineEnd:0,top:`50%`,width:e.lineWidthBold,height:0},[`&${l}-active::before`]:{top:0,height:`100%`},"&:not(:last-child):after":{left:{_skip_check_:!0,value:`50%`},top:`100%`,width:c(n).div(3).mul(2).equal(),height:c(n).div(3).mul(2).equal(),transform:`translateY(-50%) translateX(-50%) rotate(135deg)`}}}}}},lq=e=>{let{componentCls:t,lineWidthBold:n,borderRadius:r,borderRadiusSM:i,motionDurationMid:a,paddingXS:o,lineType:s,paddingSM:c,antCls:l,calc:u}=e,d=`${t}-item`,[f,p]=ol(l,`cmp-steps`),m=`${Y(n)} ${s} ${p(`panel-border-color`)}`;return{[`${t}${t}-panel`]:[{[`${d}-rail`]:{display:`none`},[`&${t}-horizontal`]:{alignItems:`stretch`,[d]:{flex:1,margin:0}}},{"&":{[f(`panel-padding`)]:c,[f(`item-border-radius`)]:r,[d]:{[f(`panel-bg-color`)]:p(`item-icon-bg-color`),[f(`panel-border-color`)]:p(`item-icon-border-color`),[f(`panel-active-bg-color`)]:p(`item-icon-active-bg-color`),[f(`panel-active-border-color`)]:p(`item-icon-active-border-color`),[f(`panel-title-height`)]:`calc(${p(`title-font-size`)} * ${p(`title-line-height`)})`,[f(`item-base-height`)]:u(p(`panel-padding`)).mul(2).add(p(`icon-size`)).add(p(`panel-title-height`)).equal(),[f(`item-base-width`)]:`calc(${p(`item-base-height`)} * 0.7071)`,transition:`background-color ${a}`}},[`${d}-icon`]:{display:`none`},[`${d}-header`]:{minHeight:`auto`},[`${t}-panel-arrow`]:{position:`absolute`,top:u(n).mul(-1).equal(),insetInlineStart:`100%`,zIndex:1,height:u(n).mul(2).add(`100%`).equal(),width:p(`item-base-width`),overflow:`visible`,strokeLinecap:`round`,path:{fill:p(`panel-bg-color`),stroke:p(`panel-border-color`),strokeWidth:n,vectorEffect:`non-scaling-stroke`,transition:`fill ${a}`}},[`${d}:last-child ${t}-panel-arrow`]:{display:`none`},[d]:{padding:p(`panel-padding`),background:p(`panel-bg-color`),position:`relative`,borderBlock:m,"&:not(:first-child)":{paddingInlineStart:`calc(${p(`panel-padding`)} + ${p(`item-base-width`)})`},"&:first-child":{borderInlineStart:m,borderStartStartRadius:p(`item-border-radius`),borderEndStartRadius:p(`item-border-radius`)},"&:last-child":{borderInlineEnd:m,borderStartEndRadius:p(`item-border-radius`),borderEndEndRadius:p(`item-border-radius`)},"&-active":{background:p(`panel-active-bg-color`),borderColor:p(`panel-active-border-color`),[`${t}-panel-arrow`]:{path:{fill:p(`panel-active-bg-color`),stroke:p(`panel-active-border-color`)}},[`${d}-title, ${d}-subtitle, ${d}-content`]:{color:p(`item-icon-active-text-color`)}}}},{[`&${t}-small`]:{[f(`panel-padding`)]:o,[f(`item-border-radius`)]:i}},{[`&${t}-filled`]:{[d]:{"&:not(:first-child)":{clipPath:`polygon(${[`${Y(n)} 0`,`calc(100% + ${p(`item-base-width`)}) 0`,`calc(100% + ${p(`item-base-width`)}) 100%`,`${Y(n)} 100%`,`calc(${p(`item-base-width`)} + ${Y(n)}) 50%`].join(`,`)})`}}}},{[`&${t}-outlined`]:{[`${t}-panel-arrow`]:{top:u(n).div(2).mul(-1).equal(),height:u(n).add(`100%`).equal()}}}]}},uq=e=>{let{calc:t,antCls:n,componentCls:r,lineWidthBold:i,motionDurationSlow:a}=e,o=`${r}-item`,[s,c]=ol(n,`cmp-steps`),l=t(i).add(i).equal();return{[`${r}${r}-with-progress`]:{[s(`item-wrapper-padding-top`)]:l,[`${o}${o}-process`]:{[`${o}-icon`]:{position:`relative`}},[`${o}-progress-icon`]:{"&-svg":{[s(`svg-size`)]:t(l).mul(2).add(c(`icon-size`)).equal(),[s(`icon-size-ptg-unitless`)]:`calc(100 / tan(atan2(${c(`svg-size`)}, 1px)))`,fontSize:c(`svg-size`),lineHeight:c(`icon-size-ptg-unitless`),position:`absolute`,inset:t(l).mul(-1).equal(),width:`auto`,height:`auto`},"&-circle":{lineHeight:c(`icon-size-ptg-unitless`),strokeWidth:t(c(`icon-size-ptg-unitless`)).mul(i).equal(),[s(`progress-radius`)]:t(c(`svg-size`)).sub(i).mul(c(`icon-size-ptg-unitless`)).div(2).equal(),r:c(`progress-radius`),fill:`none`,cx:50,cy:50,transition:`all ${a} ease-in-out`,"&-rail":{stroke:e.colorSplit},"&-ptg":{stroke:e.colorPrimary}}}}}},dq=e=>{let{componentCls:t,iconSize:n,dotSize:r,dotCurrentSize:i,marginXXS:a,lineWidthBold:o,fontSizeSM:s,antCls:c}=e,l=`${t}-item`,[u,d]=ol(c,`cmp-steps`);return{[`${t}${t}-dot`]:{[u(`icon-size-active`)]:i,[u(`icon-size`)]:r,[u(`dot-icon-size`)]:r,[u(`dot-icon-border-width`)]:o,[u(`rail-size`)]:o,[u(`icon-border-width`)]:o,[`${l}-custom ${l}-icon`]:{fontSize:s},[`${l}-icon`]:{position:`relative`,"&:after":{content:`""`,width:n,height:n,display:`block`,position:`absolute`,top:`50%`,left:{_skip_check_:!0,value:`50%`},transform:`translate(-50%, -50%)`}},[`${l}-active ${l}-icon`]:{[u(`icon-size`)]:d(`icon-size-active`)},[`&${t}-horizontal`]:{[`&, &${t}-small`]:oq(e,a)}}}},fq=e=>{let{componentCls:t,lineWidthBold:n,antCls:r}=e,i=`${t}-item`,[,a]=ol(r,`cmp-steps`);return{[`${t}${t}-rtl`]:{direction:`rtl`,[`&${t}-navigation${t}-horizontal`]:{[`${i}:after`]:{transform:`translateY(-50%) rotate(-45deg)`}},[`&${t}-panel`]:{[`${t}-panel-arrow`]:{transform:`scaleX(-1)`},[`&${t}-filled`]:{[i]:{"&:not(:first-child)":{clipPath:`polygon(${[`calc(0px - ${a(`item-base-width`)}) 0px`,`calc(100% - ${Y(n)}) 0px`,`calc(100% - ${a(`item-base-width`)} - ${Y(n)}) 50%`,`calc(100% - ${Y(n)}) 100%`,`calc(0px - ${a(`item-base-width`)}) 100%`].join(`,`)})`}}}}}}},pq=e=>{let{componentCls:t,iconSizeSM:n,fontSize:r,lineHeight:i,marginXS:a,fontHeight:o,marginSM:s,paddingXS:c,antCls:l}=e,[u]=ol(l,`cmp-steps`);return{[`${t}${t}-small`]:{[u(`icon-size`)]:n,[u(`title-horizontal-item-margin`)]:s,[u(`title-vertical-row-gap`)]:c,[u(`title-font-size`)]:r,[u(`title-line-height`)]:i,[u(`title-horizontal-rail-margin`)]:a,[u(`title-horizontal-title-height`)]:o,[`&${t}-horizontal${t}-title-vertical`]:oq(e,a)}}},mq=`wait`,hq=`process`,gq=`finish`,_q=`error`,vq=e=>{let{componentCls:t,colorTextDisabled:n,colorTextLightSolid:r,colorPrimary:i,colorTextLabel:a,colorError:o,colorErrorHover:s,colorErrorBgFilledHover:c,colorFillTertiary:l,colorErrorBg:u,colorPrimaryBgHover:d,colorPrimaryBg:f,colorText:p,colorTextDescription:m,colorBgContainer:h,colorPrimaryHover:g,lineType:_,antCls:v}=e,y=`${t}-item`,[b,x]=ol(v,`cmp-steps`);return{[t]:[{[y]:{[b(`item-solid-line-color`)]:`#000`,[b(`item-title-color`)]:`#000`,[b(`item-content-color`)]:`#000`,[b(`item-subtitle-color`)]:x(`item-content-color`),[b(`item-icon-custom-color`)]:`#000`,[b(`item-icon-bg-color`)]:`#000`,[b(`item-icon-border-color`)]:`#000`,[b(`item-icon-text-color`)]:`#fff`,[b(`item-icon-dot-color`)]:`#000`,[b(`item-icon-dot-bg-color`)]:x(`item-icon-dot-color`),[b(`item-icon-dot-border-color`)]:x(`item-icon-dot-color`),[b(`item-text-hover-color`)]:`#000`,[b(`item-icon-bg-hover-color`)]:x(`item-icon-bg-color`),[b(`item-icon-border-hover-color`)]:x(`item-icon-border-color`),[b(`item-icon-text-hover-color`)]:x(`item-icon-text-color`),[b(`item-content-active-color`)]:x(`item-content-color`),[b(`item-icon-active-bg-color`)]:x(`item-icon-bg-color`),[b(`item-icon-active-border-color`)]:x(`item-icon-border-color`),[b(`item-icon-active-text-color`)]:x(`item-icon-text-color`),[b(`item-process-rail-line-style`)]:_},[`${y}-rail`]:{borderColor:x(`item-solid-line-color`)},[`${y}-custom ${y}-icon`]:{color:x(`item-icon-custom-color`)},[`${y}-title`]:{color:x(`item-title-color`)},[`${y}-subtitle`]:{color:x(`item-subtitle-color`)},[`${y}-content`]:{color:x(`item-content-color`)},[`${y}-active ${y}-icon`]:{},[`${y}-active ${y}-content`]:{color:x(`item-content-active-color`)},[`${y}[role='button']:not(${y}-active):hover`]:{[`${y}-title, ${y}-content`]:{color:x(`item-text-hover-color`)}},[`&:not(${t}-dot)`]:{[`${y}:not(${y}-custom)`]:{[`${y}-icon`]:{background:x(`item-icon-bg-color`),borderColor:x(`item-icon-border-color`),color:x(`item-icon-text-color`)},[`&[role='button']:not(${y}-active):hover`]:{[`${y}-icon`]:{background:x(`item-icon-bg-hover-color`),borderColor:x(`item-icon-border-hover-color`),color:x(`item-icon-text-hover-color`)}},[`&${y}-active`]:{[`${y}-icon`]:{background:x(`item-icon-active-bg-color`),borderColor:x(`item-icon-active-border-color`),color:x(`item-icon-active-text-color`)}}}},[`&${t}-dot`]:{[`${y}-icon`]:{background:x(`item-icon-dot-bg-color`),borderColor:x(`item-icon-dot-border-color`),color:x(`item-icon-dot-color`),[`&${y}-icon-dot-custom`]:{background:`transparent`,border:`none`}}}},{[`${y}-${mq}`]:{[b(`item-icon-custom-color`)]:n,[b(`item-title-color`)]:m,[b(`item-content-color`)]:m,[b(`item-content-active-color`)]:p,[b(`item-text-hover-color`)]:g},[`${y}-rail-${mq}`]:{[b(`item-solid-line-color`)]:n},[`${y}-${hq}`]:{[b(`item-icon-custom-color`)]:i,[b(`item-title-color`)]:p,[b(`item-content-color`)]:m,[b(`item-content-active-color`)]:p,[b(`item-text-hover-color`)]:g},[`${y}-rail-${hq}`]:{[b(`item-solid-line-color`)]:i,[b(`rail-line-style`)]:x(`item-process-rail-line-style`)},[`${y}-${gq}`]:{[b(`item-icon-custom-color`)]:i,[b(`item-title-color`)]:p,[b(`item-content-color`)]:m,[b(`item-content-active-color`)]:p,[b(`item-text-hover-color`)]:g},[`${y}-rail-${gq}`]:{[b(`item-solid-line-color`)]:i},[`${y}-${_q}`]:{[b(`item-icon-custom-color`)]:o,[b(`item-title-color`)]:o,[b(`item-content-color`)]:o,[b(`item-content-active-color`)]:o,[b(`item-text-hover-color`)]:s},[`${y}-rail-${_q}`]:{[b(`item-solid-line-color`)]:o}},{[`&${t}-filled`]:{[y]:{[b(`item-icon-dot-border-color`)]:`transparent`},[`${y}-${mq}`]:{[b(`item-icon-bg-color`)]:l,[b(`item-icon-border-color`)]:`transparent`,[b(`item-icon-text-color`)]:a,[b(`item-icon-dot-bg-color`)]:n,[b(`item-icon-bg-hover-color`)]:d,[b(`item-icon-border-hover-color`)]:`transparent`,[b(`item-icon-text-hover-color`)]:i,[b(`item-icon-active-bg-color`)]:i,[b(`item-icon-active-border-color`)]:`transparent`,[b(`item-icon-active-text-color`)]:r},[`${y}-${hq}, ${y}-${gq}`]:{[b(`item-icon-bg-color`)]:f,[b(`item-icon-border-color`)]:`transparent`,[b(`item-icon-text-color`)]:i,[b(`item-icon-dot-bg-color`)]:i,[b(`item-icon-bg-hover-color`)]:d,[b(`item-icon-border-hover-color`)]:`transparent`,[b(`item-icon-text-hover-color`)]:i,[b(`item-icon-active-bg-color`)]:i,[b(`item-icon-active-border-color`)]:`transparent`,[b(`item-icon-active-text-color`)]:r},[`${y}-${_q}`]:{[b(`item-icon-bg-color`)]:u,[b(`item-icon-border-color`)]:`transparent`,[b(`item-icon-text-color`)]:o,[b(`item-icon-dot-bg-color`)]:o,[b(`item-icon-bg-hover-color`)]:c,[b(`item-icon-border-hover-color`)]:`transparent`,[b(`item-icon-text-hover-color`)]:o,[b(`item-icon-active-bg-color`)]:o,[b(`item-icon-active-border-color`)]:`transparent`,[b(`item-icon-active-text-color`)]:r}}},{[`&${t}-outlined`]:{[y]:{[b(`item-icon-dot-bg-color`)]:`transparent`},[`${y}-${mq}`]:{[b(`item-icon-bg-color`)]:h,[b(`item-icon-border-color`)]:n,[b(`item-icon-text-color`)]:n,[b(`item-icon-dot-color`)]:n,[b(`item-icon-bg-hover-color`)]:`transparent`,[b(`item-icon-border-hover-color`)]:g,[b(`item-icon-text-hover-color`)]:g,[b(`item-icon-active-bg-color`)]:l},[`${y}-${hq}, ${y}-${gq}`]:{[b(`item-icon-bg-color`)]:h,[b(`item-icon-border-color`)]:i,[b(`item-icon-text-color`)]:i,[b(`item-icon-dot-color`)]:i,[b(`item-icon-bg-hover-color`)]:`transparent`,[b(`item-icon-border-hover-color`)]:g,[b(`item-icon-text-hover-color`)]:g,[b(`item-icon-active-bg-color`)]:f},[`${y}-${_q}`]:{[b(`item-icon-bg-color`)]:h,[b(`item-icon-border-color`)]:o,[b(`item-icon-text-color`)]:o,[b(`item-icon-dot-color`)]:o,[b(`item-icon-bg-hover-color`)]:`transparent`,[b(`item-icon-border-hover-color`)]:s,[b(`item-icon-text-hover-color`)]:s,[b(`item-icon-active-bg-color`)]:u}}}]}},yq=e=>{let{componentCls:t,marginXXS:n,paddingSM:r,controlHeight:i,antCls:a,calc:o}=e,s=`${t}-item`,[c,l]=ol(a,`cmp-steps`);return{[`${t}-vertical`]:{[c(`vertical-rail-margin`)]:o(n).mul(1.5).equal(),flexDirection:`column`,alignItems:`stretch`,[`> ${s}`]:{minHeight:o(i).mul(1.5).equal(),paddingBottom:r,"&:last-child":{paddingBottom:0},[`${s}-icon`]:{marginInlineStart:`calc((${l(`icon-size-max`)} - ${l(`icon-size`)}) / 2)`},[`${s}-rail`]:{[c(`rail-offset`)]:o(l(`heading-height`)).sub(l(`icon-size`)).div(2).equal(),borderInlineStartWidth:l(`rail-size`),position:`absolute`,top:o(l(`icon-size`)).add(l(`item-wrapper-padding-top`)).add(l(`rail-offset`)).add(l(`vertical-rail-margin`)).equal(),insetInlineStart:o(l(`icon-size-max`)).div(2).equal(),bottom:o(l(`vertical-rail-margin`)).sub(l(`rail-offset`)).equal(),marginInlineStart:`calc(${l(`rail-size`)} / -2)`}}}}},bq=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-item`,[i,a]=ol(n,`cmp-steps`);return{[t]:{[i(`title-font-size`)]:e.fontSizeLG,[i(`title-line-height`)]:e.lineHeightLG,[i(`subtitle-font-size`)]:e.fontSize,[i(`subtitle-line-height`)]:e.lineHeight,[i(`item-wrapper-padding-top`)]:`0px`,[i(`rail-size`)]:e.lineWidth,[i(`rail-line-style`)]:e.lineType,...Jc(e),display:`flex`,flexWrap:`nowrap`,alignItems:`flex-start`,[r]:{flex:`none`,position:`relative`},[`${r}-wrapper`]:{display:`flex`,flexWrap:`nowrap`,paddingTop:a(`item-wrapper-padding-top`)},[`${r}-header`]:{display:`flex`,flexWrap:`nowrap`,alignItems:`center`},[`${r}-title`]:{color:e.colorText,fontSize:a(`title-font-size`),lineHeight:a(`title-line-height`),wordBreak:`break-word`},[`${r}-subtitle`]:{color:e.colorTextDescription,fontWeight:`normal`,fontSize:a(`subtitle-font-size`),lineHeight:a(`subtitle-line-height`),marginInlineStart:e.marginXS,wordBreak:`break-word`},[`${r}-content`]:{color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:`break-word`},[`${r}-rail`]:{borderStyle:a(`rail-line-style`),borderWidth:0},[`${r}-title, ${r}-subtitle, ${r}-content, ${r}-rail`]:{transition:`all ${e.motionDurationSlow}`},[`&${t}-ellipsis`]:{[`${r}-title, ${r}-subtitle, ${r}-content`]:qc},[`${r}[role='button']:not(${r}-active):hover`]:{cursor:`pointer`}}}},xq=rl(`Steps`,e=>{let t=gs(e,{inlineDotSize:6});return[bq(t),rq(t),yq(t),nq(t),sq(t),pq(t),dq(t),vq(t),cq(t),lq(t),iq(t),uq(t),fq(t)]},e=>({titleLineHeight:e.controlHeight,customIconSize:e.controlHeight,customIconTop:0,customIconFontSize:e.controlHeightSM,iconSize:e.controlHeight,iconTop:-.5,iconFontSize:e.fontSize,iconSizeSM:e.fontSizeHeading3,dotSize:e.controlHeight/4,dotCurrentSize:e.controlHeightLG/4,navArrowColor:e.colorTextDisabled,navContentMaxWidth:`unset`,descriptionMaxWidth:void 0,waitIconColor:e.wireframe?e.colorTextDisabled:e.colorTextLabel,waitIconBgColor:e.wireframe?e.colorBgContainer:e.colorFillContent,waitIconBorderColor:e.wireframe?e.colorTextDisabled:`transparent`,finishIconBgColor:e.wireframe?e.colorBgContainer:e.controlItemBgActive,finishIconBorderColor:e.wireframe?e.colorPrimary:e.controlItemBgActive})),Sq={itemIcon:qm},Cq=e=>{let{size:t,className:n,rootClassName:r,style:i,variant:a=`filled`,type:o,classNames:s,styles:c,direction:l,orientation:u,responsive:d=!0,progressDot:f,labelPlacement:p,titlePlacement:m,ellipsis:h,offset:g=0,items:_,percent:v,current:y=0,onChange:b,iconRender:x,...C}=e,w=S.useContext($K),T=li(`steps`),{getPrefixCls:E,direction:D,className:O,style:k}=T,A,j,M={};w?M={root:w.rootComponent,item:w.itemComponent}:{classNames:A,styles:j}=T;let N=E(),P=E(`steps`,e.prefixCls),F=`${P}-item-icon`,[I,L]=xq(P),[R]=ol(N,`cmp-steps`),z=th(t),B=S.useMemo(()=>(_||[]).filter(Boolean),[_]),{xs:V}=KC(d),H=S.useMemo(()=>o&&o!==`default`?o:f?`dot`:o,[f,o]),U=H===`inline`,W=H===`dot`||H===`inline`,ee=S.useMemo(()=>H===`dot`&&typeof f==`function`?f:void 0,[H,f]),te=S.useMemo(()=>H===`panel`?`horizontal`:d&&V||(u||l)===`vertical`?`vertical`:`horizontal`,[u,l,H,d,V]),ne=S.useMemo(()=>W||te===`vertical`?te===`vertical`?`horizontal`:`vertical`:o===`navigation`?`horizontal`:m||p||`horizontal`,[W,p,te,m,o]),re=U?void 0:v,ie={...e,variant:a,size:z,type:H,orientation:te,titlePlacement:ne,current:y,percent:re,responsive:d,offset:g},[ae,G]=Fd([Sq,A,s],[j,c],{props:ie}),oe=(e,t)=>{let{item:n,index:r,active:i,components:{Icon:a}}=t,{status:o,icon:s}=n,c=null;if(W||s)c=s;else switch(o){case`finish`:c=S.createElement(DC,{className:`${F}-finish`});break;case`error`:c=S.createElement(Rl,{className:`${F}-error`});break;default:{let e=S.createElement(`span`,{className:`${F}-number`},t.index+1);o===`process`&&re!==void 0&&(e=S.createElement(tq,{prefixCls:P,rootPrefixCls:N,percent:re},e)),c=e}}let l=S.createElement(a,null,c);return x?l=x(l,{index:r,active:i,item:n,components:{Icon:a}}):typeof ee==`function`&&(l=ee(l,{index:r,...n})),l},K=(e,t)=>{let n=e;return U&&t.item.content&&(n=S.createElement(Ow,{destroyOnHidden:!0,title:t.item.content},e)),S.createElement(eh,{component:`Steps`,disabled:t.item.disabled||!b,colorSource:a===`filled`?`color`:null},n)},se=H===`panel`?e=>S.createElement(S.Fragment,null,e,S.createElement(eq,{prefixCls:P})):void 0,ce={[R(`items-offset`)]:`${g}`,...k,...i},q=J(O,`${P}-${a}`,{[`${P}-${H}`]:H===`dot`?!1:H,[`${P}-rtl`]:D===`rtl`,[`${P}-dot`]:W,[`${P}-ellipsis`]:h,[`${P}-with-progress`]:re!==void 0,[`${P}-small`]:z===`small`},n,r,I,L);return S.createElement(QK,{...C,prefixCls:P,className:q,style:ce,classNames:ae,styles:G,orientation:te,titlePlacement:ne,components:M,current:y,items:B,onChange:b,iconRender:oe,itemRender:K,itemWrapperRender:se})};function wq(){return wq=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let[h,g]=Hn(r??!1,n);function _(e,t){let n=h;return i||(n=e,g(n),l?.(n,t)),n}function v(e){e.which===om.LEFT?_(!1,e):e.which===om.RIGHT&&_(!0,e),u?.(e)}function y(e){let t=_(!h,e);c?.(t,e)}let b=J(e,t,{[`${e}-checked`]:h,[`${e}-disabled`]:i});return S.createElement(`button`,wq({},p,{type:`button`,role:`switch`,"aria-checked":h,disabled:i,className:b,ref:m,onKeyDown:v,onClick:y}),a,S.createElement(`span`,{className:`${e}-inner`},S.createElement(`span`,{className:J(`${e}-inner-checked`,f?.content),style:d?.content},o),S.createElement(`span`,{className:J(`${e}-inner-unchecked`,f?.content),style:d?.content},s)))});Tq.displayName=`Switch`;var Eq=e=>{let{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:i,innerMinMarginSM:a,innerMaxMarginSM:o,handleSizeSM:s,calc:c}=e,l=`${t}-inner`,u=Y(c(s).add(c(r).mul(2)).equal()),d=Y(c(o).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:i,height:n,lineHeight:Y(n),[`${t}-inner`]:{paddingInlineStart:o,paddingInlineEnd:a,[`${l}-checked, ${l}-unchecked`]:{minHeight:n},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${l}-unchecked`]:{marginTop:c(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:s,height:s},[`${t}-loading-icon`]:{top:c(c(s).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:o,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${Y(c(s).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:c(e.marginXXS).div(2).equal(),marginInlineEnd:c(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:c(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:c(e.marginXXS).div(2).equal()}}}}}}},Dq=e=>{let{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:`relative`,top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:`top`},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},Oq=e=>{let{componentCls:t,trackPadding:n,handleBg:r,handleShadow:i,handleSize:a,calc:o}=e,s=`${t}-handle`;return{[t]:{[s]:{position:`absolute`,top:n,insetInlineStart:n,width:a,height:a,transition:`all ${e.switchDuration} ease-in-out`,...Uh(),"&::before":{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:o(a).div(2).equal(),boxShadow:i,transition:`all ${e.switchDuration} ease-in-out`,content:`""`,...Uh()}},[`&${t}-checked ${s}`]:{insetInlineStart:`calc(100% - ${Y(o(a).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${s}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${s}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},kq=e=>{let{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:i,innerMaxMargin:a,handleSize:o,switchDuration:s,calc:c}=e,l=`${t}-inner`,u=Y(c(o).add(c(r).mul(2)).equal()),d=Y(c(a).mul(2).equal());return{[t]:{[l]:{display:`block`,overflow:`hidden`,borderRadius:100,height:`100%`,paddingInlineStart:a,paddingInlineEnd:i,transition:[`padding-inline-start`,`padding-inline-end`].map(e=>`${e} ${s} ease-in-out`).join(`, `),...Uh(),[`${l}-checked, ${l}-unchecked`]:{display:`block`,color:e.colorTextLightSolid,fontSize:e.fontSizeSM,pointerEvents:`none`,minHeight:n,transition:[`margin-inline-start`,`margin-inline-end`].map(e=>`${e} ${s} ease-in-out`).join(`, `),...Uh()},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${l}-unchecked`]:{marginTop:c(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${l}`]:{paddingInlineStart:i,paddingInlineEnd:a,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:c(r).mul(2).equal(),marginInlineEnd:c(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:c(r).mul(-1).mul(2).equal(),marginInlineEnd:c(r).mul(2).equal()}}}}}},Aq=e=>{let{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:{...Jc(e),position:`relative`,display:`inline-block`,boxSizing:`border-box`,minWidth:r,height:n,lineHeight:Y(n),verticalAlign:`middle`,background:e.colorTextQuaternary,border:`0`,borderRadius:100,cursor:`pointer`,transition:`all ${e.motionDurationMid}`,userSelect:`none`,...Uh(),[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary},...Qc(e),[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:`not-allowed`,opacity:e.switchDisabledOpacity,"*":{boxShadow:`none`,cursor:`not-allowed`}},[`&${t}-rtl`]:{direction:`rtl`}}}},jq=rl(`Switch`,e=>{let t=gs(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:`-30%`});return[Aq(t),kq(t),Oq(t),Dq(t),Eq(t)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:i}=e,a=t*n,o=r/2,s=a-4,c=o-4;return{trackHeight:a,trackHeightSM:o,trackMinWidth:s*2+8,trackMinWidthSM:c*2+4,trackPadding:2,handleBg:i,handleSize:s,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new Rs(`#00230b`).setA(.2).toRgbString()}`,innerMinMargin:s/2,innerMaxMargin:s+2+4,innerMinMarginSM:c/2,innerMaxMarginSM:c+2+4}}),Mq=S.forwardRef((e,t)=>{let{prefixCls:n,size:r,disabled:i,loading:a,className:o,rootClassName:s,style:c,checked:l,value:u,defaultChecked:d,defaultValue:f,onChange:p,styles:m,classNames:h,...g}=e,[_,v]=Hn(d??f??!1,l??u),{getPrefixCls:y,direction:b,className:x,style:C,classNames:w,styles:T}=li(`switch`),E=S.useContext(zp),D=(i??E)||a,O=y(`switch`,n),[k,A]=jq(O),j=th(r),M={...e,size:j,disabled:D},[N,P]=Fd([w,h],[T,m],{props:M}),F=S.createElement(`div`,{className:J(`${O}-handle`,N.indicator),style:P.indicator},a&&S.createElement(xm,{className:`${O}-loading-icon`})),I=J(x,{[`${O}-small`]:j===`small`,[`${O}-loading`]:a,[`${O}-rtl`]:b===`rtl`},o,s,N.root,k,A),L={...P.root,...C,...c},R=(...e)=>{v(e[0]),p?.(...e)};return S.createElement(eh,{component:`Switch`,disabled:D},S.createElement(Tq,{...g,classNames:N,styles:P,checked:_,onChange:R,prefixCls:O,className:I,style:L,disabled:D,ref:t,loadingIcon:F}))});Mq.__ANT_SWITCH=!0;var Nq={},Pq=`rc-table-internal-hook`;function Fq(e){let t=S.createContext(void 0);return{Context:t,Provider:({value:e,children:n})=>{let r=S.useRef(e);r.current=e;let[i]=S.useState(()=>({getValue:()=>r.current,listeners:new Set}));return zn(()=>{(0,Jf.unstable_batchedUpdates)(()=>{i.listeners.forEach(t=>{t(e)})})},[e]),S.createElement(t.Provider,{value:i},n)},defaultValue:e}}function Iq(e,t){let n=In(typeof t==`function`?t:e=>{if(t===void 0)return e;if(!Array.isArray(t))return e[t];let n={};return t.forEach(t=>{n[t]=e[t]}),n}),r=S.useContext(e?.Context),{listeners:i,getValue:a}=r||{},o=S.useRef();o.current=n(r?a():e?.defaultValue);let[,s]=S.useState({});return zn(()=>{if(!r)return;function e(e){let t=n(e);Ti(o.current,t,!0)||s({})}return i.add(e),()=>{i.delete(e)}},[r]),o.current}function Lq(){return Lq=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let s=i?{ref:o}:{},c=S.useRef(0),l=S.useRef(a);return t()===null?((!r||r(l.current,a))&&(c.current+=1),l.current=a,S.createElement(e.Provider,{value:c.current},S.createElement(n,Lq({},a,s)))):S.createElement(n,Lq({},a,s))};return i?S.forwardRef(a):a}function r(e,n){let r=tr(e),i=(n,i)=>{let a=r?{ref:i}:{};return t(),S.createElement(e,Lq({},n,a))};return S.memo(r?S.forwardRef(i):i,n)}return{makeImmutable:n,responseImmutable:r,useImmutableMark:t}}var{makeImmutable:Yte,responseImmutable:Xte,useImmutableMark:Zte}=Rq(),{makeImmutable:zq,responseImmutable:Bq,useImmutableMark:Vq}=Rq(),Hq=Fq(),Uq=S.createContext({renderWithProps:!1}),Wq=`RC_TABLE_KEY`;function Gq(e){return e==null?[]:Array.isArray(e)?e:[e]}function Kq(e){let t=[],n={};return e.forEach(e=>{let{key:r,dataIndex:i}=e||{},a=r||Gq(i).join(`-`)||Wq;for(;n[a];)a=`${a}_next`;n[a]=!0,t.push(a)}),t}function qq(e){return e!=null}function Jq(e){return typeof e==`number`&&!Number.isNaN(e)}function Yq(e){return e&&typeof e==`object`&&!Array.isArray(e)&&!S.isValidElement(e)}function Xq(e,t,n,r,i,a){let o=S.useContext(Uq);return Gn(()=>{if(qq(r))return[r];let a=ar(e,t==null||t===``?[]:Array.isArray(t)?t:[t]),s=a,c;if(i){let t=i(a,e,n);Yq(t)?(s=t.children,c=t.props,o.renderWithProps=!0):s=t}return[s,c]},[Vq(),e,r,t,i,n],(e,t)=>{if(a){let[,n]=e,[,r]=t;return a(r,n)}return o.renderWithProps?!0:!Ti(e,t,!0)})}function Zq(e,t,n,r){let i=e+t-1;return e<=r&&i>=n}function Qq(e,t){return Iq(Hq,n=>[Zq(e,t||1,n.hoverStartRow,n.hoverEndRow),n.onHover])}function $q(){return $q=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let r,i=e===!0?{showTitle:!0}:e;return i&&(i.showTitle||t===`header`)&&(typeof n==`string`||typeof n==`number`?r=n.toString():S.isValidElement(n)&&typeof n.props?.children==`string`&&(r=n.props?.children)),r},tJ=S.memo(e=>{let{component:t,children:n,ellipsis:r,scope:i,prefixCls:a,className:o,style:s,align:c,record:l,render:u,dataIndex:d,renderIndex:f,shouldCellUpdate:p,index:m,rowType:h,colSpan:g,rowSpan:_,fixStart:v,fixEnd:y,fixedStartShadow:b,fixedEndShadow:x,offsetFixedStartShadow:C,offsetFixedEndShadow:w,zIndex:T,zIndexReverse:E,appendNode:D,additionalProps:O={},isSticky:k}=e,A=`${a}-cell`,{allColumnsFixedLeft:j,rowHoverable:M}=Iq(Hq,[`allColumnsFixedLeft`,`rowHoverable`]),[N,P]=Xq(l,d,f,n,u,p),F={},I=typeof v==`number`&&!j,L=typeof y==`number`&&!j,[R,z]=Iq(Hq,({scrollInfo:e})=>{if(!I&&!L)return[!1,!1];let[t,n]=e;return[(I&&b&&t)-C>=1,(L&&x&&n-t)-w>1]});I&&(F.insetInlineStart=v,F[`--z-offset`]=T,F[`--z-offset-reverse`]=E),L&&(F.insetInlineEnd=y,F[`--z-offset`]=T,F[`--z-offset-reverse`]=E);let B=P?.colSpan??O.colSpan??g??1,V=P?.rowSpan??O.rowSpan??_??1,[H,U]=Qq(m,V),W=In(e=>{l&&U(m,m+V-1),O?.onMouseEnter?.(e)}),ee=In(e=>{l&&U(-1,-1),O?.onMouseLeave?.(e)});if(B===0||V===0)return null;let te=O.title??eJ({rowType:h,ellipsis:r,children:N}),ne=J(A,o,{[`${A}-fix`]:I||L,[`${A}-fix-start`]:I,[`${A}-fix-end`]:L,[`${A}-fix-start-shadow`]:b,[`${A}-fix-start-shadow-show`]:b&&R,[`${A}-fix-end-shadow`]:x,[`${A}-fix-end-shadow-show`]:x&&z,[`${A}-ellipsis`]:r,[`${A}-with-append`]:D,[`${A}-fix-sticky`]:(I||L)&&k,[`${A}-row-hover`]:!P&&H},O.className,P?.className),re={};c&&(re.textAlign=c);let ie={...P?.style,...F,...re,...O.style,...s},ae=N;return typeof ae==`object`&&!Array.isArray(ae)&&!S.isValidElement(ae)&&(ae=null),r&&(b||x)&&(ae=S.createElement(`span`,{className:`${A}-content`},ae)),S.createElement(t,$q({},P,O,{className:ne,style:ie,title:te,scope:i,onMouseEnter:M?W:void 0,onMouseLeave:M?ee:void 0,colSpan:B===1?null:B,rowSpan:V===1?null:V}),D,ae)});function nJ(e){return e.fixed===`start`}function rJ(e){return e.fixed===`end`}function iJ(e,t,n,r){let i=n[e]||{},a=n[t]||{},o=null,s=null;nJ(i)&&nJ(a)?o=r.start[e]:rJ(a)&&rJ(i)&&(s=r.end[t]);let c=!1,l=!1,u=0,d=0;o!==null&&(c=!n[t+1]||!nJ(n[t+1]),u=n.length*2-e,d=n.length+e),s!==null&&(l=!n[e-1]||!rJ(n[e-1]),u=t,d=n.length-t);let f=0,p=0;if(c)for(let t=0;tt;--e)rJ(n[e])||(p+=r.widths[e]||0);return{fixStart:o,fixEnd:s,fixedStartShadow:c,fixedEndShadow:l,offsetFixedStartShadow:f,offsetFixedEndShadow:p,isSticky:r.isSticky,zIndex:u,zIndexReverse:d}}var aJ=S.createContext({});function oJ(){return oJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:t,index:n,children:r,colSpan:i=1,rowSpan:a,align:o}=e,{prefixCls:s}=Iq(Hq,[`prefixCls`]),{scrollColumnIndex:c,stickyOffsets:l,flattenColumns:u}=S.useContext(aJ),d=n+i-1+1===c?i+1:i,f=S.useMemo(()=>iJ(n,n+d-1,u,l),[n,d,u,l]);return S.createElement(tJ,oJ({className:t,index:n,component:`td`,prefixCls:s,record:null,dataIndex:null,align:o,colSpan:d,rowSpan:a,render:()=>r},f))},cJ=e=>{let{children:t,...n}=e;return S.createElement(`tr`,n,t)},lJ=e=>{let{children:t}=e;return t};lJ.Row=cJ,lJ.Cell=sJ;var uJ=Bq(e=>{let{children:t,stickyOffsets:n,flattenColumns:r}=e,i=Iq(Hq,`prefixCls`),a=r.length-1,o=r[a],s=S.useMemo(()=>({stickyOffsets:n,flattenColumns:r,scrollColumnIndex:o?.scrollbar?a:null}),[o,r,a,n]);return S.createElement(aJ.Provider,{value:s},S.createElement(`tfoot`,{className:`${i}-summary`},t))}),dJ=lJ;function fJ(e){return null}function pJ(e){return null}function mJ(e,t,n,r,i,a,o){let s=a(t,o);e.push({record:t,indent:n,index:o,rowKey:s});let c=i?.has(s);if(t&&Array.isArray(t[r])&&c)for(let o=0;o{if(n?.size){let i=[];for(let a=0;a({record:e,indent:0,index:t,rowKey:r(e,t)}))},[e,t,n,r])}function gJ(e,t,n,r){let i=Iq(Hq,[`prefixCls`,`fixedInfoList`,`flattenColumns`,`expandableType`,`expandRowByClick`,`onTriggerExpand`,`rowClassName`,`expandedRowClassName`,`indentSize`,`expandIcon`,`expandedRowRender`,`expandIconColumnIndex`,`expandedKeys`,`childrenColumnName`,`rowExpandable`,`onRow`]),{flattenColumns:a,expandableType:o,expandedKeys:s,childrenColumnName:c,onTriggerExpand:l,rowExpandable:u,onRow:d,expandRowByClick:f,rowClassName:p}=i,m=o===`nest`,h=o===`row`&&(!u||u(e)),g=h||m,_=s&&s.has(t),v=c&&e&&e[c],y=In(l),b=d?.(e,n),x=b?.onClick,S=(t,...n)=>{f&&g&&l(e,t),x?.(t,...n)},C;typeof p==`string`?C=p:typeof p==`function`&&(C=p(e,n,r));let w=Kq(a);return{...i,columnsKey:w,nestExpandable:m,expanded:_,hasNestChildren:v,record:e,onTriggerExpand:y,rowSupportExpand:h,expandable:g,rowProps:{...b,className:J(C,b?.className),onClick:S}}}var _J=e=>{let{prefixCls:t,children:n,component:r,cellComponent:i,className:a,expanded:o,colSpan:s,isEmpty:c,stickyOffset:l=0}=e,{scrollbarSize:u,fixHeader:d,fixColumn:f,componentWidth:p,horizonScroll:m}=Iq(Hq,[`scrollbarSize`,`fixHeader`,`fixColumn`,`componentWidth`,`horizonScroll`]),h=n;return(c?m&&p:f)&&(h=S.createElement(`div`,{style:{width:p-l-(d&&!c?u:0),position:`sticky`,left:l,overflow:`hidden`},className:`${t}-expanded-row-fixed`},h)),S.createElement(r,{className:a,style:{display:o?null:`none`}},S.createElement(tJ,{component:i,prefixCls:t,colSpan:s},h))};function vJ({prefixCls:e,record:t,onExpand:n,expanded:r,expandable:i}){let a=`${e}-row-expand-icon`;if(!i)return S.createElement(`span`,{className:J(a,`${e}-row-spaced`)});let o=e=>{n(t,e),e.stopPropagation()};return S.createElement(`span`,{className:J(a,{[`${e}-row-expanded`]:r,[`${e}-row-collapsed`]:!r}),onClick:o})}function yJ(e,t,n){let r=[];function i(e){(e||[]).forEach((e,a)=>{r.push(t(e,a)),i(e[n])})}return i(e),r}function bJ(e,t,n,r){return typeof e==`string`?e:typeof e==`function`?e(t,n,r):``}function xJ(){return xJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:t,style:n,classNames:r,styles:i,record:a,index:o,renderIndex:s,rowKey:c,rowKeys:l,indent:u=0,rowComponent:d,cellComponent:f,scopeCellComponent:p,expandedRowInfo:m}=e,h=gJ(a,c,o,u),{prefixCls:g,flattenColumns:_,expandedRowClassName:v,expandedRowRender:y,rowProps:b,expanded:x,rowSupportExpand:C}=h,w=S.useRef(!1);w.current||=x;let T=bJ(v,a,o,u),E=S.createElement(d,xJ({},b,{"data-row-key":c,className:J(t,`${g}-row`,`${g}-row-level-${u}`,b?.className,r.row,{[T]:u>=1}),style:{...n,...b?.style,...i.row}}),_.map((e,t)=>{let{render:n,dataIndex:c,className:d}=e,{key:_,fixedInfo:v,appendCellNode:y,additionalCellProps:b}=SJ(h,e,t,u,o,l,m?.offset);return S.createElement(tJ,xJ({className:J(d,r.cell),style:i.cell,ellipsis:e.ellipsis,align:e.align,scope:e.rowScope,component:e.rowScope?p:f,prefixCls:g,key:_,record:a,index:o,renderIndex:s,dataIndex:c,render:n,shouldCellUpdate:e.shouldCellUpdate},v,{appendNode:y,additionalProps:b}))})),D;if(C&&(w.current||x)){let e=y(a,o,u+1,x);D=S.createElement(_J,{expanded:x,className:J(`${g}-expanded-row`,`${g}-expanded-row-level-${u+1}`,T),prefixCls:g,component:d,cellComponent:f,colSpan:m?m.colSpan:_.length,isEmpty:!1,stickyOffset:m?.sticky},e)}return S.createElement(S.Fragment,null,E,D)}),wJ=e=>{let{columnKey:t,onColumnResize:n,title:r}=e,i=S.useRef(null);return zn(()=>{i.current&&n(t,i.current.offsetWidth)},[]),S.createElement(Wr,{data:t},S.createElement(`td`,{ref:i,style:{paddingTop:0,paddingBottom:0,borderTop:0,borderBottom:0,height:0}},S.createElement(`div`,{style:{height:0,overflow:`hidden`,fontWeight:`bold`}},r||`\xA0`)))},TJ=({prefixCls:e,columnsKey:t,onColumnResize:n,columns:r})=>{let i=S.useRef(null),{measureRowRender:a}=Iq(Hq,[`measureRowRender`]),o=S.createElement(`tr`,{"aria-hidden":`true`,className:`${e}-measure-row`,style:{height:0},ref:i},S.createElement(Wr.Collection,{onBatchResize:e=>{cp(i.current)&&e.forEach(({data:e,size:t})=>{n(e,t.offsetWidth)})}},t.map(e=>{let t=r.find(t=>t.key===e)?.title,i=S.isValidElement(t)?S.cloneElement(t,{ref:null}):t;return S.createElement(wJ,{key:e,columnKey:e,onColumnResize:n,title:i})})));return typeof a==`function`?a(o):o},EJ=Bq(e=>{let{data:t,measureColumnWidth:n}=e,{prefixCls:r,getComponent:i,onColumnResize:a,flattenColumns:o,getRowKey:s,expandedKeys:c,childrenColumnName:l,emptyNode:u,classNames:d,styles:f,expandedRowOffset:p=0,colWidths:m}=Iq(Hq,[`prefixCls`,`getComponent`,`onColumnResize`,`flattenColumns`,`getRowKey`,`expandedKeys`,`childrenColumnName`,`emptyNode`,`classNames`,`styles`,`expandedRowOffset`,`fixedInfoList`,`colWidths`]),{body:h={}}=d||{},{body:g={}}=f||{},_=hJ(t,l,c,s),v=S.useMemo(()=>_.map(e=>e.rowKey),[_]),y=S.useRef({renderWithProps:!1}),b=S.useMemo(()=>{let e=o.length-p,t=0;for(let e=0;e{let{record:n,indent:r,index:i,rowKey:a}=e;return S.createElement(CJ,{classNames:h,styles:g,key:a,rowKey:a,rowKeys:v,record:n,index:t,renderIndex:i,rowComponent:C,cellComponent:w,scopeCellComponent:T,indent:r,expandedRowInfo:b})}):S.createElement(_J,{expanded:!0,className:`${r}-placeholder`,prefixCls:r,component:C,cellComponent:w,colSpan:o.length,isEmpty:!0},u);let D=Kq(o);return S.createElement(Uq.Provider,{value:y.current},S.createElement(x,{style:g.wrapper,className:J(`${r}-tbody`,h.wrapper)},n&&S.createElement(TJ,{prefixCls:r,columnsKey:D,onColumnResize:a,columns:o}),E))}),DJ=`RC_TABLE_INTERNAL_COL_DEFINE`;function OJ(e){let{expandable:t,...n}=e,r;return r=`expandable`in e?{...n,...t}:n,r.showExpandColumn===!1&&(r.expandIconColumnIndex=-1),r}function kJ(){return kJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{colWidths:t,columns:n,columCount:r}=e,{tableLayout:i}=Iq(Hq,[`tableLayout`]),a=[],o=r||n.length,s=!1;for(let e=o-1;e>=0;--e){let r=t[e],o=n&&n[e],c,l;if(o&&(c=o[DJ],i===`auto`&&(l=o.minWidth)),r||l||c||s){let{columnType:t,...n}=c||{};a.unshift(S.createElement(`col`,kJ({key:e,style:{width:r,minWidth:l}},n))),s=!0}}return a.length>0?S.createElement(`colgroup`,null,a):null};function jJ(e,t){return(0,S.useMemo)(()=>{let n=[];for(let r=0;r{let{className:n,style:r,noData:i,columns:a,flattenColumns:o,colWidths:s,colGroup:c,columCount:l,stickyOffsets:u,direction:d,fixHeader:f,stickyTopOffset:p,stickyBottomOffset:m,stickyClassName:h,scrollX:g,tableLayout:_=`fixed`,onScroll:v,maxContentScroll:y,children:b,...x}=e,{prefixCls:C,scrollbarSize:w,isSticky:T,getComponent:E}=Iq(Hq,[`prefixCls`,`scrollbarSize`,`isSticky`,`getComponent`]),D=E([`header`,`table`],`table`),O=T&&!f?0:w,k=S.useRef(null),A=S.useCallback(e=>{Qn(t,e),Qn(k,e)},[]);S.useEffect(()=>{function e(e){let{currentTarget:t,deltaX:n}=e;if(n){let{scrollLeft:r,scrollWidth:i,clientWidth:a}=t,o=i-a,s=r+n;d===`rtl`?(s=Math.max(-o,s),s=Math.min(0,s)):(s=Math.min(o,s),s=Math.max(0,s)),v({currentTarget:t,scrollLeft:s}),e.preventDefault()}}let t=k.current;return t?.addEventListener(`wheel`,e,{passive:!1}),()=>{t?.removeEventListener(`wheel`,e)}},[]);let j=o[o.length-1],M={fixed:j?j.fixed:null,scrollbar:!0,onHeaderCell:()=>({className:`${C}-cell-scrollbar`})},N=(0,S.useMemo)(()=>O?[...a,M]:a,[O,a]),P=(0,S.useMemo)(()=>O?[...o,M]:o,[O,o]),F=(0,S.useMemo)(()=>{let{start:e,end:t}=u;return{...u,start:e,end:[...t.map(e=>e+O),0],isSticky:T}},[O,u,T]),I=jJ(s,l),L=(0,S.useMemo)(()=>{let e=!I||!I.length||I.every(e=>!e);return i||e},[i,I]);return S.createElement(`div`,{style:{overflow:`hidden`,...T?{top:p,bottom:m}:{},...r},ref:A,className:J(n,{[h]:!!h})},S.createElement(D,{style:{tableLayout:_,minWidth:`100%`,width:g}},L?c:S.createElement(AJ,{colWidths:[...I,O],columCount:l+1,columns:P}),b({...x,stickyOffsets:F,columns:N,flattenColumns:P})))}),NJ=S.memo(MJ);function PJ(){return PJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{cells:t,stickyOffsets:n,flattenColumns:r,rowComponent:i,cellComponent:a,onHeaderRow:o,index:s,classNames:c,styles:l}=e,{prefixCls:u}=Iq(Hq,[`prefixCls`]),d;o&&(d=o(t.map(e=>e.column),s));let f=Kq(t.map(e=>e.column));return S.createElement(i,PJ({},d,{className:c.row,style:l.row}),t.map((e,t)=>{let{column:i,colStart:o,colEnd:s,colSpan:c}=e,l=iJ(o,s,r,n),d=i?.onHeaderCell?.(i)||{};return S.createElement(tJ,PJ({},e,{scope:i.title?c>1?`colgroup`:`col`:null,ellipsis:i.ellipsis,align:i.align,component:a,prefixCls:u,key:f[t]},l,{additionalProps:d,rowType:`header`}))}))};function IJ(e,t,n){let r=[];function i(e,a,o=0){r[o]=r[o]||[];let s=a;return e.filter(Boolean).map(e=>{let a={key:e.key,className:J(e.className,t.cell)||``,style:n.cell,children:e.title,column:e,colStart:s},c=1,l=e.children;return l&&l.length>0&&(c=i(l,s,o+1).reduce((e,t)=>e+t,0),a.hasSubColumns=!0),`colSpan`in e&&({colSpan:c}=e),`rowSpan`in e&&(a.rowSpan=e.rowSpan),a.colSpan=c,a.colEnd=a.colStart+c-1,r[o].push(a),s+=c,c})}i(e,0);let a=r.length;for(let e=0;e{!(`rowSpan`in t)&&!t.hasSubColumns&&(t.rowSpan=a-e)});return r}var LJ=Bq(e=>{let{stickyOffsets:t,columns:n,flattenColumns:r,onHeaderRow:i}=e,{prefixCls:a,getComponent:o,classNames:s,styles:c}=Iq(Hq,[`prefixCls`,`getComponent`,`classNames`,`styles`]),{header:l={}}=s||{},{header:u={}}=c||{},d=S.useMemo(()=>IJ(n,l,u),[n,l,u]),f=o([`header`,`wrapper`],`thead`),p=o([`header`,`row`],`tr`),m=o([`header`,`cell`],`th`);return S.createElement(f,{className:J(`${a}-thead`,l.wrapper),style:u.wrapper},d.map((e,n)=>S.createElement(FJ,{classNames:l,styles:u,key:n,flattenColumns:r,cells:e,stickyOffsets:t,rowComponent:p,cellComponent:m,onHeaderRow:i,index:n})))});function RJ(e,t=``){return typeof t==`number`?t:t.endsWith(`%`)?e*parseFloat(t)/100:null}function zJ(e,t,n){return S.useMemo(()=>{if(t&&t>0){let r=0,i=0;e.forEach(e=>{let n=RJ(t,e.width);n?r+=n:i+=1});let a=Math.max(t,n),o=Math.max(a-r,i),s=i,c=o/i,l=0,u=e.map(e=>{let n={...e},r=RJ(t,n.width);if(r)n.width=r;else{let e=Math.floor(c);n.width=s===1?o:e,o-=e,--s}return l+=n.width,n});if(l{let r=Math.floor(t.width*e);t.width=n===u.length-1?o:r,o-=r})}return[u,Math.max(l,a)]}return[e,t]},[e,t,n])}function BJ(e){return Cr(e).filter(e=>S.isValidElement(e)).map(e=>{let{key:t,props:n}=e,{children:r,...i}=n,a={key:t,...i};return r&&(a.children=BJ(r)),a})}function VJ(e){return e.filter(e=>e&&typeof e==`object`&&!e.hidden).map(e=>{let t=e.children;return t&&t.length>0?{...e,children:VJ(t)}:e})}function HJ(e,t=`key`){return e.filter(e=>e&&typeof e==`object`).reduce((e,n,r)=>{let{fixed:i}=n,a=i===!0||i===`left`?`start`:i===`right`?`end`:i,o=`${t}-${r}`,s=n.children;return s&&s.length>0?[...e,...HJ(s,o).map(e=>({...e,fixed:e.fixed??a}))]:[...e,{key:o,...n,fixed:a}]},[])}function UJ({prefixCls:e,columns:t,children:n,expandable:r,expandedKeys:i,columnTitle:a,getRowKey:o,onTriggerExpand:s,expandIcon:c,rowExpandable:l,expandIconColumnIndex:u,expandedRowOffset:d=0,direction:f,expandRowByClick:p,columnWidth:m,fixed:h,scrollWidth:g,clientWidth:_},v){let y=S.useMemo(()=>VJ((t||BJ(n)||[]).slice()),[t,n]),b=S.useMemo(()=>{if(r){let t=y.slice();if(!t.includes(Nq)){let e=u||0,n=e===0&&(h===`right`||h===`end`)?y.length:e;n>=0&&t.splice(n,0,Nq)}let n=t.indexOf(Nq);t=t.filter((e,t)=>e!==Nq||t===n);let r=y[n],f;f=h||(r?r.fixed:null);let g={[DJ]:{className:`${e}-expand-icon-col`,columnType:`EXPAND_COLUMN`},title:a,fixed:f,className:`${e}-row-expand-icon-cell`,width:m,render:(t,n,r)=>{let a=o(n,r),u=c({prefixCls:e,expanded:i.has(a),expandable:l?l(n):!0,record:n,onExpand:s});return p?S.createElement(`span`,{onClick:e=>e.stopPropagation()},u):u}};return t.map((e,t)=>{let n=e===Nq?g:e;return te!==Nq)},[r,y,o,i,c,f,d]),x=S.useMemo(()=>{let e=b;return v&&(e=v(e)),e.length||(e=[{render:()=>null}]),e},[v,b,f]),[C,w]=zJ(S.useMemo(()=>HJ(x),[x,f,g]),g,_);return[x,C,w]}function WJ(e,t,n){let r=OJ(e),{expandIcon:i,expandedRowKeys:a,defaultExpandedRowKeys:o,defaultExpandAllRows:s,expandedRowRender:c,onExpand:l,onExpandedRowsChange:u,childrenColumnName:d}=r,f=i||vJ,p=d||`children`,m=S.useMemo(()=>c?`row`:e.expandable&&e.internalHooks===`rc-table-internal-hook`&&e.expandable.__PARENT_RENDER_ICON__||t.some(e=>e&&typeof e==`object`&&e[p])?`nest`:!1,[!!c,t]),[h,g]=S.useState(()=>o||(s?yJ(t,n,p):[])),_=S.useMemo(()=>new Set(a||h||[]),[a,h]);return[r,m,_,f,p,S.useCallback(e=>{let r=n(e,t.indexOf(e)),i,a=_.has(r);a?(_.delete(r),i=[..._]):i=[..._,r],g(i),l&&l(!a,e),u&&u(i)},[n,_,t,l,u])]}function GJ(e,t){let n=S.useMemo(()=>e.map((n,r)=>iJ(r,r,e,t)),[e,t]);return Gn(()=>n,[n],(e,t)=>!Ti(e,t))}function KJ(e){let t=(0,S.useRef)(e),[,n]=(0,S.useState)({}),r=(0,S.useRef)(null),i=(0,S.useRef)([]);function a(e){i.current.push(e);let a=Promise.resolve();r.current=a,a.then(()=>{if(r.current===a){let e=i.current,a=t.current;i.current=[],e.forEach(e=>{t.current=e(t.current)}),r.current=null,a!==t.current&&n({})}})}return(0,S.useEffect)(()=>()=>{r.current=null},[]),[t.current,a]}function qJ(e){let t=(0,S.useRef)(e||null),n=(0,S.useRef)(null);function r(){clearTimeout(n.current)}function i(e){t.current=e,r(),n.current=setTimeout(()=>{t.current=null,n.current=void 0},100)}function a(){return t.current}return(0,S.useEffect)(()=>r,[]),[i,a]}function JJ(){let[e,t]=S.useState(-1),[n,r]=S.useState(-1);return[e,n,S.useCallback((e,n)=>{t(e),r(n)},[])]}var YJ=Ln()?window:null;function XJ(e,t){let{offsetHeader:n=0,offsetSummary:r=0,offsetScroll:i=0,getContainer:a=()=>YJ}=typeof e==`object`?e:{},o=a()||YJ,s=!!e;return S.useMemo(()=>({isSticky:s,stickyClassName:s?`${t}-sticky-holder`:``,offsetHeader:n,offsetSummary:r,offsetScroll:i,container:o}),[s,i,n,r,t,o])}function ZJ(e,t){return(0,S.useMemo)(()=>{let n=t.length,r=(n,r,i)=>{let a=[],o=0;for(let s=n;s!==r;s+=i)a.push(o),t[s].fixed&&(o+=e[s]||0);return a};return{start:r(0,n,1),end:r(n-1,-1,-1).reverse(),widths:e}},[e,t])}var QJ=e=>{let{children:t,className:n,style:r}=e;return S.createElement(`div`,{className:n,style:r},t)};function $J(e){let t=kr(e).getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}var eY=`mouseup`,tY=`mousemove`,nY=`scroll`,rY=`resize`,iY=S.forwardRef((e,t)=>{let{scrollBodyRef:n,onScroll:r,offsetScroll:i,container:a,direction:o}=e,s=Iq(Hq,`prefixCls`),c=n.current?.scrollWidth||0,l=n.current?.clientWidth||0,u=c&&l/c*l,d=S.useRef(null),[f,p]=KJ({scrollLeft:0,isHiddenScrollBar:!0}),m=S.useRef({delta:0,x:0}),[h,g]=S.useState(!1),_=S.useRef(null);S.useEffect(()=>()=>{ri.cancel(_.current)},[]);let v=()=>{g(!1)},y=e=>{e.persist(),m.current.delta=e.pageX-f.scrollLeft,m.current.x=0,g(!0),e.preventDefault()},b=e=>{let{buttons:t}=e||window?.event;if(!h||t===0){h&&g(!1);return}let n=m.current.x+e.pageX-m.current.x-m.current.delta,i=o===`rtl`;n=Math.max(i?u-l:0,Math.min(i?0:l-u,n)),(!i||Math.abs(n)+Math.abs(u){ri.cancel(_.current),_.current=ri(()=>{if(!n.current)return;let e=$J(n.current).top,t=e+n.current.offsetHeight,r=a===window?document.documentElement.scrollTop+window.innerHeight:$J(a).top+a.clientHeight;t-kf()<=r||e>=r-i?p(e=>({...e,isHiddenScrollBar:!0})):p(e=>({...e,isHiddenScrollBar:!1}))})},C=e=>{p(t=>({...t,scrollLeft:e/c*l||0}))};return S.useImperativeHandle(t,()=>({setScrollLeft:C,checkScrollBarVisible:x})),S.useEffect(()=>(document.body.addEventListener(eY,v,!1),document.body.addEventListener(tY,b,!1),x(),()=>{document.body.removeEventListener(eY,v),document.body.removeEventListener(tY,b)}),[u,h]),S.useEffect(()=>{if(n.current){let e=[],t=kr(n.current);for(;t;)e.push(t),t=t.parentElement;return e.forEach(e=>{e.addEventListener(nY,x,!1)}),window.addEventListener(rY,x,!1),window.addEventListener(nY,x,!1),a.addEventListener(nY,x,!1),()=>{e.forEach(e=>{e.removeEventListener(nY,x)}),window.removeEventListener(rY,x),window.removeEventListener(nY,x),a.removeEventListener(nY,x)}}},[a]),S.useEffect(()=>{f.isHiddenScrollBar||p(e=>{let t=n.current;return t?{...e,scrollLeft:t.scrollLeft/t.scrollWidth*t.clientWidth}:e})},[f.isHiddenScrollBar]),c<=l||!u||f.isHiddenScrollBar?null:S.createElement(`div`,{style:{height:kf(),width:l,bottom:i},className:`${s}-sticky-scroll`},S.createElement(`div`,{onMouseDown:y,ref:d,className:J(`${s}-sticky-scroll-bar`,{[`${s}-sticky-scroll-bar-active`]:h}),style:{width:`${u}px`,transform:`translate3d(${f.scrollLeft}px, 0, 0)`}}))});function aY(){return aY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let n={rowKey:`key`,prefixCls:oY,emptyText:lY,...e},{prefixCls:r,className:i,rowClassName:a,style:o,classNames:s,styles:c,data:l,rowKey:u,scroll:d,tableLayout:f,direction:p,title:m,footer:h,summary:g,caption:_,id:v,showHeader:y,components:b,emptyText:x,onRow:C,onHeaderRow:w,measureRowRender:T,onScroll:E,internalHooks:D,transformColumns:O,internalRefs:k,tailor:A,getContainerWidth:j,sticky:M,rowHoverable:N=!0}=n,P=l||sY,F=!!P.length,I=D===Pq,L=S.useCallback((e,t)=>ar(b,e)||t,[b]),R=S.useMemo(()=>typeof u==`function`?u:e=>e&&e[u],[u]),z=L([`body`]),[B,V,H]=JJ(),[U,W,ee,te,ne,re]=WJ(n,P,R),ie=d?.x,[ae,G]=S.useState(0),[oe,K,se]=UJ({...n,...U,expandable:!!U.expandedRowRender,columnTitle:U.columnTitle,expandedKeys:ee,getRowKey:R,onTriggerExpand:re,expandIcon:te,expandIconColumnIndex:U.expandIconColumnIndex,direction:p,scrollWidth:I&&A&&typeof ie==`number`?ie:null,clientWidth:ae},I?O:null),ce=se??ie,q=S.useMemo(()=>({columns:oe,flattenColumns:K}),[oe,K]),le=S.useRef(null),ue=S.useRef(null),de=S.useRef(null),fe=S.useRef(null);S.useImperativeHandle(t,()=>({nativeElement:le.current,scrollTo:e=>{if(de.current instanceof HTMLElement){let{index:t,top:n,key:r,offset:i}=e;if(Jq(n))de.current?.scrollTo({top:n});else{let e=r??R(P[t]),n=de.current.querySelector(`[data-row-key="${e}"]`);if(n)if(!i)n.scrollIntoView();else{let e=n.offsetTop;de.current.scrollTo({top:e+i})}}}else de.current?.scrollTo&&de.current.scrollTo(e)}}));let pe=S.useRef(null),[me,he]=S.useState(!1),[ge,_e]=S.useState(!1),[ve,ye]=S.useState(new Map),be=Kq(K).map(e=>ve.get(e)),xe=S.useMemo(()=>be,[be.join(`_`)]),Se=ZJ(xe,K),Ce=d&&qq(d.y),we=d&&qq(ce)||!!U.fixed,Te=we&&K.some(({fixed:e})=>e),Ee=S.useRef(null),{isSticky:De,offsetHeader:Oe,offsetSummary:ke,offsetScroll:Ae,stickyClassName:je,container:Me}=XJ(M,r),Ne=S.useMemo(()=>g?.(P),[g,P]),Pe=(Ce||De)&&S.isValidElement(Ne)&&Ne.type===lJ&&Ne.props.fixed,Fe,Ie,Le;Ce&&(Ie={overflowY:F?`scroll`:`auto`,maxHeight:d.y}),we&&(Fe={overflowX:`auto`},Ce||(Ie={overflowY:`hidden`}),Le={width:ce===!0?`auto`:ce,minWidth:`100%`});let Re=S.useCallback((e,t)=>{ye(n=>{if(n.get(e)!==t){let r=new Map(n);return r.set(e,t),r}return n})},[]),[ze,Be]=qJ(null);function Ve(e,t){t&&(typeof t==`function`?t(e):t.scrollLeft!==e&&(t.scrollLeft=e,t.scrollLeft!==e&&setTimeout(()=>{t.scrollLeft=e},0)))}let[He,Ue]=S.useState([0,0]),We=In(({currentTarget:e,scrollLeft:t})=>{let n=typeof t==`number`?t:e.scrollLeft,r=e||cY;(!Be()||Be()===r)&&(ze(r),Ve(n,ue.current),Ve(n,de.current),Ve(n,pe.current),Ve(n,Ee.current?.setScrollLeft));let i=e||ue.current;if(i){let e=I&&A&&typeof ce==`number`?ce:i.scrollWidth,t=i.clientWidth,r=Math.abs(n);if(Ue(n=>{let i=[r,e-t];return Ti(n,i)?n:i}),e===t){he(!1),_e(!1);return}he(r>0),_e(r{We(e),E?.(e)}),Ke=()=>{we&&de.current?We({currentTarget:kr(de.current),scrollLeft:de.current?.scrollLeft}):(he(!1),_e(!1))},qe=e=>{Ee.current?.checkScrollBarVisible();let t=e??le.current?.offsetWidth??0;I&&j&&le.current&&(t=j(le.current,t)||t),t!==ae&&(Ke(),G(t))};zn(()=>{we&&qe()},[we]);let Je=S.useRef(!1);S.useEffect(()=>{Je.current&&Ke()},[we,l,oe.length]),S.useEffect(()=>{Je.current=!0},[]);let[Ye,Xe]=S.useState(0);zn(()=>{(!A||!I)&&(de.current instanceof Element?Xe(Af(de.current).width):Xe(Af(fe.current).width))},[]),S.useEffect(()=>{I&&k&&(k.body.current=de.current)});let Ze=S.useCallback(e=>S.createElement(S.Fragment,null,S.createElement(LJ,e),Pe===`top`&&S.createElement(uJ,e,Ne)),[Pe,Ne]),Qe=S.useCallback(e=>S.createElement(uJ,e,Ne),[Ne]),$e=L([`table`],`table`),et=S.useMemo(()=>f||(Te?ce===`max-content`?`auto`:`fixed`:Ce||De||K.some(({ellipsis:e})=>e)?`fixed`:`auto`),[Ce,Te,K,f,De]),tt,nt={colWidths:xe,columCount:K.length,stickyOffsets:Se,onHeaderRow:w,fixHeader:Ce,scroll:d},rt=S.useMemo(()=>F?null:typeof x==`function`?x():x,[F,x]),it=S.createElement(EJ,{data:P,measureColumnWidth:Ce||we||De}),at=S.createElement(AJ,{colWidths:K.map(({width:e})=>e),columns:K}),ot=_==null?void 0:S.createElement(`caption`,{className:`${r}-caption`},_),st=Vu(n,{data:!0}),ct=Vu(n,{aria:!0});if(Ce||De){let e;typeof z==`function`?(e=z(P,{scrollbarSize:Ye,ref:de,onScroll:We}),nt.colWidths=K.map(({width:e},t)=>{let n=t===K.length-1?e-Ye:e;return typeof n==`number`&&!Number.isNaN(n)?n:0})):e=S.createElement(`div`,{style:{...Fe,...Ie},onScroll:Ge,ref:de,className:`${r}-body`},S.createElement($e,aY({style:{...Le,tableLayout:et}},ct),ot,at,it,!Pe&&Ne&&S.createElement(uJ,{stickyOffsets:Se,flattenColumns:K},Ne)));let t={noData:!P.length,maxContentScroll:we&&ce===`max-content`,...nt,...q,direction:p,stickyClassName:je,scrollX:ce,tableLayout:et,onScroll:We};tt=S.createElement(S.Fragment,null,y!==!1&&S.createElement(NJ,aY({},t,{stickyTopOffset:Oe,className:`${r}-header`,ref:ue,colGroup:at}),Ze),e,Pe&&Pe!==`top`&&S.createElement(NJ,aY({},t,{stickyBottomOffset:ke,className:`${r}-summary`,ref:pe,colGroup:at}),Qe),De&&de.current&&de.current instanceof Element&&S.createElement(iY,{ref:Ee,offsetScroll:Ae,scrollBodyRef:de,onScroll:We,container:Me,direction:p}))}else tt=S.createElement(`div`,{style:{...Fe,...Ie,...c?.content},className:J(`${r}-content`,s?.content),onScroll:We,ref:de},S.createElement($e,aY({style:{...Le,tableLayout:et}},ct),ot,at,y!==!1&&S.createElement(LJ,aY({},nt,q)),it,Ne&&S.createElement(uJ,{stickyOffsets:Se,flattenColumns:K},Ne)));let lt={...o};De&&(lt[`--columns-count`]=K.length);let ut=S.createElement(`div`,aY({className:J(r,i,{[`${r}-rtl`]:p===`rtl`,[`${r}-fix-start-shadow`]:we,[`${r}-fix-end-shadow`]:we,[`${r}-fix-start-shadow-show`]:we&&me,[`${r}-fix-end-shadow-show`]:we&&ge,[`${r}-layout-fixed`]:f===`fixed`,[`${r}-fixed-header`]:Ce,[`${r}-fixed-column`]:Te,[`${r}-scroll-horizontal`]:we,[`${r}-has-fix-start`]:K[0]?.fixed,[`${r}-has-fix-end`]:K[K.length-1]?.fixed===`end`}),style:lt,id:v,ref:le},st),m&&S.createElement(QJ,{className:J(`${r}-title`,s?.title),style:c?.title},m(P)),S.createElement(`div`,{ref:fe,className:J(`${r}-container`,s?.section),style:c?.section},tt),h&&S.createElement(QJ,{className:J(`${r}-footer`,s?.footer),style:c?.footer},h(P)));we&&(ut=S.createElement(Wr,{onResize:({offsetWidth:e})=>qe(e)},ut));let dt=GJ(K,Se),ft=S.useMemo(()=>({scrollX:ce,scrollInfo:He,classNames:s,styles:c,prefixCls:r,getComponent:L,scrollbarSize:Ye,direction:p,fixedInfoList:dt,isSticky:De,componentWidth:ae,fixHeader:Ce,fixColumn:Te,horizonScroll:we,tableLayout:et,rowClassName:a,expandedRowClassName:U.expandedRowClassName,expandIcon:te,expandableType:W,expandRowByClick:U.expandRowByClick,expandedRowRender:U.expandedRowRender,expandedRowOffset:U.expandedRowOffset,onTriggerExpand:re,expandIconColumnIndex:U.expandIconColumnIndex,indentSize:U.indentSize,allColumnsFixedLeft:K.every(e=>e.fixed===`start`),emptyNode:rt,columns:oe,flattenColumns:K,onColumnResize:Re,colWidths:xe,hoverStartRow:B,hoverEndRow:V,onHover:H,rowExpandable:U.rowExpandable,onRow:C,getRowKey:R,expandedKeys:ee,childrenColumnName:ne,rowHoverable:N,measureRowRender:T}),[ce,He,s,c,r,L,Ye,p,dt,De,ae,Ce,Te,we,et,a,U.expandedRowClassName,te,W,U.expandRowByClick,U.expandedRowRender,U.expandedRowOffset,re,U.expandIconColumnIndex,U.indentSize,rt,oe,K,Re,xe,B,V,H,U.rowExpandable,C,R,ee,ne,N,T]);return S.createElement(Hq.Provider,{value:ft},ut)}),dY=e=>zq(uY,e),fY=dY();fY.EXPAND_COLUMN=Nq,fY.INTERNAL_HOOKS=Pq,fY.Column=fJ,fY.ColumnGroup=pJ,fY.Summary=dJ;var pY=Fq(null),mY=Fq(null);function hY(){return hY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{rowInfo:t,column:n,colIndex:r,indent:i,index:a,component:o,renderIndex:s,record:c,style:l,className:u,inverse:d,getHeight:f}=e,{render:p,dataIndex:m,className:h,width:g}=n,{columnsOffset:_}=Iq(mY,[`columnsOffset`]),{key:v,fixedInfo:y,appendCellNode:b,additionalCellProps:x}=SJ(t,n,r,i,a),{style:C,colSpan:w=1,rowSpan:T=1}=x,E=gY(r-1,w,_),D=w>1?g-E:0,O={...C,...l,flex:`0 0 ${E}px`,width:`${E}px`,marginRight:D,pointerEvents:`auto`},k=S.useMemo(()=>d?T<=1:w===0||T===0||T>1,[T,w,d]);k?O.visibility=`hidden`:d&&(O.height=f?.(T));let A=k?()=>null:p,j={};return(T===0||w===0)&&(j.rowSpan=1,j.colSpan=1),S.createElement(tJ,hY({className:J(h,u),ellipsis:n.ellipsis,align:n.align,scope:n.rowScope,component:o,prefixCls:t.prefixCls,key:v,record:c,index:a,renderIndex:s,dataIndex:m,render:A,shouldCellUpdate:n.shouldCellUpdate},y,{appendNode:b,additionalProps:{...x,style:O,...j}}))};function vY(){return vY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{data:n,index:r,className:i,rowKey:a,style:o,extra:s,getHeight:c,...l}=e,{record:u,indent:d,index:f}=n,{scrollX:p,flattenColumns:m,prefixCls:h,fixColumn:g,componentWidth:_}=Iq(Hq,[`prefixCls`,`flattenColumns`,`fixColumn`,`componentWidth`,`scrollX`]),{getComponent:v}=Iq(pY,[`getComponent`]),y=gJ(u,a,r,d),b=v([`body`,`row`],`div`),x=v([`body`,`cell`],`div`),{rowSupportExpand:C,expanded:w,rowProps:T,expandedRowRender:E,expandedRowClassName:D}=y,O;if(C&&w){let e=E(u,r,d+1,w),t=bJ(D,u,r,d),n={};g&&(n={style:{"--virtual-width":`${_}px`}});let i=`${h}-expanded-row-cell`;O=S.createElement(b,{className:J(`${h}-expanded-row`,`${h}-expanded-row-level-${d+1}`,t)},S.createElement(tJ,{component:x,prefixCls:h,className:J(i,{[`${i}-fixed`]:g}),additionalProps:n},e))}let k={...o,width:p};s&&(k.position=`absolute`,k.pointerEvents=`none`);let A=S.createElement(b,vY({},T,l,{"data-row-key":a,ref:C?null:t,className:J(i,`${h}-row`,T?.className,{[`${h}-row-extra`]:s}),style:{...k,...T?.style}}),m.map((e,t)=>S.createElement(_Y,{key:t,component:x,rowInfo:y,column:e,colIndex:t,indent:d,index:r,renderIndex:f,record:u,inverse:s,getHeight:c})));return C?S.createElement(`div`,{ref:t},A,O):A})),bY=Bq(S.forwardRef((e,t)=>{let{data:n,onScroll:r}=e,{flattenColumns:i,onColumnResize:a,getRowKey:o,expandedKeys:s,prefixCls:c,childrenColumnName:l,scrollX:u,direction:d}=Iq(Hq,[`flattenColumns`,`onColumnResize`,`getRowKey`,`prefixCls`,`expandedKeys`,`childrenColumnName`,`scrollX`,`direction`]),{sticky:f,scrollY:p,listItemHeight:m,getComponent:h,onScroll:g}=Iq(pY),_=S.useRef(null),v=hJ(n,l,s,o),y=S.useMemo(()=>{let e=0;return i.map(({width:t,minWidth:n,key:r})=>{let i=Math.max(t||0,n||0);return e+=i,[r,i,e]})},[i]),b=S.useMemo(()=>y.map(e=>e[2]),[y]);S.useEffect(()=>{y.forEach(([e,t])=>{a(e,t)})},[y]),S.useImperativeHandle(t,()=>{let e={scrollTo:e=>{let{offset:t,...n}=e;t?_.current?.scrollTo({...n,offset:t,align:`top`}):_.current?.scrollTo(e)},nativeElement:_.current?.nativeElement};return Object.defineProperty(e,`scrollLeft`,{get:()=>_.current?.getScrollInfo().x||0,set:e=>{_.current?.scrollTo({left:e})}}),Object.defineProperty(e,`scrollTop`,{get:()=>_.current?.getScrollInfo().y||0,set:e=>{_.current?.scrollTo({top:e})}}),e});let x=(e,t)=>{let n=v[t]?.record,{onCell:r}=e;return r?r(n,t)?.rowSpan??1:1},C=e=>{let{start:t,end:n,getSize:r,offsetY:a}=e;if(n<0)return null;let s=i.filter(e=>x(e,t)===0),c=t;for(let e=t;e>=0;--e)if(s=s.filter(t=>x(t,e)===0),!s.length){c=e;break}let l=i.filter(e=>x(e,n)!==1),u=n;for(let e=n;ex(t,e)!==1),!l.length){u=Math.max(e-1,n);break}let d=[];for(let e=c;e<=u;e+=1)v[e]&&i.some(t=>x(t,e)>1)&&d.push(e);return d.map(e=>{let t=v[e],n=o(t.record,e),i=t=>{let i=e+t-1,a=v[i];if(!a||!a.record){let e=Math.min(i,v.length-1),t=v[e],a=r(n,o(t.record,e));return a.bottom-a.top}let s=r(n,o(a.record,i));return s.bottom-s.top},s=r(n);return S.createElement(yY,{key:e,data:t,rowKey:n,index:e,style:{top:-a+s.top},extra:!0,getHeight:i})})},w=S.useMemo(()=>({columnsOffset:b}),[b]),T=`${c}-tbody`,E=h([`body`,`wrapper`]),D={};return f&&(D.position=`sticky`,D.bottom=0,typeof f==`object`&&f.offsetScroll&&(D.bottom=f.offsetScroll)),S.createElement(mY.Provider,{value:w},S.createElement(VS,{fullHeight:!1,ref:_,prefixCls:`${T}-virtual`,styles:{horizontalScrollBar:D},className:T,height:p,itemHeight:m||24,data:v,itemKey:e=>o(e.record),component:E,scrollWidth:u,direction:d,onVirtualScroll:({x:e})=>{r({currentTarget:_.current?.nativeElement,scrollLeft:e})},onScroll:g,extraRender:C},(e,t,n)=>{let r=o(e.record,t);return S.createElement(yY,{data:e,rowKey:r,index:t,style:n.style})}))}));function xY(){return xY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{ref:n,onScroll:r}=t;return S.createElement(bY,{ref:n,data:e,onScroll:r})},CY=S.forwardRef((e,t)=>{let{data:n,columns:r,scroll:i,sticky:a,prefixCls:o=oY,className:s,listItemHeight:c,components:l,onScroll:u}=e,{x:d,y:f}=i||{};typeof d!=`number`&&(d=1),typeof f!=`number`&&(f=500);let p=In((e,t)=>ar(l,e)||t),m=In(u),h=S.useMemo(()=>({sticky:a,scrollY:f,listItemHeight:c,getComponent:p,onScroll:m}),[a,f,c,p,m]);return S.createElement(pY.Provider,{value:h},S.createElement(fY,xY({},e,{className:J(s,`${o}-virtual`),scroll:{...i,x:d},components:{...l,body:n?.length?SY:void 0},columns:r,internalHooks:Pq,tailor:!0,ref:t})))}),wY=e=>zq(CY,e);wY();var TY=e=>null,EY=e=>null,DY=S.createContext(null),OY=S.createContext({}),kY=S.memo(({prefixCls:e,level:t,isStart:n,isEnd:r})=>{let i=`${e}-indent-unit`,a=[];for(let e=0;e{let{eventKey:t,className:n,style:r,dragOver:i,dragOverGapTop:a,dragOverGapBottom:o,isLeaf:s,isStart:c,isEnd:l,expanded:u,selected:d,checked:f,halfChecked:p,loading:m,domRef:h,active:g,data:_,onMouseMove:v,selectable:y,treeId:b,...x}=e,C=Lf(b,t),w=S.useContext(DY),{classNames:T,styles:E}=w||{},D=S.useContext(OY),O=S.useRef(null),[k,A]=S.useState(!1),j=!!(w.disabled||e.disabled||D.nodeDisabled?.(_)),M=S.useMemo(()=>!w.checkable||e.checkable===!1?!1:w.checkable,[w.checkable,e.checkable]),N=t=>{j||w.onNodeSelect(t,JR(e))},P=t=>{j||!M||e.disableCheckbox||w.onNodeCheck(t,JR(e),!f)},F=S.useMemo(()=>typeof y==`boolean`?y:w.selectable,[y,w.selectable]),I=t=>{w.onNodeClick(t,JR(e)),F?N(t):P(t)},L=t=>{w.onNodeDoubleClick(t,JR(e))},R=t=>{w.onNodeMouseEnter(t,JR(e))},z=t=>{w.onNodeMouseLeave(t,JR(e))},B=t=>{w.onNodeContextMenu(t,JR(e))},V=S.useMemo(()=>!!(w.draggable&&(!w.draggable.nodeDraggable||w.draggable.nodeDraggable(_))),[w.draggable,_]),H=t=>{t.stopPropagation(),A(!0),w.onNodeDragStart(t,e);try{t.dataTransfer.setData(`text/plain`,``)}catch{}},U=t=>{t.preventDefault(),t.stopPropagation(),w.onNodeDragEnter(t,e)},W=t=>{t.preventDefault(),t.stopPropagation(),w.onNodeDragOver(t,e)},ee=t=>{t.stopPropagation(),w.onNodeDragLeave(t,e)},te=t=>{t.stopPropagation(),A(!1),w.onNodeDragEnd(t,e)},ne=t=>{t.preventDefault(),t.stopPropagation(),A(!1),w.onNodeDrop(t,e)},re=t=>{m||w.onNodeExpand(t,JR(e))},ie=S.useMemo(()=>{let{children:e}=LR(w.keyEntities,t)||{};return!!(e||[]).length},[w.keyEntities,t]),ae=S.useMemo(()=>KR(s,w.loadData,ie,e.loaded),[s,w.loadData,ie,e.loaded]);S.useEffect(()=>{m||typeof w.loadData==`function`&&u&&!ae&&!e.loaded&&w.onNodeLoad(JR(e))},[m,w.loadData,w.onNodeLoad,u,ae,e]);let G=S.useMemo(()=>w.draggable?.icon?S.createElement(`span`,{className:`${w.prefixCls}-draggable-icon`},w.draggable.icon):null,[w.draggable]),oe=t=>{let n=e.switcherIcon||w.switcherIcon;return typeof n==`function`?n({...e,isLeaf:t}):n},K=()=>{if(ae){let e=oe(!0);return e===!1?null:S.createElement(`span`,{className:J(`${w.prefixCls}-switcher`,`${w.prefixCls}-switcher-noop`)},e)}let e=oe(!1);return e===!1?null:S.createElement(`span`,{onClick:re,className:J(`${w.prefixCls}-switcher`,`${w.prefixCls}-switcher_${u?jY:MY}`)},e)},se=S.useMemo(()=>{if(!M)return null;let t=typeof M==`boolean`?null:M;return S.createElement(`span`,{className:J(`${w.prefixCls}-checkbox`,{[`${w.prefixCls}-checkbox-checked`]:f,[`${w.prefixCls}-checkbox-indeterminate`]:!f&&p,[`${w.prefixCls}-checkbox-disabled`]:j||e.disableCheckbox}),onClick:P,role:`checkbox`,"aria-checked":p?`mixed`:f,"aria-disabled":j||e.disableCheckbox,"aria-labelledby":C},t)},[M,f,p,j,e.disableCheckbox,C]),ce=S.useMemo(()=>ae?null:u?jY:MY,[ae,u]),q=S.useMemo(()=>S.createElement(`span`,{className:J(T?.itemIcon,`${w.prefixCls}-iconEle`,`${w.prefixCls}-icon__${ce||`docu`}`,{[`${w.prefixCls}-icon_loading`]:m}),style:E?.itemIcon}),[w.prefixCls,ce,m]),le=S.useMemo(()=>{let n=!!w.draggable;return!e.disabled&&n&&w.dragOverNodeKey===t?w.dropIndicatorRender({dropPosition:w.dropPosition,dropLevelOffset:w.dropLevelOffset,indent:w.indent,prefixCls:w.prefixCls,direction:w.direction}):null},[w.dropPosition,w.dropLevelOffset,w.indent,w.prefixCls,w.direction,w.draggable,w.dragOverNodeKey,w.dropIndicatorRender]),ue=S.useMemo(()=>{let{title:t=NY}=e,n=`${w.prefixCls}-node-content-wrapper`,r;if(w.showIcon){let t=e.icon||w.icon;r=t?S.createElement(`span`,{className:J(T?.itemIcon,`${w.prefixCls}-iconEle`,`${w.prefixCls}-icon__customize`),style:E?.itemIcon},typeof t==`function`?t(e):t):q}else w.loadData&&m&&(r=q);let i;return i=typeof t==`function`?t(_):w.titleRender?w.titleRender(_):t,S.createElement(`span`,{ref:O,title:typeof t==`string`?t:``,className:J(n,`${n}-${ce||`normal`}`,{[`${w.prefixCls}-node-selected`]:!j&&(d||k)}),onMouseEnter:R,onMouseLeave:z,onContextMenu:B,onClick:I,onDoubleClick:L},r,S.createElement(`span`,{className:J(`${w.prefixCls}-title`,T?.itemTitle),style:E?.itemTitle},i),le)},[w.prefixCls,w.showIcon,e,w.icon,q,w.titleRender,_,ce,R,z,B,I,L]),de=Vu(x,{aria:!0,data:!0}),{level:fe}=LR(w.keyEntities,t)||{},pe=l[l.length-1],me=!j&&V,he=w.draggingNodeKey===t;return S.createElement(`div`,AY({ref:h,role:`treeitem`,id:C,"aria-expanded":ae?void 0:u,"aria-selected":F&&!j?d:void 0,"aria-checked":M&&!j?p?`mixed`:f:void 0,"aria-disabled":j,className:J(n,`${w.prefixCls}-treenode`,T?.item,{[`${w.prefixCls}-treenode-disabled`]:j,[`${w.prefixCls}-treenode-switcher-${u?`open`:`close`}`]:!s,[`${w.prefixCls}-treenode-checkbox-checked`]:f,[`${w.prefixCls}-treenode-checkbox-indeterminate`]:p,[`${w.prefixCls}-treenode-selected`]:d,[`${w.prefixCls}-treenode-loading`]:m,[`${w.prefixCls}-treenode-active`]:g,[`${w.prefixCls}-treenode-leaf-last`]:pe,[`${w.prefixCls}-treenode-draggable`]:V,dragging:he,"drop-target":w.dropTargetKey===t,"drop-container":w.dropContainerKey===t,"drag-over":!j&&i,"drag-over-gap-top":!j&&a,"drag-over-gap-bottom":!j&&o,"filter-node":w.filterTreeNode?.(JR(e)),[`${w.prefixCls}-treenode-leaf`]:ae}),style:{...r,...E?.item},draggable:me,onDragStart:me?H:void 0,onDragEnter:V?U:void 0,onDragOver:V?W:void 0,onDragLeave:V?ee:void 0,onDrop:V?ne:void 0,onDragEnd:V?te:void 0,onMouseMove:v},de),S.createElement(kY,{prefixCls:w.prefixCls,level:fe,isStart:c,isEnd:l}),G,K(),se,ue)};PY.isTreeNode=1;function FY(e,t){if(!e)return[];let n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function IY(e,t){let n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function LY(e){return e.split(`-`)}function RY(e,t){let n=[],r=LR(t,e);function i(e=[]){e.forEach(({key:e,children:t})=>{n.push(e),i(t)})}return i(r.children),n}function zY(e){if(e.parent){let t=LY(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function BY(e){let t=LY(e.pos);return Number(t[t.length-1])===0}function VY(e,t,n,r,i,a,o,s,c,l){let{clientX:u,clientY:d}=e,{top:f,height:p}=e.target.getBoundingClientRect(),m=((l===`rtl`?-1:1)*((i?.x||0)-u)-12)/r,h=c.filter(e=>s[e]?.children?.length),g=LR(s,n.eventKey);if(de.key===g.key),t=o[e<=0?0:e-1].key;g=LR(s,t)}let _=g.key,v=g,y=g.key,b=0,x=0;if(!h.includes(_))for(let e=0;e-1.5?a({dragNode:S,dropNode:C,dropPosition:1})?b=1:w=!1:a({dragNode:S,dropNode:C,dropPosition:0})?b=0:a({dragNode:S,dropNode:C,dropPosition:1})?b=1:w=!1:a({dragNode:S,dropNode:C,dropPosition:1})?b=1:w=!1,{dropPosition:b,dropLevelOffset:x,dropTargetKey:g.key,dropTargetPos:g.pos,dragOverNodeKey:y,dropContainerKey:b===0?null:g.parent?.key||null,dropAllowed:w}}function HY(e,t){if(!e)return;let{multiple:n}=t;return n?e.slice():e.length?[e[0]]:e}function UY(e){if(!e)return null;let t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(typeof e==`object`)t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return br(!1,"`checkedKeys` is not an array or an object"),null;return t}function WY(e,t){let n=new Set;function r(e){if(n.has(e))return;let i=LR(t,e);if(!i)return;n.add(e);let{parent:a,node:o}=i;o.disabled||a&&r(a.key)}return(e||[]).forEach(e=>{r(e)}),[...n]}var GY={},KY=`SELECT_ALL`,qY=`SELECT_INVERT`,JY=`SELECT_NONE`,YY=[],XY=(e,t,n=[])=>((t||[]).forEach(t=>{n.push(t),hd(t)&&e in t&&XY(e,t[e],n)}),n),ZY=(e,t)=>{let{preserveSelectedRowKeys:n,selectedRowKeys:r,defaultSelectedRowKeys:i,getCheckboxProps:a,getTitleCheckboxProps:o,onChange:s,onSelect:c,onSelectAll:l,onSelectInvert:u,onSelectNone:d,onSelectMultiple:f,columnWidth:p,type:m,selections:h,fixed:g,renderCell:_,hideSelectAll:v,checkStrictly:y=!0}=t||{},{prefixCls:b,data:x,pageData:C,getRecordByKey:w,getRowKey:T,expandType:E,childrenColumnName:D,locale:O,getPopupContainer:k}=e,A=Dr(`Table`),[j,M]=Id(e=>e),[N,P]=Hn(i||YY,r),F=N??YY,I=S.useRef(new Map),L=(0,S.useCallback)(e=>{if(n){let t=new Map;e.forEach(e=>{let n=w(e);!n&&I.current.has(e)&&(n=I.current.get(e)),t.set(e,n)}),I.current=t}},[w,n]);S.useEffect(()=>{L(F)},[F,L]);let R=(0,S.useMemo)(()=>XY(D,C),[D,C]),{keyEntities:z}=(0,S.useMemo)(()=>{if(y)return{keyEntities:null};let e=x;if(n){let t=new Set(R.map(T)),n=Array.from(I.current).reduce((e,[n,r])=>t.has(n)?e:e.concat(r),[]);e=[].concat(Zr(e),Zr(n))}return GR(e,{externalGetKey:T,childrenPropName:D})},[x,T,y,D,n,R]),B=(0,S.useMemo)(()=>{let e=new Map;return R.forEach((t,n)=>{let r=T(t,n),i=(a?a(t):null)||{};e.set(r,i)}),e},[R,T,a]),V=(0,S.useCallback)(e=>{let t=T(e),n;return n=B.has(t)?B.get(T(e)):a?a(e):void 0,!!n?.disabled},[B,T]),[H,U]=(0,S.useMemo)(()=>{if(y)return[F,[]];let{checkedKeys:e,halfCheckedKeys:t}=$R(F,!0,z,V);return[e||[],t]},[F,y,z,V]),W=(0,S.useMemo)(()=>{let e=m===`radio`?H.slice(0,1):H;return new Set(e)},[H,m]),ee=(0,S.useMemo)(()=>m===`radio`?new Set:new Set(U),[U,m]);S.useEffect(()=>{t||P(YY)},[!!t]);let te=(0,S.useCallback)((e,t)=>{let r,i;L(e),n?(r=e,i=e.map(e=>I.current.get(e))):(r=[],i=[],e.forEach(e=>{let t=w(e);t!==void 0&&(r.push(e),i.push(t))})),P(r),s?.(r,i,{type:t})},[P,w,s,n]),ne=(0,S.useCallback)((e,t,n,r)=>{if(c){let i=n.map(w);c(w(e),t,i,r)}te(n,`single`)},[c,w,te]),re=(0,S.useMemo)(()=>!h||v?null:(h===!0?[KY,qY,JY]:h).map(e=>e===`SELECT_ALL`?{key:`all`,text:O.selectionAll,onSelect(){te(x.map((e,t)=>T(e,t)).filter(e=>!B.get(e)?.disabled||W.has(e)),`all`)}}:e===`SELECT_INVERT`?{key:`invert`,text:O.selectInvert,onSelect(){let e=new Set(W);C.forEach((t,n)=>{let r=T(t,n);B.get(r)?.disabled||(e.has(r)?e.delete(r):e.add(r))});let t=Array.from(e);u&&(A.deprecated(!1,`onSelectInvert`,`onChange`),u(t)),te(t,`invert`)}}:e===`SELECT_NONE`?{key:`none`,text:O.selectNone,onSelect(){d?.(),te(Array.from(W).filter(e=>B.get(e)?.disabled),`none`)}}:e).map(e=>({...e,onSelect:(...t)=>{e.onSelect?.(...t),M(null)}})),[h,v,O.selectionAll,O.selectInvert,O.selectNone,B,W,x,C,T,u,te]);return[(0,S.useCallback)(e=>{if(!t)return e.filter(e=>e!==GY);let n=Zr(e),r=new Set(W),i=R.map(T).filter(e=>!B.get(e).disabled),a=i.every(e=>r.has(e)),s=i.some(e=>r.has(e)),c=()=>{let e=[];a?i.forEach(t=>{r.delete(t),e.push(t)}):i.forEach(t=>{r.has(t)||(r.add(t),e.push(t))});let t=Array.from(r);l?.(!a,t.map(w),e.map(w)),te(t,`all`),M(null)},u,d;if(m!==`radio`){let e;if(re){let t={getPopupContainer:k,items:re.map((e,t)=>{let{key:n,text:r,onSelect:a}=e;return{key:n??t,onClick:()=>{a?.(i)},label:r}})};e=S.createElement(`div`,{className:`${b}-selection-extra`},S.createElement(UV,{menu:t,getPopupContainer:k},S.createElement(`span`,null,S.createElement(AC,null))))}let t=R.map((e,t)=>{let n=T(e,t),i=B.get(n)||{};return{checked:r.has(n),...i}}).filter(({disabled:e})=>e),n=!!t.length&&t.length===R.length,l=n&&t.every(({checked:e})=>e),f=n&&t.some(({checked:e})=>e),p=o?.()||{},{onChange:m,disabled:h}=p;d=S.createElement(oz,{"aria-label":e?`Custom selection`:`Select all`,...p,checked:n?l:!!R.length&&a,indeterminate:n?!l&&f:!a&&s,onChange:e=>{c(),m?.(e)},disabled:h??(R.length===0||n),skipGroup:!0}),u=!v&&S.createElement(`div`,{className:`${b}-selection`},d,e)}let x;x=m===`radio`?(e,t,n)=>{let i=T(t,n),a=r.has(i),o=B.get(i);return{node:S.createElement($I,{...o,checked:a,onClick:e=>{e.stopPropagation(),o?.onClick?.(e)},onChange:e=>{r.has(i)||ne(i,!0,[i],e.nativeEvent),o?.onChange?.(e)}}),checked:a}}:(e,t,n)=>{let a=T(t,n),o=r.has(a),s=ee.has(a),c=B.get(a),l;return l=E===`nest`?s:c?.indeterminate??s,{node:S.createElement(oz,{...c,indeterminate:l,checked:o,skipGroup:!0,onClick:e=>{e.stopPropagation(),c?.onClick?.(e)},onChange:e=>{let{nativeEvent:t}=e,{shiftKey:n}=t,s=i.indexOf(a),l=H.some(e=>i.includes(e));if(n&&y&&l){let e=j(s,i,r),t=Array.from(r);f?.(!o,t.map(w),e.map(w)),te(t,`multiple`)}else{let e=H;if(y){let n=o?FY(e,a):IY(e,a);ne(a,!o,n,t)}else{let{checkedKeys:n,halfCheckedKeys:r}=$R([].concat(Zr(e),[a]),!0,z,V),i=n;if(o){let e=new Set(n);e.delete(a),i=$R(Array.from(e),{checked:!1,halfCheckedKeys:r},z,V).checkedKeys}ne(a,!o,i,t)}}M(o?null:s),c?.onChange?.(e)}}),checked:o}};let C=(e,t,n)=>{let{node:r,checked:i}=x(e,t,n);return _?_(i,t,n,r):r};if(!n.includes(GY))if(n.findIndex(e=>e.RC_TABLE_INTERNAL_COL_DEFINE?.columnType===`EXPAND_COLUMN`)===0){let[e,...t]=n;n=[e,GY].concat(Zr(t))}else n=[GY].concat(Zr(n));let D=n.indexOf(GY);n=n.filter((e,t)=>e!==GY||t===D);let O=n[D-1],A=n[D+1],N=g;N===void 0&&(A?.fixed===void 0?O?.fixed!==void 0&&(N=O.fixed):N=A.fixed),N&&O&&O.RC_TABLE_INTERNAL_COL_DEFINE?.columnType===`EXPAND_COLUMN`&&O.fixed===void 0&&(O.fixed=N);let P=J(`${b}-selection-col`,{[`${b}-selection-col-with-dropdown`]:h&&m===`checkbox`}),F={fixed:N,width:p,className:`${b}-selection-column`,title:t?.columnTitle?typeof t.columnTitle==`function`?t.columnTitle(d):t.columnTitle:u,render:C,onCell:t.onCell,align:t.align,[DJ]:{className:P}};return n.map(e=>e===GY?F:e)},[T,R,t,H,W,ee,p,re,E,B,f,ne,V]),W]};function QY(e){return t=>{let{prefixCls:n,onExpand:r,record:i,expanded:a,expandable:o}=t,s=`${n}-row-expand-icon`;return S.createElement(`button`,{type:`button`,onClick:e=>{r(i,e),e.stopPropagation()},className:J(s,{[`${s}-spaced`]:!o,[`${s}-expanded`]:o&&a,[`${s}-collapsed`]:o&&!a}),"aria-label":a?e.collapse:e.expand,"aria-expanded":a})}}function $Y(e){return(t,n)=>{let r=t.querySelector(`.${e}-container`),i=n;if(r){let e=getComputedStyle(r),t=Number.parseInt(e.borderLeftWidth,10),a=Number.parseInt(e.borderRightWidth,10);i=n-t-a}return i}}var eX=(e,t)=>`key`in e&&fd(e.key)?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join(`.`):e.dataIndex:t;function tX(e,t){return t?`${t}-${e}`:`${e}`}var nX=(e,t)=>typeof e==`function`?e(t):e,rX=(e,t)=>{let n=nX(e,t);return Object.prototype.toString.call(n)===`[object Object]`?``:n},iX={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z`}}]},name:`filter`,theme:`filled`};function aX(){return aX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,aX({},e,{ref:t,icon:iX}))),sX=e=>{let{dropPosition:t,dropLevelOffset:n,indent:r}=e,i={pointerEvents:`none`,position:`absolute`,right:0,backgroundColor:`red`,height:2};switch(t){case-1:i.top=0,i.left=-n*r;break;case 1:i.bottom=0,i.left=-n*r;break;case 0:i.bottom=0,i.left=r;break}return S.createElement(`div`,{style:i})};function cX(e,t){let[n,r]=S.useState(!1);zn(()=>{if(n)return e(),()=>{t()}},[n]),zn(()=>(r(!0),()=>{r(!1)}),[])}function lX(){return lX=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:n,style:r,motion:i,motionNodes:a,motionType:o,onMotionStart:s,onMotionEnd:c,active:l,treeNodeRequiredProps:u,...d}=e,[f,p]=S.useState(!0),{prefixCls:m}=S.useContext(DY),h=a&&o!==`hide`;zn(()=>{a&&h!==f&&p(h)},[a]);let g=()=>{a&&s()},_=S.useRef(!1),v=()=>{a&&!_.current&&(_.current=!0,c())};return cX(g,v),a?S.createElement(Iu,lX({ref:t,visible:f},i,{motionAppear:o===`show`,onVisibleChanged:e=>{h===e&&v()}}),({className:e,style:t},n)=>S.createElement(`div`,{ref:n,className:J(`${m}-treenode-motion`,e),style:t},a.map(e=>{let{data:{...t},title:n,key:r,isStart:i,isEnd:a}=e;delete t.children;let o=qR(r,u);return S.createElement(PY,lX({},t,o,{title:n,active:l,data:e.data,key:r,isStart:i,isEnd:a}))}))):S.createElement(PY,lX({domRef:t,className:n,style:r},d,{active:l}))});function dX(e=[],t=[]){let n=e.length,r=t.length;if(Math.abs(n-r)!==1)return{add:!1,key:null};function i(e,t){let n=new Map;e.forEach(e=>{n.set(e,!0)});let r=t.filter(e=>!n.has(e));return r.length===1?r[0]:null}return ne.key===n)+1],i=t.findIndex(e=>e.key===n);if(r){let e=t.findIndex(e=>e.key===r.key);return t.slice(i+1,e)}return t.slice(i+1)}function pX(){return pX=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,data:r,selectable:i,checkable:a,expandedKeys:o,selectedKeys:s,checkedKeys:c,loadedKeys:l,loadingKeys:u,halfCheckedKeys:d,keyEntities:f,disabled:p,dragging:m,dragOverNodeKey:h,dropPosition:g,motion:_,height:v,itemHeight:y,virtual:b,scrollWidth:x,focusable:C,activeItem:w,tabIndex:T,onKeyDown:E,onFocus:D,onBlur:O,onMouseDown:k,onMouseUp:A,onActiveChange:j,onListChangeStart:M,onListChangeEnd:N,...P}=e,F=zf(),I=S.useRef(null),L=S.useRef(null);S.useImperativeHandle(t,()=>({scrollTo:e=>{I.current.scrollTo(e)},getIndentWidth:()=>L.current.offsetWidth}));let[R,z]=S.useState(o),[B,V]=S.useState(r),[H,U]=S.useState(r),[W,ee]=S.useState([]),[te,ne]=S.useState(null),re=S.useRef(r);re.current=r;function ie(){let e=re.current;V(e),U(e),ee([]),ne(null),N()}zn(()=>{z(o);let e=dX(R,o);if(e.key!==null)if(e.add){let t=B.findIndex(({key:t})=>t===e.key),n=vX(fX(B,r,e.key),b,v,y),i=B.slice();i.splice(t+1,0,_X),U(i),ee(n),ne(`show`)}else{let t=r.findIndex(({key:t})=>t===e.key),n=vX(fX(r,B,e.key),b,v,y),i=r.slice();i.splice(t+1,0,_X),U(i),ee(n),ne(`hide`)}else B!==r&&(V(r),U(r))},[o,r]),S.useEffect(()=>{m||ie()},[m]);let ae=_?H:r,G={expandedKeys:o,selectedKeys:s,loadedKeys:l,loadingKeys:u,checkedKeys:c,halfCheckedKeys:d,dragOverNodeKey:h,dropPosition:g,keyEntities:f};return S.createElement(S.Fragment,null,S.createElement(`div`,{className:`${n}-treenode`,"aria-hidden":!0,style:{position:`absolute`,pointerEvents:`none`,visibility:`hidden`,height:0,overflow:`hidden`,border:0,padding:0}},S.createElement(`div`,{className:`${n}-indent`},S.createElement(`div`,{ref:L,className:`${n}-indent-unit`}))),S.createElement(VS,pX({},P,{data:ae,itemKey:yX,height:v,fullHeight:!1,virtual:b,itemHeight:y,scrollWidth:x,prefixCls:`${n}-list`,ref:I,role:`tree`,tabIndex:C!==!1&&!p?T:void 0,"aria-activedescendant":w?Lf(F,w.key):void 0,onKeyDown:E,onFocus:D,onBlur:O,onMouseDown:k,onMouseUp:A,onVisibleChange:e=>{e.every(e=>yX(e)!==mX)&&ie()}}),e=>{let{pos:t,data:{...n},title:r,key:i,isStart:a,isEnd:o}=e,s=BR(i,t);delete n.key,delete n.children;let c=qR(s,G);return S.createElement(uX,pX({},n,c,{title:r,active:!!w&&i===w.key,pos:t,data:e.data,isStart:a,isEnd:o,motion:_,motionNodes:i===mX?W:null,motionType:te,onMotionStart:M,onMotionEnd:ie,treeNodeRequiredProps:G,treeId:F,onMouseMove:()=>{j(null)}}))}))});function xX(){return xX=Object.assign?Object.assign.bind():function(e){for(var t=1;t!0,expandAction:!1};static TreeNode=PY;destroyed=!1;delayedDragEnterLogic;loadingRetryTimes={};state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],activeKey:null,listChanging:!1,prevProps:null,fieldNames:VR()};dragStartMousePosition=null;dragNodeProps=null;currentMouseOverDroppableNodeKey=null;focusedByMouse=!1;listRef=S.createRef();componentDidMount(){this.destroyed=!1,this.onUpdated()}componentDidUpdate(){this.onUpdated()}onUpdated(){let{activeKey:e,itemScrollOffset:t=0}=this.props;e!==void 0&&e!==this.state.activeKey&&(this.setState({activeKey:e}),e!==null&&this.scrollTo({key:e,offset:t}))}componentWillUnmount(){window.removeEventListener(`dragend`,this.onWindowDragEnd),this.destroyed=!0}static getDerivedStateFromProps(e,t){let{prevProps:n}=t,r={prevProps:e};function i(t){return!n&&e.hasOwnProperty(t)||n&&n[t]!==e[t]}let a,{fieldNames:o}=t;if(i(`fieldNames`)&&(o=VR(e.fieldNames),r.fieldNames=o),i(`treeData`)?{treeData:a}=e:i(`children`)&&(br(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),a=HR(e.children)),a){r.treeData=a;let e=GR(a,{fieldNames:o});r.keyEntities={[mX]:gX,...e.keyEntities}}let s=r.keyEntities||t.keyEntities;if(i(`expandedKeys`)||n&&i(`autoExpandParent`))r.expandedKeys=e.autoExpandParent||!n&&e.defaultExpandParent?WY(e.expandedKeys,s):e.expandedKeys;else if(!n&&e.defaultExpandAll){let e={...s};delete e[mX];let t=[];Object.keys(e).forEach(n=>{let r=e[n];r.children&&r.children.length&&t.push(r.key)}),r.expandedKeys=t}else !n&&e.defaultExpandedKeys&&(r.expandedKeys=e.autoExpandParent||e.defaultExpandParent?WY(e.defaultExpandedKeys,s):e.defaultExpandedKeys);if(r.expandedKeys||delete r.expandedKeys,(a||r.expandedKeys)&&(r.flattenNodes=UR(a||t.treeData,r.expandedKeys||t.expandedKeys,o)),e.selectable&&(i(`selectedKeys`)?r.selectedKeys=HY(e.selectedKeys,e):!n&&e.defaultSelectedKeys&&(r.selectedKeys=HY(e.defaultSelectedKeys,e))),e.checkable){let o;if(i(`checkedKeys`)?o=UY(e.checkedKeys)||{}:!n&&e.defaultCheckedKeys?o=UY(e.defaultCheckedKeys)||{}:a&&(o=UY(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),o){let{checkedKeys:t=[],halfCheckedKeys:n=[]}=o;if(!e.checkStrictly){let e=$R(t,!0,s);({checkedKeys:t,halfCheckedKeys:n}=e)}r.checkedKeys=t,r.halfCheckedKeys=n}}return i(`loadedKeys`)&&(r.loadedKeys=e.loadedKeys),r}onNodeDragStart=(e,t)=>{let{expandedKeys:n,keyEntities:r}=this.state,{onDragStart:i}=this.props,{eventKey:a}=t;this.dragNodeProps=t,this.dragStartMousePosition={x:e.clientX,y:e.clientY};let o=FY(n,a);this.setState({draggingNodeKey:a,dragChildrenKeys:RY(a,r),indent:this.listRef.current.getIndentWidth()}),this.setExpandedKeys(o),window.addEventListener(`dragend`,this.onWindowDragEnd),i?.({event:e,node:JR(t)})};onNodeDragEnter=(e,t)=>{let{expandedKeys:n,keyEntities:r,dragChildrenKeys:i,flattenNodes:a,indent:o}=this.state,{onDragEnter:s,onExpand:c,allowDrop:l,direction:u}=this.props,{pos:d,eventKey:f}=t;if(this.currentMouseOverDroppableNodeKey!==f&&(this.currentMouseOverDroppableNodeKey=f),!this.dragNodeProps){this.resetDragState();return}let{dropPosition:p,dropLevelOffset:m,dropTargetKey:h,dropContainerKey:g,dropTargetPos:_,dropAllowed:v,dragOverNodeKey:y}=VY(e,this.dragNodeProps,t,o,this.dragStartMousePosition,l,a,r,n,u);if(i.includes(h)||!v){this.resetDragState();return}if(this.delayedDragEnterLogic||={},Object.keys(this.delayedDragEnterLogic).forEach(e=>{clearTimeout(this.delayedDragEnterLogic[e])}),this.dragNodeProps.eventKey!==t.eventKey&&(e.persist(),this.delayedDragEnterLogic[d]=window.setTimeout(()=>{if(this.state.draggingNodeKey===null)return;let i=[...n],a=LR(r,t.eventKey);a&&(a.children||[]).length&&(i=IY(n,t.eventKey)),this.props.hasOwnProperty(`expandedKeys`)||this.setExpandedKeys(i),c?.(i,{node:JR(t),expanded:!0,nativeEvent:e.nativeEvent})},800)),this.dragNodeProps.eventKey===h&&m===0){this.resetDragState();return}this.setState({dragOverNodeKey:y,dropPosition:p,dropLevelOffset:m,dropTargetKey:h,dropContainerKey:g,dropTargetPos:_,dropAllowed:v}),s?.({event:e,node:JR(t),expandedKeys:n})};onNodeDragOver=(e,t)=>{let{dragChildrenKeys:n,flattenNodes:r,keyEntities:i,expandedKeys:a,indent:o}=this.state,{onDragOver:s,allowDrop:c,direction:l}=this.props;if(!this.dragNodeProps)return;let{dropPosition:u,dropLevelOffset:d,dropTargetKey:f,dropContainerKey:p,dropTargetPos:m,dropAllowed:h,dragOverNodeKey:g}=VY(e,this.dragNodeProps,t,o,this.dragStartMousePosition,c,r,i,a,l);n.includes(f)||!h||(this.dragNodeProps.eventKey===f&&d===0?this.state.dropPosition===null&&this.state.dropLevelOffset===null&&this.state.dropTargetKey===null&&this.state.dropContainerKey===null&&this.state.dropTargetPos===null&&this.state.dropAllowed===!1&&this.state.dragOverNodeKey===null||this.resetDragState():u===this.state.dropPosition&&d===this.state.dropLevelOffset&&f===this.state.dropTargetKey&&p===this.state.dropContainerKey&&m===this.state.dropTargetPos&&h===this.state.dropAllowed&&g===this.state.dragOverNodeKey||this.setState({dropPosition:u,dropLevelOffset:d,dropTargetKey:f,dropContainerKey:p,dropTargetPos:m,dropAllowed:h,dragOverNodeKey:g}),s?.({event:e,node:JR(t)}))};onNodeDragLeave=(e,t)=>{this.currentMouseOverDroppableNodeKey===t.eventKey&&!e.currentTarget.contains(e.relatedTarget)&&(this.resetDragState(),this.currentMouseOverDroppableNodeKey=null);let{onDragLeave:n}=this.props;n?.({event:e,node:JR(t)})};onWindowDragEnd=e=>{this.onNodeDragEnd(e,null,!0),window.removeEventListener(`dragend`,this.onWindowDragEnd)};onNodeDragEnd=(e,t)=>{let{onDragEnd:n}=this.props;this.setState({dragOverNodeKey:null}),this.cleanDragState(),n?.({event:e,node:JR(t)}),this.dragNodeProps=null,window.removeEventListener(`dragend`,this.onWindowDragEnd)};onNodeDrop=(e,t,n=!1)=>{let{dragChildrenKeys:r,dropPosition:i,dropTargetKey:a,dropTargetPos:o,dropAllowed:s}=this.state;if(!s)return;let{onDrop:c}=this.props;if(this.setState({dragOverNodeKey:null}),this.cleanDragState(),a===null)return;let l={...qR(a,this.getTreeNodeRequiredProps()),active:this.getActiveItem()?.key===a,data:LR(this.state.keyEntities,a).node};br(!r.includes(a),`Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.`);let u=LY(o),d={event:e,node:JR(l),dragNode:this.dragNodeProps?JR(this.dragNodeProps):null,dragNodesKeys:[this.dragNodeProps.eventKey].concat(r),dropToGap:i!==0,dropPosition:i+Number(u[u.length-1])};n||c?.(d),this.dragNodeProps=null};resetDragState(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}cleanDragState=()=>{let{draggingNodeKey:e}=this.state;e!==null&&this.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),this.dragStartMousePosition=null,this.currentMouseOverDroppableNodeKey=null};triggerExpandActionExpand=(e,t)=>{let{expandedKeys:n,flattenNodes:r}=this.state,{expanded:i,key:a,isLeaf:o}=t;if(o||e.shiftKey||e.metaKey||e.ctrlKey)return;let s=r.filter(e=>e.key===a)[0],c=JR({...qR(a,this.getTreeNodeRequiredProps()),data:s.data});this.setExpandedKeys(i?FY(n,a):IY(n,a)),this.onNodeExpand(e,c)};onNodeClick=(e,t)=>{let{onClick:n,expandAction:r}=this.props;r===`click`&&this.triggerExpandActionExpand(e,t),n?.(e,t)};onNodeDoubleClick=(e,t)=>{let{onDoubleClick:n,expandAction:r}=this.props;r===`doubleClick`&&this.triggerExpandActionExpand(e,t),n?.(e,t)};onNodeSelect=(e,t)=>{let{selectedKeys:n}=this.state,{keyEntities:r,fieldNames:i}=this.state,{onSelect:a,multiple:o}=this.props,{selected:s}=t,c=t[i.key],l=!s;n=l?o?IY(n,c):[c]:FY(n,c);let u=n.map(e=>{let t=LR(r,e);return t?t.node:null}).filter(Boolean);this.setUncontrolledState({selectedKeys:n}),a?.(n,{event:`select`,selected:l,node:t,selectedNodes:u,nativeEvent:e.nativeEvent})};onNodeCheck=(e,t,n)=>{let{keyEntities:r,checkedKeys:i,halfCheckedKeys:a}=this.state,{checkStrictly:o,onCheck:s}=this.props,{key:c}=t,l,u={event:`check`,node:t,checked:n,nativeEvent:e.nativeEvent};if(o){let e=n?IY(i,c):FY(i,c);l={checked:e,halfChecked:FY(a,c)},u.checkedNodes=e.map(e=>LR(r,e)).filter(Boolean).map(e=>e.node),this.setUncontrolledState({checkedKeys:e})}else{let{checkedKeys:e,halfCheckedKeys:t}=$R([...i,c],!0,r);if(!n){let n=new Set(e);n.delete(c),{checkedKeys:e,halfCheckedKeys:t}=$R(Array.from(n),{checked:!1,halfCheckedKeys:t},r)}l=e,u.checkedNodes=[],u.checkedNodesPositions=[],u.halfCheckedKeys=t,e.forEach(e=>{let t=LR(r,e);if(!t)return;let{node:n,pos:i}=t;u.checkedNodes.push(n),u.checkedNodesPositions.push({node:n,pos:i})}),this.setUncontrolledState({checkedKeys:e},!1,{halfCheckedKeys:t})}s?.(l,u)};onNodeLoad=e=>{let{key:t}=e,{keyEntities:n}=this.state;if(LR(n,t)?.children?.length)return;let r=new Promise((n,r)=>{this.setState(({loadedKeys:i=[],loadingKeys:a=[]})=>{let{loadData:o,onLoad:s}=this.props;return!o||i.includes(t)||a.includes(t)?null:(o(e).then(()=>{let{loadedKeys:r}=this.state,i=IY(r,t);s?.(i,{event:`load`,node:e}),this.setUncontrolledState({loadedKeys:i}),this.setState(e=>({loadingKeys:FY(e.loadingKeys,t)})),n()}).catch(e=>{if(this.setState(e=>({loadingKeys:FY(e.loadingKeys,t)})),this.loadingRetryTimes[t]=(this.loadingRetryTimes[t]||0)+1,this.loadingRetryTimes[t]>=SX){let{loadedKeys:e}=this.state;br(!1,"Retry for `loadData` many times but still failed. No more retry."),this.setUncontrolledState({loadedKeys:IY(e,t)}),n()}r(e)}),{loadingKeys:IY(a,t)})})});return r.catch(()=>{}),r};onNodeMouseEnter=(e,t)=>{let{onMouseEnter:n}=this.props;n?.({event:e,node:t})};onNodeMouseLeave=(e,t)=>{let{onMouseLeave:n}=this.props;n?.({event:e,node:t})};onNodeContextMenu=(e,t)=>{let{onRightClick:n}=this.props;n&&(e.preventDefault(),n({event:e,node:t}))};onMouseDown=e=>{this.focusedByMouse=!0;let{onMouseDown:t}=this.props;t?.(e)};onMouseUp=e=>{this.focusedByMouse=!1;let{onMouseUp:t}=this.props;t?.(e)};onFocus=(...e)=>{let{onFocus:t,disabled:n}=this.props,{activeKey:r,selectedKeys:i,flattenNodes:a}=this.state;if(!this.focusedByMouse&&!n&&r===null){let e=i.find(e=>a.some(t=>t.key===e));e===void 0?this.onActiveChange(a?.[0]?.key||null):this.onActiveChange(e)}t?.(...e)};onBlur=(...e)=>{this.focusedByMouse=!1;let{onBlur:t}=this.props;this.onActiveChange(null),t?.(...e)};getTreeNodeRequiredProps=()=>{let{expandedKeys:e,selectedKeys:t,loadedKeys:n,loadingKeys:r,checkedKeys:i,halfCheckedKeys:a,dragOverNodeKey:o,dropPosition:s,keyEntities:c}=this.state;return{expandedKeys:e||[],selectedKeys:t||[],loadedKeys:n||[],loadingKeys:r||[],checkedKeys:i||[],halfCheckedKeys:a||[],dragOverNodeKey:o,dropPosition:s,keyEntities:c}};setExpandedKeys=e=>{let{treeData:t,fieldNames:n}=this.state,r=UR(t,e,n);this.setUncontrolledState({expandedKeys:e,flattenNodes:r},!0)};onNodeExpand=(e,t)=>{let{expandedKeys:n}=this.state,{listChanging:r,fieldNames:i}=this.state,{onExpand:a,loadData:o}=this.props,{expanded:s}=t,c=t[i.key];if(r)return;let l=n.includes(c),u=!s;if(br(s&&l||!s&&!l,`Expand state not sync with index check`),n=u?IY(n,c):FY(n,c),this.setExpandedKeys(n),a?.(n,{node:t,expanded:u,nativeEvent:e.nativeEvent}),u&&o){let e=this.onNodeLoad(t);e&&e.then(()=>{let e=UR(this.state.treeData,n,i);this.setUncontrolledState({flattenNodes:e})}).catch(()=>{let{expandedKeys:e}=this.state,t=FY(e,c);this.setExpandedKeys(t)})}};onListChangeStart=()=>{this.setUncontrolledState({listChanging:!0})};onListChangeEnd=()=>{setTimeout(()=>{this.setUncontrolledState({listChanging:!1})})};onActiveChange=e=>{let{activeKey:t}=this.state,{onActiveChange:n,itemScrollOffset:r=0}=this.props;t!==e&&(this.setState({activeKey:e}),e!==null&&this.scrollTo({key:e,offset:r}),n?.(e))};getActiveItem=()=>{let{activeKey:e,flattenNodes:t}=this.state;return e===null?null:t.find(({key:t})=>t===e)||null};offsetActiveKey=e=>{let{flattenNodes:t,activeKey:n}=this.state,r=t.findIndex(({key:e})=>e===n);r===-1&&e<0&&(r=t.length),r=(r+e+t.length)%t.length;let i=t[r];if(i){let{key:e}=i;this.onActiveChange(e)}else this.onActiveChange(null)};onKeyDown=e=>{let{activeKey:t,expandedKeys:n,checkedKeys:r,flattenNodes:i,keyEntities:a}=this.state,{onKeyDown:o,checkable:s,selectable:c,disabled:l,loadData:u}=this.props;if(l)return;switch(e.key){case`ArrowUp`:this.offsetActiveKey(-1),e.preventDefault();break;case`ArrowDown`:this.offsetActiveKey(1),e.preventDefault();break;case`Home`:this.onActiveChange(i?.[0]?.key),e.preventDefault();break;case`End`:this.onActiveChange(i?.[i.length-1]?.key),e.preventDefault();break}let d=this.getActiveItem();if(d&&d.data){let i=JR({...qR(t,this.getTreeNodeRequiredProps()),data:d.data,active:!0}),o=!!LR(a,t)?.children?.length,l=!KR(d.data.isLeaf,u,o,i.loaded),f=s&&!i.disabled&&i.checkable!==!1&&!i.disableCheckbox,p=!s&&c&&!i.disabled&&i.selectable!==!1;switch(e.key){case`ArrowLeft`:l&&n.includes(t)?this.onNodeExpand({},i):d.parent&&this.onActiveChange(d.parent.key),e.preventDefault();break;case`ArrowRight`:l&&!n.includes(t)?this.onNodeExpand({},i):d.children&&d.children.length&&this.onActiveChange(d.children[0].key),e.preventDefault();break;case`Enter`:l?(e.preventDefault(),this.onNodeExpand({},i)):f?r.includes(t)||(e.preventDefault(),this.onNodeCheck({},i,!0)):p&&!i.selected&&(e.preventDefault(),this.onNodeSelect({},i));break;case` `:f?(e.preventDefault(),this.onNodeCheck({},i,!r.includes(t))):p&&(e.preventDefault(),this.onNodeSelect({},i));break}}o?.(e)};setUncontrolledState=(e,t=!1,n=null)=>{if(!this.destroyed){let r=!1,i=!0,a={};Object.keys(e).forEach(t=>{if(this.props.hasOwnProperty(t)){i=!1;return}r=!0,a[t]=e[t]}),r&&(!t||i)&&this.setState({...a,...n})}};scrollTo=e=>{this.listRef.current.scrollTo(e)};render(){let{flattenNodes:e,keyEntities:t,draggingNodeKey:n,dropLevelOffset:r,dropContainerKey:i,dropTargetKey:a,dropPosition:o,dragOverNodeKey:s,indent:c}=this.state,{prefixCls:l,className:u,style:d,styles:f,classNames:p,showLine:m,focusable:h,tabIndex:g=0,selectable:_,showIcon:v,icon:y,switcherIcon:b,draggable:x,checkable:C,checkStrictly:w,disabled:T,motion:E,loadData:D,filterTreeNode:O,height:k,itemHeight:A,scrollWidth:j,virtual:M,titleRender:N,dropIndicatorRender:P,onContextMenu:F,onScroll:I,direction:L,rootClassName:R,rootStyle:z}=this.props,B=Vu(this.props,{aria:!0,data:!0}),V;x&&(V=typeof x==`object`?x:typeof x==`function`?{nodeDraggable:x}:{});let H={styles:f,classNames:p,prefixCls:l,selectable:_,showIcon:v,icon:y,switcherIcon:b,draggable:V,draggingNodeKey:n,checkable:C,checkStrictly:w,disabled:T,keyEntities:t,dropLevelOffset:r,dropContainerKey:i,dropTargetKey:a,dropPosition:o,dragOverNodeKey:s,indent:c,direction:L,dropIndicatorRender:P,loadData:D,filterTreeNode:O,titleRender:N,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return S.createElement(DY.Provider,{value:H},S.createElement(`div`,{className:J(l,u,R,{[`${l}-show-line`]:m}),style:z},S.createElement(bX,xX({ref:this.listRef,prefixCls:l,style:d,data:e,disabled:T,selectable:_,checkable:!!C,motion:E,dragging:n!==null,height:k,itemHeight:A,virtual:M,focusable:h,tabIndex:g,activeItem:this.getActiveItem(),onFocus:this.onFocus,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:F,onScroll:I,scrollWidth:j},this.getTreeNodeRequiredProps(),B))))}},wX={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z`}}]},name:`file`,theme:`outlined`};function TX(){return TX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,TX({},e,{ref:t,icon:wX}))),DX={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z`}}]},name:`folder-open`,theme:`outlined`};function OX(){return OX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,OX({},e,{ref:t,icon:DX}))),AX={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z`}}]},name:`folder`,theme:`outlined`};function jX(){return jX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,jX({},e,{ref:t,icon:AX}))),NX={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z`}}]},name:`holder`,theme:`outlined`};function PX(){return PX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,PX({},e,{ref:t,icon:NX}))),IX=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:n,directoryNodeSelectedColor:r,motionDurationMid:i,borderRadius:a,controlItemBgHover:o})=>({[`${e}${e}-directory ${t}`]:{[`${e}-node-content-wrapper`]:{position:`static`,[`&:has(${e}-drop-indicator)`]:{position:`relative`},[`> *:not(${e}-drop-indicator)`]:{position:`relative`},"&:hover":{background:`transparent`},"&:before":{position:`absolute`,inset:0,transition:`background-color ${i}`,content:`""`,borderRadius:a},"&:hover:before":{background:o}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:n,borderRadius:a,[`${e}-switcher, ${e}-draggable-icon`]:{color:r},[`${e}-node-content-wrapper`]:{color:r,background:`transparent`,"&, &:hover":{color:r},"&:before, &:hover:before":{background:n}}}}}),LX=new Lo(`ant-tree-node-fx-do-not-use`,{"0%":{opacity:0},"100%":{opacity:1}}),RX=(e,t)=>({[`.${e}-switcher-icon`]:{display:`inline-block`,fontSize:10,verticalAlign:`baseline`,svg:{transition:`transform ${t.motionDurationSlow}`}}}),zX=(e,t)=>({[`.${e}-drop-indicator`]:{position:`absolute`,zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:`none`,"&:after":{position:`absolute`,top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:`transparent`,border:`${Y(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:`50%`,content:`""`}}}),BX=(e,t)=>{let{treeCls:n,treeNodeCls:r,treeNodePadding:i,titleHeight:a,indentSize:o,switcherSize:s,motionDurationMid:c,nodeSelectedBg:l,nodeHoverBg:u,colorTextQuaternary:d,controlItemBgActiveDisabled:f}=t;return{[n]:{...Jc(t),"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:`rtl`},[`&${n}-rtl ${n}-switcher_close ${n}-switcher-icon svg`]:{transform:`rotate(90deg)`},[`${n}-list`]:{"&:focus-visible":{outline:`none`,[`${r}-active ${n}-node-content-wrapper`]:{...Zc(t)}}},[`${n}-list-holder-inner`]:{alignItems:`flex-start`},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:`stretch`,[`${n}-node-content-wrapper`]:{flex:`auto`},[`${r}.dragging:after`]:{position:`absolute`,inset:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:LX,animationDuration:t.motionDurationSlow,animationPlayState:`running`,animationFillMode:`forwards`,content:`""`,pointerEvents:`none`,borderRadius:t.borderRadius}}},[r]:{display:`flex`,alignItems:`flex-start`,marginBottom:i,lineHeight:Y(a),position:`relative`,"&:before":{content:`""`,position:`absolute`,zIndex:1,insetInlineStart:0,width:`100%`,top:`100%`,height:i},[`&-disabled ${n}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:`not-allowed`,"&:hover":{background:`transparent`}},[`${n}-checkbox-disabled + ${n}-node-selected,&${r}-disabled${r}-selected ${n}-node-content-wrapper`]:{backgroundColor:f},[`${n}-checkbox-disabled`]:{pointerEvents:`unset`},[`&:not(${r}-disabled)`]:{[`${n}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${n}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${r}-disabled).filter-node ${n}-title`]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:`grab`,[`${n}-draggable-icon`]:{flexShrink:0,width:s,textAlign:`center`,visibility:`visible`,color:d},[`&${r}-disabled ${n}-draggable-icon`]:{visibility:`hidden`}}},[`${n}-indent`]:{alignSelf:`stretch`,whiteSpace:`nowrap`,userSelect:`none`,"&-unit":{display:`inline-block`,width:o}},[`${n}-draggable-icon`]:{visibility:`hidden`},[`${n}-switcher, ${n}-checkbox`]:{marginInlineEnd:t.calc(t.calc(s).sub(t.controlInteractiveSize)).div(2).equal()},[`${n}-checkbox`]:{flexShrink:0,alignSelf:`flex-start`,marginBlockStart:t.calc(t.calc(a).sub(t.controlInteractiveSize)).div(2).equal()},[`${n}-switcher`]:{...RX(e,t),position:`relative`,flex:`none`,alignSelf:`stretch`,width:s,textAlign:`center`,cursor:`pointer`,userSelect:`none`,transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:`unset`},"&:before":{pointerEvents:`none`,content:`""`,width:s,height:a,position:`absolute`,left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${n}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${n}-switcher-icon svg`]:{transform:`rotate(-90deg)`},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:`relative`,zIndex:1,display:`inline-block`,width:`100%`,height:`100%`,"&:before":{position:`absolute`,top:0,insetInlineEnd:t.calc(s).div(2).equal(),bottom:t.calc(i).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:`""`},"&:after":{position:`absolute`,width:t.calc(t.calc(s).div(2).equal()).mul(.8).equal(),height:t.calc(a).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:`""`}}},[`${n}-node-content-wrapper`]:{position:`relative`,minHeight:a,paddingBlock:0,paddingInline:t.paddingXS,background:`transparent`,borderRadius:t.borderRadius,cursor:`pointer`,transition:[`all ${c}`,`border 0s`,`line-height 0s`,`box-shadow 0s`].join(`, `),...zX(e,t),"&:hover":{backgroundColor:u},[`&${n}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:l},[`${n}-iconEle`]:{display:`inline-block`,width:s,height:a,textAlign:`center`,verticalAlign:`top`,"&:empty":{display:`none`}}},[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:`transparent`},[`${r}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${t.colorPrimary}`},"&-show-line":{[`${n}-indent-unit`]:{position:`relative`,height:`100%`,"&:before":{position:`absolute`,top:0,insetInlineEnd:t.calc(s).div(2).equal(),bottom:t.calc(i).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:`""`},"&-end:before":{display:`none`}},[`${n}-switcher`]:{background:`transparent`,"&-line-icon":{verticalAlign:`-0.15em`}}},[`${r}-leaf-last ${n}-switcher-leaf-line:before`]:{top:`auto !important`,bottom:`auto !important`,height:`${Y(t.calc(a).div(2).equal())} !important`}}}},VX=(e,t,n=!0)=>{let r=`.${e}`,i=gs(t,{treeCls:r,treeNodeCls:`${r}-treenode`,treeNodePadding:t.calc(t.paddingXS).div(2).equal()});return[BX(e,i),n&&IX(i)].filter(Boolean)},HX=e=>{let{controlHeightSM:t,controlItemBgHover:n,controlItemBgActive:r}=e,i=t;return{titleHeight:i,switcherSize:i,indentSize:i,nodeHoverBg:n,nodeHoverColor:e.colorText,nodeSelectedBg:r,nodeSelectedColor:e.colorText}},UX=rl(`Tree`,(e,{prefixCls:t})=>[{[e.componentCls]:tz(`${t}-checkbox`,e)},VX(t,e),bh(e)],e=>{let{colorTextLightSolid:t,colorPrimary:n}=e;return{...HX(e),directoryNodeSelectedColor:t,directoryNodeSelectedBg:n}}),WX=e=>{let{dropPosition:t,dropLevelOffset:n,prefixCls:r,indent:i,direction:a=`ltr`}=e,o=a===`ltr`?`left`:`right`,s=a===`ltr`?`right`:`left`,c={[o]:-n*i+4,[s]:0};switch(t){case-1:c.top=-3;break;case 1:c.bottom=-3;break;default:c.bottom=-3,c[o]=i+4;break}return S.createElement(`div`,{style:c,className:`${r}-drop-indicator`})},GX={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z`}}]},name:`caret-down`,theme:`filled`};function KX(){return KX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,KX({},e,{ref:t,icon:GX}))),JX={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}},{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`minus-square`,theme:`outlined`};function YX(){return YX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,YX({},e,{ref:t,icon:JX}))),ZX={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}},{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`plus-square`,theme:`outlined`};function QX(){return QX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,QX({},e,{ref:t,icon:ZX}))),eZ=e=>{let{prefixCls:t,switcherIcon:n,treeNodeProps:r,showLine:i,switcherLoadingIcon:a}=e,{isLeaf:o,expanded:s,loading:c}=r;if(c)return S.isValidElement(a)?a:S.createElement(xm,{className:`${t}-switcher-loading-icon`});let l;if(hd(i)&&(l=i.showLeafIcon),o){if(!i)return null;if(typeof l!=`boolean`&&l){let e=typeof l==`function`?l(r):l,n=`${t}-switcher-line-custom-icon`;return S.isValidElement(e)?Pp(e,{className:J(e.props?.className,n)}):e}return l?S.createElement(EX,{className:`${t}-switcher-line-icon`}):S.createElement(`span`,{className:`${t}-switcher-leaf-line`})}let u=`${t}-switcher-icon`,d=typeof n==`function`?n(r):n;return S.isValidElement(d)?Pp(d,{className:J(d.props?.className,i?`${t}-switcher-line-icon`:u)}):d===void 0?i?s?S.createElement(XX,{className:`${t}-switcher-line-icon`}):S.createElement($X,{className:`${t}-switcher-line-icon`}):S.createElement(qX,{className:u}):d},tZ=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,className:i,style:a,classNames:o,styles:s}=li(`tree`),{virtual:c}=S.useContext(oi),{prefixCls:l,className:u,showIcon:d=!1,showLine:f,switcherIcon:p,switcherLoadingIcon:m,blockNode:h=!1,children:g,checkable:_=!1,selectable:v=!0,draggable:y,disabled:b,motion:x,style:C,rootClassName:w,classNames:T,styles:E,icon:D}=e,O=S.useContext(zp),k=b??O,A=n(`tree`,l),j=n(),M=x??{...Wm(j),motionAppear:!1},N={...e,showIcon:d,blockNode:h,checkable:_,selectable:v,disabled:k,motion:M},[P,F]=Fd([o,T],[s,E],{props:N}),I={...N,showLine:!!f,icon:D,dropIndicatorRender:WX},[L,R]=UX(A),[,z]=Kc(),B=z.paddingXS/2+(z.Tree?.titleHeight||z.controlHeightSM),V=S.useMemo(()=>{if(!y)return!1;let e={};switch(typeof y){case`function`:e.nodeDraggable=y;break;case`object`:e={...y};break;default:break}return e.icon!==!1&&(e.icon=e.icon||S.createElement(FX,null)),e},[y]),H=e=>S.createElement(eZ,{prefixCls:A,switcherIcon:p,switcherLoadingIcon:m,treeNodeProps:e,showLine:f});return S.createElement(CX,{itemHeight:B,ref:t,virtual:c,...I,prefixCls:A,className:J({[`${A}-icon-hide`]:!d,[`${A}-block-node`]:h,[`${A}-unselectable`]:!v,[`${A}-rtl`]:r===`rtl`,[`${A}-disabled`]:k},i,u,L,R),style:{...a,...C},rootClassName:J(P.root,w),rootStyle:F.root,classNames:P,styles:F,direction:r,checkable:_&&S.createElement(`span`,{className:`${A}-checkbox-inner`}),selectable:v,switcherIcon:H,draggable:V},g)}),nZ=0,rZ=1,iZ=2;function aZ(e,t,n){let{key:r,children:i}=n;function a(e){let a=e[r],o=e[i];t(a,e)!==!1&&aZ(o||[],t,n)}e.forEach(a)}function oZ({treeData:e,expandedKeys:t,startKey:n,endKey:r,fieldNames:i}){let a=[],o=nZ;if(n&&n===r)return[n];if(!n||!r)return[];function s(e){return e===n||e===r}return aZ(e,e=>{if(o===iZ)return!1;if(s(e)){if(a.push(e),o===nZ)o=rZ;else if(o===rZ)return o=iZ,!1}else o===rZ&&a.push(e);return t.includes(e)},VR(i)),a}function sZ(e,t,n){let r=Zr(t),i=[];return aZ(e,(e,t)=>{let n=r.indexOf(e);return n!==-1&&(i.push(t),r.splice(n,1)),!!r.length},VR(n)),i}function cZ(e){let{isLeaf:t,expanded:n}=e;return t?S.createElement(EX,null):n?S.createElement(kX,null):S.createElement(MX,null)}function lZ({treeData:e,children:t}){return e||HR(t)}var uZ=S.forwardRef((e,t)=>{let{defaultExpandAll:n,defaultExpandParent:r,defaultExpandedKeys:i,...a}=e,o=S.useRef(null),s=S.useRef(null),c=()=>{let{keyEntities:e}=GR(lZ(a),{fieldNames:a.fieldNames}),t,o=a.expandedKeys||i||[];return t=n?Object.keys(e):r?WY(o,e):o,t},[l,u]=S.useState(a.selectedKeys||a.defaultSelectedKeys||[]),[d,f]=S.useState(()=>c());S.useEffect(()=>{`selectedKeys`in a&&u(a.selectedKeys)},[a.selectedKeys]),S.useEffect(()=>{`expandedKeys`in a&&f(a.expandedKeys)},[a.expandedKeys]);let p=(e,t)=>(`expandedKeys`in a||f(e),a.onExpand?.(e,t)),m=(e,t)=>{let{multiple:n,fieldNames:r}=a,{node:i,nativeEvent:c}=t,{key:l=``}=i,f=lZ(a),p={...t,selected:!0},m=c?.ctrlKey||c?.metaKey,h=c?.shiftKey,g;n&&m?(g=e,o.current=l,s.current=g,p.selectedNodes=sZ(f,g,r)):n&&h?(g=Array.from(new Set([].concat(Zr(s.current||[]),Zr(oZ({treeData:f,expandedKeys:d,startKey:l,endKey:o.current,fieldNames:r}))))),p.selectedNodes=sZ(f,g,r)):(g=[l],o.current=l,s.current=g,p.selectedNodes=sZ(f,g,r)),a.onSelect?.(g,p),`selectedKeys`in a||u(g)},{getPrefixCls:h,direction:g}=S.useContext(oi),{prefixCls:_,className:v,showIcon:y=!0,expandAction:b=`click`,...x}=a,C=h(`tree`,_),w=J(`${C}-directory`,{[`${C}-directory-rtl`]:g===`rtl`},v);return S.createElement(tZ,{icon:cZ,ref:t,blockNode:!0,...x,showIcon:y,expandAction:b,prefixCls:C,className:w,expandedKeys:d,selectedKeys:l,onSelect:m,onExpand:p})}),dZ=tZ;dZ.DirectoryTree=uZ,dZ.TreeNode=PY;var fZ=e=>{let{value:t,filterSearch:n,tablePrefixCls:r,locale:i,onChange:a}=e;return n?S.createElement(`div`,{className:`${r}-filter-dropdown-search`},S.createElement(yB,{prefix:S.createElement(NC,null),placeholder:i.filterSearchPlaceholder,onChange:a,value:t,htmlSize:1,className:`${r}-filter-dropdown-search-input`})):null},pZ=e=>{let{keyCode:t}=e;t===om.ENTER&&e.stopPropagation()},mZ=S.forwardRef((e,t)=>S.createElement(`div`,{className:e.className,onClick:e=>e.stopPropagation(),onKeyDown:pZ,ref:t},e.children));function hZ(e){let t=[];return(e||[]).forEach(({value:e,children:n})=>{t.push(e),n&&(t=[].concat(Zr(t),Zr(hZ(n))))}),t}function gZ(e){return e.some(({children:e})=>e)}var _Z=(e,t)=>typeof t==`string`||pd(t)?t.toString().toLowerCase().includes(e):!1,vZ=e=>{let{filters:t,prefixCls:n,filteredKeys:r,filterMultiple:i,searchValue:a,normalizedSearchValue:o,filterSearch:s}=e;return t.map((e,t)=>{let c=String(e.value);if(e.children)return{key:c||t,label:e.text,popupClassName:`${n}-dropdown-submenu`,children:vZ({filters:e.children,prefixCls:n,filteredKeys:r,filterMultiple:i,searchValue:a,normalizedSearchValue:o,filterSearch:s})};let l=i?oz:$I,u={key:e.value===void 0?t:c,label:S.createElement(S.Fragment,null,S.createElement(l,{checked:r.includes(c)}),S.createElement(`span`,null,e.text))};return o?typeof s==`function`?s(o,e)?u:null:_Z(o,e.text)?u:null:u})};function yZ(e){return e||[]}var bZ=e=>{let{tablePrefixCls:t,prefixCls:n,column:r,dropdownPrefixCls:i,columnKey:a,filterOnClose:o,filterMultiple:s,filterMode:c=`menu`,filterSearch:l=!1,filterState:u,triggerFilter:d,locale:f,children:p,getPopupContainer:m,rootClassName:h}=e,{filterResetToDefaultFilteredValue:g,defaultFilteredValue:_,filterDropdownProps:v={},filterDropdownOpen:y,onFilterDropdownOpenChange:b}=r,[x,C]=S.useState(!1),w=S.useContext(gw),T=!!(u&&(u.filteredKeys?.length||u.forceFiltered)),E=e=>{C(e),v.onOpenChange?.(e),b?.(e)},D=v.open??y??x,O=u?.filteredKeys,[k,A]=Hd(yZ(O)),j=({selectedKeys:e})=>{A(e)},M=(e,{node:t,checked:n})=>{j(s?{selectedKeys:e}:{selectedKeys:n&&t.key?[t.key]:[]})};S.useEffect(()=>{x&&j({selectedKeys:yZ(O)})},[O]);let[N,P]=S.useState([]),F=e=>{P(e)},[I,L]=S.useState(``),R=S.useMemo(()=>I.trim().toLowerCase(),[I]),z=e=>{let{value:t}=e.target;L(t)};S.useEffect(()=>{x||L(``)},[x]);let B=e=>{let t=e?.length?e:null;if(t===null&&(!u||!u.filteredKeys)||Ti(t,u?.filteredKeys,!0))return null;d({column:r,key:a,filteredKeys:t})},V=()=>{E(!1),B(k())},H=({confirm:e,closeDropdown:t}={confirm:!1,closeDropdown:!1})=>{e&&B([]),t&&E(!1),L(``),A(g?(_||[]).map(String):[])},U=({closeDropdown:e}={closeDropdown:!0})=>{e&&E(!1),B(k())},W=(e,t)=>{t.source===`trigger`&&(e&&O!==void 0&&A(yZ(O)),E(e),!e&&!r.filterDropdown&&o&&V())},ee=J({[`${i}-menu-without-submenu`]:!gZ(r.filters||[])}),te=e=>{e.target.checked?A(hZ(r?.filters).map(String)):A([])},ne=({filters:e})=>(e||[]).map((e,t)=>{let n=String(e.value),r={title:e.text,key:e.value===void 0?String(t):n};return e.children&&(r.children=ne({filters:e.children})),r}),re=e=>({...e,text:e.title,value:e.key,children:e.children?.map(re)||[]}),ie,{direction:ae,renderEmpty:G}=S.useContext(oi);if(typeof r.filterDropdown==`function`)ie=r.filterDropdown({prefixCls:`${i}-custom`,setSelectedKeys:e=>j({selectedKeys:e}),selectedKeys:k(),confirm:U,clearFilters:H,filters:r.filters,visible:D,close:()=>{E(!1)}});else if(r.filterDropdown)ie=r.filterDropdown;else{let e=k()||[];ie=S.createElement(S.Fragment,null,(()=>{let a=G?.(`Table.filter`)??S.createElement(pC,{image:pC.PRESENTED_IMAGE_SIMPLE,description:f.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:`16px 0`}});if((r.filters||[]).length===0)return a;if(c===`tree`)return S.createElement(S.Fragment,null,S.createElement(fZ,{filterSearch:l,value:I,onChange:z,tablePrefixCls:t,locale:f}),S.createElement(`div`,{className:`${t}-filter-dropdown-tree`},s?S.createElement(oz,{checked:e.length===hZ(r.filters).length,indeterminate:e.length>0&&e.lengthtypeof l==`function`?l(I,re(e)):_Z(R,e.title):void 0})));let o=vZ({filters:r.filters||[],filterSearch:l,prefixCls:n,filteredKeys:k(),filterMultiple:s,searchValue:I,normalizedSearchValue:R}),u=o.every(e=>e===null);return S.createElement(S.Fragment,null,S.createElement(fZ,{filterSearch:l,value:I,onChange:z,tablePrefixCls:t,locale:f}),u?a:S.createElement(GE,{selectable:!0,multiple:s,prefixCls:`${i}-menu`,className:ee,onSelect:j,onDeselect:j,selectedKeys:e,getPopupContainer:m,openKeys:N,onOpenChange:F,items:o}))})(),S.createElement(`div`,{className:`${n}-dropdown-btns`},S.createElement(Zg,{type:`link`,size:`small`,disabled:g?Ti((_||[]).map(String),e,!0):e.length===0,onClick:()=>H()},f.filterReset),S.createElement(Zg,{type:`primary`,size:`small`,onClick:V},f.filterConfirm)))}r.filterDropdown&&(ie=S.createElement(PE,{selectable:void 0},ie)),ie=S.createElement(mZ,{className:`${n}-dropdown`},ie);let oe=(()=>{let e;return e=typeof r.filterIcon==`function`?r.filterIcon(T):r.filterIcon?r.filterIcon:S.createElement(oX,null),S.createElement(`span`,{role:`button`,tabIndex:-1,className:J(`${n}-trigger`,{active:T}),onClick:e=>{e.stopPropagation()}},e)})();if(w)return S.createElement(`div`,{className:`${n}-column`},S.createElement(`span`,{className:`${t}-column-title`},p),oe);let K=dd({trigger:[`click`],placement:ae===`rtl`?`bottomLeft`:`bottomRight`,children:oe,getPopupContainer:m},{...v,rootClassName:J(h,v.rootClassName),open:D,onOpenChange:W,popupRender:()=>typeof v?.dropdownRender==`function`?v.dropdownRender(ie):ie});return S.createElement(`div`,{className:`${n}-column`},S.createElement(`span`,{className:`${t}-column-title`},p),S.createElement(UV,{...K}))},xZ=(e,t,n)=>{let r=[];return(e||[]).forEach((e,i)=>{let a=tX(i,n),o=e.filterDropdown!==void 0;if(e.filters||o||`onFilter`in e)if(`filteredValue`in e){let t=e.filteredValue;o||(t=t?.map(String)??t),r.push({column:e,key:eX(e,a),filteredKeys:t,forceFiltered:e.filtered})}else r.push({column:e,key:eX(e,a),filteredKeys:t&&e.defaultFilteredValue?e.defaultFilteredValue:void 0,forceFiltered:e.filtered});`children`in e&&(r=[].concat(Zr(r),Zr(xZ(e.children,t,a))))}),r};function SZ(e,t,n,r,i,a,o,s,c){return n.map((n,l)=>{let u=tX(l,s),{filterOnClose:d=!0,filterMultiple:f=!0,filterMode:p,filterSearch:m}=n,h=n;if(h.filters||h.filterDropdown){let s=eX(h,u),l=r.find(({key:e})=>s===e);h={...h,title:r=>S.createElement(bZ,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:h,columnKey:s,filterState:l,filterOnClose:d,filterMultiple:f,filterMode:p,filterSearch:m,triggerFilter:a,locale:i,getPopupContainer:o,rootClassName:c},nX(n.title,r))}}return`children`in h&&(h={...h,children:SZ(e,t,h.children,r,i,a,o,u,c)}),h})}var CZ=e=>{let t={};return e.forEach(({key:e,filteredKeys:n,column:r})=>{let i=e,{filters:a,filterDropdown:o}=r;o?t[i]=n||null:Array.isArray(n)?t[i]=hZ(a).filter(e=>n.includes(String(e))):t[i]=null}),t},wZ=(e,t,n)=>t.reduce((e,r)=>{let{column:{onFilter:i,filters:a},filteredKeys:o}=r;if(i&&o&&o.length){let r=hZ(a),s=new Map;r.forEach(e=>{let t=String(e);s.has(t)||s.set(t,e)});let c=o.map(e=>{let t=String(e);return s.get(t)??e});return(e=>e.reduce((e,r)=>{let a={...r};return a[n]&&(a[n]=wZ(a[n],t,n)),c.some(e=>i(e,a))&&e.push(a),e},[]))(e)}return e},e),TZ=e=>e.flatMap(e=>`children`in e?[e].concat(Zr(TZ(e.children||[]))):[e]),EZ=e=>{let{prefixCls:t,dropdownPrefixCls:n,mergedColumns:r,onFilterChange:i,getPopupContainer:a,locale:o,rootClassName:s}=e;Dr(`Table`);let c=S.useMemo(()=>TZ(r||[]),[r]),[l,u]=S.useState(()=>xZ(c,!0)),d=S.useMemo(()=>{let e=xZ(c,!1);if(e.length===0)return e;let t=!0;if(e.forEach(({filteredKeys:e})=>{e!==void 0&&(t=!1)}),t){let e=(c||[]).map((e,t)=>eX(e,tX(t)));return l.filter(({key:t})=>e.includes(t)).map(t=>{let n=c[e.indexOf(t.key)];return{...t,column:{...t.column,...n},forceFiltered:n.filtered}})}return e},[c,l]),f=S.useMemo(()=>CZ(d),[d]),p=e=>{let t=d.filter(({key:t})=>t!==e.key);t.push(e),u(t),i(CZ(t),t)};return[e=>SZ(t,n,e,d,o,p,a,void 0,s),d,f]},DZ=(e,t,n)=>{let r=S.useRef({});function i(i){if(!r.current||r.current.data!==e||r.current.childrenColumnName!==t||r.current.getRowKey!==n){let i=new Map;function a(e){e.forEach((e,r)=>{let o=n(e,r);i.set(o,e),hd(e)&&t in e&&a(e[t]||[])})}a(e),r.current={data:e,childrenColumnName:t,kvMap:i,getRowKey:n}}return r.current.kvMap?.get(i)}return[i]};function OZ(e,t){let n={current:e.current,pageSize:e.pageSize},r=hd(t)?t:{};return Object.keys(r).forEach(t=>{let r=e[t];typeof r!=`function`&&(n[t]=r)}),n}function kZ(e,t,n){let{total:r=0,...i}=hd(n)?n:{},[a,o]=(0,S.useState)(()=>({current:`defaultCurrent`in i?i.defaultCurrent:1,pageSize:`defaultPageSize`in i?i.defaultPageSize:10})),s=dd(a,i,{total:r>0?r:e}),c=Math.ceil((r||e)/s.pageSize);s.current>c&&(s.current=c||1);let l=(e,t)=>{o({current:e??1,pageSize:t||s.pageSize})},u=(e,r)=>{n&&n.onChange?.(e,r),l(e,r),t(e,r||s?.pageSize)};return n===!1?[{},()=>{}]:[{...s,onChange:u},l]}var AZ={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z`}}]},name:`caret-down`,theme:`outlined`};function jZ(){return jZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,jZ({},e,{ref:t,icon:AZ}))),NZ={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z`}}]},name:`caret-up`,theme:`outlined`};function PZ(){return PZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,PZ({},e,{ref:t,icon:NZ}))),IZ=`ascend`,LZ=`descend`,RZ=e=>e.sorter&&typeof e.sorter==`object`&&pd(e.sorter.multiple)?e.sorter.multiple:!1,zZ=e=>typeof e==`function`?e:hd(e)&&e.compare?e.compare:!1,BZ=(e,t)=>t?e[e.indexOf(t)+1]:e[0],VZ=(e,t,n)=>{let r=[],i=(e,t)=>{r.push({column:e,key:eX(e,t),multiplePriority:RZ(e),sortOrder:e.sortOrder})};return(e||[]).forEach((e,a)=>{let o=tX(a,n);e.children?(`sortOrder`in e&&i(e,o),r=[].concat(Zr(r),Zr(VZ(e.children,t,o)))):e.sorter&&(`sortOrder`in e?i(e,o):t&&e.defaultSortOrder&&r.push({column:e,key:eX(e,o),multiplePriority:RZ(e),sortOrder:e.defaultSortOrder}))}),r},HZ=(e,t,n,r,i,a,o,s,c)=>(t||[]).map((t,l)=>{let u=tX(l,s),d=t;if(d.sorter){let s=d.sortDirections||i,l=d.showSorterTooltip===void 0?o:d.showSorterTooltip,f=eX(d,u),p=n.find(({key:e})=>e===f),m=p?p.sortOrder:null,h=BZ(s,m),g;if(t.sortIcon)g=t.sortIcon({sortOrder:m});else{let t=s.includes(IZ)&&S.createElement(FZ,{className:J(`${e}-column-sorter-up`,{active:m===IZ})}),n=s.includes(LZ)&&S.createElement(MZ,{className:J(`${e}-column-sorter-down`,{active:m===LZ})});g=S.createElement(`span`,{className:J(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(t&&n)})},S.createElement(`span`,{className:`${e}-column-sorter-inner`,"aria-hidden":`true`},t,n))}let{cancelSort:_,triggerAsc:v,triggerDesc:y}=a||{},b=_;h===LZ?b=y:h===IZ&&(b=v);let x=hd(l)?{title:b,...l}:{title:b};d={...d,className:J(d.className,{[`${e}-column-sort`]:m}),title:n=>{let r=`${e}-column-sorters`,i=S.createElement(`span`,{className:`${e}-column-title`},nX(t.title,n)),a=S.createElement(`div`,{className:r},i,g);return l?typeof l!=`boolean`&&l?.target===`sorter-icon`?S.createElement(`div`,{className:J(r,`${r}-tooltip-target-sorter`)},i,S.createElement(Ow,{...x},g)):S.createElement(Ow,{...x},a):a},onHeaderCell:n=>{let i=t.onHeaderCell?.(n)||{},a=i.onClick,o=i.onKeyDown;i.onClick=e=>{r({column:t,key:f,sortOrder:h,multiplePriority:RZ(t)}),a?.(e)},i.onKeyDown=e=>{e.keyCode===om.ENTER&&(r({column:t,key:f,sortOrder:h,multiplePriority:RZ(t)}),o?.(e))};let s=rX(t.title,{}),l=s?.toString();return m&&(i[`aria-sort`]=m===`ascend`?`ascending`:`descending`),i[`aria-description`]=c?.sortable,i[`aria-label`]=l||``,i.className=J(i.className,`${e}-column-has-sorters`),i.tabIndex=0,t.ellipsis&&(i.title=(s??``).toString()),i}}}return`children`in d&&(d={...d,children:HZ(e,d.children,n,r,i,a,o,u,c)}),d}),UZ=e=>{let{column:t,sortOrder:n}=e;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}},WZ=e=>{let t=e.filter(({sortOrder:e})=>e).map(UZ);return t.length===0&&e.length?{...UZ(e[e.length-1]),column:void 0,order:void 0,field:void 0,columnKey:void 0}:t.length<=1?t[0]||{}:t},GZ=(e,t,n)=>{let r=t.slice().sort((e,t)=>t.multiplePriority-e.multiplePriority),i=e.slice(),a=r.filter(({column:{sorter:e},sortOrder:t})=>zZ(e)&&t);return a.length?i.sort((e,t)=>{for(let n=0;n{let r=e[n];return r?{...e,[n]:GZ(r,t,n)}:e}):i},KZ=e=>{let{prefixCls:t,mergedColumns:n,sortDirections:r,tableLocale:i,showSorterTooltip:a,onSorterChange:o,globalLocale:s}=e,[c,l]=S.useState(()=>VZ(n,!0)),u=(e,t)=>{let n=[];return e.forEach((e,r)=>{let i=tX(r,t);if(n.push(eX(e,i)),Array.isArray(e.children)){let t=u(e.children,i);n.push.apply(n,Zr(t))}}),n},d=S.useMemo(()=>{let e=!0,t=VZ(n,!1);if(!t.length){let e=u(n);return c.filter(({key:t})=>e.includes(t))}let r=[];function i(t){e?r.push(t):r.push({...t,sortOrder:null})}let a=null;return t.forEach(t=>{a===null?(i(t),t.sortOrder&&(t.multiplePriority===!1?e=!1:a=!0)):(a&&t.multiplePriority!==!1||(e=!1),i(t))}),r},[n,c]),f=S.useMemo(()=>{let e=d.map(({column:e,sortOrder:t})=>({column:e,order:t}));return{sortColumns:e,sortColumn:e[0]?.column,sortOrder:e[0]?.order}},[d]),p=e=>{let t;t=e.multiplePriority===!1||!d.length||d[0].multiplePriority===!1?[e]:[].concat(Zr(d.filter(({key:t})=>t!==e.key)),[e]),l(t),o(WZ(t),t)};return[e=>HZ(t,e,d,p,r,i,a,void 0,s),d,f,()=>WZ(d)]},qZ=(e,t)=>e.map(e=>{let n={...e};return n.title=nX(e.title,t),`children`in n&&(n.children=qZ(n.children,t)),n}),JZ=e=>[S.useCallback(t=>qZ(t,e),[e])],YZ=dY((e,t)=>{let{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),XZ=wY((e,t)=>{let{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),ZZ=e=>{let{componentCls:t,lineWidth:n,lineType:r,tableBorderColor:i,tableHeaderBg:a,tablePaddingVertical:o,tablePaddingHorizontal:s,calc:c}=e,l=`${Y(n)} ${r} ${i}`,u=(e,r,i)=>({[`&${t}-${e}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"> table > tbody > tr > th, > table > tbody > tr > td":{[`> ${t}-expanded-row-fixed`]:{margin:`${Y(c(r).mul(-1).equal())} ${Y(c(c(i).add(n)).mul(-1).equal())}`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:{[`> ${t}-title`]:{border:l,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:l,borderTop:l,[`> ${t}-content, > ${t}-header, > ${t}-body, > ${t}-summary`]:{"> table":{"> thead > tr > th, > thead > tr > td, > tbody > tr > th, > tbody > tr > td, > tfoot > tr > th, > tfoot > tr > td":{borderInlineEnd:l},"> thead":{"> tr:not(:last-child) > th":{borderBottom:l},"> tr > th::before":{backgroundColor:`transparent !important`}},"> thead > tr, > tbody > tr, > tfoot > tr":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:l}},"> tbody > tr > th, > tbody > tr > td":{[`> ${t}-expanded-row-fixed`]:{margin:`${Y(c(o).mul(-1).equal())} ${Y(c(c(s).add(n)).mul(-1).equal())}`,"&::after":{position:`absolute`,top:0,insetInlineEnd:n,bottom:0,borderInlineEnd:l,content:`""`}}}}}},[`&${t}-scroll-horizontal`]:{[`> ${t}-container > ${t}-body`]:{"> table > tbody":{[` > tr${t}-expanded-row, > tr${t}-placeholder - `]:{"> th, > td":{borderInlineEnd:0}}}}},...u(`medium`,e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle),...u(`small`,e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall),[`> ${t}-footer`]:{border:l,borderTop:0}},[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${Y(n)} 0 ${Y(n)} ${a}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:l}}}},tQ=e=>{let{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:{...qc,wordBreak:`keep-all`,[` + `]:{"> th, > td":{borderInlineEnd:0}}}}},...u(`medium`,e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle),...u(`small`,e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall),[`> ${t}-footer`]:{border:l,borderTop:0}},[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${Y(n)} 0 ${Y(n)} ${a}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:l}}}},QZ=e=>{let{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:{...qc,wordBreak:`keep-all`,[` &${t}-cell-fix-start-shadow, &${t}-cell-fix-end-shadow - `]:{overflow:`visible`,[`${t}-cell-content`]:{...qc,display:`block`}},[`${t}-column-title`]:{...qc,wordBreak:`keep-all`}}}}},nQ=e=>{let{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:`center`,color:e.colorTextDisabled,"&:hover > th, &:hover > td":{background:e.colorBgContainer}}}}},rQ=e=>{let{componentCls:t,antCls:n,motionDurationSlow:r,lineWidth:i,paddingXS:a,lineType:o,tableBorderColor:s,tableExpandIconBg:c,tableExpandColumnWidth:l,borderRadius:u,tablePaddingVertical:d,tablePaddingHorizontal:f,tableExpandedRowBg:p,paddingXXS:m,expandIconMarginTop:h,expandIconSize:g,expandIconHalfInner:_,expandIconScale:v,calc:y}=e,b=`${Y(i)} ${o} ${s}`,x=y(m).sub(i).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:l},[`${t}-row-expand-icon-cell`]:{textAlign:`center`,[`${t}-row-expand-icon`]:{display:`inline-flex`,float:`none`,verticalAlign:`sub`}},[`${t}-row-indent`]:{height:1,float:`left`},[`${t}-row-expand-icon`]:{...nl(e),position:`relative`,float:`left`,width:g,height:g,color:`inherit`,lineHeight:Y(g),background:c,border:b,borderRadius:u,transform:`scale(${v})`,"&:focus, &:hover, &:active":{borderColor:`currentcolor`},"&::before, &::after":{position:`absolute`,background:`currentcolor`,transition:`transform ${r} ease-out`,content:`""`},"&::before":{top:_,insetInlineEnd:x,insetInlineStart:x,height:i},"&::after":{top:x,bottom:x,insetInlineStart:_,width:i,transform:`rotate(90deg)`},"&-collapsed::before":{transform:`rotate(-180deg)`},"&-collapsed::after":{transform:`rotate(0deg)`},"&-spaced":{"&::before, &::after":{display:`none`,content:`none`},background:`transparent`,border:0,visibility:`hidden`}},[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:h,marginInlineEnd:a},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:p}},[`${n}-descriptions-view`]:{display:`flex`,table:{flex:`auto`,width:`100%`}}},[`${t}-expanded-row-fixed`]:{position:`relative`,margin:`${Y(y(d).mul(-1).equal())} ${Y(y(f).mul(-1).equal())}`,padding:`${Y(d)} ${Y(f)}`}}}},iQ=e=>{let{componentCls:t,antCls:n,iconCls:r,tableFilterDropdownWidth:i,tableFilterDropdownSearchWidth:a,paddingXXS:o,paddingXS:s,colorText:c,lineWidth:l,lineType:u,tableBorderColor:d,headerIconColor:f,fontSizeSM:p,tablePaddingHorizontal:m,borderRadius:h,motionDurationSlow:g,colorIcon:_,colorPrimary:v,tableHeaderFilterActiveBg:y,colorTextDisabled:b,tableFilterDropdownBg:x,tableFilterDropdownHeight:S,controlItemBgHover:C,controlItemBgActive:w,boxShadowSecondary:T,filterDropdownMenuBg:E,calc:D}=e,O=`${n}-dropdown`,k=`${t}-filter-dropdown`,A=`${n}-tree`,j=`${Y(l)} ${u} ${d}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:`flex`,justifyContent:`space-between`},[`${t}-filter-trigger`]:{position:`relative`,display:`flex`,alignItems:`center`,marginBlock:D(o).mul(-1).equal(),marginInline:`${Y(o)} ${Y(D(m).div(2).mul(-1).equal())}`,padding:`0 ${Y(o)}`,color:f,fontSize:p,borderRadius:h,cursor:`pointer`,transition:`all ${g}`,"&:hover":{color:_,background:y},"&.active":{color:v}}}},{[`${n}-dropdown`]:{[k]:{...Jc(e),minWidth:i,backgroundColor:x,borderRadius:h,boxShadow:T,overflow:`hidden`,[`${O}-menu`]:{maxHeight:S,overflowX:`hidden`,border:0,boxShadow:`none`,borderRadius:`unset`,backgroundColor:E,"&:empty::after":{display:`block`,padding:`${Y(s)} 0`,color:b,fontSize:p,textAlign:`center`,content:`"Not Found"`}},[`${k}-tree`]:{paddingBlock:`${Y(s)} 0`,paddingInline:s,[A]:{padding:0},[`${A}-treenode ${A}-node-content-wrapper:hover`]:{backgroundColor:C},[`${A}-treenode-checkbox-checked ${A}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:w}}},[`${k}-search`]:{padding:s,borderBottom:j,"&-input":{input:{minWidth:a},[r]:{color:b}}},[`${k}-checkall`]:{width:`100%`,marginBottom:o,marginInlineStart:o},[`${k}-btns`]:{display:`flex`,justifyContent:`space-between`,padding:`${Y(D(s).sub(l).equal())} ${Y(s)}`,overflow:`hidden`,borderTop:j}}}},{[`${n}-dropdown ${k}, ${k}-submenu`]:{[`${n}-checkbox-wrapper + span`]:{paddingInlineStart:s,color:c},"> ul":{maxHeight:`calc(100vh - 130px)`,overflowX:`hidden`,overflowY:`auto`}}}]};function aQ({colorSplit:e}){return[{boxShadow:`inset 10px 0 8px -8px ${e}`},{boxShadow:`inset -10px 0 8px -8px ${e}`}]}var oQ=e=>{let{componentCls:t,lineWidth:n,motionDurationSlow:r,zIndexTableFixed:i,tableBg:a,calc:o}=e,s=`${t}-cell`,c=`${s}-fix`,l={position:`absolute`,top:0,bottom:o(n).mul(-1).equal(),width:30,transition:`box-shadow ${r}`,content:`""`,pointerEvents:`none`},[u,d]=aQ(e);return{[`${t}-wrapper`]:{[`${s}${c}`]:{position:`sticky`},[c]:{zIndex:`calc(var(--z-offset-reverse) + ${i})`,background:a,"&:after":l,"&-start:after":{insetInlineStart:`100%`},"&-end:after":{insetInlineEnd:`100%`},"&-start-shadow-show:after":u,"&-end-shadow-show:after":d},[`${t}-container`]:{position:`relative`,"&:before, &:after":{...l,zIndex:`calc(var(--columns-count) * 2 + ${i} + 1)`},"&:before":{insetInlineStart:0},"&:after":{insetInlineEnd:0}},[`${t}-has-fix-start ${t}-container:before`]:{display:`none`},[`${t}-has-fix-end ${t}-container:after`]:{display:`none`},[`${t}-fix-start-shadow-show ${t}-container:before`]:u,[`${t}-fix-end-shadow-show ${t}-container:after`]:d}}},sQ=e=>{let{componentCls:t,antCls:n,margin:r}=e;return{[`${t}-wrapper`]:{[`${t}-pagination${n}-pagination`]:{margin:`${Y(r)} 0`},[`${t}-pagination`]:{display:`flex`,flexWrap:`wrap`,rowGap:e.paddingXS,"> *":{flex:`none`},"&-start":{justifyContent:`flex-start`},"&-center":{justifyContent:`center`},"&-end":{justifyContent:`flex-end`}}}}},cQ=e=>{let{componentCls:t,tableRadius:n}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${Y(n)} ${Y(n)} 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${t}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:n,borderStartEndRadius:n,"&::before":{borderStartStartRadius:n},"&::after":{borderStartEndRadius:n},[`> ${t}-content`]:{borderStartStartRadius:n,borderStartEndRadius:n},"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:n},"> *:last-child":{borderStartEndRadius:n}}},"&-footer":{borderRadius:`0 0 ${Y(n)} ${Y(n)}`}}}}},lQ=e=>{let{componentCls:t}=e,[n,r]=aQ(e);return{[`${t}-wrapper-rtl`]:{direction:`rtl`,table:{direction:`rtl`},[`${t}-row-expand-icon`]:{float:`right`,"&::after":{transform:`rotate(-90deg)`},"&-collapsed::before":{transform:`rotate(180deg)`},"&-collapsed::after":{transform:`rotate(0deg)`}},[`${t}-cell-fix`]:{"&-start-shadow-show:after":r,"&-end-shadow-show:after":n},[`${t}-container`]:{[`${t}-row-indent`]:{float:`right`}},[`${t}-fix-start-shadow-show ${t}-container:before`]:r,[`${t}-fix-end-shadow-show ${t}-container:after`]:n}}},uQ=e=>{let{componentCls:t,antCls:n,iconCls:r,fontSizeIcon:i,padding:a,paddingXS:o,headerIconColor:s,headerIconHoverColor:c,tableSelectionColumnWidth:l,tableSelectedRowBg:u,tableSelectedRowHoverBg:d,tableRowHoverBg:f,tablePaddingHorizontal:p,calc:m}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:l,[`&${t}-selection-col-with-dropdown`]:{width:m(l).add(i).add(m(a).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:m(l).add(m(o).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:m(l).add(i).add(m(a).div(4)).add(m(o).mul(2)).equal()}},[` + `]:{overflow:`visible`,[`${t}-cell-content`]:{...qc,display:`block`}},[`${t}-column-title`]:{...qc,wordBreak:`keep-all`}}}}},$Z=e=>{let{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:`center`,color:e.colorTextDisabled,"&:hover > th, &:hover > td":{background:e.colorBgContainer}}}}},eQ=e=>{let{componentCls:t,antCls:n,motionDurationSlow:r,lineWidth:i,paddingXS:a,lineType:o,tableBorderColor:s,tableExpandIconBg:c,tableExpandColumnWidth:l,borderRadius:u,tablePaddingVertical:d,tablePaddingHorizontal:f,tableExpandedRowBg:p,paddingXXS:m,expandIconMarginTop:h,expandIconSize:g,expandIconHalfInner:_,expandIconScale:v,calc:y}=e,b=`${Y(i)} ${o} ${s}`,x=y(m).sub(i).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:l},[`${t}-row-expand-icon-cell`]:{textAlign:`center`,[`${t}-row-expand-icon`]:{display:`inline-flex`,float:`none`,verticalAlign:`sub`}},[`${t}-row-indent`]:{height:1,float:`left`},[`${t}-row-expand-icon`]:{...nl(e),position:`relative`,float:`left`,width:g,height:g,color:`inherit`,lineHeight:Y(g),background:c,border:b,borderRadius:u,transform:`scale(${v})`,"&:focus, &:hover, &:active":{borderColor:`currentcolor`},"&::before, &::after":{position:`absolute`,background:`currentcolor`,transition:`transform ${r} ease-out`,content:`""`},"&::before":{top:_,insetInlineEnd:x,insetInlineStart:x,height:i},"&::after":{top:x,bottom:x,insetInlineStart:_,width:i,transform:`rotate(90deg)`},"&-collapsed::before":{transform:`rotate(-180deg)`},"&-collapsed::after":{transform:`rotate(0deg)`},"&-spaced":{"&::before, &::after":{display:`none`,content:`none`},background:`transparent`,border:0,visibility:`hidden`}},[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:h,marginInlineEnd:a},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:p}},[`${n}-descriptions-view`]:{display:`flex`,table:{flex:`auto`,width:`100%`}}},[`${t}-expanded-row-fixed`]:{position:`relative`,margin:`${Y(y(d).mul(-1).equal())} ${Y(y(f).mul(-1).equal())}`,padding:`${Y(d)} ${Y(f)}`}}}},tQ=e=>{let{componentCls:t,antCls:n,iconCls:r,tableFilterDropdownWidth:i,tableFilterDropdownSearchWidth:a,paddingXXS:o,paddingXS:s,colorText:c,lineWidth:l,lineType:u,tableBorderColor:d,headerIconColor:f,fontSizeSM:p,tablePaddingHorizontal:m,borderRadius:h,motionDurationSlow:g,colorIcon:_,colorPrimary:v,tableHeaderFilterActiveBg:y,colorTextDisabled:b,tableFilterDropdownBg:x,tableFilterDropdownHeight:S,controlItemBgHover:C,controlItemBgActive:w,boxShadowSecondary:T,filterDropdownMenuBg:E,calc:D}=e,O=`${n}-dropdown`,k=`${t}-filter-dropdown`,A=`${n}-tree`,j=`${Y(l)} ${u} ${d}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:`flex`,justifyContent:`space-between`},[`${t}-filter-trigger`]:{position:`relative`,display:`flex`,alignItems:`center`,marginBlock:D(o).mul(-1).equal(),marginInline:`${Y(o)} ${Y(D(m).div(2).mul(-1).equal())}`,padding:`0 ${Y(o)}`,color:f,fontSize:p,borderRadius:h,cursor:`pointer`,transition:`all ${g}`,"&:hover":{color:_,background:y},"&.active":{color:v}}}},{[`${n}-dropdown`]:{[k]:{...Jc(e),minWidth:i,backgroundColor:x,borderRadius:h,boxShadow:T,overflow:`hidden`,[`${O}-menu`]:{maxHeight:S,overflowX:`hidden`,border:0,boxShadow:`none`,borderRadius:`unset`,backgroundColor:E,"&:empty::after":{display:`block`,padding:`${Y(s)} 0`,color:b,fontSize:p,textAlign:`center`,content:`"Not Found"`}},[`${k}-tree`]:{paddingBlock:`${Y(s)} 0`,paddingInline:s,[A]:{padding:0},[`${A}-treenode ${A}-node-content-wrapper:hover`]:{backgroundColor:C},[`${A}-treenode-checkbox-checked ${A}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:w}}},[`${k}-search`]:{padding:s,borderBottom:j,"&-input":{input:{minWidth:a},[r]:{color:b}}},[`${k}-checkall`]:{width:`100%`,marginBottom:o,marginInlineStart:o},[`${k}-btns`]:{display:`flex`,justifyContent:`space-between`,padding:`${Y(D(s).sub(l).equal())} ${Y(s)}`,overflow:`hidden`,borderTop:j}}}},{[`${n}-dropdown ${k}, ${k}-submenu`]:{[`${n}-checkbox-wrapper + span`]:{paddingInlineStart:s,color:c},"> ul":{maxHeight:`calc(100vh - 130px)`,overflowX:`hidden`,overflowY:`auto`}}}]};function nQ({colorSplit:e}){return[{boxShadow:`inset 10px 0 8px -8px ${e}`},{boxShadow:`inset -10px 0 8px -8px ${e}`}]}var rQ=e=>{let{componentCls:t,lineWidth:n,motionDurationSlow:r,zIndexTableFixed:i,tableBg:a,calc:o}=e,s=`${t}-cell`,c=`${s}-fix`,l={position:`absolute`,top:0,bottom:o(n).mul(-1).equal(),width:30,transition:`box-shadow ${r}`,content:`""`,pointerEvents:`none`},[u,d]=nQ(e);return{[`${t}-wrapper`]:{[`${s}${c}`]:{position:`sticky`},[c]:{zIndex:`calc(var(--z-offset-reverse) + ${i})`,background:a,"&:after":l,"&-start:after":{insetInlineStart:`100%`},"&-end:after":{insetInlineEnd:`100%`},"&-start-shadow-show:after":u,"&-end-shadow-show:after":d},[`${t}-container`]:{position:`relative`,"&:before, &:after":{...l,zIndex:`calc(var(--columns-count) * 2 + ${i} + 1)`},"&:before":{insetInlineStart:0},"&:after":{insetInlineEnd:0}},[`${t}-has-fix-start ${t}-container:before`]:{display:`none`},[`${t}-has-fix-end ${t}-container:after`]:{display:`none`},[`${t}-fix-start-shadow-show ${t}-container:before`]:u,[`${t}-fix-end-shadow-show ${t}-container:after`]:d}}},iQ=e=>{let{componentCls:t,antCls:n,margin:r}=e;return{[`${t}-wrapper`]:{[`${t}-pagination${n}-pagination`]:{margin:`${Y(r)} 0`},[`${t}-pagination`]:{display:`flex`,flexWrap:`wrap`,rowGap:e.paddingXS,"> *":{flex:`none`},"&-start":{justifyContent:`flex-start`},"&-center":{justifyContent:`center`},"&-end":{justifyContent:`flex-end`}}}}},aQ=e=>{let{componentCls:t,tableRadius:n}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${Y(n)} ${Y(n)} 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${t}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:n,borderStartEndRadius:n,"&::before":{borderStartStartRadius:n},"&::after":{borderStartEndRadius:n},[`> ${t}-content`]:{borderStartStartRadius:n,borderStartEndRadius:n},"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:n},"> *:last-child":{borderStartEndRadius:n}}},"&-footer":{borderRadius:`0 0 ${Y(n)} ${Y(n)}`}}}}},oQ=e=>{let{componentCls:t}=e,[n,r]=nQ(e);return{[`${t}-wrapper-rtl`]:{direction:`rtl`,table:{direction:`rtl`},[`${t}-row-expand-icon`]:{float:`right`,"&::after":{transform:`rotate(-90deg)`},"&-collapsed::before":{transform:`rotate(180deg)`},"&-collapsed::after":{transform:`rotate(0deg)`}},[`${t}-cell-fix`]:{"&-start-shadow-show:after":r,"&-end-shadow-show:after":n},[`${t}-container`]:{[`${t}-row-indent`]:{float:`right`}},[`${t}-fix-start-shadow-show ${t}-container:before`]:r,[`${t}-fix-end-shadow-show ${t}-container:after`]:n}}},sQ=e=>{let{componentCls:t,antCls:n,iconCls:r,fontSizeIcon:i,padding:a,paddingXS:o,headerIconColor:s,headerIconHoverColor:c,tableSelectionColumnWidth:l,tableSelectedRowBg:u,tableSelectedRowHoverBg:d,tableRowHoverBg:f,tablePaddingHorizontal:p,calc:m}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:l,[`&${t}-selection-col-with-dropdown`]:{width:m(l).add(i).add(m(a).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:m(l).add(m(o).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:m(l).add(i).add(m(a).div(4)).add(m(o).mul(2)).equal()}},[` table tr th${t}-selection-column, table tr td${t}-selection-column, ${t}-selection-column - `]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:`center`,[`${n}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:m(e.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${t}-selection-column::after`]:{backgroundColor:`transparent !important`},[`${t}-selection`]:{position:`relative`,display:`inline-flex`,flexDirection:`column`},[`${t}-selection-extra`]:{position:`absolute`,top:0,zIndex:1,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,marginInlineStart:`100%`,paddingInlineStart:Y(m(p).div(4).equal()),[r]:{color:s,fontSize:i,verticalAlign:`baseline`,"&:hover":{color:c}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:u,"&-row-hover":{background:d}}},[`> ${t}-cell-row-hover`]:{background:f}}}}}},dQ=e=>{let{componentCls:t,tableExpandColumnWidth:n,calc:r}=e,i=(e,i,a,o)=>({[`${t}${t}-${e}`]:{fontSize:o,[` + `]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:`center`,[`${n}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:m(e.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${t}-selection-column::after`]:{backgroundColor:`transparent !important`},[`${t}-selection`]:{position:`relative`,display:`inline-flex`,flexDirection:`column`},[`${t}-selection-extra`]:{position:`absolute`,top:0,zIndex:1,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,marginInlineStart:`100%`,paddingInlineStart:Y(m(p).div(4).equal()),[r]:{color:s,fontSize:i,verticalAlign:`baseline`,"&:hover":{color:c}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:u,"&-row-hover":{background:d}}},[`> ${t}-cell-row-hover`]:{background:f}}}}}},cQ=e=>{let{componentCls:t,tableExpandColumnWidth:n,calc:r}=e,i=(e,i,a,o)=>({[`${t}${t}-${e}`]:{fontSize:o,[` ${t}-title, ${t}-footer, ${t}-cell, @@ -342,13 +342,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${t}-tbody > tr > td, tfoot > tr > th, tfoot > tr > td - `]:{padding:`${Y(i)} ${Y(a)}`},[`${t}-filter-trigger`]:{marginInlineEnd:Y(r(a).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${Y(r(i).mul(-1).equal())} ${Y(r(a).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:Y(r(i).mul(-1).equal()),marginInline:`${Y(r(n).sub(a).equal())} ${Y(r(a).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:Y(r(a).div(4).equal())}}});return{[`${t}-wrapper`]:{...i(`medium`,e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle),...i(`small`,e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall)}}},fQ=e=>{let{componentCls:t,marginXXS:n,fontSizeIcon:r,headerIconColor:i,headerIconHoverColor:a}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:`none`,cursor:`pointer`,transition:`all ${e.motionDurationSlow}, left 0s`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:`transparent !important`}},"&:focus-visible":{color:e.colorPrimary},[` + `]:{padding:`${Y(i)} ${Y(a)}`},[`${t}-filter-trigger`]:{marginInlineEnd:Y(r(a).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${Y(r(i).mul(-1).equal())} ${Y(r(a).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:Y(r(i).mul(-1).equal()),marginInline:`${Y(r(n).sub(a).equal())} ${Y(r(a).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:Y(r(a).div(4).equal())}}});return{[`${t}-wrapper`]:{...i(`medium`,e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle),...i(`small`,e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall)}}},lQ=e=>{let{componentCls:t,marginXXS:n,fontSizeIcon:r,headerIconColor:i,headerIconHoverColor:a}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:`none`,cursor:`pointer`,transition:`all ${e.motionDurationSlow}, left 0s`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:`transparent !important`}},"&:focus-visible":{color:e.colorPrimary},[` &${t}-cell-fix-left:hover, &${t}-cell-fix-right:hover - `]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:`transparent !important`}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:`relative`,zIndex:1,flex:1,minWidth:0},[`${t}-column-sorters`]:{display:`flex`,flex:`auto`,alignItems:`center`,justifyContent:`space-between`,"&::after":{position:`absolute`,inset:0,width:`100%`,height:`100%`,content:`""`}},[`${t}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:`none`}},[`${t}-column-sorter`]:{marginInlineStart:n,color:i,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:`inline-flex`,flexDirection:`column`,alignItems:`center`},"&-up, &-down":{fontSize:r,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:`-0.3em`}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:a}}}},pQ=e=>{let{componentCls:t,opacityLoading:n,tableScrollThumbBg:r,tableScrollThumbBgHover:i,tableScrollThumbSize:a,tableScrollBg:o,stickyScrollBarBorderRadius:s,lineWidth:c,lineType:l,tableBorderColor:u,zIndexTableFixed:d}=e,f=`${Y(c)} ${l} ${u}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:`sticky`,zIndex:`calc(var(--columns-count) * 2 + ${d} + 1)`,background:e.colorBgContainer},"&-scroll":{position:`sticky`,bottom:0,height:`${Y(a)} !important`,zIndex:`calc(var(--columns-count) * 2 + ${d} + 1)`,display:`flex`,alignItems:`center`,background:o,borderTop:f,opacity:n,"&:hover":{transformOrigin:`center bottom`},"&-bar":{height:a,backgroundColor:r,borderRadius:s,transition:`all ${e.motionDurationSlow}, transform 0s`,position:`absolute`,bottom:0,"&:hover, &-active":{backgroundColor:i}}}}}}},mQ=e=>{let{componentCls:t,lineWidth:n,tableBorderColor:r,calc:i}=e,a=`${Y(n)} ${e.lineType} ${r}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:`relative`,zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:a}}},[`div${t}-summary`]:{boxShadow:`0 ${Y(i(n).mul(-1).equal())} 0 ${r}`}}}},hQ=e=>{let{componentCls:t,motionDurationMid:n,lineWidth:r,lineType:i,tableBorderColor:a,calc:o}=e,s=`${Y(r)} ${i} ${a}`,c=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[` + `]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:`transparent !important`}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:`relative`,zIndex:1,flex:1,minWidth:0},[`${t}-column-sorters`]:{display:`flex`,flex:`auto`,alignItems:`center`,justifyContent:`space-between`,"&::after":{position:`absolute`,inset:0,width:`100%`,height:`100%`,content:`""`}},[`${t}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:`none`}},[`${t}-column-sorter`]:{marginInlineStart:n,color:i,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:`inline-flex`,flexDirection:`column`,alignItems:`center`},"&-up, &-down":{fontSize:r,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:`-0.3em`}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:a}}}},uQ=e=>{let{componentCls:t,opacityLoading:n,tableScrollThumbBg:r,tableScrollThumbBgHover:i,tableScrollThumbSize:a,tableScrollBg:o,stickyScrollBarBorderRadius:s,lineWidth:c,lineType:l,tableBorderColor:u,zIndexTableFixed:d}=e,f=`${Y(c)} ${l} ${u}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:`sticky`,zIndex:`calc(var(--columns-count) * 2 + ${d} + 1)`,background:e.colorBgContainer},"&-scroll":{position:`sticky`,bottom:0,height:`${Y(a)} !important`,zIndex:`calc(var(--columns-count) * 2 + ${d} + 1)`,display:`flex`,alignItems:`center`,background:o,borderTop:f,opacity:n,"&:hover":{transformOrigin:`center bottom`},"&-bar":{height:a,backgroundColor:r,borderRadius:s,transition:`all ${e.motionDurationSlow}, transform 0s`,position:`absolute`,bottom:0,"&:hover, &-active":{backgroundColor:i}}}}}}},dQ=e=>{let{componentCls:t,lineWidth:n,tableBorderColor:r,calc:i}=e,a=`${Y(n)} ${e.lineType} ${r}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:`relative`,zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:a}}},[`div${t}-summary`]:{boxShadow:`0 ${Y(i(n).mul(-1).equal())} 0 ${r}`}}}},fQ=e=>{let{componentCls:t,motionDurationMid:n,lineWidth:r,lineType:i,tableBorderColor:a,calc:o}=e,s=`${Y(r)} ${i} ${a}`,c=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[` & > ${t}-row, & > div:not(${t}-row) > ${t}-row - `]:{display:`flex`,boxSizing:`border-box`,width:`100%`}},[`${t}-cell`]:{borderBottom:s,transition:`background-color ${n}`},[`${t}-expanded-row`]:{[`${c}${c}-fixed`]:{position:`sticky`,insetInlineStart:0,overflow:`hidden`,width:`calc(var(--virtual-width) - ${Y(r)})`,borderInlineEnd:`none`}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:`""`,insetInline:0,bottom:0,borderBottom:s,position:`absolute`},[`${t}-cell`]:{borderInlineEnd:s,[`&${t}-cell-fix-right-first:before`]:{content:`""`,position:`absolute`,insetBlock:0,insetInlineStart:o(r).mul(-1).equal(),borderInlineStart:s}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:s,borderBottom:s}}}}}},gQ=e=>{let{componentCls:t,fontWeightStrong:n,tablePaddingVertical:r,tablePaddingHorizontal:i,tableExpandColumnWidth:a,lineWidth:o,lineType:s,tableBorderColor:c,tableFontSize:l,tableBg:u,tableRadius:d,tableHeaderTextColor:f,motionDurationMid:p,tableHeaderBg:m,tableHeaderCellSplitColor:h,tableFooterTextColor:g,tableFooterBg:_,calc:v}=e,y=`${Y(o)} ${s} ${c}`;return{[`${t}-wrapper`]:{clear:`both`,maxWidth:`100%`,"--rc-virtual-list-scrollbar-bg":e.tableScrollBg,...Xc(),[t]:{...Jc(e),fontSize:l,background:u,borderRadius:`${Y(d)} ${Y(d)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`},table:{width:`100%`,textAlign:`start`,borderRadius:`${Y(d)} ${Y(d)} 0 0`,borderCollapse:`separate`,borderSpacing:0},[` + `]:{display:`flex`,boxSizing:`border-box`,width:`100%`}},[`${t}-cell`]:{borderBottom:s,transition:`background-color ${n}`},[`${t}-expanded-row`]:{[`${c}${c}-fixed`]:{position:`sticky`,insetInlineStart:0,overflow:`hidden`,width:`calc(var(--virtual-width) - ${Y(r)})`,borderInlineEnd:`none`}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:`""`,insetInline:0,bottom:0,borderBottom:s,position:`absolute`},[`${t}-cell`]:{borderInlineEnd:s,[`&${t}-cell-fix-right-first:before`]:{content:`""`,position:`absolute`,insetBlock:0,insetInlineStart:o(r).mul(-1).equal(),borderInlineStart:s}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:s,borderBottom:s}}}}}},pQ=e=>{let{componentCls:t,fontWeightStrong:n,tablePaddingVertical:r,tablePaddingHorizontal:i,tableExpandColumnWidth:a,lineWidth:o,lineType:s,tableBorderColor:c,tableFontSize:l,tableBg:u,tableRadius:d,tableHeaderTextColor:f,motionDurationMid:p,tableHeaderBg:m,tableHeaderCellSplitColor:h,tableFooterTextColor:g,tableFooterBg:_,calc:v}=e,y=`${Y(o)} ${s} ${c}`;return{[`${t}-wrapper`]:{clear:`both`,maxWidth:`100%`,"--rc-virtual-list-scrollbar-bg":e.tableScrollBg,...Xc(),[t]:{...Jc(e),fontSize:l,background:u,borderRadius:`${Y(d)} ${Y(d)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`},table:{width:`100%`,textAlign:`start`,borderRadius:`${Y(d)} ${Y(d)} 0 0`,borderCollapse:`separate`,borderSpacing:0},[` ${t}-cell, ${t}-thead > tr > th, ${t}-tbody > tr > th, @@ -359,37 +359,37 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho > ${t}-wrapper:only-child, > ${t}-expanded-row-fixed > ${t}-wrapper:only-child `]:{[t]:{marginBlock:Y(v(r).mul(-1).equal()),marginInline:`${Y(v(a).sub(i).equal())} - ${Y(v(i).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:`relative`,color:f,fontWeight:n,textAlign:`start`,background:m,borderBottom:y,transition:`background-color ${p} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:`0 !important`,borderBlock:`0 !important`,[`${t}-measure-cell-content`]:{height:0,overflow:`hidden`,pointerEvents:`none`}}}},[`${t}-footer`]:{padding:`${Y(r)} ${Y(i)}`,color:g,background:_}}}},_Q=e=>{let{colorFillAlter:t,colorBgContainer:n,colorTextHeading:r,colorFillSecondary:i,colorFillContent:a,controlItemBgActive:o,controlItemBgActiveHover:s,padding:c,paddingSM:l,paddingXS:u,colorBorderSecondary:d,borderRadiusLG:f,controlHeight:p,colorTextPlaceholder:m,fontSize:h,fontSizeSM:g,lineHeight:_,lineWidth:v,colorIcon:y,colorIconHover:b,opacityLoading:x,controlInteractiveSize:S}=e,C=new Rs(i).onBackground(n).toHexString(),w=new Rs(a).onBackground(n).toHexString(),T=new Rs(t).onBackground(n).toHexString(),E=new Rs(y),D=new Rs(b),O=S/2-v,k=O*2+v*3;return{headerBg:T,headerColor:r,headerSortActiveBg:C,headerSortHoverBg:w,bodySortBg:T,rowHoverBg:T,rowSelectedBg:o,rowSelectedHoverBg:s,rowExpandedBg:t,cellPaddingBlock:c,cellPaddingInline:c,cellPaddingBlockMD:l,cellPaddingInlineMD:u,cellPaddingBlockSM:u,cellPaddingInlineSM:u,borderColor:d,headerBorderRadius:f,footerBg:T,footerColor:r,cellFontSize:h,cellFontSizeMD:h,cellFontSizeSM:h,headerSplitColor:d,fixedHeaderSortActiveBg:C,headerFilterHoverBg:a,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:p,stickyScrollBarBg:m,stickyScrollBarBorderRadius:100,expandIconMarginTop:(h*_-v*3)/2-Math.ceil((g*1.4-v*3)/2),headerIconColor:E.clone().setA(E.a*x).toRgbString(),headerIconHoverColor:D.clone().setA(D.a*x).toRgbString(),expandIconHalfInner:O,expandIconSize:k,expandIconScale:S/k}},vQ=2,yQ=rl(`Table`,e=>{let{colorTextHeading:t,colorSplit:n,colorBgContainer:r,controlInteractiveSize:i,headerBg:a,headerColor:o,headerSortActiveBg:s,headerSortHoverBg:c,bodySortBg:l,rowHoverBg:u,rowSelectedBg:d,rowSelectedHoverBg:f,rowExpandedBg:p,cellPaddingBlock:m,cellPaddingInline:h,cellPaddingBlockMD:g,cellPaddingInlineMD:_,cellPaddingBlockSM:v,cellPaddingInlineSM:y,borderColor:b,footerBg:x,footerColor:S,headerBorderRadius:C,cellFontSize:w,cellFontSizeMD:T,cellFontSizeSM:E,headerSplitColor:D,fixedHeaderSortActiveBg:O,headerFilterHoverBg:k,filterDropdownBg:A,expandIconBg:j,selectionColumnWidth:M,stickyScrollBarBg:N,calc:P}=e,F=gs(e,{tableFontSize:w,tableBg:r,tableRadius:C,tablePaddingVertical:m,tablePaddingHorizontal:h,tablePaddingVerticalMiddle:g,tablePaddingHorizontalMiddle:_,tablePaddingVerticalSmall:v,tablePaddingHorizontalSmall:y,tableBorderColor:b,tableHeaderTextColor:o,tableHeaderBg:a,tableFooterTextColor:S,tableFooterBg:x,tableHeaderCellSplitColor:D,tableHeaderSortBg:s,tableHeaderSortHoverBg:c,tableBodySortBg:l,tableFixedHeaderSortActiveBg:O,tableHeaderFilterActiveBg:k,tableFilterDropdownBg:A,tableRowHoverBg:u,tableSelectedRowBg:d,tableSelectedRowHoverBg:f,zIndexTableFixed:vQ,tableFontSizeMiddle:T,tableFontSizeSmall:E,tableSelectionColumnWidth:M,tableExpandIconBg:j,tableExpandColumnWidth:P(i).add(P(e.padding).mul(2)).equal(),tableExpandedRowBg:p,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:N,tableScrollThumbBgHover:t,tableScrollBg:n});return[gQ(F),sQ(F),mQ(F),fQ(F),iQ(F),eQ(F),cQ(F),rQ(F),mQ(F),nQ(F),uQ(F),oQ(F),pQ(F),tQ(F),dQ(F),lQ(F),hQ(F)]},_Q,{resetFont:!1,unitless:{expandIconScale:!0}}),bQ=[],xQ=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,classNames:o,styles:s,size:c,bordered:l,dropdownPrefixCls:u,dataSource:d,pagination:f,rowSelection:p,rowKey:m,rowClassName:h,columns:g,children:_,childrenColumnName:v,onChange:y,getPopupContainer:b,loading:x,expandIcon:C,expandable:w,expandedRowRender:T,expandIconColumnIndex:E,indentSize:D,scroll:O,sortDirections:k,locale:A,showSorterTooltip:j={target:`full-header`},virtual:M}=e;Dr(`Table`);let N=S.useMemo(()=>g||UJ(_),[g,_]),P=JC(S.useMemo(()=>N.some(e=>e.responsive),[N])),F=S.useMemo(()=>{let e=new Set(Object.keys(P).filter(e=>P[e]));return N.filter(t=>!t.responsive||t.responsive.some(t=>e.has(t)))},[N,P]),I=Sr(e,[`className`,`style`,`columns`]),{locale:L=td,table:R}=S.useContext(oi),{getPrefixCls:z,direction:B,renderEmpty:V,getPopupContainer:H,className:U,style:W,classNames:ee,styles:te}=li(`table`),ne=th(e=>c===`middle`?`medium`:c??e),re={...e,size:ne,bordered:l},[ie,ae]=Fd([ee,o],[te,s],{props:re},{pagination:{_default:`root`},header:{_default:`wrapper`},body:{_default:`wrapper`}}),G={...L.Table,...A},[oe]=cd(`global`,td.global),K=d||bQ,se=z(`table`,n),ce=z(`dropdown`,u),[,q]=Kc(),le=S.useMemo(()=>hd(p)?{columnWidth:q.Table?.selectionColumnWidth,...p}:p,[p,q.Table?.selectionColumnWidth]),ue=bf(se),[de,fe]=yQ(se,ue),pe={childrenColumnName:v,expandIconColumnIndex:E,...w,expandIcon:w?.expandIcon??R?.expandable?.expandIcon},{childrenColumnName:me=`children`}=pe,he=S.useMemo(()=>K.some(e=>e?.[me])?`nest`:T||w?.expandedRowRender?`row`:null,[me,K]),ge={body:S.useRef(null)},_e=nX(se),ve=S.useRef(null),ye=S.useRef(null);Vd(t,()=>({...ye.current,nativeElement:ve.current}));let be=m||R?.rowKey||`key`,xe=O??R?.scroll,Se=S.useMemo(()=>typeof be==`function`?be:e=>e?.[be],[be]),[Ce]=AZ(K,me,Se),we={},Te=(e,t,n=!1)=>{let r={...we,...e};n&&(we.resetPagination?.(),r.pagination?.current&&(r.pagination.current=1),f&&f.onChange?.(1,r.pagination?.pageSize)),O&&O.scrollToFirstRowOnChange!==!1&&ge.body.current&&yf(0,{getContainer:()=>ge.body.current}),y?.(r.pagination,r.filters,r.sorter,{currentDataSource:DZ(JZ(K,r.sorterStates,me),r.filterStates,me),action:t})},[Ee,De,Oe,ke]=YZ({prefixCls:se,mergedColumns:F,onSorterChange:(e,t)=>{Te({sorter:e,sorterStates:t},`sort`,!1)},sortDirections:k||[`ascend`,`descend`],tableLocale:G,showSorterTooltip:j,globalLocale:oe}),Ae=S.useMemo(()=>JZ(K,De,me),[me,K,De]);we.sorter=ke(),we.sorterStates=De;let[je,Me,Ne]=kZ({prefixCls:se,locale:G,dropdownPrefixCls:ce,mergedColumns:F,onFilterChange:(e,t)=>{Te({filters:e,filterStates:t},`filter`,!0)},getPopupContainer:b||H,rootClassName:J(i,ue)}),Pe=DZ(Ae,Me,me);we.filters=Ne,we.filterStates=Me;let[Fe]=ZZ(S.useMemo(()=>{let e={};return Object.keys(Ne).forEach(t=>{Ne[t]!==null&&(e[t]=Ne[t])}),{...Oe,filters:e}},[Oe,Ne])),[Ie,Le]=MZ(Pe.length,(e,t)=>{Te({pagination:{...we.pagination,current:e,pageSize:t}},`paginate`)},f);we.pagination=f===!1?{}:jZ(Ie,f),we.resetPagination=Le;let Re=S.useMemo(()=>{if(f===!1||!Ie.pageSize)return Pe;let{current:e=1,total:t,pageSize:n=10}=Ie;return Pe.lengthn?Pe.slice((e-1)*n,e*n):Pe:Pe.slice((e-1)*n,e*n)},[!!f,Pe,Ie?.current,Ie?.pageSize,Ie?.total]),[ze,Be]=eX({prefixCls:se,data:Pe,pageData:Re,getRowKey:Se,getRecordByKey:Ce,expandType:he,childrenColumnName:me,locale:G,getPopupContainer:b||H},le),Ve=(e,t,n)=>{let r=typeof h==`function`?h(e,t,n):h;return J({[`${se}-row-selected`]:Be.has(Se(e,t))},r)};pe.__PARENT_RENDER_ICON__=pe.expandIcon,pe.expandIcon=pe.expandIcon||C||tX(G),he===`nest`&&pe.expandIconColumnIndex===void 0?pe.expandIconColumnIndex=+!!le:pe.expandIconColumnIndex>0&&le&&--pe.expandIconColumnIndex,typeof pe.indentSize!=`number`&&(pe.indentSize=pd(D)?D:15);let He=S.useCallback(e=>Fe(ze(je(Ee(e)))),[Ee,je,ze]),Ue,We;if(f!==!1&&Ie?.total){let e;e=Ie.size?Ie.size:ne===`small`||ne===`medium`?`small`:void 0;let t=(t=`end`)=>S.createElement(iG,{...Ie,classNames:ie.pagination,styles:ae.pagination,className:J(`${se}-pagination ${se}-pagination-${t}`,Ie.className),size:e}),{placement:n,position:r}=Ie,i=n??r,a=e=>{let t=e.toLowerCase();return t.includes(`center`)?`center`:t.includes(`left`)||t.includes(`start`)?`start`:`end`};if(Array.isArray(i)){let[e,n]=[`top`,`bottom`].map(e=>i.find(t=>t.includes(e))),r=i.every(e=>`${e}`==`none`);!e&&!n&&!r&&(We=t()),e&&(Ue=t(a(e))),n&&(We=t(a(n)))}else We=t()}let Ge=S.useMemo(()=>{if(typeof x==`boolean`)return{spinning:x};if(hd(x))return{spinning:!0,...x}},[x]),Ke=J(fe,ue,`${se}-wrapper`,U,{[`${se}-wrapper-rtl`]:B===`rtl`},r,i,ie.root,de),qe={...ae.root,...W,...a},Je=S.useMemo(()=>Ge?.spinning&&K===bQ?null:A?.emptyText===void 0?V?.(`Table`)||S.createElement(gC,{componentName:`Table`}):A.emptyText,[Ge?.spinning,K,A?.emptyText,V]),Ye=M?$Z:QZ,Xe={},Ze=S.useMemo(()=>{let{fontSize:e,lineHeight:t,lineWidth:n,padding:r,paddingXS:i,paddingSM:a}=q,o=Math.floor(e*t);switch(ne){case`medium`:return a*2+o+n;case`small`:return i*2+o+n;default:return r*2+o+n}},[q,ne]);return M&&(Xe.listItemHeight=Ze),S.createElement(`div`,{ref:ve,className:Ke,style:qe},S.createElement(TG,{spinning:!1,...Ge},Ue,S.createElement(Ye,{...Xe,...I,scroll:xe,classNames:ie,styles:ae,ref:ye,columns:F,direction:B,expandable:pe,prefixCls:se,className:J({[`${se}-medium`]:ne===`medium`,[`${se}-small`]:ne===`small`,[`${se}-bordered`]:l,[`${se}-empty`]:K.length===0},fe,ue,de),data:Re,rowKey:Se,rowClassName:Ve,emptyText:Je,internalHooks:Lq,internalRefs:ge,transformColumns:He,getContainerWidth:_e,measureRowRender:e=>S.createElement(vw.Provider,{value:!0},S.createElement(am,{getPopupContainer:e=>e},e))}),We))}),SQ=S.forwardRef((e,t)=>{let n=S.useRef(0);return n.current+=1,S.createElement(xQ,{...e,ref:t,_renderTimes:n.current})});SQ.SELECTION_COLUMN=JY,SQ.EXPAND_COLUMN=Iq,SQ.SELECTION_ALL=YY,SQ.SELECTION_INVERT=XY,SQ.SELECTION_NONE=ZY,SQ.Column=OY,SQ.ColumnGroup=kY,SQ.Summary=mJ;var CQ=SQ,wQ=e=>{let{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:i,calc:a}=e,o=a(r).sub(n).equal(),s=a(t).sub(n).equal();return{[i]:{...Jc(e),display:`inline-block`,height:`auto`,paddingInline:o,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:`nowrap`,backgroundColor:e.defaultBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:`start`,position:`relative`,[`&${i}-rtl`]:{direction:`rtl`},"&, a, a:hover":{color:e.defaultColor},[`${i}-close-icon`]:{marginInlineStart:s,fontSize:e.tagIconSize,color:e.colorIcon,cursor:`pointer`,transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},"&-checkable":{backgroundColor:`transparent`,borderColor:`transparent`,cursor:`pointer`,[`&:not(${i}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive},"&-disabled":{cursor:`not-allowed`,[`&:not(${i}-checkable-checked)`]:{color:e.colorTextDisabled,"&:hover":{backgroundColor:`transparent`}},[`&${i}-checkable-checked`]:{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled},"&:hover, &:active":{backgroundColor:e.colorBgContainerDisabled,color:e.colorTextDisabled},[`&:not(${i}-checkable-checked):hover`]:{color:e.colorTextDisabled}},"&-group":{display:`flex`,flexWrap:`wrap`,gap:e.paddingXS}},"&-hidden":{display:`none`},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:o}},[`&${e.componentCls}-solid`]:{borderColor:`transparent`,color:e.colorTextLightSolid,backgroundColor:e.colorBgSolid,[`&${i}-default`]:{color:e.solidTextColor}},[`${i}-filled`]:{borderColor:`transparent`,backgroundColor:e.tagBorderlessBg},[`&${i}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,backgroundColor:e.colorBgContainerDisabled,a:{cursor:`not-allowed`,pointerEvents:`none`,color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}},"a&":{"&:hover, &:active":{color:e.colorTextDisabled}},[`&${i}-outlined`]:{borderColor:e.colorBorderDisabled},[`&${i}-solid, &${i}-filled`]:{color:e.colorTextDisabled,[`${i}-close-icon`]:{color:e.colorTextDisabled}},[`${i}-close-icon`]:{cursor:`not-allowed`,color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}}}}},TQ=e=>{let{lineWidth:t,fontSizeIcon:n,calc:r}=e,i=e.fontSizeSM;return gs(e,{tagFontSize:i,tagLineHeight:Y(r(e.lineHeightSM).mul(i).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},EQ=e=>{let t=Fg(new dg(e.colorBgSolid),`#fff`)?`#000`:`#fff`;return{defaultBg:new Rs(e.colorFillTertiary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText,solidTextColor:t}},DQ=rl(`Tag`,e=>wQ(TQ(e)),EQ),OQ=S.forwardRef((e,t)=>{let{prefixCls:n,style:r,className:i,checked:a,children:o,icon:s,onChange:c,onClick:l,disabled:u,...d}=e,{getPrefixCls:f,tag:p}=S.useContext(oi),m=S.useContext(zp),h=u??m,g=e=>{h||(c?.(!a),l?.(e))},_=f(`tag`,n),[v,y]=DQ(_),b=J(_,`${_}-checkable`,{[`${_}-checkable-checked`]:a,[`${_}-checkable-disabled`]:h},p?.className,i,v,y);return S.createElement(`span`,{...d,ref:t,style:{...r,...p?.style},className:b,onClick:g},s,S.createElement(`span`,null,o))}),kQ=S.forwardRef((e,t)=>{let{id:n,prefixCls:r,rootClassName:i,className:a,style:o,classNames:s,styles:c,disabled:l,options:u,value:d,defaultValue:f,onChange:p,multiple:m,...h}=e,{getPrefixCls:g,direction:_,className:v,style:y,classNames:b,styles:x}=li(`tag`),C=g(`tag`,r),w=`${C}-checkable-group`,[T,E]=DQ(C,bf(C)),[D,O]=Fd([b,s],[x,c],{props:e}),k=(0,S.useMemo)(()=>Array.isArray(u)?u.map(e=>hd(e)?e:{value:e,label:e}):[],[u]),[A,j]=Hn(f,d),M=(e,t)=>{let n=null;if(m){let r=A||[];n=e?[].concat(Zr(r),[t.value]):r.filter(e=>e!==t.value)}else n=e?t.value:null;j(n),p?.(n)},N=S.useRef(null);(0,S.useImperativeHandle)(t,()=>({nativeElement:N.current}));let P=Vu(h,{aria:!0,data:!0});return S.createElement(`div`,{...P,className:J(w,v,i,{[`${w}-disabled`]:l,[`${w}-rtl`]:_===`rtl`},T,E,a,D.root),style:{...y,...O.root,...o},id:n,ref:N},k.map(e=>S.createElement(OQ,{key:e.value,className:J(`${w}-item`,D.item),style:O.item,checked:m?(A||[]).includes(e.value):A===e.value,onChange:t=>M(t,e),disabled:l},e.label)))});function AQ(e,t){let{color:n,variant:r,bordered:i}=e;return S.useMemo(()=>{let e=n?.endsWith(`-inverse`),a;a=r||(e?`solid`:i===!1?`filled`:t||`filled`);let o=e?n?.replace(`-inverse`,``):n,s=Ew(n),c=Dw(n),l={};if(!s&&!c&&o)if(a===`solid`)l.backgroundColor=n;else{let e=new Rs(o).toHsl();e.l=.95,l.backgroundColor=new Rs(e).toHexString(),l.color=n,a===`outlined`&&(l.borderColor=n)}return[a,o,s,c,l]},[n,r,i,t])}var jQ=e=>sl(e,(t,{textColor:n,lightBorderColor:r,lightColor:i,darkColor:a})=>({[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:i,borderColor:r,color:n},[`&${e.componentCls}-solid`]:{backgroundColor:a,borderColor:a,color:e.colorTextLightSolid},[`&${e.componentCls}-filled`]:{backgroundColor:i,color:n}}})),MQ=al([`Tag`,`preset`],e=>jQ(TQ(e)),EQ);function NQ(e){return typeof e==`string`?e.charAt(0).toUpperCase()+e.slice(1):e}var PQ=(e,t,n)=>{let r=NQ(n);return{[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:e[`color${r}Bg`],borderColor:e[`color${r}Border`],color:e[`color${n}`]},[`&${e.componentCls}-solid`]:{backgroundColor:e[`color${n}`],borderColor:e[`color${n}`]},[`&${e.componentCls}-filled`]:{backgroundColor:e[`color${r}Bg`],color:e[`color${n}`]}}}},FQ=al([`Tag`,`status`],e=>{let t=TQ(e);return[PQ(t,`success`,`Success`),PQ(t,`processing`,`Info`),PQ(t,`error`,`Error`),PQ(t,`warning`,`Warning`)]},EQ),IQ=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,children:o,icon:s,color:c,variant:l,onClose:u,bordered:d,disabled:f,href:p,target:m,styles:h,classNames:g,..._}=e,{getPrefixCls:v,direction:y,className:b,variant:x,style:C,classNames:w,styles:T}=li(`tag`),[E,D,O,k,A]=AQ(e,x),j=O||k,M=S.useContext(zp),N=f??M,{tag:P}=S.useContext(oi),[F,I]=S.useState(!0),L=Sr(_,[`closeIcon`,`closable`]),R={...e,color:D,variant:E,disabled:N},[z,B]=Fd([w,g],[T,h],{props:R}),V=S.useMemo(()=>{let e={...B.root,...C,...a};return N||(e={...A,...e}),e},[B.root,C,a,A,N]),H=v(`tag`,n),[U,W]=DQ(H),ee=J(H,b,z.root,`${H}-${E}`,{[`${H}-${D}`]:j,[`${H}-hidden`]:!F,[`${H}-rtl`]:y===`rtl`,[`${H}-disabled`]:N},r,i,U,W),te=e=>{N||(e.stopPropagation(),u?.(e),!e.defaultPrevented&&I(!1))},[,ne]=Td(yd(e),yd(P),{closable:!1,closeIconRender:e=>Np(e,S.createElement(`span`,{className:`${H}-close-icon`,onClick:te},e),e=>({onClick:t=>{e?.onClick?.(t),te(t)},className:J(e?.className,`${H}-close-icon`)}))}),re=typeof _.onClick==`function`||o&&o.type===`a`,ie=Pp(s,{className:J(S.isValidElement(s)?s.props?.className:void 0,z.icon),style:B.icon}),ae=ie?S.createElement(S.Fragment,null,ie,o&&S.createElement(`span`,{className:z.content,style:B.content},o)):o,G=p?`a`:`span`,oe=S.createElement(G,{...L,ref:t,className:ee,style:V,href:N?void 0:p,target:m,onClick:N?void 0:L.onClick,...p&&N?{"aria-disabled":!0}:{}},ae,ne,O&&S.createElement(MQ,{key:`preset`,prefixCls:H}),k&&S.createElement(FQ,{key:`status`,prefixCls:H}));return re?S.createElement(eh,{component:`Tag`},oe):oe});IQ.CheckableTag=OQ,IQ.CheckableTagGroup=kQ;var LQ={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z`}}]},name:`delete`,theme:`outlined`};function RQ(){return RQ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,RQ({},e,{ref:t,icon:LQ}))),BQ={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z`}}]},name:`edit`,theme:`outlined`};function VQ(){return VQ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,VQ({},e,{ref:t,icon:BQ}))),UQ={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z`}}]},name:`enter`,theme:`outlined`};function WQ(){return WQ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,WQ({},e,{ref:t,icon:UQ}))),KQ=(e,t,n,r)=>{let{titleMarginBottom:i,fontWeightStrong:a}=r;return{marginBottom:i,color:n,fontWeight:a,fontSize:e,lineHeight:t}},qQ=e=>{let t=[1,2,3,4,5],n={};return t.forEach(t=>{n[` + ${Y(v(i).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:`relative`,color:f,fontWeight:n,textAlign:`start`,background:m,borderBottom:y,transition:`background-color ${p} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:`0 !important`,borderBlock:`0 !important`,[`${t}-measure-cell-content`]:{height:0,overflow:`hidden`,pointerEvents:`none`}}}},[`${t}-footer`]:{padding:`${Y(r)} ${Y(i)}`,color:g,background:_}}}},mQ=e=>{let{colorFillAlter:t,colorBgContainer:n,colorTextHeading:r,colorFillSecondary:i,colorFillContent:a,controlItemBgActive:o,controlItemBgActiveHover:s,padding:c,paddingSM:l,paddingXS:u,colorBorderSecondary:d,borderRadiusLG:f,controlHeight:p,colorTextPlaceholder:m,fontSize:h,fontSizeSM:g,lineHeight:_,lineWidth:v,colorIcon:y,colorIconHover:b,opacityLoading:x,controlInteractiveSize:S}=e,C=new Rs(i).onBackground(n).toHexString(),w=new Rs(a).onBackground(n).toHexString(),T=new Rs(t).onBackground(n).toHexString(),E=new Rs(y),D=new Rs(b),O=S/2-v,k=O*2+v*3;return{headerBg:T,headerColor:r,headerSortActiveBg:C,headerSortHoverBg:w,bodySortBg:T,rowHoverBg:T,rowSelectedBg:o,rowSelectedHoverBg:s,rowExpandedBg:t,cellPaddingBlock:c,cellPaddingInline:c,cellPaddingBlockMD:l,cellPaddingInlineMD:u,cellPaddingBlockSM:u,cellPaddingInlineSM:u,borderColor:d,headerBorderRadius:f,footerBg:T,footerColor:r,cellFontSize:h,cellFontSizeMD:h,cellFontSizeSM:h,headerSplitColor:d,fixedHeaderSortActiveBg:C,headerFilterHoverBg:a,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:p,stickyScrollBarBg:m,stickyScrollBarBorderRadius:100,expandIconMarginTop:(h*_-v*3)/2-Math.ceil((g*1.4-v*3)/2),headerIconColor:E.clone().setA(E.a*x).toRgbString(),headerIconHoverColor:D.clone().setA(D.a*x).toRgbString(),expandIconHalfInner:O,expandIconSize:k,expandIconScale:S/k}},hQ=2,gQ=rl(`Table`,e=>{let{colorTextHeading:t,colorSplit:n,colorBgContainer:r,controlInteractiveSize:i,headerBg:a,headerColor:o,headerSortActiveBg:s,headerSortHoverBg:c,bodySortBg:l,rowHoverBg:u,rowSelectedBg:d,rowSelectedHoverBg:f,rowExpandedBg:p,cellPaddingBlock:m,cellPaddingInline:h,cellPaddingBlockMD:g,cellPaddingInlineMD:_,cellPaddingBlockSM:v,cellPaddingInlineSM:y,borderColor:b,footerBg:x,footerColor:S,headerBorderRadius:C,cellFontSize:w,cellFontSizeMD:T,cellFontSizeSM:E,headerSplitColor:D,fixedHeaderSortActiveBg:O,headerFilterHoverBg:k,filterDropdownBg:A,expandIconBg:j,selectionColumnWidth:M,stickyScrollBarBg:N,calc:P}=e,F=gs(e,{tableFontSize:w,tableBg:r,tableRadius:C,tablePaddingVertical:m,tablePaddingHorizontal:h,tablePaddingVerticalMiddle:g,tablePaddingHorizontalMiddle:_,tablePaddingVerticalSmall:v,tablePaddingHorizontalSmall:y,tableBorderColor:b,tableHeaderTextColor:o,tableHeaderBg:a,tableFooterTextColor:S,tableFooterBg:x,tableHeaderCellSplitColor:D,tableHeaderSortBg:s,tableHeaderSortHoverBg:c,tableBodySortBg:l,tableFixedHeaderSortActiveBg:O,tableHeaderFilterActiveBg:k,tableFilterDropdownBg:A,tableRowHoverBg:u,tableSelectedRowBg:d,tableSelectedRowHoverBg:f,zIndexTableFixed:hQ,tableFontSizeMiddle:T,tableFontSizeSmall:E,tableSelectionColumnWidth:M,tableExpandIconBg:j,tableExpandColumnWidth:P(i).add(P(e.padding).mul(2)).equal(),tableExpandedRowBg:p,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:N,tableScrollThumbBgHover:t,tableScrollBg:n});return[pQ(F),iQ(F),dQ(F),lQ(F),tQ(F),ZZ(F),aQ(F),eQ(F),dQ(F),$Z(F),sQ(F),rQ(F),uQ(F),QZ(F),cQ(F),oQ(F),fQ(F)]},mQ,{resetFont:!1,unitless:{expandIconScale:!0}}),_Q=[],vQ=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,classNames:o,styles:s,size:c,bordered:l,dropdownPrefixCls:u,dataSource:d,pagination:f,rowSelection:p,rowKey:m,rowClassName:h,columns:g,children:_,childrenColumnName:v,onChange:y,getPopupContainer:b,loading:x,expandIcon:C,expandable:w,expandedRowRender:T,expandIconColumnIndex:E,indentSize:D,scroll:O,sortDirections:k,locale:A,showSorterTooltip:j={target:`full-header`},virtual:M}=e;Dr(`Table`);let N=S.useMemo(()=>g||BJ(_),[g,_]),P=KC(S.useMemo(()=>N.some(e=>e.responsive),[N])),F=S.useMemo(()=>{let e=new Set(Object.keys(P).filter(e=>P[e]));return N.filter(t=>!t.responsive||t.responsive.some(t=>e.has(t)))},[N,P]),I=Sr(e,[`className`,`style`,`columns`]),{locale:L=td,table:R}=S.useContext(oi),{getPrefixCls:z,direction:B,renderEmpty:V,getPopupContainer:H,className:U,style:W,classNames:ee,styles:te}=li(`table`),ne=th(e=>c===`middle`?`medium`:c??e),re={...e,size:ne,bordered:l},[ie,ae]=Fd([ee,o],[te,s],{props:re},{pagination:{_default:`root`},header:{_default:`wrapper`},body:{_default:`wrapper`}}),G={...L.Table,...A},[oe]=cd(`global`,td.global),K=d||_Q,se=z(`table`,n),ce=z(`dropdown`,u),[,q]=Kc(),le=S.useMemo(()=>hd(p)?{columnWidth:q.Table?.selectionColumnWidth,...p}:p,[p,q.Table?.selectionColumnWidth]),ue=bf(se),[de,fe]=gQ(se,ue),pe={childrenColumnName:v,expandIconColumnIndex:E,...w,expandIcon:w?.expandIcon??R?.expandable?.expandIcon},{childrenColumnName:me=`children`}=pe,he=S.useMemo(()=>K.some(e=>e?.[me])?`nest`:T||w?.expandedRowRender?`row`:null,[me,K]),ge={body:S.useRef(null)},_e=$Y(se),ve=S.useRef(null),ye=S.useRef(null);Vd(t,()=>({...ye.current,nativeElement:ve.current}));let be=m||R?.rowKey||`key`,xe=O??R?.scroll,Se=S.useMemo(()=>typeof be==`function`?be:e=>e?.[be],[be]),[Ce]=DZ(K,me,Se),we={},Te=(e,t,n=!1)=>{let r={...we,...e};n&&(we.resetPagination?.(),r.pagination?.current&&(r.pagination.current=1),f&&f.onChange?.(1,r.pagination?.pageSize)),O&&O.scrollToFirstRowOnChange!==!1&&ge.body.current&&yf(0,{getContainer:()=>ge.body.current}),y?.(r.pagination,r.filters,r.sorter,{currentDataSource:wZ(GZ(K,r.sorterStates,me),r.filterStates,me),action:t})},[Ee,De,Oe,ke]=KZ({prefixCls:se,mergedColumns:F,onSorterChange:(e,t)=>{Te({sorter:e,sorterStates:t},`sort`,!1)},sortDirections:k||[`ascend`,`descend`],tableLocale:G,showSorterTooltip:j,globalLocale:oe}),Ae=S.useMemo(()=>GZ(K,De,me),[me,K,De]);we.sorter=ke(),we.sorterStates=De;let[je,Me,Ne]=EZ({prefixCls:se,locale:G,dropdownPrefixCls:ce,mergedColumns:F,onFilterChange:(e,t)=>{Te({filters:e,filterStates:t},`filter`,!0)},getPopupContainer:b||H,rootClassName:J(i,ue)}),Pe=wZ(Ae,Me,me);we.filters=Ne,we.filterStates=Me;let[Fe]=JZ(S.useMemo(()=>{let e={};return Object.keys(Ne).forEach(t=>{Ne[t]!==null&&(e[t]=Ne[t])}),{...Oe,filters:e}},[Oe,Ne])),[Ie,Le]=kZ(Pe.length,(e,t)=>{Te({pagination:{...we.pagination,current:e,pageSize:t}},`paginate`)},f);we.pagination=f===!1?{}:OZ(Ie,f),we.resetPagination=Le;let Re=S.useMemo(()=>{if(f===!1||!Ie.pageSize)return Pe;let{current:e=1,total:t,pageSize:n=10}=Ie;return Pe.lengthn?Pe.slice((e-1)*n,e*n):Pe:Pe.slice((e-1)*n,e*n)},[!!f,Pe,Ie?.current,Ie?.pageSize,Ie?.total]),[ze,Be]=ZY({prefixCls:se,data:Pe,pageData:Re,getRowKey:Se,getRecordByKey:Ce,expandType:he,childrenColumnName:me,locale:G,getPopupContainer:b||H},le),Ve=(e,t,n)=>{let r=typeof h==`function`?h(e,t,n):h;return J({[`${se}-row-selected`]:Be.has(Se(e,t))},r)};pe.__PARENT_RENDER_ICON__=pe.expandIcon,pe.expandIcon=pe.expandIcon||C||QY(G),he===`nest`&&pe.expandIconColumnIndex===void 0?pe.expandIconColumnIndex=+!!le:pe.expandIconColumnIndex>0&&le&&--pe.expandIconColumnIndex,typeof pe.indentSize!=`number`&&(pe.indentSize=pd(D)?D:15);let He=S.useCallback(e=>Fe(ze(je(Ee(e)))),[Ee,je,ze]),Ue,We;if(f!==!1&&Ie?.total){let e;e=Ie.size?Ie.size:ne===`small`||ne===`medium`?`small`:void 0;let t=(t=`end`)=>S.createElement(tG,{...Ie,classNames:ie.pagination,styles:ae.pagination,className:J(`${se}-pagination ${se}-pagination-${t}`,Ie.className),size:e}),{placement:n,position:r}=Ie,i=n??r,a=e=>{let t=e.toLowerCase();return t.includes(`center`)?`center`:t.includes(`left`)||t.includes(`start`)?`start`:`end`};if(Array.isArray(i)){let[e,n]=[`top`,`bottom`].map(e=>i.find(t=>t.includes(e))),r=i.every(e=>`${e}`==`none`);!e&&!n&&!r&&(We=t()),e&&(Ue=t(a(e))),n&&(We=t(a(n)))}else We=t()}let Ge=S.useMemo(()=>{if(typeof x==`boolean`)return{spinning:x};if(hd(x))return{spinning:!0,...x}},[x]),Ke=J(fe,ue,`${se}-wrapper`,U,{[`${se}-wrapper-rtl`]:B===`rtl`},r,i,ie.root,de),qe={...ae.root,...W,...a},Je=S.useMemo(()=>Ge?.spinning&&K===_Q?null:A?.emptyText===void 0?V?.(`Table`)||S.createElement(mC,{componentName:`Table`}):A.emptyText,[Ge?.spinning,K,A?.emptyText,V]),Ye=M?XZ:YZ,Xe={},Ze=S.useMemo(()=>{let{fontSize:e,lineHeight:t,lineWidth:n,padding:r,paddingXS:i,paddingSM:a}=q,o=Math.floor(e*t);switch(ne){case`medium`:return a*2+o+n;case`small`:return i*2+o+n;default:return r*2+o+n}},[q,ne]);return M&&(Xe.listItemHeight=Ze),S.createElement(`div`,{ref:ve,className:Ke,style:qe},S.createElement(SG,{spinning:!1,...Ge},Ue,S.createElement(Ye,{...Xe,...I,scroll:xe,classNames:ie,styles:ae,ref:ye,columns:F,direction:B,expandable:pe,prefixCls:se,className:J({[`${se}-medium`]:ne===`medium`,[`${se}-small`]:ne===`small`,[`${se}-bordered`]:l,[`${se}-empty`]:K.length===0},fe,ue,de),data:Re,rowKey:Se,rowClassName:Ve,emptyText:Je,internalHooks:Pq,internalRefs:ge,transformColumns:He,getContainerWidth:_e,measureRowRender:e=>S.createElement(gw.Provider,{value:!0},S.createElement(am,{getPopupContainer:e=>e},e))}),We))}),yQ=S.forwardRef((e,t)=>{let n=S.useRef(0);return n.current+=1,S.createElement(vQ,{...e,ref:t,_renderTimes:n.current})});yQ.SELECTION_COLUMN=GY,yQ.EXPAND_COLUMN=Nq,yQ.SELECTION_ALL=KY,yQ.SELECTION_INVERT=qY,yQ.SELECTION_NONE=JY,yQ.Column=TY,yQ.ColumnGroup=EY,yQ.Summary=dJ;var bQ=yQ,xQ=e=>{let{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:i,calc:a}=e,o=a(r).sub(n).equal(),s=a(t).sub(n).equal();return{[i]:{...Jc(e),display:`inline-block`,height:`auto`,paddingInline:o,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:`nowrap`,backgroundColor:e.defaultBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:`start`,position:`relative`,[`&${i}-rtl`]:{direction:`rtl`},"&, a, a:hover":{color:e.defaultColor},[`${i}-close-icon`]:{marginInlineStart:s,fontSize:e.tagIconSize,color:e.colorIcon,cursor:`pointer`,transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},"&-checkable":{backgroundColor:`transparent`,borderColor:`transparent`,cursor:`pointer`,[`&:not(${i}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive},"&-disabled":{cursor:`not-allowed`,[`&:not(${i}-checkable-checked)`]:{color:e.colorTextDisabled,"&:hover":{backgroundColor:`transparent`}},[`&${i}-checkable-checked`]:{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled},"&:hover, &:active":{backgroundColor:e.colorBgContainerDisabled,color:e.colorTextDisabled},[`&:not(${i}-checkable-checked):hover`]:{color:e.colorTextDisabled}},"&-group":{display:`flex`,flexWrap:`wrap`,gap:e.paddingXS}},"&-hidden":{display:`none`},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:o}},[`&${e.componentCls}-solid`]:{borderColor:`transparent`,color:e.colorTextLightSolid,backgroundColor:e.colorBgSolid,[`&${i}-default`]:{color:e.solidTextColor}},[`${i}-filled`]:{borderColor:`transparent`,backgroundColor:e.tagBorderlessBg},[`&${i}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,backgroundColor:e.colorBgContainerDisabled,a:{cursor:`not-allowed`,pointerEvents:`none`,color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}},"a&":{"&:hover, &:active":{color:e.colorTextDisabled}},[`&${i}-outlined`]:{borderColor:e.colorBorderDisabled},[`&${i}-solid, &${i}-filled`]:{color:e.colorTextDisabled,[`${i}-close-icon`]:{color:e.colorTextDisabled}},[`${i}-close-icon`]:{cursor:`not-allowed`,color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}}}}},SQ=e=>{let{lineWidth:t,fontSizeIcon:n,calc:r}=e,i=e.fontSizeSM;return gs(e,{tagFontSize:i,tagLineHeight:Y(r(e.lineHeightSM).mul(i).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},CQ=e=>{let t=Fg(new dg(e.colorBgSolid),`#fff`)?`#000`:`#fff`;return{defaultBg:new Rs(e.colorFillTertiary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText,solidTextColor:t}},wQ=rl(`Tag`,e=>xQ(SQ(e)),CQ),TQ=S.forwardRef((e,t)=>{let{prefixCls:n,style:r,className:i,checked:a,children:o,icon:s,onChange:c,onClick:l,disabled:u,...d}=e,{getPrefixCls:f,tag:p}=S.useContext(oi),m=S.useContext(zp),h=u??m,g=e=>{h||(c?.(!a),l?.(e))},_=f(`tag`,n),[v,y]=wQ(_),b=J(_,`${_}-checkable`,{[`${_}-checkable-checked`]:a,[`${_}-checkable-disabled`]:h},p?.className,i,v,y);return S.createElement(`span`,{...d,ref:t,style:{...r,...p?.style},className:b,onClick:g},s,S.createElement(`span`,null,o))}),EQ=S.forwardRef((e,t)=>{let{id:n,prefixCls:r,rootClassName:i,className:a,style:o,classNames:s,styles:c,disabled:l,options:u,value:d,defaultValue:f,onChange:p,multiple:m,...h}=e,{getPrefixCls:g,direction:_,className:v,style:y,classNames:b,styles:x}=li(`tag`),C=g(`tag`,r),w=`${C}-checkable-group`,[T,E]=wQ(C,bf(C)),[D,O]=Fd([b,s],[x,c],{props:e}),k=(0,S.useMemo)(()=>Array.isArray(u)?u.map(e=>hd(e)?e:{value:e,label:e}):[],[u]),[A,j]=Hn(f,d),M=(e,t)=>{let n=null;if(m){let r=A||[];n=e?[].concat(Zr(r),[t.value]):r.filter(e=>e!==t.value)}else n=e?t.value:null;j(n),p?.(n)},N=S.useRef(null);(0,S.useImperativeHandle)(t,()=>({nativeElement:N.current}));let P=Vu(h,{aria:!0,data:!0});return S.createElement(`div`,{...P,className:J(w,v,i,{[`${w}-disabled`]:l,[`${w}-rtl`]:_===`rtl`},T,E,a,D.root),style:{...y,...O.root,...o},id:n,ref:N},k.map(e=>S.createElement(TQ,{key:e.value,className:J(`${w}-item`,D.item),style:O.item,checked:m?(A||[]).includes(e.value):A===e.value,onChange:t=>M(t,e),disabled:l},e.label)))});function DQ(e,t){let{color:n,variant:r,bordered:i}=e;return S.useMemo(()=>{let e=n?.endsWith(`-inverse`),a;a=r||(e?`solid`:i===!1?`filled`:t||`filled`);let o=e?n?.replace(`-inverse`,``):n,s=ww(n),c=Tw(n),l={};if(!s&&!c&&o)if(a===`solid`)l.backgroundColor=n;else{let e=new Rs(o).toHsl();e.l=.95,l.backgroundColor=new Rs(e).toHexString(),l.color=n,a===`outlined`&&(l.borderColor=n)}return[a,o,s,c,l]},[n,r,i,t])}var OQ=e=>sl(e,(t,{textColor:n,lightBorderColor:r,lightColor:i,darkColor:a})=>({[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:i,borderColor:r,color:n},[`&${e.componentCls}-solid`]:{backgroundColor:a,borderColor:a,color:e.colorTextLightSolid},[`&${e.componentCls}-filled`]:{backgroundColor:i,color:n}}})),kQ=al([`Tag`,`preset`],e=>OQ(SQ(e)),CQ);function AQ(e){return typeof e==`string`?e.charAt(0).toUpperCase()+e.slice(1):e}var jQ=(e,t,n)=>{let r=AQ(n);return{[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:e[`color${r}Bg`],borderColor:e[`color${r}Border`],color:e[`color${n}`]},[`&${e.componentCls}-solid`]:{backgroundColor:e[`color${n}`],borderColor:e[`color${n}`]},[`&${e.componentCls}-filled`]:{backgroundColor:e[`color${r}Bg`],color:e[`color${n}`]}}}},MQ=al([`Tag`,`status`],e=>{let t=SQ(e);return[jQ(t,`success`,`Success`),jQ(t,`processing`,`Info`),jQ(t,`error`,`Error`),jQ(t,`warning`,`Warning`)]},CQ),NQ=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,children:o,icon:s,color:c,variant:l,onClose:u,bordered:d,disabled:f,href:p,target:m,styles:h,classNames:g,..._}=e,{getPrefixCls:v,direction:y,className:b,variant:x,style:C,classNames:w,styles:T}=li(`tag`),[E,D,O,k,A]=DQ(e,x),j=O||k,M=S.useContext(zp),N=f??M,{tag:P}=S.useContext(oi),[F,I]=S.useState(!0),L=Sr(_,[`closeIcon`,`closable`]),R={...e,color:D,variant:E,disabled:N},[z,B]=Fd([w,g],[T,h],{props:R}),V=S.useMemo(()=>{let e={...B.root,...C,...a};return N||(e={...A,...e}),e},[B.root,C,a,A,N]),H=v(`tag`,n),[U,W]=wQ(H),ee=J(H,b,z.root,`${H}-${E}`,{[`${H}-${D}`]:j,[`${H}-hidden`]:!F,[`${H}-rtl`]:y===`rtl`,[`${H}-disabled`]:N},r,i,U,W),te=e=>{N||(e.stopPropagation(),u?.(e),!e.defaultPrevented&&I(!1))},[,ne]=Td(yd(e),yd(P),{closable:!1,closeIconRender:e=>Np(e,S.createElement(`span`,{className:`${H}-close-icon`,onClick:te},e),e=>({onClick:t=>{e?.onClick?.(t),te(t)},className:J(e?.className,`${H}-close-icon`)}))}),re=typeof _.onClick==`function`||o&&o.type===`a`,ie=Pp(s,{className:J(S.isValidElement(s)?s.props?.className:void 0,z.icon),style:B.icon}),ae=ie?S.createElement(S.Fragment,null,ie,o&&S.createElement(`span`,{className:z.content,style:B.content},o)):o,G=p?`a`:`span`,oe=S.createElement(G,{...L,ref:t,className:ee,style:V,href:N?void 0:p,target:m,onClick:N?void 0:L.onClick,...p&&N?{"aria-disabled":!0}:{}},ae,ne,O&&S.createElement(kQ,{key:`preset`,prefixCls:H}),k&&S.createElement(MQ,{key:`status`,prefixCls:H}));return re?S.createElement(eh,{component:`Tag`},oe):oe});NQ.CheckableTag=TQ,NQ.CheckableTagGroup=EQ;var PQ={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z`}}]},name:`delete`,theme:`outlined`};function FQ(){return FQ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,FQ({},e,{ref:t,icon:PQ}))),LQ={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z`}}]},name:`edit`,theme:`outlined`};function RQ(){return RQ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,RQ({},e,{ref:t,icon:LQ}))),BQ={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z`}}]},name:`enter`,theme:`outlined`};function VQ(){return VQ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,VQ({},e,{ref:t,icon:BQ}))),UQ=(e,t,n,r)=>{let{titleMarginBottom:i,fontWeightStrong:a}=r;return{marginBottom:i,color:n,fontWeight:a,fontSize:e,lineHeight:t}},WQ=e=>{let t=[1,2,3,4,5],n={};return t.forEach(t=>{n[` h${t}&, div&-h${t}, div&-h${t} > textarea, h${t} - `]=KQ(e[`fontSizeHeading${t}`],e[`lineHeightHeading${t}`],e.colorTextHeading,e)}),n},JQ=e=>{let{componentCls:t}=e;return{[`&${`${t}-link`}`]:{...nl(e),userSelect:`text`,[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:`none`,[`${t}-actions`]:{pointerEvents:`auto`}}}}}},YQ=e=>({code:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.2em 0.1em`,fontSize:`85%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3},kbd:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.15em 0.1em`,fontSize:`90%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.06)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:tc[2]},"u, ins":{textDecoration:`underline`,textDecorationSkipInk:`auto`},"s, del":{textDecoration:`line-through`},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:`0 1em`,padding:0,li:{marginInline:`20px 0`,marginBlock:0,paddingInline:`4px 0`,paddingBlock:0}},ul:{listStyleType:`circle`,ul:{listStyleType:`disc`}},ol:{listStyleType:`decimal`},"pre, blockquote":{margin:`1em 0`},pre:{padding:`0.4em 0.6em`,whiteSpace:`pre-wrap`,wordWrap:`break-word`,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:`inline`,margin:0,padding:0,fontSize:`inherit`,fontFamily:`inherit`,background:`transparent`,border:0}},blockquote:{paddingInline:`0.6em 0`,paddingBlock:0,borderInlineStart:`4px solid rgba(100, 100, 100, 0.2)`,opacity:.85}}),XQ=e=>{let{componentCls:t,paddingSM:n}=e,r=n;return{"&-edit-content":{position:`relative`,"div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(r).div(-2).add(1).equal(),marginBottom:e.calc(r).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:`absolute`,insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:`normal`,fontSize:e.fontSize,fontStyle:`normal`,pointerEvents:`none`},textarea:{margin:`0!important`,MozTransition:`none`,height:`1em`}}}},ZQ=e=>({[`${e.componentCls}-copy-success`]:{"&, &:hover, &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),QQ=()=>({"a&-ellipsis, span&-ellipsis":{display:`inline-block`,maxWidth:`100%`},"&-ellipsis-single-line":{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"a&, span&":{verticalAlign:`bottom`},"> code":{paddingBlock:0,maxWidth:`calc(100% - 1.2em)`,display:`inline-block`,overflow:`hidden`,textOverflow:`ellipsis`,verticalAlign:`bottom`,boxSizing:`content-box`}},"&-ellipsis-multiple-line":{display:`-webkit-box`,overflow:`hidden`,WebkitLineClamp:3,WebkitBoxOrient:`vertical`}}),$Q=rl(`Typography`,e=>{let{componentCls:t,titleMarginTop:n}=e;return{[t]:{color:e.colorText,wordBreak:`break-word`,lineHeight:e.lineHeight,[`&${t}-secondary, &${t}-link${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success, &${t}-link${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning, &${t}-link${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger, &${t}-link${t}-danger`]:{color:e.colorErrorText,[`&${t}-link:active, &${t}-link:focus`]:{color:e.colorErrorTextActive},[`&${t}-link:hover`]:{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,userSelect:`none`},"div&, p":{marginBottom:`1em`},...qQ(e),[`& + h1${t}, & + h2${t}, & + h3${t}, & + h4${t}, & + h5${t}`]:{marginTop:n},"div, ul, li, p, h1, h2, h3, h4, h5":{"+ h1, + h2, + h3, + h4, + h5":{marginTop:n}},...YQ(e),...JQ(e),[`${t}-actions`]:{display:`inline`},[` + `]=UQ(e[`fontSizeHeading${t}`],e[`lineHeightHeading${t}`],e.colorTextHeading,e)}),n},GQ=e=>{let{componentCls:t}=e;return{[`&${`${t}-link`}`]:{...nl(e),userSelect:`text`,[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:`none`,[`${t}-actions`]:{pointerEvents:`auto`}}}}}},KQ=e=>({code:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.2em 0.1em`,fontSize:`85%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3},kbd:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.15em 0.1em`,fontSize:`90%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.06)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:tc[2]},"u, ins":{textDecoration:`underline`,textDecorationSkipInk:`auto`},"s, del":{textDecoration:`line-through`},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:`0 1em`,padding:0,li:{marginInline:`20px 0`,marginBlock:0,paddingInline:`4px 0`,paddingBlock:0}},ul:{listStyleType:`circle`,ul:{listStyleType:`disc`}},ol:{listStyleType:`decimal`},"pre, blockquote":{margin:`1em 0`},pre:{padding:`0.4em 0.6em`,whiteSpace:`pre-wrap`,wordWrap:`break-word`,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:`inline`,margin:0,padding:0,fontSize:`inherit`,fontFamily:`inherit`,background:`transparent`,border:0}},blockquote:{paddingInline:`0.6em 0`,paddingBlock:0,borderInlineStart:`4px solid rgba(100, 100, 100, 0.2)`,opacity:.85}}),qQ=e=>{let{componentCls:t,paddingSM:n}=e,r=n;return{"&-edit-content":{position:`relative`,"div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(r).div(-2).add(1).equal(),marginBottom:e.calc(r).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:`absolute`,insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:`normal`,fontSize:e.fontSize,fontStyle:`normal`,pointerEvents:`none`},textarea:{margin:`0!important`,MozTransition:`none`,height:`1em`}}}},JQ=e=>({[`${e.componentCls}-copy-success`]:{"&, &:hover, &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),YQ=()=>({"a&-ellipsis, span&-ellipsis":{display:`inline-block`,maxWidth:`100%`},"&-ellipsis-single-line":{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"a&, span&":{verticalAlign:`bottom`},"> code":{paddingBlock:0,maxWidth:`calc(100% - 1.2em)`,display:`inline-block`,overflow:`hidden`,textOverflow:`ellipsis`,verticalAlign:`bottom`,boxSizing:`content-box`}},"&-ellipsis-multiple-line":{display:`-webkit-box`,overflow:`hidden`,WebkitLineClamp:3,WebkitBoxOrient:`vertical`}}),XQ=rl(`Typography`,e=>{let{componentCls:t,titleMarginTop:n}=e;return{[t]:{color:e.colorText,wordBreak:`break-word`,lineHeight:e.lineHeight,[`&${t}-secondary, &${t}-link${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success, &${t}-link${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning, &${t}-link${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger, &${t}-link${t}-danger`]:{color:e.colorErrorText,[`&${t}-link:active, &${t}-link:focus`]:{color:e.colorErrorTextActive},[`&${t}-link:hover`]:{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,userSelect:`none`},"div&, p":{marginBottom:`1em`},...WQ(e),[`& + h1${t}, & + h2${t}, & + h3${t}, & + h4${t}, & + h5${t}`]:{marginTop:n},"div, ul, li, p, h1, h2, h3, h4, h5":{"+ h1, + h2, + h3, + h4, + h5":{marginTop:n}},...KQ(e),...GQ(e),[`${t}-actions`]:{display:`inline`},[` ${t}-expand, ${t}-collapse, ${t}-edit, ${t}-copy - `]:{...nl(e),marginInlineStart:e.marginXXS},...XQ(e),...ZQ(e),...QQ(),"&-rtl":{direction:`rtl`}}}},()=>({titleMarginTop:`1.2em`,titleMarginBottom:`0.5em`})),e$=e=>{let{prefixCls:t,"aria-label":n,className:r,style:i,direction:a,maxLength:o,autoSize:s=!0,value:c,onSave:l,onCancel:u,onEnd:d,component:f,enterIcon:p=S.createElement(GQ,null)}=e,m=S.useRef(null),h=S.useRef(!1),g=S.useRef(null),[_,v]=S.useState(c);S.useEffect(()=>{v(c)},[c]),S.useEffect(()=>{if(m.current?.resizableTextArea){let{textArea:e}=m.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let y=({target:e})=>{v(e.value.replace(/[\n\r]/g,``))},b=()=>{h.current=!0},x=()=>{h.current=!1},C=({keyCode:e})=>{h.current||(g.current=e)},w=()=>{l(_.trim())},T=({keyCode:e,ctrlKey:t,altKey:n,metaKey:r,shiftKey:i})=>{g.current!==e||h.current||t||n||r||i||(e===om.ENTER?(w(),d?.()):e===om.ESC&&u())},E=()=>{w()},[D,O]=$Q(t),k=J(t,`${t}-edit-content`,{[`${t}-rtl`]:a===`rtl`,[`${t}-${f}`]:!!f},r,D,O);return S.createElement(`div`,{className:k,style:i},S.createElement(_W,{ref:m,maxLength:o,value:_,onChange:y,onKeyDown:C,onKeyUp:T,onCompositionStart:b,onCompositionEnd:x,onBlur:E,"aria-label":n,rows:1,autoSize:s}),p===null?null:Pp(p,{className:`${t}-edit-content-confirm`}))},t$=(e,t)=>{let n=!1,r=r=>{r.stopPropagation(),r.preventDefault(),r.clipboardData?.clearData(),r.clipboardData?.setData(`text/plain`,e),t&&r.clipboardData?.setData(`text/html`,e),n=!0};try{return document.addEventListener(`copy`,r,{capture:!0}),document.execCommand(`copy`),n}catch{return!1}finally{document.removeEventListener(`copy`,r,{capture:!0})}},n$=async(e,t)=>{try{return t?await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:`text/html`}),"text/plain":new Blob([e],{type:`text/plain`})})]):await navigator.clipboard.writeText(e),!0}catch{return!1}};async function r$(e,t){if(typeof e!=`string`)return!1;let n=t?.format===`text/html`;return!!(await n$(e,n)||t$(e,n))}var i$=({copyConfig:e,children:t})=>{let[n,r]=S.useState(!1),[i,a]=S.useState(!1),o=S.useRef(null),s=()=>{o.current&&clearTimeout(o.current)},c={};return e.format&&(c.format=e.format),S.useEffect(()=>s,[]),{copied:n,copyLoading:i,onClick:In(async n=>{n?.preventDefault(),n?.stopPropagation(),a(!0);try{await r$((typeof e.text==`function`?await e.text():e.text)||EG(t,{skipEmpty:!0}).join(``)||``,c),a(!1),r(!0),s(),o.current=setTimeout(()=>{r(!1)},3e3),e.onCopy?.(n)}catch(e){throw a(!1),e}})}};function a$(e,t){return S.useMemo(()=>{let n=!!e;return[n,{...t,...n&&typeof e==`object`?e:null}]},[e])}var o$=e=>{let t=(0,S.useRef)(void 0);return(0,S.useEffect)(()=>{t.current=e}),t.current},s$=(e,t,n)=>(0,S.useMemo)(()=>e===!0?{title:t??n}:(0,S.isValidElement)(e)?{title:e}:hd(e)?{title:t??n,...e}:{title:e},[e,t,n]),c$=S.forwardRef((e,t)=>{let{prefixCls:n,component:r=`article`,className:i,rootClassName:a,children:o,direction:s,style:c,...l}=e,{getPrefixCls:u,direction:d,className:f,style:p}=li(`typography`),m=s??d,h=u(`typography`,n),[g,_]=$Q(h),v=J(h,f,{[`${h}-rtl`]:m===`rtl`},i,a,g,_),y={...p,...c};return S.createElement(r,{className:v,style:y,ref:t,...l},o)}),l$={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`};function u$(){return u$=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,u$({},e,{ref:t,icon:l$}))),f$=e=>e===!1?[!1,!1]:EG(e);function p$(e,t,n){return e===!0||e===void 0?t:e||n&&t}function m$(e){let t=document.createElement(`em`);e.appendChild(t);let 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}var h$=e=>[`string`,`number`].includes(typeof e),g$=e=>{let{prefixCls:t,copied:n,locale:r,iconOnly:i,tooltips:a,icon:o,tabIndex:s,onCopy:c,loading:l}=e,u=f$(a),d=f$(o),{copied:f,copy:p}=r??{},m=n?f:p,h=p$(u[+!!n],m),g=typeof h==`string`?h:m;return S.createElement(Aw,{title:h},S.createElement(`button`,{type:`button`,className:J(`${t}-copy`,{[`${t}-copy-success`]:n,[`${t}-copy-icon-only`]:i}),onClick:c,"aria-label":g,tabIndex:s},n?p$(d[1],S.createElement(kC,null),!0):p$(d[0],l?S.createElement(xm,null):S.createElement(d$,null),!0)))},_$=S.forwardRef(({style:e,children:t},n)=>{let r=S.useRef(null);return S.useImperativeHandle(n,()=>({isExceed:()=>{let e=r.current;return e.scrollHeight>e.clientHeight},getHeight:()=>r.current.clientHeight})),S.createElement(`span`,{"aria-hidden":!0,ref:r,style:{position:`fixed`,display:`block`,left:0,top:0,pointerEvents:`none`,backgroundColor:`rgba(255, 0, 0, 0.65)`,...e}},t)}),v$=e=>e.reduce((e,t)=>e+(h$(t)?String(t).length:1),0);function y$(e,t){let n=0,r=[];for(let i=0;it){let e=t-n;return r.push(String(a).slice(0,e)),r}r.push(a),n=s}return e}var b$=0,x$=1,S$=2,C$=3,w$=4,T$={display:`-webkit-box`,overflow:`hidden`,WebkitBoxOrient:`vertical`};function E$(e){let{enableMeasure:t,width:n,text:r,children:i,rows:a,expanded:o,miscDeps:s,onEllipsis:c}=e,l=S.useMemo(()=>Cr(r),[r]),u=S.useMemo(()=>v$(l),[r]),d=S.useMemo(()=>i(l,!1),[r]),[f,p]=S.useState(null),m=S.useRef(null),h=S.useRef(null),g=S.useRef(null),_=S.useRef(null),v=S.useRef(null),[y,b]=S.useState(!1),[x,C]=S.useState(b$),[w,T]=S.useState(0),[E,D]=S.useState(null);zn(()=>{C(t&&n&&u?x$:b$)},[n,r,a,t,l]),zn(()=>{if(x===x$)C(S$),D(h.current&&getComputedStyle(h.current).whiteSpace);else if(x===S$){let e=!!g.current?.isExceed();C(e?C$:w$),p(e?[0,u]:null),b(e);let t=g.current?.getHeight()||0,n=a===1?0:_.current?.getHeight()||0,r=v.current?.getHeight()||0;T(Math.max(t,n+r)+1),c(e)}},[x]);let O=f?Math.ceil((f[0]+f[1])/2):0;zn(()=>{let[e,t]=f||[0,0];if(e!==t){let n=(m.current?.getHeight()||0)>w,r=O;t-e===1&&(r=n?e:t),p(n?[e,r]:[r,t])}},[f,O]);let k=S.useMemo(()=>{if(!t)return i(l,!1);if(x!==C$||!f||f[0]!==f[1]){let e=i(l,!1);return[w$,b$].includes(x)?e:S.createElement(`span`,{style:{...T$,WebkitLineClamp:a}},e)}return i(o?l:y$(l,f[0]),y)},[o,x,f,l].concat(Zr(s))),A={width:n,margin:0,padding:0,whiteSpace:E===`nowrap`?`normal`:`inherit`};return S.createElement(S.Fragment,null,k,x===S$&&S.createElement(S.Fragment,null,S.createElement(_$,{style:{...A,...T$,WebkitLineClamp:a},ref:g},d),S.createElement(_$,{style:{...A,...T$,WebkitLineClamp:a-1},ref:_},d),S.createElement(_$,{style:{...A,...T$,WebkitLineClamp:1},ref:v},i([],!0))),x===C$&&f&&f[0]!==f[1]&&S.createElement(_$,{style:{...A,top:400},ref:m},i(y$(l,O),!0)),x===x$&&S.createElement(`span`,{style:{whiteSpace:`inherit`},ref:h}))}var D$=({enableEllipsis:e,isEllipsis:t,open:n,children:r,tooltipProps:i})=>{if(!i?.title||!e)return r;let a=n&&t;return S.createElement(Aw,{open:a,...i},r)};function O$({mark:e,code:t,underline:n,delete:r,strong:i,keyboard:a,italic:o},s){let c=s;function l(e,t){t&&(c=S.createElement(e,{},c))}return l(`strong`,i),l(`u`,n),l(`del`,r),l(`code`,t),l(`mark`,e),l(`kbd`,a),l(`i`,o),c}var k$=`...`,A$=[`delete`,`mark`,`code`,`underline`,`strong`,`keyboard`,`italic`],j$=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,type:a,disabled:o,children:s,ellipsis:c,editable:l,copyable:u,component:d,title:f,onMouseEnter:p,onMouseLeave:m,...h}=e,{getPrefixCls:g,direction:_}=S.useContext(oi),[v]=cd(`Text`),y=S.useRef(null),b=S.useRef(null),x=g(`typography`,n),C=Sr(h,A$),[w,T]=a$(l),[E,D]=Hn(!1,T.editing),{triggerType:O=[`icon`]}=T,k=e=>{e&&T.onStart?.(),D(e)},A=o$(E);zn(()=>{!E&&A&&b.current?.focus()},[E]);let j=e=>{e?.preventDefault(),k(!0)},M=e=>{T.onChange?.(e),k(!1)},N=()=>{T.onCancel?.(),k(!1)},[P,F]=a$(u),{copied:I,copyLoading:L,onClick:R}=i$({copyConfig:F,children:s}),[z,B]=S.useState(!1),[V,H]=S.useState(!1),[U,W]=S.useState(!1),[ee,te]=S.useState(!1),[ne,re]=S.useState(!0),[ie,ae]=a$(c,{expandable:!1,symbol:e=>e?v?.collapse:v?.expand}),[G,oe]=Hn(ae.defaultExpanded||!1,ae.expanded),K=ie&&(!G||ae.expandable===`collapsible`),{rows:se=1}=ae,ce=S.useMemo(()=>K&&(ae.suffix!==void 0||ae.onEllipsis||ae.expandable||w||P),[K,ae,w,P]);zn(()=>{ie&&!ce&&(B(Oy(`webkitLineClamp`)),H(Oy(`textOverflow`)))},[ce,ie]);let[q,le]=S.useState(K),ue=S.useMemo(()=>ce?!1:se===1?V:z,[ce,V,z]);zn(()=>{le(ue&&K)},[ue,K]);let de=s$(ae.tooltip,T.text,s),fe=q&&!!de.title,pe=K&&(q?fe&&ee:U),me=K&&se===1&&q,he=K&&se>1&&q,ge=(e,t)=>{oe(t.expanded),ae.onExpand?.(e,t)},[_e,ve]=S.useState(0),[ye,be]=S.useState(!1),[xe,Se]=S.useState(!1),Ce=({offsetWidth:e})=>{ve(e)},we=e=>{W(e),U!==e&&ae.onEllipsis?.(e)};S.useEffect(()=>{let e=y.current;if(ie&&fe&&e){let t=m$(e);ee!==t&&te(t)}},[ie,fe,s,he,ne,_e]),S.useEffect(()=>{let e=y.current;if(typeof IntersectionObserver>`u`||!e||!fe||!K)return;let t=new IntersectionObserver(()=>{re(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[fe,K]);let Te=S.useMemo(()=>{if(!(!ie||q))return[T.text,s,f,de.title].find(h$)},[ie,q,f,de.title,pe]);if(E)return S.createElement(e$,{value:T.text??(typeof s==`string`?s:``),onSave:M,onCancel:N,onEnd:T.onEnd,prefixCls:x,className:r,style:i,direction:_,component:d,maxLength:T.maxLength,autoSize:T.autoSize,enterIcon:T.enterIcon});let Ee=()=>{let{expandable:e,symbol:t}=ae;return e?S.createElement(`button`,{type:`button`,key:`expand`,className:`${x}-${G?`collapse`:`expand`}`,onClick:e=>ge(e,{expanded:!G}),"aria-label":G?v.collapse:v?.expand},typeof t==`function`?t(G):t):null},De=()=>{if(!w)return;let{icon:e,tooltip:t,tabIndex:n}=T,r=Cr(t)[0]||v?.edit,i=typeof r==`string`?r:``;return O.includes(`icon`)?S.createElement(Aw,{key:`edit`,title:t===!1?``:r},S.createElement(`button`,{type:`button`,ref:b,className:`${x}-edit`,onClick:j,"aria-label":i,tabIndex:n},e||S.createElement(HQ,{role:`button`}))):null},Oe=()=>P?S.createElement(g$,{key:`copy`,...F,prefixCls:x,copied:I,locale:v,onCopy:R,loading:L,iconOnly:!fd(s)}):null,ke=e=>{let t=e&&Ee(),n=De(),r=Oe();return!t&&!n&&!r?null:S.createElement(`span`,{key:`operations`,className:`${x}-actions`,onMouseEnter:()=>be(!0),onMouseLeave:()=>be(!1)},t,n,r)},Ae=e=>[e&&!G&&S.createElement(`span`,{"aria-hidden":!0,key:`ellipsis`},k$),ae.suffix,ke(e)];return S.createElement(Wr,{onResize:Ce,disabled:!K},c=>S.createElement(D$,{tooltipProps:de,enableEllipsis:K,isEllipsis:pe,open:xe&&!ye},S.createElement(c$,{onMouseEnter:e=>{Se(!0),p?.(e)},onMouseLeave:e=>{Se(!1),m?.(e)},className:J({[`${x}-${a}`]:a,[`${x}-disabled`]:o,[`${x}-ellipsis`]:ie,[`${x}-ellipsis-single-line`]:me,[`${x}-ellipsis-multiple-line`]:he,[`${x}-link`]:d===`a`},r),prefixCls:n,style:{...i,WebkitLineClamp:he?se:void 0},component:d,ref:$n(c,y,t),direction:_,onClick:O.includes(`text`)?j:void 0,"aria-label":Te?.toString(),title:f,...C},S.createElement(E$,{enableMeasure:K&&!q,text:s,rows:se,width:_e,onEllipsis:we,expanded:G,miscDeps:[I,G,L,w,P,v].concat(Zr(A$.map(t=>e[t])))},(t,n)=>O$(e,S.createElement(S.Fragment,null,t.length>0&&n&&!G&&Te?S.createElement(`span`,{key:`show-content`,"aria-hidden":!0},t):t,Ae(n)))))))}),M$=S.forwardRef((e,t)=>{let{ellipsis:n,rel:r,children:i,navigate:a,...o}=e,s={...o,rel:r===void 0&&o.target===`_blank`?`noopener noreferrer`:r};return S.createElement(j$,{...s,ref:t,ellipsis:!!n,component:`a`},i)}),N$=S.forwardRef((e,t)=>{let{children:n,...r}=e;return S.createElement(j$,{ref:t,...r,component:`div`},n)}),P$=S.forwardRef((e,t)=>{let{ellipsis:n,children:r,...i}=e,a=S.useMemo(()=>hd(n)?Sr(n,[`expandable`,`rows`]):n,[n]);return S.createElement(j$,{ref:t,...i,ellipsis:a,component:`span`},r)}),F$=[1,2,3,4,5],I$=S.forwardRef((e,t)=>{let{level:n=1,children:r,...i}=e,a=F$.includes(n)?`h${n}`:`h1`;return S.createElement(j$,{ref:t,...i,component:a},r)}),Z=c$;Z.Text=P$,Z.Link=M$,Z.Title=I$,Z.Paragraph=N$;var L$=((e,t)=>{if(e&&t){let n=Array.isArray(t)?t:t.split(`,`),r=e.name||``,i=e.type||``,a=i.replace(/\/.*$/,``);return n.some(e=>{let t=e.trim();if(/^\*(\/\*)?$/.test(e))return!0;if(t.charAt(0)===`.`){let e=r.toLowerCase(),n=t.toLowerCase(),i=[n];return(n===`.jpg`||n===`.jpeg`)&&(i=[`.jpg`,`.jpeg`]),i.some(t=>e.endsWith(t))}return/\/\*$/.test(t)?a===t.replace(/\/.*$/,``):i===t?!0:/^\w+$/.test(t)?(br(!1,`Upload takes an invalidate 'accept' type '${t}'.Skip for check.`),!0):!1})}return!0});function R$(e,t){let n=`cannot ${e.method} ${e.action} ${t.status}'`,r=Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}function z$(e){let t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function B$(e){let t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});let n=new FormData;e.data&&Object.keys(e.data).forEach(t=>{let r=e.data[t];if(Array.isArray(r)){r.forEach(e=>{n.append(`${t}[]`,e)});return}n.append(t,r)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(R$(e,t),z$(t)):e.onSuccess(z$(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&`withCredentials`in t&&(t.withCredentials=!0);let r=e.headers||{};return r[`X-Requested-With`]!==null&&t.setRequestHeader(`X-Requested-With`,`XMLHttpRequest`),Object.keys(r).forEach(e=>{r[e]!==null&&t.setRequestHeader(e,r[e])}),t.send(n),{abort(){t.abort()}}}var V$=async(e,t)=>{let n=[],r=[];e.forEach(e=>r.push(e.webkitGetAsEntry()));async function i(e){let t=e.createReader(),n=[];for(;;){let e=await new Promise(e=>{t.readEntries(e,()=>e([]))}),r=e.length;if(!r)break;for(let t=0;t{e.file(r=>{t(r)?(e.fullPath&&!r.webkitRelativePath&&(Object.defineProperties(r,{webkitRelativePath:{writable:!0}}),r.webkitRelativePath=e.fullPath.replace(/^\//,``),Object.defineProperties(r,{webkitRelativePath:{writable:!1}})),n(r)):n(null)})})}let o=async(e,t)=>{if(e){if(e.path=t||``,e.isFile){let t=await a(e);t&&n.push(t)}else if(e.isDirectory){let t=await i(e);r.push(...t)}}},s=0;for(;s{let{accept:n,directory:r}=this.props,i,a;if(typeof n==`string`)a=n;else{let{filter:e,format:t}=n||{};a=t,i=e===`native`?()=>!0:e}return(i||(r||t?e=>L$(e,a):()=>!0))(e)};onChange=e=>{let{files:t}=e.target,n=[...t].filter(e=>this.filterFile(e));this.uploadFiles(n),this.reset()};onClick=e=>{let t=this.fileInput;if(!t)return;let n=e.target,{onClick:r}=this.props;n&&n.tagName===`BUTTON`&&(t.parentNode.focus(),n.blur()),t.click(),r&&r(e)};onKeyDown=e=>{e.key===`Enter`&&this.onClick(e)};onDataTransferFiles=async(e,t)=>{let{multiple:n,directory:r}=this.props,i=[...e.items||[]],a=[...e.files||[]];if((a.length>0||i.some(e=>e.kind===`file`))&&t?.(),r)a=await V$(Array.prototype.slice.call(i),this.filterFile),this.uploadFiles(a);else{let e=[...a].filter(e=>this.filterFile(e,!0));n===!1&&(e=a.slice(0,1)),this.uploadFiles(e)}};onFilePaste=async e=>{let{pastable:t}=this.props;if(t&&e.type===`paste`){let t=e.clipboardData;return this.onDataTransferFiles(t,()=>{e.preventDefault()})}};onFileDragOver=e=>{e.preventDefault()};onFileDrop=async e=>{if(e.preventDefault(),e.type===`drop`){let t=e.dataTransfer;return this.onDataTransferFiles(t)}};componentDidMount(){this._isMounted=!0;let{pastable:e}=this.props;e&&document.addEventListener(`paste`,this.onFilePaste)}componentWillUnmount(){this._isMounted=!1,this.abort(),document.removeEventListener(`paste`,this.onFilePaste)}componentDidUpdate(e){let{pastable:t}=this.props;t&&!e.pastable?document.addEventListener(`paste`,this.onFilePaste):!t&&e.pastable&&document.removeEventListener(`paste`,this.onFilePaste)}uploadFiles=e=>{let t=[...e],n=t.map(e=>(e.uid=W$(),this.processFile(e,t)));Promise.all(n).then(e=>{let{onBatchStart:t}=this.props;t?.(e.map(({origin:e,parsedFile:t})=>({file:e,parsedFile:t}))),e.filter(e=>e.parsedFile!==null).forEach(e=>{this.post(e)})})};processFile=async(e,t)=>{let{beforeUpload:n}=this.props,r=e;if(n){try{r=await n(e,t)}catch{r=!1}if(r===!1)return{origin:e,parsedFile:null,action:null,data:null}}let{action:i}=this.props,a;a=typeof i==`function`?await i(e):i;let{data:o}=this.props,s;s=typeof o==`function`?await o(e):o;let c=(typeof r==`object`||typeof r==`string`)&&r?r:e,l;l=c instanceof File?c:new File([c],e.name,{type:e.type});let u=l;return u.uid=e.uid,{origin:e,data:s,parsedFile:u,action:a}};post({data:e,origin:t,action:n,parsedFile:r}){if(!this._isMounted)return;let{onStart:i,customRequest:a,name:o,headers:s,withCredentials:c,method:l}=this.props,{uid:u}=t,d=a||B$,f={action:n,filename:o,data:e,file:r,headers:s,withCredentials:c,method:l||`post`,onProgress:e=>{let{onProgress:t}=this.props;t?.(e,r)},onSuccess:(e,t)=>{let{onSuccess:n}=this.props;n?.(e,r,t),delete this.reqs[u]},onError:(e,t)=>{let{onError:n}=this.props;n?.(e,t,r),delete this.reqs[u]}};i(t),this.reqs[u]=d(f,{defaultRequest:B$})}reset(){this.setState({uid:W$()})}abort(e){let{reqs:t}=this;if(e){let n=e.uid?e.uid:e;t[n]&&t[n].abort&&t[n].abort(),delete t[n]}else Object.keys(t).forEach(e=>{t[e]&&t[e].abort&&t[e].abort(),delete t[e]})}saveFileInput=e=>{this.fileInput=e};render(){let{component:e,prefixCls:t,className:n,classNames:r={},disabled:i,id:a,name:o,style:s,styles:c={},multiple:l,accept:u,capture:d,children:f,directory:p,openFileDialogOnClick:m,onMouseEnter:h,onMouseLeave:g,hasControlInside:_,...v}=this.props,y=typeof u==`string`?u:u?.format,b=J(t,{[`${t}-disabled`]:i,[n]:n}),x=p?{directory:`directory`,webkitdirectory:`webkitdirectory`}:{},C=i?{}:{onClick:m?this.onClick:()=>{},onKeyDown:m?this.onKeyDown:()=>{},onMouseEnter:h,onMouseLeave:g,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:_?void 0:`0`};return S.createElement(e,G$({},C,{className:b,role:_?void 0:`button`,style:s}),S.createElement(`input`,G$({},Vu(v,{aria:!0,data:!0}),{id:a,name:o,disabled:i,type:`file`,ref:this.saveFileInput,onClick:e=>e.stopPropagation(),key:this.state.uid,style:{display:`none`,...c.input},className:r.input,accept:y},x,{multiple:l,onChange:this.onChange},d==null?{}:{capture:d})),f)}};function q$(){return q$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.uploader=e};render(){return S.createElement(K$,q$({},this.props,{ref:this.saveUploader}))}},X$=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:`relative`,width:`100%`,height:`100%`,textAlign:`center`,background:e.colorFillAlter,border:`${Y(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:e.padding},[`${t}-btn`]:{display:`table`,width:`100%`,height:`100%`,outline:`none`,borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:`${Y(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`}},[`${t}-drag-container`]:{display:`table-cell`,verticalAlign:`middle`},[` + `]:{...nl(e),marginInlineStart:e.marginXXS},...qQ(e),...JQ(e),...YQ(),"&-rtl":{direction:`rtl`}}}},()=>({titleMarginTop:`1.2em`,titleMarginBottom:`0.5em`})),ZQ=e=>{let{prefixCls:t,"aria-label":n,className:r,style:i,direction:a,maxLength:o,autoSize:s=!0,value:c,onSave:l,onCancel:u,onEnd:d,component:f,enterIcon:p=S.createElement(HQ,null)}=e,m=S.useRef(null),h=S.useRef(!1),g=S.useRef(null),[_,v]=S.useState(c);S.useEffect(()=>{v(c)},[c]),S.useEffect(()=>{if(m.current?.resizableTextArea){let{textArea:e}=m.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let y=({target:e})=>{v(e.value.replace(/[\n\r]/g,``))},b=()=>{h.current=!0},x=()=>{h.current=!1},C=({keyCode:e})=>{h.current||(g.current=e)},w=()=>{l(_.trim())},T=({keyCode:e,ctrlKey:t,altKey:n,metaKey:r,shiftKey:i})=>{g.current!==e||h.current||t||n||r||i||(e===om.ENTER?(w(),d?.()):e===om.ESC&&u())},E=()=>{w()},[D,O]=XQ(t),k=J(t,`${t}-edit-content`,{[`${t}-rtl`]:a===`rtl`,[`${t}-${f}`]:!!f},r,D,O);return S.createElement(`div`,{className:k,style:i},S.createElement(mW,{ref:m,maxLength:o,value:_,onChange:y,onKeyDown:C,onKeyUp:T,onCompositionStart:b,onCompositionEnd:x,onBlur:E,"aria-label":n,rows:1,autoSize:s}),p===null?null:Pp(p,{className:`${t}-edit-content-confirm`}))},QQ=(e,t)=>{let n=!1,r=r=>{r.stopPropagation(),r.preventDefault(),r.clipboardData?.clearData(),r.clipboardData?.setData(`text/plain`,e),t&&r.clipboardData?.setData(`text/html`,e),n=!0};try{return document.addEventListener(`copy`,r,{capture:!0}),document.execCommand(`copy`),n}catch{return!1}finally{document.removeEventListener(`copy`,r,{capture:!0})}},$Q=async(e,t)=>{try{return t?await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:`text/html`}),"text/plain":new Blob([e],{type:`text/plain`})})]):await navigator.clipboard.writeText(e),!0}catch{return!1}};async function e$(e,t){if(typeof e!=`string`)return!1;let n=t?.format===`text/html`;return!!(await $Q(e,n)||QQ(e,n))}var t$=({copyConfig:e,children:t})=>{let[n,r]=S.useState(!1),[i,a]=S.useState(!1),o=S.useRef(null),s=()=>{o.current&&clearTimeout(o.current)},c={};return e.format&&(c.format=e.format),S.useEffect(()=>s,[]),{copied:n,copyLoading:i,onClick:In(async n=>{n?.preventDefault(),n?.stopPropagation(),a(!0);try{await e$((typeof e.text==`function`?await e.text():e.text)||CG(t,{skipEmpty:!0}).join(``)||``,c),a(!1),r(!0),s(),o.current=setTimeout(()=>{r(!1)},3e3),e.onCopy?.(n)}catch(e){throw a(!1),e}})}};function n$(e,t){return S.useMemo(()=>{let n=!!e;return[n,{...t,...n&&typeof e==`object`?e:null}]},[e])}var r$=e=>{let t=(0,S.useRef)(void 0);return(0,S.useEffect)(()=>{t.current=e}),t.current},i$=(e,t,n)=>(0,S.useMemo)(()=>e===!0?{title:t??n}:(0,S.isValidElement)(e)?{title:e}:hd(e)?{title:t??n,...e}:{title:e},[e,t,n]),a$=S.forwardRef((e,t)=>{let{prefixCls:n,component:r=`article`,className:i,rootClassName:a,children:o,direction:s,style:c,...l}=e,{getPrefixCls:u,direction:d,className:f,style:p}=li(`typography`),m=s??d,h=u(`typography`,n),[g,_]=XQ(h),v=J(h,f,{[`${h}-rtl`]:m===`rtl`},i,a,g,_),y={...p,...c};return S.createElement(r,{className:v,style:y,ref:t,...l},o)}),o$={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`};function s$(){return s$=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,s$({},e,{ref:t,icon:o$}))),l$=e=>e===!1?[!1,!1]:CG(e);function u$(e,t,n){return e===!0||e===void 0?t:e||n&&t}function d$(e){let t=document.createElement(`em`);e.appendChild(t);let 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}var f$=e=>[`string`,`number`].includes(typeof e),p$=e=>{let{prefixCls:t,copied:n,locale:r,iconOnly:i,tooltips:a,icon:o,tabIndex:s,onCopy:c,loading:l}=e,u=l$(a),d=l$(o),{copied:f,copy:p}=r??{},m=n?f:p,h=u$(u[+!!n],m),g=typeof h==`string`?h:m;return S.createElement(Ow,{title:h},S.createElement(`button`,{type:`button`,className:J(`${t}-copy`,{[`${t}-copy-success`]:n,[`${t}-copy-icon-only`]:i}),onClick:c,"aria-label":g,tabIndex:s},n?u$(d[1],S.createElement(DC,null),!0):u$(d[0],l?S.createElement(xm,null):S.createElement(c$,null),!0)))},m$=S.forwardRef(({style:e,children:t},n)=>{let r=S.useRef(null);return S.useImperativeHandle(n,()=>({isExceed:()=>{let e=r.current;return e.scrollHeight>e.clientHeight},getHeight:()=>r.current.clientHeight})),S.createElement(`span`,{"aria-hidden":!0,ref:r,style:{position:`fixed`,display:`block`,left:0,top:0,pointerEvents:`none`,backgroundColor:`rgba(255, 0, 0, 0.65)`,...e}},t)}),h$=e=>e.reduce((e,t)=>e+(f$(t)?String(t).length:1),0);function g$(e,t){let n=0,r=[];for(let i=0;it){let e=t-n;return r.push(String(a).slice(0,e)),r}r.push(a),n=s}return e}var _$=0,v$=1,y$=2,b$=3,x$=4,S$={display:`-webkit-box`,overflow:`hidden`,WebkitBoxOrient:`vertical`};function C$(e){let{enableMeasure:t,width:n,text:r,children:i,rows:a,expanded:o,miscDeps:s,onEllipsis:c}=e,l=S.useMemo(()=>Cr(r),[r]),u=S.useMemo(()=>h$(l),[r]),d=S.useMemo(()=>i(l,!1),[r]),[f,p]=S.useState(null),m=S.useRef(null),h=S.useRef(null),g=S.useRef(null),_=S.useRef(null),v=S.useRef(null),[y,b]=S.useState(!1),[x,C]=S.useState(_$),[w,T]=S.useState(0),[E,D]=S.useState(null);zn(()=>{C(t&&n&&u?v$:_$)},[n,r,a,t,l]),zn(()=>{if(x===v$)C(y$),D(h.current&&getComputedStyle(h.current).whiteSpace);else if(x===y$){let e=!!g.current?.isExceed();C(e?b$:x$),p(e?[0,u]:null),b(e);let t=g.current?.getHeight()||0,n=a===1?0:_.current?.getHeight()||0,r=v.current?.getHeight()||0;T(Math.max(t,n+r)+1),c(e)}},[x]);let O=f?Math.ceil((f[0]+f[1])/2):0;zn(()=>{let[e,t]=f||[0,0];if(e!==t){let n=(m.current?.getHeight()||0)>w,r=O;t-e===1&&(r=n?e:t),p(n?[e,r]:[r,t])}},[f,O]);let k=S.useMemo(()=>{if(!t)return i(l,!1);if(x!==b$||!f||f[0]!==f[1]){let e=i(l,!1);return[x$,_$].includes(x)?e:S.createElement(`span`,{style:{...S$,WebkitLineClamp:a}},e)}return i(o?l:g$(l,f[0]),y)},[o,x,f,l].concat(Zr(s))),A={width:n,margin:0,padding:0,whiteSpace:E===`nowrap`?`normal`:`inherit`};return S.createElement(S.Fragment,null,k,x===y$&&S.createElement(S.Fragment,null,S.createElement(m$,{style:{...A,...S$,WebkitLineClamp:a},ref:g},d),S.createElement(m$,{style:{...A,...S$,WebkitLineClamp:a-1},ref:_},d),S.createElement(m$,{style:{...A,...S$,WebkitLineClamp:1},ref:v},i([],!0))),x===b$&&f&&f[0]!==f[1]&&S.createElement(m$,{style:{...A,top:400},ref:m},i(g$(l,O),!0)),x===v$&&S.createElement(`span`,{style:{whiteSpace:`inherit`},ref:h}))}var w$=({enableEllipsis:e,isEllipsis:t,open:n,children:r,tooltipProps:i})=>{if(!i?.title||!e)return r;let a=n&&t;return S.createElement(Ow,{open:a,...i},r)};function T$({mark:e,code:t,underline:n,delete:r,strong:i,keyboard:a,italic:o},s){let c=s;function l(e,t){t&&(c=S.createElement(e,{},c))}return l(`strong`,i),l(`u`,n),l(`del`,r),l(`code`,t),l(`mark`,e),l(`kbd`,a),l(`i`,o),c}var E$=`...`,D$=[`delete`,`mark`,`code`,`underline`,`strong`,`keyboard`,`italic`],O$=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,type:a,disabled:o,children:s,ellipsis:c,editable:l,copyable:u,component:d,title:f,onMouseEnter:p,onMouseLeave:m,...h}=e,{getPrefixCls:g,direction:_}=S.useContext(oi),[v]=cd(`Text`),y=S.useRef(null),b=S.useRef(null),x=g(`typography`,n),C=Sr(h,D$),[w,T]=n$(l),[E,D]=Hn(!1,T.editing),{triggerType:O=[`icon`]}=T,k=e=>{e&&T.onStart?.(),D(e)},A=r$(E);zn(()=>{!E&&A&&b.current?.focus()},[E]);let j=e=>{e?.preventDefault(),k(!0)},M=e=>{T.onChange?.(e),k(!1)},N=()=>{T.onCancel?.(),k(!1)},[P,F]=n$(u),{copied:I,copyLoading:L,onClick:R}=t$({copyConfig:F,children:s}),[z,B]=S.useState(!1),[V,H]=S.useState(!1),[U,W]=S.useState(!1),[ee,te]=S.useState(!1),[ne,re]=S.useState(!0),[ie,ae]=n$(c,{expandable:!1,symbol:e=>e?v?.collapse:v?.expand}),[G,oe]=Hn(ae.defaultExpanded||!1,ae.expanded),K=ie&&(!G||ae.expandable===`collapsible`),{rows:se=1}=ae,ce=S.useMemo(()=>K&&(ae.suffix!==void 0||ae.onEllipsis||ae.expandable||w||P),[K,ae,w,P]);zn(()=>{ie&&!ce&&(B(Oy(`webkitLineClamp`)),H(Oy(`textOverflow`)))},[ce,ie]);let[q,le]=S.useState(K),ue=S.useMemo(()=>ce?!1:se===1?V:z,[ce,V,z]);zn(()=>{le(ue&&K)},[ue,K]);let de=i$(ae.tooltip,T.text,s),fe=q&&!!de.title,pe=K&&(q?fe&&ee:U),me=K&&se===1&&q,he=K&&se>1&&q,ge=(e,t)=>{oe(t.expanded),ae.onExpand?.(e,t)},[_e,ve]=S.useState(0),[ye,be]=S.useState(!1),[xe,Se]=S.useState(!1),Ce=({offsetWidth:e})=>{ve(e)},we=e=>{W(e),U!==e&&ae.onEllipsis?.(e)};S.useEffect(()=>{let e=y.current;if(ie&&fe&&e){let t=d$(e);ee!==t&&te(t)}},[ie,fe,s,he,ne,_e]),S.useEffect(()=>{let e=y.current;if(typeof IntersectionObserver>`u`||!e||!fe||!K)return;let t=new IntersectionObserver(()=>{re(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[fe,K]);let Te=S.useMemo(()=>{if(!(!ie||q))return[T.text,s,f,de.title].find(f$)},[ie,q,f,de.title,pe]);if(E)return S.createElement(ZQ,{value:T.text??(typeof s==`string`?s:``),onSave:M,onCancel:N,onEnd:T.onEnd,prefixCls:x,className:r,style:i,direction:_,component:d,maxLength:T.maxLength,autoSize:T.autoSize,enterIcon:T.enterIcon});let Ee=()=>{let{expandable:e,symbol:t}=ae;return e?S.createElement(`button`,{type:`button`,key:`expand`,className:`${x}-${G?`collapse`:`expand`}`,onClick:e=>ge(e,{expanded:!G}),"aria-label":G?v.collapse:v?.expand},typeof t==`function`?t(G):t):null},De=()=>{if(!w)return;let{icon:e,tooltip:t,tabIndex:n}=T,r=Cr(t)[0]||v?.edit,i=typeof r==`string`?r:``;return O.includes(`icon`)?S.createElement(Ow,{key:`edit`,title:t===!1?``:r},S.createElement(`button`,{type:`button`,ref:b,className:`${x}-edit`,onClick:j,"aria-label":i,tabIndex:n},e||S.createElement(zQ,{role:`button`}))):null},Oe=()=>P?S.createElement(p$,{key:`copy`,...F,prefixCls:x,copied:I,locale:v,onCopy:R,loading:L,iconOnly:!fd(s)}):null,ke=e=>{let t=e&&Ee(),n=De(),r=Oe();return!t&&!n&&!r?null:S.createElement(`span`,{key:`operations`,className:`${x}-actions`,onMouseEnter:()=>be(!0),onMouseLeave:()=>be(!1)},t,n,r)},Ae=e=>[e&&!G&&S.createElement(`span`,{"aria-hidden":!0,key:`ellipsis`},E$),ae.suffix,ke(e)];return S.createElement(Wr,{onResize:Ce,disabled:!K},c=>S.createElement(w$,{tooltipProps:de,enableEllipsis:K,isEllipsis:pe,open:xe&&!ye},S.createElement(a$,{onMouseEnter:e=>{Se(!0),p?.(e)},onMouseLeave:e=>{Se(!1),m?.(e)},className:J({[`${x}-${a}`]:a,[`${x}-disabled`]:o,[`${x}-ellipsis`]:ie,[`${x}-ellipsis-single-line`]:me,[`${x}-ellipsis-multiple-line`]:he,[`${x}-link`]:d===`a`},r),prefixCls:n,style:{...i,WebkitLineClamp:he?se:void 0},component:d,ref:$n(c,y,t),direction:_,onClick:O.includes(`text`)?j:void 0,"aria-label":Te?.toString(),title:f,...C},S.createElement(C$,{enableMeasure:K&&!q,text:s,rows:se,width:_e,onEllipsis:we,expanded:G,miscDeps:[I,G,L,w,P,v].concat(Zr(D$.map(t=>e[t])))},(t,n)=>T$(e,S.createElement(S.Fragment,null,t.length>0&&n&&!G&&Te?S.createElement(`span`,{key:`show-content`,"aria-hidden":!0},t):t,Ae(n)))))))}),k$=S.forwardRef((e,t)=>{let{ellipsis:n,rel:r,children:i,navigate:a,...o}=e,s={...o,rel:r===void 0&&o.target===`_blank`?`noopener noreferrer`:r};return S.createElement(O$,{...s,ref:t,ellipsis:!!n,component:`a`},i)}),A$=S.forwardRef((e,t)=>{let{children:n,...r}=e;return S.createElement(O$,{ref:t,...r,component:`div`},n)}),j$=S.forwardRef((e,t)=>{let{ellipsis:n,children:r,...i}=e,a=S.useMemo(()=>hd(n)?Sr(n,[`expandable`,`rows`]):n,[n]);return S.createElement(O$,{ref:t,...i,ellipsis:a,component:`span`},r)}),M$=[1,2,3,4,5],N$=S.forwardRef((e,t)=>{let{level:n=1,children:r,...i}=e,a=M$.includes(n)?`h${n}`:`h1`;return S.createElement(O$,{ref:t,...i,component:a},r)}),Z=a$;Z.Text=j$,Z.Link=k$,Z.Title=N$,Z.Paragraph=A$;var P$=((e,t)=>{if(e&&t){let n=Array.isArray(t)?t:t.split(`,`),r=e.name||``,i=e.type||``,a=i.replace(/\/.*$/,``);return n.some(e=>{let t=e.trim();if(/^\*(\/\*)?$/.test(e))return!0;if(t.charAt(0)===`.`){let e=r.toLowerCase(),n=t.toLowerCase(),i=[n];return(n===`.jpg`||n===`.jpeg`)&&(i=[`.jpg`,`.jpeg`]),i.some(t=>e.endsWith(t))}return/\/\*$/.test(t)?a===t.replace(/\/.*$/,``):i===t?!0:/^\w+$/.test(t)?(br(!1,`Upload takes an invalidate 'accept' type '${t}'.Skip for check.`),!0):!1})}return!0});function F$(e,t){let n=`cannot ${e.method} ${e.action} ${t.status}'`,r=Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}function I$(e){let t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function L$(e){let t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});let n=new FormData;e.data&&Object.keys(e.data).forEach(t=>{let r=e.data[t];if(Array.isArray(r)){r.forEach(e=>{n.append(`${t}[]`,e)});return}n.append(t,r)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(F$(e,t),I$(t)):e.onSuccess(I$(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&`withCredentials`in t&&(t.withCredentials=!0);let r=e.headers||{};return r[`X-Requested-With`]!==null&&t.setRequestHeader(`X-Requested-With`,`XMLHttpRequest`),Object.keys(r).forEach(e=>{r[e]!==null&&t.setRequestHeader(e,r[e])}),t.send(n),{abort(){t.abort()}}}var R$=async(e,t)=>{let n=[],r=[];e.forEach(e=>r.push(e.webkitGetAsEntry()));async function i(e){let t=e.createReader(),n=[];for(;;){let e=await new Promise(e=>{t.readEntries(e,()=>e([]))}),r=e.length;if(!r)break;for(let t=0;t{e.file(r=>{t(r)?(e.fullPath&&!r.webkitRelativePath&&(Object.defineProperties(r,{webkitRelativePath:{writable:!0}}),r.webkitRelativePath=e.fullPath.replace(/^\//,``),Object.defineProperties(r,{webkitRelativePath:{writable:!1}})),n(r)):n(null)})})}let o=async(e,t)=>{if(e){if(e.path=t||``,e.isFile){let t=await a(e);t&&n.push(t)}else if(e.isDirectory){let t=await i(e);r.push(...t)}}},s=0;for(;s{let{accept:n,directory:r}=this.props,i,a;if(typeof n==`string`)a=n;else{let{filter:e,format:t}=n||{};a=t,i=e===`native`?()=>!0:e}return(i||(r||t?e=>P$(e,a):()=>!0))(e)};onChange=e=>{let{files:t}=e.target,n=[...t].filter(e=>this.filterFile(e));this.uploadFiles(n),this.reset()};onClick=e=>{let t=this.fileInput;if(!t)return;let n=e.target,{onClick:r}=this.props;n&&n.tagName===`BUTTON`&&(t.parentNode.focus(),n.blur()),t.click(),r&&r(e)};onKeyDown=e=>{e.key===`Enter`&&this.onClick(e)};onDataTransferFiles=async(e,t)=>{let{multiple:n,directory:r}=this.props,i=[...e.items||[]],a=[...e.files||[]];if((a.length>0||i.some(e=>e.kind===`file`))&&t?.(),r)a=await R$(Array.prototype.slice.call(i),this.filterFile),this.uploadFiles(a);else{let e=[...a].filter(e=>this.filterFile(e,!0));n===!1&&(e=a.slice(0,1)),this.uploadFiles(e)}};onFilePaste=async e=>{let{pastable:t}=this.props;if(t&&e.type===`paste`){let t=e.clipboardData;return this.onDataTransferFiles(t,()=>{e.preventDefault()})}};onFileDragOver=e=>{e.preventDefault()};onFileDrop=async e=>{if(e.preventDefault(),e.type===`drop`){let t=e.dataTransfer;return this.onDataTransferFiles(t)}};componentDidMount(){this._isMounted=!0;let{pastable:e}=this.props;e&&document.addEventListener(`paste`,this.onFilePaste)}componentWillUnmount(){this._isMounted=!1,this.abort(),document.removeEventListener(`paste`,this.onFilePaste)}componentDidUpdate(e){let{pastable:t}=this.props;t&&!e.pastable?document.addEventListener(`paste`,this.onFilePaste):!t&&e.pastable&&document.removeEventListener(`paste`,this.onFilePaste)}uploadFiles=e=>{let t=[...e],n=t.map(e=>(e.uid=V$(),this.processFile(e,t)));Promise.all(n).then(e=>{let{onBatchStart:t}=this.props;t?.(e.map(({origin:e,parsedFile:t})=>({file:e,parsedFile:t}))),e.filter(e=>e.parsedFile!==null).forEach(e=>{this.post(e)})})};processFile=async(e,t)=>{let{beforeUpload:n}=this.props,r=e;if(n){try{r=await n(e,t)}catch{r=!1}if(r===!1)return{origin:e,parsedFile:null,action:null,data:null}}let{action:i}=this.props,a;a=typeof i==`function`?await i(e):i;let{data:o}=this.props,s;s=typeof o==`function`?await o(e):o;let c=(typeof r==`object`||typeof r==`string`)&&r?r:e,l;l=c instanceof File?c:new File([c],e.name,{type:e.type});let u=l;return u.uid=e.uid,{origin:e,data:s,parsedFile:u,action:a}};post({data:e,origin:t,action:n,parsedFile:r}){if(!this._isMounted)return;let{onStart:i,customRequest:a,name:o,headers:s,withCredentials:c,method:l}=this.props,{uid:u}=t,d=a||L$,f={action:n,filename:o,data:e,file:r,headers:s,withCredentials:c,method:l||`post`,onProgress:e=>{let{onProgress:t}=this.props;t?.(e,r)},onSuccess:(e,t)=>{let{onSuccess:n}=this.props;n?.(e,r,t),delete this.reqs[u]},onError:(e,t)=>{let{onError:n}=this.props;n?.(e,t,r),delete this.reqs[u]}};i(t),this.reqs[u]=d(f,{defaultRequest:L$})}reset(){this.setState({uid:V$()})}abort(e){let{reqs:t}=this;if(e){let n=e.uid?e.uid:e;t[n]&&t[n].abort&&t[n].abort(),delete t[n]}else Object.keys(t).forEach(e=>{t[e]&&t[e].abort&&t[e].abort(),delete t[e]})}saveFileInput=e=>{this.fileInput=e};render(){let{component:e,prefixCls:t,className:n,classNames:r={},disabled:i,id:a,name:o,style:s,styles:c={},multiple:l,accept:u,capture:d,children:f,directory:p,openFileDialogOnClick:m,onMouseEnter:h,onMouseLeave:g,hasControlInside:_,...v}=this.props,y=typeof u==`string`?u:u?.format,b=J(t,{[`${t}-disabled`]:i,[n]:n}),x=p?{directory:`directory`,webkitdirectory:`webkitdirectory`}:{},C=i?{}:{onClick:m?this.onClick:()=>{},onKeyDown:m?this.onKeyDown:()=>{},onMouseEnter:h,onMouseLeave:g,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:_?void 0:`0`};return S.createElement(e,H$({},C,{className:b,role:_?void 0:`button`,style:s}),S.createElement(`input`,H$({},Vu(v,{aria:!0,data:!0}),{id:a,name:o,disabled:i,type:`file`,ref:this.saveFileInput,onClick:e=>e.stopPropagation(),key:this.state.uid,style:{display:`none`,...c.input},className:r.input,accept:y},x,{multiple:l,onChange:this.onChange},d==null?{}:{capture:d})),f)}};function W$(){return W$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.uploader=e};render(){return S.createElement(U$,W$({},this.props,{ref:this.saveUploader}))}},q$=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:`relative`,width:`100%`,height:`100%`,textAlign:`center`,background:e.colorFillAlter,border:`${Y(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:e.padding},[`${t}-btn`]:{display:`table`,width:`100%`,height:`100%`,outline:`none`,borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:`${Y(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`}},[`${t}-drag-container`]:{display:`table-cell`,verticalAlign:`middle`},[` &:not(${t}-disabled):hover, &-hover:not(${t}-disabled) `]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[n]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${Y(e.marginXXS)}`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{[`p${t}-drag-icon ${n}, p${t}-text, p${t}-hint - `]:{color:e.colorTextDisabled}}}}}},Z$=e=>{let{componentCls:t,iconCls:n,fontSize:r,lineHeight:i,motionDurationSlow:a,calc:o}=e,s=`${t}-list-item`,c=`${s}-actions`,l=`${s}-action`;return{[`${t}-wrapper`]:{[`${t}-list`]:{...Xc(),lineHeight:e.lineHeight,[s]:{position:`relative`,height:o(e.lineHeight).mul(r).equal(),marginTop:e.marginXS,fontSize:r,display:`flex`,alignItems:`center`,transition:`background-color ${a}`,borderRadius:e.borderRadiusSM,"&:hover":{backgroundColor:e.controlItemBgHover},[`${s}-name`]:{...qc,padding:`0 ${Y(e.paddingXS)}`,lineHeight:i,flex:`auto`,transition:`all ${a}`},[c]:{whiteSpace:`nowrap`,[l]:{opacity:0},"@media (hover: none), (pointer: coarse)":{[l]:{opacity:1}},[n]:{color:e.actionsColor,transition:`all ${a}`},[` + `]:{color:e.colorTextDisabled}}}}}},J$=e=>{let{componentCls:t,iconCls:n,fontSize:r,lineHeight:i,motionDurationSlow:a,calc:o}=e,s=`${t}-list-item`,c=`${s}-actions`,l=`${s}-action`;return{[`${t}-wrapper`]:{[`${t}-list`]:{...Xc(),lineHeight:e.lineHeight,[s]:{position:`relative`,height:o(e.lineHeight).mul(r).equal(),marginTop:e.marginXS,fontSize:r,display:`flex`,alignItems:`center`,transition:`background-color ${a}`,borderRadius:e.borderRadiusSM,"&:hover":{backgroundColor:e.controlItemBgHover},[`${s}-name`]:{...qc,padding:`0 ${Y(e.paddingXS)}`,lineHeight:i,flex:`auto`,transition:`all ${a}`},[c]:{whiteSpace:`nowrap`,[l]:{opacity:0},"@media (hover: none), (pointer: coarse)":{[l]:{opacity:1}},[n]:{color:e.actionsColor,transition:`all ${a}`},[` ${l}:focus-visible, &.picture ${l} - `]:{opacity:1}},[`${t}-icon ${n}`]:{color:e.colorIcon,fontSize:r},[`${s}-progress`]:{position:`absolute`,bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:`100%`,paddingInlineStart:o(r).add(e.paddingXS).equal(),fontSize:r,lineHeight:0,pointerEvents:`none`,"> div":{margin:0}}},[`${s}:hover ${l}`]:{opacity:1},[`${s}-error`]:{color:e.colorError,[`${s}-name, ${t}-icon ${n}`]:{color:e.colorError},[c]:{[`${n}, ${n}:hover`]:{color:e.colorError},[l]:{opacity:1}}},[`${t}-list-item-container`]:{transition:[`opacity`,`height`].map(e=>`${e} ${a}`).join(`, `),"&::before":{display:`table`,width:0,height:0,content:`""`}}}}}},Q$=e=>{let{componentCls:t}=e,n=new Lo(`uploadAnimateInlineIn`,{from:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),r=new Lo(`uploadAnimateInlineOut`,{to:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),i=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${i}-appear, ${i}-enter, ${i}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:`forwards`},[`${i}-appear, ${i}-enter`]:{animationName:n},[`${i}-leave`]:{animationName:r}}},{[`${t}-wrapper`]:wh(e)},n,r]},$$=e=>{let{componentCls:t,iconCls:n,uploadThumbnailSize:r,uploadProgressOffset:i,calc:a}=e,o=`${t}-list`,s=`${o}-item`;return{[`${t}-wrapper`]:{[` + `]:{opacity:1}},[`${t}-icon ${n}`]:{color:e.colorIcon,fontSize:r},[`${s}-progress`]:{position:`absolute`,bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:`100%`,paddingInlineStart:o(r).add(e.paddingXS).equal(),fontSize:r,lineHeight:0,pointerEvents:`none`,"> div":{margin:0}}},[`${s}:hover ${l}`]:{opacity:1},[`${s}-error`]:{color:e.colorError,[`${s}-name, ${t}-icon ${n}`]:{color:e.colorError},[c]:{[`${n}, ${n}:hover`]:{color:e.colorError},[l]:{opacity:1}}},[`${t}-list-item-container`]:{transition:[`opacity`,`height`].map(e=>`${e} ${a}`).join(`, `),"&::before":{display:`table`,width:0,height:0,content:`""`}}}}}},Y$=e=>{let{componentCls:t}=e,n=new Lo(`uploadAnimateInlineIn`,{from:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),r=new Lo(`uploadAnimateInlineOut`,{to:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),i=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${i}-appear, ${i}-enter, ${i}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:`forwards`},[`${i}-appear, ${i}-enter`]:{animationName:n},[`${i}-leave`]:{animationName:r}}},{[`${t}-wrapper`]:wh(e)},n,r]},X$=e=>{let{componentCls:t,iconCls:n,uploadThumbnailSize:r,uploadProgressOffset:i,calc:a}=e,o=`${t}-list`,s=`${o}-item`;return{[`${t}-wrapper`]:{[` ${o}${o}-picture, ${o}${o}-picture-card, ${o}${o}-picture-circle - `]:{[s]:{position:`relative`,height:a(r).add(a(e.lineWidth).mul(2)).add(a(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:`transparent`},[`${s}-thumbnail`]:{...qc,width:r,height:r,lineHeight:Y(a(r).add(e.paddingSM).equal()),textAlign:`center`,flex:`none`,[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:`block`,width:`100%`,height:`100%`,overflow:`hidden`}},[`${s}-progress`]:{bottom:a(e.fontSize).mul(e.lineHeight).div(2).add(i).equal(),width:`calc(100% - ${Y(a(e.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:a(r).add(e.paddingXS).equal()}},[`${s}-error`]:{borderColor:e.colorError,[`${s}-thumbnail ${n}`]:{[`svg path[fill='${oc[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${oc.primary}']`]:{fill:e.colorError}}},[`${s}-uploading`]:{borderStyle:`dashed`,[`${s}-name`]:{marginBottom:i}}},[`${o}${o}-picture-circle ${s}`]:{[`&, &::before, ${s}-thumbnail`]:{borderRadius:`50%`}}}}},e1=e=>{let{componentCls:t,iconCls:n,fontSizeLG:r,colorTextLightSolid:i,calc:a}=e,o=`${t}-list`,s=`${o}-item`,c=e.uploadPicCardSize;return{[` + `]:{[s]:{position:`relative`,height:a(r).add(a(e.lineWidth).mul(2)).add(a(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:`transparent`},[`${s}-thumbnail`]:{...qc,width:r,height:r,lineHeight:Y(a(r).add(e.paddingSM).equal()),textAlign:`center`,flex:`none`,[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:`block`,width:`100%`,height:`100%`,overflow:`hidden`}},[`${s}-progress`]:{bottom:a(e.fontSize).mul(e.lineHeight).div(2).add(i).equal(),width:`calc(100% - ${Y(a(e.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:a(r).add(e.paddingXS).equal()}},[`${s}-error`]:{borderColor:e.colorError,[`${s}-thumbnail ${n}`]:{[`svg path[fill='${oc[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${oc.primary}']`]:{fill:e.colorError}}},[`${s}-uploading`]:{borderStyle:`dashed`,[`${s}-name`]:{marginBottom:i}}},[`${o}${o}-picture-circle ${s}`]:{[`&, &::before, ${s}-thumbnail`]:{borderRadius:`50%`}}}}},Z$=e=>{let{componentCls:t,iconCls:n,fontSizeLG:r,colorTextLightSolid:i,calc:a}=e,o=`${t}-list`,s=`${o}-item`,c=e.uploadPicCardSize;return{[` ${t}-wrapper${t}-picture-card-wrapper, ${t}-wrapper${t}-picture-circle-wrapper `]:{...Xc(),display:`block`,[`${t}${t}-select`]:{width:c,height:c,textAlign:`center`,verticalAlign:`top`,backgroundColor:e.colorFillAlter,border:`${Y(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`,textAlign:`center`},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${o}${o}-picture-card, ${o}${o}-picture-circle`]:{display:`flex`,flexWrap:`wrap`,"&:not(:empty)":{minHeight:c},"@supports not (gap: 1px)":{"& > *":{marginBlockEnd:e.marginXS,marginInlineEnd:e.marginXS}},"@supports (gap: 1px)":{gap:e.marginXS},[`${o}-item-container`]:{display:`inline-block`,width:c,height:c,verticalAlign:`top`},"&::after":{display:`none`},"&::before":{display:`none`},[s]:{height:`100%`,margin:0,"&::before":{position:`absolute`,zIndex:1,width:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`,height:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:`" "`}},[`${s}:hover`]:{[`&::before, ${s}-actions`]:{opacity:1}},[`${s}-actions`]:{position:`absolute`,insetInlineStart:0,zIndex:10,width:`100%`,whiteSpace:`nowrap`,textAlign:`center`,opacity:0,transition:`all ${e.motionDurationSlow}`,[` ${n}-eye, ${n}-download, ${n}-delete - `]:{zIndex:10,width:r,margin:`0 ${Y(e.marginXXS)}`,fontSize:r,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,color:i,"&:hover":{color:i},svg:{verticalAlign:`baseline`}}},[`${s}-thumbnail, ${s}-thumbnail img`]:{position:`static`,display:`block`,width:`100%`,height:`100%`,objectFit:`contain`},[`${s}-name`]:{display:`none`,textAlign:`center`},[`${s}-file + ${s}-name`]:{position:`absolute`,bottom:e.margin,display:`block`,width:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`},[`${s}-uploading`]:{[`&${s}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:`none`}},[`${s}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}},[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:`50%`}}}},t1=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:`rtl`}}},n1=e=>{let{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:{...Jc(e),[t]:{outline:0,"input[type='file']":{cursor:`pointer`}},[`${t}-select`]:{display:`inline-block`},[`${t}-hidden`]:{display:`none`},[`${t}-disabled`]:{color:n,cursor:`not-allowed`}}}},r1=rl(`Upload`,e=>{let{fontSizeHeading3:t,marginXS:n,lineWidth:r,pictureCardSize:i,calc:a}=e,o=gs(e,{uploadThumbnailSize:a(t).mul(2).equal(),uploadProgressOffset:a(a(n).div(2)).add(r).equal(),uploadPicCardSize:i});return[n1(o),X$(o),$$(o),e1(o),Z$(o),Q$(o),t1(o),bh(o)]},e=>({actionsColor:e.colorIcon,pictureCardSize:e.controlHeightLG*2.55})),i1={icon:function(e,t){return{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M534 352V136H232v752h560V394H576a42 42 0 01-42-42z`,fill:t}},{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z`,fill:e}}]}},name:`file`,theme:`twotone`};function a1(){return a1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a1({},e,{ref:t,icon:i1}))),s1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z`}}]},name:`paper-clip`,theme:`outlined`};function c1(){return c1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c1({},e,{ref:t,icon:s1}))),u1={icon:function(e,t){return{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z`,fill:e}},{tag:`path`,attrs:{d:`M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z`,fill:t}},{tag:`path`,attrs:{d:`M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z`,fill:t}},{tag:`path`,attrs:{d:`M276 368a28 28 0 1056 0 28 28 0 10-56 0z`,fill:t}},{tag:`path`,attrs:{d:`M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`,fill:e}}]}},name:`picture`,theme:`twotone`};function d1(){return d1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d1({},e,{ref:t,icon:u1})));function p1(e){return{...e,lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e}}function m1(e,t){let n=Zr(t),r=n.findIndex(({uid:t})=>t===e.uid);return r===-1?n.push(e):n[r]=e,n}function h1(e,t){let n=e.uid===void 0?`name`:`uid`;return t.filter(t=>t[n]===e[n])[0]}function g1(e,t){let n=e.uid===void 0?`name`:`uid`,r=t.filter(t=>t[n]!==e[n]);return r.length===t.length?null:r}var _1=(e=``)=>{let t=e.split(`/`),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[``])[0]},v1=e=>e.indexOf(`image/`)===0,y1=e=>{if(e.type&&!e.thumbUrl)return v1(e.type);let t=e.thumbUrl||e.url||``,n=_1(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n)?!0:!(/^data:/.test(t)||n)},b1=200;function x1(e){return new Promise(t=>{if(!e.type||!v1(e.type)){t(``);return}let n=document.createElement(`canvas`);n.width=b1,n.height=b1,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${b1}px; height: ${b1}px; z-index: 9999; display: none;`,document.body.appendChild(n);let r=n.getContext(`2d`),i=new Image;if(i.onload=()=>{let{width:e,height:a}=i,o=b1,s=b1,c=0,l=0;e>a?(s=b1/e*a,l=-(s-o)/2):(o=b1/a*e,c=-(o-s)/2),r.drawImage(i,c,l,o,s);let u=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(i.src),t(u)},i.crossOrigin=`anonymous`,e.type.startsWith(`image/svg+xml`)){let t=new FileReader;t.onload=()=>{t.result&&typeof t.result==`string`&&(i.src=t.result)},t.readAsDataURL(e)}else if(e.type.startsWith(`image/gif`)){let n=new FileReader;n.onload=()=>{n.result&&t(n.result)},n.readAsDataURL(e)}else i.src=window.URL.createObjectURL(e)})}var S1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`download`,theme:`outlined`};function C1(){return C1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C1({},e,{ref:t,icon:S1}))),T1=S.forwardRef(({prefixCls:e,className:t,style:n,classNames:r,styles:i,locale:a,listType:o,file:s,items:c,progress:l,iconRender:u,actionIconRender:d,itemRender:f,isImgUrl:p,showPreviewIcon:m,showRemoveIcon:h,showDownloadIcon:g,previewIcon:_,removeIcon:v,downloadIcon:y,extra:b,onPreview:x,onDownload:C,onClose:w},T)=>{let{status:E}=s,[D,O]=S.useState(E);S.useEffect(()=>{E!==`removed`&&O(E)},[E]);let[k,A]=S.useState(!1);S.useEffect(()=>{let e=setTimeout(()=>{A(!0)},300);return()=>{clearTimeout(e)}},[]);let j=u(s),M=S.createElement(`div`,{className:`${e}-icon`},j);if(o===`picture`||o===`picture-card`||o===`picture-circle`)if(D===`uploading`||!s.thumbUrl&&!s.url){let t=J(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:D!==`uploading`});M=S.createElement(`div`,{className:t},j)}else{let t=p?.(s)?S.createElement(`img`,{src:s.thumbUrl||s.url,alt:s.name,className:`${e}-list-item-image`,crossOrigin:s.crossOrigin}):j,n=J(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:p&&!p(s)});M=S.createElement(`a`,{className:n,onClick:e=>x(s,e),href:s.url||s.thumbUrl,target:`_blank`,rel:`noopener noreferrer`},t)}let N=J(`${e}-list-item`,`${e}-list-item-${D}`,r?.item),P=typeof s.linkProps==`string`?JSON.parse(s.linkProps):s.linkProps,F=(typeof h==`function`?h(s):h)?d((typeof v==`function`?v(s):v)||S.createElement(zQ,null),()=>w(s),e,a.removeFile,!0):null,I=(typeof g==`function`?g(s):g)&&D===`done`?d((typeof y==`function`?y(s):y)||S.createElement(w1,null),()=>C(s),e,a.downloadFile):null,L=o!==`picture-card`&&o!==`picture-circle`&&S.createElement(`span`,{key:`download-delete`,className:J(`${e}-list-item-actions`,{picture:o===`picture`})},I,F),R=typeof b==`function`?b(s):b,z=R&&S.createElement(`span`,{className:`${e}-list-item-extra`},R),B=J(`${e}-list-item-name`),V=s.url?S.createElement(`a`,{key:`view`,target:`_blank`,rel:`noopener noreferrer`,className:B,title:s.name,...P,href:s.url,onClick:e=>x(s,e)},s.name,z):S.createElement(`span`,{key:`view`,className:B,onClick:e=>x(s,e),title:s.name},s.name,z),H=(typeof m==`function`?m(s):m)&&(s.url||s.thumbUrl)?S.createElement(`a`,{href:s.url||s.thumbUrl,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>x(s,e),title:a.previewFile},typeof _==`function`?_(s):_||S.createElement(XU,null)):null,U=(o===`picture-card`||o===`picture-circle`)&&D!==`uploading`&&S.createElement(`span`,{className:`${e}-list-item-actions`},H,D===`done`&&I,F),{getPrefixCls:W}=S.useContext(oi),ee=W(),te=S.createElement(`div`,{className:N,style:i?.item},M,V,L,U,k&&S.createElement(Iu,{motionName:`${ee}-fade`,visible:D===`uploading`,motionDeadline:2e3},({className:t})=>{let n=`percent`in s?S.createElement(EK,{type:`line`,percent:s.percent,"aria-label":s[`aria-label`],"aria-labelledby":s[`aria-labelledby`],...l}):null;return S.createElement(`div`,{className:J(`${e}-list-item-progress`,t)},n)})),ne=s.response&&typeof s.response==`string`?s.response:s.error?.statusText||s.error?.message||a.uploadError,re=D===`error`?S.createElement(Aw,{title:ne,getPopupContainer:e=>e.parentNode},te):te;return S.createElement(`div`,{className:J(`${e}-list-item-container`,t),style:n,ref:T},f?f(re,s,c,{download:C.bind(null,s),preview:x.bind(null,s),remove:w.bind(null,s)}):re)}),E1=S.forwardRef((e,t)=>{let{listType:n=`text`,previewFile:r=x1,onPreview:i,onDownload:a,onRemove:o,locale:s,iconRender:c,isImageUrl:l=y1,prefixCls:u,items:d=[],showPreviewIcon:f=!0,showRemoveIcon:p=!0,showDownloadIcon:m=!1,removeIcon:h,previewIcon:g,downloadIcon:_,extra:v,progress:y={size:[-1,2],showInfo:!1},appendAction:b,appendActionVisible:x=!0,itemRender:C,disabled:w,classNames:T,styles:E}=e,[,D]=Ed(),[O,k]=S.useState(!1),A=[`picture-card`,`picture-circle`].includes(n);S.useEffect(()=>{n.startsWith(`picture`)&&(d||[]).forEach(e=>{!(e.originFileObj instanceof File||e.originFileObj instanceof Blob)||e.thumbUrl!==void 0||(e.thumbUrl=``,r?.(e.originFileObj).then(t=>{e.thumbUrl=t||``,D()}))})},[n,d,r]),S.useEffect(()=>{k(!0)},[]);let j=(e,t)=>{if(i)return t?.preventDefault(),i(e)},M=e=>{typeof a==`function`?a(e):e.url&&window.open(e.url)},N=e=>{o?.(e)},P=e=>{if(c)return c(e,n);let t=e.status===`uploading`;if(n.startsWith(`picture`)){let r=n===`picture`?S.createElement(xm,null):s.uploading,i=l?.(e)?S.createElement(f1,null):S.createElement(o1,null);return t?r:i}return t?S.createElement(xm,null):S.createElement(l1,null)},F=(e,t,n,r,i)=>{let a={type:`text`,size:`small`,title:r,onClick:n=>{t(),S.isValidElement(e)&&e.props.onClick?.(n)},className:`${n}-list-item-action`,disabled:i?w:!1};return S.isValidElement(e)?S.createElement(Zg,{...a,icon:Pp(e,{...e.props,onClick:()=>{}})}):S.createElement(Zg,{...a},S.createElement(`span`,null,e))};S.useImperativeHandle(t,()=>({handlePreview:j,handleDownload:M}));let{getPrefixCls:I}=S.useContext(oi),L=I(`upload`,u),R=I(),z=J(`${L}-list`,`${L}-list-${n}`,T?.list),B=S.useMemo(()=>Sr(Wm(R),[`onAppearEnd`,`onEnterEnd`,`onLeaveEnd`]),[R]),V={...A?{}:B,motionDeadline:2e3,motionName:`${L}-${A?`animate-inline`:`animate`}`,keys:Zr(d.map(e=>({key:e.uid,file:e}))),motionAppear:O};return S.createElement(`div`,{className:z,style:E?.list},S.createElement(Fu,{...V,component:!1},({key:e,file:t,className:r,style:i})=>S.createElement(T1,{key:e,locale:s,prefixCls:L,className:r,style:i,classNames:T,styles:E,file:t,items:d,progress:y,listType:n,isImgUrl:l,showPreviewIcon:f,showRemoveIcon:p,showDownloadIcon:m,removeIcon:h,previewIcon:g,downloadIcon:_,extra:v,iconRender:P,actionIconRender:F,itemRender:C,onPreview:j,onDownload:M,onClose:N})),b&&S.createElement(Iu,{...V,visible:x,forceRender:!0},({className:e,style:t})=>Pp(b,n=>({className:J(n.className,e),style:{...t,pointerEvents:e?`none`:void 0,...n.style}}))))}),D1=`__LIST_IGNORE_${Date.now()}__`,O1=S.forwardRef((e,t)=>{let n=li(`upload`),{fileList:r,defaultFileList:i,onRemove:a,showUploadList:o=!0,listType:s=`text`,onPreview:c,onDownload:l,onChange:u,onDrop:d,previewFile:f,disabled:p,locale:m,iconRender:h,isImageUrl:g,progress:_,prefixCls:v,className:y,type:b=`select`,children:x,style:C,itemRender:w,maxCount:T,data:E={},multiple:D=!1,hasControlInside:O=!0,action:k=``,accept:A=``,supportServerRender:j=!0,rootClassName:M,styles:N,classNames:P}=e,F=S.useContext(zp),I=p??F,L=e.customRequest||n.customRequest,[R,z]=Hn(i,r),B=R||[],[V,H]=S.useState(`drop`),U=S.useRef(null),W=S.useRef(null);S.useMemo(()=>{let e=Date.now();(r||[]).forEach((t,n)=>{!t.uid&&!Object.isFrozen(t)&&(t.uid=`__AUTO__${e}_${n}__`)})},[r]);let ee=(e,t,n)=>{let r=Zr(t),i=!1;T===1?r=r.slice(-1):T&&(i=r.length>T,r=r.slice(0,T)),(0,Jf.flushSync)(()=>{z(r)});let a={file:e,fileList:r};n&&(a.event=n),(!i||e.status===`removed`||r.some(t=>t.uid===e.uid))&&(0,Jf.flushSync)(()=>{u?.(a)})},te=async(t,n)=>{let{beforeUpload:r}=e,i=t;if(r){let e=await r(t,n);if(e===!1)return!1;if(delete t[D1],e===D1)return Object.defineProperty(t,D1,{value:!0,configurable:!0}),!1;hd(e)&&(i=e)}return i},ne=e=>{let t=e.filter(e=>!e.file[D1]);if(!t.length)return;let n=t.map(e=>p1(e.file)),r=Zr(B);n.forEach(e=>{r=m1(e,r)}),n.forEach((e,n)=>{let i=e;if(t[n].parsedFile)e.status=`uploading`;else{let{originFileObj:t}=e,n;try{n=new File([t],t.name,{type:t.type})}catch{n=new Blob([t],{type:t.type}),n.name=t.name,n.lastModifiedDate=new Date,n.lastModified=new Date().getTime()}n.uid=e.uid,i=n}ee(i,r)})},re=(e,t,n)=>{try{typeof e==`string`&&(e=JSON.parse(e))}catch{}if(!h1(t,B))return;let r=p1(t);r.status=`done`,r.percent=100,r.response=e,r.xhr=n,ee(r,m1(r,B))},ie=(e,t)=>{if(!h1(t,B))return;let n=p1(t);n.status=`uploading`,n.percent=e.percent,ee(n,m1(n,B),e)},ae=(e,t,n)=>{if(!h1(n,B))return;let r=p1(n);r.error=e,r.response=t,r.status=`error`,ee(r,m1(r,B))},G=e=>{let t;Promise.resolve(typeof a==`function`?a(e):a).then(n=>{if(n===!1)return;let r=g1(e,B);r&&(t={...e,status:`removed`},B?.forEach(e=>{let n=t.uid===void 0?`name`:`uid`;e[n]===t[n]&&!Object.isFrozen(e)&&(e.status=`removed`)}),U.current?.abort(t),ee(t,r))})},oe=e=>{H(e.type),e.type===`drop`&&d?.(e)};S.useImperativeHandle(t,()=>({onBatchStart:ne,onSuccess:re,onProgress:ie,onError:ae,fileList:B,upload:U.current,nativeElement:W.current}));let{getPrefixCls:K,direction:se,className:ce,style:q,classNames:le,styles:ue}=li(`upload`),de=K(`upload`,v),fe={...e,listType:s,showUploadList:o,type:b,multiple:D,hasControlInside:O,supportServerRender:j,disabled:I},[pe,me]=Fd([le,P],[ue,N],{props:fe}),he={onBatchStart:ne,onError:ae,onProgress:ie,onSuccess:re,...e,customRequest:L,data:E,multiple:D,action:k,accept:A,supportServerRender:j,prefixCls:de,disabled:I,beforeUpload:te,onChange:void 0,hasControlInside:O};delete he.className,delete he.style,(!x||I)&&delete he.id;let ge=`${de}-wrapper`,[_e,ve]=r1(de,ge),[ye]=cd(`Upload`,td.Upload),{showRemoveIcon:be,showPreviewIcon:xe,showDownloadIcon:Se,removeIcon:Ce,previewIcon:we,downloadIcon:Te,extra:Ee}=typeof o==`boolean`?{}:o,De=be===void 0?!I:be,Oe=(e,t)=>o?S.createElement(E1,{classNames:pe,styles:me,prefixCls:de,listType:s,items:B,previewFile:f,onPreview:c,onDownload:l,onRemove:G,showRemoveIcon:De,showPreviewIcon:xe,showDownloadIcon:Se,removeIcon:Ce,previewIcon:we,downloadIcon:Te,iconRender:h,extra:Ee,locale:{...ye,...m},isImageUrl:g,progress:_,appendAction:e,appendActionVisible:t,itemRender:w,disabled:I}):e,ke=J(ge,y,M,_e,ve,ce,pe.root,{[`${de}-rtl`]:se===`rtl`,[`${de}-picture-card-wrapper`]:s===`picture-card`,[`${de}-picture-circle-wrapper`]:s===`picture-circle`}),Ae={...me.root},je={...q,...C};if(b===`drag`){let e=J(_e,de,`${de}-drag`,{[`${de}-drag-uploading`]:B.some(e=>e.status===`uploading`),[`${de}-drag-hover`]:V===`dragover`,[`${de}-disabled`]:I,[`${de}-rtl`]:se===`rtl`},pe.trigger);return S.createElement(`span`,{className:ke,ref:W,style:Ae},S.createElement(`div`,{className:e,style:{...je,...me.trigger},onDrop:oe,onDragOver:oe,onDragLeave:oe},S.createElement(Y$,{...he,ref:U,className:`${de}-btn`},S.createElement(`div`,{className:`${de}-drag-container`},x))),Oe())}let Me=J(de,`${de}-select`,{[`${de}-disabled`]:I,[`${de}-hidden`]:!x},pe.trigger),Ne=S.createElement(`div`,{className:Me,style:{...je,...me.trigger}},S.createElement(Y$,{...he,ref:U}));return s===`picture-card`||s===`picture-circle`?S.createElement(`span`,{className:ke,ref:W,style:Ae},Oe(Ne,!!x)):S.createElement(`span`,{className:ke,ref:W,style:Ae},Ne,Oe())}),k1=S.forwardRef((e,t)=>{let{style:n,height:r,hasControlInside:i=!1,children:a,...o}=e,s={...n,height:r};return S.createElement(O1,{ref:t,hasControlInside:i,...o,style:s,type:`drag`},a)}),A1=O1;A1.Dragger=k1,A1.LIST_IGNORE=D1;var j1=o(((e,t)=>{function n(e){return e&&e.__esModule?e:{default:e}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),M1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default={items_per_page:`条/页`,jump_to:`跳至`,jump_to_confirm:`确定`,page:`页`,prev_page:`上一页`,next_page:`下一页`,prev_5:`向前 5 页`,next_5:`向后 5 页`,prev_3:`向前 3 页`,next_3:`向后 3 页`,page_size:`页码`}})),N1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.commonLocale=void 0,e.commonLocale={yearFormat:`YYYY`,dayFormat:`D`,cellMeridiemFormat:`A`,monthBeforeYear:!0}})),P1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=N1();function n(e){"@babel/helpers - typeof";return n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n(e)}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default={placeholder:`请选择时间`,rangePlaceholder:[`开始时间`,`结束时间`]}})),I1=o((e=>{var t=j1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(P1()),r=t(F1()),i={lang:{placeholder:`请选择日期`,yearPlaceholder:`请选择年份`,quarterPlaceholder:`请选择季度`,monthPlaceholder:`请选择月份`,weekPlaceholder:`请选择周`,rangePlaceholder:[`开始日期`,`结束日期`],rangeYearPlaceholder:[`开始年份`,`结束年份`],rangeMonthPlaceholder:[`开始月份`,`结束月份`],rangeQuarterPlaceholder:[`开始季度`,`结束季度`],rangeWeekPlaceholder:[`开始周`,`结束周`],...n.default},timePickerLocale:{...r.default}};i.lang.ok=`确定`,e.default=i})),L1=o((e=>{var t=j1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=t(I1()).default})),R1=o((e=>{var t=j1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(M1()),r=t(L1()),i=t(I1()),a=t(F1()),o="${label}不是一个有效的${type}";e.default={locale:`zh-cn`,Pagination:n.default,DatePicker:i.default,TimePicker:a.default,Calendar:r.default,global:{placeholder:`请选择`,close:`关闭`,sortable:`可排序`},Table:{filterTitle:`筛选`,filterConfirm:`确定`,filterReset:`重置`,filterEmptyText:`无筛选项`,filterCheckAll:`全选`,filterSearchPlaceholder:`在筛选项中搜索`,emptyText:`暂无数据`,selectAll:`全选当页`,selectInvert:`反选当页`,selectNone:`清空所有`,selectionAll:`全选所有`,sortTitle:`排序`,expand:`展开行`,collapse:`关闭行`,triggerDesc:`点击降序`,triggerAsc:`点击升序`,cancelSort:`取消排序`},Modal:{okText:`确定`,cancelText:`取消`,justOkText:`知道了`},Tour:{Next:`下一步`,Previous:`上一步`,Finish:`结束导览`},Popconfirm:{cancelText:`取消`,okText:`确定`},Transfer:{titles:[``,``],searchPlaceholder:`请输入搜索内容`,itemUnit:`项`,itemsUnit:`项`,remove:`删除`,selectCurrent:`全选当页`,removeCurrent:`删除当页`,selectAll:`全选所有`,deselectAll:`取消全选`,removeAll:`删除全部`,selectInvert:`反选当页`},Upload:{uploading:`文件上传中`,removeFile:`删除文件`,uploadError:`上传错误`,previewFile:`预览文件`,downloadFile:`下载文件`},Empty:{description:`暂无数据`},Icon:{icon:`图标`},Text:{edit:`编辑`,copy:`复制`,copied:`复制成功`,expand:`展开`,collapse:`收起`},Form:{optional:`(可选)`,defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:o,method:o,array:o,object:o,number:o,date:o,boolean:o,integer:o,float:o,regexp:o,email:o,url:o,hex:o},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},QRCode:{expired:`二维码过期`,refresh:`点击刷新`,scanned:`已扫描`},ColorPicker:{presetEmpty:`暂无`,transparent:`无色`,singleColor:`单色`,gradientColor:`渐变色`}}})),z1=o(((e,t)=>{t.exports=R1()})),B1={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.42 0 448 200.58 448 448S759.42 960 512 960 64 759.42 64 512 264.58 64 512 64m32.5 168c-69.67 0-86.06 16.84-86.72 39.08l-.02 1.43v46.62H291.45c-9.92 0-14.28 23.05-14.27 39.3 0 2.7 2.08 4.93 4.77 4.93h175.81v58.3h-116.5c-9.96 0-14.3 23.76-14.27 39.47a4.77 4.77 0 004.77 4.76h233.45c-4.53 41.06-15.43 77.59-30.72 109.32l-1.22 2.5-.32-.28c-60.24-28.47-120.43-52.57-194.4-52.57l-2.62.01c-84.98 1.11-144.71 56.5-145.91 127.04l-.02 1.22.02 2.13c1.24 70.4 63.56 126.45 148.52 126.45 61.25 0 116.38-16.85 163.46-45.02a138.58 138.58 0 0014.07-7.96 345.6 345.6 0 0050.3-41.16l9.45 6.35 12.46 8.32c57.53 38.26 113.76 72.62 169.86 79.27a142.62 142.62 0 0018.31 1.16c43.02 0 55-52.68 57.39-95.51l.14-2.84c.4-8.46-6.2-15.6-14.65-15.86-75.46-2.37-136.45-22.05-192-46.11l-6.27-2.75c35.15-56.8 56.66-121.81 57.15-186.66l.09-1.08c.4-5.51-4-10.2-9.52-10.2H549.33v-58.3h165.73c9.92 0 14.28-22.12 14.27-39.31a4.85 4.85 0 00-4.78-4.92H549.32v-82.35a4.8 4.8 0 00-4.83-4.78M328 583.85c54.63 0 107.08 22.41 158.1 52.19l5.76 3.4c-103.57 119.84-247.17 95.9-261.72 26.37a66.89 66.89 0 01-1.14-9.83l-.06-2.34.02-.9c.97-40.12 45.33-68.9 99.04-68.9`}}]},name:`alipay-circle`,theme:`outlined`};function V1(){return V1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,V1({},e,{ref:t,icon:B1}))),U1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z`}}]},name:`api`,theme:`outlined`};function W1(){return W1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,W1({},e,{ref:t,icon:U1}))),K1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z`}}]},name:`appstore`,theme:`outlined`};function q1(){return q1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,q1({},e,{ref:t,icon:K1}))),Y1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z`}}]},name:`arrow-down`,theme:`outlined`};function X1(){return X1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,X1({},e,{ref:t,icon:Y1}))),Q1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`arrow-left`,theme:`outlined`};function $1(){return $1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,$1({},e,{ref:t,icon:Q1}))),t0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z`}}]},name:`arrow-up`,theme:`outlined`};function n0(){return n0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n0({},e,{ref:t,icon:t0}))),i0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z`}}]},name:`audio`,theme:`outlined`};function a0(){return a0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a0({},e,{ref:t,icon:i0}))),s0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z`}}]},name:`bank`,theme:`outlined`};function c0(){return c0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c0({},e,{ref:t,icon:s0}))),u0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z`}}]},name:`bar-chart`,theme:`outlined`};function d0(){return d0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d0({},e,{ref:t,icon:u0}))),p0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M816 768h-24V428c0-141.1-104.3-257.7-240-277.1V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.9c-135.7 19.4-240 136-240 277.1v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48zM304 768V428c0-55.6 21.6-107.8 60.9-147.1S456.4 220 512 220c55.6 0 107.8 21.6 147.1 60.9S720 372.4 720 428v340H304z`}}]},name:`bell`,theme:`outlined`};function m0(){return m0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,m0({},e,{ref:t,icon:p0}))),g0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z`}}]},name:`book`,theme:`outlined`};function _0(){return _0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,_0({},e,{ref:t,icon:g0}))),y0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M916 210H376c-17.7 0-32 14.3-32 32v236H108c-17.7 0-32 14.3-32 32v272c0 17.7 14.3 32 32 32h540c17.7 0 32-14.3 32-32V546h236c17.7 0 32-14.3 32-32V242c0-17.7-14.3-32-32-32zm-504 68h200v200H412V278zm-68 468H144V546h200v200zm268 0H412V546h200v200zm268-268H680V278h200v200z`}}]},name:`build`,theme:`outlined`};function b0(){return b0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b0({},e,{ref:t,icon:y0}))),S0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z`}}]},name:`bulb`,theme:`outlined`};function C0(){return C0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C0({},e,{ref:t,icon:S0}))),T0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M251.2 387H320v68.8c0 1.8 1.8 3.2 4 3.2h48c2.2 0 4-1.4 4-3.3V387h68.8c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H376v-68.8c0-1.8-1.8-3.2-4-3.2h-48c-2.2 0-4 1.4-4 3.2V331h-68.8c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm328 0h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm0 265h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm0 104h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm-195.7-81l61.2-74.9c4.3-5.2.7-13.1-5.9-13.1H388c-2.3 0-4.5 1-5.9 2.9l-34 41.6-34-41.6a7.85 7.85 0 00-5.9-2.9h-50.9c-6.6 0-10.2 7.9-5.9 13.1l61.2 74.9-62.7 76.8c-4.4 5.2-.8 13.1 5.8 13.1h50.8c2.3 0 4.5-1 5.9-2.9l35.5-43.5 35.5 43.5c1.5 1.8 3.7 2.9 5.9 2.9h50.8c6.6 0 10.2-7.9 5.9-13.1L383.5 675zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-36 732H180V180h664v664z`}}]},name:`calculator`,theme:`outlined`};function E0(){return E0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,E0({},e,{ref:t,icon:T0}))),O0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 248H728l-32.4-90.8a32.07 32.07 0 00-30.2-21.2H358.6c-13.5 0-25.6 8.5-30.1 21.2L296 248H160c-44.2 0-80 35.8-80 80v456c0 44.2 35.8 80 80 80h704c44.2 0 80-35.8 80-80V328c0-44.2-35.8-80-80-80zm8 536c0 4.4-3.6 8-8 8H160c-4.4 0-8-3.6-8-8V328c0-4.4 3.6-8 8-8h186.7l17.1-47.8 22.9-64.2h250.5l22.9 64.2 17.1 47.8H864c4.4 0 8 3.6 8 8v456zM512 384c-88.4 0-160 71.6-160 160s71.6 160 160 160 160-71.6 160-160-71.6-160-160-160zm0 256c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z`}}]},name:`camera`,theme:`outlined`};function k0(){return k0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,k0({},e,{ref:t,icon:O0}))),j0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M380 704h264c4.4 0 8-3.6 8-8v-84c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v36H428v-36c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v84c0 4.4 3.6 8 8 8zm340-123a40 40 0 1080 0 40 40 0 10-80 0zm239-167.6L935.3 372a8 8 0 00-10.9-2.9l-50.7 29.6-78.3-216.2a63.9 63.9 0 00-60.9-44.4H301.2c-34.7 0-65.5 22.4-76.2 55.5l-74.6 205.2-50.8-29.6a8 8 0 00-10.9 2.9L65 413.4c-2.2 3.8-.9 8.6 2.9 10.8l60.4 35.2-14.5 40c-1.2 3.2-1.8 6.6-1.8 10v348.2c0 15.7 11.8 28.4 26.3 28.4h67.6c12.3 0 23-9.3 25.6-22.3l7.7-37.7h545.6l7.7 37.7c2.7 13 13.3 22.3 25.6 22.3h67.6c14.5 0 26.3-12.7 26.3-28.4V509.4c0-3.4-.6-6.8-1.8-10l-14.5-40 60.3-35.2a8 8 0 003-10.8zM840 517v237H184V517l15.6-43h624.8l15.6 43zM292.7 218.1l.5-1.3.4-1.3c1.1-3.3 4.1-5.5 7.6-5.5h427.6l75.4 208H220l72.7-199.9zM224 581a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`car`,theme:`outlined`};function M0(){return M0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,M0({},e,{ref:t,icon:j0}))),P0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z`}},{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}}]},name:`check-circle`,theme:`outlined`};function F0(){return F0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,F0({},e,{ref:t,icon:P0}))),L0={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z`}}]},name:`close-circle`,theme:`outlined`};function R0(){return R0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,R0({},e,{ref:t,icon:L0}))),B0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M811.4 418.7C765.6 297.9 648.9 212 512.2 212S258.8 297.8 213 418.6C127.3 441.1 64 519.1 64 612c0 110.5 89.5 200 199.9 200h496.2C870.5 812 960 722.5 960 612c0-92.7-63.1-170.7-148.6-193.3zm36.3 281a123.07 123.07 0 01-87.6 36.3H263.9c-33.1 0-64.2-12.9-87.6-36.3A123.3 123.3 0 01140 612c0-28 9.1-54.3 26.2-76.3a125.7 125.7 0 0166.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10c54.3 14.5 92.1 63.8 92.1 120 0 33.1-12.9 64.3-36.3 87.7z`}}]},name:`cloud`,theme:`outlined`};function V0(){return V0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,V0({},e,{ref:t,icon:B0}))),U0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z`}},{tag:`path`,attrs:{d:`M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z`}},{tag:`path`,attrs:{d:`M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z`}}]},name:`cloud-server`,theme:`outlined`};function W0(){return W0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,W0({},e,{ref:t,icon:U0}))),K0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`code`,theme:`outlined`};function q0(){return q0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,q0({},e,{ref:t,icon:K0}))),Y0={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M275 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm613 144H768c0-39.8-32.2-72-72-72H200c-39.8 0-72 32.2-72 72v248c0 3.4.2 6.7.7 9.9-.5 7-.7 14-.7 21.1 0 176.7 143.3 320 320 320 160.1 0 292.7-117.5 316.3-271H888c39.8 0 72-32.2 72-72V497c0-39.8-32.2-72-72-72zM696 681h-1.1c.7 7.6 1.1 15.2 1.1 23 0 137-111 248-248 248S200 841 200 704c0-7.8.4-15.4 1.1-23H200V425h496v256zm192-8H776V497h112v176zM613 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm-170 0c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36z`}}]},name:`coffee`,theme:`outlined`};function X0(){return X0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,X0({},e,{ref:t,icon:Y0}))),Q0={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 372zm198.4-588.1a32 32 0 00-24.5.5L414.9 415 296.4 686c-3.6 8.2-3.6 17.5 0 25.7 3.4 7.8 9.7 13.9 17.7 17 3.8 1.5 7.7 2.2 11.7 2.2 4.4 0 8.7-.9 12.8-2.7l271-118.6 118.5-271a32.06 32.06 0 00-17.7-42.7zM576.8 534.4l26.2 26.2-42.4 42.4-26.2-26.2L380 644.4 447.5 490 422 464.4l42.4-42.4 25.5 25.5L644.4 380l-67.6 154.4zM464.4 422L422 464.4l25.5 25.6 86.9 86.8 26.2 26.2 42.4-42.4-26.2-26.2-86.8-86.9z`}}]},name:`compass`,theme:`outlined`};function $0(){return $0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,$0({},e,{ref:t,icon:Q0}))),t2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z`}}]},name:`crown`,theme:`outlined`};function n2(){return n2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n2({},e,{ref:t,icon:t2}))),i2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z`}}]},name:`dashboard`,theme:`outlined`};function a2(){return a2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a2({},e,{ref:t,icon:i2}))),s2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`database`,theme:`outlined`};function c2(){return c2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c2({},e,{ref:t,icon:s2}))),u2={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 372zm47.7-395.2l-25.4-5.9V348.6c38 5.2 61.5 29 65.5 58.2.5 4 3.9 6.9 7.9 6.9h44.9c4.7 0 8.4-4.1 8-8.8-6.1-62.3-57.4-102.3-125.9-109.2V263c0-4.4-3.6-8-8-8h-28.1c-4.4 0-8 3.6-8 8v33c-70.8 6.9-126.2 46-126.2 119 0 67.6 49.8 100.2 102.1 112.7l24.7 6.3v142.7c-44.2-5.9-69-29.5-74.1-61.3-.6-3.8-4-6.6-7.9-6.6H363c-4.7 0-8.4 4-8 8.7 4.5 55 46.2 105.6 135.2 112.1V761c0 4.4 3.6 8 8 8h28.4c4.4 0 8-3.6 8-8.1l-.2-31.7c78.3-6.9 134.3-48.8 134.3-124-.1-69.4-44.2-100.4-109-116.4zm-68.6-16.2c-5.6-1.6-10.3-3.1-15-5-33.8-12.2-49.5-31.9-49.5-57.3 0-36.3 27.5-57 64.5-61.7v124zM534.3 677V543.3c3.1.9 5.9 1.6 8.8 2.2 47.3 14.4 63.2 34.4 63.2 65.1 0 39.1-29.4 62.6-72 66.4z`}}]},name:`dollar`,theme:`outlined`};function d2(){return d2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d2({},e,{ref:t,icon:u2}))),p2={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 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z`}}]},name:`exclamation-circle`,theme:`outlined`};function m2(){return m2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,m2({},e,{ref:t,icon:p2}))),g2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 472a40 40 0 1080 0 40 40 0 10-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 01-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z`}}]},name:`experiment`,theme:`outlined`};function _2(){return _2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,_2({},e,{ref:t,icon:g2}))),y2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z`}}]},name:`file-image`,theme:`outlined`};function b2(){return b2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b2({},e,{ref:t,icon:y2}))),S2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z`}}]},name:`file-pdf`,theme:`outlined`};function C2(){return C2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C2({},e,{ref:t,icon:S2}))),T2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9zM713 808.5c-53.7 53.2-125 82.4-201 82.4s-147.3-29.2-201-82.4c-53.5-53.1-83-123.5-83-198.4 0-43.5 9.8-85.2 29.1-124 18.8-37.9 46.8-71.8 80.8-97.9a349.6 349.6 0 0058.6-56.8c25-30.5 44.6-64.5 58.2-101a240 240 0 0012.1-46.5c24.1 22.2 44.3 49 61.2 80.4 33.4 62.6 48.8 118.3 45.8 165.7a74.01 74.01 0 0024.4 59.8 73.36 73.36 0 0053.4 18.8c19.7-1 37.8-9.7 51-24.4 13.3-14.9 24.8-30.1 34.4-45.6 14 17.9 25.7 37.4 35 58.4 15.9 35.8 24 73.9 24 113.1 0 74.9-29.5 145.4-83 198.4z`}}]},name:`fire`,theme:`outlined`};function E2(){return E2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,E2({},e,{ref:t,icon:T2}))),O2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 305H624V192c0-17.7-14.3-32-32-32H184v-40c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v784c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V640h248v113c0 17.7 14.3 32 32 32h416c17.7 0 32-14.3 32-32V337c0-17.7-14.3-32-32-32zM184 568V232h368v336H184zm656 145H504v-73h112c4.4 0 8-3.6 8-8V377h216v336z`}}]},name:`flag`,theme:`outlined`};function k2(){return k2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,k2({},e,{ref:t,icon:O2}))),j2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M920 416H616c-4.4 0-8 3.6-8 8v112c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-56h60v320h-46c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h164c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8h-46V480h60v56c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V424c0-4.4-3.6-8-8-8zM656 296V168c0-4.4-3.6-8-8-8H104c-4.4 0-8 3.6-8 8v128c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-64h168v560h-92c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-92V232h168v64c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8z`}}]},name:`font-size`,theme:`outlined`};function M2(){return M2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,M2({},e,{ref:t,icon:j2}))),P2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 310H732.4c13.6-21.4 21.6-46.8 21.6-74 0-76.1-61.9-138-138-138-41.4 0-78.7 18.4-104 47.4-25.3-29-62.6-47.4-104-47.4-76.1 0-138 61.9-138 138 0 27.2 7.9 52.6 21.6 74H144c-17.7 0-32 14.3-32 32v200c0 4.4 3.6 8 8 8h40v344c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V550h40c4.4 0 8-3.6 8-8V342c0-17.7-14.3-32-32-32zm-334-74c0-38.6 31.4-70 70-70s70 31.4 70 70-31.4 70-70 70h-70v-70zm-138-70c38.6 0 70 31.4 70 70v70h-70c-38.6 0-70-31.4-70-70s31.4-70 70-70zM180 482V378h298v104H180zm48 68h250v308H228V550zm568 308H546V550h250v308zm48-376H546V378h298v104z`}}]},name:`gift`,theme:`outlined`};function F2(){return F2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,F2({},e,{ref:t,icon:P2}))),L2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z`}}]},name:`global`,theme:`outlined`};function R2(){return R2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,R2({},e,{ref:t,icon:L2}))),B2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z`}}]},name:`heart`,theme:`outlined`};function V2(){return V2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,V2({},e,{ref:t,icon:B2}))),U2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M957.6 507.4L603.2 158.2a7.9 7.9 0 00-11.2 0L353.3 393.4a8.03 8.03 0 00-.1 11.3l.1.1 40 39.4-117.2 115.3a8.03 8.03 0 00-.1 11.3l.1.1 39.5 38.9-189.1 187H72.1c-4.4 0-8.1 3.6-8.1 8V860c0 4.4 3.6 8 8 8h344.9c2.1 0 4.1-.8 5.6-2.3l76.1-75.6 40.4 39.8a7.9 7.9 0 0011.2 0l117.1-115.6 40.1 39.5a7.9 7.9 0 0011.2 0l238.7-235.2c3.4-3 3.4-8 .3-11.2zM389.8 796.2H229.6l134.4-133 80.1 78.9-54.3 54.1zm154.8-62.1L373.2 565.2l68.6-67.6 171.4 168.9-68.6 67.6zM713.1 658L450.3 399.1 597.6 254l262.8 259-147.3 145z`}}]},name:`highlight`,theme:`outlined`};function W2(){return W2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,W2({},e,{ref:t,icon:U2}))),K2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z`}}]},name:`history`,theme:`outlined`};function q2(){return q2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,q2({},e,{ref:t,icon:K2}))),Y2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z`}}]},name:`home`,theme:`outlined`};function X2(){return X2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,X2({},e,{ref:t,icon:Y2}))),Q2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136V232h752v560zM610.3 476h123.4c1.3 0 2.3-3.6 2.3-8v-48c0-4.4-1-8-2.3-8H610.3c-1.3 0-2.3 3.6-2.3 8v48c0 4.4 1 8 2.3 8zm4.8 144h185.7c3.9 0 7.1-3.6 7.1-8v-48c0-4.4-3.2-8-7.1-8H615.1c-3.9 0-7.1 3.6-7.1 8v48c0 4.4 3.2 8 7.1 8zM224 673h43.9c4.2 0 7.6-3.3 7.9-7.5 3.8-50.5 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H522a8 8 0 008-8.4c-2.8-53.3-32-99.7-74.6-126.1a111.8 111.8 0 0029.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 00-74.6 126.1c-.4 4.6 3.2 8.4 7.8 8.4zm149-262c28.5 0 51.7 23.3 51.7 52s-23.2 52-51.7 52-51.7-23.3-51.7-52 23.2-52 51.7-52z`}}]},name:`idcard`,theme:`outlined`};function $2(){return $2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,$2({},e,{ref:t,icon:Q2}))),t4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M956.9 845.1L896.4 632V168c0-17.7-14.3-32-32-32h-704c-17.7 0-32 14.3-32 32v464L67.9 845.1C60.4 866 75.8 888 98 888h828.8c22.2 0 37.6-22 30.1-42.9zM200.4 208h624v395h-624V208zm228.3 608l8.1-37h150.3l8.1 37H428.7zm224 0l-19.1-86.7c-.8-3.7-4.1-6.3-7.8-6.3H398.2c-3.8 0-7 2.6-7.8 6.3L371.3 816H151l42.3-149h638.2l42.3 149H652.7z`}}]},name:`laptop`,theme:`outlined`};function n4(){return n4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n4({},e,{ref:t,icon:t4}))),i4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z`}}]},name:`line-chart`,theme:`outlined`};function a4(){return a4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a4({},e,{ref:t,icon:i4}))),s4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z`}}]},name:`link`,theme:`outlined`};function c4(){return c4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c4({},e,{ref:t,icon:s4}))),u4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z`}}]},name:`lock`,theme:`outlined`};function d4(){return d4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d4({},e,{ref:t,icon:u4}))),p4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z`}}]},name:`logout`,theme:`outlined`};function m4(){return m4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,m4({},e,{ref:t,icon:p4}))),g4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z`}}]},name:`mail`,theme:`outlined`};function _4(){return _4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,_4({},e,{ref:t,icon:g4}))),y4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M839.2 278.1a32 32 0 00-30.4-22.1H736V144c0-17.7-14.3-32-32-32H320c-17.7 0-32 14.3-32 32v112h-72.8a31.9 31.9 0 00-30.4 22.1L112 502v378c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V502l-72.8-223.9zM360 184h304v72H360v-72zm480 656H184V513.4L244.3 328h535.4L840 513.4V840zM652 572H544V464c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v108H372c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h108v108c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V636h108c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z`}}]},name:`medicine-box`,theme:`outlined`};function b4(){return b4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b4({},e,{ref:t,icon:y4}))),S4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z`}}]},name:`menu`,theme:`outlined`};function C4(){return C4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C4({},e,{ref:t,icon:S4}))),T4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z`}},{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}}]},name:`minus-circle`,theme:`outlined`};function E4(){return E4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,E4({},e,{ref:t,icon:T4}))),O4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`mobile`,theme:`outlined`};function k4(){return k4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,k4({},e,{ref:t,icon:O4}))),j4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M692.8 412.7l.2-.2-34.6-44.3a7.97 7.97 0 00-11.2-1.4l-50.4 39.3-70.5-90.1a7.97 7.97 0 00-11.2-1.4l-37.9 29.7a7.97 7.97 0 00-1.4 11.2l70.5 90.2-.2.1 34.6 44.3c2.7 3.5 7.7 4.1 11.2 1.4l50.4-39.3 64.1 82c2.7 3.5 7.7 4.1 11.2 1.4l37.9-29.6c3.5-2.7 4.1-7.7 1.4-11.2l-64.1-82.1zM608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5L114.3 856.1a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6C473 696.1 537.7 720 608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644s-118.2-23.7-161.2-66.8C403.7 534.2 380 476.9 380 416s23.7-118.2 66.8-161.2c43-43.1 100.3-66.8 161.2-66.8s118.2 23.7 161.2 66.8c43.1 43 66.8 100.3 66.8 161.2s-23.7 118.2-66.8 161.2z`}}]},name:`monitor`,theme:`outlined`};function M4(){return M4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,M4({},e,{ref:t,icon:j4}))),P4={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 372zm159.6-585h-59.5c-3 0-5.8 1.7-7.1 4.4l-90.6 180H511l-90.6-180a8 8 0 00-7.1-4.4h-60.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.9L457 515.7h-61.4c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V603h-81.7c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V717c0 4.4 3.6 8 8 8h54.3c4.4 0 8-3.6 8-8v-68.1h82c4.4 0 8-3.6 8-8V611c0-4.4-3.6-8-8-8h-82v-41.5h82c4.4 0 8-3.6 8-8v-29.9c0-4.4-3.6-8-8-8h-62l111.1-204.8c.6-1.2 1-2.5 1-3.8-.1-4.4-3.7-8-8.1-8z`}}]},name:`pay-circle`,theme:`outlined`};function F4(){return F4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,F4({},e,{ref:t,icon:P4}))),L4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M877.1 238.7L770.6 132.3c-13-13-30.4-20.3-48.8-20.3s-35.8 7.2-48.8 20.3L558.3 246.8c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l89.6 89.7a405.46 405.46 0 01-86.4 127.3c-36.7 36.9-79.6 66-127.2 86.6l-89.6-89.7c-13-13-30.4-20.3-48.8-20.3a68.2 68.2 0 00-48.8 20.3L132.3 673c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l106.4 106.4c22.2 22.2 52.8 34.9 84.2 34.9 6.5 0 12.8-.5 19.2-1.6 132.4-21.8 263.8-92.3 369.9-198.3C818 606 888.4 474.6 910.4 342.1c6.3-37.6-6.3-76.3-33.3-103.4zm-37.6 91.5c-19.5 117.9-82.9 235.5-178.4 331s-213 158.9-330.9 178.4c-14.8 2.5-30-2.5-40.8-13.2L184.9 721.9 295.7 611l119.8 120 .9.9 21.6-8a481.29 481.29 0 00285.7-285.8l8-21.6-120.8-120.7 110.8-110.9 104.5 104.5c10.8 10.8 15.8 26 13.3 40.8z`}}]},name:`phone`,theme:`outlined`};function R4(){return R4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,R4({},e,{ref:t,icon:L4}))),B4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`}}]},name:`picture`,theme:`outlined`};function V4(){return V4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,V4({},e,{ref:t,icon:B4}))),U4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 518H506V160c0-4.4-3.6-8-8-8h-26a398.46 398.46 0 00-282.8 117.1 398.19 398.19 0 00-85.7 127.1A397.61 397.61 0 0072 552a398.46 398.46 0 00117.1 282.8c36.7 36.7 79.5 65.6 127.1 85.7A397.61 397.61 0 00472 952a398.46 398.46 0 00282.8-117.1c36.7-36.7 65.6-79.5 85.7-127.1A397.61 397.61 0 00872 552v-26c0-4.4-3.6-8-8-8zM705.7 787.8A331.59 331.59 0 01470.4 884c-88.1-.4-170.9-34.9-233.2-97.2C174.5 724.1 140 640.7 140 552c0-88.7 34.5-172.1 97.2-234.8 54.6-54.6 124.9-87.9 200.8-95.5V586h364.3c-7.7 76.3-41.3 147-96.6 201.8zM952 462.4l-2.6-28.2c-8.5-92.1-49.4-179-115.2-244.6A399.4 399.4 0 00589 74.6L560.7 72c-4.7-.4-8.7 3.2-8.7 7.9V464c0 4.4 3.6 8 8 8l384-1c4.7 0 8.4-4 8-8.6zm-332.2-58.2V147.6a332.24 332.24 0 01166.4 89.8c45.7 45.6 77 103.6 90 166.1l-256.4.7z`}}]},name:`pie-chart`,theme:`outlined`};function W4(){return W4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,W4({},e,{ref:t,icon:U4}))),K4={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`};function q4(){return q4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,q4({},e,{ref:t,icon:K4}))),Y4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M280 752h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8zm192-280h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v184c0 4.4 3.6 8 8 8zm192 72h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v256c0 4.4 3.6 8 8 8zm216-432H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`project`,theme:`outlined`};function X4(){return X4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,X4({},e,{ref:t,icon:Y4}))),Q4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 161H699.2c-49.1 0-97.1 14.1-138.4 40.7L512 233l-48.8-31.3A255.2 255.2 0 00324.8 161H96c-17.7 0-32 14.3-32 32v568c0 17.7 14.3 32 32 32h228.8c49.1 0 97.1 14.1 138.4 40.7l44.4 28.6c1.3.8 2.8 1.3 4.3 1.3s3-.4 4.3-1.3l44.4-28.6C602 807.1 650.1 793 699.2 793H928c17.7 0 32-14.3 32-32V193c0-17.7-14.3-32-32-32zM324.8 721H136V233h188.8c35.4 0 69.8 10.1 99.5 29.2l48.8 31.3 6.9 4.5v462c-47.6-25.6-100.8-39-155.2-39zm563.2 0H699.2c-54.4 0-107.6 13.4-155.2 39V298l6.9-4.5 48.8-31.3c29.7-19.1 64.1-29.2 99.5-29.2H888v488zM396.9 361H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm223.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c0-4.1-3.2-7.5-7.1-7.5H627.1c-3.9 0-7.1 3.4-7.1 7.5zM396.9 501H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm416 0H627.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5z`}}]},name:`read`,theme:`outlined`};function $4(){return $4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,$4({},e,{ref:t,icon:Q4}))),t3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M508 704c79.5 0 144-64.5 144-144s-64.5-144-144-144-144 64.5-144 144 64.5 144 144 144zm0-224c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z`}},{tag:`path`,attrs:{d:`M832 256h-28.1l-35.7-120.9c-4-13.7-16.5-23.1-30.7-23.1h-451c-14.3 0-26.8 9.4-30.7 23.1L220.1 256H192c-17.7 0-32 14.3-32 32v28c0 4.4 3.6 8 8 8h45.8l47.7 558.7a32 32 0 0031.9 29.3h429.2a32 32 0 0031.9-29.3L802.2 324H856c4.4 0 8-3.6 8-8v-28c0-17.7-14.3-32-32-32zm-518.6-76h397.2l22.4 76H291l22.4-76zm376.2 664H326.4L282 324h451.9l-44.3 520z`}}]},name:`rest`,theme:`outlined`};function n3(){return n3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n3({},e,{ref:t,icon:t3}))),i3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`robot`,theme:`outlined`};function a3(){return a3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a3({},e,{ref:t,icon:i3}))),s3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 00-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0043.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0043.1-30.5 97.52 97.52 0 0021.4-60.8c0-8.4-1.1-16.4-3.1-23.8H864zM762.3 621.4c9.4 14.6 17 30.3 22.5 46.6H700V558.7a211.6 211.6 0 0162.3 62.7zM388 483.1V318.8l124-147 124 147V668H388V483.1zM239.2 668c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668h-84.8zm388.9 116.2c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5-38.3 0-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 01-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM464 400a48 48 0 1096 0 48 48 0 10-96 0z`}}]},name:`rocket`,theme:`outlined`};function c3(){return c3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c3({},e,{ref:t,icon:s3}))),u3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M793 242H366v-74c0-6.7-7.7-10.4-12.9-6.3l-142 112a8 8 0 000 12.6l142 112c5.2 4.1 12.9.4 12.9-6.3v-74h415v470H175c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h618c35.3 0 64-28.7 64-64V306c0-35.3-28.7-64-64-64z`}}]},name:`rollback`,theme:`outlined`};function d3(){return d3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d3({},e,{ref:t,icon:u3}))),p3={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z`}},{tag:`path`,attrs:{d:`M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z`}}]},name:`safety`,theme:`outlined`};function m3(){return m3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,m3({},e,{ref:t,icon:p3}))),g3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z`}}]},name:`save`,theme:`outlined`};function _3(){return _3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,_3({},e,{ref:t,icon:g3}))),y3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zM402.9 528.8l-77.5 77.5a8.03 8.03 0 000 11.3l34 34c3.1 3.1 8.2 3.1 11.3 0l77.5-77.5c55.7 35.1 130.1 28.4 178.6-20.1 56.3-56.3 56.3-147.5 0-203.8-56.3-56.3-147.5-56.3-203.8 0-48.5 48.5-55.2 123-20.1 178.6zm65.4-133.3c31.3-31.3 82-31.3 113.2 0 31.3 31.3 31.3 82 0 113.2-31.3 31.3-82 31.3-113.2 0s-31.3-81.9 0-113.2z`}}]},name:`security-scan`,theme:`outlined`};function b3(){return b3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b3({},e,{ref:t,icon:y3}))),S3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z`}}]},name:`send`,theme:`outlined`};function C3(){return C3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C3({},e,{ref:t,icon:S3}))),T3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z`}}]},name:`setting`,theme:`outlined`};function E3(){return E3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,E3({},e,{ref:t,icon:T3}))),O3={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z`}}]},name:`shopping-cart`,theme:`outlined`};function k3(){return k3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,k3({},e,{ref:t,icon:O3}))),j3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 312H696v-16c0-101.6-82.4-184-184-184s-184 82.4-184 184v16H192c-17.7 0-32 14.3-32 32v536c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V344c0-17.7-14.3-32-32-32zm-432-16c0-61.9 50.1-112 112-112s112 50.1 112 112v16H400v-16zm392 544H232V384h96v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h224v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h96v456z`}}]},name:`shopping`,theme:`outlined`};function M3(){return M3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,M3({},e,{ref:t,icon:j3}))),P3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M925.6 405.1l-203-253.7a6.5 6.5 0 00-5-2.4H306.4c-1.9 0-3.8.9-5 2.4l-203 253.7a6.5 6.5 0 00.2 8.3l408.6 459.5c1.2 1.4 3 2.1 4.8 2.1 1.8 0 3.5-.8 4.8-2.1l408.6-459.5a6.5 6.5 0 00.2-8.3zM645.2 206.4l34.4 133.9-132.5-133.9h98.1zm8.2 178.5H370.6L512 242l141.4 142.9zM378.8 206.4h98.1L344.3 340.3l34.5-133.9zm-53.4 7l-44.1 171.5h-93.1l137.2-171.5zM194.6 434.9H289l125.8 247.7-220.2-247.7zM512 763.4L345.1 434.9h333.7L512 763.4zm97.1-80.8L735 434.9h94.4L609.1 682.6zm133.6-297.7l-44.1-171.5 137.2 171.5h-93.1z`}}]},name:`sketch`,theme:`outlined`};function F3(){return F3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,F3({},e,{ref:t,icon:P3}))),L3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M870 126H663.8c-17.4 0-32.9 11.9-37 29.3C614.3 208.1 567 246 512 246s-102.3-37.9-114.8-90.7a37.93 37.93 0 00-37-29.3H154a44 44 0 00-44 44v252a44 44 0 0044 44h75v388a44 44 0 0044 44h478a44 44 0 0044-44V466h75a44 44 0 0044-44V170a44 44 0 00-44-44zm-28 268H723v432H301V394H182V198h153.3c28.2 71.2 97.5 120 176.7 120s148.5-48.8 176.7-120H842v196z`}}]},name:`skin`,theme:`outlined`};function R3(){return R3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,R3({},e,{ref:t,icon:L3}))),B3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z`}}]},name:`smile`,theme:`outlined`};function V3(){return V3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,V3({},e,{ref:t,icon:B3}))),U3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M688 264c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48zm-8 136H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM480 544H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 308H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm356.8-74.4c29-26.3 47.2-64.3 47.2-106.6 0-79.5-64.5-144-144-144s-144 64.5-144 144c0 42.3 18.2 80.3 47.2 106.6-57 32.5-96.2 92.7-99.2 162.1-.2 4.5 3.5 8.3 8 8.3h48.1c4.2 0 7.7-3.3 8-7.6C564 871.2 621.7 816 692 816s128 55.2 131.9 124.4c.2 4.2 3.7 7.6 8 7.6H880c4.6 0 8.2-3.8 8-8.3-2.9-69.5-42.2-129.6-99.2-162.1zM692 591c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z`}}]},name:`solution`,theme:`outlined`};function W3(){return W3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,W3({},e,{ref:t,icon:U3}))),K3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1zM586 803L293.4 611.7l-18-11.7H146V424h129.4l17.9-11.7L586 221v582zm348-327H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zm-41.9 261.8l-110.3-63.7a15.9 15.9 0 00-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0021.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM760 344a15.9 15.9 0 0021.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 00-21.7-5.9L746 287.8a15.99 15.99 0 00-5.8 21.8L760 344z`}}]},name:`sound`,theme:`outlined`};function q3(){return q3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,q3({},e,{ref:t,icon:K3}))),Y3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z`}}]},name:`star`,theme:`outlined`};function X3(){return X3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,X3({},e,{ref:t,icon:Y3}))),Q3={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`};function $3(){return $3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,$3({},e,{ref:t,icon:Q3}))),t6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M938 458.8l-29.6-312.6c-1.5-16.2-14.4-29-30.6-30.6L565.2 86h-.4c-3.2 0-5.7 1-7.6 2.9L88.9 557.2a9.96 9.96 0 000 14.1l363.8 363.8c1.9 1.9 4.4 2.9 7.1 2.9s5.2-1 7.1-2.9l468.3-468.3c2-2.1 3-5 2.8-8zM459.7 834.7L189.3 564.3 589 164.6 836 188l23.4 247-399.7 399.7zM680 256c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm0 120c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z`}}]},name:`tag`,theme:`outlined`};function n6(){return n6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n6({},e,{ref:t,icon:t6}))),i6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z`}}]},name:`team`,theme:`outlined`};function a6(){return a6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a6({},e,{ref:t,icon:i6}))),s6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z`}}]},name:`thunderbolt`,theme:`outlined`};function c6(){return c6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c6({},e,{ref:t,icon:s6}))),u6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z`}}]},name:`tool`,theme:`outlined`};function d6(){return d6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d6({},e,{ref:t,icon:u6}))),p6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 160h-92v-40c0-4.4-3.6-8-8-8H256c-4.4 0-8 3.6-8 8v40h-92a44 44 0 00-44 44v148c0 81.7 60 149.6 138.2 162C265.7 630.2 359 721.7 476 734.5v105.2H280c-17.7 0-32 14.3-32 32V904c0 4.4 3.6 8 8 8h512c4.4 0 8-3.6 8-8v-32.3c0-17.7-14.3-32-32-32H548V734.5C665 721.7 758.3 630.2 773.8 514 852 501.6 912 433.7 912 352V204a44 44 0 00-44-44zM184 352V232h64v207.6a91.99 91.99 0 01-64-87.6zm520 128c0 49.1-19.1 95.4-53.9 130.1-34.8 34.8-81 53.9-130.1 53.9h-16c-49.1 0-95.4-19.1-130.1-53.9-34.8-34.8-53.9-81-53.9-130.1V184h384v296zm136-128c0 41-26.9 75.8-64 87.6V232h64v120z`}}]},name:`trophy`,theme:`outlined`};function m6(){return m6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,m6({},e,{ref:t,icon:p6}))),g6={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M608 192a32 32 0 0132 32v160h174.81a32 32 0 0126.68 14.33l113.19 170.84a32 32 0 015.32 17.68V672a32 32 0 01-32 32h-96c0 70.7-57.3 128-128 128s-128-57.3-128-128H384c0 70.7-57.3 128-128 128s-128-57.3-128-128H96a32 32 0 01-32-32V224a32 32 0 0132-32zM256 640a64 64 0 000 128h1.06A64 64 0 00256 640m448 0a64 64 0 000 128h1.06A64 64 0 00704 640M576 256H128v384h17.12c22.13-38.26 63.5-64 110.88-64 47.38 0 88.75 25.74 110.88 64H576zm221.63 192H640v145.12A127.43 127.43 0 01704 576c47.38 0 88.75 25.74 110.88 64H896v-43.52zM500 448a12 12 0 0112 12v40a12 12 0 01-12 12H332a12 12 0 01-12-12v-40a12 12 0 0112-12zM308 320a12 12 0 0112 12v40a12 12 0 01-12 12H204a12 12 0 01-12-12v-40a12 12 0 0112-12z`}}]},name:`truck`,theme:`outlined`};function _6(){return _6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,_6({},e,{ref:t,icon:g6}))),y6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M511.4 124C290.5 124.3 112 303 112 523.9c0 128 60.2 242 153.8 315.2l-37.5 48c-4.1 5.3-.3 13 6.3 12.9l167-.8c5.2 0 9-4.9 7.7-9.9L369.8 727a8 8 0 00-14.1-3L315 776.1c-10.2-8-20-16.7-29.3-26a318.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-7.5 7.5-15.3 14.5-23.4 21.2a7.93 7.93 0 00-1.2 11.1l39.4 50.5c2.8 3.5 7.9 4.1 11.4 1.3C854.5 760.8 912 649.1 912 523.9c0-221.1-179.4-400.2-400.6-399.9z`}}]},name:`undo`,theme:`outlined`};function b6(){return b6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b6({},e,{ref:t,icon:y6}))),S6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`upload`,theme:`outlined`};function C6(){return C6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C6({},e,{ref:t,icon:S6}))),T6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z`}}]},name:`user`,theme:`outlined`};function E6(){return E6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,E6({},e,{ref:t,icon:T6}))),O6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v576c0 35.3 28.7 64 64 64h592c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM712 792H136V232h576v560zm176-167l-104-59.8V458.9L888 399v226zM208 360h112c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H208c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}}]},name:`video-camera`,theme:`outlined`};function k6(){return k6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,k6({},e,{ref:t,icon:O6}))),j6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 464H528V448h312v128zm0 264H184V184h656v200H496c-17.7 0-32 14.3-32 32v192c0 17.7 14.3 32 32 32h344v200zM580 512a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`wallet`,theme:`outlined`};function M6(){return M6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,M6({},e,{ref:t,icon:j6}))),P6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M690.1 377.4c5.9 0 11.8.2 17.6.5-24.4-128.7-158.3-227.1-319.9-227.1C209 150.8 64 271.4 64 420.2c0 81.1 43.6 154.2 111.9 203.6a21.5 21.5 0 019.1 17.6c0 2.4-.5 4.6-1.1 6.9-5.5 20.3-14.2 52.8-14.6 54.3-.7 2.6-1.7 5.2-1.7 7.9 0 5.9 4.8 10.8 10.8 10.8 2.3 0 4.2-.9 6.2-2l70.9-40.9c5.3-3.1 11-5 17.2-5 3.2 0 6.4.5 9.5 1.4 33.1 9.5 68.8 14.8 105.7 14.8 6 0 11.9-.1 17.8-.4-7.1-21-10.9-43.1-10.9-66 0-135.8 132.2-245.8 295.3-245.8zm-194.3-86.5c23.8 0 43.2 19.3 43.2 43.1s-19.3 43.1-43.2 43.1c-23.8 0-43.2-19.3-43.2-43.1s19.4-43.1 43.2-43.1zm-215.9 86.2c-23.8 0-43.2-19.3-43.2-43.1s19.3-43.1 43.2-43.1 43.2 19.3 43.2 43.1-19.4 43.1-43.2 43.1zm586.8 415.6c56.9-41.2 93.2-102 93.2-169.7 0-124-120.8-224.5-269.9-224.5-149 0-269.9 100.5-269.9 224.5S540.9 847.5 690 847.5c30.8 0 60.6-4.4 88.1-12.3 2.6-.8 5.2-1.2 7.9-1.2 5.2 0 9.9 1.6 14.3 4.1l59.1 34c1.7 1 3.3 1.7 5.2 1.7a9 9 0 006.4-2.6 9 9 0 002.6-6.4c0-2.2-.9-4.4-1.4-6.6-.3-1.2-7.6-28.3-12.2-45.3-.5-1.9-.9-3.8-.9-5.7.1-5.9 3.1-11.2 7.6-14.5zM600.2 587.2c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9c0 19.8-16.2 35.9-36 35.9zm179.9 0c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9a36.08 36.08 0 01-36 35.9z`}}]},name:`wechat`,theme:`outlined`};function F6(){return F6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,F6({},e,{ref:t,icon:P6}))),L6=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},R6=(e=>e?L6(e):L6),z6=e=>e;function B6(e,t=z6){let n=S.useSyncExternalStore(e.subscribe,S.useCallback(()=>t(e.getState()),[e,t]),S.useCallback(()=>t(e.getInitialState()),[e,t]));return S.useDebugValue(n),n}var V6=e=>{let t=R6(e),n=e=>B6(t,e);return Object.assign(n,t),n},H6=(e=>e?V6(e):V6),U6=c(z1(),1),W6=`AES-GCM`,G6=12,K6=128;async function q6(){throw Error(`VITE_ENCRYPTION_KEY not configured`)}async function J6(e){let t=await q6(),n=crypto.getRandomValues(new Uint8Array(G6)),r=new TextEncoder().encode(e),i=await crypto.subtle.encrypt({name:W6,iv:n,tagLength:K6},t,r),a=new Uint8Array(i),o=new Uint8Array(n.length+a.length);return o.set(n),o.set(a,n.length),btoa(String.fromCharCode(...o))}async function Y6(e){let t=await q6(),n=Uint8Array.from(atob(e),e=>e.charCodeAt(0)),r=n.slice(0,G6),i=n.slice(G6),a=await crypto.subtle.decrypt({name:W6,iv:r,tagLength:K6},t,i);return new TextDecoder().decode(a)}var X6=`http://ceshi.apiforeign.minzhong.cn`,Z6=!1;function Q6(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}function $6(e){return Array.isArray(e)?e.map($6):typeof e==`object`&&e?Object.fromEntries(Object.entries(e).map(([e,t])=>[Q6(e),$6(t)])):e}function e8(){return localStorage.getItem(`auth_token`)}function t8(e){localStorage.setItem(`auth_token`,e)}function n8(){localStorage.removeItem(`auth_token`)}async function r8(e){try{return await Y6(e)}catch{return null}}async function i8(e,t={}){let{method:n=`GET`,body:r,auth:i=!0,encryptBody:a=Z6}=t,o={"Content-Type":`application/json`};if(i){let e=e8();e&&(o.Authorization=`Bearer ${e}`)}let s;if(r!==void 0){let e=JSON.stringify(r);a?(o[`X-Encrypted`]=`true`,s=JSON.stringify({data:await J6(e)})):s=e}let c=await fetch(`${X6}/api${e}`,{method:n,headers:o,body:s});if(c.status===204)return;let l=await c.text();if(!l)return;let u;try{u=JSON.parse(l)}catch{throw Error(`响应解析失败 (${c.status})`)}if(u&&typeof u.data==`string`&&a){let e=await r8(u.data);e!==null&&(u=JSON.parse(e))}if(!c.ok){let e=u?.detail||`请求失败 (${c.status})`;throw c.status===401&&(n8(),window.location.pathname!==`/login`&&(window.location.href=`/login`)),Error(e)}return $6(u)}var a8={get:(e,t=!0)=>i8(e,{auth:t}),post:(e,t,n=!0)=>i8(e,{method:`POST`,body:t,auth:n}),put:(e,t,n=!0)=>i8(e,{method:`PUT`,body:t,auth:n}),delete:(e,t=!0)=>i8(e,{method:`DELETE`,auth:t})};async function o8(e,t,n,r){let i=await a8.post(`/auth/admin-login`,{username:e,password:t,captcha_token:n,remember_me:r||!1},!1);return t8(i.accessToken),i.user}async function s8(){await a8.post(`/auth/logout`),n8()}async function c8(){try{return await a8.get(`/auth/me`)}catch{return null}}async function l8(e,t){let n={};e&&(n.start_date=e),t&&(n.end_date=t);let r=new URLSearchParams(n).toString();return a8.get(`/admin/stats${r?`?${r}`:``}`)}async function u8(e=1,t=20,n,r,i){let a=new URLSearchParams;return a.set(`page`,String(e)),a.set(`page_size`,String(t)),n&&a.set(`search`,n),r&&a.set(`user_type`,r),i&&a.set(`frontend_user_kind`,i),a8.get(`/admin/users?${a.toString()}`)}async function d8(e,t){return a8.put(`/admin/users/${e}/frontend-kind`,{frontend_user_kind:t})}async function f8(e,t,n){await a8.post(`/admin/users/${e}/credits`,{amount:t,description:n})}async function p8(e,t){await a8.put(`/admin/users/${e}/status`,{is_active:t})}async function m8(){return a8.get(`/admin/model-configs`)}async function h8(e){return e.id?a8.put(`/admin/model-configs/${e.id}`,e):a8.post(`/admin/model-configs`,e)}async function g8(e){await a8.delete(`/admin/model-configs/${e}`)}async function _8(){return a8.get(`/admin/system-configs`)}async function v8(e,t){await a8.put(`/admin/system-configs/${e}`,{value:t})}async function y8(e,t){let n=new FormData;n.append(`file`,e),n.append(`config_key`,t);let r=localStorage.getItem(`auth_token`),i=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/admin/upload-pdf`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!i.ok){let e=await i.text();throw Error(e||`上传失败`)}return i.json()}async function b8(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/admin/upload-logo`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok){let e=await r.text();throw Error(e||`上传失败`)}return r.json()}function x8(e,t,n){n!=null&&String(n)!==``&&e.set(t,String(n))}async function S8(e){let t=new URLSearchParams;x8(t,`page`,e?.page),x8(t,`page_size`,e?.pageSize),x8(t,`user_id`,e?.userId),x8(t,`user_name`,e?.userName),x8(t,`user_type`,e?.userType),x8(t,`frontend_user_kind`,e?.frontendUserKind),x8(t,`record_type`,e?.recordType||e?.type),x8(t,`credit_subject`,e?.creditSubject),x8(t,`media_type`,e?.mediaType),x8(t,`charge_kind`,e?.chargeKind),x8(t,`source_module`,e?.sourceModule),x8(t,`source_step_code`,e?.sourceStepCode),x8(t,`billing_scene`,e?.billingScene),x8(t,`start_date`,e?.startDate),x8(t,`end_date`,e?.endDate);let n=t.toString()?`?${t}`:``;return a8.get(`/admin/credit-records${n}`)}async function C8(){return a8.get(`/admin/industry-configs`)}async function w8(e){return e.id?a8.put(`/admin/industry-configs/${e.id}`,e):a8.post(`/admin/industry-configs`,e)}async function T8(e){await a8.delete(`/admin/industry-configs/${e}`)}async function E8(){return a8.get(`/admin/video-engines`)}async function D8(e){return e.id?a8.put(`/admin/video-engines/${e.id}`,e):a8.post(`/admin/video-engines`,e)}async function O8(e){await a8.delete(`/admin/video-engines/${e}`)}async function k8(){return a8.get(`/admin/image-engines`)}async function A8(e){return e.id?a8.put(`/admin/image-engines/${e.id}`,e):a8.post(`/admin/image-engines`,e)}async function j8(e){await a8.delete(`/admin/image-engines/${e}`)}async function M8(){return a8.get(`/admin/credit-ratios`)}async function N8(e){return e.id?a8.put(`/admin/credit-ratios/${e.id}`,e):a8.post(`/admin/credit-ratios`,e)}async function P8(e){await a8.delete(`/admin/credit-ratios/${e}`)}async function F8(){return a8.get(`/admin/payment-configs`)}async function I8(e){await a8.put(`/admin/payment-configs/batch`,e)}async function L8(e){let t=new URLSearchParams;e?.paymentMethod&&t.set(`payment_method`,e.paymentMethod),e?.status&&t.set(`status`,e.status),e?.startDate&&t.set(`start_date`,e.startDate),e?.endDate&&t.set(`end_date`,e.endDate);let n=t.toString(),r=n?`/admin/payment-stats?${n}`:`/admin/payment-stats`;return a8.get(r)}async function R8(e){let t=new URLSearchParams;return e?.method&&t.set(`payment_method`,e.method),e?.status&&t.set(`status`,e.status),e?.startDate&&t.set(`start_date`,e.startDate),e?.endDate&&t.set(`end_date`,e.endDate),e?.page&&t.set(`page`,String(e.page)),e?.pageSize&&t.set(`page_size`,String(e.pageSize)),a8.get(`/admin/payment-orders?${t.toString()}`)}async function z8(e){await a8.post(`/admin/payment-orders/${e}/refund`)}async function B8(e=1,t=20){let n=new URLSearchParams;return n.set(`page`,String(e)),n.set(`page_size`,String(t)),a8.get(`/admin/notifications?${n.toString()}`)}async function V8(e){await a8.post(`/admin/notifications`,e)}async function H8(e){await a8.delete(`/admin/notifications/${e}`)}async function U8(e){return a8.get(`/admin/notifications/${e}/read-users`)}async function W8(){return a8.get(`/admin/menu-configs`)}async function G8(e){return e.id?a8.put(`/admin/menu-configs/${e.id}`,e):a8.post(`/admin/menu-configs`,e)}async function K8(e){await a8.delete(`/admin/menu-configs/${e}`)}async function q8(e){return a8.post(`/admin/users`,e)}async function J8(e,t){await a8.put(`/admin/users/${e}/menus`,{allowed_menus:t})}async function Y8(e,t){await a8.put(`/admin/users/${e}/reset-password`,{new_password:t})}async function X8(e,t){await a8.post(`/admin/change-password`,{old_password:e,new_password:t})}async function Z8(){return a8.get(`/auth/site-info`,!1)}async function Q8(){return a8.get(`/admin/recharge-packages`)}async function $8(e){return e.id?a8.put(`/admin/recharge-packages/${e.id}`,e):a8.post(`/admin/recharge-packages`,e)}async function e5(e){await a8.delete(`/admin/recharge-packages/${e}`)}async function t5(e){let t=e?`?page=${e}`:``;return a8.get(`/admin/operation-logs${t}`)}async function n5(e){let t=e?`?page=${e}`:``;return a8.get(`/admin/user-oauth-apps/list${t}`)}async function r5(e){return a8.post(`/admin/user-oauth-apps/create`,e)}async function i5(e){return a8.get(`/admin/user-oauth-apps/read/${e}`)}async function a5(e,t){return a8.post(`/admin/user-oauth-apps/update/${e}`,t)}async function o5(e){await a8.get(`/admin/user-oauth-apps/delete/${e}`)}async function s5(e){let t=new URLSearchParams;e?.page&&t.set(`page`,String(e.page)),e?.page_size&&t.set(`page_size`,String(e.page_size)),e?.type_name&&t.set(`type_name`,e.type_name),e?.open_type&&t.set(`open_type`,String(e.open_type));let n=t.toString();return a8.get(`/open-type/list${n?`?${n}`:``}`)}async function c5(e){return a8.get(`/open-type/select/${e}`)}async function l5(e){return a8.post(`/open-type/create`,e)}async function u5(e,t){return a8.put(`/open-type/update/${e}`,t)}async function d5(e){await a8.delete(`/open-type/delete/${e}`)}async function f5(e){let t=new URLSearchParams;e?.userId&&t.set(`user_id`,e.userId),e?.status&&t.set(`status`,e.status),e?.page&&t.set(`page`,String(e.page)),e?.pageSize&&t.set(`page_size`,String(e.pageSize));let n=t.toString();return a8.get(`/admin/generation-records${n?`?${n}`:``}`)}async function p5(e,t,n){await a8.put(`/admin/generation-records/${e}/status`,{status:t,video_url:n})}async function m5(e,t,n,r){await a8.post(`/admin/generation-records/${e}/generate`,{aspect_ratio:t,resolution:n,image_size:r})}async function h5(){return a8.get(`/generation-ai/engines`)}async function g5(e){let t=new URLSearchParams;e?.genType&&t.set(`gen_type`,e.genType),e?.status&&t.set(`status`,e.status),e?.page&&t.set(`page`,String(e.page)),e?.pageSize&&t.set(`page_size`,String(e.pageSize)),e?.userId&&t.set(`user_id`,e.userId),e?.userName&&t.set(`user_name`,e.userName);let n=t.toString();return a8.get(`/generation-ai/tasks${n?`?${n}`:``}`)}function _5(e,t,n){n==null||String(n).trim()===``||e.set(t,String(n))}async function v5(e){let t=new URLSearchParams;_5(t,`status`,e?.status),_5(t,`keyword`,e?.keyword),_5(t,`user_id`,e?.userId),_5(t,`user_name`,e?.userName),_5(t,`created_start`,e?.createdStart),_5(t,`created_end`,e?.createdEnd),_5(t,`page`,e?.page),_5(t,`page_size`,e?.pageSize);let n=t.toString();return a8.get(`/hot-opening-replications/tasks${n?`?${n}`:``}`)}async function y5(e){return a8.get(`/hot-opening-replications/tasks/${e}`)}async function b5(e){let t=new URLSearchParams;_5(t,`status`,e?.status),_5(t,`analysis_status`,e?.analysisStatus),_5(t,`split_status`,e?.splitStatus),_5(t,`keyword`,e?.keyword),_5(t,`user_id`,e?.userId),_5(t,`user_name`,e?.userName),_5(t,`created_start`,e?.createdStart),_5(t,`created_end`,e?.createdEnd),_5(t,`page`,e?.page),_5(t,`page_size`,e?.pageSize);let n=t.toString();return a8.get(`/shot-replications/task-sets${n?`?${n}`:``}`)}async function x5(e){return a8.get(`/shot-replications/task-sets/${e}`)}async function S5(e,t){let n=new URLSearchParams;_5(n,`source_mode`,t?.sourceMode),_5(n,`split_status`,t?.splitStatus),_5(n,`analysis_status`,t?.analysisStatus),_5(n,`replicate_status`,t?.replicateStatus),_5(n,`page`,t?.page),_5(n,`page_size`,t?.pageSize);let r=n.toString();return a8.get(`/shot-replications/task-sets/${e}/segments${r?`?${r}`:``}`)}async function C5(e){return a8.get(`/shot-replications/segments/${e}`)}async function w5(e){return a8.get(`/shot-replications/projects/${e}`)}async function T5(){return a8.get(`/admin/video-prompt-schema-config`)}async function E5(e){return a8.put(`/admin/video-prompt-schema-config`,e)}async function D5(){return a8.post(`/admin/video-prompt-schema-config/reset-default`)}async function O5(){return a8.get(`/admin/video-prompt-schema-config/export`)}async function k5(e){return a8.post(`/admin/video-prompt-schema-config/import`,e)}async function A5(e){return a8.post(`/admin/video-prompt-schema-config/preview`,e)}async function j5(e){return a8.post(`/user-oauth/request_oauth`,e)}async function M5(e){let t=new URLSearchParams;return e.account_userid&&t.set(`account_userid`,e.account_userid),e.open_type!==void 0&&t.set(`open_type`,String(e.open_type)),e.account_id&&t.set(`account_id`,e.account_id),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),a8.get(`/user-oauth/oauth_list?${t.toString()}`)}async function N5(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/generation-records/upload-image`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok)throw Error(`图片上传失败`);let i=await r.json();return{url:i.url,filename:i.filename}}async function P5(){return a8.get(`/material-consumption/fields`)}async function F5(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.user_id&&t.set(`user_id`,e.user_id),e.consume_date!==void 0&&t.set(`consume_date`,e.consume_date[0]+`,`+e.consume_date[1]),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),a8.get(`/material-consumption/admin/list?${t.toString()}`)}var I5=H6(e=>({user:null,loading:!0,login:async(t,n,r)=>{e({user:await o8(t,n,void 0,r)})},logout:async()=>{await s8(),e({user:null})},checkAuth:async()=>{try{if(!localStorage.getItem(`auth_token`)){e({user:null,loading:!1});return}e({user:await c8(),loading:!1})}catch(t){(t?.message?.includes(`401`)||t?.message?.includes(`Unauthorized`))&&localStorage.removeItem(`auth_token`),e({user:null,loading:!1})}}})),L5=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Q=o(((e,t)=>{t.exports=L5()}))(),{Sider:R5,Content:z5}=DW,B5={HomeOutlined:(0,Q.jsx)(Z2,{}),PlayCircleOutlined:(0,Q.jsx)(J4,{}),WalletOutlined:(0,Q.jsx)(N6,{}),RobotOutlined:(0,Q.jsx)(o3,{}),SettingOutlined:(0,Q.jsx)(D3,{}),BellOutlined:(0,Q.jsx)(h0,{}),UserOutlined:(0,Q.jsx)(D6,{}),AppstoreOutlined:(0,Q.jsx)(J1,{}),FileTextOutlined:(0,Q.jsx)(YV,{}),StarOutlined:(0,Q.jsx)(Z3,{}),HeartOutlined:(0,Q.jsx)(H2,{}),CameraOutlined:(0,Q.jsx)(A0,{}),DashboardOutlined:(0,Q.jsx)(o2,{}),CalculatorOutlined:(0,Q.jsx)(D0,{}),DollarOutlined:(0,Q.jsx)(f2,{}),GiftOutlined:(0,Q.jsx)(I2,{}),ThunderboltOutlined:(0,Q.jsx)(l6,{}),FireOutlined:(0,Q.jsx)(D2,{}),CloudOutlined:(0,Q.jsx)(H0,{}),SmileOutlined:(0,Q.jsx)(H3,{}),TrophyOutlined:(0,Q.jsx)(h6,{}),RocketOutlined:(0,Q.jsx)(l3,{}),BulbOutlined:(0,Q.jsx)(w0,{}),CodeOutlined:(0,Q.jsx)(J0,{}),PictureOutlined:(0,Q.jsx)(H4,{}),VideoCameraOutlined:(0,Q.jsx)(A6,{}),AudioOutlined:(0,Q.jsx)(o0,{}),MailOutlined:(0,Q.jsx)(v4,{}),PhoneOutlined:(0,Q.jsx)(z4,{}),GlobalOutlined:(0,Q.jsx)(z2,{}),ShoppingCartOutlined:(0,Q.jsx)(A3,{}),TeamOutlined:(0,Q.jsx)(o6,{}),BarChartOutlined:(0,Q.jsx)(f0,{}),PieChartOutlined:(0,Q.jsx)(G4,{}),LineChartOutlined:(0,Q.jsx)(o4,{}),SecurityScanOutlined:(0,Q.jsx)(x3,{}),ApiOutlined:(0,Q.jsx)(G1,{}),DatabaseOutlined:(0,Q.jsx)(l2,{}),CloudServerOutlined:(0,Q.jsx)(G0,{}),MenuOutlined:(0,Q.jsx)(w4,{}),PlusOutlined:(0,Q.jsx)(DL,{}),EditOutlined:(0,Q.jsx)(HQ,{}),DeleteOutlined:(0,Q.jsx)(zQ,{}),LockOutlined:(0,Q.jsx)(f4,{}),LogoutOutlined:(0,Q.jsx)(h4,{})},V5=()=>{let e=Ye(),t=Ke(),{user:n,loading:r,logout:i}=I5(),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)(!1),[l]=X.useForm(),[u,d]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`);return e&&JSON.parse(e).siteName||`管理后台`}),[f,p]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`);return e&&JSON.parse(e).siteLogo||``});if((0,S.useEffect)(()=>{Z8().then(e=>{let t=e.siteName||`管理后台`,n=e.siteLogo||``;if(d(t),p(n),document.title=t,localStorage.setItem(`siteInfo`,JSON.stringify({siteName:t,siteLogo:n})),n){let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=n,e.type=`image/png`}}).catch(()=>{})},[]),(0,S.useEffect)(()=>{W8().then(e=>{let t=e.filter(e=>{let t=e.menu_target??e.menuTarget??`admin`;return(e.is_active??e.isActive??!0)&&(t===`admin`||t===`both`)}),r=!!(n?.isAdmin??n?.is_admin);if(n&&!r){let e=n.allowedMenus??n?.allowed_menus;if(e&&Array.isArray(e)&&e.length>0){let n=new Set(e);t=t.filter(e=>(e.menu_type??e.menuType)===`group`?t.some(t=>(t.parent_id??t.parentId)===e.id&&n.has(t.path)):n.has(e.path))}else t=[]}o(t)}).catch(()=>{})},[n]),r)return(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,Q.jsx)(TG,{size:`large`})});if(!n)return(0,Q.jsx)(Ct,{to:`/admin/login`,replace:!0});let m={};a.filter(e=>(e.menu_type??e.menuType)!==`group`&&(e.parent_id??e.parentId)).forEach(e=>{let t=e.parent_id??e.parentId;m[t]||(m[t]=[]),m[t].push(e)});let h=[...a].sort((e,t)=>(e.sort_order??e.sortOrder??0)-(t.sort_order??t.sortOrder??0)),g=[];h.forEach(e=>{let t=e.menu_type??e.menuType,n=e.parent_id??e.parentId;if(t===`group`){let t=(m[e.id]||[]).sort((e,t)=>(e.sort_order??e.sortOrder??0)-(t.sort_order??t.sortOrder??0)).map(e=>({key:e.path,icon:B5[e.icon]||void 0,label:e.label}));t.length>0&&g.push({key:`group-${e.id}`,icon:B5[e.icon]||void 0,label:e.label,children:t})}else n||g.push({key:e.path,icon:B5[e.icon]||void 0,label:e.label})});let _=!!(n?.isAdmin??n?.is_admin);g.length===0&&_&&g.push({key:`/`,icon:(0,Q.jsx)(o2,{}),label:`数据概览`},{key:`/users`,icon:(0,Q.jsx)(D6,{}),label:`用户管理`});let v=t.pathname,y=[];g.forEach(e=>{e.children?e.children.forEach(e=>y.push(e.key)):y.push(e.key)}),y.includes(v)||(v=y.find(e=>v.startsWith(e))||`/`);let b=[];return g.forEach(e=>{e.children&&e.children.some(e=>e.key===v)&&b.push(e.key)}),(0,Q.jsxs)(DW,{style:{minHeight:`100vh`,background:`#f1f5f9`},children:[(0,Q.jsxs)(R5,{width:240,theme:`light`,style:{position:`fixed`,left:16,top:16,bottom:16,width:240,background:`linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,border:`1px solid rgba(0, 0, 0, 0.06)`,zIndex:100},children:[(0,Q.jsxs)(`div`,{style:{height:80,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:12,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`},children:[(0,Q.jsx)(`div`,{style:{width:42,height:42,borderRadius:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,overflow:`hidden`},children:f?(0,Q.jsx)(`img`,{src:f,alt:`logo`,style:{width:28,height:28,objectFit:`contain`}}):(0,Q.jsx)(l6,{style:{fontSize:20,color:`#ffffff`}})}),(0,Q.jsx)(`span`,{style:{color:`#1e293b`,fontSize:17,fontWeight:700,letterSpacing:-.02,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:u})]}),(0,Q.jsx)(`div`,{style:{overflowY:`auto`,maxHeight:`calc(100vh - 200px)`,paddingRight:8},children:(0,Q.jsx)(qE,{mode:`inline`,selectedKeys:[v],defaultOpenKeys:b,items:g,style:{background:`transparent`,border:`none`,paddingTop:8,marginTop:8},onClick:({key:t})=>{t.startsWith(`group-`)||e(t)},theme:`light`})}),(0,Q.jsx)(`div`,{style:{position:`absolute`,bottom:16,left:16,right:16,padding:12,background:`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,borderRadius:12,border:`1px solid rgba(0, 0, 0, 0.06)`},children:(0,Q.jsx)(KV,{menu:{items:[{key:`user`,icon:(0,Q.jsx)(D6,{}),label:n?.username,disabled:!0},{type:`divider`},{key:`changePwd`,icon:(0,Q.jsx)(f4,{}),label:`修改密码`},{key:`logout`,icon:(0,Q.jsx)(h4,{}),label:`退出登录`,danger:!0}],onClick:({key:t})=>{t===`logout`&&(i(),e(`/login`)),t===`changePwd`&&(c(!0),l.resetFields())}},placement:`topRight`,arrow:!0,children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,cursor:`pointer`,padding:`8px 12px`,borderRadius:12,transition:`all 0.25s ease`,background:`transparent`},onMouseEnter:e=>{e.currentTarget.style.background=`#ffffff`,e.currentTarget.style.boxShadow=`0 4px 12px rgba(0, 0, 0, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`,e.currentTarget.style.boxShadow=`none`},children:[(0,Q.jsx)(Vw,{size:32,icon:(0,Q.jsx)(D6,{}),style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`}}),(0,Q.jsxs)(`div`,{style:{flex:1,overflow:`hidden`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:13,fontWeight:600,color:`#1e293b`,display:`block`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:n?.username}),(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:_?`管理员`:`普通用户`})]})]})})})]}),(0,Q.jsxs)(DW,{style:{marginLeft:272,marginTop:16,marginRight:16,marginBottom:16,background:`transparent`},children:[(0,Q.jsx)(`div`,{style:{height:72,background:`#ffffff`,borderRadius:`16px 16px 0 0`,boxShadow:`0 2px 12px rgba(0, 0, 0, 0.04)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`0 32px`,fontFamily:`var(--font-sans)`,border:`1px solid rgba(0, 0, 0, 0.06)`,borderBottom:`none`},children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:18,color:`#1e293b`,fontWeight:600},children:g.find(e=>e.key===v)?.label||g.flatMap(e=>e.children||[]).find(e=>e.key===v)?.label||`管理后台`})}),(0,Q.jsx)(z5,{style:{padding:32,background:`#ffffff`,borderRadius:`0 0 16px 16px`,boxShadow:`0 4px 24px rgba(0, 0, 0, 0.06)`,overflow:`auto`,border:`1px solid rgba(0, 0, 0, 0.06)`,borderTop:`none`},children:g.length===0&&!_?(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`60vh`,color:`#94a3b8`},children:[(0,Q.jsx)(f4,{style:{fontSize:48,marginBottom:16,color:`#cbd5e1`}}),(0,Q.jsx)(`div`,{style:{fontSize:16,fontWeight:600,color:`#64748b`},children:`暂无任何权限`}),(0,Q.jsx)(`div`,{style:{fontSize:13,marginTop:8},children:`请联系管理员配置菜单权限`})]}):(0,Q.jsx)(wt,{})})]}),(0,Q.jsx)(UG,{title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(f4,{}),`修改密码`]}),open:s,onOk:async()=>{try{let e=await l.validateFields();if(e.newPassword!==e.confirmPassword){BG.error(`两次输入的密码不一致`);return}await X8(e.oldPassword,e.newPassword),BG.success(`密码修改成功`),c(!1),l.resetFields()}catch(e){if(e?.errorFields)return;BG.error(e?.message||`修改失败`)}},onCancel:()=>{c(!1),l.resetFields()},okText:`确认修改`,cancelText:`取消`,width:420,children:(0,Q.jsxs)(X,{form:l,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`oldPassword`,label:`原密码`,rules:[{required:!0,message:`请输入原密码`}],children:(0,Q.jsx)(vW.Password,{placeholder:`请输入原密码`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`newPassword`,label:`新密码`,rules:[{required:!0,min:6,message:`密码至少6位`}],children:(0,Q.jsx)(vW.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`confirmPassword`,label:`确认新密码`,rules:[{required:!0,message:`请再次输入新密码`}],children:(0,Q.jsx)(vW.Password,{placeholder:`请再次输入新密码`,size:`large`})})]})})]})},H5={1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`},U5={1:`巨量`,2:`磁力`,3:`巨量星图`,4:`服务单`,5:`腾讯`},W5=e=>{if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`},G5=()=>{let{message:e}=cx.useApp(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(void 0),[d,f]=(0,S.useState)(1),[p,m]=(0,S.useState)(10),[h,g]=(0,S.useState)(0),[_,v]=(0,S.useState)({account_userid:``,open_type:void 0,account_id:``});(0,S.useEffect)(()=>{y()},[]);let y=async(t=1,r=10,i=_)=>{o(!0);try{let e=await M5({page:t,page_size:r,account_userid:i.account_userid||void 0,open_type:i.open_type,account_id:i.account_id||void 0});e?(e.data&&n(e.data.data||e.data),e.pagination&&(g(e.pagination.total||0),f(e.pagination.page||1),m(e.pagination.pageSize||10))):n(e||[])}catch{e.error(`获取授权列表失败`)}finally{o(!1)}},b=()=>{c(!0)},x=async()=>{if(!l){e.warning(`请选择开户方式`);return}i(!0);try{let t=await j5({open_type:l});t.authUrl?window.open(t.authUrl,`_blank`):e.error(`获取授权链接失败`)}catch{e.error(`请求授权失败`)}finally{i(!1),c(!1),u(void 0)}},C=[{title:`ID`,dataIndex:`id`,key:`id`},{title:`授权账户ID`,dataIndex:`accountId`,key:`accountId`,width:160},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权账户用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,render:e=>(0,Q.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})},{title:`授权账户用户名`,dataIndex:`accountUsername`,key:`accountUsername`},{title:`授权应用ID`,dataIndex:`appid`,key:`appid`},{title:`是否敏感物料授权`,dataIndex:`materialAuthStatus`,key:`materialAuthStatus`,width:100,render:e=>(0,Q.jsx)(IQ,{color:e?`green`:`default`,children:e?`是`:`否`})},{title:`开户方式`,dataIndex:`openType`,key:`openType`,render:e=>(0,Q.jsx)(`span`,{style:{color:`#1e293b`},children:H5[e]||e})},{title:`平台端口`,dataIndex:`portType`,key:`portType`,ellipsis:!0,render:e=>(0,Q.jsx)(`span`,{style:{color:`#1e293b`},children:U5[e]||e})},{title:`用户id`,dataIndex:`userId`,key:`userId`},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,Q.jsx)(`span`,{style:{color:`#64748b`},children:W5(e)})},{title:`更新时间`,dataIndex:`updatedAt`,key:`updatedAt`,width:160,render:e=>(0,Q.jsx)(`span`,{style:{color:`#64748b`},children:W5(e)})},{title:`操作`,key:`action`,width:120,render:(e,t)=>(0,Q.jsx)(vn,{to:`/consume?accountId=${t.id}`,style:{color:`#6366f1`},children:`查看消耗`})}],w=t.map((e,t)=>({...e,index:t+1,key:e.id}));return(0,Q.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(f4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`授权管理`})]}),(0,Q.jsx)(YE,{type:`primary`,size:`medium`,icon:(0,Q.jsx)(DL,{}),onClick:b,loading:r,style:{borderRadius:8,fontSize:14,fontWeight:500},children:`点击授权`})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12,marginBottom:16},children:[(0,Q.jsx)(vW,{placeholder:`账号用户ID`,value:_.account_userid,onChange:e=>v(t=>({...t,account_userid:e.target.value})),style:{width:180},onPressEnter:()=>{f(1),y(1,p)}}),(0,Q.jsx)(BC,{placeholder:`开户方式`,value:_.open_type,onChange:e=>v(t=>({...t,open_type:e})),style:{width:140},options:Object.entries(H5).map(([e,t])=>({value:Number(e),label:t}))}),(0,Q.jsx)(vW,{placeholder:`账号ID`,value:_.account_id,onChange:e=>v(t=>({...t,account_id:e.target.value})),style:{width:180},onPressEnter:()=>{f(1),y(1,p)}}),(0,Q.jsx)(YE,{type:`primary`,size:`medium`,onClick:()=>{f(1),y(1,p)},children:`搜索`}),(0,Q.jsx)(YE,{size:`medium`,onClick:()=>{v({account_userid:``,open_type:void 0,account_id:``}),f(1),y(1,p)},children:`重置`})]}),(0,Q.jsx)(CQ,{dataSource:w,columns:C,loading:a,rowKey:`id`,bordered:!1,scroll:{x:`max-content`},pagination:{current:d,pageSize:p,total:h,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{f(e),m(t),y(e,t)},size:`small`}})]}),(0,Q.jsx)(UG,{title:`选择开户方式`,open:s,onOk:x,onCancel:()=>{c(!1),u(void 0)},okText:`确认授权`,cancelText:`取消`,confirmLoading:r,children:(0,Q.jsx)(BC,{placeholder:`请选择开户方式`,value:l,onChange:e=>u(e),style:{width:`100%`},options:Object.entries(H5).map(([e,t])=>({value:Number(e),label:t}))})})]})},{RangePicker:K5}=QB,q5=e=>e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),J5=()=>{Ye();let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)([]),[u,d]=(0,S.useState)([]),[f,p]=(0,S.useState)(``),[m,h]=(0,S.useState)(1),[g,_]=(0,S.useState)(10),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)();(0,S.useEffect)(()=>{E(),T()},[m,g,C]);let T=async()=>{a(!0);try{let e=await F5({advertiser_id:v||void 0,user_id:b||void 0,consume_date:C,page:m,page_size:g});t(e.data||[]),r(e.pagination?.total||0)}catch{BG.error(`加载数据失败`)}finally{a(!1)}},E=async()=>{try{let e=((await P5()).data||[]).map(e=>({name:q5(e.field),description:e.description}));l(e);let t=localStorage.getItem(`consumeColumns`);d(t?JSON.parse(t):e.map(e=>e.name))}catch{BG.error(`加载表头字段失败`)}},D=e.map((e,t)=>({...e,index:t+1,key:e.id})),O=()=>{h(1),T()},k=()=>{y(``),x(``),w(void 0),h(1),T()},A=u.map(e=>c.find(t=>t.name===e)).filter(e=>!!e).map(e=>({title:e.description,dataIndex:e.name,key:e.name,ellipsis:!0}));return(0,Q.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(f2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`消耗记录`})]}),(0,Q.jsx)(WV,{children:(0,Q.jsx)(YE,{icon:(0,Q.jsx)(D3,{}),onClick:()=>s(!0),children:`自定义表头`})})]}),(0,Q.jsx)(`div`,{style:{marginBottom:16},children:(0,Q.jsxs)(WV,{wrap:!0,children:[(0,Q.jsx)(vW,{placeholder:`广告主ID`,value:v,onChange:e=>y(e.target.value),style:{width:200}}),(0,Q.jsx)(vW,{placeholder:`用户ID`,value:b,onChange:e=>x(e.target.value),style:{width:200}}),(0,Q.jsx)(K5,{value:C?[(0,ZE.default)(C[0]),(0,ZE.default)(C[1])]:void 0,onChange:e=>{e&&e[0]&&e[1]?w([e[0].format(`YYYY-MM-DD`),e[1].format(`YYYY-MM-DD`)]):w(void 0)}}),(0,Q.jsx)(YE,{type:`primary`,icon:(0,Q.jsx)(FC,{}),onClick:O,children:`搜索`}),(0,Q.jsx)(YE,{icon:(0,Q.jsx)(kK,{}),onClick:k,children:`重置`})]})}),(0,Q.jsx)(CQ,{dataSource:D,columns:A,loading:i,rowKey:`id`,bordered:!1,scroll:{x:`max-content`},pagination:{current:m,pageSize:g,total:n,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,size:`small`,onChange:(e,t)=>{h(e),_(t)}}})]}),(0,Q.jsx)(UG,{title:`自定义表头`,open:o,onOk:()=>{localStorage.setItem(`consumeColumns`,JSON.stringify(u)),BG.success(`表头设置已保存`),s(!1)},onCancel:()=>{s(!1),p(``)},okText:`确定`,cancelText:`取消`,width:800,children:(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:20,height:400},children:[(0,Q.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,Q.jsx)(vW,{placeholder:`搜索指标...`,value:f,allowClear:!0,onChange:e=>p(e.target.value),style:{marginBottom:8}}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,marginBottom:12,display:`block`},children:`输入指标名称进行搜索`}),(0,Q.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:[(0,Q.jsx)(`div`,{style:{marginBottom:16},children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:`任务详情指标`})}),(0,Q.jsx)(lz,{checked:u.length===c.length&&c.length>0,indeterminate:u.length>0&&u.length{e.target.checked?d(c.map(e=>e.name)):d([])},style:{marginBottom:12},children:`全选`}),(0,Q.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:8},children:c.filter(e=>e.description.toLowerCase().includes(f.toLowerCase())||e.name.toLowerCase().includes(f.toLowerCase())).map(e=>(0,Q.jsx)(lz,{checked:u.includes(e.name),onChange:t=>{t.target.checked?d(t=>[...t,e.name]):d(t=>t.filter(t=>t!==e.name))},children:e.description},e.name))})]})]}),(0,Q.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,Q.jsxs)(Z.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:[`已添加(`,u.length,`)`]}),(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(YE,{size:`small`,onClick:()=>d([]),disabled:u.length===0,children:`清空`}),(0,Q.jsx)(YE,{size:`small`,onClick:async()=>{try{let e=((await P5()).data||[]).map(e=>({name:q5(e.field),description:e.description}));l(e),d(e.map(e=>e.name)),localStorage.removeItem(`consumeColumns`),BG.success(`表头字段已更新`)}catch{BG.error(`更新表头字段失败`)}},children:`更新表头字段`})]})]}),(0,Q.jsx)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:u.length===0?(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:14,textAlign:`center`,display:`block`,padding:`40px 0`},children:`暂无已选指标`}):(0,Q.jsx)(`div`,{children:u.map((e,t)=>{let n=c.find(t=>t.name===e);return(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`8px 12px`,borderBottom:`1px solid #f0f0f5`,cursor:`move`,userSelect:`none`},draggable:!0,onDragStart:e=>{e.dataTransfer.setData(`index`,String(t))},onDragOver:e=>{e.preventDefault()},onDrop:e=>{let n=parseInt(e.dataTransfer.getData(`index`)),r=t;if(n!==r){let e=[...u],[t]=e.splice(n,1);e.splice(r,0,t),d(e)}},children:[(0,Q.jsx)(Z.Text,{children:n?.description||e}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:t+1})]},e)})})})]})]})})]})},Y5=()=>{let e=Ye(),{login:t}=I5(),[n,r]=(0,S.useState)(!1),i=(()=>{try{let e=localStorage.getItem(`siteInfo`);if(e){let t=JSON.parse(e);return{siteName:t.siteName||`VideoGen.AI`,siteLogo:t.siteLogo||``}}}catch{}return{siteName:`VideoGen.AI`,siteLogo:``}})(),[a,o]=(0,S.useState)(i.siteName),[s,c]=(0,S.useState)(i.siteLogo);return(0,S.useEffect)(()=>{Z8().then(e=>{o(e.siteName),c(e.siteLogo)}).catch(()=>{})},[]),(0,Q.jsxs)(`div`,{style:{minHeight:`100vh`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundImage:`url(/backimage.png)`,backgroundSize:`cover`,backgroundPosition:`center`,backgroundRepeat:`no-repeat`,backgroundAttachment:`fixed`,position:`relative`,overflow:`hidden`},children:[(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(135deg, rgba(240,244,255,0.9) 0%, rgba(232,236,248,0.85) 40%, rgba(240,240,255,0.9) 70%, rgba(248,249,255,0.95) 100%)`}}),(0,Q.jsx)(`div`,{style:{position:`absolute`,width:500,height:500,borderRadius:`50%`,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,top:-150,right:-100,filter:`blur(40px)`}}),(0,Q.jsx)(`div`,{style:{position:`absolute`,width:400,height:400,borderRadius:`50%`,background:`radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%)`,bottom:-100,left:-80,filter:`blur(50px)`}}),(0,Q.jsxs)(LR,{variant:`outlined`,style:{width:440,borderRadius:20,boxShadow:`0 20px 60px rgba(0,0,0,0.08)`,border:`1px solid #e2e8f0`,background:`#fff`,zIndex:1},styles:{body:{padding:`36px 28px`}},children:[(0,Q.jsxs)(`div`,{style:{textAlign:`center`,marginBottom:28},children:[(0,Q.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,margin:`0 auto 16px`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:s?`transparent`:`linear-gradient(135deg, #6366f1, #8b5cf6)`,boxShadow:s?`none`:`0 8px 24px rgba(99,102,241,0.25)`},children:s?(0,Q.jsx)(`img`,{src:s,alt:`logo`,style:{width:`100%`,height:`100%`,borderRadius:14,objectFit:`contain`}}):(0,Q.jsx)(l6,{style:{fontSize:26,color:`#fff`}})}),(0,Q.jsxs)(Z.Title,{level:3,style:{margin:0,color:`#1e293b`,fontWeight:700},children:[a,(0,Q.jsx)(`span`,{style:{color:`#6366f1`},children:`.AI`})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:14,color:`#94a3b8`},children:`管理后台`})]}),(0,Q.jsxs)(X,{onFinish:async n=>{r(!0);try{await t(n.username,n.password,n.rememberMe),BG.success(`登录成功`),e(`/`)}catch(e){let t=e?.message||`登录失败`;BG.error(t)}finally{r(!1)}},layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`username`,rules:[{required:!0,message:`请输入用户名`}],children:(0,Q.jsx)(vW,{placeholder:`用户名`,size:`large`,prefix:(0,Q.jsx)(D6,{style:{color:`#94a3b8`,marginRight:8}}),style:{background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,height:48,borderRadius:10,fontSize:14}})}),(0,Q.jsx)(X.Item,{name:`password`,rules:[{required:!0,message:`请输入密码`}],children:(0,Q.jsx)(vW.Password,{placeholder:`密码`,size:`large`,prefix:(0,Q.jsx)(f4,{style:{color:`#94a3b8`,marginRight:8}}),style:{background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,height:48,borderRadius:10,fontSize:14}})}),(0,Q.jsx)(X.Item,{name:`rememberMe`,valuePropName:`checked`,style:{marginBottom:12},children:(0,Q.jsx)(lz,{children:`记住我的登录状态`})}),(0,Q.jsx)(X.Item,{style:{marginBottom:8},children:(0,Q.jsx)(YE,{type:`primary`,htmlType:`submit`,loading:n,block:!0,size:`large`,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登录管理后台`})})]})]})]})};o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(XE()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_zh_cn=r(n.dayjs)})(e,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`zh-cn`,weekdays:`星期日_星期一_星期二_星期三_星期四_星期五_星期六`.split(`_`),weekdaysShort:`周日_周一_周二_周三_周四_周五_周六`.split(`_`),weekdaysMin:`日_一_二_三_四_五_六`.split(`_`),months:`一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月`.split(`_`),monthsShort:`1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月`.split(`_`),ordinal:function(e,t){return t===`W`?e+`周`:e+`日`},weekStart:1,yearStart:4,formats:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`YYYY/MM/DD`,LL:`YYYY年M月D日`,LLL:`YYYY年M月D日Ah点mm分`,LLLL:`YYYY年M月D日ddddAh点mm分`,l:`YYYY/M/D`,ll:`YYYY年M月D日`,lll:`YYYY年M月D日 HH:mm`,llll:`YYYY年M月D日dddd HH:mm`},relativeTime:{future:`%s内`,past:`%s前`,s:`几秒`,m:`1 分钟`,mm:`%d 分钟`,h:`1 小时`,hh:`%d 小时`,d:`1 天`,dd:`%d 天`,M:`1 个月`,MM:`%d 个月`,y:`1 年`,yy:`%d 年`},meridiem:function(e,t){var n=100*e+t;return n<600?`凌晨`:n<900?`早上`:n<1100?`上午`:n<1300?`中午`:n<1800?`下午`:`晚上`}};return n.default.locale(r,null,!0),r}))}))(),ZE.default.locale(`zh-cn`);var X5=()=>{let[e,t]=(0,S.useState)(null),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)([(0,ZE.default)().startOf(`day`),(0,ZE.default)()]),[o,s]=(0,S.useState)(`数据概览`),c=async()=>{r(!0);try{t(await l8(i[0]?.format(`YYYY-MM-DD`)||void 0,i[1]?.format(`YYYY-MM-DD`)||void 0))}catch{}r(!1)},l=async()=>{try{let e=(await _8()).find(e=>e.key===`site_name`);if(e){let t=`${e.value} 管理后台`;s(t),document.title=t}}catch{s(`数据概览`),document.title=`数据概览`}};(0,S.useEffect)(()=>{c(),l()},[]);let u=()=>{let e=[(0,ZE.default)().startOf(`day`),(0,ZE.default)()];a(e),m(e)},d=()=>{let e=(0,ZE.default)().subtract(1,`day`),t=[e.startOf(`day`),e.endOf(`day`)];a(t),m(t)},f=()=>{let e=[(0,ZE.default)().startOf(`week`),(0,ZE.default)()];a(e),m(e)},p=()=>{let e=[(0,ZE.default)().startOf(`month`),(0,ZE.default)()];a(e),m(e)},m=e=>{let n=e[0]?.format(`YYYY-MM-DD`)||void 0,i=e[1]?.format(`YYYY-MM-DD`)||void 0;r(!0),l8(n,i).then(e=>{t(e),r(!1)}).catch(()=>{r(!1)})},h=e=>{e&&(a([e[0],e[1]]),m([e[0],e[1]]))},g=e?[{title:`用户数量`,value:e.totalUsers,lastPeriodValue:e.lastPeriodUsers,icon:(0,Q.jsx)(D6,{}),gradient:`linear-gradient(135deg, #667eea 0%, #764ba2 100%)`,prefix:``,suffix:`位用户`,description:`平台注册用户总数`},{title:`总项目数`,value:e.totalProjects,lastPeriodValue:e.lastPeriodProjects,icon:(0,Q.jsx)(Z4,{}),gradient:`linear-gradient(135deg, #00d4ff 0%, #0099cc 100%)`,prefix:``,suffix:`个项目`,description:`创建的项目总数`},{title:`项目记录`,value:e.totalRecords,lastPeriodValue:e.lastPeriodRecords,icon:(0,Q.jsx)(YV,{}),gradient:`linear-gradient(135deg, #10b981 0%, #059669 100%)`,prefix:``,suffix:`条记录`,description:`项目记录总数`},{title:`创作记录`,value:e.totalGenerations,lastPeriodValue:e.lastPeriodGenerations,icon:(0,Q.jsx)(J4,{}),gradient:`linear-gradient(135deg, #f59e0b 0%, #d97706 100%)`,prefix:``,suffix:`次创作`,description:`AI创作记录总数`}]:[],_=e?[{title:`支付宝收入`,value:e.todayAlipayRevenue,icon:(0,Q.jsx)(N6,{}),gradient:`linear-gradient(135deg, #22c55e 0%, #16a34a 100%)`,prefix:`¥`,suffix:``,description:`支付宝收款`,tag:`支付宝`},{title:`微信收入`,value:e.todayWechatRevenue,icon:(0,Q.jsx)(f2,{}),gradient:`linear-gradient(135deg, #3b82f6 0%, #2563eb 100%)`,prefix:`¥`,suffix:``,description:`微信收款`,tag:`微信支付`},{title:`总收入`,value:e.totalRevenue,lastPeriodValue:e.lastPeriodRevenue,icon:(0,Q.jsx)(r0,{}),gradient:`linear-gradient(135deg, #ec4899 0%, #be185d 100%)`,prefix:`¥`,suffix:``,description:`平台总收入`,tag:`总收入`},{title:`消耗积分`,value:e.creditsConsumedToday,lastPeriodValue:e.lastPeriodCreditsConsumed,icon:(0,Q.jsx)(f2,{}),gradient:`linear-gradient(135deg, #ef4444 0%, #dc2626 100%)`,prefix:``,suffix:`积分`,description:`用户消耗积分`,tag:`积分消耗`}]:[],v=({title:e,value:t,lastPeriodValue:r,icon:i,gradient:a,prefix:o=``,suffix:s=``,description:c,tag:l})=>{let u=r!==void 0&&r>0?((t-r)/r*100).toFixed(1):null,d=u!==null&&parseFloat(u)>=0;return(0,Q.jsx)(LR,{bordered:!1,loading:n,hoverable:!0,style:{borderRadius:16,border:`1px solid rgba(0,0,0,0.04)`,background:`#ffffff`,boxShadow:`0 4px 20px rgba(0,0,0,0.05)`,transition:`all 0.3s ease`,overflow:`hidden`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16,padding:`16px 0`},children:[(0,Q.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:a,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:24,color:`#fff`,flexShrink:0,boxShadow:`0 8px 24px rgba(0,0,0,0.1)`},children:i}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`,fontSize:13},children:e}),l&&(0,Q.jsx)(`span`,{style:{fontSize:10,padding:`2px 8px`,borderRadius:10,background:`rgba(99,102,241,0.1)`,color:`#6366f1`,fontWeight:500},children:l})]}),(0,Q.jsxs)(`div`,{style:{fontSize:28,fontWeight:800,color:`#1e293b`,letterSpacing:-.5,marginBottom:2},children:[o,typeof t==`number`?t.toLocaleString():t,s]}),c&&(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`,fontSize:11},children:c}),u!==null&&r!==void 0&&(0,Q.jsxs)(`div`,{style:{marginTop:8,paddingTop:8,borderTop:`1px solid #f1f5f9`,display:`flex`,alignItems:`center`,gap:8},children:[(0,Q.jsxs)(Z.Text,{style:{color:`#94a3b8`,fontSize:11},children:[`上一周期: `,o,r.toLocaleString(),s]}),(0,Q.jsxs)(`span`,{style:{fontSize:11,fontWeight:500,color:d?`#10b981`:`#ef4444`,display:`flex`,alignItems:`center`,gap:2},children:[d?`↑`:`↓`,` `,Math.abs(parseFloat(u)),`%`]})]})]})]})})};return(0,Q.jsxs)(`div`,{style:{padding:0},children:[(0,Q.jsxs)(`div`,{style:{background:`linear-gradient(135deg, #667eea 0%, #764ba2 100%)`,padding:`24px 24px 32px`,borderRadius:0,marginBottom:-24,position:`relative`,overflow:`hidden`},children:[(0,Q.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`rgba(255,255,255,0.1)`,borderRadius:`50%`}}),(0,Q.jsx)(`div`,{style:{position:`absolute`,bottom:-30,left:-30,width:150,height:150,background:`rgba(255,255,255,0.08)`,borderRadius:`50%`}}),(0,Q.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,Q.jsx)(Z.Title,{level:2,style:{color:`#fff`,marginBottom:4,fontWeight:700},children:o}),(0,Q.jsx)(Z.Text,{style:{color:`rgba(255,255,255,0.8)`,fontSize:14},children:`欢迎回来,查看平台运营数据统计`})]})]}),(0,Q.jsxs)(`div`,{style:{marginTop:40},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,alignItems:`center`,gap:12,flexWrap:`wrap`,marginBottom:16},children:[(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(YE,{type:!i[0]||!i[1]||i[0]?.isSame((0,ZE.default)().startOf(`day`))&&i[1]?.isSame((0,ZE.default)(),`day`)?`primary`:`default`,size:`small`,onClick:u,children:`今日`}),(0,Q.jsx)(YE,{type:`default`,size:`small`,onClick:d,children:`昨日`}),(0,Q.jsx)(YE,{type:`default`,size:`small`,onClick:f,children:`本周`}),(0,Q.jsx)(YE,{type:`default`,size:`small`,onClick:p,children:`本月`})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,background:`#fff`,border:`1px solid #e2e8f0`,padding:`6px 12px`,borderRadius:8,boxShadow:`0 1px 2px rgba(0,0,0,0.05)`},children:[(0,Q.jsx)(HB,{style:{color:`#64748b`,fontSize:14}}),(0,Q.jsx)(QB.RangePicker,{value:i,onChange:h,placeholder:[`开始日期`,`结束日期`],size:`small`})]})]}),(0,Q.jsxs)(`div`,{style:{marginBottom:16,paddingLeft:4},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#1e293b`,fontSize:15},children:`核心数据`}),(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`,fontSize:12,marginLeft:8},children:`平台基础运营指标`})]}),(0,Q.jsx)(AK,{gutter:[16,16],children:g.map(e=>(0,Q.jsx)(gz,{xs:12,sm:8,lg:6,children:(0,Q.jsx)(v,{...e})},e.title))})]}),(0,Q.jsxs)(`div`,{style:{marginTop:24},children:[(0,Q.jsxs)(`div`,{style:{marginBottom:16,paddingLeft:4},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#1e293b`,fontSize:15},children:`财务统计`}),(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`,fontSize:12,marginLeft:8},children:`收入与消耗数据`})]}),(0,Q.jsx)(AK,{gutter:[16,16],children:_.map(e=>(0,Q.jsx)(gz,{xs:12,sm:8,lg:6,children:(0,Q.jsx)(v,{...e})},e.title))})]})]})};function Z5(e){if(!e)return`-`;let t=e.trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);return n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``),t.replace(`T`,` `).slice(0,16)}var Q5=e=>e instanceof Error?e:Error(typeof e==`string`?e:`上传失败`),$5=e=>{if(e instanceof File)return e;throw Error(`请选择有效图片文件`)},e7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(20),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(null),[v]=X.useForm(),[y]=X.useForm(),b=async(e,n)=>{a(!0);try{let i=await s5({page:e||o,page_size:n||c});t(i.items||[]),r(i.total||0)}catch{BG.error(`加载开户方式列表失败`)}finally{a(!1)}};(0,S.useEffect)(()=>{b()},[]);let x=async()=>{try{let e=await v.validateFields();console.log(e),await l5({open_type:e.open_type,type_name:e.type_name,description:e.description,thumb:e.thumb}),BG.success(`创建成功`),d(!1),v.resetFields(),b()}catch(e){BG.error(e?.message||`创建失败`)}},C=async e=>{try{_(await c5(e)),p(!0)}catch(e){BG.error(e?.message||`获取详情失败`)}},w=async e=>{try{let t=await c5(e);_(t),y.setFieldsValue({open_type:t.open_type,type_name:t.type_name,description:t.description,thumb:t.thumb}),h(!0)}catch(e){BG.error(e?.message||`获取详情失败`)}},T=async()=>{if(g)try{let e=await y.validateFields();await u5(g.id,{open_type:e.open_type,type_name:e.type_name,description:e.description,thumb:e.thumb}),BG.success(`更新成功`),h(!1),y.resetFields(),_(null),b()}catch(e){BG.error(e?.message||`更新失败`)}},E=e=>{UG.confirm({title:`确认删除`,content:`确定要删除这个开户方式吗?`,okText:`删除`,okType:`danger`,cancelText:`取消`,onOk:async()=>{try{await d5(e),BG.success(`删除成功`),b()}catch(e){BG.error(e?.message||`删除失败`)}}})};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(J2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`平台开户方式管理`})]}),(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(YE,{type:`primary`,icon:(0,Q.jsx)(DL,{}),onClick:()=>d(!0),children:`新增`}),(0,Q.jsx)(YE,{icon:(0,Q.jsx)(kK,{}),onClick:()=>b(),children:`刷新`})]})]}),(0,Q.jsx)(CQ,{columns:[{title:`ID`,dataIndex:`id`,width:100,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`开户类型`,dataIndex:`open_type`,width:100,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`类型名称`,dataIndex:`type_name`,width:150,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`描述`,dataIndex:`description`,width:250,ellipsis:!0,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:e})},{title:`缩略图`,dataIndex:`thumb`,width:120,render:e=>e?(0,Q.jsx)(`img`,{src:e,alt:`thumb`,style:{width:80,height:60,objectFit:`cover`}}):`-`},{title:`创建时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})},{title:`更新时间`,dataIndex:`updatedAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})},{title:`操作`,width:200,render:(e,t)=>(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(YE,{icon:(0,Q.jsx)(XU,{}),size:`small`,onClick:()=>C(t.id),children:`详情`}),(0,Q.jsx)(YE,{icon:(0,Q.jsx)(HQ,{}),size:`small`,onClick:()=>w(t.id),children:`更新`}),(0,Q.jsx)(YE,{icon:(0,Q.jsx)(zQ,{}),size:`small`,danger:!0,onClick:()=>E(t.id),children:`删除`})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:c,total:n,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{s(e),l(t),b(e,t)}},scroll:{x:1e3}})]}),(0,Q.jsx)(UG,{title:`新增开户方式`,open:u,onOk:x,onCancel:()=>{d(!1),v.resetFields()},okText:`创建`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:v,layout:`vertical`,children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户方式Id`,style:{flex:1},rules:[{required:!0,message:`请输入开户方式Id`}],children:(0,Q.jsx)(lB,{style:{width:`100%`},min:1,placeholder:`请输入开户方式Id`})}),(0,Q.jsx)(X.Item,{name:`type_name`,label:`类型名称`,style:{flex:1},rules:[{required:!0,message:`请输入类型名称`},{max:100,message:`类型名称不能超过100个字符`}],children:(0,Q.jsx)(vW,{style:{width:`100%`},placeholder:`请输入类型名称`})})]}),(0,Q.jsx)(X.Item,{name:`description`,label:`描述`,rules:[{required:!0,message:`请输入描述`}],children:(0,Q.jsx)(vW.TextArea,{placeholder:`请输入描述`,rows:4})}),(0,Q.jsx)(X.Item,{name:`thumb`,label:`缩略图`,children:(0,Q.jsx)(A1,{listType:`picture-card`,customRequest:async({file:e,onSuccess:t,onError:n})=>{try{let n=await N5($5(e));console.log(n),v.setFieldsValue({thumb:n.url}),t?.(n)}catch(e){n?.(Q5(e))}},children:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(w6,{style:{fontSize:24,color:`#999`}}),(0,Q.jsx)(`div`,{style:{marginTop:8},children:`上传图片`})]})})})]})}),(0,Q.jsx)(UG,{title:`开户方式详情`,open:f,onCancel:()=>{p(!1),_(null)},okText:`关闭`,cancelText:`取消`,width:600,children:g&&(0,Q.jsxs)(`div`,{style:{lineHeight:`2`},children:[(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`ID:`}),` `,g.id]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`开户类型:`}),` `,g.open_type]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`类型名称:`}),` `,g.type_name]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`描述:`}),` `,g.description]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`缩略图:`}),` `,g.thumb?(0,Q.jsx)(`img`,{src:g.thumb,alt:`thumb`,style:{width:120,height:80,objectFit:`cover`}}):`-`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`创建时间:`}),` `,Z5(g.createdAt)]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`更新时间:`}),` `,Z5(g.updatedAt)]})]})}),(0,Q.jsx)(UG,{title:`更新开户方式`,open:m,onOk:T,onCancel:()=>{h(!1),y.resetFields(),_(null)},okText:`更新`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:y,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户类型`,rules:[{required:!0,message:`请输入开户类型`}],children:(0,Q.jsx)(lB,{min:1,placeholder:`请输入开户类型编号`})}),(0,Q.jsx)(X.Item,{name:`type_name`,label:`类型名称`,rules:[{required:!0,message:`请输入类型名称`},{max:100,message:`类型名称不能超过100个字符`}],children:(0,Q.jsx)(vW,{placeholder:`请输入类型名称`})}),(0,Q.jsx)(X.Item,{name:`description`,label:`描述`,rules:[{required:!0,message:`请输入描述`}],children:(0,Q.jsx)(vW.TextArea,{placeholder:`请输入描述`,rows:4})}),(0,Q.jsx)(X.Item,{name:`thumb`,label:`缩略图`,children:(0,Q.jsx)(A1,{listType:`picture-card`,defaultFileList:g?.thumb?[{uid:`1`,name:`thumb`,status:`done`,url:g.thumb}]:[],customRequest:async({file:e,onSuccess:t,onError:n})=>{try{let n=await N5($5(e));y.setFieldsValue({thumb:n.url}),t?.(n)}catch(e){n?.(Q5(e))}},children:!y.getFieldValue(`thumb`)&&(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(w6,{style:{fontSize:24,color:`#999`}}),(0,Q.jsx)(`div`,{style:{marginTop:8},children:`上传图片`})]})})})]})})]})},t7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(`frontend`),[c,l]=(0,S.useState)(``),[u,d]=(0,S.useState)({open:!1,user:null}),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(`frontend`),[g,_]=(0,S.useState)({open:!1,user:null}),[v,y]=(0,S.useState)([]),[b,x]=(0,S.useState)([]),[C,w]=(0,S.useState)({open:!1,user:null}),[T]=X.useForm(),[E]=X.useForm(),[D]=X.useForm(),[O,k]=(0,S.useState)(1),[A,j]=(0,S.useState)(20),[M,N]=(0,S.useState)(0),[P,F]=(0,S.useState)([]),[I]=X.useForm(),[L,R]=(0,S.useState)(!1),z=async()=>{r(!0);try{let e=await u8(O,A,i||void 0,o,o===`frontend`&&c||void 0);t(e.items||[]),N(e.total||0)}catch{}r(!1)};(0,S.useEffect)(()=>{z()},[O,A,i,o,c]),(0,S.useEffect)(()=>{(async()=>{try{let e=(await _8()).filter(e=>e.key.startsWith(`user_`)&&e.key.includes(`credits`));F(e);let t={};e.forEach(e=>{t[e.key]=e.value}),I.setFieldsValue(t)}catch{}})()},[]);let B=async()=>{try{let e=await I.validateFields();R(!0);for(let t of P){let n=e[t.key];n!==void 0&&n!==t.value&&await v8(t.id,n??``)}BG.success(`积分配置已保存`),F((await _8()).filter(e=>e.key.startsWith(`user_`)&&e.key.includes(`credits`))),R(!1)}catch(e){R(!1),BG.error(e?.message||`保存失败`)}},V=(e,t)=>{k(e),j(t)},H=()=>z(),U=async()=>{try{let e=await T.validateFields(),{user:t}=u;if(!t)return;await f8(t.id,e.amount,e.description),BG.success(`已${e.amount>0?`增加`:`扣除`} ${Math.abs(e.amount)} 积分`),d({open:!1,user:null}),T.resetFields(),z()}catch{}},W=async e=>{await p8(e.id,!e.isActive),BG.success(e.isActive?`已禁用该用户`:`已启用该用户`),z()},ee=async()=>{try{let e=await E.validateFields(),t=e.user_type||`frontend`;await q8({username:t===`admin`?e.username:void 0,password:e.password,email:e.email||void 0,phone:t===`frontend`?e.phone:e.phone||void 0,credits:e.credits||0,user_type:t,frontend_user_kind:e.frontend_user_kind||`external`}),BG.success(`用户创建成功`),p(!1),E.resetFields(),h(`frontend`),z()}catch{}},te=async e=>{try{let t=await W8(),n=e.userType===`admin`;y(t.filter(e=>{let t=e.menu_target??e.menuTarget??`frontend`;return n?t===`admin`||t===`both`:t===`frontend`||t===`both`})),x(e.allowedMenus||[]),_({open:!0,user:e})}catch{BG.error(`加载菜单失败`)}},ne=v.filter(e=>(e.menu_type??e.menuType)===`group`),re=v.filter(e=>(e.menu_type??e.menuType)!==`group`),ie={};re.filter(e=>e.parent_id??e.parentId).forEach(e=>{let t=e.parent_id??e.parentId;ie[t]||(ie[t]=[]),ie[t].push(e)});let ae=re.filter(e=>!(e.parent_id??e.parentId)),G=async()=>{let{user:e}=g;if(e)try{await J8(e.id,b.length>0?b:null),BG.success(`菜单权限已更新`),_({open:!1,user:null}),z()}catch(e){BG.error(e?.message||`保存失败`)}},oe=async()=>{try{let e=await D.validateFields(),{user:t}=C;if(!t)return;await Y8(t.id,e.newPassword),BG.success(`已重置 ${t.username} 的密码`),w({open:!1,user:null}),D.resetFields()}catch{}},K=async(e,t)=>{try{await d8(e.id,t),BG.success(t===`internal`?`已设为前台内部用户`:`已设为前台外部用户`),z()}catch(e){BG.error(e?.message||`设置失败`)}},se=o===`admin`,ce=[{title:`用户`,key:`user`,width:200,render:(e,t)=>(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:t.isAdmin?`linear-gradient(135deg, #f59e0b, #f97316)`:`linear-gradient(135deg, #6366f1, #8b5cf6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:13,fontWeight:700},children:t.username.charAt(0).toUpperCase()}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{fontWeight:600},children:[t.username,t.isAdmin&&(0,Q.jsx)(IQ,{color:`orange`,style:{marginLeft:6,fontSize:10},children:`管理员`})]}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.email})]})]})},...se?[]:[{title:`积分余额`,dataIndex:`credits`,width:120,sorter:(e,t)=>e.credits-t.credits,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,style:{color:e>0?`#10b981`:`#ef4444`,fontSize:15},children:e.toLocaleString()})}],{title:`手机号`,dataIndex:`phone`,width:130,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,children:e||`-`})},...se?[]:[{title:`前台归类`,dataIndex:`frontendUserKind`,width:110,render:e=>(0,Q.jsx)(IQ,{color:e===`internal`?`geekblue`:`default`,children:e===`internal`?`内部用户`:`外部用户`})}],{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(IQ,{color:e?`green`:`red`,children:e?`正常`:`禁用`})},{title:`注册时间`,dataIndex:`createdAt`,width:120,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})},{title:`最后登录`,dataIndex:`lastLoginAt`,width:140,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})},{title:`操作`,key:`action`,width:320,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(WV,{size:4,children:[!se&&(0,Q.jsx)(YE,{type:`link`,size:`small`,icon:(0,Q.jsx)(N6,{}),onClick:()=>{d({open:!0,user:t}),T.resetFields()},children:`调整积分`}),!se&&t.frontendUserKind!==`internal`&&(0,Q.jsx)(YE,{type:`link`,size:`small`,onClick:()=>K(t,`internal`),children:`设为内部`}),!se&&t.frontendUserKind===`internal`&&(0,Q.jsx)(YE,{type:`link`,size:`small`,onClick:()=>K(t,`external`),children:`取消内部`}),(0,Q.jsx)(YE,{type:`link`,size:`small`,icon:(0,Q.jsx)(w4,{}),onClick:()=>te(t),children:`菜单权限`}),(0,Q.jsx)(YE,{type:`link`,size:`small`,icon:(0,Q.jsx)(f4,{}),onClick:()=>{w({open:!0,user:t}),D.resetFields()},children:`重置密码`}),(0,Q.jsx)(qG,{title:t.isActive?`确定禁用该用户?`:`确定启用该用户?`,onConfirm:()=>W(t),children:(0,Q.jsx)(YE,{type:`link`,size:`small`,danger:t.isActive,icon:t.isActive?(0,Q.jsx)(e6,{}):(0,Q.jsx)(I0,{}),children:t.isActive?`禁用`:`启用`})})]})}];return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:20},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:`#6366f1`},children:(0,Q.jsx)(D3,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:4,style:{margin:0},children:`积分配置`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`设置用户注册和登录赠送的积分`})]})]}),(0,Q.jsxs)(X,{form:I,layout:`vertical`,children:[(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr 1fr`,gap:20},children:[(0,Q.jsx)(X.Item,{name:`user_register_credits`,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:`注册赠送积分`}),extra:`用户注册时赠送的初始积分`,children:(0,Q.jsx)(lB,{min:0,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`user_login_credits`,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:`每日登录赠送积分`}),extra:`用户每日首次登录赠送的积分`,children:(0,Q.jsx)(lB,{min:0,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`user_login_credits_enabled`,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:`启用每日登录积分`}),extra:`是否开启每日登录赠送积分功能`,children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(Fq,{defaultChecked:P.find(e=>e.key===`user_login_credits_enabled`)?.value===`true`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:13},children:P.find(e=>e.key===`user_login_credits_enabled`)?.value===`true`?`已启用`:`已禁用`})]})})]}),(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:16},children:(0,Q.jsx)(YE,{type:`primary`,icon:(0,Q.jsx)(v3,{}),onClick:B,loading:L,size:`large`,style:{borderRadius:8},children:`保存配置`})})]})]}),(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,Q.jsx)(vW,{placeholder:`搜索用户名或手机号`,prefix:(0,Q.jsx)(FC,{style:{color:`#94a3b8`}}),value:i,onChange:e=>a(e.target.value),onPressEnter:H,style:{width:280,borderRadius:8},allowClear:!0}),!se&&(0,Q.jsx)(BC,{value:c,onChange:e=>{k(1),l(e)},style:{width:140},options:[{value:``,label:`全部前台用户`},{value:`internal`,label:`内部用户`},{value:`external`,label:`外部用户`}]}),(0,Q.jsx)(YE,{type:`primary`,onClick:H,style:{borderRadius:8},children:`搜索`})]}),(0,Q.jsx)(YE,{type:`primary`,icon:(0,Q.jsx)(DL,{}),onClick:()=>{h(o),E.setFieldsValue({user_type:o}),p(!0)},style:{borderRadius:8},children:`创建用户`})]}),(0,Q.jsx)(CR,{activeKey:o,onChange:e=>{s(e),l(``),k(1)},items:[{key:`frontend`,label:`前台用户`},{key:`admin`,label:`后台用户`}]}),(0,Q.jsx)(CQ,{columns:ce,dataSource:e,rowKey:`id`,loading:n,pagination:{current:O,pageSize:A,total:M,onChange:V,showSizeChanger:!0,showTotal:e=>`共 ${e} 个用户`},scroll:{x:1e3}})]}),(0,Q.jsxs)(UG,{title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(N6,{}),`调整积分 - `,u.user?.username]}),open:u.open,onOk:U,onCancel:()=>{d({open:!1,user:null}),T.resetFields()},okText:`确认`,cancelText:`取消`,width:440,children:[(0,Q.jsxs)(`div`,{style:{marginBottom:16,padding:`12px 16px`,background:`#f8fafc`,borderRadius:8},children:[(0,Q.jsx)(`span`,{style:{color:`#64748b`},children:`当前积分:`}),(0,Q.jsx)(`span`,{style:{fontWeight:800,fontSize:18,color:`#6366f1`},children:u.user?.credits.toLocaleString()})]}),(0,Q.jsxs)(X,{form:T,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`amount`,label:`积分变动`,rules:[{required:!0,message:`请输入积分数量`}],children:(0,Q.jsx)(lB,{style:{width:`100%`},size:`large`,placeholder:`正数增加,负数扣除`,formatter:e=>`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,`,`)})}),(0,Q.jsx)(X.Item,{name:`description`,label:`原因`,rules:[{required:!0,message:`请输入调整原因`}],children:(0,Q.jsx)(vW.TextArea,{rows:2,placeholder:`请输入调整原因`,size:`large`})})]})]}),(0,Q.jsx)(UG,{title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(D6,{}),`创建用户`]}),open:f,onOk:ee,onCancel:()=>{p(!1),E.resetFields(),h(`frontend`)},okText:`创建`,cancelText:`取消`,width:480,children:(0,Q.jsxs)(X,{form:E,layout:`vertical`,style:{marginTop:16},onValuesChange:e=>{e.user_type&&h(e.user_type)},children:[(0,Q.jsx)(X.Item,{name:`user_type`,label:`用户类型`,initialValue:`frontend`,rules:[{required:!0}],children:(0,Q.jsx)(BC,{size:`large`,options:[{value:`frontend`,label:`前端用户`},{value:`admin`,label:`后台管理员`}]})}),m===`frontend`&&(0,Q.jsx)(X.Item,{name:`frontend_user_kind`,label:`前台归类`,initialValue:`external`,children:(0,Q.jsx)(BC,{size:`large`,options:[{value:`external`,label:`外部用户`},{value:`internal`,label:`内部用户`}]})}),m===`frontend`?(0,Q.jsx)(X.Item,{name:`phone`,label:`手机号`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,Q.jsx)(vW,{placeholder:`请输入手机号`,maxLength:11,size:`large`})}):(0,Q.jsx)(X.Item,{name:`username`,label:`用户名`,rules:[{required:!0,message:`请输入用户名`}],children:(0,Q.jsx)(vW,{placeholder:`请输入用户名`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`password`,label:`密码`,rules:[{required:!0,min:6,message:`密码至少6位`}],children:(0,Q.jsx)(vW.Password,{placeholder:`请输入密码(至少6位)`,size:`large`})}),m===`frontend`&&(0,Q.jsx)(X.Item,{name:`credits`,label:`初始积分`,initialValue:0,children:(0,Q.jsx)(lB,{min:0,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`email`,label:`邮箱`,children:(0,Q.jsx)(vW,{placeholder:`选填`,size:`large`})})]})}),(0,Q.jsxs)(UG,{title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(w4,{}),`菜单权限 - `,g.user?.username,` (`,g.user?.userType===`admin`?`后台菜单`:`前台菜单`,`)`]}),open:g.open,onOk:G,onCancel:()=>{_({open:!1,user:null})},okText:`保存`,cancelText:`取消`,width:520,children:[(0,Q.jsx)(`div`,{style:{marginBottom:12},children:(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:13},children:`勾选该用户可访问的菜单,不勾选则显示全部菜单`})}),(0,Q.jsx)(`div`,{style:{padding:`12px 16px`,background:`#f8fafc`,borderRadius:8,maxHeight:400,overflow:`auto`},children:(0,Q.jsx)(lz.Group,{value:b,onChange:e=>x(e),children:(0,Q.jsxs)(WV,{direction:`vertical`,size:8,style:{width:`100%`},children:[ae.map(e=>(0,Q.jsxs)(lz,{value:e.path,style:{width:`100%`},children:[e.label,(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,marginLeft:8},children:e.path})]},e.path)),ne.map(e=>{let t=ie[e.id]||[];return t.length===0?null:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{fontWeight:600,fontSize:13,color:`#6366f1`,marginBottom:4,marginTop:4},children:e.label}),(0,Q.jsx)(WV,{direction:`vertical`,size:4,style:{paddingLeft:12,width:`100%`},children:t.map(e=>(0,Q.jsxs)(lz,{value:e.path,style:{width:`100%`},children:[e.label,(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,marginLeft:8},children:e.path})]},e.path))})]},e.id)})]})})})]}),(0,Q.jsx)(UG,{title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(f4,{}),`重置密码 - `,C.user?.username]}),open:C.open,onOk:oe,onCancel:()=>{w({open:!1,user:null}),D.resetFields()},okText:`确认重置`,cancelText:`取消`,width:420,children:(0,Q.jsx)(X,{form:D,layout:`vertical`,style:{marginTop:16},children:(0,Q.jsx)(X.Item,{name:`newPassword`,label:`新密码`,rules:[{required:!0,min:6,message:`密码至少6位`}],children:(0,Q.jsx)(vW.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`})})})})]})},n7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)({open:!1,model:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t(await m8())}catch{}r(!1)};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={name:e.name,provider:e.provider,model_name:e.modelName,api_base:e.apiBase,api_key:e.apiKey,weight:e.weight,max_tokens:e.maxTokens,temperature:e.temperature,is_active:e.isActive??!0,priority:e.priority??0};i.model?.id?await h8({id:i.model.id,...t}):await h8(t),BG.success(i.model?.id?`模型配置已更新`:`模型配置已添加`),a({open:!1,model:null}),o.resetFields(),s()}catch(e){if(e?.errorFields)return;BG.error(e?.message||`保存失败`)}},l=async e=>{try{await g8(e),BG.success(`模型配置已删除`),s()}catch(e){BG.error(e?.message||`删除失败`)}},u=e=>{a({open:!0,model:e||null}),e?o.setFieldsValue(e):(o.resetFields(),o.setFieldsValue({provider:`sdk`,weight:1,maxTokens:4096,temperature:.7,isActive:!0,priority:0}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(Z.Text,{type:`secondary`,children:[`共 `,e.length,` 个模型配置,按权重进行加权随机调度`]}),(0,Q.jsx)(YE,{type:`primary`,icon:(0,Q.jsx)(DL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加模型`})]}),(0,Q.jsx)(CQ,{columns:[{title:`模型名称`,dataIndex:`name`,width:150,render:(e,t)=>(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:t.isActive?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`linear-gradient(135deg, #94a3b8, #cbd5e1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:14},children:(0,Q.jsx)(o3,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{fontWeight:600},children:e}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.modelName})]})]})},{title:`提供商`,dataIndex:`provider`,width:140,render:e=>(0,Q.jsx)(IQ,{color:e===`mock`?`default`:`blue`,children:{sdk:`SDK模式`,openai_compatible:`OpenAI兼容`,mock:`Mock模式`}[e]||e})},{title:`API地址`,dataIndex:`apiBase`,width:200,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},ellipsis:!0,children:e||`-`})},{title:`权重`,dataIndex:`weight`,width:80,sorter:(e,t)=>e.weight-t.weight},{title:`Max Tokens`,dataIndex:`maxTokens`,width:100},{title:`Temperature`,dataIndex:`temperature`,width:100,render:e=>e.toFixed(1)},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(IQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(WV,{size:4,children:[(0,Q.jsx)(YE,{type:`link`,size:`small`,icon:(0,Q.jsx)(HQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(qG,{title:`确定删除该模型配置?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(YE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(zQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(UG,{title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(o3,{}),i.model?.id?`编辑模型`:`添加模型`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,model:null}),o.resetFields()},okText:`确认`,cancelText:`取消`,width:560,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`name`,label:`显示名称`,rules:[{required:!0,message:`请输入模型名称`}],children:(0,Q.jsx)(vW,{placeholder:`例如:GPT-4o`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`provider`,label:`提供商`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(BC,{size:`large`,options:[{value:`sdk`,label:`SDK模式`},{value:`openai_compatible`,label:`OpenAI兼容`},{value:`mock`,label:`Mock模式`}]})}),(0,Q.jsx)(X.Item,{name:`modelName`,label:`模型标识`,style:{flex:1},rules:[{required:!0,message:`请输入模型标识`}],children:(0,Q.jsx)(vW,{placeholder:`例如:gpt-4o`,size:`large`})})]}),(0,Q.jsx)(X.Item,{name:`apiBase`,label:`API地址`,children:(0,Q.jsx)(vW,{placeholder:`https://api.openai.com/v1`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`apiKey`,label:`API Key`,children:(0,Q.jsx)(vW.Password,{placeholder:`sk-****`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`weight`,label:`权重`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(lB,{min:0,max:10,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`maxTokens`,label:`Max Tokens`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(lB,{min:256,max:128e3,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`temperature`,label:`Temperature`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(lB,{min:0,max:2,step:.1,style:{width:`100%`},size:`large`})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`priority`,label:`优先级`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(lB,{min:0,max:10,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用`,valuePropName:`checked`,style:{flex:1,paddingTop:30},children:(0,Q.jsx)(Fq,{})})]})]})})]})},r7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(``),[c]=X.useForm(),[l,u]=(0,S.useState)(``);(0,S.useEffect)(()=>{d()},[]);let d=async()=>{r(!0);let e=await _8();t(e);let n={};e.forEach(e=>{n[e.key]=e.value}),c.setFieldsValue(n),r(!1)},f=async()=>{try{let n=await c.validateFields();a(!0);for(let t of e){let e=n[t.key];e!==void 0&&e!==t.value&&await v8(t.id,e??``)}BG.success(`系统配置已保存`),t(await _8()),a(!1)}catch(e){a(!1),BG.error(e?.message||`保存失败`)}},p=async(e,n)=>{s(n);try{let r=await y8(e,n);t(e=>e.map(e=>e.key===n?{...e,value:r.url}:e)),c.setFieldsValue({[n]:r.url}),BG.success(`PDF上传成功`)}catch{BG.error(`上传失败`)}finally{s(``)}return!1},m=async e=>{s(`site_logo`);try{let n=await b8(e);t(e=>e.map(e=>e.key===`site_logo`?{...e,value:n.url}:e)),c.setFieldsValue({site_logo:n.url}),u(n.url),BG.success(`Logo上传成功`)}catch{BG.error(`上传失败`)}finally{s(``)}return!1},h={站点信息:e.filter(e=>e.key.startsWith(`site_`)),协议配置:e.filter(e=>e.key===`user_agreement_url`||e.key===`privacy_policy_url`),"SEO 设置":e.filter(e=>e.key.startsWith(`seo_`)),用户积分配置:e.filter(e=>e.key.startsWith(`user_`)&&e.key.includes(`credits`))},g=e=>({site_name:`平台显示名称,将展示在页面标题和导航栏`,site_logo:`平台Logo图片URL,建议尺寸 200x40px`,user_agreement_url:`用户注册/登录时需同意的用户协议PDF文件`,privacy_policy_url:`用户注册/登录时需同意的隐私政策PDF文件`,seo_title:`搜索引擎结果中显示的标题`,seo_description:`搜索引擎结果中显示的描述文字,建议150字以内`,seo_keywords:`用逗号分隔的关键词列表`,user_register_credits:`用户注册时赠送的初始积分,默认100`,user_login_credits:`用户每日登录赠送的积分数量`,user_login_credits_enabled:`是否启用每日登录赠送积分功能`})[e.key]||e.description||``,_=e=>e.key===`site_logo`?(0,Q.jsx)(v,{config:e}):e.key===`seo_description`?(0,Q.jsx)(vW.TextArea,{rows:3,placeholder:e.description,size:`large`}):e.key===`seo_keywords`?(0,Q.jsx)(vW,{placeholder:`关键词1, 关键词2, 关键词3`,size:`large`}):e.key===`user_login_credits_enabled`?(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(Fq,{defaultChecked:e.value===`true`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:13},children:e.value===`true`?`已启用`:`已禁用`})]}):e.key===`user_register_credits`||e.key===`user_login_credits`?(0,Q.jsx)(vW,{type:`number`,min:0,placeholder:e.description,size:`large`}):(0,Q.jsx)(vW,{placeholder:e.description,size:`large`}),v=({config:e})=>{let n=e.value&&e.value.startsWith(`/uploads/`),r=n?`http://ceshi.apiforeign.minzhong.cn${e.value}`:``;return(0,Q.jsxs)(`div`,{style:{padding:`16px`,borderRadius:10,border:`1px solid #f0f0f5`,background:`#fafbfc`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(w6,{style:{color:`#6366f1`,fontSize:18}}),(0,Q.jsx)(Z.Text,{strong:!0,children:`网站Logo`})]}),(0,Q.jsxs)(WV,{children:[n&&(0,Q.jsx)(YE,{size:`small`,danger:!0,onClick:()=>{t(e=>e.map(e=>e.key===`site_logo`?{...e,value:``}:e)),c.setFieldsValue({site_logo:``}),BG.success(`Logo已移除`)},children:`移除`}),(0,Q.jsx)(A1,{accept:`image/*`,showUploadList:!1,beforeUpload:m,children:(0,Q.jsx)(YE,{size:`small`,type:`primary`,icon:(0,Q.jsx)(w6,{}),loading:o===`site_logo`,children:n?`重新上传`:`上传Logo`})})]})]}),n?(0,Q.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,Q.jsx)(`img`,{src:r,alt:`Logo预览`,style:{maxWidth:200,maxHeight:80,objectFit:`contain`,border:`1px solid #e2e8f0`,borderRadius:8,padding:8}}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,display:`block`,marginTop:8},children:`建议尺寸:200x40px,支持 PNG、JPG 格式`})]}):(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:`尚未上传Logo,将使用系统默认Logo`})]})},y=({config:e})=>{let t=e.key===`user_agreement_url`?`用户协议`:`隐私政策`,n=e.value&&e.value.startsWith(`/uploads/`);return(0,Q.jsxs)(`div`,{style:{padding:`16px`,borderRadius:10,border:`1px solid #f0f0f5`,background:`#fafbfc`,marginBottom:12},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(w2,{style:{color:`#ef4444`,fontSize:18}}),(0,Q.jsx)(Z.Text,{strong:!0,children:t})]}),(0,Q.jsxs)(WV,{children:[n&&(0,Q.jsx)(YE,{size:`small`,icon:(0,Q.jsx)(XU,{}),onClick:()=>window.open(`http://localhost:8000${e.value}`,`_blank`),children:`预览`}),(0,Q.jsx)(A1,{accept:`.pdf`,showUploadList:!1,beforeUpload:t=>p(t,e.key),children:(0,Q.jsx)(YE,{size:`small`,type:`primary`,icon:(0,Q.jsx)(w6,{}),loading:o===e.key,children:n?`重新上传`:`上传PDF`})})]})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:n?`已上传: ${e.value}`:`尚未上传,前台将不显示对应链接`})]})};return n?(0,Q.jsx)(LR,{loading:!0,variant:`outlined`,style:{borderRadius:12}}):(0,Q.jsxs)(`div`,{style:{maxWidth:720},children:[(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:24},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:`#6366f1`},children:(0,Q.jsx)(D3,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:4,style:{margin:0},children:`系统设置`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`管理站点基础信息、协议文件和SEO配置`})]})]}),(0,Q.jsx)(X,{form:c,layout:`vertical`,children:Object.entries(h).map(([e,t])=>(0,Q.jsxs)(`div`,{style:{marginBottom:24},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14,display:`block`,marginBottom:12,paddingBottom:8,borderBottom:`1px solid #f0f0f5`},children:e}),e===`协议配置`?t.map(e=>(0,Q.jsx)(y,{config:e},e.id)):t.map(e=>(0,Q.jsx)(X.Item,{name:e.key,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:e.description}),extra:g(e),children:_(e)},e.id))]},e))})]}),(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`},children:(0,Q.jsx)(YE,{type:`primary`,icon:(0,Q.jsx)(v3,{}),onClick:f,loading:i,size:`large`,style:{borderRadius:8,minWidth:140},children:`保存配置`})})]})},i7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(!1),[c]=X.useForm(),[l,u]=(0,S.useState)({open:!1,notifId:``,title:``}),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(1),[_,v]=(0,S.useState)(10),[y,b]=(0,S.useState)(0),x=async()=>{r(!0);try{let e=await B8(h,_),n=(await u8(1,1e3)).items||[],r={};n.forEach(e=>{r[e.id]=e.username}),t((e.items||[]).map(e=>({id:e.id,title:e.title,content:e.content,type:e.type,targetUserId:e.userId||null,target:e.userId?r[e.userId]||e.userId:`全部用户`,createdAt:e.createdAt}))),b(e.total||0),a(n.map(e=>({id:e.id,username:e.username})))}catch{BG.error(`加载通知列表失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{x()},[h,_]);let C=(e,t)=>{g(e),v(t)},w=async()=>{try{let e=await c.validateFields();await V8({title:e.title,content:e.content,type:e.type||`system`,target_user_id:e.target_user_id||void 0}),BG.success(`消息已发送`),s(!1),c.resetFields(),x()}catch{}},T=async e=>{try{await H8(e),BG.success(`已删除`),x()}catch(e){BG.error(e?.message||`删除失败`)}},E=async(e,t)=>{u({open:!0,notifId:e,title:t}),m(!0);try{f((await U8(e)).items||[])}catch{BG.error(`加载已读列表失败`)}finally{m(!1)}},D=e=>{switch(e){case`system`:return`blue`;case`credit`:return`orange`;case`promo`:return`purple`;default:return`default`}};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(h0,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`消息推送管理`}),(0,Q.jsxs)(IQ,{color:`purple`,children:[`共 `,y,` 条消息`]})]}),(0,Q.jsx)(YE,{type:`primary`,icon:(0,Q.jsx)(DL,{}),onClick:()=>s(!0),style:{borderRadius:8},children:`发送新消息`})]}),(0,Q.jsx)(CQ,{columns:[{title:`标题`,dataIndex:`title`,width:200,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`内容`,dataIndex:`content`,ellipsis:!0},{title:`类型`,dataIndex:`type`,width:80,render:e=>(0,Q.jsx)(IQ,{color:D(e),children:{system:`系统`,credit:`积分`,promo:`活动`}[e]||e})},{title:`发送目标`,dataIndex:`target`,width:120,render:e=>(0,Q.jsx)(IQ,{color:e===`全部用户`?`green`:`blue`,children:e})},{title:`发送时间`,dataIndex:`createdAt`,width:160,render:e=>Z5(e)},{title:`操作`,key:`action`,width:180,render:(e,t)=>(0,Q.jsxs)(WV,{size:4,children:[(0,Q.jsx)(YE,{type:`link`,size:`small`,icon:(0,Q.jsx)(XU,{}),onClick:()=>E(t.id,t.title),children:`已读`}),(0,Q.jsx)(qG,{title:`确定删除该消息?`,onConfirm:()=>T(t.id),children:(0,Q.jsx)(YE,{type:`link`,danger:!0,size:`small`,icon:(0,Q.jsx)(zQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:{current:h,pageSize:_,total:y,onChange:C,showSizeChanger:!0,showTotal:e=>`共 ${e} 条消息`},scroll:{x:900}})]}),(0,Q.jsx)(UG,{title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(w3,{}),`发送消息`]}),open:o,onOk:w,onCancel:()=>{s(!1),c.resetFields()},okText:`发送`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`title`,label:`消息标题`,rules:[{required:!0,message:`请输入标题`}],children:(0,Q.jsx)(vW,{placeholder:`请输入消息标题`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`content`,label:`消息内容`,rules:[{required:!0,message:`请输入内容`}],children:(0,Q.jsx)(vW.TextArea,{rows:4,placeholder:`请输入消息内容`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`type`,label:`消息类型`,style:{flex:1},initialValue:`system`,rules:[{required:!0}],children:(0,Q.jsx)(BC,{size:`large`,options:[{value:`system`,label:`系统通知`},{value:`credit`,label:`积分通知`},{value:`promo`,label:`活动通知`}]})}),(0,Q.jsx)(X.Item,{name:`target_user_id`,label:`发送目标`,style:{flex:1},extra:`留空则发送给全部用户`,children:(0,Q.jsx)(BC,{size:`large`,allowClear:!0,placeholder:`全部用户`,options:i.map(e=>({value:e.id,label:e.username}))})})]})]})}),(0,Q.jsx)(UG,{title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(o6,{}),`已读用户 — `,l.title]}),open:l.open,onCancel:()=>{u({open:!1,notifId:``,title:``}),f([])},footer:null,width:480,children:p?(0,Q.jsx)(`div`,{style:{textAlign:`center`,padding:40},children:`加载中...`}):d.length===0?(0,Q.jsx)(hC,{description:`暂无用户已读`,style:{padding:`40px 0`}}):(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{marginBottom:12,color:`#64748b`,fontSize:13},children:[`共 `,d.length,` 人已读`]}),(0,Q.jsx)(CQ,{dataSource:d,rowKey:`userId`,pagination:!1,size:`small`,columns:[{title:`用户名`,dataIndex:`username`,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`已读时间`,dataIndex:`readAt`,width:180,render:e=>Z5(e)}]})]})})]})},a7=o(((e,t)=>{var n={version:`1.15.0`};n[437]=(function(){for(var e=`\0\x07\b + `]:{zIndex:10,width:r,margin:`0 ${Y(e.marginXXS)}`,fontSize:r,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,color:i,"&:hover":{color:i},svg:{verticalAlign:`baseline`}}},[`${s}-thumbnail, ${s}-thumbnail img`]:{position:`static`,display:`block`,width:`100%`,height:`100%`,objectFit:`contain`},[`${s}-name`]:{display:`none`,textAlign:`center`},[`${s}-file + ${s}-name`]:{position:`absolute`,bottom:e.margin,display:`block`,width:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`},[`${s}-uploading`]:{[`&${s}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:`none`}},[`${s}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}},[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:`50%`}}}},Q$=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:`rtl`}}},$$=e=>{let{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:{...Jc(e),[t]:{outline:0,"input[type='file']":{cursor:`pointer`}},[`${t}-select`]:{display:`inline-block`},[`${t}-hidden`]:{display:`none`},[`${t}-disabled`]:{color:n,cursor:`not-allowed`}}}},e1=rl(`Upload`,e=>{let{fontSizeHeading3:t,marginXS:n,lineWidth:r,pictureCardSize:i,calc:a}=e,o=gs(e,{uploadThumbnailSize:a(t).mul(2).equal(),uploadProgressOffset:a(a(n).div(2)).add(r).equal(),uploadPicCardSize:i});return[$$(o),q$(o),X$(o),Z$(o),J$(o),Y$(o),Q$(o),bh(o)]},e=>({actionsColor:e.colorIcon,pictureCardSize:e.controlHeightLG*2.55})),t1={icon:function(e,t){return{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M534 352V136H232v752h560V394H576a42 42 0 01-42-42z`,fill:t}},{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z`,fill:e}}]}},name:`file`,theme:`twotone`};function n1(){return n1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n1({},e,{ref:t,icon:t1}))),i1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z`}}]},name:`paper-clip`,theme:`outlined`};function a1(){return a1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a1({},e,{ref:t,icon:i1}))),s1={icon:function(e,t){return{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z`,fill:e}},{tag:`path`,attrs:{d:`M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z`,fill:t}},{tag:`path`,attrs:{d:`M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z`,fill:t}},{tag:`path`,attrs:{d:`M276 368a28 28 0 1056 0 28 28 0 10-56 0z`,fill:t}},{tag:`path`,attrs:{d:`M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`,fill:e}}]}},name:`picture`,theme:`twotone`};function c1(){return c1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c1({},e,{ref:t,icon:s1})));function u1(e){return{...e,lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e}}function d1(e,t){let n=Zr(t),r=n.findIndex(({uid:t})=>t===e.uid);return r===-1?n.push(e):n[r]=e,n}function f1(e,t){let n=e.uid===void 0?`name`:`uid`;return t.filter(t=>t[n]===e[n])[0]}function p1(e,t){let n=e.uid===void 0?`name`:`uid`,r=t.filter(t=>t[n]!==e[n]);return r.length===t.length?null:r}var m1=(e=``)=>{let t=e.split(`/`),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[``])[0]},h1=e=>e.indexOf(`image/`)===0,g1=e=>{if(e.type&&!e.thumbUrl)return h1(e.type);let t=e.thumbUrl||e.url||``,n=m1(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n)?!0:!(/^data:/.test(t)||n)},_1=200;function v1(e){return new Promise(t=>{if(!e.type||!h1(e.type)){t(``);return}let n=document.createElement(`canvas`);n.width=_1,n.height=_1,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${_1}px; height: ${_1}px; z-index: 9999; display: none;`,document.body.appendChild(n);let r=n.getContext(`2d`),i=new Image;if(i.onload=()=>{let{width:e,height:a}=i,o=_1,s=_1,c=0,l=0;e>a?(s=_1/e*a,l=-(s-o)/2):(o=_1/a*e,c=-(o-s)/2),r.drawImage(i,c,l,o,s);let u=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(i.src),t(u)},i.crossOrigin=`anonymous`,e.type.startsWith(`image/svg+xml`)){let t=new FileReader;t.onload=()=>{t.result&&typeof t.result==`string`&&(i.src=t.result)},t.readAsDataURL(e)}else if(e.type.startsWith(`image/gif`)){let n=new FileReader;n.onload=()=>{n.result&&t(n.result)},n.readAsDataURL(e)}else i.src=window.URL.createObjectURL(e)})}var y1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`download`,theme:`outlined`};function b1(){return b1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b1({},e,{ref:t,icon:y1}))),S1=S.forwardRef(({prefixCls:e,className:t,style:n,classNames:r,styles:i,locale:a,listType:o,file:s,items:c,progress:l,iconRender:u,actionIconRender:d,itemRender:f,isImgUrl:p,showPreviewIcon:m,showRemoveIcon:h,showDownloadIcon:g,previewIcon:_,removeIcon:v,downloadIcon:y,extra:b,onPreview:x,onDownload:C,onClose:w},T)=>{let{status:E}=s,[D,O]=S.useState(E);S.useEffect(()=>{E!==`removed`&&O(E)},[E]);let[k,A]=S.useState(!1);S.useEffect(()=>{let e=setTimeout(()=>{A(!0)},300);return()=>{clearTimeout(e)}},[]);let j=u(s),M=S.createElement(`div`,{className:`${e}-icon`},j);if(o===`picture`||o===`picture-card`||o===`picture-circle`)if(D===`uploading`||!s.thumbUrl&&!s.url){let t=J(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:D!==`uploading`});M=S.createElement(`div`,{className:t},j)}else{let t=p?.(s)?S.createElement(`img`,{src:s.thumbUrl||s.url,alt:s.name,className:`${e}-list-item-image`,crossOrigin:s.crossOrigin}):j,n=J(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:p&&!p(s)});M=S.createElement(`a`,{className:n,onClick:e=>x(s,e),href:s.url||s.thumbUrl,target:`_blank`,rel:`noopener noreferrer`},t)}let N=J(`${e}-list-item`,`${e}-list-item-${D}`,r?.item),P=typeof s.linkProps==`string`?JSON.parse(s.linkProps):s.linkProps,F=(typeof h==`function`?h(s):h)?d((typeof v==`function`?v(s):v)||S.createElement(IQ,null),()=>w(s),e,a.removeFile,!0):null,I=(typeof g==`function`?g(s):g)&&D===`done`?d((typeof y==`function`?y(s):y)||S.createElement(x1,null),()=>C(s),e,a.downloadFile):null,L=o!==`picture-card`&&o!==`picture-circle`&&S.createElement(`span`,{key:`download-delete`,className:J(`${e}-list-item-actions`,{picture:o===`picture`})},I,F),R=typeof b==`function`?b(s):b,z=R&&S.createElement(`span`,{className:`${e}-list-item-extra`},R),B=J(`${e}-list-item-name`),V=s.url?S.createElement(`a`,{key:`view`,target:`_blank`,rel:`noopener noreferrer`,className:B,title:s.name,...P,href:s.url,onClick:e=>x(s,e)},s.name,z):S.createElement(`span`,{key:`view`,className:B,onClick:e=>x(s,e),title:s.name},s.name,z),H=(typeof m==`function`?m(s):m)&&(s.url||s.thumbUrl)?S.createElement(`a`,{href:s.url||s.thumbUrl,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>x(s,e),title:a.previewFile},typeof _==`function`?_(s):_||S.createElement(qU,null)):null,U=(o===`picture-card`||o===`picture-circle`)&&D!==`uploading`&&S.createElement(`span`,{className:`${e}-list-item-actions`},H,D===`done`&&I,F),{getPrefixCls:W}=S.useContext(oi),ee=W(),te=S.createElement(`div`,{className:N,style:i?.item},M,V,L,U,k&&S.createElement(Iu,{motionName:`${ee}-fade`,visible:D===`uploading`,motionDeadline:2e3},({className:t})=>{let n=`percent`in s?S.createElement(CK,{type:`line`,percent:s.percent,"aria-label":s[`aria-label`],"aria-labelledby":s[`aria-labelledby`],...l}):null;return S.createElement(`div`,{className:J(`${e}-list-item-progress`,t)},n)})),ne=s.response&&typeof s.response==`string`?s.response:s.error?.statusText||s.error?.message||a.uploadError,re=D===`error`?S.createElement(Ow,{title:ne,getPopupContainer:e=>e.parentNode},te):te;return S.createElement(`div`,{className:J(`${e}-list-item-container`,t),style:n,ref:T},f?f(re,s,c,{download:C.bind(null,s),preview:x.bind(null,s),remove:w.bind(null,s)}):re)}),C1=S.forwardRef((e,t)=>{let{listType:n=`text`,previewFile:r=v1,onPreview:i,onDownload:a,onRemove:o,locale:s,iconRender:c,isImageUrl:l=g1,prefixCls:u,items:d=[],showPreviewIcon:f=!0,showRemoveIcon:p=!0,showDownloadIcon:m=!1,removeIcon:h,previewIcon:g,downloadIcon:_,extra:v,progress:y={size:[-1,2],showInfo:!1},appendAction:b,appendActionVisible:x=!0,itemRender:C,disabled:w,classNames:T,styles:E}=e,[,D]=Ed(),[O,k]=S.useState(!1),A=[`picture-card`,`picture-circle`].includes(n);S.useEffect(()=>{n.startsWith(`picture`)&&(d||[]).forEach(e=>{!(e.originFileObj instanceof File||e.originFileObj instanceof Blob)||e.thumbUrl!==void 0||(e.thumbUrl=``,r?.(e.originFileObj).then(t=>{e.thumbUrl=t||``,D()}))})},[n,d,r]),S.useEffect(()=>{k(!0)},[]);let j=(e,t)=>{if(i)return t?.preventDefault(),i(e)},M=e=>{typeof a==`function`?a(e):e.url&&window.open(e.url)},N=e=>{o?.(e)},P=e=>{if(c)return c(e,n);let t=e.status===`uploading`;if(n.startsWith(`picture`)){let r=n===`picture`?S.createElement(xm,null):s.uploading,i=l?.(e)?S.createElement(l1,null):S.createElement(r1,null);return t?r:i}return t?S.createElement(xm,null):S.createElement(o1,null)},F=(e,t,n,r,i)=>{let a={type:`text`,size:`small`,title:r,onClick:n=>{t(),S.isValidElement(e)&&e.props.onClick?.(n)},className:`${n}-list-item-action`,disabled:i?w:!1};return S.isValidElement(e)?S.createElement(Zg,{...a,icon:Pp(e,{...e.props,onClick:()=>{}})}):S.createElement(Zg,{...a},S.createElement(`span`,null,e))};S.useImperativeHandle(t,()=>({handlePreview:j,handleDownload:M}));let{getPrefixCls:I}=S.useContext(oi),L=I(`upload`,u),R=I(),z=J(`${L}-list`,`${L}-list-${n}`,T?.list),B=S.useMemo(()=>Sr(Wm(R),[`onAppearEnd`,`onEnterEnd`,`onLeaveEnd`]),[R]),V={...A?{}:B,motionDeadline:2e3,motionName:`${L}-${A?`animate-inline`:`animate`}`,keys:Zr(d.map(e=>({key:e.uid,file:e}))),motionAppear:O};return S.createElement(`div`,{className:z,style:E?.list},S.createElement(Fu,{...V,component:!1},({key:e,file:t,className:r,style:i})=>S.createElement(S1,{key:e,locale:s,prefixCls:L,className:r,style:i,classNames:T,styles:E,file:t,items:d,progress:y,listType:n,isImgUrl:l,showPreviewIcon:f,showRemoveIcon:p,showDownloadIcon:m,removeIcon:h,previewIcon:g,downloadIcon:_,extra:v,iconRender:P,actionIconRender:F,itemRender:C,onPreview:j,onDownload:M,onClose:N})),b&&S.createElement(Iu,{...V,visible:x,forceRender:!0},({className:e,style:t})=>Pp(b,n=>({className:J(n.className,e),style:{...t,pointerEvents:e?`none`:void 0,...n.style}}))))}),w1=`__LIST_IGNORE_${Date.now()}__`,T1=S.forwardRef((e,t)=>{let n=li(`upload`),{fileList:r,defaultFileList:i,onRemove:a,showUploadList:o=!0,listType:s=`text`,onPreview:c,onDownload:l,onChange:u,onDrop:d,previewFile:f,disabled:p,locale:m,iconRender:h,isImageUrl:g,progress:_,prefixCls:v,className:y,type:b=`select`,children:x,style:C,itemRender:w,maxCount:T,data:E={},multiple:D=!1,hasControlInside:O=!0,action:k=``,accept:A=``,supportServerRender:j=!0,rootClassName:M,styles:N,classNames:P}=e,F=S.useContext(zp),I=p??F,L=e.customRequest||n.customRequest,[R,z]=Hn(i,r),B=R||[],[V,H]=S.useState(`drop`),U=S.useRef(null),W=S.useRef(null);S.useMemo(()=>{let e=Date.now();(r||[]).forEach((t,n)=>{!t.uid&&!Object.isFrozen(t)&&(t.uid=`__AUTO__${e}_${n}__`)})},[r]);let ee=(e,t,n)=>{let r=Zr(t),i=!1;T===1?r=r.slice(-1):T&&(i=r.length>T,r=r.slice(0,T)),(0,Jf.flushSync)(()=>{z(r)});let a={file:e,fileList:r};n&&(a.event=n),(!i||e.status===`removed`||r.some(t=>t.uid===e.uid))&&(0,Jf.flushSync)(()=>{u?.(a)})},te=async(t,n)=>{let{beforeUpload:r}=e,i=t;if(r){let e=await r(t,n);if(e===!1)return!1;if(delete t[w1],e===w1)return Object.defineProperty(t,w1,{value:!0,configurable:!0}),!1;hd(e)&&(i=e)}return i},ne=e=>{let t=e.filter(e=>!e.file[w1]);if(!t.length)return;let n=t.map(e=>u1(e.file)),r=Zr(B);n.forEach(e=>{r=d1(e,r)}),n.forEach((e,n)=>{let i=e;if(t[n].parsedFile)e.status=`uploading`;else{let{originFileObj:t}=e,n;try{n=new File([t],t.name,{type:t.type})}catch{n=new Blob([t],{type:t.type}),n.name=t.name,n.lastModifiedDate=new Date,n.lastModified=new Date().getTime()}n.uid=e.uid,i=n}ee(i,r)})},re=(e,t,n)=>{try{typeof e==`string`&&(e=JSON.parse(e))}catch{}if(!f1(t,B))return;let r=u1(t);r.status=`done`,r.percent=100,r.response=e,r.xhr=n,ee(r,d1(r,B))},ie=(e,t)=>{if(!f1(t,B))return;let n=u1(t);n.status=`uploading`,n.percent=e.percent,ee(n,d1(n,B),e)},ae=(e,t,n)=>{if(!f1(n,B))return;let r=u1(n);r.error=e,r.response=t,r.status=`error`,ee(r,d1(r,B))},G=e=>{let t;Promise.resolve(typeof a==`function`?a(e):a).then(n=>{if(n===!1)return;let r=p1(e,B);r&&(t={...e,status:`removed`},B?.forEach(e=>{let n=t.uid===void 0?`name`:`uid`;e[n]===t[n]&&!Object.isFrozen(e)&&(e.status=`removed`)}),U.current?.abort(t),ee(t,r))})},oe=e=>{H(e.type),e.type===`drop`&&d?.(e)};S.useImperativeHandle(t,()=>({onBatchStart:ne,onSuccess:re,onProgress:ie,onError:ae,fileList:B,upload:U.current,nativeElement:W.current}));let{getPrefixCls:K,direction:se,className:ce,style:q,classNames:le,styles:ue}=li(`upload`),de=K(`upload`,v),fe={...e,listType:s,showUploadList:o,type:b,multiple:D,hasControlInside:O,supportServerRender:j,disabled:I},[pe,me]=Fd([le,P],[ue,N],{props:fe}),he={onBatchStart:ne,onError:ae,onProgress:ie,onSuccess:re,...e,customRequest:L,data:E,multiple:D,action:k,accept:A,supportServerRender:j,prefixCls:de,disabled:I,beforeUpload:te,onChange:void 0,hasControlInside:O};delete he.className,delete he.style,(!x||I)&&delete he.id;let ge=`${de}-wrapper`,[_e,ve]=e1(de,ge),[ye]=cd(`Upload`,td.Upload),{showRemoveIcon:be,showPreviewIcon:xe,showDownloadIcon:Se,removeIcon:Ce,previewIcon:we,downloadIcon:Te,extra:Ee}=typeof o==`boolean`?{}:o,De=be===void 0?!I:be,Oe=(e,t)=>o?S.createElement(C1,{classNames:pe,styles:me,prefixCls:de,listType:s,items:B,previewFile:f,onPreview:c,onDownload:l,onRemove:G,showRemoveIcon:De,showPreviewIcon:xe,showDownloadIcon:Se,removeIcon:Ce,previewIcon:we,downloadIcon:Te,iconRender:h,extra:Ee,locale:{...ye,...m},isImageUrl:g,progress:_,appendAction:e,appendActionVisible:t,itemRender:w,disabled:I}):e,ke=J(ge,y,M,_e,ve,ce,pe.root,{[`${de}-rtl`]:se===`rtl`,[`${de}-picture-card-wrapper`]:s===`picture-card`,[`${de}-picture-circle-wrapper`]:s===`picture-circle`}),Ae={...me.root},je={...q,...C};if(b===`drag`){let e=J(_e,de,`${de}-drag`,{[`${de}-drag-uploading`]:B.some(e=>e.status===`uploading`),[`${de}-drag-hover`]:V===`dragover`,[`${de}-disabled`]:I,[`${de}-rtl`]:se===`rtl`},pe.trigger);return S.createElement(`span`,{className:ke,ref:W,style:Ae},S.createElement(`div`,{className:e,style:{...je,...me.trigger},onDrop:oe,onDragOver:oe,onDragLeave:oe},S.createElement(K$,{...he,ref:U,className:`${de}-btn`},S.createElement(`div`,{className:`${de}-drag-container`},x))),Oe())}let Me=J(de,`${de}-select`,{[`${de}-disabled`]:I,[`${de}-hidden`]:!x},pe.trigger),Ne=S.createElement(`div`,{className:Me,style:{...je,...me.trigger}},S.createElement(K$,{...he,ref:U}));return s===`picture-card`||s===`picture-circle`?S.createElement(`span`,{className:ke,ref:W,style:Ae},Oe(Ne,!!x)):S.createElement(`span`,{className:ke,ref:W,style:Ae},Ne,Oe())}),E1=S.forwardRef((e,t)=>{let{style:n,height:r,hasControlInside:i=!1,children:a,...o}=e,s={...n,height:r};return S.createElement(T1,{ref:t,hasControlInside:i,...o,style:s,type:`drag`},a)}),D1=T1;D1.Dragger=E1,D1.LIST_IGNORE=w1;var O1=o(((e,t)=>{function n(e){return e&&e.__esModule?e:{default:e}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),k1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default={items_per_page:`条/页`,jump_to:`跳至`,jump_to_confirm:`确定`,page:`页`,prev_page:`上一页`,next_page:`下一页`,prev_5:`向前 5 页`,next_5:`向后 5 页`,prev_3:`向前 3 页`,next_3:`向后 3 页`,page_size:`页码`}})),A1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.commonLocale=void 0,e.commonLocale={yearFormat:`YYYY`,dayFormat:`D`,cellMeridiemFormat:`A`,monthBeforeYear:!0}})),j1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=A1();function n(e){"@babel/helpers - typeof";return n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n(e)}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default={placeholder:`请选择时间`,rangePlaceholder:[`开始时间`,`结束时间`]}})),N1=o((e=>{var t=O1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(j1()),r=t(M1()),i={lang:{placeholder:`请选择日期`,yearPlaceholder:`请选择年份`,quarterPlaceholder:`请选择季度`,monthPlaceholder:`请选择月份`,weekPlaceholder:`请选择周`,rangePlaceholder:[`开始日期`,`结束日期`],rangeYearPlaceholder:[`开始年份`,`结束年份`],rangeMonthPlaceholder:[`开始月份`,`结束月份`],rangeQuarterPlaceholder:[`开始季度`,`结束季度`],rangeWeekPlaceholder:[`开始周`,`结束周`],...n.default},timePickerLocale:{...r.default}};i.lang.ok=`确定`,e.default=i})),P1=o((e=>{var t=O1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=t(N1()).default})),F1=o((e=>{var t=O1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(k1()),r=t(P1()),i=t(N1()),a=t(M1()),o="${label}不是一个有效的${type}";e.default={locale:`zh-cn`,Pagination:n.default,DatePicker:i.default,TimePicker:a.default,Calendar:r.default,global:{placeholder:`请选择`,close:`关闭`,sortable:`可排序`},Table:{filterTitle:`筛选`,filterConfirm:`确定`,filterReset:`重置`,filterEmptyText:`无筛选项`,filterCheckAll:`全选`,filterSearchPlaceholder:`在筛选项中搜索`,emptyText:`暂无数据`,selectAll:`全选当页`,selectInvert:`反选当页`,selectNone:`清空所有`,selectionAll:`全选所有`,sortTitle:`排序`,expand:`展开行`,collapse:`关闭行`,triggerDesc:`点击降序`,triggerAsc:`点击升序`,cancelSort:`取消排序`},Modal:{okText:`确定`,cancelText:`取消`,justOkText:`知道了`},Tour:{Next:`下一步`,Previous:`上一步`,Finish:`结束导览`},Popconfirm:{cancelText:`取消`,okText:`确定`},Transfer:{titles:[``,``],searchPlaceholder:`请输入搜索内容`,itemUnit:`项`,itemsUnit:`项`,remove:`删除`,selectCurrent:`全选当页`,removeCurrent:`删除当页`,selectAll:`全选所有`,deselectAll:`取消全选`,removeAll:`删除全部`,selectInvert:`反选当页`},Upload:{uploading:`文件上传中`,removeFile:`删除文件`,uploadError:`上传错误`,previewFile:`预览文件`,downloadFile:`下载文件`},Empty:{description:`暂无数据`},Icon:{icon:`图标`},Text:{edit:`编辑`,copy:`复制`,copied:`复制成功`,expand:`展开`,collapse:`收起`},Form:{optional:`(可选)`,defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:o,method:o,array:o,object:o,number:o,date:o,boolean:o,integer:o,float:o,regexp:o,email:o,url:o,hex:o},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},QRCode:{expired:`二维码过期`,refresh:`点击刷新`,scanned:`已扫描`},ColorPicker:{presetEmpty:`暂无`,transparent:`无色`,singleColor:`单色`,gradientColor:`渐变色`}}})),I1=o(((e,t)=>{t.exports=F1()})),L1={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.42 0 448 200.58 448 448S759.42 960 512 960 64 759.42 64 512 264.58 64 512 64m32.5 168c-69.67 0-86.06 16.84-86.72 39.08l-.02 1.43v46.62H291.45c-9.92 0-14.28 23.05-14.27 39.3 0 2.7 2.08 4.93 4.77 4.93h175.81v58.3h-116.5c-9.96 0-14.3 23.76-14.27 39.47a4.77 4.77 0 004.77 4.76h233.45c-4.53 41.06-15.43 77.59-30.72 109.32l-1.22 2.5-.32-.28c-60.24-28.47-120.43-52.57-194.4-52.57l-2.62.01c-84.98 1.11-144.71 56.5-145.91 127.04l-.02 1.22.02 2.13c1.24 70.4 63.56 126.45 148.52 126.45 61.25 0 116.38-16.85 163.46-45.02a138.58 138.58 0 0014.07-7.96 345.6 345.6 0 0050.3-41.16l9.45 6.35 12.46 8.32c57.53 38.26 113.76 72.62 169.86 79.27a142.62 142.62 0 0018.31 1.16c43.02 0 55-52.68 57.39-95.51l.14-2.84c.4-8.46-6.2-15.6-14.65-15.86-75.46-2.37-136.45-22.05-192-46.11l-6.27-2.75c35.15-56.8 56.66-121.81 57.15-186.66l.09-1.08c.4-5.51-4-10.2-9.52-10.2H549.33v-58.3h165.73c9.92 0 14.28-22.12 14.27-39.31a4.85 4.85 0 00-4.78-4.92H549.32v-82.35a4.8 4.8 0 00-4.83-4.78M328 583.85c54.63 0 107.08 22.41 158.1 52.19l5.76 3.4c-103.57 119.84-247.17 95.9-261.72 26.37a66.89 66.89 0 01-1.14-9.83l-.06-2.34.02-.9c.97-40.12 45.33-68.9 99.04-68.9`}}]},name:`alipay-circle`,theme:`outlined`};function R1(){return R1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,R1({},e,{ref:t,icon:L1}))),B1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z`}}]},name:`api`,theme:`outlined`};function V1(){return V1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,V1({},e,{ref:t,icon:B1}))),U1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z`}}]},name:`appstore`,theme:`outlined`};function W1(){return W1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,W1({},e,{ref:t,icon:U1}))),K1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z`}}]},name:`arrow-down`,theme:`outlined`};function q1(){return q1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,q1({},e,{ref:t,icon:K1}))),Y1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`arrow-left`,theme:`outlined`};function X1(){return X1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,X1({},e,{ref:t,icon:Y1}))),Q1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z`}}]},name:`arrow-up`,theme:`outlined`};function $1(){return $1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,$1({},e,{ref:t,icon:Q1}))),t0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z`}}]},name:`audio`,theme:`outlined`};function n0(){return n0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n0({},e,{ref:t,icon:t0}))),i0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z`}}]},name:`bank`,theme:`outlined`};function a0(){return a0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a0({},e,{ref:t,icon:i0}))),s0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z`}}]},name:`bar-chart`,theme:`outlined`};function c0(){return c0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c0({},e,{ref:t,icon:s0}))),u0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M816 768h-24V428c0-141.1-104.3-257.7-240-277.1V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.9c-135.7 19.4-240 136-240 277.1v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48zM304 768V428c0-55.6 21.6-107.8 60.9-147.1S456.4 220 512 220c55.6 0 107.8 21.6 147.1 60.9S720 372.4 720 428v340H304z`}}]},name:`bell`,theme:`outlined`};function d0(){return d0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d0({},e,{ref:t,icon:u0}))),p0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z`}}]},name:`book`,theme:`outlined`};function m0(){return m0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,m0({},e,{ref:t,icon:p0}))),g0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M916 210H376c-17.7 0-32 14.3-32 32v236H108c-17.7 0-32 14.3-32 32v272c0 17.7 14.3 32 32 32h540c17.7 0 32-14.3 32-32V546h236c17.7 0 32-14.3 32-32V242c0-17.7-14.3-32-32-32zm-504 68h200v200H412V278zm-68 468H144V546h200v200zm268 0H412V546h200v200zm268-268H680V278h200v200z`}}]},name:`build`,theme:`outlined`};function _0(){return _0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,_0({},e,{ref:t,icon:g0}))),y0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z`}}]},name:`bulb`,theme:`outlined`};function b0(){return b0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b0({},e,{ref:t,icon:y0}))),S0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M251.2 387H320v68.8c0 1.8 1.8 3.2 4 3.2h48c2.2 0 4-1.4 4-3.3V387h68.8c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H376v-68.8c0-1.8-1.8-3.2-4-3.2h-48c-2.2 0-4 1.4-4 3.2V331h-68.8c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm328 0h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm0 265h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm0 104h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm-195.7-81l61.2-74.9c4.3-5.2.7-13.1-5.9-13.1H388c-2.3 0-4.5 1-5.9 2.9l-34 41.6-34-41.6a7.85 7.85 0 00-5.9-2.9h-50.9c-6.6 0-10.2 7.9-5.9 13.1l61.2 74.9-62.7 76.8c-4.4 5.2-.8 13.1 5.8 13.1h50.8c2.3 0 4.5-1 5.9-2.9l35.5-43.5 35.5 43.5c1.5 1.8 3.7 2.9 5.9 2.9h50.8c6.6 0 10.2-7.9 5.9-13.1L383.5 675zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-36 732H180V180h664v664z`}}]},name:`calculator`,theme:`outlined`};function C0(){return C0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C0({},e,{ref:t,icon:S0}))),T0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 248H728l-32.4-90.8a32.07 32.07 0 00-30.2-21.2H358.6c-13.5 0-25.6 8.5-30.1 21.2L296 248H160c-44.2 0-80 35.8-80 80v456c0 44.2 35.8 80 80 80h704c44.2 0 80-35.8 80-80V328c0-44.2-35.8-80-80-80zm8 536c0 4.4-3.6 8-8 8H160c-4.4 0-8-3.6-8-8V328c0-4.4 3.6-8 8-8h186.7l17.1-47.8 22.9-64.2h250.5l22.9 64.2 17.1 47.8H864c4.4 0 8 3.6 8 8v456zM512 384c-88.4 0-160 71.6-160 160s71.6 160 160 160 160-71.6 160-160-71.6-160-160-160zm0 256c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z`}}]},name:`camera`,theme:`outlined`};function E0(){return E0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,E0({},e,{ref:t,icon:T0}))),O0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M380 704h264c4.4 0 8-3.6 8-8v-84c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v36H428v-36c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v84c0 4.4 3.6 8 8 8zm340-123a40 40 0 1080 0 40 40 0 10-80 0zm239-167.6L935.3 372a8 8 0 00-10.9-2.9l-50.7 29.6-78.3-216.2a63.9 63.9 0 00-60.9-44.4H301.2c-34.7 0-65.5 22.4-76.2 55.5l-74.6 205.2-50.8-29.6a8 8 0 00-10.9 2.9L65 413.4c-2.2 3.8-.9 8.6 2.9 10.8l60.4 35.2-14.5 40c-1.2 3.2-1.8 6.6-1.8 10v348.2c0 15.7 11.8 28.4 26.3 28.4h67.6c12.3 0 23-9.3 25.6-22.3l7.7-37.7h545.6l7.7 37.7c2.7 13 13.3 22.3 25.6 22.3h67.6c14.5 0 26.3-12.7 26.3-28.4V509.4c0-3.4-.6-6.8-1.8-10l-14.5-40 60.3-35.2a8 8 0 003-10.8zM840 517v237H184V517l15.6-43h624.8l15.6 43zM292.7 218.1l.5-1.3.4-1.3c1.1-3.3 4.1-5.5 7.6-5.5h427.6l75.4 208H220l72.7-199.9zM224 581a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`car`,theme:`outlined`};function k0(){return k0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,k0({},e,{ref:t,icon:O0}))),j0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z`}},{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}}]},name:`check-circle`,theme:`outlined`};function M0(){return M0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,M0({},e,{ref:t,icon:j0}))),P0={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z`}}]},name:`close-circle`,theme:`outlined`};function F0(){return F0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,F0({},e,{ref:t,icon:P0}))),L0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M811.4 418.7C765.6 297.9 648.9 212 512.2 212S258.8 297.8 213 418.6C127.3 441.1 64 519.1 64 612c0 110.5 89.5 200 199.9 200h496.2C870.5 812 960 722.5 960 612c0-92.7-63.1-170.7-148.6-193.3zm36.3 281a123.07 123.07 0 01-87.6 36.3H263.9c-33.1 0-64.2-12.9-87.6-36.3A123.3 123.3 0 01140 612c0-28 9.1-54.3 26.2-76.3a125.7 125.7 0 0166.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10c54.3 14.5 92.1 63.8 92.1 120 0 33.1-12.9 64.3-36.3 87.7z`}}]},name:`cloud`,theme:`outlined`};function R0(){return R0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,R0({},e,{ref:t,icon:L0}))),B0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z`}},{tag:`path`,attrs:{d:`M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z`}},{tag:`path`,attrs:{d:`M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z`}}]},name:`cloud-server`,theme:`outlined`};function V0(){return V0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,V0({},e,{ref:t,icon:B0}))),U0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`code`,theme:`outlined`};function W0(){return W0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,W0({},e,{ref:t,icon:U0}))),K0={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M275 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm613 144H768c0-39.8-32.2-72-72-72H200c-39.8 0-72 32.2-72 72v248c0 3.4.2 6.7.7 9.9-.5 7-.7 14-.7 21.1 0 176.7 143.3 320 320 320 160.1 0 292.7-117.5 316.3-271H888c39.8 0 72-32.2 72-72V497c0-39.8-32.2-72-72-72zM696 681h-1.1c.7 7.6 1.1 15.2 1.1 23 0 137-111 248-248 248S200 841 200 704c0-7.8.4-15.4 1.1-23H200V425h496v256zm192-8H776V497h112v176zM613 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm-170 0c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36z`}}]},name:`coffee`,theme:`outlined`};function q0(){return q0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,q0({},e,{ref:t,icon:K0}))),Y0={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 372zm198.4-588.1a32 32 0 00-24.5.5L414.9 415 296.4 686c-3.6 8.2-3.6 17.5 0 25.7 3.4 7.8 9.7 13.9 17.7 17 3.8 1.5 7.7 2.2 11.7 2.2 4.4 0 8.7-.9 12.8-2.7l271-118.6 118.5-271a32.06 32.06 0 00-17.7-42.7zM576.8 534.4l26.2 26.2-42.4 42.4-26.2-26.2L380 644.4 447.5 490 422 464.4l42.4-42.4 25.5 25.5L644.4 380l-67.6 154.4zM464.4 422L422 464.4l25.5 25.6 86.9 86.8 26.2 26.2 42.4-42.4-26.2-26.2-86.8-86.9z`}}]},name:`compass`,theme:`outlined`};function X0(){return X0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,X0({},e,{ref:t,icon:Y0}))),Q0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z`}}]},name:`crown`,theme:`outlined`};function $0(){return $0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,$0({},e,{ref:t,icon:Q0}))),t2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z`}}]},name:`dashboard`,theme:`outlined`};function n2(){return n2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n2({},e,{ref:t,icon:t2}))),i2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`database`,theme:`outlined`};function a2(){return a2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a2({},e,{ref:t,icon:i2}))),s2={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 372zm47.7-395.2l-25.4-5.9V348.6c38 5.2 61.5 29 65.5 58.2.5 4 3.9 6.9 7.9 6.9h44.9c4.7 0 8.4-4.1 8-8.8-6.1-62.3-57.4-102.3-125.9-109.2V263c0-4.4-3.6-8-8-8h-28.1c-4.4 0-8 3.6-8 8v33c-70.8 6.9-126.2 46-126.2 119 0 67.6 49.8 100.2 102.1 112.7l24.7 6.3v142.7c-44.2-5.9-69-29.5-74.1-61.3-.6-3.8-4-6.6-7.9-6.6H363c-4.7 0-8.4 4-8 8.7 4.5 55 46.2 105.6 135.2 112.1V761c0 4.4 3.6 8 8 8h28.4c4.4 0 8-3.6 8-8.1l-.2-31.7c78.3-6.9 134.3-48.8 134.3-124-.1-69.4-44.2-100.4-109-116.4zm-68.6-16.2c-5.6-1.6-10.3-3.1-15-5-33.8-12.2-49.5-31.9-49.5-57.3 0-36.3 27.5-57 64.5-61.7v124zM534.3 677V543.3c3.1.9 5.9 1.6 8.8 2.2 47.3 14.4 63.2 34.4 63.2 65.1 0 39.1-29.4 62.6-72 66.4z`}}]},name:`dollar`,theme:`outlined`};function c2(){return c2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c2({},e,{ref:t,icon:s2}))),u2={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 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z`}}]},name:`exclamation-circle`,theme:`outlined`};function d2(){return d2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d2({},e,{ref:t,icon:u2}))),p2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 472a40 40 0 1080 0 40 40 0 10-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 01-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z`}}]},name:`experiment`,theme:`outlined`};function m2(){return m2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,m2({},e,{ref:t,icon:p2}))),g2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z`}}]},name:`file-image`,theme:`outlined`};function _2(){return _2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,_2({},e,{ref:t,icon:g2}))),y2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z`}}]},name:`file-pdf`,theme:`outlined`};function b2(){return b2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b2({},e,{ref:t,icon:y2}))),S2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z`}}]},name:`filter`,theme:`outlined`};function C2(){return C2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C2({},e,{ref:t,icon:S2}))),T2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9zM713 808.5c-53.7 53.2-125 82.4-201 82.4s-147.3-29.2-201-82.4c-53.5-53.1-83-123.5-83-198.4 0-43.5 9.8-85.2 29.1-124 18.8-37.9 46.8-71.8 80.8-97.9a349.6 349.6 0 0058.6-56.8c25-30.5 44.6-64.5 58.2-101a240 240 0 0012.1-46.5c24.1 22.2 44.3 49 61.2 80.4 33.4 62.6 48.8 118.3 45.8 165.7a74.01 74.01 0 0024.4 59.8 73.36 73.36 0 0053.4 18.8c19.7-1 37.8-9.7 51-24.4 13.3-14.9 24.8-30.1 34.4-45.6 14 17.9 25.7 37.4 35 58.4 15.9 35.8 24 73.9 24 113.1 0 74.9-29.5 145.4-83 198.4z`}}]},name:`fire`,theme:`outlined`};function E2(){return E2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,E2({},e,{ref:t,icon:T2}))),O2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 305H624V192c0-17.7-14.3-32-32-32H184v-40c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v784c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V640h248v113c0 17.7 14.3 32 32 32h416c17.7 0 32-14.3 32-32V337c0-17.7-14.3-32-32-32zM184 568V232h368v336H184zm656 145H504v-73h112c4.4 0 8-3.6 8-8V377h216v336z`}}]},name:`flag`,theme:`outlined`};function k2(){return k2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,k2({},e,{ref:t,icon:O2}))),j2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M920 416H616c-4.4 0-8 3.6-8 8v112c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-56h60v320h-46c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h164c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8h-46V480h60v56c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V424c0-4.4-3.6-8-8-8zM656 296V168c0-4.4-3.6-8-8-8H104c-4.4 0-8 3.6-8 8v128c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-64h168v560h-92c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-92V232h168v64c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8z`}}]},name:`font-size`,theme:`outlined`};function M2(){return M2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,M2({},e,{ref:t,icon:j2}))),P2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 310H732.4c13.6-21.4 21.6-46.8 21.6-74 0-76.1-61.9-138-138-138-41.4 0-78.7 18.4-104 47.4-25.3-29-62.6-47.4-104-47.4-76.1 0-138 61.9-138 138 0 27.2 7.9 52.6 21.6 74H144c-17.7 0-32 14.3-32 32v200c0 4.4 3.6 8 8 8h40v344c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V550h40c4.4 0 8-3.6 8-8V342c0-17.7-14.3-32-32-32zm-334-74c0-38.6 31.4-70 70-70s70 31.4 70 70-31.4 70-70 70h-70v-70zm-138-70c38.6 0 70 31.4 70 70v70h-70c-38.6 0-70-31.4-70-70s31.4-70 70-70zM180 482V378h298v104H180zm48 68h250v308H228V550zm568 308H546V550h250v308zm48-376H546V378h298v104z`}}]},name:`gift`,theme:`outlined`};function F2(){return F2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,F2({},e,{ref:t,icon:P2}))),L2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z`}}]},name:`global`,theme:`outlined`};function R2(){return R2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,R2({},e,{ref:t,icon:L2}))),B2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z`}}]},name:`heart`,theme:`outlined`};function V2(){return V2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,V2({},e,{ref:t,icon:B2}))),U2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M957.6 507.4L603.2 158.2a7.9 7.9 0 00-11.2 0L353.3 393.4a8.03 8.03 0 00-.1 11.3l.1.1 40 39.4-117.2 115.3a8.03 8.03 0 00-.1 11.3l.1.1 39.5 38.9-189.1 187H72.1c-4.4 0-8.1 3.6-8.1 8V860c0 4.4 3.6 8 8 8h344.9c2.1 0 4.1-.8 5.6-2.3l76.1-75.6 40.4 39.8a7.9 7.9 0 0011.2 0l117.1-115.6 40.1 39.5a7.9 7.9 0 0011.2 0l238.7-235.2c3.4-3 3.4-8 .3-11.2zM389.8 796.2H229.6l134.4-133 80.1 78.9-54.3 54.1zm154.8-62.1L373.2 565.2l68.6-67.6 171.4 168.9-68.6 67.6zM713.1 658L450.3 399.1 597.6 254l262.8 259-147.3 145z`}}]},name:`highlight`,theme:`outlined`};function W2(){return W2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,W2({},e,{ref:t,icon:U2}))),K2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z`}}]},name:`history`,theme:`outlined`};function q2(){return q2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,q2({},e,{ref:t,icon:K2}))),Y2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z`}}]},name:`home`,theme:`outlined`};function X2(){return X2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,X2({},e,{ref:t,icon:Y2}))),Q2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136V232h752v560zM610.3 476h123.4c1.3 0 2.3-3.6 2.3-8v-48c0-4.4-1-8-2.3-8H610.3c-1.3 0-2.3 3.6-2.3 8v48c0 4.4 1 8 2.3 8zm4.8 144h185.7c3.9 0 7.1-3.6 7.1-8v-48c0-4.4-3.2-8-7.1-8H615.1c-3.9 0-7.1 3.6-7.1 8v48c0 4.4 3.2 8 7.1 8zM224 673h43.9c4.2 0 7.6-3.3 7.9-7.5 3.8-50.5 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H522a8 8 0 008-8.4c-2.8-53.3-32-99.7-74.6-126.1a111.8 111.8 0 0029.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 00-74.6 126.1c-.4 4.6 3.2 8.4 7.8 8.4zm149-262c28.5 0 51.7 23.3 51.7 52s-23.2 52-51.7 52-51.7-23.3-51.7-52 23.2-52 51.7-52z`}}]},name:`idcard`,theme:`outlined`};function $2(){return $2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,$2({},e,{ref:t,icon:Q2}))),t4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M956.9 845.1L896.4 632V168c0-17.7-14.3-32-32-32h-704c-17.7 0-32 14.3-32 32v464L67.9 845.1C60.4 866 75.8 888 98 888h828.8c22.2 0 37.6-22 30.1-42.9zM200.4 208h624v395h-624V208zm228.3 608l8.1-37h150.3l8.1 37H428.7zm224 0l-19.1-86.7c-.8-3.7-4.1-6.3-7.8-6.3H398.2c-3.8 0-7 2.6-7.8 6.3L371.3 816H151l42.3-149h638.2l42.3 149H652.7z`}}]},name:`laptop`,theme:`outlined`};function n4(){return n4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n4({},e,{ref:t,icon:t4}))),i4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z`}}]},name:`line-chart`,theme:`outlined`};function a4(){return a4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a4({},e,{ref:t,icon:i4}))),s4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z`}}]},name:`link`,theme:`outlined`};function c4(){return c4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c4({},e,{ref:t,icon:s4}))),u4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z`}}]},name:`lock`,theme:`outlined`};function d4(){return d4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d4({},e,{ref:t,icon:u4}))),p4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z`}}]},name:`logout`,theme:`outlined`};function m4(){return m4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,m4({},e,{ref:t,icon:p4}))),g4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z`}}]},name:`mail`,theme:`outlined`};function _4(){return _4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,_4({},e,{ref:t,icon:g4}))),y4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M839.2 278.1a32 32 0 00-30.4-22.1H736V144c0-17.7-14.3-32-32-32H320c-17.7 0-32 14.3-32 32v112h-72.8a31.9 31.9 0 00-30.4 22.1L112 502v378c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V502l-72.8-223.9zM360 184h304v72H360v-72zm480 656H184V513.4L244.3 328h535.4L840 513.4V840zM652 572H544V464c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v108H372c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h108v108c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V636h108c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z`}}]},name:`medicine-box`,theme:`outlined`};function b4(){return b4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b4({},e,{ref:t,icon:y4}))),S4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z`}}]},name:`menu`,theme:`outlined`};function C4(){return C4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C4({},e,{ref:t,icon:S4}))),T4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z`}},{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}}]},name:`minus-circle`,theme:`outlined`};function E4(){return E4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,E4({},e,{ref:t,icon:T4}))),O4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`mobile`,theme:`outlined`};function k4(){return k4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,k4({},e,{ref:t,icon:O4}))),j4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M692.8 412.7l.2-.2-34.6-44.3a7.97 7.97 0 00-11.2-1.4l-50.4 39.3-70.5-90.1a7.97 7.97 0 00-11.2-1.4l-37.9 29.7a7.97 7.97 0 00-1.4 11.2l70.5 90.2-.2.1 34.6 44.3c2.7 3.5 7.7 4.1 11.2 1.4l50.4-39.3 64.1 82c2.7 3.5 7.7 4.1 11.2 1.4l37.9-29.6c3.5-2.7 4.1-7.7 1.4-11.2l-64.1-82.1zM608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5L114.3 856.1a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6C473 696.1 537.7 720 608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644s-118.2-23.7-161.2-66.8C403.7 534.2 380 476.9 380 416s23.7-118.2 66.8-161.2c43-43.1 100.3-66.8 161.2-66.8s118.2 23.7 161.2 66.8c43.1 43 66.8 100.3 66.8 161.2s-23.7 118.2-66.8 161.2z`}}]},name:`monitor`,theme:`outlined`};function M4(){return M4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,M4({},e,{ref:t,icon:j4}))),P4={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 372zm159.6-585h-59.5c-3 0-5.8 1.7-7.1 4.4l-90.6 180H511l-90.6-180a8 8 0 00-7.1-4.4h-60.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.9L457 515.7h-61.4c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V603h-81.7c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V717c0 4.4 3.6 8 8 8h54.3c4.4 0 8-3.6 8-8v-68.1h82c4.4 0 8-3.6 8-8V611c0-4.4-3.6-8-8-8h-82v-41.5h82c4.4 0 8-3.6 8-8v-29.9c0-4.4-3.6-8-8-8h-62l111.1-204.8c.6-1.2 1-2.5 1-3.8-.1-4.4-3.7-8-8.1-8z`}}]},name:`pay-circle`,theme:`outlined`};function F4(){return F4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,F4({},e,{ref:t,icon:P4}))),L4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M877.1 238.7L770.6 132.3c-13-13-30.4-20.3-48.8-20.3s-35.8 7.2-48.8 20.3L558.3 246.8c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l89.6 89.7a405.46 405.46 0 01-86.4 127.3c-36.7 36.9-79.6 66-127.2 86.6l-89.6-89.7c-13-13-30.4-20.3-48.8-20.3a68.2 68.2 0 00-48.8 20.3L132.3 673c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l106.4 106.4c22.2 22.2 52.8 34.9 84.2 34.9 6.5 0 12.8-.5 19.2-1.6 132.4-21.8 263.8-92.3 369.9-198.3C818 606 888.4 474.6 910.4 342.1c6.3-37.6-6.3-76.3-33.3-103.4zm-37.6 91.5c-19.5 117.9-82.9 235.5-178.4 331s-213 158.9-330.9 178.4c-14.8 2.5-30-2.5-40.8-13.2L184.9 721.9 295.7 611l119.8 120 .9.9 21.6-8a481.29 481.29 0 00285.7-285.8l8-21.6-120.8-120.7 110.8-110.9 104.5 104.5c10.8 10.8 15.8 26 13.3 40.8z`}}]},name:`phone`,theme:`outlined`};function R4(){return R4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,R4({},e,{ref:t,icon:L4}))),B4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`}}]},name:`picture`,theme:`outlined`};function V4(){return V4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,V4({},e,{ref:t,icon:B4}))),U4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 518H506V160c0-4.4-3.6-8-8-8h-26a398.46 398.46 0 00-282.8 117.1 398.19 398.19 0 00-85.7 127.1A397.61 397.61 0 0072 552a398.46 398.46 0 00117.1 282.8c36.7 36.7 79.5 65.6 127.1 85.7A397.61 397.61 0 00472 952a398.46 398.46 0 00282.8-117.1c36.7-36.7 65.6-79.5 85.7-127.1A397.61 397.61 0 00872 552v-26c0-4.4-3.6-8-8-8zM705.7 787.8A331.59 331.59 0 01470.4 884c-88.1-.4-170.9-34.9-233.2-97.2C174.5 724.1 140 640.7 140 552c0-88.7 34.5-172.1 97.2-234.8 54.6-54.6 124.9-87.9 200.8-95.5V586h364.3c-7.7 76.3-41.3 147-96.6 201.8zM952 462.4l-2.6-28.2c-8.5-92.1-49.4-179-115.2-244.6A399.4 399.4 0 00589 74.6L560.7 72c-4.7-.4-8.7 3.2-8.7 7.9V464c0 4.4 3.6 8 8 8l384-1c4.7 0 8.4-4 8-8.6zm-332.2-58.2V147.6a332.24 332.24 0 01166.4 89.8c45.7 45.6 77 103.6 90 166.1l-256.4.7z`}}]},name:`pie-chart`,theme:`outlined`};function W4(){return W4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,W4({},e,{ref:t,icon:U4}))),K4={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`};function q4(){return q4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,q4({},e,{ref:t,icon:K4}))),Y4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M280 752h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8zm192-280h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v184c0 4.4 3.6 8 8 8zm192 72h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v256c0 4.4 3.6 8 8 8zm216-432H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`project`,theme:`outlined`};function X4(){return X4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,X4({},e,{ref:t,icon:Y4}))),Q4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 161H699.2c-49.1 0-97.1 14.1-138.4 40.7L512 233l-48.8-31.3A255.2 255.2 0 00324.8 161H96c-17.7 0-32 14.3-32 32v568c0 17.7 14.3 32 32 32h228.8c49.1 0 97.1 14.1 138.4 40.7l44.4 28.6c1.3.8 2.8 1.3 4.3 1.3s3-.4 4.3-1.3l44.4-28.6C602 807.1 650.1 793 699.2 793H928c17.7 0 32-14.3 32-32V193c0-17.7-14.3-32-32-32zM324.8 721H136V233h188.8c35.4 0 69.8 10.1 99.5 29.2l48.8 31.3 6.9 4.5v462c-47.6-25.6-100.8-39-155.2-39zm563.2 0H699.2c-54.4 0-107.6 13.4-155.2 39V298l6.9-4.5 48.8-31.3c29.7-19.1 64.1-29.2 99.5-29.2H888v488zM396.9 361H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm223.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c0-4.1-3.2-7.5-7.1-7.5H627.1c-3.9 0-7.1 3.4-7.1 7.5zM396.9 501H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm416 0H627.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5z`}}]},name:`read`,theme:`outlined`};function $4(){return $4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,$4({},e,{ref:t,icon:Q4}))),t3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M508 704c79.5 0 144-64.5 144-144s-64.5-144-144-144-144 64.5-144 144 64.5 144 144 144zm0-224c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z`}},{tag:`path`,attrs:{d:`M832 256h-28.1l-35.7-120.9c-4-13.7-16.5-23.1-30.7-23.1h-451c-14.3 0-26.8 9.4-30.7 23.1L220.1 256H192c-17.7 0-32 14.3-32 32v28c0 4.4 3.6 8 8 8h45.8l47.7 558.7a32 32 0 0031.9 29.3h429.2a32 32 0 0031.9-29.3L802.2 324H856c4.4 0 8-3.6 8-8v-28c0-17.7-14.3-32-32-32zm-518.6-76h397.2l22.4 76H291l22.4-76zm376.2 664H326.4L282 324h451.9l-44.3 520z`}}]},name:`rest`,theme:`outlined`};function n3(){return n3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n3({},e,{ref:t,icon:t3}))),i3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`robot`,theme:`outlined`};function a3(){return a3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a3({},e,{ref:t,icon:i3}))),s3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 00-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0043.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0043.1-30.5 97.52 97.52 0 0021.4-60.8c0-8.4-1.1-16.4-3.1-23.8H864zM762.3 621.4c9.4 14.6 17 30.3 22.5 46.6H700V558.7a211.6 211.6 0 0162.3 62.7zM388 483.1V318.8l124-147 124 147V668H388V483.1zM239.2 668c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668h-84.8zm388.9 116.2c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5-38.3 0-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 01-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM464 400a48 48 0 1096 0 48 48 0 10-96 0z`}}]},name:`rocket`,theme:`outlined`};function c3(){return c3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c3({},e,{ref:t,icon:s3}))),u3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M793 242H366v-74c0-6.7-7.7-10.4-12.9-6.3l-142 112a8 8 0 000 12.6l142 112c5.2 4.1 12.9.4 12.9-6.3v-74h415v470H175c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h618c35.3 0 64-28.7 64-64V306c0-35.3-28.7-64-64-64z`}}]},name:`rollback`,theme:`outlined`};function d3(){return d3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d3({},e,{ref:t,icon:u3}))),p3={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z`}},{tag:`path`,attrs:{d:`M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z`}}]},name:`safety`,theme:`outlined`};function m3(){return m3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,m3({},e,{ref:t,icon:p3}))),g3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z`}}]},name:`save`,theme:`outlined`};function _3(){return _3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,_3({},e,{ref:t,icon:g3}))),y3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zM402.9 528.8l-77.5 77.5a8.03 8.03 0 000 11.3l34 34c3.1 3.1 8.2 3.1 11.3 0l77.5-77.5c55.7 35.1 130.1 28.4 178.6-20.1 56.3-56.3 56.3-147.5 0-203.8-56.3-56.3-147.5-56.3-203.8 0-48.5 48.5-55.2 123-20.1 178.6zm65.4-133.3c31.3-31.3 82-31.3 113.2 0 31.3 31.3 31.3 82 0 113.2-31.3 31.3-82 31.3-113.2 0s-31.3-81.9 0-113.2z`}}]},name:`security-scan`,theme:`outlined`};function b3(){return b3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b3({},e,{ref:t,icon:y3}))),S3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z`}}]},name:`send`,theme:`outlined`};function C3(){return C3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C3({},e,{ref:t,icon:S3}))),T3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z`}}]},name:`setting`,theme:`outlined`};function E3(){return E3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,E3({},e,{ref:t,icon:T3}))),O3={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z`}}]},name:`shopping-cart`,theme:`outlined`};function k3(){return k3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,k3({},e,{ref:t,icon:O3}))),j3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 312H696v-16c0-101.6-82.4-184-184-184s-184 82.4-184 184v16H192c-17.7 0-32 14.3-32 32v536c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V344c0-17.7-14.3-32-32-32zm-432-16c0-61.9 50.1-112 112-112s112 50.1 112 112v16H400v-16zm392 544H232V384h96v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h224v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h96v456z`}}]},name:`shopping`,theme:`outlined`};function M3(){return M3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,M3({},e,{ref:t,icon:j3}))),P3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M925.6 405.1l-203-253.7a6.5 6.5 0 00-5-2.4H306.4c-1.9 0-3.8.9-5 2.4l-203 253.7a6.5 6.5 0 00.2 8.3l408.6 459.5c1.2 1.4 3 2.1 4.8 2.1 1.8 0 3.5-.8 4.8-2.1l408.6-459.5a6.5 6.5 0 00.2-8.3zM645.2 206.4l34.4 133.9-132.5-133.9h98.1zm8.2 178.5H370.6L512 242l141.4 142.9zM378.8 206.4h98.1L344.3 340.3l34.5-133.9zm-53.4 7l-44.1 171.5h-93.1l137.2-171.5zM194.6 434.9H289l125.8 247.7-220.2-247.7zM512 763.4L345.1 434.9h333.7L512 763.4zm97.1-80.8L735 434.9h94.4L609.1 682.6zm133.6-297.7l-44.1-171.5 137.2 171.5h-93.1z`}}]},name:`sketch`,theme:`outlined`};function F3(){return F3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,F3({},e,{ref:t,icon:P3}))),L3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M870 126H663.8c-17.4 0-32.9 11.9-37 29.3C614.3 208.1 567 246 512 246s-102.3-37.9-114.8-90.7a37.93 37.93 0 00-37-29.3H154a44 44 0 00-44 44v252a44 44 0 0044 44h75v388a44 44 0 0044 44h478a44 44 0 0044-44V466h75a44 44 0 0044-44V170a44 44 0 00-44-44zm-28 268H723v432H301V394H182V198h153.3c28.2 71.2 97.5 120 176.7 120s148.5-48.8 176.7-120H842v196z`}}]},name:`skin`,theme:`outlined`};function R3(){return R3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,R3({},e,{ref:t,icon:L3}))),B3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z`}}]},name:`smile`,theme:`outlined`};function V3(){return V3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,V3({},e,{ref:t,icon:B3}))),U3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M688 264c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48zm-8 136H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM480 544H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 308H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm356.8-74.4c29-26.3 47.2-64.3 47.2-106.6 0-79.5-64.5-144-144-144s-144 64.5-144 144c0 42.3 18.2 80.3 47.2 106.6-57 32.5-96.2 92.7-99.2 162.1-.2 4.5 3.5 8.3 8 8.3h48.1c4.2 0 7.7-3.3 8-7.6C564 871.2 621.7 816 692 816s128 55.2 131.9 124.4c.2 4.2 3.7 7.6 8 7.6H880c4.6 0 8.2-3.8 8-8.3-2.9-69.5-42.2-129.6-99.2-162.1zM692 591c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z`}}]},name:`solution`,theme:`outlined`};function W3(){return W3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,W3({},e,{ref:t,icon:U3}))),K3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1zM586 803L293.4 611.7l-18-11.7H146V424h129.4l17.9-11.7L586 221v582zm348-327H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zm-41.9 261.8l-110.3-63.7a15.9 15.9 0 00-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0021.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM760 344a15.9 15.9 0 0021.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 00-21.7-5.9L746 287.8a15.99 15.99 0 00-5.8 21.8L760 344z`}}]},name:`sound`,theme:`outlined`};function q3(){return q3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,q3({},e,{ref:t,icon:K3}))),Y3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z`}}]},name:`star`,theme:`outlined`};function X3(){return X3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,X3({},e,{ref:t,icon:Y3}))),Q3={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`};function $3(){return $3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,$3({},e,{ref:t,icon:Q3}))),t6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M938 458.8l-29.6-312.6c-1.5-16.2-14.4-29-30.6-30.6L565.2 86h-.4c-3.2 0-5.7 1-7.6 2.9L88.9 557.2a9.96 9.96 0 000 14.1l363.8 363.8c1.9 1.9 4.4 2.9 7.1 2.9s5.2-1 7.1-2.9l468.3-468.3c2-2.1 3-5 2.8-8zM459.7 834.7L189.3 564.3 589 164.6 836 188l23.4 247-399.7 399.7zM680 256c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm0 120c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z`}}]},name:`tag`,theme:`outlined`};function n6(){return n6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n6({},e,{ref:t,icon:t6}))),i6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z`}}]},name:`team`,theme:`outlined`};function a6(){return a6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a6({},e,{ref:t,icon:i6}))),s6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z`}}]},name:`thunderbolt`,theme:`outlined`};function c6(){return c6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c6({},e,{ref:t,icon:s6}))),u6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z`}}]},name:`tool`,theme:`outlined`};function d6(){return d6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d6({},e,{ref:t,icon:u6}))),p6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 160h-92v-40c0-4.4-3.6-8-8-8H256c-4.4 0-8 3.6-8 8v40h-92a44 44 0 00-44 44v148c0 81.7 60 149.6 138.2 162C265.7 630.2 359 721.7 476 734.5v105.2H280c-17.7 0-32 14.3-32 32V904c0 4.4 3.6 8 8 8h512c4.4 0 8-3.6 8-8v-32.3c0-17.7-14.3-32-32-32H548V734.5C665 721.7 758.3 630.2 773.8 514 852 501.6 912 433.7 912 352V204a44 44 0 00-44-44zM184 352V232h64v207.6a91.99 91.99 0 01-64-87.6zm520 128c0 49.1-19.1 95.4-53.9 130.1-34.8 34.8-81 53.9-130.1 53.9h-16c-49.1 0-95.4-19.1-130.1-53.9-34.8-34.8-53.9-81-53.9-130.1V184h384v296zm136-128c0 41-26.9 75.8-64 87.6V232h64v120z`}}]},name:`trophy`,theme:`outlined`};function m6(){return m6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,m6({},e,{ref:t,icon:p6}))),g6={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M608 192a32 32 0 0132 32v160h174.81a32 32 0 0126.68 14.33l113.19 170.84a32 32 0 015.32 17.68V672a32 32 0 01-32 32h-96c0 70.7-57.3 128-128 128s-128-57.3-128-128H384c0 70.7-57.3 128-128 128s-128-57.3-128-128H96a32 32 0 01-32-32V224a32 32 0 0132-32zM256 640a64 64 0 000 128h1.06A64 64 0 00256 640m448 0a64 64 0 000 128h1.06A64 64 0 00704 640M576 256H128v384h17.12c22.13-38.26 63.5-64 110.88-64 47.38 0 88.75 25.74 110.88 64H576zm221.63 192H640v145.12A127.43 127.43 0 01704 576c47.38 0 88.75 25.74 110.88 64H896v-43.52zM500 448a12 12 0 0112 12v40a12 12 0 01-12 12H332a12 12 0 01-12-12v-40a12 12 0 0112-12zM308 320a12 12 0 0112 12v40a12 12 0 01-12 12H204a12 12 0 01-12-12v-40a12 12 0 0112-12z`}}]},name:`truck`,theme:`outlined`};function _6(){return _6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,_6({},e,{ref:t,icon:g6}))),y6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M511.4 124C290.5 124.3 112 303 112 523.9c0 128 60.2 242 153.8 315.2l-37.5 48c-4.1 5.3-.3 13 6.3 12.9l167-.8c5.2 0 9-4.9 7.7-9.9L369.8 727a8 8 0 00-14.1-3L315 776.1c-10.2-8-20-16.7-29.3-26a318.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-7.5 7.5-15.3 14.5-23.4 21.2a7.93 7.93 0 00-1.2 11.1l39.4 50.5c2.8 3.5 7.9 4.1 11.4 1.3C854.5 760.8 912 649.1 912 523.9c0-221.1-179.4-400.2-400.6-399.9z`}}]},name:`undo`,theme:`outlined`};function b6(){return b6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b6({},e,{ref:t,icon:y6}))),S6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`upload`,theme:`outlined`};function C6(){return C6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C6({},e,{ref:t,icon:S6}))),T6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z`}}]},name:`user`,theme:`outlined`};function E6(){return E6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,E6({},e,{ref:t,icon:T6}))),O6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v576c0 35.3 28.7 64 64 64h592c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM712 792H136V232h576v560zm176-167l-104-59.8V458.9L888 399v226zM208 360h112c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H208c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}}]},name:`video-camera`,theme:`outlined`};function k6(){return k6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,k6({},e,{ref:t,icon:O6}))),j6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 464H528V448h312v128zm0 264H184V184h656v200H496c-17.7 0-32 14.3-32 32v192c0 17.7 14.3 32 32 32h344v200zM580 512a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`wallet`,theme:`outlined`};function M6(){return M6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,M6({},e,{ref:t,icon:j6}))),P6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M690.1 377.4c5.9 0 11.8.2 17.6.5-24.4-128.7-158.3-227.1-319.9-227.1C209 150.8 64 271.4 64 420.2c0 81.1 43.6 154.2 111.9 203.6a21.5 21.5 0 019.1 17.6c0 2.4-.5 4.6-1.1 6.9-5.5 20.3-14.2 52.8-14.6 54.3-.7 2.6-1.7 5.2-1.7 7.9 0 5.9 4.8 10.8 10.8 10.8 2.3 0 4.2-.9 6.2-2l70.9-40.9c5.3-3.1 11-5 17.2-5 3.2 0 6.4.5 9.5 1.4 33.1 9.5 68.8 14.8 105.7 14.8 6 0 11.9-.1 17.8-.4-7.1-21-10.9-43.1-10.9-66 0-135.8 132.2-245.8 295.3-245.8zm-194.3-86.5c23.8 0 43.2 19.3 43.2 43.1s-19.3 43.1-43.2 43.1c-23.8 0-43.2-19.3-43.2-43.1s19.4-43.1 43.2-43.1zm-215.9 86.2c-23.8 0-43.2-19.3-43.2-43.1s19.3-43.1 43.2-43.1 43.2 19.3 43.2 43.1-19.4 43.1-43.2 43.1zm586.8 415.6c56.9-41.2 93.2-102 93.2-169.7 0-124-120.8-224.5-269.9-224.5-149 0-269.9 100.5-269.9 224.5S540.9 847.5 690 847.5c30.8 0 60.6-4.4 88.1-12.3 2.6-.8 5.2-1.2 7.9-1.2 5.2 0 9.9 1.6 14.3 4.1l59.1 34c1.7 1 3.3 1.7 5.2 1.7a9 9 0 006.4-2.6 9 9 0 002.6-6.4c0-2.2-.9-4.4-1.4-6.6-.3-1.2-7.6-28.3-12.2-45.3-.5-1.9-.9-3.8-.9-5.7.1-5.9 3.1-11.2 7.6-14.5zM600.2 587.2c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9c0 19.8-16.2 35.9-36 35.9zm179.9 0c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9a36.08 36.08 0 01-36 35.9z`}}]},name:`wechat`,theme:`outlined`};function F6(){return F6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,F6({},e,{ref:t,icon:P6}))),L6=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},R6=(e=>e?L6(e):L6),z6=e=>e;function B6(e,t=z6){let n=S.useSyncExternalStore(e.subscribe,S.useCallback(()=>t(e.getState()),[e,t]),S.useCallback(()=>t(e.getInitialState()),[e,t]));return S.useDebugValue(n),n}var V6=e=>{let t=R6(e),n=e=>B6(t,e);return Object.assign(n,t),n},H6=(e=>e?V6(e):V6),U6=c(I1(),1),W6=`AES-GCM`,G6=12,K6=128;async function q6(){throw Error(`VITE_ENCRYPTION_KEY not configured`)}async function J6(e){let t=await q6(),n=crypto.getRandomValues(new Uint8Array(G6)),r=new TextEncoder().encode(e),i=await crypto.subtle.encrypt({name:W6,iv:n,tagLength:K6},t,r),a=new Uint8Array(i),o=new Uint8Array(n.length+a.length);return o.set(n),o.set(a,n.length),btoa(String.fromCharCode(...o))}async function Y6(e){let t=await q6(),n=Uint8Array.from(atob(e),e=>e.charCodeAt(0)),r=n.slice(0,G6),i=n.slice(G6),a=await crypto.subtle.decrypt({name:W6,iv:r,tagLength:K6},t,i);return new TextDecoder().decode(a)}var X6=`http://ceshi.apiforeign.minzhong.cn`,Z6=!1;function Q6(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}function $6(e){return Array.isArray(e)?e.map($6):typeof e==`object`&&e?Object.fromEntries(Object.entries(e).map(([e,t])=>[Q6(e),$6(t)])):e}function e8(){return localStorage.getItem(`auth_token`)}function t8(e){localStorage.setItem(`auth_token`,e)}function n8(){localStorage.removeItem(`auth_token`)}async function r8(e){try{return await Y6(e)}catch{return null}}async function i8(e,t={}){let{method:n=`GET`,body:r,auth:i=!0,encryptBody:a=Z6}=t,o={"Content-Type":`application/json`};if(i){let e=e8();e&&(o.Authorization=`Bearer ${e}`)}let s;if(r!==void 0){let e=JSON.stringify(r);a?(o[`X-Encrypted`]=`true`,s=JSON.stringify({data:await J6(e)})):s=e}let c=await fetch(`${X6}/api${e}`,{method:n,headers:o,body:s});if(c.status===204)return;let l=await c.text();if(!l)return;let u;try{u=JSON.parse(l)}catch{throw Error(`响应解析失败 (${c.status})`)}if(u&&typeof u.data==`string`&&a){let e=await r8(u.data);e!==null&&(u=JSON.parse(e))}if(!c.ok){let e=u?.detail||`请求失败 (${c.status})`;throw c.status===401&&(n8(),window.location.pathname!==`/login`&&(window.location.href=`/login`)),Error(e)}return $6(u)}var a8={get:(e,t=!0)=>i8(e,{auth:t}),post:(e,t,n=!0)=>i8(e,{method:`POST`,body:t,auth:n}),put:(e,t,n=!0)=>i8(e,{method:`PUT`,body:t,auth:n}),delete:(e,t=!0)=>i8(e,{method:`DELETE`,auth:t})};async function o8(e,t,n,r){let i=await a8.post(`/auth/admin-login`,{username:e,password:t,captcha_token:n,remember_me:r||!1},!1);return t8(i.accessToken),i.user}async function s8(){await a8.post(`/auth/logout`),n8()}async function c8(){try{return await a8.get(`/auth/me`)}catch{return null}}async function l8(e,t){let n={};e&&(n.start_date=e),t&&(n.end_date=t);let r=new URLSearchParams(n).toString();return a8.get(`/admin/stats${r?`?${r}`:``}`)}async function u8(e=1,t=20,n,r,i){let a=new URLSearchParams;return a.set(`page`,String(e)),a.set(`page_size`,String(t)),n&&a.set(`search`,n),r&&a.set(`user_type`,r),i&&a.set(`frontend_user_kind`,i),a8.get(`/admin/users?${a.toString()}`)}async function d8(e,t){return a8.put(`/admin/users/${e}/frontend-kind`,{frontend_user_kind:t})}async function f8(e,t,n){await a8.post(`/admin/users/${e}/credits`,{amount:t,description:n})}async function p8(e,t){await a8.put(`/admin/users/${e}/status`,{is_active:t})}async function m8(){return a8.get(`/admin/model-configs`)}async function h8(e){return e.id?a8.put(`/admin/model-configs/${e.id}`,e):a8.post(`/admin/model-configs`,e)}async function g8(e){await a8.delete(`/admin/model-configs/${e}`)}async function _8(){return a8.get(`/admin/system-configs`)}async function v8(e,t){await a8.put(`/admin/system-configs/${e}`,{value:t})}async function y8(e,t){let n=new FormData;n.append(`file`,e),n.append(`config_key`,t);let r=localStorage.getItem(`auth_token`),i=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/admin/upload-pdf`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!i.ok){let e=await i.text();throw Error(e||`上传失败`)}return i.json()}async function b8(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/admin/upload-logo`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok){let e=await r.text();throw Error(e||`上传失败`)}return r.json()}function x8(e,t,n){n!=null&&String(n)!==``&&e.set(t,String(n))}async function S8(e){let t=new URLSearchParams;x8(t,`page`,e?.page),x8(t,`page_size`,e?.pageSize),x8(t,`user_id`,e?.userId),x8(t,`user_name`,e?.userName),x8(t,`user_type`,e?.userType),x8(t,`frontend_user_kind`,e?.frontendUserKind),x8(t,`record_type`,e?.recordType||e?.type),x8(t,`credit_subject`,e?.creditSubject),x8(t,`media_type`,e?.mediaType),x8(t,`charge_kind`,e?.chargeKind),x8(t,`source_module`,e?.sourceModule),x8(t,`source_step_code`,e?.sourceStepCode),x8(t,`billing_scene`,e?.billingScene),x8(t,`start_date`,e?.startDate),x8(t,`end_date`,e?.endDate);let n=t.toString()?`?${t}`:``;return a8.get(`/admin/credit-records${n}`)}async function C8(){return a8.get(`/admin/industry-configs`)}async function w8(e){return e.id?a8.put(`/admin/industry-configs/${e.id}`,e):a8.post(`/admin/industry-configs`,e)}async function T8(e){await a8.delete(`/admin/industry-configs/${e}`)}async function E8(){return a8.get(`/admin/video-engines`)}async function D8(e){return e.id?a8.put(`/admin/video-engines/${e.id}`,e):a8.post(`/admin/video-engines`,e)}async function O8(e){await a8.delete(`/admin/video-engines/${e}`)}async function k8(){return a8.get(`/admin/image-engines`)}async function A8(e){return e.id?a8.put(`/admin/image-engines/${e.id}`,e):a8.post(`/admin/image-engines`,e)}async function j8(e){await a8.delete(`/admin/image-engines/${e}`)}async function M8(){return a8.get(`/admin/credit-ratios`)}async function N8(e){return e.id?a8.put(`/admin/credit-ratios/${e.id}`,e):a8.post(`/admin/credit-ratios`,e)}async function P8(e){await a8.delete(`/admin/credit-ratios/${e}`)}async function F8(){return a8.get(`/admin/payment-configs`)}async function I8(e){await a8.put(`/admin/payment-configs/batch`,e)}async function L8(e){let t=new URLSearchParams;e?.paymentMethod&&t.set(`payment_method`,e.paymentMethod),e?.status&&t.set(`status`,e.status),e?.startDate&&t.set(`start_date`,e.startDate),e?.endDate&&t.set(`end_date`,e.endDate);let n=t.toString(),r=n?`/admin/payment-stats?${n}`:`/admin/payment-stats`;return a8.get(r)}async function R8(e){let t=new URLSearchParams;return e?.method&&t.set(`payment_method`,e.method),e?.status&&t.set(`status`,e.status),e?.startDate&&t.set(`start_date`,e.startDate),e?.endDate&&t.set(`end_date`,e.endDate),e?.page&&t.set(`page`,String(e.page)),e?.pageSize&&t.set(`page_size`,String(e.pageSize)),a8.get(`/admin/payment-orders?${t.toString()}`)}async function z8(e){await a8.post(`/admin/payment-orders/${e}/refund`)}async function B8(e=1,t=20){let n=new URLSearchParams;return n.set(`page`,String(e)),n.set(`page_size`,String(t)),a8.get(`/admin/notifications?${n.toString()}`)}async function V8(e){await a8.post(`/admin/notifications`,e)}async function H8(e){await a8.delete(`/admin/notifications/${e}`)}async function U8(e){return a8.get(`/admin/notifications/${e}/read-users`)}async function W8(){return a8.get(`/admin/menu-configs`)}async function G8(e){return e.id?a8.put(`/admin/menu-configs/${e.id}`,e):a8.post(`/admin/menu-configs`,e)}async function K8(e){await a8.delete(`/admin/menu-configs/${e}`)}async function q8(e){return a8.post(`/admin/users`,e)}async function J8(e,t){await a8.put(`/admin/users/${e}/menus`,{allowed_menus:t})}async function Y8(e,t){await a8.put(`/admin/users/${e}/reset-password`,{new_password:t})}async function X8(e,t){await a8.post(`/admin/change-password`,{old_password:e,new_password:t})}async function Z8(){return a8.get(`/auth/site-info`,!1)}async function Q8(){return a8.get(`/admin/recharge-packages`)}async function $8(e){return e.id?a8.put(`/admin/recharge-packages/${e.id}`,e):a8.post(`/admin/recharge-packages`,e)}async function e5(e){await a8.delete(`/admin/recharge-packages/${e}`)}async function t5(e){let t=e?`?page=${e}`:``;return a8.get(`/admin/operation-logs${t}`)}async function n5(e){let t=e?`?page=${e}`:``;return a8.get(`/admin/user-oauth-apps/list${t}`)}async function r5(e){return a8.post(`/admin/user-oauth-apps/create`,e)}async function i5(e){return a8.get(`/admin/user-oauth-apps/read/${e}`)}async function a5(e,t){return a8.post(`/admin/user-oauth-apps/update/${e}`,t)}async function o5(e){await a8.get(`/admin/user-oauth-apps/delete/${e}`)}async function s5(e){let t=new URLSearchParams;e?.page&&t.set(`page`,String(e.page)),e?.page_size&&t.set(`page_size`,String(e.page_size)),e?.type_name&&t.set(`type_name`,e.type_name),e?.open_type&&t.set(`open_type`,String(e.open_type));let n=t.toString();return a8.get(`/open-type/list${n?`?${n}`:``}`)}async function c5(e){return a8.get(`/open-type/select/${e}`)}async function l5(e){return a8.post(`/open-type/create`,e)}async function u5(e,t){return a8.put(`/open-type/update/${e}`,t)}async function d5(e){await a8.delete(`/open-type/delete/${e}`)}async function f5(e){let t=new URLSearchParams;e?.userId&&t.set(`user_id`,e.userId),e?.status&&t.set(`status`,e.status),e?.page&&t.set(`page`,String(e.page)),e?.pageSize&&t.set(`page_size`,String(e.pageSize));let n=t.toString();return a8.get(`/admin/generation-records${n?`?${n}`:``}`)}async function p5(e,t,n){await a8.put(`/admin/generation-records/${e}/status`,{status:t,video_url:n})}async function m5(e,t,n,r){await a8.post(`/admin/generation-records/${e}/generate`,{aspect_ratio:t,resolution:n,image_size:r})}async function h5(){return a8.get(`/generation-ai/engines`)}async function g5(e){let t=new URLSearchParams;e?.genType&&t.set(`gen_type`,e.genType),e?.status&&t.set(`status`,e.status),e?.page&&t.set(`page`,String(e.page)),e?.pageSize&&t.set(`page_size`,String(e.pageSize)),e?.userId&&t.set(`user_id`,e.userId),e?.userName&&t.set(`user_name`,e.userName);let n=t.toString();return a8.get(`/generation-ai/tasks${n?`?${n}`:``}`)}function _5(e,t,n){n==null||String(n).trim()===``||e.set(t,String(n))}async function v5(e){let t=new URLSearchParams;_5(t,`status`,e?.status),_5(t,`keyword`,e?.keyword),_5(t,`user_id`,e?.userId),_5(t,`user_name`,e?.userName),_5(t,`created_start`,e?.createdStart),_5(t,`created_end`,e?.createdEnd),_5(t,`page`,e?.page),_5(t,`page_size`,e?.pageSize);let n=t.toString();return a8.get(`/hot-opening-replications/tasks${n?`?${n}`:``}`)}async function y5(e){return a8.get(`/hot-opening-replications/tasks/${e}`)}async function b5(e){let t=new URLSearchParams;_5(t,`status`,e?.status),_5(t,`analysis_status`,e?.analysisStatus),_5(t,`split_status`,e?.splitStatus),_5(t,`keyword`,e?.keyword),_5(t,`user_id`,e?.userId),_5(t,`user_name`,e?.userName),_5(t,`created_start`,e?.createdStart),_5(t,`created_end`,e?.createdEnd),_5(t,`page`,e?.page),_5(t,`page_size`,e?.pageSize);let n=t.toString();return a8.get(`/shot-replications/task-sets${n?`?${n}`:``}`)}async function x5(e){return a8.get(`/shot-replications/task-sets/${e}`)}async function S5(e,t){let n=new URLSearchParams;_5(n,`source_mode`,t?.sourceMode),_5(n,`split_status`,t?.splitStatus),_5(n,`analysis_status`,t?.analysisStatus),_5(n,`replicate_status`,t?.replicateStatus),_5(n,`page`,t?.page),_5(n,`page_size`,t?.pageSize);let r=n.toString();return a8.get(`/shot-replications/task-sets/${e}/segments${r?`?${r}`:``}`)}async function C5(e){return a8.get(`/shot-replications/segments/${e}`)}async function w5(e){return a8.get(`/shot-replications/projects/${e}`)}async function T5(){return a8.get(`/admin/video-prompt-schema-config`)}async function E5(e){return a8.put(`/admin/video-prompt-schema-config`,e)}async function D5(){return a8.post(`/admin/video-prompt-schema-config/reset-default`)}async function O5(){return a8.get(`/admin/video-prompt-schema-config/export`)}async function k5(e){return a8.post(`/admin/video-prompt-schema-config/import`,e)}async function A5(e){return a8.post(`/admin/video-prompt-schema-config/preview`,e)}async function j5(e){return a8.post(`/user-oauth/request_oauth`,e)}async function M5(e){let t=new URLSearchParams;return e.account_userid&&t.set(`account_userid`,e.account_userid),e.open_type!==void 0&&t.set(`open_type`,String(e.open_type)),e.account_id&&t.set(`account_id`,e.account_id),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),a8.get(`/user-oauth/oauth_list?${t.toString()}`)}async function N5(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/generation-records/upload-image`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok)throw Error(`图片上传失败`);let i=await r.json();return{url:i.url,filename:i.filename}}async function P5(){return a8.get(`/material-consumption/fields`)}async function F5(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.user_id&&t.set(`user_id`,e.user_id),e.consume_date!==void 0&&t.set(`consume_date`,e.consume_date[0]+`,`+e.consume_date[1]),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),a8.get(`/material-consumption/admin/list?${t.toString()}`)}var I5=H6(e=>({user:null,loading:!0,login:async(t,n,r)=>{e({user:await o8(t,n,void 0,r)})},logout:async()=>{await s8(),e({user:null})},checkAuth:async()=>{try{if(!localStorage.getItem(`auth_token`)){e({user:null,loading:!1});return}e({user:await c8(),loading:!1})}catch(t){(t?.message?.includes(`401`)||t?.message?.includes(`Unauthorized`))&&localStorage.removeItem(`auth_token`),e({user:null,loading:!1})}}})),L5=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Q=o(((e,t)=>{t.exports=L5()}))(),{Sider:R5,Content:z5}=wW,B5={HomeOutlined:(0,Q.jsx)(Z2,{}),PlayCircleOutlined:(0,Q.jsx)(J4,{}),WalletOutlined:(0,Q.jsx)(N6,{}),RobotOutlined:(0,Q.jsx)(o3,{}),SettingOutlined:(0,Q.jsx)(D3,{}),BellOutlined:(0,Q.jsx)(f0,{}),UserOutlined:(0,Q.jsx)(D6,{}),AppstoreOutlined:(0,Q.jsx)(G1,{}),FileTextOutlined:(0,Q.jsx)(KV,{}),StarOutlined:(0,Q.jsx)(Z3,{}),HeartOutlined:(0,Q.jsx)(H2,{}),CameraOutlined:(0,Q.jsx)(D0,{}),DashboardOutlined:(0,Q.jsx)(r2,{}),CalculatorOutlined:(0,Q.jsx)(w0,{}),DollarOutlined:(0,Q.jsx)(l2,{}),GiftOutlined:(0,Q.jsx)(I2,{}),ThunderboltOutlined:(0,Q.jsx)(l6,{}),FireOutlined:(0,Q.jsx)(D2,{}),CloudOutlined:(0,Q.jsx)(z0,{}),SmileOutlined:(0,Q.jsx)(H3,{}),TrophyOutlined:(0,Q.jsx)(h6,{}),RocketOutlined:(0,Q.jsx)(l3,{}),BulbOutlined:(0,Q.jsx)(x0,{}),CodeOutlined:(0,Q.jsx)(G0,{}),PictureOutlined:(0,Q.jsx)(H4,{}),VideoCameraOutlined:(0,Q.jsx)(A6,{}),AudioOutlined:(0,Q.jsx)(r0,{}),MailOutlined:(0,Q.jsx)(v4,{}),PhoneOutlined:(0,Q.jsx)(z4,{}),GlobalOutlined:(0,Q.jsx)(z2,{}),ShoppingCartOutlined:(0,Q.jsx)(A3,{}),TeamOutlined:(0,Q.jsx)(o6,{}),BarChartOutlined:(0,Q.jsx)(l0,{}),PieChartOutlined:(0,Q.jsx)(G4,{}),LineChartOutlined:(0,Q.jsx)(o4,{}),SecurityScanOutlined:(0,Q.jsx)(x3,{}),ApiOutlined:(0,Q.jsx)(H1,{}),DatabaseOutlined:(0,Q.jsx)(o2,{}),CloudServerOutlined:(0,Q.jsx)(H0,{}),MenuOutlined:(0,Q.jsx)(w4,{}),PlusOutlined:(0,Q.jsx)(TL,{}),EditOutlined:(0,Q.jsx)(zQ,{}),DeleteOutlined:(0,Q.jsx)(IQ,{}),LockOutlined:(0,Q.jsx)(f4,{}),LogoutOutlined:(0,Q.jsx)(h4,{})},V5=()=>{let e=Ye(),t=Ke(),{user:n,loading:r,logout:i}=I5(),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)(!1),[l]=X.useForm(),[u,d]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`);return e&&JSON.parse(e).siteName||`管理后台`}),[f,p]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`);return e&&JSON.parse(e).siteLogo||``});if((0,S.useEffect)(()=>{Z8().then(e=>{let t=e.siteName||`管理后台`,n=e.siteLogo||``;if(d(t),p(n),document.title=t,localStorage.setItem(`siteInfo`,JSON.stringify({siteName:t,siteLogo:n})),n){let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=n,e.type=`image/png`}}).catch(()=>{})},[]),(0,S.useEffect)(()=>{W8().then(e=>{let t=e.filter(e=>{let t=e.menu_target??e.menuTarget??`admin`;return(e.is_active??e.isActive??!0)&&(t===`admin`||t===`both`)}),r=!!(n?.isAdmin??n?.is_admin);if(n&&!r){let e=n.allowedMenus??n?.allowed_menus;if(e&&Array.isArray(e)&&e.length>0){let n=new Set(e);t=t.filter(e=>(e.menu_type??e.menuType)===`group`?t.some(t=>(t.parent_id??t.parentId)===e.id&&n.has(t.path)):n.has(e.path))}else t=[]}o(t)}).catch(()=>{})},[n]),r)return(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,Q.jsx)(SG,{size:`large`})});if(!n)return(0,Q.jsx)(Ct,{to:`/admin/login`,replace:!0});let m={};a.filter(e=>(e.menu_type??e.menuType)!==`group`&&(e.parent_id??e.parentId)).forEach(e=>{let t=e.parent_id??e.parentId;m[t]||(m[t]=[]),m[t].push(e)});let h=[...a].sort((e,t)=>(e.sort_order??e.sortOrder??0)-(t.sort_order??t.sortOrder??0)),g=[];h.forEach(e=>{let t=e.menu_type??e.menuType,n=e.parent_id??e.parentId;if(t===`group`){let t=(m[e.id]||[]).sort((e,t)=>(e.sort_order??e.sortOrder??0)-(t.sort_order??t.sortOrder??0)).map(e=>({key:e.path,icon:B5[e.icon]||void 0,label:e.label}));t.length>0&&g.push({key:`group-${e.id}`,icon:B5[e.icon]||void 0,label:e.label,children:t})}else n||g.push({key:e.path,icon:B5[e.icon]||void 0,label:e.label})});let _=!!(n?.isAdmin??n?.is_admin);g.length===0&&_&&g.push({key:`/`,icon:(0,Q.jsx)(r2,{}),label:`数据概览`},{key:`/users`,icon:(0,Q.jsx)(D6,{}),label:`用户管理`});let v=t.pathname,y=[];g.forEach(e=>{e.children?e.children.forEach(e=>y.push(e.key)):y.push(e.key)}),y.includes(v)||(v=y.find(e=>v.startsWith(e))||`/`);let b=[];return g.forEach(e=>{e.children&&e.children.some(e=>e.key===v)&&b.push(e.key)}),(0,Q.jsxs)(wW,{style:{minHeight:`100vh`,background:`#f1f5f9`},children:[(0,Q.jsxs)(R5,{width:240,theme:`light`,style:{position:`fixed`,left:16,top:16,bottom:16,width:240,background:`linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,border:`1px solid rgba(0, 0, 0, 0.06)`,zIndex:100},children:[(0,Q.jsxs)(`div`,{style:{height:80,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:12,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`},children:[(0,Q.jsx)(`div`,{style:{width:42,height:42,borderRadius:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,overflow:`hidden`},children:f?(0,Q.jsx)(`img`,{src:f,alt:`logo`,style:{width:28,height:28,objectFit:`contain`}}):(0,Q.jsx)(l6,{style:{fontSize:20,color:`#ffffff`}})}),(0,Q.jsx)(`span`,{style:{color:`#1e293b`,fontSize:17,fontWeight:700,letterSpacing:-.02,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:u})]}),(0,Q.jsx)(`div`,{style:{overflowY:`auto`,maxHeight:`calc(100vh - 200px)`,paddingRight:8},children:(0,Q.jsx)(GE,{mode:`inline`,selectedKeys:[v],defaultOpenKeys:b,items:g,style:{background:`transparent`,border:`none`,paddingTop:8,marginTop:8},onClick:({key:t})=>{t.startsWith(`group-`)||e(t)},theme:`light`})}),(0,Q.jsx)(`div`,{style:{position:`absolute`,bottom:16,left:16,right:16,padding:12,background:`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,borderRadius:12,border:`1px solid rgba(0, 0, 0, 0.06)`},children:(0,Q.jsx)(UV,{menu:{items:[{key:`user`,icon:(0,Q.jsx)(D6,{}),label:n?.username,disabled:!0},{type:`divider`},{key:`changePwd`,icon:(0,Q.jsx)(f4,{}),label:`修改密码`},{key:`logout`,icon:(0,Q.jsx)(h4,{}),label:`退出登录`,danger:!0}],onClick:({key:t})=>{t===`logout`&&(i(),e(`/login`)),t===`changePwd`&&(c(!0),l.resetFields())}},placement:`topRight`,arrow:!0,children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,cursor:`pointer`,padding:`8px 12px`,borderRadius:12,transition:`all 0.25s ease`,background:`transparent`},onMouseEnter:e=>{e.currentTarget.style.background=`#ffffff`,e.currentTarget.style.boxShadow=`0 4px 12px rgba(0, 0, 0, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`,e.currentTarget.style.boxShadow=`none`},children:[(0,Q.jsx)(zw,{size:32,icon:(0,Q.jsx)(D6,{}),style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`}}),(0,Q.jsxs)(`div`,{style:{flex:1,overflow:`hidden`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:13,fontWeight:600,color:`#1e293b`,display:`block`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:n?.username}),(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:_?`管理员`:`普通用户`})]})]})})})]}),(0,Q.jsxs)(wW,{style:{marginLeft:272,marginTop:16,marginRight:16,marginBottom:16,background:`transparent`},children:[(0,Q.jsx)(`div`,{style:{height:72,background:`#ffffff`,borderRadius:`16px 16px 0 0`,boxShadow:`0 2px 12px rgba(0, 0, 0, 0.04)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`0 32px`,fontFamily:`var(--font-sans)`,border:`1px solid rgba(0, 0, 0, 0.06)`,borderBottom:`none`},children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:18,color:`#1e293b`,fontWeight:600},children:g.find(e=>e.key===v)?.label||g.flatMap(e=>e.children||[]).find(e=>e.key===v)?.label||`管理后台`})}),(0,Q.jsx)(z5,{style:{padding:32,background:`#ffffff`,borderRadius:`0 0 16px 16px`,boxShadow:`0 4px 24px rgba(0, 0, 0, 0.06)`,overflow:`auto`,border:`1px solid rgba(0, 0, 0, 0.06)`,borderTop:`none`},children:g.length===0&&!_?(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`60vh`,color:`#94a3b8`},children:[(0,Q.jsx)(f4,{style:{fontSize:48,marginBottom:16,color:`#cbd5e1`}}),(0,Q.jsx)(`div`,{style:{fontSize:16,fontWeight:600,color:`#64748b`},children:`暂无任何权限`}),(0,Q.jsx)(`div`,{style:{fontSize:13,marginTop:8},children:`请联系管理员配置菜单权限`})]}):(0,Q.jsx)(wt,{})})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(f4,{}),`修改密码`]}),open:s,onOk:async()=>{try{let e=await l.validateFields();if(e.newPassword!==e.confirmPassword){LG.error(`两次输入的密码不一致`);return}await X8(e.oldPassword,e.newPassword),LG.success(`密码修改成功`),c(!1),l.resetFields()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`修改失败`)}},onCancel:()=>{c(!1),l.resetFields()},okText:`确认修改`,cancelText:`取消`,width:420,children:(0,Q.jsxs)(X,{form:l,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`oldPassword`,label:`原密码`,rules:[{required:!0,message:`请输入原密码`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请输入原密码`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`newPassword`,label:`新密码`,rules:[{required:!0,min:6,message:`密码至少6位`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`confirmPassword`,label:`确认新密码`,rules:[{required:!0,message:`请再次输入新密码`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请再次输入新密码`,size:`large`})})]})})]})},H5={1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`},U5={1:`巨量`,2:`磁力`,3:`巨量星图`,4:`服务单`,5:`腾讯`},W5=e=>{if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`},G5=()=>{let{message:e}=ox.useApp(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(void 0),[d,f]=(0,S.useState)(1),[p,m]=(0,S.useState)(10),[h,g]=(0,S.useState)(0),[_,v]=(0,S.useState)({account_userid:``,open_type:void 0,account_id:``});(0,S.useEffect)(()=>{y()},[]);let y=async(t=1,r=10,i=_)=>{o(!0);try{let e=await M5({page:t,page_size:r,account_userid:i.account_userid||void 0,open_type:i.open_type,account_id:i.account_id||void 0});e?(e.data&&n(e.data.data||e.data),e.pagination&&(g(e.pagination.total||0),f(e.pagination.page||1),m(e.pagination.pageSize||10))):n(e||[])}catch{e.error(`获取授权列表失败`)}finally{o(!1)}},b=()=>{c(!0)},x=async()=>{if(!l){e.warning(`请选择开户方式`);return}i(!0);try{let t=await j5({open_type:l});t.authUrl?window.open(t.authUrl,`_blank`):e.error(`获取授权链接失败`)}catch{e.error(`请求授权失败`)}finally{i(!1),c(!1),u(void 0)}},C=[{title:`ID`,dataIndex:`id`,key:`id`},{title:`授权账户ID`,dataIndex:`accountId`,key:`accountId`,width:160},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权账户用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,render:e=>(0,Q.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})},{title:`授权账户用户名`,dataIndex:`accountUsername`,key:`accountUsername`},{title:`授权应用ID`,dataIndex:`appid`,key:`appid`},{title:`是否敏感物料授权`,dataIndex:`materialAuthStatus`,key:`materialAuthStatus`,width:100,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`是`:`否`})},{title:`开户方式`,dataIndex:`openType`,key:`openType`,render:e=>(0,Q.jsx)(`span`,{style:{color:`#1e293b`},children:H5[e]||e})},{title:`平台端口`,dataIndex:`portType`,key:`portType`,ellipsis:!0,render:e=>(0,Q.jsx)(`span`,{style:{color:`#1e293b`},children:U5[e]||e})},{title:`用户id`,dataIndex:`userId`,key:`userId`},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,Q.jsx)(`span`,{style:{color:`#64748b`},children:W5(e)})},{title:`更新时间`,dataIndex:`updatedAt`,key:`updatedAt`,width:160,render:e=>(0,Q.jsx)(`span`,{style:{color:`#64748b`},children:W5(e)})},{title:`操作`,key:`action`,width:120,render:(e,t)=>(0,Q.jsx)(vn,{to:`/consume?accountId=${t.id}`,style:{color:`#6366f1`},children:`查看消耗`})}],w=t.map((e,t)=>({...e,index:t+1,key:e.id}));return(0,Q.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(f4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`授权管理`})]}),(0,Q.jsx)(qE,{type:`primary`,size:`medium`,icon:(0,Q.jsx)(TL,{}),onClick:b,loading:r,style:{borderRadius:8,fontSize:14,fontWeight:500},children:`点击授权`})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12,marginBottom:16},children:[(0,Q.jsx)(hW,{placeholder:`账号用户ID`,value:_.account_userid,onChange:e=>v(t=>({...t,account_userid:e.target.value})),style:{width:180},onPressEnter:()=>{f(1),y(1,p)}}),(0,Q.jsx)(RC,{placeholder:`开户方式`,value:_.open_type,onChange:e=>v(t=>({...t,open_type:e})),style:{width:140},options:Object.entries(H5).map(([e,t])=>({value:Number(e),label:t}))}),(0,Q.jsx)(hW,{placeholder:`账号ID`,value:_.account_id,onChange:e=>v(t=>({...t,account_id:e.target.value})),style:{width:180},onPressEnter:()=>{f(1),y(1,p)}}),(0,Q.jsx)(qE,{type:`primary`,size:`medium`,onClick:()=>{f(1),y(1,p)},children:`搜索`}),(0,Q.jsx)(qE,{size:`medium`,onClick:()=>{v({account_userid:``,open_type:void 0,account_id:``}),f(1),y(1,p)},children:`重置`})]}),(0,Q.jsx)(bQ,{dataSource:w,columns:C,loading:a,rowKey:`id`,bordered:!1,scroll:{x:`max-content`},pagination:{current:d,pageSize:p,total:h,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{f(e),m(t),y(e,t)},size:`small`}})]}),(0,Q.jsx)(BG,{title:`选择开户方式`,open:s,onOk:x,onCancel:()=>{c(!1),u(void 0)},okText:`确认授权`,cancelText:`取消`,confirmLoading:r,children:(0,Q.jsx)(RC,{placeholder:`请选择开户方式`,value:l,onChange:e=>u(e),style:{width:`100%`},options:Object.entries(H5).map(([e,t])=>({value:Number(e),label:t}))})})]})},{RangePicker:K5}=YB,q5=e=>e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),J5=()=>{Ye();let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)([]),[u,d]=(0,S.useState)([]),[f,p]=(0,S.useState)(``),[m,h]=(0,S.useState)(1),[g,_]=(0,S.useState)(10),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)();(0,S.useEffect)(()=>{E(),T()},[m,g,C]);let T=async()=>{a(!0);try{let e=await F5({advertiser_id:v||void 0,user_id:b||void 0,consume_date:C,page:m,page_size:g});t(e.data||[]),r(e.pagination?.total||0)}catch{LG.error(`加载数据失败`)}finally{a(!1)}},E=async()=>{try{let e=((await P5()).data||[]).map(e=>({name:q5(e.field),description:e.description}));l(e);let t=localStorage.getItem(`consumeColumns`);d(t?JSON.parse(t):e.map(e=>e.name))}catch{LG.error(`加载表头字段失败`)}},D=e.map((e,t)=>({...e,index:t+1,key:e.id})),O=()=>{h(1),T()},k=()=>{y(``),x(``),w(void 0),h(1),T()},A=u.map(e=>c.find(t=>t.name===e)).filter(e=>!!e).map(e=>({title:e.description,dataIndex:e.name,key:e.name,ellipsis:!0}));return(0,Q.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(l2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`消耗记录`})]}),(0,Q.jsx)(VV,{children:(0,Q.jsx)(qE,{icon:(0,Q.jsx)(D3,{}),onClick:()=>s(!0),children:`自定义表头`})})]}),(0,Q.jsx)(`div`,{style:{marginBottom:16},children:(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(hW,{placeholder:`广告主ID`,value:v,onChange:e=>y(e.target.value),style:{width:200}}),(0,Q.jsx)(hW,{placeholder:`用户ID`,value:b,onChange:e=>x(e.target.value),style:{width:200}}),(0,Q.jsx)(K5,{value:C?[(0,YE.default)(C[0]),(0,YE.default)(C[1])]:void 0,onChange:e=>{e&&e[0]&&e[1]?w([e[0].format(`YYYY-MM-DD`),e[1].format(`YYYY-MM-DD`)]):w(void 0)}}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(NC,{}),onClick:O,children:`搜索`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:k,children:`重置`})]})}),(0,Q.jsx)(bQ,{dataSource:D,columns:A,loading:i,rowKey:`id`,bordered:!1,scroll:{x:`max-content`},pagination:{current:m,pageSize:g,total:n,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,size:`small`,onChange:(e,t)=>{h(e),_(t)}}})]}),(0,Q.jsx)(BG,{title:`自定义表头`,open:o,onOk:()=>{localStorage.setItem(`consumeColumns`,JSON.stringify(u)),LG.success(`表头设置已保存`),s(!1)},onCancel:()=>{s(!1),p(``)},okText:`确定`,cancelText:`取消`,width:800,children:(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:20,height:400},children:[(0,Q.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,Q.jsx)(hW,{placeholder:`搜索指标...`,value:f,allowClear:!0,onChange:e=>p(e.target.value),style:{marginBottom:8}}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,marginBottom:12,display:`block`},children:`输入指标名称进行搜索`}),(0,Q.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:[(0,Q.jsx)(`div`,{style:{marginBottom:16},children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:`任务详情指标`})}),(0,Q.jsx)(oz,{checked:u.length===c.length&&c.length>0,indeterminate:u.length>0&&u.length{e.target.checked?d(c.map(e=>e.name)):d([])},style:{marginBottom:12},children:`全选`}),(0,Q.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:8},children:c.filter(e=>e.description.toLowerCase().includes(f.toLowerCase())||e.name.toLowerCase().includes(f.toLowerCase())).map(e=>(0,Q.jsx)(oz,{checked:u.includes(e.name),onChange:t=>{t.target.checked?d(t=>[...t,e.name]):d(t=>t.filter(t=>t!==e.name))},children:e.description},e.name))})]})]}),(0,Q.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,Q.jsxs)(Z.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:[`已添加(`,u.length,`)`]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{size:`small`,onClick:()=>d([]),disabled:u.length===0,children:`清空`}),(0,Q.jsx)(qE,{size:`small`,onClick:async()=>{try{let e=((await P5()).data||[]).map(e=>({name:q5(e.field),description:e.description}));l(e),d(e.map(e=>e.name)),localStorage.removeItem(`consumeColumns`),LG.success(`表头字段已更新`)}catch{LG.error(`更新表头字段失败`)}},children:`更新表头字段`})]})]}),(0,Q.jsx)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:u.length===0?(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:14,textAlign:`center`,display:`block`,padding:`40px 0`},children:`暂无已选指标`}):(0,Q.jsx)(`div`,{children:u.map((e,t)=>{let n=c.find(t=>t.name===e);return(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`8px 12px`,borderBottom:`1px solid #f0f0f5`,cursor:`move`,userSelect:`none`},draggable:!0,onDragStart:e=>{e.dataTransfer.setData(`index`,String(t))},onDragOver:e=>{e.preventDefault()},onDrop:e=>{let n=parseInt(e.dataTransfer.getData(`index`)),r=t;if(n!==r){let e=[...u],[t]=e.splice(n,1);e.splice(r,0,t),d(e)}},children:[(0,Q.jsx)(Z.Text,{children:n?.description||e}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:t+1})]},e)})})})]})]})})]})},Y5=()=>{let e=Ye(),{login:t}=I5(),[n,r]=(0,S.useState)(!1),i=(()=>{try{let e=localStorage.getItem(`siteInfo`);if(e){let t=JSON.parse(e);return{siteName:t.siteName||`VideoGen.AI`,siteLogo:t.siteLogo||``}}}catch{}return{siteName:`VideoGen.AI`,siteLogo:``}})(),[a,o]=(0,S.useState)(i.siteName),[s,c]=(0,S.useState)(i.siteLogo);return(0,S.useEffect)(()=>{Z8().then(e=>{o(e.siteName),c(e.siteLogo)}).catch(()=>{})},[]),(0,Q.jsxs)(`div`,{style:{minHeight:`100vh`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundImage:`url(/backimage.png)`,backgroundSize:`cover`,backgroundPosition:`center`,backgroundRepeat:`no-repeat`,backgroundAttachment:`fixed`,position:`relative`,overflow:`hidden`},children:[(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(135deg, rgba(240,244,255,0.9) 0%, rgba(232,236,248,0.85) 40%, rgba(240,240,255,0.9) 70%, rgba(248,249,255,0.95) 100%)`}}),(0,Q.jsx)(`div`,{style:{position:`absolute`,width:500,height:500,borderRadius:`50%`,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,top:-150,right:-100,filter:`blur(40px)`}}),(0,Q.jsx)(`div`,{style:{position:`absolute`,width:400,height:400,borderRadius:`50%`,background:`radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%)`,bottom:-100,left:-80,filter:`blur(50px)`}}),(0,Q.jsxs)(PR,{variant:`outlined`,style:{width:440,borderRadius:20,boxShadow:`0 20px 60px rgba(0,0,0,0.08)`,border:`1px solid #e2e8f0`,background:`#fff`,zIndex:1},styles:{body:{padding:`36px 28px`}},children:[(0,Q.jsxs)(`div`,{style:{textAlign:`center`,marginBottom:28},children:[(0,Q.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,margin:`0 auto 16px`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:s?`transparent`:`linear-gradient(135deg, #6366f1, #8b5cf6)`,boxShadow:s?`none`:`0 8px 24px rgba(99,102,241,0.25)`},children:s?(0,Q.jsx)(`img`,{src:s,alt:`logo`,style:{width:`100%`,height:`100%`,borderRadius:14,objectFit:`contain`}}):(0,Q.jsx)(l6,{style:{fontSize:26,color:`#fff`}})}),(0,Q.jsxs)(Z.Title,{level:3,style:{margin:0,color:`#1e293b`,fontWeight:700},children:[a,(0,Q.jsx)(`span`,{style:{color:`#6366f1`},children:`.AI`})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:14,color:`#94a3b8`},children:`管理后台`})]}),(0,Q.jsxs)(X,{onFinish:async n=>{r(!0);try{await t(n.username,n.password,n.rememberMe),LG.success(`登录成功`),e(`/`)}catch(e){let t=e?.message||`登录失败`;LG.error(t)}finally{r(!1)}},layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`username`,rules:[{required:!0,message:`请输入用户名`}],children:(0,Q.jsx)(hW,{placeholder:`用户名`,size:`large`,prefix:(0,Q.jsx)(D6,{style:{color:`#94a3b8`,marginRight:8}}),style:{background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,height:48,borderRadius:10,fontSize:14}})}),(0,Q.jsx)(X.Item,{name:`password`,rules:[{required:!0,message:`请输入密码`}],children:(0,Q.jsx)(hW.Password,{placeholder:`密码`,size:`large`,prefix:(0,Q.jsx)(f4,{style:{color:`#94a3b8`,marginRight:8}}),style:{background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,height:48,borderRadius:10,fontSize:14}})}),(0,Q.jsx)(X.Item,{name:`rememberMe`,valuePropName:`checked`,style:{marginBottom:12},children:(0,Q.jsx)(oz,{children:`记住我的登录状态`})}),(0,Q.jsx)(X.Item,{style:{marginBottom:8},children:(0,Q.jsx)(qE,{type:`primary`,htmlType:`submit`,loading:n,block:!0,size:`large`,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登录管理后台`})})]})]})]})};o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(JE()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_zh_cn=r(n.dayjs)})(e,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`zh-cn`,weekdays:`星期日_星期一_星期二_星期三_星期四_星期五_星期六`.split(`_`),weekdaysShort:`周日_周一_周二_周三_周四_周五_周六`.split(`_`),weekdaysMin:`日_一_二_三_四_五_六`.split(`_`),months:`一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月`.split(`_`),monthsShort:`1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月`.split(`_`),ordinal:function(e,t){return t===`W`?e+`周`:e+`日`},weekStart:1,yearStart:4,formats:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`YYYY/MM/DD`,LL:`YYYY年M月D日`,LLL:`YYYY年M月D日Ah点mm分`,LLLL:`YYYY年M月D日ddddAh点mm分`,l:`YYYY/M/D`,ll:`YYYY年M月D日`,lll:`YYYY年M月D日 HH:mm`,llll:`YYYY年M月D日dddd HH:mm`},relativeTime:{future:`%s内`,past:`%s前`,s:`几秒`,m:`1 分钟`,mm:`%d 分钟`,h:`1 小时`,hh:`%d 小时`,d:`1 天`,dd:`%d 天`,M:`1 个月`,MM:`%d 个月`,y:`1 年`,yy:`%d 年`},meridiem:function(e,t){var n=100*e+t;return n<600?`凌晨`:n<900?`早上`:n<1100?`上午`:n<1300?`中午`:n<1800?`下午`:`晚上`}};return n.default.locale(r,null,!0),r}))}))(),YE.default.locale(`zh-cn`);var X5=()=>{let[e,t]=(0,S.useState)(null),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)([(0,YE.default)().startOf(`day`),(0,YE.default)()]),[o,s]=(0,S.useState)(`数据概览`),c=async()=>{r(!0);try{t(await l8(i[0]?.format(`YYYY-MM-DD`)||void 0,i[1]?.format(`YYYY-MM-DD`)||void 0))}catch{}r(!1)},l=async()=>{try{let e=(await _8()).find(e=>e.key===`site_name`);if(e){let t=`${e.value} 管理后台`;s(t),document.title=t}}catch{s(`数据概览`),document.title=`数据概览`}};(0,S.useEffect)(()=>{c(),l()},[]);let u=()=>{let e=[(0,YE.default)().startOf(`day`),(0,YE.default)()];a(e),m(e)},d=()=>{let e=(0,YE.default)().subtract(1,`day`),t=[e.startOf(`day`),e.endOf(`day`)];a(t),m(t)},f=()=>{let e=[(0,YE.default)().startOf(`week`),(0,YE.default)()];a(e),m(e)},p=()=>{let e=[(0,YE.default)().startOf(`month`),(0,YE.default)()];a(e),m(e)},m=e=>{let n=e[0]?.format(`YYYY-MM-DD`)||void 0,i=e[1]?.format(`YYYY-MM-DD`)||void 0;r(!0),l8(n,i).then(e=>{t(e),r(!1)}).catch(()=>{r(!1)})},h=e=>{e&&(a([e[0],e[1]]),m([e[0],e[1]]))},g=e?[{title:`用户数量`,value:e.totalUsers,lastPeriodValue:e.lastPeriodUsers,icon:(0,Q.jsx)(D6,{}),gradient:`linear-gradient(135deg, #667eea 0%, #764ba2 100%)`,prefix:``,suffix:`位用户`,description:`平台注册用户总数`},{title:`总项目数`,value:e.totalProjects,lastPeriodValue:e.lastPeriodProjects,icon:(0,Q.jsx)(Z4,{}),gradient:`linear-gradient(135deg, #00d4ff 0%, #0099cc 100%)`,prefix:``,suffix:`个项目`,description:`创建的项目总数`},{title:`项目记录`,value:e.totalRecords,lastPeriodValue:e.lastPeriodRecords,icon:(0,Q.jsx)(KV,{}),gradient:`linear-gradient(135deg, #10b981 0%, #059669 100%)`,prefix:``,suffix:`条记录`,description:`项目记录总数`},{title:`创作记录`,value:e.totalGenerations,lastPeriodValue:e.lastPeriodGenerations,icon:(0,Q.jsx)(J4,{}),gradient:`linear-gradient(135deg, #f59e0b 0%, #d97706 100%)`,prefix:``,suffix:`次创作`,description:`AI创作记录总数`}]:[],_=e?[{title:`支付宝收入`,value:e.todayAlipayRevenue,icon:(0,Q.jsx)(N6,{}),gradient:`linear-gradient(135deg, #22c55e 0%, #16a34a 100%)`,prefix:`¥`,suffix:``,description:`支付宝收款`,tag:`支付宝`},{title:`微信收入`,value:e.todayWechatRevenue,icon:(0,Q.jsx)(l2,{}),gradient:`linear-gradient(135deg, #3b82f6 0%, #2563eb 100%)`,prefix:`¥`,suffix:``,description:`微信收款`,tag:`微信支付`},{title:`总收入`,value:e.totalRevenue,lastPeriodValue:e.lastPeriodRevenue,icon:(0,Q.jsx)(e0,{}),gradient:`linear-gradient(135deg, #ec4899 0%, #be185d 100%)`,prefix:`¥`,suffix:``,description:`平台总收入`,tag:`总收入`},{title:`消耗积分`,value:e.creditsConsumedToday,lastPeriodValue:e.lastPeriodCreditsConsumed,icon:(0,Q.jsx)(l2,{}),gradient:`linear-gradient(135deg, #ef4444 0%, #dc2626 100%)`,prefix:``,suffix:`积分`,description:`用户消耗积分`,tag:`积分消耗`}]:[],v=({title:e,value:t,lastPeriodValue:r,icon:i,gradient:a,prefix:o=``,suffix:s=``,description:c,tag:l})=>{let u=r!==void 0&&r>0?((t-r)/r*100).toFixed(1):null,d=u!==null&&parseFloat(u)>=0;return(0,Q.jsx)(PR,{bordered:!1,loading:n,hoverable:!0,style:{borderRadius:16,border:`1px solid rgba(0,0,0,0.04)`,background:`#ffffff`,boxShadow:`0 4px 20px rgba(0,0,0,0.05)`,transition:`all 0.3s ease`,overflow:`hidden`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16,padding:`16px 0`},children:[(0,Q.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:a,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:24,color:`#fff`,flexShrink:0,boxShadow:`0 8px 24px rgba(0,0,0,0.1)`},children:i}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`,fontSize:13},children:e}),l&&(0,Q.jsx)(`span`,{style:{fontSize:10,padding:`2px 8px`,borderRadius:10,background:`rgba(99,102,241,0.1)`,color:`#6366f1`,fontWeight:500},children:l})]}),(0,Q.jsxs)(`div`,{style:{fontSize:28,fontWeight:800,color:`#1e293b`,letterSpacing:-.5,marginBottom:2},children:[o,typeof t==`number`?t.toLocaleString():t,s]}),c&&(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`,fontSize:11},children:c}),u!==null&&r!==void 0&&(0,Q.jsxs)(`div`,{style:{marginTop:8,paddingTop:8,borderTop:`1px solid #f1f5f9`,display:`flex`,alignItems:`center`,gap:8},children:[(0,Q.jsxs)(Z.Text,{style:{color:`#94a3b8`,fontSize:11},children:[`上一周期: `,o,r.toLocaleString(),s]}),(0,Q.jsxs)(`span`,{style:{fontSize:11,fontWeight:500,color:d?`#10b981`:`#ef4444`,display:`flex`,alignItems:`center`,gap:2},children:[d?`↑`:`↓`,` `,Math.abs(parseFloat(u)),`%`]})]})]})]})})};return(0,Q.jsxs)(`div`,{style:{padding:0},children:[(0,Q.jsxs)(`div`,{style:{background:`linear-gradient(135deg, #667eea 0%, #764ba2 100%)`,padding:`24px 24px 32px`,borderRadius:0,marginBottom:-24,position:`relative`,overflow:`hidden`},children:[(0,Q.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`rgba(255,255,255,0.1)`,borderRadius:`50%`}}),(0,Q.jsx)(`div`,{style:{position:`absolute`,bottom:-30,left:-30,width:150,height:150,background:`rgba(255,255,255,0.08)`,borderRadius:`50%`}}),(0,Q.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,Q.jsx)(Z.Title,{level:2,style:{color:`#fff`,marginBottom:4,fontWeight:700},children:o}),(0,Q.jsx)(Z.Text,{style:{color:`rgba(255,255,255,0.8)`,fontSize:14},children:`欢迎回来,查看平台运营数据统计`})]})]}),(0,Q.jsxs)(`div`,{style:{marginTop:40},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,alignItems:`center`,gap:12,flexWrap:`wrap`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{type:!i[0]||!i[1]||i[0]?.isSame((0,YE.default)().startOf(`day`))&&i[1]?.isSame((0,YE.default)(),`day`)?`primary`:`default`,size:`small`,onClick:u,children:`今日`}),(0,Q.jsx)(qE,{type:`default`,size:`small`,onClick:d,children:`昨日`}),(0,Q.jsx)(qE,{type:`default`,size:`small`,onClick:f,children:`本周`}),(0,Q.jsx)(qE,{type:`default`,size:`small`,onClick:p,children:`本月`})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,background:`#fff`,border:`1px solid #e2e8f0`,padding:`6px 12px`,borderRadius:8,boxShadow:`0 1px 2px rgba(0,0,0,0.05)`},children:[(0,Q.jsx)(zB,{style:{color:`#64748b`,fontSize:14}}),(0,Q.jsx)(YB.RangePicker,{value:i,onChange:h,placeholder:[`开始日期`,`结束日期`],size:`small`})]})]}),(0,Q.jsxs)(`div`,{style:{marginBottom:16,paddingLeft:4},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#1e293b`,fontSize:15},children:`核心数据`}),(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`,fontSize:12,marginLeft:8},children:`平台基础运营指标`})]}),(0,Q.jsx)(DK,{gutter:[16,16],children:g.map(e=>(0,Q.jsx)(pz,{xs:12,sm:8,lg:6,children:(0,Q.jsx)(v,{...e})},e.title))})]}),(0,Q.jsxs)(`div`,{style:{marginTop:24},children:[(0,Q.jsxs)(`div`,{style:{marginBottom:16,paddingLeft:4},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#1e293b`,fontSize:15},children:`财务统计`}),(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`,fontSize:12,marginLeft:8},children:`收入与消耗数据`})]}),(0,Q.jsx)(DK,{gutter:[16,16],children:_.map(e=>(0,Q.jsx)(pz,{xs:12,sm:8,lg:6,children:(0,Q.jsx)(v,{...e})},e.title))})]})]})};function Z5(e){if(!e)return`-`;let t=e.trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);return n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``),t.replace(`T`,` `).slice(0,16)}var Q5=e=>e instanceof Error?e:Error(typeof e==`string`?e:`上传失败`),$5=e=>{if(e instanceof File)return e;throw Error(`请选择有效图片文件`)},e7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(20),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(null),[v]=X.useForm(),[y]=X.useForm(),b=async(e,n)=>{a(!0);try{let i=await s5({page:e||o,page_size:n||c});t(i.items||[]),r(i.total||0)}catch{LG.error(`加载开户方式列表失败`)}finally{a(!1)}};(0,S.useEffect)(()=>{b()},[]);let x=async()=>{try{let e=await v.validateFields();console.log(e),await l5({open_type:e.open_type,type_name:e.type_name,description:e.description,thumb:e.thumb}),LG.success(`创建成功`),d(!1),v.resetFields(),b()}catch(e){LG.error(e?.message||`创建失败`)}},C=async e=>{try{_(await c5(e)),p(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},w=async e=>{try{let t=await c5(e);_(t),y.setFieldsValue({open_type:t.open_type,type_name:t.type_name,description:t.description,thumb:t.thumb}),h(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},T=async()=>{if(g)try{let e=await y.validateFields();await u5(g.id,{open_type:e.open_type,type_name:e.type_name,description:e.description,thumb:e.thumb}),LG.success(`更新成功`),h(!1),y.resetFields(),_(null),b()}catch(e){LG.error(e?.message||`更新失败`)}},E=e=>{BG.confirm({title:`确认删除`,content:`确定要删除这个开户方式吗?`,okText:`删除`,okType:`danger`,cancelText:`取消`,onOk:async()=>{try{await d5(e),LG.success(`删除成功`),b()}catch(e){LG.error(e?.message||`删除失败`)}}})};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`平台开户方式管理`})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>d(!0),children:`新增`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>b(),children:`刷新`})]})]}),(0,Q.jsx)(bQ,{columns:[{title:`ID`,dataIndex:`id`,width:100,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`开户类型`,dataIndex:`open_type`,width:100,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`类型名称`,dataIndex:`type_name`,width:150,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`描述`,dataIndex:`description`,width:250,ellipsis:!0,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:e})},{title:`缩略图`,dataIndex:`thumb`,width:120,render:e=>e?(0,Q.jsx)(`img`,{src:e,alt:`thumb`,style:{width:80,height:60,objectFit:`cover`}}):`-`},{title:`创建时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})},{title:`更新时间`,dataIndex:`updatedAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})},{title:`操作`,width:200,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(qU,{}),size:`small`,onClick:()=>C(t.id),children:`详情`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(zQ,{}),size:`small`,onClick:()=>w(t.id),children:`更新`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(IQ,{}),size:`small`,danger:!0,onClick:()=>E(t.id),children:`删除`})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:c,total:n,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{s(e),l(t),b(e,t)}},scroll:{x:1e3}})]}),(0,Q.jsx)(BG,{title:`新增开户方式`,open:u,onOk:x,onCancel:()=>{d(!1),v.resetFields()},okText:`创建`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:v,layout:`vertical`,children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户方式Id`,style:{flex:1},rules:[{required:!0,message:`请输入开户方式Id`}],children:(0,Q.jsx)(oB,{style:{width:`100%`},min:1,placeholder:`请输入开户方式Id`})}),(0,Q.jsx)(X.Item,{name:`type_name`,label:`类型名称`,style:{flex:1},rules:[{required:!0,message:`请输入类型名称`},{max:100,message:`类型名称不能超过100个字符`}],children:(0,Q.jsx)(hW,{style:{width:`100%`},placeholder:`请输入类型名称`})})]}),(0,Q.jsx)(X.Item,{name:`description`,label:`描述`,rules:[{required:!0,message:`请输入描述`}],children:(0,Q.jsx)(hW.TextArea,{placeholder:`请输入描述`,rows:4})}),(0,Q.jsx)(X.Item,{name:`thumb`,label:`缩略图`,children:(0,Q.jsx)(D1,{listType:`picture-card`,customRequest:async({file:e,onSuccess:t,onError:n})=>{try{let n=await N5($5(e));console.log(n),v.setFieldsValue({thumb:n.url}),t?.({url:n.url})}catch(e){n?.(Q5(e))}},children:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(w6,{style:{fontSize:24,color:`#999`}}),(0,Q.jsx)(`div`,{style:{marginTop:8},children:`上传图片`})]})})})]})}),(0,Q.jsx)(BG,{title:`开户方式详情`,open:f,onCancel:()=>{p(!1),_(null)},okText:`关闭`,cancelText:`取消`,width:600,children:g&&(0,Q.jsxs)(`div`,{style:{lineHeight:`2`},children:[(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`ID:`}),` `,g.id]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`开户类型:`}),` `,g.open_type]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`类型名称:`}),` `,g.type_name]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`描述:`}),` `,g.description]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`缩略图:`}),` `,g.thumb?(0,Q.jsx)(`img`,{src:g.thumb,alt:`thumb`,style:{width:120,height:80,objectFit:`cover`}}):`-`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`创建时间:`}),` `,Z5(g.createdAt)]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`更新时间:`}),` `,Z5(g.updatedAt)]})]})}),(0,Q.jsx)(BG,{title:`更新开户方式`,open:m,onOk:T,onCancel:()=>{h(!1),y.resetFields(),_(null)},okText:`更新`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:y,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户类型`,rules:[{required:!0,message:`请输入开户类型`}],children:(0,Q.jsx)(oB,{min:1,placeholder:`请输入开户类型编号`})}),(0,Q.jsx)(X.Item,{name:`type_name`,label:`类型名称`,rules:[{required:!0,message:`请输入类型名称`},{max:100,message:`类型名称不能超过100个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入类型名称`})}),(0,Q.jsx)(X.Item,{name:`description`,label:`描述`,rules:[{required:!0,message:`请输入描述`}],children:(0,Q.jsx)(hW.TextArea,{placeholder:`请输入描述`,rows:4})}),(0,Q.jsx)(X.Item,{name:`thumb`,label:`缩略图`,children:(0,Q.jsx)(D1,{listType:`picture-card`,defaultFileList:g?.thumb?[{uid:`1`,name:`thumb`,status:`done`,url:g.thumb}]:[],customRequest:async({file:e,onSuccess:t,onError:n})=>{try{let n=await N5($5(e));y.setFieldsValue({thumb:n.url}),t?.({url:n.url})}catch(e){n?.(Q5(e))}},children:!y.getFieldValue(`thumb`)&&(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(w6,{style:{fontSize:24,color:`#999`}}),(0,Q.jsx)(`div`,{style:{marginTop:8},children:`上传图片`})]})})})]})})]})},t7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(`frontend`),[c,l]=(0,S.useState)(``),[u,d]=(0,S.useState)({open:!1,user:null}),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(`frontend`),[g,_]=(0,S.useState)({open:!1,user:null}),[v,y]=(0,S.useState)([]),[b,x]=(0,S.useState)([]),[C,w]=(0,S.useState)({open:!1,user:null}),[T]=X.useForm(),[E]=X.useForm(),[D]=X.useForm(),[O,k]=(0,S.useState)(1),[A,j]=(0,S.useState)(20),[M,N]=(0,S.useState)(0),[P,F]=(0,S.useState)([]),[I]=X.useForm(),[L,R]=(0,S.useState)(!1),z=async()=>{r(!0);try{let e=await u8(O,A,i||void 0,o,o===`frontend`&&c||void 0);t(e.items||[]),N(e.total||0)}catch{}r(!1)};(0,S.useEffect)(()=>{z()},[O,A,i,o,c]),(0,S.useEffect)(()=>{(async()=>{try{let e=(await _8()).filter(e=>e.key.startsWith(`user_`)&&e.key.includes(`credits`));F(e);let t={};e.forEach(e=>{t[e.key]=e.value}),I.setFieldsValue(t)}catch{}})()},[]);let B=async()=>{try{let e=await I.validateFields();R(!0);for(let t of P){let n=e[t.key];n!==void 0&&n!==t.value&&await v8(t.id,n??``)}LG.success(`积分配置已保存`),F((await _8()).filter(e=>e.key.startsWith(`user_`)&&e.key.includes(`credits`))),R(!1)}catch(e){R(!1),LG.error(e?.message||`保存失败`)}},V=(e,t)=>{k(e),j(t)},H=()=>z(),U=async()=>{try{let e=await T.validateFields(),{user:t}=u;if(!t)return;await f8(t.id,e.amount,e.description),LG.success(`已${e.amount>0?`增加`:`扣除`} ${Math.abs(e.amount)} 积分`),d({open:!1,user:null}),T.resetFields(),z()}catch{}},W=async e=>{await p8(e.id,!e.isActive),LG.success(e.isActive?`已禁用该用户`:`已启用该用户`),z()},ee=async()=>{try{let e=await E.validateFields(),t=e.user_type||`frontend`;await q8({username:t===`admin`?e.username:void 0,password:e.password,email:e.email||void 0,phone:t===`frontend`?e.phone:e.phone||void 0,credits:e.credits||0,user_type:t,frontend_user_kind:e.frontend_user_kind||`external`}),LG.success(`用户创建成功`),p(!1),E.resetFields(),h(`frontend`),z()}catch{}},te=async e=>{try{let t=await W8(),n=e.userType===`admin`;y(t.filter(e=>{let t=e.menu_target??e.menuTarget??`frontend`;return n?t===`admin`||t===`both`:t===`frontend`||t===`both`})),x(e.allowedMenus||[]),_({open:!0,user:e})}catch{LG.error(`加载菜单失败`)}},ne=v.filter(e=>(e.menu_type??e.menuType)===`group`),re=v.filter(e=>(e.menu_type??e.menuType)!==`group`),ie={};re.filter(e=>e.parent_id??e.parentId).forEach(e=>{let t=e.parent_id??e.parentId;ie[t]||(ie[t]=[]),ie[t].push(e)});let ae=re.filter(e=>!(e.parent_id??e.parentId)),G=async()=>{let{user:e}=g;if(e)try{await J8(e.id,b.length>0?b:null),LG.success(`菜单权限已更新`),_({open:!1,user:null}),z()}catch(e){LG.error(e?.message||`保存失败`)}},oe=async()=>{try{let e=await D.validateFields(),{user:t}=C;if(!t)return;await Y8(t.id,e.newPassword),LG.success(`已重置 ${t.username} 的密码`),w({open:!1,user:null}),D.resetFields()}catch{}},K=async(e,t)=>{try{await d8(e.id,t),LG.success(t===`internal`?`已设为前台内部用户`:`已设为前台外部用户`),z()}catch(e){LG.error(e?.message||`设置失败`)}},se=o===`admin`,ce=[{title:`用户`,key:`user`,width:200,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:t.isAdmin?`linear-gradient(135deg, #f59e0b, #f97316)`:`linear-gradient(135deg, #6366f1, #8b5cf6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:13,fontWeight:700},children:t.username.charAt(0).toUpperCase()}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{fontWeight:600},children:[t.username,t.isAdmin&&(0,Q.jsx)(NQ,{color:`orange`,style:{marginLeft:6,fontSize:10},children:`管理员`})]}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.email})]})]})},...se?[]:[{title:`积分余额`,dataIndex:`credits`,width:120,sorter:(e,t)=>e.credits-t.credits,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,style:{color:e>0?`#10b981`:`#ef4444`,fontSize:15},children:e.toLocaleString()})}],{title:`手机号`,dataIndex:`phone`,width:130,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,children:e||`-`})},...se?[]:[{title:`前台归类`,dataIndex:`frontendUserKind`,width:110,render:e=>(0,Q.jsx)(NQ,{color:e===`internal`?`geekblue`:`default`,children:e===`internal`?`内部用户`:`外部用户`})}],{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`red`,children:e?`正常`:`禁用`})},{title:`注册时间`,dataIndex:`createdAt`,width:120,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})},{title:`最后登录`,dataIndex:`lastLoginAt`,width:140,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})},{title:`操作`,key:`action`,width:320,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[!se&&(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(N6,{}),onClick:()=>{d({open:!0,user:t}),T.resetFields()},children:`调整积分`}),!se&&t.frontendUserKind!==`internal`&&(0,Q.jsx)(qE,{type:`link`,size:`small`,onClick:()=>K(t,`internal`),children:`设为内部`}),!se&&t.frontendUserKind===`internal`&&(0,Q.jsx)(qE,{type:`link`,size:`small`,onClick:()=>K(t,`external`),children:`取消内部`}),(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(w4,{}),onClick:()=>te(t),children:`菜单权限`}),(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(f4,{}),onClick:()=>{w({open:!0,user:t}),D.resetFields()},children:`重置密码`}),(0,Q.jsx)(WG,{title:t.isActive?`确定禁用该用户?`:`确定启用该用户?`,onConfirm:()=>W(t),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:t.isActive,icon:t.isActive?(0,Q.jsx)(e6,{}):(0,Q.jsx)(N0,{}),children:t.isActive?`禁用`:`启用`})})]})}];return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:20},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:`#6366f1`},children:(0,Q.jsx)(D3,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:4,style:{margin:0},children:`积分配置`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`设置用户注册和登录赠送的积分`})]})]}),(0,Q.jsxs)(X,{form:I,layout:`vertical`,children:[(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr 1fr`,gap:20},children:[(0,Q.jsx)(X.Item,{name:`user_register_credits`,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:`注册赠送积分`}),extra:`用户注册时赠送的初始积分`,children:(0,Q.jsx)(oB,{min:0,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`user_login_credits`,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:`每日登录赠送积分`}),extra:`用户每日首次登录赠送的积分`,children:(0,Q.jsx)(oB,{min:0,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`user_login_credits_enabled`,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:`启用每日登录积分`}),extra:`是否开启每日登录赠送积分功能`,children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(Mq,{defaultChecked:P.find(e=>e.key===`user_login_credits_enabled`)?.value===`true`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:13},children:P.find(e=>e.key===`user_login_credits_enabled`)?.value===`true`?`已启用`:`已禁用`})]})})]}),(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:16},children:(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(v3,{}),onClick:B,loading:L,size:`large`,style:{borderRadius:8},children:`保存配置`})})]})]}),(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,Q.jsx)(hW,{placeholder:`搜索用户名或手机号`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),value:i,onChange:e=>a(e.target.value),onPressEnter:H,style:{width:280,borderRadius:8},allowClear:!0}),!se&&(0,Q.jsx)(RC,{value:c,onChange:e=>{k(1),l(e)},style:{width:140},options:[{value:``,label:`全部前台用户`},{value:`internal`,label:`内部用户`},{value:`external`,label:`外部用户`}]}),(0,Q.jsx)(qE,{type:`primary`,onClick:H,style:{borderRadius:8},children:`搜索`})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>{h(o),E.setFieldsValue({user_type:o}),p(!0)},style:{borderRadius:8},children:`创建用户`})]}),(0,Q.jsx)(bR,{activeKey:o,onChange:e=>{s(e),l(``),k(1)},items:[{key:`frontend`,label:`前台用户`},{key:`admin`,label:`后台用户`}]}),(0,Q.jsx)(bQ,{columns:ce,dataSource:e,rowKey:`id`,loading:n,pagination:{current:O,pageSize:A,total:M,onChange:V,showSizeChanger:!0,showTotal:e=>`共 ${e} 个用户`},scroll:{x:1e3}})]}),(0,Q.jsxs)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(N6,{}),`调整积分 - `,u.user?.username]}),open:u.open,onOk:U,onCancel:()=>{d({open:!1,user:null}),T.resetFields()},okText:`确认`,cancelText:`取消`,width:440,children:[(0,Q.jsxs)(`div`,{style:{marginBottom:16,padding:`12px 16px`,background:`#f8fafc`,borderRadius:8},children:[(0,Q.jsx)(`span`,{style:{color:`#64748b`},children:`当前积分:`}),(0,Q.jsx)(`span`,{style:{fontWeight:800,fontSize:18,color:`#6366f1`},children:u.user?.credits.toLocaleString()})]}),(0,Q.jsxs)(X,{form:T,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`amount`,label:`积分变动`,rules:[{required:!0,message:`请输入积分数量`}],children:(0,Q.jsx)(oB,{style:{width:`100%`},size:`large`,placeholder:`正数增加,负数扣除`,formatter:e=>`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,`,`)})}),(0,Q.jsx)(X.Item,{name:`description`,label:`原因`,rules:[{required:!0,message:`请输入调整原因`}],children:(0,Q.jsx)(hW.TextArea,{rows:2,placeholder:`请输入调整原因`,size:`large`})})]})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(D6,{}),`创建用户`]}),open:f,onOk:ee,onCancel:()=>{p(!1),E.resetFields(),h(`frontend`)},okText:`创建`,cancelText:`取消`,width:480,children:(0,Q.jsxs)(X,{form:E,layout:`vertical`,style:{marginTop:16},onValuesChange:e=>{e.user_type&&h(e.user_type)},children:[(0,Q.jsx)(X.Item,{name:`user_type`,label:`用户类型`,initialValue:`frontend`,rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`frontend`,label:`前端用户`},{value:`admin`,label:`后台管理员`}]})}),m===`frontend`&&(0,Q.jsx)(X.Item,{name:`frontend_user_kind`,label:`前台归类`,initialValue:`external`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`external`,label:`外部用户`},{value:`internal`,label:`内部用户`}]})}),m===`frontend`?(0,Q.jsx)(X.Item,{name:`phone`,label:`手机号`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,Q.jsx)(hW,{placeholder:`请输入手机号`,maxLength:11,size:`large`})}):(0,Q.jsx)(X.Item,{name:`username`,label:`用户名`,rules:[{required:!0,message:`请输入用户名`}],children:(0,Q.jsx)(hW,{placeholder:`请输入用户名`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`password`,label:`密码`,rules:[{required:!0,min:6,message:`密码至少6位`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请输入密码(至少6位)`,size:`large`})}),m===`frontend`&&(0,Q.jsx)(X.Item,{name:`credits`,label:`初始积分`,initialValue:0,children:(0,Q.jsx)(oB,{min:0,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`email`,label:`邮箱`,children:(0,Q.jsx)(hW,{placeholder:`选填`,size:`large`})})]})}),(0,Q.jsxs)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w4,{}),`菜单权限 - `,g.user?.username,` (`,g.user?.userType===`admin`?`后台菜单`:`前台菜单`,`)`]}),open:g.open,onOk:G,onCancel:()=>{_({open:!1,user:null})},okText:`保存`,cancelText:`取消`,width:520,children:[(0,Q.jsx)(`div`,{style:{marginBottom:12},children:(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:13},children:`勾选该用户可访问的菜单,不勾选则显示全部菜单`})}),(0,Q.jsx)(`div`,{style:{padding:`12px 16px`,background:`#f8fafc`,borderRadius:8,maxHeight:400,overflow:`auto`},children:(0,Q.jsx)(oz.Group,{value:b,onChange:e=>x(e),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:8,style:{width:`100%`},children:[ae.map(e=>(0,Q.jsxs)(oz,{value:e.path,style:{width:`100%`},children:[e.label,(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,marginLeft:8},children:e.path})]},e.path)),ne.map(e=>{let t=ie[e.id]||[];return t.length===0?null:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{fontWeight:600,fontSize:13,color:`#6366f1`,marginBottom:4,marginTop:4},children:e.label}),(0,Q.jsx)(VV,{direction:`vertical`,size:4,style:{paddingLeft:12,width:`100%`},children:t.map(e=>(0,Q.jsxs)(oz,{value:e.path,style:{width:`100%`},children:[e.label,(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,marginLeft:8},children:e.path})]},e.path))})]},e.id)})]})})})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(f4,{}),`重置密码 - `,C.user?.username]}),open:C.open,onOk:oe,onCancel:()=>{w({open:!1,user:null}),D.resetFields()},okText:`确认重置`,cancelText:`取消`,width:420,children:(0,Q.jsx)(X,{form:D,layout:`vertical`,style:{marginTop:16},children:(0,Q.jsx)(X.Item,{name:`newPassword`,label:`新密码`,rules:[{required:!0,min:6,message:`密码至少6位`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`})})})})]})},n7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)({open:!1,model:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t(await m8())}catch{}r(!1)};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={name:e.name,provider:e.provider,model_name:e.modelName,api_base:e.apiBase,api_key:e.apiKey,weight:e.weight,max_tokens:e.maxTokens,temperature:e.temperature,is_active:e.isActive??!0,priority:e.priority??0};i.model?.id?await h8({id:i.model.id,...t}):await h8(t),LG.success(i.model?.id?`模型配置已更新`:`模型配置已添加`),a({open:!1,model:null}),o.resetFields(),s()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},l=async e=>{try{await g8(e),LG.success(`模型配置已删除`),s()}catch(e){LG.error(e?.message||`删除失败`)}},u=e=>{a({open:!0,model:e||null}),e?o.setFieldsValue(e):(o.resetFields(),o.setFieldsValue({provider:`sdk`,weight:1,maxTokens:4096,temperature:.7,isActive:!0,priority:0}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(Z.Text,{type:`secondary`,children:[`共 `,e.length,` 个模型配置,按权重进行加权随机调度`]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加模型`})]}),(0,Q.jsx)(bQ,{columns:[{title:`模型名称`,dataIndex:`name`,width:150,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:t.isActive?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`linear-gradient(135deg, #94a3b8, #cbd5e1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:14},children:(0,Q.jsx)(o3,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{fontWeight:600},children:e}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.modelName})]})]})},{title:`提供商`,dataIndex:`provider`,width:140,render:e=>(0,Q.jsx)(NQ,{color:e===`mock`?`default`:`blue`,children:{sdk:`SDK模式`,openai_compatible:`OpenAI兼容`,mock:`Mock模式`}[e]||e})},{title:`API地址`,dataIndex:`apiBase`,width:200,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},ellipsis:!0,children:e||`-`})},{title:`权重`,dataIndex:`weight`,width:80,sorter:(e,t)=>e.weight-t.weight},{title:`Max Tokens`,dataIndex:`maxTokens`,width:100},{title:`Temperature`,dataIndex:`temperature`,width:100,render:e=>e.toFixed(1)},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除该模型配置?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(o3,{}),i.model?.id?`编辑模型`:`添加模型`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,model:null}),o.resetFields()},okText:`确认`,cancelText:`取消`,width:560,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`name`,label:`显示名称`,rules:[{required:!0,message:`请输入模型名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:GPT-4o`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`provider`,label:`提供商`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`sdk`,label:`SDK模式`},{value:`openai_compatible`,label:`OpenAI兼容`},{value:`mock`,label:`Mock模式`}]})}),(0,Q.jsx)(X.Item,{name:`modelName`,label:`模型标识`,style:{flex:1},rules:[{required:!0,message:`请输入模型标识`}],children:(0,Q.jsx)(hW,{placeholder:`例如:gpt-4o`,size:`large`})})]}),(0,Q.jsx)(X.Item,{name:`apiBase`,label:`API地址`,children:(0,Q.jsx)(hW,{placeholder:`https://api.openai.com/v1`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`apiKey`,label:`API Key`,children:(0,Q.jsx)(hW.Password,{placeholder:`sk-****`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`weight`,label:`权重`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:0,max:10,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`maxTokens`,label:`Max Tokens`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:256,max:128e3,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`temperature`,label:`Temperature`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:0,max:2,step:.1,style:{width:`100%`},size:`large`})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`priority`,label:`优先级`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:0,max:10,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用`,valuePropName:`checked`,style:{flex:1,paddingTop:30},children:(0,Q.jsx)(Mq,{})})]})]})})]})},r7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(``),[c]=X.useForm(),[l,u]=(0,S.useState)(``);(0,S.useEffect)(()=>{d()},[]);let d=async()=>{r(!0);let e=await _8();t(e);let n={};e.forEach(e=>{n[e.key]=e.value}),c.setFieldsValue(n),r(!1)},f=async()=>{try{let n=await c.validateFields();a(!0);for(let t of e){let e=n[t.key];e!==void 0&&e!==t.value&&await v8(t.id,e??``)}LG.success(`系统配置已保存`),t(await _8()),a(!1)}catch(e){a(!1),LG.error(e?.message||`保存失败`)}},p=async(e,n)=>{s(n);try{let r=await y8(e,n);t(e=>e.map(e=>e.key===n?{...e,value:r.url}:e)),c.setFieldsValue({[n]:r.url}),LG.success(`PDF上传成功`)}catch{LG.error(`上传失败`)}finally{s(``)}return!1},m=async e=>{s(`site_logo`);try{let n=await b8(e);t(e=>e.map(e=>e.key===`site_logo`?{...e,value:n.url}:e)),c.setFieldsValue({site_logo:n.url}),u(n.url),LG.success(`Logo上传成功`)}catch{LG.error(`上传失败`)}finally{s(``)}return!1},h={站点信息:e.filter(e=>e.key.startsWith(`site_`)),协议配置:e.filter(e=>e.key===`user_agreement_url`||e.key===`privacy_policy_url`),"SEO 设置":e.filter(e=>e.key.startsWith(`seo_`)),用户积分配置:e.filter(e=>e.key.startsWith(`user_`)&&e.key.includes(`credits`))},g=e=>({site_name:`平台显示名称,将展示在页面标题和导航栏`,site_logo:`平台Logo图片URL,建议尺寸 200x40px`,user_agreement_url:`用户注册/登录时需同意的用户协议PDF文件`,privacy_policy_url:`用户注册/登录时需同意的隐私政策PDF文件`,seo_title:`搜索引擎结果中显示的标题`,seo_description:`搜索引擎结果中显示的描述文字,建议150字以内`,seo_keywords:`用逗号分隔的关键词列表`,user_register_credits:`用户注册时赠送的初始积分,默认100`,user_login_credits:`用户每日登录赠送的积分数量`,user_login_credits_enabled:`是否启用每日登录赠送积分功能`})[e.key]||e.description||``,_=e=>e.key===`site_logo`?(0,Q.jsx)(v,{config:e}):e.key===`seo_description`?(0,Q.jsx)(hW.TextArea,{rows:3,placeholder:e.description,size:`large`}):e.key===`seo_keywords`?(0,Q.jsx)(hW,{placeholder:`关键词1, 关键词2, 关键词3`,size:`large`}):e.key===`user_login_credits_enabled`?(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(Mq,{defaultChecked:e.value===`true`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:13},children:e.value===`true`?`已启用`:`已禁用`})]}):e.key===`user_register_credits`||e.key===`user_login_credits`?(0,Q.jsx)(hW,{type:`number`,min:0,placeholder:e.description,size:`large`}):(0,Q.jsx)(hW,{placeholder:e.description,size:`large`}),v=({config:e})=>{let n=e.value&&e.value.startsWith(`/uploads/`),r=n?`http://ceshi.apiforeign.minzhong.cn${e.value}`:``;return(0,Q.jsxs)(`div`,{style:{padding:`16px`,borderRadius:10,border:`1px solid #f0f0f5`,background:`#fafbfc`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w6,{style:{color:`#6366f1`,fontSize:18}}),(0,Q.jsx)(Z.Text,{strong:!0,children:`网站Logo`})]}),(0,Q.jsxs)(VV,{children:[n&&(0,Q.jsx)(qE,{size:`small`,danger:!0,onClick:()=>{t(e=>e.map(e=>e.key===`site_logo`?{...e,value:``}:e)),c.setFieldsValue({site_logo:``}),LG.success(`Logo已移除`)},children:`移除`}),(0,Q.jsx)(D1,{accept:`image/*`,showUploadList:!1,beforeUpload:m,children:(0,Q.jsx)(qE,{size:`small`,type:`primary`,icon:(0,Q.jsx)(w6,{}),loading:o===`site_logo`,children:n?`重新上传`:`上传Logo`})})]})]}),n?(0,Q.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,Q.jsx)(`img`,{src:r,alt:`Logo预览`,style:{maxWidth:200,maxHeight:80,objectFit:`contain`,border:`1px solid #e2e8f0`,borderRadius:8,padding:8}}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,display:`block`,marginTop:8},children:`建议尺寸:200x40px,支持 PNG、JPG 格式`})]}):(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:`尚未上传Logo,将使用系统默认Logo`})]})},y=({config:e})=>{let t=e.key===`user_agreement_url`?`用户协议`:`隐私政策`,n=e.value&&e.value.startsWith(`/uploads/`);return(0,Q.jsxs)(`div`,{style:{padding:`16px`,borderRadius:10,border:`1px solid #f0f0f5`,background:`#fafbfc`,marginBottom:12},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(x2,{style:{color:`#ef4444`,fontSize:18}}),(0,Q.jsx)(Z.Text,{strong:!0,children:t})]}),(0,Q.jsxs)(VV,{children:[n&&(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>window.open(`http://localhost:8000${e.value}`,`_blank`),children:`预览`}),(0,Q.jsx)(D1,{accept:`.pdf`,showUploadList:!1,beforeUpload:t=>p(t,e.key),children:(0,Q.jsx)(qE,{size:`small`,type:`primary`,icon:(0,Q.jsx)(w6,{}),loading:o===e.key,children:n?`重新上传`:`上传PDF`})})]})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:n?`已上传: ${e.value}`:`尚未上传,前台将不显示对应链接`})]})};return n?(0,Q.jsx)(PR,{loading:!0,variant:`outlined`,style:{borderRadius:12}}):(0,Q.jsxs)(`div`,{style:{maxWidth:720},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:24},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:`#6366f1`},children:(0,Q.jsx)(D3,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:4,style:{margin:0},children:`系统设置`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`管理站点基础信息、协议文件和SEO配置`})]})]}),(0,Q.jsx)(X,{form:c,layout:`vertical`,children:Object.entries(h).map(([e,t])=>(0,Q.jsxs)(`div`,{style:{marginBottom:24},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14,display:`block`,marginBottom:12,paddingBottom:8,borderBottom:`1px solid #f0f0f5`},children:e}),e===`协议配置`?t.map(e=>(0,Q.jsx)(y,{config:e},e.id)):t.map(e=>(0,Q.jsx)(X.Item,{name:e.key,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:e.description}),extra:g(e),children:_(e)},e.id))]},e))})]}),(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`},children:(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(v3,{}),onClick:f,loading:i,size:`large`,style:{borderRadius:8,minWidth:140},children:`保存配置`})})]})},i7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(!1),[c]=X.useForm(),[l,u]=(0,S.useState)({open:!1,notifId:``,title:``}),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(1),[_,v]=(0,S.useState)(10),[y,b]=(0,S.useState)(0),x=async()=>{r(!0);try{let e=await B8(h,_),n=(await u8(1,1e3)).items||[],r={};n.forEach(e=>{r[e.id]=e.username}),t((e.items||[]).map(e=>({id:e.id,title:e.title,content:e.content,type:e.type,targetUserId:e.userId||null,target:e.userId?r[e.userId]||e.userId:`全部用户`,createdAt:e.createdAt}))),b(e.total||0),a(n.map(e=>({id:e.id,username:e.username})))}catch{LG.error(`加载通知列表失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{x()},[h,_]);let C=(e,t)=>{g(e),v(t)},w=async()=>{try{let e=await c.validateFields();await V8({title:e.title,content:e.content,type:e.type||`system`,target_user_id:e.target_user_id||void 0}),LG.success(`消息已发送`),s(!1),c.resetFields(),x()}catch{}},T=async e=>{try{await H8(e),LG.success(`已删除`),x()}catch(e){LG.error(e?.message||`删除失败`)}},E=async(e,t)=>{u({open:!0,notifId:e,title:t}),m(!0);try{f((await U8(e)).items||[])}catch{LG.error(`加载已读列表失败`)}finally{m(!1)}},D=e=>{switch(e){case`system`:return`blue`;case`credit`:return`orange`;case`promo`:return`purple`;default:return`default`}};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(f0,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`消息推送管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[`共 `,y,` 条消息`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>s(!0),style:{borderRadius:8},children:`发送新消息`})]}),(0,Q.jsx)(bQ,{columns:[{title:`标题`,dataIndex:`title`,width:200,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`内容`,dataIndex:`content`,ellipsis:!0},{title:`类型`,dataIndex:`type`,width:80,render:e=>(0,Q.jsx)(NQ,{color:D(e),children:{system:`系统`,credit:`积分`,promo:`活动`}[e]||e})},{title:`发送目标`,dataIndex:`target`,width:120,render:e=>(0,Q.jsx)(NQ,{color:e===`全部用户`?`green`:`blue`,children:e})},{title:`发送时间`,dataIndex:`createdAt`,width:160,render:e=>Z5(e)},{title:`操作`,key:`action`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>E(t.id,t.title),children:`已读`}),(0,Q.jsx)(WG,{title:`确定删除该消息?`,onConfirm:()=>T(t.id),children:(0,Q.jsx)(qE,{type:`link`,danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:{current:h,pageSize:_,total:y,onChange:C,showSizeChanger:!0,showTotal:e=>`共 ${e} 条消息`},scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w3,{}),`发送消息`]}),open:o,onOk:w,onCancel:()=>{s(!1),c.resetFields()},okText:`发送`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`title`,label:`消息标题`,rules:[{required:!0,message:`请输入标题`}],children:(0,Q.jsx)(hW,{placeholder:`请输入消息标题`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`content`,label:`消息内容`,rules:[{required:!0,message:`请输入内容`}],children:(0,Q.jsx)(hW.TextArea,{rows:4,placeholder:`请输入消息内容`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`type`,label:`消息类型`,style:{flex:1},initialValue:`system`,rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`system`,label:`系统通知`},{value:`credit`,label:`积分通知`},{value:`promo`,label:`活动通知`}]})}),(0,Q.jsx)(X.Item,{name:`target_user_id`,label:`发送目标`,style:{flex:1},extra:`留空则发送给全部用户`,children:(0,Q.jsx)(RC,{size:`large`,allowClear:!0,placeholder:`全部用户`,options:i.map(e=>({value:e.id,label:e.username}))})})]})]})}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(o6,{}),`已读用户 — `,l.title]}),open:l.open,onCancel:()=>{u({open:!1,notifId:``,title:``}),f([])},footer:null,width:480,children:p?(0,Q.jsx)(`div`,{style:{textAlign:`center`,padding:40},children:`加载中...`}):d.length===0?(0,Q.jsx)(pC,{description:`暂无用户已读`,style:{padding:`40px 0`}}):(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{marginBottom:12,color:`#64748b`,fontSize:13},children:[`共 `,d.length,` 人已读`]}),(0,Q.jsx)(bQ,{dataSource:d,rowKey:`userId`,pagination:!1,size:`small`,columns:[{title:`用户名`,dataIndex:`username`,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`已读时间`,dataIndex:`readAt`,width:180,render:e=>Z5(e)}]})]})})]})},a7=o(((e,t)=>{var n={version:`1.15.0`};n[437]=(function(){for(var e=`\0\x07\b \v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■\xA0`,t=[],n={},r=0;r!=e.length;++r)e.charCodeAt(r)!==65533&&(n[e.charAt(r)]=r),t[r]=e.charAt(r);return{enc:n,dec:t}})(),n[620]=(function(){for(var e=`\0\x07\b \v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ÇüéâäàąçêëèïîćÄĄĘęłôöĆûùŚÖܢ٥śƒŹŻóÓńŃźż¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■\xA0`,t=[],n={},r=0;r!=e.length;++r)e.charCodeAt(r)!==65533&&(n[e.charAt(r)]=r),t[r]=e.charAt(r);return{enc:n,dec:t}})(),n[737]=(function(){for(var e=`\0\x07\b \v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■\xA0`,t=[],n={},r=0;r!=e.length;++r)e.charCodeAt(r)!==65533&&(n[e.charAt(r)]=r),t[r]=e.charAt(r);return{enc:n,dec:t}})(),n[850]=(function(){for(var e=`\0\x07\b @@ -525,19 +525,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `);break;case``:l=!0;break;case``:l=!1;break;case``:case``:case``:break;case``:l=!1;break;default:if(!l&&o.WTF)throw Error(`unrecognized `+n[0]+` in threaded comments`)}return e}),s)))}),_&&_.length&&ac(g,_,!0,c.people||[])}catch(e){if(c.WTF)throw e}var v,h}function Gd(e){return e.charAt(0)==`/`?e.slice(1):e}function Kd(e,t){if(Ee(),Vd(t||={}),at(e,`META-INF/manifest.xml`)||at(e,`objectdata.xml`))return ld(e,t);if(at(e,`Index/Document.iwa`)){if(typeof Uint8Array>`u`)throw Error(`NUMBERS file parsing requires Uint8Array support`);if(e.FileIndex)return Rd(e);var n=Me.utils.cfb_new();return lt(e).forEach(function(t){ut(n,t,function e(t,n,r){if(!r)return it(ot(t,n));if(!n)return null;try{return e(t,n)}catch{return null}}(e,t))}),Rd(n)}if(!at(e,`[Content_Types].xml`))throw at(e,`index.xml.gz`)?Error(`Unsupported NUMBERS 08 file`):at(e,`index.xml`)?Error(`Unsupported NUMBERS 09 file`):Error(`Unsupported ZIP file`);var r,i,a=lt(e),o=function(e){var t=Zr();if(!e||!e.match)return t;var n={};if((e.match(_t)||[]).forEach(function(e){var r=bt(e);switch(r[0].replace(vt,`<`)){case`]*>([\\s\\S]*?)`));n&&0`:r=null;break;default:if(o.indexOf(``),l=c[0].slice(4),u=c[1];switch(l){case`lpstr`:case`bstr`:case`lpwstr`:n[r]=Et(u);break;case`bool`:n[r]=It(u);break;case`i1`:case`i2`:case`i4`:case`i8`:case`int`:case`uint`:n[r]=parseInt(u,10);break;case`r4`:case`r8`:case`decimal`:n[r]=parseFloat(u);break;case`filetime`:case`date`:n[r]=Je(u);break;case`cy`:case`error`:n[r]=Et(u);break;default:if(l.slice(-1)==`/`)break;t.WTF&&typeof console<`u`&&console.warn(`Unexpected`,o,l,c)}}else if(o.slice(0,2)!==``:break;case``:break;case``:case``:case``:break;case``:O=!1;break;default:if(!O&&E.WTF)throw Error(`unrecognized `+t[0]+` in threaded comments`)}return e}),D)),k&&=Ud(k,p.Sheets);var A=+!!st(e,`xl/worksheets/sheet.xml`,!0);e:for(b=0;b!=m.Worksheets;++b){var j=`sheet`;if(k&&k[b]?(v=`xl/`+k[b][1].replace(/[\/]?xl\//,``),at(e,v)||(v=k[b][1]),at(e,v)||(v=T.replace(/_rels\/.*$/,``)+k[b][1]),j=k[b][2]):v=(v=`xl/worksheets/sheet`+(b+1-A)+`.`+w).replace(/sheet0\./,`sheet.`),y=v.replace(/^(.*)(\/)([^\/]*)$/,`$1/_rels/$3.rels`),t&&t.sheets!=null)switch(typeof t.sheets){case`number`:if(b!=t.sheets)continue e;break;case`string`:if(m.SheetNames[b].toLowerCase()!=t.sheets.toLowerCase())continue e;break;default:if(Array.isArray&&Array.isArray(t.sheets)){for(var M=!1,N=0;N!=t.sheets.length;++N)typeof t.sheets[N]==`number`&&t.sheets[N]==b&&(M=1),typeof t.sheets[N]==`string`&&t.sheets[N].toLowerCase()==m.SheetNames[b].toLowerCase()&&(M=1);if(!M)continue e}}Wd(e,v,y,m.SheetNames[b],b,x,r,j,t,p,c,l)}return _={Directory:o,Workbook:p,Props:m,Custprops:g,Deps:h,Sheets:r,SheetNames:m.SheetNames,Strings:$c,Styles:l,Themes:c,SSF:Xe(V)},t&&t.bookFiles&&(e.files?(_.keys=a,_.files=e.files):(_.keys=[],_.files={},e.FullPaths.forEach(function(t,n){t=t.replace(/^Root Entry[\/]/,``),_.keys.push(t),_.files[t]=e.FileIndex[n]}))),t&&t.bookVBA&&(0/,`>`)];return e.forEach(function(e){var i=``;(e[1]||[]).forEach(function(a,o){var s;a.T?(a.a&&t.indexOf(a.a)==-1&&t.push(a.a),s={ref:e[0],id:`{54EE7951-7262-4200-6969-`+(`000000000000`+ n.tcid++).slice(-12)+`}`},o==0?i=s.id:s.parentId=i,a.ID=s.id,a.a&&(s.personId=`{54EE7950-7262-4200-6969-`+(`000000000000`+t.indexOf(a.a)).slice(-12)+`}`),r.push(tn(`threadedComment`,$t(`text`,a.t||``),s))):delete a.ID})}),r.push(``),r.join(``)}(f,d,t)),i.threadedcomments.push(m),ri(g,-1,`../threadedComments/threadedComment`+s+`.`+n,$r.TCMNT)),ut(a,m=`xl/comments`+s+`.`+n,oc(f)),i.comments.push(m),ri(g,-1,`../comments`+s+`.`+n,$r.CMNT),p=!0),_[`!legacy`]&&p&&ut(a,`xl/drawings/vmlDrawing`+s+`.vml`,ic(s,_[`!comments`])),delete _[`!comments`],delete _[`!legacy`]),g[`!id`].rId1&&ut(a,ei(o),ni(g))}return t.Strings!=null&&0/,`>`)],r.forEach(function(e,t){u.push(tn(`person`,null,{displayName:e,id:`{54EE7950-7262-4200-6969-`+(`000000000000`+t).slice(-12)+`}`,userId:e,providerId:`None`}))}),u.push(``),u.join(``))),i.people.push(o),ri(t.wbrels,-1,`persons/person.xml`,$r.PEOPLE)),ut(a,`[Content_Types].xml`,Qr(i,t)),ut(a,`_rels/.rels`,ni(t.rels)),ut(a,`xl/_rels/workbook.xml.rels`,ni(t.wbrels)),delete t.revssf,delete t.ssf,a}function Xd(e,t){var n=``;switch((t||{}).type||`base64`){case`buffer`:return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case`base64`:n=b(e.slice(0,12));break;case`binary`:n=e;break;case`array`:return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];default:throw Error(`Unrecognized type `+(t&&t.type||`undefined`))}return[n.charCodeAt(0),n.charCodeAt(1),n.charCodeAt(2),n.charCodeAt(3),n.charCodeAt(4),n.charCodeAt(5),n.charCodeAt(6),n.charCodeAt(7)]}function Zd(e,t){var n=0;e:for(;n`u`||x||(r.type=`array`)),r.type==`string`&&(d=!0,r.type=`binary`,r.codepage=65001,l=(f=e).match(/[^\x00-\x7F]/)?Gt(f):f),r.type==`array`&&typeof Uint8Array<`u`&&e instanceof Uint8Array&&typeof ArrayBuffer<`u`){var f=new ArrayBuffer(3),f=new Uint8Array(f);if(f.foo=`bar`,!f.foo)return(r=Xe(r)).type=`array`,$d(O(l),r)}switch((i=Xd(l,r))[0]){case 208:if(i[1]===207&&i[2]===17&&i[3]===224&&i[4]===161&&i[5]===177&&i[6]===26&&i[7]===225)return s=Me.read(l,r),c=r,(Me.find(s,`EncryptedPackage`)?qd:Iu)(s,c);break;case 9:if(i[1]<=8)return Iu(l,r);break;case 60:return Cu(l,r);case 73:if(i[1]===73&&i[2]===42&&i[3]===0)throw Error(`TIFF Image File is not a spreadsheet`);if(i[1]===68)return function(e,t){var n=t||{},r=!!n.WTF;n.WTF=!0;try{var i=La.to_workbook(e,n);return n.WTF=r,i}catch(i){if(n.WTF=r,!i.message.match(/SYLK bad record ID/)&&r)throw i;return eo.to_workbook(e,t)}}(l,r);break;case 84:if(i[1]===65&&i[2]===66&&i[3]===76)return Ba.to_workbook(l,r);break;case 80:return i[1]===75&&i[2]<9&&i[3]<9?(o=c=l,(a=(a=r)||{}).type||(a.type=x&&Buffer.isBuffer(c)?`buffer`:`base64`),Kd(ft(o,a),a)):Qd(e,l,r,d);case 239:return i[3]===60?Cu(l,r):Qd(e,l,r,d);case 255:if(i[1]===254)return o=l,(a=r).type==`base64`&&(o=b(o)),o=n.utils.decode(1200,o.slice(2),`str`),a.type=`binary`,Zd(o,a);if(i[1]===0&&i[2]===2&&i[3]===0)return uo.to_workbook(l,r);break;case 0:if(i[1]===0&&(2<=i[2]&&i[3]===0||i[2]===0&&(i[3]===8||i[3]===9)))return uo.to_workbook(l,r);break;case 3:case 131:case 139:case 140:return ja.to_workbook(l,r);case 123:if(i[1]===92&&i[2]===114&&i[3]===116)return ns.to_workbook(l,r);break;case 10:case 13:case 32:return function(e,t){var n=``,r=Xd(e,t);switch(t.type){case`base64`:n=b(e);break;case`binary`:n=e;break;case`buffer`:n=e.toString(`binary`);break;case`array`:n=Ye(e);break;default:throw Error(`Unrecognized type `+t.type)}return r[0]==239&&r[1]==187&&r[2]==191&&(n=Wt(n)),t.type=`binary`,Zd(n,t)}(l,r);case 137:if(i[1]===80&&i[2]===78&&i[3]===71)throw Error(`PNG Image File is not a spreadsheet`)}return-1t)return t;throw Error(`Cannot find sheet # `+t)}if(typeof t!=`string`)throw Error(`Cannot find sheet |`+t+`|`);if(-1<(e=e.SheetNames.indexOf(t)))return e;throw Error(`Cannot find sheet name |`+t+`|`)}(e,t),e.Workbook.Sheets[t]||(e.Workbook.Sheets[t]={}),n){case 0:case 1:case 2:break;default:throw Error(`Bad sheet visibility setting `+n)}e.Workbook.Sheets[t].Hidden=n},cell_set_number_format:function(e,t){return e.z=t,e},cell_set_hyperlink:bf,cell_set_internal_link:function(e,t,n){return bf(e,`#`+t,n)},cell_add_comment:function(e,t,n){e.c||=[],e.c.push({t,a:n||`SheetJS`})},sheet_set_array_formula:function(e,t,n,r){for(var i=typeof t==`string`?or(t):t,a=typeof t==`string`?t:ar(t),o=i.s.r;o<=i.e.r;++o)for(var s=i.s.c;s<=i.e.c;++s){var c=_f(e,o,s);c.t=`n`,c.F=a,delete c.v,o==i.s.r&&s==i.s.c&&(c.f=n,r&&(c.D=!0))}return e},consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};function Sf(e){xf=e}var da={to_json:function(e,t){var n=xf({objectMode:!0});if(e==null||e[`!ref`]==null)return n.push(null),n;var r,i={t:`n`,v:0},a=0,o=1,s=[],c=``,l={s:{r:0,c:0},e:{r:0,c:0}},u=t||{},d=u.range==null?e[`!ref`]:u.range;switch(u.header===1?a=1:u.header===`A`?a=2:Array.isArray(u.header)&&(a=3),typeof d){case`string`:l=or(d);break;case`number`:(l=or(e[`!ref`])).s.r=d;break;default:l=d}0a.e.r)return s||(s=!0,n.push(``+i)),n.push(null);for(;o<=a.e.r;){n.push($u(e,a,o,r)),++o;break}},n},to_csv:function(e,t){var n=xf(),r=t??{};if(e==null||e[`!ref`]==null)return n.push(null),n;var i=or(e[`!ref`]),a=r.FS===void 0?`,`:r.FS,o=a.charCodeAt(0),s=r.RS===void 0?` -`:r.RS,c=s.charCodeAt(0),l=RegExp((a==`|`?`\\|`:a)+`+$`),u=``,d=[];r.dense=Array.isArray(e);for(var f=r.skipHidden&&e[`!cols`]||[],p=r.skipHidden&&e[`!rows`]||[],m=i.s.c;m<=i.e.c;++m)(f[m]||{}).hidden||(d[m]=tr(m));var h=i.s.r,g=!1,_=0;return n._read=function(){if(!g)return g=!0,n.push(``);for(;h<=i.e.r;)if(++h,!(p[h-1]||{}).hidden&&(u=pf(e,i,h-1,d,o,c,a,r),u!=null&&((u=r.strip?u.replace(l,``):u)||!1!==r.blankrows)))return n.push((_++?s:``)+u);return n.push(null)},n},set_readable:Sf},Cf=function(){function e(t,n,r){return this instanceof e?(this.tagName=t,this._attributes=n||{},this._children=r||[],this._prefix=``,this):new e(t,n,r)}return e.prototype.createElement=function(){return new e(arguments)},e.prototype.children=function(){return this._children},e.prototype.append=function(e){return this._children.push(e),this},e.prototype.prefix=function(e){return arguments.length==0?this._prefix:(this._prefix=e,this)},e.prototype.attr=function(e,t){if(t==null)return delete this._attributes[e],this;if(arguments.length==0)return this._attributes;if(typeof e==`string`&&arguments.length==1)return this._attributes.attr[e];if(typeof e==`object`&&arguments.length==1)for(var n in e)this._attributes[n]=e[n];else arguments.length==2&&typeof e==`string`&&(this._attributes[e]=t);return this},e.prototype.escapeAttributeValue=function(e){return`"`+e.replace(/\"/g,`"`)+`"`},e.prototype.toXml=function(e){var t=(e||=this)._prefix;if(t+=`<`+e.tagName,e._attributes)for(var n in e._attributes)t+=` `+n+`=`+this.escapeAttributeValue(``+e._attributes[n]);if(e._children&&0`;for(var r=0;r`}else t+=`/>`;return t},e}(),wf=function(e){var t,n=164,r={0:`General`,1:`0`,2:`0.00`,3:`#,##0`,4:`#,##0.00`,9:`0%`,10:`0.00%`,11:`0.00E+00`,12:`# ?/?`,13:`# ??/??`,14:`m/d/yy`,15:`d-mmm-yy`,16:`d-mmm`,17:`mmm-yy`,18:`h:mm AM/PM`,19:`h:mm:ss AM/PM`,20:`h:mm`,21:`h:mm:ss`,22:`m/d/yy h:mm`,37:`#,##0 ;(#,##0)`,38:`#,##0 ;[Red](#,##0)`,39:`#,##0.00;(#,##0.00)`,40:`#,##0.00;[Red](#,##0.00)`,45:`mm:ss`,46:`[h]:mm:ss`,47:`mmss.0`,48:`##0.0E+0`,49:`@`,56:`"上午/下午 "hh"時"mm"分"ss"秒 "`},i={};for(t in r)i[r[t]]=t;var a={};return{initialize:function(e){this.$fonts=Cf(`fonts`).attr(`count`,0).attr(`x14ac:knownFonts`,`1`),this.$fills=Cf(`fills`).attr(`count`,0),this.$borders=Cf(`borders`).attr(`count`,0),this.$numFmts=Cf(`numFmts`).attr(`count`,0),this.$cellStyleXfs=Cf(`cellStyleXfs`),this.$xf=Cf(`xf`).attr(`numFmtId`,0).attr(`fontId`,0).attr(`fillId`,0).attr(`borderId`,0),this.$cellXfs=Cf(`cellXfs`).attr(`count`,0),this.$cellStyles=Cf(`cellStyles`).append(Cf(`cellStyle`).attr(`name`,`Normal`).attr(`xfId`,0).attr(`builtinId`,0)),this.$dxfs=Cf(`dxfs`).attr(`count`,`0`),this.$tableStyles=Cf(`tableStyles`).attr(`count`,`0`).attr(`defaultTableStyle`,`TableStyleMedium9`).attr(`defaultPivotStyle`,`PivotStyleMedium4`),this.$styles=Cf(`styleSheet`).attr(`xmlns:mc`,`http://schemas.openxmlformats.org/markup-compatibility/2006`).attr(`xmlns:x14ac`,`http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac`).attr(`xmlns`,`http://schemas.openxmlformats.org/spreadsheetml/2006/main`).attr(`mc:Ignorable`,`x14ac`).prefix(``).append(this.$numFmts).append(this.$fonts).append(this.$fills).append(this.$borders).append(this.$cellStyleXfs.append(this.$xf)).append(this.$cellXfs).append(this.$cellStyles).append(this.$dxfs).append(this.$tableStyles);var t=e.defaultCellStyle||{};return t.font||={name:`Calibri`,sz:`11`},t.font.name||(t.font.name=`Calibri`),t.font.sz||(t.font.sz=11),t.fill||={patternType:`none`,fgColor:{}},t.border||={},t.numFmt||=0,this.defaultStyle=t,e=JSON.parse(JSON.stringify(t)),e.fill={patternType:`gray125`,fgColor:{}},this.addStyles([t,e]),this},addStyle:function(e){var t=JSON.stringify(e),n=a[t];return n==null?(n=this._addXf(e),a[t]=n):n=a[t],n},addStyles:function(e){var t=this;return e.map(function(e){return t.addStyle(e)})},_duckTypeStyle:function(e){return typeof e==`object`&&(e.patternFill||e.fgColor)?{fill:e}:e.font||e.numFmt||e.border||e.fill?e:this._getStyleCSS(e)},_getStyleCSS:function(e){return e},_addXf:function(e){var t=this._addFont(e.font),n=this._addFill(e.fill),r=this._addBorder(e.border),i=this._addNumFmt(e.numFmt),a=Cf(`xf`).attr(`numFmtId`,i).attr(`fontId`,t).attr(`fillId`,n).attr(`borderId`,r).attr(`xfId`,`0`);return 0/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`),e=Cf(`numFmt`).attr(`numFmtId`,++n).attr(`formatCode`,e),this.$numFmts.append(e),e=this.$numFmts.children().length,this.$numFmts.attr(`count`,e),n)},_addFill:function(e){if(!e)return 0;var t,n=Cf(`patternFill`).attr(`patternType`,e.patternType||`solid`);return e.fgColor&&(t=Cf(`fgColor`),e.fgColor.rgb?(e.fgColor.rgb.length==6&&(e.fgColor.rgb=`FF`+e.fgColor.rgb),t.attr(`rgb`,e.fgColor.rgb),n.append(t)):e.fgColor.theme&&(t.attr(`theme`,e.fgColor.theme),e.fgColor.tint&&t.attr(`tint`,e.fgColor.tint),n.append(t)),e.bgColor||={indexed:`64`}),e.bgColor&&(e=Cf(`bgColor`).attr(e.bgColor),n.append(e)),n=Cf(`fill`).append(n),this.$fills.append(n),n=this.$fills.children().length,this.$fills.attr(`count`,n),n-1},_getSubBorder:function(e,t){var n=Cf(e);return t&&(n.attr(`style`,t.style||`medium`),t.color&&(e=Cf(`color`),t.color.auto?e.attr(`auto`,t.color.auto):t.color.rgb?e.attr(`rgb`,t.color.rgb):(t.color.theme||t.color.tint)&&(e.attr(`theme`,t.color.theme||`1`),e.attr(`tint`,t.color.tint||`0`)),n.append(e))),n},_addBorder:function(e){if(!e)return 0;var t=this,n=Cf(`border`).attr(`diagonalUp`,e.diagonalUp).attr(`diagonalDown`,e.diagonalDown);[`left`,`right`,`top`,`bottom`,`diagonal`].forEach(function(r){n.append(t._getSubBorder(r,e[r]))}),this.$borders.append(n);var r=this.$borders.children().length;return this.$borders.attr(`count`,r),r-1},toXml:function(){return this.$styles.toXml()}}.initialize(e||{})};Iu!==void 0&&(e.parse_xlscfb=Iu),e.parse_zip=Kd,e.read=$d,e.readFile=ef,e.readFileSync=ef,e.write=sf,e.writeFile=lf,e.writeFileSync=lf,e.writeFileAsync=function(e,t,n,r){var i=n||{};return i.type=`file`,i.file=e,cf(i),i.type=`buffer`,r instanceof Function||(r=n),Ae.writeFile(e,sf(t,i),r)},e.utils=Ea,e.writeXLSX=of,e.writeFileXLSX=function(e,t,n){return(n||={}).type=`file`,n.file=t,cf(n),of(e,n)},e.SSF=De,da!==void 0&&(e.stream=da),Me!==void 0&&(e.CFB=Me),l===void 0||((da=o7())||{}).Readable&&Sf(da.Readable)}if(e===void 0?t!==void 0&&t.exports?r(t.exports):typeof define==`function`&&define.amd?define(`xlsx`,function(){return n.version||r(n),n}):r(n):r(e),typeof window<`u`&&!window.XLSX)try{window.XLSX=n}catch{}}))(),1),c7={top:{style:`thin`,color:{rgb:`000000`}},right:{style:`thin`,color:{rgb:`000000`}},bottom:{style:`thin`,color:{rgb:`000000`}},left:{style:`thin`,color:{rgb:`000000`}}},l7={vertical:`center`,wrapText:!0},Yte={font:{bold:!0,sz:16,color:{rgb:`FFFFFF`}},fill:{fgColor:{rgb:`111827`}},alignment:{...l7,horizontal:`center`},border:c7},Xte={font:{bold:!0,color:{rgb:`111827`}},fill:{fgColor:{rgb:`F3F4F6`}},alignment:{...l7,horizontal:`center`},border:c7},Zte={font:{color:{rgb:`111827`}},fill:{fgColor:{rgb:`FFFFFF`}},alignment:{...l7,horizontal:`left`},border:c7},Qte={font:{bold:!0,color:{rgb:`FFFFFF`}},fill:{fgColor:{rgb:`374151`}},alignment:{...l7,horizontal:`center`},border:c7},$te={font:{color:{rgb:`111827`}},fill:{fgColor:{rgb:`FFFFFF`}},alignment:{...l7,horizontal:`left`},border:c7};function u7(e){return e??``}function d7(e){if(e==null)return 0;let t=(e instanceof Date?e.toISOString():String(e)).split(/\r?\n/);return Math.max(...t.map(e=>Array.from(e).reduce((e,t)=>e+(t.charCodeAt(0)>255?2:1),0)),0)}function f7(e,t,n){return Math.min(n,Math.max(t,e))}function ene(e,t){let n=Math.max(t.length,...e.map(e=>e.length));return Array.from({length:n},(n,r)=>{let i=t[r];if(i?.width)return{wch:i.width};let a=e.reduce((e,t)=>Math.max(e,d7(t[r])),d7(i?.title)),o=i?.minWidth??10,s=i?.maxWidth??42;return{wch:f7(Math.ceil(a*1.15)+2,o,s)}})}function tne(e,t,n=20){return f7(n+(e.reduce((e,n,r)=>{let i=Math.max(8,t[r]?.wch||12),a=(n==null?``:String(n)).split(/\r?\n/).reduce((e,t)=>e+Math.max(1,Math.ceil(d7(t)/Math.max(8,i-2))),0);return Math.max(e,a)},1)-1)*16,n,120)}function p7(e,t,n){e.s={...t,alignment:{...t.alignment},border:c7},n&&(e.z=n)}function m7(e){return typeof e==`number`&&Number.isFinite(e)}function nne(e){let{filename:t,sheetName:n,title:r,metadataRows:i=[],summaryRows:a=[],columns:o,rows:s}=e,c=Math.max(1,o.length),l=[],u=-1,d=-1;r&&(u=l.length,l.push([r,...Array.from({length:c-1},()=>``)])),i.forEach(e=>l.push(e.map(u7))),a.forEach(e=>l.push(e.map(u7))),(i.length||a.length)&&l.push(Array.from({length:c},()=>``)),d=l.length,l.push(o.map(e=>e.title)),s.forEach((e,t)=>{l.push(o.map(n=>u7(n.render(e,t))))});let f=s7.utils.aoa_to_sheet(l),p=s7.utils.decode_range(f[`!ref`]||`A1:A1`),m=ene(l,o);f[`!cols`]=m,f[`!rows`]=l.map((e,t)=>t===u?{hpt:34}:t===d?{hpt:28}:e.every(e=>e===``)?{hpt:10}:{hpt:tne(e,m)}),u>=0&&c>1&&(f[`!merges`]=f[`!merges`]||[],f[`!merges`].push({s:{r:u,c:0},e:{r:u,c:c-1}})),f[`!autofilter`]={ref:s7.utils.encode_range({s:{r:d,c:0},e:{r:Math.max(d,l.length-1),c:c-1}})};for(let e=p.s.r;e<=p.e.r;e+=1)for(let t=p.s.c;t<=p.e.c;t+=1){let n=s7.utils.encode_cell({r:e,c:t}),r=f[n]||{t:`s`,v:``};if(f[n]=r,e===u){p7(r,Yte);continue}if(e===d){p7(r,Qte);continue}if(e{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(h7),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)(1),[m,h]=(0,S.useState)(10),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(``),[D,O]=(0,S.useState)(``),[k,A]=(0,S.useState)(``),[j,M]=(0,S.useState)(``),[N,P]=(0,S.useState)(``),[F,I]=(0,S.useState)([null,null]),L=(0,S.useMemo)(()=>({page:f,pageSize:m,userName:N||void 0,recordType:v||void 0,creditSubject:b||void 0,mediaType:C||void 0,chargeKind:T||void 0,sourceModule:D||void 0,sourceStepCode:k||void 0,billingScene:j||void 0,startDate:F[0]?.format(`YYYY-MM-DD`),endDate:F[1]?.format(`YYYY-MM-DD`),...fne(g)}),[f,m,N,v,b,C,T,D,k,j,F,g]),R=async()=>{s(!0);try{let e=await S8(L);t(e.items||[]),a(e.total||0),r(e.summary||h7)}catch(e){BG.error(e?.message||`加载积分记录失败`)}finally{s(!1)}};return(0,S.useEffect)(()=>{R()},[L]),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, minmax(0, 1fr))`,gap:16,marginBottom:16},children:[(0,Q.jsx)(LR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(r0,{style:{color:`#10b981`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总充值`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#10b981`},children:[`+`,g7(n.totalRecharge)]})]})]})}),(0,Q.jsx)(LR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(Z1,{style:{color:`#ef4444`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总消费`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#ef4444`},children:[`-`,g7(n.totalConsume)]})]})]})}),(0,Q.jsx)(LR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(f3,{style:{color:`#3b82f6`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总回退`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#3b82f6`},children:[`+`,g7(n.totalRefund)]})]})]})}),(0,Q.jsx)(LR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(N6,{style:{color:`#6366f1`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`交易 / 生成`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800},children:[g7(n.transactionCount),` / `,g7(n.generationCount)]})]})]})})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, minmax(0, 1fr))`,gap:16,marginBottom:16},children:[(0,Q.jsxs)(LR,{size:`small`,bordered:!1,children:[`图片生成:`,g7(n.imageGenerationCount),` 条 / `,g7(n.imageConsume),` 积分`]}),(0,Q.jsxs)(LR,{size:`small`,bordered:!1,children:[`视频生成:`,g7(n.videoGenerationCount),` 条 / `,g7(n.videoConsume),` 积分`]}),(0,Q.jsxs)(LR,{size:`small`,bordered:!1,children:[`提词消费:`,g7(n.textConsume),` 积分`]}),(0,Q.jsxs)(LR,{size:`small`,bordered:!1,children:[`视频分析:`,g7(n.analysisConsume),` 积分`]})]}),(0,Q.jsxs)(LR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(WV,{wrap:!0,children:[(0,Q.jsx)(BC,{value:g,onChange:e=>{p(1),_(e)},style:{width:150},options:ine}),(0,Q.jsx)(BC,{value:v,onChange:e=>{p(1),y(e)},style:{width:130},options:ane}),(0,Q.jsx)(BC,{value:b,onChange:e=>{p(1),x(e)},style:{width:180},options:one}),(0,Q.jsx)(BC,{value:C,onChange:e=>{p(1),w(e)},style:{width:110},options:sne}),(0,Q.jsx)(BC,{value:T,onChange:e=>{p(1),E(e)},style:{width:150},options:cne}),(0,Q.jsx)(BC,{value:D,onChange:e=>{p(1),O(e)},style:{width:150},options:lne}),(0,Q.jsx)(BC,{value:k,onChange:e=>{p(1),A(e)},style:{width:150},options:une}),(0,Q.jsx)(BC,{value:j,onChange:e=>{p(1),M(e)},style:{width:220},options:dne}),(0,Q.jsx)(vW,{placeholder:`用户名/手机号/邮箱`,value:N,onChange:e=>{p(1),P(e.target.value)},style:{width:180},allowClear:!0}),(0,Q.jsx)(QB.RangePicker,{value:F,onChange:e=>{p(1),I(e?[e[0],e[1]]:[null,null])},placeholder:[`开始日期`,`结束日期`],style:{width:250}})]}),(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(YE,{onClick:()=>{_(``),y(``),x(``),w(``),E(``),O(``),A(``),M(``),P(``),I([null,null]),p(1)},children:`重置`}),(0,Q.jsx)(YE,{icon:(0,Q.jsx)(kK,{}),onClick:R,children:`刷新`}),(0,Q.jsx)(YE,{type:`primary`,icon:(0,Q.jsx)(w1,{}),loading:c,onClick:async()=>{l(!0),d(`准备导出...`);try{let e={...L,page:1,pageSize:500},t=await S8(e),n=[...t.items||[]],r=t.summary||h7,i=t.total||0,a=Math.max(1,Math.ceil(i/500));d(`正在获取 ${n.length} / ${i}`);for(let t=2;t<=a;t+=1){let r=await S8({...e,page:t});n.push(...r.items||[]),d(`正在获取 ${Math.min(n.length,i)} / ${i}`)}nne({filename:`积分流水_${(0,ZE.default)().format(`YYYYMMDD_HHmmss`)}.xlsx`,sheetName:`积分流水`,title:`积分流水汇总`,metadataRows:[[`筛选时间`,`${F[0]?.format(`YYYY-MM-DD`)||`不限`} 至 ${F[1]?.format(`YYYY-MM-DD`)||`不限`}`],[`导出时间`,(0,ZE.default)().format(`YYYY-MM-DD HH:mm:ss`)],[`导出条数`,i]],summaryRows:[[`总充值`,r.totalRecharge],[`总消费`,r.totalConsume],[`总回退`,r.totalRefund],[`交易笔数`,r.transactionCount],[`生成条数`,r.generationCount],[`生成尝试次数`,r.generationAttemptCount],[`图片生成条数`,r.imageGenerationCount],[`视频生成条数`,r.videoGenerationCount],[`图片消费积分`,r.imageConsume],[`视频消费积分`,r.videoConsume],[`提词消费积分`,r.textConsume],[`视频分析积分`,r.analysisConsume],[`总 Token`,r.totalTokens],[`输入 Token`,r.inputTokens],[`输出 Token`,r.outputTokens]],columns:[{title:`时间`,maxWidth:22,render:e=>Z5(e.createdAt||``)},{title:`用户`,minWidth:12,maxWidth:20,render:e=>e.username||`-`},{title:`手机号`,minWidth:13,maxWidth:18,render:e=>e.phone||`-`},{title:`用户类型`,maxWidth:16,render:e=>e.userTypeLabel||`-`},{title:`前台归类`,maxWidth:18,render:e=>e.frontendUserKindLabel||`-`},{title:`流水类型`,maxWidth:14,align:`center`,render:e=>e.recordTypeLabel||e.type||`-`},{title:`积分类型`,maxWidth:20,render:e=>e.creditSubjectLabel||`-`},{title:`扣费子类`,maxWidth:22,render:e=>e.chargeKindLabel||`-`},{title:`模块`,maxWidth:20,render:e=>e.sourceModuleLabel||`-`},{title:`模块步骤`,maxWidth:22,render:e=>e.sourceStepCodeLabel||`-`},{title:`计费场景`,maxWidth:32,render:e=>e.billingSceneLabel||`-`},{title:`媒体类型`,maxWidth:12,align:`center`,render:e=>e.mediaTypeLabel||`-`},{title:`变动积分`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0.00`,render:e=>e.amount},{title:`变动后余额`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0.00`,render:e=>e.balanceAfter},{title:`实际 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.totalTokens||0},{title:`输入 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.inputTokens||0},{title:`输出 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.outputTokens||0},{title:`执行类型`,maxWidth:18,render:e=>_7(e.engineType)},{title:`执行配置`,maxWidth:28,render:e=>e.engineName||`-`},{title:`供应商`,maxWidth:18,render:e=>e.engineProvider||`-`},{title:`模型版本`,maxWidth:26,render:e=>e.engineModelName||`-`},{title:`关联状态`,maxWidth:14,align:`center`,render:e=>e.ownerDeleted?`关联已删除`:`正常`},{title:`说明`,minWidth:18,maxWidth:42,render:e=>e.description||``},{title:`业务归属类型`,maxWidth:18,render:e=>e.ownerType||``},{title:`业务归属ID`,maxWidth:28,render:e=>e.ownerId||``},{title:`BizKey`,maxWidth:36,render:e=>e.bizKey||``}],rows:n}),BG.success(`Excel 已导出`)}catch(e){BG.error(e?.message||`导出失败`)}finally{l(!1),d(``)}},children:`下载 Excel`})]})]}),u&&(0,Q.jsx)(`div`,{style:{marginBottom:12,color:`#6366f1`},children:u}),(0,Q.jsx)(CQ,{columns:[{title:`用户`,dataIndex:`username`,width:130,fixed:`left`,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:e||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:t.phone||`-`})]})},{title:`用户类型`,dataIndex:`userTypeLabel`,width:120,render:(e,t)=>(0,Q.jsx)(IQ,{color:t.userType===`admin`?`orange`:`blue`,children:t.userTypeLabel||`-`})},{title:`流水类型`,dataIndex:`recordType`,width:100,render:(e,t)=>{let n=rne[e]||{text:t.recordTypeLabel||e||`-`,color:`default`,icon:null};return(0,Q.jsx)(IQ,{color:n.color,icon:n.icon,children:n.text})}},{title:`积分类型`,dataIndex:`creditSubjectLabel`,width:150,render:e=>(0,Q.jsx)(IQ,{children:e||`-`})},{title:`模块`,dataIndex:`sourceModuleLabel`,width:130,render:e=>e||`-`},{title:`步骤/场景`,key:`scene`,width:210,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{children:t.billingSceneLabel||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:t.sourceStepCodeLabel||`-`})]})},{title:`媒体`,dataIndex:`mediaTypeLabel`,width:80,render:e=>e?(0,Q.jsx)(IQ,{color:`purple`,children:e}):`-`},{title:`变动积分`,dataIndex:`amount`,width:120,sorter:(e,t)=>e.amount-t.amount,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:e>0?`#10b981`:`#ef4444`},children:[e>0?`+`:``,g7(e)]})},{title:`余额`,dataIndex:`balanceAfter`,width:110,render:e=>g7(e)},{title:`Token`,key:`tokens`,width:140,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`b`,{children:g7(t.totalTokens)}),(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[`入 `,g7(t.inputTokens),` / 出 `,g7(t.outputTokens)]})]})},{title:`执行配置`,key:`engine`,width:230,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(IQ,{color:t.engineType===`model`?`geekblue`:t.engineType===`image`?`purple`:t.engineType===`video`?`cyan`:`default`,children:_7(t.engineType)}),(0,Q.jsx)(`div`,{children:t.engineName||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[t.engineProvider,t.engineModelName].filter(Boolean).join(` / `)||`-`})]})},{title:`关联状态`,dataIndex:`ownerDeleted`,width:100,render:e=>(0,Q.jsx)(IQ,{color:e?`red`:`green`,children:e?`已删除`:`正常`})},{title:`说明`,dataIndex:`description`,width:240,ellipsis:!0},{title:`时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})}],dataSource:e,rowKey:`id`,loading:o,pagination:{current:f,pageSize:m,total:i,onChange:(e,t)=>{p(e),h(t)},showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`},scroll:{x:1900}})]})]})},mne=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(180),[u]=X.useForm(),d=async()=>{try{let e=await F8(),t={};e.forEach(e=>{t[e.key]=e.value}),u.setFieldsValue({wechat_appid:t.payment_wechat_appid||``,wechat_mch_id:t.payment_wechat_mch_id||``,wechat_private_key:t.payment_wechat_private_key||``,wechat_cert_serial_no:t.payment_wechat_cert_serial_no||``,wechat_api_v3_key:t.payment_wechat_api_v3_key||``,wechat_notify_url:t.payment_wechat_notify_url||``,wechat_public_key:t.payment_wechat_public_key||``,wechat_public_key_id:t.payment_wechat_public_key_id||``,alipay_app_id:t.payment_alipay_app_id||``,alipay_private_key:t.payment_alipay_private_key||``,alipay_public_key:t.payment_alipay_public_key||``,alipay_notify_url:t.payment_alipay_notify_url||``,alipay_gateway:t.payment_alipay_gateway||``,order_timeout:t.payment_order_timeout||`180`}),r(t.payment_wechat_enabled===`true`),a(t.payment_alipay_enabled===`true`),s(t.payment_mock===`true`),l(parseInt(t.payment_order_timeout||`180`,10))}catch{BG.error(`加载支付配置失败`)}};return(0,S.useEffect)(()=>{d()},[]),(0,Q.jsxs)(`div`,{style:{maxWidth:`100%`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,marginBottom:24},children:[(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsx)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:40,height:40,borderRadius:10,background:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:`#6366f1`},children:(0,Q.jsx)(GB,{})}),(0,Q.jsx)(`div`,{children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`订单超时时间`})})]}),(0,Q.jsx)(X,{form:u,layout:`inline`,children:(0,Q.jsx)(X.Item,{name:`order_timeout`,style:{margin:0},children:(0,Q.jsxs)(WV.Compact,{style:{width:140},children:[(0,Q.jsx)(lB,{min:30,max:86400,placeholder:`180`,style:{width:`100%`},size:`middle`}),(0,Q.jsx)(Z.Text,{children:`秒`})]})})})]})})}),(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsx)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,background:o?`#fff7e6`:`#fafbff`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:40,height:40,borderRadius:10,background:o?`rgba(245,158,11,0.15)`:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:o?`#f59e0b`:`#6366f1`},children:(0,Q.jsx)(f2,{})}),(0,Q.jsx)(`div`,{children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`模拟支付模式`})})]}),(0,Q.jsx)(Fq,{checked:o,onChange:s,checkedChildren:`已开启`,unCheckedChildren:`已关闭`})]})})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(7,193,96,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:22,color:`#07c160`},children:(0,Q.jsx)(I6,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:5,style:{margin:0},children:`微信支付`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:`微信商户号支付配置`})]})]}),(0,Q.jsx)(Fq,{checked:n,onChange:r,checkedChildren:`已启用`,unCheckedChildren:`未启用`})]}),(0,Q.jsxs)(X,{form:u,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`wechat_appid`,label:`AppID`,children:(0,Q.jsx)(vW,{placeholder:`微信支付 AppID`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_mch_id`,label:`商户号 (MchID)`,children:(0,Q.jsx)(vW,{placeholder:`微信支付商户号`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_private_key`,label:`商户私钥`,extra:` +`:r.RS,c=s.charCodeAt(0),l=RegExp((a==`|`?`\\|`:a)+`+$`),u=``,d=[];r.dense=Array.isArray(e);for(var f=r.skipHidden&&e[`!cols`]||[],p=r.skipHidden&&e[`!rows`]||[],m=i.s.c;m<=i.e.c;++m)(f[m]||{}).hidden||(d[m]=tr(m));var h=i.s.r,g=!1,_=0;return n._read=function(){if(!g)return g=!0,n.push(``);for(;h<=i.e.r;)if(++h,!(p[h-1]||{}).hidden&&(u=pf(e,i,h-1,d,o,c,a,r),u!=null&&((u=r.strip?u.replace(l,``):u)||!1!==r.blankrows)))return n.push((_++?s:``)+u);return n.push(null)},n},set_readable:Sf},Cf=function(){function e(t,n,r){return this instanceof e?(this.tagName=t,this._attributes=n||{},this._children=r||[],this._prefix=``,this):new e(t,n,r)}return e.prototype.createElement=function(){return new e(arguments)},e.prototype.children=function(){return this._children},e.prototype.append=function(e){return this._children.push(e),this},e.prototype.prefix=function(e){return arguments.length==0?this._prefix:(this._prefix=e,this)},e.prototype.attr=function(e,t){if(t==null)return delete this._attributes[e],this;if(arguments.length==0)return this._attributes;if(typeof e==`string`&&arguments.length==1)return this._attributes.attr[e];if(typeof e==`object`&&arguments.length==1)for(var n in e)this._attributes[n]=e[n];else arguments.length==2&&typeof e==`string`&&(this._attributes[e]=t);return this},e.prototype.escapeAttributeValue=function(e){return`"`+e.replace(/\"/g,`"`)+`"`},e.prototype.toXml=function(e){var t=(e||=this)._prefix;if(t+=`<`+e.tagName,e._attributes)for(var n in e._attributes)t+=` `+n+`=`+this.escapeAttributeValue(``+e._attributes[n]);if(e._children&&0`;for(var r=0;r`}else t+=`/>`;return t},e}(),wf=function(e){var t,n=164,r={0:`General`,1:`0`,2:`0.00`,3:`#,##0`,4:`#,##0.00`,9:`0%`,10:`0.00%`,11:`0.00E+00`,12:`# ?/?`,13:`# ??/??`,14:`m/d/yy`,15:`d-mmm-yy`,16:`d-mmm`,17:`mmm-yy`,18:`h:mm AM/PM`,19:`h:mm:ss AM/PM`,20:`h:mm`,21:`h:mm:ss`,22:`m/d/yy h:mm`,37:`#,##0 ;(#,##0)`,38:`#,##0 ;[Red](#,##0)`,39:`#,##0.00;(#,##0.00)`,40:`#,##0.00;[Red](#,##0.00)`,45:`mm:ss`,46:`[h]:mm:ss`,47:`mmss.0`,48:`##0.0E+0`,49:`@`,56:`"上午/下午 "hh"時"mm"分"ss"秒 "`},i={};for(t in r)i[r[t]]=t;var a={};return{initialize:function(e){this.$fonts=Cf(`fonts`).attr(`count`,0).attr(`x14ac:knownFonts`,`1`),this.$fills=Cf(`fills`).attr(`count`,0),this.$borders=Cf(`borders`).attr(`count`,0),this.$numFmts=Cf(`numFmts`).attr(`count`,0),this.$cellStyleXfs=Cf(`cellStyleXfs`),this.$xf=Cf(`xf`).attr(`numFmtId`,0).attr(`fontId`,0).attr(`fillId`,0).attr(`borderId`,0),this.$cellXfs=Cf(`cellXfs`).attr(`count`,0),this.$cellStyles=Cf(`cellStyles`).append(Cf(`cellStyle`).attr(`name`,`Normal`).attr(`xfId`,0).attr(`builtinId`,0)),this.$dxfs=Cf(`dxfs`).attr(`count`,`0`),this.$tableStyles=Cf(`tableStyles`).attr(`count`,`0`).attr(`defaultTableStyle`,`TableStyleMedium9`).attr(`defaultPivotStyle`,`PivotStyleMedium4`),this.$styles=Cf(`styleSheet`).attr(`xmlns:mc`,`http://schemas.openxmlformats.org/markup-compatibility/2006`).attr(`xmlns:x14ac`,`http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac`).attr(`xmlns`,`http://schemas.openxmlformats.org/spreadsheetml/2006/main`).attr(`mc:Ignorable`,`x14ac`).prefix(``).append(this.$numFmts).append(this.$fonts).append(this.$fills).append(this.$borders).append(this.$cellStyleXfs.append(this.$xf)).append(this.$cellXfs).append(this.$cellStyles).append(this.$dxfs).append(this.$tableStyles);var t=e.defaultCellStyle||{};return t.font||={name:`Calibri`,sz:`11`},t.font.name||(t.font.name=`Calibri`),t.font.sz||(t.font.sz=11),t.fill||={patternType:`none`,fgColor:{}},t.border||={},t.numFmt||=0,this.defaultStyle=t,e=JSON.parse(JSON.stringify(t)),e.fill={patternType:`gray125`,fgColor:{}},this.addStyles([t,e]),this},addStyle:function(e){var t=JSON.stringify(e),n=a[t];return n==null?(n=this._addXf(e),a[t]=n):n=a[t],n},addStyles:function(e){var t=this;return e.map(function(e){return t.addStyle(e)})},_duckTypeStyle:function(e){return typeof e==`object`&&(e.patternFill||e.fgColor)?{fill:e}:e.font||e.numFmt||e.border||e.fill?e:this._getStyleCSS(e)},_getStyleCSS:function(e){return e},_addXf:function(e){var t=this._addFont(e.font),n=this._addFill(e.fill),r=this._addBorder(e.border),i=this._addNumFmt(e.numFmt),a=Cf(`xf`).attr(`numFmtId`,i).attr(`fontId`,t).attr(`fillId`,n).attr(`borderId`,r).attr(`xfId`,`0`);return 0/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`),e=Cf(`numFmt`).attr(`numFmtId`,++n).attr(`formatCode`,e),this.$numFmts.append(e),e=this.$numFmts.children().length,this.$numFmts.attr(`count`,e),n)},_addFill:function(e){if(!e)return 0;var t,n=Cf(`patternFill`).attr(`patternType`,e.patternType||`solid`);return e.fgColor&&(t=Cf(`fgColor`),e.fgColor.rgb?(e.fgColor.rgb.length==6&&(e.fgColor.rgb=`FF`+e.fgColor.rgb),t.attr(`rgb`,e.fgColor.rgb),n.append(t)):e.fgColor.theme&&(t.attr(`theme`,e.fgColor.theme),e.fgColor.tint&&t.attr(`tint`,e.fgColor.tint),n.append(t)),e.bgColor||={indexed:`64`}),e.bgColor&&(e=Cf(`bgColor`).attr(e.bgColor),n.append(e)),n=Cf(`fill`).append(n),this.$fills.append(n),n=this.$fills.children().length,this.$fills.attr(`count`,n),n-1},_getSubBorder:function(e,t){var n=Cf(e);return t&&(n.attr(`style`,t.style||`medium`),t.color&&(e=Cf(`color`),t.color.auto?e.attr(`auto`,t.color.auto):t.color.rgb?e.attr(`rgb`,t.color.rgb):(t.color.theme||t.color.tint)&&(e.attr(`theme`,t.color.theme||`1`),e.attr(`tint`,t.color.tint||`0`)),n.append(e))),n},_addBorder:function(e){if(!e)return 0;var t=this,n=Cf(`border`).attr(`diagonalUp`,e.diagonalUp).attr(`diagonalDown`,e.diagonalDown);[`left`,`right`,`top`,`bottom`,`diagonal`].forEach(function(r){n.append(t._getSubBorder(r,e[r]))}),this.$borders.append(n);var r=this.$borders.children().length;return this.$borders.attr(`count`,r),r-1},toXml:function(){return this.$styles.toXml()}}.initialize(e||{})};Iu!==void 0&&(e.parse_xlscfb=Iu),e.parse_zip=Kd,e.read=$d,e.readFile=ef,e.readFileSync=ef,e.write=sf,e.writeFile=lf,e.writeFileSync=lf,e.writeFileAsync=function(e,t,n,r){var i=n||{};return i.type=`file`,i.file=e,cf(i),i.type=`buffer`,r instanceof Function||(r=n),Ae.writeFile(e,sf(t,i),r)},e.utils=Ea,e.writeXLSX=of,e.writeFileXLSX=function(e,t,n){return(n||={}).type=`file`,n.file=t,cf(n),of(e,n)},e.SSF=De,da!==void 0&&(e.stream=da),Me!==void 0&&(e.CFB=Me),l===void 0||((da=o7())||{}).Readable&&Sf(da.Readable)}if(e===void 0?t!==void 0&&t.exports?r(t.exports):typeof define==`function`&&define.amd?define(`xlsx`,function(){return n.version||r(n),n}):r(n):r(e),typeof window<`u`&&!window.XLSX)try{window.XLSX=n}catch{}}))(),1),c7={top:{style:`thin`,color:{rgb:`000000`}},right:{style:`thin`,color:{rgb:`000000`}},bottom:{style:`thin`,color:{rgb:`000000`}},left:{style:`thin`,color:{rgb:`000000`}}},l7={vertical:`center`,wrapText:!0},Qte={font:{bold:!0,sz:16,color:{rgb:`FFFFFF`}},fill:{fgColor:{rgb:`111827`}},alignment:{...l7,horizontal:`center`},border:c7},$te={font:{bold:!0,color:{rgb:`111827`}},fill:{fgColor:{rgb:`F3F4F6`}},alignment:{...l7,horizontal:`center`},border:c7},ene={font:{color:{rgb:`111827`}},fill:{fgColor:{rgb:`FFFFFF`}},alignment:{...l7,horizontal:`left`},border:c7},tne={font:{bold:!0,color:{rgb:`FFFFFF`}},fill:{fgColor:{rgb:`374151`}},alignment:{...l7,horizontal:`center`},border:c7},nne={font:{color:{rgb:`111827`}},fill:{fgColor:{rgb:`FFFFFF`}},alignment:{...l7,horizontal:`left`},border:c7};function u7(e){return e??``}function d7(e){if(e==null)return 0;let t=(e instanceof Date?e.toISOString():String(e)).split(/\r?\n/);return Math.max(...t.map(e=>Array.from(e).reduce((e,t)=>e+(t.charCodeAt(0)>255?2:1),0)),0)}function f7(e,t,n){return Math.min(n,Math.max(t,e))}function rne(e,t){let n=Math.max(t.length,...e.map(e=>e.length));return Array.from({length:n},(n,r)=>{let i=t[r];if(i?.width)return{wch:i.width};let a=e.reduce((e,t)=>Math.max(e,d7(t[r])),d7(i?.title)),o=i?.minWidth??10,s=i?.maxWidth??42;return{wch:f7(Math.ceil(a*1.15)+2,o,s)}})}function ine(e,t,n=20){return f7(n+(e.reduce((e,n,r)=>{let i=Math.max(8,t[r]?.wch||12),a=(n==null?``:String(n)).split(/\r?\n/).reduce((e,t)=>e+Math.max(1,Math.ceil(d7(t)/Math.max(8,i-2))),0);return Math.max(e,a)},1)-1)*16,n,120)}function p7(e,t,n){e.s={...t,alignment:{...t.alignment},border:c7},n&&(e.z=n)}function m7(e){return typeof e==`number`&&Number.isFinite(e)}function ane(e){let{filename:t,sheetName:n,title:r,metadataRows:i=[],summaryRows:a=[],columns:o,rows:s}=e,c=Math.max(1,o.length),l=[],u=-1,d=-1;r&&(u=l.length,l.push([r,...Array.from({length:c-1},()=>``)])),i.forEach(e=>l.push(e.map(u7))),a.forEach(e=>l.push(e.map(u7))),(i.length||a.length)&&l.push(Array.from({length:c},()=>``)),d=l.length,l.push(o.map(e=>e.title)),s.forEach((e,t)=>{l.push(o.map(n=>u7(n.render(e,t))))});let f=s7.utils.aoa_to_sheet(l),p=s7.utils.decode_range(f[`!ref`]||`A1:A1`),m=rne(l,o);f[`!cols`]=m,f[`!rows`]=l.map((e,t)=>t===u?{hpt:34}:t===d?{hpt:28}:e.every(e=>e===``)?{hpt:10}:{hpt:ine(e,m)}),u>=0&&c>1&&(f[`!merges`]=f[`!merges`]||[],f[`!merges`].push({s:{r:u,c:0},e:{r:u,c:c-1}})),f[`!autofilter`]={ref:s7.utils.encode_range({s:{r:d,c:0},e:{r:Math.max(d,l.length-1),c:c-1}})};for(let e=p.s.r;e<=p.e.r;e+=1)for(let t=p.s.c;t<=p.e.c;t+=1){let n=s7.utils.encode_cell({r:e,c:t}),r=f[n]||{t:`s`,v:``};if(f[n]=r,e===u){p7(r,Qte);continue}if(e===d){p7(r,tne);continue}if(e{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(h7),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)(1),[m,h]=(0,S.useState)(10),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(``),[D,O]=(0,S.useState)(``),[k,A]=(0,S.useState)(``),[j,M]=(0,S.useState)(``),[N,P]=(0,S.useState)(``),[F,I]=(0,S.useState)([null,null]),L=(0,S.useMemo)(()=>({page:f,pageSize:m,userName:N||void 0,recordType:v||void 0,creditSubject:b||void 0,mediaType:C||void 0,chargeKind:T||void 0,sourceModule:D||void 0,sourceStepCode:k||void 0,billingScene:j||void 0,startDate:F[0]?.format(`YYYY-MM-DD`),endDate:F[1]?.format(`YYYY-MM-DD`),...hne(g)}),[f,m,N,v,b,C,T,D,k,j,F,g]),R=async()=>{s(!0);try{let e=await S8(L);t(e.items||[]),a(e.total||0),r(e.summary||h7)}catch(e){LG.error(e?.message||`加载积分记录失败`)}finally{s(!1)}};return(0,S.useEffect)(()=>{R()},[L]),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, minmax(0, 1fr))`,gap:16,marginBottom:16},children:[(0,Q.jsx)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(e0,{style:{color:`#10b981`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总充值`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#10b981`},children:[`+`,g7(n.totalRecharge)]})]})]})}),(0,Q.jsx)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J1,{style:{color:`#ef4444`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总消费`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#ef4444`},children:[`-`,g7(n.totalConsume)]})]})]})}),(0,Q.jsx)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(f3,{style:{color:`#3b82f6`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总回退`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#3b82f6`},children:[`+`,g7(n.totalRefund)]})]})]})}),(0,Q.jsx)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(N6,{style:{color:`#6366f1`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`交易 / 生成`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800},children:[g7(n.transactionCount),` / `,g7(n.generationCount)]})]})]})})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, minmax(0, 1fr))`,gap:16,marginBottom:16},children:[(0,Q.jsxs)(PR,{size:`small`,bordered:!1,children:[`图片生成:`,g7(n.imageGenerationCount),` 条 / `,g7(n.imageConsume),` 积分`]}),(0,Q.jsxs)(PR,{size:`small`,bordered:!1,children:[`视频生成:`,g7(n.videoGenerationCount),` 条 / `,g7(n.videoConsume),` 积分`]}),(0,Q.jsxs)(PR,{size:`small`,bordered:!1,children:[`提词消费:`,g7(n.textConsume),` 积分`]}),(0,Q.jsxs)(PR,{size:`small`,bordered:!1,children:[`视频分析:`,g7(n.analysisConsume),` 积分`]})]}),(0,Q.jsxs)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(RC,{value:g,onChange:e=>{p(1),_(e)},style:{width:150},options:sne}),(0,Q.jsx)(RC,{value:v,onChange:e=>{p(1),y(e)},style:{width:130},options:cne}),(0,Q.jsx)(RC,{value:b,onChange:e=>{p(1),x(e)},style:{width:180},options:lne}),(0,Q.jsx)(RC,{value:C,onChange:e=>{p(1),w(e)},style:{width:110},options:une}),(0,Q.jsx)(RC,{value:T,onChange:e=>{p(1),E(e)},style:{width:150},options:dne}),(0,Q.jsx)(RC,{value:D,onChange:e=>{p(1),O(e)},style:{width:150},options:fne}),(0,Q.jsx)(RC,{value:k,onChange:e=>{p(1),A(e)},style:{width:150},options:pne}),(0,Q.jsx)(RC,{value:j,onChange:e=>{p(1),M(e)},style:{width:220},options:mne}),(0,Q.jsx)(hW,{placeholder:`用户名/手机号/邮箱`,value:N,onChange:e=>{p(1),P(e.target.value)},style:{width:180},allowClear:!0}),(0,Q.jsx)(YB.RangePicker,{value:F,onChange:e=>{p(1),I(e?[e[0],e[1]]:[null,null])},placeholder:[`开始日期`,`结束日期`],style:{width:250}})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{onClick:()=>{_(``),y(``),x(``),w(``),E(``),O(``),A(``),M(``),P(``),I([null,null]),p(1)},children:`重置`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:R,children:`刷新`}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(x1,{}),loading:c,onClick:async()=>{l(!0),d(`准备导出...`);try{let e={...L,page:1,pageSize:500},t=await S8(e),n=[...t.items||[]],r=t.summary||h7,i=t.total||0,a=Math.max(1,Math.ceil(i/500));d(`正在获取 ${n.length} / ${i}`);for(let t=2;t<=a;t+=1){let r=await S8({...e,page:t});n.push(...r.items||[]),d(`正在获取 ${Math.min(n.length,i)} / ${i}`)}ane({filename:`积分流水_${(0,YE.default)().format(`YYYYMMDD_HHmmss`)}.xlsx`,sheetName:`积分流水`,title:`积分流水汇总`,metadataRows:[[`筛选时间`,`${F[0]?.format(`YYYY-MM-DD`)||`不限`} 至 ${F[1]?.format(`YYYY-MM-DD`)||`不限`}`],[`导出时间`,(0,YE.default)().format(`YYYY-MM-DD HH:mm:ss`)],[`导出条数`,i]],summaryRows:[[`总充值`,r.totalRecharge],[`总消费`,r.totalConsume],[`总回退`,r.totalRefund],[`交易笔数`,r.transactionCount],[`生成条数`,r.generationCount],[`生成尝试次数`,r.generationAttemptCount],[`图片生成条数`,r.imageGenerationCount],[`视频生成条数`,r.videoGenerationCount],[`图片消费积分`,r.imageConsume],[`视频消费积分`,r.videoConsume],[`提词消费积分`,r.textConsume],[`视频分析积分`,r.analysisConsume],[`总 Token`,r.totalTokens],[`输入 Token`,r.inputTokens],[`输出 Token`,r.outputTokens]],columns:[{title:`时间`,maxWidth:22,render:e=>Z5(e.createdAt||``)},{title:`用户`,minWidth:12,maxWidth:20,render:e=>e.username||`-`},{title:`手机号`,minWidth:13,maxWidth:18,render:e=>e.phone||`-`},{title:`用户类型`,maxWidth:16,render:e=>e.userTypeLabel||`-`},{title:`前台归类`,maxWidth:18,render:e=>e.frontendUserKindLabel||`-`},{title:`流水类型`,maxWidth:14,align:`center`,render:e=>e.recordTypeLabel||e.type||`-`},{title:`积分类型`,maxWidth:20,render:e=>e.creditSubjectLabel||`-`},{title:`扣费子类`,maxWidth:22,render:e=>e.chargeKindLabel||`-`},{title:`模块`,maxWidth:20,render:e=>e.sourceModuleLabel||`-`},{title:`模块步骤`,maxWidth:22,render:e=>e.sourceStepCodeLabel||`-`},{title:`计费场景`,maxWidth:32,render:e=>e.billingSceneLabel||`-`},{title:`媒体类型`,maxWidth:12,align:`center`,render:e=>e.mediaTypeLabel||`-`},{title:`变动积分`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0.00`,render:e=>e.amount},{title:`变动后余额`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0.00`,render:e=>e.balanceAfter},{title:`实际 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.totalTokens||0},{title:`输入 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.inputTokens||0},{title:`输出 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.outputTokens||0},{title:`执行类型`,maxWidth:18,render:e=>_7(e.engineType)},{title:`执行配置`,maxWidth:28,render:e=>e.engineName||`-`},{title:`供应商`,maxWidth:18,render:e=>e.engineProvider||`-`},{title:`模型版本`,maxWidth:26,render:e=>e.engineModelName||`-`},{title:`关联状态`,maxWidth:14,align:`center`,render:e=>e.ownerDeleted?`关联已删除`:`正常`},{title:`说明`,minWidth:18,maxWidth:42,render:e=>e.description||``},{title:`业务归属类型`,maxWidth:18,render:e=>e.ownerType||``},{title:`业务归属ID`,maxWidth:28,render:e=>e.ownerId||``},{title:`BizKey`,maxWidth:36,render:e=>e.bizKey||``}],rows:n}),LG.success(`Excel 已导出`)}catch(e){LG.error(e?.message||`导出失败`)}finally{l(!1),d(``)}},children:`下载 Excel`})]})]}),u&&(0,Q.jsx)(`div`,{style:{marginBottom:12,color:`#6366f1`},children:u}),(0,Q.jsx)(bQ,{columns:[{title:`用户`,dataIndex:`username`,width:130,fixed:`left`,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:e||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:t.phone||`-`})]})},{title:`用户类型`,dataIndex:`userTypeLabel`,width:120,render:(e,t)=>(0,Q.jsx)(NQ,{color:t.userType===`admin`?`orange`:`blue`,children:t.userTypeLabel||`-`})},{title:`流水类型`,dataIndex:`recordType`,width:100,render:(e,t)=>{let n=one[e]||{text:t.recordTypeLabel||e||`-`,color:`default`,icon:null};return(0,Q.jsx)(NQ,{color:n.color,icon:n.icon,children:n.text})}},{title:`积分类型`,dataIndex:`creditSubjectLabel`,width:150,render:e=>(0,Q.jsx)(NQ,{children:e||`-`})},{title:`模块`,dataIndex:`sourceModuleLabel`,width:130,render:e=>e||`-`},{title:`步骤/场景`,key:`scene`,width:210,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{children:t.billingSceneLabel||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:t.sourceStepCodeLabel||`-`})]})},{title:`媒体`,dataIndex:`mediaTypeLabel`,width:80,render:e=>e?(0,Q.jsx)(NQ,{color:`purple`,children:e}):`-`},{title:`变动积分`,dataIndex:`amount`,width:120,sorter:(e,t)=>e.amount-t.amount,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:e>0?`#10b981`:`#ef4444`},children:[e>0?`+`:``,g7(e)]})},{title:`余额`,dataIndex:`balanceAfter`,width:110,render:e=>g7(e)},{title:`Token`,key:`tokens`,width:140,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`b`,{children:g7(t.totalTokens)}),(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[`入 `,g7(t.inputTokens),` / 出 `,g7(t.outputTokens)]})]})},{title:`执行配置`,key:`engine`,width:230,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(NQ,{color:t.engineType===`model`?`geekblue`:t.engineType===`image`?`purple`:t.engineType===`video`?`cyan`:`default`,children:_7(t.engineType)}),(0,Q.jsx)(`div`,{children:t.engineName||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[t.engineProvider,t.engineModelName].filter(Boolean).join(` / `)||`-`})]})},{title:`关联状态`,dataIndex:`ownerDeleted`,width:100,render:e=>(0,Q.jsx)(NQ,{color:e?`red`:`green`,children:e?`已删除`:`正常`})},{title:`说明`,dataIndex:`description`,width:240,ellipsis:!0},{title:`时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})}],dataSource:e,rowKey:`id`,loading:o,pagination:{current:f,pageSize:m,total:i,onChange:(e,t)=>{p(e),h(t)},showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`},scroll:{x:1900}})]})]})},_ne=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(180),[u]=X.useForm(),d=async()=>{try{let e=await F8(),t={};e.forEach(e=>{t[e.key]=e.value}),u.setFieldsValue({wechat_appid:t.payment_wechat_appid||``,wechat_mch_id:t.payment_wechat_mch_id||``,wechat_private_key:t.payment_wechat_private_key||``,wechat_cert_serial_no:t.payment_wechat_cert_serial_no||``,wechat_api_v3_key:t.payment_wechat_api_v3_key||``,wechat_notify_url:t.payment_wechat_notify_url||``,wechat_public_key:t.payment_wechat_public_key||``,wechat_public_key_id:t.payment_wechat_public_key_id||``,alipay_app_id:t.payment_alipay_app_id||``,alipay_private_key:t.payment_alipay_private_key||``,alipay_public_key:t.payment_alipay_public_key||``,alipay_notify_url:t.payment_alipay_notify_url||``,alipay_gateway:t.payment_alipay_gateway||``,order_timeout:t.payment_order_timeout||`180`}),r(t.payment_wechat_enabled===`true`),a(t.payment_alipay_enabled===`true`),s(t.payment_mock===`true`),l(parseInt(t.payment_order_timeout||`180`,10))}catch{LG.error(`加载支付配置失败`)}};return(0,S.useEffect)(()=>{d()},[]),(0,Q.jsxs)(`div`,{style:{maxWidth:`100%`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,marginBottom:24},children:[(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsx)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:40,height:40,borderRadius:10,background:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:`#6366f1`},children:(0,Q.jsx)(HB,{})}),(0,Q.jsx)(`div`,{children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`订单超时时间`})})]}),(0,Q.jsx)(X,{form:u,layout:`inline`,children:(0,Q.jsx)(X.Item,{name:`order_timeout`,style:{margin:0},children:(0,Q.jsxs)(VV.Compact,{style:{width:140},children:[(0,Q.jsx)(oB,{min:30,max:86400,placeholder:`180`,style:{width:`100%`},size:`middle`}),(0,Q.jsx)(Z.Text,{children:`秒`})]})})})]})})}),(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsx)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,background:o?`#fff7e6`:`#fafbff`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:40,height:40,borderRadius:10,background:o?`rgba(245,158,11,0.15)`:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:o?`#f59e0b`:`#6366f1`},children:(0,Q.jsx)(l2,{})}),(0,Q.jsx)(`div`,{children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`模拟支付模式`})})]}),(0,Q.jsx)(Mq,{checked:o,onChange:s,checkedChildren:`已开启`,unCheckedChildren:`已关闭`})]})})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(7,193,96,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:22,color:`#07c160`},children:(0,Q.jsx)(I6,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:5,style:{margin:0},children:`微信支付`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:`微信商户号支付配置`})]})]}),(0,Q.jsx)(Mq,{checked:n,onChange:r,checkedChildren:`已启用`,unCheckedChildren:`未启用`})]}),(0,Q.jsxs)(X,{form:u,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`wechat_appid`,label:`AppID`,children:(0,Q.jsx)(hW,{placeholder:`微信支付 AppID`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_mch_id`,label:`商户号 (MchID)`,children:(0,Q.jsx)(hW,{placeholder:`微信支付商户号`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_private_key`,label:`商户私钥`,extra:` ⚠️ 重要:请填写 apiclient_key.pem 的内容,不是 apiclient_cert.pem! 内容应该以 -----BEGIN PRIVATE KEY----- 或 -----BEGIN RSA PRIVATE KEY----- 开头 - `,children:(0,Q.jsx)(vW.TextArea,{rows:4,placeholder:`\r + `,children:(0,Q.jsx)(hW.TextArea,{rows:4,placeholder:`\r -----BEGIN PRIVATE KEY-----\r ...这里是私钥内容...\r -----END PRIVATE KEY-----\r - `,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_cert_serial_no`,label:`商户证书序列号`,extra:`从 apiclient_cert.pem 中提取的证书序列号`,children:(0,Q.jsx)(vW,{placeholder:`商户证书序列号`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_api_v3_key`,label:`API v3 密钥`,children:(0,Q.jsx)(vW.Password,{placeholder:`API v3 密钥`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_notify_url`,label:`回调地址`,children:(0,Q.jsx)(vW,{placeholder:`https://yourdomain.com/api/payments/wechat/callback`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_public_key`,label:`微信平台公钥(可选)`,children:(0,Q.jsx)(vW.TextArea,{rows:3,placeholder:`微信支付平台公钥内容`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_public_key_id`,label:`微信平台公钥ID(可选)`,children:(0,Q.jsx)(vW,{placeholder:`平台公钥ID`,size:`large`,disabled:!n})})]})]})}),(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(0,122,255,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:22,color:`#007aff`},children:(0,Q.jsx)(H1,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:5,style:{margin:0},children:`支付宝`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:`支付宝应用支付配置`})]})]}),(0,Q.jsx)(Fq,{checked:i,onChange:a,checkedChildren:`已启用`,unCheckedChildren:`未启用`})]}),(0,Q.jsxs)(X,{form:u,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`alipay_app_id`,label:`AppID`,children:(0,Q.jsx)(vW,{placeholder:`支付宝应用AppID`,size:`large`,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_private_key`,label:`应用私钥`,extra:`支付宝应用私钥(PKCS8格式),不需要添加头部和尾部标记`,children:(0,Q.jsx)(vW.TextArea,{rows:4,placeholder:`\r + `,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_cert_serial_no`,label:`商户证书序列号`,extra:`从 apiclient_cert.pem 中提取的证书序列号`,children:(0,Q.jsx)(hW,{placeholder:`商户证书序列号`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_api_v3_key`,label:`API v3 密钥`,children:(0,Q.jsx)(hW.Password,{placeholder:`API v3 密钥`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_notify_url`,label:`回调地址`,children:(0,Q.jsx)(hW,{placeholder:`https://yourdomain.com/api/payments/wechat/callback`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_public_key`,label:`微信平台公钥(可选)`,children:(0,Q.jsx)(hW.TextArea,{rows:3,placeholder:`微信支付平台公钥内容`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_public_key_id`,label:`微信平台公钥ID(可选)`,children:(0,Q.jsx)(hW,{placeholder:`平台公钥ID`,size:`large`,disabled:!n})})]})]})}),(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(0,122,255,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:22,color:`#007aff`},children:(0,Q.jsx)(z1,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:5,style:{margin:0},children:`支付宝`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:`支付宝应用支付配置`})]})]}),(0,Q.jsx)(Mq,{checked:i,onChange:a,checkedChildren:`已启用`,unCheckedChildren:`未启用`})]}),(0,Q.jsxs)(X,{form:u,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`alipay_app_id`,label:`AppID`,children:(0,Q.jsx)(hW,{placeholder:`支付宝应用AppID`,size:`large`,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_private_key`,label:`应用私钥`,extra:`支付宝应用私钥(PKCS8格式),不需要添加头部和尾部标记`,children:(0,Q.jsx)(hW.TextArea,{rows:4,placeholder:`\r MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC...\r - `,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_public_key`,label:`支付宝公钥`,extra:`从支付宝开放平台获取的支付宝公钥`,children:(0,Q.jsx)(vW.TextArea,{rows:4,placeholder:`\r + `,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_public_key`,label:`支付宝公钥`,extra:`从支付宝开放平台获取的支付宝公钥`,children:(0,Q.jsx)(hW.TextArea,{rows:4,placeholder:`\r MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...\r - `,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_gateway`,label:`网关地址`,children:(0,Q.jsx)(vW,{placeholder:`https://openapi.alipay.com/gateway.do`,size:`large`,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_notify_url`,label:`回调地址`,children:(0,Q.jsx)(vW,{placeholder:`https://yourdomain.com/api/payments/alipay/callback`,size:`large`,disabled:!i})})]})]})})]}),(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,marginTop:24},children:(0,Q.jsx)(YE,{type:`primary`,icon:(0,Q.jsx)(v3,{}),onClick:async()=>{try{let e=await u.validateFields();t(!0),await I8({payment_mock:String(o),payment_wechat_enabled:String(n),payment_wechat_appid:e.wechat_appid||``,payment_wechat_mch_id:e.wechat_mch_id||``,payment_wechat_private_key:e.wechat_private_key||``,payment_wechat_cert_serial_no:e.wechat_cert_serial_no||``,payment_wechat_api_v3_key:e.wechat_api_v3_key||``,payment_wechat_notify_url:e.wechat_notify_url||``,payment_wechat_public_key:e.wechat_public_key||``,payment_wechat_public_key_id:e.wechat_public_key_id||``,payment_alipay_enabled:String(i),payment_alipay_app_id:e.alipay_app_id||``,payment_alipay_private_key:e.alipay_private_key||``,payment_alipay_public_key:e.alipay_public_key||``,payment_alipay_notify_url:e.alipay_notify_url||``,payment_alipay_gateway:e.alipay_gateway||``,payment_order_timeout:String(e.order_timeout||180)}),BG.success(`支付配置已保存`),d()}catch{BG.error(`保存失败`)}finally{t(!1)}},loading:e,size:`large`,style:{borderRadius:8,minWidth:160,height:44,fontSize:15},children:`保存配置`})})]})},{Option:v7}=BC,{RangePicker:hne}=QB,gne=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)(1),[o,s]=(0,S.useState)(10),[c,l]=(0,S.useState)(0),[u,d]=(0,S.useState)({startDate:(0,ZE.default)().format(`YYYY-MM-DD`),endDate:(0,ZE.default)().format(`YYYY-MM-DD`)}),f=async()=>{try{t(!0);let[e,n]=await Promise.all([L8(u),R8({...u,page:i,pageSize:o})]);r({...e,recent:n.items||[]}),l(n.total)}catch{BG.error(`加载支付统计失败`)}finally{t(!1)}};(0,S.useEffect)(()=>{f()},[u,i,o]);let p=(e,t)=>{a(e),s(t)},m=()=>{d({startDate:(0,ZE.default)().format(`YYYY-MM-DD`),endDate:(0,ZE.default)().format(`YYYY-MM-DD`)})},h=async e=>{try{t(!0),await z8(e),BG.success(`退款成功`),await f()}catch(e){BG.error(e?.response?.data?.detail||`退款失败`)}finally{t(!1)}},g=e=>{e&&e.length===2&&d(t=>({...t,startDate:e[0].format(`YYYY-MM-DD`),endDate:e[1].format(`YYYY-MM-DD`)}))},_={paid:{color:`green`,label:`已支付`,icon:(0,Q.jsx)(I0,{})},pending:{color:`gold`,label:`待支付`,icon:(0,Q.jsx)(GB,{})},cancelled:{color:`default`,label:`已取消`,icon:(0,Q.jsx)(z0,{})},refunded:{color:`red`,label:`已退款`,icon:(0,Q.jsx)(x6,{})}},v={alipay:{color:`blue`,label:`支付宝`},wechat:{color:`green`,label:`微信`}},y=[{title:`订单号`,dataIndex:`orderNo`,key:`orderNo`,width:200},{title:`用户`,dataIndex:`username`,key:`username`,width:120},{title:`支付方式`,dataIndex:`paymentMethod`,key:`paymentMethod`,width:100,render:e=>{let t=v[e]||{color:`default`,label:e};return(0,Q.jsx)(IQ,{color:t.color,children:t.label})}},{title:`金额`,dataIndex:`amount`,key:`amount`,width:100,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:`#10b981`},children:[`¥`,e.toFixed(2)]})},{title:`积分`,dataIndex:`credits`,key:`credits`,width:80},{title:`状态`,dataIndex:`status`,key:`status`,width:100,render:e=>{let t=_[e]||{color:`default`,label:e,icon:null};return(0,Q.jsx)(IQ,{color:t.color,icon:t.icon,children:t.label})}},{title:`支付宝交易号`,dataIndex:`tradeNo`,key:`tradeNo`,width:200,render:e=>e||`-`},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,Q.jsx)(`span`,{className:`date-display`,style:{color:`#94a3b8`},children:e?Z5(e):`-`})},{title:`支付时间`,dataIndex:`paidAt`,key:`paidAt`,width:160,render:e=>(0,Q.jsx)(`span`,{className:`date-display`,style:{color:`#94a3b8`},children:e?Z5(e):`-`})},{title:`操作`,key:`action`,width:120,render:(e,t)=>t.status===`paid`?(0,Q.jsx)(qG,{title:`确认要退款该订单吗?`,description:`退款后积分会扣除,金额会原路返回`,onConfirm:()=>h(t.orderNo),okText:`确认`,cancelText:`取消`,children:(0,Q.jsx)(YE,{type:`link`,danger:!0,size:`small`,icon:(0,Q.jsx)(x6,{}),children:`退款`})}):null}];if(!n)return(0,Q.jsx)(`div`,{style:{padding:24,color:`#94a3b8`},children:`加载中…`});let b=n.byStatus?.paid||{count:0,amount:0},x=n.byStatus?.pending||{count:0,amount:0},C=n.byStatus?.cancelled||{count:0,amount:0},w=n.byStatus?.refunded||{count:0,amount:0},T=b.count+x.count+C.count+w.count,E=n.month||{count:0,amount:0};return(0,Q.jsx)(am,{locale:U6.default,children:(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(AK,{gutter:[16,16],style:{marginBottom:24},children:[(0,Q.jsx)(gz,{xs:24,sm:12,lg:12,children:(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsx)(HK,{title:`今日收入`,value:n.today.paidAmount,precision:2,prefix:(0,Q.jsx)(f2,{style:{color:`#10b981`}}),suffix:`元`,valueStyle:{color:`#10b981`,fontWeight:700}}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[n.today.paidCount,` 笔订单`]})]})}),(0,Q.jsx)(gz,{xs:24,sm:12,lg:12,children:(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsx)(HK,{title:`本月累计`,value:E.paidAmount,precision:2,prefix:(0,Q.jsx)(f2,{style:{color:`#6366f1`}}),suffix:`元`,valueStyle:{color:`#6366f1`,fontWeight:700}}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[E.paidCount,` 笔订单`]})]})})]}),(0,Q.jsx)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,marginBottom:16},title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(f2,{}),`订单状态分布`]}),children:(0,Q.jsx)(AK,{gutter:16,children:[`paid`,`pending`,`cancelled`,`refunded`].map(e=>{let t=n.byStatus?.[e]||{count:0,amount:0},r=_[e],i=T>0?(t.count/T*100).toFixed(1):`0.0`;return(0,Q.jsx)(gz,{span:6,children:(0,Q.jsxs)(`div`,{style:{padding:16,borderRadius:10,background:`#fafbff`,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(IQ,{color:r.color,icon:r.icon,children:r.label}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[i,`%`]})]}),(0,Q.jsxs)(`div`,{style:{marginTop:8,fontSize:20,fontWeight:700},children:[t.count,` `,(0,Q.jsx)(`span`,{style:{fontSize:13,color:`#94a3b8`,fontWeight:400},children:`笔`})]}),(0,Q.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`,marginTop:4},children:[`¥`,t.amount.toFixed(2)]})]})},e)})})}),(0,Q.jsxs)(LR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(f2,{}),`订单列表`]}),children:[(0,Q.jsxs)(AK,{gutter:[16,16],align:`middle`,style:{marginBottom:24},children:[(0,Q.jsxs)(gz,{xs:24,sm:12,md:6,children:[(0,Q.jsx)(`span`,{style:{marginRight:8},children:`支付方式:`}),(0,Q.jsxs)(BC,{placeholder:`全部`,allowClear:!0,style:{width:150},value:u.paymentMethod,onChange:e=>d(t=>({...t,paymentMethod:e})),children:[(0,Q.jsx)(v7,{value:`alipay`,children:`支付宝`}),(0,Q.jsx)(v7,{value:`wechat`,children:`微信`})]})]}),(0,Q.jsxs)(gz,{xs:24,sm:12,md:6,children:[(0,Q.jsx)(`span`,{style:{marginRight:8},children:`状态:`}),(0,Q.jsxs)(BC,{placeholder:`全部`,allowClear:!0,style:{width:150},value:u.status,onChange:e=>d(t=>({...t,status:e})),children:[(0,Q.jsx)(v7,{value:`paid`,children:`已支付`}),(0,Q.jsx)(v7,{value:`pending`,children:`待支付`}),(0,Q.jsx)(v7,{value:`cancelled`,children:`已取消`}),(0,Q.jsx)(v7,{value:`refunded`,children:`已退款`})]})]}),(0,Q.jsxs)(gz,{xs:24,sm:12,md:8,children:[(0,Q.jsx)(`span`,{style:{marginRight:8},children:`日期范围:`}),(0,Q.jsx)(hne,{value:[(0,ZE.default)(u.startDate),(0,ZE.default)(u.endDate)],onChange:g})]}),(0,Q.jsx)(gz,{xs:24,sm:12,md:4,children:(0,Q.jsx)(YE,{icon:(0,Q.jsx)(kK,{}),onClick:m,children:`重置`})})]}),(0,Q.jsx)(CQ,{columns:y,dataSource:n.recent||[],rowKey:`id`,loading:e,pagination:{current:i,pageSize:o,total:c,onChange:p,showSizeChanger:!0,showTotal:e=>`共 ${e} 条`},scroll:{x:1e3},size:`middle`})]})]})})},y7=[{name:`ShoppingCartOutlined`,label:`购物`,component:(0,Q.jsx)(A3,{})},{name:`BookOutlined`,label:`书籍`,component:(0,Q.jsx)(v0,{})},{name:`HomeOutlined`,label:`房产`,component:(0,Q.jsx)(Z2,{})},{name:`FireOutlined`,label:`火`,component:(0,Q.jsx)(D2,{})},{name:`RocketOutlined`,label:`科技`,component:(0,Q.jsx)(l3,{})},{name:`SkinOutlined`,label:`时尚`,component:(0,Q.jsx)(z3,{})},{name:`CompassOutlined`,label:`指南`,component:(0,Q.jsx)(e2,{})},{name:`HeartOutlined`,label:`健康`,component:(0,Q.jsx)(H2,{})},{name:`CarOutlined`,label:`汽车`,component:(0,Q.jsx)(N0,{})},{name:`CameraOutlined`,label:`相机`,component:(0,Q.jsx)(A0,{})},{name:`CloudOutlined`,label:`云`,component:(0,Q.jsx)(H0,{})},{name:`StarOutlined`,label:`星`,component:(0,Q.jsx)(Z3,{})},{name:`TrophyOutlined`,label:`奖杯`,component:(0,Q.jsx)(h6,{})},{name:`ThunderboltOutlined`,label:`闪电`,component:(0,Q.jsx)(l6,{})},{name:`BulbOutlined`,label:`灯泡`,component:(0,Q.jsx)(w0,{})},{name:`CoffeeOutlined`,label:`咖啡`,component:(0,Q.jsx)(Z0,{})},{name:`CrownOutlined`,label:`皇冠`,component:(0,Q.jsx)(r2,{})},{name:`DashboardOutlined`,label:`仪表`,component:(0,Q.jsx)(o2,{})},{name:`FlagOutlined`,label:`旗帜`,component:(0,Q.jsx)(A2,{})},{name:`GlobalOutlined`,label:`全球`,component:(0,Q.jsx)(z2,{})},{name:`GiftOutlined`,label:`礼物`,component:(0,Q.jsx)(I2,{})},{name:`LaptopOutlined`,label:`笔记本`,component:(0,Q.jsx)(r4,{})},{name:`MobileOutlined`,label:`手机`,component:(0,Q.jsx)(A4,{})},{name:`MonitorOutlined`,label:`显示器`,component:(0,Q.jsx)(N4,{})},{name:`PayCircleOutlined`,label:`支付`,component:(0,Q.jsx)(I4,{})},{name:`PictureOutlined`,label:`图片`,component:(0,Q.jsx)(H4,{})},{name:`PlayCircleOutlined`,label:`播放`,component:(0,Q.jsx)(J4,{})},{name:`SafetyOutlined`,label:`安全`,component:(0,Q.jsx)(h3,{})},{name:`ShoppingOutlined`,label:`商店`,component:(0,Q.jsx)(N3,{})},{name:`SmileOutlined`,label:`笑脸`,component:(0,Q.jsx)(H3,{})},{name:`SoundOutlined`,label:`声音`,component:(0,Q.jsx)(J3,{})},{name:`TagOutlined`,label:`标签`,component:(0,Q.jsx)(r6,{})},{name:`TeamOutlined`,label:`团队`,component:(0,Q.jsx)(o6,{})},{name:`ToolOutlined`,label:`工具`,component:(0,Q.jsx)(f6,{})},{name:`TruckOutlined`,label:`物流`,component:(0,Q.jsx)(v6,{})},{name:`VideoCameraOutlined`,label:`视频`,component:(0,Q.jsx)(A6,{})},{name:`WalletOutlined`,label:`钱包`,component:(0,Q.jsx)(N6,{})},{name:`BankOutlined`,label:`银行`,component:(0,Q.jsx)(l0,{})},{name:`BuildOutlined`,label:`建筑`,component:(0,Q.jsx)(x0,{})},{name:`ExperimentOutlined`,label:`实验`,component:(0,Q.jsx)(v2,{})},{name:`HighlightOutlined`,label:`高亮`,component:(0,Q.jsx)(G2,{})},{name:`IdcardOutlined`,label:`名片`,component:(0,Q.jsx)(e4,{})},{name:`MedicineBoxOutlined`,label:`医药`,component:(0,Q.jsx)(x4,{})},{name:`ReadOutlined`,label:`阅读`,component:(0,Q.jsx)(e3,{})},{name:`RestOutlined`,label:`休息`,component:(0,Q.jsx)(r3,{})},{name:`SketchOutlined`,label:`钻石`,component:(0,Q.jsx)(I3,{})},{name:`SolutionOutlined`,label:`方案`,component:(0,Q.jsx)(G3,{})}],_ne=Object.fromEntries(y7.map(e=>[e.name,e.component]));function b7(e){return _ne[e]||(0,Q.jsx)(J1,{})}function vne(e){try{let t=typeof e==`string`?JSON.parse(e):e;if(!Array.isArray(t))return{skillItems:[],optionGroups:[]};let n=[],r=[];for(let e of t)e&&e.type===`option_group`&&e.name&&Array.isArray(e.options)?r.push({name:e.name,options:e.options}):e&&e.key&&e.label&&n.push({key:e.key,label:e.label});return{skillItems:n,optionGroups:r}}catch{return{skillItems:[],optionGroups:[]}}}var yne=({value:e,onChange:t})=>{let n=y7.find(t=>t.name===e);return(0,Q.jsx)(KV,{trigger:[`click`],dropdownRender:()=>(0,Q.jsx)(`div`,{style:{background:`#fff`,borderRadius:12,padding:12,width:360,boxShadow:`0 12px 40px rgba(0,0,0,0.15)`,border:`1px solid #f0f0f5`},children:(0,Q.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(8, 1fr)`,gap:4},children:y7.map(n=>(0,Q.jsx)(`div`,{onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),t?.(n.name)},title:n.label,style:{width:40,height:40,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,fontSize:18,transition:`all 0.15s`,background:e===n.name?`#6366f1`:`transparent`,color:e===n.name?`#fff`:`#64748b`,border:e===n.name?`none`:`1px solid transparent`},onMouseEnter:t=>{e!==n.name&&(t.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:t=>{e!==n.name&&(t.currentTarget.style.background=`transparent`)},children:n.component},n.name))})}),children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`8px 12px`,borderRadius:8,border:`1px solid #d9d9d9`,cursor:`pointer`,height:40},children:[e?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{style:{fontSize:18,color:`#6366f1`},children:b7(e)}),(0,Q.jsx)(`span`,{style:{color:`#64748b`,fontSize:13},children:n?.label||e})]}):(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`,fontSize:13},children:`选择图标`}),(0,Q.jsx)(MC,{style:{fontSize:10,color:`#bfbfbf`,marginLeft:`auto`}})]})})},bne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)({open:!1,item:null}),[c]=X.useForm(),l=async()=>{r(!0);try{t((await C8()).map(e=>{let{skillItems:t,optionGroups:n}=vne(e.skills);return{id:e.id,key:e.key,label:e.label,icon:e.icon||``,description:e.description||``,skills:JSON.stringify(t),optionGroups:n,isActive:e.is_active??e.isActive??!0,sortOrder:e.sort_order??e.sortOrder??0}}))}catch{BG.error(`加载行业配置失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{l()},[]);let u=async()=>{try{let e=await c.validateFields();a(!0);let t=[];e.skills_wentutujie?.trim()&&t.push({type:`skill`,key:`文图理解生成视频提示词`,label:e.skills_wentutujie.trim()}),e.skills_wentutujie_image?.trim()&&t.push({type:`skill`,key:`文图理解生成图片提示词`,label:e.skills_wentutujie_image.trim()});let n=(e.optionGroups||[]).filter(e=>e?.name?.trim()).map(e=>({name:e.name.trim(),options:(e.options||[]).filter(e=>e?.trim())})).filter(e=>e.options.length>0);for(let e of n)t.push({type:`option_group`,name:e.name,options:e.options});let r={key:e.key,label:e.label,icon:e.icon||``,description:e.description||``,skills:t,is_active:e.is_active??!0,sort_order:e.sort_order??0};o.item?.id?(await w8({id:o.item.id,...r}),BG.success(`已更新`)):(await w8(r),BG.success(`已添加`)),s({open:!1,item:null}),c.resetFields(),l()}catch(e){if(e?.errorFields)return;BG.error(e?.message||`保存失败`)}finally{a(!1)}},d=async e=>{try{await T8(e),BG.success(`已删除`),l()}catch(e){BG.error(e?.message||`删除失败`)}},f=e=>{s({open:!0,item:e||null});let t=``,n=``,r=[];if(e){try{let r=JSON.parse(e.skills);if(Array.isArray(r))for(let e of r)(e.key===`文图理解生成视频提示词`||e.key===`文图理解`)&&(t=e.label||``),e.key===`文图理解生成图片提示词`&&(n=e.label||``)}catch{}r=e.optionGroups.length>0?e.optionGroups:[{name:``,options:[]}]}e?c.setFieldsValue({key:e.key,label:e.label,icon:e.icon||``,description:e.description,skills_wentutujie:t,skills_wentutujie_image:n,optionGroups:r,is_active:e.isActive,sort_order:e.sortOrder}):(c.resetFields(),c.setFieldsValue({is_active:!0,sort_order:0,optionGroups:[{name:``,options:[]}]}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(LR,{style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(J1,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`行业与技能配置`}),(0,Q.jsxs)(IQ,{color:`purple`,children:[e.length,` 个行业`]})]}),(0,Q.jsx)(YE,{type:`primary`,icon:(0,Q.jsx)(DL,{}),onClick:()=>f(),style:{borderRadius:8},children:`添加行业`})]}),(0,Q.jsx)(CQ,{columns:[{title:`行业`,key:`industry`,width:180,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsx)(`div`,{style:{width:36,height:36,borderRadius:10,background:`#f1f5f9`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:18,color:`#6366f1`,flexShrink:0},children:b7(t.icon)}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.label}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.key})]})]})},{title:`描述`,dataIndex:`description`,ellipsis:!0},{title:`选项配置`,key:`optionGroups`,width:260,render:(e,t)=>!t.optionGroups||t.optionGroups.length===0?(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#cbd5e1`},children:`未配置`}):(0,Q.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:t.optionGroups.map((e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,Q.jsx)(IQ,{color:`blue`,style:{margin:0,fontSize:11},children:e.name}),(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#64748b`},children:[e.options.slice(0,3).join(`、`),e.options.length>3?`...${e.options.length}项`:``]})]},t))})},{title:`文图理解生成视频提示词`,dataIndex:`skills`,ellipsis:!0,render:e=>{try{let t=JSON.parse(e);if(Array.isArray(t)){let e=t.find(e=>e.key===`文图理解生成视频提示词`||e.key===`文图理解`);if(e)return(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{fontSize:12},children:e.label})}}catch{}return(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`})}},{title:`文图理解生成图片提示词`,dataIndex:`skills`,ellipsis:!0,render:e=>{try{let t=JSON.parse(e);if(Array.isArray(t)){let e=t.find(e=>e.key===`文图理解生成图片提示词`);if(e)return(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{fontSize:12},children:e.label})}}catch{}return(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`})}},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(IQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(WV,{size:4,children:[(0,Q.jsx)(YE,{type:`link`,size:`small`,icon:(0,Q.jsx)(HQ,{}),onClick:()=>f(t),children:`编辑`}),(0,Q.jsx)(qG,{title:`确定删除该行业?`,onConfirm:()=>d(t.id),children:(0,Q.jsx)(YE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(zQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(UG,{title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(J1,{}),o.item?`编辑行业`:`添加行业`]}),open:o.open,onOk:u,onCancel:()=>{s({open:!1,item:null}),c.resetFields()},okText:`保存`,cancelText:`取消`,width:640,confirmLoading:i,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`key`,label:`行业标识`,style:{flex:1},rules:[{required:!0,message:`请输入标识`}],children:(0,Q.jsx)(vW,{placeholder:`例如:ecommerce`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`label`,label:`行业名称`,style:{flex:1},rules:[{required:!0,message:`请输入名称`}],children:(0,Q.jsx)(vW,{placeholder:`例如:电商`,size:`large`})})]}),(0,Q.jsx)(X.Item,{name:`icon`,label:`行业图标`,children:(0,Q.jsx)(yne,{})}),(0,Q.jsx)(X.Item,{name:`description`,label:`行业描述`,children:(0,Q.jsx)(vW.TextArea,{rows:2,placeholder:`行业描述`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`skills_wentutujie`,label:`文图理解生成视频提示词`,extra:`用于LLM优化视频提示词的系统指令,根据行业特点引导AI理解文案与画面的关系`,children:(0,Q.jsx)(vW.TextArea,{rows:3,placeholder:`请输入文图理解生成视频提示词,例如: -你是一位专业的电商视频文案专家,擅长将产品卖点转化为视觉语言`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`skills_wentutujie_image`,label:`文图理解生成图片提示词`,extra:`用于LLM优化图片提示词的系统指令,根据行业特点引导AI理解文案与画面的关系`,children:(0,Q.jsx)(vW.TextArea,{rows:3,placeholder:`请输入文图理解生成图片提示词,例如: -你是一位专业的电商图片文案专家,擅长将产品卖点转化为图片生成提示词`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{marginBottom:8},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:`行业选项配置`}),(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`添加选项组,每组包含名称和多个选项,前台将显示为下拉选择`})]}),(0,Q.jsx)(X.List,{name:`optionGroups`,children:(e,{add:t,remove:n})=>(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8,marginBottom:16},children:[e.map(({key:e,name:t,...r})=>(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`flex-start`,padding:`10px 12px`,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,gap:8},children:[(0,Q.jsx)(X.Item,{...r,name:[t,`name`],label:`选项名称`,style:{marginBottom:0},rules:[{required:!0,message:`请输入选项名称`}],children:(0,Q.jsx)(vW,{placeholder:`例如:视频风格`,size:`middle`,style:{borderRadius:8}})}),(0,Q.jsx)(X.Item,{...r,name:[t,`options`],label:`选项内容`,style:{marginBottom:0},children:(0,Q.jsx)(BC,{mode:`tags`,size:`middle`,placeholder:`输入选项后回车添加`,style:{borderRadius:8},tokenSeparators:[`,`,`,`,`、`]})})]}),(0,Q.jsx)(D4,{onClick:()=>n(t),style:{color:`#ef4444`,fontSize:16,marginTop:34,cursor:`pointer`,flexShrink:0}})]},e)),(0,Q.jsx)(YE,{type:`dashed`,onClick:()=>t(),block:!0,icon:(0,Q.jsx)(DL,{}),style:{borderRadius:8,height:36},children:`添加选项组`})]})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`is_active`,label:`启用状态`,valuePropName:`checked`,initialValue:!0,style:{flex:1},children:(0,Q.jsx)(Fq,{})}),(0,Q.jsx)(X.Item,{name:`sort_order`,label:`排序`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(vW,{type:`number`,size:`large`})})]})]})})]})};function x7(e){if(Array.isArray(e))return e;if(typeof e==`string`)try{return JSON.parse(e)}catch{return[]}return[]}var xne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,engine:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await E8()).map(e=>({...e,supportedRatios:x7(e.supportedRatios),supportedResolutions:x7(e.supportedResolutions),supportedDurations:x7(e.supportedDurations)})))}catch{BG.error(`加载视频引擎失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={name:e.name,provider:e.provider,api_base:e.apiBase,api_key:e.apiKey,model_name:e.modelName,supported_ratios:JSON.stringify(e.supportedRatios||[]),supported_resolutions:JSON.stringify(e.supportedResolutions||[]),supported_durations:JSON.stringify(e.supportedDurations||[]),is_active:e.isActive??!0,priority:e.priority??0};i.engine?(await D8({id:i.engine.id,...t}),BG.success(`已更新`)):(await D8(t),BG.success(`已添加`)),a({open:!1,engine:null}),o.resetFields(),s()}catch(e){if(e?.errorFields)return;BG.error(e?.message||`保存失败`)}},l=async e=>{try{await O8(e),BG.success(`已删除`),s()}catch{BG.error(`删除失败`)}},u=e=>{a({open:!0,engine:e||null}),e?o.setFieldsValue(e):(o.resetFields(),o.setFieldsValue({isActive:!0,priority:0,supportedRatios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],supportedResolutions:[`480p`,`720p`,`1080p`],supportedDurations:[4,5,6,7,8,9,10,11,12,13,14,15]}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(J4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`视频引擎配置`}),(0,Q.jsxs)(IQ,{color:`purple`,children:[e.length,` 个引擎`]})]}),(0,Q.jsx)(YE,{type:`primary`,icon:(0,Q.jsx)(DL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加引擎`})]}),(0,Q.jsx)(CQ,{columns:[{title:`引擎名称`,key:`name`,width:180,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsx)(`div`,{style:{width:36,height:36,borderRadius:8,background:t.isActive?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`linear-gradient(135deg, #94a3b8, #cbd5e1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:16},children:(0,Q.jsx)(J4,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.provider})]})]})},{title:`支持比例`,dataIndex:`supportedRatios`,width:200,render:e=>(0,Q.jsx)(WV,{size:2,wrap:!0,children:e.map(e=>(0,Q.jsx)(IQ,{children:e},e))})},{title:`支持分辨率`,dataIndex:`supportedResolutions`,width:150,render:e=>(0,Q.jsx)(WV,{size:2,wrap:!0,children:e.map(e=>(0,Q.jsx)(IQ,{color:`blue`,children:e},e))})},{title:`支持时长`,dataIndex:`supportedDurations`,width:120,render:e=>(0,Q.jsx)(IQ,{color:`orange`,children:e?.length?`${Math.min(...e)}-${Math.max(...e)}s`:`-`})},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(IQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(WV,{size:4,children:[(0,Q.jsx)(YE,{type:`link`,size:`small`,icon:(0,Q.jsx)(HQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(qG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(YE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(zQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(UG,{title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(J4,{}),i.engine?`编辑引擎`:`添加引擎`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,engine:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:620,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`引擎名称`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(vW,{placeholder:`Seedance 2.0`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`provider`,label:`提供商`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(BC,{size:`large`,options:[{value:`ark`,label:`火山引擎 (Ark)`}]})})]}),(0,Q.jsx)(X.Item,{name:`apiBase`,label:`API基础地址`,rules:[{required:!0}],children:(0,Q.jsx)(vW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`apiKey`,label:`API Key`,children:(0,Q.jsx)(vW.Password,{placeholder:`sk-****`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`modelName`,label:`模型名称`,children:(0,Q.jsx)(vW,{placeholder:`doubao-seedance-2-0-260128`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`supportedRatios`,label:`支持比例`,children:(0,Q.jsx)(BC,{mode:`multiple`,size:`large`,options:[{value:`16:9`,label:`16:9 (横屏)`},{value:`4:3`,label:`4:3 (标准)`},{value:`1:1`,label:`1:1 (方形)`},{value:`3:4`,label:`3:4 (竖版)`},{value:`9:16`,label:`9:16 (竖屏)`},{value:`21:9`,label:`21:9 (超宽)`}]})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`supportedResolutions`,label:`支持分辨率`,style:{flex:1},children:(0,Q.jsx)(BC,{mode:`multiple`,size:`large`,options:[{value:`480p`},{value:`720p`},{value:`1080p`}]})}),(0,Q.jsx)(X.Item,{name:`supportedDurations`,label:`支持时长(秒)`,style:{flex:1},children:(0,Q.jsx)(BC,{mode:`multiple`,size:`large`,options:Array.from({length:12},(e,t)=>({value:t+4,label:`${t+4}秒`}))})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`priority`,label:`优先级`,children:(0,Q.jsx)(BC,{size:`large`,options:[{value:0,label:`0 (默认)`},{value:1,label:`1`},{value:2,label:`2`},{value:3,label:`3`},{value:5,label:`5`},{value:10,label:`10 (最高)`}]})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,style:{paddingTop:30},children:(0,Q.jsx)(Fq,{})})]})]})})]})};function Sne(e){if(Array.isArray(e))return e;if(typeof e==`string`)try{return JSON.parse(e)}catch{return[]}return[]}function Cne(e){if(e&&typeof e==`object`&&!Array.isArray(e))return e;if(typeof e==`string`)try{let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:{}}catch{return{}}return{}}var S7={"2K":{"1:1":`2048×2048`,"4:3":`2304×1728`,"3:4":`1728×2304`,"16:9":`2560×1440`,"9:16":`1600×2848`,"3:2":`2496×1664`,"2:3":`1664×2496`,"21:9":`3024×1296`},"4K":{"1:1":`4096×4096`,"4:3":`4608×3456`,"3:4":`3520×4704`,"16:9":`5404×3040`,"9:16":`3040×5504`,"3:2":`4992×3328`,"2:3":`3328×4992`,"21:9":`6197×2656`}},C7=[`1:1`,`4:3`,`3:4`,`16:9`,`9:16`,`3:2`,`2:3`,`21:9`],wne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,engine:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await k8()).map(e=>({...e,supportedModels:Sne(e.supportedModels),supportedSizes:Cne(e.supportedSizes)})))}catch{BG.error(`加载图片引擎失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={};for(let n of[`2K`,`4K`]){let r=e[`size_${n}`]||[];if(r.length>0){t[n]={};for(let e of r)t[n][e]=S7[n]?.[e]||e}}let n={name:e.name,provider:e.provider,api_base:e.apiBase,api_key:e.apiKey,model_name:e.modelName,supported_models:JSON.stringify(e.supportedModels||[]),supported_sizes:JSON.stringify(t),default_size:e.defaultSize||`2K`,generate_url:e.generateUrl||``,is_active:e.isActive??!0,priority:e.priority??0};i.engine?(await A8({id:i.engine.id,...n}),BG.success(`已更新`)):(await A8(n),BG.success(`已添加`)),a({open:!1,engine:null}),o.resetFields(),s()}catch(e){if(e?.errorFields)return;BG.error(e?.message||`保存失败`)}},l=async e=>{try{await j8(e),BG.success(`已删除`),s()}catch{BG.error(`删除失败`)}},u=e=>{if(a({open:!0,engine:e||null}),e){let t={};for(let n of[`2K`,`4K`])t[`size_${n}`]=Object.keys(e.supportedSizes?.[n]||{});o.setFieldsValue({...e,...t})}else o.resetFields(),o.setFieldsValue({isActive:!0,priority:0,supportedModels:[`doubao-seedream-5-0-260128`],defaultSize:`2K`,size_2K:C7,size_4K:C7})};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(LR,{style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(H4,{style:{fontSize:18,color:`#10b981`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`图片引擎配置`}),(0,Q.jsxs)(IQ,{color:`green`,children:[e.length,` 个引擎`]})]}),(0,Q.jsx)(YE,{type:`primary`,icon:(0,Q.jsx)(DL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加引擎`})]}),(0,Q.jsx)(CQ,{columns:[{title:`引擎名称`,key:`name`,width:180,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsx)(`div`,{style:{width:36,height:36,borderRadius:8,background:t.isActive?`linear-gradient(135deg, #10b981, #059669)`:`linear-gradient(135deg, #94a3b8, #cbd5e1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:16},children:(0,Q.jsx)(H4,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.modelName})]})]})},{title:`2K 支持比例`,key:`sizes_2k`,width:260,render:(e,t)=>{let n=Object.keys(t.supportedSizes?.[`2K`]||{});return n.length===0?(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`}):(0,Q.jsx)(WV,{size:2,wrap:!0,children:n.map(e=>(0,Q.jsxs)(IQ,{color:`blue`,children:[e,` `,t.supportedSizes[`2K`][e]]},e))})}},{title:`4K 支持比例`,key:`sizes_4k`,width:260,render:(e,t)=>{let n=Object.keys(t.supportedSizes?.[`4K`]||{});return n.length===0?(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`}):(0,Q.jsx)(WV,{size:2,wrap:!0,children:n.map(e=>(0,Q.jsxs)(IQ,{color:`purple`,children:[e,` `,t.supportedSizes[`4K`][e]]},e))})}},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(IQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(WV,{size:4,children:[(0,Q.jsx)(YE,{type:`link`,size:`small`,icon:(0,Q.jsx)(HQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(qG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(YE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(zQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:1e3}})]}),(0,Q.jsx)(UG,{title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(H4,{}),i.engine?`编辑引擎`:`添加引擎`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,engine:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:680,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`引擎名称`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(vW,{placeholder:`豆包文生图`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`provider`,label:`提供商`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(BC,{size:`large`,options:[{value:`ark`,label:`火山引擎 (Ark)`}]})})]}),(0,Q.jsx)(X.Item,{name:`apiBase`,label:`API基础地址`,rules:[{required:!0}],children:(0,Q.jsx)(vW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`apiKey`,label:`API Key`,children:(0,Q.jsx)(vW.Password,{placeholder:`sk-****`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`modelName`,label:`默认模型`,children:(0,Q.jsx)(vW,{placeholder:`doubao-seedream-5-0-260128`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`supportedModels`,label:`支持模型列表`,children:(0,Q.jsx)(BC,{mode:`tags`,size:`large`,placeholder:`输入模型ID后回车添加`,tokenSeparators:[`,`,`,`],options:[{value:`doubao-seedream-5-0-260128`}]})}),(0,Q.jsxs)(`div`,{style:{background:`#f8f9fc`,borderRadius:10,padding:16,marginBottom:8},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`尺寸配置`}),(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`勾选每个档位支持的比例,前台选择后传对应像素值给SDK`})]}),[`2K`,`4K`].map(e=>(0,Q.jsxs)(`div`,{style:{background:`#fafbfc`,borderRadius:10,padding:`12px 16px`,marginBottom:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13,color:e===`2K`?`#3b82f6`:`#8b5cf6`},children:e}),(0,Q.jsx)(X.Item,{name:`size_${e}`,style:{marginTop:8,marginBottom:0},children:(0,Q.jsx)(lz.Group,{style:{width:`100%`},children:(0,Q.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, 1fr)`,gap:`6px 0`},children:C7.map(t=>(0,Q.jsxs)(lz,{value:t,style:{fontSize:12},children:[t,` `,(0,Q.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:11},children:S7[e]?.[t]})]},t))})})})]},e)),(0,Q.jsx)(X.Item,{name:`defaultSize`,label:`默认尺寸档位`,children:(0,Q.jsx)(BC,{size:`large`,options:[{value:`2K`,label:`2K`},{value:`4K`,label:`4K`}]})}),(0,Q.jsx)(X.Item,{name:`generateUrl`,label:`生成接口地址`,children:(0,Q.jsx)(vW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3/images/generations`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`priority`,label:`优先级`,children:(0,Q.jsx)(BC,{size:`large`,options:[{value:0,label:`0 (默认)`},{value:1,label:`1`},{value:2,label:`2`},{value:3,label:`3`},{value:5,label:`5`},{value:10,label:`10 (最高)`}]})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,style:{paddingTop:30},children:(0,Q.jsx)(Fq,{})})]})]})})]})},Tne=[`2K`,`4K`],Ene=[`480p`,`720p`,`1080p`],Dne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)({open:!1,ratio:null}),[c]=X.useForm(),[l,u]=(0,S.useState)(10),[d,f]=(0,S.useState)(null),[p,m]=(0,S.useState)(!1),h=X.useWatch(`genType`,c)||`video`,g=X.useWatch(`modelConfigId`,c),_=async()=>{a(!0);try{let[e,n,i]=await Promise.all([M8(),_8(),h5()]),a=(i?.engine?.image||[]).map(e=>({...e,genType:`image`})),o=(i?.engine?.video||[]).map(e=>({...e,genType:`video`}));t(e),r([...o,...a]);let s=n.find(e=>e.key===`text_credits_per_1000_tokens`);s&&(u(Number(s.value)||10),f({id:s.id}))}catch{BG.error(`加载积分比例失败`)}finally{a(!1)}};(0,S.useEffect)(()=>{_()},[]);let v=(0,S.useMemo)(()=>n.filter(e=>e.genType===h).map(e=>({value:e.id,label:`${e.name}${e.modelName?`(${e.modelName})`:``}`})),[n,h]),y=(0,S.useMemo)(()=>n.find(e=>e.id===g&&e.genType===h),[n,h,g]),b=(0,S.useMemo)(()=>{if(h===`image`){let e=y?.supportedSizes?Object.keys(y.supportedSizes):[];return(e.length?e:Tne).map(e=>({value:e,label:e}))}let e=y?.supportedResolutions||[];return(e.length?e:Ene).map(e=>({value:e,label:e}))},[h,y]),x=(e,t)=>n.find(n=>n.id===e&&(!t||n.genType===t))?.name||e,C=async()=>{try{let e=await c.validateFields(),t={model_config_id:e.modelConfigId,gen_type:e.genType,resolution:e.resolution,ratio:e.ratio,base_credits:e.baseCredits,per_second_credits:e.genType===`image`?0:e.perSecondCredits||0};o.ratio?(await N8({id:o.ratio.id,...t}),BG.success(`已更新`)):(await N8(t),BG.success(`已添加`)),s({open:!1,ratio:null}),c.resetFields(),_()}catch(e){if(e?.errorFields)return;BG.error(e?.message||`保存失败`)}},w=async e=>{try{await P8(e),BG.success(`已删除`),_()}catch{BG.error(`删除失败`)}},T=async()=>{if(d){m(!0);try{await v8(d.id,String(l)),BG.success(`文字积分费率已更新`)}catch(e){BG.error(e?.message||`保存失败`)}finally{m(!1)}}},E=e=>{s({open:!0,ratio:e||null}),e?c.setFieldsValue({modelConfigId:e.modelConfigId,genType:e.genType===`image`?`image`:`video`,resolution:e.resolution,ratio:e.ratio,baseCredits:e.baseCredits,perSecondCredits:e.perSecondCredits}):(c.resetFields(),c.setFieldsValue({genType:`video`,ratio:1,baseCredits:60,perSecondCredits:2}))};return(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16},children:[(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:16},children:[(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(N2,{style:{fontSize:18,color:`#f59e0b`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`文字积分费率`})]}),(0,Q.jsx)(YE,{type:`primary`,loading:p,onClick:T,style:{borderRadius:8},children:`保存`})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{display:`block`,marginBottom:16,fontSize:13},children:`文字积分计算公式:ceil(总token数 x 费率 / 1000),最低1积分`}),(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,Q.jsx)(Z.Text,{children:`每1000 token消耗积分:`}),(0,Q.jsxs)(WV.Compact,{style:{width:160},children:[(0,Q.jsx)(lB,{min:0,max:1e3,step:.01,value:l,onChange:e=>u(e||0),size:`large`,style:{width:`100%`}}),(0,Q.jsx)(Z.Text,{children:`积分`})]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[`示例:1000 token = `,l,` 积分,500 token = `,(500*l/1e3).toFixed(4),` 积分`]})]})]}),(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(D0,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`积分比例配置`}),(0,Q.jsxs)(IQ,{color:`purple`,children:[e.length,` 条规则`]})]}),(0,Q.jsx)(YE,{type:`primary`,icon:(0,Q.jsx)(DL,{}),onClick:()=>E(),style:{borderRadius:8},children:`添加比例`})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{display:`block`,marginBottom:16,fontSize:13},children:`视频积分公式:(基础积分 + 每秒积分 x 视频时长) x 模型倍率;图片积分公式:基础积分 x 模型倍率`}),(0,Q.jsx)(CQ,{columns:[{title:`类型`,dataIndex:`genType`,width:80,render:e=>(0,Q.jsx)(IQ,{color:e===`image`?`cyan`:`orange`,children:e===`image`?`图片`:`视频`})},{title:`引擎`,dataIndex:`modelConfigId`,width:180,render:(e,t)=>(0,Q.jsx)(IQ,{color:t.genType===`image`?`cyan`:`purple`,children:x(e,t.genType)})},{title:`分辨率/尺寸`,dataIndex:`resolution`,width:110,render:e=>(0,Q.jsx)(IQ,{color:{"480p":`blue`,"720p":`blue`,"1080p":`blue`,"4K":`green`,"2K":`green`}[e]||`default`,children:e})},{title:`倍率`,dataIndex:`ratio`,width:100,sorter:(e,t)=>e.ratio-t.ratio,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:e>=2?`#ef4444`:e>=1.5?`#f59e0b`:`#10b981`},children:[`x`,e]})},{title:`基础积分`,dataIndex:`baseCredits`,width:100,render:e=>(0,Q.jsxs)(Z.Text,{children:[e,` 积分`]})},{title:`每秒积分`,dataIndex:`perSecondCredits`,width:100,render:(e,t)=>(0,Q.jsx)(Z.Text,{children:t.genType===`image`?`-`:`${e} 积分/秒`})},{title:`示例计算`,key:`example`,width:120,render:(e,t)=>{let n;return n=t.genType===`image`?Math.round(t.baseCredits*t.ratio):Math.round((t.baseCredits+t.perSecondCredits*15)*t.ratio),(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:[n,` 积分`]})}},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(WV,{size:4,children:[(0,Q.jsx)(YE,{type:`link`,size:`small`,icon:(0,Q.jsx)(HQ,{}),onClick:()=>E(t),children:`编辑`}),(0,Q.jsx)(qG,{title:`确定删除?`,onConfirm:()=>w(t.id),children:(0,Q.jsx)(YE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(zQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:!1,scroll:{x:860}})]}),(0,Q.jsx)(UG,{title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(D0,{}),o.ratio?`编辑比例`:`添加比例`]}),open:o.open,onOk:C,onCancel:()=>{s({open:!1,ratio:null}),c.resetFields()},okText:`保存`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`genType`,label:`生成类型`,rules:[{required:!0,message:`请选择生成类型`}],children:(0,Q.jsx)(BC,{size:`large`,options:[{value:`video`,label:`视频`},{value:`image`,label:`图片`}],onChange:()=>{c.setFieldsValue({modelConfigId:void 0,resolution:void 0})}})}),(0,Q.jsx)(X.Item,{name:`modelConfigId`,label:`引擎`,rules:[{required:!0,message:`请选择引擎`}],children:(0,Q.jsx)(BC,{size:`large`,placeholder:`请选择引擎`,options:v,showSearch:!0,optionFilterProp:`label`,onChange:()=>c.setFieldsValue({resolution:void 0})})}),(0,Q.jsx)(X.Item,{name:`resolution`,label:h===`image`?`图片尺寸`:`分辨率`,rules:[{required:!0,message:h===`image`?`请选择图片尺寸`:`请选择分辨率`}],children:(0,Q.jsx)(BC,{size:`large`,placeholder:h===`image`?`请选择图片尺寸`:`请选择分辨率`,options:b})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`ratio`,label:`倍率`,style:{flex:1},rules:[{required:!0,message:`请输入倍率`}],children:(0,Q.jsx)(lB,{min:.1,max:10,step:.1,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`baseCredits`,label:`基础积分`,style:{flex:1},rules:[{required:!0,message:`请输入基础积分`}],children:(0,Q.jsx)(lB,{min:0,max:1e3,style:{width:`100%`},size:`large`})}),h!==`image`&&(0,Q.jsx)(X.Item,{name:`perSecondCredits`,label:`每秒积分`,style:{flex:1},rules:[{required:!0,message:`请输入每秒积分`}],children:(0,Q.jsx)(lB,{min:0,max:100,style:{width:`100%`},size:`large`})})]})]})})]})},w7={HomeOutlined:(0,Q.jsx)(Z2,{}),PlayCircleOutlined:(0,Q.jsx)(J4,{}),WalletOutlined:(0,Q.jsx)(N6,{}),RobotOutlined:(0,Q.jsx)(o3,{}),SettingOutlined:(0,Q.jsx)(D3,{}),BellOutlined:(0,Q.jsx)(h0,{}),UserOutlined:(0,Q.jsx)(D6,{}),AppstoreOutlined:(0,Q.jsx)(J1,{}),FileTextOutlined:(0,Q.jsx)(YV,{}),StarOutlined:(0,Q.jsx)(Z3,{}),HeartOutlined:(0,Q.jsx)(H2,{}),CameraOutlined:(0,Q.jsx)(A0,{}),DashboardOutlined:(0,Q.jsx)(o2,{}),CalculatorOutlined:(0,Q.jsx)(D0,{}),DollarOutlined:(0,Q.jsx)(f2,{}),GiftOutlined:(0,Q.jsx)(I2,{}),ThunderboltOutlined:(0,Q.jsx)(l6,{}),FireOutlined:(0,Q.jsx)(D2,{}),CloudOutlined:(0,Q.jsx)(H0,{}),SmileOutlined:(0,Q.jsx)(H3,{}),TrophyOutlined:(0,Q.jsx)(h6,{}),RocketOutlined:(0,Q.jsx)(l3,{}),BulbOutlined:(0,Q.jsx)(w0,{}),CodeOutlined:(0,Q.jsx)(J0,{}),PictureOutlined:(0,Q.jsx)(H4,{}),VideoCameraOutlined:(0,Q.jsx)(A6,{}),AudioOutlined:(0,Q.jsx)(o0,{}),MailOutlined:(0,Q.jsx)(v4,{}),PhoneOutlined:(0,Q.jsx)(z4,{}),GlobalOutlined:(0,Q.jsx)(z2,{}),ShoppingCartOutlined:(0,Q.jsx)(A3,{}),TeamOutlined:(0,Q.jsx)(o6,{}),BarChartOutlined:(0,Q.jsx)(f0,{}),PieChartOutlined:(0,Q.jsx)(G4,{}),LineChartOutlined:(0,Q.jsx)(o4,{}),SecurityScanOutlined:(0,Q.jsx)(x3,{}),ApiOutlined:(0,Q.jsx)(G1,{}),DatabaseOutlined:(0,Q.jsx)(l2,{}),CloudServerOutlined:(0,Q.jsx)(G0,{}),MenuOutlined:(0,Q.jsx)(w4,{})},One=Object.keys(w7).map(e=>({value:e,label:(0,Q.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[w7[e],` `,e.replace(`Outlined`,``)]})})),kne={page:`blue`,group:`purple`},Ane={page:`页面`,group:`分组`},jne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)(`frontend`),[o,s]=(0,S.useState)({open:!1,menu:null}),[c]=X.useForm(),l=async()=>{r(!0);try{t(await W8())}catch{}r(!1)};(0,S.useEffect)(()=>{l()},[]);let u=async()=>{try{let e=await c.validateFields(),t={label:e.label,path:e.path||``,icon:e.icon||``,sort_order:e.sortOrder??0,is_active:e.isActive??!0,parent_id:e.parentId||null,menu_type:e.menuType||`page`,menu_target:e.menuTarget||`frontend`,is_default:e.isDefault??!1};o.menu?.id?await G8({...t,id:o.menu.id}):await G8(t),BG.success(o.menu?.id?`菜单已更新`:`菜单已添加`),s({open:!1,menu:null}),c.resetFields(),l()}catch{}},d=async e=>{try{await K8(e),BG.success(`菜单已删除`),l()}catch(e){BG.error(e?.message||`删除失败`)}},f=t=>{s({open:!0,menu:t||null}),t?c.setFieldsValue({label:t.label,path:t.path,icon:t.icon,sortOrder:t.sortOrder??0,isActive:t.isActive??!0,parentId:t.parentId??``,menuType:t.menuType??`page`,menuTarget:t.menuTarget??`frontend`,isDefault:t.isDefault??!1}):(c.resetFields(),c.setFieldsValue({icon:`HomeOutlined`,sortOrder:e.length,isActive:!0,menuType:`page`,menuTarget:i,isDefault:!1}))},p=e.filter(e=>{let t=e.menuTarget??`frontend`;return t===i||t===`both`}),m=[{value:``,label:`顶级菜单`},...p.filter(e=>e.menuType===`group`).map(e=>({value:e.id,label:e.label}))],h=[],g=p.filter(e=>!e.parentId),_={};p.filter(e=>e.parentId).forEach(e=>{let t=e.parentId;_[t]||(_[t]=[]),_[t].push(e)}),g.sort((e,t)=>(e.sortOrder??0)-(t.sortOrder??0)).forEach(e=>{h.push({...e,_depth:0}),(_[e.id]||[]).sort((e,t)=>(e.sortOrder??0)-(t.sortOrder??0)).forEach(e=>{h.push({...e,_depth:1})})});let v=[{title:`排序`,dataIndex:`sortOrder`,width:60},{title:`菜单名称`,key:`label`,width:180,render:(e,t)=>(0,Q.jsxs)(`span`,{style:{paddingLeft:t._depth*20,fontWeight:t._depth===0?600:400},children:[t._depth===1&&(0,Q.jsx)(`span`,{style:{color:`#cbd5e1`,marginRight:4},children:`└`}),t.label]})},{title:`路由路径`,dataIndex:`path`,width:160,render:e=>e||(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})},{title:`图标`,dataIndex:`icon`,width:100,render:e=>e&&w7[e]?(0,Q.jsx)(`span`,{style:{fontSize:16,color:`#6366f1`},children:w7[e]}):`-`},{title:`类型`,dataIndex:`menuType`,width:80,render:e=>(0,Q.jsx)(IQ,{color:kne[e]||`default`,children:Ane[e]||e})},{title:`状态`,dataIndex:`isActive`,width:70,render:e=>(0,Q.jsx)(`span`,{style:{color:e?`#22c55e`:`#94a3b8`},children:e?`启用`:`停用`})},...i===`frontend`?[{title:`默认显示`,dataIndex:`isDefault`,width:80,render:e=>e?(0,Q.jsx)(IQ,{color:`green`,children:`默认`}):(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})}]:[],{title:`操作`,key:`action`,width:150,render:(e,t)=>(0,Q.jsxs)(WV,{size:4,children:[(0,Q.jsx)(YE,{type:`link`,size:`small`,icon:(0,Q.jsx)(HQ,{}),onClick:()=>f(t),children:`编辑`}),(0,Q.jsx)(qG,{title:`确定删除该菜单?`,onConfirm:()=>d(t.id),children:(0,Q.jsx)(YE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(zQ,{}),children:`删除`})})]})}];return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(w4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`菜单配置`})]}),(0,Q.jsx)(YE,{type:`primary`,icon:(0,Q.jsx)(DL,{}),onClick:()=>f(),style:{borderRadius:8},children:`添加菜单`})]}),(0,Q.jsx)(CR,{activeKey:i,onChange:a,items:[{key:`frontend`,label:`前台菜单`},{key:`admin`,label:`后台菜单`}]}),(0,Q.jsx)(CQ,{columns:v,dataSource:h,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(UG,{title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(w4,{}),o.menu?.id?`编辑菜单`:`添加菜单`]}),open:o.open,onOk:u,onCancel:()=>{s({open:!1,menu:null}),c.resetFields()},okText:`确认`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`label`,label:`菜单名称`,rules:[{required:!0,message:`请输入菜单名称`}],children:(0,Q.jsx)(vW,{placeholder:`例如:我的项目`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`path`,label:`路由路径`,tooltip:`分组类型可留空`,children:(0,Q.jsx)(vW,{placeholder:`例如:/projects(分组可留空)`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`menuType`,label:`菜单类型`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(BC,{size:`large`,options:[{value:`page`,label:`页面`},{value:`group`,label:`分组`}]})}),(0,Q.jsx)(X.Item,{name:`menuTarget`,label:`适用端`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(BC,{size:`large`,options:[{value:`frontend`,label:`前台`},{value:`admin`,label:`后台`},{value:`both`,label:`两者`}]})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`icon`,label:`图标`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(BC,{size:`large`,options:One})}),(0,Q.jsx)(X.Item,{name:`sortOrder`,label:`排序`,style:{flex:1},children:(0,Q.jsx)(lB,{min:0,max:100,style:{width:`100%`},size:`large`,placeholder:`默认0`})})]}),(0,Q.jsx)(X.Item,{name:`parentId`,label:`上级菜单`,children:(0,Q.jsx)(BC,{size:`large`,options:m,allowClear:!0,placeholder:`顶级菜单`})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用`,valuePropName:`checked`,children:(0,Q.jsx)(Fq,{})}),(0,Q.jsx)(X.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.menuTarget!==t.menuTarget,children:({getFieldValue:e})=>e(`menuTarget`)===`admin`?null:(0,Q.jsx)(X.Item,{name:`isDefault`,label:`新用户默认显示`,valuePropName:`checked`,tooltip:`开启后,新注册用户默认显示此菜单`,children:(0,Q.jsx)(Fq,{})})})]})})]})},Mne={normal:`blue`,gift:`green`,promo:`purple`},Nne={normal:`常规`,gift:`赠送`,promo:`促销`},Pne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,item:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await Q8()).map(e=>({id:e.id,name:e.name,credits:e.credits,price:e.price,bonusCredits:e.bonus_credits??e.bonusCredits??0,totalCredits:e.total_credits??e.totalCredits??e.credits,description:e.description,packageType:e.package_type??e.packageType??`normal`,isGift:e.is_gift??e.isGift??!1,isActive:e.is_active??e.isActive??!0,sortOrder:e.sort_order??e.sortOrder??0})))}catch{BG.error(`加载充值套餐失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={name:e.name,credits:e.credits,price:e.price,bonus_credits:e.bonusCredits||0,description:e.description||null,package_type:e.packageType||`normal`,is_gift:e.isGift||!1,is_active:e.isActive??!0,sort_order:e.sortOrder??0};i.item?.id?(await $8({id:i.item.id,...t}),BG.success(`已更新`)):(await $8(t),BG.success(`已添加`)),a({open:!1,item:null}),o.resetFields(),s()}catch{}},l=async e=>{try{await e5(e),BG.success(`已删除`),s()}catch(e){BG.error(e?.message||`删除失败`)}},u=e=>{a({open:!0,item:e||null}),e?o.setFieldsValue({name:e.name,credits:e.credits,price:e.price,bonusCredits:e.bonusCredits,description:e.description,packageType:e.packageType,isGift:e.isGift,isActive:e.isActive,sortOrder:e.sortOrder}):(o.resetFields(),o.setFieldsValue({isActive:!0,sortOrder:0,packageType:`normal`,bonusCredits:0,isGift:!1}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(I2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`充值套餐管理`}),(0,Q.jsxs)(IQ,{color:`purple`,children:[e.length,` 个套餐`]})]}),(0,Q.jsx)(YE,{type:`primary`,icon:(0,Q.jsx)(DL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加套餐`})]}),(0,Q.jsx)(CQ,{columns:[{title:`套餐名称`,key:`name`,width:160,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),t.description&&(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.description})]})},{title:`基础积分`,dataIndex:`credits`,width:100,render:e=>(0,Q.jsx)(Z.Text,{children:e.toLocaleString()})},{title:`赠送积分`,dataIndex:`bonusCredits`,width:100,render:e=>e>0?(0,Q.jsxs)(IQ,{color:`green`,children:[`+`,e.toLocaleString()]}):(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})},{title:`总积分`,key:`total`,width:100,render:(e,t)=>(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:(t.credits+t.bonusCredits).toLocaleString()})},{title:`价格(元)`,dataIndex:`price`,width:100,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,children:[`¥`,e]})},{title:`类型`,dataIndex:`packageType`,width:80,render:e=>(0,Q.jsx)(IQ,{color:Mne[e]||`default`,children:Nne[e]||e})},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(IQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(WV,{size:4,children:[(0,Q.jsx)(YE,{type:`link`,size:`small`,icon:(0,Q.jsx)(HQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(qG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(YE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(zQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(UG,{title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(I2,{}),i.item?`编辑套餐`:`添加套餐`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,item:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`套餐名称`,rules:[{required:!0,message:`请输入套餐名称`}],children:(0,Q.jsx)(vW,{placeholder:`例如:进阶包`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`credits`,label:`基础积分`,rules:[{required:!0,message:`请输入积分`}],style:{flex:1},children:(0,Q.jsx)(lB,{min:1,placeholder:`2000`,size:`large`,style:{width:`100%`}})}),(0,Q.jsx)(X.Item,{name:`price`,label:`价格(元)`,rules:[{required:!0,message:`请输入价格`}],style:{flex:1},children:(0,Q.jsx)(lB,{min:.01,step:1,placeholder:`168`,size:`large`,style:{width:`100%`}})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`bonusCredits`,label:`赠送积分`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(lB,{min:0,placeholder:`0`,size:`large`,style:{width:`100%`}})}),(0,Q.jsx)(X.Item,{name:`packageType`,label:`套餐类型`,initialValue:`normal`,style:{flex:1},children:(0,Q.jsx)(BC,{size:`large`,options:[{value:`normal`,label:`常规`},{value:`gift`,label:`赠送`},{value:`promo`,label:`促销`}]})})]}),(0,Q.jsx)(X.Item,{name:`description`,label:`描述`,children:(0,Q.jsx)(vW,{placeholder:`套餐描述(可选)`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,initialValue:!0,style:{flex:1},children:(0,Q.jsx)(Fq,{})}),(0,Q.jsx)(X.Item,{name:`isGift`,label:`是否赠送`,valuePropName:`checked`,initialValue:!1,style:{flex:1},children:(0,Q.jsx)(Fq,{})}),(0,Q.jsx)(X.Item,{name:`sortOrder`,label:`排序`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(lB,{size:`large`,style:{width:`100%`}})})]})]})})]})},Fne={POST:`green`,PUT:`blue`,DELETE:`red`},Ine=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),c=async e=>{a(!0);try{let n=await t5(e||o);t(n.items||[]),r(n.total||0)}catch{BG.error(`加载操作日志失败`)}finally{a(!1)}};return(0,S.useEffect)(()=>{c()},[]),(0,Q.jsx)(`div`,{children:(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(J2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`操作日志`})]}),(0,Q.jsx)(YE,{icon:(0,Q.jsx)(kK,{}),onClick:()=>c(),children:`刷新`})]}),(0,Q.jsx)(CQ,{columns:[{title:`操作人`,dataIndex:`username`,width:120,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`操作`,dataIndex:`action`,width:160,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`方法`,dataIndex:`method`,width:80,render:e=>(0,Q.jsx)(IQ,{color:Fne[e]||`default`,children:e})},{title:`路径`,dataIndex:`path`,width:220,ellipsis:!0,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:e})},{title:`时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:20,total:n,showTotal:e=>`共 ${e} 条记录`,onChange:e=>{s(e),c(e)}},scroll:{x:800}})]})})},Lne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(null),[g]=X.useForm(),[_]=X.useForm(),v=async e=>{a(!0);try{let n=await n5(e||o);t(n.items||[]),r(n.total||0)}catch{BG.error(`加载应用管理列表失败`)}finally{a(!1)}},y=async()=>{try{let e=await g.validateFields();await r5({app_id:e.app_id,secret:e.secret,open_type:e.open_type,count:e.count,auth_url:e.auth_url,company:e.company}),BG.success(`创建成功`),l(!1),g.resetFields(),v()}catch(e){BG.error(e?.message||`创建失败`)}},b=async e=>{try{h(await i5(e)),d(!0)}catch(e){BG.error(e?.message||`获取详情失败`)}},x=async e=>{try{let t=await i5(e);h(t),_.setFieldsValue({app_id:t.appId,secret:t.secret,open_type:t.openType,count:t.count,auth_url:t.authUrl,company:t.company}),p(!0)}catch(e){BG.error(e?.message||`获取详情失败`)}},C=async()=>{if(m)try{let e=await _.validateFields();await a5(m.id,{app_id:e.app_id,secret:e.secret,open_type:e.open_type,count:e.count,auth_url:e.auth_url,company:e.company}),BG.success(`更新成功`),p(!1),_.resetFields(),v()}catch(e){BG.error(e?.message||`更新失败`)}},w=e=>{UG.confirm({title:`确认删除`,content:`确定要删除这个应用管理吗?`,okText:`删除`,okType:`danger`,cancelText:`取消`,onOk:async()=>{try{await o5(e),BG.success(`删除成功`),v()}catch(e){BG.error(e?.message||`删除失败`)}}})};return(0,S.useEffect)(()=>{v()},[]),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(w4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`应用管理列表`})]}),(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(YE,{icon:(0,Q.jsx)(kK,{}),onClick:()=>v(),children:`刷新`}),(0,Q.jsx)(YE,{type:`primary`,icon:(0,Q.jsx)(DL,{}),onClick:()=>l(!0),children:`创建`})]})]}),(0,Q.jsx)(CQ,{columns:[{title:`ID`,dataIndex:`id`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`应用ID`,dataIndex:`appId`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`应用密钥`,dataIndex:`secret`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`开户方式`,dataIndex:`openType`,render:e=>(0,Q.jsx)(Z.Text,{children:{1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`}[e]||e})},{title:`归属公司`,dataIndex:`company`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`授权次数`,dataIndex:`count`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`状态`,dataIndex:`status`,render:e=>(0,Q.jsx)(IQ,{color:e===1?`green`:`red`,children:e===1?`正常`:`禁用`})},{title:`授权URL`,dataIndex:`authUrl`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`创建人`,dataIndex:`createBy`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`创建时间`,dataIndex:`createdAt`,render:e=>(0,Q.jsx)(Z.Text,{children:Z5(e)})},{title:`更新时间`,dataIndex:`updatedAt`,render:e=>(0,Q.jsx)(Z.Text,{children:Z5(e)})},{title:`操作`,render:(e,t)=>(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(YE,{icon:(0,Q.jsx)(XU,{}),size:`small`,onClick:()=>b(t.id),children:`详情`}),(0,Q.jsx)(YE,{icon:(0,Q.jsx)(HQ,{}),size:`small`,onClick:()=>x(t.id),children:`更新`}),(0,Q.jsx)(YE,{icon:(0,Q.jsx)(zQ,{}),size:`small`,danger:!0,onClick:()=>w(t.id),children:`删除`})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:20,total:n,showTotal:e=>`共 ${e} 条记录`,onChange:e=>{s(e),v(e)}},scroll:{x:800}})]}),(0,Q.jsx)(UG,{title:`创建应用管理`,open:c,onOk:y,onCancel:()=>{l(!1),g.resetFields()},okText:`创建`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:g,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`app_id`,label:`应用ID`,rules:[{required:!0,message:`请输入应用ID`},{max:64,message:`应用ID不能超过64个字符`}],children:(0,Q.jsx)(vW,{placeholder:`请输入应用ID`})}),(0,Q.jsx)(X.Item,{name:`secret`,label:`应用密钥`,rules:[{required:!0,message:`请输入应用密钥`},{max:256,message:`应用密钥不能超过256个字符`}],children:(0,Q.jsx)(vW,{placeholder:`请输入应用密钥`})}),(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户方式`,rules:[{required:!0,message:`请选择开户方式`}],children:(0,Q.jsxs)(BC,{placeholder:`请选择开户方式`,children:[(0,Q.jsx)(BC.Option,{value:1,children:`千川`}),(0,Q.jsx)(BC.Option,{value:2,children:`广告`}),(0,Q.jsx)(BC.Option,{value:3,children:`本地推`}),(0,Q.jsx)(BC.Option,{value:4,children:`星图`}),(0,Q.jsx)(BC.Option,{value:5,children:`快手代理商`}),(0,Q.jsx)(BC.Option,{value:6,children:`巨量星图`}),(0,Q.jsx)(BC.Option,{value:7,children:`巨量服务单`}),(0,Q.jsx)(BC.Option,{value:8,children:`腾讯服务单`}),(0,Q.jsx)(BC.Option,{value:9,children:`腾讯营销K2`}),(0,Q.jsx)(BC.Option,{value:10,children:`腾讯营销K3`})]})}),(0,Q.jsx)(X.Item,{name:`count`,label:`最大授权用户数`,initialValue:100,children:(0,Q.jsx)(lB,{min:1,placeholder:`应用最大可以授权多少个用户`})}),(0,Q.jsx)(X.Item,{name:`auth_url`,label:`应用授权链接`,children:(0,Q.jsx)(vW,{placeholder:`请输入应用授权链接`})}),(0,Q.jsx)(X.Item,{name:`company`,label:`应用归属公司名称`,rules:[{max:256,message:`公司名称不能超过256个字符`}],children:(0,Q.jsx)(vW,{placeholder:`请输入应用归属公司名称`})})]})}),(0,Q.jsx)(UG,{title:`应用管理详情`,open:u,onCancel:()=>{d(!1),h(null)},okText:`关闭`,cancelText:`取消`,width:600,children:m&&(0,Q.jsxs)(`div`,{style:{lineHeight:`2`},children:[(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`ID:`}),` `,m.id]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`应用ID:`}),` `,m.appId]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`应用密钥:`}),` `,m.secret]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`开户方式:`}),` `,{1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`}[m.openType]||m.openType]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`归属公司:`}),` `,m.company||`-`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`授权次数:`}),` `,m.count]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`状态:`}),` `,m.status===1?`正常`:`禁用`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`授权URL:`}),` `,m.authUrl||`-`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`创建人:`}),` `,m.createBy]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`创建时间:`}),` `,Z5(m.createdAt)]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`更新时间:`}),` `,Z5(m.updatedAt)]})]})}),(0,Q.jsx)(UG,{title:`更新应用管理`,open:f,onOk:C,onCancel:()=>{p(!1),_.resetFields(),h(null)},okText:`更新`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:_,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`app_id`,label:`应用ID`,rules:[{required:!0,message:`请输入应用ID`},{max:64,message:`应用ID不能超过64个字符`}],children:(0,Q.jsx)(vW,{placeholder:`请输入应用ID`})}),(0,Q.jsx)(X.Item,{name:`secret`,label:`应用密钥`,rules:[{required:!0,message:`请输入应用密钥`},{max:256,message:`应用密钥不能超过256个字符`}],children:(0,Q.jsx)(vW,{placeholder:`请输入应用密钥`})}),(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户方式`,rules:[{required:!0,message:`请选择开户方式`}],children:(0,Q.jsxs)(BC,{placeholder:`请选择开户方式`,children:[(0,Q.jsx)(BC.Option,{value:1,children:`千川`}),(0,Q.jsx)(BC.Option,{value:2,children:`广告`}),(0,Q.jsx)(BC.Option,{value:3,children:`本地推`}),(0,Q.jsx)(BC.Option,{value:4,children:`星图`}),(0,Q.jsx)(BC.Option,{value:5,children:`快手代理商`}),(0,Q.jsx)(BC.Option,{value:6,children:`巨量星图`}),(0,Q.jsx)(BC.Option,{value:7,children:`巨量服务单`}),(0,Q.jsx)(BC.Option,{value:8,children:`腾讯服务单`}),(0,Q.jsx)(BC.Option,{value:9,children:`腾讯营销K2`}),(0,Q.jsx)(BC.Option,{value:10,children:`腾讯营销K3`})]})}),(0,Q.jsx)(X.Item,{name:`count`,label:`最大授权用户数`,children:(0,Q.jsx)(lB,{min:1,placeholder:`应用最大可以授权多少个用户`})}),(0,Q.jsx)(X.Item,{name:`auth_url`,label:`应用授权链接`,children:(0,Q.jsx)(vW,{placeholder:`请输入应用授权链接`})}),(0,Q.jsx)(X.Item,{name:`company`,label:`应用归属公司名称`,rules:[{max:256,message:`公司名称不能超过256个字符`}],children:(0,Q.jsx)(vW,{placeholder:`请输入应用归属公司名称`})})]})})]})},T7=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),E7={image:`empty`,video:`empty`,videoCover:`empty`,references:{}},D7={optimizing:{color:`processing`,text:`优化中`,icon:(0,Q.jsx)(xm,{spin:!0})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,Q.jsx)(GB,{})},generating:{color:`warning`,text:`生成中`,icon:(0,Q.jsx)(xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,Q.jsx)(I0,{})},failed:{color:`error`,text:`失败`,icon:(0,Q.jsx)(z0,{})}},O7={image:{text:`图片`,color:`purple`,icon:(0,Q.jsx)(x2,{})},video:{text:`视频`,color:`geekblue`,icon:(0,Q.jsx)(A6,{})}},Rne=e=>/^(https?:)?\/\//i.test(e)||/^(blob|data):/i.test(e),k7=e=>!!e&&/^blob:/i.test(e.trim()),A7=e=>{if(!e)return``;let t=String(e).trim();return t?Rne(t)?t:T7?`${T7}${t.startsWith(`/`)?t:`/${t}`}`:t.startsWith(`/`)?t:`/${t}`:``},zne=e=>e?e.length>12?`${e.slice(0,8)}...`:e:`-`,j7=e=>e?Z5(e):`-`,Bne=e=>e==null||e===``,M7=e=>{if(!e||k7(e))return!1;try{let t=new URL(A7(e),window.location.origin),n=t.searchParams.get(`exp`)||t.searchParams.get(`expires`)||t.searchParams.get(`expire`)||t.searchParams.get(`expires_at`)||t.searchParams.get(`x-expires`);if(!n)return!1;let r=Number(n);if(!Number.isFinite(r))return!1;let i=r>1e10?r:r*1e3;return Date.now()>=i}catch{return!1}},N7=e=>e?k7(e)||M7(e)?`invalid`:`checking`:`empty`,P7=e=>{let t=e.url||e.mediaUrl||e.fileUrl;return typeof t==`string`&&t.trim()?t.trim():void 0},Vne=e=>{let t=String(e.type||e.mediaType||e.mimeType||``).toLowerCase(),n=P7(e)?.toLowerCase()||``;return t.includes(`video`)||/\.(mp4|mov|webm|m4v)(\?|$)/i.test(n)?`video`:t.includes(`image`)||/\.(png|jpe?g|webp|gif|bmp|svg)(\?|$)/i.test(n)?`image`:t||`unknown`},F7=(e,t)=>`${t}-${P7(e)||`empty`}`,I7=(e,t=`资源`)=>k7(e)?`本地临时素材已失效`:M7(e)?`${t}链接已超时,请刷新列表或重新搜索后再查看`:`${t}加载失败,请刷新列表或重新搜索后再查看`,L7=({text:e,minHeight:t=240,compact:n=!1,action:r})=>(0,Q.jsxs)(`div`,{style:{width:`100%`,minHeight:n?void 0:t,height:n?`100%`:void 0,borderRadius:n?10:12,background:`#f8f9fc`,border:`1px dashed #cbd5e1`,color:`#64748b`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:n?4:10,textAlign:`center`},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`,fontSize:n?11:13},children:e}),r]}),R7=({label:e,value:t})=>(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:120},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:Bne(t)?`-`:t})]}),Hne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c]=(0,S.useState)(20),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(0),[h,g]=(0,S.useState)(null),[_,v]=(0,S.useState)(E7),[y,b]=(0,S.useState)(!1),x=(0,S.useRef)(null),[C,w]=(0,S.useState)(null),[T,E]=(0,S.useState)(null),D=(0,S.useCallback)(async()=>{a(!0);try{let e=await f5({userId:d.trim()||void 0,status:l||void 0,page:o,pageSize:c});t((e.items||[]).map(e=>({id:e.id,userId:e.userId,username:e.username,projectId:e.projectId,projectName:e.projectName,originalPrompt:e.originalPrompt,optimizedPrompt:e.optimizedPrompt,duration:e.duration,aspectRatio:e.aspectRatio,resolution:e.resolution,status:e.status,videoUrl:e.videoUrl,videoCoverUrl:e.videoCoverUrl,references:e.references,creditsCost:e.creditsCost||0,textCreditsCost:e.textCreditsCost||0,textTokensUsed:e.textTokensUsed||0,videoTokensUsed:e.videoTokensUsed||0,errorMessage:e.errorMessage,createdAt:e.createdAt,generatedAt:e.generatedAt,genType:e.genType,imageSize:e.imageSize,imageUrl:e.imageUrl,imageTokensUsed:e.imageTokensUsed||0,imageProportion:e.imageProportion,imagePx:e.imagePx}))),r(e.total||0)}catch{BG.error(`加载记录失败`)}finally{a(!1)}},[l,d,o,c]);(0,S.useEffect)(()=>{D()},[D,p]),(0,S.useEffect)(()=>{if(!h){v(E7);return}let e=(h.references||[]).reduce((e,t,n)=>{let r=P7(t);return e[F7(t,n)]=N7(r),e},{});x.current&&(x.current.pause(),x.current.currentTime=0),b(!1),v({image:N7(h.imageUrl),video:N7(h.videoUrl),videoCover:N7(h.videoCoverUrl),references:e})},[h]);let O=()=>{s(1),m(e=>e+1)},k=(0,S.useCallback)(e=>{g(e)},[]),A=()=>{x.current&&x.current.pause(),b(!1),g(null)},j=e=>{v(t=>({...t,...e}))},M=(e,t)=>{v(n=>({...n,references:{...n.references,[e]:t}}))},N=(e,t=`素材`)=>{if(!e){BG.warning(`${t}链接为空,暂无法查看`);return}if(k7(e)){BG.warning(`本地临时素材已失效,暂无法查看`);return}if(M7(e)){BG.warning(`${t}链接已超时,请刷新列表或重新搜索后再查看`);return}window.open(A7(e),`_blank`,`noopener,noreferrer`)},P=()=>{if(h?.videoUrl){if(M7(h.videoUrl)){j({video:`invalid`}),BG.warning(`视频链接已超时,请刷新列表或重新搜索后再查看`);return}b(!0),window.setTimeout(()=>{x.current?.play().catch(()=>{b(!1),j({video:`invalid`}),BG.warning(`视频播放失败,请确认资源链接是否仍然有效`)})},0)}},F=async(e,t,n)=>{w(e);try{await p5(e,t,n),BG.success(`状态已更新`),D()}catch(e){BG.error(e?.message||`更新失败`)}finally{w(null)}},I=async()=>{if(T){w(T.record.id);try{await m5(T.record.id,T.ratio,T.resolution,T.image_size),BG.success(`已提交${T.record.genType===`video`?`视频`:`图片`}生成`),E(null),D()}catch(e){BG.error(e?.message||`生成失败`)}finally{w(null)}}},L=(0,S.useMemo)(()=>[{title:`用户`,key:`user`,width:120,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:t.username||`未知用户`}),(0,Q.jsx)(`div`,{style:{fontSize:11,color:`#94a3b8`},children:zne(t.userId)})]})},{title:`项目`,dataIndex:`projectName`,width:120,ellipsis:!0,render:e=>(0,Q.jsx)(Z.Text,{style:{fontSize:13},children:e||`-`})},{title:`类型`,dataIndex:`genType`,width:90,ellipsis:!0,render:e=>{let t=O7[e]||{text:e||`-`,color:`default`,icon:null};return(0,Q.jsx)(IQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`提示词`,key:`prompt`,ellipsis:!0,render:(e,t)=>(0,Q.jsx)(Aw,{title:t.originalPrompt,placement:`topLeft`,children:(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#475569`},ellipsis:!0,children:t.originalPrompt||`-`})})},{title:`参数`,key:`params`,width:160,render:(e,t)=>t.genType===`video`?t.duration||t.aspectRatio||t.resolution?(0,Q.jsxs)(WV,{size:4,wrap:!0,children:[t.duration?(0,Q.jsxs)(IQ,{children:[t.duration,`s`]}):null,t.aspectRatio?(0,Q.jsx)(IQ,{children:t.aspectRatio}):null,t.resolution?(0,Q.jsx)(IQ,{children:t.resolution}):null]}):(0,Q.jsx)(IQ,{color:`default`,children:`待配置`}):t.imageSize||t.imageProportion||t.imagePx?(0,Q.jsxs)(WV,{size:4,wrap:!0,children:[t.imageSize?(0,Q.jsx)(IQ,{children:t.imageSize}):null,t.imageProportion?(0,Q.jsx)(IQ,{children:t.imageProportion}):null,t.imagePx?(0,Q.jsx)(IQ,{children:t.imagePx}):null]}):(0,Q.jsx)(IQ,{color:`default`,children:`待配置`})},{title:`积分`,key:`credits`,width:120,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12},children:[t.textCreditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#f59e0b`},children:[`文字: `,t.textCreditsCost]}):null,t.creditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#6366f1`},children:[t.genType===`video`?`视频`:`图片`,`: `,t.creditsCost]}):null,t.textCreditsCost===0&&t.creditsCost===0?(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`},children:`0`}):null]})},{title:`状态`,dataIndex:`status`,width:90,render:e=>{let t=D7[e]||{color:`default`,text:e||`-`,icon:null};return(0,Q.jsx)(IQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`时间`,key:`time`,width:150,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[(0,Q.jsx)(`div`,{children:j7(t.createdAt)}),t.generatedAt?(0,Q.jsxs)(`div`,{style:{color:`#10b981`},children:[`生成: `,j7(t.generatedAt)]}):null]})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(WV,{size:4,wrap:!0,children:[(0,Q.jsx)(YE,{size:`small`,icon:(0,Q.jsx)(XU,{}),onClick:()=>k(t),children:`详情`}),t.status===`generating`?(0,Q.jsx)(YE,{size:`small`,danger:!0,loading:C===t.id,onClick:()=>{UG.confirm({title:`确认操作`,icon:(0,Q.jsx)(h2,{}),content:`确定将此记录标记为失败?`,onOk:()=>F(t.id,`failed`)})},children:`标记失败`}):null,t.status===`failed`?(0,Q.jsx)(YE,{size:`small`,type:`primary`,danger:!0,loading:C===t.id,onClick:()=>E({record:t,ratio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`,image_size:t.imageSize||`2K`}),children:`重试生成`}):null,t.status===`prompt_optimized`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(YE,{size:`small`,type:`primary`,loading:C===t.id,onClick:()=>E({record:t,ratio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`,image_size:t.imageSize||`2K`}),style:{background:`#6366f1`,border:`none`},children:[`生成`,t.genType===`video`?`视频`:`图片`]}),(0,Q.jsx)(YE,{size:`small`,danger:!0,loading:C===t.id,onClick:()=>{UG.confirm({title:`确认操作`,icon:(0,Q.jsx)(h2,{}),content:`确定将此记录标记为失败?`,onOk:()=>F(t.id,`failed`)})},children:`标记失败`})]}):null]})}],[k,C]),R=h?O7[h.genType||``]||{text:h.genType||`-`,color:`default`,icon:null}:null,z=h?D7[h.status]||{color:`default`,text:h.status||`-`,icon:null}:null,B=()=>{if(!h||h.genType!==`image`||h.status!==`completed`)return null;if(!h.imageUrl)return(0,Q.jsx)(L7,{text:`此图片任务暂无结果图片`,minHeight:260});if(_.image===`invalid`)return(0,Q.jsx)(L7,{text:I7(h.imageUrl,`图片`),minHeight:260});let e=A7(h.imageUrl);return(0,Q.jsxs)(`div`,{title:`点击新页面查看图片`,onClick:()=>N(h.imageUrl,`生成图片`),style:{position:`relative`,width:`100%`,minHeight:260,borderRadius:12,background:`#f8f9fc`,border:`1px solid #e2e8f0`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[(0,Q.jsx)(`img`,{src:e,alt:`生成图片`,onLoad:()=>j({image:`valid`}),onError:()=>j({image:`invalid`}),style:{display:_.image===`valid`?`block`:`none`,width:`100%`,maxHeight:560,objectFit:`contain`,background:`#fff`}},`${h.id}-${e}`),_.image===`checking`?(0,Q.jsx)(L7,{text:`图片加载检测中...`,minHeight:260}):null]})},V=()=>{if(!h||y||_.video===`invalid`)return null;let e=h.videoUrl?(0,Q.jsx)(YE,{type:`primary`,shape:`circle`,size:`large`,icon:(0,Q.jsx)(J4,{}),onClick:P,style:{boxShadow:`0 8px 20px rgba(15,23,42,0.25)`}}):null;if(!h.videoCoverUrl)return(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,Q.jsx)(L7,{text:`此视频无封面`,minHeight:340,action:e})});if(_.videoCover===`invalid`)return(0,Q.jsx)(L7,{text:I7(h.videoCoverUrl,`视频封面`),minHeight:340,action:e});let t=A7(h.videoCoverUrl);return(0,Q.jsxs)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,border:`1px solid #e2e8f0`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:t,alt:`视频封面`,onLoad:()=>j({videoCover:`valid`}),onError:()=>j({videoCover:`invalid`}),style:{display:_.videoCover===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`}},`${h.id}-cover-${t}`),_.videoCover===`checking`?(0,Q.jsx)(L7,{text:`视频封面加载检测中...`,minHeight:340,action:e}):null,_.videoCover===`valid`?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(15,23,42,0.18)`},children:e}):null]})},H=()=>{if(!h||h.genType!==`video`||h.status!==`completed`)return null;if(!h.videoUrl)return(0,Q.jsx)(L7,{text:`此视频任务暂无结果视频`,minHeight:340});if(_.video===`invalid`)return(0,Q.jsx)(L7,{text:I7(h.videoUrl,`视频`),minHeight:340});let e=A7(h.videoUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:340,borderRadius:12,background:`#000`,overflow:`hidden`,border:`1px solid #e2e8f0`},children:[(0,Q.jsx)(`video`,{ref:x,src:e,preload:`metadata`,controls:y,onLoadedMetadata:()=>j({video:`valid`}),onCanPlay:()=>j({video:`valid`}),onPlaying:()=>{b(!0),j({video:`valid`})},onPause:()=>b(!1),onEnded:()=>b(!1),onError:()=>{b(!1),j({video:`invalid`})},style:{width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`,opacity:+!!y,pointerEvents:y?`auto`:`none`}},`${h.id}-${e}`),V()]})},U=(e,t)=>{let n=P7(e),r=Vne(e),i=F7(e,t),a=_.references[i]||N7(n),o=r===`image`,s=r===`video`,c=typeof e.name==`string`&&e.name?e.name:`参考素材 ${t+1}`;if(!n)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(L7,{text:`无链接`,compact:!0})}),(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})]},i);if(a===`invalid`)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(L7,{text:k7(n)?`本地临时素材已失效`:`素材不可访问`,compact:!0})}),(0,Q.jsx)(Aw,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i);let l=A7(n);return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsxs)(`div`,{role:`button`,tabIndex:0,title:`点击新页面查看素材`,onClick:()=>N(n,s?`视频素材`:o?`图片素材`:`素材`),onKeyDown:e=>{e.key===`Enter`&&N(n,s?`视频素材`:o?`图片素材`:`素材`)},style:{width:94,height:94,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,background:`#f8f9fc`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[o?(0,Q.jsx)(`img`,{src:l,alt:c,onLoad:()=>M(i,`valid`),onError:()=>M(i,`invalid`),style:{display:a===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`cover`}}):null,s?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`video`,{src:l,preload:`metadata`,onLoadedMetadata:()=>M(i,`valid`),onError:()=>M(i,`invalid`),style:{display:`none`}}),(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[(0,Q.jsx)(J4,{style:{fontSize:18}}),(0,Q.jsx)(`div`,{children:`视频素材`}),(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]})]}):null,!o&&!s?(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[`文件素材`,(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]}):null,a===`checking`&&o?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8f9fc`},children:(0,Q.jsx)(xm,{style:{color:`#6366f1`}})}):null]}),(0,Q.jsx)(Aw,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i)};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(A6,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`生成记录管理`}),(0,Q.jsxs)(IQ,{color:`purple`,children:[n,` 条记录`]})]}),(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(BC,{placeholder:`状态筛选`,allowClear:!0,style:{width:120},value:l||void 0,onChange:e=>{u(e||``),s(1)},options:[{value:`optimizing`,label:`优化中`},{value:`prompt_optimized`,label:`待生成`},{value:`generating`,label:`生成中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`}]}),(0,Q.jsx)(vW,{placeholder:`用户ID搜索`,prefix:(0,Q.jsx)(FC,{style:{color:`#94a3b8`}}),style:{width:200},value:d,onChange:e=>f(e.target.value),onPressEnter:O,allowClear:!0}),(0,Q.jsx)(YE,{type:`primary`,onClick:O,style:{borderRadius:8},children:`搜索`})]})]}),(0,Q.jsx)(CQ,{columns:L,dataSource:e,rowKey:`id`,loading:i,scroll:{x:1120},pagination:{current:o,pageSize:c,total:n,onChange:s,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`}})]}),(0,Q.jsx)(UG,{title:(0,Q.jsxs)(WV,{children:[h?.genType===`video`?(0,Q.jsx)(A6,{}):(0,Q.jsx)(x2,{}),(0,Q.jsx)(`span`,{children:`生成记录详情`})]}),open:!!h,onCancel:A,footer:null,width:900,destroyOnClose:!0,children:h?(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,flexWrap:`wrap`},children:[(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`用户`}),(0,Q.jsx)(Z.Text,{strong:!0,children:h.username||`-`})]}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`项目`}),(0,Q.jsx)(Z.Text,{strong:!0,children:h.projectName||`-`})]}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`类型 / 状态`}),(0,Q.jsxs)(WV,{size:4,wrap:!0,children:[R?(0,Q.jsx)(IQ,{color:R.color,icon:R.icon,children:R.text}):null,z?(0,Q.jsx)(IQ,{color:z.color,icon:z.icon,children:z.text}):null]})]})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,Q.jsx)(Z.Text,{style:{fontSize:13,color:`#475569`,lineHeight:1.7},children:h.originalPrompt||`-`})})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`优化后提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`},children:(0,Q.jsx)(Z.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:h.optimizedPrompt||`-`})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(R7,{label:`文字积分`,value:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#f59e0b`},children:h.textCreditsCost||0}),(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.textTokensUsed||0,` tokens)`]})]})}),(0,Q.jsx)(R7,{label:`${h.genType===`image`?`图片`:`视频`}积分`,value:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:h.creditsCost||0}),h.genType===`video`&&h.videoTokensUsed?(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.videoTokensUsed,` tokens)`]}):null,h.genType===`image`&&h.imageTokensUsed?(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.imageTokensUsed,` tokens)`]}):null]})}),(0,Q.jsx)(R7,{label:`总积分`,value:(h.textCreditsCost||0)+(h.creditsCost||0)})]}),h.genType===`video`?h.duration||h.aspectRatio||h.resolution?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(R7,{label:`时长`,value:h.duration?`${h.duration}秒`:`-`}),(0,Q.jsx)(R7,{label:`比例`,value:h.aspectRatio||`-`}),(0,Q.jsx)(R7,{label:`分辨率`,value:h.resolution||`-`})]}):(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,textAlign:`center`},children:(0,Q.jsx)(IQ,{color:`default`,children:`视频参数待用户配置`})}):null,h.genType===`image`?h.imageSize||h.imageProportion||h.imagePx?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(R7,{label:`尺寸`,value:h.imagePx||`-`}),(0,Q.jsx)(R7,{label:`比例`,value:h.imageProportion||`-`}),(0,Q.jsx)(R7,{label:`分辨率`,value:h.imageSize||`-`})]}):(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,textAlign:`center`},children:(0,Q.jsx)(IQ,{color:`default`,children:`图片参数待用户配置`})}):null,!h?.references||h.references.length===0?null:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`参考内容`}),(0,Q.jsx)(`div`,{style:{display:`flex`,gap:10,flexWrap:`wrap`},children:h.references.map((e,t)=>U(e,t))})]}),h.status===`completed`?(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:h.genType===`video`?`生成视频`:`生成图片`}),h.genType===`video`?H():B()]}):null,h.status===`failed`&&h.errorMessage?(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(239,68,68,0.04)`,border:`1px solid rgba(239,68,68,0.15)`},children:(0,Q.jsxs)(Z.Text,{style:{fontSize:12,color:`#ef4444`},children:[`错误信息: `,h.errorMessage]})}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,fontSize:12,color:`#94a3b8`,flexWrap:`wrap`},children:[(0,Q.jsxs)(`span`,{children:[`创建: `,j7(h.createdAt)]}),(0,Q.jsxs)(`span`,{children:[`生成: `,j7(h.generatedAt)]})]})]}):(0,Q.jsx)(hC,{description:`暂无详情`})}),(0,Q.jsx)(UG,{title:(0,Q.jsxs)(WV,{children:[T&&(T.record.genType===`video`?(0,Q.jsx)(J4,{}):(0,Q.jsx)(x2,{})),T&&(T.record.genType===`video`?`生成视频`:`生成图片`)]}),open:!!T,onCancel:()=>E(null),onOk:I,okText:`提交生成`,cancelText:`取消`,confirmLoading:T?C===T.record.id:!1,width:420,children:T?(0,Q.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:T.record.genType===`video`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`时长`}),(0,Q.jsxs)(Z.Text,{strong:!0,children:[T.record.duration||5,`s`]})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`画面比例`}),(0,Q.jsx)(BC,{value:T.ratio,onChange:e=>E(t=>t?{...t,ratio:e}:null),style:{width:`100%`},options:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`].map(e=>({value:e,label:e}))})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`分辨率`}),(0,Q.jsx)(BC,{value:T.resolution,onChange:e=>E(t=>t?{...t,resolution:e}:null),style:{width:`100%`},options:[`480p`,`720p`,`1080p`].map(e=>({value:e,label:e}))})]})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`尺寸`}),(0,Q.jsx)(Z.Text,{strong:!0,children:T.record.imagePx||`-`})]}),(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`比例`}),(0,Q.jsx)(Z.Text,{strong:!0,children:T.record.imageProportion||`-`})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`分辨率`}),(0,Q.jsx)(BC,{value:T.image_size,onChange:e=>E(t=>t?{...t,image_size:e}:null),style:{width:`100%`},options:[`2K`,`4K`].map(e=>({value:e,label:e}))})]})]})}):null})]})},z7=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),B7=20,V7={image:`empty`,video:`empty`,videoCover:`empty`,references:{}},H7={pending:{color:`default`,text:`待处理`,icon:(0,Q.jsx)(GB,{})},generating:{color:`warning`,text:`生成中`,icon:(0,Q.jsx)(xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,Q.jsx)(I0,{})},failed:{color:`error`,text:`失败`,icon:(0,Q.jsx)(z0,{})}},U7={timeout:`任务超时`,queued:`已入队`,preparing:`准备中`,creating_provider_task:`创建任务中`,waiting_remote:`等待生成`,result_ready:`结果就绪`,downloading:`下载中`,done:`完成`,download_failed:`下载失败`,polling:`轮询中`,failed:`失败`},W7={image:{text:`图片`,color:`purple`,icon:(0,Q.jsx)(x2,{})},video:{text:`视频`,color:`geekblue`,icon:(0,Q.jsx)(A6,{})}},Une=e=>/^(https?:)?\/\//i.test(e)||/^(blob|data):/i.test(e),G7=e=>!!e&&/^blob:/i.test(e.trim()),K7=e=>{if(!e)return``;let t=String(e).trim();return t?Une(t)?t:z7?`${z7}${t.startsWith(`/`)?t:`/${t}`}`:t.startsWith(`/`)?t:`/${t}`:``},Wne=e=>e?e.length>12?`${e.slice(0,8)}...`:e:`-`,q7=e=>e?Z5(e):`-`,Gne=e=>e==null||e===``,J7=e=>{if(!e||G7(e))return!1;try{let t=new URL(K7(e),window.location.origin),n=t.searchParams.get(`exp`)||t.searchParams.get(`expires`)||t.searchParams.get(`expire`)||t.searchParams.get(`expires_at`)||t.searchParams.get(`x-expires`);if(!n)return!1;let r=Number(n);if(!Number.isFinite(r))return!1;let i=r>1e10?r:r*1e3;return Date.now()>=i}catch{return!1}},Y7=e=>e?G7(e)||J7(e)?`invalid`:`checking`:`empty`,X7=e=>{let t=e.url||e.mediaUrl||e.fileUrl;return typeof t==`string`&&t.trim()?t.trim():void 0},Kne=e=>{let t=String(e.type||e.mediaType||e.mimeType||``).toLowerCase(),n=X7(e)?.toLowerCase()||``;return t.includes(`video`)||/\.(mp4|mov|webm|m4v)(\?|$)/i.test(n)?`video`:t.includes(`image`)||/\.(png|jpe?g|webp|gif|bmp|svg)(\?|$)/i.test(n)?`image`:t||`unknown`},Z7=(e,t)=>`${t}-${X7(e)||`empty`}`,Q7=(e,t=`资源`)=>G7(e)?`本地临时素材已失效`:J7(e)?`${t}链接已超时,请刷新列表或重新搜索后再查看`:`${t}加载失败,请刷新列表或重新搜索后再查看`,$7=({text:e,minHeight:t=240,compact:n=!1,action:r})=>(0,Q.jsxs)(`div`,{style:{width:`100%`,minHeight:n?void 0:t,height:n?`100%`:void 0,borderRadius:n?10:12,background:`#f8f9fc`,border:`1px dashed #cbd5e1`,color:`#64748b`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:n?4:10,textAlign:`center`},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`,fontSize:n?11:13},children:e}),r]}),e9=({label:e,value:t})=>(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:120},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:Gne(t)?`-`:t})]}),qne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(``),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)(``),[m,h]=(0,S.useState)(``),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(0),[C,w]=(0,S.useState)(null),[T,E]=(0,S.useState)(V7),[D,O]=(0,S.useState)(!1),k=(0,S.useRef)(null),A=(0,S.useCallback)(async()=>{a(!0);try{let e=await g5({genType:u||void 0,status:c||void 0,userId:g||void 0,userName:v||void 0,page:o,pageSize:B7});t(e.items||[]),r(e.total||0)}catch(e){BG.error(e?.message||`加载创作记录失败`)}finally{a(!1)}},[u,c,o,g,v]);(0,S.useEffect)(()=>{A()},[A,b]),(0,S.useEffect)(()=>{if(!C){E(V7);return}let e=(C.mediaReferences||[]).reduce((e,t,n)=>{let r=X7(t);return e[Z7(t,n)]=Y7(r),e},{});k.current&&(k.current.pause(),k.current.currentTime=0),O(!1),E({image:Y7(C.imageUrl),video:Y7(C.videoUrl),videoCover:Y7(C.videoCoverUrl),references:e})},[C]);let j=()=>{s(1),_(f.trim()),y(m.trim()),x(e=>e+1)},M=(0,S.useCallback)(e=>{w(e)},[]),N=()=>{k.current&&k.current.pause(),O(!1),w(null)},P=e=>{E(t=>({...t,...e}))},F=(e,t)=>{E(n=>({...n,references:{...n.references,[e]:t}}))},I=()=>{if(C?.videoUrl){if(J7(C.videoUrl)){P({video:`invalid`}),BG.warning(`视频链接已超时,请刷新列表或重新搜索后再查看`);return}O(!0),window.setTimeout(()=>{k.current?.play().catch(()=>{O(!1),P({video:`invalid`}),BG.warning(`视频播放失败,请确认资源链接是否仍然有效`)})},0)}},L=(e,t=`素材`)=>{if(!e){BG.warning(`${t}链接为空,暂无法查看`);return}if(G7(e)){BG.warning(`本地临时素材已失效,暂无法查看`);return}if(J7(e)){BG.warning(`${t}链接已超时,请刷新列表或重新搜索后再查看`);return}window.open(K7(e),`_blank`,`noopener,noreferrer`)},R=(0,S.useMemo)(()=>[{title:`用户`,key:`user`,width:150,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:t.userName||`未知用户`}),(0,Q.jsx)(`div`,{style:{fontSize:11,color:`#94a3b8`},children:Wne(t.userId)})]})},{title:`类型`,dataIndex:`genType`,width:90,render:e=>{let t=W7[e]||{text:e||`-`,color:`default`,icon:null};return(0,Q.jsx)(IQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`提示词`,key:`prompt`,ellipsis:!0,render:(e,t)=>(0,Q.jsx)(Aw,{title:t.originalPrompt,placement:`topLeft`,children:(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#475569`},ellipsis:!0,children:t.originalPrompt||`-`})})},{title:`参数`,key:`params`,width:180,render:(e,t)=>t.genType===`video`?t.duration||t.aspectRatio||t.resolution?(0,Q.jsxs)(WV,{size:4,wrap:!0,children:[t.duration?(0,Q.jsxs)(IQ,{children:[t.duration,`s`]}):null,t.aspectRatio?(0,Q.jsx)(IQ,{children:t.aspectRatio}):null,t.resolution?(0,Q.jsx)(IQ,{children:t.resolution}):null]}):(0,Q.jsx)(IQ,{color:`default`,children:`无参数`}):t.imageSize||t.imageProportion||t.imagePx?(0,Q.jsxs)(WV,{size:4,wrap:!0,children:[t.imageSize?(0,Q.jsx)(IQ,{children:t.imageSize}):null,t.imageProportion?(0,Q.jsx)(IQ,{children:t.imageProportion}):null,t.imagePx?(0,Q.jsx)(IQ,{children:t.imagePx}):null]}):(0,Q.jsx)(IQ,{color:`default`,children:`无参数`})},{title:`积分`,key:`credits`,width:130,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12},children:[(0,Q.jsxs)(`div`,{style:{color:`#6366f1`},children:[`总: `,t.creditsCost||0]}),t.textCreditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#f59e0b`},children:[`文字: `,t.textCreditsCost]}):null]})},{title:`状态`,dataIndex:`status`,width:100,render:e=>{let t=H7[e]||{color:`default`,text:e||`-`,icon:null};return(0,Q.jsx)(IQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`阶段`,dataIndex:`pipelineStage`,width:120,render:e=>(0,Q.jsx)(IQ,{color:`blue`,children:U7[e]||e||`-`})},{title:`时间`,key:`time`,width:170,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[(0,Q.jsx)(`div`,{children:q7(t.createdAt)}),t.generatedAt?(0,Q.jsxs)(`div`,{style:{color:`#10b981`},children:[`生成: `,q7(t.generatedAt)]}):null]})},{title:`操作`,key:`action`,width:90,fixed:`right`,render:(e,t)=>(0,Q.jsx)(YE,{size:`small`,icon:(0,Q.jsx)(XU,{}),onClick:()=>M(t),children:`详情`})}],[M]),z=C?W7[C.genType]||{text:C.genType||`-`,color:`default`,icon:null}:null,B=C?H7[C.status]||{color:`default`,text:C.status||`-`,icon:null}:null,V=()=>{if(!C||C.genType!==`image`||C.status!==`completed`)return null;if(!C.imageUrl)return(0,Q.jsx)($7,{text:`此图片任务暂无结果图片`,minHeight:260});if(T.image===`invalid`)return(0,Q.jsx)($7,{text:Q7(C.imageUrl,`图片`),minHeight:260});let e=K7(C.imageUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,minHeight:260,borderRadius:12,background:`#f8f9fc`,border:`1px solid #e2e8f0`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:e,alt:`生成图片`,onLoad:()=>P({image:`valid`}),onError:()=>P({image:`invalid`}),style:{display:T.image===`valid`?`block`:`none`,width:`100%`,maxHeight:560,objectFit:`contain`,background:`#fff`}},`${C.id}-${e}`),T.image===`checking`?(0,Q.jsx)($7,{text:`图片加载检测中...`,minHeight:260}):null]})},H=()=>{if(!C||D||T.video===`invalid`)return null;let e=C.videoUrl?(0,Q.jsx)(YE,{type:`primary`,shape:`circle`,size:`large`,icon:(0,Q.jsx)(J4,{}),onClick:I,style:{boxShadow:`0 8px 20px rgba(15,23,42,0.25)`}}):null;if(!C.videoCoverUrl)return(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,Q.jsx)($7,{text:`此视频无封面`,minHeight:340,action:e})});if(T.videoCover===`invalid`)return(0,Q.jsx)($7,{text:Q7(C.videoCoverUrl,`视频封面`),minHeight:340,action:e});let t=K7(C.videoCoverUrl);return(0,Q.jsxs)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,border:`1px solid #e2e8f0`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:t,alt:`视频封面`,onLoad:()=>P({videoCover:`valid`}),onError:()=>P({videoCover:`invalid`}),style:{display:T.videoCover===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`}},`${C.id}-cover-${t}`),T.videoCover===`checking`?(0,Q.jsx)($7,{text:`视频封面加载检测中...`,minHeight:340,action:e}):null,T.videoCover===`valid`?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(15,23,42,0.18)`},children:e}):null]})},U=()=>{if(!C||C.genType!==`video`||C.status!==`completed`)return null;if(!C.videoUrl)return(0,Q.jsx)($7,{text:`此视频任务暂无结果视频`,minHeight:340});if(T.video===`invalid`)return(0,Q.jsx)($7,{text:Q7(C.videoUrl,`视频`),minHeight:340});let e=K7(C.videoUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:340,borderRadius:12,background:`#000`,overflow:`hidden`,border:`1px solid #e2e8f0`},children:[(0,Q.jsx)(`video`,{ref:k,src:e,preload:`metadata`,controls:D,onLoadedMetadata:()=>P({video:`valid`}),onCanPlay:()=>P({video:`valid`}),onPlaying:()=>{O(!0),P({video:`valid`})},onPause:()=>O(!1),onEnded:()=>O(!1),onError:()=>{O(!1),P({video:`invalid`})},style:{width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`,opacity:+!!D,pointerEvents:D?`auto`:`none`}},`${C.id}-${e}`),H()]})},W=(e,t)=>{let n=X7(e),r=Kne(e),i=Z7(e,t),a=T.references[i]||Y7(n),o=r===`image`,s=r===`video`,c=typeof e.name==`string`&&e.name?e.name:`参考素材 ${t+1}`;if(!n)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)($7,{text:`无链接`,compact:!0})}),(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})]},i);if(a===`invalid`)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)($7,{text:G7(n)?`本地临时素材已失效`:`素材不可访问`,compact:!0})}),(0,Q.jsx)(Aw,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i);let l=K7(n);return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsxs)(`div`,{role:`button`,tabIndex:0,title:`点击新页面查看素材`,onClick:()=>L(n,s?`视频素材`:o?`图片素材`:`素材`),onKeyDown:e=>{e.key===`Enter`&&L(n,s?`视频素材`:o?`图片素材`:`素材`)},style:{width:94,height:94,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,background:`#f8f9fc`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[o?(0,Q.jsx)(`img`,{src:l,alt:c,onLoad:()=>F(i,`valid`),onError:()=>F(i,`invalid`),style:{display:a===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`cover`}}):null,s?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`video`,{src:l,preload:`metadata`,onLoadedMetadata:()=>F(i,`valid`),onError:()=>F(i,`invalid`),style:{display:`none`}}),(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[(0,Q.jsx)(J4,{style:{fontSize:18}}),(0,Q.jsx)(`div`,{children:`视频素材`}),(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]})]}):null,!o&&!s?(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[`文件素材`,(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]}):null,a===`checking`&&o?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8f9fc`},children:(0,Q.jsx)(xm,{style:{color:`#6366f1`}})}):null]}),(0,Q.jsx)(Aw,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i)};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(LR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(J4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`创作记录管理`}),(0,Q.jsxs)(IQ,{color:`purple`,children:[n,` 条记录`]})]}),(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(BC,{allowClear:!0,placeholder:`状态筛选`,value:c||void 0,style:{width:140},onChange:e=>{l(e||``),s(1)},options:[{value:`generating`,label:`生成中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`}]}),(0,Q.jsx)(BC,{allowClear:!0,placeholder:`类型筛选`,value:u||void 0,style:{width:120},onChange:e=>{d(e||``),s(1)},options:[{value:`image`,label:`图片`},{value:`video`,label:`视频`}]}),(0,Q.jsx)(vW,{placeholder:`用户ID搜索`,prefix:(0,Q.jsx)(FC,{style:{color:`#94a3b8`}}),style:{width:180},value:f,onChange:e=>p(e.target.value),onPressEnter:j,allowClear:!0}),(0,Q.jsx)(vW,{placeholder:`用户名搜索`,prefix:(0,Q.jsx)(FC,{style:{color:`#94a3b8`}}),style:{width:160},value:m,onChange:e=>h(e.target.value),onPressEnter:j,allowClear:!0}),(0,Q.jsx)(YE,{type:`primary`,onClick:j,style:{borderRadius:8},children:`搜索`})]})]}),(0,Q.jsx)(CQ,{rowKey:`id`,loading:i,columns:R,dataSource:e,scroll:{x:1180},pagination:{current:o,pageSize:B7,total:n,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:e=>s(e)}})]}),(0,Q.jsx)(UG,{title:(0,Q.jsxs)(WV,{children:[C?.genType===`video`?(0,Q.jsx)(A6,{}):(0,Q.jsx)(x2,{}),(0,Q.jsx)(`span`,{children:`创作记录详情`})]}),open:!!C,onCancel:N,footer:null,width:900,destroyOnClose:!0,children:C?(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:12},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12,flexWrap:`wrap`},children:[z?(0,Q.jsx)(IQ,{color:z.color,icon:z.icon,children:z.text}):null,B?(0,Q.jsx)(IQ,{color:B.color,icon:B.icon,children:B.text}):null,C.pipelineStage?(0,Q.jsx)(IQ,{color:`blue`,children:U7[C.pipelineStage]||C.pipelineStage}):null]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(e9,{label:`用户名称`,value:C.userName||`未知用户`}),(0,Q.jsx)(e9,{label:`用户ID`,value:C.userId||`-`}),(0,Q.jsx)(e9,{label:`任务ID`,value:C.id})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,lineHeight:1.6},children:C.originalPrompt||`-`})]}),C.genType===`video`?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(e9,{label:`时长`,value:C.duration?`${C.duration}秒`:`-`}),(0,Q.jsx)(e9,{label:`画面比例`,value:C.aspectRatio||`-`}),(0,Q.jsx)(e9,{label:`分辨率`,value:C.resolution||`-`})]}):(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(e9,{label:`图片档位`,value:C.imageSize||`-`}),(0,Q.jsx)(e9,{label:`图片比例`,value:C.imageProportion||`-`}),(0,Q.jsx)(e9,{label:`像素尺寸`,value:C.imagePx||`-`})]}),C.engineSnapshot?(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`引擎快照`}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,flexWrap:`wrap`},children:[(0,Q.jsx)(e9,{label:`引擎名称`,value:C.engineSnapshot.name||`-`}),(0,Q.jsx)(e9,{label:`服务商`,value:C.engineSnapshot.provider||`-`}),(0,Q.jsx)(e9,{label:`模型`,value:C.engineSnapshot.modelName||`-`}),(0,Q.jsx)(e9,{label:`引擎ID`,value:C.engineSnapshot.id||C.engineId||`-`})]})]}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(e9,{label:`总积分`,value:(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:C.creditsCost||0})}),(0,Q.jsx)(e9,{label:`文字积分`,value:`${C.textCreditsCost||0} (${C.textTokensUsed||0} tokens)`}),(0,Q.jsx)(e9,{label:`图片 tokens`,value:C.imageTokensUsed??0}),(0,Q.jsx)(e9,{label:`视频 tokens`,value:C.videoTokensUsed??0})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(e9,{label:`第三方任务ID`,value:C.providerTaskId||C.seedanceTaskId||`-`}),(0,Q.jsx)(e9,{label:`轮询次数`,value:C.pollCount??0}),(0,Q.jsx)(e9,{label:`重试次数`,value:C.retryCount??0})]}),!C?.mediaReferences||C.mediaReferences.length===0?null:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`参考内容`}),(0,Q.jsx)(`div`,{style:{display:`flex`,gap:10,flexWrap:`wrap`},children:C.mediaReferences.map((e,t)=>W(e,t))})]}),C.status===`completed`?(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:C.genType===`video`?`生成视频`:`生成图片`}),C.genType===`video`?U():V()]}):null,C.status===`failed`&&C.errorMessage?(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(239,68,68,0.04)`,border:`1px solid rgba(239,68,68,0.15)`},children:(0,Q.jsxs)(Z.Text,{style:{fontSize:12,color:`#ef4444`},children:[`错误信息: `,C.errorMessage]})}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,fontSize:12,color:`#94a3b8`,flexWrap:`wrap`},children:[(0,Q.jsxs)(`span`,{children:[`创建: `,q7(C.createdAt)]}),(0,Q.jsxs)(`span`,{children:[`生成: `,q7(C.generatedAt)]})]})]}):(0,Q.jsx)(hC,{description:`暂无详情`})})]})},t9=20,Jne=[{value:`pending`,label:`已创建`},{value:`waiting_user`,label:`等待用户操作`},{value:`processing`,label:`处理中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`},{value:`cancelled`,label:`已取消`}],Yne={pending:{color:`default`,text:`已创建`},waiting_user:{color:`processing`,text:`等待用户操作`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`已完成`},failed:{color:`error`,text:`失败`},cancelled:{color:`default`,text:`已取消`}},Xne={material_input:`素材输入`,image_prompt_optimize:`图片 AI 提词`,image_generate:`图片生成`,video_prompt_optimize:`视频 AI 提词`,video_generate:`视频生成`},n9=e=>e?Z5(e):`-`,r9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,Zne=({status:e})=>{if(!e)return(0,Q.jsx)(IQ,{children:`-`});let t=Yne[e]||{color:`blue`,text:e};return(0,Q.jsx)(IQ,{color:t.color,children:t.text})},Qne=()=>{let e=Ye(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(1),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(``),[h,g]=(0,S.useState)(``),[_,v]=(0,S.useState)(null),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(``),[w,T]=(0,S.useState)(``),[E,D]=(0,S.useState)(null),[O,k]=(0,S.useState)(0),A=(0,S.useCallback)(async()=>{o(!0);try{let e=await v5({status:l||void 0,keyword:y||void 0,userId:x||void 0,userName:w||void 0,createdStart:E?.[0]?.toISOString?.(),createdEnd:E?.[1]?.toISOString?.(),page:s,pageSize:t9});n(e.items||[]),i(e.total||0)}catch(e){BG.error(e?.message||`加载爆款开头复刻任务失败`)}finally{o(!1)}},[s,E,y,x,w,l]);(0,S.useEffect)(()=>{A()},[A,O]);let j=()=>{b(d.trim()),C(p.trim()),T(h.trim()),D(_),c(1)};return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsx)(LR,{children:(0,Q.jsxs)(WV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(WV,{align:`center`,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:3,style:{marginBottom:4},children:`爆款开头复刻`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`只读排查页面:查看任务列表、素材、步骤详情和生成结果。`})]}),(0,Q.jsx)(YE,{icon:(0,Q.jsx)(kK,{}),onClick:()=>k(e=>e+1),children:`刷新`})]}),(0,Q.jsxs)(WV,{wrap:!0,children:[(0,Q.jsx)(BC,{allowClear:!0,placeholder:`任务状态`,style:{width:160},value:l||void 0,onChange:e=>{u(e||``),c(1)},options:Jne}),(0,Q.jsx)(vW,{allowClear:!0,prefix:(0,Q.jsx)(FC,{}),placeholder:`关键词:标题/项目名/核心点`,style:{width:260},value:d,onChange:e=>f(e.target.value),onPressEnter:j}),(0,Q.jsx)(vW,{allowClear:!0,placeholder:`用户ID(管理员)`,style:{width:190},value:p,onChange:e=>m(e.target.value),onPressEnter:j}),(0,Q.jsx)(vW,{allowClear:!0,placeholder:`用户名(管理员)`,style:{width:230},value:h,onChange:e=>g(e.target.value),onPressEnter:j}),(0,Q.jsx)(QB.RangePicker,{showTime:!0,value:_,onChange:v,placeholder:[`创建开始`,`创建结束`]}),(0,Q.jsx)(YE,{type:`primary`,icon:(0,Q.jsx)(FC,{}),onClick:j,children:`搜索`}),(0,Q.jsx)(YE,{onClick:()=>{u(``),f(``),m(``),g(``),v(null),b(``),C(``),T(``),D(null),c(1),k(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(CQ,{rowKey:`id`,loading:a,dataSource:t,pagination:{current:s,pageSize:t9,total:r,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:c},scroll:{x:1380},columns:[{title:`项目ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Aw,{title:e,children:r9(e)})},{title:`用户`,width:180,render:(e,t)=>(0,Q.jsxs)(WV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(Z.Text,{children:t.userName||`-`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:r9(t.userId)})]})},{title:`项目信息`,width:260,render:(e,t)=>(0,Q.jsxs)(WV,{direction:`vertical`,size:2,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.title||t.targetProjectName||`-`}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:240},children:[`素材:`,t.sourceProjectName||`-`]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:240},children:[`核心:`,t.coreContentPoint||`-`]})]})},{title:`状态`,dataIndex:`status`,width:130,render:e=>(0,Q.jsx)(Zne,{status:e})},{title:`当前步骤`,dataIndex:`currentStepCode`,width:140,render:e=>Xne[e]||e||`-`},{title:`图片结果`,dataIndex:`finalImageUrl`,width:90,render:e=>e?(0,Q.jsx)(IQ,{color:`success`,children:`有`}):(0,Q.jsx)(IQ,{children:`无`})},{title:`视频结果`,dataIndex:`finalVideoUrl`,width:90,render:e=>e?(0,Q.jsx)(IQ,{color:`success`,children:`有`}):(0,Q.jsx)(IQ,{children:`无`})},{title:`错误信息`,dataIndex:`errorMessage`,width:220,ellipsis:!0,render:e=>e||`-`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:n9},{title:`更新时间`,dataIndex:`updatedAt`,width:170,render:n9},{title:`操作`,fixed:`right`,width:110,render:(t,n)=>(0,Q.jsx)(YE,{type:`link`,icon:(0,Q.jsx)(XU,{}),onClick:()=>e(`/hot-opening-replications/${n.id}`),children:`详情`})}]})]})})})},i9=({value:e,maxHeight:t=420})=>e==null||e===``?(0,Q.jsx)(hC,{image:hC.PRESENTED_IMAGE_SIMPLE,description:`暂无 JSON 数据`}):(0,Q.jsx)(`pre`,{style:{margin:0,padding:12,maxHeight:t,overflow:`auto`,background:`#0f172a`,color:`#e2e8f0`,borderRadius:8,fontSize:12,lineHeight:1.6},children:JSON.stringify(e,null,2)}),$ne=({input:e,output:t,raw:n,inputLabel:r=`查看 input_json`,outputLabel:i=`查看 output_json`,rawLabel:a=`查看原始 JSON`})=>{let o=[];return e!==void 0&&o.push({key:`input`,label:r,children:(0,Q.jsx)(i9,{value:e})}),t!==void 0&&o.push({key:`output`,label:i,children:(0,Q.jsx)(i9,{value:t})}),n!==void 0&&o.push({key:`raw`,label:a,children:(0,Q.jsx)(i9,{value:n})}),o.length?(0,Q.jsx)(Ng,{size:`small`,style:{marginTop:12},items:o}):null},ere=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``);function tre(e){if(!e)return``;let t=String(e).trim();return t?/^(https?:)?\/\//i.test(t)||/^(blob|data):/i.test(t)?t:`${ere}${t.startsWith(`/`)?t:`/${t}`}`:``}var a9=({url:e,type:t,height:n=260,emptyDescription:r=`暂无资源`,errorDescription:i=`资源加载失败,可能文件不存在、签名过期或访问权限受限。`})=>{let a=(0,S.useMemo)(()=>tre(e),[e]),[o,s]=(0,S.useState)(!1);(0,S.useEffect)(()=>{s(!1)},[a]);let c=a?(0,Q.jsxs)(WV,{wrap:!0,style:{marginTop:8},children:[(0,Q.jsx)(YE,{size:`small`,icon:(0,Q.jsx)(d$,{}),onClick:async()=>{if(a)try{await navigator.clipboard.writeText(a),BG.success(`资源地址已复制`)}catch{BG.error(`复制失败,请手动复制`)}},children:`复制地址`}),(0,Q.jsx)(YE,{size:`small`,icon:(0,Q.jsx)(l4,{}),onClick:()=>window.open(a,`_blank`,`noopener,noreferrer`),children:`新窗口打开`}),(0,Q.jsx)(Z.Text,{copyable:{text:a},type:`secondary`,style:{maxWidth:460},ellipsis:!0,children:a})]}):null;return a?(0,Q.jsxs)(`div`,{children:[o?(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`资源预览失败`,description:i,style:{marginBottom:8}}):null,t===`image`?(0,Q.jsx)(LU,{src:a,onError:()=>s(!0),style:{width:`100%`,maxHeight:n,objectFit:`contain`,borderRadius:12,background:`#f8fafc`,border:`1px solid #f1f5f9`},fallback:``,preview:!o}):(0,Q.jsx)(`video`,{src:a,controls:!0,preload:`metadata`,onError:()=>s(!0),style:{width:`100%`,maxHeight:n,borderRadius:12,background:`#0f172a`,border:`1px solid #f1f5f9`}}),c]}):(0,Q.jsx)(`div`,{children:(0,Q.jsx)(`div`,{style:{height:n,borderRadius:12,border:`1px dashed #cbd5e1`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8fafc`},children:(0,Q.jsx)(hC,{image:hC.PRESENTED_IMAGE_SIMPLE,description:r})})})},o9={pending:{text:`待处理`,color:`default`},waiting_user:{text:`等待用户操作`,color:`processing`},processing:{text:`处理中`,color:`warning`},completed:{text:`已完成`,color:`success`},failed:{text:`失败`,color:`error`},cancelled:{text:`已取消`,color:`default`},canceled:{text:`已取消`,color:`default`},timeout:{text:`已超时`,color:`error`},queued:{text:`已入队`,color:`processing`},preparing:{text:`准备中`,color:`processing`},creating_provider_task:{text:`创建远端任务`,color:`processing`},waiting_remote:{text:`等待远端结果`,color:`processing`},polling:{text:`轮询远端结果`,color:`processing`},result_ready:{text:`结果已就绪`,color:`success`},downloading:{text:`下载中`,color:`processing`},done:{text:`已完成`,color:`success`},download_failed:{text:`下载失败`,color:`error`},retry_waiting:{text:`等待重试`,color:`orange`},pending_analysis:{text:`等待分析`,color:`default`},analyzing:{text:`分析中`,color:`processing`},analysis_completed:{text:`分析完成`,color:`success`},analysis_failed:{text:`分析失败`,color:`error`},splitting:{text:`拆镜中`,color:`warning`},split_completed:{text:`拆镜完成`,color:`success`},partial_failed:{text:`部分失败`,color:`orange`},none:{text:`未拆镜`,color:`default`},not_required:{text:`无需处理`,color:`default`},not_started:{text:`未开始`,color:`default`},project_created:{text:`已创建项目`,color:`processing`},true:{text:`是`,color:`success`},false:{text:`否`,color:`default`}},s9={material_input:`素材输入`,image_prompt_optimize:`图片 AI 提词`,image_generate:`图片生成`,video_prompt_optimize:`视频 AI 提词`,video_generate:`视频生成`},c9={hot_opening_replicate:`爆款开头复刻`,shot_replicate:`拆镜复刻`},l9={ai_suggestion:{text:`AI 建议`,color:`purple`},custom:{text:`自定义`,color:`cyan`},original:{text:`原视频`,color:`blue`}};function u9(e){return e?c9[e]||e:`-`}function d9(e){return e?s9[e]||e:`-`}function nre(e){return e?o9[e]?.text||s9[e]||c9[e]||l9[e]?.text||e:`-`}function rre(e){return e?o9[e]?.color||l9[e]?.color||`blue`:`default`}var f9=({status:e,tooltipRaw:t=!0})=>{if(e==null||e===``)return(0,Q.jsx)(IQ,{children:`-`});let n=String(e),r=nre(n),i=(0,Q.jsx)(IQ,{color:rre(n),children:r});return!t||r===n?i:(0,Q.jsx)(Aw,{title:n,children:i})};function p9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function m9(e,...t){for(let n of t){let t=e[n];if(t!=null&&String(t).trim()!==``)return String(t)}return``}function h9(e,t,...n){for(let t of n){let n=e[t];if(n===!0||n===!1)return n;if(n===`true`)return!0;if(n===`false`)return!1}return t}function ire(e,...t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t)&&t>0)return t;if(typeof t==`string`&&t.trim()){let e=Number(t);if(Number.isFinite(e)&&e>0)return e}}}function g9(e){if(!p9(e))return null;let t=m9(e,`key`);return t?{key:t,label:m9(e,`label`)||t,type:m9(e,`type`)||void 0,enabled:h9(e,!0,`enabled`),editable:h9(e,!0,`editable`),maxLength:ire(e,`maxLength`,`max_length`)}:null}function _9(e){if(!p9(e))return null;let t=e.data;return p9(t)?t:Array.isArray(e.sections)?e:null}function are(e){return!!_9(e)}function ore(e){let t=_9(e);return(Array.isArray(t?.sections)?t.sections:[]).map(e=>{let t=g9(e);if(!t||!p9(e))return null;let n=Array.isArray(e.children)?e.children.map(g9).filter(Boolean):[],r=Array.isArray(e.itemFields)?e.itemFields.map(g9).filter(Boolean):Array.isArray(e.item_fields)?e.item_fields.map(g9).filter(Boolean):[];return{...t,contentKey:m9(e,`contentKey`,`content_key`)||void 0,children:n,itemFields:r}}).filter(e=>!!e&&e.enabled)}function sre(e){return p9(e)?Object.entries(e).filter(([e])=>![`schemaVersion`,`schemaUsage`,`schema_version`,`schema_usage`].includes(e)).map(([e,t])=>Array.isArray(t)&&t.every(p9)?{key:e,label:e,type:`flow`,enabled:!0,editable:!1,itemFields:Array.from(new Set(t.flatMap(e=>Object.keys(e)))).filter(e=>e!==`时间段`).map(e=>({key:e,label:e,enabled:!0,editable:!1})),children:[]}:p9(t)?{key:e,label:e,type:`object`,enabled:!0,editable:!1,children:Object.keys(t).map(e=>({key:e,label:e,enabled:!0,editable:!1})),itemFields:[]}:{key:e,label:e,type:`text`,enabled:!0,editable:!1,children:[],itemFields:[]}):[]}var v9=e=>!!e&&typeof e==`object`&&!Array.isArray(e),y9=e=>typeof e==`string`&&e.length>80,b9=e=>e==null||e===``?(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`}):typeof e==`boolean`?e?`是`:`否`:typeof e==`number`?e:typeof e==`string`?(0,Q.jsx)(Z.Paragraph,{style:{marginBottom:0,whiteSpace:`pre-wrap`},children:e}):(0,Q.jsx)(i9,{value:e,maxHeight:220}),x9=e=>e?(0,Q.jsx)(IQ,{color:`processing`,children:`可编辑`}):(0,Q.jsx)(IQ,{color:`default`,children:`只读`}),S9=(e,t)=>e[t],cre=(e,t)=>{let n=S9(e,t.key);if(!v9(n))return(0,Q.jsx)(i9,{value:n??{},maxHeight:220});let r=t.children.filter(e=>e.enabled);return r.length?(0,Q.jsx)(fV,{size:`small`,column:2,bordered:!0,children:r.map(e=>(0,Q.jsx)(fV.Item,{label:(0,Q.jsxs)(WV,{size:4,children:[e.label,x9(e.editable)]}),span:y9(n[e.key])||v9(n[e.key])||Array.isArray(n[e.key])?2:1,children:b9(n[e.key])},e.key))}):(0,Q.jsx)(i9,{value:n,maxHeight:220})},lre=(e,t)=>{let n=e.itemFields.filter(e=>e.enabled);return n.length?[{key:`时间段`,label:`时间段`,enabled:!0,editable:!1},...n]:Array.from(new Set(t.flatMap(e=>Object.keys(e)))).map(e=>({key:e,label:e,enabled:!0,editable:!1}))},ure=(e,t)=>{let n=S9(e,t.key);if(!Array.isArray(n)||!n.every(v9))return(0,Q.jsx)(i9,{value:n??[],maxHeight:260});let r=n,i=lre(t,r);return(0,Q.jsx)(CQ,{size:`small`,rowKey:(e,n)=>`${t.key}-${n}`,columns:i.map(e=>({title:(0,Q.jsxs)(WV,{size:4,children:[e.label,x9(e.editable)]}),dataIndex:e.key,key:e.key,width:y9(r.find(t=>t[e.key])?.[e.key])?320:160,render:e=>b9(e)})),dataSource:r,pagination:!1,scroll:{x:Math.max(900,i.length*180)},tableLayout:`fixed`})},dre=(e,t)=>b9(S9(e,t.key)),fre=({schema:e,finalPrompt:t,schemaConfigSnapshot:n,schemaConfigSource:r,schemaConfigVersion:i,schemaConfigIsFallback:a})=>{let o=!!e&&Object.keys(e).length>0;if(!o&&!t)return(0,Q.jsx)(hC,{description:`暂无视频提词 schema`});let s=o?e:{},c=are(n),l=(c?ore(n):sre(s)).filter(e=>e.key in s).map(e=>({key:e.key,label:(0,Q.jsxs)(WV,{size:8,wrap:!0,children:[(0,Q.jsx)(`span`,{children:e.label}),x9(e.editable),c?null:(0,Q.jsx)(IQ,{color:`warning`,children:`管理后台兜底展示`})]}),children:e.type===`object`?cre(s,e):e.type===`flow`?ure(s,e):dre(s,e)}));return(0,Q.jsxs)(WV,{direction:`vertical`,size:12,style:{width:`100%`},children:[(0,Q.jsx)(LR,{size:`small`,title:`Schema 配置来源`,children:(0,Q.jsxs)(fV,{size:`small`,column:3,bordered:!0,children:[(0,Q.jsx)(fV.Item,{label:`来源`,children:r||n?.source||(c?`-`:`viewer_fallback`)}),(0,Q.jsx)(fV.Item,{label:`版本`,children:i||n?.version||`-`}),(0,Q.jsx)(fV.Item,{label:`历史兜底`,children:a||!c?(0,Q.jsx)(IQ,{color:`warning`,children:`是`}):(0,Q.jsx)(IQ,{color:`success`,children:`否`})})]})}),t?(0,Q.jsx)(LR,{size:`small`,title:`最终视频提示词`,children:(0,Q.jsx)(Z.Paragraph,{style:{whiteSpace:`pre-wrap`,marginBottom:0},children:t})}):null,l.length?(0,Q.jsx)(Ng,{size:`small`,items:l}):o?(0,Q.jsx)(LR,{size:`small`,title:`视频提词 Schema`,children:(0,Q.jsx)(i9,{value:s,maxHeight:360})}):null,o?(0,Q.jsx)(Ng,{size:`small`,items:[{key:`raw_schema`,label:`原始 JSON / 历史脏字段排查`,children:(0,Q.jsx)(i9,{value:s,maxHeight:420})}]}):null]})},pre=[`material_input`,`image_prompt_optimize`,`image_generate`,`video_prompt_optimize`,`video_generate`],mre={material_input:`参考素材、项目名称和核心内容点`,image_prompt_optimize:`图片 AI 提词优化结果`,image_generate:`图片引擎、生成参数和结果图`,video_prompt_optimize:`视频 JSON schema、动作流程和最终提词`,video_generate:`视频引擎、生成参数、封面和结果视频`},C9=e=>e?Z5(e):`-`,w9=e=>e?e.length>18?`${e.slice(0,10)}...${e.slice(-4)}`:e:`-`,hre=({text:e=`-`})=>(0,Q.jsx)(Z.Text,{type:`secondary`,children:e}),T9=({step:e})=>e?(0,Q.jsx)($ne,{input:e.input,output:e.output}):null,E9=({index:e,stepCode:t,step:n,current:r})=>(0,Q.jsxs)(WV,{wrap:!0,size:8,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:`第${e}步:${d9(t)}`}),(0,Q.jsx)(f9,{status:n?.status||`not_started`}),r?(0,Q.jsx)(IQ,{color:`blue`,children:`当前步骤`}):null,(0,Q.jsx)(Z.Text,{type:`secondary`,children:mre[t]||t}),n?.updatedAt?(0,Q.jsxs)(Z.Text,{type:`secondary`,children:[`更新时间:`,C9(n.updatedAt)]}):null,n?.chatTaskId?(0,Q.jsx)(Aw,{title:n.chatTaskId,children:(0,Q.jsxs)(IQ,{children:[`Chat:`,w9(n.chatTaskId)]})}):null]}),gre=(e,t)=>{if(!e)return[];let n=new Set;return n.add(`material_input`),e.currentStepCode&&n.add(e.currentStepCode),Object.values(t).forEach(e=>{(e.status===`failed`||e.errorMessage)&&n.add(e.stepCode)}),e.errorMessage&&n.add(e.currentStepCode||`material_input`),Array.from(n)},D9=(e,t=`错误信息`)=>e?(0,Q.jsx)(sf,{type:`error`,showIcon:!0,message:t,description:e,style:{marginTop:12,marginBottom:12}}):null,_re=(e,t=`暂无提词`)=>e?(0,Q.jsx)(Z.Paragraph,{style:{whiteSpace:`pre-wrap`,marginBottom:0},children:e}):(0,Q.jsx)(hre,{text:t}),O9=({moduleType:e=`shot_replicate`})=>{let{projectId:t}=$e(),n=Ye(),[r,i]=(0,S.useState)(null),[a,o]=(0,S.useState)(!1),s=(0,S.useCallback)(async()=>{if(t){o(!0);try{i(e===`hot_opening_replicate`?await y5(t):await w5(t))}catch(e){BG.error(e?.message||`加载复刻项目详情失败`)}finally{o(!1)}}},[e,t]);(0,S.useEffect)(()=>{s()},[s]);let c=(0,S.useMemo)(()=>{let e={};return(r?.steps||[]).forEach(t=>{e[t.stepCode]=t}),e},[r]),l=r?.module||e,u=u9(l),d=(0,S.useMemo)(()=>pre.map(e=>{let t=c[e],n=`wait`;return t?.status===`completed`?n=`finish`:t?.status===`processing`?n=`process`:t?.status===`failed`&&(n=`error`),{title:d9(e),description:t?(0,Q.jsx)(f9,{status:t.status}):`未创建`,status:n}}),[c]),f=(0,S.useMemo)(()=>gre(r,c),[r,c]);if(a&&!r)return(0,Q.jsx)(`div`,{style:{padding:64,textAlign:`center`},children:(0,Q.jsx)(TG,{size:`large`})});if(!r)return(0,Q.jsx)(LR,{style:{margin:24},children:(0,Q.jsx)(hC,{description:`未找到复刻项目详情`})});let p=c.material_input,m=c.image_prompt_optimize,h=c.image_generate,g=c.video_prompt_optimize,_=c.video_generate,v=r.imageGeneration?.resultImageUrl||r.finalImageUrl,y=r.videoGeneration?.resultVideoCoverUrl||r.finalVideoCoverUrl,b=r.videoGeneration?.resultVideoUrl||r.finalVideoUrl,x=[{key:`material_input`,label:(0,Q.jsx)(E9,{index:1,stepCode:`material_input`,step:p,current:r.currentStepCode===`material_input`}),children:(0,Q.jsxs)(WV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(fV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(fV.Item,{label:`模块类型`,children:(0,Q.jsx)(f9,{status:l})}),(0,Q.jsx)(fV.Item,{label:`素材步骤ID`,children:r.material?.materialStepId||`-`}),(0,Q.jsx)(fV.Item,{label:`参考素材项目名`,children:r.material?.sourceProjectName||`-`}),(0,Q.jsx)(fV.Item,{label:`生成项目名称`,children:r.material?.targetProjectName||`-`}),(0,Q.jsx)(fV.Item,{label:`核心内容点`,span:2,children:r.material?.coreContentPoint||`-`})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(320px, 1fr))`,gap:16},children:[(0,Q.jsx)(LR,{size:`small`,title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(J4,{}),`素材视频`]}),children:(0,Q.jsx)(a9,{type:`video`,url:r.material?.materialVideoUrl,emptyDescription:`暂无素材视频`})}),(0,Q.jsx)(LR,{size:`small`,title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(x2,{}),`素材图片`]}),children:(0,Q.jsx)(a9,{type:`image`,url:r.material?.materialImageUrl,emptyDescription:`暂无素材图片`})})]}),D9(p?.errorMessage),(0,Q.jsx)(T9,{step:p})]})},{key:`image_prompt_optimize`,label:(0,Q.jsx)(E9,{index:2,stepCode:`image_prompt_optimize`,step:m,current:r.currentStepCode===`image_prompt_optimize`}),children:(0,Q.jsxs)(WV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(fV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(fV.Item,{label:`提词步骤ID`,children:r.imageGeneration?.promptStepId||`-`}),(0,Q.jsx)(fV.Item,{label:`步骤状态`,children:(0,Q.jsx)(f9,{status:m?.status||r.imageGeneration?.status})}),(0,Q.jsx)(fV.Item,{label:`图片提示词`,span:2,children:_re(r.imageGeneration?.prompt,`暂无图片提示词`)})]}),D9(m?.errorMessage||r.imageGeneration?.errorMessage),(0,Q.jsx)(T9,{step:m})]})},{key:`image_generate`,label:(0,Q.jsx)(E9,{index:3,stepCode:`image_generate`,step:h,current:r.currentStepCode===`image_generate`}),children:(0,Q.jsxs)(WV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(fV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(fV.Item,{label:`生成步骤ID`,children:r.imageGeneration?.generateStepId||`-`}),(0,Q.jsx)(fV.Item,{label:`Chat任务ID`,children:r.imageGeneration?.chatTaskId||`-`}),(0,Q.jsx)(fV.Item,{label:`状态`,children:(0,Q.jsx)(f9,{status:r.imageGeneration?.status||h?.status})}),(0,Q.jsx)(fV.Item,{label:`图片引擎ID`,children:r.imageGeneration?.engineId||`-`}),(0,Q.jsx)(fV.Item,{label:`图片引擎名称`,children:r.imageGeneration?.engineName||`-`}),(0,Q.jsx)(fV.Item,{label:`生成参数`,span:3,children:(0,Q.jsx)(i9,{value:r.imageGeneration?.params||{},maxHeight:160})})]}),D9(r.imageGeneration?.errorMessage||h?.errorMessage),(0,Q.jsx)(LR,{size:`small`,title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(x2,{}),`图片结果`]}),children:(0,Q.jsx)(a9,{type:`image`,url:v,height:360,emptyDescription:h?.status===`failed`||r.imageGeneration?.errorMessage?`图片生成失败,未返回图片地址`:`暂无图片结果`,errorDescription:`图片资源加载失败,可能图片文件不存在、签名过期或访问权限受限。`})}),(0,Q.jsx)(T9,{step:h})]})},{key:`video_prompt_optimize`,label:(0,Q.jsx)(E9,{index:4,stepCode:`video_prompt_optimize`,step:g,current:r.currentStepCode===`video_prompt_optimize`}),children:(0,Q.jsxs)(WV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(fV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(fV.Item,{label:`提词步骤ID`,children:r.videoGeneration?.promptStepId||`-`}),(0,Q.jsx)(fV.Item,{label:`步骤状态`,children:(0,Q.jsx)(f9,{status:g?.status})}),(0,Q.jsx)(fV.Item,{label:`提词参数`,span:3,children:(0,Q.jsx)(i9,{value:r.videoGeneration?.promptParams||{},maxHeight:160})})]}),D9(g?.errorMessage||r.videoGeneration?.errorMessage),(0,Q.jsx)(fre,{schema:r.videoGeneration?.promptSchema,finalPrompt:r.videoGeneration?.finalPrompt,schemaConfigSnapshot:r.videoGeneration?.schemaConfigSnapshot,schemaConfigSource:r.videoGeneration?.schemaConfigSource,schemaConfigVersion:r.videoGeneration?.schemaConfigVersion,schemaConfigIsFallback:r.videoGeneration?.schemaConfigIsFallback}),(0,Q.jsx)(T9,{step:g})]})},{key:`video_generate`,label:(0,Q.jsx)(E9,{index:5,stepCode:`video_generate`,step:_,current:r.currentStepCode===`video_generate`}),children:(0,Q.jsxs)(WV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(fV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(fV.Item,{label:`生成步骤ID`,children:r.videoGeneration?.generateStepId||`-`}),(0,Q.jsx)(fV.Item,{label:`Chat任务ID`,children:r.videoGeneration?.chatTaskId||`-`}),(0,Q.jsx)(fV.Item,{label:`状态`,children:(0,Q.jsx)(f9,{status:r.videoGeneration?.status||_?.status})}),(0,Q.jsx)(fV.Item,{label:`视频引擎ID`,children:r.videoGeneration?.engineId||`-`}),(0,Q.jsx)(fV.Item,{label:`视频引擎名称`,children:r.videoGeneration?.engineName||`-`}),(0,Q.jsx)(fV.Item,{label:`生成参数`,span:3,children:(0,Q.jsx)(i9,{value:r.videoGeneration?.params||{},maxHeight:160})})]}),D9(r.videoGeneration?.errorMessage||_?.errorMessage),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(320px, 1fr))`,gap:16},children:[(0,Q.jsx)(LR,{size:`small`,title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(x2,{}),`视频封面`]}),children:(0,Q.jsx)(a9,{type:`image`,url:y,emptyDescription:_?.status===`failed`||r.videoGeneration?.errorMessage?`视频生成失败,未返回封面`:`暂无视频封面`,errorDescription:`视频封面加载失败,可能文件不存在、签名过期或访问权限受限。`})}),(0,Q.jsx)(LR,{size:`small`,title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(A6,{}),`最终视频`]}),children:(0,Q.jsx)(a9,{type:`video`,url:b,emptyDescription:_?.status===`failed`||r.videoGeneration?.errorMessage?`视频生成失败,未返回视频地址`:`暂无最终视频`,errorDescription:`视频资源加载失败,可能文件不存在、签名过期或访问权限受限。`})})]}),(0,Q.jsx)(T9,{step:_})]})}];return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsxs)(WV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(WV,{wrap:!0,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(WV,{wrap:!0,children:[(0,Q.jsx)(YE,{icon:(0,Q.jsx)(e0,{}),onClick:()=>n(-1),children:`返回`}),(0,Q.jsxs)(Z.Title,{level:3,style:{margin:0},children:[u,`项目详情`]}),(0,Q.jsx)(f9,{status:r.status}),r.module&&r.module!==e?(0,Q.jsxs)(IQ,{color:`gold`,children:[`接口模块:`,u9(r.module)]}):null]}),(0,Q.jsx)(YE,{onClick:s,loading:a,children:`刷新`})]}),(0,Q.jsx)(LR,{children:(0,Q.jsxs)(fV,{title:`基础信息`,column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(fV.Item,{label:`项目ID`,children:r.id}),(0,Q.jsx)(fV.Item,{label:`模块类型`,children:(0,Q.jsx)(f9,{status:l})}),(0,Q.jsx)(fV.Item,{label:`用户ID`,children:r.userId||`-`}),(0,Q.jsx)(fV.Item,{label:`用户名`,children:r.userName||`-`}),(0,Q.jsx)(fV.Item,{label:`标题`,children:r.title||`-`}),(0,Q.jsx)(fV.Item,{label:`当前步骤`,children:(0,Q.jsx)(Aw,{title:r.currentStepCode||``,children:d9(r.currentStepCode)})}),(0,Q.jsx)(fV.Item,{label:`状态`,children:(0,Q.jsx)(f9,{status:r.status})}),(0,Q.jsx)(fV.Item,{label:`创建时间`,children:C9(r.createdAt)}),(0,Q.jsx)(fV.Item,{label:`更新时间`,children:C9(r.updatedAt)}),(0,Q.jsx)(fV.Item,{label:`完成时间`,children:C9(r.completedAt)}),r.errorMessage?(0,Q.jsx)(fV.Item,{label:`错误信息`,span:3,children:(0,Q.jsx)(sf,{type:`error`,showIcon:!0,message:r.errorMessage})}):null]})}),(0,Q.jsx)(LR,{title:`步骤进度`,children:(0,Q.jsx)(Eq,{items:d})}),(0,Q.jsx)(LR,{title:`最终结果预览`,children:(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(280px, 1fr))`,gap:16},children:[(0,Q.jsx)(LR,{size:`small`,title:`最终图片`,children:(0,Q.jsx)(a9,{type:`image`,url:r.finalImageUrl||r.imageGeneration?.resultImageUrl,height:220,emptyDescription:`暂无最终图片`})}),(0,Q.jsx)(LR,{size:`small`,title:`最终视频封面`,children:(0,Q.jsx)(a9,{type:`image`,url:r.finalVideoCoverUrl||r.videoGeneration?.resultVideoCoverUrl,height:220,emptyDescription:`暂无最终视频封面`})}),(0,Q.jsx)(LR,{size:`small`,title:`最终视频`,children:(0,Q.jsx)(a9,{type:`video`,url:r.finalVideoUrl||r.videoGeneration?.resultVideoUrl,height:220,emptyDescription:`暂无最终视频`})})]})}),(0,Q.jsx)(Ng,{defaultActiveKey:f,items:x}),(0,Q.jsx)(Ng,{items:[{key:`steps-table`,label:`完整步骤列表`,children:(0,Q.jsx)(CQ,{rowKey:`id`,size:`small`,pagination:!1,dataSource:r.steps||[],scroll:{x:1100},columns:[{title:`序号`,dataIndex:`stepIndex`,width:70},{title:`步骤`,dataIndex:`stepCode`,width:160,render:e=>(0,Q.jsx)(Aw,{title:e,children:d9(e)})},{title:`状态`,dataIndex:`status`,width:120,render:e=>(0,Q.jsx)(f9,{status:e})},{title:`版本`,dataIndex:`version`,width:70},{title:`当前有效`,dataIndex:`isCurrent`,width:90,render:e=>e?(0,Q.jsx)(IQ,{color:`success`,children:`是`}):(0,Q.jsx)(IQ,{children:`否`})},{title:`Chat任务`,dataIndex:`chatTaskId`,width:160,render:e=>(0,Q.jsx)(Aw,{title:e||``,children:w9(e)})},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:C9},{title:`完成时间`,dataIndex:`completedAt`,width:170,render:C9},{title:`错误`,dataIndex:`errorMessage`,ellipsis:!0,render:e=>e||`-`}]})},{key:`raw-detail`,label:`完整详情原始 JSON`,children:(0,Q.jsx)(i9,{value:r,maxHeight:520})}]})]})})},vre=()=>(0,Q.jsx)(O9,{moduleType:`hot_opening_replicate`}),k9=20,yre=[{value:`pending_analysis`,label:`等待分析`},{value:`analyzing`,label:`分析中`},{value:`analysis_completed`,label:`分析完成`},{value:`analysis_failed`,label:`分析失败`},{value:`splitting`,label:`拆镜中`},{value:`split_completed`,label:`拆镜完成`},{value:`partial_failed`,label:`部分失败`},{value:`failed`,label:`失败`}],bre=[{value:`pending`,label:`待分析`},{value:`processing`,label:`分析中`},{value:`completed`,label:`分析完成`},{value:`failed`,label:`分析失败`}],xre=[{value:`none`,label:`未拆镜`},{value:`pending`,label:`待拆镜`},{value:`processing`,label:`拆镜中`},{value:`completed`,label:`拆镜完成`},{value:`failed`,label:`拆镜失败`},{value:`retry_waiting`,label:`等待重试`}],Sre={pending_analysis:{color:`default`,text:`等待分析`},analyzing:{color:`processing`,text:`分析中`},analysis_completed:{color:`success`,text:`分析完成`},analysis_failed:{color:`error`,text:`分析失败`},splitting:{color:`warning`,text:`拆镜中`},split_completed:{color:`success`,text:`拆镜完成`},partial_failed:{color:`orange`,text:`部分失败`},failed:{color:`error`,text:`失败`},none:{color:`default`,text:`未拆镜`},pending:{color:`default`,text:`待处理`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`完成`},retry_waiting:{color:`orange`,text:`等待重试`}},A9=e=>e?Z5(e):`-`,j9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,M9=({status:e})=>{if(!e)return(0,Q.jsx)(IQ,{children:`-`});let t=Sre[e]||{color:`blue`,text:e};return(0,Q.jsx)(IQ,{color:t.color,children:t.text})},Cre=()=>{let e=Ye(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(1),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(``),[h,g]=(0,S.useState)(``),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(null),[w,T]=(0,S.useState)(``),[E,D]=(0,S.useState)(``),[O,k]=(0,S.useState)(``),[A,j]=(0,S.useState)(null),[M,N]=(0,S.useState)(0),P=(0,S.useCallback)(async()=>{o(!0);try{let e=await b5({status:l||void 0,analysisStatus:d||void 0,splitStatus:p||void 0,keyword:w||void 0,userId:E||void 0,userName:O||void 0,createdStart:A?.[0]?.toISOString?.(),createdEnd:A?.[1]?.toISOString?.(),page:s,pageSize:k9});n(e.items||[]),i(e.total||0)}catch(e){BG.error(e?.message||`加载拆镜复刻任务失败`)}finally{o(!1)}},[d,s,A,w,E,O,p,l]);(0,S.useEffect)(()=>{P()},[P,M]);let F=()=>{T(h.trim()),D(_.trim()),k(y.trim()),j(x),c(1)};return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsx)(LR,{children:(0,Q.jsxs)(WV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(WV,{align:`center`,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:3,style:{marginBottom:4},children:`拆镜复刻`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`只读排查页面:查看拆镜总任务、AI 分析结果、切片列表和关联复刻项目。`})]}),(0,Q.jsx)(YE,{icon:(0,Q.jsx)(kK,{}),onClick:()=>N(e=>e+1),children:`刷新`})]}),(0,Q.jsxs)(WV,{wrap:!0,children:[(0,Q.jsx)(BC,{allowClear:!0,placeholder:`总任务状态`,style:{width:150},value:l||void 0,onChange:e=>{u(e||``),c(1)},options:yre}),(0,Q.jsx)(BC,{allowClear:!0,placeholder:`分析状态`,style:{width:140},value:d||void 0,onChange:e=>{f(e||``),c(1)},options:bre}),(0,Q.jsx)(BC,{allowClear:!0,placeholder:`拆镜状态`,style:{width:140},value:p||void 0,onChange:e=>{m(e||``),c(1)},options:xre}),(0,Q.jsx)(vW,{allowClear:!0,prefix:(0,Q.jsx)(FC,{}),placeholder:`关键词:标题/内容/分类/受众`,style:{width:260},value:h,onChange:e=>g(e.target.value),onPressEnter:F}),(0,Q.jsx)(vW,{allowClear:!0,placeholder:`用户ID(管理员)`,style:{width:190},value:_,onChange:e=>v(e.target.value),onPressEnter:F}),(0,Q.jsx)(vW,{allowClear:!0,placeholder:`用户名(管理员)`,style:{width:230},value:y,onChange:e=>b(e.target.value),onPressEnter:F}),(0,Q.jsx)(QB.RangePicker,{showTime:!0,value:x,onChange:C,placeholder:[`创建开始`,`创建结束`]}),(0,Q.jsx)(YE,{type:`primary`,icon:(0,Q.jsx)(FC,{}),onClick:F,children:`搜索`}),(0,Q.jsx)(YE,{onClick:()=>{u(``),f(``),m(``),g(``),v(``),b(``),C(null),T(``),D(``),k(``),j(null),c(1),N(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(CQ,{rowKey:`id`,loading:a,dataSource:t,pagination:{current:s,pageSize:k9,total:r,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:c},scroll:{x:1500},columns:[{title:`任务集ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Aw,{title:e,children:j9(e)})},{title:`用户`,width:180,render:(e,t)=>(0,Q.jsxs)(WV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(Z.Text,{children:t.userName||`-`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:j9(t.userId)})]})},{title:`任务信息`,width:300,render:(e,t)=>(0,Q.jsxs)(WV,{direction:`vertical`,size:2,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.title||`-`}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:280},children:[`分类:`,t.originalVideoCategory||`-`]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:280},children:[`受众:`,t.originalVideoAudience||`-`]})]})},{title:`总状态`,dataIndex:`status`,width:120,render:e=>(0,Q.jsx)(M9,{status:e})},{title:`分析状态`,dataIndex:`analysisStatus`,width:110,render:e=>(0,Q.jsx)(M9,{status:e})},{title:`拆镜状态`,dataIndex:`splitStatus`,width:110,render:e=>(0,Q.jsx)(M9,{status:e})},{title:`切片进度`,width:180,render:(e,t)=>{let n=t.segmentCount||0,r=t.completedSegmentCount||0;return(0,Q.jsx)(EK,{size:`small`,percent:n?Math.round(r/n*100):0,format:()=>`${r}/${n}`})}},{title:`失败片段`,dataIndex:`failedSegmentCount`,width:90,render:e=>e?(0,Q.jsx)(IQ,{color:`error`,children:e}):(0,Q.jsx)(IQ,{children:`0`})},{title:`视频时长`,dataIndex:`videoDurationSeconds`,width:100,render:e=>`${Number(e||0).toFixed(1)}s`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:A9},{title:`更新时间`,dataIndex:`updatedAt`,width:170,render:A9},{title:`操作`,fixed:`right`,width:120,render:(t,n)=>(0,Q.jsx)(YE,{type:`link`,icon:(0,Q.jsx)(XU,{}),onClick:()=>e(`/shot-replications/task-sets/${n.id}`),children:`查看切片`})}]})]})})})},wre=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),N9=20,Tre=[{value:`ai_suggestion`,label:`AI 建议`},{value:`custom`,label:`自定义`}],Ere=[{value:`none`,label:`未拆镜`},{value:`pending`,label:`待拆镜`},{value:`processing`,label:`拆镜中`},{value:`completed`,label:`拆镜完成`},{value:`failed`,label:`拆镜失败`},{value:`retry_waiting`,label:`等待重试`}],Dre=[{value:`not_required`,label:`无需分析`},{value:`pending`,label:`待分析`},{value:`processing`,label:`分析中`},{value:`completed`,label:`分析完成`},{value:`failed`,label:`分析失败`}],Ore=[{value:`not_started`,label:`未复刻`},{value:`project_created`,label:`已创建项目`},{value:`processing`,label:`复刻中`},{value:`completed`,label:`复刻完成`},{value:`failed`,label:`复刻失败`}],P9={pending_analysis:{color:`default`,text:`等待分析`},analyzing:{color:`processing`,text:`分析中`},analysis_completed:{color:`success`,text:`分析完成`},analysis_failed:{color:`error`,text:`分析失败`},splitting:{color:`warning`,text:`拆镜中`},split_completed:{color:`success`,text:`拆镜完成`},partial_failed:{color:`orange`,text:`部分失败`},failed:{color:`error`,text:`失败`},none:{color:`default`,text:`未拆镜`},pending:{color:`default`,text:`待处理`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`完成`},retry_waiting:{color:`orange`,text:`等待重试`},not_required:{color:`default`,text:`无需分析`},not_started:{color:`default`,text:`未复刻`},project_created:{color:`processing`,text:`已创建项目`}},kre=e=>{if(!e)return``;let t=String(e).trim();return t?/^(https?:)?\/\//i.test(t)||/^(blob|data):/i.test(t)?t:`${wre}${t.startsWith(`/`)?t:`/${t}`}`:``},F9=e=>e?Z5(e):`-`,I9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,L9=({status:e})=>{if(!e)return(0,Q.jsx)(IQ,{children:`-`});let t=P9[e]||{color:`blue`,text:e};return(0,Q.jsx)(IQ,{color:t.color,children:t.text})},R9=({value:e,maxHeight:t=420})=>(0,Q.jsx)(`pre`,{style:{margin:0,padding:12,maxHeight:t,overflow:`auto`,background:`#0f172a`,color:`#e2e8f0`,borderRadius:8,fontSize:12,lineHeight:1.6},children:JSON.stringify(e??{},null,2)}),z9=({url:e,height:t=280})=>e?(0,Q.jsx)(`video`,{src:kre(e),controls:!0,preload:`metadata`,style:{width:`100%`,maxHeight:t,borderRadius:12,background:`#0f172a`}}):(0,Q.jsx)(hC,{description:`暂无视频`,image:hC.PRESENTED_IMAGE_SIMPLE}),Are=({items:e=[]})=>(0,Q.jsx)(CQ,{rowKey:`index`,size:`small`,pagination:!1,dataSource:e,scroll:{x:!0},columns:[{title:`序号`,dataIndex:`index`,width:70},{title:`时间节点`,dataIndex:`timeNode`,width:120},{title:`开始`,dataIndex:`startSecond`,width:80,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`结束`,dataIndex:`endSecond`,width:80,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`内容`,dataIndex:`content`,ellipsis:!0},{title:`分类`,dataIndex:`category`,width:140},{title:`受众`,dataIndex:`audience`,ellipsis:!0}]}),jre=()=>{let{taskSetId:e}=$e(),t=Ye(),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(0),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(null),k=(0,S.useCallback)(async()=>{if(e){d(!0);try{r(await x5(e))}catch(e){BG.error(e?.message||`加载拆镜任务详情失败`)}finally{d(!1)}}},[e]),A=(0,S.useCallback)(async()=>{if(e){p(!0);try{let t=await S5(e,{sourceMode:g||void 0,splitStatus:v||void 0,analysisStatus:b||void 0,replicateStatus:C||void 0,page:c,pageSize:N9});a(t.items||[]),s(t.total||0)}catch(e){BG.error(e?.message||`加载拆镜片段失败`)}finally{p(!1)}}},[b,c,C,g,v,e]);(0,S.useEffect)(()=>{k()},[k,m]),(0,S.useEffect)(()=>{A()},[A,m]);let j=async e=>{E(!0),O(null);try{O(await C5(e))}catch(e){BG.error(e?.message||`加载片段详情失败`)}};return u&&!n?(0,Q.jsx)(`div`,{style:{padding:64,textAlign:`center`},children:(0,Q.jsx)(TG,{size:`large`})}):n?(0,Q.jsxs)(`div`,{style:{padding:24},children:[(0,Q.jsxs)(WV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(WV,{style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(YE,{icon:(0,Q.jsx)(e0,{}),onClick:()=>t(`/shot-replications`),children:`返回列表`}),(0,Q.jsx)(Z.Title,{level:3,style:{margin:0},children:`拆镜任务详情`}),(0,Q.jsx)(L9,{status:n.status})]}),(0,Q.jsx)(YE,{icon:(0,Q.jsx)(kK,{}),onClick:()=>h(e=>e+1),children:`刷新`})]}),(0,Q.jsx)(LR,{children:(0,Q.jsxs)(fV,{title:`总任务信息`,column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(fV.Item,{label:`任务集ID`,children:n.id}),(0,Q.jsx)(fV.Item,{label:`用户ID`,children:n.userId||`-`}),(0,Q.jsx)(fV.Item,{label:`用户名`,children:n.userName||`-`}),(0,Q.jsx)(fV.Item,{label:`标题`,children:n.title||`-`}),(0,Q.jsxs)(fV.Item,{label:`视频时长`,children:[Number(n.videoDurationSeconds||0).toFixed(2),`s`]}),(0,Q.jsx)(fV.Item,{label:`总状态`,children:(0,Q.jsx)(L9,{status:n.status})}),(0,Q.jsx)(fV.Item,{label:`分析状态`,children:(0,Q.jsx)(L9,{status:n.analysisStatus})}),(0,Q.jsx)(fV.Item,{label:`拆镜状态`,children:(0,Q.jsx)(L9,{status:n.splitStatus})}),(0,Q.jsxs)(fV.Item,{label:`片段数量`,children:[n.completedSegmentCount,`/`,n.segmentCount,`,失败 `,n.failedSegmentCount]}),(0,Q.jsx)(fV.Item,{label:`原视频分类`,children:n.originalVideoCategory||`-`}),(0,Q.jsx)(fV.Item,{label:`创建时间`,children:F9(n.createdAt)}),(0,Q.jsx)(fV.Item,{label:`更新时间`,children:F9(n.updatedAt)}),(0,Q.jsx)(fV.Item,{label:`原视频内容`,span:3,children:n.originalVideoContent||`-`}),(0,Q.jsx)(fV.Item,{label:`原视频受众`,span:3,children:n.originalVideoAudience||`-`}),n.analysisErrorMessage?(0,Q.jsx)(fV.Item,{label:`分析错误`,span:3,children:(0,Q.jsx)(sf,{type:`error`,message:n.analysisErrorMessage})}):null,n.splitErrorMessage?(0,Q.jsx)(fV.Item,{label:`拆镜错误`,span:3,children:(0,Q.jsx)(sf,{type:`error`,message:n.splitErrorMessage})}):null]})}),(0,Q.jsx)(LR,{title:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(J4,{}),`原视频预览`]}),children:(0,Q.jsx)(z9,{url:n.videoUrl,height:360})}),(0,Q.jsxs)(LR,{title:`AI 建议拆镜列表`,children:[n.aiSuggestions?.length?(0,Q.jsx)(Are,{items:n.aiSuggestions}):(0,Q.jsx)(hC,{description:`暂无 AI 建议拆镜`}),(0,Q.jsx)(Ng,{size:`small`,ghost:!0,style:{marginTop:12},items:[{key:`raw`,label:`查看原视频分析完整 JSON`,children:(0,Q.jsx)(R9,{value:n.analysisResultJson})}]})]}),(0,Q.jsxs)(LR,{title:`片段列表`,children:[(0,Q.jsxs)(WV,{wrap:!0,style:{marginBottom:16},children:[(0,Q.jsx)(BC,{allowClear:!0,placeholder:`片段来源`,style:{width:140},value:g||void 0,options:Tre,onChange:e=>{_(e||``),l(1)}}),(0,Q.jsx)(BC,{allowClear:!0,placeholder:`切割状态`,style:{width:140},value:v||void 0,options:Ere,onChange:e=>{y(e||``),l(1)}}),(0,Q.jsx)(BC,{allowClear:!0,placeholder:`分析状态`,style:{width:140},value:b||void 0,options:Dre,onChange:e=>{x(e||``),l(1)}}),(0,Q.jsx)(BC,{allowClear:!0,placeholder:`复刻状态`,style:{width:150},value:C||void 0,options:Ore,onChange:e=>{w(e||``),l(1)}}),(0,Q.jsx)(YE,{icon:(0,Q.jsx)(FC,{}),onClick:()=>h(e=>e+1),children:`筛选`}),(0,Q.jsx)(YE,{onClick:()=>{_(``),y(``),x(``),w(``),l(1),h(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(CQ,{rowKey:`id`,loading:f,dataSource:i,pagination:{current:c,pageSize:N9,total:o,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:l},scroll:{x:1550},columns:[{title:`片段ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Aw,{title:e,children:I9(e)})},{title:`序号`,dataIndex:`segmentIndex`,width:70},{title:`来源`,dataIndex:`sourceMode`,width:100,render:e=>e===`ai_suggestion`?(0,Q.jsx)(IQ,{color:`purple`,children:`AI建议`}):(0,Q.jsx)(IQ,{color:`cyan`,children:`自定义`})},{title:`时间节点`,dataIndex:`timeNode`,width:130},{title:`时长`,dataIndex:`durationSeconds`,width:90,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`切割`,dataIndex:`splitStatus`,width:100,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`分析`,dataIndex:`analysisStatus`,width:100,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`复刻`,dataIndex:`replicateStatus`,width:110,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`片段内容`,dataIndex:`segmentContent`,width:260,ellipsis:!0,render:e=>e||`-`},{title:`分类`,dataIndex:`segmentCategory`,width:120,render:e=>e||`-`},{title:`关联项目`,width:220,render:(e,n)=>n.moduleProjectId?(0,Q.jsxs)(WV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(YE,{type:`link`,style:{padding:0},onClick:()=>t(`/shot-replications/projects/${n.moduleProjectId}`),children:I9(n.moduleProjectId)}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:n.moduleProjectTitle||d9(n.moduleProjectCurrentStepCode)}),(0,Q.jsx)(L9,{status:n.moduleProjectStatus})]}):(0,Q.jsx)(IQ,{children:`未创建`})},{title:`错误`,dataIndex:`splitLastError`,width:220,ellipsis:!0,render:(e,t)=>e||t.analysisErrorMessage||`-`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:F9},{title:`操作`,fixed:`right`,width:100,render:(e,t)=>(0,Q.jsx)(YE,{type:`link`,icon:(0,Q.jsx)(XU,{}),onClick:()=>j(t.id),children:`详情`})}]})]})]}),(0,Q.jsx)(FV,{title:`片段详情`,width:720,open:T,onClose:()=>E(!1),destroyOnClose:!0,children:D?(0,Q.jsxs)(WV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(fV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(fV.Item,{label:`片段ID`,span:2,children:D.id}),(0,Q.jsx)(fV.Item,{label:`时间节点`,children:D.timeNode}),(0,Q.jsxs)(fV.Item,{label:`时长`,children:[Number(D.durationSeconds||0).toFixed(2),`s`]}),(0,Q.jsx)(fV.Item,{label:`切割状态`,children:(0,Q.jsx)(L9,{status:D.splitStatus})}),(0,Q.jsx)(fV.Item,{label:`分析状态`,children:(0,Q.jsx)(L9,{status:D.analysisStatus})}),(0,Q.jsx)(fV.Item,{label:`复刻状态`,children:(0,Q.jsx)(L9,{status:D.replicateStatus})}),(0,Q.jsx)(fV.Item,{label:`关联项目`,children:D.moduleProjectId?(0,Q.jsx)(YE,{type:`link`,onClick:()=>t(`/shot-replications/projects/${D.moduleProjectId}`),children:D.moduleProjectId}):`-`}),(0,Q.jsx)(fV.Item,{label:`片段内容`,span:2,children:D.segmentContent||`-`}),(0,Q.jsx)(fV.Item,{label:`片段分类`,children:D.segmentCategory||`-`}),(0,Q.jsx)(fV.Item,{label:`片段受众`,children:D.segmentAudience||`-`})]}),(0,Q.jsx)(LR,{size:`small`,title:`片段视频`,children:(0,Q.jsx)(z9,{url:D.segmentVideoUrl,height:300})}),D.splitLastError?(0,Q.jsx)(sf,{type:`error`,message:`切割错误`,description:D.splitLastError}):null,D.analysisErrorMessage?(0,Q.jsx)(sf,{type:`error`,message:`分析错误`,description:D.analysisErrorMessage}):null,(0,Q.jsx)(Ng,{size:`small`,items:[{key:`analysis`,label:`片段分析 JSON`,children:(0,Q.jsx)(R9,{value:D.analysisJson})},{key:`suggestion`,label:`AI 建议原始 JSON`,children:(0,Q.jsx)(R9,{value:D.aiSuggestionJson})}]})]}):(0,Q.jsx)(TG,{})})]}):(0,Q.jsx)(LR,{style:{margin:24},children:(0,Q.jsx)(hC,{description:`未找到拆镜任务详情`})})},{Title:Mre,Text:B9,Paragraph:Nre}=Z,{TextArea:V9}=vW,H9=[{label:`对象`,value:`object`},{label:`数组`,value:`array`},{label:`字符串`,value:`string`},{label:`数字`,value:`number`},{label:`布尔`,value:`boolean`},{label:`流程数组`,value:`flow`}],U9=`画面属性`,Pre=new Set([`视频时长`,`视频比例`,`清晰度`,`帧率`,`推荐分辨率`]);function W9(e,t){return e===U9&&!!t&&Pre.has(t)}function G9(e){return e===U9}function Fre(e){return JSON.parse(JSON.stringify(e??null))}function K9(e,t,n,r){return!e||typeof e!=`object`?r:e[t]===void 0?e[n]===void 0?r:e[n]:e[t]}function Ire(e){return{key:String(e?.key||e?.label||`新流程字段`),label:String(e?.label||e?.key||`新流程字段`),enabled:e?.enabled??!0,editable:e?.editable??!0,maxLength:Number(K9(e,`maxLength`,`max_length`,800)||800),value:e?.value??``}}function q9(e){let t=String(e?.type||`string`),n={key:String(e?.key||e?.label||`新字段`),label:String(e?.label||e?.key||`新字段`),type:t,enabled:e?.enabled??!0,editable:e?.editable??!0,maxLength:Number(K9(e,`maxLength`,`max_length`,t===`flow`?800:1e3)||(t===`flow`?800:1e3))};if(t===`object`)n.children=Array.isArray(e?.children)?e.children.map(q9):[];else if(t===`flow`){n.contentKey=String(K9(e,`contentKey`,`content_key`,e?.key===`镜头流程`?`镜头内容`:`动作内容`));let t=K9(e,`contentAliases`,`content_aliases`,[]);n.contentAliases=Array.isArray(t)?t.map(e=>String(e)).filter(Boolean):[];let r=K9(e,`itemFields`,`item_fields`,[]);n.itemFields=Array.isArray(r)&&r.length>0?r.map(Ire):[{key:n.contentKey,label:n.contentKey,enabled:!0,editable:!0,maxLength:n.maxLength||800,value:``}]}else n.value=e?.value??(t===`array`?[]:t===`boolean`?!1:t===`number`?0:`无`);return n}function Lre(e){let t=Array.isArray(e?.segments)?e.segments:[],n=Array.isArray(e?.ratios)?e.ratios:[];return{minDuration:Number(K9(e,`minDuration`,`min_duration`,1)||1),maxDuration:Number(K9(e,`maxDuration`,`max_duration`,5)||5),ratios:n.map(e=>Number(e||0)),segments:t.map(e=>({stage:String(e?.stage||`新阶段`),description:String(e?.description||e?.desc||`阶段说明`)}))}}function J9(e){let t=Array.isArray(e?.sections)?e.sections:[],n=Array.isArray(e?.timePlanRules)?e.timePlanRules:Array.isArray(e?.time_plan_rules)?e.time_plan_rules:[];return{version:e?.version||`video_prompt_schema_config_v1`,enabled:e?.enabled??!0,sections:t.map(q9),timePlanRules:n.map(Lre)}}function Y9(e,t){let n=G9(e.key),r=W9(t,e.key),i={key:e.key,label:e.label,type:r?`string`:e.type,enabled:n||r?!0:!!e.enabled,editable:r?!1:!!e.editable,max_length:e.maxLength};return e.type===`object`?i.children=(e.children||[]).map(t=>Y9(t,e.key)):e.type===`flow`?(i.content_key=e.contentKey,i.content_aliases=e.contentAliases||[],i.item_fields=(e.itemFields||[]).map(e=>({key:e.key,label:e.label,enabled:!!e.enabled,editable:!!e.editable,max_length:e.maxLength,value:e.value??``}))):i.value=e.value,i}function X9(e,t){return{version:e.version,enabled:t,sections:(e.sections||[]).map(e=>Y9(e)),time_plan_rules:(e.timePlanRules||[]).map(e=>({min_duration:e.minDuration,max_duration:e.maxDuration,ratios:e.ratios||[],segments:(e.segments||[]).map(e=>({stage:e.stage,description:e.description}))}))}}function Z9(e){return e?.runtimeSchema||e?.runtime_schema||{}}function Q9(e){let t=e?.timePlan||e?.time_plan||Z9(e)?.动态时间规划||[];return Array.isArray(t)?t:[]}function Rre(e){return e?.schemaConfigSnapshot||e?.schema_config_snapshot||{}}function zre(e,t){let n=new Blob([JSON.stringify(t,null,2)],{type:`application/json;charset=utf-8`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=e,i.click(),URL.revokeObjectURL(r)}var $9=(e=`string`)=>({key:`新字段`,label:`新字段`,type:e,enabled:!0,editable:!0,maxLength:e===`flow`?800:1e3,value:e===`array`?[]:e===`boolean`?!1:e===`number`?0:`无`,children:e===`object`?[]:void 0,contentKey:e===`flow`?`动作内容`:void 0,contentAliases:e===`flow`?[`动作内容`,`动作`,`动作说明`,`内容`,`说明`]:void 0,itemFields:e===`flow`?[{key:`动作内容`,label:`动作内容`,enabled:!0,editable:!0,maxLength:800,value:``}]:void 0}),Bre=()=>({minDuration:1,maxDuration:5,ratios:[.2,.4,.4],segments:[{stage:`开场吸引`,description:`快速吸引注意力`},{stage:`核心展示`,description:`展示主体动作、核心卖点或主要视觉内容`},{stage:`收尾引导`,description:`给出行动引导并稳定落版`}]}),Vre=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!0),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(null),[g]=X.useForm(),_=(0,S.useRef)(null),v=c?.sections||[],y=c?.timePlanRules||[],b=async()=>{t(!0);try{let e=await T5();a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),l(J9(e.data)),d(J9(e.defaultData??e.default_data))}catch(e){BG.error(e?.message||`加载失败`)}finally{t(!1)}};(0,S.useEffect)(()=>{b()},[]);let x=e=>{l(t=>{let n=J9(Fre(t));return e(n),n})},C=async()=>{if(c){r(!0);try{let e=await E5({is_enabled:i,data:X9(c,i)});l(J9(e.data)),a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),BG.success(`保存成功`)}catch(e){BG.error(e?.message||`保存失败`)}finally{r(!1)}}},w=async()=>{r(!0);try{let e=await D5();l(J9(e.data)),d(J9(e.defaultData??e.default_data)),a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),BG.success(`已恢复默认配置`)}catch(e){BG.error(e?.message||`恢复默认失败`)}finally{r(!1)}},T=async()=>{try{zre(`video_prompt_schema_config.json`,await O5())}catch(e){BG.error(e?.message||`导出失败`)}},E=async e=>{let t=e.target.files?.[0];if(e.target.value=``,t)try{let e=await t.text(),n=JSON.parse(e),r=n.data||n,o=await k5({is_enabled:!!(n.isEnabled??n.is_enabled??i),data:r});l(J9(o.data)),a(!!(o.isEnabled??o.is_enabled??o.data?.enabled??!1)),s(!!(o.usingDefault??o.using_default??!1)),BG.success(`导入成功`)}catch(e){BG.error(e?.message||`导入失败,请检查 JSON 格式`)}},D=()=>{g.setFieldsValue({duration:8,aspectRatio:`9:16`,resolution:`1080p`,frameRate:`30fps`}),h(null),p(!0)},O=async()=>{if(!c)return;let e=await g.validateFields();try{h(await A5({is_enabled:i,data:X9(c,i),duration:Number(e.duration||8),aspect_ratio:e.aspectRatio,resolution:e.resolution,frame_rate:e.frameRate}))}catch(e){BG.error(e?.message||`预览失败`)}},k=()=>{x(e=>{e.sections.push($9(`object`))})},A=(e,t)=>{x(n=>{let r=n.sections[e];G9(r?.key)&&(delete t.key,delete t.type,delete t.enabled),n.sections[e]={...n.sections[e],...t},t.type===`object`&&(n.sections[e].children=n.sections[e].children||[]),t.type===`flow`&&(n.sections[e].contentKey=n.sections[e].contentKey||`动作内容`,n.sections[e].contentAliases=n.sections[e].contentAliases||[`动作内容`,`动作`,`动作说明`,`内容`,`说明`],n.sections[e].itemFields=n.sections[e].itemFields||[{key:`动作内容`,label:`动作内容`,enabled:!0,editable:!0,maxLength:800,value:``}])})},j=e=>{x(t=>{t.sections.splice(e,1)})},M=e=>{x(t=>{let n=t.sections[e];n.children=n.children||[],n.children.push($9(`string`))})},N=(e,t,n)=>{x(r=>{let i=r.sections[e],a=i.children||[],o=a[t];W9(i?.key,o?.key)&&(delete n.key,delete n.type,delete n.enabled,n.editable=!1),a[t]={...a[t],...n},r.sections[e].children=a})},P=(e,t)=>{x(n=>{n.sections[e].children?.splice(t,1)})},F=e=>{x(t=>{let n=t.sections[e];n.itemFields=n.itemFields||[],n.itemFields.push({key:`新流程字段`,label:`新流程字段`,enabled:!0,editable:!0,maxLength:800,value:``})})},I=(e,t,n)=>{x(r=>{let i=r.sections[e].itemFields||[];i[t]={...i[t],...n},r.sections[e].itemFields=i})},L=(e,t)=>{x(n=>{n.sections[e].itemFields?.splice(t,1)})},R=()=>{x(e=>{e.timePlanRules.push(Bre())})},z=(e,t)=>{x(n=>{n.timePlanRules[e]={...n.timePlanRules[e],...t}})},B=e=>{x(t=>{t.timePlanRules.splice(e,1)})},V=(e,t,n)=>{x(r=>{let i=r.timePlanRules[e];n.ratio!==void 0&&(i.ratios[t]=Number(n.ratio||0)),n.stage!==void 0&&(i.segments[t].stage=n.stage),n.description!==void 0&&(i.segments[t].description=n.description)})},H=e=>{x(t=>{let n=t.timePlanRules[e];n.ratios.push(1),n.segments.push({stage:`新阶段`,description:`阶段说明`})})},U=(e,t)=>{x(n=>{let r=n.timePlanRules[e];r.ratios.splice(t,1),r.segments.splice(t,1)})},W=(0,S.useMemo)(()=>v.map((e,t)=>({key:`section-${t}`,label:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(B9,{strong:!0,children:e.label||e.key||`未命名分组`}),e.key&&e.key!==e.label&&(0,Q.jsxs)(IQ,{color:`blue`,children:[`key: `,e.key]}),(0,Q.jsx)(IQ,{children:e.type}),G9(e.key)&&(0,Q.jsx)(IQ,{color:`red`,children:`系统锁定`}),!e.enabled&&!G9(e.key)&&(0,Q.jsx)(IQ,{color:`default`,children:`已禁用`})]}),children:(0,Q.jsxs)(WV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsxs)(AK,{gutter:12,align:`middle`,children:[(0,Q.jsx)(gz,{span:4,children:(0,Q.jsx)(vW,{addonBefore:`key`,value:e.key,maxLength:64,placeholder:`传给 AI 的字段名`,disabled:G9(e.key),onChange:e=>A(t,{key:e.target.value})})}),(0,Q.jsx)(gz,{span:4,children:(0,Q.jsx)(vW,{addonBefore:`label`,value:e.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>A(t,{label:e.target.value})})}),(0,Q.jsx)(gz,{span:4,children:(0,Q.jsx)(BC,{value:e.type,options:H9,style:{width:`100%`},disabled:G9(e.key),onChange:e=>A(t,{type:e})})}),(0,Q.jsx)(gz,{span:3,children:(0,Q.jsxs)(WV,{children:[`启用`,(0,Q.jsx)(Fq,{checked:G9(e.key)?!0:e.enabled,disabled:G9(e.key),onChange:e=>A(t,{enabled:e})})]})}),(0,Q.jsx)(gz,{span:3,children:(0,Q.jsxs)(WV,{children:[`可编辑`,(0,Q.jsx)(Fq,{checked:e.editable,onChange:e=>A(t,{editable:e})})]})}),(0,Q.jsx)(gz,{span:4,children:(0,Q.jsx)(lB,{min:1,max:2e4,value:e.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>A(t,{maxLength:Number(e||1e3)})})}),(0,Q.jsx)(gz,{span:2,style:{textAlign:`right`},children:(0,Q.jsx)(qG,{title:`确认删除该分组?`,disabled:G9(e.key),onConfirm:()=>j(t),children:(0,Q.jsx)(YE,{danger:!0,icon:(0,Q.jsx)(zQ,{}),disabled:G9(e.key)})})})]}),e.type===`object`&&(0,Q.jsx)(LR,{size:`small`,title:`对象字段`,extra:(0,Q.jsx)(YE,{size:`small`,icon:(0,Q.jsx)(DL,{}),onClick:()=>M(t),children:`新增字段`}),children:(0,Q.jsx)(WV,{direction:`vertical`,style:{width:`100%`},children:(e.children||[]).map((n,r)=>(0,Q.jsxs)(AK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(gz,{span:4,children:(0,Q.jsx)(vW,{addonBefore:`key`,value:n.key,maxLength:64,placeholder:`传给 AI 的字段名`,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{key:e.target.value})})}),(0,Q.jsx)(gz,{span:4,children:(0,Q.jsx)(vW,{addonBefore:`label`,value:n.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>N(t,r,{label:e.target.value})})}),(0,Q.jsx)(gz,{span:3,children:(0,Q.jsx)(BC,{value:n.type,options:H9.filter(e=>e.value!==`object`&&e.value!==`flow`),style:{width:`100%`},disabled:W9(e.key,n.key),onChange:e=>N(t,r,{type:e})})}),(0,Q.jsx)(gz,{span:2,children:(0,Q.jsxs)(WV,{children:[`启用`,(0,Q.jsx)(Fq,{checked:W9(e.key,n.key)?!0:n.enabled,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{enabled:e})})]})}),(0,Q.jsx)(gz,{span:2,children:(0,Q.jsxs)(WV,{children:[`编辑`,(0,Q.jsx)(Fq,{checked:W9(e.key,n.key)?!1:n.editable,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{editable:e})})]})}),(0,Q.jsx)(gz,{span:3,children:(0,Q.jsx)(lB,{min:1,max:2e4,value:n.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>N(t,r,{maxLength:Number(e||1e3)})})}),(0,Q.jsx)(gz,{span:5,children:(0,Q.jsx)(vW,{value:Array.isArray(n.value)?n.value.join(`/`):String(n.value??``),maxLength:n.maxLength||1e3,placeholder:`默认值`,onChange:e=>N(t,r,{value:n.type===`array`?e.target.value.split(`/`).filter(Boolean):e.target.value})})}),(0,Q.jsx)(gz,{span:1,style:{textAlign:`right`},children:(0,Q.jsx)(YE,{danger:!0,size:`small`,icon:(0,Q.jsx)(zQ,{}),disabled:W9(e.key,n.key),onClick:()=>P(t,r)})})]},`child-${t}-${r}`))})}),e.type===`flow`&&(0,Q.jsxs)(LR,{size:`small`,title:`流程数组对象字段`,extra:(0,Q.jsx)(YE,{size:`small`,icon:(0,Q.jsx)(DL,{}),onClick:()=>F(t),children:`新增流程字段`}),children:[(0,Q.jsxs)(AK,{gutter:12,style:{marginBottom:12},children:[(0,Q.jsx)(gz,{span:6,children:(0,Q.jsx)(vW,{addonBefore:`内容字段`,value:e.contentKey,maxLength:64,onChange:e=>A(t,{contentKey:e.target.value})})}),(0,Q.jsx)(gz,{span:18,children:(0,Q.jsx)(vW,{addonBefore:`别名 / 分隔`,value:(e.contentAliases||[]).join(`/`),onChange:e=>A(t,{contentAliases:e.target.value.split(`/`).map(e=>e.trim()).filter(Boolean)})})})]}),(0,Q.jsx)(WV,{direction:`vertical`,style:{width:`100%`},children:(e.itemFields||[]).map((e,n)=>(0,Q.jsxs)(AK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(gz,{span:5,children:(0,Q.jsx)(vW,{addonBefore:`key`,value:e.key,maxLength:64,placeholder:`流程对象字段名`,onChange:e=>I(t,n,{key:e.target.value})})}),(0,Q.jsx)(gz,{span:5,children:(0,Q.jsx)(vW,{addonBefore:`label`,value:e.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>I(t,n,{label:e.target.value})})}),(0,Q.jsx)(gz,{span:3,children:(0,Q.jsxs)(WV,{children:[`启用`,(0,Q.jsx)(Fq,{checked:e.enabled,onChange:e=>I(t,n,{enabled:e})})]})}),(0,Q.jsx)(gz,{span:3,children:(0,Q.jsxs)(WV,{children:[`编辑`,(0,Q.jsx)(Fq,{checked:e.editable,onChange:e=>I(t,n,{editable:e})})]})}),(0,Q.jsx)(gz,{span:4,children:(0,Q.jsx)(lB,{min:1,max:2e4,value:e.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>I(t,n,{maxLength:Number(e||800)})})}),(0,Q.jsx)(gz,{span:3,children:(0,Q.jsx)(vW,{value:String(e.value??``),maxLength:e.maxLength||800,placeholder:`默认值`,onChange:e=>I(t,n,{value:e.target.value})})}),(0,Q.jsx)(gz,{span:1,style:{textAlign:`right`},children:(0,Q.jsx)(YE,{danger:!0,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>L(t,n)})})]},`flow-${t}-${n}`))})]}),e.type!==`object`&&e.type!==`flow`&&(0,Q.jsx)(LR,{size:`small`,title:`默认值`,children:(0,Q.jsx)(V9,{rows:3,value:Array.isArray(e.value)?e.value.join(` + `,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_gateway`,label:`网关地址`,children:(0,Q.jsx)(hW,{placeholder:`https://openapi.alipay.com/gateway.do`,size:`large`,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_notify_url`,label:`回调地址`,children:(0,Q.jsx)(hW,{placeholder:`https://yourdomain.com/api/payments/alipay/callback`,size:`large`,disabled:!i})})]})]})})]}),(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,marginTop:24},children:(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(v3,{}),onClick:async()=>{try{let e=await u.validateFields();t(!0),await I8({payment_mock:String(o),payment_wechat_enabled:String(n),payment_wechat_appid:e.wechat_appid||``,payment_wechat_mch_id:e.wechat_mch_id||``,payment_wechat_private_key:e.wechat_private_key||``,payment_wechat_cert_serial_no:e.wechat_cert_serial_no||``,payment_wechat_api_v3_key:e.wechat_api_v3_key||``,payment_wechat_notify_url:e.wechat_notify_url||``,payment_wechat_public_key:e.wechat_public_key||``,payment_wechat_public_key_id:e.wechat_public_key_id||``,payment_alipay_enabled:String(i),payment_alipay_app_id:e.alipay_app_id||``,payment_alipay_private_key:e.alipay_private_key||``,payment_alipay_public_key:e.alipay_public_key||``,payment_alipay_notify_url:e.alipay_notify_url||``,payment_alipay_gateway:e.alipay_gateway||``,payment_order_timeout:String(e.order_timeout||180)}),LG.success(`支付配置已保存`),d()}catch{LG.error(`保存失败`)}finally{t(!1)}},loading:e,size:`large`,style:{borderRadius:8,minWidth:160,height:44,fontSize:15},children:`保存配置`})})]})},{Option:v7}=RC,{RangePicker:vne}=YB,yne=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)(1),[o,s]=(0,S.useState)(10),[c,l]=(0,S.useState)(0),[u,d]=(0,S.useState)({startDate:(0,YE.default)().format(`YYYY-MM-DD`),endDate:(0,YE.default)().format(`YYYY-MM-DD`)}),f=async()=>{try{t(!0);let[e,n]=await Promise.all([L8(u),R8({...u,page:i,pageSize:o})]);r({...e,recent:n.items||[]}),l(n.total)}catch{LG.error(`加载支付统计失败`)}finally{t(!1)}};(0,S.useEffect)(()=>{f()},[u,i,o]);let p=(e,t)=>{a(e),s(t)},m=()=>{d({startDate:(0,YE.default)().format(`YYYY-MM-DD`),endDate:(0,YE.default)().format(`YYYY-MM-DD`)})},h=async e=>{try{t(!0),await z8(e),LG.success(`退款成功`),await f()}catch(e){LG.error(e?.response?.data?.detail||`退款失败`)}finally{t(!1)}},g=e=>{e&&e.length===2&&d(t=>({...t,startDate:e[0].format(`YYYY-MM-DD`),endDate:e[1].format(`YYYY-MM-DD`)}))},_={paid:{color:`green`,label:`已支付`,icon:(0,Q.jsx)(N0,{})},pending:{color:`gold`,label:`待支付`,icon:(0,Q.jsx)(HB,{})},cancelled:{color:`default`,label:`已取消`,icon:(0,Q.jsx)(I0,{})},refunded:{color:`red`,label:`已退款`,icon:(0,Q.jsx)(x6,{})}},v={alipay:{color:`blue`,label:`支付宝`},wechat:{color:`green`,label:`微信`}},y=[{title:`订单号`,dataIndex:`orderNo`,key:`orderNo`,width:200},{title:`用户`,dataIndex:`username`,key:`username`,width:120},{title:`支付方式`,dataIndex:`paymentMethod`,key:`paymentMethod`,width:100,render:e=>{let t=v[e]||{color:`default`,label:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.label})}},{title:`金额`,dataIndex:`amount`,key:`amount`,width:100,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:`#10b981`},children:[`¥`,e.toFixed(2)]})},{title:`积分`,dataIndex:`credits`,key:`credits`,width:80},{title:`状态`,dataIndex:`status`,key:`status`,width:100,render:e=>{let t=_[e]||{color:`default`,label:e,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.label})}},{title:`支付宝交易号`,dataIndex:`tradeNo`,key:`tradeNo`,width:200,render:e=>e||`-`},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,Q.jsx)(`span`,{className:`date-display`,style:{color:`#94a3b8`},children:e?Z5(e):`-`})},{title:`支付时间`,dataIndex:`paidAt`,key:`paidAt`,width:160,render:e=>(0,Q.jsx)(`span`,{className:`date-display`,style:{color:`#94a3b8`},children:e?Z5(e):`-`})},{title:`操作`,key:`action`,width:120,render:(e,t)=>t.status===`paid`?(0,Q.jsx)(WG,{title:`确认要退款该订单吗?`,description:`退款后积分会扣除,金额会原路返回`,onConfirm:()=>h(t.orderNo),okText:`确认`,cancelText:`取消`,children:(0,Q.jsx)(qE,{type:`link`,danger:!0,size:`small`,icon:(0,Q.jsx)(x6,{}),children:`退款`})}):null}];if(!n)return(0,Q.jsx)(`div`,{style:{padding:24,color:`#94a3b8`},children:`加载中…`});let b=n.byStatus?.paid||{count:0,amount:0},x=n.byStatus?.pending||{count:0,amount:0},C=n.byStatus?.cancelled||{count:0,amount:0},w=n.byStatus?.refunded||{count:0,amount:0},T=b.count+x.count+C.count+w.count,E=n.month||{count:0,amount:0};return(0,Q.jsx)(am,{locale:U6.default,children:(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(DK,{gutter:[16,16],style:{marginBottom:24},children:[(0,Q.jsx)(pz,{xs:24,sm:12,lg:12,children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsx)(zK,{title:`今日收入`,value:n.today.paidAmount,precision:2,prefix:(0,Q.jsx)(l2,{style:{color:`#10b981`}}),suffix:`元`,valueStyle:{color:`#10b981`,fontWeight:700}}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[n.today.paidCount,` 笔订单`]})]})}),(0,Q.jsx)(pz,{xs:24,sm:12,lg:12,children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsx)(zK,{title:`本月累计`,value:E.paidAmount,precision:2,prefix:(0,Q.jsx)(l2,{style:{color:`#6366f1`}}),suffix:`元`,valueStyle:{color:`#6366f1`,fontWeight:700}}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[E.paidCount,` 笔订单`]})]})})]}),(0,Q.jsx)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,marginBottom:16},title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(l2,{}),`订单状态分布`]}),children:(0,Q.jsx)(DK,{gutter:16,children:[`paid`,`pending`,`cancelled`,`refunded`].map(e=>{let t=n.byStatus?.[e]||{count:0,amount:0},r=_[e],i=T>0?(t.count/T*100).toFixed(1):`0.0`;return(0,Q.jsx)(pz,{span:6,children:(0,Q.jsxs)(`div`,{style:{padding:16,borderRadius:10,background:`#fafbff`,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(NQ,{color:r.color,icon:r.icon,children:r.label}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[i,`%`]})]}),(0,Q.jsxs)(`div`,{style:{marginTop:8,fontSize:20,fontWeight:700},children:[t.count,` `,(0,Q.jsx)(`span`,{style:{fontSize:13,color:`#94a3b8`,fontWeight:400},children:`笔`})]}),(0,Q.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`,marginTop:4},children:[`¥`,t.amount.toFixed(2)]})]})},e)})})}),(0,Q.jsxs)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(l2,{}),`订单列表`]}),children:[(0,Q.jsxs)(DK,{gutter:[16,16],align:`middle`,style:{marginBottom:24},children:[(0,Q.jsxs)(pz,{xs:24,sm:12,md:6,children:[(0,Q.jsx)(`span`,{style:{marginRight:8},children:`支付方式:`}),(0,Q.jsxs)(RC,{placeholder:`全部`,allowClear:!0,style:{width:150},value:u.paymentMethod,onChange:e=>d(t=>({...t,paymentMethod:e})),children:[(0,Q.jsx)(v7,{value:`alipay`,children:`支付宝`}),(0,Q.jsx)(v7,{value:`wechat`,children:`微信`})]})]}),(0,Q.jsxs)(pz,{xs:24,sm:12,md:6,children:[(0,Q.jsx)(`span`,{style:{marginRight:8},children:`状态:`}),(0,Q.jsxs)(RC,{placeholder:`全部`,allowClear:!0,style:{width:150},value:u.status,onChange:e=>d(t=>({...t,status:e})),children:[(0,Q.jsx)(v7,{value:`paid`,children:`已支付`}),(0,Q.jsx)(v7,{value:`pending`,children:`待支付`}),(0,Q.jsx)(v7,{value:`cancelled`,children:`已取消`}),(0,Q.jsx)(v7,{value:`refunded`,children:`已退款`})]})]}),(0,Q.jsxs)(pz,{xs:24,sm:12,md:8,children:[(0,Q.jsx)(`span`,{style:{marginRight:8},children:`日期范围:`}),(0,Q.jsx)(vne,{value:[(0,YE.default)(u.startDate),(0,YE.default)(u.endDate)],onChange:g})]}),(0,Q.jsx)(pz,{xs:24,sm:12,md:4,children:(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:m,children:`重置`})})]}),(0,Q.jsx)(bQ,{columns:y,dataSource:n.recent||[],rowKey:`id`,loading:e,pagination:{current:i,pageSize:o,total:c,onChange:p,showSizeChanger:!0,showTotal:e=>`共 ${e} 条`},scroll:{x:1e3},size:`middle`})]})]})})},y7=[{name:`ShoppingCartOutlined`,label:`购物`,component:(0,Q.jsx)(A3,{})},{name:`BookOutlined`,label:`书籍`,component:(0,Q.jsx)(h0,{})},{name:`HomeOutlined`,label:`房产`,component:(0,Q.jsx)(Z2,{})},{name:`FireOutlined`,label:`火`,component:(0,Q.jsx)(D2,{})},{name:`RocketOutlined`,label:`科技`,component:(0,Q.jsx)(l3,{})},{name:`SkinOutlined`,label:`时尚`,component:(0,Q.jsx)(z3,{})},{name:`CompassOutlined`,label:`指南`,component:(0,Q.jsx)(Z0,{})},{name:`HeartOutlined`,label:`健康`,component:(0,Q.jsx)(H2,{})},{name:`CarOutlined`,label:`汽车`,component:(0,Q.jsx)(A0,{})},{name:`CameraOutlined`,label:`相机`,component:(0,Q.jsx)(D0,{})},{name:`CloudOutlined`,label:`云`,component:(0,Q.jsx)(z0,{})},{name:`StarOutlined`,label:`星`,component:(0,Q.jsx)(Z3,{})},{name:`TrophyOutlined`,label:`奖杯`,component:(0,Q.jsx)(h6,{})},{name:`ThunderboltOutlined`,label:`闪电`,component:(0,Q.jsx)(l6,{})},{name:`BulbOutlined`,label:`灯泡`,component:(0,Q.jsx)(x0,{})},{name:`CoffeeOutlined`,label:`咖啡`,component:(0,Q.jsx)(J0,{})},{name:`CrownOutlined`,label:`皇冠`,component:(0,Q.jsx)(e2,{})},{name:`DashboardOutlined`,label:`仪表`,component:(0,Q.jsx)(r2,{})},{name:`FlagOutlined`,label:`旗帜`,component:(0,Q.jsx)(A2,{})},{name:`GlobalOutlined`,label:`全球`,component:(0,Q.jsx)(z2,{})},{name:`GiftOutlined`,label:`礼物`,component:(0,Q.jsx)(I2,{})},{name:`LaptopOutlined`,label:`笔记本`,component:(0,Q.jsx)(r4,{})},{name:`MobileOutlined`,label:`手机`,component:(0,Q.jsx)(A4,{})},{name:`MonitorOutlined`,label:`显示器`,component:(0,Q.jsx)(N4,{})},{name:`PayCircleOutlined`,label:`支付`,component:(0,Q.jsx)(I4,{})},{name:`PictureOutlined`,label:`图片`,component:(0,Q.jsx)(H4,{})},{name:`PlayCircleOutlined`,label:`播放`,component:(0,Q.jsx)(J4,{})},{name:`SafetyOutlined`,label:`安全`,component:(0,Q.jsx)(h3,{})},{name:`ShoppingOutlined`,label:`商店`,component:(0,Q.jsx)(N3,{})},{name:`SmileOutlined`,label:`笑脸`,component:(0,Q.jsx)(H3,{})},{name:`SoundOutlined`,label:`声音`,component:(0,Q.jsx)(J3,{})},{name:`TagOutlined`,label:`标签`,component:(0,Q.jsx)(r6,{})},{name:`TeamOutlined`,label:`团队`,component:(0,Q.jsx)(o6,{})},{name:`ToolOutlined`,label:`工具`,component:(0,Q.jsx)(f6,{})},{name:`TruckOutlined`,label:`物流`,component:(0,Q.jsx)(v6,{})},{name:`VideoCameraOutlined`,label:`视频`,component:(0,Q.jsx)(A6,{})},{name:`WalletOutlined`,label:`钱包`,component:(0,Q.jsx)(N6,{})},{name:`BankOutlined`,label:`银行`,component:(0,Q.jsx)(o0,{})},{name:`BuildOutlined`,label:`建筑`,component:(0,Q.jsx)(v0,{})},{name:`ExperimentOutlined`,label:`实验`,component:(0,Q.jsx)(h2,{})},{name:`HighlightOutlined`,label:`高亮`,component:(0,Q.jsx)(G2,{})},{name:`IdcardOutlined`,label:`名片`,component:(0,Q.jsx)(e4,{})},{name:`MedicineBoxOutlined`,label:`医药`,component:(0,Q.jsx)(x4,{})},{name:`ReadOutlined`,label:`阅读`,component:(0,Q.jsx)(e3,{})},{name:`RestOutlined`,label:`休息`,component:(0,Q.jsx)(r3,{})},{name:`SketchOutlined`,label:`钻石`,component:(0,Q.jsx)(I3,{})},{name:`SolutionOutlined`,label:`方案`,component:(0,Q.jsx)(G3,{})}],bne=Object.fromEntries(y7.map(e=>[e.name,e.component]));function b7(e){return bne[e]||(0,Q.jsx)(G1,{})}function xne(e){try{let t=typeof e==`string`?JSON.parse(e):e;if(!Array.isArray(t))return{skillItems:[],optionGroups:[]};let n=[],r=[];for(let e of t)e&&e.type===`option_group`&&e.name&&Array.isArray(e.options)?r.push({name:e.name,options:e.options}):e&&e.key&&e.label&&n.push({key:e.key,label:e.label});return{skillItems:n,optionGroups:r}}catch{return{skillItems:[],optionGroups:[]}}}var Sne=({value:e,onChange:t})=>{let n=y7.find(t=>t.name===e);return(0,Q.jsx)(UV,{trigger:[`click`],dropdownRender:()=>(0,Q.jsx)(`div`,{style:{background:`#fff`,borderRadius:12,padding:12,width:360,boxShadow:`0 12px 40px rgba(0,0,0,0.15)`,border:`1px solid #f0f0f5`},children:(0,Q.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(8, 1fr)`,gap:4},children:y7.map(n=>(0,Q.jsx)(`div`,{onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),t?.(n.name)},title:n.label,style:{width:40,height:40,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,fontSize:18,transition:`all 0.15s`,background:e===n.name?`#6366f1`:`transparent`,color:e===n.name?`#fff`:`#64748b`,border:e===n.name?`none`:`1px solid transparent`},onMouseEnter:t=>{e!==n.name&&(t.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:t=>{e!==n.name&&(t.currentTarget.style.background=`transparent`)},children:n.component},n.name))})}),children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`8px 12px`,borderRadius:8,border:`1px solid #d9d9d9`,cursor:`pointer`,height:40},children:[e?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{style:{fontSize:18,color:`#6366f1`},children:b7(e)}),(0,Q.jsx)(`span`,{style:{color:`#64748b`,fontSize:13},children:n?.label||e})]}):(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`,fontSize:13},children:`选择图标`}),(0,Q.jsx)(AC,{style:{fontSize:10,color:`#bfbfbf`,marginLeft:`auto`}})]})})},Cne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)({open:!1,item:null}),[c]=X.useForm(),l=async()=>{r(!0);try{t((await C8()).map(e=>{let{skillItems:t,optionGroups:n}=xne(e.skills);return{id:e.id,key:e.key,label:e.label,icon:e.icon||``,description:e.description||``,skills:JSON.stringify(t),optionGroups:n,isActive:e.is_active??e.isActive??!0,sortOrder:e.sort_order??e.sortOrder??0}}))}catch{LG.error(`加载行业配置失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{l()},[]);let u=async()=>{try{let e=await c.validateFields();a(!0);let t=[];e.skills_wentutujie?.trim()&&t.push({type:`skill`,key:`文图理解生成视频提示词`,label:e.skills_wentutujie.trim()}),e.skills_wentutujie_image?.trim()&&t.push({type:`skill`,key:`文图理解生成图片提示词`,label:e.skills_wentutujie_image.trim()});let n=(e.optionGroups||[]).filter(e=>e?.name?.trim()).map(e=>({name:e.name.trim(),options:(e.options||[]).filter(e=>e?.trim())})).filter(e=>e.options.length>0);for(let e of n)t.push({type:`option_group`,name:e.name,options:e.options});let r={key:e.key,label:e.label,icon:e.icon||``,description:e.description||``,skills:t,is_active:e.is_active??!0,sort_order:e.sort_order??0};o.item?.id?(await w8({id:o.item.id,...r}),LG.success(`已更新`)):(await w8(r),LG.success(`已添加`)),s({open:!1,item:null}),c.resetFields(),l()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}finally{a(!1)}},d=async e=>{try{await T8(e),LG.success(`已删除`),l()}catch(e){LG.error(e?.message||`删除失败`)}},f=e=>{s({open:!0,item:e||null});let t=``,n=``,r=[];if(e){try{let r=JSON.parse(e.skills);if(Array.isArray(r))for(let e of r)(e.key===`文图理解生成视频提示词`||e.key===`文图理解`)&&(t=e.label||``),e.key===`文图理解生成图片提示词`&&(n=e.label||``)}catch{}r=e.optionGroups.length>0?e.optionGroups:[{name:``,options:[]}]}e?c.setFieldsValue({key:e.key,label:e.label,icon:e.icon||``,description:e.description,skills_wentutujie:t,skills_wentutujie_image:n,optionGroups:r,is_active:e.isActive,sort_order:e.sortOrder}):(c.resetFields(),c.setFieldsValue({is_active:!0,sort_order:0,optionGroups:[{name:``,options:[]}]}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(G1,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`行业与技能配置`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 个行业`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>f(),style:{borderRadius:8},children:`添加行业`})]}),(0,Q.jsx)(bQ,{columns:[{title:`行业`,key:`industry`,width:180,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsx)(`div`,{style:{width:36,height:36,borderRadius:10,background:`#f1f5f9`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:18,color:`#6366f1`,flexShrink:0},children:b7(t.icon)}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.label}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.key})]})]})},{title:`描述`,dataIndex:`description`,ellipsis:!0},{title:`选项配置`,key:`optionGroups`,width:260,render:(e,t)=>!t.optionGroups||t.optionGroups.length===0?(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#cbd5e1`},children:`未配置`}):(0,Q.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:t.optionGroups.map((e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,Q.jsx)(NQ,{color:`blue`,style:{margin:0,fontSize:11},children:e.name}),(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#64748b`},children:[e.options.slice(0,3).join(`、`),e.options.length>3?`...${e.options.length}项`:``]})]},t))})},{title:`文图理解生成视频提示词`,dataIndex:`skills`,ellipsis:!0,render:e=>{try{let t=JSON.parse(e);if(Array.isArray(t)){let e=t.find(e=>e.key===`文图理解生成视频提示词`||e.key===`文图理解`);if(e)return(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{fontSize:12},children:e.label})}}catch{}return(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`})}},{title:`文图理解生成图片提示词`,dataIndex:`skills`,ellipsis:!0,render:e=>{try{let t=JSON.parse(e);if(Array.isArray(t)){let e=t.find(e=>e.key===`文图理解生成图片提示词`);if(e)return(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{fontSize:12},children:e.label})}}catch{}return(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`})}},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>f(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除该行业?`,onConfirm:()=>d(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(G1,{}),o.item?`编辑行业`:`添加行业`]}),open:o.open,onOk:u,onCancel:()=>{s({open:!1,item:null}),c.resetFields()},okText:`保存`,cancelText:`取消`,width:640,confirmLoading:i,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`key`,label:`行业标识`,style:{flex:1},rules:[{required:!0,message:`请输入标识`}],children:(0,Q.jsx)(hW,{placeholder:`例如:ecommerce`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`label`,label:`行业名称`,style:{flex:1},rules:[{required:!0,message:`请输入名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:电商`,size:`large`})})]}),(0,Q.jsx)(X.Item,{name:`icon`,label:`行业图标`,children:(0,Q.jsx)(Sne,{})}),(0,Q.jsx)(X.Item,{name:`description`,label:`行业描述`,children:(0,Q.jsx)(hW.TextArea,{rows:2,placeholder:`行业描述`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`skills_wentutujie`,label:`文图理解生成视频提示词`,extra:`用于LLM优化视频提示词的系统指令,根据行业特点引导AI理解文案与画面的关系`,children:(0,Q.jsx)(hW.TextArea,{rows:3,placeholder:`请输入文图理解生成视频提示词,例如: +你是一位专业的电商视频文案专家,擅长将产品卖点转化为视觉语言`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`skills_wentutujie_image`,label:`文图理解生成图片提示词`,extra:`用于LLM优化图片提示词的系统指令,根据行业特点引导AI理解文案与画面的关系`,children:(0,Q.jsx)(hW.TextArea,{rows:3,placeholder:`请输入文图理解生成图片提示词,例如: +你是一位专业的电商图片文案专家,擅长将产品卖点转化为图片生成提示词`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{marginBottom:8},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:`行业选项配置`}),(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`添加选项组,每组包含名称和多个选项,前台将显示为下拉选择`})]}),(0,Q.jsx)(X.List,{name:`optionGroups`,children:(e,{add:t,remove:n})=>(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8,marginBottom:16},children:[e.map(({key:e,name:t,...r})=>(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`flex-start`,padding:`10px 12px`,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,gap:8},children:[(0,Q.jsx)(X.Item,{...r,name:[t,`name`],label:`选项名称`,style:{marginBottom:0},rules:[{required:!0,message:`请输入选项名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:视频风格`,size:`middle`,style:{borderRadius:8}})}),(0,Q.jsx)(X.Item,{...r,name:[t,`options`],label:`选项内容`,style:{marginBottom:0},children:(0,Q.jsx)(RC,{mode:`tags`,size:`middle`,placeholder:`输入选项后回车添加`,style:{borderRadius:8},tokenSeparators:[`,`,`,`,`、`]})})]}),(0,Q.jsx)(D4,{onClick:()=>n(t),style:{color:`#ef4444`,fontSize:16,marginTop:34,cursor:`pointer`,flexShrink:0}})]},e)),(0,Q.jsx)(qE,{type:`dashed`,onClick:()=>t(),block:!0,icon:(0,Q.jsx)(TL,{}),style:{borderRadius:8,height:36},children:`添加选项组`})]})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`is_active`,label:`启用状态`,valuePropName:`checked`,initialValue:!0,style:{flex:1},children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{name:`sort_order`,label:`排序`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(hW,{type:`number`,size:`large`})})]})]})})]})};function x7(e){if(Array.isArray(e))return e;if(typeof e==`string`)try{return JSON.parse(e)}catch{return[]}return[]}var wne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,engine:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await E8()).map(e=>({...e,supportedRatios:x7(e.supportedRatios),supportedResolutions:x7(e.supportedResolutions),supportedDurations:x7(e.supportedDurations)})))}catch{LG.error(`加载视频引擎失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={name:e.name,provider:e.provider,api_base:e.apiBase,api_key:e.apiKey,model_name:e.modelName,supported_ratios:JSON.stringify(e.supportedRatios||[]),supported_resolutions:JSON.stringify(e.supportedResolutions||[]),supported_durations:JSON.stringify(e.supportedDurations||[]),is_active:e.isActive??!0,priority:e.priority??0};i.engine?(await D8({id:i.engine.id,...t}),LG.success(`已更新`)):(await D8(t),LG.success(`已添加`)),a({open:!1,engine:null}),o.resetFields(),s()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},l=async e=>{try{await O8(e),LG.success(`已删除`),s()}catch{LG.error(`删除失败`)}},u=e=>{a({open:!0,engine:e||null}),e?o.setFieldsValue(e):(o.resetFields(),o.setFieldsValue({isActive:!0,priority:0,supportedRatios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],supportedResolutions:[`480p`,`720p`,`1080p`],supportedDurations:[4,5,6,7,8,9,10,11,12,13,14,15]}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`视频引擎配置`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 个引擎`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加引擎`})]}),(0,Q.jsx)(bQ,{columns:[{title:`引擎名称`,key:`name`,width:180,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsx)(`div`,{style:{width:36,height:36,borderRadius:8,background:t.isActive?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`linear-gradient(135deg, #94a3b8, #cbd5e1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:16},children:(0,Q.jsx)(J4,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.provider})]})]})},{title:`支持比例`,dataIndex:`supportedRatios`,width:200,render:e=>(0,Q.jsx)(VV,{size:2,wrap:!0,children:e.map(e=>(0,Q.jsx)(NQ,{children:e},e))})},{title:`支持分辨率`,dataIndex:`supportedResolutions`,width:150,render:e=>(0,Q.jsx)(VV,{size:2,wrap:!0,children:e.map(e=>(0,Q.jsx)(NQ,{color:`blue`,children:e},e))})},{title:`支持时长`,dataIndex:`supportedDurations`,width:120,render:e=>(0,Q.jsx)(NQ,{color:`orange`,children:e?.length?`${Math.min(...e)}-${Math.max(...e)}s`:`-`})},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J4,{}),i.engine?`编辑引擎`:`添加引擎`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,engine:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:620,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`引擎名称`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`Seedance 2.0`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`provider`,label:`提供商`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`ark`,label:`火山引擎 (Ark)`}]})})]}),(0,Q.jsx)(X.Item,{name:`apiBase`,label:`API基础地址`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`apiKey`,label:`API Key`,children:(0,Q.jsx)(hW.Password,{placeholder:`sk-****`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`modelName`,label:`模型名称`,children:(0,Q.jsx)(hW,{placeholder:`doubao-seedance-2-0-260128`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`supportedRatios`,label:`支持比例`,children:(0,Q.jsx)(RC,{mode:`multiple`,size:`large`,options:[{value:`16:9`,label:`16:9 (横屏)`},{value:`4:3`,label:`4:3 (标准)`},{value:`1:1`,label:`1:1 (方形)`},{value:`3:4`,label:`3:4 (竖版)`},{value:`9:16`,label:`9:16 (竖屏)`},{value:`21:9`,label:`21:9 (超宽)`}]})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`supportedResolutions`,label:`支持分辨率`,style:{flex:1},children:(0,Q.jsx)(RC,{mode:`multiple`,size:`large`,options:[{value:`480p`},{value:`720p`},{value:`1080p`}]})}),(0,Q.jsx)(X.Item,{name:`supportedDurations`,label:`支持时长(秒)`,style:{flex:1},children:(0,Q.jsx)(RC,{mode:`multiple`,size:`large`,options:Array.from({length:12},(e,t)=>({value:t+4,label:`${t+4}秒`}))})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`priority`,label:`优先级`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:0,label:`0 (默认)`},{value:1,label:`1`},{value:2,label:`2`},{value:3,label:`3`},{value:5,label:`5`},{value:10,label:`10 (最高)`}]})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,style:{paddingTop:30},children:(0,Q.jsx)(Mq,{})})]})]})})]})};function Tne(e){if(Array.isArray(e))return e;if(typeof e==`string`)try{return JSON.parse(e)}catch{return[]}return[]}function Ene(e){if(e&&typeof e==`object`&&!Array.isArray(e))return e;if(typeof e==`string`)try{let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:{}}catch{return{}}return{}}var S7={"2K":{"1:1":`2048×2048`,"4:3":`2304×1728`,"3:4":`1728×2304`,"16:9":`2560×1440`,"9:16":`1600×2848`,"3:2":`2496×1664`,"2:3":`1664×2496`,"21:9":`3024×1296`},"4K":{"1:1":`4096×4096`,"4:3":`4608×3456`,"3:4":`3520×4704`,"16:9":`5404×3040`,"9:16":`3040×5504`,"3:2":`4992×3328`,"2:3":`3328×4992`,"21:9":`6197×2656`}},C7=[`1:1`,`4:3`,`3:4`,`16:9`,`9:16`,`3:2`,`2:3`,`21:9`],Dne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,engine:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await k8()).map(e=>({...e,supportedModels:Tne(e.supportedModels),supportedSizes:Ene(e.supportedSizes)})))}catch{LG.error(`加载图片引擎失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={};for(let n of[`2K`,`4K`]){let r=e[`size_${n}`]||[];if(r.length>0){t[n]={};for(let e of r)t[n][e]=S7[n]?.[e]||e}}let n={name:e.name,provider:e.provider,api_base:e.apiBase,api_key:e.apiKey,model_name:e.modelName,supported_models:JSON.stringify(e.supportedModels||[]),supported_sizes:JSON.stringify(t),default_size:e.defaultSize||`2K`,generate_url:e.generateUrl||``,is_active:e.isActive??!0,priority:e.priority??0};i.engine?(await A8({id:i.engine.id,...n}),LG.success(`已更新`)):(await A8(n),LG.success(`已添加`)),a({open:!1,engine:null}),o.resetFields(),s()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},l=async e=>{try{await j8(e),LG.success(`已删除`),s()}catch{LG.error(`删除失败`)}},u=e=>{if(a({open:!0,engine:e||null}),e){let t={};for(let n of[`2K`,`4K`])t[`size_${n}`]=Object.keys(e.supportedSizes?.[n]||{});o.setFieldsValue({...e,...t})}else o.resetFields(),o.setFieldsValue({isActive:!0,priority:0,supportedModels:[`doubao-seedream-5-0-260128`],defaultSize:`2K`,size_2K:C7,size_4K:C7})};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(H4,{style:{fontSize:18,color:`#10b981`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`图片引擎配置`}),(0,Q.jsxs)(NQ,{color:`green`,children:[e.length,` 个引擎`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加引擎`})]}),(0,Q.jsx)(bQ,{columns:[{title:`引擎名称`,key:`name`,width:180,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsx)(`div`,{style:{width:36,height:36,borderRadius:8,background:t.isActive?`linear-gradient(135deg, #10b981, #059669)`:`linear-gradient(135deg, #94a3b8, #cbd5e1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:16},children:(0,Q.jsx)(H4,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.modelName})]})]})},{title:`2K 支持比例`,key:`sizes_2k`,width:260,render:(e,t)=>{let n=Object.keys(t.supportedSizes?.[`2K`]||{});return n.length===0?(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`}):(0,Q.jsx)(VV,{size:2,wrap:!0,children:n.map(e=>(0,Q.jsxs)(NQ,{color:`blue`,children:[e,` `,t.supportedSizes[`2K`][e]]},e))})}},{title:`4K 支持比例`,key:`sizes_4k`,width:260,render:(e,t)=>{let n=Object.keys(t.supportedSizes?.[`4K`]||{});return n.length===0?(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`}):(0,Q.jsx)(VV,{size:2,wrap:!0,children:n.map(e=>(0,Q.jsxs)(NQ,{color:`purple`,children:[e,` `,t.supportedSizes[`4K`][e]]},e))})}},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:1e3}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(H4,{}),i.engine?`编辑引擎`:`添加引擎`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,engine:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:680,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`引擎名称`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`豆包文生图`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`provider`,label:`提供商`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`ark`,label:`火山引擎 (Ark)`}]})})]}),(0,Q.jsx)(X.Item,{name:`apiBase`,label:`API基础地址`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`apiKey`,label:`API Key`,children:(0,Q.jsx)(hW.Password,{placeholder:`sk-****`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`modelName`,label:`默认模型`,children:(0,Q.jsx)(hW,{placeholder:`doubao-seedream-5-0-260128`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`supportedModels`,label:`支持模型列表`,children:(0,Q.jsx)(RC,{mode:`tags`,size:`large`,placeholder:`输入模型ID后回车添加`,tokenSeparators:[`,`,`,`],options:[{value:`doubao-seedream-5-0-260128`}]})}),(0,Q.jsxs)(`div`,{style:{background:`#f8f9fc`,borderRadius:10,padding:16,marginBottom:8},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`尺寸配置`}),(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`勾选每个档位支持的比例,前台选择后传对应像素值给SDK`})]}),[`2K`,`4K`].map(e=>(0,Q.jsxs)(`div`,{style:{background:`#fafbfc`,borderRadius:10,padding:`12px 16px`,marginBottom:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13,color:e===`2K`?`#3b82f6`:`#8b5cf6`},children:e}),(0,Q.jsx)(X.Item,{name:`size_${e}`,style:{marginTop:8,marginBottom:0},children:(0,Q.jsx)(oz.Group,{style:{width:`100%`},children:(0,Q.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, 1fr)`,gap:`6px 0`},children:C7.map(t=>(0,Q.jsxs)(oz,{value:t,style:{fontSize:12},children:[t,` `,(0,Q.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:11},children:S7[e]?.[t]})]},t))})})})]},e)),(0,Q.jsx)(X.Item,{name:`defaultSize`,label:`默认尺寸档位`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`2K`,label:`2K`},{value:`4K`,label:`4K`}]})}),(0,Q.jsx)(X.Item,{name:`generateUrl`,label:`生成接口地址`,children:(0,Q.jsx)(hW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3/images/generations`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`priority`,label:`优先级`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:0,label:`0 (默认)`},{value:1,label:`1`},{value:2,label:`2`},{value:3,label:`3`},{value:5,label:`5`},{value:10,label:`10 (最高)`}]})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,style:{paddingTop:30},children:(0,Q.jsx)(Mq,{})})]})]})})]})},One=[`2K`,`4K`],kne=[`480p`,`720p`,`1080p`],Ane=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)({open:!1,ratio:null}),[c]=X.useForm(),[l,u]=(0,S.useState)(10),[d,f]=(0,S.useState)(null),[p,m]=(0,S.useState)(!1),h=X.useWatch(`genType`,c)||`video`,g=X.useWatch(`modelConfigId`,c),_=async()=>{a(!0);try{let[e,n,i]=await Promise.all([M8(),_8(),h5()]),a=(i?.engine?.image||[]).map(e=>({...e,genType:`image`})),o=(i?.engine?.video||[]).map(e=>({...e,genType:`video`}));t(e),r([...o,...a]);let s=n.find(e=>e.key===`text_credits_per_1000_tokens`);s&&(u(Number(s.value)||10),f({id:s.id}))}catch{LG.error(`加载积分比例失败`)}finally{a(!1)}};(0,S.useEffect)(()=>{_()},[]);let v=(0,S.useMemo)(()=>n.filter(e=>e.genType===h).map(e=>({value:e.id,label:`${e.name}${e.modelName?`(${e.modelName})`:``}`})),[n,h]),y=(0,S.useMemo)(()=>n.find(e=>e.id===g&&e.genType===h),[n,h,g]),b=(0,S.useMemo)(()=>{if(h===`image`){let e=y?.supportedSizes?Object.keys(y.supportedSizes):[];return(e.length?e:One).map(e=>({value:e,label:e}))}let e=y?.supportedResolutions||[];return(e.length?e:kne).map(e=>({value:e,label:e}))},[h,y]),x=(e,t)=>n.find(n=>n.id===e&&(!t||n.genType===t))?.name||e,C=async()=>{try{let e=await c.validateFields(),t={model_config_id:e.modelConfigId,gen_type:e.genType,resolution:e.resolution,ratio:e.ratio,base_credits:e.baseCredits,per_second_credits:e.genType===`image`?0:e.perSecondCredits||0};o.ratio?(await N8({id:o.ratio.id,...t}),LG.success(`已更新`)):(await N8(t),LG.success(`已添加`)),s({open:!1,ratio:null}),c.resetFields(),_()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},w=async e=>{try{await P8(e),LG.success(`已删除`),_()}catch{LG.error(`删除失败`)}},T=async()=>{if(d){m(!0);try{await v8(d.id,String(l)),LG.success(`文字积分费率已更新`)}catch(e){LG.error(e?.message||`保存失败`)}finally{m(!1)}}},E=e=>{s({open:!0,ratio:e||null}),e?c.setFieldsValue({modelConfigId:e.modelConfigId,genType:e.genType===`image`?`image`:`video`,resolution:e.resolution,ratio:e.ratio,baseCredits:e.baseCredits,perSecondCredits:e.perSecondCredits}):(c.resetFields(),c.setFieldsValue({genType:`video`,ratio:1,baseCredits:60,perSecondCredits:2}))};return(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(N2,{style:{fontSize:18,color:`#f59e0b`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`文字积分费率`})]}),(0,Q.jsx)(qE,{type:`primary`,loading:p,onClick:T,style:{borderRadius:8},children:`保存`})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{display:`block`,marginBottom:16,fontSize:13},children:`文字积分计算公式:ceil(总token数 x 费率 / 1000),最低1积分`}),(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,Q.jsx)(Z.Text,{children:`每1000 token消耗积分:`}),(0,Q.jsxs)(VV.Compact,{style:{width:160},children:[(0,Q.jsx)(oB,{min:0,max:1e3,step:.01,value:l,onChange:e=>u(e||0),size:`large`,style:{width:`100%`}}),(0,Q.jsx)(Z.Text,{children:`积分`})]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[`示例:1000 token = `,l,` 积分,500 token = `,(500*l/1e3).toFixed(4),` 积分`]})]})]}),(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w0,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`积分比例配置`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 条规则`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>E(),style:{borderRadius:8},children:`添加比例`})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{display:`block`,marginBottom:16,fontSize:13},children:`视频积分公式:(基础积分 + 每秒积分 x 视频时长) x 模型倍率;图片积分公式:基础积分 x 模型倍率`}),(0,Q.jsx)(bQ,{columns:[{title:`类型`,dataIndex:`genType`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e===`image`?`cyan`:`orange`,children:e===`image`?`图片`:`视频`})},{title:`引擎`,dataIndex:`modelConfigId`,width:180,render:(e,t)=>(0,Q.jsx)(NQ,{color:t.genType===`image`?`cyan`:`purple`,children:x(e,t.genType)})},{title:`分辨率/尺寸`,dataIndex:`resolution`,width:110,render:e=>(0,Q.jsx)(NQ,{color:{"480p":`blue`,"720p":`blue`,"1080p":`blue`,"4K":`green`,"2K":`green`}[e]||`default`,children:e})},{title:`倍率`,dataIndex:`ratio`,width:100,sorter:(e,t)=>e.ratio-t.ratio,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:e>=2?`#ef4444`:e>=1.5?`#f59e0b`:`#10b981`},children:[`x`,e]})},{title:`基础积分`,dataIndex:`baseCredits`,width:100,render:e=>(0,Q.jsxs)(Z.Text,{children:[e,` 积分`]})},{title:`每秒积分`,dataIndex:`perSecondCredits`,width:100,render:(e,t)=>(0,Q.jsx)(Z.Text,{children:t.genType===`image`?`-`:`${e} 积分/秒`})},{title:`示例计算`,key:`example`,width:120,render:(e,t)=>{let n;return n=t.genType===`image`?Math.round(t.baseCredits*t.ratio):Math.round((t.baseCredits+t.perSecondCredits*15)*t.ratio),(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:[n,` 积分`]})}},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>E(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>w(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:!1,scroll:{x:860}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w0,{}),o.ratio?`编辑比例`:`添加比例`]}),open:o.open,onOk:C,onCancel:()=>{s({open:!1,ratio:null}),c.resetFields()},okText:`保存`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`genType`,label:`生成类型`,rules:[{required:!0,message:`请选择生成类型`}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`video`,label:`视频`},{value:`image`,label:`图片`}],onChange:()=>{c.setFieldsValue({modelConfigId:void 0,resolution:void 0})}})}),(0,Q.jsx)(X.Item,{name:`modelConfigId`,label:`引擎`,rules:[{required:!0,message:`请选择引擎`}],children:(0,Q.jsx)(RC,{size:`large`,placeholder:`请选择引擎`,options:v,showSearch:!0,optionFilterProp:`label`,onChange:()=>c.setFieldsValue({resolution:void 0})})}),(0,Q.jsx)(X.Item,{name:`resolution`,label:h===`image`?`图片尺寸`:`分辨率`,rules:[{required:!0,message:h===`image`?`请选择图片尺寸`:`请选择分辨率`}],children:(0,Q.jsx)(RC,{size:`large`,placeholder:h===`image`?`请选择图片尺寸`:`请选择分辨率`,options:b})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`ratio`,label:`倍率`,style:{flex:1},rules:[{required:!0,message:`请输入倍率`}],children:(0,Q.jsx)(oB,{min:.1,max:10,step:.1,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`baseCredits`,label:`基础积分`,style:{flex:1},rules:[{required:!0,message:`请输入基础积分`}],children:(0,Q.jsx)(oB,{min:0,max:1e3,style:{width:`100%`},size:`large`})}),h!==`image`&&(0,Q.jsx)(X.Item,{name:`perSecondCredits`,label:`每秒积分`,style:{flex:1},rules:[{required:!0,message:`请输入每秒积分`}],children:(0,Q.jsx)(oB,{min:0,max:100,style:{width:`100%`},size:`large`})})]})]})})]})},w7={HomeOutlined:(0,Q.jsx)(Z2,{}),PlayCircleOutlined:(0,Q.jsx)(J4,{}),WalletOutlined:(0,Q.jsx)(N6,{}),RobotOutlined:(0,Q.jsx)(o3,{}),SettingOutlined:(0,Q.jsx)(D3,{}),BellOutlined:(0,Q.jsx)(f0,{}),UserOutlined:(0,Q.jsx)(D6,{}),AppstoreOutlined:(0,Q.jsx)(G1,{}),FileTextOutlined:(0,Q.jsx)(KV,{}),StarOutlined:(0,Q.jsx)(Z3,{}),HeartOutlined:(0,Q.jsx)(H2,{}),CameraOutlined:(0,Q.jsx)(D0,{}),DashboardOutlined:(0,Q.jsx)(r2,{}),CalculatorOutlined:(0,Q.jsx)(w0,{}),DollarOutlined:(0,Q.jsx)(l2,{}),GiftOutlined:(0,Q.jsx)(I2,{}),ThunderboltOutlined:(0,Q.jsx)(l6,{}),FireOutlined:(0,Q.jsx)(D2,{}),CloudOutlined:(0,Q.jsx)(z0,{}),SmileOutlined:(0,Q.jsx)(H3,{}),TrophyOutlined:(0,Q.jsx)(h6,{}),RocketOutlined:(0,Q.jsx)(l3,{}),BulbOutlined:(0,Q.jsx)(x0,{}),CodeOutlined:(0,Q.jsx)(G0,{}),PictureOutlined:(0,Q.jsx)(H4,{}),VideoCameraOutlined:(0,Q.jsx)(A6,{}),AudioOutlined:(0,Q.jsx)(r0,{}),MailOutlined:(0,Q.jsx)(v4,{}),PhoneOutlined:(0,Q.jsx)(z4,{}),GlobalOutlined:(0,Q.jsx)(z2,{}),ShoppingCartOutlined:(0,Q.jsx)(A3,{}),TeamOutlined:(0,Q.jsx)(o6,{}),BarChartOutlined:(0,Q.jsx)(l0,{}),PieChartOutlined:(0,Q.jsx)(G4,{}),LineChartOutlined:(0,Q.jsx)(o4,{}),SecurityScanOutlined:(0,Q.jsx)(x3,{}),ApiOutlined:(0,Q.jsx)(H1,{}),DatabaseOutlined:(0,Q.jsx)(o2,{}),CloudServerOutlined:(0,Q.jsx)(H0,{}),MenuOutlined:(0,Q.jsx)(w4,{})},jne=Object.keys(w7).map(e=>({value:e,label:(0,Q.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[w7[e],` `,e.replace(`Outlined`,``)]})})),Mne={page:`blue`,group:`purple`},Nne={page:`页面`,group:`分组`},Pne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)(`frontend`),[o,s]=(0,S.useState)({open:!1,menu:null}),[c]=X.useForm(),l=async()=>{r(!0);try{t(await W8())}catch{}r(!1)};(0,S.useEffect)(()=>{l()},[]);let u=async()=>{try{let e=await c.validateFields(),t={label:e.label,path:e.path||``,icon:e.icon||``,sort_order:e.sortOrder??0,is_active:e.isActive??!0,parent_id:e.parentId||null,menu_type:e.menuType||`page`,menu_target:e.menuTarget||`frontend`,is_default:e.isDefault??!1};o.menu?.id?await G8({...t,id:o.menu.id}):await G8(t),LG.success(o.menu?.id?`菜单已更新`:`菜单已添加`),s({open:!1,menu:null}),c.resetFields(),l()}catch{}},d=async e=>{try{await K8(e),LG.success(`菜单已删除`),l()}catch(e){LG.error(e?.message||`删除失败`)}},f=t=>{s({open:!0,menu:t||null}),t?c.setFieldsValue({label:t.label,path:t.path,icon:t.icon,sortOrder:t.sortOrder??0,isActive:t.isActive??!0,parentId:t.parentId??``,menuType:t.menuType??`page`,menuTarget:t.menuTarget??`frontend`,isDefault:t.isDefault??!1}):(c.resetFields(),c.setFieldsValue({icon:`HomeOutlined`,sortOrder:e.length,isActive:!0,menuType:`page`,menuTarget:i,isDefault:!1}))},p=e.filter(e=>{let t=e.menuTarget??`frontend`;return t===i||t===`both`}),m=[{value:``,label:`顶级菜单`},...p.filter(e=>e.menuType===`group`).map(e=>({value:e.id,label:e.label}))],h=[],g=p.filter(e=>!e.parentId),_={};p.filter(e=>e.parentId).forEach(e=>{let t=e.parentId;_[t]||(_[t]=[]),_[t].push(e)}),g.sort((e,t)=>(e.sortOrder??0)-(t.sortOrder??0)).forEach(e=>{h.push({...e,_depth:0}),(_[e.id]||[]).sort((e,t)=>(e.sortOrder??0)-(t.sortOrder??0)).forEach(e=>{h.push({...e,_depth:1})})});let v=[{title:`排序`,dataIndex:`sortOrder`,width:60},{title:`菜单名称`,key:`label`,width:180,render:(e,t)=>(0,Q.jsxs)(`span`,{style:{paddingLeft:t._depth*20,fontWeight:t._depth===0?600:400},children:[t._depth===1&&(0,Q.jsx)(`span`,{style:{color:`#cbd5e1`,marginRight:4},children:`└`}),t.label]})},{title:`路由路径`,dataIndex:`path`,width:160,render:e=>e||(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})},{title:`图标`,dataIndex:`icon`,width:100,render:e=>e&&w7[e]?(0,Q.jsx)(`span`,{style:{fontSize:16,color:`#6366f1`},children:w7[e]}):`-`},{title:`类型`,dataIndex:`menuType`,width:80,render:e=>(0,Q.jsx)(NQ,{color:Mne[e]||`default`,children:Nne[e]||e})},{title:`状态`,dataIndex:`isActive`,width:70,render:e=>(0,Q.jsx)(`span`,{style:{color:e?`#22c55e`:`#94a3b8`},children:e?`启用`:`停用`})},...i===`frontend`?[{title:`默认显示`,dataIndex:`isDefault`,width:80,render:e=>e?(0,Q.jsx)(NQ,{color:`green`,children:`默认`}):(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})}]:[],{title:`操作`,key:`action`,width:150,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>f(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除该菜单?`,onConfirm:()=>d(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}];return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`菜单配置`})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>f(),style:{borderRadius:8},children:`添加菜单`})]}),(0,Q.jsx)(bR,{activeKey:i,onChange:a,items:[{key:`frontend`,label:`前台菜单`},{key:`admin`,label:`后台菜单`}]}),(0,Q.jsx)(bQ,{columns:v,dataSource:h,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w4,{}),o.menu?.id?`编辑菜单`:`添加菜单`]}),open:o.open,onOk:u,onCancel:()=>{s({open:!1,menu:null}),c.resetFields()},okText:`确认`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`label`,label:`菜单名称`,rules:[{required:!0,message:`请输入菜单名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:我的项目`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`path`,label:`路由路径`,tooltip:`分组类型可留空`,children:(0,Q.jsx)(hW,{placeholder:`例如:/projects(分组可留空)`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`menuType`,label:`菜单类型`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`page`,label:`页面`},{value:`group`,label:`分组`}]})}),(0,Q.jsx)(X.Item,{name:`menuTarget`,label:`适用端`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`frontend`,label:`前台`},{value:`admin`,label:`后台`},{value:`both`,label:`两者`}]})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`icon`,label:`图标`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:jne})}),(0,Q.jsx)(X.Item,{name:`sortOrder`,label:`排序`,style:{flex:1},children:(0,Q.jsx)(oB,{min:0,max:100,style:{width:`100%`},size:`large`,placeholder:`默认0`})})]}),(0,Q.jsx)(X.Item,{name:`parentId`,label:`上级菜单`,children:(0,Q.jsx)(RC,{size:`large`,options:m,allowClear:!0,placeholder:`顶级菜单`})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用`,valuePropName:`checked`,children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.menuTarget!==t.menuTarget,children:({getFieldValue:e})=>e(`menuTarget`)===`admin`?null:(0,Q.jsx)(X.Item,{name:`isDefault`,label:`新用户默认显示`,valuePropName:`checked`,tooltip:`开启后,新注册用户默认显示此菜单`,children:(0,Q.jsx)(Mq,{})})})]})})]})},Fne={normal:`blue`,gift:`green`,promo:`purple`},Ine={normal:`常规`,gift:`赠送`,promo:`促销`},Lne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,item:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await Q8()).map(e=>({id:e.id,name:e.name,credits:e.credits,price:e.price,bonusCredits:e.bonus_credits??e.bonusCredits??0,totalCredits:e.total_credits??e.totalCredits??e.credits,description:e.description,packageType:e.package_type??e.packageType??`normal`,isGift:e.is_gift??e.isGift??!1,isActive:e.is_active??e.isActive??!0,sortOrder:e.sort_order??e.sortOrder??0})))}catch{LG.error(`加载充值套餐失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={name:e.name,credits:e.credits,price:e.price,bonus_credits:e.bonusCredits||0,description:e.description||null,package_type:e.packageType||`normal`,is_gift:e.isGift||!1,is_active:e.isActive??!0,sort_order:e.sortOrder??0};i.item?.id?(await $8({id:i.item.id,...t}),LG.success(`已更新`)):(await $8(t),LG.success(`已添加`)),a({open:!1,item:null}),o.resetFields(),s()}catch{}},l=async e=>{try{await e5(e),LG.success(`已删除`),s()}catch(e){LG.error(e?.message||`删除失败`)}},u=e=>{a({open:!0,item:e||null}),e?o.setFieldsValue({name:e.name,credits:e.credits,price:e.price,bonusCredits:e.bonusCredits,description:e.description,packageType:e.packageType,isGift:e.isGift,isActive:e.isActive,sortOrder:e.sortOrder}):(o.resetFields(),o.setFieldsValue({isActive:!0,sortOrder:0,packageType:`normal`,bonusCredits:0,isGift:!1}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(I2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`充值套餐管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 个套餐`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加套餐`})]}),(0,Q.jsx)(bQ,{columns:[{title:`套餐名称`,key:`name`,width:160,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),t.description&&(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.description})]})},{title:`基础积分`,dataIndex:`credits`,width:100,render:e=>(0,Q.jsx)(Z.Text,{children:e.toLocaleString()})},{title:`赠送积分`,dataIndex:`bonusCredits`,width:100,render:e=>e>0?(0,Q.jsxs)(NQ,{color:`green`,children:[`+`,e.toLocaleString()]}):(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})},{title:`总积分`,key:`total`,width:100,render:(e,t)=>(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:(t.credits+t.bonusCredits).toLocaleString()})},{title:`价格(元)`,dataIndex:`price`,width:100,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,children:[`¥`,e]})},{title:`类型`,dataIndex:`packageType`,width:80,render:e=>(0,Q.jsx)(NQ,{color:Fne[e]||`default`,children:Ine[e]||e})},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(I2,{}),i.item?`编辑套餐`:`添加套餐`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,item:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`套餐名称`,rules:[{required:!0,message:`请输入套餐名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:进阶包`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`credits`,label:`基础积分`,rules:[{required:!0,message:`请输入积分`}],style:{flex:1},children:(0,Q.jsx)(oB,{min:1,placeholder:`2000`,size:`large`,style:{width:`100%`}})}),(0,Q.jsx)(X.Item,{name:`price`,label:`价格(元)`,rules:[{required:!0,message:`请输入价格`}],style:{flex:1},children:(0,Q.jsx)(oB,{min:.01,step:1,placeholder:`168`,size:`large`,style:{width:`100%`}})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`bonusCredits`,label:`赠送积分`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(oB,{min:0,placeholder:`0`,size:`large`,style:{width:`100%`}})}),(0,Q.jsx)(X.Item,{name:`packageType`,label:`套餐类型`,initialValue:`normal`,style:{flex:1},children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`normal`,label:`常规`},{value:`gift`,label:`赠送`},{value:`promo`,label:`促销`}]})})]}),(0,Q.jsx)(X.Item,{name:`description`,label:`描述`,children:(0,Q.jsx)(hW,{placeholder:`套餐描述(可选)`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,initialValue:!0,style:{flex:1},children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{name:`isGift`,label:`是否赠送`,valuePropName:`checked`,initialValue:!1,style:{flex:1},children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{name:`sortOrder`,label:`排序`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(oB,{size:`large`,style:{width:`100%`}})})]})]})})]})},Rne={POST:`green`,PUT:`blue`,DELETE:`red`},zne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),c=async e=>{a(!0);try{let n=await t5(e||o);t(n.items||[]),r(n.total||0)}catch{LG.error(`加载操作日志失败`)}finally{a(!1)}};return(0,S.useEffect)(()=>{c()},[]),(0,Q.jsx)(`div`,{children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`操作日志`})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>c(),children:`刷新`})]}),(0,Q.jsx)(bQ,{columns:[{title:`操作人`,dataIndex:`username`,width:120,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`操作`,dataIndex:`action`,width:160,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`方法`,dataIndex:`method`,width:80,render:e=>(0,Q.jsx)(NQ,{color:Rne[e]||`default`,children:e})},{title:`路径`,dataIndex:`path`,width:220,ellipsis:!0,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:e})},{title:`时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:20,total:n,showTotal:e=>`共 ${e} 条记录`,onChange:e=>{s(e),c(e)}},scroll:{x:800}})]})})},Bne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(null),[g]=X.useForm(),[_]=X.useForm(),v=async e=>{a(!0);try{let n=await n5(e||o);t(n.items||[]),r(n.total||0)}catch{LG.error(`加载应用管理列表失败`)}finally{a(!1)}},y=async()=>{try{let e=await g.validateFields();await r5({app_id:e.app_id,secret:e.secret,open_type:e.open_type,count:e.count,auth_url:e.auth_url,company:e.company}),LG.success(`创建成功`),l(!1),g.resetFields(),v()}catch(e){LG.error(e?.message||`创建失败`)}},b=async e=>{try{h(await i5(e)),d(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},x=async e=>{try{let t=await i5(e);h(t),_.setFieldsValue({app_id:t.appId,secret:t.secret,open_type:t.openType,count:t.count,auth_url:t.authUrl,company:t.company}),p(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},C=async()=>{if(m)try{let e=await _.validateFields();await a5(m.id,{app_id:e.app_id,secret:e.secret,open_type:e.open_type,count:e.count,auth_url:e.auth_url,company:e.company}),LG.success(`更新成功`),p(!1),_.resetFields(),v()}catch(e){LG.error(e?.message||`更新失败`)}},w=e=>{BG.confirm({title:`确认删除`,content:`确定要删除这个应用管理吗?`,okText:`删除`,okType:`danger`,cancelText:`取消`,onOk:async()=>{try{await o5(e),LG.success(`删除成功`),v()}catch(e){LG.error(e?.message||`删除失败`)}}})};return(0,S.useEffect)(()=>{v()},[]),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`应用管理列表`})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>v(),children:`刷新`}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>l(!0),children:`创建`})]})]}),(0,Q.jsx)(bQ,{columns:[{title:`ID`,dataIndex:`id`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`应用ID`,dataIndex:`appId`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`应用密钥`,dataIndex:`secret`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`开户方式`,dataIndex:`openType`,render:e=>(0,Q.jsx)(Z.Text,{children:{1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`}[e]||e})},{title:`归属公司`,dataIndex:`company`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`授权次数`,dataIndex:`count`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`状态`,dataIndex:`status`,render:e=>(0,Q.jsx)(NQ,{color:e===1?`green`:`red`,children:e===1?`正常`:`禁用`})},{title:`授权URL`,dataIndex:`authUrl`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`创建人`,dataIndex:`createBy`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`创建时间`,dataIndex:`createdAt`,render:e=>(0,Q.jsx)(Z.Text,{children:Z5(e)})},{title:`更新时间`,dataIndex:`updatedAt`,render:e=>(0,Q.jsx)(Z.Text,{children:Z5(e)})},{title:`操作`,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(qU,{}),size:`small`,onClick:()=>b(t.id),children:`详情`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(zQ,{}),size:`small`,onClick:()=>x(t.id),children:`更新`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(IQ,{}),size:`small`,danger:!0,onClick:()=>w(t.id),children:`删除`})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:20,total:n,showTotal:e=>`共 ${e} 条记录`,onChange:e=>{s(e),v(e)}},scroll:{x:800}})]}),(0,Q.jsx)(BG,{title:`创建应用管理`,open:c,onOk:y,onCancel:()=>{l(!1),g.resetFields()},okText:`创建`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:g,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`app_id`,label:`应用ID`,rules:[{required:!0,message:`请输入应用ID`},{max:64,message:`应用ID不能超过64个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用ID`})}),(0,Q.jsx)(X.Item,{name:`secret`,label:`应用密钥`,rules:[{required:!0,message:`请输入应用密钥`},{max:256,message:`应用密钥不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用密钥`})}),(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户方式`,rules:[{required:!0,message:`请选择开户方式`}],children:(0,Q.jsxs)(RC,{placeholder:`请选择开户方式`,children:[(0,Q.jsx)(RC.Option,{value:1,children:`千川`}),(0,Q.jsx)(RC.Option,{value:2,children:`广告`}),(0,Q.jsx)(RC.Option,{value:3,children:`本地推`}),(0,Q.jsx)(RC.Option,{value:4,children:`星图`}),(0,Q.jsx)(RC.Option,{value:5,children:`快手代理商`}),(0,Q.jsx)(RC.Option,{value:6,children:`巨量星图`}),(0,Q.jsx)(RC.Option,{value:7,children:`巨量服务单`}),(0,Q.jsx)(RC.Option,{value:8,children:`腾讯服务单`}),(0,Q.jsx)(RC.Option,{value:9,children:`腾讯营销K2`}),(0,Q.jsx)(RC.Option,{value:10,children:`腾讯营销K3`})]})}),(0,Q.jsx)(X.Item,{name:`count`,label:`最大授权用户数`,initialValue:100,children:(0,Q.jsx)(oB,{min:1,placeholder:`应用最大可以授权多少个用户`})}),(0,Q.jsx)(X.Item,{name:`auth_url`,label:`应用授权链接`,children:(0,Q.jsx)(hW,{placeholder:`请输入应用授权链接`})}),(0,Q.jsx)(X.Item,{name:`company`,label:`应用归属公司名称`,rules:[{max:256,message:`公司名称不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用归属公司名称`})})]})}),(0,Q.jsx)(BG,{title:`应用管理详情`,open:u,onCancel:()=>{d(!1),h(null)},okText:`关闭`,cancelText:`取消`,width:600,children:m&&(0,Q.jsxs)(`div`,{style:{lineHeight:`2`},children:[(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`ID:`}),` `,m.id]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`应用ID:`}),` `,m.appId]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`应用密钥:`}),` `,m.secret]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`开户方式:`}),` `,{1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`}[m.openType]||m.openType]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`归属公司:`}),` `,m.company||`-`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`授权次数:`}),` `,m.count]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`状态:`}),` `,m.status===1?`正常`:`禁用`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`授权URL:`}),` `,m.authUrl||`-`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`创建人:`}),` `,m.createBy]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`创建时间:`}),` `,Z5(m.createdAt)]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`更新时间:`}),` `,Z5(m.updatedAt)]})]})}),(0,Q.jsx)(BG,{title:`更新应用管理`,open:f,onOk:C,onCancel:()=>{p(!1),_.resetFields(),h(null)},okText:`更新`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:_,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`app_id`,label:`应用ID`,rules:[{required:!0,message:`请输入应用ID`},{max:64,message:`应用ID不能超过64个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用ID`})}),(0,Q.jsx)(X.Item,{name:`secret`,label:`应用密钥`,rules:[{required:!0,message:`请输入应用密钥`},{max:256,message:`应用密钥不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用密钥`})}),(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户方式`,rules:[{required:!0,message:`请选择开户方式`}],children:(0,Q.jsxs)(RC,{placeholder:`请选择开户方式`,children:[(0,Q.jsx)(RC.Option,{value:1,children:`千川`}),(0,Q.jsx)(RC.Option,{value:2,children:`广告`}),(0,Q.jsx)(RC.Option,{value:3,children:`本地推`}),(0,Q.jsx)(RC.Option,{value:4,children:`星图`}),(0,Q.jsx)(RC.Option,{value:5,children:`快手代理商`}),(0,Q.jsx)(RC.Option,{value:6,children:`巨量星图`}),(0,Q.jsx)(RC.Option,{value:7,children:`巨量服务单`}),(0,Q.jsx)(RC.Option,{value:8,children:`腾讯服务单`}),(0,Q.jsx)(RC.Option,{value:9,children:`腾讯营销K2`}),(0,Q.jsx)(RC.Option,{value:10,children:`腾讯营销K3`})]})}),(0,Q.jsx)(X.Item,{name:`count`,label:`最大授权用户数`,children:(0,Q.jsx)(oB,{min:1,placeholder:`应用最大可以授权多少个用户`})}),(0,Q.jsx)(X.Item,{name:`auth_url`,label:`应用授权链接`,children:(0,Q.jsx)(hW,{placeholder:`请输入应用授权链接`})}),(0,Q.jsx)(X.Item,{name:`company`,label:`应用归属公司名称`,rules:[{max:256,message:`公司名称不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用归属公司名称`})})]})})]})},T7=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),E7={image:`empty`,video:`empty`,videoCover:`empty`,references:{}},D7={optimizing:{color:`processing`,text:`优化中`,icon:(0,Q.jsx)(xm,{spin:!0})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,Q.jsx)(HB,{})},generating:{color:`warning`,text:`生成中`,icon:(0,Q.jsx)(xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,Q.jsx)(N0,{})},failed:{color:`error`,text:`失败`,icon:(0,Q.jsx)(I0,{})}},O7={image:{text:`图片`,color:`purple`,icon:(0,Q.jsx)(v2,{})},video:{text:`视频`,color:`geekblue`,icon:(0,Q.jsx)(A6,{})}},Vne=e=>/^(https?:)?\/\//i.test(e)||/^(blob|data):/i.test(e),k7=e=>!!e&&/^blob:/i.test(e.trim()),A7=e=>{if(!e)return``;let t=String(e).trim();return t?Vne(t)?t:T7?`${T7}${t.startsWith(`/`)?t:`/${t}`}`:t.startsWith(`/`)?t:`/${t}`:``},j7=e=>e?e.length>12?`${e.slice(0,8)}...`:e:`-`,M7=e=>e?Z5(e):`-`,Hne=e=>e==null||e===``,N7=e=>{if(!e||k7(e))return!1;try{let t=new URL(A7(e),window.location.origin),n=t.searchParams.get(`exp`)||t.searchParams.get(`expires`)||t.searchParams.get(`expire`)||t.searchParams.get(`expires_at`)||t.searchParams.get(`x-expires`);if(!n)return!1;let r=Number(n);if(!Number.isFinite(r))return!1;let i=r>1e10?r:r*1e3;return Date.now()>=i}catch{return!1}},P7=e=>e?k7(e)||N7(e)?`invalid`:`checking`:`empty`,F7=e=>{let t=e.url||e.mediaUrl||e.fileUrl;return typeof t==`string`&&t.trim()?t.trim():void 0},Une=e=>{let t=String(e.type||e.mediaType||e.mimeType||``).toLowerCase(),n=F7(e)?.toLowerCase()||``;return t.includes(`video`)||/\.(mp4|mov|webm|m4v)(\?|$)/i.test(n)?`video`:t.includes(`image`)||/\.(png|jpe?g|webp|gif|bmp|svg)(\?|$)/i.test(n)?`image`:t||`unknown`},I7=(e,t)=>`${t}-${F7(e)||`empty`}`,L7=(e,t=`资源`)=>k7(e)?`本地临时素材已失效`:N7(e)?`${t}链接已超时,请刷新列表或重新搜索后再查看`:`${t}加载失败,请刷新列表或重新搜索后再查看`,R7=({text:e,minHeight:t=240,compact:n=!1,action:r})=>(0,Q.jsxs)(`div`,{style:{width:`100%`,minHeight:n?void 0:t,height:n?`100%`:void 0,borderRadius:n?10:12,background:`#f8f9fc`,border:`1px dashed #cbd5e1`,color:`#64748b`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:n?4:10,textAlign:`center`},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`,fontSize:n?11:13},children:e}),r]}),z7=({label:e,value:t})=>(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:120},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:Hne(t)?`-`:t})]}),Wne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c]=(0,S.useState)(20),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(0),[h,g]=(0,S.useState)(null),[_,v]=(0,S.useState)(E7),[y,b]=(0,S.useState)(!1),x=(0,S.useRef)(null),[C,w]=(0,S.useState)(null),[T,E]=(0,S.useState)(null),D=(0,S.useCallback)(async()=>{a(!0);try{let e=await f5({userId:d.trim()||void 0,status:l||void 0,page:o,pageSize:c});t((e.items||[]).map(e=>({id:e.id,userId:e.userId,username:e.username,projectId:e.projectId,projectName:e.projectName,originalPrompt:e.originalPrompt,optimizedPrompt:e.optimizedPrompt,duration:e.duration,aspectRatio:e.aspectRatio,resolution:e.resolution,status:e.status,videoUrl:e.videoUrl,videoCoverUrl:e.videoCoverUrl,references:e.references,creditsCost:e.creditsCost||0,textCreditsCost:e.textCreditsCost||0,textTokensUsed:e.textTokensUsed||0,videoTokensUsed:e.videoTokensUsed||0,errorMessage:e.errorMessage,createdAt:e.createdAt,generatedAt:e.generatedAt,genType:e.genType,imageSize:e.imageSize,imageUrl:e.imageUrl,imageTokensUsed:e.imageTokensUsed||0,imageProportion:e.imageProportion,imagePx:e.imagePx}))),r(e.total||0)}catch{LG.error(`加载记录失败`)}finally{a(!1)}},[l,d,o,c]);(0,S.useEffect)(()=>{D()},[D,p]),(0,S.useEffect)(()=>{if(!h){v(E7);return}let e=(h.references||[]).reduce((e,t,n)=>{let r=F7(t);return e[I7(t,n)]=P7(r),e},{});x.current&&(x.current.pause(),x.current.currentTime=0),b(!1),v({image:P7(h.imageUrl),video:P7(h.videoUrl),videoCover:P7(h.videoCoverUrl),references:e})},[h]);let O=()=>{s(1),m(e=>e+1)},k=(0,S.useCallback)(e=>{g(e)},[]),A=()=>{x.current&&x.current.pause(),b(!1),g(null)},j=e=>{v(t=>({...t,...e}))},M=(e,t)=>{v(n=>({...n,references:{...n.references,[e]:t}}))},N=(e,t=`素材`)=>{if(!e){LG.warning(`${t}链接为空,暂无法查看`);return}if(k7(e)){LG.warning(`本地临时素材已失效,暂无法查看`);return}if(N7(e)){LG.warning(`${t}链接已超时,请刷新列表或重新搜索后再查看`);return}window.open(A7(e),`_blank`,`noopener,noreferrer`)},P=()=>{if(h?.videoUrl){if(N7(h.videoUrl)){j({video:`invalid`}),LG.warning(`视频链接已超时,请刷新列表或重新搜索后再查看`);return}b(!0),window.setTimeout(()=>{x.current?.play().catch(()=>{b(!1),j({video:`invalid`}),LG.warning(`视频播放失败,请确认资源链接是否仍然有效`)})},0)}},F=async(e,t,n)=>{w(e);try{await p5(e,t,n),LG.success(`状态已更新`),D()}catch(e){LG.error(e?.message||`更新失败`)}finally{w(null)}},I=async()=>{if(T){w(T.record.id);try{await m5(T.record.id,T.ratio,T.resolution,T.image_size),LG.success(`已提交${T.record.genType===`video`?`视频`:`图片`}生成`),E(null),D()}catch(e){LG.error(e?.message||`生成失败`)}finally{w(null)}}},L=(0,S.useMemo)(()=>[{title:`用户`,key:`user`,width:120,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:t.username||`未知用户`}),(0,Q.jsx)(`div`,{style:{fontSize:11,color:`#94a3b8`},children:j7(t.userId)})]})},{title:`项目`,dataIndex:`projectName`,width:120,ellipsis:!0,render:e=>(0,Q.jsx)(Z.Text,{style:{fontSize:13},children:e||`-`})},{title:`类型`,dataIndex:`genType`,width:90,ellipsis:!0,render:e=>{let t=O7[e]||{text:e||`-`,color:`default`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`提示词`,key:`prompt`,ellipsis:!0,render:(e,t)=>(0,Q.jsx)(Ow,{title:t.originalPrompt,placement:`topLeft`,children:(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#475569`},ellipsis:!0,children:t.originalPrompt||`-`})})},{title:`参数`,key:`params`,width:160,render:(e,t)=>t.genType===`video`?t.duration||t.aspectRatio||t.resolution?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.duration?(0,Q.jsxs)(NQ,{children:[t.duration,`s`]}):null,t.aspectRatio?(0,Q.jsx)(NQ,{children:t.aspectRatio}):null,t.resolution?(0,Q.jsx)(NQ,{children:t.resolution}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`待配置`}):t.imageSize||t.imageProportion||t.imagePx?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.imageSize?(0,Q.jsx)(NQ,{children:t.imageSize}):null,t.imageProportion?(0,Q.jsx)(NQ,{children:t.imageProportion}):null,t.imagePx?(0,Q.jsx)(NQ,{children:t.imagePx}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`待配置`})},{title:`积分`,key:`credits`,width:120,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12},children:[t.textCreditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#f59e0b`},children:[`文字: `,t.textCreditsCost]}):null,t.creditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#6366f1`},children:[t.genType===`video`?`视频`:`图片`,`: `,t.creditsCost]}):null,t.textCreditsCost===0&&t.creditsCost===0?(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`},children:`0`}):null]})},{title:`状态`,dataIndex:`status`,width:90,render:e=>{let t=D7[e]||{color:`default`,text:e||`-`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`时间`,key:`time`,width:150,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[(0,Q.jsx)(`div`,{children:M7(t.createdAt)}),t.generatedAt?(0,Q.jsxs)(`div`,{style:{color:`#10b981`},children:[`生成: `,M7(t.generatedAt)]}):null]})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>k(t),children:`详情`}),t.status===`generating`?(0,Q.jsx)(qE,{size:`small`,danger:!0,loading:C===t.id,onClick:()=>{BG.confirm({title:`确认操作`,icon:(0,Q.jsx)(f2,{}),content:`确定将此记录标记为失败?`,onOk:()=>F(t.id,`failed`)})},children:`标记失败`}):null,t.status===`failed`?(0,Q.jsx)(qE,{size:`small`,type:`primary`,danger:!0,loading:C===t.id,onClick:()=>E({record:t,ratio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`,image_size:t.imageSize||`2K`}),children:`重试生成`}):null,t.status===`prompt_optimized`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(qE,{size:`small`,type:`primary`,loading:C===t.id,onClick:()=>E({record:t,ratio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`,image_size:t.imageSize||`2K`}),style:{background:`#6366f1`,border:`none`},children:[`生成`,t.genType===`video`?`视频`:`图片`]}),(0,Q.jsx)(qE,{size:`small`,danger:!0,loading:C===t.id,onClick:()=>{BG.confirm({title:`确认操作`,icon:(0,Q.jsx)(f2,{}),content:`确定将此记录标记为失败?`,onOk:()=>F(t.id,`failed`)})},children:`标记失败`})]}):null]})}],[k,C]),R=h?O7[h.genType||``]||{text:h.genType||`-`,color:`default`,icon:null}:null,z=h?D7[h.status]||{color:`default`,text:h.status||`-`,icon:null}:null,B=()=>{if(!h||h.genType!==`image`||h.status!==`completed`)return null;if(!h.imageUrl)return(0,Q.jsx)(R7,{text:`此图片任务暂无结果图片`,minHeight:260});if(_.image===`invalid`)return(0,Q.jsx)(R7,{text:L7(h.imageUrl,`图片`),minHeight:260});let e=A7(h.imageUrl);return(0,Q.jsxs)(`div`,{title:`点击新页面查看图片`,onClick:()=>N(h.imageUrl,`生成图片`),style:{position:`relative`,width:`100%`,minHeight:260,borderRadius:12,background:`#f8f9fc`,border:`1px solid #e2e8f0`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[(0,Q.jsx)(`img`,{src:e,alt:`生成图片`,onLoad:()=>j({image:`valid`}),onError:()=>j({image:`invalid`}),style:{display:_.image===`valid`?`block`:`none`,width:`100%`,maxHeight:560,objectFit:`contain`,background:`#fff`}},`${h.id}-${e}`),_.image===`checking`?(0,Q.jsx)(R7,{text:`图片加载检测中...`,minHeight:260}):null]})},V=()=>{if(!h||y||_.video===`invalid`)return null;let e=h.videoUrl?(0,Q.jsx)(qE,{type:`primary`,shape:`circle`,size:`large`,icon:(0,Q.jsx)(J4,{}),onClick:P,style:{boxShadow:`0 8px 20px rgba(15,23,42,0.25)`}}):null;if(!h.videoCoverUrl)return(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,Q.jsx)(R7,{text:`此视频无封面`,minHeight:340,action:e})});if(_.videoCover===`invalid`)return(0,Q.jsx)(R7,{text:L7(h.videoCoverUrl,`视频封面`),minHeight:340,action:e});let t=A7(h.videoCoverUrl);return(0,Q.jsxs)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,border:`1px solid #e2e8f0`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:t,alt:`视频封面`,onLoad:()=>j({videoCover:`valid`}),onError:()=>j({videoCover:`invalid`}),style:{display:_.videoCover===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`}},`${h.id}-cover-${t}`),_.videoCover===`checking`?(0,Q.jsx)(R7,{text:`视频封面加载检测中...`,minHeight:340,action:e}):null,_.videoCover===`valid`?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(15,23,42,0.18)`},children:e}):null]})},H=()=>{if(!h||h.genType!==`video`||h.status!==`completed`)return null;if(!h.videoUrl)return(0,Q.jsx)(R7,{text:`此视频任务暂无结果视频`,minHeight:340});if(_.video===`invalid`)return(0,Q.jsx)(R7,{text:L7(h.videoUrl,`视频`),minHeight:340});let e=A7(h.videoUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:340,borderRadius:12,background:`#000`,overflow:`hidden`,border:`1px solid #e2e8f0`},children:[(0,Q.jsx)(`video`,{ref:x,src:e,preload:`metadata`,controls:y,onLoadedMetadata:()=>j({video:`valid`}),onCanPlay:()=>j({video:`valid`}),onPlaying:()=>{b(!0),j({video:`valid`})},onPause:()=>b(!1),onEnded:()=>b(!1),onError:()=>{b(!1),j({video:`invalid`})},style:{width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`,opacity:+!!y,pointerEvents:y?`auto`:`none`}},`${h.id}-${e}`),V()]})},U=(e,t)=>{let n=F7(e),r=Une(e),i=I7(e,t),a=_.references[i]||P7(n),o=r===`image`,s=r===`video`,c=typeof e.name==`string`&&e.name?e.name:`参考素材 ${t+1}`;if(!n)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(R7,{text:`无链接`,compact:!0})}),(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})]},i);if(a===`invalid`)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(R7,{text:k7(n)?`本地临时素材已失效`:`素材不可访问`,compact:!0})}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i);let l=A7(n);return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsxs)(`div`,{role:`button`,tabIndex:0,title:`点击新页面查看素材`,onClick:()=>N(n,s?`视频素材`:o?`图片素材`:`素材`),onKeyDown:e=>{e.key===`Enter`&&N(n,s?`视频素材`:o?`图片素材`:`素材`)},style:{width:94,height:94,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,background:`#f8f9fc`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[o?(0,Q.jsx)(`img`,{src:l,alt:c,onLoad:()=>M(i,`valid`),onError:()=>M(i,`invalid`),style:{display:a===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`cover`}}):null,s?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`video`,{src:l,preload:`metadata`,onLoadedMetadata:()=>M(i,`valid`),onError:()=>M(i,`invalid`),style:{display:`none`}}),(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[(0,Q.jsx)(J4,{style:{fontSize:18}}),(0,Q.jsx)(`div`,{children:`视频素材`}),(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]})]}):null,!o&&!s?(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[`文件素材`,(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]}):null,a===`checking`&&o?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8f9fc`},children:(0,Q.jsx)(xm,{style:{color:`#6366f1`}})}):null]}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i)};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(A6,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`生成记录管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[n,` 条记录`]})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(RC,{placeholder:`状态筛选`,allowClear:!0,style:{width:120},value:l||void 0,onChange:e=>{u(e||``),s(1)},options:[{value:`optimizing`,label:`优化中`},{value:`prompt_optimized`,label:`待生成`},{value:`generating`,label:`生成中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`}]}),(0,Q.jsx)(hW,{placeholder:`用户ID搜索`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),style:{width:200},value:d,onChange:e=>f(e.target.value),onPressEnter:O,allowClear:!0}),(0,Q.jsx)(qE,{type:`primary`,onClick:O,style:{borderRadius:8},children:`搜索`})]})]}),(0,Q.jsx)(bQ,{columns:L,dataSource:e,rowKey:`id`,loading:i,scroll:{x:1120},pagination:{current:o,pageSize:c,total:n,onChange:s,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[h?.genType===`video`?(0,Q.jsx)(A6,{}):(0,Q.jsx)(v2,{}),(0,Q.jsx)(`span`,{children:`生成记录详情`})]}),open:!!h,onCancel:A,footer:null,width:900,destroyOnClose:!0,children:h?(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,flexWrap:`wrap`},children:[(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`用户`}),(0,Q.jsx)(Z.Text,{strong:!0,children:h.username||`-`})]}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`项目`}),(0,Q.jsx)(Z.Text,{strong:!0,children:h.projectName||`-`})]}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`类型 / 状态`}),(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[R?(0,Q.jsx)(NQ,{color:R.color,icon:R.icon,children:R.text}):null,z?(0,Q.jsx)(NQ,{color:z.color,icon:z.icon,children:z.text}):null]})]})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,Q.jsx)(Z.Text,{style:{fontSize:13,color:`#475569`,lineHeight:1.7},children:h.originalPrompt||`-`})})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`优化后提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`},children:(0,Q.jsx)(Z.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:h.optimizedPrompt||`-`})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(z7,{label:`文字积分`,value:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#f59e0b`},children:h.textCreditsCost||0}),(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.textTokensUsed||0,` tokens)`]})]})}),(0,Q.jsx)(z7,{label:`${h.genType===`image`?`图片`:`视频`}积分`,value:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:h.creditsCost||0}),h.genType===`video`&&h.videoTokensUsed?(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.videoTokensUsed,` tokens)`]}):null,h.genType===`image`&&h.imageTokensUsed?(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.imageTokensUsed,` tokens)`]}):null]})}),(0,Q.jsx)(z7,{label:`总积分`,value:(h.textCreditsCost||0)+(h.creditsCost||0)})]}),h.genType===`video`?h.duration||h.aspectRatio||h.resolution?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(z7,{label:`时长`,value:h.duration?`${h.duration}秒`:`-`}),(0,Q.jsx)(z7,{label:`比例`,value:h.aspectRatio||`-`}),(0,Q.jsx)(z7,{label:`分辨率`,value:h.resolution||`-`})]}):(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,textAlign:`center`},children:(0,Q.jsx)(NQ,{color:`default`,children:`视频参数待用户配置`})}):null,h.genType===`image`?h.imageSize||h.imageProportion||h.imagePx?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(z7,{label:`尺寸`,value:h.imagePx||`-`}),(0,Q.jsx)(z7,{label:`比例`,value:h.imageProportion||`-`}),(0,Q.jsx)(z7,{label:`分辨率`,value:h.imageSize||`-`})]}):(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,textAlign:`center`},children:(0,Q.jsx)(NQ,{color:`default`,children:`图片参数待用户配置`})}):null,!h?.references||h.references.length===0?null:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`参考内容`}),(0,Q.jsx)(`div`,{style:{display:`flex`,gap:10,flexWrap:`wrap`},children:h.references.map((e,t)=>U(e,t))})]}),h.status===`completed`?(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:h.genType===`video`?`生成视频`:`生成图片`}),h.genType===`video`?H():B()]}):null,h.status===`failed`&&h.errorMessage?(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(239,68,68,0.04)`,border:`1px solid rgba(239,68,68,0.15)`},children:(0,Q.jsxs)(Z.Text,{style:{fontSize:12,color:`#ef4444`},children:[`错误信息: `,h.errorMessage]})}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,fontSize:12,color:`#94a3b8`,flexWrap:`wrap`},children:[(0,Q.jsxs)(`span`,{children:[`创建: `,M7(h.createdAt)]}),(0,Q.jsxs)(`span`,{children:[`生成: `,M7(h.generatedAt)]})]})]}):(0,Q.jsx)(pC,{description:`暂无详情`})}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[T&&(T.record.genType===`video`?(0,Q.jsx)(J4,{}):(0,Q.jsx)(v2,{})),T&&(T.record.genType===`video`?`生成视频`:`生成图片`)]}),open:!!T,onCancel:()=>E(null),onOk:I,okText:`提交生成`,cancelText:`取消`,confirmLoading:T?C===T.record.id:!1,width:420,children:T?(0,Q.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:T.record.genType===`video`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`时长`}),(0,Q.jsxs)(Z.Text,{strong:!0,children:[T.record.duration||5,`s`]})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`画面比例`}),(0,Q.jsx)(RC,{value:T.ratio,onChange:e=>E(t=>t?{...t,ratio:e}:null),style:{width:`100%`},options:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`].map(e=>({value:e,label:e}))})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`分辨率`}),(0,Q.jsx)(RC,{value:T.resolution,onChange:e=>E(t=>t?{...t,resolution:e}:null),style:{width:`100%`},options:[`480p`,`720p`,`1080p`].map(e=>({value:e,label:e}))})]})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`尺寸`}),(0,Q.jsx)(Z.Text,{strong:!0,children:T.record.imagePx||`-`})]}),(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`比例`}),(0,Q.jsx)(Z.Text,{strong:!0,children:T.record.imageProportion||`-`})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`分辨率`}),(0,Q.jsx)(RC,{value:T.image_size,onChange:e=>E(t=>t?{...t,image_size:e}:null),style:{width:`100%`},options:[`2K`,`4K`].map(e=>({value:e,label:e}))})]})]})}):null})]})},B7=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),V7=20,H7={image:`empty`,video:`empty`,videoCover:`empty`,references:{}},U7={pending:{color:`default`,text:`待处理`,icon:(0,Q.jsx)(HB,{})},generating:{color:`warning`,text:`生成中`,icon:(0,Q.jsx)(xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,Q.jsx)(N0,{})},failed:{color:`error`,text:`失败`,icon:(0,Q.jsx)(I0,{})}},W7={timeout:`任务超时`,queued:`已入队`,preparing:`准备中`,creating_provider_task:`创建任务中`,waiting_remote:`等待生成`,result_ready:`结果就绪`,downloading:`下载中`,done:`完成`,download_failed:`下载失败`,polling:`轮询中`,failed:`失败`},G7={image:{text:`图片`,color:`purple`,icon:(0,Q.jsx)(v2,{})},video:{text:`视频`,color:`geekblue`,icon:(0,Q.jsx)(A6,{})}},Gne=e=>/^(https?:)?\/\//i.test(e)||/^(blob|data):/i.test(e),K7=e=>!!e&&/^blob:/i.test(e.trim()),q7=e=>{if(!e)return``;let t=String(e).trim();return t?Gne(t)?t:B7?`${B7}${t.startsWith(`/`)?t:`/${t}`}`:t.startsWith(`/`)?t:`/${t}`:``},Kne=e=>e?e.length>12?`${e.slice(0,8)}...`:e:`-`,J7=e=>e?Z5(e):`-`,qne=e=>e==null||e===``,Y7=e=>{if(!e||K7(e))return!1;try{let t=new URL(q7(e),window.location.origin),n=t.searchParams.get(`exp`)||t.searchParams.get(`expires`)||t.searchParams.get(`expire`)||t.searchParams.get(`expires_at`)||t.searchParams.get(`x-expires`);if(!n)return!1;let r=Number(n);if(!Number.isFinite(r))return!1;let i=r>1e10?r:r*1e3;return Date.now()>=i}catch{return!1}},X7=e=>e?K7(e)||Y7(e)?`invalid`:`checking`:`empty`,Z7=e=>{let t=e.url||e.mediaUrl||e.fileUrl;return typeof t==`string`&&t.trim()?t.trim():void 0},Jne=e=>{let t=String(e.type||e.mediaType||e.mimeType||``).toLowerCase(),n=Z7(e)?.toLowerCase()||``;return t.includes(`video`)||/\.(mp4|mov|webm|m4v)(\?|$)/i.test(n)?`video`:t.includes(`image`)||/\.(png|jpe?g|webp|gif|bmp|svg)(\?|$)/i.test(n)?`image`:t||`unknown`},Q7=(e,t)=>`${t}-${Z7(e)||`empty`}`,$7=(e,t=`资源`)=>K7(e)?`本地临时素材已失效`:Y7(e)?`${t}链接已超时,请刷新列表或重新搜索后再查看`:`${t}加载失败,请刷新列表或重新搜索后再查看`,e9=({text:e,minHeight:t=240,compact:n=!1,action:r})=>(0,Q.jsxs)(`div`,{style:{width:`100%`,minHeight:n?void 0:t,height:n?`100%`:void 0,borderRadius:n?10:12,background:`#f8f9fc`,border:`1px dashed #cbd5e1`,color:`#64748b`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:n?4:10,textAlign:`center`},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`,fontSize:n?11:13},children:e}),r]}),t9=({label:e,value:t})=>(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:120},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:qne(t)?`-`:t})]}),Yne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(``),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)(``),[m,h]=(0,S.useState)(``),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(0),[C,w]=(0,S.useState)(null),[T,E]=(0,S.useState)(H7),[D,O]=(0,S.useState)(!1),k=(0,S.useRef)(null),A=(0,S.useCallback)(async()=>{a(!0);try{let e=await g5({genType:u||void 0,status:c||void 0,userId:g||void 0,userName:v||void 0,page:o,pageSize:V7});t(e.items||[]),r(e.total||0)}catch(e){LG.error(e?.message||`加载创作记录失败`)}finally{a(!1)}},[u,c,o,g,v]);(0,S.useEffect)(()=>{A()},[A,b]),(0,S.useEffect)(()=>{if(!C){E(H7);return}let e=(C.mediaReferences||[]).reduce((e,t,n)=>{let r=Z7(t);return e[Q7(t,n)]=X7(r),e},{});k.current&&(k.current.pause(),k.current.currentTime=0),O(!1),E({image:X7(C.imageUrl),video:X7(C.videoUrl),videoCover:X7(C.videoCoverUrl),references:e})},[C]);let j=()=>{s(1),_(f.trim()),y(m.trim()),x(e=>e+1)},M=(0,S.useCallback)(e=>{w(e)},[]),N=()=>{k.current&&k.current.pause(),O(!1),w(null)},P=e=>{E(t=>({...t,...e}))},F=(e,t)=>{E(n=>({...n,references:{...n.references,[e]:t}}))},I=()=>{if(C?.videoUrl){if(Y7(C.videoUrl)){P({video:`invalid`}),LG.warning(`视频链接已超时,请刷新列表或重新搜索后再查看`);return}O(!0),window.setTimeout(()=>{k.current?.play().catch(()=>{O(!1),P({video:`invalid`}),LG.warning(`视频播放失败,请确认资源链接是否仍然有效`)})},0)}},L=(e,t=`素材`)=>{if(!e){LG.warning(`${t}链接为空,暂无法查看`);return}if(K7(e)){LG.warning(`本地临时素材已失效,暂无法查看`);return}if(Y7(e)){LG.warning(`${t}链接已超时,请刷新列表或重新搜索后再查看`);return}window.open(q7(e),`_blank`,`noopener,noreferrer`)},R=(0,S.useMemo)(()=>[{title:`用户`,key:`user`,width:150,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:t.userName||`未知用户`}),(0,Q.jsx)(`div`,{style:{fontSize:11,color:`#94a3b8`},children:Kne(t.userId)})]})},{title:`类型`,dataIndex:`genType`,width:90,render:e=>{let t=G7[e]||{text:e||`-`,color:`default`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`提示词`,key:`prompt`,ellipsis:!0,render:(e,t)=>(0,Q.jsx)(Ow,{title:t.originalPrompt,placement:`topLeft`,children:(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#475569`},ellipsis:!0,children:t.originalPrompt||`-`})})},{title:`参数`,key:`params`,width:180,render:(e,t)=>t.genType===`video`?t.duration||t.aspectRatio||t.resolution?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.duration?(0,Q.jsxs)(NQ,{children:[t.duration,`s`]}):null,t.aspectRatio?(0,Q.jsx)(NQ,{children:t.aspectRatio}):null,t.resolution?(0,Q.jsx)(NQ,{children:t.resolution}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`无参数`}):t.imageSize||t.imageProportion||t.imagePx?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.imageSize?(0,Q.jsx)(NQ,{children:t.imageSize}):null,t.imageProportion?(0,Q.jsx)(NQ,{children:t.imageProportion}):null,t.imagePx?(0,Q.jsx)(NQ,{children:t.imagePx}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`无参数`})},{title:`积分`,key:`credits`,width:130,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12},children:[(0,Q.jsxs)(`div`,{style:{color:`#6366f1`},children:[`总: `,t.creditsCost||0]}),t.textCreditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#f59e0b`},children:[`文字: `,t.textCreditsCost]}):null]})},{title:`状态`,dataIndex:`status`,width:100,render:e=>{let t=U7[e]||{color:`default`,text:e||`-`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`阶段`,dataIndex:`pipelineStage`,width:120,render:e=>(0,Q.jsx)(NQ,{color:`blue`,children:W7[e]||e||`-`})},{title:`时间`,key:`time`,width:170,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[(0,Q.jsx)(`div`,{children:J7(t.createdAt)}),t.generatedAt?(0,Q.jsxs)(`div`,{style:{color:`#10b981`},children:[`生成: `,J7(t.generatedAt)]}):null]})},{title:`操作`,key:`action`,width:90,fixed:`right`,render:(e,t)=>(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>M(t),children:`详情`})}],[M]),z=C?G7[C.genType]||{text:C.genType||`-`,color:`default`,icon:null}:null,B=C?U7[C.status]||{color:`default`,text:C.status||`-`,icon:null}:null,V=()=>{if(!C||C.genType!==`image`||C.status!==`completed`)return null;if(!C.imageUrl)return(0,Q.jsx)(e9,{text:`此图片任务暂无结果图片`,minHeight:260});if(T.image===`invalid`)return(0,Q.jsx)(e9,{text:$7(C.imageUrl,`图片`),minHeight:260});let e=q7(C.imageUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,minHeight:260,borderRadius:12,background:`#f8f9fc`,border:`1px solid #e2e8f0`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:e,alt:`生成图片`,onLoad:()=>P({image:`valid`}),onError:()=>P({image:`invalid`}),style:{display:T.image===`valid`?`block`:`none`,width:`100%`,maxHeight:560,objectFit:`contain`,background:`#fff`}},`${C.id}-${e}`),T.image===`checking`?(0,Q.jsx)(e9,{text:`图片加载检测中...`,minHeight:260}):null]})},H=()=>{if(!C||D||T.video===`invalid`)return null;let e=C.videoUrl?(0,Q.jsx)(qE,{type:`primary`,shape:`circle`,size:`large`,icon:(0,Q.jsx)(J4,{}),onClick:I,style:{boxShadow:`0 8px 20px rgba(15,23,42,0.25)`}}):null;if(!C.videoCoverUrl)return(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,Q.jsx)(e9,{text:`此视频无封面`,minHeight:340,action:e})});if(T.videoCover===`invalid`)return(0,Q.jsx)(e9,{text:$7(C.videoCoverUrl,`视频封面`),minHeight:340,action:e});let t=q7(C.videoCoverUrl);return(0,Q.jsxs)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,border:`1px solid #e2e8f0`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:t,alt:`视频封面`,onLoad:()=>P({videoCover:`valid`}),onError:()=>P({videoCover:`invalid`}),style:{display:T.videoCover===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`}},`${C.id}-cover-${t}`),T.videoCover===`checking`?(0,Q.jsx)(e9,{text:`视频封面加载检测中...`,minHeight:340,action:e}):null,T.videoCover===`valid`?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(15,23,42,0.18)`},children:e}):null]})},U=()=>{if(!C||C.genType!==`video`||C.status!==`completed`)return null;if(!C.videoUrl)return(0,Q.jsx)(e9,{text:`此视频任务暂无结果视频`,minHeight:340});if(T.video===`invalid`)return(0,Q.jsx)(e9,{text:$7(C.videoUrl,`视频`),minHeight:340});let e=q7(C.videoUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:340,borderRadius:12,background:`#000`,overflow:`hidden`,border:`1px solid #e2e8f0`},children:[(0,Q.jsx)(`video`,{ref:k,src:e,preload:`metadata`,controls:D,onLoadedMetadata:()=>P({video:`valid`}),onCanPlay:()=>P({video:`valid`}),onPlaying:()=>{O(!0),P({video:`valid`})},onPause:()=>O(!1),onEnded:()=>O(!1),onError:()=>{O(!1),P({video:`invalid`})},style:{width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`,opacity:+!!D,pointerEvents:D?`auto`:`none`}},`${C.id}-${e}`),H()]})},W=(e,t)=>{let n=Z7(e),r=Jne(e),i=Q7(e,t),a=T.references[i]||X7(n),o=r===`image`,s=r===`video`,c=typeof e.name==`string`&&e.name?e.name:`参考素材 ${t+1}`;if(!n)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(e9,{text:`无链接`,compact:!0})}),(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})]},i);if(a===`invalid`)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(e9,{text:K7(n)?`本地临时素材已失效`:`素材不可访问`,compact:!0})}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i);let l=q7(n);return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsxs)(`div`,{role:`button`,tabIndex:0,title:`点击新页面查看素材`,onClick:()=>L(n,s?`视频素材`:o?`图片素材`:`素材`),onKeyDown:e=>{e.key===`Enter`&&L(n,s?`视频素材`:o?`图片素材`:`素材`)},style:{width:94,height:94,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,background:`#f8f9fc`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[o?(0,Q.jsx)(`img`,{src:l,alt:c,onLoad:()=>F(i,`valid`),onError:()=>F(i,`invalid`),style:{display:a===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`cover`}}):null,s?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`video`,{src:l,preload:`metadata`,onLoadedMetadata:()=>F(i,`valid`),onError:()=>F(i,`invalid`),style:{display:`none`}}),(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[(0,Q.jsx)(J4,{style:{fontSize:18}}),(0,Q.jsx)(`div`,{children:`视频素材`}),(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]})]}):null,!o&&!s?(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[`文件素材`,(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]}):null,a===`checking`&&o?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8f9fc`},children:(0,Q.jsx)(xm,{style:{color:`#6366f1`}})}):null]}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i)};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`创作记录管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[n,` 条记录`]})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`状态筛选`,value:c||void 0,style:{width:140},onChange:e=>{l(e||``),s(1)},options:[{value:`generating`,label:`生成中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`}]}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`类型筛选`,value:u||void 0,style:{width:120},onChange:e=>{d(e||``),s(1)},options:[{value:`image`,label:`图片`},{value:`video`,label:`视频`}]}),(0,Q.jsx)(hW,{placeholder:`用户ID搜索`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),style:{width:180},value:f,onChange:e=>p(e.target.value),onPressEnter:j,allowClear:!0}),(0,Q.jsx)(hW,{placeholder:`用户名搜索`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),style:{width:160},value:m,onChange:e=>h(e.target.value),onPressEnter:j,allowClear:!0}),(0,Q.jsx)(qE,{type:`primary`,onClick:j,style:{borderRadius:8},children:`搜索`})]})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:i,columns:R,dataSource:e,scroll:{x:1180},pagination:{current:o,pageSize:V7,total:n,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:e=>s(e)}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[C?.genType===`video`?(0,Q.jsx)(A6,{}):(0,Q.jsx)(v2,{}),(0,Q.jsx)(`span`,{children:`创作记录详情`})]}),open:!!C,onCancel:N,footer:null,width:900,destroyOnClose:!0,children:C?(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:12},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12,flexWrap:`wrap`},children:[z?(0,Q.jsx)(NQ,{color:z.color,icon:z.icon,children:z.text}):null,B?(0,Q.jsx)(NQ,{color:B.color,icon:B.icon,children:B.text}):null,C.pipelineStage?(0,Q.jsx)(NQ,{color:`blue`,children:W7[C.pipelineStage]||C.pipelineStage}):null]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`用户名称`,value:C.userName||`未知用户`}),(0,Q.jsx)(t9,{label:`用户ID`,value:C.userId||`-`}),(0,Q.jsx)(t9,{label:`任务ID`,value:C.id})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,lineHeight:1.6},children:C.originalPrompt||`-`})]}),C.genType===`video`?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`时长`,value:C.duration?`${C.duration}秒`:`-`}),(0,Q.jsx)(t9,{label:`画面比例`,value:C.aspectRatio||`-`}),(0,Q.jsx)(t9,{label:`分辨率`,value:C.resolution||`-`})]}):(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`图片档位`,value:C.imageSize||`-`}),(0,Q.jsx)(t9,{label:`图片比例`,value:C.imageProportion||`-`}),(0,Q.jsx)(t9,{label:`像素尺寸`,value:C.imagePx||`-`})]}),C.engineSnapshot?(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`引擎快照`}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`引擎名称`,value:C.engineSnapshot.name||`-`}),(0,Q.jsx)(t9,{label:`服务商`,value:C.engineSnapshot.provider||`-`}),(0,Q.jsx)(t9,{label:`模型`,value:C.engineSnapshot.modelName||`-`}),(0,Q.jsx)(t9,{label:`引擎ID`,value:C.engineSnapshot.id||C.engineId||`-`})]})]}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`总积分`,value:(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:C.creditsCost||0})}),(0,Q.jsx)(t9,{label:`文字积分`,value:`${C.textCreditsCost||0} (${C.textTokensUsed||0} tokens)`}),(0,Q.jsx)(t9,{label:`图片 tokens`,value:C.imageTokensUsed??0}),(0,Q.jsx)(t9,{label:`视频 tokens`,value:C.videoTokensUsed??0})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`第三方任务ID`,value:C.providerTaskId||C.seedanceTaskId||`-`}),(0,Q.jsx)(t9,{label:`轮询次数`,value:C.pollCount??0}),(0,Q.jsx)(t9,{label:`重试次数`,value:C.retryCount??0})]}),!C?.mediaReferences||C.mediaReferences.length===0?null:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`参考内容`}),(0,Q.jsx)(`div`,{style:{display:`flex`,gap:10,flexWrap:`wrap`},children:C.mediaReferences.map((e,t)=>W(e,t))})]}),C.status===`completed`?(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:C.genType===`video`?`生成视频`:`生成图片`}),C.genType===`video`?U():V()]}):null,C.status===`failed`&&C.errorMessage?(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(239,68,68,0.04)`,border:`1px solid rgba(239,68,68,0.15)`},children:(0,Q.jsxs)(Z.Text,{style:{fontSize:12,color:`#ef4444`},children:[`错误信息: `,C.errorMessage]})}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,fontSize:12,color:`#94a3b8`,flexWrap:`wrap`},children:[(0,Q.jsxs)(`span`,{children:[`创建: `,J7(C.createdAt)]}),(0,Q.jsxs)(`span`,{children:[`生成: `,J7(C.generatedAt)]})]})]}):(0,Q.jsx)(pC,{description:`暂无详情`})})]})},n9=20,Xne=[{value:`pending`,label:`已创建`},{value:`waiting_user`,label:`等待用户操作`},{value:`processing`,label:`处理中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`},{value:`cancelled`,label:`已取消`}],Zne={pending:{color:`default`,text:`已创建`},waiting_user:{color:`processing`,text:`等待用户操作`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`已完成`},failed:{color:`error`,text:`失败`},cancelled:{color:`default`,text:`已取消`}},Qne={material_input:`素材输入`,image_prompt_optimize:`图片 AI 提词`,image_generate:`图片生成`,video_prompt_optimize:`视频 AI 提词`,video_generate:`视频生成`},r9=e=>e?Z5(e):`-`,i9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,$ne=({status:e})=>{if(!e)return(0,Q.jsx)(NQ,{children:`-`});let t=Zne[e]||{color:`blue`,text:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.text})},ere=()=>{let e=Ye(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(1),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(``),[h,g]=(0,S.useState)(``),[_,v]=(0,S.useState)(null),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(``),[w,T]=(0,S.useState)(``),[E,D]=(0,S.useState)(null),[O,k]=(0,S.useState)(0),A=(0,S.useCallback)(async()=>{o(!0);try{let e=await v5({status:l||void 0,keyword:y||void 0,userId:x||void 0,userName:w||void 0,createdStart:E?.[0]?.toISOString?.(),createdEnd:E?.[1]?.toISOString?.(),page:s,pageSize:n9});n(e.items||[]),i(e.total||0)}catch(e){LG.error(e?.message||`加载爆款开头复刻任务失败`)}finally{o(!1)}},[s,E,y,x,w,l]);(0,S.useEffect)(()=>{A()},[A,O]);let j=()=>{b(d.trim()),C(p.trim()),T(h.trim()),D(_),c(1)};return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsx)(PR,{children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{align:`center`,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:3,style:{marginBottom:4},children:`爆款开头复刻`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`只读排查页面:查看任务列表、素材、步骤详情和生成结果。`})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>k(e=>e+1),children:`刷新`})]}),(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`任务状态`,style:{width:160},value:l||void 0,onChange:e=>{u(e||``),c(1)},options:Xne}),(0,Q.jsx)(hW,{allowClear:!0,prefix:(0,Q.jsx)(NC,{}),placeholder:`关键词:标题/项目名/核心点`,style:{width:260},value:d,onChange:e=>f(e.target.value),onPressEnter:j}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户ID(管理员)`,style:{width:190},value:p,onChange:e=>m(e.target.value),onPressEnter:j}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户名(管理员)`,style:{width:230},value:h,onChange:e=>g(e.target.value),onPressEnter:j}),(0,Q.jsx)(YB.RangePicker,{showTime:!0,value:_,onChange:v,placeholder:[`创建开始`,`创建结束`]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(NC,{}),onClick:j,children:`搜索`}),(0,Q.jsx)(qE,{onClick:()=>{u(``),f(``),m(``),g(``),v(null),b(``),C(``),T(``),D(null),c(1),k(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:a,dataSource:t,pagination:{current:s,pageSize:n9,total:r,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:c},scroll:{x:1380},columns:[{title:`项目ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Ow,{title:e,children:i9(e)})},{title:`用户`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(Z.Text,{children:t.userName||`-`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:i9(t.userId)})]})},{title:`项目信息`,width:260,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:2,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.title||t.targetProjectName||`-`}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:240},children:[`素材:`,t.sourceProjectName||`-`]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:240},children:[`核心:`,t.coreContentPoint||`-`]})]})},{title:`状态`,dataIndex:`status`,width:130,render:e=>(0,Q.jsx)($ne,{status:e})},{title:`当前步骤`,dataIndex:`currentStepCode`,width:140,render:e=>Qne[e]||e||`-`},{title:`图片结果`,dataIndex:`finalImageUrl`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`success`,children:`有`}):(0,Q.jsx)(NQ,{children:`无`})},{title:`视频结果`,dataIndex:`finalVideoUrl`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`success`,children:`有`}):(0,Q.jsx)(NQ,{children:`无`})},{title:`错误信息`,dataIndex:`errorMessage`,width:220,ellipsis:!0,render:e=>e||`-`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:r9},{title:`更新时间`,dataIndex:`updatedAt`,width:170,render:r9},{title:`操作`,fixed:`right`,width:110,render:(t,n)=>(0,Q.jsx)(qE,{type:`link`,icon:(0,Q.jsx)(qU,{}),onClick:()=>e(`/hot-opening-replications/${n.id}`),children:`详情`})}]})]})})})},a9=({value:e,maxHeight:t=420})=>e==null||e===``?(0,Q.jsx)(pC,{image:pC.PRESENTED_IMAGE_SIMPLE,description:`暂无 JSON 数据`}):(0,Q.jsx)(`pre`,{style:{margin:0,padding:12,maxHeight:t,overflow:`auto`,background:`#0f172a`,color:`#e2e8f0`,borderRadius:8,fontSize:12,lineHeight:1.6},children:JSON.stringify(e,null,2)}),tre=({input:e,output:t,raw:n,inputLabel:r=`查看 input_json`,outputLabel:i=`查看 output_json`,rawLabel:a=`查看原始 JSON`})=>{let o=[];return e!==void 0&&o.push({key:`input`,label:r,children:(0,Q.jsx)(a9,{value:e})}),t!==void 0&&o.push({key:`output`,label:i,children:(0,Q.jsx)(a9,{value:t})}),n!==void 0&&o.push({key:`raw`,label:a,children:(0,Q.jsx)(a9,{value:n})}),o.length?(0,Q.jsx)(Ng,{size:`small`,style:{marginTop:12},items:o}):null},nre=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``);function rre(e){if(!e)return``;let t=String(e).trim();return t?/^(https?:)?\/\//i.test(t)||/^(blob|data):/i.test(t)?t:`${nre}${t.startsWith(`/`)?t:`/${t}`}`:``}var o9=({url:e,type:t,height:n=260,emptyDescription:r=`暂无资源`,errorDescription:i=`资源加载失败,可能文件不存在、签名过期或访问权限受限。`})=>{let a=(0,S.useMemo)(()=>rre(e),[e]),[o,s]=(0,S.useState)(!1);(0,S.useEffect)(()=>{s(!1)},[a]);let c=a?(0,Q.jsxs)(VV,{wrap:!0,style:{marginTop:8},children:[(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(c$,{}),onClick:async()=>{if(a)try{await navigator.clipboard.writeText(a),LG.success(`资源地址已复制`)}catch{LG.error(`复制失败,请手动复制`)}},children:`复制地址`}),(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(l4,{}),onClick:()=>window.open(a,`_blank`,`noopener,noreferrer`),children:`新窗口打开`}),(0,Q.jsx)(Z.Text,{copyable:{text:a},type:`secondary`,style:{maxWidth:460},ellipsis:!0,children:a})]}):null;return a?(0,Q.jsxs)(`div`,{children:[o?(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`资源预览失败`,description:i,style:{marginBottom:8}}):null,t===`image`?(0,Q.jsx)(PU,{src:a,onError:()=>s(!0),style:{width:`100%`,maxHeight:n,objectFit:`contain`,borderRadius:12,background:`#f8fafc`,border:`1px solid #f1f5f9`},fallback:``,preview:!o}):(0,Q.jsx)(`video`,{src:a,controls:!0,preload:`metadata`,onError:()=>s(!0),style:{width:`100%`,maxHeight:n,borderRadius:12,background:`#0f172a`,border:`1px solid #f1f5f9`}}),c]}):(0,Q.jsx)(`div`,{children:(0,Q.jsx)(`div`,{style:{height:n,borderRadius:12,border:`1px dashed #cbd5e1`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8fafc`},children:(0,Q.jsx)(pC,{image:pC.PRESENTED_IMAGE_SIMPLE,description:r})})})},s9={pending:{text:`待处理`,color:`default`},waiting_user:{text:`等待用户操作`,color:`processing`},processing:{text:`处理中`,color:`warning`},completed:{text:`已完成`,color:`success`},failed:{text:`失败`,color:`error`},cancelled:{text:`已取消`,color:`default`},canceled:{text:`已取消`,color:`default`},timeout:{text:`已超时`,color:`error`},queued:{text:`已入队`,color:`processing`},preparing:{text:`准备中`,color:`processing`},creating_provider_task:{text:`创建远端任务`,color:`processing`},waiting_remote:{text:`等待远端结果`,color:`processing`},polling:{text:`轮询远端结果`,color:`processing`},result_ready:{text:`结果已就绪`,color:`success`},downloading:{text:`下载中`,color:`processing`},done:{text:`已完成`,color:`success`},download_failed:{text:`下载失败`,color:`error`},retry_waiting:{text:`等待重试`,color:`orange`},pending_analysis:{text:`等待分析`,color:`default`},analyzing:{text:`分析中`,color:`processing`},analysis_completed:{text:`分析完成`,color:`success`},analysis_failed:{text:`分析失败`,color:`error`},splitting:{text:`拆镜中`,color:`warning`},split_completed:{text:`拆镜完成`,color:`success`},partial_failed:{text:`部分失败`,color:`orange`},none:{text:`未拆镜`,color:`default`},not_required:{text:`无需处理`,color:`default`},not_started:{text:`未开始`,color:`default`},project_created:{text:`已创建项目`,color:`processing`},true:{text:`是`,color:`success`},false:{text:`否`,color:`default`}},c9={material_input:`素材输入`,image_prompt_optimize:`图片 AI 提词`,image_generate:`图片生成`,video_prompt_optimize:`视频 AI 提词`,video_generate:`视频生成`},l9={hot_opening_replicate:`爆款开头复刻`,shot_replicate:`拆镜复刻`},u9={ai_suggestion:{text:`AI 建议`,color:`purple`},custom:{text:`自定义`,color:`cyan`},original:{text:`原视频`,color:`blue`}};function d9(e){return e?l9[e]||e:`-`}function f9(e){return e?c9[e]||e:`-`}function ire(e){return e?s9[e]?.text||c9[e]||l9[e]||u9[e]?.text||e:`-`}function are(e){return e?s9[e]?.color||u9[e]?.color||`blue`:`default`}var p9=({status:e,tooltipRaw:t=!0})=>{if(e==null||e===``)return(0,Q.jsx)(NQ,{children:`-`});let n=String(e),r=ire(n),i=(0,Q.jsx)(NQ,{color:are(n),children:r});return!t||r===n?i:(0,Q.jsx)(Ow,{title:n,children:i})};function m9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function h9(e,...t){for(let n of t){let t=e[n];if(t!=null&&String(t).trim()!==``)return String(t)}return``}function g9(e,t,...n){for(let t of n){let n=e[t];if(n===!0||n===!1)return n;if(n===`true`)return!0;if(n===`false`)return!1}return t}function ore(e,...t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t)&&t>0)return t;if(typeof t==`string`&&t.trim()){let e=Number(t);if(Number.isFinite(e)&&e>0)return e}}}function _9(e){if(!m9(e))return null;let t=h9(e,`key`);return t?{key:t,label:h9(e,`label`)||t,type:h9(e,`type`)||void 0,enabled:g9(e,!0,`enabled`),editable:g9(e,!0,`editable`),maxLength:ore(e,`maxLength`,`max_length`)}:null}function v9(e){if(!m9(e))return null;let t=e.data;return m9(t)?t:Array.isArray(e.sections)?e:null}function sre(e){return!!v9(e)}function cre(e){let t=v9(e);return(Array.isArray(t?.sections)?t.sections:[]).map(e=>{let t=_9(e);if(!t||!m9(e))return null;let n=Array.isArray(e.children)?e.children.map(_9).filter(Boolean):[],r=Array.isArray(e.itemFields)?e.itemFields.map(_9).filter(Boolean):Array.isArray(e.item_fields)?e.item_fields.map(_9).filter(Boolean):[];return{...t,contentKey:h9(e,`contentKey`,`content_key`)||void 0,children:n,itemFields:r}}).filter(e=>!!e&&e.enabled)}function lre(e){return m9(e)?Object.entries(e).filter(([e])=>![`schemaVersion`,`schemaUsage`,`schema_version`,`schema_usage`].includes(e)).map(([e,t])=>Array.isArray(t)&&t.every(m9)?{key:e,label:e,type:`flow`,enabled:!0,editable:!1,itemFields:Array.from(new Set(t.flatMap(e=>Object.keys(e)))).filter(e=>e!==`时间段`).map(e=>({key:e,label:e,enabled:!0,editable:!1})),children:[]}:m9(t)?{key:e,label:e,type:`object`,enabled:!0,editable:!1,children:Object.keys(t).map(e=>({key:e,label:e,enabled:!0,editable:!1})),itemFields:[]}:{key:e,label:e,type:`text`,enabled:!0,editable:!1,children:[],itemFields:[]}):[]}var y9=e=>!!e&&typeof e==`object`&&!Array.isArray(e),b9=e=>typeof e==`string`&&e.length>80,x9=e=>e==null||e===``?(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`}):typeof e==`boolean`?e?`是`:`否`:typeof e==`number`?e:typeof e==`string`?(0,Q.jsx)(Z.Paragraph,{style:{marginBottom:0,whiteSpace:`pre-wrap`},children:e}):(0,Q.jsx)(a9,{value:e,maxHeight:220}),S9=e=>e?(0,Q.jsx)(NQ,{color:`processing`,children:`可编辑`}):(0,Q.jsx)(NQ,{color:`default`,children:`只读`}),C9=(e,t)=>e[t],ure=(e,t)=>{let n=C9(e,t.key);if(!y9(n))return(0,Q.jsx)(a9,{value:n??{},maxHeight:220});let r=t.children.filter(e=>e.enabled);return r.length?(0,Q.jsx)(lV,{size:`small`,column:2,bordered:!0,children:r.map(e=>(0,Q.jsx)(lV.Item,{label:(0,Q.jsxs)(VV,{size:4,children:[e.label,S9(e.editable)]}),span:b9(n[e.key])||y9(n[e.key])||Array.isArray(n[e.key])?2:1,children:x9(n[e.key])},e.key))}):(0,Q.jsx)(a9,{value:n,maxHeight:220})},dre=(e,t)=>{let n=e.itemFields.filter(e=>e.enabled);return n.length?[{key:`时间段`,label:`时间段`,enabled:!0,editable:!1},...n]:Array.from(new Set(t.flatMap(e=>Object.keys(e)))).map(e=>({key:e,label:e,enabled:!0,editable:!1}))},fre=(e,t)=>{let n=C9(e,t.key);if(!Array.isArray(n)||!n.every(y9))return(0,Q.jsx)(a9,{value:n??[],maxHeight:260});let r=n,i=dre(t,r);return(0,Q.jsx)(bQ,{size:`small`,rowKey:(e,n)=>`${t.key}-${n}`,columns:i.map(e=>({title:(0,Q.jsxs)(VV,{size:4,children:[e.label,S9(e.editable)]}),dataIndex:e.key,key:e.key,width:b9(r.find(t=>t[e.key])?.[e.key])?320:160,render:e=>x9(e)})),dataSource:r,pagination:!1,scroll:{x:Math.max(900,i.length*180)},tableLayout:`fixed`})},pre=(e,t)=>x9(C9(e,t.key)),mre=({schema:e,finalPrompt:t,schemaConfigSnapshot:n,schemaConfigSource:r,schemaConfigVersion:i,schemaConfigIsFallback:a})=>{let o=!!e&&Object.keys(e).length>0;if(!o&&!t)return(0,Q.jsx)(pC,{description:`暂无视频提词 schema`});let s=o?e:{},c=sre(n),l=(c?cre(n):lre(s)).filter(e=>e.key in s).map(e=>({key:e.key,label:(0,Q.jsxs)(VV,{size:8,wrap:!0,children:[(0,Q.jsx)(`span`,{children:e.label}),S9(e.editable),c?null:(0,Q.jsx)(NQ,{color:`warning`,children:`管理后台兜底展示`})]}),children:e.type===`object`?ure(s,e):e.type===`flow`?fre(s,e):pre(s,e)}));return(0,Q.jsxs)(VV,{direction:`vertical`,size:12,style:{width:`100%`},children:[(0,Q.jsx)(PR,{size:`small`,title:`Schema 配置来源`,children:(0,Q.jsxs)(lV,{size:`small`,column:3,bordered:!0,children:[(0,Q.jsx)(lV.Item,{label:`来源`,children:r||n?.source||(c?`-`:`viewer_fallback`)}),(0,Q.jsx)(lV.Item,{label:`版本`,children:i||n?.version||`-`}),(0,Q.jsx)(lV.Item,{label:`历史兜底`,children:a||!c?(0,Q.jsx)(NQ,{color:`warning`,children:`是`}):(0,Q.jsx)(NQ,{color:`success`,children:`否`})})]})}),t?(0,Q.jsx)(PR,{size:`small`,title:`最终视频提示词`,children:(0,Q.jsx)(Z.Paragraph,{style:{whiteSpace:`pre-wrap`,marginBottom:0},children:t})}):null,l.length?(0,Q.jsx)(Ng,{size:`small`,items:l}):o?(0,Q.jsx)(PR,{size:`small`,title:`视频提词 Schema`,children:(0,Q.jsx)(a9,{value:s,maxHeight:360})}):null,o?(0,Q.jsx)(Ng,{size:`small`,items:[{key:`raw_schema`,label:`原始 JSON / 历史脏字段排查`,children:(0,Q.jsx)(a9,{value:s,maxHeight:420})}]}):null]})},hre=[`material_input`,`image_prompt_optimize`,`image_generate`,`video_prompt_optimize`,`video_generate`],gre={material_input:`参考素材、项目名称和核心内容点`,image_prompt_optimize:`图片 AI 提词优化结果`,image_generate:`图片引擎、生成参数和结果图`,video_prompt_optimize:`视频 JSON schema、动作流程和最终提词`,video_generate:`视频引擎、生成参数、封面和结果视频`},w9=e=>e?Z5(e):`-`,T9=e=>e?e.length>18?`${e.slice(0,10)}...${e.slice(-4)}`:e:`-`,_re=({text:e=`-`})=>(0,Q.jsx)(Z.Text,{type:`secondary`,children:e}),E9=({step:e})=>e?(0,Q.jsx)(tre,{input:e.input,output:e.output}):null,D9=({index:e,stepCode:t,step:n,current:r})=>(0,Q.jsxs)(VV,{wrap:!0,size:8,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:`第${e}步:${f9(t)}`}),(0,Q.jsx)(p9,{status:n?.status||`not_started`}),r?(0,Q.jsx)(NQ,{color:`blue`,children:`当前步骤`}):null,(0,Q.jsx)(Z.Text,{type:`secondary`,children:gre[t]||t}),n?.updatedAt?(0,Q.jsxs)(Z.Text,{type:`secondary`,children:[`更新时间:`,w9(n.updatedAt)]}):null,n?.chatTaskId?(0,Q.jsx)(Ow,{title:n.chatTaskId,children:(0,Q.jsxs)(NQ,{children:[`Chat:`,T9(n.chatTaskId)]})}):null]}),vre=(e,t)=>{if(!e)return[];let n=new Set;return n.add(`material_input`),e.currentStepCode&&n.add(e.currentStepCode),Object.values(t).forEach(e=>{(e.status===`failed`||e.errorMessage)&&n.add(e.stepCode)}),e.errorMessage&&n.add(e.currentStepCode||`material_input`),Array.from(n)},O9=(e,t=`错误信息`)=>e?(0,Q.jsx)(sf,{type:`error`,showIcon:!0,message:t,description:e,style:{marginTop:12,marginBottom:12}}):null,yre=(e,t=`暂无提词`)=>e?(0,Q.jsx)(Z.Paragraph,{style:{whiteSpace:`pre-wrap`,marginBottom:0},children:e}):(0,Q.jsx)(_re,{text:t}),k9=({moduleType:e=`shot_replicate`})=>{let{projectId:t}=$e(),n=Ye(),[r,i]=(0,S.useState)(null),[a,o]=(0,S.useState)(!1),s=(0,S.useCallback)(async()=>{if(t){o(!0);try{i(e===`hot_opening_replicate`?await y5(t):await w5(t))}catch(e){LG.error(e?.message||`加载复刻项目详情失败`)}finally{o(!1)}}},[e,t]);(0,S.useEffect)(()=>{s()},[s]);let c=(0,S.useMemo)(()=>{let e={};return(r?.steps||[]).forEach(t=>{e[t.stepCode]=t}),e},[r]),l=r?.module||e,u=d9(l),d=(0,S.useMemo)(()=>hre.map(e=>{let t=c[e],n=`wait`;return t?.status===`completed`?n=`finish`:t?.status===`processing`?n=`process`:t?.status===`failed`&&(n=`error`),{title:f9(e),description:t?(0,Q.jsx)(p9,{status:t.status}):`未创建`,status:n}}),[c]),f=(0,S.useMemo)(()=>vre(r,c),[r,c]);if(a&&!r)return(0,Q.jsx)(`div`,{style:{padding:64,textAlign:`center`},children:(0,Q.jsx)(SG,{size:`large`})});if(!r)return(0,Q.jsx)(PR,{style:{margin:24},children:(0,Q.jsx)(pC,{description:`未找到复刻项目详情`})});let p=c.material_input,m=c.image_prompt_optimize,h=c.image_generate,g=c.video_prompt_optimize,_=c.video_generate,v=r.imageGeneration?.resultImageUrl||r.finalImageUrl,y=r.videoGeneration?.resultVideoCoverUrl||r.finalVideoCoverUrl,b=r.videoGeneration?.resultVideoUrl||r.finalVideoUrl,x=[{key:`material_input`,label:(0,Q.jsx)(D9,{index:1,stepCode:`material_input`,step:p,current:r.currentStepCode===`material_input`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`模块类型`,children:(0,Q.jsx)(p9,{status:l})}),(0,Q.jsx)(lV.Item,{label:`素材步骤ID`,children:r.material?.materialStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`参考素材项目名`,children:r.material?.sourceProjectName||`-`}),(0,Q.jsx)(lV.Item,{label:`生成项目名称`,children:r.material?.targetProjectName||`-`}),(0,Q.jsx)(lV.Item,{label:`核心内容点`,span:2,children:r.material?.coreContentPoint||`-`})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(320px, 1fr))`,gap:16},children:[(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J4,{}),`素材视频`]}),children:(0,Q.jsx)(o9,{type:`video`,url:r.material?.materialVideoUrl,emptyDescription:`暂无素材视频`})}),(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(v2,{}),`素材图片`]}),children:(0,Q.jsx)(o9,{type:`image`,url:r.material?.materialImageUrl,emptyDescription:`暂无素材图片`})})]}),O9(p?.errorMessage),(0,Q.jsx)(E9,{step:p})]})},{key:`image_prompt_optimize`,label:(0,Q.jsx)(D9,{index:2,stepCode:`image_prompt_optimize`,step:m,current:r.currentStepCode===`image_prompt_optimize`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`提词步骤ID`,children:r.imageGeneration?.promptStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`步骤状态`,children:(0,Q.jsx)(p9,{status:m?.status||r.imageGeneration?.status})}),(0,Q.jsx)(lV.Item,{label:`图片提示词`,span:2,children:yre(r.imageGeneration?.prompt,`暂无图片提示词`)})]}),O9(m?.errorMessage||r.imageGeneration?.errorMessage),(0,Q.jsx)(E9,{step:m})]})},{key:`image_generate`,label:(0,Q.jsx)(D9,{index:3,stepCode:`image_generate`,step:h,current:r.currentStepCode===`image_generate`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`生成步骤ID`,children:r.imageGeneration?.generateStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`Chat任务ID`,children:r.imageGeneration?.chatTaskId||`-`}),(0,Q.jsx)(lV.Item,{label:`状态`,children:(0,Q.jsx)(p9,{status:r.imageGeneration?.status||h?.status})}),(0,Q.jsx)(lV.Item,{label:`图片引擎ID`,children:r.imageGeneration?.engineId||`-`}),(0,Q.jsx)(lV.Item,{label:`图片引擎名称`,children:r.imageGeneration?.engineName||`-`}),(0,Q.jsx)(lV.Item,{label:`生成参数`,span:3,children:(0,Q.jsx)(a9,{value:r.imageGeneration?.params||{},maxHeight:160})})]}),O9(r.imageGeneration?.errorMessage||h?.errorMessage),(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(v2,{}),`图片结果`]}),children:(0,Q.jsx)(o9,{type:`image`,url:v,height:360,emptyDescription:h?.status===`failed`||r.imageGeneration?.errorMessage?`图片生成失败,未返回图片地址`:`暂无图片结果`,errorDescription:`图片资源加载失败,可能图片文件不存在、签名过期或访问权限受限。`})}),(0,Q.jsx)(E9,{step:h})]})},{key:`video_prompt_optimize`,label:(0,Q.jsx)(D9,{index:4,stepCode:`video_prompt_optimize`,step:g,current:r.currentStepCode===`video_prompt_optimize`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`提词步骤ID`,children:r.videoGeneration?.promptStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`步骤状态`,children:(0,Q.jsx)(p9,{status:g?.status})}),(0,Q.jsx)(lV.Item,{label:`提词参数`,span:3,children:(0,Q.jsx)(a9,{value:r.videoGeneration?.promptParams||{},maxHeight:160})})]}),O9(g?.errorMessage||r.videoGeneration?.errorMessage),(0,Q.jsx)(mre,{schema:r.videoGeneration?.promptSchema,finalPrompt:r.videoGeneration?.finalPrompt,schemaConfigSnapshot:r.videoGeneration?.schemaConfigSnapshot,schemaConfigSource:r.videoGeneration?.schemaConfigSource,schemaConfigVersion:r.videoGeneration?.schemaConfigVersion,schemaConfigIsFallback:r.videoGeneration?.schemaConfigIsFallback}),(0,Q.jsx)(E9,{step:g})]})},{key:`video_generate`,label:(0,Q.jsx)(D9,{index:5,stepCode:`video_generate`,step:_,current:r.currentStepCode===`video_generate`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`生成步骤ID`,children:r.videoGeneration?.generateStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`Chat任务ID`,children:r.videoGeneration?.chatTaskId||`-`}),(0,Q.jsx)(lV.Item,{label:`状态`,children:(0,Q.jsx)(p9,{status:r.videoGeneration?.status||_?.status})}),(0,Q.jsx)(lV.Item,{label:`视频引擎ID`,children:r.videoGeneration?.engineId||`-`}),(0,Q.jsx)(lV.Item,{label:`视频引擎名称`,children:r.videoGeneration?.engineName||`-`}),(0,Q.jsx)(lV.Item,{label:`生成参数`,span:3,children:(0,Q.jsx)(a9,{value:r.videoGeneration?.params||{},maxHeight:160})})]}),O9(r.videoGeneration?.errorMessage||_?.errorMessage),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(320px, 1fr))`,gap:16},children:[(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(v2,{}),`视频封面`]}),children:(0,Q.jsx)(o9,{type:`image`,url:y,emptyDescription:_?.status===`failed`||r.videoGeneration?.errorMessage?`视频生成失败,未返回封面`:`暂无视频封面`,errorDescription:`视频封面加载失败,可能文件不存在、签名过期或访问权限受限。`})}),(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(A6,{}),`最终视频`]}),children:(0,Q.jsx)(o9,{type:`video`,url:b,emptyDescription:_?.status===`failed`||r.videoGeneration?.errorMessage?`视频生成失败,未返回视频地址`:`暂无最终视频`,errorDescription:`视频资源加载失败,可能文件不存在、签名过期或访问权限受限。`})})]}),(0,Q.jsx)(E9,{step:_})]})}];return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{wrap:!0,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(Z1,{}),onClick:()=>n(-1),children:`返回`}),(0,Q.jsxs)(Z.Title,{level:3,style:{margin:0},children:[u,`项目详情`]}),(0,Q.jsx)(p9,{status:r.status}),r.module&&r.module!==e?(0,Q.jsxs)(NQ,{color:`gold`,children:[`接口模块:`,d9(r.module)]}):null]}),(0,Q.jsx)(qE,{onClick:s,loading:a,children:`刷新`})]}),(0,Q.jsx)(PR,{children:(0,Q.jsxs)(lV,{title:`基础信息`,column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`项目ID`,children:r.id}),(0,Q.jsx)(lV.Item,{label:`模块类型`,children:(0,Q.jsx)(p9,{status:l})}),(0,Q.jsx)(lV.Item,{label:`用户ID`,children:r.userId||`-`}),(0,Q.jsx)(lV.Item,{label:`用户名`,children:r.userName||`-`}),(0,Q.jsx)(lV.Item,{label:`标题`,children:r.title||`-`}),(0,Q.jsx)(lV.Item,{label:`当前步骤`,children:(0,Q.jsx)(Ow,{title:r.currentStepCode||``,children:f9(r.currentStepCode)})}),(0,Q.jsx)(lV.Item,{label:`状态`,children:(0,Q.jsx)(p9,{status:r.status})}),(0,Q.jsx)(lV.Item,{label:`创建时间`,children:w9(r.createdAt)}),(0,Q.jsx)(lV.Item,{label:`更新时间`,children:w9(r.updatedAt)}),(0,Q.jsx)(lV.Item,{label:`完成时间`,children:w9(r.completedAt)}),r.errorMessage?(0,Q.jsx)(lV.Item,{label:`错误信息`,span:3,children:(0,Q.jsx)(sf,{type:`error`,showIcon:!0,message:r.errorMessage})}):null]})}),(0,Q.jsx)(PR,{title:`步骤进度`,children:(0,Q.jsx)(Cq,{items:d})}),(0,Q.jsx)(PR,{title:`最终结果预览`,children:(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(280px, 1fr))`,gap:16},children:[(0,Q.jsx)(PR,{size:`small`,title:`最终图片`,children:(0,Q.jsx)(o9,{type:`image`,url:r.finalImageUrl||r.imageGeneration?.resultImageUrl,height:220,emptyDescription:`暂无最终图片`})}),(0,Q.jsx)(PR,{size:`small`,title:`最终视频封面`,children:(0,Q.jsx)(o9,{type:`image`,url:r.finalVideoCoverUrl||r.videoGeneration?.resultVideoCoverUrl,height:220,emptyDescription:`暂无最终视频封面`})}),(0,Q.jsx)(PR,{size:`small`,title:`最终视频`,children:(0,Q.jsx)(o9,{type:`video`,url:r.finalVideoUrl||r.videoGeneration?.resultVideoUrl,height:220,emptyDescription:`暂无最终视频`})})]})}),(0,Q.jsx)(Ng,{defaultActiveKey:f,items:x}),(0,Q.jsx)(Ng,{items:[{key:`steps-table`,label:`完整步骤列表`,children:(0,Q.jsx)(bQ,{rowKey:`id`,size:`small`,pagination:!1,dataSource:r.steps||[],scroll:{x:1100},columns:[{title:`序号`,dataIndex:`stepIndex`,width:70},{title:`步骤`,dataIndex:`stepCode`,width:160,render:e=>(0,Q.jsx)(Ow,{title:e,children:f9(e)})},{title:`状态`,dataIndex:`status`,width:120,render:e=>(0,Q.jsx)(p9,{status:e})},{title:`版本`,dataIndex:`version`,width:70},{title:`当前有效`,dataIndex:`isCurrent`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`success`,children:`是`}):(0,Q.jsx)(NQ,{children:`否`})},{title:`Chat任务`,dataIndex:`chatTaskId`,width:160,render:e=>(0,Q.jsx)(Ow,{title:e||``,children:T9(e)})},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:w9},{title:`完成时间`,dataIndex:`completedAt`,width:170,render:w9},{title:`错误`,dataIndex:`errorMessage`,ellipsis:!0,render:e=>e||`-`}]})},{key:`raw-detail`,label:`完整详情原始 JSON`,children:(0,Q.jsx)(a9,{value:r,maxHeight:520})}]})]})})},bre=()=>(0,Q.jsx)(k9,{moduleType:`hot_opening_replicate`}),A9=20,xre=[{value:`pending_analysis`,label:`等待分析`},{value:`analyzing`,label:`分析中`},{value:`analysis_completed`,label:`分析完成`},{value:`analysis_failed`,label:`分析失败`},{value:`splitting`,label:`拆镜中`},{value:`split_completed`,label:`拆镜完成`},{value:`partial_failed`,label:`部分失败`},{value:`failed`,label:`失败`}],Sre=[{value:`pending`,label:`待分析`},{value:`processing`,label:`分析中`},{value:`completed`,label:`分析完成`},{value:`failed`,label:`分析失败`}],Cre=[{value:`none`,label:`未拆镜`},{value:`pending`,label:`待拆镜`},{value:`processing`,label:`拆镜中`},{value:`completed`,label:`拆镜完成`},{value:`failed`,label:`拆镜失败`},{value:`retry_waiting`,label:`等待重试`}],wre={pending_analysis:{color:`default`,text:`等待分析`},analyzing:{color:`processing`,text:`分析中`},analysis_completed:{color:`success`,text:`分析完成`},analysis_failed:{color:`error`,text:`分析失败`},splitting:{color:`warning`,text:`拆镜中`},split_completed:{color:`success`,text:`拆镜完成`},partial_failed:{color:`orange`,text:`部分失败`},failed:{color:`error`,text:`失败`},none:{color:`default`,text:`未拆镜`},pending:{color:`default`,text:`待处理`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`完成`},retry_waiting:{color:`orange`,text:`等待重试`}},j9=e=>e?Z5(e):`-`,M9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,N9=({status:e})=>{if(!e)return(0,Q.jsx)(NQ,{children:`-`});let t=wre[e]||{color:`blue`,text:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.text})},Tre=()=>{let e=Ye(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(1),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(``),[h,g]=(0,S.useState)(``),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(null),[w,T]=(0,S.useState)(``),[E,D]=(0,S.useState)(``),[O,k]=(0,S.useState)(``),[A,j]=(0,S.useState)(null),[M,N]=(0,S.useState)(0),P=(0,S.useCallback)(async()=>{o(!0);try{let e=await b5({status:l||void 0,analysisStatus:d||void 0,splitStatus:p||void 0,keyword:w||void 0,userId:E||void 0,userName:O||void 0,createdStart:A?.[0]?.toISOString?.(),createdEnd:A?.[1]?.toISOString?.(),page:s,pageSize:A9});n(e.items||[]),i(e.total||0)}catch(e){LG.error(e?.message||`加载拆镜复刻任务失败`)}finally{o(!1)}},[d,s,A,w,E,O,p,l]);(0,S.useEffect)(()=>{P()},[P,M]);let F=()=>{T(h.trim()),D(_.trim()),k(y.trim()),j(x),c(1)};return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsx)(PR,{children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{align:`center`,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:3,style:{marginBottom:4},children:`拆镜复刻`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`只读排查页面:查看拆镜总任务、AI 分析结果、切片列表和关联复刻项目。`})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>N(e=>e+1),children:`刷新`})]}),(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`总任务状态`,style:{width:150},value:l||void 0,onChange:e=>{u(e||``),c(1)},options:xre}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`分析状态`,style:{width:140},value:d||void 0,onChange:e=>{f(e||``),c(1)},options:Sre}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`拆镜状态`,style:{width:140},value:p||void 0,onChange:e=>{m(e||``),c(1)},options:Cre}),(0,Q.jsx)(hW,{allowClear:!0,prefix:(0,Q.jsx)(NC,{}),placeholder:`关键词:标题/内容/分类/受众`,style:{width:260},value:h,onChange:e=>g(e.target.value),onPressEnter:F}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户ID(管理员)`,style:{width:190},value:_,onChange:e=>v(e.target.value),onPressEnter:F}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户名(管理员)`,style:{width:230},value:y,onChange:e=>b(e.target.value),onPressEnter:F}),(0,Q.jsx)(YB.RangePicker,{showTime:!0,value:x,onChange:C,placeholder:[`创建开始`,`创建结束`]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(NC,{}),onClick:F,children:`搜索`}),(0,Q.jsx)(qE,{onClick:()=>{u(``),f(``),m(``),g(``),v(``),b(``),C(null),T(``),D(``),k(``),j(null),c(1),N(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:a,dataSource:t,pagination:{current:s,pageSize:A9,total:r,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:c},scroll:{x:1500},columns:[{title:`任务集ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Ow,{title:e,children:M9(e)})},{title:`用户`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(Z.Text,{children:t.userName||`-`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:M9(t.userId)})]})},{title:`任务信息`,width:300,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:2,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.title||`-`}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:280},children:[`分类:`,t.originalVideoCategory||`-`]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:280},children:[`受众:`,t.originalVideoAudience||`-`]})]})},{title:`总状态`,dataIndex:`status`,width:120,render:e=>(0,Q.jsx)(N9,{status:e})},{title:`分析状态`,dataIndex:`analysisStatus`,width:110,render:e=>(0,Q.jsx)(N9,{status:e})},{title:`拆镜状态`,dataIndex:`splitStatus`,width:110,render:e=>(0,Q.jsx)(N9,{status:e})},{title:`切片进度`,width:180,render:(e,t)=>{let n=t.segmentCount||0,r=t.completedSegmentCount||0;return(0,Q.jsx)(CK,{size:`small`,percent:n?Math.round(r/n*100):0,format:()=>`${r}/${n}`})}},{title:`失败片段`,dataIndex:`failedSegmentCount`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`error`,children:e}):(0,Q.jsx)(NQ,{children:`0`})},{title:`视频时长`,dataIndex:`videoDurationSeconds`,width:100,render:e=>`${Number(e||0).toFixed(1)}s`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:j9},{title:`更新时间`,dataIndex:`updatedAt`,width:170,render:j9},{title:`操作`,fixed:`right`,width:120,render:(t,n)=>(0,Q.jsx)(qE,{type:`link`,icon:(0,Q.jsx)(qU,{}),onClick:()=>e(`/shot-replications/task-sets/${n.id}`),children:`查看切片`})}]})]})})})},Ere=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),P9=20,Dre=[{value:`ai_suggestion`,label:`AI 建议`},{value:`custom`,label:`自定义`}],Ore=[{value:`none`,label:`未拆镜`},{value:`pending`,label:`待拆镜`},{value:`processing`,label:`拆镜中`},{value:`completed`,label:`拆镜完成`},{value:`failed`,label:`拆镜失败`},{value:`retry_waiting`,label:`等待重试`}],kre=[{value:`not_required`,label:`无需分析`},{value:`pending`,label:`待分析`},{value:`processing`,label:`分析中`},{value:`completed`,label:`分析完成`},{value:`failed`,label:`分析失败`}],Are=[{value:`not_started`,label:`未复刻`},{value:`project_created`,label:`已创建项目`},{value:`processing`,label:`复刻中`},{value:`completed`,label:`复刻完成`},{value:`failed`,label:`复刻失败`}],jre={pending_analysis:{color:`default`,text:`等待分析`},analyzing:{color:`processing`,text:`分析中`},analysis_completed:{color:`success`,text:`分析完成`},analysis_failed:{color:`error`,text:`分析失败`},splitting:{color:`warning`,text:`拆镜中`},split_completed:{color:`success`,text:`拆镜完成`},partial_failed:{color:`orange`,text:`部分失败`},failed:{color:`error`,text:`失败`},none:{color:`default`,text:`未拆镜`},pending:{color:`default`,text:`待处理`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`完成`},retry_waiting:{color:`orange`,text:`等待重试`},not_required:{color:`default`,text:`无需分析`},not_started:{color:`default`,text:`未复刻`},project_created:{color:`processing`,text:`已创建项目`}},Mre=e=>{if(!e)return``;let t=String(e).trim();return t?/^(https?:)?\/\//i.test(t)||/^(blob|data):/i.test(t)?t:`${Ere}${t.startsWith(`/`)?t:`/${t}`}`:``},F9=e=>e?Z5(e):`-`,I9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,L9=({status:e})=>{if(!e)return(0,Q.jsx)(NQ,{children:`-`});let t=jre[e]||{color:`blue`,text:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.text})},R9=({value:e,maxHeight:t=420})=>(0,Q.jsx)(`pre`,{style:{margin:0,padding:12,maxHeight:t,overflow:`auto`,background:`#0f172a`,color:`#e2e8f0`,borderRadius:8,fontSize:12,lineHeight:1.6},children:JSON.stringify(e??{},null,2)}),z9=({url:e,height:t=280})=>e?(0,Q.jsx)(`video`,{src:Mre(e),controls:!0,preload:`metadata`,style:{width:`100%`,maxHeight:t,borderRadius:12,background:`#0f172a`}}):(0,Q.jsx)(pC,{description:`暂无视频`,image:pC.PRESENTED_IMAGE_SIMPLE}),Nre=({items:e=[]})=>(0,Q.jsx)(bQ,{rowKey:`index`,size:`small`,pagination:!1,dataSource:e,scroll:{x:!0},columns:[{title:`序号`,dataIndex:`index`,width:70},{title:`时间节点`,dataIndex:`timeNode`,width:120},{title:`开始`,dataIndex:`startSecond`,width:80,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`结束`,dataIndex:`endSecond`,width:80,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`内容`,dataIndex:`content`,ellipsis:!0},{title:`分类`,dataIndex:`category`,width:140},{title:`受众`,dataIndex:`audience`,ellipsis:!0}]}),Pre=()=>{let{taskSetId:e}=$e(),t=Ye(),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(0),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(null),k=(0,S.useCallback)(async()=>{if(e){d(!0);try{r(await x5(e))}catch(e){LG.error(e?.message||`加载拆镜任务详情失败`)}finally{d(!1)}}},[e]),A=(0,S.useCallback)(async()=>{if(e){p(!0);try{let t=await S5(e,{sourceMode:g||void 0,splitStatus:v||void 0,analysisStatus:b||void 0,replicateStatus:C||void 0,page:c,pageSize:P9});a(t.items||[]),s(t.total||0)}catch(e){LG.error(e?.message||`加载拆镜片段失败`)}finally{p(!1)}}},[b,c,C,g,v,e]);(0,S.useEffect)(()=>{k()},[k,m]),(0,S.useEffect)(()=>{A()},[A,m]);let j=async e=>{E(!0),O(null);try{O(await C5(e))}catch(e){LG.error(e?.message||`加载片段详情失败`)}};return u&&!n?(0,Q.jsx)(`div`,{style:{padding:64,textAlign:`center`},children:(0,Q.jsx)(SG,{size:`large`})}):n?(0,Q.jsxs)(`div`,{style:{padding:24},children:[(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(Z1,{}),onClick:()=>t(`/shot-replications`),children:`返回列表`}),(0,Q.jsx)(Z.Title,{level:3,style:{margin:0},children:`拆镜任务详情`}),(0,Q.jsx)(L9,{status:n.status})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>h(e=>e+1),children:`刷新`})]}),(0,Q.jsx)(PR,{children:(0,Q.jsxs)(lV,{title:`总任务信息`,column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`任务集ID`,children:n.id}),(0,Q.jsx)(lV.Item,{label:`用户ID`,children:n.userId||`-`}),(0,Q.jsx)(lV.Item,{label:`用户名`,children:n.userName||`-`}),(0,Q.jsx)(lV.Item,{label:`标题`,children:n.title||`-`}),(0,Q.jsxs)(lV.Item,{label:`视频时长`,children:[Number(n.videoDurationSeconds||0).toFixed(2),`s`]}),(0,Q.jsx)(lV.Item,{label:`总状态`,children:(0,Q.jsx)(L9,{status:n.status})}),(0,Q.jsx)(lV.Item,{label:`分析状态`,children:(0,Q.jsx)(L9,{status:n.analysisStatus})}),(0,Q.jsx)(lV.Item,{label:`拆镜状态`,children:(0,Q.jsx)(L9,{status:n.splitStatus})}),(0,Q.jsxs)(lV.Item,{label:`片段数量`,children:[n.completedSegmentCount,`/`,n.segmentCount,`,失败 `,n.failedSegmentCount]}),(0,Q.jsx)(lV.Item,{label:`原视频分类`,children:n.originalVideoCategory||`-`}),(0,Q.jsx)(lV.Item,{label:`创建时间`,children:F9(n.createdAt)}),(0,Q.jsx)(lV.Item,{label:`更新时间`,children:F9(n.updatedAt)}),(0,Q.jsx)(lV.Item,{label:`原视频内容`,span:3,children:n.originalVideoContent||`-`}),(0,Q.jsx)(lV.Item,{label:`原视频受众`,span:3,children:n.originalVideoAudience||`-`}),n.analysisErrorMessage?(0,Q.jsx)(lV.Item,{label:`分析错误`,span:3,children:(0,Q.jsx)(sf,{type:`error`,message:n.analysisErrorMessage})}):null,n.splitErrorMessage?(0,Q.jsx)(lV.Item,{label:`拆镜错误`,span:3,children:(0,Q.jsx)(sf,{type:`error`,message:n.splitErrorMessage})}):null]})}),(0,Q.jsx)(PR,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J4,{}),`原视频预览`]}),children:(0,Q.jsx)(z9,{url:n.videoUrl,height:360})}),(0,Q.jsxs)(PR,{title:`AI 建议拆镜列表`,children:[n.aiSuggestions?.length?(0,Q.jsx)(Nre,{items:n.aiSuggestions}):(0,Q.jsx)(pC,{description:`暂无 AI 建议拆镜`}),(0,Q.jsx)(Ng,{size:`small`,ghost:!0,style:{marginTop:12},items:[{key:`raw`,label:`查看原视频分析完整 JSON`,children:(0,Q.jsx)(R9,{value:n.analysisResultJson})}]})]}),(0,Q.jsxs)(PR,{title:`片段列表`,children:[(0,Q.jsxs)(VV,{wrap:!0,style:{marginBottom:16},children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`片段来源`,style:{width:140},value:g||void 0,options:Dre,onChange:e=>{_(e||``),l(1)}}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`切割状态`,style:{width:140},value:v||void 0,options:Ore,onChange:e=>{y(e||``),l(1)}}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`分析状态`,style:{width:140},value:b||void 0,options:kre,onChange:e=>{x(e||``),l(1)}}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`复刻状态`,style:{width:150},value:C||void 0,options:Are,onChange:e=>{w(e||``),l(1)}}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(NC,{}),onClick:()=>h(e=>e+1),children:`筛选`}),(0,Q.jsx)(qE,{onClick:()=>{_(``),y(``),x(``),w(``),l(1),h(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:f,dataSource:i,pagination:{current:c,pageSize:P9,total:o,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:l},scroll:{x:1550},columns:[{title:`片段ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Ow,{title:e,children:I9(e)})},{title:`序号`,dataIndex:`segmentIndex`,width:70},{title:`来源`,dataIndex:`sourceMode`,width:100,render:e=>e===`ai_suggestion`?(0,Q.jsx)(NQ,{color:`purple`,children:`AI建议`}):(0,Q.jsx)(NQ,{color:`cyan`,children:`自定义`})},{title:`时间节点`,dataIndex:`timeNode`,width:130},{title:`时长`,dataIndex:`durationSeconds`,width:90,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`切割`,dataIndex:`splitStatus`,width:100,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`分析`,dataIndex:`analysisStatus`,width:100,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`复刻`,dataIndex:`replicateStatus`,width:110,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`片段内容`,dataIndex:`segmentContent`,width:260,ellipsis:!0,render:e=>e||`-`},{title:`分类`,dataIndex:`segmentCategory`,width:120,render:e=>e||`-`},{title:`关联项目`,width:220,render:(e,n)=>n.moduleProjectId?(0,Q.jsxs)(VV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(qE,{type:`link`,style:{padding:0},onClick:()=>t(`/shot-replications/projects/${n.moduleProjectId}`),children:I9(n.moduleProjectId)}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:n.moduleProjectTitle||f9(n.moduleProjectCurrentStepCode)}),(0,Q.jsx)(L9,{status:n.moduleProjectStatus})]}):(0,Q.jsx)(NQ,{children:`未创建`})},{title:`错误`,dataIndex:`splitLastError`,width:220,ellipsis:!0,render:(e,t)=>e||t.analysisErrorMessage||`-`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:F9},{title:`操作`,fixed:`right`,width:100,render:(e,t)=>(0,Q.jsx)(qE,{type:`link`,icon:(0,Q.jsx)(qU,{}),onClick:()=>j(t.id),children:`详情`})}]})]})]}),(0,Q.jsx)(MV,{title:`片段详情`,width:720,open:T,onClose:()=>E(!1),destroyOnClose:!0,children:D?(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`片段ID`,span:2,children:D.id}),(0,Q.jsx)(lV.Item,{label:`时间节点`,children:D.timeNode}),(0,Q.jsxs)(lV.Item,{label:`时长`,children:[Number(D.durationSeconds||0).toFixed(2),`s`]}),(0,Q.jsx)(lV.Item,{label:`切割状态`,children:(0,Q.jsx)(L9,{status:D.splitStatus})}),(0,Q.jsx)(lV.Item,{label:`分析状态`,children:(0,Q.jsx)(L9,{status:D.analysisStatus})}),(0,Q.jsx)(lV.Item,{label:`复刻状态`,children:(0,Q.jsx)(L9,{status:D.replicateStatus})}),(0,Q.jsx)(lV.Item,{label:`关联项目`,children:D.moduleProjectId?(0,Q.jsx)(qE,{type:`link`,onClick:()=>t(`/shot-replications/projects/${D.moduleProjectId}`),children:D.moduleProjectId}):`-`}),(0,Q.jsx)(lV.Item,{label:`片段内容`,span:2,children:D.segmentContent||`-`}),(0,Q.jsx)(lV.Item,{label:`片段分类`,children:D.segmentCategory||`-`}),(0,Q.jsx)(lV.Item,{label:`片段受众`,children:D.segmentAudience||`-`})]}),(0,Q.jsx)(PR,{size:`small`,title:`片段视频`,children:(0,Q.jsx)(z9,{url:D.segmentVideoUrl,height:300})}),D.splitLastError?(0,Q.jsx)(sf,{type:`error`,message:`切割错误`,description:D.splitLastError}):null,D.analysisErrorMessage?(0,Q.jsx)(sf,{type:`error`,message:`分析错误`,description:D.analysisErrorMessage}):null,(0,Q.jsx)(Ng,{size:`small`,items:[{key:`analysis`,label:`片段分析 JSON`,children:(0,Q.jsx)(R9,{value:D.analysisJson})},{key:`suggestion`,label:`AI 建议原始 JSON`,children:(0,Q.jsx)(R9,{value:D.aiSuggestionJson})}]})]}):(0,Q.jsx)(SG,{})})]}):(0,Q.jsx)(PR,{style:{margin:24},children:(0,Q.jsx)(pC,{description:`未找到拆镜任务详情`})})},{Title:Fre,Text:B9,Paragraph:Ire}=Z,{TextArea:V9}=hW,H9=[{label:`对象`,value:`object`},{label:`数组`,value:`array`},{label:`字符串`,value:`string`},{label:`数字`,value:`number`},{label:`布尔`,value:`boolean`},{label:`流程数组`,value:`flow`}],U9=`画面属性`,Lre=new Set([`视频时长`,`视频比例`,`清晰度`,`帧率`,`推荐分辨率`]);function W9(e,t){return e===U9&&!!t&&Lre.has(t)}function G9(e){return e===U9}function Rre(e){return JSON.parse(JSON.stringify(e??null))}function K9(e,t,n,r){return!e||typeof e!=`object`?r:e[t]===void 0?e[n]===void 0?r:e[n]:e[t]}function zre(e){return{key:String(e?.key||e?.label||`新流程字段`),label:String(e?.label||e?.key||`新流程字段`),enabled:e?.enabled??!0,editable:e?.editable??!0,maxLength:Number(K9(e,`maxLength`,`max_length`,800)||800),value:e?.value??``}}function q9(e){let t=String(e?.type||`string`),n={key:String(e?.key||e?.label||`新字段`),label:String(e?.label||e?.key||`新字段`),type:t,enabled:e?.enabled??!0,editable:e?.editable??!0,maxLength:Number(K9(e,`maxLength`,`max_length`,t===`flow`?800:1e3)||(t===`flow`?800:1e3))};if(t===`object`)n.children=Array.isArray(e?.children)?e.children.map(q9):[];else if(t===`flow`){n.contentKey=String(K9(e,`contentKey`,`content_key`,e?.key===`镜头流程`?`镜头内容`:`动作内容`));let t=K9(e,`contentAliases`,`content_aliases`,[]);n.contentAliases=Array.isArray(t)?t.map(e=>String(e)).filter(Boolean):[];let r=K9(e,`itemFields`,`item_fields`,[]);n.itemFields=Array.isArray(r)&&r.length>0?r.map(zre):[{key:n.contentKey,label:n.contentKey,enabled:!0,editable:!0,maxLength:n.maxLength||800,value:``}]}else n.value=e?.value??(t===`array`?[]:t===`boolean`?!1:t===`number`?0:`无`);return n}function Bre(e){let t=Array.isArray(e?.segments)?e.segments:[],n=Array.isArray(e?.ratios)?e.ratios:[];return{minDuration:Number(K9(e,`minDuration`,`min_duration`,1)||1),maxDuration:Number(K9(e,`maxDuration`,`max_duration`,5)||5),ratios:n.map(e=>Number(e||0)),segments:t.map(e=>({stage:String(e?.stage||`新阶段`),description:String(e?.description||e?.desc||`阶段说明`)}))}}function J9(e){let t=Array.isArray(e?.sections)?e.sections:[],n=Array.isArray(e?.timePlanRules)?e.timePlanRules:Array.isArray(e?.time_plan_rules)?e.time_plan_rules:[];return{version:e?.version||`video_prompt_schema_config_v1`,enabled:e?.enabled??!0,sections:t.map(q9),timePlanRules:n.map(Bre)}}function Y9(e,t){let n=G9(e.key),r=W9(t,e.key),i={key:e.key,label:e.label,type:r?`string`:e.type,enabled:n||r?!0:!!e.enabled,editable:r?!1:!!e.editable,max_length:e.maxLength};return e.type===`object`?i.children=(e.children||[]).map(t=>Y9(t,e.key)):e.type===`flow`?(i.content_key=e.contentKey,i.content_aliases=e.contentAliases||[],i.item_fields=(e.itemFields||[]).map(e=>({key:e.key,label:e.label,enabled:!!e.enabled,editable:!!e.editable,max_length:e.maxLength,value:e.value??``}))):i.value=e.value,i}function X9(e,t){return{version:e.version,enabled:t,sections:(e.sections||[]).map(e=>Y9(e)),time_plan_rules:(e.timePlanRules||[]).map(e=>({min_duration:e.minDuration,max_duration:e.maxDuration,ratios:e.ratios||[],segments:(e.segments||[]).map(e=>({stage:e.stage,description:e.description}))}))}}function Z9(e){return e?.runtimeSchema||e?.runtime_schema||{}}function Q9(e){let t=e?.timePlan||e?.time_plan||Z9(e)?.动态时间规划||[];return Array.isArray(t)?t:[]}function Vre(e){return e?.schemaConfigSnapshot||e?.schema_config_snapshot||{}}function Hre(e,t){let n=new Blob([JSON.stringify(t,null,2)],{type:`application/json;charset=utf-8`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=e,i.click(),URL.revokeObjectURL(r)}var $9=(e=`string`)=>({key:`新字段`,label:`新字段`,type:e,enabled:!0,editable:!0,maxLength:e===`flow`?800:1e3,value:e===`array`?[]:e===`boolean`?!1:e===`number`?0:`无`,children:e===`object`?[]:void 0,contentKey:e===`flow`?`动作内容`:void 0,contentAliases:e===`flow`?[`动作内容`,`动作`,`动作说明`,`内容`,`说明`]:void 0,itemFields:e===`flow`?[{key:`动作内容`,label:`动作内容`,enabled:!0,editable:!0,maxLength:800,value:``}]:void 0}),Ure=()=>({minDuration:1,maxDuration:5,ratios:[.2,.4,.4],segments:[{stage:`开场吸引`,description:`快速吸引注意力`},{stage:`核心展示`,description:`展示主体动作、核心卖点或主要视觉内容`},{stage:`收尾引导`,description:`给出行动引导并稳定落版`}]}),Wre=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!0),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(null),[g]=X.useForm(),_=(0,S.useRef)(null),v=c?.sections||[],y=c?.timePlanRules||[],b=async()=>{t(!0);try{let e=await T5();a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),l(J9(e.data)),d(J9(e.defaultData??e.default_data))}catch(e){LG.error(e?.message||`加载失败`)}finally{t(!1)}};(0,S.useEffect)(()=>{b()},[]);let x=e=>{l(t=>{let n=J9(Rre(t));return e(n),n})},C=async()=>{if(c){r(!0);try{let e=await E5({is_enabled:i,data:X9(c,i)});l(J9(e.data)),a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),LG.success(`保存成功`)}catch(e){LG.error(e?.message||`保存失败`)}finally{r(!1)}}},w=async()=>{r(!0);try{let e=await D5();l(J9(e.data)),d(J9(e.defaultData??e.default_data)),a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),LG.success(`已恢复默认配置`)}catch(e){LG.error(e?.message||`恢复默认失败`)}finally{r(!1)}},T=async()=>{try{Hre(`video_prompt_schema_config.json`,await O5())}catch(e){LG.error(e?.message||`导出失败`)}},E=async e=>{let t=e.target.files?.[0];if(e.target.value=``,t)try{let e=await t.text(),n=JSON.parse(e),r=n.data||n,o=await k5({is_enabled:!!(n.isEnabled??n.is_enabled??i),data:r});l(J9(o.data)),a(!!(o.isEnabled??o.is_enabled??o.data?.enabled??!1)),s(!!(o.usingDefault??o.using_default??!1)),LG.success(`导入成功`)}catch(e){LG.error(e?.message||`导入失败,请检查 JSON 格式`)}},D=()=>{g.setFieldsValue({duration:8,aspectRatio:`9:16`,resolution:`1080p`,frameRate:`30fps`}),h(null),p(!0)},O=async()=>{if(!c)return;let e=await g.validateFields();try{h(await A5({is_enabled:i,data:X9(c,i),duration:Number(e.duration||8),aspect_ratio:e.aspectRatio,resolution:e.resolution,frame_rate:e.frameRate}))}catch(e){LG.error(e?.message||`预览失败`)}},k=()=>{x(e=>{e.sections.push($9(`object`))})},A=(e,t)=>{x(n=>{let r=n.sections[e];G9(r?.key)&&(delete t.key,delete t.type,delete t.enabled),n.sections[e]={...n.sections[e],...t},t.type===`object`&&(n.sections[e].children=n.sections[e].children||[]),t.type===`flow`&&(n.sections[e].contentKey=n.sections[e].contentKey||`动作内容`,n.sections[e].contentAliases=n.sections[e].contentAliases||[`动作内容`,`动作`,`动作说明`,`内容`,`说明`],n.sections[e].itemFields=n.sections[e].itemFields||[{key:`动作内容`,label:`动作内容`,enabled:!0,editable:!0,maxLength:800,value:``}])})},j=e=>{x(t=>{t.sections.splice(e,1)})},M=e=>{x(t=>{let n=t.sections[e];n.children=n.children||[],n.children.push($9(`string`))})},N=(e,t,n)=>{x(r=>{let i=r.sections[e],a=i.children||[],o=a[t];W9(i?.key,o?.key)&&(delete n.key,delete n.type,delete n.enabled,n.editable=!1),a[t]={...a[t],...n},r.sections[e].children=a})},P=(e,t)=>{x(n=>{n.sections[e].children?.splice(t,1)})},F=e=>{x(t=>{let n=t.sections[e];n.itemFields=n.itemFields||[],n.itemFields.push({key:`新流程字段`,label:`新流程字段`,enabled:!0,editable:!0,maxLength:800,value:``})})},I=(e,t,n)=>{x(r=>{let i=r.sections[e].itemFields||[];i[t]={...i[t],...n},r.sections[e].itemFields=i})},L=(e,t)=>{x(n=>{n.sections[e].itemFields?.splice(t,1)})},R=()=>{x(e=>{e.timePlanRules.push(Ure())})},z=(e,t)=>{x(n=>{n.timePlanRules[e]={...n.timePlanRules[e],...t}})},B=e=>{x(t=>{t.timePlanRules.splice(e,1)})},V=(e,t,n)=>{x(r=>{let i=r.timePlanRules[e];n.ratio!==void 0&&(i.ratios[t]=Number(n.ratio||0)),n.stage!==void 0&&(i.segments[t].stage=n.stage),n.description!==void 0&&(i.segments[t].description=n.description)})},H=e=>{x(t=>{let n=t.timePlanRules[e];n.ratios.push(1),n.segments.push({stage:`新阶段`,description:`阶段说明`})})},U=(e,t)=>{x(n=>{let r=n.timePlanRules[e];r.ratios.splice(t,1),r.segments.splice(t,1)})},W=(0,S.useMemo)(()=>v.map((e,t)=>({key:`section-${t}`,label:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(B9,{strong:!0,children:e.label||e.key||`未命名分组`}),e.key&&e.key!==e.label&&(0,Q.jsxs)(NQ,{color:`blue`,children:[`key: `,e.key]}),(0,Q.jsx)(NQ,{children:e.type}),G9(e.key)&&(0,Q.jsx)(NQ,{color:`red`,children:`系统锁定`}),!e.enabled&&!G9(e.key)&&(0,Q.jsx)(NQ,{color:`default`,children:`已禁用`})]}),children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsxs)(DK,{gutter:12,align:`middle`,children:[(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`key`,value:e.key,maxLength:64,placeholder:`传给 AI 的字段名`,disabled:G9(e.key),onChange:e=>A(t,{key:e.target.value})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`label`,value:e.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>A(t,{label:e.target.value})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(RC,{value:e.type,options:H9,style:{width:`100%`},disabled:G9(e.key),onChange:e=>A(t,{type:e})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`启用`,(0,Q.jsx)(Mq,{checked:G9(e.key)?!0:e.enabled,disabled:G9(e.key),onChange:e=>A(t,{enabled:e})})]})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`可编辑`,(0,Q.jsx)(Mq,{checked:e.editable,onChange:e=>A(t,{editable:e})})]})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,max:2e4,value:e.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>A(t,{maxLength:Number(e||1e3)})})}),(0,Q.jsx)(pz,{span:2,style:{textAlign:`right`},children:(0,Q.jsx)(WG,{title:`确认删除该分组?`,disabled:G9(e.key),onConfirm:()=>j(t),children:(0,Q.jsx)(qE,{danger:!0,icon:(0,Q.jsx)(IQ,{}),disabled:G9(e.key)})})})]}),e.type===`object`&&(0,Q.jsx)(PR,{size:`small`,title:`对象字段`,extra:(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(TL,{}),onClick:()=>M(t),children:`新增字段`}),children:(0,Q.jsx)(VV,{direction:`vertical`,style:{width:`100%`},children:(e.children||[]).map((n,r)=>(0,Q.jsxs)(DK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`key`,value:n.key,maxLength:64,placeholder:`传给 AI 的字段名`,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{key:e.target.value})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`label`,value:n.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>N(t,r,{label:e.target.value})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(RC,{value:n.type,options:H9.filter(e=>e.value!==`object`&&e.value!==`flow`),style:{width:`100%`},disabled:W9(e.key,n.key),onChange:e=>N(t,r,{type:e})})}),(0,Q.jsx)(pz,{span:2,children:(0,Q.jsxs)(VV,{children:[`启用`,(0,Q.jsx)(Mq,{checked:W9(e.key,n.key)?!0:n.enabled,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{enabled:e})})]})}),(0,Q.jsx)(pz,{span:2,children:(0,Q.jsxs)(VV,{children:[`编辑`,(0,Q.jsx)(Mq,{checked:W9(e.key,n.key)?!1:n.editable,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{editable:e})})]})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(oB,{min:1,max:2e4,value:n.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>N(t,r,{maxLength:Number(e||1e3)})})}),(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{value:Array.isArray(n.value)?n.value.join(`/`):String(n.value??``),maxLength:n.maxLength||1e3,placeholder:`默认值`,onChange:e=>N(t,r,{value:n.type===`array`?e.target.value.split(`/`).filter(Boolean):e.target.value})})}),(0,Q.jsx)(pz,{span:1,style:{textAlign:`right`},children:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),disabled:W9(e.key,n.key),onClick:()=>P(t,r)})})]},`child-${t}-${r}`))})}),e.type===`flow`&&(0,Q.jsxs)(PR,{size:`small`,title:`流程数组对象字段`,extra:(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(TL,{}),onClick:()=>F(t),children:`新增流程字段`}),children:[(0,Q.jsxs)(DK,{gutter:12,style:{marginBottom:12},children:[(0,Q.jsx)(pz,{span:6,children:(0,Q.jsx)(hW,{addonBefore:`内容字段`,value:e.contentKey,maxLength:64,onChange:e=>A(t,{contentKey:e.target.value})})}),(0,Q.jsx)(pz,{span:18,children:(0,Q.jsx)(hW,{addonBefore:`别名 / 分隔`,value:(e.contentAliases||[]).join(`/`),onChange:e=>A(t,{contentAliases:e.target.value.split(`/`).map(e=>e.trim()).filter(Boolean)})})})]}),(0,Q.jsx)(VV,{direction:`vertical`,style:{width:`100%`},children:(e.itemFields||[]).map((e,n)=>(0,Q.jsxs)(DK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{addonBefore:`key`,value:e.key,maxLength:64,placeholder:`流程对象字段名`,onChange:e=>I(t,n,{key:e.target.value})})}),(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{addonBefore:`label`,value:e.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>I(t,n,{label:e.target.value})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`启用`,(0,Q.jsx)(Mq,{checked:e.enabled,onChange:e=>I(t,n,{enabled:e})})]})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`编辑`,(0,Q.jsx)(Mq,{checked:e.editable,onChange:e=>I(t,n,{editable:e})})]})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,max:2e4,value:e.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>I(t,n,{maxLength:Number(e||800)})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(hW,{value:String(e.value??``),maxLength:e.maxLength||800,placeholder:`默认值`,onChange:e=>I(t,n,{value:e.target.value})})}),(0,Q.jsx)(pz,{span:1,style:{textAlign:`right`},children:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),onClick:()=>L(t,n)})})]},`flow-${t}-${n}`))})]}),e.type!==`object`&&e.type!==`flow`&&(0,Q.jsx)(PR,{size:`small`,title:`默认值`,children:(0,Q.jsx)(V9,{rows:3,value:Array.isArray(e.value)?e.value.join(` `):String(e.value??``),maxLength:e.maxLength||1e3,showCount:!0,onChange:n=>A(t,{value:e.type===`array`?n.target.value.split(` -`).filter(Boolean):n.target.value})})})]})})),[v]);return e||!c?(0,Q.jsx)(TG,{}):(0,Q.jsxs)(`div`,{style:{padding:24},children:[(0,Q.jsx)(LR,{children:(0,Q.jsxs)(WV,{direction:`vertical`,style:{width:`100%`},size:`large`,children:[(0,Q.jsxs)(AK,{justify:`space-between`,align:`middle`,children:[(0,Q.jsxs)(gz,{children:[(0,Q.jsx)(Mre,{level:3,style:{margin:0},children:`视频提词 Schema 配置`}),(0,Q.jsx)(Nre,{type:`secondary`,style:{marginBottom:0},children:`配置会被爆款开头复刻和拆镜复刻第 4 步视频 AI 提词共同复用。传给 AI 时只保留纯键值 schema,不携带显示名、启用、可编辑等管理字段。`})]}),(0,Q.jsx)(gz,{children:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(B9,{children:`启用自定义配置`}),(0,Q.jsx)(Fq,{checked:i,onChange:a}),o&&(0,Q.jsx)(IQ,{color:`orange`,children:`当前使用默认配置兜底`}),u&&(0,Q.jsxs)(IQ,{children:[`默认分组 `,u.sections.length]})]})})]}),(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`长度限制策略`,description:`只对管理后台字段和用户可编辑字段做长度校验,不会自动裁剪 AI 生成结果或第 5 步最终视频 prompt。若供应商因为 prompt 过长拒绝,会按真实失败进入现有日志/退款/重试流程。`}),(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`预览说明`,description:`预览会跟随右上角「启用自定义配置」开关。关闭时会按默认 CLIENT_SCHEMA_V1 兜底预览;打开后才会按当前页面编辑的 sections 和秒数切片规则预览。`}),(0,Q.jsxs)(WV,{wrap:!0,children:[(0,Q.jsx)(YE,{type:`primary`,icon:(0,Q.jsx)(v3,{}),loading:n,onClick:C,children:`保存配置`}),(0,Q.jsx)(YE,{icon:(0,Q.jsx)(XU,{}),onClick:D,children:`预览运行时 Schema`}),(0,Q.jsx)(YE,{icon:(0,Q.jsx)(w1,{}),onClick:T,children:`导出 JSON`}),(0,Q.jsx)(YE,{icon:(0,Q.jsx)(w6,{}),onClick:()=>_.current?.click(),children:`导入 JSON`}),(0,Q.jsx)(qG,{title:`确认恢复默认配置?`,description:`会用 CLIENT_SCHEMA_V1 生成的默认配置覆盖当前配置。`,onConfirm:w,children:(0,Q.jsx)(YE,{icon:(0,Q.jsx)(kK,{}),children:`恢复默认`})}),(0,Q.jsx)(`input`,{ref:_,type:`file`,accept:`application/json,.json`,style:{display:`none`},onChange:E})]}),(0,Q.jsx)(CR,{items:[{key:`fields`,label:`Schema 字段配置`,children:(0,Q.jsxs)(WV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`字段说明`,description:`key 是最终传给 AI 和保存到 prompt_schema 的真实字段名,例如「素材理解」「动作流程」;label 只用于管理后台显示,帮助运营/管理员理解这个字段,不会传给 AI;启用关闭后该字段不会进入运行时 schema;可编辑关闭后用户在第 4 步修改时不能改这个字段。「画面属性」里的视频时长、视频比例、清晰度、帧率、推荐分辨率属于系统锁定参数,不能改 key、不能禁用、不能开放用户编辑。`}),(0,Q.jsx)(YE,{icon:(0,Q.jsx)(DL,{}),onClick:k,children:`新增一级分组`}),(0,Q.jsx)(Ng,{items:W})]})},{key:`time`,label:`秒数切片规则`,children:(0,Q.jsxs)(WV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`切片规则说明`,description:`这里决定指定视频时长会被拆成几段,以及每段的阶段名称和说明。运行时会同步生成「动态时间规划」「动作流程」「镜头流程」三个数组,三者时间段保持一致。`}),(0,Q.jsx)(YE,{icon:(0,Q.jsx)(DL,{}),onClick:R,children:`新增秒数规则`}),y.map((e,t)=>(0,Q.jsxs)(LR,{size:`small`,title:`${e.minDuration}-${e.maxDuration} 秒:${e.segments.length} 段`,extra:(0,Q.jsx)(YE,{danger:!0,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>B(t),children:`删除规则`}),children:[(0,Q.jsxs)(AK,{gutter:12,style:{marginBottom:12},children:[(0,Q.jsx)(gz,{span:4,children:(0,Q.jsx)(lB,{min:1,value:e.minDuration,addonBefore:`最小秒`,style:{width:`100%`},onChange:e=>z(t,{minDuration:Number(e||1)})})}),(0,Q.jsx)(gz,{span:4,children:(0,Q.jsx)(lB,{min:1,value:e.maxDuration,addonBefore:`最大秒`,style:{width:`100%`},onChange:e=>z(t,{maxDuration:Number(e||1)})})}),(0,Q.jsx)(gz,{span:16,children:(0,Q.jsx)(YE,{size:`small`,icon:(0,Q.jsx)(DL,{}),onClick:()=>H(t),children:`新增片段`})})]}),(0,Q.jsx)(WV,{direction:`vertical`,style:{width:`100%`},children:e.segments.map((n,r)=>(0,Q.jsxs)(AK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(gz,{span:3,children:(0,Q.jsx)(lB,{min:.01,step:.01,value:e.ratios[r],addonBefore:`比例`,style:{width:`100%`},onChange:e=>V(t,r,{ratio:Number(e||.01)})})}),(0,Q.jsx)(gz,{span:5,children:(0,Q.jsx)(vW,{value:n.stage,maxLength:64,placeholder:`阶段`,onChange:e=>V(t,r,{stage:e.target.value})})}),(0,Q.jsx)(gz,{span:15,children:(0,Q.jsx)(vW,{value:n.description,maxLength:300,placeholder:`说明`,onChange:e=>V(t,r,{description:e.target.value})})}),(0,Q.jsx)(gz,{span:1,children:(0,Q.jsx)(YE,{danger:!0,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>U(t,r)})})]},r))})]},t))]})},{key:`json`,label:`JSON 高级查看`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(X9(c,i),null,2),readOnly:!0})}]})]})}),(0,Q.jsxs)(UG,{title:`预览运行时 Schema`,open:f,onCancel:()=>p(!1),width:980,footer:(0,Q.jsxs)(WV,{children:[(0,Q.jsx)(YE,{onClick:()=>p(!1),children:`关闭`}),(0,Q.jsx)(YE,{type:`primary`,onClick:O,children:`生成预览`})]}),children:[(0,Q.jsxs)(X,{form:g,layout:`inline`,style:{marginBottom:16},children:[(0,Q.jsx)(X.Item,{name:`duration`,label:`时长`,rules:[{required:!0}],children:(0,Q.jsx)(lB,{min:1,max:3600})}),(0,Q.jsx)(X.Item,{name:`aspectRatio`,label:`比例`,rules:[{required:!0}],children:(0,Q.jsx)(vW,{})}),(0,Q.jsx)(X.Item,{name:`resolution`,label:`清晰度`,rules:[{required:!0}],children:(0,Q.jsx)(vW,{})}),(0,Q.jsx)(X.Item,{name:`frameRate`,label:`帧率`,rules:[{required:!0}],children:(0,Q.jsx)(vW,{})})]}),(0,Q.jsx)(xz,{}),m?(0,Q.jsx)(CR,{items:[{key:`runtime`,label:`运行时 Schema`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Z9(m),null,2),readOnly:!0})},{key:`timePlan`,label:`动态时间规划(${Q9(m).length} 段)`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Q9(m),null,2),readOnly:!0})},{key:`snapshot`,label:`配置快照`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Rre(m),null,2),readOnly:!0})}]}):(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`点击生成预览后,可以看到传给 AI 的纯 schema、动态时间规划和本次配置快照。`})]})]})},Hre=({children:e})=>{let{user:t,loading:n,checkAuth:r}=I5();return(0,S.useEffect)(()=>{!localStorage.getItem(`auth_token`)&&!n&&!t&&(window.location.href=`/login`)},[t,n]),n?(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,Q.jsx)(TG,{size:`large`})}):t?(0,Q.jsx)(Q.Fragment,{children:e}):(window.location.href=`/login`,null)};(0,_.createRoot)(document.getElementById(`root`)).render((0,Q.jsx)(()=>{let{checkAuth:e}=I5();return(0,S.useEffect)(()=>{e()},[]),(0,Q.jsx)(am,{locale:U6.default,theme:{token:{colorPrimary:`#6366f1`,borderRadius:8},components:{Button:{controlHeight:36,controlHeightLG:44},Card:{boxShadow:`0 1px 3px rgba(0,0,0,0.04)`},Table:{headerBg:`#fafbfc`}}},children:(0,Q.jsx)(cx,{children:(0,Q.jsx)(hn,{children:(0,Q.jsxs)(Dt,{children:[(0,Q.jsx)(Tt,{path:`/login`,element:(0,Q.jsx)(Y5,{})}),(0,Q.jsxs)(Tt,{path:`/`,element:(0,Q.jsx)(Hre,{children:(0,Q.jsx)(V5,{})}),children:[(0,Q.jsx)(Tt,{index:!0,element:(0,Q.jsx)(X5,{})}),(0,Q.jsx)(Tt,{path:`users`,element:(0,Q.jsx)(t7,{})}),(0,Q.jsx)(Tt,{path:`credit-records`,element:(0,Q.jsx)(pne,{})}),(0,Q.jsx)(Tt,{path:`models`,element:(0,Q.jsx)(n7,{})}),(0,Q.jsx)(Tt,{path:`credit-ratios`,element:(0,Q.jsx)(Dne,{})}),(0,Q.jsx)(Tt,{path:`video-engines`,element:(0,Q.jsx)(xne,{})}),(0,Q.jsx)(Tt,{path:`image-engines`,element:(0,Q.jsx)(wne,{})}),(0,Q.jsx)(Tt,{path:`industries`,element:(0,Q.jsx)(bne,{})}),(0,Q.jsx)(Tt,{path:`menu-configs`,element:(0,Q.jsx)(jne,{})}),(0,Q.jsx)(Tt,{path:`recharge-packages`,element:(0,Q.jsx)(Pne,{})}),(0,Q.jsx)(Tt,{path:`payment`,element:(0,Q.jsx)(mne,{})}),(0,Q.jsx)(Tt,{path:`payment-stats`,element:(0,Q.jsx)(gne,{})}),(0,Q.jsx)(Tt,{path:`settings`,element:(0,Q.jsx)(r7,{})}),(0,Q.jsx)(Tt,{path:`video-prompt-schema-config`,element:(0,Q.jsx)(Vre,{})}),(0,Q.jsx)(Tt,{path:`notifications`,element:(0,Q.jsx)(i7,{})}),(0,Q.jsx)(Tt,{path:`oauthapp-list`,element:(0,Q.jsx)(Lne,{})}),(0,Q.jsx)(Tt,{path:`operation-logs`,element:(0,Q.jsx)(Ine,{})}),(0,Q.jsx)(Tt,{path:`generation-records`,element:(0,Q.jsx)(Hne,{})}),(0,Q.jsx)(Tt,{path:`generation-ai`,element:(0,Q.jsx)(qne,{})}),(0,Q.jsx)(Tt,{path:`hot-opening-replications`,element:(0,Q.jsx)(Qne,{})}),(0,Q.jsx)(Tt,{path:`hot-opening-replications/:projectId`,element:(0,Q.jsx)(vre,{})}),(0,Q.jsx)(Tt,{path:`shot-replications`,element:(0,Q.jsx)(Cre,{})}),(0,Q.jsx)(Tt,{path:`shot-replications/task-sets/:taskSetId`,element:(0,Q.jsx)(jre,{})}),(0,Q.jsx)(Tt,{path:`shot-replications/projects/:projectId`,element:(0,Q.jsx)(O9,{moduleType:`shot_replicate`})}),(0,Q.jsx)(Tt,{path:`authoriza`,element:(0,Q.jsx)(G5,{})}),(0,Q.jsx)(Tt,{path:`consume`,element:(0,Q.jsx)(J5,{})}),(0,Q.jsx)(Tt,{path:`platform`,element:(0,Q.jsx)(e7,{})})]}),(0,Q.jsx)(Tt,{path:`*`,element:(0,Q.jsx)(Ct,{to:`/`,replace:!0})})]})})})})},{})); \ No newline at end of file +`).filter(Boolean):n.target.value})})})]})})),[v]);return e||!c?(0,Q.jsx)(SG,{}):(0,Q.jsxs)(`div`,{style:{padding:24},children:[(0,Q.jsx)(PR,{children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`large`,children:[(0,Q.jsxs)(DK,{justify:`space-between`,align:`middle`,children:[(0,Q.jsxs)(pz,{children:[(0,Q.jsx)(Fre,{level:3,style:{margin:0},children:`视频提词 Schema 配置`}),(0,Q.jsx)(Ire,{type:`secondary`,style:{marginBottom:0},children:`配置会被爆款开头复刻和拆镜复刻第 4 步视频 AI 提词共同复用。传给 AI 时只保留纯键值 schema,不携带显示名、启用、可编辑等管理字段。`})]}),(0,Q.jsx)(pz,{children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(B9,{children:`启用自定义配置`}),(0,Q.jsx)(Mq,{checked:i,onChange:a}),o&&(0,Q.jsx)(NQ,{color:`orange`,children:`当前使用默认配置兜底`}),u&&(0,Q.jsxs)(NQ,{children:[`默认分组 `,u.sections.length]})]})})]}),(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`长度限制策略`,description:`只对管理后台字段和用户可编辑字段做长度校验,不会自动裁剪 AI 生成结果或第 5 步最终视频 prompt。若供应商因为 prompt 过长拒绝,会按真实失败进入现有日志/退款/重试流程。`}),(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`预览说明`,description:`预览会跟随右上角「启用自定义配置」开关。关闭时会按默认 CLIENT_SCHEMA_V1 兜底预览;打开后才会按当前页面编辑的 sections 和秒数切片规则预览。`}),(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(v3,{}),loading:n,onClick:C,children:`保存配置`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(qU,{}),onClick:D,children:`预览运行时 Schema`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(x1,{}),onClick:T,children:`导出 JSON`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(w6,{}),onClick:()=>_.current?.click(),children:`导入 JSON`}),(0,Q.jsx)(WG,{title:`确认恢复默认配置?`,description:`会用 CLIENT_SCHEMA_V1 生成的默认配置覆盖当前配置。`,onConfirm:w,children:(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),children:`恢复默认`})}),(0,Q.jsx)(`input`,{ref:_,type:`file`,accept:`application/json,.json`,style:{display:`none`},onChange:E})]}),(0,Q.jsx)(bR,{items:[{key:`fields`,label:`Schema 字段配置`,children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`字段说明`,description:`key 是最终传给 AI 和保存到 prompt_schema 的真实字段名,例如「素材理解」「动作流程」;label 只用于管理后台显示,帮助运营/管理员理解这个字段,不会传给 AI;启用关闭后该字段不会进入运行时 schema;可编辑关闭后用户在第 4 步修改时不能改这个字段。「画面属性」里的视频时长、视频比例、清晰度、帧率、推荐分辨率属于系统锁定参数,不能改 key、不能禁用、不能开放用户编辑。`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(TL,{}),onClick:k,children:`新增一级分组`}),(0,Q.jsx)(Ng,{items:W})]})},{key:`time`,label:`秒数切片规则`,children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`切片规则说明`,description:`这里决定指定视频时长会被拆成几段,以及每段的阶段名称和说明。运行时会同步生成「动态时间规划」「动作流程」「镜头流程」三个数组,三者时间段保持一致。`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(TL,{}),onClick:R,children:`新增秒数规则`}),y.map((e,t)=>(0,Q.jsxs)(PR,{size:`small`,title:`${e.minDuration}-${e.maxDuration} 秒:${e.segments.length} 段`,extra:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),onClick:()=>B(t),children:`删除规则`}),children:[(0,Q.jsxs)(DK,{gutter:12,style:{marginBottom:12},children:[(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,value:e.minDuration,addonBefore:`最小秒`,style:{width:`100%`},onChange:e=>z(t,{minDuration:Number(e||1)})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,value:e.maxDuration,addonBefore:`最大秒`,style:{width:`100%`},onChange:e=>z(t,{maxDuration:Number(e||1)})})}),(0,Q.jsx)(pz,{span:16,children:(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(TL,{}),onClick:()=>H(t),children:`新增片段`})})]}),(0,Q.jsx)(VV,{direction:`vertical`,style:{width:`100%`},children:e.segments.map((n,r)=>(0,Q.jsxs)(DK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(oB,{min:.01,step:.01,value:e.ratios[r],addonBefore:`比例`,style:{width:`100%`},onChange:e=>V(t,r,{ratio:Number(e||.01)})})}),(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{value:n.stage,maxLength:64,placeholder:`阶段`,onChange:e=>V(t,r,{stage:e.target.value})})}),(0,Q.jsx)(pz,{span:15,children:(0,Q.jsx)(hW,{value:n.description,maxLength:300,placeholder:`说明`,onChange:e=>V(t,r,{description:e.target.value})})}),(0,Q.jsx)(pz,{span:1,children:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),onClick:()=>U(t,r)})})]},r))})]},t))]})},{key:`json`,label:`JSON 高级查看`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(X9(c,i),null,2),readOnly:!0})}]})]})}),(0,Q.jsxs)(BG,{title:`预览运行时 Schema`,open:f,onCancel:()=>p(!1),width:980,footer:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{onClick:()=>p(!1),children:`关闭`}),(0,Q.jsx)(qE,{type:`primary`,onClick:O,children:`生成预览`})]}),children:[(0,Q.jsxs)(X,{form:g,layout:`inline`,style:{marginBottom:16},children:[(0,Q.jsx)(X.Item,{name:`duration`,label:`时长`,rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:1,max:3600})}),(0,Q.jsx)(X.Item,{name:`aspectRatio`,label:`比例`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})}),(0,Q.jsx)(X.Item,{name:`resolution`,label:`清晰度`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})}),(0,Q.jsx)(X.Item,{name:`frameRate`,label:`帧率`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})})]}),(0,Q.jsx)(vz,{}),m?(0,Q.jsx)(bR,{items:[{key:`runtime`,label:`运行时 Schema`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Z9(m),null,2),readOnly:!0})},{key:`timePlan`,label:`动态时间规划(${Q9(m).length} 段)`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Q9(m),null,2),readOnly:!0})},{key:`snapshot`,label:`配置快照`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Vre(m),null,2),readOnly:!0})}]}):(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`点击生成预览后,可以看到传给 AI 的纯 schema、动态时间规划和本次配置快照。`})]})]})},Gre=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(20),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(!1),{user:g}=I5(),_=async()=>{if(g?.isAdmin){a(!0);try{let e=new URLSearchParams;e.set(`page`,String(o)),e.set(`page_size`,String(c)),u!==null&&e.set(`is_handled`,String(u));let n=await a8.get(`/contact/requests?${e.toString()}`);t(n.items),r(n.total)}catch(e){LG.error(e?.message||`获取失败`)}finally{a(!1)}}};(0,S.useEffect)(()=>{_()},[o,c,u]);let v=async e=>{try{await a8.put(`/contact/requests/${e}/handle`),LG.success(`已标记为处理`),_()}catch(e){LG.error(e?.message||`操作失败`)}},y=async e=>{BG.confirm({title:`确认删除`,content:`确定要删除这条联系请求吗?`,onOk:async()=>{try{await a8.delete(`/contact/requests/${e}`),LG.success(`删除成功`),_()}catch(e){LG.error(e?.message||`删除失败`)}}})},b=e=>{p(e),h(!0)};return(0,Q.jsxs)(`div`,{style:{padding:24},children:[(0,Q.jsx)(Z.Title,{level:2,style:{marginBottom:24},children:`联系请求管理`}),(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,Q.jsx)(qE,{type:u===null?`primary`:`default`,onClick:()=>d(null),icon:(0,Q.jsx)(w2,{}),children:`全部`}),(0,Q.jsx)(qE,{type:u===!1?`primary`:`default`,onClick:()=>d(!1),children:`待处理`}),(0,Q.jsx)(qE,{type:u===!0?`primary`:`default`,onClick:()=>d(!0),children:`已处理`})]}),(0,Q.jsxs)(Z.Text,{style:{color:`#64748b`},children:[`共 `,n,` 条记录`]})]}),(0,Q.jsx)(bQ,{columns:[{title:`姓名`,dataIndex:`name`,key:`name`,width:100},{title:`手机号`,dataIndex:`phone`,key:`phone`,width:120},{title:`公司名称`,dataIndex:`company_name`,key:`company_name`,width:150,ellipsis:!0},{title:`行业`,dataIndex:`industry`,key:`industry`,width:120},{title:`状态`,dataIndex:`is_handled`,key:`is_handled`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`orange`,children:e?`已处理`:`待处理`})},{title:`提交时间`,dataIndex:`created_at`,key:`created_at`,width:160,render:e=>new Date(e).toLocaleString(`zh-CN`)},{title:`操作`,key:`actions`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{size:`middle`,children:[(0,Q.jsx)(qE,{type:`text`,icon:(0,Q.jsx)(qU,{}),onClick:()=>b(t),children:`查看`}),!t.is_handled&&(0,Q.jsx)(qE,{type:`text`,icon:(0,Q.jsx)(DC,{}),onClick:()=>v(t.id),children:`标记处理`}),(0,Q.jsx)(qE,{type:`text`,danger:!0,icon:(0,Q.jsx)(IQ,{}),onClick:()=>y(t.id),children:`删除`})]})}],dataSource:e,loading:i,pagination:{current:o,pageSize:c,total:n,onChange:(e,t)=>{s(e),l(t)}},rowKey:`id`,bordered:!1,style:{background:`#ffffff`,borderRadius:12}}),(0,Q.jsx)(BG,{title:`联系请求详情`,open:m,onCancel:()=>h(!1),footer:null,width:500,children:f&&(0,Q.jsxs)(`div`,{style:{padding:8},children:[(0,Q.jsxs)(`div`,{style:{marginBottom:16},children:[(0,Q.jsxs)(Z.Title,{level:4,style:{marginBottom:16},children:[f.name,(0,Q.jsx)(NQ,{color:f.is_handled?`green`:`orange`,style:{marginLeft:12},children:f.is_handled?`已处理`:`待处理`})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`120px 1fr`,gap:12},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`手机号:`}),(0,Q.jsx)(Z.Text,{children:f.phone}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`公司名称:`}),(0,Q.jsx)(Z.Text,{children:f.company_name}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`行业:`}),(0,Q.jsx)(Z.Text,{children:f.industry}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`提交时间:`}),(0,Q.jsx)(Z.Text,{children:new Date(f.created_at).toLocaleString(`zh-CN`)}),f.message&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`留言:`}),(0,Q.jsx)(Z.Text,{children:f.message})]})]})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[!f.is_handled&&(0,Q.jsx)(qE,{type:`primary`,onClick:()=>{v(f.id),h(!1)},icon:(0,Q.jsx)(DC,{}),children:`标记为已处理`}),(0,Q.jsx)(qE,{onClick:()=>h(!1),children:`关闭`})]})]})})]})},Kre=({children:e})=>{let{user:t,loading:n,checkAuth:r}=I5();return(0,S.useEffect)(()=>{!localStorage.getItem(`auth_token`)&&!n&&!t&&(window.location.href=`/login`)},[t,n]),n?(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,Q.jsx)(SG,{size:`large`})}):t?(0,Q.jsx)(Q.Fragment,{children:e}):(window.location.href=`/login`,null)};(0,_.createRoot)(document.getElementById(`root`)).render((0,Q.jsx)(()=>{let{checkAuth:e}=I5();return(0,S.useEffect)(()=>{e()},[]),(0,Q.jsx)(am,{locale:U6.default,theme:{token:{colorPrimary:`#6366f1`,borderRadius:8},components:{Button:{controlHeight:36,controlHeightLG:44},Card:{boxShadow:`0 1px 3px rgba(0,0,0,0.04)`},Table:{headerBg:`#fafbfc`}}},children:(0,Q.jsx)(ox,{children:(0,Q.jsx)(hn,{children:(0,Q.jsxs)(Dt,{children:[(0,Q.jsx)(Tt,{path:`/login`,element:(0,Q.jsx)(Y5,{})}),(0,Q.jsxs)(Tt,{path:`/`,element:(0,Q.jsx)(Kre,{children:(0,Q.jsx)(V5,{})}),children:[(0,Q.jsx)(Tt,{index:!0,element:(0,Q.jsx)(X5,{})}),(0,Q.jsx)(Tt,{path:`users`,element:(0,Q.jsx)(t7,{})}),(0,Q.jsx)(Tt,{path:`credit-records`,element:(0,Q.jsx)(gne,{})}),(0,Q.jsx)(Tt,{path:`models`,element:(0,Q.jsx)(n7,{})}),(0,Q.jsx)(Tt,{path:`credit-ratios`,element:(0,Q.jsx)(Ane,{})}),(0,Q.jsx)(Tt,{path:`video-engines`,element:(0,Q.jsx)(wne,{})}),(0,Q.jsx)(Tt,{path:`image-engines`,element:(0,Q.jsx)(Dne,{})}),(0,Q.jsx)(Tt,{path:`industries`,element:(0,Q.jsx)(Cne,{})}),(0,Q.jsx)(Tt,{path:`menu-configs`,element:(0,Q.jsx)(Pne,{})}),(0,Q.jsx)(Tt,{path:`recharge-packages`,element:(0,Q.jsx)(Lne,{})}),(0,Q.jsx)(Tt,{path:`payment`,element:(0,Q.jsx)(_ne,{})}),(0,Q.jsx)(Tt,{path:`payment-stats`,element:(0,Q.jsx)(yne,{})}),(0,Q.jsx)(Tt,{path:`settings`,element:(0,Q.jsx)(r7,{})}),(0,Q.jsx)(Tt,{path:`video-prompt-schema-config`,element:(0,Q.jsx)(Wre,{})}),(0,Q.jsx)(Tt,{path:`notifications`,element:(0,Q.jsx)(i7,{})}),(0,Q.jsx)(Tt,{path:`oauthapp-list`,element:(0,Q.jsx)(Bne,{})}),(0,Q.jsx)(Tt,{path:`operation-logs`,element:(0,Q.jsx)(zne,{})}),(0,Q.jsx)(Tt,{path:`generation-records`,element:(0,Q.jsx)(Wne,{})}),(0,Q.jsx)(Tt,{path:`generation-ai`,element:(0,Q.jsx)(Yne,{})}),(0,Q.jsx)(Tt,{path:`hot-opening-replications`,element:(0,Q.jsx)(ere,{})}),(0,Q.jsx)(Tt,{path:`hot-opening-replications/:projectId`,element:(0,Q.jsx)(bre,{})}),(0,Q.jsx)(Tt,{path:`shot-replications`,element:(0,Q.jsx)(Tre,{})}),(0,Q.jsx)(Tt,{path:`shot-replications/task-sets/:taskSetId`,element:(0,Q.jsx)(Pre,{})}),(0,Q.jsx)(Tt,{path:`shot-replications/projects/:projectId`,element:(0,Q.jsx)(k9,{moduleType:`shot_replicate`})}),(0,Q.jsx)(Tt,{path:`authoriza`,element:(0,Q.jsx)(G5,{})}),(0,Q.jsx)(Tt,{path:`consume`,element:(0,Q.jsx)(J5,{})}),(0,Q.jsx)(Tt,{path:`platform`,element:(0,Q.jsx)(e7,{})}),(0,Q.jsx)(Tt,{path:`contact-requests`,element:(0,Q.jsx)(Gre,{})})]}),(0,Q.jsx)(Tt,{path:`*`,element:(0,Q.jsx)(Ct,{to:`/`,replace:!0})})]})})})})},{})); \ No newline at end of file diff --git a/video-gen-admin/dist/index.html b/video-gen-admin/dist/index.html index 12f5d5d7..4ac1f6da 100644 --- a/video-gen-admin/dist/index.html +++ b/video-gen-admin/dist/index.html @@ -1,37 +1,37 @@ - - - - - - - - - - 后台管理 - - + + + + + + + + + + 后台管理 + + - - -
- - + + +
+ + diff --git a/video-gen-admin/src/App.tsx b/video-gen-admin/src/App.tsx index 92388ab5..7478e04c 100644 --- a/video-gen-admin/src/App.tsx +++ b/video-gen-admin/src/App.tsx @@ -31,6 +31,7 @@ import AdminShotReplications from './pages/AdminShotReplications'; import AdminShotTaskSetDetail from './pages/AdminShotTaskSetDetail'; import AdminReplicationProjectDetail from './pages/AdminReplicationProjectDetail'; import AdminVideoPromptSchemaConfig from './pages/AdminVideoPromptSchemaConfig'; +import AdminContactRequests from './pages/AdminContactRequests'; import { useAdminStore } from './store'; @@ -103,6 +104,7 @@ const App = () => { } /> } /> } /> + } /> } /> diff --git a/video-gen-admin/src/pages/AdminContactRequests.tsx b/video-gen-admin/src/pages/AdminContactRequests.tsx new file mode 100644 index 00000000..741b50f4 --- /dev/null +++ b/video-gen-admin/src/pages/AdminContactRequests.tsx @@ -0,0 +1,270 @@ +import React, { useState, useEffect } from 'react'; +import { Table, Button, Tag, Space, Typography, message, Modal } from 'antd'; +import { CheckOutlined, DeleteOutlined, EyeOutlined, FilterOutlined } from '@ant-design/icons'; +import { useAdminStore } from '../store'; +import { api } from '../api/client'; + +interface ContactRequest { + id: string; + user_id: string; + phone: string; + company_name: string; + industry: string; + name: string; + message: string | null; + is_handled: boolean; + created_at: string; +} + +const AdminContactRequests: React.FC = () => { + const [data, setData] = useState([]); + const [total, setTotal] = useState(0); + const [loading, setLoading] = useState(false); + const [page, setPage] = useState(1); + const [pageSize, setPageSize] = useState(20); + const [isHandledFilter, setIsHandledFilter] = useState(null); + const [selectedItem, setSelectedItem] = useState(null); + const [detailModalOpen, setDetailModalOpen] = useState(false); + + const { user } = useAdminStore(); + + const fetchData = async () => { + if (!user?.isAdmin) return; + setLoading(true); + try { + const query = new URLSearchParams(); + query.set('page', String(page)); + query.set('page_size', String(pageSize)); + if (isHandledFilter !== null) { + query.set('is_handled', String(isHandledFilter)); + } + const res = await api.get<{ items: ContactRequest[]; total: number }>(`/contact/requests?${query.toString()}`); + setData(res.items); + setTotal(res.total); + } catch (err: any) { + message.error(err?.message || '获取失败'); + } finally { + setLoading(false); + } + }; + + useEffect(() => { + fetchData(); + }, [page, pageSize, isHandledFilter]); + + const handleMarkHandled = async (id: string) => { + try { + await api.put(`/contact/requests/${id}/handle`); + message.success('已标记为处理'); + fetchData(); + } catch (err: any) { + message.error(err?.message || '操作失败'); + } + }; + + const handleDelete = async (id: string) => { + Modal.confirm({ + title: '确认删除', + content: '确定要删除这条联系请求吗?', + onOk: async () => { + try { + await api.delete(`/contact/requests/${id}`); + message.success('删除成功'); + fetchData(); + } catch (err: any) { + message.error(err?.message || '删除失败'); + } + }, + }); + }; + + const handleViewDetail = (item: ContactRequest) => { + setSelectedItem(item); + setDetailModalOpen(true); + }; + + const columns = [ + { + title: '姓名', + dataIndex: 'name', + key: 'name', + width: 100, + }, + { + title: '手机号', + dataIndex: 'phone', + key: 'phone', + width: 120, + }, + { + title: '公司名称', + dataIndex: 'company_name', + key: 'company_name', + width: 150, + ellipsis: true, + }, + { + title: '行业', + dataIndex: 'industry', + key: 'industry', + width: 120, + }, + { + title: '状态', + dataIndex: 'is_handled', + key: 'is_handled', + width: 80, + render: (isHandled: boolean) => ( + + {isHandled ? '已处理' : '待处理'} + + ), + }, + { + title: '提交时间', + dataIndex: 'created_at', + key: 'created_at', + width: 160, + render: (date: string) => { + return new Date(date).toLocaleString('zh-CN'); + }, + }, + { + title: '操作', + key: 'actions', + width: 180, + render: (_: unknown, record: ContactRequest) => ( + + + {!record.is_handled && ( + + )} + + + ), + }, + ]; + + return ( +
+ + 联系请求管理 + + +
+
+ + + +
+ + 共 {total} 条记录 + +
+ + { setPage(p); setPageSize(s); }, + }} + rowKey="id" + bordered={false} + style={{ background: '#ffffff', borderRadius: 12 }} + /> + + setDetailModalOpen(false)} + footer={null} + width={500} + > + {selectedItem && ( +
+
+ + {selectedItem.name} + + {selectedItem.is_handled ? '已处理' : '待处理'} + + +
+ 手机号: + {selectedItem.phone} + 公司名称: + {selectedItem.company_name} + 行业: + {selectedItem.industry} + 提交时间: + {new Date(selectedItem.created_at).toLocaleString('zh-CN')} + {selectedItem.message && ( + <> + 留言: + {selectedItem.message} + + )} +
+
+
+ {!selectedItem.is_handled && ( + + )} + +
+
+ )} +
+ + ); +}; + +export default AdminContactRequests; \ No newline at end of file diff --git a/video-gen-admin/tsconfig.tsbuildinfo b/video-gen-admin/tsconfig.tsbuildinfo index db3fab0b..9bdefdea 100644 --- a/video-gen-admin/tsconfig.tsbuildinfo +++ b/video-gen-admin/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"root":["./src/app.tsx","./src/env.d.ts","./src/main.tsx","./src/api/client.ts","./src/api/crypto.ts","./src/api/index.ts","./src/pages/adminauthoriz.tsx","./src/pages/adminconsume.tsx","./src/pages/admincreditratios.tsx","./src/pages/admincreditrecords.tsx","./src/pages/admindashboard.tsx","./src/pages/admingenerationairecords.tsx","./src/pages/admingenerationrecords.tsx","./src/pages/adminhotopeningreplicationdetail.tsx","./src/pages/adminhotopeningreplications.tsx","./src/pages/adminimageengines.tsx","./src/pages/adminindustries.tsx","./src/pages/adminlayout.tsx","./src/pages/adminloginpage.tsx","./src/pages/adminmenuconfig.tsx","./src/pages/adminmodels.tsx","./src/pages/adminnotificationmanager.tsx","./src/pages/adminoauthapplist.tsx","./src/pages/adminoperationlogs.tsx","./src/pages/adminpaymentconfig.tsx","./src/pages/adminpaymentstats.tsx","./src/pages/adminrechargepackages.tsx","./src/pages/adminreplicationprojectdetail.tsx","./src/pages/adminsettings.tsx","./src/pages/adminshotreplications.tsx","./src/pages/adminshottasksetdetail.tsx","./src/pages/adminusers.tsx","./src/pages/adminvideoengines.tsx","./src/pages/adminvideopromptschemaconfig.tsx","./src/pages/adminplatform.tsx","./src/pages/adminreplication/components/jsoncollapse.tsx","./src/pages/adminreplication/components/mediapreview.tsx","./src/pages/adminreplication/components/statustag.tsx","./src/pages/adminreplication/components/videopromptschemaviewer.tsx","./src/store/index.ts","./src/types/index.ts","./src/types/xlsx-js-style.d.ts","./src/utils/excelexport.ts","./src/utils/formatdate.ts","./src/utils/videopromptschema.ts"],"version":"6.0.3"} \ No newline at end of file +{"root":["./src/app.tsx","./src/env.d.ts","./src/main.tsx","./src/api/client.ts","./src/api/crypto.ts","./src/api/index.ts","./src/pages/adminauthoriz.tsx","./src/pages/adminconsume.tsx","./src/pages/admincontactrequests.tsx","./src/pages/admincreditratios.tsx","./src/pages/admincreditrecords.tsx","./src/pages/admindashboard.tsx","./src/pages/admingenerationairecords.tsx","./src/pages/admingenerationrecords.tsx","./src/pages/adminhotopeningreplicationdetail.tsx","./src/pages/adminhotopeningreplications.tsx","./src/pages/adminimageengines.tsx","./src/pages/adminindustries.tsx","./src/pages/adminlayout.tsx","./src/pages/adminloginpage.tsx","./src/pages/adminmenuconfig.tsx","./src/pages/adminmodels.tsx","./src/pages/adminnotificationmanager.tsx","./src/pages/adminoauthapplist.tsx","./src/pages/adminoperationlogs.tsx","./src/pages/adminpaymentconfig.tsx","./src/pages/adminpaymentstats.tsx","./src/pages/adminrechargepackages.tsx","./src/pages/adminreplicationprojectdetail.tsx","./src/pages/adminsettings.tsx","./src/pages/adminshotreplications.tsx","./src/pages/adminshottasksetdetail.tsx","./src/pages/adminusers.tsx","./src/pages/adminvideoengines.tsx","./src/pages/adminvideopromptschemaconfig.tsx","./src/pages/adminplatform.tsx","./src/pages/adminreplication/components/jsoncollapse.tsx","./src/pages/adminreplication/components/mediapreview.tsx","./src/pages/adminreplication/components/statustag.tsx","./src/pages/adminreplication/components/videopromptschemaviewer.tsx","./src/store/index.ts","./src/types/index.ts","./src/types/xlsx-js-style.d.ts","./src/utils/excelexport.ts","./src/utils/formatdate.ts","./src/utils/videopromptschema.ts"],"version":"6.0.3"} \ No newline at end of file diff --git a/video-gen-api/app/api/v1/__init__.py b/video-gen-api/app/api/v1/__init__.py index 86750e21..d26dd612 100644 --- a/video-gen-api/app/api/v1/__init__.py +++ b/video-gen-api/app/api/v1/__init__.py @@ -25,6 +25,7 @@ from app.api.v1.pre_test_template import router as pre_test_template_router from app.api.v1.material_consumption import router as material_consumption_router from app.api.v1.open_type import router as open_type_router from app.api.v1.resources_material import router as resources_material_router +from app.api.v1.contact import router as contact_router from app.api.admin import router as admin_module_router api_router = APIRouter() @@ -53,4 +54,5 @@ api_router.include_router(pre_test_template_router) api_router.include_router(material_consumption_router) api_router.include_router(open_type_router) api_router.include_router(resources_material_router) +api_router.include_router(contact_router) api_router.include_router(admin_module_router) diff --git a/video-gen-api/app/api/v1/contact.py b/video-gen-api/app/api/v1/contact.py new file mode 100644 index 00000000..bb74d026 --- /dev/null +++ b/video-gen-api/app/api/v1/contact.py @@ -0,0 +1,140 @@ +from datetime import datetime, timezone, timedelta + +from fastapi import APIRouter, Depends, HTTPException, status +from sqlalchemy import func, select +from sqlalchemy.ext.asyncio import AsyncSession + +from app.dependencies import get_db, get_current_user +from app.models.contact_request import ContactRequest +from app.models.user import User +from app.schemas.contact import ContactRequestCreate, ContactRequestListOut, ContactRequestOut +from app.utils.id_gen import generate_id + +router = APIRouter(prefix="/contact", tags=["contact"]) + + +@router.post("/request", summary="提交联系请求", status_code=status.HTTP_201_CREATED) +async def create_contact_request( + request: ContactRequestCreate, + db: AsyncSession = Depends(get_db), + user: User = Depends(get_current_user), +): + today_start = datetime.now(timezone.utc).replace(hour=0, minute=0, second=0, microsecond=0) + today_end = today_start + timedelta(days=1) + + count = await db.execute( + select(func.count(ContactRequest.id)) + .where(ContactRequest.user_id == user.id) + .where(ContactRequest.created_at >= today_start) + .where(ContactRequest.created_at < today_end) + ) + daily_count = count.scalar_one() + + if daily_count >= 1: + raise HTTPException( + status_code=status.HTTP_429_TOO_MANY_REQUESTS, + detail="每个账号每天只能提交一次联系请求" + ) + + contact_request = ContactRequest( + id=generate_id(), + user_id=user.id, + phone=request.phone, + company_name=request.company_name, + industry=request.industry, + name=request.name, + message=request.message, + ) + + db.add(contact_request) + await db.commit() + await db.refresh(contact_request) + + return {"message": "提交成功,我们会尽快与您联系"} + + +@router.get("/requests", summary="获取联系请求列表", response_model=ContactRequestListOut) +async def get_contact_requests( + page: int = 1, + page_size: int = 20, + is_handled: bool | None = None, + db: AsyncSession = Depends(get_db), + user: User = Depends(get_current_user), +): + if not user.is_admin: + raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail="无权限") + + query = select(ContactRequest).order_by(ContactRequest.created_at.desc()) + + if is_handled is not None: + query = query.where(ContactRequest.is_handled == is_handled) + + offset = (page - 1) * page_size + result = await db.execute(query.offset(offset).limit(page_size)) + items = result.scalars().all() + + count_result = await db.execute(select(func.count(ContactRequest.id))) + total = count_result.scalar_one() + + return {"items": items, "total": total} + + +@router.get("/requests/{request_id}", summary="获取联系请求详情", response_model=ContactRequestOut) +async def get_contact_request( + request_id: str, + db: AsyncSession = Depends(get_db), + user: User = Depends(get_current_user), +): + if not user.is_admin: + raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail="无权限") + + result = await db.execute(select(ContactRequest).where(ContactRequest.id == request_id)) + contact_request = result.scalar_one_or_none() + + if not contact_request: + raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="记录不存在") + + return contact_request + + +@router.put("/requests/{request_id}/handle", summary="标记为已处理") +async def mark_as_handled( + request_id: str, + db: AsyncSession = Depends(get_db), + user: User = Depends(get_current_user), +): + if not user.is_admin: + raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail="无权限") + + result = await db.execute(select(ContactRequest).where(ContactRequest.id == request_id)) + contact_request = result.scalar_one_or_none() + + if not contact_request: + raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="记录不存在") + + contact_request.is_handled = True + await db.commit() + await db.refresh(contact_request) + + return {"message": "已标记为处理"} + + +@router.delete("/requests/{request_id}", summary="删除联系请求") +async def delete_contact_request( + request_id: str, + db: AsyncSession = Depends(get_db), + user: User = Depends(get_current_user), +): + if not user.is_admin: + raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail="无权限") + + result = await db.execute(select(ContactRequest).where(ContactRequest.id == request_id)) + contact_request = result.scalar_one_or_none() + + if not contact_request: + raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="记录不存在") + + await db.delete(contact_request) + await db.commit() + + return {"message": "删除成功"} \ No newline at end of file diff --git a/video-gen-api/app/main.py b/video-gen-api/app/main.py index 2de1a0dc..aa39f7d4 100644 --- a/video-gen-api/app/main.py +++ b/video-gen-api/app/main.py @@ -424,6 +424,7 @@ async def _seed_data(): ("/settings", "系统设置", "SettingOutlined", 4, "系统设置"), ("/operation-logs", "操作日志", "DatabaseOutlined", 5, "系统设置"), ("/oauthapp-list", "授权应用", "MenuOutlined", 28, "系统设置"), + ("/contact-requests", "联系请求", "MessageCircleOutlined", 29, "系统设置"), ] for path, label, icon, order, parent_group in admin_pages: db.add( diff --git a/video-gen-api/app/models/contact_request.py b/video-gen-api/app/models/contact_request.py new file mode 100644 index 00000000..d11a74c4 --- /dev/null +++ b/video-gen-api/app/models/contact_request.py @@ -0,0 +1,17 @@ +from sqlalchemy import Boolean, ForeignKey, String, Text +from sqlalchemy.orm import Mapped, mapped_column + +from app.models.base import Base, TimestampMixin + + +class ContactRequest(Base, TimestampMixin): + __tablename__ = "contact_requests" + + id: Mapped[str] = mapped_column(String(32), primary_key=True) + user_id: Mapped[str] = mapped_column(String(32), ForeignKey("users.id"), index=True) + phone: Mapped[str] = mapped_column(String(20), index=True) + company_name: Mapped[str] = mapped_column(String(128)) + industry: Mapped[str] = mapped_column(String(64)) + name: Mapped[str] = mapped_column(String(64)) + message: Mapped[str | None] = mapped_column(Text, nullable=True) + is_handled: Mapped[bool] = mapped_column(Boolean, default=False) \ No newline at end of file diff --git a/video-gen-api/app/schemas/contact.py b/video-gen-api/app/schemas/contact.py new file mode 100644 index 00000000..b83168ce --- /dev/null +++ b/video-gen-api/app/schemas/contact.py @@ -0,0 +1,31 @@ +from datetime import datetime + +from pydantic import BaseModel, Field + + +class ContactRequestCreate(BaseModel): + phone: str = Field(..., description="手机号") + company_name: str = Field(..., description="公司名称") + industry: str = Field(..., description="行业") + name: str = Field(..., description="姓名") + message: str | None = Field(None, description="留言") + + +class ContactRequestOut(BaseModel): + id: str + user_id: str + phone: str + company_name: str + industry: str + name: str + message: str | None + is_handled: bool + created_at: datetime + + class Config: + from_attributes = True + + +class ContactRequestListOut(BaseModel): + items: list[ContactRequestOut] + total: int \ No newline at end of file diff --git a/video-gen-api/videogen_api.egg-info/PKG-INFO b/video-gen-api/videogen_api.egg-info/PKG-INFO index 16a58e26..53824510 100644 --- a/video-gen-api/videogen_api.egg-info/PKG-INFO +++ b/video-gen-api/videogen_api.egg-info/PKG-INFO @@ -11,7 +11,7 @@ Requires-Dist: alembic>=1.14.0 Requires-Dist: pydantic>=2.10.0 Requires-Dist: pydantic-settings>=2.6.0 Requires-Dist: pyjwt>=2.10.0 -Requires-Dist: passlib[bcrypt]>=1.7.4 +Requires-Dist: bcrypt>=4.0.0 Requires-Dist: httpx>=0.28.0 Requires-Dist: python-multipart>=0.0.17 Requires-Dist: cryptography>=44.0.0 @@ -22,6 +22,12 @@ Requires-Dist: redis>=5.2.0; extra == "redis" Provides-Extra: celery Requires-Dist: celery>=5.4.0; extra == "celery" Requires-Dist: redis>=5.2.0; extra == "celery" +Provides-Extra: alipay +Requires-Dist: alipay-sdk-python>=3.7.1160; extra == "alipay" +Provides-Extra: wxpay +Requires-Dist: wechatpayv3>=2.0.2; extra == "wxpay" +Provides-Extra: volc +Requires-Dist: volcengine-python-sdk>=1.1.0; extra == "volc" Provides-Extra: dev Requires-Dist: pytest>=8.3.0; extra == "dev" Requires-Dist: pytest-asyncio>=0.24.0; extra == "dev" diff --git a/video-gen-api/videogen_api.egg-info/SOURCES.txt b/video-gen-api/videogen_api.egg-info/SOURCES.txt index bd34201f..58dcc41d 100644 --- a/video-gen-api/videogen_api.egg-info/SOURCES.txt +++ b/video-gen-api/videogen_api.egg-info/SOURCES.txt @@ -4,56 +4,196 @@ app/config.py app/dependencies.py app/main.py app/api/__init__.py +app/api/admin/__init__.py +app/api/admin/video_prompt_schema_config.py app/api/v1/__init__.py app/api/v1/admin.py app/api/v1/auth.py app/api/v1/captcha.py +app/api/v1/contact.py app/api/v1/credits.py app/api/v1/generation.py +app/api/v1/generation_ai.py +app/api/v1/hot_opening_replicate.py +app/api/v1/image_engines.py +app/api/v1/industries.py +app/api/v1/material_consumption.py +app/api/v1/menu_configs.py app/api/v1/notifications.py +app/api/v1/open_type.py app/api/v1/payments.py +app/api/v1/pre_test_template.py app/api/v1/projects.py +app/api/v1/recharge_packages.py +app/api/v1/resources_material.py +app/api/v1/shot_replicate.py +app/api/v1/sms.py +app/api/v1/test.py +app/api/v1/upload_material.py +app/api/v1/user_oauth.py +app/api/v1/user_oauth_app.py +app/api/v1/video_engines.py +app/enums/__init__.py +app/enums/common.py +app/enums/credit_record.py +app/enums/hot_opening_replicate.py +app/enums/module_generation_flow.py +app/enums/shot_replicate.py +app/enums/token_usage.py +app/enums/user.py +app/enums/video_prompt_schema.py app/middleware/__init__.py app/middleware/anti_crawler.py app/middleware/logging.py app/middleware/rate_limit.py +app/middleware/request_encrypt.py app/models/__init__.py app/models/base.py +app/models/chat_generation_task.py +app/models/chat_generation_task_event.py +app/models/chat_provider_call_log.py +app/models/contact_request.py +app/models/credit_ratio.py app/models/credit_record.py +app/models/generated_resource.py app/models/generation_record.py +app/models/image_engine.py +app/models/industry_config.py +app/models/material_cost.py +app/models/menu_config.py app/models/model_config.py +app/models/module_generation_project.py +app/models/module_generation_step.py app/models/notification.py +app/models/notification_read.py +app/models/open_type.py +app/models/operation_log.py app/models/payment_order.py +app/models/pre_test_template.py app/models/project.py +app/models/recharge_package.py +app/models/resources_material.py +app/models/shot_replicate_segment.py +app/models/shot_replicate_task_set.py app/models/system_config.py +app/models/token_usage.py +app/models/upload_task.py app/models/user.py +app/models/user_oauth.py +app/models/user_oauth_account.py +app/models/user_oauth_app.py +app/models/user_resource_month_stat.py +app/models/user_resource_total_stat.py +app/models/video_engine.py app/schemas/__init__.py app/schemas/admin.py app/schemas/auth.py app/schemas/captcha.py app/schemas/common.py +app/schemas/contact.py app/schemas/credit.py +app/schemas/credit_ratio.py app/schemas/generation.py +app/schemas/generation_ai.py +app/schemas/hot_opening_replicate.py +app/schemas/image_engine.py +app/schemas/industry.py +app/schemas/menu.py app/schemas/notification.py +app/schemas/open_type.py app/schemas/payment.py +app/schemas/pre_test_template.py app/schemas/project.py +app/schemas/recharge_package.py +app/schemas/resources_material.py +app/schemas/shot_replicate.py +app/schemas/sms.py app/schemas/user.py +app/schemas/user_oauth.py +app/schemas/user_oauth_app.py +app/schemas/video_engine.py +app/schemas/video_prompt_schema_config.py app/services/__init__.py +app/services/admin_credit_record_service.py app/services/auth.py app/services/captcha.py +app/services/celery_download_recovery_service.py +app/services/credit_ratio_service.py +app/services/credit_record_meta_service.py app/services/credits.py +app/services/error_codes.py +app/services/generation_ai_service.py +app/services/generation_billing_service.py +app/services/generation_download_service.py +app/services/generation_log_service.py +app/services/generation_module_hook_service.py +app/services/generation_prompt_service.py +app/services/generation_provider_service.py +app/services/generation_provider_types.py +app/services/generation_recovery_service.py +app/services/generation_refund_service.py +app/services/generation_task_factory_service.py +app/services/hot_opening_replicate_service.py +app/services/hot_opening_video_prompt_service.py +app/services/image_gen.py app/services/llm.py +app/services/log_config.py +app/services/material_consumption_queue.py +app/services/material_consumption_service.py +app/services/module_async_recovery_service.py +app/services/module_generation_flow_base_service.py +app/services/module_generation_log_service.py +app/services/module_generation_step_common_service.py +app/services/module_generation_step_update_service.py app/services/notification.py +app/services/operation_log.py app/services/payment.py +app/services/pre_test_template_service.py +app/services/provider_limit.py +app/services/redis_registry_service.py +app/services/resource_accounting_service.py +app/services/resource_signed_url_service.py +app/services/resources_material_service.py +app/services/shot_replicate_flow_service.py +app/services/shot_replicate_recovery_service.py +app/services/shot_replicate_taskset_service.py +app/services/shot_video_analysis_service.py +app/services/shot_video_split_service.py +app/services/sms.py +app/services/upload_material_service.py +app/services/upload_queue.py +app/services/upload_video_asset_service.py +app/services/user_oauth_app_service.py +app/services/user_oauth_service.py +app/services/video_cover_service.py app/services/video_gen.py +app/services/video_prompt_schema_config_service.py +app/services/video_queue.py app/services/video_url.py app/tasks/__init__.py +app/tasks/async_runner.py app/tasks/celery_app.py app/tasks/cleanup.py +app/tasks/generation_create_tasks.py +app/tasks/generation_download_tasks.py +app/tasks/generation_poll_tasks.py +app/tasks/generation_recovery_tasks.py +app/tasks/hot_opening_replicate_tasks.py +app/tasks/material_consumption_task.py +app/tasks/module_async_recovery_tasks.py +app/tasks/pre_test_result_task.py +app/tasks/shot_replicate_flow_tasks.py +app/tasks/shot_replicate_tasks.py +app/tasks/token_refresh_task.py +app/tasks/user_oauth_tasks.py app/tasks/video_generation.py app/utils/__init__.py +app/utils/area.py +app/utils/douyinApi.py +app/utils/douyinRequest.py app/utils/exceptions.py app/utils/id_gen.py +app/utils/logger.py app/utils/redis.py app/utils/security.py videogen_api.egg-info/PKG-INFO diff --git a/video-gen-api/videogen_api.egg-info/requires.txt b/video-gen-api/videogen_api.egg-info/requires.txt index 42ad77e4..a5d5aa46 100644 --- a/video-gen-api/videogen_api.egg-info/requires.txt +++ b/video-gen-api/videogen_api.egg-info/requires.txt @@ -6,11 +6,14 @@ alembic>=1.14.0 pydantic>=2.10.0 pydantic-settings>=2.6.0 pyjwt>=2.10.0 -passlib[bcrypt]>=1.7.4 +bcrypt>=4.0.0 httpx>=0.28.0 python-multipart>=0.0.17 cryptography>=44.0.0 +[alipay] +alipay-sdk-python>=3.7.1160 + [celery] celery>=5.4.0 redis>=5.2.0 @@ -25,3 +28,9 @@ asyncpg>=0.30.0 [redis] redis>=5.2.0 + +[volc] +volcengine-python-sdk>=1.1.0 + +[wxpay] +wechatpayv3>=2.0.2 diff --git a/video-gen-app/dist/assets/index-Dm7vTAAt.js b/video-gen-app/dist/assets/index-Di-nQw13.js similarity index 75% rename from video-gen-app/dist/assets/index-Dm7vTAAt.js rename to video-gen-app/dist/assets/index-Di-nQw13.js index 582a14f7..faa32749 100644 --- a/video-gen-app/dist/assets/index-Dm7vTAAt.js +++ b/video-gen-app/dist/assets/index-Di-nQw13.js @@ -156,7 +156,7 @@ html body { & > ${t}-header`]:{borderRadius:`0 0 ${X(c)} ${X(c)}`}},[`> ${t}-header`]:{position:`relative`,display:`flex`,flexWrap:`nowrap`,alignItems:`flex-start`,padding:a,color:p,lineHeight:g,cursor:`pointer`,transition:`all ${S}, visibility 0s`,...Gl(e),[`> ${t}-title`]:{flex:`auto`},[`${t}-expand-icon`]:{height:T,display:`flex`,alignItems:`center`,marginInlineEnd:v},[`${t}-arrow`]:{...Hl(),fontSize:C,transition:`transform ${S}`,svg:{transition:`transform ${S}`}},[`${t}-title`]:{marginInlineEnd:`auto`}},[`${t}-collapsible-header`]:{cursor:`default`,[`${t}-title`]:{flex:`none`,cursor:`pointer`},[`${t}-expand-icon`]:{cursor:`pointer`}},[`${t}-collapsible-icon`]:{cursor:`unset`,[`${t}-expand-icon`]:{cursor:`pointer`}}},[`${t}-panel`]:{color:f,backgroundColor:n,borderTop:D,[`& > ${t}-body`]:{padding:w},"&-hidden":{display:`none`}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:o,paddingInlineStart:x,[`> ${t}-expand-icon`]:{marginInlineStart:e.calc(y).sub(x).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:y}}},"&-large":{[`> ${t}-item`]:{fontSize:h,lineHeight:_,[`> ${t}-header`]:{padding:s,paddingInlineStart:r,[`> ${t}-expand-icon`]:{height:E,marginInlineStart:e.calc(b).sub(r).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:b}}},[`${t}-item:last-child`]:{borderBottom:0,[`> ${t}-panel`]:{borderRadius:`0 0 ${X(c)} ${X(c)}`}},[`& ${t}-item-disabled > ${t}-header`]:{"&, & > .arrow":{color:m,cursor:`not-allowed`}},[`&${t}-icon-placement-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,marginInlineEnd:0,marginInlineStart:v}}}}}}},ree=e=>{let{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow`;return{[`${t}-rtl`]:{[n]:{transform:`rotate(180deg)`}}}},iee=e=>{let{componentCls:t,headerBg:n,borderlessContentPadding:r,borderlessContentBg:i,colorBorder:a}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${a}`},[` > ${t}-item:last-child, > ${t}-item:last-child ${t}-header - `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-panel`]:{backgroundColor:i,borderTop:0},[`> ${t}-item > ${t}-panel > ${t}-body`]:{padding:r}}}},aee=e=>{let{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:`transparent`,border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-panel`]:{backgroundColor:`transparent`,border:0,[`> ${t}-body`]:{paddingBlock:n}}}}}},oee=Xl(`Collapse`,e=>{let t=lc(e,{collapseHeaderPaddingSM:`${X(e.paddingXS)} ${X(e.paddingSM)}`,collapseHeaderPaddingLG:`${X(e.padding)} ${X(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return[nee(t),iee(t),aee(t),ree(t),Jh(t)]},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`})),r_=Object.assign(S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,expandIcon:i,className:a,style:o,classNames:s,styles:c}=_a(`collapse`),{prefixCls:l,className:u,rootClassName:d,style:f,bordered:p=!0,ghost:m,size:h,expandIconPlacement:g,expandIconPosition:_,children:v,destroyInactivePanel:y,destroyOnHidden:b,expandIcon:x,classNames:C,styles:w}=e,T=Oh(e=>h??e??`middle`),E=n(`collapse`,l),D=n(),[O,k]=oee(E),A=g??_??`start`,j={...e,size:T,bordered:p,expandIconPlacement:A},[M,N]=xf([s,C],[c,w],{props:j}),P=x??i,F=S.useCallback((e={})=>cm(typeof P==`function`?P(e):S.createElement(Ug,{rotate:e.isActive?r===`rtl`?-90:90:void 0,"aria-label":e.isActive?`expanded`:`collapsed`}),e=>({className:Y(e.className,`${E}-arrow`)})),[P,E,r]),I=Y(`${E}-icon-placement-${A}`,{[`${E}-borderless`]:!p,[`${E}-rtl`]:r===`rtl`,[`${E}-ghost`]:!!m,[`${E}-large`]:T===`large`,[`${E}-small`]:T===`small`},a,u,d,O,k,M.root),L=S.useMemo(()=>({..._h(D),motionAppear:!1,leavedClassName:`${E}-panel-hidden`}),[D,E]),R=S.useMemo(()=>v?Di(v).map(e=>e):null,[v]);return S.createElement(t_,{ref:t,openMotion:L,...hi(e,[`rootClassName`]),expandIcon:F,prefixCls:E,className:I,style:{...N.root,...o,...f},classNames:M,styles:N,destroyOnHidden:b??y},R)}),{Panel:n_}),see=e=>e instanceof Bg?e:new Bg(e),i_=(e,t)=>{let{r:n,g:r,b:i,a}=e.toRgb(),o=new Lg(e.toRgbString()).onBackground(t).toHsv();return a<=.5?o.v>.5:n*.299+r*.587+i*.114>192},a_=e=>{let{paddingInline:t,onlyIconSize:n,borderColorDisabled:r}=e;return lc(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n,colorBorderDisabled:r})},o_=e=>{let t=e.contentFontSize??e.fontSize,n=e.contentFontSizeSM??e.fontSize,r=e.contentFontSizeLG??e.fontSizeLG,i=e.contentLineHeight??xc(t),a=e.contentLineHeightSM??xc(n),o=e.contentLineHeightLG??xc(r),s=i_(new Bg(e.colorBgSolid),`#fff`)?`#000`:`#fff`,c=bc.reduce((t,n)=>({...t,[`${n}ShadowColor`]:`0 ${X(e.controlOutlineWidth)} 0 ${Nl(e[`${n}1`],e.colorBgContainer)}`}),{}),l=e.colorBgContainerDisabled,u=e.colorBgContainerDisabled;return{...c,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:`transparent`,defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:`inherit`,onlyIconSizeSM:`inherit`,onlyIconSizeLG:`inherit`,groupBorderColor:e.colorPrimaryHover,linkHoverBg:`transparent`,textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:s,contentFontSize:t,contentFontSizeSM:n,contentFontSizeLG:r,contentLineHeight:i,contentLineHeightSM:a,contentLineHeightLG:o,paddingBlock:Math.max((e.controlHeight-t*i)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-n*a)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-r*o)/2-e.lineWidth,0),defaultBgDisabled:l,dashedBgDisabled:u}},s_=e=>{let{componentCls:t,antCls:n,lineWidth:r}=e,[i,a]=$l(n,`btn`);return{[t]:[{[i(`border-width`)]:r,[i(`border-color`)]:`#000`,[i(`border-color-hover`)]:a(`border-color`),[i(`border-color-active`)]:a(`border-color`),[i(`border-color-disabled`)]:a(`border-color`),[i(`border-style`)]:`solid`,[i(`text-color`)]:`#000`,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`),[i(`text-color-disabled`)]:a(`text-color`),[i(`bg-color`)]:`#ddd`,[i(`bg-color-hover`)]:a(`bg-color`),[i(`bg-color-active`)]:a(`bg-color`),[i(`bg-color-disabled`)]:e.colorBgContainerDisabled,[i(`bg-color-container`)]:e.colorBgContainer,[i(`shadow`)]:`none`},{border:[a(`border-width`),a(`border-style`),a(`border-color`)].join(` `),color:a(`text-color`),backgroundColor:a(`bg-color`),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[a(`border-width`),a(`border-style`),a(`border-color-hover`)].join(` `),color:a(`text-color-hover`),backgroundColor:a(`bg-color-hover`)},"&:active":{border:[a(`border-width`),a(`border-style`),a(`border-color-active`)].join(` `),color:a(`text-color-active`),backgroundColor:a(`bg-color-active`)}}},{[`&${t}-variant-solid`]:{[i(`solid-bg-color`)]:a(`color-base`),[i(`solid-bg-color-hover`)]:a(`color-hover`),[i(`solid-bg-color-active`)]:a(`color-active`),[i(`border-color`)]:`transparent`,[i(`text-color`)]:e.colorTextLightSolid,[i(`bg-color`)]:a(`solid-bg-color`),[i(`bg-color-hover`)]:a(`solid-bg-color-hover`),[i(`bg-color-active`)]:a(`solid-bg-color-active`),boxShadow:a(`shadow`)},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`border-color`)]:a(`color-base`),[i(`border-color-hover`)]:a(`color-hover`),[i(`border-color-active`)]:a(`color-active`),[i(`bg-color`)]:a(`bg-color-container`),[i(`text-color`)]:a(`color-base`),[i(`text-color-hover`)]:a(`color-hover`),[i(`text-color-active`)]:a(`color-active`),boxShadow:a(`shadow`)},[`&${t}-variant-dashed`]:{[i(`border-style`)]:`dashed`,[i(`bg-color-disabled`)]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[i(`border-color`)]:`transparent`,[i(`text-color`)]:a(`color-base`),[i(`bg-color`)]:a(`color-light`),[i(`bg-color-hover`)]:a(`color-light-hover`),[i(`bg-color-active`)]:a(`color-light-active`)},[`&${t}-variant-text, &${t}-variant-link`]:{[i(`border-color`)]:`transparent`,[i(`text-color`)]:a(`color-base`),[i(`text-color-hover`)]:a(`color-hover`),[i(`text-color-active`)]:a(`color-active`),[i(`bg-color`)]:`transparent`,[i(`bg-color-hover`)]:`transparent`,[i(`bg-color-active`)]:`transparent`,[`&:disabled, &${e.componentCls}-disabled`]:{background:`transparent`,borderColor:`transparent`}},[`&${t}-variant-text`]:{[i(`bg-color-hover`)]:a(`color-light`),[i(`bg-color-active`)]:a(`color-light-active`)}},{[`&${t}-variant-link`]:{[i(`color-base`)]:e.colorLink,[i(`color-hover`)]:e.colorLinkHover,[i(`color-active`)]:e.colorLinkActive,[i(`bg-color-hover`)]:e.linkHoverBg},[`&${t}-color-primary`]:{[i(`color-base`)]:e.colorPrimary,[i(`color-hover`)]:e.colorPrimaryHover,[i(`color-active`)]:e.colorPrimaryActive,[i(`color-light`)]:e.colorPrimaryBg,[i(`color-light-hover`)]:e.colorPrimaryBgHover,[i(`color-light-active`)]:e.colorPrimaryBorder,[i(`shadow`)]:e.primaryShadow,[`&${t}-variant-solid`]:{[i(`text-color`)]:e.primaryColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)}},[`&${t}-color-dangerous`]:{[i(`color-base`)]:e.colorError,[i(`color-hover`)]:e.colorErrorHover,[i(`color-active`)]:e.colorErrorActive,[i(`color-light`)]:e.colorErrorBg,[i(`color-light-hover`)]:e.colorErrorBgFilledHover,[i(`color-light-active`)]:e.colorErrorBgActive,[i(`shadow`)]:e.dangerShadow,[`&${t}-variant-solid`]:{[i(`text-color`)]:e.dangerColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)}},[`&${t}-color-default`]:{[i(`solid-bg-color`)]:e.colorBgSolid,[i(`solid-bg-color-hover`)]:e.colorBgSolidHover,[i(`solid-bg-color-active`)]:e.colorBgSolidActive,[i(`color-base`)]:e.defaultBorderColor,[i(`color-hover`)]:e.defaultHoverBorderColor,[i(`color-active`)]:e.defaultActiveBorderColor,[i(`color-light`)]:e.colorFillTertiary,[i(`color-light-hover`)]:e.colorFillSecondary,[i(`color-light-active`)]:e.colorFill,[i(`text-color`)]:e.defaultColor,[i(`text-color-hover`)]:e.defaultHoverColor,[i(`text-color-active`)]:e.defaultActiveColor,[i(`shadow`)]:e.defaultShadow,[`&${t}-variant-outlined`]:{[i(`bg-color-disabled`)]:e.defaultBgDisabled},[`&${t}-variant-solid`]:{[i(`text-color`)]:e.solidTextColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)},[`&${t}-variant-filled, &${t}-variant-text`]:{[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`text-color`)]:e.defaultColor,[i(`text-color-hover`)]:e.defaultHoverColor,[i(`text-color-active`)]:e.defaultActiveColor,[i(`bg-color-container`)]:e.defaultBg,[i(`bg-color-hover`)]:e.defaultHoverBg,[i(`bg-color-active`)]:e.defaultActiveBg},[`&${t}-variant-text`]:{[i(`text-color`)]:e.textTextColor,[i(`text-color-hover`)]:e.textTextHoverColor,[i(`text-color-active`)]:e.textTextActiveColor,[i(`bg-color-hover`)]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`text-color`)]:e.defaultGhostColor,[i(`border-color`)]:e.defaultGhostBorderColor}}}},bc.map(n=>{let r=e[`${n}6`],a=e[`${n}1`],o=e[`${n}Hover`],s=e[`${n}2`],c=e[`${n}3`],l=e[`${n}Active`],u=e[`${n}ShadowColor`];return{[`&${t}-color-${n}`]:{[i(`color-base`)]:r,[i(`color-hover`)]:o,[i(`color-active`)]:l,[i(`color-light`)]:a,[i(`color-light-hover`)]:s,[i(`color-light-active`)]:c,[i(`shadow`)]:u}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:`not-allowed`,borderColor:e.colorBorderDisabled,background:a(`bg-color-disabled`),color:e.colorTextDisabled,boxShadow:`none`}},{[`&${t}-background-ghost`]:{[i(`bg-color`)]:e.ghostBg,[i(`bg-color-hover`)]:e.ghostBg,[i(`bg-color-active`)]:e.ghostBg,[i(`shadow`)]:`none`,[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`bg-color-hover`)]:e.ghostBg,[i(`bg-color-active`)]:e.ghostBg}}}]}},c_=e=>{let{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:i,motionDurationSlow:a,motionEaseInOut:o,iconGap:s,calc:c}=e;return{[t]:{outline:`none`,position:`relative`,display:`inline-flex`,gap:s,alignItems:`center`,justifyContent:`center`,fontWeight:r,whiteSpace:`nowrap`,textAlign:`center`,backgroundImage:`none`,cursor:`pointer`,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:`none`,touchAction:`manipulation`,...vg(),"&:disabled > *":{pointerEvents:`none`},[`${t}-icon > svg`]:Hl(),"> a":{color:`currentColor`},"&:not(:disabled)":Gl(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:`0.34em`},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:`-0.34em`,letterSpacing:`0.34em`},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:`none`}},[`&${t}-loading`]:{opacity:i,cursor:`default`},[`${t}-loading-icon`]:{transition:[`width`,`opacity`,`margin`].map(e=>`${e} ${a} ${o}`).join(`,`)},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:c(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:c(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:`row-reverse`,[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:c(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:c(s).mul(-1).equal()}}}}}},l_=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:`50%`}),u_=(e,t=``)=>{let{componentCls:n,controlHeight:r,fontSize:i,borderRadius:a,buttonPaddingHorizontal:o,iconCls:s,buttonPaddingVertical:c,buttonIconOnlyFontSize:l}=e;return[{[t]:{fontSize:i,height:r,padding:`${X(c)} ${X(o)}`,borderRadius:a,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:l}}}},{[`${n}${n}-circle${t}`]:l_(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},d_=e=>u_(lc(e,{fontSize:e.contentFontSize}),e.componentCls),f_=e=>u_(lc(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM}),`${e.componentCls}-sm`),p_=e=>u_(lc(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG}),`${e.componentCls}-lg`),m_=e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:`100%`}}}},h_=Xl(`Button`,e=>{let t=a_(e);return[c_(t),d_(t),f_(t),p_(t),m_(t),s_(t),Pg(t)]},o_,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function g_(e,t,n,r){let{focusElCls:i,focus:a,borderElCls:o}=n,s=o?`> *`:``,c=[`hover`,a?`focus`:null,`active`].filter(Boolean).map(e=>`&:${e} ${s}`).join(`,`);return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{[c]:{zIndex:3},...i?{[`&${i}`]:{zIndex:3}}:{},[`&[disabled] ${s}`]:{zIndex:0}}}}function __(e,t,n){let{borderElCls:r}=n,i=r?`> ${r}`:``;return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function v_(e,t={focus:!0}){let{componentCls:n}=e,{componentCls:r}=t,i=r||n,a=`${i}-compact`;return{[a]:{...g_(e,a,t,i),...__(i,a,t)}}}function y_(e,t,n){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{"&:hover,&:focus,&:active":{zIndex:3},"&[disabled]":{zIndex:0}}}}function b_(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function x_(e){let t=`${e.componentCls}-compact-vertical`;return{[t]:{...y_(e,t,e.componentCls),...b_(e.componentCls,t)}}}var S_=e=>{let{antCls:t,componentCls:n,lineWidth:r,calc:i,colorBgContainer:a}=e,o=`${n}-variant-solid:not([disabled])`,s=i(r).mul(-1).equal(),[c,l]=$l(t,`btn`),u=e=>({[`${n}-compact${e?`-vertical`:``}-item`]:{[c(`compact-connect-border-color`)]:l(`bg-color-hover`),[`&${o}`]:{transition:`none`,[`& + ${o}:before`]:[{position:`absolute`,backgroundColor:l(`compact-connect-border-color`),content:`""`},e?{top:s,insetInline:s,height:r}:{insetBlock:s,insetInlineStart:s,width:r}],"&:hover:before":{display:`none`}}}});return[u(),u(!0),{[`${o}${n}-color-default`]:{[c(`compact-connect-border-color`)]:`color-mix(in srgb, ${l(`bg-color-hover`)} 75%, ${a})`}}]},C_=Ql([`Button`,`compact`],e=>{let t=a_(e);return[v_(t),x_(t),S_(t)]},o_);function w_(e){if(ef(e)){let t=e?.delay;return t=Qd(t)?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}var T_={default:[`default`,`outlined`],primary:[`primary`,`solid`],dashed:[`default`,`dashed`],link:[`link`,`link`],text:[`default`,`text`]},E_=S.forwardRef((e,t)=>{let{_skipSemantic:n,loading:r=!1,prefixCls:i,color:a,variant:o,type:s,danger:c=!1,shape:l,size:u,disabled:d,className:f,rootClassName:p,children:m,icon:h,iconPosition:g,iconPlacement:_,ghost:v=!1,block:y=!1,htmlType:b=`button`,classNames:x,styles:C,style:w,autoInsertSpace:T,autoFocus:E,...D}=e,O=Di(m),k=s||`default`,{getPrefixCls:A,direction:j,autoInsertSpace:M,className:N,style:P,classNames:F,styles:I,loadingIcon:L,shape:R,color:z,variant:B}=_a(`button`),V=l||R||`default`,[H,U]=(0,S.useMemo)(()=>{if(a&&o)return[a,o];if(s||c){let e=T_[k]||[];return c?[`danger`,e[1]]:e}return z&&B?[z,B]:[`default`,`outlined`]},[a,o,s,c,z,B,k]),[ee,te]=(0,S.useMemo)(()=>v&&U===`solid`?[H,`outlined`]:[H,U],[H,U,v]),ne=ee===`danger`,W=ne?`dangerous`:ee,re=T??M??!0,G=A(`btn`,i),[K,q]=h_(G),ie=(0,S.useContext)(pm),J=d??ie,ae=(0,S.useContext)(Fh),oe=(0,S.useMemo)(()=>w_(r),[r]),[se,ce]=(0,S.useState)(oe.loading),[le,ue]=(0,S.useState)(!1),de=(0,S.useRef)(null),fe=cr(t,de),pe=O.length===1&&!h&&!Bh(te),me=(0,S.useRef)(!0);S.useEffect(()=>(me.current=!1,()=>{me.current=!0}),[]),Vn(()=>{let e=null;oe.delay>0?e=setTimeout(()=>{e=null,ce(!0)},oe.delay):ce(oe.loading);function t(){e&&=(clearTimeout(e),null)}return t},[oe.delay,oe.loading]),(0,S.useEffect)(()=>{if(!de.current||!re)return;let e=de.current.textContent||``;pe&&Rh(e)?le||ue(!0):le&&ue(!1)}),(0,S.useEffect)(()=>{E&&de.current&&de.current.focus()},[]);let he=S.useCallback(t=>{if(se||J){t.preventDefault();return}e.onClick?.((`href`in e,t))},[e.onClick,se,J]),{compactSize:ge,compactItemClassnames:_e}=jh(G,j),ve=Oh(e=>u??ge??ae??e),ye=se?`loading`:h,be=_??g??`start`,xe=hi(D,[`navigate`]),Se={...e,type:k,color:ee,variant:te,danger:ne,shape:V,size:ve,disabled:J,loading:se,iconPlacement:be},[Ce,we]=xf([n?void 0:F,x],[n?void 0:I,C],{props:Se}),Te=Y(G,K,q,{[`${G}-${V}`]:V!==`default`&&V!==`square`&&V,[`${G}-${k}`]:k,[`${G}-dangerous`]:c,[`${G}-color-${W}`]:W,[`${G}-variant-${te}`]:te,[`${G}-lg`]:ve===`large`,[`${G}-sm`]:ve===`small`,[`${G}-icon-only`]:!m&&m!==0&&!!ye,[`${G}-background-ghost`]:v&&!Bh(te),[`${G}-loading`]:se,[`${G}-two-chinese-chars`]:le&&re&&!se,[`${G}-block`]:y,[`${G}-rtl`]:j===`rtl`,[`${G}-icon-end`]:be===`end`},_e,f,p,N,Ce.root),Ee={...we.root,...P,...w},De={className:Ce.icon,style:we.icon},Oe=e=>S.createElement(Uh,{prefixCls:G,...De},e),ke=S.createElement(qh,{existIcon:!!h,prefixCls:G,loading:se,mount:me.current,...De}),Ae=ef(r)&&r.icon||L,je;je=h&&!se?Oe(h):r&&Ae?Oe(Ae):ke;let Me=Zd(m)?Hh(m,pe&&re,we.content,Ce.content):null;if(xe.href!==void 0)return S.createElement(`a`,{...xe,className:Y(Te,{[`${G}-disabled`]:J}),href:J?void 0:xe.href,style:Ee,onClick:he,ref:fe,tabIndex:J?-1:0,"aria-disabled":J},je,Me);let Ne=S.createElement(`button`,{...D,type:b,className:Te,style:Ee,onClick:he,disabled:J,ref:fe},je,Me,_e&&S.createElement(C_,{prefixCls:G}));return Bh(te)||(Ne=S.createElement(Dh,{component:`Button`,disabled:se},Ne)),Ne});E_.Group=Ih,E_.__ANT_BUTTON=!0;var D_=e=>{let{type:t,children:n,prefixCls:r,buttonProps:i,close:a,autoFocus:o,emitEvent:s,isSilent:c,quitOnNullishReturnValue:l,actionFn:u}=e,d=S.useRef(!1),f=S.useRef(null),[p,m]=Un(!1),h=(...e)=>{a?.(...e)};S.useEffect(()=>{let e=null;return o&&(e=setTimeout(()=>{f.current?.focus({preventScroll:!0})})),()=>{e&&clearTimeout(e)}},[o]);let g=e=>{nf(e)&&(m(!0),e.then((...e)=>{m(!1,!0),h.apply(void 0,e),d.current=!1},e=>{if(m(!1,!0),d.current=!1,!c?.())return Promise.reject(e)}))},_=e=>{if(d.current)return;if(d.current=!0,!u){h();return}let t;if(s){if(t=u(e),l&&!nf(t)){d.current=!1,h(e);return}}else if(u.length)t=u(a),d.current=!1;else if(t=u(),!nf(t)){h();return}g(t)};return S.createElement(E_,{...zh(t),onClick:_,loading:p,prefixCls:r,...i,ref:f},n)},O_=S.createContext({}),{Provider:k_}=O_,A_=()=>{let{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:r,mergedOkCancel:i,rootPrefixCls:a,close:o,onCancel:s,onConfirm:c,onClose:l}=(0,S.useContext)(O_);return i?S.createElement(D_,{isSilent:r,actionFn:s,close:(...e)=>{o?.(...e),c?.(!1),l?.()},autoFocus:e===`cancel`,buttonProps:t,prefixCls:`${a}-btn`},n):null},j_=()=>{let{autoFocusButton:e,close:t,isSilent:n,okButtonProps:r,rootPrefixCls:i,okTextLocale:a,okType:o,onConfirm:s,onOk:c,onClose:l}=(0,S.useContext)(O_);return S.createElement(D_,{isSilent:n,type:o||`primary`,actionFn:c,close:(...e)=>{t?.(...e),s?.(!0),l?.()},autoFocus:e===`ok`,buttonProps:r,prefixCls:`${i}-btn`},a)},M_=S.createContext({});function N_(e,t,n){let r=t;return!r&&n&&(r=`${e}-${n}`),r}function P_(e,t){let n=e[`page${t?`Y`:`X`}Offset`],r=`scroll${t?`Top`:`Left`}`;if(typeof n!=`number`){let t=e.document;n=t.documentElement[r],typeof n!=`number`&&(n=t.body[r])}return n}function F_(e){let t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,i=r.defaultView||r.parentWindow;return n.left+=P_(i),n.top+=P_(i,!0),n}var I_=S.memo(({children:e})=>e,(e,{shouldUpdate:t})=>!t);function L_(){return L_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,className:r,style:i,title:a,ariaId:o,footer:s,closable:c,closeIcon:l,onClose:u,children:d,bodyStyle:f,bodyProps:p,modalRender:m,onMouseDown:h,onMouseUp:g,holderRef:_,visible:v,forceRender:y,width:b,height:x,classNames:C,styles:w,isFixedPos:T,focusTrap:E}=e,{panel:D}=S.useContext(M_),O=(0,S.useRef)(null),k=cr(_,D,O),[A]=Wr(v&&T&&E!==!1,()=>O.current);S.useImperativeHandle(t,()=>({focus:()=>{O.current?.focus({preventScroll:!0})}}));let j={};b!==void 0&&(j.width=b),x!==void 0&&(j.height=x);let M=s?S.createElement(`div`,{className:Y(`${n}-footer`,C?.footer),style:{...w?.footer}},s):null,N=a?S.createElement(`div`,{className:Y(`${n}-header`,C?.header),style:{...w?.header}},S.createElement(`div`,{className:Y(`${n}-title`,C?.title),id:o,style:{...w?.title}},a)):null,P=(0,S.useMemo)(()=>typeof c==`object`&&c?c:c?{closeIcon:l??S.createElement(`span`,{className:`${n}-close-x`})}:{},[c,l,n]),F=bi(P,!0),I=typeof c==`object`&&c.disabled,L=c?S.createElement(`button`,L_({type:`button`,onClick:u,"aria-label":`Close`},F,{className:`${n}-close`,disabled:I}),P.closeIcon):null,R=S.createElement(`div`,{className:Y(`${n}-container`,C?.container),style:w?.container},L,N,S.createElement(`div`,L_({className:Y(`${n}-body`,C?.body),style:{...f,...w?.body}},p),d),M);return S.createElement(`div`,{key:`dialog-element`,role:`dialog`,"aria-labelledby":a?o:null,"aria-modal":`true`,ref:k,style:{...i,...j},className:Y(n,r),onMouseDown:h,onMouseUp:g,tabIndex:-1,onFocus:e=>{A(e.target)}},S.createElement(I_,{shouldUpdate:v||y},m?m(R):R))});function z_(){return z_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,title:r,style:i,className:a,visible:o,forceRender:s,destroyOnHidden:c,motionName:l,ariaId:u,onVisibleChanged:d,mousePosition:f}=e,p=(0,S.useRef)(null),m=(0,S.useRef)(null);S.useImperativeHandle(t,()=>({...m.current,inMotion:p.current.inMotion,enableMotion:p.current.enableMotion}));let[h,g]=S.useState(),_={};h&&(_.transformOrigin=h);function v(){if(!p.current?.nativeElement)return;let e=F_(p.current.nativeElement);g(f&&(f.x||f.y)?`${f.x-e.left}px ${f.y-e.top}px`:``)}return S.createElement(Ed,{visible:o,onVisibleChanged:d,onAppearPrepare:v,onEnterPrepare:v,forceRender:s,motionName:l,removeOnLeave:c,ref:p},({className:t,style:o},s)=>S.createElement(R_,z_({},e,{ref:m,title:r,ariaId:u,prefixCls:n,holderRef:s,style:{...o,...i,..._},className:Y(a,t)})))});function V_(){return V_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t,style:n,visible:r,maskProps:i,motionName:a,className:o}=e;return S.createElement(Ed,{key:`mask`,visible:r,motionName:a,leavedClassName:`${t}-mask-hidden`},({className:e,style:r},a)=>S.createElement(`div`,V_({ref:a,style:{...r,...n},className:Y(`${t}-mask`,e,o)},i)))};function U_(){return U_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t=`rc-dialog`,zIndex:n,visible:r=!1,focusTriggerAfterClose:i=!0,wrapStyle:a,wrapClassName:o,wrapProps:s,onClose:c,afterOpenChange:l,afterClose:u,transitionName:d,animation:f,closable:p=!0,mask:m=!0,maskTransitionName:h,maskAnimation:g,maskClosable:_=!0,maskStyle:v,maskProps:y,rootClassName:b,rootStyle:x,classNames:C,styles:w}=e,T=(0,S.useRef)(null),E=(0,S.useRef)(null),D=(0,S.useRef)(null),[O,k]=S.useState(r),[A,j]=S.useState(!1),M=Yn();function N(){pr(E.current,document.activeElement)||(T.current=document.activeElement)}function P(){pr(E.current,document.activeElement)||D.current?.focus()}function F(){if(k(!1),m&&T.current&&i){try{T.current.focus({preventScroll:!0})}catch{}T.current=null}O&&u?.()}function I(e){e?P():F(),l?.(e)}function L(e){c?.(e)}let R=(0,S.useRef)(!1),z=null;_&&(z=e=>{E.current===e.target&&R.current&&L(e)});function B(e){R.current=e.target===E.current}(0,S.useEffect)(()=>{r?(R.current=!1,k(!0),N(),E.current&&j(getComputedStyle(E.current).position===`fixed`)):O&&D.current.enableMotion()&&!D.current.inMotion()&&F()},[r]);let V={zIndex:n,...a,...w?.wrapper,display:O?null:`none`};return S.createElement(`div`,U_({className:Y(`${t}-root`,b),style:x},bi(e,{data:!0})),S.createElement(H_,{prefixCls:t,visible:m&&r,motionName:N_(t,h,g),style:{zIndex:n,...v,...w?.mask},maskProps:y,className:C?.mask}),S.createElement(`div`,U_({className:Y(`${t}-wrap`,o,C?.wrapper),ref:E,onClick:z,onMouseDown:B,style:V},s),S.createElement(B_,U_({},e,{isFixedPos:A,ref:D,closable:p,ariaId:M,prefixCls:t,visible:r&&O,onClose:L,onVisibleChanged:I,motionName:N_(t,d,f)}))))};function G_(){return G_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{visible:t,getContainer:n,forceRender:r,destroyOnHidden:i=!1,afterClose:a,closable:o,panelRef:s,keyboard:c=!0,onClose:l}=e,[u,d]=S.useState(t),f=S.useMemo(()=>({panel:s}),[s]);return S.useEffect(()=>{t&&d(!0)},[t]),!r&&i&&!u?null:S.createElement(M_.Provider,{value:f},S.createElement(Tp,{open:t||r||u,onEsc:({top:e,event:t})=>{if(e&&c){t.stopPropagation(),l?.(t);return}},autoDestroy:!1,getContainer:n,autoLock:t||u},S.createElement(W_,G_({},e,{destroyOnHidden:i,afterClose:()=>{let{afterClose:e}=(o&&typeof o==`object`?o:{})||{};e?.(),a?.(),d(!1)}}))))},q_=`RC_FORM_INTERNAL_HOOKS`,J_=()=>{li(!1,`Can not find FormContext. Please make sure you wrap Field under Form.`)},Y_=S.createContext({getFieldValue:J_,getFieldsValue:J_,getFieldError:J_,getFieldWarning:J_,getFieldsError:J_,isFieldsTouched:J_,isFieldTouched:J_,isFieldValidating:J_,isFieldsValidating:J_,resetFields:J_,setFields:J_,setFieldValue:J_,setFieldsValue:J_,validateFields:J_,submit:J_,getInternalHooks:()=>(J_(),{dispatch:J_,initEntityValue:J_,registerField:J_,useSubscribe:J_,setInitialValues:J_,destroyForm:J_,setCallbacks:J_,registerWatch:J_,getFields:J_,setValidateMessages:J_,setPreserve:J_,getInitialValue:J_})}),X_=S.createContext(null);function Z_(e){return e==null?[]:Array.isArray(e)?e:[e]}function Q_(e){return e&&!!e._init}function $_(){return{default:`Validation error on field %s`,required:`%s is required`,enum:`%s must be one of %s`,whitespace:`%s cannot be empty`,date:{format:`%s date %s is invalid for format %s`,parse:`%s date could not be parsed, %s is invalid `,invalid:`%s date %s is invalid`},types:{string:`%s is not a %s`,method:`%s is not a %s (function)`,array:`%s is not an %s`,object:`%s is not an %s`,number:`%s is not a %s`,date:`%s is not a %s`,boolean:`%s is not a %s`,integer:`%s is not an %s`,float:`%s is not a %s`,regexp:`%s is not a valid %s`,email:`%s is not a valid %s`,tel:`%s is not a valid %s`,url:`%s is not a valid %s`,hex:`%s is not a valid %s`},string:{len:`%s must be exactly %s characters`,min:`%s must be at least %s characters`,max:`%s cannot be longer than %s characters`,range:`%s must be between %s and %s characters`},number:{len:`%s must equal %s`,min:`%s cannot be less than %s`,max:`%s cannot be greater than %s`,range:`%s must be between %s and %s`},array:{len:`%s must be exactly %s in length`,min:`%s cannot be less than %s in length`,max:`%s cannot be greater than %s in length`,range:`%s must be between %s and %s in length`},pattern:{mismatch:`%s value %s does not match pattern %s`},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var ev=$_();function tv(e){try{return Function.toString.call(e).indexOf(`[native code]`)!==-1}catch{return typeof e==`function`}}function nv(e,t,n){if(Ys())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&Ks(i,n.prototype),i}function rv(e){var t=typeof Map==`function`?new Map:void 0;return rv=function(e){if(e===null||!tv(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return nv(e,arguments,Js(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ks(n,e)},rv(e)}var iv=/%[sdj%]/g,av=function(){};function ov(e){if(!e||!e.length)return null;var t={};return e.forEach(function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)}),t}function sv(e){var t=[...arguments].slice(1),n=0,r=t.length;return typeof e==`function`?e.apply(null,t):typeof e==`string`?e.replace(iv,function(e){if(e===`%%`)return`%`;if(n>=r)return e;switch(e){case`%s`:return String(t[n++]);case`%d`:return Number(t[n++]);case`%j`:try{return JSON.stringify(t[n++])}catch{return`[Circular]`}break;default:return e}}):e}function cv(e){return e===`string`||e===`url`||e===`hex`||e===`email`||e===`date`||e===`pattern`||e===`tel`}function lv(e,t){return!!(e==null||t===`array`&&Array.isArray(e)&&!e.length||cv(t)&&typeof e==`string`&&!e)}function uv(e,t,n){var r=[],i=0,a=e.length;function o(e){r.push.apply(r,da(e||[])),i++,i===a&&n(r)}e.forEach(function(e){t(e,o)})}function dv(e,t,n){var r=0,i=e.length;function a(o){if(o&&o.length){n(o);return}var s=r;r+=1,se.max?r.push(sv(i.messages[u].max,e.fullField,e.max)):o&&s&&(le.max)&&r.push(sv(i.messages[u].range,e.fullField,e.min,e.max))},Cv=function(e,t,n,r,i,a){e.required&&(!n.hasOwnProperty(e.field)||lv(t,a||e.type))&&r.push(sv(i.messages.required,e.fullField))},wv,Tv=(function(){if(wv)return wv;var e=`[a-fA-F\\d:]`,t=function(t){return t&&t.includeBoundaries?`(?:(?<=\\s|^)(?=${e})|(?<=${e})(?=\\s|\$))`:``},n=`(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}`,r=`[a-fA-F\\d]{1,4}`,i=`(?:${[`(?:${r}:){7}(?:${r}|:)`,`(?:${r}:){6}(?:${n}|:${r}|:)`,`(?:${r}:){5}(?::${n}|(?::${r}){1,2}|:)`,`(?:${r}:){4}(?:(?::${r}){0,1}:${n}|(?::${r}){1,3}|:)`,`(?:${r}:){3}(?:(?::${r}){0,2}:${n}|(?::${r}){1,4}|:)`,`(?:${r}:){2}(?:(?::${r}){0,3}:${n}|(?::${r}){1,5}|:)`,`(?:${r}:){1}(?:(?::${r}){0,4}:${n}|(?::${r}){1,6}|:)`,`(?::(?:(?::${r}){0,5}:${n}|(?::${r}){1,7}|:))`].join(`|`)})(?:%[0-9a-zA-Z]{1,})?`,a=RegExp(`(?:^${n}\$)|(?:^${i}\$)`),o=RegExp(`^${n}\$`),s=RegExp(`^${i}\$`),c=function(e){return e&&e.exact?a:RegExp(`(?:${t(e)}${n}${t(e)})|(?:${t(e)}${i}${t(e)})`,`g`)};c.v4=function(e){return e&&e.exact?o:RegExp(`${t(e)}${n}${t(e)}`,`g`)},c.v6=function(e){return e&&e.exact?s:RegExp(`${t(e)}${i}${t(e)}`,`g`)};var l=`(?:(?:(?:[a-z]+:)?//)|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|${c.v4().source}|${c.v6().source}|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?`;return wv=RegExp(`(?:^${l}\$)`,`i`),wv}),Ev={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tel:/^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Dv={integer:function(e){return Dv.number(e)&&parseInt(e,10)===e},float:function(e){return Dv.number(e)&&!Dv.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime==`function`&&typeof e.getMonth==`function`&&typeof e.getYear==`function`&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e==`number`},object:function(e){return Ms(e)===`object`&&!Dv.array(e)},method:function(e){return typeof e==`function`},email:function(e){return typeof e==`string`&&e.length<=320&&!!e.match(Ev.email)},tel:function(e){return typeof e==`string`&&e.length<=32&&!!e.match(Ev.tel)},url:function(e){return typeof e==`string`&&e.length<=2048&&!!e.match(Tv())},hex:function(e){return typeof e==`string`&&!!e.match(Ev.hex)}},Ov={required:Cv,whitespace:function(e,t,n,r,i){(/^\s+$/.test(t)||t===``)&&r.push(sv(i.messages.whitespace,e.fullField))},type:function(e,t,n,r,i){if(e.required&&t===void 0){Cv(e,t,n,r,i);return}var a=[`integer`,`float`,`array`,`regexp`,`object`,`method`,`email`,`tel`,`number`,`date`,`url`,`hex`],o=e.type;a.indexOf(o)>-1?Dv[o](t)||r.push(sv(i.messages.types[o],e.fullField,e.type)):o&&Ms(t)!==e.type&&r.push(sv(i.messages.types[o],e.fullField,e.type))},range:Sv,enum:bv,pattern:xv},kv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t)&&!e.required)return n();Ov.required(e,t,r,a,i)}n(a)},Av=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t==null&&!e.required)return n();Ov.required(e,t,r,a,i,`array`),t!=null&&(Ov.type(e,t,r,a,i),Ov.range(e,t,r,a,i))}n(a)},jv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t)&&!e.required)return n();Ov.required(e,t,r,a,i),t!==void 0&&Ov.type(e,t,r,a,i)}n(a)},Mv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t,`date`)&&!e.required)return n();if(Ov.required(e,t,r,a,i),!lv(t,`date`)){var o=t instanceof Date?t:new Date(t);Ov.type(e,o,r,a,i),o&&Ov.range(e,o.getTime(),r,a,i)}}n(a)},Nv=`enum`,Pv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t)&&!e.required)return n();Ov.required(e,t,r,a,i),t!==void 0&&Ov[Nv](e,t,r,a,i)}n(a)},Fv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t)&&!e.required)return n();Ov.required(e,t,r,a,i),t!==void 0&&(Ov.type(e,t,r,a,i),Ov.range(e,t,r,a,i))}n(a)},Iv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t)&&!e.required)return n();Ov.required(e,t,r,a,i),t!==void 0&&(Ov.type(e,t,r,a,i),Ov.range(e,t,r,a,i))}n(a)},Lv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t)&&!e.required)return n();Ov.required(e,t,r,a,i),t!==void 0&&Ov.type(e,t,r,a,i)}n(a)},Rv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t===``&&(t=void 0),lv(t)&&!e.required)return n();Ov.required(e,t,r,a,i),t!==void 0&&(Ov.type(e,t,r,a,i),Ov.range(e,t,r,a,i))}n(a)},zv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t)&&!e.required)return n();Ov.required(e,t,r,a,i),t!==void 0&&Ov.type(e,t,r,a,i)}n(a)},Bv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t,`string`)&&!e.required)return n();Ov.required(e,t,r,a,i),lv(t,`string`)||Ov.pattern(e,t,r,a,i)}n(a)},Vv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t)&&!e.required)return n();Ov.required(e,t,r,a,i),lv(t)||Ov.type(e,t,r,a,i)}n(a)},Hv=function(e,t,n,r,i){var a=[],o=Array.isArray(t)?`array`:Ms(t);Ov.required(e,t,r,a,i,o),n(a)},Uv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t,`string`)&&!e.required)return n();Ov.required(e,t,r,a,i,`string`),lv(t,`string`)||(Ov.type(e,t,r,a,i),Ov.range(e,t,r,a,i),Ov.pattern(e,t,r,a,i),e.whitespace===!0&&Ov.whitespace(e,t,r,a,i))}n(a)},Wv=function(e,t,n,r,i){var a=e.type,o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t,a)&&!e.required)return n();Ov.required(e,t,r,o,i,a),lv(t,a)||Ov.type(e,t,r,o,i)}n(o)},Gv={string:Uv,method:Lv,number:Rv,boolean:jv,regexp:Vv,integer:Iv,float:Fv,array:Av,object:zv,enum:Pv,pattern:Bv,date:Mv,url:Wv,hex:Wv,email:Wv,tel:Wv,required:Hv,any:kv},Kv=function(){function e(t){Hs(this,e),zs(this,`rules`,null),zs(this,`_messages`,ev),this.define(t)}return Ws(e,[{key:`define`,value:function(e){var t=this;if(!e)throw Error(`Cannot configure a schema with no rules`);if(Ms(e)!==`object`||Array.isArray(e))throw Error(`Rules must be an object`);this.rules={},Object.keys(e).forEach(function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]})}},{key:`messages`,value:function(e){return e&&(this._messages=vv($_(),e)),this._messages}},{key:`validate`,value:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=t,o=r,s=i;if(typeof o==`function`&&(s=o,o={}),!this.rules||Object.keys(this.rules).length===0)return s&&s(null,a),Promise.resolve(a);function c(e){var t=[],n={};function r(e){if(Array.isArray(e)){var n;t=(n=t).concat.apply(n,da(e))}else t.push(e)}for(var i=0;i0&&arguments[0]!==void 0?arguments[0]:[],l=Array.isArray(c)?c:[c];!o.suppressWarning&&l.length&&e.warning(`async-validator:`,l),l.length&&r.message!==void 0&&r.message!==null&&(l=[].concat(r.message));var u=l.map(_v(r,a));if(o.first&&u.length)return d[r.field]=1,n(u);if(!i)n(u);else{if(r.required&&!t.value)return r.message===void 0?o.error&&(u=[o.error(r,sv(o.messages.required,r.field))]):u=[].concat(r.message).map(_v(r,a)),n(u);var f={};r.defaultField&&Object.keys(t.value).map(function(e){f[e]=r.defaultField}),f=Vs(Vs({},f),t.rule.fields);var p={};Object.keys(f).forEach(function(e){var t=f[e];p[e]=(Array.isArray(t)?t:[t]).map(s.bind(null,e))});var m=new e(p);m.messages(o.messages),t.rule.options&&(t.rule.options.messages=o.messages,t.rule.options.error=o.error),m.validate(t.value,t.rule.options||o,function(e){var t=[];u&&u.length&&t.push.apply(t,da(u)),e&&e.length&&t.push.apply(t,da(e)),n(t.length?t:null)})}}var l;if(r.asyncValidator)l=r.asyncValidator(r,t.value,c,t.source,o);else if(r.validator){try{l=r.validator(r,t.value,c,t.source,o)}catch(e){var u,f;(u=(f=console).error)==null||u.call(f,e),o.suppressValidatorError||setTimeout(function(){throw e},0),c(e.message)}l===!0?c():l===!1?c(typeof r.message==`function`?r.message(r.fullField||r.field):r.message||`${r.fullField||r.field} fails`):l instanceof Array?c(l):l instanceof Error&&c(l.message)}l&&l.then&&l.then(function(){return c()},function(e){return c(e)})},function(e){c(e)},a)}},{key:`getType`,value:function(e){if(e.type===void 0&&e.pattern instanceof RegExp&&(e.type=`pattern`),typeof e.validator!=`function`&&e.type&&!Gv.hasOwnProperty(e.type))throw Error(sv(`Unknown rule type %s`,e.type));return e.type||`string`}},{key:`getValidationMethod`,value:function(e){if(typeof e.validator==`function`)return e.validator;var t=Object.keys(e),n=t.indexOf(`message`);return n!==-1&&t.splice(n,1),t.length===1&&t[0]===`required`?Gv.required:Gv[this.getType(e)]||void 0}}]),e}();zs(Kv,`register`,function(e,t){if(typeof t!=`function`)throw Error(`Cannot register a validator by type, validator is not a function`);Gv[e]=t}),zs(Kv,`warning`,av),zs(Kv,`messages`,ev),zs(Kv,`validators`,Gv);var qv="'${name}' is not a valid ${type}",Jv={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:qv,method:qv,array:qv,object:qv,number:qv,date:qv,boolean:qv,integer:qv,float:qv,regexp:qv,email:qv,tel:qv,url:qv,hex:qv},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},Yv=Kv;function Xv(e,t){return e.replace(/\\?\$\{\w+\}/g,e=>e.startsWith(`\\`)?e.slice(1):t[e.slice(2,-1)])}var Zv=`CODE_LOGIC_ERROR`;async function Qv(e,t,n,r,i){let a={...n};if(delete a.ruleIndex,Yv.warning=()=>void 0,a.validator){let e=a.validator;a.validator=(...t)=>{try{return e(...t)}catch(e){return console.error(e),Promise.reject(Zv)}}}let o=null;a&&a.type===`array`&&a.defaultField&&(o=a.defaultField,delete a.defaultField);let s=new Yv({[e]:[a]}),c=Fi(Jv,r.validateMessages);s.messages(c);let l=[];try{await Promise.resolve(s.validate({[e]:t},{...r}))}catch(e){e.errors&&(l=e.errors.map(({message:e},t)=>{let n=e===Zv?c.default:e;return S.isValidElement(n)?S.cloneElement(n,{key:`error_${t}`}):n}))}if(!l.length&&o&&Array.isArray(t)&&t.length>0)return(await Promise.all(t.map((t,n)=>Qv(`${e}.${n}`,t,o,r,i)))).reduce((e,t)=>[...e,...t],[]);let u={...n,name:e,enum:(n.enum||[]).join(`, `),...i};return l.map(e=>typeof e==`string`?Xv(e,u):e)}function $v(e,t,n,r,i,a){let o=e.join(`.`),s=n.map((e,t)=>{let n=e.validator,r={...e,ruleIndex:t};return n&&(r.validator=(e,t,r)=>{let i=!1,a=n(e,t,(...e)=>{Promise.resolve().then(()=>{li(!i,"Your validator function has already return a promise. `callback` will be ignored."),i||r(...e)})});i=a&&typeof a.then==`function`&&typeof a.catch==`function`,li(i,"`callback` is deprecated. Please return a promise instead."),i&&a.then(()=>{r()}).catch(e=>{r(e||` `)})}),r}).sort(({warningOnly:e,ruleIndex:t},{warningOnly:n,ruleIndex:r})=>!!e==!!n?t-r:e?1:-1),c;if(i===!0)c=new Promise(async(e,n)=>{for(let e=0;eQv(o,t,e,r,a).then(t=>({errors:t,rule:e})));c=(i?ty(e):ey(e)).then(e=>Promise.reject(e))}return c.catch(e=>e),c}async function ey(e){return Promise.all(e).then(e=>[].concat(...e))}async function ty(e){let t=0;return new Promise(n=>{e.forEach(r=>{r.then(r=>{r.errors.length&&n([r]),t+=1,t===e.length&&n([])})})})}function ny(e){return Z_(e)}function ry(e,t){let n={};return t.forEach(t=>{let r=Oi(e,t);n=Ai(n,t,r)}),n}function iy(e,t,n=!1){return e&&e.some(e=>ay(t,e,n))}function ay(e,t,n=!1){return!e||!t||!n&&e.length!==t.length?!1:t.every((t,n)=>e[n]===t)}function oy(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(e),r=Object.keys(t);return[...new Set([...n,...r])].every(n=>{let r=e[n],i=t[n];return typeof r==`function`&&typeof i==`function`?!0:r===i})}function sy(e,...t){let n=t[0];return n&&n.target&&typeof n.target==`object`&&e in n.target?n.target[e]:n}function cy(e,t,n){let{length:r}=e;if(t<0||t>=r||n<0||n>=r)return e;let i=e[t],a=t-n;return a>0?[...e.slice(0,n),i,...e.slice(n,t),...e.slice(t+1,r)]:a<0?[...e.slice(0,t),...e.slice(t+1,n+1),i,...e.slice(n+1,r)]:e}var ly=e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},uy=class{namePathList=[];taskId=0;watcherList=new Set;form;constructor(e){this.form=e}register(e){return this.watcherList.add(e),()=>{this.watcherList.delete(e)}}notify(e){e.forEach(e=>{this.namePathList.every(t=>!ay(t,e))&&this.namePathList.push(e)}),this.doBatch()}doBatch(){this.taskId+=1;let e=this.taskId;ly(()=>{if(e===this.taskId&&this.watcherList.size){let e=this.form.getForm(),t=e.getFieldsValue(),n=e.getFieldsValue(!0);this.watcherList.forEach(e=>{e(t,n,this.namePathList)}),this.namePathList=[]}})}};async function dy(){return new Promise(e=>{ly(()=>{Ei(()=>{e()})})})}function fy(){return fy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{preserve:e,isListField:t,name:n}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(t,e,ny(n)),this.cancelRegisterFunc=null};getNamePath=()=>{let{name:e,fieldContext:t}=this.props,{prefixName:n=[]}=t;return e===void 0?[]:[...n,...e]};getRules=()=>{let{rules:e=[],fieldContext:t}=this.props;return e.map(e=>typeof e==`function`?e(t):e)};reRender(){this.mounted&&this.forceUpdate()}refresh=()=>{this.mounted&&this.setState(({resetCount:e})=>({resetCount:e+1}))};metaCache=null;triggerMetaEvent=e=>{let{onMetaChange:t}=this.props;if(t){let n={...this.getMeta(),destroy:e};di(this.metaCache,n)||t(n),this.metaCache=n}else this.metaCache=null};onStoreChange=(e,t,n)=>{let{shouldUpdate:r,dependencies:i=[],onReset:a}=this.props,{store:o}=n,s=this.getNamePath(),c=this.getValue(e),l=this.getValue(o),u=t&&iy(t,s);switch(n.type===`valueUpdate`&&n.source===`external`&&!di(c,l)&&(this.touched=!0,this.dirty=!0,this.validatePromise=null,this.errors=py,this.warnings=my,this.triggerMetaEvent()),n.type){case`reset`:if(!t||u){this.touched=!1,this.dirty=!1,this.validatePromise=void 0,this.errors=py,this.warnings=my,this.triggerMetaEvent(),a?.(),this.refresh();return}break;case`remove`:if(r&&hy(r,e,o,c,l,n)){this.reRender();return}break;case`setField`:{let{data:i}=n;if(u){`touched`in i&&(this.touched=i.touched),`validating`in i&&!(`originRCField`in i)&&(this.validatePromise=i.validating?Promise.resolve([]):null),`errors`in i&&(this.errors=i.errors||py),`warnings`in i&&(this.warnings=i.warnings||my),this.dirty=!0,this.triggerMetaEvent(),this.reRender();return}else if(`value`in i&&iy(t,s,!0)){this.reRender();return}if(r&&!s.length&&hy(r,e,o,c,l,n)){this.reRender();return}break}case`dependenciesUpdate`:if(i.map(ny).some(e=>iy(n.relatedFields,e))){this.reRender();return}break;default:if(u||(!i.length||s.length||r)&&hy(r,e,o,c,l,n)){this.reRender();return}break}r===!0&&this.reRender()};validateRules=e=>{let t=this.getNamePath(),n=this.getValue(),{triggerName:r,validateOnly:i=!1,delayFrame:a}=e||{},o=Promise.resolve().then(async()=>{if(!this.mounted)return[];let{validateFirst:i=!1,messageVariables:s,validateDebounce:c}=this.props;a&&await dy();let l=this.getRules();if(r&&(l=l.filter(e=>e).filter(e=>{let{validateTrigger:t}=e;return t?Z_(t).includes(r):!0})),c&&r&&(await new Promise(e=>{setTimeout(e,c)}),this.validatePromise!==o))return[];let u=$v(t,n,l,e,i,s);return u.catch(e=>e).then((e=py)=>{if(this.validatePromise===o){this.validatePromise=null;let t=[],n=[];e.forEach?.(({rule:{warningOnly:e},errors:r=py})=>{e?n.push(...r):t.push(...r)}),this.errors=t,this.warnings=n,this.triggerMetaEvent(),this.reRender()}}),u});return i?o:(this.validatePromise=o,this.dirty=!0,this.errors=py,this.warnings=my,this.triggerMetaEvent(),this.reRender(),o)};isFieldValidating=()=>!!this.validatePromise;isFieldTouched=()=>this.touched;isFieldDirty=()=>{if(this.dirty||this.props.initialValue!==void 0)return!0;let{fieldContext:e}=this.props,{getInitialValue:t}=e.getInternalHooks(q_);return t(this.getNamePath())!==void 0};getErrors=()=>this.errors;getWarnings=()=>this.warnings;isListField=()=>this.props.isListField;isList=()=>this.props.isList;isPreserve=()=>this.props.preserve;getMeta=()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:this.validatePromise===null});getOnlyChild=e=>{if(typeof e==`function`){let t=this.getMeta();return{...this.getOnlyChild(e(this.getControlled(),t,this.props.fieldContext)),isFunction:!0}}let t=Di(e);return t.length!==1||!S.isValidElement(t[0])?{child:t,isFunction:!1}:{child:t[0],isFunction:!1}};getValue=e=>{let{getFieldsValue:t}=this.props.fieldContext,n=this.getNamePath();return Oi(e||t(!0),n)};getControlled=(e={})=>{let{name:t,trigger:n=`onChange`,validateTrigger:r,getValueFromEvent:i,normalize:a,valuePropName:o=`value`,getValueProps:s,fieldContext:c}=this.props,l=r===void 0?c.validateTrigger:r,u=this.getNamePath(),{getInternalHooks:d,getFieldsValue:f}=c,{dispatch:p}=d(q_),m=this.getValue(),h=s||(e=>({[o]:e})),g=e[n],_=t===void 0?{}:h(m),v={...e,..._};return v[n]=(...e)=>{this.touched=!0,this.dirty=!0,this.triggerMetaEvent();let t;t=i?i(...e):sy(o,...e),a&&(t=a(t,m,f(!0))),t!==m&&p({type:`updateValue`,namePath:u,value:t}),g&&g(...e)},Z_(l||[]).forEach(e=>{let t=v[e];v[e]=(...n)=>{t&&t(...n);let{rules:r}=this.props;r&&r.length&&p({type:`validateField`,namePath:u,triggerName:e})}}),v};render(){let{resetCount:e}=this.state,{children:t}=this.props,{child:n,isFunction:r}=this.getOnlyChild(t),i;return r?i=n:S.isValidElement(n)?i=S.cloneElement(n,this.getControlled(n.props)):(li(!n,"`children` of Field is not validate ReactElement."),i=n),S.createElement(S.Fragment,{key:e},i)}};function _y({name:e,...t}){let n=S.useContext(Y_),r=S.useContext(X_),i=e===void 0?void 0:ny(e),a=t.isListField??!!r,o=`keep`;return a||(o=`_${(i||[]).join(`_`)}`),S.createElement(gy,fy({key:o,name:i,isListField:a},t,{fieldContext:n}))}function vy({name:e,initialValue:t,children:n,rules:r,validateTrigger:i,isListField:a}){let o=S.useContext(Y_),s=S.useContext(X_),c=S.useRef({keys:[],id:0}).current,l=S.useMemo(()=>[...ny(o.prefixName)||[],...ny(e)],[o.prefixName,e]),u=S.useMemo(()=>({...o,prefixName:l}),[o,l]),d=S.useMemo(()=>({getKey:e=>{let t=l.length,n=e[t];return[c.keys[n],e.slice(t+1)]}}),[c,l]);return typeof n==`function`?S.createElement(X_.Provider,{value:d},S.createElement(Y_.Provider,{value:u},S.createElement(_y,{name:[],shouldUpdate:(e,t,{source:n})=>n===`internal`?!1:e!==t,rules:r,validateTrigger:i,initialValue:t,isList:!0,isListField:a??!!s},({value:e=[],onChange:t},r)=>{let{getFieldValue:i}=o,a=()=>i(l||[])||[],s={add:(e,n)=>{let r=a();n>=0&&n<=r.length?(c.keys=[...c.keys.slice(0,n),c.id,...c.keys.slice(n)],t([...r.slice(0,n),e,...r.slice(n)])):(c.keys=[...c.keys,c.id],t([...r,e])),c.id+=1},remove:e=>{let n=a(),r=new Set(Array.isArray(e)?e:[e]);r.size<=0||(c.keys=c.keys.filter((e,t)=>!r.has(t)),t(n.filter((e,t)=>!r.has(t))))},move(e,n){if(e===n)return;let r=a();e<0||e>=r.length||n<0||n>=r.length||(c.keys=cy(c.keys,e,n),t(cy(r,e,n)))}},u=e||[];return Array.isArray(u)||(u=[]),n(u.map((e,t)=>{let n=c.keys[t];return n===void 0&&(c.keys[t]=c.id,n=c.keys[t],c.id+=1),{name:t,key:n,isListField:!0}}),s,r)}))):(li(!1,`Form.List only accepts function as children.`),null)}function yy(e){let t=!1,n=e.length,r=[];return e.length?new Promise((i,a)=>{e.forEach((e,o)=>{e.catch(e=>(t=!0,e)).then(e=>{--n,r[o]=e,!(n>0)&&(t&&a(r),i(r))})})}):Promise.resolve([])}var by=`__@field_split__`;function xy(e){return e.map(e=>`${typeof e}:${e}`).join(by)}var Sy=class{kvs=new Map;set(e,t){this.kvs.set(xy(e),t)}get(e){return this.kvs.get(xy(e))}getAsPrefix(e){let t=xy(e),n=t+by,r=[],i=this.kvs.get(t);return i!==void 0&&r.push(i),this.kvs.forEach((e,t)=>{t.startsWith(n)&&r.push(e)}),r}update(e,t){let n=t(this.get(e));n?this.set(e,n):this.delete(e)}delete(e){this.kvs.delete(xy(e))}map(e){return[...this.kvs.entries()].map(([t,n])=>e({key:t.split(by).map(e=>{let[,t,n]=e.match(/^([^:]*):(.*)$/);return t===`number`?Number(n):n}),value:n}))}toJSON(){let e={};return this.map(({key:t,value:n})=>(e[t.join(`.`)]=n,null)),e}},Cy=class{formHooked=!1;forceRootUpdate;subscribable=!0;store={};fieldEntities=[];initialValues={};callbacks={};validateMessages=null;preserve=null;lastValidatePromise=null;watcherCenter=new uy(this);constructor(e){this.forceRootUpdate=e}getForm=()=>({getFieldValue:this.getFieldValue,getFieldsValue:this.getFieldsValue,getFieldError:this.getFieldError,getFieldWarning:this.getFieldWarning,getFieldsError:this.getFieldsError,isFieldsTouched:this.isFieldsTouched,isFieldTouched:this.isFieldTouched,isFieldValidating:this.isFieldValidating,isFieldsValidating:this.isFieldsValidating,resetFields:this.resetFields,setFields:this.setFields,setFieldValue:this.setFieldValue,setFieldsValue:this.setFieldsValue,validateFields:this.validateFields,submit:this.submit,_init:!0,getInternalHooks:this.getInternalHooks});getInternalHooks=e=>e===`RC_FORM_INTERNAL_HOOKS`?(this.formHooked=!0,{dispatch:this.dispatch,initEntityValue:this.initEntityValue,registerField:this.registerField,useSubscribe:this.useSubscribe,setInitialValues:this.setInitialValues,destroyForm:this.destroyForm,setCallbacks:this.setCallbacks,setValidateMessages:this.setValidateMessages,getFields:this.getFields,setPreserve:this.setPreserve,getInitialValue:this.getInitialValue,registerWatch:this.registerWatch}):(li(!1,"`getInternalHooks` is internal usage. Should not call directly."),null);useSubscribe=e=>{this.subscribable=e};prevWithoutPreserves=null;setInitialValues=(e,t)=>{if(this.initialValues=e||{},t){let t=Fi(e,this.store);this.prevWithoutPreserves?.map(({key:n})=>{t=Ai(t,n,Oi(e,n))}),this.prevWithoutPreserves=null,this.updateStore(t)}};destroyForm=e=>{if(e)this.updateStore({});else{let e=new Sy;this.getFieldEntities(!0).forEach(t=>{this.isMergedPreserve(t.isPreserve())||e.set(t.getNamePath(),!0)}),this.prevWithoutPreserves=e}};getInitialValue=e=>{let t=Oi(this.initialValues,e);return e.length?Fi(t):t};setCallbacks=e=>{this.callbacks=e};setValidateMessages=e=>{this.validateMessages=e};setPreserve=e=>{this.preserve=e};registerWatch=e=>this.watcherCenter.register(e);notifyWatch=(e=[])=>{this.watcherCenter.notify(e)};timeoutId=null;warningUnhooked=()=>{};updateStore=e=>{this.store=e};getFieldEntities=(e=!1)=>e?this.fieldEntities.filter(e=>e.getNamePath().length):this.fieldEntities;getFieldsMap=(e=!1)=>{let t=new Sy;return this.getFieldEntities(e).forEach(e=>{let n=e.getNamePath();t.set(n,e)}),t};getFieldEntitiesForNamePathList=(e,t=!1)=>{if(!e)return this.getFieldEntities(!0);let n=this.getFieldsMap(!0);return t?e.flatMap(e=>{let t=ny(e),r=n.getAsPrefix(t);return r.length?r:[{INVALIDATE_NAME_PATH:t}]}):e.map(e=>{let t=ny(e);return n.get(t)||{INVALIDATE_NAME_PATH:ny(e)}})};getFieldsValue=(e,t)=>{this.warningUnhooked();let n,r;if(e===!0||Array.isArray(e)?(n=e,r=t):e&&typeof e==`object`&&(r=e.filter),n===!0&&!r)return this.store;let i=this.getFieldEntitiesForNamePathList(Array.isArray(n)?n:null,!0),a=[],o=[];i.forEach(e=>{let t=e.INVALIDATE_NAME_PATH||e.getNamePath();if(e.isList?.()){o.push(t);return}if(!r)a.push(t);else{let n=`getMeta`in e?e.getMeta():null;r(n)&&a.push(t)}});let s=ry(this.store,a.map(ny));return o.forEach(e=>{Oi(s,e)||(s=Ai(s,e,[]))}),s};getFieldValue=e=>{this.warningUnhooked();let t=ny(e);return Oi(this.store,t)};getFieldsError=e=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(e).map((t,n)=>t&&!t.INVALIDATE_NAME_PATH?{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}:{name:ny(e[n]),errors:[],warnings:[]}));getFieldError=e=>{this.warningUnhooked();let t=ny(e);return this.getFieldsError([t])[0].errors};getFieldWarning=e=>{this.warningUnhooked();let t=ny(e);return this.getFieldsError([t])[0].warnings};isFieldsTouched=(...e)=>{this.warningUnhooked();let[t,n]=e,r,i=!1;e.length===0?r=null:e.length===1?Array.isArray(t)?(r=t.map(ny),i=!1):(r=null,i=t):(r=t.map(ny),i=n);let a=this.getFieldEntities(!0),o=e=>e.isFieldTouched();if(!r)return i?a.every(e=>o(e)||e.isList()):a.some(o);let s=new Sy;r.forEach(e=>{s.set(e,[])}),a.forEach(e=>{let t=e.getNamePath();r.forEach(n=>{n.every((e,n)=>t[n]===e)&&s.update(n,t=>[...t,e])})});let c=e=>e.some(o),l=s.map(({value:e})=>e);return i?l.every(c):l.some(c)};isFieldTouched=e=>(this.warningUnhooked(),this.isFieldsTouched([e]));isFieldsValidating=e=>{this.warningUnhooked();let t=this.getFieldEntities();if(!e)return t.some(e=>e.isFieldValidating());let n=e.map(ny);return t.some(e=>iy(n,e.getNamePath())&&e.isFieldValidating())};isFieldValidating=e=>(this.warningUnhooked(),this.isFieldsValidating([e]));resetWithFieldInitialValue=(e={})=>{let t=new Sy,n=this.getFieldEntities(!0);n.forEach(e=>{let{initialValue:n}=e.props,r=e.getNamePath();if(n!==void 0){let i=t.get(r)||new Set;i.add({entity:e,value:n}),t.set(r,i)}});let r=n=>{n.forEach(n=>{let{initialValue:r}=n.props;if(r!==void 0){let r=n.getNamePath();if(this.getInitialValue(r)!==void 0)li(!1,`Form already set 'initialValues' with path '${r.join(`.`)}'. Field can not overwrite it.`);else{let i=t.get(r);if(i&&i.size>1)li(!1,`Multiple Field with path '${r.join(`.`)}' set 'initialValue'. Can not decide which one to pick.`);else if(i){let t=this.getFieldValue(r);!n.isListField()&&(!e.skipExist||t===void 0)&&this.updateStore(Ai(this.store,r,[...i][0].value))}}}})},i;e.entities?i=e.entities:e.namePathList?(i=[],e.namePathList.forEach(e=>{let n=t.get(e);n&&i.push(...[...n].map(e=>e.entity))})):i=n,r(i)};resetFields=e=>{this.warningUnhooked();let t=this.store;if(!e){this.updateStore(Fi(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(t,null,{type:`reset`}),this.notifyWatch();return}let n=e.map(ny);n.forEach(e=>{let t=this.getInitialValue(e);this.updateStore(Ai(this.store,e,t))}),this.resetWithFieldInitialValue({namePathList:n}),this.notifyObservers(t,n,{type:`reset`}),this.notifyWatch(n)};setFields=e=>{this.warningUnhooked();let t=this.store,n=[];e.forEach(e=>{let{name:r,...i}=e,a=ny(r);n.push(a),`value`in i&&this.updateStore(Ai(this.store,a,i.value)),this.notifyObservers(t,[a],{type:`setField`,data:e})}),this.notifyWatch(n)};getFields=()=>this.getFieldEntities(!0).map(e=>{let t=e.getNamePath(),n={...e.getMeta(),name:t,value:this.getFieldValue(t)};return Object.defineProperty(n,`originRCField`,{value:!0}),n});initEntityValue=e=>{let{initialValue:t}=e.props;if(t!==void 0){let n=e.getNamePath();Oi(this.store,n)===void 0&&this.updateStore(Ai(this.store,n,t))}};isMergedPreserve=e=>(e===void 0?this.preserve:e)??!0;registerField=e=>{this.fieldEntities.push(e);let t=e.getNamePath();if(this.notifyWatch([t]),e.props.initialValue!==void 0){let t=this.store;this.resetWithFieldInitialValue({entities:[e],skipExist:!0}),this.notifyObservers(t,[e.getNamePath()],{type:`valueUpdate`,source:`internal`})}return(n,r,i=[])=>{if(this.fieldEntities=this.fieldEntities.filter(t=>t!==e),!this.isMergedPreserve(r)&&(!n||i.length>1)){let e=n?void 0:this.getInitialValue(t);if(t.length&&this.getFieldValue(t)!==e&&this.fieldEntities.every(e=>!ay(e.getNamePath(),t))){let n=this.store;this.updateStore(Ai(n,t,e,!0)),this.notifyObservers(n,[t],{type:`remove`}),this.triggerDependenciesUpdate(n,t)}}this.notifyWatch([t])}};dispatch=e=>{switch(e.type){case`updateValue`:{let{namePath:t,value:n}=e;this.updateValue(t,n);break}case`validateField`:{let{namePath:t,triggerName:n}=e;this.validateFields([t],{triggerName:n});break}default:}};notifyObservers=(e,t,n)=>{if(this.subscribable){let r={...n,store:this.getFieldsValue(!0)};this.getFieldEntities().forEach(({onStoreChange:n})=>{n(e,t,r)})}else this.forceRootUpdate()};triggerDependenciesUpdate=(e,t)=>{let n=this.getDependencyChildrenFields(t);return n.length&&this.validateFields(n,{delayFrame:!0}),this.notifyObservers(e,n,{type:`dependenciesUpdate`,relatedFields:[t,...n]}),n};updateValue=(e,t)=>{let n=ny(e),r=this.store;this.updateStore(Ai(this.store,n,t)),this.notifyObservers(r,[n],{type:`valueUpdate`,source:`internal`}),this.notifyWatch([n]);let i=this.triggerDependenciesUpdate(r,n),{onValuesChange:a}=this.callbacks;if(a){let e=ry(this.store,[n]);a(e,Ai(this.getFieldsValue(),n,Oi(e,n)))}this.triggerOnFieldsChange([n,...i])};setFieldsValue=e=>{this.warningUnhooked();let t=this.store;if(e){let t=Fi(this.store,e);this.updateStore(t)}this.notifyObservers(t,null,{type:`valueUpdate`,source:`external`}),this.notifyWatch()};setFieldValue=(e,t)=>{this.setFields([{name:e,value:t,errors:[],warnings:[],touched:!0}])};getDependencyChildrenFields=e=>{let t=new Set,n=[],r=new Sy;this.getFieldEntities().forEach(e=>{let{dependencies:t}=e.props;(t||[]).forEach(t=>{let n=ny(t);r.update(n,(t=new Set)=>(t.add(e),t))})});let i=e=>{(r.get(e)||new Set).forEach(e=>{if(!t.has(e)){t.add(e);let r=e.getNamePath();e.isFieldDirty()&&r.length&&(n.push(r),i(r))}})};return i(e),n};triggerOnFieldsChange=(e,t)=>{let{onFieldsChange:n}=this.callbacks;if(n){let r=this.getFields();if(t){let e=new Sy;t.forEach(({name:t,errors:n})=>{e.set(t,n)}),r.forEach(t=>{t.errors=e.get(t.name)||t.errors})}let i=r.filter(({name:t})=>iy(e,t));i.length&&n(i,r)}};validateFields=(e,t)=>{this.warningUnhooked();let n,r;Array.isArray(e)||typeof e==`string`||typeof t==`string`?(n=e,r=t):r=e;let i=!!n,a=i?n.map(ny):[],o=[...a],s=[],c=String(Date.now()),l=new Set,{recursive:u,dirty:d}=r||{};this.getFieldEntities(!0).forEach(e=>{let t=e.getNamePath();if(i||((!e.isList()||!a.some(e=>ay(e,t,!0)))&&o.push(t),a.push(t)),!(!e.props.rules||!e.props.rules.length)&&!(d&&!e.isFieldDirty())&&(l.add(t.join(c)),!i||iy(a,t,u))){let n=e.validateRules({validateMessages:{...Jv,...this.validateMessages},...r});s.push(n.then(()=>({name:t,errors:[],warnings:[]})).catch(e=>{let n=[],r=[];return e.forEach?.(({rule:{warningOnly:e},errors:t})=>{e?r.push(...t):n.push(...t)}),n.length?Promise.reject({name:t,errors:n,warnings:r}):{name:t,errors:n,warnings:r}}))}});let f=yy(s);this.lastValidatePromise=f,f.catch(e=>e).then(e=>{let t=e.map(({name:e})=>e);this.notifyObservers(this.store,t,{type:`validateFinish`}),this.triggerOnFieldsChange(t,e)});let p=f.then(()=>this.lastValidatePromise===f?Promise.resolve(this.getFieldsValue(o)):Promise.reject([])).catch(e=>{let t=e.filter(e=>e&&e.errors.length),n=t[0]?.errors?.[0];return Promise.reject({message:n,values:this.getFieldsValue(a),errorFields:t,outOfDate:this.lastValidatePromise!==f})});p.catch(e=>e);let m=a.filter(e=>l.has(e.join(c)));return this.triggerOnFieldsChange(m),p};submit=()=>{this.warningUnhooked(),this.validateFields().then(e=>{let{onFinish:t}=this.callbacks;if(t)try{t(e)}catch(e){console.error(e)}}).catch(e=>{let{onFinishFailed:t}=this.callbacks;t&&t(e)})}};function wy(e){let t=S.useRef(null),[,n]=S.useState({});return t.current||(e?t.current=e:t.current=new Cy(()=>{n({})}).getForm()),[t.current]}var Ty=S.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),Ey=({validateMessages:e,onFormChange:t,onFormFinish:n,children:r})=>{let i=S.useContext(Ty),a=S.useRef({});return S.createElement(Ty.Provider,{value:{...i,validateMessages:{...i.validateMessages,...e},triggerFormChange:(e,n)=>{t&&t(e,{changedFields:n,forms:a.current}),i.triggerFormChange(e,n)},triggerFormFinish:(e,t)=>{n&&n(e,{values:t,forms:a.current}),i.triggerFormFinish(e,t)},registerForm:(e,t)=>{e&&(a.current={...a.current,[e]:t}),i.registerForm(e,t)},unregisterForm:e=>{let t={...a.current};delete t[e],a.current=t,i.unregisterForm(e)}}},r)};function Dy(){return Dy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let g=S.useRef(null),_=S.useContext(Ty),[v]=wy(r),{useSubscribe:y,setInitialValues:b,setCallbacks:x,setValidateMessages:C,setPreserve:w,destroyForm:T}=v.getInternalHooks(q_);S.useImperativeHandle(h,()=>({...v,nativeElement:g.current})),S.useEffect(()=>(_.registerForm(e,v),()=>{_.unregisterForm(e)}),[_,v,e]),C({..._.validateMessages,...s}),x({onValuesChange:l,onFieldsChange:(t,...n)=>{_.triggerFormChange(e,t),u&&u(t,...n)},onFinish:t=>{_.triggerFormFinish(e,t),d&&d(t)},onFinishFailed:f}),w(i);let E=S.useRef(null);b(t,!E.current),E.current||=!0,S.useEffect(()=>()=>T(p),[]);let D,O=typeof a==`function`;D=O?a(v.getFieldsValue(!0),v):a,y(!O);let k=S.useRef(null);S.useEffect(()=>{oy(k.current||[],n||[])||v.setFields(n||[]),k.current=n},[n,v]);let A=S.useMemo(()=>({...v,validateTrigger:c}),[v,c]),j=S.createElement(X_.Provider,{value:null},S.createElement(Y_.Provider,{value:A},D));return o===!1?j:S.createElement(o,Dy({},m,{ref:g,onSubmit:e=>{e.preventDefault(),e.stopPropagation(),v.submit()},onReset:e=>{e.preventDefault(),v.resetFields(),m.onReset?.(e)}}),j)};function ky(e){try{return JSON.stringify(e)}catch{return Math.random()}}function Ay(...e){let[t,n={}]=e,r=Q_(n)?{form:n}:n,i=r.form,[a,o]=(0,S.useState)(()=>typeof t==`function`?t({}):void 0),s=(0,S.useMemo)(()=>ky(a),[a]),c=(0,S.useRef)(s);c.current=s;let l=(0,S.useContext)(Y_),u=i||l,d=u&&u._init,{getFieldsValue:f,getInternalHooks:p}=u,{registerWatch:m}=p(q_),h=Rn((e,n)=>{let i=r.preserve?n??f(!0):e??f(),s=typeof t==`function`?t(i):Oi(i,ny(t));ky(a)!==ky(s)&&o(s)});return(0,S.useEffect)(()=>{d&&h()},[d,typeof t==`function`?t:JSON.stringify(t)]),(0,S.useEffect)(()=>{if(d)return m((e,t)=>{h(e,t)})},[d]),a}var jy=S.forwardRef(Oy);jy.FormProvider=Ey,jy.Field=_y,jy.List=vy,jy.useForm=wy,jy.useWatch=Ay;var My=S.createContext({labelAlign:`right`,layout:`horizontal`,itemRef:()=>{}}),Ny=S.createContext(null),Py=e=>{let t=hi(e,[`prefixCls`]);return S.createElement(Ey,{...t})},Fy=S.createContext({prefixCls:``}),Iy=S.createContext({}),Ly=({children:e,status:t,override:n})=>{let r=S.useContext(Iy),i=S.useMemo(()=>{let e={...r};return n&&delete e.isFormItemInput,t&&(delete e.status,delete e.hasFeedback,delete e.feedbackIcon),e},[t,n,r]);return S.createElement(Iy.Provider,{value:i},e)},Ry=S.createContext(void 0),zy=e=>{let{space:t,form:n,children:r}=e;if(!Zd(r))return null;let i=r;return n&&(i=S.createElement(Ly,{override:!0,status:!0},i)),t&&(i=S.createElement(Mh,null,i)),i},By=()=>zn()&&window.document.documentElement;function Vy(e,t,n){return(0,S.useMemo)(()=>({trap:t??!0,focusTriggerAfterClose:n??!0,...e}),[e,t,n])}var Hy=e=>{let{prefixCls:t,className:n,style:r,size:i,shape:a}=e,o=Y({[`${t}-lg`]:i===`large`,[`${t}-sm`]:i===`small`}),s=Y({[`${t}-circle`]:a===`circle`,[`${t}-square`]:a===`square`,[`${t}-round`]:a===`round`}),c=S.useMemo(()=>Qd(i)?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return S.createElement(`span`,{className:Y(t,o,s,n),style:{...c,...r}})},Uy=new As(`ant-skeleton-loading`,{"0%":{backgroundPosition:`100% 50%`},"100%":{backgroundPosition:`0 50%`}}),Wy=e=>({height:e,lineHeight:X(e)}),Gy=e=>({width:e,...Wy(e)}),cee=e=>({background:e.skeletonLoadingBackground,backgroundSize:`400% 100%`,animationName:Uy,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:`ease`,animationIterationCount:`infinite`}),Ky=(e,t)=>({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal(),...Wy(e)}),lee=e=>{let{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:i,controlHeightSM:a}=e;return{[t]:{display:`inline-block`,verticalAlign:`top`,background:n,...Gy(r)},[`${t}${t}-circle`]:{borderRadius:`50%`},[`${t}${t}-lg`]:{...Gy(i)},[`${t}${t}-sm`]:{...Gy(a)}}},uee=e=>{let{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:i,controlHeightSM:a,gradientFromColor:o,calc:s}=e;return{[r]:{display:`inline-block`,verticalAlign:`top`,background:o,borderRadius:n,...Ky(t,s)},[`${r}-lg`]:{...Ky(i,s)},[`${r}-sm`]:{...Ky(a,s)}}},qy=e=>{let{gradientFromColor:t,borderRadiusSM:n,imageSizeBase:r,calc:i}=e;return{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,verticalAlign:`middle`,background:t,borderRadius:n,...Gy(i(r).mul(2).equal())}},dee=e=>({[e.skeletonNodeCls]:{...qy(e)}}),fee=e=>{let{skeletonImageCls:t,imageSizeBase:n,calc:r}=e;return{[t]:{...qy(e),[`${t}-path`]:{fill:`#bfbfbf`},[`${t}-svg`]:{...Gy(n),maxWidth:r(n).mul(4).equal(),maxHeight:r(n).mul(4).equal()},[`${t}-svg${t}-svg-circle`]:{borderRadius:`50%`}},[`${t}${t}-circle`]:{borderRadius:`50%`}}},Jy=(e,t,n)=>{let{skeletonButtonCls:r}=e;return{[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:`50%`},[`${n}${r}-round`]:{borderRadius:t}}},Yy=(e,t)=>({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal(),...Wy(e)}),pee=e=>{let{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:i,controlHeightSM:a,gradientFromColor:o,calc:s}=e;return{[n]:{display:`inline-block`,verticalAlign:`top`,background:o,borderRadius:t,width:s(r).mul(2).equal(),minWidth:s(r).mul(2).equal(),...Yy(r,s)},...Jy(e,r,n),[`${n}-lg`]:{...Yy(i,s)},...Jy(e,i,`${n}-lg`),[`${n}-sm`]:{...Yy(a,s)},...Jy(e,a,`${n}-sm`)}},mee=e=>{let{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:i,skeletonButtonCls:a,skeletonInputCls:o,skeletonNodeCls:s,skeletonImageCls:c,controlHeight:l,controlHeightLG:u,controlHeightSM:d,gradientFromColor:f,padding:p,marginSM:m,borderRadius:h,titleHeight:g,blockRadius:_,paragraphLiHeight:v,controlHeightXS:y,paragraphMarginTop:b}=e;return{[t]:{display:`table`,width:`100%`,[`${t}-header`]:{display:`table-cell`,paddingInlineEnd:p,verticalAlign:`top`,[n]:{display:`inline-block`,verticalAlign:`top`,background:f,...Gy(l)},[`${n}-circle`]:{borderRadius:`50%`},[`${n}-lg`]:{...Gy(u)},[`${n}-sm`]:{...Gy(d)}},[`${t}-section`]:{display:`table-cell`,width:`100%`,verticalAlign:`top`,[r]:{width:`100%`,height:g,background:f,borderRadius:_,[`+ ${i}`]:{marginBlockStart:d}},[i]:{padding:0,"> li":{width:`100%`,height:v,listStyle:`none`,background:f,borderRadius:_,"+ li":{marginBlockStart:y}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:`61%`}},[`&-round ${t}-section`]:{[`${r}, ${i} > li`]:{borderRadius:h}}},[`${t}-with-avatar ${t}-section`]:{[r]:{marginBlockStart:m,[`+ ${i}`]:{marginBlockStart:b}}},[`${t}${t}-element`]:{display:`inline-block`,width:`auto`,...pee(e),...lee(e),...uee(e),...dee(e),...fee(e)},[`${t}${t}-block`]:{width:`100%`,[a]:{width:`100%`},[o]:{width:`100%`}},[`${t}${t}-active`]:{[` + `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-panel`]:{backgroundColor:i,borderTop:0},[`> ${t}-item > ${t}-panel > ${t}-body`]:{padding:r}}}},aee=e=>{let{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:`transparent`,border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-panel`]:{backgroundColor:`transparent`,border:0,[`> ${t}-body`]:{paddingBlock:n}}}}}},oee=Xl(`Collapse`,e=>{let t=lc(e,{collapseHeaderPaddingSM:`${X(e.paddingXS)} ${X(e.paddingSM)}`,collapseHeaderPaddingLG:`${X(e.padding)} ${X(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return[nee(t),iee(t),aee(t),ree(t),Jh(t)]},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`})),r_=Object.assign(S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,expandIcon:i,className:a,style:o,classNames:s,styles:c}=_a(`collapse`),{prefixCls:l,className:u,rootClassName:d,style:f,bordered:p=!0,ghost:m,size:h,expandIconPlacement:g,expandIconPosition:_,children:v,destroyInactivePanel:y,destroyOnHidden:b,expandIcon:x,classNames:C,styles:w}=e,T=Oh(e=>h??e??`middle`),E=n(`collapse`,l),D=n(),[O,k]=oee(E),A=g??_??`start`,j={...e,size:T,bordered:p,expandIconPlacement:A},[M,N]=xf([s,C],[c,w],{props:j}),P=x??i,F=S.useCallback((e={})=>cm(typeof P==`function`?P(e):S.createElement(Ug,{rotate:e.isActive?r===`rtl`?-90:90:void 0,"aria-label":e.isActive?`expanded`:`collapsed`}),e=>({className:Y(e.className,`${E}-arrow`)})),[P,E,r]),I=Y(`${E}-icon-placement-${A}`,{[`${E}-borderless`]:!p,[`${E}-rtl`]:r===`rtl`,[`${E}-ghost`]:!!m,[`${E}-large`]:T===`large`,[`${E}-small`]:T===`small`},a,u,d,O,k,M.root),L=S.useMemo(()=>({..._h(D),motionAppear:!1,leavedClassName:`${E}-panel-hidden`}),[D,E]),R=S.useMemo(()=>v?Di(v).map(e=>e):null,[v]);return S.createElement(t_,{ref:t,openMotion:L,...hi(e,[`rootClassName`]),expandIcon:F,prefixCls:E,className:I,style:{...N.root,...o,...f},classNames:M,styles:N,destroyOnHidden:b??y},R)}),{Panel:n_}),see=e=>e instanceof Bg?e:new Bg(e),i_=(e,t)=>{let{r:n,g:r,b:i,a}=e.toRgb(),o=new Lg(e.toRgbString()).onBackground(t).toHsv();return a<=.5?o.v>.5:n*.299+r*.587+i*.114>192},a_=e=>{let{paddingInline:t,onlyIconSize:n,borderColorDisabled:r}=e;return lc(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n,colorBorderDisabled:r})},o_=e=>{let t=e.contentFontSize??e.fontSize,n=e.contentFontSizeSM??e.fontSize,r=e.contentFontSizeLG??e.fontSizeLG,i=e.contentLineHeight??xc(t),a=e.contentLineHeightSM??xc(n),o=e.contentLineHeightLG??xc(r),s=i_(new Bg(e.colorBgSolid),`#fff`)?`#000`:`#fff`,c=bc.reduce((t,n)=>({...t,[`${n}ShadowColor`]:`0 ${X(e.controlOutlineWidth)} 0 ${Nl(e[`${n}1`],e.colorBgContainer)}`}),{}),l=e.colorBgContainerDisabled,u=e.colorBgContainerDisabled;return{...c,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:`transparent`,defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:`inherit`,onlyIconSizeSM:`inherit`,onlyIconSizeLG:`inherit`,groupBorderColor:e.colorPrimaryHover,linkHoverBg:`transparent`,textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:s,contentFontSize:t,contentFontSizeSM:n,contentFontSizeLG:r,contentLineHeight:i,contentLineHeightSM:a,contentLineHeightLG:o,paddingBlock:Math.max((e.controlHeight-t*i)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-n*a)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-r*o)/2-e.lineWidth,0),defaultBgDisabled:l,dashedBgDisabled:u}},s_=e=>{let{componentCls:t,antCls:n,lineWidth:r}=e,[i,a]=$l(n,`btn`);return{[t]:[{[i(`border-width`)]:r,[i(`border-color`)]:`#000`,[i(`border-color-hover`)]:a(`border-color`),[i(`border-color-active`)]:a(`border-color`),[i(`border-color-disabled`)]:a(`border-color`),[i(`border-style`)]:`solid`,[i(`text-color`)]:`#000`,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`),[i(`text-color-disabled`)]:a(`text-color`),[i(`bg-color`)]:`#ddd`,[i(`bg-color-hover`)]:a(`bg-color`),[i(`bg-color-active`)]:a(`bg-color`),[i(`bg-color-disabled`)]:e.colorBgContainerDisabled,[i(`bg-color-container`)]:e.colorBgContainer,[i(`shadow`)]:`none`},{border:[a(`border-width`),a(`border-style`),a(`border-color`)].join(` `),color:a(`text-color`),backgroundColor:a(`bg-color`),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[a(`border-width`),a(`border-style`),a(`border-color-hover`)].join(` `),color:a(`text-color-hover`),backgroundColor:a(`bg-color-hover`)},"&:active":{border:[a(`border-width`),a(`border-style`),a(`border-color-active`)].join(` `),color:a(`text-color-active`),backgroundColor:a(`bg-color-active`)}}},{[`&${t}-variant-solid`]:{[i(`solid-bg-color`)]:a(`color-base`),[i(`solid-bg-color-hover`)]:a(`color-hover`),[i(`solid-bg-color-active`)]:a(`color-active`),[i(`border-color`)]:`transparent`,[i(`text-color`)]:e.colorTextLightSolid,[i(`bg-color`)]:a(`solid-bg-color`),[i(`bg-color-hover`)]:a(`solid-bg-color-hover`),[i(`bg-color-active`)]:a(`solid-bg-color-active`),boxShadow:a(`shadow`)},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`border-color`)]:a(`color-base`),[i(`border-color-hover`)]:a(`color-hover`),[i(`border-color-active`)]:a(`color-active`),[i(`bg-color`)]:a(`bg-color-container`),[i(`text-color`)]:a(`color-base`),[i(`text-color-hover`)]:a(`color-hover`),[i(`text-color-active`)]:a(`color-active`),boxShadow:a(`shadow`)},[`&${t}-variant-dashed`]:{[i(`border-style`)]:`dashed`,[i(`bg-color-disabled`)]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[i(`border-color`)]:`transparent`,[i(`text-color`)]:a(`color-base`),[i(`bg-color`)]:a(`color-light`),[i(`bg-color-hover`)]:a(`color-light-hover`),[i(`bg-color-active`)]:a(`color-light-active`)},[`&${t}-variant-text, &${t}-variant-link`]:{[i(`border-color`)]:`transparent`,[i(`text-color`)]:a(`color-base`),[i(`text-color-hover`)]:a(`color-hover`),[i(`text-color-active`)]:a(`color-active`),[i(`bg-color`)]:`transparent`,[i(`bg-color-hover`)]:`transparent`,[i(`bg-color-active`)]:`transparent`,[`&:disabled, &${e.componentCls}-disabled`]:{background:`transparent`,borderColor:`transparent`}},[`&${t}-variant-text`]:{[i(`bg-color-hover`)]:a(`color-light`),[i(`bg-color-active`)]:a(`color-light-active`)}},{[`&${t}-variant-link`]:{[i(`color-base`)]:e.colorLink,[i(`color-hover`)]:e.colorLinkHover,[i(`color-active`)]:e.colorLinkActive,[i(`bg-color-hover`)]:e.linkHoverBg},[`&${t}-color-primary`]:{[i(`color-base`)]:e.colorPrimary,[i(`color-hover`)]:e.colorPrimaryHover,[i(`color-active`)]:e.colorPrimaryActive,[i(`color-light`)]:e.colorPrimaryBg,[i(`color-light-hover`)]:e.colorPrimaryBgHover,[i(`color-light-active`)]:e.colorPrimaryBorder,[i(`shadow`)]:e.primaryShadow,[`&${t}-variant-solid`]:{[i(`text-color`)]:e.primaryColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)}},[`&${t}-color-dangerous`]:{[i(`color-base`)]:e.colorError,[i(`color-hover`)]:e.colorErrorHover,[i(`color-active`)]:e.colorErrorActive,[i(`color-light`)]:e.colorErrorBg,[i(`color-light-hover`)]:e.colorErrorBgFilledHover,[i(`color-light-active`)]:e.colorErrorBgActive,[i(`shadow`)]:e.dangerShadow,[`&${t}-variant-solid`]:{[i(`text-color`)]:e.dangerColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)}},[`&${t}-color-default`]:{[i(`solid-bg-color`)]:e.colorBgSolid,[i(`solid-bg-color-hover`)]:e.colorBgSolidHover,[i(`solid-bg-color-active`)]:e.colorBgSolidActive,[i(`color-base`)]:e.defaultBorderColor,[i(`color-hover`)]:e.defaultHoverBorderColor,[i(`color-active`)]:e.defaultActiveBorderColor,[i(`color-light`)]:e.colorFillTertiary,[i(`color-light-hover`)]:e.colorFillSecondary,[i(`color-light-active`)]:e.colorFill,[i(`text-color`)]:e.defaultColor,[i(`text-color-hover`)]:e.defaultHoverColor,[i(`text-color-active`)]:e.defaultActiveColor,[i(`shadow`)]:e.defaultShadow,[`&${t}-variant-outlined`]:{[i(`bg-color-disabled`)]:e.defaultBgDisabled},[`&${t}-variant-solid`]:{[i(`text-color`)]:e.solidTextColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)},[`&${t}-variant-filled, &${t}-variant-text`]:{[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`text-color`)]:e.defaultColor,[i(`text-color-hover`)]:e.defaultHoverColor,[i(`text-color-active`)]:e.defaultActiveColor,[i(`bg-color-container`)]:e.defaultBg,[i(`bg-color-hover`)]:e.defaultHoverBg,[i(`bg-color-active`)]:e.defaultActiveBg},[`&${t}-variant-text`]:{[i(`text-color`)]:e.textTextColor,[i(`text-color-hover`)]:e.textTextHoverColor,[i(`text-color-active`)]:e.textTextActiveColor,[i(`bg-color-hover`)]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`text-color`)]:e.defaultGhostColor,[i(`border-color`)]:e.defaultGhostBorderColor}}}},bc.map(n=>{let r=e[`${n}6`],a=e[`${n}1`],o=e[`${n}Hover`],s=e[`${n}2`],c=e[`${n}3`],l=e[`${n}Active`],u=e[`${n}ShadowColor`];return{[`&${t}-color-${n}`]:{[i(`color-base`)]:r,[i(`color-hover`)]:o,[i(`color-active`)]:l,[i(`color-light`)]:a,[i(`color-light-hover`)]:s,[i(`color-light-active`)]:c,[i(`shadow`)]:u}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:`not-allowed`,borderColor:e.colorBorderDisabled,background:a(`bg-color-disabled`),color:e.colorTextDisabled,boxShadow:`none`}},{[`&${t}-background-ghost`]:{[i(`bg-color`)]:e.ghostBg,[i(`bg-color-hover`)]:e.ghostBg,[i(`bg-color-active`)]:e.ghostBg,[i(`shadow`)]:`none`,[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`bg-color-hover`)]:e.ghostBg,[i(`bg-color-active`)]:e.ghostBg}}}]}},c_=e=>{let{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:i,motionDurationSlow:a,motionEaseInOut:o,iconGap:s,calc:c}=e;return{[t]:{outline:`none`,position:`relative`,display:`inline-flex`,gap:s,alignItems:`center`,justifyContent:`center`,fontWeight:r,whiteSpace:`nowrap`,textAlign:`center`,backgroundImage:`none`,cursor:`pointer`,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:`none`,touchAction:`manipulation`,...vg(),"&:disabled > *":{pointerEvents:`none`},[`${t}-icon > svg`]:Hl(),"> a":{color:`currentColor`},"&:not(:disabled)":Gl(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:`0.34em`},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:`-0.34em`,letterSpacing:`0.34em`},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:`none`}},[`&${t}-loading`]:{opacity:i,cursor:`default`},[`${t}-loading-icon`]:{transition:[`width`,`opacity`,`margin`].map(e=>`${e} ${a} ${o}`).join(`,`)},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:c(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:c(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:`row-reverse`,[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:c(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:c(s).mul(-1).equal()}}}}}},l_=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:`50%`}),u_=(e,t=``)=>{let{componentCls:n,controlHeight:r,fontSize:i,borderRadius:a,buttonPaddingHorizontal:o,iconCls:s,buttonPaddingVertical:c,buttonIconOnlyFontSize:l}=e;return[{[t]:{fontSize:i,height:r,padding:`${X(c)} ${X(o)}`,borderRadius:a,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:l}}}},{[`${n}${n}-circle${t}`]:l_(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},d_=e=>u_(lc(e,{fontSize:e.contentFontSize}),e.componentCls),f_=e=>u_(lc(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM}),`${e.componentCls}-sm`),p_=e=>u_(lc(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG}),`${e.componentCls}-lg`),m_=e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:`100%`}}}},h_=Xl(`Button`,e=>{let t=a_(e);return[c_(t),d_(t),f_(t),p_(t),m_(t),s_(t),Pg(t)]},o_,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function g_(e,t,n,r){let{focusElCls:i,focus:a,borderElCls:o}=n,s=o?`> *`:``,c=[`hover`,a?`focus`:null,`active`].filter(Boolean).map(e=>`&:${e} ${s}`).join(`,`);return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{[c]:{zIndex:3},...i?{[`&${i}`]:{zIndex:3}}:{},[`&[disabled] ${s}`]:{zIndex:0}}}}function __(e,t,n){let{borderElCls:r}=n,i=r?`> ${r}`:``;return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function v_(e,t={focus:!0}){let{componentCls:n}=e,{componentCls:r}=t,i=r||n,a=`${i}-compact`;return{[a]:{...g_(e,a,t,i),...__(i,a,t)}}}function y_(e,t,n){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{"&:hover,&:focus,&:active":{zIndex:3},"&[disabled]":{zIndex:0}}}}function b_(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function x_(e){let t=`${e.componentCls}-compact-vertical`;return{[t]:{...y_(e,t,e.componentCls),...b_(e.componentCls,t)}}}var S_=e=>{let{antCls:t,componentCls:n,lineWidth:r,calc:i,colorBgContainer:a}=e,o=`${n}-variant-solid:not([disabled])`,s=i(r).mul(-1).equal(),[c,l]=$l(t,`btn`),u=e=>({[`${n}-compact${e?`-vertical`:``}-item`]:{[c(`compact-connect-border-color`)]:l(`bg-color-hover`),[`&${o}`]:{transition:`none`,[`& + ${o}:before`]:[{position:`absolute`,backgroundColor:l(`compact-connect-border-color`),content:`""`},e?{top:s,insetInline:s,height:r}:{insetBlock:s,insetInlineStart:s,width:r}],"&:hover:before":{display:`none`}}}});return[u(),u(!0),{[`${o}${n}-color-default`]:{[c(`compact-connect-border-color`)]:`color-mix(in srgb, ${l(`bg-color-hover`)} 75%, ${a})`}}]},C_=Ql([`Button`,`compact`],e=>{let t=a_(e);return[v_(t),x_(t),S_(t)]},o_);function w_(e){if(ef(e)){let t=e?.delay;return t=Qd(t)?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}var T_={default:[`default`,`outlined`],primary:[`primary`,`solid`],dashed:[`default`,`dashed`],link:[`link`,`link`],text:[`default`,`text`]},E_=S.forwardRef((e,t)=>{let{_skipSemantic:n,loading:r=!1,prefixCls:i,color:a,variant:o,type:s,danger:c=!1,shape:l,size:u,disabled:d,className:f,rootClassName:p,children:m,icon:h,iconPosition:g,iconPlacement:_,ghost:v=!1,block:y=!1,htmlType:b=`button`,classNames:x,styles:C,style:w,autoInsertSpace:T,autoFocus:E,...D}=e,O=Di(m),k=s||`default`,{getPrefixCls:A,direction:j,autoInsertSpace:M,className:N,style:P,classNames:F,styles:I,loadingIcon:L,shape:R,color:z,variant:B}=_a(`button`),V=l||R||`default`,[H,U]=(0,S.useMemo)(()=>{if(a&&o)return[a,o];if(s||c){let e=T_[k]||[];return c?[`danger`,e[1]]:e}return z&&B?[z,B]:[`default`,`outlined`]},[a,o,s,c,z,B,k]),[ee,te]=(0,S.useMemo)(()=>v&&U===`solid`?[H,`outlined`]:[H,U],[H,U,v]),ne=ee===`danger`,W=ne?`dangerous`:ee,re=T??M??!0,G=A(`btn`,i),[K,q]=h_(G),ie=(0,S.useContext)(pm),J=d??ie,ae=(0,S.useContext)(Fh),oe=(0,S.useMemo)(()=>w_(r),[r]),[se,ce]=(0,S.useState)(oe.loading),[le,ue]=(0,S.useState)(!1),de=(0,S.useRef)(null),fe=cr(t,de),pe=O.length===1&&!h&&!Bh(te),me=(0,S.useRef)(!0);S.useEffect(()=>(me.current=!1,()=>{me.current=!0}),[]),Vn(()=>{let e=null;oe.delay>0?e=setTimeout(()=>{e=null,ce(!0)},oe.delay):ce(oe.loading);function t(){e&&=(clearTimeout(e),null)}return t},[oe.delay,oe.loading]),(0,S.useEffect)(()=>{if(!de.current||!re)return;let e=de.current.textContent||``;pe&&Rh(e)?le||ue(!0):le&&ue(!1)}),(0,S.useEffect)(()=>{E&&de.current&&de.current.focus()},[]);let he=S.useCallback(t=>{if(se||J){t.preventDefault();return}e.onClick?.((`href`in e,t))},[e.onClick,se,J]),{compactSize:ge,compactItemClassnames:_e}=jh(G,j),ve=Oh(e=>u??ge??ae??e),ye=se?`loading`:h,be=_??g??`start`,xe=hi(D,[`navigate`]),Se={...e,type:k,color:ee,variant:te,danger:ne,shape:V,size:ve,disabled:J,loading:se,iconPlacement:be},[Ce,we]=xf([n?void 0:F,x],[n?void 0:I,C],{props:Se}),Te=Y(G,K,q,{[`${G}-${V}`]:V!==`default`&&V!==`square`&&V,[`${G}-${k}`]:k,[`${G}-dangerous`]:c,[`${G}-color-${W}`]:W,[`${G}-variant-${te}`]:te,[`${G}-lg`]:ve===`large`,[`${G}-sm`]:ve===`small`,[`${G}-icon-only`]:!m&&m!==0&&!!ye,[`${G}-background-ghost`]:v&&!Bh(te),[`${G}-loading`]:se,[`${G}-two-chinese-chars`]:le&&re&&!se,[`${G}-block`]:y,[`${G}-rtl`]:j===`rtl`,[`${G}-icon-end`]:be===`end`},_e,f,p,N,Ce.root),Ee={...we.root,...P,...w},De={className:Ce.icon,style:we.icon},Oe=e=>S.createElement(Uh,{prefixCls:G,...De},e),ke=S.createElement(qh,{existIcon:!!h,prefixCls:G,loading:se,mount:me.current,...De}),Ae=ef(r)&&r.icon||L,je;je=h&&!se?Oe(h):r&&Ae?Oe(Ae):ke;let Me=Zd(m)?Hh(m,pe&&re,we.content,Ce.content):null;if(xe.href!==void 0)return S.createElement(`a`,{...xe,className:Y(Te,{[`${G}-disabled`]:J}),href:J?void 0:xe.href,style:Ee,onClick:he,ref:fe,tabIndex:J?-1:0,"aria-disabled":J},je,Me);let Ne=S.createElement(`button`,{...D,type:b,className:Te,style:Ee,onClick:he,disabled:J,ref:fe},je,Me,_e&&S.createElement(C_,{prefixCls:G}));return Bh(te)||(Ne=S.createElement(Dh,{component:`Button`,disabled:se},Ne)),Ne});E_.Group=Ih,E_.__ANT_BUTTON=!0;var D_=e=>{let{type:t,children:n,prefixCls:r,buttonProps:i,close:a,autoFocus:o,emitEvent:s,isSilent:c,quitOnNullishReturnValue:l,actionFn:u}=e,d=S.useRef(!1),f=S.useRef(null),[p,m]=Un(!1),h=(...e)=>{a?.(...e)};S.useEffect(()=>{let e=null;return o&&(e=setTimeout(()=>{f.current?.focus({preventScroll:!0})})),()=>{e&&clearTimeout(e)}},[o]);let g=e=>{nf(e)&&(m(!0),e.then((...e)=>{m(!1,!0),h.apply(void 0,e),d.current=!1},e=>{if(m(!1,!0),d.current=!1,!c?.())return Promise.reject(e)}))},_=e=>{if(d.current)return;if(d.current=!0,!u){h();return}let t;if(s){if(t=u(e),l&&!nf(t)){d.current=!1,h(e);return}}else if(u.length)t=u(a),d.current=!1;else if(t=u(),!nf(t)){h();return}g(t)};return S.createElement(E_,{...zh(t),onClick:_,loading:p,prefixCls:r,...i,ref:f},n)},O_=S.createContext({}),{Provider:k_}=O_,A_=()=>{let{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:r,mergedOkCancel:i,rootPrefixCls:a,close:o,onCancel:s,onConfirm:c,onClose:l}=(0,S.useContext)(O_);return i?S.createElement(D_,{isSilent:r,actionFn:s,close:(...e)=>{o?.(...e),c?.(!1),l?.()},autoFocus:e===`cancel`,buttonProps:t,prefixCls:`${a}-btn`},n):null},j_=()=>{let{autoFocusButton:e,close:t,isSilent:n,okButtonProps:r,rootPrefixCls:i,okTextLocale:a,okType:o,onConfirm:s,onOk:c,onClose:l}=(0,S.useContext)(O_);return S.createElement(D_,{isSilent:n,type:o||`primary`,actionFn:c,close:(...e)=>{t?.(...e),s?.(!0),l?.()},autoFocus:e===`ok`,buttonProps:r,prefixCls:`${i}-btn`},a)},M_=S.createContext({});function N_(e,t,n){let r=t;return!r&&n&&(r=`${e}-${n}`),r}function P_(e,t){let n=e[`page${t?`Y`:`X`}Offset`],r=`scroll${t?`Top`:`Left`}`;if(typeof n!=`number`){let t=e.document;n=t.documentElement[r],typeof n!=`number`&&(n=t.body[r])}return n}function F_(e){let t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,i=r.defaultView||r.parentWindow;return n.left+=P_(i),n.top+=P_(i,!0),n}var I_=S.memo(({children:e})=>e,(e,{shouldUpdate:t})=>!t);function L_(){return L_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,className:r,style:i,title:a,ariaId:o,footer:s,closable:c,closeIcon:l,onClose:u,children:d,bodyStyle:f,bodyProps:p,modalRender:m,onMouseDown:h,onMouseUp:g,holderRef:_,visible:v,forceRender:y,width:b,height:x,classNames:C,styles:w,isFixedPos:T,focusTrap:E}=e,{panel:D}=S.useContext(M_),O=(0,S.useRef)(null),k=cr(_,D,O),[A]=Wr(v&&T&&E!==!1,()=>O.current);S.useImperativeHandle(t,()=>({focus:()=>{O.current?.focus({preventScroll:!0})}}));let j={};b!==void 0&&(j.width=b),x!==void 0&&(j.height=x);let M=s?S.createElement(`div`,{className:Y(`${n}-footer`,C?.footer),style:{...w?.footer}},s):null,N=a?S.createElement(`div`,{className:Y(`${n}-header`,C?.header),style:{...w?.header}},S.createElement(`div`,{className:Y(`${n}-title`,C?.title),id:o,style:{...w?.title}},a)):null,P=(0,S.useMemo)(()=>typeof c==`object`&&c?c:c?{closeIcon:l??S.createElement(`span`,{className:`${n}-close-x`})}:{},[c,l,n]),F=bi(P,!0),I=typeof c==`object`&&c.disabled,L=c?S.createElement(`button`,L_({type:`button`,onClick:u,"aria-label":`Close`},F,{className:`${n}-close`,disabled:I}),P.closeIcon):null,R=S.createElement(`div`,{className:Y(`${n}-container`,C?.container),style:w?.container},L,N,S.createElement(`div`,L_({className:Y(`${n}-body`,C?.body),style:{...f,...w?.body}},p),d),M);return S.createElement(`div`,{key:`dialog-element`,role:`dialog`,"aria-labelledby":a?o:null,"aria-modal":`true`,ref:k,style:{...i,...j},className:Y(n,r),onMouseDown:h,onMouseUp:g,tabIndex:-1,onFocus:e=>{A(e.target)}},S.createElement(I_,{shouldUpdate:v||y},m?m(R):R))});function z_(){return z_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,title:r,style:i,className:a,visible:o,forceRender:s,destroyOnHidden:c,motionName:l,ariaId:u,onVisibleChanged:d,mousePosition:f}=e,p=(0,S.useRef)(null),m=(0,S.useRef)(null);S.useImperativeHandle(t,()=>({...m.current,inMotion:p.current.inMotion,enableMotion:p.current.enableMotion}));let[h,g]=S.useState(),_={};h&&(_.transformOrigin=h);function v(){if(!p.current?.nativeElement)return;let e=F_(p.current.nativeElement);g(f&&(f.x||f.y)?`${f.x-e.left}px ${f.y-e.top}px`:``)}return S.createElement(Ed,{visible:o,onVisibleChanged:d,onAppearPrepare:v,onEnterPrepare:v,forceRender:s,motionName:l,removeOnLeave:c,ref:p},({className:t,style:o},s)=>S.createElement(R_,z_({},e,{ref:m,title:r,ariaId:u,prefixCls:n,holderRef:s,style:{...o,...i,..._},className:Y(a,t)})))});function V_(){return V_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t,style:n,visible:r,maskProps:i,motionName:a,className:o}=e;return S.createElement(Ed,{key:`mask`,visible:r,motionName:a,leavedClassName:`${t}-mask-hidden`},({className:e,style:r},a)=>S.createElement(`div`,V_({ref:a,style:{...r,...n},className:Y(`${t}-mask`,e,o)},i)))};function U_(){return U_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t=`rc-dialog`,zIndex:n,visible:r=!1,focusTriggerAfterClose:i=!0,wrapStyle:a,wrapClassName:o,wrapProps:s,onClose:c,afterOpenChange:l,afterClose:u,transitionName:d,animation:f,closable:p=!0,mask:m=!0,maskTransitionName:h,maskAnimation:g,maskClosable:_=!0,maskStyle:v,maskProps:y,rootClassName:b,rootStyle:x,classNames:C,styles:w}=e,T=(0,S.useRef)(null),E=(0,S.useRef)(null),D=(0,S.useRef)(null),[O,k]=S.useState(r),[A,j]=S.useState(!1),M=Yn();function N(){pr(E.current,document.activeElement)||(T.current=document.activeElement)}function P(){pr(E.current,document.activeElement)||D.current?.focus()}function F(){if(k(!1),m&&T.current&&i){try{T.current.focus({preventScroll:!0})}catch{}T.current=null}O&&u?.()}function I(e){e?P():F(),l?.(e)}function L(e){c?.(e)}let R=(0,S.useRef)(!1),z=null;_&&(z=e=>{E.current===e.target&&R.current&&L(e)});function B(e){R.current=e.target===E.current}(0,S.useEffect)(()=>{r?(R.current=!1,k(!0),N(),E.current&&j(getComputedStyle(E.current).position===`fixed`)):O&&D.current.enableMotion()&&!D.current.inMotion()&&F()},[r]);let V={zIndex:n,...a,...w?.wrapper,display:O?null:`none`};return S.createElement(`div`,U_({className:Y(`${t}-root`,b),style:x},bi(e,{data:!0})),S.createElement(H_,{prefixCls:t,visible:m&&r,motionName:N_(t,h,g),style:{zIndex:n,...v,...w?.mask},maskProps:y,className:C?.mask}),S.createElement(`div`,U_({className:Y(`${t}-wrap`,o,C?.wrapper),ref:E,onClick:z,onMouseDown:B,style:V},s),S.createElement(B_,U_({},e,{isFixedPos:A,ref:D,closable:p,ariaId:M,prefixCls:t,visible:r&&O,onClose:L,onVisibleChanged:I,motionName:N_(t,d,f)}))))};function G_(){return G_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{visible:t,getContainer:n,forceRender:r,destroyOnHidden:i=!1,afterClose:a,closable:o,panelRef:s,keyboard:c=!0,onClose:l}=e,[u,d]=S.useState(t),f=S.useMemo(()=>({panel:s}),[s]);return S.useEffect(()=>{t&&d(!0)},[t]),!r&&i&&!u?null:S.createElement(M_.Provider,{value:f},S.createElement(Tp,{open:t||r||u,onEsc:({top:e,event:t})=>{if(e&&c){t.stopPropagation(),l?.(t);return}},autoDestroy:!1,getContainer:n,autoLock:t||u},S.createElement(W_,G_({},e,{destroyOnHidden:i,afterClose:()=>{let{afterClose:e}=(o&&typeof o==`object`?o:{})||{};e?.(),a?.(),d(!1)}}))))},q_=`RC_FORM_INTERNAL_HOOKS`,J_=()=>{li(!1,`Can not find FormContext. Please make sure you wrap Field under Form.`)},Y_=S.createContext({getFieldValue:J_,getFieldsValue:J_,getFieldError:J_,getFieldWarning:J_,getFieldsError:J_,isFieldsTouched:J_,isFieldTouched:J_,isFieldValidating:J_,isFieldsValidating:J_,resetFields:J_,setFields:J_,setFieldValue:J_,setFieldsValue:J_,validateFields:J_,submit:J_,getInternalHooks:()=>(J_(),{dispatch:J_,initEntityValue:J_,registerField:J_,useSubscribe:J_,setInitialValues:J_,destroyForm:J_,setCallbacks:J_,registerWatch:J_,getFields:J_,setValidateMessages:J_,setPreserve:J_,getInitialValue:J_})}),X_=S.createContext(null);function Z_(e){return e==null?[]:Array.isArray(e)?e:[e]}function Q_(e){return e&&!!e._init}function $_(){return{default:`Validation error on field %s`,required:`%s is required`,enum:`%s must be one of %s`,whitespace:`%s cannot be empty`,date:{format:`%s date %s is invalid for format %s`,parse:`%s date could not be parsed, %s is invalid `,invalid:`%s date %s is invalid`},types:{string:`%s is not a %s`,method:`%s is not a %s (function)`,array:`%s is not an %s`,object:`%s is not an %s`,number:`%s is not a %s`,date:`%s is not a %s`,boolean:`%s is not a %s`,integer:`%s is not an %s`,float:`%s is not a %s`,regexp:`%s is not a valid %s`,email:`%s is not a valid %s`,tel:`%s is not a valid %s`,url:`%s is not a valid %s`,hex:`%s is not a valid %s`},string:{len:`%s must be exactly %s characters`,min:`%s must be at least %s characters`,max:`%s cannot be longer than %s characters`,range:`%s must be between %s and %s characters`},number:{len:`%s must equal %s`,min:`%s cannot be less than %s`,max:`%s cannot be greater than %s`,range:`%s must be between %s and %s`},array:{len:`%s must be exactly %s in length`,min:`%s cannot be less than %s in length`,max:`%s cannot be greater than %s in length`,range:`%s must be between %s and %s in length`},pattern:{mismatch:`%s value %s does not match pattern %s`},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var ev=$_();function tv(e){try{return Function.toString.call(e).indexOf(`[native code]`)!==-1}catch{return typeof e==`function`}}function nv(e,t,n){if(Ys())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&Ks(i,n.prototype),i}function rv(e){var t=typeof Map==`function`?new Map:void 0;return rv=function(e){if(e===null||!tv(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return nv(e,arguments,Js(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ks(n,e)},rv(e)}var iv=/%[sdj%]/g,av=function(){};function ov(e){if(!e||!e.length)return null;var t={};return e.forEach(function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)}),t}function sv(e){var t=[...arguments].slice(1),n=0,r=t.length;return typeof e==`function`?e.apply(null,t):typeof e==`string`?e.replace(iv,function(e){if(e===`%%`)return`%`;if(n>=r)return e;switch(e){case`%s`:return String(t[n++]);case`%d`:return Number(t[n++]);case`%j`:try{return JSON.stringify(t[n++])}catch{return`[Circular]`}break;default:return e}}):e}function cv(e){return e===`string`||e===`url`||e===`hex`||e===`email`||e===`date`||e===`pattern`||e===`tel`}function lv(e,t){return!!(e==null||t===`array`&&Array.isArray(e)&&!e.length||cv(t)&&typeof e==`string`&&!e)}function uv(e,t,n){var r=[],i=0,a=e.length;function o(e){r.push.apply(r,da(e||[])),i++,i===a&&n(r)}e.forEach(function(e){t(e,o)})}function dv(e,t,n){var r=0,i=e.length;function a(o){if(o&&o.length){n(o);return}var s=r;r+=1,se.max?r.push(sv(i.messages[u].max,e.fullField,e.max)):o&&s&&(le.max)&&r.push(sv(i.messages[u].range,e.fullField,e.min,e.max))},Cv=function(e,t,n,r,i,a){e.required&&(!n.hasOwnProperty(e.field)||lv(t,a||e.type))&&r.push(sv(i.messages.required,e.fullField))},wv,Tv=(function(){if(wv)return wv;var e=`[a-fA-F\\d:]`,t=function(t){return t&&t.includeBoundaries?`(?:(?<=\\s|^)(?=${e})|(?<=${e})(?=\\s|\$))`:``},n=`(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}`,r=`[a-fA-F\\d]{1,4}`,i=`(?:${[`(?:${r}:){7}(?:${r}|:)`,`(?:${r}:){6}(?:${n}|:${r}|:)`,`(?:${r}:){5}(?::${n}|(?::${r}){1,2}|:)`,`(?:${r}:){4}(?:(?::${r}){0,1}:${n}|(?::${r}){1,3}|:)`,`(?:${r}:){3}(?:(?::${r}){0,2}:${n}|(?::${r}){1,4}|:)`,`(?:${r}:){2}(?:(?::${r}){0,3}:${n}|(?::${r}){1,5}|:)`,`(?:${r}:){1}(?:(?::${r}){0,4}:${n}|(?::${r}){1,6}|:)`,`(?::(?:(?::${r}){0,5}:${n}|(?::${r}){1,7}|:))`].join(`|`)})(?:%[0-9a-zA-Z]{1,})?`,a=RegExp(`(?:^${n}\$)|(?:^${i}\$)`),o=RegExp(`^${n}\$`),s=RegExp(`^${i}\$`),c=function(e){return e&&e.exact?a:RegExp(`(?:${t(e)}${n}${t(e)})|(?:${t(e)}${i}${t(e)})`,`g`)};c.v4=function(e){return e&&e.exact?o:RegExp(`${t(e)}${n}${t(e)}`,`g`)},c.v6=function(e){return e&&e.exact?s:RegExp(`${t(e)}${i}${t(e)}`,`g`)};var l=`(?:(?:(?:[a-z]+:)?//)|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|${c.v4().source}|${c.v6().source}|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?`;return wv=RegExp(`(?:^${l}\$)`,`i`),wv}),Ev={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tel:/^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Dv={integer:function(e){return Dv.number(e)&&parseInt(e,10)===e},float:function(e){return Dv.number(e)&&!Dv.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime==`function`&&typeof e.getMonth==`function`&&typeof e.getYear==`function`&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e==`number`},object:function(e){return Ms(e)===`object`&&!Dv.array(e)},method:function(e){return typeof e==`function`},email:function(e){return typeof e==`string`&&e.length<=320&&!!e.match(Ev.email)},tel:function(e){return typeof e==`string`&&e.length<=32&&!!e.match(Ev.tel)},url:function(e){return typeof e==`string`&&e.length<=2048&&!!e.match(Tv())},hex:function(e){return typeof e==`string`&&!!e.match(Ev.hex)}},Ov={required:Cv,whitespace:function(e,t,n,r,i){(/^\s+$/.test(t)||t===``)&&r.push(sv(i.messages.whitespace,e.fullField))},type:function(e,t,n,r,i){if(e.required&&t===void 0){Cv(e,t,n,r,i);return}var a=[`integer`,`float`,`array`,`regexp`,`object`,`method`,`email`,`tel`,`number`,`date`,`url`,`hex`],o=e.type;a.indexOf(o)>-1?Dv[o](t)||r.push(sv(i.messages.types[o],e.fullField,e.type)):o&&Ms(t)!==e.type&&r.push(sv(i.messages.types[o],e.fullField,e.type))},range:Sv,enum:bv,pattern:xv},kv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t)&&!e.required)return n();Ov.required(e,t,r,a,i)}n(a)},Av=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t==null&&!e.required)return n();Ov.required(e,t,r,a,i,`array`),t!=null&&(Ov.type(e,t,r,a,i),Ov.range(e,t,r,a,i))}n(a)},jv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t)&&!e.required)return n();Ov.required(e,t,r,a,i),t!==void 0&&Ov.type(e,t,r,a,i)}n(a)},Mv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t,`date`)&&!e.required)return n();if(Ov.required(e,t,r,a,i),!lv(t,`date`)){var o=t instanceof Date?t:new Date(t);Ov.type(e,o,r,a,i),o&&Ov.range(e,o.getTime(),r,a,i)}}n(a)},Nv=`enum`,Pv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t)&&!e.required)return n();Ov.required(e,t,r,a,i),t!==void 0&&Ov[Nv](e,t,r,a,i)}n(a)},Fv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t)&&!e.required)return n();Ov.required(e,t,r,a,i),t!==void 0&&(Ov.type(e,t,r,a,i),Ov.range(e,t,r,a,i))}n(a)},Iv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t)&&!e.required)return n();Ov.required(e,t,r,a,i),t!==void 0&&(Ov.type(e,t,r,a,i),Ov.range(e,t,r,a,i))}n(a)},Lv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t)&&!e.required)return n();Ov.required(e,t,r,a,i),t!==void 0&&Ov.type(e,t,r,a,i)}n(a)},Rv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t===``&&(t=void 0),lv(t)&&!e.required)return n();Ov.required(e,t,r,a,i),t!==void 0&&(Ov.type(e,t,r,a,i),Ov.range(e,t,r,a,i))}n(a)},cee=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t)&&!e.required)return n();Ov.required(e,t,r,a,i),t!==void 0&&Ov.type(e,t,r,a,i)}n(a)},zv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t,`string`)&&!e.required)return n();Ov.required(e,t,r,a,i),lv(t,`string`)||Ov.pattern(e,t,r,a,i)}n(a)},Bv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t)&&!e.required)return n();Ov.required(e,t,r,a,i),lv(t)||Ov.type(e,t,r,a,i)}n(a)},Vv=function(e,t,n,r,i){var a=[],o=Array.isArray(t)?`array`:Ms(t);Ov.required(e,t,r,a,i,o),n(a)},Hv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t,`string`)&&!e.required)return n();Ov.required(e,t,r,a,i,`string`),lv(t,`string`)||(Ov.type(e,t,r,a,i),Ov.range(e,t,r,a,i),Ov.pattern(e,t,r,a,i),e.whitespace===!0&&Ov.whitespace(e,t,r,a,i))}n(a)},Uv=function(e,t,n,r,i){var a=e.type,o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(lv(t,a)&&!e.required)return n();Ov.required(e,t,r,o,i,a),lv(t,a)||Ov.type(e,t,r,o,i)}n(o)},Wv={string:Hv,method:Lv,number:Rv,boolean:jv,regexp:Bv,integer:Iv,float:Fv,array:Av,object:cee,enum:Pv,pattern:zv,date:Mv,url:Uv,hex:Uv,email:Uv,tel:Uv,required:Vv,any:kv},Gv=function(){function e(t){Hs(this,e),zs(this,`rules`,null),zs(this,`_messages`,ev),this.define(t)}return Ws(e,[{key:`define`,value:function(e){var t=this;if(!e)throw Error(`Cannot configure a schema with no rules`);if(Ms(e)!==`object`||Array.isArray(e))throw Error(`Rules must be an object`);this.rules={},Object.keys(e).forEach(function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]})}},{key:`messages`,value:function(e){return e&&(this._messages=vv($_(),e)),this._messages}},{key:`validate`,value:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=t,o=r,s=i;if(typeof o==`function`&&(s=o,o={}),!this.rules||Object.keys(this.rules).length===0)return s&&s(null,a),Promise.resolve(a);function c(e){var t=[],n={};function r(e){if(Array.isArray(e)){var n;t=(n=t).concat.apply(n,da(e))}else t.push(e)}for(var i=0;i0&&arguments[0]!==void 0?arguments[0]:[],l=Array.isArray(c)?c:[c];!o.suppressWarning&&l.length&&e.warning(`async-validator:`,l),l.length&&r.message!==void 0&&r.message!==null&&(l=[].concat(r.message));var u=l.map(_v(r,a));if(o.first&&u.length)return d[r.field]=1,n(u);if(!i)n(u);else{if(r.required&&!t.value)return r.message===void 0?o.error&&(u=[o.error(r,sv(o.messages.required,r.field))]):u=[].concat(r.message).map(_v(r,a)),n(u);var f={};r.defaultField&&Object.keys(t.value).map(function(e){f[e]=r.defaultField}),f=Vs(Vs({},f),t.rule.fields);var p={};Object.keys(f).forEach(function(e){var t=f[e];p[e]=(Array.isArray(t)?t:[t]).map(s.bind(null,e))});var m=new e(p);m.messages(o.messages),t.rule.options&&(t.rule.options.messages=o.messages,t.rule.options.error=o.error),m.validate(t.value,t.rule.options||o,function(e){var t=[];u&&u.length&&t.push.apply(t,da(u)),e&&e.length&&t.push.apply(t,da(e)),n(t.length?t:null)})}}var l;if(r.asyncValidator)l=r.asyncValidator(r,t.value,c,t.source,o);else if(r.validator){try{l=r.validator(r,t.value,c,t.source,o)}catch(e){var u,f;(u=(f=console).error)==null||u.call(f,e),o.suppressValidatorError||setTimeout(function(){throw e},0),c(e.message)}l===!0?c():l===!1?c(typeof r.message==`function`?r.message(r.fullField||r.field):r.message||`${r.fullField||r.field} fails`):l instanceof Array?c(l):l instanceof Error&&c(l.message)}l&&l.then&&l.then(function(){return c()},function(e){return c(e)})},function(e){c(e)},a)}},{key:`getType`,value:function(e){if(e.type===void 0&&e.pattern instanceof RegExp&&(e.type=`pattern`),typeof e.validator!=`function`&&e.type&&!Wv.hasOwnProperty(e.type))throw Error(sv(`Unknown rule type %s`,e.type));return e.type||`string`}},{key:`getValidationMethod`,value:function(e){if(typeof e.validator==`function`)return e.validator;var t=Object.keys(e),n=t.indexOf(`message`);return n!==-1&&t.splice(n,1),t.length===1&&t[0]===`required`?Wv.required:Wv[this.getType(e)]||void 0}}]),e}();zs(Gv,`register`,function(e,t){if(typeof t!=`function`)throw Error(`Cannot register a validator by type, validator is not a function`);Wv[e]=t}),zs(Gv,`warning`,av),zs(Gv,`messages`,ev),zs(Gv,`validators`,Wv);var Kv="'${name}' is not a valid ${type}",qv={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Kv,method:Kv,array:Kv,object:Kv,number:Kv,date:Kv,boolean:Kv,integer:Kv,float:Kv,regexp:Kv,email:Kv,tel:Kv,url:Kv,hex:Kv},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},Jv=Gv;function Yv(e,t){return e.replace(/\\?\$\{\w+\}/g,e=>e.startsWith(`\\`)?e.slice(1):t[e.slice(2,-1)])}var Xv=`CODE_LOGIC_ERROR`;async function Zv(e,t,n,r,i){let a={...n};if(delete a.ruleIndex,Jv.warning=()=>void 0,a.validator){let e=a.validator;a.validator=(...t)=>{try{return e(...t)}catch(e){return console.error(e),Promise.reject(Xv)}}}let o=null;a&&a.type===`array`&&a.defaultField&&(o=a.defaultField,delete a.defaultField);let s=new Jv({[e]:[a]}),c=Fi(qv,r.validateMessages);s.messages(c);let l=[];try{await Promise.resolve(s.validate({[e]:t},{...r}))}catch(e){e.errors&&(l=e.errors.map(({message:e},t)=>{let n=e===Xv?c.default:e;return S.isValidElement(n)?S.cloneElement(n,{key:`error_${t}`}):n}))}if(!l.length&&o&&Array.isArray(t)&&t.length>0)return(await Promise.all(t.map((t,n)=>Zv(`${e}.${n}`,t,o,r,i)))).reduce((e,t)=>[...e,...t],[]);let u={...n,name:e,enum:(n.enum||[]).join(`, `),...i};return l.map(e=>typeof e==`string`?Yv(e,u):e)}function Qv(e,t,n,r,i,a){let o=e.join(`.`),s=n.map((e,t)=>{let n=e.validator,r={...e,ruleIndex:t};return n&&(r.validator=(e,t,r)=>{let i=!1,a=n(e,t,(...e)=>{Promise.resolve().then(()=>{li(!i,"Your validator function has already return a promise. `callback` will be ignored."),i||r(...e)})});i=a&&typeof a.then==`function`&&typeof a.catch==`function`,li(i,"`callback` is deprecated. Please return a promise instead."),i&&a.then(()=>{r()}).catch(e=>{r(e||` `)})}),r}).sort(({warningOnly:e,ruleIndex:t},{warningOnly:n,ruleIndex:r})=>!!e==!!n?t-r:e?1:-1),c;if(i===!0)c=new Promise(async(e,n)=>{for(let e=0;eZv(o,t,e,r,a).then(t=>({errors:t,rule:e})));c=(i?ey(e):$v(e)).then(e=>Promise.reject(e))}return c.catch(e=>e),c}async function $v(e){return Promise.all(e).then(e=>[].concat(...e))}async function ey(e){let t=0;return new Promise(n=>{e.forEach(r=>{r.then(r=>{r.errors.length&&n([r]),t+=1,t===e.length&&n([])})})})}function ty(e){return Z_(e)}function ny(e,t){let n={};return t.forEach(t=>{let r=Oi(e,t);n=Ai(n,t,r)}),n}function ry(e,t,n=!1){return e&&e.some(e=>iy(t,e,n))}function iy(e,t,n=!1){return!e||!t||!n&&e.length!==t.length?!1:t.every((t,n)=>e[n]===t)}function ay(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(e),r=Object.keys(t);return[...new Set([...n,...r])].every(n=>{let r=e[n],i=t[n];return typeof r==`function`&&typeof i==`function`?!0:r===i})}function oy(e,...t){let n=t[0];return n&&n.target&&typeof n.target==`object`&&e in n.target?n.target[e]:n}function sy(e,t,n){let{length:r}=e;if(t<0||t>=r||n<0||n>=r)return e;let i=e[t],a=t-n;return a>0?[...e.slice(0,n),i,...e.slice(n,t),...e.slice(t+1,r)]:a<0?[...e.slice(0,t),...e.slice(t+1,n+1),i,...e.slice(n+1,r)]:e}var cy=e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},ly=class{namePathList=[];taskId=0;watcherList=new Set;form;constructor(e){this.form=e}register(e){return this.watcherList.add(e),()=>{this.watcherList.delete(e)}}notify(e){e.forEach(e=>{this.namePathList.every(t=>!iy(t,e))&&this.namePathList.push(e)}),this.doBatch()}doBatch(){this.taskId+=1;let e=this.taskId;cy(()=>{if(e===this.taskId&&this.watcherList.size){let e=this.form.getForm(),t=e.getFieldsValue(),n=e.getFieldsValue(!0);this.watcherList.forEach(e=>{e(t,n,this.namePathList)}),this.namePathList=[]}})}};async function uy(){return new Promise(e=>{cy(()=>{Ei(()=>{e()})})})}function dy(){return dy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{preserve:e,isListField:t,name:n}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(t,e,ty(n)),this.cancelRegisterFunc=null};getNamePath=()=>{let{name:e,fieldContext:t}=this.props,{prefixName:n=[]}=t;return e===void 0?[]:[...n,...e]};getRules=()=>{let{rules:e=[],fieldContext:t}=this.props;return e.map(e=>typeof e==`function`?e(t):e)};reRender(){this.mounted&&this.forceUpdate()}refresh=()=>{this.mounted&&this.setState(({resetCount:e})=>({resetCount:e+1}))};metaCache=null;triggerMetaEvent=e=>{let{onMetaChange:t}=this.props;if(t){let n={...this.getMeta(),destroy:e};di(this.metaCache,n)||t(n),this.metaCache=n}else this.metaCache=null};onStoreChange=(e,t,n)=>{let{shouldUpdate:r,dependencies:i=[],onReset:a}=this.props,{store:o}=n,s=this.getNamePath(),c=this.getValue(e),l=this.getValue(o),u=t&&ry(t,s);switch(n.type===`valueUpdate`&&n.source===`external`&&!di(c,l)&&(this.touched=!0,this.dirty=!0,this.validatePromise=null,this.errors=fy,this.warnings=py,this.triggerMetaEvent()),n.type){case`reset`:if(!t||u){this.touched=!1,this.dirty=!1,this.validatePromise=void 0,this.errors=fy,this.warnings=py,this.triggerMetaEvent(),a?.(),this.refresh();return}break;case`remove`:if(r&&my(r,e,o,c,l,n)){this.reRender();return}break;case`setField`:{let{data:i}=n;if(u){`touched`in i&&(this.touched=i.touched),`validating`in i&&!(`originRCField`in i)&&(this.validatePromise=i.validating?Promise.resolve([]):null),`errors`in i&&(this.errors=i.errors||fy),`warnings`in i&&(this.warnings=i.warnings||py),this.dirty=!0,this.triggerMetaEvent(),this.reRender();return}else if(`value`in i&&ry(t,s,!0)){this.reRender();return}if(r&&!s.length&&my(r,e,o,c,l,n)){this.reRender();return}break}case`dependenciesUpdate`:if(i.map(ty).some(e=>ry(n.relatedFields,e))){this.reRender();return}break;default:if(u||(!i.length||s.length||r)&&my(r,e,o,c,l,n)){this.reRender();return}break}r===!0&&this.reRender()};validateRules=e=>{let t=this.getNamePath(),n=this.getValue(),{triggerName:r,validateOnly:i=!1,delayFrame:a}=e||{},o=Promise.resolve().then(async()=>{if(!this.mounted)return[];let{validateFirst:i=!1,messageVariables:s,validateDebounce:c}=this.props;a&&await uy();let l=this.getRules();if(r&&(l=l.filter(e=>e).filter(e=>{let{validateTrigger:t}=e;return t?Z_(t).includes(r):!0})),c&&r&&(await new Promise(e=>{setTimeout(e,c)}),this.validatePromise!==o))return[];let u=Qv(t,n,l,e,i,s);return u.catch(e=>e).then((e=fy)=>{if(this.validatePromise===o){this.validatePromise=null;let t=[],n=[];e.forEach?.(({rule:{warningOnly:e},errors:r=fy})=>{e?n.push(...r):t.push(...r)}),this.errors=t,this.warnings=n,this.triggerMetaEvent(),this.reRender()}}),u});return i?o:(this.validatePromise=o,this.dirty=!0,this.errors=fy,this.warnings=py,this.triggerMetaEvent(),this.reRender(),o)};isFieldValidating=()=>!!this.validatePromise;isFieldTouched=()=>this.touched;isFieldDirty=()=>{if(this.dirty||this.props.initialValue!==void 0)return!0;let{fieldContext:e}=this.props,{getInitialValue:t}=e.getInternalHooks(q_);return t(this.getNamePath())!==void 0};getErrors=()=>this.errors;getWarnings=()=>this.warnings;isListField=()=>this.props.isListField;isList=()=>this.props.isList;isPreserve=()=>this.props.preserve;getMeta=()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:this.validatePromise===null});getOnlyChild=e=>{if(typeof e==`function`){let t=this.getMeta();return{...this.getOnlyChild(e(this.getControlled(),t,this.props.fieldContext)),isFunction:!0}}let t=Di(e);return t.length!==1||!S.isValidElement(t[0])?{child:t,isFunction:!1}:{child:t[0],isFunction:!1}};getValue=e=>{let{getFieldsValue:t}=this.props.fieldContext,n=this.getNamePath();return Oi(e||t(!0),n)};getControlled=(e={})=>{let{name:t,trigger:n=`onChange`,validateTrigger:r,getValueFromEvent:i,normalize:a,valuePropName:o=`value`,getValueProps:s,fieldContext:c}=this.props,l=r===void 0?c.validateTrigger:r,u=this.getNamePath(),{getInternalHooks:d,getFieldsValue:f}=c,{dispatch:p}=d(q_),m=this.getValue(),h=s||(e=>({[o]:e})),g=e[n],_=t===void 0?{}:h(m),v={...e,..._};return v[n]=(...e)=>{this.touched=!0,this.dirty=!0,this.triggerMetaEvent();let t;t=i?i(...e):oy(o,...e),a&&(t=a(t,m,f(!0))),t!==m&&p({type:`updateValue`,namePath:u,value:t}),g&&g(...e)},Z_(l||[]).forEach(e=>{let t=v[e];v[e]=(...n)=>{t&&t(...n);let{rules:r}=this.props;r&&r.length&&p({type:`validateField`,namePath:u,triggerName:e})}}),v};render(){let{resetCount:e}=this.state,{children:t}=this.props,{child:n,isFunction:r}=this.getOnlyChild(t),i;return r?i=n:S.isValidElement(n)?i=S.cloneElement(n,this.getControlled(n.props)):(li(!n,"`children` of Field is not validate ReactElement."),i=n),S.createElement(S.Fragment,{key:e},i)}};function gy({name:e,...t}){let n=S.useContext(Y_),r=S.useContext(X_),i=e===void 0?void 0:ty(e),a=t.isListField??!!r,o=`keep`;return a||(o=`_${(i||[]).join(`_`)}`),S.createElement(hy,dy({key:o,name:i,isListField:a},t,{fieldContext:n}))}function _y({name:e,initialValue:t,children:n,rules:r,validateTrigger:i,isListField:a}){let o=S.useContext(Y_),s=S.useContext(X_),c=S.useRef({keys:[],id:0}).current,l=S.useMemo(()=>[...ty(o.prefixName)||[],...ty(e)],[o.prefixName,e]),u=S.useMemo(()=>({...o,prefixName:l}),[o,l]),d=S.useMemo(()=>({getKey:e=>{let t=l.length,n=e[t];return[c.keys[n],e.slice(t+1)]}}),[c,l]);return typeof n==`function`?S.createElement(X_.Provider,{value:d},S.createElement(Y_.Provider,{value:u},S.createElement(gy,{name:[],shouldUpdate:(e,t,{source:n})=>n===`internal`?!1:e!==t,rules:r,validateTrigger:i,initialValue:t,isList:!0,isListField:a??!!s},({value:e=[],onChange:t},r)=>{let{getFieldValue:i}=o,a=()=>i(l||[])||[],s={add:(e,n)=>{let r=a();n>=0&&n<=r.length?(c.keys=[...c.keys.slice(0,n),c.id,...c.keys.slice(n)],t([...r.slice(0,n),e,...r.slice(n)])):(c.keys=[...c.keys,c.id],t([...r,e])),c.id+=1},remove:e=>{let n=a(),r=new Set(Array.isArray(e)?e:[e]);r.size<=0||(c.keys=c.keys.filter((e,t)=>!r.has(t)),t(n.filter((e,t)=>!r.has(t))))},move(e,n){if(e===n)return;let r=a();e<0||e>=r.length||n<0||n>=r.length||(c.keys=sy(c.keys,e,n),t(sy(r,e,n)))}},u=e||[];return Array.isArray(u)||(u=[]),n(u.map((e,t)=>{let n=c.keys[t];return n===void 0&&(c.keys[t]=c.id,n=c.keys[t],c.id+=1),{name:t,key:n,isListField:!0}}),s,r)}))):(li(!1,`Form.List only accepts function as children.`),null)}function vy(e){let t=!1,n=e.length,r=[];return e.length?new Promise((i,a)=>{e.forEach((e,o)=>{e.catch(e=>(t=!0,e)).then(e=>{--n,r[o]=e,!(n>0)&&(t&&a(r),i(r))})})}):Promise.resolve([])}var yy=`__@field_split__`;function by(e){return e.map(e=>`${typeof e}:${e}`).join(yy)}var xy=class{kvs=new Map;set(e,t){this.kvs.set(by(e),t)}get(e){return this.kvs.get(by(e))}getAsPrefix(e){let t=by(e),n=t+yy,r=[],i=this.kvs.get(t);return i!==void 0&&r.push(i),this.kvs.forEach((e,t)=>{t.startsWith(n)&&r.push(e)}),r}update(e,t){let n=t(this.get(e));n?this.set(e,n):this.delete(e)}delete(e){this.kvs.delete(by(e))}map(e){return[...this.kvs.entries()].map(([t,n])=>e({key:t.split(yy).map(e=>{let[,t,n]=e.match(/^([^:]*):(.*)$/);return t===`number`?Number(n):n}),value:n}))}toJSON(){let e={};return this.map(({key:t,value:n})=>(e[t.join(`.`)]=n,null)),e}},Sy=class{formHooked=!1;forceRootUpdate;subscribable=!0;store={};fieldEntities=[];initialValues={};callbacks={};validateMessages=null;preserve=null;lastValidatePromise=null;watcherCenter=new ly(this);constructor(e){this.forceRootUpdate=e}getForm=()=>({getFieldValue:this.getFieldValue,getFieldsValue:this.getFieldsValue,getFieldError:this.getFieldError,getFieldWarning:this.getFieldWarning,getFieldsError:this.getFieldsError,isFieldsTouched:this.isFieldsTouched,isFieldTouched:this.isFieldTouched,isFieldValidating:this.isFieldValidating,isFieldsValidating:this.isFieldsValidating,resetFields:this.resetFields,setFields:this.setFields,setFieldValue:this.setFieldValue,setFieldsValue:this.setFieldsValue,validateFields:this.validateFields,submit:this.submit,_init:!0,getInternalHooks:this.getInternalHooks});getInternalHooks=e=>e===`RC_FORM_INTERNAL_HOOKS`?(this.formHooked=!0,{dispatch:this.dispatch,initEntityValue:this.initEntityValue,registerField:this.registerField,useSubscribe:this.useSubscribe,setInitialValues:this.setInitialValues,destroyForm:this.destroyForm,setCallbacks:this.setCallbacks,setValidateMessages:this.setValidateMessages,getFields:this.getFields,setPreserve:this.setPreserve,getInitialValue:this.getInitialValue,registerWatch:this.registerWatch}):(li(!1,"`getInternalHooks` is internal usage. Should not call directly."),null);useSubscribe=e=>{this.subscribable=e};prevWithoutPreserves=null;setInitialValues=(e,t)=>{if(this.initialValues=e||{},t){let t=Fi(e,this.store);this.prevWithoutPreserves?.map(({key:n})=>{t=Ai(t,n,Oi(e,n))}),this.prevWithoutPreserves=null,this.updateStore(t)}};destroyForm=e=>{if(e)this.updateStore({});else{let e=new xy;this.getFieldEntities(!0).forEach(t=>{this.isMergedPreserve(t.isPreserve())||e.set(t.getNamePath(),!0)}),this.prevWithoutPreserves=e}};getInitialValue=e=>{let t=Oi(this.initialValues,e);return e.length?Fi(t):t};setCallbacks=e=>{this.callbacks=e};setValidateMessages=e=>{this.validateMessages=e};setPreserve=e=>{this.preserve=e};registerWatch=e=>this.watcherCenter.register(e);notifyWatch=(e=[])=>{this.watcherCenter.notify(e)};timeoutId=null;warningUnhooked=()=>{};updateStore=e=>{this.store=e};getFieldEntities=(e=!1)=>e?this.fieldEntities.filter(e=>e.getNamePath().length):this.fieldEntities;getFieldsMap=(e=!1)=>{let t=new xy;return this.getFieldEntities(e).forEach(e=>{let n=e.getNamePath();t.set(n,e)}),t};getFieldEntitiesForNamePathList=(e,t=!1)=>{if(!e)return this.getFieldEntities(!0);let n=this.getFieldsMap(!0);return t?e.flatMap(e=>{let t=ty(e),r=n.getAsPrefix(t);return r.length?r:[{INVALIDATE_NAME_PATH:t}]}):e.map(e=>{let t=ty(e);return n.get(t)||{INVALIDATE_NAME_PATH:ty(e)}})};getFieldsValue=(e,t)=>{this.warningUnhooked();let n,r;if(e===!0||Array.isArray(e)?(n=e,r=t):e&&typeof e==`object`&&(r=e.filter),n===!0&&!r)return this.store;let i=this.getFieldEntitiesForNamePathList(Array.isArray(n)?n:null,!0),a=[],o=[];i.forEach(e=>{let t=e.INVALIDATE_NAME_PATH||e.getNamePath();if(e.isList?.()){o.push(t);return}if(!r)a.push(t);else{let n=`getMeta`in e?e.getMeta():null;r(n)&&a.push(t)}});let s=ny(this.store,a.map(ty));return o.forEach(e=>{Oi(s,e)||(s=Ai(s,e,[]))}),s};getFieldValue=e=>{this.warningUnhooked();let t=ty(e);return Oi(this.store,t)};getFieldsError=e=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(e).map((t,n)=>t&&!t.INVALIDATE_NAME_PATH?{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}:{name:ty(e[n]),errors:[],warnings:[]}));getFieldError=e=>{this.warningUnhooked();let t=ty(e);return this.getFieldsError([t])[0].errors};getFieldWarning=e=>{this.warningUnhooked();let t=ty(e);return this.getFieldsError([t])[0].warnings};isFieldsTouched=(...e)=>{this.warningUnhooked();let[t,n]=e,r,i=!1;e.length===0?r=null:e.length===1?Array.isArray(t)?(r=t.map(ty),i=!1):(r=null,i=t):(r=t.map(ty),i=n);let a=this.getFieldEntities(!0),o=e=>e.isFieldTouched();if(!r)return i?a.every(e=>o(e)||e.isList()):a.some(o);let s=new xy;r.forEach(e=>{s.set(e,[])}),a.forEach(e=>{let t=e.getNamePath();r.forEach(n=>{n.every((e,n)=>t[n]===e)&&s.update(n,t=>[...t,e])})});let c=e=>e.some(o),l=s.map(({value:e})=>e);return i?l.every(c):l.some(c)};isFieldTouched=e=>(this.warningUnhooked(),this.isFieldsTouched([e]));isFieldsValidating=e=>{this.warningUnhooked();let t=this.getFieldEntities();if(!e)return t.some(e=>e.isFieldValidating());let n=e.map(ty);return t.some(e=>ry(n,e.getNamePath())&&e.isFieldValidating())};isFieldValidating=e=>(this.warningUnhooked(),this.isFieldsValidating([e]));resetWithFieldInitialValue=(e={})=>{let t=new xy,n=this.getFieldEntities(!0);n.forEach(e=>{let{initialValue:n}=e.props,r=e.getNamePath();if(n!==void 0){let i=t.get(r)||new Set;i.add({entity:e,value:n}),t.set(r,i)}});let r=n=>{n.forEach(n=>{let{initialValue:r}=n.props;if(r!==void 0){let r=n.getNamePath();if(this.getInitialValue(r)!==void 0)li(!1,`Form already set 'initialValues' with path '${r.join(`.`)}'. Field can not overwrite it.`);else{let i=t.get(r);if(i&&i.size>1)li(!1,`Multiple Field with path '${r.join(`.`)}' set 'initialValue'. Can not decide which one to pick.`);else if(i){let t=this.getFieldValue(r);!n.isListField()&&(!e.skipExist||t===void 0)&&this.updateStore(Ai(this.store,r,[...i][0].value))}}}})},i;e.entities?i=e.entities:e.namePathList?(i=[],e.namePathList.forEach(e=>{let n=t.get(e);n&&i.push(...[...n].map(e=>e.entity))})):i=n,r(i)};resetFields=e=>{this.warningUnhooked();let t=this.store;if(!e){this.updateStore(Fi(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(t,null,{type:`reset`}),this.notifyWatch();return}let n=e.map(ty);n.forEach(e=>{let t=this.getInitialValue(e);this.updateStore(Ai(this.store,e,t))}),this.resetWithFieldInitialValue({namePathList:n}),this.notifyObservers(t,n,{type:`reset`}),this.notifyWatch(n)};setFields=e=>{this.warningUnhooked();let t=this.store,n=[];e.forEach(e=>{let{name:r,...i}=e,a=ty(r);n.push(a),`value`in i&&this.updateStore(Ai(this.store,a,i.value)),this.notifyObservers(t,[a],{type:`setField`,data:e})}),this.notifyWatch(n)};getFields=()=>this.getFieldEntities(!0).map(e=>{let t=e.getNamePath(),n={...e.getMeta(),name:t,value:this.getFieldValue(t)};return Object.defineProperty(n,`originRCField`,{value:!0}),n});initEntityValue=e=>{let{initialValue:t}=e.props;if(t!==void 0){let n=e.getNamePath();Oi(this.store,n)===void 0&&this.updateStore(Ai(this.store,n,t))}};isMergedPreserve=e=>(e===void 0?this.preserve:e)??!0;registerField=e=>{this.fieldEntities.push(e);let t=e.getNamePath();if(this.notifyWatch([t]),e.props.initialValue!==void 0){let t=this.store;this.resetWithFieldInitialValue({entities:[e],skipExist:!0}),this.notifyObservers(t,[e.getNamePath()],{type:`valueUpdate`,source:`internal`})}return(n,r,i=[])=>{if(this.fieldEntities=this.fieldEntities.filter(t=>t!==e),!this.isMergedPreserve(r)&&(!n||i.length>1)){let e=n?void 0:this.getInitialValue(t);if(t.length&&this.getFieldValue(t)!==e&&this.fieldEntities.every(e=>!iy(e.getNamePath(),t))){let n=this.store;this.updateStore(Ai(n,t,e,!0)),this.notifyObservers(n,[t],{type:`remove`}),this.triggerDependenciesUpdate(n,t)}}this.notifyWatch([t])}};dispatch=e=>{switch(e.type){case`updateValue`:{let{namePath:t,value:n}=e;this.updateValue(t,n);break}case`validateField`:{let{namePath:t,triggerName:n}=e;this.validateFields([t],{triggerName:n});break}default:}};notifyObservers=(e,t,n)=>{if(this.subscribable){let r={...n,store:this.getFieldsValue(!0)};this.getFieldEntities().forEach(({onStoreChange:n})=>{n(e,t,r)})}else this.forceRootUpdate()};triggerDependenciesUpdate=(e,t)=>{let n=this.getDependencyChildrenFields(t);return n.length&&this.validateFields(n,{delayFrame:!0}),this.notifyObservers(e,n,{type:`dependenciesUpdate`,relatedFields:[t,...n]}),n};updateValue=(e,t)=>{let n=ty(e),r=this.store;this.updateStore(Ai(this.store,n,t)),this.notifyObservers(r,[n],{type:`valueUpdate`,source:`internal`}),this.notifyWatch([n]);let i=this.triggerDependenciesUpdate(r,n),{onValuesChange:a}=this.callbacks;if(a){let e=ny(this.store,[n]);a(e,Ai(this.getFieldsValue(),n,Oi(e,n)))}this.triggerOnFieldsChange([n,...i])};setFieldsValue=e=>{this.warningUnhooked();let t=this.store;if(e){let t=Fi(this.store,e);this.updateStore(t)}this.notifyObservers(t,null,{type:`valueUpdate`,source:`external`}),this.notifyWatch()};setFieldValue=(e,t)=>{this.setFields([{name:e,value:t,errors:[],warnings:[],touched:!0}])};getDependencyChildrenFields=e=>{let t=new Set,n=[],r=new xy;this.getFieldEntities().forEach(e=>{let{dependencies:t}=e.props;(t||[]).forEach(t=>{let n=ty(t);r.update(n,(t=new Set)=>(t.add(e),t))})});let i=e=>{(r.get(e)||new Set).forEach(e=>{if(!t.has(e)){t.add(e);let r=e.getNamePath();e.isFieldDirty()&&r.length&&(n.push(r),i(r))}})};return i(e),n};triggerOnFieldsChange=(e,t)=>{let{onFieldsChange:n}=this.callbacks;if(n){let r=this.getFields();if(t){let e=new xy;t.forEach(({name:t,errors:n})=>{e.set(t,n)}),r.forEach(t=>{t.errors=e.get(t.name)||t.errors})}let i=r.filter(({name:t})=>ry(e,t));i.length&&n(i,r)}};validateFields=(e,t)=>{this.warningUnhooked();let n,r;Array.isArray(e)||typeof e==`string`||typeof t==`string`?(n=e,r=t):r=e;let i=!!n,a=i?n.map(ty):[],o=[...a],s=[],c=String(Date.now()),l=new Set,{recursive:u,dirty:d}=r||{};this.getFieldEntities(!0).forEach(e=>{let t=e.getNamePath();if(i||((!e.isList()||!a.some(e=>iy(e,t,!0)))&&o.push(t),a.push(t)),!(!e.props.rules||!e.props.rules.length)&&!(d&&!e.isFieldDirty())&&(l.add(t.join(c)),!i||ry(a,t,u))){let n=e.validateRules({validateMessages:{...qv,...this.validateMessages},...r});s.push(n.then(()=>({name:t,errors:[],warnings:[]})).catch(e=>{let n=[],r=[];return e.forEach?.(({rule:{warningOnly:e},errors:t})=>{e?r.push(...t):n.push(...t)}),n.length?Promise.reject({name:t,errors:n,warnings:r}):{name:t,errors:n,warnings:r}}))}});let f=vy(s);this.lastValidatePromise=f,f.catch(e=>e).then(e=>{let t=e.map(({name:e})=>e);this.notifyObservers(this.store,t,{type:`validateFinish`}),this.triggerOnFieldsChange(t,e)});let p=f.then(()=>this.lastValidatePromise===f?Promise.resolve(this.getFieldsValue(o)):Promise.reject([])).catch(e=>{let t=e.filter(e=>e&&e.errors.length),n=t[0]?.errors?.[0];return Promise.reject({message:n,values:this.getFieldsValue(a),errorFields:t,outOfDate:this.lastValidatePromise!==f})});p.catch(e=>e);let m=a.filter(e=>l.has(e.join(c)));return this.triggerOnFieldsChange(m),p};submit=()=>{this.warningUnhooked(),this.validateFields().then(e=>{let{onFinish:t}=this.callbacks;if(t)try{t(e)}catch(e){console.error(e)}}).catch(e=>{let{onFinishFailed:t}=this.callbacks;t&&t(e)})}};function Cy(e){let t=S.useRef(null),[,n]=S.useState({});return t.current||(e?t.current=e:t.current=new Sy(()=>{n({})}).getForm()),[t.current]}var wy=S.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),Ty=({validateMessages:e,onFormChange:t,onFormFinish:n,children:r})=>{let i=S.useContext(wy),a=S.useRef({});return S.createElement(wy.Provider,{value:{...i,validateMessages:{...i.validateMessages,...e},triggerFormChange:(e,n)=>{t&&t(e,{changedFields:n,forms:a.current}),i.triggerFormChange(e,n)},triggerFormFinish:(e,t)=>{n&&n(e,{values:t,forms:a.current}),i.triggerFormFinish(e,t)},registerForm:(e,t)=>{e&&(a.current={...a.current,[e]:t}),i.registerForm(e,t)},unregisterForm:e=>{let t={...a.current};delete t[e],a.current=t,i.unregisterForm(e)}}},r)};function Ey(){return Ey=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let g=S.useRef(null),_=S.useContext(wy),[v]=Cy(r),{useSubscribe:y,setInitialValues:b,setCallbacks:x,setValidateMessages:C,setPreserve:w,destroyForm:T}=v.getInternalHooks(q_);S.useImperativeHandle(h,()=>({...v,nativeElement:g.current})),S.useEffect(()=>(_.registerForm(e,v),()=>{_.unregisterForm(e)}),[_,v,e]),C({..._.validateMessages,...s}),x({onValuesChange:l,onFieldsChange:(t,...n)=>{_.triggerFormChange(e,t),u&&u(t,...n)},onFinish:t=>{_.triggerFormFinish(e,t),d&&d(t)},onFinishFailed:f}),w(i);let E=S.useRef(null);b(t,!E.current),E.current||=!0,S.useEffect(()=>()=>T(p),[]);let D,O=typeof a==`function`;D=O?a(v.getFieldsValue(!0),v):a,y(!O);let k=S.useRef(null);S.useEffect(()=>{ay(k.current||[],n||[])||v.setFields(n||[]),k.current=n},[n,v]);let A=S.useMemo(()=>({...v,validateTrigger:c}),[v,c]),j=S.createElement(X_.Provider,{value:null},S.createElement(Y_.Provider,{value:A},D));return o===!1?j:S.createElement(o,Ey({},m,{ref:g,onSubmit:e=>{e.preventDefault(),e.stopPropagation(),v.submit()},onReset:e=>{e.preventDefault(),v.resetFields(),m.onReset?.(e)}}),j)};function Oy(e){try{return JSON.stringify(e)}catch{return Math.random()}}function ky(...e){let[t,n={}]=e,r=Q_(n)?{form:n}:n,i=r.form,[a,o]=(0,S.useState)(()=>typeof t==`function`?t({}):void 0),s=(0,S.useMemo)(()=>Oy(a),[a]),c=(0,S.useRef)(s);c.current=s;let l=(0,S.useContext)(Y_),u=i||l,d=u&&u._init,{getFieldsValue:f,getInternalHooks:p}=u,{registerWatch:m}=p(q_),h=Rn((e,n)=>{let i=r.preserve?n??f(!0):e??f(),s=typeof t==`function`?t(i):Oi(i,ty(t));Oy(a)!==Oy(s)&&o(s)});return(0,S.useEffect)(()=>{d&&h()},[d,typeof t==`function`?t:JSON.stringify(t)]),(0,S.useEffect)(()=>{if(d)return m((e,t)=>{h(e,t)})},[d]),a}var Ay=S.forwardRef(Dy);Ay.FormProvider=Ty,Ay.Field=gy,Ay.List=_y,Ay.useForm=Cy,Ay.useWatch=ky;var jy=S.createContext({labelAlign:`right`,layout:`horizontal`,itemRef:()=>{}}),My=S.createContext(null),Ny=e=>{let t=hi(e,[`prefixCls`]);return S.createElement(Ty,{...t})},Py=S.createContext({prefixCls:``}),Fy=S.createContext({}),Iy=({children:e,status:t,override:n})=>{let r=S.useContext(Fy),i=S.useMemo(()=>{let e={...r};return n&&delete e.isFormItemInput,t&&(delete e.status,delete e.hasFeedback,delete e.feedbackIcon),e},[t,n,r]);return S.createElement(Fy.Provider,{value:i},e)},Ly=S.createContext(void 0),Ry=e=>{let{space:t,form:n,children:r}=e;if(!Zd(r))return null;let i=r;return n&&(i=S.createElement(Iy,{override:!0,status:!0},i)),t&&(i=S.createElement(Mh,null,i)),i},zy=()=>zn()&&window.document.documentElement;function By(e,t,n){return(0,S.useMemo)(()=>({trap:t??!0,focusTriggerAfterClose:n??!0,...e}),[e,t,n])}var Vy=e=>{let{prefixCls:t,className:n,style:r,size:i,shape:a}=e,o=Y({[`${t}-lg`]:i===`large`,[`${t}-sm`]:i===`small`}),s=Y({[`${t}-circle`]:a===`circle`,[`${t}-square`]:a===`square`,[`${t}-round`]:a===`round`}),c=S.useMemo(()=>Qd(i)?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return S.createElement(`span`,{className:Y(t,o,s,n),style:{...c,...r}})},Hy=new As(`ant-skeleton-loading`,{"0%":{backgroundPosition:`100% 50%`},"100%":{backgroundPosition:`0 50%`}}),Uy=e=>({height:e,lineHeight:X(e)}),Wy=e=>({width:e,...Uy(e)}),lee=e=>({background:e.skeletonLoadingBackground,backgroundSize:`400% 100%`,animationName:Hy,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:`ease`,animationIterationCount:`infinite`}),Gy=(e,t)=>({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal(),...Uy(e)}),uee=e=>{let{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:i,controlHeightSM:a}=e;return{[t]:{display:`inline-block`,verticalAlign:`top`,background:n,...Wy(r)},[`${t}${t}-circle`]:{borderRadius:`50%`},[`${t}${t}-lg`]:{...Wy(i)},[`${t}${t}-sm`]:{...Wy(a)}}},dee=e=>{let{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:i,controlHeightSM:a,gradientFromColor:o,calc:s}=e;return{[r]:{display:`inline-block`,verticalAlign:`top`,background:o,borderRadius:n,...Gy(t,s)},[`${r}-lg`]:{...Gy(i,s)},[`${r}-sm`]:{...Gy(a,s)}}},Ky=e=>{let{gradientFromColor:t,borderRadiusSM:n,imageSizeBase:r,calc:i}=e;return{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,verticalAlign:`middle`,background:t,borderRadius:n,...Wy(i(r).mul(2).equal())}},fee=e=>({[e.skeletonNodeCls]:{...Ky(e)}}),pee=e=>{let{skeletonImageCls:t,imageSizeBase:n,calc:r}=e;return{[t]:{...Ky(e),[`${t}-path`]:{fill:`#bfbfbf`},[`${t}-svg`]:{...Wy(n),maxWidth:r(n).mul(4).equal(),maxHeight:r(n).mul(4).equal()},[`${t}-svg${t}-svg-circle`]:{borderRadius:`50%`}},[`${t}${t}-circle`]:{borderRadius:`50%`}}},qy=(e,t,n)=>{let{skeletonButtonCls:r}=e;return{[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:`50%`},[`${n}${r}-round`]:{borderRadius:t}}},Jy=(e,t)=>({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal(),...Uy(e)}),mee=e=>{let{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:i,controlHeightSM:a,gradientFromColor:o,calc:s}=e;return{[n]:{display:`inline-block`,verticalAlign:`top`,background:o,borderRadius:t,width:s(r).mul(2).equal(),minWidth:s(r).mul(2).equal(),...Jy(r,s)},...qy(e,r,n),[`${n}-lg`]:{...Jy(i,s)},...qy(e,i,`${n}-lg`),[`${n}-sm`]:{...Jy(a,s)},...qy(e,a,`${n}-sm`)}},hee=e=>{let{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:i,skeletonButtonCls:a,skeletonInputCls:o,skeletonNodeCls:s,skeletonImageCls:c,controlHeight:l,controlHeightLG:u,controlHeightSM:d,gradientFromColor:f,padding:p,marginSM:m,borderRadius:h,titleHeight:g,blockRadius:_,paragraphLiHeight:v,controlHeightXS:y,paragraphMarginTop:b}=e;return{[t]:{display:`table`,width:`100%`,[`${t}-header`]:{display:`table-cell`,paddingInlineEnd:p,verticalAlign:`top`,[n]:{display:`inline-block`,verticalAlign:`top`,background:f,...Wy(l)},[`${n}-circle`]:{borderRadius:`50%`},[`${n}-lg`]:{...Wy(u)},[`${n}-sm`]:{...Wy(d)}},[`${t}-section`]:{display:`table-cell`,width:`100%`,verticalAlign:`top`,[r]:{width:`100%`,height:g,background:f,borderRadius:_,[`+ ${i}`]:{marginBlockStart:d}},[i]:{padding:0,"> li":{width:`100%`,height:v,listStyle:`none`,background:f,borderRadius:_,"+ li":{marginBlockStart:y}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:`61%`}},[`&-round ${t}-section`]:{[`${r}, ${i} > li`]:{borderRadius:h}}},[`${t}-with-avatar ${t}-section`]:{[r]:{marginBlockStart:m,[`+ ${i}`]:{marginBlockStart:b}}},[`${t}${t}-element`]:{display:`inline-block`,width:`auto`,...mee(e),...uee(e),...dee(e),...fee(e),...pee(e)},[`${t}${t}-block`]:{width:`100%`,[a]:{width:`100%`},[o]:{width:`100%`}},[`${t}${t}-active`]:{[` ${r}, ${i} > li, ${n}, @@ -164,12 +164,12 @@ html body { ${o}, ${s}, ${c} - `]:{...cee(e)}}}},Xy=Xl(`Skeleton`,e=>{let{componentCls:t,calc:n}=e;return mee(lc(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonNodeCls:`${t}-node`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:`1.4s`}))},e=>{let{colorFillContent:t,colorFill:n}=e,r=t,i=n;return{color:r,colorGradientEnd:i,gradientFromColor:r,gradientToColor:i,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[[`color`,`gradientFromColor`],[`colorGradientEnd`,`gradientToColor`]]}),hee=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,active:a,style:o,styles:s,shape:c=`circle`,size:l,...u}=e,{getPrefixCls:d}=S.useContext(ma),f=d(`skeleton`,t),[p,m]=Xy(f),h=Oh(e=>l??e),g=Y(f,`${f}-element`,{[`${f}-active`]:a},r?.root,n,i,p,m);return S.createElement(`div`,{className:g,style:s?.root},S.createElement(Hy,{prefixCls:`${f}-avatar`,className:r?.content,style:{...s?.content,...o},shape:c,size:h,...u}))},gee=e=>{let{prefixCls:t,className:n,rootClassName:r,classNames:i,active:a,style:o,styles:s,block:c=!1,size:l,...u}=e,{getPrefixCls:d}=S.useContext(ma),f=d(`skeleton`,t),[p,m]=Xy(f),h=Oh(e=>l??e),g=Y(f,`${f}-element`,{[`${f}-active`]:a,[`${f}-block`]:c},i?.root,n,r,p,m);return S.createElement(`div`,{className:g,style:s?.root},S.createElement(Hy,{prefixCls:`${f}-button`,className:i?.content,style:{...s?.content,...o},size:h,...u}))},Zy=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,internalClassName:a,style:o,styles:s,active:c,children:l}=e,{getPrefixCls:u}=S.useContext(ma),d=u(`skeleton`,t),[f,p]=Xy(d),m=Y(d,`${d}-element`,{[`${d}-active`]:c},f,r?.root,n,i,p);return S.createElement(`div`,{className:m,style:s?.root},S.createElement(`div`,{className:Y(r?.content,a||`${d}-node`),style:{...s?.content,...o}},l))},_ee=e=>{let{getPrefixCls:t}=S.useContext(ma),n=t(`skeleton`,e.prefixCls);return S.createElement(Zy,{...e,internalClassName:`${n}-image`},S.createElement(`svg`,{viewBox:`0 0 1098 1024`,xmlns:`http://www.w3.org/2000/svg`,className:`${n}-image-svg`},S.createElement(`title`,null,`Image placeholder`),S.createElement(`path`,{d:`M365.7 329.1q0 45.8-32 77.7t-77.7 32-77.7-32-32-77.7 32-77.6 77.7-32 77.7 32 32 77.6M951 548.6v256H146.3V694.9L329 512l91.5 91.4L713 311zm54.8-402.3H91.4q-7.4 0-12.8 5.4T73 164.6v694.8q0 7.5 5.5 12.9t12.8 5.4h914.3q7.5 0 12.9-5.4t5.4-12.9V164.6q0-7.5-5.4-12.9t-12.9-5.4m91.4 18.3v694.8q0 37.8-26.8 64.6t-64.6 26.9H91.4q-37.7 0-64.6-26.9T0 859.4V164.6q0-37.8 26.8-64.6T91.4 73h914.3q37.8 0 64.6 26.9t26.8 64.6`,className:`${n}-image-path`})))},vee=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,active:a,block:o,style:s,styles:c,size:l,...u}=e,{getPrefixCls:d}=S.useContext(ma),f=d(`skeleton`,t),[p,m]=Xy(f),h=Oh(e=>l??e),g=Y(f,`${f}-element`,{[`${f}-active`]:a,[`${f}-block`]:o},r?.root,n,i,p,m);return S.createElement(`div`,{className:g,style:c?.root},S.createElement(Hy,{prefixCls:`${f}-input`,className:r?.content,style:{...c?.content,...s},size:h,...u}))},yee=(e,t)=>{let{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},bee=e=>{let{prefixCls:t,className:n,style:r,rows:i=0}=e,a=Array.from({length:i}).map((t,n)=>S.createElement(`li`,{key:n,style:{width:yee(n,e)}}));return S.createElement(`ul`,{className:Y(t,n),style:r},a)},xee=({prefixCls:e,className:t,width:n,style:r})=>S.createElement(`h3`,{className:Y(e,t),style:{width:n,...r}});function Qy(e){return ef(e)?e:{}}function See(e,t){return e&&!t?{size:`large`,shape:`square`}:{size:`large`,shape:`circle`}}function Cee(e,t){return!e&&t?{width:`38%`}:e&&t?{width:`50%`}:{}}function wee(e,t){let n={};return(!e||!t)&&(n.width=`61%`),!e&&t?n.rows=3:n.rows=2,n}var $y=e=>{let{prefixCls:t,loading:n,className:r,rootClassName:i,classNames:a,style:o,styles:s,children:c,avatar:l=!1,title:u=!0,paragraph:d=!0,active:f,round:p}=e,{getPrefixCls:m,direction:h,className:g,style:_,classNames:v,styles:y}=_a(`skeleton`),b=m(`skeleton`,t),[x,C]=Xy(b),w={...e,avatar:l,title:u,paragraph:d},[T,E]=xf([v,a],[y,s],{props:w});if(n||!(`loading`in e)){let e=!!l,t=!!u,n=!!d,a;if(e){let e={className:T.avatar,prefixCls:`${b}-avatar`,...See(t,n),...Qy(l),style:E.avatar};a=S.createElement(`div`,{className:Y(T.header,`${b}-header`),style:E.header},S.createElement(Hy,{...e}))}let s;if(t||n){let r;if(t){let t={className:T.title,prefixCls:`${b}-title`,...Cee(e,n),...Qy(u),style:E.title};r=S.createElement(xee,{...t})}let i;if(n){let n={className:T.paragraph,prefixCls:`${b}-paragraph`,...wee(e,t),...Qy(d),style:E.paragraph};i=S.createElement(bee,{...n})}s=S.createElement(`div`,{className:Y(T.section,`${b}-section`),style:E.section},r,i)}let c=Y(b,{[`${b}-with-avatar`]:e,[`${b}-active`]:f,[`${b}-rtl`]:h===`rtl`,[`${b}-round`]:p},T.root,g,r,i,x,C);return S.createElement(`div`,{className:c,style:{...E.root,..._,...o}},a,s)}return c??null};$y.Button=gee,$y.Avatar=hee,$y.Input=vee,$y.Image=_ee,$y.Node=Zy;var eb=$y;function tb(){}var nb=S.createContext({add:tb,remove:tb});function rb(e){let t=S.useContext(nb),n=S.useRef(null);return Rn(r=>{if(r){let i=e?r.querySelector(e):r;i&&(t.add(i),n.current=i)}else t.remove(n.current)})}var ib=()=>{let{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=(0,S.useContext)(O_);return S.createElement(E_,{onClick:n,...e},t)},ab=()=>{let{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:r,onOk:i}=(0,S.useContext)(O_);return S.createElement(E_,{...zh(n),loading:e,onClick:i,...t},r)};function ob(e,t){return S.createElement(`span`,{className:`${e}-close-x`},t||S.createElement(ku,{className:`${e}-close-icon`}))}var sb=e=>{let{okText:t,okType:n=`primary`,cancelText:r,confirmLoading:i,onOk:a,onCancel:o,okButtonProps:s,cancelButtonProps:c,footer:l}=e,[u]=qd(`Modal`,Gd()),d=t||u?.okText,f=r||u?.cancelText,p=S.useMemo(()=>({confirmLoading:i,okButtonProps:s,cancelButtonProps:c,okTextLocale:d,cancelTextLocale:f,okType:n,onOk:a,onCancel:o}),[i,s,c,d,f,n,a,o]),m;return typeof l==`function`||l===void 0?(m=S.createElement(S.Fragment,null,S.createElement(ib,null),S.createElement(ab,null)),typeof l==`function`&&(m=l(m,{OkBtn:ab,CancelBtn:ib})),m=S.createElement(k_,{value:p},m)):m=l,S.createElement(mm,{disabled:!1},m)},cb=e=>{let{componentCls:t}=e;return{[t]:{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`}}}},lb=e=>{let{componentCls:t}=e;return{[t]:{position:`relative`,maxWidth:`100%`,minHeight:1}}},ub=(e,t)=>{let{componentCls:n,gridColumns:r,antCls:i}=e,[a,o]=$l(i,`grid`),[,s]=$l(i,`col`),c={};for(let e=r;e>=0;e--)e===0?(c[`${n}${t}-${e}`]={display:`none`},c[`${n}-push-${e}`]={insetInlineStart:`auto`},c[`${n}-pull-${e}`]={insetInlineEnd:`auto`},c[`${n}${t}-push-${e}`]={insetInlineStart:`auto`},c[`${n}${t}-pull-${e}`]={insetInlineEnd:`auto`},c[`${n}${t}-offset-${e}`]={marginInlineStart:0},c[`${n}${t}-order-${e}`]={order:0}):(c[`${n}${t}-${e}`]=[{[a(`display`)]:`block`,display:`block`},{display:o(`display`),flex:`0 0 ${e/r*100}%`,maxWidth:`${e/r*100}%`}],c[`${n}${t}-push-${e}`]={insetInlineStart:`${e/r*100}%`},c[`${n}${t}-pull-${e}`]={insetInlineEnd:`${e/r*100}%`},c[`${n}${t}-offset-${e}`]={marginInlineStart:`${e/r*100}%`},c[`${n}${t}-order-${e}`]={order:e});return c[`${n}${t}-flex`]={flex:s(`${t.replace(/-/,``)}-flex`)},c},db=(e,t)=>ub(e,t),fb=(e,t,n)=>({[`@media (min-width: ${X(t)})`]:{...db(e,n)}}),pb=()=>({}),mb=()=>({}),hb=Xl(`Grid`,cb,pb),gb=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin,xxxl:e.screenXXXLMin}),_b=Xl(`Grid`,e=>{let t=lc(e,{gridColumns:24}),n=gb(t);return delete n.xs,[lb(t),db(t,``),db(t,`-xs`),Object.keys(n).map(e=>fb(t,n[e],`-${e}`)).reduce((e,t)=>({...e,...t}),{})]},mb);function vb(e){return{position:e,inset:0}}var yb=e=>{let{componentCls:t,antCls:n}=e;return[{[`${t}-root`]:{[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]:{transform:`none`,opacity:0,animationDuration:e.motionDurationSlow,userSelect:`none`},[`${t}${n}-zoom-leave ${t}-container`]:{pointerEvents:`none`},[`${t}-mask`]:{...vb(`fixed`),zIndex:e.zIndexPopupBase,height:`100%`,backgroundColor:e.colorBgMask,pointerEvents:`none`,[`&${t}-mask-blur`]:{backdropFilter:`blur(4px)`},[`${t}-hidden`]:{display:`none`}},[`${t}-wrap`]:{...vb(`fixed`),zIndex:e.zIndexPopupBase,overflow:`auto`,outline:0,WebkitOverflowScrolling:`touch`}}},{[`${t}-root`]:$h(e)}]},bb=e=>{let{componentCls:t,motionDurationMid:n}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:`rtl`},[`${t}-centered`]:{textAlign:`center`,"&::before":{display:`inline-block`,width:0,height:`100%`,verticalAlign:`middle`,content:`""`},[t]:{top:0,display:`inline-block`,paddingBottom:0,textAlign:`start`,verticalAlign:`middle`}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:`calc(100vw - 16px)`,margin:`${X(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:{...Vl(e),pointerEvents:`none`,position:`relative`,top:100,width:`auto`,maxWidth:`calc(100vw - ${X(e.calc(e.margin).mul(2).equal())})`,margin:`0 auto`,"&:focus-visible":{borderRadius:e.borderRadiusLG,...Wl(e)},[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:`break-word`},[`${t}-container`]:{position:`relative`,backgroundColor:e.contentBg,backgroundClip:`padding-box`,border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:`auto`,padding:e.contentPadding},[`${t}-close`]:{position:`absolute`,top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:`none`,background:`transparent`,borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:`pointer`,transition:[`color`,`background-color`].map(e=>`${e} ${n}`).join(`, `),"&-x":{display:`flex`,fontSize:e.fontSizeLG,fontStyle:`normal`,lineHeight:X(e.modalCloseBtnSize),justifyContent:`center`,textTransform:`none`,textRendering:`auto`},"&:disabled":{pointerEvents:`none`},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:`none`},"&:active":{backgroundColor:e.colorBgTextActive},...Gl(e)},[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:`break-word`,padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`${X(e.margin)} auto`}},[`${t}-footer`]:{textAlign:`end`,background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:`hidden`}}},{[`${t}-pure-panel`]:{top:`auto`,padding:0,display:`flex`,flexDirection:`column`,[`${t}-container, + `]:{...lee(e)}}}},Yy=Xl(`Skeleton`,e=>{let{componentCls:t,calc:n}=e;return hee(lc(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonNodeCls:`${t}-node`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:`1.4s`}))},e=>{let{colorFillContent:t,colorFill:n}=e,r=t,i=n;return{color:r,colorGradientEnd:i,gradientFromColor:r,gradientToColor:i,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[[`color`,`gradientFromColor`],[`colorGradientEnd`,`gradientToColor`]]}),gee=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,active:a,style:o,styles:s,shape:c=`circle`,size:l,...u}=e,{getPrefixCls:d}=S.useContext(ma),f=d(`skeleton`,t),[p,m]=Yy(f),h=Oh(e=>l??e),g=Y(f,`${f}-element`,{[`${f}-active`]:a},r?.root,n,i,p,m);return S.createElement(`div`,{className:g,style:s?.root},S.createElement(Vy,{prefixCls:`${f}-avatar`,className:r?.content,style:{...s?.content,...o},shape:c,size:h,...u}))},_ee=e=>{let{prefixCls:t,className:n,rootClassName:r,classNames:i,active:a,style:o,styles:s,block:c=!1,size:l,...u}=e,{getPrefixCls:d}=S.useContext(ma),f=d(`skeleton`,t),[p,m]=Yy(f),h=Oh(e=>l??e),g=Y(f,`${f}-element`,{[`${f}-active`]:a,[`${f}-block`]:c},i?.root,n,r,p,m);return S.createElement(`div`,{className:g,style:s?.root},S.createElement(Vy,{prefixCls:`${f}-button`,className:i?.content,style:{...s?.content,...o},size:h,...u}))},Xy=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,internalClassName:a,style:o,styles:s,active:c,children:l}=e,{getPrefixCls:u}=S.useContext(ma),d=u(`skeleton`,t),[f,p]=Yy(d),m=Y(d,`${d}-element`,{[`${d}-active`]:c},f,r?.root,n,i,p);return S.createElement(`div`,{className:m,style:s?.root},S.createElement(`div`,{className:Y(r?.content,a||`${d}-node`),style:{...s?.content,...o}},l))},vee=e=>{let{getPrefixCls:t}=S.useContext(ma),n=t(`skeleton`,e.prefixCls);return S.createElement(Xy,{...e,internalClassName:`${n}-image`},S.createElement(`svg`,{viewBox:`0 0 1098 1024`,xmlns:`http://www.w3.org/2000/svg`,className:`${n}-image-svg`},S.createElement(`title`,null,`Image placeholder`),S.createElement(`path`,{d:`M365.7 329.1q0 45.8-32 77.7t-77.7 32-77.7-32-32-77.7 32-77.6 77.7-32 77.7 32 32 77.6M951 548.6v256H146.3V694.9L329 512l91.5 91.4L713 311zm54.8-402.3H91.4q-7.4 0-12.8 5.4T73 164.6v694.8q0 7.5 5.5 12.9t12.8 5.4h914.3q7.5 0 12.9-5.4t5.4-12.9V164.6q0-7.5-5.4-12.9t-12.9-5.4m91.4 18.3v694.8q0 37.8-26.8 64.6t-64.6 26.9H91.4q-37.7 0-64.6-26.9T0 859.4V164.6q0-37.8 26.8-64.6T91.4 73h914.3q37.8 0 64.6 26.9t26.8 64.6`,className:`${n}-image-path`})))},yee=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,active:a,block:o,style:s,styles:c,size:l,...u}=e,{getPrefixCls:d}=S.useContext(ma),f=d(`skeleton`,t),[p,m]=Yy(f),h=Oh(e=>l??e),g=Y(f,`${f}-element`,{[`${f}-active`]:a,[`${f}-block`]:o},r?.root,n,i,p,m);return S.createElement(`div`,{className:g,style:c?.root},S.createElement(Vy,{prefixCls:`${f}-input`,className:r?.content,style:{...c?.content,...s},size:h,...u}))},bee=(e,t)=>{let{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},xee=e=>{let{prefixCls:t,className:n,style:r,rows:i=0}=e,a=Array.from({length:i}).map((t,n)=>S.createElement(`li`,{key:n,style:{width:bee(n,e)}}));return S.createElement(`ul`,{className:Y(t,n),style:r},a)},See=({prefixCls:e,className:t,width:n,style:r})=>S.createElement(`h3`,{className:Y(e,t),style:{width:n,...r}});function Zy(e){return ef(e)?e:{}}function Cee(e,t){return e&&!t?{size:`large`,shape:`square`}:{size:`large`,shape:`circle`}}function wee(e,t){return!e&&t?{width:`38%`}:e&&t?{width:`50%`}:{}}function Tee(e,t){let n={};return(!e||!t)&&(n.width=`61%`),!e&&t?n.rows=3:n.rows=2,n}var Qy=e=>{let{prefixCls:t,loading:n,className:r,rootClassName:i,classNames:a,style:o,styles:s,children:c,avatar:l=!1,title:u=!0,paragraph:d=!0,active:f,round:p}=e,{getPrefixCls:m,direction:h,className:g,style:_,classNames:v,styles:y}=_a(`skeleton`),b=m(`skeleton`,t),[x,C]=Yy(b),w={...e,avatar:l,title:u,paragraph:d},[T,E]=xf([v,a],[y,s],{props:w});if(n||!(`loading`in e)){let e=!!l,t=!!u,n=!!d,a;if(e){let e={className:T.avatar,prefixCls:`${b}-avatar`,...Cee(t,n),...Zy(l),style:E.avatar};a=S.createElement(`div`,{className:Y(T.header,`${b}-header`),style:E.header},S.createElement(Vy,{...e}))}let s;if(t||n){let r;if(t){let t={className:T.title,prefixCls:`${b}-title`,...wee(e,n),...Zy(u),style:E.title};r=S.createElement(See,{...t})}let i;if(n){let n={className:T.paragraph,prefixCls:`${b}-paragraph`,...Tee(e,t),...Zy(d),style:E.paragraph};i=S.createElement(xee,{...n})}s=S.createElement(`div`,{className:Y(T.section,`${b}-section`),style:E.section},r,i)}let c=Y(b,{[`${b}-with-avatar`]:e,[`${b}-active`]:f,[`${b}-rtl`]:h===`rtl`,[`${b}-round`]:p},T.root,g,r,i,x,C);return S.createElement(`div`,{className:c,style:{...E.root,..._,...o}},a,s)}return c??null};Qy.Button=_ee,Qy.Avatar=gee,Qy.Input=yee,Qy.Image=vee,Qy.Node=Xy;var $y=Qy;function eb(){}var tb=S.createContext({add:eb,remove:eb});function nb(e){let t=S.useContext(tb),n=S.useRef(null);return Rn(r=>{if(r){let i=e?r.querySelector(e):r;i&&(t.add(i),n.current=i)}else t.remove(n.current)})}var rb=()=>{let{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=(0,S.useContext)(O_);return S.createElement(E_,{onClick:n,...e},t)},ib=()=>{let{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:r,onOk:i}=(0,S.useContext)(O_);return S.createElement(E_,{...zh(n),loading:e,onClick:i,...t},r)};function ab(e,t){return S.createElement(`span`,{className:`${e}-close-x`},t||S.createElement(ku,{className:`${e}-close-icon`}))}var ob=e=>{let{okText:t,okType:n=`primary`,cancelText:r,confirmLoading:i,onOk:a,onCancel:o,okButtonProps:s,cancelButtonProps:c,footer:l}=e,[u]=qd(`Modal`,Gd()),d=t||u?.okText,f=r||u?.cancelText,p=S.useMemo(()=>({confirmLoading:i,okButtonProps:s,cancelButtonProps:c,okTextLocale:d,cancelTextLocale:f,okType:n,onOk:a,onCancel:o}),[i,s,c,d,f,n,a,o]),m;return typeof l==`function`||l===void 0?(m=S.createElement(S.Fragment,null,S.createElement(rb,null),S.createElement(ib,null)),typeof l==`function`&&(m=l(m,{OkBtn:ib,CancelBtn:rb})),m=S.createElement(k_,{value:p},m)):m=l,S.createElement(mm,{disabled:!1},m)},sb=e=>{let{componentCls:t}=e;return{[t]:{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`}}}},cb=e=>{let{componentCls:t}=e;return{[t]:{position:`relative`,maxWidth:`100%`,minHeight:1}}},lb=(e,t)=>{let{componentCls:n,gridColumns:r,antCls:i}=e,[a,o]=$l(i,`grid`),[,s]=$l(i,`col`),c={};for(let e=r;e>=0;e--)e===0?(c[`${n}${t}-${e}`]={display:`none`},c[`${n}-push-${e}`]={insetInlineStart:`auto`},c[`${n}-pull-${e}`]={insetInlineEnd:`auto`},c[`${n}${t}-push-${e}`]={insetInlineStart:`auto`},c[`${n}${t}-pull-${e}`]={insetInlineEnd:`auto`},c[`${n}${t}-offset-${e}`]={marginInlineStart:0},c[`${n}${t}-order-${e}`]={order:0}):(c[`${n}${t}-${e}`]=[{[a(`display`)]:`block`,display:`block`},{display:o(`display`),flex:`0 0 ${e/r*100}%`,maxWidth:`${e/r*100}%`}],c[`${n}${t}-push-${e}`]={insetInlineStart:`${e/r*100}%`},c[`${n}${t}-pull-${e}`]={insetInlineEnd:`${e/r*100}%`},c[`${n}${t}-offset-${e}`]={marginInlineStart:`${e/r*100}%`},c[`${n}${t}-order-${e}`]={order:e});return c[`${n}${t}-flex`]={flex:s(`${t.replace(/-/,``)}-flex`)},c},ub=(e,t)=>lb(e,t),db=(e,t,n)=>({[`@media (min-width: ${X(t)})`]:{...ub(e,n)}}),fb=()=>({}),pb=()=>({}),mb=Xl(`Grid`,sb,fb),hb=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin,xxxl:e.screenXXXLMin}),gb=Xl(`Grid`,e=>{let t=lc(e,{gridColumns:24}),n=hb(t);return delete n.xs,[cb(t),ub(t,``),ub(t,`-xs`),Object.keys(n).map(e=>db(t,n[e],`-${e}`)).reduce((e,t)=>({...e,...t}),{})]},pb);function _b(e){return{position:e,inset:0}}var vb=e=>{let{componentCls:t,antCls:n}=e;return[{[`${t}-root`]:{[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]:{transform:`none`,opacity:0,animationDuration:e.motionDurationSlow,userSelect:`none`},[`${t}${n}-zoom-leave ${t}-container`]:{pointerEvents:`none`},[`${t}-mask`]:{..._b(`fixed`),zIndex:e.zIndexPopupBase,height:`100%`,backgroundColor:e.colorBgMask,pointerEvents:`none`,[`&${t}-mask-blur`]:{backdropFilter:`blur(4px)`},[`${t}-hidden`]:{display:`none`}},[`${t}-wrap`]:{..._b(`fixed`),zIndex:e.zIndexPopupBase,overflow:`auto`,outline:0,WebkitOverflowScrolling:`touch`}}},{[`${t}-root`]:$h(e)}]},yb=e=>{let{componentCls:t,motionDurationMid:n}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:`rtl`},[`${t}-centered`]:{textAlign:`center`,"&::before":{display:`inline-block`,width:0,height:`100%`,verticalAlign:`middle`,content:`""`},[t]:{top:0,display:`inline-block`,paddingBottom:0,textAlign:`start`,verticalAlign:`middle`}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:`calc(100vw - 16px)`,margin:`${X(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:{...Vl(e),pointerEvents:`none`,position:`relative`,top:100,width:`auto`,maxWidth:`calc(100vw - ${X(e.calc(e.margin).mul(2).equal())})`,margin:`0 auto`,"&:focus-visible":{borderRadius:e.borderRadiusLG,...Wl(e)},[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:`break-word`},[`${t}-container`]:{position:`relative`,backgroundColor:e.contentBg,backgroundClip:`padding-box`,border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:`auto`,padding:e.contentPadding},[`${t}-close`]:{position:`absolute`,top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:`none`,background:`transparent`,borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:`pointer`,transition:[`color`,`background-color`].map(e=>`${e} ${n}`).join(`, `),"&-x":{display:`flex`,fontSize:e.fontSizeLG,fontStyle:`normal`,lineHeight:X(e.modalCloseBtnSize),justifyContent:`center`,textTransform:`none`,textRendering:`auto`},"&:disabled":{pointerEvents:`none`},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:`none`},"&:active":{backgroundColor:e.colorBgTextActive},...Gl(e)},[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:`break-word`,padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`${X(e.margin)} auto`}},[`${t}-footer`]:{textAlign:`end`,background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:`hidden`}}},{[`${t}-pure-panel`]:{top:`auto`,padding:0,display:`flex`,flexDirection:`column`,[`${t}-container, ${t}-body, - ${t}-confirm-body-wrapper`]:{display:`flex`,flexDirection:`column`,flex:`auto`},[`${t}-confirm-body`]:{marginBottom:`auto`}}}]},xb=e=>{let{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:`rtl`,[`${t}-confirm-body`]:{direction:`rtl`}}}}},Sb=e=>{let{componentCls:t}=e,n=gb(e),r={...n};delete r.xs;let i=`--${t.replace(`.`,``)}-`,a=Object.keys(r).map(e=>({[`@media (min-width: ${X(r[e])})`]:{width:`var(${i}${e}-width)`}}));return{[`${t}-root`]:{[t]:[].concat(da(Object.keys(n).map((e,t)=>{let r=Object.keys(n)[t-1];return r?{[`${i}${e}-width`]:`var(${i}${r}-width)`}:null})),[{width:`var(${i}xs-width)`}],da(a))}}},Cb=e=>{let t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return lc(e,{modalHeaderHeight:e.calc(e.calc(r).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},wb=e=>({footerBg:`transparent`,headerBg:`transparent`,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${X(e.paddingMD)} ${X(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${X(e.padding)} ${X(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:`none`,headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${X(e.paddingXS)} ${X(e.padding)}`:0,footerBorderTop:e.wireframe?`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:`none`,footerBorderRadius:e.wireframe?`0 0 ${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${X(e.padding*2)} ${X(e.padding*2)} ${X(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM,mask:!0}),Tb=Xl(`Modal`,e=>{let t=Cb(e);return[bb(t),xb(t),yb(t),Mg(t,`zoom`),Sb(t)]},wb,{unitless:{titleLineHeight:!0}}),Eb;By()&&document.documentElement.addEventListener(`click`,e=>{Eb={x:e.pageX,y:e.pageY},setTimeout(()=>{Eb=null},100)},!0);var Db=e=>{let{prefixCls:t,className:n,rootClassName:r,open:i,wrapClassName:a,centered:o,getContainer:s,style:c,width:l=520,footer:u,classNames:d,styles:f,children:p,loading:m,confirmLoading:h,zIndex:g,mousePosition:_,onOk:v,onCancel:y,okButtonProps:b,cancelButtonProps:x,destroyOnHidden:C,destroyOnClose:w,panelRef:T=null,closable:E,mask:D,modalRender:O,maskClosable:k,focusTriggerAfterClose:A,focusable:j,...M}=e,{getPopupContainer:N,getPrefixCls:P,direction:F,className:I,style:L,classNames:R,styles:z,centered:B,cancelButtonProps:V,okButtonProps:H,mask:U}=_a(`modal`),{modal:ee}=S.useContext(ma),[te,ne]=S.useMemo(()=>typeof E==`boolean`?[void 0,void 0]:[E?.afterClose,E?.onClose],[E]),W=P(`modal`,t),re=P(),[G,K,q]=mf(D,U,W,k),ie=Vy(j,G,A),J=e=>{h||(y?.(e),ne?.())},ae=e=>{v?.(e),ne?.()},oe=ap(W),[se,ce]=Tb(W,oe),le=Y(a,{[`${W}-centered`]:o??B,[`${W}-wrap-rtl`]:F===`rtl`}),ue=u!==null&&!m?S.createElement(sb,{...e,okButtonProps:{...H,...b},onOk:ae,cancelButtonProps:{...V,...x},onCancel:J}):null,[de,fe,pe,me]=df(af(e),af(ee),{closable:!0,closeIcon:S.createElement(ku,{className:`${W}-close-icon`}),closeIconRender:e=>ob(W,e)}),he=de?{disabled:pe,closeIcon:fe,afterClose:te,...me}:!1,ge=O?e=>S.createElement(`div`,{className:`${W}-render`},O(e)):void 0,_e=sr(T,rb(`.${W}-${O?`render`:`container`}`)),[ve,ye]=Ff(`Modal`,g),be={...e,width:l,panelRef:T,focusTriggerAfterClose:ie.focusTriggerAfterClose,focusable:ie,mask:G,maskClosable:q,zIndex:ve},[xe,Se]=xf([R,d,K],[z,f],{props:be}),[Ce,we]=S.useMemo(()=>ef(l)?[void 0,l]:[l,void 0],[l]),Te=S.useMemo(()=>{let e={};return we&&Object.keys(we).forEach(t=>{let n=we[t];Zd(n)&&(e[`--${W}-${t}-width`]=Qd(n)?`${n}px`:n)}),e},[W,we]);return S.createElement(zy,{form:!0,space:!0},S.createElement(kf.Provider,{value:ye},S.createElement(K_,{width:Ce,...M,zIndex:ve,getContainer:s===void 0?N:s,prefixCls:W,rootClassName:Y(se,r,ce,oe,xe.root),rootStyle:Se.root,footer:ue,visible:i,mousePosition:_??Eb,onClose:J,closable:he,closeIcon:fe,transitionName:vh(re,`zoom`,e.transitionName),maskTransitionName:vh(re,`fade`,e.maskTransitionName),mask:G,maskClosable:q,className:Y(se,n,I),style:{...L,...c,...Te},classNames:{...xe,wrapper:Y(xe.wrapper,le)},styles:Se,panelRef:_e,destroyOnHidden:C??w,modalRender:ge,focusTriggerAfterClose:ie.focusTriggerAfterClose,focusTrap:ie.trap},m?S.createElement(eb,{active:!0,title:!1,paragraph:{rows:4},className:`${W}-body-skeleton`}):p)))},Ob=e=>{let{componentCls:t,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:i,fontSize:a,lineHeight:o,modalTitleHeight:s,fontHeight:c,confirmBodyPadding:l}=e,u=`${t}-confirm`;return{[u]:{"&-rtl":{direction:`rtl`},[`${e.antCls}-modal-header`]:{display:`none`},[`${u}-body-wrapper`]:{...Ul()},[`&${t} ${t}-body`]:{padding:l},[`${u}-body`]:{display:`flex`,flexWrap:`nowrap`,alignItems:`start`,[`> ${e.iconCls}`]:{flex:`none`,fontSize:i,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(c).sub(i).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(s).sub(i).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:`flex`,flexDirection:`column`,flex:`auto`,rowGap:e.marginXS,maxWidth:`calc(100% - ${X(e.marginSM)})`},[`${u}-body-no-icon ${u}-paragraph`]:{maxWidth:`100%`},[`${e.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${X(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${u}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:r},[`${u}-container`]:{color:e.colorText,fontSize:a,lineHeight:o},[`${u}-btns`]:{textAlign:`end`,marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${u}-error ${u}-body > ${e.iconCls}`]:{color:e.colorError},[`${u}-warning ${u}-body > ${e.iconCls}, - ${u}-confirm ${u}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${u}-info ${u}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${u}-success ${u}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},kb=Ql([`Modal`,`confirm`],e=>Ob(Cb(e)),wb,{order:-1e3}),Ab=e=>{let{prefixCls:t,icon:n,okText:r,cancelText:i,confirmPrefixCls:a,type:o,okCancel:s,footer:c,locale:l,autoFocusButton:u,focusable:d,...f}=e,p=n;if(!n&&n!==null)switch(o){case`info`:p=S.createElement(Fu,null);break;case`success`:p=S.createElement(Cu,null);break;case`error`:p=S.createElement(Eu,null);break;default:p=S.createElement(Mu,null)}let m=s??o===`confirm`,h=S.useMemo(()=>{let e=d?.autoFocusButton||u;return e||e===null?e:`ok`},[u,d?.autoFocusButton]),[g]=qd(`Modal`),_=l||g,v=r||(m?_?.okText:_?.justOkText),y=i||_?.cancelText,{closable:b}=f,{onClose:x}=ef(b)?b:{},C=S.useMemo(()=>({autoFocusButton:h,cancelTextLocale:y,okTextLocale:v,mergedOkCancel:m,onClose:x,...f}),[h,y,v,m,x,f]),w=S.createElement(S.Fragment,null,S.createElement(A_,null),S.createElement(j_,null)),T=Zd(e.title)&&e.title!==``,E=Zd(p),D=`${a}-body`;return S.createElement(`div`,{className:`${a}-body-wrapper`},S.createElement(`div`,{className:Y(D,{[`${D}-has-title`]:T,[`${D}-no-icon`]:!E})},p,S.createElement(`div`,{className:`${a}-paragraph`},T&&S.createElement(`span`,{className:`${a}-title`},e.title),S.createElement(`div`,{className:`${a}-content`},e.content))),c===void 0||typeof c==`function`?S.createElement(k_,{value:C},S.createElement(`div`,{className:`${a}-btns`},typeof c==`function`?c(w,{OkBtn:j_,CancelBtn:A_}):w)):c,S.createElement(kb,{prefixCls:t}))},jb=e=>{let{close:t,zIndex:n,maskStyle:r,direction:i,prefixCls:a,wrapClassName:o,rootPrefixCls:s,bodyStyle:c,closable:l=!1,onConfirm:u,styles:d,title:f,mask:p,maskClosable:m,okButtonProps:h,cancelButtonProps:g}=e,{cancelButtonProps:_,okButtonProps:v}=_a(`modal`),y=`${a}-confirm`,b=e.width||416,x=e.style||{},C=Y(y,`${y}-${e.type}`,{[`${y}-rtl`]:i===`rtl`},e.className),w=S.useMemo(()=>{let e=pf(p,m);return e.closable??=!1,e},[p,m]),[,T]=zl(),E=S.useMemo(()=>n===void 0?T.zIndexPopupBase+jf:n,[n,T]);return S.createElement(Db,{...e,className:C,wrapClassName:Y({[`${y}-centered`]:!!e.centered},o),onCancel:()=>{t?.({triggerCancel:!0}),u?.(!1)},title:f,footer:null,transitionName:vh(s||``,`zoom`,e.transitionName),maskTransitionName:vh(s||``,`fade`,e.maskTransitionName),mask:w,style:x,styles:{body:c,mask:r,...d},width:b,zIndex:E,closable:l},S.createElement(Ab,{...e,confirmPrefixCls:y,okButtonProps:{...v,...h},cancelButtonProps:{..._,...g}}))},Mb=e=>{let{rootPrefixCls:t,iconPrefixCls:n,direction:r,theme:i}=e;return S.createElement(Nm,{prefixCls:t,iconPrefixCls:n,direction:r,theme:i},S.createElement(jb,{...e}))},Nb=[],Pb=``;function Fb(){return Pb}var Ib=e=>{let{prefixCls:t,getContainer:n,direction:r}=e,i=Gd(),a=(0,S.useContext)(ma),o=Fb()||a.getPrefixCls(),s=t||`${o}-modal`,c=n;return c===!1&&(c=void 0),S.createElement(Mb,{...e,rootPrefixCls:o,prefixCls:s,iconPrefixCls:a.iconPrefixCls,theme:a.theme,direction:r??a.direction,locale:a.locale?.Modal??i,getContainer:c})};function Lb(e){let t=jm(),n=document.createDocumentFragment(),r={...e,close:s,open:!0},i;function a(...t){t.some(e=>e?.triggerCancel)&&e.onCancel?.(()=>{},...t.slice(1));for(let e=0;e{})}let o=e=>{clearTimeout(i),i=setTimeout(()=>{let r=t.getPrefixCls(void 0,Fb()),i=t.getIconPrefixCls(),a=t.getTheme(),o=S.createElement(Ib,{...e});Li(S.createElement(Nm,{prefixCls:r,iconPrefixCls:i,theme:a},typeof t.holderRender==`function`?t.holderRender(o):o),n)})};function s(...t){r={...r,open:!1,afterClose:()=>{typeof e.afterClose==`function`&&e.afterClose(),a.apply(this,t)}},o(r)}function c(e){r=typeof e==`function`?e(r):{...r,...e},o(r)}return o(r),Nb.push(s),{destroy:s,update:c}}function Rb(e){return{...e,type:`warning`}}function zb(e){return{...e,type:`info`}}function Bb(e){return{...e,type:`success`}}function Vb(e){return{...e,type:`error`}}function Hb(e){return{...e,type:`confirm`}}function Ub({rootPrefixCls:e}){Pb=e}var Wb=S.forwardRef((e,t)=>{let{afterClose:n,config:r,...i}=e,[a,o]=S.useState(!0),[s,c]=S.useState(r),{direction:l,getPrefixCls:u}=S.useContext(ma),d=u(`modal`),f=u(),p=()=>{n(),s.afterClose?.()},m=(...e)=>{o(!1),e.some(e=>e?.triggerCancel)&&s.onCancel?.(()=>{},...e.slice(1))};S.useImperativeHandle(t,()=>({destroy:m,update:e=>{c(t=>{let n=typeof e==`function`?e(t):e;return{...t,...n}})}}));let h=s.okCancel??s.type===`confirm`,[g]=qd(`Modal`,Bd.Modal);return S.createElement(Mb,{prefixCls:d,rootPrefixCls:f,...s,close:m,open:a,afterClose:p,okText:s.okText||(h?g?.okText:g?.justOkText),direction:s.direction||l,cancelText:s.cancelText||g?.cancelText,...i})}),Gb=0,Kb=S.memo(S.forwardRef((e,t)=>{let[n,r]=Tf();return S.useImperativeHandle(t,()=>({patchElement:r}),[r]),S.createElement(S.Fragment,null,n)}));function qb(){let e=S.useRef(null),[t,n]=S.useState([]);S.useEffect(()=>{t.length&&(da(t).forEach(e=>{e()}),n([]))},[t]);let r=S.useCallback(t=>function(r){Gb+=1;let i=S.createRef(),a,o=new Promise(e=>{a=e}),s=!1,c,l=S.createElement(Wb,{key:`modal-${Gb}`,config:t(r),ref:i,afterClose:()=>{c?.()},isSilent:()=>s,onConfirm:e=>{a(e)}});return c=e.current?.patchElement(l),c&&Nb.push(c),{destroy:()=>{function e(){i.current?.destroy()}i.current?e():n(t=>[].concat(da(t),[e]))},update:e=>{function t(){i.current?.update(e)}i.current?t():n(e=>[].concat(da(e),[t]))},then:e=>(s=!0,o.then(e))}},[]);return[S.useMemo(()=>({info:r(zb),success:r(Bb),error:r(Vb),warning:r(Rb),confirm:r(Hb)}),[r]),S.createElement(Kb,{key:`modal-holder`,ref:e})]}var Jb=e=>{let{componentCls:t,notificationMarginEdge:n,animationMaxHeight:r}=e,i=`${t}-notice`,a=new As(`antNotificationFadeIn`,{"0%":{transform:`translate3d(100%, 0, 0)`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,opacity:1}}),o=new As(`antNotificationTopFadeIn`,{"0%":{top:-r,opacity:0},"100%":{top:0,opacity:1}}),s=new As(`antNotificationBottomFadeIn`,{"0%":{bottom:e.calc(r).mul(-1).equal(),opacity:0},"100%":{bottom:0,opacity:1}}),c=new As(`antNotificationLeftFadeIn`,{"0%":{transform:`translate3d(-100%, 0, 0)`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,opacity:1}});return{[t]:{[`&${t}-top, &${t}-bottom`]:{marginInline:0,[i]:{marginInline:`auto auto`}},[`&${t}-top`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:o}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:s}},[`&${t}-topRight, &${t}-bottomRight`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:a}},[`&${t}-topLeft, &${t}-bottomLeft`]:{marginRight:{value:0,_skip_check_:!0},marginLeft:{value:n,_skip_check_:!0},[i]:{marginInlineEnd:`auto`,marginInlineStart:0},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:c}}}}},Yb=[`top`,`topLeft`,`topRight`,`bottom`,`bottomLeft`,`bottomRight`],Xb={topLeft:`left`,topRight:`right`,bottomLeft:`left`,bottomRight:`right`,top:`left`,bottom:`left`},Zb=(e,t)=>{let{componentCls:n}=e;return{[`${n}-${t}`]:{[`&${n}-stack > ${n}-notice-wrapper`]:{[t.startsWith(`top`)?`top`:`bottom`]:0,[Xb[t]]:{value:0,_skip_check_:!0}}}}},Qb=e=>{let t={};for(let n=1;n ${e.componentCls}-notice`]:{opacity:0,transition:`opacity ${e.motionDurationMid}`}};return{[`&:not(:nth-last-child(-n+${e.notificationStackLayer}))`]:{opacity:0,overflow:`hidden`,color:`transparent`,pointerEvents:`none`},...t}},$b=e=>{let t={};for(let n=1;n{let{componentCls:t}=e;return{[`${t}-stack`]:{[`& > ${t}-notice-wrapper`]:{transition:`transform ${e.motionDurationSlow}, backdrop-filter 0s`,willChange:`transform, opacity`,position:`absolute`,...Qb(e)}},[`${t}-stack:not(${t}-stack-expanded)`]:{[`& > ${t}-notice-wrapper`]:{...$b(e)}},[`${t}-stack${t}-stack-expanded`]:{[`& > ${t}-notice-wrapper`]:{"&:not(:nth-last-child(-n + 1))":{opacity:1,overflow:`unset`,color:`inherit`,pointerEvents:`auto`,[`& > ${e.componentCls}-notice`]:{opacity:1}},"&:after":{content:`""`,position:`absolute`,height:e.margin,width:`100%`,insetInline:0,bottom:e.calc(e.margin).mul(-1).equal(),background:`transparent`,pointerEvents:`auto`}}},...Yb.map(t=>Zb(e,t)).reduce((e,t)=>({...e,...t}),{})}},tx=e=>{let{iconCls:t,componentCls:n,boxShadow:r,fontSizeLG:i,notificationMarginBottom:a,borderRadiusLG:o,colorSuccess:s,colorInfo:c,colorWarning:l,colorError:u,colorTextHeading:d,notificationBg:f,notificationPadding:p,notificationMarginEdge:m,progressBg:h,notificationProgressHeight:g,fontSize:_,lineHeight:v,width:y,notificationIconSize:b,colorText:x,colorSuccessBg:S,colorErrorBg:C,colorInfoBg:w,colorWarningBg:T,motionDurationMid:E}=e,D=`${n}-notice`;return{position:`relative`,marginBottom:a,marginInlineStart:`auto`,background:f,borderRadius:o,boxShadow:r,[D]:{padding:p,width:y,maxWidth:`calc(100vw - ${X(e.calc(m).mul(2).equal())})`,lineHeight:v,wordWrap:`break-word`,borderRadius:o,overflow:`hidden`,"&-success":S?{background:S}:{},"&-error":C?{background:C}:{},"&-info":w?{background:w}:{},"&-warning":T?{background:T}:{}},[`${D}-title`]:{marginBottom:e.marginXS,color:d,fontSize:i,lineHeight:e.lineHeightLG},[`${D}-description`]:{fontSize:_,color:x,marginTop:e.marginXS,"&:first-child":{marginTop:0,marginInlineEnd:e.marginSM}},[`${D}-closable ${D}-title`]:{paddingInlineEnd:e.paddingLG},[`${D}-with-icon ${D}-title`]:{marginBottom:e.marginXS,marginInlineStart:e.calc(e.marginSM).add(b).equal(),fontSize:i},[`${D}-with-icon ${D}-description`]:{marginInlineStart:e.calc(e.marginSM).add(b).equal(),fontSize:_},[`${D}-icon`]:{position:`absolute`,fontSize:b,lineHeight:1,[`&-success${t}`]:{color:s},[`&-info${t}`]:{color:c},[`&-warning${t}`]:{color:l},[`&-error${t}`]:{color:u}},[`${D}-close`]:{position:`absolute`,top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:`none`,width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:[`color`,`background-color`].map(e=>`${e} ${E}`).join(`, `),display:`flex`,alignItems:`center`,justifyContent:`center`,background:`none`,border:`none`,"&:hover":{color:e.colorIconHover,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},...Gl(e)},[`${D}-progress`]:{position:`absolute`,display:`block`,appearance:`none`,inlineSize:`calc(100% - ${X(o)} * 2)`,left:{_skip_check_:!0,value:o},right:{_skip_check_:!0,value:o},bottom:0,blockSize:g,border:0,"&, &::-webkit-progress-bar":{borderRadius:o,backgroundColor:`rgba(0, 0, 0, 0.04)`},"&::-moz-progress-bar":{background:h},"&::-webkit-progress-value":{borderRadius:o,background:h}},[`${D}-actions`]:{float:`right`,marginTop:e.marginSM}}},nx=e=>{let{componentCls:t,notificationMarginBottom:n,notificationMarginEdge:r,motionDurationMid:i,motionEaseInOut:a}=e,o=`${t}-notice`,s=new As(`antNotificationFadeOut`,{"0%":{maxHeight:e.animationMaxHeight,marginBottom:n},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[t]:{...Vl(e),position:`fixed`,zIndex:e.zIndexPopup,marginRight:{value:r,_skip_check_:!0},[`${t}-hook-holder`]:{position:`relative`},[`${t}-fade-appear-prepare`]:{opacity:`0 !important`},[`${t}-fade-enter, ${t}-fade-appear`]:{animationDuration:e.motionDurationMid,animationTimingFunction:a,animationFillMode:`both`,opacity:0,animationPlayState:`paused`},[`${t}-fade-leave`]:{animationTimingFunction:a,animationFillMode:`both`,animationDuration:i,animationPlayState:`paused`},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationPlayState:`running`},[`${t}-fade-leave${t}-fade-leave-active`]:{animationName:s,animationPlayState:`running`},"&-rtl":{direction:`rtl`,[`${o}-actions`]:{float:`left`}}}},{[t]:{[`${o}-wrapper`]:tx(e)}}]},rx=e=>({zIndexPopup:e.zIndexPopupBase+jf+50,width:384,progressBg:`linear-gradient(90deg, ${e.colorPrimaryBorderHover}, ${e.colorPrimary})`,colorSuccessBg:void 0,colorErrorBg:void 0,colorInfoBg:void 0,colorWarningBg:void 0}),ix=e=>{let t=e.paddingMD,n=e.paddingLG;return lc(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationIconSize:e.calc(e.fontSizeLG).mul(e.lineHeightLG).equal(),notificationCloseButtonSize:e.calc(e.controlHeightLG).mul(.55).equal(),notificationMarginBottom:e.margin,notificationPadding:`${X(e.paddingMD)} ${X(e.paddingContentHorizontalLG)}`,notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationStackLayer:3,notificationProgressHeight:2})},ax=Xl(`Notification`,e=>{let t=ix(e);return[nx(t),Jb(t),ex(t)]},rx);function ox(e,t){return t===null||t===!1?null:t||S.createElement(ku,{className:`${e}-close-icon`})}var sx={success:Cu,info:Fu,error:Eu,warning:Mu},cx=e=>{let{prefixCls:t,icon:n,type:r,title:i,description:a,actions:o,role:s=`alert`,styles:c,classNames:l}=e,u=null;return n?u=S.createElement(`span`,{className:Y(`${t}-icon`,l.icon),style:c.icon},n):r&&(u=S.createElement(sx[r]||null,{className:Y(`${t}-icon`,l.icon,`${t}-icon-${r}`),style:c.icon})),S.createElement(`div`,{className:Y({[`${t}-with-icon`]:u}),role:s},u,i&&S.createElement(`div`,{className:Y(`${t}-title`,l.title),style:c.title},i),a&&S.createElement(`div`,{className:Y(`${t}-description`,l.description),style:c.description},a),o&&S.createElement(`div`,{className:Y(`${t}-actions`,l.actions),style:c.actions},o))};function lx(e,t,n){let r;switch(e){case`top`:r={left:`50%`,transform:`translateX(-50%)`,right:`auto`,top:t,bottom:`auto`};break;case`topLeft`:r={left:0,top:t,bottom:`auto`};break;case`topRight`:r={right:0,top:t,bottom:`auto`};break;case`bottom`:r={left:`50%`,transform:`translateX(-50%)`,right:`auto`,top:`auto`,bottom:n};break;case`bottomLeft`:r={left:0,top:`auto`,bottom:n};break;default:r={right:0,top:`auto`,bottom:n};break}return r}function ux(e){return{motionName:`${e}-fade`}}function dx(e,t,n){return e===void 0?t?.closeIcon===void 0?n?.closeIcon:t.closeIcon:e}var fx=24,px=4.5,mx=`topRight`,hx=({children:e,prefixCls:t})=>{let n=ap(t),[r,i]=ax(t,n);return S.createElement(Lm,{classNames:{list:Y(r,i,n)}},e)},gx=(e,{prefixCls:t,key:n})=>S.createElement(hx,{prefixCls:t,key:n},e),_x=S.forwardRef((e,t)=>{let{top:n,bottom:r,prefixCls:i,getContainer:a,maxCount:o,rtl:s,onAllRemoved:c,stack:l,duration:u=px,pauseOnHover:d=!0,showProgress:f}=e,{getPrefixCls:p,getPopupContainer:m,direction:h}=_a(`notification`),{notification:g}=(0,S.useContext)(ma),[,_]=zl(),v=i||p(`notification`),y=(0,S.useMemo)(()=>Qd(u)&&u>0?u:!1,[u]),[b,x]=qm({prefixCls:v,style:e=>lx(e,n??fx,r??fx),className:()=>Y({[`${v}-rtl`]:s??h===`rtl`}),motion:()=>ux(v),closable:{closeIcon:ox(v)},duration:y,getContainer:()=>a?.()||m?.()||document.body,maxCount:o,pauseOnHover:d,showProgress:f,onAllRemoved:c,renderNotifications:gx,stack:l===!1?!1:{threshold:ef(l)?l?.threshold:void 0,offset:8,gap:_.margin}}),[C,w]=xf([g?.classNames,e?.classNames],[g?.styles,e?.styles],{props:e});return S.useImperativeHandle(t,()=>({...b,prefixCls:v,notification:g,classNames:C,styles:w})),x});function vx(e){let t=S.useRef(null);Ui(`Notification`);let{notification:n}=S.useContext(ma);return[S.useMemo(()=>{let r=r=>{if(!t.current)return;let{open:i,prefixCls:a,notification:o,classNames:s,styles:c}=t.current,l=o?.className||{},u=o?.style||{},d=`${a}-notice`,{title:f,message:p,description:m,icon:h,type:g,btn:_,actions:v,className:y,style:b,role:x=`alert`,closeIcon:C,closable:w,classNames:T={},styles:E={},...D}=r,O=f??p,k=v??_,A=ox(d,dx(C,e,o)),[j,M,,N]=uf(af({...e||{},...r}),af(n),{closable:!0,closeIcon:A}),P=j?{onClose:ef(w)?w.onClose:void 0,closeIcon:M,...N}:!1,F=bf(T,{props:r}),I=bf(E,{props:r}),L=hf(void 0,s,F),R=_f(c,I);return i({placement:e?.placement??mx,...D,content:S.createElement(cx,{prefixCls:d,icon:h,type:g,title:O,description:m,actions:k,role:x,classNames:L,styles:R}),className:Y({[`${d}-${g}`]:g},y,l,L.root),style:{...u,...R.root,...b},closable:P})},i={open:r,destroy:e=>{e===void 0?t.current?.destroy():t.current?.close(e)}};return[`success`,`info`,`warning`,`error`].forEach(e=>{i[e]=t=>r({...t,type:e})}),i},[e,n]),S.createElement(_x,{key:`notification-holder`,...e,ref:t})]}function yx(e){return vx(e)}var bx=S.createContext({}),xx=S.createContext({message:{},notification:{},modal:{}}),Sx=Xl(`App`,e=>{let{componentCls:t,colorText:n,fontSize:r,lineHeight:i,fontFamily:a}=e;return{[t]:{color:n,fontSize:r,lineHeight:i,fontFamily:a,[`&${t}-rtl`]:{direction:`rtl`}}}},()=>({})),Cx=e=>{let{prefixCls:t,children:n,className:r,rootClassName:i,message:a,notification:o,style:s,component:c=`div`}=e,{direction:l,getPrefixCls:u,className:d,style:f}=_a(`app`),p=u(`app`,t),[m,h]=Sx(p),g=Y(m,p,r,i,h,{[`${p}-rtl`]:l===`rtl`}),_=(0,S.useContext)(bx),v=S.useMemo(()=>({message:{..._.message,...a},notification:{..._.notification,...o}}),[a,o,_.message,_.notification]),[y,b]=dh(v.message),[x,C]=yx(v.notification),[w,T]=qb(),E=S.useMemo(()=>({message:y,notification:x,modal:w}),[y,x,w]);Ui(`App`)(!(h&&c===!1),`usage`,"When using cssVar, ensure `component` is assigned a valid React component string.");let D=c===!1?S.Fragment:c,O={className:Y(d,g),style:{...f,...s}};return S.createElement(xx.Provider,{value:E},S.createElement(bx.Provider,{value:v},S.createElement(D,{...c===!1?void 0:O},T,b,C,n)))},wx=()=>S.useContext(xx),Tx=Cx;Tx.useApp=wx;function Ex(e){return t=>S.createElement(Nm,{theme:{token:{motion:!1,zIndexPopupBase:0}}},S.createElement(e,{...t}))}var Dx=(e,t,n,r,i)=>Ex(a=>{let{prefixCls:o,style:s}=a,c=S.useRef(null),[l,u]=S.useState(0),[d,f]=S.useState(0),[p,m]=Wn(!1,a.open),{getPrefixCls:h}=S.useContext(ma),g=h(r||`select`,o);S.useEffect(()=>{if(m(!0),typeof ResizeObserver<`u`){let e=new ResizeObserver(e=>{let t=e[0].target;u(t.offsetHeight+8),f(t.offsetWidth)}),t=setInterval(()=>{let n=i?`.${i(g)}`:`.${g}-dropdown`,r=c.current?.querySelector(n);r&&(clearInterval(t),e.observe(r))},10);return()=>{clearInterval(t),e.disconnect()}}},[g]);let _={...a,style:{...s,margin:0},open:p,getPopupContainer:()=>c.current};n&&(_=n(_)),t&&(_={..._,[t]:{overflow:{adjustX:!1,adjustY:!1}}});let v={paddingBottom:l,position:`relative`,minWidth:d};return S.createElement(`div`,{ref:c,style:v},S.createElement(e,{..._}))}),Ox=(e,t,n,r,i=!1,a,o)=>{let s=(0,S.useMemo)(()=>typeof n==`boolean`?{allowClear:n}:n&&typeof n==`object`?n:{allowClear:!1},[n]);return(0,S.useMemo)(()=>{let e=!i&&s.allowClear!==!1&&(t.length||a)&&!(o===`combobox`&&a===``);return{allowClear:e,clearIcon:e?s.clearIcon||r||`×`:null}},[s,r,i,t.length,a,o])},kx=S.createContext(null);function Ax(){return S.useContext(kx)}function jx(e=250){let t=S.useRef(null),n=S.useRef(null);S.useEffect(()=>()=>{window.clearTimeout(n.current)},[]);function r(r){(r||t.current===null)&&(t.current=r),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current=null},e)}return[()=>t.current,r]}function Mx(e,t){return e.filter(e=>e).some(e=>e.contains(t)||e===t)}function Nx(e,t,n,r){let i=Rn(i=>{if(r)return;let a=i.target;a.shadowRoot&&i.composed&&(a=i.composedPath()[0]||a),i._ori_target&&(a=i._ori_target),t&&!Mx(e(),a)&&n(!1)});S.useEffect(()=>(window.addEventListener(`mousedown`,i),()=>window.removeEventListener(`mousedown`,i)),[i])}function Px(){return Px=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let t=e===!0?0:1;return{bottomLeft:{points:[`tl`,`bl`],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},bottomRight:{points:[`tr`,`br`],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},topLeft:{points:[`bl`,`tl`],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},topRight:{points:[`br`,`tr`],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`}}},Ix=S.forwardRef((e,t)=>{let{prefixCls:n,disabled:r,visible:i,children:a,popupElement:o,animation:s,transitionName:c,popupStyle:l,popupClassName:u,direction:d=`ltr`,placement:f,builtinPlacements:p,popupMatchSelectWidth:m,popupRender:h,popupAlign:g,getPopupContainer:_,empty:v,onPopupVisibleChange:y,onPopupMouseEnter:b,onPopupMouseDown:x,onPopupBlur:C,...w}=e,T=`${n}-dropdown`,E=o;h&&(E=h(o));let D=S.useMemo(()=>p||Fx(m),[p,m]),O=s?`${T}-${s}`:c,k=typeof m==`number`,A=S.useMemo(()=>k?null:m===!1?`minWidth`:`width`,[m,k]),j=l;k&&(j={...l,width:m});let M=S.useRef(null);return S.useImperativeHandle(t,()=>({getPopupElement:()=>M.current?.popupElement})),S.createElement(am,Px({},w,{showAction:y?[`click`]:[],hideAction:y?[`click`]:[],popupPlacement:f||(d===`rtl`?`bottomRight`:`bottomLeft`),builtinPlacements:D,prefixCls:T,popupMotion:{motionName:O},popup:S.createElement(`div`,{onMouseEnter:b,onMouseDown:x,onBlur:C},E),ref:M,stretch:A,popupAlign:g,popupVisible:i,getPopupContainer:_,popupClassName:Y(u,{[`${T}-empty`]:v}),popupStyle:j,onPopupVisibleChange:y}),a)});function Lx(e,t){let{key:n}=e,r;return`value`in e&&({value:r}=e),n??(r===void 0?`rc-index-key-${t}`:r)}function Rx(e){return e!==void 0&&!Number.isNaN(e)}function zx(e,t){let{label:n,value:r,options:i,groupLabel:a}=e||{},o=n||(t?`children`:`label`);return{label:o,value:r||`value`,options:i||`options`,groupLabel:a||o}}function Bx(e,{fieldNames:t,childrenAsData:n}={}){let r=[],{label:i,value:a,options:o,groupLabel:s}=zx(t,!1);function c(e,t){Array.isArray(e)&&e.forEach(e=>{if(t||!(o in e)){let n=e[a];r.push({key:Lx(e,r.length),groupOption:t,data:e,label:e[i],value:n})}else{let t=e[s];t===void 0&&n&&(t=e.label),r.push({key:Lx(e,r.length),group:!0,data:e,label:t}),c(e[o],!0)}})}return c(e,!1),r}function Vx(e){let t={...e};return`props`in t||Object.defineProperty(t,`props`,{get(){return li(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var Hx=(e,t,n)=>{if(!t||!t.length)return null;let r=!1,i=(e,[t,...n])=>{if(!t)return[e];let a=e.split(t);return r||=a.length>1,a.reduce((e,t)=>[...e,...i(t,n)],[]).filter(Boolean)},a=i(e,t);return r?n===void 0?a:a.slice(0,n):null};function Ux(e){let{visible:t,values:n}=e;return t?S.createElement(`span`,{"aria-live":`polite`,style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},`${n.slice(0,50).map(({label:e,value:t})=>[`number`,`string`].includes(typeof e)?e:t).join(`, `)}`,n.length>50?`, ...`:null):null}var Wx=e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},Gx=(e,t=1)=>{if(t<=0){e();return}Wx(()=>{Gx(e,t-1)})};function Kx(e,t,n,r){let[i,a]=(0,S.useState)(!1);(0,S.useEffect)(()=>{a(!0)},[]);let[o,s]=Wn(e,t),[c,l]=(0,S.useState)(!1),u=i?o:!1,d=r(u),f=(0,S.useRef)(0),p=Rn(e=>{n&&d!==e&&n(e),s(e)});return[u,d,Rn((e,t={})=>{let{cancelFun:n}=t;f.current+=1;let r=f.current,i=typeof e==`boolean`?e:!d;l(!i);function a(){r===f.current&&!n?.()&&(p(i),l(!1))}i?a():Gx(()=>{a()})}),c]}function qx(e){let{children:t,...n}=e;return t?S.createElement(`div`,n,t):null}var Jx=S.createContext(null);function Yx(){return S.useContext(Jx)}var Xx=S.forwardRef((e,t)=>{let{onChange:n,onKeyDown:r,onBlur:i,style:a,syncWidth:o,value:s,className:c,autoComplete:l,...u}=e,{prefixCls:d,mode:f,onSearch:p,onSearchSubmit:m,onInputBlur:h,autoFocus:g,tokenWithEnter:_,placeholder:v,components:{input:y=`input`}}=Yx(),{id:b,classNames:x,styles:C,open:w,activeDescendantId:T,role:E,disabled:D}=Ax()||{},O=Y(`${d}-input`,x?.input,c),k=S.useRef(!1),A=S.useRef(null),j=S.useRef(null);S.useImperativeHandle(t,()=>j.current);let M=e=>{let{value:t}=e.target;if(_&&A.current&&/[\r\n]/.test(A.current)){let e=A.current.replace(/[\r\n]+$/,``).replace(/\r\n/g,` `).replace(/[\r\n]/g,` `);t=t.replace(e,A.current)}A.current=null,p&&p(t,!0,k.current),n?.(e)},N=e=>{let{key:t}=e,{value:n}=e.currentTarget;t===`Enter`&&f===`tags`&&!w&&!k.current&&m&&m(n),r?.(e)},P=e=>{h?.(),i?.(e)},F=()=>{k.current=!0},I=e=>{if(k.current=!1,f!==`combobox`){let{value:t}=e.currentTarget;p?.(t,!0,!1)}},L=e=>{let{clipboardData:t}=e;A.current=t?.getData(`text`)||``},[R,z]=S.useState(void 0);Vn(()=>{let e=j.current;if(o&&e){e.style.width=`0px`;let t=e.scrollWidth;z(t),e.style.width=``}},[o,s]);let B={id:b,type:f===`combobox`?`text`:`search`,...u,ref:j,style:{...C?.input,...a,"--select-input-width":R},autoFocus:g,autoComplete:l||`off`,className:O,disabled:D,value:s||``,onChange:M,onKeyDown:N,onBlur:P,onPaste:L,onCompositionStart:F,onCompositionEnd:I,role:E||`combobox`,"aria-expanded":w||!1,"aria-haspopup":`listbox`,"aria-owns":w?`${b}_list`:void 0,"aria-autocomplete":`list`,"aria-controls":w?`${b}_list`:void 0,"aria-activedescendant":w?T:void 0};if(S.isValidElement(y)){let t=y.props||{},n={placeholder:e.placeholder||v,...B,...t};return Object.keys(t).forEach(e=>{let r=t[e];typeof r==`function`&&(n[e]=(...t)=>{r(...t),B[e]?.(...t)})}),n.ref=sr(y.ref,B.ref),S.cloneElement(y,n)}let V=y;return S.createElement(V,B)});function Zx(e){let{prefixCls:t,placeholder:n,displayValues:r}=Yx(),{classNames:i,styles:a}=Ax(),{show:o=!0}=e;return r.length?null:S.createElement(`div`,{className:Y(`${t}-placeholder`,i?.placeholder),style:{visibility:o?`visible`:`hidden`,...a?.placeholder}},n)}var Qx=S.createContext(null);function $x(e){return Array.isArray(e)?e:e===void 0?[]:[e]}typeof window<`u`&&window.document&&window.document.documentElement;function eS(e){return e!=null}function tS(e){return!e&&e!==0}function nS(e){return[`string`,`number`].includes(typeof e)}function rS(e){let t;return e&&(nS(e.title)?t=e.title.toString():nS(e.label)&&(t=e.label.toString())),t}function iS(){return iS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,searchValue:r,activeValue:i,displayValues:a,maxLength:o,mode:s,components:c}=Yx(),{triggerOpen:l,title:u,showSearch:d,classNames:f,styles:p}=Ax(),m=S.useContext(Qx),[h,g]=S.useState(!1),_=s===`combobox`,v=a[0],y=S.useMemo(()=>_&&i&&!h&&l?i:d?r:``,[_,i,h,l,r,d]),[b,x,C,w]=S.useMemo(()=>{let e,t,n;if(v&&m?.flattenOptions){let r=m.flattenOptions.find(e=>e.value===v.value);r?.data&&(e=r.data.className,t=r.data.style,n=rS(r.data))}return v&&!n&&(n=rS(v)),u!==void 0&&(n=u),[e,t,n,!!e||!!t]},[v,m?.flattenOptions,u]);S.useEffect(()=>{_&&g(!1)},[_,i]);let T=v&&v.label!==null&&v.label!==void 0&&String(v.label).trim()!==``,E=_&&c?.input?null:v?w?S.createElement(`div`,{className:Y(`${n}-content-value`,b),style:{...y?{visibility:`hidden`}:{},...x},title:C},v.label):v.label:S.createElement(Zx,{show:!y});return S.createElement(`div`,{className:Y(`${n}-content`,T&&`${n}-content-has-value`,y&&`${n}-content-has-search-value`,w&&`${n}-content-has-option-style`,f?.content),style:p?.content,title:w?void 0:C},E,S.createElement(Xx,iS({ref:t},e,{value:y,maxLength:s===`combobox`?o:void 0,onChange:t=>{g(!0),e.onChange?.(t)}})))}),oS=void 0;function sS(e,t){let{prefixCls:n,invalidate:r,item:i,renderItem:a,responsive:o,responsiveDisabled:s,registerSize:c,itemKey:l,className:u,style:d,children:f,display:p,order:m,component:h=`div`,...g}=e,_=o&&!p;function v(e){c(l,e)}S.useEffect(()=>()=>{v(null)},[]);let y=a&&i!==oS?a(i,{index:m}):f,b;r||(b={opacity:+!_,height:_?0:oS,overflowY:_?`hidden`:oS,order:o?m:oS,pointerEvents:_?`none`:oS,position:_?`absolute`:oS});let x={};_&&(x[`aria-hidden`]=!0);let C=S.createElement(h,Wg({className:Y(!r&&n,u),style:{...b,...d}},x,g,{ref:t}),y);return o&&(C=S.createElement(ia,{onResize:({offsetWidth:e})=>{v(e)},disabled:s},C)),C}var cS=S.forwardRef(sS);function lS(e){if(typeof MessageChannel>`u`)Ei(e);else{let t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function uS(){let e=S.useRef(null);return t=>{e.current||(e.current=[],lS(()=>{(0,zi.unstable_batchedUpdates)(()=>{e.current.forEach(e=>{e()}),e.current=null})})),e.current.push(t)}}function dS(e,t){let[n,r]=S.useState(t);return[n,Rn(t=>{e(()=>{r(t)})})]}var fS=S.createContext(null),pS=S.forwardRef((e,t)=>{let n=S.useContext(fS);if(!n){let{component:n=`div`,...r}=e;return S.createElement(n,Wg({},r,{ref:t}))}let{className:r,...i}=n,{className:a,...o}=e;return S.createElement(fS.Provider,{value:null},S.createElement(cS,Wg({ref:t,className:Y(r,a)},i,o)))}),mS=`responsive`,hS=`invalidate`;function gS(e){return`+ ${e.length} ...`}function _S(e,t){let{prefixCls:n=`rc-overflow`,data:r=[],renderItem:i,renderRawItem:a,itemKey:o,itemWidth:s=10,ssr:c,style:l,className:u,maxCount:d,renderRest:f,renderRawRest:p,prefix:m,suffix:h,component:g=`div`,itemComponent:_,onVisibleChange:v,...y}=e,b=c===`full`,x=uS(),[C,w]=dS(x,null),T=C||0,[E,D]=dS(x,new Map),[O,k]=dS(x,0),[A,j]=dS(x,0),[M,N]=dS(x,0),[P,F]=dS(x,0),[I,L]=(0,S.useState)(null),[R,z]=(0,S.useState)(null),B=S.useMemo(()=>R===null&&b?2**53-1:R||0,[R,C]),[V,H]=(0,S.useState)(!1),U=`${n}-item`,ee=Math.max(O,A),te=d===mS,ne=r.length&&te,W=d===hS,re=ne||typeof d==`number`&&r.length>d,G=(0,S.useMemo)(()=>{let e=r;return ne?e=C===null&&b?r:r.slice(0,Math.min(r.length,T/s)):typeof d==`number`&&(e=r.slice(0,d)),e},[r,s,C,d,ne]),K=(0,S.useMemo)(()=>ne?r.slice(B+1):r.slice(G.length),[r,G,ne,B]),q=(0,S.useCallback)((e,t)=>typeof o==`function`?o(e):(o&&e?.[o])??t,[o]),ie=(0,S.useCallback)(i||(e=>e),[i]);function J(e,t,n){R===e&&(t===void 0||t===I)||(z(e),n||(H(e{let r=new Map(n);return t===null?r.delete(e):r.set(e,t),r})}function se(e,t){j(t),k(A)}function ce(e,t){N(t)}function le(e,t){F(t)}function ue(e){return E.get(q(G[e],e))}Vn(()=>{if(T&&typeof ee==`number`&&G){let e=M+P,t=G.length,n=t-1;if(!t){J(0,null);return}for(let r=0;rT){J(r-1,e-t-P+A);break}}h&&ue(0)+P>T&&L(null)}},[T,E,A,M,P,q,G]);let de=V&&!!K.length,fe={};I!==null&&ne&&(fe={position:`absolute`,top:0,insetInlineStart:I});let pe={prefixCls:U,responsive:ne,component:_,invalidate:W},me=a?(e,t)=>{let n=q(e,t);return S.createElement(fS.Provider,{key:n,value:{...pe,order:t,item:e,itemKey:n,registerSize:oe,display:t<=B}},a(e,t))}:(e,t)=>{let n=q(e,t);return S.createElement(cS,Wg({},pe,{order:t,key:n,item:e,renderItem:ie,itemKey:n,registerSize:oe,display:t<=B}))},he={order:de?B:2**53-1,className:`${U}-rest`,registerSize:se,display:de},ge=f||gS,_e=p?S.createElement(fS.Provider,{value:{...pe,...he}},p(K)):S.createElement(cS,Wg({},pe,he),typeof ge==`function`?ge(K):ge),ve=S.createElement(g,Wg({className:Y(!W&&n,u),style:l,ref:t},y),m&&S.createElement(cS,Wg({},pe,{responsive:te,responsiveDisabled:!ne,order:-1,className:`${U}-prefix`,registerSize:ce,display:!0}),m),G.map(me),re?_e:null,h&&S.createElement(cS,Wg({},pe,{responsive:te,responsiveDisabled:!ne,order:B,className:`${U}-suffix`,registerSize:le,display:!0,style:fe}),h));return te?S.createElement(ia,{onResize:ae,disabled:!ne},ve):ve}var vS=S.forwardRef(_S);vS.Item=pS,vS.RESPONSIVE=mS,vS.INVALIDATE=hS;var yS=vS,bS=e=>{let{className:t,style:n,customizeIcon:r,customizeIconProps:i,children:a,onMouseDown:o,onClick:s}=e,c=typeof r==`function`?r(i):r;return S.createElement(`span`,{className:t,onMouseDown:e=>{e.preventDefault(),o?.(e)},style:{userSelect:`none`,WebkitUserSelect:`none`,...n},unselectable:`on`,onClick:s,"aria-hidden":!0},c===void 0?S.createElement(`span`,{className:Y(t.split(/\s+/).map(e=>`${e}-icon`))},a):c)};function xS(){return xS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{e.preventDefault(),e.stopPropagation()},wS=S.forwardRef(function({inputProps:e},t){let{prefixCls:n,displayValues:r,searchValue:i,mode:a,onSelectorRemove:o,removeIcon:s}=Yx(),{disabled:c,showSearch:l,triggerOpen:u,rawOpen:d,toggleOpen:f,autoClearSearchValue:p,tagRender:m,maxTagPlaceholder:h,maxTagTextLength:g,maxTagCount:_,classNames:v,styles:y}=Ax(),b=`${n}-selection-item`,x=i;!d&&a===`multiple`&&p!==!1&&(x=``);let C=l&&x||``,w=l&&!c,T=s??`×`,E=h??(e=>`+ ${e.length} ...`),D=m,O=e=>{f(e)},k=e=>{o?.(e)},A=(e,t,n,r,i)=>S.createElement(`span`,{title:rS(e),className:Y(b,{[`${b}-disabled`]:n},v?.item),style:y?.item},S.createElement(`span`,{className:Y(`${b}-content`,v?.itemContent),style:y?.itemContent},t),r&&S.createElement(bS,{className:Y(`${b}-remove`,v?.itemRemove),style:y?.itemRemove,onMouseDown:CS,onClick:i,customizeIcon:T},`×`)),j=(e,t,n,r,i,a,o)=>S.createElement(`span`,{onMouseDown:e=>{CS(e),O(!u)}},D({label:t,value:e,index:o?.index,disabled:n,closable:r,onClose:i,isMaxTag:!!a}));return S.createElement(yS,{prefixCls:`${n}-content`,className:v?.content,style:y?.content,prefix:!r.length&&!C&&S.createElement(Zx,null),data:r,renderItem:(e,t)=>{let{disabled:n,label:r,value:i}=e,a=!c&&!n,o=r;if(typeof g==`number`&&(typeof r==`string`||typeof r==`number`)){let e=String(o);e.length>g&&(o=`${e.slice(0,g)}...`)}let s=t=>{t&&t.stopPropagation(),k(e)};return typeof D==`function`?j(i,o,n,a,s,void 0,t):A(e,o,n,a,s)},renderRest:e=>{if(!r.length)return null;let t=typeof E==`function`?E(e):E;return typeof D==`function`?j(void 0,t,!1,!1,void 0,!0):A({title:t},t,!1)},suffix:S.createElement(Xx,xS({ref:t,disabled:c,readOnly:!w},e,{value:C||``,syncWidth:!0})),itemKey:SS,maxCount:_})}),TS=S.forwardRef(function(e,t){let{multiple:n,onInputKeyDown:r,tabIndex:i}=Yx(),a=Ax(),{showSearch:o}=a,s={...bi(a,{aria:!0}),onKeyDown:r,readOnly:!o,tabIndex:i};return n?S.createElement(wS,{ref:t,inputProps:s}):S.createElement(aS,{ref:t,inputProps:s})});function ES(e){return e&&![Zr.ESC,Zr.SHIFT,Zr.BACKSPACE,Zr.TAB,Zr.WIN_KEY,Zr.ALT,Zr.META,Zr.WIN_KEY_RIGHT,Zr.CTRL,Zr.SEMICOLON,Zr.EQUALS,Zr.CAPS_LOCK,Zr.CONTEXT_MENU,Zr.UP,Zr.LEFT,Zr.RIGHT,Zr.F1,Zr.F2,Zr.F3,Zr.F4,Zr.F5,Zr.F6,Zr.F7,Zr.F8,Zr.F9,Zr.F10,Zr.F11,Zr.F12].includes(e)}function DS(){return DS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{which:t}=e,n=F.current instanceof HTMLTextAreaElement;!n&&D&&(t===Zr.UP||t===Zr.DOWN)&&e.preventDefault(),x&&x(e),!(n&&!D&&~[Zr.UP,Zr.DOWN,Zr.LEFT,Zr.RIGHT].indexOf(t))&&!(e.ctrlKey||e.altKey||e.metaKey)&&ES(t)&&O(!0)});S.useImperativeHandle(t,()=>({focus:e=>{(F.current||P.current).focus?.(e)},blur:()=>{(F.current||P.current).blur?.()},nativeElement:Or(P.current)}));let L=Rn(e=>{if(!A){let t=Or(F.current);e.nativeEvent._ori_target=t;let n=t===e.target||t?.contains(e.target);t&&!n&&e.preventDefault();let r=D&&!l&&(f===`combobox`||k)||D&&l&&n;e.nativeEvent._select_lazy?D&&O(!1):(F.current?.focus(),r||O())}y?.(e)}),{root:R}=T,z=hi(E,OS),B=bi(z,{aria:!0}),V=Object.keys(B),H={...e,onInputKeyDown:I};if(R){let e=R.props||{},t={...e,...z};return Object.keys(e).forEach(n=>{let r=e[n],i=z[n];typeof r==`function`&&typeof i==`function`&&(t[n]=(...e)=>{i(...e),r(...e)})}),S.isValidElement(R)?S.cloneElement(R,{...t,ref:sr(R.ref,P)}):S.createElement(R,DS({},t,{ref:P}))}return S.createElement(Jx.Provider,{value:H},S.createElement(`div`,DS({},hi(z,V),{ref:P,className:r,style:i,onMouseDown:L}),S.createElement(qx,{className:Y(`${n}-prefix`,M?.prefix),style:N?.prefix},a),S.createElement(TS,{ref:F}),S.createElement(qx,{className:Y(`${n}-suffix`,{[`${n}-suffix-loading`]:j},M?.suffix),style:N?.suffix},o),s&&S.createElement(qx,{className:Y(`${n}-clear`,M?.clear),style:N?.clear,onMouseDown:e=>{e.nativeEvent._select_lazy=!0,b?.(e)}},s),c))});function AS(e,t,n){return S.useMemo(()=>{let{root:r,input:i}=e||{};return n&&(r=n()),t&&(i=t()),{root:r,input:i}},[e,t,n])}function jS(){return jS=Object.assign?Object.assign.bind():function(e){for(var t=1;te===`tags`||e===`multiple`,NS=S.forwardRef((e,t)=>{let{id:n,prefixCls:r,className:i,styles:a,classNames:o,showSearch:s,tagRender:c,showScrollBar:l=`optional`,direction:u,omitDomProps:d,displayValues:f,onDisplayValuesChange:p,emptyOptions:m,notFoundContent:h=`Not Found`,onClear:g,maxCount:_,placeholder:v,mode:y,disabled:b,loading:x,getInputElement:C,getRawInputElement:w,open:T,defaultOpen:E,onPopupVisibleChange:D,activeValue:O,onActiveValueChange:k,activeDescendantId:A,searchValue:j,autoClearSearchValue:M,onSearch:N,onSearchSplit:P,tokenSeparators:F,allowClear:I,prefix:L,suffix:R,suffixIcon:z,clearIcon:B,OptionList:V,animation:H,transitionName:U,popupStyle:ee,popupClassName:te,popupMatchSelectWidth:ne,popupRender:W,popupAlign:re,placement:G,builtinPlacements:K,getPopupContainer:q,showAction:ie=[],onFocus:J,onBlur:ae,onKeyUp:oe,onKeyDown:se,onMouseDown:ce,components:le,...ue}=e,de=MS(y),fe=S.useRef(null),pe=S.useRef(null),me=S.useRef(null),[he,ge]=S.useState(!1);S.useImperativeHandle(t,()=>({focus:fe.current?.focus,blur:fe.current?.blur,scrollTo:e=>me.current?.scrollTo(e),nativeElement:Or(fe.current)}));let _e=AS(le,C,w),ve=S.useMemo(()=>{if(y!==`combobox`)return j;let e=f[0]?.value;return typeof e==`string`||typeof e==`number`?String(e):``},[j,y,f]),ye=y===`combobox`&&typeof C==`function`&&C()||null,be=!h&&m,[xe,Se,Ce,we]=Kx(E||!1,T,D,e=>b||be?!1:e),Te=S.useMemo(()=>(F||[]).some(e=>[` + ${t}-confirm-body-wrapper`]:{display:`flex`,flexDirection:`column`,flex:`auto`},[`${t}-confirm-body`]:{marginBottom:`auto`}}}]},bb=e=>{let{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:`rtl`,[`${t}-confirm-body`]:{direction:`rtl`}}}}},xb=e=>{let{componentCls:t}=e,n=hb(e),r={...n};delete r.xs;let i=`--${t.replace(`.`,``)}-`,a=Object.keys(r).map(e=>({[`@media (min-width: ${X(r[e])})`]:{width:`var(${i}${e}-width)`}}));return{[`${t}-root`]:{[t]:[].concat(da(Object.keys(n).map((e,t)=>{let r=Object.keys(n)[t-1];return r?{[`${i}${e}-width`]:`var(${i}${r}-width)`}:null})),[{width:`var(${i}xs-width)`}],da(a))}}},Sb=e=>{let t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return lc(e,{modalHeaderHeight:e.calc(e.calc(r).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},Cb=e=>({footerBg:`transparent`,headerBg:`transparent`,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${X(e.paddingMD)} ${X(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${X(e.padding)} ${X(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:`none`,headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${X(e.paddingXS)} ${X(e.padding)}`:0,footerBorderTop:e.wireframe?`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:`none`,footerBorderRadius:e.wireframe?`0 0 ${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${X(e.padding*2)} ${X(e.padding*2)} ${X(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM,mask:!0}),wb=Xl(`Modal`,e=>{let t=Sb(e);return[yb(t),bb(t),vb(t),Mg(t,`zoom`),xb(t)]},Cb,{unitless:{titleLineHeight:!0}}),Tb;zy()&&document.documentElement.addEventListener(`click`,e=>{Tb={x:e.pageX,y:e.pageY},setTimeout(()=>{Tb=null},100)},!0);var Eb=e=>{let{prefixCls:t,className:n,rootClassName:r,open:i,wrapClassName:a,centered:o,getContainer:s,style:c,width:l=520,footer:u,classNames:d,styles:f,children:p,loading:m,confirmLoading:h,zIndex:g,mousePosition:_,onOk:v,onCancel:y,okButtonProps:b,cancelButtonProps:x,destroyOnHidden:C,destroyOnClose:w,panelRef:T=null,closable:E,mask:D,modalRender:O,maskClosable:k,focusTriggerAfterClose:A,focusable:j,...M}=e,{getPopupContainer:N,getPrefixCls:P,direction:F,className:I,style:L,classNames:R,styles:z,centered:B,cancelButtonProps:V,okButtonProps:H,mask:U}=_a(`modal`),{modal:ee}=S.useContext(ma),[te,ne]=S.useMemo(()=>typeof E==`boolean`?[void 0,void 0]:[E?.afterClose,E?.onClose],[E]),W=P(`modal`,t),re=P(),[G,K,q]=mf(D,U,W,k),ie=By(j,G,A),J=e=>{h||(y?.(e),ne?.())},ae=e=>{v?.(e),ne?.()},oe=ap(W),[se,ce]=wb(W,oe),le=Y(a,{[`${W}-centered`]:o??B,[`${W}-wrap-rtl`]:F===`rtl`}),ue=u!==null&&!m?S.createElement(ob,{...e,okButtonProps:{...H,...b},onOk:ae,cancelButtonProps:{...V,...x},onCancel:J}):null,[de,fe,pe,me]=df(af(e),af(ee),{closable:!0,closeIcon:S.createElement(ku,{className:`${W}-close-icon`}),closeIconRender:e=>ab(W,e)}),he=de?{disabled:pe,closeIcon:fe,afterClose:te,...me}:!1,ge=O?e=>S.createElement(`div`,{className:`${W}-render`},O(e)):void 0,_e=sr(T,nb(`.${W}-${O?`render`:`container`}`)),[ve,ye]=Ff(`Modal`,g),be={...e,width:l,panelRef:T,focusTriggerAfterClose:ie.focusTriggerAfterClose,focusable:ie,mask:G,maskClosable:q,zIndex:ve},[xe,Se]=xf([R,d,K],[z,f],{props:be}),[Ce,we]=S.useMemo(()=>ef(l)?[void 0,l]:[l,void 0],[l]),Te=S.useMemo(()=>{let e={};return we&&Object.keys(we).forEach(t=>{let n=we[t];Zd(n)&&(e[`--${W}-${t}-width`]=Qd(n)?`${n}px`:n)}),e},[W,we]);return S.createElement(Ry,{form:!0,space:!0},S.createElement(kf.Provider,{value:ye},S.createElement(K_,{width:Ce,...M,zIndex:ve,getContainer:s===void 0?N:s,prefixCls:W,rootClassName:Y(se,r,ce,oe,xe.root),rootStyle:Se.root,footer:ue,visible:i,mousePosition:_??Tb,onClose:J,closable:he,closeIcon:fe,transitionName:vh(re,`zoom`,e.transitionName),maskTransitionName:vh(re,`fade`,e.maskTransitionName),mask:G,maskClosable:q,className:Y(se,n,I),style:{...L,...c,...Te},classNames:{...xe,wrapper:Y(xe.wrapper,le)},styles:Se,panelRef:_e,destroyOnHidden:C??w,modalRender:ge,focusTriggerAfterClose:ie.focusTriggerAfterClose,focusTrap:ie.trap},m?S.createElement($y,{active:!0,title:!1,paragraph:{rows:4},className:`${W}-body-skeleton`}):p)))},Db=e=>{let{componentCls:t,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:i,fontSize:a,lineHeight:o,modalTitleHeight:s,fontHeight:c,confirmBodyPadding:l}=e,u=`${t}-confirm`;return{[u]:{"&-rtl":{direction:`rtl`},[`${e.antCls}-modal-header`]:{display:`none`},[`${u}-body-wrapper`]:{...Ul()},[`&${t} ${t}-body`]:{padding:l},[`${u}-body`]:{display:`flex`,flexWrap:`nowrap`,alignItems:`start`,[`> ${e.iconCls}`]:{flex:`none`,fontSize:i,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(c).sub(i).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(s).sub(i).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:`flex`,flexDirection:`column`,flex:`auto`,rowGap:e.marginXS,maxWidth:`calc(100% - ${X(e.marginSM)})`},[`${u}-body-no-icon ${u}-paragraph`]:{maxWidth:`100%`},[`${e.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${X(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${u}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:r},[`${u}-container`]:{color:e.colorText,fontSize:a,lineHeight:o},[`${u}-btns`]:{textAlign:`end`,marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${u}-error ${u}-body > ${e.iconCls}`]:{color:e.colorError},[`${u}-warning ${u}-body > ${e.iconCls}, + ${u}-confirm ${u}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${u}-info ${u}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${u}-success ${u}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},Ob=Ql([`Modal`,`confirm`],e=>Db(Sb(e)),Cb,{order:-1e3}),kb=e=>{let{prefixCls:t,icon:n,okText:r,cancelText:i,confirmPrefixCls:a,type:o,okCancel:s,footer:c,locale:l,autoFocusButton:u,focusable:d,...f}=e,p=n;if(!n&&n!==null)switch(o){case`info`:p=S.createElement(Fu,null);break;case`success`:p=S.createElement(Cu,null);break;case`error`:p=S.createElement(Eu,null);break;default:p=S.createElement(Mu,null)}let m=s??o===`confirm`,h=S.useMemo(()=>{let e=d?.autoFocusButton||u;return e||e===null?e:`ok`},[u,d?.autoFocusButton]),[g]=qd(`Modal`),_=l||g,v=r||(m?_?.okText:_?.justOkText),y=i||_?.cancelText,{closable:b}=f,{onClose:x}=ef(b)?b:{},C=S.useMemo(()=>({autoFocusButton:h,cancelTextLocale:y,okTextLocale:v,mergedOkCancel:m,onClose:x,...f}),[h,y,v,m,x,f]),w=S.createElement(S.Fragment,null,S.createElement(A_,null),S.createElement(j_,null)),T=Zd(e.title)&&e.title!==``,E=Zd(p),D=`${a}-body`;return S.createElement(`div`,{className:`${a}-body-wrapper`},S.createElement(`div`,{className:Y(D,{[`${D}-has-title`]:T,[`${D}-no-icon`]:!E})},p,S.createElement(`div`,{className:`${a}-paragraph`},T&&S.createElement(`span`,{className:`${a}-title`},e.title),S.createElement(`div`,{className:`${a}-content`},e.content))),c===void 0||typeof c==`function`?S.createElement(k_,{value:C},S.createElement(`div`,{className:`${a}-btns`},typeof c==`function`?c(w,{OkBtn:j_,CancelBtn:A_}):w)):c,S.createElement(Ob,{prefixCls:t}))},Ab=e=>{let{close:t,zIndex:n,maskStyle:r,direction:i,prefixCls:a,wrapClassName:o,rootPrefixCls:s,bodyStyle:c,closable:l=!1,onConfirm:u,styles:d,title:f,mask:p,maskClosable:m,okButtonProps:h,cancelButtonProps:g}=e,{cancelButtonProps:_,okButtonProps:v}=_a(`modal`),y=`${a}-confirm`,b=e.width||416,x=e.style||{},C=Y(y,`${y}-${e.type}`,{[`${y}-rtl`]:i===`rtl`},e.className),w=S.useMemo(()=>{let e=pf(p,m);return e.closable??=!1,e},[p,m]),[,T]=zl(),E=S.useMemo(()=>n===void 0?T.zIndexPopupBase+jf:n,[n,T]);return S.createElement(Eb,{...e,className:C,wrapClassName:Y({[`${y}-centered`]:!!e.centered},o),onCancel:()=>{t?.({triggerCancel:!0}),u?.(!1)},title:f,footer:null,transitionName:vh(s||``,`zoom`,e.transitionName),maskTransitionName:vh(s||``,`fade`,e.maskTransitionName),mask:w,style:x,styles:{body:c,mask:r,...d},width:b,zIndex:E,closable:l},S.createElement(kb,{...e,confirmPrefixCls:y,okButtonProps:{...v,...h},cancelButtonProps:{..._,...g}}))},jb=e=>{let{rootPrefixCls:t,iconPrefixCls:n,direction:r,theme:i}=e;return S.createElement(Nm,{prefixCls:t,iconPrefixCls:n,direction:r,theme:i},S.createElement(Ab,{...e}))},Mb=[],Nb=``;function Pb(){return Nb}var Fb=e=>{let{prefixCls:t,getContainer:n,direction:r}=e,i=Gd(),a=(0,S.useContext)(ma),o=Pb()||a.getPrefixCls(),s=t||`${o}-modal`,c=n;return c===!1&&(c=void 0),S.createElement(jb,{...e,rootPrefixCls:o,prefixCls:s,iconPrefixCls:a.iconPrefixCls,theme:a.theme,direction:r??a.direction,locale:a.locale?.Modal??i,getContainer:c})};function Ib(e){let t=jm(),n=document.createDocumentFragment(),r={...e,close:s,open:!0},i;function a(...t){t.some(e=>e?.triggerCancel)&&e.onCancel?.(()=>{},...t.slice(1));for(let e=0;e{})}let o=e=>{clearTimeout(i),i=setTimeout(()=>{let r=t.getPrefixCls(void 0,Pb()),i=t.getIconPrefixCls(),a=t.getTheme(),o=S.createElement(Fb,{...e});Li(S.createElement(Nm,{prefixCls:r,iconPrefixCls:i,theme:a},typeof t.holderRender==`function`?t.holderRender(o):o),n)})};function s(...t){r={...r,open:!1,afterClose:()=>{typeof e.afterClose==`function`&&e.afterClose(),a.apply(this,t)}},o(r)}function c(e){r=typeof e==`function`?e(r):{...r,...e},o(r)}return o(r),Mb.push(s),{destroy:s,update:c}}function Lb(e){return{...e,type:`warning`}}function Rb(e){return{...e,type:`info`}}function zb(e){return{...e,type:`success`}}function Bb(e){return{...e,type:`error`}}function Vb(e){return{...e,type:`confirm`}}function Hb({rootPrefixCls:e}){Nb=e}var Ub=S.forwardRef((e,t)=>{let{afterClose:n,config:r,...i}=e,[a,o]=S.useState(!0),[s,c]=S.useState(r),{direction:l,getPrefixCls:u}=S.useContext(ma),d=u(`modal`),f=u(),p=()=>{n(),s.afterClose?.()},m=(...e)=>{o(!1),e.some(e=>e?.triggerCancel)&&s.onCancel?.(()=>{},...e.slice(1))};S.useImperativeHandle(t,()=>({destroy:m,update:e=>{c(t=>{let n=typeof e==`function`?e(t):e;return{...t,...n}})}}));let h=s.okCancel??s.type===`confirm`,[g]=qd(`Modal`,Bd.Modal);return S.createElement(jb,{prefixCls:d,rootPrefixCls:f,...s,close:m,open:a,afterClose:p,okText:s.okText||(h?g?.okText:g?.justOkText),direction:s.direction||l,cancelText:s.cancelText||g?.cancelText,...i})}),Wb=0,Gb=S.memo(S.forwardRef((e,t)=>{let[n,r]=Tf();return S.useImperativeHandle(t,()=>({patchElement:r}),[r]),S.createElement(S.Fragment,null,n)}));function Kb(){let e=S.useRef(null),[t,n]=S.useState([]);S.useEffect(()=>{t.length&&(da(t).forEach(e=>{e()}),n([]))},[t]);let r=S.useCallback(t=>function(r){Wb+=1;let i=S.createRef(),a,o=new Promise(e=>{a=e}),s=!1,c,l=S.createElement(Ub,{key:`modal-${Wb}`,config:t(r),ref:i,afterClose:()=>{c?.()},isSilent:()=>s,onConfirm:e=>{a(e)}});return c=e.current?.patchElement(l),c&&Mb.push(c),{destroy:()=>{function e(){i.current?.destroy()}i.current?e():n(t=>[].concat(da(t),[e]))},update:e=>{function t(){i.current?.update(e)}i.current?t():n(e=>[].concat(da(e),[t]))},then:e=>(s=!0,o.then(e))}},[]);return[S.useMemo(()=>({info:r(Rb),success:r(zb),error:r(Bb),warning:r(Lb),confirm:r(Vb)}),[r]),S.createElement(Gb,{key:`modal-holder`,ref:e})]}var qb=e=>{let{componentCls:t,notificationMarginEdge:n,animationMaxHeight:r}=e,i=`${t}-notice`,a=new As(`antNotificationFadeIn`,{"0%":{transform:`translate3d(100%, 0, 0)`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,opacity:1}}),o=new As(`antNotificationTopFadeIn`,{"0%":{top:-r,opacity:0},"100%":{top:0,opacity:1}}),s=new As(`antNotificationBottomFadeIn`,{"0%":{bottom:e.calc(r).mul(-1).equal(),opacity:0},"100%":{bottom:0,opacity:1}}),c=new As(`antNotificationLeftFadeIn`,{"0%":{transform:`translate3d(-100%, 0, 0)`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,opacity:1}});return{[t]:{[`&${t}-top, &${t}-bottom`]:{marginInline:0,[i]:{marginInline:`auto auto`}},[`&${t}-top`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:o}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:s}},[`&${t}-topRight, &${t}-bottomRight`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:a}},[`&${t}-topLeft, &${t}-bottomLeft`]:{marginRight:{value:0,_skip_check_:!0},marginLeft:{value:n,_skip_check_:!0},[i]:{marginInlineEnd:`auto`,marginInlineStart:0},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:c}}}}},Jb=[`top`,`topLeft`,`topRight`,`bottom`,`bottomLeft`,`bottomRight`],Yb={topLeft:`left`,topRight:`right`,bottomLeft:`left`,bottomRight:`right`,top:`left`,bottom:`left`},Xb=(e,t)=>{let{componentCls:n}=e;return{[`${n}-${t}`]:{[`&${n}-stack > ${n}-notice-wrapper`]:{[t.startsWith(`top`)?`top`:`bottom`]:0,[Yb[t]]:{value:0,_skip_check_:!0}}}}},Zb=e=>{let t={};for(let n=1;n ${e.componentCls}-notice`]:{opacity:0,transition:`opacity ${e.motionDurationMid}`}};return{[`&:not(:nth-last-child(-n+${e.notificationStackLayer}))`]:{opacity:0,overflow:`hidden`,color:`transparent`,pointerEvents:`none`},...t}},Qb=e=>{let t={};for(let n=1;n{let{componentCls:t}=e;return{[`${t}-stack`]:{[`& > ${t}-notice-wrapper`]:{transition:`transform ${e.motionDurationSlow}, backdrop-filter 0s`,willChange:`transform, opacity`,position:`absolute`,...Zb(e)}},[`${t}-stack:not(${t}-stack-expanded)`]:{[`& > ${t}-notice-wrapper`]:{...Qb(e)}},[`${t}-stack${t}-stack-expanded`]:{[`& > ${t}-notice-wrapper`]:{"&:not(:nth-last-child(-n + 1))":{opacity:1,overflow:`unset`,color:`inherit`,pointerEvents:`auto`,[`& > ${e.componentCls}-notice`]:{opacity:1}},"&:after":{content:`""`,position:`absolute`,height:e.margin,width:`100%`,insetInline:0,bottom:e.calc(e.margin).mul(-1).equal(),background:`transparent`,pointerEvents:`auto`}}},...Jb.map(t=>Xb(e,t)).reduce((e,t)=>({...e,...t}),{})}},ex=e=>{let{iconCls:t,componentCls:n,boxShadow:r,fontSizeLG:i,notificationMarginBottom:a,borderRadiusLG:o,colorSuccess:s,colorInfo:c,colorWarning:l,colorError:u,colorTextHeading:d,notificationBg:f,notificationPadding:p,notificationMarginEdge:m,progressBg:h,notificationProgressHeight:g,fontSize:_,lineHeight:v,width:y,notificationIconSize:b,colorText:x,colorSuccessBg:S,colorErrorBg:C,colorInfoBg:w,colorWarningBg:T,motionDurationMid:E}=e,D=`${n}-notice`;return{position:`relative`,marginBottom:a,marginInlineStart:`auto`,background:f,borderRadius:o,boxShadow:r,[D]:{padding:p,width:y,maxWidth:`calc(100vw - ${X(e.calc(m).mul(2).equal())})`,lineHeight:v,wordWrap:`break-word`,borderRadius:o,overflow:`hidden`,"&-success":S?{background:S}:{},"&-error":C?{background:C}:{},"&-info":w?{background:w}:{},"&-warning":T?{background:T}:{}},[`${D}-title`]:{marginBottom:e.marginXS,color:d,fontSize:i,lineHeight:e.lineHeightLG},[`${D}-description`]:{fontSize:_,color:x,marginTop:e.marginXS,"&:first-child":{marginTop:0,marginInlineEnd:e.marginSM}},[`${D}-closable ${D}-title`]:{paddingInlineEnd:e.paddingLG},[`${D}-with-icon ${D}-title`]:{marginBottom:e.marginXS,marginInlineStart:e.calc(e.marginSM).add(b).equal(),fontSize:i},[`${D}-with-icon ${D}-description`]:{marginInlineStart:e.calc(e.marginSM).add(b).equal(),fontSize:_},[`${D}-icon`]:{position:`absolute`,fontSize:b,lineHeight:1,[`&-success${t}`]:{color:s},[`&-info${t}`]:{color:c},[`&-warning${t}`]:{color:l},[`&-error${t}`]:{color:u}},[`${D}-close`]:{position:`absolute`,top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:`none`,width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:[`color`,`background-color`].map(e=>`${e} ${E}`).join(`, `),display:`flex`,alignItems:`center`,justifyContent:`center`,background:`none`,border:`none`,"&:hover":{color:e.colorIconHover,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},...Gl(e)},[`${D}-progress`]:{position:`absolute`,display:`block`,appearance:`none`,inlineSize:`calc(100% - ${X(o)} * 2)`,left:{_skip_check_:!0,value:o},right:{_skip_check_:!0,value:o},bottom:0,blockSize:g,border:0,"&, &::-webkit-progress-bar":{borderRadius:o,backgroundColor:`rgba(0, 0, 0, 0.04)`},"&::-moz-progress-bar":{background:h},"&::-webkit-progress-value":{borderRadius:o,background:h}},[`${D}-actions`]:{float:`right`,marginTop:e.marginSM}}},tx=e=>{let{componentCls:t,notificationMarginBottom:n,notificationMarginEdge:r,motionDurationMid:i,motionEaseInOut:a}=e,o=`${t}-notice`,s=new As(`antNotificationFadeOut`,{"0%":{maxHeight:e.animationMaxHeight,marginBottom:n},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[t]:{...Vl(e),position:`fixed`,zIndex:e.zIndexPopup,marginRight:{value:r,_skip_check_:!0},[`${t}-hook-holder`]:{position:`relative`},[`${t}-fade-appear-prepare`]:{opacity:`0 !important`},[`${t}-fade-enter, ${t}-fade-appear`]:{animationDuration:e.motionDurationMid,animationTimingFunction:a,animationFillMode:`both`,opacity:0,animationPlayState:`paused`},[`${t}-fade-leave`]:{animationTimingFunction:a,animationFillMode:`both`,animationDuration:i,animationPlayState:`paused`},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationPlayState:`running`},[`${t}-fade-leave${t}-fade-leave-active`]:{animationName:s,animationPlayState:`running`},"&-rtl":{direction:`rtl`,[`${o}-actions`]:{float:`left`}}}},{[t]:{[`${o}-wrapper`]:ex(e)}}]},nx=e=>({zIndexPopup:e.zIndexPopupBase+jf+50,width:384,progressBg:`linear-gradient(90deg, ${e.colorPrimaryBorderHover}, ${e.colorPrimary})`,colorSuccessBg:void 0,colorErrorBg:void 0,colorInfoBg:void 0,colorWarningBg:void 0}),rx=e=>{let t=e.paddingMD,n=e.paddingLG;return lc(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationIconSize:e.calc(e.fontSizeLG).mul(e.lineHeightLG).equal(),notificationCloseButtonSize:e.calc(e.controlHeightLG).mul(.55).equal(),notificationMarginBottom:e.margin,notificationPadding:`${X(e.paddingMD)} ${X(e.paddingContentHorizontalLG)}`,notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationStackLayer:3,notificationProgressHeight:2})},ix=Xl(`Notification`,e=>{let t=rx(e);return[tx(t),qb(t),$b(t)]},nx);function ax(e,t){return t===null||t===!1?null:t||S.createElement(ku,{className:`${e}-close-icon`})}var ox={success:Cu,info:Fu,error:Eu,warning:Mu},sx=e=>{let{prefixCls:t,icon:n,type:r,title:i,description:a,actions:o,role:s=`alert`,styles:c,classNames:l}=e,u=null;return n?u=S.createElement(`span`,{className:Y(`${t}-icon`,l.icon),style:c.icon},n):r&&(u=S.createElement(ox[r]||null,{className:Y(`${t}-icon`,l.icon,`${t}-icon-${r}`),style:c.icon})),S.createElement(`div`,{className:Y({[`${t}-with-icon`]:u}),role:s},u,i&&S.createElement(`div`,{className:Y(`${t}-title`,l.title),style:c.title},i),a&&S.createElement(`div`,{className:Y(`${t}-description`,l.description),style:c.description},a),o&&S.createElement(`div`,{className:Y(`${t}-actions`,l.actions),style:c.actions},o))};function cx(e,t,n){let r;switch(e){case`top`:r={left:`50%`,transform:`translateX(-50%)`,right:`auto`,top:t,bottom:`auto`};break;case`topLeft`:r={left:0,top:t,bottom:`auto`};break;case`topRight`:r={right:0,top:t,bottom:`auto`};break;case`bottom`:r={left:`50%`,transform:`translateX(-50%)`,right:`auto`,top:`auto`,bottom:n};break;case`bottomLeft`:r={left:0,top:`auto`,bottom:n};break;default:r={right:0,top:`auto`,bottom:n};break}return r}function lx(e){return{motionName:`${e}-fade`}}function ux(e,t,n){return e===void 0?t?.closeIcon===void 0?n?.closeIcon:t.closeIcon:e}var dx=24,fx=4.5,px=`topRight`,mx=({children:e,prefixCls:t})=>{let n=ap(t),[r,i]=ix(t,n);return S.createElement(Lm,{classNames:{list:Y(r,i,n)}},e)},hx=(e,{prefixCls:t,key:n})=>S.createElement(mx,{prefixCls:t,key:n},e),gx=S.forwardRef((e,t)=>{let{top:n,bottom:r,prefixCls:i,getContainer:a,maxCount:o,rtl:s,onAllRemoved:c,stack:l,duration:u=fx,pauseOnHover:d=!0,showProgress:f}=e,{getPrefixCls:p,getPopupContainer:m,direction:h}=_a(`notification`),{notification:g}=(0,S.useContext)(ma),[,_]=zl(),v=i||p(`notification`),y=(0,S.useMemo)(()=>Qd(u)&&u>0?u:!1,[u]),[b,x]=qm({prefixCls:v,style:e=>cx(e,n??dx,r??dx),className:()=>Y({[`${v}-rtl`]:s??h===`rtl`}),motion:()=>lx(v),closable:{closeIcon:ax(v)},duration:y,getContainer:()=>a?.()||m?.()||document.body,maxCount:o,pauseOnHover:d,showProgress:f,onAllRemoved:c,renderNotifications:hx,stack:l===!1?!1:{threshold:ef(l)?l?.threshold:void 0,offset:8,gap:_.margin}}),[C,w]=xf([g?.classNames,e?.classNames],[g?.styles,e?.styles],{props:e});return S.useImperativeHandle(t,()=>({...b,prefixCls:v,notification:g,classNames:C,styles:w})),x});function _x(e){let t=S.useRef(null);Ui(`Notification`);let{notification:n}=S.useContext(ma);return[S.useMemo(()=>{let r=r=>{if(!t.current)return;let{open:i,prefixCls:a,notification:o,classNames:s,styles:c}=t.current,l=o?.className||{},u=o?.style||{},d=`${a}-notice`,{title:f,message:p,description:m,icon:h,type:g,btn:_,actions:v,className:y,style:b,role:x=`alert`,closeIcon:C,closable:w,classNames:T={},styles:E={},...D}=r,O=f??p,k=v??_,A=ax(d,ux(C,e,o)),[j,M,,N]=uf(af({...e||{},...r}),af(n),{closable:!0,closeIcon:A}),P=j?{onClose:ef(w)?w.onClose:void 0,closeIcon:M,...N}:!1,F=bf(T,{props:r}),I=bf(E,{props:r}),L=hf(void 0,s,F),R=_f(c,I);return i({placement:e?.placement??px,...D,content:S.createElement(sx,{prefixCls:d,icon:h,type:g,title:O,description:m,actions:k,role:x,classNames:L,styles:R}),className:Y({[`${d}-${g}`]:g},y,l,L.root),style:{...u,...R.root,...b},closable:P})},i={open:r,destroy:e=>{e===void 0?t.current?.destroy():t.current?.close(e)}};return[`success`,`info`,`warning`,`error`].forEach(e=>{i[e]=t=>r({...t,type:e})}),i},[e,n]),S.createElement(gx,{key:`notification-holder`,...e,ref:t})]}function vx(e){return _x(e)}var yx=S.createContext({}),bx=S.createContext({message:{},notification:{},modal:{}}),xx=Xl(`App`,e=>{let{componentCls:t,colorText:n,fontSize:r,lineHeight:i,fontFamily:a}=e;return{[t]:{color:n,fontSize:r,lineHeight:i,fontFamily:a,[`&${t}-rtl`]:{direction:`rtl`}}}},()=>({})),Sx=e=>{let{prefixCls:t,children:n,className:r,rootClassName:i,message:a,notification:o,style:s,component:c=`div`}=e,{direction:l,getPrefixCls:u,className:d,style:f}=_a(`app`),p=u(`app`,t),[m,h]=xx(p),g=Y(m,p,r,i,h,{[`${p}-rtl`]:l===`rtl`}),_=(0,S.useContext)(yx),v=S.useMemo(()=>({message:{..._.message,...a},notification:{..._.notification,...o}}),[a,o,_.message,_.notification]),[y,b]=dh(v.message),[x,C]=vx(v.notification),[w,T]=Kb(),E=S.useMemo(()=>({message:y,notification:x,modal:w}),[y,x,w]);Ui(`App`)(!(h&&c===!1),`usage`,"When using cssVar, ensure `component` is assigned a valid React component string.");let D=c===!1?S.Fragment:c,O={className:Y(d,g),style:{...f,...s}};return S.createElement(bx.Provider,{value:E},S.createElement(yx.Provider,{value:v},S.createElement(D,{...c===!1?void 0:O},T,b,C,n)))},Cx=()=>S.useContext(bx),wx=Sx;wx.useApp=Cx;function Tx(e){return t=>S.createElement(Nm,{theme:{token:{motion:!1,zIndexPopupBase:0}}},S.createElement(e,{...t}))}var Ex=(e,t,n,r,i)=>Tx(a=>{let{prefixCls:o,style:s}=a,c=S.useRef(null),[l,u]=S.useState(0),[d,f]=S.useState(0),[p,m]=Wn(!1,a.open),{getPrefixCls:h}=S.useContext(ma),g=h(r||`select`,o);S.useEffect(()=>{if(m(!0),typeof ResizeObserver<`u`){let e=new ResizeObserver(e=>{let t=e[0].target;u(t.offsetHeight+8),f(t.offsetWidth)}),t=setInterval(()=>{let n=i?`.${i(g)}`:`.${g}-dropdown`,r=c.current?.querySelector(n);r&&(clearInterval(t),e.observe(r))},10);return()=>{clearInterval(t),e.disconnect()}}},[g]);let _={...a,style:{...s,margin:0},open:p,getPopupContainer:()=>c.current};n&&(_=n(_)),t&&(_={..._,[t]:{overflow:{adjustX:!1,adjustY:!1}}});let v={paddingBottom:l,position:`relative`,minWidth:d};return S.createElement(`div`,{ref:c,style:v},S.createElement(e,{..._}))}),Dx=(e,t,n,r,i=!1,a,o)=>{let s=(0,S.useMemo)(()=>typeof n==`boolean`?{allowClear:n}:n&&typeof n==`object`?n:{allowClear:!1},[n]);return(0,S.useMemo)(()=>{let e=!i&&s.allowClear!==!1&&(t.length||a)&&!(o===`combobox`&&a===``);return{allowClear:e,clearIcon:e?s.clearIcon||r||`×`:null}},[s,r,i,t.length,a,o])},Ox=S.createContext(null);function kx(){return S.useContext(Ox)}function Ax(e=250){let t=S.useRef(null),n=S.useRef(null);S.useEffect(()=>()=>{window.clearTimeout(n.current)},[]);function r(r){(r||t.current===null)&&(t.current=r),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current=null},e)}return[()=>t.current,r]}function jx(e,t){return e.filter(e=>e).some(e=>e.contains(t)||e===t)}function Mx(e,t,n,r){let i=Rn(i=>{if(r)return;let a=i.target;a.shadowRoot&&i.composed&&(a=i.composedPath()[0]||a),i._ori_target&&(a=i._ori_target),t&&!jx(e(),a)&&n(!1)});S.useEffect(()=>(window.addEventListener(`mousedown`,i),()=>window.removeEventListener(`mousedown`,i)),[i])}function Nx(){return Nx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let t=e===!0?0:1;return{bottomLeft:{points:[`tl`,`bl`],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},bottomRight:{points:[`tr`,`br`],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},topLeft:{points:[`bl`,`tl`],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},topRight:{points:[`br`,`tr`],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`}}},Fx=S.forwardRef((e,t)=>{let{prefixCls:n,disabled:r,visible:i,children:a,popupElement:o,animation:s,transitionName:c,popupStyle:l,popupClassName:u,direction:d=`ltr`,placement:f,builtinPlacements:p,popupMatchSelectWidth:m,popupRender:h,popupAlign:g,getPopupContainer:_,empty:v,onPopupVisibleChange:y,onPopupMouseEnter:b,onPopupMouseDown:x,onPopupBlur:C,...w}=e,T=`${n}-dropdown`,E=o;h&&(E=h(o));let D=S.useMemo(()=>p||Px(m),[p,m]),O=s?`${T}-${s}`:c,k=typeof m==`number`,A=S.useMemo(()=>k?null:m===!1?`minWidth`:`width`,[m,k]),j=l;k&&(j={...l,width:m});let M=S.useRef(null);return S.useImperativeHandle(t,()=>({getPopupElement:()=>M.current?.popupElement})),S.createElement(am,Nx({},w,{showAction:y?[`click`]:[],hideAction:y?[`click`]:[],popupPlacement:f||(d===`rtl`?`bottomRight`:`bottomLeft`),builtinPlacements:D,prefixCls:T,popupMotion:{motionName:O},popup:S.createElement(`div`,{onMouseEnter:b,onMouseDown:x,onBlur:C},E),ref:M,stretch:A,popupAlign:g,popupVisible:i,getPopupContainer:_,popupClassName:Y(u,{[`${T}-empty`]:v}),popupStyle:j,onPopupVisibleChange:y}),a)});function Ix(e,t){let{key:n}=e,r;return`value`in e&&({value:r}=e),n??(r===void 0?`rc-index-key-${t}`:r)}function Lx(e){return e!==void 0&&!Number.isNaN(e)}function Rx(e,t){let{label:n,value:r,options:i,groupLabel:a}=e||{},o=n||(t?`children`:`label`);return{label:o,value:r||`value`,options:i||`options`,groupLabel:a||o}}function zx(e,{fieldNames:t,childrenAsData:n}={}){let r=[],{label:i,value:a,options:o,groupLabel:s}=Rx(t,!1);function c(e,t){Array.isArray(e)&&e.forEach(e=>{if(t||!(o in e)){let n=e[a];r.push({key:Ix(e,r.length),groupOption:t,data:e,label:e[i],value:n})}else{let t=e[s];t===void 0&&n&&(t=e.label),r.push({key:Ix(e,r.length),group:!0,data:e,label:t}),c(e[o],!0)}})}return c(e,!1),r}function Bx(e){let t={...e};return`props`in t||Object.defineProperty(t,`props`,{get(){return li(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var Vx=(e,t,n)=>{if(!t||!t.length)return null;let r=!1,i=(e,[t,...n])=>{if(!t)return[e];let a=e.split(t);return r||=a.length>1,a.reduce((e,t)=>[...e,...i(t,n)],[]).filter(Boolean)},a=i(e,t);return r?n===void 0?a:a.slice(0,n):null};function Hx(e){let{visible:t,values:n}=e;return t?S.createElement(`span`,{"aria-live":`polite`,style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},`${n.slice(0,50).map(({label:e,value:t})=>[`number`,`string`].includes(typeof e)?e:t).join(`, `)}`,n.length>50?`, ...`:null):null}var Ux=e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},Wx=(e,t=1)=>{if(t<=0){e();return}Ux(()=>{Wx(e,t-1)})};function Gx(e,t,n,r){let[i,a]=(0,S.useState)(!1);(0,S.useEffect)(()=>{a(!0)},[]);let[o,s]=Wn(e,t),[c,l]=(0,S.useState)(!1),u=i?o:!1,d=r(u),f=(0,S.useRef)(0),p=Rn(e=>{n&&d!==e&&n(e),s(e)});return[u,d,Rn((e,t={})=>{let{cancelFun:n}=t;f.current+=1;let r=f.current,i=typeof e==`boolean`?e:!d;l(!i);function a(){r===f.current&&!n?.()&&(p(i),l(!1))}i?a():Wx(()=>{a()})}),c]}function Kx(e){let{children:t,...n}=e;return t?S.createElement(`div`,n,t):null}var qx=S.createContext(null);function Jx(){return S.useContext(qx)}var Yx=S.forwardRef((e,t)=>{let{onChange:n,onKeyDown:r,onBlur:i,style:a,syncWidth:o,value:s,className:c,autoComplete:l,...u}=e,{prefixCls:d,mode:f,onSearch:p,onSearchSubmit:m,onInputBlur:h,autoFocus:g,tokenWithEnter:_,placeholder:v,components:{input:y=`input`}}=Jx(),{id:b,classNames:x,styles:C,open:w,activeDescendantId:T,role:E,disabled:D}=kx()||{},O=Y(`${d}-input`,x?.input,c),k=S.useRef(!1),A=S.useRef(null),j=S.useRef(null);S.useImperativeHandle(t,()=>j.current);let M=e=>{let{value:t}=e.target;if(_&&A.current&&/[\r\n]/.test(A.current)){let e=A.current.replace(/[\r\n]+$/,``).replace(/\r\n/g,` `).replace(/[\r\n]/g,` `);t=t.replace(e,A.current)}A.current=null,p&&p(t,!0,k.current),n?.(e)},N=e=>{let{key:t}=e,{value:n}=e.currentTarget;t===`Enter`&&f===`tags`&&!w&&!k.current&&m&&m(n),r?.(e)},P=e=>{h?.(),i?.(e)},F=()=>{k.current=!0},I=e=>{if(k.current=!1,f!==`combobox`){let{value:t}=e.currentTarget;p?.(t,!0,!1)}},L=e=>{let{clipboardData:t}=e;A.current=t?.getData(`text`)||``},[R,z]=S.useState(void 0);Vn(()=>{let e=j.current;if(o&&e){e.style.width=`0px`;let t=e.scrollWidth;z(t),e.style.width=``}},[o,s]);let B={id:b,type:f===`combobox`?`text`:`search`,...u,ref:j,style:{...C?.input,...a,"--select-input-width":R},autoFocus:g,autoComplete:l||`off`,className:O,disabled:D,value:s||``,onChange:M,onKeyDown:N,onBlur:P,onPaste:L,onCompositionStart:F,onCompositionEnd:I,role:E||`combobox`,"aria-expanded":w||!1,"aria-haspopup":`listbox`,"aria-owns":w?`${b}_list`:void 0,"aria-autocomplete":`list`,"aria-controls":w?`${b}_list`:void 0,"aria-activedescendant":w?T:void 0};if(S.isValidElement(y)){let t=y.props||{},n={placeholder:e.placeholder||v,...B,...t};return Object.keys(t).forEach(e=>{let r=t[e];typeof r==`function`&&(n[e]=(...t)=>{r(...t),B[e]?.(...t)})}),n.ref=sr(y.ref,B.ref),S.cloneElement(y,n)}let V=y;return S.createElement(V,B)});function Xx(e){let{prefixCls:t,placeholder:n,displayValues:r}=Jx(),{classNames:i,styles:a}=kx(),{show:o=!0}=e;return r.length?null:S.createElement(`div`,{className:Y(`${t}-placeholder`,i?.placeholder),style:{visibility:o?`visible`:`hidden`,...a?.placeholder}},n)}var Zx=S.createContext(null);function Qx(e){return Array.isArray(e)?e:e===void 0?[]:[e]}typeof window<`u`&&window.document&&window.document.documentElement;function $x(e){return e!=null}function eS(e){return!e&&e!==0}function tS(e){return[`string`,`number`].includes(typeof e)}function nS(e){let t;return e&&(tS(e.title)?t=e.title.toString():tS(e.label)&&(t=e.label.toString())),t}function rS(){return rS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,searchValue:r,activeValue:i,displayValues:a,maxLength:o,mode:s,components:c}=Jx(),{triggerOpen:l,title:u,showSearch:d,classNames:f,styles:p}=kx(),m=S.useContext(Zx),[h,g]=S.useState(!1),_=s===`combobox`,v=a[0],y=S.useMemo(()=>_&&i&&!h&&l?i:d?r:``,[_,i,h,l,r,d]),[b,x,C,w]=S.useMemo(()=>{let e,t,n;if(v&&m?.flattenOptions){let r=m.flattenOptions.find(e=>e.value===v.value);r?.data&&(e=r.data.className,t=r.data.style,n=nS(r.data))}return v&&!n&&(n=nS(v)),u!==void 0&&(n=u),[e,t,n,!!e||!!t]},[v,m?.flattenOptions,u]);S.useEffect(()=>{_&&g(!1)},[_,i]);let T=v&&v.label!==null&&v.label!==void 0&&String(v.label).trim()!==``,E=_&&c?.input?null:v?w?S.createElement(`div`,{className:Y(`${n}-content-value`,b),style:{...y?{visibility:`hidden`}:{},...x},title:C},v.label):v.label:S.createElement(Xx,{show:!y});return S.createElement(`div`,{className:Y(`${n}-content`,T&&`${n}-content-has-value`,y&&`${n}-content-has-search-value`,w&&`${n}-content-has-option-style`,f?.content),style:p?.content,title:w?void 0:C},E,S.createElement(Yx,rS({ref:t},e,{value:y,maxLength:s===`combobox`?o:void 0,onChange:t=>{g(!0),e.onChange?.(t)}})))}),aS=void 0;function oS(e,t){let{prefixCls:n,invalidate:r,item:i,renderItem:a,responsive:o,responsiveDisabled:s,registerSize:c,itemKey:l,className:u,style:d,children:f,display:p,order:m,component:h=`div`,...g}=e,_=o&&!p;function v(e){c(l,e)}S.useEffect(()=>()=>{v(null)},[]);let y=a&&i!==aS?a(i,{index:m}):f,b;r||(b={opacity:+!_,height:_?0:aS,overflowY:_?`hidden`:aS,order:o?m:aS,pointerEvents:_?`none`:aS,position:_?`absolute`:aS});let x={};_&&(x[`aria-hidden`]=!0);let C=S.createElement(h,Wg({className:Y(!r&&n,u),style:{...b,...d}},x,g,{ref:t}),y);return o&&(C=S.createElement(ia,{onResize:({offsetWidth:e})=>{v(e)},disabled:s},C)),C}var sS=S.forwardRef(oS);function cS(e){if(typeof MessageChannel>`u`)Ei(e);else{let t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function lS(){let e=S.useRef(null);return t=>{e.current||(e.current=[],cS(()=>{(0,zi.unstable_batchedUpdates)(()=>{e.current.forEach(e=>{e()}),e.current=null})})),e.current.push(t)}}function uS(e,t){let[n,r]=S.useState(t);return[n,Rn(t=>{e(()=>{r(t)})})]}var dS=S.createContext(null),fS=S.forwardRef((e,t)=>{let n=S.useContext(dS);if(!n){let{component:n=`div`,...r}=e;return S.createElement(n,Wg({},r,{ref:t}))}let{className:r,...i}=n,{className:a,...o}=e;return S.createElement(dS.Provider,{value:null},S.createElement(sS,Wg({ref:t,className:Y(r,a)},i,o)))}),pS=`responsive`,mS=`invalidate`;function hS(e){return`+ ${e.length} ...`}function gS(e,t){let{prefixCls:n=`rc-overflow`,data:r=[],renderItem:i,renderRawItem:a,itemKey:o,itemWidth:s=10,ssr:c,style:l,className:u,maxCount:d,renderRest:f,renderRawRest:p,prefix:m,suffix:h,component:g=`div`,itemComponent:_,onVisibleChange:v,...y}=e,b=c===`full`,x=lS(),[C,w]=uS(x,null),T=C||0,[E,D]=uS(x,new Map),[O,k]=uS(x,0),[A,j]=uS(x,0),[M,N]=uS(x,0),[P,F]=uS(x,0),[I,L]=(0,S.useState)(null),[R,z]=(0,S.useState)(null),B=S.useMemo(()=>R===null&&b?2**53-1:R||0,[R,C]),[V,H]=(0,S.useState)(!1),U=`${n}-item`,ee=Math.max(O,A),te=d===pS,ne=r.length&&te,W=d===mS,re=ne||typeof d==`number`&&r.length>d,G=(0,S.useMemo)(()=>{let e=r;return ne?e=C===null&&b?r:r.slice(0,Math.min(r.length,T/s)):typeof d==`number`&&(e=r.slice(0,d)),e},[r,s,C,d,ne]),K=(0,S.useMemo)(()=>ne?r.slice(B+1):r.slice(G.length),[r,G,ne,B]),q=(0,S.useCallback)((e,t)=>typeof o==`function`?o(e):(o&&e?.[o])??t,[o]),ie=(0,S.useCallback)(i||(e=>e),[i]);function J(e,t,n){R===e&&(t===void 0||t===I)||(z(e),n||(H(e{let r=new Map(n);return t===null?r.delete(e):r.set(e,t),r})}function se(e,t){j(t),k(A)}function ce(e,t){N(t)}function le(e,t){F(t)}function ue(e){return E.get(q(G[e],e))}Vn(()=>{if(T&&typeof ee==`number`&&G){let e=M+P,t=G.length,n=t-1;if(!t){J(0,null);return}for(let r=0;rT){J(r-1,e-t-P+A);break}}h&&ue(0)+P>T&&L(null)}},[T,E,A,M,P,q,G]);let de=V&&!!K.length,fe={};I!==null&&ne&&(fe={position:`absolute`,top:0,insetInlineStart:I});let pe={prefixCls:U,responsive:ne,component:_,invalidate:W},me=a?(e,t)=>{let n=q(e,t);return S.createElement(dS.Provider,{key:n,value:{...pe,order:t,item:e,itemKey:n,registerSize:oe,display:t<=B}},a(e,t))}:(e,t)=>{let n=q(e,t);return S.createElement(sS,Wg({},pe,{order:t,key:n,item:e,renderItem:ie,itemKey:n,registerSize:oe,display:t<=B}))},he={order:de?B:2**53-1,className:`${U}-rest`,registerSize:se,display:de},ge=f||hS,_e=p?S.createElement(dS.Provider,{value:{...pe,...he}},p(K)):S.createElement(sS,Wg({},pe,he),typeof ge==`function`?ge(K):ge),ve=S.createElement(g,Wg({className:Y(!W&&n,u),style:l,ref:t},y),m&&S.createElement(sS,Wg({},pe,{responsive:te,responsiveDisabled:!ne,order:-1,className:`${U}-prefix`,registerSize:ce,display:!0}),m),G.map(me),re?_e:null,h&&S.createElement(sS,Wg({},pe,{responsive:te,responsiveDisabled:!ne,order:B,className:`${U}-suffix`,registerSize:le,display:!0,style:fe}),h));return te?S.createElement(ia,{onResize:ae,disabled:!ne},ve):ve}var _S=S.forwardRef(gS);_S.Item=fS,_S.RESPONSIVE=pS,_S.INVALIDATE=mS;var vS=_S,yS=e=>{let{className:t,style:n,customizeIcon:r,customizeIconProps:i,children:a,onMouseDown:o,onClick:s}=e,c=typeof r==`function`?r(i):r;return S.createElement(`span`,{className:t,onMouseDown:e=>{e.preventDefault(),o?.(e)},style:{userSelect:`none`,WebkitUserSelect:`none`,...n},unselectable:`on`,onClick:s,"aria-hidden":!0},c===void 0?S.createElement(`span`,{className:Y(t.split(/\s+/).map(e=>`${e}-icon`))},a):c)};function bS(){return bS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{e.preventDefault(),e.stopPropagation()},CS=S.forwardRef(function({inputProps:e},t){let{prefixCls:n,displayValues:r,searchValue:i,mode:a,onSelectorRemove:o,removeIcon:s}=Jx(),{disabled:c,showSearch:l,triggerOpen:u,rawOpen:d,toggleOpen:f,autoClearSearchValue:p,tagRender:m,maxTagPlaceholder:h,maxTagTextLength:g,maxTagCount:_,classNames:v,styles:y}=kx(),b=`${n}-selection-item`,x=i;!d&&a===`multiple`&&p!==!1&&(x=``);let C=l&&x||``,w=l&&!c,T=s??`×`,E=h??(e=>`+ ${e.length} ...`),D=m,O=e=>{f(e)},k=e=>{o?.(e)},A=(e,t,n,r,i)=>S.createElement(`span`,{title:nS(e),className:Y(b,{[`${b}-disabled`]:n},v?.item),style:y?.item},S.createElement(`span`,{className:Y(`${b}-content`,v?.itemContent),style:y?.itemContent},t),r&&S.createElement(yS,{className:Y(`${b}-remove`,v?.itemRemove),style:y?.itemRemove,onMouseDown:SS,onClick:i,customizeIcon:T},`×`)),j=(e,t,n,r,i,a,o)=>S.createElement(`span`,{onMouseDown:e=>{SS(e),O(!u)}},D({label:t,value:e,index:o?.index,disabled:n,closable:r,onClose:i,isMaxTag:!!a}));return S.createElement(vS,{prefixCls:`${n}-content`,className:v?.content,style:y?.content,prefix:!r.length&&!C&&S.createElement(Xx,null),data:r,renderItem:(e,t)=>{let{disabled:n,label:r,value:i}=e,a=!c&&!n,o=r;if(typeof g==`number`&&(typeof r==`string`||typeof r==`number`)){let e=String(o);e.length>g&&(o=`${e.slice(0,g)}...`)}let s=t=>{t&&t.stopPropagation(),k(e)};return typeof D==`function`?j(i,o,n,a,s,void 0,t):A(e,o,n,a,s)},renderRest:e=>{if(!r.length)return null;let t=typeof E==`function`?E(e):E;return typeof D==`function`?j(void 0,t,!1,!1,void 0,!0):A({title:t},t,!1)},suffix:S.createElement(Yx,bS({ref:t,disabled:c,readOnly:!w},e,{value:C||``,syncWidth:!0})),itemKey:xS,maxCount:_})}),wS=S.forwardRef(function(e,t){let{multiple:n,onInputKeyDown:r,tabIndex:i}=Jx(),a=kx(),{showSearch:o}=a,s={...bi(a,{aria:!0}),onKeyDown:r,readOnly:!o,tabIndex:i};return n?S.createElement(CS,{ref:t,inputProps:s}):S.createElement(iS,{ref:t,inputProps:s})});function TS(e){return e&&![Zr.ESC,Zr.SHIFT,Zr.BACKSPACE,Zr.TAB,Zr.WIN_KEY,Zr.ALT,Zr.META,Zr.WIN_KEY_RIGHT,Zr.CTRL,Zr.SEMICOLON,Zr.EQUALS,Zr.CAPS_LOCK,Zr.CONTEXT_MENU,Zr.UP,Zr.LEFT,Zr.RIGHT,Zr.F1,Zr.F2,Zr.F3,Zr.F4,Zr.F5,Zr.F6,Zr.F7,Zr.F8,Zr.F9,Zr.F10,Zr.F11,Zr.F12].includes(e)}function ES(){return ES=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{which:t}=e,n=F.current instanceof HTMLTextAreaElement;!n&&D&&(t===Zr.UP||t===Zr.DOWN)&&e.preventDefault(),x&&x(e),!(n&&!D&&~[Zr.UP,Zr.DOWN,Zr.LEFT,Zr.RIGHT].indexOf(t))&&!(e.ctrlKey||e.altKey||e.metaKey)&&TS(t)&&O(!0)});S.useImperativeHandle(t,()=>({focus:e=>{(F.current||P.current).focus?.(e)},blur:()=>{(F.current||P.current).blur?.()},nativeElement:Or(P.current)}));let L=Rn(e=>{if(!A){let t=Or(F.current);e.nativeEvent._ori_target=t;let n=t===e.target||t?.contains(e.target);t&&!n&&e.preventDefault();let r=D&&!l&&(f===`combobox`||k)||D&&l&&n;e.nativeEvent._select_lazy?D&&O(!1):(F.current?.focus(),r||O())}y?.(e)}),{root:R}=T,z=hi(E,DS),B=bi(z,{aria:!0}),V=Object.keys(B),H={...e,onInputKeyDown:I};if(R){let e=R.props||{},t={...e,...z};return Object.keys(e).forEach(n=>{let r=e[n],i=z[n];typeof r==`function`&&typeof i==`function`&&(t[n]=(...e)=>{i(...e),r(...e)})}),S.isValidElement(R)?S.cloneElement(R,{...t,ref:sr(R.ref,P)}):S.createElement(R,ES({},t,{ref:P}))}return S.createElement(qx.Provider,{value:H},S.createElement(`div`,ES({},hi(z,V),{ref:P,className:r,style:i,onMouseDown:L}),S.createElement(Kx,{className:Y(`${n}-prefix`,M?.prefix),style:N?.prefix},a),S.createElement(wS,{ref:F}),S.createElement(Kx,{className:Y(`${n}-suffix`,{[`${n}-suffix-loading`]:j},M?.suffix),style:N?.suffix},o),s&&S.createElement(Kx,{className:Y(`${n}-clear`,M?.clear),style:N?.clear,onMouseDown:e=>{e.nativeEvent._select_lazy=!0,b?.(e)}},s),c))});function kS(e,t,n){return S.useMemo(()=>{let{root:r,input:i}=e||{};return n&&(r=n()),t&&(i=t()),{root:r,input:i}},[e,t,n])}function AS(){return AS=Object.assign?Object.assign.bind():function(e){for(var t=1;te===`tags`||e===`multiple`,MS=S.forwardRef((e,t)=>{let{id:n,prefixCls:r,className:i,styles:a,classNames:o,showSearch:s,tagRender:c,showScrollBar:l=`optional`,direction:u,omitDomProps:d,displayValues:f,onDisplayValuesChange:p,emptyOptions:m,notFoundContent:h=`Not Found`,onClear:g,maxCount:_,placeholder:v,mode:y,disabled:b,loading:x,getInputElement:C,getRawInputElement:w,open:T,defaultOpen:E,onPopupVisibleChange:D,activeValue:O,onActiveValueChange:k,activeDescendantId:A,searchValue:j,autoClearSearchValue:M,onSearch:N,onSearchSplit:P,tokenSeparators:F,allowClear:I,prefix:L,suffix:R,suffixIcon:z,clearIcon:B,OptionList:V,animation:H,transitionName:U,popupStyle:ee,popupClassName:te,popupMatchSelectWidth:ne,popupRender:W,popupAlign:re,placement:G,builtinPlacements:K,getPopupContainer:q,showAction:ie=[],onFocus:J,onBlur:ae,onKeyUp:oe,onKeyDown:se,onMouseDown:ce,components:le,...ue}=e,de=jS(y),fe=S.useRef(null),pe=S.useRef(null),me=S.useRef(null),[he,ge]=S.useState(!1);S.useImperativeHandle(t,()=>({focus:fe.current?.focus,blur:fe.current?.blur,scrollTo:e=>me.current?.scrollTo(e),nativeElement:Or(fe.current)}));let _e=kS(le,C,w),ve=S.useMemo(()=>{if(y!==`combobox`)return j;let e=f[0]?.value;return typeof e==`string`||typeof e==`number`?String(e):``},[j,y,f]),ye=y===`combobox`&&typeof C==`function`&&C()||null,be=!h&&m,[xe,Se,Ce,we]=Gx(E||!1,T,D,e=>b||be?!1:e),Te=S.useMemo(()=>(F||[]).some(e=>[` `,`\r -`].includes(e)),[F]),Ee=(e,t,n)=>{if(de&&Rx(_)&&f.length>=_)return;let r=!0,i=e;k?.(null);let a=Hx(e,F,Rx(_)?_-f.length:void 0),o=n?null:a;return y!==`combobox`&&o&&(i=``,P?.(o),Ce(!1),r=!1),N&&ve!==i&&N(i,{source:t?`typing`:`effect`}),e&&t&&r&&Ce(!0),r},De=e=>{!e||!e.trim()||N(e,{source:`submit`})};S.useEffect(()=>{!xe&&!de&&y!==`combobox`&&Ee(``,!1,!1)},[xe]),S.useEffect(()=>{b&&(Ce(!1),ge(!1))},[b,Se]);let[Oe,ke]=jx(),Ae=S.useRef(!1),je=e=>{let t=Oe(),{key:n}=e,r=n===`Enter`,i=n===` `;if(r||i){let t=y===`combobox`;(i&&!(t||s)||r&&!t)&&e.preventDefault(),Se||Ce(!0)}if(ke(!!ve),n===`Backspace`&&!t&&de&&!ve&&f.length){let e=[...f],t=null;for(let n=e.length-1;n>=0;--n){let r=e[n];if(!r.disabled){e.splice(n,1),t=r;break}}t&&p(e,{type:`remove`,values:[t]})}Se&&(!r||!Ae.current)&&!i&&(r&&(Ae.current=!0),me.current?.onKeyDown(e)),se?.(e)},Me=(e,...t)=>{Se&&me.current?.onKeyUp(e,...t),e.key===`Enter`&&(Ae.current=!1),oe?.(e,...t)},Ne=Rn(e=>{p(f.filter(t=>t!==e),{type:`remove`,values:[e]})}),Pe=()=>{Ae.current=!1},Fe=()=>[Or(fe.current),pe.current?.getPopupElement()];Nx(Fe,Se,Ce,!!_e.root);let Ie=S.useRef(!1),Le=e=>{ge(!0),b||(ie.includes(`focus`)&&Ce(!0),J?.(e))},Re=()=>{Se&&!Ie.current&&Ce(!1,{cancelFun:()=>Mx(Fe(),document.activeElement)})},ze=e=>{ge(!1),ve&&(y===`tags`?N(ve,{source:`submit`}):y===`multiple`&&N(``,{source:`blur`})),Re(),b||ae?.(e)},Be=(e,...t)=>{let{target:n}=e;(pe.current?.getPopupElement())?.contains(n)&&Ce&&Ce(!0),ce?.(e,...t),Ie.current=!0,Gx(()=>{Ie.current=!1})},[,Ve]=S.useState({});function He(){Ve({})}let Ue;_e.root&&(Ue=e=>{Ce(e)});let We=S.useMemo(()=>({...e,notFoundContent:h,open:Se,triggerOpen:Se,rawOpen:xe,id:n,showSearch:s,multiple:de,toggleOpen:Ce,showScrollBar:l,styles:a,classNames:o,lockOptions:we}),[e,h,Ce,n,s,de,Se,xe,l,a,o,we]),Ge=S.useMemo(()=>{let e=R??z;return typeof e==`function`?e({searchValue:ve,open:Se,focused:he,showSearch:s,loading:x}):e},[R,z,ve,Se,he,s,x]),Ke=()=>{g?.(),fe.current?.focus(),p([],{type:`clear`,values:f}),Ee(``,!1,!1)},{allowClear:qe,clearIcon:Je}=Ox(r,f,I,B,b,ve,y),Ye=S.createElement(V,{ref:me}),Xe=Y(r,i,{[`${r}-focused`]:he,[`${r}-multiple`]:de,[`${r}-single`]:!de,[`${r}-allow-clear`]:qe,[`${r}-show-arrow`]:Ge!=null,[`${r}-disabled`]:b,[`${r}-loading`]:x,[`${r}-open`]:Se,[`${r}-customize-input`]:ye,[`${r}-show-search`]:s}),Ze=S.createElement(kS,jS({},ue,{ref:fe,prefixCls:r,className:Xe,focused:he,prefix:L,suffix:Ge,clearIcon:Je,multiple:de,mode:y,displayValues:f,placeholder:v,searchValue:ve,activeValue:O,onSearch:Ee,onSearchSubmit:De,onInputBlur:Pe,onFocus:Le,onBlur:ze,onClearMouseDown:Ke,onKeyDown:je,onKeyUp:Me,onSelectorRemove:Ne,tokenWithEnter:Te,onMouseDown:Be,components:_e}));return Ze=S.createElement(Ix,{ref:pe,disabled:b,prefixCls:r,visible:Se,popupElement:Ye,animation:H,transitionName:U,popupStyle:ee,popupClassName:te,direction:u,popupMatchSelectWidth:ne,popupRender:W,popupAlign:re,placement:G,builtinPlacements:K,getPopupContainer:q,empty:m,onPopupVisibleChange:Ue,onPopupMouseEnter:He,onPopupMouseDown:Be,onPopupBlur:Re},Ze),S.createElement(kx.Provider,{value:We},S.createElement(Ux,{visible:he&&!Se,values:f}),Ze)}),PS=()=>null;PS.isSelectOptGroup=!0;var FS=()=>null;FS.isSelectOption=!0;var IS=S.forwardRef(({height:e,offsetY:t,offsetX:n,children:r,prefixCls:i,onInnerResize:a,innerProps:o,rtl:s,extra:c},l)=>{let u={},d={display:`flex`,flexDirection:`column`};return t!==void 0&&(u={height:e,position:`relative`,overflow:`hidden`},d={...d,transform:`translateY(${t}px)`,[s?`marginRight`:`marginLeft`]:-n,position:`absolute`,left:0,right:0,top:0}),S.createElement(`div`,{style:u},S.createElement(ia,{onResize:({offsetHeight:e})=>{e&&a&&a()}},S.createElement(`div`,Wg({style:d,className:Y({[`${i}-holder-inner`]:i}),ref:l},o),r,c)))});IS.displayName=`Filler`;function LS({children:e,setRef:t}){let n=S.useCallback(e=>{t(e)},[]);return S.cloneElement(e,{ref:n})}function RS(e,t,n,r,i,a,o,{getKey:s}){return e.slice(t,n+1).map((e,n)=>{let c=o(e,t+n,{style:{width:r},offsetX:i}),l=s(e);return S.createElement(LS,{key:l,setRef:t=>a(e,t)},c)})}function zS(e,t,n){let r=e.length,i=t.length,a,o;if(r===0&&i===0)return null;r{let a=zS(r||[],e||[],t);a?.index!==void 0&&(n?.(a.index),o(e[a.index])),i(e)},[e]),[a]}var VS=typeof navigator==`object`&&/Firefox/i.test(navigator.userAgent),HS=((e,t,n,r)=>{let i=(0,S.useRef)(!1),a=(0,S.useRef)(null);function o(){clearTimeout(a.current),i.current=!0,a.current=setTimeout(()=>{i.current=!1},50)}let s=(0,S.useRef)({top:e,bottom:t,left:n,right:r});return s.current.top=e,s.current.bottom=t,s.current.left=n,s.current.right=r,(e,t,n=!1)=>{let r=e?t<0&&s.current.left||t>0&&s.current.right:t<0&&s.current.top||t>0&&s.current.bottom;return n&&r?(clearTimeout(a.current),i.current=!1):(!r||i.current)&&o(),!i.current&&r}});function US(e,t,n,r,i,a,o){let s=(0,S.useRef)(0),c=(0,S.useRef)(null),l=(0,S.useRef)(null),u=(0,S.useRef)(!1),d=HS(t,n,r,i);function f(e,t){if(Ei.cancel(c.current),d(!1,t))return;let n=e;if(!n._virtualHandled)n._virtualHandled=!0;else return;s.current+=t,l.current=t,VS||n.preventDefault(),c.current=Ei(()=>{let e=u.current?10:1;o(s.current*e,!1),s.current=0})}function p(e,t){o(t,!0),VS||e.preventDefault()}let m=(0,S.useRef)(null),h=(0,S.useRef)(null);function g(t){if(!e)return;Ei.cancel(h.current),h.current=Ei(()=>{m.current=null},2);let{deltaX:n,deltaY:r,shiftKey:i}=t,o=n,s=r;(m.current===`sx`||!m.current&&i&&r&&!n)&&(o=r,s=0,m.current=`sx`);let c=Math.abs(o),l=Math.abs(s);m.current===null&&(m.current=a&&c>l?`x`:`y`),m.current===`y`?f(t,s):p(t,o)}function _(t){e&&(u.current=t.detail===l.current)}return[g,_]}function WS(e,t,n,r){let[i,a]=S.useMemo(()=>[new Map,[]],[e,n.id,r]);return(o,s=o)=>{let c=i.get(o),l=i.get(s);if(c===void 0||l===void 0){let u=e.length;for(let d=a.length;d{let e=!1;a.current.forEach((t,n)=>{if(t&&t.offsetParent){let{offsetHeight:r}=t,{marginTop:i,marginBottom:a}=getComputedStyle(t),s=KS(i),c=KS(a),l=r+s+c;o.current.get(n)!==l&&(o.current.set(n,l),e=!0)}}),e&&i(e=>e+1)};if(e)t();else{s.current+=1;let e=s.current;Promise.resolve().then(()=>{e===s.current&&t()})}}function u(r,i){let o=e(r),s=a.current.get(o);i?(a.current.set(o,i),l()):a.current.delete(o),!s!=!i&&(i?t?.(r):n?.(r))}return(0,S.useEffect)(()=>c,[]),[u,l,o.current,r]}var JS=14/15;function YS(e,t,n){let r=(0,S.useRef)(!1),i=(0,S.useRef)(0),a=(0,S.useRef)(0),o=(0,S.useRef)(null),s=(0,S.useRef)(null),c,l=e=>{if(r.current){let t=Math.ceil(e.touches[0].pageX),r=Math.ceil(e.touches[0].pageY),o=i.current-t,c=a.current-r,l=Math.abs(o)>Math.abs(c);l?i.current=t:a.current=r;let u=n(l,l?o:c,!1,e);u&&e.preventDefault(),clearInterval(s.current),u&&(s.current=setInterval(()=>{l?o*=JS:c*=JS;let e=Math.floor(l?o:c);(!n(l,e,!0)||Math.abs(e)<=.1)&&clearInterval(s.current)},16))}},u=()=>{r.current=!1,c()},d=e=>{c(),e.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(e.touches[0].pageX),a.current=Math.ceil(e.touches[0].pageY),o.current=e.target,o.current.addEventListener(`touchmove`,l,{passive:!1}),o.current.addEventListener(`touchend`,u,{passive:!0}))};c=()=>{o.current&&(o.current.removeEventListener(`touchmove`,l),o.current.removeEventListener(`touchend`,u))},Vn(()=>(e&&t.current.addEventListener(`touchstart`,d,{passive:!0}),()=>{t.current?.removeEventListener(`touchstart`,d),c(),clearInterval(s.current)}),[e])}function XS(e){return Math.floor(e**.5)}function ZS(e,t){return(`touches`in e?e.touches[0]:e)[t?`pageX`:`pageY`]-window[t?`scrollX`:`scrollY`]}function QS(e,t,n){S.useEffect(()=>{let r=t.current;if(e&&r){let e=!1,t,i,a=()=>{Ei.cancel(t)},o=()=>{a(),t=Ei(()=>{n(i),o()})},s=()=>{e=!1,a()},c=t=>{if(t.target.draggable||t.button!==0)return;let n=t;n._virtualHandled||(n._virtualHandled=!0,e=!0)},l=t=>{if(e){let e=ZS(t,!1),{top:n,bottom:s}=r.getBoundingClientRect();e<=n?(i=-XS(n-e),o()):e>=s?(i=XS(e-s),o()):a()}};return r.addEventListener(`mousedown`,c),r.ownerDocument.addEventListener(`mouseup`,s),r.ownerDocument.addEventListener(`mousemove`,l),r.ownerDocument.addEventListener(`dragend`,s),()=>{r.removeEventListener(`mousedown`,c),r.ownerDocument.removeEventListener(`mouseup`,s),r.ownerDocument.removeEventListener(`mousemove`,l),r.ownerDocument.removeEventListener(`dragend`,s),a()}}},[e])}var $S=10;function eC(e,t,n,r,i,a,o,s){let c=S.useRef(),[l,u]=S.useState(null);return Vn(()=>{if(l&&l.times<$S){if(!e.current){u(e=>({...e}));return}a();let{targetAlign:s,originAlign:c,index:d,offset:f}=l,p=e.current.clientHeight,m=!1,h=s,g=null;if(p){let a=s||c,u=0,_=0,v=0,y=Math.min(t.length-1,d);for(let e=0;e<=y;e+=1){let a=i(t[e]);_=u;let o=n.get(a);v=_+(o===void 0?r:o),u=v}let b=a===`top`?f:p-f;for(let e=y;e>=0;--e){let r=i(t[e]),a=n.get(r);if(a===void 0){m=!0;break}if(b-=a,b<=0)break}switch(a){case`top`:g=_-f;break;case`bottom`:g=v-p+f;break;default:{let{scrollTop:t}=e.current,n=t+p;_n&&(h=`bottom`)}}g!==null&&o(g),g!==l.lastTop&&(m=!0)}m&&u({...l,times:l.times+1,targetAlign:h,lastTop:g})}},[l,e.current]),e=>{if(e==null){s();return}if(Ei.cancel(c.current),typeof e==`number`)o(e);else if(e&&typeof e==`object`){let n,{align:r}=e;`index`in e?{index:n}=e:n=t.findIndex(t=>i(t)===e.key);let{offset:a=0}=e;u({times:0,index:n,offset:a,originAlign:r})}}}var tC=S.forwardRef((e,t)=>{let{prefixCls:n,rtl:r,scrollOffset:i,scrollRange:a,onStartMove:o,onStopMove:s,onScroll:c,horizontal:l,spinSize:u,containerSize:d,style:f,thumbStyle:p,showScrollBar:m}=e,[h,g]=S.useState(!1),[_,v]=S.useState(null),[y,b]=S.useState(null),x=!r,C=S.useRef(),w=S.useRef(),[T,E]=S.useState(m),D=S.useRef(),O=()=>{m===!0||m===!1||(clearTimeout(D.current),E(!0),D.current=setTimeout(()=>{E(!1)},3e3))},k=a-d||0,A=d-u||0,j=S.useMemo(()=>i===0||k===0?0:i/k*A,[i,k,A]),M=e=>{e.stopPropagation(),e.preventDefault()},N=S.useRef({top:j,dragging:h,pageY:_,startTop:y});N.current={top:j,dragging:h,pageY:_,startTop:y};let P=e=>{g(!0),v(ZS(e,l)),b(N.current.top),o(),e.stopPropagation(),e.preventDefault()};S.useEffect(()=>{let e=e=>{e.preventDefault()},t=C.current,n=w.current;return t.addEventListener(`touchstart`,e,{passive:!1}),n.addEventListener(`touchstart`,P,{passive:!1}),()=>{t.removeEventListener(`touchstart`,e),n.removeEventListener(`touchstart`,P)}},[]);let F=S.useRef();F.current=k;let I=S.useRef();I.current=A,S.useEffect(()=>{if(h){let e,t=t=>{let{dragging:n,pageY:r,startTop:i}=N.current;Ei.cancel(e);let a=C.current.getBoundingClientRect(),o=d/(l?a.width:a.height);if(n){let n=(ZS(t,l)-r)*o,a=i;!x&&l?a-=n:a+=n;let s=F.current,u=I.current,d=u?a/u:0,f=Math.ceil(d*s);f=Math.max(f,0),f=Math.min(f,s),e=Ei(()=>{c(f,l)})}},n=()=>{g(!1),s()};return window.addEventListener(`mousemove`,t,{passive:!0}),window.addEventListener(`touchmove`,t,{passive:!0}),window.addEventListener(`mouseup`,n,{passive:!0}),window.addEventListener(`touchend`,n,{passive:!0}),()=>{window.removeEventListener(`mousemove`,t),window.removeEventListener(`touchmove`,t),window.removeEventListener(`mouseup`,n),window.removeEventListener(`touchend`,n),Ei.cancel(e)}}},[h]),S.useEffect(()=>(O(),()=>{clearTimeout(D.current)}),[i]),S.useImperativeHandle(t,()=>({delayHidden:O}));let L=`${n}-scrollbar`,R={position:`absolute`,visibility:T?null:`hidden`},z={position:`absolute`,borderRadius:99,background:`var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))`,cursor:`pointer`,userSelect:`none`};return l?(Object.assign(R,{height:8,left:0,right:0,bottom:0}),Object.assign(z,{height:`100%`,width:u,[x?`left`:`right`]:j})):(Object.assign(R,{width:8,top:0,bottom:0,[x?`right`:`left`]:0}),Object.assign(z,{width:`100%`,height:u,top:j})),S.createElement(`div`,{ref:C,className:Y(L,{[`${L}-horizontal`]:l,[`${L}-vertical`]:!l,[`${L}-visible`]:T}),style:{...R,...f},onMouseDown:M,onMouseMove:O},S.createElement(`div`,{ref:w,className:Y(`${L}-thumb`,{[`${L}-thumb-moving`]:h}),style:{...z,...p},onMouseDown:P}))}),nC=20;function rC(e=0,t=0){let n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,nC),Math.floor(n)}var iC=[],aC={overflowY:`auto`,overflowAnchor:`none`};function oC(e,t){let{prefixCls:n=`rc-virtual-list`,className:r,height:i,itemHeight:a,fullHeight:o=!0,style:s,data:c,children:l,itemKey:u,virtual:d,direction:f,scrollWidth:p,component:m=`div`,onScroll:h,onVirtualScroll:g,onVisibleChange:_,innerProps:v,extraRender:y,styles:b,showScrollBar:x=`optional`,...C}=e,w=S.useCallback(e=>typeof u==`function`?u(e):e?.[u],[u]),[T,E,D,O]=qS(w,null,null),k=!!(d!==!1&&i&&a),A=S.useMemo(()=>Object.values(D.maps).reduce((e,t)=>e+t,0),[D.id,D.maps]),j=k&&c&&(Math.max(a*c.length,A)>i||!!p),M=f===`rtl`,N=Y(n,{[`${n}-rtl`]:M},r),P=c||iC,F=(0,S.useRef)(),I=(0,S.useRef)(),L=(0,S.useRef)(),[R,z]=(0,S.useState)(0),[B,V]=(0,S.useState)(0),[H,U]=(0,S.useState)(!1),ee=()=>{U(!0)},te=()=>{U(!1)},ne={getKey:w};function W(e){z(t=>{let n;n=typeof e==`function`?e(t):e;let r=he(n);return F.current.scrollTop=r,r})}let re=(0,S.useRef)({start:0,end:P.length}),G=(0,S.useRef)(),[K]=BS(P,w);G.current=K;let{scrollHeight:q,start:ie,end:J,offset:ae}=S.useMemo(()=>{if(!k)return{scrollHeight:void 0,start:0,end:P.length-1,offset:void 0};if(!j)return{scrollHeight:I.current?.offsetHeight||0,start:0,end:P.length-1,offset:void 0};let e=0,t,n,r,o=P.length;for(let s=0;s=R&&t===void 0&&(t=s,n=e),u>R+i&&r===void 0&&(r=s),e=u}return t===void 0&&(t=0,n=0,r=Math.ceil(i/a)),r===void 0&&(r=P.length-1),r=Math.min(r+1,P.length-1),{scrollHeight:e,start:t,end:r,offset:n}},[j,k,R,P,O,i]);re.current.start=ie,re.current.end=J,S.useLayoutEffect(()=>{let e=D.getRecord();if(e.size===1){let t=Array.from(e.keys())[0],n=e.get(t),r=P[ie];if(r&&n===void 0&&w(r)===t){let e=D.get(t)-a;W(t=>t+e)}}D.resetRecord()},[q]);let[oe,se]=S.useState({width:0,height:i}),ce=e=>{se({width:e.offsetWidth,height:e.offsetHeight})},le=(0,S.useRef)(),ue=(0,S.useRef)(),de=S.useMemo(()=>rC(oe.width,p),[oe.width,p]),fe=S.useMemo(()=>rC(oe.height,q),[oe.height,q]),pe=q-i,me=(0,S.useRef)(pe);me.current=pe;function he(e){let t=e;return Number.isNaN(me.current)||(t=Math.min(t,me.current)),t=Math.max(t,0),t}let ge=R<=0,_e=R>=pe,ve=B<=0,ye=B>=p,be=HS(ge,_e,ve,ye),xe=()=>({x:M?-B:B,y:R}),Se=(0,S.useRef)(xe()),Ce=Rn(e=>{if(g){let t={...xe(),...e};(Se.current.x!==t.x||Se.current.y!==t.y)&&(g(t),Se.current=t)}});function we(e,t){let n=e;t?((0,zi.flushSync)(()=>{V(n)}),Ce()):W(n)}function Te(e){let{scrollTop:t}=e.currentTarget;t!==R&&W(t),h?.(e),Ce()}let Ee=e=>{let t=e,n=p?p-oe.width:0;return t=Math.max(t,0),t=Math.min(t,n),t},De=Rn((e,t)=>{t?((0,zi.flushSync)(()=>{V(t=>Ee(t+(M?-e:e)))}),Ce()):W(t=>t+e)}),[Oe,ke]=US(k,ge,_e,ve,ye,!!p,De);YS(k,F,(e,t,n,r)=>{let i=r;return be(e,t,n)?!1:!i||!i._virtualHandled?(i&&(i._virtualHandled=!0),Oe({preventDefault(){},deltaX:e?t:0,deltaY:e?0:t}),!0):!1}),QS(j,F,e=>{W(t=>t+e)}),Vn(()=>{function e(e){let t=ge&&e.detail<0,n=_e&&e.detail>0;k&&!t&&!n&&e.preventDefault()}let t=F.current;return t.addEventListener(`wheel`,Oe,{passive:!1}),t.addEventListener(`DOMMouseScroll`,ke,{passive:!0}),t.addEventListener(`MozMousePixelScroll`,e,{passive:!1}),()=>{t.removeEventListener(`wheel`,Oe),t.removeEventListener(`DOMMouseScroll`,ke),t.removeEventListener(`MozMousePixelScroll`,e)}},[k,ge,_e]),Vn(()=>{if(p){let e=Ee(B);V(e),Ce({x:e})}},[oe.width,p]);let Ae=()=>{le.current?.delayHidden(),ue.current?.delayHidden()},je=eC(F,P,D,a,w,()=>E(!0),W,Ae);S.useImperativeHandle(t,()=>({nativeElement:L.current,getScrollInfo:xe,scrollTo:e=>{function t(e){return e&&typeof e==`object`&&(`left`in e||`top`in e)}t(e)?(e.left!==void 0&&V(Ee(e.left)),je(e.top)):je(e)}})),Vn(()=>{_&&_(P.slice(ie,J+1),P)},[ie,J,P]);let Me=WS(P,w,D,a),Ne=y?.({start:ie,end:J,virtual:j,offsetX:B,offsetY:ae,rtl:M,getSize:Me}),Pe=RS(P,ie,J,p,B,T,l,ne),Fe=null;i&&(Fe={[o?`height`:`maxHeight`]:i,...aC},k&&(Fe.overflowY=`hidden`,p&&(Fe.overflowX=`hidden`),H&&(Fe.pointerEvents=`none`)));let Ie={};return M&&(Ie.dir=`rtl`),S.createElement(`div`,Wg({ref:L,style:{...s,position:`relative`},className:N},Ie,C),S.createElement(ia,{onResize:ce},S.createElement(m,{className:`${n}-holder`,style:Fe,ref:F,onScroll:Te,onMouseEnter:Ae},S.createElement(IS,{prefixCls:n,height:q,offsetX:B,offsetY:ae,scrollWidth:p,onInnerResize:E,ref:I,innerProps:v,rtl:M,extra:Ne},Pe))),j&&q>i&&S.createElement(tC,{ref:le,prefixCls:n,scrollOffset:R,scrollRange:q,rtl:M,onScroll:we,onStartMove:ee,onStopMove:te,spinSize:fe,containerSize:oe.height,style:b?.verticalScrollBar,thumbStyle:b?.verticalScrollBarThumb,showScrollBar:x}),j&&p>oe.width&&S.createElement(tC,{ref:ue,prefixCls:n,scrollOffset:B,scrollRange:p,rtl:M,onScroll:we,onStartMove:ee,onStopMove:te,spinSize:de,containerSize:oe.width,horizontal:!0,style:b?.horizontalScrollBar,thumbStyle:b?.horizontalScrollBarThumb,showScrollBar:x}))}var sC=S.forwardRef(oC);sC.displayName=`List`;var cC=sC;function lC(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}function uC(){return uC=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,id:r,open:i,multiple:a,mode:o,searchValue:s,toggleOpen:c,notFoundContent:l,onPopupScroll:u,showScrollBar:d,lockOptions:f}=Ax(),{maxCount:p,flattenOptions:m,onActiveValue:h,defaultActiveFirstOption:g,onSelect:_,menuItemSelectedIcon:v,rawValues:y,fieldNames:b,virtual:x,direction:C,listHeight:w,listItemHeight:T,optionRender:E,classNames:D,styles:O}=S.useContext(Qx),k=`${n}-item`,A=Xn(()=>m,[i,f],(e,t)=>t[0]&&!t[1]),j=S.useRef(null),M=S.useMemo(()=>a&&Rx(p)&&y?.size>=p,[a,p,y?.size]),N=e=>{e.preventDefault()},P=e=>{j.current?.scrollTo(typeof e==`number`?{index:e}:e)},F=S.useCallback(e=>o===`combobox`?!1:y.has(e),[o,[...y].toString(),y.size]),I=(e,t=1)=>{let n=A.length;for(let r=0;rI(0)),z=(e,t=!1)=>{R(e);let n={source:t?`keyboard`:`mouse`},r=A[e];if(!r){h(null,-1,n);return}h(r.value,e,n)};(0,S.useEffect)(()=>{z(g===!1?-1:I(0))},[A.length,s]);let B=S.useCallback(e=>o===`combobox`?String(e).toLowerCase()===s.toLowerCase():y.has(e),[o,s,[...y].toString(),y.size]);(0,S.useEffect)(()=>{let e;if(!a&&i&&y.size===1){let t=Array.from(y)[0],n=A.findIndex(({data:e})=>s?String(e.value).startsWith(s):e.value===t);n!==-1&&(z(n),e=setTimeout(()=>{P(n)}))}return i&&j.current?.scrollTo(void 0),()=>clearTimeout(e)},[i,s]);let V=e=>{e!==void 0&&_(e,{selected:!y.has(e)}),a||c(!1)};if(S.useImperativeHandle(t,()=>({onKeyDown:e=>{let{which:t,ctrlKey:n}=e;switch(t){case Zr.N:case Zr.P:case Zr.UP:case Zr.DOWN:{let e=0;if(t===Zr.UP?e=-1:t===Zr.DOWN?e=1:lC()&&n&&(t===Zr.N?e=1:t===Zr.P&&(e=-1)),e!==0){let t=I(L+e,e);P(t),z(t,!0)}break}case Zr.TAB:case Zr.ENTER:{let t=A[L];if(!t||t.data.disabled)return V(void 0);!M||y.has(t.value)?V(t.value):V(void 0),i&&e.preventDefault();break}case Zr.ESC:c(!1),i&&e.stopPropagation()}},onKeyUp:()=>{},scrollTo:e=>{P(e)}})),A.length===0)return S.createElement(`div`,{role:`listbox`,id:`${r}_list`,className:`${k}-empty`,onMouseDown:N},l);let H=Object.keys(b).map(e=>b[e]),U=e=>e.label;function ee(e,t){let{group:n}=e;return{role:n?`presentation`:`option`,id:`${r}_list_${t}`}}let te=e=>{let t=A[e];if(!t)return null;let n=t.data||{},{value:r,disabled:i}=n,{group:a}=t,o=bi(n,!0),s=U(t);return t?S.createElement(`div`,uC({"aria-label":typeof s==`string`&&!a?s:null},o,{key:e},ee(t,e),{"aria-selected":B(r),"aria-disabled":i}),r):null},ne={role:`listbox`,id:`${r}_list`};return S.createElement(S.Fragment,null,x&&S.createElement(`div`,uC({},ne,{style:{height:0,width:0,overflow:`hidden`}}),te(L-1),te(L),te(L+1)),S.createElement(cC,{itemKey:`key`,ref:j,data:A,height:w,itemHeight:T,fullHeight:!1,onMouseDown:N,onScroll:u,virtual:x,direction:C,innerProps:x?null:ne,showScrollBar:d,className:D?.popup?.list,style:O?.popup?.list},(e,t)=>{let{group:n,groupOption:r,data:i,label:a,value:o}=e,{key:s}=i;if(n){let e=i.title??(dC(a)?a.toString():void 0);return S.createElement(`div`,{className:Y(k,`${k}-group`,i.className),title:e},a===void 0?s:a)}let{disabled:c,title:l,children:u,style:d,className:f,...p}=i,m=hi(p,H),h=F(o),g=c||!h&&M,_=`${k}-option`,y=Y(k,_,f,D?.popup?.listItem,{[`${_}-grouped`]:r,[`${_}-active`]:L===t&&!g,[`${_}-disabled`]:g,[`${_}-selected`]:h}),b=U(e),C=!v||typeof v==`function`||h,w=typeof b==`number`?b:b||o,T=dC(w)?w.toString():void 0;return l!==void 0&&(T=l),S.createElement(`div`,uC({},bi(m),x?{}:ee(e,t),{"aria-selected":x?void 0:B(o),"aria-disabled":g,className:y,title:T,onMouseMove:()=>{L===t||g||z(t)},onClick:()=>{g||V(o)},style:{...O?.popup?.listItem,...d}}),S.createElement(`div`,{className:`${_}-content`},typeof E==`function`?E(e,{index:t}):w),S.isValidElement(v)||h,C&&S.createElement(bS,{className:`${k}-option-state`,customizeIcon:v,customizeIconProps:{value:o,disabled:g,isSelected:h}},h?`✓`:null))}))}),pC=((e,t)=>{let n=S.useRef({values:new Map,options:new Map});return[S.useMemo(()=>{let{values:r,options:i}=n.current,a=e.map(e=>e.label===void 0?{...e,label:r.get(e.value)?.label}:e),o=new Map,s=new Map;return a.forEach(e=>{o.set(e.value,e),s.set(e.value,t.get(e.value)||i.get(e.value))}),n.current.values=o,n.current.options=s,a},[e,t]),S.useCallback(e=>t.get(e)||n.current.options.get(e),[t])]});function mC(e,t){return $x(e).join(``).toUpperCase().includes(t)}var hC=((e,t,n,r,i)=>S.useMemo(()=>{if(!n||r===!1)return e;let{options:a,label:o,value:s}=t,c=[],l=typeof r==`function`,u=n.toUpperCase(),d=l?r:(e,t)=>i&&i.length?i.some(e=>mC(t[e],u)):t[a]?mC(t[o===`children`?`label`:o],u):mC(t[s],u),f=l?e=>Vx(e):e=>e;return e.forEach(e=>{if(e[a]){if(d(n,f(e)))c.push(e);else{let t=e[a].filter(e=>d(n,f(e)));t.length&&c.push({...e,[a]:t})}return}d(n,f(e))&&c.push(e)}),c},[e,r,i,n,t]));function gC(e){let{key:t,props:{children:n,value:r,...i}}=e;return{key:t,value:r===void 0?t:r,children:n,...i}}function _C(e,t=!1){return Di(e).map((e,n)=>{if(!S.isValidElement(e)||!e.type)return null;let{type:{isSelectOptGroup:r},key:i,props:{children:a,...o}}=e;return t||!r?gC(e):{key:`__RC_SELECT_GRP__${i===null?n:i}__`,label:i,...o,options:_C(a)}}).filter(e=>e)}var vC=(e,t,n,r,i)=>S.useMemo(()=>{let a=e;e||(a=_C(t));let o=new Map,s=new Map,c=(e,t,n)=>{n&&typeof n==`string`&&e.set(t[n],t)},l=(e,t=!1)=>{for(let a=0;a{c(s,u,e)}),c(s,u,i)):l(u[n.options],!0)}};return l(a),{options:a,valueOptions:o,labelOptions:s}},[e,t,n,r,i]);function yC(e){let t=S.useRef();return t.current=e,S.useCallback((...e)=>t.current(...e),[])}function bC(e,t,n){let{filterOption:r,searchValue:i,optionFilterProp:a,filterSort:o,onSearch:s,autoClearSearchValue:c}=t;return S.useMemo(()=>{let t=typeof e==`object`,l={filterOption:r,searchValue:i,optionFilterProp:a,filterSort:o,onSearch:s,autoClearSearchValue:c,...t?e:{}};return[t||n===`combobox`||n===`tags`||n===`multiple`&&e===void 0?!0:e,l]},[n,e,r,i,a,o,s,c])}function xC(){return xC=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,mode:r,prefixCls:i=`rc-select`,backfill:a,fieldNames:o,showSearch:s,searchValue:c,onSearch:l,autoClearSearchValue:u,filterOption:d,optionFilterProp:f,filterSort:p,onSelect:m,onDeselect:h,onActive:g,popupMatchSelectWidth:_=!0,optionLabelProp:v,options:y,optionRender:b,children:x,defaultActiveFirstOption:C,menuItemSelectedIcon:w,virtual:T,direction:E,listHeight:D=200,listItemHeight:O=20,labelRender:k,value:A,defaultValue:j,labelInValue:M,onChange:N,maxCount:P,classNames:F,styles:I,...L}=e,[R,z]=bC(s,{searchValue:c,onSearch:l,autoClearSearchValue:u,filterOption:d,optionFilterProp:f,filterSort:p},r),{filterOption:B,searchValue:V,optionFilterProp:H,filterSort:U,onSearch:ee,autoClearSearchValue:te=!0}=z,ne=S.useMemo(()=>H?Array.isArray(H)?H:[H]:[],[H]),W=Yn(n),re=MS(r),G=!!(!y&&x),K=S.useMemo(()=>B===void 0&&r===`combobox`?!1:B,[B,r]),q=S.useMemo(()=>zx(o,G),[JSON.stringify(o),G]),[ie,J]=Wn(``,V),ae=ie||``,oe=vC(y,x,q,ne,v),{valueOptions:se,labelOptions:ce,options:le}=oe,ue=S.useCallback(e=>$x(e).map(e=>{let t,n,r,i;CC(e)?t=e:(n=e.label,t=e.value);let a=se.get(t);return a&&(n===void 0&&(n=a?.[v||q.label]),r=a?.disabled,i=a?.title),{label:n,value:t,key:t,disabled:r,title:i}}),[q,v,se]),[de,fe]=Wn(j,A),[pe,me]=pC(S.useMemo(()=>{let e=ue(re&&de===null?[]:de);return r===`combobox`&&tS(e[0]?.value)?[]:e},[de,ue,r,re]),se),he=S.useMemo(()=>{if(!r&&pe.length===1){let e=pe[0];if(e.value===null&&(e.label===null||e.label===void 0))return[]}return pe.map(e=>({...e,label:(typeof k==`function`?k(e):e.label)??e.value}))},[r,pe,k]),ge=S.useMemo(()=>new Set(pe.map(e=>e.value)),[pe]);S.useEffect(()=>{if(r===`combobox`){let e=pe[0]?.value;J(eS(e)?String(e):``)}},[pe]);let _e=yC((e,t)=>{let n=t??e;return{[q.value]:e,[q.label]:n}}),ve=hC(S.useMemo(()=>{if(r!==`tags`)return le;let e=[...le],t=e=>se.has(e);return[...pe].sort((e,t)=>e.value{let r=n.value;t(r)||e.push(_e(r,n.label))}),e},[_e,le,se,pe,r]),q,ae,K,ne),ye=S.useMemo(()=>{let e=e=>ne.length?ne.some(t=>e?.[t]===ae):e?.value===ae;return r!==`tags`||!ae||ve.some(t=>e(t))||ve.some(e=>e[q.value]===ae)?ve:[_e(ae),...ve]},[_e,ne,r,ve,ae,q]),be=e=>[...e].sort((e,t)=>U(e,t,{searchValue:ae})).map(e=>Array.isArray(e.options)?{...e,options:e.options.length>0?be(e.options):e.options}:e),xe=S.useMemo(()=>U?be(ye):ye,[ye,U,ae]),Se=S.useMemo(()=>Bx(xe,{fieldNames:q,childrenAsData:G}),[xe,q,G]),Ce=e=>{let t=ue(e);if(fe(t),N&&(t.length!==pe.length||t.some((e,t)=>pe[t]?.value!==e?.value))){let e=M?t.map(({label:e,value:t})=>({label:e,value:t})):t.map(e=>e.value),n=t.map(e=>Vx(me(e.value)));N(re?e:e[0],re?n:n[0])}},[we,Te]=S.useState(null),[Ee,De]=S.useState(0),Oe=C===void 0?r!==`combobox`:C,ke=S.useRef(),Ae=S.useCallback((e,t,{source:n=`keyboard`}={})=>{De(t),a&&r===`combobox`&&e!==null&&n===`keyboard`&&Te(String(e));let i=Promise.resolve().then(()=>{ke.current===i&&g?.(e)});ke.current=i},[a,r,g]),je=(e,t,n)=>{let r=()=>{let t=me(e);return[M?{label:t?.[q.label],value:e}:e,Vx(t)]};if(t&&m){let[e,t]=r();m(e,t)}else if(!t&&h&&n!==`clear`){let[e,t]=r();h(e,t)}},Me=yC((e,t)=>{let n,i=re?t.selected:!0;n=i?re?[...pe,e]:[e]:pe.filter(t=>t.value!==e),Ce(n),je(e,i),r===`combobox`?Te(``):(!MS||te)&&(J(``),Te(``))}),Ne=(e,t)=>{Ce(e);let{type:n,values:r}=t;(n===`remove`||n===`clear`)&&r.forEach(e=>{je(e.value,!1,n)})},Pe=(e,t)=>{if(J(e),Te(null),t.source===`submit`){let t=(e||``).trim();t&&(Ce(Array.from(new Set([...ge,t]))),je(t,!0),J(``));return}t.source!==`blur`&&(r===`combobox`&&Ce(e),ee?.(e))},Fe=e=>{let t=e;r!==`tags`&&(t=e.map(e=>ce.get(e)?.value).filter(e=>e!==void 0));let n=Array.from(new Set([...ge,...t]));Ce(n),n.forEach(e=>{je(e,!0)})},Ie=S.useMemo(()=>{let e=T!==!1&&_!==!1;return{...oe,flattenOptions:Se,onActiveValue:Ae,defaultActiveFirstOption:Oe,onSelect:Me,menuItemSelectedIcon:w,rawValues:ge,fieldNames:q,virtual:e,direction:E,listHeight:D,listItemHeight:O,childrenAsData:G,maxCount:P,optionRender:b,classNames:F,styles:I}},[P,oe,Se,Ae,Oe,Me,w,ge,q,T,_,E,D,O,G,b,F,I]);return S.createElement(Qx.Provider,{value:Ie},S.createElement(NS,xC({},L,{id:W,prefixCls:i,ref:t,omitDomProps:SC,mode:r,classNames:F,styles:I,displayValues:he,onDisplayValuesChange:Ne,maxCount:P,direction:E,showSearch:R,searchValue:ae,onSearch:Pe,autoClearSearchValue:te,onSearchSplit:Fe,popupMatchSelectWidth:_,OptionList:fC,emptyOptions:!Se.length,activeValue:we,activeDescendantId:`${W}_list_${Ee}`})))});wC.Option=FS,wC.OptGroup=PS;var TC=wC,EC=(e,t,n)=>Y({[`${e}-status-success`]:t===`success`,[`${e}-status-warning`]:t===`warning`,[`${e}-status-error`]:t===`error`,[`${e}-status-validating`]:t===`validating`,[`${e}-has-feedback`]:n}),DC=(e,t)=>t||e,OC=()=>{let[,e]=zl(),[t]=qd(`Empty`),n=new jc(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return S.createElement(`svg`,{style:n,width:`184`,height:`152`,viewBox:`0 0 184 152`,xmlns:`http://www.w3.org/2000/svg`},S.createElement(`title`,null,t?.description||`Empty`),S.createElement(`g`,{fill:`none`,fillRule:`evenodd`},S.createElement(`g`,{transform:`translate(24 31.7)`},S.createElement(`ellipse`,{fillOpacity:`.8`,fill:`#F5F5F7`,cx:`67.8`,cy:`106.9`,rx:`67.8`,ry:`12.7`}),S.createElement(`path`,{fill:`#aeb8c2`,d:`M122 69.7 98.1 40.2a6 6 0 0 0-4.6-2.2H42.1a6 6 0 0 0-4.6 2.2l-24 29.5V85H122z`}),S.createElement(`path`,{fill:`#f5f5f7`,d:`M33.8 0h68a4 4 0 0 1 4 4v93.3a4 4 0 0 1-4 4h-68a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4`}),S.createElement(`path`,{fill:`#dce0e6`,d:`M42.7 10h50.2a2 2 0 0 1 2 2v25a2 2 0 0 1-2 2H42.7a2 2 0 0 1-2-2V12a2 2 0 0 1 2-2m.2 39.8h49.8a2.3 2.3 0 1 1 0 4.5H42.9a2.3 2.3 0 0 1 0-4.5m0 11.7h49.8a2.3 2.3 0 1 1 0 4.6H42.9a2.3 2.3 0 0 1 0-4.6m79 43.5a7 7 0 0 1-6.8 5.4H20.5a7 7 0 0 1-6.7-5.4l-.2-1.8V69.7h26.3c2.9 0 5.2 2.4 5.2 5.4s2.4 5.4 5.3 5.4h34.8c2.9 0 5.3-2.4 5.3-5.4s2.3-5.4 5.2-5.4H122v33.5q0 1-.2 1.8`})),S.createElement(`path`,{fill:`#dce0e6`,d:`m149.1 33.3-6.8 2.6a1 1 0 0 1-1.3-1.2l2-6.2q-4.1-4.5-4.2-10.4c0-10 10.1-18.1 22.6-18.1S184 8.1 184 18.1s-10.1 18-22.6 18q-6.8 0-12.3-2.8`}),S.createElement(`g`,{fill:`#fff`,transform:`translate(149.7 15.4)`},S.createElement(`circle`,{cx:`20.7`,cy:`3.2`,r:`2.8`}),S.createElement(`path`,{d:`M5.7 5.6H0L2.9.7zM9.3.7h5v5h-5z`}))))},kC=()=>{let[,e]=zl(),[t]=qd(`Empty`),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:i,colorBgContainer:a}=e,{borderColor:o,shadowColor:s,contentColor:c}=(0,S.useMemo)(()=>({borderColor:new jc(n).onBackground(a).toHexString(),shadowColor:new jc(r).onBackground(a).toHexString(),contentColor:new jc(i).onBackground(a).toHexString()}),[n,r,i,a]);return S.createElement(`svg`,{width:`64`,height:`41`,viewBox:`0 0 64 41`,xmlns:`http://www.w3.org/2000/svg`},S.createElement(`title`,null,t?.description||`Empty`),S.createElement(`g`,{transform:`translate(0 1)`,fill:`none`,fillRule:`evenodd`},S.createElement(`ellipse`,{fill:s,cx:`32`,cy:`33`,rx:`32`,ry:`7`}),S.createElement(`g`,{fillRule:`nonzero`,stroke:o},S.createElement(`path`,{d:`M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z`}),S.createElement(`path`,{d:`M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3`,fill:c}))))},AC=e=>{let{componentCls:t,margin:n,marginXS:r,marginXL:i,fontSize:a,lineHeight:o}=e;return{[t]:{marginInline:r,fontSize:a,lineHeight:o,textAlign:`center`,[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:`100%`},svg:{maxWidth:`100%`,height:`100%`,margin:`auto`}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:i,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},jC=Xl(`Empty`,e=>{let{componentCls:t,controlHeightLG:n,calc:r}=e;return AC(lc(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()}))}),MC=S.createElement(OC,null),NC=S.createElement(kC,null),PC=e=>{let{className:t,rootClassName:n,prefixCls:r,image:i,description:a,children:o,imageStyle:s,style:c,classNames:l,styles:u,...d}=e,{getPrefixCls:f,direction:p,className:m,style:h,classNames:g,styles:_,image:v}=_a(`empty`),y=f(`empty`,r),[b,x]=jC(y),[C,w]=xf([g,l],[_,u],{props:e}),[T]=qd(`Empty`),E=a===void 0?T?.description:a,D=typeof E==`string`?E:`empty`,O=i??v??MC,k=null;return k=typeof O==`string`?S.createElement(`img`,{draggable:!1,alt:D,src:O}):O,S.createElement(`div`,{className:Y(b,x,y,m,{[`${y}-normal`]:O===NC,[`${y}-rtl`]:p===`rtl`},t,n,C.root),style:{...w.root,...h,...c},...d},S.createElement(`div`,{className:Y(`${y}-image`,C.image),style:{...s,...w.image}},k),E&&S.createElement(`div`,{className:Y(`${y}-description`,C.description),style:w.description},E),o&&S.createElement(`div`,{className:Y(`${y}-footer`,C.footer),style:w.footer},o))};PC.PRESENTED_IMAGE_DEFAULT=MC,PC.PRESENTED_IMAGE_SIMPLE=NC;var FC=e=>{let{componentName:t}=e,{getPrefixCls:n}=(0,S.useContext)(ma),r=n(`empty`);switch(t){case`Table`:case`List`:return S.createElement(PC,{image:PC.PRESENTED_IMAGE_SIMPLE});case`Select`:case`TreeSelect`:case`Cascader`:case`Transfer`:case`Mentions`:return S.createElement(PC,{image:PC.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case`Table.filter`:return null;default:return S.createElement(PC,null)}},IC=(e,t,n)=>{let{variant:r,[e]:i}=S.useContext(ma),a=S.useContext(Ry),o=i?.variant,s;s=t===void 0?n===!1?`borderless`:a??o??r??`outlined`:t;let c=pa.includes(s);return[s,c]},LC=e=>{let t={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e===`scroll`?`scroll`:`visible`,dynamicInset:!0};return{bottomLeft:{...t,points:[`tl`,`bl`],offset:[0,4]},bottomRight:{...t,points:[`tr`,`br`],offset:[0,4]},topLeft:{...t,points:[`bl`,`tl`],offset:[0,-4]},topRight:{...t,points:[`br`,`tr`],offset:[0,-4]}}};function RC(e,t){return e||LC(t)}var zC=e=>{let{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:i}=e;return{position:`relative`,display:`block`,minHeight:t,padding:i,color:e.colorText,fontWeight:`normal`,fontSize:n,lineHeight:r,boxSizing:`border-box`}},BC=e=>{let{antCls:t,componentCls:n}=e,r=`${n}-item`,i=`&${t}-slide-up-enter${t}-slide-up-enter-active`,a=`&${t}-slide-up-appear${t}-slide-up-appear-active`,o=`&${t}-slide-up-leave${t}-slide-up-leave-active`,s=`${n}-dropdown-placement-`,c=`${r}-option-selected`;return[{[`${n}-dropdown`]:{...Vl(e),position:`absolute`,top:-9999,zIndex:e.zIndexPopup,boxSizing:`border-box`,padding:e.paddingXXS,overflow:`hidden`,fontSize:e.fontSize,fontVariant:`initial`,backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,[` +`].includes(e)),[F]),Ee=(e,t,n)=>{if(de&&Lx(_)&&f.length>=_)return;let r=!0,i=e;k?.(null);let a=Vx(e,F,Lx(_)?_-f.length:void 0),o=n?null:a;return y!==`combobox`&&o&&(i=``,P?.(o),Ce(!1),r=!1),N&&ve!==i&&N(i,{source:t?`typing`:`effect`}),e&&t&&r&&Ce(!0),r},De=e=>{!e||!e.trim()||N(e,{source:`submit`})};S.useEffect(()=>{!xe&&!de&&y!==`combobox`&&Ee(``,!1,!1)},[xe]),S.useEffect(()=>{b&&(Ce(!1),ge(!1))},[b,Se]);let[Oe,ke]=Ax(),Ae=S.useRef(!1),je=e=>{let t=Oe(),{key:n}=e,r=n===`Enter`,i=n===` `;if(r||i){let t=y===`combobox`;(i&&!(t||s)||r&&!t)&&e.preventDefault(),Se||Ce(!0)}if(ke(!!ve),n===`Backspace`&&!t&&de&&!ve&&f.length){let e=[...f],t=null;for(let n=e.length-1;n>=0;--n){let r=e[n];if(!r.disabled){e.splice(n,1),t=r;break}}t&&p(e,{type:`remove`,values:[t]})}Se&&(!r||!Ae.current)&&!i&&(r&&(Ae.current=!0),me.current?.onKeyDown(e)),se?.(e)},Me=(e,...t)=>{Se&&me.current?.onKeyUp(e,...t),e.key===`Enter`&&(Ae.current=!1),oe?.(e,...t)},Ne=Rn(e=>{p(f.filter(t=>t!==e),{type:`remove`,values:[e]})}),Pe=()=>{Ae.current=!1},Fe=()=>[Or(fe.current),pe.current?.getPopupElement()];Mx(Fe,Se,Ce,!!_e.root);let Ie=S.useRef(!1),Le=e=>{ge(!0),b||(ie.includes(`focus`)&&Ce(!0),J?.(e))},Re=()=>{Se&&!Ie.current&&Ce(!1,{cancelFun:()=>jx(Fe(),document.activeElement)})},ze=e=>{ge(!1),ve&&(y===`tags`?N(ve,{source:`submit`}):y===`multiple`&&N(``,{source:`blur`})),Re(),b||ae?.(e)},Be=(e,...t)=>{let{target:n}=e;(pe.current?.getPopupElement())?.contains(n)&&Ce&&Ce(!0),ce?.(e,...t),Ie.current=!0,Wx(()=>{Ie.current=!1})},[,Ve]=S.useState({});function He(){Ve({})}let Ue;_e.root&&(Ue=e=>{Ce(e)});let We=S.useMemo(()=>({...e,notFoundContent:h,open:Se,triggerOpen:Se,rawOpen:xe,id:n,showSearch:s,multiple:de,toggleOpen:Ce,showScrollBar:l,styles:a,classNames:o,lockOptions:we}),[e,h,Ce,n,s,de,Se,xe,l,a,o,we]),Ge=S.useMemo(()=>{let e=R??z;return typeof e==`function`?e({searchValue:ve,open:Se,focused:he,showSearch:s,loading:x}):e},[R,z,ve,Se,he,s,x]),Ke=()=>{g?.(),fe.current?.focus(),p([],{type:`clear`,values:f}),Ee(``,!1,!1)},{allowClear:qe,clearIcon:Je}=Dx(r,f,I,B,b,ve,y),Ye=S.createElement(V,{ref:me}),Xe=Y(r,i,{[`${r}-focused`]:he,[`${r}-multiple`]:de,[`${r}-single`]:!de,[`${r}-allow-clear`]:qe,[`${r}-show-arrow`]:Ge!=null,[`${r}-disabled`]:b,[`${r}-loading`]:x,[`${r}-open`]:Se,[`${r}-customize-input`]:ye,[`${r}-show-search`]:s}),Ze=S.createElement(OS,AS({},ue,{ref:fe,prefixCls:r,className:Xe,focused:he,prefix:L,suffix:Ge,clearIcon:Je,multiple:de,mode:y,displayValues:f,placeholder:v,searchValue:ve,activeValue:O,onSearch:Ee,onSearchSubmit:De,onInputBlur:Pe,onFocus:Le,onBlur:ze,onClearMouseDown:Ke,onKeyDown:je,onKeyUp:Me,onSelectorRemove:Ne,tokenWithEnter:Te,onMouseDown:Be,components:_e}));return Ze=S.createElement(Fx,{ref:pe,disabled:b,prefixCls:r,visible:Se,popupElement:Ye,animation:H,transitionName:U,popupStyle:ee,popupClassName:te,direction:u,popupMatchSelectWidth:ne,popupRender:W,popupAlign:re,placement:G,builtinPlacements:K,getPopupContainer:q,empty:m,onPopupVisibleChange:Ue,onPopupMouseEnter:He,onPopupMouseDown:Be,onPopupBlur:Re},Ze),S.createElement(Ox.Provider,{value:We},S.createElement(Hx,{visible:he&&!Se,values:f}),Ze)}),NS=()=>null;NS.isSelectOptGroup=!0;var PS=()=>null;PS.isSelectOption=!0;var FS=S.forwardRef(({height:e,offsetY:t,offsetX:n,children:r,prefixCls:i,onInnerResize:a,innerProps:o,rtl:s,extra:c},l)=>{let u={},d={display:`flex`,flexDirection:`column`};return t!==void 0&&(u={height:e,position:`relative`,overflow:`hidden`},d={...d,transform:`translateY(${t}px)`,[s?`marginRight`:`marginLeft`]:-n,position:`absolute`,left:0,right:0,top:0}),S.createElement(`div`,{style:u},S.createElement(ia,{onResize:({offsetHeight:e})=>{e&&a&&a()}},S.createElement(`div`,Wg({style:d,className:Y({[`${i}-holder-inner`]:i}),ref:l},o),r,c)))});FS.displayName=`Filler`;function IS({children:e,setRef:t}){let n=S.useCallback(e=>{t(e)},[]);return S.cloneElement(e,{ref:n})}function LS(e,t,n,r,i,a,o,{getKey:s}){return e.slice(t,n+1).map((e,n)=>{let c=o(e,t+n,{style:{width:r},offsetX:i}),l=s(e);return S.createElement(IS,{key:l,setRef:t=>a(e,t)},c)})}function RS(e,t,n){let r=e.length,i=t.length,a,o;if(r===0&&i===0)return null;r{let a=RS(r||[],e||[],t);a?.index!==void 0&&(n?.(a.index),o(e[a.index])),i(e)},[e]),[a]}var BS=typeof navigator==`object`&&/Firefox/i.test(navigator.userAgent),VS=((e,t,n,r)=>{let i=(0,S.useRef)(!1),a=(0,S.useRef)(null);function o(){clearTimeout(a.current),i.current=!0,a.current=setTimeout(()=>{i.current=!1},50)}let s=(0,S.useRef)({top:e,bottom:t,left:n,right:r});return s.current.top=e,s.current.bottom=t,s.current.left=n,s.current.right=r,(e,t,n=!1)=>{let r=e?t<0&&s.current.left||t>0&&s.current.right:t<0&&s.current.top||t>0&&s.current.bottom;return n&&r?(clearTimeout(a.current),i.current=!1):(!r||i.current)&&o(),!i.current&&r}});function HS(e,t,n,r,i,a,o){let s=(0,S.useRef)(0),c=(0,S.useRef)(null),l=(0,S.useRef)(null),u=(0,S.useRef)(!1),d=VS(t,n,r,i);function f(e,t){if(Ei.cancel(c.current),d(!1,t))return;let n=e;if(!n._virtualHandled)n._virtualHandled=!0;else return;s.current+=t,l.current=t,BS||n.preventDefault(),c.current=Ei(()=>{let e=u.current?10:1;o(s.current*e,!1),s.current=0})}function p(e,t){o(t,!0),BS||e.preventDefault()}let m=(0,S.useRef)(null),h=(0,S.useRef)(null);function g(t){if(!e)return;Ei.cancel(h.current),h.current=Ei(()=>{m.current=null},2);let{deltaX:n,deltaY:r,shiftKey:i}=t,o=n,s=r;(m.current===`sx`||!m.current&&i&&r&&!n)&&(o=r,s=0,m.current=`sx`);let c=Math.abs(o),l=Math.abs(s);m.current===null&&(m.current=a&&c>l?`x`:`y`),m.current===`y`?f(t,s):p(t,o)}function _(t){e&&(u.current=t.detail===l.current)}return[g,_]}function US(e,t,n,r){let[i,a]=S.useMemo(()=>[new Map,[]],[e,n.id,r]);return(o,s=o)=>{let c=i.get(o),l=i.get(s);if(c===void 0||l===void 0){let u=e.length;for(let d=a.length;d{let e=!1;a.current.forEach((t,n)=>{if(t&&t.offsetParent){let{offsetHeight:r}=t,{marginTop:i,marginBottom:a}=getComputedStyle(t),s=GS(i),c=GS(a),l=r+s+c;o.current.get(n)!==l&&(o.current.set(n,l),e=!0)}}),e&&i(e=>e+1)};if(e)t();else{s.current+=1;let e=s.current;Promise.resolve().then(()=>{e===s.current&&t()})}}function u(r,i){let o=e(r),s=a.current.get(o);i?(a.current.set(o,i),l()):a.current.delete(o),!s!=!i&&(i?t?.(r):n?.(r))}return(0,S.useEffect)(()=>c,[]),[u,l,o.current,r]}var qS=14/15;function JS(e,t,n){let r=(0,S.useRef)(!1),i=(0,S.useRef)(0),a=(0,S.useRef)(0),o=(0,S.useRef)(null),s=(0,S.useRef)(null),c,l=e=>{if(r.current){let t=Math.ceil(e.touches[0].pageX),r=Math.ceil(e.touches[0].pageY),o=i.current-t,c=a.current-r,l=Math.abs(o)>Math.abs(c);l?i.current=t:a.current=r;let u=n(l,l?o:c,!1,e);u&&e.preventDefault(),clearInterval(s.current),u&&(s.current=setInterval(()=>{l?o*=qS:c*=qS;let e=Math.floor(l?o:c);(!n(l,e,!0)||Math.abs(e)<=.1)&&clearInterval(s.current)},16))}},u=()=>{r.current=!1,c()},d=e=>{c(),e.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(e.touches[0].pageX),a.current=Math.ceil(e.touches[0].pageY),o.current=e.target,o.current.addEventListener(`touchmove`,l,{passive:!1}),o.current.addEventListener(`touchend`,u,{passive:!0}))};c=()=>{o.current&&(o.current.removeEventListener(`touchmove`,l),o.current.removeEventListener(`touchend`,u))},Vn(()=>(e&&t.current.addEventListener(`touchstart`,d,{passive:!0}),()=>{t.current?.removeEventListener(`touchstart`,d),c(),clearInterval(s.current)}),[e])}function YS(e){return Math.floor(e**.5)}function XS(e,t){return(`touches`in e?e.touches[0]:e)[t?`pageX`:`pageY`]-window[t?`scrollX`:`scrollY`]}function ZS(e,t,n){S.useEffect(()=>{let r=t.current;if(e&&r){let e=!1,t,i,a=()=>{Ei.cancel(t)},o=()=>{a(),t=Ei(()=>{n(i),o()})},s=()=>{e=!1,a()},c=t=>{if(t.target.draggable||t.button!==0)return;let n=t;n._virtualHandled||(n._virtualHandled=!0,e=!0)},l=t=>{if(e){let e=XS(t,!1),{top:n,bottom:s}=r.getBoundingClientRect();e<=n?(i=-YS(n-e),o()):e>=s?(i=YS(e-s),o()):a()}};return r.addEventListener(`mousedown`,c),r.ownerDocument.addEventListener(`mouseup`,s),r.ownerDocument.addEventListener(`mousemove`,l),r.ownerDocument.addEventListener(`dragend`,s),()=>{r.removeEventListener(`mousedown`,c),r.ownerDocument.removeEventListener(`mouseup`,s),r.ownerDocument.removeEventListener(`mousemove`,l),r.ownerDocument.removeEventListener(`dragend`,s),a()}}},[e])}var QS=10;function $S(e,t,n,r,i,a,o,s){let c=S.useRef(),[l,u]=S.useState(null);return Vn(()=>{if(l&&l.times({...e}));return}a();let{targetAlign:s,originAlign:c,index:d,offset:f}=l,p=e.current.clientHeight,m=!1,h=s,g=null;if(p){let a=s||c,u=0,_=0,v=0,y=Math.min(t.length-1,d);for(let e=0;e<=y;e+=1){let a=i(t[e]);_=u;let o=n.get(a);v=_+(o===void 0?r:o),u=v}let b=a===`top`?f:p-f;for(let e=y;e>=0;--e){let r=i(t[e]),a=n.get(r);if(a===void 0){m=!0;break}if(b-=a,b<=0)break}switch(a){case`top`:g=_-f;break;case`bottom`:g=v-p+f;break;default:{let{scrollTop:t}=e.current,n=t+p;_n&&(h=`bottom`)}}g!==null&&o(g),g!==l.lastTop&&(m=!0)}m&&u({...l,times:l.times+1,targetAlign:h,lastTop:g})}},[l,e.current]),e=>{if(e==null){s();return}if(Ei.cancel(c.current),typeof e==`number`)o(e);else if(e&&typeof e==`object`){let n,{align:r}=e;`index`in e?{index:n}=e:n=t.findIndex(t=>i(t)===e.key);let{offset:a=0}=e;u({times:0,index:n,offset:a,originAlign:r})}}}var eC=S.forwardRef((e,t)=>{let{prefixCls:n,rtl:r,scrollOffset:i,scrollRange:a,onStartMove:o,onStopMove:s,onScroll:c,horizontal:l,spinSize:u,containerSize:d,style:f,thumbStyle:p,showScrollBar:m}=e,[h,g]=S.useState(!1),[_,v]=S.useState(null),[y,b]=S.useState(null),x=!r,C=S.useRef(),w=S.useRef(),[T,E]=S.useState(m),D=S.useRef(),O=()=>{m===!0||m===!1||(clearTimeout(D.current),E(!0),D.current=setTimeout(()=>{E(!1)},3e3))},k=a-d||0,A=d-u||0,j=S.useMemo(()=>i===0||k===0?0:i/k*A,[i,k,A]),M=e=>{e.stopPropagation(),e.preventDefault()},N=S.useRef({top:j,dragging:h,pageY:_,startTop:y});N.current={top:j,dragging:h,pageY:_,startTop:y};let P=e=>{g(!0),v(XS(e,l)),b(N.current.top),o(),e.stopPropagation(),e.preventDefault()};S.useEffect(()=>{let e=e=>{e.preventDefault()},t=C.current,n=w.current;return t.addEventListener(`touchstart`,e,{passive:!1}),n.addEventListener(`touchstart`,P,{passive:!1}),()=>{t.removeEventListener(`touchstart`,e),n.removeEventListener(`touchstart`,P)}},[]);let F=S.useRef();F.current=k;let I=S.useRef();I.current=A,S.useEffect(()=>{if(h){let e,t=t=>{let{dragging:n,pageY:r,startTop:i}=N.current;Ei.cancel(e);let a=C.current.getBoundingClientRect(),o=d/(l?a.width:a.height);if(n){let n=(XS(t,l)-r)*o,a=i;!x&&l?a-=n:a+=n;let s=F.current,u=I.current,d=u?a/u:0,f=Math.ceil(d*s);f=Math.max(f,0),f=Math.min(f,s),e=Ei(()=>{c(f,l)})}},n=()=>{g(!1),s()};return window.addEventListener(`mousemove`,t,{passive:!0}),window.addEventListener(`touchmove`,t,{passive:!0}),window.addEventListener(`mouseup`,n,{passive:!0}),window.addEventListener(`touchend`,n,{passive:!0}),()=>{window.removeEventListener(`mousemove`,t),window.removeEventListener(`touchmove`,t),window.removeEventListener(`mouseup`,n),window.removeEventListener(`touchend`,n),Ei.cancel(e)}}},[h]),S.useEffect(()=>(O(),()=>{clearTimeout(D.current)}),[i]),S.useImperativeHandle(t,()=>({delayHidden:O}));let L=`${n}-scrollbar`,R={position:`absolute`,visibility:T?null:`hidden`},z={position:`absolute`,borderRadius:99,background:`var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))`,cursor:`pointer`,userSelect:`none`};return l?(Object.assign(R,{height:8,left:0,right:0,bottom:0}),Object.assign(z,{height:`100%`,width:u,[x?`left`:`right`]:j})):(Object.assign(R,{width:8,top:0,bottom:0,[x?`right`:`left`]:0}),Object.assign(z,{width:`100%`,height:u,top:j})),S.createElement(`div`,{ref:C,className:Y(L,{[`${L}-horizontal`]:l,[`${L}-vertical`]:!l,[`${L}-visible`]:T}),style:{...R,...f},onMouseDown:M,onMouseMove:O},S.createElement(`div`,{ref:w,className:Y(`${L}-thumb`,{[`${L}-thumb-moving`]:h}),style:{...z,...p},onMouseDown:P}))}),tC=20;function nC(e=0,t=0){let n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,tC),Math.floor(n)}var rC=[],iC={overflowY:`auto`,overflowAnchor:`none`};function aC(e,t){let{prefixCls:n=`rc-virtual-list`,className:r,height:i,itemHeight:a,fullHeight:o=!0,style:s,data:c,children:l,itemKey:u,virtual:d,direction:f,scrollWidth:p,component:m=`div`,onScroll:h,onVirtualScroll:g,onVisibleChange:_,innerProps:v,extraRender:y,styles:b,showScrollBar:x=`optional`,...C}=e,w=S.useCallback(e=>typeof u==`function`?u(e):e?.[u],[u]),[T,E,D,O]=KS(w,null,null),k=!!(d!==!1&&i&&a),A=S.useMemo(()=>Object.values(D.maps).reduce((e,t)=>e+t,0),[D.id,D.maps]),j=k&&c&&(Math.max(a*c.length,A)>i||!!p),M=f===`rtl`,N=Y(n,{[`${n}-rtl`]:M},r),P=c||rC,F=(0,S.useRef)(),I=(0,S.useRef)(),L=(0,S.useRef)(),[R,z]=(0,S.useState)(0),[B,V]=(0,S.useState)(0),[H,U]=(0,S.useState)(!1),ee=()=>{U(!0)},te=()=>{U(!1)},ne={getKey:w};function W(e){z(t=>{let n;n=typeof e==`function`?e(t):e;let r=he(n);return F.current.scrollTop=r,r})}let re=(0,S.useRef)({start:0,end:P.length}),G=(0,S.useRef)(),[K]=zS(P,w);G.current=K;let{scrollHeight:q,start:ie,end:J,offset:ae}=S.useMemo(()=>{if(!k)return{scrollHeight:void 0,start:0,end:P.length-1,offset:void 0};if(!j)return{scrollHeight:I.current?.offsetHeight||0,start:0,end:P.length-1,offset:void 0};let e=0,t,n,r,o=P.length;for(let s=0;s=R&&t===void 0&&(t=s,n=e),u>R+i&&r===void 0&&(r=s),e=u}return t===void 0&&(t=0,n=0,r=Math.ceil(i/a)),r===void 0&&(r=P.length-1),r=Math.min(r+1,P.length-1),{scrollHeight:e,start:t,end:r,offset:n}},[j,k,R,P,O,i]);re.current.start=ie,re.current.end=J,S.useLayoutEffect(()=>{let e=D.getRecord();if(e.size===1){let t=Array.from(e.keys())[0],n=e.get(t),r=P[ie];if(r&&n===void 0&&w(r)===t){let e=D.get(t)-a;W(t=>t+e)}}D.resetRecord()},[q]);let[oe,se]=S.useState({width:0,height:i}),ce=e=>{se({width:e.offsetWidth,height:e.offsetHeight})},le=(0,S.useRef)(),ue=(0,S.useRef)(),de=S.useMemo(()=>nC(oe.width,p),[oe.width,p]),fe=S.useMemo(()=>nC(oe.height,q),[oe.height,q]),pe=q-i,me=(0,S.useRef)(pe);me.current=pe;function he(e){let t=e;return Number.isNaN(me.current)||(t=Math.min(t,me.current)),t=Math.max(t,0),t}let ge=R<=0,_e=R>=pe,ve=B<=0,ye=B>=p,be=VS(ge,_e,ve,ye),xe=()=>({x:M?-B:B,y:R}),Se=(0,S.useRef)(xe()),Ce=Rn(e=>{if(g){let t={...xe(),...e};(Se.current.x!==t.x||Se.current.y!==t.y)&&(g(t),Se.current=t)}});function we(e,t){let n=e;t?((0,zi.flushSync)(()=>{V(n)}),Ce()):W(n)}function Te(e){let{scrollTop:t}=e.currentTarget;t!==R&&W(t),h?.(e),Ce()}let Ee=e=>{let t=e,n=p?p-oe.width:0;return t=Math.max(t,0),t=Math.min(t,n),t},De=Rn((e,t)=>{t?((0,zi.flushSync)(()=>{V(t=>Ee(t+(M?-e:e)))}),Ce()):W(t=>t+e)}),[Oe,ke]=HS(k,ge,_e,ve,ye,!!p,De);JS(k,F,(e,t,n,r)=>{let i=r;return be(e,t,n)?!1:!i||!i._virtualHandled?(i&&(i._virtualHandled=!0),Oe({preventDefault(){},deltaX:e?t:0,deltaY:e?0:t}),!0):!1}),ZS(j,F,e=>{W(t=>t+e)}),Vn(()=>{function e(e){let t=ge&&e.detail<0,n=_e&&e.detail>0;k&&!t&&!n&&e.preventDefault()}let t=F.current;return t.addEventListener(`wheel`,Oe,{passive:!1}),t.addEventListener(`DOMMouseScroll`,ke,{passive:!0}),t.addEventListener(`MozMousePixelScroll`,e,{passive:!1}),()=>{t.removeEventListener(`wheel`,Oe),t.removeEventListener(`DOMMouseScroll`,ke),t.removeEventListener(`MozMousePixelScroll`,e)}},[k,ge,_e]),Vn(()=>{if(p){let e=Ee(B);V(e),Ce({x:e})}},[oe.width,p]);let Ae=()=>{le.current?.delayHidden(),ue.current?.delayHidden()},je=$S(F,P,D,a,w,()=>E(!0),W,Ae);S.useImperativeHandle(t,()=>({nativeElement:L.current,getScrollInfo:xe,scrollTo:e=>{function t(e){return e&&typeof e==`object`&&(`left`in e||`top`in e)}t(e)?(e.left!==void 0&&V(Ee(e.left)),je(e.top)):je(e)}})),Vn(()=>{_&&_(P.slice(ie,J+1),P)},[ie,J,P]);let Me=US(P,w,D,a),Ne=y?.({start:ie,end:J,virtual:j,offsetX:B,offsetY:ae,rtl:M,getSize:Me}),Pe=LS(P,ie,J,p,B,T,l,ne),Fe=null;i&&(Fe={[o?`height`:`maxHeight`]:i,...iC},k&&(Fe.overflowY=`hidden`,p&&(Fe.overflowX=`hidden`),H&&(Fe.pointerEvents=`none`)));let Ie={};return M&&(Ie.dir=`rtl`),S.createElement(`div`,Wg({ref:L,style:{...s,position:`relative`},className:N},Ie,C),S.createElement(ia,{onResize:ce},S.createElement(m,{className:`${n}-holder`,style:Fe,ref:F,onScroll:Te,onMouseEnter:Ae},S.createElement(FS,{prefixCls:n,height:q,offsetX:B,offsetY:ae,scrollWidth:p,onInnerResize:E,ref:I,innerProps:v,rtl:M,extra:Ne},Pe))),j&&q>i&&S.createElement(eC,{ref:le,prefixCls:n,scrollOffset:R,scrollRange:q,rtl:M,onScroll:we,onStartMove:ee,onStopMove:te,spinSize:fe,containerSize:oe.height,style:b?.verticalScrollBar,thumbStyle:b?.verticalScrollBarThumb,showScrollBar:x}),j&&p>oe.width&&S.createElement(eC,{ref:ue,prefixCls:n,scrollOffset:B,scrollRange:p,rtl:M,onScroll:we,onStartMove:ee,onStopMove:te,spinSize:de,containerSize:oe.width,horizontal:!0,style:b?.horizontalScrollBar,thumbStyle:b?.horizontalScrollBarThumb,showScrollBar:x}))}var oC=S.forwardRef(aC);oC.displayName=`List`;var sC=oC;function cC(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}function lC(){return lC=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,id:r,open:i,multiple:a,mode:o,searchValue:s,toggleOpen:c,notFoundContent:l,onPopupScroll:u,showScrollBar:d,lockOptions:f}=kx(),{maxCount:p,flattenOptions:m,onActiveValue:h,defaultActiveFirstOption:g,onSelect:_,menuItemSelectedIcon:v,rawValues:y,fieldNames:b,virtual:x,direction:C,listHeight:w,listItemHeight:T,optionRender:E,classNames:D,styles:O}=S.useContext(Zx),k=`${n}-item`,A=Xn(()=>m,[i,f],(e,t)=>t[0]&&!t[1]),j=S.useRef(null),M=S.useMemo(()=>a&&Lx(p)&&y?.size>=p,[a,p,y?.size]),N=e=>{e.preventDefault()},P=e=>{j.current?.scrollTo(typeof e==`number`?{index:e}:e)},F=S.useCallback(e=>o===`combobox`?!1:y.has(e),[o,[...y].toString(),y.size]),I=(e,t=1)=>{let n=A.length;for(let r=0;rI(0)),z=(e,t=!1)=>{R(e);let n={source:t?`keyboard`:`mouse`},r=A[e];if(!r){h(null,-1,n);return}h(r.value,e,n)};(0,S.useEffect)(()=>{z(g===!1?-1:I(0))},[A.length,s]);let B=S.useCallback(e=>o===`combobox`?String(e).toLowerCase()===s.toLowerCase():y.has(e),[o,s,[...y].toString(),y.size]);(0,S.useEffect)(()=>{let e;if(!a&&i&&y.size===1){let t=Array.from(y)[0],n=A.findIndex(({data:e})=>s?String(e.value).startsWith(s):e.value===t);n!==-1&&(z(n),e=setTimeout(()=>{P(n)}))}return i&&j.current?.scrollTo(void 0),()=>clearTimeout(e)},[i,s]);let V=e=>{e!==void 0&&_(e,{selected:!y.has(e)}),a||c(!1)};if(S.useImperativeHandle(t,()=>({onKeyDown:e=>{let{which:t,ctrlKey:n}=e;switch(t){case Zr.N:case Zr.P:case Zr.UP:case Zr.DOWN:{let e=0;if(t===Zr.UP?e=-1:t===Zr.DOWN?e=1:cC()&&n&&(t===Zr.N?e=1:t===Zr.P&&(e=-1)),e!==0){let t=I(L+e,e);P(t),z(t,!0)}break}case Zr.TAB:case Zr.ENTER:{let t=A[L];if(!t||t.data.disabled)return V(void 0);!M||y.has(t.value)?V(t.value):V(void 0),i&&e.preventDefault();break}case Zr.ESC:c(!1),i&&e.stopPropagation()}},onKeyUp:()=>{},scrollTo:e=>{P(e)}})),A.length===0)return S.createElement(`div`,{role:`listbox`,id:`${r}_list`,className:`${k}-empty`,onMouseDown:N},l);let H=Object.keys(b).map(e=>b[e]),U=e=>e.label;function ee(e,t){let{group:n}=e;return{role:n?`presentation`:`option`,id:`${r}_list_${t}`}}let te=e=>{let t=A[e];if(!t)return null;let n=t.data||{},{value:r,disabled:i}=n,{group:a}=t,o=bi(n,!0),s=U(t);return t?S.createElement(`div`,lC({"aria-label":typeof s==`string`&&!a?s:null},o,{key:e},ee(t,e),{"aria-selected":B(r),"aria-disabled":i}),r):null},ne={role:`listbox`,id:`${r}_list`};return S.createElement(S.Fragment,null,x&&S.createElement(`div`,lC({},ne,{style:{height:0,width:0,overflow:`hidden`}}),te(L-1),te(L),te(L+1)),S.createElement(sC,{itemKey:`key`,ref:j,data:A,height:w,itemHeight:T,fullHeight:!1,onMouseDown:N,onScroll:u,virtual:x,direction:C,innerProps:x?null:ne,showScrollBar:d,className:D?.popup?.list,style:O?.popup?.list},(e,t)=>{let{group:n,groupOption:r,data:i,label:a,value:o}=e,{key:s}=i;if(n){let e=i.title??(uC(a)?a.toString():void 0);return S.createElement(`div`,{className:Y(k,`${k}-group`,i.className),title:e},a===void 0?s:a)}let{disabled:c,title:l,children:u,style:d,className:f,...p}=i,m=hi(p,H),h=F(o),g=c||!h&&M,_=`${k}-option`,y=Y(k,_,f,D?.popup?.listItem,{[`${_}-grouped`]:r,[`${_}-active`]:L===t&&!g,[`${_}-disabled`]:g,[`${_}-selected`]:h}),b=U(e),C=!v||typeof v==`function`||h,w=typeof b==`number`?b:b||o,T=uC(w)?w.toString():void 0;return l!==void 0&&(T=l),S.createElement(`div`,lC({},bi(m),x?{}:ee(e,t),{"aria-selected":x?void 0:B(o),"aria-disabled":g,className:y,title:T,onMouseMove:()=>{L===t||g||z(t)},onClick:()=>{g||V(o)},style:{...O?.popup?.listItem,...d}}),S.createElement(`div`,{className:`${_}-content`},typeof E==`function`?E(e,{index:t}):w),S.isValidElement(v)||h,C&&S.createElement(yS,{className:`${k}-option-state`,customizeIcon:v,customizeIconProps:{value:o,disabled:g,isSelected:h}},h?`✓`:null))}))}),fC=((e,t)=>{let n=S.useRef({values:new Map,options:new Map});return[S.useMemo(()=>{let{values:r,options:i}=n.current,a=e.map(e=>e.label===void 0?{...e,label:r.get(e.value)?.label}:e),o=new Map,s=new Map;return a.forEach(e=>{o.set(e.value,e),s.set(e.value,t.get(e.value)||i.get(e.value))}),n.current.values=o,n.current.options=s,a},[e,t]),S.useCallback(e=>t.get(e)||n.current.options.get(e),[t])]});function pC(e,t){return Qx(e).join(``).toUpperCase().includes(t)}var mC=((e,t,n,r,i)=>S.useMemo(()=>{if(!n||r===!1)return e;let{options:a,label:o,value:s}=t,c=[],l=typeof r==`function`,u=n.toUpperCase(),d=l?r:(e,t)=>i&&i.length?i.some(e=>pC(t[e],u)):t[a]?pC(t[o===`children`?`label`:o],u):pC(t[s],u),f=l?e=>Bx(e):e=>e;return e.forEach(e=>{if(e[a]){if(d(n,f(e)))c.push(e);else{let t=e[a].filter(e=>d(n,f(e)));t.length&&c.push({...e,[a]:t})}return}d(n,f(e))&&c.push(e)}),c},[e,r,i,n,t]));function hC(e){let{key:t,props:{children:n,value:r,...i}}=e;return{key:t,value:r===void 0?t:r,children:n,...i}}function gC(e,t=!1){return Di(e).map((e,n)=>{if(!S.isValidElement(e)||!e.type)return null;let{type:{isSelectOptGroup:r},key:i,props:{children:a,...o}}=e;return t||!r?hC(e):{key:`__RC_SELECT_GRP__${i===null?n:i}__`,label:i,...o,options:gC(a)}}).filter(e=>e)}var _C=(e,t,n,r,i)=>S.useMemo(()=>{let a=e;e||(a=gC(t));let o=new Map,s=new Map,c=(e,t,n)=>{n&&typeof n==`string`&&e.set(t[n],t)},l=(e,t=!1)=>{for(let a=0;a{c(s,u,e)}),c(s,u,i)):l(u[n.options],!0)}};return l(a),{options:a,valueOptions:o,labelOptions:s}},[e,t,n,r,i]);function vC(e){let t=S.useRef();return t.current=e,S.useCallback((...e)=>t.current(...e),[])}function yC(e,t,n){let{filterOption:r,searchValue:i,optionFilterProp:a,filterSort:o,onSearch:s,autoClearSearchValue:c}=t;return S.useMemo(()=>{let t=typeof e==`object`,l={filterOption:r,searchValue:i,optionFilterProp:a,filterSort:o,onSearch:s,autoClearSearchValue:c,...t?e:{}};return[t||n===`combobox`||n===`tags`||n===`multiple`&&e===void 0?!0:e,l]},[n,e,r,i,a,o,s,c])}function bC(){return bC=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,mode:r,prefixCls:i=`rc-select`,backfill:a,fieldNames:o,showSearch:s,searchValue:c,onSearch:l,autoClearSearchValue:u,filterOption:d,optionFilterProp:f,filterSort:p,onSelect:m,onDeselect:h,onActive:g,popupMatchSelectWidth:_=!0,optionLabelProp:v,options:y,optionRender:b,children:x,defaultActiveFirstOption:C,menuItemSelectedIcon:w,virtual:T,direction:E,listHeight:D=200,listItemHeight:O=20,labelRender:k,value:A,defaultValue:j,labelInValue:M,onChange:N,maxCount:P,classNames:F,styles:I,...L}=e,[R,z]=yC(s,{searchValue:c,onSearch:l,autoClearSearchValue:u,filterOption:d,optionFilterProp:f,filterSort:p},r),{filterOption:B,searchValue:V,optionFilterProp:H,filterSort:U,onSearch:ee,autoClearSearchValue:te=!0}=z,ne=S.useMemo(()=>H?Array.isArray(H)?H:[H]:[],[H]),W=Yn(n),re=jS(r),G=!!(!y&&x),K=S.useMemo(()=>B===void 0&&r===`combobox`?!1:B,[B,r]),q=S.useMemo(()=>Rx(o,G),[JSON.stringify(o),G]),[ie,J]=Wn(``,V),ae=ie||``,oe=_C(y,x,q,ne,v),{valueOptions:se,labelOptions:ce,options:le}=oe,ue=S.useCallback(e=>Qx(e).map(e=>{let t,n,r,i;SC(e)?t=e:(n=e.label,t=e.value);let a=se.get(t);return a&&(n===void 0&&(n=a?.[v||q.label]),r=a?.disabled,i=a?.title),{label:n,value:t,key:t,disabled:r,title:i}}),[q,v,se]),[de,fe]=Wn(j,A),[pe,me]=fC(S.useMemo(()=>{let e=ue(re&&de===null?[]:de);return r===`combobox`&&eS(e[0]?.value)?[]:e},[de,ue,r,re]),se),he=S.useMemo(()=>{if(!r&&pe.length===1){let e=pe[0];if(e.value===null&&(e.label===null||e.label===void 0))return[]}return pe.map(e=>({...e,label:(typeof k==`function`?k(e):e.label)??e.value}))},[r,pe,k]),ge=S.useMemo(()=>new Set(pe.map(e=>e.value)),[pe]);S.useEffect(()=>{if(r===`combobox`){let e=pe[0]?.value;J($x(e)?String(e):``)}},[pe]);let _e=vC((e,t)=>{let n=t??e;return{[q.value]:e,[q.label]:n}}),ve=mC(S.useMemo(()=>{if(r!==`tags`)return le;let e=[...le],t=e=>se.has(e);return[...pe].sort((e,t)=>e.value{let r=n.value;t(r)||e.push(_e(r,n.label))}),e},[_e,le,se,pe,r]),q,ae,K,ne),ye=S.useMemo(()=>{let e=e=>ne.length?ne.some(t=>e?.[t]===ae):e?.value===ae;return r!==`tags`||!ae||ve.some(t=>e(t))||ve.some(e=>e[q.value]===ae)?ve:[_e(ae),...ve]},[_e,ne,r,ve,ae,q]),be=e=>[...e].sort((e,t)=>U(e,t,{searchValue:ae})).map(e=>Array.isArray(e.options)?{...e,options:e.options.length>0?be(e.options):e.options}:e),xe=S.useMemo(()=>U?be(ye):ye,[ye,U,ae]),Se=S.useMemo(()=>zx(xe,{fieldNames:q,childrenAsData:G}),[xe,q,G]),Ce=e=>{let t=ue(e);if(fe(t),N&&(t.length!==pe.length||t.some((e,t)=>pe[t]?.value!==e?.value))){let e=M?t.map(({label:e,value:t})=>({label:e,value:t})):t.map(e=>e.value),n=t.map(e=>Bx(me(e.value)));N(re?e:e[0],re?n:n[0])}},[we,Te]=S.useState(null),[Ee,De]=S.useState(0),Oe=C===void 0?r!==`combobox`:C,ke=S.useRef(),Ae=S.useCallback((e,t,{source:n=`keyboard`}={})=>{De(t),a&&r===`combobox`&&e!==null&&n===`keyboard`&&Te(String(e));let i=Promise.resolve().then(()=>{ke.current===i&&g?.(e)});ke.current=i},[a,r,g]),je=(e,t,n)=>{let r=()=>{let t=me(e);return[M?{label:t?.[q.label],value:e}:e,Bx(t)]};if(t&&m){let[e,t]=r();m(e,t)}else if(!t&&h&&n!==`clear`){let[e,t]=r();h(e,t)}},Me=vC((e,t)=>{let n,i=re?t.selected:!0;n=i?re?[...pe,e]:[e]:pe.filter(t=>t.value!==e),Ce(n),je(e,i),r===`combobox`?Te(``):(!jS||te)&&(J(``),Te(``))}),Ne=(e,t)=>{Ce(e);let{type:n,values:r}=t;(n===`remove`||n===`clear`)&&r.forEach(e=>{je(e.value,!1,n)})},Pe=(e,t)=>{if(J(e),Te(null),t.source===`submit`){let t=(e||``).trim();t&&(Ce(Array.from(new Set([...ge,t]))),je(t,!0),J(``));return}t.source!==`blur`&&(r===`combobox`&&Ce(e),ee?.(e))},Fe=e=>{let t=e;r!==`tags`&&(t=e.map(e=>ce.get(e)?.value).filter(e=>e!==void 0));let n=Array.from(new Set([...ge,...t]));Ce(n),n.forEach(e=>{je(e,!0)})},Ie=S.useMemo(()=>{let e=T!==!1&&_!==!1;return{...oe,flattenOptions:Se,onActiveValue:Ae,defaultActiveFirstOption:Oe,onSelect:Me,menuItemSelectedIcon:w,rawValues:ge,fieldNames:q,virtual:e,direction:E,listHeight:D,listItemHeight:O,childrenAsData:G,maxCount:P,optionRender:b,classNames:F,styles:I}},[P,oe,Se,Ae,Oe,Me,w,ge,q,T,_,E,D,O,G,b,F,I]);return S.createElement(Zx.Provider,{value:Ie},S.createElement(MS,bC({},L,{id:W,prefixCls:i,ref:t,omitDomProps:xC,mode:r,classNames:F,styles:I,displayValues:he,onDisplayValuesChange:Ne,maxCount:P,direction:E,showSearch:R,searchValue:ae,onSearch:Pe,autoClearSearchValue:te,onSearchSplit:Fe,popupMatchSelectWidth:_,OptionList:dC,emptyOptions:!Se.length,activeValue:we,activeDescendantId:`${W}_list_${Ee}`})))});CC.Option=PS,CC.OptGroup=NS;var wC=CC,TC=(e,t,n)=>Y({[`${e}-status-success`]:t===`success`,[`${e}-status-warning`]:t===`warning`,[`${e}-status-error`]:t===`error`,[`${e}-status-validating`]:t===`validating`,[`${e}-has-feedback`]:n}),EC=(e,t)=>t||e,DC=()=>{let[,e]=zl(),[t]=qd(`Empty`),n=new jc(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return S.createElement(`svg`,{style:n,width:`184`,height:`152`,viewBox:`0 0 184 152`,xmlns:`http://www.w3.org/2000/svg`},S.createElement(`title`,null,t?.description||`Empty`),S.createElement(`g`,{fill:`none`,fillRule:`evenodd`},S.createElement(`g`,{transform:`translate(24 31.7)`},S.createElement(`ellipse`,{fillOpacity:`.8`,fill:`#F5F5F7`,cx:`67.8`,cy:`106.9`,rx:`67.8`,ry:`12.7`}),S.createElement(`path`,{fill:`#aeb8c2`,d:`M122 69.7 98.1 40.2a6 6 0 0 0-4.6-2.2H42.1a6 6 0 0 0-4.6 2.2l-24 29.5V85H122z`}),S.createElement(`path`,{fill:`#f5f5f7`,d:`M33.8 0h68a4 4 0 0 1 4 4v93.3a4 4 0 0 1-4 4h-68a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4`}),S.createElement(`path`,{fill:`#dce0e6`,d:`M42.7 10h50.2a2 2 0 0 1 2 2v25a2 2 0 0 1-2 2H42.7a2 2 0 0 1-2-2V12a2 2 0 0 1 2-2m.2 39.8h49.8a2.3 2.3 0 1 1 0 4.5H42.9a2.3 2.3 0 0 1 0-4.5m0 11.7h49.8a2.3 2.3 0 1 1 0 4.6H42.9a2.3 2.3 0 0 1 0-4.6m79 43.5a7 7 0 0 1-6.8 5.4H20.5a7 7 0 0 1-6.7-5.4l-.2-1.8V69.7h26.3c2.9 0 5.2 2.4 5.2 5.4s2.4 5.4 5.3 5.4h34.8c2.9 0 5.3-2.4 5.3-5.4s2.3-5.4 5.2-5.4H122v33.5q0 1-.2 1.8`})),S.createElement(`path`,{fill:`#dce0e6`,d:`m149.1 33.3-6.8 2.6a1 1 0 0 1-1.3-1.2l2-6.2q-4.1-4.5-4.2-10.4c0-10 10.1-18.1 22.6-18.1S184 8.1 184 18.1s-10.1 18-22.6 18q-6.8 0-12.3-2.8`}),S.createElement(`g`,{fill:`#fff`,transform:`translate(149.7 15.4)`},S.createElement(`circle`,{cx:`20.7`,cy:`3.2`,r:`2.8`}),S.createElement(`path`,{d:`M5.7 5.6H0L2.9.7zM9.3.7h5v5h-5z`}))))},OC=()=>{let[,e]=zl(),[t]=qd(`Empty`),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:i,colorBgContainer:a}=e,{borderColor:o,shadowColor:s,contentColor:c}=(0,S.useMemo)(()=>({borderColor:new jc(n).onBackground(a).toHexString(),shadowColor:new jc(r).onBackground(a).toHexString(),contentColor:new jc(i).onBackground(a).toHexString()}),[n,r,i,a]);return S.createElement(`svg`,{width:`64`,height:`41`,viewBox:`0 0 64 41`,xmlns:`http://www.w3.org/2000/svg`},S.createElement(`title`,null,t?.description||`Empty`),S.createElement(`g`,{transform:`translate(0 1)`,fill:`none`,fillRule:`evenodd`},S.createElement(`ellipse`,{fill:s,cx:`32`,cy:`33`,rx:`32`,ry:`7`}),S.createElement(`g`,{fillRule:`nonzero`,stroke:o},S.createElement(`path`,{d:`M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z`}),S.createElement(`path`,{d:`M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3`,fill:c}))))},kC=e=>{let{componentCls:t,margin:n,marginXS:r,marginXL:i,fontSize:a,lineHeight:o}=e;return{[t]:{marginInline:r,fontSize:a,lineHeight:o,textAlign:`center`,[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:`100%`},svg:{maxWidth:`100%`,height:`100%`,margin:`auto`}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:i,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},AC=Xl(`Empty`,e=>{let{componentCls:t,controlHeightLG:n,calc:r}=e;return kC(lc(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()}))}),jC=S.createElement(DC,null),MC=S.createElement(OC,null),NC=e=>{let{className:t,rootClassName:n,prefixCls:r,image:i,description:a,children:o,imageStyle:s,style:c,classNames:l,styles:u,...d}=e,{getPrefixCls:f,direction:p,className:m,style:h,classNames:g,styles:_,image:v}=_a(`empty`),y=f(`empty`,r),[b,x]=AC(y),[C,w]=xf([g,l],[_,u],{props:e}),[T]=qd(`Empty`),E=a===void 0?T?.description:a,D=typeof E==`string`?E:`empty`,O=i??v??jC,k=null;return k=typeof O==`string`?S.createElement(`img`,{draggable:!1,alt:D,src:O}):O,S.createElement(`div`,{className:Y(b,x,y,m,{[`${y}-normal`]:O===MC,[`${y}-rtl`]:p===`rtl`},t,n,C.root),style:{...w.root,...h,...c},...d},S.createElement(`div`,{className:Y(`${y}-image`,C.image),style:{...s,...w.image}},k),E&&S.createElement(`div`,{className:Y(`${y}-description`,C.description),style:w.description},E),o&&S.createElement(`div`,{className:Y(`${y}-footer`,C.footer),style:w.footer},o))};NC.PRESENTED_IMAGE_DEFAULT=jC,NC.PRESENTED_IMAGE_SIMPLE=MC;var PC=e=>{let{componentName:t}=e,{getPrefixCls:n}=(0,S.useContext)(ma),r=n(`empty`);switch(t){case`Table`:case`List`:return S.createElement(NC,{image:NC.PRESENTED_IMAGE_SIMPLE});case`Select`:case`TreeSelect`:case`Cascader`:case`Transfer`:case`Mentions`:return S.createElement(NC,{image:NC.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case`Table.filter`:return null;default:return S.createElement(NC,null)}},FC=(e,t,n)=>{let{variant:r,[e]:i}=S.useContext(ma),a=S.useContext(Ly),o=i?.variant,s;s=t===void 0?n===!1?`borderless`:a??o??r??`outlined`:t;let c=pa.includes(s);return[s,c]},IC=e=>{let t={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e===`scroll`?`scroll`:`visible`,dynamicInset:!0};return{bottomLeft:{...t,points:[`tl`,`bl`],offset:[0,4]},bottomRight:{...t,points:[`tr`,`br`],offset:[0,4]},topLeft:{...t,points:[`bl`,`tl`],offset:[0,-4]},topRight:{...t,points:[`br`,`tr`],offset:[0,-4]}}};function LC(e,t){return e||IC(t)}var RC=e=>{let{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:i}=e;return{position:`relative`,display:`block`,minHeight:t,padding:i,color:e.colorText,fontWeight:`normal`,fontSize:n,lineHeight:r,boxSizing:`border-box`}},zC=e=>{let{antCls:t,componentCls:n}=e,r=`${n}-item`,i=`&${t}-slide-up-enter${t}-slide-up-enter-active`,a=`&${t}-slide-up-appear${t}-slide-up-appear-active`,o=`&${t}-slide-up-leave${t}-slide-up-leave-active`,s=`${n}-dropdown-placement-`,c=`${r}-option-selected`;return[{[`${n}-dropdown`]:{...Vl(e),position:`absolute`,top:-9999,zIndex:e.zIndexPopup,boxSizing:`border-box`,padding:e.paddingXXS,overflow:`hidden`,fontSize:e.fontSize,fontVariant:`initial`,backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,[` ${i}${s}bottomLeft, ${a}${s}bottomLeft `]:{animationName:cg},[` @@ -180,20 +180,20 @@ html body { `]:{animationName:ug},[`${o}${s}bottomLeft`]:{animationName:lg},[` ${o}${s}topLeft, ${o}${s}topRight - `]:{animationName:dg},"&-hidden":{display:`none`},[r]:{...zC(e),cursor:`pointer`,transition:`background-color ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:`default`},"&-option":{display:`flex`,"&-content":{flex:`auto`,...Bl},"&-state":{flex:`none`,display:`flex`,alignItems:`center`},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${r}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:`not-allowed`},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":{...zC(e),color:e.colorTextDisabled}},[`${c}:has(+ ${c})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${c}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:`rtl`}}},_g(e,`slide-up`),_g(e,`slide-down`),sg(e,`move-up`),sg(e,`move-down`)]},VC=e=>{let{componentCls:t}=e;return{[`&${t}-customize`]:{border:0,padding:0,fontSize:`inherit`,lineHeight:`inherit`,[`${t}-placeholder`]:{display:`none`},[`${t}-content`]:{margin:0,padding:0,"&-value":{display:`none`}}}}},HC=4,UC=e=>{let{componentCls:t,calc:n,iconCls:r,paddingXS:i,paddingXXS:a,INTERNAL_FIXED_ITEM_MARGIN:o,lineWidth:s,colorIcon:c,colorIconHover:l,inputPaddingHorizontalBase:u,antCls:d}=e,[f,p]=$l(d,`select`);return{"&-multiple":{[f(`multi-item-background`)]:e.multipleItemBg,[f(`multi-item-border-color`)]:`transparent`,[f(`multi-item-border-radius`)]:e.borderRadiusSM,[f(`multi-item-height`)]:e.multipleItemHeight,[f(`multi-padding-base`)]:`calc((${p(`height`)} - ${p(`multi-item-height`)}) / 2)`,[f(`multi-padding-vertical`)]:`calc(${p(`multi-padding-base`)} - ${o} - ${s})`,[f(`multi-item-padding-horizontal`)]:`calc(${u} - ${p(`multi-padding-vertical`)} - ${s} * 2)`,paddingBlock:p(`multi-padding-vertical`),paddingInlineStart:`calc(${p(`multi-padding-base`)} - ${s})`,[`${t}-prefix`]:{marginInlineStart:p(`multi-item-padding-horizontal`)},[`${t}-prefix + ${t}-content`]:{[`${t}-placeholder`]:{insetInlineStart:0},[`${t}-content-item${t}-content-item-suffix`]:{marginInlineStart:0}},[`${t}-placeholder`]:{position:`absolute`,lineHeight:p(`line-height`),insetInlineStart:p(`multi-item-padding-horizontal`),width:`calc(100% - ${p(`multi-item-padding-horizontal`)})`,top:`50%`,transform:`translateY(-50%)`},[`${t}-content`]:{flexWrap:`wrap`,alignItems:`center`,lineHeight:1,"&-item-prefix":{height:p(`font-size`)},"&-item":{lineHeight:1,maxWidth:`calc(100% - ${HC}px)`},[`${t}-content-item-prefix + ${t}-content-item-suffix, - ${t}-content-item-suffix:first-child`]:{marginInlineStart:p(`multi-item-padding-horizontal`)},[`${t}-selection-item`]:{lineHeight:`calc(${p(`multi-item-height`)} - ${s} * 2)`,border:`${s} solid ${p(`multi-item-border-color`)}`,display:`flex`,marginBlock:o,marginInlineEnd:n(o).mul(2).equal(),background:p(`multi-item-background`),borderRadius:p(`multi-item-border-radius`),paddingInlineStart:i,paddingInlineEnd:a,transition:[`height`,`line-height`,`padding`].map(t=>`${t} ${e.motionDurationSlow}`).join(`,`),"&-content":{...Bl,marginInlineEnd:a},"&-remove":{...Hl(),display:`inline-flex`,alignItems:`center`,color:c,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${r}`]:{verticalAlign:`-0.2em`},"&:hover":{color:l}}},[`${t}-input`]:{lineHeight:n(o).mul(2).add(p(`multi-item-height`)).equal(),width:`calc(var(--select-input-width, 0) * 1px)`,minWidth:HC,maxWidth:`100%`,transition:`line-height ${e.motionDurationSlow}`}},[`&${t}-sm`]:{[f(`multi-item-height`)]:e.multipleItemHeightSM,[f(`multi-item-border-radius`)]:e.borderRadiusXS},[`&${t}-lg`]:{[f(`multi-item-height`)]:e.multipleItemHeightLG,[f(`multi-item-border-radius`)]:e.borderRadius},[`&${t}-filled`]:{[f(`multi-item-border-color`)]:e.colorSplit,[f(`multi-item-background`)]:e.colorBgContainer,[`&${t}-disabled`]:{[f(`multi-item-border-color`)]:`transparent`}}}}},WC=(e,t)=>{let{componentCls:n,antCls:r}=e,[i]=$l(r,`select`),{border:a,borderHover:o,borderActive:s,borderOutline:c}=t,l=t.background||e.selectorBg||e.colorBgContainer;return{[i(`border-color`)]:a,[i(`background-color`)]:l,[i(`color`)]:t.color||e.colorText,[`&:not(${n}-disabled)`]:{"&:hover":{[i(`border-color`)]:o,[i(`background-color`)]:t.backgroundHover||l},[`&${n}-focused`]:{[i(`border-color`)]:s,[i(`background-color`)]:t.backgroundActive||l,boxShadow:`0 0 0 ${X(e.controlOutlineWidth)} ${c}`}},[`&${n}-disabled`]:{[i(`border-color`)]:t.borderDisabled||t.border,[i(`background-color`)]:t.backgroundDisabled||t.background}}},GC=(e,t,n,r={},i={},a)=>{let{componentCls:o}=e;return{[`&${o}-${t}`]:[WC(e,n),{[`&${o}-status-error`]:WC(e,{...n,color:r.color||e.colorError,...r}),[`&${o}-status-warning`]:WC(e,{...n,color:i.color||e.colorWarning,...i})},a]}},KC=e=>{let{componentCls:t,fontHeight:n,controlHeight:r,iconCls:i,antCls:a,calc:o}=e,[s,c]=$l(a,`select`);return{[t]:[{[s(`border-radius`)]:e.borderRadius,[s(`border-color`)]:`#000`,[s(`border-size`)]:e.lineWidth,[s(`background-color`)]:e.colorBgContainer,[s(`font-size`)]:e.fontSize,[s(`line-height`)]:e.lineHeight,[s(`font-height`)]:n,[s(`color`)]:e.colorText,[s(`height`)]:r,[s(`padding-horizontal`)]:o(e.paddingSM).sub(e.lineWidth).equal(),[s(`padding-vertical`)]:`calc((${c(`height`)} - ${c(`font-height`)}) / 2 - ${c(`border-size`)})`,...Vl(e,!0),display:`inline-flex`,flexWrap:`nowrap`,position:`relative`,transition:`all ${e.motionDurationSlow}`,alignItems:`flex-start`,outline:0,cursor:`pointer`,borderRadius:c(`border-radius`),borderWidth:c(`border-size`),borderStyle:e.lineType,borderColor:c(`border-color`),background:c(`background-color`),fontSize:c(`font-size`),lineHeight:c(`line-height`),color:c(`color`),paddingInline:c(`padding-horizontal`),paddingBlock:c(`padding-vertical`),[`${t}-prefix`]:{flex:`none`,lineHeight:1},[`${t}-placeholder`]:{...Bl,color:e.colorTextPlaceholder,pointerEvents:`none`,zIndex:1},[`${t}-content`]:{flex:`auto`,minWidth:0,position:`relative`,display:`flex`,marginInlineEnd:o(e.paddingXXS).mul(1.5).equal(),"&:before":{content:`"\\a0"`,width:0,overflow:`hidden`},"&-value":{visibility:`inherit`},"input[readonly]":{cursor:`inherit`,caretColor:`transparent`}},[`${t}-suffix`]:{flex:`none`,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,"> :not(:last-child)":{marginInlineEnd:e.marginXS}},[`${t}-prefix, ${t}-suffix`]:{alignSelf:`center`,[i]:{verticalAlign:`top`}},"&-disabled":{background:e.colorBgContainerDisabled,color:e.colorTextDisabled,cursor:`not-allowed`,input:{cursor:`not-allowed`}},"&-sm":{[s(`height`)]:e.controlHeightSM,[s(`padding-horizontal`)]:o(e.paddingXS).sub(e.lineWidth).equal(),[s(`border-radius`)]:e.borderRadiusSM,[`${t}-clear`]:{insetInlineEnd:c(`padding-horizontal`)}},"&-lg":{[s(`height`)]:e.controlHeightLG,[s(`font-size`)]:e.fontSizeLG,[s(`line-height`)]:e.lineHeightLG,[s(`font-height`)]:e.fontHeightLG,[s(`border-radius`)]:e.borderRadiusLG}},{[`&:not(${t}-customize)`]:{[`${t}-input`]:{outline:`none`,background:`transparent`,appearance:`none`,border:0,margin:0,padding:0,color:c(`color`),"&::-webkit-search-cancel-button":{display:`none`,appearance:`none`}}}},{[`&-single:not(${t}-customize)`]:{[`${t}-input`]:{position:`absolute`,inset:0,lineHeight:`calc(${c(`font-height`)} + ${c(`padding-vertical`)} * 2)`},[`${t}-content`]:{...Bl,alignSelf:`center`,"&-has-value":{display:`block`,"&:before":{display:`none`}},"&-has-search-value":{color:`transparent`},"&-value":{transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,zIndex:1}},[`&${t}-open ${t}-content`]:{color:e.colorTextPlaceholder,"&-has-search-value":{color:`transparent`}}}},{[`&-show-search:not(${t}-customize-input):not(${t}-disabled)`]:{cursor:`text`}},UC(e),GC(e,`outlined`,{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:e.activeOutlineColor,borderDisabled:e.colorBorderDisabled},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError,borderOutline:e.colorErrorOutline},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning,borderOutline:e.colorWarningOutline}),GC(e,`filled`,{border:`transparent`,borderHover:`transparent`,borderActive:e.activeBorderColor,borderOutline:`transparent`,borderDisabled:e.colorBorderDisabled,background:e.colorFillTertiary,backgroundHover:e.colorFillSecondary,backgroundActive:e.colorBgContainer},{background:e.colorErrorBg,backgroundHover:e.colorErrorBgHover,borderActive:e.colorError},{background:e.colorWarningBg,backgroundHover:e.colorWarningBgHover,borderActive:e.colorWarning}),GC(e,`borderless`,{border:`transparent`,borderHover:`transparent`,borderActive:`transparent`,borderOutline:`transparent`,background:`transparent`}),GC(e,`underlined`,{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:`transparent`},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning},{borderRadius:0,borderTopColor:`transparent`,borderInlineColor:`transparent`}),VC(e)]}},qC=e=>{let{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:i,controlHeightSM:a,controlHeightLG:o,paddingXXS:s,controlPaddingHorizontal:c,zIndexPopupBase:l,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:p,colorBgContainer:m,colorFillSecondary:h,colorBgContainerDisabled:g,colorTextDisabled:_,colorPrimaryHover:v,colorPrimary:y,controlOutline:b}=e,x=s*2,S=r*2,C=Math.min(i-x,i-S),w=Math.min(a-x,a-S),T=Math.min(o-x,o-S);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:l+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:p,optionPadding:`${(i-t*n)/2}px ${c}px`,optionFontSize:t,optionLineHeight:n,optionHeight:i,selectorBg:m,clearBg:m,singleItemHeightLG:o,multipleItemBg:h,multipleItemBorderColor:`transparent`,multipleItemHeight:C,multipleItemHeightSM:w,multipleItemHeightLG:T,multipleSelectorBgDisabled:g,multipleItemColorDisabled:_,multipleItemBorderColorDisabled:`transparent`,showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:v,activeBorderColor:y,activeOutlineColor:b,selectAffixPadding:s}},JC=e=>{let{antCls:t,componentCls:n,motionDurationMid:r,inputPaddingHorizontalBase:i}=e,a={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:`50%`}};return{[n]:{...Vl(e),[`${n}-selection-item`]:{flex:1,fontWeight:`normal`,position:`relative`,userSelect:`none`,...Bl,[`> ${t}-typography`]:{display:`inline`}},[`${n}-prefix`]:{flex:`none`,marginInlineEnd:e.selectAffixPadding},[`${n}-clear`]:{position:`absolute`,top:`50%`,insetInlineStart:`auto`,insetInlineEnd:i,zIndex:1,display:`inline-block`,width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:`normal`,lineHeight:1,textAlign:`center`,textTransform:`none`,cursor:`pointer`,opacity:0,transition:[`color`,`opacity`].map(e=>`${e} ${r} ease`).join(`, `),textRendering:`auto`,transform:`translateZ(0)`,"&:before":{display:`block`},"&:hover":{color:e.colorIcon}},"@media(hover:none)":a,"&:hover":a},[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(i).add(e.fontSize).add(e.paddingXS).equal()}}}}}},YC=e=>{let{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:`100%`}}},JC(e),BC(e),{[`${t}-rtl`]:{direction:`rtl`}},v_(e,{focusElCls:`${t}-focused`})]},XC=Xl(`Select`,(e,{rootPrefixCls:t})=>{let n=lc(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(e.lineWidth).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[YC(n),KC(n)]},qC,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}}),ZC=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z`}}]},name:`check`,theme:`outlined`}}))());function QC(){return QC=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,QC({},e,{ref:t,icon:ZC.default}))),ew=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z`}}]},name:`down`,theme:`outlined`}}))());function tw(){return tw=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,tw({},e,{ref:t,icon:ew.default}))),rw=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z`}}]},name:`search`,theme:`outlined`}}))());function iw(){return iw=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,iw({},e,{ref:t,icon:rw.default})));function ow({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:n,removeIcon:r,loading:i,loadingIcon:a,multiple:o,hasFeedback:s,showSuffixIcon:c,feedbackIcon:l,showArrow:u,componentName:d}){let f=t??S.createElement(Eu,null),p=t=>e===null&&!s&&!u?null:S.createElement(S.Fragment,null,c!==!1&&t,s&&l),m=null;m=e===void 0?i?p(a??S.createElement(Xm,{spin:!0})):({open:e,showSearch:t})=>p(e&&t?S.createElement(aw,null):S.createElement(nw,null)):p(e);let h=null;h=n===void 0?o?S.createElement($C,null):null:n;let g=null;return g=r===void 0?S.createElement(ku,null):r,{clearIcon:f,suffixIcon:m,itemIcon:h,removeIcon:g}}function sw(e){return S.useMemo(()=>{if(e)return(...t)=>S.createElement(zy,{space:!0},e.apply(void 0,t))},[e])}function cw(e,t){return t===void 0?e!==null:t}var lw=`SECRET_COMBOBOX_MODE_DO_NOT_USE`,uw=S.forwardRef((e,t)=>{let{prefixCls:n,bordered:r,className:i,rootClassName:a,getPopupContainer:o,popupClassName:s,dropdownClassName:c,listHeight:l=256,placement:u,listItemHeight:d,size:f,disabled:p,notFoundContent:m,status:h,builtinPlacements:g,dropdownMatchSelectWidth:_,popupMatchSelectWidth:v,direction:y,style:b,allowClear:x,variant:C,popupStyle:w,dropdownStyle:T,transitionName:E,tagRender:D,maxCount:O,prefix:k,dropdownRender:A,popupRender:j,onDropdownVisibleChange:M,onOpenChange:N,styles:P,classNames:F,...I}=e,{getPopupContainer:L,getPrefixCls:R,renderEmpty:z,direction:B,virtual:V,popupMatchSelectWidth:H,popupOverflow:U}=S.useContext(ma),{showSearch:ee,style:te,styles:ne,className:W,classNames:re}=_a(`select`),[,G]=zl(),K=d??G?.controlHeight,q=R(`select`,n),ie=R(),J=y??B,{compactSize:ae,compactItemClassnames:oe}=jh(q,J),[se,ce]=IC(`select`,C,r),le=ap(q),[ue,de]=XC(q,le),fe=S.useMemo(()=>{let{mode:t}=e;if(t!==`combobox`)return t===lw?`combobox`:t},[e.mode]),pe=fe===`multiple`||fe===`tags`,me=cw(e.suffixIcon,e.showArrow),he=v??_??H,ge=sw(j||A),_e=N||M,{status:ve,hasFeedback:ye,isFormItemInput:be,feedbackIcon:xe}=S.useContext(Iy),Se=DC(ve,h),Ce;Ce=m===void 0?fe===`combobox`?null:z?.(`Select`)||S.createElement(FC,{componentName:`Select`}):m;let{suffixIcon:we,itemIcon:Te,removeIcon:Ee,clearIcon:De}=ow({...I,multiple:pe,hasFeedback:ye,feedbackIcon:xe,showSuffixIcon:me,prefixCls:q,componentName:`Select`}),Oe=x===!0?{clearIcon:De}:x,ke=hi(I,[`suffixIcon`,`itemIcon`]),Ae=Oh(e=>f??ae??e),je=S.useContext(pm),Me=p??je,Ne={...e,variant:se,status:Se,disabled:Me,size:Ae},[Pe,Fe]=xf([re,F],[ne,P],{props:Ne},{popup:{_default:`root`}}),Ie=Y(Pe.popup?.root,s,c,{[`${q}-dropdown-${J}`]:J===`rtl`},a,de,le,ue),Le={...Fe.popup?.root,...w??T},Re=Y({[`${q}-lg`]:Ae===`large`,[`${q}-sm`]:Ae===`small`,[`${q}-rtl`]:J===`rtl`,[`${q}-${se}`]:ce,[`${q}-in-form-item`]:be},EC(q,Se,ye),oe,W,i,Pe.root,a,de,le,ue),ze=S.useMemo(()=>u===void 0?J===`rtl`?`bottomRight`:`bottomLeft`:u,[u,J]),[Be]=Ff(`SelectLike`,Fe.popup?.root?.zIndex??Le?.zIndex);return S.createElement(TC,{ref:t,virtual:V,classNames:Pe,styles:Fe,showSearch:ee,...ke,style:{...Fe.root,...te,...b},popupMatchSelectWidth:he,transitionName:vh(ie,`slide-up`,E),builtinPlacements:RC(g,U),listHeight:l,listItemHeight:K,mode:fe,prefixCls:q,placement:ze,direction:J,prefix:k,suffixIcon:we,menuItemSelectedIcon:Te,removeIcon:Ee,allowClear:Oe,notFoundContent:Ce,className:Re,getPopupContainer:o||L,popupClassName:Ie,disabled:Me,popupStyle:{...Fe.popup?.root,...Le,zIndex:Be},maxCount:pe?O:void 0,tagRender:pe?D:void 0,popupRender:ge,onPopupVisibleChange:_e})}),dw=Dx(uw,`popupAlign`);uw.SECRET_COMBOBOX_MODE_DO_NOT_USE=lw,uw.Option=FS,uw.OptGroup=PS,uw._InternalPanelDoNotUseOrYouWillBeFired=dw;var fw=[`xxxl`,`xxl`,`xl`,`lg`,`md`,`sm`,`xs`],pw=[].concat(fw).reverse(),mw=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`,xxxl:`(min-width: ${e.screenXXXL}px)`}),hw=e=>{let t=e,n=[].concat(fw).reverse();return n.forEach((e,r)=>{let i=e.toUpperCase(),a=`screen${i}Min`,o=`screen${i}`;if(!(t[a]<=t[o]))throw Error(`${a}<=${o} fails : !(${t[a]}<=${t[o]})`);if(r{if(t){for(let n of fw)if(e[n]&&t?.[n]!==void 0)return t[n]}},_w=()=>{let[,e]=zl(),t=mw(hw(e));return S.useMemo(()=>{let e=new Map,n=-1,r={};return{responsiveMap:t,matchHandlers:{},dispatch(t){return r=t,e.forEach(e=>{e(r)}),e.size>=1},subscribe(t){return e.size||this.register(),n+=1,e.set(n,t),t(r),n},unsubscribe(t){e.delete(t),e.size||this.unregister()},register(){Object.entries(t).forEach(([e,t])=>{let n=({matches:t})=>{this.dispatch({...r,[e]:t})},i=window.matchMedia(t);typeof i?.addEventListener==`function`&&i.addEventListener(`change`,n),this.matchHandlers[t]={mql:i,listener:n},n(i)})},unregister(){Object.values(t).forEach(e=>{let t=this.matchHandlers[e];typeof t?.mql?.removeEventListener==`function`&&t.mql.removeEventListener(`change`,t?.listener)}),e.clear()}}},[t])};function vw(e=!0,t={}){let n=(0,S.useRef)(t),[,r]=ff(),i=_w();return Vn(()=>{let t=i.subscribe(t=>{n.current=t,e&&r()});return()=>i.unsubscribe(t)},[]),n.current}var yw=S.createContext({}),bw=e=>{let{antCls:t,componentCls:n,iconCls:r,avatarBg:i,avatarColor:a,containerSize:o,containerSizeLG:s,containerSizeSM:c,textFontSize:l,textFontSizeLG:u,textFontSizeSM:d,iconFontSize:f,iconFontSizeLG:p,iconFontSizeSM:m,borderRadius:h,borderRadiusLG:g,borderRadiusSM:_,lineWidth:v,lineType:y}=e,b=(e,t,i,a)=>({width:e,height:e,borderRadius:`50%`,fontSize:t,[`&${n}-square`]:{borderRadius:a},[`&${n}-icon`]:{fontSize:i,[`> ${r}`]:{margin:0}}});return{[n]:{...Vl(e),position:`relative`,display:`inline-flex`,justifyContent:`center`,alignItems:`center`,overflow:`hidden`,color:a,whiteSpace:`nowrap`,textAlign:`center`,verticalAlign:`middle`,background:i,border:`${X(v)} ${y} transparent`,"&-image":{background:`transparent`},[`${t}-image-img`]:{display:`block`},...b(o,l,f,h),"&-lg":{...b(s,u,p,g)},"&-sm":{...b(c,d,m,_)},"> img":{display:`block`,width:`100%`,height:`100%`,objectFit:`cover`}}}},xw=e=>{let{componentCls:t,groupBorderColor:n,groupOverlapping:r,groupSpace:i}=e;return{[`${t}-group`]:{display:`inline-flex`,[t]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:r}},[`${t}-group-popover`]:{[`${t} + ${t}`]:{marginInlineStart:i}}}},Sw=Xl(`Avatar`,e=>{let{colorTextLightSolid:t,colorTextPlaceholder:n}=e,r=lc(e,{avatarBg:n,avatarColor:t});return[bw(r),xw(r)]},e=>{let{controlHeight:t,controlHeightLG:n,controlHeightSM:r,fontSize:i,fontSizeLG:a,fontSizeXL:o,fontSizeHeading3:s,marginXS:c,marginXXS:l,colorBorderBg:u}=e;return{containerSize:t,containerSizeLG:n,containerSizeSM:r,textFontSize:i,textFontSizeLG:i,textFontSizeSM:i,iconFontSize:Math.round((a+o)/2),iconFontSizeLG:s,iconFontSizeSM:i,groupSpace:l,groupOverlapping:-c,groupBorderColor:u}}),Cw=S.forwardRef((e,t)=>{let{prefixCls:n,shape:r,size:i,src:a,srcSet:o,icon:s,className:c,rootClassName:l,style:u,alt:d,draggable:f,children:p,crossOrigin:m,gap:h=4,onError:g,..._}=e,[v,y]=S.useState(1),[b,x]=S.useState(!1),[C,w]=S.useState(!0),T=S.useRef(null),E=S.useRef(null),D=sr(t,T),{getPrefixCls:O,className:k,style:A}=_a(`avatar`),j=S.useContext(yw),M=()=>{if(!E.current||!T.current)return;let e=E.current.offsetWidth,t=T.current.offsetWidth;e!==0&&t!==0&&h*2{x(!0)},[]),S.useEffect(()=>{w(!0),y(1)},[a]),S.useEffect(M,[h]);let N=()=>{g?.()!==!1&&w(!1)},P=Oh(e=>i??j?.size??e??`medium`),F=vw(Object.keys(ef(P)&&P||{}).some(e=>fw.includes(e))),I=S.useMemo(()=>{if(!ef(P))return{};let e=P[fw.find(e=>F[e])];return e?{width:e,height:e,fontSize:e&&(s||p)?e/2:18}:{}},[F,P,s,p]),L=O(`avatar`,n),R=ap(L),[z,B]=Sw(L,R),V=Y({[`${L}-lg`]:P===`large`,[`${L}-sm`]:P===`small`}),H=S.isValidElement(a),U=Y(L,V,k,`${L}-${r||j?.shape||`circle`}`,{[`${L}-image`]:H||a&&C,[`${L}-icon`]:!!s},B,R,c,l,z),ee=Qd(P)?{width:P,height:P,fontSize:s?P/2:18}:{},te;if(typeof a==`string`&&C)te=S.createElement(`img`,{src:a,draggable:f,srcSet:o,onError:N,alt:d,crossOrigin:m});else if(H)te=a;else if(s)te=s;else if(b||v!==1){let e=`scale(${v})`,t={msTransform:e,WebkitTransform:e,transform:e};te=S.createElement(ia,{onResize:M},S.createElement(`span`,{className:`${L}-string`,ref:E,style:t},p))}else te=S.createElement(`span`,{className:`${L}-string`,style:{opacity:0},ref:E},p);return S.createElement(`span`,{..._,style:{...ee,...I,...A,...u},className:U,ref:D},te)}),ww=e=>e?typeof e==`function`?e():e:null,Tw=e=>{let{children:t,prefixCls:n,id:r,classNames:i,styles:a,className:o,style:s}=e;return S.createElement(`div`,{id:r,className:Y(`${n}-container`,i?.container,o),style:{...a?.container,...s},role:`tooltip`},typeof t==`function`?t():t)},Ew={shiftX:64,adjustY:1},Dw={adjustX:1,shiftY:!0},Ow=[0,0],kw={left:{points:[`cr`,`cl`],overflow:Dw,offset:[-4,0],targetOffset:Ow},right:{points:[`cl`,`cr`],overflow:Dw,offset:[4,0],targetOffset:Ow},top:{points:[`bc`,`tc`],overflow:Ew,offset:[0,-4],targetOffset:Ow},bottom:{points:[`tc`,`bc`],overflow:Ew,offset:[0,4],targetOffset:Ow},topLeft:{points:[`bl`,`tl`],overflow:Ew,offset:[0,-4],targetOffset:Ow},leftTop:{points:[`tr`,`tl`],overflow:Dw,offset:[-4,0],targetOffset:Ow},topRight:{points:[`br`,`tr`],overflow:Ew,offset:[0,-4],targetOffset:Ow},rightTop:{points:[`tl`,`tr`],overflow:Dw,offset:[4,0],targetOffset:Ow},bottomRight:{points:[`tr`,`br`],overflow:Ew,offset:[0,4],targetOffset:Ow},rightBottom:{points:[`bl`,`br`],overflow:Dw,offset:[4,0],targetOffset:Ow},bottomLeft:{points:[`tl`,`bl`],overflow:Ew,offset:[0,4],targetOffset:Ow},leftBottom:{points:[`br`,`bl`],overflow:Dw,offset:[-4,0],targetOffset:Ow}};function Aw(){return Aw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{trigger:n=[`hover`],mouseEnterDelay:r=0,mouseLeaveDelay:i=.1,prefixCls:a=`rc-tooltip`,children:o,onVisibleChange:s,afterVisibleChange:c,motion:l,placement:u=`right`,align:d={},destroyOnHidden:f=!1,defaultVisible:p,getTooltipContainer:m,arrowContent:h,overlay:g,id:_,showArrow:v=!0,classNames:y,styles:b,...x}=e,C=Yn(_),w=(0,S.useRef)(null);(0,S.useImperativeHandle)(t,()=>w.current);let T={...x};`visible`in e&&(T.popupVisible=e.visible);let E=S.useMemo(()=>{if(!v)return!1;let e=v===!0?{}:v;return{...e,className:Y(e.className,y?.arrow),style:{...e.style,...b?.arrow},content:e.content??h}},[v,y?.arrow,b?.arrow,h]);return S.createElement(am,Aw({popupClassName:y?.root,prefixCls:a,popup:S.createElement(Tw,{key:`content`,prefixCls:a,id:C,classNames:y,styles:b},g),action:n,builtinPlacements:kw,popupPlacement:u,ref:w,popupAlign:d,getPopupContainer:m,onOpenChange:s,afterOpenChange:c,popupMotion:l,defaultPopupVisible:p,autoDestroy:f,mouseLeaveDelay:i,popupStyle:b?.root,mouseEnterDelay:r,arrow:E,uniqueContainerClassName:y?.uniqueContainer,uniqueContainerStyle:b?.uniqueContainer},T),({open:e})=>{let t=S.Children.only(o),n={"aria-describedby":g&&e?C:void 0};return S.cloneElement(t,n)})});function Mw(e){let{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,i=t/2,a=i,o=r*1/Math.sqrt(2),s=i-r*(1-1/Math.sqrt(2)),c=i-1/Math.sqrt(2)*n,l=r*(Math.sqrt(2)-1)+1/Math.sqrt(2)*n,u=2*i-c,d=l,f=2*i-o,p=s,m=2*i-0,h=a,g=i*Math.sqrt(2)+r*(Math.sqrt(2)-2),_=r*(Math.sqrt(2)-1),v=`polygon(${_}px 100%, 50% ${_}px, ${2*i-_}px 100%, ${_}px 100%)`;return{arrowShadowWidth:g,arrowPath:`path('M 0 ${a} A ${r} ${r} 0 0 0 ${o} ${s} L ${c} ${l} A ${n} ${n} 0 0 1 ${u} ${d} L ${f} ${p} A ${r} ${r} 0 0 0 ${m} ${h} Z')`,arrowPolygon:v}}var Nw=(e,t,n)=>{let{sizePopupArrow:r,arrowPolygon:i,arrowPath:a,arrowShadowWidth:o,borderRadiusXS:s,calc:c}=e;return{pointerEvents:`none`,width:r,height:r,overflow:`hidden`,"&::before":{position:`absolute`,bottom:0,insetInlineStart:0,width:r,height:c(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[i,a]},content:`""`},"&::after":{content:`""`,position:`absolute`,width:o,height:o,bottom:0,insetInline:0,margin:`auto`,borderRadius:{_skip_check_:!0,value:`0 0 ${X(s)} 0`},transform:`translateY(50%) rotate(-135deg)`,boxShadow:n,zIndex:0,background:`transparent`}}};function Pw(e){let{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?8:r}}function Fw(e,t){return e?t:{}}var Iw=(e,t,n)=>{let{componentCls:r,boxShadowPopoverArrow:i,arrowOffsetVertical:a,arrowOffsetHorizontal:o,antCls:s}=e,[c]=$l(s,`tooltip`),{arrowDistance:l=0,arrowPlacement:u={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:{[`${r}-arrow`]:[{position:`absolute`,zIndex:1,display:`block`,...Nw(e,t,i),"&:before":{background:t}}],...Fw(!!u.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(`,`)]:{bottom:l,transform:`translateY(100%) rotate(180deg)`},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:`50%`},transform:`translateX(-50%) translateY(100%) rotate(180deg)`},"&-placement-topLeft":{[c(`arrow-offset-x`)]:o,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:o}}},"&-placement-topRight":{[c(`arrow-offset-x`)]:`calc(100% - ${X(o)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:o}}}}),...Fw(!!u.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(`,`)]:{top:l,transform:`translateY(-100%)`},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:`50%`},transform:`translateX(-50%) translateY(-100%)`},"&-placement-bottomLeft":{[c(`arrow-offset-x`)]:o,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:o}}},"&-placement-bottomRight":{[c(`arrow-offset-x`)]:`calc(100% - ${X(o)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:o}}}}),...Fw(!!u.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(`,`)]:{right:{_skip_check_:!0,value:l},transform:`translateX(100%) rotate(90deg)`},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:`50%`},transform:`translateY(-50%) translateX(100%) rotate(90deg)`},[`&-placement-leftTop > ${r}-arrow`]:{top:a},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:a}}),...Fw(!!u.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(`,`)]:{left:{_skip_check_:!0,value:l},transform:`translateX(-100%) rotate(-90deg)`},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:`50%`},transform:`translateY(-50%) translateX(-100%) rotate(-90deg)`},[`&-placement-rightTop > ${r}-arrow`]:{top:a},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:a}})}}};function Lw(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};let i=ef(r)?r:{},a={};switch(e){case`top`:case`bottom`:a.shiftX=t.arrowOffsetHorizontal*2+n,a.shiftY=!0,a.adjustY=!0;break;case`left`:case`right`:a.shiftY=t.arrowOffsetVertical*2+n,a.shiftX=!0,a.adjustX=!0;break}let o={...a,...i};return o.shiftX||(o.adjustX=!0),o.shiftY||(o.adjustY=!0),o}var Rw={left:{points:[`cr`,`cl`]},right:{points:[`cl`,`cr`]},top:{points:[`bc`,`tc`]},bottom:{points:[`tc`,`bc`]},topLeft:{points:[`bl`,`tl`]},leftTop:{points:[`tr`,`tl`]},topRight:{points:[`br`,`tr`]},rightTop:{points:[`tl`,`tr`]},bottomRight:{points:[`tr`,`br`]},rightBottom:{points:[`bl`,`br`]},bottomLeft:{points:[`tl`,`bl`]},leftBottom:{points:[`br`,`bl`]}},zw={topLeft:{points:[`bl`,`tc`]},leftTop:{points:[`tr`,`cl`]},topRight:{points:[`br`,`tc`]},rightTop:{points:[`tl`,`cr`]},bottomRight:{points:[`tr`,`bc`]},rightBottom:{points:[`bl`,`cr`]},bottomLeft:{points:[`tl`,`bc`]},leftBottom:{points:[`br`,`cl`]}},Bw=new Set([`topLeft`,`topRight`,`bottomLeft`,`bottomRight`,`leftTop`,`leftBottom`,`rightTop`,`rightBottom`]);function Vw(e){let{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:i,borderRadius:a,visibleFirst:o}=e,s=t/2,c={},l=Pw({contentRadius:a,limitVerticalRadius:!0});return Object.keys(Rw).forEach(e=>{let a={...r&&zw[e]||Rw[e],offset:[0,0],dynamicInset:!0};switch(c[e]=a,Bw.has(e)&&(a.autoArrow=!1),e){case`top`:case`topLeft`:case`topRight`:a.offset[1]=-s-i;break;case`bottom`:case`bottomLeft`:case`bottomRight`:a.offset[1]=s+i;break;case`left`:case`leftTop`:case`leftBottom`:a.offset[0]=-s-i;break;case`right`:case`rightTop`:case`rightBottom`:a.offset[0]=s+i;break}if(r)switch(e){case`topLeft`:case`bottomLeft`:a.offset[0]=-l.arrowOffsetHorizontal-s;break;case`topRight`:case`bottomRight`:a.offset[0]=l.arrowOffsetHorizontal+s;break;case`leftTop`:case`rightTop`:a.offset[1]=-l.arrowOffsetHorizontal*2+s;break;case`leftBottom`:case`rightBottom`:a.offset[1]=l.arrowOffsetHorizontal*2-s;break}a.overflow=Lw(e,l,t,n),o&&(a.htmlRegion=`visibleFirst`)}),c}var Hw=S.createContext(!1),Uw=(e,t)=>{let n=e=>typeof e==`boolean`?{show:e}:e||{};return S.useMemo(()=>{let r=n(e),i=n(t);return{...i,...r,show:r.show??i.show??!0}},[e,t])},Ww=`50%`,Gw=e=>{let{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:i,tooltipBg:a,tooltipBorderRadius:o,zIndexPopup:s,controlHeight:c,boxShadowSecondary:l,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:p,antCls:m}=e,[h,g]=$l(m,`tooltip`),_=t(o).add(p).add(f).equal(),v={minWidth:t(o).mul(2).add(p).equal(),minHeight:c,padding:`${X(e.calc(u).div(2).equal())} ${X(d)}`,color:g(`overlay-color`,i),textAlign:`start`,textDecoration:`none`,wordWrap:`break-word`,backgroundColor:a,borderRadius:o,boxShadow:l,boxSizing:`border-box`},y={[h(`valid-offset-x`)]:g(`arrow-offset-x`,`var(--arrow-x)`),transformOrigin:[g(`valid-offset-x`,Ww),`var(--arrow-y, ${Ww})`].join(` `)};return[{[n]:{...Vl(e),position:`absolute`,zIndex:s,display:`block`,width:`max-content`,maxWidth:r,visibility:`visible`,...y,"&-hidden":{display:`none`},[h(`arrow-background-color`)]:a,[`${n}-container`]:[v,$h(e,!0)],[`&:has(~ ${n}-unique-container)`]:{[`${n}-container`]:{border:`none`,background:`transparent`,boxShadow:`none`}},[[`&-placement-topLeft`,`&-placement-topRight`,`&-placement-bottomLeft`,`&-placement-bottomRight`].join(`,`)]:{minWidth:_},[[`&-placement-left`,`&-placement-leftTop`,`&-placement-leftBottom`,`&-placement-right`,`&-placement-rightTop`,`&-placement-rightBottom`].join(`,`)]:{[`${n}-inner`]:{borderRadius:e.min(o,8)}},[`${n}-content`]:{position:`relative`},...eu(e,(e,{darkColor:t})=>({[`&${n}-${e}`]:{[`${n}-container`]:{backgroundColor:t},[`${n}-arrow`]:{[h(`arrow-background-color`)]:t}}})),"&-rtl":{direction:`rtl`}}},Iw(e,g(`arrow-background-color`)),{[`${n}-pure`]:{position:`relative`,maxWidth:`none`,margin:e.sizePopupArrow}},{[`${n}-unique-container`]:{...v,...y,position:`absolute`,zIndex:t(s).sub(1).equal(),"&-hidden":{display:`none`},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},Kw=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...Pw({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...Mw(lc(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),qw=(e,t,n=!0)=>Xl(`Tooltip`,e=>{let{borderRadius:t,colorTextLightSolid:n,colorBgSpotlight:r,maxWidth:i}=e;return[Gw(lc(e,{tooltipMaxWidth:i,tooltipColor:n,tooltipBorderRadius:t,tooltipBg:r})),Mg(e,`zoom-big-fast`)]},Kw,{resetStyle:!1,injectStyle:n})(e,t),Jw=bc.map(e=>`${e}-inverse`),Yw=[`success`,`processing`,`error`,`default`,`warning`];function Xw(e,t=!0){return t?[].concat(da(Jw),da(bc)).includes(e):bc.includes(e)}function Zw(e){return Yw.includes(e)}var Qw=(e,t,n)=>{let r=Xw(n),[i]=$l(e,`tooltip`),a=Y({[`${t}-${n}`]:n&&r}),o={},s={},c=see(n).toRgb(),l=(.299*c.r+.587*c.g+.114*c.b)/255<.5?`#FFF`:`#000`;return n&&!r&&(o.background=n,o[i(`overlay-color`)]=l,s[i(`arrow-background-color`)]=n),{className:a,overlayStyle:o,arrowStyle:s}},$w=e=>{let{prefixCls:t,className:n,placement:r=`top`,title:i,color:a,overlayInnerStyle:o,classNames:s,styles:c}=e,{getPrefixCls:l}=S.useContext(ma),u=l(`tooltip`,t),d=l(),f=ap(u),[p,m]=qw(u,f),h=Qw(d,u,a),g=h.arrowStyle,_=S.useMemo(()=>({container:{...o,...h.overlayStyle}}),[o,h.overlayStyle]),v={...e,placement:r},[y,b]=xf([s],[_,c],{props:v}),x=Y(f,p,m,u,`${u}-pure`,`${u}-placement-${r}`,n,h.className);return S.createElement(`div`,{className:x,style:g},S.createElement(`div`,{className:`${u}-arrow`}),S.createElement(Tw,{...e,className:p,prefixCls:u,classNames:y,styles:b},i))},eT=S.forwardRef((e,t)=>{let{prefixCls:n,openClassName:r,getTooltipContainer:i,color:a,children:o,afterOpenChange:s,arrow:c,destroyTooltipOnHide:l,destroyOnHidden:u,title:d,overlay:f,trigger:p,builtinPlacements:m,autoAdjustOverflow:h=!0,motion:g,getPopupContainer:_,placement:v=`top`,mouseEnterDelay:y=.1,mouseLeaveDelay:b=.1,rootClassName:x,styles:C,classNames:w,onOpenChange:T,overlayInnerStyle:E,overlayStyle:D,overlayClassName:O,...k}=e,[,A]=zl(),j=e[`data-popover-inject`],{getPopupContainer:M,getPrefixCls:N,direction:P,...F}=_a(`tooltip`),{className:I,style:L,classNames:R,styles:z,arrow:B,trigger:V}=j?{}:F,H=Uw(c,B),U=H.show,ee=p||V||`hover`,te=_||M,ne=u??!!l,W=S.useContext(Hw);Ui(`Tooltip`);let re=S.useRef(null),G=()=>{re.current?.forceAlign()};S.useImperativeHandle(t,()=>({forceAlign:G,nativeElement:re.current?.nativeElement,popupElement:re.current?.popupElement}));let[K,q]=Wn(e.defaultOpen??!1,e.open),ie=!d&&!f&&d!==0,J=e=>{q(ie?!1:e),!ie&&T&&T(e)},ae=S.useMemo(()=>m||Vw({arrowPointAtCenter:H?.pointAtCenter??!1,autoAdjustOverflow:h,arrowWidth:U?A.sizePopupArrow:0,borderRadius:A.borderRadius,offset:A.marginXXS,visibleFirst:!0}),[H,m,A,U,h]),oe=S.useMemo(()=>d===0?d:f||d||``,[f,d]),se=S.createElement(zy,{space:!0,form:!0},typeof oe==`function`?oe():oe),ce={...e,trigger:ee,builtinPlacements:ae,getPopupContainer:te,destroyOnHidden:ne},[le,ue]=xf([R,w],[z,C],{props:ce}),de=N(`tooltip`,n),fe=N(),pe=K;(!(`open`in e)&&ie||W)&&(pe=!1);let me=S.isValidElement(o)&&!om(o)?o:S.createElement(`span`,null,o),he=me.props,ge=!he.className||typeof he.className==`string`?Y(he.className,r||`${de}-open`):he.className,_e=ap(de),[ve,ye]=qw(de,_e,!j),be=Qw(fe,de,a),xe=be.arrowStyle,Se=Y(_e,ve,ye),Ce=Y(O,{[`${de}-rtl`]:P===`rtl`},be.className,x,Se,I,le.root),[we,Te]=Ff(`Tooltip`,k.zIndex),Ee={...ue.container,...E,...be.overlayStyle},De=S.createElement(jw,{unique:!0,...k,zIndex:we,showArrow:U,placement:v,mouseEnterDelay:y,mouseLeaveDelay:b,prefixCls:de,classNames:{root:Ce,container:le.container,arrow:le.arrow,uniqueContainer:Y(Se,le.container)},styles:{root:{...xe,...ue.root,...L,...D},container:Ee,uniqueContainer:Ee,arrow:ue.arrow},ref:re,overlay:se,visible:pe,onVisibleChange:J,afterVisibleChange:s,arrowContent:S.createElement(`span`,{className:`${de}-arrow-content`}),motion:{motionName:vh(fe,`zoom-big-fast`,typeof g?.motionName==`string`?g?.motionName:void 0),motionDeadline:1e3},trigger:ee,builtinPlacements:ae,getTooltipContainer:te,destroyOnHidden:ne},pe?cm(me,{className:ge}):me);return S.createElement(kf.Provider,{value:Te},De)});eT._InternalPanelDoNotUseOrYouWillBeFired=$w,eT.UniqueProvider=fm;var tT=`50%`,nT=e=>{let{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:i,innerPadding:a,boxShadowSecondary:o,colorTextHeading:s,borderRadiusLG:c,zIndexPopup:l,titleMarginBottom:u,colorBgElevated:d,popoverBg:f,titleBorderBottom:p,innerContentPadding:m,titlePadding:h,antCls:g}=e,[_,v]=$l(g,`tooltip`);return[{[t]:{...Vl(e),position:`absolute`,top:0,left:{_skip_check_:!0,value:0},zIndex:l,fontWeight:`normal`,whiteSpace:`normal`,textAlign:`start`,cursor:`auto`,userSelect:`text`,[_(`valid-offset-x`)]:v(`arrow-offset-x`,`var(--arrow-x)`),transformOrigin:[v(`valid-offset-x`,tT),`var(--arrow-y, ${tT})`].join(` `),[_(`arrow-background-color`)]:d,width:`max-content`,maxWidth:`100vw`,"&-rtl":{direction:`rtl`},"&-hidden":{display:`none`},[`${t}-content`]:{position:`relative`},[`${t}-container`]:{backgroundColor:f,backgroundClip:`padding-box`,borderRadius:c,boxShadow:o,padding:a},[`${t}-title`]:{minWidth:r,marginBottom:u,color:s,fontWeight:i,borderBottom:p,padding:h},[`${t}-content`]:{color:n,padding:m}}},Iw(e,v(`arrow-background-color`)),{[`${t}-pure`]:{position:`relative`,maxWidth:`none`,margin:e.sizePopupArrow,display:`inline-block`}}]},rT=e=>{let{componentCls:t,antCls:n}=e,[r]=$l(n,`tooltip`);return{[t]:bc.map(n=>{let i=e[`${n}6`];return{[`&${t}-${n}`]:{[r(`arrow-background-color`)]:i,[`${t}-inner`]:{backgroundColor:i},[`${t}-arrow`]:{background:`transparent`}}}})}},iT=Xl(`Popover`,e=>{let{colorBgElevated:t,colorText:n}=e,r=lc(e,{popoverBg:t,popoverColor:n});return[nT(r),rT(r),Mg(r,`zoom-big`)]},e=>{let{lineWidth:t,controlHeight:n,fontHeight:r,padding:i,wireframe:a,zIndexPopupBase:o,borderRadiusLG:s,marginXS:c,lineType:l,colorSplit:u,paddingSM:d}=e,f=n-r,p=f/2,m=f/2-t,h=i;return{titleMinWidth:177,zIndexPopup:o+30,...Mw(e),...Pw({contentRadius:s,limitVerticalRadius:!0}),innerPadding:a?0:12,titleMarginBottom:a?0:c,titlePadding:a?`${p}px ${h}px ${m}px`:0,titleBorderBottom:a?`${t}px ${l} ${u}`:`none`,innerContentPadding:a?`${d}px ${h}px`:0}},{resetStyle:!1,deprecatedTokens:[[`width`,`titleMinWidth`],[`minWidth`,`titleMinWidth`]]}),aT=e=>{let{title:t,content:n,prefixCls:r,classNames:i,styles:a}=e;return!t&&!n?null:S.createElement(S.Fragment,null,t&&S.createElement(`div`,{className:Y(`${r}-title`,i?.title),style:a?.title},t),n&&S.createElement(`div`,{className:Y(`${r}-content`,i?.content),style:a?.content},n))},oT=e=>{let{hashId:t,prefixCls:n,className:r,style:i,placement:a=`top`,title:o,content:s,children:c,classNames:l,styles:u}=e,d=ww(o),f=ww(s),p={...e,placement:a},[m,h]=xf([l],[u],{props:p}),g=Y(t,n,`${n}-pure`,`${n}-placement-${a}`,r);return S.createElement(`div`,{className:g,style:i},S.createElement(`div`,{className:`${n}-arrow`}),S.createElement(Tw,{...e,className:t,prefixCls:n,classNames:m,styles:h},c||S.createElement(aT,{prefixCls:n,title:d,content:f,classNames:m,styles:h})))},sT=e=>{let{prefixCls:t,className:n,...r}=e,{getPrefixCls:i}=S.useContext(ma),a=i(`popover`,t),[o,s]=iT(a);return S.createElement(oT,{...r,prefixCls:a,hashId:o,className:Y(n,s)})},cT=S.forwardRef((e,t)=>{let{prefixCls:n,title:r,content:i,overlayClassName:a,placement:o=`top`,trigger:s,children:c,mouseEnterDelay:l=.1,mouseLeaveDelay:u=.1,onOpenChange:d,overlayStyle:f={},styles:p,classNames:m,motion:h,arrow:g,..._}=e,{getPrefixCls:v,className:y,style:b,classNames:x,styles:C,arrow:w,trigger:T}=_a(`popover`),E=v(`popover`,n),[D,O]=iT(E),k=v(),A=Uw(g,w),j=s||T||`hover`,M={...e,placement:o,trigger:j,mouseEnterDelay:l,mouseLeaveDelay:u,overlayStyle:f,styles:p,classNames:m},[N,P]=xf([x,m],[C,p],{props:M}),F=Y(a,D,O,y,N.root),[I,L]=Wn(e.defaultOpen??!1,e.open),R=e=>{L(e),d?.(e)},z=ww(r),B=ww(i);return S.createElement(eT,{unique:!1,arrow:A,placement:o,trigger:j,mouseEnterDelay:l,mouseLeaveDelay:u,..._,prefixCls:E,classNames:{root:F,container:N.container,arrow:N.arrow},styles:{root:{...P.root,...b,...f},container:P.container,arrow:P.arrow},ref:t,open:I,onOpenChange:R,overlay:z||B?S.createElement(aT,{prefixCls:E,title:z,content:B,classNames:N,styles:P}):null,motion:{motionName:vh(k,`zoom-big`,typeof h?.motionName==`string`?h?.motionName:void 0)},"data-popover-inject":!0},c)});cT._InternalPanelDoNotUseOrYouWillBeFired=sT;var lT=e=>{let{size:t,shape:n}=S.useContext(yw),r=S.useMemo(()=>({size:e.size||t,shape:e.shape||n}),[e.size,e.shape,t,n]);return S.createElement(yw.Provider,{value:r},e.children)},uT=e=>{let{getPrefixCls:t,direction:n}=S.useContext(ma),{prefixCls:r,className:i,rootClassName:a,style:o,maxCount:s,maxStyle:c,size:l,shape:u,maxPopoverPlacement:d,maxPopoverTrigger:f,children:p,max:m}=e,h=t(`avatar`,r),g=`${h}-group`,_=ap(h),[v,y]=Sw(h,_),b=Y(g,{[`${g}-rtl`]:n===`rtl`},y,_,i,a,v),x=Di(p).map((e,t)=>cm(e,{key:`avatar-key-${t}`})),C=m?.count||s,w=x.length;if(C&&C{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z`}}]},name:`left`,theme:`outlined`}}))());function pT(){return pT=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,pT({},e,{ref:t,icon:fT.default}))),{ESC:hT,TAB:gT}=Zr;function Tee({visible:e,triggerRef:t,onVisibleChange:n,autoFocus:r,overlayRef:i}){let a=S.useRef(!1),o=()=>{e&&(t.current?.focus?.(),n?.(!1))},s=()=>i.current?.focus?(i.current.focus(),a.current=!0,!0):!1,c=e=>{switch(e.keyCode){case hT:o();break;case gT:{let t=!1;a.current||(t=s()),t?e.preventDefault():o();break}}};S.useEffect(()=>e?(window.addEventListener(`keydown`,c),r&&Ei(s,3),()=>{window.removeEventListener(`keydown`,c),a.current=!1}):()=>{a.current=!1},[e])}var Eee=(0,S.forwardRef)((e,t)=>{let{overlay:n,arrow:r,prefixCls:i}=e,a=(0,S.useMemo)(()=>{let e;return e=typeof n==`function`?n():n,e},[n]),o=sr(t,fr(a));return S.createElement(S.Fragment,null,r&&S.createElement(`div`,{className:`${i}-arrow`}),S.cloneElement(a,{ref:lr(a)?o:void 0}))}),_T={adjustX:1,adjustY:1},vT=[0,0],Dee={topLeft:{points:[`bl`,`tl`],overflow:_T,offset:[0,-4],targetOffset:vT},top:{points:[`bc`,`tc`],overflow:_T,offset:[0,-4],targetOffset:vT},topRight:{points:[`br`,`tr`],overflow:_T,offset:[0,-4],targetOffset:vT},bottomLeft:{points:[`tl`,`bl`],overflow:_T,offset:[0,4],targetOffset:vT},bottom:{points:[`tc`,`bc`],overflow:_T,offset:[0,4],targetOffset:vT},bottomRight:{points:[`tr`,`br`],overflow:_T,offset:[0,4],targetOffset:vT}};function yT(){return yT=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{arrow:n=!1,prefixCls:r=`rc-dropdown`,transitionName:i,animation:a,align:o,placement:s=`bottomLeft`,placements:c=Dee,getPopupContainer:l,showAction:u,hideAction:d,overlayClassName:f,overlayStyle:p,visible:m,trigger:h=[`hover`],autoFocus:g,overlay:_,children:v,onVisibleChange:y,...b}=e,[x,C]=S.useState(),w=`visible`in e?m:x,T=a?`${r}-${a}`:i,E=S.useRef(null),D=S.useRef(null),O=S.useRef(null);S.useImperativeHandle(t,()=>E.current);let k=e=>{C(e),y?.(e)};Tee({visible:w,triggerRef:O,onVisibleChange:k,autoFocus:g,overlayRef:D});let A=t=>{let{onOverlayClick:n}=e;C(!1),n&&n(t)},j=()=>S.createElement(Eee,{ref:D,overlay:_,prefixCls:r,arrow:n}),M=()=>typeof _==`function`?j:j(),N=()=>{let{minOverlayWidthMatchTrigger:t,alignPoint:n}=e;return`minOverlayWidthMatchTrigger`in e?t:!n},P=S.cloneElement(v,{className:Y(v.props?.className,w&&(()=>{let{openClassName:t}=e;return t===void 0?`${r}-open`:t})()),ref:lr(v)?sr(O,fr(v)):void 0}),F=d;return!F&&h.indexOf(`contextMenu`)!==-1&&(F=[`click`]),S.createElement(am,yT({builtinPlacements:c},b,{prefixCls:r,ref:E,popupClassName:Y(f,{[`${r}-show-arrow`]:n}),popupStyle:p,action:h,showAction:u,hideAction:F,popupPlacement:s,popupAlign:o,popupMotion:{motionName:T},popupVisible:w,stretch:N()?`minWidth`:``,popup:M(),onOpenChange:k,onPopupClick:A,getPopupContainer:l}),P)}),xT=S.createContext(null);function ST(e,t){return`${e}-${t}`}function CT(e){return ST(S.useContext(xT),e)}var wT=S.createContext(null);function Oee(e,t){let n={...e};return Object.keys(t).forEach(e=>{let r=t[e];r!==void 0&&(n[e]=r)}),n}function TT({children:e,locked:t,...n}){let r=S.useContext(wT),i=Xn(()=>Oee(r,n),[r,n],(e,n)=>!t&&(e[0]!==n[0]||!di(e[1],n[1],!0)));return S.createElement(wT.Provider,{value:i},e)}var kee=[],ET=S.createContext(null);function DT(){return S.useContext(ET)}var OT=S.createContext(kee);function kT(e){let t=S.useContext(OT);return S.useMemo(()=>e===void 0?t:[...t,e],[t,e])}var AT=S.createContext(null),jT=S.createContext({}),{LEFT:MT,RIGHT:NT,UP:PT,DOWN:FT,ENTER:IT,ESC:LT,HOME:RT,END:zT}=Zr,BT=[PT,FT,MT,NT];function Aee(e,t,n,r){let i=`prev`,a=`next`,o=`children`,s=`parent`;if(e===`inline`&&r===IT)return{inlineTrigger:!0};let c={[PT]:i,[FT]:a},l={[MT]:n?a:i,[NT]:n?i:a,[FT]:o,[IT]:o},u={[PT]:i,[FT]:a,[IT]:o,[LT]:s,[MT]:n?o:s,[NT]:n?s:o};switch({inline:c,horizontal:l,vertical:u,inlineSub:c,horizontalSub:u,verticalSub:u}[`${e}${t?``:`Sub`}`]?.[r]){case i:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case s:return{offset:-1,sibling:!1};case o:return{offset:1,sibling:!1};default:return null}}function jee(e){let t=e;for(;t;){if(t.getAttribute(`data-menu-list`))return t;t=t.parentElement}return null}function Mee(e,t){let n=e||document.activeElement;for(;n;){if(t.has(n))return n;n=n.parentElement}return null}function VT(e,t){return jr(e,!0).filter(e=>t.has(e))}function HT(e,t,n,r=1){if(!e)return null;let i=VT(e,t),a=i.length,o=i.findIndex(e=>n===e);return r<0?o===-1?o=a-1:--o:r>0&&(o+=1),o=(o+a)%a,i[o]}var UT=(e,t)=>{let n=new Set,r=new Map,i=new Map;return e.forEach(e=>{let a=document.querySelector(`[data-menu-id='${ST(t,e)}']`);a&&(n.add(a),i.set(a,e),r.set(e,a))}),{elements:n,key2element:r,element2key:i}};function WT(e,t,n,r,i,a,o,s,c,l){let u=S.useRef(),d=S.useRef();d.current=t;let f=()=>{Ei.cancel(u.current)};return S.useEffect(()=>()=>{f()},[]),p=>{let{which:m}=p;if([...BT,IT,LT,RT,zT].includes(m)){let l=a(),h=UT(l,r),{elements:g,key2element:_,element2key:v}=h,y=Mee(_.get(t),g),b=v.get(y),x=Aee(e,o(b,!0).length===1,n,m);if(!x&&m!==RT&&m!==zT)return;(BT.includes(m)||[RT,zT].includes(m))&&p.preventDefault();let S=e=>{if(e){let t=e,n=e.querySelector(`a`);n?.getAttribute(`href`)&&(t=n);let r=v.get(e);s(r),f(),u.current=Ei(()=>{d.current===r&&t.focus()})}};if([RT,zT].includes(m)||x.sibling||!y){let t;t=!y||e===`inline`?i.current:jee(y);let n,r=VT(t,g);n=m===RT?r[0]:m===zT?r[r.length-1]:HT(t,g,y,x.offset),S(n)}else if(x.inlineTrigger)c(b);else if(x.offset>0)c(b,!0),f(),u.current=Ei(()=>{h=UT(l,r);let e=y.getAttribute(`aria-controls`);S(HT(document.getElementById(e),h.elements))},5);else if(x.offset<0){let e=o(b,!0),t=e[e.length-2],n=_.get(t);c(t,!1),S(n)}}l?.(p)}}function GT(e){Promise.resolve().then(e)}var KT=`__RC_UTIL_PATH_SPLIT__`,qT=e=>e.join(KT),JT=e=>e.split(KT),YT=`rc-menu-more`;function XT(){let[,e]=S.useState({}),t=(0,S.useRef)(new Map),n=(0,S.useRef)(new Map),[r,i]=S.useState([]),a=(0,S.useRef)(0),o=(0,S.useRef)(!1),s=()=>{o.current||e({})},c=(0,S.useCallback)((e,r)=>{let i=qT(r);n.current.set(i,e),t.current.set(e,i),a.current+=1;let o=a.current;GT(()=>{o===a.current&&s()})},[]),l=(0,S.useCallback)((e,r)=>{let i=qT(r);n.current.delete(i),t.current.delete(e)},[]),u=(0,S.useCallback)(e=>{i(e)},[]),d=(0,S.useCallback)((e,n)=>{let i=JT(t.current.get(e)||``);return n&&r.includes(i[0])&&i.unshift(YT),i},[r]),f=(0,S.useCallback)((e,t)=>e.filter(e=>e!==void 0).some(e=>d(e,!0).includes(t)),[d]),p=()=>{let e=[...t.current.keys()];return r.length&&e.push(YT),e},m=(0,S.useCallback)(e=>{let r=`${t.current.get(e)}${KT}`,i=new Set;return[...n.current.keys()].forEach(e=>{e.startsWith(r)&&i.add(n.current.get(e))}),i},[]);return S.useEffect(()=>()=>{o.current=!0},[]),{registerPath:c,unregisterPath:l,refreshOverflowKeys:u,isSubPathKey:f,getKeyPath:d,getKeys:p,getSubPathKeys:m}}function ZT(e){let t=S.useRef(e);t.current=e;let n=S.useCallback((...e)=>t.current?.(...e),[]);return e?n:void 0}function QT(e,t,n,r){let{activeKey:i,onActive:a,onInactive:o}=S.useContext(wT),s={active:i===e};return t||(s.onMouseEnter=t=>{n?.({key:e,domEvent:t}),a(e)},s.onMouseLeave=t=>{r?.({key:e,domEvent:t}),o(e)}),s}function $T(e){let{mode:t,rtl:n,inlineIndent:r}=S.useContext(wT);if(t!==`inline`)return null;let i=e;return n?{paddingRight:i*r}:{paddingLeft:i*r}}function eE({icon:e,props:t,children:n}){let r;return e===null||e===!1?null:(typeof e==`function`?r=S.createElement(e,{...t}):typeof e!=`boolean`&&(r=e),r||n||null)}function tE({item:e,...t}){return Object.defineProperty(t,`item`,{get:()=>(li(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function nE(){return nE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{style:n,className:r,eventKey:i,warnKey:a,disabled:o,itemIcon:s,children:c,role:l,onMouseEnter:u,onMouseLeave:d,onClick:f,onKeyDown:p,onFocus:m,...h}=e,g=CT(i),{prefixCls:_,onItemClick:v,disabled:y,overflowDisabled:b,itemIcon:x,selectedKeys:C,onActive:w}=S.useContext(wT),{_internalRenderMenuItem:T}=S.useContext(jT),E=`${_}-item`,D=S.useRef(),O=S.useRef(),k=y||o,A=cr(t,O),j=kT(i),M=e=>({key:i,keyPath:[...j].reverse(),item:D.current,domEvent:e}),N=s||x,{active:P,...F}=QT(i,k,u,d),I=C.includes(i),L=$T(j.length),R=e=>{if(k)return;let t=M(e);f?.(tE(t)),v(t)},z=e=>{if(p?.(e),e.which===Zr.ENTER){let t=M(e);f?.(tE(t)),v(t)}},B=e=>{w(i),m?.(e)},V={};e.role===`option`&&(V[`aria-selected`]=I);let H=S.createElement(rE,nE({ref:D,elementRef:A,role:l===null?`none`:l||`menuitem`,tabIndex:o?null:-1,"data-menu-id":b&&g?null:g},hi(h,[`extra`]),F,V,{component:`li`,"aria-disabled":o,style:{...L,...n},className:Y(E,{[`${E}-active`]:P,[`${E}-selected`]:I,[`${E}-disabled`]:k},r),onClick:R,onKeyDown:z,onFocus:B}),c,S.createElement(eE,{props:{...e,isSelected:I},icon:N}));return T&&(H=T(H,e,{selected:I})),H});function aE(e,t){let{eventKey:n}=e,r=DT(),i=kT(n);return S.useEffect(()=>{if(r)return r.registerPath(n,i),()=>{r.unregisterPath(n,i)}},[i]),r?null:S.createElement(iE,nE({},e,{ref:t}))}var oE=S.forwardRef(aE);function sE(){return sE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:i,mode:a,rtl:o}=S.useContext(wT);return S.createElement(`ul`,sE({className:Y(i,o&&`${i}-rtl`,`${i}-sub`,`${i}-${a===`inline`?`inline`:`vertical`}`,e),role:`menu`},n,{"data-menu-list":!0,ref:r}),t)});function lE(e,t){return Di(e).map((e,n)=>{if(S.isValidElement(e)){let{key:r}=e,i=e.props?.eventKey??r;i??=`tmp_key-${[...t,n].join(`-`)}`;let a={key:i,eventKey:i};return S.cloneElement(e,a)}return e})}var uE={adjustX:1,adjustY:1},dE={topLeft:{points:[`bl`,`tl`],overflow:uE},topRight:{points:[`br`,`tr`],overflow:uE},bottomLeft:{points:[`tl`,`bl`],overflow:uE},bottomRight:{points:[`tr`,`br`],overflow:uE},leftTop:{points:[`tr`,`tl`],overflow:uE},leftBottom:{points:[`br`,`bl`],overflow:uE},rightTop:{points:[`tl`,`tr`],overflow:uE},rightBottom:{points:[`bl`,`br`],overflow:uE}},fE={topLeft:{points:[`bl`,`tl`],overflow:uE},topRight:{points:[`br`,`tr`],overflow:uE},bottomLeft:{points:[`tl`,`bl`],overflow:uE},bottomRight:{points:[`tr`,`br`],overflow:uE},rightTop:{points:[`tr`,`tl`],overflow:uE},rightBottom:{points:[`br`,`bl`],overflow:uE},leftTop:{points:[`tl`,`tr`],overflow:uE},leftBottom:{points:[`bl`,`br`],overflow:uE}};function pE(e,t,n){if(t)return t;if(n)return n[e]||n.other}var mE={horizontal:`bottomLeft`,vertical:`rightTop`,"vertical-left":`rightTop`,"vertical-right":`leftTop`};function hE({prefixCls:e,visible:t,children:n,popup:r,popupStyle:i,popupClassName:a,popupOffset:o,disabled:s,mode:c,onVisibleChange:l}){let{getPopupContainer:u,rtl:d,subMenuOpenDelay:f,subMenuCloseDelay:p,builtinPlacements:m,triggerSubMenuAction:h,forceSubMenuRender:g,rootClassName:_,motion:v,defaultMotions:y}=S.useContext(wT),[b,x]=S.useState(!1),C=d?{...fE,...m}:{...dE,...m},w=mE[c],T=pE(c,v,y),E=S.useRef(T);c!==`inline`&&(E.current=T);let D={...E.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},O=S.useRef();return S.useEffect(()=>(O.current=Ei(()=>{x(t)}),()=>{Ei.cancel(O.current)}),[t]),S.createElement(am,{prefixCls:e,popupClassName:Y(`${e}-popup`,{[`${e}-rtl`]:d},a,_),stretch:c===`horizontal`?`minWidth`:null,getPopupContainer:u,builtinPlacements:C,popupPlacement:w,popupVisible:b,popup:r,popupStyle:i,popupAlign:o&&{offset:o},action:s?[]:[h],mouseEnterDelay:f,mouseLeaveDelay:p,onPopupVisibleChange:l,forceRender:g,popupMotion:D,fresh:!0},n)}function gE(){return gE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current&&f(!1)},[l]);let m={...pE(i,s,c)};n.length>1&&(m.motionAppear=!1);let h=m.onVisibleChanged;return m.onVisibleChanged=e=>(!u.current&&!e&&f(!0),h?.(e)),d?null:S.createElement(TT,{mode:i,locked:!u.current},S.createElement(Ed,gE({visible:p},m,{forceRender:o,removeOnLeave:!1,leavedClassName:`${a}-hidden`}),({className:t,style:n})=>S.createElement(cE,{id:e,className:t,style:n},r)))}function vE(){return vE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{style:n,className:r,styles:i,classNames:a,title:o,eventKey:s,warnKey:c,disabled:l,internalPopupClose:u,children:d,itemIcon:f,expandIcon:p,popupClassName:m,popupOffset:h,popupStyle:g,onClick:_,onMouseEnter:v,onMouseLeave:y,onTitleClick:b,onTitleMouseEnter:x,onTitleMouseLeave:C,popupRender:w,...T}=e,E=CT(s),{prefixCls:D,mode:O,openKeys:k,disabled:A,overflowDisabled:j,activeKey:M,selectedKeys:N,itemIcon:P,expandIcon:F,onItemClick:I,onOpenChange:L,onActive:R,popupRender:z}=S.useContext(wT),{_internalRenderSubMenuItem:B}=S.useContext(jT),{isSubPathKey:V}=S.useContext(AT),H=kT(),U=`${D}-submenu`,ee=A||l,te=S.useRef(),ne=S.useRef(),W=f??P,re=p??F,G=k.includes(s),K=!j&&G,q=V(N,s),{active:ie,...J}=QT(s,ee,x,C),[ae,oe]=S.useState(!1),se=e=>{ee||oe(e)},ce=e=>{se(!0),v?.({key:s,domEvent:e})},le=e=>{se(!1),y?.({key:s,domEvent:e})},ue=S.useMemo(()=>ie||(O===`inline`?!1:ae||V([M],s)),[O,ie,M,ae,s,V]),de=$T(H.length),fe=e=>{ee||(b?.({key:s,domEvent:e}),O===`inline`&&L(s,!G))},pe=ZT(e=>{_?.(tE(e)),I(e)}),me=e=>{O!==`inline`&&L(s,e)},he=()=>{R(s)},ge=E&&`${E}-popup`,_e=S.useMemo(()=>S.createElement(eE,{icon:O===`horizontal`?void 0:re,props:{...e,isOpen:K,isSubMenu:!0}},S.createElement(`i`,{className:`${U}-arrow`})),[O,re,e,K,U]),ve=S.createElement(`div`,vE({role:`menuitem`,style:de,className:`${U}-title`,tabIndex:ee?null:-1,ref:te,title:typeof o==`string`?o:null,"data-menu-id":j&&E?null:E,"aria-expanded":K,"aria-haspopup":!0,"aria-controls":ge,"aria-disabled":ee,onClick:fe,onFocus:he},J),o,_e),ye=S.useRef(O);O!==`inline`&&H.length>1?ye.current=`vertical`:ye.current=O;let be=ye.current,xe=S.useMemo(()=>{let t=S.createElement(TT,{classNames:a,styles:i,mode:be===`horizontal`?`vertical`:be},S.createElement(cE,{id:ge,ref:ne},d)),n=w||z;return n?n(t,{item:e,keys:H}):t},[w,z,H,ge,d,e,be]);if(!j){let e=ye.current;ve=S.createElement(hE,{mode:e,prefixCls:U,visible:!u&&K&&O!==`inline`,popupClassName:m,popupOffset:h,popupStyle:g,popup:xe,disabled:ee,onVisibleChange:me},ve)}let Se=S.createElement(yS.Item,vE({ref:t,role:`none`},T,{component:`li`,style:n,className:Y(U,`${U}-${O}`,r,{[`${U}-open`]:K,[`${U}-active`]:ue,[`${U}-selected`]:q,[`${U}-disabled`]:ee}),onMouseEnter:ce,onMouseLeave:le}),ve,!j&&S.createElement(_E,{id:ge,open:K,keyPath:H},d));return B&&(Se=B(Se,e,{selected:q,active:ue,open:K,disabled:ee})),S.createElement(TT,{classNames:a,styles:i,onItemClick:pe,mode:O===`horizontal`?`vertical`:O,itemIcon:W,expandIcon:re},Se)}),bE=S.forwardRef((e,t)=>{let{eventKey:n,children:r}=e,i=kT(n),a=lE(r,i),o=DT();S.useEffect(()=>{if(o)return o.registerPath(n,i),()=>{o.unregisterPath(n,i)}},[i]);let s;return s=o?a:S.createElement(yE,vE({ref:t},e),a),S.createElement(OT.Provider,{value:i},s)});function xE({className:e,style:t}){let{prefixCls:n}=S.useContext(wT);return DT()?null:S.createElement(`li`,{role:`separator`,className:Y(`${n}-item-divider`,e),style:t})}function SE(){return SE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:n,title:r,eventKey:i,children:a,...o}=e,{prefixCls:s,classNames:c,styles:l}=S.useContext(wT),u=`${s}-item-group`;return S.createElement(`li`,SE({ref:t,role:`presentation`},o,{onClick:e=>e.stopPropagation(),className:Y(u,n)}),S.createElement(`div`,{role:`presentation`,className:Y(`${u}-title`,c?.listTitle),style:l?.listTitle,title:typeof r==`string`?r:void 0},r),S.createElement(`ul`,{role:`group`,className:Y(`${u}-list`,c?.list),style:l?.list},a))}),wE=S.forwardRef((e,t)=>{let{eventKey:n,children:r}=e,i=lE(r,kT(n));return DT()?i:S.createElement(CE,SE({ref:t},hi(e,[`warnKey`])),i)});function TE(){return TE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(e&&typeof e==`object`){let{label:c,children:l,key:u,type:d,extra:f,...p}=e,m=u??`tmp-${s}`;return l||d===`group`?d===`group`?S.createElement(i,TE({key:m},p,{title:c}),EE(l,t,n)):S.createElement(a,TE({key:m},p,{title:c}),EE(l,t,n)):d===`divider`?S.createElement(o,TE({key:m},p)):S.createElement(r,TE({key:m},p,{extra:f}),c,(!!f||f===0)&&S.createElement(`span`,{className:`${n}-item-extra`},f))}return null}).filter(e=>e)}function DE(e,t,n,r,i){let a=e,o={divider:xE,item:oE,group:wE,submenu:bE,...r};return t&&(a=EE(t,o,i)),lE(a,n)}function OE(){return OE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n=`rc-menu`,rootClassName:r,style:i,className:a,styles:o,classNames:s,tabIndex:c=0,items:l,children:u,direction:d,id:f,mode:p=`vertical`,inlineCollapsed:m,disabled:h,disabledOverflow:g,subMenuOpenDelay:_=.1,subMenuCloseDelay:v=.1,forceSubMenuRender:y,defaultOpenKeys:b,openKeys:x,activeKey:C,defaultActiveFirst:w,selectable:T=!0,multiple:E=!1,defaultSelectedKeys:D,selectedKeys:O,onSelect:k,onDeselect:A,inlineIndent:j=24,motion:M,defaultMotions:N,triggerSubMenuAction:P=`hover`,builtinPlacements:F,itemIcon:I,expandIcon:L,overflowedIndicator:R=`...`,overflowedIndicatorPopupClassName:z,getPopupContainer:B,onClick:V,onOpenChange:H,onKeyDown:U,openAnimation:ee,openTransitionName:te,_internalRenderMenuItem:ne,_internalRenderSubMenuItem:W,_internalComponents:re,popupRender:G,...K}=e,[q,ie]=S.useMemo(()=>[DE(u,l,kE,re,n),DE(u,l,kE,{},n)],[u,l,re]),[J,ae]=S.useState(!1),oe=S.useRef(),se=Yn(f?`rc-menu-uuid-${f}`:`rc-menu-uuid`),ce=d===`rtl`,[le,ue]=Wn(b,x),de=le||kE,fe=(e,t=!1)=>{function n(){ue(e),H?.(e)}t?(0,zi.flushSync)(n):n()},[pe,me]=S.useState(de),he=S.useRef(!1),[ge,_e]=S.useMemo(()=>(p===`inline`||p===`vertical`)&&m?[`vertical`,m]:[p,!1],[p,m]),ve=ge===`inline`,[ye,be]=S.useState(ge),[xe,Se]=S.useState(_e);S.useEffect(()=>{be(ge),Se(_e),he.current&&(ve?ue(pe):fe(kE))},[ge,_e]);let[Ce,we]=S.useState(0),Te=Ce>=q.length-1||ye!==`horizontal`||g;S.useEffect(()=>{ve&&me(de)},[de]),S.useEffect(()=>(he.current=!0,()=>{he.current=!1}),[]);let{registerPath:Ee,unregisterPath:De,refreshOverflowKeys:Oe,isSubPathKey:ke,getKeyPath:Ae,getKeys:je,getSubPathKeys:Me}=XT(),Ne=S.useMemo(()=>({registerPath:Ee,unregisterPath:De}),[Ee,De]),Pe=S.useMemo(()=>({isSubPathKey:ke}),[ke]);S.useEffect(()=>{Oe(Te?kE:q.slice(Ce+1).map(e=>e.key))},[Ce,Te]);let[Fe,Ie]=Wn(C||w&&q[0]?.key,C),Le=ZT(e=>{Ie(e)}),Re=ZT(()=>{Ie(void 0)});(0,S.useImperativeHandle)(t,()=>({list:oe.current,focus:e=>{let t=je(),{elements:n,key2element:r,element2key:i}=UT(t,se),a=VT(oe.current,n),o;o=Fe&&t.includes(Fe)?Fe:a[0]?i.get(a[0]):q.find(e=>!e.props.disabled)?.key;let s=r.get(o);o&&s&&s?.focus?.(e)},findItem:({key:e})=>{let{key2element:t}=UT(je(),se);return t.get(e)||null}}));let[ze,Be]=Wn(D||[],O),Ve=S.useMemo(()=>Array.isArray(ze)?ze:ze==null?kE:[ze],[ze]),He=e=>{if(T){let{key:t}=e,n=Ve.includes(t),r;r=E?n?Ve.filter(e=>e!==t):[...Ve,t]:[t],Be(r);let i={...e,selectedKeys:r};n?A?.(i):k?.(i)}!E&&de.length&&ye!==`inline`&&fe(kE)},Ue=ZT(e=>{V?.(tE(e)),He(e)}),We=ZT((e,t)=>{let n=de.filter(t=>t!==e);if(t)n.push(e);else if(ye!==`inline`){let t=Me(e);n=n.filter(e=>!t.has(e))}di(de,n,!0)||fe(n,!0)}),Ge=WT(ye,Fe,ce,se,oe,je,Ae,Ie,(e,t)=>{We(e,t??!de.includes(e))},U);S.useEffect(()=>{ae(!0)},[]);let Ke=S.useMemo(()=>({_internalRenderMenuItem:ne,_internalRenderSubMenuItem:W}),[ne,W]),qe=ye!==`horizontal`||g?q:q.map((e,t)=>S.createElement(TT,{key:e.key,overflowDisabled:t>Ce,classNames:s,styles:o},e)),Je=S.createElement(yS,OE({id:f,ref:oe,prefixCls:`${n}-overflow`,component:`ul`,itemComponent:oE,className:Y(n,`${n}-root`,`${n}-${ye}`,a,{[`${n}-inline-collapsed`]:xe,[`${n}-rtl`]:ce},r),dir:d,style:i,role:`menu`,tabIndex:c,data:qe,renderRawItem:e=>e,renderRawRest:e=>{let t=e.length,n=t?q.slice(-t):null;return S.createElement(bE,{eventKey:YT,title:R,disabled:Te,internalPopupClose:t===0,popupClassName:z},n)},maxCount:ye!==`horizontal`||g?yS.INVALIDATE:yS.RESPONSIVE,ssr:`full`,"data-menu-list":!0,onVisibleChange:e=>{we(e)},onKeyDown:Ge},K));return S.createElement(jT.Provider,{value:Ke},S.createElement(xT.Provider,{value:se},S.createElement(TT,{prefixCls:n,rootClassName:r,classNames:s,styles:o,mode:ye,openKeys:de,rtl:ce,disabled:h,motion:J?M:null,defaultMotions:J?N:null,activeKey:Fe,onActive:Le,onInactive:Re,selectedKeys:Ve,inlineIndent:j,subMenuOpenDelay:_,subMenuCloseDelay:v,forceSubMenuRender:y,builtinPlacements:F,triggerSubMenuAction:P,getPopupContainer:B,itemIcon:I,expandIcon:L,onItemClick:Ue,onOpenChange:We,popupRender:G},S.createElement(AT.Provider,{value:Pe},Je),S.createElement(`div`,{style:{display:`none`},"aria-hidden":!0},S.createElement(ET.Provider,{value:Ne},ie)))))});AE.Item=oE,AE.SubMenu=bE,AE.ItemGroup=wE,AE.Divider=xE;var jE=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z`}}]},name:`bars`,theme:`outlined`}}))());function ME(){return ME=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,ME({},e,{ref:t,icon:jE.default}))),PE=S.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),FE=e=>{let{antCls:t,componentCls:n,colorText:r,footerBg:i,headerHeight:a,headerPadding:o,headerColor:s,footerPadding:c,fontSize:l,bodyBg:u,headerBg:d}=e;return{[n]:{display:`flex`,flex:`auto`,flexDirection:`column`,minHeight:0,background:u,"&, *":{boxSizing:`border-box`},[`&${n}-has-sider`]:{flexDirection:`row`,[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:`0 0 auto`},"&-rtl":{direction:`rtl`}},[`${n}-header`]:{height:a,padding:o,color:s,lineHeight:X(a),background:d,[`${t}-menu`]:{lineHeight:`inherit`}},[`${n}-footer`]:{padding:c,color:r,fontSize:l,background:i},[`${n}-content`]:{flex:`auto`,color:r,minHeight:0}}},IE=e=>{let{colorBgLayout:t,controlHeight:n,controlHeightLG:r,colorText:i,controlHeightSM:a,marginXXS:o,colorTextLightSolid:s,colorBgContainer:c}=e,l=r*1.25;return{colorBgHeader:`#001529`,colorBgBody:t,colorBgTrigger:`#002140`,bodyBg:t,headerBg:`#001529`,headerHeight:n*2,headerPadding:`0 ${l}px`,headerColor:i,footerPadding:`${a}px ${l}px`,footerBg:t,siderBg:`#001529`,triggerHeight:r+o*2,triggerBg:`#002140`,triggerColor:s,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:c,lightTriggerBg:c,lightTriggerColor:i}},LE=[[`colorBgBody`,`bodyBg`],[`colorBgHeader`,`headerBg`],[`colorBgTrigger`,`triggerBg`]],RE=Xl(`Layout`,FE,IE,{deprecatedTokens:LE}),zE=Xl([`Layout`,`Sider`],e=>{let{componentCls:t,siderBg:n,motionDurationMid:r,motionDurationSlow:i,antCls:a,triggerHeight:o,triggerColor:s,triggerBg:c,headerHeight:l,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:f,lightSiderBg:p,lightTriggerColor:m,lightTriggerBg:h,bodyBg:g}=e;return{[t]:{position:`relative`,minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:o},"&-right":{order:1},[`${t}-children`]:{height:`100%`,marginTop:-.1,paddingTop:.1,[`${a}-menu${a}-menu-inline-collapsed`]:{width:`auto`}},[`&-zero-width ${t}-children`]:{overflow:`hidden`},[`${t}-trigger`]:{position:`fixed`,bottom:0,zIndex:1,height:o,color:s,lineHeight:X(o),textAlign:`center`,background:c,cursor:`pointer`,transition:`all ${r}`},[`${t}-zero-width-trigger`]:{position:`absolute`,top:l,insetInlineEnd:e.calc(u).mul(-1).equal(),zIndex:1,width:u,height:d,color:s,fontSize:e.fontSizeXL,display:`flex`,alignItems:`center`,justifyContent:`center`,background:n,borderRadius:`0 ${X(f)} ${X(f)} 0`,cursor:`pointer`,transition:`background-color ${i} ease`,"&::after":{position:`absolute`,inset:0,background:`transparent`,transition:`all ${i}`,content:`""`},"&:hover::after":{background:`rgba(255, 255, 255, 0.2)`},"&-right":{insetInlineStart:e.calc(u).mul(-1).equal(),borderRadius:`${X(f)} 0 0 ${X(f)}`}},"&-light":{background:p,[`${t}-trigger`]:{color:m,background:h},[`${t}-zero-width-trigger`]:{color:m,background:h,border:`1px solid ${g}`,borderInlineStart:0}}}}},IE,{deprecatedTokens:LE}),BE={xs:`479.98px`,sm:`575.98px`,md:`767.98px`,lg:`991.98px`,xl:`1199.98px`,xxl:`1599.98px`,xxxl:`1839.98px`},VE=e=>!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),HE=S.createContext({}),UE=(()=>{let e=0;return(t=``)=>(e+=1,`${t}${e}`)})(),WE=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,trigger:i,children:a,defaultCollapsed:o=!1,theme:s=`dark`,style:c={},collapsible:l=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:f=80,zeroWidthTriggerStyle:p,breakpoint:m,onCollapse:h,onBreakpoint:g,..._}=e,{siderHook:v}=(0,S.useContext)(PE),[y,b]=(0,S.useState)(`collapsed`in e?e.collapsed:o),[x,C]=(0,S.useState)(!1);(0,S.useEffect)(()=>{`collapsed`in e&&b(e.collapsed)},[e.collapsed]);let w=(t,n)=>{`collapsed`in e||b(t),h?.(t,n)},{getPrefixCls:T,direction:E}=(0,S.useContext)(ma),D=T(`layout-sider`,n),[O,k]=zE(D),A=(0,S.useRef)(null);A.current=e=>{C(e.matches),g?.(e.matches),y!==e.matches&&w(e.matches,`responsive`)},(0,S.useEffect)(()=>{function e(e){return A.current?.(e)}let t;return window?.matchMedia!==void 0&&m&&m in BE&&(t=window.matchMedia(`screen and (max-width: ${BE[m]})`),typeof t?.addEventListener==`function`&&t.addEventListener(`change`,e),e(t)),()=>{typeof t?.removeEventListener==`function`&&t.removeEventListener(`change`,e)}},[m]),(0,S.useEffect)(()=>{let e=UE(`ant-sider-`);return v.addSider(e),()=>v.removeSider(e)},[]);let j=()=>{w(!y,`clickTrigger`)},M=hi(_,[`collapsed`]),N=y?f:d,P=VE(N)?`${N}px`:String(N),F=Number.parseFloat(String(f||0))===0?S.createElement(`span`,{onClick:j,className:Y(`${D}-zero-width-trigger`,`${D}-zero-width-trigger-${u?`right`:`left`}`),style:p},i||S.createElement(NE,null)):null,I=E===`rtl`==!u,L={expanded:I?S.createElement(Ug,null):S.createElement(mT,null),collapsed:I?S.createElement(mT,null):S.createElement(Ug,null)}[y?`collapsed`:`expanded`],R=i===null?null:F||S.createElement(`div`,{className:`${D}-trigger`,onClick:j,style:{width:P}},i||L),z={...c,flex:`0 0 ${P}`,maxWidth:P,minWidth:P,width:P},B=Y(D,`${D}-${s}`,{[`${D}-collapsed`]:!!y,[`${D}-has-trigger`]:l&&i!==null&&!F,[`${D}-below`]:!!x,[`${D}-zero-width`]:Number.parseFloat(P)===0},r,O,k),V=S.useMemo(()=>({siderCollapsed:y}),[y]);return S.createElement(HE.Provider,{value:V},S.createElement(`aside`,{className:B,...M,style:z,ref:t},S.createElement(`div`,{className:`${D}-children`},a),l||x&&F?R:null))}),GE=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z`}}]},name:`ellipsis`,theme:`outlined`}}))());function KE(){return KE=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,KE({},e,{ref:t,icon:GE.default}))),JE=(0,S.createContext)({prefixCls:``,firstLevel:!0,inlineCollapsed:!1,styles:null,classNames:null}),YE=e=>{let{prefixCls:t,className:n,dashed:r,...i}=e,{getPrefixCls:a}=S.useContext(ma),o=Y({[`${a(`menu`,t)}-item-divider-dashed`]:!!r},n);return S.createElement(xE,{className:o,...i})},XE=e=>{let{className:t,children:n,icon:r,title:i,danger:a,extra:o}=e,{prefixCls:s,firstLevel:c,direction:l,disableMenuItemTitleTooltip:u,tooltip:d,inlineCollapsed:f,styles:p,classNames:m}=S.useContext(JE),h=e=>{let t=n?.[0],i=S.createElement(`span`,{className:Y(`${s}-title-content`,c?m?.itemContent:m?.subMenu?.itemContent,{[`${s}-title-content-with-extra`]:!!o||o===0}),style:c?p?.itemContent:p?.subMenu?.itemContent},n);return(!r||S.isValidElement(n)&&n.type===`span`)&&n&&e&&c&&typeof t==`string`?S.createElement(`div`,{className:`${s}-inline-collapsed-noicon`},t.charAt(0)):i},{siderCollapsed:g}=S.useContext(HE),_=i;i===void 0?_=c?n:``:i===!1&&(_=``);let v=d===!1?void 0:d,y=v&&v.title!==void 0?v.title:_,b={...v??null,title:y};!g&&!f&&(b.title=null,b.open=!1);let x=Di(n).length,C=S.createElement(oE,{...hi(e,[`title`,`icon`,`danger`]),className:Y(c?m?.item:m?.subMenu?.item,{[`${s}-item-danger`]:a,[`${s}-item-only-child`]:(r?x+1:x)===1},t),style:{...c?p?.item:p?.subMenu?.item,...e.style},title:typeof i==`string`?i:void 0},cm(r,e=>({className:Y(`${s}-item-icon`,c?m?.itemIcon:m?.subMenu?.itemIcon,e.className),style:{...c?p?.itemIcon:p?.subMenu?.itemIcon,...e.style}})),h(f));if(!u&&d!==!1){let e=v&&v.placement?v.placement:l===`rtl`?`left`:`right`,t=`${s}-inline-collapsed-tooltip`,n=e=>({...e,root:Y(t,e?.root)}),r=v&&typeof v.classNames==`function`?e=>n(v.classNames(e)):n(v?.classNames);C=S.createElement(eT,{...b,placement:e,classNames:r},C)}return C},ZE=S.createContext(null),QE=S.forwardRef((e,t)=>{let{children:n,...r}=e,i=S.useContext(ZE),a=S.useMemo(()=>({...i,...r}),[i,r.prefixCls,r.mode,r.selectable,r.rootClassName]),o=dr(n),s=cr(t,o?fr(n):null);return S.createElement(ZE.Provider,{value:a},S.createElement(zy,{space:!0},o?S.cloneElement(n,{ref:s}):n))}),$E=e=>{let{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:i,lineWidth:a,lineType:o,itemPaddingInline:s}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${X(a)} ${o} ${i}`,boxShadow:`none`,"&::after":{display:`block`,clear:`both`,height:0,content:`"\\20"`},[`${t}-item, ${t}-submenu`]:{position:`relative`,display:`inline-block`,verticalAlign:`bottom`,paddingInline:s},[`> ${t}-item:hover, + `]:{animationName:dg},"&-hidden":{display:`none`},[r]:{...RC(e),cursor:`pointer`,transition:`background-color ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:`default`},"&-option":{display:`flex`,"&-content":{flex:`auto`,...Bl},"&-state":{flex:`none`,display:`flex`,alignItems:`center`},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${r}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:`not-allowed`},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":{...RC(e),color:e.colorTextDisabled}},[`${c}:has(+ ${c})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${c}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:`rtl`}}},_g(e,`slide-up`),_g(e,`slide-down`),sg(e,`move-up`),sg(e,`move-down`)]},BC=e=>{let{componentCls:t}=e;return{[`&${t}-customize`]:{border:0,padding:0,fontSize:`inherit`,lineHeight:`inherit`,[`${t}-placeholder`]:{display:`none`},[`${t}-content`]:{margin:0,padding:0,"&-value":{display:`none`}}}}},VC=4,HC=e=>{let{componentCls:t,calc:n,iconCls:r,paddingXS:i,paddingXXS:a,INTERNAL_FIXED_ITEM_MARGIN:o,lineWidth:s,colorIcon:c,colorIconHover:l,inputPaddingHorizontalBase:u,antCls:d}=e,[f,p]=$l(d,`select`);return{"&-multiple":{[f(`multi-item-background`)]:e.multipleItemBg,[f(`multi-item-border-color`)]:`transparent`,[f(`multi-item-border-radius`)]:e.borderRadiusSM,[f(`multi-item-height`)]:e.multipleItemHeight,[f(`multi-padding-base`)]:`calc((${p(`height`)} - ${p(`multi-item-height`)}) / 2)`,[f(`multi-padding-vertical`)]:`calc(${p(`multi-padding-base`)} - ${o} - ${s})`,[f(`multi-item-padding-horizontal`)]:`calc(${u} - ${p(`multi-padding-vertical`)} - ${s} * 2)`,paddingBlock:p(`multi-padding-vertical`),paddingInlineStart:`calc(${p(`multi-padding-base`)} - ${s})`,[`${t}-prefix`]:{marginInlineStart:p(`multi-item-padding-horizontal`)},[`${t}-prefix + ${t}-content`]:{[`${t}-placeholder`]:{insetInlineStart:0},[`${t}-content-item${t}-content-item-suffix`]:{marginInlineStart:0}},[`${t}-placeholder`]:{position:`absolute`,lineHeight:p(`line-height`),insetInlineStart:p(`multi-item-padding-horizontal`),width:`calc(100% - ${p(`multi-item-padding-horizontal`)})`,top:`50%`,transform:`translateY(-50%)`},[`${t}-content`]:{flexWrap:`wrap`,alignItems:`center`,lineHeight:1,"&-item-prefix":{height:p(`font-size`)},"&-item":{lineHeight:1,maxWidth:`calc(100% - ${VC}px)`},[`${t}-content-item-prefix + ${t}-content-item-suffix, + ${t}-content-item-suffix:first-child`]:{marginInlineStart:p(`multi-item-padding-horizontal`)},[`${t}-selection-item`]:{lineHeight:`calc(${p(`multi-item-height`)} - ${s} * 2)`,border:`${s} solid ${p(`multi-item-border-color`)}`,display:`flex`,marginBlock:o,marginInlineEnd:n(o).mul(2).equal(),background:p(`multi-item-background`),borderRadius:p(`multi-item-border-radius`),paddingInlineStart:i,paddingInlineEnd:a,transition:[`height`,`line-height`,`padding`].map(t=>`${t} ${e.motionDurationSlow}`).join(`,`),"&-content":{...Bl,marginInlineEnd:a},"&-remove":{...Hl(),display:`inline-flex`,alignItems:`center`,color:c,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${r}`]:{verticalAlign:`-0.2em`},"&:hover":{color:l}}},[`${t}-input`]:{lineHeight:n(o).mul(2).add(p(`multi-item-height`)).equal(),width:`calc(var(--select-input-width, 0) * 1px)`,minWidth:VC,maxWidth:`100%`,transition:`line-height ${e.motionDurationSlow}`}},[`&${t}-sm`]:{[f(`multi-item-height`)]:e.multipleItemHeightSM,[f(`multi-item-border-radius`)]:e.borderRadiusXS},[`&${t}-lg`]:{[f(`multi-item-height`)]:e.multipleItemHeightLG,[f(`multi-item-border-radius`)]:e.borderRadius},[`&${t}-filled`]:{[f(`multi-item-border-color`)]:e.colorSplit,[f(`multi-item-background`)]:e.colorBgContainer,[`&${t}-disabled`]:{[f(`multi-item-border-color`)]:`transparent`}}}}},UC=(e,t)=>{let{componentCls:n,antCls:r}=e,[i]=$l(r,`select`),{border:a,borderHover:o,borderActive:s,borderOutline:c}=t,l=t.background||e.selectorBg||e.colorBgContainer;return{[i(`border-color`)]:a,[i(`background-color`)]:l,[i(`color`)]:t.color||e.colorText,[`&:not(${n}-disabled)`]:{"&:hover":{[i(`border-color`)]:o,[i(`background-color`)]:t.backgroundHover||l},[`&${n}-focused`]:{[i(`border-color`)]:s,[i(`background-color`)]:t.backgroundActive||l,boxShadow:`0 0 0 ${X(e.controlOutlineWidth)} ${c}`}},[`&${n}-disabled`]:{[i(`border-color`)]:t.borderDisabled||t.border,[i(`background-color`)]:t.backgroundDisabled||t.background}}},WC=(e,t,n,r={},i={},a)=>{let{componentCls:o}=e;return{[`&${o}-${t}`]:[UC(e,n),{[`&${o}-status-error`]:UC(e,{...n,color:r.color||e.colorError,...r}),[`&${o}-status-warning`]:UC(e,{...n,color:i.color||e.colorWarning,...i})},a]}},GC=e=>{let{componentCls:t,fontHeight:n,controlHeight:r,iconCls:i,antCls:a,calc:o}=e,[s,c]=$l(a,`select`);return{[t]:[{[s(`border-radius`)]:e.borderRadius,[s(`border-color`)]:`#000`,[s(`border-size`)]:e.lineWidth,[s(`background-color`)]:e.colorBgContainer,[s(`font-size`)]:e.fontSize,[s(`line-height`)]:e.lineHeight,[s(`font-height`)]:n,[s(`color`)]:e.colorText,[s(`height`)]:r,[s(`padding-horizontal`)]:o(e.paddingSM).sub(e.lineWidth).equal(),[s(`padding-vertical`)]:`calc((${c(`height`)} - ${c(`font-height`)}) / 2 - ${c(`border-size`)})`,...Vl(e,!0),display:`inline-flex`,flexWrap:`nowrap`,position:`relative`,transition:`all ${e.motionDurationSlow}`,alignItems:`flex-start`,outline:0,cursor:`pointer`,borderRadius:c(`border-radius`),borderWidth:c(`border-size`),borderStyle:e.lineType,borderColor:c(`border-color`),background:c(`background-color`),fontSize:c(`font-size`),lineHeight:c(`line-height`),color:c(`color`),paddingInline:c(`padding-horizontal`),paddingBlock:c(`padding-vertical`),[`${t}-prefix`]:{flex:`none`,lineHeight:1},[`${t}-placeholder`]:{...Bl,color:e.colorTextPlaceholder,pointerEvents:`none`,zIndex:1},[`${t}-content`]:{flex:`auto`,minWidth:0,position:`relative`,display:`flex`,marginInlineEnd:o(e.paddingXXS).mul(1.5).equal(),"&:before":{content:`"\\a0"`,width:0,overflow:`hidden`},"&-value":{visibility:`inherit`},"input[readonly]":{cursor:`inherit`,caretColor:`transparent`}},[`${t}-suffix`]:{flex:`none`,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,"> :not(:last-child)":{marginInlineEnd:e.marginXS}},[`${t}-prefix, ${t}-suffix`]:{alignSelf:`center`,[i]:{verticalAlign:`top`}},"&-disabled":{background:e.colorBgContainerDisabled,color:e.colorTextDisabled,cursor:`not-allowed`,input:{cursor:`not-allowed`}},"&-sm":{[s(`height`)]:e.controlHeightSM,[s(`padding-horizontal`)]:o(e.paddingXS).sub(e.lineWidth).equal(),[s(`border-radius`)]:e.borderRadiusSM,[`${t}-clear`]:{insetInlineEnd:c(`padding-horizontal`)}},"&-lg":{[s(`height`)]:e.controlHeightLG,[s(`font-size`)]:e.fontSizeLG,[s(`line-height`)]:e.lineHeightLG,[s(`font-height`)]:e.fontHeightLG,[s(`border-radius`)]:e.borderRadiusLG}},{[`&:not(${t}-customize)`]:{[`${t}-input`]:{outline:`none`,background:`transparent`,appearance:`none`,border:0,margin:0,padding:0,color:c(`color`),"&::-webkit-search-cancel-button":{display:`none`,appearance:`none`}}}},{[`&-single:not(${t}-customize)`]:{[`${t}-input`]:{position:`absolute`,inset:0,lineHeight:`calc(${c(`font-height`)} + ${c(`padding-vertical`)} * 2)`},[`${t}-content`]:{...Bl,alignSelf:`center`,"&-has-value":{display:`block`,"&:before":{display:`none`}},"&-has-search-value":{color:`transparent`},"&-value":{transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,zIndex:1}},[`&${t}-open ${t}-content`]:{color:e.colorTextPlaceholder,"&-has-search-value":{color:`transparent`}}}},{[`&-show-search:not(${t}-customize-input):not(${t}-disabled)`]:{cursor:`text`}},HC(e),WC(e,`outlined`,{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:e.activeOutlineColor,borderDisabled:e.colorBorderDisabled},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError,borderOutline:e.colorErrorOutline},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning,borderOutline:e.colorWarningOutline}),WC(e,`filled`,{border:`transparent`,borderHover:`transparent`,borderActive:e.activeBorderColor,borderOutline:`transparent`,borderDisabled:e.colorBorderDisabled,background:e.colorFillTertiary,backgroundHover:e.colorFillSecondary,backgroundActive:e.colorBgContainer},{background:e.colorErrorBg,backgroundHover:e.colorErrorBgHover,borderActive:e.colorError},{background:e.colorWarningBg,backgroundHover:e.colorWarningBgHover,borderActive:e.colorWarning}),WC(e,`borderless`,{border:`transparent`,borderHover:`transparent`,borderActive:`transparent`,borderOutline:`transparent`,background:`transparent`}),WC(e,`underlined`,{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:`transparent`},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning},{borderRadius:0,borderTopColor:`transparent`,borderInlineColor:`transparent`}),BC(e)]}},KC=e=>{let{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:i,controlHeightSM:a,controlHeightLG:o,paddingXXS:s,controlPaddingHorizontal:c,zIndexPopupBase:l,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:p,colorBgContainer:m,colorFillSecondary:h,colorBgContainerDisabled:g,colorTextDisabled:_,colorPrimaryHover:v,colorPrimary:y,controlOutline:b}=e,x=s*2,S=r*2,C=Math.min(i-x,i-S),w=Math.min(a-x,a-S),T=Math.min(o-x,o-S);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:l+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:p,optionPadding:`${(i-t*n)/2}px ${c}px`,optionFontSize:t,optionLineHeight:n,optionHeight:i,selectorBg:m,clearBg:m,singleItemHeightLG:o,multipleItemBg:h,multipleItemBorderColor:`transparent`,multipleItemHeight:C,multipleItemHeightSM:w,multipleItemHeightLG:T,multipleSelectorBgDisabled:g,multipleItemColorDisabled:_,multipleItemBorderColorDisabled:`transparent`,showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:v,activeBorderColor:y,activeOutlineColor:b,selectAffixPadding:s}},qC=e=>{let{antCls:t,componentCls:n,motionDurationMid:r,inputPaddingHorizontalBase:i}=e,a={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:`50%`}};return{[n]:{...Vl(e),[`${n}-selection-item`]:{flex:1,fontWeight:`normal`,position:`relative`,userSelect:`none`,...Bl,[`> ${t}-typography`]:{display:`inline`}},[`${n}-prefix`]:{flex:`none`,marginInlineEnd:e.selectAffixPadding},[`${n}-clear`]:{position:`absolute`,top:`50%`,insetInlineStart:`auto`,insetInlineEnd:i,zIndex:1,display:`inline-block`,width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:`normal`,lineHeight:1,textAlign:`center`,textTransform:`none`,cursor:`pointer`,opacity:0,transition:[`color`,`opacity`].map(e=>`${e} ${r} ease`).join(`, `),textRendering:`auto`,transform:`translateZ(0)`,"&:before":{display:`block`},"&:hover":{color:e.colorIcon}},"@media(hover:none)":a,"&:hover":a},[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(i).add(e.fontSize).add(e.paddingXS).equal()}}}}}},JC=e=>{let{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:`100%`}}},qC(e),zC(e),{[`${t}-rtl`]:{direction:`rtl`}},v_(e,{focusElCls:`${t}-focused`})]},YC=Xl(`Select`,(e,{rootPrefixCls:t})=>{let n=lc(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(e.lineWidth).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[JC(n),GC(n)]},KC,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}}),XC=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z`}}]},name:`check`,theme:`outlined`}}))());function ZC(){return ZC=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,ZC({},e,{ref:t,icon:XC.default}))),$C=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z`}}]},name:`down`,theme:`outlined`}}))());function ew(){return ew=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,ew({},e,{ref:t,icon:$C.default}))),nw=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z`}}]},name:`search`,theme:`outlined`}}))());function rw(){return rw=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,rw({},e,{ref:t,icon:nw.default})));function aw({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:n,removeIcon:r,loading:i,loadingIcon:a,multiple:o,hasFeedback:s,showSuffixIcon:c,feedbackIcon:l,showArrow:u,componentName:d}){let f=t??S.createElement(Eu,null),p=t=>e===null&&!s&&!u?null:S.createElement(S.Fragment,null,c!==!1&&t,s&&l),m=null;m=e===void 0?i?p(a??S.createElement(Xm,{spin:!0})):({open:e,showSearch:t})=>p(e&&t?S.createElement(iw,null):S.createElement(tw,null)):p(e);let h=null;h=n===void 0?o?S.createElement(QC,null):null:n;let g=null;return g=r===void 0?S.createElement(ku,null):r,{clearIcon:f,suffixIcon:m,itemIcon:h,removeIcon:g}}function ow(e){return S.useMemo(()=>{if(e)return(...t)=>S.createElement(Ry,{space:!0},e.apply(void 0,t))},[e])}function sw(e,t){return t===void 0?e!==null:t}var cw=`SECRET_COMBOBOX_MODE_DO_NOT_USE`,lw=S.forwardRef((e,t)=>{let{prefixCls:n,bordered:r,className:i,rootClassName:a,getPopupContainer:o,popupClassName:s,dropdownClassName:c,listHeight:l=256,placement:u,listItemHeight:d,size:f,disabled:p,notFoundContent:m,status:h,builtinPlacements:g,dropdownMatchSelectWidth:_,popupMatchSelectWidth:v,direction:y,style:b,allowClear:x,variant:C,popupStyle:w,dropdownStyle:T,transitionName:E,tagRender:D,maxCount:O,prefix:k,dropdownRender:A,popupRender:j,onDropdownVisibleChange:M,onOpenChange:N,styles:P,classNames:F,...I}=e,{getPopupContainer:L,getPrefixCls:R,renderEmpty:z,direction:B,virtual:V,popupMatchSelectWidth:H,popupOverflow:U}=S.useContext(ma),{showSearch:ee,style:te,styles:ne,className:W,classNames:re}=_a(`select`),[,G]=zl(),K=d??G?.controlHeight,q=R(`select`,n),ie=R(),J=y??B,{compactSize:ae,compactItemClassnames:oe}=jh(q,J),[se,ce]=FC(`select`,C,r),le=ap(q),[ue,de]=YC(q,le),fe=S.useMemo(()=>{let{mode:t}=e;if(t!==`combobox`)return t===cw?`combobox`:t},[e.mode]),pe=fe===`multiple`||fe===`tags`,me=sw(e.suffixIcon,e.showArrow),he=v??_??H,ge=ow(j||A),_e=N||M,{status:ve,hasFeedback:ye,isFormItemInput:be,feedbackIcon:xe}=S.useContext(Fy),Se=EC(ve,h),Ce;Ce=m===void 0?fe===`combobox`?null:z?.(`Select`)||S.createElement(PC,{componentName:`Select`}):m;let{suffixIcon:we,itemIcon:Te,removeIcon:Ee,clearIcon:De}=aw({...I,multiple:pe,hasFeedback:ye,feedbackIcon:xe,showSuffixIcon:me,prefixCls:q,componentName:`Select`}),Oe=x===!0?{clearIcon:De}:x,ke=hi(I,[`suffixIcon`,`itemIcon`]),Ae=Oh(e=>f??ae??e),je=S.useContext(pm),Me=p??je,Ne={...e,variant:se,status:Se,disabled:Me,size:Ae},[Pe,Fe]=xf([re,F],[ne,P],{props:Ne},{popup:{_default:`root`}}),Ie=Y(Pe.popup?.root,s,c,{[`${q}-dropdown-${J}`]:J===`rtl`},a,de,le,ue),Le={...Fe.popup?.root,...w??T},Re=Y({[`${q}-lg`]:Ae===`large`,[`${q}-sm`]:Ae===`small`,[`${q}-rtl`]:J===`rtl`,[`${q}-${se}`]:ce,[`${q}-in-form-item`]:be},TC(q,Se,ye),oe,W,i,Pe.root,a,de,le,ue),ze=S.useMemo(()=>u===void 0?J===`rtl`?`bottomRight`:`bottomLeft`:u,[u,J]),[Be]=Ff(`SelectLike`,Fe.popup?.root?.zIndex??Le?.zIndex);return S.createElement(wC,{ref:t,virtual:V,classNames:Pe,styles:Fe,showSearch:ee,...ke,style:{...Fe.root,...te,...b},popupMatchSelectWidth:he,transitionName:vh(ie,`slide-up`,E),builtinPlacements:LC(g,U),listHeight:l,listItemHeight:K,mode:fe,prefixCls:q,placement:ze,direction:J,prefix:k,suffixIcon:we,menuItemSelectedIcon:Te,removeIcon:Ee,allowClear:Oe,notFoundContent:Ce,className:Re,getPopupContainer:o||L,popupClassName:Ie,disabled:Me,popupStyle:{...Fe.popup?.root,...Le,zIndex:Be},maxCount:pe?O:void 0,tagRender:pe?D:void 0,popupRender:ge,onPopupVisibleChange:_e})}),uw=Ex(lw,`popupAlign`);lw.SECRET_COMBOBOX_MODE_DO_NOT_USE=cw,lw.Option=PS,lw.OptGroup=NS,lw._InternalPanelDoNotUseOrYouWillBeFired=uw;var dw=[`xxxl`,`xxl`,`xl`,`lg`,`md`,`sm`,`xs`],fw=[].concat(dw).reverse(),pw=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`,xxxl:`(min-width: ${e.screenXXXL}px)`}),mw=e=>{let t=e,n=[].concat(dw).reverse();return n.forEach((e,r)=>{let i=e.toUpperCase(),a=`screen${i}Min`,o=`screen${i}`;if(!(t[a]<=t[o]))throw Error(`${a}<=${o} fails : !(${t[a]}<=${t[o]})`);if(r{if(t){for(let n of dw)if(e[n]&&t?.[n]!==void 0)return t[n]}},gw=()=>{let[,e]=zl(),t=pw(mw(e));return S.useMemo(()=>{let e=new Map,n=-1,r={};return{responsiveMap:t,matchHandlers:{},dispatch(t){return r=t,e.forEach(e=>{e(r)}),e.size>=1},subscribe(t){return e.size||this.register(),n+=1,e.set(n,t),t(r),n},unsubscribe(t){e.delete(t),e.size||this.unregister()},register(){Object.entries(t).forEach(([e,t])=>{let n=({matches:t})=>{this.dispatch({...r,[e]:t})},i=window.matchMedia(t);typeof i?.addEventListener==`function`&&i.addEventListener(`change`,n),this.matchHandlers[t]={mql:i,listener:n},n(i)})},unregister(){Object.values(t).forEach(e=>{let t=this.matchHandlers[e];typeof t?.mql?.removeEventListener==`function`&&t.mql.removeEventListener(`change`,t?.listener)}),e.clear()}}},[t])};function _w(e=!0,t={}){let n=(0,S.useRef)(t),[,r]=ff(),i=gw();return Vn(()=>{let t=i.subscribe(t=>{n.current=t,e&&r()});return()=>i.unsubscribe(t)},[]),n.current}var vw=S.createContext({}),yw=e=>{let{antCls:t,componentCls:n,iconCls:r,avatarBg:i,avatarColor:a,containerSize:o,containerSizeLG:s,containerSizeSM:c,textFontSize:l,textFontSizeLG:u,textFontSizeSM:d,iconFontSize:f,iconFontSizeLG:p,iconFontSizeSM:m,borderRadius:h,borderRadiusLG:g,borderRadiusSM:_,lineWidth:v,lineType:y}=e,b=(e,t,i,a)=>({width:e,height:e,borderRadius:`50%`,fontSize:t,[`&${n}-square`]:{borderRadius:a},[`&${n}-icon`]:{fontSize:i,[`> ${r}`]:{margin:0}}});return{[n]:{...Vl(e),position:`relative`,display:`inline-flex`,justifyContent:`center`,alignItems:`center`,overflow:`hidden`,color:a,whiteSpace:`nowrap`,textAlign:`center`,verticalAlign:`middle`,background:i,border:`${X(v)} ${y} transparent`,"&-image":{background:`transparent`},[`${t}-image-img`]:{display:`block`},...b(o,l,f,h),"&-lg":{...b(s,u,p,g)},"&-sm":{...b(c,d,m,_)},"> img":{display:`block`,width:`100%`,height:`100%`,objectFit:`cover`}}}},bw=e=>{let{componentCls:t,groupBorderColor:n,groupOverlapping:r,groupSpace:i}=e;return{[`${t}-group`]:{display:`inline-flex`,[t]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:r}},[`${t}-group-popover`]:{[`${t} + ${t}`]:{marginInlineStart:i}}}},xw=Xl(`Avatar`,e=>{let{colorTextLightSolid:t,colorTextPlaceholder:n}=e,r=lc(e,{avatarBg:n,avatarColor:t});return[yw(r),bw(r)]},e=>{let{controlHeight:t,controlHeightLG:n,controlHeightSM:r,fontSize:i,fontSizeLG:a,fontSizeXL:o,fontSizeHeading3:s,marginXS:c,marginXXS:l,colorBorderBg:u}=e;return{containerSize:t,containerSizeLG:n,containerSizeSM:r,textFontSize:i,textFontSizeLG:i,textFontSizeSM:i,iconFontSize:Math.round((a+o)/2),iconFontSizeLG:s,iconFontSizeSM:i,groupSpace:l,groupOverlapping:-c,groupBorderColor:u}}),Sw=S.forwardRef((e,t)=>{let{prefixCls:n,shape:r,size:i,src:a,srcSet:o,icon:s,className:c,rootClassName:l,style:u,alt:d,draggable:f,children:p,crossOrigin:m,gap:h=4,onError:g,..._}=e,[v,y]=S.useState(1),[b,x]=S.useState(!1),[C,w]=S.useState(!0),T=S.useRef(null),E=S.useRef(null),D=sr(t,T),{getPrefixCls:O,className:k,style:A}=_a(`avatar`),j=S.useContext(vw),M=()=>{if(!E.current||!T.current)return;let e=E.current.offsetWidth,t=T.current.offsetWidth;e!==0&&t!==0&&h*2{x(!0)},[]),S.useEffect(()=>{w(!0),y(1)},[a]),S.useEffect(M,[h]);let N=()=>{g?.()!==!1&&w(!1)},P=Oh(e=>i??j?.size??e??`medium`),F=_w(Object.keys(ef(P)&&P||{}).some(e=>dw.includes(e))),I=S.useMemo(()=>{if(!ef(P))return{};let e=P[dw.find(e=>F[e])];return e?{width:e,height:e,fontSize:e&&(s||p)?e/2:18}:{}},[F,P,s,p]),L=O(`avatar`,n),R=ap(L),[z,B]=xw(L,R),V=Y({[`${L}-lg`]:P===`large`,[`${L}-sm`]:P===`small`}),H=S.isValidElement(a),U=Y(L,V,k,`${L}-${r||j?.shape||`circle`}`,{[`${L}-image`]:H||a&&C,[`${L}-icon`]:!!s},B,R,c,l,z),ee=Qd(P)?{width:P,height:P,fontSize:s?P/2:18}:{},te;if(typeof a==`string`&&C)te=S.createElement(`img`,{src:a,draggable:f,srcSet:o,onError:N,alt:d,crossOrigin:m});else if(H)te=a;else if(s)te=s;else if(b||v!==1){let e=`scale(${v})`,t={msTransform:e,WebkitTransform:e,transform:e};te=S.createElement(ia,{onResize:M},S.createElement(`span`,{className:`${L}-string`,ref:E,style:t},p))}else te=S.createElement(`span`,{className:`${L}-string`,style:{opacity:0},ref:E},p);return S.createElement(`span`,{..._,style:{...ee,...I,...A,...u},className:U,ref:D},te)}),Cw=e=>e?typeof e==`function`?e():e:null,ww=e=>{let{children:t,prefixCls:n,id:r,classNames:i,styles:a,className:o,style:s}=e;return S.createElement(`div`,{id:r,className:Y(`${n}-container`,i?.container,o),style:{...a?.container,...s},role:`tooltip`},typeof t==`function`?t():t)},Tw={shiftX:64,adjustY:1},Ew={adjustX:1,shiftY:!0},Dw=[0,0],Ow={left:{points:[`cr`,`cl`],overflow:Ew,offset:[-4,0],targetOffset:Dw},right:{points:[`cl`,`cr`],overflow:Ew,offset:[4,0],targetOffset:Dw},top:{points:[`bc`,`tc`],overflow:Tw,offset:[0,-4],targetOffset:Dw},bottom:{points:[`tc`,`bc`],overflow:Tw,offset:[0,4],targetOffset:Dw},topLeft:{points:[`bl`,`tl`],overflow:Tw,offset:[0,-4],targetOffset:Dw},leftTop:{points:[`tr`,`tl`],overflow:Ew,offset:[-4,0],targetOffset:Dw},topRight:{points:[`br`,`tr`],overflow:Tw,offset:[0,-4],targetOffset:Dw},rightTop:{points:[`tl`,`tr`],overflow:Ew,offset:[4,0],targetOffset:Dw},bottomRight:{points:[`tr`,`br`],overflow:Tw,offset:[0,4],targetOffset:Dw},rightBottom:{points:[`bl`,`br`],overflow:Ew,offset:[4,0],targetOffset:Dw},bottomLeft:{points:[`tl`,`bl`],overflow:Tw,offset:[0,4],targetOffset:Dw},leftBottom:{points:[`br`,`bl`],overflow:Ew,offset:[-4,0],targetOffset:Dw}};function kw(){return kw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{trigger:n=[`hover`],mouseEnterDelay:r=0,mouseLeaveDelay:i=.1,prefixCls:a=`rc-tooltip`,children:o,onVisibleChange:s,afterVisibleChange:c,motion:l,placement:u=`right`,align:d={},destroyOnHidden:f=!1,defaultVisible:p,getTooltipContainer:m,arrowContent:h,overlay:g,id:_,showArrow:v=!0,classNames:y,styles:b,...x}=e,C=Yn(_),w=(0,S.useRef)(null);(0,S.useImperativeHandle)(t,()=>w.current);let T={...x};`visible`in e&&(T.popupVisible=e.visible);let E=S.useMemo(()=>{if(!v)return!1;let e=v===!0?{}:v;return{...e,className:Y(e.className,y?.arrow),style:{...e.style,...b?.arrow},content:e.content??h}},[v,y?.arrow,b?.arrow,h]);return S.createElement(am,kw({popupClassName:y?.root,prefixCls:a,popup:S.createElement(ww,{key:`content`,prefixCls:a,id:C,classNames:y,styles:b},g),action:n,builtinPlacements:Ow,popupPlacement:u,ref:w,popupAlign:d,getPopupContainer:m,onOpenChange:s,afterOpenChange:c,popupMotion:l,defaultPopupVisible:p,autoDestroy:f,mouseLeaveDelay:i,popupStyle:b?.root,mouseEnterDelay:r,arrow:E,uniqueContainerClassName:y?.uniqueContainer,uniqueContainerStyle:b?.uniqueContainer},T),({open:e})=>{let t=S.Children.only(o),n={"aria-describedby":g&&e?C:void 0};return S.cloneElement(t,n)})});function jw(e){let{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,i=t/2,a=i,o=r*1/Math.sqrt(2),s=i-r*(1-1/Math.sqrt(2)),c=i-1/Math.sqrt(2)*n,l=r*(Math.sqrt(2)-1)+1/Math.sqrt(2)*n,u=2*i-c,d=l,f=2*i-o,p=s,m=2*i-0,h=a,g=i*Math.sqrt(2)+r*(Math.sqrt(2)-2),_=r*(Math.sqrt(2)-1),v=`polygon(${_}px 100%, 50% ${_}px, ${2*i-_}px 100%, ${_}px 100%)`;return{arrowShadowWidth:g,arrowPath:`path('M 0 ${a} A ${r} ${r} 0 0 0 ${o} ${s} L ${c} ${l} A ${n} ${n} 0 0 1 ${u} ${d} L ${f} ${p} A ${r} ${r} 0 0 0 ${m} ${h} Z')`,arrowPolygon:v}}var Mw=(e,t,n)=>{let{sizePopupArrow:r,arrowPolygon:i,arrowPath:a,arrowShadowWidth:o,borderRadiusXS:s,calc:c}=e;return{pointerEvents:`none`,width:r,height:r,overflow:`hidden`,"&::before":{position:`absolute`,bottom:0,insetInlineStart:0,width:r,height:c(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[i,a]},content:`""`},"&::after":{content:`""`,position:`absolute`,width:o,height:o,bottom:0,insetInline:0,margin:`auto`,borderRadius:{_skip_check_:!0,value:`0 0 ${X(s)} 0`},transform:`translateY(50%) rotate(-135deg)`,boxShadow:n,zIndex:0,background:`transparent`}}};function Nw(e){let{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?8:r}}function Pw(e,t){return e?t:{}}var Fw=(e,t,n)=>{let{componentCls:r,boxShadowPopoverArrow:i,arrowOffsetVertical:a,arrowOffsetHorizontal:o,antCls:s}=e,[c]=$l(s,`tooltip`),{arrowDistance:l=0,arrowPlacement:u={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:{[`${r}-arrow`]:[{position:`absolute`,zIndex:1,display:`block`,...Mw(e,t,i),"&:before":{background:t}}],...Pw(!!u.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(`,`)]:{bottom:l,transform:`translateY(100%) rotate(180deg)`},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:`50%`},transform:`translateX(-50%) translateY(100%) rotate(180deg)`},"&-placement-topLeft":{[c(`arrow-offset-x`)]:o,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:o}}},"&-placement-topRight":{[c(`arrow-offset-x`)]:`calc(100% - ${X(o)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:o}}}}),...Pw(!!u.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(`,`)]:{top:l,transform:`translateY(-100%)`},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:`50%`},transform:`translateX(-50%) translateY(-100%)`},"&-placement-bottomLeft":{[c(`arrow-offset-x`)]:o,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:o}}},"&-placement-bottomRight":{[c(`arrow-offset-x`)]:`calc(100% - ${X(o)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:o}}}}),...Pw(!!u.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(`,`)]:{right:{_skip_check_:!0,value:l},transform:`translateX(100%) rotate(90deg)`},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:`50%`},transform:`translateY(-50%) translateX(100%) rotate(90deg)`},[`&-placement-leftTop > ${r}-arrow`]:{top:a},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:a}}),...Pw(!!u.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(`,`)]:{left:{_skip_check_:!0,value:l},transform:`translateX(-100%) rotate(-90deg)`},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:`50%`},transform:`translateY(-50%) translateX(-100%) rotate(-90deg)`},[`&-placement-rightTop > ${r}-arrow`]:{top:a},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:a}})}}};function Iw(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};let i=ef(r)?r:{},a={};switch(e){case`top`:case`bottom`:a.shiftX=t.arrowOffsetHorizontal*2+n,a.shiftY=!0,a.adjustY=!0;break;case`left`:case`right`:a.shiftY=t.arrowOffsetVertical*2+n,a.shiftX=!0,a.adjustX=!0;break}let o={...a,...i};return o.shiftX||(o.adjustX=!0),o.shiftY||(o.adjustY=!0),o}var Lw={left:{points:[`cr`,`cl`]},right:{points:[`cl`,`cr`]},top:{points:[`bc`,`tc`]},bottom:{points:[`tc`,`bc`]},topLeft:{points:[`bl`,`tl`]},leftTop:{points:[`tr`,`tl`]},topRight:{points:[`br`,`tr`]},rightTop:{points:[`tl`,`tr`]},bottomRight:{points:[`tr`,`br`]},rightBottom:{points:[`bl`,`br`]},bottomLeft:{points:[`tl`,`bl`]},leftBottom:{points:[`br`,`bl`]}},Rw={topLeft:{points:[`bl`,`tc`]},leftTop:{points:[`tr`,`cl`]},topRight:{points:[`br`,`tc`]},rightTop:{points:[`tl`,`cr`]},bottomRight:{points:[`tr`,`bc`]},rightBottom:{points:[`bl`,`cr`]},bottomLeft:{points:[`tl`,`bc`]},leftBottom:{points:[`br`,`cl`]}},zw=new Set([`topLeft`,`topRight`,`bottomLeft`,`bottomRight`,`leftTop`,`leftBottom`,`rightTop`,`rightBottom`]);function Bw(e){let{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:i,borderRadius:a,visibleFirst:o}=e,s=t/2,c={},l=Nw({contentRadius:a,limitVerticalRadius:!0});return Object.keys(Lw).forEach(e=>{let a={...r&&Rw[e]||Lw[e],offset:[0,0],dynamicInset:!0};switch(c[e]=a,zw.has(e)&&(a.autoArrow=!1),e){case`top`:case`topLeft`:case`topRight`:a.offset[1]=-s-i;break;case`bottom`:case`bottomLeft`:case`bottomRight`:a.offset[1]=s+i;break;case`left`:case`leftTop`:case`leftBottom`:a.offset[0]=-s-i;break;case`right`:case`rightTop`:case`rightBottom`:a.offset[0]=s+i;break}if(r)switch(e){case`topLeft`:case`bottomLeft`:a.offset[0]=-l.arrowOffsetHorizontal-s;break;case`topRight`:case`bottomRight`:a.offset[0]=l.arrowOffsetHorizontal+s;break;case`leftTop`:case`rightTop`:a.offset[1]=-l.arrowOffsetHorizontal*2+s;break;case`leftBottom`:case`rightBottom`:a.offset[1]=l.arrowOffsetHorizontal*2-s;break}a.overflow=Iw(e,l,t,n),o&&(a.htmlRegion=`visibleFirst`)}),c}var Vw=S.createContext(!1),Hw=(e,t)=>{let n=e=>typeof e==`boolean`?{show:e}:e||{};return S.useMemo(()=>{let r=n(e),i=n(t);return{...i,...r,show:r.show??i.show??!0}},[e,t])},Uw=`50%`,Ww=e=>{let{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:i,tooltipBg:a,tooltipBorderRadius:o,zIndexPopup:s,controlHeight:c,boxShadowSecondary:l,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:p,antCls:m}=e,[h,g]=$l(m,`tooltip`),_=t(o).add(p).add(f).equal(),v={minWidth:t(o).mul(2).add(p).equal(),minHeight:c,padding:`${X(e.calc(u).div(2).equal())} ${X(d)}`,color:g(`overlay-color`,i),textAlign:`start`,textDecoration:`none`,wordWrap:`break-word`,backgroundColor:a,borderRadius:o,boxShadow:l,boxSizing:`border-box`},y={[h(`valid-offset-x`)]:g(`arrow-offset-x`,`var(--arrow-x)`),transformOrigin:[g(`valid-offset-x`,Uw),`var(--arrow-y, ${Uw})`].join(` `)};return[{[n]:{...Vl(e),position:`absolute`,zIndex:s,display:`block`,width:`max-content`,maxWidth:r,visibility:`visible`,...y,"&-hidden":{display:`none`},[h(`arrow-background-color`)]:a,[`${n}-container`]:[v,$h(e,!0)],[`&:has(~ ${n}-unique-container)`]:{[`${n}-container`]:{border:`none`,background:`transparent`,boxShadow:`none`}},[[`&-placement-topLeft`,`&-placement-topRight`,`&-placement-bottomLeft`,`&-placement-bottomRight`].join(`,`)]:{minWidth:_},[[`&-placement-left`,`&-placement-leftTop`,`&-placement-leftBottom`,`&-placement-right`,`&-placement-rightTop`,`&-placement-rightBottom`].join(`,`)]:{[`${n}-inner`]:{borderRadius:e.min(o,8)}},[`${n}-content`]:{position:`relative`},...eu(e,(e,{darkColor:t})=>({[`&${n}-${e}`]:{[`${n}-container`]:{backgroundColor:t},[`${n}-arrow`]:{[h(`arrow-background-color`)]:t}}})),"&-rtl":{direction:`rtl`}}},Fw(e,g(`arrow-background-color`)),{[`${n}-pure`]:{position:`relative`,maxWidth:`none`,margin:e.sizePopupArrow}},{[`${n}-unique-container`]:{...v,...y,position:`absolute`,zIndex:t(s).sub(1).equal(),"&-hidden":{display:`none`},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},Gw=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...Nw({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...jw(lc(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),Kw=(e,t,n=!0)=>Xl(`Tooltip`,e=>{let{borderRadius:t,colorTextLightSolid:n,colorBgSpotlight:r,maxWidth:i}=e;return[Ww(lc(e,{tooltipMaxWidth:i,tooltipColor:n,tooltipBorderRadius:t,tooltipBg:r})),Mg(e,`zoom-big-fast`)]},Gw,{resetStyle:!1,injectStyle:n})(e,t),qw=bc.map(e=>`${e}-inverse`),Jw=[`success`,`processing`,`error`,`default`,`warning`];function Yw(e,t=!0){return t?[].concat(da(qw),da(bc)).includes(e):bc.includes(e)}function Xw(e){return Jw.includes(e)}var Zw=(e,t,n)=>{let r=Yw(n),[i]=$l(e,`tooltip`),a=Y({[`${t}-${n}`]:n&&r}),o={},s={},c=see(n).toRgb(),l=(.299*c.r+.587*c.g+.114*c.b)/255<.5?`#FFF`:`#000`;return n&&!r&&(o.background=n,o[i(`overlay-color`)]=l,s[i(`arrow-background-color`)]=n),{className:a,overlayStyle:o,arrowStyle:s}},Qw=e=>{let{prefixCls:t,className:n,placement:r=`top`,title:i,color:a,overlayInnerStyle:o,classNames:s,styles:c}=e,{getPrefixCls:l}=S.useContext(ma),u=l(`tooltip`,t),d=l(),f=ap(u),[p,m]=Kw(u,f),h=Zw(d,u,a),g=h.arrowStyle,_=S.useMemo(()=>({container:{...o,...h.overlayStyle}}),[o,h.overlayStyle]),v={...e,placement:r},[y,b]=xf([s],[_,c],{props:v}),x=Y(f,p,m,u,`${u}-pure`,`${u}-placement-${r}`,n,h.className);return S.createElement(`div`,{className:x,style:g},S.createElement(`div`,{className:`${u}-arrow`}),S.createElement(ww,{...e,className:p,prefixCls:u,classNames:y,styles:b},i))},$w=S.forwardRef((e,t)=>{let{prefixCls:n,openClassName:r,getTooltipContainer:i,color:a,children:o,afterOpenChange:s,arrow:c,destroyTooltipOnHide:l,destroyOnHidden:u,title:d,overlay:f,trigger:p,builtinPlacements:m,autoAdjustOverflow:h=!0,motion:g,getPopupContainer:_,placement:v=`top`,mouseEnterDelay:y=.1,mouseLeaveDelay:b=.1,rootClassName:x,styles:C,classNames:w,onOpenChange:T,overlayInnerStyle:E,overlayStyle:D,overlayClassName:O,...k}=e,[,A]=zl(),j=e[`data-popover-inject`],{getPopupContainer:M,getPrefixCls:N,direction:P,...F}=_a(`tooltip`),{className:I,style:L,classNames:R,styles:z,arrow:B,trigger:V}=j?{}:F,H=Hw(c,B),U=H.show,ee=p||V||`hover`,te=_||M,ne=u??!!l,W=S.useContext(Vw);Ui(`Tooltip`);let re=S.useRef(null),G=()=>{re.current?.forceAlign()};S.useImperativeHandle(t,()=>({forceAlign:G,nativeElement:re.current?.nativeElement,popupElement:re.current?.popupElement}));let[K,q]=Wn(e.defaultOpen??!1,e.open),ie=!d&&!f&&d!==0,J=e=>{q(ie?!1:e),!ie&&T&&T(e)},ae=S.useMemo(()=>m||Bw({arrowPointAtCenter:H?.pointAtCenter??!1,autoAdjustOverflow:h,arrowWidth:U?A.sizePopupArrow:0,borderRadius:A.borderRadius,offset:A.marginXXS,visibleFirst:!0}),[H,m,A,U,h]),oe=S.useMemo(()=>d===0?d:f||d||``,[f,d]),se=S.createElement(Ry,{space:!0,form:!0},typeof oe==`function`?oe():oe),ce={...e,trigger:ee,builtinPlacements:ae,getPopupContainer:te,destroyOnHidden:ne},[le,ue]=xf([R,w],[z,C],{props:ce}),de=N(`tooltip`,n),fe=N(),pe=K;(!(`open`in e)&&ie||W)&&(pe=!1);let me=S.isValidElement(o)&&!om(o)?o:S.createElement(`span`,null,o),he=me.props,ge=!he.className||typeof he.className==`string`?Y(he.className,r||`${de}-open`):he.className,_e=ap(de),[ve,ye]=Kw(de,_e,!j),be=Zw(fe,de,a),xe=be.arrowStyle,Se=Y(_e,ve,ye),Ce=Y(O,{[`${de}-rtl`]:P===`rtl`},be.className,x,Se,I,le.root),[we,Te]=Ff(`Tooltip`,k.zIndex),Ee={...ue.container,...E,...be.overlayStyle},De=S.createElement(Aw,{unique:!0,...k,zIndex:we,showArrow:U,placement:v,mouseEnterDelay:y,mouseLeaveDelay:b,prefixCls:de,classNames:{root:Ce,container:le.container,arrow:le.arrow,uniqueContainer:Y(Se,le.container)},styles:{root:{...xe,...ue.root,...L,...D},container:Ee,uniqueContainer:Ee,arrow:ue.arrow},ref:re,overlay:se,visible:pe,onVisibleChange:J,afterVisibleChange:s,arrowContent:S.createElement(`span`,{className:`${de}-arrow-content`}),motion:{motionName:vh(fe,`zoom-big-fast`,typeof g?.motionName==`string`?g?.motionName:void 0),motionDeadline:1e3},trigger:ee,builtinPlacements:ae,getTooltipContainer:te,destroyOnHidden:ne},pe?cm(me,{className:ge}):me);return S.createElement(kf.Provider,{value:Te},De)});$w._InternalPanelDoNotUseOrYouWillBeFired=Qw,$w.UniqueProvider=fm;var eT=`50%`,tT=e=>{let{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:i,innerPadding:a,boxShadowSecondary:o,colorTextHeading:s,borderRadiusLG:c,zIndexPopup:l,titleMarginBottom:u,colorBgElevated:d,popoverBg:f,titleBorderBottom:p,innerContentPadding:m,titlePadding:h,antCls:g}=e,[_,v]=$l(g,`tooltip`);return[{[t]:{...Vl(e),position:`absolute`,top:0,left:{_skip_check_:!0,value:0},zIndex:l,fontWeight:`normal`,whiteSpace:`normal`,textAlign:`start`,cursor:`auto`,userSelect:`text`,[_(`valid-offset-x`)]:v(`arrow-offset-x`,`var(--arrow-x)`),transformOrigin:[v(`valid-offset-x`,eT),`var(--arrow-y, ${eT})`].join(` `),[_(`arrow-background-color`)]:d,width:`max-content`,maxWidth:`100vw`,"&-rtl":{direction:`rtl`},"&-hidden":{display:`none`},[`${t}-content`]:{position:`relative`},[`${t}-container`]:{backgroundColor:f,backgroundClip:`padding-box`,borderRadius:c,boxShadow:o,padding:a},[`${t}-title`]:{minWidth:r,marginBottom:u,color:s,fontWeight:i,borderBottom:p,padding:h},[`${t}-content`]:{color:n,padding:m}}},Fw(e,v(`arrow-background-color`)),{[`${t}-pure`]:{position:`relative`,maxWidth:`none`,margin:e.sizePopupArrow,display:`inline-block`}}]},nT=e=>{let{componentCls:t,antCls:n}=e,[r]=$l(n,`tooltip`);return{[t]:bc.map(n=>{let i=e[`${n}6`];return{[`&${t}-${n}`]:{[r(`arrow-background-color`)]:i,[`${t}-inner`]:{backgroundColor:i},[`${t}-arrow`]:{background:`transparent`}}}})}},rT=Xl(`Popover`,e=>{let{colorBgElevated:t,colorText:n}=e,r=lc(e,{popoverBg:t,popoverColor:n});return[tT(r),nT(r),Mg(r,`zoom-big`)]},e=>{let{lineWidth:t,controlHeight:n,fontHeight:r,padding:i,wireframe:a,zIndexPopupBase:o,borderRadiusLG:s,marginXS:c,lineType:l,colorSplit:u,paddingSM:d}=e,f=n-r,p=f/2,m=f/2-t,h=i;return{titleMinWidth:177,zIndexPopup:o+30,...jw(e),...Nw({contentRadius:s,limitVerticalRadius:!0}),innerPadding:a?0:12,titleMarginBottom:a?0:c,titlePadding:a?`${p}px ${h}px ${m}px`:0,titleBorderBottom:a?`${t}px ${l} ${u}`:`none`,innerContentPadding:a?`${d}px ${h}px`:0}},{resetStyle:!1,deprecatedTokens:[[`width`,`titleMinWidth`],[`minWidth`,`titleMinWidth`]]}),iT=e=>{let{title:t,content:n,prefixCls:r,classNames:i,styles:a}=e;return!t&&!n?null:S.createElement(S.Fragment,null,t&&S.createElement(`div`,{className:Y(`${r}-title`,i?.title),style:a?.title},t),n&&S.createElement(`div`,{className:Y(`${r}-content`,i?.content),style:a?.content},n))},aT=e=>{let{hashId:t,prefixCls:n,className:r,style:i,placement:a=`top`,title:o,content:s,children:c,classNames:l,styles:u}=e,d=Cw(o),f=Cw(s),p={...e,placement:a},[m,h]=xf([l],[u],{props:p}),g=Y(t,n,`${n}-pure`,`${n}-placement-${a}`,r);return S.createElement(`div`,{className:g,style:i},S.createElement(`div`,{className:`${n}-arrow`}),S.createElement(ww,{...e,className:t,prefixCls:n,classNames:m,styles:h},c||S.createElement(iT,{prefixCls:n,title:d,content:f,classNames:m,styles:h})))},oT=e=>{let{prefixCls:t,className:n,...r}=e,{getPrefixCls:i}=S.useContext(ma),a=i(`popover`,t),[o,s]=rT(a);return S.createElement(aT,{...r,prefixCls:a,hashId:o,className:Y(n,s)})},sT=S.forwardRef((e,t)=>{let{prefixCls:n,title:r,content:i,overlayClassName:a,placement:o=`top`,trigger:s,children:c,mouseEnterDelay:l=.1,mouseLeaveDelay:u=.1,onOpenChange:d,overlayStyle:f={},styles:p,classNames:m,motion:h,arrow:g,..._}=e,{getPrefixCls:v,className:y,style:b,classNames:x,styles:C,arrow:w,trigger:T}=_a(`popover`),E=v(`popover`,n),[D,O]=rT(E),k=v(),A=Hw(g,w),j=s||T||`hover`,M={...e,placement:o,trigger:j,mouseEnterDelay:l,mouseLeaveDelay:u,overlayStyle:f,styles:p,classNames:m},[N,P]=xf([x,m],[C,p],{props:M}),F=Y(a,D,O,y,N.root),[I,L]=Wn(e.defaultOpen??!1,e.open),R=e=>{L(e),d?.(e)},z=Cw(r),B=Cw(i);return S.createElement($w,{unique:!1,arrow:A,placement:o,trigger:j,mouseEnterDelay:l,mouseLeaveDelay:u,..._,prefixCls:E,classNames:{root:F,container:N.container,arrow:N.arrow},styles:{root:{...P.root,...b,...f},container:P.container,arrow:P.arrow},ref:t,open:I,onOpenChange:R,overlay:z||B?S.createElement(iT,{prefixCls:E,title:z,content:B,classNames:N,styles:P}):null,motion:{motionName:vh(k,`zoom-big`,typeof h?.motionName==`string`?h?.motionName:void 0)},"data-popover-inject":!0},c)});sT._InternalPanelDoNotUseOrYouWillBeFired=oT;var cT=e=>{let{size:t,shape:n}=S.useContext(vw),r=S.useMemo(()=>({size:e.size||t,shape:e.shape||n}),[e.size,e.shape,t,n]);return S.createElement(vw.Provider,{value:r},e.children)},lT=e=>{let{getPrefixCls:t,direction:n}=S.useContext(ma),{prefixCls:r,className:i,rootClassName:a,style:o,maxCount:s,maxStyle:c,size:l,shape:u,maxPopoverPlacement:d,maxPopoverTrigger:f,children:p,max:m}=e,h=t(`avatar`,r),g=`${h}-group`,_=ap(h),[v,y]=xw(h,_),b=Y(g,{[`${g}-rtl`]:n===`rtl`},y,_,i,a,v),x=Di(p).map((e,t)=>cm(e,{key:`avatar-key-${t}`})),C=m?.count||s,w=x.length;if(C&&C{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z`}}]},name:`left`,theme:`outlined`}}))());function fT(){return fT=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,fT({},e,{ref:t,icon:dT.default}))),{ESC:mT,TAB:Eee}=Zr;function Dee({visible:e,triggerRef:t,onVisibleChange:n,autoFocus:r,overlayRef:i}){let a=S.useRef(!1),o=()=>{e&&(t.current?.focus?.(),n?.(!1))},s=()=>i.current?.focus?(i.current.focus(),a.current=!0,!0):!1,c=e=>{switch(e.keyCode){case mT:o();break;case Eee:{let t=!1;a.current||(t=s()),t?e.preventDefault():o();break}}};S.useEffect(()=>e?(window.addEventListener(`keydown`,c),r&&Ei(s,3),()=>{window.removeEventListener(`keydown`,c),a.current=!1}):()=>{a.current=!1},[e])}var Oee=(0,S.forwardRef)((e,t)=>{let{overlay:n,arrow:r,prefixCls:i}=e,a=(0,S.useMemo)(()=>{let e;return e=typeof n==`function`?n():n,e},[n]),o=sr(t,fr(a));return S.createElement(S.Fragment,null,r&&S.createElement(`div`,{className:`${i}-arrow`}),S.cloneElement(a,{ref:lr(a)?o:void 0}))}),hT={adjustX:1,adjustY:1},gT=[0,0],kee={topLeft:{points:[`bl`,`tl`],overflow:hT,offset:[0,-4],targetOffset:gT},top:{points:[`bc`,`tc`],overflow:hT,offset:[0,-4],targetOffset:gT},topRight:{points:[`br`,`tr`],overflow:hT,offset:[0,-4],targetOffset:gT},bottomLeft:{points:[`tl`,`bl`],overflow:hT,offset:[0,4],targetOffset:gT},bottom:{points:[`tc`,`bc`],overflow:hT,offset:[0,4],targetOffset:gT},bottomRight:{points:[`tr`,`br`],overflow:hT,offset:[0,4],targetOffset:gT}};function _T(){return _T=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{arrow:n=!1,prefixCls:r=`rc-dropdown`,transitionName:i,animation:a,align:o,placement:s=`bottomLeft`,placements:c=kee,getPopupContainer:l,showAction:u,hideAction:d,overlayClassName:f,overlayStyle:p,visible:m,trigger:h=[`hover`],autoFocus:g,overlay:_,children:v,onVisibleChange:y,...b}=e,[x,C]=S.useState(),w=`visible`in e?m:x,T=a?`${r}-${a}`:i,E=S.useRef(null),D=S.useRef(null),O=S.useRef(null);S.useImperativeHandle(t,()=>E.current);let k=e=>{C(e),y?.(e)};Dee({visible:w,triggerRef:O,onVisibleChange:k,autoFocus:g,overlayRef:D});let A=t=>{let{onOverlayClick:n}=e;C(!1),n&&n(t)},j=()=>S.createElement(Oee,{ref:D,overlay:_,prefixCls:r,arrow:n}),M=()=>typeof _==`function`?j:j(),N=()=>{let{minOverlayWidthMatchTrigger:t,alignPoint:n}=e;return`minOverlayWidthMatchTrigger`in e?t:!n},P=S.cloneElement(v,{className:Y(v.props?.className,w&&(()=>{let{openClassName:t}=e;return t===void 0?`${r}-open`:t})()),ref:lr(v)?sr(O,fr(v)):void 0}),F=d;return!F&&h.indexOf(`contextMenu`)!==-1&&(F=[`click`]),S.createElement(am,_T({builtinPlacements:c},b,{prefixCls:r,ref:E,popupClassName:Y(f,{[`${r}-show-arrow`]:n}),popupStyle:p,action:h,showAction:u,hideAction:F,popupPlacement:s,popupAlign:o,popupMotion:{motionName:T},popupVisible:w,stretch:N()?`minWidth`:``,popup:M(),onOpenChange:k,onPopupClick:A,getPopupContainer:l}),P)}),yT=S.createContext(null);function bT(e,t){return`${e}-${t}`}function xT(e){return bT(S.useContext(yT),e)}var ST=S.createContext(null);function Aee(e,t){let n={...e};return Object.keys(t).forEach(e=>{let r=t[e];r!==void 0&&(n[e]=r)}),n}function CT({children:e,locked:t,...n}){let r=S.useContext(ST),i=Xn(()=>Aee(r,n),[r,n],(e,n)=>!t&&(e[0]!==n[0]||!di(e[1],n[1],!0)));return S.createElement(ST.Provider,{value:i},e)}var jee=[],wT=S.createContext(null);function TT(){return S.useContext(wT)}var ET=S.createContext(jee);function DT(e){let t=S.useContext(ET);return S.useMemo(()=>e===void 0?t:[...t,e],[t,e])}var OT=S.createContext(null),kT=S.createContext({}),{LEFT:AT,RIGHT:jT,UP:MT,DOWN:NT,ENTER:PT,ESC:FT,HOME:IT,END:LT}=Zr,RT=[MT,NT,AT,jT];function Mee(e,t,n,r){let i=`prev`,a=`next`,o=`children`,s=`parent`;if(e===`inline`&&r===PT)return{inlineTrigger:!0};let c={[MT]:i,[NT]:a},l={[AT]:n?a:i,[jT]:n?i:a,[NT]:o,[PT]:o},u={[MT]:i,[NT]:a,[PT]:o,[FT]:s,[AT]:n?o:s,[jT]:n?s:o};switch({inline:c,horizontal:l,vertical:u,inlineSub:c,horizontalSub:u,verticalSub:u}[`${e}${t?``:`Sub`}`]?.[r]){case i:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case s:return{offset:-1,sibling:!1};case o:return{offset:1,sibling:!1};default:return null}}function Nee(e){let t=e;for(;t;){if(t.getAttribute(`data-menu-list`))return t;t=t.parentElement}return null}function Pee(e,t){let n=e||document.activeElement;for(;n;){if(t.has(n))return n;n=n.parentElement}return null}function zT(e,t){return jr(e,!0).filter(e=>t.has(e))}function BT(e,t,n,r=1){if(!e)return null;let i=zT(e,t),a=i.length,o=i.findIndex(e=>n===e);return r<0?o===-1?o=a-1:--o:r>0&&(o+=1),o=(o+a)%a,i[o]}var VT=(e,t)=>{let n=new Set,r=new Map,i=new Map;return e.forEach(e=>{let a=document.querySelector(`[data-menu-id='${bT(t,e)}']`);a&&(n.add(a),i.set(a,e),r.set(e,a))}),{elements:n,key2element:r,element2key:i}};function HT(e,t,n,r,i,a,o,s,c,l){let u=S.useRef(),d=S.useRef();d.current=t;let f=()=>{Ei.cancel(u.current)};return S.useEffect(()=>()=>{f()},[]),p=>{let{which:m}=p;if([...RT,PT,FT,IT,LT].includes(m)){let l=a(),h=VT(l,r),{elements:g,key2element:_,element2key:v}=h,y=Pee(_.get(t),g),b=v.get(y),x=Mee(e,o(b,!0).length===1,n,m);if(!x&&m!==IT&&m!==LT)return;(RT.includes(m)||[IT,LT].includes(m))&&p.preventDefault();let S=e=>{if(e){let t=e,n=e.querySelector(`a`);n?.getAttribute(`href`)&&(t=n);let r=v.get(e);s(r),f(),u.current=Ei(()=>{d.current===r&&t.focus()})}};if([IT,LT].includes(m)||x.sibling||!y){let t;t=!y||e===`inline`?i.current:Nee(y);let n,r=zT(t,g);n=m===IT?r[0]:m===LT?r[r.length-1]:BT(t,g,y,x.offset),S(n)}else if(x.inlineTrigger)c(b);else if(x.offset>0)c(b,!0),f(),u.current=Ei(()=>{h=VT(l,r);let e=y.getAttribute(`aria-controls`);S(BT(document.getElementById(e),h.elements))},5);else if(x.offset<0){let e=o(b,!0),t=e[e.length-2],n=_.get(t);c(t,!1),S(n)}}l?.(p)}}function UT(e){Promise.resolve().then(e)}var WT=`__RC_UTIL_PATH_SPLIT__`,GT=e=>e.join(WT),KT=e=>e.split(WT),qT=`rc-menu-more`;function JT(){let[,e]=S.useState({}),t=(0,S.useRef)(new Map),n=(0,S.useRef)(new Map),[r,i]=S.useState([]),a=(0,S.useRef)(0),o=(0,S.useRef)(!1),s=()=>{o.current||e({})},c=(0,S.useCallback)((e,r)=>{let i=GT(r);n.current.set(i,e),t.current.set(e,i),a.current+=1;let o=a.current;UT(()=>{o===a.current&&s()})},[]),l=(0,S.useCallback)((e,r)=>{let i=GT(r);n.current.delete(i),t.current.delete(e)},[]),u=(0,S.useCallback)(e=>{i(e)},[]),d=(0,S.useCallback)((e,n)=>{let i=KT(t.current.get(e)||``);return n&&r.includes(i[0])&&i.unshift(qT),i},[r]),f=(0,S.useCallback)((e,t)=>e.filter(e=>e!==void 0).some(e=>d(e,!0).includes(t)),[d]),p=()=>{let e=[...t.current.keys()];return r.length&&e.push(qT),e},m=(0,S.useCallback)(e=>{let r=`${t.current.get(e)}${WT}`,i=new Set;return[...n.current.keys()].forEach(e=>{e.startsWith(r)&&i.add(n.current.get(e))}),i},[]);return S.useEffect(()=>()=>{o.current=!0},[]),{registerPath:c,unregisterPath:l,refreshOverflowKeys:u,isSubPathKey:f,getKeyPath:d,getKeys:p,getSubPathKeys:m}}function YT(e){let t=S.useRef(e);t.current=e;let n=S.useCallback((...e)=>t.current?.(...e),[]);return e?n:void 0}function XT(e,t,n,r){let{activeKey:i,onActive:a,onInactive:o}=S.useContext(ST),s={active:i===e};return t||(s.onMouseEnter=t=>{n?.({key:e,domEvent:t}),a(e)},s.onMouseLeave=t=>{r?.({key:e,domEvent:t}),o(e)}),s}function ZT(e){let{mode:t,rtl:n,inlineIndent:r}=S.useContext(ST);if(t!==`inline`)return null;let i=e;return n?{paddingRight:i*r}:{paddingLeft:i*r}}function QT({icon:e,props:t,children:n}){let r;return e===null||e===!1?null:(typeof e==`function`?r=S.createElement(e,{...t}):typeof e!=`boolean`&&(r=e),r||n||null)}function $T({item:e,...t}){return Object.defineProperty(t,`item`,{get:()=>(li(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function eE(){return eE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{style:n,className:r,eventKey:i,warnKey:a,disabled:o,itemIcon:s,children:c,role:l,onMouseEnter:u,onMouseLeave:d,onClick:f,onKeyDown:p,onFocus:m,...h}=e,g=xT(i),{prefixCls:_,onItemClick:v,disabled:y,overflowDisabled:b,itemIcon:x,selectedKeys:C,onActive:w}=S.useContext(ST),{_internalRenderMenuItem:T}=S.useContext(kT),E=`${_}-item`,D=S.useRef(),O=S.useRef(),k=y||o,A=cr(t,O),j=DT(i),M=e=>({key:i,keyPath:[...j].reverse(),item:D.current,domEvent:e}),N=s||x,{active:P,...F}=XT(i,k,u,d),I=C.includes(i),L=ZT(j.length),R=e=>{if(k)return;let t=M(e);f?.($T(t)),v(t)},z=e=>{if(p?.(e),e.which===Zr.ENTER){let t=M(e);f?.($T(t)),v(t)}},B=e=>{w(i),m?.(e)},V={};e.role===`option`&&(V[`aria-selected`]=I);let H=S.createElement(tE,eE({ref:D,elementRef:A,role:l===null?`none`:l||`menuitem`,tabIndex:o?null:-1,"data-menu-id":b&&g?null:g},hi(h,[`extra`]),F,V,{component:`li`,"aria-disabled":o,style:{...L,...n},className:Y(E,{[`${E}-active`]:P,[`${E}-selected`]:I,[`${E}-disabled`]:k},r),onClick:R,onKeyDown:z,onFocus:B}),c,S.createElement(QT,{props:{...e,isSelected:I},icon:N}));return T&&(H=T(H,e,{selected:I})),H});function rE(e,t){let{eventKey:n}=e,r=TT(),i=DT(n);return S.useEffect(()=>{if(r)return r.registerPath(n,i),()=>{r.unregisterPath(n,i)}},[i]),r?null:S.createElement(nE,eE({},e,{ref:t}))}var iE=S.forwardRef(rE);function aE(){return aE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:i,mode:a,rtl:o}=S.useContext(ST);return S.createElement(`ul`,aE({className:Y(i,o&&`${i}-rtl`,`${i}-sub`,`${i}-${a===`inline`?`inline`:`vertical`}`,e),role:`menu`},n,{"data-menu-list":!0,ref:r}),t)});function sE(e,t){return Di(e).map((e,n)=>{if(S.isValidElement(e)){let{key:r}=e,i=e.props?.eventKey??r;i??=`tmp_key-${[...t,n].join(`-`)}`;let a={key:i,eventKey:i};return S.cloneElement(e,a)}return e})}var cE={adjustX:1,adjustY:1},lE={topLeft:{points:[`bl`,`tl`],overflow:cE},topRight:{points:[`br`,`tr`],overflow:cE},bottomLeft:{points:[`tl`,`bl`],overflow:cE},bottomRight:{points:[`tr`,`br`],overflow:cE},leftTop:{points:[`tr`,`tl`],overflow:cE},leftBottom:{points:[`br`,`bl`],overflow:cE},rightTop:{points:[`tl`,`tr`],overflow:cE},rightBottom:{points:[`bl`,`br`],overflow:cE}},uE={topLeft:{points:[`bl`,`tl`],overflow:cE},topRight:{points:[`br`,`tr`],overflow:cE},bottomLeft:{points:[`tl`,`bl`],overflow:cE},bottomRight:{points:[`tr`,`br`],overflow:cE},rightTop:{points:[`tr`,`tl`],overflow:cE},rightBottom:{points:[`br`,`bl`],overflow:cE},leftTop:{points:[`tl`,`tr`],overflow:cE},leftBottom:{points:[`bl`,`br`],overflow:cE}};function dE(e,t,n){if(t)return t;if(n)return n[e]||n.other}var fE={horizontal:`bottomLeft`,vertical:`rightTop`,"vertical-left":`rightTop`,"vertical-right":`leftTop`};function pE({prefixCls:e,visible:t,children:n,popup:r,popupStyle:i,popupClassName:a,popupOffset:o,disabled:s,mode:c,onVisibleChange:l}){let{getPopupContainer:u,rtl:d,subMenuOpenDelay:f,subMenuCloseDelay:p,builtinPlacements:m,triggerSubMenuAction:h,forceSubMenuRender:g,rootClassName:_,motion:v,defaultMotions:y}=S.useContext(ST),[b,x]=S.useState(!1),C=d?{...uE,...m}:{...lE,...m},w=fE[c],T=dE(c,v,y),E=S.useRef(T);c!==`inline`&&(E.current=T);let D={...E.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},O=S.useRef();return S.useEffect(()=>(O.current=Ei(()=>{x(t)}),()=>{Ei.cancel(O.current)}),[t]),S.createElement(am,{prefixCls:e,popupClassName:Y(`${e}-popup`,{[`${e}-rtl`]:d},a,_),stretch:c===`horizontal`?`minWidth`:null,getPopupContainer:u,builtinPlacements:C,popupPlacement:w,popupVisible:b,popup:r,popupStyle:i,popupAlign:o&&{offset:o},action:s?[]:[h],mouseEnterDelay:f,mouseLeaveDelay:p,onPopupVisibleChange:l,forceRender:g,popupMotion:D,fresh:!0},n)}function mE(){return mE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current&&f(!1)},[l]);let m={...dE(i,s,c)};n.length>1&&(m.motionAppear=!1);let h=m.onVisibleChanged;return m.onVisibleChanged=e=>(!u.current&&!e&&f(!0),h?.(e)),d?null:S.createElement(CT,{mode:i,locked:!u.current},S.createElement(Ed,mE({visible:p},m,{forceRender:o,removeOnLeave:!1,leavedClassName:`${a}-hidden`}),({className:t,style:n})=>S.createElement(oE,{id:e,className:t,style:n},r)))}function gE(){return gE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{style:n,className:r,styles:i,classNames:a,title:o,eventKey:s,warnKey:c,disabled:l,internalPopupClose:u,children:d,itemIcon:f,expandIcon:p,popupClassName:m,popupOffset:h,popupStyle:g,onClick:_,onMouseEnter:v,onMouseLeave:y,onTitleClick:b,onTitleMouseEnter:x,onTitleMouseLeave:C,popupRender:w,...T}=e,E=xT(s),{prefixCls:D,mode:O,openKeys:k,disabled:A,overflowDisabled:j,activeKey:M,selectedKeys:N,itemIcon:P,expandIcon:F,onItemClick:I,onOpenChange:L,onActive:R,popupRender:z}=S.useContext(ST),{_internalRenderSubMenuItem:B}=S.useContext(kT),{isSubPathKey:V}=S.useContext(OT),H=DT(),U=`${D}-submenu`,ee=A||l,te=S.useRef(),ne=S.useRef(),W=f??P,re=p??F,G=k.includes(s),K=!j&&G,q=V(N,s),{active:ie,...J}=XT(s,ee,x,C),[ae,oe]=S.useState(!1),se=e=>{ee||oe(e)},ce=e=>{se(!0),v?.({key:s,domEvent:e})},le=e=>{se(!1),y?.({key:s,domEvent:e})},ue=S.useMemo(()=>ie||(O===`inline`?!1:ae||V([M],s)),[O,ie,M,ae,s,V]),de=ZT(H.length),fe=e=>{ee||(b?.({key:s,domEvent:e}),O===`inline`&&L(s,!G))},pe=YT(e=>{_?.($T(e)),I(e)}),me=e=>{O!==`inline`&&L(s,e)},he=()=>{R(s)},ge=E&&`${E}-popup`,_e=S.useMemo(()=>S.createElement(QT,{icon:O===`horizontal`?void 0:re,props:{...e,isOpen:K,isSubMenu:!0}},S.createElement(`i`,{className:`${U}-arrow`})),[O,re,e,K,U]),ve=S.createElement(`div`,gE({role:`menuitem`,style:de,className:`${U}-title`,tabIndex:ee?null:-1,ref:te,title:typeof o==`string`?o:null,"data-menu-id":j&&E?null:E,"aria-expanded":K,"aria-haspopup":!0,"aria-controls":ge,"aria-disabled":ee,onClick:fe,onFocus:he},J),o,_e),ye=S.useRef(O);O!==`inline`&&H.length>1?ye.current=`vertical`:ye.current=O;let be=ye.current,xe=S.useMemo(()=>{let t=S.createElement(CT,{classNames:a,styles:i,mode:be===`horizontal`?`vertical`:be},S.createElement(oE,{id:ge,ref:ne},d)),n=w||z;return n?n(t,{item:e,keys:H}):t},[w,z,H,ge,d,e,be]);if(!j){let e=ye.current;ve=S.createElement(pE,{mode:e,prefixCls:U,visible:!u&&K&&O!==`inline`,popupClassName:m,popupOffset:h,popupStyle:g,popup:xe,disabled:ee,onVisibleChange:me},ve)}let Se=S.createElement(vS.Item,gE({ref:t,role:`none`},T,{component:`li`,style:n,className:Y(U,`${U}-${O}`,r,{[`${U}-open`]:K,[`${U}-active`]:ue,[`${U}-selected`]:q,[`${U}-disabled`]:ee}),onMouseEnter:ce,onMouseLeave:le}),ve,!j&&S.createElement(hE,{id:ge,open:K,keyPath:H},d));return B&&(Se=B(Se,e,{selected:q,active:ue,open:K,disabled:ee})),S.createElement(CT,{classNames:a,styles:i,onItemClick:pe,mode:O===`horizontal`?`vertical`:O,itemIcon:W,expandIcon:re},Se)}),vE=S.forwardRef((e,t)=>{let{eventKey:n,children:r}=e,i=DT(n),a=sE(r,i),o=TT();S.useEffect(()=>{if(o)return o.registerPath(n,i),()=>{o.unregisterPath(n,i)}},[i]);let s;return s=o?a:S.createElement(_E,gE({ref:t},e),a),S.createElement(ET.Provider,{value:i},s)});function yE({className:e,style:t}){let{prefixCls:n}=S.useContext(ST);return TT()?null:S.createElement(`li`,{role:`separator`,className:Y(`${n}-item-divider`,e),style:t})}function bE(){return bE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:n,title:r,eventKey:i,children:a,...o}=e,{prefixCls:s,classNames:c,styles:l}=S.useContext(ST),u=`${s}-item-group`;return S.createElement(`li`,bE({ref:t,role:`presentation`},o,{onClick:e=>e.stopPropagation(),className:Y(u,n)}),S.createElement(`div`,{role:`presentation`,className:Y(`${u}-title`,c?.listTitle),style:l?.listTitle,title:typeof r==`string`?r:void 0},r),S.createElement(`ul`,{role:`group`,className:Y(`${u}-list`,c?.list),style:l?.list},a))}),SE=S.forwardRef((e,t)=>{let{eventKey:n,children:r}=e,i=sE(r,DT(n));return TT()?i:S.createElement(xE,bE({ref:t},hi(e,[`warnKey`])),i)});function CE(){return CE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(e&&typeof e==`object`){let{label:c,children:l,key:u,type:d,extra:f,...p}=e,m=u??`tmp-${s}`;return l||d===`group`?d===`group`?S.createElement(i,CE({key:m},p,{title:c}),wE(l,t,n)):S.createElement(a,CE({key:m},p,{title:c}),wE(l,t,n)):d===`divider`?S.createElement(o,CE({key:m},p)):S.createElement(r,CE({key:m},p,{extra:f}),c,(!!f||f===0)&&S.createElement(`span`,{className:`${n}-item-extra`},f))}return null}).filter(e=>e)}function TE(e,t,n,r,i){let a=e,o={divider:yE,item:iE,group:SE,submenu:vE,...r};return t&&(a=wE(t,o,i)),sE(a,n)}function EE(){return EE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n=`rc-menu`,rootClassName:r,style:i,className:a,styles:o,classNames:s,tabIndex:c=0,items:l,children:u,direction:d,id:f,mode:p=`vertical`,inlineCollapsed:m,disabled:h,disabledOverflow:g,subMenuOpenDelay:_=.1,subMenuCloseDelay:v=.1,forceSubMenuRender:y,defaultOpenKeys:b,openKeys:x,activeKey:C,defaultActiveFirst:w,selectable:T=!0,multiple:E=!1,defaultSelectedKeys:D,selectedKeys:O,onSelect:k,onDeselect:A,inlineIndent:j=24,motion:M,defaultMotions:N,triggerSubMenuAction:P=`hover`,builtinPlacements:F,itemIcon:I,expandIcon:L,overflowedIndicator:R=`...`,overflowedIndicatorPopupClassName:z,getPopupContainer:B,onClick:V,onOpenChange:H,onKeyDown:U,openAnimation:ee,openTransitionName:te,_internalRenderMenuItem:ne,_internalRenderSubMenuItem:W,_internalComponents:re,popupRender:G,...K}=e,[q,ie]=S.useMemo(()=>[TE(u,l,DE,re,n),TE(u,l,DE,{},n)],[u,l,re]),[J,ae]=S.useState(!1),oe=S.useRef(),se=Yn(f?`rc-menu-uuid-${f}`:`rc-menu-uuid`),ce=d===`rtl`,[le,ue]=Wn(b,x),de=le||DE,fe=(e,t=!1)=>{function n(){ue(e),H?.(e)}t?(0,zi.flushSync)(n):n()},[pe,me]=S.useState(de),he=S.useRef(!1),[ge,_e]=S.useMemo(()=>(p===`inline`||p===`vertical`)&&m?[`vertical`,m]:[p,!1],[p,m]),ve=ge===`inline`,[ye,be]=S.useState(ge),[xe,Se]=S.useState(_e);S.useEffect(()=>{be(ge),Se(_e),he.current&&(ve?ue(pe):fe(DE))},[ge,_e]);let[Ce,we]=S.useState(0),Te=Ce>=q.length-1||ye!==`horizontal`||g;S.useEffect(()=>{ve&&me(de)},[de]),S.useEffect(()=>(he.current=!0,()=>{he.current=!1}),[]);let{registerPath:Ee,unregisterPath:De,refreshOverflowKeys:Oe,isSubPathKey:ke,getKeyPath:Ae,getKeys:je,getSubPathKeys:Me}=JT(),Ne=S.useMemo(()=>({registerPath:Ee,unregisterPath:De}),[Ee,De]),Pe=S.useMemo(()=>({isSubPathKey:ke}),[ke]);S.useEffect(()=>{Oe(Te?DE:q.slice(Ce+1).map(e=>e.key))},[Ce,Te]);let[Fe,Ie]=Wn(C||w&&q[0]?.key,C),Le=YT(e=>{Ie(e)}),Re=YT(()=>{Ie(void 0)});(0,S.useImperativeHandle)(t,()=>({list:oe.current,focus:e=>{let t=je(),{elements:n,key2element:r,element2key:i}=VT(t,se),a=zT(oe.current,n),o;o=Fe&&t.includes(Fe)?Fe:a[0]?i.get(a[0]):q.find(e=>!e.props.disabled)?.key;let s=r.get(o);o&&s&&s?.focus?.(e)},findItem:({key:e})=>{let{key2element:t}=VT(je(),se);return t.get(e)||null}}));let[ze,Be]=Wn(D||[],O),Ve=S.useMemo(()=>Array.isArray(ze)?ze:ze==null?DE:[ze],[ze]),He=e=>{if(T){let{key:t}=e,n=Ve.includes(t),r;r=E?n?Ve.filter(e=>e!==t):[...Ve,t]:[t],Be(r);let i={...e,selectedKeys:r};n?A?.(i):k?.(i)}!E&&de.length&&ye!==`inline`&&fe(DE)},Ue=YT(e=>{V?.($T(e)),He(e)}),We=YT((e,t)=>{let n=de.filter(t=>t!==e);if(t)n.push(e);else if(ye!==`inline`){let t=Me(e);n=n.filter(e=>!t.has(e))}di(de,n,!0)||fe(n,!0)}),Ge=HT(ye,Fe,ce,se,oe,je,Ae,Ie,(e,t)=>{We(e,t??!de.includes(e))},U);S.useEffect(()=>{ae(!0)},[]);let Ke=S.useMemo(()=>({_internalRenderMenuItem:ne,_internalRenderSubMenuItem:W}),[ne,W]),qe=ye!==`horizontal`||g?q:q.map((e,t)=>S.createElement(CT,{key:e.key,overflowDisabled:t>Ce,classNames:s,styles:o},e)),Je=S.createElement(vS,EE({id:f,ref:oe,prefixCls:`${n}-overflow`,component:`ul`,itemComponent:iE,className:Y(n,`${n}-root`,`${n}-${ye}`,a,{[`${n}-inline-collapsed`]:xe,[`${n}-rtl`]:ce},r),dir:d,style:i,role:`menu`,tabIndex:c,data:qe,renderRawItem:e=>e,renderRawRest:e=>{let t=e.length,n=t?q.slice(-t):null;return S.createElement(vE,{eventKey:qT,title:R,disabled:Te,internalPopupClose:t===0,popupClassName:z},n)},maxCount:ye!==`horizontal`||g?vS.INVALIDATE:vS.RESPONSIVE,ssr:`full`,"data-menu-list":!0,onVisibleChange:e=>{we(e)},onKeyDown:Ge},K));return S.createElement(kT.Provider,{value:Ke},S.createElement(yT.Provider,{value:se},S.createElement(CT,{prefixCls:n,rootClassName:r,classNames:s,styles:o,mode:ye,openKeys:de,rtl:ce,disabled:h,motion:J?M:null,defaultMotions:J?N:null,activeKey:Fe,onActive:Le,onInactive:Re,selectedKeys:Ve,inlineIndent:j,subMenuOpenDelay:_,subMenuCloseDelay:v,forceSubMenuRender:y,builtinPlacements:F,triggerSubMenuAction:P,getPopupContainer:B,itemIcon:I,expandIcon:L,onItemClick:Ue,onOpenChange:We,popupRender:G},S.createElement(OT.Provider,{value:Pe},Je),S.createElement(`div`,{style:{display:`none`},"aria-hidden":!0},S.createElement(wT.Provider,{value:Ne},ie)))))});OE.Item=iE,OE.SubMenu=vE,OE.ItemGroup=SE,OE.Divider=yE;var kE=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z`}}]},name:`bars`,theme:`outlined`}}))());function AE(){return AE=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,AE({},e,{ref:t,icon:kE.default}))),ME=S.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),NE=e=>{let{antCls:t,componentCls:n,colorText:r,footerBg:i,headerHeight:a,headerPadding:o,headerColor:s,footerPadding:c,fontSize:l,bodyBg:u,headerBg:d}=e;return{[n]:{display:`flex`,flex:`auto`,flexDirection:`column`,minHeight:0,background:u,"&, *":{boxSizing:`border-box`},[`&${n}-has-sider`]:{flexDirection:`row`,[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:`0 0 auto`},"&-rtl":{direction:`rtl`}},[`${n}-header`]:{height:a,padding:o,color:s,lineHeight:X(a),background:d,[`${t}-menu`]:{lineHeight:`inherit`}},[`${n}-footer`]:{padding:c,color:r,fontSize:l,background:i},[`${n}-content`]:{flex:`auto`,color:r,minHeight:0}}},PE=e=>{let{colorBgLayout:t,controlHeight:n,controlHeightLG:r,colorText:i,controlHeightSM:a,marginXXS:o,colorTextLightSolid:s,colorBgContainer:c}=e,l=r*1.25;return{colorBgHeader:`#001529`,colorBgBody:t,colorBgTrigger:`#002140`,bodyBg:t,headerBg:`#001529`,headerHeight:n*2,headerPadding:`0 ${l}px`,headerColor:i,footerPadding:`${a}px ${l}px`,footerBg:t,siderBg:`#001529`,triggerHeight:r+o*2,triggerBg:`#002140`,triggerColor:s,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:c,lightTriggerBg:c,lightTriggerColor:i}},FE=[[`colorBgBody`,`bodyBg`],[`colorBgHeader`,`headerBg`],[`colorBgTrigger`,`triggerBg`]],IE=Xl(`Layout`,NE,PE,{deprecatedTokens:FE}),LE=Xl([`Layout`,`Sider`],e=>{let{componentCls:t,siderBg:n,motionDurationMid:r,motionDurationSlow:i,antCls:a,triggerHeight:o,triggerColor:s,triggerBg:c,headerHeight:l,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:f,lightSiderBg:p,lightTriggerColor:m,lightTriggerBg:h,bodyBg:g}=e;return{[t]:{position:`relative`,minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:o},"&-right":{order:1},[`${t}-children`]:{height:`100%`,marginTop:-.1,paddingTop:.1,[`${a}-menu${a}-menu-inline-collapsed`]:{width:`auto`}},[`&-zero-width ${t}-children`]:{overflow:`hidden`},[`${t}-trigger`]:{position:`fixed`,bottom:0,zIndex:1,height:o,color:s,lineHeight:X(o),textAlign:`center`,background:c,cursor:`pointer`,transition:`all ${r}`},[`${t}-zero-width-trigger`]:{position:`absolute`,top:l,insetInlineEnd:e.calc(u).mul(-1).equal(),zIndex:1,width:u,height:d,color:s,fontSize:e.fontSizeXL,display:`flex`,alignItems:`center`,justifyContent:`center`,background:n,borderRadius:`0 ${X(f)} ${X(f)} 0`,cursor:`pointer`,transition:`background-color ${i} ease`,"&::after":{position:`absolute`,inset:0,background:`transparent`,transition:`all ${i}`,content:`""`},"&:hover::after":{background:`rgba(255, 255, 255, 0.2)`},"&-right":{insetInlineStart:e.calc(u).mul(-1).equal(),borderRadius:`${X(f)} 0 0 ${X(f)}`}},"&-light":{background:p,[`${t}-trigger`]:{color:m,background:h},[`${t}-zero-width-trigger`]:{color:m,background:h,border:`1px solid ${g}`,borderInlineStart:0}}}}},PE,{deprecatedTokens:FE}),RE={xs:`479.98px`,sm:`575.98px`,md:`767.98px`,lg:`991.98px`,xl:`1199.98px`,xxl:`1599.98px`,xxxl:`1839.98px`},zE=e=>!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),BE=S.createContext({}),VE=(()=>{let e=0;return(t=``)=>(e+=1,`${t}${e}`)})(),HE=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,trigger:i,children:a,defaultCollapsed:o=!1,theme:s=`dark`,style:c={},collapsible:l=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:f=80,zeroWidthTriggerStyle:p,breakpoint:m,onCollapse:h,onBreakpoint:g,..._}=e,{siderHook:v}=(0,S.useContext)(ME),[y,b]=(0,S.useState)(`collapsed`in e?e.collapsed:o),[x,C]=(0,S.useState)(!1);(0,S.useEffect)(()=>{`collapsed`in e&&b(e.collapsed)},[e.collapsed]);let w=(t,n)=>{`collapsed`in e||b(t),h?.(t,n)},{getPrefixCls:T,direction:E}=(0,S.useContext)(ma),D=T(`layout-sider`,n),[O,k]=LE(D),A=(0,S.useRef)(null);A.current=e=>{C(e.matches),g?.(e.matches),y!==e.matches&&w(e.matches,`responsive`)},(0,S.useEffect)(()=>{function e(e){return A.current?.(e)}let t;return window?.matchMedia!==void 0&&m&&m in RE&&(t=window.matchMedia(`screen and (max-width: ${RE[m]})`),typeof t?.addEventListener==`function`&&t.addEventListener(`change`,e),e(t)),()=>{typeof t?.removeEventListener==`function`&&t.removeEventListener(`change`,e)}},[m]),(0,S.useEffect)(()=>{let e=VE(`ant-sider-`);return v.addSider(e),()=>v.removeSider(e)},[]);let j=()=>{w(!y,`clickTrigger`)},M=hi(_,[`collapsed`]),N=y?f:d,P=zE(N)?`${N}px`:String(N),F=Number.parseFloat(String(f||0))===0?S.createElement(`span`,{onClick:j,className:Y(`${D}-zero-width-trigger`,`${D}-zero-width-trigger-${u?`right`:`left`}`),style:p},i||S.createElement(jE,null)):null,I=E===`rtl`==!u,L={expanded:I?S.createElement(Ug,null):S.createElement(pT,null),collapsed:I?S.createElement(pT,null):S.createElement(Ug,null)}[y?`collapsed`:`expanded`],R=i===null?null:F||S.createElement(`div`,{className:`${D}-trigger`,onClick:j,style:{width:P}},i||L),z={...c,flex:`0 0 ${P}`,maxWidth:P,minWidth:P,width:P},B=Y(D,`${D}-${s}`,{[`${D}-collapsed`]:!!y,[`${D}-has-trigger`]:l&&i!==null&&!F,[`${D}-below`]:!!x,[`${D}-zero-width`]:Number.parseFloat(P)===0},r,O,k),V=S.useMemo(()=>({siderCollapsed:y}),[y]);return S.createElement(BE.Provider,{value:V},S.createElement(`aside`,{className:B,...M,style:z,ref:t},S.createElement(`div`,{className:`${D}-children`},a),l||x&&F?R:null))}),UE=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z`}}]},name:`ellipsis`,theme:`outlined`}}))());function WE(){return WE=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,WE({},e,{ref:t,icon:UE.default}))),KE=(0,S.createContext)({prefixCls:``,firstLevel:!0,inlineCollapsed:!1,styles:null,classNames:null}),qE=e=>{let{prefixCls:t,className:n,dashed:r,...i}=e,{getPrefixCls:a}=S.useContext(ma),o=Y({[`${a(`menu`,t)}-item-divider-dashed`]:!!r},n);return S.createElement(yE,{className:o,...i})},JE=e=>{let{className:t,children:n,icon:r,title:i,danger:a,extra:o}=e,{prefixCls:s,firstLevel:c,direction:l,disableMenuItemTitleTooltip:u,tooltip:d,inlineCollapsed:f,styles:p,classNames:m}=S.useContext(KE),h=e=>{let t=n?.[0],i=S.createElement(`span`,{className:Y(`${s}-title-content`,c?m?.itemContent:m?.subMenu?.itemContent,{[`${s}-title-content-with-extra`]:!!o||o===0}),style:c?p?.itemContent:p?.subMenu?.itemContent},n);return(!r||S.isValidElement(n)&&n.type===`span`)&&n&&e&&c&&typeof t==`string`?S.createElement(`div`,{className:`${s}-inline-collapsed-noicon`},t.charAt(0)):i},{siderCollapsed:g}=S.useContext(BE),_=i;i===void 0?_=c?n:``:i===!1&&(_=``);let v=d===!1?void 0:d,y=v&&v.title!==void 0?v.title:_,b={...v??null,title:y};!g&&!f&&(b.title=null,b.open=!1);let x=Di(n).length,C=S.createElement(iE,{...hi(e,[`title`,`icon`,`danger`]),className:Y(c?m?.item:m?.subMenu?.item,{[`${s}-item-danger`]:a,[`${s}-item-only-child`]:(r?x+1:x)===1},t),style:{...c?p?.item:p?.subMenu?.item,...e.style},title:typeof i==`string`?i:void 0},cm(r,e=>({className:Y(`${s}-item-icon`,c?m?.itemIcon:m?.subMenu?.itemIcon,e.className),style:{...c?p?.itemIcon:p?.subMenu?.itemIcon,...e.style}})),h(f));if(!u&&d!==!1){let e=v&&v.placement?v.placement:l===`rtl`?`left`:`right`,t=`${s}-inline-collapsed-tooltip`,n=e=>({...e,root:Y(t,e?.root)}),r=v&&typeof v.classNames==`function`?e=>n(v.classNames(e)):n(v?.classNames);C=S.createElement($w,{...b,placement:e,classNames:r},C)}return C},YE=S.createContext(null),XE=S.forwardRef((e,t)=>{let{children:n,...r}=e,i=S.useContext(YE),a=S.useMemo(()=>({...i,...r}),[i,r.prefixCls,r.mode,r.selectable,r.rootClassName]),o=dr(n),s=cr(t,o?fr(n):null);return S.createElement(YE.Provider,{value:a},S.createElement(Ry,{space:!0},o?S.cloneElement(n,{ref:s}):n))}),ZE=e=>{let{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:i,lineWidth:a,lineType:o,itemPaddingInline:s}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${X(a)} ${o} ${i}`,boxShadow:`none`,"&::after":{display:`block`,clear:`both`,height:0,content:`"\\20"`},[`${t}-item, ${t}-submenu`]:{position:`relative`,display:`inline-block`,verticalAlign:`bottom`,paddingInline:s},[`> ${t}-item:hover, > ${t}-item-active, - > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:`transparent`},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color`,`background-color`].map(e=>`${e} ${n}`).join(`,`)},[`${t}-submenu-arrow`]:{display:`none`}}}},eD=({componentCls:e,menuArrowOffset:t,calc:n})=>({[`${e}-rtl`]:{direction:`rtl`},[`${e}-submenu-rtl`]:{transformOrigin:`100% 0`},[`${e}-rtl${e}-vertical, - ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${X(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${X(t)})`}}}}),tD=e=>Wl(e),nD=(e,t)=>{let{componentCls:n,itemColor:r,itemSelectedColor:i,subMenuItemSelectedColor:a,groupTitleColor:o,itemBg:s,subMenuItemBg:c,itemSelectedBg:l,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:f,motionDurationSlow:p,motionEaseInOut:m,motionEaseOut:h,itemPaddingInline:g,motionDurationMid:_,itemHoverColor:v,lineType:y,colorSplit:b,itemDisabledColor:x,dangerItemColor:S,dangerItemHoverColor:C,dangerItemSelectedColor:w,dangerItemActiveBg:T,dangerItemSelectedBg:E,popupBg:D,itemHoverBg:O,itemActiveBg:k,menuSubMenuBg:A,horizontalItemSelectedColor:j,horizontalItemSelectedBg:M,horizontalItemBorderRadius:N,horizontalItemHoverBg:P}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:s,[`&${n}-root:focus-visible`]:{...tD(e)},[`${n}-item`]:{"&-group-title, &-extra":{color:o}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:a},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:{...tD(e)}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${x} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:v}},[`${n}-submenu:not(${n}-submenu-selected)`]:{[`> ${n}-submenu-title:hover`]:{color:v}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:k}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:k}}},[`${n}-item-danger`]:{color:S,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:C}},[`&${n}-item:active`]:{background:T}},[`${n}-item a`]:{"&, &:hover":{color:`inherit`}},[`${n}-item-selected`]:{color:i,[`&${n}-item-danger`]:{color:w},"a, a:hover":{color:`inherit`}},[`& ${n}-item-selected`]:{backgroundColor:l,[`&${n}-item-danger`]:{backgroundColor:E}},[`&${n}-submenu > ${n}`]:{backgroundColor:A},[`&${n}-popup > ${n}`]:{backgroundColor:D},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:D},[`&${n}-horizontal`]:{...t===`dark`?{borderBottom:0}:{},[`> ${n}-item, > ${n}-submenu`]:{top:f,marginTop:e.calc(f).mul(-1).equal(),marginBottom:0,borderRadius:N,"&::after":{position:`absolute`,insetInline:g,bottom:0,borderBottom:`${X(u)} solid transparent`,transition:`border-color ${p} ${m}`,content:`""`},"&:hover, &-active, &-open":{background:P,"&::after":{borderBottomWidth:u,borderBottomColor:j}},"&-selected":{color:j,backgroundColor:M,"&:hover":{backgroundColor:M},"&::after":{borderBottomWidth:u,borderBottomColor:j}}}},[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${X(f)} ${y} ${b}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:c},[`${n}-item`]:{position:`relative`,"&::after":{position:`absolute`,insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${X(d)} solid ${i}`,transform:`scaleY(0.0001)`,opacity:0,transition:[`transform`,`opacity`].map(e=>`${e} ${_} ${h}`).join(`,`),content:`""`},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:w}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:`scaleY(1)`,opacity:1,transition:[`transform`,`opacity`].map(e=>`${e} ${_} ${m}`).join(`,`)}}}}}},rD=e=>{let{componentCls:t,itemHeight:n,itemMarginInline:r,padding:i,menuArrowSize:a,marginXS:o,itemMarginBlock:s,itemWidth:c,itemPaddingInline:l}=e,u=e.calc(a).add(i).add(o).equal();return{[`${t}-item`]:{position:`relative`,overflow:`hidden`},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:X(n),paddingInline:l,overflow:`hidden`,textOverflow:`ellipsis`,marginInline:r,marginBlock:s,width:c},[`> ${t}-item, + > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:`transparent`},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color`,`background-color`].map(e=>`${e} ${n}`).join(`,`)},[`${t}-submenu-arrow`]:{display:`none`}}}},QE=({componentCls:e,menuArrowOffset:t,calc:n})=>({[`${e}-rtl`]:{direction:`rtl`},[`${e}-submenu-rtl`]:{transformOrigin:`100% 0`},[`${e}-rtl${e}-vertical, + ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${X(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${X(t)})`}}}}),$E=e=>Wl(e),eD=(e,t)=>{let{componentCls:n,itemColor:r,itemSelectedColor:i,subMenuItemSelectedColor:a,groupTitleColor:o,itemBg:s,subMenuItemBg:c,itemSelectedBg:l,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:f,motionDurationSlow:p,motionEaseInOut:m,motionEaseOut:h,itemPaddingInline:g,motionDurationMid:_,itemHoverColor:v,lineType:y,colorSplit:b,itemDisabledColor:x,dangerItemColor:S,dangerItemHoverColor:C,dangerItemSelectedColor:w,dangerItemActiveBg:T,dangerItemSelectedBg:E,popupBg:D,itemHoverBg:O,itemActiveBg:k,menuSubMenuBg:A,horizontalItemSelectedColor:j,horizontalItemSelectedBg:M,horizontalItemBorderRadius:N,horizontalItemHoverBg:P}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:s,[`&${n}-root:focus-visible`]:{...$E(e)},[`${n}-item`]:{"&-group-title, &-extra":{color:o}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:a},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:{...$E(e)}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${x} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:v}},[`${n}-submenu:not(${n}-submenu-selected)`]:{[`> ${n}-submenu-title:hover`]:{color:v}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:k}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:k}}},[`${n}-item-danger`]:{color:S,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:C}},[`&${n}-item:active`]:{background:T}},[`${n}-item a`]:{"&, &:hover":{color:`inherit`}},[`${n}-item-selected`]:{color:i,[`&${n}-item-danger`]:{color:w},"a, a:hover":{color:`inherit`}},[`& ${n}-item-selected`]:{backgroundColor:l,[`&${n}-item-danger`]:{backgroundColor:E}},[`&${n}-submenu > ${n}`]:{backgroundColor:A},[`&${n}-popup > ${n}`]:{backgroundColor:D},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:D},[`&${n}-horizontal`]:{...t===`dark`?{borderBottom:0}:{},[`> ${n}-item, > ${n}-submenu`]:{top:f,marginTop:e.calc(f).mul(-1).equal(),marginBottom:0,borderRadius:N,"&::after":{position:`absolute`,insetInline:g,bottom:0,borderBottom:`${X(u)} solid transparent`,transition:`border-color ${p} ${m}`,content:`""`},"&:hover, &-active, &-open":{background:P,"&::after":{borderBottomWidth:u,borderBottomColor:j}},"&-selected":{color:j,backgroundColor:M,"&:hover":{backgroundColor:M},"&::after":{borderBottomWidth:u,borderBottomColor:j}}}},[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${X(f)} ${y} ${b}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:c},[`${n}-item`]:{position:`relative`,"&::after":{position:`absolute`,insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${X(d)} solid ${i}`,transform:`scaleY(0.0001)`,opacity:0,transition:[`transform`,`opacity`].map(e=>`${e} ${_} ${h}`).join(`,`),content:`""`},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:w}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:`scaleY(1)`,opacity:1,transition:[`transform`,`opacity`].map(e=>`${e} ${_} ${m}`).join(`,`)}}}}}},tD=e=>{let{componentCls:t,itemHeight:n,itemMarginInline:r,padding:i,menuArrowSize:a,marginXS:o,itemMarginBlock:s,itemWidth:c,itemPaddingInline:l}=e,u=e.calc(a).add(i).add(o).equal();return{[`${t}-item`]:{position:`relative`,overflow:`hidden`},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:X(n),paddingInline:l,overflow:`hidden`,textOverflow:`ellipsis`,marginInline:r,marginBlock:s,width:c},[`> ${t}-item, > ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:X(n)},[`${t}-item-group-list ${t}-submenu-title, - ${t}-submenu-title`]:{paddingInlineEnd:u}}},iD=e=>{let{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:i,dropdownWidth:a,controlHeightLG:o,motionEaseOut:s,paddingXL:c,itemMarginInline:l,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:f,paddingXS:p,boxShadowSecondary:m,collapsedWidth:h,collapsedIconSize:g}=e,_={height:r,lineHeight:X(r),listStylePosition:`inside`,listStyleType:`disc`};return[{[t]:{"&-inline, &-vertical":{[`&${t}-root`]:{boxShadow:`none`},...rD(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...rD(e),boxShadow:m}}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:a,maxHeight:`calc(100vh - ${X(e.calc(o).mul(2.5).equal())})`,padding:`0`,overflow:`hidden`,borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:`hidden`,overflowY:`auto`}}},{[`${t}-inline`]:{width:`100%`,[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:`flex`,alignItems:`center`,transition:[`border-color ${f}`,`background-color ${f}`,`padding ${d} ${s}`].join(`,`),[`> ${t}-title-content`]:{flex:`auto`,minWidth:0,overflow:`hidden`,textOverflow:`ellipsis`},"> *":{flex:`none`}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:`none`,[`& > ${t}-submenu > ${t}-submenu-title`]:_,[`& ${t}-item-group-title`]:{paddingInlineStart:c}},[`${t}-item`]:_}},{[`${t}-inline-collapsed`]:{width:h,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:u,textAlign:`center`}}},[`> ${t}-item, + ${t}-submenu-title`]:{paddingInlineEnd:u}}},nD=e=>{let{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:i,dropdownWidth:a,controlHeightLG:o,motionEaseOut:s,paddingXL:c,itemMarginInline:l,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:f,paddingXS:p,boxShadowSecondary:m,collapsedWidth:h,collapsedIconSize:g}=e,_={height:r,lineHeight:X(r),listStylePosition:`inside`,listStyleType:`disc`};return[{[t]:{"&-inline, &-vertical":{[`&${t}-root`]:{boxShadow:`none`},...tD(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...tD(e),boxShadow:m}}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:a,maxHeight:`calc(100vh - ${X(e.calc(o).mul(2.5).equal())})`,padding:`0`,overflow:`hidden`,borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:`hidden`,overflowY:`auto`}}},{[`${t}-inline`]:{width:`100%`,[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:`flex`,alignItems:`center`,transition:[`border-color ${f}`,`background-color ${f}`,`padding ${d} ${s}`].join(`,`),[`> ${t}-title-content`]:{flex:`auto`,minWidth:0,overflow:`hidden`,textOverflow:`ellipsis`},"> *":{flex:`none`}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:`none`,[`& > ${t}-submenu > ${t}-submenu-title`]:_,[`& ${t}-item-group-title`]:{paddingInlineStart:c}},[`${t}-item`]:_}},{[`${t}-inline-collapsed`]:{width:h,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:u,textAlign:`center`}}},[`> ${t}-item, > ${t}-item-group > ${t}-item-group-list > ${t}-item, > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title, > ${t}-submenu > ${t}-submenu-title`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,insetInlineStart:0,paddingInline:`calc(50% - ${X(e.calc(g).div(2).equal())} - ${X(l)})`,textOverflow:`clip`,[` ${t}-submenu-arrow, ${t}-submenu-expand-icon - `]:{opacity:0},[`> ${t}-title-content`]:{width:0,opacity:0,overflow:`hidden`},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:g,lineHeight:X(r),"+ span":{display:`inline-block`,width:0,opacity:0,overflow:`hidden`,marginInlineStart:0}}},[`${t}-item-icon, ${n}`]:{display:`inline-block`},"&-tooltip":{pointerEvents:`none`,[`${t}-item-icon, ${n}`]:{display:`none`},"a, a:hover":{color:i}},[`${t}-item-group-title`]:{...Bl,paddingInline:p}}}]},aD=e=>{let{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:i,motionEaseOut:a,iconCls:o,iconSize:s,iconMarginInlineEnd:c}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:`relative`,display:`block`,margin:0,whiteSpace:`nowrap`,cursor:`pointer`,transition:[`border-color ${n}`,`background-color ${n}`,`padding calc(${n} + 0.1s) ${i}`].join(`,`),[`${t}-item-icon, ${o}`]:{minWidth:s,fontSize:s,transition:[`font-size ${r} ${a}`,`margin ${n} ${i}`,`color ${n}`].join(`,`),"+ span":{marginInlineStart:c,opacity:1,transition:[`opacity ${n} ${i}`,`margin ${n}`,`color ${n}`].join(`,`)}},[`${t}-item-icon`]:{...Hl()},[`&${t}-item-only-child`]:{[`> ${o}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:`none !important`,cursor:`not-allowed`,"&::after":{borderColor:`transparent !important`},a:{color:`inherit !important`,cursor:`not-allowed`,pointerEvents:`none`},[`> ${t}-submenu-title`]:{color:`inherit !important`,cursor:`not-allowed`}}}},oD=e=>{let{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:i,menuArrowSize:a,menuArrowOffset:o}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:`absolute`,top:`50%`,insetInlineEnd:e.margin,width:a,color:`currentcolor`,transform:`translateY(-50%)`,transition:[`transform`,`opacity`].map(e=>`${e} ${n}`).join(`,`)},"&-arrow":{"&::before, &::after":{position:`absolute`,width:e.calc(a).mul(.6).equal(),height:e.calc(a).mul(.15).equal(),backgroundColor:`currentcolor`,borderRadius:i,transition:[`background-color`,`transform`,`top`,`color`].map(e=>`${e} ${n} ${r}`).join(`,`),content:`""`},"&::before":{transform:`rotate(45deg) translateY(${X(e.calc(o).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${X(o)})`}}}}},sD=e=>{let{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:i,motionDurationMid:a,motionEaseInOut:o,paddingXS:s,padding:c,colorSplit:l,lineWidth:u,zIndexPopup:d,borderRadiusLG:f,subMenuItemBorderRadius:p,menuArrowSize:m,menuArrowOffset:h,lineType:g,groupTitleLineHeight:_,groupTitleFontSize:v}=e;return[{"":{[n]:{...Ul(),"&-hidden":{display:`none`}}},[`${n}-submenu-hidden`]:{display:`none`}},{[n]:{...Vl(e),...Ul(),marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:`none`,outline:`none`,transition:`width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:`none`},"&-overflow":{display:`flex`,[`${n}-item`]:{flex:`none`}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${X(s)} ${X(c)}`,fontSize:v,lineHeight:_,transition:`all ${i}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color`,`background-color`].map(e=>`${e} ${i} ${o}`).join(`,`)},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${i}`,`background-color ${i}`,`padding ${a}`].map(e=>`${e} ${o}`).join(`,`)},[`${n}-submenu ${n}-sub`]:{cursor:`initial`,transition:[`background-color`,`padding`].map(e=>`${e} ${i} ${o}`).join(`,`)},[`${n}-title-content`]:{transition:`color ${i}`,"&-with-extra":{display:`inline-flex`,alignItems:`center`,width:`100%`},[`> ${t}-typography-ellipsis-single-line`]:{display:`inline`,verticalAlign:`unset`},[`${n}-item-extra`]:{marginInlineStart:`auto`,paddingInlineStart:e.padding}},[`${n}-item a`]:{"&::before":{position:`absolute`,inset:0,backgroundColor:`transparent`,content:`""`}},[`${n}-item-divider`]:{overflow:`hidden`,lineHeight:0,borderColor:l,borderStyle:g,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:`dashed`}},...aD(e),[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${X(e.calc(r).mul(2).equal())} ${X(c)}`}}},"&-submenu":{"&-popup":{position:`absolute`,zIndex:d,borderRadius:f,boxShadow:`none`,transformOrigin:`0 0`,[`&${n}-submenu`]:{background:`transparent`},"&::before":{position:`absolute`,inset:0,zIndex:-1,width:`100%`,height:`100%`,opacity:0,content:`""`},[`> ${n}`]:{borderRadius:f,...aD(e),...oD(e),[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:p},[`${n}-submenu-title::after`]:{transition:`transform ${i} ${o}`}}},"&-placement-leftTop, &-placement-bottomRight":{transformOrigin:`100% 0`},"&-placement-leftBottom, &-placement-topRight":{transformOrigin:`100% 100%`},"&-placement-rightBottom, &-placement-topLeft":{transformOrigin:`0 100%`},"&-placement-bottomLeft, &-placement-rightTop":{transformOrigin:`0 0`},"&-placement-leftTop, &-placement-leftBottom":{paddingInlineEnd:e.paddingXS},"&-placement-rightTop, &-placement-rightBottom":{paddingInlineStart:e.paddingXS},"&-placement-topRight, &-placement-topLeft":{paddingBottom:e.paddingXS},"&-placement-bottomRight, &-placement-bottomLeft":{paddingTop:e.paddingXS}},...oD(e),[`&-inline-collapsed ${n}-submenu-arrow, - &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${X(h)})`},"&::after":{transform:`rotate(45deg) translateX(${X(e.calc(h).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${X(e.calc(m).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${X(e.calc(h).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${X(h)})`}}}},{[`${t}-layout-header`]:{[n]:{lineHeight:`inherit`}}}]},cD=e=>{let{colorPrimary:t,colorError:n,colorTextDisabled:r,colorErrorBg:i,colorText:a,colorTextDescription:o,colorBgContainer:s,colorFillAlter:c,colorFillContent:l,lineWidth:u,lineWidthBold:d,controlItemBgActive:f,colorBgTextHover:p,controlHeightLG:m,lineHeight:h,colorBgElevated:g,marginXXS:_,padding:v,fontSize:y,controlHeightSM:b,fontSizeLG:x,colorTextLightSolid:S,colorErrorHover:C}=e,w=e.activeBarWidth??0,T=e.activeBarBorderWidth??u,E=e.itemMarginInline??e.marginXXS,D=new jc(S).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:a,itemColor:a,colorItemTextHover:a,itemHoverColor:a,colorItemTextHoverHorizontal:t,horizontalItemHoverColor:t,colorGroupTitle:o,groupTitleColor:o,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:s,itemBg:s,colorItemBgHover:p,itemHoverBg:p,colorItemBgActive:l,itemActiveBg:f,colorSubItemBg:c,subMenuItemBg:c,colorItemBgSelected:f,itemSelectedBg:f,colorItemBgSelectedHorizontal:`transparent`,horizontalItemSelectedBg:`transparent`,colorActiveBarWidth:0,activeBarWidth:w,colorActiveBarHeight:d,activeBarHeight:d,colorActiveBarBorderSize:u,activeBarBorderWidth:T,colorItemTextDisabled:r,itemDisabledColor:r,colorDangerItemText:n,dangerItemColor:n,colorDangerItemTextHover:n,dangerItemHoverColor:n,colorDangerItemTextSelected:n,dangerItemSelectedColor:n,colorDangerItemBgActive:i,dangerItemActiveBg:i,colorDangerItemBgSelected:i,dangerItemSelectedBg:i,itemMarginInline:E,horizontalItemBorderRadius:0,horizontalItemHoverBg:`transparent`,itemHeight:m,groupTitleLineHeight:h,collapsedWidth:m*2,popupBg:g,itemMarginBlock:_,itemPaddingInline:v,horizontalLineHeight:`${m*1.15}px`,iconSize:y,iconMarginInlineEnd:b-y,collapsedIconSize:x,groupTitleFontSize:y,darkItemDisabledColor:new jc(S).setA(.25).toRgbString(),darkItemColor:D,darkDangerItemColor:n,darkItemBg:`#001529`,darkPopupBg:`#001529`,darkSubMenuItemBg:`#000c17`,darkItemSelectedColor:S,darkItemSelectedBg:t,darkDangerItemSelectedBg:n,darkItemHoverBg:`transparent`,darkGroupTitleColor:D,darkItemHoverColor:S,darkDangerItemHoverColor:C,darkDangerItemSelectedColor:S,darkDangerItemActiveBg:n,itemWidth:w?`calc(100% + ${T}px)`:`calc(100% - ${E*2}px)`}},lD=(e,t=e,n=!0)=>Xl(`Menu`,e=>{let{colorBgElevated:t,controlHeightLG:n,fontSize:r,darkItemColor:i,darkDangerItemColor:a,darkItemBg:o,darkSubMenuItemBg:s,darkItemSelectedColor:c,darkItemSelectedBg:l,darkDangerItemSelectedBg:u,darkItemHoverBg:d,darkGroupTitleColor:f,darkItemHoverColor:p,darkItemDisabledColor:m,darkDangerItemHoverColor:h,darkDangerItemSelectedColor:g,darkDangerItemActiveBg:_,popupBg:v,darkPopupBg:y}=e,b=e.calc(r).div(7).mul(5).equal(),x=lc(e,{menuArrowSize:b,menuHorizontalHeight:e.calc(n).mul(1.15).equal(),menuArrowOffset:e.calc(b).mul(.25).equal(),menuSubMenuBg:t,calc:e.calc,popupBg:v}),S=lc(x,{itemColor:i,itemHoverColor:p,groupTitleColor:f,itemSelectedColor:c,subMenuItemSelectedColor:c,itemBg:o,popupBg:y,subMenuItemBg:s,itemActiveBg:`transparent`,itemSelectedBg:l,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:d,itemDisabledColor:m,dangerItemColor:a,dangerItemHoverColor:h,dangerItemSelectedColor:g,dangerItemActiveBg:_,dangerItemSelectedBg:u,menuSubMenuBg:s,horizontalItemSelectedColor:c,horizontalItemSelectedBg:l});return[sD(x),$E(x),iD(x),nD(x,`light`),nD(S,`dark`),eD(x),Jh(x),_g(x,`slide-up`),_g(x,`slide-down`),Mg(x,`zoom-big`)]},cD,{deprecatedTokens:[[`colorGroupTitle`,`groupTitleColor`],[`radiusItem`,`itemBorderRadius`],[`radiusSubMenuItem`,`subMenuItemBorderRadius`],[`colorItemText`,`itemColor`],[`colorItemTextHover`,`itemHoverColor`],[`colorItemTextHoverHorizontal`,`horizontalItemHoverColor`],[`colorItemTextSelected`,`itemSelectedColor`],[`colorItemTextSelectedHorizontal`,`horizontalItemSelectedColor`],[`colorItemTextDisabled`,`itemDisabledColor`],[`colorDangerItemText`,`dangerItemColor`],[`colorDangerItemTextHover`,`dangerItemHoverColor`],[`colorDangerItemTextSelected`,`dangerItemSelectedColor`],[`colorDangerItemBgActive`,`dangerItemActiveBg`],[`colorDangerItemBgSelected`,`dangerItemSelectedBg`],[`colorItemBg`,`itemBg`],[`colorItemBgHover`,`itemHoverBg`],[`colorSubItemBg`,`subMenuItemBg`],[`colorItemBgActive`,`itemActiveBg`],[`colorItemBgSelectedHorizontal`,`horizontalItemSelectedBg`],[`colorActiveBarWidth`,`activeBarWidth`],[`colorActiveBarHeight`,`activeBarHeight`],[`colorActiveBarBorderSize`,`activeBarBorderWidth`],[`colorItemBgSelected`,`itemSelectedBg`]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(e,t),uD=e=>{let{popupClassName:t,icon:n,title:r,theme:i}=e,a=S.useContext(JE),{prefixCls:o,inlineCollapsed:s,theme:c,classNames:l,styles:u}=a,d=kT(),f;if(!n)f=s&&!d.length&&r&&typeof r==`string`?S.createElement(`div`,{className:`${o}-inline-collapsed-noicon`},r.charAt(0)):S.createElement(`span`,{className:`${o}-title-content`},r);else{let e=S.isValidElement(r)&&r.type===`span`;f=S.createElement(S.Fragment,null,cm(n,e=>({className:Y(e.className,`${o}-item-icon`,l?.itemIcon),style:{...e.style,...u?.itemIcon}})),e?r:S.createElement(`span`,{className:`${o}-title-content`},r))}let p=S.useMemo(()=>({...a,firstLevel:!1}),[a]),[m]=Ff(`Menu`);return S.createElement(JE.Provider,{value:p},S.createElement(bE,{...hi(e,[`icon`]),title:f,classNames:{list:l?.subMenu?.list,listTitle:l?.subMenu?.itemTitle},styles:{list:u?.subMenu?.list,listTitle:u?.subMenu?.itemTitle},popupClassName:Y(o,t,l?.popup?.root,`${o}-${i||c}`),popupStyle:{zIndex:m,...e.popupStyle,...u?.popup?.root}}))};function dD(e){return e===null||e===!1}var fD={item:XE,submenu:uD,divider:YE},pD=(0,S.forwardRef)((e,t)=>{let n=S.useContext(ZE),r=n||{},{prefixCls:i,className:a,style:o,theme:s=`light`,expandIcon:c,_internalDisableMenuItemTitleTooltip:l,tooltip:u,inlineCollapsed:d,siderCollapsed:f,rootClassName:p,mode:m,selectable:h,onClick:g,overflowedIndicatorPopupClassName:_,classNames:v,styles:y,...b}=e,{menu:x}=S.useContext(ma),{getPrefixCls:C,getPopupContainer:w,direction:T,className:E,style:D,classNames:O,styles:k}=_a(`menu`),A=C(),j=hi(b,[`collapsedWidth`]);r.validator?.({mode:m});let M=Rn((...e)=>{g?.(...e),r.onClick?.()}),N=r.mode||m,P=h??r.selectable,F=d??f,I={...e,mode:N,inlineCollapsed:F,selectable:P,theme:s},[L,R]=xf([O,v],[k,y],{props:I},{popup:{_default:`root`},subMenu:{_default:`item`}}),z={horizontal:{motionName:`${A}-slide-up`},inline:_h(A),other:{motionName:`${A}-zoom-big`}},B=C(`menu`,i||r.prefixCls),V=ap(B),[H,U]=lD(B,V,!n),ee=Y(`${B}-${s}`,E,a),te=S.useMemo(()=>{if(typeof c==`function`||dD(c))return c||null;if(typeof r.expandIcon==`function`||dD(r.expandIcon))return r.expandIcon||null;if(typeof x?.expandIcon==`function`||dD(x?.expandIcon))return x?.expandIcon||null;let e=c??r?.expandIcon??x?.expandIcon;return cm(e,{className:Y(`${B}-submenu-expand-icon`,S.isValidElement(e)?e.props?.className:void 0)})},[c,r?.expandIcon,x?.expandIcon,B]),ne=S.useMemo(()=>({prefixCls:B,inlineCollapsed:F||!1,direction:T,firstLevel:!0,theme:s,mode:N,disableMenuItemTitleTooltip:l,tooltip:u,classNames:L,styles:R}),[B,F,T,l,s,N,L,R,u]);return S.createElement(ZE.Provider,{value:null},S.createElement(JE.Provider,{value:ne},S.createElement(AE,{getPopupContainer:w,overflowedIndicator:S.createElement(qE,null),overflowedIndicatorPopupClassName:Y(B,`${B}-${s}`,_),classNames:{list:L.list,listTitle:L.itemTitle},styles:{list:R.list,listTitle:R.itemTitle},mode:N,selectable:P,onClick:M,...j,inlineCollapsed:F,style:{...R.root,...D,...o},className:ee,prefixCls:B,direction:T,defaultMotions:z,expandIcon:te,ref:t,rootClassName:Y(p,H,r.rootClassName,U,V,L.root),_internalComponents:fD})))}),mD=(0,S.forwardRef)((e,t)=>{let n=(0,S.useRef)(null),r=S.useContext(HE);return(0,S.useImperativeHandle)(t,()=>({menu:n.current,focus:e=>{n.current?.focus(e)}})),S.createElement(pD,{ref:n,...e,...r})});mD.Item=XE,mD.SubMenu=uD,mD.Divider=YE,mD.ItemGroup=wE;var hD=e=>{let{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:i}=e,a=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${a}`]:{[`&${a}-danger:not(${a}-disabled)`]:{color:r,"&:hover":{color:i,backgroundColor:r}}}}}},gD=e=>{let{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:i,sizePopupArrow:a,antCls:o,iconCls:s,motionDurationMid:c,paddingBlock:l,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:f,fontSizeIcon:p,controlPaddingHorizontal:m,colorBgElevated:h}=e;return[{[t]:{position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:`block`,"&::before":{position:`absolute`,insetBlock:e.calc(a).div(2).sub(i).equal(),zIndex:-9999,opacity:1e-4,content:`""`},"&-menu-vertical":{maxHeight:`100vh`,overflowY:`auto`},[`&-trigger${o}-btn`]:{[`& > ${s}-down, & > ${o}-btn-icon > ${s}-down`]:{fontSize:p}},[`${t}-wrap`]:{position:`relative`,[`${o}-btn > ${s}-down`]:{fontSize:p},[`${s}-down::before`]:{transition:`transform ${c}`}},[`${t}-wrap-open`]:{[`${s}-down::before`]:{transform:`rotate(180deg)`}},"&-hidden, &-menu-hidden, &-menu-submenu-hidden":{display:`none`},[`&${o}-slide-down-enter${o}-slide-down-enter-active${t}-placement-bottomLeft, + `]:{opacity:0},[`> ${t}-title-content`]:{width:0,opacity:0,overflow:`hidden`},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:g,lineHeight:X(r),"+ span":{display:`inline-block`,width:0,opacity:0,overflow:`hidden`,marginInlineStart:0}}},[`${t}-item-icon, ${n}`]:{display:`inline-block`},"&-tooltip":{pointerEvents:`none`,[`${t}-item-icon, ${n}`]:{display:`none`},"a, a:hover":{color:i}},[`${t}-item-group-title`]:{...Bl,paddingInline:p}}}]},rD=e=>{let{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:i,motionEaseOut:a,iconCls:o,iconSize:s,iconMarginInlineEnd:c}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:`relative`,display:`block`,margin:0,whiteSpace:`nowrap`,cursor:`pointer`,transition:[`border-color ${n}`,`background-color ${n}`,`padding calc(${n} + 0.1s) ${i}`].join(`,`),[`${t}-item-icon, ${o}`]:{minWidth:s,fontSize:s,transition:[`font-size ${r} ${a}`,`margin ${n} ${i}`,`color ${n}`].join(`,`),"+ span":{marginInlineStart:c,opacity:1,transition:[`opacity ${n} ${i}`,`margin ${n}`,`color ${n}`].join(`,`)}},[`${t}-item-icon`]:{...Hl()},[`&${t}-item-only-child`]:{[`> ${o}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:`none !important`,cursor:`not-allowed`,"&::after":{borderColor:`transparent !important`},a:{color:`inherit !important`,cursor:`not-allowed`,pointerEvents:`none`},[`> ${t}-submenu-title`]:{color:`inherit !important`,cursor:`not-allowed`}}}},iD=e=>{let{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:i,menuArrowSize:a,menuArrowOffset:o}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:`absolute`,top:`50%`,insetInlineEnd:e.margin,width:a,color:`currentcolor`,transform:`translateY(-50%)`,transition:[`transform`,`opacity`].map(e=>`${e} ${n}`).join(`,`)},"&-arrow":{"&::before, &::after":{position:`absolute`,width:e.calc(a).mul(.6).equal(),height:e.calc(a).mul(.15).equal(),backgroundColor:`currentcolor`,borderRadius:i,transition:[`background-color`,`transform`,`top`,`color`].map(e=>`${e} ${n} ${r}`).join(`,`),content:`""`},"&::before":{transform:`rotate(45deg) translateY(${X(e.calc(o).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${X(o)})`}}}}},aD=e=>{let{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:i,motionDurationMid:a,motionEaseInOut:o,paddingXS:s,padding:c,colorSplit:l,lineWidth:u,zIndexPopup:d,borderRadiusLG:f,subMenuItemBorderRadius:p,menuArrowSize:m,menuArrowOffset:h,lineType:g,groupTitleLineHeight:_,groupTitleFontSize:v}=e;return[{"":{[n]:{...Ul(),"&-hidden":{display:`none`}}},[`${n}-submenu-hidden`]:{display:`none`}},{[n]:{...Vl(e),...Ul(),marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:`none`,outline:`none`,transition:`width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:`none`},"&-overflow":{display:`flex`,[`${n}-item`]:{flex:`none`}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${X(s)} ${X(c)}`,fontSize:v,lineHeight:_,transition:`all ${i}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color`,`background-color`].map(e=>`${e} ${i} ${o}`).join(`,`)},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${i}`,`background-color ${i}`,`padding ${a}`].map(e=>`${e} ${o}`).join(`,`)},[`${n}-submenu ${n}-sub`]:{cursor:`initial`,transition:[`background-color`,`padding`].map(e=>`${e} ${i} ${o}`).join(`,`)},[`${n}-title-content`]:{transition:`color ${i}`,"&-with-extra":{display:`inline-flex`,alignItems:`center`,width:`100%`},[`> ${t}-typography-ellipsis-single-line`]:{display:`inline`,verticalAlign:`unset`},[`${n}-item-extra`]:{marginInlineStart:`auto`,paddingInlineStart:e.padding}},[`${n}-item a`]:{"&::before":{position:`absolute`,inset:0,backgroundColor:`transparent`,content:`""`}},[`${n}-item-divider`]:{overflow:`hidden`,lineHeight:0,borderColor:l,borderStyle:g,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:`dashed`}},...rD(e),[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${X(e.calc(r).mul(2).equal())} ${X(c)}`}}},"&-submenu":{"&-popup":{position:`absolute`,zIndex:d,borderRadius:f,boxShadow:`none`,transformOrigin:`0 0`,[`&${n}-submenu`]:{background:`transparent`},"&::before":{position:`absolute`,inset:0,zIndex:-1,width:`100%`,height:`100%`,opacity:0,content:`""`},[`> ${n}`]:{borderRadius:f,...rD(e),...iD(e),[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:p},[`${n}-submenu-title::after`]:{transition:`transform ${i} ${o}`}}},"&-placement-leftTop, &-placement-bottomRight":{transformOrigin:`100% 0`},"&-placement-leftBottom, &-placement-topRight":{transformOrigin:`100% 100%`},"&-placement-rightBottom, &-placement-topLeft":{transformOrigin:`0 100%`},"&-placement-bottomLeft, &-placement-rightTop":{transformOrigin:`0 0`},"&-placement-leftTop, &-placement-leftBottom":{paddingInlineEnd:e.paddingXS},"&-placement-rightTop, &-placement-rightBottom":{paddingInlineStart:e.paddingXS},"&-placement-topRight, &-placement-topLeft":{paddingBottom:e.paddingXS},"&-placement-bottomRight, &-placement-bottomLeft":{paddingTop:e.paddingXS}},...iD(e),[`&-inline-collapsed ${n}-submenu-arrow, + &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${X(h)})`},"&::after":{transform:`rotate(45deg) translateX(${X(e.calc(h).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${X(e.calc(m).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${X(e.calc(h).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${X(h)})`}}}},{[`${t}-layout-header`]:{[n]:{lineHeight:`inherit`}}}]},oD=e=>{let{colorPrimary:t,colorError:n,colorTextDisabled:r,colorErrorBg:i,colorText:a,colorTextDescription:o,colorBgContainer:s,colorFillAlter:c,colorFillContent:l,lineWidth:u,lineWidthBold:d,controlItemBgActive:f,colorBgTextHover:p,controlHeightLG:m,lineHeight:h,colorBgElevated:g,marginXXS:_,padding:v,fontSize:y,controlHeightSM:b,fontSizeLG:x,colorTextLightSolid:S,colorErrorHover:C}=e,w=e.activeBarWidth??0,T=e.activeBarBorderWidth??u,E=e.itemMarginInline??e.marginXXS,D=new jc(S).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:a,itemColor:a,colorItemTextHover:a,itemHoverColor:a,colorItemTextHoverHorizontal:t,horizontalItemHoverColor:t,colorGroupTitle:o,groupTitleColor:o,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:s,itemBg:s,colorItemBgHover:p,itemHoverBg:p,colorItemBgActive:l,itemActiveBg:f,colorSubItemBg:c,subMenuItemBg:c,colorItemBgSelected:f,itemSelectedBg:f,colorItemBgSelectedHorizontal:`transparent`,horizontalItemSelectedBg:`transparent`,colorActiveBarWidth:0,activeBarWidth:w,colorActiveBarHeight:d,activeBarHeight:d,colorActiveBarBorderSize:u,activeBarBorderWidth:T,colorItemTextDisabled:r,itemDisabledColor:r,colorDangerItemText:n,dangerItemColor:n,colorDangerItemTextHover:n,dangerItemHoverColor:n,colorDangerItemTextSelected:n,dangerItemSelectedColor:n,colorDangerItemBgActive:i,dangerItemActiveBg:i,colorDangerItemBgSelected:i,dangerItemSelectedBg:i,itemMarginInline:E,horizontalItemBorderRadius:0,horizontalItemHoverBg:`transparent`,itemHeight:m,groupTitleLineHeight:h,collapsedWidth:m*2,popupBg:g,itemMarginBlock:_,itemPaddingInline:v,horizontalLineHeight:`${m*1.15}px`,iconSize:y,iconMarginInlineEnd:b-y,collapsedIconSize:x,groupTitleFontSize:y,darkItemDisabledColor:new jc(S).setA(.25).toRgbString(),darkItemColor:D,darkDangerItemColor:n,darkItemBg:`#001529`,darkPopupBg:`#001529`,darkSubMenuItemBg:`#000c17`,darkItemSelectedColor:S,darkItemSelectedBg:t,darkDangerItemSelectedBg:n,darkItemHoverBg:`transparent`,darkGroupTitleColor:D,darkItemHoverColor:S,darkDangerItemHoverColor:C,darkDangerItemSelectedColor:S,darkDangerItemActiveBg:n,itemWidth:w?`calc(100% + ${T}px)`:`calc(100% - ${E*2}px)`}},sD=(e,t=e,n=!0)=>Xl(`Menu`,e=>{let{colorBgElevated:t,controlHeightLG:n,fontSize:r,darkItemColor:i,darkDangerItemColor:a,darkItemBg:o,darkSubMenuItemBg:s,darkItemSelectedColor:c,darkItemSelectedBg:l,darkDangerItemSelectedBg:u,darkItemHoverBg:d,darkGroupTitleColor:f,darkItemHoverColor:p,darkItemDisabledColor:m,darkDangerItemHoverColor:h,darkDangerItemSelectedColor:g,darkDangerItemActiveBg:_,popupBg:v,darkPopupBg:y}=e,b=e.calc(r).div(7).mul(5).equal(),x=lc(e,{menuArrowSize:b,menuHorizontalHeight:e.calc(n).mul(1.15).equal(),menuArrowOffset:e.calc(b).mul(.25).equal(),menuSubMenuBg:t,calc:e.calc,popupBg:v}),S=lc(x,{itemColor:i,itemHoverColor:p,groupTitleColor:f,itemSelectedColor:c,subMenuItemSelectedColor:c,itemBg:o,popupBg:y,subMenuItemBg:s,itemActiveBg:`transparent`,itemSelectedBg:l,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:d,itemDisabledColor:m,dangerItemColor:a,dangerItemHoverColor:h,dangerItemSelectedColor:g,dangerItemActiveBg:_,dangerItemSelectedBg:u,menuSubMenuBg:s,horizontalItemSelectedColor:c,horizontalItemSelectedBg:l});return[aD(x),ZE(x),nD(x),eD(x,`light`),eD(S,`dark`),QE(x),Jh(x),_g(x,`slide-up`),_g(x,`slide-down`),Mg(x,`zoom-big`)]},oD,{deprecatedTokens:[[`colorGroupTitle`,`groupTitleColor`],[`radiusItem`,`itemBorderRadius`],[`radiusSubMenuItem`,`subMenuItemBorderRadius`],[`colorItemText`,`itemColor`],[`colorItemTextHover`,`itemHoverColor`],[`colorItemTextHoverHorizontal`,`horizontalItemHoverColor`],[`colorItemTextSelected`,`itemSelectedColor`],[`colorItemTextSelectedHorizontal`,`horizontalItemSelectedColor`],[`colorItemTextDisabled`,`itemDisabledColor`],[`colorDangerItemText`,`dangerItemColor`],[`colorDangerItemTextHover`,`dangerItemHoverColor`],[`colorDangerItemTextSelected`,`dangerItemSelectedColor`],[`colorDangerItemBgActive`,`dangerItemActiveBg`],[`colorDangerItemBgSelected`,`dangerItemSelectedBg`],[`colorItemBg`,`itemBg`],[`colorItemBgHover`,`itemHoverBg`],[`colorSubItemBg`,`subMenuItemBg`],[`colorItemBgActive`,`itemActiveBg`],[`colorItemBgSelectedHorizontal`,`horizontalItemSelectedBg`],[`colorActiveBarWidth`,`activeBarWidth`],[`colorActiveBarHeight`,`activeBarHeight`],[`colorActiveBarBorderSize`,`activeBarBorderWidth`],[`colorItemBgSelected`,`itemSelectedBg`]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(e,t),cD=e=>{let{popupClassName:t,icon:n,title:r,theme:i}=e,a=S.useContext(KE),{prefixCls:o,inlineCollapsed:s,theme:c,classNames:l,styles:u}=a,d=DT(),f;if(!n)f=s&&!d.length&&r&&typeof r==`string`?S.createElement(`div`,{className:`${o}-inline-collapsed-noicon`},r.charAt(0)):S.createElement(`span`,{className:`${o}-title-content`},r);else{let e=S.isValidElement(r)&&r.type===`span`;f=S.createElement(S.Fragment,null,cm(n,e=>({className:Y(e.className,`${o}-item-icon`,l?.itemIcon),style:{...e.style,...u?.itemIcon}})),e?r:S.createElement(`span`,{className:`${o}-title-content`},r))}let p=S.useMemo(()=>({...a,firstLevel:!1}),[a]),[m]=Ff(`Menu`);return S.createElement(KE.Provider,{value:p},S.createElement(vE,{...hi(e,[`icon`]),title:f,classNames:{list:l?.subMenu?.list,listTitle:l?.subMenu?.itemTitle},styles:{list:u?.subMenu?.list,listTitle:u?.subMenu?.itemTitle},popupClassName:Y(o,t,l?.popup?.root,`${o}-${i||c}`),popupStyle:{zIndex:m,...e.popupStyle,...u?.popup?.root}}))};function lD(e){return e===null||e===!1}var uD={item:JE,submenu:cD,divider:qE},dD=(0,S.forwardRef)((e,t)=>{let n=S.useContext(YE),r=n||{},{prefixCls:i,className:a,style:o,theme:s=`light`,expandIcon:c,_internalDisableMenuItemTitleTooltip:l,tooltip:u,inlineCollapsed:d,siderCollapsed:f,rootClassName:p,mode:m,selectable:h,onClick:g,overflowedIndicatorPopupClassName:_,classNames:v,styles:y,...b}=e,{menu:x}=S.useContext(ma),{getPrefixCls:C,getPopupContainer:w,direction:T,className:E,style:D,classNames:O,styles:k}=_a(`menu`),A=C(),j=hi(b,[`collapsedWidth`]);r.validator?.({mode:m});let M=Rn((...e)=>{g?.(...e),r.onClick?.()}),N=r.mode||m,P=h??r.selectable,F=d??f,I={...e,mode:N,inlineCollapsed:F,selectable:P,theme:s},[L,R]=xf([O,v],[k,y],{props:I},{popup:{_default:`root`},subMenu:{_default:`item`}}),z={horizontal:{motionName:`${A}-slide-up`},inline:_h(A),other:{motionName:`${A}-zoom-big`}},B=C(`menu`,i||r.prefixCls),V=ap(B),[H,U]=sD(B,V,!n),ee=Y(`${B}-${s}`,E,a),te=S.useMemo(()=>{if(typeof c==`function`||lD(c))return c||null;if(typeof r.expandIcon==`function`||lD(r.expandIcon))return r.expandIcon||null;if(typeof x?.expandIcon==`function`||lD(x?.expandIcon))return x?.expandIcon||null;let e=c??r?.expandIcon??x?.expandIcon;return cm(e,{className:Y(`${B}-submenu-expand-icon`,S.isValidElement(e)?e.props?.className:void 0)})},[c,r?.expandIcon,x?.expandIcon,B]),ne=S.useMemo(()=>({prefixCls:B,inlineCollapsed:F||!1,direction:T,firstLevel:!0,theme:s,mode:N,disableMenuItemTitleTooltip:l,tooltip:u,classNames:L,styles:R}),[B,F,T,l,s,N,L,R,u]);return S.createElement(YE.Provider,{value:null},S.createElement(KE.Provider,{value:ne},S.createElement(OE,{getPopupContainer:w,overflowedIndicator:S.createElement(GE,null),overflowedIndicatorPopupClassName:Y(B,`${B}-${s}`,_),classNames:{list:L.list,listTitle:L.itemTitle},styles:{list:R.list,listTitle:R.itemTitle},mode:N,selectable:P,onClick:M,...j,inlineCollapsed:F,style:{...R.root,...D,...o},className:ee,prefixCls:B,direction:T,defaultMotions:z,expandIcon:te,ref:t,rootClassName:Y(p,H,r.rootClassName,U,V,L.root),_internalComponents:uD})))}),fD=(0,S.forwardRef)((e,t)=>{let n=(0,S.useRef)(null),r=S.useContext(BE);return(0,S.useImperativeHandle)(t,()=>({menu:n.current,focus:e=>{n.current?.focus(e)}})),S.createElement(dD,{ref:n,...e,...r})});fD.Item=JE,fD.SubMenu=cD,fD.Divider=qE,fD.ItemGroup=SE;var pD=e=>{let{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:i}=e,a=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${a}`]:{[`&${a}-danger:not(${a}-disabled)`]:{color:r,"&:hover":{color:i,backgroundColor:r}}}}}},mD=e=>{let{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:i,sizePopupArrow:a,antCls:o,iconCls:s,motionDurationMid:c,paddingBlock:l,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:f,fontSizeIcon:p,controlPaddingHorizontal:m,colorBgElevated:h}=e;return[{[t]:{position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:`block`,"&::before":{position:`absolute`,insetBlock:e.calc(a).div(2).sub(i).equal(),zIndex:-9999,opacity:1e-4,content:`""`},"&-menu-vertical":{maxHeight:`100vh`,overflowY:`auto`},[`&-trigger${o}-btn`]:{[`& > ${s}-down, & > ${o}-btn-icon > ${s}-down`]:{fontSize:p}},[`${t}-wrap`]:{position:`relative`,[`${o}-btn > ${s}-down`]:{fontSize:p},[`${s}-down::before`]:{transition:`transform ${c}`}},[`${t}-wrap-open`]:{[`${s}-down::before`]:{transform:`rotate(180deg)`}},"&-hidden, &-menu-hidden, &-menu-submenu-hidden":{display:`none`},[`&${o}-slide-down-enter${o}-slide-down-enter-active${t}-placement-bottomLeft, &${o}-slide-down-appear${o}-slide-down-appear-active${t}-placement-bottomLeft, &${o}-slide-down-enter${o}-slide-down-enter-active${t}-placement-bottom, &${o}-slide-down-appear${o}-slide-down-appear-active${t}-placement-bottom, @@ -207,46 +207,46 @@ html body { &${o}-slide-down-leave${o}-slide-down-leave-active${t}-placement-bottom, &${o}-slide-down-leave${o}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:lg},[`&${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-topLeft, &${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-top, - &${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-topRight`]:{animationName:dg}}},Iw(e,h,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${n}`]:{position:`relative`,margin:0},[`${n}-submenu-popup`]:{position:`absolute`,zIndex:r,background:`transparent`,boxShadow:`none`,transformOrigin:`0 0`,"ul, li":{listStyle:`none`,margin:0}},[`${t}, ${t}-menu-submenu`]:{...Vl(e),[n]:{padding:d,listStyleType:`none`,backgroundColor:h,backgroundClip:`padding-box`,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,...Gl(e),"&:empty":{padding:0,boxShadow:`none`},[`${n}-item-group-title`]:{padding:`${X(l)} ${X(m)}`,color:e.colorTextDescription,transition:`all ${c}`},[`${n}-item`]:{position:`relative`,display:`flex`,alignItems:`center`},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:`auto`,"&-with-extra":{display:`inline-flex`,alignItems:`center`,width:`100%`},"> a":{color:`inherit`,transition:`all ${c}`,"&:hover":{color:`inherit`},"&::after":{position:`absolute`,inset:0,content:`""`}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:`auto`,fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:{display:`flex`,margin:0,padding:`${X(l)} ${X(m)}`,color:e.colorText,fontWeight:`normal`,fontSize:u,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${c}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...Gl(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:`not-allowed`,"&:hover":{color:f,backgroundColor:h,cursor:`not-allowed`},a:{pointerEvents:`none`}},"&-divider":{height:1,margin:`${X(e.marginXXS)} 0`,overflow:`hidden`,lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:`absolute`,insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:`0 !important`,color:e.colorIcon,fontSize:p,fontStyle:`normal`}}},[`${n}-item-group-list`]:{margin:`0 ${X(e.marginXS)}`,padding:0,listStyle:`none`},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(m).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:`relative`},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:h,cursor:`not-allowed`}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[_g(e,`slide-up`),_g(e,`slide-down`),sg(e,`move-up`),sg(e,`move-down`),Mg(e,`zoom-big`)]]},_D=Xl(`Dropdown`,e=>{let{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:i}=e,a=lc(e,{menuCls:`${i}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[gD(a),hD(a)]},e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...Pw({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...Mw(e)}),{resetStyle:!1}),vD=e=>{let{menu:t,arrow:n,prefixCls:r,children:i,trigger:a,disabled:o,dropdownRender:s,popupRender:c,getPopupContainer:l,overlayClassName:u,rootClassName:d,overlayStyle:f,open:p,onOpenChange:m,mouseEnterDelay:h=.15,mouseLeaveDelay:g=.1,autoAdjustOverflow:_=!0,placement:v=``,transitionName:y,classNames:b,styles:x,destroyPopupOnHide:C,destroyOnHidden:w}=e,{getPrefixCls:T,direction:E,getPopupContainer:D,className:O,style:k,classNames:A,styles:j}=_a(`dropdown`),M={...e,mouseEnterDelay:h,mouseLeaveDelay:g,autoAdjustOverflow:_},[N,P]=xf([A,b],[j,x],{props:M}),F={...k,...f,...P.root},I=c||s;Ui(`Dropdown`);let L=S.useMemo(()=>{let e=T();return y===void 0?v.includes(`top`)?`${e}-slide-down`:`${e}-slide-up`:y},[T,v,y]),R=S.useMemo(()=>v?v.includes(`Center`)?v.slice(0,v.indexOf(`Center`)):v:E===`rtl`?`bottomRight`:`bottomLeft`,[v,E]),z=T(`dropdown`,r),B=ap(z),[V,H]=_D(z,B),[,U]=zl(),ee=S.Children.only(rf(i)?S.createElement(`span`,null,i):i),te=cm(ee,{className:Y(`${z}-trigger`,{[`${z}-rtl`]:E===`rtl`},ee.props.className),disabled:ee.props.disabled??o}),ne=o?[]:a,W=!!ne?.includes(`contextMenu`),[re,G]=Wn(!1,p),K=Rn(e=>{m?.(e,{source:`trigger`}),G(e)}),q=Y(u,d,V,H,B,O,N.root,{[`${z}-rtl`]:E===`rtl`}),ie=Vw({arrowPointAtCenter:ef(n)&&n.pointAtCenter,autoAdjustOverflow:_,offset:U.marginXXS,arrowWidth:n?U.sizePopupArrow:0,borderRadius:U.borderRadius}),J=Rn(()=>{t?.selectable&&t?.multiple||(m?.(!1,{source:`menu`}),G(!1))}),ae=()=>{let e=hi(N,[`root`]),n=hi(P,[`root`]),r;return t?.items&&(r=S.createElement(mD,{...t,classNames:{...e,subMenu:{...e}},styles:{...n,subMenu:{...n}}})),I&&(r=I(r)),r=S.Children.only(typeof r==`string`?S.createElement(`span`,null,r):r),S.createElement(QE,{prefixCls:`${z}-menu`,rootClassName:Y(H,B),expandIcon:S.createElement(`span`,{className:`${z}-menu-submenu-arrow`},E===`rtl`?S.createElement(mT,{className:`${z}-menu-submenu-arrow-icon`}):S.createElement(Ug,{className:`${z}-menu-submenu-arrow-icon`})),mode:`vertical`,selectable:!1,onClick:J,validator:({mode:e})=>{}},r)},[oe,se]=Ff(`Dropdown`,F.zIndex),ce=S.createElement(bT,{alignPoint:W,...hi(e,[`rootClassName`,`onOpenChange`]),mouseEnterDelay:h,mouseLeaveDelay:g,visible:re,builtinPlacements:ie,arrow:!!n,overlayClassName:q,prefixCls:z,getPopupContainer:l||D,transitionName:L,trigger:ne,overlay:ae,placement:R,onVisibleChange:K,overlayStyle:{...F,zIndex:oe},autoDestroy:w??C},te);return oe&&(ce=S.createElement(kf.Provider,{value:se},ce)),ce},yD=Dx(vD,`align`,void 0,`dropdown`,e=>e);vD._InternalPanelDoNotUseOrYouWillBeFired=e=>S.createElement(yD,{...e},S.createElement(`span`,null));var bD=E_,xD=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e){(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekday=r()})(e,(function(){return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,n=this.$W,r=(n{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_localeData=r()})(e,(function(){return function(e,t,n){var r=t.prototype,i=function(e){return e&&(e.indexOf?e:e.s)},a=function(e,t,n,r,a){var o=e.name?e:e.$locale(),s=i(o[t]),c=i(o[n]),l=s||c.map((function(e){return e.slice(0,r)}));if(!a)return l;var u=o.weekStart;return l.map((function(e,t){return l[(t+(u||0))%7]}))},o=function(){return n.Ls[n.locale()]},s=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}(e.formats[t.toUpperCase()])},c=function(){var e=this;return{months:function(t){return t?t.format(`MMMM`):a(e,`months`)},monthsShort:function(t){return t?t.format(`MMM`):a(e,`monthsShort`,`months`,3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format(`dddd`):a(e,`weekdays`)},weekdaysMin:function(t){return t?t.format(`dd`):a(e,`weekdaysMin`,`weekdays`,2)},weekdaysShort:function(t){return t?t.format(`ddd`):a(e,`weekdaysShort`,`weekdays`,3)},longDateFormat:function(t){return s(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return c.bind(this)()},n.localeData=function(){var e=o();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(t){return s(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return a(o(),`months`)},n.monthsShort=function(){return a(o(),`monthsShort`,`months`,3)},n.weekdays=function(e){return a(o(),`weekdays`,null,null,e)},n.weekdaysShort=function(e){return a(o(),`weekdaysShort`,`weekdays`,3,e)},n.weekdaysMin=function(e){return a(o(),`weekdaysMin`,`weekdays`,2,e)}}}))})),wD=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekOfYear=r()})(e,(function(){var e=`week`,t=`year`;return function(n,r,i){var a=r.prototype;a.week=function(n){if(n===void 0&&(n=null),n!==null)return this.add(7*(n-this.week()),`day`);var r=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var a=i(this).startOf(t).add(1,t).date(r),o=i(this).endOf(e);if(a.isBefore(o))return 1}var s=i(this).startOf(t).date(r).startOf(e).subtract(1,`millisecond`),c=this.diff(s,e,!0);return c<0?i(this).startOf(`week`).week():Math.ceil(c)},a.weeks=function(e){return e===void 0&&(e=null),this.week(e)}}}))})),TD=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekYear=r()})(e,(function(){return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return t===1&&e===11?n+1:e===0&&t>=52?n-1:n}}}))})),ED=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),DD=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),OD=c(xD()),kD=c(SD()),AD=c(CD()),jD=c(wD()),MD=c(TD()),ND=c(ED()),PD=c(DD());OD.default.extend(PD.default),OD.default.extend(ND.default),OD.default.extend(kD.default),OD.default.extend(AD.default),OD.default.extend(jD.default),OD.default.extend(MD.default),OD.default.extend(function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=(e||``).replace(`Wo`,`wo`);return r.bind(this)(t)}});var FD={bn_BD:`bn-bd`,by_BY:`be`,en_GB:`en-gb`,en_US:`en`,fr_BE:`fr`,fr_CA:`fr-ca`,hy_AM:`hy-am`,kmr_IQ:`ku`,nl_BE:`nl-be`,pt_BR:`pt-br`,zh_CN:`zh-cn`,zh_HK:`zh-hk`,zh_TW:`zh-tw`},ID=function(e){return FD[e]||e.split(`_`)[0]},LD=function(e){return!OD.default.isDayjs(e)||e instanceof OD.default?e:(0,OD.default)(e.valueOf())},RD={getNow:function(){var e=(0,OD.default)();return typeof e.tz==`function`?e.tz():e},getFixedDate:function(e){return(0,OD.default)(e,[`YYYY-M-DD`,`YYYY-MM-DD`])},getEndDate:function(e){return LD(e).endOf(`month`)},getWeekDay:function(e){var t=LD(e).locale(`en`);return t.weekday()+t.localeData().firstDayOfWeek()},getYear:function(e){return LD(e).year()},getMonth:function(e){return LD(e).month()},getDate:function(e){return LD(e).date()},getHour:function(e){return LD(e).hour()},getMinute:function(e){return LD(e).minute()},getSecond:function(e){return LD(e).second()},getMillisecond:function(e){return LD(e).millisecond()},addYear:function(e,t){return LD(e).add(t,`year`)},addMonth:function(e,t){return LD(e).add(t,`month`)},addDate:function(e,t){return LD(e).add(t,`day`)},setYear:function(e,t){return LD(e).year(t)},setMonth:function(e,t){return LD(e).month(t)},setDate:function(e,t){return LD(e).date(t)},setHour:function(e,t){return LD(e).hour(t)},setMinute:function(e,t){return LD(e).minute(t)},setSecond:function(e,t){return LD(e).second(t)},setMillisecond:function(e,t){return LD(e).millisecond(t)},isAfter:function(e,t){return LD(e).isAfter(LD(t))},isValidate:function(e){return LD(e).isValid()},locale:{getWeekFirstDay:function(e){return(0,OD.default)().locale(ID(e)).localeData().firstDayOfWeek()},getWeekFirstDate:function(e,t){return LD(t).locale(ID(e)).weekday(0)},getWeek:function(e,t){return LD(t).locale(ID(e)).week()},getShortWeekDays:function(e){return(0,OD.default)().locale(ID(e)).localeData().weekdaysMin()},getShortMonths:function(e){return(0,OD.default)().locale(ID(e)).localeData().monthsShort()},format:function(e,t,n){return LD(t).locale(ID(e)).format(n)},parse:function(e,t,n){for(var r=ID(e),i=0;ie.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:`0`,r=String(e);r.lengthe.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=pO(S.useState([!1,!1]),2),i=r[0],a=r[1];return[S.useMemo(function(){return i.map(function(r,i){if(r)return!0;var a=e[i];return a?!!(!n[i]&&!a||a&&t(a,{activeIndex:i})):!1})},[e,i,t,n]),function(e,t){a(function(n){return tO(n,t,e)})}]}function bO(e){"@babel/helpers - typeof";return bO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},bO(e)}function xO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SO(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&(o=t.addDate(o,-7)),o}function dk(e,t){var n=t.generateConfig,r=t.locale,i=t.format;return e?typeof i==`function`?i(e):n.locale.format(r.locale,e,i):``}function fk(e,t,n){var r=t,i=[`getHour`,`getMinute`,`getSecond`,`getMillisecond`];return[`setHour`,`setMinute`,`setSecond`,`setMillisecond`].forEach(function(t,a){r=n?e[t](r,e[i[a]](n)):e[t](r,0)}),r}function pk(e,t,n,r,i){return Rn(function(a,o){return!!(n&&n(a,o)||r&&e.isAfter(r,a)&&!sk(e,t,r,a,o.type)||i&&e.isAfter(a,i)&&!sk(e,t,i,a,o.type))})}function mk(e){"@babel/helpers - typeof";return mk=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},mk(e)}function hk(e,t,n){return S.useMemo(function(){var r=eO(rO(e,t,n)),i=r[0],a=mk(i)===`object`&&i.type===`mask`?i.format:null;return[r.map(function(e){return typeof e==`string`||typeof e==`function`?e:e.format}),a]},[e,t,n])}function gk(e,t,n){return typeof e[0]==`function`||n?!0:t}function _k(e){"@babel/helpers - typeof";return _k=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_k(e)}function vk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yk(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;return S.useMemo(function(){var n=e&&eO(e);return t&&n&&(n[1]=n[1]||n[0]),n},[e,t])}function Lk(e,t){var n=e.generateConfig,r=e.locale,i=e.picker,a=i===void 0?`date`:i,o=e.prefixCls,s=o===void 0?`rc-picker`:o,c=e.previewValue,l=c===void 0?`hover`:c,u=e.styles,d=u===void 0?{}:u,f=e.classNames,p=f===void 0?{}:f,m=e.order,h=m===void 0?!0:m,g=e.components,_=g===void 0?{}:g,v=e.inputRender,y=e.allowClear,b=e.clearIcon,x=e.needConfirm,C=e.multiple,w=e.format,T=e.inputReadOnly,E=e.disabledDate,D=e.minDate,O=e.maxDate,k=e.showTime,A=e.value,j=e.defaultValue,M=e.pickerValue,N=e.defaultPickerValue,P=Ik(A),F=Ik(j),I=Ik(M),L=Ik(N),R=a===`date`&&k?`datetime`:a,z=R===`time`||R===`datetime`,B=z||C,V=x??z,H=Ak(qO(e),4),U=H[0],ee=H[1],te=H[2],ne=H[3],W=OO(r,ee),re=S.useMemo(function(){return JO(R,te,ne,U,W)},[R,te,ne,U,W]),G=S.useMemo(function(){return Ek(Ek({},e),{},{previewValue:l,prefixCls:s,locale:W,picker:a,styles:d,classNames:p,order:h,components:Ek({input:v},_),clearIcon:XO(s,y,b),showTime:re,value:P,defaultValue:F,pickerValue:I,defaultPickerValue:L},t?.())},[e]),K=Ak(hk(R,W,w),2),q=K[0],ie=K[1],J=gk(q,T,C),ae=pk(n,r,E,D,O),oe=Ck(n,a,ae,re);return[S.useMemo(function(){return Ek(Ek({},G),{},{needConfirm:V,inputReadOnly:J,disabledDate:ae})},[G,V,J,ae]),R,B,q,ie,oe]}function Rk(e,t){return Uk(e)||Hk(e,t)||Bk(e,t)||zk()}function zk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bk(e,t){if(e){if(typeof e==`string`)return Vk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vk(e,t)}}function Vk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,i=Gk(Wk(n.every(function(e){return e})?!1:e,t||!1,r),2),a=i[0],o=i[1];function s(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!t.inherit||a)&&o(e,t.force)}return[a,s]}function Qk(e){var t=S.useRef();return S.useImperativeHandle(e,function(){return{nativeElement:t.current?.nativeElement,focus:function(e){var n;(n=t.current)==null||n.focus(e)},blur:function(){var e;(e=t.current)==null||e.blur()}}}),t}function $k(e,t){return iA(e)||rA(e,t)||tA(e,t)||eA()}function eA(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tA(e,t){if(e){if(typeof e==`string`)return nA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nA(e,t)}}function nA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=S.useRef(t);r.current=t,Hn(function(){if(e)r.current(e);else{var t=Ei(function(){r.current(e)},n);return function(){Ei.cancel(t)}}},[e])}function sA(e,t){return fA(e)||dA(e,t)||lA(e,t)||cA()}function cA(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lA(e,t){if(e){if(typeof e==`string`)return uA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uA(e,t)}}function uA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=sA(S.useState(0),2),i=r[0],a=r[1],o=sA(S.useState(!1),2),s=o[0],c=o[1],l=S.useRef([]),u=S.useRef(null),d=S.useRef(null),f=function(e){u.current=e};return oA(s||n,function(){s||(l.current=[],f(null))}),S.useEffect(function(){s&&l.current.push(i)},[s,i]),[s,function(e){c(e)},function(e){return e&&(d.current=e),d.current},i,a,function(n){var r=l.current,i=new Set(r.filter(function(e){return n[e]||t[e]})),a=+(r[r.length-1]===0);return i.size>=2||e[a]?null:a},l.current,f,function(e){return u.current===e}]}function mA(e){"@babel/helpers - typeof";return mA=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},mA(e)}function hA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gA(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n8&&arguments[8]!==void 0?arguments[8]:PA,l=arguments.length>9&&arguments[9]!==void 0?arguments[9]:PA,u=arguments.length>10&&arguments[10]!==void 0?arguments[10]:PA,d=arguments.length>11?arguments[11]:void 0,f=arguments.length>12?arguments[12]:void 0,p=arguments.length>13?arguments[13]:void 0,m=o===`time`,h=a||0,g=function(t){var r=e.getNow();return m&&(r=fk(e,r)),c[t]||n[t]||r},_=DA(l,2),v=_[0],y=_[1],b=DA(Wn(function(){return g(0)},v),2),x=b[0],C=b[1],w=DA(Wn(function(){return g(1)},y),2),T=w[0],E=w[1],D=S.useMemo(function(){var t=[x,T][h];return m?t:fk(e,t,u[h])},[m,x,T,h,e,u]),O=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`panel`,a=[C,E][h];a(n);var s=[x,T];s[h]=n,d&&(!sk(e,t,x,s[0],o)||!sk(e,t,T,s[1],o))&&d(s,{source:i,range:h===1?`end`:`start`,mode:r})},k=function(n,r){if(s){var i={date:`month`,week:`month`,month:`year`,quarter:`year`}[o];if(i&&!sk(e,t,n,r,i)||o===`year`&&n&&Math.floor(e.getYear(n)/10)!==Math.floor(e.getYear(r)/10))return NA(e,o,r,-1)}return r},A=S.useRef(null);return Vn(function(){if(i&&!c[h]){var t=m?null:e.getNow();if(A.current!==null&&A.current!==h?t=[x,T][h^1]:n[h]?t=h===0?n[0]:k(n[0],n[1]):n[h^1]&&(t=n[h^1]),t){f&&e.isAfter(f,t)&&(t=f);var r=s?NA(e,o,t,1):t;p&&e.isAfter(r,p)&&(t=s?NA(e,o,p,-1):p),O(t,`reset`)}}},[i,h,n[h]]),S.useEffect(function(){i?A.current=h:A.current=null},[i,h]),Vn(function(){i&&c&&c[h]&&O(c[h],`reset`)},[i,h]),[D,O]}function IA(e,t){return VA(e)||BA(e,t)||RA(e,t)||LA()}function LA(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RA(e,t){if(e){if(typeof e==`string`)return zA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zA(e,t)}}function zA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:2,o=[],s=n>=1?n|0:1,c=e;c<=t;c+=s){var l=i.includes(c);(!l||!r)&&o.push({label:$D(c,a),value:c,disabled:l})}return o}function Dj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t||{},i=r.use12Hours,a=r.hourStep,o=a===void 0?1:a,s=r.minuteStep,c=s===void 0?1:s,l=r.secondStep,u=l===void 0?1:l,d=r.millisecondStep,f=d===void 0?100:d,p=r.hideDisabledOptions,m=r.disabledTime,h=r.disabledHours,g=r.disabledMinutes,_=r.disabledSeconds,v=S.useMemo(function(){return n||e.getNow()},[n,e]),y=S.useCallback(function(e){var t=m?.(e)||{};return[t.disabledHours||h||Tj,t.disabledMinutes||g||Tj,t.disabledSeconds||_||Tj,t.disabledMilliseconds||Tj]},[m,h,g,_]),b=yj(S.useMemo(function(){return y(v)},[v,y]),4),x=b[0],C=b[1],w=b[2],T=b[3],E=S.useCallback(function(e,t,n,r){var a=Ej(0,23,o,p,e());return[i?a.map(function(e){return hj(hj({},e),{},{label:$D(e.value%12||12,2)})}):a,function(e){return Ej(0,59,c,p,t(e))},function(e,t){return Ej(0,59,u,p,n(e,t))},function(e,t,n){return Ej(0,999,f,p,r(e,t,n),3)}]},[p,o,i,f,c,u]),D=yj(S.useMemo(function(){return E(x,C,w,T)},[E,x,C,w,T]),4),O=D[0],k=D[1],A=D[2],j=D[3];return[function(t,n){var r=function(){return O},i=k,a=A,o=j;if(n){var s=yj(y(n),4),c=s[0],l=s[1],u=s[2],d=s[3],f=yj(E(c,l,u,d),4),p=f[0],m=f[1],h=f[2],g=f[3];r=function(){return p},i=m,a=h,o=g}return fj(t,r,i,a,o,e)},O,k,A,j]}function Oj(e,t){return Nj(e)||Mj(e,t)||Aj(e,t)||kj()}function kj(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Aj(e,t){if(e){if(typeof e==`string`)return jj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jj(e,t)}}function jj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;de(e),_?.(e),t&&fe(e)},me=function(e,t){G(e),t&&pe(t),fe(t,e)},he=function(e){if(ce(e),pe(e),re!==x){var t=[`decade`,`year`],n=[].concat(t,[`month`]),r={quarter:[].concat(t,[`quarter`]),week:[].concat(xP(n),[`week`]),date:[].concat(xP(n),[`date`])}[x]||n,i=r[r.indexOf(re)+1];i&&me(i,e)}},ge=S.useMemo(function(){var e,t;if(Array.isArray(T)){var n=TP(T,2);e=n[0],t=n[1]}else e=T;return!e&&!t?null:(e||=t,t||=e,a.isAfter(e,t)?[t,e]:[e,t])},[T,a]),_e=fO(E,D,O),ve=A[K]||jP[K]||yM,ye=S.useMemo(function(){return{classNames:P?.popup??n??{},styles:F?.popup??r??{}}},[P,n,F,r]),be=S.useContext(Kj),xe=S.useMemo(function(){return _P(_P({},be),{},{hideHeader:j})},[be,j]),Se=`${I}-panel`,Ce=nO(e,[`showWeek`,`prevIcon`,`nextIcon`,`superPrevIcon`,`superNextIcon`,`disabledDate`,`minDate`,`maxDate`,`onHover`]);return S.createElement(Hj.Provider,{value:ye},S.createElement(Kj.Provider,{value:xe},S.createElement(`div`,{ref:L,tabIndex:l,className:Y(Se,vP({},`${Se}-rtl`,o===`rtl`))},S.createElement(ve,hP({},Ce,{showTime:te,prefixCls:I,locale:U,generateConfig:a,onModeChange:me,pickerValue:ue,onPickerValueChange:function(e){pe(e,!0)},value:oe[0],onSelect:he,values:oe,cellRender:_e,hoverRangeValue:ge,hoverValue:w})))))}var NP=S.memo(S.forwardRef(MP));function PP(e){"@babel/helpers - typeof";return PP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},PP(e)}function FP(){return FP=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _F(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function vF(e){var t=e.icon,n=e.type,r=gF(e,pF),i=S.useContext(BD),a=i.prefixCls,o=i.classNames,s=i.styles;return t?S.createElement(`span`,hF({className:Y(`${a}-${n}`,o.suffix),style:s.suffix},r),t):null}function yF(e){var t=e.onClear,n=gF(e,mF);return S.createElement(vF,hF({},n,{type:`clear`,role:`button`,onMouseDown:function(e){e.preventDefault()},onClick:function(e){e.stopPropagation(),t()}}))}function bF(e){"@babel/helpers - typeof";return bF=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},bF(e)}function xF(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function SF(e,t){for(var n=0;n=a&&e<=o)return r;var s=Math.min(Math.abs(e-a),Math.abs(e-o));se.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var GF=S.forwardRef(function(e,t){var n=e.className,r=e.active,i=e.showActiveCls,a=i===void 0?!0:i,o=e.suffixIcon,s=e.format,c=e.validateFormat,l=e.onChange;e.onInput;var u=e.helped,d=e.onHelp,f=e.onSubmit,p=e.onKeyDown,m=e.preserveInvalidOnBlur,h=m===void 0?!1:m,g=e.invalid,_=e.clearIcon,v=UF(e,MF),y=e.value,b=e.onFocus,x=e.onBlur,C=e.onMouseUp,w=S.useContext(BD),T=w.prefixCls,E=w.input,D=E===void 0?`input`:E,O=w.classNames,k=w.styles,A=`${T}-input`,j=LF(S.useState(!1),2),M=j[0],N=j[1],P=LF(S.useState(y),2),F=P[0],I=P[1],L=LF(S.useState(``),2),R=L[0],z=L[1],B=LF(S.useState(null),2),V=B[0],H=B[1],U=LF(S.useState(null),2),ee=U[0],te=U[1],ne=F||``;S.useEffect(function(){I(y)},[y]);var W=S.useRef(null),re=S.useRef(null),G=S.useRef(!1);S.useImperativeHandle(t,function(){return{nativeElement:W.current,inputElement:re.current,focus:function(e){re.current.focus(e)},blur:function(){re.current.blur()}}});var K=S.useMemo(function(){return new kF(s||``)},[s]),q=LF(S.useMemo(function(){return u?[0,0]:K.getSelection(V)},[K,V,u]),2),ie=q[0],J=q[1],ae=function(e){e&&e!==s&&e!==y&&d()},oe=Rn(function(e){c(e)&&l(e),I(e),ae(e)}),se=function(e){if(!s){var t=e.target.value;ae(t),I(t),l(t)}},ce=function(e){if(G.current){e.preventDefault();return}var t=e.clipboardData.getData(`text`);c(t)&&oe(t)},le=function(){G.current=!0},ue=function(e){var t=e.target.selectionStart;H(K.getMaskCellIndex(t)),te({}),C?.(e),G.current=!1},de=function(e){N(!0),H(0),z(``),b(e)},fe=function(e){x(e)},pe=function(e){N(!1),fe(e)};oA(r,function(){!r&&!h&&I(y)});var me=function(e){e.key===`Enter`&&c(ne)&&f(),p?.(e)},he=function(e){if(G.current){e.preventDefault();return}me(e);var t=e.key,n=null,r=null,i=J-ie,a=s.slice(ie,J),o=function(e){H(function(t){var n=t+e;return n=Math.max(n,0),n=Math.min(n,K.size()-1),n})},c=function(e){var t=LF(AF(a),3),n=t[0],r=t[1],i=t[2],o=ne.slice(ie,J),s=Number(o);if(isNaN(s))return String(i||(e>0?n:r));var c=s+e,l=r-n+1;return String(n+(l+c-n)%l)};switch(t){case`Backspace`:case`Delete`:n=``,r=a;break;case`ArrowLeft`:n=``,o(-1);break;case`ArrowRight`:n=``,o(1);break;case`ArrowUp`:n=``,r=c(1);break;case`ArrowDown`:n=``,r=c(-1);break;default:isNaN(Number(t))||(n=R+t,r=n);break}n!==null&&(z(n),n.length>=i&&(o(1),z(``))),r!==null&&oe((ne.slice(0,ie)+$D(r,i)+ne.slice(J)).slice(0,s.length)),te({})},ge=S.useRef();Vn(function(){if(!(!M||!s||G.current)){if(!K.match(ne)){oe(s);return}return re.current.setSelectionRange(ie,J),ge.current=Ei(function(){re.current.setSelectionRange(ie,J)}),function(){Ei.cancel(ge.current)}}},[K,s,M,ne,V,ie,J,ee,oe]);var _e=s?{onFocus:de,onBlur:pe,onKeyDown:he,onMouseDown:le,onMouseUp:ue,onPaste:ce}:{};return S.createElement(`div`,{ref:W,className:Y(A,PF(PF({},`${A}-active`,r&&a),`${A}-placeholder`,u),n)},S.createElement(D,NF({ref:re,"aria-invalid":g,autoComplete:`off`},v,{onKeyDown:me,onBlur:fe},_e,{value:ne,onChange:se,className:O.input,style:k.input})),S.createElement(vF,{type:`suffix`,icon:o}),_)}),KF=`id.prefix.clearIcon.suffixIcon.separator.activeIndex.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.value.onChange.onSubmit.onInputChange.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onActiveInfo.placement.onMouseDown.required.aria-required.autoFocus.tabIndex`.split(`.`),qF=[`index`];function JF(){return JF=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cI(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function lI(e,t){var n=e.id,r=e.prefix,i=e.clearIcon,a=e.suffixIcon,o=e.separator,s=o===void 0?`~`:o,c=e.activeIndex;e.activeHelp,e.allHelp;var l=e.focused;e.onFocus,e.onBlur,e.onKeyDown,e.locale,e.generateConfig;var u=e.placeholder,d=e.className,f=e.style,p=e.onClick,m=e.onClear,h=e.value;e.onChange,e.onSubmit,e.onInputChange,e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var g=e.disabled,_=e.invalid;e.inputReadOnly;var v=e.direction;e.onOpenChange;var y=e.onActiveInfo;e.placement;var b=e.onMouseDown;e.required,e[`aria-required`];var x=e.autoFocus,C=e.tabIndex,w=sI(e,KF),T=v===`rtl`,E=S.useContext(BD),D=E.prefixCls,O=E.classNames,k=E.styles,A=S.useMemo(function(){if(typeof n==`string`)return[n];var e=n||{};return[e.start,e.end]},[n]),j=S.useRef(),M=S.useRef(),N=S.useRef(),P=function(e){return[M,N][e]?.current};S.useImperativeHandle(t,function(){return{nativeElement:j.current,focus:function(e){if(oI(e)===`object`){var t,n=e||{},r=n.index,i=r===void 0?0:r,a=sI(n,qF);(t=P(i))==null||t.focus(a)}else{var o;(o=P(e??0))==null||o.focus()}},blur:function(){var e,t;(e=P(0))==null||e.blur(),(t=P(1))==null||t.blur()}}});var F=fF(w),I=S.useMemo(function(){return Array.isArray(u)?u:[u,u]},[u]),L=eI(uF(XF(XF({},e),{},{id:A,placeholder:I})),1)[0],R=eI(S.useState({position:`absolute`,width:0}),2),z=R[0],B=R[1],V=Rn(function(){var e=P(c);if(e){var t=e.nativeElement.getBoundingClientRect(),n=j.current.getBoundingClientRect(),r=t.left-n.left;B(function(e){return XF(XF({},e),{},{width:t.width,left:r})}),y([t.left,t.right,n.width])}});S.useEffect(function(){V()},[c]);var H=i&&(h[0]&&!g[0]||h[1]&&!g[1]),U=x&&!g[0],ee=x&&!U&&!g[1];return S.createElement(ia,{onResize:V},S.createElement(`div`,JF({},F,{className:Y(D,`${D}-range`,ZF(ZF(ZF(ZF({},`${D}-focused`,l),`${D}-disabled`,g.every(function(e){return e})),`${D}-invalid`,_.some(function(e){return e})),`${D}-rtl`,T),d),style:f,ref:j,onClick:p,onMouseDown:function(e){var t=e.target;t!==M.current.inputElement&&t!==N.current.inputElement&&e.preventDefault(),b?.(e)}}),r&&S.createElement(`div`,{className:Y(`${D}-prefix`,O.prefix),style:k.prefix},r),S.createElement(GF,JF({ref:M},L(0),{className:`${D}-input-start`,autoFocus:U,tabIndex:C,"date-range":`start`})),S.createElement(`div`,{className:`${D}-range-separator`},s),S.createElement(GF,JF({ref:N},L(1),{className:`${D}-input-end`,autoFocus:ee,tabIndex:C,"date-range":`end`})),S.createElement(`div`,{className:`${D}-active-bar`,style:z}),S.createElement(vF,{type:`suffix`,icon:a}),H&&S.createElement(yF,{icon:i,onClear:m})))}var uI=S.forwardRef(lI);function dI(e){"@babel/helpers - typeof";return dI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},dI(e)}function fI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pI(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0&&q.current.focus({index:n})}le(!0),K?.(e)},Ze=function(){ze(null),le(!1,{force:!0})},Qe=kI(S.useState(null),2),$e=Qe[0],et=Qe[1],tt=kI(S.useState(null),2),nt=tt[0],rt=tt[1],it=S.useMemo(function(){return nt||ge},[ge,nt]);S.useEffect(function(){se||rt(null)},[se]);var at=kI(S.useState([0,0,0]),2),ot=at[0],st=at[1],ct=function(e,t){p===`hover`&&(rt(e),et(t))},lt=aA(ee,te),ut=function(e){ct(e,`preset`)},dt=function(e){ze(e)&&(be(`preset-click`),le(!1,{force:!0}))},ft=function(e){Ye(e)},pt=function(e){ct(e?Je(e,xe):null,`cell`)},mt=function(e){le(!0),De(e)},ht=function(){be(`panel`)},gt=function(e){me(tO(ge,xe,e)),!g&&!a&&i===Pe&&Ye(e)},_t=function(){le(!1)},vt=fO(W,re,G,II(xe)),yt=ge[xe]||null,bt=Rn(function(e){return c(e,{activeIndex:xe})}),xt=S.useMemo(function(){var e=bi(r,!1);return hi(r,[].concat(bI(Object.keys(e)),[`onChange`,`onCalendarChange`,`style`,`className`,`onPanelChange`,`disabledTime`,`classNames`,`styles`]))},[r]),St=S.createElement(rF,yI({},xt,{showNow:Ie,showTime:ke,range:!0,multiplePanel:Fe,activeInfo:ot,disabledDate:Be,onFocus:mt,onBlur:Oe,onPanelMouseDown:ht,picker:k,mode:Ne,internalMode:Pe,onPanelChange:qe,format:s,value:yt,isInvalid:bt,onChange:null,onSelect:gt,pickerValue:Ge,defaultOpenValue:eO(M?.defaultOpenValue)[xe],onPickerValueChange:Ke,hoverValue:it,onHover:pt,needConfirm:g,onSubmit:Ye,onOk:he,presets:lt,onPresetHover:ut,onPresetSubmit:dt,onNow:ft,cellRender:vt,classNames:J,styles:ae})),Ct=function(e,t){me(Je(e,t))},wt=function(){be(`input`)},Tt=function(e,t){var n=we.length,r=we[n-1];if(n&&r!==t&&g&&!y[r]&&!Ee(r)&&ge[r]){q.current.focus({index:r});return}be(`input`),le(!0,{inherit:!0}),xe!==t&&se&&!g&&a&&Ye(null,!0),Se(t),De(e,t)},Et=function(e,t){le(!1),!g&&be()===`input`&&Re(xe,Ce(ge)===null),Oe(e,t)},Dt=function(e,t){e.key===`Tab`&&Ye(null,!0),_?.(e,t)},Ot=S.useMemo(function(){return{prefixCls:l,locale:D,generateConfig:O,button:ne.button,input:ne.input,classNames:J,styles:ae}},[l,D,O,ne.button,ne.input,J,ae]);return Vn(function(){se&&xe!==void 0&&qe(null,k,!1)},[se,xe,k]),Vn(function(){var e=be();!se&&e===`input`&&(le(!1),Ye(null,!0)),!se&&a&&!g&&e===`panel`&&(le(!0),Ye())},[se]),S.createElement(BD.Provider,{value:Ot},S.createElement(KD,yI({},aO(r),{popupElement:St,popupStyle:ae.popup.root,popupClassName:Y(u,J.popup.root),visible:se,onClose:_t,range:!0}),S.createElement(uI,yI({},r,{ref:q,className:Y(r.className,u,J.root),style:TI(TI({},ae.root),r.style),suffixIcon:V,activeIndex:ve||se?xe:null,activeHelp:!!nt,allHelp:!!nt&&$e===`preset`,focused:ve,onFocus:Tt,onBlur:Et,onKeyDown:Dt,onSubmit:Ye,value:it,maskFormat:s,onChange:Ct,onInputChange:wt,format:o,inputReadOnly:B,disabled:v,open:se,onOpenChange:le,onClick:Xe,onClear:Ze,invalid:He,onInvalid:Ue,onActiveInfo:st}))))}var RI=S.forwardRef(LI);function zI(e){var t=e.prefixCls,n=e.value,r=e.onRemove,i=e.removeIcon,a=i===void 0?`×`:i,o=e.formatDate,s=e.disabled,c=e.maxTagCount,l=e.placeholder,u=`${t}-selector`,d=`${t}-selection`,f=`${d}-overflow`;function p(e,t){return S.createElement(`span`,{className:Y(`${d}-item`),title:typeof e==`string`?e:null},S.createElement(`span`,{className:`${d}-item-content`},e),!s&&t&&S.createElement(`span`,{onMouseDown:function(e){e.preventDefault()},onClick:t,className:`${d}-item-remove`},a))}function m(e){return p(o(e),function(t){t&&t.stopPropagation(),r(e)})}function h(e){return p(`+ ${e.length} ...`)}return S.createElement(`div`,{className:u},S.createElement(yS,{prefixCls:f,data:n,renderItem:m,renderRest:h,itemKey:function(e){return o(e)},maxCount:c}),!n.length&&S.createElement(`span`,{className:`${t}-selection-placeholder`},l))}function BI(e){"@babel/helpers - typeof";return BI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},BI(e)}var VI=`id.open.prefix.clearIcon.suffixIcon.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.internalPicker.value.onChange.onSubmit.onInputChange.multiple.maxTagCount.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onMouseDown.required.aria-required.autoFocus.tabIndex.removeIcon`.split(`.`);function HI(){return HI=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tL(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function nL(e,t){e.id;var n=e.open,r=e.prefix,i=e.clearIcon,a=e.suffixIcon;e.activeHelp,e.allHelp;var o=e.focused;e.onFocus,e.onBlur,e.onKeyDown;var s=e.locale,c=e.generateConfig,l=e.placeholder,u=e.className,d=e.style,f=e.onClick,p=e.onClear,m=e.internalPicker,h=e.value,g=e.onChange,_=e.onSubmit;e.onInputChange;var v=e.multiple,y=e.maxTagCount;e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var b=e.disabled,x=e.invalid;e.inputReadOnly;var C=e.direction;e.onOpenChange;var w=e.onMouseDown;e.required,e[`aria-required`];var T=e.autoFocus,E=e.tabIndex,D=e.removeIcon,O=eL(e,VI),k=C===`rtl`,A=S.useContext(BD),j=A.prefixCls,M=A.classNames,N=A.styles,P=S.useRef(),F=S.useRef();S.useImperativeHandle(t,function(){return{nativeElement:P.current,focus:function(e){var t;(t=F.current)==null||t.focus(e)},blur:function(){var e;(e=F.current)==null||e.blur()}}});var I=fF(O),L=function(e){g([e])},R=function(e){g(h.filter(function(t){return t&&!sk(c,s,t,e,m)})),n||_()},z=JI(uF(WI(WI({},e),{},{onChange:L}),function(e){return{value:e.valueTexts[0]||``,active:o}}),2),B=z[0],V=z[1],H=!!(i&&h.length&&!b),U=v?S.createElement(S.Fragment,null,S.createElement(zI,{prefixCls:j,value:h,onRemove:R,formatDate:V,maxTagCount:y,disabled:b,removeIcon:D,placeholder:l}),S.createElement(`input`,{className:`${j}-multiple-input`,value:h.map(V).join(`,`),ref:F,readOnly:!0,autoFocus:T,tabIndex:E}),S.createElement(vF,{type:`suffix`,icon:a}),H&&S.createElement(yF,{icon:i,onClear:p})):S.createElement(GF,HI({ref:F},B(),{autoFocus:T,tabIndex:E,suffixIcon:a,clearIcon:H&&S.createElement(yF,{icon:i,onClear:p}),showActiveCls:!1}));return S.createElement(`div`,HI({},I,{className:Y(j,GI(GI(GI(GI(GI({},`${j}-multiple`,v),`${j}-focused`,o),`${j}-disabled`,b),`${j}-invalid`,x),`${j}-rtl`,k),u),style:d,ref:P,onClick:f,onMouseDown:function(e){e.target!==F.current?.inputElement&&e.preventDefault(),w?.(e)}}),r&&S.createElement(`div`,{className:Y(`${j}-prefix`,M.prefix),style:N.prefix},r),U)}var rL=S.forwardRef(nL);function iL(e){"@babel/helpers - typeof";return iL=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},iL(e)}function aL(){return aL=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne??{...t,__INTERNAL__:{itemRef:e=>t=>{let r=OL(e);t?n.current[r]=t:delete n.current[r]}},scrollToField:(e,t={})=>{let{focus:n,...i}=t,a=kL(e,r);a&&(ep(a,{scrollMode:`if-needed`,block:`nearest`,...i}),n&&r.focusField(e))},focusField:e=>{let t=r.getFieldInstance(e);typeof t?.focus==`function`?t.focus():kL(e,r)?.focus?.()},getFieldInstance:e=>{let t=OL(e);return n.current[t]}},[e,t]);return[r]}var jL=S.createContext(void 0),Pee=jL.Provider,ML=S.createContext(void 0),Fee=ML.Provider;function NL(){return NL=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n=`rc-checkbox`,className:r,style:i,checked:a,disabled:o,defaultChecked:s=!1,type:c=`checkbox`,title:l,onChange:u,...d}=e,f=(0,S.useRef)(null),p=(0,S.useRef)(null),[m,h]=Wn(s,a);(0,S.useImperativeHandle)(t,()=>({focus:e=>{f.current?.focus(e)},blur:()=>{f.current?.blur()},input:f.current,nativeElement:p.current}));let g=Y(n,r,{[`${n}-checked`]:m,[`${n}-disabled`]:o});return S.createElement(`span`,{className:g,title:l,style:i,ref:p},S.createElement(`input`,NL({},d,{className:`${n}-input`,ref:f,onChange:t=>{o||(`checked`in e||h(t.target.checked),u?.({target:{...e,type:c,checked:t.target.checked},stopPropagation(){t.stopPropagation()},preventDefault(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:o,checked:!!m,type:c})))});function FL(e){let t=S.useRef(null),n=()=>{Ei.cancel(t.current),t.current=null};return[()=>{n(),t.current=Ei(()=>{t.current=null})},r=>{t.current&&(r.stopPropagation(),n()),e?.(r)}]}var Iee=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:{...Vl(e),display:`inline-block`,fontSize:0,[`&${r}-rtl`]:{direction:`rtl`},[`&${r}-block`]:{display:`flex`},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:`none`},"&-vertical":{display:`flex`,flexDirection:`column`,rowGap:e.marginXS,[`${t}-wrapper`]:{marginInlineEnd:0}}}}},Lee=e=>{let{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,colorPrimaryHover:i,radioSize:a,motionDurationSlow:o,motionDurationMid:s,motionEaseInOutCirc:c,colorBgContainer:l,colorBorder:u,lineWidth:d,colorBgContainerDisabled:f,colorTextDisabled:p,paddingXS:m,dotColorDisabled:h,dotSize:g,lineType:_,radioColor:v,radioBgColor:y}=e;return{[`${t}-wrapper`]:{...Vl(e),display:`inline-flex`,alignItems:`baseline`,marginInlineStart:0,marginInlineEnd:n,cursor:`pointer`,"&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:`rtl`},"&-disabled":{cursor:`not-allowed`,color:e.colorTextDisabled},"&::after":{display:`inline-block`,width:0,overflow:`hidden`,content:`"\\a0"`},"&-block":{flex:1,justifyContent:`center`},[t]:{...Vl(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:`calc(${a} * 1px)`,height:`calc(${a} * 1px)`,backgroundColor:l,border:`${X(d)} ${_} ${u}`,borderRadius:`50%`,transition:`all ${s}`,flex:`none`,"&:after":{content:`""`,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%) scale(0)`,width:`calc(${g} * 1px)`,height:`calc(${g} * 1px)`,backgroundColor:v,borderRadius:`50%`,transformOrigin:`50% 50%`,opacity:0,transition:`all ${o} ${c}`},[`${t}-input`]:{position:`absolute`,inset:0,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:Wl(e)},[`&:hover:not(${t}-wrapper-disabled) ${t}`]:{borderColor:r},[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:i,borderColor:`transparent`},[`${t}-checked`]:{backgroundColor:y,borderColor:r,"&::after":{transform:`translate(-50%, -50%)`,opacity:1}},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:f,borderColor:u,"&::after":{backgroundColor:h}},[`${t}-disabled + span`]:{color:p,cursor:`not-allowed`},[`span${t} + *`]:{paddingInlineStart:m,paddingInlineEnd:m}}}},Ree=e=>{let{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:i,lineType:a,colorBorder:o,motionDurationMid:s,buttonPaddingInline:c,fontSize:l,buttonBg:u,fontSizeLG:d,controlHeightLG:f,controlHeightSM:p,paddingXS:m,borderRadius:h,borderRadiusSM:g,borderRadiusLG:_,buttonCheckedBg:v,buttonSolidCheckedColor:y,colorTextDisabled:b,colorBgContainerDisabled:x,buttonCheckedBgDisabled:S,buttonCheckedColorDisabled:C,colorPrimary:w,colorPrimaryHover:T,colorPrimaryActive:E,buttonSolidCheckedBg:D,buttonSolidCheckedHoverBg:O,buttonSolidCheckedActiveBg:k,calc:A}=e;return{[`${r}-button-wrapper`]:{position:`relative`,display:`inline-block`,height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:l,lineHeight:X(A(n).sub(A(i).mul(2)).equal()),background:u,border:`${X(i)} ${a} ${o}`,borderBlockStartWidth:A(i).add(.02).equal(),borderInlineEndWidth:i,cursor:`pointer`,transition:[`color`,`background-color`,`box-shadow`].map(e=>`${e} ${s}`).join(`,`),a:{color:t},[`> ${r}-button`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:`100%`,height:`100%`},"&:not(:last-child)":{marginInlineEnd:A(i).mul(-1).equal()},"&:first-child":{borderInlineStart:`${X(i)} ${a} ${o}`,borderStartStartRadius:h,borderEndStartRadius:h},"&:last-child":{borderStartEndRadius:h,borderEndEndRadius:h},"&:first-child:last-child":{borderRadius:h},[`${r}-group-large &`]:{height:f,fontSize:d,lineHeight:X(A(f).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:_,borderEndStartRadius:_},"&:last-child":{borderStartEndRadius:_,borderEndEndRadius:_}},[`${r}-group-small &`]:{height:p,paddingInline:A(m).sub(i).equal(),paddingBlock:0,lineHeight:X(A(p).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g}},"&:hover":{position:`relative`,color:w},"&:has(:focus-visible)":Wl(e),[`${r}, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:`none`},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:w,background:v,borderColor:w,"&::before":{backgroundColor:w},"&:first-child":{borderColor:w},"&:hover":{color:T,borderColor:T,"&::before":{backgroundColor:T}},"&:active":{color:E,borderColor:E,"&::before":{backgroundColor:E}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:y,background:D,borderColor:D,"&:hover":{color:y,background:O,borderColor:O},"&:active":{color:y,background:k,borderColor:k}},"&-disabled":{color:b,backgroundColor:x,borderColor:o,cursor:`not-allowed`,"&:first-child, &:hover":{color:b,backgroundColor:x,borderColor:o}},[`&-disabled${r}-button-wrapper-checked`]:{color:C,backgroundColor:S,borderColor:o,boxShadow:`none`},"&-block":{flex:1,textAlign:`center`}}}},IL=Xl(`Radio`,e=>{let{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${X(n)} ${t}`,i=lc(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[Iee(i),Lee(i),Ree(i)]},e=>{let{wireframe:t,padding:n,marginXS:r,lineWidth:i,fontSizeLG:a,colorText:o,colorBgContainer:s,colorTextDisabled:c,controlItemBgActiveDisabled:l,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:f,colorPrimaryActive:p,colorWhite:m}=e,h=a;return{radioSize:h,dotSize:t?h-8:h-(4+i)*2,dotColorDisabled:c,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:p,buttonBg:s,buttonCheckedBg:s,buttonColor:o,buttonCheckedBgDisabled:l,buttonCheckedColorDisabled:c,buttonPaddingInline:n-i,wrapperMarginInlineEnd:r,radioColor:t?d:m,radioBgColor:t?s:d}},{unitless:{radioSize:!0,dotSize:!0}}),LL=S.forwardRef((e,t)=>{let n=S.useContext(jL),r=S.useContext(ML),{getPrefixCls:i,direction:a,className:o,style:s,classNames:c,styles:l}=_a(`radio`),u=sr(t,S.useRef(null)),{isFormItemInput:d}=S.useContext(Iy),f=t=>{e.onChange?.(t),n?.onChange?.(t)},{prefixCls:p,className:m,rootClassName:h,children:g,style:_,title:v,classNames:y,styles:b,...x}=e,C=i(`radio`,p),w=(n?.optionType||r)===`button`,T=w?`${C}-button`:C,E=ap(C),[D,O]=IL(C,E),k={...x},A=S.useContext(pm),j=k.checked;n&&(k.name=n.name,k.onChange=f,j=e.value===n.value,k.disabled=k.disabled??n.disabled),k.disabled=k.disabled??A;let M={...e,...k,checked:j},[N,P]=xf([c,y],[l,b],{props:M}),F=Y(`${T}-wrapper`,{[`${T}-wrapper-checked`]:j,[`${T}-wrapper-disabled`]:k.disabled,[`${T}-wrapper-rtl`]:a===`rtl`,[`${T}-wrapper-in-form-item`]:d,[`${T}-wrapper-block`]:!!n?.block},o,m,h,N.root,D,O,E),[I,L]=FL(k.onClick);return S.createElement(Dh,{component:`Radio`,disabled:k.disabled},S.createElement(`label`,{className:F,style:{...P.root,...s,..._},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:v,onClick:I},S.createElement(PL,{...k,checked:j,className:Y(N.icon,{[bh]:!w}),style:P.icon,type:`radio`,prefixCls:T,ref:u,onClick:L}),g===void 0?null:S.createElement(`span`,{className:Y(`${T}-label`,N.label),style:P.label},g)))}),zee=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=S.useContext(ma),{name:i}=S.useContext(Iy),a=Yn(OL(i)),{prefixCls:o,className:s,rootClassName:c,options:l,buttonStyle:u=`outline`,disabled:d,children:f,size:p,style:m,id:h,optionType:g,name:_=a,defaultValue:v,value:y,block:b=!1,onChange:x,onMouseEnter:C,onMouseLeave:w,onFocus:T,onBlur:E,orientation:D,vertical:O,role:k=`radiogroup`}=e,[A,j]=Wn(v,y),M=S.useCallback(t=>{let n=A,r=t.target.value;`value`in e||j(r),r!==n&&x?.(t)},[A,j,x]),N=n(`radio`,o),P=`${N}-group`,F=ap(N),[I,L]=IL(N,F),R=f;l&&l.length>0&&(R=l.map(e=>typeof e==`string`||Qd(e)?S.createElement(LL,{key:e.toString(),prefixCls:N,disabled:d,value:e,checked:A===e},e):S.createElement(LL,{key:`radio-group-value-options-${e.value}`,prefixCls:N,disabled:e.disabled||d,value:e.value,checked:A===e.value,title:e.title,style:e.style,className:e.className,id:e.id,required:e.required},e.label)));let z=Oh(p),[,B]=wf(D,O),V=Y(P,`${P}-${u}`,{[`${P}-large`]:z===`large`,[`${P}-small`]:z===`small`,[`${P}-rtl`]:r===`rtl`,[`${P}-block`]:b},s,c,I,L,F),H=S.useMemo(()=>({onChange:M,value:A,disabled:d,name:_,optionType:g,block:b}),[M,A,d,_,g,b]);return S.createElement(`div`,{...bi(e,{aria:!0,data:!0}),role:k,className:Y(V,{[`${N}-group-vertical`]:B}),style:m,onMouseEnter:C,onMouseLeave:w,onFocus:T,onBlur:E,id:h,ref:t},S.createElement(Pee,{value:H},R))}),Bee=S.memo(zee),Vee=S.forwardRef((e,t)=>{let{getPrefixCls:n}=S.useContext(ma),{prefixCls:r,...i}=e,a=n(`radio`,r);return S.createElement(Fee,{value:`button`},S.createElement(LL,{prefixCls:a,...i,type:`radio`,ref:t}))}),RL=LL;RL.Button=Vee,RL.Group=Bee,RL.__ANT_RADIO=!0;function zL(e){return lc(e,{inputAffixPadding:e.paddingXXS})}var BL=e=>{let{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:a,controlHeightLG:o,fontSizeLG:s,lineHeightLG:c,paddingSM:l,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:p,colorPrimary:m,controlOutlineWidth:h,controlOutline:g,colorErrorOutline:_,colorWarningOutline:v,colorBgContainer:y,inputFontSize:b,inputFontSizeLG:x,inputFontSizeSM:S}=e,C=b||n,w=S||C,T=x||s,E=Math.round((t-C*r)/2*10)/10-i,D=Math.round((a-w*r)/2*10)/10-i,O=Math.ceil((o-T*c)/2*10)/10-i;return{paddingBlock:Math.max(E,0),paddingBlockSM:Math.max(D,0),paddingBlockLG:Math.max(O,0),paddingInline:l-i,paddingInlineSM:u-i,paddingInlineLG:d-i,addonBg:f,activeBorderColor:m,hoverBorderColor:p,activeShadow:`0 0 0 ${h}px ${g}`,errorActiveShadow:`0 0 0 ${h}px ${_}`,warningActiveShadow:`0 0 0 ${h}px ${v}`,hoverBg:y,activeBg:y,inputFontSize:C,inputFontSizeLG:T,inputFontSizeSM:w}},Hee=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),VL=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorderDisabled,boxShadow:`none`,cursor:`not-allowed`,opacity:1,"input[disabled], textarea[disabled]":{cursor:`not-allowed`},"&:hover:not([disabled])":{...Hee(lc(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),HL=(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}}),UL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...HL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),WL=(e,t)=>({"&-outlined":{...HL(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...VL(e)},...UL(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...UL(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),GL=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),Uee=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...GL(e,{status:`error`,addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...GL(e,{status:`warning`,addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...VL(e)}}}}),KL=(e,t)=>{let{componentCls:n}=e;return{"&-borderless":{background:`transparent`,border:`none`,paddingBlock:e.calc(e.paddingBlock).add(e.lineWidth).equal(),[`&${n}-sm, &${n}-affix-wrapper-sm`]:{paddingBlock:e.calc(e.paddingBlockSM).add(e.lineWidth).equal()},[`&${n}-lg, &${n}-affix-wrapper-lg`]:{paddingBlock:e.calc(e.paddingBlockLG).add(e.lineWidth).equal()},"&: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}}},qL=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:`transparent`,"input&, & input, textarea&, & textarea":{color:t?.inputColor??`unset`},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),JL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...qL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),YL=(e,t)=>({"&-filled":{...qL(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...VL(e)},...JL(e,{status:`error`,bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError}),...JL(e,{status:`warning`,bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning}),...t}}),XL=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),Wee=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:`static`}},...XL(e,{status:`error`,addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...XL(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:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),ZL=(e,t)=>({background:e.colorBgContainer,borderWidth:`${X(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),QL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...ZL(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`}}),$L=(e,t)=>({"&-underlined":{...ZL(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`},...QL(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...QL(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),eR=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:`none`},"&:placeholder-shown":{textOverflow:`ellipsis`}}),tR=e=>{let{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=e;return{padding:`${X(t)} ${X(i)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},nR=e=>({padding:`${X(e.paddingBlockSM)} ${X(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),rR=(e,t={})=>({position:`relative`,display:`inline-block`,width:`100%`,minWidth:0,padding:`${X(e.paddingBlock)} ${X(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...eR(e.colorTextPlaceholder),"&-lg":{...tR(e),...t.largeStyle},"&-sm":{...nR(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:`rtl`}}),Gee=e=>{let{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`]:{...tR(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...nR(e)},[`&-lg ${n}-select-single`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single`]:{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 ${X(e.paddingInline)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.inputFontSize,textAlign:`center`,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${X(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${X(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{backgroundColor:`inherit`,border:`${X(e.lineWidth)} ${e.lineType} transparent`,boxShadow:`none`}},[`${n}-cascader-picker`]:{margin:`-9px ${X(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}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select`]:{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`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:`block`,...Ul(),[`${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},[` + &${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-topRight`]:{animationName:dg}}},Fw(e,h,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${n}`]:{position:`relative`,margin:0},[`${n}-submenu-popup`]:{position:`absolute`,zIndex:r,background:`transparent`,boxShadow:`none`,transformOrigin:`0 0`,"ul, li":{listStyle:`none`,margin:0}},[`${t}, ${t}-menu-submenu`]:{...Vl(e),[n]:{padding:d,listStyleType:`none`,backgroundColor:h,backgroundClip:`padding-box`,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,...Gl(e),"&:empty":{padding:0,boxShadow:`none`},[`${n}-item-group-title`]:{padding:`${X(l)} ${X(m)}`,color:e.colorTextDescription,transition:`all ${c}`},[`${n}-item`]:{position:`relative`,display:`flex`,alignItems:`center`},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:`auto`,"&-with-extra":{display:`inline-flex`,alignItems:`center`,width:`100%`},"> a":{color:`inherit`,transition:`all ${c}`,"&:hover":{color:`inherit`},"&::after":{position:`absolute`,inset:0,content:`""`}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:`auto`,fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:{display:`flex`,margin:0,padding:`${X(l)} ${X(m)}`,color:e.colorText,fontWeight:`normal`,fontSize:u,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${c}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...Gl(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:`not-allowed`,"&:hover":{color:f,backgroundColor:h,cursor:`not-allowed`},a:{pointerEvents:`none`}},"&-divider":{height:1,margin:`${X(e.marginXXS)} 0`,overflow:`hidden`,lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:`absolute`,insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:`0 !important`,color:e.colorIcon,fontSize:p,fontStyle:`normal`}}},[`${n}-item-group-list`]:{margin:`0 ${X(e.marginXS)}`,padding:0,listStyle:`none`},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(m).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:`relative`},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:h,cursor:`not-allowed`}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[_g(e,`slide-up`),_g(e,`slide-down`),sg(e,`move-up`),sg(e,`move-down`),Mg(e,`zoom-big`)]]},hD=Xl(`Dropdown`,e=>{let{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:i}=e,a=lc(e,{menuCls:`${i}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[mD(a),pD(a)]},e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...Nw({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...jw(e)}),{resetStyle:!1}),gD=e=>{let{menu:t,arrow:n,prefixCls:r,children:i,trigger:a,disabled:o,dropdownRender:s,popupRender:c,getPopupContainer:l,overlayClassName:u,rootClassName:d,overlayStyle:f,open:p,onOpenChange:m,mouseEnterDelay:h=.15,mouseLeaveDelay:g=.1,autoAdjustOverflow:_=!0,placement:v=``,transitionName:y,classNames:b,styles:x,destroyPopupOnHide:C,destroyOnHidden:w}=e,{getPrefixCls:T,direction:E,getPopupContainer:D,className:O,style:k,classNames:A,styles:j}=_a(`dropdown`),M={...e,mouseEnterDelay:h,mouseLeaveDelay:g,autoAdjustOverflow:_},[N,P]=xf([A,b],[j,x],{props:M}),F={...k,...f,...P.root},I=c||s;Ui(`Dropdown`);let L=S.useMemo(()=>{let e=T();return y===void 0?v.includes(`top`)?`${e}-slide-down`:`${e}-slide-up`:y},[T,v,y]),R=S.useMemo(()=>v?v.includes(`Center`)?v.slice(0,v.indexOf(`Center`)):v:E===`rtl`?`bottomRight`:`bottomLeft`,[v,E]),z=T(`dropdown`,r),B=ap(z),[V,H]=hD(z,B),[,U]=zl(),ee=S.Children.only(rf(i)?S.createElement(`span`,null,i):i),te=cm(ee,{className:Y(`${z}-trigger`,{[`${z}-rtl`]:E===`rtl`},ee.props.className),disabled:ee.props.disabled??o}),ne=o?[]:a,W=!!ne?.includes(`contextMenu`),[re,G]=Wn(!1,p),K=Rn(e=>{m?.(e,{source:`trigger`}),G(e)}),q=Y(u,d,V,H,B,O,N.root,{[`${z}-rtl`]:E===`rtl`}),ie=Bw({arrowPointAtCenter:ef(n)&&n.pointAtCenter,autoAdjustOverflow:_,offset:U.marginXXS,arrowWidth:n?U.sizePopupArrow:0,borderRadius:U.borderRadius}),J=Rn(()=>{t?.selectable&&t?.multiple||(m?.(!1,{source:`menu`}),G(!1))}),ae=()=>{let e=hi(N,[`root`]),n=hi(P,[`root`]),r;return t?.items&&(r=S.createElement(fD,{...t,classNames:{...e,subMenu:{...e}},styles:{...n,subMenu:{...n}}})),I&&(r=I(r)),r=S.Children.only(typeof r==`string`?S.createElement(`span`,null,r):r),S.createElement(XE,{prefixCls:`${z}-menu`,rootClassName:Y(H,B),expandIcon:S.createElement(`span`,{className:`${z}-menu-submenu-arrow`},E===`rtl`?S.createElement(pT,{className:`${z}-menu-submenu-arrow-icon`}):S.createElement(Ug,{className:`${z}-menu-submenu-arrow-icon`})),mode:`vertical`,selectable:!1,onClick:J,validator:({mode:e})=>{}},r)},[oe,se]=Ff(`Dropdown`,F.zIndex),ce=S.createElement(vT,{alignPoint:W,...hi(e,[`rootClassName`,`onOpenChange`]),mouseEnterDelay:h,mouseLeaveDelay:g,visible:re,builtinPlacements:ie,arrow:!!n,overlayClassName:q,prefixCls:z,getPopupContainer:l||D,transitionName:L,trigger:ne,overlay:ae,placement:R,onVisibleChange:K,overlayStyle:{...F,zIndex:oe},autoDestroy:w??C},te);return oe&&(ce=S.createElement(kf.Provider,{value:se},ce)),ce},_D=Ex(gD,`align`,void 0,`dropdown`,e=>e);gD._InternalPanelDoNotUseOrYouWillBeFired=e=>S.createElement(_D,{...e},S.createElement(`span`,null));var vD=E_,yD=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e){(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekday=r()})(e,(function(){return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,n=this.$W,r=(n{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_localeData=r()})(e,(function(){return function(e,t,n){var r=t.prototype,i=function(e){return e&&(e.indexOf?e:e.s)},a=function(e,t,n,r,a){var o=e.name?e:e.$locale(),s=i(o[t]),c=i(o[n]),l=s||c.map((function(e){return e.slice(0,r)}));if(!a)return l;var u=o.weekStart;return l.map((function(e,t){return l[(t+(u||0))%7]}))},o=function(){return n.Ls[n.locale()]},s=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}(e.formats[t.toUpperCase()])},c=function(){var e=this;return{months:function(t){return t?t.format(`MMMM`):a(e,`months`)},monthsShort:function(t){return t?t.format(`MMM`):a(e,`monthsShort`,`months`,3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format(`dddd`):a(e,`weekdays`)},weekdaysMin:function(t){return t?t.format(`dd`):a(e,`weekdaysMin`,`weekdays`,2)},weekdaysShort:function(t){return t?t.format(`ddd`):a(e,`weekdaysShort`,`weekdays`,3)},longDateFormat:function(t){return s(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return c.bind(this)()},n.localeData=function(){var e=o();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(t){return s(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return a(o(),`months`)},n.monthsShort=function(){return a(o(),`monthsShort`,`months`,3)},n.weekdays=function(e){return a(o(),`weekdays`,null,null,e)},n.weekdaysShort=function(e){return a(o(),`weekdaysShort`,`weekdays`,3,e)},n.weekdaysMin=function(e){return a(o(),`weekdaysMin`,`weekdays`,2,e)}}}))})),SD=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekOfYear=r()})(e,(function(){var e=`week`,t=`year`;return function(n,r,i){var a=r.prototype;a.week=function(n){if(n===void 0&&(n=null),n!==null)return this.add(7*(n-this.week()),`day`);var r=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var a=i(this).startOf(t).add(1,t).date(r),o=i(this).endOf(e);if(a.isBefore(o))return 1}var s=i(this).startOf(t).date(r).startOf(e).subtract(1,`millisecond`),c=this.diff(s,e,!0);return c<0?i(this).startOf(`week`).week():Math.ceil(c)},a.weeks=function(e){return e===void 0&&(e=null),this.week(e)}}}))})),CD=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekYear=r()})(e,(function(){return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return t===1&&e===11?n+1:e===0&&t>=52?n-1:n}}}))})),wD=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),TD=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),ED=c(yD()),DD=c(bD()),OD=c(xD()),kD=c(SD()),AD=c(CD()),jD=c(wD()),MD=c(TD());ED.default.extend(MD.default),ED.default.extend(jD.default),ED.default.extend(DD.default),ED.default.extend(OD.default),ED.default.extend(kD.default),ED.default.extend(AD.default),ED.default.extend(function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=(e||``).replace(`Wo`,`wo`);return r.bind(this)(t)}});var ND={bn_BD:`bn-bd`,by_BY:`be`,en_GB:`en-gb`,en_US:`en`,fr_BE:`fr`,fr_CA:`fr-ca`,hy_AM:`hy-am`,kmr_IQ:`ku`,nl_BE:`nl-be`,pt_BR:`pt-br`,zh_CN:`zh-cn`,zh_HK:`zh-hk`,zh_TW:`zh-tw`},PD=function(e){return ND[e]||e.split(`_`)[0]},FD=function(e){return!ED.default.isDayjs(e)||e instanceof ED.default?e:(0,ED.default)(e.valueOf())},ID={getNow:function(){var e=(0,ED.default)();return typeof e.tz==`function`?e.tz():e},getFixedDate:function(e){return(0,ED.default)(e,[`YYYY-M-DD`,`YYYY-MM-DD`])},getEndDate:function(e){return FD(e).endOf(`month`)},getWeekDay:function(e){var t=FD(e).locale(`en`);return t.weekday()+t.localeData().firstDayOfWeek()},getYear:function(e){return FD(e).year()},getMonth:function(e){return FD(e).month()},getDate:function(e){return FD(e).date()},getHour:function(e){return FD(e).hour()},getMinute:function(e){return FD(e).minute()},getSecond:function(e){return FD(e).second()},getMillisecond:function(e){return FD(e).millisecond()},addYear:function(e,t){return FD(e).add(t,`year`)},addMonth:function(e,t){return FD(e).add(t,`month`)},addDate:function(e,t){return FD(e).add(t,`day`)},setYear:function(e,t){return FD(e).year(t)},setMonth:function(e,t){return FD(e).month(t)},setDate:function(e,t){return FD(e).date(t)},setHour:function(e,t){return FD(e).hour(t)},setMinute:function(e,t){return FD(e).minute(t)},setSecond:function(e,t){return FD(e).second(t)},setMillisecond:function(e,t){return FD(e).millisecond(t)},isAfter:function(e,t){return FD(e).isAfter(FD(t))},isValidate:function(e){return FD(e).isValid()},locale:{getWeekFirstDay:function(e){return(0,ED.default)().locale(PD(e)).localeData().firstDayOfWeek()},getWeekFirstDate:function(e,t){return FD(t).locale(PD(e)).weekday(0)},getWeek:function(e,t){return FD(t).locale(PD(e)).week()},getShortWeekDays:function(e){return(0,ED.default)().locale(PD(e)).localeData().weekdaysMin()},getShortMonths:function(e){return(0,ED.default)().locale(PD(e)).localeData().monthsShort()},format:function(e,t,n){return FD(t).locale(PD(e)).format(n)},parse:function(e,t,n){for(var r=PD(e),i=0;ie.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:`0`,r=String(e);r.lengthe.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=dO(S.useState([!1,!1]),2),i=r[0],a=r[1];return[S.useMemo(function(){return i.map(function(r,i){if(r)return!0;var a=e[i];return a?!!(!n[i]&&!a||a&&t(a,{activeIndex:i})):!1})},[e,i,t,n]),function(e,t){a(function(n){return $D(n,t,e)})}]}function vO(e){"@babel/helpers - typeof";return vO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},vO(e)}function yO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bO(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&(o=t.addDate(o,-7)),o}function lk(e,t){var n=t.generateConfig,r=t.locale,i=t.format;return e?typeof i==`function`?i(e):n.locale.format(r.locale,e,i):``}function uk(e,t,n){var r=t,i=[`getHour`,`getMinute`,`getSecond`,`getMillisecond`];return[`setHour`,`setMinute`,`setSecond`,`setMillisecond`].forEach(function(t,a){r=n?e[t](r,e[i[a]](n)):e[t](r,0)}),r}function dk(e,t,n,r,i){return Rn(function(a,o){return!!(n&&n(a,o)||r&&e.isAfter(r,a)&&!ak(e,t,r,a,o.type)||i&&e.isAfter(a,i)&&!ak(e,t,i,a,o.type))})}function fk(e){"@babel/helpers - typeof";return fk=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},fk(e)}function pk(e,t,n){return S.useMemo(function(){var r=QD(tO(e,t,n)),i=r[0],a=fk(i)===`object`&&i.type===`mask`?i.format:null;return[r.map(function(e){return typeof e==`string`||typeof e==`function`?e:e.format}),a]},[e,t,n])}function mk(e,t,n){return typeof e[0]==`function`||n?!0:t}function hk(e){"@babel/helpers - typeof";return hk=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},hk(e)}function gk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _k(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;return S.useMemo(function(){var n=e&&QD(e);return t&&n&&(n[1]=n[1]||n[0]),n},[e,t])}function Fk(e,t){var n=e.generateConfig,r=e.locale,i=e.picker,a=i===void 0?`date`:i,o=e.prefixCls,s=o===void 0?`rc-picker`:o,c=e.previewValue,l=c===void 0?`hover`:c,u=e.styles,d=u===void 0?{}:u,f=e.classNames,p=f===void 0?{}:f,m=e.order,h=m===void 0?!0:m,g=e.components,_=g===void 0?{}:g,v=e.inputRender,y=e.allowClear,b=e.clearIcon,x=e.needConfirm,C=e.multiple,w=e.format,T=e.inputReadOnly,E=e.disabledDate,D=e.minDate,O=e.maxDate,k=e.showTime,A=e.value,j=e.defaultValue,M=e.pickerValue,N=e.defaultPickerValue,P=Pk(A),F=Pk(j),I=Pk(M),L=Pk(N),R=a===`date`&&k?`datetime`:a,z=R===`time`||R===`datetime`,B=z||C,V=x??z,H=Ok(GO(e),4),U=H[0],ee=H[1],te=H[2],ne=H[3],W=EO(r,ee),re=S.useMemo(function(){return KO(R,te,ne,U,W)},[R,te,ne,U,W]),G=S.useMemo(function(){return wk(wk({},e),{},{previewValue:l,prefixCls:s,locale:W,picker:a,styles:d,classNames:p,order:h,components:wk({input:v},_),clearIcon:JO(s,y,b),showTime:re,value:P,defaultValue:F,pickerValue:I,defaultPickerValue:L},t?.())},[e]),K=Ok(pk(R,W,w),2),q=K[0],ie=K[1],J=mk(q,T,C),ae=dk(n,r,E,D,O),oe=xk(n,a,ae,re);return[S.useMemo(function(){return wk(wk({},G),{},{needConfirm:V,inputReadOnly:J,disabledDate:ae})},[G,V,J,ae]),R,B,q,ie,oe]}function Ik(e,t){return Vk(e)||Bk(e,t)||Rk(e,t)||Lk()}function Lk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rk(e,t){if(e){if(typeof e==`string`)return zk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zk(e,t)}}function zk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,i=Uk(Hk(n.every(function(e){return e})?!1:e,t||!1,r),2),a=i[0],o=i[1];function s(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!t.inherit||a)&&o(e,t.force)}return[a,s]}function Xk(e){var t=S.useRef();return S.useImperativeHandle(e,function(){return{nativeElement:t.current?.nativeElement,focus:function(e){var n;(n=t.current)==null||n.focus(e)},blur:function(){var e;(e=t.current)==null||e.blur()}}}),t}function Zk(e,t){return nA(e)||tA(e,t)||$k(e,t)||Qk()}function Qk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $k(e,t){if(e){if(typeof e==`string`)return eA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eA(e,t)}}function eA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=S.useRef(t);r.current=t,Hn(function(){if(e)r.current(e);else{var t=Ei(function(){r.current(e)},n);return function(){Ei.cancel(t)}}},[e])}function aA(e,t){return uA(e)||lA(e,t)||sA(e,t)||oA()}function oA(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sA(e,t){if(e){if(typeof e==`string`)return cA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cA(e,t)}}function cA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=aA(S.useState(0),2),i=r[0],a=r[1],o=aA(S.useState(!1),2),s=o[0],c=o[1],l=S.useRef([]),u=S.useRef(null),d=S.useRef(null),f=function(e){u.current=e};return iA(s||n,function(){s||(l.current=[],f(null))}),S.useEffect(function(){s&&l.current.push(i)},[s,i]),[s,function(e){c(e)},function(e){return e&&(d.current=e),d.current},i,a,function(n){var r=l.current,i=new Set(r.filter(function(e){return n[e]||t[e]})),a=+(r[r.length-1]===0);return i.size>=2||e[a]?null:a},l.current,f,function(e){return u.current===e}]}function fA(e){"@babel/helpers - typeof";return fA=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},fA(e)}function pA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mA(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n8&&arguments[8]!==void 0?arguments[8]:MA,l=arguments.length>9&&arguments[9]!==void 0?arguments[9]:MA,u=arguments.length>10&&arguments[10]!==void 0?arguments[10]:MA,d=arguments.length>11?arguments[11]:void 0,f=arguments.length>12?arguments[12]:void 0,p=arguments.length>13?arguments[13]:void 0,m=o===`time`,h=a||0,g=function(t){var r=e.getNow();return m&&(r=uk(e,r)),c[t]||n[t]||r},_=TA(l,2),v=_[0],y=_[1],b=TA(Wn(function(){return g(0)},v),2),x=b[0],C=b[1],w=TA(Wn(function(){return g(1)},y),2),T=w[0],E=w[1],D=S.useMemo(function(){var t=[x,T][h];return m?t:uk(e,t,u[h])},[m,x,T,h,e,u]),O=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`panel`,a=[C,E][h];a(n);var s=[x,T];s[h]=n,d&&(!ak(e,t,x,s[0],o)||!ak(e,t,T,s[1],o))&&d(s,{source:i,range:h===1?`end`:`start`,mode:r})},k=function(n,r){if(s){var i={date:`month`,week:`month`,month:`year`,quarter:`year`}[o];if(i&&!ak(e,t,n,r,i)||o===`year`&&n&&Math.floor(e.getYear(n)/10)!==Math.floor(e.getYear(r)/10))return jA(e,o,r,-1)}return r},A=S.useRef(null);return Vn(function(){if(i&&!c[h]){var t=m?null:e.getNow();if(A.current!==null&&A.current!==h?t=[x,T][h^1]:n[h]?t=h===0?n[0]:k(n[0],n[1]):n[h^1]&&(t=n[h^1]),t){f&&e.isAfter(f,t)&&(t=f);var r=s?jA(e,o,t,1):t;p&&e.isAfter(r,p)&&(t=s?jA(e,o,p,-1):p),O(t,`reset`)}}},[i,h,n[h]]),S.useEffect(function(){i?A.current=h:A.current=null},[i,h]),Vn(function(){i&&c&&c[h]&&O(c[h],`reset`)},[i,h]),[D,O]}function PA(e,t){return zA(e)||RA(e,t)||IA(e,t)||FA()}function FA(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IA(e,t){if(e){if(typeof e==`string`)return LA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return LA(e,t)}}function LA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:2,o=[],s=n>=1?n|0:1,c=e;c<=t;c+=s){var l=i.includes(c);(!l||!r)&&o.push({label:ZD(c,a),value:c,disabled:l})}return o}function Tj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t||{},i=r.use12Hours,a=r.hourStep,o=a===void 0?1:a,s=r.minuteStep,c=s===void 0?1:s,l=r.secondStep,u=l===void 0?1:l,d=r.millisecondStep,f=d===void 0?100:d,p=r.hideDisabledOptions,m=r.disabledTime,h=r.disabledHours,g=r.disabledMinutes,_=r.disabledSeconds,v=S.useMemo(function(){return n||e.getNow()},[n,e]),y=S.useCallback(function(e){var t=m?.(e)||{};return[t.disabledHours||h||Cj,t.disabledMinutes||g||Cj,t.disabledSeconds||_||Cj,t.disabledMilliseconds||Cj]},[m,h,g,_]),b=_j(S.useMemo(function(){return y(v)},[v,y]),4),x=b[0],C=b[1],w=b[2],T=b[3],E=S.useCallback(function(e,t,n,r){var a=wj(0,23,o,p,e());return[i?a.map(function(e){return pj(pj({},e),{},{label:ZD(e.value%12||12,2)})}):a,function(e){return wj(0,59,c,p,t(e))},function(e,t){return wj(0,59,u,p,n(e,t))},function(e,t,n){return wj(0,999,f,p,r(e,t,n),3)}]},[p,o,i,f,c,u]),D=_j(S.useMemo(function(){return E(x,C,w,T)},[E,x,C,w,T]),4),O=D[0],k=D[1],A=D[2],j=D[3];return[function(t,n){var r=function(){return O},i=k,a=A,o=j;if(n){var s=_j(y(n),4),c=s[0],l=s[1],u=s[2],d=s[3],f=_j(E(c,l,u,d),4),p=f[0],m=f[1],h=f[2],g=f[3];r=function(){return p},i=m,a=h,o=g}return uj(t,r,i,a,o,e)},O,k,A,j]}function Ej(e,t){return jj(e)||Aj(e,t)||Oj(e,t)||Dj()}function Dj(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Oj(e,t){if(e){if(typeof e==`string`)return kj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kj(e,t)}}function kj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;de(e),_?.(e),t&&fe(e)},me=function(e,t){G(e),t&&pe(t),fe(t,e)},he=function(e){if(ce(e),pe(e),re!==x){var t=[`decade`,`year`],n=[].concat(t,[`month`]),r={quarter:[].concat(t,[`quarter`]),week:[].concat(bP(n),[`week`]),date:[].concat(bP(n),[`date`])}[x]||n,i=r[r.indexOf(re)+1];i&&me(i,e)}},ge=S.useMemo(function(){var e,t;if(Array.isArray(T)){var n=wP(T,2);e=n[0],t=n[1]}else e=T;return!e&&!t?null:(e||=t,t||=e,a.isAfter(e,t)?[t,e]:[e,t])},[T,a]),_e=uO(E,D,O),ve=A[K]||AP[K]||_M,ye=S.useMemo(function(){return{classNames:P?.popup??n??{},styles:F?.popup??r??{}}},[P,n,F,r]),be=S.useContext(Wj),xe=S.useMemo(function(){return gP(gP({},be),{},{hideHeader:j})},[be,j]),Se=`${I}-panel`,Ce=eO(e,[`showWeek`,`prevIcon`,`nextIcon`,`superPrevIcon`,`superNextIcon`,`disabledDate`,`minDate`,`maxDate`,`onHover`]);return S.createElement(Bj.Provider,{value:ye},S.createElement(Wj.Provider,{value:xe},S.createElement(`div`,{ref:L,tabIndex:l,className:Y(Se,_P({},`${Se}-rtl`,o===`rtl`))},S.createElement(ve,mP({},Ce,{showTime:te,prefixCls:I,locale:U,generateConfig:a,onModeChange:me,pickerValue:ue,onPickerValueChange:function(e){pe(e,!0)},value:oe[0],onSelect:he,values:oe,cellRender:_e,hoverRangeValue:ge,hoverValue:w})))))}var MP=S.memo(S.forwardRef(jP));function NP(e){"@babel/helpers - typeof";return NP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},NP(e)}function PP(){return PP=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function _F(e){var t=e.icon,n=e.type,r=hF(e,fF),i=S.useContext(RD),a=i.prefixCls,o=i.classNames,s=i.styles;return t?S.createElement(`span`,mF({className:Y(`${a}-${n}`,o.suffix),style:s.suffix},r),t):null}function vF(e){var t=e.onClear,n=hF(e,pF);return S.createElement(_F,mF({},n,{type:`clear`,role:`button`,onMouseDown:function(e){e.preventDefault()},onClick:function(e){e.stopPropagation(),t()}}))}function yF(e){"@babel/helpers - typeof";return yF=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},yF(e)}function bF(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function xF(e,t){for(var n=0;n=a&&e<=o)return r;var s=Math.min(Math.abs(e-a),Math.abs(e-o));se.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var WF=S.forwardRef(function(e,t){var n=e.className,r=e.active,i=e.showActiveCls,a=i===void 0?!0:i,o=e.suffixIcon,s=e.format,c=e.validateFormat,l=e.onChange;e.onInput;var u=e.helped,d=e.onHelp,f=e.onSubmit,p=e.onKeyDown,m=e.preserveInvalidOnBlur,h=m===void 0?!1:m,g=e.invalid,_=e.clearIcon,v=HF(e,jF),y=e.value,b=e.onFocus,x=e.onBlur,C=e.onMouseUp,w=S.useContext(RD),T=w.prefixCls,E=w.input,D=E===void 0?`input`:E,O=w.classNames,k=w.styles,A=`${T}-input`,j=IF(S.useState(!1),2),M=j[0],N=j[1],P=IF(S.useState(y),2),F=P[0],I=P[1],L=IF(S.useState(``),2),R=L[0],z=L[1],B=IF(S.useState(null),2),V=B[0],H=B[1],U=IF(S.useState(null),2),ee=U[0],te=U[1],ne=F||``;S.useEffect(function(){I(y)},[y]);var W=S.useRef(null),re=S.useRef(null),G=S.useRef(!1);S.useImperativeHandle(t,function(){return{nativeElement:W.current,inputElement:re.current,focus:function(e){re.current.focus(e)},blur:function(){re.current.blur()}}});var K=S.useMemo(function(){return new OF(s||``)},[s]),q=IF(S.useMemo(function(){return u?[0,0]:K.getSelection(V)},[K,V,u]),2),ie=q[0],J=q[1],ae=function(e){e&&e!==s&&e!==y&&d()},oe=Rn(function(e){c(e)&&l(e),I(e),ae(e)}),se=function(e){if(!s){var t=e.target.value;ae(t),I(t),l(t)}},ce=function(e){if(G.current){e.preventDefault();return}var t=e.clipboardData.getData(`text`);c(t)&&oe(t)},le=function(){G.current=!0},ue=function(e){var t=e.target.selectionStart;H(K.getMaskCellIndex(t)),te({}),C?.(e),G.current=!1},de=function(e){N(!0),H(0),z(``),b(e)},fe=function(e){x(e)},pe=function(e){N(!1),fe(e)};iA(r,function(){!r&&!h&&I(y)});var me=function(e){e.key===`Enter`&&c(ne)&&f(),p?.(e)},he=function(e){if(G.current){e.preventDefault();return}me(e);var t=e.key,n=null,r=null,i=J-ie,a=s.slice(ie,J),o=function(e){H(function(t){var n=t+e;return n=Math.max(n,0),n=Math.min(n,K.size()-1),n})},c=function(e){var t=IF(kF(a),3),n=t[0],r=t[1],i=t[2],o=ne.slice(ie,J),s=Number(o);if(isNaN(s))return String(i||(e>0?n:r));var c=s+e,l=r-n+1;return String(n+(l+c-n)%l)};switch(t){case`Backspace`:case`Delete`:n=``,r=a;break;case`ArrowLeft`:n=``,o(-1);break;case`ArrowRight`:n=``,o(1);break;case`ArrowUp`:n=``,r=c(1);break;case`ArrowDown`:n=``,r=c(-1);break;default:isNaN(Number(t))||(n=R+t,r=n);break}n!==null&&(z(n),n.length>=i&&(o(1),z(``))),r!==null&&oe((ne.slice(0,ie)+ZD(r,i)+ne.slice(J)).slice(0,s.length)),te({})},ge=S.useRef();Vn(function(){if(!(!M||!s||G.current)){if(!K.match(ne)){oe(s);return}return re.current.setSelectionRange(ie,J),ge.current=Ei(function(){re.current.setSelectionRange(ie,J)}),function(){Ei.cancel(ge.current)}}},[K,s,M,ne,V,ie,J,ee,oe]);var _e=s?{onFocus:de,onBlur:pe,onKeyDown:he,onMouseDown:le,onMouseUp:ue,onPaste:ce}:{};return S.createElement(`div`,{ref:W,className:Y(A,NF(NF({},`${A}-active`,r&&a),`${A}-placeholder`,u),n)},S.createElement(D,MF({ref:re,"aria-invalid":g,autoComplete:`off`},v,{onKeyDown:me,onBlur:fe},_e,{value:ne,onChange:se,className:O.input,style:k.input})),S.createElement(_F,{type:`suffix`,icon:o}),_)}),GF=`id.prefix.clearIcon.suffixIcon.separator.activeIndex.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.value.onChange.onSubmit.onInputChange.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onActiveInfo.placement.onMouseDown.required.aria-required.autoFocus.tabIndex`.split(`.`),KF=[`index`];function qF(){return qF=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sI(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function cI(e,t){var n=e.id,r=e.prefix,i=e.clearIcon,a=e.suffixIcon,o=e.separator,s=o===void 0?`~`:o,c=e.activeIndex;e.activeHelp,e.allHelp;var l=e.focused;e.onFocus,e.onBlur,e.onKeyDown,e.locale,e.generateConfig;var u=e.placeholder,d=e.className,f=e.style,p=e.onClick,m=e.onClear,h=e.value;e.onChange,e.onSubmit,e.onInputChange,e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var g=e.disabled,_=e.invalid;e.inputReadOnly;var v=e.direction;e.onOpenChange;var y=e.onActiveInfo;e.placement;var b=e.onMouseDown;e.required,e[`aria-required`];var x=e.autoFocus,C=e.tabIndex,w=oI(e,GF),T=v===`rtl`,E=S.useContext(RD),D=E.prefixCls,O=E.classNames,k=E.styles,A=S.useMemo(function(){if(typeof n==`string`)return[n];var e=n||{};return[e.start,e.end]},[n]),j=S.useRef(),M=S.useRef(),N=S.useRef(),P=function(e){return[M,N][e]?.current};S.useImperativeHandle(t,function(){return{nativeElement:j.current,focus:function(e){if(aI(e)===`object`){var t,n=e||{},r=n.index,i=r===void 0?0:r,a=oI(n,KF);(t=P(i))==null||t.focus(a)}else{var o;(o=P(e??0))==null||o.focus()}},blur:function(){var e,t;(e=P(0))==null||e.blur(),(t=P(1))==null||t.blur()}}});var F=dF(w),I=S.useMemo(function(){return Array.isArray(u)?u:[u,u]},[u]),L=$F(lF(YF(YF({},e),{},{id:A,placeholder:I})),1)[0],R=$F(S.useState({position:`absolute`,width:0}),2),z=R[0],B=R[1],V=Rn(function(){var e=P(c);if(e){var t=e.nativeElement.getBoundingClientRect(),n=j.current.getBoundingClientRect(),r=t.left-n.left;B(function(e){return YF(YF({},e),{},{width:t.width,left:r})}),y([t.left,t.right,n.width])}});S.useEffect(function(){V()},[c]);var H=i&&(h[0]&&!g[0]||h[1]&&!g[1]),U=x&&!g[0],ee=x&&!U&&!g[1];return S.createElement(ia,{onResize:V},S.createElement(`div`,qF({},F,{className:Y(D,`${D}-range`,XF(XF(XF(XF({},`${D}-focused`,l),`${D}-disabled`,g.every(function(e){return e})),`${D}-invalid`,_.some(function(e){return e})),`${D}-rtl`,T),d),style:f,ref:j,onClick:p,onMouseDown:function(e){var t=e.target;t!==M.current.inputElement&&t!==N.current.inputElement&&e.preventDefault(),b?.(e)}}),r&&S.createElement(`div`,{className:Y(`${D}-prefix`,O.prefix),style:k.prefix},r),S.createElement(WF,qF({ref:M},L(0),{className:`${D}-input-start`,autoFocus:U,tabIndex:C,"date-range":`start`})),S.createElement(`div`,{className:`${D}-range-separator`},s),S.createElement(WF,qF({ref:N},L(1),{className:`${D}-input-end`,autoFocus:ee,tabIndex:C,"date-range":`end`})),S.createElement(`div`,{className:`${D}-active-bar`,style:z}),S.createElement(_F,{type:`suffix`,icon:a}),H&&S.createElement(vF,{icon:i,onClear:m})))}var lI=S.forwardRef(cI);function uI(e){"@babel/helpers - typeof";return uI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},uI(e)}function dI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fI(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0&&q.current.focus({index:n})}le(!0),K?.(e)},Ze=function(){ze(null),le(!1,{force:!0})},Qe=OI(S.useState(null),2),$e=Qe[0],et=Qe[1],tt=OI(S.useState(null),2),nt=tt[0],rt=tt[1],it=S.useMemo(function(){return nt||ge},[ge,nt]);S.useEffect(function(){se||rt(null)},[se]);var at=OI(S.useState([0,0,0]),2),ot=at[0],st=at[1],ct=function(e,t){p===`hover`&&(rt(e),et(t))},lt=rA(ee,te),ut=function(e){ct(e,`preset`)},dt=function(e){ze(e)&&(be(`preset-click`),le(!1,{force:!0}))},ft=function(e){Ye(e)},pt=function(e){ct(e?Je(e,xe):null,`cell`)},mt=function(e){le(!0),De(e)},ht=function(){be(`panel`)},gt=function(e){me($D(ge,xe,e)),!g&&!a&&i===Pe&&Ye(e)},_t=function(){le(!1)},vt=uO(W,re,G,FI(xe)),yt=ge[xe]||null,bt=Rn(function(e){return c(e,{activeIndex:xe})}),xt=S.useMemo(function(){var e=bi(r,!1);return hi(r,[].concat(yI(Object.keys(e)),[`onChange`,`onCalendarChange`,`style`,`className`,`onPanelChange`,`disabledTime`,`classNames`,`styles`]))},[r]),St=S.createElement(nF,vI({},xt,{showNow:Ie,showTime:ke,range:!0,multiplePanel:Fe,activeInfo:ot,disabledDate:Be,onFocus:mt,onBlur:Oe,onPanelMouseDown:ht,picker:k,mode:Ne,internalMode:Pe,onPanelChange:qe,format:s,value:yt,isInvalid:bt,onChange:null,onSelect:gt,pickerValue:Ge,defaultOpenValue:QD(M?.defaultOpenValue)[xe],onPickerValueChange:Ke,hoverValue:it,onHover:pt,needConfirm:g,onSubmit:Ye,onOk:he,presets:lt,onPresetHover:ut,onPresetSubmit:dt,onNow:ft,cellRender:vt,classNames:J,styles:ae})),Ct=function(e,t){me(Je(e,t))},wt=function(){be(`input`)},Tt=function(e,t){var n=we.length,r=we[n-1];if(n&&r!==t&&g&&!y[r]&&!Ee(r)&&ge[r]){q.current.focus({index:r});return}be(`input`),le(!0,{inherit:!0}),xe!==t&&se&&!g&&a&&Ye(null,!0),Se(t),De(e,t)},Et=function(e,t){le(!1),!g&&be()===`input`&&Re(xe,Ce(ge)===null),Oe(e,t)},Dt=function(e,t){e.key===`Tab`&&Ye(null,!0),_?.(e,t)},Ot=S.useMemo(function(){return{prefixCls:l,locale:D,generateConfig:O,button:ne.button,input:ne.input,classNames:J,styles:ae}},[l,D,O,ne.button,ne.input,J,ae]);return Vn(function(){se&&xe!==void 0&&qe(null,k,!1)},[se,xe,k]),Vn(function(){var e=be();!se&&e===`input`&&(le(!1),Ye(null,!0)),!se&&a&&!g&&e===`panel`&&(le(!0),Ye())},[se]),S.createElement(RD.Provider,{value:Ot},S.createElement(WD,vI({},rO(r),{popupElement:St,popupStyle:ae.popup.root,popupClassName:Y(u,J.popup.root),visible:se,onClose:_t,range:!0}),S.createElement(lI,vI({},r,{ref:q,className:Y(r.className,u,J.root),style:wI(wI({},ae.root),r.style),suffixIcon:V,activeIndex:ve||se?xe:null,activeHelp:!!nt,allHelp:!!nt&&$e===`preset`,focused:ve,onFocus:Tt,onBlur:Et,onKeyDown:Dt,onSubmit:Ye,value:it,maskFormat:s,onChange:Ct,onInputChange:wt,format:o,inputReadOnly:B,disabled:v,open:se,onOpenChange:le,onClick:Xe,onClear:Ze,invalid:He,onInvalid:Ue,onActiveInfo:st}))))}var LI=S.forwardRef(II);function RI(e){var t=e.prefixCls,n=e.value,r=e.onRemove,i=e.removeIcon,a=i===void 0?`×`:i,o=e.formatDate,s=e.disabled,c=e.maxTagCount,l=e.placeholder,u=`${t}-selector`,d=`${t}-selection`,f=`${d}-overflow`;function p(e,t){return S.createElement(`span`,{className:Y(`${d}-item`),title:typeof e==`string`?e:null},S.createElement(`span`,{className:`${d}-item-content`},e),!s&&t&&S.createElement(`span`,{onMouseDown:function(e){e.preventDefault()},onClick:t,className:`${d}-item-remove`},a))}function m(e){return p(o(e),function(t){t&&t.stopPropagation(),r(e)})}function h(e){return p(`+ ${e.length} ...`)}return S.createElement(`div`,{className:u},S.createElement(vS,{prefixCls:f,data:n,renderItem:m,renderRest:h,itemKey:function(e){return o(e)},maxCount:c}),!n.length&&S.createElement(`span`,{className:`${t}-selection-placeholder`},l))}function zI(e){"@babel/helpers - typeof";return zI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},zI(e)}var BI=`id.open.prefix.clearIcon.suffixIcon.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.internalPicker.value.onChange.onSubmit.onInputChange.multiple.maxTagCount.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onMouseDown.required.aria-required.autoFocus.tabIndex.removeIcon`.split(`.`);function VI(){return VI=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eL(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function tL(e,t){e.id;var n=e.open,r=e.prefix,i=e.clearIcon,a=e.suffixIcon;e.activeHelp,e.allHelp;var o=e.focused;e.onFocus,e.onBlur,e.onKeyDown;var s=e.locale,c=e.generateConfig,l=e.placeholder,u=e.className,d=e.style,f=e.onClick,p=e.onClear,m=e.internalPicker,h=e.value,g=e.onChange,_=e.onSubmit;e.onInputChange;var v=e.multiple,y=e.maxTagCount;e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var b=e.disabled,x=e.invalid;e.inputReadOnly;var C=e.direction;e.onOpenChange;var w=e.onMouseDown;e.required,e[`aria-required`];var T=e.autoFocus,E=e.tabIndex,D=e.removeIcon,O=$I(e,BI),k=C===`rtl`,A=S.useContext(RD),j=A.prefixCls,M=A.classNames,N=A.styles,P=S.useRef(),F=S.useRef();S.useImperativeHandle(t,function(){return{nativeElement:P.current,focus:function(e){var t;(t=F.current)==null||t.focus(e)},blur:function(){var e;(e=F.current)==null||e.blur()}}});var I=dF(O),L=function(e){g([e])},R=function(e){g(h.filter(function(t){return t&&!ak(c,s,t,e,m)})),n||_()},z=qI(lF(UI(UI({},e),{},{onChange:L}),function(e){return{value:e.valueTexts[0]||``,active:o}}),2),B=z[0],V=z[1],H=!!(i&&h.length&&!b),U=v?S.createElement(S.Fragment,null,S.createElement(RI,{prefixCls:j,value:h,onRemove:R,formatDate:V,maxTagCount:y,disabled:b,removeIcon:D,placeholder:l}),S.createElement(`input`,{className:`${j}-multiple-input`,value:h.map(V).join(`,`),ref:F,readOnly:!0,autoFocus:T,tabIndex:E}),S.createElement(_F,{type:`suffix`,icon:a}),H&&S.createElement(vF,{icon:i,onClear:p})):S.createElement(WF,VI({ref:F},B(),{autoFocus:T,tabIndex:E,suffixIcon:a,clearIcon:H&&S.createElement(vF,{icon:i,onClear:p}),showActiveCls:!1}));return S.createElement(`div`,VI({},I,{className:Y(j,WI(WI(WI(WI(WI({},`${j}-multiple`,v),`${j}-focused`,o),`${j}-disabled`,b),`${j}-invalid`,x),`${j}-rtl`,k),u),style:d,ref:P,onClick:f,onMouseDown:function(e){e.target!==F.current?.inputElement&&e.preventDefault(),w?.(e)}}),r&&S.createElement(`div`,{className:Y(`${j}-prefix`,M.prefix),style:N.prefix},r),U)}var nL=S.forwardRef(tL);function rL(e){"@babel/helpers - typeof";return rL=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},rL(e)}function iL(){return iL=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne??{...t,__INTERNAL__:{itemRef:e=>t=>{let r=DL(e);t?n.current[r]=t:delete n.current[r]}},scrollToField:(e,t={})=>{let{focus:n,...i}=t,a=OL(e,r);a&&(ep(a,{scrollMode:`if-needed`,block:`nearest`,...i}),n&&r.focusField(e))},focusField:e=>{let t=r.getFieldInstance(e);typeof t?.focus==`function`?t.focus():OL(e,r)?.focus?.()},getFieldInstance:e=>{let t=DL(e);return n.current[t]}},[e,t]);return[r]}var AL=S.createContext(void 0),Fee=AL.Provider,jL=S.createContext(void 0),Iee=jL.Provider;function ML(){return ML=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n=`rc-checkbox`,className:r,style:i,checked:a,disabled:o,defaultChecked:s=!1,type:c=`checkbox`,title:l,onChange:u,...d}=e,f=(0,S.useRef)(null),p=(0,S.useRef)(null),[m,h]=Wn(s,a);(0,S.useImperativeHandle)(t,()=>({focus:e=>{f.current?.focus(e)},blur:()=>{f.current?.blur()},input:f.current,nativeElement:p.current}));let g=Y(n,r,{[`${n}-checked`]:m,[`${n}-disabled`]:o});return S.createElement(`span`,{className:g,title:l,style:i,ref:p},S.createElement(`input`,ML({},d,{className:`${n}-input`,ref:f,onChange:t=>{o||(`checked`in e||h(t.target.checked),u?.({target:{...e,type:c,checked:t.target.checked},stopPropagation(){t.stopPropagation()},preventDefault(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:o,checked:!!m,type:c})))});function PL(e){let t=S.useRef(null),n=()=>{Ei.cancel(t.current),t.current=null};return[()=>{n(),t.current=Ei(()=>{t.current=null})},r=>{t.current&&(r.stopPropagation(),n()),e?.(r)}]}var Lee=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:{...Vl(e),display:`inline-block`,fontSize:0,[`&${r}-rtl`]:{direction:`rtl`},[`&${r}-block`]:{display:`flex`},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:`none`},"&-vertical":{display:`flex`,flexDirection:`column`,rowGap:e.marginXS,[`${t}-wrapper`]:{marginInlineEnd:0}}}}},Ree=e=>{let{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,colorPrimaryHover:i,radioSize:a,motionDurationSlow:o,motionDurationMid:s,motionEaseInOutCirc:c,colorBgContainer:l,colorBorder:u,lineWidth:d,colorBgContainerDisabled:f,colorTextDisabled:p,paddingXS:m,dotColorDisabled:h,dotSize:g,lineType:_,radioColor:v,radioBgColor:y}=e;return{[`${t}-wrapper`]:{...Vl(e),display:`inline-flex`,alignItems:`baseline`,marginInlineStart:0,marginInlineEnd:n,cursor:`pointer`,"&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:`rtl`},"&-disabled":{cursor:`not-allowed`,color:e.colorTextDisabled},"&::after":{display:`inline-block`,width:0,overflow:`hidden`,content:`"\\a0"`},"&-block":{flex:1,justifyContent:`center`},[t]:{...Vl(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:`calc(${a} * 1px)`,height:`calc(${a} * 1px)`,backgroundColor:l,border:`${X(d)} ${_} ${u}`,borderRadius:`50%`,transition:`all ${s}`,flex:`none`,"&:after":{content:`""`,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%) scale(0)`,width:`calc(${g} * 1px)`,height:`calc(${g} * 1px)`,backgroundColor:v,borderRadius:`50%`,transformOrigin:`50% 50%`,opacity:0,transition:`all ${o} ${c}`},[`${t}-input`]:{position:`absolute`,inset:0,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:Wl(e)},[`&:hover:not(${t}-wrapper-disabled) ${t}`]:{borderColor:r},[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:i,borderColor:`transparent`},[`${t}-checked`]:{backgroundColor:y,borderColor:r,"&::after":{transform:`translate(-50%, -50%)`,opacity:1}},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:f,borderColor:u,"&::after":{backgroundColor:h}},[`${t}-disabled + span`]:{color:p,cursor:`not-allowed`},[`span${t} + *`]:{paddingInlineStart:m,paddingInlineEnd:m}}}},zee=e=>{let{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:i,lineType:a,colorBorder:o,motionDurationMid:s,buttonPaddingInline:c,fontSize:l,buttonBg:u,fontSizeLG:d,controlHeightLG:f,controlHeightSM:p,paddingXS:m,borderRadius:h,borderRadiusSM:g,borderRadiusLG:_,buttonCheckedBg:v,buttonSolidCheckedColor:y,colorTextDisabled:b,colorBgContainerDisabled:x,buttonCheckedBgDisabled:S,buttonCheckedColorDisabled:C,colorPrimary:w,colorPrimaryHover:T,colorPrimaryActive:E,buttonSolidCheckedBg:D,buttonSolidCheckedHoverBg:O,buttonSolidCheckedActiveBg:k,calc:A}=e;return{[`${r}-button-wrapper`]:{position:`relative`,display:`inline-block`,height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:l,lineHeight:X(A(n).sub(A(i).mul(2)).equal()),background:u,border:`${X(i)} ${a} ${o}`,borderBlockStartWidth:A(i).add(.02).equal(),borderInlineEndWidth:i,cursor:`pointer`,transition:[`color`,`background-color`,`box-shadow`].map(e=>`${e} ${s}`).join(`,`),a:{color:t},[`> ${r}-button`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:`100%`,height:`100%`},"&:not(:last-child)":{marginInlineEnd:A(i).mul(-1).equal()},"&:first-child":{borderInlineStart:`${X(i)} ${a} ${o}`,borderStartStartRadius:h,borderEndStartRadius:h},"&:last-child":{borderStartEndRadius:h,borderEndEndRadius:h},"&:first-child:last-child":{borderRadius:h},[`${r}-group-large &`]:{height:f,fontSize:d,lineHeight:X(A(f).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:_,borderEndStartRadius:_},"&:last-child":{borderStartEndRadius:_,borderEndEndRadius:_}},[`${r}-group-small &`]:{height:p,paddingInline:A(m).sub(i).equal(),paddingBlock:0,lineHeight:X(A(p).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g}},"&:hover":{position:`relative`,color:w},"&:has(:focus-visible)":Wl(e),[`${r}, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:`none`},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:w,background:v,borderColor:w,"&::before":{backgroundColor:w},"&:first-child":{borderColor:w},"&:hover":{color:T,borderColor:T,"&::before":{backgroundColor:T}},"&:active":{color:E,borderColor:E,"&::before":{backgroundColor:E}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:y,background:D,borderColor:D,"&:hover":{color:y,background:O,borderColor:O},"&:active":{color:y,background:k,borderColor:k}},"&-disabled":{color:b,backgroundColor:x,borderColor:o,cursor:`not-allowed`,"&:first-child, &:hover":{color:b,backgroundColor:x,borderColor:o}},[`&-disabled${r}-button-wrapper-checked`]:{color:C,backgroundColor:S,borderColor:o,boxShadow:`none`},"&-block":{flex:1,textAlign:`center`}}}},FL=Xl(`Radio`,e=>{let{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${X(n)} ${t}`,i=lc(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[Lee(i),Ree(i),zee(i)]},e=>{let{wireframe:t,padding:n,marginXS:r,lineWidth:i,fontSizeLG:a,colorText:o,colorBgContainer:s,colorTextDisabled:c,controlItemBgActiveDisabled:l,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:f,colorPrimaryActive:p,colorWhite:m}=e,h=a;return{radioSize:h,dotSize:t?h-8:h-(4+i)*2,dotColorDisabled:c,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:p,buttonBg:s,buttonCheckedBg:s,buttonColor:o,buttonCheckedBgDisabled:l,buttonCheckedColorDisabled:c,buttonPaddingInline:n-i,wrapperMarginInlineEnd:r,radioColor:t?d:m,radioBgColor:t?s:d}},{unitless:{radioSize:!0,dotSize:!0}}),IL=S.forwardRef((e,t)=>{let n=S.useContext(AL),r=S.useContext(jL),{getPrefixCls:i,direction:a,className:o,style:s,classNames:c,styles:l}=_a(`radio`),u=sr(t,S.useRef(null)),{isFormItemInput:d}=S.useContext(Fy),f=t=>{e.onChange?.(t),n?.onChange?.(t)},{prefixCls:p,className:m,rootClassName:h,children:g,style:_,title:v,classNames:y,styles:b,...x}=e,C=i(`radio`,p),w=(n?.optionType||r)===`button`,T=w?`${C}-button`:C,E=ap(C),[D,O]=FL(C,E),k={...x},A=S.useContext(pm),j=k.checked;n&&(k.name=n.name,k.onChange=f,j=e.value===n.value,k.disabled=k.disabled??n.disabled),k.disabled=k.disabled??A;let M={...e,...k,checked:j},[N,P]=xf([c,y],[l,b],{props:M}),F=Y(`${T}-wrapper`,{[`${T}-wrapper-checked`]:j,[`${T}-wrapper-disabled`]:k.disabled,[`${T}-wrapper-rtl`]:a===`rtl`,[`${T}-wrapper-in-form-item`]:d,[`${T}-wrapper-block`]:!!n?.block},o,m,h,N.root,D,O,E),[I,L]=PL(k.onClick);return S.createElement(Dh,{component:`Radio`,disabled:k.disabled},S.createElement(`label`,{className:F,style:{...P.root,...s,..._},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:v,onClick:I},S.createElement(NL,{...k,checked:j,className:Y(N.icon,{[bh]:!w}),style:P.icon,type:`radio`,prefixCls:T,ref:u,onClick:L}),g===void 0?null:S.createElement(`span`,{className:Y(`${T}-label`,N.label),style:P.label},g)))}),Bee=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=S.useContext(ma),{name:i}=S.useContext(Fy),a=Yn(DL(i)),{prefixCls:o,className:s,rootClassName:c,options:l,buttonStyle:u=`outline`,disabled:d,children:f,size:p,style:m,id:h,optionType:g,name:_=a,defaultValue:v,value:y,block:b=!1,onChange:x,onMouseEnter:C,onMouseLeave:w,onFocus:T,onBlur:E,orientation:D,vertical:O,role:k=`radiogroup`}=e,[A,j]=Wn(v,y),M=S.useCallback(t=>{let n=A,r=t.target.value;`value`in e||j(r),r!==n&&x?.(t)},[A,j,x]),N=n(`radio`,o),P=`${N}-group`,F=ap(N),[I,L]=FL(N,F),R=f;l&&l.length>0&&(R=l.map(e=>typeof e==`string`||Qd(e)?S.createElement(IL,{key:e.toString(),prefixCls:N,disabled:d,value:e,checked:A===e},e):S.createElement(IL,{key:`radio-group-value-options-${e.value}`,prefixCls:N,disabled:e.disabled||d,value:e.value,checked:A===e.value,title:e.title,style:e.style,className:e.className,id:e.id,required:e.required},e.label)));let z=Oh(p),[,B]=wf(D,O),V=Y(P,`${P}-${u}`,{[`${P}-large`]:z===`large`,[`${P}-small`]:z===`small`,[`${P}-rtl`]:r===`rtl`,[`${P}-block`]:b},s,c,I,L,F),H=S.useMemo(()=>({onChange:M,value:A,disabled:d,name:_,optionType:g,block:b}),[M,A,d,_,g,b]);return S.createElement(`div`,{...bi(e,{aria:!0,data:!0}),role:k,className:Y(V,{[`${N}-group-vertical`]:B}),style:m,onMouseEnter:C,onMouseLeave:w,onFocus:T,onBlur:E,id:h,ref:t},S.createElement(Fee,{value:H},R))}),Vee=S.memo(Bee),Hee=S.forwardRef((e,t)=>{let{getPrefixCls:n}=S.useContext(ma),{prefixCls:r,...i}=e,a=n(`radio`,r);return S.createElement(Iee,{value:`button`},S.createElement(IL,{prefixCls:a,...i,type:`radio`,ref:t}))}),LL=IL;LL.Button=Hee,LL.Group=Vee,LL.__ANT_RADIO=!0;function RL(e){return lc(e,{inputAffixPadding:e.paddingXXS})}var zL=e=>{let{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:a,controlHeightLG:o,fontSizeLG:s,lineHeightLG:c,paddingSM:l,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:p,colorPrimary:m,controlOutlineWidth:h,controlOutline:g,colorErrorOutline:_,colorWarningOutline:v,colorBgContainer:y,inputFontSize:b,inputFontSizeLG:x,inputFontSizeSM:S}=e,C=b||n,w=S||C,T=x||s,E=Math.round((t-C*r)/2*10)/10-i,D=Math.round((a-w*r)/2*10)/10-i,O=Math.ceil((o-T*c)/2*10)/10-i;return{paddingBlock:Math.max(E,0),paddingBlockSM:Math.max(D,0),paddingBlockLG:Math.max(O,0),paddingInline:l-i,paddingInlineSM:u-i,paddingInlineLG:d-i,addonBg:f,activeBorderColor:m,hoverBorderColor:p,activeShadow:`0 0 0 ${h}px ${g}`,errorActiveShadow:`0 0 0 ${h}px ${_}`,warningActiveShadow:`0 0 0 ${h}px ${v}`,hoverBg:y,activeBg:y,inputFontSize:C,inputFontSizeLG:T,inputFontSizeSM:w}},Uee=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),BL=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorderDisabled,boxShadow:`none`,cursor:`not-allowed`,opacity:1,"input[disabled], textarea[disabled]":{cursor:`not-allowed`},"&:hover:not([disabled])":{...Uee(lc(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),VL=(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}}),HL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...VL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),UL=(e,t)=>({"&-outlined":{...VL(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...BL(e)},...HL(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...HL(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),WL=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),Wee=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...WL(e,{status:`error`,addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...WL(e,{status:`warning`,addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...BL(e)}}}}),GL=(e,t)=>{let{componentCls:n}=e;return{"&-borderless":{background:`transparent`,border:`none`,paddingBlock:e.calc(e.paddingBlock).add(e.lineWidth).equal(),[`&${n}-sm, &${n}-affix-wrapper-sm`]:{paddingBlock:e.calc(e.paddingBlockSM).add(e.lineWidth).equal()},[`&${n}-lg, &${n}-affix-wrapper-lg`]:{paddingBlock:e.calc(e.paddingBlockLG).add(e.lineWidth).equal()},"&: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}}},KL=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:`transparent`,"input&, & input, textarea&, & textarea":{color:t?.inputColor??`unset`},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),qL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...KL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),JL=(e,t)=>({"&-filled":{...KL(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...BL(e)},...qL(e,{status:`error`,bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError}),...qL(e,{status:`warning`,bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning}),...t}}),YL=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),Gee=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:`static`}},...YL(e,{status:`error`,addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...YL(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:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),XL=(e,t)=>({background:e.colorBgContainer,borderWidth:`${X(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),ZL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...XL(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`}}),QL=(e,t)=>({"&-underlined":{...XL(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`},...ZL(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...ZL(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),$L=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:`none`},"&:placeholder-shown":{textOverflow:`ellipsis`}}),eR=e=>{let{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=e;return{padding:`${X(t)} ${X(i)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},tR=e=>({padding:`${X(e.paddingBlockSM)} ${X(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),nR=(e,t={})=>({position:`relative`,display:`inline-block`,width:`100%`,minWidth:0,padding:`${X(e.paddingBlock)} ${X(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...$L(e.colorTextPlaceholder),"&-lg":{...eR(e),...t.largeStyle},"&-sm":{...tR(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:`rtl`}}),Kee=e=>{let{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`]:{...eR(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...tR(e)},[`&-lg ${n}-select-single`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single`]:{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 ${X(e.paddingInline)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.inputFontSize,textAlign:`center`,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${X(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${X(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{backgroundColor:`inherit`,border:`${X(e.lineWidth)} ${e.lineType} transparent`,boxShadow:`none`}},[`${n}-cascader-picker`]:{margin:`-9px ${X(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}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select`]:{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`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:`block`,...Ul(),[`${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},[` & > ${t}-affix-wrapper, & > ${t}-number-affix-wrapper, & > ${n}-picker-range @@ -259,16 +259,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho & > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child, & > ${n}-select:last-child, & > ${n}-cascader-picker:last-child ${t}, - & > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:`top`},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{}}}}},Kee=e=>{let{componentCls:t,controlHeightSM:n,lineWidth:r,calc:i}=e,a=i(n).sub(i(r).mul(2)).sub(16).div(2).equal();return{[t]:{...Vl(e),...rR(e),...WL(e),...YL(e),...KL(e),...$L(e),'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:`none`}}}},qee=e=>{let{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:`pointer`,transition:`color ${e.motionDurationSlow}`,border:`none`,outline:`none`,backgroundColor:`transparent`,"&:hover":{color:e.colorIcon},"&:focus-visible":{color:e.colorIcon,borderRadius:e.borderRadiusSM,...Wl(e)},"&:active":{color:e.colorText},"&-hidden":{visibility:`hidden`},"&-has-suffix":{margin:`0 ${X(e.inputAffixPadding)}`}}}},Jee=e=>{let{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:a,colorIconHover:o,iconCls:s}=e,c=`${t}-affix-wrapper`,l=`${t}-affix-wrapper-disabled`;return{[c]:{...rR(e),display:`inline-flex`,"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:`inherit`,border:`none`,borderRadius:0,outline:`none`,background:`transparent`,color:`inherit`,"&::-ms-reveal":{display:`none`},"&:focus":{boxShadow:`none !important`}},"&::before":{display:`inline-block`,width:0,visibility:`hidden`,content:`"\\a0"`},[t]:{"&-prefix, &-suffix":{display:`flex`,flex:`none`,alignItems:`center`,"> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:`ltr`},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}},...qee(e),[`${s}${t}-password-icon`]:{color:a,cursor:`pointer`,transition:`all ${i}`,"&:hover":{color:o}}},[`${t}-underlined`]:{borderRadius:0},[l]:{[`${s}${t}-password-icon`]:{color:a,cursor:`not-allowed`,"&:hover":{color:a}}}}},Yee=e=>{let{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:{...Vl(e),...Gee(e),"&-rtl":{direction:`rtl`},"&-wrapper":{display:`inline-block`,width:`100%`,textAlign:`start`,verticalAlign:`top`,"&-rtl":{direction:`rtl`},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}},...Uee(e),...Wee(e),[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}}},Xee=e=>{let{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},iR=Xl([`Input`,`Shared`],e=>{let t=lc(e,zL(e));return[Kee(t),Jee(t)]},BL,{resetFont:!1}),aR=Xl([`Input`,`Component`],e=>{let t=lc(e,zL(e));return[Yee(t),Xee(t),v_(t,{focus:!0,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},BL,{resetFont:!1}),Zee=e=>{let{multipleSelectItemHeight:t,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:i}=e,a=e.max(e.calc(n).sub(r).equal(),0);return{basePadding:a,containerPadding:e.max(e.calc(a).sub(i).equal(),0),itemHeight:X(t),itemLineHeight:X(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},Qee=e=>{let{componentCls:t,iconCls:n,borderRadiusSM:r,motionDurationSlow:i,paddingXS:a,multipleItemColorDisabled:o,multipleItemBorderColorDisabled:s,colorIcon:c,colorIconHover:l,INTERNAL_FIXED_ITEM_MARGIN:u}=e;return{[`${t}-selection-overflow`]:{position:`relative`,display:`flex`,flex:`auto`,flexWrap:`wrap`,maxWidth:`100%`,"&-item":{flex:`none`,alignSelf:`center`,maxWidth:`calc(100% - 4px)`,display:`inline-flex`},[`${t}-selection-item`]:{display:`flex`,alignSelf:`center`,flex:`none`,boxSizing:`border-box`,maxWidth:`100%`,marginBlock:u,borderRadius:r,cursor:`default`,transition:[`font-size`,`line-height`,`height`].map(e=>`${e} ${i}`).join(`, `),marginInlineEnd:e.calc(u).mul(2).equal(),paddingInlineStart:a,paddingInlineEnd:e.calc(a).div(2).equal(),[`${t}-disabled&`]:{color:o,borderColor:s,cursor:`not-allowed`},"&-content":{display:`inline-block`,marginInlineEnd:e.calc(a).div(2).equal(),overflow:`hidden`,whiteSpace:`pre`,textOverflow:`ellipsis`},"&-remove":{...Hl(),display:`inline-flex`,alignItems:`center`,color:c,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${n}`]:{verticalAlign:`-0.2em`},"&:hover":{color:l}}}}}},oR=(e,t)=>{let{componentCls:n,controlHeight:r}=e,i=t?`${n}-${t}`:``,a=Zee(e);return[{[`${n}-multiple${i}`]:{paddingBlock:a.containerPadding,paddingInlineStart:a.basePadding,minHeight:r,[`${n}-selection-item`]:{height:a.itemHeight,lineHeight:X(a.itemLineHeight)}}}]},$ee=e=>{let{componentCls:t,calc:n,lineWidth:r}=e,i=lc(e,{fontHeight:e.fontSize,selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS,controlHeight:e.controlHeightSM}),a=lc(e,{fontHeight:n(e.multipleItemHeightLG).sub(n(r).mul(2).equal()).equal(),fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius,controlHeight:e.controlHeightLG});return[oR(i,`small`),oR(e),oR(a,`large`),{[`${t}${t}-multiple`]:{width:`100%`,cursor:`text`,[`${t}-selector`]:{flex:`auto`,padding:0,position:`relative`,"&:after":{margin:0},[`${t}-selection-placeholder`]:{position:`absolute`,top:`50%`,insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:0,transform:`translateY(-50%)`,transition:`all ${e.motionDurationSlow}`,overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`,flex:1,color:e.colorTextPlaceholder,pointerEvents:`none`}},...Qee(e),[`${t}-multiple-input`]:{width:0,height:0,border:0,visibility:`hidden`,position:`absolute`,zIndex:-1}}}]},sR=e=>{let{pickerCellCls:t,pickerCellInnerCls:n,cellHeight:r,borderRadiusSM:i,motionDurationMid:a,cellHoverBg:o,lineWidth:s,lineType:c,colorPrimary:l,cellActiveWithRangeBg:u,colorTextLightSolid:d,colorTextDisabled:f,cellBgDisabled:p,colorFillSecondary:m}=e;return{"&::before":{position:`absolute`,top:`50%`,insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:r,transform:`translateY(-50%)`,content:`""`,pointerEvents:`none`},[n]:{position:`relative`,zIndex:2,display:`inline-block`,minWidth:r,height:r,lineHeight:X(r),borderRadius:i,transition:`background-color ${a}`},[`&:hover:not(${t}-in-view):not(${t}-disabled), + & > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:`top`},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{}}}}},qee=e=>{let{componentCls:t,controlHeightSM:n,lineWidth:r,calc:i}=e,a=i(n).sub(i(r).mul(2)).sub(16).div(2).equal();return{[t]:{...Vl(e),...nR(e),...UL(e),...JL(e),...GL(e),...QL(e),'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:`none`}}}},Jee=e=>{let{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:`pointer`,transition:`color ${e.motionDurationSlow}`,border:`none`,outline:`none`,backgroundColor:`transparent`,"&:hover":{color:e.colorIcon},"&:focus-visible":{color:e.colorIcon,borderRadius:e.borderRadiusSM,...Wl(e)},"&:active":{color:e.colorText},"&-hidden":{visibility:`hidden`},"&-has-suffix":{margin:`0 ${X(e.inputAffixPadding)}`}}}},Yee=e=>{let{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:a,colorIconHover:o,iconCls:s}=e,c=`${t}-affix-wrapper`,l=`${t}-affix-wrapper-disabled`;return{[c]:{...nR(e),display:`inline-flex`,"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:`inherit`,border:`none`,borderRadius:0,outline:`none`,background:`transparent`,color:`inherit`,"&::-ms-reveal":{display:`none`},"&:focus":{boxShadow:`none !important`}},"&::before":{display:`inline-block`,width:0,visibility:`hidden`,content:`"\\a0"`},[t]:{"&-prefix, &-suffix":{display:`flex`,flex:`none`,alignItems:`center`,"> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:`ltr`},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}},...Jee(e),[`${s}${t}-password-icon`]:{color:a,cursor:`pointer`,transition:`all ${i}`,"&:hover":{color:o}}},[`${t}-underlined`]:{borderRadius:0},[l]:{[`${s}${t}-password-icon`]:{color:a,cursor:`not-allowed`,"&:hover":{color:a}}}}},Xee=e=>{let{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:{...Vl(e),...Kee(e),"&-rtl":{direction:`rtl`},"&-wrapper":{display:`inline-block`,width:`100%`,textAlign:`start`,verticalAlign:`top`,"&-rtl":{direction:`rtl`},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}},...Wee(e),...Gee(e),[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}}},Zee=e=>{let{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},rR=Xl([`Input`,`Shared`],e=>{let t=lc(e,RL(e));return[qee(t),Yee(t)]},zL,{resetFont:!1}),iR=Xl([`Input`,`Component`],e=>{let t=lc(e,RL(e));return[Xee(t),Zee(t),v_(t,{focus:!0,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},zL,{resetFont:!1}),Qee=e=>{let{multipleSelectItemHeight:t,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:i}=e,a=e.max(e.calc(n).sub(r).equal(),0);return{basePadding:a,containerPadding:e.max(e.calc(a).sub(i).equal(),0),itemHeight:X(t),itemLineHeight:X(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},$ee=e=>{let{componentCls:t,iconCls:n,borderRadiusSM:r,motionDurationSlow:i,paddingXS:a,multipleItemColorDisabled:o,multipleItemBorderColorDisabled:s,colorIcon:c,colorIconHover:l,INTERNAL_FIXED_ITEM_MARGIN:u}=e;return{[`${t}-selection-overflow`]:{position:`relative`,display:`flex`,flex:`auto`,flexWrap:`wrap`,maxWidth:`100%`,"&-item":{flex:`none`,alignSelf:`center`,maxWidth:`calc(100% - 4px)`,display:`inline-flex`},[`${t}-selection-item`]:{display:`flex`,alignSelf:`center`,flex:`none`,boxSizing:`border-box`,maxWidth:`100%`,marginBlock:u,borderRadius:r,cursor:`default`,transition:[`font-size`,`line-height`,`height`].map(e=>`${e} ${i}`).join(`, `),marginInlineEnd:e.calc(u).mul(2).equal(),paddingInlineStart:a,paddingInlineEnd:e.calc(a).div(2).equal(),[`${t}-disabled&`]:{color:o,borderColor:s,cursor:`not-allowed`},"&-content":{display:`inline-block`,marginInlineEnd:e.calc(a).div(2).equal(),overflow:`hidden`,whiteSpace:`pre`,textOverflow:`ellipsis`},"&-remove":{...Hl(),display:`inline-flex`,alignItems:`center`,color:c,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${n}`]:{verticalAlign:`-0.2em`},"&:hover":{color:l}}}}}},aR=(e,t)=>{let{componentCls:n,controlHeight:r}=e,i=t?`${n}-${t}`:``,a=Qee(e);return[{[`${n}-multiple${i}`]:{paddingBlock:a.containerPadding,paddingInlineStart:a.basePadding,minHeight:r,[`${n}-selection-item`]:{height:a.itemHeight,lineHeight:X(a.itemLineHeight)}}}]},ete=e=>{let{componentCls:t,calc:n,lineWidth:r}=e,i=lc(e,{fontHeight:e.fontSize,selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS,controlHeight:e.controlHeightSM}),a=lc(e,{fontHeight:n(e.multipleItemHeightLG).sub(n(r).mul(2).equal()).equal(),fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius,controlHeight:e.controlHeightLG});return[aR(i,`small`),aR(e),aR(a,`large`),{[`${t}${t}-multiple`]:{width:`100%`,cursor:`text`,[`${t}-selector`]:{flex:`auto`,padding:0,position:`relative`,"&:after":{margin:0},[`${t}-selection-placeholder`]:{position:`absolute`,top:`50%`,insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:0,transform:`translateY(-50%)`,transition:`all ${e.motionDurationSlow}`,overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`,flex:1,color:e.colorTextPlaceholder,pointerEvents:`none`}},...$ee(e),[`${t}-multiple-input`]:{width:0,height:0,border:0,visibility:`hidden`,position:`absolute`,zIndex:-1}}}]},tte=e=>{let{pickerCellCls:t,pickerCellInnerCls:n,cellHeight:r,borderRadiusSM:i,motionDurationMid:a,cellHoverBg:o,lineWidth:s,lineType:c,colorPrimary:l,cellActiveWithRangeBg:u,colorTextLightSolid:d,colorTextDisabled:f,cellBgDisabled:p,colorFillSecondary:m}=e;return{"&::before":{position:`absolute`,top:`50%`,insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:r,transform:`translateY(-50%)`,content:`""`,pointerEvents:`none`},[n]:{position:`relative`,zIndex:2,display:`inline-block`,minWidth:r,height:r,lineHeight:X(r),borderRadius:i,transition:`background-color ${a}`},[`&:hover:not(${t}-in-view):not(${t}-disabled), &:hover:not(${t}-selected):not(${t}-range-start):not(${t}-range-end):not(${t}-disabled)`]:{[n]:{background:o}},[`&-in-view${t}-today ${n}`]:{"&::before":{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:1,border:`${X(s)} ${c} ${l}`,borderRadius:i,content:`""`}},[`&-in-view${t}-in-range, &-in-view${t}-range-start, &-in-view${t}-range-end`]:{position:`relative`,[`&:not(${t}-disabled):before`]:{background:u}},[`&-in-view${t}-selected, &-in-view${t}-range-start, - &-in-view${t}-range-end`]:{[`&:not(${t}-disabled) ${n}`]:{color:d,background:l},[`&${t}-disabled ${n}`]:{background:m}},[`&-in-view${t}-range-start:not(${t}-disabled):before`]:{insetInlineStart:`50%`},[`&-in-view${t}-range-end:not(${t}-disabled):before`]:{insetInlineEnd:`50%`},[`&-in-view${t}-range-start:not(${t}-range-end) ${n}`]:{borderStartStartRadius:i,borderEndStartRadius:i,borderStartEndRadius:0,borderEndEndRadius:0},[`&-in-view${t}-range-end:not(${t}-range-start) ${n}`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:i,borderEndEndRadius:i},"&-disabled":{color:f,cursor:`not-allowed`,[n]:{background:`transparent`},"&::before":{background:p}},[`&-disabled${t}-today ${n}::before`]:{borderColor:f}}},cR=e=>{let{componentCls:t,pickerCellCls:n,pickerCellInnerCls:r,pickerYearMonthCellWidth:i,pickerControlIconSize:a,cellWidth:o,paddingSM:s,paddingXS:c,paddingXXS:l,colorBgContainer:u,lineWidth:d,lineType:f,borderRadiusLG:p,colorPrimary:m,colorTextHeading:h,colorSplit:g,pickerControlIconBorderWidth:_,colorIcon:v,textHeight:y,motionDurationMid:b,colorIconHover:x,fontWeightStrong:S,cellHeight:C,pickerCellPaddingVertical:w,colorTextDisabled:T,colorText:E,fontSize:D,motionDurationSlow:O,withoutTimeCellHeight:k,pickerQuarterPanelContentHeight:A,borderRadiusSM:j,colorTextLightSolid:M,cellHoverBg:N,timeColumnHeight:P,timeColumnWidth:F,timeCellHeight:I,controlItemBgActive:L,marginXXS:R,pickerDatePanelPaddingHorizontal:z,pickerControlIconMargin:B}=e,V=e.calc(o).mul(7).add(e.calc(z).mul(2)).equal();return{[t]:{"&-panel":{display:`inline-flex`,flexDirection:`column`,textAlign:`center`,background:u,borderRadius:p,outline:`none`,"&-focused":{borderColor:m},"&-rtl":{[`${t}-prev-icon, + &-in-view${t}-range-end`]:{[`&:not(${t}-disabled) ${n}`]:{color:d,background:l},[`&${t}-disabled ${n}`]:{background:m}},[`&-in-view${t}-range-start:not(${t}-disabled):before`]:{insetInlineStart:`50%`},[`&-in-view${t}-range-end:not(${t}-disabled):before`]:{insetInlineEnd:`50%`},[`&-in-view${t}-range-start:not(${t}-range-end) ${n}`]:{borderStartStartRadius:i,borderEndStartRadius:i,borderStartEndRadius:0,borderEndEndRadius:0},[`&-in-view${t}-range-end:not(${t}-range-start) ${n}`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:i,borderEndEndRadius:i},"&-disabled":{color:f,cursor:`not-allowed`,[n]:{background:`transparent`},"&::before":{background:p}},[`&-disabled${t}-today ${n}::before`]:{borderColor:f}}},nte=e=>{let{componentCls:t,pickerCellCls:n,pickerCellInnerCls:r,pickerYearMonthCellWidth:i,pickerControlIconSize:a,cellWidth:o,paddingSM:s,paddingXS:c,paddingXXS:l,colorBgContainer:u,lineWidth:d,lineType:f,borderRadiusLG:p,colorPrimary:m,colorTextHeading:h,colorSplit:g,pickerControlIconBorderWidth:_,colorIcon:v,textHeight:y,motionDurationMid:b,colorIconHover:x,fontWeightStrong:S,cellHeight:C,pickerCellPaddingVertical:w,colorTextDisabled:T,colorText:E,fontSize:D,motionDurationSlow:O,withoutTimeCellHeight:k,pickerQuarterPanelContentHeight:A,borderRadiusSM:j,colorTextLightSolid:M,cellHoverBg:N,timeColumnHeight:P,timeColumnWidth:F,timeCellHeight:I,controlItemBgActive:L,marginXXS:R,pickerDatePanelPaddingHorizontal:z,pickerControlIconMargin:B}=e,V=e.calc(o).mul(7).add(e.calc(z).mul(2)).equal();return{[t]:{"&-panel":{display:`inline-flex`,flexDirection:`column`,textAlign:`center`,background:u,borderRadius:p,outline:`none`,"&-focused":{borderColor:m},"&-rtl":{[`${t}-prev-icon, ${t}-super-prev-icon`]:{transform:`rotate(45deg)`},[`${t}-next-icon, - ${t}-super-next-icon`]:{transform:`rotate(-135deg)`},[`${t}-time-panel`]:{[`${t}-content`]:{direction:`ltr`,"> *":{direction:`rtl`}}}}},"&-decade-panel, &-year-panel, &-quarter-panel, &-month-panel, &-week-panel, &-date-panel, &-time-panel":{display:`flex`,flexDirection:`column`,width:V},"&-header":{display:`flex`,padding:`0 ${X(c)}`,color:h,borderBottom:`${X(d)} ${f} ${g}`,"> *":{flex:`none`},button:{padding:0,color:v,lineHeight:X(y),background:`transparent`,border:0,cursor:`pointer`,transition:`color ${b}`,fontSize:`inherit`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,"&:empty":{display:`none`}},"> button":{minWidth:`1.6em`,fontSize:D,"&:hover":{color:x},"&:disabled":{opacity:.25,pointerEvents:`none`}},"&-view":{flex:`auto`,fontWeight:S,lineHeight:X(y),"> button":{color:`inherit`,fontWeight:`inherit`,verticalAlign:`top`,"&:not(:first-child)":{marginInlineStart:c},"&:hover":{color:m}}}},"&-prev-icon, &-next-icon, &-super-prev-icon, &-super-next-icon":{position:`relative`,width:a,height:a,"&::before":{position:`absolute`,top:0,insetInlineStart:0,width:a,height:a,border:`0 solid currentcolor`,borderBlockStartWidth:_,borderInlineStartWidth:_,content:`""`}},"&-super-prev-icon, &-super-next-icon":{"&::after":{position:`absolute`,top:B,insetInlineStart:B,display:`inline-block`,width:a,height:a,border:`0 solid currentcolor`,borderBlockStartWidth:_,borderInlineStartWidth:_,content:`""`}},"&-prev-icon, &-super-prev-icon":{transform:`rotate(-45deg)`},"&-next-icon, &-super-next-icon":{transform:`rotate(135deg)`},"&-content":{width:`100%`,tableLayout:`fixed`,borderCollapse:`collapse`,"th, td":{position:`relative`,minWidth:C,fontWeight:`normal`},th:{height:e.calc(C).add(e.calc(w).mul(2)).equal(),color:E,verticalAlign:`middle`}},"&-cell":{padding:`${X(w)} 0`,color:T,cursor:`pointer`,"&-in-view":{color:E},...sR(e)},"&-decade-panel, &-year-panel, &-quarter-panel, &-month-panel":{[`${t}-content`]:{height:e.calc(k).mul(4).equal()},[r]:{padding:`0 ${X(c)}`}},"&-quarter-panel":{[`${t}-content`]:{height:A}},"&-decade-panel":{[r]:{padding:`0 ${X(e.calc(c).div(2).equal())}`},[`${t}-cell::before`]:{display:`none`}},"&-year-panel, &-quarter-panel, &-month-panel":{[`${t}-body`]:{padding:`0 ${X(c)}`},[r]:{width:i}},"&-date-panel":{[`${t}-body`]:{padding:`${X(c)} ${X(z)}`},[`${t}-content th`]:{boxSizing:`border-box`,padding:0}},"&-week-panel-row":{td:{"&:before":{transition:`background-color ${b}`},"&:first-child:before":{borderStartStartRadius:j,borderEndStartRadius:j},"&:last-child:before":{borderStartEndRadius:j,borderEndEndRadius:j}},"&:hover td:before":{background:N},"&-range-start td, &-range-end td, &-selected td, &-hover td":{[`&${n}`]:{"&:before":{background:m},[`&${t}-cell-week`]:{color:new jc(M).setA(.5).toHexString()},[r]:{color:M}}},"&-range-hover td:before":{background:L}},"&-week-panel, &-date-panel-show-week":{[`${t}-body`]:{padding:`${X(c)} ${X(s)}`},[`${t}-content th`]:{width:`auto`}},"&-datetime-panel":{display:`flex`,[`${t}-time-panel`]:{borderInlineStart:`${X(d)} ${f} ${g}`},[`${t}-date-panel, + ${t}-super-next-icon`]:{transform:`rotate(-135deg)`},[`${t}-time-panel`]:{[`${t}-content`]:{direction:`ltr`,"> *":{direction:`rtl`}}}}},"&-decade-panel, &-year-panel, &-quarter-panel, &-month-panel, &-week-panel, &-date-panel, &-time-panel":{display:`flex`,flexDirection:`column`,width:V},"&-header":{display:`flex`,padding:`0 ${X(c)}`,color:h,borderBottom:`${X(d)} ${f} ${g}`,"> *":{flex:`none`},button:{padding:0,color:v,lineHeight:X(y),background:`transparent`,border:0,cursor:`pointer`,transition:`color ${b}`,fontSize:`inherit`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,"&:empty":{display:`none`}},"> button":{minWidth:`1.6em`,fontSize:D,"&:hover":{color:x},"&:disabled":{opacity:.25,pointerEvents:`none`}},"&-view":{flex:`auto`,fontWeight:S,lineHeight:X(y),"> button":{color:`inherit`,fontWeight:`inherit`,verticalAlign:`top`,"&:not(:first-child)":{marginInlineStart:c},"&:hover":{color:m}}}},"&-prev-icon, &-next-icon, &-super-prev-icon, &-super-next-icon":{position:`relative`,width:a,height:a,"&::before":{position:`absolute`,top:0,insetInlineStart:0,width:a,height:a,border:`0 solid currentcolor`,borderBlockStartWidth:_,borderInlineStartWidth:_,content:`""`}},"&-super-prev-icon, &-super-next-icon":{"&::after":{position:`absolute`,top:B,insetInlineStart:B,display:`inline-block`,width:a,height:a,border:`0 solid currentcolor`,borderBlockStartWidth:_,borderInlineStartWidth:_,content:`""`}},"&-prev-icon, &-super-prev-icon":{transform:`rotate(-45deg)`},"&-next-icon, &-super-next-icon":{transform:`rotate(135deg)`},"&-content":{width:`100%`,tableLayout:`fixed`,borderCollapse:`collapse`,"th, td":{position:`relative`,minWidth:C,fontWeight:`normal`},th:{height:e.calc(C).add(e.calc(w).mul(2)).equal(),color:E,verticalAlign:`middle`}},"&-cell":{padding:`${X(w)} 0`,color:T,cursor:`pointer`,"&-in-view":{color:E},...tte(e)},"&-decade-panel, &-year-panel, &-quarter-panel, &-month-panel":{[`${t}-content`]:{height:e.calc(k).mul(4).equal()},[r]:{padding:`0 ${X(c)}`}},"&-quarter-panel":{[`${t}-content`]:{height:A}},"&-decade-panel":{[r]:{padding:`0 ${X(e.calc(c).div(2).equal())}`},[`${t}-cell::before`]:{display:`none`}},"&-year-panel, &-quarter-panel, &-month-panel":{[`${t}-body`]:{padding:`0 ${X(c)}`},[r]:{width:i}},"&-date-panel":{[`${t}-body`]:{padding:`${X(c)} ${X(z)}`},[`${t}-content th`]:{boxSizing:`border-box`,padding:0}},"&-week-panel-row":{td:{"&:before":{transition:`background-color ${b}`},"&:first-child:before":{borderStartStartRadius:j,borderEndStartRadius:j},"&:last-child:before":{borderStartEndRadius:j,borderEndEndRadius:j}},"&:hover td:before":{background:N},"&-range-start td, &-range-end td, &-selected td, &-hover td":{[`&${n}`]:{"&:before":{background:m},[`&${t}-cell-week`]:{color:new jc(M).setA(.5).toHexString()},[r]:{color:M}}},"&-range-hover td:before":{background:L}},"&-week-panel, &-date-panel-show-week":{[`${t}-body`]:{padding:`${X(c)} ${X(s)}`},[`${t}-content th`]:{width:`auto`}},"&-datetime-panel":{display:`flex`,[`${t}-time-panel`]:{borderInlineStart:`${X(d)} ${f} ${g}`},[`${t}-date-panel, ${t}-time-panel`]:{transition:`opacity ${O}`},"&-active":{[`${t}-date-panel, - ${t}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:`auto`,minWidth:`auto`,[`${t}-content`]:{display:`flex`,flex:`auto`,height:P},"&-column":{flex:`1 0 auto`,width:F,margin:`${X(l)} 0`,padding:0,overflowY:`auto`,textAlign:`start`,listStyle:`none`,transition:`background-color ${b}`,overflowX:`hidden`,"&::-webkit-scrollbar":{width:8,backgroundColor:`transparent`},"&::-webkit-scrollbar-thumb":{backgroundColor:e.colorTextTertiary,borderRadius:e.borderRadiusSM},"&":{scrollbarWidth:`thin`,scrollbarColor:`${e.colorTextTertiary} transparent`},"&::after":{display:`block`,height:`calc(100% - ${X(I)})`,content:`""`},"&:not(:first-child)":{borderInlineStart:`${X(d)} ${f} ${g}`},"&-active":{background:new jc(L).setA(.2).toHexString()},"> li":{margin:0,padding:0,[`&${t}-time-panel-cell`]:{marginInline:R,[`${t}-time-panel-cell-inner`]:{display:`block`,width:e.calc(F).sub(e.calc(R).mul(2)).equal(),height:I,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:e.calc(F).sub(I).div(2).equal(),color:E,lineHeight:X(I),borderRadius:j,cursor:`pointer`,transition:`background-color ${b}`,"&:hover":{background:N}},"&-selected":{[`${t}-time-panel-cell-inner`]:{background:L}},"&-disabled":{[`${t}-time-panel-cell-inner`]:{color:T,background:`transparent`,cursor:`not-allowed`}}}}}}}}},lR=e=>{let{componentCls:t,textHeight:n,lineWidth:r,paddingSM:i,antCls:a,colorPrimary:o,cellActiveWithRangeBg:s,colorPrimaryBorder:c,lineType:l,colorSplit:u}=e;return{[`${t}-dropdown`]:{[`${t}-footer`]:{borderTop:`${X(r)} ${l} ${u}`,"&-extra":{padding:`0 ${X(i)}`,lineHeight:X(e.calc(n).sub(e.calc(r).mul(2)).equal()),textAlign:`start`,"&:not(:last-child)":{borderBottom:`${X(r)} ${l} ${u}`}}},[`${t}-panels + ${t}-footer ${t}-ranges`]:{justifyContent:`space-between`},[`${t}-ranges`]:{marginBlock:0,paddingInline:X(i),overflow:`hidden`,textAlign:`start`,listStyle:`none`,display:`flex`,justifyContent:`center`,alignItems:`center`,"> li":{lineHeight:X(e.calc(n).sub(e.calc(r).mul(2)).equal()),display:`inline-block`},[`${t}-now-btn-disabled`]:{pointerEvents:`none`,color:e.colorTextDisabled},[`${t}-preset > ${a}-tag-blue`]:{color:o,background:s,borderColor:c,cursor:`pointer`},[`${t}-ok`]:{paddingBlock:e.calc(r).mul(2).equal(),marginInlineStart:`auto`}}}}},uR=e=>{let{componentCls:t,controlHeightLG:n,paddingXXS:r,padding:i}=e;return{pickerCellCls:`${t}-cell`,pickerCellInnerCls:`${t}-cell-inner`,pickerYearMonthCellWidth:e.calc(n).mul(1.5).equal(),pickerQuarterPanelContentHeight:e.calc(n).mul(1.4).equal(),pickerCellPaddingVertical:e.calc(r).add(e.calc(r).div(2)).equal(),pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconMargin:4,pickerControlIconBorderWidth:1.5,pickerDatePanelPaddingHorizontal:e.calc(i).add(e.calc(r).div(2)).equal()}},dR=e=>{let{colorBgContainerDisabled:t,controlHeight:n,controlHeightSM:r,controlHeightLG:i,paddingXXS:a,lineWidth:o}=e,s=a*2,c=o*2,l=Math.min(n-s,n-c),u=Math.min(r-s,r-c),d=Math.min(i-s,i-c);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(a/2),cellHoverBg:e.controlItemBgHover,cellActiveWithRangeBg:e.controlItemBgActive,cellHoverWithRangeBg:new jc(e.colorPrimary).lighten(35).toHexString(),cellRangeBorderColor:new jc(e.colorPrimary).lighten(20).toHexString(),cellBgDisabled:t,timeColumnWidth:i*1.4,timeColumnHeight:224,timeCellHeight:28,cellWidth:r*1.5,cellHeight:r,textHeight:i,withoutTimeCellHeight:i*1.65,multipleItemBg:e.colorFillSecondary,multipleItemBorderColor:`transparent`,multipleItemHeight:l,multipleItemHeightSM:u,multipleItemHeightLG:d,multipleSelectorBgDisabled:t,multipleItemColorDisabled:e.colorTextDisabled,multipleItemBorderColorDisabled:`transparent`}},fR=e=>({...BL(e),...dR(e),...Mw(e),presetsWidth:120,presetsMaxWidth:200,zIndexPopup:e.zIndexPopupBase+50}),pR=e=>{let{componentCls:t}=e;return{[t]:[{...WL(e),...$L(e),...YL(e),...KL(e)},{"&-outlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${X(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-filled":{[`&${t}-multiple ${t}-selection-item`]:{background:e.colorBgContainer,border:`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}},"&-borderless":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${X(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-underlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${X(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}}}]}},mR=(e,t)=>({padding:`${X(e)} ${X(t)}`}),hR=e=>{let{componentCls:t,colorError:n,colorWarning:r}=e;return{[`${t}:not(${t}-disabled):not([disabled])`]:{[`&${t}-status-error`]:{[`${t}-active-bar`]:{background:n}},[`&${t}-status-warning`]:{[`${t}-active-bar`]:{background:r}}}}},gR=e=>{let{componentCls:t,antCls:n,paddingInline:r,lineWidth:i,lineType:a,colorBorder:o,borderRadius:s,motionDurationMid:c,colorTextDisabled:l,colorTextPlaceholder:u,colorTextQuaternary:d,fontSizeLG:f,inputFontSizeLG:p,fontSizeSM:m,inputFontSizeSM:h,controlHeightSM:g,paddingInlineSM:_,paddingXS:v,marginXS:y,colorIcon:b,lineWidthBold:x,colorPrimary:S,motionDurationSlow:C,zIndexPopup:w,paddingXXS:T,sizePopupArrow:E,colorBgElevated:D,borderRadiusLG:O,boxShadowSecondary:k,borderRadiusSM:A,colorSplit:j,cellHoverBg:M,presetsWidth:N,presetsMaxWidth:P,boxShadowPopoverArrow:F,fontHeight:I,lineHeightLG:L}=e;return[{[t]:{...Vl(e),...mR(e.paddingBlock,e.paddingInline),position:`relative`,display:`inline-flex`,alignItems:`center`,lineHeight:1,borderRadius:s,transition:[`border`,`box-shadow`,`background-color`].map(e=>`${e} ${c}`).join(`, `),[`${t}-prefix`]:{flex:`0 0 auto`,marginInlineEnd:e.inputAffixPadding},[`${t}-input`]:{position:`relative`,display:`inline-flex`,alignItems:`center`,width:`100%`,"> input":{position:`relative`,display:`inline-block`,width:`100%`,color:`inherit`,fontSize:e.inputFontSize??e.fontSize,lineHeight:e.lineHeight,transition:`all ${c}`,...eR(u),flex:`auto`,minWidth:1,height:`auto`,padding:0,background:`transparent`,border:0,fontFamily:`inherit`,"&:focus":{boxShadow:`none`,outline:0},"&[disabled]":{background:`transparent`,color:l,cursor:`not-allowed`}},"&-placeholder":{"> input":{color:u}}},"&-large":{...mR(e.paddingBlockLG,e.paddingInlineLG),borderRadius:e.borderRadiusLG,[`${t}-input > input`]:{fontSize:p??f,lineHeight:L}},"&-small":{...mR(e.paddingBlockSM,e.paddingInlineSM),borderRadius:e.borderRadiusSM,[`${t}-input > input`]:{fontSize:h??m}},[`${t}-suffix`]:{display:`flex`,flex:`none`,alignSelf:`center`,marginInlineStart:e.calc(v).div(2).equal(),color:d,lineHeight:1,pointerEvents:`none`,transition:[`opacity`,`color`].map(e=>`${e} ${c}`).join(`, `),"> *":{verticalAlign:`top`,"&:not(:last-child)":{marginInlineEnd:y}}},[`${t}-clear`]:{position:`absolute`,top:`50%`,insetInlineEnd:0,color:d,lineHeight:1,transform:`translateY(-50%)`,cursor:`pointer`,opacity:0,transition:[`opacity`,`color`].map(e=>`${e} ${c}`).join(`, `),"> *":{verticalAlign:`top`},"&:hover":{color:b}},"&:hover":{[`${t}-clear`]:{opacity:1},[`${t}-suffix:not(:last-child)`]:{opacity:0}},[`${t}-separator`]:{position:`relative`,display:`inline-block`,width:`1em`,height:f,color:d,fontSize:f,verticalAlign:`top`,cursor:`default`,[`${t}-focused &`]:{color:b},[`${t}-range-separator &`]:{[`${t}-disabled &`]:{cursor:`not-allowed`}}},"&-range":{position:`relative`,display:`inline-flex`,[`${t}-active-bar`]:{bottom:e.calc(i).mul(-1).equal(),height:x,background:S,opacity:0,transition:`all ${C} ease-out`,pointerEvents:`none`},[`&${t}-focused`]:{[`${t}-active-bar`]:{opacity:1}},[`${t}-range-separator`]:{alignItems:`center`,padding:`0 ${X(v)}`,lineHeight:1}},"&-range, &-multiple":{[`${t}-clear`]:{insetInlineEnd:r},[`&${t}-small`]:{[`${t}-clear`]:{insetInlineEnd:_}}},"&-dropdown":{...Vl(e),...cR(e),pointerEvents:`none`,position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:w,[`&${t}-dropdown-hidden`]:{display:`none`},"&-rtl":{direction:`rtl`},[`&${t}-dropdown-placement-bottomLeft, + ${t}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:`auto`,minWidth:`auto`,[`${t}-content`]:{display:`flex`,flex:`auto`,height:P},"&-column":{flex:`1 0 auto`,width:F,margin:`${X(l)} 0`,padding:0,overflowY:`auto`,textAlign:`start`,listStyle:`none`,transition:`background-color ${b}`,overflowX:`hidden`,"&::-webkit-scrollbar":{width:8,backgroundColor:`transparent`},"&::-webkit-scrollbar-thumb":{backgroundColor:e.colorTextTertiary,borderRadius:e.borderRadiusSM},"&":{scrollbarWidth:`thin`,scrollbarColor:`${e.colorTextTertiary} transparent`},"&::after":{display:`block`,height:`calc(100% - ${X(I)})`,content:`""`},"&:not(:first-child)":{borderInlineStart:`${X(d)} ${f} ${g}`},"&-active":{background:new jc(L).setA(.2).toHexString()},"> li":{margin:0,padding:0,[`&${t}-time-panel-cell`]:{marginInline:R,[`${t}-time-panel-cell-inner`]:{display:`block`,width:e.calc(F).sub(e.calc(R).mul(2)).equal(),height:I,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:e.calc(F).sub(I).div(2).equal(),color:E,lineHeight:X(I),borderRadius:j,cursor:`pointer`,transition:`background-color ${b}`,"&:hover":{background:N}},"&-selected":{[`${t}-time-panel-cell-inner`]:{background:L}},"&-disabled":{[`${t}-time-panel-cell-inner`]:{color:T,background:`transparent`,cursor:`not-allowed`}}}}}}}}},rte=e=>{let{componentCls:t,textHeight:n,lineWidth:r,paddingSM:i,antCls:a,colorPrimary:o,cellActiveWithRangeBg:s,colorPrimaryBorder:c,lineType:l,colorSplit:u}=e;return{[`${t}-dropdown`]:{[`${t}-footer`]:{borderTop:`${X(r)} ${l} ${u}`,"&-extra":{padding:`0 ${X(i)}`,lineHeight:X(e.calc(n).sub(e.calc(r).mul(2)).equal()),textAlign:`start`,"&:not(:last-child)":{borderBottom:`${X(r)} ${l} ${u}`}}},[`${t}-panels + ${t}-footer ${t}-ranges`]:{justifyContent:`space-between`},[`${t}-ranges`]:{marginBlock:0,paddingInline:X(i),overflow:`hidden`,textAlign:`start`,listStyle:`none`,display:`flex`,justifyContent:`center`,alignItems:`center`,"> li":{lineHeight:X(e.calc(n).sub(e.calc(r).mul(2)).equal()),display:`inline-block`},[`${t}-now-btn-disabled`]:{pointerEvents:`none`,color:e.colorTextDisabled},[`${t}-preset > ${a}-tag-blue`]:{color:o,background:s,borderColor:c,cursor:`pointer`},[`${t}-ok`]:{paddingBlock:e.calc(r).mul(2).equal(),marginInlineStart:`auto`}}}}},oR=e=>{let{componentCls:t,controlHeightLG:n,paddingXXS:r,padding:i}=e;return{pickerCellCls:`${t}-cell`,pickerCellInnerCls:`${t}-cell-inner`,pickerYearMonthCellWidth:e.calc(n).mul(1.5).equal(),pickerQuarterPanelContentHeight:e.calc(n).mul(1.4).equal(),pickerCellPaddingVertical:e.calc(r).add(e.calc(r).div(2)).equal(),pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconMargin:4,pickerControlIconBorderWidth:1.5,pickerDatePanelPaddingHorizontal:e.calc(i).add(e.calc(r).div(2)).equal()}},sR=e=>{let{colorBgContainerDisabled:t,controlHeight:n,controlHeightSM:r,controlHeightLG:i,paddingXXS:a,lineWidth:o}=e,s=a*2,c=o*2,l=Math.min(n-s,n-c),u=Math.min(r-s,r-c),d=Math.min(i-s,i-c);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(a/2),cellHoverBg:e.controlItemBgHover,cellActiveWithRangeBg:e.controlItemBgActive,cellHoverWithRangeBg:new jc(e.colorPrimary).lighten(35).toHexString(),cellRangeBorderColor:new jc(e.colorPrimary).lighten(20).toHexString(),cellBgDisabled:t,timeColumnWidth:i*1.4,timeColumnHeight:224,timeCellHeight:28,cellWidth:r*1.5,cellHeight:r,textHeight:i,withoutTimeCellHeight:i*1.65,multipleItemBg:e.colorFillSecondary,multipleItemBorderColor:`transparent`,multipleItemHeight:l,multipleItemHeightSM:u,multipleItemHeightLG:d,multipleSelectorBgDisabled:t,multipleItemColorDisabled:e.colorTextDisabled,multipleItemBorderColorDisabled:`transparent`}},cR=e=>({...zL(e),...sR(e),...jw(e),presetsWidth:120,presetsMaxWidth:200,zIndexPopup:e.zIndexPopupBase+50}),lR=e=>{let{componentCls:t}=e;return{[t]:[{...UL(e),...QL(e),...JL(e),...GL(e)},{"&-outlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${X(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-filled":{[`&${t}-multiple ${t}-selection-item`]:{background:e.colorBgContainer,border:`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}},"&-borderless":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${X(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-underlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${X(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}}}]}},uR=(e,t)=>({padding:`${X(e)} ${X(t)}`}),dR=e=>{let{componentCls:t,colorError:n,colorWarning:r}=e;return{[`${t}:not(${t}-disabled):not([disabled])`]:{[`&${t}-status-error`]:{[`${t}-active-bar`]:{background:n}},[`&${t}-status-warning`]:{[`${t}-active-bar`]:{background:r}}}}},fR=e=>{let{componentCls:t,antCls:n,paddingInline:r,lineWidth:i,lineType:a,colorBorder:o,borderRadius:s,motionDurationMid:c,colorTextDisabled:l,colorTextPlaceholder:u,colorTextQuaternary:d,fontSizeLG:f,inputFontSizeLG:p,fontSizeSM:m,inputFontSizeSM:h,controlHeightSM:g,paddingInlineSM:_,paddingXS:v,marginXS:y,colorIcon:b,lineWidthBold:x,colorPrimary:S,motionDurationSlow:C,zIndexPopup:w,paddingXXS:T,sizePopupArrow:E,colorBgElevated:D,borderRadiusLG:O,boxShadowSecondary:k,borderRadiusSM:A,colorSplit:j,cellHoverBg:M,presetsWidth:N,presetsMaxWidth:P,boxShadowPopoverArrow:F,fontHeight:I,lineHeightLG:L}=e;return[{[t]:{...Vl(e),...uR(e.paddingBlock,e.paddingInline),position:`relative`,display:`inline-flex`,alignItems:`center`,lineHeight:1,borderRadius:s,transition:[`border`,`box-shadow`,`background-color`].map(e=>`${e} ${c}`).join(`, `),[`${t}-prefix`]:{flex:`0 0 auto`,marginInlineEnd:e.inputAffixPadding},[`${t}-input`]:{position:`relative`,display:`inline-flex`,alignItems:`center`,width:`100%`,"> input":{position:`relative`,display:`inline-block`,width:`100%`,color:`inherit`,fontSize:e.inputFontSize??e.fontSize,lineHeight:e.lineHeight,transition:`all ${c}`,...$L(u),flex:`auto`,minWidth:1,height:`auto`,padding:0,background:`transparent`,border:0,fontFamily:`inherit`,"&:focus":{boxShadow:`none`,outline:0},"&[disabled]":{background:`transparent`,color:l,cursor:`not-allowed`}},"&-placeholder":{"> input":{color:u}}},"&-large":{...uR(e.paddingBlockLG,e.paddingInlineLG),borderRadius:e.borderRadiusLG,[`${t}-input > input`]:{fontSize:p??f,lineHeight:L}},"&-small":{...uR(e.paddingBlockSM,e.paddingInlineSM),borderRadius:e.borderRadiusSM,[`${t}-input > input`]:{fontSize:h??m}},[`${t}-suffix`]:{display:`flex`,flex:`none`,alignSelf:`center`,marginInlineStart:e.calc(v).div(2).equal(),color:d,lineHeight:1,pointerEvents:`none`,transition:[`opacity`,`color`].map(e=>`${e} ${c}`).join(`, `),"> *":{verticalAlign:`top`,"&:not(:last-child)":{marginInlineEnd:y}}},[`${t}-clear`]:{position:`absolute`,top:`50%`,insetInlineEnd:0,color:d,lineHeight:1,transform:`translateY(-50%)`,cursor:`pointer`,opacity:0,transition:[`opacity`,`color`].map(e=>`${e} ${c}`).join(`, `),"> *":{verticalAlign:`top`},"&:hover":{color:b}},"&:hover":{[`${t}-clear`]:{opacity:1},[`${t}-suffix:not(:last-child)`]:{opacity:0}},[`${t}-separator`]:{position:`relative`,display:`inline-block`,width:`1em`,height:f,color:d,fontSize:f,verticalAlign:`top`,cursor:`default`,[`${t}-focused &`]:{color:b},[`${t}-range-separator &`]:{[`${t}-disabled &`]:{cursor:`not-allowed`}}},"&-range":{position:`relative`,display:`inline-flex`,[`${t}-active-bar`]:{bottom:e.calc(i).mul(-1).equal(),height:x,background:S,opacity:0,transition:`all ${C} ease-out`,pointerEvents:`none`},[`&${t}-focused`]:{[`${t}-active-bar`]:{opacity:1}},[`${t}-range-separator`]:{alignItems:`center`,padding:`0 ${X(v)}`,lineHeight:1}},"&-range, &-multiple":{[`${t}-clear`]:{insetInlineEnd:r},[`&${t}-small`]:{[`${t}-clear`]:{insetInlineEnd:_}}},"&-dropdown":{...Vl(e),...nte(e),pointerEvents:`none`,position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:w,[`&${t}-dropdown-hidden`]:{display:`none`},"&-rtl":{direction:`rtl`},[`&${t}-dropdown-placement-bottomLeft, &${t}-dropdown-placement-bottomRight`]:{[`${t}-range-arrow`]:{top:0,display:`block`,transform:`translateY(-100%)`}},[`&${t}-dropdown-placement-topLeft, &${t}-dropdown-placement-topRight`]:{[`${t}-range-arrow`]:{bottom:0,display:`block`,transform:`translateY(100%) rotate(180deg)`}},[`&${n}-slide-up-appear, &${n}-slide-up-enter`]:{[`${t}-range-arrow${t}-range-arrow`]:{transition:`none`}},[`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topLeft, &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topRight, @@ -278,33 +278,33 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomLeft, &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomRight`]:{animationName:cg},[`&${n}-slide-up-leave ${t}-panel-container`]:{pointerEvents:`none`},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topLeft, &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topRight`]:{animationName:dg},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomLeft, - &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomRight`]:{animationName:lg},[`${t}-panel > ${t}-time-panel`]:{paddingTop:T},[`${t}-range-wrapper`]:{display:`flex`,position:`relative`},[`${t}-range-arrow`]:{position:`absolute`,zIndex:1,display:`none`,paddingInline:e.calc(r).mul(1.5).equal(),boxSizing:`content-box`,transition:`all ${C} ease-out`,...Nw(e,D,F),"&:before":{insetInlineStart:e.calc(r).mul(1.5).equal()}},[`${t}-panel-container`]:{overflow:`hidden`,verticalAlign:`top`,background:D,borderRadius:O,boxShadow:k,transition:`margin ${C}`,display:`inline-block`,pointerEvents:`auto`,[`${t}-panel-layout`]:{display:`flex`,flexWrap:`nowrap`,alignItems:`stretch`},[`${t}-presets`]:{display:`flex`,flexDirection:`column`,minWidth:N,maxWidth:P,ul:{height:0,flex:`auto`,listStyle:`none`,overflow:`auto`,margin:0,padding:v,borderInlineEnd:`${X(i)} ${a} ${j}`,li:{...Bl,borderRadius:A,paddingInline:v,paddingBlock:e.calc(g).sub(I).div(2).equal(),cursor:`pointer`,transition:`all ${C}`,"+ li":{marginTop:y},"&:hover":{background:M}}}},[`${t}-panels`]:{display:`inline-flex`,flexWrap:`nowrap`,"&:last-child":{[`${t}-panel`]:{borderWidth:0}}},[`${t}-panel`]:{verticalAlign:`top`,background:`transparent`,borderRadius:0,borderWidth:0,[`${t}-content, table`]:{textAlign:`center`},"&-focused":{borderColor:o}}}},"&-dropdown-range":{padding:`${X(e.calc(E).mul(2).div(3).equal())} 0`,"&-hidden":{display:`none`}},"&-rtl":{direction:`rtl`,[`${t}-separator`]:{transform:`scale(-1, 1)`},[`${t}-footer`]:{"&-extra":{direction:`rtl`}}}}},_g(e,`slide-up`),_g(e,`slide-down`),sg(e,`move-up`),sg(e,`move-down`)]},_R=Xl(`DatePicker`,e=>{let t=lc(zL(e),uR(e),{inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[lR(t),gR(t),pR(t),hR(t),$ee(t),v_(e,{focusElCls:`${e.componentCls}-focused`})]},fR),vR=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z`}},{tag:`path`,attrs:{d:`M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z`}}]},name:`plus`,theme:`outlined`}}))());function yR(){return yR=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,yR({},e,{ref:t,icon:vR.default}))),xR=(0,S.createContext)(null),SR=e=>{let{activeTabOffset:t,horizontal:n,rtl:r,indicator:i={}}=e,{size:a,align:o=`center`}=i,[s,c]=(0,S.useState)(),l=(0,S.useRef)(),u=S.useCallback(e=>typeof a==`function`?a(e):typeof a==`number`?a:e,[a]);function d(){Ei.cancel(l.current)}return(0,S.useEffect)(()=>{let e={};if(t)if(n){e.width=u(t.width);let n=r?`right`:`left`;o===`start`&&(e[n]=t[n]),o===`center`&&(e[n]=t[n]+t.width/2,e.transform=r?`translateX(50%)`:`translateX(-50%)`),o===`end`&&(e[n]=t[n]+t.width,e.transform=`translateX(-100%)`)}else e.height=u(t.height),o===`start`&&(e.top=t.top),o===`center`&&(e.top=t.top+t.height/2,e.transform=`translateY(-50%)`),o===`end`&&(e.top=t.top+t.height,e.transform=`translateY(-100%)`);return d(),l.current=Ei(()=>{s&&e&&Object.keys(e).every(t=>{let n=e[t],r=s[t];return typeof n==`number`&&typeof r==`number`?Math.round(n)===Math.round(r):n===r})||c(e)}),d},[JSON.stringify(t),n,r,o,u]),{style:s}},CR={width:0,height:0,left:0,top:0};function wR(e,t,n){return(0,S.useMemo)(()=>{let n=new Map,r=t.get(e[0]?.key)||CR,i=r.left+r.width;for(let r=0;re.key).join(`_`),t,n])}function TR(e,t){let n=S.useRef(e),[,r]=S.useState({});function i(e){let i=typeof e==`function`?e(n.current):e;i!==n.current&&t(i,n.current),n.current=i,r({})}return[n.current,i]}var ER=.1,DR=.01,OR=20,kR=.995**OR;function AR(e,t){let[n,r]=(0,S.useState)(),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(),u=(0,S.useRef)();function d(e){let{screenX:t,screenY:n}=e.touches[0];r({x:t,y:n}),window.clearInterval(u.current)}function f(e){if(!n)return;let{screenX:o,screenY:c}=e.touches[0];r({x:o,y:c});let u=o-n.x,d=c-n.y;t(u,d);let f=Date.now();a(f),s(f-i),l({x:u,y:d})}function p(){if(n&&(r(null),l(null),c)){let e=c.x/o,n=c.y/o;if(Math.max(Math.abs(e),Math.abs(n)){if(Math.abs(r)o?(i=n,m.current=`x`):(i=r,m.current=`y`),t(-i,-i)&&e.preventDefault()}let g=(0,S.useRef)(null);g.current={onTouchStart:d,onTouchMove:f,onTouchEnd:p,onWheel:h},S.useEffect(()=>{function t(e){g.current.onTouchStart(e)}function n(e){g.current.onTouchMove(e)}function r(e){g.current.onTouchEnd(e)}function i(e){g.current.onWheel(e)}return document.addEventListener(`touchmove`,n,{passive:!1}),document.addEventListener(`touchend`,r,{passive:!0}),e.current.addEventListener(`touchstart`,t,{passive:!0}),e.current.addEventListener(`wheel`,i,{passive:!1}),()=>{document.removeEventListener(`touchmove`,n),document.removeEventListener(`touchend`,r)}},[])}function jR(e){let[t,n]=(0,S.useState)(0),r=(0,S.useRef)(0),i=(0,S.useRef)();return i.current=e,Hn(()=>{i.current?.()},[t]),()=>{r.current===t&&(r.current+=1,n(r.current))}}function MR(e){let t=(0,S.useRef)([]),[,n]=(0,S.useState)({}),r=(0,S.useRef)(typeof e==`function`?e():e),i=jR(()=>{let e=r.current;t.current.forEach(t=>{e=t(e)}),t.current=[],r.current=e,n({})});function a(e){t.current.push(e),i()}return[r.current,a]}var NR={width:0,height:0,left:0,top:0,right:0};function PR(e,t,n,r,i,a,{tabs:o,tabPosition:s,rtl:c}){let l,u,d;return[`top`,`bottom`].includes(s)?(l=`width`,u=c?`right`:`left`,d=Math.abs(n)):(l=`height`,u=`top`,d=-n),(0,S.useMemo)(()=>{if(!o.length)return[0,0];let n=o.length,r=n;for(let i=0;iMath.floor(d+t)){r=i-1;break}}let i=0;for(let t=n-1;t>=0;--t)if((e.get(o[t].key)||NR)[u]r?[0,-1]:[i,r]},[e,t,r,i,a,d,s,o.map(e=>e.key).join(`_`),c])}function FR(e){let t;return e instanceof Map?(t={},e.forEach((e,n)=>{t[n]=e})):t=e,JSON.stringify(t)}var IR=`TABS_DQ`;function LR(e){return String(e).replace(/"/g,IR)}function RR(e,t,n,r){return!(!n||r||e===!1||e===void 0&&(t===!1||t===null))}var zR=S.forwardRef((e,t)=>{let{prefixCls:n,editable:r,locale:i,style:a}=e;return!r||r.showAdd===!1?null:S.createElement(`button`,{ref:t,type:`button`,className:`${n}-nav-add`,style:a,"aria-label":i?.addAriaLabel||`Add tab`,onClick:e=>{r.onEdit(`add`,{event:e})}},r.addIcon||`+`)}),BR=S.forwardRef((e,t)=>{let{position:n,prefixCls:r,extra:i}=e;if(!i)return null;let a,o={};return typeof i==`object`&&!S.isValidElement(i)?o=i:o.right=i,n===`right`&&(a=o.right),n===`left`&&(a=o.left),a?S.createElement(`div`,{className:`${r}-extra-content`,ref:t},a):null});function VR(){return VR=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,id:r,tabs:i,locale:a,mobile:o,more:s={},style:c,className:l,editable:u,tabBarGutter:d,rtl:f,removeAriaLabel:p,onTabClick:m,getPopupContainer:h,popupClassName:g,popupStyle:_}=e,[v,y]=(0,S.useState)(!1),[b,x]=(0,S.useState)(null),{icon:C=`More`}=s,w=`${r}-more-popup`,T=`${n}-dropdown`,E=b===null?null:`${w}-${b}`,D=a?.dropdownAriaLabel;function O(e,t){e.preventDefault(),e.stopPropagation(),u.onEdit(`remove`,{key:t,event:e})}let k=S.createElement(AE,{onClick:({key:e,domEvent:t})=>{m(e,t),y(!1)},prefixCls:`${T}-menu`,id:w,tabIndex:-1,role:`listbox`,"aria-activedescendant":E,selectedKeys:[b],"aria-label":D===void 0?`expanded dropdown`:D},i.map(e=>{let{closable:t,disabled:n,closeIcon:i,key:a,label:o}=e,s=RR(t,i,u,n);return S.createElement(oE,{key:a,id:`${w}-${a}`,role:`option`,"aria-controls":r&&`${r}-panel-${a}`,disabled:n},S.createElement(`span`,null,o),s&&S.createElement(`button`,{type:`button`,"aria-label":p||`remove`,tabIndex:0,className:`${T}-menu-item-remove`,onClick:e=>{e.stopPropagation(),O(e,a)}},i||u.removeIcon||`×`))}));function A(e){let t=i.filter(e=>!e.disabled),n=t.findIndex(e=>e.key===b)||0,r=t.length;for(let i=0;i{let e=document.getElementById(E);e?.scrollIntoView&&e.scrollIntoView(!1)},[E,b]),(0,S.useEffect)(()=>{v||x(null)},[v]);let M={marginInlineStart:d};i.length||(M.visibility=`hidden`,M.order=1);let N=Y(g,{[`${T}-rtl`]:f}),P=o?null:S.createElement(bT,VR({prefixCls:T,overlay:k,visible:i.length?v:!1,onVisibleChange:y,overlayClassName:N,overlayStyle:_,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:h},s),S.createElement(`button`,{type:`button`,className:`${n}-nav-more`,style:M,"aria-haspopup":`listbox`,"aria-controls":w,id:`${r}-more`,"aria-expanded":v,onKeyDown:j},C));return S.createElement(`div`,{className:Y(`${n}-nav-operations`,l),style:c,ref:t},P,S.createElement(zR,{prefixCls:n,locale:a,editable:u}))}),UR=S.memo(HR,(e,t)=>t.tabMoving),WR=e=>{let{prefixCls:t,id:n,active:r,focus:i,tab:{key:a,label:o,disabled:s,closeIcon:c,icon:l},closable:u,renderWrapper:d,removeAriaLabel:f,editable:p,onClick:m,onFocus:h,onBlur:g,onKeyDown:_,onMouseDown:v,onMouseUp:y,style:b,className:x,tabCount:C,currentPosition:w}=e,T=`${t}-tab`,E=RR(u,c,p,s);function D(e){s||m(e)}function O(e){e.preventDefault(),e.stopPropagation(),p.onEdit(`remove`,{key:a,event:e})}let k=S.useMemo(()=>l&&typeof o==`string`?S.createElement(`span`,null,o):o,[o,l]),A=S.useRef(null);S.useEffect(()=>{i&&A.current&&A.current.focus()},[i]);let j=S.createElement(`div`,{key:a,"data-node-key":LR(a),className:Y(T,x,{[`${T}-with-remove`]:E,[`${T}-active`]:r,[`${T}-disabled`]:s,[`${T}-focus`]:i}),style:b,onClick:D},S.createElement(`div`,{ref:A,role:`tab`,"aria-selected":r,id:n&&`${n}-tab-${a}`,className:`${T}-btn`,"aria-controls":n&&`${n}-panel-${a}`,"aria-disabled":s,tabIndex:s?null:r?0:-1,onClick:e=>{e.stopPropagation(),D(e)},onKeyDown:_,onMouseDown:v,onMouseUp:y,onFocus:h,onBlur:g},i&&S.createElement(`div`,{"aria-live":`polite`,style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},`Tab ${w} of ${C}`),l&&S.createElement(`span`,{className:`${T}-icon`},l),o&&k),E&&S.createElement(`button`,{type:`button`,"aria-label":f||`remove`,tabIndex:r?0:-1,className:`${T}-remove`,onClick:e=>{e.stopPropagation(),O(e)}},c||p.removeIcon||`×`));return d?d(j):j};function GR(){return GR=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{offsetWidth:n,offsetHeight:r,offsetTop:i,offsetLeft:a}=e,{width:o,height:s,left:c,top:l}=e.getBoundingClientRect();return Math.abs(o-n)<1?[o,s,c-t.left,l-t.top]:[n,r,a,i]},qR=e=>{let{offsetWidth:t=0,offsetHeight:n=0}=e.current||{};if(e.current){let{width:n,height:r}=e.current.getBoundingClientRect();if(Math.abs(n-t)<1)return[n,r]}return[t,n]},JR=(e,t)=>e[+!t],YR=S.forwardRef((e,t)=>{let{className:n,style:r,id:i,animated:a,activeKey:o,rtl:s,extra:c,editable:l,locale:u,tabPosition:d,tabBarGutter:f,children:p,onTabClick:m,onTabScroll:h,indicator:g,classNames:_,styles:v}=e,{prefixCls:y,tabs:b}=S.useContext(xR),x=(0,S.useRef)(null),C=(0,S.useRef)(null),w=(0,S.useRef)(null),T=(0,S.useRef)(null),E=(0,S.useRef)(null),D=(0,S.useRef)(null),O=(0,S.useRef)(null),k=d===`top`||d===`bottom`,[A,j]=TR(0,(e,t)=>{k&&h&&h({direction:e>t?`left`:`right`})}),[M,N]=TR(0,(e,t)=>{!k&&h&&h({direction:e>t?`top`:`bottom`})}),[P,F]=(0,S.useState)([0,0]),[I,L]=(0,S.useState)([0,0]),[R,z]=(0,S.useState)([0,0]),[B,V]=(0,S.useState)([0,0]),[H,U]=MR(new Map),ee=wR(b,H,I[0]),te=JR(P,k),ne=JR(I,k),W=JR(R,k),re=JR(B,k),G=Math.floor(te)J?J:e}let oe=(0,S.useRef)(null),[se,ce]=(0,S.useState)();function le(){ce(Date.now())}function ue(){oe.current&&clearTimeout(oe.current)}AR(T,(e,t)=>{function n(e,t){e(e=>ae(e+t))}return G?(k?n(j,e):n(N,t),ue(),le(),!0):!1}),(0,S.useEffect)(()=>(ue(),se&&(oe.current=setTimeout(()=>{ce(0)},100)),ue),[se]);let[de,fe]=PR(ee,K,k?A:M,ne,W,re,{...e,tabs:b}),pe=Rn((e=o)=>{let t=ee.get(e)||{width:0,height:0,left:0,right:0,top:0};if(k){let e=A;s?t.rightA+K&&(e=t.right+t.width-K):t.left<-A?e=-t.left:t.left+t.width>-A+K&&(e=-(t.left+t.width-K)),N(0),j(ae(e))}else{let e=M;t.top<-M?e=-t.top:t.top+t.height>-M+K&&(e=-(t.top+t.height-K)),j(0),N(ae(e))}}),[me,he]=(0,S.useState)(),[ge,_e]=(0,S.useState)(!1),ve=b.filter(e=>!e.disabled).map(e=>e.key),ye=e=>{let t=ve.indexOf(me||o),n=ve.length,r=ve[(t+e+n)%n];he(r)},be=(e,t)=>{let n=ve.indexOf(e),r=b.find(t=>t.key===e);RR(r?.closable,r?.closeIcon,l,r?.disabled)&&(t.preventDefault(),t.stopPropagation(),l.onEdit(`remove`,{key:e,event:t}),n===ve.length-1?ye(-1):ye(1))},xe=(e,t)=>{_e(!0),t.button===1&&be(e,t)},Se=e=>{let{code:t}=e,n=s&&k,r=ve[0],i=ve[ve.length-1];switch(t){case`ArrowLeft`:k&&ye(n?1:-1);break;case`ArrowRight`:k&&ye(n?-1:1);break;case`ArrowUp`:e.preventDefault(),k||ye(-1);break;case`ArrowDown`:e.preventDefault(),k||ye(1);break;case`Home`:e.preventDefault(),he(r);break;case`End`:e.preventDefault(),he(i);break;case`Enter`:case`Space`:e.preventDefault(),m(me??o,e);break;case`Backspace`:case`Delete`:be(me,e);break}},Ce={};k?Ce.marginInlineStart=f:Ce.marginTop=f;let we=b.map((e,t)=>{let{key:n}=e;return S.createElement(WR,{id:i,prefixCls:y,key:n,tab:e,className:_?.item,style:t===0?v?.item:{...Ce,...v?.item},closable:e.closable,editable:l,active:n===o,focus:n===me,renderWrapper:p,removeAriaLabel:u?.removeAriaLabel,tabCount:ve.length,currentPosition:t+1,onClick:e=>{m(n,e)},onKeyDown:Se,onFocus:()=>{ge||he(n),pe(n),le(),T.current&&(s||(T.current.scrollLeft=0),T.current.scrollTop=0)},onBlur:()=>{he(void 0)},onMouseDown:e=>xe(n,e),onMouseUp:()=>{_e(!1)}})}),Te=()=>U(()=>{let e=new Map,t=E.current?.getBoundingClientRect();return b.forEach(({key:n})=>{let r=E.current?.querySelector(`[data-node-key="${LR(n)}"]`);if(r){let[i,a,o,s]=KR(r,t);e.set(n,{width:i,height:a,left:o,top:s})}}),e});(0,S.useEffect)(()=>{Te()},[b.map(e=>e.key).join(`_`)]);let Ee=jR(()=>{let e=qR(x),t=qR(C),n=qR(w);F([e[0]-t[0]-n[0],e[1]-t[1]-n[1]]);let r=qR(O);z(r),V(qR(D));let i=qR(E);L([i[0]-r[0],i[1]-r[1]]),Te()}),De=b.slice(0,de),Oe=b.slice(fe+1),ke=[...De,...Oe],Ae=ee.get(o),{style:je}=SR({activeTabOffset:Ae,horizontal:k,indicator:g,rtl:s});(0,S.useEffect)(()=>{pe()},[o,ie,J,FR(Ae),FR(ee),k]),(0,S.useEffect)(()=>{Ee()},[s]);let Me=!!ke.length,Ne=`${y}-nav-wrap`,Pe,Fe,Ie,Le;return k?s?(Fe=A>0,Pe=A!==J):(Pe=A<0,Fe=A!==ie):(Ie=M<0,Le=M!==ie),S.createElement(ia,{onResize:Ee},S.createElement(`div`,{ref:cr(t,x),role:`tablist`,"aria-orientation":k?`horizontal`:`vertical`,className:Y(`${y}-nav`,n,_?.header),style:{...v?.header,...r},onKeyDown:()=>{le()}},S.createElement(BR,{ref:C,position:`left`,extra:c,prefixCls:y}),S.createElement(ia,{onResize:Ee},S.createElement(`div`,{className:Y(Ne,{[`${Ne}-ping-left`]:Pe,[`${Ne}-ping-right`]:Fe,[`${Ne}-ping-top`]:Ie,[`${Ne}-ping-bottom`]:Le}),ref:T},S.createElement(ia,{onResize:Ee},S.createElement(`div`,{ref:E,className:`${y}-nav-list`,style:{transform:`translate(${A}px, ${M}px)`,transition:se?`none`:void 0}},we,S.createElement(zR,{ref:O,prefixCls:y,locale:u,editable:l,style:{...we.length===0?void 0:Ce,visibility:Me?`hidden`:null}}),S.createElement(`div`,{className:Y(`${y}-ink-bar`,_?.indicator,{[`${y}-ink-bar-animated`]:a.inkBar}),style:{...je,...v?.indicator}}))))),S.createElement(UR,GR({},e,{removeAriaLabel:u?.removeAriaLabel,ref:D,prefixCls:y,tabs:ke,className:!Me&&q,popupStyle:v?.popup,tabMoving:!!se})),S.createElement(BR,{ref:w,position:`right`,extra:c,prefixCls:y})))}),XR=({renderTabBar:e,...t})=>e?e(t,YR):S.createElement(YR,t),ZR=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,id:a,active:o,tabKey:s,children:c}=e,l=S.Children.count(c)>0;return S.createElement(`div`,{id:a&&`${a}-panel-${s}`,role:`tabpanel`,tabIndex:o&&l?0:-1,"aria-labelledby":a&&`${a}-tab-${s}`,"aria-hidden":!o,style:i,className:Y(n,o&&`${n}-active`,r),ref:t},c)});function QR(){return QR=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:t,activeKey:n,animated:r,tabPosition:i,destroyOnHidden:a,contentStyle:o,contentClassName:s}=e,{prefixCls:c,tabs:l}=S.useContext(xR),u=r.tabPane,d=`${c}-tabpane`;return S.createElement(`div`,{className:Y(`${c}-content-holder`)},S.createElement(`div`,{className:Y(`${c}-content`,`${c}-content-${i}`,{[`${c}-content-animated`]:u})},l.map(e=>{let{key:i,forceRender:c,style:l,className:f,destroyOnHidden:p,...m}=e,h=i===n;return S.createElement(Ed,QR({key:i,visible:h,forceRender:c,removeOnLeave:!!(a??p),leavedClassName:`${d}-hidden`},r.tabPaneMotion),({style:e,className:n},r)=>S.createElement(ZR,QR({},m,{prefixCls:d,id:t,tabKey:i,animated:u,active:h,style:{...o,...l,...e},className:Y(s,f,n),ref:r})))})))};function ez(e={inkBar:!0,tabPane:!1}){let t;return t=e===!1?{inkBar:!1,tabPane:!1}:e===!0?{inkBar:!0,tabPane:!1}:{inkBar:!0,...typeof e==`object`?e:{}},t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}function tz(){return tz=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,prefixCls:r=`rc-tabs`,className:i,items:a,direction:o,activeKey:s,defaultActiveKey:c,editable:l,animated:u,tabPosition:d=`top`,tabBarGutter:f,tabBarStyle:p,tabBarExtraContent:m,locale:h,more:g,destroyOnHidden:_,renderTabBar:v,onChange:y,onTabClick:b,onTabScroll:x,getPopupContainer:C,popupClassName:w,indicator:T,classNames:E,styles:D,...O}=e,k=S.useMemo(()=>(a||[]).filter(e=>e&&typeof e==`object`&&`key`in e),[a]),A=o===`rtl`,j=ez(u),[M,N]=(0,S.useState)(!1);(0,S.useEffect)(()=>{N(mi())},[]);let[P,F]=Wn(c??k[0]?.key,s),[I,L]=(0,S.useState)(()=>k.findIndex(e=>e.key===P));(0,S.useEffect)(()=>{let e=k.findIndex(e=>e.key===P);e===-1&&(e=Math.max(0,Math.min(I,k.length-1)),F(k[e]?.key)),L(e)},[k.map(e=>e.key).join(`_`),P,I]);let[R,z]=Wn(null,n);(0,S.useEffect)(()=>{n||(z(`rc-tabs-${nz}`),nz+=1)},[]);function B(e,t){b?.(e,t);let n=e!==P;F(e),n&&y?.(e)}let V={id:R,activeKey:P,animated:j,tabPosition:d,rtl:A,mobile:M},H={...V,editable:l,locale:h,more:g,tabBarGutter:f,onTabClick:B,onTabScroll:x,extra:m,style:p,getPopupContainer:C,popupClassName:Y(w,E?.popup),indicator:T,styles:D,classNames:E},U=S.useMemo(()=>({tabs:k,prefixCls:r}),[k,r]);return S.createElement(xR.Provider,{value:U},S.createElement(`div`,tz({ref:t,id:n,className:Y(r,`${r}-${d}`,{[`${r}-mobile`]:M,[`${r}-editable`]:l,[`${r}-rtl`]:A},i)},O),S.createElement(XR,tz({},H,{renderTabBar:v})),S.createElement($R,tz({destroyOnHidden:_},V,{contentStyle:D?.content,contentClassName:E?.content,animated:j}))))}),iz={motionAppear:!1,motionEnter:!0,motionLeave:!0};function az(e,t={inkBar:!0,tabPane:!1}){let n;return n=t===!1?{inkBar:!1,tabPane:!1}:t===!0?{inkBar:!0,tabPane:!0}:{inkBar:!0,...ef(t)?t:{}},n.tabPane&&(n.tabPaneMotion={...iz,motionName:vh(e,`switch`)}),n}function oz(e){return e.filter(e=>e)}function sz(e,t){return e?e.map(e=>({...e,destroyOnHidden:e.destroyOnHidden??e.destroyInactiveTabPane})):oz(Di(t).map(e=>{if(S.isValidElement(e)){let{key:t,props:n}=e,{tab:r,...i}=n||{};return{key:String(t),...i,label:r}}return null}))}var cz=e=>{let{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:`none`,"&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:`absolute`,transition:`none`,inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[_g(e,`slide-up`),_g(e,`slide-down`)]]},lz=e=>{let{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:a,itemSelectedColor:o}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${X(e.lineWidth)} ${e.lineType} ${a}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:o,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:Wl(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:`none`},[`${t}-ink-bar`]:{visibility:`hidden`}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:X(i)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:X(i)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${X(e.borderRadiusLG)} 0 0 ${X(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},uz=e=>{let{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{[`${t}-dropdown`]:{...Vl(e),position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:`block`,"&-hidden":{display:`none`},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${X(r)} 0`,overflowX:`hidden`,overflowY:`auto`,textAlign:{_skip_check_:!0,value:`left`},listStyleType:`none`,backgroundColor:e.colorBgContainer,backgroundClip:`padding-box`,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,"&-item":{...Bl,display:`flex`,alignItems:`center`,minWidth:e.tabsDropdownWidth,margin:0,padding:`${X(e.paddingXXS)} ${X(e.paddingSM)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:`nowrap`},"&-remove":{flex:`none`,marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:`transparent`,border:0,cursor:`pointer`,"&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:`transparent`,cursor:`not-allowed`}}}}}}},dz=e=>{let{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:a,verticalItemMargin:o,motionDurationSlow:s,calc:c}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:`column`,[`> ${t}-nav, > div > ${t}-nav`]:{margin:i,"&::before":{position:`absolute`,right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${X(e.lineWidth)} ${e.lineType} ${r}`,content:`''`},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:[`width`,`left`,`right`].map(e=>`${e} ${s}`).join(`, `)}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav, - > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:`column`,minWidth:c(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:a,textAlign:`center`},[`${t}-tab + ${t}-tab`]:{margin:o},[`${t}-nav-wrap`]:{flexDirection:`column`,"&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:[`height`,`top`].map(e=>`${e} ${s}`).join(`, `)}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:`1 0 auto`,flexDirection:`column`}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:X(c(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:c(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},fz=e=>{let{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:a,horizontalItemPaddingSM:o,horizontalItemPaddingLG:s}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:o,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:i,minHeight:i}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${X(e.borderRadius)} ${X(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${X(e.borderRadius)} ${X(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${X(e.borderRadius)} ${X(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${X(e.borderRadius)} 0 0 ${X(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:a,minHeight:a}}}}}},pz=e=>{let{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:a,horizontalItemPadding:o,itemSelectedColor:s,itemColor:c}=e,l=`${t}-tab`;return{[l]:{position:`relative`,WebkitTouchCallout:`none`,WebkitTapHighlightColor:`transparent`,display:`inline-flex`,alignItems:`center`,padding:o,fontSize:e.titleFontSize,background:`transparent`,border:0,outline:`none`,cursor:`pointer`,color:c,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:`none`,transition:`all ${e.motionDurationSlow}`,[`${l}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":{flex:`none`,lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:`transparent`,border:`none`,outline:`none`,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading},...Gl(e)},"&:hover":{color:r},[`&${l}-active ${l}-btn`]:{color:s},[`&${l}-focus ${l}-btn:focus-visible`]:Wl(e),[`&${l}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`},[`&${l}-disabled ${l}-btn, &${l}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${l}-remove ${i}`]:{margin:0,verticalAlign:`middle`},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${l} + ${l}`]:{margin:{_skip_check_:!0,value:a}}}},mz=e=>{let{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:a}=e;return{[`${t}-rtl`]:{direction:`rtl`,[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:e.marginSM}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:e.marginXS},marginLeft:{_skip_check_:!0,value:a(e.marginXXS).mul(-1).equal()},[r]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:i},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:`rtl`},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:`right`}}}}},hz=e=>{let{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:a,itemActiveColor:o,colorBorderSecondary:s}=e;return{[t]:{...Vl(e),display:`flex`,[`> ${t}-nav, > div > ${t}-nav`]:{position:`relative`,display:`flex`,flex:`none`,alignItems:`center`,[`${t}-nav-wrap`]:{position:`relative`,display:`flex`,flex:`auto`,alignSelf:`stretch`,overflow:`hidden`,whiteSpace:`nowrap`,transform:`translate(0)`,"&::before, &::after":{position:`absolute`,zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:`''`,pointerEvents:`none`}},[`${t}-nav-list`]:{position:`relative`,display:`flex`,transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:`flex`,alignSelf:`stretch`},[`${t}-nav-operations-hidden`]:{position:`absolute`,visibility:`hidden`,pointerEvents:`none`},[`${t}-nav-more`]:{position:`relative`,padding:n,background:`transparent`,border:0,color:e.colorText,"&::after":{position:`absolute`,right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:`translateY(100%)`,content:`''`}},[`${t}-nav-add`]:{minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:i},background:`transparent`,border:`${X(e.lineWidth)} ${e.lineType} ${s}`,borderRadius:`${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)} 0 0`,outline:`none`,cursor:`pointer`,color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:a},"&:active, &:focus:not(:focus-visible)":{color:o},...Gl(e,-3)}},[`${t}-extra-content`]:{flex:`none`},[`${t}-ink-bar`]:{position:`absolute`,background:e.inkBarColor,pointerEvents:`none`},...pz(e),[`${t}-content`]:{position:`relative`,width:`100%`},[`${t}-content-holder`]:{flex:`auto`,minWidth:0,minHeight:0},[`${t}-tabpane`]:{...Gl(e),"&-hidden":{display:`none`}}},[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:`auto`}}}}}},gz=Xl(`Tabs`,e=>{let t=lc(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${X(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${X(e.horizontalItemGutter)}`});return[fz(t),mz(t),dz(t),uz(t),lz(t),hz(t),cz(t)]},e=>{let{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:a}=e,o=t||a,s=n||i,c=r||a+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:o,cardHeightSM:s,cardHeightLG:c,cardPadding:`${(o-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(s-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(c-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:``,horizontalItemMarginRTL:``,horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}}),_z=()=>null,vz=S.forwardRef((e,t)=>{let{type:n,className:r,rootClassName:i,size:a,onEdit:o,hideAdd:s,centered:c,addIcon:l,removeIcon:u,moreIcon:d,more:f,popupClassName:p,children:m,items:h,animated:g,style:_,indicatorSize:v,indicator:y,classNames:b,styles:x,destroyInactiveTabPane:C,destroyOnHidden:w,tabPlacement:T,tabPosition:E,...D}=e,{prefixCls:O}=D,{getPrefixCls:k,direction:A,getPopupContainer:j,className:M,style:N,classNames:P,styles:F}=_a(`tabs`),{tabs:I}=S.useContext(ma),L=k(`tabs`,O),R=ap(L),[z,B]=gz(L,R),V=S.useRef(null);S.useImperativeHandle(t,()=>({nativeElement:V.current}));let H;n===`editable-card`&&(H={onEdit:(e,{key:t,event:n})=>{o?.(e===`add`?n:t,e)},removeIcon:u??I?.removeIcon??S.createElement(ku,null),addIcon:(l??I?.addIcon)||S.createElement(bR,null),showAdd:s!==!0});let U=k(),ee=Oh(a),te=sz(h,m),ne=az(L,g),W={align:y?.align??I?.indicator?.align,size:y?.size??v??I?.indicator?.size??I?.indicatorSize},re=S.useMemo(()=>{let e=T??E??void 0,t=A===`rtl`;switch(e){case`start`:return t?`right`:`left`;case`end`:return t?`left`:`right`;default:return e}},[T,E,A]),G={...e,size:ee,tabPlacement:re,items:te},[K,q]=xf([P,b],[F,x],{props:G},{popup:{_default:`root`}});return S.createElement(rz,{ref:V,direction:A,getPopupContainer:j,...D,items:te,className:Y({[`${L}-large`]:ee===`large`,[`${L}-small`]:ee===`small`,[`${L}-card`]:[`card`,`editable-card`].includes(n),[`${L}-editable-card`]:n===`editable-card`,[`${L}-centered`]:c},M,r,i,K.root,z,B,R),classNames:{...K,popup:Y(p,z,B,R,K.popup?.root)},styles:q,style:{...q.root,...N,..._},editable:H,more:{icon:I?.more?.icon??I?.moreIcon??d??S.createElement(qE,null),transitionName:`${U}-slide-up`,...f},prefixCls:L,animated:ne,indicator:W,destroyOnHidden:w??C,tabPosition:re})});vz.TabPane=_z;var yz=({prefixCls:e,className:t,hoverable:n=!0,...r})=>{let{getPrefixCls:i}=S.useContext(ma),a=i(`card`,e),o=Y(`${a}-grid`,t,{[`${a}-grid-hoverable`]:n});return S.createElement(`div`,{...r,className:o})},bz=e=>{let{antCls:t,componentCls:n,headerHeight:r,headerPadding:i,tabsMarginBottom:a}=e;return{display:`flex`,justifyContent:`center`,flexDirection:`column`,minHeight:r,marginBottom:-1,padding:`0 ${X(i)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)} 0 0`,...Ul(),"&-wrapper":{width:`100%`,display:`flex`,alignItems:`center`},"&-title":{display:`inline-block`,flex:1,...Bl,[` + &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomRight`]:{animationName:lg},[`${t}-panel > ${t}-time-panel`]:{paddingTop:T},[`${t}-range-wrapper`]:{display:`flex`,position:`relative`},[`${t}-range-arrow`]:{position:`absolute`,zIndex:1,display:`none`,paddingInline:e.calc(r).mul(1.5).equal(),boxSizing:`content-box`,transition:`all ${C} ease-out`,...Mw(e,D,F),"&:before":{insetInlineStart:e.calc(r).mul(1.5).equal()}},[`${t}-panel-container`]:{overflow:`hidden`,verticalAlign:`top`,background:D,borderRadius:O,boxShadow:k,transition:`margin ${C}`,display:`inline-block`,pointerEvents:`auto`,[`${t}-panel-layout`]:{display:`flex`,flexWrap:`nowrap`,alignItems:`stretch`},[`${t}-presets`]:{display:`flex`,flexDirection:`column`,minWidth:N,maxWidth:P,ul:{height:0,flex:`auto`,listStyle:`none`,overflow:`auto`,margin:0,padding:v,borderInlineEnd:`${X(i)} ${a} ${j}`,li:{...Bl,borderRadius:A,paddingInline:v,paddingBlock:e.calc(g).sub(I).div(2).equal(),cursor:`pointer`,transition:`all ${C}`,"+ li":{marginTop:y},"&:hover":{background:M}}}},[`${t}-panels`]:{display:`inline-flex`,flexWrap:`nowrap`,"&:last-child":{[`${t}-panel`]:{borderWidth:0}}},[`${t}-panel`]:{verticalAlign:`top`,background:`transparent`,borderRadius:0,borderWidth:0,[`${t}-content, table`]:{textAlign:`center`},"&-focused":{borderColor:o}}}},"&-dropdown-range":{padding:`${X(e.calc(E).mul(2).div(3).equal())} 0`,"&-hidden":{display:`none`}},"&-rtl":{direction:`rtl`,[`${t}-separator`]:{transform:`scale(-1, 1)`},[`${t}-footer`]:{"&-extra":{direction:`rtl`}}}}},_g(e,`slide-up`),_g(e,`slide-down`),sg(e,`move-up`),sg(e,`move-down`)]},pR=Xl(`DatePicker`,e=>{let t=lc(RL(e),oR(e),{inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[rte(t),fR(t),lR(t),dR(t),ete(t),v_(e,{focusElCls:`${e.componentCls}-focused`})]},cR),mR=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z`}},{tag:`path`,attrs:{d:`M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z`}}]},name:`plus`,theme:`outlined`}}))());function hR(){return hR=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,hR({},e,{ref:t,icon:mR.default}))),_R=(0,S.createContext)(null),vR=e=>{let{activeTabOffset:t,horizontal:n,rtl:r,indicator:i={}}=e,{size:a,align:o=`center`}=i,[s,c]=(0,S.useState)(),l=(0,S.useRef)(),u=S.useCallback(e=>typeof a==`function`?a(e):typeof a==`number`?a:e,[a]);function d(){Ei.cancel(l.current)}return(0,S.useEffect)(()=>{let e={};if(t)if(n){e.width=u(t.width);let n=r?`right`:`left`;o===`start`&&(e[n]=t[n]),o===`center`&&(e[n]=t[n]+t.width/2,e.transform=r?`translateX(50%)`:`translateX(-50%)`),o===`end`&&(e[n]=t[n]+t.width,e.transform=`translateX(-100%)`)}else e.height=u(t.height),o===`start`&&(e.top=t.top),o===`center`&&(e.top=t.top+t.height/2,e.transform=`translateY(-50%)`),o===`end`&&(e.top=t.top+t.height,e.transform=`translateY(-100%)`);return d(),l.current=Ei(()=>{s&&e&&Object.keys(e).every(t=>{let n=e[t],r=s[t];return typeof n==`number`&&typeof r==`number`?Math.round(n)===Math.round(r):n===r})||c(e)}),d},[JSON.stringify(t),n,r,o,u]),{style:s}},yR={width:0,height:0,left:0,top:0};function bR(e,t,n){return(0,S.useMemo)(()=>{let n=new Map,r=t.get(e[0]?.key)||yR,i=r.left+r.width;for(let r=0;re.key).join(`_`),t,n])}function xR(e,t){let n=S.useRef(e),[,r]=S.useState({});function i(e){let i=typeof e==`function`?e(n.current):e;i!==n.current&&t(i,n.current),n.current=i,r({})}return[n.current,i]}var SR=.1,CR=.01,wR=20,TR=.995**wR;function ER(e,t){let[n,r]=(0,S.useState)(),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(),u=(0,S.useRef)();function d(e){let{screenX:t,screenY:n}=e.touches[0];r({x:t,y:n}),window.clearInterval(u.current)}function f(e){if(!n)return;let{screenX:o,screenY:c}=e.touches[0];r({x:o,y:c});let u=o-n.x,d=c-n.y;t(u,d);let f=Date.now();a(f),s(f-i),l({x:u,y:d})}function p(){if(n&&(r(null),l(null),c)){let e=c.x/o,n=c.y/o;if(Math.max(Math.abs(e),Math.abs(n)){if(Math.abs(r)o?(i=n,m.current=`x`):(i=r,m.current=`y`),t(-i,-i)&&e.preventDefault()}let g=(0,S.useRef)(null);g.current={onTouchStart:d,onTouchMove:f,onTouchEnd:p,onWheel:h},S.useEffect(()=>{function t(e){g.current.onTouchStart(e)}function n(e){g.current.onTouchMove(e)}function r(e){g.current.onTouchEnd(e)}function i(e){g.current.onWheel(e)}return document.addEventListener(`touchmove`,n,{passive:!1}),document.addEventListener(`touchend`,r,{passive:!0}),e.current.addEventListener(`touchstart`,t,{passive:!0}),e.current.addEventListener(`wheel`,i,{passive:!1}),()=>{document.removeEventListener(`touchmove`,n),document.removeEventListener(`touchend`,r)}},[])}function DR(e){let[t,n]=(0,S.useState)(0),r=(0,S.useRef)(0),i=(0,S.useRef)();return i.current=e,Hn(()=>{i.current?.()},[t]),()=>{r.current===t&&(r.current+=1,n(r.current))}}function OR(e){let t=(0,S.useRef)([]),[,n]=(0,S.useState)({}),r=(0,S.useRef)(typeof e==`function`?e():e),i=DR(()=>{let e=r.current;t.current.forEach(t=>{e=t(e)}),t.current=[],r.current=e,n({})});function a(e){t.current.push(e),i()}return[r.current,a]}var kR={width:0,height:0,left:0,top:0,right:0};function AR(e,t,n,r,i,a,{tabs:o,tabPosition:s,rtl:c}){let l,u,d;return[`top`,`bottom`].includes(s)?(l=`width`,u=c?`right`:`left`,d=Math.abs(n)):(l=`height`,u=`top`,d=-n),(0,S.useMemo)(()=>{if(!o.length)return[0,0];let n=o.length,r=n;for(let i=0;iMath.floor(d+t)){r=i-1;break}}let i=0;for(let t=n-1;t>=0;--t)if((e.get(o[t].key)||kR)[u]r?[0,-1]:[i,r]},[e,t,r,i,a,d,s,o.map(e=>e.key).join(`_`),c])}function jR(e){let t;return e instanceof Map?(t={},e.forEach((e,n)=>{t[n]=e})):t=e,JSON.stringify(t)}var MR=`TABS_DQ`;function NR(e){return String(e).replace(/"/g,MR)}function PR(e,t,n,r){return!(!n||r||e===!1||e===void 0&&(t===!1||t===null))}var FR=S.forwardRef((e,t)=>{let{prefixCls:n,editable:r,locale:i,style:a}=e;return!r||r.showAdd===!1?null:S.createElement(`button`,{ref:t,type:`button`,className:`${n}-nav-add`,style:a,"aria-label":i?.addAriaLabel||`Add tab`,onClick:e=>{r.onEdit(`add`,{event:e})}},r.addIcon||`+`)}),IR=S.forwardRef((e,t)=>{let{position:n,prefixCls:r,extra:i}=e;if(!i)return null;let a,o={};return typeof i==`object`&&!S.isValidElement(i)?o=i:o.right=i,n===`right`&&(a=o.right),n===`left`&&(a=o.left),a?S.createElement(`div`,{className:`${r}-extra-content`,ref:t},a):null});function LR(){return LR=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,id:r,tabs:i,locale:a,mobile:o,more:s={},style:c,className:l,editable:u,tabBarGutter:d,rtl:f,removeAriaLabel:p,onTabClick:m,getPopupContainer:h,popupClassName:g,popupStyle:_}=e,[v,y]=(0,S.useState)(!1),[b,x]=(0,S.useState)(null),{icon:C=`More`}=s,w=`${r}-more-popup`,T=`${n}-dropdown`,E=b===null?null:`${w}-${b}`,D=a?.dropdownAriaLabel;function O(e,t){e.preventDefault(),e.stopPropagation(),u.onEdit(`remove`,{key:t,event:e})}let k=S.createElement(OE,{onClick:({key:e,domEvent:t})=>{m(e,t),y(!1)},prefixCls:`${T}-menu`,id:w,tabIndex:-1,role:`listbox`,"aria-activedescendant":E,selectedKeys:[b],"aria-label":D===void 0?`expanded dropdown`:D},i.map(e=>{let{closable:t,disabled:n,closeIcon:i,key:a,label:o}=e,s=PR(t,i,u,n);return S.createElement(iE,{key:a,id:`${w}-${a}`,role:`option`,"aria-controls":r&&`${r}-panel-${a}`,disabled:n},S.createElement(`span`,null,o),s&&S.createElement(`button`,{type:`button`,"aria-label":p||`remove`,tabIndex:0,className:`${T}-menu-item-remove`,onClick:e=>{e.stopPropagation(),O(e,a)}},i||u.removeIcon||`×`))}));function A(e){let t=i.filter(e=>!e.disabled),n=t.findIndex(e=>e.key===b)||0,r=t.length;for(let i=0;i{let e=document.getElementById(E);e?.scrollIntoView&&e.scrollIntoView(!1)},[E,b]),(0,S.useEffect)(()=>{v||x(null)},[v]);let M={marginInlineStart:d};i.length||(M.visibility=`hidden`,M.order=1);let N=Y(g,{[`${T}-rtl`]:f}),P=o?null:S.createElement(vT,LR({prefixCls:T,overlay:k,visible:i.length?v:!1,onVisibleChange:y,overlayClassName:N,overlayStyle:_,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:h},s),S.createElement(`button`,{type:`button`,className:`${n}-nav-more`,style:M,"aria-haspopup":`listbox`,"aria-controls":w,id:`${r}-more`,"aria-expanded":v,onKeyDown:j},C));return S.createElement(`div`,{className:Y(`${n}-nav-operations`,l),style:c,ref:t},P,S.createElement(FR,{prefixCls:n,locale:a,editable:u}))}),zR=S.memo(RR,(e,t)=>t.tabMoving),BR=e=>{let{prefixCls:t,id:n,active:r,focus:i,tab:{key:a,label:o,disabled:s,closeIcon:c,icon:l},closable:u,renderWrapper:d,removeAriaLabel:f,editable:p,onClick:m,onFocus:h,onBlur:g,onKeyDown:_,onMouseDown:v,onMouseUp:y,style:b,className:x,tabCount:C,currentPosition:w}=e,T=`${t}-tab`,E=PR(u,c,p,s);function D(e){s||m(e)}function O(e){e.preventDefault(),e.stopPropagation(),p.onEdit(`remove`,{key:a,event:e})}let k=S.useMemo(()=>l&&typeof o==`string`?S.createElement(`span`,null,o):o,[o,l]),A=S.useRef(null);S.useEffect(()=>{i&&A.current&&A.current.focus()},[i]);let j=S.createElement(`div`,{key:a,"data-node-key":NR(a),className:Y(T,x,{[`${T}-with-remove`]:E,[`${T}-active`]:r,[`${T}-disabled`]:s,[`${T}-focus`]:i}),style:b,onClick:D},S.createElement(`div`,{ref:A,role:`tab`,"aria-selected":r,id:n&&`${n}-tab-${a}`,className:`${T}-btn`,"aria-controls":n&&`${n}-panel-${a}`,"aria-disabled":s,tabIndex:s?null:r?0:-1,onClick:e=>{e.stopPropagation(),D(e)},onKeyDown:_,onMouseDown:v,onMouseUp:y,onFocus:h,onBlur:g},i&&S.createElement(`div`,{"aria-live":`polite`,style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},`Tab ${w} of ${C}`),l&&S.createElement(`span`,{className:`${T}-icon`},l),o&&k),E&&S.createElement(`button`,{type:`button`,"aria-label":f||`remove`,tabIndex:r?0:-1,className:`${T}-remove`,onClick:e=>{e.stopPropagation(),O(e)}},c||p.removeIcon||`×`));return d?d(j):j};function VR(){return VR=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{offsetWidth:n,offsetHeight:r,offsetTop:i,offsetLeft:a}=e,{width:o,height:s,left:c,top:l}=e.getBoundingClientRect();return Math.abs(o-n)<1?[o,s,c-t.left,l-t.top]:[n,r,a,i]},UR=e=>{let{offsetWidth:t=0,offsetHeight:n=0}=e.current||{};if(e.current){let{width:n,height:r}=e.current.getBoundingClientRect();if(Math.abs(n-t)<1)return[n,r]}return[t,n]},WR=(e,t)=>e[+!t],GR=S.forwardRef((e,t)=>{let{className:n,style:r,id:i,animated:a,activeKey:o,rtl:s,extra:c,editable:l,locale:u,tabPosition:d,tabBarGutter:f,children:p,onTabClick:m,onTabScroll:h,indicator:g,classNames:_,styles:v}=e,{prefixCls:y,tabs:b}=S.useContext(_R),x=(0,S.useRef)(null),C=(0,S.useRef)(null),w=(0,S.useRef)(null),T=(0,S.useRef)(null),E=(0,S.useRef)(null),D=(0,S.useRef)(null),O=(0,S.useRef)(null),k=d===`top`||d===`bottom`,[A,j]=xR(0,(e,t)=>{k&&h&&h({direction:e>t?`left`:`right`})}),[M,N]=xR(0,(e,t)=>{!k&&h&&h({direction:e>t?`top`:`bottom`})}),[P,F]=(0,S.useState)([0,0]),[I,L]=(0,S.useState)([0,0]),[R,z]=(0,S.useState)([0,0]),[B,V]=(0,S.useState)([0,0]),[H,U]=OR(new Map),ee=bR(b,H,I[0]),te=WR(P,k),ne=WR(I,k),W=WR(R,k),re=WR(B,k),G=Math.floor(te)J?J:e}let oe=(0,S.useRef)(null),[se,ce]=(0,S.useState)();function le(){ce(Date.now())}function ue(){oe.current&&clearTimeout(oe.current)}ER(T,(e,t)=>{function n(e,t){e(e=>ae(e+t))}return G?(k?n(j,e):n(N,t),ue(),le(),!0):!1}),(0,S.useEffect)(()=>(ue(),se&&(oe.current=setTimeout(()=>{ce(0)},100)),ue),[se]);let[de,fe]=AR(ee,K,k?A:M,ne,W,re,{...e,tabs:b}),pe=Rn((e=o)=>{let t=ee.get(e)||{width:0,height:0,left:0,right:0,top:0};if(k){let e=A;s?t.rightA+K&&(e=t.right+t.width-K):t.left<-A?e=-t.left:t.left+t.width>-A+K&&(e=-(t.left+t.width-K)),N(0),j(ae(e))}else{let e=M;t.top<-M?e=-t.top:t.top+t.height>-M+K&&(e=-(t.top+t.height-K)),j(0),N(ae(e))}}),[me,he]=(0,S.useState)(),[ge,_e]=(0,S.useState)(!1),ve=b.filter(e=>!e.disabled).map(e=>e.key),ye=e=>{let t=ve.indexOf(me||o),n=ve.length,r=ve[(t+e+n)%n];he(r)},be=(e,t)=>{let n=ve.indexOf(e),r=b.find(t=>t.key===e);PR(r?.closable,r?.closeIcon,l,r?.disabled)&&(t.preventDefault(),t.stopPropagation(),l.onEdit(`remove`,{key:e,event:t}),n===ve.length-1?ye(-1):ye(1))},xe=(e,t)=>{_e(!0),t.button===1&&be(e,t)},Se=e=>{let{code:t}=e,n=s&&k,r=ve[0],i=ve[ve.length-1];switch(t){case`ArrowLeft`:k&&ye(n?1:-1);break;case`ArrowRight`:k&&ye(n?-1:1);break;case`ArrowUp`:e.preventDefault(),k||ye(-1);break;case`ArrowDown`:e.preventDefault(),k||ye(1);break;case`Home`:e.preventDefault(),he(r);break;case`End`:e.preventDefault(),he(i);break;case`Enter`:case`Space`:e.preventDefault(),m(me??o,e);break;case`Backspace`:case`Delete`:be(me,e);break}},Ce={};k?Ce.marginInlineStart=f:Ce.marginTop=f;let we=b.map((e,t)=>{let{key:n}=e;return S.createElement(BR,{id:i,prefixCls:y,key:n,tab:e,className:_?.item,style:t===0?v?.item:{...Ce,...v?.item},closable:e.closable,editable:l,active:n===o,focus:n===me,renderWrapper:p,removeAriaLabel:u?.removeAriaLabel,tabCount:ve.length,currentPosition:t+1,onClick:e=>{m(n,e)},onKeyDown:Se,onFocus:()=>{ge||he(n),pe(n),le(),T.current&&(s||(T.current.scrollLeft=0),T.current.scrollTop=0)},onBlur:()=>{he(void 0)},onMouseDown:e=>xe(n,e),onMouseUp:()=>{_e(!1)}})}),Te=()=>U(()=>{let e=new Map,t=E.current?.getBoundingClientRect();return b.forEach(({key:n})=>{let r=E.current?.querySelector(`[data-node-key="${NR(n)}"]`);if(r){let[i,a,o,s]=HR(r,t);e.set(n,{width:i,height:a,left:o,top:s})}}),e});(0,S.useEffect)(()=>{Te()},[b.map(e=>e.key).join(`_`)]);let Ee=DR(()=>{let e=UR(x),t=UR(C),n=UR(w);F([e[0]-t[0]-n[0],e[1]-t[1]-n[1]]);let r=UR(O);z(r),V(UR(D));let i=UR(E);L([i[0]-r[0],i[1]-r[1]]),Te()}),De=b.slice(0,de),Oe=b.slice(fe+1),ke=[...De,...Oe],Ae=ee.get(o),{style:je}=vR({activeTabOffset:Ae,horizontal:k,indicator:g,rtl:s});(0,S.useEffect)(()=>{pe()},[o,ie,J,jR(Ae),jR(ee),k]),(0,S.useEffect)(()=>{Ee()},[s]);let Me=!!ke.length,Ne=`${y}-nav-wrap`,Pe,Fe,Ie,Le;return k?s?(Fe=A>0,Pe=A!==J):(Pe=A<0,Fe=A!==ie):(Ie=M<0,Le=M!==ie),S.createElement(ia,{onResize:Ee},S.createElement(`div`,{ref:cr(t,x),role:`tablist`,"aria-orientation":k?`horizontal`:`vertical`,className:Y(`${y}-nav`,n,_?.header),style:{...v?.header,...r},onKeyDown:()=>{le()}},S.createElement(IR,{ref:C,position:`left`,extra:c,prefixCls:y}),S.createElement(ia,{onResize:Ee},S.createElement(`div`,{className:Y(Ne,{[`${Ne}-ping-left`]:Pe,[`${Ne}-ping-right`]:Fe,[`${Ne}-ping-top`]:Ie,[`${Ne}-ping-bottom`]:Le}),ref:T},S.createElement(ia,{onResize:Ee},S.createElement(`div`,{ref:E,className:`${y}-nav-list`,style:{transform:`translate(${A}px, ${M}px)`,transition:se?`none`:void 0}},we,S.createElement(FR,{ref:O,prefixCls:y,locale:u,editable:l,style:{...we.length===0?void 0:Ce,visibility:Me?`hidden`:null}}),S.createElement(`div`,{className:Y(`${y}-ink-bar`,_?.indicator,{[`${y}-ink-bar-animated`]:a.inkBar}),style:{...je,...v?.indicator}}))))),S.createElement(zR,VR({},e,{removeAriaLabel:u?.removeAriaLabel,ref:D,prefixCls:y,tabs:ke,className:!Me&&q,popupStyle:v?.popup,tabMoving:!!se})),S.createElement(IR,{ref:w,position:`right`,extra:c,prefixCls:y})))}),KR=({renderTabBar:e,...t})=>e?e(t,GR):S.createElement(GR,t),qR=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,id:a,active:o,tabKey:s,children:c}=e,l=S.Children.count(c)>0;return S.createElement(`div`,{id:a&&`${a}-panel-${s}`,role:`tabpanel`,tabIndex:o&&l?0:-1,"aria-labelledby":a&&`${a}-tab-${s}`,"aria-hidden":!o,style:i,className:Y(n,o&&`${n}-active`,r),ref:t},c)});function JR(){return JR=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:t,activeKey:n,animated:r,tabPosition:i,destroyOnHidden:a,contentStyle:o,contentClassName:s}=e,{prefixCls:c,tabs:l}=S.useContext(_R),u=r.tabPane,d=`${c}-tabpane`;return S.createElement(`div`,{className:Y(`${c}-content-holder`)},S.createElement(`div`,{className:Y(`${c}-content`,`${c}-content-${i}`,{[`${c}-content-animated`]:u})},l.map(e=>{let{key:i,forceRender:c,style:l,className:f,destroyOnHidden:p,...m}=e,h=i===n;return S.createElement(Ed,JR({key:i,visible:h,forceRender:c,removeOnLeave:!!(a??p),leavedClassName:`${d}-hidden`},r.tabPaneMotion),({style:e,className:n},r)=>S.createElement(qR,JR({},m,{prefixCls:d,id:t,tabKey:i,animated:u,active:h,style:{...o,...l,...e},className:Y(s,f,n),ref:r})))})))};function XR(e={inkBar:!0,tabPane:!1}){let t;return t=e===!1?{inkBar:!1,tabPane:!1}:e===!0?{inkBar:!0,tabPane:!1}:{inkBar:!0,...typeof e==`object`?e:{}},t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}function ZR(){return ZR=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,prefixCls:r=`rc-tabs`,className:i,items:a,direction:o,activeKey:s,defaultActiveKey:c,editable:l,animated:u,tabPosition:d=`top`,tabBarGutter:f,tabBarStyle:p,tabBarExtraContent:m,locale:h,more:g,destroyOnHidden:_,renderTabBar:v,onChange:y,onTabClick:b,onTabScroll:x,getPopupContainer:C,popupClassName:w,indicator:T,classNames:E,styles:D,...O}=e,k=S.useMemo(()=>(a||[]).filter(e=>e&&typeof e==`object`&&`key`in e),[a]),A=o===`rtl`,j=XR(u),[M,N]=(0,S.useState)(!1);(0,S.useEffect)(()=>{N(mi())},[]);let[P,F]=Wn(c??k[0]?.key,s),[I,L]=(0,S.useState)(()=>k.findIndex(e=>e.key===P));(0,S.useEffect)(()=>{let e=k.findIndex(e=>e.key===P);e===-1&&(e=Math.max(0,Math.min(I,k.length-1)),F(k[e]?.key)),L(e)},[k.map(e=>e.key).join(`_`),P,I]);let[R,z]=Wn(null,n);(0,S.useEffect)(()=>{n||(z(`rc-tabs-${QR}`),QR+=1)},[]);function B(e,t){b?.(e,t);let n=e!==P;F(e),n&&y?.(e)}let V={id:R,activeKey:P,animated:j,tabPosition:d,rtl:A,mobile:M},H={...V,editable:l,locale:h,more:g,tabBarGutter:f,onTabClick:B,onTabScroll:x,extra:m,style:p,getPopupContainer:C,popupClassName:Y(w,E?.popup),indicator:T,styles:D,classNames:E},U=S.useMemo(()=>({tabs:k,prefixCls:r}),[k,r]);return S.createElement(_R.Provider,{value:U},S.createElement(`div`,ZR({ref:t,id:n,className:Y(r,`${r}-${d}`,{[`${r}-mobile`]:M,[`${r}-editable`]:l,[`${r}-rtl`]:A},i)},O),S.createElement(KR,ZR({},H,{renderTabBar:v})),S.createElement(YR,ZR({destroyOnHidden:_},V,{contentStyle:D?.content,contentClassName:E?.content,animated:j}))))}),ez={motionAppear:!1,motionEnter:!0,motionLeave:!0};function tz(e,t={inkBar:!0,tabPane:!1}){let n;return n=t===!1?{inkBar:!1,tabPane:!1}:t===!0?{inkBar:!0,tabPane:!0}:{inkBar:!0,...ef(t)?t:{}},n.tabPane&&(n.tabPaneMotion={...ez,motionName:vh(e,`switch`)}),n}function nz(e){return e.filter(e=>e)}function rz(e,t){return e?e.map(e=>({...e,destroyOnHidden:e.destroyOnHidden??e.destroyInactiveTabPane})):nz(Di(t).map(e=>{if(S.isValidElement(e)){let{key:t,props:n}=e,{tab:r,...i}=n||{};return{key:String(t),...i,label:r}}return null}))}var iz=e=>{let{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:`none`,"&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:`absolute`,transition:`none`,inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[_g(e,`slide-up`),_g(e,`slide-down`)]]},az=e=>{let{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:a,itemSelectedColor:o}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${X(e.lineWidth)} ${e.lineType} ${a}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:o,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:Wl(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:`none`},[`${t}-ink-bar`]:{visibility:`hidden`}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:X(i)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:X(i)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${X(e.borderRadiusLG)} 0 0 ${X(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},oz=e=>{let{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{[`${t}-dropdown`]:{...Vl(e),position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:`block`,"&-hidden":{display:`none`},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${X(r)} 0`,overflowX:`hidden`,overflowY:`auto`,textAlign:{_skip_check_:!0,value:`left`},listStyleType:`none`,backgroundColor:e.colorBgContainer,backgroundClip:`padding-box`,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,"&-item":{...Bl,display:`flex`,alignItems:`center`,minWidth:e.tabsDropdownWidth,margin:0,padding:`${X(e.paddingXXS)} ${X(e.paddingSM)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:`nowrap`},"&-remove":{flex:`none`,marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:`transparent`,border:0,cursor:`pointer`,"&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:`transparent`,cursor:`not-allowed`}}}}}}},sz=e=>{let{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:a,verticalItemMargin:o,motionDurationSlow:s,calc:c}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:`column`,[`> ${t}-nav, > div > ${t}-nav`]:{margin:i,"&::before":{position:`absolute`,right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${X(e.lineWidth)} ${e.lineType} ${r}`,content:`''`},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:[`width`,`left`,`right`].map(e=>`${e} ${s}`).join(`, `)}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav, + > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:`column`,minWidth:c(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:a,textAlign:`center`},[`${t}-tab + ${t}-tab`]:{margin:o},[`${t}-nav-wrap`]:{flexDirection:`column`,"&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:[`height`,`top`].map(e=>`${e} ${s}`).join(`, `)}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:`1 0 auto`,flexDirection:`column`}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:X(c(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:c(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},cz=e=>{let{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:a,horizontalItemPaddingSM:o,horizontalItemPaddingLG:s}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:o,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:i,minHeight:i}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${X(e.borderRadius)} ${X(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${X(e.borderRadius)} ${X(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${X(e.borderRadius)} ${X(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${X(e.borderRadius)} 0 0 ${X(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:a,minHeight:a}}}}}},lz=e=>{let{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:a,horizontalItemPadding:o,itemSelectedColor:s,itemColor:c}=e,l=`${t}-tab`;return{[l]:{position:`relative`,WebkitTouchCallout:`none`,WebkitTapHighlightColor:`transparent`,display:`inline-flex`,alignItems:`center`,padding:o,fontSize:e.titleFontSize,background:`transparent`,border:0,outline:`none`,cursor:`pointer`,color:c,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:`none`,transition:`all ${e.motionDurationSlow}`,[`${l}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":{flex:`none`,lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:`transparent`,border:`none`,outline:`none`,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading},...Gl(e)},"&:hover":{color:r},[`&${l}-active ${l}-btn`]:{color:s},[`&${l}-focus ${l}-btn:focus-visible`]:Wl(e),[`&${l}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`},[`&${l}-disabled ${l}-btn, &${l}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${l}-remove ${i}`]:{margin:0,verticalAlign:`middle`},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${l} + ${l}`]:{margin:{_skip_check_:!0,value:a}}}},uz=e=>{let{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:a}=e;return{[`${t}-rtl`]:{direction:`rtl`,[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:e.marginSM}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:e.marginXS},marginLeft:{_skip_check_:!0,value:a(e.marginXXS).mul(-1).equal()},[r]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:i},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:`rtl`},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:`right`}}}}},dz=e=>{let{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:a,itemActiveColor:o,colorBorderSecondary:s}=e;return{[t]:{...Vl(e),display:`flex`,[`> ${t}-nav, > div > ${t}-nav`]:{position:`relative`,display:`flex`,flex:`none`,alignItems:`center`,[`${t}-nav-wrap`]:{position:`relative`,display:`flex`,flex:`auto`,alignSelf:`stretch`,overflow:`hidden`,whiteSpace:`nowrap`,transform:`translate(0)`,"&::before, &::after":{position:`absolute`,zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:`''`,pointerEvents:`none`}},[`${t}-nav-list`]:{position:`relative`,display:`flex`,transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:`flex`,alignSelf:`stretch`},[`${t}-nav-operations-hidden`]:{position:`absolute`,visibility:`hidden`,pointerEvents:`none`},[`${t}-nav-more`]:{position:`relative`,padding:n,background:`transparent`,border:0,color:e.colorText,"&::after":{position:`absolute`,right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:`translateY(100%)`,content:`''`}},[`${t}-nav-add`]:{minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:i},background:`transparent`,border:`${X(e.lineWidth)} ${e.lineType} ${s}`,borderRadius:`${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)} 0 0`,outline:`none`,cursor:`pointer`,color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:a},"&:active, &:focus:not(:focus-visible)":{color:o},...Gl(e,-3)}},[`${t}-extra-content`]:{flex:`none`},[`${t}-ink-bar`]:{position:`absolute`,background:e.inkBarColor,pointerEvents:`none`},...lz(e),[`${t}-content`]:{position:`relative`,width:`100%`},[`${t}-content-holder`]:{flex:`auto`,minWidth:0,minHeight:0},[`${t}-tabpane`]:{...Gl(e),"&-hidden":{display:`none`}}},[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:`auto`}}}}}},fz=Xl(`Tabs`,e=>{let t=lc(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${X(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${X(e.horizontalItemGutter)}`});return[cz(t),uz(t),sz(t),oz(t),az(t),dz(t),iz(t)]},e=>{let{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:a}=e,o=t||a,s=n||i,c=r||a+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:o,cardHeightSM:s,cardHeightLG:c,cardPadding:`${(o-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(s-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(c-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:``,horizontalItemMarginRTL:``,horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}}),pz=()=>null,mz=S.forwardRef((e,t)=>{let{type:n,className:r,rootClassName:i,size:a,onEdit:o,hideAdd:s,centered:c,addIcon:l,removeIcon:u,moreIcon:d,more:f,popupClassName:p,children:m,items:h,animated:g,style:_,indicatorSize:v,indicator:y,classNames:b,styles:x,destroyInactiveTabPane:C,destroyOnHidden:w,tabPlacement:T,tabPosition:E,...D}=e,{prefixCls:O}=D,{getPrefixCls:k,direction:A,getPopupContainer:j,className:M,style:N,classNames:P,styles:F}=_a(`tabs`),{tabs:I}=S.useContext(ma),L=k(`tabs`,O),R=ap(L),[z,B]=fz(L,R),V=S.useRef(null);S.useImperativeHandle(t,()=>({nativeElement:V.current}));let H;n===`editable-card`&&(H={onEdit:(e,{key:t,event:n})=>{o?.(e===`add`?n:t,e)},removeIcon:u??I?.removeIcon??S.createElement(ku,null),addIcon:(l??I?.addIcon)||S.createElement(gR,null),showAdd:s!==!0});let U=k(),ee=Oh(a),te=rz(h,m),ne=tz(L,g),W={align:y?.align??I?.indicator?.align,size:y?.size??v??I?.indicator?.size??I?.indicatorSize},re=S.useMemo(()=>{let e=T??E??void 0,t=A===`rtl`;switch(e){case`start`:return t?`right`:`left`;case`end`:return t?`left`:`right`;default:return e}},[T,E,A]),G={...e,size:ee,tabPlacement:re,items:te},[K,q]=xf([P,b],[F,x],{props:G},{popup:{_default:`root`}});return S.createElement($R,{ref:V,direction:A,getPopupContainer:j,...D,items:te,className:Y({[`${L}-large`]:ee===`large`,[`${L}-small`]:ee===`small`,[`${L}-card`]:[`card`,`editable-card`].includes(n),[`${L}-editable-card`]:n===`editable-card`,[`${L}-centered`]:c},M,r,i,K.root,z,B,R),classNames:{...K,popup:Y(p,z,B,R,K.popup?.root)},styles:q,style:{...q.root,...N,..._},editable:H,more:{icon:I?.more?.icon??I?.moreIcon??d??S.createElement(GE,null),transitionName:`${U}-slide-up`,...f},prefixCls:L,animated:ne,indicator:W,destroyOnHidden:w??C,tabPosition:re})});mz.TabPane=pz;var hz=({prefixCls:e,className:t,hoverable:n=!0,...r})=>{let{getPrefixCls:i}=S.useContext(ma),a=i(`card`,e),o=Y(`${a}-grid`,t,{[`${a}-grid-hoverable`]:n});return S.createElement(`div`,{...r,className:o})},gz=e=>{let{antCls:t,componentCls:n,headerHeight:r,headerPadding:i,tabsMarginBottom:a}=e;return{display:`flex`,justifyContent:`center`,flexDirection:`column`,minHeight:r,marginBottom:-1,padding:`0 ${X(i)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)} 0 0`,...Ul(),"&-wrapper":{width:`100%`,display:`flex`,alignItems:`center`},"&-title":{display:`inline-block`,flex:1,...Bl,[` > ${n}-typography, > ${n}-typography-edit-content - `]:{insetInlineStart:0,marginTop:0,marginBottom:0}},[`${t}-tabs-top`]:{clear:`both`,marginBottom:a,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,"&-bar":{borderBottom:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}}},xz=e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:i}=e;return{width:`33.33%`,padding:t,border:0,borderRadius:0,boxShadow:` + `]:{insetInlineStart:0,marginTop:0,marginBottom:0}},[`${t}-tabs-top`]:{clear:`both`,marginBottom:a,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,"&-bar":{borderBottom:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}}},_z=e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:i}=e;return{width:`33.33%`,padding:t,border:0,borderRadius:0,boxShadow:` ${X(i)} 0 0 0 ${n}, 0 ${X(i)} 0 0 ${n}, ${X(i)} ${X(i)} 0 0 ${n}, ${X(i)} 0 0 0 ${n} inset, 0 ${X(i)} 0 0 ${n} inset; - `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:`relative`,zIndex:1,boxShadow:r}}},Sz=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:a,actionsBg:o}=e;return{margin:0,padding:0,listStyle:`none`,background:o,borderTop:`${X(e.lineWidth)} ${e.lineType} ${a}`,display:`flex`,borderRadius:`0 0 ${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)}`,...Ul(),"& > li":{margin:r,color:e.colorTextDescription,textAlign:`center`,"> span":{position:`relative`,display:`block`,minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,"&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:`inline-block`,width:`100%`,color:e.colorIcon,lineHeight:X(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:X(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${X(e.lineWidth)} ${e.lineType} ${a}`}}}},Cz=e=>({margin:`${X(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:`flex`,...Ul(),"&-avatar":{paddingInlineEnd:e.padding},"&-section":{overflow:`hidden`,flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,...Bl},"&-description":{color:e.colorTextDescription}}),wz=e=>{let{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${X(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${X(e.padding)} ${X(i)}`}}},Tz=e=>{let{componentCls:t}=e;return{overflow:`hidden`,[`${t}-body`]:{userSelect:`none`}}},Ez=e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:a,bodyPadding:o,extraColor:s,motionDurationMid:c}=e;return{[t]:{...Vl(e),position:`relative`,background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:a},[`${t}-head`]:bz(e),[`${t}-extra`]:{marginInlineStart:`auto`,color:s,fontWeight:`normal`,fontSize:e.fontSize},[`${t}-body`]:{padding:o,borderRadius:`0 0 ${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)}`,"&:first-child":{borderStartStartRadius:e.borderRadiusLG,borderStartEndRadius:e.borderRadiusLG},"&:not(:last-child)":{borderEndStartRadius:0,borderEndEndRadius:0}},[`${t}-grid`]:xz(e),[`${t}-cover`]:{"> *":{display:`block`,width:`100%`,borderRadius:`${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:Sz(e),[`${t}-meta`]:Cz(e)},[`${t}-bordered`]:{border:`${X(e.lineWidth)} ${e.lineType} ${i}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:`pointer`,transition:[`box-shadow`,`border-color`].map(e=>`${e} ${c}`).join(`, `),"&:hover":{borderColor:`transparent`,boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)} 0 0 `,[`&:not(:has(> ${t}-head))`]:{borderRadius:0},[`${t}-body`]:{display:`flex`,flexWrap:`wrap`},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:r}}},[`${t}-type-inner`]:wz(e),[`${t}-loading`]:Tz(e),[`${t}-rtl`]:{direction:`rtl`}}},Dz=e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:a}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${X(r)}`,fontSize:a,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:`flex`,alignItems:`center`}}}}},Oz=Xl(`Card`,e=>{let t=lc(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[Ez(t),Dz(t)]},e=>({headerBg:`transparent`,headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:e.bodyPadding??e.paddingLG,headerPadding:e.headerPadding??e.paddingLG})),kz=e=>{let{actionClasses:t,actions:n=[],actionStyle:r}=e;return S.createElement(`ul`,{className:t,style:r},n.map((e,t)=>{let r=`action-${t}`;return S.createElement(`li`,{style:{width:`${100/n.length}%`},key:r},S.createElement(`span`,null,e))}))},Az=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,extra:o,headStyle:s={},bodyStyle:c={},title:l,loading:u,bordered:d,variant:f,size:p,type:m,cover:h,actions:g,tabList:_,children:v,activeTabKey:y,defaultActiveTabKey:b,tabBarExtraContent:x,hoverable:C,tabProps:w={},classNames:T,styles:E,...D}=e,{getPrefixCls:O,direction:k,className:A,style:j,classNames:M,styles:N}=_a(`card`),[P]=IC(`card`,f,d),F=Oh(p),I={...e,size:F,variant:P},[L,R]=xf([M,T],[N,E],{props:I}),z=t=>{e.onTabChange?.(t)},B=S.useMemo(()=>Di(v),[v]),V=S.useMemo(()=>B.some(e=>S.isValidElement(e)&&e.type===yz),[B]),H=O(`card`,n),[U,ee]=Oz(H),te=S.createElement(eb,{loading:!0,active:!0,paragraph:{rows:4},title:!1},v),ne=y!==void 0,W={...w,[ne?`activeKey`:`defaultActiveKey`]:ne?y:b,tabBarExtraContent:x},re,G=F===`small`?F:`large`,K=_?S.createElement(vz,{size:G,...W,className:`${H}-head-tabs`,onChange:z,items:_.map(({tab:e,...t})=>({label:e,...t}))}):null;if(l||o||K){let e=Y(`${H}-head`,L.header),t=Y(`${H}-head-title`,L.title),n=Y(`${H}-extra`,L.extra),r={...s,...R.header};re=S.createElement(`div`,{className:e,style:r},S.createElement(`div`,{className:`${H}-head-wrapper`},l&&S.createElement(`div`,{className:t,style:R.title},l),o&&S.createElement(`div`,{className:n,style:R.extra},o)),K)}let q=Y(`${H}-cover`,L.cover),ie=h?S.createElement(`div`,{className:q,style:R.cover},h):null,J=Y(`${H}-body`,L.body),ae={...c,...R.body},oe=u||B.length?S.createElement(`div`,{className:J,style:ae},u?te:v):null,se=Y(`${H}-actions`,L.actions),ce=g?.length?S.createElement(kz,{actionClasses:se,actionStyle:R.actions,actions:g}):null,le=hi(D,[`onTabChange`]),ue=Y(H,A,{[`${H}-loading`]:u,[`${H}-bordered`]:P!==`borderless`,[`${H}-hoverable`]:C,[`${H}-contain-grid`]:V,[`${H}-contain-tabs`]:_?.length,[`${H}-small`]:F===`small`,[`${H}-type-${m}`]:!!m,[`${H}-rtl`]:k===`rtl`},r,i,U,ee,L.root),de={...R.root,...j,...a};return S.createElement(`div`,{ref:t,...le,className:ue,style:de},re,ie,oe,ce)}),jz=e=>{let{prefixCls:t,className:n,avatar:r,title:i,description:a,style:o,classNames:s,styles:c,...l}=e,{getPrefixCls:u,className:d,style:f,classNames:p,styles:m}=_a(`cardMeta`),h=`${u(`card`,t)}-meta`,[g,_]=xf([p,s],[m,c],{props:e}),v=Y(h,n,d,g.root),y={...f,..._.root,...o},b=Y(`${h}-avatar`,g.avatar),x=Y(`${h}-title`,g.title),C=Y(`${h}-description`,g.description),w=Y(`${h}-section`,g.section),T=r?S.createElement(`div`,{className:b,style:_.avatar},r):null,E=i?S.createElement(`div`,{className:x,style:_.title},i):null,D=a?S.createElement(`div`,{className:C,style:_.description},a):null,O=E||D?S.createElement(`div`,{className:w,style:_.section},E,D):null;return S.createElement(`div`,{...l,className:v,style:y},T,O)},Mz=Az;Mz.Grid=yz,Mz.Meta=jz;function Nz(e,t,n){var r=n||{},i=r.noTrailing,a=i===void 0?!1:i,o=r.noLeading,s=o===void 0?!1:o,c=r.debounceMode,l=c===void 0?void 0:c,u,d=!1,f=0;function p(){u&&clearTimeout(u)}function m(e){var t=(e||{}).upcomingOnly,n=t===void 0?!1:t;p(),d=!n}function h(){var n=[...arguments],r=this,i=Date.now()-f;if(d)return;function o(){f=Date.now(),t.apply(r,n)}function c(){u=void 0}!s&&l&&!u&&o(),p(),l===void 0&&i>e?s?(f=Date.now(),a||(u=setTimeout(l?c:o,e))):o():a!==!0&&(u=setTimeout(l?c:o,l===void 0?e-i:e))}return h.cancel=m,h}function Pz(e,t,n){var r=(n||{}).atBegin;return Nz(e,t,{debounceMode:(r===void 0?!1:r)!==!1})}var Fz=S.createContext({}),Iz=`__rc_cascader_search_mark__`,Lz=(e,t,{label:n=``})=>t.some(t=>String(t[n]).toLowerCase().includes(e.toLowerCase())),Rz=(e,t,n,r)=>t.map(e=>e[r.label]).join(` / `),zz=(e,t,n,r,i,a)=>{let{filter:o=Lz,render:s=Rz,limit:c=50,sort:l}=i;return S.useMemo(()=>{let i=[];if(!e)return[];function u(t,d,f=!1){t.forEach(t=>{if(!l&&c!==!1&&c>0&&i.length>=c)return;let p=[...d,t],m=t[n.children],h=f||t.disabled;(!m||m.length===0||a)&&o(e,p,{label:n.label})&&i.push({...t,disabled:h,[n.label]:s(e,p,r,n),[Iz]:p,[n.children]:void 0}),m&&u(t[n.children],p,h)})}return u(t,[]),l&&i.sort((t,r)=>l(t[Iz],r[Iz],e,n)),c!==!1&&c>0?i.slice(0,c):i},[e,t,n,r,s,a,o,l,c])},Bz=`__RC_CASCADER_SPLIT__`,Vz=`SHOW_PARENT`,Hz=`SHOW_CHILD`;function Uz(e){return e.join(Bz)}function Wz(e){return e.map(Uz)}function Gz(e){return e.split(Bz)}function Kz(e){let{label:t,value:n,children:r}=e||{},i=n||`value`;return{label:t||`label`,value:i,key:i,children:r||`children`}}function qz(e,t){return e.isLeaf??!e[t.children]?.length}function Jz(e){let t=e.parentElement;if(!t)return;let n=e.offsetTop-t.offsetTop;n-t.scrollTop<0?t.scrollTo({top:n}):n+e.offsetHeight-t.scrollTop>t.offsetHeight&&t.scrollTo({top:n+e.offsetHeight-t.offsetHeight})}function Yz(e,t){return e.map(e=>e[Iz]?.map(e=>e[t.value]))}function Xz(e){return Array.isArray(e)&&Array.isArray(e[0])}function Zz(e){return e?Xz(e)?e:(e.length===0?[]:[e]).map(e=>Array.isArray(e)?e:[e]):[]}function Qz(e,t,n){let r=new Set(e),i=t();return e.filter(e=>{let t=i[e],a=t?t.parent:null,o=t?t.children:null;return t&&t.node.disabled?!0:n===`SHOW_CHILD`?!(o&&o.some(e=>e.key&&r.has(e.key))):!(a&&!a.node.disabled&&r.has(a.key))})}function $z(e,t,n,r=!1){let i=t,a=[];for(let t=0;t{let t=e[n.value];return r?String(t)===String(o):t===o}),c=s===-1?null:i?.[s];a.push({value:c?.[n.value]??o,index:s,option:c}),i=c?.[n.children]}return a}var eB=((e,t,n,r,i)=>S.useMemo(()=>{let a=i||(e=>{let t=r?e.slice(-1):e;return t.every(e=>[`string`,`number`].includes(typeof e))?t.join(` / `):t.reduce((e,t,n)=>{let r=S.isValidElement(t)?S.cloneElement(t,{key:n}):t;return n===0?[r]:[...e,` / `,r]},[])});return e.map(e=>{let r=$z(e,t,n),i=a(r.map(({option:e,value:t})=>e?.[n.label]??t),r.map(({option:e})=>e)),o=Uz(e);return{label:i,value:o,key:o,valueCells:e,disabled:r[r.length-1]?.option?.disabled}})},[e,t,n,i,r]));function tB(e,t){return S.useCallback(n=>{let r=[],i=[];return n.forEach(n=>{$z(n,e,t).every(e=>e.option)?i.push(n):r.push(n)}),[i,r]},[e,t])}function nB(e,t){return e[t]}function rB(e,t){return`${e}-${t}`}function iB(e){return e&&e.type&&e.type.isTreeNode}function aB(e,t){return e??t}function oB(e){let{title:t,_title:n,key:r,children:i}=e||{},a=t||`title`;return{title:a,_title:n||[a],key:r||`key`,children:i||`children`}}function sB(e){function t(e){return Di(e).map(e=>{if(!iB(e))return li(!e,`Tree/TreeNode can only accept TreeNode as children.`),null;let{key:n}=e,{children:r,...i}=e.props,a={key:n,...i},o=t(r);return o.length&&(a.children=o),a}).filter(e=>e)}return t(e)}function cB(e,t,n){let{_title:r,key:i,children:a}=oB(n),o=new Set(t===!0?[]:t),s=[];function c(e,n=null){return e.map((l,u)=>{let d=rB(n?n.pos:`0`,u),f=aB(l[i],d),p;for(let e=0;ee[a]:typeof a==`function`&&(u=e=>a(e)):u=(e,t)=>aB(e[s],t);function d(n,r,i,a){let o=n?n[l]:e,s=n?rB(i.pos,r):`0`,c=n?[...a,n]:[];n&&t({node:n,index:r,pos:s,key:u(n,s),parentPos:i.node?i.pos:null,level:i.level+1,nodes:c}),o&&o.forEach((e,t)=>{d(e,t,{node:n,pos:s,level:i?i.level+1:-1},c)})}d(null)}function uB(e,{initWrapper:t,processEntity:n,onProcessFinished:r,externalGetKey:i,childrenPropName:a,fieldNames:o}={},s){let c=i||s,l={},u={},d={posEntities:l,keyEntities:u};return t&&(d=t(d)||d),lB(e,e=>{let{node:t,index:r,pos:i,key:a,parentPos:o,level:s,nodes:c}=e,f={node:t,nodes:c,index:r,key:a,pos:i,level:s},p=aB(a,i);l[i]=f,u[p]=f,f.parent=l[o],f.parent&&(f.parent.children=f.parent.children||[],f.parent.children.push(f)),n&&n(f,d)},{externalGetKey:c,childrenPropName:a,fieldNames:o}),r&&r(d),d}function dB(e,t,n,r){return e===!1?!1:e||!t&&!n||t&&r&&!n}function fB(e,{expandedKeys:t,selectedKeys:n,loadedKeys:r,loadingKeys:i,checkedKeys:a,halfCheckedKeys:o,dragOverNodeKey:s,dropPosition:c,keyEntities:l}){let u=nB(l,e);return{eventKey:e,expanded:t.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:r.indexOf(e)!==-1,loading:i.indexOf(e)!==-1,checked:a.indexOf(e)!==-1,halfChecked:o.indexOf(e)!==-1,pos:String(u?u.pos:``),dragOver:s===e&&c===0,dragOverGapTop:s===e&&c===-1,dragOverGapBottom:s===e&&c===1}}function pB(e){let{data:t,expanded:n,selected:r,checked:i,loaded:a,loading:o,halfChecked:s,dragOver:c,dragOverGapTop:l,dragOverGapBottom:u,pos:d,active:f,eventKey:p}=e,m={...t,expanded:n,selected:r,checked:i,loaded:a,loading:o,halfChecked:s,dragOver:c,dragOverGapTop:l,dragOverGapBottom:u,pos:d,active:f,key:p};return`props`in m||Object.defineProperty(m,`props`,{get(){return li(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}var mB=((e,t)=>{let n=S.useRef({options:[],info:{keyEntities:{},pathKeyEntities:{}}});return S.useCallback(()=>(n.current.options!==e&&(n.current.options=e,n.current.info=uB(e,{fieldNames:t,initWrapper:e=>({...e,pathKeyEntities:{}}),processEntity:(e,n)=>{let r=e.nodes.map(e=>e[t.value]).join(Bz);n.pathKeyEntities[r]=e,e.key=r}})),n.current.info.pathKeyEntities),[t,e])});function hB(e,t){let n=S.useMemo(()=>t||[],[t]),r=mB(n,e);return[n,r,S.useCallback(t=>{let n=r();return t.map(t=>{let{nodes:r}=n[t];return r.map(t=>t[e.value])})},[r,e])]}function gB(e,t){let{autoClearSearchValue:n,searchValue:r,onSearch:i}=t;return S.useMemo(()=>{if(!e)return[!1,{}];let t={matchInputWidth:!0,limit:50,autoClearSearchValue:n,searchValue:r,onSearch:i};return e&&typeof e==`object`&&(t={...t,...e}),t.limit<=0&&(t.limit=!1),[!0,t]},[e,n,r,i])}function _B(e,t){let n=new Set;return e.forEach(e=>{t.has(e)||n.add(e)}),n}function vB(e){let{disabled:t,disableCheckbox:n,checkable:r}=e||{};return!!(t||n)||r===!1}function yB(e,t,n,r){let i=new Set(e),a=new Set;for(let e=0;e<=n;e+=1)(t.get(e)||new Set).forEach(e=>{let{key:t,node:n,children:a=[]}=e;i.has(t)&&!r(n)&&a.filter(e=>!r(e.node)).forEach(e=>{i.add(e.key)})});let o=new Set;for(let e=n;e>=0;--e)(t.get(e)||new Set).forEach(e=>{let{parent:t,node:n}=e;if(r(n)||!e.parent||o.has(e.parent.key))return;if(r(e.parent.node)){o.add(t.key);return}let s=!0,c=!1;(t.children||[]).filter(e=>!r(e.node)).forEach(({key:e})=>{let t=i.has(e);s&&!t&&(s=!1),!c&&(t||a.has(e))&&(c=!0)}),s&&i.add(t.key),c&&a.add(t.key),o.add(t.key)});return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(_B(a,i))}}function bB(e,t,n,r,i){let a=new Set(e),o=new Set(t);for(let e=0;e<=r;e+=1)(n.get(e)||new Set).forEach(e=>{let{key:t,node:n,children:r=[]}=e;!a.has(t)&&!o.has(t)&&!i(n)&&r.filter(e=>!i(e.node)).forEach(e=>{a.delete(e.key)})});o=new Set;let s=new Set;for(let e=r;e>=0;--e)(n.get(e)||new Set).forEach(e=>{let{parent:t,node:n}=e;if(i(n)||!e.parent||s.has(e.parent.key))return;if(i(e.parent.node)){s.add(t.key);return}let r=!0,c=!1;(t.children||[]).filter(e=>!i(e.node)).forEach(({key:e})=>{let t=a.has(e);r&&!t&&(r=!1),!c&&(t||o.has(e))&&(c=!0)}),r||a.delete(t.key),c&&o.add(t.key),s.add(t.key)});return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(_B(o,a))}}function xB(e,t,n,r){let i=[],a;a=r||vB;let o=new Set(e.filter(e=>{let t=!!nB(n,e);return t||i.push(e),t})),s=new Map,c=0;Object.keys(n).forEach(e=>{let t=n[e],{level:r}=t,i=s.get(r);i||(i=new Set,s.set(r,i)),i.add(t),c=Math.max(c,r)}),li(!i.length,`Tree missing follow keys: ${i.slice(0,100).map(e=>`'${e}'`).join(`, `)}`);let l;return l=t===!0?yB(o,s,c,a):bB(o,t.halfCheckedKeys,s,c,a),l}function SB(e,t,n,r,i,a,o,s){return c=>{if(!e)t(c);else{let e=Uz(c),l=Wz(n),u=Wz(r),d=l.includes(e),f=i.some(t=>Uz(t)===e),p=n,m=i;if(f&&!d)m=i.filter(t=>Uz(t)!==e);else{let t=d?l.filter(t=>t!==e):[...l,e],n=a(),r;d?{checkedKeys:r}=xB(t,{checked:!1,halfCheckedKeys:u},n):{checkedKeys:r}=xB(t,!0,n),p=o(Qz(r,a,s))}t([...m,...p])}}}function CB(e,t,n,r,i){return S.useMemo(()=>{let[a,o]=i(t);if(!e||!t.length)return[a,[],o];let{checkedKeys:s,halfCheckedKeys:c}=xB(Wz(a),!0,n());return[r(s),r(c),o]},[e,t,n,r,i])}function wB({prefixCls:e,checked:t,halfChecked:n,disabled:r,onClick:i,disableCheckbox:a}){let{checkable:o}=S.useContext(Fz),s=typeof o==`boolean`?null:o;return S.createElement(`span`,{className:Y(`${e}`,{[`${e}-checked`]:t,[`${e}-indeterminate`]:!t&&n,[`${e}-disabled`]:r||a}),onClick:i},s)}function TB(){return TB=Object.assign?Object.assign.bind():function(e){for(var t=1;tf||e,O=S.useMemo(()=>n.map(e=>{let{disabled:t,disableCheckbox:n}=e,r=e[Iz],a=e.__cascader_fix_label__??e[g.label],o=e[g.value],s=qz(e,g),d=r?r.map(e=>e[g.value]):[...i,o],f=Uz(d);return{disabled:t,label:a,value:o,isLeaf:s,isLoading:u.includes(f),checked:c.has(f),halfChecked:l.has(f),option:e,disableCheckbox:n,fullPath:d,fullPathKey:f}}),[n,c,g,l,u,i]);return S.useEffect(()=>{if(h.current){let e=`.${m}-active`,t=h.current.querySelector(e);t&&Jz(t)}},[r,m]),S.createElement(`ul`,{className:Y(p,w?.popup?.list),style:T?.popup?.list,ref:h,role:`menu`},O.map(({disabled:n,label:i,value:c,isLeaf:l,isLoading:u,checked:f,halfChecked:p,option:h,fullPath:g,fullPathKey:v,disableCheckbox:O})=>{let k=bi(h,{aria:!0,data:!0}),A=()=>{if(D(n))return;let e=[...g];E&&l&&e.pop(),s(e)},j=()=>{d(h)&&!D(n)&&o(g,l)},M;return typeof h.title==`string`?M=h.title:typeof i==`string`&&(M=i),S.createElement(`li`,TB({key:v},k,{className:Y(m,w?.popup?.listItem,{[`${m}-expand`]:!l,[`${m}-active`]:r===c||r===v,[`${m}-disabled`]:D(n),[`${m}-loading`]:u}),style:{...x,...T?.popup?.listItem},role:`menuitemcheckbox`,title:M,"aria-checked":f,"data-path-key":v,onClick:()=>{A(),!O&&(!t||l)&&j()},onDoubleClick:()=>{_&&a(!1)},onMouseEnter:()=>{E&&A()},onMouseDown:e=>{e.preventDefault()}}),t&&S.createElement(wB,{prefixCls:`${e}-checkbox`,checked:f,halfChecked:p,disabled:D(n)||O,disableCheckbox:O,onClick:e=>{O||(e.stopPropagation(),j())}}),S.createElement(`div`,{className:`${m}-content`},C&&c!==`__EMPTY__`?C(h):i),!u&&y&&!l&&S.createElement(`div`,{className:`${m}-expand-icon`},y),u&&b&&S.createElement(`div`,{className:`${m}-loading-icon`},b))}))}var OB=(e,t)=>{let{values:n}=S.useContext(Fz),r=n[0],[i,a]=S.useState([]);return S.useEffect(()=>{e||a(r||[])},[t,r]),[i,a]},kB=((e,t,n,r,i,a,o)=>{let{direction:s,searchValue:c,toggleOpen:l,open:u}=o,d=s===`rtl`,[f,p,m,h]=S.useMemo(()=>{let e=-1,i=t,a=[],o=[],s=r.length,c=Yz(t,n);for(let t=0;t(c[i]?Uz(c[i]):e[n.value])===r[t]);if(s===-1)break;e=s,a.push(e),o.push(r[t]),i=i[e][n.children]}let l=t;for(let e=0;e{i(e)},_=e=>{let t=m.length,r=p;r===-1&&e<0&&(r=t);for(let i=0;i{f.length>1?g(f.slice(0,-1)):l(!1)},y=()=>{let e=(m[p]?.[n.children]||[]).find(e=>!e.disabled);e&&g([...f,e[n.value]])};S.useImperativeHandle(e,()=>({onKeyDown:e=>{let{which:t}=e;switch(t){case Zr.UP:case Zr.DOWN:{let e=0;t===Zr.UP?e=-1:t===Zr.DOWN&&(e=1),e!==0&&_(e);break}case Zr.LEFT:if(c)break;d?y():v();break;case Zr.RIGHT:if(c)break;d?v():y();break;case Zr.BACKSPACE:c||v();break;case Zr.ENTER:if(f.length){let e=m[p]?.__rc_cascader_search_mark__||[];e.length?a(e.map(e=>e[n.value]),e[e.length-1]):a(f,m[p])}break;case Zr.ESC:l(!1),u&&e.stopPropagation()}},onKeyUp:()=>{}}))});function AB(){return AB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,multiple:r,searchValue:i,toggleOpen:a,notFoundContent:o,direction:s,open:c,disabled:l,lockOptions:u=!1}=e,d=S.useRef(null),f=s===`rtl`,{options:p,values:m,halfValues:h,fieldNames:g,changeOnSelect:_,onSelect:v,searchOptions:y,popupPrefixCls:b,loadData:x,expandTrigger:C}=S.useContext(Fz),w=b||n,[T,E]=S.useState([]),D=e=>{if(!x||i)return;let t=$z(e,p,g).map(({option:e})=>e),n=t[t.length-1];if(n&&!qz(n,g)){let n=Uz(e);E(e=>[...e,n]),x(t)}};S.useEffect(()=>{T.length&&T.forEach(e=>{let t=$z(Gz(e),p,g,!0).map(({option:e})=>e),n=t[t.length-1];(!n||n[g.children]||qz(n,g))&&E(t=>t.filter(t=>t!==e))})},[p,T,g]);let O=S.useMemo(()=>new Set(Wz(m)),[m]),k=S.useMemo(()=>new Set(Wz(h)),[h]),[A,j]=OB(r,c),M=e=>{j(e),D(e)},N=e=>{if(l)return!1;let{disabled:t}=e,n=qz(e,g);return!t&&(n||_||r)},P=(e,t,n=!1)=>{v(e),!r&&(t||_&&(C===`hover`||n))&&a(!1)},F=S.useMemo(()=>i?y:p,[i,y,p]),I=Xn(()=>F,[c,u],(e,t)=>!!t[0]&&!t[1]),L=S.useMemo(()=>{let e=[{options:I}],t=I,n=Yz(t,g);for(let r=0;r(n[t]?Uz(n[t]):e[g.value])===i)?.[g.children];if(!a?.length)break;t=a,e.push({options:a})}return e},[I,A,g]);kB(t,I,g,A,M,(e,t)=>{N(t)&&P(e,qz(t,g),!0)},{direction:s,searchValue:i,toggleOpen:a,open:c}),S.useEffect(()=>{if(!i)for(let e=0;e{let n=A.slice(0,t),r=A[t];return S.createElement(DB,AB({key:t},B,{prefixCls:w,options:e.options,prevValuePath:n,activeValue:r}))});return S.createElement(`div`,{className:Y(`${w}-menus`,{[`${w}-menu-empty`]:R,[`${w}-rtl`]:f}),ref:d},V)});function MB(){return MB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{lockOptions:n,...r}=Ax();return S.createElement(jB,MB({},e,r,{lockOptions:n,ref:t}))});function PB(){}function FB(e){let{prefixCls:t=`rc-cascader`,style:n,className:r,options:i,checkable:a,defaultValue:o,value:s,fieldNames:c,changeOnSelect:l,onChange:u,showCheckedStrategy:d,loadData:f,expandTrigger:p,expandIcon:m=`>`,loadingIcon:h,direction:g,notFoundContent:_=`Not Found`,disabled:v,optionRender:y}=e,b=!!a,[x,C]=Wn(o,s),w=Zz(x),T=S.useMemo(()=>Kz(c),[JSON.stringify(c)]),[E,D,O]=hB(T,i),[k,A,j]=CB(b,w,D,O,tB(E,T)),M=SB(b,Rn(e=>{if(C(e),u){let t=Zz(e),n=t.map(e=>$z(e,E,T).map(e=>e.option));u(b?t:t[0],b?n:n[0])}}),k,A,j,D,O,d),N=Rn(e=>{M(e)}),P=S.useMemo(()=>({options:E,fieldNames:T,values:k,halfValues:A,changeOnSelect:l,onSelect:N,checkable:a,searchOptions:[],popupPrefixCls:void 0,loadData:f,expandTrigger:p,expandIcon:m,loadingIcon:h,popupMenuColumnStyle:void 0,optionRender:y}),[E,T,k,A,l,N,a,f,p,m,h,y]),F=`${t}-panel`,I=!E.length;return S.createElement(Fz.Provider,{value:P},S.createElement(`div`,{className:Y(F,{[`${F}-rtl`]:g===`rtl`,[`${F}-empty`]:I},r),style:n},I?_:S.createElement(jB,{prefixCls:t,searchValue:``,multiple:b,toggleOpen:PB,open:!0,direction:g,disabled:v})))}function IB(){return IB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,prefixCls:r=`rc-cascader`,fieldNames:i,defaultValue:a,value:o,changeOnSelect:s,onChange:c,displayRender:l,checkable:u,showSearch:d,expandTrigger:f,options:p,popupPrefixCls:m,loadData:h,open:g,popupClassName:_,popupMenuColumnStyle:v,popupStyle:y,classNames:b,styles:x,placement:C,onPopupVisibleChange:w,expandIcon:T=`>`,loadingIcon:E,children:D,popupMatchSelectWidth:O=!1,showCheckedStrategy:k=Vz,optionRender:A,...j}=e,M=Yn(n),N=!!u,[P,F]=Wn(a,o),I=Zz(P),L=S.useMemo(()=>Kz(i),[JSON.stringify(i)]),[R,z,B]=hB(L,p),[V,H]=gB(d,e),{autoClearSearchValue:U=!0,searchValue:ee,onSearch:te}=H,[ne,W]=Wn(``,ee),re=ne||``,G=(e,t)=>{W(e),t.source!==`blur`&&te&&te(e)},K=zz(re,R,L,m||r,H,s||N),[q,ie,J]=CB(N,I,z,B,tB(R,L)),ae=eB(S.useMemo(()=>{let e=Qz(Wz(q),z,k);return[...J,...B(e)]},[q,z,B,J,k]),R,L,N,l),oe=Rn(e=>{if(F(e),c){let t=Zz(e),n=t.map(e=>$z(e,R,L).map(e=>e.option));c(N?t:t[0],N?n:n[0])}}),se=SB(N,oe,q,ie,J,z,B,k),ce=Rn(e=>{(!N||U)&&W(``),se(e)}),le=(e,t)=>{if(t.type===`clear`){oe([]);return}let{valueCells:n}=t.values[0];ce(n)},ue=e=>{w?.(e)},de=S.useMemo(()=>({classNames:b,styles:x,options:R,fieldNames:L,values:q,halfValues:ie,changeOnSelect:s,onSelect:ce,checkable:u,searchOptions:K,popupPrefixCls:m,loadData:h,expandTrigger:f,expandIcon:T,loadingIcon:E,popupMenuColumnStyle:v,optionRender:A}),[b,x,R,L,q,ie,s,ce,u,K,m,h,f,T,E,v,A]),fe=!(re?K:R).length,pe=re&&H.matchInputWidth||fe?{}:{minWidth:`auto`};return S.createElement(Fz.Provider,{value:de},S.createElement(NS,IB({},j,{ref:t,id:M,prefixCls:r,autoClearSearchValue:U,popupMatchSelectWidth:O,classNames:b,styles:x,popupStyle:{...pe,...y},displayValues:ae,onDisplayValuesChange:le,mode:N?`multiple`:void 0,searchValue:re,onSearch:G,showSearch:V,OptionList:NB,emptyOptions:fe,open:g,popupClassName:_,placement:C,onPopupVisibleChange:ue,getRawInputElement:()=>D})))});LB.SHOW_PARENT=Vz,LB.SHOW_CHILD=Hz,LB.Panel=FB;var RB=LB;function zB(e,t){let{getPrefixCls:n,direction:r,renderEmpty:i}=S.useContext(ma),a=t||r;return[n(`select`,e),n(`cascader`,e),a,i]}function BB(e,t){return S.useMemo(()=>t?S.createElement(`span`,{className:`${e}-checkbox-inner`}):!1,[e,t])}var VB=S.createElement(Xm,{spin:!0}),HB=S.createElement(Ug,null),UB=S.createElement(mT,null);function WB({contextExpandIcon:e,contextLoadingIcon:t,expandIcon:n,loadingIcon:r,isRtl:i}){return S.useMemo(()=>({expandIcon:n??e??(i?UB:HB),loadingIcon:r??t??VB}),[e,t,n,i,r])}var GB=e=>{let{checkboxCls:t,checkboxSize:n,lineWidth:r}=e,i=`${t}-wrapper`;return[{[`${t}-group`]:{...Vl(e),display:`inline-flex`,flexWrap:`wrap`,columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[i]:{...Vl(e),display:`inline-flex`,alignItems:`baseline`,cursor:`pointer`,"&:after":{display:`inline-block`,width:0,overflow:`hidden`,content:`'\\a0'`},[`& + ${i}`]:{marginInlineStart:0},[`&${i}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}},[t]:{...Vl(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:n,height:n,direction:`ltr`,backgroundColor:e.colorBgContainer,border:`${X(r)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:`separate`,transition:`all ${e.motionDurationSlow}`,flex:`none`,...vg(),"&:after":{boxSizing:`border-box`,position:`absolute`,top:`calc(${n} / 2 - ${r})`,insetInlineStart:`calc(${n} / 4 - ${r})`,display:`table`,width:e.calc(n).div(14).mul(5).equal(),height:e.calc(n).div(14).mul(8).equal(),border:`${X(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:`rotate(45deg) scale(0) translate(-50%,-50%)`,opacity:0,content:`""`,transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`,...vg()},[`${t}-input`]:{position:`absolute`,inset:`calc(-1 * (${r}))`,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:Wl(e),"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[` + `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:`relative`,zIndex:1,boxShadow:r}}},vz=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:a,actionsBg:o}=e;return{margin:0,padding:0,listStyle:`none`,background:o,borderTop:`${X(e.lineWidth)} ${e.lineType} ${a}`,display:`flex`,borderRadius:`0 0 ${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)}`,...Ul(),"& > li":{margin:r,color:e.colorTextDescription,textAlign:`center`,"> span":{position:`relative`,display:`block`,minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,"&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:`inline-block`,width:`100%`,color:e.colorIcon,lineHeight:X(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:X(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${X(e.lineWidth)} ${e.lineType} ${a}`}}}},yz=e=>({margin:`${X(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:`flex`,...Ul(),"&-avatar":{paddingInlineEnd:e.padding},"&-section":{overflow:`hidden`,flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,...Bl},"&-description":{color:e.colorTextDescription}}),bz=e=>{let{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${X(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${X(e.padding)} ${X(i)}`}}},xz=e=>{let{componentCls:t}=e;return{overflow:`hidden`,[`${t}-body`]:{userSelect:`none`}}},Sz=e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:a,bodyPadding:o,extraColor:s,motionDurationMid:c}=e;return{[t]:{...Vl(e),position:`relative`,background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:a},[`${t}-head`]:gz(e),[`${t}-extra`]:{marginInlineStart:`auto`,color:s,fontWeight:`normal`,fontSize:e.fontSize},[`${t}-body`]:{padding:o,borderRadius:`0 0 ${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)}`,"&:first-child":{borderStartStartRadius:e.borderRadiusLG,borderStartEndRadius:e.borderRadiusLG},"&:not(:last-child)":{borderEndStartRadius:0,borderEndEndRadius:0}},[`${t}-grid`]:_z(e),[`${t}-cover`]:{"> *":{display:`block`,width:`100%`,borderRadius:`${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:vz(e),[`${t}-meta`]:yz(e)},[`${t}-bordered`]:{border:`${X(e.lineWidth)} ${e.lineType} ${i}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:`pointer`,transition:[`box-shadow`,`border-color`].map(e=>`${e} ${c}`).join(`, `),"&:hover":{borderColor:`transparent`,boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)} 0 0 `,[`&:not(:has(> ${t}-head))`]:{borderRadius:0},[`${t}-body`]:{display:`flex`,flexWrap:`wrap`},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:r}}},[`${t}-type-inner`]:bz(e),[`${t}-loading`]:xz(e),[`${t}-rtl`]:{direction:`rtl`}}},Cz=e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:a}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${X(r)}`,fontSize:a,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:`flex`,alignItems:`center`}}}}},wz=Xl(`Card`,e=>{let t=lc(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[Sz(t),Cz(t)]},e=>({headerBg:`transparent`,headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:e.bodyPadding??e.paddingLG,headerPadding:e.headerPadding??e.paddingLG})),Tz=e=>{let{actionClasses:t,actions:n=[],actionStyle:r}=e;return S.createElement(`ul`,{className:t,style:r},n.map((e,t)=>{let r=`action-${t}`;return S.createElement(`li`,{style:{width:`${100/n.length}%`},key:r},S.createElement(`span`,null,e))}))},Ez=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,extra:o,headStyle:s={},bodyStyle:c={},title:l,loading:u,bordered:d,variant:f,size:p,type:m,cover:h,actions:g,tabList:_,children:v,activeTabKey:y,defaultActiveTabKey:b,tabBarExtraContent:x,hoverable:C,tabProps:w={},classNames:T,styles:E,...D}=e,{getPrefixCls:O,direction:k,className:A,style:j,classNames:M,styles:N}=_a(`card`),[P]=FC(`card`,f,d),F=Oh(p),I={...e,size:F,variant:P},[L,R]=xf([M,T],[N,E],{props:I}),z=t=>{e.onTabChange?.(t)},B=S.useMemo(()=>Di(v),[v]),V=S.useMemo(()=>B.some(e=>S.isValidElement(e)&&e.type===hz),[B]),H=O(`card`,n),[U,ee]=wz(H),te=S.createElement($y,{loading:!0,active:!0,paragraph:{rows:4},title:!1},v),ne=y!==void 0,W={...w,[ne?`activeKey`:`defaultActiveKey`]:ne?y:b,tabBarExtraContent:x},re,G=F===`small`?F:`large`,K=_?S.createElement(mz,{size:G,...W,className:`${H}-head-tabs`,onChange:z,items:_.map(({tab:e,...t})=>({label:e,...t}))}):null;if(l||o||K){let e=Y(`${H}-head`,L.header),t=Y(`${H}-head-title`,L.title),n=Y(`${H}-extra`,L.extra),r={...s,...R.header};re=S.createElement(`div`,{className:e,style:r},S.createElement(`div`,{className:`${H}-head-wrapper`},l&&S.createElement(`div`,{className:t,style:R.title},l),o&&S.createElement(`div`,{className:n,style:R.extra},o)),K)}let q=Y(`${H}-cover`,L.cover),ie=h?S.createElement(`div`,{className:q,style:R.cover},h):null,J=Y(`${H}-body`,L.body),ae={...c,...R.body},oe=u||B.length?S.createElement(`div`,{className:J,style:ae},u?te:v):null,se=Y(`${H}-actions`,L.actions),ce=g?.length?S.createElement(Tz,{actionClasses:se,actionStyle:R.actions,actions:g}):null,le=hi(D,[`onTabChange`]),ue=Y(H,A,{[`${H}-loading`]:u,[`${H}-bordered`]:P!==`borderless`,[`${H}-hoverable`]:C,[`${H}-contain-grid`]:V,[`${H}-contain-tabs`]:_?.length,[`${H}-small`]:F===`small`,[`${H}-type-${m}`]:!!m,[`${H}-rtl`]:k===`rtl`},r,i,U,ee,L.root),de={...R.root,...j,...a};return S.createElement(`div`,{ref:t,...le,className:ue,style:de},re,ie,oe,ce)}),Dz=e=>{let{prefixCls:t,className:n,avatar:r,title:i,description:a,style:o,classNames:s,styles:c,...l}=e,{getPrefixCls:u,className:d,style:f,classNames:p,styles:m}=_a(`cardMeta`),h=`${u(`card`,t)}-meta`,[g,_]=xf([p,s],[m,c],{props:e}),v=Y(h,n,d,g.root),y={...f,..._.root,...o},b=Y(`${h}-avatar`,g.avatar),x=Y(`${h}-title`,g.title),C=Y(`${h}-description`,g.description),w=Y(`${h}-section`,g.section),T=r?S.createElement(`div`,{className:b,style:_.avatar},r):null,E=i?S.createElement(`div`,{className:x,style:_.title},i):null,D=a?S.createElement(`div`,{className:C,style:_.description},a):null,O=E||D?S.createElement(`div`,{className:w,style:_.section},E,D):null;return S.createElement(`div`,{...l,className:v,style:y},T,O)},Oz=Ez;Oz.Grid=hz,Oz.Meta=Dz;function kz(e,t,n){var r=n||{},i=r.noTrailing,a=i===void 0?!1:i,o=r.noLeading,s=o===void 0?!1:o,c=r.debounceMode,l=c===void 0?void 0:c,u,d=!1,f=0;function p(){u&&clearTimeout(u)}function m(e){var t=(e||{}).upcomingOnly,n=t===void 0?!1:t;p(),d=!n}function h(){var n=[...arguments],r=this,i=Date.now()-f;if(d)return;function o(){f=Date.now(),t.apply(r,n)}function c(){u=void 0}!s&&l&&!u&&o(),p(),l===void 0&&i>e?s?(f=Date.now(),a||(u=setTimeout(l?c:o,e))):o():a!==!0&&(u=setTimeout(l?c:o,l===void 0?e-i:e))}return h.cancel=m,h}function Az(e,t,n){var r=(n||{}).atBegin;return kz(e,t,{debounceMode:(r===void 0?!1:r)!==!1})}var jz=S.createContext({}),Mz=`__rc_cascader_search_mark__`,Nz=(e,t,{label:n=``})=>t.some(t=>String(t[n]).toLowerCase().includes(e.toLowerCase())),Pz=(e,t,n,r)=>t.map(e=>e[r.label]).join(` / `),Fz=(e,t,n,r,i,a)=>{let{filter:o=Nz,render:s=Pz,limit:c=50,sort:l}=i;return S.useMemo(()=>{let i=[];if(!e)return[];function u(t,d,f=!1){t.forEach(t=>{if(!l&&c!==!1&&c>0&&i.length>=c)return;let p=[...d,t],m=t[n.children],h=f||t.disabled;(!m||m.length===0||a)&&o(e,p,{label:n.label})&&i.push({...t,disabled:h,[n.label]:s(e,p,r,n),[Mz]:p,[n.children]:void 0}),m&&u(t[n.children],p,h)})}return u(t,[]),l&&i.sort((t,r)=>l(t[Mz],r[Mz],e,n)),c!==!1&&c>0?i.slice(0,c):i},[e,t,n,r,s,a,o,l,c])},Iz=`__RC_CASCADER_SPLIT__`,Lz=`SHOW_PARENT`,Rz=`SHOW_CHILD`;function zz(e){return e.join(Iz)}function Bz(e){return e.map(zz)}function Vz(e){return e.split(Iz)}function Hz(e){let{label:t,value:n,children:r}=e||{},i=n||`value`;return{label:t||`label`,value:i,key:i,children:r||`children`}}function Uz(e,t){return e.isLeaf??!e[t.children]?.length}function Wz(e){let t=e.parentElement;if(!t)return;let n=e.offsetTop-t.offsetTop;n-t.scrollTop<0?t.scrollTo({top:n}):n+e.offsetHeight-t.scrollTop>t.offsetHeight&&t.scrollTo({top:n+e.offsetHeight-t.offsetHeight})}function Gz(e,t){return e.map(e=>e[Mz]?.map(e=>e[t.value]))}function Kz(e){return Array.isArray(e)&&Array.isArray(e[0])}function qz(e){return e?Kz(e)?e:(e.length===0?[]:[e]).map(e=>Array.isArray(e)?e:[e]):[]}function Jz(e,t,n){let r=new Set(e),i=t();return e.filter(e=>{let t=i[e],a=t?t.parent:null,o=t?t.children:null;return t&&t.node.disabled?!0:n===`SHOW_CHILD`?!(o&&o.some(e=>e.key&&r.has(e.key))):!(a&&!a.node.disabled&&r.has(a.key))})}function Yz(e,t,n,r=!1){let i=t,a=[];for(let t=0;t{let t=e[n.value];return r?String(t)===String(o):t===o}),c=s===-1?null:i?.[s];a.push({value:c?.[n.value]??o,index:s,option:c}),i=c?.[n.children]}return a}var Xz=((e,t,n,r,i)=>S.useMemo(()=>{let a=i||(e=>{let t=r?e.slice(-1):e;return t.every(e=>[`string`,`number`].includes(typeof e))?t.join(` / `):t.reduce((e,t,n)=>{let r=S.isValidElement(t)?S.cloneElement(t,{key:n}):t;return n===0?[r]:[...e,` / `,r]},[])});return e.map(e=>{let r=Yz(e,t,n),i=a(r.map(({option:e,value:t})=>e?.[n.label]??t),r.map(({option:e})=>e)),o=zz(e);return{label:i,value:o,key:o,valueCells:e,disabled:r[r.length-1]?.option?.disabled}})},[e,t,n,i,r]));function Zz(e,t){return S.useCallback(n=>{let r=[],i=[];return n.forEach(n=>{Yz(n,e,t).every(e=>e.option)?i.push(n):r.push(n)}),[i,r]},[e,t])}function Qz(e,t){return e[t]}function $z(e,t){return`${e}-${t}`}function eB(e){return e&&e.type&&e.type.isTreeNode}function tB(e,t){return e??t}function nB(e){let{title:t,_title:n,key:r,children:i}=e||{},a=t||`title`;return{title:a,_title:n||[a],key:r||`key`,children:i||`children`}}function rB(e){function t(e){return Di(e).map(e=>{if(!eB(e))return li(!e,`Tree/TreeNode can only accept TreeNode as children.`),null;let{key:n}=e,{children:r,...i}=e.props,a={key:n,...i},o=t(r);return o.length&&(a.children=o),a}).filter(e=>e)}return t(e)}function iB(e,t,n){let{_title:r,key:i,children:a}=nB(n),o=new Set(t===!0?[]:t),s=[];function c(e,n=null){return e.map((l,u)=>{let d=$z(n?n.pos:`0`,u),f=tB(l[i],d),p;for(let e=0;ee[a]:typeof a==`function`&&(u=e=>a(e)):u=(e,t)=>tB(e[s],t);function d(n,r,i,a){let o=n?n[l]:e,s=n?$z(i.pos,r):`0`,c=n?[...a,n]:[];n&&t({node:n,index:r,pos:s,key:u(n,s),parentPos:i.node?i.pos:null,level:i.level+1,nodes:c}),o&&o.forEach((e,t)=>{d(e,t,{node:n,pos:s,level:i?i.level+1:-1},c)})}d(null)}function oB(e,{initWrapper:t,processEntity:n,onProcessFinished:r,externalGetKey:i,childrenPropName:a,fieldNames:o}={},s){let c=i||s,l={},u={},d={posEntities:l,keyEntities:u};return t&&(d=t(d)||d),aB(e,e=>{let{node:t,index:r,pos:i,key:a,parentPos:o,level:s,nodes:c}=e,f={node:t,nodes:c,index:r,key:a,pos:i,level:s},p=tB(a,i);l[i]=f,u[p]=f,f.parent=l[o],f.parent&&(f.parent.children=f.parent.children||[],f.parent.children.push(f)),n&&n(f,d)},{externalGetKey:c,childrenPropName:a,fieldNames:o}),r&&r(d),d}function sB(e,t,n,r){return e===!1?!1:e||!t&&!n||t&&r&&!n}function cB(e,{expandedKeys:t,selectedKeys:n,loadedKeys:r,loadingKeys:i,checkedKeys:a,halfCheckedKeys:o,dragOverNodeKey:s,dropPosition:c,keyEntities:l}){let u=Qz(l,e);return{eventKey:e,expanded:t.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:r.indexOf(e)!==-1,loading:i.indexOf(e)!==-1,checked:a.indexOf(e)!==-1,halfChecked:o.indexOf(e)!==-1,pos:String(u?u.pos:``),dragOver:s===e&&c===0,dragOverGapTop:s===e&&c===-1,dragOverGapBottom:s===e&&c===1}}function lB(e){let{data:t,expanded:n,selected:r,checked:i,loaded:a,loading:o,halfChecked:s,dragOver:c,dragOverGapTop:l,dragOverGapBottom:u,pos:d,active:f,eventKey:p}=e,m={...t,expanded:n,selected:r,checked:i,loaded:a,loading:o,halfChecked:s,dragOver:c,dragOverGapTop:l,dragOverGapBottom:u,pos:d,active:f,key:p};return`props`in m||Object.defineProperty(m,`props`,{get(){return li(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}var uB=((e,t)=>{let n=S.useRef({options:[],info:{keyEntities:{},pathKeyEntities:{}}});return S.useCallback(()=>(n.current.options!==e&&(n.current.options=e,n.current.info=oB(e,{fieldNames:t,initWrapper:e=>({...e,pathKeyEntities:{}}),processEntity:(e,n)=>{let r=e.nodes.map(e=>e[t.value]).join(Iz);n.pathKeyEntities[r]=e,e.key=r}})),n.current.info.pathKeyEntities),[t,e])});function dB(e,t){let n=S.useMemo(()=>t||[],[t]),r=uB(n,e);return[n,r,S.useCallback(t=>{let n=r();return t.map(t=>{let{nodes:r}=n[t];return r.map(t=>t[e.value])})},[r,e])]}function fB(e,t){let{autoClearSearchValue:n,searchValue:r,onSearch:i}=t;return S.useMemo(()=>{if(!e)return[!1,{}];let t={matchInputWidth:!0,limit:50,autoClearSearchValue:n,searchValue:r,onSearch:i};return e&&typeof e==`object`&&(t={...t,...e}),t.limit<=0&&(t.limit=!1),[!0,t]},[e,n,r,i])}function pB(e,t){let n=new Set;return e.forEach(e=>{t.has(e)||n.add(e)}),n}function mB(e){let{disabled:t,disableCheckbox:n,checkable:r}=e||{};return!!(t||n)||r===!1}function hB(e,t,n,r){let i=new Set(e),a=new Set;for(let e=0;e<=n;e+=1)(t.get(e)||new Set).forEach(e=>{let{key:t,node:n,children:a=[]}=e;i.has(t)&&!r(n)&&a.filter(e=>!r(e.node)).forEach(e=>{i.add(e.key)})});let o=new Set;for(let e=n;e>=0;--e)(t.get(e)||new Set).forEach(e=>{let{parent:t,node:n}=e;if(r(n)||!e.parent||o.has(e.parent.key))return;if(r(e.parent.node)){o.add(t.key);return}let s=!0,c=!1;(t.children||[]).filter(e=>!r(e.node)).forEach(({key:e})=>{let t=i.has(e);s&&!t&&(s=!1),!c&&(t||a.has(e))&&(c=!0)}),s&&i.add(t.key),c&&a.add(t.key),o.add(t.key)});return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(pB(a,i))}}function gB(e,t,n,r,i){let a=new Set(e),o=new Set(t);for(let e=0;e<=r;e+=1)(n.get(e)||new Set).forEach(e=>{let{key:t,node:n,children:r=[]}=e;!a.has(t)&&!o.has(t)&&!i(n)&&r.filter(e=>!i(e.node)).forEach(e=>{a.delete(e.key)})});o=new Set;let s=new Set;for(let e=r;e>=0;--e)(n.get(e)||new Set).forEach(e=>{let{parent:t,node:n}=e;if(i(n)||!e.parent||s.has(e.parent.key))return;if(i(e.parent.node)){s.add(t.key);return}let r=!0,c=!1;(t.children||[]).filter(e=>!i(e.node)).forEach(({key:e})=>{let t=a.has(e);r&&!t&&(r=!1),!c&&(t||o.has(e))&&(c=!0)}),r||a.delete(t.key),c&&o.add(t.key),s.add(t.key)});return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(pB(o,a))}}function _B(e,t,n,r){let i=[],a;a=r||mB;let o=new Set(e.filter(e=>{let t=!!Qz(n,e);return t||i.push(e),t})),s=new Map,c=0;Object.keys(n).forEach(e=>{let t=n[e],{level:r}=t,i=s.get(r);i||(i=new Set,s.set(r,i)),i.add(t),c=Math.max(c,r)}),li(!i.length,`Tree missing follow keys: ${i.slice(0,100).map(e=>`'${e}'`).join(`, `)}`);let l;return l=t===!0?hB(o,s,c,a):gB(o,t.halfCheckedKeys,s,c,a),l}function vB(e,t,n,r,i,a,o,s){return c=>{if(!e)t(c);else{let e=zz(c),l=Bz(n),u=Bz(r),d=l.includes(e),f=i.some(t=>zz(t)===e),p=n,m=i;if(f&&!d)m=i.filter(t=>zz(t)!==e);else{let t=d?l.filter(t=>t!==e):[...l,e],n=a(),r;d?{checkedKeys:r}=_B(t,{checked:!1,halfCheckedKeys:u},n):{checkedKeys:r}=_B(t,!0,n),p=o(Jz(r,a,s))}t([...m,...p])}}}function yB(e,t,n,r,i){return S.useMemo(()=>{let[a,o]=i(t);if(!e||!t.length)return[a,[],o];let{checkedKeys:s,halfCheckedKeys:c}=_B(Bz(a),!0,n());return[r(s),r(c),o]},[e,t,n,r,i])}function bB({prefixCls:e,checked:t,halfChecked:n,disabled:r,onClick:i,disableCheckbox:a}){let{checkable:o}=S.useContext(jz),s=typeof o==`boolean`?null:o;return S.createElement(`span`,{className:Y(`${e}`,{[`${e}-checked`]:t,[`${e}-indeterminate`]:!t&&n,[`${e}-disabled`]:r||a}),onClick:i},s)}function xB(){return xB=Object.assign?Object.assign.bind():function(e){for(var t=1;tf||e,O=S.useMemo(()=>n.map(e=>{let{disabled:t,disableCheckbox:n}=e,r=e[Mz],a=e.__cascader_fix_label__??e[g.label],o=e[g.value],s=Uz(e,g),d=r?r.map(e=>e[g.value]):[...i,o],f=zz(d);return{disabled:t,label:a,value:o,isLeaf:s,isLoading:u.includes(f),checked:c.has(f),halfChecked:l.has(f),option:e,disableCheckbox:n,fullPath:d,fullPathKey:f}}),[n,c,g,l,u,i]);return S.useEffect(()=>{if(h.current){let e=`.${m}-active`,t=h.current.querySelector(e);t&&Wz(t)}},[r,m]),S.createElement(`ul`,{className:Y(p,w?.popup?.list),style:T?.popup?.list,ref:h,role:`menu`},O.map(({disabled:n,label:i,value:c,isLeaf:l,isLoading:u,checked:f,halfChecked:p,option:h,fullPath:g,fullPathKey:v,disableCheckbox:O})=>{let k=bi(h,{aria:!0,data:!0}),A=()=>{if(D(n))return;let e=[...g];E&&l&&e.pop(),s(e)},j=()=>{d(h)&&!D(n)&&o(g,l)},M;return typeof h.title==`string`?M=h.title:typeof i==`string`&&(M=i),S.createElement(`li`,xB({key:v},k,{className:Y(m,w?.popup?.listItem,{[`${m}-expand`]:!l,[`${m}-active`]:r===c||r===v,[`${m}-disabled`]:D(n),[`${m}-loading`]:u}),style:{...x,...T?.popup?.listItem},role:`menuitemcheckbox`,title:M,"aria-checked":f,"data-path-key":v,onClick:()=>{A(),!O&&(!t||l)&&j()},onDoubleClick:()=>{_&&a(!1)},onMouseEnter:()=>{E&&A()},onMouseDown:e=>{e.preventDefault()}}),t&&S.createElement(bB,{prefixCls:`${e}-checkbox`,checked:f,halfChecked:p,disabled:D(n)||O,disableCheckbox:O,onClick:e=>{O||(e.stopPropagation(),j())}}),S.createElement(`div`,{className:`${m}-content`},C&&c!==`__EMPTY__`?C(h):i),!u&&y&&!l&&S.createElement(`div`,{className:`${m}-expand-icon`},y),u&&b&&S.createElement(`div`,{className:`${m}-loading-icon`},b))}))}var wB=(e,t)=>{let{values:n}=S.useContext(jz),r=n[0],[i,a]=S.useState([]);return S.useEffect(()=>{e||a(r||[])},[t,r]),[i,a]},TB=((e,t,n,r,i,a,o)=>{let{direction:s,searchValue:c,toggleOpen:l,open:u}=o,d=s===`rtl`,[f,p,m,h]=S.useMemo(()=>{let e=-1,i=t,a=[],o=[],s=r.length,c=Gz(t,n);for(let t=0;t(c[i]?zz(c[i]):e[n.value])===r[t]);if(s===-1)break;e=s,a.push(e),o.push(r[t]),i=i[e][n.children]}let l=t;for(let e=0;e{i(e)},_=e=>{let t=m.length,r=p;r===-1&&e<0&&(r=t);for(let i=0;i{f.length>1?g(f.slice(0,-1)):l(!1)},y=()=>{let e=(m[p]?.[n.children]||[]).find(e=>!e.disabled);e&&g([...f,e[n.value]])};S.useImperativeHandle(e,()=>({onKeyDown:e=>{let{which:t}=e;switch(t){case Zr.UP:case Zr.DOWN:{let e=0;t===Zr.UP?e=-1:t===Zr.DOWN&&(e=1),e!==0&&_(e);break}case Zr.LEFT:if(c)break;d?y():v();break;case Zr.RIGHT:if(c)break;d?v():y();break;case Zr.BACKSPACE:c||v();break;case Zr.ENTER:if(f.length){let e=m[p]?.__rc_cascader_search_mark__||[];e.length?a(e.map(e=>e[n.value]),e[e.length-1]):a(f,m[p])}break;case Zr.ESC:l(!1),u&&e.stopPropagation()}},onKeyUp:()=>{}}))});function EB(){return EB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,multiple:r,searchValue:i,toggleOpen:a,notFoundContent:o,direction:s,open:c,disabled:l,lockOptions:u=!1}=e,d=S.useRef(null),f=s===`rtl`,{options:p,values:m,halfValues:h,fieldNames:g,changeOnSelect:_,onSelect:v,searchOptions:y,popupPrefixCls:b,loadData:x,expandTrigger:C}=S.useContext(jz),w=b||n,[T,E]=S.useState([]),D=e=>{if(!x||i)return;let t=Yz(e,p,g).map(({option:e})=>e),n=t[t.length-1];if(n&&!Uz(n,g)){let n=zz(e);E(e=>[...e,n]),x(t)}};S.useEffect(()=>{T.length&&T.forEach(e=>{let t=Yz(Vz(e),p,g,!0).map(({option:e})=>e),n=t[t.length-1];(!n||n[g.children]||Uz(n,g))&&E(t=>t.filter(t=>t!==e))})},[p,T,g]);let O=S.useMemo(()=>new Set(Bz(m)),[m]),k=S.useMemo(()=>new Set(Bz(h)),[h]),[A,j]=wB(r,c),M=e=>{j(e),D(e)},N=e=>{if(l)return!1;let{disabled:t}=e,n=Uz(e,g);return!t&&(n||_||r)},P=(e,t,n=!1)=>{v(e),!r&&(t||_&&(C===`hover`||n))&&a(!1)},F=S.useMemo(()=>i?y:p,[i,y,p]),I=Xn(()=>F,[c,u],(e,t)=>!!t[0]&&!t[1]),L=S.useMemo(()=>{let e=[{options:I}],t=I,n=Gz(t,g);for(let r=0;r(n[t]?zz(n[t]):e[g.value])===i)?.[g.children];if(!a?.length)break;t=a,e.push({options:a})}return e},[I,A,g]);TB(t,I,g,A,M,(e,t)=>{N(t)&&P(e,Uz(t,g),!0)},{direction:s,searchValue:i,toggleOpen:a,open:c}),S.useEffect(()=>{if(!i)for(let e=0;e{let n=A.slice(0,t),r=A[t];return S.createElement(CB,EB({key:t},B,{prefixCls:w,options:e.options,prevValuePath:n,activeValue:r}))});return S.createElement(`div`,{className:Y(`${w}-menus`,{[`${w}-menu-empty`]:R,[`${w}-rtl`]:f}),ref:d},V)});function OB(){return OB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{lockOptions:n,...r}=kx();return S.createElement(DB,OB({},e,r,{lockOptions:n,ref:t}))});function AB(){}function jB(e){let{prefixCls:t=`rc-cascader`,style:n,className:r,options:i,checkable:a,defaultValue:o,value:s,fieldNames:c,changeOnSelect:l,onChange:u,showCheckedStrategy:d,loadData:f,expandTrigger:p,expandIcon:m=`>`,loadingIcon:h,direction:g,notFoundContent:_=`Not Found`,disabled:v,optionRender:y}=e,b=!!a,[x,C]=Wn(o,s),w=qz(x),T=S.useMemo(()=>Hz(c),[JSON.stringify(c)]),[E,D,O]=dB(T,i),[k,A,j]=yB(b,w,D,O,Zz(E,T)),M=vB(b,Rn(e=>{if(C(e),u){let t=qz(e),n=t.map(e=>Yz(e,E,T).map(e=>e.option));u(b?t:t[0],b?n:n[0])}}),k,A,j,D,O,d),N=Rn(e=>{M(e)}),P=S.useMemo(()=>({options:E,fieldNames:T,values:k,halfValues:A,changeOnSelect:l,onSelect:N,checkable:a,searchOptions:[],popupPrefixCls:void 0,loadData:f,expandTrigger:p,expandIcon:m,loadingIcon:h,popupMenuColumnStyle:void 0,optionRender:y}),[E,T,k,A,l,N,a,f,p,m,h,y]),F=`${t}-panel`,I=!E.length;return S.createElement(jz.Provider,{value:P},S.createElement(`div`,{className:Y(F,{[`${F}-rtl`]:g===`rtl`,[`${F}-empty`]:I},r),style:n},I?_:S.createElement(DB,{prefixCls:t,searchValue:``,multiple:b,toggleOpen:AB,open:!0,direction:g,disabled:v})))}function MB(){return MB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,prefixCls:r=`rc-cascader`,fieldNames:i,defaultValue:a,value:o,changeOnSelect:s,onChange:c,displayRender:l,checkable:u,showSearch:d,expandTrigger:f,options:p,popupPrefixCls:m,loadData:h,open:g,popupClassName:_,popupMenuColumnStyle:v,popupStyle:y,classNames:b,styles:x,placement:C,onPopupVisibleChange:w,expandIcon:T=`>`,loadingIcon:E,children:D,popupMatchSelectWidth:O=!1,showCheckedStrategy:k=Lz,optionRender:A,...j}=e,M=Yn(n),N=!!u,[P,F]=Wn(a,o),I=qz(P),L=S.useMemo(()=>Hz(i),[JSON.stringify(i)]),[R,z,B]=dB(L,p),[V,H]=fB(d,e),{autoClearSearchValue:U=!0,searchValue:ee,onSearch:te}=H,[ne,W]=Wn(``,ee),re=ne||``,G=(e,t)=>{W(e),t.source!==`blur`&&te&&te(e)},K=Fz(re,R,L,m||r,H,s||N),[q,ie,J]=yB(N,I,z,B,Zz(R,L)),ae=Xz(S.useMemo(()=>{let e=Jz(Bz(q),z,k);return[...J,...B(e)]},[q,z,B,J,k]),R,L,N,l),oe=Rn(e=>{if(F(e),c){let t=qz(e),n=t.map(e=>Yz(e,R,L).map(e=>e.option));c(N?t:t[0],N?n:n[0])}}),se=vB(N,oe,q,ie,J,z,B,k),ce=Rn(e=>{(!N||U)&&W(``),se(e)}),le=(e,t)=>{if(t.type===`clear`){oe([]);return}let{valueCells:n}=t.values[0];ce(n)},ue=e=>{w?.(e)},de=S.useMemo(()=>({classNames:b,styles:x,options:R,fieldNames:L,values:q,halfValues:ie,changeOnSelect:s,onSelect:ce,checkable:u,searchOptions:K,popupPrefixCls:m,loadData:h,expandTrigger:f,expandIcon:T,loadingIcon:E,popupMenuColumnStyle:v,optionRender:A}),[b,x,R,L,q,ie,s,ce,u,K,m,h,f,T,E,v,A]),fe=!(re?K:R).length,pe=re&&H.matchInputWidth||fe?{}:{minWidth:`auto`};return S.createElement(jz.Provider,{value:de},S.createElement(MS,MB({},j,{ref:t,id:M,prefixCls:r,autoClearSearchValue:U,popupMatchSelectWidth:O,classNames:b,styles:x,popupStyle:{...pe,...y},displayValues:ae,onDisplayValuesChange:le,mode:N?`multiple`:void 0,searchValue:re,onSearch:G,showSearch:V,OptionList:kB,emptyOptions:fe,open:g,popupClassName:_,placement:C,onPopupVisibleChange:ue,getRawInputElement:()=>D})))});NB.SHOW_PARENT=Lz,NB.SHOW_CHILD=Rz,NB.Panel=jB;var PB=NB;function FB(e,t){let{getPrefixCls:n,direction:r,renderEmpty:i}=S.useContext(ma),a=t||r;return[n(`select`,e),n(`cascader`,e),a,i]}function IB(e,t){return S.useMemo(()=>t?S.createElement(`span`,{className:`${e}-checkbox-inner`}):!1,[e,t])}var LB=S.createElement(Xm,{spin:!0}),RB=S.createElement(Ug,null),zB=S.createElement(pT,null);function BB({contextExpandIcon:e,contextLoadingIcon:t,expandIcon:n,loadingIcon:r,isRtl:i}){return S.useMemo(()=>({expandIcon:n??e??(i?zB:RB),loadingIcon:r??t??LB}),[e,t,n,i,r])}var VB=e=>{let{checkboxCls:t,checkboxSize:n,lineWidth:r}=e,i=`${t}-wrapper`;return[{[`${t}-group`]:{...Vl(e),display:`inline-flex`,flexWrap:`wrap`,columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[i]:{...Vl(e),display:`inline-flex`,alignItems:`baseline`,cursor:`pointer`,"&:after":{display:`inline-block`,width:0,overflow:`hidden`,content:`'\\a0'`},[`& + ${i}`]:{marginInlineStart:0},[`&${i}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}},[t]:{...Vl(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:n,height:n,direction:`ltr`,backgroundColor:e.colorBgContainer,border:`${X(r)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:`separate`,transition:`all ${e.motionDurationSlow}`,flex:`none`,...vg(),"&:after":{boxSizing:`border-box`,position:`absolute`,top:`calc(${n} / 2 - ${r})`,insetInlineStart:`calc(${n} / 4 - ${r})`,display:`table`,width:e.calc(n).div(14).mul(5).equal(),height:e.calc(n).div(14).mul(8).equal(),border:`${X(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:`rotate(45deg) scale(0) translate(-50%,-50%)`,opacity:0,content:`""`,transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`,...vg()},[`${t}-input`]:{position:`absolute`,inset:`calc(-1 * (${r}))`,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:Wl(e),"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[` ${i}:not(${i}-disabled), ${t}:not(${t}-disabled) - `]:{[`&:hover ${t}`]:{borderColor:e.colorPrimary}},[`${i}:not(${i}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[`${t}-checked`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:`rotate(45deg) scale(1) translate(-50%,-50%)`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`,...vg()},[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[t]:{"&-indeterminate":{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:`50%`,insetInlineStart:`50%`,width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:`translate(-50%, -50%) scale(1)`,opacity:1,content:`""`},"&:hover":{backgroundColor:e.colorBgContainer,borderColor:e.colorPrimary}}}},{[`${i}-disabled`]:{cursor:`not-allowed`},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate::after`]:{background:e.colorTextDisabled}}}]};function KB(e,t){return GB(lc(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}var qB=Xl(`Checkbox`,(e,{prefixCls:t})=>[KB(t,e)]),JB=e=>{let{prefixCls:t,componentCls:n}=e,r=`${n}-menu-item`,i=` + `]:{[`&:hover ${t}`]:{borderColor:e.colorPrimary}},[`${i}:not(${i}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[`${t}-checked`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:`rotate(45deg) scale(1) translate(-50%,-50%)`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`,...vg()},[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[t]:{"&-indeterminate":{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:`50%`,insetInlineStart:`50%`,width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:`translate(-50%, -50%) scale(1)`,opacity:1,content:`""`},"&:hover":{backgroundColor:e.colorBgContainer,borderColor:e.colorPrimary}}}},{[`${i}-disabled`]:{cursor:`not-allowed`},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate::after`]:{background:e.colorTextDisabled}}}]};function HB(e,t){return VB(lc(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}var UB=Xl(`Checkbox`,(e,{prefixCls:t})=>[HB(t,e)]),WB=e=>{let{prefixCls:t,componentCls:n}=e,r=`${n}-menu-item`,i=` &${r}-expand ${r}-expand-icon, ${r}-loading-icon -`;return[KB(`${t}-checkbox`,e),{[n]:{"&-checkbox":{top:0,marginInlineEnd:e.paddingXS,pointerEvents:`unset`},"&-menus":{display:`flex`,flexWrap:`nowrap`,alignItems:`flex-start`,[`&${n}-menu-empty`]:{[`${n}-menu`]:{width:`100%`,height:`auto`,[r]:{color:e.colorTextDisabled}}}},"&-menu":{flexGrow:1,flexShrink:0,minWidth:e.controlItemWidth,height:e.dropdownHeight,margin:0,padding:e.menuPadding,overflow:`auto`,verticalAlign:`top`,listStyle:`none`,"-ms-overflow-style":`-ms-autohiding-scrollbar`,"&:not(:last-child)":{borderInlineEnd:`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},"&-item":{display:`flex`,maxWidth:400,flexWrap:`nowrap`,alignItems:`center`,padding:e.optionPadding,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${e.motionDurationMid}`,borderRadius:e.borderRadiusSM,"&:hover":{background:e.controlItemBgHover},"&-disabled":{color:e.colorTextDisabled,cursor:`not-allowed`,"&:hover":{background:`transparent`},[i]:{color:e.colorTextDisabled}},[`&-active:not(${r}-disabled)`]:{"&, &:hover":{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg}},"&-content":{flex:`auto`,minWidth:0,...Bl},[i]:{marginInlineStart:e.paddingXXS,color:e.colorIcon,fontSize:e.fontSizeIcon},"&-keyword":{color:e.colorHighlight}}}}}]},YB=e=>{let{componentCls:t,antCls:n}=e;return[{[t]:{width:e.controlWidth}},{[`${t}-dropdown`]:[{[`&${n}-select-dropdown`]:{padding:0}},JB(e)]},{[`${t}-dropdown-rtl`]:{direction:`rtl`}},v_(e)]},XB=e=>{let t=Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:e.controlItemBgActive,optionSelectedFontWeight:e.fontWeightStrong,optionPadding:`${t}px ${e.paddingSM}px`,menuPadding:e.paddingXXS,optionSelectedColor:e.colorText}},ZB=Xl(`Cascader`,YB,XB,{resetFont:!1,unitless:{optionSelectedFontWeight:!0}}),QB=Zl([`Cascader`,`Panel`],e=>{let{componentCls:t}=e;return{[`${t}-panel`]:[JB(e),{display:`inline-flex`,border:`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,borderRadius:e.borderRadiusLG,overflowX:`auto`,maxWidth:`100%`,[`${t}-menus`]:{alignItems:`stretch`},[`${t}-menu`]:{height:`auto`},"&-empty":{padding:e.paddingXXS}}]}},XB,{resetFont:!1});function $B(e){let{prefixCls:t,className:n,multiple:r,rootClassName:i,notFoundContent:a,direction:o,expandIcon:s,loadingIcon:c,disabled:l}=e,{expandIcon:u,loadingIcon:d}=_a(`cascader`),f=S.useContext(pm),p=l??f,[m,h,g,_]=zB(t,o),v=ap(h),[y,b]=ZB(h,v);QB(h);let{expandIcon:x,loadingIcon:C}=WB({contextExpandIcon:u,contextLoadingIcon:d,expandIcon:s,loadingIcon:c,isRtl:g===`rtl`}),w=a||_?.(`Cascader`)||S.createElement(FC,{componentName:`Cascader`}),T=BB(h,r);return S.createElement(FB,{...e,checkable:T,prefixCls:h,className:Y(n,y,i,b,v),notFoundContent:w,direction:g,expandIcon:x,loadingIcon:C,disabled:p})}var{SHOW_CHILD:eV,SHOW_PARENT:tV}=RB,nV=(e,t,n)=>{let r=e.toLowerCase().split(t).reduce((e,n,r)=>r===0?[n]:[].concat(da(e),[t,n]),[]),i=[],a=0;return r.forEach((t,r)=>{let o=a+t.length,s=e.slice(a,o);a=o,r%2==1&&(s=S.createElement(`span`,{className:`${n}-menu-item-keyword`,key:`separator-${r}`},s)),i.push(s)}),i},rV=(e,t,n,r)=>{let i=[],a=e.toLowerCase();return t.forEach((e,t)=>{t!==0&&i.push(` / `);let o=e[r.label],s=typeof o;(s===`string`||s===`number`)&&(o=nV(String(o),a,n)),i.push(o)}),i},iV=S.forwardRef((e,t)=>{let{prefixCls:n,size:r,disabled:i,className:a,rootClassName:o,multiple:s,bordered:c=!0,transitionName:l,choiceTransitionName:u=``,popupClassName:d,expandIcon:f,placement:p,showSearch:m,allowClear:h=!0,notFoundContent:g,direction:_,getPopupContainer:v,status:y,showArrow:b,builtinPlacements:x,style:C,variant:w,dropdownClassName:T,dropdownRender:E,onDropdownVisibleChange:D,onPopupVisibleChange:O,dropdownMenuColumnStyle:k,popupRender:A,dropdownStyle:j,popupMenuColumnStyle:M,onOpenChange:N,styles:P,classNames:F,loadingIcon:I,...L}=e,R=hi(L,[`suffixIcon`]),{getPrefixCls:z,getPopupContainer:B,className:V,style:H,classNames:U,styles:ee,expandIcon:te,loadingIcon:ne}=_a(`cascader`),{popupOverflow:W}=S.useContext(ma),{status:re,hasFeedback:G,isFormItemInput:K,feedbackIcon:q}=S.useContext(Iy),ie=DC(re,y),[J,ae,oe,se]=zB(n,_),ce=oe===`rtl`,le=z(),ue=ap(J),[de,fe]=XC(J,ue),pe=ap(ae);ZB(ae,pe);let{compactSize:me,compactItemClassnames:he}=jh(J,_),[ge,_e]=IC(`cascader`,w,c),ve=g||se?.(`Cascader`)||S.createElement(FC,{componentName:`Cascader`}),ye=sw(A||E),be=M||k,xe=N||O||D,Se=S.useMemo(()=>{if(!m)return m;let e={render:rV};return ef(m)&&(e={...e,...m}),e},[m]),Ce=Oh(e=>r??me??e),we=S.useContext(pm),Te=i??we,{expandIcon:Ee,loadingIcon:De}=WB({contextExpandIcon:te,contextLoadingIcon:ne,expandIcon:f,loadingIcon:I,isRtl:ce}),Oe=BB(ae,s),ke=cw(e.suffixIcon,b),{suffixIcon:Ae,removeIcon:je,clearIcon:Me}=ow({...e,loadingIcon:De,hasFeedback:G,feedbackIcon:q,showSuffixIcon:ke,multiple:s,prefixCls:J,componentName:`Cascader`}),Ne=S.useMemo(()=>p===void 0?ce?`bottomRight`:`bottomLeft`:p,[p,ce]),Pe=h===!0?{clearIcon:Me}:h,Fe={...e,variant:ge,size:Ce,status:ie,disabled:Te},[Ie,Le]=xf([U,F],[ee,P],{props:Fe},{popup:{_default:`root`}}),Re={...Le.popup?.root,...j},[ze]=Ff(`SelectLike`,Re?.zIndex),Be=Y(d||T,`${ae}-dropdown`,{[`${ae}-dropdown-rtl`]:oe===`rtl`},o,ue,Ie.popup?.root,pe,de,fe);return S.createElement(RB,{prefixCls:J,className:Y(!n&&ae,{[`${J}-lg`]:Ce===`large`,[`${J}-sm`]:Ce===`small`,[`${J}-rtl`]:ce,[`${J}-${ge}`]:_e,[`${J}-in-form-item`]:K},EC(J,ie,G),he,V,a,o,Ie.root,ue,pe,de,fe),disabled:Te,style:{...Le.root,...H,...C},classNames:Ie,styles:Le,...R,builtinPlacements:RC(x,W),direction:oe,placement:Ne,notFoundContent:ve,allowClear:Pe,showSearch:Se,expandIcon:Ee,suffixIcon:Ae,removeIcon:je,loadingIcon:De,checkable:Oe,popupClassName:Be,popupPrefixCls:n||ae,popupStyle:{...Re,zIndex:ze},popupRender:ye,popupMenuColumnStyle:be,onPopupVisibleChange:xe,choiceTransitionName:vh(le,``,u),transitionName:vh(le,`slide-up`,l),getPopupContainer:v||B,ref:t})}),aV=Dx(iV,`popupAlign`,e=>hi(e,[`visible`]));iV.SHOW_PARENT=tV,iV.SHOW_CHILD=eV,iV.Panel=$B,iV._InternalPanelDoNotUseOrYouWillBeFired=aV;var oV=S.createContext(null),sV=S.forwardRef((e,t)=>{let{prefixCls:n,children:r,indeterminate:i=!1,onMouseEnter:a,onMouseLeave:o,skipGroup:s=!1,disabled:c,rootClassName:l,className:u,style:d,classNames:f,styles:p,name:m,value:h,checked:g,defaultChecked:_,onChange:v,...y}=e,{getPrefixCls:b,direction:x,className:C,style:w,classNames:T,styles:E}=_a(`checkbox`),D=S.useContext(oV),{isFormItemInput:O}=S.useContext(Iy),k=S.useContext(pm),A=(D?.disabled||c)??k,[j,M]=Wn(_,g),N=j,P=Rn(e=>{M(e.target.checked),v?.(e),!s&&D?.toggleOption&&D.toggleOption({label:r,value:h})});D&&!s&&(N=D.value.includes(h));let F=S.useRef(null),I=cr(t,F);S.useEffect(()=>{if(!(s||!D))return D.registerValue(h),()=>{D.cancelValue(h)}},[h,s]),S.useEffect(()=>{F.current?.input&&(F.current.input.indeterminate=i)},[i]);let L=b(`checkbox`,n),R=ap(L),[z,B]=qB(L,R),V={...y},H={...e,indeterminate:i,disabled:A,checked:N},[U,ee]=xf([T,f],[E,p],{props:H}),te=Y(`${L}-wrapper`,{[`${L}-rtl`]:x===`rtl`,[`${L}-wrapper-checked`]:N,[`${L}-wrapper-disabled`]:A,[`${L}-wrapper-in-form-item`]:O},C,u,U.root,l,B,R,z),ne=Y(U.icon,{[`${L}-indeterminate`]:i},bh,z),[W,re]=FL(V.onClick);return S.createElement(Dh,{component:`Checkbox`,disabled:A},S.createElement(`label`,{className:te,style:{...ee.root,...w,...d},onMouseEnter:a,onMouseLeave:o,onClick:W},S.createElement(PL,{...V,name:!s&&D?D.name:m,checked:N,onClick:re,onChange:P,prefixCls:L,className:ne,style:ee.icon,disabled:A,ref:I,value:h}),Zd(r)&&S.createElement(`span`,{className:Y(`${L}-label`,U.label),style:ee.label},r)))}),cV=S.forwardRef((e,t)=>{let{defaultValue:n,children:r,options:i=[],prefixCls:a,className:o,rootClassName:s,style:c,onChange:l,role:u=`group`,...d}=e,{getPrefixCls:f,direction:p}=S.useContext(ma),[m,h]=S.useState(d.value||n||[]),[g,_]=S.useState([]);S.useEffect(()=>{`value`in d&&h(d.value||[])},[d.value]);let v=S.useMemo(()=>i.map(e=>typeof e==`string`||Qd(e)?{label:e,value:e}:e),[i]),y=e=>{_(t=>t.filter(t=>t!==e))},b=e=>{_(t=>[].concat(da(t),[e]))},x=e=>{let t=m.indexOf(e.value),n=da(m);t===-1?n.push(e.value):n.splice(t,1),`value`in d||h(n),l?.(n.filter(e=>g.includes(e)).sort((e,t)=>v.findIndex(t=>t.value===e)-v.findIndex(e=>e.value===t)))},C=f(`checkbox`,a),w=`${C}-group`,T=ap(C),[E,D]=qB(C,T),O=hi(d,[`value`,`disabled`]),k=i.length?v.map(e=>S.createElement(sV,{prefixCls:C,key:e.value.toString(),disabled:`disabled`in e?e.disabled:d.disabled,value:e.value,checked:m.includes(e.value),onChange:e.onChange,className:Y(`${w}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):r,A=S.useMemo(()=>({toggleOption:x,value:m,disabled:d.disabled,name:d.name,registerValue:b,cancelValue:y}),[x,m,d.disabled,d.name,b,y]),j=Y(w,{[`${w}-rtl`]:p===`rtl`},o,s,D,T,E);return S.createElement(`div`,{className:j,style:c,role:u,...O,ref:t},S.createElement(oV.Provider,{value:A},k))}),lV=sV;lV.Group=cV,lV.__ANT_CHECKBOX=!0;var uV=(0,S.createContext)({});function dV(e){return e===`auto`?`1 1 auto`:Qd(e)?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}var fV=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=S.useContext(ma),{gutter:i,wrap:a}=S.useContext(uV),{prefixCls:o,span:s,order:c,offset:l,push:u,pull:d,className:f,children:p,flex:m,style:h,...g}=e,_=n(`col`,o),v=n(),[y,b]=_b(_),[x]=$l(v,`col`),C={},w={};pw.forEach(t=>{let n={},i=e[t];Qd(i)?n.span=i:ef(i)&&(n=i||{}),delete g[t],w={...w,[`${_}-${t}-${n.span}`]:Zd(n.span),[`${_}-${t}-order-${n.order}`]:n.order||n.order===0,[`${_}-${t}-offset-${n.offset}`]:n.offset||n.offset===0,[`${_}-${t}-push-${n.push}`]:n.push||n.push===0,[`${_}-${t}-pull-${n.pull}`]:n.pull||n.pull===0,[`${_}-rtl`]:r===`rtl`},n.flex&&(w[`${_}-${t}-flex`]=!0,C[x(`${t}-flex`)]=dV(n.flex))});let T=Y(_,{[`${_}-${s}`]:s!==void 0,[`${_}-order-${c}`]:c,[`${_}-offset-${l}`]:l,[`${_}-push-${u}`]:u,[`${_}-pull-${d}`]:d},f,w,y,b),E={};return i?.[0]&&(E.paddingInline=Qd(i[0])?`${i[0]/2}px`:`calc(${i[0]} / 2)`),m&&(E.flex=dV(m),a===!1&&!E.minWidth&&(E.minWidth=0)),S.createElement(`div`,{...g,style:{...E,...h,...C},className:T,ref:t},p)});function pV(e,t){let n=[void 0,void 0],r=Array.isArray(e)?e:[e,void 0],i=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0};return r.forEach((e,t)=>{if(ef(e))for(let r=0;r{let[n,r]=S.useState(()=>$d(e)?e:``),i=()=>{if($d(e)&&r(e),ef(e))for(let n=0;n{i()},[JSON.stringify(e),t]),n},hV=S.forwardRef((e,t)=>{let{prefixCls:n,justify:r,align:i,className:a,style:o,children:s,gutter:c=0,wrap:l,...u}=e,{getPrefixCls:d,direction:f}=S.useContext(ma),p=vw(!0,null),m=mV(i,p),h=mV(r,p),g=d(`row`,n),[_,v]=hb(g),y=pV(c,p),b=Y(g,{[`${g}-no-wrap`]:l===!1,[`${g}-${h}`]:h,[`${g}-${m}`]:m,[`${g}-rtl`]:f===`rtl`},a,_,v),x={};y?.[0]&&(x.marginInline=Qd(y[0])?`${y[0]/-2}px`:`calc(${y[0]} / -2)`);let[C,w]=y;x.rowGap=w;let T=S.useMemo(()=>({gutter:[C,w],wrap:l}),[C,w,l]);return S.createElement(uV.Provider,{value:T},S.createElement(`div`,{...u,className:b,style:{...x,...o},ref:t},s))}),gV=fV,_V=e=>{let{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:a,fontSizeLG:o,fontSizeSM:s,borderRadiusLG:c,borderRadiusSM:l,colorBgContainerDisabled:u,lineWidth:d,antCls:f}=e,[p,m]=$l(f,`space`);return{[t]:[{display:`inline-flex`,alignItems:`center`,gap:0,whiteSpace:`nowrap`,paddingInline:r,margin:0,borderWidth:d,borderStyle:`solid`,borderRadius:n,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:o,borderRadius:c},"&-small":{paddingInline:a,borderRadius:l,fontSize:s},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[p(`addon-border-color`)]:i,[p(`addon-background`)]:u,[p(`addon-border-color-outlined`)]:i,[p(`addon-background-filled`)]:u,borderColor:m(`addon-border-color`),background:m(`addon-background`),"&-variant-outlined":{[p(`addon-border-color`)]:m(`addon-border-color-outlined`)},"&-variant-filled":{[p(`addon-border-color`)]:`transparent`,[p(`addon-background`)]:m(`addon-background-filled`),[`&${t}-disabled`]:{[p(`addon-border-color`)]:i,[p(`addon-background`)]:u}},"&-variant-borderless":{border:`none`,background:`transparent`},"&-variant-underlined":{border:`none`,background:`transparent`}},{"&-status-error":{[p(`addon-border-color-outlined`)]:e.colorError,[p(`addon-background-filled`)]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[p(`addon-border-color-outlined`)]:e.colorWarning,[p(`addon-background-filled`)]:e.colorWarningBg,color:e.colorWarning}}]}},vV=Xl([`Space`,`Addon`],e=>[_V(e),v_(e,{focus:!1})]),yV=S.forwardRef((e,t)=>{let{className:n,children:r,style:i,prefixCls:a,variant:o=`outlined`,disabled:s,status:c,...l}=e,{getPrefixCls:u,direction:d}=S.useContext(ma),f=u(`space-addon`,a),[p,m]=vV(f),{compactItemClassnames:h,compactSize:g}=jh(f,d),_=EC(f,c),v=Y(f,p,h,m,`${f}-variant-${o}`,_,{[`${f}-${g}`]:g,[`${f}-disabled`]:s},n);return S.createElement(`div`,{ref:t,className:v,style:i,...l},r)});function bV(e){return!!(e.addonBefore||e.addonAfter)}function xV(e){return!!(e.prefix||e.suffix||e.allowClear)}function SV(e,t,n){let r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart==`number`&&typeof t.selectionEnd==`number`&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=(...e)=>{t.setSelectionRange(...e)},i}function CV(e,t,n,r){if(!n)return;let i=t;if(t.type===`click`){i=SV(t,e,``),n(i);return}if(e.type!==`file`&&r!==void 0){i=SV(t,e,r),n(i);return}n(i)}function wV(){return wV=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{inputElement:n,children:r,prefixCls:i,prefix:a,suffix:o,addonBefore:s,addonAfter:c,className:l,style:u,disabled:d,readOnly:f,focused:p,triggerFocus:m,allowClear:h,value:g,handleReset:_,hidden:v,classes:y,classNames:b,dataAttrs:x,styles:C,components:w,onClear:T}=e,E=r??n,D=w?.affixWrapper||`span`,O=w?.groupWrapper||`span`,k=w?.wrapper||`span`,A=w?.groupAddon||`span`,j=(0,S.useRef)(null),M=e=>{j.current?.contains(e.target)&&m?.()},N=xV(e),P=(0,S.cloneElement)(E,{value:g,className:Y(E.props?.className,!N&&b?.variant)||null}),F=(0,S.useRef)(null);if(S.useImperativeHandle(t,()=>({nativeElement:F.current||j.current})),N){let e=null;if(h){let t=!d&&!f&&g,n=`${i}-clear-icon`,r=typeof h==`object`&&h?.clearIcon?h.clearIcon:`✖`;e=S.createElement(`button`,{type:`button`,tabIndex:-1,onClick:e=>{_?.(e),T?.()},onMouseDown:e=>e.preventDefault(),className:Y(n,{[`${n}-hidden`]:!t,[`${n}-has-suffix`]:!!o})},r)}let t=`${i}-affix-wrapper`,n=Y(t,{[`${i}-disabled`]:d,[`${t}-disabled`]:d,[`${t}-focused`]:p,[`${t}-readonly`]:f,[`${t}-input-with-clear-btn`]:o&&h&&g},y?.affixWrapper,b?.affixWrapper,b?.variant),r=(o||h)&&S.createElement(`span`,{className:Y(`${i}-suffix`,b?.suffix),style:C?.suffix},e,o);P=S.createElement(D,wV({className:n,style:C?.affixWrapper,onClick:M},x?.affixWrapper,{ref:j}),a&&S.createElement(`span`,{className:Y(`${i}-prefix`,b?.prefix),style:C?.prefix},a),P,r)}if(bV(e)){let e=`${i}-group`,t=`${e}-addon`,n=`${e}-wrapper`,r=Y(`${i}-wrapper`,e,y?.wrapper,b?.wrapper),a=Y(n,{[`${n}-disabled`]:d},y?.group,b?.groupWrapper);P=S.createElement(O,{className:a,ref:F},S.createElement(k,{className:r},s&&S.createElement(A,{className:t},s),P,c&&S.createElement(A,{className:t},c)))}return S.cloneElement(P,{className:Y(P.props?.className,l)||null,style:{...P.props?.style,...u},hidden:v})});function EV(e,t){return S.useMemo(()=>{let n={};t&&(n.show=typeof t==`object`&&t.formatter?t.formatter:!!t),n={...n,...e};let{show:r,...i}=n;return{...i,show:!!r,showFormatter:typeof r==`function`?r:void 0,strategy:i.strategy||(e=>e.length)}},[e,t])}function DV(){return DV=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{autoComplete:n,onChange:r,onFocus:i,onBlur:a,onPressEnter:o,onKeyDown:s,onKeyUp:c,prefixCls:l=`rc-input`,disabled:u,htmlSize:d,className:f,maxLength:p,suffix:m,showCount:h,count:g,type:_=`text`,classes:v,classNames:y,styles:b,onCompositionStart:x,onCompositionEnd:C,...w}=e,[T,E]=(0,S.useState)(!1),D=(0,S.useRef)(!1),O=(0,S.useRef)(!1),k=(0,S.useRef)(null),A=(0,S.useRef)(null),j=e=>{k.current&&Mr(k.current,e)},[M,N]=Wn(e.defaultValue,e.value),P=M==null?``:String(M),[F,I]=(0,S.useState)(null),L=EV(g,h),R=L.max||p,z=L.strategy(P),B=!!R&&z>R;(0,S.useImperativeHandle)(t,()=>({focus:j,blur:()=>{k.current?.blur()},setSelectionRange:(e,t,n)=>{k.current?.setSelectionRange(e,t,n)},select:()=>{k.current?.select()},input:k.current,nativeElement:A.current?.nativeElement||k.current})),(0,S.useEffect)(()=>{O.current&&=!1,E(e=>e&&u?!1:e)},[u]);let V=(e,t,n)=>{let i=t;if(!D.current&&L.exceedFormatter&&L.max&&L.strategy(t)>L.max)i=L.exceedFormatter(t,{max:L.max}),t!==i&&I([k.current?.selectionStart||0,k.current?.selectionEnd||0]);else if(n.source===`compositionEnd`)return;N(i),k.current&&CV(k.current,e,r,i)};(0,S.useEffect)(()=>{F&&k.current?.setSelectionRange(...F)},[F]);let H=e=>{V(e,e.target.value,{source:`change`})},U=e=>{D.current=!1,V(e,e.currentTarget.value,{source:`compositionEnd`}),C?.(e)},ee=e=>{o&&e.key===`Enter`&&!O.current&&!e.nativeEvent.isComposing&&(O.current=!0,o(e)),s?.(e)},te=e=>{e.key===`Enter`&&(O.current=!1),c?.(e)},ne=e=>{E(!0),i?.(e)},W=e=>{O.current&&=!1,E(!1),a?.(e)},re=e=>{N(``),j(),k.current&&CV(k.current,e,r)},G=B&&`${l}-out-of-range`;return S.createElement(TV,DV({},w,{prefixCls:l,className:Y(f,G),handleReset:re,value:P,focused:T,triggerFocus:j,suffix:(()=>{let e=Number(R)>0;if(m||L.show){let t=L.showFormatter?L.showFormatter({value:P,count:z,maxLength:R}):`${z}${e?` / ${R}`:``}`;return S.createElement(S.Fragment,null,L.show&&S.createElement(`span`,{className:Y(`${l}-show-count-suffix`,{[`${l}-show-count-has-suffix`]:!!m},y?.count),style:{...b?.count}},t),m)}return null})(),disabled:u,classes:v,classNames:y,styles:b,ref:A}),(()=>{let t=hi(e,[`prefixCls`,`onPressEnter`,`addonBefore`,`addonAfter`,`prefix`,`suffix`,`allowClear`,`defaultValue`,`showCount`,`count`,`classes`,`htmlSize`,`styles`,`classNames`,`onClear`]);return S.createElement(`input`,DV({autoComplete:n},t,{onChange:H,onFocus:ne,onBlur:W,onKeyDown:ee,onKeyUp:te,className:Y(l,{[`${l}-disabled`]:u},y?.input),style:b?.input,ref:k,size:d,type:_,onCompositionStart:e=>{D.current=!0,x?.(e)},onCompositionEnd:U}))})())}),kV=e=>{let t;return ef(e)&&e?.clearIcon?t=e:e&&(t={clearIcon:S.createElement(Eu,null)}),t};function AV(e,t){let n=(0,S.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute(`type`)===`password`&&e.current?.input.hasAttribute(`value`)&&e.current?.input.removeAttribute(`value`)}))};return(0,S.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[]),r}function jV(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var MV=(0,S.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,status:i,size:a,disabled:o,onBlur:s,onFocus:c,suffix:l,allowClear:u,addonAfter:d,addonBefore:f,className:p,style:m,styles:h,rootClassName:g,onChange:_,classNames:v,variant:y,...b}=e,{getPrefixCls:x,direction:C,allowClear:w,autoComplete:T,className:E,style:D,classNames:O,styles:k}=_a(`input`),A=x(`input`,n),j=(0,S.useRef)(null),M=ap(A),[N,P]=iR(A,g);aR(A,M);let{compactSize:F,compactItemClassnames:I}=jh(A,C),L=Oh(e=>a??F??e),R=S.useContext(pm),z=o??R,B={...e,size:L,disabled:z},[V,H]=xf([O,v],[k,h],{props:B}),{status:U,hasFeedback:ee,feedbackIcon:te}=(0,S.useContext)(Iy),ne=DC(U,i);(0,S.useRef)(jV(e)||!!ee);let W=AV(j,!0),re=e=>{W(),s?.(e)},G=e=>{W(),c?.(e)},K=e=>{W(),_?.(e)},q=(ee||l)&&S.createElement(S.Fragment,null,l,ee&&te),ie=kV(u??w),[J,ae]=IC(`input`,y,r);return S.createElement(OV,{ref:sr(t,j),prefixCls:A,autoComplete:T,...b,disabled:z,onBlur:re,onFocus:G,style:{...H.root,...D,...m},styles:H,suffix:q,allowClear:ie,className:Y(p,g,P,M,I,E,V.root),onChange:K,addonBefore:f&&S.createElement(zy,{form:!0,space:!0},f),addonAfter:d&&S.createElement(zy,{form:!0,space:!0},d),classNames:{...V,input:Y({[`${A}-sm`]:L===`small`,[`${A}-lg`]:L===`large`,[`${A}-rtl`]:C===`rtl`},V.input,N),variant:Y({[`${A}-${J}`]:ae},EC(A,ne)),affixWrapper:Y({[`${A}-affix-wrapper-sm`]:L===`small`,[`${A}-affix-wrapper-lg`]:L===`large`,[`${A}-affix-wrapper-rtl`]:C===`rtl`},N),wrapper:Y({[`${A}-group-rtl`]:C===`rtl`},N),groupWrapper:Y({[`${A}-group-wrapper-sm`]:L===`small`,[`${A}-group-wrapper-lg`]:L===`large`,[`${A}-group-wrapper-rtl`]:C===`rtl`,[`${A}-group-wrapper-${J}`]:ae},EC(`${A}-group-wrapper`,ne,ee),N)}})});function NV(e,t,n){return(e-t)/(n-t)}function PV(e,t,n,r){let i=NV(t,n,r),a={};switch(e){case`rtl`:a.right=`${i*100}%`,a.transform=`translateX(50%)`;break;case`btt`:a.bottom=`${i*100}%`,a.transform=`translateY(50%)`;break;case`ttb`:a.top=`${i*100}%`,a.transform=`translateY(-50%)`;break;default:a.left=`${i*100}%`,a.transform=`translateX(-50%)`;break}return a}function FV(e,t){return Array.isArray(e)?e[t]:e}var IV=S.createContext({min:0,max:0,direction:`ltr`,step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),LV=S.createContext({});function RV(){return RV=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,value:r,valueIndex:i,onStartMove:a,onDelete:o,style:s,render:c,dragging:l,draggingDelete:u,onOffsetChange:d,onChangeComplete:f,onFocus:p,onMouseEnter:m,...h}=e,{min:g,max:_,direction:v,disabled:y,keyboard:b,range:x,tabIndex:C,ariaLabelForHandle:w,ariaLabelledByForHandle:T,ariaRequired:E,ariaValueTextFormatterForHandle:D,styles:O,classNames:k}=S.useContext(IV),A=`${n}-handle`,j=e=>{y||a(e,i)},M=e=>{p?.(e,i)},N=e=>{m(e,i)},P=e=>{if(!y&&b){let t=null;switch(e.which||e.keyCode){case Zr.LEFT:t=v===`ltr`||v===`btt`?-1:1;break;case Zr.RIGHT:t=v===`ltr`||v===`btt`?1:-1;break;case Zr.UP:t=v===`ttb`?-1:1;break;case Zr.DOWN:t=v===`ttb`?1:-1;break;case Zr.HOME:t=`min`;break;case Zr.END:t=`max`;break;case Zr.PAGE_UP:t=2;break;case Zr.PAGE_DOWN:t=-2;break;case Zr.BACKSPACE:case Zr.DELETE:o?.(i);break}t!==null&&(e.preventDefault(),d(t,i))}},F=e=>{switch(e.which||e.keyCode){case Zr.LEFT:case Zr.RIGHT:case Zr.UP:case Zr.DOWN:case Zr.HOME:case Zr.END:case Zr.PAGE_UP:case Zr.PAGE_DOWN:f?.();break}},I=PV(v,r,g,_),L={};i!==null&&(L={tabIndex:y?null:FV(C,i),role:`slider`,"aria-valuemin":g,"aria-valuemax":_,"aria-valuenow":r,"aria-disabled":y,"aria-label":FV(w,i),"aria-labelledby":FV(T,i),"aria-required":FV(E,i),"aria-valuetext":FV(D,i)?.(r),"aria-orientation":v===`ltr`||v===`rtl`?`horizontal`:`vertical`,onMouseDown:j,onTouchStart:j,onFocus:M,onMouseEnter:N,onKeyDown:P,onKeyUp:F});let R=S.createElement(`div`,RV({ref:t,className:Y(A,{[`${A}-${i+1}`]:i!==null&&x,[`${A}-dragging`]:l,[`${A}-dragging-delete`]:u},k.handle),style:{...I,...s,...O.handle}},L,h));return c&&(R=c(R,{index:i,prefixCls:n,value:r,dragging:l,draggingDelete:u})),R});function BV(){return BV=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,style:r,onStartMove:i,onOffsetChange:a,values:o,handleRender:s,activeHandleRender:c,draggingIndex:l,draggingDelete:u,onFocus:d,...f}=e,p=S.useRef({}),[m,h]=S.useState(!1),[g,_]=S.useState(-1),v=e=>{_(e),h(!0)},y=(e,t)=>{v(t),d?.(e)},b=(e,t)=>{v(t)};S.useImperativeHandle(t,()=>({focus:e=>{p.current[e]?.focus()},hideHelp:()=>{(0,zi.flushSync)(()=>{h(!1)})}}));let x={prefixCls:n,onStartMove:i,onOffsetChange:a,render:s,onFocus:y,onMouseEnter:b,...f};return S.createElement(S.Fragment,null,o.map((e,t)=>{let n=l===t;return S.createElement(zV,BV({ref:e=>{e?p.current[t]=e:delete p.current[t]},dragging:n,draggingDelete:n&&u,style:FV(r,t),key:t,value:e,valueIndex:t},x))}),c&&m&&S.createElement(zV,BV({key:`a11y`},x,{value:o[g],valueIndex:null,dragging:l!==-1,draggingDelete:u,render:c,style:{pointerEvents:`none`},tabIndex:null,"aria-hidden":!0})))}),HV=e=>{let{prefixCls:t,style:n,children:r,value:i,onClick:a}=e,{min:o,max:s,direction:c,includedStart:l,includedEnd:u,included:d}=S.useContext(IV),f=`${t}-text`,p=PV(c,i,o,s);return S.createElement(`span`,{className:Y(f,{[`${f}-active`]:d&&l<=i&&i<=u}),style:{...p,...n},onMouseDown:e=>{e.stopPropagation()},onClick:()=>{a(i)}},r)},UV=e=>{let{prefixCls:t,marks:n,onClick:r}=e,i=`${t}-mark`;return n.length?S.createElement(`div`,{className:i},n.map(({value:e,style:t,label:n})=>S.createElement(HV,{key:e,prefixCls:i,style:t,value:e,onClick:r},n))):null},WV=e=>{let{prefixCls:t,value:n,style:r,activeStyle:i}=e,{min:a,max:o,direction:s,included:c,includedStart:l,includedEnd:u}=S.useContext(IV),d=`${t}-dot`,f=c&&l<=n&&n<=u,p={...PV(s,n,a,o),...typeof r==`function`?r(n):r};return f&&(p={...p,...typeof i==`function`?i(n):i}),S.createElement(`span`,{className:Y(d,{[`${d}-active`]:f}),style:p})},GV=e=>{let{prefixCls:t,marks:n,dots:r,style:i,activeStyle:a}=e,{min:o,max:s,step:c}=S.useContext(IV),l=S.useMemo(()=>{let e=new Set;if(n.forEach(t=>{e.add(t.value)}),r&&c!==null){let t=o;for(;t<=s;)e.add(t),t+=c}return Array.from(e)},[o,s,c,r,n]);return S.createElement(`div`,{className:`${t}-step`},l.map(e=>S.createElement(WV,{prefixCls:t,key:e,value:e,style:i,activeStyle:a})))},KV=e=>{let{prefixCls:t,style:n,start:r,end:i,index:a,onStartMove:o,replaceCls:s}=e,{direction:c,min:l,max:u,disabled:d,range:f,classNames:p}=S.useContext(IV),m=`${t}-track`,h=NV(r,l,u),g=NV(i,l,u),_=e=>{!d&&o&&o(e,-1)},v={};switch(c){case`rtl`:v.right=`${h*100}%`,v.width=`${g*100-h*100}%`;break;case`btt`:v.bottom=`${h*100}%`,v.height=`${g*100-h*100}%`;break;case`ttb`:v.top=`${h*100}%`,v.height=`${g*100-h*100}%`;break;default:v.left=`${h*100}%`,v.width=`${g*100-h*100}%`}let y=s||Y(m,{[`${m}-${a+1}`]:a!==null&&f,[`${t}-track-draggable`]:o},p.track);return S.createElement(`div`,{className:y,style:{...v,...n},onMouseDown:_,onTouchStart:_})},qV=e=>{let{prefixCls:t,style:n,values:r,startPoint:i,onStartMove:a}=e,{included:o,range:s,min:c,styles:l,classNames:u}=S.useContext(IV),d=S.useMemo(()=>{if(!s){if(r.length===0)return[];let e=i??c,t=r[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}let e=[];for(let t=0;tS.createElement(KV,{index:i,prefixCls:t,style:{...FV(n,i),...l.track},start:e,end:r,key:i,onStartMove:a})))},JV=130;function YV(e){let t=`targetTouches`in e?e.targetTouches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function XV(e,t,n,r,i,a,o,s,c,l,u){let[d,f]=S.useState(null),[p,m]=S.useState(-1),[h,g]=S.useState(!1),[_,v]=S.useState(n),[y,b]=S.useState(n),x=S.useRef(null),C=S.useRef(null),w=S.useRef(null),{onDragStart:T,onDragChange:E}=S.useContext(LV);Vn(()=>{p===-1&&v(n)},[n,p]),S.useEffect(()=>()=>{document.removeEventListener(`mousemove`,x.current),document.removeEventListener(`mouseup`,C.current),w.current&&(w.current.removeEventListener(`touchmove`,x.current),w.current.removeEventListener(`touchend`,C.current))},[]);let D=(e,t,n)=>{t!==void 0&&f(t),v(e);let r=e;n&&(r=e.filter((e,t)=>t!==p)),o(r),E&&E({rawValues:e,deleteIndex:n?p:-1,draggingIndex:p,draggingValue:t})},O=Rn((e,t,n)=>{if(e===-1){let e=y[0],n=y[y.length-1],o=r-e,s=i-n,c=t*(i-r);c=Math.max(c,o),c=Math.min(c,s),c=a(e+c)-e,D(y.map(e=>e+c))}else{let a=(i-r)*t,o=[..._];o[e]=y[e];let s=c(o,a,e,`dist`);D(s.values,s.value,n)}});return[p,d,h,S.useMemo(()=>{let e=[...n].sort((e,t)=>e-t),t=[..._].sort((e,t)=>e-t),r={};t.forEach(e=>{r[e]=(r[e]||0)+1}),e.forEach(e=>{r[e]=(r[e]||0)-1});let i=+!!l;return Object.values(r).reduce((e,t)=>e+Math.abs(t),0)<=i?_:n},[n,_,l]),(r,i,a)=>{r.stopPropagation();let o=a||n,c=o[i];m(i),f(c),b(o),v(o),g(!1);let{pageX:d,pageY:p}=YV(r),h=!1;T&&T({rawValues:o,draggingIndex:i,draggingValue:c});let y=n=>{n.preventDefault();let{pageX:r,pageY:a}=YV(n),o=r-d,s=a-p,{width:c,height:f}=e.current.getBoundingClientRect(),m,v;switch(t){case`btt`:m=-s/f,v=o;break;case`ttb`:m=s/f,v=o;break;case`rtl`:m=-o/c,v=s;break;default:m=o/c,v=s}h=l?Math.abs(v)>JV&&u<_.length:!1,g(h),O(i,m,h)},S=e=>{e.preventDefault(),document.removeEventListener(`mouseup`,S),document.removeEventListener(`mousemove`,y),w.current&&(w.current.removeEventListener(`touchmove`,x.current),w.current.removeEventListener(`touchend`,C.current)),x.current=null,C.current=null,w.current=null,s(h),m(-1),g(!1)};document.addEventListener(`mouseup`,S),document.addEventListener(`mousemove`,y),r.currentTarget.addEventListener(`touchend`,S),r.currentTarget.addEventListener(`touchmove`,y),x.current=y,C.current=S,w.current=r.currentTarget}]}function ZV(e,t,n,r,i,a){let o=S.useCallback(n=>Math.max(e,Math.min(t,n)),[e,t]),s=S.useCallback(r=>{if(n!==null){let i=e+Math.round((o(r)-e)/n)*n,a=e=>(String(e).split(`.`)[1]||``).length,s=Math.max(a(n),a(t),a(e)),c=Number(i.toFixed(s));return e<=c&&c<=t?c:null}return null},[n,e,t,o]),c=S.useCallback(i=>{let a=o(i),c=r.map(e=>e.value);n!==null&&c.push(s(i)),c.push(e,t);let l=c[0],u=t-e;return c.forEach(e=>{let t=Math.abs(a-e);t<=u&&(l=e,u=t)}),l},[e,t,r,n,o,s]),l=(i,a,o,c=`unit`)=>{if(typeof a==`number`){let u,d=i[o],f=d+a,p=[];r.forEach(e=>{p.push(e.value)}),p.push(e,t),p.push(s(d));let m=a>0?1:-1;c===`unit`?p.push(s(d+m*n)):p.push(s(f)),p=p.filter(e=>e!==null).filter(e=>a<0?e<=d:e>=d),c===`unit`&&(p=p.filter(e=>e!==d));let h=c===`unit`?d:f;u=p[0];let g=Math.abs(u-h);if(p.forEach(e=>{let t=Math.abs(e-h);t1){let e=[...i];return e[o]=u,l(e,a-m,o,c)}return u}else if(a===`min`)return e;else if(a===`max`)return t},u=(e,t,n,r=`unit`)=>{let i=e[n],a=l(e,t,n,r);return{value:a,changed:a!==i}},d=e=>a===null&&e===0||typeof a==`number`&&e{let o=e.map(c),s=o[n];if(o[n]=l(o,t,n,r),i===!1){let e=a||0;n>0&&o[n-1]!==s&&(o[n]=Math.max(o[n],o[n-1]+e)),n0;--e){let t=!0;for(;d(o[e]-o[e-1])&&t;)({value:o[e-1],changed:t}=u(o,-1,e-1))}for(let e=o.length-1;e>0;--e){let t=!0;for(;d(o[e]-o[e-1])&&t;)({value:o[e-1],changed:t}=u(o,-1,e-1))}for(let e=0;e{if(e===!0||!e)return[!!e,!1,!1,0];let{editable:t,draggableTrack:n,minCount:r,maxCount:i}=e;return[!0,t,!t&&n,r||0,i]},[e])}var $V=S.forwardRef((e,t)=>{let{prefixCls:n=`rc-slider`,className:r,style:i,classNames:a,styles:o,id:s,disabled:c=!1,keyboard:l=!0,autoFocus:u,onFocus:d,onBlur:f,min:p=0,max:m=100,step:h=1,value:g,defaultValue:_,range:v,count:y,onChange:b,onBeforeChange:x,onAfterChange:C,onChangeComplete:w,allowCross:T=!0,pushable:E=!1,reverse:D,vertical:O,included:k=!0,startPoint:A,trackStyle:j,handleStyle:M,railStyle:N,dotStyle:P,activeDotStyle:F,marks:I,dots:L,handleRender:R,activeHandleRender:z,track:B,tabIndex:V=0,ariaLabelForHandle:H,ariaLabelledByForHandle:U,ariaRequired:ee,ariaValueTextFormatterForHandle:te}=e,ne=S.useRef(null),W=S.useRef(null),re=S.useMemo(()=>O?D?`ttb`:`btt`:D?`rtl`:`ltr`,[D,O]),[G,K,q,ie,J]=QV(v),ae=S.useMemo(()=>isFinite(p)?p:0,[p]),oe=S.useMemo(()=>isFinite(m)?m:100,[m]),se=S.useMemo(()=>h!==null&&h<=0?1:h,[h]),ce=S.useMemo(()=>typeof E==`boolean`?E?se:!1:E>=0?E:!1,[E,se]),le=S.useMemo(()=>Object.keys(I||{}).map(e=>{let t=I[e],n={value:Number(e)};return t&&typeof t==`object`&&!S.isValidElement(t)&&(`label`in t||`style`in t)?(n.style=t.style,n.label=t.label):n.label=t,n}).filter(({label:e})=>e||typeof e==`number`).sort((e,t)=>e.value-t.value),[I]),[ue,de]=ZV(ae,oe,se,le,T,ce),[fe,pe]=Wn(_,g),me=S.useMemo(()=>{let e=fe==null?[]:Array.isArray(fe)?fe:[fe],[t=ae]=e,n=fe===null?[]:[t];if(G){if(n=[...e],y||fe===void 0){let e=y>=0?y+1:2;for(n=n.slice(0,e);n.lengthe-t)}return n.forEach((e,t)=>{n[t]=ue(e)}),n},[fe,G,ae,y,ue]),he=e=>G?e:e[0],ge=Rn(e=>{let t=[...e].sort((e,t)=>e-t);b&&!di(t,me,!0)&&b(he(t)),pe(t)}),_e=Rn(e=>{e&&ne.current.hideHelp();let t=he(me);C?.(t),li(!C,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),w?.(t)}),ve=e=>{if(c||!K||me.length<=ie)return;let t=[...me];t.splice(e,1),x?.(he(t)),ge(t);let n=Math.max(0,e-1);ne.current.hideHelp(),ne.current.focus(n)},[ye,be,xe,Se,Ce]=XV(W,re,me,ae,oe,ue,ge,_e,de,K,ie),we=(e,t)=>{if(!c){let n=[...me],r=0,i=0,a=oe-ae;me.forEach((t,n)=>{let o=Math.abs(e-t);o<=a&&(a=o,r=n),t{e.preventDefault();let{width:t,height:n,left:r,top:i,bottom:a,right:o}=W.current.getBoundingClientRect(),{clientX:s,clientY:c}=e,l;switch(re){case`btt`:l=(a-c)/n;break;case`ttb`:l=(c-i)/n;break;case`rtl`:l=(o-s)/t;break;default:l=(s-r)/t}we(ue(ae+l*(oe-ae)),e)},[Ee,De]=S.useState(null),Oe=(e,t)=>{if(!c){let n=de(me,e,t);x?.(he(me)),ge(n.values),De(n.value)}};S.useEffect(()=>{if(Ee!==null){let e=me.indexOf(Ee);e>=0&&ne.current.focus(e)}De(null)},[Ee]);let ke=S.useMemo(()=>q&&se===null?!1:q,[q,se]),Ae=Rn((e,t)=>{Ce(e,t),x?.(he(me))}),je=ye!==-1;S.useEffect(()=>{if(!je){let e=me.lastIndexOf(be);ne.current.focus(e)}},[je]);let Me=S.useMemo(()=>[...Se].sort((e,t)=>e-t),[Se]),[Ne,Pe]=S.useMemo(()=>G?[Me[0],Me[Me.length-1]]:[ae,Me[0]],[Me,G,ae]);S.useImperativeHandle(t,()=>({focus:()=>{ne.current.focus(0)},blur:()=>{let{activeElement:e}=document;W.current?.contains(e)&&e?.blur()}})),S.useEffect(()=>{u&&ne.current.focus(0)},[]);let Fe=S.useMemo(()=>({min:ae,max:oe,direction:re,disabled:c,keyboard:l,step:se,included:k,includedStart:Ne,includedEnd:Pe,range:G,tabIndex:V,ariaLabelForHandle:H,ariaLabelledByForHandle:U,ariaRequired:ee,ariaValueTextFormatterForHandle:te,styles:o||{},classNames:a||{}}),[ae,oe,re,c,l,se,k,Ne,Pe,G,V,H,U,ee,te,o,a]);return S.createElement(IV.Provider,{value:Fe},S.createElement(`div`,{ref:W,className:Y(n,r,{[`${n}-disabled`]:c,[`${n}-vertical`]:O,[`${n}-horizontal`]:!O,[`${n}-with-marks`]:le.length}),style:i,onMouseDown:Te,id:s},S.createElement(`div`,{className:Y(`${n}-rail`,a?.rail),style:{...N,...o?.rail}}),B!==!1&&S.createElement(qV,{prefixCls:n,style:j,values:me,startPoint:A,onStartMove:ke?Ae:void 0}),S.createElement(GV,{prefixCls:n,marks:le,dots:L,style:P,activeStyle:F}),S.createElement(VV,{ref:ne,prefixCls:n,style:M,values:Se,draggingIndex:ye,draggingDelete:xe,onStartMove:Ae,onOffsetChange:Oe,onFocus:d,onBlur:f,handleRender:R,activeHandleRender:z,onChangeComplete:_e,onDelete:K?ve:void 0}),S.createElement(UV,{prefixCls:n,marks:le,onClick:we})))}),eH=(0,S.createContext)({}),tH=S.forwardRef((e,t)=>{let{open:n,draggingDelete:r,value:i}=e,a=(0,S.useRef)(null),o=n&&!r,s=(0,S.useRef)(null);function c(){Ei.cancel(s.current),s.current=null}function l(){s.current=Ei(()=>{a.current?.forceAlign(),s.current=null})}return S.useEffect(()=>(o?l():c(),c),[o,e.title,i]),S.createElement(eT,{ref:sr(a,t),...e,open:o})}),nH=e=>{let{componentCls:t,antCls:n,controlSize:r,dotSize:i,marginFull:a,marginPart:o,colorFillContentHover:s,handleColorDisabled:c,calc:l,handleSize:u,handleSizeHover:d,handleActiveColor:f,handleActiveOutlineColor:p,handleLineWidth:m,handleLineWidthHover:h,motionDurationMid:g}=e;return{[t]:{...Vl(e),position:`relative`,height:r,margin:`${X(o)} ${X(a)}`,padding:0,cursor:`pointer`,touchAction:`none`,"&-vertical":{margin:`${X(a)} ${X(o)}`},[`${t}-rail`]:{position:`absolute`,backgroundColor:e.railBg,borderRadius:e.borderRadiusXS,transition:`background-color ${g}`},[`${t}-track,${t}-tracks`]:{position:`absolute`,transition:`background-color ${g}`},[`${t}-track`]:{backgroundColor:e.trackBg,borderRadius:e.borderRadiusXS},[`${t}-track-draggable`]:{boxSizing:`content-box`,backgroundClip:`content-box`,border:`solid rgba(0,0,0,0)`},"&:hover":{[`${t}-rail`]:{backgroundColor:e.railHoverBg},[`${t}-track`]:{backgroundColor:e.trackHoverBg},[`${t}-dot`]:{borderColor:s},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${X(m)} ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.dotActiveBorderColor}},[`${t}-handle`]:{position:`absolute`,width:u,height:u,outline:`none`,userSelect:`none`,"&-dragging-delete":{opacity:0},"&::before":{content:`""`,position:`absolute`,insetInlineStart:l(m).mul(-1).equal(),insetBlockStart:l(m).mul(-1).equal(),width:l(u).add(l(m).mul(2)).equal(),height:l(u).add(l(m).mul(2)).equal(),backgroundColor:`transparent`},"&::after":{content:`""`,position:`absolute`,insetBlockStart:0,insetInlineStart:0,width:u,height:u,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${X(m)} ${e.handleColor}`,outline:`0px solid transparent`,borderRadius:`50%`,cursor:`pointer`,transition:[`inset-inline-start`,`inset-block-start`,`width`,`height`,`box-shadow`,`outline`].map(e=>`${e} ${g}`).join(`, `)},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:l(d).sub(u).div(2).add(h).mul(-1).equal(),insetBlockStart:l(d).sub(u).div(2).add(h).mul(-1).equal(),width:l(d).add(l(h).mul(2)).equal(),height:l(d).add(l(h).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${X(h)} ${f}`,outline:`6px solid ${p}`,width:d,height:d,insetInlineStart:e.calc(u).sub(d).div(2).equal(),insetBlockStart:e.calc(u).sub(d).div(2).equal()}}},[`&-lock ${t}-handle`]:{"&::before, &::after":{transition:`none`}},[`${t}-mark`]:{position:`absolute`,fontSize:e.fontSize},[`${t}-mark-text`]:{position:`absolute`,display:`inline-block`,color:e.colorTextDescription,textAlign:`center`,wordBreak:`keep-all`,cursor:`pointer`,userSelect:`none`,"&-active":{color:e.colorText}},[`${t}-step`]:{position:`absolute`,background:`transparent`,pointerEvents:`none`},[`${t}-dot`]:{position:`absolute`,width:i,height:i,backgroundColor:e.colorBgElevated,border:`${X(m)} solid ${e.dotBorderColor}`,borderRadius:`50%`,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,pointerEvents:`auto`,"&-active":{borderColor:e.dotActiveBorderColor}},[`&${t}-disabled`]:{cursor:`not-allowed`,[`${t}-rail`]:{backgroundColor:`${e.railBg} !important`},[`${t}-track`]:{backgroundColor:`${e.trackBgDisabled} !important`},[` +`;return[HB(`${t}-checkbox`,e),{[n]:{"&-checkbox":{top:0,marginInlineEnd:e.paddingXS,pointerEvents:`unset`},"&-menus":{display:`flex`,flexWrap:`nowrap`,alignItems:`flex-start`,[`&${n}-menu-empty`]:{[`${n}-menu`]:{width:`100%`,height:`auto`,[r]:{color:e.colorTextDisabled}}}},"&-menu":{flexGrow:1,flexShrink:0,minWidth:e.controlItemWidth,height:e.dropdownHeight,margin:0,padding:e.menuPadding,overflow:`auto`,verticalAlign:`top`,listStyle:`none`,"-ms-overflow-style":`-ms-autohiding-scrollbar`,"&:not(:last-child)":{borderInlineEnd:`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},"&-item":{display:`flex`,maxWidth:400,flexWrap:`nowrap`,alignItems:`center`,padding:e.optionPadding,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${e.motionDurationMid}`,borderRadius:e.borderRadiusSM,"&:hover":{background:e.controlItemBgHover},"&-disabled":{color:e.colorTextDisabled,cursor:`not-allowed`,"&:hover":{background:`transparent`},[i]:{color:e.colorTextDisabled}},[`&-active:not(${r}-disabled)`]:{"&, &:hover":{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg}},"&-content":{flex:`auto`,minWidth:0,...Bl},[i]:{marginInlineStart:e.paddingXXS,color:e.colorIcon,fontSize:e.fontSizeIcon},"&-keyword":{color:e.colorHighlight}}}}}]},GB=e=>{let{componentCls:t,antCls:n}=e;return[{[t]:{width:e.controlWidth}},{[`${t}-dropdown`]:[{[`&${n}-select-dropdown`]:{padding:0}},WB(e)]},{[`${t}-dropdown-rtl`]:{direction:`rtl`}},v_(e)]},KB=e=>{let t=Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:e.controlItemBgActive,optionSelectedFontWeight:e.fontWeightStrong,optionPadding:`${t}px ${e.paddingSM}px`,menuPadding:e.paddingXXS,optionSelectedColor:e.colorText}},qB=Xl(`Cascader`,GB,KB,{resetFont:!1,unitless:{optionSelectedFontWeight:!0}}),JB=Zl([`Cascader`,`Panel`],e=>{let{componentCls:t}=e;return{[`${t}-panel`]:[WB(e),{display:`inline-flex`,border:`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,borderRadius:e.borderRadiusLG,overflowX:`auto`,maxWidth:`100%`,[`${t}-menus`]:{alignItems:`stretch`},[`${t}-menu`]:{height:`auto`},"&-empty":{padding:e.paddingXXS}}]}},KB,{resetFont:!1});function YB(e){let{prefixCls:t,className:n,multiple:r,rootClassName:i,notFoundContent:a,direction:o,expandIcon:s,loadingIcon:c,disabled:l}=e,{expandIcon:u,loadingIcon:d}=_a(`cascader`),f=S.useContext(pm),p=l??f,[m,h,g,_]=FB(t,o),v=ap(h),[y,b]=qB(h,v);JB(h);let{expandIcon:x,loadingIcon:C}=BB({contextExpandIcon:u,contextLoadingIcon:d,expandIcon:s,loadingIcon:c,isRtl:g===`rtl`}),w=a||_?.(`Cascader`)||S.createElement(PC,{componentName:`Cascader`}),T=IB(h,r);return S.createElement(jB,{...e,checkable:T,prefixCls:h,className:Y(n,y,i,b,v),notFoundContent:w,direction:g,expandIcon:x,loadingIcon:C,disabled:p})}var{SHOW_CHILD:XB,SHOW_PARENT:ZB}=PB,QB=(e,t,n)=>{let r=e.toLowerCase().split(t).reduce((e,n,r)=>r===0?[n]:[].concat(da(e),[t,n]),[]),i=[],a=0;return r.forEach((t,r)=>{let o=a+t.length,s=e.slice(a,o);a=o,r%2==1&&(s=S.createElement(`span`,{className:`${n}-menu-item-keyword`,key:`separator-${r}`},s)),i.push(s)}),i},$B=(e,t,n,r)=>{let i=[],a=e.toLowerCase();return t.forEach((e,t)=>{t!==0&&i.push(` / `);let o=e[r.label],s=typeof o;(s===`string`||s===`number`)&&(o=QB(String(o),a,n)),i.push(o)}),i},eV=S.forwardRef((e,t)=>{let{prefixCls:n,size:r,disabled:i,className:a,rootClassName:o,multiple:s,bordered:c=!0,transitionName:l,choiceTransitionName:u=``,popupClassName:d,expandIcon:f,placement:p,showSearch:m,allowClear:h=!0,notFoundContent:g,direction:_,getPopupContainer:v,status:y,showArrow:b,builtinPlacements:x,style:C,variant:w,dropdownClassName:T,dropdownRender:E,onDropdownVisibleChange:D,onPopupVisibleChange:O,dropdownMenuColumnStyle:k,popupRender:A,dropdownStyle:j,popupMenuColumnStyle:M,onOpenChange:N,styles:P,classNames:F,loadingIcon:I,...L}=e,R=hi(L,[`suffixIcon`]),{getPrefixCls:z,getPopupContainer:B,className:V,style:H,classNames:U,styles:ee,expandIcon:te,loadingIcon:ne}=_a(`cascader`),{popupOverflow:W}=S.useContext(ma),{status:re,hasFeedback:G,isFormItemInput:K,feedbackIcon:q}=S.useContext(Fy),ie=EC(re,y),[J,ae,oe,se]=FB(n,_),ce=oe===`rtl`,le=z(),ue=ap(J),[de,fe]=YC(J,ue),pe=ap(ae);qB(ae,pe);let{compactSize:me,compactItemClassnames:he}=jh(J,_),[ge,_e]=FC(`cascader`,w,c),ve=g||se?.(`Cascader`)||S.createElement(PC,{componentName:`Cascader`}),ye=ow(A||E),be=M||k,xe=N||O||D,Se=S.useMemo(()=>{if(!m)return m;let e={render:$B};return ef(m)&&(e={...e,...m}),e},[m]),Ce=Oh(e=>r??me??e),we=S.useContext(pm),Te=i??we,{expandIcon:Ee,loadingIcon:De}=BB({contextExpandIcon:te,contextLoadingIcon:ne,expandIcon:f,loadingIcon:I,isRtl:ce}),Oe=IB(ae,s),ke=sw(e.suffixIcon,b),{suffixIcon:Ae,removeIcon:je,clearIcon:Me}=aw({...e,loadingIcon:De,hasFeedback:G,feedbackIcon:q,showSuffixIcon:ke,multiple:s,prefixCls:J,componentName:`Cascader`}),Ne=S.useMemo(()=>p===void 0?ce?`bottomRight`:`bottomLeft`:p,[p,ce]),Pe=h===!0?{clearIcon:Me}:h,Fe={...e,variant:ge,size:Ce,status:ie,disabled:Te},[Ie,Le]=xf([U,F],[ee,P],{props:Fe},{popup:{_default:`root`}}),Re={...Le.popup?.root,...j},[ze]=Ff(`SelectLike`,Re?.zIndex),Be=Y(d||T,`${ae}-dropdown`,{[`${ae}-dropdown-rtl`]:oe===`rtl`},o,ue,Ie.popup?.root,pe,de,fe);return S.createElement(PB,{prefixCls:J,className:Y(!n&&ae,{[`${J}-lg`]:Ce===`large`,[`${J}-sm`]:Ce===`small`,[`${J}-rtl`]:ce,[`${J}-${ge}`]:_e,[`${J}-in-form-item`]:K},TC(J,ie,G),he,V,a,o,Ie.root,ue,pe,de,fe),disabled:Te,style:{...Le.root,...H,...C},classNames:Ie,styles:Le,...R,builtinPlacements:LC(x,W),direction:oe,placement:Ne,notFoundContent:ve,allowClear:Pe,showSearch:Se,expandIcon:Ee,suffixIcon:Ae,removeIcon:je,loadingIcon:De,checkable:Oe,popupClassName:Be,popupPrefixCls:n||ae,popupStyle:{...Re,zIndex:ze},popupRender:ye,popupMenuColumnStyle:be,onPopupVisibleChange:xe,choiceTransitionName:vh(le,``,u),transitionName:vh(le,`slide-up`,l),getPopupContainer:v||B,ref:t})}),tV=Ex(eV,`popupAlign`,e=>hi(e,[`visible`]));eV.SHOW_PARENT=ZB,eV.SHOW_CHILD=XB,eV.Panel=YB,eV._InternalPanelDoNotUseOrYouWillBeFired=tV;var nV=S.createContext(null),rV=S.forwardRef((e,t)=>{let{prefixCls:n,children:r,indeterminate:i=!1,onMouseEnter:a,onMouseLeave:o,skipGroup:s=!1,disabled:c,rootClassName:l,className:u,style:d,classNames:f,styles:p,name:m,value:h,checked:g,defaultChecked:_,onChange:v,...y}=e,{getPrefixCls:b,direction:x,className:C,style:w,classNames:T,styles:E}=_a(`checkbox`),D=S.useContext(nV),{isFormItemInput:O}=S.useContext(Fy),k=S.useContext(pm),A=(D?.disabled||c)??k,[j,M]=Wn(_,g),N=j,P=Rn(e=>{M(e.target.checked),v?.(e),!s&&D?.toggleOption&&D.toggleOption({label:r,value:h})});D&&!s&&(N=D.value.includes(h));let F=S.useRef(null),I=cr(t,F);S.useEffect(()=>{if(!(s||!D))return D.registerValue(h),()=>{D.cancelValue(h)}},[h,s]),S.useEffect(()=>{F.current?.input&&(F.current.input.indeterminate=i)},[i]);let L=b(`checkbox`,n),R=ap(L),[z,B]=UB(L,R),V={...y},H={...e,indeterminate:i,disabled:A,checked:N},[U,ee]=xf([T,f],[E,p],{props:H}),te=Y(`${L}-wrapper`,{[`${L}-rtl`]:x===`rtl`,[`${L}-wrapper-checked`]:N,[`${L}-wrapper-disabled`]:A,[`${L}-wrapper-in-form-item`]:O},C,u,U.root,l,B,R,z),ne=Y(U.icon,{[`${L}-indeterminate`]:i},bh,z),[W,re]=PL(V.onClick);return S.createElement(Dh,{component:`Checkbox`,disabled:A},S.createElement(`label`,{className:te,style:{...ee.root,...w,...d},onMouseEnter:a,onMouseLeave:o,onClick:W},S.createElement(NL,{...V,name:!s&&D?D.name:m,checked:N,onClick:re,onChange:P,prefixCls:L,className:ne,style:ee.icon,disabled:A,ref:I,value:h}),Zd(r)&&S.createElement(`span`,{className:Y(`${L}-label`,U.label),style:ee.label},r)))}),iV=S.forwardRef((e,t)=>{let{defaultValue:n,children:r,options:i=[],prefixCls:a,className:o,rootClassName:s,style:c,onChange:l,role:u=`group`,...d}=e,{getPrefixCls:f,direction:p}=S.useContext(ma),[m,h]=S.useState(d.value||n||[]),[g,_]=S.useState([]);S.useEffect(()=>{`value`in d&&h(d.value||[])},[d.value]);let v=S.useMemo(()=>i.map(e=>typeof e==`string`||Qd(e)?{label:e,value:e}:e),[i]),y=e=>{_(t=>t.filter(t=>t!==e))},b=e=>{_(t=>[].concat(da(t),[e]))},x=e=>{let t=m.indexOf(e.value),n=da(m);t===-1?n.push(e.value):n.splice(t,1),`value`in d||h(n),l?.(n.filter(e=>g.includes(e)).sort((e,t)=>v.findIndex(t=>t.value===e)-v.findIndex(e=>e.value===t)))},C=f(`checkbox`,a),w=`${C}-group`,T=ap(C),[E,D]=UB(C,T),O=hi(d,[`value`,`disabled`]),k=i.length?v.map(e=>S.createElement(rV,{prefixCls:C,key:e.value.toString(),disabled:`disabled`in e?e.disabled:d.disabled,value:e.value,checked:m.includes(e.value),onChange:e.onChange,className:Y(`${w}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):r,A=S.useMemo(()=>({toggleOption:x,value:m,disabled:d.disabled,name:d.name,registerValue:b,cancelValue:y}),[x,m,d.disabled,d.name,b,y]),j=Y(w,{[`${w}-rtl`]:p===`rtl`},o,s,D,T,E);return S.createElement(`div`,{className:j,style:c,role:u,...O,ref:t},S.createElement(nV.Provider,{value:A},k))}),aV=rV;aV.Group=iV,aV.__ANT_CHECKBOX=!0;var oV=(0,S.createContext)({});function sV(e){return e===`auto`?`1 1 auto`:Qd(e)?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}var cV=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=S.useContext(ma),{gutter:i,wrap:a}=S.useContext(oV),{prefixCls:o,span:s,order:c,offset:l,push:u,pull:d,className:f,children:p,flex:m,style:h,...g}=e,_=n(`col`,o),v=n(),[y,b]=gb(_),[x]=$l(v,`col`),C={},w={};fw.forEach(t=>{let n={},i=e[t];Qd(i)?n.span=i:ef(i)&&(n=i||{}),delete g[t],w={...w,[`${_}-${t}-${n.span}`]:Zd(n.span),[`${_}-${t}-order-${n.order}`]:n.order||n.order===0,[`${_}-${t}-offset-${n.offset}`]:n.offset||n.offset===0,[`${_}-${t}-push-${n.push}`]:n.push||n.push===0,[`${_}-${t}-pull-${n.pull}`]:n.pull||n.pull===0,[`${_}-rtl`]:r===`rtl`},n.flex&&(w[`${_}-${t}-flex`]=!0,C[x(`${t}-flex`)]=sV(n.flex))});let T=Y(_,{[`${_}-${s}`]:s!==void 0,[`${_}-order-${c}`]:c,[`${_}-offset-${l}`]:l,[`${_}-push-${u}`]:u,[`${_}-pull-${d}`]:d},f,w,y,b),E={};return i?.[0]&&(E.paddingInline=Qd(i[0])?`${i[0]/2}px`:`calc(${i[0]} / 2)`),m&&(E.flex=sV(m),a===!1&&!E.minWidth&&(E.minWidth=0)),S.createElement(`div`,{...g,style:{...E,...h,...C},className:T,ref:t},p)});function lV(e,t){let n=[void 0,void 0],r=Array.isArray(e)?e:[e,void 0],i=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0};return r.forEach((e,t)=>{if(ef(e))for(let r=0;r{let[n,r]=S.useState(()=>$d(e)?e:``),i=()=>{if($d(e)&&r(e),ef(e))for(let n=0;n{i()},[JSON.stringify(e),t]),n},dV=S.forwardRef((e,t)=>{let{prefixCls:n,justify:r,align:i,className:a,style:o,children:s,gutter:c=0,wrap:l,...u}=e,{getPrefixCls:d,direction:f}=S.useContext(ma),p=_w(!0,null),m=uV(i,p),h=uV(r,p),g=d(`row`,n),[_,v]=mb(g),y=lV(c,p),b=Y(g,{[`${g}-no-wrap`]:l===!1,[`${g}-${h}`]:h,[`${g}-${m}`]:m,[`${g}-rtl`]:f===`rtl`},a,_,v),x={};y?.[0]&&(x.marginInline=Qd(y[0])?`${y[0]/-2}px`:`calc(${y[0]} / -2)`);let[C,w]=y;x.rowGap=w;let T=S.useMemo(()=>({gutter:[C,w],wrap:l}),[C,w,l]);return S.createElement(oV.Provider,{value:T},S.createElement(`div`,{...u,className:b,style:{...x,...o},ref:t},s))}),fV=cV,pV=e=>{let{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:a,fontSizeLG:o,fontSizeSM:s,borderRadiusLG:c,borderRadiusSM:l,colorBgContainerDisabled:u,lineWidth:d,antCls:f}=e,[p,m]=$l(f,`space`);return{[t]:[{display:`inline-flex`,alignItems:`center`,gap:0,whiteSpace:`nowrap`,paddingInline:r,margin:0,borderWidth:d,borderStyle:`solid`,borderRadius:n,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:o,borderRadius:c},"&-small":{paddingInline:a,borderRadius:l,fontSize:s},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[p(`addon-border-color`)]:i,[p(`addon-background`)]:u,[p(`addon-border-color-outlined`)]:i,[p(`addon-background-filled`)]:u,borderColor:m(`addon-border-color`),background:m(`addon-background`),"&-variant-outlined":{[p(`addon-border-color`)]:m(`addon-border-color-outlined`)},"&-variant-filled":{[p(`addon-border-color`)]:`transparent`,[p(`addon-background`)]:m(`addon-background-filled`),[`&${t}-disabled`]:{[p(`addon-border-color`)]:i,[p(`addon-background`)]:u}},"&-variant-borderless":{border:`none`,background:`transparent`},"&-variant-underlined":{border:`none`,background:`transparent`}},{"&-status-error":{[p(`addon-border-color-outlined`)]:e.colorError,[p(`addon-background-filled`)]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[p(`addon-border-color-outlined`)]:e.colorWarning,[p(`addon-background-filled`)]:e.colorWarningBg,color:e.colorWarning}}]}},mV=Xl([`Space`,`Addon`],e=>[pV(e),v_(e,{focus:!1})]),hV=S.forwardRef((e,t)=>{let{className:n,children:r,style:i,prefixCls:a,variant:o=`outlined`,disabled:s,status:c,...l}=e,{getPrefixCls:u,direction:d}=S.useContext(ma),f=u(`space-addon`,a),[p,m]=mV(f),{compactItemClassnames:h,compactSize:g}=jh(f,d),_=TC(f,c),v=Y(f,p,h,m,`${f}-variant-${o}`,_,{[`${f}-${g}`]:g,[`${f}-disabled`]:s},n);return S.createElement(`div`,{ref:t,className:v,style:i,...l},r)});function gV(e){return!!(e.addonBefore||e.addonAfter)}function _V(e){return!!(e.prefix||e.suffix||e.allowClear)}function vV(e,t,n){let r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart==`number`&&typeof t.selectionEnd==`number`&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=(...e)=>{t.setSelectionRange(...e)},i}function yV(e,t,n,r){if(!n)return;let i=t;if(t.type===`click`){i=vV(t,e,``),n(i);return}if(e.type!==`file`&&r!==void 0){i=vV(t,e,r),n(i);return}n(i)}function bV(){return bV=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{inputElement:n,children:r,prefixCls:i,prefix:a,suffix:o,addonBefore:s,addonAfter:c,className:l,style:u,disabled:d,readOnly:f,focused:p,triggerFocus:m,allowClear:h,value:g,handleReset:_,hidden:v,classes:y,classNames:b,dataAttrs:x,styles:C,components:w,onClear:T}=e,E=r??n,D=w?.affixWrapper||`span`,O=w?.groupWrapper||`span`,k=w?.wrapper||`span`,A=w?.groupAddon||`span`,j=(0,S.useRef)(null),M=e=>{j.current?.contains(e.target)&&m?.()},N=_V(e),P=(0,S.cloneElement)(E,{value:g,className:Y(E.props?.className,!N&&b?.variant)||null}),F=(0,S.useRef)(null);if(S.useImperativeHandle(t,()=>({nativeElement:F.current||j.current})),N){let e=null;if(h){let t=!d&&!f&&g,n=`${i}-clear-icon`,r=typeof h==`object`&&h?.clearIcon?h.clearIcon:`✖`;e=S.createElement(`button`,{type:`button`,tabIndex:-1,onClick:e=>{_?.(e),T?.()},onMouseDown:e=>e.preventDefault(),className:Y(n,{[`${n}-hidden`]:!t,[`${n}-has-suffix`]:!!o})},r)}let t=`${i}-affix-wrapper`,n=Y(t,{[`${i}-disabled`]:d,[`${t}-disabled`]:d,[`${t}-focused`]:p,[`${t}-readonly`]:f,[`${t}-input-with-clear-btn`]:o&&h&&g},y?.affixWrapper,b?.affixWrapper,b?.variant),r=(o||h)&&S.createElement(`span`,{className:Y(`${i}-suffix`,b?.suffix),style:C?.suffix},e,o);P=S.createElement(D,bV({className:n,style:C?.affixWrapper,onClick:M},x?.affixWrapper,{ref:j}),a&&S.createElement(`span`,{className:Y(`${i}-prefix`,b?.prefix),style:C?.prefix},a),P,r)}if(gV(e)){let e=`${i}-group`,t=`${e}-addon`,n=`${e}-wrapper`,r=Y(`${i}-wrapper`,e,y?.wrapper,b?.wrapper),a=Y(n,{[`${n}-disabled`]:d},y?.group,b?.groupWrapper);P=S.createElement(O,{className:a,ref:F},S.createElement(k,{className:r},s&&S.createElement(A,{className:t},s),P,c&&S.createElement(A,{className:t},c)))}return S.cloneElement(P,{className:Y(P.props?.className,l)||null,style:{...P.props?.style,...u},hidden:v})});function SV(e,t){return S.useMemo(()=>{let n={};t&&(n.show=typeof t==`object`&&t.formatter?t.formatter:!!t),n={...n,...e};let{show:r,...i}=n;return{...i,show:!!r,showFormatter:typeof r==`function`?r:void 0,strategy:i.strategy||(e=>e.length)}},[e,t])}function CV(){return CV=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{autoComplete:n,onChange:r,onFocus:i,onBlur:a,onPressEnter:o,onKeyDown:s,onKeyUp:c,prefixCls:l=`rc-input`,disabled:u,htmlSize:d,className:f,maxLength:p,suffix:m,showCount:h,count:g,type:_=`text`,classes:v,classNames:y,styles:b,onCompositionStart:x,onCompositionEnd:C,...w}=e,[T,E]=(0,S.useState)(!1),D=(0,S.useRef)(!1),O=(0,S.useRef)(!1),k=(0,S.useRef)(null),A=(0,S.useRef)(null),j=e=>{k.current&&Mr(k.current,e)},[M,N]=Wn(e.defaultValue,e.value),P=M==null?``:String(M),[F,I]=(0,S.useState)(null),L=SV(g,h),R=L.max||p,z=L.strategy(P),B=!!R&&z>R;(0,S.useImperativeHandle)(t,()=>({focus:j,blur:()=>{k.current?.blur()},setSelectionRange:(e,t,n)=>{k.current?.setSelectionRange(e,t,n)},select:()=>{k.current?.select()},input:k.current,nativeElement:A.current?.nativeElement||k.current})),(0,S.useEffect)(()=>{O.current&&=!1,E(e=>e&&u?!1:e)},[u]);let V=(e,t,n)=>{let i=t;if(!D.current&&L.exceedFormatter&&L.max&&L.strategy(t)>L.max)i=L.exceedFormatter(t,{max:L.max}),t!==i&&I([k.current?.selectionStart||0,k.current?.selectionEnd||0]);else if(n.source===`compositionEnd`)return;N(i),k.current&&yV(k.current,e,r,i)};(0,S.useEffect)(()=>{F&&k.current?.setSelectionRange(...F)},[F]);let H=e=>{V(e,e.target.value,{source:`change`})},U=e=>{D.current=!1,V(e,e.currentTarget.value,{source:`compositionEnd`}),C?.(e)},ee=e=>{o&&e.key===`Enter`&&!O.current&&!e.nativeEvent.isComposing&&(O.current=!0,o(e)),s?.(e)},te=e=>{e.key===`Enter`&&(O.current=!1),c?.(e)},ne=e=>{E(!0),i?.(e)},W=e=>{O.current&&=!1,E(!1),a?.(e)},re=e=>{N(``),j(),k.current&&yV(k.current,e,r)},G=B&&`${l}-out-of-range`;return S.createElement(xV,CV({},w,{prefixCls:l,className:Y(f,G),handleReset:re,value:P,focused:T,triggerFocus:j,suffix:(()=>{let e=Number(R)>0;if(m||L.show){let t=L.showFormatter?L.showFormatter({value:P,count:z,maxLength:R}):`${z}${e?` / ${R}`:``}`;return S.createElement(S.Fragment,null,L.show&&S.createElement(`span`,{className:Y(`${l}-show-count-suffix`,{[`${l}-show-count-has-suffix`]:!!m},y?.count),style:{...b?.count}},t),m)}return null})(),disabled:u,classes:v,classNames:y,styles:b,ref:A}),(()=>{let t=hi(e,[`prefixCls`,`onPressEnter`,`addonBefore`,`addonAfter`,`prefix`,`suffix`,`allowClear`,`defaultValue`,`showCount`,`count`,`classes`,`htmlSize`,`styles`,`classNames`,`onClear`]);return S.createElement(`input`,CV({autoComplete:n},t,{onChange:H,onFocus:ne,onBlur:W,onKeyDown:ee,onKeyUp:te,className:Y(l,{[`${l}-disabled`]:u},y?.input),style:b?.input,ref:k,size:d,type:_,onCompositionStart:e=>{D.current=!0,x?.(e)},onCompositionEnd:U}))})())}),TV=e=>{let t;return ef(e)&&e?.clearIcon?t=e:e&&(t={clearIcon:S.createElement(Eu,null)}),t};function EV(e,t){let n=(0,S.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute(`type`)===`password`&&e.current?.input.hasAttribute(`value`)&&e.current?.input.removeAttribute(`value`)}))};return(0,S.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[]),r}function DV(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var OV=(0,S.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,status:i,size:a,disabled:o,onBlur:s,onFocus:c,suffix:l,allowClear:u,addonAfter:d,addonBefore:f,className:p,style:m,styles:h,rootClassName:g,onChange:_,classNames:v,variant:y,...b}=e,{getPrefixCls:x,direction:C,allowClear:w,autoComplete:T,className:E,style:D,classNames:O,styles:k}=_a(`input`),A=x(`input`,n),j=(0,S.useRef)(null),M=ap(A),[N,P]=rR(A,g);iR(A,M);let{compactSize:F,compactItemClassnames:I}=jh(A,C),L=Oh(e=>a??F??e),R=S.useContext(pm),z=o??R,B={...e,size:L,disabled:z},[V,H]=xf([O,v],[k,h],{props:B}),{status:U,hasFeedback:ee,feedbackIcon:te}=(0,S.useContext)(Fy),ne=EC(U,i);(0,S.useRef)(DV(e)||!!ee);let W=EV(j,!0),re=e=>{W(),s?.(e)},G=e=>{W(),c?.(e)},K=e=>{W(),_?.(e)},q=(ee||l)&&S.createElement(S.Fragment,null,l,ee&&te),ie=TV(u??w),[J,ae]=FC(`input`,y,r);return S.createElement(wV,{ref:sr(t,j),prefixCls:A,autoComplete:T,...b,disabled:z,onBlur:re,onFocus:G,style:{...H.root,...D,...m},styles:H,suffix:q,allowClear:ie,className:Y(p,g,P,M,I,E,V.root),onChange:K,addonBefore:f&&S.createElement(Ry,{form:!0,space:!0},f),addonAfter:d&&S.createElement(Ry,{form:!0,space:!0},d),classNames:{...V,input:Y({[`${A}-sm`]:L===`small`,[`${A}-lg`]:L===`large`,[`${A}-rtl`]:C===`rtl`},V.input,N),variant:Y({[`${A}-${J}`]:ae},TC(A,ne)),affixWrapper:Y({[`${A}-affix-wrapper-sm`]:L===`small`,[`${A}-affix-wrapper-lg`]:L===`large`,[`${A}-affix-wrapper-rtl`]:C===`rtl`},N),wrapper:Y({[`${A}-group-rtl`]:C===`rtl`},N),groupWrapper:Y({[`${A}-group-wrapper-sm`]:L===`small`,[`${A}-group-wrapper-lg`]:L===`large`,[`${A}-group-wrapper-rtl`]:C===`rtl`,[`${A}-group-wrapper-${J}`]:ae},TC(`${A}-group-wrapper`,ne,ee),N)}})});function kV(e,t,n){return(e-t)/(n-t)}function AV(e,t,n,r){let i=kV(t,n,r),a={};switch(e){case`rtl`:a.right=`${i*100}%`,a.transform=`translateX(50%)`;break;case`btt`:a.bottom=`${i*100}%`,a.transform=`translateY(50%)`;break;case`ttb`:a.top=`${i*100}%`,a.transform=`translateY(-50%)`;break;default:a.left=`${i*100}%`,a.transform=`translateX(-50%)`;break}return a}function jV(e,t){return Array.isArray(e)?e[t]:e}var MV=S.createContext({min:0,max:0,direction:`ltr`,step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),NV=S.createContext({});function PV(){return PV=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,value:r,valueIndex:i,onStartMove:a,onDelete:o,style:s,render:c,dragging:l,draggingDelete:u,onOffsetChange:d,onChangeComplete:f,onFocus:p,onMouseEnter:m,...h}=e,{min:g,max:_,direction:v,disabled:y,keyboard:b,range:x,tabIndex:C,ariaLabelForHandle:w,ariaLabelledByForHandle:T,ariaRequired:E,ariaValueTextFormatterForHandle:D,styles:O,classNames:k}=S.useContext(MV),A=`${n}-handle`,j=e=>{y||a(e,i)},M=e=>{p?.(e,i)},N=e=>{m(e,i)},P=e=>{if(!y&&b){let t=null;switch(e.which||e.keyCode){case Zr.LEFT:t=v===`ltr`||v===`btt`?-1:1;break;case Zr.RIGHT:t=v===`ltr`||v===`btt`?1:-1;break;case Zr.UP:t=v===`ttb`?-1:1;break;case Zr.DOWN:t=v===`ttb`?1:-1;break;case Zr.HOME:t=`min`;break;case Zr.END:t=`max`;break;case Zr.PAGE_UP:t=2;break;case Zr.PAGE_DOWN:t=-2;break;case Zr.BACKSPACE:case Zr.DELETE:o?.(i);break}t!==null&&(e.preventDefault(),d(t,i))}},F=e=>{switch(e.which||e.keyCode){case Zr.LEFT:case Zr.RIGHT:case Zr.UP:case Zr.DOWN:case Zr.HOME:case Zr.END:case Zr.PAGE_UP:case Zr.PAGE_DOWN:f?.();break}},I=AV(v,r,g,_),L={};i!==null&&(L={tabIndex:y?null:jV(C,i),role:`slider`,"aria-valuemin":g,"aria-valuemax":_,"aria-valuenow":r,"aria-disabled":y,"aria-label":jV(w,i),"aria-labelledby":jV(T,i),"aria-required":jV(E,i),"aria-valuetext":jV(D,i)?.(r),"aria-orientation":v===`ltr`||v===`rtl`?`horizontal`:`vertical`,onMouseDown:j,onTouchStart:j,onFocus:M,onMouseEnter:N,onKeyDown:P,onKeyUp:F});let R=S.createElement(`div`,PV({ref:t,className:Y(A,{[`${A}-${i+1}`]:i!==null&&x,[`${A}-dragging`]:l,[`${A}-dragging-delete`]:u},k.handle),style:{...I,...s,...O.handle}},L,h));return c&&(R=c(R,{index:i,prefixCls:n,value:r,dragging:l,draggingDelete:u})),R});function IV(){return IV=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,style:r,onStartMove:i,onOffsetChange:a,values:o,handleRender:s,activeHandleRender:c,draggingIndex:l,draggingDelete:u,onFocus:d,...f}=e,p=S.useRef({}),[m,h]=S.useState(!1),[g,_]=S.useState(-1),v=e=>{_(e),h(!0)},y=(e,t)=>{v(t),d?.(e)},b=(e,t)=>{v(t)};S.useImperativeHandle(t,()=>({focus:e=>{p.current[e]?.focus()},hideHelp:()=>{(0,zi.flushSync)(()=>{h(!1)})}}));let x={prefixCls:n,onStartMove:i,onOffsetChange:a,render:s,onFocus:y,onMouseEnter:b,...f};return S.createElement(S.Fragment,null,o.map((e,t)=>{let n=l===t;return S.createElement(FV,IV({ref:e=>{e?p.current[t]=e:delete p.current[t]},dragging:n,draggingDelete:n&&u,style:jV(r,t),key:t,value:e,valueIndex:t},x))}),c&&m&&S.createElement(FV,IV({key:`a11y`},x,{value:o[g],valueIndex:null,dragging:l!==-1,draggingDelete:u,render:c,style:{pointerEvents:`none`},tabIndex:null,"aria-hidden":!0})))}),RV=e=>{let{prefixCls:t,style:n,children:r,value:i,onClick:a}=e,{min:o,max:s,direction:c,includedStart:l,includedEnd:u,included:d}=S.useContext(MV),f=`${t}-text`,p=AV(c,i,o,s);return S.createElement(`span`,{className:Y(f,{[`${f}-active`]:d&&l<=i&&i<=u}),style:{...p,...n},onMouseDown:e=>{e.stopPropagation()},onClick:()=>{a(i)}},r)},zV=e=>{let{prefixCls:t,marks:n,onClick:r}=e,i=`${t}-mark`;return n.length?S.createElement(`div`,{className:i},n.map(({value:e,style:t,label:n})=>S.createElement(RV,{key:e,prefixCls:i,style:t,value:e,onClick:r},n))):null},BV=e=>{let{prefixCls:t,value:n,style:r,activeStyle:i}=e,{min:a,max:o,direction:s,included:c,includedStart:l,includedEnd:u}=S.useContext(MV),d=`${t}-dot`,f=c&&l<=n&&n<=u,p={...AV(s,n,a,o),...typeof r==`function`?r(n):r};return f&&(p={...p,...typeof i==`function`?i(n):i}),S.createElement(`span`,{className:Y(d,{[`${d}-active`]:f}),style:p})},VV=e=>{let{prefixCls:t,marks:n,dots:r,style:i,activeStyle:a}=e,{min:o,max:s,step:c}=S.useContext(MV),l=S.useMemo(()=>{let e=new Set;if(n.forEach(t=>{e.add(t.value)}),r&&c!==null){let t=o;for(;t<=s;)e.add(t),t+=c}return Array.from(e)},[o,s,c,r,n]);return S.createElement(`div`,{className:`${t}-step`},l.map(e=>S.createElement(BV,{prefixCls:t,key:e,value:e,style:i,activeStyle:a})))},HV=e=>{let{prefixCls:t,style:n,start:r,end:i,index:a,onStartMove:o,replaceCls:s}=e,{direction:c,min:l,max:u,disabled:d,range:f,classNames:p}=S.useContext(MV),m=`${t}-track`,h=kV(r,l,u),g=kV(i,l,u),_=e=>{!d&&o&&o(e,-1)},v={};switch(c){case`rtl`:v.right=`${h*100}%`,v.width=`${g*100-h*100}%`;break;case`btt`:v.bottom=`${h*100}%`,v.height=`${g*100-h*100}%`;break;case`ttb`:v.top=`${h*100}%`,v.height=`${g*100-h*100}%`;break;default:v.left=`${h*100}%`,v.width=`${g*100-h*100}%`}let y=s||Y(m,{[`${m}-${a+1}`]:a!==null&&f,[`${t}-track-draggable`]:o},p.track);return S.createElement(`div`,{className:y,style:{...v,...n},onMouseDown:_,onTouchStart:_})},UV=e=>{let{prefixCls:t,style:n,values:r,startPoint:i,onStartMove:a}=e,{included:o,range:s,min:c,styles:l,classNames:u}=S.useContext(MV),d=S.useMemo(()=>{if(!s){if(r.length===0)return[];let e=i??c,t=r[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}let e=[];for(let t=0;tS.createElement(HV,{index:i,prefixCls:t,style:{...jV(n,i),...l.track},start:e,end:r,key:i,onStartMove:a})))},WV=130;function GV(e){let t=`targetTouches`in e?e.targetTouches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function KV(e,t,n,r,i,a,o,s,c,l,u){let[d,f]=S.useState(null),[p,m]=S.useState(-1),[h,g]=S.useState(!1),[_,v]=S.useState(n),[y,b]=S.useState(n),x=S.useRef(null),C=S.useRef(null),w=S.useRef(null),{onDragStart:T,onDragChange:E}=S.useContext(NV);Vn(()=>{p===-1&&v(n)},[n,p]),S.useEffect(()=>()=>{document.removeEventListener(`mousemove`,x.current),document.removeEventListener(`mouseup`,C.current),w.current&&(w.current.removeEventListener(`touchmove`,x.current),w.current.removeEventListener(`touchend`,C.current))},[]);let D=(e,t,n)=>{t!==void 0&&f(t),v(e);let r=e;n&&(r=e.filter((e,t)=>t!==p)),o(r),E&&E({rawValues:e,deleteIndex:n?p:-1,draggingIndex:p,draggingValue:t})},O=Rn((e,t,n)=>{if(e===-1){let e=y[0],n=y[y.length-1],o=r-e,s=i-n,c=t*(i-r);c=Math.max(c,o),c=Math.min(c,s),c=a(e+c)-e,D(y.map(e=>e+c))}else{let a=(i-r)*t,o=[..._];o[e]=y[e];let s=c(o,a,e,`dist`);D(s.values,s.value,n)}});return[p,d,h,S.useMemo(()=>{let e=[...n].sort((e,t)=>e-t),t=[..._].sort((e,t)=>e-t),r={};t.forEach(e=>{r[e]=(r[e]||0)+1}),e.forEach(e=>{r[e]=(r[e]||0)-1});let i=+!!l;return Object.values(r).reduce((e,t)=>e+Math.abs(t),0)<=i?_:n},[n,_,l]),(r,i,a)=>{r.stopPropagation();let o=a||n,c=o[i];m(i),f(c),b(o),v(o),g(!1);let{pageX:d,pageY:p}=GV(r),h=!1;T&&T({rawValues:o,draggingIndex:i,draggingValue:c});let y=n=>{n.preventDefault();let{pageX:r,pageY:a}=GV(n),o=r-d,s=a-p,{width:c,height:f}=e.current.getBoundingClientRect(),m,v;switch(t){case`btt`:m=-s/f,v=o;break;case`ttb`:m=s/f,v=o;break;case`rtl`:m=-o/c,v=s;break;default:m=o/c,v=s}h=l?Math.abs(v)>WV&&u<_.length:!1,g(h),O(i,m,h)},S=e=>{e.preventDefault(),document.removeEventListener(`mouseup`,S),document.removeEventListener(`mousemove`,y),w.current&&(w.current.removeEventListener(`touchmove`,x.current),w.current.removeEventListener(`touchend`,C.current)),x.current=null,C.current=null,w.current=null,s(h),m(-1),g(!1)};document.addEventListener(`mouseup`,S),document.addEventListener(`mousemove`,y),r.currentTarget.addEventListener(`touchend`,S),r.currentTarget.addEventListener(`touchmove`,y),x.current=y,C.current=S,w.current=r.currentTarget}]}function qV(e,t,n,r,i,a){let o=S.useCallback(n=>Math.max(e,Math.min(t,n)),[e,t]),s=S.useCallback(r=>{if(n!==null){let i=e+Math.round((o(r)-e)/n)*n,a=e=>(String(e).split(`.`)[1]||``).length,s=Math.max(a(n),a(t),a(e)),c=Number(i.toFixed(s));return e<=c&&c<=t?c:null}return null},[n,e,t,o]),c=S.useCallback(i=>{let a=o(i),c=r.map(e=>e.value);n!==null&&c.push(s(i)),c.push(e,t);let l=c[0],u=t-e;return c.forEach(e=>{let t=Math.abs(a-e);t<=u&&(l=e,u=t)}),l},[e,t,r,n,o,s]),l=(i,a,o,c=`unit`)=>{if(typeof a==`number`){let u,d=i[o],f=d+a,p=[];r.forEach(e=>{p.push(e.value)}),p.push(e,t),p.push(s(d));let m=a>0?1:-1;c===`unit`?p.push(s(d+m*n)):p.push(s(f)),p=p.filter(e=>e!==null).filter(e=>a<0?e<=d:e>=d),c===`unit`&&(p=p.filter(e=>e!==d));let h=c===`unit`?d:f;u=p[0];let g=Math.abs(u-h);if(p.forEach(e=>{let t=Math.abs(e-h);t1){let e=[...i];return e[o]=u,l(e,a-m,o,c)}return u}else if(a===`min`)return e;else if(a===`max`)return t},u=(e,t,n,r=`unit`)=>{let i=e[n],a=l(e,t,n,r);return{value:a,changed:a!==i}},d=e=>a===null&&e===0||typeof a==`number`&&e{let o=e.map(c),s=o[n];if(o[n]=l(o,t,n,r),i===!1){let e=a||0;n>0&&o[n-1]!==s&&(o[n]=Math.max(o[n],o[n-1]+e)),n0;--e){let t=!0;for(;d(o[e]-o[e-1])&&t;)({value:o[e-1],changed:t}=u(o,-1,e-1))}for(let e=o.length-1;e>0;--e){let t=!0;for(;d(o[e]-o[e-1])&&t;)({value:o[e-1],changed:t}=u(o,-1,e-1))}for(let e=0;e{if(e===!0||!e)return[!!e,!1,!1,0];let{editable:t,draggableTrack:n,minCount:r,maxCount:i}=e;return[!0,t,!t&&n,r||0,i]},[e])}var YV=S.forwardRef((e,t)=>{let{prefixCls:n=`rc-slider`,className:r,style:i,classNames:a,styles:o,id:s,disabled:c=!1,keyboard:l=!0,autoFocus:u,onFocus:d,onBlur:f,min:p=0,max:m=100,step:h=1,value:g,defaultValue:_,range:v,count:y,onChange:b,onBeforeChange:x,onAfterChange:C,onChangeComplete:w,allowCross:T=!0,pushable:E=!1,reverse:D,vertical:O,included:k=!0,startPoint:A,trackStyle:j,handleStyle:M,railStyle:N,dotStyle:P,activeDotStyle:F,marks:I,dots:L,handleRender:R,activeHandleRender:z,track:B,tabIndex:V=0,ariaLabelForHandle:H,ariaLabelledByForHandle:U,ariaRequired:ee,ariaValueTextFormatterForHandle:te}=e,ne=S.useRef(null),W=S.useRef(null),re=S.useMemo(()=>O?D?`ttb`:`btt`:D?`rtl`:`ltr`,[D,O]),[G,K,q,ie,J]=JV(v),ae=S.useMemo(()=>isFinite(p)?p:0,[p]),oe=S.useMemo(()=>isFinite(m)?m:100,[m]),se=S.useMemo(()=>h!==null&&h<=0?1:h,[h]),ce=S.useMemo(()=>typeof E==`boolean`?E?se:!1:E>=0?E:!1,[E,se]),le=S.useMemo(()=>Object.keys(I||{}).map(e=>{let t=I[e],n={value:Number(e)};return t&&typeof t==`object`&&!S.isValidElement(t)&&(`label`in t||`style`in t)?(n.style=t.style,n.label=t.label):n.label=t,n}).filter(({label:e})=>e||typeof e==`number`).sort((e,t)=>e.value-t.value),[I]),[ue,de]=qV(ae,oe,se,le,T,ce),[fe,pe]=Wn(_,g),me=S.useMemo(()=>{let e=fe==null?[]:Array.isArray(fe)?fe:[fe],[t=ae]=e,n=fe===null?[]:[t];if(G){if(n=[...e],y||fe===void 0){let e=y>=0?y+1:2;for(n=n.slice(0,e);n.lengthe-t)}return n.forEach((e,t)=>{n[t]=ue(e)}),n},[fe,G,ae,y,ue]),he=e=>G?e:e[0],ge=Rn(e=>{let t=[...e].sort((e,t)=>e-t);b&&!di(t,me,!0)&&b(he(t)),pe(t)}),_e=Rn(e=>{e&&ne.current.hideHelp();let t=he(me);C?.(t),li(!C,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),w?.(t)}),ve=e=>{if(c||!K||me.length<=ie)return;let t=[...me];t.splice(e,1),x?.(he(t)),ge(t);let n=Math.max(0,e-1);ne.current.hideHelp(),ne.current.focus(n)},[ye,be,xe,Se,Ce]=KV(W,re,me,ae,oe,ue,ge,_e,de,K,ie),we=(e,t)=>{if(!c){let n=[...me],r=0,i=0,a=oe-ae;me.forEach((t,n)=>{let o=Math.abs(e-t);o<=a&&(a=o,r=n),t{e.preventDefault();let{width:t,height:n,left:r,top:i,bottom:a,right:o}=W.current.getBoundingClientRect(),{clientX:s,clientY:c}=e,l;switch(re){case`btt`:l=(a-c)/n;break;case`ttb`:l=(c-i)/n;break;case`rtl`:l=(o-s)/t;break;default:l=(s-r)/t}we(ue(ae+l*(oe-ae)),e)},[Ee,De]=S.useState(null),Oe=(e,t)=>{if(!c){let n=de(me,e,t);x?.(he(me)),ge(n.values),De(n.value)}};S.useEffect(()=>{if(Ee!==null){let e=me.indexOf(Ee);e>=0&&ne.current.focus(e)}De(null)},[Ee]);let ke=S.useMemo(()=>q&&se===null?!1:q,[q,se]),Ae=Rn((e,t)=>{Ce(e,t),x?.(he(me))}),je=ye!==-1;S.useEffect(()=>{if(!je){let e=me.lastIndexOf(be);ne.current.focus(e)}},[je]);let Me=S.useMemo(()=>[...Se].sort((e,t)=>e-t),[Se]),[Ne,Pe]=S.useMemo(()=>G?[Me[0],Me[Me.length-1]]:[ae,Me[0]],[Me,G,ae]);S.useImperativeHandle(t,()=>({focus:()=>{ne.current.focus(0)},blur:()=>{let{activeElement:e}=document;W.current?.contains(e)&&e?.blur()}})),S.useEffect(()=>{u&&ne.current.focus(0)},[]);let Fe=S.useMemo(()=>({min:ae,max:oe,direction:re,disabled:c,keyboard:l,step:se,included:k,includedStart:Ne,includedEnd:Pe,range:G,tabIndex:V,ariaLabelForHandle:H,ariaLabelledByForHandle:U,ariaRequired:ee,ariaValueTextFormatterForHandle:te,styles:o||{},classNames:a||{}}),[ae,oe,re,c,l,se,k,Ne,Pe,G,V,H,U,ee,te,o,a]);return S.createElement(MV.Provider,{value:Fe},S.createElement(`div`,{ref:W,className:Y(n,r,{[`${n}-disabled`]:c,[`${n}-vertical`]:O,[`${n}-horizontal`]:!O,[`${n}-with-marks`]:le.length}),style:i,onMouseDown:Te,id:s},S.createElement(`div`,{className:Y(`${n}-rail`,a?.rail),style:{...N,...o?.rail}}),B!==!1&&S.createElement(UV,{prefixCls:n,style:j,values:me,startPoint:A,onStartMove:ke?Ae:void 0}),S.createElement(VV,{prefixCls:n,marks:le,dots:L,style:P,activeStyle:F}),S.createElement(LV,{ref:ne,prefixCls:n,style:M,values:Se,draggingIndex:ye,draggingDelete:xe,onStartMove:Ae,onOffsetChange:Oe,onFocus:d,onBlur:f,handleRender:R,activeHandleRender:z,onChangeComplete:_e,onDelete:K?ve:void 0}),S.createElement(zV,{prefixCls:n,marks:le,onClick:we})))}),XV=(0,S.createContext)({}),ZV=S.forwardRef((e,t)=>{let{open:n,draggingDelete:r,value:i}=e,a=(0,S.useRef)(null),o=n&&!r,s=(0,S.useRef)(null);function c(){Ei.cancel(s.current),s.current=null}function l(){s.current=Ei(()=>{a.current?.forceAlign(),s.current=null})}return S.useEffect(()=>(o?l():c(),c),[o,e.title,i]),S.createElement($w,{ref:sr(a,t),...e,open:o})}),QV=e=>{let{componentCls:t,antCls:n,controlSize:r,dotSize:i,marginFull:a,marginPart:o,colorFillContentHover:s,handleColorDisabled:c,calc:l,handleSize:u,handleSizeHover:d,handleActiveColor:f,handleActiveOutlineColor:p,handleLineWidth:m,handleLineWidthHover:h,motionDurationMid:g}=e;return{[t]:{...Vl(e),position:`relative`,height:r,margin:`${X(o)} ${X(a)}`,padding:0,cursor:`pointer`,touchAction:`none`,"&-vertical":{margin:`${X(a)} ${X(o)}`},[`${t}-rail`]:{position:`absolute`,backgroundColor:e.railBg,borderRadius:e.borderRadiusXS,transition:`background-color ${g}`},[`${t}-track,${t}-tracks`]:{position:`absolute`,transition:`background-color ${g}`},[`${t}-track`]:{backgroundColor:e.trackBg,borderRadius:e.borderRadiusXS},[`${t}-track-draggable`]:{boxSizing:`content-box`,backgroundClip:`content-box`,border:`solid rgba(0,0,0,0)`},"&:hover":{[`${t}-rail`]:{backgroundColor:e.railHoverBg},[`${t}-track`]:{backgroundColor:e.trackHoverBg},[`${t}-dot`]:{borderColor:s},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${X(m)} ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.dotActiveBorderColor}},[`${t}-handle`]:{position:`absolute`,width:u,height:u,outline:`none`,userSelect:`none`,"&-dragging-delete":{opacity:0},"&::before":{content:`""`,position:`absolute`,insetInlineStart:l(m).mul(-1).equal(),insetBlockStart:l(m).mul(-1).equal(),width:l(u).add(l(m).mul(2)).equal(),height:l(u).add(l(m).mul(2)).equal(),backgroundColor:`transparent`},"&::after":{content:`""`,position:`absolute`,insetBlockStart:0,insetInlineStart:0,width:u,height:u,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${X(m)} ${e.handleColor}`,outline:`0px solid transparent`,borderRadius:`50%`,cursor:`pointer`,transition:[`inset-inline-start`,`inset-block-start`,`width`,`height`,`box-shadow`,`outline`].map(e=>`${e} ${g}`).join(`, `)},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:l(d).sub(u).div(2).add(h).mul(-1).equal(),insetBlockStart:l(d).sub(u).div(2).add(h).mul(-1).equal(),width:l(d).add(l(h).mul(2)).equal(),height:l(d).add(l(h).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${X(h)} ${f}`,outline:`6px solid ${p}`,width:d,height:d,insetInlineStart:e.calc(u).sub(d).div(2).equal(),insetBlockStart:e.calc(u).sub(d).div(2).equal()}}},[`&-lock ${t}-handle`]:{"&::before, &::after":{transition:`none`}},[`${t}-mark`]:{position:`absolute`,fontSize:e.fontSize},[`${t}-mark-text`]:{position:`absolute`,display:`inline-block`,color:e.colorTextDescription,textAlign:`center`,wordBreak:`keep-all`,cursor:`pointer`,userSelect:`none`,"&-active":{color:e.colorText}},[`${t}-step`]:{position:`absolute`,background:`transparent`,pointerEvents:`none`},[`${t}-dot`]:{position:`absolute`,width:i,height:i,backgroundColor:e.colorBgElevated,border:`${X(m)} solid ${e.dotBorderColor}`,borderRadius:`50%`,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,pointerEvents:`auto`,"&-active":{borderColor:e.dotActiveBorderColor}},[`&${t}-disabled`]:{cursor:`not-allowed`,[`${t}-rail`]:{backgroundColor:`${e.railBg} !important`},[`${t}-track`]:{backgroundColor:`${e.trackBgDisabled} !important`},[` ${t}-dot `]:{backgroundColor:e.colorBgElevated,borderColor:e.trackBgDisabled,boxShadow:`none`,cursor:`not-allowed`},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:`not-allowed`,width:u,height:u,boxShadow:`0 0 0 ${X(m)} ${c}`,insetInlineStart:0,insetBlockStart:0},[` ${t}-mark-text, ${t}-dot - `]:{cursor:`not-allowed !important`}},[`&-tooltip ${n}-tooltip-container`]:{minWidth:`unset`}}}},rH=(e,t)=>{let{componentCls:n,railSize:r,handleSize:i,dotSize:a,marginFull:o,calc:s}=e,c=t?`paddingBlock`:`paddingInline`,l=t?`width`:`height`,u=t?`height`:`width`,d=t?`insetBlockStart`:`insetInlineStart`,f=t?`top`:`insetInlineStart`,p=s(r).mul(3).sub(i).div(2).equal(),m=s(i).sub(r).div(2).equal(),h=t?{borderWidth:`${X(m)} 0`,transform:`translateY(${X(s(m).mul(-1).equal())})`}:{borderWidth:`0 ${X(m)}`,transform:`translateX(${X(e.calc(m).mul(-1).equal())})`};return{[c]:r,[u]:s(r).mul(3).equal(),[`${n}-rail`]:{[l]:`100%`,[u]:r},[`${n}-track,${n}-tracks`]:{[u]:r},[`${n}-track-draggable`]:{...h},[`${n}-handle`]:{[d]:p},[`${n}-mark`]:{insetInlineStart:0,top:0,[f]:s(r).mul(3).add(t?0:o).equal(),[l]:`100%`},[`${n}-step`]:{insetInlineStart:0,top:0,[f]:r,[l]:`100%`,[u]:r},[`${n}-dot`]:{position:`absolute`,[d]:s(r).sub(a).div(2).equal()}}},iH=e=>{let{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:{...rH(e,!0),[`&${t}-with-marks`]:{marginBottom:n}}}},aH=e=>{let{componentCls:t}=e;return{[`${t}-vertical`]:{...rH(e,!1),height:`100%`}}},oH=Xl(`Slider`,e=>{let t=lc(e,{marginPart:e.calc(e.controlHeight).sub(e.controlSize).div(2).equal(),marginFull:e.calc(e.controlSize).div(2).equal(),marginPartWithMark:e.calc(e.controlHeightLG).sub(e.controlSize).equal()});return[nH(t),iH(t),aH(t)]},e=>{let t=e.controlHeightLG/4,n=e.controlHeightSM/2,r=e.lineWidth+1,i=e.lineWidth+1*1.5,a=e.colorPrimary,o=new jc(a).setA(.2).toRgbString();return{controlSize:t,railSize:4,handleSize:t,handleSizeHover:n,dotSize:8,handleLineWidth:r,handleLineWidthHover:i,railBg:e.colorFillTertiary,railHoverBg:e.colorFillSecondary,trackBg:e.colorPrimaryBorder,trackHoverBg:e.colorPrimaryBorderHover,handleColor:e.colorPrimaryBorder,handleActiveColor:a,handleActiveOutlineColor:o,handleColorDisabled:new jc(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString(),dotBorderColor:e.colorBorderSecondary,dotActiveBorderColor:e.colorPrimaryBorder,trackBgDisabled:e.colorBgContainerDisabled}});function sH(){let[e,t]=S.useState(!1),n=S.useRef(null),r=()=>{Ei.cancel(n.current)};return S.useEffect(()=>r,[]),[e,e=>{r(),e?t(e):n.current=Ei(()=>{t(e)})}]}function cH(e){return e||e===null?e:e=>Qd(e)?e.toString():``}var lH=S.forwardRef((e,t)=>{let{prefixCls:n,range:r,className:i,rootClassName:a,style:o,disabled:s,tooltip:c={},onChangeComplete:l,classNames:u,styles:d,vertical:f,orientation:p,...m}=e,[,h]=wf(p,f),{getPrefixCls:g,direction:_,className:v,style:y,classNames:b,styles:x,getPopupContainer:C}=_a(`slider`),w=S.useContext(pm),T=s??w,E={...e,disabled:T,vertical:h},[D,O]=xf([b,u],[x,d],{props:E}),{handleRender:k,direction:A}=S.useContext(eH),j=(A||_)===`rtl`,[M,N]=sH(),[P,F]=sH(),I={...c},{open:L,placement:R,getPopupContainer:z,prefixCls:B,formatter:V}=I,H=L,U=(M||P)&&H!==!1,ee=cH(V),[te,ne]=sH(),W=e=>{l?.(e),ne(!1)},re=(e,t)=>e||(t?j?`left`:`right`:`top`),G=g(`slider`,n),[K,q]=oH(G),ie=Y(i,v,D.root,a,{[`${G}-rtl`]:j,[`${G}-lock`]:te},K,q);j&&!h&&(m.reverse=!m.reverse),S.useEffect(()=>{let e=()=>{Ei(()=>{F(!1)},1)};return document.addEventListener(`mouseup`,e),()=>{document.removeEventListener(`mouseup`,e)}},[]);let J=r&&!H,ae=k||((e,t)=>{let{index:n}=t,r=e.props;function i(e,t,n){n&&m[e]?.(t),r[e]?.(t)}let a={...r,onMouseEnter:e=>{N(!0),i(`onMouseEnter`,e)},onMouseLeave:e=>{N(!1),i(`onMouseLeave`,e)},onMouseDown:e=>{F(!0),ne(!0),i(`onMouseDown`,e)},onFocus:e=>{F(!0),m.onFocus?.(e),i(`onFocus`,e,!0)},onBlur:e=>{F(!1),m.onBlur?.(e),i(`onBlur`,e,!0)}},o=S.cloneElement(e,a),s=(!!H||U)&&ee!==null;return J?o:S.createElement(tH,{...I,prefixCls:g(`tooltip`,B),title:ee?ee(t.value):``,value:t.value,open:s,placement:re(R,h),key:n,classNames:{root:`${G}-tooltip`},getPopupContainer:z||C},o)}),oe=J?(e,t)=>{let n=S.cloneElement(e,{style:{...e.props.style,visibility:`hidden`}});return S.createElement(tH,{...I,prefixCls:g(`tooltip`,B),title:ee?ee(t.value):``,open:ee!==null&&U,placement:re(R,h),key:`tooltip`,classNames:{root:`${G}-tooltip`},getPopupContainer:z||C,draggingDelete:t.draggingDelete},n)}:void 0,se={...O.root,...y,...o};return S.createElement($V,{...m,classNames:D,styles:O,step:m.step,range:r,className:ie,style:se,disabled:T,vertical:h,ref:t,prefixCls:G,handleRender:ae,activeHandleRender:oe,onChangeComplete:W})}),uH=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z`}}]},name:`swap-right`,theme:`outlined`}}))());function dH(){return dH=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,dH({},e,{ref:t,icon:uH.default}))),pH=(e,t,n,r,i,a)=>{let{classNames:o,styles:s}=_a(e),[c,l]=xf([o,t],[s,n],{props:a},{popup:{_default:`root`}});return S.useMemo(()=>[{...c,popup:{...c.popup,root:Y(c.popup?.root,r)}},{...l,popup:{...l.popup,root:{...l.popup?.root,...i}}}],[c,l,r,i])};function mH(e,t,n){return n===void 0?t===`year`&&e.lang.yearPlaceholder?e.lang.yearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.quarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.monthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.weekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.placeholder:e.lang.placeholder:n}function hH(e,t,n){return n===void 0?t===`year`&&e.lang.yearPlaceholder?e.lang.rangeYearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.rangeQuarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.rangeMonthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.rangeWeekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.rangePlaceholder:e.lang.rangePlaceholder:n}function gH(e,t){let{allowClear:n=!0}=e,{clearIcon:r,removeIcon:i}=ow({...e,prefixCls:t,componentName:`DatePicker`});return[S.useMemo(()=>n===!1?!1:{clearIcon:r,...n===!0?{}:n},[n,r]),i]}var[_H,vH]=[`week`,`WeekPicker`],[yH,bH]=[`month`,`MonthPicker`],[xH,SH]=[`year`,`YearPicker`],[CH,wH]=[`quarter`,`QuarterPicker`],[TH,EH]=[`time`,`TimePicker`],DH=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z`}}]},name:`calendar`,theme:`outlined`}}))());function OH(){return OH=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,OH({},e,{ref:t,icon:DH.default}))),AH=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={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`}}))());function jH(){return jH=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,jH({},e,{ref:t,icon:AH.default}))),NH=({picker:e,hasFeedback:t,feedbackIcon:n,suffixIcon:r})=>r===null||r===!1?null:r===!0||r===void 0?S.createElement(S.Fragment,null,e===TH?S.createElement(MH,null):S.createElement(kH,null),t&&n):r,PH=e=>S.createElement(E_,{size:`small`,type:`primary`,...e});function FH(e){return(0,S.useMemo)(()=>({button:PH,...e}),[e])}var IH=e=>(0,S.forwardRef)((t,n)=>{let{prefixCls:r,getPopupContainer:i,components:a,className:o,style:s,classNames:c,styles:l,placement:u,size:d,disabled:f,bordered:p=!0,placeholder:m,status:h,variant:g,picker:_,dropdownClassName:v,popupClassName:y,popupStyle:b,rootClassName:x,suffixIcon:C,separator:w,...T}=t,[E,D]=pH(_===TH?`timePicker`:`datePicker`,c,l,y||v,b),O=S.useRef(null),{getPrefixCls:k,direction:A,getPopupContainer:j,rangePicker:M}=(0,S.useContext)(ma),N=k(`picker`,r),{compactSize:P,compactItemClassnames:F}=jh(N,A),I=k(),L=w??M?.separator,[R,z]=IC(`rangePicker`,g,p),B=ap(N),[V,H]=_R(N,B),U=Y(V,H,B,x),[ee]=gH(t,N),te=FH(a),ne=Oh(e=>d??P??e),W=S.useContext(pm),re=f??W,{hasFeedback:G,status:K,feedbackIcon:q}=(0,S.useContext)(Iy),ie=NH({picker:_,hasFeedback:G,feedbackIcon:q,suffixIcon:C});(0,S.useImperativeHandle)(n,()=>O.current);let[J]=qd(`Calendar`,Ld),ae=Fi(J,t.locale||{}),[oe]=Ff(`DatePicker`,D?.popup?.root?.zIndex);return S.createElement(zy,{space:!0},S.createElement(RI,{separator:S.createElement(`span`,{"aria-label":`to`,className:`${N}-separator`},L??S.createElement(fH,null)),disabled:re,ref:O,placement:u,placeholder:hH(ae,_,m),suffixIcon:ie,prevIcon:S.createElement(`span`,{className:`${N}-prev-icon`}),nextIcon:S.createElement(`span`,{className:`${N}-next-icon`}),superPrevIcon:S.createElement(`span`,{className:`${N}-super-prev-icon`}),superNextIcon:S.createElement(`span`,{className:`${N}-super-next-icon`}),transitionName:`${I}-slide-up`,picker:_,...T,locale:ae.lang,getPopupContainer:i||j,generateConfig:e,components:te,direction:A,prefixCls:N,rootClassName:U,className:Y({[`${N}-large`]:ne===`large`,[`${N}-small`]:ne===`small`,[`${N}-${R}`]:z},EC(N,DC(K,h),G),F,o,M?.className),style:{...M?.style,...s},classNames:E,styles:{...D,popup:{...D.popup,root:{...D.popup.root,zIndex:oe}}},allowClear:ee}))}),LH=e=>{let t=(t,n)=>{let r=n===EH?`timePicker`:`datePicker`;return(0,S.forwardRef)((i,a)=>{let{prefixCls:o,getPopupContainer:s,components:c,style:l,className:u,size:d,bordered:f,placement:p,placeholder:m,disabled:h,status:g,variant:_,onCalendarChange:v,classNames:y,styles:b,dropdownClassName:x,popupClassName:C,popupStyle:w,rootClassName:T,suffixIcon:E,...D}=i,{suffixIcon:O}=_a(n===EH?`timePicker`:`datePicker`),{getPrefixCls:k,direction:A,getPopupContainer:j,[r]:M}=(0,S.useContext)(ma),N=k(`picker`,o),{compactSize:P,compactItemClassnames:F}=jh(N,A),I=Oh(e=>d??P??e),L=S.useContext(pm),R=h??L,z={...i,size:I,disabled:R,status:g,variant:_},[B,V]=pH(r,y,b,C||x,w,z),H=S.useRef(null),[U,ee]=IC(`datePicker`,_,f),te=ap(N),[ne,W]=_R(N,te),re=Y(ne,W,te,T);(0,S.useImperativeHandle)(a,()=>H.current);let G={showToday:!0},K=t||i.picker,q=k(),{onSelect:ie,multiple:J}=D,ae=ie&&t===`time`&&!J,oe=(e,t,n)=>{v?.(e,t,n),ae&&ie(e)},[se,ce]=gH(i,N),le=FH(c),{hasFeedback:ue,status:de,feedbackIcon:fe}=(0,S.useContext)(Iy),pe=NH({picker:K,hasFeedback:ue,feedbackIcon:fe,suffixIcon:E===void 0?O:E}),[me]=qd(`DatePicker`,Ld),he=Fi(me,i.locale||{}),[ge]=Ff(`DatePicker`,V?.popup?.root?.zIndex);return S.createElement(zy,{space:!0},S.createElement(SL,{ref:H,placeholder:mH(he,K,m),suffixIcon:pe,placement:p,prevIcon:S.createElement(`span`,{className:`${N}-prev-icon`}),nextIcon:S.createElement(`span`,{className:`${N}-next-icon`}),superPrevIcon:S.createElement(`span`,{className:`${N}-super-prev-icon`}),superNextIcon:S.createElement(`span`,{className:`${N}-super-next-icon`}),transitionName:`${q}-slide-up`,picker:t,onCalendarChange:oe,...G,...D,locale:he.lang,getPopupContainer:s||j,generateConfig:e,components:le,direction:A,disabled:R,prefixCls:N,rootClassName:re,className:Y({[`${N}-large`]:I===`large`,[`${N}-small`]:I===`small`,[`${N}-${U}`]:ee},EC(N,DC(de,g),ue),F,M?.className,u),style:{...M?.style,...l},classNames:B,styles:{...V,popup:{...V.popup,root:{...V.popup.root,zIndex:ge}}},allowClear:se,removeIcon:ce}))})},n=t(),r=t(_H,vH),i=t(yH,bH),a=t(xH,SH),o=t(CH,wH);return{DatePicker:n,WeekPicker:r,MonthPicker:i,YearPicker:a,TimePicker:t(TH,EH),QuarterPicker:o}},RH=e=>{let{DatePicker:t,WeekPicker:n,MonthPicker:r,YearPicker:i,TimePicker:a,QuarterPicker:o}=LH(e),s=IH(e),c=t;return c.WeekPicker=n,c.MonthPicker=r,c.YearPicker=i,c.RangePicker=s,c.TimePicker=a,c.QuarterPicker=o,c},zH=RH(RD);zH._InternalPanelDoNotUseOrYouWillBeFired=Dx(zH,`popupAlign`,void 0,`picker`),zH._InternalRangePanelDoNotUseOrYouWillBeFired=Dx(zH.RangePicker,`popupAlign`,void 0,`picker`),zH.generatePicker=RH;var BH={xxxl:4,xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},VH=S.createContext(null),HH=e=>Di(e).map(e=>({...e?.props,key:e.key}));function UH(e,t,n){let r=S.useMemo(()=>t||HH(n),[t,n]);return S.useMemo(()=>r.map(({span:t,...n})=>t===`filled`?{...n,filled:!0}:{...n,span:Qd(t)?t:gw(e,t)}),[r,e])}function WH(e,t){let n=[],r=[],i=!1,a=0;return e.filter(e=>e).forEach(e=>{let{filled:o,...s}=e;if(o){r.push(s),n.push(r),r=[],a=0;return}let c=t-a;a+=e.span||1,a>=t?(a>t?(i=!0,r.push({...s,span:c})):r.push(s),n.push(r),r=[],a=0):r.push(s)}),r.length>0&&n.push(r),n=n.map(e=>{let n=e.reduce((e,t)=>e+(t.span||1),0);if(n{let[n,r]=(0,S.useMemo)(()=>WH(t,e),[t,e]);return n},KH=e=>e.children,qH=e=>{let{itemPrefixCls:t,component:n,span:r,className:i,style:a,labelStyle:o,contentStyle:s,bordered:c,label:l,content:u,colon:d,type:f,styles:p,classNames:m}=e,h=n,{classNames:g,styles:_}=S.useContext(VH),[v,y]=xf([g,m],[_,p],{props:e}),b={...o,...y.label},x={...s,...y.content};return c?S.createElement(h,{colSpan:r,style:a,className:Y(i,{[`${t}-item-${f}`]:f===`label`||f===`content`,[v.label]:v.label&&f===`label`,[v.content]:v.content&&f===`content`})},Zd(l)&&S.createElement(`span`,{style:b},l),Zd(u)&&S.createElement(`span`,{style:x},u)):S.createElement(h,{className:Y(`${t}-item`,i),style:a,colSpan:r},S.createElement(`div`,{className:`${t}-item-container`},Zd(l)&&S.createElement(`span`,{style:b,className:Y(`${t}-item-label`,v.label,{[`${t}-item-no-colon`]:!d})},l),Zd(u)&&S.createElement(`span`,{style:x,className:Y(`${t}-item-content`,v.content)},u)))};function JH(e,{colon:t,prefixCls:n,bordered:r},{component:i,type:a,showLabel:o,showContent:s,labelStyle:c,contentStyle:l,styles:u}){return e.map(({label:e,children:d,prefixCls:f=n,className:p,style:m,labelStyle:h,contentStyle:g,span:_=1,key:v,styles:y,classNames:b},x)=>typeof i==`string`?S.createElement(qH,{key:`${a}-${v||x}`,className:p,style:m,classNames:b,styles:{label:{...c,...u?.label,...h,...y?.label},content:{...l,...u?.content,...g,...y?.content}},span:_,colon:t,component:i,itemPrefixCls:f,bordered:r,label:o?e:null,content:s?d:null,type:a}):[S.createElement(qH,{key:`label-${v||x}`,className:p,style:{...c,...u?.label,...m,...h,...y?.label},span:1,colon:t,component:i[0],itemPrefixCls:f,bordered:r,label:e,type:`label`}),S.createElement(qH,{key:`content-${v||x}`,className:p,style:{...l,...u?.content,...m,...g,...y?.content},span:_*2-1,component:i[1],itemPrefixCls:f,bordered:r,content:d,type:`content`})])}var YH=e=>{let t=S.useContext(VH),{prefixCls:n,vertical:r,row:i,index:a,bordered:o}=e;return r?S.createElement(S.Fragment,null,S.createElement(`tr`,{key:`label-${a}`,className:`${n}-row`},JH(i,e,{component:`th`,type:`label`,showLabel:!0,...t})),S.createElement(`tr`,{key:`content-${a}`,className:`${n}-row`},JH(i,e,{component:`td`,type:`content`,showContent:!0,...t}))):S.createElement(`tr`,{key:a,className:`${n}-row`},JH(i,e,{component:o?[`th`,`td`]:`td`,type:`item`,showLabel:!0,showContent:!0,...t}))},XH=e=>{let{componentCls:t,labelBg:n}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:`auto`},[`${t}-row`]:{borderBottom:`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:`none`,"> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${X(e.padding)} ${X(e.paddingLG)}`,borderInlineEnd:`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:`none`}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:n,"&::after":{display:`none`}}}},[`&${t}-medium`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${X(e.paddingSM)} ${X(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${X(e.paddingXS)} ${X(e.padding)}`}}}}}},ZH=e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:r,itemPaddingEnd:i,colonMarginRight:a,colonMarginLeft:o,titleMarginBottom:s}=e;return{[t]:{...Vl(e),...XH(e),"&-rtl":{direction:`rtl`},[`${t}-header`]:{display:`flex`,alignItems:`center`,marginBottom:s},[`${t}-title`]:{...Bl,flex:`auto`,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG},[`${t}-extra`]:{marginInlineStart:`auto`,color:n,fontSize:e.fontSize},[`${t}-view`]:{width:`100%`,borderRadius:e.borderRadiusLG,table:{width:`100%`,tableLayout:`fixed`,borderCollapse:`collapse`}},[`${t}-row`]:{"> th, > td":{paddingBottom:r,paddingInlineEnd:i},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:`none`,"> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:`normal`,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:`start`,"&::after":{content:`":"`,position:`relative`,top:-.5,marginInline:`${X(o)} ${X(a)}`},[`&${t}-item-no-colon::after`]:{content:`""`}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:`""`}},[`${t}-item-content`]:{display:`table-cell`,flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:`break-word`,overflowWrap:`break-word`},[`${t}-item`]:{paddingBottom:0,verticalAlign:`top`,"&-container":{display:`flex`,[`${t}-item-label`]:{display:`inline-flex`,alignItems:`baseline`},[`${t}-item-content`]:{display:`inline-flex`,alignItems:`baseline`,minWidth:`1em`}}},"&-medium":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}}}},QH=Xl(`Descriptions`,e=>ZH(lc(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText})),$H=e=>{let{prefixCls:t,title:n,extra:r,column:i,colon:a=!0,bordered:o,layout:s,children:c,className:l,rootClassName:u,style:d,size:f,labelStyle:p,contentStyle:m,styles:h,items:g,classNames:_,...v}=e,{getPrefixCls:y,direction:b,className:x,style:C,classNames:w,styles:T}=_a(`descriptions`),E=y(`descriptions`,t),D=vw(),O=S.useMemo(()=>Qd(i)?i:gw(D,{...BH,...i})??3,[D,i]),k=UH(D,g,c),A=Oh(f),j=GH(O,k),[M,N]=QH(E),P={...e,column:O,items:k,size:A},[F,I]=xf([w,_],[T,h],{props:P}),L=S.useMemo(()=>({labelStyle:p,contentStyle:m,styles:{label:I.label,content:I.content},classNames:{label:F.label,content:F.content}}),[p,m,I.label,I.content,F.label,F.content]);return S.createElement(VH.Provider,{value:L},S.createElement(`div`,{className:Y(E,x,F.root,{[`${E}-medium`]:A===`medium`||A===`middle`,[`${E}-small`]:A===`small`,[`${E}-bordered`]:!!o,[`${E}-rtl`]:b===`rtl`},l,u,M,N),style:{...C,...I.root,...d},...v},(n||r)&&S.createElement(`div`,{className:Y(`${E}-header`,F.header),style:I.header},n&&S.createElement(`div`,{className:Y(`${E}-title`,F.title),style:I.title},n),r&&S.createElement(`div`,{className:Y(`${E}-extra`,F.extra),style:I.extra},r)),S.createElement(`div`,{className:`${E}-view`},S.createElement(`table`,null,S.createElement(`tbody`,null,j.map((e,t)=>S.createElement(YH,{key:t,index:t,colon:a,prefixCls:E,vertical:s===`vertical`,bordered:o,row:e})))))))};$H.Item=KH;var eU=S.createContext(null),tU=S.createContext({});function nU(){return nU=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t,className:n,containerRef:r,...i}=e,{panel:a}=S.useContext(tU),o=cr(a,r);return S.createElement(`div`,nU({className:Y(`${t}-section`,n),role:`dialog`,ref:o},bi(e,{aria:!0}),{"aria-modal":`true`},i))};function iU(e){let{prefixCls:t,direction:n,className:r,style:i,maxSize:a,containerRef:o,currentSize:s,onResize:c,onResizeEnd:l,onResizeStart:u}=e,[d,f]=S.useState(!1),[p,m]=S.useState(0),[h,g]=S.useState(0),_=n===`left`||n===`right`,v=Rn(e=>{e.preventDefault(),e.stopPropagation(),f(!0),m(_?e.clientX:e.clientY);let t;if(typeof s==`number`)t=s;else if(o?.current){let e=o.current.getBoundingClientRect();t=_?e.width:e.height}g(t),u?.(t)}),y=Rn(e=>{if(!d)return;let t=(_?e.clientX:e.clientY)-p;(n===`right`||n===`bottom`)&&(t=-t);let r=h+t;r<0&&(r=0),a&&r>a&&(r=a),c?.(r)}),b=S.useCallback(()=>{if(d&&(f(!1),o?.current)){let e=o.current.getBoundingClientRect(),t=_?e.width:e.height;l?.(t)}},[d,o,l,_]);return S.useEffect(()=>{if(d)return document.addEventListener(`mousemove`,y),document.addEventListener(`mouseup`,b),()=>{document.removeEventListener(`mousemove`,y),document.removeEventListener(`mouseup`,b)}},[d,y,b]),{dragElementProps:{className:Y(`${t}-dragger`,`${t}-dragger-${n}`,{[`${t}-dragger-dragging`]:d,[`${t}-dragger-horizontal`]:_,[`${t}-dragger-vertical`]:!_},r),style:i,onMouseDown:v},isDragging:d}}function aU(e){if(typeof e==`string`){let t=Number(e.replace(/px$/i,``));if(parseFloat(e)===t&&li(!1,"Invalid value type of `width` or `height` which should be number type instead."),!Number.isNaN(t))return t}return e}function oU(e,t,n,r,i){let[a]=Wr(t&&(r??i!==!1),e);return S.useEffect(()=>{t&&n===!0&&e()?.focus({preventScroll:!0})},[t]),a}function sU(){return sU=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,open:r,placement:i,inline:a,push:o,forceRender:s,autoFocus:c,focusTrap:l,classNames:u,rootClassName:d,rootStyle:f,zIndex:p,className:m,id:h,style:g,motion:_,width:v,height:y,size:b,maxSize:x,children:C,mask:w,maskClosable:T,maskMotion:E,maskClassName:D,maskStyle:O,afterOpenChange:k,onClose:A,onMouseEnter:j,onMouseOver:M,onMouseLeave:N,onClick:P,onKeyDown:F,onKeyUp:I,styles:L,drawerRender:R,resizable:z,defaultSize:B}=e,V=S.useRef(null);S.useImperativeHandle(t,()=>V.current);let H=oU(()=>V.current,r,c,l,w),[U,ee]=S.useState(!1),te=S.useContext(eU),ne;ne=typeof o==`boolean`?o?{}:{distance:0}:o||{};let W=ne?.distance??te?.pushDistance??180,re=S.useMemo(()=>({pushDistance:W,push:()=>{ee(!0)},pull:()=>{ee(!1)}}),[W]);S.useEffect(()=>{r?te?.push?.():te?.pull?.()},[r]),S.useEffect(()=>()=>{te?.pull?.()},[]);let G=S.createElement(Ed,sU({key:`mask`},E,{visible:w&&r}),({className:e,style:t},i)=>S.createElement(`div`,{className:Y(`${n}-mask`,e,u?.mask,D),style:{...t,...O,...L?.mask},onClick:T&&r?A:void 0,ref:i})),K=typeof _==`function`?_(i):_,[q,ie]=S.useState(),J=i===`left`||i===`right`,ae=S.useMemo(()=>aU(b??(J?v:y)??q??B??(J?378:void 0)),[b,v,y,B,J,q]),oe=S.useMemo(()=>{let e={};if(U&&W)switch(i){case`top`:e.transform=`translateY(${W}px)`;break;case`bottom`:e.transform=`translateY(${-W}px)`;break;case`left`:e.transform=`translateX(${W}px)`;break;default:e.transform=`translateX(${-W}px)`;break}return J?e.width=aU(ae):e.height=aU(ae),e},[U,W,i,J,ae]),se=S.useRef(null),ce=!!z,le=typeof z==`object`&&z||{},ue=Rn(e=>{ie(e),le.onResize?.(e)}),{dragElementProps:de,isDragging:fe}=iU({prefixCls:`${n}-resizable`,direction:i,className:u?.dragger,style:L?.dragger,maxSize:x,containerRef:se,currentSize:ae,onResize:ue,onResizeStart:le.onResizeStart,onResizeEnd:le.onResizeEnd}),pe={onMouseEnter:j,onMouseOver:M,onMouseLeave:N,onClick:P,onKeyDown:F,onKeyUp:I,onFocus:e=>{H(e.target)}},me=S.createElement(Ed,sU({key:`panel`},K,{visible:r,forceRender:s,onVisibleChanged:k,removeOnLeave:!1,leavedClassName:`${n}-content-wrapper-hidden`}),({className:t,style:r},i)=>{let a=S.createElement(rU,sU({id:h,containerRef:i,prefixCls:n,className:Y(m,u?.section),style:{...g,...L?.section}},bi(e,{aria:!0}),pe),C);return S.createElement(`div`,sU({ref:se,className:Y(`${n}-content-wrapper`,fe&&`${n}-content-wrapper-dragging`,u?.wrapper,!fe&&t),style:{...r,...oe,...L?.wrapper}},bi(e,{data:!0})),ce&&S.createElement(`div`,de),R?R(a):a)}),he={...f};return p&&(he.zIndex=p),S.createElement(eU.Provider,{value:re},S.createElement(`div`,{className:Y(n,`${n}-${i}`,d,{[`${n}-open`]:r,[`${n}-inline`]:a}),style:he,tabIndex:-1,ref:V},G,me))}),lU=e=>{let{open:t=!1,prefixCls:n=`rc-drawer`,placement:r=`right`,autoFocus:i=!0,keyboard:a=!0,width:o,height:s,size:c,maxSize:l,mask:u=!0,maskClosable:d=!0,getContainer:f,forceRender:p,afterOpenChange:m,destroyOnHidden:h,onMouseEnter:g,onMouseOver:_,onMouseLeave:v,onClick:y,onKeyDown:b,onKeyUp:x,onClose:C,resizable:w,defaultSize:T,focusTriggerAfterClose:E,panelRef:D}=e,[O,k]=S.useState(!1),[A,j]=S.useState(!1);Vn(()=>{j(!0)},[]);let M=A?t:!1,N=S.useRef(null),P=S.useRef(null);Vn(()=>{M&&(P.current=document.activeElement)},[M]);let F=e=>{k(e),m?.(e),!e&&E!==!1&&P.current&&!N.current?.contains(P.current)&&P.current?.focus({preventScroll:!0})},I=S.useMemo(()=>({panel:D}),[D]);if(!p&&!O&&!M&&h)return null;let L={onMouseEnter:g,onMouseOver:_,onMouseLeave:v,onClick:y,onKeyDown:b,onKeyUp:x},R={...e,open:M,prefixCls:n,placement:r,autoFocus:i,keyboard:a,width:o,height:s,size:c,maxSize:l,defaultSize:T,mask:u,maskClosable:d,inline:f===!1,afterOpenChange:F,ref:N,resizable:w,...L};return S.createElement(tU.Provider,{value:I},S.createElement(Tp,{open:M||p||O,autoDestroy:!1,getContainer:f,autoLock:u&&(M||O),onEsc:({top:e,event:t})=>{e&&a&&(t.stopPropagation(),C?.(t))}},S.createElement(cU,R)))},uU=e=>{let{prefixCls:t,ariaId:n,title:r,footer:i,extra:a,closable:o,loading:s,onClose:c,headerStyle:l,bodyStyle:u,footerStyle:d,children:f,classNames:p,styles:m}=e,h=_a(`drawer`),{classNames:g,styles:_,closable:v}=h,[y,b]=xf([g,p],[_,m],{props:{...e,closable:o??v}}),x=S.useMemo(()=>{let e=o??v;if(e!==!1)return ef(e)&&e?.placement===`end`?`end`:`start`},[o,v]),C=S.useCallback(e=>S.createElement(`button`,{type:`button`,onClick:c,className:Y(`${t}-close`,{[`${t}-close-${x}`]:x===`end`},y.close),style:b.close},e),[c,t,x,y.close,b.close]),[w,T]=df(af(e),af(h),{closable:!0,closeIconRender:C}),E=()=>!r&&!w?null:S.createElement(`div`,{style:{...b.header,...l},className:Y(`${t}-header`,y.header,{[`${t}-header-close-only`]:w&&!r&&!a})},S.createElement(`div`,{className:`${t}-header-title`},x===`start`&&T,r&&S.createElement(`div`,{className:Y(`${t}-title`,y.title),style:b.title,id:n},r)),a&&S.createElement(`div`,{className:Y(`${t}-extra`,y.extra),style:b.extra},a),x===`end`&&T),D=()=>i?S.createElement(`div`,{className:Y(`${t}-footer`,y.footer),style:{...b.footer,...d}},i):null;return S.createElement(S.Fragment,null,E(),S.createElement(`div`,{className:Y(`${t}-body`,y.body),style:{...b.body,...u}},s?S.createElement(eb,{active:!0,title:!1,paragraph:{rows:5},className:`${t}-body-skeleton`}):f),D())},dU=e=>{let t=`100%`;return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},fU=(e,t)=>({"&-enter, &-appear":{...e,"&-active":t},"&-leave":{...t,"&-active":e}}),pU=(e,t)=>({"&-enter, &-appear, &-leave":{"&-start":{transition:`none`},"&-active":{transition:`all ${t}`}},...fU({opacity:e},{opacity:1})}),mU=(e,t)=>[pU(.7,t),fU({transform:dU(e)},{transform:`none`})],hU=e=>{let{componentCls:t,motionDurationSlow:n}=e;return{[t]:{[`${t}-mask-motion`]:pU(0,n),[`${t}-panel-motion`]:[`left`,`right`,`top`,`bottom`].reduce((e,t)=>({...e,[`&-${t}`]:mU(t,n)}),{})}}},gU=e=>{let{borderRadiusSM:t,componentCls:n,zIndexPopup:r,colorBgMask:i,colorBgElevated:a,motionDurationSlow:o,motionDurationMid:s,paddingXS:c,padding:l,paddingLG:u,fontSizeLG:d,lineHeightLG:f,lineWidth:p,lineType:m,colorSplit:h,marginXS:g,colorIcon:_,colorIconHover:v,colorBgTextHover:y,colorBgTextActive:b,colorText:x,fontWeightStrong:S,footerPaddingBlock:C,footerPaddingInline:w,draggerSize:T,calc:E}=e,D=`${n}-content-wrapper`,O=`${n}-resizable-dragger`;return{[n]:{position:`fixed`,inset:0,zIndex:r,pointerEvents:`none`,color:x,"&-pure":{position:`relative`,background:a,display:`flex`,flexDirection:`column`,pointerEvents:`auto`,[`&${n}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${n}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${n}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${n}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:`absolute`},[`${n}-mask`]:{position:`absolute`,inset:0,zIndex:r,background:i,pointerEvents:`auto`,[`&${n}-mask-blur`]:{backdropFilter:`blur(4px)`}},[D]:{position:`absolute`,zIndex:r,maxWidth:`100vw`,transition:`all ${o}`,"&-hidden":{display:`none`}},[`&-left > ${D}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${D}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${D}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${D}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${n}-section`]:{display:`flex`,flexDirection:`column`,width:`100%`,height:`100%`,overflow:`auto`,background:a,pointerEvents:`auto`},[`${n}-header`]:{display:`flex`,flex:0,alignItems:`center`,padding:`${X(l)} ${X(u)}`,fontSize:d,lineHeight:f,borderBottom:`${X(p)} ${m} ${h}`,"&-title":{display:`flex`,flex:1,alignItems:`center`,minWidth:0,minHeight:0}},[`${n}-extra`]:{flex:`none`},[`${n}-close`]:{display:`inline-flex`,width:E(d).add(c).equal(),height:E(d).add(c).equal(),borderRadius:t,justifyContent:`center`,alignItems:`center`,color:_,fontWeight:S,fontSize:d,fontStyle:`normal`,lineHeight:1,textAlign:`center`,textTransform:`none`,textDecoration:`none`,background:`transparent`,border:0,cursor:`pointer`,transition:`all ${s}`,textRendering:`auto`,[`&${n}-close-end`]:{marginInlineStart:g},[`&:not(${n}-close-end)`]:{marginInlineEnd:g},"&:hover":{color:v,backgroundColor:y,textDecoration:`none`},"&:active":{backgroundColor:b},...Gl(e)},[`${n}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:d,lineHeight:f},[`${n}-body`]:{flex:1,minWidth:0,minHeight:0,padding:u,overflow:`auto`,[`${n}-body-skeleton`]:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`}},[`${n}-footer`]:{flexShrink:0,padding:`${X(C)} ${X(w)}`,borderTop:`${X(p)} ${m} ${h}`},[O]:{position:`absolute`,zIndex:1,backgroundColor:`transparent`,userSelect:`none`,pointerEvents:`auto`,"&:hover":{backgroundColor:e.colorPrimary,opacity:.2},"&-dragging":{backgroundColor:e.colorPrimary,opacity:.3}},[`${O}-left`]:{top:0,bottom:0,right:{_skip_check_:!0,value:0},width:T,cursor:`col-resize`},[`${O}-right`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},width:T,cursor:`col-resize`},[`${O}-top`]:{insetInline:0,bottom:0,height:T,cursor:`row-resize`},[`${O}-bottom`]:{insetInline:0,top:0,height:T,cursor:`row-resize`},[`${D}-dragging`]:{userSelect:`none`,transition:`none`,willChange:`width, height`,[`${n}-content`]:{pointerEvents:`none`},[`${n}-section`]:{pointerEvents:`none`}},"&-rtl":{direction:`rtl`}}}},_U=Xl(`Drawer`,e=>{let t=lc(e,{});return[gU(t),hU(t)]},e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding,draggerSize:4})),vU={distance:180},yU=378,bU={motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},xU=e=>{let{rootClassName:t,size:n,defaultSize:r=yU,height:i,width:a,mask:o,push:s=vU,open:c,afterOpenChange:l,onClose:u,prefixCls:d,getContainer:f,panelRef:p=null,style:m,className:h,resizable:g,"aria-labelledby":_,focusable:v,maskClosable:y,maskStyle:b,drawerStyle:x,contentWrapperStyle:C,destroyOnClose:w,destroyOnHidden:T,...E}=e,{placement:D}=E,O=Yn(),k=E.title?O:void 0,{getPopupContainer:A,getPrefixCls:j,direction:M,className:N,style:P,classNames:F,styles:I,mask:L}=_a(`drawer`),R=j(`drawer`,d),[z,B]=_U(R),V=f===void 0&&A?()=>A(document.body):f,H=S.useMemo(()=>Qd(n)?n:n===`large`?736:n===`default`?yU:typeof n==`string`?/^\d+(\.\d+)?$/.test(n)?Number(n):n:!D||D===`left`||D===`right`?a:i,[n,D,a,i]),U={motionName:vh(R,`mask-motion`),...bU},ee=e=>({motionName:vh(R,`panel-motion-${e}`),...bU}),te=sr(p,rb()),[ne,W]=Ff(`Drawer`,E.zIndex),[re,G,K]=mf(o,L,R,y),q=Vy(v,V!==!1&&re),{classNames:ie,styles:J,rootStyle:ae}=E,oe={...e,zIndex:ne,panelRef:p,mask:re,maskClosable:K,defaultSize:r,push:s,focusable:q},[se,ce]=xf([F,ie],[I,J],{props:oe}),le=Y({"no-mask":!re,[`${R}-rtl`]:M===`rtl`},t,z,B,se.root);return S.createElement(zy,{form:!0,space:!0},S.createElement(kf.Provider,{value:W},S.createElement(lU,{prefixCls:R,onClose:u,maskMotion:U,motion:ee,...E,classNames:{mask:Y(se.mask,G.mask),section:se.section,wrapper:se.wrapper,dragger:se.dragger},styles:{mask:{...ce.mask,...b},section:{...ce.section,...x},wrapper:{...ce.wrapper,...C},dragger:ce.dragger},open:c,mask:re,maskClosable:K,push:s,size:H,defaultSize:r,style:{...P,...m},rootStyle:{...ae,...ce.root},className:Y(N,h),rootClassName:le,getContainer:V,afterOpenChange:l,panelRef:te,zIndex:ne,...g?{resizable:g}:{},"aria-labelledby":_??k,destroyOnHidden:T??w,focusTriggerAfterClose:q.focusTriggerAfterClose,focusTrap:q.trap},S.createElement(uU,{prefixCls:R,size:n,...E,ariaId:k,onClose:u}))))};xU._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,style:n,className:r,placement:i=`right`,...a}=e,{getPrefixCls:o}=S.useContext(ma),s=o(`drawer`,t),[c,l]=_U(s),u=Y(s,`${s}-pure`,`${s}-${i}`,c,l,r);return S.createElement(`div`,{className:u,style:n},S.createElement(uU,{prefixCls:s,...a}))};var SU=xU;function CU(e){return[`small`,`middle`,`medium`,`large`].includes(e)}function wU(e){return e?Qd(e):!1}var TU=S.createContext({latestIndex:0}),EU=TU.Provider,DU=e=>{let{className:t,prefix:n,index:r,children:i,separator:a,style:o,classNames:s,styles:c}=e,{latestIndex:l}=S.useContext(TU);return Zd(i)?S.createElement(S.Fragment,null,S.createElement(`div`,{className:t,style:o},i),r{let{componentCls:t,antCls:n}=e;return{[t]:{display:`inline-flex`,"&-rtl":{direction:`rtl`},"&-vertical":{flexDirection:`column`},"&-align":{flexDirection:`column`,"&-center":{alignItems:`center`},"&-start":{alignItems:`flex-start`},"&-end":{alignItems:`flex-end`},"&-baseline":{alignItems:`baseline`}},[`${t}-item:empty`]:{display:`none`},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:`block`}}}},kU=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},AU=Xl(`Space`,e=>{let t=lc(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[OU(t),kU(t)]},()=>({}),{resetStyle:!1}),jU=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,size:i,className:a,style:o,classNames:s,styles:c}=_a(`space`),{size:l=i??`small`,align:u,className:d,rootClassName:f,children:p,direction:m,orientation:h,prefixCls:g,split:_,separator:v,style:y,vertical:b,wrap:x=!1,classNames:C,styles:w,...T}=e,[E,D]=Array.isArray(l)?l:[l,l],O=CU(D),k=CU(E),A=wU(D),j=wU(E),M=Di(p,{keepEmpty:!0}),[N,P]=wf(h,b,m),F=u===void 0&&!P?`center`:u,I=v??_,L=n(`space`,g),[R,z]=AU(L),B={...e,size:l,orientation:N,align:F},[V,H]=xf([s,C],[c,w],{props:B}),U=Y(L,a,R,`${L}-${N}`,{[`${L}-rtl`]:r===`rtl`,[`${L}-align-${F}`]:F,[`${L}-gap-row-${D}`]:O,[`${L}-gap-col-${E}`]:k},d,f,z,V.root),ee=Y(`${L}-item`,V.item),te=M.map((e,t)=>{let n=e?.key||`${ee}-${t}`;return S.createElement(DU,{prefix:L,classNames:V,styles:H,className:ee,key:n,index:t,separator:I,style:H.item},e)}),ne=S.useMemo(()=>({latestIndex:M.reduce((e,t,n)=>Zd(t)?n:e,0)}),[M]);if(M.length===0)return null;let W={};return x&&(W.flexWrap=`wrap`),!k&&j&&(W.columnGap=E),!O&&A&&(W.rowGap=D),S.createElement(`div`,{ref:t,className:U,style:{...W,...H.root,...o,...y},...T},S.createElement(EU,{value:ne},te))});jU.Compact=Ph,jU.Addon=yV;var MU=e=>{let{getPopupContainer:t,getPrefixCls:n,direction:r}=S.useContext(ma),{prefixCls:i,type:a=`default`,danger:o,disabled:s,loading:c,onClick:l,htmlType:u,children:d,className:f,menu:p,arrow:m,autoFocus:h,trigger:g,align:_,open:v,onOpenChange:y,placement:b,getPopupContainer:x,href:C,icon:w=S.createElement(qE,null),title:T,buttonsRender:E=e=>e,mouseEnterDelay:D,mouseLeaveDelay:O,overlayClassName:k,overlayStyle:A,destroyOnHidden:j,destroyPopupOnHide:M,dropdownRender:N,popupRender:P,...F}=e,I=n(`dropdown`,i),L=`${I}-button`,R={menu:p,arrow:m,autoFocus:h,align:_,disabled:s,trigger:s?[]:g,onOpenChange:y,getPopupContainer:x||t,mouseEnterDelay:D,mouseLeaveDelay:O,classNames:{root:k},styles:{root:A},destroyOnHidden:j,popupRender:P||N},{compactSize:z,compactItemClassnames:B}=jh(I,r),V=Y(L,B,f);`destroyPopupOnHide`in e&&(R.destroyPopupOnHide=M),`open`in e&&(R.open=v),`placement`in e?R.placement=b:R.placement=r===`rtl`?`bottomLeft`:`bottomRight`;let[H,U]=E([S.createElement(bD,{type:a,danger:o,disabled:s,loading:c,onClick:l,htmlType:u,href:C,title:T},d),S.createElement(bD,{type:a,danger:o,icon:w})]);return S.createElement(jU.Compact,{className:V,size:z,block:!0,...F},H,S.createElement(vD,{...R},U))};MU.__ANT_BUTTON=!0;var NU=vD;NU.Button=MU;var PU=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z`}}]},name:`file-text`,theme:`outlined`}}))());function FU(){return FU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,FU({},e,{ref:t,icon:PU.default}))),LU=(e,t)=>Zd(e)?ef(e)&&!(0,S.isValidElement)(e)?{...t,...e}:{...t,title:e}:null;function RU(e){let[t,n]=S.useState(e);return S.useEffect(()=>{let t=setTimeout(()=>{n(e)},e.length?0:10);return()=>{clearTimeout(t)}},[e]),t}var zU=e=>{let{componentCls:t,motionDurationFast:n,motionEaseInOut:r}=e,i=`${t}-show-help`,a=`${t}-show-help-item`;return{[i]:{transition:`opacity ${n} ${r}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[a]:{overflow:`hidden`,transition:`${[`height`,`opacity`,`transform`].map(e=>`${e} ${n} ${r}`).join(`, `)} !important`,[`&${a}-appear, &${a}-enter`]:{transform:`translateY(-5px)`,opacity:0,"&-active":{transform:`translateY(0)`,opacity:1}},[`&${a}-leave-active`]:{transform:`translateY(-5px)`}}}}},BU=e=>({legend:{display:`block`,width:`100%`,marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:`inherit`,border:0,borderBottom:`${X(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, input[type='radio']:focus, input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${X(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:`block`,paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),VU=(e,t)=>{let{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},HU=e=>{let{componentCls:t}=e;return{[t]:{...Vl(e),...BU(e),[`${t}-text`]:{display:`inline-block`,paddingInlineEnd:e.paddingSM},"&-small":{...VU(e,e.controlHeightSM)},"&-large":{...VU(e,e.controlHeightLG)}}}},UU=e=>{let{formItemCls:t,iconCls:n,rootPrefixCls:r,antCls:i,labelRequiredMarkColor:a,labelColor:o,labelFontSize:s,labelHeight:c,labelColonMarginInlineStart:l,labelColonMarginInlineEnd:u,itemMarginBottom:d}=e,[f]=$l(i,`grid`);return{[t]:{...Vl(e),marginBottom:d,verticalAlign:`top`,"&-with-help":{transition:`none`},[`&-hidden, - &-hidden${i}-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:c,color:o,fontSize:s,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:`top`},[`&${t}-required`]:{"&::before":{display:`inline-block`,marginInlineEnd:e.marginXXS,color:a,fontSize:e.fontSize,fontFamily:`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:l,marginInlineEnd:u},[`&${t}-no-colon::after`]:{content:`"\\a0"`}}},[`${t}-control`]:{[f(`display`)]:`flex`,flexDirection:`column`,flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:`100%`},"&-input":{position:`relative`,display:`flex`,alignItems:`center`,minHeight:e.controlHeight,"&-content":{flex:`auto`,maxWidth:`100%`,[`&:has(> ${i}-switch:only-child, > ${i}-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:yg,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:`none`,"&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}}}},WU=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:`initial`,textAlign:`start`,"> label":{margin:0,"&::after":{visibility:`hidden`}}}),GU=e=>{let{antCls:t,formItemCls:n}=e;return{[`${n}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:`1 1 0`,minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:`unset`}},[`${t}-col-24${n}-label, - ${t}-col-xl-24${n}-label`]:WU(e)}}},KU=e=>{let{componentCls:t,formItemCls:n,inlineItemMarginBottom:r}=e;return{[`${t}-inline`]:{display:`flex`,flexWrap:`wrap`,[`${n}-inline`]:{flex:`none`,marginInlineEnd:e.margin,marginBottom:r,"&-row":{flexWrap:`nowrap`},[`> ${n}-label, - > ${n}-control`]:{display:`inline-block`,verticalAlign:`top`},[`> ${n}-label`]:{flex:`none`},[`${t}-text`]:{display:`inline-block`},[`${n}-has-feedback`]:{display:`inline-block`}}}}},qU=e=>{let{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${n} ${n}-label`]:WU(e),[`${t}:not(${t}-inline)`]:{[n]:{flexWrap:`wrap`,[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:`0 0 100%`,maxWidth:`100%`}}}}}},JU=e=>{let{componentCls:t,formItemCls:n,antCls:r}=e;return{[`${n}-vertical`]:{[`${n}-row`]:{flexDirection:`column`},[`${n}-label > label`]:{height:`auto`},[`${n}-control`]:{width:`100%`},[`${n}-label, + `]:{cursor:`not-allowed !important`}},[`&-tooltip ${n}-tooltip-container`]:{minWidth:`unset`}}}},$V=(e,t)=>{let{componentCls:n,railSize:r,handleSize:i,dotSize:a,marginFull:o,calc:s}=e,c=t?`paddingBlock`:`paddingInline`,l=t?`width`:`height`,u=t?`height`:`width`,d=t?`insetBlockStart`:`insetInlineStart`,f=t?`top`:`insetInlineStart`,p=s(r).mul(3).sub(i).div(2).equal(),m=s(i).sub(r).div(2).equal(),h=t?{borderWidth:`${X(m)} 0`,transform:`translateY(${X(s(m).mul(-1).equal())})`}:{borderWidth:`0 ${X(m)}`,transform:`translateX(${X(e.calc(m).mul(-1).equal())})`};return{[c]:r,[u]:s(r).mul(3).equal(),[`${n}-rail`]:{[l]:`100%`,[u]:r},[`${n}-track,${n}-tracks`]:{[u]:r},[`${n}-track-draggable`]:{...h},[`${n}-handle`]:{[d]:p},[`${n}-mark`]:{insetInlineStart:0,top:0,[f]:s(r).mul(3).add(t?0:o).equal(),[l]:`100%`},[`${n}-step`]:{insetInlineStart:0,top:0,[f]:r,[l]:`100%`,[u]:r},[`${n}-dot`]:{position:`absolute`,[d]:s(r).sub(a).div(2).equal()}}},eH=e=>{let{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:{...$V(e,!0),[`&${t}-with-marks`]:{marginBottom:n}}}},tH=e=>{let{componentCls:t}=e;return{[`${t}-vertical`]:{...$V(e,!1),height:`100%`}}},nH=Xl(`Slider`,e=>{let t=lc(e,{marginPart:e.calc(e.controlHeight).sub(e.controlSize).div(2).equal(),marginFull:e.calc(e.controlSize).div(2).equal(),marginPartWithMark:e.calc(e.controlHeightLG).sub(e.controlSize).equal()});return[QV(t),eH(t),tH(t)]},e=>{let t=e.controlHeightLG/4,n=e.controlHeightSM/2,r=e.lineWidth+1,i=e.lineWidth+1*1.5,a=e.colorPrimary,o=new jc(a).setA(.2).toRgbString();return{controlSize:t,railSize:4,handleSize:t,handleSizeHover:n,dotSize:8,handleLineWidth:r,handleLineWidthHover:i,railBg:e.colorFillTertiary,railHoverBg:e.colorFillSecondary,trackBg:e.colorPrimaryBorder,trackHoverBg:e.colorPrimaryBorderHover,handleColor:e.colorPrimaryBorder,handleActiveColor:a,handleActiveOutlineColor:o,handleColorDisabled:new jc(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString(),dotBorderColor:e.colorBorderSecondary,dotActiveBorderColor:e.colorPrimaryBorder,trackBgDisabled:e.colorBgContainerDisabled}});function rH(){let[e,t]=S.useState(!1),n=S.useRef(null),r=()=>{Ei.cancel(n.current)};return S.useEffect(()=>r,[]),[e,e=>{r(),e?t(e):n.current=Ei(()=>{t(e)})}]}function iH(e){return e||e===null?e:e=>Qd(e)?e.toString():``}var aH=S.forwardRef((e,t)=>{let{prefixCls:n,range:r,className:i,rootClassName:a,style:o,disabled:s,tooltip:c={},onChangeComplete:l,classNames:u,styles:d,vertical:f,orientation:p,...m}=e,[,h]=wf(p,f),{getPrefixCls:g,direction:_,className:v,style:y,classNames:b,styles:x,getPopupContainer:C}=_a(`slider`),w=S.useContext(pm),T=s??w,E={...e,disabled:T,vertical:h},[D,O]=xf([b,u],[x,d],{props:E}),{handleRender:k,direction:A}=S.useContext(XV),j=(A||_)===`rtl`,[M,N]=rH(),[P,F]=rH(),I={...c},{open:L,placement:R,getPopupContainer:z,prefixCls:B,formatter:V}=I,H=L,U=(M||P)&&H!==!1,ee=iH(V),[te,ne]=rH(),W=e=>{l?.(e),ne(!1)},re=(e,t)=>e||(t?j?`left`:`right`:`top`),G=g(`slider`,n),[K,q]=nH(G),ie=Y(i,v,D.root,a,{[`${G}-rtl`]:j,[`${G}-lock`]:te},K,q);j&&!h&&(m.reverse=!m.reverse),S.useEffect(()=>{let e=()=>{Ei(()=>{F(!1)},1)};return document.addEventListener(`mouseup`,e),()=>{document.removeEventListener(`mouseup`,e)}},[]);let J=r&&!H,ae=k||((e,t)=>{let{index:n}=t,r=e.props;function i(e,t,n){n&&m[e]?.(t),r[e]?.(t)}let a={...r,onMouseEnter:e=>{N(!0),i(`onMouseEnter`,e)},onMouseLeave:e=>{N(!1),i(`onMouseLeave`,e)},onMouseDown:e=>{F(!0),ne(!0),i(`onMouseDown`,e)},onFocus:e=>{F(!0),m.onFocus?.(e),i(`onFocus`,e,!0)},onBlur:e=>{F(!1),m.onBlur?.(e),i(`onBlur`,e,!0)}},o=S.cloneElement(e,a),s=(!!H||U)&&ee!==null;return J?o:S.createElement(ZV,{...I,prefixCls:g(`tooltip`,B),title:ee?ee(t.value):``,value:t.value,open:s,placement:re(R,h),key:n,classNames:{root:`${G}-tooltip`},getPopupContainer:z||C},o)}),oe=J?(e,t)=>{let n=S.cloneElement(e,{style:{...e.props.style,visibility:`hidden`}});return S.createElement(ZV,{...I,prefixCls:g(`tooltip`,B),title:ee?ee(t.value):``,open:ee!==null&&U,placement:re(R,h),key:`tooltip`,classNames:{root:`${G}-tooltip`},getPopupContainer:z||C,draggingDelete:t.draggingDelete},n)}:void 0,se={...O.root,...y,...o};return S.createElement(YV,{...m,classNames:D,styles:O,step:m.step,range:r,className:ie,style:se,disabled:T,vertical:h,ref:t,prefixCls:G,handleRender:ae,activeHandleRender:oe,onChangeComplete:W})}),oH=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z`}}]},name:`swap-right`,theme:`outlined`}}))());function sH(){return sH=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,sH({},e,{ref:t,icon:oH.default}))),lH=(e,t,n,r,i,a)=>{let{classNames:o,styles:s}=_a(e),[c,l]=xf([o,t],[s,n],{props:a},{popup:{_default:`root`}});return S.useMemo(()=>[{...c,popup:{...c.popup,root:Y(c.popup?.root,r)}},{...l,popup:{...l.popup,root:{...l.popup?.root,...i}}}],[c,l,r,i])};function uH(e,t,n){return n===void 0?t===`year`&&e.lang.yearPlaceholder?e.lang.yearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.quarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.monthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.weekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.placeholder:e.lang.placeholder:n}function dH(e,t,n){return n===void 0?t===`year`&&e.lang.yearPlaceholder?e.lang.rangeYearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.rangeQuarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.rangeMonthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.rangeWeekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.rangePlaceholder:e.lang.rangePlaceholder:n}function fH(e,t){let{allowClear:n=!0}=e,{clearIcon:r,removeIcon:i}=aw({...e,prefixCls:t,componentName:`DatePicker`});return[S.useMemo(()=>n===!1?!1:{clearIcon:r,...n===!0?{}:n},[n,r]),i]}var[pH,mH]=[`week`,`WeekPicker`],[hH,gH]=[`month`,`MonthPicker`],[_H,vH]=[`year`,`YearPicker`],[yH,bH]=[`quarter`,`QuarterPicker`],[xH,SH]=[`time`,`TimePicker`],CH=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z`}}]},name:`calendar`,theme:`outlined`}}))());function wH(){return wH=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,wH({},e,{ref:t,icon:CH.default}))),EH=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={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`}}))());function DH(){return DH=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,DH({},e,{ref:t,icon:EH.default}))),kH=({picker:e,hasFeedback:t,feedbackIcon:n,suffixIcon:r})=>r===null||r===!1?null:r===!0||r===void 0?S.createElement(S.Fragment,null,e===xH?S.createElement(OH,null):S.createElement(TH,null),t&&n):r,AH=e=>S.createElement(E_,{size:`small`,type:`primary`,...e});function jH(e){return(0,S.useMemo)(()=>({button:AH,...e}),[e])}var MH=e=>(0,S.forwardRef)((t,n)=>{let{prefixCls:r,getPopupContainer:i,components:a,className:o,style:s,classNames:c,styles:l,placement:u,size:d,disabled:f,bordered:p=!0,placeholder:m,status:h,variant:g,picker:_,dropdownClassName:v,popupClassName:y,popupStyle:b,rootClassName:x,suffixIcon:C,separator:w,...T}=t,[E,D]=lH(_===xH?`timePicker`:`datePicker`,c,l,y||v,b),O=S.useRef(null),{getPrefixCls:k,direction:A,getPopupContainer:j,rangePicker:M}=(0,S.useContext)(ma),N=k(`picker`,r),{compactSize:P,compactItemClassnames:F}=jh(N,A),I=k(),L=w??M?.separator,[R,z]=FC(`rangePicker`,g,p),B=ap(N),[V,H]=pR(N,B),U=Y(V,H,B,x),[ee]=fH(t,N),te=jH(a),ne=Oh(e=>d??P??e),W=S.useContext(pm),re=f??W,{hasFeedback:G,status:K,feedbackIcon:q}=(0,S.useContext)(Fy),ie=kH({picker:_,hasFeedback:G,feedbackIcon:q,suffixIcon:C});(0,S.useImperativeHandle)(n,()=>O.current);let[J]=qd(`Calendar`,Ld),ae=Fi(J,t.locale||{}),[oe]=Ff(`DatePicker`,D?.popup?.root?.zIndex);return S.createElement(Ry,{space:!0},S.createElement(LI,{separator:S.createElement(`span`,{"aria-label":`to`,className:`${N}-separator`},L??S.createElement(cH,null)),disabled:re,ref:O,placement:u,placeholder:dH(ae,_,m),suffixIcon:ie,prevIcon:S.createElement(`span`,{className:`${N}-prev-icon`}),nextIcon:S.createElement(`span`,{className:`${N}-next-icon`}),superPrevIcon:S.createElement(`span`,{className:`${N}-super-prev-icon`}),superNextIcon:S.createElement(`span`,{className:`${N}-super-next-icon`}),transitionName:`${I}-slide-up`,picker:_,...T,locale:ae.lang,getPopupContainer:i||j,generateConfig:e,components:te,direction:A,prefixCls:N,rootClassName:U,className:Y({[`${N}-large`]:ne===`large`,[`${N}-small`]:ne===`small`,[`${N}-${R}`]:z},TC(N,EC(K,h),G),F,o,M?.className),style:{...M?.style,...s},classNames:E,styles:{...D,popup:{...D.popup,root:{...D.popup.root,zIndex:oe}}},allowClear:ee}))}),NH=e=>{let t=(t,n)=>{let r=n===SH?`timePicker`:`datePicker`;return(0,S.forwardRef)((i,a)=>{let{prefixCls:o,getPopupContainer:s,components:c,style:l,className:u,size:d,bordered:f,placement:p,placeholder:m,disabled:h,status:g,variant:_,onCalendarChange:v,classNames:y,styles:b,dropdownClassName:x,popupClassName:C,popupStyle:w,rootClassName:T,suffixIcon:E,...D}=i,{suffixIcon:O}=_a(n===SH?`timePicker`:`datePicker`),{getPrefixCls:k,direction:A,getPopupContainer:j,[r]:M}=(0,S.useContext)(ma),N=k(`picker`,o),{compactSize:P,compactItemClassnames:F}=jh(N,A),I=Oh(e=>d??P??e),L=S.useContext(pm),R=h??L,z={...i,size:I,disabled:R,status:g,variant:_},[B,V]=lH(r,y,b,C||x,w,z),H=S.useRef(null),[U,ee]=FC(`datePicker`,_,f),te=ap(N),[ne,W]=pR(N,te),re=Y(ne,W,te,T);(0,S.useImperativeHandle)(a,()=>H.current);let G={showToday:!0},K=t||i.picker,q=k(),{onSelect:ie,multiple:J}=D,ae=ie&&t===`time`&&!J,oe=(e,t,n)=>{v?.(e,t,n),ae&&ie(e)},[se,ce]=fH(i,N),le=jH(c),{hasFeedback:ue,status:de,feedbackIcon:fe}=(0,S.useContext)(Fy),pe=kH({picker:K,hasFeedback:ue,feedbackIcon:fe,suffixIcon:E===void 0?O:E}),[me]=qd(`DatePicker`,Ld),he=Fi(me,i.locale||{}),[ge]=Ff(`DatePicker`,V?.popup?.root?.zIndex);return S.createElement(Ry,{space:!0},S.createElement(xL,{ref:H,placeholder:uH(he,K,m),suffixIcon:pe,placement:p,prevIcon:S.createElement(`span`,{className:`${N}-prev-icon`}),nextIcon:S.createElement(`span`,{className:`${N}-next-icon`}),superPrevIcon:S.createElement(`span`,{className:`${N}-super-prev-icon`}),superNextIcon:S.createElement(`span`,{className:`${N}-super-next-icon`}),transitionName:`${q}-slide-up`,picker:t,onCalendarChange:oe,...G,...D,locale:he.lang,getPopupContainer:s||j,generateConfig:e,components:le,direction:A,disabled:R,prefixCls:N,rootClassName:re,className:Y({[`${N}-large`]:I===`large`,[`${N}-small`]:I===`small`,[`${N}-${U}`]:ee},TC(N,EC(de,g),ue),F,M?.className,u),style:{...M?.style,...l},classNames:B,styles:{...V,popup:{...V.popup,root:{...V.popup.root,zIndex:ge}}},allowClear:se,removeIcon:ce}))})},n=t(),r=t(pH,mH),i=t(hH,gH),a=t(_H,vH),o=t(yH,bH);return{DatePicker:n,WeekPicker:r,MonthPicker:i,YearPicker:a,TimePicker:t(xH,SH),QuarterPicker:o}},PH=e=>{let{DatePicker:t,WeekPicker:n,MonthPicker:r,YearPicker:i,TimePicker:a,QuarterPicker:o}=NH(e),s=MH(e),c=t;return c.WeekPicker=n,c.MonthPicker=r,c.YearPicker=i,c.RangePicker=s,c.TimePicker=a,c.QuarterPicker=o,c},FH=PH(ID);FH._InternalPanelDoNotUseOrYouWillBeFired=Ex(FH,`popupAlign`,void 0,`picker`),FH._InternalRangePanelDoNotUseOrYouWillBeFired=Ex(FH.RangePicker,`popupAlign`,void 0,`picker`),FH.generatePicker=PH;var IH={xxxl:4,xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},LH=S.createContext(null),RH=e=>Di(e).map(e=>({...e?.props,key:e.key}));function zH(e,t,n){let r=S.useMemo(()=>t||RH(n),[t,n]);return S.useMemo(()=>r.map(({span:t,...n})=>t===`filled`?{...n,filled:!0}:{...n,span:Qd(t)?t:hw(e,t)}),[r,e])}function BH(e,t){let n=[],r=[],i=!1,a=0;return e.filter(e=>e).forEach(e=>{let{filled:o,...s}=e;if(o){r.push(s),n.push(r),r=[],a=0;return}let c=t-a;a+=e.span||1,a>=t?(a>t?(i=!0,r.push({...s,span:c})):r.push(s),n.push(r),r=[],a=0):r.push(s)}),r.length>0&&n.push(r),n=n.map(e=>{let n=e.reduce((e,t)=>e+(t.span||1),0);if(n{let[n,r]=(0,S.useMemo)(()=>BH(t,e),[t,e]);return n},HH=e=>e.children,UH=e=>{let{itemPrefixCls:t,component:n,span:r,className:i,style:a,labelStyle:o,contentStyle:s,bordered:c,label:l,content:u,colon:d,type:f,styles:p,classNames:m}=e,h=n,{classNames:g,styles:_}=S.useContext(LH),[v,y]=xf([g,m],[_,p],{props:e}),b={...o,...y.label},x={...s,...y.content};return c?S.createElement(h,{colSpan:r,style:a,className:Y(i,{[`${t}-item-${f}`]:f===`label`||f===`content`,[v.label]:v.label&&f===`label`,[v.content]:v.content&&f===`content`})},Zd(l)&&S.createElement(`span`,{style:b},l),Zd(u)&&S.createElement(`span`,{style:x},u)):S.createElement(h,{className:Y(`${t}-item`,i),style:a,colSpan:r},S.createElement(`div`,{className:`${t}-item-container`},Zd(l)&&S.createElement(`span`,{style:b,className:Y(`${t}-item-label`,v.label,{[`${t}-item-no-colon`]:!d})},l),Zd(u)&&S.createElement(`span`,{style:x,className:Y(`${t}-item-content`,v.content)},u)))};function WH(e,{colon:t,prefixCls:n,bordered:r},{component:i,type:a,showLabel:o,showContent:s,labelStyle:c,contentStyle:l,styles:u}){return e.map(({label:e,children:d,prefixCls:f=n,className:p,style:m,labelStyle:h,contentStyle:g,span:_=1,key:v,styles:y,classNames:b},x)=>typeof i==`string`?S.createElement(UH,{key:`${a}-${v||x}`,className:p,style:m,classNames:b,styles:{label:{...c,...u?.label,...h,...y?.label},content:{...l,...u?.content,...g,...y?.content}},span:_,colon:t,component:i,itemPrefixCls:f,bordered:r,label:o?e:null,content:s?d:null,type:a}):[S.createElement(UH,{key:`label-${v||x}`,className:p,style:{...c,...u?.label,...m,...h,...y?.label},span:1,colon:t,component:i[0],itemPrefixCls:f,bordered:r,label:e,type:`label`}),S.createElement(UH,{key:`content-${v||x}`,className:p,style:{...l,...u?.content,...m,...g,...y?.content},span:_*2-1,component:i[1],itemPrefixCls:f,bordered:r,content:d,type:`content`})])}var GH=e=>{let t=S.useContext(LH),{prefixCls:n,vertical:r,row:i,index:a,bordered:o}=e;return r?S.createElement(S.Fragment,null,S.createElement(`tr`,{key:`label-${a}`,className:`${n}-row`},WH(i,e,{component:`th`,type:`label`,showLabel:!0,...t})),S.createElement(`tr`,{key:`content-${a}`,className:`${n}-row`},WH(i,e,{component:`td`,type:`content`,showContent:!0,...t}))):S.createElement(`tr`,{key:a,className:`${n}-row`},WH(i,e,{component:o?[`th`,`td`]:`td`,type:`item`,showLabel:!0,showContent:!0,...t}))},KH=e=>{let{componentCls:t,labelBg:n}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:`auto`},[`${t}-row`]:{borderBottom:`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:`none`,"> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${X(e.padding)} ${X(e.paddingLG)}`,borderInlineEnd:`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:`none`}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:n,"&::after":{display:`none`}}}},[`&${t}-medium`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${X(e.paddingSM)} ${X(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${X(e.paddingXS)} ${X(e.padding)}`}}}}}},qH=e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:r,itemPaddingEnd:i,colonMarginRight:a,colonMarginLeft:o,titleMarginBottom:s}=e;return{[t]:{...Vl(e),...KH(e),"&-rtl":{direction:`rtl`},[`${t}-header`]:{display:`flex`,alignItems:`center`,marginBottom:s},[`${t}-title`]:{...Bl,flex:`auto`,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG},[`${t}-extra`]:{marginInlineStart:`auto`,color:n,fontSize:e.fontSize},[`${t}-view`]:{width:`100%`,borderRadius:e.borderRadiusLG,table:{width:`100%`,tableLayout:`fixed`,borderCollapse:`collapse`}},[`${t}-row`]:{"> th, > td":{paddingBottom:r,paddingInlineEnd:i},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:`none`,"> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:`normal`,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:`start`,"&::after":{content:`":"`,position:`relative`,top:-.5,marginInline:`${X(o)} ${X(a)}`},[`&${t}-item-no-colon::after`]:{content:`""`}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:`""`}},[`${t}-item-content`]:{display:`table-cell`,flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:`break-word`,overflowWrap:`break-word`},[`${t}-item`]:{paddingBottom:0,verticalAlign:`top`,"&-container":{display:`flex`,[`${t}-item-label`]:{display:`inline-flex`,alignItems:`baseline`},[`${t}-item-content`]:{display:`inline-flex`,alignItems:`baseline`,minWidth:`1em`}}},"&-medium":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}}}},JH=Xl(`Descriptions`,e=>qH(lc(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText})),YH=e=>{let{prefixCls:t,title:n,extra:r,column:i,colon:a=!0,bordered:o,layout:s,children:c,className:l,rootClassName:u,style:d,size:f,labelStyle:p,contentStyle:m,styles:h,items:g,classNames:_,...v}=e,{getPrefixCls:y,direction:b,className:x,style:C,classNames:w,styles:T}=_a(`descriptions`),E=y(`descriptions`,t),D=_w(),O=S.useMemo(()=>Qd(i)?i:hw(D,{...IH,...i})??3,[D,i]),k=zH(D,g,c),A=Oh(f),j=VH(O,k),[M,N]=JH(E),P={...e,column:O,items:k,size:A},[F,I]=xf([w,_],[T,h],{props:P}),L=S.useMemo(()=>({labelStyle:p,contentStyle:m,styles:{label:I.label,content:I.content},classNames:{label:F.label,content:F.content}}),[p,m,I.label,I.content,F.label,F.content]);return S.createElement(LH.Provider,{value:L},S.createElement(`div`,{className:Y(E,x,F.root,{[`${E}-medium`]:A===`medium`||A===`middle`,[`${E}-small`]:A===`small`,[`${E}-bordered`]:!!o,[`${E}-rtl`]:b===`rtl`},l,u,M,N),style:{...C,...I.root,...d},...v},(n||r)&&S.createElement(`div`,{className:Y(`${E}-header`,F.header),style:I.header},n&&S.createElement(`div`,{className:Y(`${E}-title`,F.title),style:I.title},n),r&&S.createElement(`div`,{className:Y(`${E}-extra`,F.extra),style:I.extra},r)),S.createElement(`div`,{className:`${E}-view`},S.createElement(`table`,null,S.createElement(`tbody`,null,j.map((e,t)=>S.createElement(GH,{key:t,index:t,colon:a,prefixCls:E,vertical:s===`vertical`,bordered:o,row:e})))))))};YH.Item=HH;var XH=S.createContext(null),ZH=S.createContext({});function QH(){return QH=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t,className:n,containerRef:r,...i}=e,{panel:a}=S.useContext(ZH),o=cr(a,r);return S.createElement(`div`,QH({className:Y(`${t}-section`,n),role:`dialog`,ref:o},bi(e,{aria:!0}),{"aria-modal":`true`},i))};function eU(e){let{prefixCls:t,direction:n,className:r,style:i,maxSize:a,containerRef:o,currentSize:s,onResize:c,onResizeEnd:l,onResizeStart:u}=e,[d,f]=S.useState(!1),[p,m]=S.useState(0),[h,g]=S.useState(0),_=n===`left`||n===`right`,v=Rn(e=>{e.preventDefault(),e.stopPropagation(),f(!0),m(_?e.clientX:e.clientY);let t;if(typeof s==`number`)t=s;else if(o?.current){let e=o.current.getBoundingClientRect();t=_?e.width:e.height}g(t),u?.(t)}),y=Rn(e=>{if(!d)return;let t=(_?e.clientX:e.clientY)-p;(n===`right`||n===`bottom`)&&(t=-t);let r=h+t;r<0&&(r=0),a&&r>a&&(r=a),c?.(r)}),b=S.useCallback(()=>{if(d&&(f(!1),o?.current)){let e=o.current.getBoundingClientRect(),t=_?e.width:e.height;l?.(t)}},[d,o,l,_]);return S.useEffect(()=>{if(d)return document.addEventListener(`mousemove`,y),document.addEventListener(`mouseup`,b),()=>{document.removeEventListener(`mousemove`,y),document.removeEventListener(`mouseup`,b)}},[d,y,b]),{dragElementProps:{className:Y(`${t}-dragger`,`${t}-dragger-${n}`,{[`${t}-dragger-dragging`]:d,[`${t}-dragger-horizontal`]:_,[`${t}-dragger-vertical`]:!_},r),style:i,onMouseDown:v},isDragging:d}}function tU(e){if(typeof e==`string`){let t=Number(e.replace(/px$/i,``));if(parseFloat(e)===t&&li(!1,"Invalid value type of `width` or `height` which should be number type instead."),!Number.isNaN(t))return t}return e}function nU(e,t,n,r,i){let[a]=Wr(t&&(r??i!==!1),e);return S.useEffect(()=>{t&&n===!0&&e()?.focus({preventScroll:!0})},[t]),a}function rU(){return rU=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,open:r,placement:i,inline:a,push:o,forceRender:s,autoFocus:c,focusTrap:l,classNames:u,rootClassName:d,rootStyle:f,zIndex:p,className:m,id:h,style:g,motion:_,width:v,height:y,size:b,maxSize:x,children:C,mask:w,maskClosable:T,maskMotion:E,maskClassName:D,maskStyle:O,afterOpenChange:k,onClose:A,onMouseEnter:j,onMouseOver:M,onMouseLeave:N,onClick:P,onKeyDown:F,onKeyUp:I,styles:L,drawerRender:R,resizable:z,defaultSize:B}=e,V=S.useRef(null);S.useImperativeHandle(t,()=>V.current);let H=nU(()=>V.current,r,c,l,w),[U,ee]=S.useState(!1),te=S.useContext(XH),ne;ne=typeof o==`boolean`?o?{}:{distance:0}:o||{};let W=ne?.distance??te?.pushDistance??180,re=S.useMemo(()=>({pushDistance:W,push:()=>{ee(!0)},pull:()=>{ee(!1)}}),[W]);S.useEffect(()=>{r?te?.push?.():te?.pull?.()},[r]),S.useEffect(()=>()=>{te?.pull?.()},[]);let G=S.createElement(Ed,rU({key:`mask`},E,{visible:w&&r}),({className:e,style:t},i)=>S.createElement(`div`,{className:Y(`${n}-mask`,e,u?.mask,D),style:{...t,...O,...L?.mask},onClick:T&&r?A:void 0,ref:i})),K=typeof _==`function`?_(i):_,[q,ie]=S.useState(),J=i===`left`||i===`right`,ae=S.useMemo(()=>tU(b??(J?v:y)??q??B??(J?378:void 0)),[b,v,y,B,J,q]),oe=S.useMemo(()=>{let e={};if(U&&W)switch(i){case`top`:e.transform=`translateY(${W}px)`;break;case`bottom`:e.transform=`translateY(${-W}px)`;break;case`left`:e.transform=`translateX(${W}px)`;break;default:e.transform=`translateX(${-W}px)`;break}return J?e.width=tU(ae):e.height=tU(ae),e},[U,W,i,J,ae]),se=S.useRef(null),ce=!!z,le=typeof z==`object`&&z||{},ue=Rn(e=>{ie(e),le.onResize?.(e)}),{dragElementProps:de,isDragging:fe}=eU({prefixCls:`${n}-resizable`,direction:i,className:u?.dragger,style:L?.dragger,maxSize:x,containerRef:se,currentSize:ae,onResize:ue,onResizeStart:le.onResizeStart,onResizeEnd:le.onResizeEnd}),pe={onMouseEnter:j,onMouseOver:M,onMouseLeave:N,onClick:P,onKeyDown:F,onKeyUp:I,onFocus:e=>{H(e.target)}},me=S.createElement(Ed,rU({key:`panel`},K,{visible:r,forceRender:s,onVisibleChanged:k,removeOnLeave:!1,leavedClassName:`${n}-content-wrapper-hidden`}),({className:t,style:r},i)=>{let a=S.createElement($H,rU({id:h,containerRef:i,prefixCls:n,className:Y(m,u?.section),style:{...g,...L?.section}},bi(e,{aria:!0}),pe),C);return S.createElement(`div`,rU({ref:se,className:Y(`${n}-content-wrapper`,fe&&`${n}-content-wrapper-dragging`,u?.wrapper,!fe&&t),style:{...r,...oe,...L?.wrapper}},bi(e,{data:!0})),ce&&S.createElement(`div`,de),R?R(a):a)}),he={...f};return p&&(he.zIndex=p),S.createElement(XH.Provider,{value:re},S.createElement(`div`,{className:Y(n,`${n}-${i}`,d,{[`${n}-open`]:r,[`${n}-inline`]:a}),style:he,tabIndex:-1,ref:V},G,me))}),aU=e=>{let{open:t=!1,prefixCls:n=`rc-drawer`,placement:r=`right`,autoFocus:i=!0,keyboard:a=!0,width:o,height:s,size:c,maxSize:l,mask:u=!0,maskClosable:d=!0,getContainer:f,forceRender:p,afterOpenChange:m,destroyOnHidden:h,onMouseEnter:g,onMouseOver:_,onMouseLeave:v,onClick:y,onKeyDown:b,onKeyUp:x,onClose:C,resizable:w,defaultSize:T,focusTriggerAfterClose:E,panelRef:D}=e,[O,k]=S.useState(!1),[A,j]=S.useState(!1);Vn(()=>{j(!0)},[]);let M=A?t:!1,N=S.useRef(null),P=S.useRef(null);Vn(()=>{M&&(P.current=document.activeElement)},[M]);let F=e=>{k(e),m?.(e),!e&&E!==!1&&P.current&&!N.current?.contains(P.current)&&P.current?.focus({preventScroll:!0})},I=S.useMemo(()=>({panel:D}),[D]);if(!p&&!O&&!M&&h)return null;let L={onMouseEnter:g,onMouseOver:_,onMouseLeave:v,onClick:y,onKeyDown:b,onKeyUp:x},R={...e,open:M,prefixCls:n,placement:r,autoFocus:i,keyboard:a,width:o,height:s,size:c,maxSize:l,defaultSize:T,mask:u,maskClosable:d,inline:f===!1,afterOpenChange:F,ref:N,resizable:w,...L};return S.createElement(ZH.Provider,{value:I},S.createElement(Tp,{open:M||p||O,autoDestroy:!1,getContainer:f,autoLock:u&&(M||O),onEsc:({top:e,event:t})=>{e&&a&&(t.stopPropagation(),C?.(t))}},S.createElement(iU,R)))},oU=e=>{let{prefixCls:t,ariaId:n,title:r,footer:i,extra:a,closable:o,loading:s,onClose:c,headerStyle:l,bodyStyle:u,footerStyle:d,children:f,classNames:p,styles:m}=e,h=_a(`drawer`),{classNames:g,styles:_,closable:v}=h,[y,b]=xf([g,p],[_,m],{props:{...e,closable:o??v}}),x=S.useMemo(()=>{let e=o??v;if(e!==!1)return ef(e)&&e?.placement===`end`?`end`:`start`},[o,v]),C=S.useCallback(e=>S.createElement(`button`,{type:`button`,onClick:c,className:Y(`${t}-close`,{[`${t}-close-${x}`]:x===`end`},y.close),style:b.close},e),[c,t,x,y.close,b.close]),[w,T]=df(af(e),af(h),{closable:!0,closeIconRender:C}),E=()=>!r&&!w?null:S.createElement(`div`,{style:{...b.header,...l},className:Y(`${t}-header`,y.header,{[`${t}-header-close-only`]:w&&!r&&!a})},S.createElement(`div`,{className:`${t}-header-title`},x===`start`&&T,r&&S.createElement(`div`,{className:Y(`${t}-title`,y.title),style:b.title,id:n},r)),a&&S.createElement(`div`,{className:Y(`${t}-extra`,y.extra),style:b.extra},a),x===`end`&&T),D=()=>i?S.createElement(`div`,{className:Y(`${t}-footer`,y.footer),style:{...b.footer,...d}},i):null;return S.createElement(S.Fragment,null,E(),S.createElement(`div`,{className:Y(`${t}-body`,y.body),style:{...b.body,...u}},s?S.createElement($y,{active:!0,title:!1,paragraph:{rows:5},className:`${t}-body-skeleton`}):f),D())},sU=e=>{let t=`100%`;return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},cU=(e,t)=>({"&-enter, &-appear":{...e,"&-active":t},"&-leave":{...t,"&-active":e}}),lU=(e,t)=>({"&-enter, &-appear, &-leave":{"&-start":{transition:`none`},"&-active":{transition:`all ${t}`}},...cU({opacity:e},{opacity:1})}),uU=(e,t)=>[lU(.7,t),cU({transform:sU(e)},{transform:`none`})],dU=e=>{let{componentCls:t,motionDurationSlow:n}=e;return{[t]:{[`${t}-mask-motion`]:lU(0,n),[`${t}-panel-motion`]:[`left`,`right`,`top`,`bottom`].reduce((e,t)=>({...e,[`&-${t}`]:uU(t,n)}),{})}}},fU=e=>{let{borderRadiusSM:t,componentCls:n,zIndexPopup:r,colorBgMask:i,colorBgElevated:a,motionDurationSlow:o,motionDurationMid:s,paddingXS:c,padding:l,paddingLG:u,fontSizeLG:d,lineHeightLG:f,lineWidth:p,lineType:m,colorSplit:h,marginXS:g,colorIcon:_,colorIconHover:v,colorBgTextHover:y,colorBgTextActive:b,colorText:x,fontWeightStrong:S,footerPaddingBlock:C,footerPaddingInline:w,draggerSize:T,calc:E}=e,D=`${n}-content-wrapper`,O=`${n}-resizable-dragger`;return{[n]:{position:`fixed`,inset:0,zIndex:r,pointerEvents:`none`,color:x,"&-pure":{position:`relative`,background:a,display:`flex`,flexDirection:`column`,pointerEvents:`auto`,[`&${n}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${n}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${n}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${n}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:`absolute`},[`${n}-mask`]:{position:`absolute`,inset:0,zIndex:r,background:i,pointerEvents:`auto`,[`&${n}-mask-blur`]:{backdropFilter:`blur(4px)`}},[D]:{position:`absolute`,zIndex:r,maxWidth:`100vw`,transition:`all ${o}`,"&-hidden":{display:`none`}},[`&-left > ${D}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${D}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${D}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${D}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${n}-section`]:{display:`flex`,flexDirection:`column`,width:`100%`,height:`100%`,overflow:`auto`,background:a,pointerEvents:`auto`},[`${n}-header`]:{display:`flex`,flex:0,alignItems:`center`,padding:`${X(l)} ${X(u)}`,fontSize:d,lineHeight:f,borderBottom:`${X(p)} ${m} ${h}`,"&-title":{display:`flex`,flex:1,alignItems:`center`,minWidth:0,minHeight:0}},[`${n}-extra`]:{flex:`none`},[`${n}-close`]:{display:`inline-flex`,width:E(d).add(c).equal(),height:E(d).add(c).equal(),borderRadius:t,justifyContent:`center`,alignItems:`center`,color:_,fontWeight:S,fontSize:d,fontStyle:`normal`,lineHeight:1,textAlign:`center`,textTransform:`none`,textDecoration:`none`,background:`transparent`,border:0,cursor:`pointer`,transition:`all ${s}`,textRendering:`auto`,[`&${n}-close-end`]:{marginInlineStart:g},[`&:not(${n}-close-end)`]:{marginInlineEnd:g},"&:hover":{color:v,backgroundColor:y,textDecoration:`none`},"&:active":{backgroundColor:b},...Gl(e)},[`${n}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:d,lineHeight:f},[`${n}-body`]:{flex:1,minWidth:0,minHeight:0,padding:u,overflow:`auto`,[`${n}-body-skeleton`]:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`}},[`${n}-footer`]:{flexShrink:0,padding:`${X(C)} ${X(w)}`,borderTop:`${X(p)} ${m} ${h}`},[O]:{position:`absolute`,zIndex:1,backgroundColor:`transparent`,userSelect:`none`,pointerEvents:`auto`,"&:hover":{backgroundColor:e.colorPrimary,opacity:.2},"&-dragging":{backgroundColor:e.colorPrimary,opacity:.3}},[`${O}-left`]:{top:0,bottom:0,right:{_skip_check_:!0,value:0},width:T,cursor:`col-resize`},[`${O}-right`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},width:T,cursor:`col-resize`},[`${O}-top`]:{insetInline:0,bottom:0,height:T,cursor:`row-resize`},[`${O}-bottom`]:{insetInline:0,top:0,height:T,cursor:`row-resize`},[`${D}-dragging`]:{userSelect:`none`,transition:`none`,willChange:`width, height`,[`${n}-content`]:{pointerEvents:`none`},[`${n}-section`]:{pointerEvents:`none`}},"&-rtl":{direction:`rtl`}}}},pU=Xl(`Drawer`,e=>{let t=lc(e,{});return[fU(t),dU(t)]},e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding,draggerSize:4})),mU={distance:180},hU=378,gU={motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},_U=e=>{let{rootClassName:t,size:n,defaultSize:r=hU,height:i,width:a,mask:o,push:s=mU,open:c,afterOpenChange:l,onClose:u,prefixCls:d,getContainer:f,panelRef:p=null,style:m,className:h,resizable:g,"aria-labelledby":_,focusable:v,maskClosable:y,maskStyle:b,drawerStyle:x,contentWrapperStyle:C,destroyOnClose:w,destroyOnHidden:T,...E}=e,{placement:D}=E,O=Yn(),k=E.title?O:void 0,{getPopupContainer:A,getPrefixCls:j,direction:M,className:N,style:P,classNames:F,styles:I,mask:L}=_a(`drawer`),R=j(`drawer`,d),[z,B]=pU(R),V=f===void 0&&A?()=>A(document.body):f,H=S.useMemo(()=>Qd(n)?n:n===`large`?736:n===`default`?hU:typeof n==`string`?/^\d+(\.\d+)?$/.test(n)?Number(n):n:!D||D===`left`||D===`right`?a:i,[n,D,a,i]),U={motionName:vh(R,`mask-motion`),...gU},ee=e=>({motionName:vh(R,`panel-motion-${e}`),...gU}),te=sr(p,nb()),[ne,W]=Ff(`Drawer`,E.zIndex),[re,G,K]=mf(o,L,R,y),q=By(v,V!==!1&&re),{classNames:ie,styles:J,rootStyle:ae}=E,oe={...e,zIndex:ne,panelRef:p,mask:re,maskClosable:K,defaultSize:r,push:s,focusable:q},[se,ce]=xf([F,ie],[I,J],{props:oe}),le=Y({"no-mask":!re,[`${R}-rtl`]:M===`rtl`},t,z,B,se.root);return S.createElement(Ry,{form:!0,space:!0},S.createElement(kf.Provider,{value:W},S.createElement(aU,{prefixCls:R,onClose:u,maskMotion:U,motion:ee,...E,classNames:{mask:Y(se.mask,G.mask),section:se.section,wrapper:se.wrapper,dragger:se.dragger},styles:{mask:{...ce.mask,...b},section:{...ce.section,...x},wrapper:{...ce.wrapper,...C},dragger:ce.dragger},open:c,mask:re,maskClosable:K,push:s,size:H,defaultSize:r,style:{...P,...m},rootStyle:{...ae,...ce.root},className:Y(N,h),rootClassName:le,getContainer:V,afterOpenChange:l,panelRef:te,zIndex:ne,...g?{resizable:g}:{},"aria-labelledby":_??k,destroyOnHidden:T??w,focusTriggerAfterClose:q.focusTriggerAfterClose,focusTrap:q.trap},S.createElement(oU,{prefixCls:R,size:n,...E,ariaId:k,onClose:u}))))};_U._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,style:n,className:r,placement:i=`right`,...a}=e,{getPrefixCls:o}=S.useContext(ma),s=o(`drawer`,t),[c,l]=pU(s),u=Y(s,`${s}-pure`,`${s}-${i}`,c,l,r);return S.createElement(`div`,{className:u,style:n},S.createElement(oU,{prefixCls:s,...a}))};var vU=_U;function yU(e){return[`small`,`middle`,`medium`,`large`].includes(e)}function bU(e){return e?Qd(e):!1}var xU=S.createContext({latestIndex:0}),SU=xU.Provider,CU=e=>{let{className:t,prefix:n,index:r,children:i,separator:a,style:o,classNames:s,styles:c}=e,{latestIndex:l}=S.useContext(xU);return Zd(i)?S.createElement(S.Fragment,null,S.createElement(`div`,{className:t,style:o},i),r{let{componentCls:t,antCls:n}=e;return{[t]:{display:`inline-flex`,"&-rtl":{direction:`rtl`},"&-vertical":{flexDirection:`column`},"&-align":{flexDirection:`column`,"&-center":{alignItems:`center`},"&-start":{alignItems:`flex-start`},"&-end":{alignItems:`flex-end`},"&-baseline":{alignItems:`baseline`}},[`${t}-item:empty`]:{display:`none`},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:`block`}}}},TU=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},EU=Xl(`Space`,e=>{let t=lc(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[wU(t),TU(t)]},()=>({}),{resetStyle:!1}),DU=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,size:i,className:a,style:o,classNames:s,styles:c}=_a(`space`),{size:l=i??`small`,align:u,className:d,rootClassName:f,children:p,direction:m,orientation:h,prefixCls:g,split:_,separator:v,style:y,vertical:b,wrap:x=!1,classNames:C,styles:w,...T}=e,[E,D]=Array.isArray(l)?l:[l,l],O=yU(D),k=yU(E),A=bU(D),j=bU(E),M=Di(p,{keepEmpty:!0}),[N,P]=wf(h,b,m),F=u===void 0&&!P?`center`:u,I=v??_,L=n(`space`,g),[R,z]=EU(L),B={...e,size:l,orientation:N,align:F},[V,H]=xf([s,C],[c,w],{props:B}),U=Y(L,a,R,`${L}-${N}`,{[`${L}-rtl`]:r===`rtl`,[`${L}-align-${F}`]:F,[`${L}-gap-row-${D}`]:O,[`${L}-gap-col-${E}`]:k},d,f,z,V.root),ee=Y(`${L}-item`,V.item),te=M.map((e,t)=>{let n=e?.key||`${ee}-${t}`;return S.createElement(CU,{prefix:L,classNames:V,styles:H,className:ee,key:n,index:t,separator:I,style:H.item},e)}),ne=S.useMemo(()=>({latestIndex:M.reduce((e,t,n)=>Zd(t)?n:e,0)}),[M]);if(M.length===0)return null;let W={};return x&&(W.flexWrap=`wrap`),!k&&j&&(W.columnGap=E),!O&&A&&(W.rowGap=D),S.createElement(`div`,{ref:t,className:U,style:{...W,...H.root,...o,...y},...T},S.createElement(SU,{value:ne},te))});DU.Compact=Ph,DU.Addon=hV;var OU=e=>{let{getPopupContainer:t,getPrefixCls:n,direction:r}=S.useContext(ma),{prefixCls:i,type:a=`default`,danger:o,disabled:s,loading:c,onClick:l,htmlType:u,children:d,className:f,menu:p,arrow:m,autoFocus:h,trigger:g,align:_,open:v,onOpenChange:y,placement:b,getPopupContainer:x,href:C,icon:w=S.createElement(GE,null),title:T,buttonsRender:E=e=>e,mouseEnterDelay:D,mouseLeaveDelay:O,overlayClassName:k,overlayStyle:A,destroyOnHidden:j,destroyPopupOnHide:M,dropdownRender:N,popupRender:P,...F}=e,I=n(`dropdown`,i),L=`${I}-button`,R={menu:p,arrow:m,autoFocus:h,align:_,disabled:s,trigger:s?[]:g,onOpenChange:y,getPopupContainer:x||t,mouseEnterDelay:D,mouseLeaveDelay:O,classNames:{root:k},styles:{root:A},destroyOnHidden:j,popupRender:P||N},{compactSize:z,compactItemClassnames:B}=jh(I,r),V=Y(L,B,f);`destroyPopupOnHide`in e&&(R.destroyPopupOnHide=M),`open`in e&&(R.open=v),`placement`in e?R.placement=b:R.placement=r===`rtl`?`bottomLeft`:`bottomRight`;let[H,U]=E([S.createElement(vD,{type:a,danger:o,disabled:s,loading:c,onClick:l,htmlType:u,href:C,title:T},d),S.createElement(vD,{type:a,danger:o,icon:w})]);return S.createElement(DU.Compact,{className:V,size:z,block:!0,...F},H,S.createElement(gD,{...R},U))};OU.__ANT_BUTTON=!0;var kU=gD;kU.Button=OU;var AU=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z`}}]},name:`file-text`,theme:`outlined`}}))());function jU(){return jU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,jU({},e,{ref:t,icon:AU.default}))),NU=(e,t)=>Zd(e)?ef(e)&&!(0,S.isValidElement)(e)?{...t,...e}:{...t,title:e}:null;function PU(e){let[t,n]=S.useState(e);return S.useEffect(()=>{let t=setTimeout(()=>{n(e)},e.length?0:10);return()=>{clearTimeout(t)}},[e]),t}var FU=e=>{let{componentCls:t,motionDurationFast:n,motionEaseInOut:r}=e,i=`${t}-show-help`,a=`${t}-show-help-item`;return{[i]:{transition:`opacity ${n} ${r}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[a]:{overflow:`hidden`,transition:`${[`height`,`opacity`,`transform`].map(e=>`${e} ${n} ${r}`).join(`, `)} !important`,[`&${a}-appear, &${a}-enter`]:{transform:`translateY(-5px)`,opacity:0,"&-active":{transform:`translateY(0)`,opacity:1}},[`&${a}-leave-active`]:{transform:`translateY(-5px)`}}}}},IU=e=>({legend:{display:`block`,width:`100%`,marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:`inherit`,border:0,borderBottom:`${X(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, input[type='radio']:focus, input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${X(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:`block`,paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),LU=(e,t)=>{let{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},RU=e=>{let{componentCls:t}=e;return{[t]:{...Vl(e),...IU(e),[`${t}-text`]:{display:`inline-block`,paddingInlineEnd:e.paddingSM},"&-small":{...LU(e,e.controlHeightSM)},"&-large":{...LU(e,e.controlHeightLG)}}}},zU=e=>{let{formItemCls:t,iconCls:n,rootPrefixCls:r,antCls:i,labelRequiredMarkColor:a,labelColor:o,labelFontSize:s,labelHeight:c,labelColonMarginInlineStart:l,labelColonMarginInlineEnd:u,itemMarginBottom:d}=e,[f]=$l(i,`grid`);return{[t]:{...Vl(e),marginBottom:d,verticalAlign:`top`,"&-with-help":{transition:`none`},[`&-hidden, + &-hidden${i}-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:c,color:o,fontSize:s,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:`top`},[`&${t}-required`]:{"&::before":{display:`inline-block`,marginInlineEnd:e.marginXXS,color:a,fontSize:e.fontSize,fontFamily:`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:l,marginInlineEnd:u},[`&${t}-no-colon::after`]:{content:`"\\a0"`}}},[`${t}-control`]:{[f(`display`)]:`flex`,flexDirection:`column`,flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:`100%`},"&-input":{position:`relative`,display:`flex`,alignItems:`center`,minHeight:e.controlHeight,"&-content":{flex:`auto`,maxWidth:`100%`,[`&:has(> ${i}-switch:only-child, > ${i}-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:yg,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:`none`,"&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}}}},BU=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:`initial`,textAlign:`start`,"> label":{margin:0,"&::after":{visibility:`hidden`}}}),VU=e=>{let{antCls:t,formItemCls:n}=e;return{[`${n}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:`1 1 0`,minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:`unset`}},[`${t}-col-24${n}-label, + ${t}-col-xl-24${n}-label`]:BU(e)}}},HU=e=>{let{componentCls:t,formItemCls:n,inlineItemMarginBottom:r}=e;return{[`${t}-inline`]:{display:`flex`,flexWrap:`wrap`,[`${n}-inline`]:{flex:`none`,marginInlineEnd:e.margin,marginBottom:r,"&-row":{flexWrap:`nowrap`},[`> ${n}-label, + > ${n}-control`]:{display:`inline-block`,verticalAlign:`top`},[`> ${n}-label`]:{flex:`none`},[`${t}-text`]:{display:`inline-block`},[`${n}-has-feedback`]:{display:`inline-block`}}}}},UU=e=>{let{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${n} ${n}-label`]:BU(e),[`${t}:not(${t}-inline)`]:{[n]:{flexWrap:`wrap`,[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:`0 0 100%`,maxWidth:`100%`}}}}}},WU=e=>{let{componentCls:t,formItemCls:n,antCls:r}=e;return{[`${n}-vertical`]:{[`${n}-row`]:{flexDirection:`column`},[`${n}-label > label`]:{height:`auto`},[`${n}-control`]:{width:`100%`},[`${n}-label, ${r}-col-24${n}-label, - ${r}-col-xl-24${n}-label`]:WU(e)},[`@media (max-width: ${X(e.screenXSMax)})`]:[qU(e),{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-xs-24${n}-label`]:WU(e)}}}],[`@media (max-width: ${X(e.screenSMMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-sm-24${n}-label`]:WU(e)}}},[`@media (max-width: ${X(e.screenMDMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-md-24${n}-label`]:WU(e)}}},[`@media (max-width: ${X(e.screenLGMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-lg-24${n}-label`]:WU(e)}}}}},YU=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}),XU=(e,t)=>lc(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),ZU=Xl(`Form`,(e,{rootPrefixCls:t})=>{let n=XU(e,t);return[HU(n),UU(n),zU(n),GU(n),KU(n),JU(n),Jh(n),yg]},YU,{order:-1e3}),QU=[];function $U(e,t,n,r=0){return{key:typeof e==`string`?e:`${t}-${r}`,error:e,errorStatus:n}}var eW=({help:e,helpStatus:t,errors:n=QU,warnings:r=QU,className:i,fieldId:a,onVisibleChanged:o})=>{let{prefixCls:s}=S.useContext(Fy),c=`${s}-item-explain`,l=ap(s),[u,d]=ZU(s,l),f=S.useMemo(()=>_h(s),[s]),p=RU(n),m=RU(r),h=S.useMemo(()=>Zd(e)?[$U(e,`help`,t)]:[].concat(da(p.map((e,t)=>$U(e,`error`,`error`,t))),da(m.map((e,t)=>$U(e,`warning`,`warning`,t)))),[e,t,p,m]),g=S.useMemo(()=>{let e={};return h.forEach(({key:t})=>{e[t]=(e[t]||0)+1}),h.map((t,n)=>({...t,key:e[t.key]>1?`${t.key}-fallback-${n}`:t.key}))},[h]),_={};return a&&(_.id=`${a}_help`),S.createElement(Ed,{motionDeadline:f.motionDeadline,motionName:`${s}-show-help`,visible:!!g.length,onVisibleChanged:o},e=>{let{className:t,style:n}=e;return S.createElement(`div`,{..._,className:Y(c,t,d,l,i,u),style:n},S.createElement(Td,{keys:g,..._h(s),motionName:`${s}-show-help-item`,component:!1},e=>{let{key:t,error:n,errorStatus:r,className:i,style:a}=e;return S.createElement(`div`,{key:t,className:Y(i,{[`${c}-${r}`]:r}),style:a},n)}))})},tW=S.forwardRef((e,t)=>{let n=S.useContext(pm),{getPrefixCls:r,direction:i,requiredMark:a,colon:o,scrollToFirstError:s,className:c,style:l,styles:u,classNames:d,tooltip:f}=_a(`form`),{prefixCls:p,className:m,rootClassName:h,size:g,disabled:_=n,form:v,colon:y,labelAlign:b,labelWrap:x,labelCol:C,wrapperCol:w,layout:T=`horizontal`,scrollToFirstError:E,requiredMark:D,onFinishFailed:O,name:k,style:A,feedbackIcons:j,variant:M,classNames:N,styles:P,tooltip:F,...I}=e,L=Oh(g),R=S.useContext(op),z=S.useMemo(()=>D===void 0?a===void 0?!0:a:D,[D,a]),B=y??o,V={...f,...F},H=r(`form`,p),U=ap(H),[ee,te]=ZU(H,U),ne={...e,size:L,disabled:_,layout:T,colon:B,requiredMark:z},[W,re]=xf([d,N],[u,P],{props:ne}),G=Y(H,`${H}-${T}`,{[`${H}-hide-required-mark`]:z===!1,[`${H}-rtl`]:i===`rtl`,[`${H}-large`]:L===`large`,[`${H}-small`]:L===`small`},te,U,ee,c,m,h,W.root),[K]=AL(v),{__INTERNAL__:q}=K;q.name=k;let ie=S.useMemo(()=>({name:k,labelAlign:b,labelCol:C,labelWrap:x,wrapperCol:w,layout:T,colon:B,requiredMark:z,itemRef:q.itemRef,form:K,feedbackIcons:j,tooltip:V,classNames:W,styles:re}),[k,b,C,w,T,B,z,K,j,W,re,V]),J=S.useRef(null);S.useImperativeHandle(t,()=>({...K,nativeElement:J.current?.nativeElement}));let ae=(e,t)=>{if(e){let n={block:`nearest`};ef(e)&&(n={...n,...e}),K.scrollToField(t,n)}},oe=e=>{if(O?.(e),e.errorFields.length){let t=e.errorFields[0].name;if(E!==void 0){ae(E,t);return}s!==void 0&&ae(s,t)}};return S.createElement(Ry.Provider,{value:M},S.createElement(mm,{disabled:_},S.createElement(hm.Provider,{value:L},S.createElement(Py,{validateMessages:R},S.createElement(My.Provider,{value:ie},S.createElement(Ly,{status:!0},S.createElement(jy,{id:k,...I,name:k,onFinishFailed:oe,form:K,ref:J,style:{...re?.root,...l,...A},className:G})))))))});function nW(e){if(typeof e==`function`)return e;let t=Di(e);return t.length<=1?t[0]:t}var rW=()=>{let{status:e,errors:t=[],warnings:n=[]}=S.useContext(Iy);return{status:e,errors:t,warnings:n}};rW.Context=Iy;function iW(e){let[t,n]=S.useState(e),r=S.useRef(null),i=S.useRef([]),a=S.useRef(!1);S.useEffect(()=>(a.current=!1,()=>{a.current=!0,Ei.cancel(r.current),r.current=null}),[]);function o(e){a.current||(r.current===null&&(i.current=[],r.current=Ei(()=>{r.current=null,n(e=>{let t=e;return i.current.forEach(e=>{t=e(t)}),t})})),i.current.push(e))}return[t,o]}var aW=()=>{let{itemRef:e}=S.useContext(My),t=S.useRef({});function n(n,r){let i=r&&typeof r==`object`&&fr(r),a=n.join(`_`);return(t.current.name!==a||t.current.originRef!==i)&&(t.current.name=a,t.current.originRef=i,t.current.ref=sr(e(n),i)),t.current.ref}return n},oW=e=>{let{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${t}-control`]:{display:`flex`}}}},sW=Ql([`Form`,`item-item`],(e,{rootPrefixCls:t})=>oW(XU(e,t))),cW=24,lW=e=>{let{prefixCls:t,status:n,labelCol:r,wrapperCol:i,children:a,errors:o,warnings:s,_internalItemRender:c,extra:l,help:u,fieldId:d,marginBottom:f,onErrorVisibleChanged:p,label:m}=e,h=`${t}-item`,g=S.useContext(My),{classNames:_,styles:v}=g,y=S.useMemo(()=>{let e={...i||g.wrapperCol||{}};return m===null&&!r&&!i&&g.labelCol&&[void 0].concat(da(pw)).forEach(t=>{let n=t?[t]:[],r=Oi(g.labelCol,n),i=ef(r)?r:{},a=Oi(e,n),o=ef(a)?a:{};`span`in i&&!(`offset`in o)&&i.span{let{labelCol:e,wrapperCol:t,...n}=g;return n},[g]),C=S.useRef(null),[w,T]=S.useState(0);Vn(()=>{l&&C.current?T(C.current.clientHeight):T(0)},[l]);let E=S.createElement(`div`,{className:`${h}-control-input`},S.createElement(`div`,{className:Y(`${h}-control-input-content`,_?.content),style:v?.content},a)),D=S.useMemo(()=>({prefixCls:t,status:n}),[t,n]),O=f!==null||o.length||s.length?S.createElement(Fy.Provider,{value:D},S.createElement(eW,{fieldId:d,errors:o,warnings:s,help:u,helpStatus:n,className:`${h}-explain-connected`,onVisibleChanged:p})):null,k={};d&&(k.id=`${d}_extra`);let A=l?S.createElement(`div`,{...k,className:`${h}-extra`,ref:C},l):null,j=O||A?S.createElement(`div`,{className:`${h}-additional`,style:f?{minHeight:f+w}:{}},O,A):null,M=c&&c.mark===`pro_table_render`&&c.render?c.render(e,{input:E,errorList:O,extra:A}):S.createElement(S.Fragment,null,E,j);return S.createElement(My.Provider,{value:x},S.createElement(fV,{...y,className:b},M),S.createElement(sW,{prefixCls:t}))},uW=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={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`}}))());function dW(){return dW=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,dW({},e,{ref:t,icon:uW.default}))),pW=({prefixCls:e,label:t,htmlFor:n,labelCol:r,labelAlign:i,colon:a,required:o,requiredMark:s,tooltip:c,vertical:l})=>{let[u]=qd(`Form`),{labelAlign:d,labelCol:f,labelWrap:p,colon:m,classNames:h,styles:g,tooltip:_}=S.useContext(My);if(!t)return null;let v=r||f||{},y=i||d,b=`${e}-item-label`,x=Y(b,y===`left`&&`${b}-left`,v.className,{[`${b}-wrap`]:!!p}),C=t,w=a===!0||m!==!1&&a!==!1;w&&!l&&typeof t==`string`&&t.trim()&&(C=t.replace(/[:|:]\s*$/,``));let T=LU(c,_);if(T){let t=S.createElement(eT,{...T},S.createElement(`span`,{className:`${e}-item-tooltip`,onClick:e=>{e.preventDefault()},tabIndex:-1},T.icon||T.children||S.createElement(fW,null)));C=S.createElement(S.Fragment,null,C,t)}let E=s===`optional`,D=typeof s==`function`,O=s===!1;D?C=s(C,{required:!!o}):E&&!o&&(C=S.createElement(S.Fragment,null,C,S.createElement(`span`,{className:`${e}-item-optional`,title:``},u?.optional||Bd.Form?.optional)));let k;O?k=`hidden`:(E||D)&&(k=`optional`);let A=Y(h?.label,{[`${e}-item-required`]:o,[`${e}-item-required-mark-${k}`]:k,[`${e}-item-no-colon`]:!w});return S.createElement(fV,{...v,className:x},S.createElement(`label`,{htmlFor:n,className:A,style:g?.label,title:typeof t==`string`?t:``},C))},mW={success:Cu,warning:Mu,error:Eu,validating:Xm};function hW({children:e,errors:t,warnings:n,hasFeedback:r,validateStatus:i,prefixCls:a,meta:o,noStyle:s,name:c}){let l=`${a}-item`,{feedbackIcons:u}=S.useContext(My),d=DL(t,n,o,null,!!r,i),{isFormItemInput:f,status:p,hasFeedback:m,feedbackIcon:h,name:g}=S.useContext(Iy),_=S.useMemo(()=>{let e;if(r){let i=r!==!0&&r.icons||u,a=d&&i?.({status:d,errors:t,warnings:n})?.[d],o=d?mW[d]:null;e=a!==!1&&o?S.createElement(`span`,{className:Y(`${l}-feedback-icon`,`${l}-feedback-icon-${d}`)},a||S.createElement(o,null)):null}let i={status:d||``,errors:t,warnings:n,hasFeedback:!!r,feedbackIcon:e,isFormItemInput:!0,name:c};return s&&(i.status=(d??p)||``,i.isFormItemInput=f,i.hasFeedback=!!(r??m),i.feedbackIcon=r===void 0?h:i.feedbackIcon,i.name=c??g),i},[d,r,s,f,p]);return S.createElement(Iy.Provider,{value:_},e)}function gW(e){let{prefixCls:t,className:n,rootClassName:r,style:i,help:a,errors:o,warnings:s,validateStatus:c,meta:l,hasFeedback:u,hidden:d,children:f,fieldId:p,required:m,isRequired:h,onSubItemMetaChange:g,layout:_,name:v,...y}=e,b=`${t}-item`,{requiredMark:x,layout:C}=S.useContext(My),w=_||C,T=w===`vertical`,E=S.useRef(null),D=RU(o),O=RU(s),k=Zd(a),A=!!(k||o.length||s.length),j=!!E.current&&kr(E.current),[M,N]=S.useState(null);Vn(()=>{if(A&&E.current){let e=getComputedStyle(E.current);N(Number.parseInt(e.marginBottom,10))}},[A,j]);let P=e=>{e||N(null)},F=((e=!1)=>DL(e?D:l.errors,e?O:l.warnings,l,``,!!u,c))(),I=Y(b,n,r,{[`${b}-with-help`]:k||D.length||O.length,[`${b}-has-feedback`]:F&&u,[`${b}-has-success`]:F===`success`,[`${b}-has-warning`]:F===`warning`,[`${b}-has-error`]:F===`error`,[`${b}-is-validating`]:F===`validating`,[`${b}-hidden`]:d,[`${b}-${w}`]:w});return S.createElement(`div`,{className:I,style:i,ref:E},S.createElement(hV,{className:`${b}-row`,...hi(y,`_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`.split(`.`))},S.createElement(pW,{htmlFor:p,...e,requiredMark:x,required:m??h,prefixCls:t,vertical:T}),S.createElement(lW,{...e,...l,errors:D,warnings:O,prefixCls:t,status:F,help:a,marginBottom:M,onErrorVisibleChanged:P},S.createElement(Ny.Provider,{value:g},S.createElement(hW,{prefixCls:t,meta:l,errors:l.errors,warnings:l.warnings,hasFeedback:u,validateStatus:F,name:v},f)))),!!M&&S.createElement(`div`,{className:`${b}-margin-offset`,style:{marginBottom:-M}}))}var _W=`__SPLIT__`;function vW(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>{let r=e[n],i=t[n];return r===i||typeof r==`function`||typeof i==`function`})}var yW=S.memo(e=>e.children,(e,t)=>vW(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every((e,n)=>e===t.childProps[n]));function bW(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function xW(e){let{name:t,noStyle:n,className:r,dependencies:i,prefixCls:a,shouldUpdate:o,rules:s,children:c,required:l,label:u,messageVariables:d,trigger:f=`onChange`,validateTrigger:p,hidden:m,help:h,layout:g}=e,{getPrefixCls:_}=S.useContext(ma),{name:v}=S.useContext(My),y=nW(c),b=typeof y==`function`,x=S.useContext(Ny),{validateTrigger:C}=S.useContext(Y_),w=Zd(p)?p:C,T=Zd(t),E=_(`form`,a),D=ap(E),[O,k]=ZU(E,D);Ui(`Form.Item`);let A=S.useContext(X_),j=S.useRef(null),[M,N]=iW({}),[P,F]=Un(()=>bW()),I=e=>{let t=A?.getKey(e.name);if(F(e.destroy?bW():e,!0),n&&h!==!1&&x){let n=e.name;if(e.destroy)n=j.current||n;else if(t!==void 0){let[e,r]=t;n=[e].concat(da(r)),j.current=n}x(e,n)}},L=(e,t)=>{N(n=>{let r={...n},i=[].concat(da(e.name.slice(0,-1)),da(t)).join(_W);return e.destroy?delete r[i]:r[i]=e,r})},[R,z]=S.useMemo(()=>{let e=da(P.errors),t=da(P.warnings);return Object.values(M).forEach(n=>{e.push.apply(e,da(n.errors||[])),t.push.apply(t,da(n.warnings||[]))}),[e,t]},[M,P.errors,P.warnings]),B=aW();function V(i,a,o){return n&&!m?S.createElement(hW,{prefixCls:E,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:P,errors:R,warnings:z,noStyle:!0,name:t},i):S.createElement(gW,{key:`row`,...e,className:Y(r,k,D,O),prefixCls:E,fieldId:a,isRequired:o,errors:R,warnings:z,meta:P,onSubItemMetaChange:L,layout:g,name:t},i)}if(!T&&!b&&!i)return V(y);let H={};return typeof u==`string`?H.label=u:t&&(H.label=String(t)),d&&(H={...H,...d}),S.createElement(_y,{...e,messageVariables:H,trigger:f,validateTrigger:w,onMetaChange:I},(n,r,a)=>{let c=TL(t).length&&r?r.name:[],u=EL(c,v),d=l===void 0?s?.some(e=>{if(ef(e)&&e.required&&!e.warningOnly)return!0;if(typeof e==`function`){let t=e(a);return t?.required&&!t?.warningOnly}return!1}):l,p={...n},m=null;if(Array.isArray(y)&&T)m=y;else if(!(b&&(!(o||i)||T))&&!(i&&!b&&!T))if(S.isValidElement(y)){let t={...y.props,...p};if(t.id||=u,h||R.length>0||z.length>0||e.extra){let n=[];(h||R.length>0)&&n.push(`${u}_help`),e.extra&&n.push(`${u}_extra`),t[`aria-describedby`]=n.join(` `)}R.length>0&&(t[`aria-invalid`]=`true`),d&&(t[`aria-required`]=`true`),lr(y)&&(t.ref=B(c,y)),new Set([].concat(da(TL(f)),da(TL(w)))).forEach(e=>{t[e]=(...t)=>{p[e]?.(...t),y.props[e]?.(...t)}});let n=[t[`aria-required`],t[`aria-invalid`],t[`aria-describedby`]];m=S.createElement(yW,{control:p,update:y,childProps:n},cm(y,t))}else m=b&&(o||i)&&!T?y(a):y;return V(m,u,d)})}var SW=xW;SW.useStatus=rW;var CW=({prefixCls:e,children:t,...n})=>{let{getPrefixCls:r}=S.useContext(ma),i=r(`form`,e),a=S.useMemo(()=>({prefixCls:i,status:`error`}),[i]);return S.createElement(vy,{...n},(e,n,r)=>S.createElement(Fy.Provider,{value:a},t(e.map(e=>({...e,fieldKey:e.key})),n,{errors:r.errors,warnings:r.warnings})))};function wW(){let{form:e}=S.useContext(My);return e}var TW=tW;TW.Item=SW,TW.List=CW,TW.ErrorList=eW,TW.useForm=AL,TW.useFormInstance=wW,TW.useWatch=Ay,TW.Provider=Py;var EW=S.createContext(null);function DW(e){return new Promise(t=>{if(!e){t(!1);return}let n=document.createElement(`img`);n.onerror=()=>t(!1),n.onload=()=>t(!0),n.src=e})}function OW(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}var kW={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function AW(e,t,n,r){let i=(0,S.useRef)(null),a=(0,S.useRef)([]),[o,s]=(0,S.useState)(kW),c=e=>{s(kW),di(kW,o)||r?.({transform:kW,action:e})},l=(e,t)=>{i.current===null&&(a.current=[],i.current=Ei(()=>{s(e=>{let n=e;return a.current.forEach(e=>{n={...n,...e}}),i.current=null,r?.({transform:n,action:t}),n})})),a.current.push({...o,...e})};return{transform:o,resetTransform:c,updateTransform:l,dispatchZoomChange:(r,i,a,s,c)=>{let{width:u,height:d,offsetWidth:f,offsetHeight:p,offsetLeft:m,offsetTop:h}=e.current,g=r,_=o.scale*r;_>n?(_=n,g=n/o.scale):_r){if(t>0)return{[e]:a};if(t<0&&ir)return{[e]:t<0?a:-a};return{}}function MW(e,t,n,r){let{width:i,height:a}=OW(),o=null;return e<=i&&t<=a?o={x:0,y:0}:(e>i||t>a)&&(o={...jW(`x`,n,e,i),...jW(`y`,r,t,a)}),o}function NW(e,t,n,r,i,a,o){let{rotate:s,scale:c,x:l,y:u}=i,[d,f]=(0,S.useState)(!1),p=(0,S.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),m=e=>{!t||e.button!==0||(e.preventDefault(),e.stopPropagation(),p.current={diffX:e.pageX-l,diffY:e.pageY-u,transformX:l,transformY:u},f(!0))},h=e=>{n&&d&&a({x:e.pageX-p.current.diffX,y:e.pageY-p.current.diffY},`move`)},g=()=>{if(n&&d){f(!1);let{transformX:t,transformY:n}=p.current;if(!(l!==t&&u!==n))return;let r=e.current.offsetWidth*c,i=e.current.offsetHeight*c,{left:o,top:d}=e.current.getBoundingClientRect(),m=s%180!=0,h=MW(m?i:r,m?r:i,o,d);h&&a({...h},`dragRebound`)}};return(0,S.useEffect)(()=>{if(t){window.addEventListener(`mouseup`,g,!1),window.addEventListener(`mousemove`,h,!1);try{window.top!==window.self&&(window.top.addEventListener(`mouseup`,g,!1),window.top.addEventListener(`mousemove`,h,!1))}catch(e){`${e}`}}return()=>{window.removeEventListener(`mouseup`,g),window.removeEventListener(`mousemove`,h);try{window.top?.removeEventListener(`mouseup`,g),window.top?.removeEventListener(`mousemove`,h)}catch{}}},[n,d,l,u,s,t]),{isMoving:d,onMouseDown:m,onMouseMove:h,onMouseUp:g,onWheel:e=>{if(!n||e.deltaY==0)return;let t=Math.abs(e.deltaY/100),i=1+Math.min(t,1)*r;e.deltaY>0&&(i=1/i),o(i,`wheel`,e.clientX,e.clientY)}}}function PW({src:e,isCustomPlaceholder:t,fallback:n}){let[r,i]=(0,S.useState)(t?`loading`:`normal`),a=(0,S.useRef)(!1),o=r===`error`;(0,S.useEffect)(()=>{let t=!0;return DW(e).then(e=>{!e&&t&&i(`error`)}),()=>{t=!1}},[e]),(0,S.useEffect)(()=>{t&&!a.current?i(`loading`):o&&i(`normal`)},[e]);let s=()=>{i(`normal`)};return[e=>{a.current=!1,r===`loading`&&e?.complete&&(e.naturalWidth||e.naturalHeight)&&(a.current=!0,s())},o&&n?{src:n}:{onLoad:s,src:e},r]}function FW(e,t){let n=e.x-t.x,r=e.y-t.y;return Math.hypot(n,r)}function IW(e,t,n,r){let i=FW(e,n),a=FW(t,r);if(i===0&&a===0)return[e.x,e.y];let o=i/(i+a);return[e.x+o*(t.x-e.x),e.y+o*(t.y-e.y)]}function LW(e,t,n,r,i,a,o){let{rotate:s,scale:c,x:l,y:u}=i,[d,f]=(0,S.useState)(!1),p=(0,S.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:`none`}),m=e=>{p.current={...p.current,...e}};return(0,S.useEffect)(()=>{let e=e=>{e.preventDefault()};return n&&t&&window.addEventListener(`touchmove`,e,{passive:!1}),()=>{window.removeEventListener(`touchmove`,e)}},[n,t]),{isTouching:d,onTouchStart:e=>{if(!t)return;e.stopPropagation(),f(!0);let{touches:n=[]}=e;n.length>1?m({point1:{x:n[0].clientX,y:n[0].clientY},point2:{x:n[1].clientX,y:n[1].clientY},eventType:`touchZoom`}):m({point1:{x:n[0].clientX-l,y:n[0].clientY-u},eventType:`move`})},onTouchMove:e=>{let{touches:t=[]}=e,{point1:n,point2:r,eventType:i}=p.current;if(t.length>1&&i===`touchZoom`){let e={x:t[0].clientX,y:t[0].clientY},i={x:t[1].clientX,y:t[1].clientY},[a,s]=IW(n,r,e,i);o(FW(e,i)/FW(n,r),`touchZoom`,a,s,!0),m({point1:e,point2:i,eventType:`touchZoom`})}else i===`move`&&(a({x:t[0].clientX-n.x,y:t[0].clientY-n.y},`move`),m({eventType:`move`}))},onTouchEnd:()=>{if(!n)return;if(d&&f(!1),m({eventType:`none`}),r>c)return a({x:0,y:0,scale:r},`touchZoom`);let t=e.current.offsetWidth*c,i=e.current.offsetHeight*c,{left:o,top:l}=e.current.getBoundingClientRect(),u=s%180!=0,p=MW(u?i:t,u?t:i,o,l);p&&a({...p},`dragRebound`)}}}function RW(e){let{prefixCls:t,icon:n,onClick:r,className:i,style:a}=e;return S.createElement(`button`,{className:Y(`${t}-close`,i),style:a,onClick:r},n)}function zW(e){let{prefixCls:t,showProgress:n,current:r,count:i,showSwitch:a,classNames:o,styles:s,icons:c,image:l,transform:u,countRender:d,actionsRender:f,scale:p,minScale:m,maxScale:h,onActive:g,onFlipY:_,onFlipX:v,onRotateLeft:y,onRotateRight:b,onZoomOut:x,onZoomIn:C,onClose:w,onReset:T}=e,{left:E,right:D,prev:O,next:k,flipY:A,flipX:j,rotateLeft:M,rotateRight:N,zoomOut:P,zoomIn:F}=c,I=n&&S.createElement(`div`,{className:`${t}-progress`},d?d(r+1,i):S.createElement(`bdi`,null,`${r+1} / ${i}`)),L=`${t}-actions-action`,R=({type:e,disabled:t,onClick:n,icon:r})=>S.createElement(`button`,{type:`button`,key:e,className:Y(L,`${L}-${e}`,{[`${L}-disabled`]:!!t}),onClick:n,disabled:!!t,"aria-label":e},r),z=a?R({icon:O??E,onClick:()=>g(-1),type:`prev`,disabled:r===0}):void 0,B=a?R({icon:k??D,onClick:()=>g(1),type:`next`,disabled:r===i-1}):void 0,V=R({icon:A,onClick:_,type:`flipY`}),H=R({icon:j,onClick:v,type:`flipX`}),U=R({icon:M,onClick:y,type:`rotateLeft`}),ee=R({icon:N,onClick:b,type:`rotateRight`}),te=R({icon:P,onClick:x,type:`zoomOut`,disabled:p<=m}),ne=R({icon:F,onClick:C,type:`zoomIn`,disabled:p===h}),W=S.createElement(`div`,{className:Y(`${t}-actions`,o.actions),style:s.actions},V,H,U,ee,te,ne);return S.createElement(`div`,{className:Y(`${t}-footer`,o.footer),style:s.footer},I,f?f(W,{icons:{prevIcon:z,nextIcon:B,flipYIcon:V,flipXIcon:H,rotateLeftIcon:U,rotateRightIcon:ee,zoomOutIcon:te,zoomInIcon:ne},actions:{onActive:g,onFlipY:_,onFlipX:v,onRotateLeft:y,onRotateRight:b,onZoomOut:x,onZoomIn:C,onReset:T,onClose:w},transform:u,current:r,total:i,image:l}):W)}function BW(e){let{prefixCls:t,onActive:n,current:r,count:i,icons:{left:a,right:o,prev:s,next:c}}=e,l=`${t}-switch`,u=r===0,d=r===i-1;return S.createElement(S.Fragment,null,S.createElement(`button`,{className:Y(l,`${l}-prev`,{[`${l}-disabled`]:u}),onClick:()=>n(-1),disabled:u},s??a),S.createElement(`button`,{type:`button`,className:Y(l,`${l}-next`,{[`${l}-disabled`]:d}),onClick:()=>n(1),disabled:d},c??o))}function VW(){return VW=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let[i,a]=PW({src:t,fallback:e});return S.createElement(`img`,VW({ref:e=>{n.current=e,i(e)}},r,a))},UW=e=>{let{prefixCls:t,rootClassName:n,src:r,alt:i,imageInfo:a,fallback:o,movable:s=!0,onClose:c,open:l,afterOpenChange:u,maskClosable:d=!0,icons:f={},closeIcon:p,getContainer:m,current:h=0,count:g=1,countRender:_,scaleStep:v=.5,minScale:y=1,maxScale:b=50,motionName:x=`fade`,imageRender:C,imgCommonProps:w,actionsRender:T,onTransform:E,onChange:D,classNames:O={},styles:k={},mousePosition:A,zIndex:j,focusTrap:M=!0}=e,N=(0,S.useRef)(),P=(0,S.useRef)(null),F=(0,S.useRef)(null),I=(0,S.useContext)(EW),L=I&&g>1,R=I&&g>=1,[z,B]=(0,S.useState)(!0),{transform:V,resetTransform:H,updateTransform:U,dispatchZoomChange:ee}=AW(N,y,b,E),{isMoving:te,onMouseDown:ne,onWheel:W}=NW(N,s,l,v,V,U,ee),{isTouching:re,onTouchStart:G,onTouchMove:K,onTouchEnd:q}=LW(N,s,l,y,V,U,ee),{rotate:ie,scale:J}=V;(0,S.useEffect)(()=>{z||B(!0)},[z]),(0,S.useEffect)(()=>{l||H(`close`)},[l]);let ae=S.createElement(HW,VW({},w,{width:e.width,height:e.height,imgRef:N,className:`${t}-img`,alt:i,style:{transform:`translate3d(${V.x}px, ${V.y}px, 0) scale3d(${V.flipX?`-`:``}${J}, ${V.flipY?`-`:``}${J}, 1) rotate(${ie}deg)`,transitionDuration:(!z||re)&&`0s`},fallback:o,src:r,onWheel:W,onMouseDown:ne,onDoubleClick:e=>{l&&(J===1?ee(1+v,`doubleClick`,e.clientX,e.clientY):U({x:0,y:0,scale:1},`doubleClick`))},onTouchStart:G,onTouchMove:K,onTouchEnd:q,onTouchCancel:q})),oe={url:r,alt:i,...a},se=()=>{ee(1+v,`zoomIn`)},ce=()=>{ee(1/(1+v),`zoomOut`)},le=()=>{U({rotate:ie+90},`rotateRight`)},ue=()=>{U({rotate:ie-90},`rotateLeft`)},de=()=>{U({flipX:!V.flipX},`flipX`)},fe=()=>{U({flipY:!V.flipY},`flipY`)},pe=()=>{H(`reset`)},me=e=>{let t=h+e;t>=0&&t<=g-1&&(B(!1),H(e<0?`prev`:`next`),D?.(t,h))},he=Rn(e=>{if(l){let{keyCode:t}=e;L&&(t===Zr.LEFT?me(-1):t===Zr.RIGHT&&me(1))}});(0,S.useEffect)(()=>{if(l)return window.addEventListener(`keydown`,he),()=>{window.removeEventListener(`keydown`,he)}},[l]);let[ge,_e]=(0,S.useState)(!1);S.useEffect(()=>{l&&_e(!0)},[l]);let ve=e=>{e||(_e(!1),F.current?.focus?.(),F.current=null),u?.(e)},[ye,be]=(0,S.useState)(!1);Vn(()=>{l&&be(!0)},[l]);let xe=({top:e})=>{e&&c?.()};Vn(()=>{l&&(F.current=document.activeElement)},[l]),Wr(M&&l&&ye,()=>P.current);let Se={...k.body};return A&&(Se.transformOrigin=`${A.x}px ${A.y}px`),S.createElement(Tp,{open:ye&&l,autoDestroy:!1,getContainer:m,autoLock:ge,onEsc:xe},S.createElement(Ed,{motionName:x,visible:ye&&l,motionAppear:!0,motionEnter:!0,motionLeave:!0,onVisibleChanged:ve},({className:e,style:r})=>{let a={...k.root,...r};return j&&(a.zIndex=j),S.createElement(`div`,{ref:P,className:Y(t,n,O.root,e,{[`${t}-movable`]:s,[`${t}-moving`]:te}),style:a,role:`dialog`,"aria-modal":`true`,"aria-label":i,tabIndex:-1},S.createElement(`div`,{className:Y(`${t}-mask`,O.mask),style:k.mask,onClick:d?c:void 0}),S.createElement(`div`,{className:Y(`${t}-body`,O.body),style:Se},C?C(ae,{transform:V,image:oe,...I?{current:h}:{}}):ae),p!==!1&&p!==null&&S.createElement(RW,{prefixCls:t,icon:p===!0?f.close:p||f.close,onClick:c,className:O.close,style:k.close}),L&&S.createElement(BW,{prefixCls:t,current:h,count:g,icons:f,onActive:me}),S.createElement(zW,{prefixCls:t,showProgress:R,current:h,count:g,showSwitch:L,classNames:O,styles:k,image:oe,transform:V,icons:f,countRender:_,actionsRender:T,scale:J,minScale:y,maxScale:b,onActive:me,onFlipY:fe,onFlipX:de,onRotateLeft:ue,onRotateRight:le,onZoomOut:ce,onZoomIn:se,onClose:c,onReset:pe}))}))},WW=[`crossOrigin`,`decoding`,`draggable`,`loading`,`referrerPolicy`,`sizes`,`srcSet`,`useMap`,`alt`,`fetchPriority`];function GW(e){let[t,n]=S.useState({}),r=S.useCallback((e,t)=>(n(n=>({...n,[e]:t})),()=>{n(t=>{let n={...t};return delete n[e],n})}),[]);return[S.useMemo(()=>e?e.map(e=>{if(typeof e==`string`)return{data:{src:e}};let t={};return Object.keys(e).forEach(n=>{[`src`,...WW].includes(n)&&(t[n]=e[n])}),{data:t}}):Object.keys(t).reduce((e,n)=>{let{canPreview:r,data:i}=t[n];return r&&e.push({data:i,id:n}),e},[]),[e,t]),r,!!e]}function KW(){return KW=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{open:c,onOpenChange:l,current:u,onChange:d,...f}=o&&typeof o==`object`?o:{},[p,m,h]=GW(a),[g,_]=Wn(0,u),[v,y]=(0,S.useState)(!1),{src:b,...x}=p[g]?.data||{},[C,w]=Wn(!!c,c),T=Rn(e=>{w(e),e!==C&&l?.(e,{current:g})}),[E,D]=(0,S.useState)(null),O=S.useCallback((e,t,n,r)=>{let i=h?p.findIndex(e=>e.data.src===t):p.findIndex(t=>t.id===e);_(i<0?0:i),T(!0),D({x:n,y:r}),y(!0)},[p,h]);S.useEffect(()=>{C?v||_(0):y(!1)},[C]);let k=(e,t)=>{_(e),d?.(e,t)},A=()=>{T(!1),D(null)},j=S.useMemo(()=>({register:m,onPreview:O}),[m,O]);return S.createElement(EW.Provider,{value:j},r,S.createElement(UW,KW({"aria-hidden":!C,open:C,prefixCls:e,onClose:A,mousePosition:E,imgCommonProps:x,src:b,fallback:s,icons:i,current:g,count:p.length,onChange:k},f,{classNames:t?.popup,styles:n?.popup})))},JW=0;function YW(e,t){let[n]=S.useState(()=>(JW+=1,String(JW))),r=S.useContext(EW),i={data:t,canPreview:e};return S.useEffect(()=>{if(r)return r.register(n,i)},[]),S.useEffect(()=>{r&&r.register(n,i)},[e,t]),n}function XW(){return XW=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t=`rc-image`,previewPrefixCls:n=`${t}-preview`,rootClassName:r,className:i,style:a,classNames:o={},styles:s={},width:c,height:l,src:u,alt:d,placeholder:f,fallback:p,preview:m=!0,onClick:h,onError:g,onKeyDown:_,...v}=e,y=(0,S.useContext)(EW),b=!!m,{src:x,open:C,onOpenChange:w,cover:T,rootClassName:E,...D}=m&&typeof m==`object`?m:{},O=typeof T==`object`&&T.placement&&T.placement||`center`,k=typeof T==`object`&&T.coverNode?T.coverNode:T,[A,j]=Wn(!!C,C),[M,N]=(0,S.useState)(null),P=e=>{j(e),w?.(e)},F=()=>{P(!1)},I=f&&f!==!0,L=x??u,[R,z,B]=PW({src:u,isCustomPlaceholder:I,fallback:p}),V=(0,S.useMemo)(()=>{let t={};return WW.forEach(n=>{e[n]!==void 0&&(t[n]=e[n])}),t},WW.map(t=>e[t])),H=YW(b,(0,S.useMemo)(()=>({...V,src:L}),[L,V])),U=e=>{let t=e.target.getBoundingClientRect(),n=t.x+t.width/2,r=t.y+t.height/2;y?y.onPreview(H,L,n,r):(N({x:n,y:r}),P(!0)),h?.(e)},ee=e=>{if(_?.(e),b&&(e.key===`Enter`||e.key===` `)){e.preventDefault();let t=e.target.getBoundingClientRect(),n=t.x+t.width/2,r=t.y+t.height/2;y?y.onPreview(H,L,n,r):(N({x:n,y:r}),P(!0))}};return S.createElement(S.Fragment,null,S.createElement(`div`,XW({},v,{className:Y(t,r,o.root,{[`${t}-error`]:B===`error`}),onClick:b?U:h,role:b?`button`:v.role,tabIndex:b&&v.tabIndex==null?0:v.tabIndex,"aria-label":b?v[`aria-label`]??d:v[`aria-label`],onKeyDown:ee,style:{width:c,height:l,...s.root}}),S.createElement(`img`,XW({},V,{className:Y(`${t}-img`,{[`${t}-img-placeholder`]:f===!0},o.image,i),style:{height:l,...s.image,...a},ref:R},z,{width:c,height:l,onError:g})),B===`loading`&&S.createElement(`div`,{"aria-hidden":`true`,className:`${t}-placeholder`},f),T!==!1&&b&&S.createElement(`div`,{className:Y(`${t}-cover`,o.cover,`${t}-cover-${O}`),style:{display:a?.display===`none`?`none`:void 0,...s.cover}},k)),!y&&b&&S.createElement(UW,XW({"aria-hidden":!A,open:A,prefixCls:n,onClose:F,mousePosition:M,src:L,alt:d,imageInfo:{width:c,height:l},fallback:p,imgCommonProps:V},D,{classNames:o?.popup,styles:s?.popup,rootClassName:Y(E,r)})))};ZW.PreviewGroup=qW;var QW=ZW,$W=(e,t,n,r,i,a,o)=>{let[s]=Ff(`ImagePreview`,e?.zIndex),[c,l]=mf(e?.mask,t?.mask,`${n}-preview`);return S.useMemo(()=>{if(!e)return e;let{cover:u,getContainer:d,closeIcon:f,rootClassName:p}=e,{closeIcon:m}=t??{};return{motionName:vh(`${n}-preview`,`fade`),...e,...o?{cover:u??o}:{},icons:a,getContainer:d??i,zIndex:s,closeIcon:f??m,rootClassName:Y(r,p),mask:c,blurClassName:l.mask}},[e,t,n,r,i,o,a,s,c,l])};function eG(e){return(0,S.isValidElement)(e)?[e,void 0]:typeof e==`boolean`||ef(e)?[void 0,e]:[void 0,void 0]}function tG(e){let t=(0,S.useMemo)(()=>typeof e==`boolean`?e?{}:null:ef(e)?e:{},[e]);return(0,S.useMemo)(()=>{if(!t)return[t,``,``];let{open:e,onOpenChange:n,cover:r,actionsRender:i,visible:a,onVisibleChange:o,rootClassName:s,maskClassName:c,mask:l,forceRender:u,destroyOnClose:d,toolbarRender:f,...p}=t,m;n?m=n:o&&(m=(e,t)=>{let{current:n}=t||{};n===void 0?o(e,!e):o(e,!e,n)});let[h,g]=eG(l);return[{...p,open:e??a,onOpenChange:m,cover:r??h,mask:g,actionsRender:i??f},s,c]},[t])}var nG=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z`}},{tag:`path`,attrs:{d:`M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z`}}]},name:`rotate-left`,theme:`outlined`}}))());function rG(){return rG=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,rG({},e,{ref:t,icon:nG.default}))),aG=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z`}},{tag:`path`,attrs:{d:`M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z`}}]},name:`rotate-right`,theme:`outlined`}}))());function oG(){return oG=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,oG({},e,{ref:t,icon:aG.default}))),cG=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`swap`,theme:`outlined`}}))());function lG(){return lG=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,lG({},e,{ref:t,icon:cG.default}))),dG=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z`}}]},name:`zoom-in`,theme:`outlined`}}))());function fG(){return fG=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,fG({},e,{ref:t,icon:dG.default}))),mG=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z`}}]},name:`zoom-out`,theme:`outlined`}}))());function hG(){return hG=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,hG({},e,{ref:t,icon:mG.default}))),_G=e=>({position:e||`absolute`,inset:0}),vG=e=>{let{componentCls:t,motionDurationSlow:n,colorTextLightSolid:r}=e;return{[t]:{[`${t}-cover`]:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,color:r,background:new jc(`#000`).setA(.3).toRgbString(),cursor:`pointer`,opacity:0,transition:`opacity ${n}`},"&:hover, &:focus-visible":{[`${t}-cover`]:{opacity:1}},[`${t}-cover-top`]:{inset:`0 0 auto 0`,justifyContent:`center`},[`${t}-cover-bottom`]:{inset:`auto 0 0 0`,justifyContent:`center`}}}},yG=e=>{let{motionEaseOut:t,previewCls:n,motionDurationSlow:r,componentCls:i,colorBgMask:a,marginXL:o,marginSM:s,margin:c,colorTextLightSolid:l,paddingSM:u,paddingLG:d,previewOperationHoverColor:f,previewOperationColorDisabled:p,previewOperationSize:m,zIndexPopup:h}=e,g=new jc(a).setA(.1),_=g.clone().setA(.2),v={position:`absolute`,color:l,backgroundColor:g.toRgbString(),borderRadius:`50%`,padding:u,outline:0,border:0,cursor:`pointer`,transition:`all ${r}`,display:`flex`,fontSize:m,"&:hover":{backgroundColor:_.toRgbString()},"&:active":{backgroundColor:g.toRgbString()},"&:focus-visible":Wl(e)};return{[`${i}-preview`]:{textAlign:`center`,inset:0,position:`fixed`,userSelect:`none`,zIndex:h,[`${n}-mask`]:{inset:0,position:`absolute`,background:a,backdropFilter:`blur(0px)`,transition:`backdrop-filter ${r}`,[`&${i}-preview-mask-blur`]:{backdropFilter:`blur(4px)`},[`&${i}-preview-mask-hidden`]:{display:`none`}},[`${n}-body`]:{..._G(),"pointer-events":`none`,display:`flex`,alignItems:`center`,justifyContent:`center`,"> *":{pointerEvents:`auto`}},[`${n}-img`]:{maxWidth:`100%`,maxHeight:`70%`,verticalAlign:`middle`,transform:`scale3d(1, 1, 1)`,transition:`transform ${r} ${t} 0s`},[`&-movable ${n}-img`]:{cursor:`grab`},[`&-moving ${n}-img`]:{cursor:`grabbing`},[`${n}-close`]:{...v,top:s,insetInlineEnd:s},[`${n}-switch`]:{...v,top:`50%`,transform:`translateY(-50%)`,"&-disabled":{"&, &:hover, &:active":{color:p,background:`transparent`,cursor:`not-allowed`}},"&-prev":{insetInlineStart:s},"&-next":{insetInlineEnd:s}},[`${n}-footer`]:{position:`absolute`,bottom:o,left:{_skip_check_:!0,value:`50%`},display:`flex`,flexDirection:`column`,alignItems:`center`,color:e.previewOperationColor,transform:`translateX(-50%)`,gap:c},[`${n}-actions`]:{display:`flex`,gap:u,padding:`0 ${X(d)}`,backgroundColor:g.toRgbString(),borderRadius:100,fontSize:m,"&-action":{color:`inherit`,background:`transparent`,border:0,font:`inherit`,padding:u,cursor:`pointer`,transition:`all ${r}`,display:`flex`,[`&:not(${n}-actions-action-disabled):hover`]:{color:f},"&:focus-visible":Wl(e),"&-disabled":{color:p,cursor:`not-allowed`}}}}}},bG=e=>{let{componentCls:t}=e;return{[t]:{position:`relative`,display:`inline-block`,...Gl(e),[`${t}-img`]:{width:`100%`,height:`auto`,verticalAlign:`middle`},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:`url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')`,backgroundRepeat:`no-repeat`,backgroundPosition:`center center`,backgroundSize:`30%`},[`${t}-placeholder`]:{..._G()}}}},xG=e=>{let{previewCls:t,motionDurationSlow:n}=e;return{[t]:{"&-fade":{transition:`opacity ${n}`,"&-enter, &-appear":{opacity:0,[`${t}-body`]:{transform:`scale(0)`},"&-active":{opacity:1,[`${t}-body`]:{transform:`scale(1)`,transition:`transform ${n}`}}},"&-leave":{opacity:1,"&-active":{opacity:0,[`${t}-body`]:{transform:`scale(0)`,transition:`transform ${n}`}}}}}}},SG=Xl(`Image`,e=>{let t=lc(e,{previewCls:`${e.componentCls}-preview`,imagePreviewSwitchSize:e.controlHeightLG});return[bG(t),vG(t),yG(t),xG(t)]},e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new jc(e.colorTextLightSolid).setA(.65).toRgbString(),previewOperationHoverColor:new jc(e.colorTextLightSolid).setA(.85).toRgbString(),previewOperationColorDisabled:new jc(e.colorTextLightSolid).setA(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5})),CG={rotateLeft:S.createElement(iG,null),rotateRight:S.createElement(sG,null),zoomIn:S.createElement(pG,null),zoomOut:S.createElement(gG,null),close:S.createElement(ku,null),left:S.createElement(mT,null),right:S.createElement(Ug,null),flipX:S.createElement(uG,null),flipY:S.createElement(uG,{rotate:90})},wG=({previewPrefixCls:e,preview:t,classNames:n,styles:r,...i})=>{let{getPrefixCls:a,getPopupContainer:o,direction:s,preview:c,classNames:l,styles:u}=_a(`image`),d=a(`image`,e),f=`${d}-preview`,p=ap(d),[m,h]=SG(d,p),g=Y(m,h,p),[_,v,y]=tG(t),[b,x,C]=tG(c),w=S.useMemo(()=>({...CG,left:s===`rtl`?S.createElement(Ug,null):S.createElement(mT,null),right:s===`rtl`?S.createElement(mT,null):S.createElement(Ug,null)}),[s]),T=$W(_,b,d,g,o,CG),{mask:E,blurClassName:D}=T??{},O={...i,classNames:n,styles:r},[k,A]=xf([l,n,{cover:Y(C,y),popup:{root:Y(x,v),mask:Y({[`${d}-preview-mask-hidden`]:!E},D)}}],[u,r],{props:O},{popup:{_default:`root`}});return S.createElement(QW.PreviewGroup,{preview:T,previewPrefixCls:f,icons:w,...i,classNames:k,styles:A})},TG=e=>{let{prefixCls:t,preview:n,className:r,rootClassName:i,style:a,styles:o,classNames:s,wrapperStyle:c,fallback:l,...u}=e,{getPrefixCls:d,getPopupContainer:f,className:p,style:m,preview:h,styles:g,classNames:_,fallback:v}=_a(`image`),y=d(`image`,t),b=ap(y),[x,C]=SG(y,b),w=Y(i,x,C,b),T=Y(r,x,p),[E,D,O]=tG(n),[k,A,j]=tG(h),M=$W(E,k,y,w,f,CG,!0),N={...e,preview:M},P=S.useMemo(()=>({cover:Y(j,O),popup:{root:Y(A,D)}}),[D,O,A,j]),{mask:F,blurClassName:I}=M??{},L=S.useMemo(()=>({mask:Y({[`${y}-preview-mask-hidden`]:!F},I)}),[F,y,I]),[R,z]=xf(S.useMemo(()=>[_,s,P,{popup:L}],[_,s,P,L]),[g,{root:c},o],{props:N},{popup:{_default:`root`}}),B={...m,...a},V=l??v;return S.createElement(QW,{prefixCls:y,preview:M||!1,rootClassName:w,className:T,style:B,fallback:V,...u,classNames:R,styles:z})};TG.PreviewGroup=wG;var EG=e=>{let{getPrefixCls:t,direction:n}=(0,S.useContext)(ma),{prefixCls:r,className:i}=e,a=t(`input-group`,r),[o,s]=aR(t(`input`)),c=Y(a,s,{[`${a}-lg`]:e.size===`large`,[`${a}-sm`]:e.size===`small`,[`${a}-compact`]:e.compact,[`${a}-rtl`]:n===`rtl`},o,i),l=(0,S.useContext)(Iy),u=(0,S.useMemo)(()=>({...l,isFormItemInput:!1}),[l]);return S.createElement(Iy.Provider,{value:u},S.createElement(jU.Compact,{className:c,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))},DG=e=>{let{componentCls:t,paddingXS:n}=e;return{[t]:{display:`inline-flex`,alignItems:`center`,flexWrap:`nowrap`,columnGap:n,[`${t}-input-wrapper`]:{position:`relative`,[`${t}-mask-icon`]:{position:`absolute`,zIndex:`1`,top:`50%`,right:`50%`,transform:`translate(50%, -50%)`,pointerEvents:`none`},[`${t}-mask-input`]:{color:`transparent`,caretColor:e.colorText,"&::selection":{color:`transparent`}},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":`none`,margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":`textfield`}},"&-rtl":{direction:`rtl`},[`${t}-input`]:{textAlign:`center`,paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},OG=Xl([`Input`,`OTP`],e=>DG(lc(e,zL(e))),BL),kG=S.forwardRef((e,t)=>{let{className:n,value:r,onChange:i,onActiveChange:a,index:o,mask:s,onFocus:c,...l}=e,{getPrefixCls:u}=S.useContext(ma),d=u(`otp`),f=typeof s==`string`?s:r,p=S.useRef(null);S.useImperativeHandle(t,()=>p.current);let m=e=>{i(o,e.target.value)},h=()=>{Ei(()=>{let e=p.current?.input;document.activeElement===e&&e&&e.select()})},g=e=>{c?.(e),h()},_=e=>{let{key:t,ctrlKey:n,metaKey:i}=e;t===`ArrowLeft`?a(o-1):t===`ArrowRight`?a(o+1):t===`z`&&(n||i)?e.preventDefault():t===`Backspace`&&!r&&a(o-1),h()};return S.createElement(`span`,{className:`${d}-input-wrapper`,role:`presentation`},s&&r!==``&&r!==void 0&&S.createElement(`span`,{className:`${d}-mask-icon`,"aria-hidden":`true`},f),S.createElement(MV,{"aria-label":`OTP Input ${o+1}`,type:s===!0?`password`:`text`,...l,ref:p,value:r,onInput:m,onFocus:g,onKeyDown:_,onMouseDown:h,onMouseUp:h,className:Y(n,{[`${d}-mask-input`]:s})}))});function AG(e){return(e||``).split(``)}var jG=e=>{let{index:t,prefixCls:n,separator:r,className:i,style:a}=e,o=typeof r==`function`?r(t):r;return o?S.createElement(`span`,{className:Y(`${n}-separator`,i),style:a},o):null},MG=S.forwardRef((e,t)=>{let{prefixCls:n,length:r=6,size:i,defaultValue:a,value:o,onChange:s,formatter:c,separator:l,variant:u,disabled:d,status:f,autoFocus:p,mask:m,type:h,autoComplete:g,onInput:_,onFocus:v,inputMode:y,classNames:b,styles:x,className:C,style:w,...T}=e,{classNames:E,styles:D,getPrefixCls:O,direction:k,style:A,className:j}=_a(`otp`),M=O(`otp`,n),N={...e,length:r},[P,F]=xf([E,b],[D,x],{props:N}),I=bi(T,{aria:!0,data:!0,attr:!0}),[L,R]=OG(M),z=Oh(e=>i??e),B=S.useContext(Iy),V=DC(B.status,f),H=S.useMemo(()=>({...B,status:V,hasFeedback:!1,feedbackIcon:null}),[B,V]),U=S.useRef(null),ee=S.useRef({});S.useImperativeHandle(t,()=>({focus:()=>{ee.current[0]?.focus()},blur:()=>{for(let e=0;ec?c(e):e,[ne,W]=S.useState(()=>AG(te(a||``)));S.useEffect(()=>{o!==void 0&&W(AG(o))},[o]);let re=Rn(e=>{W(e),_&&_(e),s&&e.length===r&&e.every(e=>e)&&e.some((e,t)=>ne[t]!==e)&&s(e.join(``))}),G=Rn((e,t)=>{let n=da(ne);for(let t=0;t=0&&!n[e];--e)n.pop();return n=AG(te(n.map(e=>e||` `).join(``))).map((e,t)=>e===` `&&!n[t]?n[t]:e),n}),K=(e,t)=>{let n=G(e,t),i=Math.min(e+t.length,r-1);i!==e&&n[e]!==void 0&&ee.current[i]?.focus(),re(n)},q=e=>{ee.current[e]?.focus()},ie=(e,t)=>{for(let e=0;e{let n=`otp-${t}`,i=ne[t]||``;return S.createElement(S.Fragment,{key:n},S.createElement(kG,{ref:e=>{ee.current[t]=e},index:t,size:z,htmlSize:1,className:Y(P.input,`${M}-input`),style:F.input,onChange:K,value:i,onActiveChange:q,autoFocus:t===0&&p,onFocus:e=>ie(e,t),...J}),t{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z`}},{tag:`path`,attrs:{d:`M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z`}}]},name:`eye-invisible`,theme:`outlined`}}))());function PG(){return PG=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,PG({},e,{ref:t,icon:NG.default}))),IG=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z`}}]},name:`eye`,theme:`outlined`}}))());function LG(){return LG=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,LG({},e,{ref:t,icon:IG.default}))),zG=e=>e?S.createElement(RG,null):S.createElement(FG,null),BG={click:`onClick`,hover:`onMouseOver`},VG=S.forwardRef((e,t)=>{let{disabled:n,action:r=`click`,visibilityToggle:i=!0,iconRender:a=zG,suffix:o}=e,s=S.useContext(pm),c=n??s,l=ef(i)&&i.visible!==void 0,[u,d]=(0,S.useState)(()=>l?i.visible:!1),f=(0,S.useRef)(null);S.useEffect(()=>{l&&d(i.visible)},[l,i]);let p=AV(f),m=()=>{if(c)return;u&&p();let e=!u;d(e),ef(i)&&i.onVisibleChange?.(e)},h=e=>{let t=BG[r]||``,n=a(u),i={[t]:m,className:`${e}-icon`,key:`passwordIcon`,onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}};return S.cloneElement(S.isValidElement(n)?n:S.createElement(`span`,null,n),i)},{className:g,prefixCls:_,inputPrefixCls:v,size:y,...b}=e,{getPrefixCls:x}=S.useContext(ma),C=x(`input`,v),w=x(`input-password`,_),T=i&&h(w),E=Y(w,g,{[`${w}-${y}`]:!!y}),D={...hi(b,[`suffix`,`iconRender`,`visibilityToggle`]),type:u?`text`:`password`,className:E,prefixCls:C,suffix:S.createElement(S.Fragment,null,T,o)};return y&&(D.size=y),S.createElement(MV,{ref:sr(t,f),...D})}),HG=Xl([`Input`,`Search`],e=>{let{componentCls:t}=e,n=`${t}-btn`;return{[t]:{width:`100%`,[n]:{"&-filled":{background:e.colorFillTertiary,"&:not(:disabled)":{"&:hover":{background:e.colorFillSecondary},"&:active":{background:e.colorFill}}}}}}}),UG=S.forwardRef((e,t)=>{let{prefixCls:n,inputPrefixCls:r,className:i,size:a,style:o,enterButton:s=!1,addonAfter:c,loading:l,disabled:u,onSearch:d,onChange:f,onCompositionStart:p,onCompositionEnd:m,variant:h,onPressEnter:g,classNames:_,styles:v,hidden:y,...b}=e,{direction:x,getPrefixCls:C,classNames:w,styles:T}=_a(`inputSearch`),E={...e,enterButton:s},[D,O]=xf([w,_],[T,v],{props:E},{button:{_default:`root`}}),k=S.useRef(!1),A=C(`input-search`,n),j=C(`input`,r),[M,N]=HG(A),{compactSize:P}=jh(A,x),F=Oh(e=>a??P??e),I=S.useRef(null),L=e=>{e?.target&&e.type===`click`&&d&&d(e.target.value,e,{source:`clear`}),f?.(e)},R=e=>{document.activeElement===I.current?.input&&e.preventDefault()},z=e=>{d&&d(I.current?.input?.value,e,{source:`input`})},B=e=>{k.current||l||(g?.(e),z(e))},V=typeof s==`boolean`?S.createElement(aw,null):null,H=`${A}-btn`,U=Y(H,{[`${H}-${h}`]:h}),ee,te=s||{},ne=te.type&&te.type.__ANT_BUTTON===!0;ee=ne||te.type===`button`?cm(te,{onMouseDown:R,onClick:e=>{te?.props?.onClick?.(e),z(e)},key:`enterButton`,...ne?{className:U,size:F}:{}}):S.createElement(E_,{classNames:D.button,styles:O.button,className:U,color:s?`primary`:`default`,size:F,disabled:u,key:`enterButton`,onMouseDown:R,onClick:z,loading:l,icon:V,variant:h===`borderless`||h===`filled`||h===`underlined`?`text`:s?`solid`:void 0},s),c&&(ee=[ee,cm(c,{key:`addonAfter`})]);let W=Y(A,N,{[`${A}-rtl`]:x===`rtl`,[`${A}-${F}`]:!!F,[`${A}-with-button`]:!!s},i,M,D.root),re=e=>{k.current=!0,p?.(e)},G=e=>{k.current=!1,m?.(e)},K=bi(b,{data:!0}),q=hi({...b,classNames:hi(D,[`button`,`root`]),styles:hi(O,[`button`,`root`]),prefixCls:j,type:`search`,size:F,variant:h,onPressEnter:B,onCompositionStart:re,onCompositionEnd:G,onChange:L,disabled:u},Object.keys(K));return S.createElement(Ph,{className:W,style:{...o,...O.root},...K,hidden:y},S.createElement(MV,{ref:sr(I,t),...q}),ee)}),WG=` + ${r}-col-xl-24${n}-label`]:BU(e)},[`@media (max-width: ${X(e.screenXSMax)})`]:[UU(e),{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-xs-24${n}-label`]:BU(e)}}}],[`@media (max-width: ${X(e.screenSMMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-sm-24${n}-label`]:BU(e)}}},[`@media (max-width: ${X(e.screenMDMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-md-24${n}-label`]:BU(e)}}},[`@media (max-width: ${X(e.screenLGMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-lg-24${n}-label`]:BU(e)}}}}},GU=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}),KU=(e,t)=>lc(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),qU=Xl(`Form`,(e,{rootPrefixCls:t})=>{let n=KU(e,t);return[RU(n),zU(n),FU(n),VU(n),HU(n),WU(n),Jh(n),yg]},GU,{order:-1e3}),JU=[];function YU(e,t,n,r=0){return{key:typeof e==`string`?e:`${t}-${r}`,error:e,errorStatus:n}}var XU=({help:e,helpStatus:t,errors:n=JU,warnings:r=JU,className:i,fieldId:a,onVisibleChanged:o})=>{let{prefixCls:s}=S.useContext(Py),c=`${s}-item-explain`,l=ap(s),[u,d]=qU(s,l),f=S.useMemo(()=>_h(s),[s]),p=PU(n),m=PU(r),h=S.useMemo(()=>Zd(e)?[YU(e,`help`,t)]:[].concat(da(p.map((e,t)=>YU(e,`error`,`error`,t))),da(m.map((e,t)=>YU(e,`warning`,`warning`,t)))),[e,t,p,m]),g=S.useMemo(()=>{let e={};return h.forEach(({key:t})=>{e[t]=(e[t]||0)+1}),h.map((t,n)=>({...t,key:e[t.key]>1?`${t.key}-fallback-${n}`:t.key}))},[h]),_={};return a&&(_.id=`${a}_help`),S.createElement(Ed,{motionDeadline:f.motionDeadline,motionName:`${s}-show-help`,visible:!!g.length,onVisibleChanged:o},e=>{let{className:t,style:n}=e;return S.createElement(`div`,{..._,className:Y(c,t,d,l,i,u),style:n},S.createElement(Td,{keys:g,..._h(s),motionName:`${s}-show-help-item`,component:!1},e=>{let{key:t,error:n,errorStatus:r,className:i,style:a}=e;return S.createElement(`div`,{key:t,className:Y(i,{[`${c}-${r}`]:r}),style:a},n)}))})},ZU=S.forwardRef((e,t)=>{let n=S.useContext(pm),{getPrefixCls:r,direction:i,requiredMark:a,colon:o,scrollToFirstError:s,className:c,style:l,styles:u,classNames:d,tooltip:f}=_a(`form`),{prefixCls:p,className:m,rootClassName:h,size:g,disabled:_=n,form:v,colon:y,labelAlign:b,labelWrap:x,labelCol:C,wrapperCol:w,layout:T=`horizontal`,scrollToFirstError:E,requiredMark:D,onFinishFailed:O,name:k,style:A,feedbackIcons:j,variant:M,classNames:N,styles:P,tooltip:F,...I}=e,L=Oh(g),R=S.useContext(op),z=S.useMemo(()=>D===void 0?a===void 0?!0:a:D,[D,a]),B=y??o,V={...f,...F},H=r(`form`,p),U=ap(H),[ee,te]=qU(H,U),ne={...e,size:L,disabled:_,layout:T,colon:B,requiredMark:z},[W,re]=xf([d,N],[u,P],{props:ne}),G=Y(H,`${H}-${T}`,{[`${H}-hide-required-mark`]:z===!1,[`${H}-rtl`]:i===`rtl`,[`${H}-large`]:L===`large`,[`${H}-small`]:L===`small`},te,U,ee,c,m,h,W.root),[K]=kL(v),{__INTERNAL__:q}=K;q.name=k;let ie=S.useMemo(()=>({name:k,labelAlign:b,labelCol:C,labelWrap:x,wrapperCol:w,layout:T,colon:B,requiredMark:z,itemRef:q.itemRef,form:K,feedbackIcons:j,tooltip:V,classNames:W,styles:re}),[k,b,C,w,T,B,z,K,j,W,re,V]),J=S.useRef(null);S.useImperativeHandle(t,()=>({...K,nativeElement:J.current?.nativeElement}));let ae=(e,t)=>{if(e){let n={block:`nearest`};ef(e)&&(n={...n,...e}),K.scrollToField(t,n)}},oe=e=>{if(O?.(e),e.errorFields.length){let t=e.errorFields[0].name;if(E!==void 0){ae(E,t);return}s!==void 0&&ae(s,t)}};return S.createElement(Ly.Provider,{value:M},S.createElement(mm,{disabled:_},S.createElement(hm.Provider,{value:L},S.createElement(Ny,{validateMessages:R},S.createElement(jy.Provider,{value:ie},S.createElement(Iy,{status:!0},S.createElement(Ay,{id:k,...I,name:k,onFinishFailed:oe,form:K,ref:J,style:{...re?.root,...l,...A},className:G})))))))});function QU(e){if(typeof e==`function`)return e;let t=Di(e);return t.length<=1?t[0]:t}var $U=()=>{let{status:e,errors:t=[],warnings:n=[]}=S.useContext(Fy);return{status:e,errors:t,warnings:n}};$U.Context=Fy;function eW(e){let[t,n]=S.useState(e),r=S.useRef(null),i=S.useRef([]),a=S.useRef(!1);S.useEffect(()=>(a.current=!1,()=>{a.current=!0,Ei.cancel(r.current),r.current=null}),[]);function o(e){a.current||(r.current===null&&(i.current=[],r.current=Ei(()=>{r.current=null,n(e=>{let t=e;return i.current.forEach(e=>{t=e(t)}),t})})),i.current.push(e))}return[t,o]}var tW=()=>{let{itemRef:e}=S.useContext(jy),t=S.useRef({});function n(n,r){let i=r&&typeof r==`object`&&fr(r),a=n.join(`_`);return(t.current.name!==a||t.current.originRef!==i)&&(t.current.name=a,t.current.originRef=i,t.current.ref=sr(e(n),i)),t.current.ref}return n},nW=e=>{let{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${t}-control`]:{display:`flex`}}}},rW=Ql([`Form`,`item-item`],(e,{rootPrefixCls:t})=>nW(KU(e,t))),iW=24,aW=e=>{let{prefixCls:t,status:n,labelCol:r,wrapperCol:i,children:a,errors:o,warnings:s,_internalItemRender:c,extra:l,help:u,fieldId:d,marginBottom:f,onErrorVisibleChanged:p,label:m}=e,h=`${t}-item`,g=S.useContext(jy),{classNames:_,styles:v}=g,y=S.useMemo(()=>{let e={...i||g.wrapperCol||{}};return m===null&&!r&&!i&&g.labelCol&&[void 0].concat(da(fw)).forEach(t=>{let n=t?[t]:[],r=Oi(g.labelCol,n),i=ef(r)?r:{},a=Oi(e,n),o=ef(a)?a:{};`span`in i&&!(`offset`in o)&&i.span{let{labelCol:e,wrapperCol:t,...n}=g;return n},[g]),C=S.useRef(null),[w,T]=S.useState(0);Vn(()=>{l&&C.current?T(C.current.clientHeight):T(0)},[l]);let E=S.createElement(`div`,{className:`${h}-control-input`},S.createElement(`div`,{className:Y(`${h}-control-input-content`,_?.content),style:v?.content},a)),D=S.useMemo(()=>({prefixCls:t,status:n}),[t,n]),O=f!==null||o.length||s.length?S.createElement(Py.Provider,{value:D},S.createElement(XU,{fieldId:d,errors:o,warnings:s,help:u,helpStatus:n,className:`${h}-explain-connected`,onVisibleChanged:p})):null,k={};d&&(k.id=`${d}_extra`);let A=l?S.createElement(`div`,{...k,className:`${h}-extra`,ref:C},l):null,j=O||A?S.createElement(`div`,{className:`${h}-additional`,style:f?{minHeight:f+w}:{}},O,A):null,M=c&&c.mark===`pro_table_render`&&c.render?c.render(e,{input:E,errorList:O,extra:A}):S.createElement(S.Fragment,null,E,j);return S.createElement(jy.Provider,{value:x},S.createElement(cV,{...y,className:b},M),S.createElement(rW,{prefixCls:t}))},oW=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={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`}}))());function sW(){return sW=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,sW({},e,{ref:t,icon:oW.default}))),lW=({prefixCls:e,label:t,htmlFor:n,labelCol:r,labelAlign:i,colon:a,required:o,requiredMark:s,tooltip:c,vertical:l})=>{let[u]=qd(`Form`),{labelAlign:d,labelCol:f,labelWrap:p,colon:m,classNames:h,styles:g,tooltip:_}=S.useContext(jy);if(!t)return null;let v=r||f||{},y=i||d,b=`${e}-item-label`,x=Y(b,y===`left`&&`${b}-left`,v.className,{[`${b}-wrap`]:!!p}),C=t,w=a===!0||m!==!1&&a!==!1;w&&!l&&typeof t==`string`&&t.trim()&&(C=t.replace(/[:|:]\s*$/,``));let T=NU(c,_);if(T){let t=S.createElement($w,{...T},S.createElement(`span`,{className:`${e}-item-tooltip`,onClick:e=>{e.preventDefault()},tabIndex:-1},T.icon||T.children||S.createElement(cW,null)));C=S.createElement(S.Fragment,null,C,t)}let E=s===`optional`,D=typeof s==`function`,O=s===!1;D?C=s(C,{required:!!o}):E&&!o&&(C=S.createElement(S.Fragment,null,C,S.createElement(`span`,{className:`${e}-item-optional`,title:``},u?.optional||Bd.Form?.optional)));let k;O?k=`hidden`:(E||D)&&(k=`optional`);let A=Y(h?.label,{[`${e}-item-required`]:o,[`${e}-item-required-mark-${k}`]:k,[`${e}-item-no-colon`]:!w});return S.createElement(cV,{...v,className:x},S.createElement(`label`,{htmlFor:n,className:A,style:g?.label,title:typeof t==`string`?t:``},C))},uW={success:Cu,warning:Mu,error:Eu,validating:Xm};function dW({children:e,errors:t,warnings:n,hasFeedback:r,validateStatus:i,prefixCls:a,meta:o,noStyle:s,name:c}){let l=`${a}-item`,{feedbackIcons:u}=S.useContext(jy),d=EL(t,n,o,null,!!r,i),{isFormItemInput:f,status:p,hasFeedback:m,feedbackIcon:h,name:g}=S.useContext(Fy),_=S.useMemo(()=>{let e;if(r){let i=r!==!0&&r.icons||u,a=d&&i?.({status:d,errors:t,warnings:n})?.[d],o=d?uW[d]:null;e=a!==!1&&o?S.createElement(`span`,{className:Y(`${l}-feedback-icon`,`${l}-feedback-icon-${d}`)},a||S.createElement(o,null)):null}let i={status:d||``,errors:t,warnings:n,hasFeedback:!!r,feedbackIcon:e,isFormItemInput:!0,name:c};return s&&(i.status=(d??p)||``,i.isFormItemInput=f,i.hasFeedback=!!(r??m),i.feedbackIcon=r===void 0?h:i.feedbackIcon,i.name=c??g),i},[d,r,s,f,p]);return S.createElement(Fy.Provider,{value:_},e)}function fW(e){let{prefixCls:t,className:n,rootClassName:r,style:i,help:a,errors:o,warnings:s,validateStatus:c,meta:l,hasFeedback:u,hidden:d,children:f,fieldId:p,required:m,isRequired:h,onSubItemMetaChange:g,layout:_,name:v,...y}=e,b=`${t}-item`,{requiredMark:x,layout:C}=S.useContext(jy),w=_||C,T=w===`vertical`,E=S.useRef(null),D=PU(o),O=PU(s),k=Zd(a),A=!!(k||o.length||s.length),j=!!E.current&&kr(E.current),[M,N]=S.useState(null);Vn(()=>{if(A&&E.current){let e=getComputedStyle(E.current);N(Number.parseInt(e.marginBottom,10))}},[A,j]);let P=e=>{e||N(null)},F=((e=!1)=>EL(e?D:l.errors,e?O:l.warnings,l,``,!!u,c))(),I=Y(b,n,r,{[`${b}-with-help`]:k||D.length||O.length,[`${b}-has-feedback`]:F&&u,[`${b}-has-success`]:F===`success`,[`${b}-has-warning`]:F===`warning`,[`${b}-has-error`]:F===`error`,[`${b}-is-validating`]:F===`validating`,[`${b}-hidden`]:d,[`${b}-${w}`]:w});return S.createElement(`div`,{className:I,style:i,ref:E},S.createElement(dV,{className:`${b}-row`,...hi(y,`_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`.split(`.`))},S.createElement(lW,{htmlFor:p,...e,requiredMark:x,required:m??h,prefixCls:t,vertical:T}),S.createElement(aW,{...e,...l,errors:D,warnings:O,prefixCls:t,status:F,help:a,marginBottom:M,onErrorVisibleChanged:P},S.createElement(My.Provider,{value:g},S.createElement(dW,{prefixCls:t,meta:l,errors:l.errors,warnings:l.warnings,hasFeedback:u,validateStatus:F,name:v},f)))),!!M&&S.createElement(`div`,{className:`${b}-margin-offset`,style:{marginBottom:-M}}))}var pW=`__SPLIT__`;function mW(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>{let r=e[n],i=t[n];return r===i||typeof r==`function`||typeof i==`function`})}var hW=S.memo(e=>e.children,(e,t)=>mW(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every((e,n)=>e===t.childProps[n]));function gW(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function _W(e){let{name:t,noStyle:n,className:r,dependencies:i,prefixCls:a,shouldUpdate:o,rules:s,children:c,required:l,label:u,messageVariables:d,trigger:f=`onChange`,validateTrigger:p,hidden:m,help:h,layout:g}=e,{getPrefixCls:_}=S.useContext(ma),{name:v}=S.useContext(jy),y=QU(c),b=typeof y==`function`,x=S.useContext(My),{validateTrigger:C}=S.useContext(Y_),w=Zd(p)?p:C,T=Zd(t),E=_(`form`,a),D=ap(E),[O,k]=qU(E,D);Ui(`Form.Item`);let A=S.useContext(X_),j=S.useRef(null),[M,N]=eW({}),[P,F]=Un(()=>gW()),I=e=>{let t=A?.getKey(e.name);if(F(e.destroy?gW():e,!0),n&&h!==!1&&x){let n=e.name;if(e.destroy)n=j.current||n;else if(t!==void 0){let[e,r]=t;n=[e].concat(da(r)),j.current=n}x(e,n)}},L=(e,t)=>{N(n=>{let r={...n},i=[].concat(da(e.name.slice(0,-1)),da(t)).join(pW);return e.destroy?delete r[i]:r[i]=e,r})},[R,z]=S.useMemo(()=>{let e=da(P.errors),t=da(P.warnings);return Object.values(M).forEach(n=>{e.push.apply(e,da(n.errors||[])),t.push.apply(t,da(n.warnings||[]))}),[e,t]},[M,P.errors,P.warnings]),B=tW();function V(i,a,o){return n&&!m?S.createElement(dW,{prefixCls:E,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:P,errors:R,warnings:z,noStyle:!0,name:t},i):S.createElement(fW,{key:`row`,...e,className:Y(r,k,D,O),prefixCls:E,fieldId:a,isRequired:o,errors:R,warnings:z,meta:P,onSubItemMetaChange:L,layout:g,name:t},i)}if(!T&&!b&&!i)return V(y);let H={};return typeof u==`string`?H.label=u:t&&(H.label=String(t)),d&&(H={...H,...d}),S.createElement(gy,{...e,messageVariables:H,trigger:f,validateTrigger:w,onMetaChange:I},(n,r,a)=>{let c=wL(t).length&&r?r.name:[],u=TL(c,v),d=l===void 0?s?.some(e=>{if(ef(e)&&e.required&&!e.warningOnly)return!0;if(typeof e==`function`){let t=e(a);return t?.required&&!t?.warningOnly}return!1}):l,p={...n},m=null;if(Array.isArray(y)&&T)m=y;else if(!(b&&(!(o||i)||T))&&!(i&&!b&&!T))if(S.isValidElement(y)){let t={...y.props,...p};if(t.id||=u,h||R.length>0||z.length>0||e.extra){let n=[];(h||R.length>0)&&n.push(`${u}_help`),e.extra&&n.push(`${u}_extra`),t[`aria-describedby`]=n.join(` `)}R.length>0&&(t[`aria-invalid`]=`true`),d&&(t[`aria-required`]=`true`),lr(y)&&(t.ref=B(c,y)),new Set([].concat(da(wL(f)),da(wL(w)))).forEach(e=>{t[e]=(...t)=>{p[e]?.(...t),y.props[e]?.(...t)}});let n=[t[`aria-required`],t[`aria-invalid`],t[`aria-describedby`]];m=S.createElement(hW,{control:p,update:y,childProps:n},cm(y,t))}else m=b&&(o||i)&&!T?y(a):y;return V(m,u,d)})}var vW=_W;vW.useStatus=$U;var yW=({prefixCls:e,children:t,...n})=>{let{getPrefixCls:r}=S.useContext(ma),i=r(`form`,e),a=S.useMemo(()=>({prefixCls:i,status:`error`}),[i]);return S.createElement(_y,{...n},(e,n,r)=>S.createElement(Py.Provider,{value:a},t(e.map(e=>({...e,fieldKey:e.key})),n,{errors:r.errors,warnings:r.warnings})))};function bW(){let{form:e}=S.useContext(jy);return e}var xW=ZU;xW.Item=vW,xW.List=yW,xW.ErrorList=XU,xW.useForm=kL,xW.useFormInstance=bW,xW.useWatch=ky,xW.Provider=Ny;var SW=S.createContext(null);function CW(e){return new Promise(t=>{if(!e){t(!1);return}let n=document.createElement(`img`);n.onerror=()=>t(!1),n.onload=()=>t(!0),n.src=e})}function wW(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}var TW={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function EW(e,t,n,r){let i=(0,S.useRef)(null),a=(0,S.useRef)([]),[o,s]=(0,S.useState)(TW),c=e=>{s(TW),di(TW,o)||r?.({transform:TW,action:e})},l=(e,t)=>{i.current===null&&(a.current=[],i.current=Ei(()=>{s(e=>{let n=e;return a.current.forEach(e=>{n={...n,...e}}),i.current=null,r?.({transform:n,action:t}),n})})),a.current.push({...o,...e})};return{transform:o,resetTransform:c,updateTransform:l,dispatchZoomChange:(r,i,a,s,c)=>{let{width:u,height:d,offsetWidth:f,offsetHeight:p,offsetLeft:m,offsetTop:h}=e.current,g=r,_=o.scale*r;_>n?(_=n,g=n/o.scale):_r){if(t>0)return{[e]:a};if(t<0&&ir)return{[e]:t<0?a:-a};return{}}function OW(e,t,n,r){let{width:i,height:a}=wW(),o=null;return e<=i&&t<=a?o={x:0,y:0}:(e>i||t>a)&&(o={...DW(`x`,n,e,i),...DW(`y`,r,t,a)}),o}function kW(e,t,n,r,i,a,o){let{rotate:s,scale:c,x:l,y:u}=i,[d,f]=(0,S.useState)(!1),p=(0,S.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),m=e=>{!t||e.button!==0||(e.preventDefault(),e.stopPropagation(),p.current={diffX:e.pageX-l,diffY:e.pageY-u,transformX:l,transformY:u},f(!0))},h=e=>{n&&d&&a({x:e.pageX-p.current.diffX,y:e.pageY-p.current.diffY},`move`)},g=()=>{if(n&&d){f(!1);let{transformX:t,transformY:n}=p.current;if(!(l!==t&&u!==n))return;let r=e.current.offsetWidth*c,i=e.current.offsetHeight*c,{left:o,top:d}=e.current.getBoundingClientRect(),m=s%180!=0,h=OW(m?i:r,m?r:i,o,d);h&&a({...h},`dragRebound`)}};return(0,S.useEffect)(()=>{if(t){window.addEventListener(`mouseup`,g,!1),window.addEventListener(`mousemove`,h,!1);try{window.top!==window.self&&(window.top.addEventListener(`mouseup`,g,!1),window.top.addEventListener(`mousemove`,h,!1))}catch(e){`${e}`}}return()=>{window.removeEventListener(`mouseup`,g),window.removeEventListener(`mousemove`,h);try{window.top?.removeEventListener(`mouseup`,g),window.top?.removeEventListener(`mousemove`,h)}catch{}}},[n,d,l,u,s,t]),{isMoving:d,onMouseDown:m,onMouseMove:h,onMouseUp:g,onWheel:e=>{if(!n||e.deltaY==0)return;let t=Math.abs(e.deltaY/100),i=1+Math.min(t,1)*r;e.deltaY>0&&(i=1/i),o(i,`wheel`,e.clientX,e.clientY)}}}function AW({src:e,isCustomPlaceholder:t,fallback:n}){let[r,i]=(0,S.useState)(t?`loading`:`normal`),a=(0,S.useRef)(!1),o=r===`error`;(0,S.useEffect)(()=>{let t=!0;return CW(e).then(e=>{!e&&t&&i(`error`)}),()=>{t=!1}},[e]),(0,S.useEffect)(()=>{t&&!a.current?i(`loading`):o&&i(`normal`)},[e]);let s=()=>{i(`normal`)};return[e=>{a.current=!1,r===`loading`&&e?.complete&&(e.naturalWidth||e.naturalHeight)&&(a.current=!0,s())},o&&n?{src:n}:{onLoad:s,src:e},r]}function jW(e,t){let n=e.x-t.x,r=e.y-t.y;return Math.hypot(n,r)}function MW(e,t,n,r){let i=jW(e,n),a=jW(t,r);if(i===0&&a===0)return[e.x,e.y];let o=i/(i+a);return[e.x+o*(t.x-e.x),e.y+o*(t.y-e.y)]}function NW(e,t,n,r,i,a,o){let{rotate:s,scale:c,x:l,y:u}=i,[d,f]=(0,S.useState)(!1),p=(0,S.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:`none`}),m=e=>{p.current={...p.current,...e}};return(0,S.useEffect)(()=>{let e=e=>{e.preventDefault()};return n&&t&&window.addEventListener(`touchmove`,e,{passive:!1}),()=>{window.removeEventListener(`touchmove`,e)}},[n,t]),{isTouching:d,onTouchStart:e=>{if(!t)return;e.stopPropagation(),f(!0);let{touches:n=[]}=e;n.length>1?m({point1:{x:n[0].clientX,y:n[0].clientY},point2:{x:n[1].clientX,y:n[1].clientY},eventType:`touchZoom`}):m({point1:{x:n[0].clientX-l,y:n[0].clientY-u},eventType:`move`})},onTouchMove:e=>{let{touches:t=[]}=e,{point1:n,point2:r,eventType:i}=p.current;if(t.length>1&&i===`touchZoom`){let e={x:t[0].clientX,y:t[0].clientY},i={x:t[1].clientX,y:t[1].clientY},[a,s]=MW(n,r,e,i);o(jW(e,i)/jW(n,r),`touchZoom`,a,s,!0),m({point1:e,point2:i,eventType:`touchZoom`})}else i===`move`&&(a({x:t[0].clientX-n.x,y:t[0].clientY-n.y},`move`),m({eventType:`move`}))},onTouchEnd:()=>{if(!n)return;if(d&&f(!1),m({eventType:`none`}),r>c)return a({x:0,y:0,scale:r},`touchZoom`);let t=e.current.offsetWidth*c,i=e.current.offsetHeight*c,{left:o,top:l}=e.current.getBoundingClientRect(),u=s%180!=0,p=OW(u?i:t,u?t:i,o,l);p&&a({...p},`dragRebound`)}}}function PW(e){let{prefixCls:t,icon:n,onClick:r,className:i,style:a}=e;return S.createElement(`button`,{className:Y(`${t}-close`,i),style:a,onClick:r},n)}function FW(e){let{prefixCls:t,showProgress:n,current:r,count:i,showSwitch:a,classNames:o,styles:s,icons:c,image:l,transform:u,countRender:d,actionsRender:f,scale:p,minScale:m,maxScale:h,onActive:g,onFlipY:_,onFlipX:v,onRotateLeft:y,onRotateRight:b,onZoomOut:x,onZoomIn:C,onClose:w,onReset:T}=e,{left:E,right:D,prev:O,next:k,flipY:A,flipX:j,rotateLeft:M,rotateRight:N,zoomOut:P,zoomIn:F}=c,I=n&&S.createElement(`div`,{className:`${t}-progress`},d?d(r+1,i):S.createElement(`bdi`,null,`${r+1} / ${i}`)),L=`${t}-actions-action`,R=({type:e,disabled:t,onClick:n,icon:r})=>S.createElement(`button`,{type:`button`,key:e,className:Y(L,`${L}-${e}`,{[`${L}-disabled`]:!!t}),onClick:n,disabled:!!t,"aria-label":e},r),z=a?R({icon:O??E,onClick:()=>g(-1),type:`prev`,disabled:r===0}):void 0,B=a?R({icon:k??D,onClick:()=>g(1),type:`next`,disabled:r===i-1}):void 0,V=R({icon:A,onClick:_,type:`flipY`}),H=R({icon:j,onClick:v,type:`flipX`}),U=R({icon:M,onClick:y,type:`rotateLeft`}),ee=R({icon:N,onClick:b,type:`rotateRight`}),te=R({icon:P,onClick:x,type:`zoomOut`,disabled:p<=m}),ne=R({icon:F,onClick:C,type:`zoomIn`,disabled:p===h}),W=S.createElement(`div`,{className:Y(`${t}-actions`,o.actions),style:s.actions},V,H,U,ee,te,ne);return S.createElement(`div`,{className:Y(`${t}-footer`,o.footer),style:s.footer},I,f?f(W,{icons:{prevIcon:z,nextIcon:B,flipYIcon:V,flipXIcon:H,rotateLeftIcon:U,rotateRightIcon:ee,zoomOutIcon:te,zoomInIcon:ne},actions:{onActive:g,onFlipY:_,onFlipX:v,onRotateLeft:y,onRotateRight:b,onZoomOut:x,onZoomIn:C,onReset:T,onClose:w},transform:u,current:r,total:i,image:l}):W)}function IW(e){let{prefixCls:t,onActive:n,current:r,count:i,icons:{left:a,right:o,prev:s,next:c}}=e,l=`${t}-switch`,u=r===0,d=r===i-1;return S.createElement(S.Fragment,null,S.createElement(`button`,{className:Y(l,`${l}-prev`,{[`${l}-disabled`]:u}),onClick:()=>n(-1),disabled:u},s??a),S.createElement(`button`,{type:`button`,className:Y(l,`${l}-next`,{[`${l}-disabled`]:d}),onClick:()=>n(1),disabled:d},c??o))}function LW(){return LW=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let[i,a]=AW({src:t,fallback:e});return S.createElement(`img`,LW({ref:e=>{n.current=e,i(e)}},r,a))},zW=e=>{let{prefixCls:t,rootClassName:n,src:r,alt:i,imageInfo:a,fallback:o,movable:s=!0,onClose:c,open:l,afterOpenChange:u,maskClosable:d=!0,icons:f={},closeIcon:p,getContainer:m,current:h=0,count:g=1,countRender:_,scaleStep:v=.5,minScale:y=1,maxScale:b=50,motionName:x=`fade`,imageRender:C,imgCommonProps:w,actionsRender:T,onTransform:E,onChange:D,classNames:O={},styles:k={},mousePosition:A,zIndex:j,focusTrap:M=!0}=e,N=(0,S.useRef)(),P=(0,S.useRef)(null),F=(0,S.useRef)(null),I=(0,S.useContext)(SW),L=I&&g>1,R=I&&g>=1,[z,B]=(0,S.useState)(!0),{transform:V,resetTransform:H,updateTransform:U,dispatchZoomChange:ee}=EW(N,y,b,E),{isMoving:te,onMouseDown:ne,onWheel:W}=kW(N,s,l,v,V,U,ee),{isTouching:re,onTouchStart:G,onTouchMove:K,onTouchEnd:q}=NW(N,s,l,y,V,U,ee),{rotate:ie,scale:J}=V;(0,S.useEffect)(()=>{z||B(!0)},[z]),(0,S.useEffect)(()=>{l||H(`close`)},[l]);let ae=S.createElement(RW,LW({},w,{width:e.width,height:e.height,imgRef:N,className:`${t}-img`,alt:i,style:{transform:`translate3d(${V.x}px, ${V.y}px, 0) scale3d(${V.flipX?`-`:``}${J}, ${V.flipY?`-`:``}${J}, 1) rotate(${ie}deg)`,transitionDuration:(!z||re)&&`0s`},fallback:o,src:r,onWheel:W,onMouseDown:ne,onDoubleClick:e=>{l&&(J===1?ee(1+v,`doubleClick`,e.clientX,e.clientY):U({x:0,y:0,scale:1},`doubleClick`))},onTouchStart:G,onTouchMove:K,onTouchEnd:q,onTouchCancel:q})),oe={url:r,alt:i,...a},se=()=>{ee(1+v,`zoomIn`)},ce=()=>{ee(1/(1+v),`zoomOut`)},le=()=>{U({rotate:ie+90},`rotateRight`)},ue=()=>{U({rotate:ie-90},`rotateLeft`)},de=()=>{U({flipX:!V.flipX},`flipX`)},fe=()=>{U({flipY:!V.flipY},`flipY`)},pe=()=>{H(`reset`)},me=e=>{let t=h+e;t>=0&&t<=g-1&&(B(!1),H(e<0?`prev`:`next`),D?.(t,h))},he=Rn(e=>{if(l){let{keyCode:t}=e;L&&(t===Zr.LEFT?me(-1):t===Zr.RIGHT&&me(1))}});(0,S.useEffect)(()=>{if(l)return window.addEventListener(`keydown`,he),()=>{window.removeEventListener(`keydown`,he)}},[l]);let[ge,_e]=(0,S.useState)(!1);S.useEffect(()=>{l&&_e(!0)},[l]);let ve=e=>{e||(_e(!1),F.current?.focus?.(),F.current=null),u?.(e)},[ye,be]=(0,S.useState)(!1);Vn(()=>{l&&be(!0)},[l]);let xe=({top:e})=>{e&&c?.()};Vn(()=>{l&&(F.current=document.activeElement)},[l]),Wr(M&&l&&ye,()=>P.current);let Se={...k.body};return A&&(Se.transformOrigin=`${A.x}px ${A.y}px`),S.createElement(Tp,{open:ye&&l,autoDestroy:!1,getContainer:m,autoLock:ge,onEsc:xe},S.createElement(Ed,{motionName:x,visible:ye&&l,motionAppear:!0,motionEnter:!0,motionLeave:!0,onVisibleChanged:ve},({className:e,style:r})=>{let a={...k.root,...r};return j&&(a.zIndex=j),S.createElement(`div`,{ref:P,className:Y(t,n,O.root,e,{[`${t}-movable`]:s,[`${t}-moving`]:te}),style:a,role:`dialog`,"aria-modal":`true`,"aria-label":i,tabIndex:-1},S.createElement(`div`,{className:Y(`${t}-mask`,O.mask),style:k.mask,onClick:d?c:void 0}),S.createElement(`div`,{className:Y(`${t}-body`,O.body),style:Se},C?C(ae,{transform:V,image:oe,...I?{current:h}:{}}):ae),p!==!1&&p!==null&&S.createElement(PW,{prefixCls:t,icon:p===!0?f.close:p||f.close,onClick:c,className:O.close,style:k.close}),L&&S.createElement(IW,{prefixCls:t,current:h,count:g,icons:f,onActive:me}),S.createElement(FW,{prefixCls:t,showProgress:R,current:h,count:g,showSwitch:L,classNames:O,styles:k,image:oe,transform:V,icons:f,countRender:_,actionsRender:T,scale:J,minScale:y,maxScale:b,onActive:me,onFlipY:fe,onFlipX:de,onRotateLeft:ue,onRotateRight:le,onZoomOut:ce,onZoomIn:se,onClose:c,onReset:pe}))}))},BW=[`crossOrigin`,`decoding`,`draggable`,`loading`,`referrerPolicy`,`sizes`,`srcSet`,`useMap`,`alt`,`fetchPriority`];function VW(e){let[t,n]=S.useState({}),r=S.useCallback((e,t)=>(n(n=>({...n,[e]:t})),()=>{n(t=>{let n={...t};return delete n[e],n})}),[]);return[S.useMemo(()=>e?e.map(e=>{if(typeof e==`string`)return{data:{src:e}};let t={};return Object.keys(e).forEach(n=>{[`src`,...BW].includes(n)&&(t[n]=e[n])}),{data:t}}):Object.keys(t).reduce((e,n)=>{let{canPreview:r,data:i}=t[n];return r&&e.push({data:i,id:n}),e},[]),[e,t]),r,!!e]}function HW(){return HW=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{open:c,onOpenChange:l,current:u,onChange:d,...f}=o&&typeof o==`object`?o:{},[p,m,h]=VW(a),[g,_]=Wn(0,u),[v,y]=(0,S.useState)(!1),{src:b,...x}=p[g]?.data||{},[C,w]=Wn(!!c,c),T=Rn(e=>{w(e),e!==C&&l?.(e,{current:g})}),[E,D]=(0,S.useState)(null),O=S.useCallback((e,t,n,r)=>{let i=h?p.findIndex(e=>e.data.src===t):p.findIndex(t=>t.id===e);_(i<0?0:i),T(!0),D({x:n,y:r}),y(!0)},[p,h]);S.useEffect(()=>{C?v||_(0):y(!1)},[C]);let k=(e,t)=>{_(e),d?.(e,t)},A=()=>{T(!1),D(null)},j=S.useMemo(()=>({register:m,onPreview:O}),[m,O]);return S.createElement(SW.Provider,{value:j},r,S.createElement(zW,HW({"aria-hidden":!C,open:C,prefixCls:e,onClose:A,mousePosition:E,imgCommonProps:x,src:b,fallback:s,icons:i,current:g,count:p.length,onChange:k},f,{classNames:t?.popup,styles:n?.popup})))},WW=0;function GW(e,t){let[n]=S.useState(()=>(WW+=1,String(WW))),r=S.useContext(SW),i={data:t,canPreview:e};return S.useEffect(()=>{if(r)return r.register(n,i)},[]),S.useEffect(()=>{r&&r.register(n,i)},[e,t]),n}function KW(){return KW=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t=`rc-image`,previewPrefixCls:n=`${t}-preview`,rootClassName:r,className:i,style:a,classNames:o={},styles:s={},width:c,height:l,src:u,alt:d,placeholder:f,fallback:p,preview:m=!0,onClick:h,onError:g,onKeyDown:_,...v}=e,y=(0,S.useContext)(SW),b=!!m,{src:x,open:C,onOpenChange:w,cover:T,rootClassName:E,...D}=m&&typeof m==`object`?m:{},O=typeof T==`object`&&T.placement&&T.placement||`center`,k=typeof T==`object`&&T.coverNode?T.coverNode:T,[A,j]=Wn(!!C,C),[M,N]=(0,S.useState)(null),P=e=>{j(e),w?.(e)},F=()=>{P(!1)},I=f&&f!==!0,L=x??u,[R,z,B]=AW({src:u,isCustomPlaceholder:I,fallback:p}),V=(0,S.useMemo)(()=>{let t={};return BW.forEach(n=>{e[n]!==void 0&&(t[n]=e[n])}),t},BW.map(t=>e[t])),H=GW(b,(0,S.useMemo)(()=>({...V,src:L}),[L,V])),U=e=>{let t=e.target.getBoundingClientRect(),n=t.x+t.width/2,r=t.y+t.height/2;y?y.onPreview(H,L,n,r):(N({x:n,y:r}),P(!0)),h?.(e)},ee=e=>{if(_?.(e),b&&(e.key===`Enter`||e.key===` `)){e.preventDefault();let t=e.target.getBoundingClientRect(),n=t.x+t.width/2,r=t.y+t.height/2;y?y.onPreview(H,L,n,r):(N({x:n,y:r}),P(!0))}};return S.createElement(S.Fragment,null,S.createElement(`div`,KW({},v,{className:Y(t,r,o.root,{[`${t}-error`]:B===`error`}),onClick:b?U:h,role:b?`button`:v.role,tabIndex:b&&v.tabIndex==null?0:v.tabIndex,"aria-label":b?v[`aria-label`]??d:v[`aria-label`],onKeyDown:ee,style:{width:c,height:l,...s.root}}),S.createElement(`img`,KW({},V,{className:Y(`${t}-img`,{[`${t}-img-placeholder`]:f===!0},o.image,i),style:{height:l,...s.image,...a},ref:R},z,{width:c,height:l,onError:g})),B===`loading`&&S.createElement(`div`,{"aria-hidden":`true`,className:`${t}-placeholder`},f),T!==!1&&b&&S.createElement(`div`,{className:Y(`${t}-cover`,o.cover,`${t}-cover-${O}`),style:{display:a?.display===`none`?`none`:void 0,...s.cover}},k)),!y&&b&&S.createElement(zW,KW({"aria-hidden":!A,open:A,prefixCls:n,onClose:F,mousePosition:M,src:L,alt:d,imageInfo:{width:c,height:l},fallback:p,imgCommonProps:V},D,{classNames:o?.popup,styles:s?.popup,rootClassName:Y(E,r)})))};qW.PreviewGroup=UW;var JW=qW,YW=(e,t,n,r,i,a,o)=>{let[s]=Ff(`ImagePreview`,e?.zIndex),[c,l]=mf(e?.mask,t?.mask,`${n}-preview`);return S.useMemo(()=>{if(!e)return e;let{cover:u,getContainer:d,closeIcon:f,rootClassName:p}=e,{closeIcon:m}=t??{};return{motionName:vh(`${n}-preview`,`fade`),...e,...o?{cover:u??o}:{},icons:a,getContainer:d??i,zIndex:s,closeIcon:f??m,rootClassName:Y(r,p),mask:c,blurClassName:l.mask}},[e,t,n,r,i,o,a,s,c,l])};function XW(e){return(0,S.isValidElement)(e)?[e,void 0]:typeof e==`boolean`||ef(e)?[void 0,e]:[void 0,void 0]}function ZW(e){let t=(0,S.useMemo)(()=>typeof e==`boolean`?e?{}:null:ef(e)?e:{},[e]);return(0,S.useMemo)(()=>{if(!t)return[t,``,``];let{open:e,onOpenChange:n,cover:r,actionsRender:i,visible:a,onVisibleChange:o,rootClassName:s,maskClassName:c,mask:l,forceRender:u,destroyOnClose:d,toolbarRender:f,...p}=t,m;n?m=n:o&&(m=(e,t)=>{let{current:n}=t||{};n===void 0?o(e,!e):o(e,!e,n)});let[h,g]=XW(l);return[{...p,open:e??a,onOpenChange:m,cover:r??h,mask:g,actionsRender:i??f},s,c]},[t])}var QW=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z`}},{tag:`path`,attrs:{d:`M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z`}}]},name:`rotate-left`,theme:`outlined`}}))());function $W(){return $W=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,$W({},e,{ref:t,icon:QW.default}))),tG=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z`}},{tag:`path`,attrs:{d:`M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z`}}]},name:`rotate-right`,theme:`outlined`}}))());function nG(){return nG=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,nG({},e,{ref:t,icon:tG.default}))),iG=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`swap`,theme:`outlined`}}))());function aG(){return aG=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,aG({},e,{ref:t,icon:iG.default}))),sG=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z`}}]},name:`zoom-in`,theme:`outlined`}}))());function cG(){return cG=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,cG({},e,{ref:t,icon:sG.default}))),uG=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z`}}]},name:`zoom-out`,theme:`outlined`}}))());function dG(){return dG=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,dG({},e,{ref:t,icon:uG.default}))),pG=e=>({position:e||`absolute`,inset:0}),mG=e=>{let{componentCls:t,motionDurationSlow:n,colorTextLightSolid:r}=e;return{[t]:{[`${t}-cover`]:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,color:r,background:new jc(`#000`).setA(.3).toRgbString(),cursor:`pointer`,opacity:0,transition:`opacity ${n}`},"&:hover, &:focus-visible":{[`${t}-cover`]:{opacity:1}},[`${t}-cover-top`]:{inset:`0 0 auto 0`,justifyContent:`center`},[`${t}-cover-bottom`]:{inset:`auto 0 0 0`,justifyContent:`center`}}}},hG=e=>{let{motionEaseOut:t,previewCls:n,motionDurationSlow:r,componentCls:i,colorBgMask:a,marginXL:o,marginSM:s,margin:c,colorTextLightSolid:l,paddingSM:u,paddingLG:d,previewOperationHoverColor:f,previewOperationColorDisabled:p,previewOperationSize:m,zIndexPopup:h}=e,g=new jc(a).setA(.1),_=g.clone().setA(.2),v={position:`absolute`,color:l,backgroundColor:g.toRgbString(),borderRadius:`50%`,padding:u,outline:0,border:0,cursor:`pointer`,transition:`all ${r}`,display:`flex`,fontSize:m,"&:hover":{backgroundColor:_.toRgbString()},"&:active":{backgroundColor:g.toRgbString()},"&:focus-visible":Wl(e)};return{[`${i}-preview`]:{textAlign:`center`,inset:0,position:`fixed`,userSelect:`none`,zIndex:h,[`${n}-mask`]:{inset:0,position:`absolute`,background:a,backdropFilter:`blur(0px)`,transition:`backdrop-filter ${r}`,[`&${i}-preview-mask-blur`]:{backdropFilter:`blur(4px)`},[`&${i}-preview-mask-hidden`]:{display:`none`}},[`${n}-body`]:{...pG(),"pointer-events":`none`,display:`flex`,alignItems:`center`,justifyContent:`center`,"> *":{pointerEvents:`auto`}},[`${n}-img`]:{maxWidth:`100%`,maxHeight:`70%`,verticalAlign:`middle`,transform:`scale3d(1, 1, 1)`,transition:`transform ${r} ${t} 0s`},[`&-movable ${n}-img`]:{cursor:`grab`},[`&-moving ${n}-img`]:{cursor:`grabbing`},[`${n}-close`]:{...v,top:s,insetInlineEnd:s},[`${n}-switch`]:{...v,top:`50%`,transform:`translateY(-50%)`,"&-disabled":{"&, &:hover, &:active":{color:p,background:`transparent`,cursor:`not-allowed`}},"&-prev":{insetInlineStart:s},"&-next":{insetInlineEnd:s}},[`${n}-footer`]:{position:`absolute`,bottom:o,left:{_skip_check_:!0,value:`50%`},display:`flex`,flexDirection:`column`,alignItems:`center`,color:e.previewOperationColor,transform:`translateX(-50%)`,gap:c},[`${n}-actions`]:{display:`flex`,gap:u,padding:`0 ${X(d)}`,backgroundColor:g.toRgbString(),borderRadius:100,fontSize:m,"&-action":{color:`inherit`,background:`transparent`,border:0,font:`inherit`,padding:u,cursor:`pointer`,transition:`all ${r}`,display:`flex`,[`&:not(${n}-actions-action-disabled):hover`]:{color:f},"&:focus-visible":Wl(e),"&-disabled":{color:p,cursor:`not-allowed`}}}}}},gG=e=>{let{componentCls:t}=e;return{[t]:{position:`relative`,display:`inline-block`,...Gl(e),[`${t}-img`]:{width:`100%`,height:`auto`,verticalAlign:`middle`},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:`url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')`,backgroundRepeat:`no-repeat`,backgroundPosition:`center center`,backgroundSize:`30%`},[`${t}-placeholder`]:{...pG()}}}},_G=e=>{let{previewCls:t,motionDurationSlow:n}=e;return{[t]:{"&-fade":{transition:`opacity ${n}`,"&-enter, &-appear":{opacity:0,[`${t}-body`]:{transform:`scale(0)`},"&-active":{opacity:1,[`${t}-body`]:{transform:`scale(1)`,transition:`transform ${n}`}}},"&-leave":{opacity:1,"&-active":{opacity:0,[`${t}-body`]:{transform:`scale(0)`,transition:`transform ${n}`}}}}}}},vG=Xl(`Image`,e=>{let t=lc(e,{previewCls:`${e.componentCls}-preview`,imagePreviewSwitchSize:e.controlHeightLG});return[gG(t),mG(t),hG(t),_G(t)]},e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new jc(e.colorTextLightSolid).setA(.65).toRgbString(),previewOperationHoverColor:new jc(e.colorTextLightSolid).setA(.85).toRgbString(),previewOperationColorDisabled:new jc(e.colorTextLightSolid).setA(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5})),yG={rotateLeft:S.createElement(eG,null),rotateRight:S.createElement(rG,null),zoomIn:S.createElement(lG,null),zoomOut:S.createElement(fG,null),close:S.createElement(ku,null),left:S.createElement(pT,null),right:S.createElement(Ug,null),flipX:S.createElement(oG,null),flipY:S.createElement(oG,{rotate:90})},bG=({previewPrefixCls:e,preview:t,classNames:n,styles:r,...i})=>{let{getPrefixCls:a,getPopupContainer:o,direction:s,preview:c,classNames:l,styles:u}=_a(`image`),d=a(`image`,e),f=`${d}-preview`,p=ap(d),[m,h]=vG(d,p),g=Y(m,h,p),[_,v,y]=ZW(t),[b,x,C]=ZW(c),w=S.useMemo(()=>({...yG,left:s===`rtl`?S.createElement(Ug,null):S.createElement(pT,null),right:s===`rtl`?S.createElement(pT,null):S.createElement(Ug,null)}),[s]),T=YW(_,b,d,g,o,yG),{mask:E,blurClassName:D}=T??{},O={...i,classNames:n,styles:r},[k,A]=xf([l,n,{cover:Y(C,y),popup:{root:Y(x,v),mask:Y({[`${d}-preview-mask-hidden`]:!E},D)}}],[u,r],{props:O},{popup:{_default:`root`}});return S.createElement(JW.PreviewGroup,{preview:T,previewPrefixCls:f,icons:w,...i,classNames:k,styles:A})},xG=e=>{let{prefixCls:t,preview:n,className:r,rootClassName:i,style:a,styles:o,classNames:s,wrapperStyle:c,fallback:l,...u}=e,{getPrefixCls:d,getPopupContainer:f,className:p,style:m,preview:h,styles:g,classNames:_,fallback:v}=_a(`image`),y=d(`image`,t),b=ap(y),[x,C]=vG(y,b),w=Y(i,x,C,b),T=Y(r,x,p),[E,D,O]=ZW(n),[k,A,j]=ZW(h),M=YW(E,k,y,w,f,yG,!0),N={...e,preview:M},P=S.useMemo(()=>({cover:Y(j,O),popup:{root:Y(A,D)}}),[D,O,A,j]),{mask:F,blurClassName:I}=M??{},L=S.useMemo(()=>({mask:Y({[`${y}-preview-mask-hidden`]:!F},I)}),[F,y,I]),[R,z]=xf(S.useMemo(()=>[_,s,P,{popup:L}],[_,s,P,L]),[g,{root:c},o],{props:N},{popup:{_default:`root`}}),B={...m,...a},V=l??v;return S.createElement(JW,{prefixCls:y,preview:M||!1,rootClassName:w,className:T,style:B,fallback:V,...u,classNames:R,styles:z})};xG.PreviewGroup=bG;var SG=e=>{let{getPrefixCls:t,direction:n}=(0,S.useContext)(ma),{prefixCls:r,className:i}=e,a=t(`input-group`,r),[o,s]=iR(t(`input`)),c=Y(a,s,{[`${a}-lg`]:e.size===`large`,[`${a}-sm`]:e.size===`small`,[`${a}-compact`]:e.compact,[`${a}-rtl`]:n===`rtl`},o,i),l=(0,S.useContext)(Fy),u=(0,S.useMemo)(()=>({...l,isFormItemInput:!1}),[l]);return S.createElement(Fy.Provider,{value:u},S.createElement(DU.Compact,{className:c,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))},CG=e=>{let{componentCls:t,paddingXS:n}=e;return{[t]:{display:`inline-flex`,alignItems:`center`,flexWrap:`nowrap`,columnGap:n,[`${t}-input-wrapper`]:{position:`relative`,[`${t}-mask-icon`]:{position:`absolute`,zIndex:`1`,top:`50%`,right:`50%`,transform:`translate(50%, -50%)`,pointerEvents:`none`},[`${t}-mask-input`]:{color:`transparent`,caretColor:e.colorText,"&::selection":{color:`transparent`}},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":`none`,margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":`textfield`}},"&-rtl":{direction:`rtl`},[`${t}-input`]:{textAlign:`center`,paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},wG=Xl([`Input`,`OTP`],e=>CG(lc(e,RL(e))),zL),TG=S.forwardRef((e,t)=>{let{className:n,value:r,onChange:i,onActiveChange:a,index:o,mask:s,onFocus:c,...l}=e,{getPrefixCls:u}=S.useContext(ma),d=u(`otp`),f=typeof s==`string`?s:r,p=S.useRef(null);S.useImperativeHandle(t,()=>p.current);let m=e=>{i(o,e.target.value)},h=()=>{Ei(()=>{let e=p.current?.input;document.activeElement===e&&e&&e.select()})},g=e=>{c?.(e),h()},_=e=>{let{key:t,ctrlKey:n,metaKey:i}=e;t===`ArrowLeft`?a(o-1):t===`ArrowRight`?a(o+1):t===`z`&&(n||i)?e.preventDefault():t===`Backspace`&&!r&&a(o-1),h()};return S.createElement(`span`,{className:`${d}-input-wrapper`,role:`presentation`},s&&r!==``&&r!==void 0&&S.createElement(`span`,{className:`${d}-mask-icon`,"aria-hidden":`true`},f),S.createElement(OV,{"aria-label":`OTP Input ${o+1}`,type:s===!0?`password`:`text`,...l,ref:p,value:r,onInput:m,onFocus:g,onKeyDown:_,onMouseDown:h,onMouseUp:h,className:Y(n,{[`${d}-mask-input`]:s})}))});function EG(e){return(e||``).split(``)}var DG=e=>{let{index:t,prefixCls:n,separator:r,className:i,style:a}=e,o=typeof r==`function`?r(t):r;return o?S.createElement(`span`,{className:Y(`${n}-separator`,i),style:a},o):null},OG=S.forwardRef((e,t)=>{let{prefixCls:n,length:r=6,size:i,defaultValue:a,value:o,onChange:s,formatter:c,separator:l,variant:u,disabled:d,status:f,autoFocus:p,mask:m,type:h,autoComplete:g,onInput:_,onFocus:v,inputMode:y,classNames:b,styles:x,className:C,style:w,...T}=e,{classNames:E,styles:D,getPrefixCls:O,direction:k,style:A,className:j}=_a(`otp`),M=O(`otp`,n),N={...e,length:r},[P,F]=xf([E,b],[D,x],{props:N}),I=bi(T,{aria:!0,data:!0,attr:!0}),[L,R]=wG(M),z=Oh(e=>i??e),B=S.useContext(Fy),V=EC(B.status,f),H=S.useMemo(()=>({...B,status:V,hasFeedback:!1,feedbackIcon:null}),[B,V]),U=S.useRef(null),ee=S.useRef({});S.useImperativeHandle(t,()=>({focus:()=>{ee.current[0]?.focus()},blur:()=>{for(let e=0;ec?c(e):e,[ne,W]=S.useState(()=>EG(te(a||``)));S.useEffect(()=>{o!==void 0&&W(EG(o))},[o]);let re=Rn(e=>{W(e),_&&_(e),s&&e.length===r&&e.every(e=>e)&&e.some((e,t)=>ne[t]!==e)&&s(e.join(``))}),G=Rn((e,t)=>{let n=da(ne);for(let t=0;t=0&&!n[e];--e)n.pop();return n=EG(te(n.map(e=>e||` `).join(``))).map((e,t)=>e===` `&&!n[t]?n[t]:e),n}),K=(e,t)=>{let n=G(e,t),i=Math.min(e+t.length,r-1);i!==e&&n[e]!==void 0&&ee.current[i]?.focus(),re(n)},q=e=>{ee.current[e]?.focus()},ie=(e,t)=>{for(let e=0;e{let n=`otp-${t}`,i=ne[t]||``;return S.createElement(S.Fragment,{key:n},S.createElement(TG,{ref:e=>{ee.current[t]=e},index:t,size:z,htmlSize:1,className:Y(P.input,`${M}-input`),style:F.input,onChange:K,value:i,onActiveChange:q,autoFocus:t===0&&p,onFocus:e=>ie(e,t),...J}),t{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z`}},{tag:`path`,attrs:{d:`M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z`}}]},name:`eye-invisible`,theme:`outlined`}}))());function AG(){return AG=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,AG({},e,{ref:t,icon:kG.default}))),MG=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z`}}]},name:`eye`,theme:`outlined`}}))());function NG(){return NG=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,NG({},e,{ref:t,icon:MG.default}))),FG=e=>e?S.createElement(PG,null):S.createElement(jG,null),IG={click:`onClick`,hover:`onMouseOver`},LG=S.forwardRef((e,t)=>{let{disabled:n,action:r=`click`,visibilityToggle:i=!0,iconRender:a=FG,suffix:o}=e,s=S.useContext(pm),c=n??s,l=ef(i)&&i.visible!==void 0,[u,d]=(0,S.useState)(()=>l?i.visible:!1),f=(0,S.useRef)(null);S.useEffect(()=>{l&&d(i.visible)},[l,i]);let p=EV(f),m=()=>{if(c)return;u&&p();let e=!u;d(e),ef(i)&&i.onVisibleChange?.(e)},h=e=>{let t=IG[r]||``,n=a(u),i={[t]:m,className:`${e}-icon`,key:`passwordIcon`,onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}};return S.cloneElement(S.isValidElement(n)?n:S.createElement(`span`,null,n),i)},{className:g,prefixCls:_,inputPrefixCls:v,size:y,...b}=e,{getPrefixCls:x}=S.useContext(ma),C=x(`input`,v),w=x(`input-password`,_),T=i&&h(w),E=Y(w,g,{[`${w}-${y}`]:!!y}),D={...hi(b,[`suffix`,`iconRender`,`visibilityToggle`]),type:u?`text`:`password`,className:E,prefixCls:C,suffix:S.createElement(S.Fragment,null,T,o)};return y&&(D.size=y),S.createElement(OV,{ref:sr(t,f),...D})}),RG=Xl([`Input`,`Search`],e=>{let{componentCls:t}=e,n=`${t}-btn`;return{[t]:{width:`100%`,[n]:{"&-filled":{background:e.colorFillTertiary,"&:not(:disabled)":{"&:hover":{background:e.colorFillSecondary},"&:active":{background:e.colorFill}}}}}}}),zG=S.forwardRef((e,t)=>{let{prefixCls:n,inputPrefixCls:r,className:i,size:a,style:o,enterButton:s=!1,addonAfter:c,loading:l,disabled:u,onSearch:d,onChange:f,onCompositionStart:p,onCompositionEnd:m,variant:h,onPressEnter:g,classNames:_,styles:v,hidden:y,...b}=e,{direction:x,getPrefixCls:C,classNames:w,styles:T}=_a(`inputSearch`),E={...e,enterButton:s},[D,O]=xf([w,_],[T,v],{props:E},{button:{_default:`root`}}),k=S.useRef(!1),A=C(`input-search`,n),j=C(`input`,r),[M,N]=RG(A),{compactSize:P}=jh(A,x),F=Oh(e=>a??P??e),I=S.useRef(null),L=e=>{e?.target&&e.type===`click`&&d&&d(e.target.value,e,{source:`clear`}),f?.(e)},R=e=>{document.activeElement===I.current?.input&&e.preventDefault()},z=e=>{d&&d(I.current?.input?.value,e,{source:`input`})},B=e=>{k.current||l||(g?.(e),z(e))},V=typeof s==`boolean`?S.createElement(iw,null):null,H=`${A}-btn`,U=Y(H,{[`${H}-${h}`]:h}),ee,te=s||{},ne=te.type&&te.type.__ANT_BUTTON===!0;ee=ne||te.type===`button`?cm(te,{onMouseDown:R,onClick:e=>{te?.props?.onClick?.(e),z(e)},key:`enterButton`,...ne?{className:U,size:F}:{}}):S.createElement(E_,{classNames:D.button,styles:O.button,className:U,color:s?`primary`:`default`,size:F,disabled:u,key:`enterButton`,onMouseDown:R,onClick:z,loading:l,icon:V,variant:h===`borderless`||h===`filled`||h===`underlined`?`text`:s?`solid`:void 0},s),c&&(ee=[ee,cm(c,{key:`addonAfter`})]);let W=Y(A,N,{[`${A}-rtl`]:x===`rtl`,[`${A}-${F}`]:!!F,[`${A}-with-button`]:!!s},i,M,D.root),re=e=>{k.current=!0,p?.(e)},G=e=>{k.current=!1,m?.(e)},K=bi(b,{data:!0}),q=hi({...b,classNames:hi(D,[`button`,`root`]),styles:hi(O,[`button`,`root`]),prefixCls:j,type:`search`,size:F,variant:h,onPressEnter:B,onCompositionStart:re,onCompositionEnd:G,onChange:L,disabled:u},Object.keys(K));return S.createElement(Ph,{className:W,style:{...o,...O.root},...K,hidden:y},S.createElement(OV,{ref:sr(I,t),...q}),ee)}),BG=` min-height:0 !important; max-height:none !important; height:0 !important; @@ -315,10 +315,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho top:0 !important; right:0 !important; pointer-events: none !important; -`,GG=[`letter-spacing`,`line-height`,`padding-top`,`padding-bottom`,`font-family`,`font-weight`,`font-size`,`font-variant`,`text-rendering`,`text-transform`,`width`,`text-indent`,`padding-left`,`padding-right`,`border-width`,`box-sizing`,`word-break`,`white-space`],KG={},qG;function JG(e,t=!1){let n=e.getAttribute(`id`)||e.getAttribute(`data-reactid`)||e.getAttribute(`name`);if(t&&KG[n])return KG[n];let r=window.getComputedStyle(e),i=r.getPropertyValue(`box-sizing`)||r.getPropertyValue(`-moz-box-sizing`)||r.getPropertyValue(`-webkit-box-sizing`),a=parseFloat(r.getPropertyValue(`padding-bottom`))+parseFloat(r.getPropertyValue(`padding-top`)),o=parseFloat(r.getPropertyValue(`border-bottom-width`))+parseFloat(r.getPropertyValue(`border-top-width`)),s={sizingStyle:GG.map(e=>`${e}:${r.getPropertyValue(e)}`).join(`;`),paddingSize:a,borderSize:o,boxSizing:i};return t&&n&&(KG[n]=s),s}function YG(e,t=!1,n=null,r=null){qG||(qG=document.createElement(`textarea`),qG.setAttribute(`tab-index`,`-1`),qG.setAttribute(`aria-hidden`,`true`),qG.setAttribute(`name`,`hiddenTextarea`),document.body.appendChild(qG)),e.getAttribute(`wrap`)?qG.setAttribute(`wrap`,e.getAttribute(`wrap`)):qG.removeAttribute(`wrap`);let{paddingSize:i,borderSize:a,boxSizing:o,sizingStyle:s}=JG(e,t);qG.setAttribute(`style`,`${s};${WG}`),qG.value=e.value||e.placeholder||``;let c,l,u,d=qG.scrollHeight;if(o===`border-box`?d+=a:o===`content-box`&&(d-=i),n!==null||r!==null){qG.value=` `;let e=qG.scrollHeight-i;n!==null&&(c=e*n,o===`border-box`&&(c=c+i+a),d=Math.max(c,d)),r!==null&&(l=e*r,o===`border-box`&&(l=l+i+a),u=d>l?``:`hidden`,d=Math.min(l,d))}let f={height:d,overflowY:u,resize:`none`};return c&&(f.minHeight=c),l&&(f.maxHeight=l),f}function XG(){return XG=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,defaultValue:r,value:i,autoSize:a,onResize:o,className:s,style:c,disabled:l,onChange:u,onInternalAutoSize:d,...f}=e,[p,m]=Wn(r,i),h=p??``,g=e=>{m(e.target.value),u?.(e)},_=S.useRef();S.useImperativeHandle(t,()=>({textArea:_.current}));let[v,y]=S.useMemo(()=>a&&typeof a==`object`?[a.minRows,a.maxRows]:[],[a]),b=!!a,[x,C]=S.useState($G),[w,T]=S.useState(),E=()=>{C(ZG)};Vn(()=>{b&&E()},[i,v,y,b]),Vn(()=>{if(x===ZG)C(QG);else if(x===QG){let e=YG(_.current,!1,v,y);C($G),T(e)}},[x]);let D=S.useRef(),O=()=>{Ei.cancel(D.current)},k=e=>{x===$G&&(o?.(e),a&&(O(),D.current=Ei(()=>{E()})))};S.useEffect(()=>O,[]);let A=b?w:null,j={...c,...A};return(x===ZG||x===QG)&&(j.overflowY=`hidden`,j.overflowX=`hidden`),S.createElement(ia,{onResize:k,disabled:!(a||o)},S.createElement(`textarea`,XG({},f,{ref:_,style:j,className:Y(n,s,{[`${n}-disabled`]:l}),disabled:l,value:h,onChange:g})))});function tK(){return tK=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let[O,k]=Wn(e,t),A=O==null?``:String(O),[j,M]=S.useState(!1),N=S.useRef(!1),[P,F]=S.useState(null),I=(0,S.useRef)(null),L=(0,S.useRef)(null),R=()=>L.current?.textArea,z=()=>{R().focus()};(0,S.useImperativeHandle)(D,()=>({resizableTextArea:L.current,focus:z,blur:()=>{R().blur()},nativeElement:I.current?.nativeElement||R()})),(0,S.useEffect)(()=>{M(e=>!h&&e)},[h]);let[B,V]=S.useState(null);S.useEffect(()=>{B&&R().setSelectionRange(...B)},[B]);let H=EV(f,d),U=H.max??o,ee=Number(U)>0,te=H.strategy(A),ne=!!U&&te>U,W=(e,t)=>{let n=t;!N.current&&H.exceedFormatter&&H.max&&H.strategy(t)>H.max&&(n=H.exceedFormatter(t,{max:H.max}),t!==n&&V([R().selectionStart||0,R().selectionEnd||0])),k(n),CV(e.currentTarget,e,i,n)},re=e=>{N.current=!0,s?.(e)},G=e=>{N.current=!1,W(e,e.currentTarget.value),c?.(e)},K=e=>{W(e,e.target.value)},q=e=>{e.key===`Enter`&&x&&!e.nativeEvent.isComposing&&x(e),T?.(e)},ie=e=>{M(!0),n?.(e)},J=e=>{M(!1),r?.(e)},ae=e=>{k(``),z(),CV(R(),e,i)},oe=l,se;H.show&&(se=H.showFormatter?H.showFormatter({value:A,count:te,maxLength:U}):`${te}${ee?` / ${U}`:``}`,oe=S.createElement(S.Fragment,null,oe,S.createElement(`span`,{className:Y(`${u}-data-count`,_?.count),style:v?.count},se)));let ce=e=>{y?.(e),R()?.style.height&&F(!0)},le=!w&&!d&&!a;return S.createElement(TV,{ref:I,value:A,allowClear:a,handleReset:ae,suffix:oe,prefixCls:u,classNames:{..._,affixWrapper:Y(_?.affixWrapper,{[`${u}-show-count`]:d,[`${u}-textarea-allow-clear`]:a})},disabled:h,focused:j,className:Y(p,ne&&`${u}-out-of-range`),style:{...m,...P&&!le?{height:`auto`}:{}},dataAttrs:{affixWrapper:{"data-count":typeof se==`string`?se:void 0}},hidden:g,readOnly:C,onClear:b},S.createElement(eK,tK({},E,{autoSize:w,maxLength:o,onKeyDown:q,onChange:K,onFocus:ie,onBlur:J,onCompositionStart:re,onCompositionEnd:G,className:Y(_?.textarea),style:{resize:m?.resize,...v?.textarea},disabled:h,prefixCls:u,onResize:ce,ref:L,readOnly:C})))}),rK=e=>{let{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:`100%`,height:`auto`,minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:`bottom`,transition:`all ${e.motionDurationSlow}`,resize:`vertical`,[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:`auto`},[r]:{position:`relative`,"&-show-count":{[`${t}-data-count`]:{position:`absolute`,bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:`nowrap`,pointerEvents:`none`}},[` +`,VG=[`letter-spacing`,`line-height`,`padding-top`,`padding-bottom`,`font-family`,`font-weight`,`font-size`,`font-variant`,`text-rendering`,`text-transform`,`width`,`text-indent`,`padding-left`,`padding-right`,`border-width`,`box-sizing`,`word-break`,`white-space`],HG={},UG;function WG(e,t=!1){let n=e.getAttribute(`id`)||e.getAttribute(`data-reactid`)||e.getAttribute(`name`);if(t&&HG[n])return HG[n];let r=window.getComputedStyle(e),i=r.getPropertyValue(`box-sizing`)||r.getPropertyValue(`-moz-box-sizing`)||r.getPropertyValue(`-webkit-box-sizing`),a=parseFloat(r.getPropertyValue(`padding-bottom`))+parseFloat(r.getPropertyValue(`padding-top`)),o=parseFloat(r.getPropertyValue(`border-bottom-width`))+parseFloat(r.getPropertyValue(`border-top-width`)),s={sizingStyle:VG.map(e=>`${e}:${r.getPropertyValue(e)}`).join(`;`),paddingSize:a,borderSize:o,boxSizing:i};return t&&n&&(HG[n]=s),s}function GG(e,t=!1,n=null,r=null){UG||(UG=document.createElement(`textarea`),UG.setAttribute(`tab-index`,`-1`),UG.setAttribute(`aria-hidden`,`true`),UG.setAttribute(`name`,`hiddenTextarea`),document.body.appendChild(UG)),e.getAttribute(`wrap`)?UG.setAttribute(`wrap`,e.getAttribute(`wrap`)):UG.removeAttribute(`wrap`);let{paddingSize:i,borderSize:a,boxSizing:o,sizingStyle:s}=WG(e,t);UG.setAttribute(`style`,`${s};${BG}`),UG.value=e.value||e.placeholder||``;let c,l,u,d=UG.scrollHeight;if(o===`border-box`?d+=a:o===`content-box`&&(d-=i),n!==null||r!==null){UG.value=` `;let e=UG.scrollHeight-i;n!==null&&(c=e*n,o===`border-box`&&(c=c+i+a),d=Math.max(c,d)),r!==null&&(l=e*r,o===`border-box`&&(l=l+i+a),u=d>l?``:`hidden`,d=Math.min(l,d))}let f={height:d,overflowY:u,resize:`none`};return c&&(f.minHeight=c),l&&(f.maxHeight=l),f}function KG(){return KG=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,defaultValue:r,value:i,autoSize:a,onResize:o,className:s,style:c,disabled:l,onChange:u,onInternalAutoSize:d,...f}=e,[p,m]=Wn(r,i),h=p??``,g=e=>{m(e.target.value),u?.(e)},_=S.useRef();S.useImperativeHandle(t,()=>({textArea:_.current}));let[v,y]=S.useMemo(()=>a&&typeof a==`object`?[a.minRows,a.maxRows]:[],[a]),b=!!a,[x,C]=S.useState(YG),[w,T]=S.useState(),E=()=>{C(qG)};Vn(()=>{b&&E()},[i,v,y,b]),Vn(()=>{if(x===qG)C(JG);else if(x===JG){let e=GG(_.current,!1,v,y);C(YG),T(e)}},[x]);let D=S.useRef(),O=()=>{Ei.cancel(D.current)},k=e=>{x===YG&&(o?.(e),a&&(O(),D.current=Ei(()=>{E()})))};S.useEffect(()=>O,[]);let A=b?w:null,j={...c,...A};return(x===qG||x===JG)&&(j.overflowY=`hidden`,j.overflowX=`hidden`),S.createElement(ia,{onResize:k,disabled:!(a||o)},S.createElement(`textarea`,KG({},f,{ref:_,style:j,className:Y(n,s,{[`${n}-disabled`]:l}),disabled:l,value:h,onChange:g})))});function ZG(){return ZG=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let[O,k]=Wn(e,t),A=O==null?``:String(O),[j,M]=S.useState(!1),N=S.useRef(!1),[P,F]=S.useState(null),I=(0,S.useRef)(null),L=(0,S.useRef)(null),R=()=>L.current?.textArea,z=()=>{R().focus()};(0,S.useImperativeHandle)(D,()=>({resizableTextArea:L.current,focus:z,blur:()=>{R().blur()},nativeElement:I.current?.nativeElement||R()})),(0,S.useEffect)(()=>{M(e=>!h&&e)},[h]);let[B,V]=S.useState(null);S.useEffect(()=>{B&&R().setSelectionRange(...B)},[B]);let H=SV(f,d),U=H.max??o,ee=Number(U)>0,te=H.strategy(A),ne=!!U&&te>U,W=(e,t)=>{let n=t;!N.current&&H.exceedFormatter&&H.max&&H.strategy(t)>H.max&&(n=H.exceedFormatter(t,{max:H.max}),t!==n&&V([R().selectionStart||0,R().selectionEnd||0])),k(n),yV(e.currentTarget,e,i,n)},re=e=>{N.current=!0,s?.(e)},G=e=>{N.current=!1,W(e,e.currentTarget.value),c?.(e)},K=e=>{W(e,e.target.value)},q=e=>{e.key===`Enter`&&x&&!e.nativeEvent.isComposing&&x(e),T?.(e)},ie=e=>{M(!0),n?.(e)},J=e=>{M(!1),r?.(e)},ae=e=>{k(``),z(),yV(R(),e,i)},oe=l,se;H.show&&(se=H.showFormatter?H.showFormatter({value:A,count:te,maxLength:U}):`${te}${ee?` / ${U}`:``}`,oe=S.createElement(S.Fragment,null,oe,S.createElement(`span`,{className:Y(`${u}-data-count`,_?.count),style:v?.count},se)));let ce=e=>{y?.(e),R()?.style.height&&F(!0)},le=!w&&!d&&!a;return S.createElement(xV,{ref:I,value:A,allowClear:a,handleReset:ae,suffix:oe,prefixCls:u,classNames:{..._,affixWrapper:Y(_?.affixWrapper,{[`${u}-show-count`]:d,[`${u}-textarea-allow-clear`]:a})},disabled:h,focused:j,className:Y(p,ne&&`${u}-out-of-range`),style:{...m,...P&&!le?{height:`auto`}:{}},dataAttrs:{affixWrapper:{"data-count":typeof se==`string`?se:void 0}},hidden:g,readOnly:C,onClear:b},S.createElement(XG,ZG({},E,{autoSize:w,maxLength:o,onKeyDown:q,onChange:K,onFocus:ie,onBlur:J,onCompositionStart:re,onCompositionEnd:G,className:Y(_?.textarea),style:{resize:m?.resize,...v?.textarea},disabled:h,prefixCls:u,onResize:ce,ref:L,readOnly:C})))}),$G=e=>{let{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:`100%`,height:`auto`,minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:`bottom`,transition:`all ${e.motionDurationSlow}`,resize:`vertical`,[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:`auto`},[r]:{position:`relative`,"&-show-count":{[`${t}-data-count`]:{position:`absolute`,bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:`nowrap`,pointerEvents:`none`}},[` &-allow-clear > ${t}, &-affix-wrapper${r}-has-feedback ${t} - `]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:`inherit`,border:`none`,outline:`none`,background:`transparent`,minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:`none !important`}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:`absolute`,insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:`absolute`,top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:`inline-flex`,alignItems:`center`,margin:`auto`,pointerEvents:`none`}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:`ltr`,insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},iK=Xl([`Input`,`TextArea`],e=>rK(lc(e,zL(e))),BL,{resetFont:!1}),aK=(0,S.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,size:i,disabled:a,status:o,allowClear:s,classNames:c,rootClassName:l,className:u,style:d,styles:f,variant:p,showCount:m,onMouseDown:h,onResize:g,..._}=e,{getPrefixCls:v,direction:y,allowClear:b,autoComplete:x,className:C,style:w,classNames:T,styles:E}=_a(`textArea`),D=S.useContext(pm),O=a??D,{status:k,hasFeedback:A,feedbackIcon:j}=S.useContext(Iy),M=DC(k,o),[N,P]=xf([T,c],[E,f],{props:e}),F=S.useRef(null);S.useImperativeHandle(t,()=>({resizableTextArea:F.current?.resizableTextArea,focus:e=>{Mr(F.current?.resizableTextArea?.textArea,e)},blur:()=>F.current?.blur(),nativeElement:F.current?.nativeElement||null}));let I=v(`input`,n),L=ap(I),[R,z]=iR(I,l);iK(I,L);let{compactSize:B,compactItemClassnames:V}=jh(I,y),H=Oh(e=>i??B??e),[U,ee]=IC(`textArea`,p,r),te=kV(s??b),[ne,W]=S.useState(!1),[re,G]=S.useState(!1),K=e=>{W(!0),h?.(e);let t=()=>{W(!1),document.removeEventListener(`mouseup`,t)};document.addEventListener(`mouseup`,t)},q=e=>{if(g?.(e),ne&&typeof getComputedStyle==`function`){let e=F.current?.nativeElement?.querySelector(`textarea`);e&&getComputedStyle(e).resize===`both`&&G(!0)}};return S.createElement(nK,{autoComplete:x,..._,style:{...P.root,...w,...d},styles:P,disabled:O,allowClear:te,className:Y(z,L,u,l,V,C,N.root,{[`${I}-textarea-affix-wrapper-resize-dirty`]:re}),classNames:{...N,textarea:Y({[`${I}-sm`]:H===`small`,[`${I}-lg`]:H===`large`},R,N.textarea,ne&&`${I}-mouse-active`),variant:Y({[`${I}-${U}`]:ee},EC(I,M)),affixWrapper:Y(`${I}-textarea-affix-wrapper`,{[`${I}-affix-wrapper-rtl`]:y===`rtl`,[`${I}-affix-wrapper-sm`]:H===`small`,[`${I}-affix-wrapper-lg`]:H===`large`,[`${I}-textarea-show-count`]:m||e.count?.show},R)},prefixCls:I,suffix:A&&S.createElement(`span`,{className:`${I}-textarea-suffix`},j),showCount:m,ref:F,onResize:q,onMouseDown:K})}),oK=MV;oK.Group=EG,oK.Search=UG,oK.TextArea=aK,oK.Password=VG,oK.OTP=MG;function sK(e,t,n){return typeof n==`boolean`?n:e.length?!0:Di(t).some(e=>e.type===WE)}var cK=({suffixCls:e,tagName:t,displayName:n})=>n=>S.forwardRef((r,i)=>S.createElement(n,{ref:i,suffixCls:e,tagName:t,...r})),lK=S.forwardRef((e,t)=>{let{prefixCls:n,suffixCls:r,className:i,tagName:a,...o}=e,{getPrefixCls:s}=S.useContext(ma),c=s(`layout`,n),[l]=RE(c),u=r?`${c}-${r}`:c;return S.createElement(a,{className:Y(n||u,i,l),ref:t,...o})}),uK=S.forwardRef((e,t)=>{let{direction:n}=S.useContext(ma),[r,i]=S.useState([]),{prefixCls:a,className:o,rootClassName:s,children:c,hasSider:l,tagName:u,style:d,...f}=e,p=hi(f,[`suffixCls`]),{getPrefixCls:m,className:h,style:g}=_a(`layout`),_=m(`layout`,a),v=sK(r,c,l),[y,b]=RE(_),x=Y(_,{[`${_}-has-sider`]:v,[`${_}-rtl`]:n===`rtl`},h,o,s,y,b),C=S.useMemo(()=>({siderHook:{addSider:e=>{i(t=>[].concat(da(t),[e]))},removeSider:e=>{i(t=>t.filter(t=>t!==e))}}}),[]);return S.createElement(PE.Provider,{value:C},S.createElement(u,{ref:t,className:x,style:{...g,...d},...p},c))}),dK=cK({tagName:`div`,displayName:`Layout`})(uK),fK=cK({suffixCls:`header`,tagName:`header`,displayName:`Header`})(lK),pK=cK({suffixCls:`footer`,tagName:`footer`,displayName:`Footer`})(lK),mK=cK({suffixCls:`content`,tagName:`main`,displayName:`Content`})(lK),hK=dK;hK.Header=fK,hK.Footer=pK,hK.Content=mK,hK.Sider=WE,hK._InternalSiderContext=HE;var gK=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z`}}]},name:`double-left`,theme:`outlined`}}))());function _K(){return _K=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,_K({},e,{ref:t,icon:gK.default}))),yK=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z`}}]},name:`double-right`,theme:`outlined`}}))());function bK(){return bK=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,bK({},e,{ref:t,icon:yK.default}))),SK={items_per_page:`条/页`,jump_to:`跳至`,jump_to_confirm:`确定`,page:`页`,prev_page:`上一页`,next_page:`下一页`,prev_5:`向前 5 页`,next_5:`向后 5 页`,prev_3:`向前 3 页`,next_3:`向后 3 页`,page_size:`页码`},CK=[10,20,50,100],wK=e=>{let{pageSizeOptions:t=CK,locale:n,changeSize:r,pageSize:i,goButton:a,quickGo:o,rootPrefixCls:s,disabled:c,buildOptionText:l,showSizeChanger:u,sizeChangerRender:d}=e,[f,p]=S.useState(``),m=S.useMemo(()=>!f||Number.isNaN(f)?void 0:Number(f),[f]),h=typeof l==`function`?l:e=>`${e} ${n.items_per_page}`,g=e=>{let t=e.target.value;/^\d*$/.test(t)&&p(t)},_=e=>{a||f===``||(p(``),!(e.relatedTarget&&(e.relatedTarget.className.includes(`${s}-item-link`)||e.relatedTarget.className.includes(`${s}-item`)))&&o?.(m))},v=e=>{f!==``&&(e.keyCode===Zr.ENTER||e.type===`click`)&&(p(``),o?.(m))},y=()=>t.some(e=>e.toString()===i.toString())?t:t.concat([i]).sort((e,t)=>(Number.isNaN(Number(e))?0:Number(e))-(Number.isNaN(Number(t))?0:Number(t))),b=`${s}-options`;if(!u&&!o)return null;let x=null,C=null,w=null;return u&&d&&(x=d({disabled:c,size:i,onSizeChange:e=>{r?.(Number(e))},"aria-label":n.page_size,className:`${b}-size-changer`,options:y().map(e=>({label:h(e),value:e}))})),o&&(a&&(w=typeof a==`boolean`?S.createElement(`button`,{type:`button`,onClick:v,onKeyUp:v,disabled:c,className:`${b}-quick-jumper-button`},n.jump_to_confirm):S.createElement(`span`,{onClick:v,onKeyUp:v},a)),C=S.createElement(`div`,{className:`${b}-quick-jumper`},n.jump_to,S.createElement(`input`,{disabled:c,type:`text`,value:f,onChange:g,onKeyUp:v,onBlur:_,"aria-label":n.page}),n.page,w)),S.createElement(`li`,{className:b},x,C)},TK=e=>{let{rootPrefixCls:t,page:n,active:r,className:i,style:a,showTitle:o,onClick:s,onKeyPress:c,itemRender:l}=e,u=`${t}-item`,d=Y(u,`${u}-${n}`,{[`${u}-active`]:r,[`${u}-disabled`]:!n},i),f=()=>{s(n)},p=e=>{c(e,s,n)},m=l(n,`page`,S.createElement(`a`,{rel:`nofollow`},n));return m?S.createElement(`li`,{title:o?String(n):null,className:d,style:a,onClick:f,onKeyDown:p,tabIndex:0},m):null};function EK(){return EK=Object.assign?Object.assign.bind():function(e){for(var t=1;tn;function OK(){}function kK(e){let t=Number(e);return typeof t==`number`&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function AK(e,t,n){let r=e===void 0?t:e;return Math.floor((n-1)/r)+1}var jK=e=>{let{prefixCls:t=`rc-pagination`,selectPrefixCls:n=`rc-select`,className:r,classNames:i,styles:a,current:o,defaultCurrent:s=1,total:c=0,pageSize:l,defaultPageSize:u=10,onChange:d=OK,hideOnSinglePage:f,align:p,showPrevNextJumpers:m=!0,showQuickJumper:h,showLessItems:g,showTitle:_=!0,onShowSizeChange:v=OK,locale:y=SK,style:b,totalBoundaryShowSizeChanger:x=50,disabled:C,simple:w,showTotal:T,showSizeChanger:E=c>x,sizeChangerRender:D,pageSizeOptions:O,itemRender:k=DK,jumpPrevIcon:A,jumpNextIcon:j,prevIcon:M,nextIcon:N}=e,P=S.useRef(null),[F,I]=Wn(u,l),[L,R]=Wn(s,o),z=Math.max(1,Math.min(L,AK(void 0,F,c))),[B,V]=S.useState(z);(0,S.useEffect)(()=>{V(z)},[z]),`current`in e;let H=Math.max(1,z-(g?3:5)),U=Math.min(AK(void 0,F,c),z+(g?3:5));function ee(n,r){let i=n||S.createElement(`button`,{type:`button`,"aria-label":r,className:`${t}-item-link`});return typeof n==`function`&&(i=S.createElement(n,e)),i}function te(e){let t=e.target.value,n=AK(void 0,F,c),r;return r=t===``?t:Number.isNaN(Number(t))?B:t>=n?n:Number(t),r}function ne(e){return kK(e)&&e!==z&&kK(c)&&c>0}let W=c>F?h:!1;function re(e){(e.keyCode===Zr.UP||e.keyCode===Zr.DOWN)&&e.preventDefault()}function G(e){let t=te(e);switch(t!==B&&V(t),e.keyCode){case Zr.ENTER:ie(t);break;case Zr.UP:ie(t-1);break;case Zr.DOWN:ie(t+1);break;default:break}}function K(e){ie(te(e))}function q(e){let t=AK(e,F,c),n=z>t&&t!==0?t:z;I(e),V(n),v?.(z,e),R(n),d?.(n,e)}function ie(e){if(ne(e)&&!C){let t=AK(void 0,F,c),n=e;return e>t?n=t:e<1&&(n=1),n!==B&&V(n),R(n),d?.(n,F),n}return z}let J=z>1,ae=zc?c:z*F])),xe=null,Se=AK(void 0,F,c);if(f&&c<=F)return null;let Ce=[],we={rootPrefixCls:t,onClick:ie,onKeyPress:ue,showTitle:_,itemRender:k,page:-1,className:i?.item,style:a?.item},Te=z-1>0?z-1:0,Ee=z+1=je*2&&z!==3&&(Ce[0]=S.cloneElement(Ce[0],{className:Y(`${t}-item-after-jump-prev`,Ce[0].props.className)}),Ce.unshift(ve)),Se-z>=je*2&&z!==Se-2){let e=Ce[Ce.length-1];Ce[Ce.length-1]=S.cloneElement(e,{className:Y(`${t}-item-before-jump-next`,e.props.className)}),Ce.push(xe)}a!==1&&Ce.unshift(S.createElement(TK,EK({},we,{key:1,page:1}))),o!==Se&&Ce.push(S.createElement(TK,EK({},we,{key:Se,page:Se})))}let Me=he(Te);if(Me){let e=!J||!Se;Me=S.createElement(`li`,{title:_?y.prev_page:null,onClick:oe,tabIndex:e?null:0,onKeyDown:de,className:Y(`${t}-prev`,i?.item,{[`${t}-disabled`]:e}),style:a?.item,"aria-disabled":e},Me)}let Ne=ge(Ee);if(Ne){let e,n;w?(e=!ae,n=J?0:null):(e=!ae||!Se,n=e?null:0),Ne=S.createElement(`li`,{title:_?y.next_page:null,onClick:se,tabIndex:n,onKeyDown:fe,className:Y(`${t}-next`,i?.item,{[`${t}-disabled`]:e}),style:a?.item,"aria-disabled":e},Ne)}let Pe=Y(t,r,{[`${t}-start`]:p===`start`,[`${t}-center`]:p===`center`,[`${t}-end`]:p===`end`,[`${t}-simple`]:w,[`${t}-disabled`]:C});return S.createElement(`ul`,EK({className:Pe,style:b,ref:P},ye),be,Me,w?Ae:Ce,Ne,S.createElement(wK,{locale:y,rootPrefixCls:t,disabled:C,selectPrefixCls:n,changeSize:q,pageSize:F,pageSizeOptions:O,quickGo:W?ie:null,goButton:ke,showSizeChanger:E,sizeChangerRender:D}))},MK=e=>{let{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:`not-allowed`,[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`}},"&:focus-visible":{cursor:`not-allowed`,[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`}}},[`&${t}-disabled`]:{cursor:`not-allowed`,[`${t}-item`]:{cursor:`not-allowed`,backgroundColor:`transparent`,"&:hover, &:active":{backgroundColor:`transparent`},a:{color:e.colorTextDisabled,backgroundColor:`transparent`,border:`none`,cursor:`not-allowed`},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:hover, &:active":{backgroundColor:`transparent`},[`${t}-simple&`]:{backgroundColor:`transparent`,"&:hover, &:active":{backgroundColor:`transparent`}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},NK=e=>{let{componentCls:t}=e;return{[`&${t}-small ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-quick-jumper":{input:{...nR(e),width:e.paginationMiniQuickJumperInputWidth}}}}},PK=e=>{let{componentCls:t}=e;return{[`&${t}-large ${t}-options`]:{"&-quick-jumper":{input:{...tR(e)}}}}},FK=e=>{let{componentCls:t,antCls:n}=e,[,r]=$l(n,`pagination`);return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:r(`item-size-actual`),lineHeight:r(`item-size-actual`),verticalAlign:`top`,[`${t}-item-link`]:{height:r(`item-size-actual`),backgroundColor:`transparent`,border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:r(`item-size-actual`),lineHeight:r(`item-size-actual`)}}},[`${t}-simple-pager`]:{display:`inline-flex`,alignItems:`center`,height:r(`item-size-actual`),marginInlineEnd:r(`item-spacing-actual`),input:{boxSizing:`border-box`,height:`100%`,width:e.quickJumperInputWidth,padding:`0 ${X(e.paginationItemPaddingInline)}`,textAlign:`center`,backgroundColor:e.itemInputBg,border:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:`none`,transition:`border-color ${e.motionDurationMid}`,color:`inherit`,"&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${X(e.inputOutlineOffset)} 0 ${X(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:`not-allowed`}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:`transparent`}}}},[`&${t}-small`]:{[`${t}-simple-pager`]:{input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},IK=e=>{let{componentCls:t,antCls:n}=e,[,r]=$l(n,`pagination`);return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:`relative`,[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:`auto`}},[`${t}-item-ellipsis`]:{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:`block`,margin:`auto`,color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:`center`,textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[` + `]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:`inherit`,border:`none`,outline:`none`,background:`transparent`,minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:`none !important`}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:`absolute`,insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:`absolute`,top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:`inline-flex`,alignItems:`center`,margin:`auto`,pointerEvents:`none`}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:`ltr`,insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},eK=Xl([`Input`,`TextArea`],e=>$G(lc(e,RL(e))),zL,{resetFont:!1}),tK=(0,S.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,size:i,disabled:a,status:o,allowClear:s,classNames:c,rootClassName:l,className:u,style:d,styles:f,variant:p,showCount:m,onMouseDown:h,onResize:g,..._}=e,{getPrefixCls:v,direction:y,allowClear:b,autoComplete:x,className:C,style:w,classNames:T,styles:E}=_a(`textArea`),D=S.useContext(pm),O=a??D,{status:k,hasFeedback:A,feedbackIcon:j}=S.useContext(Fy),M=EC(k,o),[N,P]=xf([T,c],[E,f],{props:e}),F=S.useRef(null);S.useImperativeHandle(t,()=>({resizableTextArea:F.current?.resizableTextArea,focus:e=>{Mr(F.current?.resizableTextArea?.textArea,e)},blur:()=>F.current?.blur(),nativeElement:F.current?.nativeElement||null}));let I=v(`input`,n),L=ap(I),[R,z]=rR(I,l);eK(I,L);let{compactSize:B,compactItemClassnames:V}=jh(I,y),H=Oh(e=>i??B??e),[U,ee]=FC(`textArea`,p,r),te=TV(s??b),[ne,W]=S.useState(!1),[re,G]=S.useState(!1),K=e=>{W(!0),h?.(e);let t=()=>{W(!1),document.removeEventListener(`mouseup`,t)};document.addEventListener(`mouseup`,t)},q=e=>{if(g?.(e),ne&&typeof getComputedStyle==`function`){let e=F.current?.nativeElement?.querySelector(`textarea`);e&&getComputedStyle(e).resize===`both`&&G(!0)}};return S.createElement(QG,{autoComplete:x,..._,style:{...P.root,...w,...d},styles:P,disabled:O,allowClear:te,className:Y(z,L,u,l,V,C,N.root,{[`${I}-textarea-affix-wrapper-resize-dirty`]:re}),classNames:{...N,textarea:Y({[`${I}-sm`]:H===`small`,[`${I}-lg`]:H===`large`},R,N.textarea,ne&&`${I}-mouse-active`),variant:Y({[`${I}-${U}`]:ee},TC(I,M)),affixWrapper:Y(`${I}-textarea-affix-wrapper`,{[`${I}-affix-wrapper-rtl`]:y===`rtl`,[`${I}-affix-wrapper-sm`]:H===`small`,[`${I}-affix-wrapper-lg`]:H===`large`,[`${I}-textarea-show-count`]:m||e.count?.show},R)},prefixCls:I,suffix:A&&S.createElement(`span`,{className:`${I}-textarea-suffix`},j),showCount:m,ref:F,onResize:q,onMouseDown:K})}),nK=OV;nK.Group=SG,nK.Search=zG,nK.TextArea=tK,nK.Password=LG,nK.OTP=OG;function rK(e,t,n){return typeof n==`boolean`?n:e.length?!0:Di(t).some(e=>e.type===HE)}var iK=({suffixCls:e,tagName:t,displayName:n})=>n=>S.forwardRef((r,i)=>S.createElement(n,{ref:i,suffixCls:e,tagName:t,...r})),aK=S.forwardRef((e,t)=>{let{prefixCls:n,suffixCls:r,className:i,tagName:a,...o}=e,{getPrefixCls:s}=S.useContext(ma),c=s(`layout`,n),[l]=IE(c),u=r?`${c}-${r}`:c;return S.createElement(a,{className:Y(n||u,i,l),ref:t,...o})}),oK=S.forwardRef((e,t)=>{let{direction:n}=S.useContext(ma),[r,i]=S.useState([]),{prefixCls:a,className:o,rootClassName:s,children:c,hasSider:l,tagName:u,style:d,...f}=e,p=hi(f,[`suffixCls`]),{getPrefixCls:m,className:h,style:g}=_a(`layout`),_=m(`layout`,a),v=rK(r,c,l),[y,b]=IE(_),x=Y(_,{[`${_}-has-sider`]:v,[`${_}-rtl`]:n===`rtl`},h,o,s,y,b),C=S.useMemo(()=>({siderHook:{addSider:e=>{i(t=>[].concat(da(t),[e]))},removeSider:e=>{i(t=>t.filter(t=>t!==e))}}}),[]);return S.createElement(ME.Provider,{value:C},S.createElement(u,{ref:t,className:x,style:{...g,...d},...p},c))}),sK=iK({tagName:`div`,displayName:`Layout`})(oK),cK=iK({suffixCls:`header`,tagName:`header`,displayName:`Header`})(aK),lK=iK({suffixCls:`footer`,tagName:`footer`,displayName:`Footer`})(aK),uK=iK({suffixCls:`content`,tagName:`main`,displayName:`Content`})(aK),dK=sK;dK.Header=cK,dK.Footer=lK,dK.Content=uK,dK.Sider=HE,dK._InternalSiderContext=BE;var fK=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z`}}]},name:`double-left`,theme:`outlined`}}))());function pK(){return pK=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,pK({},e,{ref:t,icon:fK.default}))),hK=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z`}}]},name:`double-right`,theme:`outlined`}}))());function gK(){return gK=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,gK({},e,{ref:t,icon:hK.default}))),vK={items_per_page:`条/页`,jump_to:`跳至`,jump_to_confirm:`确定`,page:`页`,prev_page:`上一页`,next_page:`下一页`,prev_5:`向前 5 页`,next_5:`向后 5 页`,prev_3:`向前 3 页`,next_3:`向后 3 页`,page_size:`页码`},yK=[10,20,50,100],bK=e=>{let{pageSizeOptions:t=yK,locale:n,changeSize:r,pageSize:i,goButton:a,quickGo:o,rootPrefixCls:s,disabled:c,buildOptionText:l,showSizeChanger:u,sizeChangerRender:d}=e,[f,p]=S.useState(``),m=S.useMemo(()=>!f||Number.isNaN(f)?void 0:Number(f),[f]),h=typeof l==`function`?l:e=>`${e} ${n.items_per_page}`,g=e=>{let t=e.target.value;/^\d*$/.test(t)&&p(t)},_=e=>{a||f===``||(p(``),!(e.relatedTarget&&(e.relatedTarget.className.includes(`${s}-item-link`)||e.relatedTarget.className.includes(`${s}-item`)))&&o?.(m))},v=e=>{f!==``&&(e.keyCode===Zr.ENTER||e.type===`click`)&&(p(``),o?.(m))},y=()=>t.some(e=>e.toString()===i.toString())?t:t.concat([i]).sort((e,t)=>(Number.isNaN(Number(e))?0:Number(e))-(Number.isNaN(Number(t))?0:Number(t))),b=`${s}-options`;if(!u&&!o)return null;let x=null,C=null,w=null;return u&&d&&(x=d({disabled:c,size:i,onSizeChange:e=>{r?.(Number(e))},"aria-label":n.page_size,className:`${b}-size-changer`,options:y().map(e=>({label:h(e),value:e}))})),o&&(a&&(w=typeof a==`boolean`?S.createElement(`button`,{type:`button`,onClick:v,onKeyUp:v,disabled:c,className:`${b}-quick-jumper-button`},n.jump_to_confirm):S.createElement(`span`,{onClick:v,onKeyUp:v},a)),C=S.createElement(`div`,{className:`${b}-quick-jumper`},n.jump_to,S.createElement(`input`,{disabled:c,type:`text`,value:f,onChange:g,onKeyUp:v,onBlur:_,"aria-label":n.page}),n.page,w)),S.createElement(`li`,{className:b},x,C)},xK=e=>{let{rootPrefixCls:t,page:n,active:r,className:i,style:a,showTitle:o,onClick:s,onKeyPress:c,itemRender:l}=e,u=`${t}-item`,d=Y(u,`${u}-${n}`,{[`${u}-active`]:r,[`${u}-disabled`]:!n},i),f=()=>{s(n)},p=e=>{c(e,s,n)},m=l(n,`page`,S.createElement(`a`,{rel:`nofollow`},n));return m?S.createElement(`li`,{title:o?String(n):null,className:d,style:a,onClick:f,onKeyDown:p,tabIndex:0},m):null};function SK(){return SK=Object.assign?Object.assign.bind():function(e){for(var t=1;tn;function wK(){}function TK(e){let t=Number(e);return typeof t==`number`&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function EK(e,t,n){let r=e===void 0?t:e;return Math.floor((n-1)/r)+1}var DK=e=>{let{prefixCls:t=`rc-pagination`,selectPrefixCls:n=`rc-select`,className:r,classNames:i,styles:a,current:o,defaultCurrent:s=1,total:c=0,pageSize:l,defaultPageSize:u=10,onChange:d=wK,hideOnSinglePage:f,align:p,showPrevNextJumpers:m=!0,showQuickJumper:h,showLessItems:g,showTitle:_=!0,onShowSizeChange:v=wK,locale:y=vK,style:b,totalBoundaryShowSizeChanger:x=50,disabled:C,simple:w,showTotal:T,showSizeChanger:E=c>x,sizeChangerRender:D,pageSizeOptions:O,itemRender:k=CK,jumpPrevIcon:A,jumpNextIcon:j,prevIcon:M,nextIcon:N}=e,P=S.useRef(null),[F,I]=Wn(u,l),[L,R]=Wn(s,o),z=Math.max(1,Math.min(L,EK(void 0,F,c))),[B,V]=S.useState(z);(0,S.useEffect)(()=>{V(z)},[z]),`current`in e;let H=Math.max(1,z-(g?3:5)),U=Math.min(EK(void 0,F,c),z+(g?3:5));function ee(n,r){let i=n||S.createElement(`button`,{type:`button`,"aria-label":r,className:`${t}-item-link`});return typeof n==`function`&&(i=S.createElement(n,e)),i}function te(e){let t=e.target.value,n=EK(void 0,F,c),r;return r=t===``?t:Number.isNaN(Number(t))?B:t>=n?n:Number(t),r}function ne(e){return TK(e)&&e!==z&&TK(c)&&c>0}let W=c>F?h:!1;function re(e){(e.keyCode===Zr.UP||e.keyCode===Zr.DOWN)&&e.preventDefault()}function G(e){let t=te(e);switch(t!==B&&V(t),e.keyCode){case Zr.ENTER:ie(t);break;case Zr.UP:ie(t-1);break;case Zr.DOWN:ie(t+1);break;default:break}}function K(e){ie(te(e))}function q(e){let t=EK(e,F,c),n=z>t&&t!==0?t:z;I(e),V(n),v?.(z,e),R(n),d?.(n,e)}function ie(e){if(ne(e)&&!C){let t=EK(void 0,F,c),n=e;return e>t?n=t:e<1&&(n=1),n!==B&&V(n),R(n),d?.(n,F),n}return z}let J=z>1,ae=zc?c:z*F])),xe=null,Se=EK(void 0,F,c);if(f&&c<=F)return null;let Ce=[],we={rootPrefixCls:t,onClick:ie,onKeyPress:ue,showTitle:_,itemRender:k,page:-1,className:i?.item,style:a?.item},Te=z-1>0?z-1:0,Ee=z+1=je*2&&z!==3&&(Ce[0]=S.cloneElement(Ce[0],{className:Y(`${t}-item-after-jump-prev`,Ce[0].props.className)}),Ce.unshift(ve)),Se-z>=je*2&&z!==Se-2){let e=Ce[Ce.length-1];Ce[Ce.length-1]=S.cloneElement(e,{className:Y(`${t}-item-before-jump-next`,e.props.className)}),Ce.push(xe)}a!==1&&Ce.unshift(S.createElement(xK,SK({},we,{key:1,page:1}))),o!==Se&&Ce.push(S.createElement(xK,SK({},we,{key:Se,page:Se})))}let Me=he(Te);if(Me){let e=!J||!Se;Me=S.createElement(`li`,{title:_?y.prev_page:null,onClick:oe,tabIndex:e?null:0,onKeyDown:de,className:Y(`${t}-prev`,i?.item,{[`${t}-disabled`]:e}),style:a?.item,"aria-disabled":e},Me)}let Ne=ge(Ee);if(Ne){let e,n;w?(e=!ae,n=J?0:null):(e=!ae||!Se,n=e?null:0),Ne=S.createElement(`li`,{title:_?y.next_page:null,onClick:se,tabIndex:n,onKeyDown:fe,className:Y(`${t}-next`,i?.item,{[`${t}-disabled`]:e}),style:a?.item,"aria-disabled":e},Ne)}let Pe=Y(t,r,{[`${t}-start`]:p===`start`,[`${t}-center`]:p===`center`,[`${t}-end`]:p===`end`,[`${t}-simple`]:w,[`${t}-disabled`]:C});return S.createElement(`ul`,SK({className:Pe,style:b,ref:P},ye),be,Me,w?Ae:Ce,Ne,S.createElement(bK,{locale:y,rootPrefixCls:t,disabled:C,selectPrefixCls:n,changeSize:q,pageSize:F,pageSizeOptions:O,quickGo:W?ie:null,goButton:ke,showSizeChanger:E,sizeChangerRender:D}))},OK=e=>{let{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:`not-allowed`,[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`}},"&:focus-visible":{cursor:`not-allowed`,[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`}}},[`&${t}-disabled`]:{cursor:`not-allowed`,[`${t}-item`]:{cursor:`not-allowed`,backgroundColor:`transparent`,"&:hover, &:active":{backgroundColor:`transparent`},a:{color:e.colorTextDisabled,backgroundColor:`transparent`,border:`none`,cursor:`not-allowed`},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:hover, &:active":{backgroundColor:`transparent`},[`${t}-simple&`]:{backgroundColor:`transparent`,"&:hover, &:active":{backgroundColor:`transparent`}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},kK=e=>{let{componentCls:t}=e;return{[`&${t}-small ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-quick-jumper":{input:{...tR(e),width:e.paginationMiniQuickJumperInputWidth}}}}},AK=e=>{let{componentCls:t}=e;return{[`&${t}-large ${t}-options`]:{"&-quick-jumper":{input:{...eR(e)}}}}},jK=e=>{let{componentCls:t,antCls:n}=e,[,r]=$l(n,`pagination`);return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:r(`item-size-actual`),lineHeight:r(`item-size-actual`),verticalAlign:`top`,[`${t}-item-link`]:{height:r(`item-size-actual`),backgroundColor:`transparent`,border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:r(`item-size-actual`),lineHeight:r(`item-size-actual`)}}},[`${t}-simple-pager`]:{display:`inline-flex`,alignItems:`center`,height:r(`item-size-actual`),marginInlineEnd:r(`item-spacing-actual`),input:{boxSizing:`border-box`,height:`100%`,width:e.quickJumperInputWidth,padding:`0 ${X(e.paginationItemPaddingInline)}`,textAlign:`center`,backgroundColor:e.itemInputBg,border:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:`none`,transition:`border-color ${e.motionDurationMid}`,color:`inherit`,"&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${X(e.inputOutlineOffset)} 0 ${X(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:`not-allowed`}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:`transparent`}}}},[`&${t}-small`]:{[`${t}-simple-pager`]:{input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},MK=e=>{let{componentCls:t,antCls:n}=e,[,r]=$l(n,`pagination`);return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:`relative`,[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:`auto`}},[`${t}-item-ellipsis`]:{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:`block`,margin:`auto`,color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:`center`,textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[` ${t}-prev, ${t}-jump-prev, ${t}-jump-next @@ -327,21 +327,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${t}-next, ${t}-jump-prev, ${t}-jump-next - `]:{display:`inline-block`,minWidth:r(`item-size-actual`),height:r(`item-size-actual`),color:e.colorText,fontFamily:e.fontFamily,lineHeight:r(`item-size-actual`),textAlign:`center`,verticalAlign:`middle`,listStyle:`none`,borderRadius:e.borderRadius,cursor:`pointer`,transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:`pointer`,userSelect:`none`},[`${t}-item-link`]:{display:`block`,width:`100%`,height:`100%`,padding:0,fontSize:e.fontSizeSM,textAlign:`center`,backgroundColor:`transparent`,border:`${X(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:`none`,transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:`transparent`}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:`inline-block`,marginInlineStart:e.margin,verticalAlign:`middle`,"&-size-changer":{width:`auto`},"&-quick-jumper":{display:`inline-block`,height:r(`item-size-actual`),marginInlineStart:e.marginXS,lineHeight:r(`item-size-actual`),verticalAlign:`baseline`,input:{...rR(e),...HL(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow}),"&[disabled]":{...VL(e)},width:e.quickJumperInputWidth,height:r(`item-size-actual`),boxSizing:`border-box`,margin:0,marginInlineStart:r(`item-spacing-actual`),marginInlineEnd:r(`item-spacing-actual`)}}}}},LK=e=>{let{componentCls:t,antCls:n}=e,[,r]=$l(n,`pagination`);return{[`${t}-item`]:{display:`inline-block`,minWidth:r(`item-size-actual`),height:r(`item-size-actual`),marginInlineEnd:r(`item-spacing-actual`),fontFamily:e.fontFamily,lineHeight:X(e.calc(r(`item-size-actual`)).sub(2).equal()),textAlign:`center`,verticalAlign:`middle`,listStyle:`none`,backgroundColor:e.itemBg,border:`${X(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:`pointer`,userSelect:`none`,a:{display:`block`,padding:`0 ${X(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:`none`}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.itemActiveColor},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.itemActiveColorHover}}}}},RK=e=>{let{componentCls:t,antCls:n}=e,[r,i]=$l(n,`pagination`);return{[t]:{[r(`item-size-actual`)]:X(e.itemSize),[r(`item-spacing-actual`)]:X(e.marginXS),"&-small":{[r(`item-size-actual`)]:X(e.itemSizeSM),[r(`item-spacing-actual`)]:X(e.marginXXS)},"&-large":{[r(`item-size-actual`)]:X(e.itemSizeLG),[r(`item-spacing-actual`)]:X(e.marginSM)},...Vl(e),display:`flex`,alignItems:`center`,"&-start":{justifyContent:`start`},"&-center":{justifyContent:`center`},"&-end":{justifyContent:`end`},"ul, ol":{margin:0,padding:0,listStyle:`none`},"&::after":{display:`block`,clear:`both`,height:0,overflow:`hidden`,visibility:`hidden`,content:`""`},[`${t}-total-text`]:{display:`inline-block`,height:i(`item-size-actual`),marginInlineEnd:i(`item-spacing-actual`),lineHeight:X(e.calc(i(`item-size-actual`)).sub(2).equal()),verticalAlign:`middle`},...LK(e),...IK(e),...FK(e),...NK(e),...PK(e),...MK(e),[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:`none`}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:`none`}}},[`&${e.componentCls}-rtl`]:{direction:`rtl`}}},zK=e=>{let{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:{...Gl(e)},[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0},...Wl(e)}},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:Wl(e)}}}},BK=e=>({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemSizeLG:e.controlHeightLG,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0,...BL(e)}),VK=e=>lc(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:`0.13em`},zL(e)),HK=Xl(`Pagination`,e=>{let t=VK(e);return[RK(t),zK(t)]},BK),UK=e=>{let{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},WK=Ql([`Pagination`,`bordered`],e=>UK(VK(e)),BK);function GK(e){return(0,S.useMemo)(()=>typeof e==`boolean`?[e,{}]:ef(e)?[!0,e]:[void 0,void 0],[e])}var KK=e=>{let{align:t,prefixCls:n,selectPrefixCls:r,className:i,rootClassName:a,style:o,size:s,locale:c,responsive:l,showSizeChanger:u,selectComponentClass:d,pageSizeOptions:f,styles:p,classNames:m,...h}=e,{xs:g}=vw(l),[,_]=zl(),{getPrefixCls:v,direction:y,showSizeChanger:b,className:x,style:C,classNames:w,styles:T,totalBoundaryShowSizeChanger:E}=_a(`pagination`),D=v(`pagination`,n),[O,k]=HK(D),A=Oh(s),j=A===`small`||!!(g&&!A&&l),M={...e,size:A},[N,P]=xf([w,m],[T,p],{props:M}),[F]=qd(`Pagination`,Dd),I={...F,...c},[L,R]=GK(u),[z,B]=GK(b),V=L??z,H=R??B,U=d||uw,ee=S.useMemo(()=>f?f.map(Number):void 0,[f]),te=e=>{let{disabled:t,size:n,onSizeChange:r,"aria-label":i,className:a,options:o}=e,{className:s,onChange:c}=H||{},l=o.find(e=>String(e.value)===String(n))?.value;return S.createElement(U,{disabled:t,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:e=>e.parentNode,"aria-label":i,options:o,...H,value:l,onChange:(e,t)=>{r?.(e),c?.(e,t)},size:A,className:Y(a,s)})},ne=S.useMemo(()=>{let e=S.createElement(`span`,{className:`${D}-item-ellipsis`},`•••`);return{prevIcon:S.createElement(`button`,{className:`${D}-item-link`,type:`button`,tabIndex:-1},y===`rtl`?S.createElement(Ug,null):S.createElement(mT,null)),nextIcon:S.createElement(`button`,{className:`${D}-item-link`,type:`button`,tabIndex:-1},y===`rtl`?S.createElement(mT,null):S.createElement(Ug,null)),jumpPrevIcon:S.createElement(`a`,{className:`${D}-item-link`},S.createElement(`div`,{className:`${D}-item-container`},y===`rtl`?S.createElement(xK,{className:`${D}-item-link-icon`}):S.createElement(vK,{className:`${D}-item-link-icon`}),e)),jumpNextIcon:S.createElement(`a`,{className:`${D}-item-link`},S.createElement(`div`,{className:`${D}-item-container`},y===`rtl`?S.createElement(vK,{className:`${D}-item-link-icon`}):S.createElement(xK,{className:`${D}-item-link-icon`}),e))}},[y,D]),W=v(`select`,r),re=Y({[`${D}-${t}`]:!!t,[`${D}-${A}`]:A,[`${D}-mini`]:j,[`${D}-rtl`]:y===`rtl`,[`${D}-bordered`]:_.wireframe},x,i,a,N.root,O,k),G={...P.root,...C,...o};return S.createElement(S.Fragment,null,_.wireframe&&S.createElement(WK,{prefixCls:D}),S.createElement(jK,{...ne,...h,styles:P,classNames:N,style:G,prefixCls:D,selectPrefixCls:W,className:re,locale:I,pageSizeOptions:ee,showSizeChanger:V,totalBoundaryShowSizeChanger:h.totalBoundaryShowSizeChanger??E,sizeChangerRender:te}))},qK=100,JK=qK/5,YK=qK/2-JK/2,XK=YK*2*Math.PI,ZK=50,QK=e=>{let{dotClassName:t,style:n,hasCircleCls:r}=e;return S.createElement(`circle`,{className:Y(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:YK,cx:ZK,cy:ZK,strokeWidth:JK,style:n})},$K=({percent:e,prefixCls:t})=>{let n=`${t}-dot`,r=`${n}-holder`,i=`${r}-hidden`,[a,o]=S.useState(!1);Vn(()=>{e!==0&&o(!0)},[e!==0]);let s=Math.max(Math.min(e,100),0);if(!a)return null;let c={strokeDashoffset:`${XK/4}`,strokeDasharray:`${XK*s/100} ${XK*(100-s)/100}`};return S.createElement(`span`,{className:Y(r,`${n}-progress`,{[i]:s<=0})},S.createElement(`svg`,{viewBox:`0 0 ${qK} ${qK}`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":s},S.createElement(QK,{dotClassName:n,hasCircleCls:!0}),S.createElement(QK,{dotClassName:n,style:c})))};function eq(e){let{prefixCls:t,percent:n=0,className:r,style:i}=e,a=`${t}-dot`,o=`${a}-holder`,s=`${o}-hidden`;return S.createElement(S.Fragment,null,S.createElement(`span`,{className:Y(o,r,n>0&&s),style:i},S.createElement(`span`,{className:Y(a,`${t}-dot-spin`)},[1,2,3,4].map(e=>S.createElement(`i`,{className:`${t}-dot-item`,key:e})))),S.createElement($K,{prefixCls:t,percent:n}))}function tq(e){let{prefixCls:t,indicator:n,percent:r,className:i,style:a}=e,o=`${t}-dot`;return n&&S.isValidElement(n)?cm(n,e=>({className:Y(e.className,o,i),style:{...e.style,...a},percent:r})):S.createElement(eq,{prefixCls:t,percent:r,className:i,style:a})}var nq=new As(`antSpinMove`,{to:{opacity:1}}),rq=new As(`antRotate`,{to:{transform:`rotate(405deg)`}}),iq=e=>{let{componentCls:t}=e,n=`${t}-section`;return{[t]:{...Vl(e),position:`relative`,"&-rtl":{direction:`rtl`},[`&${n}, ${n}`]:{display:`flex`,alignItems:`center`,flexDirection:`column`,gap:e.paddingSM,color:e.colorPrimary},[`&${n}`]:{display:`inline-flex`},[n]:{position:`absolute`,top:`50%`,left:{_skip_check_:!0,value:`50%`},transform:`translate(-50%, -50%)`,zIndex:1},[`${t}-description`]:{fontSize:e.fontSize,lineHeight:1},[`${t}-container`]:{position:`relative`,transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:`100%`,height:`100%`,background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:`""`,pointerEvents:`none`}},"&-spinning":{[`${t}-description`]:{textShadow:`0 0px 5px ${e.colorBgContainer}`},[`${t}-container`]:{clear:`both`,opacity:.5,userSelect:`none`,pointerEvents:`none`,"&::after":{opacity:.4,pointerEvents:`auto`}}},"&-fullscreen":{position:`fixed`,inset:0,backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,opacity:0,pointerEvents:`none`,transition:`all ${e.motionDurationMid}`,[`&${t}-spinning`]:{opacity:1,pointerEvents:`auto`},[n]:{color:e.colorWhite,[`${t}-description`]:{color:e.colorTextLightSolid}}}}}},aq=e=>{let{componentCls:t,antCls:n,motionDurationSlow:r}=e,[i,a]=$l(n,`spin`);return{[t]:{[i(`dot-holder-size`)]:e.dotSize,[i(`dot-item-size`)]:`calc((${a(`dot-holder-size`)} - ${e.marginXXS} / 2) / 2)`,[`${t}-dot`]:{"&-holder":{width:`1em`,height:`1em`,fontSize:a(`dot-holder-size`),display:`inline-block`,transition:[`transform`,`opacity`].map(e=>`${e} ${r} ease`).join(`, `),transformOrigin:`50% 50%`,lineHeight:1,"&-hidden":{transform:`scale(0.3)`,opacity:0}},position:`relative`,display:`inline-block`,fontSize:a(`dot-holder-size`),width:`1em`,height:`1em`,"&-spin":{transform:`rotate(45deg)`,animationName:rq,animationDuration:`1.2s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`},"&-item":{position:`absolute`,display:`block`,width:a(`dot-item-size`),height:a(`dot-item-size`),background:`currentColor`,borderRadius:`100%`,transform:`scale(0.75)`,transformOrigin:`50% 50%`,opacity:.3,animationName:nq,animationDuration:`1s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`,animationDirection:`alternate`,"&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:`0s`},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:`0.4s`},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:`0.8s`},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:`1.2s`}},"&-progress":{position:`absolute`,left:`50%`,top:0,transform:`translateX(-50%)`},"&-circle":{strokeLinecap:`round`,transition:[`stroke-dashoffset`,`stroke-dasharray`,`stroke`,`stroke-width`,`opacity`].map(e=>`${e} ${r} ease`).join(`,`),fillOpacity:0,stroke:`currentcolor`},"&-circle-bg":{stroke:e.colorFillSecondary}}}}},oq=e=>{let{componentCls:t}=e,[n]=$l(e.antCls,`spin`);return{[t]:{"&-sm":{[n(`dot-holder-size`)]:e.dotSizeSM},"&-lg":{[n(`dot-holder-size`)]:e.dotSizeLG}}}},sq=Xl(`Spin`,e=>{let t=lc(e,{spinDotDefault:e.colorTextDescription});return[iq(t),aq(t),oq(t)]},e=>{let{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:n}}),cq=200,lq=[[30,.05],[70,.03],[96,.01]];function uq(e,t){let[n,r]=S.useState(0),i=S.useRef(null),a=t===`auto`;return S.useEffect(()=>(a&&e&&(r(0),i.current=setInterval(()=>{r(e=>{let t=100-e;for(let n=0;n{i.current&&=(clearInterval(i.current),null)}),[a,e]),a?n:t}var dq;function fq(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}var pq=e=>{let{prefixCls:t,spinning:n=!0,delay:r=0,className:i,rootClassName:a,size:o,tip:s,description:c,wrapperClassName:l,style:u,children:d,fullscreen:f=!1,indicator:p,percent:m,classNames:h,styles:g,..._}=e,{getPrefixCls:v,direction:y,indicator:b,className:x,style:C,classNames:w,styles:T}=_a(`spin`),E=v(`spin`,t),[D,O]=sq(E),[k,A]=S.useState(()=>n&&!fq(n,r)),j=uq(k,m);S.useEffect(()=>{if(n){let e=Pz(r,()=>{A(!0)});return e(),()=>{e?.cancel?.()}}A(!1)},[r,n]);let M=Oh(e=>o??e),N=c??s,P={...e,size:M,spinning:k,tip:N,description:N,fullscreen:f,children:d,percent:j},[F,I]=xf([w,h],[T,g],{props:P}),L=p??b??dq,R=d!==void 0,z=R||f,B=S.createElement(S.Fragment,null,S.createElement(tq,{className:Y(F.indicator),style:I.indicator,prefixCls:E,indicator:L,percent:j}),N&&S.createElement(`div`,{className:Y(`${E}-description`,F.tip,F.description),style:{...I.tip,...I.description}},N));return S.createElement(`div`,{className:Y(E,{[`${E}-sm`]:M===`small`,[`${E}-lg`]:M===`large`,[`${E}-spinning`]:k,[`${E}-rtl`]:y===`rtl`,[`${E}-fullscreen`]:f},a,F.root,f&&F.mask,z?l:[`${E}-section`,F.section],x,i,D,O),style:{...I.root,...z?{}:I.section,...f?I.mask:{},...C,...u},"aria-live":`polite`,"aria-busy":k,..._},k&&(z?S.createElement(`div`,{className:Y(`${E}-section`,F.section),style:I.section},B):B),R&&S.createElement(`div`,{className:Y(`${E}-container`,F.container),style:I.container},d))};pq.setDefaultIndicator=e=>{dq=e};var mq=S.createContext({});mq.Consumer;var hq=({prefixCls:e,className:t,avatar:n,title:r,description:i,...a})=>{let{getPrefixCls:o}=(0,S.useContext)(ma),s=o(`list`,e),c=Y(`${s}-item-meta`,t),l=S.createElement(`div`,{className:`${s}-item-meta-content`},r&&S.createElement(`h4`,{className:`${s}-item-meta-title`},r),i&&S.createElement(`div`,{className:`${s}-item-meta-description`},i));return S.createElement(`div`,{...a,className:c},n&&S.createElement(`div`,{className:`${s}-item-meta-avatar`},n),(r||i)&&l)},gq=S.forwardRef((e,t)=>{let{prefixCls:n,children:r,actions:i,extra:a,styles:o,className:s,classNames:c,colStyle:l,...u}=e,{grid:d,itemLayout:f}=(0,S.useContext)(mq),{getPrefixCls:p,list:m}=(0,S.useContext)(ma),h=e=>Y(m?.item?.classNames?.[e],c?.[e]),g=e=>({...m?.item?.styles?.[e],...o?.[e]}),_=()=>{let e=Di(r);return e.some(e=>typeof e==`string`)&&e.length>1},v=()=>f===`vertical`?!!a:!_(),y=p(`list`,n),b=i&&i.length>0&&S.createElement(`ul`,{className:Y(`${y}-item-action`,h(`actions`)),key:`actions`,style:g(`actions`)},i.map((e,t)=>S.createElement(`li`,{key:`${y}-item-action-${t}`},e,t!==i.length-1&&S.createElement(`em`,{className:`${y}-item-action-split`})))),x=d?`div`:`li`,C=S.createElement(x,{...u,...d?{}:{ref:t},className:Y(`${y}-item`,{[`${y}-item-no-flex`]:!v()},s)},f===`vertical`&&a?[S.createElement(`div`,{className:`${y}-item-main`,key:`content`},r,b),S.createElement(`div`,{className:Y(`${y}-item-extra`,h(`extra`)),key:`extra`,style:g(`extra`)},a)]:[r,b,cm(a,{key:`extra`})]);return d?S.createElement(fV,{ref:t,flex:1,style:l},C):C});gq.Meta=hq;var _q=e=>{let{listBorderedCls:t,componentCls:n,paddingLG:r,margin:i,itemPaddingSM:a,itemPaddingLG:o,marginLG:s,borderRadiusLG:c}=e,l=X(e.calc(c).sub(e.lineWidth).equal());return{[t]:{border:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:c,[`${n}-header`]:{borderRadius:`${l} ${l} 0 0`},[`${n}-footer`]:{borderRadius:`0 0 ${l} ${l}`},[`${n}-header,${n}-footer,${n}-item`]:{paddingInline:r},[`${n}-pagination`]:{margin:`${X(i)} ${X(s)}`}},[`${t}${n}-sm`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:a}},[`${t}${n}-lg`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:o}}}},vq=e=>{let{componentCls:t,screenSM:n,screenMD:r,marginLG:i,marginSM:a,margin:o}=e;return{[`@media screen and (max-width:${r}px)`]:{[t]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:i}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:i}}}},[`@media screen and (max-width: ${n}px)`]:{[t]:{[`${t}-item`]:{flexWrap:`wrap`,[`${t}-action`]:{marginInlineStart:a}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:`wrap-reverse`,[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${X(o)}`}}}}}},yq=e=>{let{componentCls:t,antCls:n,controlHeight:r,minHeight:i,paddingSM:a,marginLG:o,padding:s,itemPadding:c,colorPrimary:l,itemPaddingSM:u,itemPaddingLG:d,paddingXS:f,margin:p,colorText:m,colorTextDescription:h,motionDurationSlow:g,lineWidth:_,headerBg:v,footerBg:y,emptyTextPadding:b,metaMarginBottom:x,avatarMarginRight:S,titleMarginBottom:C,descriptionFontSize:w}=e;return{[t]:{...Vl(e),position:`relative`,"--rc-virtual-list-scrollbar-bg":e.colorSplit,"*":{outline:`none`},[`${t}-header`]:{background:v},[`${t}-footer`]:{background:y},[`${t}-header, ${t}-footer`]:{paddingBlock:a},[`${t}-pagination`]:{marginBlockStart:o,[`${n}-pagination-options`]:{textAlign:`start`}},[`${t}-spin`]:{minHeight:i,textAlign:`center`},[`${t}-items`]:{margin:0,padding:0,listStyle:`none`},[`${t}-item`]:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:c,color:m,[`${t}-item-meta`]:{display:`flex`,flex:1,alignItems:`flex-start`,maxWidth:`100%`,[`${t}-item-meta-avatar`]:{marginInlineEnd:S},[`${t}-item-meta-content`]:{flex:`1 0`,width:0,color:m},[`${t}-item-meta-title`]:{margin:`0 0 ${X(e.marginXXS)} 0`,color:m,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:m,transition:`all ${g}`,"&:hover":{color:l}}},[`${t}-item-meta-description`]:{color:h,fontSize:w,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:`0 0 auto`,marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:`none`,"& > li":{position:`relative`,display:`inline-block`,padding:`0 ${X(f)}`,color:h,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:`center`,"&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:`absolute`,insetBlockStart:`50%`,insetInlineEnd:0,width:_,height:e.calc(e.fontHeight).sub(e.calc(e.marginXXS).mul(2)).equal(),transform:`translateY(-50%)`,backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${X(s)} 0`,color:h,fontSize:e.fontSizeSM,textAlign:`center`},[`${t}-empty-text`]:{padding:b,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:`center`},[`${t}-item-no-flex`]:{display:`block`}},[`${t}-grid ${n}-col > ${t}-item`]:{display:`block`,maxWidth:`100%`,marginBlockEnd:p,paddingBlock:0,borderBlockEnd:`none`},[`${t}-vertical ${t}-item`]:{alignItems:`initial`,[`${t}-item-main`]:{display:`block`,flex:1},[`${t}-item-extra`]:{marginInlineStart:o},[`${t}-item-meta`]:{marginBlockEnd:x,[`${t}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:C,color:m,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:s,marginInlineStart:`auto`,"> li":{padding:`0 ${X(s)}`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:`none`}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:r},[`${t}-split${t}-something-after-last-item ${n}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:d},[`${t}-sm ${t}-item`]:{padding:u},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:`right`}}}}},bq=Xl(`List`,e=>{let t=lc(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG});return[yq(t),_q(t),vq(t)]},e=>({contentWidth:220,itemPadding:`${X(e.paddingContentVertical)} 0`,itemPaddingSM:`${X(e.paddingContentVerticalSM)} ${X(e.paddingContentHorizontal)}`,itemPaddingLG:`${X(e.paddingContentVerticalLG)} ${X(e.paddingContentHorizontalLG)}`,headerBg:`transparent`,footerBg:`transparent`,emptyTextPadding:e.padding,metaMarginBottom:e.padding,avatarMarginRight:e.padding,titleMarginBottom:e.paddingSM,descriptionFontSize:e.fontSize}),{extraCssVarPrefixCls:({prefixCls:e})=>[`${e}-container`]}),xq=S.forwardRef((e,t)=>{let{pagination:n=!1,prefixCls:r,bordered:i=!1,split:a=!0,className:o,rootClassName:s,style:c,children:l,itemLayout:u,loadMore:d,grid:f,dataSource:p=[],size:m,header:h,footer:g,loading:_=!1,rowKey:v,renderItem:y,locale:b,...x}=e,C=ef(n)?n:{},[w,T]=S.useState(C.defaultCurrent||1),[E,D]=S.useState(C.defaultPageSize||10),{getPrefixCls:O,direction:k,className:A,style:j}=_a(`list`),{renderEmpty:M}=S.useContext(ma),N={current:1,total:0,position:`bottom`},P=e=>(t,r)=>{T(t),D(r),n&&n?.[e]?.(t,r)},F=P(`onChange`),I=P(`onShowSizeChange`),L=(e,t)=>{if(!y)return null;let n;return n=typeof v==`function`?v(e):v?e[v]:e.key,n||=`list-item-${t}`,S.createElement(S.Fragment,{key:n},y(e,t))},R=!!(d||n||g),z=O(`list`,r),[B,V]=bq(z),H=_;typeof H==`boolean`&&(H={spinning:H});let U=!!H?.spinning,ee=Oh(m),te=``;switch(ee){case`large`:te=`lg`;break;case`small`:te=`sm`;break;default:break}let ne=Y(z,{[`${z}-vertical`]:u===`vertical`,[`${z}-${te}`]:te,[`${z}-split`]:a,[`${z}-bordered`]:i,[`${z}-loading`]:U,[`${z}-grid`]:!!f,[`${z}-something-after-last-item`]:R,[`${z}-rtl`]:k===`rtl`},A,o,s,B,V),W=`${z}-container`,re=Xd(N,{total:p.length,current:w,pageSize:E},n||{}),G=Math.ceil(re.total/re.pageSize);re.current=Math.min(re.current,G);let K=n&&S.createElement(`div`,{className:Y(`${z}-pagination`)},S.createElement(KK,{align:`end`,...re,onChange:F,onShowSizeChange:I})),q=da(p);n&&p.length>(re.current-1)*re.pageSize&&(q=da(p).splice((re.current-1)*re.pageSize,re.pageSize));let ie=vw(Object.keys(f||{}).some(e=>fw.includes(e))),J=S.useMemo(()=>{for(let e=0;e{if(!f)return;let e=J&&f[J]?f[J]:f.column;if(e)return{width:`${100/e}%`,maxWidth:`${100/e}%`}},[JSON.stringify(f),J]),oe=U&&S.createElement(`div`,{style:{minHeight:53}});if(q.length>0){let e=q.map(L);oe=f?S.createElement(hV,{className:Y(W,V),gutter:f.gutter},S.Children.map(e,e=>S.createElement(`div`,{key:e?.key,style:ae},e))):S.createElement(`ul`,{className:Y(`${z}-items`,W,V)},e)}else !l&&!U&&(oe=S.createElement(`div`,{className:`${z}-empty-text`},b?.emptyText||M?.(`List`)||S.createElement(FC,{componentName:`List`})));let se=re.position,ce=S.useMemo(()=>({grid:f,itemLayout:u}),[JSON.stringify(f),u]);return S.createElement(mq.Provider,{value:ce},S.createElement(`div`,{ref:t,style:{...j,...c},className:ne,...x},(se===`top`||se===`both`)&&K,h&&S.createElement(`div`,{className:`${z}-header`},h),S.createElement(pq,{...H},oe,l),g&&S.createElement(`div`,{className:`${z}-footer`},g),d||(se===`bottom`||se===`both`)&&K))});xq.Item=gq;var Sq=(e,t={})=>!Zd(e)&&t?.skipEmpty?[]:Array.isArray(e)?e:[e],Cq=null,wq=e=>e(),Tq=[],Eq={};function Dq(){let{getContainer:e,duration:t,rtl:n,maxCount:r,top:i}=Eq,a=e?.()||document.body;return{getContainer:()=>a,duration:t,rtl:n,maxCount:r,top:i}}var Oq=S.forwardRef((e,t)=>{let{messageConfig:n,sync:r}=e,{getPrefixCls:i}=(0,S.useContext)(ma),a=Eq.prefixCls||i(`message`),o=(0,S.useContext)(bx),[s,c]=uh({...n,prefixCls:a,...o.message});return S.useImperativeHandle(t,()=>{let e={...s};return Object.keys(e).forEach(t=>{e[t]=(...e)=>(r(),s[t].apply(s,e))}),{instance:e,sync:r}}),c}),kq=S.forwardRef((e,t)=>{let[n,r]=S.useState(Dq),i=()=>{r(Dq)};S.useEffect(i,[]);let a=jm(),o=a.getRootPrefixCls(),s=a.getIconPrefixCls(),c=a.getTheme(),l=S.createElement(Oq,{ref:t,sync:i,messageConfig:n});return S.createElement(Nm,{prefixCls:o,iconPrefixCls:s,theme:c},a.holderRender?a.holderRender(l):l)}),Aq=()=>{if(!Cq){let e=document.createDocumentFragment(),t={fragment:e};Cq=t,wq(()=>{Li(S.createElement(kq,{ref:e=>{let{instance:n,sync:r}=e||{};Promise.resolve().then(()=>{!t.instance&&n&&(t.instance=n,t.sync=r,Aq())})}}),e)});return}Cq.instance&&(Tq.forEach(e=>{let{type:t,skipped:n}=e;if(!n)switch(t){case`open`:wq(()=>{let t=Cq.instance.open({...Eq,...e.config});t?.then(e.resolve),e.setCloseFn(t)});break;case`destroy`:wq(()=>{Cq?.instance.destroy(e.key)});break;default:wq(()=>{var n;let r=(n=Cq.instance)[t].apply(n,da(e.args));r?.then(e.resolve),e.setCloseFn(r)})}}),Tq=[])};function jq(e){Eq={...Eq,...e},wq(()=>{Cq?.sync?.()})}function Mq(e){let t=rh(t=>{let n,r={type:`open`,config:e,resolve:t,setCloseFn:e=>{n=e}};return Tq.push(r),()=>{n?wq(()=>{n()}):r.skipped=!0}});return Aq(),t}function Nq(e,t){let n=rh(n=>{let r,i={type:e,args:t,resolve:n,setCloseFn:e=>{r=e}};return Tq.push(i),()=>{r?wq(()=>{r()}):i.skipped=!0}});return Aq(),n}var Pq=e=>{Tq.push({type:`destroy`,key:e}),Aq()},Fq=[`success`,`info`,`warning`,`error`,`loading`],Z={open:Mq,destroy:Pq,config:jq,useMessage:dh,_InternalPanelDoNotUseOrYouWillBeFired:th};Fq.forEach(e=>{Z[e]=(...t)=>Nq(e,t)});var Iq=Ex(e=>{let{prefixCls:t,className:n,closeIcon:r,closable:i,type:a,title:o,children:s,footer:c,classNames:l,styles:u,...d}=e,{getPrefixCls:f}=S.useContext(ma),{className:p,style:m,classNames:h,styles:g}=_a(`modal`),_=f(),v=t||f(`modal`),y=ap(_),[b,x]=Tb(v,y),[C,w]=xf([h,l],[g,u],{props:e}),T=`${v}-confirm`,E={};return E=a?{closable:i??!1,title:``,footer:``,children:S.createElement(Ab,{...e,prefixCls:v,confirmPrefixCls:T,rootPrefixCls:_,content:s})}:{closable:i??!0,title:o,footer:c!==null&&S.createElement(sb,{...e}),children:s},S.createElement(R_,{prefixCls:v,className:Y(b,`${v}-pure-panel`,a&&T,a&&`${T}-${a}`,n,p,x,y,C.root),style:{...m,...w.root},...d,closeIcon:ob(v,r),closable:i,classNames:C,styles:w,...E})});function Lq(e){return Lb(Rb(e))}var Rq=Db;Rq.useModal=qb,Rq.info=function(e){return Lb(zb(e))},Rq.success=function(e){return Lb(Bb(e))},Rq.error=function(e){return Lb(Vb(e))},Rq.warning=Lq,Rq.warn=Lq,Rq.confirm=function(e){return Lb(Hb(e))},Rq.destroyAll=function(){for(;Nb.length;){let e=Nb.pop();e&&e()}},Rq.config=Ub,Rq._InternalPanelDoNotUseOrYouWillBeFired=Iq;var zq=Xl(`Popconfirm`,e=>{let{componentCls:t,iconCls:n,antCls:r,zIndexPopup:i,colorText:a,colorWarning:o,marginXXS:s,marginXS:c,fontSize:l,fontWeightStrong:u,colorTextHeading:d}=e;return{[t]:{zIndex:i,[`&${r}-popover`]:{fontSize:l},[`${t}-message`]:{marginBottom:c,display:`flex`,flexWrap:`nowrap`,alignItems:`start`,[`> ${t}-message-icon ${n}`]:{color:o,fontSize:l,lineHeight:1,marginInlineEnd:c},[`${t}-title`]:{fontWeight:u,color:d,"&:only-child":{fontWeight:`normal`}},[`${t}-description`]:{marginTop:s,color:a}},[`${t}-buttons`]:{textAlign:`end`,whiteSpace:`nowrap`,button:{marginInlineStart:c}}}}},e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1}),Bq=e=>{let{prefixCls:t,okButtonProps:n,cancelButtonProps:r,title:i,description:a,cancelText:o,okText:s,okType:c=`primary`,icon:l=S.createElement(Mu,null),showCancel:u=!0,close:d,onConfirm:f,onCancel:p,onPopupClick:m,classNames:h,styles:g}=e,{getPrefixCls:_}=S.useContext(ma),[v]=qd(`Popconfirm`,Bd.Popconfirm),y=ww(i),b=ww(a);return S.createElement(`div`,{className:`${t}-inner-content`,onClick:m},S.createElement(`div`,{className:`${t}-message`},l&&S.createElement(`span`,{className:`${t}-message-icon`},l),S.createElement(`div`,{className:`${t}-message-text`},y&&S.createElement(`div`,{className:Y(`${t}-title`,h?.title),style:g?.title},y),b&&S.createElement(`div`,{className:Y(`${t}-description`,h?.content),style:g?.content},b))),S.createElement(`div`,{className:`${t}-buttons`},u&&S.createElement(E_,{onClick:p,size:`small`,...r},o||v?.cancelText),S.createElement(D_,{buttonProps:{size:`small`,...zh(c),...n},actionFn:f,close:d,prefixCls:_(`btn`),quitOnNullishReturnValue:!0,emitEvent:!0},s||v?.okText)))},Vq=e=>{let{prefixCls:t,placement:n,className:r,style:i,...a}=e,{getPrefixCls:o}=S.useContext(ma),s=o(`popconfirm`,t);return zq(s),S.createElement(sT,{placement:n,className:Y(s,r),style:i,content:S.createElement(Bq,{prefixCls:s,...a})})},Hq=S.forwardRef((e,t)=>{let{prefixCls:n,placement:r=`top`,trigger:i,okType:a=`primary`,icon:o=S.createElement(Mu,null),children:s,overlayClassName:c,onOpenChange:l,overlayStyle:u,styles:d,arrow:f,classNames:p,...m}=e,{getPrefixCls:h,className:g,style:_,classNames:v,styles:y,arrow:b,trigger:x}=_a(`popconfirm`),[C,w]=Wn(e.defaultOpen??!1,e.open),T=Uw(f,b),E=i||x||`click`,D=e=>{w(e),l?.(e)},O=()=>{D(!1)},k=t=>e.onConfirm?.call(void 0,t),A=t=>{D(!1),e.onCancel?.call(void 0,t)},j=t=>{let{disabled:n=!1}=e;n||D(t)},M=h(`popconfirm`,n),N={...e,placement:r,trigger:E,okType:a,overlayStyle:u,styles:d,classNames:p},[P,F]=xf([v,p],[y,d],{props:N}),I=Y(M,g,c,P.root);return zq(M),S.createElement(cT,{arrow:T,...hi(m,[`title`]),trigger:E,placement:r,onOpenChange:j,open:C,ref:t,classNames:{root:I,container:P.container,arrow:P.arrow},styles:{root:{..._,...F.root,...u},container:F.container,arrow:F.arrow},content:S.createElement(Bq,{okType:a,icon:o,...e,prefixCls:M,close:O,onConfirm:k,onCancel:A,classNames:P,styles:F}),"data-popover-inject":!0},s)});Hq._InternalPanelDoNotUseOrYouWillBeFired=Vq;var Uq={percent:0,prefixCls:`rc-progress`,strokeColor:`#2db7f5`,strokeLinecap:`round`,strokeWidth:1,railColor:`#D9D9D9`,railWidth:1,gapPosition:`bottom`,loading:!1},Wq=()=>{let e=(0,S.useRef)([]),t=(0,S.useRef)(null);return(0,S.useEffect)(()=>{let n=Date.now(),r=!1;e.current.forEach(e=>{if(!e)return;r=!0;let i=e.style;i.transitionDuration=`.3s, .3s, .3s, .06s`,t.current&&n-t.current<100&&(i.transitionDuration=`0s, 0s`)}),r&&(t.current=Date.now())}),e.current},Gq=({bg:e,children:t})=>S.createElement(`div`,{style:{width:`100%`,height:`100%`,background:e}},t);function Kq(e,t){return Object.keys(e).map(n=>{let r=`${Math.floor(parseFloat(n)*t)}%`;return`${e[n]} ${r}`})}var qq=S.forwardRef((e,t)=>{let{prefixCls:n,color:r,gradientId:i,radius:a,className:o,style:s,ptg:c,strokeLinecap:l,strokeWidth:u,size:d,gapDegree:f}=e,p=r&&typeof r==`object`,m=p?`#FFF`:void 0,h=d/2,g=S.createElement(`circle`,{className:Y(`${n}-circle-path`,o),r:a,cx:h,cy:h,stroke:m,strokeLinecap:l,strokeWidth:u,opacity:c===0?0:1,style:s,ref:t});if(!p)return g;let _=`${i}-conic`,v=f?`${180+f/2}deg`:`0deg`,y=Kq(r,(360-f)/360),b=Kq(r,1),x=`conic-gradient(from ${v}, ${y.join(`, `)})`,C=`linear-gradient(to ${f?`bottom`:`top`}, ${b.join(`, `)})`;return S.createElement(S.Fragment,null,S.createElement(`mask`,{id:_},g),S.createElement(`foreignObject`,{x:0,y:0,width:d,height:d,mask:`url(#${_})`},S.createElement(Gq,{bg:C},S.createElement(Gq,{bg:x}))))}),Jq=(e,t,n,r,i,a,o,s,c,l,u=0)=>{let d=n/100*360*((360-a)/360),f=a===0?0:{bottom:0,top:180,left:90,right:-90}[o],p=(100-r)/100*t;return c===`round`&&r!==100&&(p+=l/2,p>=t&&(p=t-.01)),{stroke:typeof s==`string`?s:void 0,strokeDasharray:`${t}px ${e}`,strokeDashoffset:p+u,transform:`rotate(${i+d+f}deg)`,transformOrigin:`50px 50px`,transition:`stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s`,fillOpacity:0}},Yq=(({id:e,loading:t})=>{if(!t)return{indeterminateStyleProps:{},indeterminateStyleAnimation:null};let n=`${e}-indeterminate-animate`;return{indeterminateStyleProps:{transform:`rotate(0deg)`,animation:`${n} 1s linear infinite`},indeterminateStyleAnimation:S.createElement(`style`,null,`@keyframes ${n} { + `]:{display:`inline-block`,minWidth:r(`item-size-actual`),height:r(`item-size-actual`),color:e.colorText,fontFamily:e.fontFamily,lineHeight:r(`item-size-actual`),textAlign:`center`,verticalAlign:`middle`,listStyle:`none`,borderRadius:e.borderRadius,cursor:`pointer`,transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:`pointer`,userSelect:`none`},[`${t}-item-link`]:{display:`block`,width:`100%`,height:`100%`,padding:0,fontSize:e.fontSizeSM,textAlign:`center`,backgroundColor:`transparent`,border:`${X(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:`none`,transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:`transparent`}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:`inline-block`,marginInlineStart:e.margin,verticalAlign:`middle`,"&-size-changer":{width:`auto`},"&-quick-jumper":{display:`inline-block`,height:r(`item-size-actual`),marginInlineStart:e.marginXS,lineHeight:r(`item-size-actual`),verticalAlign:`baseline`,input:{...nR(e),...VL(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow}),"&[disabled]":{...BL(e)},width:e.quickJumperInputWidth,height:r(`item-size-actual`),boxSizing:`border-box`,margin:0,marginInlineStart:r(`item-spacing-actual`),marginInlineEnd:r(`item-spacing-actual`)}}}}},NK=e=>{let{componentCls:t,antCls:n}=e,[,r]=$l(n,`pagination`);return{[`${t}-item`]:{display:`inline-block`,minWidth:r(`item-size-actual`),height:r(`item-size-actual`),marginInlineEnd:r(`item-spacing-actual`),fontFamily:e.fontFamily,lineHeight:X(e.calc(r(`item-size-actual`)).sub(2).equal()),textAlign:`center`,verticalAlign:`middle`,listStyle:`none`,backgroundColor:e.itemBg,border:`${X(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:`pointer`,userSelect:`none`,a:{display:`block`,padding:`0 ${X(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:`none`}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.itemActiveColor},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.itemActiveColorHover}}}}},PK=e=>{let{componentCls:t,antCls:n}=e,[r,i]=$l(n,`pagination`);return{[t]:{[r(`item-size-actual`)]:X(e.itemSize),[r(`item-spacing-actual`)]:X(e.marginXS),"&-small":{[r(`item-size-actual`)]:X(e.itemSizeSM),[r(`item-spacing-actual`)]:X(e.marginXXS)},"&-large":{[r(`item-size-actual`)]:X(e.itemSizeLG),[r(`item-spacing-actual`)]:X(e.marginSM)},...Vl(e),display:`flex`,alignItems:`center`,"&-start":{justifyContent:`start`},"&-center":{justifyContent:`center`},"&-end":{justifyContent:`end`},"ul, ol":{margin:0,padding:0,listStyle:`none`},"&::after":{display:`block`,clear:`both`,height:0,overflow:`hidden`,visibility:`hidden`,content:`""`},[`${t}-total-text`]:{display:`inline-block`,height:i(`item-size-actual`),marginInlineEnd:i(`item-spacing-actual`),lineHeight:X(e.calc(i(`item-size-actual`)).sub(2).equal()),verticalAlign:`middle`},...NK(e),...MK(e),...jK(e),...kK(e),...AK(e),...OK(e),[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:`none`}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:`none`}}},[`&${e.componentCls}-rtl`]:{direction:`rtl`}}},FK=e=>{let{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:{...Gl(e)},[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0},...Wl(e)}},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:Wl(e)}}}},IK=e=>({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemSizeLG:e.controlHeightLG,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0,...zL(e)}),LK=e=>lc(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:`0.13em`},RL(e)),RK=Xl(`Pagination`,e=>{let t=LK(e);return[PK(t),FK(t)]},IK),zK=e=>{let{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},BK=Ql([`Pagination`,`bordered`],e=>zK(LK(e)),IK);function VK(e){return(0,S.useMemo)(()=>typeof e==`boolean`?[e,{}]:ef(e)?[!0,e]:[void 0,void 0],[e])}var HK=e=>{let{align:t,prefixCls:n,selectPrefixCls:r,className:i,rootClassName:a,style:o,size:s,locale:c,responsive:l,showSizeChanger:u,selectComponentClass:d,pageSizeOptions:f,styles:p,classNames:m,...h}=e,{xs:g}=_w(l),[,_]=zl(),{getPrefixCls:v,direction:y,showSizeChanger:b,className:x,style:C,classNames:w,styles:T,totalBoundaryShowSizeChanger:E}=_a(`pagination`),D=v(`pagination`,n),[O,k]=RK(D),A=Oh(s),j=A===`small`||!!(g&&!A&&l),M={...e,size:A},[N,P]=xf([w,m],[T,p],{props:M}),[F]=qd(`Pagination`,Dd),I={...F,...c},[L,R]=VK(u),[z,B]=VK(b),V=L??z,H=R??B,U=d||lw,ee=S.useMemo(()=>f?f.map(Number):void 0,[f]),te=e=>{let{disabled:t,size:n,onSizeChange:r,"aria-label":i,className:a,options:o}=e,{className:s,onChange:c}=H||{},l=o.find(e=>String(e.value)===String(n))?.value;return S.createElement(U,{disabled:t,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:e=>e.parentNode,"aria-label":i,options:o,...H,value:l,onChange:(e,t)=>{r?.(e),c?.(e,t)},size:A,className:Y(a,s)})},ne=S.useMemo(()=>{let e=S.createElement(`span`,{className:`${D}-item-ellipsis`},`•••`);return{prevIcon:S.createElement(`button`,{className:`${D}-item-link`,type:`button`,tabIndex:-1},y===`rtl`?S.createElement(Ug,null):S.createElement(pT,null)),nextIcon:S.createElement(`button`,{className:`${D}-item-link`,type:`button`,tabIndex:-1},y===`rtl`?S.createElement(pT,null):S.createElement(Ug,null)),jumpPrevIcon:S.createElement(`a`,{className:`${D}-item-link`},S.createElement(`div`,{className:`${D}-item-container`},y===`rtl`?S.createElement(_K,{className:`${D}-item-link-icon`}):S.createElement(mK,{className:`${D}-item-link-icon`}),e)),jumpNextIcon:S.createElement(`a`,{className:`${D}-item-link`},S.createElement(`div`,{className:`${D}-item-container`},y===`rtl`?S.createElement(mK,{className:`${D}-item-link-icon`}):S.createElement(_K,{className:`${D}-item-link-icon`}),e))}},[y,D]),W=v(`select`,r),re=Y({[`${D}-${t}`]:!!t,[`${D}-${A}`]:A,[`${D}-mini`]:j,[`${D}-rtl`]:y===`rtl`,[`${D}-bordered`]:_.wireframe},x,i,a,N.root,O,k),G={...P.root,...C,...o};return S.createElement(S.Fragment,null,_.wireframe&&S.createElement(BK,{prefixCls:D}),S.createElement(DK,{...ne,...h,styles:P,classNames:N,style:G,prefixCls:D,selectPrefixCls:W,className:re,locale:I,pageSizeOptions:ee,showSizeChanger:V,totalBoundaryShowSizeChanger:h.totalBoundaryShowSizeChanger??E,sizeChangerRender:te}))},UK=100,WK=UK/5,GK=UK/2-WK/2,KK=GK*2*Math.PI,qK=50,JK=e=>{let{dotClassName:t,style:n,hasCircleCls:r}=e;return S.createElement(`circle`,{className:Y(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:GK,cx:qK,cy:qK,strokeWidth:WK,style:n})},YK=({percent:e,prefixCls:t})=>{let n=`${t}-dot`,r=`${n}-holder`,i=`${r}-hidden`,[a,o]=S.useState(!1);Vn(()=>{e!==0&&o(!0)},[e!==0]);let s=Math.max(Math.min(e,100),0);if(!a)return null;let c={strokeDashoffset:`${KK/4}`,strokeDasharray:`${KK*s/100} ${KK*(100-s)/100}`};return S.createElement(`span`,{className:Y(r,`${n}-progress`,{[i]:s<=0})},S.createElement(`svg`,{viewBox:`0 0 ${UK} ${UK}`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":s},S.createElement(JK,{dotClassName:n,hasCircleCls:!0}),S.createElement(JK,{dotClassName:n,style:c})))};function XK(e){let{prefixCls:t,percent:n=0,className:r,style:i}=e,a=`${t}-dot`,o=`${a}-holder`,s=`${o}-hidden`;return S.createElement(S.Fragment,null,S.createElement(`span`,{className:Y(o,r,n>0&&s),style:i},S.createElement(`span`,{className:Y(a,`${t}-dot-spin`)},[1,2,3,4].map(e=>S.createElement(`i`,{className:`${t}-dot-item`,key:e})))),S.createElement(YK,{prefixCls:t,percent:n}))}function ZK(e){let{prefixCls:t,indicator:n,percent:r,className:i,style:a}=e,o=`${t}-dot`;return n&&S.isValidElement(n)?cm(n,e=>({className:Y(e.className,o,i),style:{...e.style,...a},percent:r})):S.createElement(XK,{prefixCls:t,percent:r,className:i,style:a})}var QK=new As(`antSpinMove`,{to:{opacity:1}}),$K=new As(`antRotate`,{to:{transform:`rotate(405deg)`}}),eq=e=>{let{componentCls:t}=e,n=`${t}-section`;return{[t]:{...Vl(e),position:`relative`,"&-rtl":{direction:`rtl`},[`&${n}, ${n}`]:{display:`flex`,alignItems:`center`,flexDirection:`column`,gap:e.paddingSM,color:e.colorPrimary},[`&${n}`]:{display:`inline-flex`},[n]:{position:`absolute`,top:`50%`,left:{_skip_check_:!0,value:`50%`},transform:`translate(-50%, -50%)`,zIndex:1},[`${t}-description`]:{fontSize:e.fontSize,lineHeight:1},[`${t}-container`]:{position:`relative`,transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:`100%`,height:`100%`,background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:`""`,pointerEvents:`none`}},"&-spinning":{[`${t}-description`]:{textShadow:`0 0px 5px ${e.colorBgContainer}`},[`${t}-container`]:{clear:`both`,opacity:.5,userSelect:`none`,pointerEvents:`none`,"&::after":{opacity:.4,pointerEvents:`auto`}}},"&-fullscreen":{position:`fixed`,inset:0,backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,opacity:0,pointerEvents:`none`,transition:`all ${e.motionDurationMid}`,[`&${t}-spinning`]:{opacity:1,pointerEvents:`auto`},[n]:{color:e.colorWhite,[`${t}-description`]:{color:e.colorTextLightSolid}}}}}},tq=e=>{let{componentCls:t,antCls:n,motionDurationSlow:r}=e,[i,a]=$l(n,`spin`);return{[t]:{[i(`dot-holder-size`)]:e.dotSize,[i(`dot-item-size`)]:`calc((${a(`dot-holder-size`)} - ${e.marginXXS} / 2) / 2)`,[`${t}-dot`]:{"&-holder":{width:`1em`,height:`1em`,fontSize:a(`dot-holder-size`),display:`inline-block`,transition:[`transform`,`opacity`].map(e=>`${e} ${r} ease`).join(`, `),transformOrigin:`50% 50%`,lineHeight:1,"&-hidden":{transform:`scale(0.3)`,opacity:0}},position:`relative`,display:`inline-block`,fontSize:a(`dot-holder-size`),width:`1em`,height:`1em`,"&-spin":{transform:`rotate(45deg)`,animationName:$K,animationDuration:`1.2s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`},"&-item":{position:`absolute`,display:`block`,width:a(`dot-item-size`),height:a(`dot-item-size`),background:`currentColor`,borderRadius:`100%`,transform:`scale(0.75)`,transformOrigin:`50% 50%`,opacity:.3,animationName:QK,animationDuration:`1s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`,animationDirection:`alternate`,"&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:`0s`},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:`0.4s`},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:`0.8s`},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:`1.2s`}},"&-progress":{position:`absolute`,left:`50%`,top:0,transform:`translateX(-50%)`},"&-circle":{strokeLinecap:`round`,transition:[`stroke-dashoffset`,`stroke-dasharray`,`stroke`,`stroke-width`,`opacity`].map(e=>`${e} ${r} ease`).join(`,`),fillOpacity:0,stroke:`currentcolor`},"&-circle-bg":{stroke:e.colorFillSecondary}}}}},nq=e=>{let{componentCls:t}=e,[n]=$l(e.antCls,`spin`);return{[t]:{"&-sm":{[n(`dot-holder-size`)]:e.dotSizeSM},"&-lg":{[n(`dot-holder-size`)]:e.dotSizeLG}}}},rq=Xl(`Spin`,e=>{let t=lc(e,{spinDotDefault:e.colorTextDescription});return[eq(t),tq(t),nq(t)]},e=>{let{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:n}}),iq=200,aq=[[30,.05],[70,.03],[96,.01]];function oq(e,t){let[n,r]=S.useState(0),i=S.useRef(null),a=t===`auto`;return S.useEffect(()=>(a&&e&&(r(0),i.current=setInterval(()=>{r(e=>{let t=100-e;for(let n=0;n{i.current&&=(clearInterval(i.current),null)}),[a,e]),a?n:t}var sq;function cq(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}var lq=e=>{let{prefixCls:t,spinning:n=!0,delay:r=0,className:i,rootClassName:a,size:o,tip:s,description:c,wrapperClassName:l,style:u,children:d,fullscreen:f=!1,indicator:p,percent:m,classNames:h,styles:g,..._}=e,{getPrefixCls:v,direction:y,indicator:b,className:x,style:C,classNames:w,styles:T}=_a(`spin`),E=v(`spin`,t),[D,O]=rq(E),[k,A]=S.useState(()=>n&&!cq(n,r)),j=oq(k,m);S.useEffect(()=>{if(n){let e=Az(r,()=>{A(!0)});return e(),()=>{e?.cancel?.()}}A(!1)},[r,n]);let M=Oh(e=>o??e),N=c??s,P={...e,size:M,spinning:k,tip:N,description:N,fullscreen:f,children:d,percent:j},[F,I]=xf([w,h],[T,g],{props:P}),L=p??b??sq,R=d!==void 0,z=R||f,B=S.createElement(S.Fragment,null,S.createElement(ZK,{className:Y(F.indicator),style:I.indicator,prefixCls:E,indicator:L,percent:j}),N&&S.createElement(`div`,{className:Y(`${E}-description`,F.tip,F.description),style:{...I.tip,...I.description}},N));return S.createElement(`div`,{className:Y(E,{[`${E}-sm`]:M===`small`,[`${E}-lg`]:M===`large`,[`${E}-spinning`]:k,[`${E}-rtl`]:y===`rtl`,[`${E}-fullscreen`]:f},a,F.root,f&&F.mask,z?l:[`${E}-section`,F.section],x,i,D,O),style:{...I.root,...z?{}:I.section,...f?I.mask:{},...C,...u},"aria-live":`polite`,"aria-busy":k,..._},k&&(z?S.createElement(`div`,{className:Y(`${E}-section`,F.section),style:I.section},B):B),R&&S.createElement(`div`,{className:Y(`${E}-container`,F.container),style:I.container},d))};lq.setDefaultIndicator=e=>{sq=e};var uq=S.createContext({});uq.Consumer;var dq=({prefixCls:e,className:t,avatar:n,title:r,description:i,...a})=>{let{getPrefixCls:o}=(0,S.useContext)(ma),s=o(`list`,e),c=Y(`${s}-item-meta`,t),l=S.createElement(`div`,{className:`${s}-item-meta-content`},r&&S.createElement(`h4`,{className:`${s}-item-meta-title`},r),i&&S.createElement(`div`,{className:`${s}-item-meta-description`},i));return S.createElement(`div`,{...a,className:c},n&&S.createElement(`div`,{className:`${s}-item-meta-avatar`},n),(r||i)&&l)},fq=S.forwardRef((e,t)=>{let{prefixCls:n,children:r,actions:i,extra:a,styles:o,className:s,classNames:c,colStyle:l,...u}=e,{grid:d,itemLayout:f}=(0,S.useContext)(uq),{getPrefixCls:p,list:m}=(0,S.useContext)(ma),h=e=>Y(m?.item?.classNames?.[e],c?.[e]),g=e=>({...m?.item?.styles?.[e],...o?.[e]}),_=()=>{let e=Di(r);return e.some(e=>typeof e==`string`)&&e.length>1},v=()=>f===`vertical`?!!a:!_(),y=p(`list`,n),b=i&&i.length>0&&S.createElement(`ul`,{className:Y(`${y}-item-action`,h(`actions`)),key:`actions`,style:g(`actions`)},i.map((e,t)=>S.createElement(`li`,{key:`${y}-item-action-${t}`},e,t!==i.length-1&&S.createElement(`em`,{className:`${y}-item-action-split`})))),x=d?`div`:`li`,C=S.createElement(x,{...u,...d?{}:{ref:t},className:Y(`${y}-item`,{[`${y}-item-no-flex`]:!v()},s)},f===`vertical`&&a?[S.createElement(`div`,{className:`${y}-item-main`,key:`content`},r,b),S.createElement(`div`,{className:Y(`${y}-item-extra`,h(`extra`)),key:`extra`,style:g(`extra`)},a)]:[r,b,cm(a,{key:`extra`})]);return d?S.createElement(cV,{ref:t,flex:1,style:l},C):C});fq.Meta=dq;var pq=e=>{let{listBorderedCls:t,componentCls:n,paddingLG:r,margin:i,itemPaddingSM:a,itemPaddingLG:o,marginLG:s,borderRadiusLG:c}=e,l=X(e.calc(c).sub(e.lineWidth).equal());return{[t]:{border:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:c,[`${n}-header`]:{borderRadius:`${l} ${l} 0 0`},[`${n}-footer`]:{borderRadius:`0 0 ${l} ${l}`},[`${n}-header,${n}-footer,${n}-item`]:{paddingInline:r},[`${n}-pagination`]:{margin:`${X(i)} ${X(s)}`}},[`${t}${n}-sm`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:a}},[`${t}${n}-lg`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:o}}}},mq=e=>{let{componentCls:t,screenSM:n,screenMD:r,marginLG:i,marginSM:a,margin:o}=e;return{[`@media screen and (max-width:${r}px)`]:{[t]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:i}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:i}}}},[`@media screen and (max-width: ${n}px)`]:{[t]:{[`${t}-item`]:{flexWrap:`wrap`,[`${t}-action`]:{marginInlineStart:a}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:`wrap-reverse`,[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${X(o)}`}}}}}},hq=e=>{let{componentCls:t,antCls:n,controlHeight:r,minHeight:i,paddingSM:a,marginLG:o,padding:s,itemPadding:c,colorPrimary:l,itemPaddingSM:u,itemPaddingLG:d,paddingXS:f,margin:p,colorText:m,colorTextDescription:h,motionDurationSlow:g,lineWidth:_,headerBg:v,footerBg:y,emptyTextPadding:b,metaMarginBottom:x,avatarMarginRight:S,titleMarginBottom:C,descriptionFontSize:w}=e;return{[t]:{...Vl(e),position:`relative`,"--rc-virtual-list-scrollbar-bg":e.colorSplit,"*":{outline:`none`},[`${t}-header`]:{background:v},[`${t}-footer`]:{background:y},[`${t}-header, ${t}-footer`]:{paddingBlock:a},[`${t}-pagination`]:{marginBlockStart:o,[`${n}-pagination-options`]:{textAlign:`start`}},[`${t}-spin`]:{minHeight:i,textAlign:`center`},[`${t}-items`]:{margin:0,padding:0,listStyle:`none`},[`${t}-item`]:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:c,color:m,[`${t}-item-meta`]:{display:`flex`,flex:1,alignItems:`flex-start`,maxWidth:`100%`,[`${t}-item-meta-avatar`]:{marginInlineEnd:S},[`${t}-item-meta-content`]:{flex:`1 0`,width:0,color:m},[`${t}-item-meta-title`]:{margin:`0 0 ${X(e.marginXXS)} 0`,color:m,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:m,transition:`all ${g}`,"&:hover":{color:l}}},[`${t}-item-meta-description`]:{color:h,fontSize:w,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:`0 0 auto`,marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:`none`,"& > li":{position:`relative`,display:`inline-block`,padding:`0 ${X(f)}`,color:h,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:`center`,"&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:`absolute`,insetBlockStart:`50%`,insetInlineEnd:0,width:_,height:e.calc(e.fontHeight).sub(e.calc(e.marginXXS).mul(2)).equal(),transform:`translateY(-50%)`,backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${X(s)} 0`,color:h,fontSize:e.fontSizeSM,textAlign:`center`},[`${t}-empty-text`]:{padding:b,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:`center`},[`${t}-item-no-flex`]:{display:`block`}},[`${t}-grid ${n}-col > ${t}-item`]:{display:`block`,maxWidth:`100%`,marginBlockEnd:p,paddingBlock:0,borderBlockEnd:`none`},[`${t}-vertical ${t}-item`]:{alignItems:`initial`,[`${t}-item-main`]:{display:`block`,flex:1},[`${t}-item-extra`]:{marginInlineStart:o},[`${t}-item-meta`]:{marginBlockEnd:x,[`${t}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:C,color:m,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:s,marginInlineStart:`auto`,"> li":{padding:`0 ${X(s)}`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:`none`}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:r},[`${t}-split${t}-something-after-last-item ${n}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:d},[`${t}-sm ${t}-item`]:{padding:u},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:`right`}}}}},gq=Xl(`List`,e=>{let t=lc(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG});return[hq(t),pq(t),mq(t)]},e=>({contentWidth:220,itemPadding:`${X(e.paddingContentVertical)} 0`,itemPaddingSM:`${X(e.paddingContentVerticalSM)} ${X(e.paddingContentHorizontal)}`,itemPaddingLG:`${X(e.paddingContentVerticalLG)} ${X(e.paddingContentHorizontalLG)}`,headerBg:`transparent`,footerBg:`transparent`,emptyTextPadding:e.padding,metaMarginBottom:e.padding,avatarMarginRight:e.padding,titleMarginBottom:e.paddingSM,descriptionFontSize:e.fontSize}),{extraCssVarPrefixCls:({prefixCls:e})=>[`${e}-container`]}),_q=S.forwardRef((e,t)=>{let{pagination:n=!1,prefixCls:r,bordered:i=!1,split:a=!0,className:o,rootClassName:s,style:c,children:l,itemLayout:u,loadMore:d,grid:f,dataSource:p=[],size:m,header:h,footer:g,loading:_=!1,rowKey:v,renderItem:y,locale:b,...x}=e,C=ef(n)?n:{},[w,T]=S.useState(C.defaultCurrent||1),[E,D]=S.useState(C.defaultPageSize||10),{getPrefixCls:O,direction:k,className:A,style:j}=_a(`list`),{renderEmpty:M}=S.useContext(ma),N={current:1,total:0,position:`bottom`},P=e=>(t,r)=>{T(t),D(r),n&&n?.[e]?.(t,r)},F=P(`onChange`),I=P(`onShowSizeChange`),L=(e,t)=>{if(!y)return null;let n;return n=typeof v==`function`?v(e):v?e[v]:e.key,n||=`list-item-${t}`,S.createElement(S.Fragment,{key:n},y(e,t))},R=!!(d||n||g),z=O(`list`,r),[B,V]=gq(z),H=_;typeof H==`boolean`&&(H={spinning:H});let U=!!H?.spinning,ee=Oh(m),te=``;switch(ee){case`large`:te=`lg`;break;case`small`:te=`sm`;break;default:break}let ne=Y(z,{[`${z}-vertical`]:u===`vertical`,[`${z}-${te}`]:te,[`${z}-split`]:a,[`${z}-bordered`]:i,[`${z}-loading`]:U,[`${z}-grid`]:!!f,[`${z}-something-after-last-item`]:R,[`${z}-rtl`]:k===`rtl`},A,o,s,B,V),W=`${z}-container`,re=Xd(N,{total:p.length,current:w,pageSize:E},n||{}),G=Math.ceil(re.total/re.pageSize);re.current=Math.min(re.current,G);let K=n&&S.createElement(`div`,{className:Y(`${z}-pagination`)},S.createElement(HK,{align:`end`,...re,onChange:F,onShowSizeChange:I})),q=da(p);n&&p.length>(re.current-1)*re.pageSize&&(q=da(p).splice((re.current-1)*re.pageSize,re.pageSize));let ie=_w(Object.keys(f||{}).some(e=>dw.includes(e))),J=S.useMemo(()=>{for(let e=0;e{if(!f)return;let e=J&&f[J]?f[J]:f.column;if(e)return{width:`${100/e}%`,maxWidth:`${100/e}%`}},[JSON.stringify(f),J]),oe=U&&S.createElement(`div`,{style:{minHeight:53}});if(q.length>0){let e=q.map(L);oe=f?S.createElement(dV,{className:Y(W,V),gutter:f.gutter},S.Children.map(e,e=>S.createElement(`div`,{key:e?.key,style:ae},e))):S.createElement(`ul`,{className:Y(`${z}-items`,W,V)},e)}else !l&&!U&&(oe=S.createElement(`div`,{className:`${z}-empty-text`},b?.emptyText||M?.(`List`)||S.createElement(PC,{componentName:`List`})));let se=re.position,ce=S.useMemo(()=>({grid:f,itemLayout:u}),[JSON.stringify(f),u]);return S.createElement(uq.Provider,{value:ce},S.createElement(`div`,{ref:t,style:{...j,...c},className:ne,...x},(se===`top`||se===`both`)&&K,h&&S.createElement(`div`,{className:`${z}-header`},h),S.createElement(lq,{...H},oe,l),g&&S.createElement(`div`,{className:`${z}-footer`},g),d||(se===`bottom`||se===`both`)&&K))});_q.Item=fq;var vq=(e,t={})=>!Zd(e)&&t?.skipEmpty?[]:Array.isArray(e)?e:[e],yq=null,bq=e=>e(),xq=[],Sq={};function Cq(){let{getContainer:e,duration:t,rtl:n,maxCount:r,top:i}=Sq,a=e?.()||document.body;return{getContainer:()=>a,duration:t,rtl:n,maxCount:r,top:i}}var wq=S.forwardRef((e,t)=>{let{messageConfig:n,sync:r}=e,{getPrefixCls:i}=(0,S.useContext)(ma),a=Sq.prefixCls||i(`message`),o=(0,S.useContext)(yx),[s,c]=uh({...n,prefixCls:a,...o.message});return S.useImperativeHandle(t,()=>{let e={...s};return Object.keys(e).forEach(t=>{e[t]=(...e)=>(r(),s[t].apply(s,e))}),{instance:e,sync:r}}),c}),Tq=S.forwardRef((e,t)=>{let[n,r]=S.useState(Cq),i=()=>{r(Cq)};S.useEffect(i,[]);let a=jm(),o=a.getRootPrefixCls(),s=a.getIconPrefixCls(),c=a.getTheme(),l=S.createElement(wq,{ref:t,sync:i,messageConfig:n});return S.createElement(Nm,{prefixCls:o,iconPrefixCls:s,theme:c},a.holderRender?a.holderRender(l):l)}),Eq=()=>{if(!yq){let e=document.createDocumentFragment(),t={fragment:e};yq=t,bq(()=>{Li(S.createElement(Tq,{ref:e=>{let{instance:n,sync:r}=e||{};Promise.resolve().then(()=>{!t.instance&&n&&(t.instance=n,t.sync=r,Eq())})}}),e)});return}yq.instance&&(xq.forEach(e=>{let{type:t,skipped:n}=e;if(!n)switch(t){case`open`:bq(()=>{let t=yq.instance.open({...Sq,...e.config});t?.then(e.resolve),e.setCloseFn(t)});break;case`destroy`:bq(()=>{yq?.instance.destroy(e.key)});break;default:bq(()=>{var n;let r=(n=yq.instance)[t].apply(n,da(e.args));r?.then(e.resolve),e.setCloseFn(r)})}}),xq=[])};function Dq(e){Sq={...Sq,...e},bq(()=>{yq?.sync?.()})}function Oq(e){let t=rh(t=>{let n,r={type:`open`,config:e,resolve:t,setCloseFn:e=>{n=e}};return xq.push(r),()=>{n?bq(()=>{n()}):r.skipped=!0}});return Eq(),t}function kq(e,t){let n=rh(n=>{let r,i={type:e,args:t,resolve:n,setCloseFn:e=>{r=e}};return xq.push(i),()=>{r?bq(()=>{r()}):i.skipped=!0}});return Eq(),n}var Aq=e=>{xq.push({type:`destroy`,key:e}),Eq()},jq=[`success`,`info`,`warning`,`error`,`loading`],Z={open:Oq,destroy:Aq,config:Dq,useMessage:dh,_InternalPanelDoNotUseOrYouWillBeFired:th};jq.forEach(e=>{Z[e]=(...t)=>kq(e,t)});var Mq=Tx(e=>{let{prefixCls:t,className:n,closeIcon:r,closable:i,type:a,title:o,children:s,footer:c,classNames:l,styles:u,...d}=e,{getPrefixCls:f}=S.useContext(ma),{className:p,style:m,classNames:h,styles:g}=_a(`modal`),_=f(),v=t||f(`modal`),y=ap(_),[b,x]=wb(v,y),[C,w]=xf([h,l],[g,u],{props:e}),T=`${v}-confirm`,E={};return E=a?{closable:i??!1,title:``,footer:``,children:S.createElement(kb,{...e,prefixCls:v,confirmPrefixCls:T,rootPrefixCls:_,content:s})}:{closable:i??!0,title:o,footer:c!==null&&S.createElement(ob,{...e}),children:s},S.createElement(R_,{prefixCls:v,className:Y(b,`${v}-pure-panel`,a&&T,a&&`${T}-${a}`,n,p,x,y,C.root),style:{...m,...w.root},...d,closeIcon:ab(v,r),closable:i,classNames:C,styles:w,...E})});function Nq(e){return Ib(Lb(e))}var Pq=Eb;Pq.useModal=Kb,Pq.info=function(e){return Ib(Rb(e))},Pq.success=function(e){return Ib(zb(e))},Pq.error=function(e){return Ib(Bb(e))},Pq.warning=Nq,Pq.warn=Nq,Pq.confirm=function(e){return Ib(Vb(e))},Pq.destroyAll=function(){for(;Mb.length;){let e=Mb.pop();e&&e()}},Pq.config=Hb,Pq._InternalPanelDoNotUseOrYouWillBeFired=Mq;var Fq=Xl(`Popconfirm`,e=>{let{componentCls:t,iconCls:n,antCls:r,zIndexPopup:i,colorText:a,colorWarning:o,marginXXS:s,marginXS:c,fontSize:l,fontWeightStrong:u,colorTextHeading:d}=e;return{[t]:{zIndex:i,[`&${r}-popover`]:{fontSize:l},[`${t}-message`]:{marginBottom:c,display:`flex`,flexWrap:`nowrap`,alignItems:`start`,[`> ${t}-message-icon ${n}`]:{color:o,fontSize:l,lineHeight:1,marginInlineEnd:c},[`${t}-title`]:{fontWeight:u,color:d,"&:only-child":{fontWeight:`normal`}},[`${t}-description`]:{marginTop:s,color:a}},[`${t}-buttons`]:{textAlign:`end`,whiteSpace:`nowrap`,button:{marginInlineStart:c}}}}},e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1}),Iq=e=>{let{prefixCls:t,okButtonProps:n,cancelButtonProps:r,title:i,description:a,cancelText:o,okText:s,okType:c=`primary`,icon:l=S.createElement(Mu,null),showCancel:u=!0,close:d,onConfirm:f,onCancel:p,onPopupClick:m,classNames:h,styles:g}=e,{getPrefixCls:_}=S.useContext(ma),[v]=qd(`Popconfirm`,Bd.Popconfirm),y=Cw(i),b=Cw(a);return S.createElement(`div`,{className:`${t}-inner-content`,onClick:m},S.createElement(`div`,{className:`${t}-message`},l&&S.createElement(`span`,{className:`${t}-message-icon`},l),S.createElement(`div`,{className:`${t}-message-text`},y&&S.createElement(`div`,{className:Y(`${t}-title`,h?.title),style:g?.title},y),b&&S.createElement(`div`,{className:Y(`${t}-description`,h?.content),style:g?.content},b))),S.createElement(`div`,{className:`${t}-buttons`},u&&S.createElement(E_,{onClick:p,size:`small`,...r},o||v?.cancelText),S.createElement(D_,{buttonProps:{size:`small`,...zh(c),...n},actionFn:f,close:d,prefixCls:_(`btn`),quitOnNullishReturnValue:!0,emitEvent:!0},s||v?.okText)))},Lq=e=>{let{prefixCls:t,placement:n,className:r,style:i,...a}=e,{getPrefixCls:o}=S.useContext(ma),s=o(`popconfirm`,t);return Fq(s),S.createElement(oT,{placement:n,className:Y(s,r),style:i,content:S.createElement(Iq,{prefixCls:s,...a})})},Rq=S.forwardRef((e,t)=>{let{prefixCls:n,placement:r=`top`,trigger:i,okType:a=`primary`,icon:o=S.createElement(Mu,null),children:s,overlayClassName:c,onOpenChange:l,overlayStyle:u,styles:d,arrow:f,classNames:p,...m}=e,{getPrefixCls:h,className:g,style:_,classNames:v,styles:y,arrow:b,trigger:x}=_a(`popconfirm`),[C,w]=Wn(e.defaultOpen??!1,e.open),T=Hw(f,b),E=i||x||`click`,D=e=>{w(e),l?.(e)},O=()=>{D(!1)},k=t=>e.onConfirm?.call(void 0,t),A=t=>{D(!1),e.onCancel?.call(void 0,t)},j=t=>{let{disabled:n=!1}=e;n||D(t)},M=h(`popconfirm`,n),N={...e,placement:r,trigger:E,okType:a,overlayStyle:u,styles:d,classNames:p},[P,F]=xf([v,p],[y,d],{props:N}),I=Y(M,g,c,P.root);return Fq(M),S.createElement(sT,{arrow:T,...hi(m,[`title`]),trigger:E,placement:r,onOpenChange:j,open:C,ref:t,classNames:{root:I,container:P.container,arrow:P.arrow},styles:{root:{..._,...F.root,...u},container:F.container,arrow:F.arrow},content:S.createElement(Iq,{okType:a,icon:o,...e,prefixCls:M,close:O,onConfirm:k,onCancel:A,classNames:P,styles:F}),"data-popover-inject":!0},s)});Rq._InternalPanelDoNotUseOrYouWillBeFired=Lq;var zq={percent:0,prefixCls:`rc-progress`,strokeColor:`#2db7f5`,strokeLinecap:`round`,strokeWidth:1,railColor:`#D9D9D9`,railWidth:1,gapPosition:`bottom`,loading:!1},Bq=()=>{let e=(0,S.useRef)([]),t=(0,S.useRef)(null);return(0,S.useEffect)(()=>{let n=Date.now(),r=!1;e.current.forEach(e=>{if(!e)return;r=!0;let i=e.style;i.transitionDuration=`.3s, .3s, .3s, .06s`,t.current&&n-t.current<100&&(i.transitionDuration=`0s, 0s`)}),r&&(t.current=Date.now())}),e.current},Vq=({bg:e,children:t})=>S.createElement(`div`,{style:{width:`100%`,height:`100%`,background:e}},t);function Hq(e,t){return Object.keys(e).map(n=>{let r=`${Math.floor(parseFloat(n)*t)}%`;return`${e[n]} ${r}`})}var Uq=S.forwardRef((e,t)=>{let{prefixCls:n,color:r,gradientId:i,radius:a,className:o,style:s,ptg:c,strokeLinecap:l,strokeWidth:u,size:d,gapDegree:f}=e,p=r&&typeof r==`object`,m=p?`#FFF`:void 0,h=d/2,g=S.createElement(`circle`,{className:Y(`${n}-circle-path`,o),r:a,cx:h,cy:h,stroke:m,strokeLinecap:l,strokeWidth:u,opacity:c===0?0:1,style:s,ref:t});if(!p)return g;let _=`${i}-conic`,v=f?`${180+f/2}deg`:`0deg`,y=Hq(r,(360-f)/360),b=Hq(r,1),x=`conic-gradient(from ${v}, ${y.join(`, `)})`,C=`linear-gradient(to ${f?`bottom`:`top`}, ${b.join(`, `)})`;return S.createElement(S.Fragment,null,S.createElement(`mask`,{id:_},g),S.createElement(`foreignObject`,{x:0,y:0,width:d,height:d,mask:`url(#${_})`},S.createElement(Vq,{bg:C},S.createElement(Vq,{bg:x}))))}),Wq=(e,t,n,r,i,a,o,s,c,l,u=0)=>{let d=n/100*360*((360-a)/360),f=a===0?0:{bottom:0,top:180,left:90,right:-90}[o],p=(100-r)/100*t;return c===`round`&&r!==100&&(p+=l/2,p>=t&&(p=t-.01)),{stroke:typeof s==`string`?s:void 0,strokeDasharray:`${t}px ${e}`,strokeDashoffset:p+u,transform:`rotate(${i+d+f}deg)`,transformOrigin:`50px 50px`,transition:`stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s`,fillOpacity:0}},Gq=(({id:e,loading:t})=>{if(!t)return{indeterminateStyleProps:{},indeterminateStyleAnimation:null};let n=`${e}-indeterminate-animate`;return{indeterminateStyleProps:{transform:`rotate(0deg)`,animation:`${n} 1s linear infinite`},indeterminateStyleAnimation:S.createElement(`style`,null,`@keyframes ${n} { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } - }`)}});function Xq(){return Xq=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:t,prefixCls:n,classNames:r={},styles:i={},steps:a,strokeWidth:o,railWidth:s,gapDegree:c=0,gapPosition:l,railColor:u,strokeLinecap:d,style:f,className:p,strokeColor:m,percent:h,loading:g,..._}={...Uq,...e},v=Yn(t),y=`${v}-gradient`,b=50-o/2,x=Math.PI*2*b,C=c>0?90+c/2:-90,w=x*((360-c)/360),{count:T,gap:E}=typeof a==`object`?a:{count:a,gap:2},D=Zq(h),O=Zq(m),k=O.find(e=>e&&typeof e==`object`),A=k&&typeof k==`object`?`butt`:d,{indeterminateStyleProps:j,indeterminateStyleAnimation:M}=Yq({id:v,loading:g}),N=Jq(x,w,0,100,C,c,l,u,A,o),P=Wq(),F=()=>{let e=0;return D.map((t,a)=>{let s=O[a]||O[O.length-1],u=Jq(x,w,e,t,C,c,l,s,A,o);return e+=t,S.createElement(qq,{key:a,color:s,ptg:t,radius:b,prefixCls:n,gradientId:y,className:r.track,style:{...u,...j,...i.track},strokeLinecap:A,strokeWidth:o,gapDegree:c,ref:e=>{P[a]=e},size:100})}).reverse()},I=()=>{let e=Math.round(T*(D[0]/100)),t=100/T,a=0;return Array(T).fill(null).map((s,d)=>{let f=d<=e-1?O[0]:u,p=f&&typeof f==`object`?`url(#${y})`:void 0,m=Jq(x,w,a,t,C,c,l,f,`butt`,o,E);return a+=(w-m.strokeDashoffset+E)*100/w,S.createElement(`circle`,{key:d,className:Y(`${n}-circle-path`,r.track),r:b,cx:50,cy:50,stroke:p,strokeWidth:o,opacity:1,style:{...m,...i.track},ref:e=>{P[d]=e}})})};return S.createElement(`svg`,Xq({className:Y(`${n}-circle`,r.root,p),viewBox:`0 0 100 100`,style:{...i.root,...f},id:t,role:`presentation`},_),!T&&S.createElement(`circle`,{className:Y(`${n}-circle-rail`,r.rail),r:b,cx:50,cy:50,stroke:u,strokeLinecap:A,strokeWidth:s||o,style:{...N,...i.rail}}),T?I():F(),M)};function $q(e){return!e||e<0?0:e>100?100:e}function eJ({success:e}){let t;return e&&`percent`in e&&(t=e.percent),t}var tJ=({percent:e,success:t})=>{let n=$q(eJ({success:t}));return[n,$q($q(e)-n)]},nJ=({success:e={},strokeColor:t})=>{let{strokeColor:n}=e;return[n||Wc.green,t||null]},rJ=(e,t,n)=>{let r=-1,i=-1;if(t===`step`){let t=n.steps,a=n.strokeWidth;typeof e==`string`||e===void 0?(r=e===`small`?2:14,i=a??8):Qd(e)?[r,i]=[e,e]:[r=14,i=8]=Array.isArray(e)?e:[e.width,e.height],r*=t}else if(t===`line`){let t=n?.strokeWidth;typeof e==`string`||e===void 0?i=t||(e===`small`?6:8):Qd(e)?[r,i]=[e,e]:[r=-1,i=8]=Array.isArray(e)?e:[e.width,e.height]}else (t===`circle`||t===`dashboard`)&&(typeof e==`string`||e===void 0?[r,i]=e===`small`?[60,60]:[120,120]:Qd(e)?[r,i]=[e,e]:Array.isArray(e)&&(r=e[0]??e[1]??120,i=e[0]??e[1]??120));return[r,i]},iJ=3,aJ=e=>iJ/e*100,oJ=[`root`,`body`,`indicator`],sJ=e=>{let{prefixCls:t,classNames:n,styles:r,railColor:i,trailColor:a,strokeLinecap:o=`round`,gapPosition:s,gapPlacement:c,gapDegree:l,width:u=120,type:d,children:f,success:p,size:m=u,steps:h}=e,{direction:g}=_a(`progress`),_=i??a,[v,y]=rJ(m,`circle`),{strokeWidth:b}=e;b===void 0&&(b=Math.max(aJ(v),6));let x={width:v,height:y,fontSize:v*.15+6},C=S.useMemo(()=>{if(l||l===0)return l;if(d===`dashboard`)return 75},[l,d]),w=tJ(e),T=S.useMemo(()=>{let e=(c??s)||d===`dashboard`&&`bottom`||void 0,t=g===`rtl`;switch(e){case`start`:return t?`right`:`left`;case`end`:return t?`left`:`right`;default:return e}},[g,c,s,d]),E=Object.prototype.toString.call(e.strokeColor)===`[object Object]`,D=nJ({success:p,strokeColor:e.strokeColor}),O=Y(`${t}-body`,{[`${t}-circle-gradient`]:E},n.body),k=S.createElement(Qq,{steps:h,percent:h?w[1]:w,strokeWidth:b,railWidth:b,strokeColor:h?D[1]:D,strokeLinecap:o,railColor:_,prefixCls:t,gapDegree:C,gapPosition:T,classNames:hi(n,oJ),styles:hi(r,oJ)}),A=v<=20,j=S.createElement(`div`,{className:O,style:{...x,...r.body}},k,!A&&f);return A?S.createElement(eT,{title:f},j):j},cJ=`--progress-line-stroke-color`,lJ=e=>{let t=e?`100%`:`-100%`;return new As(`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}})},uJ=e=>{let{componentCls:t,iconCls:n}=e;return{[t]:{...Vl(e),display:`inline-flex`,"&-rtl":{direction:`rtl`},[`${t}-indicator`]:{color:e.colorText,lineHeight:1,whiteSpace:`nowrap`,verticalAlign:`middle`,wordBreak:`normal`,[n]:{fontSize:e.fontSize}},[`&${t}-status-exception`]:{[`${t}-indicator`]:{color:e.colorError}},[`&${t}-status-success`]:{[`${t}-indicator`]:{color:e.colorSuccess}}}}},dJ=e=>{let{componentCls:t}=e;return{[`${t}-line`]:{position:`relative`,width:`100%`,fontSize:e.fontSize,[`${t}-body`]:{display:`inline-flex`,alignItems:`center`,width:`100%`,gap:e.marginXS},[`${t}-rail`]:{flex:`auto`,background:e.remainingColor,borderRadius:e.lineBorderRadius,position:`relative`,width:`100%`,overflow:`hidden`},[`&${t}-status-active`]:{[`${t}-track:after`]:{content:`""`,position:`absolute`,inset:0,backgroundColor:e.colorBgContainer,borderRadius:`inherit`,opacity:0,animationName:lJ(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:`infinite`}},[`${t}-track`]:{position:`absolute`,insetInlineStart:0,insetBlock:0,borderRadius:`inherit`,background:e.defaultColor,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,minWidth:`max-content`,display:`flex`,alignItems:`center`,"&-success":{background:e.colorSuccess}},[`&${t}-status-exception`]:{[`${t}-track`]:{background:e.colorError}},[`&${t}-status-success`]:{[`${t}-track`]:{background:e.colorSuccess}},[`${t}-indicator-outer`]:{[`&${t}-indicator-start`]:{order:-1}},[`${t}-body-layout-bottom`]:{flexDirection:`column`,alignItems:`center`,gap:e.marginXXS},[`${t}-indicator${t}-indicator-inner`]:{color:e.colorWhite,paddingInline:e.paddingXXS,width:`100%`,display:`flex`,justifyContent:`center`,[`&${t}-indicator-end`]:{justifyContent:`end`},[`&${t}-indicator-start`]:{justifyContent:`start`},[`&${t}-indicator-bright`]:{color:`rgba(0, 0, 0, 0.45)`}}}}},fJ=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-circle`]:{[`${t}-circle-rail`]:{stroke:e.remainingColor},[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-body`]:{position:`relative`,lineHeight:1,backgroundColor:`transparent`},[`${t}-indicator`]:{position:`absolute`,insetBlockStart:`50%`,insetInlineStart:0,width:`100%`,margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:`normal`,textAlign:`center`,transform:`translateY(-50%)`,[n]:{fontSize:e.circleIconFontSize}},[`&${t}-status-exception`]:{[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}}},[`&${t}-status-success`]:{[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:`bottom`}}}},pJ=e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:`inline-block`,"&-body":{display:`flex`,flexDirection:`row`,alignItems:`center`,gap:e.progressStepMarginInlineEnd,[`${t}-indicator`]:{marginInlineStart:e.marginXS}},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}},mJ=e=>{let{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-indicator ${n}`]:{fontSize:e.fontSizeSM}}}},hJ=Xl(`Progress`,e=>{let t=e.calc(e.marginXXS).div(2).equal(),n=lc(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:`2.4s`});return[uJ(n),dJ(n),fJ(n),pJ(n),mJ(n)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:`1em`,circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`})),gJ=e=>{let t=[];return Object.keys(e).forEach(n=>{let r=Number.parseFloat(n.replace(/%/g,``));Number.isNaN(r)||t.push({key:r,value:e[n]})}),t=t.sort((e,t)=>e.key-t.key),t.map(({key:e,value:t})=>`${t} ${e}%`).join(`, `)},_J=(e,t)=>{let{from:n=Wc.blue,to:r=Wc.blue,direction:i=t===`rtl`?`to left`:`to right`,...a}=e;if(Object.keys(a).length!==0){let e=`linear-gradient(${i}, ${gJ(a)})`;return{background:e,[cJ]:e}}let o=`linear-gradient(${i}, ${n}, ${r})`;return{background:o,[cJ]:o}},vJ=e=>{let{prefixCls:t,classNames:n,styles:r,direction:i,percent:a,size:o,strokeWidth:s,strokeColor:c,strokeLinecap:l=`round`,children:u,railColor:d,trailColor:f,percentPosition:p,success:m}=e,{align:h,type:g}=p,_=d??f,v=l===`square`||l===`butt`?0:void 0,[y,b]=rJ(o??[-1,s||(o===`small`?6:8)],`line`,{strokeWidth:s}),x={backgroundColor:_||void 0,borderRadius:v,height:b},C=`${t}-track`,w=c&&typeof c!=`string`?_J(c,i):{[cJ]:c,background:c},T={width:`${$q(a)}%`,height:b,borderRadius:v,...w},E=eJ(e),D={width:`${$q(E)}%`,height:b,borderRadius:v,backgroundColor:m?.strokeColor};return S.createElement(`div`,{className:Y(`${t}-body`,n.body,{[`${t}-body-layout-bottom`]:h===`center`&&g===`outer`}),style:{width:y>0?y:`100%`,...r.body}},S.createElement(`div`,{className:Y(`${t}-rail`,n.rail),style:{...x,...r.rail}},S.createElement(`div`,{className:Y(C,n.track),style:{...T,...r.track}},g===`inner`&&u),E!==void 0&&S.createElement(`div`,{className:Y(C,`${C}-success`,n.track),style:{...D,...r.track}})),g===`outer`&&u)},yJ=e=>{let{classNames:t,styles:n,size:r,steps:i,rounding:a=Math.round,percent:o=0,strokeWidth:s=8,strokeColor:c,railColor:l,trailColor:u,prefixCls:d,children:f}=e,p=a(o/100*i),[m,h]=rJ(r??[r===`small`?2:14,s],`step`,{steps:i,strokeWidth:s}),g=m/i,_=Array.from({length:i}),v=l??u;for(let e=0;e{let{prefixCls:n,className:r,rootClassName:i,classNames:a,styles:o,steps:s,strokeColor:c,percent:l=0,size:u=`medium`,showInfo:d=!0,type:f=`line`,status:p,format:m,style:h,percentPosition:g={},..._}=e,{align:v=`end`,type:y=`outer`}=g,b=Array.isArray(c)?c[0]:c,x=typeof c==`string`||Array.isArray(c)?c:void 0,C=S.useMemo(()=>b?new jc(typeof b==`string`?b:Object.values(b)[0]).isLight():!1,[c]),w=S.useMemo(()=>{let t=eJ(e);return Number.parseInt(t===void 0?(l??0)?.toString():(t??0)?.toString(),10)},[l,e.success]),T=S.useMemo(()=>!bJ.includes(p)&&w>=100?`success`:p||`normal`,[p,w]),{getPrefixCls:E,direction:D,className:O,style:k,classNames:A,styles:j}=_a(`progress`),M=E(`progress`,n),[N,P]=hJ(M),F={...e,percent:l,type:f,size:u,showInfo:d,percentPosition:g},[I,L]=xf([A,a],[j,o],{props:F}),R=f===`line`,z=R&&!s,B=S.useMemo(()=>{if(!d)return null;let t=eJ(e),n,r=m||(e=>`${e}%`),i=R&&C&&y===`inner`;return y===`inner`||m||T!==`exception`&&T!==`success`?n=r($q(l),$q(t)):T===`exception`?n=R?S.createElement(Eu,null):S.createElement(ku,null):T===`success`&&(n=R?S.createElement(Cu,null):S.createElement($C,null)),S.createElement(`span`,{className:Y(`${M}-indicator`,{[`${M}-indicator-bright`]:i,[`${M}-indicator-${v}`]:z,[`${M}-indicator-${y}`]:z},I.indicator),style:L.indicator,title:typeof n==`string`?n:void 0},n)},[d,l,w,T,f,M,m,R,C,y,v,z,I.indicator,L.indicator]),V={...e,classNames:I,styles:L},H;f===`line`?H=s?S.createElement(yJ,{...V,strokeColor:x,prefixCls:M,steps:ef(s)?s.count:s},B):S.createElement(vJ,{...V,strokeColor:b,prefixCls:M,direction:D,percentPosition:{align:v,type:y}},B):(f===`circle`||f===`dashboard`)&&(H=S.createElement(sJ,{...V,strokeColor:b,prefixCls:M,progressStatus:T},B));let U=Y(M,`${M}-status-${T}`,{[`${M}-${f===`dashboard`&&`circle`||f}`]:f!==`line`,[`${M}-inline-circle`]:f===`circle`&&rJ(u,`circle`)[0]<=20,[`${M}-line`]:z,[`${M}-line-align-${v}`]:z,[`${M}-line-position-${y}`]:z,[`${M}-steps`]:s,[`${M}-show-info`]:d,[`${M}-small`]:u===`small`,[`${M}-rtl`]:D===`rtl`},O,r,i,I.root,N,P);return S.createElement(`div`,{ref:t,style:{...k,...L.root,...h},className:U,role:`progressbar`,"aria-valuenow":w,"aria-valuemin":0,"aria-valuemax":100,...hi(_,[`railColor`,`trailColor`,`strokeWidth`,`width`,`gapDegree`,`gapPosition`,`gapPlacement`,`strokeLinecap`,`success`])},H)}),SJ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z`}}]},name:`reload`,theme:`outlined`}}))());function CJ(){return CJ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,CJ({},e,{ref:t,icon:SJ.default}))),TJ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z`}}]},name:`star`,theme:`filled`}}))());function EJ(){return EJ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,EJ({},e,{ref:t,icon:TJ.default}))),OJ=hV,kJ={},AJ=`rc-table-internal-hook`;function jJ(e){let t=S.createContext(void 0);return{Context:t,Provider:({value:e,children:n})=>{let r=S.useRef(e);r.current=e;let[i]=S.useState(()=>({getValue:()=>r.current,listeners:new Set}));return Vn(()=>{(0,zi.unstable_batchedUpdates)(()=>{i.listeners.forEach(t=>{t(e)})})},[e]),S.createElement(t.Provider,{value:i},n)},defaultValue:e}}function MJ(e,t){let n=Rn(typeof t==`function`?t:e=>{if(t===void 0)return e;if(!Array.isArray(t))return e[t];let n={};return t.forEach(t=>{n[t]=e[t]}),n}),r=S.useContext(e?.Context),{listeners:i,getValue:a}=r||{},o=S.useRef();o.current=n(r?a():e?.defaultValue);let[,s]=S.useState({});return Vn(()=>{if(!r)return;function e(e){let t=n(e);di(o.current,t,!0)||s({})}return i.add(e),()=>{i.delete(e)}},[r]),o.current}function NJ(){return NJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let s=i?{ref:o}:{},c=S.useRef(0),l=S.useRef(a);return t()===null?((!r||r(l.current,a))&&(c.current+=1),l.current=a,S.createElement(e.Provider,{value:c.current},S.createElement(n,NJ({},a,s)))):S.createElement(n,NJ({},a,s))};return i?S.forwardRef(a):a}function r(e,n){let r=lr(e),i=(n,i)=>{let a=r?{ref:i}:{};return t(),S.createElement(e,NJ({},n,a))};return S.memo(r?S.forwardRef(i):i,n)}return{makeImmutable:n,responseImmutable:r,useImmutableMark:t}}var{makeImmutable:ete,responseImmutable:tte,useImmutableMark:nte}=PJ(),{makeImmutable:FJ,responseImmutable:IJ,useImmutableMark:LJ}=PJ(),RJ=jJ(),zJ=S.createContext({renderWithProps:!1}),BJ=`RC_TABLE_KEY`;function VJ(e){return e==null?[]:Array.isArray(e)?e:[e]}function HJ(e){let t=[],n={};return e.forEach(e=>{let{key:r,dataIndex:i}=e||{},a=r||VJ(i).join(`-`)||BJ;for(;n[a];)a=`${a}_next`;n[a]=!0,t.push(a)}),t}function UJ(e){return e!=null}function WJ(e){return typeof e==`number`&&!Number.isNaN(e)}function GJ(e){return e&&typeof e==`object`&&!Array.isArray(e)&&!S.isValidElement(e)}function KJ(e,t,n,r,i,a){let o=S.useContext(zJ);return Xn(()=>{if(UJ(r))return[r];let a=Oi(e,t==null||t===``?[]:Array.isArray(t)?t:[t]),s=a,c;if(i){let t=i(a,e,n);GJ(t)?(s=t.children,c=t.props,o.renderWithProps=!0):s=t}return[s,c]},[LJ(),e,r,t,i,n],(e,t)=>{if(a){let[,n]=e,[,r]=t;return a(r,n)}return o.renderWithProps?!0:!di(e,t,!0)})}function qJ(e,t,n,r){let i=e+t-1;return e<=r&&i>=n}function JJ(e,t){return MJ(RJ,n=>[qJ(e,t||1,n.hoverStartRow,n.hoverEndRow),n.onHover])}function YJ(){return YJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let r,i=e===!0?{showTitle:!0}:e;return i&&(i.showTitle||t===`header`)&&(typeof n==`string`||typeof n==`number`?r=n.toString():S.isValidElement(n)&&typeof n.props?.children==`string`&&(r=n.props?.children)),r},ZJ=S.memo(e=>{let{component:t,children:n,ellipsis:r,scope:i,prefixCls:a,className:o,style:s,align:c,record:l,render:u,dataIndex:d,renderIndex:f,shouldCellUpdate:p,index:m,rowType:h,colSpan:g,rowSpan:_,fixStart:v,fixEnd:y,fixedStartShadow:b,fixedEndShadow:x,offsetFixedStartShadow:C,offsetFixedEndShadow:w,zIndex:T,zIndexReverse:E,appendNode:D,additionalProps:O={},isSticky:k}=e,A=`${a}-cell`,{allColumnsFixedLeft:j,rowHoverable:M}=MJ(RJ,[`allColumnsFixedLeft`,`rowHoverable`]),[N,P]=KJ(l,d,f,n,u,p),F={},I=typeof v==`number`&&!j,L=typeof y==`number`&&!j,[R,z]=MJ(RJ,({scrollInfo:e})=>{if(!I&&!L)return[!1,!1];let[t,n]=e;return[(I&&b&&t)-C>=1,(L&&x&&n-t)-w>1]});I&&(F.insetInlineStart=v,F[`--z-offset`]=T,F[`--z-offset-reverse`]=E),L&&(F.insetInlineEnd=y,F[`--z-offset`]=T,F[`--z-offset-reverse`]=E);let B=P?.colSpan??O.colSpan??g??1,V=P?.rowSpan??O.rowSpan??_??1,[H,U]=JJ(m,V),ee=Rn(e=>{l&&U(m,m+V-1),O?.onMouseEnter?.(e)}),te=Rn(e=>{l&&U(-1,-1),O?.onMouseLeave?.(e)});if(B===0||V===0)return null;let ne=O.title??XJ({rowType:h,ellipsis:r,children:N}),W=Y(A,o,{[`${A}-fix`]:I||L,[`${A}-fix-start`]:I,[`${A}-fix-end`]:L,[`${A}-fix-start-shadow`]:b,[`${A}-fix-start-shadow-show`]:b&&R,[`${A}-fix-end-shadow`]:x,[`${A}-fix-end-shadow-show`]:x&&z,[`${A}-ellipsis`]:r,[`${A}-with-append`]:D,[`${A}-fix-sticky`]:(I||L)&&k,[`${A}-row-hover`]:!P&&H},O.className,P?.className),re={};c&&(re.textAlign=c);let G={...P?.style,...F,...re,...O.style,...s},K=N;return typeof K==`object`&&!Array.isArray(K)&&!S.isValidElement(K)&&(K=null),r&&(b||x)&&(K=S.createElement(`span`,{className:`${A}-content`},K)),S.createElement(t,YJ({},P,O,{className:W,style:G,title:ne,scope:i,onMouseEnter:M?ee:void 0,onMouseLeave:M?te:void 0,colSpan:B===1?null:B,rowSpan:V===1?null:V}),D,K)});function QJ(e){return e.fixed===`start`}function $J(e){return e.fixed===`end`}function eY(e,t,n,r){let i=n[e]||{},a=n[t]||{},o=null,s=null;QJ(i)&&QJ(a)?o=r.start[e]:$J(a)&&$J(i)&&(s=r.end[t]);let c=!1,l=!1,u=0,d=0;o!==null&&(c=!n[t+1]||!QJ(n[t+1]),u=n.length*2-e,d=n.length+e),s!==null&&(l=!n[e-1]||!$J(n[e-1]),u=t,d=n.length-t);let f=0,p=0;if(c)for(let t=0;tt;--e)$J(n[e])||(p+=r.widths[e]||0);return{fixStart:o,fixEnd:s,fixedStartShadow:c,fixedEndShadow:l,offsetFixedStartShadow:f,offsetFixedEndShadow:p,isSticky:r.isSticky,zIndex:u,zIndexReverse:d}}var tY=S.createContext({});function nY(){return nY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:t,index:n,children:r,colSpan:i=1,rowSpan:a,align:o}=e,{prefixCls:s}=MJ(RJ,[`prefixCls`]),{scrollColumnIndex:c,stickyOffsets:l,flattenColumns:u}=S.useContext(tY),d=n+i-1+1===c?i+1:i,f=S.useMemo(()=>eY(n,n+d-1,u,l),[n,d,u,l]);return S.createElement(ZJ,nY({className:t,index:n,component:`td`,prefixCls:s,record:null,dataIndex:null,align:o,colSpan:d,rowSpan:a,render:()=>r},f))},iY=e=>{let{children:t,...n}=e;return S.createElement(`tr`,n,t)},aY=e=>{let{children:t}=e;return t};aY.Row=iY,aY.Cell=rY;var oY=IJ(e=>{let{children:t,stickyOffsets:n,flattenColumns:r}=e,i=MJ(RJ,`prefixCls`),a=r.length-1,o=r[a],s=S.useMemo(()=>({stickyOffsets:n,flattenColumns:r,scrollColumnIndex:o?.scrollbar?a:null}),[o,r,a,n]);return S.createElement(tY.Provider,{value:s},S.createElement(`tfoot`,{className:`${i}-summary`},t))}),sY=aY;function cY(e){return null}function lY(e){return null}function uY(e,t,n,r,i,a,o){let s=a(t,o);e.push({record:t,indent:n,index:o,rowKey:s});let c=i?.has(s);if(t&&Array.isArray(t[r])&&c)for(let o=0;o{if(n?.size){let i=[];for(let a=0;a({record:e,indent:0,index:t,rowKey:r(e,t)}))},[e,t,n,r])}function fY(e,t,n,r){let i=MJ(RJ,[`prefixCls`,`fixedInfoList`,`flattenColumns`,`expandableType`,`expandRowByClick`,`onTriggerExpand`,`rowClassName`,`expandedRowClassName`,`indentSize`,`expandIcon`,`expandedRowRender`,`expandIconColumnIndex`,`expandedKeys`,`childrenColumnName`,`rowExpandable`,`onRow`]),{flattenColumns:a,expandableType:o,expandedKeys:s,childrenColumnName:c,onTriggerExpand:l,rowExpandable:u,onRow:d,expandRowByClick:f,rowClassName:p}=i,m=o===`nest`,h=o===`row`&&(!u||u(e)),g=h||m,_=s&&s.has(t),v=c&&e&&e[c],y=Rn(l),b=d?.(e,n),x=b?.onClick,S=(t,...n)=>{f&&g&&l(e,t),x?.(t,...n)},C;typeof p==`string`?C=p:typeof p==`function`&&(C=p(e,n,r));let w=HJ(a);return{...i,columnsKey:w,nestExpandable:m,expanded:_,hasNestChildren:v,record:e,onTriggerExpand:y,rowSupportExpand:h,expandable:g,rowProps:{...b,className:Y(C,b?.className),onClick:S}}}var pY=e=>{let{prefixCls:t,children:n,component:r,cellComponent:i,className:a,expanded:o,colSpan:s,isEmpty:c,stickyOffset:l=0}=e,{scrollbarSize:u,fixHeader:d,fixColumn:f,componentWidth:p,horizonScroll:m}=MJ(RJ,[`scrollbarSize`,`fixHeader`,`fixColumn`,`componentWidth`,`horizonScroll`]),h=n;return(c?m&&p:f)&&(h=S.createElement(`div`,{style:{width:p-l-(d&&!c?u:0),position:`sticky`,left:l,overflow:`hidden`},className:`${t}-expanded-row-fixed`},h)),S.createElement(r,{className:a,style:{display:o?null:`none`}},S.createElement(ZJ,{component:i,prefixCls:t,colSpan:s},h))};function mY({prefixCls:e,record:t,onExpand:n,expanded:r,expandable:i}){let a=`${e}-row-expand-icon`;if(!i)return S.createElement(`span`,{className:Y(a,`${e}-row-spaced`)});let o=e=>{n(t,e),e.stopPropagation()};return S.createElement(`span`,{className:Y(a,{[`${e}-row-expanded`]:r,[`${e}-row-collapsed`]:!r}),onClick:o})}function hY(e,t,n){let r=[];function i(e){(e||[]).forEach((e,a)=>{r.push(t(e,a)),i(e[n])})}return i(e),r}function gY(e,t,n,r){return typeof e==`string`?e:typeof e==`function`?e(t,n,r):``}function _Y(){return _Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:t,style:n,classNames:r,styles:i,record:a,index:o,renderIndex:s,rowKey:c,rowKeys:l,indent:u=0,rowComponent:d,cellComponent:f,scopeCellComponent:p,expandedRowInfo:m}=e,h=fY(a,c,o,u),{prefixCls:g,flattenColumns:_,expandedRowClassName:v,expandedRowRender:y,rowProps:b,expanded:x,rowSupportExpand:C}=h,w=S.useRef(!1);w.current||=x;let T=gY(v,a,o,u),E=S.createElement(d,_Y({},b,{"data-row-key":c,className:Y(t,`${g}-row`,`${g}-row-level-${u}`,b?.className,r.row,{[T]:u>=1}),style:{...n,...b?.style,...i.row}}),_.map((e,t)=>{let{render:n,dataIndex:c,className:d}=e,{key:_,fixedInfo:v,appendCellNode:y,additionalCellProps:b}=vY(h,e,t,u,o,l,m?.offset);return S.createElement(ZJ,_Y({className:Y(d,r.cell),style:i.cell,ellipsis:e.ellipsis,align:e.align,scope:e.rowScope,component:e.rowScope?p:f,prefixCls:g,key:_,record:a,index:o,renderIndex:s,dataIndex:c,render:n,shouldCellUpdate:e.shouldCellUpdate},v,{appendNode:y,additionalProps:b}))})),D;if(C&&(w.current||x)){let e=y(a,o,u+1,x);D=S.createElement(pY,{expanded:x,className:Y(`${g}-expanded-row`,`${g}-expanded-row-level-${u+1}`,T),prefixCls:g,component:d,cellComponent:f,colSpan:m?m.colSpan:_.length,isEmpty:!1,stickyOffset:m?.sticky},e)}return S.createElement(S.Fragment,null,E,D)}),bY=e=>{let{columnKey:t,onColumnResize:n,title:r}=e,i=S.useRef(null);return Vn(()=>{i.current&&n(t,i.current.offsetWidth)},[]),S.createElement(ia,{data:t},S.createElement(`td`,{ref:i,style:{paddingTop:0,paddingBottom:0,borderTop:0,borderBottom:0,height:0}},S.createElement(`div`,{style:{height:0,overflow:`hidden`,fontWeight:`bold`}},r||`\xA0`)))},xY=({prefixCls:e,columnsKey:t,onColumnResize:n,columns:r})=>{let i=S.useRef(null),{measureRowRender:a}=MJ(RJ,[`measureRowRender`]),o=S.createElement(`tr`,{"aria-hidden":`true`,className:`${e}-measure-row`,style:{height:0},ref:i},S.createElement(ia.Collection,{onBatchResize:e=>{kr(i.current)&&e.forEach(({data:e,size:t})=>{n(e,t.offsetWidth)})}},t.map(e=>{let t=r.find(t=>t.key===e)?.title,i=S.isValidElement(t)?S.cloneElement(t,{ref:null}):t;return S.createElement(bY,{key:e,columnKey:e,onColumnResize:n,title:i})})));return typeof a==`function`?a(o):o},SY=IJ(e=>{let{data:t,measureColumnWidth:n}=e,{prefixCls:r,getComponent:i,onColumnResize:a,flattenColumns:o,getRowKey:s,expandedKeys:c,childrenColumnName:l,emptyNode:u,classNames:d,styles:f,expandedRowOffset:p=0,colWidths:m}=MJ(RJ,[`prefixCls`,`getComponent`,`onColumnResize`,`flattenColumns`,`getRowKey`,`expandedKeys`,`childrenColumnName`,`emptyNode`,`classNames`,`styles`,`expandedRowOffset`,`fixedInfoList`,`colWidths`]),{body:h={}}=d||{},{body:g={}}=f||{},_=dY(t,l,c,s),v=S.useMemo(()=>_.map(e=>e.rowKey),[_]),y=S.useRef({renderWithProps:!1}),b=S.useMemo(()=>{let e=o.length-p,t=0;for(let e=0;e{let{record:n,indent:r,index:i,rowKey:a}=e;return S.createElement(yY,{classNames:h,styles:g,key:a,rowKey:a,rowKeys:v,record:n,index:t,renderIndex:i,rowComponent:C,cellComponent:w,scopeCellComponent:T,indent:r,expandedRowInfo:b})}):S.createElement(pY,{expanded:!0,className:`${r}-placeholder`,prefixCls:r,component:C,cellComponent:w,colSpan:o.length,isEmpty:!0},u);let D=HJ(o);return S.createElement(zJ.Provider,{value:y.current},S.createElement(x,{style:g.wrapper,className:Y(`${r}-tbody`,h.wrapper)},n&&S.createElement(xY,{prefixCls:r,columnsKey:D,onColumnResize:a,columns:o}),E))}),CY=`RC_TABLE_INTERNAL_COL_DEFINE`;function wY(e){let{expandable:t,...n}=e,r;return r=`expandable`in e?{...n,...t}:n,r.showExpandColumn===!1&&(r.expandIconColumnIndex=-1),r}function TY(){return TY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{colWidths:t,columns:n,columCount:r}=e,{tableLayout:i}=MJ(RJ,[`tableLayout`]),a=[],o=r||n.length,s=!1;for(let e=o-1;e>=0;--e){let r=t[e],o=n&&n[e],c,l;if(o&&(c=o[CY],i===`auto`&&(l=o.minWidth)),r||l||c||s){let{columnType:t,...n}=c||{};a.unshift(S.createElement(`col`,TY({key:e,style:{width:r,minWidth:l}},n))),s=!0}}return a.length>0?S.createElement(`colgroup`,null,a):null};function DY(e,t){return(0,S.useMemo)(()=>{let n=[];for(let r=0;r{let{className:n,style:r,noData:i,columns:a,flattenColumns:o,colWidths:s,colGroup:c,columCount:l,stickyOffsets:u,direction:d,fixHeader:f,stickyTopOffset:p,stickyBottomOffset:m,stickyClassName:h,scrollX:g,tableLayout:_=`fixed`,onScroll:v,maxContentScroll:y,children:b,...x}=e,{prefixCls:C,scrollbarSize:w,isSticky:T,getComponent:E}=MJ(RJ,[`prefixCls`,`scrollbarSize`,`isSticky`,`getComponent`]),D=E([`header`,`table`],`table`),O=T&&!f?0:w,k=S.useRef(null),A=S.useCallback(e=>{or(t,e),or(k,e)},[]);S.useEffect(()=>{function e(e){let{currentTarget:t,deltaX:n}=e;if(n){let{scrollLeft:r,scrollWidth:i,clientWidth:a}=t,o=i-a,s=r+n;d===`rtl`?(s=Math.max(-o,s),s=Math.min(0,s)):(s=Math.min(o,s),s=Math.max(0,s)),v({currentTarget:t,scrollLeft:s}),e.preventDefault()}}let t=k.current;return t?.addEventListener(`wheel`,e,{passive:!1}),()=>{t?.removeEventListener(`wheel`,e)}},[]);let j=o[o.length-1],M={fixed:j?j.fixed:null,scrollbar:!0,onHeaderCell:()=>({className:`${C}-cell-scrollbar`})},N=(0,S.useMemo)(()=>O?[...a,M]:a,[O,a]),P=(0,S.useMemo)(()=>O?[...o,M]:o,[O,o]),F=(0,S.useMemo)(()=>{let{start:e,end:t}=u;return{...u,start:e,end:[...t.map(e=>e+O),0],isSticky:T}},[O,u,T]),I=DY(s,l),L=(0,S.useMemo)(()=>{let e=!I||!I.length||I.every(e=>!e);return i||e},[i,I]);return S.createElement(`div`,{style:{overflow:`hidden`,...T?{top:p,bottom:m}:{},...r},ref:A,className:Y(n,{[h]:!!h})},S.createElement(D,{style:{tableLayout:_,minWidth:`100%`,width:g}},L?c:S.createElement(EY,{colWidths:[...I,O],columCount:l+1,columns:P}),b({...x,stickyOffsets:F,columns:N,flattenColumns:P})))}),kY=S.memo(OY);function AY(){return AY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{cells:t,stickyOffsets:n,flattenColumns:r,rowComponent:i,cellComponent:a,onHeaderRow:o,index:s,classNames:c,styles:l}=e,{prefixCls:u}=MJ(RJ,[`prefixCls`]),d;o&&(d=o(t.map(e=>e.column),s));let f=HJ(t.map(e=>e.column));return S.createElement(i,AY({},d,{className:c.row,style:l.row}),t.map((e,t)=>{let{column:i,colStart:o,colEnd:s,colSpan:c}=e,l=eY(o,s,r,n),d=i?.onHeaderCell?.(i)||{};return S.createElement(ZJ,AY({},e,{scope:i.title?c>1?`colgroup`:`col`:null,ellipsis:i.ellipsis,align:i.align,component:a,prefixCls:u,key:f[t]},l,{additionalProps:d,rowType:`header`}))}))};function MY(e,t,n){let r=[];function i(e,a,o=0){r[o]=r[o]||[];let s=a;return e.filter(Boolean).map(e=>{let a={key:e.key,className:Y(e.className,t.cell)||``,style:n.cell,children:e.title,column:e,colStart:s},c=1,l=e.children;return l&&l.length>0&&(c=i(l,s,o+1).reduce((e,t)=>e+t,0),a.hasSubColumns=!0),`colSpan`in e&&({colSpan:c}=e),`rowSpan`in e&&(a.rowSpan=e.rowSpan),a.colSpan=c,a.colEnd=a.colStart+c-1,r[o].push(a),s+=c,c})}i(e,0);let a=r.length;for(let e=0;e{!(`rowSpan`in t)&&!t.hasSubColumns&&(t.rowSpan=a-e)});return r}var NY=IJ(e=>{let{stickyOffsets:t,columns:n,flattenColumns:r,onHeaderRow:i}=e,{prefixCls:a,getComponent:o,classNames:s,styles:c}=MJ(RJ,[`prefixCls`,`getComponent`,`classNames`,`styles`]),{header:l={}}=s||{},{header:u={}}=c||{},d=S.useMemo(()=>MY(n,l,u),[n,l,u]),f=o([`header`,`wrapper`],`thead`),p=o([`header`,`row`],`tr`),m=o([`header`,`cell`],`th`);return S.createElement(f,{className:Y(`${a}-thead`,l.wrapper),style:u.wrapper},d.map((e,n)=>S.createElement(jY,{classNames:l,styles:u,key:n,flattenColumns:r,cells:e,stickyOffsets:t,rowComponent:p,cellComponent:m,onHeaderRow:i,index:n})))});function PY(e,t=``){return typeof t==`number`?t:t.endsWith(`%`)?e*parseFloat(t)/100:null}function FY(e,t,n){return S.useMemo(()=>{if(t&&t>0){let r=0,i=0;e.forEach(e=>{let n=PY(t,e.width);n?r+=n:i+=1});let a=Math.max(t,n),o=Math.max(a-r,i),s=i,c=o/i,l=0,u=e.map(e=>{let n={...e},r=PY(t,n.width);if(r)n.width=r;else{let e=Math.floor(c);n.width=s===1?o:e,o-=e,--s}return l+=n.width,n});if(l{let r=Math.floor(t.width*e);t.width=n===u.length-1?o:r,o-=r})}return[u,Math.max(l,a)]}return[e,t]},[e,t,n])}function IY(e){return Di(e).filter(e=>S.isValidElement(e)).map(e=>{let{key:t,props:n}=e,{children:r,...i}=n,a={key:t,...i};return r&&(a.children=IY(r)),a})}function LY(e){return e.filter(e=>e&&typeof e==`object`&&!e.hidden).map(e=>{let t=e.children;return t&&t.length>0?{...e,children:LY(t)}:e})}function RY(e,t=`key`){return e.filter(e=>e&&typeof e==`object`).reduce((e,n,r)=>{let{fixed:i}=n,a=i===!0||i===`left`?`start`:i===`right`?`end`:i,o=`${t}-${r}`,s=n.children;return s&&s.length>0?[...e,...RY(s,o).map(e=>({...e,fixed:e.fixed??a}))]:[...e,{key:o,...n,fixed:a}]},[])}function zY({prefixCls:e,columns:t,children:n,expandable:r,expandedKeys:i,columnTitle:a,getRowKey:o,onTriggerExpand:s,expandIcon:c,rowExpandable:l,expandIconColumnIndex:u,expandedRowOffset:d=0,direction:f,expandRowByClick:p,columnWidth:m,fixed:h,scrollWidth:g,clientWidth:_},v){let y=S.useMemo(()=>LY((t||IY(n)||[]).slice()),[t,n]),b=S.useMemo(()=>{if(r){let t=y.slice();if(!t.includes(kJ)){let e=u||0,n=e===0&&(h===`right`||h===`end`)?y.length:e;n>=0&&t.splice(n,0,kJ)}let n=t.indexOf(kJ);t=t.filter((e,t)=>e!==kJ||t===n);let r=y[n],f;f=h||(r?r.fixed:null);let g={[CY]:{className:`${e}-expand-icon-col`,columnType:`EXPAND_COLUMN`},title:a,fixed:f,className:`${e}-row-expand-icon-cell`,width:m,render:(t,n,r)=>{let a=o(n,r),u=c({prefixCls:e,expanded:i.has(a),expandable:l?l(n):!0,record:n,onExpand:s});return p?S.createElement(`span`,{onClick:e=>e.stopPropagation()},u):u}};return t.map((e,t)=>{let n=e===kJ?g:e;return te!==kJ)},[r,y,o,i,c,f,d]),x=S.useMemo(()=>{let e=b;return v&&(e=v(e)),e.length||(e=[{render:()=>null}]),e},[v,b,f]),[C,w]=FY(S.useMemo(()=>RY(x),[x,f,g]),g,_);return[x,C,w]}function BY(e,t,n){let r=wY(e),{expandIcon:i,expandedRowKeys:a,defaultExpandedRowKeys:o,defaultExpandAllRows:s,expandedRowRender:c,onExpand:l,onExpandedRowsChange:u,childrenColumnName:d}=r,f=i||mY,p=d||`children`,m=S.useMemo(()=>c?`row`:e.expandable&&e.internalHooks===`rc-table-internal-hook`&&e.expandable.__PARENT_RENDER_ICON__||t.some(e=>e&&typeof e==`object`&&e[p])?`nest`:!1,[!!c,t]),[h,g]=S.useState(()=>o||(s?hY(t,n,p):[])),_=S.useMemo(()=>new Set(a||h||[]),[a,h]);return[r,m,_,f,p,S.useCallback(e=>{let r=n(e,t.indexOf(e)),i,a=_.has(r);a?(_.delete(r),i=[..._]):i=[..._,r],g(i),l&&l(!a,e),u&&u(i)},[n,_,t,l,u])]}function VY(e,t){let n=S.useMemo(()=>e.map((n,r)=>eY(r,r,e,t)),[e,t]);return Xn(()=>n,[n],(e,t)=>!di(e,t))}function HY(e){let t=(0,S.useRef)(e),[,n]=(0,S.useState)({}),r=(0,S.useRef)(null),i=(0,S.useRef)([]);function a(e){i.current.push(e);let a=Promise.resolve();r.current=a,a.then(()=>{if(r.current===a){let e=i.current,a=t.current;i.current=[],e.forEach(e=>{t.current=e(t.current)}),r.current=null,a!==t.current&&n({})}})}return(0,S.useEffect)(()=>()=>{r.current=null},[]),[t.current,a]}function UY(e){let t=(0,S.useRef)(e||null),n=(0,S.useRef)(null);function r(){clearTimeout(n.current)}function i(e){t.current=e,r(),n.current=setTimeout(()=>{t.current=null,n.current=void 0},100)}function a(){return t.current}return(0,S.useEffect)(()=>r,[]),[i,a]}function WY(){let[e,t]=S.useState(-1),[n,r]=S.useState(-1);return[e,n,S.useCallback((e,n)=>{t(e),r(n)},[])]}var GY=zn()?window:null;function KY(e,t){let{offsetHeader:n=0,offsetSummary:r=0,offsetScroll:i=0,getContainer:a=()=>GY}=typeof e==`object`?e:{},o=a()||GY,s=!!e;return S.useMemo(()=>({isSticky:s,stickyClassName:s?`${t}-sticky-holder`:``,offsetHeader:n,offsetSummary:r,offsetScroll:i,container:o}),[s,i,n,r,t,o])}function qY(e,t){return(0,S.useMemo)(()=>{let n=t.length,r=(n,r,i)=>{let a=[],o=0;for(let s=n;s!==r;s+=i)a.push(o),t[s].fixed&&(o+=e[s]||0);return a};return{start:r(0,n,1),end:r(n-1,-1,-1).reverse(),widths:e}},[e,t])}var JY=e=>{let{children:t,className:n,style:r}=e;return S.createElement(`div`,{className:n,style:r},t)};function YY(e){let t=Or(e).getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}var XY=`mouseup`,ZY=`mousemove`,QY=`scroll`,$Y=`resize`,eX=S.forwardRef((e,t)=>{let{scrollBodyRef:n,onScroll:r,offsetScroll:i,container:a,direction:o}=e,s=MJ(RJ,`prefixCls`),c=n.current?.scrollWidth||0,l=n.current?.clientWidth||0,u=c&&l/c*l,d=S.useRef(null),[f,p]=HY({scrollLeft:0,isHiddenScrollBar:!0}),m=S.useRef({delta:0,x:0}),[h,g]=S.useState(!1),_=S.useRef(null);S.useEffect(()=>()=>{Ei.cancel(_.current)},[]);let v=()=>{g(!1)},y=e=>{e.persist(),m.current.delta=e.pageX-f.scrollLeft,m.current.x=0,g(!0),e.preventDefault()},b=e=>{let{buttons:t}=e||window?.event;if(!h||t===0){h&&g(!1);return}let n=m.current.x+e.pageX-m.current.x-m.current.delta,i=o===`rtl`;n=Math.max(i?u-l:0,Math.min(i?0:l-u,n)),(!i||Math.abs(n)+Math.abs(u){Ei.cancel(_.current),_.current=Ei(()=>{if(!n.current)return;let e=YY(n.current).top,t=e+n.current.offsetHeight,r=a===window?document.documentElement.scrollTop+window.innerHeight:YY(a).top+a.clientHeight;t-ei()<=r||e>=r-i?p(e=>({...e,isHiddenScrollBar:!0})):p(e=>({...e,isHiddenScrollBar:!1}))})},C=e=>{p(t=>({...t,scrollLeft:e/c*l||0}))};return S.useImperativeHandle(t,()=>({setScrollLeft:C,checkScrollBarVisible:x})),S.useEffect(()=>(document.body.addEventListener(XY,v,!1),document.body.addEventListener(ZY,b,!1),x(),()=>{document.body.removeEventListener(XY,v),document.body.removeEventListener(ZY,b)}),[u,h]),S.useEffect(()=>{if(n.current){let e=[],t=Or(n.current);for(;t;)e.push(t),t=t.parentElement;return e.forEach(e=>{e.addEventListener(QY,x,!1)}),window.addEventListener($Y,x,!1),window.addEventListener(QY,x,!1),a.addEventListener(QY,x,!1),()=>{e.forEach(e=>{e.removeEventListener(QY,x)}),window.removeEventListener($Y,x),window.removeEventListener(QY,x),a.removeEventListener(QY,x)}}},[a]),S.useEffect(()=>{f.isHiddenScrollBar||p(e=>{let t=n.current;return t?{...e,scrollLeft:t.scrollLeft/t.scrollWidth*t.clientWidth}:e})},[f.isHiddenScrollBar]),c<=l||!u||f.isHiddenScrollBar?null:S.createElement(`div`,{style:{height:ei(),width:l,bottom:i},className:`${s}-sticky-scroll`},S.createElement(`div`,{onMouseDown:y,ref:d,className:Y(`${s}-sticky-scroll-bar`,{[`${s}-sticky-scroll-bar-active`]:h}),style:{width:`${u}px`,transform:`translate3d(${f.scrollLeft}px, 0, 0)`}}))});function tX(){return tX=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let n={rowKey:`key`,prefixCls:nX,emptyText:aX,...e},{prefixCls:r,className:i,rowClassName:a,style:o,classNames:s,styles:c,data:l,rowKey:u,scroll:d,tableLayout:f,direction:p,title:m,footer:h,summary:g,caption:_,id:v,showHeader:y,components:b,emptyText:x,onRow:C,onHeaderRow:w,measureRowRender:T,onScroll:E,internalHooks:D,transformColumns:O,internalRefs:k,tailor:A,getContainerWidth:j,sticky:M,rowHoverable:N=!0}=n,P=l||rX,F=!!P.length,I=D===AJ,L=S.useCallback((e,t)=>Oi(b,e)||t,[b]),R=S.useMemo(()=>typeof u==`function`?u:e=>e&&e[u],[u]),z=L([`body`]),[B,V,H]=WY(),[U,ee,te,ne,W,re]=BY(n,P,R),G=d?.x,[K,q]=S.useState(0),[ie,J,ae]=zY({...n,...U,expandable:!!U.expandedRowRender,columnTitle:U.columnTitle,expandedKeys:te,getRowKey:R,onTriggerExpand:re,expandIcon:ne,expandIconColumnIndex:U.expandIconColumnIndex,direction:p,scrollWidth:I&&A&&typeof G==`number`?G:null,clientWidth:K},I?O:null),oe=ae??G,se=S.useMemo(()=>({columns:ie,flattenColumns:J}),[ie,J]),ce=S.useRef(null),le=S.useRef(null),ue=S.useRef(null),de=S.useRef(null);S.useImperativeHandle(t,()=>({nativeElement:ce.current,scrollTo:e=>{if(ue.current instanceof HTMLElement){let{index:t,top:n,key:r,offset:i}=e;if(WJ(n))ue.current?.scrollTo({top:n});else{let e=r??R(P[t]),n=ue.current.querySelector(`[data-row-key="${e}"]`);if(n)if(!i)n.scrollIntoView();else{let e=n.offsetTop;ue.current.scrollTo({top:e+i})}}}else ue.current?.scrollTo&&ue.current.scrollTo(e)}}));let fe=S.useRef(null),[pe,me]=S.useState(!1),[he,ge]=S.useState(!1),[_e,ve]=S.useState(new Map),ye=HJ(J).map(e=>_e.get(e)),be=S.useMemo(()=>ye,[ye.join(`_`)]),xe=qY(be,J),Se=d&&UJ(d.y),Ce=d&&UJ(oe)||!!U.fixed,we=Ce&&J.some(({fixed:e})=>e),Te=S.useRef(null),{isSticky:Ee,offsetHeader:De,offsetSummary:Oe,offsetScroll:ke,stickyClassName:Ae,container:je}=KY(M,r),Me=S.useMemo(()=>g?.(P),[g,P]),Ne=(Se||Ee)&&S.isValidElement(Me)&&Me.type===aY&&Me.props.fixed,Pe,Fe,Ie;Se&&(Fe={overflowY:F?`scroll`:`auto`,maxHeight:d.y}),Ce&&(Pe={overflowX:`auto`},Se||(Fe={overflowY:`hidden`}),Ie={width:oe===!0?`auto`:oe,minWidth:`100%`});let Le=S.useCallback((e,t)=>{ve(n=>{if(n.get(e)!==t){let r=new Map(n);return r.set(e,t),r}return n})},[]),[Re,ze]=UY(null);function Be(e,t){t&&(typeof t==`function`?t(e):t.scrollLeft!==e&&(t.scrollLeft=e,t.scrollLeft!==e&&setTimeout(()=>{t.scrollLeft=e},0)))}let[Ve,He]=S.useState([0,0]),Ue=Rn(({currentTarget:e,scrollLeft:t})=>{let n=typeof t==`number`?t:e.scrollLeft,r=e||iX;(!ze()||ze()===r)&&(Re(r),Be(n,le.current),Be(n,ue.current),Be(n,fe.current),Be(n,Te.current?.setScrollLeft));let i=e||le.current;if(i){let e=I&&A&&typeof oe==`number`?oe:i.scrollWidth,t=i.clientWidth,r=Math.abs(n);if(He(n=>{let i=[r,e-t];return di(n,i)?n:i}),e===t){me(!1),ge(!1);return}me(r>0),ge(r{Ue(e),E?.(e)}),Ge=()=>{Ce&&ue.current?Ue({currentTarget:Or(ue.current),scrollLeft:ue.current?.scrollLeft}):(me(!1),ge(!1))},Ke=e=>{Te.current?.checkScrollBarVisible();let t=e??ce.current?.offsetWidth??0;I&&j&&ce.current&&(t=j(ce.current,t)||t),t!==K&&(Ge(),q(t))};Vn(()=>{Ce&&Ke()},[Ce]);let qe=S.useRef(!1);S.useEffect(()=>{qe.current&&Ge()},[Ce,l,ie.length]),S.useEffect(()=>{qe.current=!0},[]);let[Je,Ye]=S.useState(0);Vn(()=>{(!A||!I)&&(ue.current instanceof Element?Ye(ti(ue.current).width):Ye(ti(de.current).width))},[]),S.useEffect(()=>{I&&k&&(k.body.current=ue.current)});let Xe=S.useCallback(e=>S.createElement(S.Fragment,null,S.createElement(NY,e),Ne===`top`&&S.createElement(oY,e,Me)),[Ne,Me]),Ze=S.useCallback(e=>S.createElement(oY,e,Me),[Me]),Qe=L([`table`],`table`),$e=S.useMemo(()=>f||(we?oe===`max-content`?`auto`:`fixed`:Se||Ee||J.some(({ellipsis:e})=>e)?`fixed`:`auto`),[Se,we,J,f,Ee]),et,tt={colWidths:be,columCount:J.length,stickyOffsets:xe,onHeaderRow:w,fixHeader:Se,scroll:d},nt=S.useMemo(()=>F?null:typeof x==`function`?x():x,[F,x]),rt=S.createElement(SY,{data:P,measureColumnWidth:Se||Ce||Ee}),it=S.createElement(EY,{colWidths:J.map(({width:e})=>e),columns:J}),at=_==null?void 0:S.createElement(`caption`,{className:`${r}-caption`},_),ot=bi(n,{data:!0}),st=bi(n,{aria:!0});if(Se||Ee){let e;typeof z==`function`?(e=z(P,{scrollbarSize:Je,ref:ue,onScroll:Ue}),tt.colWidths=J.map(({width:e},t)=>{let n=t===J.length-1?e-Je:e;return typeof n==`number`&&!Number.isNaN(n)?n:0})):e=S.createElement(`div`,{style:{...Pe,...Fe},onScroll:We,ref:ue,className:`${r}-body`},S.createElement(Qe,tX({style:{...Ie,tableLayout:$e}},st),at,it,rt,!Ne&&Me&&S.createElement(oY,{stickyOffsets:xe,flattenColumns:J},Me)));let t={noData:!P.length,maxContentScroll:Ce&&oe===`max-content`,...tt,...se,direction:p,stickyClassName:Ae,scrollX:oe,tableLayout:$e,onScroll:Ue};et=S.createElement(S.Fragment,null,y!==!1&&S.createElement(kY,tX({},t,{stickyTopOffset:De,className:`${r}-header`,ref:le,colGroup:it}),Xe),e,Ne&&Ne!==`top`&&S.createElement(kY,tX({},t,{stickyBottomOffset:Oe,className:`${r}-summary`,ref:fe,colGroup:it}),Ze),Ee&&ue.current&&ue.current instanceof Element&&S.createElement(eX,{ref:Te,offsetScroll:ke,scrollBodyRef:ue,onScroll:Ue,container:je,direction:p}))}else et=S.createElement(`div`,{style:{...Pe,...Fe,...c?.content},className:Y(`${r}-content`,s?.content),onScroll:Ue,ref:ue},S.createElement(Qe,tX({style:{...Ie,tableLayout:$e}},st),at,it,y!==!1&&S.createElement(NY,tX({},tt,se)),rt,Me&&S.createElement(oY,{stickyOffsets:xe,flattenColumns:J},Me)));let ct={...o};Ee&&(ct[`--columns-count`]=J.length);let lt=S.createElement(`div`,tX({className:Y(r,i,{[`${r}-rtl`]:p===`rtl`,[`${r}-fix-start-shadow`]:Ce,[`${r}-fix-end-shadow`]:Ce,[`${r}-fix-start-shadow-show`]:Ce&&pe,[`${r}-fix-end-shadow-show`]:Ce&&he,[`${r}-layout-fixed`]:f===`fixed`,[`${r}-fixed-header`]:Se,[`${r}-fixed-column`]:we,[`${r}-scroll-horizontal`]:Ce,[`${r}-has-fix-start`]:J[0]?.fixed,[`${r}-has-fix-end`]:J[J.length-1]?.fixed===`end`}),style:ct,id:v,ref:ce},ot),m&&S.createElement(JY,{className:Y(`${r}-title`,s?.title),style:c?.title},m(P)),S.createElement(`div`,{ref:de,className:Y(`${r}-container`,s?.section),style:c?.section},et),h&&S.createElement(JY,{className:Y(`${r}-footer`,s?.footer),style:c?.footer},h(P)));Ce&&(lt=S.createElement(ia,{onResize:({offsetWidth:e})=>Ke(e)},lt));let ut=VY(J,xe),dt=S.useMemo(()=>({scrollX:oe,scrollInfo:Ve,classNames:s,styles:c,prefixCls:r,getComponent:L,scrollbarSize:Je,direction:p,fixedInfoList:ut,isSticky:Ee,componentWidth:K,fixHeader:Se,fixColumn:we,horizonScroll:Ce,tableLayout:$e,rowClassName:a,expandedRowClassName:U.expandedRowClassName,expandIcon:ne,expandableType:ee,expandRowByClick:U.expandRowByClick,expandedRowRender:U.expandedRowRender,expandedRowOffset:U.expandedRowOffset,onTriggerExpand:re,expandIconColumnIndex:U.expandIconColumnIndex,indentSize:U.indentSize,allColumnsFixedLeft:J.every(e=>e.fixed===`start`),emptyNode:nt,columns:ie,flattenColumns:J,onColumnResize:Le,colWidths:be,hoverStartRow:B,hoverEndRow:V,onHover:H,rowExpandable:U.rowExpandable,onRow:C,getRowKey:R,expandedKeys:te,childrenColumnName:W,rowHoverable:N,measureRowRender:T}),[oe,Ve,s,c,r,L,Je,p,ut,Ee,K,Se,we,Ce,$e,a,U.expandedRowClassName,ne,ee,U.expandRowByClick,U.expandedRowRender,U.expandedRowOffset,re,U.expandIconColumnIndex,U.indentSize,nt,ie,J,Le,be,B,V,H,U.rowExpandable,C,R,te,W,N,T]);return S.createElement(RJ.Provider,{value:dt},lt)}),sX=e=>FJ(oX,e),cX=sX();cX.EXPAND_COLUMN=kJ,cX.INTERNAL_HOOKS=AJ,cX.Column=cY,cX.ColumnGroup=lY,cX.Summary=sY;var lX=jJ(null),uX=jJ(null);function dX(){return dX=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{rowInfo:t,column:n,colIndex:r,indent:i,index:a,component:o,renderIndex:s,record:c,style:l,className:u,inverse:d,getHeight:f}=e,{render:p,dataIndex:m,className:h,width:g}=n,{columnsOffset:_}=MJ(uX,[`columnsOffset`]),{key:v,fixedInfo:y,appendCellNode:b,additionalCellProps:x}=vY(t,n,r,i,a),{style:C,colSpan:w=1,rowSpan:T=1}=x,E=fX(r-1,w,_),D=w>1?g-E:0,O={...C,...l,flex:`0 0 ${E}px`,width:`${E}px`,marginRight:D,pointerEvents:`auto`},k=S.useMemo(()=>d?T<=1:w===0||T===0||T>1,[T,w,d]);k?O.visibility=`hidden`:d&&(O.height=f?.(T));let A=k?()=>null:p,j={};return(T===0||w===0)&&(j.rowSpan=1,j.colSpan=1),S.createElement(ZJ,dX({className:Y(h,u),ellipsis:n.ellipsis,align:n.align,scope:n.rowScope,component:o,prefixCls:t.prefixCls,key:v,record:c,index:a,renderIndex:s,dataIndex:m,render:A,shouldCellUpdate:n.shouldCellUpdate},y,{appendNode:b,additionalProps:{...x,style:O,...j}}))};function mX(){return mX=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{data:n,index:r,className:i,rowKey:a,style:o,extra:s,getHeight:c,...l}=e,{record:u,indent:d,index:f}=n,{scrollX:p,flattenColumns:m,prefixCls:h,fixColumn:g,componentWidth:_}=MJ(RJ,[`prefixCls`,`flattenColumns`,`fixColumn`,`componentWidth`,`scrollX`]),{getComponent:v}=MJ(lX,[`getComponent`]),y=fY(u,a,r,d),b=v([`body`,`row`],`div`),x=v([`body`,`cell`],`div`),{rowSupportExpand:C,expanded:w,rowProps:T,expandedRowRender:E,expandedRowClassName:D}=y,O;if(C&&w){let e=E(u,r,d+1,w),t=gY(D,u,r,d),n={};g&&(n={style:{"--virtual-width":`${_}px`}});let i=`${h}-expanded-row-cell`;O=S.createElement(b,{className:Y(`${h}-expanded-row`,`${h}-expanded-row-level-${d+1}`,t)},S.createElement(ZJ,{component:x,prefixCls:h,className:Y(i,{[`${i}-fixed`]:g}),additionalProps:n},e))}let k={...o,width:p};s&&(k.position=`absolute`,k.pointerEvents=`none`);let A=S.createElement(b,mX({},T,l,{"data-row-key":a,ref:C?null:t,className:Y(i,`${h}-row`,T?.className,{[`${h}-row-extra`]:s}),style:{...k,...T?.style}}),m.map((e,t)=>S.createElement(pX,{key:t,component:x,rowInfo:y,column:e,colIndex:t,indent:d,index:r,renderIndex:f,record:u,inverse:s,getHeight:c})));return C?S.createElement(`div`,{ref:t},A,O):A})),gX=IJ(S.forwardRef((e,t)=>{let{data:n,onScroll:r}=e,{flattenColumns:i,onColumnResize:a,getRowKey:o,expandedKeys:s,prefixCls:c,childrenColumnName:l,scrollX:u,direction:d}=MJ(RJ,[`flattenColumns`,`onColumnResize`,`getRowKey`,`prefixCls`,`expandedKeys`,`childrenColumnName`,`scrollX`,`direction`]),{sticky:f,scrollY:p,listItemHeight:m,getComponent:h,onScroll:g}=MJ(lX),_=S.useRef(null),v=dY(n,l,s,o),y=S.useMemo(()=>{let e=0;return i.map(({width:t,minWidth:n,key:r})=>{let i=Math.max(t||0,n||0);return e+=i,[r,i,e]})},[i]),b=S.useMemo(()=>y.map(e=>e[2]),[y]);S.useEffect(()=>{y.forEach(([e,t])=>{a(e,t)})},[y]),S.useImperativeHandle(t,()=>{let e={scrollTo:e=>{let{offset:t,...n}=e;t?_.current?.scrollTo({...n,offset:t,align:`top`}):_.current?.scrollTo(e)},nativeElement:_.current?.nativeElement};return Object.defineProperty(e,`scrollLeft`,{get:()=>_.current?.getScrollInfo().x||0,set:e=>{_.current?.scrollTo({left:e})}}),Object.defineProperty(e,`scrollTop`,{get:()=>_.current?.getScrollInfo().y||0,set:e=>{_.current?.scrollTo({top:e})}}),e});let x=(e,t)=>{let n=v[t]?.record,{onCell:r}=e;return r?r(n,t)?.rowSpan??1:1},C=e=>{let{start:t,end:n,getSize:r,offsetY:a}=e;if(n<0)return null;let s=i.filter(e=>x(e,t)===0),c=t;for(let e=t;e>=0;--e)if(s=s.filter(t=>x(t,e)===0),!s.length){c=e;break}let l=i.filter(e=>x(e,n)!==1),u=n;for(let e=n;ex(t,e)!==1),!l.length){u=Math.max(e-1,n);break}let d=[];for(let e=c;e<=u;e+=1)v[e]&&i.some(t=>x(t,e)>1)&&d.push(e);return d.map(e=>{let t=v[e],n=o(t.record,e),i=t=>{let i=e+t-1,a=v[i];if(!a||!a.record){let e=Math.min(i,v.length-1),t=v[e],a=r(n,o(t.record,e));return a.bottom-a.top}let s=r(n,o(a.record,i));return s.bottom-s.top},s=r(n);return S.createElement(hX,{key:e,data:t,rowKey:n,index:e,style:{top:-a+s.top},extra:!0,getHeight:i})})},w=S.useMemo(()=>({columnsOffset:b}),[b]),T=`${c}-tbody`,E=h([`body`,`wrapper`]),D={};return f&&(D.position=`sticky`,D.bottom=0,typeof f==`object`&&f.offsetScroll&&(D.bottom=f.offsetScroll)),S.createElement(uX.Provider,{value:w},S.createElement(cC,{fullHeight:!1,ref:_,prefixCls:`${T}-virtual`,styles:{horizontalScrollBar:D},className:T,height:p,itemHeight:m||24,data:v,itemKey:e=>o(e.record),component:E,scrollWidth:u,direction:d,onVirtualScroll:({x:e})=>{r({currentTarget:_.current?.nativeElement,scrollLeft:e})},onScroll:g,extraRender:C},(e,t,n)=>{let r=o(e.record,t);return S.createElement(hX,{data:e,rowKey:r,index:t,style:n.style})}))}));function _X(){return _X=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{ref:n,onScroll:r}=t;return S.createElement(gX,{ref:n,data:e,onScroll:r})},yX=S.forwardRef((e,t)=>{let{data:n,columns:r,scroll:i,sticky:a,prefixCls:o=nX,className:s,listItemHeight:c,components:l,onScroll:u}=e,{x:d,y:f}=i||{};typeof d!=`number`&&(d=1),typeof f!=`number`&&(f=500);let p=Rn((e,t)=>Oi(l,e)||t),m=Rn(u),h=S.useMemo(()=>({sticky:a,scrollY:f,listItemHeight:c,getComponent:p,onScroll:m}),[a,f,c,p,m]);return S.createElement(lX.Provider,{value:h},S.createElement(cX,_X({},e,{className:Y(s,`${o}-virtual`),scroll:{...i,x:d},components:{...l,body:n?.length?vX:void 0},columns:r,internalHooks:AJ,tailor:!0,ref:t})))}),bX=e=>FJ(yX,e);bX();var xX=e=>null,SX=e=>null,CX=S.createContext(null),wX=S.createContext({}),TX=S.memo(({prefixCls:e,level:t,isStart:n,isEnd:r})=>{let i=`${e}-indent-unit`,a=[];for(let e=0;e{let{eventKey:t,className:n,style:r,dragOver:i,dragOverGapTop:a,dragOverGapBottom:o,isLeaf:s,isStart:c,isEnd:l,expanded:u,selected:d,checked:f,halfChecked:p,loading:m,domRef:h,active:g,data:_,onMouseMove:v,selectable:y,treeId:b,...x}=e,C=qn(b,t),w=S.useContext(CX),{classNames:T,styles:E}=w||{},D=S.useContext(wX),O=S.useRef(null),[k,A]=S.useState(!1),j=!!(w.disabled||e.disabled||D.nodeDisabled?.(_)),M=S.useMemo(()=>!w.checkable||e.checkable===!1?!1:w.checkable,[w.checkable,e.checkable]),N=t=>{j||w.onNodeSelect(t,pB(e))},P=t=>{j||!M||e.disableCheckbox||w.onNodeCheck(t,pB(e),!f)},F=S.useMemo(()=>typeof y==`boolean`?y:w.selectable,[y,w.selectable]),I=t=>{w.onNodeClick(t,pB(e)),F?N(t):P(t)},L=t=>{w.onNodeDoubleClick(t,pB(e))},R=t=>{w.onNodeMouseEnter(t,pB(e))},z=t=>{w.onNodeMouseLeave(t,pB(e))},B=t=>{w.onNodeContextMenu(t,pB(e))},V=S.useMemo(()=>!!(w.draggable&&(!w.draggable.nodeDraggable||w.draggable.nodeDraggable(_))),[w.draggable,_]),H=t=>{t.stopPropagation(),A(!0),w.onNodeDragStart(t,e);try{t.dataTransfer.setData(`text/plain`,``)}catch{}},U=t=>{t.preventDefault(),t.stopPropagation(),w.onNodeDragEnter(t,e)},ee=t=>{t.preventDefault(),t.stopPropagation(),w.onNodeDragOver(t,e)},te=t=>{t.stopPropagation(),w.onNodeDragLeave(t,e)},ne=t=>{t.stopPropagation(),A(!1),w.onNodeDragEnd(t,e)},W=t=>{t.preventDefault(),t.stopPropagation(),A(!1),w.onNodeDrop(t,e)},re=t=>{m||w.onNodeExpand(t,pB(e))},G=S.useMemo(()=>{let{children:e}=nB(w.keyEntities,t)||{};return!!(e||[]).length},[w.keyEntities,t]),K=S.useMemo(()=>dB(s,w.loadData,G,e.loaded),[s,w.loadData,G,e.loaded]);S.useEffect(()=>{m||typeof w.loadData==`function`&&u&&!K&&!e.loaded&&w.onNodeLoad(pB(e))},[m,w.loadData,w.onNodeLoad,u,K,e]);let q=S.useMemo(()=>w.draggable?.icon?S.createElement(`span`,{className:`${w.prefixCls}-draggable-icon`},w.draggable.icon):null,[w.draggable]),ie=t=>{let n=e.switcherIcon||w.switcherIcon;return typeof n==`function`?n({...e,isLeaf:t}):n},J=()=>{if(K){let e=ie(!0);return e===!1?null:S.createElement(`span`,{className:Y(`${w.prefixCls}-switcher`,`${w.prefixCls}-switcher-noop`)},e)}let e=ie(!1);return e===!1?null:S.createElement(`span`,{onClick:re,className:Y(`${w.prefixCls}-switcher`,`${w.prefixCls}-switcher_${u?DX:OX}`)},e)},ae=S.useMemo(()=>{if(!M)return null;let t=typeof M==`boolean`?null:M;return S.createElement(`span`,{className:Y(`${w.prefixCls}-checkbox`,{[`${w.prefixCls}-checkbox-checked`]:f,[`${w.prefixCls}-checkbox-indeterminate`]:!f&&p,[`${w.prefixCls}-checkbox-disabled`]:j||e.disableCheckbox}),onClick:P,role:`checkbox`,"aria-checked":p?`mixed`:f,"aria-disabled":j||e.disableCheckbox,"aria-labelledby":C},t)},[M,f,p,j,e.disableCheckbox,C]),oe=S.useMemo(()=>K?null:u?DX:OX,[K,u]),se=S.useMemo(()=>S.createElement(`span`,{className:Y(T?.itemIcon,`${w.prefixCls}-iconEle`,`${w.prefixCls}-icon__${oe||`docu`}`,{[`${w.prefixCls}-icon_loading`]:m}),style:E?.itemIcon}),[w.prefixCls,oe,m]),ce=S.useMemo(()=>{let n=!!w.draggable;return!e.disabled&&n&&w.dragOverNodeKey===t?w.dropIndicatorRender({dropPosition:w.dropPosition,dropLevelOffset:w.dropLevelOffset,indent:w.indent,prefixCls:w.prefixCls,direction:w.direction}):null},[w.dropPosition,w.dropLevelOffset,w.indent,w.prefixCls,w.direction,w.draggable,w.dragOverNodeKey,w.dropIndicatorRender]),le=S.useMemo(()=>{let{title:t=kX}=e,n=`${w.prefixCls}-node-content-wrapper`,r;if(w.showIcon){let t=e.icon||w.icon;r=t?S.createElement(`span`,{className:Y(T?.itemIcon,`${w.prefixCls}-iconEle`,`${w.prefixCls}-icon__customize`),style:E?.itemIcon},typeof t==`function`?t(e):t):se}else w.loadData&&m&&(r=se);let i;return i=typeof t==`function`?t(_):w.titleRender?w.titleRender(_):t,S.createElement(`span`,{ref:O,title:typeof t==`string`?t:``,className:Y(n,`${n}-${oe||`normal`}`,{[`${w.prefixCls}-node-selected`]:!j&&(d||k)}),onMouseEnter:R,onMouseLeave:z,onContextMenu:B,onClick:I,onDoubleClick:L},r,S.createElement(`span`,{className:Y(`${w.prefixCls}-title`,T?.itemTitle),style:E?.itemTitle},i),ce)},[w.prefixCls,w.showIcon,e,w.icon,se,w.titleRender,_,oe,R,z,B,I,L]),ue=bi(x,{aria:!0,data:!0}),{level:de}=nB(w.keyEntities,t)||{},fe=l[l.length-1],pe=!j&&V,me=w.draggingNodeKey===t;return S.createElement(`div`,EX({ref:h,role:`treeitem`,id:C,"aria-expanded":K?void 0:u,"aria-selected":F&&!j?d:void 0,"aria-checked":M&&!j?p?`mixed`:f:void 0,"aria-disabled":j,className:Y(n,`${w.prefixCls}-treenode`,T?.item,{[`${w.prefixCls}-treenode-disabled`]:j,[`${w.prefixCls}-treenode-switcher-${u?`open`:`close`}`]:!s,[`${w.prefixCls}-treenode-checkbox-checked`]:f,[`${w.prefixCls}-treenode-checkbox-indeterminate`]:p,[`${w.prefixCls}-treenode-selected`]:d,[`${w.prefixCls}-treenode-loading`]:m,[`${w.prefixCls}-treenode-active`]:g,[`${w.prefixCls}-treenode-leaf-last`]:fe,[`${w.prefixCls}-treenode-draggable`]:V,dragging:me,"drop-target":w.dropTargetKey===t,"drop-container":w.dropContainerKey===t,"drag-over":!j&&i,"drag-over-gap-top":!j&&a,"drag-over-gap-bottom":!j&&o,"filter-node":w.filterTreeNode?.(pB(e)),[`${w.prefixCls}-treenode-leaf`]:K}),style:{...r,...E?.item},draggable:pe,onDragStart:pe?H:void 0,onDragEnter:V?U:void 0,onDragOver:V?ee:void 0,onDragLeave:V?te:void 0,onDrop:V?W:void 0,onDragEnd:V?ne:void 0,onMouseMove:v},ue),S.createElement(TX,{prefixCls:w.prefixCls,level:de,isStart:c,isEnd:l}),q,J(),ae,le)};AX.isTreeNode=1;function jX(e,t){if(!e)return[];let n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function MX(e,t){let n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function NX(e){return e.split(`-`)}function PX(e,t){let n=[],r=nB(t,e);function i(e=[]){e.forEach(({key:e,children:t})=>{n.push(e),i(t)})}return i(r.children),n}function FX(e){if(e.parent){let t=NX(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function IX(e){let t=NX(e.pos);return Number(t[t.length-1])===0}function LX(e,t,n,r,i,a,o,s,c,l){let{clientX:u,clientY:d}=e,{top:f,height:p}=e.target.getBoundingClientRect(),m=((l===`rtl`?-1:1)*((i?.x||0)-u)-12)/r,h=c.filter(e=>s[e]?.children?.length),g=nB(s,n.eventKey);if(de.key===g.key),t=o[e<=0?0:e-1].key;g=nB(s,t)}let _=g.key,v=g,y=g.key,b=0,x=0;if(!h.includes(_))for(let e=0;e-1.5?a({dragNode:S,dropNode:C,dropPosition:1})?b=1:w=!1:a({dragNode:S,dropNode:C,dropPosition:0})?b=0:a({dragNode:S,dropNode:C,dropPosition:1})?b=1:w=!1:a({dragNode:S,dropNode:C,dropPosition:1})?b=1:w=!1,{dropPosition:b,dropLevelOffset:x,dropTargetKey:g.key,dropTargetPos:g.pos,dragOverNodeKey:y,dropContainerKey:b===0?null:g.parent?.key||null,dropAllowed:w}}function RX(e,t){if(!e)return;let{multiple:n}=t;return n?e.slice():e.length?[e[0]]:e}function zX(e){if(!e)return null;let t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(typeof e==`object`)t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return li(!1,"`checkedKeys` is not an array or an object"),null;return t}function BX(e,t){let n=new Set;function r(e){if(n.has(e))return;let i=nB(t,e);if(!i)return;n.add(e);let{parent:a,node:o}=i;o.disabled||a&&r(a.key)}return(e||[]).forEach(e=>{r(e)}),[...n]}var VX={},HX=`SELECT_ALL`,UX=`SELECT_INVERT`,WX=`SELECT_NONE`,GX=[],KX=(e,t,n=[])=>((t||[]).forEach(t=>{n.push(t),ef(t)&&e in t&&KX(e,t[e],n)}),n),qX=(e,t)=>{let{preserveSelectedRowKeys:n,selectedRowKeys:r,defaultSelectedRowKeys:i,getCheckboxProps:a,getTitleCheckboxProps:o,onChange:s,onSelect:c,onSelectAll:l,onSelectInvert:u,onSelectNone:d,onSelectMultiple:f,columnWidth:p,type:m,selections:h,fixed:g,renderCell:_,hideSelectAll:v,checkStrictly:y=!0}=t||{},{prefixCls:b,data:x,pageData:C,getRecordByKey:w,getRowKey:T,expandType:E,childrenColumnName:D,locale:O,getPopupContainer:k}=e,A=Ui(`Table`),[j,M]=Sf(e=>e),[N,P]=Wn(i||GX,r),F=N??GX,I=S.useRef(new Map),L=(0,S.useCallback)(e=>{if(n){let t=new Map;e.forEach(e=>{let n=w(e);!n&&I.current.has(e)&&(n=I.current.get(e)),t.set(e,n)}),I.current=t}},[w,n]);S.useEffect(()=>{L(F)},[F,L]);let R=(0,S.useMemo)(()=>KX(D,C),[D,C]),{keyEntities:z}=(0,S.useMemo)(()=>{if(y)return{keyEntities:null};let e=x;if(n){let t=new Set(R.map(T)),n=Array.from(I.current).reduce((e,[n,r])=>t.has(n)?e:e.concat(r),[]);e=[].concat(da(e),da(n))}return uB(e,{externalGetKey:T,childrenPropName:D})},[x,T,y,D,n,R]),B=(0,S.useMemo)(()=>{let e=new Map;return R.forEach((t,n)=>{let r=T(t,n),i=(a?a(t):null)||{};e.set(r,i)}),e},[R,T,a]),V=(0,S.useCallback)(e=>{let t=T(e),n;return n=B.has(t)?B.get(T(e)):a?a(e):void 0,!!n?.disabled},[B,T]),[H,U]=(0,S.useMemo)(()=>{if(y)return[F,[]];let{checkedKeys:e,halfCheckedKeys:t}=xB(F,!0,z,V);return[e||[],t]},[F,y,z,V]),ee=(0,S.useMemo)(()=>{let e=m===`radio`?H.slice(0,1):H;return new Set(e)},[H,m]),te=(0,S.useMemo)(()=>m===`radio`?new Set:new Set(U),[U,m]);S.useEffect(()=>{t||P(GX)},[!!t]);let ne=(0,S.useCallback)((e,t)=>{let r,i;L(e),n?(r=e,i=e.map(e=>I.current.get(e))):(r=[],i=[],e.forEach(e=>{let t=w(e);t!==void 0&&(r.push(e),i.push(t))})),P(r),s?.(r,i,{type:t})},[P,w,s,n]),W=(0,S.useCallback)((e,t,n,r)=>{if(c){let i=n.map(w);c(w(e),t,i,r)}ne(n,`single`)},[c,w,ne]),re=(0,S.useMemo)(()=>!h||v?null:(h===!0?[HX,UX,WX]:h).map(e=>e===`SELECT_ALL`?{key:`all`,text:O.selectionAll,onSelect(){ne(x.map((e,t)=>T(e,t)).filter(e=>!B.get(e)?.disabled||ee.has(e)),`all`)}}:e===`SELECT_INVERT`?{key:`invert`,text:O.selectInvert,onSelect(){let e=new Set(ee);C.forEach((t,n)=>{let r=T(t,n);B.get(r)?.disabled||(e.has(r)?e.delete(r):e.add(r))});let t=Array.from(e);u&&(A.deprecated(!1,`onSelectInvert`,`onChange`),u(t)),ne(t,`invert`)}}:e===`SELECT_NONE`?{key:`none`,text:O.selectNone,onSelect(){d?.(),ne(Array.from(ee).filter(e=>B.get(e)?.disabled),`none`)}}:e).map(e=>({...e,onSelect:(...t)=>{e.onSelect?.(...t),M(null)}})),[h,v,O.selectionAll,O.selectInvert,O.selectNone,B,ee,x,C,T,u,ne]);return[(0,S.useCallback)(e=>{if(!t)return e.filter(e=>e!==VX);let n=da(e),r=new Set(ee),i=R.map(T).filter(e=>!B.get(e).disabled),a=i.every(e=>r.has(e)),s=i.some(e=>r.has(e)),c=()=>{let e=[];a?i.forEach(t=>{r.delete(t),e.push(t)}):i.forEach(t=>{r.has(t)||(r.add(t),e.push(t))});let t=Array.from(r);l?.(!a,t.map(w),e.map(w)),ne(t,`all`),M(null)},u,d;if(m!==`radio`){let e;if(re){let t={getPopupContainer:k,items:re.map((e,t)=>{let{key:n,text:r,onSelect:a}=e;return{key:n??t,onClick:()=>{a?.(i)},label:r}})};e=S.createElement(`div`,{className:`${b}-selection-extra`},S.createElement(NU,{menu:t,getPopupContainer:k},S.createElement(`span`,null,S.createElement(nw,null))))}let t=R.map((e,t)=>{let n=T(e,t),i=B.get(n)||{};return{checked:r.has(n),...i}}).filter(({disabled:e})=>e),n=!!t.length&&t.length===R.length,l=n&&t.every(({checked:e})=>e),f=n&&t.some(({checked:e})=>e),p=o?.()||{},{onChange:m,disabled:h}=p;d=S.createElement(lV,{"aria-label":e?`Custom selection`:`Select all`,...p,checked:n?l:!!R.length&&a,indeterminate:n?!l&&f:!a&&s,onChange:e=>{c(),m?.(e)},disabled:h??(R.length===0||n),skipGroup:!0}),u=!v&&S.createElement(`div`,{className:`${b}-selection`},d,e)}let x;x=m===`radio`?(e,t,n)=>{let i=T(t,n),a=r.has(i),o=B.get(i);return{node:S.createElement(RL,{...o,checked:a,onClick:e=>{e.stopPropagation(),o?.onClick?.(e)},onChange:e=>{r.has(i)||W(i,!0,[i],e.nativeEvent),o?.onChange?.(e)}}),checked:a}}:(e,t,n)=>{let a=T(t,n),o=r.has(a),s=te.has(a),c=B.get(a),l;return l=E===`nest`?s:c?.indeterminate??s,{node:S.createElement(lV,{...c,indeterminate:l,checked:o,skipGroup:!0,onClick:e=>{e.stopPropagation(),c?.onClick?.(e)},onChange:e=>{let{nativeEvent:t}=e,{shiftKey:n}=t,s=i.indexOf(a),l=H.some(e=>i.includes(e));if(n&&y&&l){let e=j(s,i,r),t=Array.from(r);f?.(!o,t.map(w),e.map(w)),ne(t,`multiple`)}else{let e=H;if(y){let n=o?jX(e,a):MX(e,a);W(a,!o,n,t)}else{let{checkedKeys:n,halfCheckedKeys:r}=xB([].concat(da(e),[a]),!0,z,V),i=n;if(o){let e=new Set(n);e.delete(a),i=xB(Array.from(e),{checked:!1,halfCheckedKeys:r},z,V).checkedKeys}W(a,!o,i,t)}}M(o?null:s),c?.onChange?.(e)}}),checked:o}};let C=(e,t,n)=>{let{node:r,checked:i}=x(e,t,n);return _?_(i,t,n,r):r};if(!n.includes(VX))if(n.findIndex(e=>e.RC_TABLE_INTERNAL_COL_DEFINE?.columnType===`EXPAND_COLUMN`)===0){let[e,...t]=n;n=[e,VX].concat(da(t))}else n=[VX].concat(da(n));let D=n.indexOf(VX);n=n.filter((e,t)=>e!==VX||t===D);let O=n[D-1],A=n[D+1],N=g;N===void 0&&(A?.fixed===void 0?O?.fixed!==void 0&&(N=O.fixed):N=A.fixed),N&&O&&O.RC_TABLE_INTERNAL_COL_DEFINE?.columnType===`EXPAND_COLUMN`&&O.fixed===void 0&&(O.fixed=N);let P=Y(`${b}-selection-col`,{[`${b}-selection-col-with-dropdown`]:h&&m===`checkbox`}),F={fixed:N,width:p,className:`${b}-selection-column`,title:t?.columnTitle?typeof t.columnTitle==`function`?t.columnTitle(d):t.columnTitle:u,render:C,onCell:t.onCell,align:t.align,[CY]:{className:P}};return n.map(e=>e===VX?F:e)},[T,R,t,H,ee,te,p,re,E,B,f,W,V]),ee]};function JX(e){return t=>{let{prefixCls:n,onExpand:r,record:i,expanded:a,expandable:o}=t,s=`${n}-row-expand-icon`;return S.createElement(`button`,{type:`button`,onClick:e=>{r(i,e),e.stopPropagation()},className:Y(s,{[`${s}-spaced`]:!o,[`${s}-expanded`]:o&&a,[`${s}-collapsed`]:o&&!a}),"aria-label":a?e.collapse:e.expand,"aria-expanded":a})}}function YX(e){return(t,n)=>{let r=t.querySelector(`.${e}-container`),i=n;if(r){let e=getComputedStyle(r),t=Number.parseInt(e.borderLeftWidth,10),a=Number.parseInt(e.borderRightWidth,10);i=n-t-a}return i}}var XX=(e,t)=>`key`in e&&Zd(e.key)?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join(`.`):e.dataIndex:t;function ZX(e,t){return t?`${t}-${e}`:`${e}`}var QX=(e,t)=>typeof e==`function`?e(t):e,$X=(e,t)=>{let n=QX(e,t);return Object.prototype.toString.call(n)===`[object Object]`?``:n},eZ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z`}}]},name:`filter`,theme:`filled`}}))());function tZ(){return tZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,tZ({},e,{ref:t,icon:eZ.default}))),rZ=e=>{let{dropPosition:t,dropLevelOffset:n,indent:r}=e,i={pointerEvents:`none`,position:`absolute`,right:0,backgroundColor:`red`,height:2};switch(t){case-1:i.top=0,i.left=-n*r;break;case 1:i.bottom=0,i.left=-n*r;break;case 0:i.bottom=0,i.left=r;break}return S.createElement(`div`,{style:i})};function iZ(e,t){let[n,r]=S.useState(!1);Vn(()=>{if(n)return e(),()=>{t()}},[n]),Vn(()=>(r(!0),()=>{r(!1)}),[])}function aZ(){return aZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:n,style:r,motion:i,motionNodes:a,motionType:o,onMotionStart:s,onMotionEnd:c,active:l,treeNodeRequiredProps:u,...d}=e,[f,p]=S.useState(!0),{prefixCls:m}=S.useContext(CX),h=a&&o!==`hide`;Vn(()=>{a&&h!==f&&p(h)},[a]);let g=()=>{a&&s()},_=S.useRef(!1),v=()=>{a&&!_.current&&(_.current=!0,c())};return iZ(g,v),a?S.createElement(Ed,aZ({ref:t,visible:f},i,{motionAppear:o===`show`,onVisibleChanged:e=>{h===e&&v()}}),({className:e,style:t},n)=>S.createElement(`div`,{ref:n,className:Y(`${m}-treenode-motion`,e),style:t},a.map(e=>{let{data:{...t},title:n,key:r,isStart:i,isEnd:a}=e;delete t.children;let o=fB(r,u);return S.createElement(AX,aZ({},t,o,{title:n,active:l,data:e.data,key:r,isStart:i,isEnd:a}))}))):S.createElement(AX,aZ({domRef:t,className:n,style:r},d,{active:l}))});function sZ(e=[],t=[]){let n=e.length,r=t.length;if(Math.abs(n-r)!==1)return{add:!1,key:null};function i(e,t){let n=new Map;e.forEach(e=>{n.set(e,!0)});let r=t.filter(e=>!n.has(e));return r.length===1?r[0]:null}return ne.key===n)+1],i=t.findIndex(e=>e.key===n);if(r){let e=t.findIndex(e=>e.key===r.key);return t.slice(i+1,e)}return t.slice(i+1)}function lZ(){return lZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,data:r,selectable:i,checkable:a,expandedKeys:o,selectedKeys:s,checkedKeys:c,loadedKeys:l,loadingKeys:u,halfCheckedKeys:d,keyEntities:f,disabled:p,dragging:m,dragOverNodeKey:h,dropPosition:g,motion:_,height:v,itemHeight:y,virtual:b,scrollWidth:x,focusable:C,activeItem:w,tabIndex:T,onKeyDown:E,onFocus:D,onBlur:O,onMouseDown:k,onMouseUp:A,onActiveChange:j,onListChangeStart:M,onListChangeEnd:N,...P}=e,F=Yn(),I=S.useRef(null),L=S.useRef(null);S.useImperativeHandle(t,()=>({scrollTo:e=>{I.current.scrollTo(e)},getIndentWidth:()=>L.current.offsetWidth}));let[R,z]=S.useState(o),[B,V]=S.useState(r),[H,U]=S.useState(r),[ee,te]=S.useState([]),[ne,W]=S.useState(null),re=S.useRef(r);re.current=r;function G(){let e=re.current;V(e),U(e),te([]),W(null),N()}Vn(()=>{z(o);let e=sZ(R,o);if(e.key!==null)if(e.add){let t=B.findIndex(({key:t})=>t===e.key),n=mZ(cZ(B,r,e.key),b,v,y),i=B.slice();i.splice(t+1,0,pZ),U(i),te(n),W(`show`)}else{let t=r.findIndex(({key:t})=>t===e.key),n=mZ(cZ(r,B,e.key),b,v,y),i=r.slice();i.splice(t+1,0,pZ),U(i),te(n),W(`hide`)}else B!==r&&(V(r),U(r))},[o,r]),S.useEffect(()=>{m||G()},[m]);let K=_?H:r,q={expandedKeys:o,selectedKeys:s,loadedKeys:l,loadingKeys:u,checkedKeys:c,halfCheckedKeys:d,dragOverNodeKey:h,dropPosition:g,keyEntities:f};return S.createElement(S.Fragment,null,S.createElement(`div`,{className:`${n}-treenode`,"aria-hidden":!0,style:{position:`absolute`,pointerEvents:`none`,visibility:`hidden`,height:0,overflow:`hidden`,border:0,padding:0}},S.createElement(`div`,{className:`${n}-indent`},S.createElement(`div`,{ref:L,className:`${n}-indent-unit`}))),S.createElement(cC,lZ({},P,{data:K,itemKey:hZ,height:v,fullHeight:!1,virtual:b,itemHeight:y,scrollWidth:x,prefixCls:`${n}-list`,ref:I,role:`tree`,tabIndex:C!==!1&&!p?T:void 0,"aria-activedescendant":w?qn(F,w.key):void 0,onKeyDown:E,onFocus:D,onBlur:O,onMouseDown:k,onMouseUp:A,onVisibleChange:e=>{e.every(e=>hZ(e)!==uZ)&&G()}}),e=>{let{pos:t,data:{...n},title:r,key:i,isStart:a,isEnd:o}=e,s=aB(i,t);delete n.key,delete n.children;let c=fB(s,q);return S.createElement(oZ,lZ({},n,c,{title:r,active:!!w&&i===w.key,pos:t,data:e.data,isStart:a,isEnd:o,motion:_,motionNodes:i===uZ?ee:null,motionType:ne,onMotionStart:M,onMotionEnd:G,treeNodeRequiredProps:q,treeId:F,onMouseMove:()=>{j(null)}}))}))});function _Z(){return _Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t!0,expandAction:!1};static TreeNode=AX;destroyed=!1;delayedDragEnterLogic;loadingRetryTimes={};state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],activeKey:null,listChanging:!1,prevProps:null,fieldNames:oB()};dragStartMousePosition=null;dragNodeProps=null;currentMouseOverDroppableNodeKey=null;focusedByMouse=!1;listRef=S.createRef();componentDidMount(){this.destroyed=!1,this.onUpdated()}componentDidUpdate(){this.onUpdated()}onUpdated(){let{activeKey:e,itemScrollOffset:t=0}=this.props;e!==void 0&&e!==this.state.activeKey&&(this.setState({activeKey:e}),e!==null&&this.scrollTo({key:e,offset:t}))}componentWillUnmount(){window.removeEventListener(`dragend`,this.onWindowDragEnd),this.destroyed=!0}static getDerivedStateFromProps(e,t){let{prevProps:n}=t,r={prevProps:e};function i(t){return!n&&e.hasOwnProperty(t)||n&&n[t]!==e[t]}let a,{fieldNames:o}=t;if(i(`fieldNames`)&&(o=oB(e.fieldNames),r.fieldNames=o),i(`treeData`)?{treeData:a}=e:i(`children`)&&(li(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),a=sB(e.children)),a){r.treeData=a;let e=uB(a,{fieldNames:o});r.keyEntities={[uZ]:fZ,...e.keyEntities}}let s=r.keyEntities||t.keyEntities;if(i(`expandedKeys`)||n&&i(`autoExpandParent`))r.expandedKeys=e.autoExpandParent||!n&&e.defaultExpandParent?BX(e.expandedKeys,s):e.expandedKeys;else if(!n&&e.defaultExpandAll){let e={...s};delete e[uZ];let t=[];Object.keys(e).forEach(n=>{let r=e[n];r.children&&r.children.length&&t.push(r.key)}),r.expandedKeys=t}else !n&&e.defaultExpandedKeys&&(r.expandedKeys=e.autoExpandParent||e.defaultExpandParent?BX(e.defaultExpandedKeys,s):e.defaultExpandedKeys);if(r.expandedKeys||delete r.expandedKeys,(a||r.expandedKeys)&&(r.flattenNodes=cB(a||t.treeData,r.expandedKeys||t.expandedKeys,o)),e.selectable&&(i(`selectedKeys`)?r.selectedKeys=RX(e.selectedKeys,e):!n&&e.defaultSelectedKeys&&(r.selectedKeys=RX(e.defaultSelectedKeys,e))),e.checkable){let o;if(i(`checkedKeys`)?o=zX(e.checkedKeys)||{}:!n&&e.defaultCheckedKeys?o=zX(e.defaultCheckedKeys)||{}:a&&(o=zX(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),o){let{checkedKeys:t=[],halfCheckedKeys:n=[]}=o;if(!e.checkStrictly){let e=xB(t,!0,s);({checkedKeys:t,halfCheckedKeys:n}=e)}r.checkedKeys=t,r.halfCheckedKeys=n}}return i(`loadedKeys`)&&(r.loadedKeys=e.loadedKeys),r}onNodeDragStart=(e,t)=>{let{expandedKeys:n,keyEntities:r}=this.state,{onDragStart:i}=this.props,{eventKey:a}=t;this.dragNodeProps=t,this.dragStartMousePosition={x:e.clientX,y:e.clientY};let o=jX(n,a);this.setState({draggingNodeKey:a,dragChildrenKeys:PX(a,r),indent:this.listRef.current.getIndentWidth()}),this.setExpandedKeys(o),window.addEventListener(`dragend`,this.onWindowDragEnd),i?.({event:e,node:pB(t)})};onNodeDragEnter=(e,t)=>{let{expandedKeys:n,keyEntities:r,dragChildrenKeys:i,flattenNodes:a,indent:o}=this.state,{onDragEnter:s,onExpand:c,allowDrop:l,direction:u}=this.props,{pos:d,eventKey:f}=t;if(this.currentMouseOverDroppableNodeKey!==f&&(this.currentMouseOverDroppableNodeKey=f),!this.dragNodeProps){this.resetDragState();return}let{dropPosition:p,dropLevelOffset:m,dropTargetKey:h,dropContainerKey:g,dropTargetPos:_,dropAllowed:v,dragOverNodeKey:y}=LX(e,this.dragNodeProps,t,o,this.dragStartMousePosition,l,a,r,n,u);if(i.includes(h)||!v){this.resetDragState();return}if(this.delayedDragEnterLogic||={},Object.keys(this.delayedDragEnterLogic).forEach(e=>{clearTimeout(this.delayedDragEnterLogic[e])}),this.dragNodeProps.eventKey!==t.eventKey&&(e.persist(),this.delayedDragEnterLogic[d]=window.setTimeout(()=>{if(this.state.draggingNodeKey===null)return;let i=[...n],a=nB(r,t.eventKey);a&&(a.children||[]).length&&(i=MX(n,t.eventKey)),this.props.hasOwnProperty(`expandedKeys`)||this.setExpandedKeys(i),c?.(i,{node:pB(t),expanded:!0,nativeEvent:e.nativeEvent})},800)),this.dragNodeProps.eventKey===h&&m===0){this.resetDragState();return}this.setState({dragOverNodeKey:y,dropPosition:p,dropLevelOffset:m,dropTargetKey:h,dropContainerKey:g,dropTargetPos:_,dropAllowed:v}),s?.({event:e,node:pB(t),expandedKeys:n})};onNodeDragOver=(e,t)=>{let{dragChildrenKeys:n,flattenNodes:r,keyEntities:i,expandedKeys:a,indent:o}=this.state,{onDragOver:s,allowDrop:c,direction:l}=this.props;if(!this.dragNodeProps)return;let{dropPosition:u,dropLevelOffset:d,dropTargetKey:f,dropContainerKey:p,dropTargetPos:m,dropAllowed:h,dragOverNodeKey:g}=LX(e,this.dragNodeProps,t,o,this.dragStartMousePosition,c,r,i,a,l);n.includes(f)||!h||(this.dragNodeProps.eventKey===f&&d===0?this.state.dropPosition===null&&this.state.dropLevelOffset===null&&this.state.dropTargetKey===null&&this.state.dropContainerKey===null&&this.state.dropTargetPos===null&&this.state.dropAllowed===!1&&this.state.dragOverNodeKey===null||this.resetDragState():u===this.state.dropPosition&&d===this.state.dropLevelOffset&&f===this.state.dropTargetKey&&p===this.state.dropContainerKey&&m===this.state.dropTargetPos&&h===this.state.dropAllowed&&g===this.state.dragOverNodeKey||this.setState({dropPosition:u,dropLevelOffset:d,dropTargetKey:f,dropContainerKey:p,dropTargetPos:m,dropAllowed:h,dragOverNodeKey:g}),s?.({event:e,node:pB(t)}))};onNodeDragLeave=(e,t)=>{this.currentMouseOverDroppableNodeKey===t.eventKey&&!e.currentTarget.contains(e.relatedTarget)&&(this.resetDragState(),this.currentMouseOverDroppableNodeKey=null);let{onDragLeave:n}=this.props;n?.({event:e,node:pB(t)})};onWindowDragEnd=e=>{this.onNodeDragEnd(e,null,!0),window.removeEventListener(`dragend`,this.onWindowDragEnd)};onNodeDragEnd=(e,t)=>{let{onDragEnd:n}=this.props;this.setState({dragOverNodeKey:null}),this.cleanDragState(),n?.({event:e,node:pB(t)}),this.dragNodeProps=null,window.removeEventListener(`dragend`,this.onWindowDragEnd)};onNodeDrop=(e,t,n=!1)=>{let{dragChildrenKeys:r,dropPosition:i,dropTargetKey:a,dropTargetPos:o,dropAllowed:s}=this.state;if(!s)return;let{onDrop:c}=this.props;if(this.setState({dragOverNodeKey:null}),this.cleanDragState(),a===null)return;let l={...fB(a,this.getTreeNodeRequiredProps()),active:this.getActiveItem()?.key===a,data:nB(this.state.keyEntities,a).node};li(!r.includes(a),`Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.`);let u=NX(o),d={event:e,node:pB(l),dragNode:this.dragNodeProps?pB(this.dragNodeProps):null,dragNodesKeys:[this.dragNodeProps.eventKey].concat(r),dropToGap:i!==0,dropPosition:i+Number(u[u.length-1])};n||c?.(d),this.dragNodeProps=null};resetDragState(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}cleanDragState=()=>{let{draggingNodeKey:e}=this.state;e!==null&&this.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),this.dragStartMousePosition=null,this.currentMouseOverDroppableNodeKey=null};triggerExpandActionExpand=(e,t)=>{let{expandedKeys:n,flattenNodes:r}=this.state,{expanded:i,key:a,isLeaf:o}=t;if(o||e.shiftKey||e.metaKey||e.ctrlKey)return;let s=r.filter(e=>e.key===a)[0],c=pB({...fB(a,this.getTreeNodeRequiredProps()),data:s.data});this.setExpandedKeys(i?jX(n,a):MX(n,a)),this.onNodeExpand(e,c)};onNodeClick=(e,t)=>{let{onClick:n,expandAction:r}=this.props;r===`click`&&this.triggerExpandActionExpand(e,t),n?.(e,t)};onNodeDoubleClick=(e,t)=>{let{onDoubleClick:n,expandAction:r}=this.props;r===`doubleClick`&&this.triggerExpandActionExpand(e,t),n?.(e,t)};onNodeSelect=(e,t)=>{let{selectedKeys:n}=this.state,{keyEntities:r,fieldNames:i}=this.state,{onSelect:a,multiple:o}=this.props,{selected:s}=t,c=t[i.key],l=!s;n=l?o?MX(n,c):[c]:jX(n,c);let u=n.map(e=>{let t=nB(r,e);return t?t.node:null}).filter(Boolean);this.setUncontrolledState({selectedKeys:n}),a?.(n,{event:`select`,selected:l,node:t,selectedNodes:u,nativeEvent:e.nativeEvent})};onNodeCheck=(e,t,n)=>{let{keyEntities:r,checkedKeys:i,halfCheckedKeys:a}=this.state,{checkStrictly:o,onCheck:s}=this.props,{key:c}=t,l,u={event:`check`,node:t,checked:n,nativeEvent:e.nativeEvent};if(o){let e=n?MX(i,c):jX(i,c);l={checked:e,halfChecked:jX(a,c)},u.checkedNodes=e.map(e=>nB(r,e)).filter(Boolean).map(e=>e.node),this.setUncontrolledState({checkedKeys:e})}else{let{checkedKeys:e,halfCheckedKeys:t}=xB([...i,c],!0,r);if(!n){let n=new Set(e);n.delete(c),{checkedKeys:e,halfCheckedKeys:t}=xB(Array.from(n),{checked:!1,halfCheckedKeys:t},r)}l=e,u.checkedNodes=[],u.checkedNodesPositions=[],u.halfCheckedKeys=t,e.forEach(e=>{let t=nB(r,e);if(!t)return;let{node:n,pos:i}=t;u.checkedNodes.push(n),u.checkedNodesPositions.push({node:n,pos:i})}),this.setUncontrolledState({checkedKeys:e},!1,{halfCheckedKeys:t})}s?.(l,u)};onNodeLoad=e=>{let{key:t}=e,{keyEntities:n}=this.state;if(nB(n,t)?.children?.length)return;let r=new Promise((n,r)=>{this.setState(({loadedKeys:i=[],loadingKeys:a=[]})=>{let{loadData:o,onLoad:s}=this.props;return!o||i.includes(t)||a.includes(t)?null:(o(e).then(()=>{let{loadedKeys:r}=this.state,i=MX(r,t);s?.(i,{event:`load`,node:e}),this.setUncontrolledState({loadedKeys:i}),this.setState(e=>({loadingKeys:jX(e.loadingKeys,t)})),n()}).catch(e=>{if(this.setState(e=>({loadingKeys:jX(e.loadingKeys,t)})),this.loadingRetryTimes[t]=(this.loadingRetryTimes[t]||0)+1,this.loadingRetryTimes[t]>=vZ){let{loadedKeys:e}=this.state;li(!1,"Retry for `loadData` many times but still failed. No more retry."),this.setUncontrolledState({loadedKeys:MX(e,t)}),n()}r(e)}),{loadingKeys:MX(a,t)})})});return r.catch(()=>{}),r};onNodeMouseEnter=(e,t)=>{let{onMouseEnter:n}=this.props;n?.({event:e,node:t})};onNodeMouseLeave=(e,t)=>{let{onMouseLeave:n}=this.props;n?.({event:e,node:t})};onNodeContextMenu=(e,t)=>{let{onRightClick:n}=this.props;n&&(e.preventDefault(),n({event:e,node:t}))};onMouseDown=e=>{this.focusedByMouse=!0;let{onMouseDown:t}=this.props;t?.(e)};onMouseUp=e=>{this.focusedByMouse=!1;let{onMouseUp:t}=this.props;t?.(e)};onFocus=(...e)=>{let{onFocus:t,disabled:n}=this.props,{activeKey:r,selectedKeys:i,flattenNodes:a}=this.state;if(!this.focusedByMouse&&!n&&r===null){let e=i.find(e=>a.some(t=>t.key===e));e===void 0?this.onActiveChange(a?.[0]?.key||null):this.onActiveChange(e)}t?.(...e)};onBlur=(...e)=>{this.focusedByMouse=!1;let{onBlur:t}=this.props;this.onActiveChange(null),t?.(...e)};getTreeNodeRequiredProps=()=>{let{expandedKeys:e,selectedKeys:t,loadedKeys:n,loadingKeys:r,checkedKeys:i,halfCheckedKeys:a,dragOverNodeKey:o,dropPosition:s,keyEntities:c}=this.state;return{expandedKeys:e||[],selectedKeys:t||[],loadedKeys:n||[],loadingKeys:r||[],checkedKeys:i||[],halfCheckedKeys:a||[],dragOverNodeKey:o,dropPosition:s,keyEntities:c}};setExpandedKeys=e=>{let{treeData:t,fieldNames:n}=this.state,r=cB(t,e,n);this.setUncontrolledState({expandedKeys:e,flattenNodes:r},!0)};onNodeExpand=(e,t)=>{let{expandedKeys:n}=this.state,{listChanging:r,fieldNames:i}=this.state,{onExpand:a,loadData:o}=this.props,{expanded:s}=t,c=t[i.key];if(r)return;let l=n.includes(c),u=!s;if(li(s&&l||!s&&!l,`Expand state not sync with index check`),n=u?MX(n,c):jX(n,c),this.setExpandedKeys(n),a?.(n,{node:t,expanded:u,nativeEvent:e.nativeEvent}),u&&o){let e=this.onNodeLoad(t);e&&e.then(()=>{let e=cB(this.state.treeData,n,i);this.setUncontrolledState({flattenNodes:e})}).catch(()=>{let{expandedKeys:e}=this.state,t=jX(e,c);this.setExpandedKeys(t)})}};onListChangeStart=()=>{this.setUncontrolledState({listChanging:!0})};onListChangeEnd=()=>{setTimeout(()=>{this.setUncontrolledState({listChanging:!1})})};onActiveChange=e=>{let{activeKey:t}=this.state,{onActiveChange:n,itemScrollOffset:r=0}=this.props;t!==e&&(this.setState({activeKey:e}),e!==null&&this.scrollTo({key:e,offset:r}),n?.(e))};getActiveItem=()=>{let{activeKey:e,flattenNodes:t}=this.state;return e===null?null:t.find(({key:t})=>t===e)||null};offsetActiveKey=e=>{let{flattenNodes:t,activeKey:n}=this.state,r=t.findIndex(({key:e})=>e===n);r===-1&&e<0&&(r=t.length),r=(r+e+t.length)%t.length;let i=t[r];if(i){let{key:e}=i;this.onActiveChange(e)}else this.onActiveChange(null)};onKeyDown=e=>{let{activeKey:t,expandedKeys:n,checkedKeys:r,flattenNodes:i,keyEntities:a}=this.state,{onKeyDown:o,checkable:s,selectable:c,disabled:l,loadData:u}=this.props;if(l)return;switch(e.key){case`ArrowUp`:this.offsetActiveKey(-1),e.preventDefault();break;case`ArrowDown`:this.offsetActiveKey(1),e.preventDefault();break;case`Home`:this.onActiveChange(i?.[0]?.key),e.preventDefault();break;case`End`:this.onActiveChange(i?.[i.length-1]?.key),e.preventDefault();break}let d=this.getActiveItem();if(d&&d.data){let i=pB({...fB(t,this.getTreeNodeRequiredProps()),data:d.data,active:!0}),o=!!nB(a,t)?.children?.length,l=!dB(d.data.isLeaf,u,o,i.loaded),f=s&&!i.disabled&&i.checkable!==!1&&!i.disableCheckbox,p=!s&&c&&!i.disabled&&i.selectable!==!1;switch(e.key){case`ArrowLeft`:l&&n.includes(t)?this.onNodeExpand({},i):d.parent&&this.onActiveChange(d.parent.key),e.preventDefault();break;case`ArrowRight`:l&&!n.includes(t)?this.onNodeExpand({},i):d.children&&d.children.length&&this.onActiveChange(d.children[0].key),e.preventDefault();break;case`Enter`:l?(e.preventDefault(),this.onNodeExpand({},i)):f?r.includes(t)||(e.preventDefault(),this.onNodeCheck({},i,!0)):p&&!i.selected&&(e.preventDefault(),this.onNodeSelect({},i));break;case` `:f?(e.preventDefault(),this.onNodeCheck({},i,!r.includes(t))):p&&(e.preventDefault(),this.onNodeSelect({},i));break}}o?.(e)};setUncontrolledState=(e,t=!1,n=null)=>{if(!this.destroyed){let r=!1,i=!0,a={};Object.keys(e).forEach(t=>{if(this.props.hasOwnProperty(t)){i=!1;return}r=!0,a[t]=e[t]}),r&&(!t||i)&&this.setState({...a,...n})}};scrollTo=e=>{this.listRef.current.scrollTo(e)};render(){let{flattenNodes:e,keyEntities:t,draggingNodeKey:n,dropLevelOffset:r,dropContainerKey:i,dropTargetKey:a,dropPosition:o,dragOverNodeKey:s,indent:c}=this.state,{prefixCls:l,className:u,style:d,styles:f,classNames:p,showLine:m,focusable:h,tabIndex:g=0,selectable:_,showIcon:v,icon:y,switcherIcon:b,draggable:x,checkable:C,checkStrictly:w,disabled:T,motion:E,loadData:D,filterTreeNode:O,height:k,itemHeight:A,scrollWidth:j,virtual:M,titleRender:N,dropIndicatorRender:P,onContextMenu:F,onScroll:I,direction:L,rootClassName:R,rootStyle:z}=this.props,B=bi(this.props,{aria:!0,data:!0}),V;x&&(V=typeof x==`object`?x:typeof x==`function`?{nodeDraggable:x}:{});let H={styles:f,classNames:p,prefixCls:l,selectable:_,showIcon:v,icon:y,switcherIcon:b,draggable:V,draggingNodeKey:n,checkable:C,checkStrictly:w,disabled:T,keyEntities:t,dropLevelOffset:r,dropContainerKey:i,dropTargetKey:a,dropPosition:o,dragOverNodeKey:s,indent:c,direction:L,dropIndicatorRender:P,loadData:D,filterTreeNode:O,titleRender:N,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return S.createElement(CX.Provider,{value:H},S.createElement(`div`,{className:Y(l,u,R,{[`${l}-show-line`]:m}),style:z},S.createElement(gZ,_Z({ref:this.listRef,prefixCls:l,style:d,data:e,disabled:T,selectable:_,checkable:!!C,motion:E,dragging:n!==null,height:k,itemHeight:A,virtual:M,focusable:h,tabIndex:g,activeItem:this.getActiveItem(),onFocus:this.onFocus,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:F,onScroll:I,scrollWidth:j},this.getTreeNodeRequiredProps(),B))))}},bZ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z`}}]},name:`file`,theme:`outlined`}}))());function xZ(){return xZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,xZ({},e,{ref:t,icon:bZ.default}))),CZ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z`}}]},name:`folder-open`,theme:`outlined`}}))());function wZ(){return wZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,wZ({},e,{ref:t,icon:CZ.default}))),EZ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z`}}]},name:`folder`,theme:`outlined`}}))());function DZ(){return DZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,DZ({},e,{ref:t,icon:EZ.default}))),kZ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z`}}]},name:`holder`,theme:`outlined`}}))());function AZ(){return AZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,AZ({},e,{ref:t,icon:kZ.default}))),MZ=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:n,directoryNodeSelectedColor:r,motionDurationMid:i,borderRadius:a,controlItemBgHover:o})=>({[`${e}${e}-directory ${t}`]:{[`${e}-node-content-wrapper`]:{position:`static`,[`&:has(${e}-drop-indicator)`]:{position:`relative`},[`> *:not(${e}-drop-indicator)`]:{position:`relative`},"&:hover":{background:`transparent`},"&:before":{position:`absolute`,inset:0,transition:`background-color ${i}`,content:`""`,borderRadius:a},"&:hover:before":{background:o}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:n,borderRadius:a,[`${e}-switcher, ${e}-draggable-icon`]:{color:r},[`${e}-node-content-wrapper`]:{color:r,background:`transparent`,"&, &:hover":{color:r},"&:before, &:hover:before":{background:n}}}}}),NZ=new As(`ant-tree-node-fx-do-not-use`,{"0%":{opacity:0},"100%":{opacity:1}}),PZ=(e,t)=>({[`.${e}-switcher-icon`]:{display:`inline-block`,fontSize:10,verticalAlign:`baseline`,svg:{transition:`transform ${t.motionDurationSlow}`}}}),FZ=(e,t)=>({[`.${e}-drop-indicator`]:{position:`absolute`,zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:`none`,"&:after":{position:`absolute`,top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:`transparent`,border:`${X(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:`50%`,content:`""`}}}),IZ=(e,t)=>{let{treeCls:n,treeNodeCls:r,treeNodePadding:i,titleHeight:a,indentSize:o,switcherSize:s,motionDurationMid:c,nodeSelectedBg:l,nodeHoverBg:u,colorTextQuaternary:d,controlItemBgActiveDisabled:f}=t;return{[n]:{...Vl(t),"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:`rtl`},[`&${n}-rtl ${n}-switcher_close ${n}-switcher-icon svg`]:{transform:`rotate(90deg)`},[`${n}-list`]:{"&:focus-visible":{outline:`none`,[`${r}-active ${n}-node-content-wrapper`]:{...Wl(t)}}},[`${n}-list-holder-inner`]:{alignItems:`flex-start`},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:`stretch`,[`${n}-node-content-wrapper`]:{flex:`auto`},[`${r}.dragging:after`]:{position:`absolute`,inset:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:NZ,animationDuration:t.motionDurationSlow,animationPlayState:`running`,animationFillMode:`forwards`,content:`""`,pointerEvents:`none`,borderRadius:t.borderRadius}}},[r]:{display:`flex`,alignItems:`flex-start`,marginBottom:i,lineHeight:X(a),position:`relative`,"&:before":{content:`""`,position:`absolute`,zIndex:1,insetInlineStart:0,width:`100%`,top:`100%`,height:i},[`&-disabled ${n}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:`not-allowed`,"&:hover":{background:`transparent`}},[`${n}-checkbox-disabled + ${n}-node-selected,&${r}-disabled${r}-selected ${n}-node-content-wrapper`]:{backgroundColor:f},[`${n}-checkbox-disabled`]:{pointerEvents:`unset`},[`&:not(${r}-disabled)`]:{[`${n}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${n}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${r}-disabled).filter-node ${n}-title`]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:`grab`,[`${n}-draggable-icon`]:{flexShrink:0,width:s,textAlign:`center`,visibility:`visible`,color:d},[`&${r}-disabled ${n}-draggable-icon`]:{visibility:`hidden`}}},[`${n}-indent`]:{alignSelf:`stretch`,whiteSpace:`nowrap`,userSelect:`none`,"&-unit":{display:`inline-block`,width:o}},[`${n}-draggable-icon`]:{visibility:`hidden`},[`${n}-switcher, ${n}-checkbox`]:{marginInlineEnd:t.calc(t.calc(s).sub(t.controlInteractiveSize)).div(2).equal()},[`${n}-checkbox`]:{flexShrink:0,alignSelf:`flex-start`,marginBlockStart:t.calc(t.calc(a).sub(t.controlInteractiveSize)).div(2).equal()},[`${n}-switcher`]:{...PZ(e,t),position:`relative`,flex:`none`,alignSelf:`stretch`,width:s,textAlign:`center`,cursor:`pointer`,userSelect:`none`,transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:`unset`},"&:before":{pointerEvents:`none`,content:`""`,width:s,height:a,position:`absolute`,left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${n}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${n}-switcher-icon svg`]:{transform:`rotate(-90deg)`},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:`relative`,zIndex:1,display:`inline-block`,width:`100%`,height:`100%`,"&:before":{position:`absolute`,top:0,insetInlineEnd:t.calc(s).div(2).equal(),bottom:t.calc(i).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:`""`},"&:after":{position:`absolute`,width:t.calc(t.calc(s).div(2).equal()).mul(.8).equal(),height:t.calc(a).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:`""`}}},[`${n}-node-content-wrapper`]:{position:`relative`,minHeight:a,paddingBlock:0,paddingInline:t.paddingXS,background:`transparent`,borderRadius:t.borderRadius,cursor:`pointer`,transition:[`all ${c}`,`border 0s`,`line-height 0s`,`box-shadow 0s`].join(`, `),...FZ(e,t),"&:hover":{backgroundColor:u},[`&${n}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:l},[`${n}-iconEle`]:{display:`inline-block`,width:s,height:a,textAlign:`center`,verticalAlign:`top`,"&:empty":{display:`none`}}},[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:`transparent`},[`${r}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${t.colorPrimary}`},"&-show-line":{[`${n}-indent-unit`]:{position:`relative`,height:`100%`,"&:before":{position:`absolute`,top:0,insetInlineEnd:t.calc(s).div(2).equal(),bottom:t.calc(i).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:`""`},"&-end:before":{display:`none`}},[`${n}-switcher`]:{background:`transparent`,"&-line-icon":{verticalAlign:`-0.15em`}}},[`${r}-leaf-last ${n}-switcher-leaf-line:before`]:{top:`auto !important`,bottom:`auto !important`,height:`${X(t.calc(a).div(2).equal())} !important`}}}},LZ=(e,t,n=!0)=>{let r=`.${e}`,i=lc(t,{treeCls:r,treeNodeCls:`${r}-treenode`,treeNodePadding:t.calc(t.paddingXS).div(2).equal()});return[IZ(e,i),n&&MZ(i)].filter(Boolean)},RZ=e=>{let{controlHeightSM:t,controlItemBgHover:n,controlItemBgActive:r}=e,i=t;return{titleHeight:i,switcherSize:i,indentSize:i,nodeHoverBg:n,nodeHoverColor:e.colorText,nodeSelectedBg:r,nodeSelectedColor:e.colorText}},zZ=Xl(`Tree`,(e,{prefixCls:t})=>[{[e.componentCls]:KB(`${t}-checkbox`,e)},LZ(t,e),Jh(e)],e=>{let{colorTextLightSolid:t,colorPrimary:n}=e;return{...RZ(e),directoryNodeSelectedColor:t,directoryNodeSelectedBg:n}}),BZ=e=>{let{dropPosition:t,dropLevelOffset:n,prefixCls:r,indent:i,direction:a=`ltr`}=e,o=a===`ltr`?`left`:`right`,s=a===`ltr`?`right`:`left`,c={[o]:-n*i+4,[s]:0};switch(t){case-1:c.top=-3;break;case 1:c.bottom=-3;break;default:c.bottom=-3,c[o]=i+4;break}return S.createElement(`div`,{style:c,className:`${r}-drop-indicator`})},VZ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z`}}]},name:`caret-down`,theme:`filled`}}))());function HZ(){return HZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,HZ({},e,{ref:t,icon:VZ.default}))),WZ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}},{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`minus-square`,theme:`outlined`}}))());function GZ(){return GZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,GZ({},e,{ref:t,icon:WZ.default}))),qZ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}},{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`plus-square`,theme:`outlined`}}))());function JZ(){return JZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,JZ({},e,{ref:t,icon:qZ.default}))),XZ=e=>{let{prefixCls:t,switcherIcon:n,treeNodeProps:r,showLine:i,switcherLoadingIcon:a}=e,{isLeaf:o,expanded:s,loading:c}=r;if(c)return S.isValidElement(a)?a:S.createElement(Xm,{className:`${t}-switcher-loading-icon`});let l;if(ef(i)&&(l=i.showLeafIcon),o){if(!i)return null;if(typeof l!=`boolean`&&l){let e=typeof l==`function`?l(r):l,n=`${t}-switcher-line-custom-icon`;return S.isValidElement(e)?cm(e,{className:Y(e.props?.className,n)}):e}return l?S.createElement(SZ,{className:`${t}-switcher-line-icon`}):S.createElement(`span`,{className:`${t}-switcher-leaf-line`})}let u=`${t}-switcher-icon`,d=typeof n==`function`?n(r):n;return S.isValidElement(d)?cm(d,{className:Y(d.props?.className,i?`${t}-switcher-line-icon`:u)}):d===void 0?i?s?S.createElement(KZ,{className:`${t}-switcher-line-icon`}):S.createElement(YZ,{className:`${t}-switcher-line-icon`}):S.createElement(UZ,{className:u}):d},ZZ=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,className:i,style:a,classNames:o,styles:s}=_a(`tree`),{virtual:c}=S.useContext(ma),{prefixCls:l,className:u,showIcon:d=!1,showLine:f,switcherIcon:p,switcherLoadingIcon:m,blockNode:h=!1,children:g,checkable:_=!1,selectable:v=!0,draggable:y,disabled:b,motion:x,style:C,rootClassName:w,classNames:T,styles:E,icon:D}=e,O=S.useContext(pm),k=b??O,A=n(`tree`,l),j=n(),M=x??{..._h(j),motionAppear:!1},N={...e,showIcon:d,blockNode:h,checkable:_,selectable:v,disabled:k,motion:M},[P,F]=xf([o,T],[s,E],{props:N}),I={...N,showLine:!!f,icon:D,dropIndicatorRender:BZ},[L,R]=zZ(A),[,z]=zl(),B=z.paddingXS/2+(z.Tree?.titleHeight||z.controlHeightSM),V=S.useMemo(()=>{if(!y)return!1;let e={};switch(typeof y){case`function`:e.nodeDraggable=y;break;case`object`:e={...y};break;default:break}return e.icon!==!1&&(e.icon=e.icon||S.createElement(jZ,null)),e},[y]),H=e=>S.createElement(XZ,{prefixCls:A,switcherIcon:p,switcherLoadingIcon:m,treeNodeProps:e,showLine:f});return S.createElement(yZ,{itemHeight:B,ref:t,virtual:c,...I,prefixCls:A,className:Y({[`${A}-icon-hide`]:!d,[`${A}-block-node`]:h,[`${A}-unselectable`]:!v,[`${A}-rtl`]:r===`rtl`,[`${A}-disabled`]:k},i,u,L,R),style:{...a,...C},rootClassName:Y(P.root,w),rootStyle:F.root,classNames:P,styles:F,direction:r,checkable:_&&S.createElement(`span`,{className:`${A}-checkbox-inner`}),selectable:v,switcherIcon:H,draggable:V},g)}),QZ=0,$Z=1,eQ=2;function tQ(e,t,n){let{key:r,children:i}=n;function a(e){let a=e[r],o=e[i];t(a,e)!==!1&&tQ(o||[],t,n)}e.forEach(a)}function nQ({treeData:e,expandedKeys:t,startKey:n,endKey:r,fieldNames:i}){let a=[],o=QZ;if(n&&n===r)return[n];if(!n||!r)return[];function s(e){return e===n||e===r}return tQ(e,e=>{if(o===eQ)return!1;if(s(e)){if(a.push(e),o===QZ)o=$Z;else if(o===$Z)return o=eQ,!1}else o===$Z&&a.push(e);return t.includes(e)},oB(i)),a}function rQ(e,t,n){let r=da(t),i=[];return tQ(e,(e,t)=>{let n=r.indexOf(e);return n!==-1&&(i.push(t),r.splice(n,1)),!!r.length},oB(n)),i}function iQ(e){let{isLeaf:t,expanded:n}=e;return t?S.createElement(SZ,null):n?S.createElement(TZ,null):S.createElement(OZ,null)}function aQ({treeData:e,children:t}){return e||sB(t)}var oQ=S.forwardRef((e,t)=>{let{defaultExpandAll:n,defaultExpandParent:r,defaultExpandedKeys:i,...a}=e,o=S.useRef(null),s=S.useRef(null),c=()=>{let{keyEntities:e}=uB(aQ(a),{fieldNames:a.fieldNames}),t,o=a.expandedKeys||i||[];return t=n?Object.keys(e):r?BX(o,e):o,t},[l,u]=S.useState(a.selectedKeys||a.defaultSelectedKeys||[]),[d,f]=S.useState(()=>c());S.useEffect(()=>{`selectedKeys`in a&&u(a.selectedKeys)},[a.selectedKeys]),S.useEffect(()=>{`expandedKeys`in a&&f(a.expandedKeys)},[a.expandedKeys]);let p=(e,t)=>(`expandedKeys`in a||f(e),a.onExpand?.(e,t)),m=(e,t)=>{let{multiple:n,fieldNames:r}=a,{node:i,nativeEvent:c}=t,{key:l=``}=i,f=aQ(a),p={...t,selected:!0},m=c?.ctrlKey||c?.metaKey,h=c?.shiftKey,g;n&&m?(g=e,o.current=l,s.current=g,p.selectedNodes=rQ(f,g,r)):n&&h?(g=Array.from(new Set([].concat(da(s.current||[]),da(nQ({treeData:f,expandedKeys:d,startKey:l,endKey:o.current,fieldNames:r}))))),p.selectedNodes=rQ(f,g,r)):(g=[l],o.current=l,s.current=g,p.selectedNodes=rQ(f,g,r)),a.onSelect?.(g,p),`selectedKeys`in a||u(g)},{getPrefixCls:h,direction:g}=S.useContext(ma),{prefixCls:_,className:v,showIcon:y=!0,expandAction:b=`click`,...x}=a,C=h(`tree`,_),w=Y(`${C}-directory`,{[`${C}-directory-rtl`]:g===`rtl`},v);return S.createElement(ZZ,{icon:iQ,ref:t,blockNode:!0,...x,showIcon:y,expandAction:b,prefixCls:C,className:w,expandedKeys:d,selectedKeys:l,onSelect:m,onExpand:p})}),sQ=ZZ;sQ.DirectoryTree=oQ,sQ.TreeNode=AX;var cQ=e=>{let{value:t,filterSearch:n,tablePrefixCls:r,locale:i,onChange:a}=e;return n?S.createElement(`div`,{className:`${r}-filter-dropdown-search`},S.createElement(MV,{prefix:S.createElement(aw,null),placeholder:i.filterSearchPlaceholder,onChange:a,value:t,htmlSize:1,className:`${r}-filter-dropdown-search-input`})):null},lQ=e=>{let{keyCode:t}=e;t===Zr.ENTER&&e.stopPropagation()},uQ=S.forwardRef((e,t)=>S.createElement(`div`,{className:e.className,onClick:e=>e.stopPropagation(),onKeyDown:lQ,ref:t},e.children));function dQ(e){let t=[];return(e||[]).forEach(({value:e,children:n})=>{t.push(e),n&&(t=[].concat(da(t),da(dQ(n))))}),t}function fQ(e){return e.some(({children:e})=>e)}var pQ=(e,t)=>typeof t==`string`||Qd(t)?t.toString().toLowerCase().includes(e):!1,mQ=e=>{let{filters:t,prefixCls:n,filteredKeys:r,filterMultiple:i,searchValue:a,normalizedSearchValue:o,filterSearch:s}=e;return t.map((e,t)=>{let c=String(e.value);if(e.children)return{key:c||t,label:e.text,popupClassName:`${n}-dropdown-submenu`,children:mQ({filters:e.children,prefixCls:n,filteredKeys:r,filterMultiple:i,searchValue:a,normalizedSearchValue:o,filterSearch:s})};let l=i?lV:RL,u={key:e.value===void 0?t:c,label:S.createElement(S.Fragment,null,S.createElement(l,{checked:r.includes(c)}),S.createElement(`span`,null,e.text))};return o?typeof s==`function`?s(o,e)?u:null:pQ(o,e.text)?u:null:u})};function hQ(e){return e||[]}var gQ=e=>{let{tablePrefixCls:t,prefixCls:n,column:r,dropdownPrefixCls:i,columnKey:a,filterOnClose:o,filterMultiple:s,filterMode:c=`menu`,filterSearch:l=!1,filterState:u,triggerFilter:d,locale:f,children:p,getPopupContainer:m,rootClassName:h}=e,{filterResetToDefaultFilteredValue:g,defaultFilteredValue:_,filterDropdownProps:v={},filterDropdownOpen:y,onFilterDropdownOpenChange:b}=r,[x,C]=S.useState(!1),w=S.useContext(Hw),T=!!(u&&(u.filteredKeys?.length||u.forceFiltered)),E=e=>{C(e),v.onOpenChange?.(e),b?.(e)},D=v.open??y??x,O=u?.filteredKeys,[k,A]=Of(hQ(O)),j=({selectedKeys:e})=>{A(e)},M=(e,{node:t,checked:n})=>{j(s?{selectedKeys:e}:{selectedKeys:n&&t.key?[t.key]:[]})};S.useEffect(()=>{x&&j({selectedKeys:hQ(O)})},[O]);let[N,P]=S.useState([]),F=e=>{P(e)},[I,L]=S.useState(``),R=S.useMemo(()=>I.trim().toLowerCase(),[I]),z=e=>{let{value:t}=e.target;L(t)};S.useEffect(()=>{x||L(``)},[x]);let B=e=>{let t=e?.length?e:null;if(t===null&&(!u||!u.filteredKeys)||di(t,u?.filteredKeys,!0))return null;d({column:r,key:a,filteredKeys:t})},V=()=>{E(!1),B(k())},H=({confirm:e,closeDropdown:t}={confirm:!1,closeDropdown:!1})=>{e&&B([]),t&&E(!1),L(``),A(g?(_||[]).map(String):[])},U=({closeDropdown:e}={closeDropdown:!0})=>{e&&E(!1),B(k())},ee=(e,t)=>{t.source===`trigger`&&(e&&O!==void 0&&A(hQ(O)),E(e),!e&&!r.filterDropdown&&o&&V())},te=Y({[`${i}-menu-without-submenu`]:!fQ(r.filters||[])}),ne=e=>{e.target.checked?A(dQ(r?.filters).map(String)):A([])},W=({filters:e})=>(e||[]).map((e,t)=>{let n=String(e.value),r={title:e.text,key:e.value===void 0?String(t):n};return e.children&&(r.children=W({filters:e.children})),r}),re=e=>({...e,text:e.title,value:e.key,children:e.children?.map(re)||[]}),G,{direction:K,renderEmpty:q}=S.useContext(ma);if(typeof r.filterDropdown==`function`)G=r.filterDropdown({prefixCls:`${i}-custom`,setSelectedKeys:e=>j({selectedKeys:e}),selectedKeys:k(),confirm:U,clearFilters:H,filters:r.filters,visible:D,close:()=>{E(!1)}});else if(r.filterDropdown)G=r.filterDropdown;else{let e=k()||[];G=S.createElement(S.Fragment,null,(()=>{let a=q?.(`Table.filter`)??S.createElement(PC,{image:PC.PRESENTED_IMAGE_SIMPLE,description:f.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:`16px 0`}});if((r.filters||[]).length===0)return a;if(c===`tree`)return S.createElement(S.Fragment,null,S.createElement(cQ,{filterSearch:l,value:I,onChange:z,tablePrefixCls:t,locale:f}),S.createElement(`div`,{className:`${t}-filter-dropdown-tree`},s?S.createElement(lV,{checked:e.length===dQ(r.filters).length,indeterminate:e.length>0&&e.lengthtypeof l==`function`?l(I,re(e)):pQ(R,e.title):void 0})));let o=mQ({filters:r.filters||[],filterSearch:l,prefixCls:n,filteredKeys:k(),filterMultiple:s,searchValue:I,normalizedSearchValue:R}),u=o.every(e=>e===null);return S.createElement(S.Fragment,null,S.createElement(cQ,{filterSearch:l,value:I,onChange:z,tablePrefixCls:t,locale:f}),u?a:S.createElement(mD,{selectable:!0,multiple:s,prefixCls:`${i}-menu`,className:te,onSelect:j,onDeselect:j,selectedKeys:e,getPopupContainer:m,openKeys:N,onOpenChange:F,items:o}))})(),S.createElement(`div`,{className:`${n}-dropdown-btns`},S.createElement(E_,{type:`link`,size:`small`,disabled:g?di((_||[]).map(String),e,!0):e.length===0,onClick:()=>H()},f.filterReset),S.createElement(E_,{type:`primary`,size:`small`,onClick:V},f.filterConfirm)))}r.filterDropdown&&(G=S.createElement(QE,{selectable:void 0},G)),G=S.createElement(uQ,{className:`${n}-dropdown`},G);let ie=(()=>{let e;return e=typeof r.filterIcon==`function`?r.filterIcon(T):r.filterIcon?r.filterIcon:S.createElement(nZ,null),S.createElement(`span`,{role:`button`,tabIndex:-1,className:Y(`${n}-trigger`,{active:T}),onClick:e=>{e.stopPropagation()}},e)})();if(w)return S.createElement(`div`,{className:`${n}-column`},S.createElement(`span`,{className:`${t}-column-title`},p),ie);let J=Xd({trigger:[`click`],placement:K===`rtl`?`bottomLeft`:`bottomRight`,children:ie,getPopupContainer:m},{...v,rootClassName:Y(h,v.rootClassName),open:D,onOpenChange:ee,popupRender:()=>typeof v?.dropdownRender==`function`?v.dropdownRender(G):G});return S.createElement(`div`,{className:`${n}-column`},S.createElement(`span`,{className:`${t}-column-title`},p),S.createElement(NU,{...J}))},_Q=(e,t,n)=>{let r=[];return(e||[]).forEach((e,i)=>{let a=ZX(i,n),o=e.filterDropdown!==void 0;if(e.filters||o||`onFilter`in e)if(`filteredValue`in e){let t=e.filteredValue;o||(t=t?.map(String)??t),r.push({column:e,key:XX(e,a),filteredKeys:t,forceFiltered:e.filtered})}else r.push({column:e,key:XX(e,a),filteredKeys:t&&e.defaultFilteredValue?e.defaultFilteredValue:void 0,forceFiltered:e.filtered});`children`in e&&(r=[].concat(da(r),da(_Q(e.children,t,a))))}),r};function vQ(e,t,n,r,i,a,o,s,c){return n.map((n,l)=>{let u=ZX(l,s),{filterOnClose:d=!0,filterMultiple:f=!0,filterMode:p,filterSearch:m}=n,h=n;if(h.filters||h.filterDropdown){let s=XX(h,u),l=r.find(({key:e})=>s===e);h={...h,title:r=>S.createElement(gQ,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:h,columnKey:s,filterState:l,filterOnClose:d,filterMultiple:f,filterMode:p,filterSearch:m,triggerFilter:a,locale:i,getPopupContainer:o,rootClassName:c},QX(n.title,r))}}return`children`in h&&(h={...h,children:vQ(e,t,h.children,r,i,a,o,u,c)}),h})}var yQ=e=>{let t={};return e.forEach(({key:e,filteredKeys:n,column:r})=>{let i=e,{filters:a,filterDropdown:o}=r;o?t[i]=n||null:Array.isArray(n)?t[i]=dQ(a).filter(e=>n.includes(String(e))):t[i]=null}),t},bQ=(e,t,n)=>t.reduce((e,r)=>{let{column:{onFilter:i,filters:a},filteredKeys:o}=r;if(i&&o&&o.length){let r=dQ(a),s=new Map;r.forEach(e=>{let t=String(e);s.has(t)||s.set(t,e)});let c=o.map(e=>{let t=String(e);return s.get(t)??e});return(e=>e.reduce((e,r)=>{let a={...r};return a[n]&&(a[n]=bQ(a[n],t,n)),c.some(e=>i(e,a))&&e.push(a),e},[]))(e)}return e},e),xQ=e=>e.flatMap(e=>`children`in e?[e].concat(da(xQ(e.children||[]))):[e]),SQ=e=>{let{prefixCls:t,dropdownPrefixCls:n,mergedColumns:r,onFilterChange:i,getPopupContainer:a,locale:o,rootClassName:s}=e;Ui(`Table`);let c=S.useMemo(()=>xQ(r||[]),[r]),[l,u]=S.useState(()=>_Q(c,!0)),d=S.useMemo(()=>{let e=_Q(c,!1);if(e.length===0)return e;let t=!0;if(e.forEach(({filteredKeys:e})=>{e!==void 0&&(t=!1)}),t){let e=(c||[]).map((e,t)=>XX(e,ZX(t)));return l.filter(({key:t})=>e.includes(t)).map(t=>{let n=c[e.indexOf(t.key)];return{...t,column:{...t.column,...n},forceFiltered:n.filtered}})}return e},[c,l]),f=S.useMemo(()=>yQ(d),[d]),p=e=>{let t=d.filter(({key:t})=>t!==e.key);t.push(e),u(t),i(yQ(t),t)};return[e=>vQ(t,n,e,d,o,p,a,void 0,s),d,f]},CQ=(e,t,n)=>{let r=S.useRef({});function i(i){if(!r.current||r.current.data!==e||r.current.childrenColumnName!==t||r.current.getRowKey!==n){let i=new Map;function a(e){e.forEach((e,r)=>{let o=n(e,r);i.set(o,e),ef(e)&&t in e&&a(e[t]||[])})}a(e),r.current={data:e,childrenColumnName:t,kvMap:i,getRowKey:n}}return r.current.kvMap?.get(i)}return[i]};function wQ(e,t){let n={current:e.current,pageSize:e.pageSize},r=ef(t)?t:{};return Object.keys(r).forEach(t=>{let r=e[t];typeof r!=`function`&&(n[t]=r)}),n}function TQ(e,t,n){let{total:r=0,...i}=ef(n)?n:{},[a,o]=(0,S.useState)(()=>({current:`defaultCurrent`in i?i.defaultCurrent:1,pageSize:`defaultPageSize`in i?i.defaultPageSize:10})),s=Xd(a,i,{total:r>0?r:e}),c=Math.ceil((r||e)/s.pageSize);s.current>c&&(s.current=c||1);let l=(e,t)=>{o({current:e??1,pageSize:t||s.pageSize})},u=(e,r)=>{n&&n.onChange?.(e,r),l(e,r),t(e,r||s?.pageSize)};return n===!1?[{},()=>{}]:[{...s,onChange:u},l]}var EQ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z`}}]},name:`caret-down`,theme:`outlined`}}))());function DQ(){return DQ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,DQ({},e,{ref:t,icon:EQ.default}))),kQ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z`}}]},name:`caret-up`,theme:`outlined`}}))());function AQ(){return AQ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,AQ({},e,{ref:t,icon:kQ.default}))),MQ=`ascend`,NQ=`descend`,PQ=e=>e.sorter&&typeof e.sorter==`object`&&Qd(e.sorter.multiple)?e.sorter.multiple:!1,FQ=e=>typeof e==`function`?e:ef(e)&&e.compare?e.compare:!1,IQ=(e,t)=>t?e[e.indexOf(t)+1]:e[0],LQ=(e,t,n)=>{let r=[],i=(e,t)=>{r.push({column:e,key:XX(e,t),multiplePriority:PQ(e),sortOrder:e.sortOrder})};return(e||[]).forEach((e,a)=>{let o=ZX(a,n);e.children?(`sortOrder`in e&&i(e,o),r=[].concat(da(r),da(LQ(e.children,t,o)))):e.sorter&&(`sortOrder`in e?i(e,o):t&&e.defaultSortOrder&&r.push({column:e,key:XX(e,o),multiplePriority:PQ(e),sortOrder:e.defaultSortOrder}))}),r},RQ=(e,t,n,r,i,a,o,s,c)=>(t||[]).map((t,l)=>{let u=ZX(l,s),d=t;if(d.sorter){let s=d.sortDirections||i,l=d.showSorterTooltip===void 0?o:d.showSorterTooltip,f=XX(d,u),p=n.find(({key:e})=>e===f),m=p?p.sortOrder:null,h=IQ(s,m),g;if(t.sortIcon)g=t.sortIcon({sortOrder:m});else{let t=s.includes(MQ)&&S.createElement(jQ,{className:Y(`${e}-column-sorter-up`,{active:m===MQ})}),n=s.includes(NQ)&&S.createElement(OQ,{className:Y(`${e}-column-sorter-down`,{active:m===NQ})});g=S.createElement(`span`,{className:Y(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(t&&n)})},S.createElement(`span`,{className:`${e}-column-sorter-inner`,"aria-hidden":`true`},t,n))}let{cancelSort:_,triggerAsc:v,triggerDesc:y}=a||{},b=_;h===NQ?b=y:h===MQ&&(b=v);let x=ef(l)?{title:b,...l}:{title:b};d={...d,className:Y(d.className,{[`${e}-column-sort`]:m}),title:n=>{let r=`${e}-column-sorters`,i=S.createElement(`span`,{className:`${e}-column-title`},QX(t.title,n)),a=S.createElement(`div`,{className:r},i,g);return l?typeof l!=`boolean`&&l?.target===`sorter-icon`?S.createElement(`div`,{className:Y(r,`${r}-tooltip-target-sorter`)},i,S.createElement(eT,{...x},g)):S.createElement(eT,{...x},a):a},onHeaderCell:n=>{let i=t.onHeaderCell?.(n)||{},a=i.onClick,o=i.onKeyDown;i.onClick=e=>{r({column:t,key:f,sortOrder:h,multiplePriority:PQ(t)}),a?.(e)},i.onKeyDown=e=>{e.keyCode===Zr.ENTER&&(r({column:t,key:f,sortOrder:h,multiplePriority:PQ(t)}),o?.(e))};let s=$X(t.title,{}),l=s?.toString();return m&&(i[`aria-sort`]=m===`ascend`?`ascending`:`descending`),i[`aria-description`]=c?.sortable,i[`aria-label`]=l||``,i.className=Y(i.className,`${e}-column-has-sorters`),i.tabIndex=0,t.ellipsis&&(i.title=(s??``).toString()),i}}}return`children`in d&&(d={...d,children:RQ(e,d.children,n,r,i,a,o,u,c)}),d}),zQ=e=>{let{column:t,sortOrder:n}=e;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}},BQ=e=>{let t=e.filter(({sortOrder:e})=>e).map(zQ);return t.length===0&&e.length?{...zQ(e[e.length-1]),column:void 0,order:void 0,field:void 0,columnKey:void 0}:t.length<=1?t[0]||{}:t},VQ=(e,t,n)=>{let r=t.slice().sort((e,t)=>t.multiplePriority-e.multiplePriority),i=e.slice(),a=r.filter(({column:{sorter:e},sortOrder:t})=>FQ(e)&&t);return a.length?i.sort((e,t)=>{for(let n=0;n{let r=e[n];return r?{...e,[n]:VQ(r,t,n)}:e}):i},HQ=e=>{let{prefixCls:t,mergedColumns:n,sortDirections:r,tableLocale:i,showSorterTooltip:a,onSorterChange:o,globalLocale:s}=e,[c,l]=S.useState(()=>LQ(n,!0)),u=(e,t)=>{let n=[];return e.forEach((e,r)=>{let i=ZX(r,t);if(n.push(XX(e,i)),Array.isArray(e.children)){let t=u(e.children,i);n.push.apply(n,da(t))}}),n},d=S.useMemo(()=>{let e=!0,t=LQ(n,!1);if(!t.length){let e=u(n);return c.filter(({key:t})=>e.includes(t))}let r=[];function i(t){e?r.push(t):r.push({...t,sortOrder:null})}let a=null;return t.forEach(t=>{a===null?(i(t),t.sortOrder&&(t.multiplePriority===!1?e=!1:a=!0)):(a&&t.multiplePriority!==!1||(e=!1),i(t))}),r},[n,c]),f=S.useMemo(()=>{let e=d.map(({column:e,sortOrder:t})=>({column:e,order:t}));return{sortColumns:e,sortColumn:e[0]?.column,sortOrder:e[0]?.order}},[d]),p=e=>{let t;t=e.multiplePriority===!1||!d.length||d[0].multiplePriority===!1?[e]:[].concat(da(d.filter(({key:t})=>t!==e.key)),[e]),l(t),o(BQ(t),t)};return[e=>RQ(t,e,d,p,r,i,a,void 0,s),d,f,()=>BQ(d)]},UQ=(e,t)=>e.map(e=>{let n={...e};return n.title=QX(e.title,t),`children`in n&&(n.children=UQ(n.children,t)),n}),WQ=e=>[S.useCallback(t=>UQ(t,e),[e])],GQ=sX((e,t)=>{let{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),KQ=bX((e,t)=>{let{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),qQ=e=>{let{componentCls:t,lineWidth:n,lineType:r,tableBorderColor:i,tableHeaderBg:a,tablePaddingVertical:o,tablePaddingHorizontal:s,calc:c}=e,l=`${X(n)} ${r} ${i}`,u=(e,r,i)=>({[`&${t}-${e}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"> table > tbody > tr > th, > table > tbody > tr > td":{[`> ${t}-expanded-row-fixed`]:{margin:`${X(c(r).mul(-1).equal())} + }`)}});function Kq(){return Kq=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:t,prefixCls:n,classNames:r={},styles:i={},steps:a,strokeWidth:o,railWidth:s,gapDegree:c=0,gapPosition:l,railColor:u,strokeLinecap:d,style:f,className:p,strokeColor:m,percent:h,loading:g,..._}={...zq,...e},v=Yn(t),y=`${v}-gradient`,b=50-o/2,x=Math.PI*2*b,C=c>0?90+c/2:-90,w=x*((360-c)/360),{count:T,gap:E}=typeof a==`object`?a:{count:a,gap:2},D=qq(h),O=qq(m),k=O.find(e=>e&&typeof e==`object`),A=k&&typeof k==`object`?`butt`:d,{indeterminateStyleProps:j,indeterminateStyleAnimation:M}=Gq({id:v,loading:g}),N=Wq(x,w,0,100,C,c,l,u,A,o),P=Bq(),F=()=>{let e=0;return D.map((t,a)=>{let s=O[a]||O[O.length-1],u=Wq(x,w,e,t,C,c,l,s,A,o);return e+=t,S.createElement(Uq,{key:a,color:s,ptg:t,radius:b,prefixCls:n,gradientId:y,className:r.track,style:{...u,...j,...i.track},strokeLinecap:A,strokeWidth:o,gapDegree:c,ref:e=>{P[a]=e},size:100})}).reverse()},I=()=>{let e=Math.round(T*(D[0]/100)),t=100/T,a=0;return Array(T).fill(null).map((s,d)=>{let f=d<=e-1?O[0]:u,p=f&&typeof f==`object`?`url(#${y})`:void 0,m=Wq(x,w,a,t,C,c,l,f,`butt`,o,E);return a+=(w-m.strokeDashoffset+E)*100/w,S.createElement(`circle`,{key:d,className:Y(`${n}-circle-path`,r.track),r:b,cx:50,cy:50,stroke:p,strokeWidth:o,opacity:1,style:{...m,...i.track},ref:e=>{P[d]=e}})})};return S.createElement(`svg`,Kq({className:Y(`${n}-circle`,r.root,p),viewBox:`0 0 100 100`,style:{...i.root,...f},id:t,role:`presentation`},_),!T&&S.createElement(`circle`,{className:Y(`${n}-circle-rail`,r.rail),r:b,cx:50,cy:50,stroke:u,strokeLinecap:A,strokeWidth:s||o,style:{...N,...i.rail}}),T?I():F(),M)};function Yq(e){return!e||e<0?0:e>100?100:e}function Xq({success:e}){let t;return e&&`percent`in e&&(t=e.percent),t}var Zq=({percent:e,success:t})=>{let n=Yq(Xq({success:t}));return[n,Yq(Yq(e)-n)]},Qq=({success:e={},strokeColor:t})=>{let{strokeColor:n}=e;return[n||Wc.green,t||null]},$q=(e,t,n)=>{let r=-1,i=-1;if(t===`step`){let t=n.steps,a=n.strokeWidth;typeof e==`string`||e===void 0?(r=e===`small`?2:14,i=a??8):Qd(e)?[r,i]=[e,e]:[r=14,i=8]=Array.isArray(e)?e:[e.width,e.height],r*=t}else if(t===`line`){let t=n?.strokeWidth;typeof e==`string`||e===void 0?i=t||(e===`small`?6:8):Qd(e)?[r,i]=[e,e]:[r=-1,i=8]=Array.isArray(e)?e:[e.width,e.height]}else (t===`circle`||t===`dashboard`)&&(typeof e==`string`||e===void 0?[r,i]=e===`small`?[60,60]:[120,120]:Qd(e)?[r,i]=[e,e]:Array.isArray(e)&&(r=e[0]??e[1]??120,i=e[0]??e[1]??120));return[r,i]},eJ=3,tJ=e=>eJ/e*100,nJ=[`root`,`body`,`indicator`],rJ=e=>{let{prefixCls:t,classNames:n,styles:r,railColor:i,trailColor:a,strokeLinecap:o=`round`,gapPosition:s,gapPlacement:c,gapDegree:l,width:u=120,type:d,children:f,success:p,size:m=u,steps:h}=e,{direction:g}=_a(`progress`),_=i??a,[v,y]=$q(m,`circle`),{strokeWidth:b}=e;b===void 0&&(b=Math.max(tJ(v),6));let x={width:v,height:y,fontSize:v*.15+6},C=S.useMemo(()=>{if(l||l===0)return l;if(d===`dashboard`)return 75},[l,d]),w=Zq(e),T=S.useMemo(()=>{let e=(c??s)||d===`dashboard`&&`bottom`||void 0,t=g===`rtl`;switch(e){case`start`:return t?`right`:`left`;case`end`:return t?`left`:`right`;default:return e}},[g,c,s,d]),E=Object.prototype.toString.call(e.strokeColor)===`[object Object]`,D=Qq({success:p,strokeColor:e.strokeColor}),O=Y(`${t}-body`,{[`${t}-circle-gradient`]:E},n.body),k=S.createElement(Jq,{steps:h,percent:h?w[1]:w,strokeWidth:b,railWidth:b,strokeColor:h?D[1]:D,strokeLinecap:o,railColor:_,prefixCls:t,gapDegree:C,gapPosition:T,classNames:hi(n,nJ),styles:hi(r,nJ)}),A=v<=20,j=S.createElement(`div`,{className:O,style:{...x,...r.body}},k,!A&&f);return A?S.createElement($w,{title:f},j):j},iJ=`--progress-line-stroke-color`,aJ=e=>{let t=e?`100%`:`-100%`;return new As(`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}})},oJ=e=>{let{componentCls:t,iconCls:n}=e;return{[t]:{...Vl(e),display:`inline-flex`,"&-rtl":{direction:`rtl`},[`${t}-indicator`]:{color:e.colorText,lineHeight:1,whiteSpace:`nowrap`,verticalAlign:`middle`,wordBreak:`normal`,[n]:{fontSize:e.fontSize}},[`&${t}-status-exception`]:{[`${t}-indicator`]:{color:e.colorError}},[`&${t}-status-success`]:{[`${t}-indicator`]:{color:e.colorSuccess}}}}},sJ=e=>{let{componentCls:t}=e;return{[`${t}-line`]:{position:`relative`,width:`100%`,fontSize:e.fontSize,[`${t}-body`]:{display:`inline-flex`,alignItems:`center`,width:`100%`,gap:e.marginXS},[`${t}-rail`]:{flex:`auto`,background:e.remainingColor,borderRadius:e.lineBorderRadius,position:`relative`,width:`100%`,overflow:`hidden`},[`&${t}-status-active`]:{[`${t}-track:after`]:{content:`""`,position:`absolute`,inset:0,backgroundColor:e.colorBgContainer,borderRadius:`inherit`,opacity:0,animationName:aJ(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:`infinite`}},[`${t}-track`]:{position:`absolute`,insetInlineStart:0,insetBlock:0,borderRadius:`inherit`,background:e.defaultColor,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,minWidth:`max-content`,display:`flex`,alignItems:`center`,"&-success":{background:e.colorSuccess}},[`&${t}-status-exception`]:{[`${t}-track`]:{background:e.colorError}},[`&${t}-status-success`]:{[`${t}-track`]:{background:e.colorSuccess}},[`${t}-indicator-outer`]:{[`&${t}-indicator-start`]:{order:-1}},[`${t}-body-layout-bottom`]:{flexDirection:`column`,alignItems:`center`,gap:e.marginXXS},[`${t}-indicator${t}-indicator-inner`]:{color:e.colorWhite,paddingInline:e.paddingXXS,width:`100%`,display:`flex`,justifyContent:`center`,[`&${t}-indicator-end`]:{justifyContent:`end`},[`&${t}-indicator-start`]:{justifyContent:`start`},[`&${t}-indicator-bright`]:{color:`rgba(0, 0, 0, 0.45)`}}}}},cJ=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-circle`]:{[`${t}-circle-rail`]:{stroke:e.remainingColor},[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-body`]:{position:`relative`,lineHeight:1,backgroundColor:`transparent`},[`${t}-indicator`]:{position:`absolute`,insetBlockStart:`50%`,insetInlineStart:0,width:`100%`,margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:`normal`,textAlign:`center`,transform:`translateY(-50%)`,[n]:{fontSize:e.circleIconFontSize}},[`&${t}-status-exception`]:{[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}}},[`&${t}-status-success`]:{[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:`bottom`}}}},lJ=e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:`inline-block`,"&-body":{display:`flex`,flexDirection:`row`,alignItems:`center`,gap:e.progressStepMarginInlineEnd,[`${t}-indicator`]:{marginInlineStart:e.marginXS}},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}},uJ=e=>{let{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-indicator ${n}`]:{fontSize:e.fontSizeSM}}}},dJ=Xl(`Progress`,e=>{let t=e.calc(e.marginXXS).div(2).equal(),n=lc(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:`2.4s`});return[oJ(n),sJ(n),cJ(n),lJ(n),uJ(n)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:`1em`,circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`})),fJ=e=>{let t=[];return Object.keys(e).forEach(n=>{let r=Number.parseFloat(n.replace(/%/g,``));Number.isNaN(r)||t.push({key:r,value:e[n]})}),t=t.sort((e,t)=>e.key-t.key),t.map(({key:e,value:t})=>`${t} ${e}%`).join(`, `)},pJ=(e,t)=>{let{from:n=Wc.blue,to:r=Wc.blue,direction:i=t===`rtl`?`to left`:`to right`,...a}=e;if(Object.keys(a).length!==0){let e=`linear-gradient(${i}, ${fJ(a)})`;return{background:e,[iJ]:e}}let o=`linear-gradient(${i}, ${n}, ${r})`;return{background:o,[iJ]:o}},mJ=e=>{let{prefixCls:t,classNames:n,styles:r,direction:i,percent:a,size:o,strokeWidth:s,strokeColor:c,strokeLinecap:l=`round`,children:u,railColor:d,trailColor:f,percentPosition:p,success:m}=e,{align:h,type:g}=p,_=d??f,v=l===`square`||l===`butt`?0:void 0,[y,b]=$q(o??[-1,s||(o===`small`?6:8)],`line`,{strokeWidth:s}),x={backgroundColor:_||void 0,borderRadius:v,height:b},C=`${t}-track`,w=c&&typeof c!=`string`?pJ(c,i):{[iJ]:c,background:c},T={width:`${Yq(a)}%`,height:b,borderRadius:v,...w},E=Xq(e),D={width:`${Yq(E)}%`,height:b,borderRadius:v,backgroundColor:m?.strokeColor};return S.createElement(`div`,{className:Y(`${t}-body`,n.body,{[`${t}-body-layout-bottom`]:h===`center`&&g===`outer`}),style:{width:y>0?y:`100%`,...r.body}},S.createElement(`div`,{className:Y(`${t}-rail`,n.rail),style:{...x,...r.rail}},S.createElement(`div`,{className:Y(C,n.track),style:{...T,...r.track}},g===`inner`&&u),E!==void 0&&S.createElement(`div`,{className:Y(C,`${C}-success`,n.track),style:{...D,...r.track}})),g===`outer`&&u)},hJ=e=>{let{classNames:t,styles:n,size:r,steps:i,rounding:a=Math.round,percent:o=0,strokeWidth:s=8,strokeColor:c,railColor:l,trailColor:u,prefixCls:d,children:f}=e,p=a(o/100*i),[m,h]=$q(r??[r===`small`?2:14,s],`step`,{steps:i,strokeWidth:s}),g=m/i,_=Array.from({length:i}),v=l??u;for(let e=0;e{let{prefixCls:n,className:r,rootClassName:i,classNames:a,styles:o,steps:s,strokeColor:c,percent:l=0,size:u=`medium`,showInfo:d=!0,type:f=`line`,status:p,format:m,style:h,percentPosition:g={},..._}=e,{align:v=`end`,type:y=`outer`}=g,b=Array.isArray(c)?c[0]:c,x=typeof c==`string`||Array.isArray(c)?c:void 0,C=S.useMemo(()=>b?new jc(typeof b==`string`?b:Object.values(b)[0]).isLight():!1,[c]),w=S.useMemo(()=>{let t=Xq(e);return Number.parseInt(t===void 0?(l??0)?.toString():(t??0)?.toString(),10)},[l,e.success]),T=S.useMemo(()=>!gJ.includes(p)&&w>=100?`success`:p||`normal`,[p,w]),{getPrefixCls:E,direction:D,className:O,style:k,classNames:A,styles:j}=_a(`progress`),M=E(`progress`,n),[N,P]=dJ(M),F={...e,percent:l,type:f,size:u,showInfo:d,percentPosition:g},[I,L]=xf([A,a],[j,o],{props:F}),R=f===`line`,z=R&&!s,B=S.useMemo(()=>{if(!d)return null;let t=Xq(e),n,r=m||(e=>`${e}%`),i=R&&C&&y===`inner`;return y===`inner`||m||T!==`exception`&&T!==`success`?n=r(Yq(l),Yq(t)):T===`exception`?n=R?S.createElement(Eu,null):S.createElement(ku,null):T===`success`&&(n=R?S.createElement(Cu,null):S.createElement(QC,null)),S.createElement(`span`,{className:Y(`${M}-indicator`,{[`${M}-indicator-bright`]:i,[`${M}-indicator-${v}`]:z,[`${M}-indicator-${y}`]:z},I.indicator),style:L.indicator,title:typeof n==`string`?n:void 0},n)},[d,l,w,T,f,M,m,R,C,y,v,z,I.indicator,L.indicator]),V={...e,classNames:I,styles:L},H;f===`line`?H=s?S.createElement(hJ,{...V,strokeColor:x,prefixCls:M,steps:ef(s)?s.count:s},B):S.createElement(mJ,{...V,strokeColor:b,prefixCls:M,direction:D,percentPosition:{align:v,type:y}},B):(f===`circle`||f===`dashboard`)&&(H=S.createElement(rJ,{...V,strokeColor:b,prefixCls:M,progressStatus:T},B));let U=Y(M,`${M}-status-${T}`,{[`${M}-${f===`dashboard`&&`circle`||f}`]:f!==`line`,[`${M}-inline-circle`]:f===`circle`&&$q(u,`circle`)[0]<=20,[`${M}-line`]:z,[`${M}-line-align-${v}`]:z,[`${M}-line-position-${y}`]:z,[`${M}-steps`]:s,[`${M}-show-info`]:d,[`${M}-small`]:u===`small`,[`${M}-rtl`]:D===`rtl`},O,r,i,I.root,N,P);return S.createElement(`div`,{ref:t,style:{...k,...L.root,...h},className:U,role:`progressbar`,"aria-valuenow":w,"aria-valuemin":0,"aria-valuemax":100,...hi(_,[`railColor`,`trailColor`,`strokeWidth`,`width`,`gapDegree`,`gapPosition`,`gapPlacement`,`strokeLinecap`,`success`])},H)}),vJ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z`}}]},name:`reload`,theme:`outlined`}}))());function yJ(){return yJ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,yJ({},e,{ref:t,icon:vJ.default}))),xJ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z`}}]},name:`star`,theme:`filled`}}))());function SJ(){return SJ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,SJ({},e,{ref:t,icon:xJ.default}))),wJ=dV,TJ={},EJ=`rc-table-internal-hook`;function DJ(e){let t=S.createContext(void 0);return{Context:t,Provider:({value:e,children:n})=>{let r=S.useRef(e);r.current=e;let[i]=S.useState(()=>({getValue:()=>r.current,listeners:new Set}));return Vn(()=>{(0,zi.unstable_batchedUpdates)(()=>{i.listeners.forEach(t=>{t(e)})})},[e]),S.createElement(t.Provider,{value:i},n)},defaultValue:e}}function OJ(e,t){let n=Rn(typeof t==`function`?t:e=>{if(t===void 0)return e;if(!Array.isArray(t))return e[t];let n={};return t.forEach(t=>{n[t]=e[t]}),n}),r=S.useContext(e?.Context),{listeners:i,getValue:a}=r||{},o=S.useRef();o.current=n(r?a():e?.defaultValue);let[,s]=S.useState({});return Vn(()=>{if(!r)return;function e(e){let t=n(e);di(o.current,t,!0)||s({})}return i.add(e),()=>{i.delete(e)}},[r]),o.current}function kJ(){return kJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let s=i?{ref:o}:{},c=S.useRef(0),l=S.useRef(a);return t()===null?((!r||r(l.current,a))&&(c.current+=1),l.current=a,S.createElement(e.Provider,{value:c.current},S.createElement(n,kJ({},a,s)))):S.createElement(n,kJ({},a,s))};return i?S.forwardRef(a):a}function r(e,n){let r=lr(e),i=(n,i)=>{let a=r?{ref:i}:{};return t(),S.createElement(e,kJ({},n,a))};return S.memo(r?S.forwardRef(i):i,n)}return{makeImmutable:n,responseImmutable:r,useImmutableMark:t}}var{makeImmutable:ite,responseImmutable:ate,useImmutableMark:ote}=AJ(),{makeImmutable:jJ,responseImmutable:MJ,useImmutableMark:NJ}=AJ(),PJ=DJ(),FJ=S.createContext({renderWithProps:!1}),IJ=`RC_TABLE_KEY`;function LJ(e){return e==null?[]:Array.isArray(e)?e:[e]}function RJ(e){let t=[],n={};return e.forEach(e=>{let{key:r,dataIndex:i}=e||{},a=r||LJ(i).join(`-`)||IJ;for(;n[a];)a=`${a}_next`;n[a]=!0,t.push(a)}),t}function zJ(e){return e!=null}function BJ(e){return typeof e==`number`&&!Number.isNaN(e)}function VJ(e){return e&&typeof e==`object`&&!Array.isArray(e)&&!S.isValidElement(e)}function HJ(e,t,n,r,i,a){let o=S.useContext(FJ);return Xn(()=>{if(zJ(r))return[r];let a=Oi(e,t==null||t===``?[]:Array.isArray(t)?t:[t]),s=a,c;if(i){let t=i(a,e,n);VJ(t)?(s=t.children,c=t.props,o.renderWithProps=!0):s=t}return[s,c]},[NJ(),e,r,t,i,n],(e,t)=>{if(a){let[,n]=e,[,r]=t;return a(r,n)}return o.renderWithProps?!0:!di(e,t,!0)})}function UJ(e,t,n,r){let i=e+t-1;return e<=r&&i>=n}function WJ(e,t){return OJ(PJ,n=>[UJ(e,t||1,n.hoverStartRow,n.hoverEndRow),n.onHover])}function GJ(){return GJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let r,i=e===!0?{showTitle:!0}:e;return i&&(i.showTitle||t===`header`)&&(typeof n==`string`||typeof n==`number`?r=n.toString():S.isValidElement(n)&&typeof n.props?.children==`string`&&(r=n.props?.children)),r},qJ=S.memo(e=>{let{component:t,children:n,ellipsis:r,scope:i,prefixCls:a,className:o,style:s,align:c,record:l,render:u,dataIndex:d,renderIndex:f,shouldCellUpdate:p,index:m,rowType:h,colSpan:g,rowSpan:_,fixStart:v,fixEnd:y,fixedStartShadow:b,fixedEndShadow:x,offsetFixedStartShadow:C,offsetFixedEndShadow:w,zIndex:T,zIndexReverse:E,appendNode:D,additionalProps:O={},isSticky:k}=e,A=`${a}-cell`,{allColumnsFixedLeft:j,rowHoverable:M}=OJ(PJ,[`allColumnsFixedLeft`,`rowHoverable`]),[N,P]=HJ(l,d,f,n,u,p),F={},I=typeof v==`number`&&!j,L=typeof y==`number`&&!j,[R,z]=OJ(PJ,({scrollInfo:e})=>{if(!I&&!L)return[!1,!1];let[t,n]=e;return[(I&&b&&t)-C>=1,(L&&x&&n-t)-w>1]});I&&(F.insetInlineStart=v,F[`--z-offset`]=T,F[`--z-offset-reverse`]=E),L&&(F.insetInlineEnd=y,F[`--z-offset`]=T,F[`--z-offset-reverse`]=E);let B=P?.colSpan??O.colSpan??g??1,V=P?.rowSpan??O.rowSpan??_??1,[H,U]=WJ(m,V),ee=Rn(e=>{l&&U(m,m+V-1),O?.onMouseEnter?.(e)}),te=Rn(e=>{l&&U(-1,-1),O?.onMouseLeave?.(e)});if(B===0||V===0)return null;let ne=O.title??KJ({rowType:h,ellipsis:r,children:N}),W=Y(A,o,{[`${A}-fix`]:I||L,[`${A}-fix-start`]:I,[`${A}-fix-end`]:L,[`${A}-fix-start-shadow`]:b,[`${A}-fix-start-shadow-show`]:b&&R,[`${A}-fix-end-shadow`]:x,[`${A}-fix-end-shadow-show`]:x&&z,[`${A}-ellipsis`]:r,[`${A}-with-append`]:D,[`${A}-fix-sticky`]:(I||L)&&k,[`${A}-row-hover`]:!P&&H},O.className,P?.className),re={};c&&(re.textAlign=c);let G={...P?.style,...F,...re,...O.style,...s},K=N;return typeof K==`object`&&!Array.isArray(K)&&!S.isValidElement(K)&&(K=null),r&&(b||x)&&(K=S.createElement(`span`,{className:`${A}-content`},K)),S.createElement(t,GJ({},P,O,{className:W,style:G,title:ne,scope:i,onMouseEnter:M?ee:void 0,onMouseLeave:M?te:void 0,colSpan:B===1?null:B,rowSpan:V===1?null:V}),D,K)});function JJ(e){return e.fixed===`start`}function YJ(e){return e.fixed===`end`}function XJ(e,t,n,r){let i=n[e]||{},a=n[t]||{},o=null,s=null;JJ(i)&&JJ(a)?o=r.start[e]:YJ(a)&&YJ(i)&&(s=r.end[t]);let c=!1,l=!1,u=0,d=0;o!==null&&(c=!n[t+1]||!JJ(n[t+1]),u=n.length*2-e,d=n.length+e),s!==null&&(l=!n[e-1]||!YJ(n[e-1]),u=t,d=n.length-t);let f=0,p=0;if(c)for(let t=0;tt;--e)YJ(n[e])||(p+=r.widths[e]||0);return{fixStart:o,fixEnd:s,fixedStartShadow:c,fixedEndShadow:l,offsetFixedStartShadow:f,offsetFixedEndShadow:p,isSticky:r.isSticky,zIndex:u,zIndexReverse:d}}var ZJ=S.createContext({});function QJ(){return QJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:t,index:n,children:r,colSpan:i=1,rowSpan:a,align:o}=e,{prefixCls:s}=OJ(PJ,[`prefixCls`]),{scrollColumnIndex:c,stickyOffsets:l,flattenColumns:u}=S.useContext(ZJ),d=n+i-1+1===c?i+1:i,f=S.useMemo(()=>XJ(n,n+d-1,u,l),[n,d,u,l]);return S.createElement(qJ,QJ({className:t,index:n,component:`td`,prefixCls:s,record:null,dataIndex:null,align:o,colSpan:d,rowSpan:a,render:()=>r},f))},eY=e=>{let{children:t,...n}=e;return S.createElement(`tr`,n,t)},tY=e=>{let{children:t}=e;return t};tY.Row=eY,tY.Cell=$J;var nY=MJ(e=>{let{children:t,stickyOffsets:n,flattenColumns:r}=e,i=OJ(PJ,`prefixCls`),a=r.length-1,o=r[a],s=S.useMemo(()=>({stickyOffsets:n,flattenColumns:r,scrollColumnIndex:o?.scrollbar?a:null}),[o,r,a,n]);return S.createElement(ZJ.Provider,{value:s},S.createElement(`tfoot`,{className:`${i}-summary`},t))}),rY=tY;function iY(e){return null}function aY(e){return null}function oY(e,t,n,r,i,a,o){let s=a(t,o);e.push({record:t,indent:n,index:o,rowKey:s});let c=i?.has(s);if(t&&Array.isArray(t[r])&&c)for(let o=0;o{if(n?.size){let i=[];for(let a=0;a({record:e,indent:0,index:t,rowKey:r(e,t)}))},[e,t,n,r])}function cY(e,t,n,r){let i=OJ(PJ,[`prefixCls`,`fixedInfoList`,`flattenColumns`,`expandableType`,`expandRowByClick`,`onTriggerExpand`,`rowClassName`,`expandedRowClassName`,`indentSize`,`expandIcon`,`expandedRowRender`,`expandIconColumnIndex`,`expandedKeys`,`childrenColumnName`,`rowExpandable`,`onRow`]),{flattenColumns:a,expandableType:o,expandedKeys:s,childrenColumnName:c,onTriggerExpand:l,rowExpandable:u,onRow:d,expandRowByClick:f,rowClassName:p}=i,m=o===`nest`,h=o===`row`&&(!u||u(e)),g=h||m,_=s&&s.has(t),v=c&&e&&e[c],y=Rn(l),b=d?.(e,n),x=b?.onClick,S=(t,...n)=>{f&&g&&l(e,t),x?.(t,...n)},C;typeof p==`string`?C=p:typeof p==`function`&&(C=p(e,n,r));let w=RJ(a);return{...i,columnsKey:w,nestExpandable:m,expanded:_,hasNestChildren:v,record:e,onTriggerExpand:y,rowSupportExpand:h,expandable:g,rowProps:{...b,className:Y(C,b?.className),onClick:S}}}var lY=e=>{let{prefixCls:t,children:n,component:r,cellComponent:i,className:a,expanded:o,colSpan:s,isEmpty:c,stickyOffset:l=0}=e,{scrollbarSize:u,fixHeader:d,fixColumn:f,componentWidth:p,horizonScroll:m}=OJ(PJ,[`scrollbarSize`,`fixHeader`,`fixColumn`,`componentWidth`,`horizonScroll`]),h=n;return(c?m&&p:f)&&(h=S.createElement(`div`,{style:{width:p-l-(d&&!c?u:0),position:`sticky`,left:l,overflow:`hidden`},className:`${t}-expanded-row-fixed`},h)),S.createElement(r,{className:a,style:{display:o?null:`none`}},S.createElement(qJ,{component:i,prefixCls:t,colSpan:s},h))};function uY({prefixCls:e,record:t,onExpand:n,expanded:r,expandable:i}){let a=`${e}-row-expand-icon`;if(!i)return S.createElement(`span`,{className:Y(a,`${e}-row-spaced`)});let o=e=>{n(t,e),e.stopPropagation()};return S.createElement(`span`,{className:Y(a,{[`${e}-row-expanded`]:r,[`${e}-row-collapsed`]:!r}),onClick:o})}function dY(e,t,n){let r=[];function i(e){(e||[]).forEach((e,a)=>{r.push(t(e,a)),i(e[n])})}return i(e),r}function fY(e,t,n,r){return typeof e==`string`?e:typeof e==`function`?e(t,n,r):``}function pY(){return pY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:t,style:n,classNames:r,styles:i,record:a,index:o,renderIndex:s,rowKey:c,rowKeys:l,indent:u=0,rowComponent:d,cellComponent:f,scopeCellComponent:p,expandedRowInfo:m}=e,h=cY(a,c,o,u),{prefixCls:g,flattenColumns:_,expandedRowClassName:v,expandedRowRender:y,rowProps:b,expanded:x,rowSupportExpand:C}=h,w=S.useRef(!1);w.current||=x;let T=fY(v,a,o,u),E=S.createElement(d,pY({},b,{"data-row-key":c,className:Y(t,`${g}-row`,`${g}-row-level-${u}`,b?.className,r.row,{[T]:u>=1}),style:{...n,...b?.style,...i.row}}),_.map((e,t)=>{let{render:n,dataIndex:c,className:d}=e,{key:_,fixedInfo:v,appendCellNode:y,additionalCellProps:b}=mY(h,e,t,u,o,l,m?.offset);return S.createElement(qJ,pY({className:Y(d,r.cell),style:i.cell,ellipsis:e.ellipsis,align:e.align,scope:e.rowScope,component:e.rowScope?p:f,prefixCls:g,key:_,record:a,index:o,renderIndex:s,dataIndex:c,render:n,shouldCellUpdate:e.shouldCellUpdate},v,{appendNode:y,additionalProps:b}))})),D;if(C&&(w.current||x)){let e=y(a,o,u+1,x);D=S.createElement(lY,{expanded:x,className:Y(`${g}-expanded-row`,`${g}-expanded-row-level-${u+1}`,T),prefixCls:g,component:d,cellComponent:f,colSpan:m?m.colSpan:_.length,isEmpty:!1,stickyOffset:m?.sticky},e)}return S.createElement(S.Fragment,null,E,D)}),gY=e=>{let{columnKey:t,onColumnResize:n,title:r}=e,i=S.useRef(null);return Vn(()=>{i.current&&n(t,i.current.offsetWidth)},[]),S.createElement(ia,{data:t},S.createElement(`td`,{ref:i,style:{paddingTop:0,paddingBottom:0,borderTop:0,borderBottom:0,height:0}},S.createElement(`div`,{style:{height:0,overflow:`hidden`,fontWeight:`bold`}},r||`\xA0`)))},_Y=({prefixCls:e,columnsKey:t,onColumnResize:n,columns:r})=>{let i=S.useRef(null),{measureRowRender:a}=OJ(PJ,[`measureRowRender`]),o=S.createElement(`tr`,{"aria-hidden":`true`,className:`${e}-measure-row`,style:{height:0},ref:i},S.createElement(ia.Collection,{onBatchResize:e=>{kr(i.current)&&e.forEach(({data:e,size:t})=>{n(e,t.offsetWidth)})}},t.map(e=>{let t=r.find(t=>t.key===e)?.title,i=S.isValidElement(t)?S.cloneElement(t,{ref:null}):t;return S.createElement(gY,{key:e,columnKey:e,onColumnResize:n,title:i})})));return typeof a==`function`?a(o):o},vY=MJ(e=>{let{data:t,measureColumnWidth:n}=e,{prefixCls:r,getComponent:i,onColumnResize:a,flattenColumns:o,getRowKey:s,expandedKeys:c,childrenColumnName:l,emptyNode:u,classNames:d,styles:f,expandedRowOffset:p=0,colWidths:m}=OJ(PJ,[`prefixCls`,`getComponent`,`onColumnResize`,`flattenColumns`,`getRowKey`,`expandedKeys`,`childrenColumnName`,`emptyNode`,`classNames`,`styles`,`expandedRowOffset`,`fixedInfoList`,`colWidths`]),{body:h={}}=d||{},{body:g={}}=f||{},_=sY(t,l,c,s),v=S.useMemo(()=>_.map(e=>e.rowKey),[_]),y=S.useRef({renderWithProps:!1}),b=S.useMemo(()=>{let e=o.length-p,t=0;for(let e=0;e{let{record:n,indent:r,index:i,rowKey:a}=e;return S.createElement(hY,{classNames:h,styles:g,key:a,rowKey:a,rowKeys:v,record:n,index:t,renderIndex:i,rowComponent:C,cellComponent:w,scopeCellComponent:T,indent:r,expandedRowInfo:b})}):S.createElement(lY,{expanded:!0,className:`${r}-placeholder`,prefixCls:r,component:C,cellComponent:w,colSpan:o.length,isEmpty:!0},u);let D=RJ(o);return S.createElement(FJ.Provider,{value:y.current},S.createElement(x,{style:g.wrapper,className:Y(`${r}-tbody`,h.wrapper)},n&&S.createElement(_Y,{prefixCls:r,columnsKey:D,onColumnResize:a,columns:o}),E))}),yY=`RC_TABLE_INTERNAL_COL_DEFINE`;function bY(e){let{expandable:t,...n}=e,r;return r=`expandable`in e?{...n,...t}:n,r.showExpandColumn===!1&&(r.expandIconColumnIndex=-1),r}function xY(){return xY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{colWidths:t,columns:n,columCount:r}=e,{tableLayout:i}=OJ(PJ,[`tableLayout`]),a=[],o=r||n.length,s=!1;for(let e=o-1;e>=0;--e){let r=t[e],o=n&&n[e],c,l;if(o&&(c=o[yY],i===`auto`&&(l=o.minWidth)),r||l||c||s){let{columnType:t,...n}=c||{};a.unshift(S.createElement(`col`,xY({key:e,style:{width:r,minWidth:l}},n))),s=!0}}return a.length>0?S.createElement(`colgroup`,null,a):null};function CY(e,t){return(0,S.useMemo)(()=>{let n=[];for(let r=0;r{let{className:n,style:r,noData:i,columns:a,flattenColumns:o,colWidths:s,colGroup:c,columCount:l,stickyOffsets:u,direction:d,fixHeader:f,stickyTopOffset:p,stickyBottomOffset:m,stickyClassName:h,scrollX:g,tableLayout:_=`fixed`,onScroll:v,maxContentScroll:y,children:b,...x}=e,{prefixCls:C,scrollbarSize:w,isSticky:T,getComponent:E}=OJ(PJ,[`prefixCls`,`scrollbarSize`,`isSticky`,`getComponent`]),D=E([`header`,`table`],`table`),O=T&&!f?0:w,k=S.useRef(null),A=S.useCallback(e=>{or(t,e),or(k,e)},[]);S.useEffect(()=>{function e(e){let{currentTarget:t,deltaX:n}=e;if(n){let{scrollLeft:r,scrollWidth:i,clientWidth:a}=t,o=i-a,s=r+n;d===`rtl`?(s=Math.max(-o,s),s=Math.min(0,s)):(s=Math.min(o,s),s=Math.max(0,s)),v({currentTarget:t,scrollLeft:s}),e.preventDefault()}}let t=k.current;return t?.addEventListener(`wheel`,e,{passive:!1}),()=>{t?.removeEventListener(`wheel`,e)}},[]);let j=o[o.length-1],M={fixed:j?j.fixed:null,scrollbar:!0,onHeaderCell:()=>({className:`${C}-cell-scrollbar`})},N=(0,S.useMemo)(()=>O?[...a,M]:a,[O,a]),P=(0,S.useMemo)(()=>O?[...o,M]:o,[O,o]),F=(0,S.useMemo)(()=>{let{start:e,end:t}=u;return{...u,start:e,end:[...t.map(e=>e+O),0],isSticky:T}},[O,u,T]),I=CY(s,l),L=(0,S.useMemo)(()=>{let e=!I||!I.length||I.every(e=>!e);return i||e},[i,I]);return S.createElement(`div`,{style:{overflow:`hidden`,...T?{top:p,bottom:m}:{},...r},ref:A,className:Y(n,{[h]:!!h})},S.createElement(D,{style:{tableLayout:_,minWidth:`100%`,width:g}},L?c:S.createElement(SY,{colWidths:[...I,O],columCount:l+1,columns:P}),b({...x,stickyOffsets:F,columns:N,flattenColumns:P})))}),TY=S.memo(wY);function EY(){return EY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{cells:t,stickyOffsets:n,flattenColumns:r,rowComponent:i,cellComponent:a,onHeaderRow:o,index:s,classNames:c,styles:l}=e,{prefixCls:u}=OJ(PJ,[`prefixCls`]),d;o&&(d=o(t.map(e=>e.column),s));let f=RJ(t.map(e=>e.column));return S.createElement(i,EY({},d,{className:c.row,style:l.row}),t.map((e,t)=>{let{column:i,colStart:o,colEnd:s,colSpan:c}=e,l=XJ(o,s,r,n),d=i?.onHeaderCell?.(i)||{};return S.createElement(qJ,EY({},e,{scope:i.title?c>1?`colgroup`:`col`:null,ellipsis:i.ellipsis,align:i.align,component:a,prefixCls:u,key:f[t]},l,{additionalProps:d,rowType:`header`}))}))};function OY(e,t,n){let r=[];function i(e,a,o=0){r[o]=r[o]||[];let s=a;return e.filter(Boolean).map(e=>{let a={key:e.key,className:Y(e.className,t.cell)||``,style:n.cell,children:e.title,column:e,colStart:s},c=1,l=e.children;return l&&l.length>0&&(c=i(l,s,o+1).reduce((e,t)=>e+t,0),a.hasSubColumns=!0),`colSpan`in e&&({colSpan:c}=e),`rowSpan`in e&&(a.rowSpan=e.rowSpan),a.colSpan=c,a.colEnd=a.colStart+c-1,r[o].push(a),s+=c,c})}i(e,0);let a=r.length;for(let e=0;e{!(`rowSpan`in t)&&!t.hasSubColumns&&(t.rowSpan=a-e)});return r}var kY=MJ(e=>{let{stickyOffsets:t,columns:n,flattenColumns:r,onHeaderRow:i}=e,{prefixCls:a,getComponent:o,classNames:s,styles:c}=OJ(PJ,[`prefixCls`,`getComponent`,`classNames`,`styles`]),{header:l={}}=s||{},{header:u={}}=c||{},d=S.useMemo(()=>OY(n,l,u),[n,l,u]),f=o([`header`,`wrapper`],`thead`),p=o([`header`,`row`],`tr`),m=o([`header`,`cell`],`th`);return S.createElement(f,{className:Y(`${a}-thead`,l.wrapper),style:u.wrapper},d.map((e,n)=>S.createElement(DY,{classNames:l,styles:u,key:n,flattenColumns:r,cells:e,stickyOffsets:t,rowComponent:p,cellComponent:m,onHeaderRow:i,index:n})))});function AY(e,t=``){return typeof t==`number`?t:t.endsWith(`%`)?e*parseFloat(t)/100:null}function jY(e,t,n){return S.useMemo(()=>{if(t&&t>0){let r=0,i=0;e.forEach(e=>{let n=AY(t,e.width);n?r+=n:i+=1});let a=Math.max(t,n),o=Math.max(a-r,i),s=i,c=o/i,l=0,u=e.map(e=>{let n={...e},r=AY(t,n.width);if(r)n.width=r;else{let e=Math.floor(c);n.width=s===1?o:e,o-=e,--s}return l+=n.width,n});if(l{let r=Math.floor(t.width*e);t.width=n===u.length-1?o:r,o-=r})}return[u,Math.max(l,a)]}return[e,t]},[e,t,n])}function MY(e){return Di(e).filter(e=>S.isValidElement(e)).map(e=>{let{key:t,props:n}=e,{children:r,...i}=n,a={key:t,...i};return r&&(a.children=MY(r)),a})}function NY(e){return e.filter(e=>e&&typeof e==`object`&&!e.hidden).map(e=>{let t=e.children;return t&&t.length>0?{...e,children:NY(t)}:e})}function PY(e,t=`key`){return e.filter(e=>e&&typeof e==`object`).reduce((e,n,r)=>{let{fixed:i}=n,a=i===!0||i===`left`?`start`:i===`right`?`end`:i,o=`${t}-${r}`,s=n.children;return s&&s.length>0?[...e,...PY(s,o).map(e=>({...e,fixed:e.fixed??a}))]:[...e,{key:o,...n,fixed:a}]},[])}function FY({prefixCls:e,columns:t,children:n,expandable:r,expandedKeys:i,columnTitle:a,getRowKey:o,onTriggerExpand:s,expandIcon:c,rowExpandable:l,expandIconColumnIndex:u,expandedRowOffset:d=0,direction:f,expandRowByClick:p,columnWidth:m,fixed:h,scrollWidth:g,clientWidth:_},v){let y=S.useMemo(()=>NY((t||MY(n)||[]).slice()),[t,n]),b=S.useMemo(()=>{if(r){let t=y.slice();if(!t.includes(TJ)){let e=u||0,n=e===0&&(h===`right`||h===`end`)?y.length:e;n>=0&&t.splice(n,0,TJ)}let n=t.indexOf(TJ);t=t.filter((e,t)=>e!==TJ||t===n);let r=y[n],f;f=h||(r?r.fixed:null);let g={[yY]:{className:`${e}-expand-icon-col`,columnType:`EXPAND_COLUMN`},title:a,fixed:f,className:`${e}-row-expand-icon-cell`,width:m,render:(t,n,r)=>{let a=o(n,r),u=c({prefixCls:e,expanded:i.has(a),expandable:l?l(n):!0,record:n,onExpand:s});return p?S.createElement(`span`,{onClick:e=>e.stopPropagation()},u):u}};return t.map((e,t)=>{let n=e===TJ?g:e;return te!==TJ)},[r,y,o,i,c,f,d]),x=S.useMemo(()=>{let e=b;return v&&(e=v(e)),e.length||(e=[{render:()=>null}]),e},[v,b,f]),[C,w]=jY(S.useMemo(()=>PY(x),[x,f,g]),g,_);return[x,C,w]}function IY(e,t,n){let r=bY(e),{expandIcon:i,expandedRowKeys:a,defaultExpandedRowKeys:o,defaultExpandAllRows:s,expandedRowRender:c,onExpand:l,onExpandedRowsChange:u,childrenColumnName:d}=r,f=i||uY,p=d||`children`,m=S.useMemo(()=>c?`row`:e.expandable&&e.internalHooks===`rc-table-internal-hook`&&e.expandable.__PARENT_RENDER_ICON__||t.some(e=>e&&typeof e==`object`&&e[p])?`nest`:!1,[!!c,t]),[h,g]=S.useState(()=>o||(s?dY(t,n,p):[])),_=S.useMemo(()=>new Set(a||h||[]),[a,h]);return[r,m,_,f,p,S.useCallback(e=>{let r=n(e,t.indexOf(e)),i,a=_.has(r);a?(_.delete(r),i=[..._]):i=[..._,r],g(i),l&&l(!a,e),u&&u(i)},[n,_,t,l,u])]}function LY(e,t){let n=S.useMemo(()=>e.map((n,r)=>XJ(r,r,e,t)),[e,t]);return Xn(()=>n,[n],(e,t)=>!di(e,t))}function RY(e){let t=(0,S.useRef)(e),[,n]=(0,S.useState)({}),r=(0,S.useRef)(null),i=(0,S.useRef)([]);function a(e){i.current.push(e);let a=Promise.resolve();r.current=a,a.then(()=>{if(r.current===a){let e=i.current,a=t.current;i.current=[],e.forEach(e=>{t.current=e(t.current)}),r.current=null,a!==t.current&&n({})}})}return(0,S.useEffect)(()=>()=>{r.current=null},[]),[t.current,a]}function zY(e){let t=(0,S.useRef)(e||null),n=(0,S.useRef)(null);function r(){clearTimeout(n.current)}function i(e){t.current=e,r(),n.current=setTimeout(()=>{t.current=null,n.current=void 0},100)}function a(){return t.current}return(0,S.useEffect)(()=>r,[]),[i,a]}function BY(){let[e,t]=S.useState(-1),[n,r]=S.useState(-1);return[e,n,S.useCallback((e,n)=>{t(e),r(n)},[])]}var VY=zn()?window:null;function HY(e,t){let{offsetHeader:n=0,offsetSummary:r=0,offsetScroll:i=0,getContainer:a=()=>VY}=typeof e==`object`?e:{},o=a()||VY,s=!!e;return S.useMemo(()=>({isSticky:s,stickyClassName:s?`${t}-sticky-holder`:``,offsetHeader:n,offsetSummary:r,offsetScroll:i,container:o}),[s,i,n,r,t,o])}function UY(e,t){return(0,S.useMemo)(()=>{let n=t.length,r=(n,r,i)=>{let a=[],o=0;for(let s=n;s!==r;s+=i)a.push(o),t[s].fixed&&(o+=e[s]||0);return a};return{start:r(0,n,1),end:r(n-1,-1,-1).reverse(),widths:e}},[e,t])}var WY=e=>{let{children:t,className:n,style:r}=e;return S.createElement(`div`,{className:n,style:r},t)};function GY(e){let t=Or(e).getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}var KY=`mouseup`,qY=`mousemove`,JY=`scroll`,YY=`resize`,XY=S.forwardRef((e,t)=>{let{scrollBodyRef:n,onScroll:r,offsetScroll:i,container:a,direction:o}=e,s=OJ(PJ,`prefixCls`),c=n.current?.scrollWidth||0,l=n.current?.clientWidth||0,u=c&&l/c*l,d=S.useRef(null),[f,p]=RY({scrollLeft:0,isHiddenScrollBar:!0}),m=S.useRef({delta:0,x:0}),[h,g]=S.useState(!1),_=S.useRef(null);S.useEffect(()=>()=>{Ei.cancel(_.current)},[]);let v=()=>{g(!1)},y=e=>{e.persist(),m.current.delta=e.pageX-f.scrollLeft,m.current.x=0,g(!0),e.preventDefault()},b=e=>{let{buttons:t}=e||window?.event;if(!h||t===0){h&&g(!1);return}let n=m.current.x+e.pageX-m.current.x-m.current.delta,i=o===`rtl`;n=Math.max(i?u-l:0,Math.min(i?0:l-u,n)),(!i||Math.abs(n)+Math.abs(u){Ei.cancel(_.current),_.current=Ei(()=>{if(!n.current)return;let e=GY(n.current).top,t=e+n.current.offsetHeight,r=a===window?document.documentElement.scrollTop+window.innerHeight:GY(a).top+a.clientHeight;t-ei()<=r||e>=r-i?p(e=>({...e,isHiddenScrollBar:!0})):p(e=>({...e,isHiddenScrollBar:!1}))})},C=e=>{p(t=>({...t,scrollLeft:e/c*l||0}))};return S.useImperativeHandle(t,()=>({setScrollLeft:C,checkScrollBarVisible:x})),S.useEffect(()=>(document.body.addEventListener(KY,v,!1),document.body.addEventListener(qY,b,!1),x(),()=>{document.body.removeEventListener(KY,v),document.body.removeEventListener(qY,b)}),[u,h]),S.useEffect(()=>{if(n.current){let e=[],t=Or(n.current);for(;t;)e.push(t),t=t.parentElement;return e.forEach(e=>{e.addEventListener(JY,x,!1)}),window.addEventListener(YY,x,!1),window.addEventListener(JY,x,!1),a.addEventListener(JY,x,!1),()=>{e.forEach(e=>{e.removeEventListener(JY,x)}),window.removeEventListener(YY,x),window.removeEventListener(JY,x),a.removeEventListener(JY,x)}}},[a]),S.useEffect(()=>{f.isHiddenScrollBar||p(e=>{let t=n.current;return t?{...e,scrollLeft:t.scrollLeft/t.scrollWidth*t.clientWidth}:e})},[f.isHiddenScrollBar]),c<=l||!u||f.isHiddenScrollBar?null:S.createElement(`div`,{style:{height:ei(),width:l,bottom:i},className:`${s}-sticky-scroll`},S.createElement(`div`,{onMouseDown:y,ref:d,className:Y(`${s}-sticky-scroll-bar`,{[`${s}-sticky-scroll-bar-active`]:h}),style:{width:`${u}px`,transform:`translate3d(${f.scrollLeft}px, 0, 0)`}}))});function ZY(){return ZY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let n={rowKey:`key`,prefixCls:QY,emptyText:tX,...e},{prefixCls:r,className:i,rowClassName:a,style:o,classNames:s,styles:c,data:l,rowKey:u,scroll:d,tableLayout:f,direction:p,title:m,footer:h,summary:g,caption:_,id:v,showHeader:y,components:b,emptyText:x,onRow:C,onHeaderRow:w,measureRowRender:T,onScroll:E,internalHooks:D,transformColumns:O,internalRefs:k,tailor:A,getContainerWidth:j,sticky:M,rowHoverable:N=!0}=n,P=l||$Y,F=!!P.length,I=D===EJ,L=S.useCallback((e,t)=>Oi(b,e)||t,[b]),R=S.useMemo(()=>typeof u==`function`?u:e=>e&&e[u],[u]),z=L([`body`]),[B,V,H]=BY(),[U,ee,te,ne,W,re]=IY(n,P,R),G=d?.x,[K,q]=S.useState(0),[ie,J,ae]=FY({...n,...U,expandable:!!U.expandedRowRender,columnTitle:U.columnTitle,expandedKeys:te,getRowKey:R,onTriggerExpand:re,expandIcon:ne,expandIconColumnIndex:U.expandIconColumnIndex,direction:p,scrollWidth:I&&A&&typeof G==`number`?G:null,clientWidth:K},I?O:null),oe=ae??G,se=S.useMemo(()=>({columns:ie,flattenColumns:J}),[ie,J]),ce=S.useRef(null),le=S.useRef(null),ue=S.useRef(null),de=S.useRef(null);S.useImperativeHandle(t,()=>({nativeElement:ce.current,scrollTo:e=>{if(ue.current instanceof HTMLElement){let{index:t,top:n,key:r,offset:i}=e;if(BJ(n))ue.current?.scrollTo({top:n});else{let e=r??R(P[t]),n=ue.current.querySelector(`[data-row-key="${e}"]`);if(n)if(!i)n.scrollIntoView();else{let e=n.offsetTop;ue.current.scrollTo({top:e+i})}}}else ue.current?.scrollTo&&ue.current.scrollTo(e)}}));let fe=S.useRef(null),[pe,me]=S.useState(!1),[he,ge]=S.useState(!1),[_e,ve]=S.useState(new Map),ye=RJ(J).map(e=>_e.get(e)),be=S.useMemo(()=>ye,[ye.join(`_`)]),xe=UY(be,J),Se=d&&zJ(d.y),Ce=d&&zJ(oe)||!!U.fixed,we=Ce&&J.some(({fixed:e})=>e),Te=S.useRef(null),{isSticky:Ee,offsetHeader:De,offsetSummary:Oe,offsetScroll:ke,stickyClassName:Ae,container:je}=HY(M,r),Me=S.useMemo(()=>g?.(P),[g,P]),Ne=(Se||Ee)&&S.isValidElement(Me)&&Me.type===tY&&Me.props.fixed,Pe,Fe,Ie;Se&&(Fe={overflowY:F?`scroll`:`auto`,maxHeight:d.y}),Ce&&(Pe={overflowX:`auto`},Se||(Fe={overflowY:`hidden`}),Ie={width:oe===!0?`auto`:oe,minWidth:`100%`});let Le=S.useCallback((e,t)=>{ve(n=>{if(n.get(e)!==t){let r=new Map(n);return r.set(e,t),r}return n})},[]),[Re,ze]=zY(null);function Be(e,t){t&&(typeof t==`function`?t(e):t.scrollLeft!==e&&(t.scrollLeft=e,t.scrollLeft!==e&&setTimeout(()=>{t.scrollLeft=e},0)))}let[Ve,He]=S.useState([0,0]),Ue=Rn(({currentTarget:e,scrollLeft:t})=>{let n=typeof t==`number`?t:e.scrollLeft,r=e||eX;(!ze()||ze()===r)&&(Re(r),Be(n,le.current),Be(n,ue.current),Be(n,fe.current),Be(n,Te.current?.setScrollLeft));let i=e||le.current;if(i){let e=I&&A&&typeof oe==`number`?oe:i.scrollWidth,t=i.clientWidth,r=Math.abs(n);if(He(n=>{let i=[r,e-t];return di(n,i)?n:i}),e===t){me(!1),ge(!1);return}me(r>0),ge(r{Ue(e),E?.(e)}),Ge=()=>{Ce&&ue.current?Ue({currentTarget:Or(ue.current),scrollLeft:ue.current?.scrollLeft}):(me(!1),ge(!1))},Ke=e=>{Te.current?.checkScrollBarVisible();let t=e??ce.current?.offsetWidth??0;I&&j&&ce.current&&(t=j(ce.current,t)||t),t!==K&&(Ge(),q(t))};Vn(()=>{Ce&&Ke()},[Ce]);let qe=S.useRef(!1);S.useEffect(()=>{qe.current&&Ge()},[Ce,l,ie.length]),S.useEffect(()=>{qe.current=!0},[]);let[Je,Ye]=S.useState(0);Vn(()=>{(!A||!I)&&(ue.current instanceof Element?Ye(ti(ue.current).width):Ye(ti(de.current).width))},[]),S.useEffect(()=>{I&&k&&(k.body.current=ue.current)});let Xe=S.useCallback(e=>S.createElement(S.Fragment,null,S.createElement(kY,e),Ne===`top`&&S.createElement(nY,e,Me)),[Ne,Me]),Ze=S.useCallback(e=>S.createElement(nY,e,Me),[Me]),Qe=L([`table`],`table`),$e=S.useMemo(()=>f||(we?oe===`max-content`?`auto`:`fixed`:Se||Ee||J.some(({ellipsis:e})=>e)?`fixed`:`auto`),[Se,we,J,f,Ee]),et,tt={colWidths:be,columCount:J.length,stickyOffsets:xe,onHeaderRow:w,fixHeader:Se,scroll:d},nt=S.useMemo(()=>F?null:typeof x==`function`?x():x,[F,x]),rt=S.createElement(vY,{data:P,measureColumnWidth:Se||Ce||Ee}),it=S.createElement(SY,{colWidths:J.map(({width:e})=>e),columns:J}),at=_==null?void 0:S.createElement(`caption`,{className:`${r}-caption`},_),ot=bi(n,{data:!0}),st=bi(n,{aria:!0});if(Se||Ee){let e;typeof z==`function`?(e=z(P,{scrollbarSize:Je,ref:ue,onScroll:Ue}),tt.colWidths=J.map(({width:e},t)=>{let n=t===J.length-1?e-Je:e;return typeof n==`number`&&!Number.isNaN(n)?n:0})):e=S.createElement(`div`,{style:{...Pe,...Fe},onScroll:We,ref:ue,className:`${r}-body`},S.createElement(Qe,ZY({style:{...Ie,tableLayout:$e}},st),at,it,rt,!Ne&&Me&&S.createElement(nY,{stickyOffsets:xe,flattenColumns:J},Me)));let t={noData:!P.length,maxContentScroll:Ce&&oe===`max-content`,...tt,...se,direction:p,stickyClassName:Ae,scrollX:oe,tableLayout:$e,onScroll:Ue};et=S.createElement(S.Fragment,null,y!==!1&&S.createElement(TY,ZY({},t,{stickyTopOffset:De,className:`${r}-header`,ref:le,colGroup:it}),Xe),e,Ne&&Ne!==`top`&&S.createElement(TY,ZY({},t,{stickyBottomOffset:Oe,className:`${r}-summary`,ref:fe,colGroup:it}),Ze),Ee&&ue.current&&ue.current instanceof Element&&S.createElement(XY,{ref:Te,offsetScroll:ke,scrollBodyRef:ue,onScroll:Ue,container:je,direction:p}))}else et=S.createElement(`div`,{style:{...Pe,...Fe,...c?.content},className:Y(`${r}-content`,s?.content),onScroll:Ue,ref:ue},S.createElement(Qe,ZY({style:{...Ie,tableLayout:$e}},st),at,it,y!==!1&&S.createElement(kY,ZY({},tt,se)),rt,Me&&S.createElement(nY,{stickyOffsets:xe,flattenColumns:J},Me)));let ct={...o};Ee&&(ct[`--columns-count`]=J.length);let lt=S.createElement(`div`,ZY({className:Y(r,i,{[`${r}-rtl`]:p===`rtl`,[`${r}-fix-start-shadow`]:Ce,[`${r}-fix-end-shadow`]:Ce,[`${r}-fix-start-shadow-show`]:Ce&&pe,[`${r}-fix-end-shadow-show`]:Ce&&he,[`${r}-layout-fixed`]:f===`fixed`,[`${r}-fixed-header`]:Se,[`${r}-fixed-column`]:we,[`${r}-scroll-horizontal`]:Ce,[`${r}-has-fix-start`]:J[0]?.fixed,[`${r}-has-fix-end`]:J[J.length-1]?.fixed===`end`}),style:ct,id:v,ref:ce},ot),m&&S.createElement(WY,{className:Y(`${r}-title`,s?.title),style:c?.title},m(P)),S.createElement(`div`,{ref:de,className:Y(`${r}-container`,s?.section),style:c?.section},et),h&&S.createElement(WY,{className:Y(`${r}-footer`,s?.footer),style:c?.footer},h(P)));Ce&&(lt=S.createElement(ia,{onResize:({offsetWidth:e})=>Ke(e)},lt));let ut=LY(J,xe),dt=S.useMemo(()=>({scrollX:oe,scrollInfo:Ve,classNames:s,styles:c,prefixCls:r,getComponent:L,scrollbarSize:Je,direction:p,fixedInfoList:ut,isSticky:Ee,componentWidth:K,fixHeader:Se,fixColumn:we,horizonScroll:Ce,tableLayout:$e,rowClassName:a,expandedRowClassName:U.expandedRowClassName,expandIcon:ne,expandableType:ee,expandRowByClick:U.expandRowByClick,expandedRowRender:U.expandedRowRender,expandedRowOffset:U.expandedRowOffset,onTriggerExpand:re,expandIconColumnIndex:U.expandIconColumnIndex,indentSize:U.indentSize,allColumnsFixedLeft:J.every(e=>e.fixed===`start`),emptyNode:nt,columns:ie,flattenColumns:J,onColumnResize:Le,colWidths:be,hoverStartRow:B,hoverEndRow:V,onHover:H,rowExpandable:U.rowExpandable,onRow:C,getRowKey:R,expandedKeys:te,childrenColumnName:W,rowHoverable:N,measureRowRender:T}),[oe,Ve,s,c,r,L,Je,p,ut,Ee,K,Se,we,Ce,$e,a,U.expandedRowClassName,ne,ee,U.expandRowByClick,U.expandedRowRender,U.expandedRowOffset,re,U.expandIconColumnIndex,U.indentSize,nt,ie,J,Le,be,B,V,H,U.rowExpandable,C,R,te,W,N,T]);return S.createElement(PJ.Provider,{value:dt},lt)}),rX=e=>jJ(nX,e),iX=rX();iX.EXPAND_COLUMN=TJ,iX.INTERNAL_HOOKS=EJ,iX.Column=iY,iX.ColumnGroup=aY,iX.Summary=rY;var aX=DJ(null),oX=DJ(null);function sX(){return sX=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{rowInfo:t,column:n,colIndex:r,indent:i,index:a,component:o,renderIndex:s,record:c,style:l,className:u,inverse:d,getHeight:f}=e,{render:p,dataIndex:m,className:h,width:g}=n,{columnsOffset:_}=OJ(oX,[`columnsOffset`]),{key:v,fixedInfo:y,appendCellNode:b,additionalCellProps:x}=mY(t,n,r,i,a),{style:C,colSpan:w=1,rowSpan:T=1}=x,E=cX(r-1,w,_),D=w>1?g-E:0,O={...C,...l,flex:`0 0 ${E}px`,width:`${E}px`,marginRight:D,pointerEvents:`auto`},k=S.useMemo(()=>d?T<=1:w===0||T===0||T>1,[T,w,d]);k?O.visibility=`hidden`:d&&(O.height=f?.(T));let A=k?()=>null:p,j={};return(T===0||w===0)&&(j.rowSpan=1,j.colSpan=1),S.createElement(qJ,sX({className:Y(h,u),ellipsis:n.ellipsis,align:n.align,scope:n.rowScope,component:o,prefixCls:t.prefixCls,key:v,record:c,index:a,renderIndex:s,dataIndex:m,render:A,shouldCellUpdate:n.shouldCellUpdate},y,{appendNode:b,additionalProps:{...x,style:O,...j}}))};function uX(){return uX=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{data:n,index:r,className:i,rowKey:a,style:o,extra:s,getHeight:c,...l}=e,{record:u,indent:d,index:f}=n,{scrollX:p,flattenColumns:m,prefixCls:h,fixColumn:g,componentWidth:_}=OJ(PJ,[`prefixCls`,`flattenColumns`,`fixColumn`,`componentWidth`,`scrollX`]),{getComponent:v}=OJ(aX,[`getComponent`]),y=cY(u,a,r,d),b=v([`body`,`row`],`div`),x=v([`body`,`cell`],`div`),{rowSupportExpand:C,expanded:w,rowProps:T,expandedRowRender:E,expandedRowClassName:D}=y,O;if(C&&w){let e=E(u,r,d+1,w),t=fY(D,u,r,d),n={};g&&(n={style:{"--virtual-width":`${_}px`}});let i=`${h}-expanded-row-cell`;O=S.createElement(b,{className:Y(`${h}-expanded-row`,`${h}-expanded-row-level-${d+1}`,t)},S.createElement(qJ,{component:x,prefixCls:h,className:Y(i,{[`${i}-fixed`]:g}),additionalProps:n},e))}let k={...o,width:p};s&&(k.position=`absolute`,k.pointerEvents=`none`);let A=S.createElement(b,uX({},T,l,{"data-row-key":a,ref:C?null:t,className:Y(i,`${h}-row`,T?.className,{[`${h}-row-extra`]:s}),style:{...k,...T?.style}}),m.map((e,t)=>S.createElement(lX,{key:t,component:x,rowInfo:y,column:e,colIndex:t,indent:d,index:r,renderIndex:f,record:u,inverse:s,getHeight:c})));return C?S.createElement(`div`,{ref:t},A,O):A})),fX=MJ(S.forwardRef((e,t)=>{let{data:n,onScroll:r}=e,{flattenColumns:i,onColumnResize:a,getRowKey:o,expandedKeys:s,prefixCls:c,childrenColumnName:l,scrollX:u,direction:d}=OJ(PJ,[`flattenColumns`,`onColumnResize`,`getRowKey`,`prefixCls`,`expandedKeys`,`childrenColumnName`,`scrollX`,`direction`]),{sticky:f,scrollY:p,listItemHeight:m,getComponent:h,onScroll:g}=OJ(aX),_=S.useRef(null),v=sY(n,l,s,o),y=S.useMemo(()=>{let e=0;return i.map(({width:t,minWidth:n,key:r})=>{let i=Math.max(t||0,n||0);return e+=i,[r,i,e]})},[i]),b=S.useMemo(()=>y.map(e=>e[2]),[y]);S.useEffect(()=>{y.forEach(([e,t])=>{a(e,t)})},[y]),S.useImperativeHandle(t,()=>{let e={scrollTo:e=>{let{offset:t,...n}=e;t?_.current?.scrollTo({...n,offset:t,align:`top`}):_.current?.scrollTo(e)},nativeElement:_.current?.nativeElement};return Object.defineProperty(e,`scrollLeft`,{get:()=>_.current?.getScrollInfo().x||0,set:e=>{_.current?.scrollTo({left:e})}}),Object.defineProperty(e,`scrollTop`,{get:()=>_.current?.getScrollInfo().y||0,set:e=>{_.current?.scrollTo({top:e})}}),e});let x=(e,t)=>{let n=v[t]?.record,{onCell:r}=e;return r?r(n,t)?.rowSpan??1:1},C=e=>{let{start:t,end:n,getSize:r,offsetY:a}=e;if(n<0)return null;let s=i.filter(e=>x(e,t)===0),c=t;for(let e=t;e>=0;--e)if(s=s.filter(t=>x(t,e)===0),!s.length){c=e;break}let l=i.filter(e=>x(e,n)!==1),u=n;for(let e=n;ex(t,e)!==1),!l.length){u=Math.max(e-1,n);break}let d=[];for(let e=c;e<=u;e+=1)v[e]&&i.some(t=>x(t,e)>1)&&d.push(e);return d.map(e=>{let t=v[e],n=o(t.record,e),i=t=>{let i=e+t-1,a=v[i];if(!a||!a.record){let e=Math.min(i,v.length-1),t=v[e],a=r(n,o(t.record,e));return a.bottom-a.top}let s=r(n,o(a.record,i));return s.bottom-s.top},s=r(n);return S.createElement(dX,{key:e,data:t,rowKey:n,index:e,style:{top:-a+s.top},extra:!0,getHeight:i})})},w=S.useMemo(()=>({columnsOffset:b}),[b]),T=`${c}-tbody`,E=h([`body`,`wrapper`]),D={};return f&&(D.position=`sticky`,D.bottom=0,typeof f==`object`&&f.offsetScroll&&(D.bottom=f.offsetScroll)),S.createElement(oX.Provider,{value:w},S.createElement(sC,{fullHeight:!1,ref:_,prefixCls:`${T}-virtual`,styles:{horizontalScrollBar:D},className:T,height:p,itemHeight:m||24,data:v,itemKey:e=>o(e.record),component:E,scrollWidth:u,direction:d,onVirtualScroll:({x:e})=>{r({currentTarget:_.current?.nativeElement,scrollLeft:e})},onScroll:g,extraRender:C},(e,t,n)=>{let r=o(e.record,t);return S.createElement(dX,{data:e,rowKey:r,index:t,style:n.style})}))}));function pX(){return pX=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{ref:n,onScroll:r}=t;return S.createElement(fX,{ref:n,data:e,onScroll:r})},hX=S.forwardRef((e,t)=>{let{data:n,columns:r,scroll:i,sticky:a,prefixCls:o=QY,className:s,listItemHeight:c,components:l,onScroll:u}=e,{x:d,y:f}=i||{};typeof d!=`number`&&(d=1),typeof f!=`number`&&(f=500);let p=Rn((e,t)=>Oi(l,e)||t),m=Rn(u),h=S.useMemo(()=>({sticky:a,scrollY:f,listItemHeight:c,getComponent:p,onScroll:m}),[a,f,c,p,m]);return S.createElement(aX.Provider,{value:h},S.createElement(iX,pX({},e,{className:Y(s,`${o}-virtual`),scroll:{...i,x:d},components:{...l,body:n?.length?mX:void 0},columns:r,internalHooks:EJ,tailor:!0,ref:t})))}),gX=e=>jJ(hX,e);gX();var _X=e=>null,vX=e=>null,yX=S.createContext(null),bX=S.createContext({}),xX=S.memo(({prefixCls:e,level:t,isStart:n,isEnd:r})=>{let i=`${e}-indent-unit`,a=[];for(let e=0;e{let{eventKey:t,className:n,style:r,dragOver:i,dragOverGapTop:a,dragOverGapBottom:o,isLeaf:s,isStart:c,isEnd:l,expanded:u,selected:d,checked:f,halfChecked:p,loading:m,domRef:h,active:g,data:_,onMouseMove:v,selectable:y,treeId:b,...x}=e,C=qn(b,t),w=S.useContext(yX),{classNames:T,styles:E}=w||{},D=S.useContext(bX),O=S.useRef(null),[k,A]=S.useState(!1),j=!!(w.disabled||e.disabled||D.nodeDisabled?.(_)),M=S.useMemo(()=>!w.checkable||e.checkable===!1?!1:w.checkable,[w.checkable,e.checkable]),N=t=>{j||w.onNodeSelect(t,lB(e))},P=t=>{j||!M||e.disableCheckbox||w.onNodeCheck(t,lB(e),!f)},F=S.useMemo(()=>typeof y==`boolean`?y:w.selectable,[y,w.selectable]),I=t=>{w.onNodeClick(t,lB(e)),F?N(t):P(t)},L=t=>{w.onNodeDoubleClick(t,lB(e))},R=t=>{w.onNodeMouseEnter(t,lB(e))},z=t=>{w.onNodeMouseLeave(t,lB(e))},B=t=>{w.onNodeContextMenu(t,lB(e))},V=S.useMemo(()=>!!(w.draggable&&(!w.draggable.nodeDraggable||w.draggable.nodeDraggable(_))),[w.draggable,_]),H=t=>{t.stopPropagation(),A(!0),w.onNodeDragStart(t,e);try{t.dataTransfer.setData(`text/plain`,``)}catch{}},U=t=>{t.preventDefault(),t.stopPropagation(),w.onNodeDragEnter(t,e)},ee=t=>{t.preventDefault(),t.stopPropagation(),w.onNodeDragOver(t,e)},te=t=>{t.stopPropagation(),w.onNodeDragLeave(t,e)},ne=t=>{t.stopPropagation(),A(!1),w.onNodeDragEnd(t,e)},W=t=>{t.preventDefault(),t.stopPropagation(),A(!1),w.onNodeDrop(t,e)},re=t=>{m||w.onNodeExpand(t,lB(e))},G=S.useMemo(()=>{let{children:e}=Qz(w.keyEntities,t)||{};return!!(e||[]).length},[w.keyEntities,t]),K=S.useMemo(()=>sB(s,w.loadData,G,e.loaded),[s,w.loadData,G,e.loaded]);S.useEffect(()=>{m||typeof w.loadData==`function`&&u&&!K&&!e.loaded&&w.onNodeLoad(lB(e))},[m,w.loadData,w.onNodeLoad,u,K,e]);let q=S.useMemo(()=>w.draggable?.icon?S.createElement(`span`,{className:`${w.prefixCls}-draggable-icon`},w.draggable.icon):null,[w.draggable]),ie=t=>{let n=e.switcherIcon||w.switcherIcon;return typeof n==`function`?n({...e,isLeaf:t}):n},J=()=>{if(K){let e=ie(!0);return e===!1?null:S.createElement(`span`,{className:Y(`${w.prefixCls}-switcher`,`${w.prefixCls}-switcher-noop`)},e)}let e=ie(!1);return e===!1?null:S.createElement(`span`,{onClick:re,className:Y(`${w.prefixCls}-switcher`,`${w.prefixCls}-switcher_${u?CX:wX}`)},e)},ae=S.useMemo(()=>{if(!M)return null;let t=typeof M==`boolean`?null:M;return S.createElement(`span`,{className:Y(`${w.prefixCls}-checkbox`,{[`${w.prefixCls}-checkbox-checked`]:f,[`${w.prefixCls}-checkbox-indeterminate`]:!f&&p,[`${w.prefixCls}-checkbox-disabled`]:j||e.disableCheckbox}),onClick:P,role:`checkbox`,"aria-checked":p?`mixed`:f,"aria-disabled":j||e.disableCheckbox,"aria-labelledby":C},t)},[M,f,p,j,e.disableCheckbox,C]),oe=S.useMemo(()=>K?null:u?CX:wX,[K,u]),se=S.useMemo(()=>S.createElement(`span`,{className:Y(T?.itemIcon,`${w.prefixCls}-iconEle`,`${w.prefixCls}-icon__${oe||`docu`}`,{[`${w.prefixCls}-icon_loading`]:m}),style:E?.itemIcon}),[w.prefixCls,oe,m]),ce=S.useMemo(()=>{let n=!!w.draggable;return!e.disabled&&n&&w.dragOverNodeKey===t?w.dropIndicatorRender({dropPosition:w.dropPosition,dropLevelOffset:w.dropLevelOffset,indent:w.indent,prefixCls:w.prefixCls,direction:w.direction}):null},[w.dropPosition,w.dropLevelOffset,w.indent,w.prefixCls,w.direction,w.draggable,w.dragOverNodeKey,w.dropIndicatorRender]),le=S.useMemo(()=>{let{title:t=TX}=e,n=`${w.prefixCls}-node-content-wrapper`,r;if(w.showIcon){let t=e.icon||w.icon;r=t?S.createElement(`span`,{className:Y(T?.itemIcon,`${w.prefixCls}-iconEle`,`${w.prefixCls}-icon__customize`),style:E?.itemIcon},typeof t==`function`?t(e):t):se}else w.loadData&&m&&(r=se);let i;return i=typeof t==`function`?t(_):w.titleRender?w.titleRender(_):t,S.createElement(`span`,{ref:O,title:typeof t==`string`?t:``,className:Y(n,`${n}-${oe||`normal`}`,{[`${w.prefixCls}-node-selected`]:!j&&(d||k)}),onMouseEnter:R,onMouseLeave:z,onContextMenu:B,onClick:I,onDoubleClick:L},r,S.createElement(`span`,{className:Y(`${w.prefixCls}-title`,T?.itemTitle),style:E?.itemTitle},i),ce)},[w.prefixCls,w.showIcon,e,w.icon,se,w.titleRender,_,oe,R,z,B,I,L]),ue=bi(x,{aria:!0,data:!0}),{level:de}=Qz(w.keyEntities,t)||{},fe=l[l.length-1],pe=!j&&V,me=w.draggingNodeKey===t;return S.createElement(`div`,SX({ref:h,role:`treeitem`,id:C,"aria-expanded":K?void 0:u,"aria-selected":F&&!j?d:void 0,"aria-checked":M&&!j?p?`mixed`:f:void 0,"aria-disabled":j,className:Y(n,`${w.prefixCls}-treenode`,T?.item,{[`${w.prefixCls}-treenode-disabled`]:j,[`${w.prefixCls}-treenode-switcher-${u?`open`:`close`}`]:!s,[`${w.prefixCls}-treenode-checkbox-checked`]:f,[`${w.prefixCls}-treenode-checkbox-indeterminate`]:p,[`${w.prefixCls}-treenode-selected`]:d,[`${w.prefixCls}-treenode-loading`]:m,[`${w.prefixCls}-treenode-active`]:g,[`${w.prefixCls}-treenode-leaf-last`]:fe,[`${w.prefixCls}-treenode-draggable`]:V,dragging:me,"drop-target":w.dropTargetKey===t,"drop-container":w.dropContainerKey===t,"drag-over":!j&&i,"drag-over-gap-top":!j&&a,"drag-over-gap-bottom":!j&&o,"filter-node":w.filterTreeNode?.(lB(e)),[`${w.prefixCls}-treenode-leaf`]:K}),style:{...r,...E?.item},draggable:pe,onDragStart:pe?H:void 0,onDragEnter:V?U:void 0,onDragOver:V?ee:void 0,onDragLeave:V?te:void 0,onDrop:V?W:void 0,onDragEnd:V?ne:void 0,onMouseMove:v},ue),S.createElement(xX,{prefixCls:w.prefixCls,level:de,isStart:c,isEnd:l}),q,J(),ae,le)};EX.isTreeNode=1;function DX(e,t){if(!e)return[];let n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function OX(e,t){let n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function kX(e){return e.split(`-`)}function AX(e,t){let n=[],r=Qz(t,e);function i(e=[]){e.forEach(({key:e,children:t})=>{n.push(e),i(t)})}return i(r.children),n}function jX(e){if(e.parent){let t=kX(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function MX(e){let t=kX(e.pos);return Number(t[t.length-1])===0}function NX(e,t,n,r,i,a,o,s,c,l){let{clientX:u,clientY:d}=e,{top:f,height:p}=e.target.getBoundingClientRect(),m=((l===`rtl`?-1:1)*((i?.x||0)-u)-12)/r,h=c.filter(e=>s[e]?.children?.length),g=Qz(s,n.eventKey);if(de.key===g.key),t=o[e<=0?0:e-1].key;g=Qz(s,t)}let _=g.key,v=g,y=g.key,b=0,x=0;if(!h.includes(_))for(let e=0;e-1.5?a({dragNode:S,dropNode:C,dropPosition:1})?b=1:w=!1:a({dragNode:S,dropNode:C,dropPosition:0})?b=0:a({dragNode:S,dropNode:C,dropPosition:1})?b=1:w=!1:a({dragNode:S,dropNode:C,dropPosition:1})?b=1:w=!1,{dropPosition:b,dropLevelOffset:x,dropTargetKey:g.key,dropTargetPos:g.pos,dragOverNodeKey:y,dropContainerKey:b===0?null:g.parent?.key||null,dropAllowed:w}}function PX(e,t){if(!e)return;let{multiple:n}=t;return n?e.slice():e.length?[e[0]]:e}function FX(e){if(!e)return null;let t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(typeof e==`object`)t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return li(!1,"`checkedKeys` is not an array or an object"),null;return t}function IX(e,t){let n=new Set;function r(e){if(n.has(e))return;let i=Qz(t,e);if(!i)return;n.add(e);let{parent:a,node:o}=i;o.disabled||a&&r(a.key)}return(e||[]).forEach(e=>{r(e)}),[...n]}var LX={},RX=`SELECT_ALL`,zX=`SELECT_INVERT`,BX=`SELECT_NONE`,VX=[],HX=(e,t,n=[])=>((t||[]).forEach(t=>{n.push(t),ef(t)&&e in t&&HX(e,t[e],n)}),n),UX=(e,t)=>{let{preserveSelectedRowKeys:n,selectedRowKeys:r,defaultSelectedRowKeys:i,getCheckboxProps:a,getTitleCheckboxProps:o,onChange:s,onSelect:c,onSelectAll:l,onSelectInvert:u,onSelectNone:d,onSelectMultiple:f,columnWidth:p,type:m,selections:h,fixed:g,renderCell:_,hideSelectAll:v,checkStrictly:y=!0}=t||{},{prefixCls:b,data:x,pageData:C,getRecordByKey:w,getRowKey:T,expandType:E,childrenColumnName:D,locale:O,getPopupContainer:k}=e,A=Ui(`Table`),[j,M]=Sf(e=>e),[N,P]=Wn(i||VX,r),F=N??VX,I=S.useRef(new Map),L=(0,S.useCallback)(e=>{if(n){let t=new Map;e.forEach(e=>{let n=w(e);!n&&I.current.has(e)&&(n=I.current.get(e)),t.set(e,n)}),I.current=t}},[w,n]);S.useEffect(()=>{L(F)},[F,L]);let R=(0,S.useMemo)(()=>HX(D,C),[D,C]),{keyEntities:z}=(0,S.useMemo)(()=>{if(y)return{keyEntities:null};let e=x;if(n){let t=new Set(R.map(T)),n=Array.from(I.current).reduce((e,[n,r])=>t.has(n)?e:e.concat(r),[]);e=[].concat(da(e),da(n))}return oB(e,{externalGetKey:T,childrenPropName:D})},[x,T,y,D,n,R]),B=(0,S.useMemo)(()=>{let e=new Map;return R.forEach((t,n)=>{let r=T(t,n),i=(a?a(t):null)||{};e.set(r,i)}),e},[R,T,a]),V=(0,S.useCallback)(e=>{let t=T(e),n;return n=B.has(t)?B.get(T(e)):a?a(e):void 0,!!n?.disabled},[B,T]),[H,U]=(0,S.useMemo)(()=>{if(y)return[F,[]];let{checkedKeys:e,halfCheckedKeys:t}=_B(F,!0,z,V);return[e||[],t]},[F,y,z,V]),ee=(0,S.useMemo)(()=>{let e=m===`radio`?H.slice(0,1):H;return new Set(e)},[H,m]),te=(0,S.useMemo)(()=>m===`radio`?new Set:new Set(U),[U,m]);S.useEffect(()=>{t||P(VX)},[!!t]);let ne=(0,S.useCallback)((e,t)=>{let r,i;L(e),n?(r=e,i=e.map(e=>I.current.get(e))):(r=[],i=[],e.forEach(e=>{let t=w(e);t!==void 0&&(r.push(e),i.push(t))})),P(r),s?.(r,i,{type:t})},[P,w,s,n]),W=(0,S.useCallback)((e,t,n,r)=>{if(c){let i=n.map(w);c(w(e),t,i,r)}ne(n,`single`)},[c,w,ne]),re=(0,S.useMemo)(()=>!h||v?null:(h===!0?[RX,zX,BX]:h).map(e=>e===`SELECT_ALL`?{key:`all`,text:O.selectionAll,onSelect(){ne(x.map((e,t)=>T(e,t)).filter(e=>!B.get(e)?.disabled||ee.has(e)),`all`)}}:e===`SELECT_INVERT`?{key:`invert`,text:O.selectInvert,onSelect(){let e=new Set(ee);C.forEach((t,n)=>{let r=T(t,n);B.get(r)?.disabled||(e.has(r)?e.delete(r):e.add(r))});let t=Array.from(e);u&&(A.deprecated(!1,`onSelectInvert`,`onChange`),u(t)),ne(t,`invert`)}}:e===`SELECT_NONE`?{key:`none`,text:O.selectNone,onSelect(){d?.(),ne(Array.from(ee).filter(e=>B.get(e)?.disabled),`none`)}}:e).map(e=>({...e,onSelect:(...t)=>{e.onSelect?.(...t),M(null)}})),[h,v,O.selectionAll,O.selectInvert,O.selectNone,B,ee,x,C,T,u,ne]);return[(0,S.useCallback)(e=>{if(!t)return e.filter(e=>e!==LX);let n=da(e),r=new Set(ee),i=R.map(T).filter(e=>!B.get(e).disabled),a=i.every(e=>r.has(e)),s=i.some(e=>r.has(e)),c=()=>{let e=[];a?i.forEach(t=>{r.delete(t),e.push(t)}):i.forEach(t=>{r.has(t)||(r.add(t),e.push(t))});let t=Array.from(r);l?.(!a,t.map(w),e.map(w)),ne(t,`all`),M(null)},u,d;if(m!==`radio`){let e;if(re){let t={getPopupContainer:k,items:re.map((e,t)=>{let{key:n,text:r,onSelect:a}=e;return{key:n??t,onClick:()=>{a?.(i)},label:r}})};e=S.createElement(`div`,{className:`${b}-selection-extra`},S.createElement(kU,{menu:t,getPopupContainer:k},S.createElement(`span`,null,S.createElement(tw,null))))}let t=R.map((e,t)=>{let n=T(e,t),i=B.get(n)||{};return{checked:r.has(n),...i}}).filter(({disabled:e})=>e),n=!!t.length&&t.length===R.length,l=n&&t.every(({checked:e})=>e),f=n&&t.some(({checked:e})=>e),p=o?.()||{},{onChange:m,disabled:h}=p;d=S.createElement(aV,{"aria-label":e?`Custom selection`:`Select all`,...p,checked:n?l:!!R.length&&a,indeterminate:n?!l&&f:!a&&s,onChange:e=>{c(),m?.(e)},disabled:h??(R.length===0||n),skipGroup:!0}),u=!v&&S.createElement(`div`,{className:`${b}-selection`},d,e)}let x;x=m===`radio`?(e,t,n)=>{let i=T(t,n),a=r.has(i),o=B.get(i);return{node:S.createElement(LL,{...o,checked:a,onClick:e=>{e.stopPropagation(),o?.onClick?.(e)},onChange:e=>{r.has(i)||W(i,!0,[i],e.nativeEvent),o?.onChange?.(e)}}),checked:a}}:(e,t,n)=>{let a=T(t,n),o=r.has(a),s=te.has(a),c=B.get(a),l;return l=E===`nest`?s:c?.indeterminate??s,{node:S.createElement(aV,{...c,indeterminate:l,checked:o,skipGroup:!0,onClick:e=>{e.stopPropagation(),c?.onClick?.(e)},onChange:e=>{let{nativeEvent:t}=e,{shiftKey:n}=t,s=i.indexOf(a),l=H.some(e=>i.includes(e));if(n&&y&&l){let e=j(s,i,r),t=Array.from(r);f?.(!o,t.map(w),e.map(w)),ne(t,`multiple`)}else{let e=H;if(y){let n=o?DX(e,a):OX(e,a);W(a,!o,n,t)}else{let{checkedKeys:n,halfCheckedKeys:r}=_B([].concat(da(e),[a]),!0,z,V),i=n;if(o){let e=new Set(n);e.delete(a),i=_B(Array.from(e),{checked:!1,halfCheckedKeys:r},z,V).checkedKeys}W(a,!o,i,t)}}M(o?null:s),c?.onChange?.(e)}}),checked:o}};let C=(e,t,n)=>{let{node:r,checked:i}=x(e,t,n);return _?_(i,t,n,r):r};if(!n.includes(LX))if(n.findIndex(e=>e.RC_TABLE_INTERNAL_COL_DEFINE?.columnType===`EXPAND_COLUMN`)===0){let[e,...t]=n;n=[e,LX].concat(da(t))}else n=[LX].concat(da(n));let D=n.indexOf(LX);n=n.filter((e,t)=>e!==LX||t===D);let O=n[D-1],A=n[D+1],N=g;N===void 0&&(A?.fixed===void 0?O?.fixed!==void 0&&(N=O.fixed):N=A.fixed),N&&O&&O.RC_TABLE_INTERNAL_COL_DEFINE?.columnType===`EXPAND_COLUMN`&&O.fixed===void 0&&(O.fixed=N);let P=Y(`${b}-selection-col`,{[`${b}-selection-col-with-dropdown`]:h&&m===`checkbox`}),F={fixed:N,width:p,className:`${b}-selection-column`,title:t?.columnTitle?typeof t.columnTitle==`function`?t.columnTitle(d):t.columnTitle:u,render:C,onCell:t.onCell,align:t.align,[yY]:{className:P}};return n.map(e=>e===LX?F:e)},[T,R,t,H,ee,te,p,re,E,B,f,W,V]),ee]};function WX(e){return t=>{let{prefixCls:n,onExpand:r,record:i,expanded:a,expandable:o}=t,s=`${n}-row-expand-icon`;return S.createElement(`button`,{type:`button`,onClick:e=>{r(i,e),e.stopPropagation()},className:Y(s,{[`${s}-spaced`]:!o,[`${s}-expanded`]:o&&a,[`${s}-collapsed`]:o&&!a}),"aria-label":a?e.collapse:e.expand,"aria-expanded":a})}}function GX(e){return(t,n)=>{let r=t.querySelector(`.${e}-container`),i=n;if(r){let e=getComputedStyle(r),t=Number.parseInt(e.borderLeftWidth,10),a=Number.parseInt(e.borderRightWidth,10);i=n-t-a}return i}}var KX=(e,t)=>`key`in e&&Zd(e.key)?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join(`.`):e.dataIndex:t;function qX(e,t){return t?`${t}-${e}`:`${e}`}var JX=(e,t)=>typeof e==`function`?e(t):e,YX=(e,t)=>{let n=JX(e,t);return Object.prototype.toString.call(n)===`[object Object]`?``:n},XX=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z`}}]},name:`filter`,theme:`filled`}}))());function ZX(){return ZX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,ZX({},e,{ref:t,icon:XX.default}))),$X=e=>{let{dropPosition:t,dropLevelOffset:n,indent:r}=e,i={pointerEvents:`none`,position:`absolute`,right:0,backgroundColor:`red`,height:2};switch(t){case-1:i.top=0,i.left=-n*r;break;case 1:i.bottom=0,i.left=-n*r;break;case 0:i.bottom=0,i.left=r;break}return S.createElement(`div`,{style:i})};function eZ(e,t){let[n,r]=S.useState(!1);Vn(()=>{if(n)return e(),()=>{t()}},[n]),Vn(()=>(r(!0),()=>{r(!1)}),[])}function tZ(){return tZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:n,style:r,motion:i,motionNodes:a,motionType:o,onMotionStart:s,onMotionEnd:c,active:l,treeNodeRequiredProps:u,...d}=e,[f,p]=S.useState(!0),{prefixCls:m}=S.useContext(yX),h=a&&o!==`hide`;Vn(()=>{a&&h!==f&&p(h)},[a]);let g=()=>{a&&s()},_=S.useRef(!1),v=()=>{a&&!_.current&&(_.current=!0,c())};return eZ(g,v),a?S.createElement(Ed,tZ({ref:t,visible:f},i,{motionAppear:o===`show`,onVisibleChanged:e=>{h===e&&v()}}),({className:e,style:t},n)=>S.createElement(`div`,{ref:n,className:Y(`${m}-treenode-motion`,e),style:t},a.map(e=>{let{data:{...t},title:n,key:r,isStart:i,isEnd:a}=e;delete t.children;let o=cB(r,u);return S.createElement(EX,tZ({},t,o,{title:n,active:l,data:e.data,key:r,isStart:i,isEnd:a}))}))):S.createElement(EX,tZ({domRef:t,className:n,style:r},d,{active:l}))});function rZ(e=[],t=[]){let n=e.length,r=t.length;if(Math.abs(n-r)!==1)return{add:!1,key:null};function i(e,t){let n=new Map;e.forEach(e=>{n.set(e,!0)});let r=t.filter(e=>!n.has(e));return r.length===1?r[0]:null}return ne.key===n)+1],i=t.findIndex(e=>e.key===n);if(r){let e=t.findIndex(e=>e.key===r.key);return t.slice(i+1,e)}return t.slice(i+1)}function aZ(){return aZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,data:r,selectable:i,checkable:a,expandedKeys:o,selectedKeys:s,checkedKeys:c,loadedKeys:l,loadingKeys:u,halfCheckedKeys:d,keyEntities:f,disabled:p,dragging:m,dragOverNodeKey:h,dropPosition:g,motion:_,height:v,itemHeight:y,virtual:b,scrollWidth:x,focusable:C,activeItem:w,tabIndex:T,onKeyDown:E,onFocus:D,onBlur:O,onMouseDown:k,onMouseUp:A,onActiveChange:j,onListChangeStart:M,onListChangeEnd:N,...P}=e,F=Yn(),I=S.useRef(null),L=S.useRef(null);S.useImperativeHandle(t,()=>({scrollTo:e=>{I.current.scrollTo(e)},getIndentWidth:()=>L.current.offsetWidth}));let[R,z]=S.useState(o),[B,V]=S.useState(r),[H,U]=S.useState(r),[ee,te]=S.useState([]),[ne,W]=S.useState(null),re=S.useRef(r);re.current=r;function G(){let e=re.current;V(e),U(e),te([]),W(null),N()}Vn(()=>{z(o);let e=rZ(R,o);if(e.key!==null)if(e.add){let t=B.findIndex(({key:t})=>t===e.key),n=uZ(iZ(B,r,e.key),b,v,y),i=B.slice();i.splice(t+1,0,lZ),U(i),te(n),W(`show`)}else{let t=r.findIndex(({key:t})=>t===e.key),n=uZ(iZ(r,B,e.key),b,v,y),i=r.slice();i.splice(t+1,0,lZ),U(i),te(n),W(`hide`)}else B!==r&&(V(r),U(r))},[o,r]),S.useEffect(()=>{m||G()},[m]);let K=_?H:r,q={expandedKeys:o,selectedKeys:s,loadedKeys:l,loadingKeys:u,checkedKeys:c,halfCheckedKeys:d,dragOverNodeKey:h,dropPosition:g,keyEntities:f};return S.createElement(S.Fragment,null,S.createElement(`div`,{className:`${n}-treenode`,"aria-hidden":!0,style:{position:`absolute`,pointerEvents:`none`,visibility:`hidden`,height:0,overflow:`hidden`,border:0,padding:0}},S.createElement(`div`,{className:`${n}-indent`},S.createElement(`div`,{ref:L,className:`${n}-indent-unit`}))),S.createElement(sC,aZ({},P,{data:K,itemKey:dZ,height:v,fullHeight:!1,virtual:b,itemHeight:y,scrollWidth:x,prefixCls:`${n}-list`,ref:I,role:`tree`,tabIndex:C!==!1&&!p?T:void 0,"aria-activedescendant":w?qn(F,w.key):void 0,onKeyDown:E,onFocus:D,onBlur:O,onMouseDown:k,onMouseUp:A,onVisibleChange:e=>{e.every(e=>dZ(e)!==oZ)&&G()}}),e=>{let{pos:t,data:{...n},title:r,key:i,isStart:a,isEnd:o}=e,s=tB(i,t);delete n.key,delete n.children;let c=cB(s,q);return S.createElement(nZ,aZ({},n,c,{title:r,active:!!w&&i===w.key,pos:t,data:e.data,isStart:a,isEnd:o,motion:_,motionNodes:i===oZ?ee:null,motionType:ne,onMotionStart:M,onMotionEnd:G,treeNodeRequiredProps:q,treeId:F,onMouseMove:()=>{j(null)}}))}))});function pZ(){return pZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t!0,expandAction:!1};static TreeNode=EX;destroyed=!1;delayedDragEnterLogic;loadingRetryTimes={};state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],activeKey:null,listChanging:!1,prevProps:null,fieldNames:nB()};dragStartMousePosition=null;dragNodeProps=null;currentMouseOverDroppableNodeKey=null;focusedByMouse=!1;listRef=S.createRef();componentDidMount(){this.destroyed=!1,this.onUpdated()}componentDidUpdate(){this.onUpdated()}onUpdated(){let{activeKey:e,itemScrollOffset:t=0}=this.props;e!==void 0&&e!==this.state.activeKey&&(this.setState({activeKey:e}),e!==null&&this.scrollTo({key:e,offset:t}))}componentWillUnmount(){window.removeEventListener(`dragend`,this.onWindowDragEnd),this.destroyed=!0}static getDerivedStateFromProps(e,t){let{prevProps:n}=t,r={prevProps:e};function i(t){return!n&&e.hasOwnProperty(t)||n&&n[t]!==e[t]}let a,{fieldNames:o}=t;if(i(`fieldNames`)&&(o=nB(e.fieldNames),r.fieldNames=o),i(`treeData`)?{treeData:a}=e:i(`children`)&&(li(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),a=rB(e.children)),a){r.treeData=a;let e=oB(a,{fieldNames:o});r.keyEntities={[oZ]:cZ,...e.keyEntities}}let s=r.keyEntities||t.keyEntities;if(i(`expandedKeys`)||n&&i(`autoExpandParent`))r.expandedKeys=e.autoExpandParent||!n&&e.defaultExpandParent?IX(e.expandedKeys,s):e.expandedKeys;else if(!n&&e.defaultExpandAll){let e={...s};delete e[oZ];let t=[];Object.keys(e).forEach(n=>{let r=e[n];r.children&&r.children.length&&t.push(r.key)}),r.expandedKeys=t}else !n&&e.defaultExpandedKeys&&(r.expandedKeys=e.autoExpandParent||e.defaultExpandParent?IX(e.defaultExpandedKeys,s):e.defaultExpandedKeys);if(r.expandedKeys||delete r.expandedKeys,(a||r.expandedKeys)&&(r.flattenNodes=iB(a||t.treeData,r.expandedKeys||t.expandedKeys,o)),e.selectable&&(i(`selectedKeys`)?r.selectedKeys=PX(e.selectedKeys,e):!n&&e.defaultSelectedKeys&&(r.selectedKeys=PX(e.defaultSelectedKeys,e))),e.checkable){let o;if(i(`checkedKeys`)?o=FX(e.checkedKeys)||{}:!n&&e.defaultCheckedKeys?o=FX(e.defaultCheckedKeys)||{}:a&&(o=FX(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),o){let{checkedKeys:t=[],halfCheckedKeys:n=[]}=o;if(!e.checkStrictly){let e=_B(t,!0,s);({checkedKeys:t,halfCheckedKeys:n}=e)}r.checkedKeys=t,r.halfCheckedKeys=n}}return i(`loadedKeys`)&&(r.loadedKeys=e.loadedKeys),r}onNodeDragStart=(e,t)=>{let{expandedKeys:n,keyEntities:r}=this.state,{onDragStart:i}=this.props,{eventKey:a}=t;this.dragNodeProps=t,this.dragStartMousePosition={x:e.clientX,y:e.clientY};let o=DX(n,a);this.setState({draggingNodeKey:a,dragChildrenKeys:AX(a,r),indent:this.listRef.current.getIndentWidth()}),this.setExpandedKeys(o),window.addEventListener(`dragend`,this.onWindowDragEnd),i?.({event:e,node:lB(t)})};onNodeDragEnter=(e,t)=>{let{expandedKeys:n,keyEntities:r,dragChildrenKeys:i,flattenNodes:a,indent:o}=this.state,{onDragEnter:s,onExpand:c,allowDrop:l,direction:u}=this.props,{pos:d,eventKey:f}=t;if(this.currentMouseOverDroppableNodeKey!==f&&(this.currentMouseOverDroppableNodeKey=f),!this.dragNodeProps){this.resetDragState();return}let{dropPosition:p,dropLevelOffset:m,dropTargetKey:h,dropContainerKey:g,dropTargetPos:_,dropAllowed:v,dragOverNodeKey:y}=NX(e,this.dragNodeProps,t,o,this.dragStartMousePosition,l,a,r,n,u);if(i.includes(h)||!v){this.resetDragState();return}if(this.delayedDragEnterLogic||={},Object.keys(this.delayedDragEnterLogic).forEach(e=>{clearTimeout(this.delayedDragEnterLogic[e])}),this.dragNodeProps.eventKey!==t.eventKey&&(e.persist(),this.delayedDragEnterLogic[d]=window.setTimeout(()=>{if(this.state.draggingNodeKey===null)return;let i=[...n],a=Qz(r,t.eventKey);a&&(a.children||[]).length&&(i=OX(n,t.eventKey)),this.props.hasOwnProperty(`expandedKeys`)||this.setExpandedKeys(i),c?.(i,{node:lB(t),expanded:!0,nativeEvent:e.nativeEvent})},800)),this.dragNodeProps.eventKey===h&&m===0){this.resetDragState();return}this.setState({dragOverNodeKey:y,dropPosition:p,dropLevelOffset:m,dropTargetKey:h,dropContainerKey:g,dropTargetPos:_,dropAllowed:v}),s?.({event:e,node:lB(t),expandedKeys:n})};onNodeDragOver=(e,t)=>{let{dragChildrenKeys:n,flattenNodes:r,keyEntities:i,expandedKeys:a,indent:o}=this.state,{onDragOver:s,allowDrop:c,direction:l}=this.props;if(!this.dragNodeProps)return;let{dropPosition:u,dropLevelOffset:d,dropTargetKey:f,dropContainerKey:p,dropTargetPos:m,dropAllowed:h,dragOverNodeKey:g}=NX(e,this.dragNodeProps,t,o,this.dragStartMousePosition,c,r,i,a,l);n.includes(f)||!h||(this.dragNodeProps.eventKey===f&&d===0?this.state.dropPosition===null&&this.state.dropLevelOffset===null&&this.state.dropTargetKey===null&&this.state.dropContainerKey===null&&this.state.dropTargetPos===null&&this.state.dropAllowed===!1&&this.state.dragOverNodeKey===null||this.resetDragState():u===this.state.dropPosition&&d===this.state.dropLevelOffset&&f===this.state.dropTargetKey&&p===this.state.dropContainerKey&&m===this.state.dropTargetPos&&h===this.state.dropAllowed&&g===this.state.dragOverNodeKey||this.setState({dropPosition:u,dropLevelOffset:d,dropTargetKey:f,dropContainerKey:p,dropTargetPos:m,dropAllowed:h,dragOverNodeKey:g}),s?.({event:e,node:lB(t)}))};onNodeDragLeave=(e,t)=>{this.currentMouseOverDroppableNodeKey===t.eventKey&&!e.currentTarget.contains(e.relatedTarget)&&(this.resetDragState(),this.currentMouseOverDroppableNodeKey=null);let{onDragLeave:n}=this.props;n?.({event:e,node:lB(t)})};onWindowDragEnd=e=>{this.onNodeDragEnd(e,null,!0),window.removeEventListener(`dragend`,this.onWindowDragEnd)};onNodeDragEnd=(e,t)=>{let{onDragEnd:n}=this.props;this.setState({dragOverNodeKey:null}),this.cleanDragState(),n?.({event:e,node:lB(t)}),this.dragNodeProps=null,window.removeEventListener(`dragend`,this.onWindowDragEnd)};onNodeDrop=(e,t,n=!1)=>{let{dragChildrenKeys:r,dropPosition:i,dropTargetKey:a,dropTargetPos:o,dropAllowed:s}=this.state;if(!s)return;let{onDrop:c}=this.props;if(this.setState({dragOverNodeKey:null}),this.cleanDragState(),a===null)return;let l={...cB(a,this.getTreeNodeRequiredProps()),active:this.getActiveItem()?.key===a,data:Qz(this.state.keyEntities,a).node};li(!r.includes(a),`Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.`);let u=kX(o),d={event:e,node:lB(l),dragNode:this.dragNodeProps?lB(this.dragNodeProps):null,dragNodesKeys:[this.dragNodeProps.eventKey].concat(r),dropToGap:i!==0,dropPosition:i+Number(u[u.length-1])};n||c?.(d),this.dragNodeProps=null};resetDragState(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}cleanDragState=()=>{let{draggingNodeKey:e}=this.state;e!==null&&this.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),this.dragStartMousePosition=null,this.currentMouseOverDroppableNodeKey=null};triggerExpandActionExpand=(e,t)=>{let{expandedKeys:n,flattenNodes:r}=this.state,{expanded:i,key:a,isLeaf:o}=t;if(o||e.shiftKey||e.metaKey||e.ctrlKey)return;let s=r.filter(e=>e.key===a)[0],c=lB({...cB(a,this.getTreeNodeRequiredProps()),data:s.data});this.setExpandedKeys(i?DX(n,a):OX(n,a)),this.onNodeExpand(e,c)};onNodeClick=(e,t)=>{let{onClick:n,expandAction:r}=this.props;r===`click`&&this.triggerExpandActionExpand(e,t),n?.(e,t)};onNodeDoubleClick=(e,t)=>{let{onDoubleClick:n,expandAction:r}=this.props;r===`doubleClick`&&this.triggerExpandActionExpand(e,t),n?.(e,t)};onNodeSelect=(e,t)=>{let{selectedKeys:n}=this.state,{keyEntities:r,fieldNames:i}=this.state,{onSelect:a,multiple:o}=this.props,{selected:s}=t,c=t[i.key],l=!s;n=l?o?OX(n,c):[c]:DX(n,c);let u=n.map(e=>{let t=Qz(r,e);return t?t.node:null}).filter(Boolean);this.setUncontrolledState({selectedKeys:n}),a?.(n,{event:`select`,selected:l,node:t,selectedNodes:u,nativeEvent:e.nativeEvent})};onNodeCheck=(e,t,n)=>{let{keyEntities:r,checkedKeys:i,halfCheckedKeys:a}=this.state,{checkStrictly:o,onCheck:s}=this.props,{key:c}=t,l,u={event:`check`,node:t,checked:n,nativeEvent:e.nativeEvent};if(o){let e=n?OX(i,c):DX(i,c);l={checked:e,halfChecked:DX(a,c)},u.checkedNodes=e.map(e=>Qz(r,e)).filter(Boolean).map(e=>e.node),this.setUncontrolledState({checkedKeys:e})}else{let{checkedKeys:e,halfCheckedKeys:t}=_B([...i,c],!0,r);if(!n){let n=new Set(e);n.delete(c),{checkedKeys:e,halfCheckedKeys:t}=_B(Array.from(n),{checked:!1,halfCheckedKeys:t},r)}l=e,u.checkedNodes=[],u.checkedNodesPositions=[],u.halfCheckedKeys=t,e.forEach(e=>{let t=Qz(r,e);if(!t)return;let{node:n,pos:i}=t;u.checkedNodes.push(n),u.checkedNodesPositions.push({node:n,pos:i})}),this.setUncontrolledState({checkedKeys:e},!1,{halfCheckedKeys:t})}s?.(l,u)};onNodeLoad=e=>{let{key:t}=e,{keyEntities:n}=this.state;if(Qz(n,t)?.children?.length)return;let r=new Promise((n,r)=>{this.setState(({loadedKeys:i=[],loadingKeys:a=[]})=>{let{loadData:o,onLoad:s}=this.props;return!o||i.includes(t)||a.includes(t)?null:(o(e).then(()=>{let{loadedKeys:r}=this.state,i=OX(r,t);s?.(i,{event:`load`,node:e}),this.setUncontrolledState({loadedKeys:i}),this.setState(e=>({loadingKeys:DX(e.loadingKeys,t)})),n()}).catch(e=>{if(this.setState(e=>({loadingKeys:DX(e.loadingKeys,t)})),this.loadingRetryTimes[t]=(this.loadingRetryTimes[t]||0)+1,this.loadingRetryTimes[t]>=mZ){let{loadedKeys:e}=this.state;li(!1,"Retry for `loadData` many times but still failed. No more retry."),this.setUncontrolledState({loadedKeys:OX(e,t)}),n()}r(e)}),{loadingKeys:OX(a,t)})})});return r.catch(()=>{}),r};onNodeMouseEnter=(e,t)=>{let{onMouseEnter:n}=this.props;n?.({event:e,node:t})};onNodeMouseLeave=(e,t)=>{let{onMouseLeave:n}=this.props;n?.({event:e,node:t})};onNodeContextMenu=(e,t)=>{let{onRightClick:n}=this.props;n&&(e.preventDefault(),n({event:e,node:t}))};onMouseDown=e=>{this.focusedByMouse=!0;let{onMouseDown:t}=this.props;t?.(e)};onMouseUp=e=>{this.focusedByMouse=!1;let{onMouseUp:t}=this.props;t?.(e)};onFocus=(...e)=>{let{onFocus:t,disabled:n}=this.props,{activeKey:r,selectedKeys:i,flattenNodes:a}=this.state;if(!this.focusedByMouse&&!n&&r===null){let e=i.find(e=>a.some(t=>t.key===e));e===void 0?this.onActiveChange(a?.[0]?.key||null):this.onActiveChange(e)}t?.(...e)};onBlur=(...e)=>{this.focusedByMouse=!1;let{onBlur:t}=this.props;this.onActiveChange(null),t?.(...e)};getTreeNodeRequiredProps=()=>{let{expandedKeys:e,selectedKeys:t,loadedKeys:n,loadingKeys:r,checkedKeys:i,halfCheckedKeys:a,dragOverNodeKey:o,dropPosition:s,keyEntities:c}=this.state;return{expandedKeys:e||[],selectedKeys:t||[],loadedKeys:n||[],loadingKeys:r||[],checkedKeys:i||[],halfCheckedKeys:a||[],dragOverNodeKey:o,dropPosition:s,keyEntities:c}};setExpandedKeys=e=>{let{treeData:t,fieldNames:n}=this.state,r=iB(t,e,n);this.setUncontrolledState({expandedKeys:e,flattenNodes:r},!0)};onNodeExpand=(e,t)=>{let{expandedKeys:n}=this.state,{listChanging:r,fieldNames:i}=this.state,{onExpand:a,loadData:o}=this.props,{expanded:s}=t,c=t[i.key];if(r)return;let l=n.includes(c),u=!s;if(li(s&&l||!s&&!l,`Expand state not sync with index check`),n=u?OX(n,c):DX(n,c),this.setExpandedKeys(n),a?.(n,{node:t,expanded:u,nativeEvent:e.nativeEvent}),u&&o){let e=this.onNodeLoad(t);e&&e.then(()=>{let e=iB(this.state.treeData,n,i);this.setUncontrolledState({flattenNodes:e})}).catch(()=>{let{expandedKeys:e}=this.state,t=DX(e,c);this.setExpandedKeys(t)})}};onListChangeStart=()=>{this.setUncontrolledState({listChanging:!0})};onListChangeEnd=()=>{setTimeout(()=>{this.setUncontrolledState({listChanging:!1})})};onActiveChange=e=>{let{activeKey:t}=this.state,{onActiveChange:n,itemScrollOffset:r=0}=this.props;t!==e&&(this.setState({activeKey:e}),e!==null&&this.scrollTo({key:e,offset:r}),n?.(e))};getActiveItem=()=>{let{activeKey:e,flattenNodes:t}=this.state;return e===null?null:t.find(({key:t})=>t===e)||null};offsetActiveKey=e=>{let{flattenNodes:t,activeKey:n}=this.state,r=t.findIndex(({key:e})=>e===n);r===-1&&e<0&&(r=t.length),r=(r+e+t.length)%t.length;let i=t[r];if(i){let{key:e}=i;this.onActiveChange(e)}else this.onActiveChange(null)};onKeyDown=e=>{let{activeKey:t,expandedKeys:n,checkedKeys:r,flattenNodes:i,keyEntities:a}=this.state,{onKeyDown:o,checkable:s,selectable:c,disabled:l,loadData:u}=this.props;if(l)return;switch(e.key){case`ArrowUp`:this.offsetActiveKey(-1),e.preventDefault();break;case`ArrowDown`:this.offsetActiveKey(1),e.preventDefault();break;case`Home`:this.onActiveChange(i?.[0]?.key),e.preventDefault();break;case`End`:this.onActiveChange(i?.[i.length-1]?.key),e.preventDefault();break}let d=this.getActiveItem();if(d&&d.data){let i=lB({...cB(t,this.getTreeNodeRequiredProps()),data:d.data,active:!0}),o=!!Qz(a,t)?.children?.length,l=!sB(d.data.isLeaf,u,o,i.loaded),f=s&&!i.disabled&&i.checkable!==!1&&!i.disableCheckbox,p=!s&&c&&!i.disabled&&i.selectable!==!1;switch(e.key){case`ArrowLeft`:l&&n.includes(t)?this.onNodeExpand({},i):d.parent&&this.onActiveChange(d.parent.key),e.preventDefault();break;case`ArrowRight`:l&&!n.includes(t)?this.onNodeExpand({},i):d.children&&d.children.length&&this.onActiveChange(d.children[0].key),e.preventDefault();break;case`Enter`:l?(e.preventDefault(),this.onNodeExpand({},i)):f?r.includes(t)||(e.preventDefault(),this.onNodeCheck({},i,!0)):p&&!i.selected&&(e.preventDefault(),this.onNodeSelect({},i));break;case` `:f?(e.preventDefault(),this.onNodeCheck({},i,!r.includes(t))):p&&(e.preventDefault(),this.onNodeSelect({},i));break}}o?.(e)};setUncontrolledState=(e,t=!1,n=null)=>{if(!this.destroyed){let r=!1,i=!0,a={};Object.keys(e).forEach(t=>{if(this.props.hasOwnProperty(t)){i=!1;return}r=!0,a[t]=e[t]}),r&&(!t||i)&&this.setState({...a,...n})}};scrollTo=e=>{this.listRef.current.scrollTo(e)};render(){let{flattenNodes:e,keyEntities:t,draggingNodeKey:n,dropLevelOffset:r,dropContainerKey:i,dropTargetKey:a,dropPosition:o,dragOverNodeKey:s,indent:c}=this.state,{prefixCls:l,className:u,style:d,styles:f,classNames:p,showLine:m,focusable:h,tabIndex:g=0,selectable:_,showIcon:v,icon:y,switcherIcon:b,draggable:x,checkable:C,checkStrictly:w,disabled:T,motion:E,loadData:D,filterTreeNode:O,height:k,itemHeight:A,scrollWidth:j,virtual:M,titleRender:N,dropIndicatorRender:P,onContextMenu:F,onScroll:I,direction:L,rootClassName:R,rootStyle:z}=this.props,B=bi(this.props,{aria:!0,data:!0}),V;x&&(V=typeof x==`object`?x:typeof x==`function`?{nodeDraggable:x}:{});let H={styles:f,classNames:p,prefixCls:l,selectable:_,showIcon:v,icon:y,switcherIcon:b,draggable:V,draggingNodeKey:n,checkable:C,checkStrictly:w,disabled:T,keyEntities:t,dropLevelOffset:r,dropContainerKey:i,dropTargetKey:a,dropPosition:o,dragOverNodeKey:s,indent:c,direction:L,dropIndicatorRender:P,loadData:D,filterTreeNode:O,titleRender:N,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return S.createElement(yX.Provider,{value:H},S.createElement(`div`,{className:Y(l,u,R,{[`${l}-show-line`]:m}),style:z},S.createElement(fZ,pZ({ref:this.listRef,prefixCls:l,style:d,data:e,disabled:T,selectable:_,checkable:!!C,motion:E,dragging:n!==null,height:k,itemHeight:A,virtual:M,focusable:h,tabIndex:g,activeItem:this.getActiveItem(),onFocus:this.onFocus,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:F,onScroll:I,scrollWidth:j},this.getTreeNodeRequiredProps(),B))))}},gZ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z`}}]},name:`file`,theme:`outlined`}}))());function _Z(){return _Z=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,_Z({},e,{ref:t,icon:gZ.default}))),yZ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z`}}]},name:`folder-open`,theme:`outlined`}}))());function bZ(){return bZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,bZ({},e,{ref:t,icon:yZ.default}))),SZ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z`}}]},name:`folder`,theme:`outlined`}}))());function CZ(){return CZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,CZ({},e,{ref:t,icon:SZ.default}))),TZ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z`}}]},name:`holder`,theme:`outlined`}}))());function EZ(){return EZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,EZ({},e,{ref:t,icon:TZ.default}))),OZ=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:n,directoryNodeSelectedColor:r,motionDurationMid:i,borderRadius:a,controlItemBgHover:o})=>({[`${e}${e}-directory ${t}`]:{[`${e}-node-content-wrapper`]:{position:`static`,[`&:has(${e}-drop-indicator)`]:{position:`relative`},[`> *:not(${e}-drop-indicator)`]:{position:`relative`},"&:hover":{background:`transparent`},"&:before":{position:`absolute`,inset:0,transition:`background-color ${i}`,content:`""`,borderRadius:a},"&:hover:before":{background:o}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:n,borderRadius:a,[`${e}-switcher, ${e}-draggable-icon`]:{color:r},[`${e}-node-content-wrapper`]:{color:r,background:`transparent`,"&, &:hover":{color:r},"&:before, &:hover:before":{background:n}}}}}),kZ=new As(`ant-tree-node-fx-do-not-use`,{"0%":{opacity:0},"100%":{opacity:1}}),AZ=(e,t)=>({[`.${e}-switcher-icon`]:{display:`inline-block`,fontSize:10,verticalAlign:`baseline`,svg:{transition:`transform ${t.motionDurationSlow}`}}}),jZ=(e,t)=>({[`.${e}-drop-indicator`]:{position:`absolute`,zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:`none`,"&:after":{position:`absolute`,top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:`transparent`,border:`${X(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:`50%`,content:`""`}}}),MZ=(e,t)=>{let{treeCls:n,treeNodeCls:r,treeNodePadding:i,titleHeight:a,indentSize:o,switcherSize:s,motionDurationMid:c,nodeSelectedBg:l,nodeHoverBg:u,colorTextQuaternary:d,controlItemBgActiveDisabled:f}=t;return{[n]:{...Vl(t),"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:`rtl`},[`&${n}-rtl ${n}-switcher_close ${n}-switcher-icon svg`]:{transform:`rotate(90deg)`},[`${n}-list`]:{"&:focus-visible":{outline:`none`,[`${r}-active ${n}-node-content-wrapper`]:{...Wl(t)}}},[`${n}-list-holder-inner`]:{alignItems:`flex-start`},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:`stretch`,[`${n}-node-content-wrapper`]:{flex:`auto`},[`${r}.dragging:after`]:{position:`absolute`,inset:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:kZ,animationDuration:t.motionDurationSlow,animationPlayState:`running`,animationFillMode:`forwards`,content:`""`,pointerEvents:`none`,borderRadius:t.borderRadius}}},[r]:{display:`flex`,alignItems:`flex-start`,marginBottom:i,lineHeight:X(a),position:`relative`,"&:before":{content:`""`,position:`absolute`,zIndex:1,insetInlineStart:0,width:`100%`,top:`100%`,height:i},[`&-disabled ${n}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:`not-allowed`,"&:hover":{background:`transparent`}},[`${n}-checkbox-disabled + ${n}-node-selected,&${r}-disabled${r}-selected ${n}-node-content-wrapper`]:{backgroundColor:f},[`${n}-checkbox-disabled`]:{pointerEvents:`unset`},[`&:not(${r}-disabled)`]:{[`${n}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${n}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${r}-disabled).filter-node ${n}-title`]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:`grab`,[`${n}-draggable-icon`]:{flexShrink:0,width:s,textAlign:`center`,visibility:`visible`,color:d},[`&${r}-disabled ${n}-draggable-icon`]:{visibility:`hidden`}}},[`${n}-indent`]:{alignSelf:`stretch`,whiteSpace:`nowrap`,userSelect:`none`,"&-unit":{display:`inline-block`,width:o}},[`${n}-draggable-icon`]:{visibility:`hidden`},[`${n}-switcher, ${n}-checkbox`]:{marginInlineEnd:t.calc(t.calc(s).sub(t.controlInteractiveSize)).div(2).equal()},[`${n}-checkbox`]:{flexShrink:0,alignSelf:`flex-start`,marginBlockStart:t.calc(t.calc(a).sub(t.controlInteractiveSize)).div(2).equal()},[`${n}-switcher`]:{...AZ(e,t),position:`relative`,flex:`none`,alignSelf:`stretch`,width:s,textAlign:`center`,cursor:`pointer`,userSelect:`none`,transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:`unset`},"&:before":{pointerEvents:`none`,content:`""`,width:s,height:a,position:`absolute`,left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${n}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${n}-switcher-icon svg`]:{transform:`rotate(-90deg)`},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:`relative`,zIndex:1,display:`inline-block`,width:`100%`,height:`100%`,"&:before":{position:`absolute`,top:0,insetInlineEnd:t.calc(s).div(2).equal(),bottom:t.calc(i).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:`""`},"&:after":{position:`absolute`,width:t.calc(t.calc(s).div(2).equal()).mul(.8).equal(),height:t.calc(a).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:`""`}}},[`${n}-node-content-wrapper`]:{position:`relative`,minHeight:a,paddingBlock:0,paddingInline:t.paddingXS,background:`transparent`,borderRadius:t.borderRadius,cursor:`pointer`,transition:[`all ${c}`,`border 0s`,`line-height 0s`,`box-shadow 0s`].join(`, `),...jZ(e,t),"&:hover":{backgroundColor:u},[`&${n}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:l},[`${n}-iconEle`]:{display:`inline-block`,width:s,height:a,textAlign:`center`,verticalAlign:`top`,"&:empty":{display:`none`}}},[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:`transparent`},[`${r}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${t.colorPrimary}`},"&-show-line":{[`${n}-indent-unit`]:{position:`relative`,height:`100%`,"&:before":{position:`absolute`,top:0,insetInlineEnd:t.calc(s).div(2).equal(),bottom:t.calc(i).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:`""`},"&-end:before":{display:`none`}},[`${n}-switcher`]:{background:`transparent`,"&-line-icon":{verticalAlign:`-0.15em`}}},[`${r}-leaf-last ${n}-switcher-leaf-line:before`]:{top:`auto !important`,bottom:`auto !important`,height:`${X(t.calc(a).div(2).equal())} !important`}}}},NZ=(e,t,n=!0)=>{let r=`.${e}`,i=lc(t,{treeCls:r,treeNodeCls:`${r}-treenode`,treeNodePadding:t.calc(t.paddingXS).div(2).equal()});return[MZ(e,i),n&&OZ(i)].filter(Boolean)},PZ=e=>{let{controlHeightSM:t,controlItemBgHover:n,controlItemBgActive:r}=e,i=t;return{titleHeight:i,switcherSize:i,indentSize:i,nodeHoverBg:n,nodeHoverColor:e.colorText,nodeSelectedBg:r,nodeSelectedColor:e.colorText}},FZ=Xl(`Tree`,(e,{prefixCls:t})=>[{[e.componentCls]:HB(`${t}-checkbox`,e)},NZ(t,e),Jh(e)],e=>{let{colorTextLightSolid:t,colorPrimary:n}=e;return{...PZ(e),directoryNodeSelectedColor:t,directoryNodeSelectedBg:n}}),IZ=e=>{let{dropPosition:t,dropLevelOffset:n,prefixCls:r,indent:i,direction:a=`ltr`}=e,o=a===`ltr`?`left`:`right`,s=a===`ltr`?`right`:`left`,c={[o]:-n*i+4,[s]:0};switch(t){case-1:c.top=-3;break;case 1:c.bottom=-3;break;default:c.bottom=-3,c[o]=i+4;break}return S.createElement(`div`,{style:c,className:`${r}-drop-indicator`})},LZ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z`}}]},name:`caret-down`,theme:`filled`}}))());function RZ(){return RZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,RZ({},e,{ref:t,icon:LZ.default}))),BZ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}},{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`minus-square`,theme:`outlined`}}))());function VZ(){return VZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,VZ({},e,{ref:t,icon:BZ.default}))),UZ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}},{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`plus-square`,theme:`outlined`}}))());function WZ(){return WZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,WZ({},e,{ref:t,icon:UZ.default}))),KZ=e=>{let{prefixCls:t,switcherIcon:n,treeNodeProps:r,showLine:i,switcherLoadingIcon:a}=e,{isLeaf:o,expanded:s,loading:c}=r;if(c)return S.isValidElement(a)?a:S.createElement(Xm,{className:`${t}-switcher-loading-icon`});let l;if(ef(i)&&(l=i.showLeafIcon),o){if(!i)return null;if(typeof l!=`boolean`&&l){let e=typeof l==`function`?l(r):l,n=`${t}-switcher-line-custom-icon`;return S.isValidElement(e)?cm(e,{className:Y(e.props?.className,n)}):e}return l?S.createElement(vZ,{className:`${t}-switcher-line-icon`}):S.createElement(`span`,{className:`${t}-switcher-leaf-line`})}let u=`${t}-switcher-icon`,d=typeof n==`function`?n(r):n;return S.isValidElement(d)?cm(d,{className:Y(d.props?.className,i?`${t}-switcher-line-icon`:u)}):d===void 0?i?s?S.createElement(HZ,{className:`${t}-switcher-line-icon`}):S.createElement(GZ,{className:`${t}-switcher-line-icon`}):S.createElement(zZ,{className:u}):d},qZ=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,className:i,style:a,classNames:o,styles:s}=_a(`tree`),{virtual:c}=S.useContext(ma),{prefixCls:l,className:u,showIcon:d=!1,showLine:f,switcherIcon:p,switcherLoadingIcon:m,blockNode:h=!1,children:g,checkable:_=!1,selectable:v=!0,draggable:y,disabled:b,motion:x,style:C,rootClassName:w,classNames:T,styles:E,icon:D}=e,O=S.useContext(pm),k=b??O,A=n(`tree`,l),j=n(),M=x??{..._h(j),motionAppear:!1},N={...e,showIcon:d,blockNode:h,checkable:_,selectable:v,disabled:k,motion:M},[P,F]=xf([o,T],[s,E],{props:N}),I={...N,showLine:!!f,icon:D,dropIndicatorRender:IZ},[L,R]=FZ(A),[,z]=zl(),B=z.paddingXS/2+(z.Tree?.titleHeight||z.controlHeightSM),V=S.useMemo(()=>{if(!y)return!1;let e={};switch(typeof y){case`function`:e.nodeDraggable=y;break;case`object`:e={...y};break;default:break}return e.icon!==!1&&(e.icon=e.icon||S.createElement(DZ,null)),e},[y]),H=e=>S.createElement(KZ,{prefixCls:A,switcherIcon:p,switcherLoadingIcon:m,treeNodeProps:e,showLine:f});return S.createElement(hZ,{itemHeight:B,ref:t,virtual:c,...I,prefixCls:A,className:Y({[`${A}-icon-hide`]:!d,[`${A}-block-node`]:h,[`${A}-unselectable`]:!v,[`${A}-rtl`]:r===`rtl`,[`${A}-disabled`]:k},i,u,L,R),style:{...a,...C},rootClassName:Y(P.root,w),rootStyle:F.root,classNames:P,styles:F,direction:r,checkable:_&&S.createElement(`span`,{className:`${A}-checkbox-inner`}),selectable:v,switcherIcon:H,draggable:V},g)}),JZ=0,YZ=1,XZ=2;function ZZ(e,t,n){let{key:r,children:i}=n;function a(e){let a=e[r],o=e[i];t(a,e)!==!1&&ZZ(o||[],t,n)}e.forEach(a)}function QZ({treeData:e,expandedKeys:t,startKey:n,endKey:r,fieldNames:i}){let a=[],o=JZ;if(n&&n===r)return[n];if(!n||!r)return[];function s(e){return e===n||e===r}return ZZ(e,e=>{if(o===XZ)return!1;if(s(e)){if(a.push(e),o===JZ)o=YZ;else if(o===YZ)return o=XZ,!1}else o===YZ&&a.push(e);return t.includes(e)},nB(i)),a}function $Z(e,t,n){let r=da(t),i=[];return ZZ(e,(e,t)=>{let n=r.indexOf(e);return n!==-1&&(i.push(t),r.splice(n,1)),!!r.length},nB(n)),i}function eQ(e){let{isLeaf:t,expanded:n}=e;return t?S.createElement(vZ,null):n?S.createElement(xZ,null):S.createElement(wZ,null)}function tQ({treeData:e,children:t}){return e||rB(t)}var nQ=S.forwardRef((e,t)=>{let{defaultExpandAll:n,defaultExpandParent:r,defaultExpandedKeys:i,...a}=e,o=S.useRef(null),s=S.useRef(null),c=()=>{let{keyEntities:e}=oB(tQ(a),{fieldNames:a.fieldNames}),t,o=a.expandedKeys||i||[];return t=n?Object.keys(e):r?IX(o,e):o,t},[l,u]=S.useState(a.selectedKeys||a.defaultSelectedKeys||[]),[d,f]=S.useState(()=>c());S.useEffect(()=>{`selectedKeys`in a&&u(a.selectedKeys)},[a.selectedKeys]),S.useEffect(()=>{`expandedKeys`in a&&f(a.expandedKeys)},[a.expandedKeys]);let p=(e,t)=>(`expandedKeys`in a||f(e),a.onExpand?.(e,t)),m=(e,t)=>{let{multiple:n,fieldNames:r}=a,{node:i,nativeEvent:c}=t,{key:l=``}=i,f=tQ(a),p={...t,selected:!0},m=c?.ctrlKey||c?.metaKey,h=c?.shiftKey,g;n&&m?(g=e,o.current=l,s.current=g,p.selectedNodes=$Z(f,g,r)):n&&h?(g=Array.from(new Set([].concat(da(s.current||[]),da(QZ({treeData:f,expandedKeys:d,startKey:l,endKey:o.current,fieldNames:r}))))),p.selectedNodes=$Z(f,g,r)):(g=[l],o.current=l,s.current=g,p.selectedNodes=$Z(f,g,r)),a.onSelect?.(g,p),`selectedKeys`in a||u(g)},{getPrefixCls:h,direction:g}=S.useContext(ma),{prefixCls:_,className:v,showIcon:y=!0,expandAction:b=`click`,...x}=a,C=h(`tree`,_),w=Y(`${C}-directory`,{[`${C}-directory-rtl`]:g===`rtl`},v);return S.createElement(qZ,{icon:eQ,ref:t,blockNode:!0,...x,showIcon:y,expandAction:b,prefixCls:C,className:w,expandedKeys:d,selectedKeys:l,onSelect:m,onExpand:p})}),rQ=qZ;rQ.DirectoryTree=nQ,rQ.TreeNode=EX;var iQ=e=>{let{value:t,filterSearch:n,tablePrefixCls:r,locale:i,onChange:a}=e;return n?S.createElement(`div`,{className:`${r}-filter-dropdown-search`},S.createElement(OV,{prefix:S.createElement(iw,null),placeholder:i.filterSearchPlaceholder,onChange:a,value:t,htmlSize:1,className:`${r}-filter-dropdown-search-input`})):null},aQ=e=>{let{keyCode:t}=e;t===Zr.ENTER&&e.stopPropagation()},oQ=S.forwardRef((e,t)=>S.createElement(`div`,{className:e.className,onClick:e=>e.stopPropagation(),onKeyDown:aQ,ref:t},e.children));function sQ(e){let t=[];return(e||[]).forEach(({value:e,children:n})=>{t.push(e),n&&(t=[].concat(da(t),da(sQ(n))))}),t}function cQ(e){return e.some(({children:e})=>e)}var lQ=(e,t)=>typeof t==`string`||Qd(t)?t.toString().toLowerCase().includes(e):!1,uQ=e=>{let{filters:t,prefixCls:n,filteredKeys:r,filterMultiple:i,searchValue:a,normalizedSearchValue:o,filterSearch:s}=e;return t.map((e,t)=>{let c=String(e.value);if(e.children)return{key:c||t,label:e.text,popupClassName:`${n}-dropdown-submenu`,children:uQ({filters:e.children,prefixCls:n,filteredKeys:r,filterMultiple:i,searchValue:a,normalizedSearchValue:o,filterSearch:s})};let l=i?aV:LL,u={key:e.value===void 0?t:c,label:S.createElement(S.Fragment,null,S.createElement(l,{checked:r.includes(c)}),S.createElement(`span`,null,e.text))};return o?typeof s==`function`?s(o,e)?u:null:lQ(o,e.text)?u:null:u})};function dQ(e){return e||[]}var fQ=e=>{let{tablePrefixCls:t,prefixCls:n,column:r,dropdownPrefixCls:i,columnKey:a,filterOnClose:o,filterMultiple:s,filterMode:c=`menu`,filterSearch:l=!1,filterState:u,triggerFilter:d,locale:f,children:p,getPopupContainer:m,rootClassName:h}=e,{filterResetToDefaultFilteredValue:g,defaultFilteredValue:_,filterDropdownProps:v={},filterDropdownOpen:y,onFilterDropdownOpenChange:b}=r,[x,C]=S.useState(!1),w=S.useContext(Vw),T=!!(u&&(u.filteredKeys?.length||u.forceFiltered)),E=e=>{C(e),v.onOpenChange?.(e),b?.(e)},D=v.open??y??x,O=u?.filteredKeys,[k,A]=Of(dQ(O)),j=({selectedKeys:e})=>{A(e)},M=(e,{node:t,checked:n})=>{j(s?{selectedKeys:e}:{selectedKeys:n&&t.key?[t.key]:[]})};S.useEffect(()=>{x&&j({selectedKeys:dQ(O)})},[O]);let[N,P]=S.useState([]),F=e=>{P(e)},[I,L]=S.useState(``),R=S.useMemo(()=>I.trim().toLowerCase(),[I]),z=e=>{let{value:t}=e.target;L(t)};S.useEffect(()=>{x||L(``)},[x]);let B=e=>{let t=e?.length?e:null;if(t===null&&(!u||!u.filteredKeys)||di(t,u?.filteredKeys,!0))return null;d({column:r,key:a,filteredKeys:t})},V=()=>{E(!1),B(k())},H=({confirm:e,closeDropdown:t}={confirm:!1,closeDropdown:!1})=>{e&&B([]),t&&E(!1),L(``),A(g?(_||[]).map(String):[])},U=({closeDropdown:e}={closeDropdown:!0})=>{e&&E(!1),B(k())},ee=(e,t)=>{t.source===`trigger`&&(e&&O!==void 0&&A(dQ(O)),E(e),!e&&!r.filterDropdown&&o&&V())},te=Y({[`${i}-menu-without-submenu`]:!cQ(r.filters||[])}),ne=e=>{e.target.checked?A(sQ(r?.filters).map(String)):A([])},W=({filters:e})=>(e||[]).map((e,t)=>{let n=String(e.value),r={title:e.text,key:e.value===void 0?String(t):n};return e.children&&(r.children=W({filters:e.children})),r}),re=e=>({...e,text:e.title,value:e.key,children:e.children?.map(re)||[]}),G,{direction:K,renderEmpty:q}=S.useContext(ma);if(typeof r.filterDropdown==`function`)G=r.filterDropdown({prefixCls:`${i}-custom`,setSelectedKeys:e=>j({selectedKeys:e}),selectedKeys:k(),confirm:U,clearFilters:H,filters:r.filters,visible:D,close:()=>{E(!1)}});else if(r.filterDropdown)G=r.filterDropdown;else{let e=k()||[];G=S.createElement(S.Fragment,null,(()=>{let a=q?.(`Table.filter`)??S.createElement(NC,{image:NC.PRESENTED_IMAGE_SIMPLE,description:f.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:`16px 0`}});if((r.filters||[]).length===0)return a;if(c===`tree`)return S.createElement(S.Fragment,null,S.createElement(iQ,{filterSearch:l,value:I,onChange:z,tablePrefixCls:t,locale:f}),S.createElement(`div`,{className:`${t}-filter-dropdown-tree`},s?S.createElement(aV,{checked:e.length===sQ(r.filters).length,indeterminate:e.length>0&&e.lengthtypeof l==`function`?l(I,re(e)):lQ(R,e.title):void 0})));let o=uQ({filters:r.filters||[],filterSearch:l,prefixCls:n,filteredKeys:k(),filterMultiple:s,searchValue:I,normalizedSearchValue:R}),u=o.every(e=>e===null);return S.createElement(S.Fragment,null,S.createElement(iQ,{filterSearch:l,value:I,onChange:z,tablePrefixCls:t,locale:f}),u?a:S.createElement(fD,{selectable:!0,multiple:s,prefixCls:`${i}-menu`,className:te,onSelect:j,onDeselect:j,selectedKeys:e,getPopupContainer:m,openKeys:N,onOpenChange:F,items:o}))})(),S.createElement(`div`,{className:`${n}-dropdown-btns`},S.createElement(E_,{type:`link`,size:`small`,disabled:g?di((_||[]).map(String),e,!0):e.length===0,onClick:()=>H()},f.filterReset),S.createElement(E_,{type:`primary`,size:`small`,onClick:V},f.filterConfirm)))}r.filterDropdown&&(G=S.createElement(XE,{selectable:void 0},G)),G=S.createElement(oQ,{className:`${n}-dropdown`},G);let ie=(()=>{let e;return e=typeof r.filterIcon==`function`?r.filterIcon(T):r.filterIcon?r.filterIcon:S.createElement(QX,null),S.createElement(`span`,{role:`button`,tabIndex:-1,className:Y(`${n}-trigger`,{active:T}),onClick:e=>{e.stopPropagation()}},e)})();if(w)return S.createElement(`div`,{className:`${n}-column`},S.createElement(`span`,{className:`${t}-column-title`},p),ie);let J=Xd({trigger:[`click`],placement:K===`rtl`?`bottomLeft`:`bottomRight`,children:ie,getPopupContainer:m},{...v,rootClassName:Y(h,v.rootClassName),open:D,onOpenChange:ee,popupRender:()=>typeof v?.dropdownRender==`function`?v.dropdownRender(G):G});return S.createElement(`div`,{className:`${n}-column`},S.createElement(`span`,{className:`${t}-column-title`},p),S.createElement(kU,{...J}))},pQ=(e,t,n)=>{let r=[];return(e||[]).forEach((e,i)=>{let a=qX(i,n),o=e.filterDropdown!==void 0;if(e.filters||o||`onFilter`in e)if(`filteredValue`in e){let t=e.filteredValue;o||(t=t?.map(String)??t),r.push({column:e,key:KX(e,a),filteredKeys:t,forceFiltered:e.filtered})}else r.push({column:e,key:KX(e,a),filteredKeys:t&&e.defaultFilteredValue?e.defaultFilteredValue:void 0,forceFiltered:e.filtered});`children`in e&&(r=[].concat(da(r),da(pQ(e.children,t,a))))}),r};function mQ(e,t,n,r,i,a,o,s,c){return n.map((n,l)=>{let u=qX(l,s),{filterOnClose:d=!0,filterMultiple:f=!0,filterMode:p,filterSearch:m}=n,h=n;if(h.filters||h.filterDropdown){let s=KX(h,u),l=r.find(({key:e})=>s===e);h={...h,title:r=>S.createElement(fQ,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:h,columnKey:s,filterState:l,filterOnClose:d,filterMultiple:f,filterMode:p,filterSearch:m,triggerFilter:a,locale:i,getPopupContainer:o,rootClassName:c},JX(n.title,r))}}return`children`in h&&(h={...h,children:mQ(e,t,h.children,r,i,a,o,u,c)}),h})}var hQ=e=>{let t={};return e.forEach(({key:e,filteredKeys:n,column:r})=>{let i=e,{filters:a,filterDropdown:o}=r;o?t[i]=n||null:Array.isArray(n)?t[i]=sQ(a).filter(e=>n.includes(String(e))):t[i]=null}),t},gQ=(e,t,n)=>t.reduce((e,r)=>{let{column:{onFilter:i,filters:a},filteredKeys:o}=r;if(i&&o&&o.length){let r=sQ(a),s=new Map;r.forEach(e=>{let t=String(e);s.has(t)||s.set(t,e)});let c=o.map(e=>{let t=String(e);return s.get(t)??e});return(e=>e.reduce((e,r)=>{let a={...r};return a[n]&&(a[n]=gQ(a[n],t,n)),c.some(e=>i(e,a))&&e.push(a),e},[]))(e)}return e},e),_Q=e=>e.flatMap(e=>`children`in e?[e].concat(da(_Q(e.children||[]))):[e]),vQ=e=>{let{prefixCls:t,dropdownPrefixCls:n,mergedColumns:r,onFilterChange:i,getPopupContainer:a,locale:o,rootClassName:s}=e;Ui(`Table`);let c=S.useMemo(()=>_Q(r||[]),[r]),[l,u]=S.useState(()=>pQ(c,!0)),d=S.useMemo(()=>{let e=pQ(c,!1);if(e.length===0)return e;let t=!0;if(e.forEach(({filteredKeys:e})=>{e!==void 0&&(t=!1)}),t){let e=(c||[]).map((e,t)=>KX(e,qX(t)));return l.filter(({key:t})=>e.includes(t)).map(t=>{let n=c[e.indexOf(t.key)];return{...t,column:{...t.column,...n},forceFiltered:n.filtered}})}return e},[c,l]),f=S.useMemo(()=>hQ(d),[d]),p=e=>{let t=d.filter(({key:t})=>t!==e.key);t.push(e),u(t),i(hQ(t),t)};return[e=>mQ(t,n,e,d,o,p,a,void 0,s),d,f]},yQ=(e,t,n)=>{let r=S.useRef({});function i(i){if(!r.current||r.current.data!==e||r.current.childrenColumnName!==t||r.current.getRowKey!==n){let i=new Map;function a(e){e.forEach((e,r)=>{let o=n(e,r);i.set(o,e),ef(e)&&t in e&&a(e[t]||[])})}a(e),r.current={data:e,childrenColumnName:t,kvMap:i,getRowKey:n}}return r.current.kvMap?.get(i)}return[i]};function bQ(e,t){let n={current:e.current,pageSize:e.pageSize},r=ef(t)?t:{};return Object.keys(r).forEach(t=>{let r=e[t];typeof r!=`function`&&(n[t]=r)}),n}function xQ(e,t,n){let{total:r=0,...i}=ef(n)?n:{},[a,o]=(0,S.useState)(()=>({current:`defaultCurrent`in i?i.defaultCurrent:1,pageSize:`defaultPageSize`in i?i.defaultPageSize:10})),s=Xd(a,i,{total:r>0?r:e}),c=Math.ceil((r||e)/s.pageSize);s.current>c&&(s.current=c||1);let l=(e,t)=>{o({current:e??1,pageSize:t||s.pageSize})},u=(e,r)=>{n&&n.onChange?.(e,r),l(e,r),t(e,r||s?.pageSize)};return n===!1?[{},()=>{}]:[{...s,onChange:u},l]}var SQ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z`}}]},name:`caret-down`,theme:`outlined`}}))());function CQ(){return CQ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,CQ({},e,{ref:t,icon:SQ.default}))),TQ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z`}}]},name:`caret-up`,theme:`outlined`}}))());function EQ(){return EQ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,EQ({},e,{ref:t,icon:TQ.default}))),OQ=`ascend`,kQ=`descend`,AQ=e=>e.sorter&&typeof e.sorter==`object`&&Qd(e.sorter.multiple)?e.sorter.multiple:!1,jQ=e=>typeof e==`function`?e:ef(e)&&e.compare?e.compare:!1,MQ=(e,t)=>t?e[e.indexOf(t)+1]:e[0],NQ=(e,t,n)=>{let r=[],i=(e,t)=>{r.push({column:e,key:KX(e,t),multiplePriority:AQ(e),sortOrder:e.sortOrder})};return(e||[]).forEach((e,a)=>{let o=qX(a,n);e.children?(`sortOrder`in e&&i(e,o),r=[].concat(da(r),da(NQ(e.children,t,o)))):e.sorter&&(`sortOrder`in e?i(e,o):t&&e.defaultSortOrder&&r.push({column:e,key:KX(e,o),multiplePriority:AQ(e),sortOrder:e.defaultSortOrder}))}),r},PQ=(e,t,n,r,i,a,o,s,c)=>(t||[]).map((t,l)=>{let u=qX(l,s),d=t;if(d.sorter){let s=d.sortDirections||i,l=d.showSorterTooltip===void 0?o:d.showSorterTooltip,f=KX(d,u),p=n.find(({key:e})=>e===f),m=p?p.sortOrder:null,h=MQ(s,m),g;if(t.sortIcon)g=t.sortIcon({sortOrder:m});else{let t=s.includes(OQ)&&S.createElement(DQ,{className:Y(`${e}-column-sorter-up`,{active:m===OQ})}),n=s.includes(kQ)&&S.createElement(wQ,{className:Y(`${e}-column-sorter-down`,{active:m===kQ})});g=S.createElement(`span`,{className:Y(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(t&&n)})},S.createElement(`span`,{className:`${e}-column-sorter-inner`,"aria-hidden":`true`},t,n))}let{cancelSort:_,triggerAsc:v,triggerDesc:y}=a||{},b=_;h===kQ?b=y:h===OQ&&(b=v);let x=ef(l)?{title:b,...l}:{title:b};d={...d,className:Y(d.className,{[`${e}-column-sort`]:m}),title:n=>{let r=`${e}-column-sorters`,i=S.createElement(`span`,{className:`${e}-column-title`},JX(t.title,n)),a=S.createElement(`div`,{className:r},i,g);return l?typeof l!=`boolean`&&l?.target===`sorter-icon`?S.createElement(`div`,{className:Y(r,`${r}-tooltip-target-sorter`)},i,S.createElement($w,{...x},g)):S.createElement($w,{...x},a):a},onHeaderCell:n=>{let i=t.onHeaderCell?.(n)||{},a=i.onClick,o=i.onKeyDown;i.onClick=e=>{r({column:t,key:f,sortOrder:h,multiplePriority:AQ(t)}),a?.(e)},i.onKeyDown=e=>{e.keyCode===Zr.ENTER&&(r({column:t,key:f,sortOrder:h,multiplePriority:AQ(t)}),o?.(e))};let s=YX(t.title,{}),l=s?.toString();return m&&(i[`aria-sort`]=m===`ascend`?`ascending`:`descending`),i[`aria-description`]=c?.sortable,i[`aria-label`]=l||``,i.className=Y(i.className,`${e}-column-has-sorters`),i.tabIndex=0,t.ellipsis&&(i.title=(s??``).toString()),i}}}return`children`in d&&(d={...d,children:PQ(e,d.children,n,r,i,a,o,u,c)}),d}),FQ=e=>{let{column:t,sortOrder:n}=e;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}},IQ=e=>{let t=e.filter(({sortOrder:e})=>e).map(FQ);return t.length===0&&e.length?{...FQ(e[e.length-1]),column:void 0,order:void 0,field:void 0,columnKey:void 0}:t.length<=1?t[0]||{}:t},LQ=(e,t,n)=>{let r=t.slice().sort((e,t)=>t.multiplePriority-e.multiplePriority),i=e.slice(),a=r.filter(({column:{sorter:e},sortOrder:t})=>jQ(e)&&t);return a.length?i.sort((e,t)=>{for(let n=0;n{let r=e[n];return r?{...e,[n]:LQ(r,t,n)}:e}):i},RQ=e=>{let{prefixCls:t,mergedColumns:n,sortDirections:r,tableLocale:i,showSorterTooltip:a,onSorterChange:o,globalLocale:s}=e,[c,l]=S.useState(()=>NQ(n,!0)),u=(e,t)=>{let n=[];return e.forEach((e,r)=>{let i=qX(r,t);if(n.push(KX(e,i)),Array.isArray(e.children)){let t=u(e.children,i);n.push.apply(n,da(t))}}),n},d=S.useMemo(()=>{let e=!0,t=NQ(n,!1);if(!t.length){let e=u(n);return c.filter(({key:t})=>e.includes(t))}let r=[];function i(t){e?r.push(t):r.push({...t,sortOrder:null})}let a=null;return t.forEach(t=>{a===null?(i(t),t.sortOrder&&(t.multiplePriority===!1?e=!1:a=!0)):(a&&t.multiplePriority!==!1||(e=!1),i(t))}),r},[n,c]),f=S.useMemo(()=>{let e=d.map(({column:e,sortOrder:t})=>({column:e,order:t}));return{sortColumns:e,sortColumn:e[0]?.column,sortOrder:e[0]?.order}},[d]),p=e=>{let t;t=e.multiplePriority===!1||!d.length||d[0].multiplePriority===!1?[e]:[].concat(da(d.filter(({key:t})=>t!==e.key)),[e]),l(t),o(IQ(t),t)};return[e=>PQ(t,e,d,p,r,i,a,void 0,s),d,f,()=>IQ(d)]},zQ=(e,t)=>e.map(e=>{let n={...e};return n.title=JX(e.title,t),`children`in n&&(n.children=zQ(n.children,t)),n}),BQ=e=>[S.useCallback(t=>zQ(t,e),[e])],VQ=rX((e,t)=>{let{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),HQ=gX((e,t)=>{let{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),UQ=e=>{let{componentCls:t,lineWidth:n,lineType:r,tableBorderColor:i,tableHeaderBg:a,tablePaddingVertical:o,tablePaddingHorizontal:s,calc:c}=e,l=`${X(n)} ${r} ${i}`,u=(e,r,i)=>({[`&${t}-${e}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"> table > tbody > tr > th, > table > tbody > tr > td":{[`> ${t}-expanded-row-fixed`]:{margin:`${X(c(r).mul(-1).equal())} ${X(c(c(i).add(n)).mul(-1).equal())}`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:{[`> ${t}-title`]:{border:l,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:l,borderTop:l,[`> ${t}-content, > ${t}-header, > ${t}-body, > ${t}-summary`]:{"> table":{"> thead > tr > th, > thead > tr > td, > tbody > tr > th, > tbody > tr > td, > tfoot > tr > th, > tfoot > tr > td":{borderInlineEnd:l},"> thead":{"> tr:not(:last-child) > th":{borderBottom:l},"> tr > th::before":{backgroundColor:`transparent !important`}},"> thead > tr, > tbody > tr, > tfoot > tr":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:l}},"> tbody > tr > th, > tbody > tr > td":{[`> ${t}-expanded-row-fixed`]:{margin:`${X(c(o).mul(-1).equal())} ${X(c(c(s).add(n)).mul(-1).equal())}`,"&::after":{position:`absolute`,top:0,insetInlineEnd:n,bottom:0,borderInlineEnd:l,content:`""`}}}}}},[`&${t}-scroll-horizontal`]:{[`> ${t}-container > ${t}-body`]:{"> table > tbody":{[` > tr${t}-expanded-row, > tr${t}-placeholder - `]:{"> th, > td":{borderInlineEnd:0}}}}},...u(`medium`,e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle),...u(`small`,e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall),[`> ${t}-footer`]:{border:l,borderTop:0}},[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${X(n)} 0 ${X(n)} ${a}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:l}}}},JQ=e=>{let{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:{...Bl,wordBreak:`keep-all`,[` + `]:{"> th, > td":{borderInlineEnd:0}}}}},...u(`medium`,e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle),...u(`small`,e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall),[`> ${t}-footer`]:{border:l,borderTop:0}},[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${X(n)} 0 ${X(n)} ${a}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:l}}}},WQ=e=>{let{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:{...Bl,wordBreak:`keep-all`,[` &${t}-cell-fix-start-shadow, &${t}-cell-fix-end-shadow - `]:{overflow:`visible`,[`${t}-cell-content`]:{...Bl,display:`block`}},[`${t}-column-title`]:{...Bl,wordBreak:`keep-all`}}}}},YQ=e=>{let{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:`center`,color:e.colorTextDisabled,"&:hover > th, &:hover > td":{background:e.colorBgContainer}}}}},XQ=e=>{let{componentCls:t,antCls:n,motionDurationSlow:r,lineWidth:i,paddingXS:a,lineType:o,tableBorderColor:s,tableExpandIconBg:c,tableExpandColumnWidth:l,borderRadius:u,tablePaddingVertical:d,tablePaddingHorizontal:f,tableExpandedRowBg:p,paddingXXS:m,expandIconMarginTop:h,expandIconSize:g,expandIconHalfInner:_,expandIconScale:v,calc:y}=e,b=`${X(i)} ${o} ${s}`,x=y(m).sub(i).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:l},[`${t}-row-expand-icon-cell`]:{textAlign:`center`,[`${t}-row-expand-icon`]:{display:`inline-flex`,float:`none`,verticalAlign:`sub`}},[`${t}-row-indent`]:{height:1,float:`left`},[`${t}-row-expand-icon`]:{...Yl(e),position:`relative`,float:`left`,width:g,height:g,color:`inherit`,lineHeight:X(g),background:c,border:b,borderRadius:u,transform:`scale(${v})`,"&:focus, &:hover, &:active":{borderColor:`currentcolor`},"&::before, &::after":{position:`absolute`,background:`currentcolor`,transition:`transform ${r} ease-out`,content:`""`},"&::before":{top:_,insetInlineEnd:x,insetInlineStart:x,height:i},"&::after":{top:x,bottom:x,insetInlineStart:_,width:i,transform:`rotate(90deg)`},"&-collapsed::before":{transform:`rotate(-180deg)`},"&-collapsed::after":{transform:`rotate(0deg)`},"&-spaced":{"&::before, &::after":{display:`none`,content:`none`},background:`transparent`,border:0,visibility:`hidden`}},[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:h,marginInlineEnd:a},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:p}},[`${n}-descriptions-view`]:{display:`flex`,table:{flex:`auto`,width:`100%`}}},[`${t}-expanded-row-fixed`]:{position:`relative`,margin:`${X(y(d).mul(-1).equal())} ${X(y(f).mul(-1).equal())}`,padding:`${X(d)} ${X(f)}`}}}},ZQ=e=>{let{componentCls:t,antCls:n,iconCls:r,tableFilterDropdownWidth:i,tableFilterDropdownSearchWidth:a,paddingXXS:o,paddingXS:s,colorText:c,lineWidth:l,lineType:u,tableBorderColor:d,headerIconColor:f,fontSizeSM:p,tablePaddingHorizontal:m,borderRadius:h,motionDurationSlow:g,colorIcon:_,colorPrimary:v,tableHeaderFilterActiveBg:y,colorTextDisabled:b,tableFilterDropdownBg:x,tableFilterDropdownHeight:S,controlItemBgHover:C,controlItemBgActive:w,boxShadowSecondary:T,filterDropdownMenuBg:E,calc:D}=e,O=`${n}-dropdown`,k=`${t}-filter-dropdown`,A=`${n}-tree`,j=`${X(l)} ${u} ${d}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:`flex`,justifyContent:`space-between`},[`${t}-filter-trigger`]:{position:`relative`,display:`flex`,alignItems:`center`,marginBlock:D(o).mul(-1).equal(),marginInline:`${X(o)} ${X(D(m).div(2).mul(-1).equal())}`,padding:`0 ${X(o)}`,color:f,fontSize:p,borderRadius:h,cursor:`pointer`,transition:`all ${g}`,"&:hover":{color:_,background:y},"&.active":{color:v}}}},{[`${n}-dropdown`]:{[k]:{...Vl(e),minWidth:i,backgroundColor:x,borderRadius:h,boxShadow:T,overflow:`hidden`,[`${O}-menu`]:{maxHeight:S,overflowX:`hidden`,border:0,boxShadow:`none`,borderRadius:`unset`,backgroundColor:E,"&:empty::after":{display:`block`,padding:`${X(s)} 0`,color:b,fontSize:p,textAlign:`center`,content:`"Not Found"`}},[`${k}-tree`]:{paddingBlock:`${X(s)} 0`,paddingInline:s,[A]:{padding:0},[`${A}-treenode ${A}-node-content-wrapper:hover`]:{backgroundColor:C},[`${A}-treenode-checkbox-checked ${A}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:w}}},[`${k}-search`]:{padding:s,borderBottom:j,"&-input":{input:{minWidth:a},[r]:{color:b}}},[`${k}-checkall`]:{width:`100%`,marginBottom:o,marginInlineStart:o},[`${k}-btns`]:{display:`flex`,justifyContent:`space-between`,padding:`${X(D(s).sub(l).equal())} ${X(s)}`,overflow:`hidden`,borderTop:j}}}},{[`${n}-dropdown ${k}, ${k}-submenu`]:{[`${n}-checkbox-wrapper + span`]:{paddingInlineStart:s,color:c},"> ul":{maxHeight:`calc(100vh - 130px)`,overflowX:`hidden`,overflowY:`auto`}}}]};function QQ({colorSplit:e}){return[{boxShadow:`inset 10px 0 8px -8px ${e}`},{boxShadow:`inset -10px 0 8px -8px ${e}`}]}var $Q=e=>{let{componentCls:t,lineWidth:n,motionDurationSlow:r,zIndexTableFixed:i,tableBg:a,calc:o}=e,s=`${t}-cell`,c=`${s}-fix`,l={position:`absolute`,top:0,bottom:o(n).mul(-1).equal(),width:30,transition:`box-shadow ${r}`,content:`""`,pointerEvents:`none`},[u,d]=QQ(e);return{[`${t}-wrapper`]:{[`${s}${c}`]:{position:`sticky`},[c]:{zIndex:`calc(var(--z-offset-reverse) + ${i})`,background:a,"&:after":l,"&-start:after":{insetInlineStart:`100%`},"&-end:after":{insetInlineEnd:`100%`},"&-start-shadow-show:after":u,"&-end-shadow-show:after":d},[`${t}-container`]:{position:`relative`,"&:before, &:after":{...l,zIndex:`calc(var(--columns-count) * 2 + ${i} + 1)`},"&:before":{insetInlineStart:0},"&:after":{insetInlineEnd:0}},[`${t}-has-fix-start ${t}-container:before`]:{display:`none`},[`${t}-has-fix-end ${t}-container:after`]:{display:`none`},[`${t}-fix-start-shadow-show ${t}-container:before`]:u,[`${t}-fix-end-shadow-show ${t}-container:after`]:d}}},e$=e=>{let{componentCls:t,antCls:n,margin:r}=e;return{[`${t}-wrapper`]:{[`${t}-pagination${n}-pagination`]:{margin:`${X(r)} 0`},[`${t}-pagination`]:{display:`flex`,flexWrap:`wrap`,rowGap:e.paddingXS,"> *":{flex:`none`},"&-start":{justifyContent:`flex-start`},"&-center":{justifyContent:`center`},"&-end":{justifyContent:`flex-end`}}}}},t$=e=>{let{componentCls:t,tableRadius:n}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${X(n)} ${X(n)} 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${t}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:n,borderStartEndRadius:n,"&::before":{borderStartStartRadius:n},"&::after":{borderStartEndRadius:n},[`> ${t}-content`]:{borderStartStartRadius:n,borderStartEndRadius:n},"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:n},"> *:last-child":{borderStartEndRadius:n}}},"&-footer":{borderRadius:`0 0 ${X(n)} ${X(n)}`}}}}},n$=e=>{let{componentCls:t}=e,[n,r]=QQ(e);return{[`${t}-wrapper-rtl`]:{direction:`rtl`,table:{direction:`rtl`},[`${t}-row-expand-icon`]:{float:`right`,"&::after":{transform:`rotate(-90deg)`},"&-collapsed::before":{transform:`rotate(180deg)`},"&-collapsed::after":{transform:`rotate(0deg)`}},[`${t}-cell-fix`]:{"&-start-shadow-show:after":r,"&-end-shadow-show:after":n},[`${t}-container`]:{[`${t}-row-indent`]:{float:`right`}},[`${t}-fix-start-shadow-show ${t}-container:before`]:r,[`${t}-fix-end-shadow-show ${t}-container:after`]:n}}},r$=e=>{let{componentCls:t,antCls:n,iconCls:r,fontSizeIcon:i,padding:a,paddingXS:o,headerIconColor:s,headerIconHoverColor:c,tableSelectionColumnWidth:l,tableSelectedRowBg:u,tableSelectedRowHoverBg:d,tableRowHoverBg:f,tablePaddingHorizontal:p,calc:m}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:l,[`&${t}-selection-col-with-dropdown`]:{width:m(l).add(i).add(m(a).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:m(l).add(m(o).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:m(l).add(i).add(m(a).div(4)).add(m(o).mul(2)).equal()}},[` + `]:{overflow:`visible`,[`${t}-cell-content`]:{...Bl,display:`block`}},[`${t}-column-title`]:{...Bl,wordBreak:`keep-all`}}}}},GQ=e=>{let{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:`center`,color:e.colorTextDisabled,"&:hover > th, &:hover > td":{background:e.colorBgContainer}}}}},KQ=e=>{let{componentCls:t,antCls:n,motionDurationSlow:r,lineWidth:i,paddingXS:a,lineType:o,tableBorderColor:s,tableExpandIconBg:c,tableExpandColumnWidth:l,borderRadius:u,tablePaddingVertical:d,tablePaddingHorizontal:f,tableExpandedRowBg:p,paddingXXS:m,expandIconMarginTop:h,expandIconSize:g,expandIconHalfInner:_,expandIconScale:v,calc:y}=e,b=`${X(i)} ${o} ${s}`,x=y(m).sub(i).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:l},[`${t}-row-expand-icon-cell`]:{textAlign:`center`,[`${t}-row-expand-icon`]:{display:`inline-flex`,float:`none`,verticalAlign:`sub`}},[`${t}-row-indent`]:{height:1,float:`left`},[`${t}-row-expand-icon`]:{...Yl(e),position:`relative`,float:`left`,width:g,height:g,color:`inherit`,lineHeight:X(g),background:c,border:b,borderRadius:u,transform:`scale(${v})`,"&:focus, &:hover, &:active":{borderColor:`currentcolor`},"&::before, &::after":{position:`absolute`,background:`currentcolor`,transition:`transform ${r} ease-out`,content:`""`},"&::before":{top:_,insetInlineEnd:x,insetInlineStart:x,height:i},"&::after":{top:x,bottom:x,insetInlineStart:_,width:i,transform:`rotate(90deg)`},"&-collapsed::before":{transform:`rotate(-180deg)`},"&-collapsed::after":{transform:`rotate(0deg)`},"&-spaced":{"&::before, &::after":{display:`none`,content:`none`},background:`transparent`,border:0,visibility:`hidden`}},[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:h,marginInlineEnd:a},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:p}},[`${n}-descriptions-view`]:{display:`flex`,table:{flex:`auto`,width:`100%`}}},[`${t}-expanded-row-fixed`]:{position:`relative`,margin:`${X(y(d).mul(-1).equal())} ${X(y(f).mul(-1).equal())}`,padding:`${X(d)} ${X(f)}`}}}},qQ=e=>{let{componentCls:t,antCls:n,iconCls:r,tableFilterDropdownWidth:i,tableFilterDropdownSearchWidth:a,paddingXXS:o,paddingXS:s,colorText:c,lineWidth:l,lineType:u,tableBorderColor:d,headerIconColor:f,fontSizeSM:p,tablePaddingHorizontal:m,borderRadius:h,motionDurationSlow:g,colorIcon:_,colorPrimary:v,tableHeaderFilterActiveBg:y,colorTextDisabled:b,tableFilterDropdownBg:x,tableFilterDropdownHeight:S,controlItemBgHover:C,controlItemBgActive:w,boxShadowSecondary:T,filterDropdownMenuBg:E,calc:D}=e,O=`${n}-dropdown`,k=`${t}-filter-dropdown`,A=`${n}-tree`,j=`${X(l)} ${u} ${d}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:`flex`,justifyContent:`space-between`},[`${t}-filter-trigger`]:{position:`relative`,display:`flex`,alignItems:`center`,marginBlock:D(o).mul(-1).equal(),marginInline:`${X(o)} ${X(D(m).div(2).mul(-1).equal())}`,padding:`0 ${X(o)}`,color:f,fontSize:p,borderRadius:h,cursor:`pointer`,transition:`all ${g}`,"&:hover":{color:_,background:y},"&.active":{color:v}}}},{[`${n}-dropdown`]:{[k]:{...Vl(e),minWidth:i,backgroundColor:x,borderRadius:h,boxShadow:T,overflow:`hidden`,[`${O}-menu`]:{maxHeight:S,overflowX:`hidden`,border:0,boxShadow:`none`,borderRadius:`unset`,backgroundColor:E,"&:empty::after":{display:`block`,padding:`${X(s)} 0`,color:b,fontSize:p,textAlign:`center`,content:`"Not Found"`}},[`${k}-tree`]:{paddingBlock:`${X(s)} 0`,paddingInline:s,[A]:{padding:0},[`${A}-treenode ${A}-node-content-wrapper:hover`]:{backgroundColor:C},[`${A}-treenode-checkbox-checked ${A}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:w}}},[`${k}-search`]:{padding:s,borderBottom:j,"&-input":{input:{minWidth:a},[r]:{color:b}}},[`${k}-checkall`]:{width:`100%`,marginBottom:o,marginInlineStart:o},[`${k}-btns`]:{display:`flex`,justifyContent:`space-between`,padding:`${X(D(s).sub(l).equal())} ${X(s)}`,overflow:`hidden`,borderTop:j}}}},{[`${n}-dropdown ${k}, ${k}-submenu`]:{[`${n}-checkbox-wrapper + span`]:{paddingInlineStart:s,color:c},"> ul":{maxHeight:`calc(100vh - 130px)`,overflowX:`hidden`,overflowY:`auto`}}}]};function JQ({colorSplit:e}){return[{boxShadow:`inset 10px 0 8px -8px ${e}`},{boxShadow:`inset -10px 0 8px -8px ${e}`}]}var YQ=e=>{let{componentCls:t,lineWidth:n,motionDurationSlow:r,zIndexTableFixed:i,tableBg:a,calc:o}=e,s=`${t}-cell`,c=`${s}-fix`,l={position:`absolute`,top:0,bottom:o(n).mul(-1).equal(),width:30,transition:`box-shadow ${r}`,content:`""`,pointerEvents:`none`},[u,d]=JQ(e);return{[`${t}-wrapper`]:{[`${s}${c}`]:{position:`sticky`},[c]:{zIndex:`calc(var(--z-offset-reverse) + ${i})`,background:a,"&:after":l,"&-start:after":{insetInlineStart:`100%`},"&-end:after":{insetInlineEnd:`100%`},"&-start-shadow-show:after":u,"&-end-shadow-show:after":d},[`${t}-container`]:{position:`relative`,"&:before, &:after":{...l,zIndex:`calc(var(--columns-count) * 2 + ${i} + 1)`},"&:before":{insetInlineStart:0},"&:after":{insetInlineEnd:0}},[`${t}-has-fix-start ${t}-container:before`]:{display:`none`},[`${t}-has-fix-end ${t}-container:after`]:{display:`none`},[`${t}-fix-start-shadow-show ${t}-container:before`]:u,[`${t}-fix-end-shadow-show ${t}-container:after`]:d}}},XQ=e=>{let{componentCls:t,antCls:n,margin:r}=e;return{[`${t}-wrapper`]:{[`${t}-pagination${n}-pagination`]:{margin:`${X(r)} 0`},[`${t}-pagination`]:{display:`flex`,flexWrap:`wrap`,rowGap:e.paddingXS,"> *":{flex:`none`},"&-start":{justifyContent:`flex-start`},"&-center":{justifyContent:`center`},"&-end":{justifyContent:`flex-end`}}}}},ZQ=e=>{let{componentCls:t,tableRadius:n}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${X(n)} ${X(n)} 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${t}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:n,borderStartEndRadius:n,"&::before":{borderStartStartRadius:n},"&::after":{borderStartEndRadius:n},[`> ${t}-content`]:{borderStartStartRadius:n,borderStartEndRadius:n},"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:n},"> *:last-child":{borderStartEndRadius:n}}},"&-footer":{borderRadius:`0 0 ${X(n)} ${X(n)}`}}}}},QQ=e=>{let{componentCls:t}=e,[n,r]=JQ(e);return{[`${t}-wrapper-rtl`]:{direction:`rtl`,table:{direction:`rtl`},[`${t}-row-expand-icon`]:{float:`right`,"&::after":{transform:`rotate(-90deg)`},"&-collapsed::before":{transform:`rotate(180deg)`},"&-collapsed::after":{transform:`rotate(0deg)`}},[`${t}-cell-fix`]:{"&-start-shadow-show:after":r,"&-end-shadow-show:after":n},[`${t}-container`]:{[`${t}-row-indent`]:{float:`right`}},[`${t}-fix-start-shadow-show ${t}-container:before`]:r,[`${t}-fix-end-shadow-show ${t}-container:after`]:n}}},$Q=e=>{let{componentCls:t,antCls:n,iconCls:r,fontSizeIcon:i,padding:a,paddingXS:o,headerIconColor:s,headerIconHoverColor:c,tableSelectionColumnWidth:l,tableSelectedRowBg:u,tableSelectedRowHoverBg:d,tableRowHoverBg:f,tablePaddingHorizontal:p,calc:m}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:l,[`&${t}-selection-col-with-dropdown`]:{width:m(l).add(i).add(m(a).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:m(l).add(m(o).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:m(l).add(i).add(m(a).div(4)).add(m(o).mul(2)).equal()}},[` table tr th${t}-selection-column, table tr td${t}-selection-column, ${t}-selection-column - `]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:`center`,[`${n}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:m(e.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${t}-selection-column::after`]:{backgroundColor:`transparent !important`},[`${t}-selection`]:{position:`relative`,display:`inline-flex`,flexDirection:`column`},[`${t}-selection-extra`]:{position:`absolute`,top:0,zIndex:1,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,marginInlineStart:`100%`,paddingInlineStart:X(m(p).div(4).equal()),[r]:{color:s,fontSize:i,verticalAlign:`baseline`,"&:hover":{color:c}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:u,"&-row-hover":{background:d}}},[`> ${t}-cell-row-hover`]:{background:f}}}}}},i$=e=>{let{componentCls:t,tableExpandColumnWidth:n,calc:r}=e,i=(e,i,a,o)=>({[`${t}${t}-${e}`]:{fontSize:o,[` + `]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:`center`,[`${n}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:m(e.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${t}-selection-column::after`]:{backgroundColor:`transparent !important`},[`${t}-selection`]:{position:`relative`,display:`inline-flex`,flexDirection:`column`},[`${t}-selection-extra`]:{position:`absolute`,top:0,zIndex:1,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,marginInlineStart:`100%`,paddingInlineStart:X(m(p).div(4).equal()),[r]:{color:s,fontSize:i,verticalAlign:`baseline`,"&:hover":{color:c}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:u,"&-row-hover":{background:d}}},[`> ${t}-cell-row-hover`]:{background:f}}}}}},e$=e=>{let{componentCls:t,tableExpandColumnWidth:n,calc:r}=e,i=(e,i,a,o)=>({[`${t}${t}-${e}`]:{fontSize:o,[` ${t}-title, ${t}-footer, ${t}-cell, @@ -350,13 +350,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${t}-tbody > tr > td, tfoot > tr > th, tfoot > tr > td - `]:{padding:`${X(i)} ${X(a)}`},[`${t}-filter-trigger`]:{marginInlineEnd:X(r(a).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${X(r(i).mul(-1).equal())} ${X(r(a).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:X(r(i).mul(-1).equal()),marginInline:`${X(r(n).sub(a).equal())} ${X(r(a).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:X(r(a).div(4).equal())}}});return{[`${t}-wrapper`]:{...i(`medium`,e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle),...i(`small`,e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall)}}},a$=e=>{let{componentCls:t,marginXXS:n,fontSizeIcon:r,headerIconColor:i,headerIconHoverColor:a}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:`none`,cursor:`pointer`,transition:`all ${e.motionDurationSlow}, left 0s`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:`transparent !important`}},"&:focus-visible":{color:e.colorPrimary},[` + `]:{padding:`${X(i)} ${X(a)}`},[`${t}-filter-trigger`]:{marginInlineEnd:X(r(a).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${X(r(i).mul(-1).equal())} ${X(r(a).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:X(r(i).mul(-1).equal()),marginInline:`${X(r(n).sub(a).equal())} ${X(r(a).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:X(r(a).div(4).equal())}}});return{[`${t}-wrapper`]:{...i(`medium`,e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle),...i(`small`,e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall)}}},t$=e=>{let{componentCls:t,marginXXS:n,fontSizeIcon:r,headerIconColor:i,headerIconHoverColor:a}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:`none`,cursor:`pointer`,transition:`all ${e.motionDurationSlow}, left 0s`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:`transparent !important`}},"&:focus-visible":{color:e.colorPrimary},[` &${t}-cell-fix-left:hover, &${t}-cell-fix-right:hover - `]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:`transparent !important`}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:`relative`,zIndex:1,flex:1,minWidth:0},[`${t}-column-sorters`]:{display:`flex`,flex:`auto`,alignItems:`center`,justifyContent:`space-between`,"&::after":{position:`absolute`,inset:0,width:`100%`,height:`100%`,content:`""`}},[`${t}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:`none`}},[`${t}-column-sorter`]:{marginInlineStart:n,color:i,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:`inline-flex`,flexDirection:`column`,alignItems:`center`},"&-up, &-down":{fontSize:r,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:`-0.3em`}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:a}}}},o$=e=>{let{componentCls:t,opacityLoading:n,tableScrollThumbBg:r,tableScrollThumbBgHover:i,tableScrollThumbSize:a,tableScrollBg:o,stickyScrollBarBorderRadius:s,lineWidth:c,lineType:l,tableBorderColor:u,zIndexTableFixed:d}=e,f=`${X(c)} ${l} ${u}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:`sticky`,zIndex:`calc(var(--columns-count) * 2 + ${d} + 1)`,background:e.colorBgContainer},"&-scroll":{position:`sticky`,bottom:0,height:`${X(a)} !important`,zIndex:`calc(var(--columns-count) * 2 + ${d} + 1)`,display:`flex`,alignItems:`center`,background:o,borderTop:f,opacity:n,"&:hover":{transformOrigin:`center bottom`},"&-bar":{height:a,backgroundColor:r,borderRadius:s,transition:`all ${e.motionDurationSlow}, transform 0s`,position:`absolute`,bottom:0,"&:hover, &-active":{backgroundColor:i}}}}}}},s$=e=>{let{componentCls:t,lineWidth:n,tableBorderColor:r,calc:i}=e,a=`${X(n)} ${e.lineType} ${r}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:`relative`,zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:a}}},[`div${t}-summary`]:{boxShadow:`0 ${X(i(n).mul(-1).equal())} 0 ${r}`}}}},c$=e=>{let{componentCls:t,motionDurationMid:n,lineWidth:r,lineType:i,tableBorderColor:a,calc:o}=e,s=`${X(r)} ${i} ${a}`,c=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[` + `]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:`transparent !important`}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:`relative`,zIndex:1,flex:1,minWidth:0},[`${t}-column-sorters`]:{display:`flex`,flex:`auto`,alignItems:`center`,justifyContent:`space-between`,"&::after":{position:`absolute`,inset:0,width:`100%`,height:`100%`,content:`""`}},[`${t}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:`none`}},[`${t}-column-sorter`]:{marginInlineStart:n,color:i,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:`inline-flex`,flexDirection:`column`,alignItems:`center`},"&-up, &-down":{fontSize:r,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:`-0.3em`}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:a}}}},n$=e=>{let{componentCls:t,opacityLoading:n,tableScrollThumbBg:r,tableScrollThumbBgHover:i,tableScrollThumbSize:a,tableScrollBg:o,stickyScrollBarBorderRadius:s,lineWidth:c,lineType:l,tableBorderColor:u,zIndexTableFixed:d}=e,f=`${X(c)} ${l} ${u}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:`sticky`,zIndex:`calc(var(--columns-count) * 2 + ${d} + 1)`,background:e.colorBgContainer},"&-scroll":{position:`sticky`,bottom:0,height:`${X(a)} !important`,zIndex:`calc(var(--columns-count) * 2 + ${d} + 1)`,display:`flex`,alignItems:`center`,background:o,borderTop:f,opacity:n,"&:hover":{transformOrigin:`center bottom`},"&-bar":{height:a,backgroundColor:r,borderRadius:s,transition:`all ${e.motionDurationSlow}, transform 0s`,position:`absolute`,bottom:0,"&:hover, &-active":{backgroundColor:i}}}}}}},r$=e=>{let{componentCls:t,lineWidth:n,tableBorderColor:r,calc:i}=e,a=`${X(n)} ${e.lineType} ${r}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:`relative`,zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:a}}},[`div${t}-summary`]:{boxShadow:`0 ${X(i(n).mul(-1).equal())} 0 ${r}`}}}},i$=e=>{let{componentCls:t,motionDurationMid:n,lineWidth:r,lineType:i,tableBorderColor:a,calc:o}=e,s=`${X(r)} ${i} ${a}`,c=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[` & > ${t}-row, & > div:not(${t}-row) > ${t}-row - `]:{display:`flex`,boxSizing:`border-box`,width:`100%`}},[`${t}-cell`]:{borderBottom:s,transition:`background-color ${n}`},[`${t}-expanded-row`]:{[`${c}${c}-fixed`]:{position:`sticky`,insetInlineStart:0,overflow:`hidden`,width:`calc(var(--virtual-width) - ${X(r)})`,borderInlineEnd:`none`}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:`""`,insetInline:0,bottom:0,borderBottom:s,position:`absolute`},[`${t}-cell`]:{borderInlineEnd:s,[`&${t}-cell-fix-right-first:before`]:{content:`""`,position:`absolute`,insetBlock:0,insetInlineStart:o(r).mul(-1).equal(),borderInlineStart:s}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:s,borderBottom:s}}}}}},l$=e=>{let{componentCls:t,fontWeightStrong:n,tablePaddingVertical:r,tablePaddingHorizontal:i,tableExpandColumnWidth:a,lineWidth:o,lineType:s,tableBorderColor:c,tableFontSize:l,tableBg:u,tableRadius:d,tableHeaderTextColor:f,motionDurationMid:p,tableHeaderBg:m,tableHeaderCellSplitColor:h,tableFooterTextColor:g,tableFooterBg:_,calc:v}=e,y=`${X(o)} ${s} ${c}`;return{[`${t}-wrapper`]:{clear:`both`,maxWidth:`100%`,"--rc-virtual-list-scrollbar-bg":e.tableScrollBg,...Ul(),[t]:{...Vl(e),fontSize:l,background:u,borderRadius:`${X(d)} ${X(d)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`},table:{width:`100%`,textAlign:`start`,borderRadius:`${X(d)} ${X(d)} 0 0`,borderCollapse:`separate`,borderSpacing:0},[` + `]:{display:`flex`,boxSizing:`border-box`,width:`100%`}},[`${t}-cell`]:{borderBottom:s,transition:`background-color ${n}`},[`${t}-expanded-row`]:{[`${c}${c}-fixed`]:{position:`sticky`,insetInlineStart:0,overflow:`hidden`,width:`calc(var(--virtual-width) - ${X(r)})`,borderInlineEnd:`none`}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:`""`,insetInline:0,bottom:0,borderBottom:s,position:`absolute`},[`${t}-cell`]:{borderInlineEnd:s,[`&${t}-cell-fix-right-first:before`]:{content:`""`,position:`absolute`,insetBlock:0,insetInlineStart:o(r).mul(-1).equal(),borderInlineStart:s}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:s,borderBottom:s}}}}}},a$=e=>{let{componentCls:t,fontWeightStrong:n,tablePaddingVertical:r,tablePaddingHorizontal:i,tableExpandColumnWidth:a,lineWidth:o,lineType:s,tableBorderColor:c,tableFontSize:l,tableBg:u,tableRadius:d,tableHeaderTextColor:f,motionDurationMid:p,tableHeaderBg:m,tableHeaderCellSplitColor:h,tableFooterTextColor:g,tableFooterBg:_,calc:v}=e,y=`${X(o)} ${s} ${c}`;return{[`${t}-wrapper`]:{clear:`both`,maxWidth:`100%`,"--rc-virtual-list-scrollbar-bg":e.tableScrollBg,...Ul(),[t]:{...Vl(e),fontSize:l,background:u,borderRadius:`${X(d)} ${X(d)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`},table:{width:`100%`,textAlign:`start`,borderRadius:`${X(d)} ${X(d)} 0 0`,borderCollapse:`separate`,borderSpacing:0},[` ${t}-cell, ${t}-thead > tr > th, ${t}-tbody > tr > th, @@ -367,63 +367,63 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho > ${t}-wrapper:only-child, > ${t}-expanded-row-fixed > ${t}-wrapper:only-child `]:{[t]:{marginBlock:X(v(r).mul(-1).equal()),marginInline:`${X(v(a).sub(i).equal())} - ${X(v(i).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:`relative`,color:f,fontWeight:n,textAlign:`start`,background:m,borderBottom:y,transition:`background-color ${p} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:`0 !important`,borderBlock:`0 !important`,[`${t}-measure-cell-content`]:{height:0,overflow:`hidden`,pointerEvents:`none`}}}},[`${t}-footer`]:{padding:`${X(r)} ${X(i)}`,color:g,background:_}}}},u$=e=>{let{colorFillAlter:t,colorBgContainer:n,colorTextHeading:r,colorFillSecondary:i,colorFillContent:a,controlItemBgActive:o,controlItemBgActiveHover:s,padding:c,paddingSM:l,paddingXS:u,colorBorderSecondary:d,borderRadiusLG:f,controlHeight:p,colorTextPlaceholder:m,fontSize:h,fontSizeSM:g,lineHeight:_,lineWidth:v,colorIcon:y,colorIconHover:b,opacityLoading:x,controlInteractiveSize:S}=e,C=new jc(i).onBackground(n).toHexString(),w=new jc(a).onBackground(n).toHexString(),T=new jc(t).onBackground(n).toHexString(),E=new jc(y),D=new jc(b),O=S/2-v,k=O*2+v*3;return{headerBg:T,headerColor:r,headerSortActiveBg:C,headerSortHoverBg:w,bodySortBg:T,rowHoverBg:T,rowSelectedBg:o,rowSelectedHoverBg:s,rowExpandedBg:t,cellPaddingBlock:c,cellPaddingInline:c,cellPaddingBlockMD:l,cellPaddingInlineMD:u,cellPaddingBlockSM:u,cellPaddingInlineSM:u,borderColor:d,headerBorderRadius:f,footerBg:T,footerColor:r,cellFontSize:h,cellFontSizeMD:h,cellFontSizeSM:h,headerSplitColor:d,fixedHeaderSortActiveBg:C,headerFilterHoverBg:a,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:p,stickyScrollBarBg:m,stickyScrollBarBorderRadius:100,expandIconMarginTop:(h*_-v*3)/2-Math.ceil((g*1.4-v*3)/2),headerIconColor:E.clone().setA(E.a*x).toRgbString(),headerIconHoverColor:D.clone().setA(D.a*x).toRgbString(),expandIconHalfInner:O,expandIconSize:k,expandIconScale:S/k}},d$=2,f$=Xl(`Table`,e=>{let{colorTextHeading:t,colorSplit:n,colorBgContainer:r,controlInteractiveSize:i,headerBg:a,headerColor:o,headerSortActiveBg:s,headerSortHoverBg:c,bodySortBg:l,rowHoverBg:u,rowSelectedBg:d,rowSelectedHoverBg:f,rowExpandedBg:p,cellPaddingBlock:m,cellPaddingInline:h,cellPaddingBlockMD:g,cellPaddingInlineMD:_,cellPaddingBlockSM:v,cellPaddingInlineSM:y,borderColor:b,footerBg:x,footerColor:S,headerBorderRadius:C,cellFontSize:w,cellFontSizeMD:T,cellFontSizeSM:E,headerSplitColor:D,fixedHeaderSortActiveBg:O,headerFilterHoverBg:k,filterDropdownBg:A,expandIconBg:j,selectionColumnWidth:M,stickyScrollBarBg:N,calc:P}=e,F=lc(e,{tableFontSize:w,tableBg:r,tableRadius:C,tablePaddingVertical:m,tablePaddingHorizontal:h,tablePaddingVerticalMiddle:g,tablePaddingHorizontalMiddle:_,tablePaddingVerticalSmall:v,tablePaddingHorizontalSmall:y,tableBorderColor:b,tableHeaderTextColor:o,tableHeaderBg:a,tableFooterTextColor:S,tableFooterBg:x,tableHeaderCellSplitColor:D,tableHeaderSortBg:s,tableHeaderSortHoverBg:c,tableBodySortBg:l,tableFixedHeaderSortActiveBg:O,tableHeaderFilterActiveBg:k,tableFilterDropdownBg:A,tableRowHoverBg:u,tableSelectedRowBg:d,tableSelectedRowHoverBg:f,zIndexTableFixed:d$,tableFontSizeMiddle:T,tableFontSizeSmall:E,tableSelectionColumnWidth:M,tableExpandIconBg:j,tableExpandColumnWidth:P(i).add(P(e.padding).mul(2)).equal(),tableExpandedRowBg:p,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:N,tableScrollThumbBgHover:t,tableScrollBg:n});return[l$(F),e$(F),s$(F),a$(F),ZQ(F),qQ(F),t$(F),XQ(F),s$(F),YQ(F),r$(F),$Q(F),o$(F),JQ(F),i$(F),n$(F),c$(F)]},u$,{resetFont:!1,unitless:{expandIconScale:!0}}),p$=[],m$=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,classNames:o,styles:s,size:c,bordered:l,dropdownPrefixCls:u,dataSource:d,pagination:f,rowSelection:p,rowKey:m,rowClassName:h,columns:g,children:_,childrenColumnName:v,onChange:y,getPopupContainer:b,loading:x,expandIcon:C,expandable:w,expandedRowRender:T,expandIconColumnIndex:E,indentSize:D,scroll:O,sortDirections:k,locale:A,showSorterTooltip:j={target:`full-header`},virtual:M}=e;Ui(`Table`);let N=S.useMemo(()=>g||IY(_),[g,_]),P=vw(S.useMemo(()=>N.some(e=>e.responsive),[N])),F=S.useMemo(()=>{let e=new Set(Object.keys(P).filter(e=>P[e]));return N.filter(t=>!t.responsive||t.responsive.some(t=>e.has(t)))},[N,P]),I=hi(e,[`className`,`style`,`columns`]),{locale:L=Bd,table:R}=S.useContext(ma),{getPrefixCls:z,direction:B,renderEmpty:V,getPopupContainer:H,className:U,style:ee,classNames:te,styles:ne}=_a(`table`),W=Oh(e=>c===`middle`?`medium`:c??e),re={...e,size:W,bordered:l},[G,K]=xf([te,o],[ne,s],{props:re},{pagination:{_default:`root`},header:{_default:`wrapper`},body:{_default:`wrapper`}}),q={...L.Table,...A},[ie]=qd(`global`,Bd.global),J=d||p$,ae=z(`table`,n),oe=z(`dropdown`,u),[,se]=zl(),ce=S.useMemo(()=>ef(p)?{columnWidth:se.Table?.selectionColumnWidth,...p}:p,[p,se.Table?.selectionColumnWidth]),le=ap(ae),[ue,de]=f$(ae,le),fe={childrenColumnName:v,expandIconColumnIndex:E,...w,expandIcon:w?.expandIcon??R?.expandable?.expandIcon},{childrenColumnName:pe=`children`}=fe,me=S.useMemo(()=>J.some(e=>e?.[pe])?`nest`:T||w?.expandedRowRender?`row`:null,[pe,J]),he={body:S.useRef(null)},ge=YX(ae),_e=S.useRef(null),ve=S.useRef(null);Df(t,()=>({...ve.current,nativeElement:_e.current}));let ye=m||R?.rowKey||`key`,be=O??R?.scroll,xe=S.useMemo(()=>typeof ye==`function`?ye:e=>e?.[ye],[ye]),[Se]=CQ(J,pe,xe),Ce={},we=(e,t,n=!1)=>{let r={...Ce,...e};n&&(Ce.resetPagination?.(),r.pagination?.current&&(r.pagination.current=1),f&&f.onChange?.(1,r.pagination?.pageSize)),O&&O.scrollToFirstRowOnChange!==!1&&he.body.current&&ip(0,{getContainer:()=>he.body.current}),y?.(r.pagination,r.filters,r.sorter,{currentDataSource:bQ(VQ(J,r.sorterStates,pe),r.filterStates,pe),action:t})},[Te,Ee,De,Oe]=HQ({prefixCls:ae,mergedColumns:F,onSorterChange:(e,t)=>{we({sorter:e,sorterStates:t},`sort`,!1)},sortDirections:k||[`ascend`,`descend`],tableLocale:q,showSorterTooltip:j,globalLocale:ie}),ke=S.useMemo(()=>VQ(J,Ee,pe),[pe,J,Ee]);Ce.sorter=Oe(),Ce.sorterStates=Ee;let[Ae,je,Me]=SQ({prefixCls:ae,locale:q,dropdownPrefixCls:oe,mergedColumns:F,onFilterChange:(e,t)=>{we({filters:e,filterStates:t},`filter`,!0)},getPopupContainer:b||H,rootClassName:Y(i,le)}),Ne=bQ(ke,je,pe);Ce.filters=Me,Ce.filterStates=je;let[Pe]=WQ(S.useMemo(()=>{let e={};return Object.keys(Me).forEach(t=>{Me[t]!==null&&(e[t]=Me[t])}),{...De,filters:e}},[De,Me])),[Fe,Ie]=TQ(Ne.length,(e,t)=>{we({pagination:{...Ce.pagination,current:e,pageSize:t}},`paginate`)},f);Ce.pagination=f===!1?{}:wQ(Fe,f),Ce.resetPagination=Ie;let Le=S.useMemo(()=>{if(f===!1||!Fe.pageSize)return Ne;let{current:e=1,total:t,pageSize:n=10}=Fe;return Ne.lengthn?Ne.slice((e-1)*n,e*n):Ne:Ne.slice((e-1)*n,e*n)},[!!f,Ne,Fe?.current,Fe?.pageSize,Fe?.total]),[Re,ze]=qX({prefixCls:ae,data:Ne,pageData:Le,getRowKey:xe,getRecordByKey:Se,expandType:me,childrenColumnName:pe,locale:q,getPopupContainer:b||H},ce),Be=(e,t,n)=>{let r=typeof h==`function`?h(e,t,n):h;return Y({[`${ae}-row-selected`]:ze.has(xe(e,t))},r)};fe.__PARENT_RENDER_ICON__=fe.expandIcon,fe.expandIcon=fe.expandIcon||C||JX(q),me===`nest`&&fe.expandIconColumnIndex===void 0?fe.expandIconColumnIndex=+!!ce:fe.expandIconColumnIndex>0&&ce&&--fe.expandIconColumnIndex,typeof fe.indentSize!=`number`&&(fe.indentSize=Qd(D)?D:15);let Ve=S.useCallback(e=>Pe(Re(Ae(Te(e)))),[Te,Ae,Re]),He,Ue;if(f!==!1&&Fe?.total){let e;e=Fe.size?Fe.size:W===`small`||W===`medium`?`small`:void 0;let t=(t=`end`)=>S.createElement(KK,{...Fe,classNames:G.pagination,styles:K.pagination,className:Y(`${ae}-pagination ${ae}-pagination-${t}`,Fe.className),size:e}),{placement:n,position:r}=Fe,i=n??r,a=e=>{let t=e.toLowerCase();return t.includes(`center`)?`center`:t.includes(`left`)||t.includes(`start`)?`start`:`end`};if(Array.isArray(i)){let[e,n]=[`top`,`bottom`].map(e=>i.find(t=>t.includes(e))),r=i.every(e=>`${e}`==`none`);!e&&!n&&!r&&(Ue=t()),e&&(He=t(a(e))),n&&(Ue=t(a(n)))}else Ue=t()}let We=S.useMemo(()=>{if(typeof x==`boolean`)return{spinning:x};if(ef(x))return{spinning:!0,...x}},[x]),Ge=Y(de,le,`${ae}-wrapper`,U,{[`${ae}-wrapper-rtl`]:B===`rtl`},r,i,G.root,ue),Ke={...K.root,...ee,...a},qe=S.useMemo(()=>We?.spinning&&J===p$?null:A?.emptyText===void 0?V?.(`Table`)||S.createElement(FC,{componentName:`Table`}):A.emptyText,[We?.spinning,J,A?.emptyText,V]),Je=M?KQ:GQ,Ye={},Xe=S.useMemo(()=>{let{fontSize:e,lineHeight:t,lineWidth:n,padding:r,paddingXS:i,paddingSM:a}=se,o=Math.floor(e*t);switch(W){case`medium`:return a*2+o+n;case`small`:return i*2+o+n;default:return r*2+o+n}},[se,W]);return M&&(Ye.listItemHeight=Xe),S.createElement(`div`,{ref:_e,className:Ge,style:Ke},S.createElement(pq,{spinning:!1,...We},He,S.createElement(Je,{...Ye,...I,scroll:be,classNames:G,styles:K,ref:ve,columns:F,direction:B,expandable:fe,prefixCls:ae,className:Y({[`${ae}-medium`]:W===`medium`,[`${ae}-small`]:W===`small`,[`${ae}-bordered`]:l,[`${ae}-empty`]:J.length===0},de,le,ue),data:Le,rowKey:xe,rowClassName:Be,emptyText:qe,internalHooks:AJ,internalRefs:he,transformColumns:Ve,getContainerWidth:ge,measureRowRender:e=>S.createElement(Hw.Provider,{value:!0},S.createElement(Nm,{getPopupContainer:e=>e},e))}),Ue))}),h$=S.forwardRef((e,t)=>{let n=S.useRef(0);return n.current+=1,S.createElement(m$,{...e,ref:t,_renderTimes:n.current})});h$.SELECTION_COLUMN=VX,h$.EXPAND_COLUMN=kJ,h$.SELECTION_ALL=HX,h$.SELECTION_INVERT=UX,h$.SELECTION_NONE=WX,h$.Column=xX,h$.ColumnGroup=SX,h$.Summary=sY;var g$=h$,_$=e=>{let{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:i,calc:a}=e,o=a(r).sub(n).equal(),s=a(t).sub(n).equal();return{[i]:{...Vl(e),display:`inline-block`,height:`auto`,paddingInline:o,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:`nowrap`,backgroundColor:e.defaultBg,border:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:`start`,position:`relative`,[`&${i}-rtl`]:{direction:`rtl`},"&, a, a:hover":{color:e.defaultColor},[`${i}-close-icon`]:{marginInlineStart:s,fontSize:e.tagIconSize,color:e.colorIcon,cursor:`pointer`,transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},"&-checkable":{backgroundColor:`transparent`,borderColor:`transparent`,cursor:`pointer`,[`&:not(${i}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive},"&-disabled":{cursor:`not-allowed`,[`&:not(${i}-checkable-checked)`]:{color:e.colorTextDisabled,"&:hover":{backgroundColor:`transparent`}},[`&${i}-checkable-checked`]:{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled},"&:hover, &:active":{backgroundColor:e.colorBgContainerDisabled,color:e.colorTextDisabled},[`&:not(${i}-checkable-checked):hover`]:{color:e.colorTextDisabled}},"&-group":{display:`flex`,flexWrap:`wrap`,gap:e.paddingXS}},"&-hidden":{display:`none`},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:o}},[`&${e.componentCls}-solid`]:{borderColor:`transparent`,color:e.colorTextLightSolid,backgroundColor:e.colorBgSolid,[`&${i}-default`]:{color:e.solidTextColor}},[`${i}-filled`]:{borderColor:`transparent`,backgroundColor:e.tagBorderlessBg},[`&${i}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,backgroundColor:e.colorBgContainerDisabled,a:{cursor:`not-allowed`,pointerEvents:`none`,color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}},"a&":{"&:hover, &:active":{color:e.colorTextDisabled}},[`&${i}-outlined`]:{borderColor:e.colorBorderDisabled},[`&${i}-solid, &${i}-filled`]:{color:e.colorTextDisabled,[`${i}-close-icon`]:{color:e.colorTextDisabled}},[`${i}-close-icon`]:{cursor:`not-allowed`,color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}}}}},v$=e=>{let{lineWidth:t,fontSizeIcon:n,calc:r}=e,i=e.fontSizeSM;return lc(e,{tagFontSize:i,tagLineHeight:X(r(e.lineHeightSM).mul(i).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},y$=e=>{let t=i_(new Bg(e.colorBgSolid),`#fff`)?`#000`:`#fff`;return{defaultBg:new jc(e.colorFillTertiary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText,solidTextColor:t}},b$=Xl(`Tag`,e=>_$(v$(e)),y$),x$=S.forwardRef((e,t)=>{let{prefixCls:n,style:r,className:i,checked:a,children:o,icon:s,onChange:c,onClick:l,disabled:u,...d}=e,{getPrefixCls:f,tag:p}=S.useContext(ma),m=S.useContext(pm),h=u??m,g=e=>{h||(c?.(!a),l?.(e))},_=f(`tag`,n),[v,y]=b$(_),b=Y(_,`${_}-checkable`,{[`${_}-checkable-checked`]:a,[`${_}-checkable-disabled`]:h},p?.className,i,v,y);return S.createElement(`span`,{...d,ref:t,style:{...r,...p?.style},className:b,onClick:g},s,S.createElement(`span`,null,o))}),S$=S.forwardRef((e,t)=>{let{id:n,prefixCls:r,rootClassName:i,className:a,style:o,classNames:s,styles:c,disabled:l,options:u,value:d,defaultValue:f,onChange:p,multiple:m,...h}=e,{getPrefixCls:g,direction:_,className:v,style:y,classNames:b,styles:x}=_a(`tag`),C=g(`tag`,r),w=`${C}-checkable-group`,[T,E]=b$(C,ap(C)),[D,O]=xf([b,s],[x,c],{props:e}),k=(0,S.useMemo)(()=>Array.isArray(u)?u.map(e=>ef(e)?e:{value:e,label:e}):[],[u]),[A,j]=Wn(f,d),M=(e,t)=>{let n=null;if(m){let r=A||[];n=e?[].concat(da(r),[t.value]):r.filter(e=>e!==t.value)}else n=e?t.value:null;j(n),p?.(n)},N=S.useRef(null);(0,S.useImperativeHandle)(t,()=>({nativeElement:N.current}));let P=bi(h,{aria:!0,data:!0});return S.createElement(`div`,{...P,className:Y(w,v,i,{[`${w}-disabled`]:l,[`${w}-rtl`]:_===`rtl`},T,E,a,D.root),style:{...y,...O.root,...o},id:n,ref:N},k.map(e=>S.createElement(x$,{key:e.value,className:Y(`${w}-item`,D.item),style:O.item,checked:m?(A||[]).includes(e.value):A===e.value,onChange:t=>M(t,e),disabled:l},e.label)))});function C$(e,t){let{color:n,variant:r,bordered:i}=e;return S.useMemo(()=>{let e=n?.endsWith(`-inverse`),a;a=r||(e?`solid`:i===!1?`filled`:t||`filled`);let o=e?n?.replace(`-inverse`,``):n,s=Xw(n),c=Zw(n),l={};if(!s&&!c&&o)if(a===`solid`)l.backgroundColor=n;else{let e=new jc(o).toHsl();e.l=.95,l.backgroundColor=new jc(e).toHexString(),l.color=n,a===`outlined`&&(l.borderColor=n)}return[a,o,s,c,l]},[n,r,i,t])}var w$=e=>eu(e,(t,{textColor:n,lightBorderColor:r,lightColor:i,darkColor:a})=>({[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:i,borderColor:r,color:n},[`&${e.componentCls}-solid`]:{backgroundColor:a,borderColor:a,color:e.colorTextLightSolid},[`&${e.componentCls}-filled`]:{backgroundColor:i,color:n}}})),T$=Ql([`Tag`,`preset`],e=>w$(v$(e)),y$);function E$(e){return typeof e==`string`?e.charAt(0).toUpperCase()+e.slice(1):e}var D$=(e,t,n)=>{let r=E$(n);return{[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:e[`color${r}Bg`],borderColor:e[`color${r}Border`],color:e[`color${n}`]},[`&${e.componentCls}-solid`]:{backgroundColor:e[`color${n}`],borderColor:e[`color${n}`]},[`&${e.componentCls}-filled`]:{backgroundColor:e[`color${r}Bg`],color:e[`color${n}`]}}}},O$=Ql([`Tag`,`status`],e=>{let t=v$(e);return[D$(t,`success`,`Success`),D$(t,`processing`,`Info`),D$(t,`error`,`Error`),D$(t,`warning`,`Warning`)]},y$),k$=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,children:o,icon:s,color:c,variant:l,onClose:u,bordered:d,disabled:f,href:p,target:m,styles:h,classNames:g,..._}=e,{getPrefixCls:v,direction:y,className:b,variant:x,style:C,classNames:w,styles:T}=_a(`tag`),[E,D,O,k,A]=C$(e,x),j=O||k,M=S.useContext(pm),N=f??M,{tag:P}=S.useContext(ma),[F,I]=S.useState(!0),L=hi(_,[`closeIcon`,`closable`]),R={...e,color:D,variant:E,disabled:N},[z,B]=xf([w,g],[T,h],{props:R}),V=S.useMemo(()=>{let e={...B.root,...C,...a};return N||(e={...A,...e}),e},[B.root,C,a,A,N]),H=v(`tag`,n),[U,ee]=b$(H),te=Y(H,b,z.root,`${H}-${E}`,{[`${H}-${D}`]:j,[`${H}-hidden`]:!F,[`${H}-rtl`]:y===`rtl`,[`${H}-disabled`]:N},r,i,U,ee),ne=e=>{N||(e.stopPropagation(),u?.(e),!e.defaultPrevented&&I(!1))},[,W]=df(af(e),af(P),{closable:!1,closeIconRender:e=>sm(e,S.createElement(`span`,{className:`${H}-close-icon`,onClick:ne},e),e=>({onClick:t=>{e?.onClick?.(t),ne(t)},className:Y(e?.className,`${H}-close-icon`)}))}),re=typeof _.onClick==`function`||o&&o.type===`a`,G=cm(s,{className:Y(S.isValidElement(s)?s.props?.className:void 0,z.icon),style:B.icon}),K=G?S.createElement(S.Fragment,null,G,o&&S.createElement(`span`,{className:z.content,style:B.content},o)):o,q=p?`a`:`span`,ie=S.createElement(q,{...L,ref:t,className:te,style:V,href:N?void 0:p,target:m,onClick:N?void 0:L.onClick,...p&&N?{"aria-disabled":!0}:{}},K,W,O&&S.createElement(T$,{key:`preset`,prefixCls:H}),k&&S.createElement(O$,{key:`status`,prefixCls:H}));return re?S.createElement(Dh,{component:`Tag`},ie):ie});k$.CheckableTag=x$,k$.CheckableTagGroup=S$;var A$=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z`}}]},name:`delete`,theme:`outlined`}}))());function j$(){return j$=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,j$({},e,{ref:t,icon:A$.default}))),N$=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z`}}]},name:`edit`,theme:`outlined`}}))());function P$(){return P$=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,P$({},e,{ref:t,icon:N$.default}))),I$=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z`}}]},name:`enter`,theme:`outlined`}}))());function L$(){return L$=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,L$({},e,{ref:t,icon:I$.default}))),z$=(e,t,n,r)=>{let{titleMarginBottom:i,fontWeightStrong:a}=r;return{marginBottom:i,color:n,fontWeight:a,fontSize:e,lineHeight:t}},B$=e=>{let t=[1,2,3,4,5],n={};return t.forEach(t=>{n[` + ${X(v(i).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:`relative`,color:f,fontWeight:n,textAlign:`start`,background:m,borderBottom:y,transition:`background-color ${p} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:`0 !important`,borderBlock:`0 !important`,[`${t}-measure-cell-content`]:{height:0,overflow:`hidden`,pointerEvents:`none`}}}},[`${t}-footer`]:{padding:`${X(r)} ${X(i)}`,color:g,background:_}}}},o$=e=>{let{colorFillAlter:t,colorBgContainer:n,colorTextHeading:r,colorFillSecondary:i,colorFillContent:a,controlItemBgActive:o,controlItemBgActiveHover:s,padding:c,paddingSM:l,paddingXS:u,colorBorderSecondary:d,borderRadiusLG:f,controlHeight:p,colorTextPlaceholder:m,fontSize:h,fontSizeSM:g,lineHeight:_,lineWidth:v,colorIcon:y,colorIconHover:b,opacityLoading:x,controlInteractiveSize:S}=e,C=new jc(i).onBackground(n).toHexString(),w=new jc(a).onBackground(n).toHexString(),T=new jc(t).onBackground(n).toHexString(),E=new jc(y),D=new jc(b),O=S/2-v,k=O*2+v*3;return{headerBg:T,headerColor:r,headerSortActiveBg:C,headerSortHoverBg:w,bodySortBg:T,rowHoverBg:T,rowSelectedBg:o,rowSelectedHoverBg:s,rowExpandedBg:t,cellPaddingBlock:c,cellPaddingInline:c,cellPaddingBlockMD:l,cellPaddingInlineMD:u,cellPaddingBlockSM:u,cellPaddingInlineSM:u,borderColor:d,headerBorderRadius:f,footerBg:T,footerColor:r,cellFontSize:h,cellFontSizeMD:h,cellFontSizeSM:h,headerSplitColor:d,fixedHeaderSortActiveBg:C,headerFilterHoverBg:a,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:p,stickyScrollBarBg:m,stickyScrollBarBorderRadius:100,expandIconMarginTop:(h*_-v*3)/2-Math.ceil((g*1.4-v*3)/2),headerIconColor:E.clone().setA(E.a*x).toRgbString(),headerIconHoverColor:D.clone().setA(D.a*x).toRgbString(),expandIconHalfInner:O,expandIconSize:k,expandIconScale:S/k}},s$=2,c$=Xl(`Table`,e=>{let{colorTextHeading:t,colorSplit:n,colorBgContainer:r,controlInteractiveSize:i,headerBg:a,headerColor:o,headerSortActiveBg:s,headerSortHoverBg:c,bodySortBg:l,rowHoverBg:u,rowSelectedBg:d,rowSelectedHoverBg:f,rowExpandedBg:p,cellPaddingBlock:m,cellPaddingInline:h,cellPaddingBlockMD:g,cellPaddingInlineMD:_,cellPaddingBlockSM:v,cellPaddingInlineSM:y,borderColor:b,footerBg:x,footerColor:S,headerBorderRadius:C,cellFontSize:w,cellFontSizeMD:T,cellFontSizeSM:E,headerSplitColor:D,fixedHeaderSortActiveBg:O,headerFilterHoverBg:k,filterDropdownBg:A,expandIconBg:j,selectionColumnWidth:M,stickyScrollBarBg:N,calc:P}=e,F=lc(e,{tableFontSize:w,tableBg:r,tableRadius:C,tablePaddingVertical:m,tablePaddingHorizontal:h,tablePaddingVerticalMiddle:g,tablePaddingHorizontalMiddle:_,tablePaddingVerticalSmall:v,tablePaddingHorizontalSmall:y,tableBorderColor:b,tableHeaderTextColor:o,tableHeaderBg:a,tableFooterTextColor:S,tableFooterBg:x,tableHeaderCellSplitColor:D,tableHeaderSortBg:s,tableHeaderSortHoverBg:c,tableBodySortBg:l,tableFixedHeaderSortActiveBg:O,tableHeaderFilterActiveBg:k,tableFilterDropdownBg:A,tableRowHoverBg:u,tableSelectedRowBg:d,tableSelectedRowHoverBg:f,zIndexTableFixed:s$,tableFontSizeMiddle:T,tableFontSizeSmall:E,tableSelectionColumnWidth:M,tableExpandIconBg:j,tableExpandColumnWidth:P(i).add(P(e.padding).mul(2)).equal(),tableExpandedRowBg:p,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:N,tableScrollThumbBgHover:t,tableScrollBg:n});return[a$(F),XQ(F),r$(F),t$(F),qQ(F),UQ(F),ZQ(F),KQ(F),r$(F),GQ(F),$Q(F),YQ(F),n$(F),WQ(F),e$(F),QQ(F),i$(F)]},o$,{resetFont:!1,unitless:{expandIconScale:!0}}),l$=[],u$=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,classNames:o,styles:s,size:c,bordered:l,dropdownPrefixCls:u,dataSource:d,pagination:f,rowSelection:p,rowKey:m,rowClassName:h,columns:g,children:_,childrenColumnName:v,onChange:y,getPopupContainer:b,loading:x,expandIcon:C,expandable:w,expandedRowRender:T,expandIconColumnIndex:E,indentSize:D,scroll:O,sortDirections:k,locale:A,showSorterTooltip:j={target:`full-header`},virtual:M}=e;Ui(`Table`);let N=S.useMemo(()=>g||MY(_),[g,_]),P=_w(S.useMemo(()=>N.some(e=>e.responsive),[N])),F=S.useMemo(()=>{let e=new Set(Object.keys(P).filter(e=>P[e]));return N.filter(t=>!t.responsive||t.responsive.some(t=>e.has(t)))},[N,P]),I=hi(e,[`className`,`style`,`columns`]),{locale:L=Bd,table:R}=S.useContext(ma),{getPrefixCls:z,direction:B,renderEmpty:V,getPopupContainer:H,className:U,style:ee,classNames:te,styles:ne}=_a(`table`),W=Oh(e=>c===`middle`?`medium`:c??e),re={...e,size:W,bordered:l},[G,K]=xf([te,o],[ne,s],{props:re},{pagination:{_default:`root`},header:{_default:`wrapper`},body:{_default:`wrapper`}}),q={...L.Table,...A},[ie]=qd(`global`,Bd.global),J=d||l$,ae=z(`table`,n),oe=z(`dropdown`,u),[,se]=zl(),ce=S.useMemo(()=>ef(p)?{columnWidth:se.Table?.selectionColumnWidth,...p}:p,[p,se.Table?.selectionColumnWidth]),le=ap(ae),[ue,de]=c$(ae,le),fe={childrenColumnName:v,expandIconColumnIndex:E,...w,expandIcon:w?.expandIcon??R?.expandable?.expandIcon},{childrenColumnName:pe=`children`}=fe,me=S.useMemo(()=>J.some(e=>e?.[pe])?`nest`:T||w?.expandedRowRender?`row`:null,[pe,J]),he={body:S.useRef(null)},ge=GX(ae),_e=S.useRef(null),ve=S.useRef(null);Df(t,()=>({...ve.current,nativeElement:_e.current}));let ye=m||R?.rowKey||`key`,be=O??R?.scroll,xe=S.useMemo(()=>typeof ye==`function`?ye:e=>e?.[ye],[ye]),[Se]=yQ(J,pe,xe),Ce={},we=(e,t,n=!1)=>{let r={...Ce,...e};n&&(Ce.resetPagination?.(),r.pagination?.current&&(r.pagination.current=1),f&&f.onChange?.(1,r.pagination?.pageSize)),O&&O.scrollToFirstRowOnChange!==!1&&he.body.current&&ip(0,{getContainer:()=>he.body.current}),y?.(r.pagination,r.filters,r.sorter,{currentDataSource:gQ(LQ(J,r.sorterStates,pe),r.filterStates,pe),action:t})},[Te,Ee,De,Oe]=RQ({prefixCls:ae,mergedColumns:F,onSorterChange:(e,t)=>{we({sorter:e,sorterStates:t},`sort`,!1)},sortDirections:k||[`ascend`,`descend`],tableLocale:q,showSorterTooltip:j,globalLocale:ie}),ke=S.useMemo(()=>LQ(J,Ee,pe),[pe,J,Ee]);Ce.sorter=Oe(),Ce.sorterStates=Ee;let[Ae,je,Me]=vQ({prefixCls:ae,locale:q,dropdownPrefixCls:oe,mergedColumns:F,onFilterChange:(e,t)=>{we({filters:e,filterStates:t},`filter`,!0)},getPopupContainer:b||H,rootClassName:Y(i,le)}),Ne=gQ(ke,je,pe);Ce.filters=Me,Ce.filterStates=je;let[Pe]=BQ(S.useMemo(()=>{let e={};return Object.keys(Me).forEach(t=>{Me[t]!==null&&(e[t]=Me[t])}),{...De,filters:e}},[De,Me])),[Fe,Ie]=xQ(Ne.length,(e,t)=>{we({pagination:{...Ce.pagination,current:e,pageSize:t}},`paginate`)},f);Ce.pagination=f===!1?{}:bQ(Fe,f),Ce.resetPagination=Ie;let Le=S.useMemo(()=>{if(f===!1||!Fe.pageSize)return Ne;let{current:e=1,total:t,pageSize:n=10}=Fe;return Ne.lengthn?Ne.slice((e-1)*n,e*n):Ne:Ne.slice((e-1)*n,e*n)},[!!f,Ne,Fe?.current,Fe?.pageSize,Fe?.total]),[Re,ze]=UX({prefixCls:ae,data:Ne,pageData:Le,getRowKey:xe,getRecordByKey:Se,expandType:me,childrenColumnName:pe,locale:q,getPopupContainer:b||H},ce),Be=(e,t,n)=>{let r=typeof h==`function`?h(e,t,n):h;return Y({[`${ae}-row-selected`]:ze.has(xe(e,t))},r)};fe.__PARENT_RENDER_ICON__=fe.expandIcon,fe.expandIcon=fe.expandIcon||C||WX(q),me===`nest`&&fe.expandIconColumnIndex===void 0?fe.expandIconColumnIndex=+!!ce:fe.expandIconColumnIndex>0&&ce&&--fe.expandIconColumnIndex,typeof fe.indentSize!=`number`&&(fe.indentSize=Qd(D)?D:15);let Ve=S.useCallback(e=>Pe(Re(Ae(Te(e)))),[Te,Ae,Re]),He,Ue;if(f!==!1&&Fe?.total){let e;e=Fe.size?Fe.size:W===`small`||W===`medium`?`small`:void 0;let t=(t=`end`)=>S.createElement(HK,{...Fe,classNames:G.pagination,styles:K.pagination,className:Y(`${ae}-pagination ${ae}-pagination-${t}`,Fe.className),size:e}),{placement:n,position:r}=Fe,i=n??r,a=e=>{let t=e.toLowerCase();return t.includes(`center`)?`center`:t.includes(`left`)||t.includes(`start`)?`start`:`end`};if(Array.isArray(i)){let[e,n]=[`top`,`bottom`].map(e=>i.find(t=>t.includes(e))),r=i.every(e=>`${e}`==`none`);!e&&!n&&!r&&(Ue=t()),e&&(He=t(a(e))),n&&(Ue=t(a(n)))}else Ue=t()}let We=S.useMemo(()=>{if(typeof x==`boolean`)return{spinning:x};if(ef(x))return{spinning:!0,...x}},[x]),Ge=Y(de,le,`${ae}-wrapper`,U,{[`${ae}-wrapper-rtl`]:B===`rtl`},r,i,G.root,ue),Ke={...K.root,...ee,...a},qe=S.useMemo(()=>We?.spinning&&J===l$?null:A?.emptyText===void 0?V?.(`Table`)||S.createElement(PC,{componentName:`Table`}):A.emptyText,[We?.spinning,J,A?.emptyText,V]),Je=M?HQ:VQ,Ye={},Xe=S.useMemo(()=>{let{fontSize:e,lineHeight:t,lineWidth:n,padding:r,paddingXS:i,paddingSM:a}=se,o=Math.floor(e*t);switch(W){case`medium`:return a*2+o+n;case`small`:return i*2+o+n;default:return r*2+o+n}},[se,W]);return M&&(Ye.listItemHeight=Xe),S.createElement(`div`,{ref:_e,className:Ge,style:Ke},S.createElement(lq,{spinning:!1,...We},He,S.createElement(Je,{...Ye,...I,scroll:be,classNames:G,styles:K,ref:ve,columns:F,direction:B,expandable:fe,prefixCls:ae,className:Y({[`${ae}-medium`]:W===`medium`,[`${ae}-small`]:W===`small`,[`${ae}-bordered`]:l,[`${ae}-empty`]:J.length===0},de,le,ue),data:Le,rowKey:xe,rowClassName:Be,emptyText:qe,internalHooks:EJ,internalRefs:he,transformColumns:Ve,getContainerWidth:ge,measureRowRender:e=>S.createElement(Vw.Provider,{value:!0},S.createElement(Nm,{getPopupContainer:e=>e},e))}),Ue))}),d$=S.forwardRef((e,t)=>{let n=S.useRef(0);return n.current+=1,S.createElement(u$,{...e,ref:t,_renderTimes:n.current})});d$.SELECTION_COLUMN=LX,d$.EXPAND_COLUMN=TJ,d$.SELECTION_ALL=RX,d$.SELECTION_INVERT=zX,d$.SELECTION_NONE=BX,d$.Column=_X,d$.ColumnGroup=vX,d$.Summary=rY;var f$=d$,p$=e=>{let{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:i,calc:a}=e,o=a(r).sub(n).equal(),s=a(t).sub(n).equal();return{[i]:{...Vl(e),display:`inline-block`,height:`auto`,paddingInline:o,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:`nowrap`,backgroundColor:e.defaultBg,border:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:`start`,position:`relative`,[`&${i}-rtl`]:{direction:`rtl`},"&, a, a:hover":{color:e.defaultColor},[`${i}-close-icon`]:{marginInlineStart:s,fontSize:e.tagIconSize,color:e.colorIcon,cursor:`pointer`,transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},"&-checkable":{backgroundColor:`transparent`,borderColor:`transparent`,cursor:`pointer`,[`&:not(${i}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive},"&-disabled":{cursor:`not-allowed`,[`&:not(${i}-checkable-checked)`]:{color:e.colorTextDisabled,"&:hover":{backgroundColor:`transparent`}},[`&${i}-checkable-checked`]:{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled},"&:hover, &:active":{backgroundColor:e.colorBgContainerDisabled,color:e.colorTextDisabled},[`&:not(${i}-checkable-checked):hover`]:{color:e.colorTextDisabled}},"&-group":{display:`flex`,flexWrap:`wrap`,gap:e.paddingXS}},"&-hidden":{display:`none`},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:o}},[`&${e.componentCls}-solid`]:{borderColor:`transparent`,color:e.colorTextLightSolid,backgroundColor:e.colorBgSolid,[`&${i}-default`]:{color:e.solidTextColor}},[`${i}-filled`]:{borderColor:`transparent`,backgroundColor:e.tagBorderlessBg},[`&${i}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,backgroundColor:e.colorBgContainerDisabled,a:{cursor:`not-allowed`,pointerEvents:`none`,color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}},"a&":{"&:hover, &:active":{color:e.colorTextDisabled}},[`&${i}-outlined`]:{borderColor:e.colorBorderDisabled},[`&${i}-solid, &${i}-filled`]:{color:e.colorTextDisabled,[`${i}-close-icon`]:{color:e.colorTextDisabled}},[`${i}-close-icon`]:{cursor:`not-allowed`,color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}}}}},m$=e=>{let{lineWidth:t,fontSizeIcon:n,calc:r}=e,i=e.fontSizeSM;return lc(e,{tagFontSize:i,tagLineHeight:X(r(e.lineHeightSM).mul(i).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},h$=e=>{let t=i_(new Bg(e.colorBgSolid),`#fff`)?`#000`:`#fff`;return{defaultBg:new jc(e.colorFillTertiary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText,solidTextColor:t}},g$=Xl(`Tag`,e=>p$(m$(e)),h$),_$=S.forwardRef((e,t)=>{let{prefixCls:n,style:r,className:i,checked:a,children:o,icon:s,onChange:c,onClick:l,disabled:u,...d}=e,{getPrefixCls:f,tag:p}=S.useContext(ma),m=S.useContext(pm),h=u??m,g=e=>{h||(c?.(!a),l?.(e))},_=f(`tag`,n),[v,y]=g$(_),b=Y(_,`${_}-checkable`,{[`${_}-checkable-checked`]:a,[`${_}-checkable-disabled`]:h},p?.className,i,v,y);return S.createElement(`span`,{...d,ref:t,style:{...r,...p?.style},className:b,onClick:g},s,S.createElement(`span`,null,o))}),v$=S.forwardRef((e,t)=>{let{id:n,prefixCls:r,rootClassName:i,className:a,style:o,classNames:s,styles:c,disabled:l,options:u,value:d,defaultValue:f,onChange:p,multiple:m,...h}=e,{getPrefixCls:g,direction:_,className:v,style:y,classNames:b,styles:x}=_a(`tag`),C=g(`tag`,r),w=`${C}-checkable-group`,[T,E]=g$(C,ap(C)),[D,O]=xf([b,s],[x,c],{props:e}),k=(0,S.useMemo)(()=>Array.isArray(u)?u.map(e=>ef(e)?e:{value:e,label:e}):[],[u]),[A,j]=Wn(f,d),M=(e,t)=>{let n=null;if(m){let r=A||[];n=e?[].concat(da(r),[t.value]):r.filter(e=>e!==t.value)}else n=e?t.value:null;j(n),p?.(n)},N=S.useRef(null);(0,S.useImperativeHandle)(t,()=>({nativeElement:N.current}));let P=bi(h,{aria:!0,data:!0});return S.createElement(`div`,{...P,className:Y(w,v,i,{[`${w}-disabled`]:l,[`${w}-rtl`]:_===`rtl`},T,E,a,D.root),style:{...y,...O.root,...o},id:n,ref:N},k.map(e=>S.createElement(_$,{key:e.value,className:Y(`${w}-item`,D.item),style:O.item,checked:m?(A||[]).includes(e.value):A===e.value,onChange:t=>M(t,e),disabled:l},e.label)))});function y$(e,t){let{color:n,variant:r,bordered:i}=e;return S.useMemo(()=>{let e=n?.endsWith(`-inverse`),a;a=r||(e?`solid`:i===!1?`filled`:t||`filled`);let o=e?n?.replace(`-inverse`,``):n,s=Yw(n),c=Xw(n),l={};if(!s&&!c&&o)if(a===`solid`)l.backgroundColor=n;else{let e=new jc(o).toHsl();e.l=.95,l.backgroundColor=new jc(e).toHexString(),l.color=n,a===`outlined`&&(l.borderColor=n)}return[a,o,s,c,l]},[n,r,i,t])}var b$=e=>eu(e,(t,{textColor:n,lightBorderColor:r,lightColor:i,darkColor:a})=>({[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:i,borderColor:r,color:n},[`&${e.componentCls}-solid`]:{backgroundColor:a,borderColor:a,color:e.colorTextLightSolid},[`&${e.componentCls}-filled`]:{backgroundColor:i,color:n}}})),x$=Ql([`Tag`,`preset`],e=>b$(m$(e)),h$);function S$(e){return typeof e==`string`?e.charAt(0).toUpperCase()+e.slice(1):e}var C$=(e,t,n)=>{let r=S$(n);return{[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:e[`color${r}Bg`],borderColor:e[`color${r}Border`],color:e[`color${n}`]},[`&${e.componentCls}-solid`]:{backgroundColor:e[`color${n}`],borderColor:e[`color${n}`]},[`&${e.componentCls}-filled`]:{backgroundColor:e[`color${r}Bg`],color:e[`color${n}`]}}}},w$=Ql([`Tag`,`status`],e=>{let t=m$(e);return[C$(t,`success`,`Success`),C$(t,`processing`,`Info`),C$(t,`error`,`Error`),C$(t,`warning`,`Warning`)]},h$),T$=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,children:o,icon:s,color:c,variant:l,onClose:u,bordered:d,disabled:f,href:p,target:m,styles:h,classNames:g,..._}=e,{getPrefixCls:v,direction:y,className:b,variant:x,style:C,classNames:w,styles:T}=_a(`tag`),[E,D,O,k,A]=y$(e,x),j=O||k,M=S.useContext(pm),N=f??M,{tag:P}=S.useContext(ma),[F,I]=S.useState(!0),L=hi(_,[`closeIcon`,`closable`]),R={...e,color:D,variant:E,disabled:N},[z,B]=xf([w,g],[T,h],{props:R}),V=S.useMemo(()=>{let e={...B.root,...C,...a};return N||(e={...A,...e}),e},[B.root,C,a,A,N]),H=v(`tag`,n),[U,ee]=g$(H),te=Y(H,b,z.root,`${H}-${E}`,{[`${H}-${D}`]:j,[`${H}-hidden`]:!F,[`${H}-rtl`]:y===`rtl`,[`${H}-disabled`]:N},r,i,U,ee),ne=e=>{N||(e.stopPropagation(),u?.(e),!e.defaultPrevented&&I(!1))},[,W]=df(af(e),af(P),{closable:!1,closeIconRender:e=>sm(e,S.createElement(`span`,{className:`${H}-close-icon`,onClick:ne},e),e=>({onClick:t=>{e?.onClick?.(t),ne(t)},className:Y(e?.className,`${H}-close-icon`)}))}),re=typeof _.onClick==`function`||o&&o.type===`a`,G=cm(s,{className:Y(S.isValidElement(s)?s.props?.className:void 0,z.icon),style:B.icon}),K=G?S.createElement(S.Fragment,null,G,o&&S.createElement(`span`,{className:z.content,style:B.content},o)):o,q=p?`a`:`span`,ie=S.createElement(q,{...L,ref:t,className:te,style:V,href:N?void 0:p,target:m,onClick:N?void 0:L.onClick,...p&&N?{"aria-disabled":!0}:{}},K,W,O&&S.createElement(x$,{key:`preset`,prefixCls:H}),k&&S.createElement(w$,{key:`status`,prefixCls:H}));return re?S.createElement(Dh,{component:`Tag`},ie):ie});T$.CheckableTag=_$,T$.CheckableTagGroup=v$;var E$=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z`}}]},name:`delete`,theme:`outlined`}}))());function D$(){return D$=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,D$({},e,{ref:t,icon:E$.default}))),k$=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z`}}]},name:`edit`,theme:`outlined`}}))());function A$(){return A$=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,A$({},e,{ref:t,icon:k$.default}))),M$=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z`}}]},name:`enter`,theme:`outlined`}}))());function N$(){return N$=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,N$({},e,{ref:t,icon:M$.default}))),F$=(e,t,n,r)=>{let{titleMarginBottom:i,fontWeightStrong:a}=r;return{marginBottom:i,color:n,fontWeight:a,fontSize:e,lineHeight:t}},I$=e=>{let t=[1,2,3,4,5],n={};return t.forEach(t=>{n[` h${t}&, div&-h${t}, div&-h${t} > textarea, h${t} - `]=z$(e[`fontSizeHeading${t}`],e[`lineHeightHeading${t}`],e.colorTextHeading,e)}),n},V$=e=>{let{componentCls:t}=e;return{[`&${`${t}-link`}`]:{...Yl(e),userSelect:`text`,[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:`none`,[`${t}-actions`]:{pointerEvents:`auto`}}}}}},H$=e=>({code:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.2em 0.1em`,fontSize:`85%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3},kbd:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.15em 0.1em`,fontSize:`90%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.06)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:Jc[2]},"u, ins":{textDecoration:`underline`,textDecorationSkipInk:`auto`},"s, del":{textDecoration:`line-through`},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:`0 1em`,padding:0,li:{marginInline:`20px 0`,marginBlock:0,paddingInline:`4px 0`,paddingBlock:0}},ul:{listStyleType:`circle`,ul:{listStyleType:`disc`}},ol:{listStyleType:`decimal`},"pre, blockquote":{margin:`1em 0`},pre:{padding:`0.4em 0.6em`,whiteSpace:`pre-wrap`,wordWrap:`break-word`,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:`inline`,margin:0,padding:0,fontSize:`inherit`,fontFamily:`inherit`,background:`transparent`,border:0}},blockquote:{paddingInline:`0.6em 0`,paddingBlock:0,borderInlineStart:`4px solid rgba(100, 100, 100, 0.2)`,opacity:.85}}),U$=e=>{let{componentCls:t,paddingSM:n}=e,r=n;return{"&-edit-content":{position:`relative`,"div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(r).div(-2).add(1).equal(),marginBottom:e.calc(r).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:`absolute`,insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:`normal`,fontSize:e.fontSize,fontStyle:`normal`,pointerEvents:`none`},textarea:{margin:`0!important`,MozTransition:`none`,height:`1em`}}}},W$=e=>({[`${e.componentCls}-copy-success`]:{"&, &:hover, &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),G$=()=>({"a&-ellipsis, span&-ellipsis":{display:`inline-block`,maxWidth:`100%`},"&-ellipsis-single-line":{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"a&, span&":{verticalAlign:`bottom`},"> code":{paddingBlock:0,maxWidth:`calc(100% - 1.2em)`,display:`inline-block`,overflow:`hidden`,textOverflow:`ellipsis`,verticalAlign:`bottom`,boxSizing:`content-box`}},"&-ellipsis-multiple-line":{display:`-webkit-box`,overflow:`hidden`,WebkitLineClamp:3,WebkitBoxOrient:`vertical`}}),K$=Xl(`Typography`,e=>{let{componentCls:t,titleMarginTop:n}=e;return{[t]:{color:e.colorText,wordBreak:`break-word`,lineHeight:e.lineHeight,[`&${t}-secondary, &${t}-link${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success, &${t}-link${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning, &${t}-link${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger, &${t}-link${t}-danger`]:{color:e.colorErrorText,[`&${t}-link:active, &${t}-link:focus`]:{color:e.colorErrorTextActive},[`&${t}-link:hover`]:{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,userSelect:`none`},"div&, p":{marginBottom:`1em`},...B$(e),[`& + h1${t}, & + h2${t}, & + h3${t}, & + h4${t}, & + h5${t}`]:{marginTop:n},"div, ul, li, p, h1, h2, h3, h4, h5":{"+ h1, + h2, + h3, + h4, + h5":{marginTop:n}},...H$(e),...V$(e),[`${t}-actions`]:{display:`inline`},[` + `]=F$(e[`fontSizeHeading${t}`],e[`lineHeightHeading${t}`],e.colorTextHeading,e)}),n},L$=e=>{let{componentCls:t}=e;return{[`&${`${t}-link`}`]:{...Yl(e),userSelect:`text`,[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:`none`,[`${t}-actions`]:{pointerEvents:`auto`}}}}}},R$=e=>({code:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.2em 0.1em`,fontSize:`85%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3},kbd:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.15em 0.1em`,fontSize:`90%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.06)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:Jc[2]},"u, ins":{textDecoration:`underline`,textDecorationSkipInk:`auto`},"s, del":{textDecoration:`line-through`},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:`0 1em`,padding:0,li:{marginInline:`20px 0`,marginBlock:0,paddingInline:`4px 0`,paddingBlock:0}},ul:{listStyleType:`circle`,ul:{listStyleType:`disc`}},ol:{listStyleType:`decimal`},"pre, blockquote":{margin:`1em 0`},pre:{padding:`0.4em 0.6em`,whiteSpace:`pre-wrap`,wordWrap:`break-word`,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:`inline`,margin:0,padding:0,fontSize:`inherit`,fontFamily:`inherit`,background:`transparent`,border:0}},blockquote:{paddingInline:`0.6em 0`,paddingBlock:0,borderInlineStart:`4px solid rgba(100, 100, 100, 0.2)`,opacity:.85}}),z$=e=>{let{componentCls:t,paddingSM:n}=e,r=n;return{"&-edit-content":{position:`relative`,"div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(r).div(-2).add(1).equal(),marginBottom:e.calc(r).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:`absolute`,insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:`normal`,fontSize:e.fontSize,fontStyle:`normal`,pointerEvents:`none`},textarea:{margin:`0!important`,MozTransition:`none`,height:`1em`}}}},B$=e=>({[`${e.componentCls}-copy-success`]:{"&, &:hover, &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),V$=()=>({"a&-ellipsis, span&-ellipsis":{display:`inline-block`,maxWidth:`100%`},"&-ellipsis-single-line":{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"a&, span&":{verticalAlign:`bottom`},"> code":{paddingBlock:0,maxWidth:`calc(100% - 1.2em)`,display:`inline-block`,overflow:`hidden`,textOverflow:`ellipsis`,verticalAlign:`bottom`,boxSizing:`content-box`}},"&-ellipsis-multiple-line":{display:`-webkit-box`,overflow:`hidden`,WebkitLineClamp:3,WebkitBoxOrient:`vertical`}}),H$=Xl(`Typography`,e=>{let{componentCls:t,titleMarginTop:n}=e;return{[t]:{color:e.colorText,wordBreak:`break-word`,lineHeight:e.lineHeight,[`&${t}-secondary, &${t}-link${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success, &${t}-link${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning, &${t}-link${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger, &${t}-link${t}-danger`]:{color:e.colorErrorText,[`&${t}-link:active, &${t}-link:focus`]:{color:e.colorErrorTextActive},[`&${t}-link:hover`]:{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,userSelect:`none`},"div&, p":{marginBottom:`1em`},...I$(e),[`& + h1${t}, & + h2${t}, & + h3${t}, & + h4${t}, & + h5${t}`]:{marginTop:n},"div, ul, li, p, h1, h2, h3, h4, h5":{"+ h1, + h2, + h3, + h4, + h5":{marginTop:n}},...R$(e),...L$(e),[`${t}-actions`]:{display:`inline`},[` ${t}-expand, ${t}-collapse, ${t}-edit, ${t}-copy - `]:{...Yl(e),marginInlineStart:e.marginXXS},...U$(e),...W$(e),...G$(),"&-rtl":{direction:`rtl`}}}},()=>({titleMarginTop:`1.2em`,titleMarginBottom:`0.5em`})),q$=e=>{let{prefixCls:t,"aria-label":n,className:r,style:i,direction:a,maxLength:o,autoSize:s=!0,value:c,onSave:l,onCancel:u,onEnd:d,component:f,enterIcon:p=S.createElement(R$,null)}=e,m=S.useRef(null),h=S.useRef(!1),g=S.useRef(null),[_,v]=S.useState(c);S.useEffect(()=>{v(c)},[c]),S.useEffect(()=>{if(m.current?.resizableTextArea){let{textArea:e}=m.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let y=({target:e})=>{v(e.value.replace(/[\n\r]/g,``))},b=()=>{h.current=!0},x=()=>{h.current=!1},C=({keyCode:e})=>{h.current||(g.current=e)},w=()=>{l(_.trim())},T=({keyCode:e,ctrlKey:t,altKey:n,metaKey:r,shiftKey:i})=>{g.current!==e||h.current||t||n||r||i||(e===Zr.ENTER?(w(),d?.()):e===Zr.ESC&&u())},E=()=>{w()},[D,O]=K$(t),k=Y(t,`${t}-edit-content`,{[`${t}-rtl`]:a===`rtl`,[`${t}-${f}`]:!!f},r,D,O);return S.createElement(`div`,{className:k,style:i},S.createElement(aK,{ref:m,maxLength:o,value:_,onChange:y,onKeyDown:C,onKeyUp:T,onCompositionStart:b,onCompositionEnd:x,onBlur:E,"aria-label":n,rows:1,autoSize:s}),p===null?null:cm(p,{className:`${t}-edit-content-confirm`}))},J$=(e,t)=>{let n=!1,r=r=>{r.stopPropagation(),r.preventDefault(),r.clipboardData?.clearData(),r.clipboardData?.setData(`text/plain`,e),t&&r.clipboardData?.setData(`text/html`,e),n=!0};try{return document.addEventListener(`copy`,r,{capture:!0}),document.execCommand(`copy`),n}catch{return!1}finally{document.removeEventListener(`copy`,r,{capture:!0})}},Y$=async(e,t)=>{try{return t?await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:`text/html`}),"text/plain":new Blob([e],{type:`text/plain`})})]):await navigator.clipboard.writeText(e),!0}catch{return!1}};async function X$(e,t){if(typeof e!=`string`)return!1;let n=t?.format===`text/html`;return!!(await Y$(e,n)||J$(e,n))}var Z$=({copyConfig:e,children:t})=>{let[n,r]=S.useState(!1),[i,a]=S.useState(!1),o=S.useRef(null),s=()=>{o.current&&clearTimeout(o.current)},c={};return e.format&&(c.format=e.format),S.useEffect(()=>s,[]),{copied:n,copyLoading:i,onClick:Rn(async n=>{n?.preventDefault(),n?.stopPropagation(),a(!0);try{await X$((typeof e.text==`function`?await e.text():e.text)||Sq(t,{skipEmpty:!0}).join(``)||``,c),a(!1),r(!0),s(),o.current=setTimeout(()=>{r(!1)},3e3),e.onCopy?.(n)}catch(e){throw a(!1),e}})}};function Q$(e,t){return S.useMemo(()=>{let n=!!e;return[n,{...t,...n&&typeof e==`object`?e:null}]},[e])}var $$=e=>{let t=(0,S.useRef)(void 0);return(0,S.useEffect)(()=>{t.current=e}),t.current},e1=(e,t,n)=>(0,S.useMemo)(()=>e===!0?{title:t??n}:(0,S.isValidElement)(e)?{title:e}:ef(e)?{title:t??n,...e}:{title:e},[e,t,n]),t1=S.forwardRef((e,t)=>{let{prefixCls:n,component:r=`article`,className:i,rootClassName:a,children:o,direction:s,style:c,...l}=e,{getPrefixCls:u,direction:d,className:f,style:p}=_a(`typography`),m=s??d,h=u(`typography`,n),[g,_]=K$(h),v=Y(h,f,{[`${h}-rtl`]:m===`rtl`},i,a,g,_),y={...p,...c};return S.createElement(r,{className:v,style:y,ref:t,...l},o)}),n1=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={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`}}))());function r1(){return r1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,r1({},e,{ref:t,icon:n1.default}))),a1=e=>e===!1?[!1,!1]:Sq(e);function o1(e,t,n){return e===!0||e===void 0?t:e||n&&t}function s1(e){let t=document.createElement(`em`);e.appendChild(t);let 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}var c1=e=>[`string`,`number`].includes(typeof e),l1=e=>{let{prefixCls:t,copied:n,locale:r,iconOnly:i,tooltips:a,icon:o,tabIndex:s,onCopy:c,loading:l}=e,u=a1(a),d=a1(o),{copied:f,copy:p}=r??{},m=n?f:p,h=o1(u[+!!n],m),g=typeof h==`string`?h:m;return S.createElement(eT,{title:h},S.createElement(`button`,{type:`button`,className:Y(`${t}-copy`,{[`${t}-copy-success`]:n,[`${t}-copy-icon-only`]:i}),onClick:c,"aria-label":g,tabIndex:s},n?o1(d[1],S.createElement($C,null),!0):o1(d[0],l?S.createElement(Xm,null):S.createElement(i1,null),!0)))},u1=S.forwardRef(({style:e,children:t},n)=>{let r=S.useRef(null);return S.useImperativeHandle(n,()=>({isExceed:()=>{let e=r.current;return e.scrollHeight>e.clientHeight},getHeight:()=>r.current.clientHeight})),S.createElement(`span`,{"aria-hidden":!0,ref:r,style:{position:`fixed`,display:`block`,left:0,top:0,pointerEvents:`none`,backgroundColor:`rgba(255, 0, 0, 0.65)`,...e}},t)}),d1=e=>e.reduce((e,t)=>e+(c1(t)?String(t).length:1),0);function f1(e,t){let n=0,r=[];for(let i=0;it){let e=t-n;return r.push(String(a).slice(0,e)),r}r.push(a),n=s}return e}var p1=0,m1=1,h1=2,g1=3,_1=4,v1={display:`-webkit-box`,overflow:`hidden`,WebkitBoxOrient:`vertical`};function y1(e){let{enableMeasure:t,width:n,text:r,children:i,rows:a,expanded:o,miscDeps:s,onEllipsis:c}=e,l=S.useMemo(()=>Di(r),[r]),u=S.useMemo(()=>d1(l),[r]),d=S.useMemo(()=>i(l,!1),[r]),[f,p]=S.useState(null),m=S.useRef(null),h=S.useRef(null),g=S.useRef(null),_=S.useRef(null),v=S.useRef(null),[y,b]=S.useState(!1),[x,C]=S.useState(p1),[w,T]=S.useState(0),[E,D]=S.useState(null);Vn(()=>{C(t&&n&&u?m1:p1)},[n,r,a,t,l]),Vn(()=>{if(x===m1)C(h1),D(h.current&&getComputedStyle(h.current).whiteSpace);else if(x===h1){let e=!!g.current?.isExceed();C(e?g1:_1),p(e?[0,u]:null),b(e);let t=g.current?.getHeight()||0,n=a===1?0:_.current?.getHeight()||0,r=v.current?.getHeight()||0;T(Math.max(t,n+r)+1),c(e)}},[x]);let O=f?Math.ceil((f[0]+f[1])/2):0;Vn(()=>{let[e,t]=f||[0,0];if(e!==t){let n=(m.current?.getHeight()||0)>w,r=O;t-e===1&&(r=n?e:t),p(n?[e,r]:[r,t])}},[f,O]);let k=S.useMemo(()=>{if(!t)return i(l,!1);if(x!==g1||!f||f[0]!==f[1]){let e=i(l,!1);return[_1,p1].includes(x)?e:S.createElement(`span`,{style:{...v1,WebkitLineClamp:a}},e)}return i(o?l:f1(l,f[0]),y)},[o,x,f,l].concat(da(s))),A={width:n,margin:0,padding:0,whiteSpace:E===`nowrap`?`normal`:`inherit`};return S.createElement(S.Fragment,null,k,x===h1&&S.createElement(S.Fragment,null,S.createElement(u1,{style:{...A,...v1,WebkitLineClamp:a},ref:g},d),S.createElement(u1,{style:{...A,...v1,WebkitLineClamp:a-1},ref:_},d),S.createElement(u1,{style:{...A,...v1,WebkitLineClamp:1},ref:v},i([],!0))),x===g1&&f&&f[0]!==f[1]&&S.createElement(u1,{style:{...A,top:400},ref:m},i(f1(l,O),!0)),x===m1&&S.createElement(`span`,{style:{whiteSpace:`inherit`},ref:h}))}var b1=({enableEllipsis:e,isEllipsis:t,open:n,children:r,tooltipProps:i})=>{if(!i?.title||!e)return r;let a=n&&t;return S.createElement(eT,{open:a,...i},r)};function x1({mark:e,code:t,underline:n,delete:r,strong:i,keyboard:a,italic:o},s){let c=s;function l(e,t){t&&(c=S.createElement(e,{},c))}return l(`strong`,i),l(`u`,n),l(`del`,r),l(`code`,t),l(`mark`,e),l(`kbd`,a),l(`i`,o),c}var S1=`...`,C1=[`delete`,`mark`,`code`,`underline`,`strong`,`keyboard`,`italic`],w1=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,type:a,disabled:o,children:s,ellipsis:c,editable:l,copyable:u,component:d,title:f,onMouseEnter:p,onMouseLeave:m,...h}=e,{getPrefixCls:g,direction:_}=S.useContext(ma),[v]=qd(`Text`),y=S.useRef(null),b=S.useRef(null),x=g(`typography`,n),C=hi(h,C1),[w,T]=Q$(l),[E,D]=Wn(!1,T.editing),{triggerType:O=[`icon`]}=T,k=e=>{e&&T.onStart?.(),D(e)},A=$$(E);Vn(()=>{!E&&A&&b.current?.focus()},[E]);let j=e=>{e?.preventDefault(),k(!0)},M=e=>{T.onChange?.(e),k(!1)},N=()=>{T.onCancel?.(),k(!1)},[P,F]=Q$(u),{copied:I,copyLoading:L,onClick:R}=Z$({copyConfig:F,children:s}),[z,B]=S.useState(!1),[V,H]=S.useState(!1),[U,ee]=S.useState(!1),[te,ne]=S.useState(!1),[W,re]=S.useState(!0),[G,K]=Q$(c,{expandable:!1,symbol:e=>e?v?.collapse:v?.expand}),[q,ie]=Wn(K.defaultExpanded||!1,K.expanded),J=G&&(!q||K.expandable===`collapsible`),{rows:ae=1}=K,oe=S.useMemo(()=>J&&(K.suffix!==void 0||K.onEllipsis||K.expandable||w||P),[J,K,w,P]);Vn(()=>{G&&!oe&&(B(Xr(`webkitLineClamp`)),H(Xr(`textOverflow`)))},[oe,G]);let[se,ce]=S.useState(J),le=S.useMemo(()=>oe?!1:ae===1?V:z,[oe,V,z]);Vn(()=>{ce(le&&J)},[le,J]);let ue=e1(K.tooltip,T.text,s),de=se&&!!ue.title,fe=J&&(se?de&&te:U),pe=J&&ae===1&&se,me=J&&ae>1&&se,he=(e,t)=>{ie(t.expanded),K.onExpand?.(e,t)},[ge,_e]=S.useState(0),[ve,ye]=S.useState(!1),[be,xe]=S.useState(!1),Se=({offsetWidth:e})=>{_e(e)},Ce=e=>{ee(e),U!==e&&K.onEllipsis?.(e)};S.useEffect(()=>{let e=y.current;if(G&&de&&e){let t=s1(e);te!==t&&ne(t)}},[G,de,s,me,W,ge]),S.useEffect(()=>{let e=y.current;if(typeof IntersectionObserver>`u`||!e||!de||!J)return;let t=new IntersectionObserver(()=>{re(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[de,J]);let we=S.useMemo(()=>{if(!(!G||se))return[T.text,s,f,ue.title].find(c1)},[G,se,f,ue.title,fe]);if(E)return S.createElement(q$,{value:T.text??(typeof s==`string`?s:``),onSave:M,onCancel:N,onEnd:T.onEnd,prefixCls:x,className:r,style:i,direction:_,component:d,maxLength:T.maxLength,autoSize:T.autoSize,enterIcon:T.enterIcon});let Te=()=>{let{expandable:e,symbol:t}=K;return e?S.createElement(`button`,{type:`button`,key:`expand`,className:`${x}-${q?`collapse`:`expand`}`,onClick:e=>he(e,{expanded:!q}),"aria-label":q?v.collapse:v?.expand},typeof t==`function`?t(q):t):null},Ee=()=>{if(!w)return;let{icon:e,tooltip:t,tabIndex:n}=T,r=Di(t)[0]||v?.edit,i=typeof r==`string`?r:``;return O.includes(`icon`)?S.createElement(eT,{key:`edit`,title:t===!1?``:r},S.createElement(`button`,{type:`button`,ref:b,className:`${x}-edit`,onClick:j,"aria-label":i,tabIndex:n},e||S.createElement(F$,{role:`button`}))):null},De=()=>P?S.createElement(l1,{key:`copy`,...F,prefixCls:x,copied:I,locale:v,onCopy:R,loading:L,iconOnly:!Zd(s)}):null,Oe=e=>{let t=e&&Te(),n=Ee(),r=De();return!t&&!n&&!r?null:S.createElement(`span`,{key:`operations`,className:`${x}-actions`,onMouseEnter:()=>ye(!0),onMouseLeave:()=>ye(!1)},t,n,r)},ke=e=>[e&&!q&&S.createElement(`span`,{"aria-hidden":!0,key:`ellipsis`},S1),K.suffix,Oe(e)];return S.createElement(ia,{onResize:Se,disabled:!J},c=>S.createElement(b1,{tooltipProps:ue,enableEllipsis:J,isEllipsis:fe,open:be&&!ve},S.createElement(t1,{onMouseEnter:e=>{xe(!0),p?.(e)},onMouseLeave:e=>{xe(!1),m?.(e)},className:Y({[`${x}-${a}`]:a,[`${x}-disabled`]:o,[`${x}-ellipsis`]:G,[`${x}-ellipsis-single-line`]:pe,[`${x}-ellipsis-multiple-line`]:me,[`${x}-link`]:d===`a`},r),prefixCls:n,style:{...i,WebkitLineClamp:me?ae:void 0},component:d,ref:sr(c,y,t),direction:_,onClick:O.includes(`text`)?j:void 0,"aria-label":we?.toString(),title:f,...C},S.createElement(y1,{enableMeasure:J&&!se,text:s,rows:ae,width:ge,onEllipsis:Ce,expanded:q,miscDeps:[I,q,L,w,P,v].concat(da(C1.map(t=>e[t])))},(t,n)=>x1(e,S.createElement(S.Fragment,null,t.length>0&&n&&!q&&we?S.createElement(`span`,{key:`show-content`,"aria-hidden":!0},t):t,ke(n)))))))}),T1=S.forwardRef((e,t)=>{let{ellipsis:n,rel:r,children:i,navigate:a,...o}=e,s={...o,rel:r===void 0&&o.target===`_blank`?`noopener noreferrer`:r};return S.createElement(w1,{...s,ref:t,ellipsis:!!n,component:`a`},i)}),E1=S.forwardRef((e,t)=>{let{children:n,...r}=e;return S.createElement(w1,{ref:t,...r,component:`div`},n)}),D1=S.forwardRef((e,t)=>{let{ellipsis:n,children:r,...i}=e,a=S.useMemo(()=>ef(n)?hi(n,[`expandable`,`rows`]):n,[n]);return S.createElement(w1,{ref:t,...i,ellipsis:a,component:`span`},r)}),O1=[1,2,3,4,5],k1=S.forwardRef((e,t)=>{let{level:n=1,children:r,...i}=e,a=O1.includes(n)?`h${n}`:`h1`;return S.createElement(w1,{ref:t,...i,component:a},r)}),Q=t1;Q.Text=D1,Q.Link=T1,Q.Title=k1,Q.Paragraph=E1;var A1=((e,t)=>{if(e&&t){let n=Array.isArray(t)?t:t.split(`,`),r=e.name||``,i=e.type||``,a=i.replace(/\/.*$/,``);return n.some(e=>{let t=e.trim();if(/^\*(\/\*)?$/.test(e))return!0;if(t.charAt(0)===`.`){let e=r.toLowerCase(),n=t.toLowerCase(),i=[n];return(n===`.jpg`||n===`.jpeg`)&&(i=[`.jpg`,`.jpeg`]),i.some(t=>e.endsWith(t))}return/\/\*$/.test(t)?a===t.replace(/\/.*$/,``):i===t?!0:/^\w+$/.test(t)?(li(!1,`Upload takes an invalidate 'accept' type '${t}'.Skip for check.`),!0):!1})}return!0});function j1(e,t){let n=`cannot ${e.method} ${e.action} ${t.status}'`,r=Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}function M1(e){let t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function N1(e){let t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});let n=new FormData;e.data&&Object.keys(e.data).forEach(t=>{let r=e.data[t];if(Array.isArray(r)){r.forEach(e=>{n.append(`${t}[]`,e)});return}n.append(t,r)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(j1(e,t),M1(t)):e.onSuccess(M1(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&`withCredentials`in t&&(t.withCredentials=!0);let r=e.headers||{};return r[`X-Requested-With`]!==null&&t.setRequestHeader(`X-Requested-With`,`XMLHttpRequest`),Object.keys(r).forEach(e=>{r[e]!==null&&t.setRequestHeader(e,r[e])}),t.send(n),{abort(){t.abort()}}}var P1=async(e,t)=>{let n=[],r=[];e.forEach(e=>r.push(e.webkitGetAsEntry()));async function i(e){let t=e.createReader(),n=[];for(;;){let e=await new Promise(e=>{t.readEntries(e,()=>e([]))}),r=e.length;if(!r)break;for(let t=0;t{e.file(r=>{t(r)?(e.fullPath&&!r.webkitRelativePath&&(Object.defineProperties(r,{webkitRelativePath:{writable:!0}}),r.webkitRelativePath=e.fullPath.replace(/^\//,``),Object.defineProperties(r,{webkitRelativePath:{writable:!1}})),n(r)):n(null)})})}let o=async(e,t)=>{if(e){if(e.path=t||``,e.isFile){let t=await a(e);t&&n.push(t)}else if(e.isDirectory){let t=await i(e);r.push(...t)}}},s=0;for(;s{let{accept:n,directory:r}=this.props,i,a;if(typeof n==`string`)a=n;else{let{filter:e,format:t}=n||{};a=t,i=e===`native`?()=>!0:e}return(i||(r||t?e=>A1(e,a):()=>!0))(e)};onChange=e=>{let{files:t}=e.target,n=[...t].filter(e=>this.filterFile(e));this.uploadFiles(n),this.reset()};onClick=e=>{let t=this.fileInput;if(!t)return;let n=e.target,{onClick:r}=this.props;n&&n.tagName===`BUTTON`&&(t.parentNode.focus(),n.blur()),t.click(),r&&r(e)};onKeyDown=e=>{e.key===`Enter`&&this.onClick(e)};onDataTransferFiles=async(e,t)=>{let{multiple:n,directory:r}=this.props,i=[...e.items||[]],a=[...e.files||[]];if((a.length>0||i.some(e=>e.kind===`file`))&&t?.(),r)a=await P1(Array.prototype.slice.call(i),this.filterFile),this.uploadFiles(a);else{let e=[...a].filter(e=>this.filterFile(e,!0));n===!1&&(e=a.slice(0,1)),this.uploadFiles(e)}};onFilePaste=async e=>{let{pastable:t}=this.props;if(t&&e.type===`paste`){let t=e.clipboardData;return this.onDataTransferFiles(t,()=>{e.preventDefault()})}};onFileDragOver=e=>{e.preventDefault()};onFileDrop=async e=>{if(e.preventDefault(),e.type===`drop`){let t=e.dataTransfer;return this.onDataTransferFiles(t)}};componentDidMount(){this._isMounted=!0;let{pastable:e}=this.props;e&&document.addEventListener(`paste`,this.onFilePaste)}componentWillUnmount(){this._isMounted=!1,this.abort(),document.removeEventListener(`paste`,this.onFilePaste)}componentDidUpdate(e){let{pastable:t}=this.props;t&&!e.pastable?document.addEventListener(`paste`,this.onFilePaste):!t&&e.pastable&&document.removeEventListener(`paste`,this.onFilePaste)}uploadFiles=e=>{let t=[...e],n=t.map(e=>(e.uid=L1(),this.processFile(e,t)));Promise.all(n).then(e=>{let{onBatchStart:t}=this.props;t?.(e.map(({origin:e,parsedFile:t})=>({file:e,parsedFile:t}))),e.filter(e=>e.parsedFile!==null).forEach(e=>{this.post(e)})})};processFile=async(e,t)=>{let{beforeUpload:n}=this.props,r=e;if(n){try{r=await n(e,t)}catch{r=!1}if(r===!1)return{origin:e,parsedFile:null,action:null,data:null}}let{action:i}=this.props,a;a=typeof i==`function`?await i(e):i;let{data:o}=this.props,s;s=typeof o==`function`?await o(e):o;let c=(typeof r==`object`||typeof r==`string`)&&r?r:e,l;l=c instanceof File?c:new File([c],e.name,{type:e.type});let u=l;return u.uid=e.uid,{origin:e,data:s,parsedFile:u,action:a}};post({data:e,origin:t,action:n,parsedFile:r}){if(!this._isMounted)return;let{onStart:i,customRequest:a,name:o,headers:s,withCredentials:c,method:l}=this.props,{uid:u}=t,d=a||N1,f={action:n,filename:o,data:e,file:r,headers:s,withCredentials:c,method:l||`post`,onProgress:e=>{let{onProgress:t}=this.props;t?.(e,r)},onSuccess:(e,t)=>{let{onSuccess:n}=this.props;n?.(e,r,t),delete this.reqs[u]},onError:(e,t)=>{let{onError:n}=this.props;n?.(e,t,r),delete this.reqs[u]}};i(t),this.reqs[u]=d(f,{defaultRequest:N1})}reset(){this.setState({uid:L1()})}abort(e){let{reqs:t}=this;if(e){let n=e.uid?e.uid:e;t[n]&&t[n].abort&&t[n].abort(),delete t[n]}else Object.keys(t).forEach(e=>{t[e]&&t[e].abort&&t[e].abort(),delete t[e]})}saveFileInput=e=>{this.fileInput=e};render(){let{component:e,prefixCls:t,className:n,classNames:r={},disabled:i,id:a,name:o,style:s,styles:c={},multiple:l,accept:u,capture:d,children:f,directory:p,openFileDialogOnClick:m,onMouseEnter:h,onMouseLeave:g,hasControlInside:_,...v}=this.props,y=typeof u==`string`?u:u?.format,b=Y(t,{[`${t}-disabled`]:i,[n]:n}),x=p?{directory:`directory`,webkitdirectory:`webkitdirectory`}:{},C=i?{}:{onClick:m?this.onClick:()=>{},onKeyDown:m?this.onKeyDown:()=>{},onMouseEnter:h,onMouseLeave:g,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:_?void 0:`0`};return S.createElement(e,R1({},C,{className:b,role:_?void 0:`button`,style:s}),S.createElement(`input`,R1({},bi(v,{aria:!0,data:!0}),{id:a,name:o,disabled:i,type:`file`,ref:this.saveFileInput,onClick:e=>e.stopPropagation(),key:this.state.uid,style:{display:`none`,...c.input},className:r.input,accept:y},x,{multiple:l,onChange:this.onChange},d==null?{}:{capture:d})),f)}};function B1(){return B1=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.uploader=e};render(){return S.createElement(z1,B1({},this.props,{ref:this.saveUploader}))}},U1=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:`relative`,width:`100%`,height:`100%`,textAlign:`center`,background:e.colorFillAlter,border:`${X(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:e.padding},[`${t}-btn`]:{display:`table`,width:`100%`,height:`100%`,outline:`none`,borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:`${X(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`}},[`${t}-drag-container`]:{display:`table-cell`,verticalAlign:`middle`},[` + `]:{...Yl(e),marginInlineStart:e.marginXXS},...z$(e),...B$(e),...V$(),"&-rtl":{direction:`rtl`}}}},()=>({titleMarginTop:`1.2em`,titleMarginBottom:`0.5em`})),U$=e=>{let{prefixCls:t,"aria-label":n,className:r,style:i,direction:a,maxLength:o,autoSize:s=!0,value:c,onSave:l,onCancel:u,onEnd:d,component:f,enterIcon:p=S.createElement(P$,null)}=e,m=S.useRef(null),h=S.useRef(!1),g=S.useRef(null),[_,v]=S.useState(c);S.useEffect(()=>{v(c)},[c]),S.useEffect(()=>{if(m.current?.resizableTextArea){let{textArea:e}=m.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let y=({target:e})=>{v(e.value.replace(/[\n\r]/g,``))},b=()=>{h.current=!0},x=()=>{h.current=!1},C=({keyCode:e})=>{h.current||(g.current=e)},w=()=>{l(_.trim())},T=({keyCode:e,ctrlKey:t,altKey:n,metaKey:r,shiftKey:i})=>{g.current!==e||h.current||t||n||r||i||(e===Zr.ENTER?(w(),d?.()):e===Zr.ESC&&u())},E=()=>{w()},[D,O]=H$(t),k=Y(t,`${t}-edit-content`,{[`${t}-rtl`]:a===`rtl`,[`${t}-${f}`]:!!f},r,D,O);return S.createElement(`div`,{className:k,style:i},S.createElement(tK,{ref:m,maxLength:o,value:_,onChange:y,onKeyDown:C,onKeyUp:T,onCompositionStart:b,onCompositionEnd:x,onBlur:E,"aria-label":n,rows:1,autoSize:s}),p===null?null:cm(p,{className:`${t}-edit-content-confirm`}))},W$=(e,t)=>{let n=!1,r=r=>{r.stopPropagation(),r.preventDefault(),r.clipboardData?.clearData(),r.clipboardData?.setData(`text/plain`,e),t&&r.clipboardData?.setData(`text/html`,e),n=!0};try{return document.addEventListener(`copy`,r,{capture:!0}),document.execCommand(`copy`),n}catch{return!1}finally{document.removeEventListener(`copy`,r,{capture:!0})}},G$=async(e,t)=>{try{return t?await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:`text/html`}),"text/plain":new Blob([e],{type:`text/plain`})})]):await navigator.clipboard.writeText(e),!0}catch{return!1}};async function K$(e,t){if(typeof e!=`string`)return!1;let n=t?.format===`text/html`;return!!(await G$(e,n)||W$(e,n))}var q$=({copyConfig:e,children:t})=>{let[n,r]=S.useState(!1),[i,a]=S.useState(!1),o=S.useRef(null),s=()=>{o.current&&clearTimeout(o.current)},c={};return e.format&&(c.format=e.format),S.useEffect(()=>s,[]),{copied:n,copyLoading:i,onClick:Rn(async n=>{n?.preventDefault(),n?.stopPropagation(),a(!0);try{await K$((typeof e.text==`function`?await e.text():e.text)||vq(t,{skipEmpty:!0}).join(``)||``,c),a(!1),r(!0),s(),o.current=setTimeout(()=>{r(!1)},3e3),e.onCopy?.(n)}catch(e){throw a(!1),e}})}};function J$(e,t){return S.useMemo(()=>{let n=!!e;return[n,{...t,...n&&typeof e==`object`?e:null}]},[e])}var Y$=e=>{let t=(0,S.useRef)(void 0);return(0,S.useEffect)(()=>{t.current=e}),t.current},X$=(e,t,n)=>(0,S.useMemo)(()=>e===!0?{title:t??n}:(0,S.isValidElement)(e)?{title:e}:ef(e)?{title:t??n,...e}:{title:e},[e,t,n]),Z$=S.forwardRef((e,t)=>{let{prefixCls:n,component:r=`article`,className:i,rootClassName:a,children:o,direction:s,style:c,...l}=e,{getPrefixCls:u,direction:d,className:f,style:p}=_a(`typography`),m=s??d,h=u(`typography`,n),[g,_]=H$(h),v=Y(h,f,{[`${h}-rtl`]:m===`rtl`},i,a,g,_),y={...p,...c};return S.createElement(r,{className:v,style:y,ref:t,...l},o)}),Q$=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={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`}}))());function $$(){return $$=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,$$({},e,{ref:t,icon:Q$.default}))),t1=e=>e===!1?[!1,!1]:vq(e);function n1(e,t,n){return e===!0||e===void 0?t:e||n&&t}function r1(e){let t=document.createElement(`em`);e.appendChild(t);let 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}var i1=e=>[`string`,`number`].includes(typeof e),a1=e=>{let{prefixCls:t,copied:n,locale:r,iconOnly:i,tooltips:a,icon:o,tabIndex:s,onCopy:c,loading:l}=e,u=t1(a),d=t1(o),{copied:f,copy:p}=r??{},m=n?f:p,h=n1(u[+!!n],m),g=typeof h==`string`?h:m;return S.createElement($w,{title:h},S.createElement(`button`,{type:`button`,className:Y(`${t}-copy`,{[`${t}-copy-success`]:n,[`${t}-copy-icon-only`]:i}),onClick:c,"aria-label":g,tabIndex:s},n?n1(d[1],S.createElement(QC,null),!0):n1(d[0],l?S.createElement(Xm,null):S.createElement(e1,null),!0)))},o1=S.forwardRef(({style:e,children:t},n)=>{let r=S.useRef(null);return S.useImperativeHandle(n,()=>({isExceed:()=>{let e=r.current;return e.scrollHeight>e.clientHeight},getHeight:()=>r.current.clientHeight})),S.createElement(`span`,{"aria-hidden":!0,ref:r,style:{position:`fixed`,display:`block`,left:0,top:0,pointerEvents:`none`,backgroundColor:`rgba(255, 0, 0, 0.65)`,...e}},t)}),s1=e=>e.reduce((e,t)=>e+(i1(t)?String(t).length:1),0);function c1(e,t){let n=0,r=[];for(let i=0;it){let e=t-n;return r.push(String(a).slice(0,e)),r}r.push(a),n=s}return e}var l1=0,u1=1,d1=2,f1=3,p1=4,m1={display:`-webkit-box`,overflow:`hidden`,WebkitBoxOrient:`vertical`};function h1(e){let{enableMeasure:t,width:n,text:r,children:i,rows:a,expanded:o,miscDeps:s,onEllipsis:c}=e,l=S.useMemo(()=>Di(r),[r]),u=S.useMemo(()=>s1(l),[r]),d=S.useMemo(()=>i(l,!1),[r]),[f,p]=S.useState(null),m=S.useRef(null),h=S.useRef(null),g=S.useRef(null),_=S.useRef(null),v=S.useRef(null),[y,b]=S.useState(!1),[x,C]=S.useState(l1),[w,T]=S.useState(0),[E,D]=S.useState(null);Vn(()=>{C(t&&n&&u?u1:l1)},[n,r,a,t,l]),Vn(()=>{if(x===u1)C(d1),D(h.current&&getComputedStyle(h.current).whiteSpace);else if(x===d1){let e=!!g.current?.isExceed();C(e?f1:p1),p(e?[0,u]:null),b(e);let t=g.current?.getHeight()||0,n=a===1?0:_.current?.getHeight()||0,r=v.current?.getHeight()||0;T(Math.max(t,n+r)+1),c(e)}},[x]);let O=f?Math.ceil((f[0]+f[1])/2):0;Vn(()=>{let[e,t]=f||[0,0];if(e!==t){let n=(m.current?.getHeight()||0)>w,r=O;t-e===1&&(r=n?e:t),p(n?[e,r]:[r,t])}},[f,O]);let k=S.useMemo(()=>{if(!t)return i(l,!1);if(x!==f1||!f||f[0]!==f[1]){let e=i(l,!1);return[p1,l1].includes(x)?e:S.createElement(`span`,{style:{...m1,WebkitLineClamp:a}},e)}return i(o?l:c1(l,f[0]),y)},[o,x,f,l].concat(da(s))),A={width:n,margin:0,padding:0,whiteSpace:E===`nowrap`?`normal`:`inherit`};return S.createElement(S.Fragment,null,k,x===d1&&S.createElement(S.Fragment,null,S.createElement(o1,{style:{...A,...m1,WebkitLineClamp:a},ref:g},d),S.createElement(o1,{style:{...A,...m1,WebkitLineClamp:a-1},ref:_},d),S.createElement(o1,{style:{...A,...m1,WebkitLineClamp:1},ref:v},i([],!0))),x===f1&&f&&f[0]!==f[1]&&S.createElement(o1,{style:{...A,top:400},ref:m},i(c1(l,O),!0)),x===u1&&S.createElement(`span`,{style:{whiteSpace:`inherit`},ref:h}))}var g1=({enableEllipsis:e,isEllipsis:t,open:n,children:r,tooltipProps:i})=>{if(!i?.title||!e)return r;let a=n&&t;return S.createElement($w,{open:a,...i},r)};function _1({mark:e,code:t,underline:n,delete:r,strong:i,keyboard:a,italic:o},s){let c=s;function l(e,t){t&&(c=S.createElement(e,{},c))}return l(`strong`,i),l(`u`,n),l(`del`,r),l(`code`,t),l(`mark`,e),l(`kbd`,a),l(`i`,o),c}var v1=`...`,y1=[`delete`,`mark`,`code`,`underline`,`strong`,`keyboard`,`italic`],b1=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,type:a,disabled:o,children:s,ellipsis:c,editable:l,copyable:u,component:d,title:f,onMouseEnter:p,onMouseLeave:m,...h}=e,{getPrefixCls:g,direction:_}=S.useContext(ma),[v]=qd(`Text`),y=S.useRef(null),b=S.useRef(null),x=g(`typography`,n),C=hi(h,y1),[w,T]=J$(l),[E,D]=Wn(!1,T.editing),{triggerType:O=[`icon`]}=T,k=e=>{e&&T.onStart?.(),D(e)},A=Y$(E);Vn(()=>{!E&&A&&b.current?.focus()},[E]);let j=e=>{e?.preventDefault(),k(!0)},M=e=>{T.onChange?.(e),k(!1)},N=()=>{T.onCancel?.(),k(!1)},[P,F]=J$(u),{copied:I,copyLoading:L,onClick:R}=q$({copyConfig:F,children:s}),[z,B]=S.useState(!1),[V,H]=S.useState(!1),[U,ee]=S.useState(!1),[te,ne]=S.useState(!1),[W,re]=S.useState(!0),[G,K]=J$(c,{expandable:!1,symbol:e=>e?v?.collapse:v?.expand}),[q,ie]=Wn(K.defaultExpanded||!1,K.expanded),J=G&&(!q||K.expandable===`collapsible`),{rows:ae=1}=K,oe=S.useMemo(()=>J&&(K.suffix!==void 0||K.onEllipsis||K.expandable||w||P),[J,K,w,P]);Vn(()=>{G&&!oe&&(B(Xr(`webkitLineClamp`)),H(Xr(`textOverflow`)))},[oe,G]);let[se,ce]=S.useState(J),le=S.useMemo(()=>oe?!1:ae===1?V:z,[oe,V,z]);Vn(()=>{ce(le&&J)},[le,J]);let ue=X$(K.tooltip,T.text,s),de=se&&!!ue.title,fe=J&&(se?de&&te:U),pe=J&&ae===1&&se,me=J&&ae>1&&se,he=(e,t)=>{ie(t.expanded),K.onExpand?.(e,t)},[ge,_e]=S.useState(0),[ve,ye]=S.useState(!1),[be,xe]=S.useState(!1),Se=({offsetWidth:e})=>{_e(e)},Ce=e=>{ee(e),U!==e&&K.onEllipsis?.(e)};S.useEffect(()=>{let e=y.current;if(G&&de&&e){let t=r1(e);te!==t&&ne(t)}},[G,de,s,me,W,ge]),S.useEffect(()=>{let e=y.current;if(typeof IntersectionObserver>`u`||!e||!de||!J)return;let t=new IntersectionObserver(()=>{re(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[de,J]);let we=S.useMemo(()=>{if(!(!G||se))return[T.text,s,f,ue.title].find(i1)},[G,se,f,ue.title,fe]);if(E)return S.createElement(U$,{value:T.text??(typeof s==`string`?s:``),onSave:M,onCancel:N,onEnd:T.onEnd,prefixCls:x,className:r,style:i,direction:_,component:d,maxLength:T.maxLength,autoSize:T.autoSize,enterIcon:T.enterIcon});let Te=()=>{let{expandable:e,symbol:t}=K;return e?S.createElement(`button`,{type:`button`,key:`expand`,className:`${x}-${q?`collapse`:`expand`}`,onClick:e=>he(e,{expanded:!q}),"aria-label":q?v.collapse:v?.expand},typeof t==`function`?t(q):t):null},Ee=()=>{if(!w)return;let{icon:e,tooltip:t,tabIndex:n}=T,r=Di(t)[0]||v?.edit,i=typeof r==`string`?r:``;return O.includes(`icon`)?S.createElement($w,{key:`edit`,title:t===!1?``:r},S.createElement(`button`,{type:`button`,ref:b,className:`${x}-edit`,onClick:j,"aria-label":i,tabIndex:n},e||S.createElement(j$,{role:`button`}))):null},De=()=>P?S.createElement(a1,{key:`copy`,...F,prefixCls:x,copied:I,locale:v,onCopy:R,loading:L,iconOnly:!Zd(s)}):null,Oe=e=>{let t=e&&Te(),n=Ee(),r=De();return!t&&!n&&!r?null:S.createElement(`span`,{key:`operations`,className:`${x}-actions`,onMouseEnter:()=>ye(!0),onMouseLeave:()=>ye(!1)},t,n,r)},ke=e=>[e&&!q&&S.createElement(`span`,{"aria-hidden":!0,key:`ellipsis`},v1),K.suffix,Oe(e)];return S.createElement(ia,{onResize:Se,disabled:!J},c=>S.createElement(g1,{tooltipProps:ue,enableEllipsis:J,isEllipsis:fe,open:be&&!ve},S.createElement(Z$,{onMouseEnter:e=>{xe(!0),p?.(e)},onMouseLeave:e=>{xe(!1),m?.(e)},className:Y({[`${x}-${a}`]:a,[`${x}-disabled`]:o,[`${x}-ellipsis`]:G,[`${x}-ellipsis-single-line`]:pe,[`${x}-ellipsis-multiple-line`]:me,[`${x}-link`]:d===`a`},r),prefixCls:n,style:{...i,WebkitLineClamp:me?ae:void 0},component:d,ref:sr(c,y,t),direction:_,onClick:O.includes(`text`)?j:void 0,"aria-label":we?.toString(),title:f,...C},S.createElement(h1,{enableMeasure:J&&!se,text:s,rows:ae,width:ge,onEllipsis:Ce,expanded:q,miscDeps:[I,q,L,w,P,v].concat(da(y1.map(t=>e[t])))},(t,n)=>_1(e,S.createElement(S.Fragment,null,t.length>0&&n&&!q&&we?S.createElement(`span`,{key:`show-content`,"aria-hidden":!0},t):t,ke(n)))))))}),x1=S.forwardRef((e,t)=>{let{ellipsis:n,rel:r,children:i,navigate:a,...o}=e,s={...o,rel:r===void 0&&o.target===`_blank`?`noopener noreferrer`:r};return S.createElement(b1,{...s,ref:t,ellipsis:!!n,component:`a`},i)}),S1=S.forwardRef((e,t)=>{let{children:n,...r}=e;return S.createElement(b1,{ref:t,...r,component:`div`},n)}),C1=S.forwardRef((e,t)=>{let{ellipsis:n,children:r,...i}=e,a=S.useMemo(()=>ef(n)?hi(n,[`expandable`,`rows`]):n,[n]);return S.createElement(b1,{ref:t,...i,ellipsis:a,component:`span`},r)}),w1=[1,2,3,4,5],T1=S.forwardRef((e,t)=>{let{level:n=1,children:r,...i}=e,a=w1.includes(n)?`h${n}`:`h1`;return S.createElement(b1,{ref:t,...i,component:a},r)}),Q=Z$;Q.Text=C1,Q.Link=x1,Q.Title=T1,Q.Paragraph=S1;var E1=((e,t)=>{if(e&&t){let n=Array.isArray(t)?t:t.split(`,`),r=e.name||``,i=e.type||``,a=i.replace(/\/.*$/,``);return n.some(e=>{let t=e.trim();if(/^\*(\/\*)?$/.test(e))return!0;if(t.charAt(0)===`.`){let e=r.toLowerCase(),n=t.toLowerCase(),i=[n];return(n===`.jpg`||n===`.jpeg`)&&(i=[`.jpg`,`.jpeg`]),i.some(t=>e.endsWith(t))}return/\/\*$/.test(t)?a===t.replace(/\/.*$/,``):i===t?!0:/^\w+$/.test(t)?(li(!1,`Upload takes an invalidate 'accept' type '${t}'.Skip for check.`),!0):!1})}return!0});function D1(e,t){let n=`cannot ${e.method} ${e.action} ${t.status}'`,r=Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}function O1(e){let t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function k1(e){let t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});let n=new FormData;e.data&&Object.keys(e.data).forEach(t=>{let r=e.data[t];if(Array.isArray(r)){r.forEach(e=>{n.append(`${t}[]`,e)});return}n.append(t,r)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(D1(e,t),O1(t)):e.onSuccess(O1(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&`withCredentials`in t&&(t.withCredentials=!0);let r=e.headers||{};return r[`X-Requested-With`]!==null&&t.setRequestHeader(`X-Requested-With`,`XMLHttpRequest`),Object.keys(r).forEach(e=>{r[e]!==null&&t.setRequestHeader(e,r[e])}),t.send(n),{abort(){t.abort()}}}var A1=async(e,t)=>{let n=[],r=[];e.forEach(e=>r.push(e.webkitGetAsEntry()));async function i(e){let t=e.createReader(),n=[];for(;;){let e=await new Promise(e=>{t.readEntries(e,()=>e([]))}),r=e.length;if(!r)break;for(let t=0;t{e.file(r=>{t(r)?(e.fullPath&&!r.webkitRelativePath&&(Object.defineProperties(r,{webkitRelativePath:{writable:!0}}),r.webkitRelativePath=e.fullPath.replace(/^\//,``),Object.defineProperties(r,{webkitRelativePath:{writable:!1}})),n(r)):n(null)})})}let o=async(e,t)=>{if(e){if(e.path=t||``,e.isFile){let t=await a(e);t&&n.push(t)}else if(e.isDirectory){let t=await i(e);r.push(...t)}}},s=0;for(;s{let{accept:n,directory:r}=this.props,i,a;if(typeof n==`string`)a=n;else{let{filter:e,format:t}=n||{};a=t,i=e===`native`?()=>!0:e}return(i||(r||t?e=>E1(e,a):()=>!0))(e)};onChange=e=>{let{files:t}=e.target,n=[...t].filter(e=>this.filterFile(e));this.uploadFiles(n),this.reset()};onClick=e=>{let t=this.fileInput;if(!t)return;let n=e.target,{onClick:r}=this.props;n&&n.tagName===`BUTTON`&&(t.parentNode.focus(),n.blur()),t.click(),r&&r(e)};onKeyDown=e=>{e.key===`Enter`&&this.onClick(e)};onDataTransferFiles=async(e,t)=>{let{multiple:n,directory:r}=this.props,i=[...e.items||[]],a=[...e.files||[]];if((a.length>0||i.some(e=>e.kind===`file`))&&t?.(),r)a=await A1(Array.prototype.slice.call(i),this.filterFile),this.uploadFiles(a);else{let e=[...a].filter(e=>this.filterFile(e,!0));n===!1&&(e=a.slice(0,1)),this.uploadFiles(e)}};onFilePaste=async e=>{let{pastable:t}=this.props;if(t&&e.type===`paste`){let t=e.clipboardData;return this.onDataTransferFiles(t,()=>{e.preventDefault()})}};onFileDragOver=e=>{e.preventDefault()};onFileDrop=async e=>{if(e.preventDefault(),e.type===`drop`){let t=e.dataTransfer;return this.onDataTransferFiles(t)}};componentDidMount(){this._isMounted=!0;let{pastable:e}=this.props;e&&document.addEventListener(`paste`,this.onFilePaste)}componentWillUnmount(){this._isMounted=!1,this.abort(),document.removeEventListener(`paste`,this.onFilePaste)}componentDidUpdate(e){let{pastable:t}=this.props;t&&!e.pastable?document.addEventListener(`paste`,this.onFilePaste):!t&&e.pastable&&document.removeEventListener(`paste`,this.onFilePaste)}uploadFiles=e=>{let t=[...e],n=t.map(e=>(e.uid=N1(),this.processFile(e,t)));Promise.all(n).then(e=>{let{onBatchStart:t}=this.props;t?.(e.map(({origin:e,parsedFile:t})=>({file:e,parsedFile:t}))),e.filter(e=>e.parsedFile!==null).forEach(e=>{this.post(e)})})};processFile=async(e,t)=>{let{beforeUpload:n}=this.props,r=e;if(n){try{r=await n(e,t)}catch{r=!1}if(r===!1)return{origin:e,parsedFile:null,action:null,data:null}}let{action:i}=this.props,a;a=typeof i==`function`?await i(e):i;let{data:o}=this.props,s;s=typeof o==`function`?await o(e):o;let c=(typeof r==`object`||typeof r==`string`)&&r?r:e,l;l=c instanceof File?c:new File([c],e.name,{type:e.type});let u=l;return u.uid=e.uid,{origin:e,data:s,parsedFile:u,action:a}};post({data:e,origin:t,action:n,parsedFile:r}){if(!this._isMounted)return;let{onStart:i,customRequest:a,name:o,headers:s,withCredentials:c,method:l}=this.props,{uid:u}=t,d=a||k1,f={action:n,filename:o,data:e,file:r,headers:s,withCredentials:c,method:l||`post`,onProgress:e=>{let{onProgress:t}=this.props;t?.(e,r)},onSuccess:(e,t)=>{let{onSuccess:n}=this.props;n?.(e,r,t),delete this.reqs[u]},onError:(e,t)=>{let{onError:n}=this.props;n?.(e,t,r),delete this.reqs[u]}};i(t),this.reqs[u]=d(f,{defaultRequest:k1})}reset(){this.setState({uid:N1()})}abort(e){let{reqs:t}=this;if(e){let n=e.uid?e.uid:e;t[n]&&t[n].abort&&t[n].abort(),delete t[n]}else Object.keys(t).forEach(e=>{t[e]&&t[e].abort&&t[e].abort(),delete t[e]})}saveFileInput=e=>{this.fileInput=e};render(){let{component:e,prefixCls:t,className:n,classNames:r={},disabled:i,id:a,name:o,style:s,styles:c={},multiple:l,accept:u,capture:d,children:f,directory:p,openFileDialogOnClick:m,onMouseEnter:h,onMouseLeave:g,hasControlInside:_,...v}=this.props,y=typeof u==`string`?u:u?.format,b=Y(t,{[`${t}-disabled`]:i,[n]:n}),x=p?{directory:`directory`,webkitdirectory:`webkitdirectory`}:{},C=i?{}:{onClick:m?this.onClick:()=>{},onKeyDown:m?this.onKeyDown:()=>{},onMouseEnter:h,onMouseLeave:g,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:_?void 0:`0`};return S.createElement(e,P1({},C,{className:b,role:_?void 0:`button`,style:s}),S.createElement(`input`,P1({},bi(v,{aria:!0,data:!0}),{id:a,name:o,disabled:i,type:`file`,ref:this.saveFileInput,onClick:e=>e.stopPropagation(),key:this.state.uid,style:{display:`none`,...c.input},className:r.input,accept:y},x,{multiple:l,onChange:this.onChange},d==null?{}:{capture:d})),f)}};function I1(){return I1=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.uploader=e};render(){return S.createElement(F1,I1({},this.props,{ref:this.saveUploader}))}},z1=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:`relative`,width:`100%`,height:`100%`,textAlign:`center`,background:e.colorFillAlter,border:`${X(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:e.padding},[`${t}-btn`]:{display:`table`,width:`100%`,height:`100%`,outline:`none`,borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:`${X(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`}},[`${t}-drag-container`]:{display:`table-cell`,verticalAlign:`middle`},[` &:not(${t}-disabled):hover, &-hover:not(${t}-disabled) `]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[n]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${X(e.marginXXS)}`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{[`p${t}-drag-icon ${n}, p${t}-text, p${t}-hint - `]:{color:e.colorTextDisabled}}}}}},W1=e=>{let{componentCls:t,iconCls:n,fontSize:r,lineHeight:i,motionDurationSlow:a,calc:o}=e,s=`${t}-list-item`,c=`${s}-actions`,l=`${s}-action`;return{[`${t}-wrapper`]:{[`${t}-list`]:{...Ul(),lineHeight:e.lineHeight,[s]:{position:`relative`,height:o(e.lineHeight).mul(r).equal(),marginTop:e.marginXS,fontSize:r,display:`flex`,alignItems:`center`,transition:`background-color ${a}`,borderRadius:e.borderRadiusSM,"&:hover":{backgroundColor:e.controlItemBgHover},[`${s}-name`]:{...Bl,padding:`0 ${X(e.paddingXS)}`,lineHeight:i,flex:`auto`,transition:`all ${a}`},[c]:{whiteSpace:`nowrap`,[l]:{opacity:0},"@media (hover: none), (pointer: coarse)":{[l]:{opacity:1}},[n]:{color:e.actionsColor,transition:`all ${a}`},[` + `]:{color:e.colorTextDisabled}}}}}},B1=e=>{let{componentCls:t,iconCls:n,fontSize:r,lineHeight:i,motionDurationSlow:a,calc:o}=e,s=`${t}-list-item`,c=`${s}-actions`,l=`${s}-action`;return{[`${t}-wrapper`]:{[`${t}-list`]:{...Ul(),lineHeight:e.lineHeight,[s]:{position:`relative`,height:o(e.lineHeight).mul(r).equal(),marginTop:e.marginXS,fontSize:r,display:`flex`,alignItems:`center`,transition:`background-color ${a}`,borderRadius:e.borderRadiusSM,"&:hover":{backgroundColor:e.controlItemBgHover},[`${s}-name`]:{...Bl,padding:`0 ${X(e.paddingXS)}`,lineHeight:i,flex:`auto`,transition:`all ${a}`},[c]:{whiteSpace:`nowrap`,[l]:{opacity:0},"@media (hover: none), (pointer: coarse)":{[l]:{opacity:1}},[n]:{color:e.actionsColor,transition:`all ${a}`},[` ${l}:focus-visible, &.picture ${l} - `]:{opacity:1}},[`${t}-icon ${n}`]:{color:e.colorIcon,fontSize:r},[`${s}-progress`]:{position:`absolute`,bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:`100%`,paddingInlineStart:o(r).add(e.paddingXS).equal(),fontSize:r,lineHeight:0,pointerEvents:`none`,"> div":{margin:0}}},[`${s}:hover ${l}`]:{opacity:1},[`${s}-error`]:{color:e.colorError,[`${s}-name, ${t}-icon ${n}`]:{color:e.colorError},[c]:{[`${n}, ${n}:hover`]:{color:e.colorError},[l]:{opacity:1}}},[`${t}-list-item-container`]:{transition:[`opacity`,`height`].map(e=>`${e} ${a}`).join(`, `),"&::before":{display:`table`,width:0,height:0,content:`""`}}}}}},G1=e=>{let{componentCls:t}=e,n=new As(`uploadAnimateInlineIn`,{from:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),r=new As(`uploadAnimateInlineOut`,{to:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),i=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${i}-appear, ${i}-enter, ${i}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:`forwards`},[`${i}-appear, ${i}-enter`]:{animationName:n},[`${i}-leave`]:{animationName:r}}},{[`${t}-wrapper`]:$h(e)},n,r]},K1=e=>{let{componentCls:t,iconCls:n,uploadThumbnailSize:r,uploadProgressOffset:i,calc:a}=e,o=`${t}-list`,s=`${o}-item`;return{[`${t}-wrapper`]:{[` + `]:{opacity:1}},[`${t}-icon ${n}`]:{color:e.colorIcon,fontSize:r},[`${s}-progress`]:{position:`absolute`,bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:`100%`,paddingInlineStart:o(r).add(e.paddingXS).equal(),fontSize:r,lineHeight:0,pointerEvents:`none`,"> div":{margin:0}}},[`${s}:hover ${l}`]:{opacity:1},[`${s}-error`]:{color:e.colorError,[`${s}-name, ${t}-icon ${n}`]:{color:e.colorError},[c]:{[`${n}, ${n}:hover`]:{color:e.colorError},[l]:{opacity:1}}},[`${t}-list-item-container`]:{transition:[`opacity`,`height`].map(e=>`${e} ${a}`).join(`, `),"&::before":{display:`table`,width:0,height:0,content:`""`}}}}}},V1=e=>{let{componentCls:t}=e,n=new As(`uploadAnimateInlineIn`,{from:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),r=new As(`uploadAnimateInlineOut`,{to:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),i=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${i}-appear, ${i}-enter, ${i}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:`forwards`},[`${i}-appear, ${i}-enter`]:{animationName:n},[`${i}-leave`]:{animationName:r}}},{[`${t}-wrapper`]:$h(e)},n,r]},H1=e=>{let{componentCls:t,iconCls:n,uploadThumbnailSize:r,uploadProgressOffset:i,calc:a}=e,o=`${t}-list`,s=`${o}-item`;return{[`${t}-wrapper`]:{[` ${o}${o}-picture, ${o}${o}-picture-card, ${o}${o}-picture-circle - `]:{[s]:{position:`relative`,height:a(r).add(a(e.lineWidth).mul(2)).add(a(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:`transparent`},[`${s}-thumbnail`]:{...Bl,width:r,height:r,lineHeight:X(a(r).add(e.paddingSM).equal()),textAlign:`center`,flex:`none`,[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:`block`,width:`100%`,height:`100%`,overflow:`hidden`}},[`${s}-progress`]:{bottom:a(e.fontSize).mul(e.lineHeight).div(2).add(i).equal(),width:`calc(100% - ${X(a(e.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:a(r).add(e.paddingXS).equal()}},[`${s}-error`]:{borderColor:e.colorError,[`${s}-thumbnail ${n}`]:{[`svg path[fill='${$c[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${$c.primary}']`]:{fill:e.colorError}}},[`${s}-uploading`]:{borderStyle:`dashed`,[`${s}-name`]:{marginBottom:i}}},[`${o}${o}-picture-circle ${s}`]:{[`&, &::before, ${s}-thumbnail`]:{borderRadius:`50%`}}}}},q1=e=>{let{componentCls:t,iconCls:n,fontSizeLG:r,colorTextLightSolid:i,calc:a}=e,o=`${t}-list`,s=`${o}-item`,c=e.uploadPicCardSize;return{[` + `]:{[s]:{position:`relative`,height:a(r).add(a(e.lineWidth).mul(2)).add(a(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:`transparent`},[`${s}-thumbnail`]:{...Bl,width:r,height:r,lineHeight:X(a(r).add(e.paddingSM).equal()),textAlign:`center`,flex:`none`,[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:`block`,width:`100%`,height:`100%`,overflow:`hidden`}},[`${s}-progress`]:{bottom:a(e.fontSize).mul(e.lineHeight).div(2).add(i).equal(),width:`calc(100% - ${X(a(e.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:a(r).add(e.paddingXS).equal()}},[`${s}-error`]:{borderColor:e.colorError,[`${s}-thumbnail ${n}`]:{[`svg path[fill='${$c[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${$c.primary}']`]:{fill:e.colorError}}},[`${s}-uploading`]:{borderStyle:`dashed`,[`${s}-name`]:{marginBottom:i}}},[`${o}${o}-picture-circle ${s}`]:{[`&, &::before, ${s}-thumbnail`]:{borderRadius:`50%`}}}}},U1=e=>{let{componentCls:t,iconCls:n,fontSizeLG:r,colorTextLightSolid:i,calc:a}=e,o=`${t}-list`,s=`${o}-item`,c=e.uploadPicCardSize;return{[` ${t}-wrapper${t}-picture-card-wrapper, ${t}-wrapper${t}-picture-circle-wrapper `]:{...Ul(),display:`block`,[`${t}${t}-select`]:{width:c,height:c,textAlign:`center`,verticalAlign:`top`,backgroundColor:e.colorFillAlter,border:`${X(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`,textAlign:`center`},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${o}${o}-picture-card, ${o}${o}-picture-circle`]:{display:`flex`,flexWrap:`wrap`,"&:not(:empty)":{minHeight:c},"@supports not (gap: 1px)":{"& > *":{marginBlockEnd:e.marginXS,marginInlineEnd:e.marginXS}},"@supports (gap: 1px)":{gap:e.marginXS},[`${o}-item-container`]:{display:`inline-block`,width:c,height:c,verticalAlign:`top`},"&::after":{display:`none`},"&::before":{display:`none`},[s]:{height:`100%`,margin:0,"&::before":{position:`absolute`,zIndex:1,width:`calc(100% - ${X(a(e.paddingXS).mul(2).equal())})`,height:`calc(100% - ${X(a(e.paddingXS).mul(2).equal())})`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:`" "`}},[`${s}:hover`]:{[`&::before, ${s}-actions`]:{opacity:1}},[`${s}-actions`]:{position:`absolute`,insetInlineStart:0,zIndex:10,width:`100%`,whiteSpace:`nowrap`,textAlign:`center`,opacity:0,transition:`all ${e.motionDurationSlow}`,[` ${n}-eye, ${n}-download, ${n}-delete - `]:{zIndex:10,width:r,margin:`0 ${X(e.marginXXS)}`,fontSize:r,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,color:i,"&:hover":{color:i},svg:{verticalAlign:`baseline`}}},[`${s}-thumbnail, ${s}-thumbnail img`]:{position:`static`,display:`block`,width:`100%`,height:`100%`,objectFit:`contain`},[`${s}-name`]:{display:`none`,textAlign:`center`},[`${s}-file + ${s}-name`]:{position:`absolute`,bottom:e.margin,display:`block`,width:`calc(100% - ${X(a(e.paddingXS).mul(2).equal())})`},[`${s}-uploading`]:{[`&${s}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:`none`}},[`${s}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${X(a(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}},[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:`50%`}}}},J1=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:`rtl`}}},Y1=e=>{let{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:{...Vl(e),[t]:{outline:0,"input[type='file']":{cursor:`pointer`}},[`${t}-select`]:{display:`inline-block`},[`${t}-hidden`]:{display:`none`},[`${t}-disabled`]:{color:n,cursor:`not-allowed`}}}},X1=Xl(`Upload`,e=>{let{fontSizeHeading3:t,marginXS:n,lineWidth:r,pictureCardSize:i,calc:a}=e,o=lc(e,{uploadThumbnailSize:a(t).mul(2).equal(),uploadProgressOffset:a(a(n).div(2)).add(r).equal(),uploadPicCardSize:i});return[Y1(o),U1(o),K1(o),q1(o),W1(o),G1(o),J1(o),Jh(o)]},e=>({actionsColor:e.colorIcon,pictureCardSize:e.controlHeightLG*2.55})),Z1=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:function(e,t){return{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M534 352V136H232v752h560V394H576a42 42 0 01-42-42z`,fill:t}},{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z`,fill:e}}]}},name:`file`,theme:`twotone`}}))());function Q1(){return Q1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,Q1({},e,{ref:t,icon:Z1.default}))),e0=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z`}}]},name:`paper-clip`,theme:`outlined`}}))());function t0(){return t0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,t0({},e,{ref:t,icon:e0.default}))),r0=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:function(e,t){return{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z`,fill:e}},{tag:`path`,attrs:{d:`M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z`,fill:t}},{tag:`path`,attrs:{d:`M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z`,fill:t}},{tag:`path`,attrs:{d:`M276 368a28 28 0 1056 0 28 28 0 10-56 0z`,fill:t}},{tag:`path`,attrs:{d:`M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`,fill:e}}]}},name:`picture`,theme:`twotone`}}))());function i0(){return i0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,i0({},e,{ref:t,icon:r0.default})));function o0(e){return{...e,lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e}}function s0(e,t){let n=da(t),r=n.findIndex(({uid:t})=>t===e.uid);return r===-1?n.push(e):n[r]=e,n}function c0(e,t){let n=e.uid===void 0?`name`:`uid`;return t.filter(t=>t[n]===e[n])[0]}function l0(e,t){let n=e.uid===void 0?`name`:`uid`,r=t.filter(t=>t[n]!==e[n]);return r.length===t.length?null:r}var u0=(e=``)=>{let t=e.split(`/`),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[``])[0]},d0=e=>e.indexOf(`image/`)===0,f0=e=>{if(e.type&&!e.thumbUrl)return d0(e.type);let t=e.thumbUrl||e.url||``,n=u0(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n)?!0:!(/^data:/.test(t)||n)},p0=200;function m0(e){return new Promise(t=>{if(!e.type||!d0(e.type)){t(``);return}let n=document.createElement(`canvas`);n.width=p0,n.height=p0,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${p0}px; height: ${p0}px; z-index: 9999; display: none;`,document.body.appendChild(n);let r=n.getContext(`2d`),i=new Image;if(i.onload=()=>{let{width:e,height:a}=i,o=p0,s=p0,c=0,l=0;e>a?(s=p0/e*a,l=-(s-o)/2):(o=p0/a*e,c=-(o-s)/2),r.drawImage(i,c,l,o,s);let u=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(i.src),t(u)},i.crossOrigin=`anonymous`,e.type.startsWith(`image/svg+xml`)){let t=new FileReader;t.onload=()=>{t.result&&typeof t.result==`string`&&(i.src=t.result)},t.readAsDataURL(e)}else if(e.type.startsWith(`image/gif`)){let n=new FileReader;n.onload=()=>{n.result&&t(n.result)},n.readAsDataURL(e)}else i.src=window.URL.createObjectURL(e)})}var h0=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`download`,theme:`outlined`}}))());function g0(){return g0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,g0({},e,{ref:t,icon:h0.default}))),v0=S.forwardRef(({prefixCls:e,className:t,style:n,classNames:r,styles:i,locale:a,listType:o,file:s,items:c,progress:l,iconRender:u,actionIconRender:d,itemRender:f,isImgUrl:p,showPreviewIcon:m,showRemoveIcon:h,showDownloadIcon:g,previewIcon:_,removeIcon:v,downloadIcon:y,extra:b,onPreview:x,onDownload:C,onClose:w},T)=>{let{status:E}=s,[D,O]=S.useState(E);S.useEffect(()=>{E!==`removed`&&O(E)},[E]);let[k,A]=S.useState(!1);S.useEffect(()=>{let e=setTimeout(()=>{A(!0)},300);return()=>{clearTimeout(e)}},[]);let j=u(s),M=S.createElement(`div`,{className:`${e}-icon`},j);if(o===`picture`||o===`picture-card`||o===`picture-circle`)if(D===`uploading`||!s.thumbUrl&&!s.url){let t=Y(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:D!==`uploading`});M=S.createElement(`div`,{className:t},j)}else{let t=p?.(s)?S.createElement(`img`,{src:s.thumbUrl||s.url,alt:s.name,className:`${e}-list-item-image`,crossOrigin:s.crossOrigin}):j,n=Y(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:p&&!p(s)});M=S.createElement(`a`,{className:n,onClick:e=>x(s,e),href:s.url||s.thumbUrl,target:`_blank`,rel:`noopener noreferrer`},t)}let N=Y(`${e}-list-item`,`${e}-list-item-${D}`,r?.item),P=typeof s.linkProps==`string`?JSON.parse(s.linkProps):s.linkProps,F=(typeof h==`function`?h(s):h)?d((typeof v==`function`?v(s):v)||S.createElement(M$,null),()=>w(s),e,a.removeFile,!0):null,I=(typeof g==`function`?g(s):g)&&D===`done`?d((typeof y==`function`?y(s):y)||S.createElement(_0,null),()=>C(s),e,a.downloadFile):null,L=o!==`picture-card`&&o!==`picture-circle`&&S.createElement(`span`,{key:`download-delete`,className:Y(`${e}-list-item-actions`,{picture:o===`picture`})},I,F),R=typeof b==`function`?b(s):b,z=R&&S.createElement(`span`,{className:`${e}-list-item-extra`},R),B=Y(`${e}-list-item-name`),V=s.url?S.createElement(`a`,{key:`view`,target:`_blank`,rel:`noopener noreferrer`,className:B,title:s.name,...P,href:s.url,onClick:e=>x(s,e)},s.name,z):S.createElement(`span`,{key:`view`,className:B,onClick:e=>x(s,e),title:s.name},s.name,z),H=(typeof m==`function`?m(s):m)&&(s.url||s.thumbUrl)?S.createElement(`a`,{href:s.url||s.thumbUrl,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>x(s,e),title:a.previewFile},typeof _==`function`?_(s):_||S.createElement(RG,null)):null,U=(o===`picture-card`||o===`picture-circle`)&&D!==`uploading`&&S.createElement(`span`,{className:`${e}-list-item-actions`},H,D===`done`&&I,F),{getPrefixCls:ee}=S.useContext(ma),te=ee(),ne=S.createElement(`div`,{className:N,style:i?.item},M,V,L,U,k&&S.createElement(Ed,{motionName:`${te}-fade`,visible:D===`uploading`,motionDeadline:2e3},({className:t})=>{let n=`percent`in s?S.createElement(xJ,{type:`line`,percent:s.percent,"aria-label":s[`aria-label`],"aria-labelledby":s[`aria-labelledby`],...l}):null;return S.createElement(`div`,{className:Y(`${e}-list-item-progress`,t)},n)})),W=s.response&&typeof s.response==`string`?s.response:s.error?.statusText||s.error?.message||a.uploadError,re=D===`error`?S.createElement(eT,{title:W,getPopupContainer:e=>e.parentNode},ne):ne;return S.createElement(`div`,{className:Y(`${e}-list-item-container`,t),style:n,ref:T},f?f(re,s,c,{download:C.bind(null,s),preview:x.bind(null,s),remove:w.bind(null,s)}):re)}),y0=S.forwardRef((e,t)=>{let{listType:n=`text`,previewFile:r=m0,onPreview:i,onDownload:a,onRemove:o,locale:s,iconRender:c,isImageUrl:l=f0,prefixCls:u,items:d=[],showPreviewIcon:f=!0,showRemoveIcon:p=!0,showDownloadIcon:m=!1,removeIcon:h,previewIcon:g,downloadIcon:_,extra:v,progress:y={size:[-1,2],showInfo:!1},appendAction:b,appendActionVisible:x=!0,itemRender:C,disabled:w,classNames:T,styles:E}=e,[,D]=ff(),[O,k]=S.useState(!1),A=[`picture-card`,`picture-circle`].includes(n);S.useEffect(()=>{n.startsWith(`picture`)&&(d||[]).forEach(e=>{!(e.originFileObj instanceof File||e.originFileObj instanceof Blob)||e.thumbUrl!==void 0||(e.thumbUrl=``,r?.(e.originFileObj).then(t=>{e.thumbUrl=t||``,D()}))})},[n,d,r]),S.useEffect(()=>{k(!0)},[]);let j=(e,t)=>{if(i)return t?.preventDefault(),i(e)},M=e=>{typeof a==`function`?a(e):e.url&&window.open(e.url)},N=e=>{o?.(e)},P=e=>{if(c)return c(e,n);let t=e.status===`uploading`;if(n.startsWith(`picture`)){let r=n===`picture`?S.createElement(Xm,null):s.uploading,i=l?.(e)?S.createElement(a0,null):S.createElement($1,null);return t?r:i}return t?S.createElement(Xm,null):S.createElement(n0,null)},F=(e,t,n,r,i)=>{let a={type:`text`,size:`small`,title:r,onClick:n=>{t(),S.isValidElement(e)&&e.props.onClick?.(n)},className:`${n}-list-item-action`,disabled:i?w:!1};return S.isValidElement(e)?S.createElement(E_,{...a,icon:cm(e,{...e.props,onClick:()=>{}})}):S.createElement(E_,{...a},S.createElement(`span`,null,e))};S.useImperativeHandle(t,()=>({handlePreview:j,handleDownload:M}));let{getPrefixCls:I}=S.useContext(ma),L=I(`upload`,u),R=I(),z=Y(`${L}-list`,`${L}-list-${n}`,T?.list),B=S.useMemo(()=>hi(_h(R),[`onAppearEnd`,`onEnterEnd`,`onLeaveEnd`]),[R]),V={...A?{}:B,motionDeadline:2e3,motionName:`${L}-${A?`animate-inline`:`animate`}`,keys:da(d.map(e=>({key:e.uid,file:e}))),motionAppear:O};return S.createElement(`div`,{className:z,style:E?.list},S.createElement(Td,{...V,component:!1},({key:e,file:t,className:r,style:i})=>S.createElement(v0,{key:e,locale:s,prefixCls:L,className:r,style:i,classNames:T,styles:E,file:t,items:d,progress:y,listType:n,isImgUrl:l,showPreviewIcon:f,showRemoveIcon:p,showDownloadIcon:m,removeIcon:h,previewIcon:g,downloadIcon:_,extra:v,iconRender:P,actionIconRender:F,itemRender:C,onPreview:j,onDownload:M,onClose:N})),b&&S.createElement(Ed,{...V,visible:x,forceRender:!0},({className:e,style:t})=>cm(b,n=>({className:Y(n.className,e),style:{...t,pointerEvents:e?`none`:void 0,...n.style}}))))}),b0=`__LIST_IGNORE_${Date.now()}__`,x0=S.forwardRef((e,t)=>{let n=_a(`upload`),{fileList:r,defaultFileList:i,onRemove:a,showUploadList:o=!0,listType:s=`text`,onPreview:c,onDownload:l,onChange:u,onDrop:d,previewFile:f,disabled:p,locale:m,iconRender:h,isImageUrl:g,progress:_,prefixCls:v,className:y,type:b=`select`,children:x,style:C,itemRender:w,maxCount:T,data:E={},multiple:D=!1,hasControlInside:O=!0,action:k=``,accept:A=``,supportServerRender:j=!0,rootClassName:M,styles:N,classNames:P}=e,F=S.useContext(pm),I=p??F,L=e.customRequest||n.customRequest,[R,z]=Wn(i,r),B=R||[],[V,H]=S.useState(`drop`),U=S.useRef(null),ee=S.useRef(null);S.useMemo(()=>{let e=Date.now();(r||[]).forEach((t,n)=>{!t.uid&&!Object.isFrozen(t)&&(t.uid=`__AUTO__${e}_${n}__`)})},[r]);let te=(e,t,n)=>{let r=da(t),i=!1;T===1?r=r.slice(-1):T&&(i=r.length>T,r=r.slice(0,T)),(0,zi.flushSync)(()=>{z(r)});let a={file:e,fileList:r};n&&(a.event=n),(!i||e.status===`removed`||r.some(t=>t.uid===e.uid))&&(0,zi.flushSync)(()=>{u?.(a)})},ne=async(t,n)=>{let{beforeUpload:r}=e,i=t;if(r){let e=await r(t,n);if(e===!1)return!1;if(delete t[b0],e===b0)return Object.defineProperty(t,b0,{value:!0,configurable:!0}),!1;ef(e)&&(i=e)}return i},W=e=>{let t=e.filter(e=>!e.file[b0]);if(!t.length)return;let n=t.map(e=>o0(e.file)),r=da(B);n.forEach(e=>{r=s0(e,r)}),n.forEach((e,n)=>{let i=e;if(t[n].parsedFile)e.status=`uploading`;else{let{originFileObj:t}=e,n;try{n=new File([t],t.name,{type:t.type})}catch{n=new Blob([t],{type:t.type}),n.name=t.name,n.lastModifiedDate=new Date,n.lastModified=new Date().getTime()}n.uid=e.uid,i=n}te(i,r)})},re=(e,t,n)=>{try{typeof e==`string`&&(e=JSON.parse(e))}catch{}if(!c0(t,B))return;let r=o0(t);r.status=`done`,r.percent=100,r.response=e,r.xhr=n,te(r,s0(r,B))},G=(e,t)=>{if(!c0(t,B))return;let n=o0(t);n.status=`uploading`,n.percent=e.percent,te(n,s0(n,B),e)},K=(e,t,n)=>{if(!c0(n,B))return;let r=o0(n);r.error=e,r.response=t,r.status=`error`,te(r,s0(r,B))},q=e=>{let t;Promise.resolve(typeof a==`function`?a(e):a).then(n=>{if(n===!1)return;let r=l0(e,B);r&&(t={...e,status:`removed`},B?.forEach(e=>{let n=t.uid===void 0?`name`:`uid`;e[n]===t[n]&&!Object.isFrozen(e)&&(e.status=`removed`)}),U.current?.abort(t),te(t,r))})},ie=e=>{H(e.type),e.type===`drop`&&d?.(e)};S.useImperativeHandle(t,()=>({onBatchStart:W,onSuccess:re,onProgress:G,onError:K,fileList:B,upload:U.current,nativeElement:ee.current}));let{getPrefixCls:J,direction:ae,className:oe,style:se,classNames:ce,styles:le}=_a(`upload`),ue=J(`upload`,v),de={...e,listType:s,showUploadList:o,type:b,multiple:D,hasControlInside:O,supportServerRender:j,disabled:I},[fe,pe]=xf([ce,P],[le,N],{props:de}),me={onBatchStart:W,onError:K,onProgress:G,onSuccess:re,...e,customRequest:L,data:E,multiple:D,action:k,accept:A,supportServerRender:j,prefixCls:ue,disabled:I,beforeUpload:ne,onChange:void 0,hasControlInside:O};delete me.className,delete me.style,(!x||I)&&delete me.id;let he=`${ue}-wrapper`,[ge,_e]=X1(ue,he),[ve]=qd(`Upload`,Bd.Upload),{showRemoveIcon:ye,showPreviewIcon:be,showDownloadIcon:xe,removeIcon:Se,previewIcon:Ce,downloadIcon:we,extra:Te}=typeof o==`boolean`?{}:o,Ee=ye===void 0?!I:ye,De=(e,t)=>o?S.createElement(y0,{classNames:fe,styles:pe,prefixCls:ue,listType:s,items:B,previewFile:f,onPreview:c,onDownload:l,onRemove:q,showRemoveIcon:Ee,showPreviewIcon:be,showDownloadIcon:xe,removeIcon:Se,previewIcon:Ce,downloadIcon:we,iconRender:h,extra:Te,locale:{...ve,...m},isImageUrl:g,progress:_,appendAction:e,appendActionVisible:t,itemRender:w,disabled:I}):e,Oe=Y(he,y,M,ge,_e,oe,fe.root,{[`${ue}-rtl`]:ae===`rtl`,[`${ue}-picture-card-wrapper`]:s===`picture-card`,[`${ue}-picture-circle-wrapper`]:s===`picture-circle`}),ke={...pe.root},Ae={...se,...C};if(b===`drag`){let e=Y(ge,ue,`${ue}-drag`,{[`${ue}-drag-uploading`]:B.some(e=>e.status===`uploading`),[`${ue}-drag-hover`]:V===`dragover`,[`${ue}-disabled`]:I,[`${ue}-rtl`]:ae===`rtl`},fe.trigger);return S.createElement(`span`,{className:Oe,ref:ee,style:ke},S.createElement(`div`,{className:e,style:{...Ae,...pe.trigger},onDrop:ie,onDragOver:ie,onDragLeave:ie},S.createElement(H1,{...me,ref:U,className:`${ue}-btn`},S.createElement(`div`,{className:`${ue}-drag-container`},x))),De())}let je=Y(ue,`${ue}-select`,{[`${ue}-disabled`]:I,[`${ue}-hidden`]:!x},fe.trigger),Me=S.createElement(`div`,{className:je,style:{...Ae,...pe.trigger}},S.createElement(H1,{...me,ref:U}));return s===`picture-card`||s===`picture-circle`?S.createElement(`span`,{className:Oe,ref:ee,style:ke},De(Me,!!x)):S.createElement(`span`,{className:Oe,ref:ee,style:ke},Me,De())}),S0=S.forwardRef((e,t)=>{let{style:n,height:r,hasControlInside:i=!1,children:a,...o}=e,s={...n,height:r};return S.createElement(x0,{ref:t,hasControlInside:i,...o,style:s,type:`drag`},a)}),C0=x0;C0.Dragger=S0,C0.LIST_IGNORE=b0;var w0=o(((e,t)=>{function n(e){return e&&e.__esModule?e:{default:e}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),T0=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default={items_per_page:`条/页`,jump_to:`跳至`,jump_to_confirm:`确定`,page:`页`,prev_page:`上一页`,next_page:`下一页`,prev_5:`向前 5 页`,next_5:`向后 5 页`,prev_3:`向前 3 页`,next_3:`向后 3 页`,page_size:`页码`}})),E0=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.commonLocale=void 0,e.commonLocale={yearFormat:`YYYY`,dayFormat:`D`,cellMeridiemFormat:`A`,monthBeforeYear:!0}})),D0=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=E0();function n(e){"@babel/helpers - typeof";return n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n(e)}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default={placeholder:`请选择时间`,rangePlaceholder:[`开始时间`,`结束时间`]}})),k0=o((e=>{var t=w0().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(D0()),r=t(O0()),i={lang:{placeholder:`请选择日期`,yearPlaceholder:`请选择年份`,quarterPlaceholder:`请选择季度`,monthPlaceholder:`请选择月份`,weekPlaceholder:`请选择周`,rangePlaceholder:[`开始日期`,`结束日期`],rangeYearPlaceholder:[`开始年份`,`结束年份`],rangeMonthPlaceholder:[`开始月份`,`结束月份`],rangeQuarterPlaceholder:[`开始季度`,`结束季度`],rangeWeekPlaceholder:[`开始周`,`结束周`],...n.default},timePickerLocale:{...r.default}};i.lang.ok=`确定`,e.default=i})),A0=o((e=>{var t=w0().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=t(k0()).default})),j0=o((e=>{var t=w0().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(T0()),r=t(A0()),i=t(k0()),a=t(O0()),o="${label}不是一个有效的${type}";e.default={locale:`zh-cn`,Pagination:n.default,DatePicker:i.default,TimePicker:a.default,Calendar:r.default,global:{placeholder:`请选择`,close:`关闭`,sortable:`可排序`},Table:{filterTitle:`筛选`,filterConfirm:`确定`,filterReset:`重置`,filterEmptyText:`无筛选项`,filterCheckAll:`全选`,filterSearchPlaceholder:`在筛选项中搜索`,emptyText:`暂无数据`,selectAll:`全选当页`,selectInvert:`反选当页`,selectNone:`清空所有`,selectionAll:`全选所有`,sortTitle:`排序`,expand:`展开行`,collapse:`关闭行`,triggerDesc:`点击降序`,triggerAsc:`点击升序`,cancelSort:`取消排序`},Modal:{okText:`确定`,cancelText:`取消`,justOkText:`知道了`},Tour:{Next:`下一步`,Previous:`上一步`,Finish:`结束导览`},Popconfirm:{cancelText:`取消`,okText:`确定`},Transfer:{titles:[``,``],searchPlaceholder:`请输入搜索内容`,itemUnit:`项`,itemsUnit:`项`,remove:`删除`,selectCurrent:`全选当页`,removeCurrent:`删除当页`,selectAll:`全选所有`,deselectAll:`取消全选`,removeAll:`删除全部`,selectInvert:`反选当页`},Upload:{uploading:`文件上传中`,removeFile:`删除文件`,uploadError:`上传错误`,previewFile:`预览文件`,downloadFile:`下载文件`},Empty:{description:`暂无数据`},Icon:{icon:`图标`},Text:{edit:`编辑`,copy:`复制`,copied:`复制成功`,expand:`展开`,collapse:`收起`},Form:{optional:`(可选)`,defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:o,method:o,array:o,object:o,number:o,date:o,boolean:o,integer:o,float:o,regexp:o,email:o,url:o,hex:o},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},QRCode:{expired:`二维码过期`,refresh:`点击刷新`,scanned:`已扫描`},ColorPicker:{presetEmpty:`暂无`,transparent:`无色`,singleColor:`单色`,gradientColor:`渐变色`}}})),M0=c(o(((e,t)=>{t.exports=j0()}))(),1),N0=Object.defineProperty,P0=Object.getOwnPropertySymbols,F0=Object.prototype.hasOwnProperty,I0=Object.prototype.propertyIsEnumerable,L0=(e,t,n)=>t in e?N0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,R0=(e,t)=>{for(var n in t||={})F0.call(t,n)&&L0(e,n,t[n]);if(P0)for(var n of P0(t))I0.call(t,n)&&L0(e,n,t[n]);return e},z0=(e,t)=>{var n={};for(var r in e)F0.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&P0)for(var r of P0(e))t.indexOf(r)<0&&I0.call(e,r)&&(n[r]=e[r]);return n},B0;(e=>{let t=class t{constructor(e,n,r,a){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],et.MAX_VERSION)throw RangeError(`Version value out of range`);if(a<-1||a>7)throw RangeError(`Mask value out of range`);this.size=e*4+17;let o=[];for(let e=0;e7)throw RangeError(`Invalid value`);let u,d;for(u=a;;u++){let n=t.getNumDataCodewords(u,r)*8,i=o.getTotalBits(e,u);if(i<=n){d=i;break}if(u>=s)throw RangeError(`Data too long`)}for(let e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=t.getNumDataCodewords(u,e)*8&&(r=e);let f=[];for(let t of e){n(t.mode.modeBits,4,f),n(t.numChars,t.mode.numCharCountBits(u),f);for(let e of t.getData())f.push(e)}i(f.length==d);let p=t.getNumDataCodewords(u,r)*8;i(f.length<=p),n(0,Math.min(4,p-f.length),f),n(0,(8-f.length%8)%8,f),i(f.length%8==0);for(let e=236;f.lengthm[t>>>3]|=e<<7-(t&7)),new t(u,r,m,c)}getModule(e,t){return 0<=e&&e>>9)*1335;let a=(t<<10|n)^21522;i(a>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,r(a,e));this.setFunctionModule(8,7,r(a,6)),this.setFunctionModule(8,8,r(a,7)),this.setFunctionModule(7,8,r(a,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,r(a,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,r(a,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,r(a,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;i(t>>>18==0);for(let e=0;e<18;e++){let n=r(t,e),i=this.size-11+e%3,a=Math.floor(e/3);this.setFunctionModule(i,a,n),this.setFunctionModule(a,i,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){let i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,o=t+n;0<=a&&a{(e!=l-o||n>=c)&&f.push(t[e])});return i(f.length==s),f}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw RangeError(`Invalid argument`);let n=0;for(let t=this.size-1;t>=1;t-=2){t==6&&(t=5);for(let i=0;i>>3],7-(n&7)),n++)}}i(n==e.length*8)}applyMask(e){if(e<0||e>7)throw RangeError(`Mask value out of range`);for(let t=0;t5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[n][o],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;n5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[o][n],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;ne+ +!!t,n);let r=this.size*this.size,a=Math.ceil(Math.abs(n*20-r*10)/r)-1;return i(0<=a&&a<=9),e+=a*t.PENALTY_N4,i(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(this.version==1)return[];{let e=Math.floor(this.version/7)+2,t=this.version==32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,n=[6];for(let r=this.size-7;n.lengtht.MAX_VERSION)throw RangeError(`Version number out of range`);let n=(16*e+128)*e+64;if(e>=2){let t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return i(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw RangeError(`Degree out of range`);let n=[];for(let t=0;t0);for(let i of e){let e=i^r.shift();r.push(0),n.forEach((n,i)=>r[i]^=t.reedSolomonMultiply(n,e))}return r}static reedSolomonMultiply(e,t){if(e>>>8||t>>>8)throw RangeError(`Byte out of range`);let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return i(n>>>8==0),n}finderPenaltyCountPatterns(e){let t=e[1];i(t<=this.size*3);let n=t>0&&e[2]==t&&e[3]==t*3&&e[4]==t&&e[5]==t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){t[0]==0&&(e+=this.size),t.pop(),t.unshift(e)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(e,t,n){if(t<0||t>31||e>>>t)throw RangeError(`Value out of range`);for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function r(e,t){return(e>>>t&1)!=0}function i(e){if(!e)throw Error(`Assertion error`)}let a=class e{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw RangeError(`Invalid argument`);this.bitData=n.slice()}static makeBytes(t){let r=[];for(let e of t)n(e,8,r);return new e(e.Mode.BYTE,t.length,r)}static makeNumeric(t){if(!e.isNumeric(t))throw RangeError(`String contains non-numeric characters`);let r=[];for(let e=0;e=1<{(e=>{let t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),e.Ecc=t})(e.QrCode||={})})(B0||={}),(e=>{(e=>{let t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]),e.Mode=t})(e.QrSegment||={})})(B0||={});var V0=B0,H0={L:V0.QrCode.Ecc.LOW,M:V0.QrCode.Ecc.MEDIUM,Q:V0.QrCode.Ecc.QUARTILE,H:V0.QrCode.Ecc.HIGH},U0=128,W0=`L`,G0=`#FFFFFF`,K0=`#000000`,q0=!1,J0=1,Y0=4,X0=0,Z0=.1;function Q0(e,t=0){let n=[];return e.forEach(function(e,r){let i=null;e.forEach(function(a,o){if(!a&&i!==null){n.push(`M${i+t} ${r+t}h${o-i}v1H${i+t}z`),i=null;return}if(o===e.length-1){if(!a)return;i===null?n.push(`M${o+t},${r+t} h1v1H${o+t}z`):n.push(`M${i+t},${r+t} h${o+1-i}v1H${i+t}z`);return}a&&i===null&&(i=o)})}),n.join(``)}function $0(e,t){return e.slice().map((e,n)=>n=t.y+t.h?e:e.map((e,n)=>n=t.x+t.w?e:!1))}function e2(e,t,n,r){if(r==null)return null;let i=e.length+n*2,a=Math.floor(t*Z0),o=i/t,s=(r.width||a)*o,c=(r.height||a)*o,l=r.x==null?e.length/2-s/2:r.x*o,u=r.y==null?e.length/2-c/2:r.y*o,d=r.opacity==null?1:r.opacity,f=null;if(r.excavate){let e=Math.floor(l),t=Math.floor(u);f={x:e,y:t,w:Math.ceil(s+l-e),h:Math.ceil(c+u-t)}}let p=r.crossOrigin;return{x:l,y:u,h:c,w:s,excavation:f,opacity:d,crossOrigin:p}}function t2(e,t){return t==null?e?Y0:X0:Math.max(Math.floor(t),0)}function n2({value:e,level:t,minVersion:n,includeMargin:r,marginSize:i,imageSettings:a,size:o,boostLevel:s}){let c=S.useMemo(()=>{let r=(Array.isArray(e)?e:[e]).reduce((e,t)=>(e.push(...V0.QrSegment.makeSegments(t)),e),[]);return V0.QrCode.encodeSegments(r,H0[t],n,void 0,void 0,s)},[e,t,n,s]),{cells:l,margin:u,numCells:d,calculatedImageSettings:f}=S.useMemo(()=>{let e=c.getModules(),t=t2(r,i);return{cells:e,margin:t,numCells:e.length+t*2,calculatedImageSettings:e2(e,o,t,a)}},[c,o,a,r,i]);return{qrcode:c,margin:u,cells:l,numCells:d,calculatedImageSettings:f}}var r2=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),i2=S.forwardRef(function(e,t){let n=e,{value:r,size:i=U0,level:a=W0,bgColor:o=G0,fgColor:s=K0,includeMargin:c=q0,minVersion:l=J0,boostLevel:u,marginSize:d,imageSettings:f}=n,p=z0(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`marginSize`,`imageSettings`]),{style:m}=p,h=z0(p,[`style`]),g=f?.src,_=S.useRef(null),v=S.useRef(null),y=S.useCallback(e=>{_.current=e,typeof t==`function`?t(e):t&&(t.current=e)},[t]),[b,x]=S.useState(!1),{margin:C,cells:w,numCells:T,calculatedImageSettings:E}=n2({value:r,level:a,minVersion:l,boostLevel:u,includeMargin:c,marginSize:d,imageSettings:f,size:i});S.useEffect(()=>{if(_.current!=null){let e=_.current,t=e.getContext(`2d`);if(!t)return;let n=w,r=v.current,a=E!=null&&r!==null&&r.complete&&r.naturalHeight!==0&&r.naturalWidth!==0;a&&E.excavation!=null&&(n=$0(w,E.excavation));let c=window.devicePixelRatio||1;e.height=e.width=i*c;let l=i/T*c;t.scale(l,l),t.fillStyle=o,t.fillRect(0,0,T,T),t.fillStyle=s,r2?t.fill(new Path2D(Q0(n,C))):w.forEach(function(e,n){e.forEach(function(e,r){e&&t.fillRect(r+C,n+C,1,1)})}),E&&(t.globalAlpha=E.opacity),a&&t.drawImage(r,E.x+C,E.y+C,E.w,E.h)}}),S.useEffect(()=>{x(!1)},[g]);let D=R0({height:i,width:i},m),O=null;return g!=null&&(O=S.createElement(`img`,{src:g,key:g,style:{display:`none`},onLoad:()=>{x(!0)},ref:v,crossOrigin:E?.crossOrigin})),S.createElement(S.Fragment,null,S.createElement(`canvas`,R0({style:D,height:i,width:i,ref:y,role:`img`},h)),O)});i2.displayName=`QRCodeCanvas`;var a2=S.forwardRef(function(e,t){let n=e,{value:r,size:i=U0,level:a=W0,bgColor:o=G0,fgColor:s=K0,includeMargin:c=q0,minVersion:l=J0,boostLevel:u,title:d,marginSize:f,imageSettings:p}=n,m=z0(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`title`,`marginSize`,`imageSettings`]),{margin:h,cells:g,numCells:_,calculatedImageSettings:v}=n2({value:r,level:a,minVersion:l,boostLevel:u,includeMargin:c,marginSize:f,imageSettings:p,size:i}),y=g,b=null;p!=null&&v!=null&&(v.excavation!=null&&(y=$0(g,v.excavation)),b=S.createElement(`image`,{href:p.src,height:v.h,width:v.w,x:v.x+h,y:v.y+h,preserveAspectRatio:`none`,opacity:v.opacity,crossOrigin:v.crossOrigin}));let x=Q0(y,h);return S.createElement(`svg`,R0({height:i,width:i,viewBox:`0 0 ${_} ${_}`,ref:t,role:`img`},m),!!d&&S.createElement(`title`,null,d),S.createElement(`path`,{fill:o,d:`M0,0 h${_}v${_}H0z`,shapeRendering:`crispEdges`}),S.createElement(`path`,{fill:s,d:x,shapeRendering:`crispEdges`}),b)});a2.displayName=`QRCodeSVG`;var o2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.42 0 448 200.58 448 448S759.42 960 512 960 64 759.42 64 512 264.58 64 512 64m32.5 168c-69.67 0-86.06 16.84-86.72 39.08l-.02 1.43v46.62H291.45c-9.92 0-14.28 23.05-14.27 39.3 0 2.7 2.08 4.93 4.77 4.93h175.81v58.3h-116.5c-9.96 0-14.3 23.76-14.27 39.47a4.77 4.77 0 004.77 4.76h233.45c-4.53 41.06-15.43 77.59-30.72 109.32l-1.22 2.5-.32-.28c-60.24-28.47-120.43-52.57-194.4-52.57l-2.62.01c-84.98 1.11-144.71 56.5-145.91 127.04l-.02 1.22.02 2.13c1.24 70.4 63.56 126.45 148.52 126.45 61.25 0 116.38-16.85 163.46-45.02a138.58 138.58 0 0014.07-7.96 345.6 345.6 0 0050.3-41.16l9.45 6.35 12.46 8.32c57.53 38.26 113.76 72.62 169.86 79.27a142.62 142.62 0 0018.31 1.16c43.02 0 55-52.68 57.39-95.51l.14-2.84c.4-8.46-6.2-15.6-14.65-15.86-75.46-2.37-136.45-22.05-192-46.11l-6.27-2.75c35.15-56.8 56.66-121.81 57.15-186.66l.09-1.08c.4-5.51-4-10.2-9.52-10.2H549.33v-58.3h165.73c9.92 0 14.28-22.12 14.27-39.31a4.85 4.85 0 00-4.78-4.92H549.32v-82.35a4.8 4.8 0 00-4.83-4.78M328 583.85c54.63 0 107.08 22.41 158.1 52.19l5.76 3.4c-103.57 119.84-247.17 95.9-261.72 26.37a66.89 66.89 0 01-1.14-9.83l-.06-2.34.02-.9c.97-40.12 45.33-68.9 99.04-68.9`}}]},name:`alipay-circle`,theme:`outlined`}}))());function s2(){return s2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,s2({},e,{ref:t,icon:o2.default}))),l2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z`}}]},name:`api`,theme:`outlined`}}))());function u2(){return u2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,u2({},e,{ref:t,icon:l2.default}))),f2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z`}}]},name:`appstore`,theme:`outlined`}}))());function p2(){return p2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,p2({},e,{ref:t,icon:f2.default}))),h2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z`}}]},name:`arrow-down`,theme:`outlined`}}))());function g2(){return g2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,g2({},e,{ref:t,icon:h2.default}))),v2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`arrow-left`,theme:`outlined`}}))());function y2(){return y2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,y2({},e,{ref:t,icon:v2.default}))),x2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z`}}]},name:`arrow-up`,theme:`outlined`}}))());function S2(){return S2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,S2({},e,{ref:t,icon:x2.default}))),w2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z`}}]},name:`audio`,theme:`outlined`}}))());function T2(){return T2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,T2({},e,{ref:t,icon:w2.default}))),D2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM381 836H264V462h117v374zm189 0H453V462h117v374zm190 0H642V462h118v374z`}}]},name:`bank`,theme:`filled`}}))());function O2(){return O2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,O2({},e,{ref:t,icon:D2.default}))),A2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z`}}]},name:`bank`,theme:`outlined`}}))());function j2(){return j2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,j2({},e,{ref:t,icon:A2.default}))),N2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z`}}]},name:`bar-chart`,theme:`outlined`}}))());function P2(){return P2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,P2({},e,{ref:t,icon:N2.default}))),I2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M816 768h-24V428c0-141.1-104.3-257.7-240-277.1V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.9c-135.7 19.4-240 136-240 277.1v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48zM304 768V428c0-55.6 21.6-107.8 60.9-147.1S456.4 220 512 220c55.6 0 107.8 21.6 147.1 60.9S720 372.4 720 428v340H304z`}}]},name:`bell`,theme:`outlined`}}))());function L2(){return L2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,L2({},e,{ref:t,icon:I2.default}))),z2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z`}}]},name:`book`,theme:`outlined`}}))());function B2(){return B2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,B2({},e,{ref:t,icon:z2.default}))),H2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M916 210H376c-17.7 0-32 14.3-32 32v236H108c-17.7 0-32 14.3-32 32v272c0 17.7 14.3 32 32 32h540c17.7 0 32-14.3 32-32V546h236c17.7 0 32-14.3 32-32V242c0-17.7-14.3-32-32-32zm-504 68h200v200H412V278zm-68 468H144V546h200v200zm268 0H412V546h200v200zm268-268H680V278h200v200z`}}]},name:`build`,theme:`outlined`}}))());function U2(){return U2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,U2({},e,{ref:t,icon:H2.default}))),G2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z`}}]},name:`bulb`,theme:`outlined`}}))());function K2(){return K2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,K2({},e,{ref:t,icon:G2.default}))),J2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M251.2 387H320v68.8c0 1.8 1.8 3.2 4 3.2h48c2.2 0 4-1.4 4-3.3V387h68.8c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H376v-68.8c0-1.8-1.8-3.2-4-3.2h-48c-2.2 0-4 1.4-4 3.2V331h-68.8c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm328 0h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm0 265h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm0 104h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm-195.7-81l61.2-74.9c4.3-5.2.7-13.1-5.9-13.1H388c-2.3 0-4.5 1-5.9 2.9l-34 41.6-34-41.6a7.85 7.85 0 00-5.9-2.9h-50.9c-6.6 0-10.2 7.9-5.9 13.1l61.2 74.9-62.7 76.8c-4.4 5.2-.8 13.1 5.8 13.1h50.8c2.3 0 4.5-1 5.9-2.9l35.5-43.5 35.5 43.5c1.5 1.8 3.7 2.9 5.9 2.9h50.8c6.6 0 10.2-7.9 5.9-13.1L383.5 675zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-36 732H180V180h664v664z`}}]},name:`calculator`,theme:`outlined`}}))());function Y2(){return Y2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,Y2({},e,{ref:t,icon:J2.default}))),Z2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 248H728l-32.4-90.8a32.07 32.07 0 00-30.2-21.2H358.6c-13.5 0-25.6 8.5-30.1 21.2L296 248H160c-44.2 0-80 35.8-80 80v456c0 44.2 35.8 80 80 80h704c44.2 0 80-35.8 80-80V328c0-44.2-35.8-80-80-80zm8 536c0 4.4-3.6 8-8 8H160c-4.4 0-8-3.6-8-8V328c0-4.4 3.6-8 8-8h186.7l17.1-47.8 22.9-64.2h250.5l22.9 64.2 17.1 47.8H864c4.4 0 8 3.6 8 8v456zM512 384c-88.4 0-160 71.6-160 160s71.6 160 160 160 160-71.6 160-160-71.6-160-160-160zm0 256c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z`}}]},name:`camera`,theme:`outlined`}}))());function Q2(){return Q2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,Q2({},e,{ref:t,icon:Z2.default}))),e4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M380 704h264c4.4 0 8-3.6 8-8v-84c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v36H428v-36c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v84c0 4.4 3.6 8 8 8zm340-123a40 40 0 1080 0 40 40 0 10-80 0zm239-167.6L935.3 372a8 8 0 00-10.9-2.9l-50.7 29.6-78.3-216.2a63.9 63.9 0 00-60.9-44.4H301.2c-34.7 0-65.5 22.4-76.2 55.5l-74.6 205.2-50.8-29.6a8 8 0 00-10.9 2.9L65 413.4c-2.2 3.8-.9 8.6 2.9 10.8l60.4 35.2-14.5 40c-1.2 3.2-1.8 6.6-1.8 10v348.2c0 15.7 11.8 28.4 26.3 28.4h67.6c12.3 0 23-9.3 25.6-22.3l7.7-37.7h545.6l7.7 37.7c2.7 13 13.3 22.3 25.6 22.3h67.6c14.5 0 26.3-12.7 26.3-28.4V509.4c0-3.4-.6-6.8-1.8-10l-14.5-40 60.3-35.2a8 8 0 003-10.8zM840 517v237H184V517l15.6-43h624.8l15.6 43zM292.7 218.1l.5-1.3.4-1.3c1.1-3.3 4.1-5.5 7.6-5.5h427.6l75.4 208H220l72.7-199.9zM224 581a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`car`,theme:`outlined`}}))());function t4(){return t4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,t4({},e,{ref:t,icon:e4.default}))),r4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z`}}]},name:`caret-right`,theme:`outlined`}}))());function i4(){return i4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,i4({},e,{ref:t,icon:r4.default}))),o4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z`}},{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}}]},name:`check-circle`,theme:`outlined`}}))());function s4(){return s4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,s4({},e,{ref:t,icon:o4.default}))),l4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z`}}]},name:`close-circle`,theme:`outlined`}}))());function u4(){return u4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,u4({},e,{ref:t,icon:l4.default}))),f4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M811.4 418.7C765.6 297.9 648.9 212 512.2 212S258.8 297.8 213 418.6C127.3 441.1 64 519.1 64 612c0 110.5 89.5 200 199.9 200h496.2C870.5 812 960 722.5 960 612c0-92.7-63.1-170.7-148.6-193.3zm36.3 281a123.07 123.07 0 01-87.6 36.3H263.9c-33.1 0-64.2-12.9-87.6-36.3A123.3 123.3 0 01140 612c0-28 9.1-54.3 26.2-76.3a125.7 125.7 0 0166.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10c54.3 14.5 92.1 63.8 92.1 120 0 33.1-12.9 64.3-36.3 87.7z`}}]},name:`cloud`,theme:`outlined`}}))());function p4(){return p4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,p4({},e,{ref:t,icon:f4.default}))),h4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z`}},{tag:`path`,attrs:{d:`M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z`}},{tag:`path`,attrs:{d:`M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z`}}]},name:`cloud-server`,theme:`outlined`}}))());function g4(){return g4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,g4({},e,{ref:t,icon:h4.default}))),v4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M518.3 459a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V856c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V613.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 459z`}},{tag:`path`,attrs:{d:`M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 01-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z`}}]},name:`cloud-upload`,theme:`outlined`}}))());function y4(){return y4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,y4({},e,{ref:t,icon:v4.default}))),x4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`code`,theme:`outlined`}}))());function S4(){return S4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,S4({},e,{ref:t,icon:x4.default}))),w4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M275 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm613 144H768c0-39.8-32.2-72-72-72H200c-39.8 0-72 32.2-72 72v248c0 3.4.2 6.7.7 9.9-.5 7-.7 14-.7 21.1 0 176.7 143.3 320 320 320 160.1 0 292.7-117.5 316.3-271H888c39.8 0 72-32.2 72-72V497c0-39.8-32.2-72-72-72zM696 681h-1.1c.7 7.6 1.1 15.2 1.1 23 0 137-111 248-248 248S200 841 200 704c0-7.8.4-15.4 1.1-23H200V425h496v256zm192-8H776V497h112v176zM613 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm-170 0c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36z`}}]},name:`coffee`,theme:`outlined`}}))());function T4(){return T4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,T4({},e,{ref:t,icon:w4.default}))),D4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={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 372zm198.4-588.1a32 32 0 00-24.5.5L414.9 415 296.4 686c-3.6 8.2-3.6 17.5 0 25.7 3.4 7.8 9.7 13.9 17.7 17 3.8 1.5 7.7 2.2 11.7 2.2 4.4 0 8.7-.9 12.8-2.7l271-118.6 118.5-271a32.06 32.06 0 00-17.7-42.7zM576.8 534.4l26.2 26.2-42.4 42.4-26.2-26.2L380 644.4 447.5 490 422 464.4l42.4-42.4 25.5 25.5L644.4 380l-67.6 154.4zM464.4 422L422 464.4l25.5 25.6 86.9 86.8 26.2 26.2 42.4-42.4-26.2-26.2-86.8-86.9z`}}]},name:`compass`,theme:`outlined`}}))());function O4(){return O4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,O4({},e,{ref:t,icon:D4.default}))),A4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zM512 734.2c-62.1 0-112.6-50.5-112.6-112.6S449.9 509 512 509s112.6 50.5 112.6 112.6S574.1 734.2 512 734.2zm0-160.9c-26.6 0-48.2 21.6-48.2 48.3 0 26.6 21.6 48.3 48.2 48.3s48.2-21.6 48.2-48.3c0-26.6-21.6-48.3-48.2-48.3z`}}]},name:`crown`,theme:`filled`}}))());function j4(){return j4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,j4({},e,{ref:t,icon:A4.default}))),N4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z`}}]},name:`crown`,theme:`outlined`}}))());function P4(){return P4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,P4({},e,{ref:t,icon:N4.default}))),I4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z`}}]},name:`dashboard`,theme:`outlined`}}))());function L4(){return L4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,L4({},e,{ref:t,icon:I4.default}))),z4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`database`,theme:`outlined`}}))());function B4(){return B4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,B4({},e,{ref:t,icon:z4.default}))),H4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={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 372zm47.7-395.2l-25.4-5.9V348.6c38 5.2 61.5 29 65.5 58.2.5 4 3.9 6.9 7.9 6.9h44.9c4.7 0 8.4-4.1 8-8.8-6.1-62.3-57.4-102.3-125.9-109.2V263c0-4.4-3.6-8-8-8h-28.1c-4.4 0-8 3.6-8 8v33c-70.8 6.9-126.2 46-126.2 119 0 67.6 49.8 100.2 102.1 112.7l24.7 6.3v142.7c-44.2-5.9-69-29.5-74.1-61.3-.6-3.8-4-6.6-7.9-6.6H363c-4.7 0-8.4 4-8 8.7 4.5 55 46.2 105.6 135.2 112.1V761c0 4.4 3.6 8 8 8h28.4c4.4 0 8-3.6 8-8.1l-.2-31.7c78.3-6.9 134.3-48.8 134.3-124-.1-69.4-44.2-100.4-109-116.4zm-68.6-16.2c-5.6-1.6-10.3-3.1-15-5-33.8-12.2-49.5-31.9-49.5-57.3 0-36.3 27.5-57 64.5-61.7v124zM534.3 677V543.3c3.1.9 5.9 1.6 8.8 2.2 47.3 14.4 63.2 34.4 63.2 65.1 0 39.1-29.4 62.6-72 66.4z`}}]},name:`dollar`,theme:`outlined`}}))());function U4(){return U4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,U4({},e,{ref:t,icon:H4.default}))),G4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 472a40 40 0 1080 0 40 40 0 10-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 01-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z`}}]},name:`experiment`,theme:`outlined`}}))());function K4(){return K4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,K4({},e,{ref:t,icon:G4.default}))),J4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z`}}]},name:`filter`,theme:`outlined`}}))());function Y4(){return Y4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,Y4({},e,{ref:t,icon:J4.default}))),Z4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9z`}}]},name:`fire`,theme:`filled`}}))());function Q4(){return Q4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,Q4({},e,{ref:t,icon:Z4.default}))),e3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9zM713 808.5c-53.7 53.2-125 82.4-201 82.4s-147.3-29.2-201-82.4c-53.5-53.1-83-123.5-83-198.4 0-43.5 9.8-85.2 29.1-124 18.8-37.9 46.8-71.8 80.8-97.9a349.6 349.6 0 0058.6-56.8c25-30.5 44.6-64.5 58.2-101a240 240 0 0012.1-46.5c24.1 22.2 44.3 49 61.2 80.4 33.4 62.6 48.8 118.3 45.8 165.7a74.01 74.01 0 0024.4 59.8 73.36 73.36 0 0053.4 18.8c19.7-1 37.8-9.7 51-24.4 13.3-14.9 24.8-30.1 34.4-45.6 14 17.9 25.7 37.4 35 58.4 15.9 35.8 24 73.9 24 113.1 0 74.9-29.5 145.4-83 198.4z`}}]},name:`fire`,theme:`outlined`}}))());function t3(){return t3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,t3({},e,{ref:t,icon:e3.default}))),r3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 305H624V192c0-17.7-14.3-32-32-32H184v-40c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v784c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V640h248v113c0 17.7 14.3 32 32 32h416c17.7 0 32-14.3 32-32V337c0-17.7-14.3-32-32-32zM184 568V232h368v336H184zm656 145H504v-73h112c4.4 0 8-3.6 8-8V377h216v336z`}}]},name:`flag`,theme:`outlined`}}))());function i3(){return i3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,i3({},e,{ref:t,icon:r3.default}))),o3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 310H732.4c13.6-21.4 21.6-46.8 21.6-74 0-76.1-61.9-138-138-138-41.4 0-78.7 18.4-104 47.4-25.3-29-62.6-47.4-104-47.4-76.1 0-138 61.9-138 138 0 27.2 7.9 52.6 21.6 74H144c-17.7 0-32 14.3-32 32v200c0 4.4 3.6 8 8 8h40v344c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V550h40c4.4 0 8-3.6 8-8V342c0-17.7-14.3-32-32-32zm-334-74c0-38.6 31.4-70 70-70s70 31.4 70 70-31.4 70-70 70h-70v-70zm-138-70c38.6 0 70 31.4 70 70v70h-70c-38.6 0-70-31.4-70-70s31.4-70 70-70zM180 482V378h298v104H180zm48 68h250v308H228V550zm568 308H546V550h250v308zm48-376H546V378h298v104z`}}]},name:`gift`,theme:`outlined`}}))());function s3(){return s3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,s3({},e,{ref:t,icon:o3.default}))),l3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z`}}]},name:`global`,theme:`outlined`}}))());function u3(){return u3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,u3({},e,{ref:t,icon:l3.default}))),f3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z`}}]},name:`heart`,theme:`outlined`}}))());function p3(){return p3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,p3({},e,{ref:t,icon:f3.default}))),h3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M957.6 507.4L603.2 158.2a7.9 7.9 0 00-11.2 0L353.3 393.4a8.03 8.03 0 00-.1 11.3l.1.1 40 39.4-117.2 115.3a8.03 8.03 0 00-.1 11.3l.1.1 39.5 38.9-189.1 187H72.1c-4.4 0-8.1 3.6-8.1 8V860c0 4.4 3.6 8 8 8h344.9c2.1 0 4.1-.8 5.6-2.3l76.1-75.6 40.4 39.8a7.9 7.9 0 0011.2 0l117.1-115.6 40.1 39.5a7.9 7.9 0 0011.2 0l238.7-235.2c3.4-3 3.4-8 .3-11.2zM389.8 796.2H229.6l134.4-133 80.1 78.9-54.3 54.1zm154.8-62.1L373.2 565.2l68.6-67.6 171.4 168.9-68.6 67.6zM713.1 658L450.3 399.1 597.6 254l262.8 259-147.3 145z`}}]},name:`highlight`,theme:`outlined`}}))());function g3(){return g3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,g3({},e,{ref:t,icon:h3.default}))),v3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z`}}]},name:`history`,theme:`outlined`}}))());function y3(){return y3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,y3({},e,{ref:t,icon:v3.default}))),x3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z`}}]},name:`home`,theme:`outlined`}}))());function S3(){return S3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,S3({},e,{ref:t,icon:x3.default}))),w3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136V232h752v560zM610.3 476h123.4c1.3 0 2.3-3.6 2.3-8v-48c0-4.4-1-8-2.3-8H610.3c-1.3 0-2.3 3.6-2.3 8v48c0 4.4 1 8 2.3 8zm4.8 144h185.7c3.9 0 7.1-3.6 7.1-8v-48c0-4.4-3.2-8-7.1-8H615.1c-3.9 0-7.1 3.6-7.1 8v48c0 4.4 3.2 8 7.1 8zM224 673h43.9c4.2 0 7.6-3.3 7.9-7.5 3.8-50.5 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H522a8 8 0 008-8.4c-2.8-53.3-32-99.7-74.6-126.1a111.8 111.8 0 0029.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 00-74.6 126.1c-.4 4.6 3.2 8.4 7.8 8.4zm149-262c28.5 0 51.7 23.3 51.7 52s-23.2 52-51.7 52-51.7-23.3-51.7-52 23.2-52 51.7-52z`}}]},name:`idcard`,theme:`outlined`}}))());function T3(){return T3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,T3({},e,{ref:t,icon:w3.default}))),D3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M956.9 845.1L896.4 632V168c0-17.7-14.3-32-32-32h-704c-17.7 0-32 14.3-32 32v464L67.9 845.1C60.4 866 75.8 888 98 888h828.8c22.2 0 37.6-22 30.1-42.9zM200.4 208h624v395h-624V208zm228.3 608l8.1-37h150.3l8.1 37H428.7zm224 0l-19.1-86.7c-.8-3.7-4.1-6.3-7.8-6.3H398.2c-3.8 0-7 2.6-7.8 6.3L371.3 816H151l42.3-149h638.2l42.3 149H652.7z`}}]},name:`laptop`,theme:`outlined`}}))());function O3(){return O3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,O3({},e,{ref:t,icon:D3.default}))),A3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-696 72h136v656H184V184zm656 656H384V384h456v456zM384 320V184h456v136H384z`}}]},name:`layout`,theme:`outlined`}}))());function j3(){return j3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,j3({},e,{ref:t,icon:A3.default}))),N3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z`}}]},name:`line-chart`,theme:`outlined`}}))());function P3(){return P3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,P3({},e,{ref:t,icon:N3.default}))),I3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z`}}]},name:`lock`,theme:`outlined`}}))());function L3(){return L3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,L3({},e,{ref:t,icon:I3.default}))),z3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z`}}]},name:`logout`,theme:`outlined`}}))());function B3(){return B3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,B3({},e,{ref:t,icon:z3.default}))),H3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z`}}]},name:`mail`,theme:`outlined`}}))());function U3(){return U3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,U3({},e,{ref:t,icon:H3.default}))),G3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M839.2 278.1a32 32 0 00-30.4-22.1H736V144c0-17.7-14.3-32-32-32H320c-17.7 0-32 14.3-32 32v112h-72.8a31.9 31.9 0 00-30.4 22.1L112 502v378c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V502l-72.8-223.9zM360 184h304v72H360v-72zm480 656H184V513.4L244.3 328h535.4L840 513.4V840zM652 572H544V464c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v108H372c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h108v108c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V636h108c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z`}}]},name:`medicine-box`,theme:`outlined`}}))());function K3(){return K3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,K3({},e,{ref:t,icon:G3.default}))),J3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`mobile`,theme:`outlined`}}))());function Y3(){return Y3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,Y3({},e,{ref:t,icon:J3.default}))),Z3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M692.8 412.7l.2-.2-34.6-44.3a7.97 7.97 0 00-11.2-1.4l-50.4 39.3-70.5-90.1a7.97 7.97 0 00-11.2-1.4l-37.9 29.7a7.97 7.97 0 00-1.4 11.2l70.5 90.2-.2.1 34.6 44.3c2.7 3.5 7.7 4.1 11.2 1.4l50.4-39.3 64.1 82c2.7 3.5 7.7 4.1 11.2 1.4l37.9-29.6c3.5-2.7 4.1-7.7 1.4-11.2l-64.1-82.1zM608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5L114.3 856.1a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6C473 696.1 537.7 720 608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644s-118.2-23.7-161.2-66.8C403.7 534.2 380 476.9 380 416s23.7-118.2 66.8-161.2c43-43.1 100.3-66.8 161.2-66.8s118.2 23.7 161.2 66.8c43.1 43 66.8 100.3 66.8 161.2s-23.7 118.2-66.8 161.2z`}}]},name:`monitor`,theme:`outlined`}}))());function Q3(){return Q3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,Q3({},e,{ref:t,icon:Z3.default}))),e6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={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 64zm-80 600c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V360c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v304zm224 0c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V360c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v304z`}}]},name:`pause-circle`,theme:`filled`}}))());function t6(){return t6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,t6({},e,{ref:t,icon:e6.default}))),r6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={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 372zm159.6-585h-59.5c-3 0-5.8 1.7-7.1 4.4l-90.6 180H511l-90.6-180a8 8 0 00-7.1-4.4h-60.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.9L457 515.7h-61.4c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V603h-81.7c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V717c0 4.4 3.6 8 8 8h54.3c4.4 0 8-3.6 8-8v-68.1h82c4.4 0 8-3.6 8-8V611c0-4.4-3.6-8-8-8h-82v-41.5h82c4.4 0 8-3.6 8-8v-29.9c0-4.4-3.6-8-8-8h-62l111.1-204.8c.6-1.2 1-2.5 1-3.8-.1-4.4-3.7-8-8.1-8z`}}]},name:`pay-circle`,theme:`outlined`}}))());function i6(){return i6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,i6({},e,{ref:t,icon:r6.default}))),o6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M877.1 238.7L770.6 132.3c-13-13-30.4-20.3-48.8-20.3s-35.8 7.2-48.8 20.3L558.3 246.8c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l89.6 89.7a405.46 405.46 0 01-86.4 127.3c-36.7 36.9-79.6 66-127.2 86.6l-89.6-89.7c-13-13-30.4-20.3-48.8-20.3a68.2 68.2 0 00-48.8 20.3L132.3 673c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l106.4 106.4c22.2 22.2 52.8 34.9 84.2 34.9 6.5 0 12.8-.5 19.2-1.6 132.4-21.8 263.8-92.3 369.9-198.3C818 606 888.4 474.6 910.4 342.1c6.3-37.6-6.3-76.3-33.3-103.4zm-37.6 91.5c-19.5 117.9-82.9 235.5-178.4 331s-213 158.9-330.9 178.4c-14.8 2.5-30-2.5-40.8-13.2L184.9 721.9 295.7 611l119.8 120 .9.9 21.6-8a481.29 481.29 0 00285.7-285.8l8-21.6-120.8-120.7 110.8-110.9 104.5 104.5c10.8 10.8 15.8 26 13.3 40.8z`}}]},name:`phone`,theme:`outlined`}}))());function s6(){return s6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,s6({},e,{ref:t,icon:o6.default}))),l6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`}}]},name:`picture`,theme:`outlined`}}))());function u6(){return u6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,u6({},e,{ref:t,icon:l6.default}))),f6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 518H506V160c0-4.4-3.6-8-8-8h-26a398.46 398.46 0 00-282.8 117.1 398.19 398.19 0 00-85.7 127.1A397.61 397.61 0 0072 552a398.46 398.46 0 00117.1 282.8c36.7 36.7 79.5 65.6 127.1 85.7A397.61 397.61 0 00472 952a398.46 398.46 0 00282.8-117.1c36.7-36.7 65.6-79.5 85.7-127.1A397.61 397.61 0 00872 552v-26c0-4.4-3.6-8-8-8zM705.7 787.8A331.59 331.59 0 01470.4 884c-88.1-.4-170.9-34.9-233.2-97.2C174.5 724.1 140 640.7 140 552c0-88.7 34.5-172.1 97.2-234.8 54.6-54.6 124.9-87.9 200.8-95.5V586h364.3c-7.7 76.3-41.3 147-96.6 201.8zM952 462.4l-2.6-28.2c-8.5-92.1-49.4-179-115.2-244.6A399.4 399.4 0 00589 74.6L560.7 72c-4.7-.4-8.7 3.2-8.7 7.9V464c0 4.4 3.6 8 8 8l384-1c4.7 0 8.4-4 8-8.6zm-332.2-58.2V147.6a332.24 332.24 0 01166.4 89.8c45.7 45.6 77 103.6 90 166.1l-256.4.7z`}}]},name:`pie-chart`,theme:`outlined`}}))());function p6(){return p6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,p6({},e,{ref:t,icon:f6.default}))),h6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={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 64zm144.1 454.9L437.7 677.8a8.02 8.02 0 01-12.7-6.5V353.7a8 8 0 0112.7-6.5L656.1 506a7.9 7.9 0 010 12.9z`}}]},name:`play-circle`,theme:`filled`}}))());function g6(){return g6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,g6({},e,{ref:t,icon:h6.default}))),v6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={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`}}))());function y6(){return y6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,y6({},e,{ref:t,icon:v6.default}))),x6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z`}},{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}}]},name:`plus-circle`,theme:`outlined`}}))());function S6(){return S6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,S6({},e,{ref:t,icon:x6.default}))),w6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 161H699.2c-49.1 0-97.1 14.1-138.4 40.7L512 233l-48.8-31.3A255.2 255.2 0 00324.8 161H96c-17.7 0-32 14.3-32 32v568c0 17.7 14.3 32 32 32h228.8c49.1 0 97.1 14.1 138.4 40.7l44.4 28.6c1.3.8 2.8 1.3 4.3 1.3s3-.4 4.3-1.3l44.4-28.6C602 807.1 650.1 793 699.2 793H928c17.7 0 32-14.3 32-32V193c0-17.7-14.3-32-32-32zM324.8 721H136V233h188.8c35.4 0 69.8 10.1 99.5 29.2l48.8 31.3 6.9 4.5v462c-47.6-25.6-100.8-39-155.2-39zm563.2 0H699.2c-54.4 0-107.6 13.4-155.2 39V298l6.9-4.5 48.8-31.3c29.7-19.1 64.1-29.2 99.5-29.2H888v488zM396.9 361H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm223.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c0-4.1-3.2-7.5-7.1-7.5H627.1c-3.9 0-7.1 3.4-7.1 7.5zM396.9 501H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm416 0H627.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5z`}}]},name:`read`,theme:`outlined`}}))());function T6(){return T6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,T6({},e,{ref:t,icon:w6.default}))),D6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M508 704c79.5 0 144-64.5 144-144s-64.5-144-144-144-144 64.5-144 144 64.5 144 144 144zm0-224c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z`}},{tag:`path`,attrs:{d:`M832 256h-28.1l-35.7-120.9c-4-13.7-16.5-23.1-30.7-23.1h-451c-14.3 0-26.8 9.4-30.7 23.1L220.1 256H192c-17.7 0-32 14.3-32 32v28c0 4.4 3.6 8 8 8h45.8l47.7 558.7a32 32 0 0031.9 29.3h429.2a32 32 0 0031.9-29.3L802.2 324H856c4.4 0 8-3.6 8-8v-28c0-17.7-14.3-32-32-32zm-518.6-76h397.2l22.4 76H291l22.4-76zm376.2 664H326.4L282 324h451.9l-44.3 520z`}}]},name:`rest`,theme:`outlined`}}))());function O6(){return O6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,O6({},e,{ref:t,icon:D6.default}))),A6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`robot`,theme:`outlined`}}))());function j6(){return j6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,j6({},e,{ref:t,icon:A6.default}))),N6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 00-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0043.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0043.1-30.5 97.52 97.52 0 0021.4-60.8c0-8.4-1.1-16.4-3.1-23.8H864zM762.3 621.4c9.4 14.6 17 30.3 22.5 46.6H700V558.7a211.6 211.6 0 0162.3 62.7zM388 483.1V318.8l124-147 124 147V668H388V483.1zM239.2 668c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668h-84.8zm388.9 116.2c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5-38.3 0-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 01-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM464 400a48 48 0 1096 0 48 48 0 10-96 0z`}}]},name:`rocket`,theme:`outlined`}}))());function P6(){return P6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,P6({},e,{ref:t,icon:N6.default}))),I6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z`}},{tag:`path`,attrs:{d:`M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z`}}]},name:`safety`,theme:`outlined`}}))());function L6(){return L6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,L6({},e,{ref:t,icon:I6.default}))),z6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zM402.9 528.8l-77.5 77.5a8.03 8.03 0 000 11.3l34 34c3.1 3.1 8.2 3.1 11.3 0l77.5-77.5c55.7 35.1 130.1 28.4 178.6-20.1 56.3-56.3 56.3-147.5 0-203.8-56.3-56.3-147.5-56.3-203.8 0-48.5 48.5-55.2 123-20.1 178.6zm65.4-133.3c31.3-31.3 82-31.3 113.2 0 31.3 31.3 31.3 82 0 113.2-31.3 31.3-82 31.3-113.2 0s-31.3-81.9 0-113.2z`}}]},name:`security-scan`,theme:`outlined`}}))());function B6(){return B6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,B6({},e,{ref:t,icon:z6.default}))),H6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z`}}]},name:`send`,theme:`outlined`}}))());function U6(){return U6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,U6({},e,{ref:t,icon:H6.default}))),G6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z`}}]},name:`setting`,theme:`outlined`}}))());function K6(){return K6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,K6({},e,{ref:t,icon:G6.default}))),J6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z`}}]},name:`shopping-cart`,theme:`outlined`}}))());function Y6(){return Y6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,Y6({},e,{ref:t,icon:J6.default}))),Z6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 312H696v-16c0-101.6-82.4-184-184-184s-184 82.4-184 184v16H192c-17.7 0-32 14.3-32 32v536c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V344c0-17.7-14.3-32-32-32zm-432-16c0-61.9 50.1-112 112-112s112 50.1 112 112v16H400v-16zm392 544H232V384h96v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h224v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h96v456z`}}]},name:`shopping`,theme:`outlined`}}))());function Q6(){return Q6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,Q6({},e,{ref:t,icon:Z6.default}))),e8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M925.6 405.1l-203-253.7a6.5 6.5 0 00-5-2.4H306.4c-1.9 0-3.8.9-5 2.4l-203 253.7a6.5 6.5 0 00.2 8.3l408.6 459.5c1.2 1.4 3 2.1 4.8 2.1 1.8 0 3.5-.8 4.8-2.1l408.6-459.5a6.5 6.5 0 00.2-8.3zM645.2 206.4l34.4 133.9-132.5-133.9h98.1zm8.2 178.5H370.6L512 242l141.4 142.9zM378.8 206.4h98.1L344.3 340.3l34.5-133.9zm-53.4 7l-44.1 171.5h-93.1l137.2-171.5zM194.6 434.9H289l125.8 247.7-220.2-247.7zM512 763.4L345.1 434.9h333.7L512 763.4zm97.1-80.8L735 434.9h94.4L609.1 682.6zm133.6-297.7l-44.1-171.5 137.2 171.5h-93.1z`}}]},name:`sketch`,theme:`outlined`}}))());function t8(){return t8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,t8({},e,{ref:t,icon:e8.default}))),r8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M870 126H663.8c-17.4 0-32.9 11.9-37 29.3C614.3 208.1 567 246 512 246s-102.3-37.9-114.8-90.7a37.93 37.93 0 00-37-29.3H154a44 44 0 00-44 44v252a44 44 0 0044 44h75v388a44 44 0 0044 44h478a44 44 0 0044-44V466h75a44 44 0 0044-44V170a44 44 0 00-44-44zm-28 268H723v432H301V394H182V198h153.3c28.2 71.2 97.5 120 176.7 120s148.5-48.8 176.7-120H842v196z`}}]},name:`skin`,theme:`outlined`}}))());function i8(){return i8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,i8({},e,{ref:t,icon:r8.default}))),o8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z`}}]},name:`smile`,theme:`outlined`}}))());function s8(){return s8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,s8({},e,{ref:t,icon:o8.default}))),l8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M688 264c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48zm-8 136H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM480 544H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 308H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm356.8-74.4c29-26.3 47.2-64.3 47.2-106.6 0-79.5-64.5-144-144-144s-144 64.5-144 144c0 42.3 18.2 80.3 47.2 106.6-57 32.5-96.2 92.7-99.2 162.1-.2 4.5 3.5 8.3 8 8.3h48.1c4.2 0 7.7-3.3 8-7.6C564 871.2 621.7 816 692 816s128 55.2 131.9 124.4c.2 4.2 3.7 7.6 8 7.6H880c4.6 0 8.2-3.8 8-8.3-2.9-69.5-42.2-129.6-99.2-162.1zM692 591c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z`}}]},name:`solution`,theme:`outlined`}}))());function u8(){return u8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,u8({},e,{ref:t,icon:l8.default}))),f8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1zM586 803L293.4 611.7l-18-11.7H146V424h129.4l17.9-11.7L586 221v582zm348-327H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zm-41.9 261.8l-110.3-63.7a15.9 15.9 0 00-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0021.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM760 344a15.9 15.9 0 0021.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 00-21.7-5.9L746 287.8a15.99 15.99 0 00-5.8 21.8L760 344z`}}]},name:`sound`,theme:`outlined`}}))());function p8(){return p8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,p8({},e,{ref:t,icon:f8.default}))),h8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z`}}]},name:`star`,theme:`outlined`}}))());function g8(){return g8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,g8({},e,{ref:t,icon:h8.default}))),v8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z`}}]},name:`sync`,theme:`outlined`}}))());function y8(){return y8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,y8({},e,{ref:t,icon:v8.default}))),x8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M938 458.8l-29.6-312.6c-1.5-16.2-14.4-29-30.6-30.6L565.2 86h-.4c-3.2 0-5.7 1-7.6 2.9L88.9 557.2a9.96 9.96 0 000 14.1l363.8 363.8c1.9 1.9 4.4 2.9 7.1 2.9s5.2-1 7.1-2.9l468.3-468.3c2-2.1 3-5 2.8-8zM459.7 834.7L189.3 564.3 589 164.6 836 188l23.4 247-399.7 399.7zM680 256c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm0 120c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z`}}]},name:`tag`,theme:`outlined`}}))());function S8(){return S8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,S8({},e,{ref:t,icon:x8.default}))),w8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z`}}]},name:`team`,theme:`outlined`}}))());function T8(){return T8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,T8({},e,{ref:t,icon:w8.default}))),D8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z`}}]},name:`thunderbolt`,theme:`outlined`}}))());function O8(){return O8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,O8({},e,{ref:t,icon:D8.default}))),A8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z`}}]},name:`tool`,theme:`outlined`}}))());function j8(){return j8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,j8({},e,{ref:t,icon:A8.default}))),N8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 160h-92v-40c0-4.4-3.6-8-8-8H256c-4.4 0-8 3.6-8 8v40h-92a44 44 0 00-44 44v148c0 81.7 60 149.6 138.2 162C265.7 630.2 359 721.7 476 734.5v105.2H280c-17.7 0-32 14.3-32 32V904c0 4.4 3.6 8 8 8h512c4.4 0 8-3.6 8-8v-32.3c0-17.7-14.3-32-32-32H548V734.5C665 721.7 758.3 630.2 773.8 514 852 501.6 912 433.7 912 352V204a44 44 0 00-44-44zM184 352V232h64v207.6a91.99 91.99 0 01-64-87.6zm520 128c0 49.1-19.1 95.4-53.9 130.1-34.8 34.8-81 53.9-130.1 53.9h-16c-49.1 0-95.4-19.1-130.1-53.9-34.8-34.8-53.9-81-53.9-130.1V184h384v296zm136-128c0 41-26.9 75.8-64 87.6V232h64v120z`}}]},name:`trophy`,theme:`outlined`}}))());function P8(){return P8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,P8({},e,{ref:t,icon:N8.default}))),I8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M608 192a32 32 0 0132 32v160h174.81a32 32 0 0126.68 14.33l113.19 170.84a32 32 0 015.32 17.68V672a32 32 0 01-32 32h-96c0 70.7-57.3 128-128 128s-128-57.3-128-128H384c0 70.7-57.3 128-128 128s-128-57.3-128-128H96a32 32 0 01-32-32V224a32 32 0 0132-32zM256 640a64 64 0 000 128h1.06A64 64 0 00256 640m448 0a64 64 0 000 128h1.06A64 64 0 00704 640M576 256H128v384h17.12c22.13-38.26 63.5-64 110.88-64 47.38 0 88.75 25.74 110.88 64H576zm221.63 192H640v145.12A127.43 127.43 0 01704 576c47.38 0 88.75 25.74 110.88 64H896v-43.52zM500 448a12 12 0 0112 12v40a12 12 0 01-12 12H332a12 12 0 01-12-12v-40a12 12 0 0112-12zM308 320a12 12 0 0112 12v40a12 12 0 01-12 12H204a12 12 0 01-12-12v-40a12 12 0 0112-12z`}}]},name:`truck`,theme:`outlined`}}))());function L8(){return L8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,L8({},e,{ref:t,icon:I8.default}))),z8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`upload`,theme:`outlined`}}))());function B8(){return B8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,B8({},e,{ref:t,icon:z8.default}))),H8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z`}}]},name:`user`,theme:`outlined`}}))());function U8(){return U8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,U8({},e,{ref:t,icon:H8.default}))),G8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v576c0 35.3 28.7 64 64 64h592c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM712 792H136V232h576v560zm176-167l-104-59.8V458.9L888 399v226zM208 360h112c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H208c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}}]},name:`video-camera`,theme:`outlined`}}))());function K8(){return K8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,K8({},e,{ref:t,icon:G8.default}))),J8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 464H528V448h312v128zm0 264H184V184h656v200H496c-17.7 0-32 14.3-32 32v192c0 17.7 14.3 32 32 32h344v200zM580 512a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`wallet`,theme:`outlined`}}))());function Y8(){return Y8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,Y8({},e,{ref:t,icon:J8.default}))),Z8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z`}}]},name:`warning`,theme:`outlined`}}))());function Q8(){return Q8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,Q8({},e,{ref:t,icon:Z8.default}))),e5=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M690.1 377.4c5.9 0 11.8.2 17.6.5-24.4-128.7-158.3-227.1-319.9-227.1C209 150.8 64 271.4 64 420.2c0 81.1 43.6 154.2 111.9 203.6a21.5 21.5 0 019.1 17.6c0 2.4-.5 4.6-1.1 6.9-5.5 20.3-14.2 52.8-14.6 54.3-.7 2.6-1.7 5.2-1.7 7.9 0 5.9 4.8 10.8 10.8 10.8 2.3 0 4.2-.9 6.2-2l70.9-40.9c5.3-3.1 11-5 17.2-5 3.2 0 6.4.5 9.5 1.4 33.1 9.5 68.8 14.8 105.7 14.8 6 0 11.9-.1 17.8-.4-7.1-21-10.9-43.1-10.9-66 0-135.8 132.2-245.8 295.3-245.8zm-194.3-86.5c23.8 0 43.2 19.3 43.2 43.1s-19.3 43.1-43.2 43.1c-23.8 0-43.2-19.3-43.2-43.1s19.4-43.1 43.2-43.1zm-215.9 86.2c-23.8 0-43.2-19.3-43.2-43.1s19.3-43.1 43.2-43.1 43.2 19.3 43.2 43.1-19.4 43.1-43.2 43.1zm586.8 415.6c56.9-41.2 93.2-102 93.2-169.7 0-124-120.8-224.5-269.9-224.5-149 0-269.9 100.5-269.9 224.5S540.9 847.5 690 847.5c30.8 0 60.6-4.4 88.1-12.3 2.6-.8 5.2-1.2 7.9-1.2 5.2 0 9.9 1.6 14.3 4.1l59.1 34c1.7 1 3.3 1.7 5.2 1.7a9 9 0 006.4-2.6 9 9 0 002.6-6.4c0-2.2-.9-4.4-1.4-6.6-.3-1.2-7.6-28.3-12.2-45.3-.5-1.9-.9-3.8-.9-5.7.1-5.9 3.1-11.2 7.6-14.5zM600.2 587.2c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9c0 19.8-16.2 35.9-36 35.9zm179.9 0c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9a36.08 36.08 0 01-36 35.9z`}}]},name:`wechat`,theme:`outlined`}}))());function t5(){return t5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,t5({},e,{ref:t,icon:e5.default}))),r5=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M921 912L601.11 445.75l.55.43L890.08 112H793.7L558.74 384 372.15 112H119.37l298.65 435.31-.04-.04L103 912h96.39L460.6 609.38 668.2 912zM333.96 184.73l448.83 654.54H706.4L257.2 184.73z`}}]},name:`x`,theme:`outlined`}}))());function i5(){return i5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,i5({},e,{ref:t,icon:r5.default}))),o5=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},s5=(e=>e?o5(e):o5),c5=e=>e;function l5(e,t=c5){let n=S.useSyncExternalStore(e.subscribe,S.useCallback(()=>t(e.getState()),[e,t]),S.useCallback(()=>t(e.getInitialState()),[e,t]));return S.useDebugValue(n),n}var u5=e=>{let t=s5(e),n=e=>l5(t,e);return Object.assign(n,t),n},d5=(e=>e?u5(e):u5),f5=`AES-GCM`,p5=12,m5=128;async function h5(){throw Error(`VITE_ENCRYPTION_KEY not configured`)}async function g5(e){let t=await h5(),n=crypto.getRandomValues(new Uint8Array(p5)),r=new TextEncoder().encode(e),i=await crypto.subtle.encrypt({name:f5,iv:n,tagLength:m5},t,r),a=new Uint8Array(i),o=new Uint8Array(n.length+a.length);return o.set(n),o.set(a,n.length),btoa(String.fromCharCode(...o))}async function _5(e){let t=await h5(),n=Uint8Array.from(atob(e),e=>e.charCodeAt(0)),r=n.slice(0,p5),i=n.slice(p5),a=await crypto.subtle.decrypt({name:f5,iv:r,tagLength:m5},t,i);return new TextDecoder().decode(a)}var v5=`http://ceshi.apiforeign.minzhong.cn`,y5=!1;function b5(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}function x5(e){return Array.isArray(e)?e.map(x5):typeof e==`object`&&e?Object.fromEntries(Object.entries(e).map(([e,t])=>[b5(e),x5(t)])):e}function S5(){return localStorage.getItem(`auth_token`)}function C5(e){localStorage.setItem(`auth_token`,e)}function w5(){localStorage.removeItem(`auth_token`)}async function T5(e){try{return await _5(e)}catch{return null}}async function E5(e,t={}){let{method:n=`GET`,body:r,auth:i=!0,encryptBody:a=y5,signal:o}=t,s={"Content-Type":`application/json`};if(i){let e=S5();e&&(s.Authorization=`Bearer ${e}`)}let c;if(r!==void 0){let e=JSON.stringify(r);a?(s[`X-Encrypted`]=`true`,c=JSON.stringify({data:await g5(e)})):c=e}let l=await fetch(`${v5}/api${e}`,{method:n,headers:s,body:c,signal:o});if(l.status===204)return;let u=await l.text();if(!u)return;let d;try{d=JSON.parse(u)}catch{throw Error(`响应解析失败 (${l.status})`)}if(d&&typeof d.data==`string`&&a){let e=await T5(d.data);e!==null&&(d=JSON.parse(e))}if(!l.ok){let e=d?.detail||`请求失败 (${l.status})`;throw l.status===401&&!t.skipAuthRedirect&&(w5(),window.location.href=`/login`),Error(e)}return x5(d)}var D5={get:(e,t=!0)=>E5(e,typeof t==`boolean`?{auth:t}:t),post:(e,t,n=!0,r=!1)=>E5(e,{method:`POST`,body:t,auth:n,skipAuthRedirect:r}),put:(e,t,n=!0)=>E5(e,{method:`PUT`,body:t,auth:n}),delete:(e,t=!0)=>E5(e,{method:`DELETE`,auth:t})};async function O5(e,t,n,r){let i=await D5.post(`/auth/login`,{username:e,password:t,captcha_token:n,remember_me:r||!1},!1,!0);return C5(i.accessToken),i.user}async function k5(e,t){let n=await D5.post(`/auth/sms-login`,{phone:e,code:t},!1,!0);return C5(n.accessToken),n.user}async function A5(e,t,n){let r=await D5.post(`/auth/register`,{phone:e,code:t,password:n},!1);return C5(r.accessToken),r.user}async function j5(){await D5.post(`/auth/logout`),w5()}async function M5(){try{return await D5.get(`/auth/me`)}catch{return null}}async function N5(e,t){await D5.post(`/auth/change-password`,{old_password:e,new_password:t})}async function P5(){return D5.get(`/projects`)}async function F5(e,t){return D5.post(`/projects`,{name:e,industry:t})}async function I5(e){await D5.delete(`/projects/${e}`)}async function L5(e={}){let t=e.page&&e.page>0?e.page:1,n=e.pageSize&&e.pageSize>0?e.pageSize:10,r=new URLSearchParams;return e.projectId&&r.set(`project_id`,e.projectId),e.status&&r.set(`status`,e.status),r.set(`page`,String(t)),r.set(`page_size`,String(n)),D5.get(`/generation-records?${r.toString()}`,{signal:e.signal})}async function R5(e,t){return D5.post(`/generation-records/optimize`,{project_id:e,gen_type:t.genType,prompt:t.prompt,duration:t.duration,references:t.references||null,idempotency_key:t.idempotencyKey||null,image_size:t.image_size||null,image_proportion:t.image_proportion||null,image_px:t.image_px||null})}async function z5(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/generation-records/upload-image`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok)throw Error(`图片上传失败`);let i=await r.json();return{url:i.url,filename:i.filename}}async function B5(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/generation-records/upload-video`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok)throw Error(`视频上传失败`);let i=await r.json();return{url:i.url,filename:i.filename}}async function V5(e){await D5.post(`/generation-records/delete-file?url=${encodeURIComponent(e)}`)}async function H5(e,t){await D5.put(`/generation-records/${e}/prompt`,{optimized_prompt:t})}async function U5(e,t){return D5.post(`/generation-records/${e}/generate`,{aspect_ratio:t.aspectRatio,resolution:t.resolution})}async function W5(e=1,t=20){let n=new URLSearchParams;return n.set(`page`,String(e)),n.set(`page_size`,String(t)),D5.get(`/credits?${n.toString()}`)}async function G5(){return D5.get(`/auth/site-info`,!1)}async function K5(){return D5.get(`/video-engines`)}async function q5(){return D5.get(`/image-engines`)}async function J5(e,t){await D5.post(`/sms/send`,{phone:e,scene:t},!1)}async function Y5(e=1,t=20,n){let r=new URLSearchParams;return r.set(`page`,String(e)),r.set(`page_size`,String(t)),n!==void 0&&r.set(`is_read`,String(n)),D5.get(`/notifications?${r.toString()}`)}async function X5(){return(await D5.get(`/notifications/unread-count`)).count}async function Z5(e){await D5.put(`/notifications/${e}/read`)}async function Q5(){return(await D5.get(`/industries`)).map(e=>{let t=(Array.isArray(e.skills)?e.skills:[]).filter(e=>e&&e.type===`option_group`&&e.name&&Array.isArray(e.options)).map(e=>({name:e.name,options:e.options}));return{...e,optionGroups:t}})}async function $5(){return D5.get(`/menu-configs`)}async function e7(){return D5.get(`/recharge-packages`)}async function t7(){return D5.get(`/payments/methods`)}async function n7(e,t=`wechat`){return D5.post(`/payments/recharge`,{plan:e,method:t})}async function r7(e=1,t=20){let n=new URLSearchParams;return n.set(`page`,String(e)),n.set(`page_size`,String(t)),D5.get(`/payments/orders?${n.toString()}`)}async function i7(e){return D5.get(`/payments/orders/${e}`)}async function a7(e){return D5.post(`/payments/orders/${e}/cancel`)}async function o7(){return D5.get(`/credits/ratios`)}async function s7(){return D5.get(`/generation-ai/engines`)}async function c7(e){return D5.post(`/generation-ai/tasks`,e)}async function l7(e){return D5.get(`/generation-ai/tasks?page=`+e.page+`&page_size=`+e.pageSize)}async function u7(e){return D5.get(`/generation-ai/history`+e)}async function d7(e){return D5.get(`/generation-ai/history/`+e)}async function f7(e){await D5.delete(`/generation-ai/tasks/${e}`)}async function p7(){return D5.get(`/credits/credit-ratios`)}async function m7(e){return D5.post(`/hot-opening-replications/tasks`,e)}async function h7(e,t,n){let r=`/hot-opening-replications/tasks?page=${e}&page_size=${t}`;return n&&(r+=`&keyword=${encodeURIComponent(n)}`),D5.get(r)}async function g7(e){return D5.get(`/hot-opening-replications/tasks/${e}`)}async function _7(e,t){return D5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-image-prompt`)}async function v7(e,t,n){return D5.put(`/hot-opening-replications/tasks/${e}/steps/${t}/image-prompt`,n)}async function y7(e,t,n){return D5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-image`,n)}async function b7(e,t,n){return D5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-video-prompt`,n)}async function x7(e,t,n){return D5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-video`,n)}async function S7(e){return D5.post(`/user-oauth/request_oauth`,e)}async function C7(e){let t=new URLSearchParams;return t.set(`auth_code`,e.auth_code),t.set(`state`,e.state),e.app_id&&t.set(`app_id`,e.app_id),e.material_auth_status&&t.set(`material_auth_status`,e.material_auth_status),e.scope&&t.set(`scope`,e.scope),e.uid&&t.set(`uid`,e.uid),D5.get(`/user-oauth/juliang_callback?${t.toString()}`)}async function w7(e){let t=new URLSearchParams;return e.account_userid&&t.set(`account_userid`,e.account_userid),e.open_type!==void 0&&t.set(`open_type`,String(e.open_type)),e.account_id&&t.set(`account_id`,e.account_id),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),D5.get(`/user-oauth/oauth_list?${t.toString()}`)}async function T7(e){let t=e?.page||1,n=Math.min(e?.pageSize||10,100);return D5.get(`/pre-test-template/list?page=${t}&page_size=${n}`)}async function E7(e){return D5.post(`/pre-test-template/create`,e)}async function D7(e,t,n){return D5.put(`/hot-opening-replications/tasks/${e}/steps/${t}/video-prompt-schema`,n)}async function O7(e){return D5.post(`/shot-replications/task-sets`,e)}async function k7(e,t,n){let r=n?`/shot-replications/task-sets?page=${e}&page_size=${t}&keyword=${encodeURIComponent(n)}`:`/shot-replications/task-sets?page=${e}&page_size=${t}`;return D5.get(r)}async function A7(e){return D5.get(`/shot-replications/task-sets/${e}`)}async function j7(e,t){return D5.post(`/shot-replications/task-sets/${e}/split-by-ai`,t)}async function M7(e,t){return D5.post(`/shot-replications/task-sets/${e}/split-custom`,t)}async function N7(e){return D5.get(`/shot-replications/task-sets/${e}/segments`)}async function P7(e,t){return D5.post(`/shot-replications/segments/${e}/replication-projects`,t)}async function F7(e){return D5.get(`/shot-replications/projects/${e}`)}async function I7(e,t){return D5.post(`/shot-replications/projects/${e}/steps/${t}/generate-image-prompt`)}async function L7(e,t,n){return D5.put(`/shot-replications/projects/${e}/steps/${t}/image-prompt`,n)}async function R7(e,t,n){return D5.put(`/shot-replications/projects/${e}/steps/${t}/video-prompt-schema`,n)}async function z7(e,t,n){return D5.post(`/shot-replications/projects/${e}/steps/${t}/generate-image`,n)}async function B7(e,t,n){return D5.post(`/shot-replications/projects/${e}/steps/${t}/generate-video-prompt`,n)}async function V7(e,t,n){return D5.post(`/shot-replications/projects/${e}/steps/${t}/generate-video`,n)}async function H7(e){let t=new URLSearchParams;return e?.level&&t.set(`level`,e.level),e?.parent_code&&t.set(`parent_code`,e.parent_code),D5.get(`/pre-test-template/getArea?${t.toString()}`)}async function U7(e){return D5.post(`/upload-material/async-batch-upload`,e)}async function W7(e){let t=new URLSearchParams;e.status&&t.set(`status`,e.status),e.page&&t.set(`page`,String(e.page)),e.pageSize&&t.set(`page_size`,String(e.pageSize));let n=t.toString();return D5.get(`/upload-material/upload-history${n?`?${n}`:``}`)}async function G7(e){return D5.post(`/upload-material/batch-update-filename`,e)}async function K7(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.consume_date!==void 0&&t.set(`consume_date`,e.consume_date[0]+`,`+e.consume_date[1]),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),D5.get(`/material-consumption/list?${t.toString()}`)}async function q7(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.date&&t.set(`date`,e.date),D5.get(`/material-consumption/sync?${t.toString()}`)}async function J7(){return D5.get(`/material-consumption/fields`)}async function Y7(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.material_id&&t.set(`material_id`,e.material_id),e.upload_id&&t.set(`upload_id`,e.upload_id),e.file_name&&t.set(`file_name`,e.file_name),e.resource_type&&t.set(`resource_type`,e.resource_type),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),D5.get(`/resources-material/list?${t.toString()}`)}var X7=d5(e=>({user:null,loading:!0,login:async(t,n,r,i)=>{e({user:await O5(t,n,r,i)})},logout:async()=>{await j5(),e({user:null})},checkAuth:async()=>{try{if(!localStorage.getItem(`auth_token`)){e({user:null,loading:!1});return}e({user:await M5(),loading:!1})}catch(t){(t?.message?.includes(`401`)||t?.message?.includes(`Unauthorized`))&&localStorage.removeItem(`auth_token`),e({user:null,loading:!1})}},changePassword:async(e,t)=>{await N5(e,t)},refreshUser:async()=>{try{e({user:await M5()})}catch(e){console.error(`Failed to refresh user:`,e)}}})),Z7=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),$=o(((e,t)=>{t.exports=Z7()}))(),Q7={system:{gradient:`linear-gradient(135deg, #6366f1, #818cf8)`,icon:(0,$.jsx)(k8,{}),label:`系统通知`},credit:{gradient:`linear-gradient(135deg, #f59e0b, #fbbf24)`,icon:(0,$.jsx)(_8,{}),label:`积分通知`},promo:{gradient:`linear-gradient(135deg, #8b5cf6, #a78bfa)`,icon:(0,$.jsx)(c3,{}),label:`活动通知`}},$7=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),o=X7(e=>e.refreshUser),s=(0,S.useCallback)(async()=>{try{let n=(await Y5(1,20,!1)).items||[];r(n),n.length>0&&!e&&(t(!0),a(0))}catch{}},[e]);(0,S.useEffect)(()=>{s();let e=setInterval(s,3e4);return()=>clearInterval(e)},[]);let c=async()=>{let e=n[i];if(e)try{await Z5(e.id)}catch{}if(i{let e=n[i];if(e)try{await Z5(e.id)}catch{}t(!1),r([]),a(0)};if(!e||n.length===0)return null;let u=n[i],d=Q7[u.type]||Q7.system;return(0,$.jsxs)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,zIndex:9999,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(15,15,35,0.6)`,backdropFilter:`blur(8px)`},onClick:l,children:[(0,$.jsxs)(`div`,{onClick:e=>e.stopPropagation(),style:{width:420,borderRadius:20,overflow:`hidden`,boxShadow:`0 32px 80px rgba(0,0,0,0.35)`,animation:`slideUp 0.35s cubic-bezier(0.16,1,0.3,1)`},children:[(0,$.jsxs)(`div`,{style:{background:d.gradient,padding:`28px 28px 24px`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-20,top:-20,width:120,height:120,borderRadius:`50%`,background:`rgba(255,255,255,0.1)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,right:50,bottom:-30,width:80,height:80,borderRadius:`50%`,background:`rgba(255,255,255,0.06)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,position:`relative`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:14,background:`rgba(255,255,255,0.2)`,display:`flex`,alignItems:`center`,justifyContent:`center`,backdropFilter:`blur(4px)`,fontSize:22,color:`#fff`},children:d.icon}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{color:`rgba(255,255,255,0.7)`,fontSize:12,marginBottom:2},children:`新消息通知`}),(0,$.jsx)(`div`,{style:{color:`#fff`,fontSize:17,fontWeight:700},children:u.title})]})]}),(0,$.jsx)(`div`,{onClick:l,style:{width:28,height:28,borderRadius:8,background:`rgba(255,255,255,0.15)`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`background 0.2s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(255,255,255,0.25)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(255,255,255,0.15)`},children:(0,$.jsx)(ku,{style:{color:`#fff`,fontSize:12}})})]})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,padding:`24px 28px 28px`},children:[(0,$.jsx)(`div`,{style:{padding:`18px 20px`,background:`#f8fafc`,borderRadius:14,marginBottom:20,border:`1px solid #f0f0f5`},children:(0,$.jsx)(`div`,{style:{fontSize:14,color:`#334155`,lineHeight:1.8},children:u.content})}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(k$,{color:d.gradient.includes(`#6366f1`)?`#6366f1`:d.gradient.includes(`#f59e0b`)?`#f59e0b`:`#8b5cf6`,style:{borderRadius:6,border:`none`,padding:`2px 10px`,fontSize:12},children:d.label}),n.length>1&&(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#94a3b8`},children:[i+1,` / `,n.length]})]}),(0,$.jsx)(bD,{type:`primary`,onClick:c,style:{borderRadius:10,fontWeight:600,height:38,background:d.gradient,border:`none`,paddingLeft:28,paddingRight:28,boxShadow:`0 6px 16px ${d.gradient.includes(`#6366f1`)?`rgba(99,102,241,0.3)`:d.gradient.includes(`#f59e0b`)?`rgba(245,158,11,0.3)`:`rgba(139,92,246,0.3)`}`},children:`我已知晓`})]}),n.length>1&&(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,gap:6,marginTop:18},children:n.map((e,t)=>(0,$.jsx)(`div`,{style:{width:t===i?22:6,height:6,borderRadius:3,background:t===i?d.gradient.includes(`#6366f1`)?`#6366f1`:d.gradient.includes(`#f59e0b`)?`#f59e0b`:`#8b5cf6`:`#e2e8f0`,transition:`all 0.3s ease`}},t))})]})]}),(0,$.jsx)(`style`,{children:` + `]:{zIndex:10,width:r,margin:`0 ${X(e.marginXXS)}`,fontSize:r,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,color:i,"&:hover":{color:i},svg:{verticalAlign:`baseline`}}},[`${s}-thumbnail, ${s}-thumbnail img`]:{position:`static`,display:`block`,width:`100%`,height:`100%`,objectFit:`contain`},[`${s}-name`]:{display:`none`,textAlign:`center`},[`${s}-file + ${s}-name`]:{position:`absolute`,bottom:e.margin,display:`block`,width:`calc(100% - ${X(a(e.paddingXS).mul(2).equal())})`},[`${s}-uploading`]:{[`&${s}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:`none`}},[`${s}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${X(a(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}},[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:`50%`}}}},W1=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:`rtl`}}},G1=e=>{let{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:{...Vl(e),[t]:{outline:0,"input[type='file']":{cursor:`pointer`}},[`${t}-select`]:{display:`inline-block`},[`${t}-hidden`]:{display:`none`},[`${t}-disabled`]:{color:n,cursor:`not-allowed`}}}},K1=Xl(`Upload`,e=>{let{fontSizeHeading3:t,marginXS:n,lineWidth:r,pictureCardSize:i,calc:a}=e,o=lc(e,{uploadThumbnailSize:a(t).mul(2).equal(),uploadProgressOffset:a(a(n).div(2)).add(r).equal(),uploadPicCardSize:i});return[G1(o),z1(o),H1(o),U1(o),B1(o),V1(o),W1(o),Jh(o)]},e=>({actionsColor:e.colorIcon,pictureCardSize:e.controlHeightLG*2.55})),q1=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:function(e,t){return{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M534 352V136H232v752h560V394H576a42 42 0 01-42-42z`,fill:t}},{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z`,fill:e}}]}},name:`file`,theme:`twotone`}}))());function J1(){return J1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,J1({},e,{ref:t,icon:q1.default}))),X1=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z`}}]},name:`paper-clip`,theme:`outlined`}}))());function Z1(){return Z1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,Z1({},e,{ref:t,icon:X1.default}))),$1=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:function(e,t){return{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z`,fill:e}},{tag:`path`,attrs:{d:`M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z`,fill:t}},{tag:`path`,attrs:{d:`M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z`,fill:t}},{tag:`path`,attrs:{d:`M276 368a28 28 0 1056 0 28 28 0 10-56 0z`,fill:t}},{tag:`path`,attrs:{d:`M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`,fill:e}}]}},name:`picture`,theme:`twotone`}}))());function e0(){return e0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,e0({},e,{ref:t,icon:$1.default})));function n0(e){return{...e,lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e}}function r0(e,t){let n=da(t),r=n.findIndex(({uid:t})=>t===e.uid);return r===-1?n.push(e):n[r]=e,n}function i0(e,t){let n=e.uid===void 0?`name`:`uid`;return t.filter(t=>t[n]===e[n])[0]}function a0(e,t){let n=e.uid===void 0?`name`:`uid`,r=t.filter(t=>t[n]!==e[n]);return r.length===t.length?null:r}var o0=(e=``)=>{let t=e.split(`/`),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[``])[0]},s0=e=>e.indexOf(`image/`)===0,c0=e=>{if(e.type&&!e.thumbUrl)return s0(e.type);let t=e.thumbUrl||e.url||``,n=o0(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n)?!0:!(/^data:/.test(t)||n)},l0=200;function u0(e){return new Promise(t=>{if(!e.type||!s0(e.type)){t(``);return}let n=document.createElement(`canvas`);n.width=l0,n.height=l0,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${l0}px; height: ${l0}px; z-index: 9999; display: none;`,document.body.appendChild(n);let r=n.getContext(`2d`),i=new Image;if(i.onload=()=>{let{width:e,height:a}=i,o=l0,s=l0,c=0,l=0;e>a?(s=l0/e*a,l=-(s-o)/2):(o=l0/a*e,c=-(o-s)/2),r.drawImage(i,c,l,o,s);let u=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(i.src),t(u)},i.crossOrigin=`anonymous`,e.type.startsWith(`image/svg+xml`)){let t=new FileReader;t.onload=()=>{t.result&&typeof t.result==`string`&&(i.src=t.result)},t.readAsDataURL(e)}else if(e.type.startsWith(`image/gif`)){let n=new FileReader;n.onload=()=>{n.result&&t(n.result)},n.readAsDataURL(e)}else i.src=window.URL.createObjectURL(e)})}var d0=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`download`,theme:`outlined`}}))());function f0(){return f0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,f0({},e,{ref:t,icon:d0.default}))),m0=S.forwardRef(({prefixCls:e,className:t,style:n,classNames:r,styles:i,locale:a,listType:o,file:s,items:c,progress:l,iconRender:u,actionIconRender:d,itemRender:f,isImgUrl:p,showPreviewIcon:m,showRemoveIcon:h,showDownloadIcon:g,previewIcon:_,removeIcon:v,downloadIcon:y,extra:b,onPreview:x,onDownload:C,onClose:w},T)=>{let{status:E}=s,[D,O]=S.useState(E);S.useEffect(()=>{E!==`removed`&&O(E)},[E]);let[k,A]=S.useState(!1);S.useEffect(()=>{let e=setTimeout(()=>{A(!0)},300);return()=>{clearTimeout(e)}},[]);let j=u(s),M=S.createElement(`div`,{className:`${e}-icon`},j);if(o===`picture`||o===`picture-card`||o===`picture-circle`)if(D===`uploading`||!s.thumbUrl&&!s.url){let t=Y(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:D!==`uploading`});M=S.createElement(`div`,{className:t},j)}else{let t=p?.(s)?S.createElement(`img`,{src:s.thumbUrl||s.url,alt:s.name,className:`${e}-list-item-image`,crossOrigin:s.crossOrigin}):j,n=Y(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:p&&!p(s)});M=S.createElement(`a`,{className:n,onClick:e=>x(s,e),href:s.url||s.thumbUrl,target:`_blank`,rel:`noopener noreferrer`},t)}let N=Y(`${e}-list-item`,`${e}-list-item-${D}`,r?.item),P=typeof s.linkProps==`string`?JSON.parse(s.linkProps):s.linkProps,F=(typeof h==`function`?h(s):h)?d((typeof v==`function`?v(s):v)||S.createElement(O$,null),()=>w(s),e,a.removeFile,!0):null,I=(typeof g==`function`?g(s):g)&&D===`done`?d((typeof y==`function`?y(s):y)||S.createElement(p0,null),()=>C(s),e,a.downloadFile):null,L=o!==`picture-card`&&o!==`picture-circle`&&S.createElement(`span`,{key:`download-delete`,className:Y(`${e}-list-item-actions`,{picture:o===`picture`})},I,F),R=typeof b==`function`?b(s):b,z=R&&S.createElement(`span`,{className:`${e}-list-item-extra`},R),B=Y(`${e}-list-item-name`),V=s.url?S.createElement(`a`,{key:`view`,target:`_blank`,rel:`noopener noreferrer`,className:B,title:s.name,...P,href:s.url,onClick:e=>x(s,e)},s.name,z):S.createElement(`span`,{key:`view`,className:B,onClick:e=>x(s,e),title:s.name},s.name,z),H=(typeof m==`function`?m(s):m)&&(s.url||s.thumbUrl)?S.createElement(`a`,{href:s.url||s.thumbUrl,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>x(s,e),title:a.previewFile},typeof _==`function`?_(s):_||S.createElement(PG,null)):null,U=(o===`picture-card`||o===`picture-circle`)&&D!==`uploading`&&S.createElement(`span`,{className:`${e}-list-item-actions`},H,D===`done`&&I,F),{getPrefixCls:ee}=S.useContext(ma),te=ee(),ne=S.createElement(`div`,{className:N,style:i?.item},M,V,L,U,k&&S.createElement(Ed,{motionName:`${te}-fade`,visible:D===`uploading`,motionDeadline:2e3},({className:t})=>{let n=`percent`in s?S.createElement(_J,{type:`line`,percent:s.percent,"aria-label":s[`aria-label`],"aria-labelledby":s[`aria-labelledby`],...l}):null;return S.createElement(`div`,{className:Y(`${e}-list-item-progress`,t)},n)})),W=s.response&&typeof s.response==`string`?s.response:s.error?.statusText||s.error?.message||a.uploadError,re=D===`error`?S.createElement($w,{title:W,getPopupContainer:e=>e.parentNode},ne):ne;return S.createElement(`div`,{className:Y(`${e}-list-item-container`,t),style:n,ref:T},f?f(re,s,c,{download:C.bind(null,s),preview:x.bind(null,s),remove:w.bind(null,s)}):re)}),h0=S.forwardRef((e,t)=>{let{listType:n=`text`,previewFile:r=u0,onPreview:i,onDownload:a,onRemove:o,locale:s,iconRender:c,isImageUrl:l=c0,prefixCls:u,items:d=[],showPreviewIcon:f=!0,showRemoveIcon:p=!0,showDownloadIcon:m=!1,removeIcon:h,previewIcon:g,downloadIcon:_,extra:v,progress:y={size:[-1,2],showInfo:!1},appendAction:b,appendActionVisible:x=!0,itemRender:C,disabled:w,classNames:T,styles:E}=e,[,D]=ff(),[O,k]=S.useState(!1),A=[`picture-card`,`picture-circle`].includes(n);S.useEffect(()=>{n.startsWith(`picture`)&&(d||[]).forEach(e=>{!(e.originFileObj instanceof File||e.originFileObj instanceof Blob)||e.thumbUrl!==void 0||(e.thumbUrl=``,r?.(e.originFileObj).then(t=>{e.thumbUrl=t||``,D()}))})},[n,d,r]),S.useEffect(()=>{k(!0)},[]);let j=(e,t)=>{if(i)return t?.preventDefault(),i(e)},M=e=>{typeof a==`function`?a(e):e.url&&window.open(e.url)},N=e=>{o?.(e)},P=e=>{if(c)return c(e,n);let t=e.status===`uploading`;if(n.startsWith(`picture`)){let r=n===`picture`?S.createElement(Xm,null):s.uploading,i=l?.(e)?S.createElement(t0,null):S.createElement(Y1,null);return t?r:i}return t?S.createElement(Xm,null):S.createElement(Q1,null)},F=(e,t,n,r,i)=>{let a={type:`text`,size:`small`,title:r,onClick:n=>{t(),S.isValidElement(e)&&e.props.onClick?.(n)},className:`${n}-list-item-action`,disabled:i?w:!1};return S.isValidElement(e)?S.createElement(E_,{...a,icon:cm(e,{...e.props,onClick:()=>{}})}):S.createElement(E_,{...a},S.createElement(`span`,null,e))};S.useImperativeHandle(t,()=>({handlePreview:j,handleDownload:M}));let{getPrefixCls:I}=S.useContext(ma),L=I(`upload`,u),R=I(),z=Y(`${L}-list`,`${L}-list-${n}`,T?.list),B=S.useMemo(()=>hi(_h(R),[`onAppearEnd`,`onEnterEnd`,`onLeaveEnd`]),[R]),V={...A?{}:B,motionDeadline:2e3,motionName:`${L}-${A?`animate-inline`:`animate`}`,keys:da(d.map(e=>({key:e.uid,file:e}))),motionAppear:O};return S.createElement(`div`,{className:z,style:E?.list},S.createElement(Td,{...V,component:!1},({key:e,file:t,className:r,style:i})=>S.createElement(m0,{key:e,locale:s,prefixCls:L,className:r,style:i,classNames:T,styles:E,file:t,items:d,progress:y,listType:n,isImgUrl:l,showPreviewIcon:f,showRemoveIcon:p,showDownloadIcon:m,removeIcon:h,previewIcon:g,downloadIcon:_,extra:v,iconRender:P,actionIconRender:F,itemRender:C,onPreview:j,onDownload:M,onClose:N})),b&&S.createElement(Ed,{...V,visible:x,forceRender:!0},({className:e,style:t})=>cm(b,n=>({className:Y(n.className,e),style:{...t,pointerEvents:e?`none`:void 0,...n.style}}))))}),g0=`__LIST_IGNORE_${Date.now()}__`,_0=S.forwardRef((e,t)=>{let n=_a(`upload`),{fileList:r,defaultFileList:i,onRemove:a,showUploadList:o=!0,listType:s=`text`,onPreview:c,onDownload:l,onChange:u,onDrop:d,previewFile:f,disabled:p,locale:m,iconRender:h,isImageUrl:g,progress:_,prefixCls:v,className:y,type:b=`select`,children:x,style:C,itemRender:w,maxCount:T,data:E={},multiple:D=!1,hasControlInside:O=!0,action:k=``,accept:A=``,supportServerRender:j=!0,rootClassName:M,styles:N,classNames:P}=e,F=S.useContext(pm),I=p??F,L=e.customRequest||n.customRequest,[R,z]=Wn(i,r),B=R||[],[V,H]=S.useState(`drop`),U=S.useRef(null),ee=S.useRef(null);S.useMemo(()=>{let e=Date.now();(r||[]).forEach((t,n)=>{!t.uid&&!Object.isFrozen(t)&&(t.uid=`__AUTO__${e}_${n}__`)})},[r]);let te=(e,t,n)=>{let r=da(t),i=!1;T===1?r=r.slice(-1):T&&(i=r.length>T,r=r.slice(0,T)),(0,zi.flushSync)(()=>{z(r)});let a={file:e,fileList:r};n&&(a.event=n),(!i||e.status===`removed`||r.some(t=>t.uid===e.uid))&&(0,zi.flushSync)(()=>{u?.(a)})},ne=async(t,n)=>{let{beforeUpload:r}=e,i=t;if(r){let e=await r(t,n);if(e===!1)return!1;if(delete t[g0],e===g0)return Object.defineProperty(t,g0,{value:!0,configurable:!0}),!1;ef(e)&&(i=e)}return i},W=e=>{let t=e.filter(e=>!e.file[g0]);if(!t.length)return;let n=t.map(e=>n0(e.file)),r=da(B);n.forEach(e=>{r=r0(e,r)}),n.forEach((e,n)=>{let i=e;if(t[n].parsedFile)e.status=`uploading`;else{let{originFileObj:t}=e,n;try{n=new File([t],t.name,{type:t.type})}catch{n=new Blob([t],{type:t.type}),n.name=t.name,n.lastModifiedDate=new Date,n.lastModified=new Date().getTime()}n.uid=e.uid,i=n}te(i,r)})},re=(e,t,n)=>{try{typeof e==`string`&&(e=JSON.parse(e))}catch{}if(!i0(t,B))return;let r=n0(t);r.status=`done`,r.percent=100,r.response=e,r.xhr=n,te(r,r0(r,B))},G=(e,t)=>{if(!i0(t,B))return;let n=n0(t);n.status=`uploading`,n.percent=e.percent,te(n,r0(n,B),e)},K=(e,t,n)=>{if(!i0(n,B))return;let r=n0(n);r.error=e,r.response=t,r.status=`error`,te(r,r0(r,B))},q=e=>{let t;Promise.resolve(typeof a==`function`?a(e):a).then(n=>{if(n===!1)return;let r=a0(e,B);r&&(t={...e,status:`removed`},B?.forEach(e=>{let n=t.uid===void 0?`name`:`uid`;e[n]===t[n]&&!Object.isFrozen(e)&&(e.status=`removed`)}),U.current?.abort(t),te(t,r))})},ie=e=>{H(e.type),e.type===`drop`&&d?.(e)};S.useImperativeHandle(t,()=>({onBatchStart:W,onSuccess:re,onProgress:G,onError:K,fileList:B,upload:U.current,nativeElement:ee.current}));let{getPrefixCls:J,direction:ae,className:oe,style:se,classNames:ce,styles:le}=_a(`upload`),ue=J(`upload`,v),de={...e,listType:s,showUploadList:o,type:b,multiple:D,hasControlInside:O,supportServerRender:j,disabled:I},[fe,pe]=xf([ce,P],[le,N],{props:de}),me={onBatchStart:W,onError:K,onProgress:G,onSuccess:re,...e,customRequest:L,data:E,multiple:D,action:k,accept:A,supportServerRender:j,prefixCls:ue,disabled:I,beforeUpload:ne,onChange:void 0,hasControlInside:O};delete me.className,delete me.style,(!x||I)&&delete me.id;let he=`${ue}-wrapper`,[ge,_e]=K1(ue,he),[ve]=qd(`Upload`,Bd.Upload),{showRemoveIcon:ye,showPreviewIcon:be,showDownloadIcon:xe,removeIcon:Se,previewIcon:Ce,downloadIcon:we,extra:Te}=typeof o==`boolean`?{}:o,Ee=ye===void 0?!I:ye,De=(e,t)=>o?S.createElement(h0,{classNames:fe,styles:pe,prefixCls:ue,listType:s,items:B,previewFile:f,onPreview:c,onDownload:l,onRemove:q,showRemoveIcon:Ee,showPreviewIcon:be,showDownloadIcon:xe,removeIcon:Se,previewIcon:Ce,downloadIcon:we,iconRender:h,extra:Te,locale:{...ve,...m},isImageUrl:g,progress:_,appendAction:e,appendActionVisible:t,itemRender:w,disabled:I}):e,Oe=Y(he,y,M,ge,_e,oe,fe.root,{[`${ue}-rtl`]:ae===`rtl`,[`${ue}-picture-card-wrapper`]:s===`picture-card`,[`${ue}-picture-circle-wrapper`]:s===`picture-circle`}),ke={...pe.root},Ae={...se,...C};if(b===`drag`){let e=Y(ge,ue,`${ue}-drag`,{[`${ue}-drag-uploading`]:B.some(e=>e.status===`uploading`),[`${ue}-drag-hover`]:V===`dragover`,[`${ue}-disabled`]:I,[`${ue}-rtl`]:ae===`rtl`},fe.trigger);return S.createElement(`span`,{className:Oe,ref:ee,style:ke},S.createElement(`div`,{className:e,style:{...Ae,...pe.trigger},onDrop:ie,onDragOver:ie,onDragLeave:ie},S.createElement(R1,{...me,ref:U,className:`${ue}-btn`},S.createElement(`div`,{className:`${ue}-drag-container`},x))),De())}let je=Y(ue,`${ue}-select`,{[`${ue}-disabled`]:I,[`${ue}-hidden`]:!x},fe.trigger),Me=S.createElement(`div`,{className:je,style:{...Ae,...pe.trigger}},S.createElement(R1,{...me,ref:U}));return s===`picture-card`||s===`picture-circle`?S.createElement(`span`,{className:Oe,ref:ee,style:ke},De(Me,!!x)):S.createElement(`span`,{className:Oe,ref:ee,style:ke},Me,De())}),v0=S.forwardRef((e,t)=>{let{style:n,height:r,hasControlInside:i=!1,children:a,...o}=e,s={...n,height:r};return S.createElement(_0,{ref:t,hasControlInside:i,...o,style:s,type:`drag`},a)}),y0=_0;y0.Dragger=v0,y0.LIST_IGNORE=g0;var b0=o(((e,t)=>{function n(e){return e&&e.__esModule?e:{default:e}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),x0=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default={items_per_page:`条/页`,jump_to:`跳至`,jump_to_confirm:`确定`,page:`页`,prev_page:`上一页`,next_page:`下一页`,prev_5:`向前 5 页`,next_5:`向后 5 页`,prev_3:`向前 3 页`,next_3:`向后 3 页`,page_size:`页码`}})),S0=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.commonLocale=void 0,e.commonLocale={yearFormat:`YYYY`,dayFormat:`D`,cellMeridiemFormat:`A`,monthBeforeYear:!0}})),C0=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=S0();function n(e){"@babel/helpers - typeof";return n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n(e)}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default={placeholder:`请选择时间`,rangePlaceholder:[`开始时间`,`结束时间`]}})),T0=o((e=>{var t=b0().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(C0()),r=t(w0()),i={lang:{placeholder:`请选择日期`,yearPlaceholder:`请选择年份`,quarterPlaceholder:`请选择季度`,monthPlaceholder:`请选择月份`,weekPlaceholder:`请选择周`,rangePlaceholder:[`开始日期`,`结束日期`],rangeYearPlaceholder:[`开始年份`,`结束年份`],rangeMonthPlaceholder:[`开始月份`,`结束月份`],rangeQuarterPlaceholder:[`开始季度`,`结束季度`],rangeWeekPlaceholder:[`开始周`,`结束周`],...n.default},timePickerLocale:{...r.default}};i.lang.ok=`确定`,e.default=i})),E0=o((e=>{var t=b0().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=t(T0()).default})),D0=o((e=>{var t=b0().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(x0()),r=t(E0()),i=t(T0()),a=t(w0()),o="${label}不是一个有效的${type}";e.default={locale:`zh-cn`,Pagination:n.default,DatePicker:i.default,TimePicker:a.default,Calendar:r.default,global:{placeholder:`请选择`,close:`关闭`,sortable:`可排序`},Table:{filterTitle:`筛选`,filterConfirm:`确定`,filterReset:`重置`,filterEmptyText:`无筛选项`,filterCheckAll:`全选`,filterSearchPlaceholder:`在筛选项中搜索`,emptyText:`暂无数据`,selectAll:`全选当页`,selectInvert:`反选当页`,selectNone:`清空所有`,selectionAll:`全选所有`,sortTitle:`排序`,expand:`展开行`,collapse:`关闭行`,triggerDesc:`点击降序`,triggerAsc:`点击升序`,cancelSort:`取消排序`},Modal:{okText:`确定`,cancelText:`取消`,justOkText:`知道了`},Tour:{Next:`下一步`,Previous:`上一步`,Finish:`结束导览`},Popconfirm:{cancelText:`取消`,okText:`确定`},Transfer:{titles:[``,``],searchPlaceholder:`请输入搜索内容`,itemUnit:`项`,itemsUnit:`项`,remove:`删除`,selectCurrent:`全选当页`,removeCurrent:`删除当页`,selectAll:`全选所有`,deselectAll:`取消全选`,removeAll:`删除全部`,selectInvert:`反选当页`},Upload:{uploading:`文件上传中`,removeFile:`删除文件`,uploadError:`上传错误`,previewFile:`预览文件`,downloadFile:`下载文件`},Empty:{description:`暂无数据`},Icon:{icon:`图标`},Text:{edit:`编辑`,copy:`复制`,copied:`复制成功`,expand:`展开`,collapse:`收起`},Form:{optional:`(可选)`,defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:o,method:o,array:o,object:o,number:o,date:o,boolean:o,integer:o,float:o,regexp:o,email:o,url:o,hex:o},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},QRCode:{expired:`二维码过期`,refresh:`点击刷新`,scanned:`已扫描`},ColorPicker:{presetEmpty:`暂无`,transparent:`无色`,singleColor:`单色`,gradientColor:`渐变色`}}})),O0=c(o(((e,t)=>{t.exports=D0()}))(),1),k0=Object.defineProperty,A0=Object.getOwnPropertySymbols,j0=Object.prototype.hasOwnProperty,M0=Object.prototype.propertyIsEnumerable,N0=(e,t,n)=>t in e?k0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P0=(e,t)=>{for(var n in t||={})j0.call(t,n)&&N0(e,n,t[n]);if(A0)for(var n of A0(t))M0.call(t,n)&&N0(e,n,t[n]);return e},F0=(e,t)=>{var n={};for(var r in e)j0.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&A0)for(var r of A0(e))t.indexOf(r)<0&&M0.call(e,r)&&(n[r]=e[r]);return n},I0;(e=>{let t=class t{constructor(e,n,r,a){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],et.MAX_VERSION)throw RangeError(`Version value out of range`);if(a<-1||a>7)throw RangeError(`Mask value out of range`);this.size=e*4+17;let o=[];for(let e=0;e7)throw RangeError(`Invalid value`);let u,d;for(u=a;;u++){let n=t.getNumDataCodewords(u,r)*8,i=o.getTotalBits(e,u);if(i<=n){d=i;break}if(u>=s)throw RangeError(`Data too long`)}for(let e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=t.getNumDataCodewords(u,e)*8&&(r=e);let f=[];for(let t of e){n(t.mode.modeBits,4,f),n(t.numChars,t.mode.numCharCountBits(u),f);for(let e of t.getData())f.push(e)}i(f.length==d);let p=t.getNumDataCodewords(u,r)*8;i(f.length<=p),n(0,Math.min(4,p-f.length),f),n(0,(8-f.length%8)%8,f),i(f.length%8==0);for(let e=236;f.lengthm[t>>>3]|=e<<7-(t&7)),new t(u,r,m,c)}getModule(e,t){return 0<=e&&e>>9)*1335;let a=(t<<10|n)^21522;i(a>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,r(a,e));this.setFunctionModule(8,7,r(a,6)),this.setFunctionModule(8,8,r(a,7)),this.setFunctionModule(7,8,r(a,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,r(a,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,r(a,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,r(a,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;i(t>>>18==0);for(let e=0;e<18;e++){let n=r(t,e),i=this.size-11+e%3,a=Math.floor(e/3);this.setFunctionModule(i,a,n),this.setFunctionModule(a,i,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){let i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,o=t+n;0<=a&&a{(e!=l-o||n>=c)&&f.push(t[e])});return i(f.length==s),f}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw RangeError(`Invalid argument`);let n=0;for(let t=this.size-1;t>=1;t-=2){t==6&&(t=5);for(let i=0;i>>3],7-(n&7)),n++)}}i(n==e.length*8)}applyMask(e){if(e<0||e>7)throw RangeError(`Mask value out of range`);for(let t=0;t5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[n][o],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;n5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[o][n],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;ne+ +!!t,n);let r=this.size*this.size,a=Math.ceil(Math.abs(n*20-r*10)/r)-1;return i(0<=a&&a<=9),e+=a*t.PENALTY_N4,i(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(this.version==1)return[];{let e=Math.floor(this.version/7)+2,t=this.version==32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,n=[6];for(let r=this.size-7;n.lengtht.MAX_VERSION)throw RangeError(`Version number out of range`);let n=(16*e+128)*e+64;if(e>=2){let t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return i(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw RangeError(`Degree out of range`);let n=[];for(let t=0;t0);for(let i of e){let e=i^r.shift();r.push(0),n.forEach((n,i)=>r[i]^=t.reedSolomonMultiply(n,e))}return r}static reedSolomonMultiply(e,t){if(e>>>8||t>>>8)throw RangeError(`Byte out of range`);let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return i(n>>>8==0),n}finderPenaltyCountPatterns(e){let t=e[1];i(t<=this.size*3);let n=t>0&&e[2]==t&&e[3]==t*3&&e[4]==t&&e[5]==t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){t[0]==0&&(e+=this.size),t.pop(),t.unshift(e)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(e,t,n){if(t<0||t>31||e>>>t)throw RangeError(`Value out of range`);for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function r(e,t){return(e>>>t&1)!=0}function i(e){if(!e)throw Error(`Assertion error`)}let a=class e{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw RangeError(`Invalid argument`);this.bitData=n.slice()}static makeBytes(t){let r=[];for(let e of t)n(e,8,r);return new e(e.Mode.BYTE,t.length,r)}static makeNumeric(t){if(!e.isNumeric(t))throw RangeError(`String contains non-numeric characters`);let r=[];for(let e=0;e=1<{(e=>{let t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),e.Ecc=t})(e.QrCode||={})})(I0||={}),(e=>{(e=>{let t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]),e.Mode=t})(e.QrSegment||={})})(I0||={});var L0=I0,R0={L:L0.QrCode.Ecc.LOW,M:L0.QrCode.Ecc.MEDIUM,Q:L0.QrCode.Ecc.QUARTILE,H:L0.QrCode.Ecc.HIGH},z0=128,B0=`L`,V0=`#FFFFFF`,H0=`#000000`,U0=!1,W0=1,G0=4,K0=0,q0=.1;function J0(e,t=0){let n=[];return e.forEach(function(e,r){let i=null;e.forEach(function(a,o){if(!a&&i!==null){n.push(`M${i+t} ${r+t}h${o-i}v1H${i+t}z`),i=null;return}if(o===e.length-1){if(!a)return;i===null?n.push(`M${o+t},${r+t} h1v1H${o+t}z`):n.push(`M${i+t},${r+t} h${o+1-i}v1H${i+t}z`);return}a&&i===null&&(i=o)})}),n.join(``)}function Y0(e,t){return e.slice().map((e,n)=>n=t.y+t.h?e:e.map((e,n)=>n=t.x+t.w?e:!1))}function X0(e,t,n,r){if(r==null)return null;let i=e.length+n*2,a=Math.floor(t*q0),o=i/t,s=(r.width||a)*o,c=(r.height||a)*o,l=r.x==null?e.length/2-s/2:r.x*o,u=r.y==null?e.length/2-c/2:r.y*o,d=r.opacity==null?1:r.opacity,f=null;if(r.excavate){let e=Math.floor(l),t=Math.floor(u);f={x:e,y:t,w:Math.ceil(s+l-e),h:Math.ceil(c+u-t)}}let p=r.crossOrigin;return{x:l,y:u,h:c,w:s,excavation:f,opacity:d,crossOrigin:p}}function Z0(e,t){return t==null?e?G0:K0:Math.max(Math.floor(t),0)}function Q0({value:e,level:t,minVersion:n,includeMargin:r,marginSize:i,imageSettings:a,size:o,boostLevel:s}){let c=S.useMemo(()=>{let r=(Array.isArray(e)?e:[e]).reduce((e,t)=>(e.push(...L0.QrSegment.makeSegments(t)),e),[]);return L0.QrCode.encodeSegments(r,R0[t],n,void 0,void 0,s)},[e,t,n,s]),{cells:l,margin:u,numCells:d,calculatedImageSettings:f}=S.useMemo(()=>{let e=c.getModules(),t=Z0(r,i);return{cells:e,margin:t,numCells:e.length+t*2,calculatedImageSettings:X0(e,o,t,a)}},[c,o,a,r,i]);return{qrcode:c,margin:u,cells:l,numCells:d,calculatedImageSettings:f}}var $0=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),e2=S.forwardRef(function(e,t){let n=e,{value:r,size:i=z0,level:a=B0,bgColor:o=V0,fgColor:s=H0,includeMargin:c=U0,minVersion:l=W0,boostLevel:u,marginSize:d,imageSettings:f}=n,p=F0(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`marginSize`,`imageSettings`]),{style:m}=p,h=F0(p,[`style`]),g=f?.src,_=S.useRef(null),v=S.useRef(null),y=S.useCallback(e=>{_.current=e,typeof t==`function`?t(e):t&&(t.current=e)},[t]),[b,x]=S.useState(!1),{margin:C,cells:w,numCells:T,calculatedImageSettings:E}=Q0({value:r,level:a,minVersion:l,boostLevel:u,includeMargin:c,marginSize:d,imageSettings:f,size:i});S.useEffect(()=>{if(_.current!=null){let e=_.current,t=e.getContext(`2d`);if(!t)return;let n=w,r=v.current,a=E!=null&&r!==null&&r.complete&&r.naturalHeight!==0&&r.naturalWidth!==0;a&&E.excavation!=null&&(n=Y0(w,E.excavation));let c=window.devicePixelRatio||1;e.height=e.width=i*c;let l=i/T*c;t.scale(l,l),t.fillStyle=o,t.fillRect(0,0,T,T),t.fillStyle=s,$0?t.fill(new Path2D(J0(n,C))):w.forEach(function(e,n){e.forEach(function(e,r){e&&t.fillRect(r+C,n+C,1,1)})}),E&&(t.globalAlpha=E.opacity),a&&t.drawImage(r,E.x+C,E.y+C,E.w,E.h)}}),S.useEffect(()=>{x(!1)},[g]);let D=P0({height:i,width:i},m),O=null;return g!=null&&(O=S.createElement(`img`,{src:g,key:g,style:{display:`none`},onLoad:()=>{x(!0)},ref:v,crossOrigin:E?.crossOrigin})),S.createElement(S.Fragment,null,S.createElement(`canvas`,P0({style:D,height:i,width:i,ref:y,role:`img`},h)),O)});e2.displayName=`QRCodeCanvas`;var t2=S.forwardRef(function(e,t){let n=e,{value:r,size:i=z0,level:a=B0,bgColor:o=V0,fgColor:s=H0,includeMargin:c=U0,minVersion:l=W0,boostLevel:u,title:d,marginSize:f,imageSettings:p}=n,m=F0(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`title`,`marginSize`,`imageSettings`]),{margin:h,cells:g,numCells:_,calculatedImageSettings:v}=Q0({value:r,level:a,minVersion:l,boostLevel:u,includeMargin:c,marginSize:f,imageSettings:p,size:i}),y=g,b=null;p!=null&&v!=null&&(v.excavation!=null&&(y=Y0(g,v.excavation)),b=S.createElement(`image`,{href:p.src,height:v.h,width:v.w,x:v.x+h,y:v.y+h,preserveAspectRatio:`none`,opacity:v.opacity,crossOrigin:v.crossOrigin}));let x=J0(y,h);return S.createElement(`svg`,P0({height:i,width:i,viewBox:`0 0 ${_} ${_}`,ref:t,role:`img`},m),!!d&&S.createElement(`title`,null,d),S.createElement(`path`,{fill:o,d:`M0,0 h${_}v${_}H0z`,shapeRendering:`crispEdges`}),S.createElement(`path`,{fill:s,d:x,shapeRendering:`crispEdges`}),b)});t2.displayName=`QRCodeSVG`;var n2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.42 0 448 200.58 448 448S759.42 960 512 960 64 759.42 64 512 264.58 64 512 64m32.5 168c-69.67 0-86.06 16.84-86.72 39.08l-.02 1.43v46.62H291.45c-9.92 0-14.28 23.05-14.27 39.3 0 2.7 2.08 4.93 4.77 4.93h175.81v58.3h-116.5c-9.96 0-14.3 23.76-14.27 39.47a4.77 4.77 0 004.77 4.76h233.45c-4.53 41.06-15.43 77.59-30.72 109.32l-1.22 2.5-.32-.28c-60.24-28.47-120.43-52.57-194.4-52.57l-2.62.01c-84.98 1.11-144.71 56.5-145.91 127.04l-.02 1.22.02 2.13c1.24 70.4 63.56 126.45 148.52 126.45 61.25 0 116.38-16.85 163.46-45.02a138.58 138.58 0 0014.07-7.96 345.6 345.6 0 0050.3-41.16l9.45 6.35 12.46 8.32c57.53 38.26 113.76 72.62 169.86 79.27a142.62 142.62 0 0018.31 1.16c43.02 0 55-52.68 57.39-95.51l.14-2.84c.4-8.46-6.2-15.6-14.65-15.86-75.46-2.37-136.45-22.05-192-46.11l-6.27-2.75c35.15-56.8 56.66-121.81 57.15-186.66l.09-1.08c.4-5.51-4-10.2-9.52-10.2H549.33v-58.3h165.73c9.92 0 14.28-22.12 14.27-39.31a4.85 4.85 0 00-4.78-4.92H549.32v-82.35a4.8 4.8 0 00-4.83-4.78M328 583.85c54.63 0 107.08 22.41 158.1 52.19l5.76 3.4c-103.57 119.84-247.17 95.9-261.72 26.37a66.89 66.89 0 01-1.14-9.83l-.06-2.34.02-.9c.97-40.12 45.33-68.9 99.04-68.9`}}]},name:`alipay-circle`,theme:`outlined`}}))());function r2(){return r2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,r2({},e,{ref:t,icon:n2.default}))),a2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z`}}]},name:`api`,theme:`outlined`}}))());function o2(){return o2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,o2({},e,{ref:t,icon:a2.default}))),c2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z`}}]},name:`appstore`,theme:`outlined`}}))());function l2(){return l2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,l2({},e,{ref:t,icon:c2.default}))),d2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z`}}]},name:`arrow-down`,theme:`outlined`}}))());function f2(){return f2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,f2({},e,{ref:t,icon:d2.default}))),m2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`arrow-left`,theme:`outlined`}}))());function h2(){return h2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,h2({},e,{ref:t,icon:m2.default}))),_2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z`}}]},name:`arrow-up`,theme:`outlined`}}))());function v2(){return v2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,v2({},e,{ref:t,icon:_2.default}))),b2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z`}}]},name:`audio`,theme:`outlined`}}))());function x2(){return x2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,x2({},e,{ref:t,icon:b2.default}))),C2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM381 836H264V462h117v374zm189 0H453V462h117v374zm190 0H642V462h118v374z`}}]},name:`bank`,theme:`filled`}}))());function w2(){return w2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,w2({},e,{ref:t,icon:C2.default}))),E2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z`}}]},name:`bank`,theme:`outlined`}}))());function D2(){return D2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,D2({},e,{ref:t,icon:E2.default}))),k2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z`}}]},name:`bar-chart`,theme:`outlined`}}))());function A2(){return A2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,A2({},e,{ref:t,icon:k2.default}))),M2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M816 768h-24V428c0-141.1-104.3-257.7-240-277.1V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.9c-135.7 19.4-240 136-240 277.1v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48zM304 768V428c0-55.6 21.6-107.8 60.9-147.1S456.4 220 512 220c55.6 0 107.8 21.6 147.1 60.9S720 372.4 720 428v340H304z`}}]},name:`bell`,theme:`outlined`}}))());function N2(){return N2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,N2({},e,{ref:t,icon:M2.default}))),F2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z`}}]},name:`book`,theme:`outlined`}}))());function I2(){return I2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,I2({},e,{ref:t,icon:F2.default}))),R2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M916 210H376c-17.7 0-32 14.3-32 32v236H108c-17.7 0-32 14.3-32 32v272c0 17.7 14.3 32 32 32h540c17.7 0 32-14.3 32-32V546h236c17.7 0 32-14.3 32-32V242c0-17.7-14.3-32-32-32zm-504 68h200v200H412V278zm-68 468H144V546h200v200zm268 0H412V546h200v200zm268-268H680V278h200v200z`}}]},name:`build`,theme:`outlined`}}))());function z2(){return z2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,z2({},e,{ref:t,icon:R2.default}))),V2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z`}}]},name:`bulb`,theme:`outlined`}}))());function H2(){return H2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,H2({},e,{ref:t,icon:V2.default}))),W2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M251.2 387H320v68.8c0 1.8 1.8 3.2 4 3.2h48c2.2 0 4-1.4 4-3.3V387h68.8c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H376v-68.8c0-1.8-1.8-3.2-4-3.2h-48c-2.2 0-4 1.4-4 3.2V331h-68.8c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm328 0h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm0 265h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm0 104h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm-195.7-81l61.2-74.9c4.3-5.2.7-13.1-5.9-13.1H388c-2.3 0-4.5 1-5.9 2.9l-34 41.6-34-41.6a7.85 7.85 0 00-5.9-2.9h-50.9c-6.6 0-10.2 7.9-5.9 13.1l61.2 74.9-62.7 76.8c-4.4 5.2-.8 13.1 5.8 13.1h50.8c2.3 0 4.5-1 5.9-2.9l35.5-43.5 35.5 43.5c1.5 1.8 3.7 2.9 5.9 2.9h50.8c6.6 0 10.2-7.9 5.9-13.1L383.5 675zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-36 732H180V180h664v664z`}}]},name:`calculator`,theme:`outlined`}}))());function G2(){return G2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,G2({},e,{ref:t,icon:W2.default}))),q2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 248H728l-32.4-90.8a32.07 32.07 0 00-30.2-21.2H358.6c-13.5 0-25.6 8.5-30.1 21.2L296 248H160c-44.2 0-80 35.8-80 80v456c0 44.2 35.8 80 80 80h704c44.2 0 80-35.8 80-80V328c0-44.2-35.8-80-80-80zm8 536c0 4.4-3.6 8-8 8H160c-4.4 0-8-3.6-8-8V328c0-4.4 3.6-8 8-8h186.7l17.1-47.8 22.9-64.2h250.5l22.9 64.2 17.1 47.8H864c4.4 0 8 3.6 8 8v456zM512 384c-88.4 0-160 71.6-160 160s71.6 160 160 160 160-71.6 160-160-71.6-160-160-160zm0 256c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z`}}]},name:`camera`,theme:`outlined`}}))());function J2(){return J2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,J2({},e,{ref:t,icon:q2.default}))),X2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M380 704h264c4.4 0 8-3.6 8-8v-84c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v36H428v-36c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v84c0 4.4 3.6 8 8 8zm340-123a40 40 0 1080 0 40 40 0 10-80 0zm239-167.6L935.3 372a8 8 0 00-10.9-2.9l-50.7 29.6-78.3-216.2a63.9 63.9 0 00-60.9-44.4H301.2c-34.7 0-65.5 22.4-76.2 55.5l-74.6 205.2-50.8-29.6a8 8 0 00-10.9 2.9L65 413.4c-2.2 3.8-.9 8.6 2.9 10.8l60.4 35.2-14.5 40c-1.2 3.2-1.8 6.6-1.8 10v348.2c0 15.7 11.8 28.4 26.3 28.4h67.6c12.3 0 23-9.3 25.6-22.3l7.7-37.7h545.6l7.7 37.7c2.7 13 13.3 22.3 25.6 22.3h67.6c14.5 0 26.3-12.7 26.3-28.4V509.4c0-3.4-.6-6.8-1.8-10l-14.5-40 60.3-35.2a8 8 0 003-10.8zM840 517v237H184V517l15.6-43h624.8l15.6 43zM292.7 218.1l.5-1.3.4-1.3c1.1-3.3 4.1-5.5 7.6-5.5h427.6l75.4 208H220l72.7-199.9zM224 581a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`car`,theme:`outlined`}}))());function Z2(){return Z2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,Z2({},e,{ref:t,icon:X2.default}))),$2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z`}}]},name:`caret-right`,theme:`outlined`}}))());function e4(){return e4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,e4({},e,{ref:t,icon:$2.default}))),n4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z`}},{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}}]},name:`check-circle`,theme:`outlined`}}))());function r4(){return r4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,r4({},e,{ref:t,icon:n4.default}))),a4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z`}}]},name:`close-circle`,theme:`outlined`}}))());function o4(){return o4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,o4({},e,{ref:t,icon:a4.default}))),c4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M811.4 418.7C765.6 297.9 648.9 212 512.2 212S258.8 297.8 213 418.6C127.3 441.1 64 519.1 64 612c0 110.5 89.5 200 199.9 200h496.2C870.5 812 960 722.5 960 612c0-92.7-63.1-170.7-148.6-193.3zm36.3 281a123.07 123.07 0 01-87.6 36.3H263.9c-33.1 0-64.2-12.9-87.6-36.3A123.3 123.3 0 01140 612c0-28 9.1-54.3 26.2-76.3a125.7 125.7 0 0166.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10c54.3 14.5 92.1 63.8 92.1 120 0 33.1-12.9 64.3-36.3 87.7z`}}]},name:`cloud`,theme:`outlined`}}))());function l4(){return l4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,l4({},e,{ref:t,icon:c4.default}))),d4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z`}},{tag:`path`,attrs:{d:`M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z`}},{tag:`path`,attrs:{d:`M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z`}}]},name:`cloud-server`,theme:`outlined`}}))());function f4(){return f4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,f4({},e,{ref:t,icon:d4.default}))),m4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M518.3 459a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V856c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V613.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 459z`}},{tag:`path`,attrs:{d:`M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 01-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z`}}]},name:`cloud-upload`,theme:`outlined`}}))());function h4(){return h4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,h4({},e,{ref:t,icon:m4.default}))),_4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`code`,theme:`outlined`}}))());function v4(){return v4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,v4({},e,{ref:t,icon:_4.default}))),b4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M275 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm613 144H768c0-39.8-32.2-72-72-72H200c-39.8 0-72 32.2-72 72v248c0 3.4.2 6.7.7 9.9-.5 7-.7 14-.7 21.1 0 176.7 143.3 320 320 320 160.1 0 292.7-117.5 316.3-271H888c39.8 0 72-32.2 72-72V497c0-39.8-32.2-72-72-72zM696 681h-1.1c.7 7.6 1.1 15.2 1.1 23 0 137-111 248-248 248S200 841 200 704c0-7.8.4-15.4 1.1-23H200V425h496v256zm192-8H776V497h112v176zM613 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm-170 0c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36z`}}]},name:`coffee`,theme:`outlined`}}))());function x4(){return x4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,x4({},e,{ref:t,icon:b4.default}))),C4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={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 372zm198.4-588.1a32 32 0 00-24.5.5L414.9 415 296.4 686c-3.6 8.2-3.6 17.5 0 25.7 3.4 7.8 9.7 13.9 17.7 17 3.8 1.5 7.7 2.2 11.7 2.2 4.4 0 8.7-.9 12.8-2.7l271-118.6 118.5-271a32.06 32.06 0 00-17.7-42.7zM576.8 534.4l26.2 26.2-42.4 42.4-26.2-26.2L380 644.4 447.5 490 422 464.4l42.4-42.4 25.5 25.5L644.4 380l-67.6 154.4zM464.4 422L422 464.4l25.5 25.6 86.9 86.8 26.2 26.2 42.4-42.4-26.2-26.2-86.8-86.9z`}}]},name:`compass`,theme:`outlined`}}))());function w4(){return w4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,w4({},e,{ref:t,icon:C4.default}))),E4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zM512 734.2c-62.1 0-112.6-50.5-112.6-112.6S449.9 509 512 509s112.6 50.5 112.6 112.6S574.1 734.2 512 734.2zm0-160.9c-26.6 0-48.2 21.6-48.2 48.3 0 26.6 21.6 48.3 48.2 48.3s48.2-21.6 48.2-48.3c0-26.6-21.6-48.3-48.2-48.3z`}}]},name:`crown`,theme:`filled`}}))());function D4(){return D4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,D4({},e,{ref:t,icon:E4.default}))),k4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z`}}]},name:`crown`,theme:`outlined`}}))());function A4(){return A4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,A4({},e,{ref:t,icon:k4.default}))),M4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z`}}]},name:`dashboard`,theme:`outlined`}}))());function N4(){return N4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,N4({},e,{ref:t,icon:M4.default}))),F4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`database`,theme:`outlined`}}))());function I4(){return I4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,I4({},e,{ref:t,icon:F4.default}))),R4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={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 372zm47.7-395.2l-25.4-5.9V348.6c38 5.2 61.5 29 65.5 58.2.5 4 3.9 6.9 7.9 6.9h44.9c4.7 0 8.4-4.1 8-8.8-6.1-62.3-57.4-102.3-125.9-109.2V263c0-4.4-3.6-8-8-8h-28.1c-4.4 0-8 3.6-8 8v33c-70.8 6.9-126.2 46-126.2 119 0 67.6 49.8 100.2 102.1 112.7l24.7 6.3v142.7c-44.2-5.9-69-29.5-74.1-61.3-.6-3.8-4-6.6-7.9-6.6H363c-4.7 0-8.4 4-8 8.7 4.5 55 46.2 105.6 135.2 112.1V761c0 4.4 3.6 8 8 8h28.4c4.4 0 8-3.6 8-8.1l-.2-31.7c78.3-6.9 134.3-48.8 134.3-124-.1-69.4-44.2-100.4-109-116.4zm-68.6-16.2c-5.6-1.6-10.3-3.1-15-5-33.8-12.2-49.5-31.9-49.5-57.3 0-36.3 27.5-57 64.5-61.7v124zM534.3 677V543.3c3.1.9 5.9 1.6 8.8 2.2 47.3 14.4 63.2 34.4 63.2 65.1 0 39.1-29.4 62.6-72 66.4z`}}]},name:`dollar`,theme:`outlined`}}))());function z4(){return z4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,z4({},e,{ref:t,icon:R4.default}))),V4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 472a40 40 0 1080 0 40 40 0 10-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 01-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z`}}]},name:`experiment`,theme:`outlined`}}))());function H4(){return H4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,H4({},e,{ref:t,icon:V4.default}))),W4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z`}}]},name:`filter`,theme:`outlined`}}))());function G4(){return G4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,G4({},e,{ref:t,icon:W4.default}))),q4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9z`}}]},name:`fire`,theme:`filled`}}))());function J4(){return J4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,J4({},e,{ref:t,icon:q4.default}))),X4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9zM713 808.5c-53.7 53.2-125 82.4-201 82.4s-147.3-29.2-201-82.4c-53.5-53.1-83-123.5-83-198.4 0-43.5 9.8-85.2 29.1-124 18.8-37.9 46.8-71.8 80.8-97.9a349.6 349.6 0 0058.6-56.8c25-30.5 44.6-64.5 58.2-101a240 240 0 0012.1-46.5c24.1 22.2 44.3 49 61.2 80.4 33.4 62.6 48.8 118.3 45.8 165.7a74.01 74.01 0 0024.4 59.8 73.36 73.36 0 0053.4 18.8c19.7-1 37.8-9.7 51-24.4 13.3-14.9 24.8-30.1 34.4-45.6 14 17.9 25.7 37.4 35 58.4 15.9 35.8 24 73.9 24 113.1 0 74.9-29.5 145.4-83 198.4z`}}]},name:`fire`,theme:`outlined`}}))());function Z4(){return Z4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,Z4({},e,{ref:t,icon:X4.default}))),$4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 305H624V192c0-17.7-14.3-32-32-32H184v-40c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v784c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V640h248v113c0 17.7 14.3 32 32 32h416c17.7 0 32-14.3 32-32V337c0-17.7-14.3-32-32-32zM184 568V232h368v336H184zm656 145H504v-73h112c4.4 0 8-3.6 8-8V377h216v336z`}}]},name:`flag`,theme:`outlined`}}))());function e3(){return e3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,e3({},e,{ref:t,icon:$4.default}))),n3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 310H732.4c13.6-21.4 21.6-46.8 21.6-74 0-76.1-61.9-138-138-138-41.4 0-78.7 18.4-104 47.4-25.3-29-62.6-47.4-104-47.4-76.1 0-138 61.9-138 138 0 27.2 7.9 52.6 21.6 74H144c-17.7 0-32 14.3-32 32v200c0 4.4 3.6 8 8 8h40v344c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V550h40c4.4 0 8-3.6 8-8V342c0-17.7-14.3-32-32-32zm-334-74c0-38.6 31.4-70 70-70s70 31.4 70 70-31.4 70-70 70h-70v-70zm-138-70c38.6 0 70 31.4 70 70v70h-70c-38.6 0-70-31.4-70-70s31.4-70 70-70zM180 482V378h298v104H180zm48 68h250v308H228V550zm568 308H546V550h250v308zm48-376H546V378h298v104z`}}]},name:`gift`,theme:`outlined`}}))());function r3(){return r3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,r3({},e,{ref:t,icon:n3.default}))),a3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z`}}]},name:`global`,theme:`outlined`}}))());function o3(){return o3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,o3({},e,{ref:t,icon:a3.default}))),c3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z`}}]},name:`heart`,theme:`outlined`}}))());function l3(){return l3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,l3({},e,{ref:t,icon:c3.default}))),d3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M957.6 507.4L603.2 158.2a7.9 7.9 0 00-11.2 0L353.3 393.4a8.03 8.03 0 00-.1 11.3l.1.1 40 39.4-117.2 115.3a8.03 8.03 0 00-.1 11.3l.1.1 39.5 38.9-189.1 187H72.1c-4.4 0-8.1 3.6-8.1 8V860c0 4.4 3.6 8 8 8h344.9c2.1 0 4.1-.8 5.6-2.3l76.1-75.6 40.4 39.8a7.9 7.9 0 0011.2 0l117.1-115.6 40.1 39.5a7.9 7.9 0 0011.2 0l238.7-235.2c3.4-3 3.4-8 .3-11.2zM389.8 796.2H229.6l134.4-133 80.1 78.9-54.3 54.1zm154.8-62.1L373.2 565.2l68.6-67.6 171.4 168.9-68.6 67.6zM713.1 658L450.3 399.1 597.6 254l262.8 259-147.3 145z`}}]},name:`highlight`,theme:`outlined`}}))());function f3(){return f3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,f3({},e,{ref:t,icon:d3.default}))),m3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z`}}]},name:`history`,theme:`outlined`}}))());function h3(){return h3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,h3({},e,{ref:t,icon:m3.default}))),_3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z`}}]},name:`home`,theme:`outlined`}}))());function v3(){return v3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,v3({},e,{ref:t,icon:_3.default}))),b3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136V232h752v560zM610.3 476h123.4c1.3 0 2.3-3.6 2.3-8v-48c0-4.4-1-8-2.3-8H610.3c-1.3 0-2.3 3.6-2.3 8v48c0 4.4 1 8 2.3 8zm4.8 144h185.7c3.9 0 7.1-3.6 7.1-8v-48c0-4.4-3.2-8-7.1-8H615.1c-3.9 0-7.1 3.6-7.1 8v48c0 4.4 3.2 8 7.1 8zM224 673h43.9c4.2 0 7.6-3.3 7.9-7.5 3.8-50.5 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H522a8 8 0 008-8.4c-2.8-53.3-32-99.7-74.6-126.1a111.8 111.8 0 0029.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 00-74.6 126.1c-.4 4.6 3.2 8.4 7.8 8.4zm149-262c28.5 0 51.7 23.3 51.7 52s-23.2 52-51.7 52-51.7-23.3-51.7-52 23.2-52 51.7-52z`}}]},name:`idcard`,theme:`outlined`}}))());function x3(){return x3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,x3({},e,{ref:t,icon:b3.default}))),C3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M448 224a64 64 0 10128 0 64 64 0 10-128 0zm96 168h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V400c0-4.4-3.6-8-8-8z`}}]},name:`info`,theme:`outlined`}}))());function w3(){return w3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,w3({},e,{ref:t,icon:C3.default}))),E3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M956.9 845.1L896.4 632V168c0-17.7-14.3-32-32-32h-704c-17.7 0-32 14.3-32 32v464L67.9 845.1C60.4 866 75.8 888 98 888h828.8c22.2 0 37.6-22 30.1-42.9zM200.4 208h624v395h-624V208zm228.3 608l8.1-37h150.3l8.1 37H428.7zm224 0l-19.1-86.7c-.8-3.7-4.1-6.3-7.8-6.3H398.2c-3.8 0-7 2.6-7.8 6.3L371.3 816H151l42.3-149h638.2l42.3 149H652.7z`}}]},name:`laptop`,theme:`outlined`}}))());function D3(){return D3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,D3({},e,{ref:t,icon:E3.default}))),k3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-696 72h136v656H184V184zm656 656H384V384h456v456zM384 320V184h456v136H384z`}}]},name:`layout`,theme:`outlined`}}))());function A3(){return A3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,A3({},e,{ref:t,icon:k3.default}))),M3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z`}}]},name:`line-chart`,theme:`outlined`}}))());function N3(){return N3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,N3({},e,{ref:t,icon:M3.default}))),F3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z`}}]},name:`lock`,theme:`outlined`}}))());function I3(){return I3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,I3({},e,{ref:t,icon:F3.default}))),R3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z`}}]},name:`logout`,theme:`outlined`}}))());function z3(){return z3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,z3({},e,{ref:t,icon:R3.default}))),V3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z`}}]},name:`mail`,theme:`outlined`}}))());function H3(){return H3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,H3({},e,{ref:t,icon:V3.default}))),W3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M839.2 278.1a32 32 0 00-30.4-22.1H736V144c0-17.7-14.3-32-32-32H320c-17.7 0-32 14.3-32 32v112h-72.8a31.9 31.9 0 00-30.4 22.1L112 502v378c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V502l-72.8-223.9zM360 184h304v72H360v-72zm480 656H184V513.4L244.3 328h535.4L840 513.4V840zM652 572H544V464c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v108H372c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h108v108c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V636h108c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z`}}]},name:`medicine-box`,theme:`outlined`}}))());function G3(){return G3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,G3({},e,{ref:t,icon:W3.default}))),q3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z`}}]},name:`message`,theme:`outlined`}}))());function J3(){return J3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,J3({},e,{ref:t,icon:q3.default}))),X3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`mobile`,theme:`outlined`}}))());function Z3(){return Z3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,Z3({},e,{ref:t,icon:X3.default}))),$3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M692.8 412.7l.2-.2-34.6-44.3a7.97 7.97 0 00-11.2-1.4l-50.4 39.3-70.5-90.1a7.97 7.97 0 00-11.2-1.4l-37.9 29.7a7.97 7.97 0 00-1.4 11.2l70.5 90.2-.2.1 34.6 44.3c2.7 3.5 7.7 4.1 11.2 1.4l50.4-39.3 64.1 82c2.7 3.5 7.7 4.1 11.2 1.4l37.9-29.6c3.5-2.7 4.1-7.7 1.4-11.2l-64.1-82.1zM608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5L114.3 856.1a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6C473 696.1 537.7 720 608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644s-118.2-23.7-161.2-66.8C403.7 534.2 380 476.9 380 416s23.7-118.2 66.8-161.2c43-43.1 100.3-66.8 161.2-66.8s118.2 23.7 161.2 66.8c43.1 43 66.8 100.3 66.8 161.2s-23.7 118.2-66.8 161.2z`}}]},name:`monitor`,theme:`outlined`}}))());function e6(){return e6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,e6({},e,{ref:t,icon:$3.default}))),n6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={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 64zm-80 600c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V360c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v304zm224 0c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V360c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v304z`}}]},name:`pause-circle`,theme:`filled`}}))());function r6(){return r6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,r6({},e,{ref:t,icon:n6.default}))),a6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={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 372zm159.6-585h-59.5c-3 0-5.8 1.7-7.1 4.4l-90.6 180H511l-90.6-180a8 8 0 00-7.1-4.4h-60.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.9L457 515.7h-61.4c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V603h-81.7c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V717c0 4.4 3.6 8 8 8h54.3c4.4 0 8-3.6 8-8v-68.1h82c4.4 0 8-3.6 8-8V611c0-4.4-3.6-8-8-8h-82v-41.5h82c4.4 0 8-3.6 8-8v-29.9c0-4.4-3.6-8-8-8h-62l111.1-204.8c.6-1.2 1-2.5 1-3.8-.1-4.4-3.7-8-8.1-8z`}}]},name:`pay-circle`,theme:`outlined`}}))());function o6(){return o6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,o6({},e,{ref:t,icon:a6.default}))),c6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M877.1 238.7L770.6 132.3c-13-13-30.4-20.3-48.8-20.3s-35.8 7.2-48.8 20.3L558.3 246.8c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l89.6 89.7a405.46 405.46 0 01-86.4 127.3c-36.7 36.9-79.6 66-127.2 86.6l-89.6-89.7c-13-13-30.4-20.3-48.8-20.3a68.2 68.2 0 00-48.8 20.3L132.3 673c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l106.4 106.4c22.2 22.2 52.8 34.9 84.2 34.9 6.5 0 12.8-.5 19.2-1.6 132.4-21.8 263.8-92.3 369.9-198.3C818 606 888.4 474.6 910.4 342.1c6.3-37.6-6.3-76.3-33.3-103.4zm-37.6 91.5c-19.5 117.9-82.9 235.5-178.4 331s-213 158.9-330.9 178.4c-14.8 2.5-30-2.5-40.8-13.2L184.9 721.9 295.7 611l119.8 120 .9.9 21.6-8a481.29 481.29 0 00285.7-285.8l8-21.6-120.8-120.7 110.8-110.9 104.5 104.5c10.8 10.8 15.8 26 13.3 40.8z`}}]},name:`phone`,theme:`outlined`}}))());function l6(){return l6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,l6({},e,{ref:t,icon:c6.default}))),d6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`}}]},name:`picture`,theme:`outlined`}}))());function f6(){return f6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,f6({},e,{ref:t,icon:d6.default}))),m6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 518H506V160c0-4.4-3.6-8-8-8h-26a398.46 398.46 0 00-282.8 117.1 398.19 398.19 0 00-85.7 127.1A397.61 397.61 0 0072 552a398.46 398.46 0 00117.1 282.8c36.7 36.7 79.5 65.6 127.1 85.7A397.61 397.61 0 00472 952a398.46 398.46 0 00282.8-117.1c36.7-36.7 65.6-79.5 85.7-127.1A397.61 397.61 0 00872 552v-26c0-4.4-3.6-8-8-8zM705.7 787.8A331.59 331.59 0 01470.4 884c-88.1-.4-170.9-34.9-233.2-97.2C174.5 724.1 140 640.7 140 552c0-88.7 34.5-172.1 97.2-234.8 54.6-54.6 124.9-87.9 200.8-95.5V586h364.3c-7.7 76.3-41.3 147-96.6 201.8zM952 462.4l-2.6-28.2c-8.5-92.1-49.4-179-115.2-244.6A399.4 399.4 0 00589 74.6L560.7 72c-4.7-.4-8.7 3.2-8.7 7.9V464c0 4.4 3.6 8 8 8l384-1c4.7 0 8.4-4 8-8.6zm-332.2-58.2V147.6a332.24 332.24 0 01166.4 89.8c45.7 45.6 77 103.6 90 166.1l-256.4.7z`}}]},name:`pie-chart`,theme:`outlined`}}))());function h6(){return h6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,h6({},e,{ref:t,icon:m6.default}))),_6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={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 64zm144.1 454.9L437.7 677.8a8.02 8.02 0 01-12.7-6.5V353.7a8 8 0 0112.7-6.5L656.1 506a7.9 7.9 0 010 12.9z`}}]},name:`play-circle`,theme:`filled`}}))());function v6(){return v6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,v6({},e,{ref:t,icon:_6.default}))),b6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={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`}}))());function x6(){return x6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,x6({},e,{ref:t,icon:b6.default}))),C6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z`}},{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}}]},name:`plus-circle`,theme:`outlined`}}))());function w6(){return w6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,w6({},e,{ref:t,icon:C6.default}))),E6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 161H699.2c-49.1 0-97.1 14.1-138.4 40.7L512 233l-48.8-31.3A255.2 255.2 0 00324.8 161H96c-17.7 0-32 14.3-32 32v568c0 17.7 14.3 32 32 32h228.8c49.1 0 97.1 14.1 138.4 40.7l44.4 28.6c1.3.8 2.8 1.3 4.3 1.3s3-.4 4.3-1.3l44.4-28.6C602 807.1 650.1 793 699.2 793H928c17.7 0 32-14.3 32-32V193c0-17.7-14.3-32-32-32zM324.8 721H136V233h188.8c35.4 0 69.8 10.1 99.5 29.2l48.8 31.3 6.9 4.5v462c-47.6-25.6-100.8-39-155.2-39zm563.2 0H699.2c-54.4 0-107.6 13.4-155.2 39V298l6.9-4.5 48.8-31.3c29.7-19.1 64.1-29.2 99.5-29.2H888v488zM396.9 361H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm223.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c0-4.1-3.2-7.5-7.1-7.5H627.1c-3.9 0-7.1 3.4-7.1 7.5zM396.9 501H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm416 0H627.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5z`}}]},name:`read`,theme:`outlined`}}))());function D6(){return D6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,D6({},e,{ref:t,icon:E6.default}))),k6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M508 704c79.5 0 144-64.5 144-144s-64.5-144-144-144-144 64.5-144 144 64.5 144 144 144zm0-224c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z`}},{tag:`path`,attrs:{d:`M832 256h-28.1l-35.7-120.9c-4-13.7-16.5-23.1-30.7-23.1h-451c-14.3 0-26.8 9.4-30.7 23.1L220.1 256H192c-17.7 0-32 14.3-32 32v28c0 4.4 3.6 8 8 8h45.8l47.7 558.7a32 32 0 0031.9 29.3h429.2a32 32 0 0031.9-29.3L802.2 324H856c4.4 0 8-3.6 8-8v-28c0-17.7-14.3-32-32-32zm-518.6-76h397.2l22.4 76H291l22.4-76zm376.2 664H326.4L282 324h451.9l-44.3 520z`}}]},name:`rest`,theme:`outlined`}}))());function A6(){return A6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,A6({},e,{ref:t,icon:k6.default}))),M6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`robot`,theme:`outlined`}}))());function N6(){return N6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,N6({},e,{ref:t,icon:M6.default}))),F6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 00-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0043.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0043.1-30.5 97.52 97.52 0 0021.4-60.8c0-8.4-1.1-16.4-3.1-23.8H864zM762.3 621.4c9.4 14.6 17 30.3 22.5 46.6H700V558.7a211.6 211.6 0 0162.3 62.7zM388 483.1V318.8l124-147 124 147V668H388V483.1zM239.2 668c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668h-84.8zm388.9 116.2c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5-38.3 0-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 01-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM464 400a48 48 0 1096 0 48 48 0 10-96 0z`}}]},name:`rocket`,theme:`outlined`}}))());function I6(){return I6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,I6({},e,{ref:t,icon:F6.default}))),R6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z`}},{tag:`path`,attrs:{d:`M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z`}}]},name:`safety`,theme:`outlined`}}))());function z6(){return z6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,z6({},e,{ref:t,icon:R6.default}))),V6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zM402.9 528.8l-77.5 77.5a8.03 8.03 0 000 11.3l34 34c3.1 3.1 8.2 3.1 11.3 0l77.5-77.5c55.7 35.1 130.1 28.4 178.6-20.1 56.3-56.3 56.3-147.5 0-203.8-56.3-56.3-147.5-56.3-203.8 0-48.5 48.5-55.2 123-20.1 178.6zm65.4-133.3c31.3-31.3 82-31.3 113.2 0 31.3 31.3 31.3 82 0 113.2-31.3 31.3-82 31.3-113.2 0s-31.3-81.9 0-113.2z`}}]},name:`security-scan`,theme:`outlined`}}))());function H6(){return H6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,H6({},e,{ref:t,icon:V6.default}))),W6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z`}}]},name:`send`,theme:`outlined`}}))());function G6(){return G6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,G6({},e,{ref:t,icon:W6.default}))),q6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z`}}]},name:`setting`,theme:`outlined`}}))());function J6(){return J6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,J6({},e,{ref:t,icon:q6.default}))),X6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z`}}]},name:`shopping-cart`,theme:`outlined`}}))());function Z6(){return Z6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,Z6({},e,{ref:t,icon:X6.default}))),$6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 312H696v-16c0-101.6-82.4-184-184-184s-184 82.4-184 184v16H192c-17.7 0-32 14.3-32 32v536c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V344c0-17.7-14.3-32-32-32zm-432-16c0-61.9 50.1-112 112-112s112 50.1 112 112v16H400v-16zm392 544H232V384h96v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h224v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h96v456z`}}]},name:`shopping`,theme:`outlined`}}))());function e8(){return e8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,e8({},e,{ref:t,icon:$6.default}))),n8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M925.6 405.1l-203-253.7a6.5 6.5 0 00-5-2.4H306.4c-1.9 0-3.8.9-5 2.4l-203 253.7a6.5 6.5 0 00.2 8.3l408.6 459.5c1.2 1.4 3 2.1 4.8 2.1 1.8 0 3.5-.8 4.8-2.1l408.6-459.5a6.5 6.5 0 00.2-8.3zM645.2 206.4l34.4 133.9-132.5-133.9h98.1zm8.2 178.5H370.6L512 242l141.4 142.9zM378.8 206.4h98.1L344.3 340.3l34.5-133.9zm-53.4 7l-44.1 171.5h-93.1l137.2-171.5zM194.6 434.9H289l125.8 247.7-220.2-247.7zM512 763.4L345.1 434.9h333.7L512 763.4zm97.1-80.8L735 434.9h94.4L609.1 682.6zm133.6-297.7l-44.1-171.5 137.2 171.5h-93.1z`}}]},name:`sketch`,theme:`outlined`}}))());function r8(){return r8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,r8({},e,{ref:t,icon:n8.default}))),a8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M870 126H663.8c-17.4 0-32.9 11.9-37 29.3C614.3 208.1 567 246 512 246s-102.3-37.9-114.8-90.7a37.93 37.93 0 00-37-29.3H154a44 44 0 00-44 44v252a44 44 0 0044 44h75v388a44 44 0 0044 44h478a44 44 0 0044-44V466h75a44 44 0 0044-44V170a44 44 0 00-44-44zm-28 268H723v432H301V394H182V198h153.3c28.2 71.2 97.5 120 176.7 120s148.5-48.8 176.7-120H842v196z`}}]},name:`skin`,theme:`outlined`}}))());function o8(){return o8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,o8({},e,{ref:t,icon:a8.default}))),c8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z`}}]},name:`smile`,theme:`outlined`}}))());function l8(){return l8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,l8({},e,{ref:t,icon:c8.default}))),d8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M688 264c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48zm-8 136H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM480 544H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 308H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm356.8-74.4c29-26.3 47.2-64.3 47.2-106.6 0-79.5-64.5-144-144-144s-144 64.5-144 144c0 42.3 18.2 80.3 47.2 106.6-57 32.5-96.2 92.7-99.2 162.1-.2 4.5 3.5 8.3 8 8.3h48.1c4.2 0 7.7-3.3 8-7.6C564 871.2 621.7 816 692 816s128 55.2 131.9 124.4c.2 4.2 3.7 7.6 8 7.6H880c4.6 0 8.2-3.8 8-8.3-2.9-69.5-42.2-129.6-99.2-162.1zM692 591c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z`}}]},name:`solution`,theme:`outlined`}}))());function f8(){return f8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,f8({},e,{ref:t,icon:d8.default}))),m8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1zM586 803L293.4 611.7l-18-11.7H146V424h129.4l17.9-11.7L586 221v582zm348-327H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zm-41.9 261.8l-110.3-63.7a15.9 15.9 0 00-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0021.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM760 344a15.9 15.9 0 0021.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 00-21.7-5.9L746 287.8a15.99 15.99 0 00-5.8 21.8L760 344z`}}]},name:`sound`,theme:`outlined`}}))());function h8(){return h8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,h8({},e,{ref:t,icon:m8.default}))),_8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z`}}]},name:`star`,theme:`outlined`}}))());function v8(){return v8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,v8({},e,{ref:t,icon:_8.default}))),b8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z`}}]},name:`sync`,theme:`outlined`}}))());function x8(){return x8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,x8({},e,{ref:t,icon:b8.default}))),C8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M938 458.8l-29.6-312.6c-1.5-16.2-14.4-29-30.6-30.6L565.2 86h-.4c-3.2 0-5.7 1-7.6 2.9L88.9 557.2a9.96 9.96 0 000 14.1l363.8 363.8c1.9 1.9 4.4 2.9 7.1 2.9s5.2-1 7.1-2.9l468.3-468.3c2-2.1 3-5 2.8-8zM459.7 834.7L189.3 564.3 589 164.6 836 188l23.4 247-399.7 399.7zM680 256c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm0 120c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z`}}]},name:`tag`,theme:`outlined`}}))());function w8(){return w8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,w8({},e,{ref:t,icon:C8.default}))),E8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z`}}]},name:`team`,theme:`outlined`}}))());function D8(){return D8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,D8({},e,{ref:t,icon:E8.default}))),k8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z`}}]},name:`thunderbolt`,theme:`outlined`}}))());function A8(){return A8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,A8({},e,{ref:t,icon:k8.default}))),M8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z`}}]},name:`tool`,theme:`outlined`}}))());function N8(){return N8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,N8({},e,{ref:t,icon:M8.default}))),F8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 160h-92v-40c0-4.4-3.6-8-8-8H256c-4.4 0-8 3.6-8 8v40h-92a44 44 0 00-44 44v148c0 81.7 60 149.6 138.2 162C265.7 630.2 359 721.7 476 734.5v105.2H280c-17.7 0-32 14.3-32 32V904c0 4.4 3.6 8 8 8h512c4.4 0 8-3.6 8-8v-32.3c0-17.7-14.3-32-32-32H548V734.5C665 721.7 758.3 630.2 773.8 514 852 501.6 912 433.7 912 352V204a44 44 0 00-44-44zM184 352V232h64v207.6a91.99 91.99 0 01-64-87.6zm520 128c0 49.1-19.1 95.4-53.9 130.1-34.8 34.8-81 53.9-130.1 53.9h-16c-49.1 0-95.4-19.1-130.1-53.9-34.8-34.8-53.9-81-53.9-130.1V184h384v296zm136-128c0 41-26.9 75.8-64 87.6V232h64v120z`}}]},name:`trophy`,theme:`outlined`}}))());function I8(){return I8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,I8({},e,{ref:t,icon:F8.default}))),R8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M608 192a32 32 0 0132 32v160h174.81a32 32 0 0126.68 14.33l113.19 170.84a32 32 0 015.32 17.68V672a32 32 0 01-32 32h-96c0 70.7-57.3 128-128 128s-128-57.3-128-128H384c0 70.7-57.3 128-128 128s-128-57.3-128-128H96a32 32 0 01-32-32V224a32 32 0 0132-32zM256 640a64 64 0 000 128h1.06A64 64 0 00256 640m448 0a64 64 0 000 128h1.06A64 64 0 00704 640M576 256H128v384h17.12c22.13-38.26 63.5-64 110.88-64 47.38 0 88.75 25.74 110.88 64H576zm221.63 192H640v145.12A127.43 127.43 0 01704 576c47.38 0 88.75 25.74 110.88 64H896v-43.52zM500 448a12 12 0 0112 12v40a12 12 0 01-12 12H332a12 12 0 01-12-12v-40a12 12 0 0112-12zM308 320a12 12 0 0112 12v40a12 12 0 01-12 12H204a12 12 0 01-12-12v-40a12 12 0 0112-12z`}}]},name:`truck`,theme:`outlined`}}))());function z8(){return z8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,z8({},e,{ref:t,icon:R8.default}))),V8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`upload`,theme:`outlined`}}))());function H8(){return H8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,H8({},e,{ref:t,icon:V8.default}))),W8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z`}}]},name:`user`,theme:`outlined`}}))());function G8(){return G8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,G8({},e,{ref:t,icon:W8.default}))),q8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v576c0 35.3 28.7 64 64 64h592c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM712 792H136V232h576v560zm176-167l-104-59.8V458.9L888 399v226zM208 360h112c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H208c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}}]},name:`video-camera`,theme:`outlined`}}))());function J8(){return J8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,J8({},e,{ref:t,icon:q8.default}))),X8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 464H528V448h312v128zm0 264H184V184h656v200H496c-17.7 0-32 14.3-32 32v192c0 17.7 14.3 32 32 32h344v200zM580 512a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`wallet`,theme:`outlined`}}))());function Z8(){return Z8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,Z8({},e,{ref:t,icon:X8.default}))),$8=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z`}}]},name:`warning`,theme:`outlined`}}))());function e5(){return e5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,e5({},e,{ref:t,icon:$8.default}))),n5=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M690.1 377.4c5.9 0 11.8.2 17.6.5-24.4-128.7-158.3-227.1-319.9-227.1C209 150.8 64 271.4 64 420.2c0 81.1 43.6 154.2 111.9 203.6a21.5 21.5 0 019.1 17.6c0 2.4-.5 4.6-1.1 6.9-5.5 20.3-14.2 52.8-14.6 54.3-.7 2.6-1.7 5.2-1.7 7.9 0 5.9 4.8 10.8 10.8 10.8 2.3 0 4.2-.9 6.2-2l70.9-40.9c5.3-3.1 11-5 17.2-5 3.2 0 6.4.5 9.5 1.4 33.1 9.5 68.8 14.8 105.7 14.8 6 0 11.9-.1 17.8-.4-7.1-21-10.9-43.1-10.9-66 0-135.8 132.2-245.8 295.3-245.8zm-194.3-86.5c23.8 0 43.2 19.3 43.2 43.1s-19.3 43.1-43.2 43.1c-23.8 0-43.2-19.3-43.2-43.1s19.4-43.1 43.2-43.1zm-215.9 86.2c-23.8 0-43.2-19.3-43.2-43.1s19.3-43.1 43.2-43.1 43.2 19.3 43.2 43.1-19.4 43.1-43.2 43.1zm586.8 415.6c56.9-41.2 93.2-102 93.2-169.7 0-124-120.8-224.5-269.9-224.5-149 0-269.9 100.5-269.9 224.5S540.9 847.5 690 847.5c30.8 0 60.6-4.4 88.1-12.3 2.6-.8 5.2-1.2 7.9-1.2 5.2 0 9.9 1.6 14.3 4.1l59.1 34c1.7 1 3.3 1.7 5.2 1.7a9 9 0 006.4-2.6 9 9 0 002.6-6.4c0-2.2-.9-4.4-1.4-6.6-.3-1.2-7.6-28.3-12.2-45.3-.5-1.9-.9-3.8-.9-5.7.1-5.9 3.1-11.2 7.6-14.5zM600.2 587.2c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9c0 19.8-16.2 35.9-36 35.9zm179.9 0c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9a36.08 36.08 0 01-36 35.9z`}}]},name:`wechat`,theme:`outlined`}}))());function r5(){return r5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,r5({},e,{ref:t,icon:n5.default}))),a5=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M921 912L601.11 445.75l.55.43L890.08 112H793.7L558.74 384 372.15 112H119.37l298.65 435.31-.04-.04L103 912h96.39L460.6 609.38 668.2 912zM333.96 184.73l448.83 654.54H706.4L257.2 184.73z`}}]},name:`x`,theme:`outlined`}}))());function o5(){return o5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(bu,o5({},e,{ref:t,icon:a5.default}))),c5=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},l5=(e=>e?c5(e):c5),u5=e=>e;function d5(e,t=u5){let n=S.useSyncExternalStore(e.subscribe,S.useCallback(()=>t(e.getState()),[e,t]),S.useCallback(()=>t(e.getInitialState()),[e,t]));return S.useDebugValue(n),n}var f5=e=>{let t=l5(e),n=e=>d5(t,e);return Object.assign(n,t),n},p5=(e=>e?f5(e):f5),m5=`AES-GCM`,h5=12,g5=128;async function _5(){throw Error(`VITE_ENCRYPTION_KEY not configured`)}async function v5(e){let t=await _5(),n=crypto.getRandomValues(new Uint8Array(h5)),r=new TextEncoder().encode(e),i=await crypto.subtle.encrypt({name:m5,iv:n,tagLength:g5},t,r),a=new Uint8Array(i),o=new Uint8Array(n.length+a.length);return o.set(n),o.set(a,n.length),btoa(String.fromCharCode(...o))}async function y5(e){let t=await _5(),n=Uint8Array.from(atob(e),e=>e.charCodeAt(0)),r=n.slice(0,h5),i=n.slice(h5),a=await crypto.subtle.decrypt({name:m5,iv:r,tagLength:g5},t,i);return new TextDecoder().decode(a)}var b5=`http://ceshi.apiforeign.minzhong.cn`,x5=!1;function S5(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}function C5(e){return Array.isArray(e)?e.map(C5):typeof e==`object`&&e?Object.fromEntries(Object.entries(e).map(([e,t])=>[S5(e),C5(t)])):e}function w5(){return localStorage.getItem(`auth_token`)}function T5(e){localStorage.setItem(`auth_token`,e)}function E5(){localStorage.removeItem(`auth_token`)}async function D5(e){try{return await y5(e)}catch{return null}}async function O5(e,t={}){let{method:n=`GET`,body:r,auth:i=!0,encryptBody:a=x5,signal:o}=t,s={"Content-Type":`application/json`};if(i){let e=w5();e&&(s.Authorization=`Bearer ${e}`)}let c;if(r!==void 0){let e=JSON.stringify(r);a?(s[`X-Encrypted`]=`true`,c=JSON.stringify({data:await v5(e)})):c=e}let l=await fetch(`${b5}/api${e}`,{method:n,headers:s,body:c,signal:o});if(l.status===204)return;let u=await l.text();if(!u)return;let d;try{d=JSON.parse(u)}catch{throw Error(`响应解析失败 (${l.status})`)}if(d&&typeof d.data==`string`&&a){let e=await D5(d.data);e!==null&&(d=JSON.parse(e))}if(!l.ok){let e=d?.detail||`请求失败 (${l.status})`;throw l.status===401&&!t.skipAuthRedirect&&(E5(),window.location.href=`/login`),Error(e)}return C5(d)}var k5={get:(e,t=!0)=>O5(e,typeof t==`boolean`?{auth:t}:t),post:(e,t,n=!0,r=!1)=>O5(e,{method:`POST`,body:t,auth:n,skipAuthRedirect:r}),put:(e,t,n=!0)=>O5(e,{method:`PUT`,body:t,auth:n}),delete:(e,t=!0)=>O5(e,{method:`DELETE`,auth:t})};async function A5(e,t,n,r){let i=await k5.post(`/auth/login`,{username:e,password:t,captcha_token:n,remember_me:r||!1},!1,!0);return T5(i.accessToken),i.user}async function j5(e,t){let n=await k5.post(`/auth/sms-login`,{phone:e,code:t},!1,!0);return T5(n.accessToken),n.user}async function M5(e,t,n){let r=await k5.post(`/auth/register`,{phone:e,code:t,password:n},!1);return T5(r.accessToken),r.user}async function N5(){await k5.post(`/auth/logout`),E5()}async function P5(){try{return await k5.get(`/auth/me`)}catch{return null}}async function F5(e,t){await k5.post(`/auth/change-password`,{old_password:e,new_password:t})}async function I5(){return k5.get(`/projects`)}async function L5(e,t){return k5.post(`/projects`,{name:e,industry:t})}async function R5(e){await k5.delete(`/projects/${e}`)}async function z5(e={}){let t=e.page&&e.page>0?e.page:1,n=e.pageSize&&e.pageSize>0?e.pageSize:10,r=new URLSearchParams;return e.projectId&&r.set(`project_id`,e.projectId),e.status&&r.set(`status`,e.status),r.set(`page`,String(t)),r.set(`page_size`,String(n)),k5.get(`/generation-records?${r.toString()}`,{signal:e.signal})}async function B5(e,t){return k5.post(`/generation-records/optimize`,{project_id:e,gen_type:t.genType,prompt:t.prompt,duration:t.duration,references:t.references||null,idempotency_key:t.idempotencyKey||null,image_size:t.image_size||null,image_proportion:t.image_proportion||null,image_px:t.image_px||null})}async function V5(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/generation-records/upload-image`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok)throw Error(`图片上传失败`);let i=await r.json();return{url:i.url,filename:i.filename}}async function H5(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/generation-records/upload-video`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok)throw Error(`视频上传失败`);let i=await r.json();return{url:i.url,filename:i.filename}}async function U5(e){await k5.post(`/generation-records/delete-file?url=${encodeURIComponent(e)}`)}async function W5(e,t){await k5.put(`/generation-records/${e}/prompt`,{optimized_prompt:t})}async function G5(e,t){return k5.post(`/generation-records/${e}/generate`,{aspect_ratio:t.aspectRatio,resolution:t.resolution})}async function K5(e=1,t=20){let n=new URLSearchParams;return n.set(`page`,String(e)),n.set(`page_size`,String(t)),k5.get(`/credits?${n.toString()}`)}async function q5(){return k5.get(`/auth/site-info`,!1)}async function J5(){return k5.get(`/video-engines`)}async function Y5(){return k5.get(`/image-engines`)}async function X5(e,t){await k5.post(`/sms/send`,{phone:e,scene:t},!1)}async function Z5(e=1,t=20,n){let r=new URLSearchParams;return r.set(`page`,String(e)),r.set(`page_size`,String(t)),n!==void 0&&r.set(`is_read`,String(n)),k5.get(`/notifications?${r.toString()}`)}async function Q5(){return(await k5.get(`/notifications/unread-count`)).count}async function $5(e){await k5.put(`/notifications/${e}/read`)}async function e7(){return(await k5.get(`/industries`)).map(e=>{let t=(Array.isArray(e.skills)?e.skills:[]).filter(e=>e&&e.type===`option_group`&&e.name&&Array.isArray(e.options)).map(e=>({name:e.name,options:e.options}));return{...e,optionGroups:t}})}async function t7(){return k5.get(`/menu-configs`)}async function n7(){return k5.get(`/recharge-packages`)}async function r7(){return k5.get(`/payments/methods`)}async function i7(e,t=`wechat`){return k5.post(`/payments/recharge`,{plan:e,method:t})}async function a7(e=1,t=20){let n=new URLSearchParams;return n.set(`page`,String(e)),n.set(`page_size`,String(t)),k5.get(`/payments/orders?${n.toString()}`)}async function o7(e){return k5.get(`/payments/orders/${e}`)}async function s7(e){return k5.post(`/payments/orders/${e}/cancel`)}async function c7(){return k5.get(`/credits/ratios`)}async function l7(){return k5.get(`/generation-ai/engines`)}async function u7(e){return k5.post(`/generation-ai/tasks`,e)}async function d7(e){return k5.get(`/generation-ai/tasks?page=`+e.page+`&page_size=`+e.pageSize)}async function f7(e){return k5.get(`/generation-ai/history`+e)}async function p7(e){return k5.get(`/generation-ai/history/`+e)}async function m7(e){await k5.delete(`/generation-ai/tasks/${e}`)}async function h7(){return k5.get(`/credits/credit-ratios`)}async function g7(e){return k5.post(`/hot-opening-replications/tasks`,e)}async function _7(e,t,n){let r=`/hot-opening-replications/tasks?page=${e}&page_size=${t}`;return n&&(r+=`&keyword=${encodeURIComponent(n)}`),k5.get(r)}async function v7(e){return k5.get(`/hot-opening-replications/tasks/${e}`)}async function y7(e,t){return k5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-image-prompt`)}async function b7(e,t,n){return k5.put(`/hot-opening-replications/tasks/${e}/steps/${t}/image-prompt`,n)}async function x7(e,t,n){return k5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-image`,n)}async function S7(e,t,n){return k5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-video-prompt`,n)}async function C7(e,t,n){return k5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-video`,n)}async function w7(e){return k5.post(`/user-oauth/request_oauth`,e)}async function T7(e){let t=new URLSearchParams;return t.set(`auth_code`,e.auth_code),t.set(`state`,e.state),e.app_id&&t.set(`app_id`,e.app_id),e.material_auth_status&&t.set(`material_auth_status`,e.material_auth_status),e.scope&&t.set(`scope`,e.scope),e.uid&&t.set(`uid`,e.uid),k5.get(`/user-oauth/juliang_callback?${t.toString()}`)}async function E7(e){let t=new URLSearchParams;return e.account_userid&&t.set(`account_userid`,e.account_userid),e.open_type!==void 0&&t.set(`open_type`,String(e.open_type)),e.account_id&&t.set(`account_id`,e.account_id),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),k5.get(`/user-oauth/oauth_list?${t.toString()}`)}async function D7(e){let t=e?.page||1,n=Math.min(e?.pageSize||10,100);return k5.get(`/pre-test-template/list?page=${t}&page_size=${n}`)}async function O7(e){return k5.post(`/pre-test-template/create`,e)}async function k7(e,t,n){return k5.put(`/hot-opening-replications/tasks/${e}/steps/${t}/video-prompt-schema`,n)}async function A7(e){return k5.post(`/shot-replications/task-sets`,e)}async function j7(e,t,n){let r=n?`/shot-replications/task-sets?page=${e}&page_size=${t}&keyword=${encodeURIComponent(n)}`:`/shot-replications/task-sets?page=${e}&page_size=${t}`;return k5.get(r)}async function M7(e){return k5.get(`/shot-replications/task-sets/${e}`)}async function N7(e,t){return k5.post(`/shot-replications/task-sets/${e}/split-by-ai`,t)}async function P7(e,t){return k5.post(`/shot-replications/task-sets/${e}/split-custom`,t)}async function F7(e){return k5.get(`/shot-replications/task-sets/${e}/segments`)}async function I7(e,t){return k5.post(`/shot-replications/segments/${e}/replication-projects`,t)}async function L7(e){return k5.get(`/shot-replications/projects/${e}`)}async function R7(e,t){return k5.post(`/shot-replications/projects/${e}/steps/${t}/generate-image-prompt`)}async function z7(e,t,n){return k5.put(`/shot-replications/projects/${e}/steps/${t}/image-prompt`,n)}async function B7(e,t,n){return k5.put(`/shot-replications/projects/${e}/steps/${t}/video-prompt-schema`,n)}async function V7(e,t,n){return k5.post(`/shot-replications/projects/${e}/steps/${t}/generate-image`,n)}async function H7(e,t,n){return k5.post(`/shot-replications/projects/${e}/steps/${t}/generate-video-prompt`,n)}async function U7(e,t,n){return k5.post(`/shot-replications/projects/${e}/steps/${t}/generate-video`,n)}async function W7(e){let t=new URLSearchParams;return e?.level&&t.set(`level`,e.level),e?.parent_code&&t.set(`parent_code`,e.parent_code),k5.get(`/pre-test-template/getArea?${t.toString()}`)}async function G7(e){return k5.post(`/upload-material/async-batch-upload`,e)}async function K7(e){let t=new URLSearchParams;e.status&&t.set(`status`,e.status),e.page&&t.set(`page`,String(e.page)),e.pageSize&&t.set(`page_size`,String(e.pageSize));let n=t.toString();return k5.get(`/upload-material/upload-history${n?`?${n}`:``}`)}async function q7(e){return k5.post(`/upload-material/batch-update-filename`,e)}async function J7(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.consume_date!==void 0&&t.set(`consume_date`,e.consume_date[0]+`,`+e.consume_date[1]),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),k5.get(`/material-consumption/list?${t.toString()}`)}async function Y7(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.date&&t.set(`date`,e.date),k5.get(`/material-consumption/sync?${t.toString()}`)}async function X7(){return k5.get(`/material-consumption/fields`)}async function Z7(e){return k5.post(`/contact/request`,e)}async function Q7(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.material_id&&t.set(`material_id`,e.material_id),e.upload_id&&t.set(`upload_id`,e.upload_id),e.file_name&&t.set(`file_name`,e.file_name),e.resource_type&&t.set(`resource_type`,e.resource_type),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),k5.get(`/resources-material/list?${t.toString()}`)}var $7=p5(e=>({user:null,loading:!0,login:async(t,n,r,i)=>{e({user:await A5(t,n,r,i)})},logout:async()=>{await N5(),e({user:null})},checkAuth:async()=>{try{if(!localStorage.getItem(`auth_token`)){e({user:null,loading:!1});return}e({user:await P5(),loading:!1})}catch(t){(t?.message?.includes(`401`)||t?.message?.includes(`Unauthorized`))&&localStorage.removeItem(`auth_token`),e({user:null,loading:!1})}},changePassword:async(e,t)=>{await F5(e,t)},refreshUser:async()=>{try{e({user:await P5()})}catch(e){console.error(`Failed to refresh user:`,e)}}})),ste=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),$=o(((e,t)=>{t.exports=ste()}))(),e9={system:{gradient:`linear-gradient(135deg, #6366f1, #818cf8)`,icon:(0,$.jsx)(j8,{}),label:`系统通知`},credit:{gradient:`linear-gradient(135deg, #f59e0b, #fbbf24)`,icon:(0,$.jsx)(y8,{}),label:`积分通知`},promo:{gradient:`linear-gradient(135deg, #8b5cf6, #a78bfa)`,icon:(0,$.jsx)(i3,{}),label:`活动通知`}},cte=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),o=$7(e=>e.refreshUser),s=(0,S.useCallback)(async()=>{try{let n=(await Z5(1,20,!1)).items||[];r(n),n.length>0&&!e&&(t(!0),a(0))}catch{}},[e]);(0,S.useEffect)(()=>{s();let e=setInterval(s,3e4);return()=>clearInterval(e)},[]);let c=async()=>{let e=n[i];if(e)try{await $5(e.id)}catch{}if(i{let e=n[i];if(e)try{await $5(e.id)}catch{}t(!1),r([]),a(0)};if(!e||n.length===0)return null;let u=n[i],d=e9[u.type]||e9.system;return(0,$.jsxs)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,zIndex:9999,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(15,15,35,0.6)`,backdropFilter:`blur(8px)`},onClick:l,children:[(0,$.jsxs)(`div`,{onClick:e=>e.stopPropagation(),style:{width:420,borderRadius:20,overflow:`hidden`,boxShadow:`0 32px 80px rgba(0,0,0,0.35)`,animation:`slideUp 0.35s cubic-bezier(0.16,1,0.3,1)`},children:[(0,$.jsxs)(`div`,{style:{background:d.gradient,padding:`28px 28px 24px`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-20,top:-20,width:120,height:120,borderRadius:`50%`,background:`rgba(255,255,255,0.1)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,right:50,bottom:-30,width:80,height:80,borderRadius:`50%`,background:`rgba(255,255,255,0.06)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,position:`relative`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:14,background:`rgba(255,255,255,0.2)`,display:`flex`,alignItems:`center`,justifyContent:`center`,backdropFilter:`blur(4px)`,fontSize:22,color:`#fff`},children:d.icon}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{color:`rgba(255,255,255,0.7)`,fontSize:12,marginBottom:2},children:`新消息通知`}),(0,$.jsx)(`div`,{style:{color:`#fff`,fontSize:17,fontWeight:700},children:u.title})]})]}),(0,$.jsx)(`div`,{onClick:l,style:{width:28,height:28,borderRadius:8,background:`rgba(255,255,255,0.15)`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`background 0.2s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(255,255,255,0.25)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(255,255,255,0.15)`},children:(0,$.jsx)(ku,{style:{color:`#fff`,fontSize:12}})})]})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,padding:`24px 28px 28px`},children:[(0,$.jsx)(`div`,{style:{padding:`18px 20px`,background:`#f8fafc`,borderRadius:14,marginBottom:20,border:`1px solid #f0f0f5`},children:(0,$.jsx)(`div`,{style:{fontSize:14,color:`#334155`,lineHeight:1.8},children:u.content})}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(T$,{color:d.gradient.includes(`#6366f1`)?`#6366f1`:d.gradient.includes(`#f59e0b`)?`#f59e0b`:`#8b5cf6`,style:{borderRadius:6,border:`none`,padding:`2px 10px`,fontSize:12},children:d.label}),n.length>1&&(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#94a3b8`},children:[i+1,` / `,n.length]})]}),(0,$.jsx)(vD,{type:`primary`,onClick:c,style:{borderRadius:10,fontWeight:600,height:38,background:d.gradient,border:`none`,paddingLeft:28,paddingRight:28,boxShadow:`0 6px 16px ${d.gradient.includes(`#6366f1`)?`rgba(99,102,241,0.3)`:d.gradient.includes(`#f59e0b`)?`rgba(245,158,11,0.3)`:`rgba(139,92,246,0.3)`}`},children:`我已知晓`})]}),n.length>1&&(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,gap:6,marginTop:18},children:n.map((e,t)=>(0,$.jsx)(`div`,{style:{width:t===i?22:6,height:6,borderRadius:3,background:t===i?d.gradient.includes(`#6366f1`)?`#6366f1`:d.gradient.includes(`#f59e0b`)?`#f59e0b`:`#8b5cf6`:`#e2e8f0`,transition:`all 0.3s ease`}},t))})]})]}),(0,$.jsx)(`style`,{children:` @keyframes slideUp { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } } - `})]})},e9={HomeOutlined:(0,$.jsx)(C3,{}),DashboardOutlined:(0,$.jsx)(R4,{}),CodeOutlined:(0,$.jsx)(C4,{}),PlayCircleOutlined:(0,$.jsx)(b6,{}),WalletOutlined:(0,$.jsx)(X8,{}),SettingOutlined:(0,$.jsx)(q6,{}),BellOutlined:(0,$.jsx)(R2,{}),UserOutlined:(0,$.jsx)(W8,{}),AppstoreOutlined:(0,$.jsx)(m2,{}),FileTextOutlined:(0,$.jsx)(IU,{}),StarOutlined:(0,$.jsx)(_8,{}),HeartOutlined:(0,$.jsx)(m3,{}),CameraOutlined:(0,$.jsx)($2,{}),RobotOutlined:(0,$.jsx)(b6,{}),CalculatorOutlined:(0,$.jsx)(X2,{}),DollarOutlined:(0,$.jsx)(W4,{}),GiftOutlined:(0,$.jsx)(c3,{}),ThunderboltOutlined:(0,$.jsx)(k8,{}),FireOutlined:(0,$.jsx)(n3,{}),CloudOutlined:(0,$.jsx)(m4,{}),SmileOutlined:(0,$.jsx)(c8,{}),TrophyOutlined:(0,$.jsx)(F8,{}),RocketOutlined:(0,$.jsx)(F6,{}),BulbOutlined:(0,$.jsx)(q2,{}),PictureOutlined:(0,$.jsx)(d6,{}),VideoCameraOutlined:(0,$.jsx)(q8,{}),AudioOutlined:(0,$.jsx)(E2,{}),MailOutlined:(0,$.jsx)(W3,{}),PhoneOutlined:(0,$.jsx)(c6,{}),GlobalOutlined:(0,$.jsx)(d3,{}),ShoppingCartOutlined:(0,$.jsx)(X6,{}),TeamOutlined:(0,$.jsx)(E8,{}),BarChartOutlined:(0,$.jsx)(F2,{}),PieChartOutlined:(0,$.jsx)(m6,{}),LineChartOutlined:(0,$.jsx)(F3,{}),SecurityScanOutlined:(0,$.jsx)(V6,{}),ApiOutlined:(0,$.jsx)(d2,{}),DatabaseOutlined:(0,$.jsx)(V4,{}),CloudServerOutlined:(0,$.jsx)(_4,{})},t9=240,n9=[{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(DJ,{})},{gradient:`linear-gradient(135deg, #4a5568, #2d3748)`,shadow:`rgba(74,85,104,0.25)`,icon:(0,$.jsx)($4,{})},{gradient:`linear-gradient(135deg, #718096, #4a5568)`,shadow:`rgba(113,128,150,0.25)`,icon:(0,$.jsx)(M4,{})},{gradient:`linear-gradient(135deg, #5a67d8, #434190)`,shadow:`rgba(90,103,216,0.25)`,icon:(0,$.jsx)(k2,{})}],rte=()=>{let e=Je(),t=Ge(),{user:n,logout:r}=X7(),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c]=TW.useForm(),[l,u]=(0,S.useState)(null),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)({}),[_,v]=(0,S.useState)(0),[y,b]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteName||``;return t&&(document.title=t),t}),[x,C]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteLogo||``;if(t){let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=t,e.type=`image/png`}return t}),[w,T]=(0,S.useState)(!localStorage.getItem(`siteInfo`)),[E,D]=(0,S.useState)(!1),[O,k]=(0,S.useState)(null),[A,j]=(0,S.useState)(`alipay`),[M,N]=(0,S.useState)(!1),[P,F]=(0,S.useState)(180),I=(0,S.useRef)(null),L=(0,S.useRef)(null),R=(0,S.useRef)(null),[z,B]=(0,S.useState)({alipay:!1,wechat:!1}),V=`pending_payment_order`;(0,S.useEffect)(()=>{G5().then(e=>{let t=e.siteName||`民众智创`,n=e.siteLogo||``;if(t!==y&&(b(t),document.title=t),n&&n!==x){C(n);let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=n,e.type=`image/png`}localStorage.setItem(`siteInfo`,JSON.stringify({siteName:t,siteLogo:n}))}).catch(()=>{})},[]);let H=()=>{X5().then(e=>{v(e)}).catch(()=>{})};(0,S.useEffect)(()=>{(async()=>{let e=localStorage.getItem(V);if(e)try{let t=JSON.parse(e),n=await i7(t.orderNo);if(n.status===`pending`){k({price:t.price,credits:t.credits,qrCode:t.qrCode,method:t.method}),R.current=t.orderNo;let e=Date.now(),n=new Date(t.createdAt).getTime(),r=t.timeoutSeconds||180,i=Math.floor((e-n)/1e3),a=Math.max(0,r-i);a>0?(D(!0),q(t.orderNo,a)):localStorage.removeItem(V)}else n.status===`paid`?(Z.success(`支付成功!积分已到账`),X7.getState().refreshUser(),localStorage.removeItem(V)):localStorage.removeItem(V)}catch{localStorage.removeItem(V)}})()},[]),(0,S.useEffect)(()=>{$5().then(e=>{f(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),e7().then(e=>{m(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),t7().then(e=>{B(e),e.alipay?j(`alipay`):e.wechat&&j(`wechat`)}).catch(()=>{}),H()},[n]);let U=t.pathname.startsWith(`/records`)?`/records`:t.pathname,ee=t9,te=[{key:`profile`,icon:(0,$.jsx)(W8,{}),label:`账号: ${n?.username}`,disabled:!0},{key:`credits`,icon:(0,$.jsx)(X8,{style:{color:`#c9a96e`}}),label:`积分: ${n?.credits??0}`,disabled:!0},{type:`divider`},{key:`myCredits`,icon:(0,$.jsx)(X8,{}),label:`积分明细`},{key:`orderRecords`,icon:(0,$.jsx)(IU,{}),label:`订单记录`},{key:`messages`,icon:(0,$.jsx)(R2,{}),label:`消息中心${_>0?`(${_})`:``}`},{type:`divider`},{key:`changePwd`,icon:(0,$.jsx)(R3,{}),label:`修改密码`},{type:`divider`},{key:`logout`,icon:(0,$.jsx)(V3,{}),label:`退出登录`,danger:!0}],ne=({key:t})=>{t===`logout`?(r(),e(`/login`)):t===`changePwd`?a(!0):t===`messages`?e(`/messages`):t===`recharge`?s(!0):t===`myCredits`?e(`/user-center?tab=credits`):t===`orderRecords`&&e(`/user-center?tab=orders`)},W=async()=>{try{await c.validateFields(),Z.success(`密码修改成功(演示)`),a(!1),c.resetFields()}catch{}},re=()=>{r(),e(`/login`)},G=()=>{s(!0)},K=(0,S.useCallback)(()=>{I.current&&=(clearInterval(I.current),null),L.current&&=(clearInterval(L.current),null)},[]),q=(0,S.useCallback)((e,t=180)=>{K(),F(t),I.current=setInterval(async()=>{try{let t=await i7(e);t.status===`paid`?(K(),R.current=null,localStorage.removeItem(V),Z.success(`支付成功!积分已到账`),X7.getState().refreshUser(),D(!1),k(null),u(null)):t.status===`cancelled`&&(K(),R.current=null,localStorage.removeItem(V))}catch{}},2e3),L.current=setInterval(()=>{F(e=>e<=1?(K(),R.current&&=(a7(R.current).catch(()=>{}),null),localStorage.removeItem(V),Z.warning(`订单已超时,请重新充值`),D(!1),k(null),u(null),0):e-1)},1e3)},[K]);return(0,$.jsxs)(hK,{style:{minHeight:`100vh`},children:[(0,$.jsxs)(`div`,{className:`desktop-sidebar`,style:{width:ee,position:`fixed`,left:16,top:16,bottom:16,zIndex:100,background:`linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,display:`flex`,flexDirection:`column`,transition:`width 0.25s ease, left 0.25s ease`,overflow:`hidden`,border:`1px solid rgba(0, 0, 0, 0.06)`},children:[(0,$.jsx)(`div`,{style:{height:80,display:`flex`,alignItems:`center`,justifyContent:`flex-start`,padding:`0 20px`,flexShrink:0,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14},children:[(0,$.jsx)(`div`,{style:{width:42,height:42,borderRadius:14,flexShrink:0,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,overflow:`hidden`},children:x?(0,$.jsx)(`img`,{src:x,alt:`logo`,style:{width:28,height:28,objectFit:`contain`}}):(0,$.jsx)(k8,{style:{fontSize:20,color:`#ffffff`}})}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:17,fontWeight:700,letterSpacing:-.02,whiteSpace:`nowrap`,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:y})]})}),(0,$.jsx)(`div`,{style:{flex:1,padding:`8px 8px`,overflow:`auto`},children:(()=>{let t={};d.forEach(e=>{let n=e.parent_id??e.parentId;n&&(t[n]||(t[n]=[]),t[n].push(e))});let n=d.filter(e=>!(e.parent_id??e.parentId));n.sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0));let r=[],i=(t,n=0)=>{let r=t.path===U,i=e9[t.icon]||(0,$.jsx)(C3,{});return(0,$.jsxs)(`div`,{onClick:()=>t.path&&e(t.path),style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:12,padding:n>0?`8px 14px 8px 36px`:`10px 16px`,borderRadius:12,margin:`2px 6px`,cursor:`pointer`,fontSize:n>0?13:14,fontWeight:r?600:400,color:r?`#4f46e5`:`#475569`,background:r?`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%)`:`transparent`,transition:`all 0.2s ease`},children:[(0,$.jsx)(`span`,{style:{fontSize:n>0?14:16,flexShrink:0,color:r?`#6366f1`:`#64748b`},children:i}),(0,$.jsx)(`span`,{style:{whiteSpace:`nowrap`},children:t.label})]},t.id)};return n.forEach(e=>{if((e.menu_type??e.menuType)===`group`){let n=(t[e.id]||[]).sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0));r.push((0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12,fontWeight:600,padding:`12px 16px 6px`,letterSpacing:.5,textTransform:`uppercase`},children:e.label}),n.map(e=>i(e,1))]},e.id))}else r.push(i(e))}),r})()}),(0,$.jsxs)(`div`,{onClick:()=>s(!0),style:{margin:`8px 12px`,padding:`12px 20px`,borderRadius:14,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8,color:`#ffffff`,fontSize:14,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%)`,e.currentTarget.style.transform=`translateY(-1px)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.5)`},onMouseLeave:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(99, 102, 241, 0.4)`},children:[(0,$.jsx)(bR,{style:{fontSize:16}}),(0,$.jsx)(`span`,{children:`充值积分`})]}),(0,$.jsx)(`div`,{style:{padding:`16px 16px`,flexShrink:0},children:(0,$.jsx)(NU,{menu:{items:te,onClick:ne},placement:`topRight`,arrow:!0,children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:12,padding:`10px 14px`,borderRadius:14,cursor:`pointer`,transition:`all 0.25s ease`,background:`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,boxShadow:`0 2px 12px rgba(0, 0, 0, 0.04)`},onMouseEnter:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #ffffff 0%, #f8fafc 100%)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0, 0, 0, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.background=`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,e.currentTarget.style.boxShadow=`0 2px 12px rgba(0, 0, 0, 0.04)`},children:[(0,$.jsx)(dT,{size:36,icon:(0,$.jsx)(W8,{}),style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,flexShrink:0,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`}}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsx)(`div`,{style:{color:`#1e293b`,fontSize:14,fontWeight:600,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,letterSpacing:-.01},children:n?.username}),(0,$.jsxs)(`div`,{style:{color:`#6366f1`,fontSize:12,fontWeight:500,letterSpacing:0,background:`rgba(99, 102, 241, 0.08)`,padding:`2px 8px`,borderRadius:6,display:`inline-block`},children:[`积分: `,n?.credits||0]})]})]})})})]}),(0,$.jsx)(`div`,{className:`desktop-content`,style:{marginLeft:ee+28,marginRight:12,marginTop:16,marginBottom:16,flex:1,minHeight:`calc(100vh - 32px)`,background:`transparent`,padding:0,transition:`margin-left 0.25s ease`},children:(0,$.jsx)(`div`,{style:{boxSizing:`border-box`,height:`100%`,background:`#ffffffff`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,minHeight:`100%`,padding:`24px 32px 32px`,border:`1px solid rgba(0, 0, 0, 0.06)`},children:(0,$.jsx)(Ct,{})})}),(0,$.jsxs)(`div`,{className:`mobile-bottom-nav`,children:[d.filter(e=>(e.menu_type??e.menuType)!==`group`).map(t=>t.path?(0,$.jsxs)(`div`,{className:`nav-item ${t.path===U?`active`:``}`,onClick:()=>e(t.path),children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:e9[t.icon]||(0,$.jsx)(C3,{})}),(0,$.jsx)(`span`,{children:t.label})]},t.id):null),(0,$.jsxs)(`div`,{className:`nav-item`,onClick:G,children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:(0,$.jsx)(C6,{})}),(0,$.jsx)(`span`,{children:`充值`})]}),(0,$.jsxs)(`div`,{className:`nav-item`,onClick:re,children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:(0,$.jsx)(V3,{})}),(0,$.jsx)(`span`,{children:`退出`})]})]}),(0,$.jsx)(Rq,{title:(0,$.jsxs)(jU,{children:[(0,$.jsx)(R3,{}),`修改密码`]}),open:i,onOk:W,onCancel:()=>{a(!1),c.resetFields()},okText:`确认修改`,cancelText:`取消`,width:440,children:(0,$.jsxs)(TW,{form:c,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(TW.Item,{name:`oldPwd`,label:`原密码`,rules:[{required:!0,message:`请输入原密码`}],children:(0,$.jsx)(oK.Password,{placeholder:`请输入原密码`,size:`large`,prefix:(0,$.jsx)(R3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(TW.Item,{name:`newPwd`,label:`新密码`,rules:[{required:!0,message:`请输入新密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(oK.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`,prefix:(0,$.jsx)(R3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(TW.Item,{name:`confirmPwd`,label:`确认新密码`,rules:[{required:!0,message:`请再次输入新密码`},({getFieldValue:e})=>({validator(t,n){return!n||e(`newPwd`)===n?Promise.resolve():Promise.reject(Error(`两次密码不一致`))}})],children:(0,$.jsx)(oK.Password,{placeholder:`请再次输入新密码`,size:`large`,prefix:(0,$.jsx)(R3,{style:{color:`#94a3b8`,marginRight:8}})})})]})}),(0,$.jsx)(Rq,{title:(0,$.jsxs)(jU,{children:[(0,$.jsx)(c3,{}),`积分充值`]}),open:o,onCancel:()=>{s(!1),u(null)},footer:null,width:680,children:(0,$.jsxs)(`div`,{style:{marginTop:16},children:[(0,$.jsxs)(jU,{style:{marginBottom:16},children:[(0,$.jsx)(X8,{style:{color:`#6366f1`}}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,letterSpacing:0},children:`当前积分余额`}),(0,$.jsx)(Q.Text,{strong:!0,style:{color:`#6366f1`,fontSize:20,fontWeight:600},children:n?.credits??0})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12,flexWrap:`wrap`},children:p.map((e,t)=>{let n=n9[t%n9.length],r=(e.credits||0)+(e.bonus_credits||e.bonusCredits||0);return(0,$.jsxs)(`div`,{onClick:()=>u(e.id),style:{flex:`1 1 45%`,minWidth:200,borderRadius:16,padding:`20px 16px`,background:l===e.id?`rgba(99,102,241,0.04)`:`#fafbff`,border:l===e.id?`2px solid #6366f1`:`1px solid #f0f0f5`,cursor:`pointer`,position:`relative`,transition:`all 0.2s`},children:[e.description&&(0,$.jsx)(k$,{color:`purple`,style:{position:`absolute`,top:-10,left:`50%`,transform:`translateX(-50%)`,borderRadius:8,fontSize:11},children:e.description}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:44,height:44,borderRadius:12,flexShrink:0,background:n.gradient,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:18,color:`#fff`,boxShadow:`0 6px 16px ${n.shadow}`},children:n.icon}),(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:6},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15},children:e.name}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[r.toLocaleString(),` 积分`]})]}),(0,$.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,marginTop:4,background:n.gradient,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:[`¥`,e.price]})]})]})]},e.id)})}),!z.alipay&&!z.wechat?(0,$.jsx)(`div`,{style:{marginTop:20,marginBottom:8,padding:16,background:`#fef2f2`,borderRadius:12,border:`1px solid #fecaca`},children:(0,$.jsx)(Q.Text,{style:{color:`#dc2626`,fontSize:13},children:`⚠️ 暂无可用的支付方式,请联系管理员开启支付功能`})}):(0,$.jsxs)(`div`,{style:{marginTop:20,marginBottom:8},children:[(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13,marginBottom:8,display:`block`},children:`选择支付方式`}),(0,$.jsxs)(RL.Group,{value:A,onChange:e=>j(e.target.value),style:{display:`flex`,gap:12},children:[z.alipay&&(0,$.jsxs)(RL.Button,{value:`alipay`,style:{flex:1,textAlign:`center`,borderRadius:10,height:44,lineHeight:`42px`,borderColor:A===`alipay`?`#1677ff`:void 0,color:A===`alipay`?`#1677ff`:void 0},children:[(0,$.jsx)(c2,{style:{fontSize:16,marginRight:6}}),`支付宝`]}),z.wechat&&(0,$.jsxs)(RL.Button,{value:`wechat`,style:{flex:1,textAlign:`center`,borderRadius:10,height:44,lineHeight:`42px`,borderColor:A===`wechat`?`#07c160`:void 0,color:A===`wechat`?`#07c160`:void 0},children:[(0,$.jsx)(n5,{style:{fontSize:16,marginRight:6}}),`微信支付`]})]})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:[(0,$.jsx)(bD,{size:`large`,onClick:()=>{s(!1),u(null)},style:{borderRadius:10,marginRight:12},children:`取消`}),(0,$.jsx)(bD,{type:`primary`,size:`large`,disabled:!l||!z.alipay&&!z.wechat,loading:M,onClick:async()=>{let e=p.find(e=>e.id===l);if(!e)return;let t=(e.credits||0)+(e.bonus_credits||e.bonusCredits||0);try{N(!0);let n=await n7(e.id,A),r=n.qrUrl||n.codeUrl||n.qr_code||n.code_url;(n.paymentMethod===`alipay`||n.paymentMethod===`wechat`)&&r?(k({price:e.price,credits:t,qrCode:r,method:n.paymentMethod}),s(!1),D(!0),R.current=n.orderNo,localStorage.setItem(V,JSON.stringify({orderNo:n.orderNo,price:e.price,credits:t,qrCode:r,method:n.paymentMethod,createdAt:n.createdAt||new Date().toISOString(),timeoutSeconds:180})),q(n.orderNo)):(Z.success(`充值成功!积分已到账`),X7.getState().refreshUser(),s(!1),u(null))}catch(e){Z.error(e?.message||`创建订单失败,请重试`)}finally{N(!1)}},style:{borderRadius:10,fontWeight:600,background:l?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#d1d5db`,border:`none`,boxShadow:l?`0 8px 24px rgba(99,102,241,0.3)`:`none`},children:`确认充值`})]})]})}),(0,$.jsx)(Rq,{open:E,onCancel:async()=>{if(K(),R.current){try{await a7(R.current)}catch{}R.current=null}localStorage.removeItem(V),D(!1),k(null)},footer:null,width:400,closable:!1,styles:{body:{padding:0,borderRadius:16,overflow:`hidden`}},children:(0,$.jsxs)(`div`,{style:{padding:`24px`},children:[(0,$.jsxs)(`div`,{style:{textAlign:`center`,marginBottom:24},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,background:O?.method===`alipay`?`linear-gradient(135deg, #1677ff, #0958d9)`:`linear-gradient(135deg, #07c160, #06ae56)`,borderRadius:16,display:`flex`,alignItems:`center`,justifyContent:`center`,margin:`0 auto 12px`},children:O?.method===`alipay`?(0,$.jsx)(c2,{style:{fontSize:24,color:`#fff`}}):(0,$.jsx)(n5,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:O?.method===`alipay`?`支付宝支付`:`微信支付`}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:O?.method===`alipay`?`请使用支付宝扫描二维码完成支付`:`请使用微信扫描二维码完成支付`})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:16,padding:20,display:`flex`,flexDirection:`column`,alignItems:`center`,boxShadow:`0 4px 20px rgba(0,0,0,0.08)`},children:[(0,$.jsx)(`div`,{style:{width:180,height:180,borderRadius:12,overflow:`hidden`,background:`#fff`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:O&&(0,$.jsx)(a2,{value:O.qrCode,size:160,level:`M`,includeMargin:!1})}),(0,$.jsxs)(`div`,{style:{marginTop:16,textAlign:`center`},children:[(0,$.jsxs)(`div`,{style:{fontSize:28,fontWeight:700,color:`#1a1a2e`},children:[`¥`,O?.price||0]}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`,marginTop:4},children:[`购买 `,O?.credits||0,` 积分`]}),(0,$.jsx)(`div`,{style:{marginTop:12,padding:`8px 16px`,background:P<=30?`#fef2f2`:`#f0f9ff`,borderRadius:8,border:P<=30?`1px solid #fecaca`:`1px solid #bae6fd`,display:`inline-block`},children:(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:P<=30?`#dc2626`:`#0284c7`},children:[`订单将在 `,(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:800},children:P}),` 秒后关闭`]})})]})]}),(0,$.jsx)(`div`,{style:{marginTop:20,padding:16,background:`#fef3c7`,borderRadius:12},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:8},children:[(0,$.jsx)(`div`,{style:{fontSize:16,marginTop:-2},children:`💡`}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#92400e`},children:[(0,$.jsx)(`div`,{style:{fontWeight:500,marginBottom:4},children:`支付提示`}),(0,$.jsxs)(`ul`,{style:{margin:0,paddingLeft:16},children:[(0,$.jsx)(`li`,{style:{marginBottom:2},children:`请在支付后等待页面自动跳转`}),(0,$.jsx)(`li`,{children:`如支付成功但未到账,请联系客服`})]})]})]})}),(0,$.jsx)(`div`,{style:{marginTop:20},children:(0,$.jsx)(bD,{size:`large`,block:!0,onClick:async()=>{if(K(),R.current){try{await a7(R.current)}catch{}R.current=null}localStorage.removeItem(V),D(!1),k(null),u(null)},style:{borderRadius:10},children:`取消支付`})})]})}),(0,$.jsx)($7,{})]})},ite=`http://localhost:8000/api`,ate=()=>{let{checkAuth:e}=X7(),[t,n]=(0,S.useState)(!1),[r,i]=(0,S.useState)(`password`),[a,o]=(0,S.useState)(`password`),[s,c]=(0,S.useState)(0),[l,u]=(0,S.useState)(0),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(!1),[_,v]=(0,S.useState)(!1),[y,b]=(0,S.useState)(0),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),E=(()=>{try{let e=localStorage.getItem(`siteInfo`);if(e){let t=JSON.parse(e);return{siteName:t.siteName||`VideoGen.AI`,siteLogo:t.siteLogo||``}}}catch{}return{siteName:`VideoGen.AI`,siteLogo:``}})(),[D,O]=(0,S.useState)(E.siteName),[k,A]=(0,S.useState)(E.siteLogo),[j,M]=(0,S.useState)(``),[N,P]=(0,S.useState)(``),F=Je(),{login:I}=X7(),[L]=TW.useForm(),[R]=TW.useForm(),[z]=TW.useForm();(0,S.useEffect)(()=>{G5().then(e=>{O(e.siteName),A(e.siteLogo),M(e.userAgreementUrl),P(e.privacyPolicyUrl)}).catch(()=>{})},[]);let B=()=>d?!0:(Z.warning(`请先阅读并同意用户协议和隐私政策`),!1),V=async()=>{if(B())try{let t=await L.validateFields();await I(t.phone,t.password,void 0,t.rememberMe),Z.success(`登录成功,欢迎回来`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}},H=async()=>{if(B())try{let t=R.getFieldsValue();if(!t.phone||!t.code){Z.error(`请填写手机号和验证码`);return}n(!0),await k5(t.phone,t.code),Z.success(`登录成功,欢迎回来`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}finally{n(!1)}},U=async()=>{if(B())try{let t=await z.validateFields();n(!0),await A5(t.phone,t.regCode,t.password),Z.success(`注册成功`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`注册失败`;Z.error(t)}finally{n(!1)}},ee=(e,t)=>{e(60);let n=setInterval(()=>{e(e=>e<=1?(clearInterval(n),m(!1),t?C(!0):T(!0),0):e-1)},1e3)};(0,S.useEffect)(()=>{s===0&&r===`phone`&&v(!1)},[s,r]);let te=async(e,t)=>{try{if(!e||!/^1\d{10}$/.test(e)){Z.error(`请输入正确的手机号`);return}if(t){m(!0),g(!1);return}if(!_){m(!0),v(!1);return}let n=``;n=r===`register`?`register`:`login`,await J5(e,n),ee(t?u:c),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(g(!1),u(0)):(v(!1),c(0)),b(e=>e+1)}},ne=async(e=!1)=>{let t=r===`register`?z.getFieldValue(`phone`):R.getFieldValue(`phone`);try{let e=``;e=r===`register`?`register`:`login`,await J5(t,e),r===`register`?(g(!0),ee(u,!0)):(v(!0),ee(c,!1)),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(g(!1),u(0),C(!0)):(v(!1),c(0),T(!0)),b(e=>e+1)}},W=e=>{o(e),i(e),c(0),u(0),v(!1),g(!1),m(!1),C(!1),T(!1),b(e=>e+1),e===`password`?L.resetFields():R.resetFields()},re=[{icon:(0,$.jsx)(q2,{}),title:`AI 智能优化`,desc:`输入原始提示词,AI 自动为您生成专业级视频、图片描述`},{icon:(0,$.jsx)(b6,{}),title:`一键生成视频、图片`,desc:`支持多种规格生成视频、图片`},{icon:(0,$.jsx)(b3,{}),title:`项目维度管理`,desc:`按项目行业分类视频、图片,支持多种行业`}],G={background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,height:48,borderRadius:10,fontSize:14},K=e=>{e&&window.open(`${ite.replace(/\/api$/,``)}${e}`,`_blank`)};return(0,$.jsxs)(`div`,{style:{minHeight:`100vh`,display:`flex`,backgroundImage:`url(/backimage.png)`,backgroundSize:`cover`,backgroundPosition:`center`,backgroundRepeat:`no-repeat`,backgroundAttachment:`fixed`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(135deg, rgba(240,244,255,0.9) 0%, rgba(232,236,248,0.85) 40%, rgba(240,240,255,0.9) 70%, rgba(248,249,255,0.95) 100%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,width:500,height:500,borderRadius:`50%`,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,top:-150,right:-100,filter:`blur(40px)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,width:400,height:400,borderRadius:`50%`,background:`radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%)`,bottom:-100,left:-80,filter:`blur(50px)`}}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`center`,padding:`0 80px`,zIndex:1},children:(0,$.jsxs)(jU,{direction:`vertical`,size:36,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:20},children:[k?(0,$.jsx)(`img`,{src:k,alt:`logo`,style:{width:52,height:52,borderRadius:14,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:(0,$.jsx)(k8,{style:{fontSize:26,color:`#fff`}})}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:28,fontWeight:800,letterSpacing:-.5},children:D})]}),(0,$.jsx)(`div`,{className:`shiny-text-container`,children:(0,$.jsx)(`span`,{className:`shiny-text`,children:`AI赋能创意,素材触手可及`})}),(0,$.jsxs)(Q.Paragraph,{style:{color:`#64748b`,fontSize:17,maxWidth:480,lineHeight:1.8},children:[`专业的 AI 素材生成平台,通过智能提示词优化,`,(0,$.jsx)(`br`,{}),`让您的创意快速转化为精美视频、图片`]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:20},children:re.map((e,t)=>(0,$.jsxs)(`div`,{className:`electric-border-card`,style:{position:`relative`,display:`flex`,gap:16,alignItems:`flex-start`,padding:`18px 22px`,borderRadius:14,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(12px)`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{className:`electric-border`}),(0,$.jsx)(`div`,{className:`electric-border-inner`}),(0,$.jsx)(`div`,{style:{position:`relative`,zIndex:1},children:(0,$.jsx)(`div`,{style:{width:44,height:44,borderRadius:12,flexShrink:0,background:`linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15))`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#6366f1`,fontSize:20},children:e.icon})}),(0,$.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,$.jsx)(Q.Text,{style:{color:`#1e293b`,fontSize:15,fontWeight:600,display:`block`,marginBottom:4},children:e.title}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13,lineHeight:1.6},children:e.desc})]})]},t))})]})}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1,padding:`40px 24px`},children:(0,$.jsxs)(Mz,{style:{width:440,maxWidth:`100%`,borderRadius:20,boxShadow:`0 20px 60px rgba(0,0,0,0.08)`,border:`1px solid #e2e8f0`,background:`#fff`},styles:{body:{padding:`36px 28px`}},children:[(0,$.jsx)(Q.Title,{level:3,style:{textAlign:`center`,marginBottom:6,color:`#1e293b`,fontWeight:700},children:r===`register`?`创建账号`:`欢迎回来`}),(0,$.jsx)(Q.Text,{style:{display:`block`,textAlign:`center`,marginBottom:28,color:`#94a3b8`,fontSize:14},children:r===`register`?`注册新账号,开始创作视频`:`登录您的账号,开始创作视频`}),r!==`register`&&(0,$.jsx)(`div`,{style:{display:`flex`,gap:0,marginBottom:24,background:`#f1f5f9`,borderRadius:10,padding:4,border:`1px solid #e2e8f0`},children:[`password`,`phone`].map(e=>(0,$.jsx)(`div`,{onClick:()=>W(e),style:{flex:1,textAlign:`center`,padding:`10px 0`,borderRadius:8,cursor:`pointer`,fontSize:14,fontWeight:a===e?600:400,color:a===e?`#6366f1`:`#64748b`,background:a===e?`#fff`:`transparent`,border:a===e?`1px solid rgba(99,102,241,0.2)`:`1px solid transparent`,boxShadow:a===e?`0 2px 8px rgba(99,102,241,0.1)`:`none`,transition:`all 0.3s ease`},children:e===`password`?`密码登录`:`验证码登录`},e))}),r===`password`&&(0,$.jsxs)(TW,{form:L,size:`large`,layout:`vertical`,onFinish:V,children:[(0,$.jsx)(TW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(oK,{prefix:(0,$.jsx)(X3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,style:G})}),(0,$.jsx)(TW.Item,{name:`password`,rules:[{required:!0,message:`请输入密码`}],children:(0,$.jsx)(oK.Password,{prefix:(0,$.jsx)(R3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入密码`,style:G})}),(0,$.jsx)(TW.Item,{name:`rememberMe`,valuePropName:`checked`,style:{marginBottom:12},children:(0,$.jsx)(lV,{children:`记住我的登录状态`})}),(0,$.jsx)(TW.Item,{style:{marginBottom:12},children:(0,$.jsx)(bD,{type:`primary`,htmlType:`submit`,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登 录`})})]}),r===`phone`&&(0,$.jsxs)(TW,{form:R,size:`large`,layout:`vertical`,children:[(0,$.jsx)(TW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(oK,{prefix:(0,$.jsx)(X3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:G})}),(0,$.jsx)(TW.Item,{name:`code`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(jU.Compact,{style:{width:`100%`},children:[(0,$.jsx)(oK,{prefix:(0,$.jsx)(R6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!_,style:{...G,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(bD,{disabled:s>0,onClick:()=>{w?(v(!1),m(!0),b(e=>e+1)):te(R.getFieldValue(`phone`))},style:{height:48,borderRadius:`0 10px 10px 0`,background:s>0||_?`#f1f5f9`:`rgba(99,102,241,0.1)`,border:`1.5px solid #e2e8f0`,borderLeft:`none`,color:s>0?`#94a3b8`:`#6366f1`,fontWeight:600,minWidth:100},children:s>0?`${s}s`:w?`重新发送`:`获取验证码`})]})}),p&&(0,$.jsx)(TW.Item,{style:{marginBottom:12},children:(0,$.jsx)(r9,{onSuccess:ne,isVerified:_})},y),(0,$.jsx)(TW.Item,{style:{marginBottom:12},children:(0,$.jsx)(bD,{type:`primary`,onClick:H,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登 录`})})]}),r===`register`&&(0,$.jsxs)(TW,{form:z,size:`large`,layout:`vertical`,children:[(0,$.jsx)(TW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(oK,{prefix:(0,$.jsx)(X3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:G})}),(0,$.jsx)(TW.Item,{name:`regCode`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(jU.Compact,{style:{width:`100%`},children:[(0,$.jsx)(oK,{prefix:(0,$.jsx)(R6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!h,style:{...G,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(bD,{disabled:l>0,onClick:()=>{x?(g(!1),m(!0),b(e=>e+1)):te(z.getFieldValue(`phone`),!0)},style:{height:48,borderRadius:`0 10px 10px 0`,background:l>0||h?`#f1f5f9`:`rgba(99,102,241,0.1)`,border:`1.5px solid #e2e8f0`,borderLeft:`none`,color:l>0?`#94a3b8`:`#6366f1`,fontWeight:600,minWidth:100},children:l>0?`${l}s`:x?`重新发送`:`获取验证码`})]})}),p&&(0,$.jsx)(TW.Item,{style:{marginBottom:12},children:(0,$.jsx)(r9,{onSuccess:ne,isVerified:h})},y),(0,$.jsx)(TW.Item,{name:`password`,rules:[{required:!0,message:`请设置密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(oK.Password,{prefix:(0,$.jsx)(R3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请设置密码(至少6位)`,style:G})}),(0,$.jsx)(TW.Item,{style:{marginBottom:12},children:(0,$.jsx)(bD,{type:`primary`,onClick:U,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`注 册`})})]}),(0,$.jsx)(`div`,{style:{marginBottom:16},children:(0,$.jsx)(lV,{checked:d,onChange:e=>f(e.target.checked),children:(0,$.jsxs)(`span`,{style:{fontSize:13,color:`#64748b`},children:[`我已阅读并同意`,(0,$.jsx)(`span`,{onClick:e=>{e.stopPropagation(),K(j)},style:{color:`#6366f1`,cursor:`pointer`},children:`《用户协议》`}),`和`,(0,$.jsx)(`span`,{onClick:e=>{e.stopPropagation(),K(N)},style:{color:`#6366f1`,cursor:`pointer`},children:`《隐私政策》`})]})})}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:r===`register`?(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#6366f1`,cursor:`pointer`},onClick:()=>{i(`password`),o(`password`),C(!1),T(!1),g(!1),m(!1),b(e=>e+1),z.resetFields()},children:`已有账号?去登录`}):(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#6366f1`,cursor:`pointer`},onClick:()=>{i(`register`),C(!1),T(!1),g(!1),m(!1),b(e=>e+1)},children:`没有账号?立即注册`})})]})})]})},r9=({onSuccess:e,isVerified:t})=>{let n=S.useRef(null),r=S.useRef(null),i=S.useRef(null),a=S.useRef(0),o=S.useRef(!1),[s,c]=S.useState(360),l=s-50;S.useEffect(()=>{let e=()=>{if(n.current){let e=n.current.offsetWidth;e>0&&c(e)}};e();let t=new ResizeObserver(e);return n.current&&t.observe(n.current),window.addEventListener(`resize`,e),()=>{t.disconnect(),window.removeEventListener(`resize`,e)}},[]);let u=n=>{if(o.current||t)return;let c=Math.max(0,Math.min(n,l));a.current=c,r.current&&(r.current.style.left=`${c}px`),i.current&&(i.current.style.width=`${c+50}px`),c>=l-5&&(o.current=!0,r.current&&(r.current.style.background=`#22c55e`,r.current.innerHTML=``),i.current&&(i.current.style.width=`${s}px`,i.current.style.background=`#dcfce7`),e())};return(0,$.jsxs)(`div`,{ref:n,onMouseDown:e=>{if(e.preventDefault(),o.current||t)return;let s=n.current;if(!s)return;let c=s.getBoundingClientRect(),d=e=>{u(e.clientX-c.left-50/2)},f=()=>{document.removeEventListener(`mousemove`,d),document.removeEventListener(`mouseup`,f),!o.current&&a.current({page:1,pageSize:10,total:0,items:[]}),i9=d5((e,t)=>({projects:[],records:ote(),loading:!1,mediaType:`image`,countType:`请选择`,selectedRatio:`1:1`,selectedResolution:`2K`,width:2048,height:2048,videoDuration:5,videoAspectRatio:`16:9`,videoResolution:`720p`,engineOptions:{ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]},enginesele:[],fetchProjects:async()=>{e({loading:!0});try{e({projects:await P5(),loading:!1})}catch{e({loading:!1})}},createProject:async(n,r)=>{let i=await F5(n,r);return e({projects:[i,...t().projects]}),i},deleteProject:async n=>{await I5(n),e({projects:t().projects.filter(e=>e.id!==n)})},fetchRecords:async(t={})=>{e({loading:!0});try{e({records:await L5(t),loading:!1})}catch{e({loading:!1})}},optimizePrompt:async(n,r)=>{let i=await R5(n,r);try{await X7.getState().checkAuth()}catch{}let a=t().records;return e({records:{...a,total:a.total+1,items:[i.record,...a.items]}}),i},generateVideo:async(n,r)=>{let i=await U5(n,r);try{await X7.getState().checkAuth()}catch{}let a=t().records;return e({records:{...a,items:a.items.map(e=>e.id===n?i:e)}}),i},updateRecordReferences:(n,r)=>{let i=t().records;e({records:{...i,items:i.items.map(e=>e.id===n?{...e,references:r}:e)}})},setMediaType:t=>e({mediaType:t}),setCountType:t=>e({countType:t}),setImageSettings:(t,n,r,i)=>e({selectedRatio:t,selectedResolution:n,width:r,height:i}),setVideoSettings:(t,n,r)=>e({videoDuration:t,videoAspectRatio:n,videoResolution:r}),setEngineOptions:t=>e({engineOptions:t}),setSelectedRatio:t=>e({selectedRatio:t}),setSelectedResolution:t=>e({selectedResolution:t}),setWidth:t=>e({width:t}),setHeight:t=>e({height:t}),setVideoDuration:t=>e({videoDuration:t}),setVideoAspectRatio:t=>e({videoAspectRatio:t}),setVideoResolution:t=>e({videoResolution:t}),setEnginesele:t=>e({enginesele:t}),resetGenerationConfig:()=>e({mediaType:`image`,countType:`请选择`,selectedRatio:`1:1`,selectedResolution:`2K`,width:2048,height:2048,videoDuration:5,videoAspectRatio:`16:9`,videoResolution:`720p`,engineOptions:{ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]},enginesele:[]})}));function a9(e){if(!e)return`-`;let t=e.trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);return n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``),t.replace(`T`,` `).slice(0,16)}var o9=[`#f97316`,`#3b82f6`,`#8b5cf6`,`#10b981`,`#eab308`,`#6366f1`,`#ef4444`,`#06b6d4`,`#64748b`,`#78716c`],s9={ShoppingCartOutlined:(0,$.jsx)(X6,{}),BookOutlined:(0,$.jsx)(V2,{}),HomeOutlined:(0,$.jsx)(C3,{}),FireOutlined:(0,$.jsx)(n3,{}),RocketOutlined:(0,$.jsx)(F6,{}),SkinOutlined:(0,$.jsx)(a8,{}),CompassOutlined:(0,$.jsx)(k4,{}),HeartOutlined:(0,$.jsx)(m3,{}),CarOutlined:(0,$.jsx)(n4,{}),CameraOutlined:(0,$.jsx)($2,{}),CloudOutlined:(0,$.jsx)(m4,{}),StarOutlined:(0,$.jsx)(_8,{}),TrophyOutlined:(0,$.jsx)(F8,{}),ThunderboltOutlined:(0,$.jsx)(k8,{}),BulbOutlined:(0,$.jsx)(q2,{}),CoffeeOutlined:(0,$.jsx)(E4,{}),CrownOutlined:(0,$.jsx)(F4,{}),DashboardOutlined:(0,$.jsx)(R4,{}),FlagOutlined:(0,$.jsx)(a3,{}),GlobalOutlined:(0,$.jsx)(d3,{}),GiftOutlined:(0,$.jsx)(c3,{}),LaptopOutlined:(0,$.jsx)(k3,{}),MobileOutlined:(0,$.jsx)(X3,{}),MonitorOutlined:(0,$.jsx)($3,{}),PayCircleOutlined:(0,$.jsx)(a6,{}),PictureOutlined:(0,$.jsx)(d6,{}),PlayCircleOutlined:(0,$.jsx)(b6,{}),SafetyOutlined:(0,$.jsx)(R6,{}),ShoppingOutlined:(0,$.jsx)($6,{}),SmileOutlined:(0,$.jsx)(c8,{}),SoundOutlined:(0,$.jsx)(m8,{}),TagOutlined:(0,$.jsx)(C8,{}),TeamOutlined:(0,$.jsx)(E8,{}),ToolOutlined:(0,$.jsx)(M8,{}),TruckOutlined:(0,$.jsx)(R8,{}),VideoCameraOutlined:(0,$.jsx)(q8,{}),WalletOutlined:(0,$.jsx)(X8,{}),BankOutlined:(0,$.jsx)(M2,{}),BuildOutlined:(0,$.jsx)(W2,{}),ExperimentOutlined:(0,$.jsx)(q4,{}),HighlightOutlined:(0,$.jsx)(_3,{}),IdcardOutlined:(0,$.jsx)(E3,{}),MedicineBoxOutlined:(0,$.jsx)(q3,{}),ReadOutlined:(0,$.jsx)(E6,{}),RestOutlined:(0,$.jsx)(k6,{}),SketchOutlined:(0,$.jsx)(n8,{}),SolutionOutlined:(0,$.jsx)(d8,{})},ste=()=>{let[e,t]=(0,S.useState)(!1),[n]=TW.useForm(),r=Je(),{projects:i,fetchProjects:a,createProject:o,deleteProject:s}=i9(),[c,l]=(0,S.useState)([]);(0,S.useEffect)(()=>{a(),Q5().then(l).catch(()=>{})},[]);let u=Object.fromEntries(c.map((e,t)=>[e.key,{label:e.label,color:o9[t%o9.length],icon:e.icon||`AppstoreOutlined`}]));return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`22px 24px`,borderRadius:16,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-20,top:-20,width:200,height:200,borderRadius:`50%`,background:`rgba(255,255,255,0.08)`}}),(0,$.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,$.jsx)(Q.Title,{level:3,style:{margin:`0 0 4px`,color:`#fff`,fontWeight:700},children:`我的项目`}),(0,$.jsxs)(Q.Text,{style:{color:`rgba(255,255,255,0.7)`,fontSize:14},children:[`共 `,i.length,` 个项目 · 按行业分类管理`]})]}),(0,$.jsx)(bD,{icon:(0,$.jsx)(bR,{}),onClick:()=>t(!0),size:`large`,style:{background:`rgba(255,255,255,0.15)`,border:`1px solid rgba(255,255,255,0.3)`,color:`#fff`,fontWeight:600,backdropFilter:`blur(10px)`,borderRadius:10,height:42},children:`新建项目`})]}),i.length===0?(0,$.jsx)(PC,{image:PC.PRESENTED_IMAGE_SIMPLE,description:`还没有项目,创建您的第一个视频项目`,style:{padding:`60px 0`},children:(0,$.jsx)(bD,{type:`primary`,icon:(0,$.jsx)(bR,{}),onClick:()=>t(!0),size:`large`,children:`创建第一个项目`})}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},className:`stagger-children`,children:i.map((e,t)=>(0,$.jsxs)(`div`,{className:`project-card project-item animate-slideInCard`,onClick:()=>r(`/projects/${e.id}/generate`),style:{display:`flex`,alignItems:`center`,padding:`18px 22px`,borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,animationDelay:`${t*.06}s`},children:[(0,$.jsx)(`div`,{style:{width:50,height:50,borderRadius:14,flexShrink:0,background:`${u[e.industry]?.color||`#64748b`}12`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:24,marginRight:16,color:u[e.industry]?.color||`#64748b`},children:s9[u[e.industry]?.icon]||(0,$.jsx)(m2,{})}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4,flexWrap:`wrap`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1a1a2e`},children:e.name}),(0,$.jsx)(k$,{color:u[e.industry]?.color||`#64748b`,style:{borderRadius:6,margin:0},children:u[e.industry]?.label||e.industry})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(kH,{style:{fontSize:12,color:`#94a3b8`}}),(0,$.jsxs)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:12,color:`#94a3b8`},children:[`创建于 `,a9(e.createdAt)]})]})]}),(0,$.jsxs)(`div`,{className:`project-actions`,style:{display:`flex`,alignItems:`center`,gap:8,marginLeft:16},children:[(0,$.jsx)(bD,{type:`primary`,icon:(0,$.jsx)(b6,{}),onClick:t=>{t.stopPropagation(),r(`/projects/${e.id}/generate`)},style:{background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,borderRadius:10,fontWeight:600,height:36,boxShadow:`0 4px 12px rgba(99,102,241,0.25)`},children:`生成`}),(0,$.jsx)(Hq,{title:`确定删除该项目?`,description:`项目下的生成记录将一并删除`,onConfirm:async t=>{t?.stopPropagation(),await s(e.id),Z.success(`项目已删除`)},onCancel:e=>e?.stopPropagation(),children:(0,$.jsx)(bD,{danger:!0,icon:(0,$.jsx)(M$,{}),onClick:e=>e.stopPropagation(),style:{borderRadius:10,height:36,background:`rgba(239,68,68,0.06)`,border:`1px solid rgba(239,68,68,0.15)`,color:`#ef4444`}})}),(0,$.jsx)(Ug,{className:`mobile-hide`,style:{color:`#cbd5e1`,fontSize:12}})]})]},e.id))}),(0,$.jsx)(Rq,{title:(0,$.jsxs)(jU,{children:[(0,$.jsx)(m2,{}),`新建项目`]}),open:e,onOk:async()=>{try{let e=await n.validateFields(),i=await o(e.name,e.industry);Z.success(`项目创建成功`),t(!1),n.resetFields(),r(`/projects/${i.id}/generate`)}catch{}},onCancel:()=>{t(!1),n.resetFields()},okText:`创建`,cancelText:`取消`,width:480,children:(0,$.jsxs)(TW,{form:n,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(TW.Item,{name:`name`,label:`项目名称`,rules:[{required:!0,message:`请输入项目名称`}],children:(0,$.jsx)(oK,{placeholder:`例如:618电商大促宣传片`,prefix:(0,$.jsx)(TZ,{}),size:`large`})}),(0,$.jsx)(TW.Item,{name:`industry`,label:`所属行业`,rules:[{required:!0,message:`请选择行业`}],children:(0,$.jsx)(uw,{placeholder:`选择项目所属行业`,size:`large`,children:c.map((e,t)=>(0,$.jsx)(uw.Option,{value:e.key,children:(0,$.jsxs)(jU,{children:[s9[e.icon]||(0,$.jsx)(m2,{}),` `,e.label]})},e.key))})})]})})]})};function cte(){if(typeof crypto<`u`&&typeof crypto.randomUUID==`function`)return crypto.randomUUID();if(typeof crypto<`u`&&typeof crypto.getRandomValues==`function`){let e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}return`${Date.now().toString(16).padStart(12,`0`)}-${Math.random().toString(16).slice(2,10).padStart(8,`0`)}-4xxx-yxxx-${Math.random().toString(16).slice(2,12)}`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}var c9=({src:e,width:t=48,height:n=48})=>{let[r,i]=(0,S.useState)(null),[a,o]=(0,S.useState)(null);return(0,S.useEffect)(()=>{let r=document.createElement(`video`);r.muted=!0,r.preload=`metadata`,r.crossOrigin=`anonymous`;let a=()=>{o(r.duration),r.currentTime=Math.min(1,r.duration*.1)},s=()=>{try{let e=document.createElement(`canvas`);e.width=t*2,e.height=n*2;let a=e.getContext(`2d`);a&&(a.drawImage(r,0,0,e.width,e.height),i(e.toDataURL(`image/jpeg`,.7)))}catch{}};return r.addEventListener(`loadedmetadata`,a),r.addEventListener(`seeked`,s),r.src=e,()=>{r.removeEventListener(`loadedmetadata`,a),r.removeEventListener(`seeked`,s)}},[e,t,n]),(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`,background:`#1a1a2e`},children:[r?(0,$.jsx)(`img`,{src:r,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(b6,{style:{color:`#fff`,fontSize:18}})}),a!=null&&(0,$.jsx)(`span`,{style:{position:`absolute`,bottom:2,right:2,fontSize:9,color:`#fff`,background:`rgba(0,0,0,0.6)`,borderRadius:4,padding:`1px 4px`,lineHeight:1.3},children:(e=>`${Math.round(e)}s`)(a)})]})},lte=()=>{let{projectId:e}=Qe(),t=Je(),[n]=TW.useForm(),{projects:r,records:i,fetchProjects:a,fetchRecords:o,optimizePrompt:s,generateVideo:c}=i9(),l=i.items,{user:u}=X7(),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(null),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(!1),[x,C]=(0,S.useState)({}),[w,T]=(0,S.useState)({}),[E,D]=(0,S.useState)({}),[O,k]=(0,S.useState)(null),[A,j]=(0,S.useState)(null),[M,N]=(0,S.useState)([]),[P,F]=(0,S.useState)(!1),[I,L]=(0,S.useState)(``),[R,z]=(0,S.useState)(!1),[B,V]=(0,S.useState)(``),H=(0,S.useRef)(null),[U,ee]=(0,S.useState)({}),[te,ne]=(0,S.useState)({}),[W,re]=(0,S.useState)({}),[G,K]=(0,S.useState)(null),[q,ie]=(0,S.useState)({}),[J,ae]=(0,S.useState)(null),[oe,se]=(0,S.useState)(5),[ce,le]=(0,S.useState)(`16:9`),[ue,de]=(0,S.useState)(`720p`),[fe,pe]=(0,S.useState)(null),[me,he]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`720p`,`1080p`],durations:[5,8,10,12,15]}),[ge,_e]=(0,S.useState)(0),[ve,ye]=(0,S.useState)(0),[be,xe]=(0,S.useState)(`image`),[Se,Ce]=(0,S.useState)(`1:1`),[we,Te]=(0,S.useState)(`2K`),[Ee,De]=(0,S.useState)(2048),[Oe,ke]=(0,S.useState)(2048),[Ae,je]=(0,S.useState)(!1),[Me,Ne]=(0,S.useState)([]),[Pe,Fe]=(0,S.useState)([]);(0,S.useEffect)(()=>{if(o7().then(e=>{Ne(e.video),Fe(e.image)}),!Ae)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&je(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[Ae]);let Ie=(e,t)=>{for(let n=0;n{let t=e===`2k`?`2048`:e===`4k`?`4096`:e;for(let e=0;e{qe(e)},ze=e=>{Xe(parseInt(e))},[Be,Ve]=(0,S.useState)([]),[He,Ue]=(0,S.useState)([]),[We,Ge]=(0,S.useState)([]),[Ke,qe]=(0,S.useState)(0),[Ye,Xe]=(0,S.useState)(0);(0,S.useEffect)(()=>{We[Ye]&&We[Ye][Ke]!==void 0&&(De(We[Ye][Ke].substring(0,4)),ke(We[Ye][Ke].substring(5)))},[Ke]),(0,S.useEffect)(()=>{We[Ye]&&We[Ye][Ke]!==void 0&&(De(We[Ye][Ke].substring(0,4)),ke(We[Ye][Ke].substring(5)))},[Ye]);let Ze=()=>{De(Oe),ke(Ee)},$e=e=>{xe(e.target.value===`image`?`image`:`video`)};(0,S.useEffect)(()=>{Q5().then(e=>{ee(Object.fromEntries(e.map(e=>[e.key,e.label]))),ne(Object.fromEntries(e.map(e=>[e.key,e.optionGroups||[]])))}).catch(()=>{}),q5().then(e=>{let t=e.items?.[0]?.supportedSizes||{},n=[],r=[],i=[];for(let e in t[`2K`])n.push(e),r.push(t[`2K`][e]);n.forEach((e,t)=>{Ve(n=>[...n,{value:e,label:String(t)}])});for(let e in t[`4K`])i.push(t[`4K`][e]);Ge([r,i]);let a=[];for(let e in t)a.push(e);a.forEach((e,t)=>{Ue(n=>[...n,{value:e,label:String(t)}])})}).catch(()=>{}),K5().then(e=>{if(e.items?.length){let t=e.items[0];he({ratios:t.supportedRatios?.length?t.supportedRatios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions?.length?t.supportedResolutions:[`720p`,`1080p`],durations:t.supportedDurations?.length?t.supportedDurations:[5,8,10,12,15]})}}).catch(()=>{})},[]),(0,S.useEffect)(()=>{a(),o({projectId:e,page:1,pageSize:100})},[e,a,o]);let et=(0,S.useRef)(!1);(0,S.useEffect)(()=>{et.current||l.length===0||(et.current=!0,console.log(`aaaa`,l),l.forEach(t=>{t.projectId===e&&t.status===`generating`&&(T(e=>({...e,[t.id]:`generating`})),Dt(t.id)),t.projectId===e&&t.status===`optimizing`&&ct(t.id)}))},[l,e]);let tt=(0,S.useRef)(new Set),nt=(0,S.useRef)(null),rt=(0,S.useRef)(null),it=e=>{tt.current.add(e),st()},at=e=>{tt.current.delete(e),tt.current.size===0&&ot()},ot=()=>{nt.current&&=(clearInterval(nt.current),null),rt.current&&=(rt.current.abort(),null)},st=()=>{nt.current||=setInterval(async()=>{try{rt.current&&rt.current.abort();let t=new AbortController;rt.current=t;let n=await L5({projectId:e,page:1,pageSize:100,signal:t.signal});rt.current=null;let r=Array.from(tt.current),i=[];if(r.length>0){let e=i9.getState().records,t=e.items.map(e=>{if(r.includes(e.id)){let t=n.items.find(t=>t.id===e.id);if(t)return t.status!==`optimizing`&&i.push(e.id),t}return e});i9.setState({records:{...e,items:t}}),i.forEach(e=>{at(e)})}}catch(e){e.name!==`AbortError`&&console.error(`Optimizing polling error:`,e)}},3e3)},ct=e=>{it(e)},lt=(0,S.useRef)(!1),ut=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(lt.current||l.length===0)return;let t=localStorage.getItem(`pending_optimize`);if(t)try{let{key:n,projectId:r,prompt:i,duration:a,ts:o}=JSON.parse(t);if(Date.now()-o>300*1e3||r!==e){localStorage.removeItem(`pending_optimize`);return}if(ut.current===n)return;let s=l.find(e=>e.projectId===r&&e.originalPrompt===i&&e.duration===a&&e.status===`prompt_optimized`&&new Date(e.createdAt).getTime()>o-1e4);s?(lt.current=!0,localStorage.removeItem(`pending_optimize`),g(s),v(s.optimizedPrompt||``),_e(s.textCreditsCost),ye(s.textTokensUsed),m(!0),Z.success({content:`优化请求已恢复,消耗 ${s.textCreditsCost} 积分`,key:`recovery`})):Date.now()-o>3e4&&localStorage.removeItem(`pending_optimize`)}catch{localStorage.removeItem(`pending_optimize`)}},[l,e]);let dt=r.find(t=>t.id===e),ft=l.filter(t=>t.projectId===e),pt=dt?.name??`项目`,mt=dt&&te[dt.industry]||[],ht=u?.credits??0,gt=e=>{let t=e===`2k`?`2048`:e===`4k`?`4096`:e;for(let e=0;e=_t,yt=async()=>{try{if(!e){Z.error(`项目ID为空,请先选择项目`);return}let t=await n.validateFields();if(!t.prompt||!t.prompt.trim()){Z.error(`请输入视频/图片描述`);return}f(!0);let r=Object.entries(W).map(([e,t])=>`@${e}:${t}`),i=r.length>0?`${t.prompt}\n\n${r.join(`;`)}`:t.prompt,a=cte();localStorage.setItem(`pending_optimize`,JSON.stringify({key:a,projectId:e,prompt:i,duration:oe,ts:Date.now()})),ut.current=a;let o=await s(e,{prompt:i,duration:oe,genType:be,resolution:we,references:M.length>0?M:void 0,idempotencyKey:a,image_size:we,image_proportion:Se,image_px:Ee+`x`+Oe});localStorage.removeItem(`pending_optimize`),ut.current=null,g(o.record),v(o.record.optimizedPrompt||``),_e(o.textCreditsCost),ye(o.textTokensUsed),m(!0),Z.success({content:`「${pt}」提示词优化完成,消耗 ${o.textCreditsCost} 积分`,key:`optimize`})}catch(e){console.error(`优化提示词失败:`,e);let t=e?.response?.data?.message||e?.message||`操作失败,请稍后重试`;Z.error(t)}finally{f(!1),localStorage.removeItem(`pending_optimize`),ut.current=null}},bt=(0,S.useRef)(new Set),xt=(0,S.useRef)(null),St=(0,S.useRef)(null),Ct=e=>{bt.current.add(e),Et()},wt=e=>{bt.current.delete(e),bt.current.size===0&&Tt()},Tt=()=>{xt.current&&=(clearInterval(xt.current),null),St.current&&=(St.current.abort(),null)},Et=()=>{xt.current||=setInterval(async()=>{try{St.current&&St.current.abort();let t=new AbortController;St.current=t;let n=await L5({projectId:e,page:1,pageSize:100,signal:t.signal});St.current=null;let r=Array.from(bt.current),i=[];if(r.length>0){let e=i9.getState().records,t=e.items.map(e=>{if(r.includes(e.id)){let t=n.items.find(t=>t.id===e.id);if(t)return t.status!==`generating`&&i.push(e.id),t}return e});i9.setState({records:{...e,items:t}}),i.forEach(e=>{let t=n.items.find(t=>t.id===e);wt(e),t?.status===`completed`?(T(t=>({...t,[e]:`done`})),g(n=>n?.id===e?t:n),Z.success({content:`「${pt}」视频生成完成!`,key:e,duration:5})):t?.status===`failed`&&(T(t=>({...t,[e]:`failed`})),g(n=>n?.id===e?t:n),Z.error({content:`「${pt}」视频生成失败: ${t.errorMessage||`未知错误`}`,key:e,duration:5}))})}}catch(e){e.name!==`AbortError`&&console.error(`Global polling error:`,e)}},5e3)},Dt=e=>{Ct(e)};(0,S.useEffect)(()=>()=>{Tt(),ot()},[]);let Ot=async e=>{if(!vt){Z.error(`积分不足,请先充值`);return}C(t=>({...t,[e]:!0})),T(t=>({...t,[e]:`generating`})),Z.loading({content:`「${pt}」正在提交视频生成...`,duration:0,key:e});try{(await c(e,{aspectRatio:ce,resolution:ue})).status===`failed`?(T(t=>({...t,[e]:`failed`})),Z.error({content:`「${pt}」提交失败`,key:e,duration:3})):(Z.success({content:`「${pt}」已提交,正在生成中...`,key:e,duration:3}),Dt(e))}catch(t){T(t=>({...t,[e]:`failed`}));let n=`提交失败`;t?.response?.data?.detail?n=t.response.data.detail:t?.data?.detail?n=t.data.detail:t?.detail?n=t.detail:t?.message&&(n=t.message),Z.error({content:`${n}`,key:e,duration:3})}finally{C(t=>({...t,[e]:!1}))}},kt=async e=>{let t=ft.find(t=>t.id===e);if(t){C(t=>({...t,[e]:!0})),T(t=>({...t,[e]:`generating`})),Z.loading({content:`「${pt}」正在重新提交...`,duration:0,key:e});try{let n=E[e];n&&n!==t.optimizedPrompt&&await H5(e,n);let r=await c(e,{aspectRatio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`});console.log(`重新提交视频生成结果:`,r),r.status===`failed`?(T(t=>({...t,[e]:`failed`})),console.log(`12312`),Z.error({content:`「${pt}」提交失败`,key:e,duration:3})):(Z.success({content:`「${pt}」已提交,正在生成中...`,key:e,duration:3}),Dt(e))}catch(t){T(t=>({...t,[e]:`failed`})),console.log(`1231`,t);let n=`提交失败`;t?.response?.data?.detail?n=t.response.data.detail:t?.data?.detail?n=t.data.detail:t?.detail?n=t.detail:t?.message&&(n=t.message),Z.error({content:`${n}`,key:e,duration:3})}finally{C(t=>({...t,[e]:!1}))}}},At=e=>{let t=w[e.id];return t===`generating`?`generating`:t===`done`?`completed`:t===`failed`?`failed`:e.status},jt={optimizing:{color:`processing`,text:`优化中`,icon:(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,$.jsx)(MH,{})},generating:{color:`warning`,text:`生成中`,icon:(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}})},completed:{color:`success`,text:`已完成`,icon:(0,$.jsx)(c4,{})},failed:{color:`error`,text:`失败`,icon:(0,$.jsx)(d4,{})}},Mt=({label:e,value:t,options:n,suffix:r,expanded:i,onToggle:a,onSelect:o,onClose:s})=>{let c=(0,S.useRef)(null),l=(0,S.useRef)(null),u=(0,S.useRef)(i),[d,f]=(0,S.useState)(null);return u.current=i,(0,S.useEffect)(()=>{if(i&&c.current){let e=c.current.getBoundingClientRect();f({bottom:window.innerHeight-e.top+4,left:e.left,width:Math.max(e.width,100)})}else f(null)},[i]),(0,S.useEffect)(()=>{if(!i)return;let e=e=>{c.current?.contains(e.target)||l.current?.contains(e.target)||u.current&&s()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[i,s]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{ref:c,onClick:a,translate:`no`,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,cursor:`pointer`,userSelect:`none`,transition:`background 0.2s, border-color 0.2s`,background:i?`rgba(99,102,241,0.08)`:`#f8f9fc`,border:i?`1px solid #6366f1`:`1px solid #e2e8f0`,minWidth:70,whiteSpace:`nowrap`,flexShrink:0},children:[(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#6366f1`,fontWeight:500,lineHeight:`18px`},children:[t,r]}),(0,$.jsx)(OQ,{style:{fontSize:9,color:`#94a3b8`,transition:`transform 0.2s`,transform:i?`rotate(180deg)`:`rotate(0deg)`}})]}),d&&(0,zi.createPortal)((0,$.jsxs)(`div`,{ref:l,style:{position:`fixed`,bottom:d.bottom,left:d.left,minWidth:d.width,background:`#fff`,borderRadius:12,padding:6,zIndex:99999,boxShadow:`0 8px 30px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:10,color:`#94a3b8`,display:`block`,padding:`2px 6px 4px`},children:e}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:n.map((e,n)=>{let r=t===e;return(0,$.jsx)(`div`,{onClick:()=>{o(e),s()},style:{padding:`6px 10px`,borderRadius:8,fontSize:13,cursor:`pointer`,transition:`all 0.15s`,background:r?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`transparent`,color:r?`#fff`:`#1a1a2e`,fontWeight:r?600:400},onMouseEnter:e=>{r||(e.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:e},n)})})]}),document.body)]})},Nt=({group:e,selected:t,expanded:n,onToggle:r,onSelect:i,onClose:a})=>{let o=(0,S.useRef)(null),s=(0,S.useRef)(null),c=(0,S.useRef)(n),[l,u]=(0,S.useState)(null);return c.current=n,(0,S.useEffect)(()=>{if(n&&o.current){let e=o.current.getBoundingClientRect();u({bottom:window.innerHeight-e.top+4,left:e.left})}else u(null)},[n]),(0,S.useEffect)(()=>{if(!n)return;let e=e=>{o.current?.contains(e.target)||s.current?.contains(e.target)||c.current&&a()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[n,a]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{ref:o,onClick:r,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,cursor:`pointer`,userSelect:`none`,transition:`all 0.2s`,background:t?`rgba(99,102,241,0.08)`:`#f8f9fc`,border:n?`1px solid #6366f1`:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:t?`#6366f1`:`#64748b`,fontWeight:t?600:400},children:t||e.name}),(0,$.jsx)(OQ,{style:{fontSize:9,color:t?`#6366f1`:`#94a3b8`,transition:`transform 0.2s`,transform:n?`rotate(180deg)`:`rotate(0deg)`}})]}),l&&(0,zi.createPortal)((0,$.jsxs)(`div`,{ref:s,style:{position:`fixed`,bottom:l.bottom,left:l.left,background:`#fff`,borderRadius:12,padding:8,minWidth:160,zIndex:99999,boxShadow:`0 8px 30px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:10,color:`#94a3b8`,display:`block`,padding:`2px 6px 4px`},children:e.name}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:e.options.map((e,n)=>{let r=t===e;return(0,$.jsx)(`div`,{onClick:()=>{i(e),a()},style:{padding:`6px 10px`,borderRadius:8,fontSize:13,cursor:`pointer`,transition:`all 0.15s`,background:r?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`transparent`,color:r?`#fff`:`#1a1a2e`,fontWeight:r?600:400},onMouseEnter:e=>{r||(e.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:e},n)})})]}),document.body)]})};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`gen-header animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`20px 28px`,borderRadius:16,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 100%)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-30,bottom:-30,width:160,height:160,borderRadius:`50%`,background:`rgba(255,255,255,0.05)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,position:`relative`},children:[(0,$.jsx)(bD,{icon:(0,$.jsx)(b2,{}),onClick:()=>t(`/projects`),style:{background:`rgba(255,255,255,0.1)`,border:`1px solid rgba(255,255,255,0.2)`,color:`#fff`,borderRadius:10}}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0,color:`#fff`,fontWeight:700},children:pt}),dt&&(0,$.jsx)(k$,{style:{background:`rgba(255,255,255,0.12)`,border:`1px solid rgba(255,255,255,0.2)`,color:`rgba(255,255,255,0.8)`,borderRadius:6},children:U[dt.industry]||dt.industry})]}),(0,$.jsx)(Q.Text,{style:{color:`rgba(255,255,255,0.5)`,fontSize:13},children:`描述视频 → AI优化 → 生成视频`})]})]}),(0,$.jsxs)(k$,{style:{background:`rgba(255,255,255,0.1)`,border:`1px solid rgba(255,255,255,0.2)`,color:`#fff`,borderRadius:20,fontSize:13,padding:`4px 14px`},children:[`剩余 `,ht,` 积分`]})]}),!p&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{className:`animate-fadeInUp`,style:{marginBottom:24,padding:`16px 20px`,borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,boxShadow:`0 2px 12px rgba(0,0,0,0.03)`},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{marginRight:70,position:`relative`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,fontWeight:500,color:`#475569`,marginRight:16},children:`生成类型:`}),(0,$.jsxs)(RL.Group,{defaultValue:`image`,buttonStyle:`solid`,onChange:$e,children:[(0,$.jsxs)(RL.Button,{value:`image`,style:{zIndex:0},children:[(0,$.jsx)(d6,{style:{marginRight:6,fontSize:14}}),` `,`图片`]}),(0,$.jsxs)(RL.Button,{value:`video`,children:[(0,$.jsx)(q8,{style:{marginRight:6,fontSize:14}}),` `,`视频`]})]})]}),be===`video`&&[{icon:(0,$.jsx)(F$,{}),label:`描述视频+时长`,color:`#6366f1`},{icon:(0,$.jsx)(k8,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(F6,{}),label:`选择参数生成`,color:`#10b981`}].map((e,t)=>(0,$.jsxs)(S.Fragment,{children:[t>0&&(0,$.jsx)(`div`,{style:{width:40,height:1,background:`linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0)`,margin:`0 12px`,flexShrink:0}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:10,background:`${e.color}12`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:e.color,fontSize:15},children:e.icon})}),(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:500,color:`#1a1a2e`},children:e.label})]})]},t)),be===`image`&&[{icon:(0,$.jsx)(F$,{}),label:`描述图片+尺寸`,color:`#6366f1`},{icon:(0,$.jsx)(k8,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(F6,{}),label:`图片生成`,color:`#10b981`}].map((e,t)=>(0,$.jsxs)(S.Fragment,{children:[t>0&&(0,$.jsx)(`div`,{style:{width:40,height:1,background:`linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0)`,margin:`0 12px`,flexShrink:0}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:10,background:`${e.color}12`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:e.color,fontSize:15},children:e.icon})}),(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:500,color:`#1a1a2e`},children:e.label})]})]},t))]})}),(0,$.jsxs)(TW,{form:n,initialValues:{},children:[(0,$.jsx)(TW.Item,{name:`prompt`,noStyle:!0,rules:[{required:!0,message:`请输入视频描述`}],style:{display:`none`}}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:20,background:`#fff`,border:`1px solid #f0f0f5`,boxShadow:`0 4px 24px rgba(0,0,0,0.04)`,overflow:`visible`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`12px 16px 0`,minHeight:60},children:[M.map((e,t)=>(0,$.jsxs)(`div`,{className:`ref-thumb`,style:{position:`relative`,width:48,height:48,borderRadius:12,overflow:`visible`,flexShrink:0},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,overflow:`hidden`,border:`1px solid #e2e8f0`,cursor:`pointer`},onClick:()=>{e.type===`video`&&ae(`http://ceshi.apiforeign.minzhong.cn${e.url}`)},children:e.type===`image`?(0,$.jsx)(TG,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(c9,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`})}),(0,$.jsx)(`div`,{className:`ref-delete`,onClick:n=>{n.stopPropagation(),V5(e.url).catch(()=>{}),N(e=>e.filter((e,n)=>n!==t))},style:{position:`absolute`,top:-4,right:-4,width:16,height:16,borderRadius:`50%`,background:`rgba(0,0,0,0.55)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,opacity:0,transition:`opacity 0.15s`,backdropFilter:`blur(4px)`},children:(0,$.jsx)(d4,{style:{color:`#fff`,fontSize:10}})})]},t)),(0,$.jsx)(C0,{accept:`image/*,video/*`,showUploadList:!1,multiple:!0,beforeUpload:e=>{let t=e.type.startsWith(`image/`),n=e.type.startsWith(`video/`);if(!t&&!n)return Z.error(`仅支持图片或视频文件`),!1;let r=n?100:10;if(e.size/1024/1024>r)return Z.error(`${n?`视频`:`图片`}大小不能超过${r}MB`),!1;let i=M.filter(e=>e.type===`image`).length,a=M.filter(e=>e.type===`video`).length;return t&&i>=10?(Z.error(`最多上传10张图片`),!1):n&&a>=3?(Z.error(`最多上传3个视频`),!1):(F(!0),(t?z5:B5)(e).then(e=>{let n=t?`图片`:`视频`,r=t?i+1:a+1;N(i=>[...i,{url:e.url,type:t?`image`:`video`,name:`${n}${r}`}]),Z.success(`${n}上传成功`)}).catch(()=>Z.error(`上传失败`)).finally(()=>F(!1)),!1)},children:(0,$.jsx)(eT,{title:`参考内容(${M.length}/10)`,children:(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,border:`1.5px dashed #d9d9d9`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s`,flexShrink:0},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99,102,241,0.04)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#d9d9d9`,e.currentTarget.style.background=`transparent`},children:P?(0,$.jsx)(Xm,{style:{fontSize:18,color:`#6366f1`}}):(0,$.jsx)(bR,{style:{fontSize:18,color:`#94a3b8`}})})})})]}),(0,$.jsx)(`div`,{style:{padding:`8px 16px 4px`},children:(0,$.jsx)(oK.TextArea,{ref:H,value:I,onChange:e=>{let t=e.target.value;L(t),n.setFieldsValue({prompt:t});let r=t.lastIndexOf(`@`);if(r>=0){let e=t.slice(r+1);if(!e.includes(` `)&&!e.includes(` -`)){z(!0),V(e);return}}z(!1)},rows:3,placeholder:`上传参考素材、输入文字,自由组合图、文多元素。输入 @ 可引用参考内容...`,maxLength:500,bordered:!1,autoSize:{minRows:2,maxRows:6},style:{padding:`6px 2px`,fontSize:15,lineHeight:1.7,resize:`none`,caretColor:`#6366f1`}})}),R&&M.length>0&&(0,$.jsx)(`div`,{style:{margin:`0 16px 8px`,background:`#fff`,borderRadius:10,boxShadow:`0 6px 24px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`,padding:6,maxHeight:180,overflowY:`auto`},children:M.filter(e=>!B||e.name.includes(B)).map((e,t)=>(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,padding:`8px 10px`,borderRadius:8,cursor:`pointer`,transition:`background 0.15s`},onMouseEnter:e=>e.currentTarget.style.background=`#f1f5f9`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,onMouseDown:t=>{t.preventDefault();let r=H.current?.resizableTextArea?.textArea||H.current?.nativeElement?.querySelector(`textarea`)||H.current;if(!r||!r.value)return;let i=r.value,a=i.lastIndexOf(`@`),o=i.slice(0,a)+`@${e.name} `;L(o),n.setFieldValue(`prompt`,o),z(!1),setTimeout(()=>{r.focus(),r.selectionStart=o.length,r.selectionEnd=o.length},50)},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,overflow:`hidden`,background:e.type===`image`?`#f1f5f9`:`#1a1a2e`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:e.type===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(b6,{style:{color:`#fff`,fontSize:14}})}),(0,$.jsx)(Q.Text,{style:{fontSize:13},children:e.name}),(0,$.jsx)(k$,{style:{marginLeft:`auto`,fontSize:11},children:e.type===`image`?`图片`:`视频`})]},t))}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`8px 12px 12px`,gap:8,flexWrap:`wrap`,position:`relative`,zIndex:50,minHeight:48},children:[be!==`image`&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,flex:1,flexWrap:`wrap`},children:[(0,$.jsx)(Mt,{label:`时长`,value:`${oe}`,options:me.durations.map(e=>`${e}`),suffix:`秒`,expanded:fe===`duration`,onToggle:()=>pe(fe===`duration`?null:`duration`),onSelect:e=>se(parseInt(e)),onClose:()=>pe(null)}),mt.map((e,t)=>{let n=G===e.name,r=W[e.name];return(0,$.jsx)(Nt,{group:e,selected:r,expanded:n,onToggle:()=>K(n?null:e.name),onSelect:t=>{re(n=>{let r={...n};return r[e.name]===t?delete r[e.name]:r[e.name]=t,r})},onClose:()=>K(null)},`og-${t}`)})]}),be==`image`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>je(!Ae),className:`image-settings-trigger`,style:{minWidth:220,padding:`0px 16px`,height:30,borderRadius:10,border:`1px solid #e2e8f0`,backgroundColor:`#f8f9fc`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:12,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:(0,$.jsxs)(`div`,{style:{textAlign:`left`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:600,color:`#374151`,marginRight:10},children:Se===`auto`?`智能`:Se}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#9ca3af`},children:[we==`2K`?`高清 2K`:`超清 4K`,`| `,Ee,`×`,Oe]})]})}),(0,$.jsx)(OQ,{style:{fontSize:14,color:`#9ca3af`}})]}),Ae&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:520,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:20,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:10,fontSize:13,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:6},children:Be.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{Ce(e.value),Re(e.label)},style:{flex:`0 0 calc(11.11% - 5px)`,minWidth:48,height:56,borderRadius:8,border:Se===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:Se===e.value?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:e.value===`auto`?16:20,height:e.value===`auto`?16:20,border:`2px solid ${Se===e.value?`#6366f1`:`#9ca3af`}`,borderRadius:(e.value,3),marginBottom:3,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e.value===`auto`&&(0,$.jsx)(`span`,{style:{fontSize:8,color:Se===e.value?`#6366f1`:`#9ca3af`},children:`智`})}),(0,$.jsx)(`span`,{style:{fontSize:10,color:Se===e.value?`#6366f1`:`#6b7280`,fontWeight:Se===e.value?600:400},children:e.value})]},e.value))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:10,fontSize:13,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:8},children:He.map(e=>(0,$.jsx)(`button`,{onClick:()=>{Te(e.value),ze(e.label)},style:{flex:1,height:48,borderRadius:8,border:we===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:we===e.value?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsxs)(`span`,{style:{fontSize:13,fontWeight:600,color:we===e.value?`#fff`:`#4b5563`},children:[e.value,e.value===`4k`&&(0,$.jsx)(`span`,{style:{marginLeft:3},children:`✨`})]})},e.value))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:10,fontSize:13,fontWeight:500,color:`#666666`},children:`尺寸`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:140},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12,marginRight:6},children:`W`}),(0,$.jsx)(oK,{value:Ee,onChange:e=>De(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:6,height:40,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:14,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`button`,{onClick:Ze,style:{width:28,height:28,borderRadius:6,border:`1px solid #e5e7eb`,backgroundColor:`#fff`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:`#6366f1`},children:(0,$.jsx)(uG,{style:{fontSize:12}})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:140},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12,marginRight:6},children:`H`}),(0,$.jsx)(oK,{value:Oe,onChange:e=>ke(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:6,height:40,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:14,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12},children:`PX`})]})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,flexShrink:0},children:[be===`image`&&(0,$.jsx)(`span`,{style:{color:`#7c7c7c`,fontSize:14},children:`(请在左侧选择图片比例和尺寸)`}),(0,$.jsx)(bD,{type:`primary`,size:`large`,onClick:yt,loading:d,style:{borderRadius:10,fontWeight:600,minWidth:140,height:40,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 16px rgba(99,102,241,0.35)`},children:`AI优化提示词`})]})]})]})]})]}),p&&h&&(0,$.jsxs)(Mz,{className:`animate-fadeInUp`,style:{borderRadius:16},styles:{body:{padding:`24px 28px`}},children:[!w[h.id]||w[h.id]===`idle`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:24,padding:`14px 18px`,borderRadius:12,background:`linear-gradient(135deg, rgba(16,185,129,0.06), rgba(5,150,105,0.06))`,border:`1px solid rgba(16,185,129,0.15)`},children:[(0,$.jsx)(c4,{style:{color:`#10b981`,fontSize:22}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,display:`block`},children:`提示词优化完成`}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`文本优化消耗 `,ge,` 积分· 您可以编辑提示词后选择参数生成视频`]})]})]}):(0,$.jsxs)(`div`,{style:{marginBottom:24,padding:`16px 18px`,borderRadius:12,display:`flex`,alignItems:`center`,gap:12,background:w[h.id]===`failed`?`rgba(239,68,68,0.04)`:w[h.id]===`done`?`rgba(16,185,129,0.04)`:`rgba(99,102,241,0.04)`,border:`1px solid ${w[h.id]===`failed`?`rgba(239,68,68,0.12)`:w[h.id]===`done`?`rgba(16,185,129,0.12)`:`rgba(99,102,241,0.12)`}`},children:[w[h.id]===`generating`&&(0,$.jsx)(Xm,{style:{color:`#6366f1`,fontSize:18},spin:!0}),w[h.id]===`done`&&(0,$.jsx)(c4,{style:{color:`#10b981`,fontSize:18}}),w[h.id]===`failed`&&(0,$.jsx)(d4,{style:{color:`#ef4444`,fontSize:18}}),(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:w[h.id]===`failed`?`#ef4444`:w[h.id]===`done`?`#10b981`:`#6366f1`},children:[w[h.id]===`generating`&&`${be===`image`?`图片`:`视频`}生成中,请稍候...`,w[h.id]===`done`&&`${be===`image`?`图片`:`视频`}生成成功`,w[h.id]===`failed`&&`${be===`image`?`图片`:`视频`}生成失败,请重试`]})]}),!w[h.id]||w[h.id]===`idle`||w[h.id]===`failed`?(0,$.jsxs)(`div`,{className:`gen-prompt-row`,style:{display:`flex`,gap:20,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 45%`,minWidth:240},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`,minHeight:100},children:(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#64748b`,lineHeight:1.7},children:h.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 45%`,minWidth:240},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,!y&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!y&&(0,$.jsxs)(jU,{size:4,children:[(0,$.jsx)(eT,{title:`复制`,children:(0,$.jsx)(bD,{type:`text`,size:`small`,icon:(0,$.jsx)(i1,{}),onClick:()=>{navigator.clipboard.writeText(_),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(0,$.jsx)(eT,{title:`编辑`,children:(0,$.jsx)(bD,{type:`text`,size:`small`,icon:(0,$.jsx)(F$,{}),onClick:()=>b(!0),style:{color:`#6366f1`}})})]})]}),y?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(oK.TextArea,{value:_,onChange:e=>v(e.target.value),rows:5,style:{borderRadius:12,fontSize:14,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(bD,{size:`small`,onClick:()=>{v(h.optimizedPrompt||``),b(!1)},children:`取消`}),(0,$.jsx)(bD,{size:`small`,type:`primary`,onClick:()=>{b(!1),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`,minHeight:100},children:(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#1a1a2e`,lineHeight:1.7},children:_})})]})]}):(0,$.jsxs)(`div`,{className:`gen-prompt-row`,style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 55%`,minWidth:280},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`,minHeight:80},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.6},children:h.originalPrompt})})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,!y&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!y&&(0,$.jsxs)(jU,{size:4,children:[(0,$.jsx)(eT,{title:`复制`,children:(0,$.jsx)(bD,{type:`text`,size:`small`,icon:(0,$.jsx)(i1,{}),onClick:()=>{navigator.clipboard.writeText(_),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(0,$.jsx)(eT,{title:`编辑`,children:(0,$.jsx)(bD,{type:`text`,size:`small`,icon:(0,$.jsx)(F$,{}),onClick:()=>b(!0),style:{color:`#6366f1`}})})]})]}),y?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(oK.TextArea,{value:_,onChange:e=>v(e.target.value),rows:5,style:{borderRadius:12,fontSize:13,lineHeight:1.6,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(bD,{size:`small`,onClick:()=>{v(h.optimizedPrompt||``),b(!1)},children:`取消`}),(0,$.jsx)(bD,{size:`small`,type:`primary`,onClick:()=>{b(!1),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`,minHeight:120},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.6},children:_})})]})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 40%`,minWidth:280},children:[h.videoUrl&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`生成视频`}),(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`,border:`1px solid #f0f0f5`,background:`#000`},children:(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${h.videoUrl}`,controls:!0,style:{width:`100%`,maxHeight:350,display:`block`}})})]}),h.imageUrl&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`生成图片`}),(0,$.jsx)(TG,{src:`http://ceshi.apiforeign.minzhong.cn${h.imageUrl}`,style:{width:`100%`,maxHeight:350,objectFit:`contain`,borderRadius:12,border:`1px solid #f0f0f5`},preview:!0})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginTop:20,padding:`14px 18px`,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:[be!==`image`&&(0,$.jsxs)(`div`,{style:{marginTop:24,borderRadius:12,background:`#f8f9fc`,width:`25%`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,fontWeight:600,display:`block`,marginBottom:12},children:`选择视频参数`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`时长`}),(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:13,color:`#6366f1`},children:[oe,`s`]})]}),(0,$.jsx)(Mt,{label:`比例`,value:ce,options:me.ratios,expanded:fe===`ratio`,onToggle:()=>pe(fe===`ratio`?null:`ratio`),onSelect:e=>le(e),onClose:()=>pe(null)}),(0,$.jsx)(Mt,{label:`分辨率`,value:ue,options:me.resolutions,expanded:fe===`resolution`,onToggle:()=>pe(fe===`resolution`?null:`resolution`),onSelect:e=>de(e),onClose:()=>pe(null)})]})]}),be==`image`&&h&&(0,$.jsx)(`div`,{style:{marginTop:24,borderRadius:12,background:`#f8f9fc`,width:`25%`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-around`},children:[(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`分辨率`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:h.imageSize||`-`})]}),(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`画面比例`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:h.imageProportion||`-`})]}),(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`画面尺寸`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:h.imagePx||`-`})]})]})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`文字积分`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#6366f1`},children:ge})]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:18},children:`+`}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:[`预估`,be===`image`?`图片`:`视频`,`积分`]}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#10b981`},children:be===`image`&&h.imageSize?gt(h.imageSize)||_t:Ie(oe,ue)})]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:18},children:`=`}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`总计`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16,color:`#1a1a2e`},children:(ge+(be===`image`?gt(h.imageSize):Ie(oe,ue))).toFixed(2)})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsxs)(bD,{size:`large`,onClick:()=>{m(!1),g(null),v(``),L(``),N([]),re({}),K(null),pe(null),n.resetFields()},style:{borderRadius:12,minWidth:120,height:44,fontWeight:500},children:[`配置新`,be===`image`?`图片`:`视频`]}),(0,$.jsx)(eT,{title:vt?``:`积分不足`,children:(0,$.jsx)(bD,{type:`primary`,size:`large`,icon:(0,$.jsx)(F6,{}),onClick:()=>Ot(h.id),loading:w[h.id]===`generating`,disabled:!vt||w[h.id]===`generating`||w[h.id]===`done`,style:{borderRadius:12,minWidth:180,height:44,fontWeight:600,background:w[h.id]===`done`?`#10b981`:vt?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`:`#d1d5db`,border:`none`,boxShadow:vt?`0 8px 24px rgba(99,102,241,0.3)`:`none`},children:w[h.id]===`done`?`生成完成`:w[h.id]===`generating`?`生成中...`:`生成${be===`image`?`图片`:`视频`} (${be===`image`?gt(h.imageSize):Ie(oe,ue)}积分)`})})]})]}),h.references&&h.references.length>0&&(0,$.jsxs)(`div`,{style:{marginTop:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`参考内容`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:h.references.map((e,t)=>(0,$.jsxs)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,position:`relative`,cursor:`pointer`},onClick:()=>{e.type===`video`&&ae(`http://ceshi.apiforeign.minzhong.cn${e.url}`)},children:[e.type===`image`?(0,$.jsx)(TG,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},preview:!0}):(0,$.jsx)(c9,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,width:64,height:64}),(0,$.jsx)(k$,{style:{position:`absolute`,bottom:0,left:0,right:0,margin:0,fontSize:9,textAlign:`center`,borderRadius:`0 0 8px 8px`,background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,padding:`0 2px`},children:e.name})]},t))})]})]}),ft.length>0&&(0,$.jsxs)(`div`,{style:{marginTop:24},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,display:`block`,marginBottom:12},children:`本项目生成记录`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},className:`stagger-children`,children:ft.map((e,t)=>{let n=At(e),r=E[e.id]??(e.optimizedPrompt||e.originalPrompt),i=A===e.id,a=e.genType||`image`;return(0,$.jsxs)(`div`,{className:`animate-slideInCard`,style:{animationDelay:`${t*.05}s`},children:[(0,$.jsxs)(`div`,{className:`record-item`,onClick:()=>j(i?null:e.id),style:{padding:`12px 16px`,borderRadius:i?`12px 12px 0 0`:12,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,transition:`all 0.2s`,display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,background:a===`image`?`#fef3c7`:`#dbeafe`},children:a===`image`?(0,$.jsx)(d6,{style:{color:`#d97706`,fontSize:12}}):(0,$.jsx)(q8,{style:{color:`#2563eb`,fontSize:12}})}),i?(0,$.jsx)(OQ,{style:{color:`#6366f1`,fontSize:11,flexShrink:0}}):(0,$.jsx)(a4,{style:{color:`#cbd5e1`,fontSize:11,flexShrink:0}}),(0,$.jsx)(k$,{color:jt[n]?.color,icon:jt[n]?.icon,style:{margin:0},children:jt[n]?.text}),(0,$.jsx)(Q.Text,{style:{flex:1,fontSize:13,color:`#475569`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:r}),n===`prompt_optimized`&&(0,$.jsx)(k$,{color:`processing`,style:{padding:`3px 10px`,fontSize:12,margin:0,flexShrink:0},children:`待配置`}),a===`image`?(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.imageSize}`:`-`,` ·`,` `,e.imageProportion||`-`,` ·`,` `,e.imagePx||`-`,` ·`,` `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:a9(e.createdAt)})]}):(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.duration}秒`:`-`,` ·`,` `,e.aspectRatio||`-`,` · `,e.resolution||`-`,` `,`·`,` `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:a9(e.createdAt)})]}),(0,$.jsx)(`div`,{className:`record-actions`,onClick:e=>e.stopPropagation(),children:(0,$.jsx)(jU,{children:n===`failed`&&(0,$.jsx)(bD,{type:`primary`,danger:!0,size:`small`,icon:(0,$.jsx)(b6,{}),loading:x[e.id],onClick:()=>kt(e.id),style:{borderRadius:8},children:`重试`})})})]}),i&&(0,$.jsx)(`div`,{style:{background:`#fff`,border:`1px solid #f0f0f5`,borderTop:`none`,borderRadius:`0 0 12px 12px`,padding:`18px 20px`,animation:`fadeInUp 0.25s ease both`},children:(0,$.jsxs)(`div`,{className:`gen-detail-row`,style:{display:`flex`,gap:20,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 50%`,minWidth:260},children:[(0,$.jsxs)(`div`,{style:{marginBottom:14},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.7},children:e.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:14},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,(n===`prompt_optimized`||n===`failed`)&&O!==e.id&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),O!==e.id&&(0,$.jsxs)(jU,{size:4,children:[(0,$.jsx)(eT,{title:`复制`,children:(0,$.jsx)(bD,{type:`text`,size:`small`,icon:(0,$.jsx)(i1,{}),onClick:()=>{navigator.clipboard.writeText(r),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(n===`prompt_optimized`||n===`failed`)&&(0,$.jsx)(eT,{title:`编辑`,children:(0,$.jsx)(bD,{type:`text`,size:`small`,icon:(0,$.jsx)(F$,{}),onClick:()=>{k(e.id),D(t=>({...t,[e.id]:t[e.id]??e.optimizedPrompt??``}))},style:{color:`#6366f1`}})})]})]}),O===e.id?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(oK.TextArea,{value:r,onChange:t=>D(n=>({...n,[e.id]:t.target.value})),rows:4,style:{borderRadius:10,fontSize:13,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(bD,{size:`small`,onClick:()=>k(null),children:`取消`}),(0,$.jsx)(bD,{size:`small`,type:`primary`,onClick:()=>{D(t=>({...t,[e.id]:r})),k(null),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:n===`prompt_optimized`?`rgba(99,102,241,0.02)`:`#f8f9fc`,border:n===`prompt_optimized`?`1px solid rgba(99,102,241,0.1)`:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:r})})]}),a===`image`?(0,$.jsx)(`div`,{style:{display:`flex`,gap:14,padding:`10px 14px`,borderRadius:10,background:`#f8f9fc`},children:[{label:`文字积分`,value:`${e.textCreditsCost||0}`},{label:`图片积分`,value:`${e.creditsCost||0}`},{label:`分辨率`,value:e.imageSize?`${e.imageSize}`:`-`},{label:`比例`,value:e.imageProportion||`-`},{label:`尺寸`,value:e.imagePx||`-`}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:13,color:`#1a1a2e`},children:e.value})]},t))}):(0,$.jsx)(`div`,{style:{display:`flex`,gap:14,padding:`10px 14px`,borderRadius:10,background:`#f8f9fc`},children:[{label:`文字积分`,value:`${e.textCreditsCost||0}`},{label:`视频积分`,value:`${e.creditsCost||0}`},{label:`时长`,value:e.duration?`${e.duration}秒`:`-`},{label:`比例`,value:e.aspectRatio||`-`},{label:`分辨率`,value:e.resolution||`-`}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:13,color:`#1a1a2e`},children:e.value})]},t))}),(e.references&&e.references.length>0||n===`failed`)&&(0,$.jsxs)(`div`,{style:{marginTop:14},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:[`参考素材`,` `,n===`failed`&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可删除/添加后重试)`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:[e.references?.map((t,r)=>(0,$.jsxs)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`visible`,border:`1px solid #e2e8f0`,position:`relative`,cursor:`pointer`},onClick:()=>{t.type===`video`&&ae(`http://ceshi.apiforeign.minzhong.cn${t.url}`)},children:[(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`hidden`},children:t.type===`image`?(0,$.jsx)(TG,{src:`http://ceshi.apiforeign.minzhong.cn${t.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},preview:!0}):(0,$.jsx)(c9,{src:`http://ceshi.apiforeign.minzhong.cn${t.url}`,width:64,height:64})}),(0,$.jsx)(k$,{style:{position:`absolute`,bottom:0,left:0,right:0,margin:0,fontSize:9,textAlign:`center`,borderRadius:`0 0 8px 8px`,background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,padding:`0 2px`},children:t.name}),n===`failed`&&(0,$.jsx)(`div`,{className:`ref-delete`,onClick:n=>{n.stopPropagation(),V5(t.url).catch(()=>{});let i=e.references.filter((e,t)=>t!==r);i9.getState().updateRecordReferences(e.id,i)},style:{position:`absolute`,top:-4,right:-4,width:16,height:16,borderRadius:`50%`,background:`rgba(239,68,68,0.8)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,opacity:0,transition:`opacity 0.15s`},children:(0,$.jsx)(d4,{style:{color:`#fff`,fontSize:10}})})]},r)),n===`failed`&&(0,$.jsx)(C0,{accept:`image/*,video/*`,showUploadList:!1,multiple:!0,beforeUpload:t=>{let n=t.type.startsWith(`image/`),r=t.type.startsWith(`video/`);return!n&&!r?(Z.error(`仅支持图片或视频文件`),!1):((n?z5:B5)(t).then(r=>{let i={url:r.url,type:n?`image`:`video`,name:t.name||(n?`图片`:`视频`)},a=e.references||[];i9.getState().updateRecordReferences(e.id,[...a,i]),Z.success(`上传成功`)}).catch(()=>Z.error(`上传失败`)),!1)},children:(0,$.jsx)(eT,{title:`添加参考素材`,children:(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:10,border:`1.5px dashed #d9d9d9`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#d9d9d9`},children:(0,$.jsx)(bR,{style:{fontSize:18,color:`#94a3b8`}})})})})]})]})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 40%`,minWidth:220,position:`relative`},children:[n===`prompt_optimized`&&(0,$.jsxs)(`div`,{style:{marginTop:16,position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,backgroundColor:`transparent`},children:[a===`video`&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,flexWrap:`wrap`,marginBottom:12},children:[(0,$.jsxs)(`div`,{translate:`no`,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,marginLeft:12},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`时长`}),(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:13,color:`#6366f1`},children:[e.duration,`秒`]})]}),(0,$.jsx)(Mt,{label:`比例`,value:q[e.id]?.aspectRatio||`选择比例`,options:me.ratios,expanded:fe===`ratio-${e.id}`,onToggle:()=>pe(fe===`ratio-${e.id}`?null:`ratio-${e.id}`),onSelect:t=>ie(n=>({...n,[e.id]:{...n[e.id],aspectRatio:t,resolution:n[e.id]?.resolution||``}})),onClose:()=>pe(null)}),(0,$.jsx)(Mt,{label:`分辨率`,value:q[e.id]?.resolution||`选择分辨率`,options:me.resolutions,expanded:fe===`res-${e.id}`,onToggle:()=>pe(fe===`res-${e.id}`?null:`res-${e.id}`),onSelect:t=>ie(n=>({...n,[e.id]:{...n[e.id],aspectRatio:n[e.id]?.aspectRatio||``,resolution:t}})),onClose:()=>pe(null)})]}),(0,$.jsxs)(bD,{type:`primary`,size:`large`,icon:(0,$.jsx)(F6,{}),block:!0,loading:x[e.id],disabled:a===`video`&&(!q[e.id]?.aspectRatio||!q[e.id]?.resolution),onClick:async()=>{let t=q[e.id];if(a===`video`){if(!t?.aspectRatio||!t?.resolution){Z.error(`请选择比例和分辨率`);return}if(ht({...t,[e.id]:!0})),T(t=>({...t,[e.id]:`generating`}));let n=a===`video`?`视频`:`图片`;Z.loading({content:`「${pt}」正在生成${n}...`,duration:0,key:e.id});try{await c(e.id,{aspectRatio:t?.aspectRatio,resolution:t?.resolution}),T(t=>({...t,[e.id]:`done`})),Z.success({content:`「${pt}」${n}生成成功!`,key:e.id,duration:3})}catch{T(t=>({...t,[e.id]:`failed`})),Z.error({content:`「${pt}」${n}生成失败`,key:e.id,duration:3})}finally{C(t=>({...t,[e.id]:!1}))}},style:{borderRadius:12,fontWeight:600,color:`#fff`,height:48,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,position:`absolute`,bottom:18,left:0},children:[`生成`,a===`video`?`视频`:`图片`,a===`video`?(0,$.jsx)(`span`,{style:{color:`#d2d2d2`,fontSize:`14px`,marginLeft:`6px`},children:`(请选择上方的比例分辨率)`}):``,` `,a===`video`&&q[e.id]?.resolution?`(${Ie(e.duration||5,q[e.id].resolution)}积分)`:``,a===`image`&&e.imageSize?`(${Le(e.imageSize)}积分)`:a===`image`?`(积分)`:``]})]}),n===`failed`&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:18,right:20},children:(0,$.jsxs)(bD,{type:`primary`,danger:!0,size:`large`,icon:(0,$.jsx)(b6,{}),block:!0,loading:x[e.id],onClick:()=>kt(e.id),style:{borderRadius:12,fontWeight:600,height:48},children:[`重新生成`,a===`video`?`视频`:`图片`]})}),n===`generating`?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`linear-gradient(135deg, rgba(99,102,241,0.04), rgba(139,92,246,0.04))`,border:`1px dashed rgba(99,102,241,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10},children:[(0,$.jsx)(Xm,{style:{color:`#6366f1`,fontSize:28},spin:!0}),(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:[a===`video`?`视频`:`图片`,`生成中...`]})]}):n===`completed`&&e.videoUrl||e.imageUrl?(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,border:`1px solid #f0f0f5`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:10,right:10,zIndex:10},children:(0,$.jsx)(eT,{title:`下载${a===`video`?`视频`:`图片`}`,children:(0,$.jsx)(bD,{size:`small`,icon:(0,$.jsx)(_0,{}),onClick:()=>{let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${a===`video`?e.videoUrl:e.imageUrl}&download=1`,t.download=`${e.projectName}${a===`video`?`.mp4`:`.png`}`,t.click()},style:{background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,backdropFilter:`blur(4px)`,borderRadius:8},children:`下载`})})}),(0,$.jsx)(`div`,{style:{minHeight:180,overflow:`hidden`},children:a===`video`?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.videoUrl}`,controls:!0,preload:`metadata`,style:{width:`100%`,height:`400px`,borderRadius:0}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.imageUrl}`,alt:e.projectName,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`,borderRadius:0}})}),(0,$.jsxs)(`div`,{style:{padding:`8px 12px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:`#fafbff`},children:[(0,$.jsxs)(jU,{children:[a===`video`?(0,$.jsx)(q8,{style:{color:`#6366f1`,fontSize:13}}):(0,$.jsx)(d6,{style:{color:`#6366f1`,fontSize:13}}),(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#475569`},children:e.projectName})]}),e.generatedAt&&(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:11,color:`#94a3b8`},children:a9(e.generatedAt)})]})]}):n===`failed`?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`rgba(239,68,68,0.03)`,border:`1px dashed rgba(239,68,68,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10,padding:16},children:[(0,$.jsx)(d4,{style:{color:`#ef4444`,fontSize:28}}),(0,$.jsxs)(Q.Text,{style:{color:`#ef4444`,fontSize:14,fontWeight:600},children:[a===`video`?`视频`:`图片`,`生成失败`]}),e.errorMessage&&(0,$.jsx)(Q.Text,{style:{color:`#ef4444`,fontSize:12,textAlign:`center`,lineHeight:1.6},children:e.errorMessage})]}):(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`#f8f9fc`,border:`1px dashed #e2e8f0`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10},children:[(0,$.jsx)(MH,{style:{color:`#94a3b8`,fontSize:28}}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:a===`image`?`待生成图片`:n===`prompt_optimized`?`待配置视频参数`:`待生成视频`})]})]})]})})]},e.id)})})]}),(0,$.jsx)(Rq,{open:!!J,onCancel:()=>ae(null),footer:null,width:480,centered:!0,destroyOnClose:!0,closable:!1,title:null,styles:{body:{padding:0,background:`#000`,position:`relative`}},children:J&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:J,controls:!0,autoPlay:!0,style:{width:`100%`,display:`block`,maxHeight:`70vh`}}),(0,$.jsx)(`div`,{onClick:()=>ae(null),style:{position:`absolute`,top:8,right:8,width:28,height:28,borderRadius:`50%`,background:`rgba(0,0,0,0.6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,transition:`background 0.15s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(0,0,0,0.85)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(0,0,0,0.6)`},children:(0,$.jsx)(d4,{style:{color:`#fff`,fontSize:16}})})]})})]})},l9={optimizing:{color:`processing`,text:`优化中`,icon:(0,$.jsx)(Xm,{spin:!0})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,$.jsx)(MH,{})},generating:{color:`warning`,text:`生成中`,icon:(0,$.jsx)(Xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,$.jsx)(c4,{})},failed:{color:`error`,text:`失败`,icon:(0,$.jsx)(d4,{})}},ute=()=>{let{records:e,projects:t,fetchRecords:n,fetchProjects:r,generateVideo:i}=i9(),a=e.items,[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(10),[u,d]=(0,S.useState)({}),[f,p]=(0,S.useState)(void 0),[m,h]=(0,S.useState)(void 0),[g,_]=(0,S.useState)({}),[v,y]=(0,S.useState)(null),[b,x]=(0,S.useState)(null),[C,w]=(0,S.useState)(null);(0,S.useEffect)(()=>{r()},[r]),(0,S.useEffect)(()=>{n({projectId:f,status:m,page:o,pageSize:c})},[n,f,m,o,c]);let T=async()=>{if(!C)return;let{recordId:e,projectName:t,ratio:n,resolution:r}=C;d(t=>({...t,[e]:!0})),w(null),Z.loading({content:`「${t}」正在生成视频...`,duration:0,key:e});try{await i(e,{aspectRatio:n,resolution:r}),Z.success({content:`「${t}」视频生成成功!`,key:e,duration:3})}catch{Z.error({content:`「${t}」视频生成失败`,key:e,duration:3})}finally{d(t=>({...t,[e]:!1}))}},E=e=>{if((e.genType||`image`)===`image`){d(t=>({...t,[e.id]:!0})),Z.loading({content:`「${e.projectName}」正在生成图片...`,duration:0,key:e.id}),i(e.id,{}).then(()=>{Z.success({content:`「${e.projectName}」图片生成成功!`,key:e.id,duration:3})}).catch(()=>{Z.error({content:`「${e.projectName}」图片生成失败`,key:e.id,duration:3})}).finally(()=>{d(t=>({...t,[e.id]:!1}))});return}w({recordId:e.id,projectName:e.projectName,ratio:e.aspectRatio||`16:9`,resolution:e.resolution||`720p`})},D=a;return(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#94a3b8`},children:`查看所有视频生成记录,点击记录查看完整内容和视频`})}),(0,$.jsxs)(`div`,{className:`record-filter-bar animate-fadeInUp`,style:{display:`flex`,gap:12,marginBottom:20,padding:`14px 20px`,borderRadius:14,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(jU,{children:[(0,$.jsx)(X4,{style:{color:`#94a3b8`}}),(0,$.jsx)(uw,{placeholder:`全部项目`,allowClear:!0,style:{width:200},onChange:e=>{p(e),s(1)},children:t.map(e=>(0,$.jsx)(uw.Option,{value:e.id,children:e.name},e.id))}),(0,$.jsxs)(uw,{placeholder:`全部状态`,allowClear:!0,style:{width:140},onChange:e=>{h(e),s(1)},children:[(0,$.jsx)(uw.Option,{value:`prompt_optimized`,children:`待生成`}),(0,$.jsx)(uw.Option,{value:`generating`,children:`生成中`}),(0,$.jsx)(uw.Option,{value:`completed`,children:`已完成`}),(0,$.jsx)(uw.Option,{value:`failed`,children:`失败`})]})]}),(0,$.jsxs)(Q.Text,{style:{marginLeft:`auto`,lineHeight:`32px`,color:`#94a3b8`,fontSize:13},children:[`共 `,e.total,` 条记录`]})]}),D.length===0?(0,$.jsx)(PC,{image:PC.PRESENTED_IMAGE_SIMPLE,description:`暂无生成记录`,style:{padding:60}}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},className:`stagger-children`,children:D.map((e,t)=>{let n=v===e.id,r=g[e.id]??e.optimizedPrompt,i=u[e.id],a=b===e.id,o=e.genType||`image`;return(0,$.jsxs)(`div`,{className:`animate-slideInCard`,style:{animationDelay:`${t*.04}s`},children:[(0,$.jsxs)(`div`,{className:`record-item`,onClick:()=>x(a?null:e.id),style:{padding:`14px 20px`,borderRadius:a?`14px 14px 0 0`:14,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,transition:`all 0.2s`,display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,background:o===`image`?`#fef3c7`:`#dbeafe`},children:o===`image`?(0,$.jsx)(d6,{style:{color:`#d97706`,fontSize:12}}):(0,$.jsx)(q8,{style:{color:`#2563eb`,fontSize:12}})}),a?(0,$.jsx)(OQ,{style:{color:`#6366f1`,fontSize:12,flexShrink:0}}):(0,$.jsx)(a4,{style:{color:`#cbd5e1`,fontSize:12,flexShrink:0}}),(0,$.jsx)(k$,{color:l9[e.status].color,icon:l9[e.status].icon,style:{margin:0},children:l9[e.status].text}),(0,$.jsx)(k$,{style:{background:`#f0f0ff`,border:`none`,color:`#6366f1`,margin:0},children:e.projectName}),(0,$.jsx)(Q.Text,{style:{flex:1,fontSize:13,color:`#475569`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:r}),o===`image`?(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.imageSize}`:`-`,` · `,e.imageProportion||`-`,` · `,e.imagePx||`-`,` · `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:a9(e.createdAt)})]}):(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.duration}秒`:`-`,` · `,e.aspectRatio||`-`,` · `,e.resolution||`-`,` · `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:a9(e.createdAt)})]}),(0,$.jsx)(`div`,{className:`record-actions`,onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(jU,{children:[e.status===`prompt_optimized`&&(0,$.jsx)(bD,{type:`primary`,size:`small`,icon:(0,$.jsx)(b6,{}),loading:i,onClick:()=>E(e),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`生成`}),e.status===`generating`&&(0,$.jsx)(k$,{color:`processing`,icon:(0,$.jsx)(Xm,{spin:!0}),style:{padding:`4px 12px`,fontSize:12},children:`生成中...`}),e.status===`failed`&&(0,$.jsx)(bD,{type:`primary`,danger:!0,size:`small`,icon:(0,$.jsx)(b6,{}),loading:i,onClick:()=>E(e),style:{borderRadius:8},children:`重试`})]})})]}),a&&(0,$.jsx)(`div`,{style:{background:`#fff`,border:`1px solid #f0f0f5`,borderTop:`none`,borderRadius:`0 0 14px 14px`,padding:`20px 24px`,animation:`fadeInUp 0.25s ease both`},children:(0,$.jsxs)(`div`,{className:`gen-detail-row`,style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 50%`,minWidth:280},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.7},children:e.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词 `,e.status===`prompt_optimized`&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!n&&(0,$.jsxs)(jU,{size:4,children:[(0,$.jsx)(eT,{title:`复制`,children:(0,$.jsx)(bD,{type:`text`,size:`small`,icon:(0,$.jsx)(i1,{}),onClick:()=>{navigator.clipboard.writeText(r),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),e.status===`prompt_optimized`&&(0,$.jsx)(eT,{title:`编辑`,children:(0,$.jsx)(bD,{type:`text`,size:`small`,icon:(0,$.jsx)(F$,{}),onClick:()=>{y(e.id),_(t=>({...t,[e.id]:t[e.id]??e.optimizedPrompt}))},style:{color:`#6366f1`}})})]})]}),n?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(oK.TextArea,{value:r,onChange:t=>_(n=>({...n,[e.id]:t.target.value})),rows:4,style:{borderRadius:10,fontSize:13,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(bD,{size:`small`,onClick:()=>y(null),children:`取消`}),(0,$.jsx)(bD,{size:`small`,type:`primary`,onClick:()=>{_(t=>({...t,[e.id]:r})),y(null),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:r})})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:16,padding:`12px 16px`,borderRadius:10,background:`#f8f9fc`},children:o===`image`?[{label:`分辨率`,value:e.imageSize?`${e.imageSize} `:`-`},{label:`画面比例`,value:e.imageProportion?`${e.imageProportion} `:`-`},{label:`画面尺寸`,value:e.imageProportion?`${e.imageProportion} `:`-`},{label:`消耗积分`,value:e.creditsCost?`${e.creditsCost} `:`-`,highlight:!!e.creditsCost}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:e.highlight?`#6366f1`:`#1a1a2e`},children:e.value})]},t)):[{label:`时长`,value:e.duration?`${e.duration} 秒`:`-`},{label:`画面比例`,value:e.aspectRatio||(e.status===`prompt_optimized`?`待选择`:`-`)},{label:`分辨率`,value:e.resolution||(e.status===`prompt_optimized`?`待选择`:`-`)},{label:`消耗积分`,value:e.creditsCost?`${e.creditsCost}`:`-`,highlight:!!e.creditsCost}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:e.highlight?`#6366f1`:`#1a1a2e`},children:e.value})]},t))}),e.status===`prompt_optimized`&&(0,$.jsx)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:(0,$.jsx)(bD,{type:`primary`,size:`large`,icon:(0,$.jsx)(F6,{}),loading:i,onClick:()=>E(e),style:{borderRadius:12,fontWeight:600,height:44,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.3)`},children:o===`video`?`选择参数生成视频`:`生成图片`})}),e.status===`failed`&&(0,$.jsx)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:(0,$.jsxs)(bD,{type:`primary`,danger:!0,size:`large`,icon:(0,$.jsx)(b6,{}),loading:i,onClick:()=>E(e),style:{borderRadius:12,fontWeight:600,height:44},children:[`重新生成`,o===`video`?`视频`:`图片`]})})]}),(0,$.jsx)(`div`,{style:{flex:`1 1 40%`,minWidth:240},children:e.status===`generating`?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`linear-gradient(135deg, rgba(99,102,241,0.04), rgba(139,92,246,0.04))`,border:`1px dashed rgba(99,102,241,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(Xm,{style:{color:`#6366f1`,fontSize:32},spin:!0}),(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:[o===`video`?`视频`:`图片`,`生成中...`]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:12},children:`请耐心等待,生成完成后将自动展示`})]}):e.status===`completed`&&(e.videoUrl||e.imageUrl)?(0,$.jsxs)(`div`,{style:{borderRadius:14,overflow:`hidden`,border:`1px solid #f0f0f5`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:10,right:10,zIndex:10},children:(0,$.jsx)(eT,{title:`下载${o===`video`?`视频`:`图片`}`,children:(0,$.jsx)(bD,{size:`small`,icon:(0,$.jsx)(_0,{}),onClick:()=>{let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${o===`video`?e.videoUrl:e.imageUrl}&download=1`,t.download=`${e.projectName}${o===`video`?`.mp4`:`.png`}`,t.click()},style:{background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,backdropFilter:`blur(4px)`,borderRadius:8},children:`下载`})})}),(0,$.jsx)(`div`,{style:{minHeight:280,overflow:`hidden`},children:o===`video`?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.videoUrl}`,controls:!0,preload:`metadata`,style:{width:`100%`,height:`400px`,display:`block`}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.imageUrl}`,alt:e.projectName,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`,display:`block`}})}),(0,$.jsxs)(`div`,{style:{padding:`10px 14px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:`#fafbff`},children:[(0,$.jsxs)(jU,{children:[o===`video`?(0,$.jsx)(q8,{style:{color:`#6366f1`}}):(0,$.jsx)(d6,{style:{color:`#6366f1`}}),(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#475569`},children:e.projectName})]}),e.generatedAt&&(0,$.jsxs)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:12,color:`#94a3b8`},children:[`生成于 `,a9(e.generatedAt)]})]})]}):e.status===`failed`?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`rgba(239,68,68,0.03)`,border:`1px dashed rgba(239,68,68,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(d4,{style:{color:`#ef4444`,fontSize:32}}),(0,$.jsxs)(Q.Text,{style:{color:`#ef4444`,fontSize:14},children:[o===`video`?`视频`:`图片`,`生成失败`]}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:12},children:`请在左侧点击重新生成`})]}):(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`#f8f9fc`,border:`1px dashed #e2e8f0`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(MH,{style:{color:`#94a3b8`,fontSize:32}}),(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:[`待生成`,o===`video`?`视频`:`图片`]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:12},children:`点击左侧生成按钮开始生成`})]})})]})})]},e.id)})}),e.total>0&&(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:18},children:(0,$.jsx)(KK,{current:e.page||o,pageSize:e.pageSize||c,total:e.total,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{s(e),l(t)}})}),(0,$.jsx)(Rq,{title:(0,$.jsxs)(jU,{children:[(0,$.jsx)(F6,{}),`生成视频`]}),open:!!C,onCancel:()=>w(null),onOk:T,okText:`提交生成`,cancelText:`取消`,width:420,children:C&&(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:(()=>{let e=a.find(e=>e.id===C.recordId);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`时长`}),(0,$.jsxs)(Q.Text,{strong:!0,children:[e?.duration||5,`秒`]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`画面比例`}),(0,$.jsx)(uw,{value:C.ratio,onChange:e=>w(t=>t?{...t,ratio:e}:null),style:{width:`100%`},options:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`].map(e=>({value:e,label:e}))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`分辨率`}),(0,$.jsx)(uw,{value:C.resolution,onChange:e=>w(t=>t?{...t,resolution:e}:null),style:{width:`100%`},options:[`480p`,`720p`,`1080p`].map(e=>({value:e,label:e}))})]})]})})()})})]})},u9=({value:e,duration:t=1200})=>{let[n,r]=(0,S.useState)(0),i=(0,S.useRef)(0);return(0,S.useEffect)(()=>{let a=n,o=e-a;if(o===0)return;let s=performance.now(),c=e=>{let n=e-s,l=Math.min(n/t,1);r(a+o*(1-(1-l)**3)),l<1&&(i.current=requestAnimationFrame(c))};return i.current=requestAnimationFrame(c),()=>cancelAnimationFrame(i.current)},[e]),(0,$.jsx)($.Fragment,{children:n.toLocaleString()})},dte=()=>{let{user:e}=X7(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(1),[s,c]=(0,S.useState)(10),[l,u]=(0,S.useState)(0);(0,S.useEffect)(()=>{(async()=>{i(!0);let e=await W5(a,s);n(e.records),u(e.total),i(!1)})()},[a,s]);let d=(e,t)=>{o(e),c(t)},f=t.filter(e=>e.type===`recharge`).reduce((e,t)=>e+t.amount,0),p=t.filter(e=>e.type===`consume`).reduce((e,t)=>e+Math.abs(t.amount),0);return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(OJ,{gutter:[16,16],style:{marginBottom:24},children:[(0,$.jsx)(gV,{xs:24,sm:8,children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:16,padding:24,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-20,top:-20,width:120,height:120,borderRadius:`50%`,background:`rgba(255,255,255,0.1)`}}),(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsxs)(jU,{style:{marginBottom:10},children:[(0,$.jsx)(X8,{style:{color:`rgba(255,255,255,0.8)`,fontSize:16}}),(0,$.jsx)(`span`,{style:{color:`rgba(255,255,255,0.8)`,fontSize:14},children:`当前可用积分`})]}),(0,$.jsx)(`div`,{style:{color:`#fff`,fontSize:38,fontWeight:800,lineHeight:1},children:(0,$.jsx)(u9,{value:e?.credits??0})})]})]})}),(0,$.jsx)(gV,{xs:12,sm:8,children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:16,padding:24,background:`#fff`,border:`1px solid #f0f0f5`,animationDelay:`0.06s`},children:[(0,$.jsxs)(jU,{style:{marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:`rgba(16,185,129,0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(C2,{style:{color:`#10b981`,fontSize:14}})}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:14},children:`累计获得`})]}),(0,$.jsx)(`div`,{style:{color:`#10b981`,fontSize:28,fontWeight:800},children:(0,$.jsx)(u9,{value:f})})]})}),(0,$.jsx)(gV,{xs:12,sm:8,children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:16,padding:24,background:`#fff`,border:`1px solid #f0f0f5`,animationDelay:`0.12s`},children:[(0,$.jsxs)(jU,{style:{marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:`rgba(239,68,68,0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(_2,{style:{color:`#ef4444`,fontSize:14}})}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:14},children:`累计消耗`})]}),(0,$.jsx)(`div`,{style:{color:`#ef4444`,fontSize:28,fontWeight:800},children:(0,$.jsx)(u9,{value:p})})]})})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{animationDelay:`0.15s`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(k8,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`积分明细`})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(g$,{columns:[{title:`类型`,dataIndex:`type`,key:`type`,width:100,render:e=>(0,$.jsx)(k$,{color:e===`recharge`?`green`:`orange`,icon:e===`recharge`?(0,$.jsx)(C2,{}):(0,$.jsx)(_2,{}),children:e===`recharge`?`充值`:`消费`})},{title:`积分变动`,dataIndex:`amount`,key:`amount`,width:120,render:e=>(0,$.jsxs)(Q.Text,{strong:!0,style:{color:e>0?`#10b981`:`#ef4444`,fontSize:15},children:[e>0?`+`:``,e]})},{title:`说明`,dataIndex:`description`,key:`description`},{title:`时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,style:{color:`#94a3b8`},children:a9(e)})}],dataSource:t,rowKey:`id`,loading:r,pagination:{current:a,pageSize:s,total:l,onChange:d,showSizeChanger:!0,showTotal:e=>`共 ${e} 条`},scroll:{x:500}})})]})]})},fte=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(1),[u]=(0,S.useState)(10);(0,S.useEffect)(()=>{d()},[c]);let d=async()=>{t(!0);try{let e=await W5(c,u);r(e.records||[]),a(e.credits||0),s(e.total||0)}catch{r([])}t(!1)};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(OJ,{gutter:[16,16],style:{marginBottom:24},children:[(0,$.jsx)(gV,{xs:24,sm:8,children:(0,$.jsxs)(`div`,{style:{borderRadius:16,padding:24,background:`linear-gradient(135deg, #f59e0b 0%, #ea580c 100%)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-20,top:-20,width:120,height:120,borderRadius:`50%`,background:`rgba(255,255,255,0.1)`}}),(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:10},children:[(0,$.jsx)(X8,{style:{color:`rgba(255,255,255,0.8)`,fontSize:16}}),(0,$.jsx)(`span`,{style:{color:`rgba(255,255,255,0.8)`,fontSize:14},children:`可用积分`})]}),(0,$.jsx)(`div`,{style:{color:`#fff`,fontSize:38,fontWeight:800,lineHeight:1},children:i.toLocaleString()})]})]})}),(0,$.jsx)(gV,{xs:12,sm:8,children:(0,$.jsxs)(`div`,{style:{borderRadius:16,padding:24,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:`rgba(16,185,129,0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(C6,{style:{color:`#10b981`,fontSize:14}})}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:14},children:`累计获得`})]}),(0,$.jsx)(`div`,{style:{color:`#10b981`,fontSize:28,fontWeight:800},children:n.filter(e=>e.amount>0).reduce((e,t)=>e+t.amount,0).toLocaleString()})]})}),(0,$.jsx)(gV,{xs:12,sm:8,children:(0,$.jsxs)(`div`,{style:{borderRadius:16,padding:24,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:`rgba(239,68,68,0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(k8,{style:{color:`#ef4444`,fontSize:14}})}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:14},children:`累计消耗`})]}),(0,$.jsx)(`div`,{style:{color:`#ef4444`,fontSize:28,fontWeight:800},children:n.filter(e=>e.amount<0).reduce((e,t)=>e+Math.abs(t.amount),0).toLocaleString()})]})})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(k8,{style:{color:`#f59e0b`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`积分明细`})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(pq,{spinning:e,children:n.length===0?(0,$.jsx)(PC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无积分变动记录`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(g$,{dataSource:n,columns:[{title:`变动类型`,dataIndex:`type`,key:`type`,width:120,render:e=>{let t={recharge:{color:`#10b981`,label:`充值`,bg:`rgba(16,185,129,0.1)`},consume:{color:`#ef4444`,label:`消费`,bg:`rgba(239,68,68,0.1)`},admin:{color:`#f59e0b`,label:`管理员调整`,bg:`rgba(245,158,11,0.1)`},refund:{color:`#8b5cf6`,label:`退款`,bg:`rgba(139,92,246,0.1)`}}[e]||{color:`#64748b`,label:e,bg:`rgba(100,116,139,0.1)`};return(0,$.jsx)(k$,{color:t.color,style:{background:t.bg,fontWeight:500,padding:`4px 12px`},children:t.label})}},{title:`描述`,dataIndex:`description`,key:`description`,ellipsis:!0},{title:`变动积分`,dataIndex:`amount`,key:`amount`,width:120,align:`right`,render:e=>(0,$.jsxs)(Q.Text,{strong:!0,style:{fontWeight:700,color:e>0?`#10b981`:`#ef4444`,fontSize:15},children:[e>0?`+`:``,e]})},{title:`创建时间`,key:`createdAt`,width:180,render:(e,t)=>{let n=t.created_at||t.createdAt||t.create_time||t.createTime;return n?new Date(n).toLocaleString(`zh-CN`):`-`}}],rowKey:`id`,pagination:!1,bordered:!1}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(KK,{current:c,pageSize:u,total:o,onChange:e=>{l(e)},size:`small`})})]})})})]})]})},pte=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(1),[c]=(0,S.useState)(10);(0,S.useEffect)(()=>{l()},[o]);let l=async()=>{t(!0);try{let e=await r7(o,c);r(e.items||[]),a(e.total||0)}catch{r([])}t(!1)};return(0,$.jsx)(`div`,{children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(IU,{style:{color:`#0ea5e9`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`订单记录`}),(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:[`共 `,n.length,` 条记录`]})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(pq,{spinning:e,children:n.length===0?(0,$.jsx)(PC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无订单记录`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(g$,{dataSource:n,columns:[{title:`订单号`,key:`orderNo`,width:200,render:(e,t)=>(0,$.jsx)(`span`,{style:{fontFamily:`monospace`,fontSize:13,color:`#64748b`},children:t.order_no||t.orderNo||t.id})},{title:`支付方式`,key:`paymentMethod`,width:100,render:(e,t)=>{let n=t.payment_method||t.paymentMethod||`wechat`,r={alipay:{icon:(0,$.jsx)(c2,{style:{fontSize:16}}),label:`支付宝`,color:`#1677ff`},wechat:{icon:(0,$.jsx)(n5,{style:{fontSize:16}}),label:`微信支付`,color:`#07c160`}},i=r[n]||r.wechat;return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{color:i.color},children:i.icon}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#374151`},children:i.label})]})}},{title:`金额`,key:`amount`,width:100,align:`right`,render:(e,t)=>{let n=t.amount||t.total_amount||0;return(0,$.jsxs)(Q.Text,{strong:!0,style:{fontWeight:700,fontSize:14,color:`#1e293b`},children:[`¥`,n]})}},{title:`获得积分`,key:`credits`,width:100,align:`center`,render:(e,t)=>{let n=t.credits||t.credit_amount||0;return(0,$.jsx)(Q.Text,{strong:!0,style:{fontWeight:600,fontSize:14,color:`#f59e0b`},children:n})}},{title:`状态`,key:`status`,width:100,render:(e,t)=>{let n=t.status||`pending`,r={pending:{color:`#f59e0b`,label:`待支付`,bg:`rgba(245,158,11,0.1)`},paid:{color:`#10b981`,label:`已支付`,bg:`rgba(16,185,129,0.1)`},refunded:{color:`#94a3b8`,label:`已退款`,bg:`rgba(148,163,184,0.1)`},failed:{color:`#ef4444`,label:`支付失败`,bg:`rgba(239,68,68,0.1)`},cancelled:{color:`#64748b`,label:`已取消`,bg:`rgba(100,116,139,0.1)`},processing:{color:`#0ea5e9`,label:`处理中`,bg:`rgba(14,165,233,0.1)`}}[n]||{color:`#64748b`,label:n,bg:`rgba(100,116,139,0.1)`};return(0,$.jsx)(k$,{color:r.color,style:{background:r.bg,fontWeight:500,padding:`4px 12px`},children:r.label})}},{title:`创建时间`,key:`createdAt`,width:180,render:(e,t)=>{let n=t.created_at||t.createdAt;return n?new Date(n).toLocaleString(`zh-CN`):`-`}},{title:`支付时间`,key:`paidAt`,width:180,render:(e,t)=>{let n=t.paid_at||t.paidAt;return n?new Date(n).toLocaleString(`zh-CN`):`-`}}],rowKey:`order_no`,pagination:!1,bordered:!1}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(KK,{current:o,pageSize:c,total:i,onChange:e=>{s(e)},size:`small`})})]})})})]})})},mte=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(1),[u]=(0,S.useState)(10);(0,S.useEffect)(()=>{d(),f()},[c]);let d=async()=>{t(!0);try{let e=await Y5(c,u);r(e.items||[]),s(e.total||0)}catch{r([])}t(!1)},f=async()=>{try{a(await X5())}catch{a(0)}},p=async e=>{try{await Z5(e),d(),f()}catch{}};return(0,$.jsx)(`div`,{children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(R2,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`消息中心`}),(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:[`未读 `,i,` 条`]})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(pq,{spinning:e,children:n.length===0?(0,$.jsx)(PC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无消息`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(g$,{dataSource:n,columns:[{title:`类型`,dataIndex:`type`,key:`type`,width:100,render:e=>{let t={system:{color:`#6366f1`,label:`系统`,bg:`rgba(99,102,241,0.1)`,icon:(0,$.jsx)(q6,{style:{fontSize:14}})},credit:{color:`#f59e0b`,label:`积分`,bg:`rgba(245,158,11,0.1)`,icon:(0,$.jsx)(X8,{style:{fontSize:14}})},promo:{color:`#8b5cf6`,label:`活动`,bg:`rgba(139,92,246,0.1)`,icon:(0,$.jsx)(c3,{style:{fontSize:14}})}},n=t[e]||t.system;return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{color:n.color},children:n.icon}),(0,$.jsx)(`span`,{style:{fontSize:13,color:n.color,fontWeight:500},children:n.label})]})}},{title:`标题`,dataIndex:`title`,key:`title`,ellipsis:!0},{title:`内容`,dataIndex:`content`,key:`content`,ellipsis:!0},{title:`状态`,dataIndex:`isRead`,key:`isRead`,width:80,render:(e,t)=>e??t.is_read?(0,$.jsx)(k$,{color:`gray`,style:{background:`rgba(148,163,184,0.1)`},children:`已读`}):(0,$.jsx)(k$,{color:`purple`,style:{background:`rgba(139,92,246,0.1)`},children:`未读`})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>{if(!e)return`-`;let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/(1e3*60*60));if(r<1)return`刚刚`;if(r<24)return`${r}小时前`;let i=Math.floor(r/24);return i<7?`${i}天前`:t.toLocaleDateString(`zh-CN`)}},{title:`操作`,key:`action`,width:100,render:(e,t)=>t.isRead??t.is_read?null:(0,$.jsx)(bD,{type:`text`,size:`small`,onClick:()=>p(t.id),style:{color:`#6366f1`},children:`标记已读`})}],rowKey:`id`,pagination:!1,bordered:!1}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(KK,{current:c,pageSize:u,total:o,onChange:e=>{l(e)},size:`small`})})]})})})]})})},d9=()=>{let[e]=Dn(),[t,n]=(0,S.useState)(`credits`);return(0,S.useEffect)(()=>{(e.get(`tab`)||`credits`)===`orders`?n(`orders`):n(`credits`)},[e]),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(vz,{activeKey:t,onChange:n,items:[{key:`credits`,label:`积分明细`},{key:`orders`,label:`订单记录`}],style:{marginBottom:24},size:`large`}),t===`credits`&&(0,$.jsx)(fte,{}),t===`orders`&&(0,$.jsx)(pte,{})]})},hte=`/assets/bg1-CQh9PRPW.png`,gte=`/assets/bg2-CNoKndHs.png`,{Header:_te,Sider:vte,Content:yte}=hK,{TextArea:bte}=oK,{Option:f9}=uw,{Text:p9}=Q,xte=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(`1`),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(``),{mediaType:c,countType:l,selectedRatio:u,selectedResolution:d,width:f,height:p,videoDuration:m,videoAspectRatio:h,videoResolution:g,engineOptions:_,enginesele:v,setMediaType:y,setCountType:b,setSelectedRatio:x,setSelectedResolution:C,setWidth:w,setHeight:T,setVideoDuration:E,setVideoAspectRatio:D,setVideoResolution:O,setEngineOptions:k,setEnginesele:A}=i9(),[j,M]=(0,S.useState)(!1),[N,P]=(0,S.useState)(!1),[F,I]=(0,S.useState)([]),[L,R]=(0,S.useState)(!1),[z,B]=(0,S.useState)(``),[V,H]=(0,S.useState)(`image`),U=(0,S.useRef)(null),[ee,te]=(0,S.useState)(new Set),ne=e=>{if(!e)return null;try{let t=new URL(e).searchParams.get(`exp`);return t?parseInt(t,10):null}catch{try{let t=e.indexOf(`?`);if(t!==-1){let n=e.substring(t+1),r=new URLSearchParams(n).get(`exp`);if(r)return parseInt(r,10)}return null}catch{return null}}},W=e=>{let t=ne(e);return t?Math.floor(Date.now()/1e3)>t:!1},[re,G]=(0,S.useState)(!1),[K,q]=(0,S.useState)(``),[ie,J]=(0,S.useState)(`image`),[ae,oe]=(0,S.useState)(``),[se,ce]=(0,S.useState)(!1),[le,ue]=(0,S.useState)(null),[de,fe]=(0,S.useState)({x:0,y:0}),[pe,me]=(0,S.useState)(!1),[he,ge]=(0,S.useState)(!1),[_e,ve]=(0,S.useState)([]),[ye,be]=(0,S.useState)([]),[xe,Se]=(0,S.useState)([]),[Ce,we]=(0,S.useState)(0),[Te,Ee]=(0,S.useState)(0),[De,Oe]=(0,S.useState)(!1),[ke,Ae]=(0,S.useState)([]),[je,Me]=(0,S.useState)([]),[Ne,Pe]=(0,S.useState)([]),Fe=()=>{let e={};return e=Ne.find(e=>e.modelConfigId===l&&e.genType===c&&e.resolution===(c===`video`?g:d)),e||(c===`video`?(e={perSecondCredits:2,baseCredits:60,ratio:1},g===`1080p`?e.ratio=2:g===`720p`?e.ratio=1.5:g===`480p`&&(e.ratio=1)):(e={perSecondCredits:.1,baseCredits:4,ratio:1},d===`2K`?e.ratio=1:d===`4K`&&(e.ratio=2))),c===`video`?Math.round((m*e.perSecondCredits+e.baseCredits)*e.ratio):e.baseCredits*e.ratio},Ie=(0,S.useRef)(null),Le=(0,S.useRef)(null),Re=(0,S.useRef)(null);(0,S.useRef)(!0),i.find(e=>e.id===n);let[ze,Be]=(0,S.useState)([]),[Ve,He]=(0,S.useState)({page:1,pageSize:20}),[Ue,We]=(0,S.useState)(0),[Ge,Ke]=(0,S.useState)(!1),qe=(0,S.useRef)(!1),Je=(0,S.useCallback)((e=`instant`)=>{let t=Le.current;t&&requestAnimationFrame(()=>{t.scrollTo({top:t.scrollHeight,behavior:e})})},[]);(0,S.useEffect)(()=>{if(ze.length>0&&!qe.current){let e=setTimeout(()=>{Je(`smooth`),qe.current=!0},300);return()=>clearTimeout(e)}},[ze.length,Je]),(0,S.useEffect)(()=>{let e=c===`image`?v.image:v.video;e&&e.length>0&&(e.some(e=>e.id===l)||b(e[0].id))},[c,v]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;De&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&Oe(!1),pe&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&me(!1),he&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&ge(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[De,pe,he]),(0,S.useEffect)(()=>{s7().then(e=>{if(A(e.engine),e.engine.video&&e.engine.video.length>0){let t=e.engine.video[0],n=e.engine.video.find(e=>e.id===l)||t;k({ratios:n.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:n.supportedResolutions||[`480p`,`720p`,`1080p`],durations:n.supportedDurations||[5,8,10,12,15]}),n.supportedRatios?.includes(h)||D(n.supportedRatios?.[0]||`16:9`),n.supportedResolutions?.includes(g)||O(n.supportedResolutions?.[0]||`720p`),n.supportedDurations?.includes(m)||E(n.supportedDurations?.[0]||5),l===`请选择`&&b(n.id)}}).catch(()=>{}),o7().then(e=>{Ae(e.video||[]),Me(e.image||[])}).catch(e=>{}),p7().then(e=>{Pe(e)}),l7(Ve).then(e=>{let t=e.items,n=e.total;Be(t),We(n)}),q5().then(e=>{let t=e.items?.[0]?.supportedSizes||{},n=[],r=[],i=[];for(let e in t[`2K`])n.push(e),r.push(t[`2K`][e]);ve(n.map((e,t)=>({value:e,label:String(t)})));for(let e in t[`4K`])i.push(t[`4K`][e]);Se([r,i]),be([{value:`2K`,label:`高清 2K`},{value:`4K`,label:`超清 4K`}])}).catch(()=>{})},[]),(0,S.useEffect)(()=>{if(Re.current&&=(clearInterval(Re.current),null),ze.some(e=>e.status===`generating`))return Re.current=window.setInterval(()=>{l7(Ve).then(e=>{Be(t=>t.map(t=>t.status===`generating`&&e.items.find(e=>e.id===t.id)||t)),We(e.total)}).catch(e=>{})},1e4),()=>{Re.current&&=(clearInterval(Re.current),null)}},[ze,Ve]),(0,S.useEffect)(()=>{if(!pe)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&me(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[pe]),(0,S.useEffect)(()=>{if(!he)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&ge(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[he]),(0,S.useEffect)(()=>{xe[Te]&&xe[Te][Ce]!==void 0&&(w(Number(xe[Te][Ce].substring(0,4))),T(Number(xe[Te][Ce].substring(5))))},[Ce]),(0,S.useEffect)(()=>{xe[Te]&&xe[Te][Ce]!==void 0&&(w(Number(xe[Te][Ce].substring(0,4))),T(Number(xe[Te][Ce].substring(5))))},[Te]);let Ye=e=>{we(e)},Xe=e=>{Ee(parseInt(e===`2K`?`0`:`1`))},Ze=()=>{w(p),T(f)},Qe=async()=>{if(!o.trim()&&F.length===0){Z.warning(`请输入内容或上传图片/视频`);return}let e={id:``,gen_type:c,original_prompt:o.trim(),engine_id:l,idempotency_key:new Date().toLocaleString(`zh-CN`),media_references:F.length>0?[...F]:void 0,...c===`image`&&{image_size:d,image_proportion:u,image_px:f+`x`+p},...c===`video`&&{duration:m,aspect_ratio:h,resolution:g}};P(!0),c7(e).then(()=>{s(``),I([]);let e={...Ve,page:1};He(e),l7(e).then(e=>{Be(t=>[...t,e.items[e.items.length-1]]),We(e.total),setTimeout(()=>{Ie.current?.scrollIntoView({behavior:`smooth`})},100)}).catch(e=>{})}).catch(e=>{let t=`创建任务失败`;e?.response?.data?.detail?t=e.response.data.detail:e?.data?.detail?t=e.data.detail:e?.detail?t=e.detail:e?.message&&(t=e.message),Z.error({content:t,duration:3})}).finally(()=>{P(!1)}),setTimeout(()=>{P(!1)},3e3)},$e=async()=>{if(ze.length>=Ue)return;let e=Le.current;if(!e)return;let t=e.scrollTop,n=e.scrollHeight;Ke(!0);try{let r=Ve.page+1,i=await l7({...Ve,page:r}),a=Array.isArray(i)?{items:i,total:i.length}:i;a.total&&We(a.total),He(e=>({...e,page:r})),Be(e=>{let t=new Set(e.map(e=>e.id));return[...a.items.filter(e=>!e.id||t.has(e.id)?!1:(t.add(e.id),!0)),...e]}),setTimeout(()=>{e.scrollTop=t+(e.scrollHeight-n)},200)}catch{}finally{Ke(!1)}},et=async e=>{let t=e.type.startsWith(`image/`),n=e.type.startsWith(`video/`);if(!t&&!n)return Z.error(`仅支持图片或视频文件`),!1;let r=n?100:10;if(e.size/1024/1024>r)return Z.error(`${n?`视频`:`图片`}大小不能超过${r}MB`),!1;let i=F.filter(e=>e.type===`image`).length;if(t&&i>=4)return Z.error(`最多上传4张图片`),!1;let a=F.filter(e=>e.type===`video`).length;if(n&&a>=1)return Z.error(`最多上传1个视频`),!1;M(!0);try{let n=await(t?z5:B5)(e);I(r=>[...r,{name:e.name,type:t?`image`:`video`,url:n.url}]),Z.success(`${t?`图片`:`视频`}上传成功`)}catch{Z.error(`上传失败`)}finally{M(!1)}return!1},tt=e=>{I(t=>t.filter((t,n)=>n!==e))},nt=e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),Qe())},rt=()=>{R(!1),B(``),U.current&&U.current.pause()},it=e=>{if(e.preventDefault(),e.stopPropagation(),!z)return;let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${z}&download=1`,t.download=V===`image`?`image.png`:`video.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)};return(0,$.jsxs)(hK,{style:{margin:`-24px -32px -32px`,borderRadius:20,height:`calc(100vh - 34px)`,background:`linear-gradient(135deg, #f8fafc 0%, #f0f4ff 50%, #faf5ff 100%)`,backgroundImage:`url(${gte})`,backgroundRepeat:`no-repeat`,backgroundSize:`100% 100%`,backgroundPosition:`center`},children:[!1,(0,$.jsxs)(hK,{style:{display:`flex`,flex:1,background:`transparent`},children:[(0,$.jsx)(_te,{style:{borderRadius:`20px 20px 0 0`,background:`rgba(255,255,255,0.1)`,backdropFilter:`blur(20px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`0 24px`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:36,height:36,borderRadius:12,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(M6,{style:{fontSize:18,color:`#fff`}})}),(0,$.jsx)(`div`,{children:(0,$.jsx)(p9,{strong:!0,style:{fontSize:16,background:`linear-gradient(90deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`开启创作`})})]})}),(0,$.jsxs)(yte,{style:{flex:1,margin:0,padding:24,boxSizing:`border-box`,display:`flex`,flexDirection:`column`,overflow:`hidden`,minHeight:0},children:[ze.length===0&&(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,borderRadius:50,background:`linear-gradient(135deg, #6366f1 0%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,marginBottom:16},children:(0,$.jsx)(M6,{style:{fontSize:40,color:`#fff`}})}),(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:500,color:`#333`},children:`你好,想创作什么?`}),(0,$.jsx)(`p`,{style:{margin:8,fontSize:13,color:`#999`},children:`输入想法、剧本或上传参考,开始你的创作之旅`})]}),ze.length>0&&(0,$.jsxs)(`div`,{ref:Le,style:{flex:1,overflowY:`auto`,paddingRight:8},children:[(0,$.jsx)(`div`,{style:{padding:`8px 0`,textAlign:`center`,marginBottom:16},children:ze.length>=Ue?(0,$.jsx)(`span`,{style:{fontSize:12,color:`#999`},children:`消息全部加载`}):(0,$.jsx)(`button`,{onClick:$e,disabled:Ge,style:{fontSize:12,color:`#6366f1`,background:`none`,border:`none`,cursor:Ge?`not-allowed`:`pointer`},children:Ge?`加载中...`:`加载更多`})}),(()=>{let e=Z;return ze.map(t=>(0,$.jsx)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`flex-start`,marginBottom:16},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:36,height:36,borderRadius:12,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},children:(0,$.jsx)(M6,{style:{color:`#fff`,fontSize:16}})}),(0,$.jsx)(`div`,{style:{flex:1},children:(0,$.jsxs)(`div`,{style:{background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:`16px 16px 16px 4px`,padding:`12px 16px`,width:`70%`,minWidth:500,boxSizing:`border-box`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.08), 0 1px 3px rgba(0,0,0,0.04)`,position:`relative`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:[(0,$.jsxs)(`div`,{style:{margin:4,fontSize:11,color:`#999`,textAlign:`left`,display:`flex`,flexWrap:`wrap`,gap:8,alignItems:`center`},children:[(0,$.jsx)(`span`,{children:t.createdAt?.replace(`T`,` `).split(`.`)[0]}),(0,$.jsx)(`span`,{style:{background:t.genType===`image`?`rgba(34, 197, 94, 0.12)`:`rgba(249, 115, 22, 0.12)`,color:t.genType===`image`?`#22c55e`:`#f97316`,padding:`2px 8px`,borderRadius:12,fontWeight:500,fontSize:11,marginLeft:8},children:t.genType===`image`?`图片生成`:`视频生成`})]}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,zIndex:100},children:(0,$.jsx)(Hq,{title:`确定要删除吗?`,onConfirm:async()=>{try{await f7(t.id),e.success(`删除成功`),Be(e=>e.filter(e=>e.id!==t.id)),We(e=>e-1)}catch(t){let n=t?.response?.data?.message||t?.message||`删除失败`;e.error(n)}},okText:`确定`,cancelText:`取消`,children:(0,$.jsx)(`button`,{onClick:e=>e.stopPropagation(),style:{width:28,height:28,borderRadius:8,border:`none`,background:`rgba(99, 102, 241, 0.08)`,color:`#6366f1`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s ease`,padding:0},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`,e.currentTarget.style.color=`#ef4444`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.08)`,e.currentTarget.style.color=`#6366f1`},children:(0,$.jsx)(M$,{style:{fontSize:12}})})})}),(t.status===`generating`||t.status===`failed`||t.status===`completed`)&&(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:16,marginTop:16,width:`100%`,alignItems:`flex-start`},children:[(0,$.jsx)(`div`,{style:{width:`50%`,overflow:`hidden`,borderRadius:12,position:`relative`,height:220,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%)`},children:t.status===`generating`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:12,left:12,display:`flex`,alignItems:`center`,gap:8,zIndex:2}}),(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%)`,animation:`shimmer 2s infinite`}}),(0,$.jsxs)(`div`,{style:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,display:`flex`,flexDirection:`column`,alignItems:`center`,gap:16},children:[(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:`50%`,background:`rgba(99, 102, 241, 0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 0 30px rgba(99, 102, 241, 0.2)`},children:(0,$.jsx)(`div`,{style:{width:48,height:48,border:`3px solid #c7d2fe`,borderTopColor:`#6366f1`,borderRadius:`50%`,animation:`spin 1s linear infinite`}})}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`,fontWeight:500},children:`生成中...`})]})]}):t.status===`failed`?(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:`50%`,background:`rgba(254, 226, 226, 0.8)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)($8,{style:{color:`#ef4444`,fontSize:22}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#94a3b8`},children:`生成失败`})]}):(0,$.jsx)($.Fragment,{children:t.genType===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${t.imageUrl}&w=300&p=50`,alt:t.name,style:{width:`100%`,height:`100%`,borderRadius:12,objectFit:`contain`,cursor:`pointer`,transition:`transform 0.3s ease`},onClick:()=>{B(t.imageUrl),H(`image`),R(!0)},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.05)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${t.videoCoverUrl}&w=300&p=50`,alt:t.name,style:{width:`100%`,height:`100%`,borderRadius:12,objectFit:`contain`,cursor:`pointer`,transition:`transform 0.3s ease`},onClick:()=>{B(t.videoUrl),H(`video`),R(!0)},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.05)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,width:56,height:56,background:`rgba(99, 102, 241, 0.85)`,borderRadius:`50%`,display:`flex`,alignItems:`center`,justifyContent:`center`,pointerEvents:`none`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.4)`},children:(0,$.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`#fff`,children:(0,$.jsx)(`path`,{d:`M8 5v14l11-7z`})})})]})})}),(0,$.jsxs)(`div`,{style:{width:`50%`,display:`flex`,flexDirection:`column`,gap:12},children:[(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:12,padding:12,border:`1px solid rgba(99, 102, 241, 0.08)`,flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`p`,{style:{width:`100%`,height:150,overflow:`auto`,padding:0,marginTop:0,marginBottom:0,lineHeight:2,color:`#475569`,fontSize:13},children:t.originalPrompt})}),(0,$.jsxs)(`div`,{style:{fontSize:12,color:`#64748b`,textAlign:`left`,display:`flex`,flexWrap:`wrap`,gap:12,alignItems:`center`,justifyContent:`space-between`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{borderRadius:16,color:`#6366f1`,fontWeight:500},children:t.engineSnapshot.name}),(0,$.jsx)(`span`,{style:{borderRadius:16,color:`#64748b`},children:t.genType===`image`?`${t.imageProportion||``} · ${t.imagePx||``} · ${t.imageSize||``}`:`${t.duration||``}s · ${t.aspectRatio||``} · ${t.resolution||``}`}),(0,$.jsxs)(`span`,{style:{borderRadius:16,color:`#ef4444`,fontWeight:500},children:[`消耗积分:`,t.creditsCost]})]})]})]}),(0,$.jsx)(`div`,{style:{textAlign:`right`},children:t.mediaReferences&&t.mediaReferences.length>0&&(0,$.jsx)(`span`,{style:{padding:`4px 12px`,borderRadius:16,color:`#6366f1`,cursor:`pointer`,fontWeight:500,border:`1px solid rgba(99, 102, 241, 0.2)`,background:`rgba(99, 102, 241, 0.04)`},onClick:e=>{e.stopPropagation();let n=e.currentTarget.getBoundingClientRect();fe({x:n.left,y:n.top-10}),ue(t.id),ce(!0)},children:`附件详情`})})]})})]})},t.id))})(),(0,$.jsx)(`div`,{ref:Ie})]}),se&&le&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`transparent`,zIndex:9998},onClick:()=>{ce(!1),ue(null)}}),(0,$.jsxs)(`div`,{style:{position:`fixed`,top:de.y-100,left:de.x,background:`#fff`,borderRadius:12,boxShadow:`0 4px 20px rgba(0,0,0,0.15)`,padding:16,minWidth:200,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500},children:`附件列表`}),(0,$.jsx)(`button`,{onClick:()=>{ce(!1),ue(null)},style:{width:24,height:24,borderRadius:`50%`,border:`none`,background:`#ff4d4f`,cursor:`pointer`,fontSize:14,color:`#fff`,fontWeight:`bold`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s`},onMouseEnter:e=>{e.currentTarget.style.background=`#ff7875`,e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.background=`#ff4d4f`,e.currentTarget.style.transform=`scale(1)`},children:`×`})]}),ze.find(e=>e.id===le)?.mediaReferences?.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>{q(e.url),J(e.url.includes(`.mp4`)||e.url.includes(`.mov`)||e.url.includes(`.avi`)||e.url.includes(`.video`)?`video`:`image`),oe(e.name),G(!0),ce(!1),ue(null)},style:{display:`flex`,alignItems:`center`,gap:8,padding:`8px 12px`,borderRadius:6,cursor:`pointer`,fontSize:13,color:`#333`,transition:`background 0.2s`},onMouseEnter:e=>e.currentTarget.style.background=`#f5f5f5`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,children:[e.type===`image`?(0,$.jsx)(d6,{style:{color:`#3b82f6`,fontSize:14}}):(0,$.jsx)(q8,{style:{color:`#f59e0b`,fontSize:14}}),e.name]},t))]})]}),(0,$.jsxs)(`div`,{style:{background:`rgba(255,255,255,0.1)`,backdropFilter:`blur(20px)`,borderRadius:24,padding:16,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.1), 0 2px 8px rgba(0,0,0,0.04)`,transition:`all 0.3s ease`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:[F.length>0&&(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,marginBottom:12,overflowX:`auto`},children:F.map((e,t)=>(0,$.jsxs)(`div`,{style:{position:`relative`,width:e.type===`video`?120:80,flexShrink:0},children:[e.type===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,alt:e.name,style:{width:`100%`,height:80,objectFit:`cover`,borderRadius:8}}):(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:80,objectFit:`cover`,borderRadius:8}}),(0,$.jsx)(`button`,{onClick:()=>tt(t),style:{position:`absolute`,top:0,right:0,width:20,height:20,border:`none`,background:`#ff4d4f`,borderRadius:50,cursor:`pointer`,color:`#fff`,fontSize:12,display:`flex`,alignItems:`center`,justifyContent:`center`},children:`×`})]},`media-${t}`))}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:`12px 16px`,backgroundColor:`rgba(248,250,252,0.6)`,borderRadius:16,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`,transition:`all 0.2s ease`},children:[(0,$.jsx)(C0,{accept:`image/*,video/*`,showUploadList:!1,beforeUpload:et,children:(0,$.jsx)(eT,{title:`图片${F.filter(e=>e.type===`image`).length}/4,视频${F.filter(e=>e.type===`video`).length}/1`,children:(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:14,border:`2px dashed rgba(99, 102, 241, 0.2)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.25s ease`,flexShrink:0,backgroundColor:`rgba(255,255,255,0.7)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.backgroundColor=`rgba(99, 102, 241, 0.06)`,e.currentTarget.style.transform=`scale(1.05)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.2)`,e.currentTarget.style.backgroundColor=`rgba(255,255,255,0.7)`,e.currentTarget.style.transform=`scale(1)`},children:j?(0,$.jsx)(Xm,{style:{fontSize:18,color:`#6366f1`}}):(0,$.jsx)(bR,{style:{fontSize:18,color:`#64748b`}})})})}),(0,$.jsx)(bte,{value:o,onChange:e=>s(e.target.value),onKeyPress:nt,placeholder:`上传最多4张参考图,输入提示词描述您想生成的画面...`,autoSize:{minRows:1,maxRows:4},style:{flex:1,height:`100%`,borderRadius:12,border:`none`,outline:`none`,boxShadow:`none`,fontSize:14,lineHeight:1.5,color:`#1e293b`},disabled:N}),(0,$.jsx)(bD,{type:`primary`,shape:`circle`,icon:(0,$.jsx)(W6,{}),onClick:Qe,disabled:!o.trim()&&F.length===0,loading:N,style:{flexShrink:0,width:48,height:48,borderRadius:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.4)`,transition:`all 0.2s ease`,border:`none`}})]}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginTop:12,paddingTop:12,borderTop:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsxs)(jU,{size:`middle`,children:[(0,$.jsxs)(uw,{value:c,onChange:e=>y(e),style:{width:100,height:34,outline:`none`,border:`none`,backgroundColor:`#f1f5f9`,borderRadius:10},size:`middle`,children:[(0,$.jsxs)(f9,{value:`image`,children:[(0,$.jsx)(d6,{style:{marginRight:6,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:`图片`})]}),(0,$.jsxs)(f9,{value:`video`,children:[(0,$.jsx)(q8,{style:{marginRight:6,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:`视频`})]})]}),(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>Oe(!0),className:`image-settings-trigger`,style:{minWidth:200,padding:`6px 14px`,height:34,borderRadius:10,border:`none`,backgroundColor:`#f1f5f9`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.boxShadow=`0 4px 12px rgba(99, 102, 241, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.15)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(99, 102, 241, 0.04)`},children:[(0,$.jsx)(q6,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(p9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:c===`image`?v.image?.find(e=>e.id===l)?.name:v.video?.find(e=>e.id===l)?.name||`选择引擎`})]}),De&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:360,backgroundColor:`rgba(255,255,255,0.95)`,backdropFilter:`blur(20px)`,borderRadius:14,boxShadow:`0 12px 48px rgba(99, 102, 241, 0.15)`,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475569`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:(c===`image`?v.image:v.video)?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{b(e.id),c===`video`&&(k({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(h)||D(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(g)||O(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(m)||E(e.supportedDurations?.[0]||5)),Oe(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:l===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:l===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:l===e.id?600:500,color:l===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),c===`image`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>me(!pe),className:`image-settings-trigger`,style:{minWidth:220,padding:`4px 12px`,height:34,borderRadius:8,border:`none`,backgroundColor:`#f1f5f9`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(M3,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsxs)(p9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[u===`auto`?`智能`:u,` · `,d==`2K`?`2K高清`:`4K超清`,` · `,f,`×`,p]})]}),pe&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:480,backgroundColor:`rgba(255,255,255,0.95)`,backdropFilter:`blur(20px)`,borderRadius:14,boxShadow:`0 12px 48px rgba(99, 102, 241, 0.15)`,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:_e.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{x(e.value),Ye(e.label)},style:{flex:`0 0 calc(11.11% - 4px)`,minWidth:44,height:52,borderRadius:6,border:u===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:u===e.value?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:e.value===`auto`?14:18,height:e.value===`auto`?14:18,border:`2px solid ${u===e.value?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e.value===`auto`&&(0,$.jsx)(`span`,{style:{fontSize:7,color:u===e.value?`#6366f1`:`#9ca3af`},children:`智`})}),(0,$.jsx)(`span`,{style:{fontSize:9,color:u===e.value?`#6366f1`:`#6b7280`,fontWeight:u===e.value?600:400},children:e.value})]},e.value))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:ye.map(e=>(0,$.jsx)(`button`,{onClick:()=>{C(e.value),Xe(e.value)},style:{flex:1,height:42,borderRadius:6,border:d===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:d===e.value?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsxs)(`span`,{style:{fontSize:12,fontWeight:600,color:d===e.value?`#fff`:`#4b5563`},children:[e.value,e.value===`4K`&&(0,$.jsx)(`span`,{style:{marginLeft:2},children:`✨`})]})},e.value))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`尺寸`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:120},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:11,marginRight:4},children:`W`}),(0,$.jsx)(oK,{value:f,onChange:e=>w(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:12,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`button`,{onClick:Ze,style:{width:24,height:24,borderRadius:4,border:`1px solid #e5e7eb`,backgroundColor:`#fff`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:`#6366f1`},children:(0,$.jsx)(uG,{style:{fontSize:10}})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:120},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:11,marginRight:4},children:`H`}),(0,$.jsx)(oK,{value:p,onChange:e=>T(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:12,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:11},children:`PX`})]})]})]})]}),c===`video`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>ge(!he),className:`image-settings-trigger`,style:{minWidth:220,padding:`4px 12px`,height:34,borderRadius:8,border:`none`,backgroundColor:`#f1f5f9`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(M3,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsxs)(p9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[h,` · `,m,`s · `,g]})]}),he&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:400,backgroundColor:`rgba(255,255,255,0.95)`,backdropFilter:`blur(20px)`,borderRadius:14,boxShadow:`0 12px 48px rgba(99, 102, 241, 0.15)`,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:_.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>D(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:h===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:h===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${h===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:h===e?`#6366f1`:`#6b7280`,fontWeight:h===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(m-Math.min(..._.durations))/(Math.max(..._.durations)-Math.min(..._.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(..._.durations),max:Math.max(..._.durations),value:m,onChange:e=>E(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:m}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:_.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>O(e),style:{flex:1,height:42,borderRadius:6,border:g===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:g===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:g===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`6px 14px`,backgroundColor:`rgba(99, 102, 241, 0.06)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsx)(p9,{style:{fontSize:13,color:`#6366f1`,fontWeight:500},children:`预估积分`}),(0,$.jsx)(p9,{style:{fontSize:14,color:`#6366f1`,fontWeight:600},children:Fe()})]})]})})]})]})]}),(0,$.jsx)(`style`,{children:` + `})]})},t9={HomeOutlined:(0,$.jsx)(y3,{}),DashboardOutlined:(0,$.jsx)(P4,{}),CodeOutlined:(0,$.jsx)(y4,{}),PlayCircleOutlined:(0,$.jsx)(S6,{}),WalletOutlined:(0,$.jsx)(Q8,{}),SettingOutlined:(0,$.jsx)(Y6,{}),BellOutlined:(0,$.jsx)(P2,{}),UserOutlined:(0,$.jsx)(K8,{}),AppstoreOutlined:(0,$.jsx)(u2,{}),FileTextOutlined:(0,$.jsx)(MU,{}),StarOutlined:(0,$.jsx)(y8,{}),HeartOutlined:(0,$.jsx)(u3,{}),CameraOutlined:(0,$.jsx)(Y2,{}),RobotOutlined:(0,$.jsx)(S6,{}),CalculatorOutlined:(0,$.jsx)(K2,{}),DollarOutlined:(0,$.jsx)(B4,{}),GiftOutlined:(0,$.jsx)(i3,{}),ThunderboltOutlined:(0,$.jsx)(j8,{}),FireOutlined:(0,$.jsx)(Q4,{}),CloudOutlined:(0,$.jsx)(u4,{}),SmileOutlined:(0,$.jsx)(u8,{}),TrophyOutlined:(0,$.jsx)(L8,{}),RocketOutlined:(0,$.jsx)(L6,{}),BulbOutlined:(0,$.jsx)(U2,{}),PictureOutlined:(0,$.jsx)(p6,{}),VideoCameraOutlined:(0,$.jsx)(Y8,{}),AudioOutlined:(0,$.jsx)(S2,{}),MailOutlined:(0,$.jsx)(U3,{}),PhoneOutlined:(0,$.jsx)(u6,{}),GlobalOutlined:(0,$.jsx)(s3,{}),ShoppingCartOutlined:(0,$.jsx)(Q6,{}),TeamOutlined:(0,$.jsx)(O8,{}),BarChartOutlined:(0,$.jsx)(j2,{}),PieChartOutlined:(0,$.jsx)(g6,{}),LineChartOutlined:(0,$.jsx)(P3,{}),SecurityScanOutlined:(0,$.jsx)(U6,{}),ApiOutlined:(0,$.jsx)(s2,{}),DatabaseOutlined:(0,$.jsx)(L4,{}),CloudServerOutlined:(0,$.jsx)(p4,{})},lte=240,n9=[{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(CJ,{})},{gradient:`linear-gradient(135deg, #4a5568, #2d3748)`,shadow:`rgba(74,85,104,0.25)`,icon:(0,$.jsx)(Y4,{})},{gradient:`linear-gradient(135deg, #718096, #4a5568)`,shadow:`rgba(113,128,150,0.25)`,icon:(0,$.jsx)(O4,{})},{gradient:`linear-gradient(135deg, #5a67d8, #434190)`,shadow:`rgba(90,103,216,0.25)`,icon:(0,$.jsx)(T2,{})}],ute=()=>{let e=Je(),t=Ge(),{user:n,logout:r}=$7(),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c]=xW.useForm(),[l,u]=(0,S.useState)(null),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)({}),[_,v]=(0,S.useState)(0),[y,b]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteName||``;return t&&(document.title=t),t}),[x,C]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteLogo||``;if(t){let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=t,e.type=`image/png`}return t}),[w,T]=(0,S.useState)(!localStorage.getItem(`siteInfo`)),[E,D]=(0,S.useState)(!1),[O,k]=(0,S.useState)(null),[A,j]=(0,S.useState)(`alipay`),[M,N]=(0,S.useState)(!1),[P,F]=(0,S.useState)(180),I=(0,S.useRef)(null),L=(0,S.useRef)(null),R=(0,S.useRef)(null),[z,B]=(0,S.useState)({alipay:!1,wechat:!1}),[V,H]=(0,S.useState)(!1),[U]=xW.useForm(),[ee,te]=(0,S.useState)(!0),[ne,W]=(0,S.useState)(!1),re=`pending_payment_order`;(0,S.useEffect)(()=>{q5().then(e=>{let t=e.siteName||`民众智创`,n=e.siteLogo||``;if(t!==y&&(b(t),document.title=t),n&&n!==x){C(n);let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=n,e.type=`image/png`}localStorage.setItem(`siteInfo`,JSON.stringify({siteName:t,siteLogo:n}))}).catch(()=>{})},[]);let G=()=>{Q5().then(e=>{v(e)}).catch(()=>{})};(0,S.useEffect)(()=>{(async()=>{let e=localStorage.getItem(re);if(e)try{let t=JSON.parse(e),n=await o7(t.orderNo);if(n.status===`pending`){k({price:t.price,credits:t.credits,qrCode:t.qrCode,method:t.method}),R.current=t.orderNo;let e=Date.now(),n=new Date(t.createdAt).getTime(),r=t.timeoutSeconds||180,i=Math.floor((e-n)/1e3),a=Math.max(0,r-i);a>0?(D(!0),ue(t.orderNo,a)):localStorage.removeItem(re)}else n.status===`paid`?(Z.success(`支付成功!积分已到账`),$7.getState().refreshUser(),localStorage.removeItem(re)):localStorage.removeItem(re)}catch{localStorage.removeItem(re)}})()},[]),(0,S.useEffect)(()=>{t7().then(e=>{f(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),n7().then(e=>{m(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),r7().then(e=>{B(e),e.alipay?j(`alipay`):e.wechat&&j(`wechat`)}).catch(()=>{}),G()},[n]);let K=t.pathname.startsWith(`/records`)?`/records`:t.pathname,q=lte,ie=[{key:`profile`,icon:(0,$.jsx)(K8,{}),label:`账号: ${n?.username}`,disabled:!0},{key:`credits`,icon:(0,$.jsx)(Q8,{style:{color:`#c9a96e`}}),label:`积分: ${n?.credits??0}`,disabled:!0},{type:`divider`},{key:`myCredits`,icon:(0,$.jsx)(Q8,{}),label:`积分明细`},{key:`orderRecords`,icon:(0,$.jsx)(MU,{}),label:`订单记录`},{key:`messages`,icon:(0,$.jsx)(P2,{}),label:`消息中心${_>0?`(${_})`:``}`},{type:`divider`},{key:`changePwd`,icon:(0,$.jsx)(L3,{}),label:`修改密码`},{type:`divider`},{key:`logout`,icon:(0,$.jsx)(B3,{}),label:`退出登录`,danger:!0}],J=({key:t})=>{t===`logout`?(r(),e(`/login`)):t===`changePwd`?a(!0):t===`messages`?e(`/messages`):t===`recharge`?s(!0):t===`myCredits`?e(`/user-center?tab=credits`):t===`orderRecords`&&e(`/user-center?tab=orders`)},ae=async()=>{try{await c.validateFields(),Z.success(`密码修改成功(演示)`),a(!1),c.resetFields()}catch{}},oe=()=>{r(),e(`/login`)},se=()=>{s(!0)},ce=async()=>{if(!n){Z.warning(`请先登录`);return}try{let e=await U.validateFields();W(!0),await Z7({phone:e.phone,company_name:e.companyName,industry:e.industry,name:e.name,message:e.message}),Z.success(`提交成功,我们会尽快与您联系`),H(!1),U.resetFields()}catch(e){Z.error(e?.message||`提交失败`)}finally{W(!1)}},le=(0,S.useCallback)(()=>{I.current&&=(clearInterval(I.current),null),L.current&&=(clearInterval(L.current),null)},[]),ue=(0,S.useCallback)((e,t=180)=>{le(),F(t),I.current=setInterval(async()=>{try{let t=await o7(e);t.status===`paid`?(le(),R.current=null,localStorage.removeItem(re),Z.success(`支付成功!积分已到账`),$7.getState().refreshUser(),D(!1),k(null),u(null)):t.status===`cancelled`&&(le(),R.current=null,localStorage.removeItem(re))}catch{}},2e3),L.current=setInterval(()=>{F(e=>e<=1?(le(),R.current&&=(s7(R.current).catch(()=>{}),null),localStorage.removeItem(re),Z.warning(`订单已超时,请重新充值`),D(!1),k(null),u(null),0):e-1)},1e3)},[le]);return(0,$.jsxs)(dK,{style:{minHeight:`100vh`},children:[(0,$.jsxs)(`div`,{className:`desktop-sidebar`,style:{width:q,position:`fixed`,left:16,top:16,bottom:16,zIndex:100,background:`linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,display:`flex`,flexDirection:`column`,transition:`width 0.25s ease, left 0.25s ease`,overflow:`hidden`,border:`1px solid rgba(0, 0, 0, 0.06)`},children:[(0,$.jsx)(`div`,{style:{height:80,display:`flex`,alignItems:`center`,justifyContent:`flex-start`,padding:`0 20px`,flexShrink:0,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14},children:[(0,$.jsx)(`div`,{style:{width:42,height:42,borderRadius:14,flexShrink:0,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,overflow:`hidden`},children:x?(0,$.jsx)(`img`,{src:x,alt:`logo`,style:{width:28,height:28,objectFit:`contain`}}):(0,$.jsx)(j8,{style:{fontSize:20,color:`#ffffff`}})}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:17,fontWeight:700,letterSpacing:-.02,whiteSpace:`nowrap`,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:y})]})}),(0,$.jsx)(`div`,{style:{flex:1,padding:`8px 8px`,overflow:`auto`},children:(()=>{let t={};d.forEach(e=>{let n=e.parent_id??e.parentId;n&&(t[n]||(t[n]=[]),t[n].push(e))});let n=d.filter(e=>!(e.parent_id??e.parentId));n.sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0));let r=[],i=(t,n=0)=>{let r=t.path===K,i=t9[t.icon]||(0,$.jsx)(y3,{});return(0,$.jsxs)(`div`,{onClick:()=>t.path&&e(t.path),style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:10,padding:n>0?`6px 12px 6px 32px`:`6px 14px`,borderRadius:12,margin:`1px 4px`,cursor:`pointer`,fontSize:n>0?13:14,fontWeight:r?600:400,color:r?`#4f46e5`:`#475569`,background:r?`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%)`:`transparent`,transition:`all 0.2s ease`},children:[(0,$.jsx)(`span`,{style:{fontSize:n>0?14:16,flexShrink:0,color:r?`#6366f1`:`#64748b`},children:i}),(0,$.jsx)(`span`,{style:{whiteSpace:`nowrap`},children:t.label})]},t.id)};return n.forEach(e=>{if((e.menu_type??e.menuType)===`group`){let n=(t[e.id]||[]).sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0));r.push((0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12,fontWeight:600,padding:`10px 14px 4px`,letterSpacing:.5,textTransform:`uppercase`},children:e.label}),n.map(e=>i(e,1))]},e.id))}else r.push(i(e))}),r})()}),(0,$.jsxs)(`div`,{onClick:()=>s(!0),style:{margin:`8px 12px`,padding:`12px 20px`,borderRadius:14,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8,color:`#ffffff`,fontSize:14,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%)`,e.currentTarget.style.transform=`translateY(-1px)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.5)`},onMouseLeave:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(99, 102, 241, 0.4)`},children:[(0,$.jsx)(gR,{style:{fontSize:16}}),(0,$.jsx)(`span`,{children:`充值积分`})]}),(0,$.jsx)(`div`,{style:{padding:`16px 16px`,flexShrink:0},children:(0,$.jsx)(kU,{menu:{items:ie,onClick:J},placement:`topRight`,arrow:!0,children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:12,padding:`10px 14px`,borderRadius:14,cursor:`pointer`,transition:`all 0.25s ease`,background:`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,boxShadow:`0 2px 12px rgba(0, 0, 0, 0.04)`},onMouseEnter:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #ffffff 0%, #f8fafc 100%)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0, 0, 0, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.background=`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,e.currentTarget.style.boxShadow=`0 2px 12px rgba(0, 0, 0, 0.04)`},children:[(0,$.jsx)(uT,{size:36,icon:(0,$.jsx)(K8,{}),style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,flexShrink:0,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`}}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsx)(`div`,{style:{color:`#1e293b`,fontSize:14,fontWeight:600,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,letterSpacing:-.01},children:n?.username}),(0,$.jsxs)(`div`,{style:{color:`#6366f1`,fontSize:12,fontWeight:500,letterSpacing:0,background:`rgba(99, 102, 241, 0.08)`,padding:`2px 8px`,borderRadius:6,display:`inline-block`},children:[`积分: `,n?.credits||0]})]})]})})})]}),(0,$.jsx)(`div`,{className:`desktop-content`,style:{marginLeft:q+28,marginRight:12,marginTop:16,marginBottom:16,flex:1,minHeight:`calc(100vh - 32px)`,background:`transparent`,padding:0,transition:`margin-left 0.25s ease`},children:(0,$.jsx)(`div`,{style:{boxSizing:`border-box`,height:`100%`,background:`#ffffffff`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,minHeight:`100%`,padding:`24px 32px 32px`,border:`1px solid rgba(0, 0, 0, 0.06)`},children:(0,$.jsx)(Ct,{})})}),(0,$.jsxs)(`div`,{className:`mobile-bottom-nav`,children:[d.filter(e=>(e.menu_type??e.menuType)!==`group`).map(t=>t.path?(0,$.jsxs)(`div`,{className:`nav-item ${t.path===K?`active`:``}`,onClick:()=>e(t.path),children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:t9[t.icon]||(0,$.jsx)(y3,{})}),(0,$.jsx)(`span`,{children:t.label})]},t.id):null),(0,$.jsxs)(`div`,{className:`nav-item`,onClick:se,children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:(0,$.jsx)(T6,{})}),(0,$.jsx)(`span`,{children:`充值`})]}),(0,$.jsxs)(`div`,{className:`nav-item`,onClick:oe,children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:(0,$.jsx)(B3,{})}),(0,$.jsx)(`span`,{children:`退出`})]})]}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(L3,{}),`修改密码`]}),open:i,onOk:ae,onCancel:()=>{a(!1),c.resetFields()},okText:`确认修改`,cancelText:`取消`,width:440,children:(0,$.jsxs)(xW,{form:c,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(xW.Item,{name:`oldPwd`,label:`原密码`,rules:[{required:!0,message:`请输入原密码`}],children:(0,$.jsx)(nK.Password,{placeholder:`请输入原密码`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(xW.Item,{name:`newPwd`,label:`新密码`,rules:[{required:!0,message:`请输入新密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(nK.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(xW.Item,{name:`confirmPwd`,label:`确认新密码`,rules:[{required:!0,message:`请再次输入新密码`},({getFieldValue:e})=>({validator(t,n){return!n||e(`newPwd`)===n?Promise.resolve():Promise.reject(Error(`两次密码不一致`))}})],children:(0,$.jsx)(nK.Password,{placeholder:`请再次输入新密码`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})})]})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(i3,{}),`积分充值`]}),open:o,onCancel:()=>{s(!1),u(null)},footer:null,width:680,children:(0,$.jsxs)(`div`,{style:{marginTop:16},children:[(0,$.jsxs)(DU,{style:{marginBottom:16},children:[(0,$.jsx)(Q8,{style:{color:`#6366f1`}}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,letterSpacing:0},children:`当前积分余额`}),(0,$.jsx)(Q.Text,{strong:!0,style:{color:`#6366f1`,fontSize:20,fontWeight:600},children:n?.credits??0})]}),(0,$.jsxs)(`div`,{style:{padding:`12px 16px`,background:`rgba(99, 102, 241, 0.06)`,borderRadius:10,marginBottom:16,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(T3,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13},children:`当前后台仅支持支付宝/微信扫码充值,如需转账支付请联系我们`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12,flexWrap:`wrap`},children:p.map((e,t)=>{let n=n9[t%n9.length],r=(e.credits||0)+(e.bonus_credits||e.bonusCredits||0);return(0,$.jsxs)(`div`,{onClick:()=>u(e.id),style:{flex:`1 1 45%`,minWidth:200,borderRadius:16,padding:`20px 16px`,background:l===e.id?`rgba(99,102,241,0.04)`:`#fafbff`,border:l===e.id?`2px solid #6366f1`:`1px solid #f0f0f5`,cursor:`pointer`,position:`relative`,transition:`all 0.2s`},children:[e.description&&(0,$.jsx)(T$,{color:`purple`,style:{position:`absolute`,top:-10,left:`50%`,transform:`translateX(-50%)`,borderRadius:8,fontSize:11},children:e.description}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:44,height:44,borderRadius:12,flexShrink:0,background:n.gradient,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:18,color:`#fff`,boxShadow:`0 6px 16px ${n.shadow}`},children:n.icon}),(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:6},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15},children:e.name}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[r.toLocaleString(),` 积分`]})]}),(0,$.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,marginTop:4,background:n.gradient,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:[`¥`,e.price]})]})]})]},e.id)})}),!z.alipay&&!z.wechat?(0,$.jsx)(`div`,{style:{marginTop:20,marginBottom:8,padding:16,background:`#fef2f2`,borderRadius:12,border:`1px solid #fecaca`},children:(0,$.jsx)(Q.Text,{style:{color:`#dc2626`,fontSize:13},children:`⚠️ 暂无可用的支付方式,请联系管理员开启支付功能`})}):(0,$.jsxs)(`div`,{style:{marginTop:20,marginBottom:8},children:[(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13,marginBottom:8,display:`block`},children:`选择支付方式`}),(0,$.jsxs)(LL.Group,{value:A,onChange:e=>j(e.target.value),style:{display:`flex`,gap:12},children:[z.alipay&&(0,$.jsxs)(LL.Button,{value:`alipay`,style:{flex:1,textAlign:`center`,borderRadius:10,height:44,lineHeight:`42px`,borderColor:A===`alipay`?`#1677ff`:void 0,color:A===`alipay`?`#1677ff`:void 0},children:[(0,$.jsx)(i2,{style:{fontSize:16,marginRight:6}}),`支付宝`]}),z.wechat&&(0,$.jsxs)(LL.Button,{value:`wechat`,style:{flex:1,textAlign:`center`,borderRadius:10,height:44,lineHeight:`42px`,borderColor:A===`wechat`?`#07c160`:void 0,color:A===`wechat`?`#07c160`:void 0},children:[(0,$.jsx)(i5,{style:{fontSize:16,marginRight:6}}),`微信支付`]})]})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:[(0,$.jsx)(vD,{size:`large`,onClick:()=>{s(!1),u(null)},style:{borderRadius:10,marginRight:12},children:`取消`}),(0,$.jsx)(vD,{type:`primary`,size:`large`,disabled:!l||!z.alipay&&!z.wechat,loading:M,onClick:async()=>{let e=p.find(e=>e.id===l);if(!e)return;let t=(e.credits||0)+(e.bonus_credits||e.bonusCredits||0);try{N(!0);let n=await i7(e.id,A),r=n.qrUrl||n.codeUrl||n.qr_code||n.code_url;(n.paymentMethod===`alipay`||n.paymentMethod===`wechat`)&&r?(k({price:e.price,credits:t,qrCode:r,method:n.paymentMethod}),s(!1),D(!0),R.current=n.orderNo,localStorage.setItem(re,JSON.stringify({orderNo:n.orderNo,price:e.price,credits:t,qrCode:r,method:n.paymentMethod,createdAt:n.createdAt||new Date().toISOString(),timeoutSeconds:180})),ue(n.orderNo)):(Z.success(`充值成功!积分已到账`),$7.getState().refreshUser(),s(!1),u(null))}catch(e){Z.error(e?.message||`创建订单失败,请重试`)}finally{N(!1)}},style:{borderRadius:10,fontWeight:600,background:l?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#d1d5db`,border:`none`,boxShadow:l?`0 8px 24px rgba(99,102,241,0.3)`:`none`},children:`确认充值`})]})]})}),(0,$.jsx)(Pq,{open:E,onCancel:async()=>{if(le(),R.current){try{await s7(R.current)}catch{}R.current=null}localStorage.removeItem(re),D(!1),k(null)},footer:null,width:400,closable:!1,styles:{body:{padding:0,borderRadius:16,overflow:`hidden`}},children:(0,$.jsxs)(`div`,{style:{padding:`24px`},children:[(0,$.jsxs)(`div`,{style:{textAlign:`center`,marginBottom:24},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,background:O?.method===`alipay`?`linear-gradient(135deg, #1677ff, #0958d9)`:`linear-gradient(135deg, #07c160, #06ae56)`,borderRadius:16,display:`flex`,alignItems:`center`,justifyContent:`center`,margin:`0 auto 12px`},children:O?.method===`alipay`?(0,$.jsx)(i2,{style:{fontSize:24,color:`#fff`}}):(0,$.jsx)(i5,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:O?.method===`alipay`?`支付宝支付`:`微信支付`}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:O?.method===`alipay`?`请使用支付宝扫描二维码完成支付`:`请使用微信扫描二维码完成支付`})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:16,padding:20,display:`flex`,flexDirection:`column`,alignItems:`center`,boxShadow:`0 4px 20px rgba(0,0,0,0.08)`},children:[(0,$.jsx)(`div`,{style:{width:180,height:180,borderRadius:12,overflow:`hidden`,background:`#fff`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:O&&(0,$.jsx)(t2,{value:O.qrCode,size:160,level:`M`,includeMargin:!1})}),(0,$.jsxs)(`div`,{style:{marginTop:16,textAlign:`center`},children:[(0,$.jsxs)(`div`,{style:{fontSize:28,fontWeight:700,color:`#1a1a2e`},children:[`¥`,O?.price||0]}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`,marginTop:4},children:[`购买 `,O?.credits||0,` 积分`]}),(0,$.jsx)(`div`,{style:{marginTop:12,padding:`8px 16px`,background:P<=30?`#fef2f2`:`#f0f9ff`,borderRadius:8,border:P<=30?`1px solid #fecaca`:`1px solid #bae6fd`,display:`inline-block`},children:(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:P<=30?`#dc2626`:`#0284c7`},children:[`订单将在 `,(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:800},children:P}),` 秒后关闭`]})})]})]}),(0,$.jsx)(`div`,{style:{marginTop:20,padding:16,background:`#fef3c7`,borderRadius:12},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:8},children:[(0,$.jsx)(`div`,{style:{fontSize:16,marginTop:-2},children:`💡`}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#92400e`},children:[(0,$.jsx)(`div`,{style:{fontWeight:500,marginBottom:4},children:`支付提示`}),(0,$.jsxs)(`ul`,{style:{margin:0,paddingLeft:16},children:[(0,$.jsx)(`li`,{style:{marginBottom:2},children:`请在支付后等待页面自动跳转`}),(0,$.jsx)(`li`,{children:`如支付成功但未到账,请联系客服`})]})]})]})}),(0,$.jsx)(`div`,{style:{marginTop:20},children:(0,$.jsx)(vD,{size:`large`,block:!0,onClick:async()=>{if(le(),R.current){try{await s7(R.current)}catch{}R.current=null}localStorage.removeItem(re),D(!1),k(null),u(null)},style:{borderRadius:10},children:`取消支付`})})]})}),(0,$.jsx)(cte,{}),(0,$.jsx)(`div`,{style:{position:`fixed`,right:24,bottom:ee?100:24,zIndex:1e3,transition:`bottom 0.3s ease`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`flex-end`,gap:12},children:[ee&&(0,$.jsxs)(`div`,{style:{padding:`16px 20px`,background:`#ffffff`,borderRadius:16,boxShadow:`0 8px 32px rgba(0,0,0,0.12)`,minWidth:280,animation:`slideUp 0.3s ease`},children:[(0,$.jsxs)(`div`,{style:{color:`#1e293b`,fontSize:16,fontWeight:600,marginBottom:12,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(Y3,{style:{color:`#6366f1`}}),`联系我们`]}),(0,$.jsxs)(`div`,{style:{padding:`12px 16px`,background:`rgba(99, 102, 241, 0.06)`,borderRadius:12,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{color:`#64748b`,fontSize:13,marginBottom:4},children:`商务咨询`}),(0,$.jsx)(`div`,{style:{color:`#1e293b`,fontSize:14,fontWeight:600},children:`400-888-8888`})]}),(0,$.jsx)(vD,{type:`primary`,block:!0,onClick:()=>H(!0),style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`在线咨询`})]}),(0,$.jsx)(`button`,{onClick:()=>te(!ee),style:{width:56,height:56,borderRadius:`50%`,border:`none`,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,color:`#ffffff`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.05)`,e.currentTarget.style.boxShadow=`0 6px 24px rgba(99, 102, 241, 0.5)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.4)`},children:ee?(0,$.jsx)(tw,{style:{fontSize:20}}):(0,$.jsx)(Y3,{style:{fontSize:20}})})]})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(Y3,{}),`联系我们`]}),open:V,onCancel:()=>{H(!1),U.resetFields()},footer:null,width:480,children:(0,$.jsxs)(`div`,{style:{marginTop:8},children:[(0,$.jsxs)(xW,{form:U,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`name`,label:`姓名`,rules:[{required:!0,message:`请输入姓名`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的姓名`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`phone`,label:`手机号`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1[3-9]\d{9}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的手机号`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`companyName`,label:`公司名称`,rules:[{required:!0,message:`请输入公司名称`}],children:(0,$.jsx)(nK,{placeholder:`请输入公司名称`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`industry`,label:`您的行业`,rules:[{required:!0,message:`请输入您的行业`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的行业`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`message`,label:`留言(选填)`,children:(0,$.jsx)(nK.TextArea,{placeholder:`请输入您的需求或问题`,rows:3,style:{borderRadius:10}})})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,display:`flex`,gap:12},children:[(0,$.jsx)(vD,{size:`large`,onClick:()=>{H(!1),U.resetFields()},style:{borderRadius:10,flex:1},children:`取消`}),(0,$.jsx)(vD,{type:`primary`,size:`large`,onClick:ce,loading:ne,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,flex:1},children:`提交`})]})]})})]})},dte=`http://localhost:8000/api`,fte=()=>{let{checkAuth:e}=$7(),[t,n]=(0,S.useState)(!1),[r,i]=(0,S.useState)(`password`),[a,o]=(0,S.useState)(`password`),[s,c]=(0,S.useState)(0),[l,u]=(0,S.useState)(0),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(!1),[_,v]=(0,S.useState)(!1),[y,b]=(0,S.useState)(0),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),E=(()=>{try{let e=localStorage.getItem(`siteInfo`);if(e){let t=JSON.parse(e);return{siteName:t.siteName||`VideoGen.AI`,siteLogo:t.siteLogo||``}}}catch{}return{siteName:`VideoGen.AI`,siteLogo:``}})(),[D,O]=(0,S.useState)(E.siteName),[k,A]=(0,S.useState)(E.siteLogo),[j,M]=(0,S.useState)(``),[N,P]=(0,S.useState)(``),F=Je(),{login:I}=$7(),[L]=xW.useForm(),[R]=xW.useForm(),[z]=xW.useForm();(0,S.useEffect)(()=>{q5().then(e=>{O(e.siteName),A(e.siteLogo),M(e.userAgreementUrl),P(e.privacyPolicyUrl)}).catch(()=>{})},[]);let B=()=>d?!0:(Z.warning(`请先阅读并同意用户协议和隐私政策`),!1),V=async()=>{if(B())try{let t=await L.validateFields();await I(t.phone,t.password,void 0,t.rememberMe),Z.success(`登录成功,欢迎回来`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}},H=async()=>{if(B())try{let t=R.getFieldsValue();if(!t.phone||!t.code){Z.error(`请填写手机号和验证码`);return}n(!0),await j5(t.phone,t.code),Z.success(`登录成功,欢迎回来`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}finally{n(!1)}},U=async()=>{if(B())try{let t=await z.validateFields();n(!0),await M5(t.phone,t.regCode,t.password),Z.success(`注册成功`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`注册失败`;Z.error(t)}finally{n(!1)}},ee=(e,t)=>{e(60);let n=setInterval(()=>{e(e=>e<=1?(clearInterval(n),m(!1),t?C(!0):T(!0),0):e-1)},1e3)};(0,S.useEffect)(()=>{s===0&&r===`phone`&&v(!1)},[s,r]);let te=async(e,t)=>{try{if(!e||!/^1\d{10}$/.test(e)){Z.error(`请输入正确的手机号`);return}if(t){m(!0),g(!1);return}if(!_){m(!0),v(!1);return}let n=``;n=r===`register`?`register`:`login`,await X5(e,n),ee(t?u:c),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(g(!1),u(0)):(v(!1),c(0)),b(e=>e+1)}},ne=async(e=!1)=>{let t=r===`register`?z.getFieldValue(`phone`):R.getFieldValue(`phone`);try{let e=``;e=r===`register`?`register`:`login`,await X5(t,e),r===`register`?(g(!0),ee(u,!0)):(v(!0),ee(c,!1)),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(g(!1),u(0),C(!0)):(v(!1),c(0),T(!0)),b(e=>e+1)}},W=e=>{o(e),i(e),c(0),u(0),v(!1),g(!1),m(!1),C(!1),T(!1),b(e=>e+1),e===`password`?L.resetFields():R.resetFields()},re=[{icon:(0,$.jsx)(U2,{}),title:`AI 智能优化`,desc:`输入原始提示词,AI 自动为您生成专业级视频、图片描述`},{icon:(0,$.jsx)(S6,{}),title:`一键生成视频、图片`,desc:`支持多种规格生成视频、图片`},{icon:(0,$.jsx)(g3,{}),title:`项目维度管理`,desc:`按项目行业分类视频、图片,支持多种行业`}],G={background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,height:48,borderRadius:10,fontSize:14},K=e=>{e&&window.open(`${dte.replace(/\/api$/,``)}${e}`,`_blank`)};return(0,$.jsxs)(`div`,{style:{minHeight:`100vh`,display:`flex`,backgroundImage:`url(/backimage.png)`,backgroundSize:`cover`,backgroundPosition:`center`,backgroundRepeat:`no-repeat`,backgroundAttachment:`fixed`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(135deg, rgba(240,244,255,0.9) 0%, rgba(232,236,248,0.85) 40%, rgba(240,240,255,0.9) 70%, rgba(248,249,255,0.95) 100%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,width:500,height:500,borderRadius:`50%`,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,top:-150,right:-100,filter:`blur(40px)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,width:400,height:400,borderRadius:`50%`,background:`radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%)`,bottom:-100,left:-80,filter:`blur(50px)`}}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`center`,padding:`0 80px`,zIndex:1},children:(0,$.jsxs)(DU,{direction:`vertical`,size:36,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:20},children:[k?(0,$.jsx)(`img`,{src:k,alt:`logo`,style:{width:52,height:52,borderRadius:14,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:(0,$.jsx)(j8,{style:{fontSize:26,color:`#fff`}})}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:28,fontWeight:800,letterSpacing:-.5},children:D})]}),(0,$.jsx)(`div`,{className:`shiny-text-container`,children:(0,$.jsx)(`span`,{className:`shiny-text`,children:`AI赋能创意,素材触手可及`})}),(0,$.jsxs)(Q.Paragraph,{style:{color:`#64748b`,fontSize:17,maxWidth:480,lineHeight:1.8},children:[`专业的 AI 素材生成平台,通过智能提示词优化,`,(0,$.jsx)(`br`,{}),`让您的创意快速转化为精美视频、图片`]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:20},children:re.map((e,t)=>(0,$.jsxs)(`div`,{className:`electric-border-card`,style:{position:`relative`,display:`flex`,gap:16,alignItems:`flex-start`,padding:`18px 22px`,borderRadius:14,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(12px)`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{className:`electric-border`}),(0,$.jsx)(`div`,{className:`electric-border-inner`}),(0,$.jsx)(`div`,{style:{position:`relative`,zIndex:1},children:(0,$.jsx)(`div`,{style:{width:44,height:44,borderRadius:12,flexShrink:0,background:`linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15))`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#6366f1`,fontSize:20},children:e.icon})}),(0,$.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,$.jsx)(Q.Text,{style:{color:`#1e293b`,fontSize:15,fontWeight:600,display:`block`,marginBottom:4},children:e.title}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13,lineHeight:1.6},children:e.desc})]})]},t))})]})}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1,padding:`40px 24px`},children:(0,$.jsxs)(Oz,{style:{width:440,maxWidth:`100%`,borderRadius:20,boxShadow:`0 20px 60px rgba(0,0,0,0.08)`,border:`1px solid #e2e8f0`,background:`#fff`},styles:{body:{padding:`36px 28px`}},children:[(0,$.jsx)(Q.Title,{level:3,style:{textAlign:`center`,marginBottom:6,color:`#1e293b`,fontWeight:700},children:r===`register`?`创建账号`:`欢迎回来`}),(0,$.jsx)(Q.Text,{style:{display:`block`,textAlign:`center`,marginBottom:28,color:`#94a3b8`,fontSize:14},children:r===`register`?`注册新账号,开始创作视频`:`登录您的账号,开始创作视频`}),r!==`register`&&(0,$.jsx)(`div`,{style:{display:`flex`,gap:0,marginBottom:24,background:`#f1f5f9`,borderRadius:10,padding:4,border:`1px solid #e2e8f0`},children:[`password`,`phone`].map(e=>(0,$.jsx)(`div`,{onClick:()=>W(e),style:{flex:1,textAlign:`center`,padding:`10px 0`,borderRadius:8,cursor:`pointer`,fontSize:14,fontWeight:a===e?600:400,color:a===e?`#6366f1`:`#64748b`,background:a===e?`#fff`:`transparent`,border:a===e?`1px solid rgba(99,102,241,0.2)`:`1px solid transparent`,boxShadow:a===e?`0 2px 8px rgba(99,102,241,0.1)`:`none`,transition:`all 0.3s ease`},children:e===`password`?`密码登录`:`验证码登录`},e))}),r===`password`&&(0,$.jsxs)(xW,{form:L,size:`large`,layout:`vertical`,onFinish:V,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,style:G})}),(0,$.jsx)(xW.Item,{name:`password`,rules:[{required:!0,message:`请输入密码`}],children:(0,$.jsx)(nK.Password,{prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入密码`,style:G})}),(0,$.jsx)(xW.Item,{name:`rememberMe`,valuePropName:`checked`,style:{marginBottom:12},children:(0,$.jsx)(aV,{children:`记住我的登录状态`})}),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,htmlType:`submit`,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登 录`})})]}),r===`phone`&&(0,$.jsxs)(xW,{form:R,size:`large`,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:G})}),(0,$.jsx)(xW.Item,{name:`code`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(DU.Compact,{style:{width:`100%`},children:[(0,$.jsx)(nK,{prefix:(0,$.jsx)(B6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!_,style:{...G,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(vD,{disabled:s>0,onClick:()=>{w?(v(!1),m(!0),b(e=>e+1)):te(R.getFieldValue(`phone`))},style:{height:48,borderRadius:`0 10px 10px 0`,background:s>0||_?`#f1f5f9`:`rgba(99,102,241,0.1)`,border:`1.5px solid #e2e8f0`,borderLeft:`none`,color:s>0?`#94a3b8`:`#6366f1`,fontWeight:600,minWidth:100},children:s>0?`${s}s`:w?`重新发送`:`获取验证码`})]})}),p&&(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(r9,{onSuccess:ne,isVerified:_})},y),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,onClick:H,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登 录`})})]}),r===`register`&&(0,$.jsxs)(xW,{form:z,size:`large`,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:G})}),(0,$.jsx)(xW.Item,{name:`regCode`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(DU.Compact,{style:{width:`100%`},children:[(0,$.jsx)(nK,{prefix:(0,$.jsx)(B6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!h,style:{...G,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(vD,{disabled:l>0,onClick:()=>{x?(g(!1),m(!0),b(e=>e+1)):te(z.getFieldValue(`phone`),!0)},style:{height:48,borderRadius:`0 10px 10px 0`,background:l>0||h?`#f1f5f9`:`rgba(99,102,241,0.1)`,border:`1.5px solid #e2e8f0`,borderLeft:`none`,color:l>0?`#94a3b8`:`#6366f1`,fontWeight:600,minWidth:100},children:l>0?`${l}s`:x?`重新发送`:`获取验证码`})]})}),p&&(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(r9,{onSuccess:ne,isVerified:h})},y),(0,$.jsx)(xW.Item,{name:`password`,rules:[{required:!0,message:`请设置密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(nK.Password,{prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请设置密码(至少6位)`,style:G})}),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,onClick:U,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`注 册`})})]}),(0,$.jsx)(`div`,{style:{marginBottom:16},children:(0,$.jsx)(aV,{checked:d,onChange:e=>f(e.target.checked),children:(0,$.jsxs)(`span`,{style:{fontSize:13,color:`#64748b`},children:[`我已阅读并同意`,(0,$.jsx)(`span`,{onClick:e=>{e.stopPropagation(),K(j)},style:{color:`#6366f1`,cursor:`pointer`},children:`《用户协议》`}),`和`,(0,$.jsx)(`span`,{onClick:e=>{e.stopPropagation(),K(N)},style:{color:`#6366f1`,cursor:`pointer`},children:`《隐私政策》`})]})})}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:r===`register`?(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#6366f1`,cursor:`pointer`},onClick:()=>{i(`password`),o(`password`),C(!1),T(!1),g(!1),m(!1),b(e=>e+1),z.resetFields()},children:`已有账号?去登录`}):(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#6366f1`,cursor:`pointer`},onClick:()=>{i(`register`),C(!1),T(!1),g(!1),m(!1),b(e=>e+1)},children:`没有账号?立即注册`})})]})})]})},r9=({onSuccess:e,isVerified:t})=>{let n=S.useRef(null),r=S.useRef(null),i=S.useRef(null),a=S.useRef(0),o=S.useRef(!1),[s,c]=S.useState(360),l=s-50;S.useEffect(()=>{let e=()=>{if(n.current){let e=n.current.offsetWidth;e>0&&c(e)}};e();let t=new ResizeObserver(e);return n.current&&t.observe(n.current),window.addEventListener(`resize`,e),()=>{t.disconnect(),window.removeEventListener(`resize`,e)}},[]);let u=n=>{if(o.current||t)return;let c=Math.max(0,Math.min(n,l));a.current=c,r.current&&(r.current.style.left=`${c}px`),i.current&&(i.current.style.width=`${c+50}px`),c>=l-5&&(o.current=!0,r.current&&(r.current.style.background=`#22c55e`,r.current.innerHTML=``),i.current&&(i.current.style.width=`${s}px`,i.current.style.background=`#dcfce7`),e())};return(0,$.jsxs)(`div`,{ref:n,onMouseDown:e=>{if(e.preventDefault(),o.current||t)return;let s=n.current;if(!s)return;let c=s.getBoundingClientRect(),d=e=>{u(e.clientX-c.left-50/2)},f=()=>{document.removeEventListener(`mousemove`,d),document.removeEventListener(`mouseup`,f),!o.current&&a.current({page:1,pageSize:10,total:0,items:[]}),i9=p5((e,t)=>({projects:[],records:pte(),loading:!1,mediaType:`image`,countType:`请选择`,selectedRatio:`1:1`,selectedResolution:`2K`,width:2048,height:2048,videoDuration:5,videoAspectRatio:`16:9`,videoResolution:`720p`,engineOptions:{ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]},enginesele:[],fetchProjects:async()=>{e({loading:!0});try{e({projects:await I5(),loading:!1})}catch{e({loading:!1})}},createProject:async(n,r)=>{let i=await L5(n,r);return e({projects:[i,...t().projects]}),i},deleteProject:async n=>{await R5(n),e({projects:t().projects.filter(e=>e.id!==n)})},fetchRecords:async(t={})=>{e({loading:!0});try{e({records:await z5(t),loading:!1})}catch{e({loading:!1})}},optimizePrompt:async(n,r)=>{let i=await B5(n,r);try{await $7.getState().checkAuth()}catch{}let a=t().records;return e({records:{...a,total:a.total+1,items:[i.record,...a.items]}}),i},generateVideo:async(n,r)=>{let i=await G5(n,r);try{await $7.getState().checkAuth()}catch{}let a=t().records;return e({records:{...a,items:a.items.map(e=>e.id===n?i:e)}}),i},updateRecordReferences:(n,r)=>{let i=t().records;e({records:{...i,items:i.items.map(e=>e.id===n?{...e,references:r}:e)}})},setMediaType:t=>e({mediaType:t}),setCountType:t=>e({countType:t}),setImageSettings:(t,n,r,i)=>e({selectedRatio:t,selectedResolution:n,width:r,height:i}),setVideoSettings:(t,n,r)=>e({videoDuration:t,videoAspectRatio:n,videoResolution:r}),setEngineOptions:t=>e({engineOptions:t}),setSelectedRatio:t=>e({selectedRatio:t}),setSelectedResolution:t=>e({selectedResolution:t}),setWidth:t=>e({width:t}),setHeight:t=>e({height:t}),setVideoDuration:t=>e({videoDuration:t}),setVideoAspectRatio:t=>e({videoAspectRatio:t}),setVideoResolution:t=>e({videoResolution:t}),setEnginesele:t=>e({enginesele:t}),resetGenerationConfig:()=>e({mediaType:`image`,countType:`请选择`,selectedRatio:`1:1`,selectedResolution:`2K`,width:2048,height:2048,videoDuration:5,videoAspectRatio:`16:9`,videoResolution:`720p`,engineOptions:{ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]},enginesele:[]})}));function a9(e){if(!e)return`-`;let t=e.trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);return n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``),t.replace(`T`,` `).slice(0,16)}var o9=[`#f97316`,`#3b82f6`,`#8b5cf6`,`#10b981`,`#eab308`,`#6366f1`,`#ef4444`,`#06b6d4`,`#64748b`,`#78716c`],s9={ShoppingCartOutlined:(0,$.jsx)(Q6,{}),BookOutlined:(0,$.jsx)(L2,{}),HomeOutlined:(0,$.jsx)(y3,{}),FireOutlined:(0,$.jsx)(Q4,{}),RocketOutlined:(0,$.jsx)(L6,{}),SkinOutlined:(0,$.jsx)(s8,{}),CompassOutlined:(0,$.jsx)(T4,{}),HeartOutlined:(0,$.jsx)(u3,{}),CarOutlined:(0,$.jsx)(Q2,{}),CameraOutlined:(0,$.jsx)(Y2,{}),CloudOutlined:(0,$.jsx)(u4,{}),StarOutlined:(0,$.jsx)(y8,{}),TrophyOutlined:(0,$.jsx)(L8,{}),ThunderboltOutlined:(0,$.jsx)(j8,{}),BulbOutlined:(0,$.jsx)(U2,{}),CoffeeOutlined:(0,$.jsx)(S4,{}),CrownOutlined:(0,$.jsx)(j4,{}),DashboardOutlined:(0,$.jsx)(P4,{}),FlagOutlined:(0,$.jsx)(t3,{}),GlobalOutlined:(0,$.jsx)(s3,{}),GiftOutlined:(0,$.jsx)(i3,{}),LaptopOutlined:(0,$.jsx)(O3,{}),MobileOutlined:(0,$.jsx)(Q3,{}),MonitorOutlined:(0,$.jsx)(t6,{}),PayCircleOutlined:(0,$.jsx)(s6,{}),PictureOutlined:(0,$.jsx)(p6,{}),PlayCircleOutlined:(0,$.jsx)(S6,{}),SafetyOutlined:(0,$.jsx)(B6,{}),ShoppingOutlined:(0,$.jsx)(t8,{}),SmileOutlined:(0,$.jsx)(u8,{}),SoundOutlined:(0,$.jsx)(g8,{}),TagOutlined:(0,$.jsx)(T8,{}),TeamOutlined:(0,$.jsx)(O8,{}),ToolOutlined:(0,$.jsx)(P8,{}),TruckOutlined:(0,$.jsx)(B8,{}),VideoCameraOutlined:(0,$.jsx)(Y8,{}),WalletOutlined:(0,$.jsx)(Q8,{}),BankOutlined:(0,$.jsx)(O2,{}),BuildOutlined:(0,$.jsx)(B2,{}),ExperimentOutlined:(0,$.jsx)(U4,{}),HighlightOutlined:(0,$.jsx)(p3,{}),IdcardOutlined:(0,$.jsx)(S3,{}),MedicineBoxOutlined:(0,$.jsx)(K3,{}),ReadOutlined:(0,$.jsx)(O6,{}),RestOutlined:(0,$.jsx)(j6,{}),SketchOutlined:(0,$.jsx)(i8,{}),SolutionOutlined:(0,$.jsx)(p8,{})},mte=()=>{let[e,t]=(0,S.useState)(!1),[n]=xW.useForm(),r=Je(),{projects:i,fetchProjects:a,createProject:o,deleteProject:s}=i9(),[c,l]=(0,S.useState)([]);(0,S.useEffect)(()=>{a(),e7().then(l).catch(()=>{})},[]);let u=Object.fromEntries(c.map((e,t)=>[e.key,{label:e.label,color:o9[t%o9.length],icon:e.icon||`AppstoreOutlined`}]));return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`22px 24px`,borderRadius:16,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-20,top:-20,width:200,height:200,borderRadius:`50%`,background:`rgba(255,255,255,0.08)`}}),(0,$.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,$.jsx)(Q.Title,{level:3,style:{margin:`0 0 4px`,color:`#fff`,fontWeight:700},children:`我的项目`}),(0,$.jsxs)(Q.Text,{style:{color:`rgba(255,255,255,0.7)`,fontSize:14},children:[`共 `,i.length,` 个项目 · 按行业分类管理`]})]}),(0,$.jsx)(vD,{icon:(0,$.jsx)(gR,{}),onClick:()=>t(!0),size:`large`,style:{background:`rgba(255,255,255,0.15)`,border:`1px solid rgba(255,255,255,0.3)`,color:`#fff`,fontWeight:600,backdropFilter:`blur(10px)`,borderRadius:10,height:42},children:`新建项目`})]}),i.length===0?(0,$.jsx)(NC,{image:NC.PRESENTED_IMAGE_SIMPLE,description:`还没有项目,创建您的第一个视频项目`,style:{padding:`60px 0`},children:(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(gR,{}),onClick:()=>t(!0),size:`large`,children:`创建第一个项目`})}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},className:`stagger-children`,children:i.map((e,t)=>(0,$.jsxs)(`div`,{className:`project-card project-item animate-slideInCard`,onClick:()=>r(`/projects/${e.id}/generate`),style:{display:`flex`,alignItems:`center`,padding:`18px 22px`,borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,animationDelay:`${t*.06}s`},children:[(0,$.jsx)(`div`,{style:{width:50,height:50,borderRadius:14,flexShrink:0,background:`${u[e.industry]?.color||`#64748b`}12`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:24,marginRight:16,color:u[e.industry]?.color||`#64748b`},children:s9[u[e.industry]?.icon]||(0,$.jsx)(u2,{})}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4,flexWrap:`wrap`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1a1a2e`},children:e.name}),(0,$.jsx)(T$,{color:u[e.industry]?.color||`#64748b`,style:{borderRadius:6,margin:0},children:u[e.industry]?.label||e.industry})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(TH,{style:{fontSize:12,color:`#94a3b8`}}),(0,$.jsxs)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:12,color:`#94a3b8`},children:[`创建于 `,a9(e.createdAt)]})]})]}),(0,$.jsxs)(`div`,{className:`project-actions`,style:{display:`flex`,alignItems:`center`,gap:8,marginLeft:16},children:[(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(S6,{}),onClick:t=>{t.stopPropagation(),r(`/projects/${e.id}/generate`)},style:{background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,borderRadius:10,fontWeight:600,height:36,boxShadow:`0 4px 12px rgba(99,102,241,0.25)`},children:`生成`}),(0,$.jsx)(Rq,{title:`确定删除该项目?`,description:`项目下的生成记录将一并删除`,onConfirm:async t=>{t?.stopPropagation(),await s(e.id),Z.success(`项目已删除`)},onCancel:e=>e?.stopPropagation(),children:(0,$.jsx)(vD,{danger:!0,icon:(0,$.jsx)(O$,{}),onClick:e=>e.stopPropagation(),style:{borderRadius:10,height:36,background:`rgba(239,68,68,0.06)`,border:`1px solid rgba(239,68,68,0.15)`,color:`#ef4444`}})}),(0,$.jsx)(Ug,{className:`mobile-hide`,style:{color:`#cbd5e1`,fontSize:12}})]})]},e.id))}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(u2,{}),`新建项目`]}),open:e,onOk:async()=>{try{let e=await n.validateFields(),i=await o(e.name,e.industry);Z.success(`项目创建成功`),t(!1),n.resetFields(),r(`/projects/${i.id}/generate`)}catch{}},onCancel:()=>{t(!1),n.resetFields()},okText:`创建`,cancelText:`取消`,width:480,children:(0,$.jsxs)(xW,{form:n,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(xW.Item,{name:`name`,label:`项目名称`,rules:[{required:!0,message:`请输入项目名称`}],children:(0,$.jsx)(nK,{placeholder:`例如:618电商大促宣传片`,prefix:(0,$.jsx)(xZ,{}),size:`large`})}),(0,$.jsx)(xW.Item,{name:`industry`,label:`所属行业`,rules:[{required:!0,message:`请选择行业`}],children:(0,$.jsx)(lw,{placeholder:`选择项目所属行业`,size:`large`,children:c.map((e,t)=>(0,$.jsx)(lw.Option,{value:e.key,children:(0,$.jsxs)(DU,{children:[s9[e.icon]||(0,$.jsx)(u2,{}),` `,e.label]})},e.key))})})]})})]})};function hte(){if(typeof crypto<`u`&&typeof crypto.randomUUID==`function`)return crypto.randomUUID();if(typeof crypto<`u`&&typeof crypto.getRandomValues==`function`){let e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}return`${Date.now().toString(16).padStart(12,`0`)}-${Math.random().toString(16).slice(2,10).padStart(8,`0`)}-4xxx-yxxx-${Math.random().toString(16).slice(2,12)}`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}var c9=({src:e,width:t=48,height:n=48})=>{let[r,i]=(0,S.useState)(null),[a,o]=(0,S.useState)(null);return(0,S.useEffect)(()=>{let r=document.createElement(`video`);r.muted=!0,r.preload=`metadata`,r.crossOrigin=`anonymous`;let a=()=>{o(r.duration),r.currentTime=Math.min(1,r.duration*.1)},s=()=>{try{let e=document.createElement(`canvas`);e.width=t*2,e.height=n*2;let a=e.getContext(`2d`);a&&(a.drawImage(r,0,0,e.width,e.height),i(e.toDataURL(`image/jpeg`,.7)))}catch{}};return r.addEventListener(`loadedmetadata`,a),r.addEventListener(`seeked`,s),r.src=e,()=>{r.removeEventListener(`loadedmetadata`,a),r.removeEventListener(`seeked`,s)}},[e,t,n]),(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`,background:`#1a1a2e`},children:[r?(0,$.jsx)(`img`,{src:r,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(S6,{style:{color:`#fff`,fontSize:18}})}),a!=null&&(0,$.jsx)(`span`,{style:{position:`absolute`,bottom:2,right:2,fontSize:9,color:`#fff`,background:`rgba(0,0,0,0.6)`,borderRadius:4,padding:`1px 4px`,lineHeight:1.3},children:(e=>`${Math.round(e)}s`)(a)})]})},gte=()=>{let{projectId:e}=Qe(),t=Je(),[n]=xW.useForm(),{projects:r,records:i,fetchProjects:a,fetchRecords:o,optimizePrompt:s,generateVideo:c}=i9(),l=i.items,{user:u}=$7(),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(null),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(!1),[x,C]=(0,S.useState)({}),[w,T]=(0,S.useState)({}),[E,D]=(0,S.useState)({}),[O,k]=(0,S.useState)(null),[A,j]=(0,S.useState)(null),[M,N]=(0,S.useState)([]),[P,F]=(0,S.useState)(!1),[I,L]=(0,S.useState)(``),[R,z]=(0,S.useState)(!1),[B,V]=(0,S.useState)(``),H=(0,S.useRef)(null),[U,ee]=(0,S.useState)({}),[te,ne]=(0,S.useState)({}),[W,re]=(0,S.useState)({}),[G,K]=(0,S.useState)(null),[q,ie]=(0,S.useState)({}),[J,ae]=(0,S.useState)(null),[oe,se]=(0,S.useState)(5),[ce,le]=(0,S.useState)(`16:9`),[ue,de]=(0,S.useState)(`720p`),[fe,pe]=(0,S.useState)(null),[me,he]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`720p`,`1080p`],durations:[5,8,10,12,15]}),[ge,_e]=(0,S.useState)(0),[ve,ye]=(0,S.useState)(0),[be,xe]=(0,S.useState)(`image`),[Se,Ce]=(0,S.useState)(`1:1`),[we,Te]=(0,S.useState)(`2K`),[Ee,De]=(0,S.useState)(2048),[Oe,ke]=(0,S.useState)(2048),[Ae,je]=(0,S.useState)(!1),[Me,Ne]=(0,S.useState)([]),[Pe,Fe]=(0,S.useState)([]);(0,S.useEffect)(()=>{if(c7().then(e=>{Ne(e.video),Fe(e.image)}),!Ae)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&je(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[Ae]);let Ie=(e,t)=>{for(let n=0;n{let t=e===`2k`?`2048`:e===`4k`?`4096`:e;for(let e=0;e{qe(e)},ze=e=>{Xe(parseInt(e))},[Be,Ve]=(0,S.useState)([]),[He,Ue]=(0,S.useState)([]),[We,Ge]=(0,S.useState)([]),[Ke,qe]=(0,S.useState)(0),[Ye,Xe]=(0,S.useState)(0);(0,S.useEffect)(()=>{We[Ye]&&We[Ye][Ke]!==void 0&&(De(We[Ye][Ke].substring(0,4)),ke(We[Ye][Ke].substring(5)))},[Ke]),(0,S.useEffect)(()=>{We[Ye]&&We[Ye][Ke]!==void 0&&(De(We[Ye][Ke].substring(0,4)),ke(We[Ye][Ke].substring(5)))},[Ye]);let Ze=()=>{De(Oe),ke(Ee)},$e=e=>{xe(e.target.value===`image`?`image`:`video`)};(0,S.useEffect)(()=>{e7().then(e=>{ee(Object.fromEntries(e.map(e=>[e.key,e.label]))),ne(Object.fromEntries(e.map(e=>[e.key,e.optionGroups||[]])))}).catch(()=>{}),Y5().then(e=>{let t=e.items?.[0]?.supportedSizes||{},n=[],r=[],i=[];for(let e in t[`2K`])n.push(e),r.push(t[`2K`][e]);n.forEach((e,t)=>{Ve(n=>[...n,{value:e,label:String(t)}])});for(let e in t[`4K`])i.push(t[`4K`][e]);Ge([r,i]);let a=[];for(let e in t)a.push(e);a.forEach((e,t)=>{Ue(n=>[...n,{value:e,label:String(t)}])})}).catch(()=>{}),J5().then(e=>{if(e.items?.length){let t=e.items[0];he({ratios:t.supportedRatios?.length?t.supportedRatios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions?.length?t.supportedResolutions:[`720p`,`1080p`],durations:t.supportedDurations?.length?t.supportedDurations:[5,8,10,12,15]})}}).catch(()=>{})},[]),(0,S.useEffect)(()=>{a(),o({projectId:e,page:1,pageSize:100})},[e,a,o]);let et=(0,S.useRef)(!1);(0,S.useEffect)(()=>{et.current||l.length===0||(et.current=!0,console.log(`aaaa`,l),l.forEach(t=>{t.projectId===e&&t.status===`generating`&&(T(e=>({...e,[t.id]:`generating`})),Dt(t.id)),t.projectId===e&&t.status===`optimizing`&&ct(t.id)}))},[l,e]);let tt=(0,S.useRef)(new Set),nt=(0,S.useRef)(null),rt=(0,S.useRef)(null),it=e=>{tt.current.add(e),st()},at=e=>{tt.current.delete(e),tt.current.size===0&&ot()},ot=()=>{nt.current&&=(clearInterval(nt.current),null),rt.current&&=(rt.current.abort(),null)},st=()=>{nt.current||=setInterval(async()=>{try{rt.current&&rt.current.abort();let t=new AbortController;rt.current=t;let n=await z5({projectId:e,page:1,pageSize:100,signal:t.signal});rt.current=null;let r=Array.from(tt.current),i=[];if(r.length>0){let e=i9.getState().records,t=e.items.map(e=>{if(r.includes(e.id)){let t=n.items.find(t=>t.id===e.id);if(t)return t.status!==`optimizing`&&i.push(e.id),t}return e});i9.setState({records:{...e,items:t}}),i.forEach(e=>{at(e)})}}catch(e){e.name!==`AbortError`&&console.error(`Optimizing polling error:`,e)}},3e3)},ct=e=>{it(e)},lt=(0,S.useRef)(!1),ut=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(lt.current||l.length===0)return;let t=localStorage.getItem(`pending_optimize`);if(t)try{let{key:n,projectId:r,prompt:i,duration:a,ts:o}=JSON.parse(t);if(Date.now()-o>300*1e3||r!==e){localStorage.removeItem(`pending_optimize`);return}if(ut.current===n)return;let s=l.find(e=>e.projectId===r&&e.originalPrompt===i&&e.duration===a&&e.status===`prompt_optimized`&&new Date(e.createdAt).getTime()>o-1e4);s?(lt.current=!0,localStorage.removeItem(`pending_optimize`),g(s),v(s.optimizedPrompt||``),_e(s.textCreditsCost),ye(s.textTokensUsed),m(!0),Z.success({content:`优化请求已恢复,消耗 ${s.textCreditsCost} 积分`,key:`recovery`})):Date.now()-o>3e4&&localStorage.removeItem(`pending_optimize`)}catch{localStorage.removeItem(`pending_optimize`)}},[l,e]);let dt=r.find(t=>t.id===e),ft=l.filter(t=>t.projectId===e),pt=dt?.name??`项目`,mt=dt&&te[dt.industry]||[],ht=u?.credits??0,gt=e=>{let t=e===`2k`?`2048`:e===`4k`?`4096`:e;for(let e=0;e=_t,yt=async()=>{try{if(!e){Z.error(`项目ID为空,请先选择项目`);return}let t=await n.validateFields();if(!t.prompt||!t.prompt.trim()){Z.error(`请输入视频/图片描述`);return}f(!0);let r=Object.entries(W).map(([e,t])=>`@${e}:${t}`),i=r.length>0?`${t.prompt}\n\n${r.join(`;`)}`:t.prompt,a=hte();localStorage.setItem(`pending_optimize`,JSON.stringify({key:a,projectId:e,prompt:i,duration:oe,ts:Date.now()})),ut.current=a;let o=await s(e,{prompt:i,duration:oe,genType:be,resolution:we,references:M.length>0?M:void 0,idempotencyKey:a,image_size:we,image_proportion:Se,image_px:Ee+`x`+Oe});localStorage.removeItem(`pending_optimize`),ut.current=null,g(o.record),v(o.record.optimizedPrompt||``),_e(o.textCreditsCost),ye(o.textTokensUsed),m(!0),Z.success({content:`「${pt}」提示词优化完成,消耗 ${o.textCreditsCost} 积分`,key:`optimize`})}catch(e){console.error(`优化提示词失败:`,e);let t=e?.response?.data?.message||e?.message||`操作失败,请稍后重试`;Z.error(t)}finally{f(!1),localStorage.removeItem(`pending_optimize`),ut.current=null}},bt=(0,S.useRef)(new Set),xt=(0,S.useRef)(null),St=(0,S.useRef)(null),Ct=e=>{bt.current.add(e),Et()},wt=e=>{bt.current.delete(e),bt.current.size===0&&Tt()},Tt=()=>{xt.current&&=(clearInterval(xt.current),null),St.current&&=(St.current.abort(),null)},Et=()=>{xt.current||=setInterval(async()=>{try{St.current&&St.current.abort();let t=new AbortController;St.current=t;let n=await z5({projectId:e,page:1,pageSize:100,signal:t.signal});St.current=null;let r=Array.from(bt.current),i=[];if(r.length>0){let e=i9.getState().records,t=e.items.map(e=>{if(r.includes(e.id)){let t=n.items.find(t=>t.id===e.id);if(t)return t.status!==`generating`&&i.push(e.id),t}return e});i9.setState({records:{...e,items:t}}),i.forEach(e=>{let t=n.items.find(t=>t.id===e);wt(e),t?.status===`completed`?(T(t=>({...t,[e]:`done`})),g(n=>n?.id===e?t:n),Z.success({content:`「${pt}」视频生成完成!`,key:e,duration:5})):t?.status===`failed`&&(T(t=>({...t,[e]:`failed`})),g(n=>n?.id===e?t:n),Z.error({content:`「${pt}」视频生成失败: ${t.errorMessage||`未知错误`}`,key:e,duration:5}))})}}catch(e){e.name!==`AbortError`&&console.error(`Global polling error:`,e)}},5e3)},Dt=e=>{Ct(e)};(0,S.useEffect)(()=>()=>{Tt(),ot()},[]);let Ot=async e=>{if(!vt){Z.error(`积分不足,请先充值`);return}C(t=>({...t,[e]:!0})),T(t=>({...t,[e]:`generating`})),Z.loading({content:`「${pt}」正在提交视频生成...`,duration:0,key:e});try{(await c(e,{aspectRatio:ce,resolution:ue})).status===`failed`?(T(t=>({...t,[e]:`failed`})),Z.error({content:`「${pt}」提交失败`,key:e,duration:3})):(Z.success({content:`「${pt}」已提交,正在生成中...`,key:e,duration:3}),Dt(e))}catch(t){T(t=>({...t,[e]:`failed`}));let n=`提交失败`;t?.response?.data?.detail?n=t.response.data.detail:t?.data?.detail?n=t.data.detail:t?.detail?n=t.detail:t?.message&&(n=t.message),Z.error({content:`${n}`,key:e,duration:3})}finally{C(t=>({...t,[e]:!1}))}},kt=async e=>{let t=ft.find(t=>t.id===e);if(t){C(t=>({...t,[e]:!0})),T(t=>({...t,[e]:`generating`})),Z.loading({content:`「${pt}」正在重新提交...`,duration:0,key:e});try{let n=E[e];n&&n!==t.optimizedPrompt&&await W5(e,n);let r=await c(e,{aspectRatio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`});console.log(`重新提交视频生成结果:`,r),r.status===`failed`?(T(t=>({...t,[e]:`failed`})),console.log(`12312`),Z.error({content:`「${pt}」提交失败`,key:e,duration:3})):(Z.success({content:`「${pt}」已提交,正在生成中...`,key:e,duration:3}),Dt(e))}catch(t){T(t=>({...t,[e]:`failed`})),console.log(`1231`,t);let n=`提交失败`;t?.response?.data?.detail?n=t.response.data.detail:t?.data?.detail?n=t.data.detail:t?.detail?n=t.detail:t?.message&&(n=t.message),Z.error({content:`${n}`,key:e,duration:3})}finally{C(t=>({...t,[e]:!1}))}}},At=e=>{let t=w[e.id];return t===`generating`?`generating`:t===`done`?`completed`:t===`failed`?`failed`:e.status},jt={optimizing:{color:`processing`,text:`优化中`,icon:(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,$.jsx)(OH,{})},generating:{color:`warning`,text:`生成中`,icon:(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}})},completed:{color:`success`,text:`已完成`,icon:(0,$.jsx)(i4,{})},failed:{color:`error`,text:`失败`,icon:(0,$.jsx)(s4,{})}},Mt=({label:e,value:t,options:n,suffix:r,expanded:i,onToggle:a,onSelect:o,onClose:s})=>{let c=(0,S.useRef)(null),l=(0,S.useRef)(null),u=(0,S.useRef)(i),[d,f]=(0,S.useState)(null);return u.current=i,(0,S.useEffect)(()=>{if(i&&c.current){let e=c.current.getBoundingClientRect();f({bottom:window.innerHeight-e.top+4,left:e.left,width:Math.max(e.width,100)})}else f(null)},[i]),(0,S.useEffect)(()=>{if(!i)return;let e=e=>{c.current?.contains(e.target)||l.current?.contains(e.target)||u.current&&s()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[i,s]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{ref:c,onClick:a,translate:`no`,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,cursor:`pointer`,userSelect:`none`,transition:`background 0.2s, border-color 0.2s`,background:i?`rgba(99,102,241,0.08)`:`#f8f9fc`,border:i?`1px solid #6366f1`:`1px solid #e2e8f0`,minWidth:70,whiteSpace:`nowrap`,flexShrink:0},children:[(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#6366f1`,fontWeight:500,lineHeight:`18px`},children:[t,r]}),(0,$.jsx)(wQ,{style:{fontSize:9,color:`#94a3b8`,transition:`transform 0.2s`,transform:i?`rotate(180deg)`:`rotate(0deg)`}})]}),d&&(0,zi.createPortal)((0,$.jsxs)(`div`,{ref:l,style:{position:`fixed`,bottom:d.bottom,left:d.left,minWidth:d.width,background:`#fff`,borderRadius:12,padding:6,zIndex:99999,boxShadow:`0 8px 30px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:10,color:`#94a3b8`,display:`block`,padding:`2px 6px 4px`},children:e}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:n.map((e,n)=>{let r=t===e;return(0,$.jsx)(`div`,{onClick:()=>{o(e),s()},style:{padding:`6px 10px`,borderRadius:8,fontSize:13,cursor:`pointer`,transition:`all 0.15s`,background:r?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`transparent`,color:r?`#fff`:`#1a1a2e`,fontWeight:r?600:400},onMouseEnter:e=>{r||(e.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:e},n)})})]}),document.body)]})},Nt=({group:e,selected:t,expanded:n,onToggle:r,onSelect:i,onClose:a})=>{let o=(0,S.useRef)(null),s=(0,S.useRef)(null),c=(0,S.useRef)(n),[l,u]=(0,S.useState)(null);return c.current=n,(0,S.useEffect)(()=>{if(n&&o.current){let e=o.current.getBoundingClientRect();u({bottom:window.innerHeight-e.top+4,left:e.left})}else u(null)},[n]),(0,S.useEffect)(()=>{if(!n)return;let e=e=>{o.current?.contains(e.target)||s.current?.contains(e.target)||c.current&&a()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[n,a]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{ref:o,onClick:r,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,cursor:`pointer`,userSelect:`none`,transition:`all 0.2s`,background:t?`rgba(99,102,241,0.08)`:`#f8f9fc`,border:n?`1px solid #6366f1`:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:t?`#6366f1`:`#64748b`,fontWeight:t?600:400},children:t||e.name}),(0,$.jsx)(wQ,{style:{fontSize:9,color:t?`#6366f1`:`#94a3b8`,transition:`transform 0.2s`,transform:n?`rotate(180deg)`:`rotate(0deg)`}})]}),l&&(0,zi.createPortal)((0,$.jsxs)(`div`,{ref:s,style:{position:`fixed`,bottom:l.bottom,left:l.left,background:`#fff`,borderRadius:12,padding:8,minWidth:160,zIndex:99999,boxShadow:`0 8px 30px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:10,color:`#94a3b8`,display:`block`,padding:`2px 6px 4px`},children:e.name}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:e.options.map((e,n)=>{let r=t===e;return(0,$.jsx)(`div`,{onClick:()=>{i(e),a()},style:{padding:`6px 10px`,borderRadius:8,fontSize:13,cursor:`pointer`,transition:`all 0.15s`,background:r?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`transparent`,color:r?`#fff`:`#1a1a2e`,fontWeight:r?600:400},onMouseEnter:e=>{r||(e.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:e},n)})})]}),document.body)]})};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`gen-header animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`20px 28px`,borderRadius:16,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 100%)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-30,bottom:-30,width:160,height:160,borderRadius:`50%`,background:`rgba(255,255,255,0.05)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,position:`relative`},children:[(0,$.jsx)(vD,{icon:(0,$.jsx)(g2,{}),onClick:()=>t(`/projects`),style:{background:`rgba(255,255,255,0.1)`,border:`1px solid rgba(255,255,255,0.2)`,color:`#fff`,borderRadius:10}}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0,color:`#fff`,fontWeight:700},children:pt}),dt&&(0,$.jsx)(T$,{style:{background:`rgba(255,255,255,0.12)`,border:`1px solid rgba(255,255,255,0.2)`,color:`rgba(255,255,255,0.8)`,borderRadius:6},children:U[dt.industry]||dt.industry})]}),(0,$.jsx)(Q.Text,{style:{color:`rgba(255,255,255,0.5)`,fontSize:13},children:`描述视频 → AI优化 → 生成视频`})]})]}),(0,$.jsxs)(T$,{style:{background:`rgba(255,255,255,0.1)`,border:`1px solid rgba(255,255,255,0.2)`,color:`#fff`,borderRadius:20,fontSize:13,padding:`4px 14px`},children:[`剩余 `,ht,` 积分`]})]}),!p&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{className:`animate-fadeInUp`,style:{marginBottom:24,padding:`16px 20px`,borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,boxShadow:`0 2px 12px rgba(0,0,0,0.03)`},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{marginRight:70,position:`relative`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,fontWeight:500,color:`#475569`,marginRight:16},children:`生成类型:`}),(0,$.jsxs)(LL.Group,{defaultValue:`image`,buttonStyle:`solid`,onChange:$e,children:[(0,$.jsxs)(LL.Button,{value:`image`,style:{zIndex:0},children:[(0,$.jsx)(p6,{style:{marginRight:6,fontSize:14}}),` `,`图片`]}),(0,$.jsxs)(LL.Button,{value:`video`,children:[(0,$.jsx)(Y8,{style:{marginRight:6,fontSize:14}}),` `,`视频`]})]})]}),be===`video`&&[{icon:(0,$.jsx)(j$,{}),label:`描述视频+时长`,color:`#6366f1`},{icon:(0,$.jsx)(j8,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(L6,{}),label:`选择参数生成`,color:`#10b981`}].map((e,t)=>(0,$.jsxs)(S.Fragment,{children:[t>0&&(0,$.jsx)(`div`,{style:{width:40,height:1,background:`linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0)`,margin:`0 12px`,flexShrink:0}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:10,background:`${e.color}12`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:e.color,fontSize:15},children:e.icon})}),(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:500,color:`#1a1a2e`},children:e.label})]})]},t)),be===`image`&&[{icon:(0,$.jsx)(j$,{}),label:`描述图片+尺寸`,color:`#6366f1`},{icon:(0,$.jsx)(j8,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(L6,{}),label:`图片生成`,color:`#10b981`}].map((e,t)=>(0,$.jsxs)(S.Fragment,{children:[t>0&&(0,$.jsx)(`div`,{style:{width:40,height:1,background:`linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0)`,margin:`0 12px`,flexShrink:0}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:10,background:`${e.color}12`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:e.color,fontSize:15},children:e.icon})}),(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:500,color:`#1a1a2e`},children:e.label})]})]},t))]})}),(0,$.jsxs)(xW,{form:n,initialValues:{},children:[(0,$.jsx)(xW.Item,{name:`prompt`,noStyle:!0,rules:[{required:!0,message:`请输入视频描述`}],style:{display:`none`}}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:20,background:`#fff`,border:`1px solid #f0f0f5`,boxShadow:`0 4px 24px rgba(0,0,0,0.04)`,overflow:`visible`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`12px 16px 0`,minHeight:60},children:[M.map((e,t)=>(0,$.jsxs)(`div`,{className:`ref-thumb`,style:{position:`relative`,width:48,height:48,borderRadius:12,overflow:`visible`,flexShrink:0},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,overflow:`hidden`,border:`1px solid #e2e8f0`,cursor:`pointer`},onClick:()=>{e.type===`video`&&ae(`http://ceshi.apiforeign.minzhong.cn${e.url}`)},children:e.type===`image`?(0,$.jsx)(xG,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(c9,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`})}),(0,$.jsx)(`div`,{className:`ref-delete`,onClick:n=>{n.stopPropagation(),U5(e.url).catch(()=>{}),N(e=>e.filter((e,n)=>n!==t))},style:{position:`absolute`,top:-4,right:-4,width:16,height:16,borderRadius:`50%`,background:`rgba(0,0,0,0.55)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,opacity:0,transition:`opacity 0.15s`,backdropFilter:`blur(4px)`},children:(0,$.jsx)(s4,{style:{color:`#fff`,fontSize:10}})})]},t)),(0,$.jsx)(y0,{accept:`image/*,video/*`,showUploadList:!1,multiple:!0,beforeUpload:e=>{let t=e.type.startsWith(`image/`),n=e.type.startsWith(`video/`);if(!t&&!n)return Z.error(`仅支持图片或视频文件`),!1;let r=n?100:10;if(e.size/1024/1024>r)return Z.error(`${n?`视频`:`图片`}大小不能超过${r}MB`),!1;let i=M.filter(e=>e.type===`image`).length,a=M.filter(e=>e.type===`video`).length;return t&&i>=10?(Z.error(`最多上传10张图片`),!1):n&&a>=3?(Z.error(`最多上传3个视频`),!1):(F(!0),(t?V5:H5)(e).then(e=>{let n=t?`图片`:`视频`,r=t?i+1:a+1;N(i=>[...i,{url:e.url,type:t?`image`:`video`,name:`${n}${r}`}]),Z.success(`${n}上传成功`)}).catch(()=>Z.error(`上传失败`)).finally(()=>F(!1)),!1)},children:(0,$.jsx)($w,{title:`参考内容(${M.length}/10)`,children:(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,border:`1.5px dashed #d9d9d9`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s`,flexShrink:0},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99,102,241,0.04)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#d9d9d9`,e.currentTarget.style.background=`transparent`},children:P?(0,$.jsx)(Xm,{style:{fontSize:18,color:`#6366f1`}}):(0,$.jsx)(gR,{style:{fontSize:18,color:`#94a3b8`}})})})})]}),(0,$.jsx)(`div`,{style:{padding:`8px 16px 4px`},children:(0,$.jsx)(nK.TextArea,{ref:H,value:I,onChange:e=>{let t=e.target.value;L(t),n.setFieldsValue({prompt:t});let r=t.lastIndexOf(`@`);if(r>=0){let e=t.slice(r+1);if(!e.includes(` `)&&!e.includes(` +`)){z(!0),V(e);return}}z(!1)},rows:3,placeholder:`上传参考素材、输入文字,自由组合图、文多元素。输入 @ 可引用参考内容...`,maxLength:500,bordered:!1,autoSize:{minRows:2,maxRows:6},style:{padding:`6px 2px`,fontSize:15,lineHeight:1.7,resize:`none`,caretColor:`#6366f1`}})}),R&&M.length>0&&(0,$.jsx)(`div`,{style:{margin:`0 16px 8px`,background:`#fff`,borderRadius:10,boxShadow:`0 6px 24px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`,padding:6,maxHeight:180,overflowY:`auto`},children:M.filter(e=>!B||e.name.includes(B)).map((e,t)=>(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,padding:`8px 10px`,borderRadius:8,cursor:`pointer`,transition:`background 0.15s`},onMouseEnter:e=>e.currentTarget.style.background=`#f1f5f9`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,onMouseDown:t=>{t.preventDefault();let r=H.current?.resizableTextArea?.textArea||H.current?.nativeElement?.querySelector(`textarea`)||H.current;if(!r||!r.value)return;let i=r.value,a=i.lastIndexOf(`@`),o=i.slice(0,a)+`@${e.name} `;L(o),n.setFieldValue(`prompt`,o),z(!1),setTimeout(()=>{r.focus(),r.selectionStart=o.length,r.selectionEnd=o.length},50)},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,overflow:`hidden`,background:e.type===`image`?`#f1f5f9`:`#1a1a2e`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:e.type===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(S6,{style:{color:`#fff`,fontSize:14}})}),(0,$.jsx)(Q.Text,{style:{fontSize:13},children:e.name}),(0,$.jsx)(T$,{style:{marginLeft:`auto`,fontSize:11},children:e.type===`image`?`图片`:`视频`})]},t))}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`8px 12px 12px`,gap:8,flexWrap:`wrap`,position:`relative`,zIndex:50,minHeight:48},children:[be!==`image`&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,flex:1,flexWrap:`wrap`},children:[(0,$.jsx)(Mt,{label:`时长`,value:`${oe}`,options:me.durations.map(e=>`${e}`),suffix:`秒`,expanded:fe===`duration`,onToggle:()=>pe(fe===`duration`?null:`duration`),onSelect:e=>se(parseInt(e)),onClose:()=>pe(null)}),mt.map((e,t)=>{let n=G===e.name,r=W[e.name];return(0,$.jsx)(Nt,{group:e,selected:r,expanded:n,onToggle:()=>K(n?null:e.name),onSelect:t=>{re(n=>{let r={...n};return r[e.name]===t?delete r[e.name]:r[e.name]=t,r})},onClose:()=>K(null)},`og-${t}`)})]}),be==`image`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>je(!Ae),className:`image-settings-trigger`,style:{minWidth:220,padding:`0px 16px`,height:30,borderRadius:10,border:`1px solid #e2e8f0`,backgroundColor:`#f8f9fc`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:12,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:(0,$.jsxs)(`div`,{style:{textAlign:`left`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:600,color:`#374151`,marginRight:10},children:Se===`auto`?`智能`:Se}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#9ca3af`},children:[we==`2K`?`高清 2K`:`超清 4K`,`| `,Ee,`×`,Oe]})]})}),(0,$.jsx)(wQ,{style:{fontSize:14,color:`#9ca3af`}})]}),Ae&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:520,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:20,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:10,fontSize:13,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:6},children:Be.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{Ce(e.value),Re(e.label)},style:{flex:`0 0 calc(11.11% - 5px)`,minWidth:48,height:56,borderRadius:8,border:Se===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:Se===e.value?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:e.value===`auto`?16:20,height:e.value===`auto`?16:20,border:`2px solid ${Se===e.value?`#6366f1`:`#9ca3af`}`,borderRadius:(e.value,3),marginBottom:3,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e.value===`auto`&&(0,$.jsx)(`span`,{style:{fontSize:8,color:Se===e.value?`#6366f1`:`#9ca3af`},children:`智`})}),(0,$.jsx)(`span`,{style:{fontSize:10,color:Se===e.value?`#6366f1`:`#6b7280`,fontWeight:Se===e.value?600:400},children:e.value})]},e.value))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:10,fontSize:13,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:8},children:He.map(e=>(0,$.jsx)(`button`,{onClick:()=>{Te(e.value),ze(e.label)},style:{flex:1,height:48,borderRadius:8,border:we===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:we===e.value?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsxs)(`span`,{style:{fontSize:13,fontWeight:600,color:we===e.value?`#fff`:`#4b5563`},children:[e.value,e.value===`4k`&&(0,$.jsx)(`span`,{style:{marginLeft:3},children:`✨`})]})},e.value))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:10,fontSize:13,fontWeight:500,color:`#666666`},children:`尺寸`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:140},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12,marginRight:6},children:`W`}),(0,$.jsx)(nK,{value:Ee,onChange:e=>De(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:6,height:40,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:14,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`button`,{onClick:Ze,style:{width:28,height:28,borderRadius:6,border:`1px solid #e5e7eb`,backgroundColor:`#fff`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:`#6366f1`},children:(0,$.jsx)(oG,{style:{fontSize:12}})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:140},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12,marginRight:6},children:`H`}),(0,$.jsx)(nK,{value:Oe,onChange:e=>ke(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:6,height:40,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:14,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12},children:`PX`})]})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,flexShrink:0},children:[be===`image`&&(0,$.jsx)(`span`,{style:{color:`#7c7c7c`,fontSize:14},children:`(请在左侧选择图片比例和尺寸)`}),(0,$.jsx)(vD,{type:`primary`,size:`large`,onClick:yt,loading:d,style:{borderRadius:10,fontWeight:600,minWidth:140,height:40,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 16px rgba(99,102,241,0.35)`},children:`AI优化提示词`})]})]})]})]})]}),p&&h&&(0,$.jsxs)(Oz,{className:`animate-fadeInUp`,style:{borderRadius:16},styles:{body:{padding:`24px 28px`}},children:[!w[h.id]||w[h.id]===`idle`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:24,padding:`14px 18px`,borderRadius:12,background:`linear-gradient(135deg, rgba(16,185,129,0.06), rgba(5,150,105,0.06))`,border:`1px solid rgba(16,185,129,0.15)`},children:[(0,$.jsx)(i4,{style:{color:`#10b981`,fontSize:22}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,display:`block`},children:`提示词优化完成`}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`文本优化消耗 `,ge,` 积分· 您可以编辑提示词后选择参数生成视频`]})]})]}):(0,$.jsxs)(`div`,{style:{marginBottom:24,padding:`16px 18px`,borderRadius:12,display:`flex`,alignItems:`center`,gap:12,background:w[h.id]===`failed`?`rgba(239,68,68,0.04)`:w[h.id]===`done`?`rgba(16,185,129,0.04)`:`rgba(99,102,241,0.04)`,border:`1px solid ${w[h.id]===`failed`?`rgba(239,68,68,0.12)`:w[h.id]===`done`?`rgba(16,185,129,0.12)`:`rgba(99,102,241,0.12)`}`},children:[w[h.id]===`generating`&&(0,$.jsx)(Xm,{style:{color:`#6366f1`,fontSize:18},spin:!0}),w[h.id]===`done`&&(0,$.jsx)(i4,{style:{color:`#10b981`,fontSize:18}}),w[h.id]===`failed`&&(0,$.jsx)(s4,{style:{color:`#ef4444`,fontSize:18}}),(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:w[h.id]===`failed`?`#ef4444`:w[h.id]===`done`?`#10b981`:`#6366f1`},children:[w[h.id]===`generating`&&`${be===`image`?`图片`:`视频`}生成中,请稍候...`,w[h.id]===`done`&&`${be===`image`?`图片`:`视频`}生成成功`,w[h.id]===`failed`&&`${be===`image`?`图片`:`视频`}生成失败,请重试`]})]}),!w[h.id]||w[h.id]===`idle`||w[h.id]===`failed`?(0,$.jsxs)(`div`,{className:`gen-prompt-row`,style:{display:`flex`,gap:20,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 45%`,minWidth:240},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`,minHeight:100},children:(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#64748b`,lineHeight:1.7},children:h.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 45%`,minWidth:240},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,!y&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!y&&(0,$.jsxs)(DU,{size:4,children:[(0,$.jsx)($w,{title:`复制`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(e1,{}),onClick:()=>{navigator.clipboard.writeText(_),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(0,$.jsx)($w,{title:`编辑`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(j$,{}),onClick:()=>b(!0),style:{color:`#6366f1`}})})]})]}),y?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(nK.TextArea,{value:_,onChange:e=>v(e.target.value),rows:5,style:{borderRadius:12,fontSize:14,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(vD,{size:`small`,onClick:()=>{v(h.optimizedPrompt||``),b(!1)},children:`取消`}),(0,$.jsx)(vD,{size:`small`,type:`primary`,onClick:()=>{b(!1),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`,minHeight:100},children:(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#1a1a2e`,lineHeight:1.7},children:_})})]})]}):(0,$.jsxs)(`div`,{className:`gen-prompt-row`,style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 55%`,minWidth:280},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`,minHeight:80},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.6},children:h.originalPrompt})})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,!y&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!y&&(0,$.jsxs)(DU,{size:4,children:[(0,$.jsx)($w,{title:`复制`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(e1,{}),onClick:()=>{navigator.clipboard.writeText(_),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(0,$.jsx)($w,{title:`编辑`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(j$,{}),onClick:()=>b(!0),style:{color:`#6366f1`}})})]})]}),y?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(nK.TextArea,{value:_,onChange:e=>v(e.target.value),rows:5,style:{borderRadius:12,fontSize:13,lineHeight:1.6,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(vD,{size:`small`,onClick:()=>{v(h.optimizedPrompt||``),b(!1)},children:`取消`}),(0,$.jsx)(vD,{size:`small`,type:`primary`,onClick:()=>{b(!1),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`,minHeight:120},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.6},children:_})})]})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 40%`,minWidth:280},children:[h.videoUrl&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`生成视频`}),(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`,border:`1px solid #f0f0f5`,background:`#000`},children:(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${h.videoUrl}`,controls:!0,style:{width:`100%`,maxHeight:350,display:`block`}})})]}),h.imageUrl&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`生成图片`}),(0,$.jsx)(xG,{src:`http://ceshi.apiforeign.minzhong.cn${h.imageUrl}`,style:{width:`100%`,maxHeight:350,objectFit:`contain`,borderRadius:12,border:`1px solid #f0f0f5`},preview:!0})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginTop:20,padding:`14px 18px`,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:[be!==`image`&&(0,$.jsxs)(`div`,{style:{marginTop:24,borderRadius:12,background:`#f8f9fc`,width:`25%`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,fontWeight:600,display:`block`,marginBottom:12},children:`选择视频参数`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`时长`}),(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:13,color:`#6366f1`},children:[oe,`s`]})]}),(0,$.jsx)(Mt,{label:`比例`,value:ce,options:me.ratios,expanded:fe===`ratio`,onToggle:()=>pe(fe===`ratio`?null:`ratio`),onSelect:e=>le(e),onClose:()=>pe(null)}),(0,$.jsx)(Mt,{label:`分辨率`,value:ue,options:me.resolutions,expanded:fe===`resolution`,onToggle:()=>pe(fe===`resolution`?null:`resolution`),onSelect:e=>de(e),onClose:()=>pe(null)})]})]}),be==`image`&&h&&(0,$.jsx)(`div`,{style:{marginTop:24,borderRadius:12,background:`#f8f9fc`,width:`25%`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-around`},children:[(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`分辨率`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:h.imageSize||`-`})]}),(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`画面比例`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:h.imageProportion||`-`})]}),(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`画面尺寸`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:h.imagePx||`-`})]})]})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`文字积分`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#6366f1`},children:ge})]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:18},children:`+`}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:[`预估`,be===`image`?`图片`:`视频`,`积分`]}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#10b981`},children:be===`image`&&h.imageSize?gt(h.imageSize)||_t:Ie(oe,ue)})]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:18},children:`=`}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`总计`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16,color:`#1a1a2e`},children:(ge+(be===`image`?gt(h.imageSize):Ie(oe,ue))).toFixed(2)})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsxs)(vD,{size:`large`,onClick:()=>{m(!1),g(null),v(``),L(``),N([]),re({}),K(null),pe(null),n.resetFields()},style:{borderRadius:12,minWidth:120,height:44,fontWeight:500},children:[`配置新`,be===`image`?`图片`:`视频`]}),(0,$.jsx)($w,{title:vt?``:`积分不足`,children:(0,$.jsx)(vD,{type:`primary`,size:`large`,icon:(0,$.jsx)(L6,{}),onClick:()=>Ot(h.id),loading:w[h.id]===`generating`,disabled:!vt||w[h.id]===`generating`||w[h.id]===`done`,style:{borderRadius:12,minWidth:180,height:44,fontWeight:600,background:w[h.id]===`done`?`#10b981`:vt?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`:`#d1d5db`,border:`none`,boxShadow:vt?`0 8px 24px rgba(99,102,241,0.3)`:`none`},children:w[h.id]===`done`?`生成完成`:w[h.id]===`generating`?`生成中...`:`生成${be===`image`?`图片`:`视频`} (${be===`image`?gt(h.imageSize):Ie(oe,ue)}积分)`})})]})]}),h.references&&h.references.length>0&&(0,$.jsxs)(`div`,{style:{marginTop:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`参考内容`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:h.references.map((e,t)=>(0,$.jsxs)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,position:`relative`,cursor:`pointer`},onClick:()=>{e.type===`video`&&ae(`http://ceshi.apiforeign.minzhong.cn${e.url}`)},children:[e.type===`image`?(0,$.jsx)(xG,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},preview:!0}):(0,$.jsx)(c9,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,width:64,height:64}),(0,$.jsx)(T$,{style:{position:`absolute`,bottom:0,left:0,right:0,margin:0,fontSize:9,textAlign:`center`,borderRadius:`0 0 8px 8px`,background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,padding:`0 2px`},children:e.name})]},t))})]})]}),ft.length>0&&(0,$.jsxs)(`div`,{style:{marginTop:24},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,display:`block`,marginBottom:12},children:`本项目生成记录`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},className:`stagger-children`,children:ft.map((e,t)=>{let n=At(e),r=E[e.id]??(e.optimizedPrompt||e.originalPrompt),i=A===e.id,a=e.genType||`image`;return(0,$.jsxs)(`div`,{className:`animate-slideInCard`,style:{animationDelay:`${t*.05}s`},children:[(0,$.jsxs)(`div`,{className:`record-item`,onClick:()=>j(i?null:e.id),style:{padding:`12px 16px`,borderRadius:i?`12px 12px 0 0`:12,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,transition:`all 0.2s`,display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,background:a===`image`?`#fef3c7`:`#dbeafe`},children:a===`image`?(0,$.jsx)(p6,{style:{color:`#d97706`,fontSize:12}}):(0,$.jsx)(Y8,{style:{color:`#2563eb`,fontSize:12}})}),i?(0,$.jsx)(wQ,{style:{color:`#6366f1`,fontSize:11,flexShrink:0}}):(0,$.jsx)(t4,{style:{color:`#cbd5e1`,fontSize:11,flexShrink:0}}),(0,$.jsx)(T$,{color:jt[n]?.color,icon:jt[n]?.icon,style:{margin:0},children:jt[n]?.text}),(0,$.jsx)(Q.Text,{style:{flex:1,fontSize:13,color:`#475569`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:r}),n===`prompt_optimized`&&(0,$.jsx)(T$,{color:`processing`,style:{padding:`3px 10px`,fontSize:12,margin:0,flexShrink:0},children:`待配置`}),a===`image`?(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.imageSize}`:`-`,` ·`,` `,e.imageProportion||`-`,` ·`,` `,e.imagePx||`-`,` ·`,` `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:a9(e.createdAt)})]}):(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.duration}秒`:`-`,` ·`,` `,e.aspectRatio||`-`,` · `,e.resolution||`-`,` `,`·`,` `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:a9(e.createdAt)})]}),(0,$.jsx)(`div`,{className:`record-actions`,onClick:e=>e.stopPropagation(),children:(0,$.jsx)(DU,{children:n===`failed`&&(0,$.jsx)(vD,{type:`primary`,danger:!0,size:`small`,icon:(0,$.jsx)(S6,{}),loading:x[e.id],onClick:()=>kt(e.id),style:{borderRadius:8},children:`重试`})})})]}),i&&(0,$.jsx)(`div`,{style:{background:`#fff`,border:`1px solid #f0f0f5`,borderTop:`none`,borderRadius:`0 0 12px 12px`,padding:`18px 20px`,animation:`fadeInUp 0.25s ease both`},children:(0,$.jsxs)(`div`,{className:`gen-detail-row`,style:{display:`flex`,gap:20,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 50%`,minWidth:260},children:[(0,$.jsxs)(`div`,{style:{marginBottom:14},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.7},children:e.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:14},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,(n===`prompt_optimized`||n===`failed`)&&O!==e.id&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),O!==e.id&&(0,$.jsxs)(DU,{size:4,children:[(0,$.jsx)($w,{title:`复制`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(e1,{}),onClick:()=>{navigator.clipboard.writeText(r),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(n===`prompt_optimized`||n===`failed`)&&(0,$.jsx)($w,{title:`编辑`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(j$,{}),onClick:()=>{k(e.id),D(t=>({...t,[e.id]:t[e.id]??e.optimizedPrompt??``}))},style:{color:`#6366f1`}})})]})]}),O===e.id?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(nK.TextArea,{value:r,onChange:t=>D(n=>({...n,[e.id]:t.target.value})),rows:4,style:{borderRadius:10,fontSize:13,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(vD,{size:`small`,onClick:()=>k(null),children:`取消`}),(0,$.jsx)(vD,{size:`small`,type:`primary`,onClick:()=>{D(t=>({...t,[e.id]:r})),k(null),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:n===`prompt_optimized`?`rgba(99,102,241,0.02)`:`#f8f9fc`,border:n===`prompt_optimized`?`1px solid rgba(99,102,241,0.1)`:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:r})})]}),a===`image`?(0,$.jsx)(`div`,{style:{display:`flex`,gap:14,padding:`10px 14px`,borderRadius:10,background:`#f8f9fc`},children:[{label:`文字积分`,value:`${e.textCreditsCost||0}`},{label:`图片积分`,value:`${e.creditsCost||0}`},{label:`分辨率`,value:e.imageSize?`${e.imageSize}`:`-`},{label:`比例`,value:e.imageProportion||`-`},{label:`尺寸`,value:e.imagePx||`-`}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:13,color:`#1a1a2e`},children:e.value})]},t))}):(0,$.jsx)(`div`,{style:{display:`flex`,gap:14,padding:`10px 14px`,borderRadius:10,background:`#f8f9fc`},children:[{label:`文字积分`,value:`${e.textCreditsCost||0}`},{label:`视频积分`,value:`${e.creditsCost||0}`},{label:`时长`,value:e.duration?`${e.duration}秒`:`-`},{label:`比例`,value:e.aspectRatio||`-`},{label:`分辨率`,value:e.resolution||`-`}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:13,color:`#1a1a2e`},children:e.value})]},t))}),(e.references&&e.references.length>0||n===`failed`)&&(0,$.jsxs)(`div`,{style:{marginTop:14},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:[`参考素材`,` `,n===`failed`&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可删除/添加后重试)`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:[e.references?.map((t,r)=>(0,$.jsxs)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`visible`,border:`1px solid #e2e8f0`,position:`relative`,cursor:`pointer`},onClick:()=>{t.type===`video`&&ae(`http://ceshi.apiforeign.minzhong.cn${t.url}`)},children:[(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`hidden`},children:t.type===`image`?(0,$.jsx)(xG,{src:`http://ceshi.apiforeign.minzhong.cn${t.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},preview:!0}):(0,$.jsx)(c9,{src:`http://ceshi.apiforeign.minzhong.cn${t.url}`,width:64,height:64})}),(0,$.jsx)(T$,{style:{position:`absolute`,bottom:0,left:0,right:0,margin:0,fontSize:9,textAlign:`center`,borderRadius:`0 0 8px 8px`,background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,padding:`0 2px`},children:t.name}),n===`failed`&&(0,$.jsx)(`div`,{className:`ref-delete`,onClick:n=>{n.stopPropagation(),U5(t.url).catch(()=>{});let i=e.references.filter((e,t)=>t!==r);i9.getState().updateRecordReferences(e.id,i)},style:{position:`absolute`,top:-4,right:-4,width:16,height:16,borderRadius:`50%`,background:`rgba(239,68,68,0.8)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,opacity:0,transition:`opacity 0.15s`},children:(0,$.jsx)(s4,{style:{color:`#fff`,fontSize:10}})})]},r)),n===`failed`&&(0,$.jsx)(y0,{accept:`image/*,video/*`,showUploadList:!1,multiple:!0,beforeUpload:t=>{let n=t.type.startsWith(`image/`),r=t.type.startsWith(`video/`);return!n&&!r?(Z.error(`仅支持图片或视频文件`),!1):((n?V5:H5)(t).then(r=>{let i={url:r.url,type:n?`image`:`video`,name:t.name||(n?`图片`:`视频`)},a=e.references||[];i9.getState().updateRecordReferences(e.id,[...a,i]),Z.success(`上传成功`)}).catch(()=>Z.error(`上传失败`)),!1)},children:(0,$.jsx)($w,{title:`添加参考素材`,children:(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:10,border:`1.5px dashed #d9d9d9`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#d9d9d9`},children:(0,$.jsx)(gR,{style:{fontSize:18,color:`#94a3b8`}})})})})]})]})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 40%`,minWidth:220,position:`relative`},children:[n===`prompt_optimized`&&(0,$.jsxs)(`div`,{style:{marginTop:16,position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,backgroundColor:`transparent`},children:[a===`video`&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,flexWrap:`wrap`,marginBottom:12},children:[(0,$.jsxs)(`div`,{translate:`no`,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,marginLeft:12},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`时长`}),(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:13,color:`#6366f1`},children:[e.duration,`秒`]})]}),(0,$.jsx)(Mt,{label:`比例`,value:q[e.id]?.aspectRatio||`选择比例`,options:me.ratios,expanded:fe===`ratio-${e.id}`,onToggle:()=>pe(fe===`ratio-${e.id}`?null:`ratio-${e.id}`),onSelect:t=>ie(n=>({...n,[e.id]:{...n[e.id],aspectRatio:t,resolution:n[e.id]?.resolution||``}})),onClose:()=>pe(null)}),(0,$.jsx)(Mt,{label:`分辨率`,value:q[e.id]?.resolution||`选择分辨率`,options:me.resolutions,expanded:fe===`res-${e.id}`,onToggle:()=>pe(fe===`res-${e.id}`?null:`res-${e.id}`),onSelect:t=>ie(n=>({...n,[e.id]:{...n[e.id],aspectRatio:n[e.id]?.aspectRatio||``,resolution:t}})),onClose:()=>pe(null)})]}),(0,$.jsxs)(vD,{type:`primary`,size:`large`,icon:(0,$.jsx)(L6,{}),block:!0,loading:x[e.id],disabled:a===`video`&&(!q[e.id]?.aspectRatio||!q[e.id]?.resolution),onClick:async()=>{let t=q[e.id];if(a===`video`){if(!t?.aspectRatio||!t?.resolution){Z.error(`请选择比例和分辨率`);return}if(ht({...t,[e.id]:!0})),T(t=>({...t,[e.id]:`generating`}));let n=a===`video`?`视频`:`图片`;Z.loading({content:`「${pt}」正在生成${n}...`,duration:0,key:e.id});try{await c(e.id,{aspectRatio:t?.aspectRatio,resolution:t?.resolution}),T(t=>({...t,[e.id]:`done`})),Z.success({content:`「${pt}」${n}生成成功!`,key:e.id,duration:3})}catch{T(t=>({...t,[e.id]:`failed`})),Z.error({content:`「${pt}」${n}生成失败`,key:e.id,duration:3})}finally{C(t=>({...t,[e.id]:!1}))}},style:{borderRadius:12,fontWeight:600,color:`#fff`,height:48,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,position:`absolute`,bottom:18,left:0},children:[`生成`,a===`video`?`视频`:`图片`,a===`video`?(0,$.jsx)(`span`,{style:{color:`#d2d2d2`,fontSize:`14px`,marginLeft:`6px`},children:`(请选择上方的比例分辨率)`}):``,` `,a===`video`&&q[e.id]?.resolution?`(${Ie(e.duration||5,q[e.id].resolution)}积分)`:``,a===`image`&&e.imageSize?`(${Le(e.imageSize)}积分)`:a===`image`?`(积分)`:``]})]}),n===`failed`&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:18,right:20},children:(0,$.jsxs)(vD,{type:`primary`,danger:!0,size:`large`,icon:(0,$.jsx)(S6,{}),block:!0,loading:x[e.id],onClick:()=>kt(e.id),style:{borderRadius:12,fontWeight:600,height:48},children:[`重新生成`,a===`video`?`视频`:`图片`]})}),n===`generating`?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`linear-gradient(135deg, rgba(99,102,241,0.04), rgba(139,92,246,0.04))`,border:`1px dashed rgba(99,102,241,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10},children:[(0,$.jsx)(Xm,{style:{color:`#6366f1`,fontSize:28},spin:!0}),(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:[a===`video`?`视频`:`图片`,`生成中...`]})]}):n===`completed`&&e.videoUrl||e.imageUrl?(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,border:`1px solid #f0f0f5`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:10,right:10,zIndex:10},children:(0,$.jsx)($w,{title:`下载${a===`video`?`视频`:`图片`}`,children:(0,$.jsx)(vD,{size:`small`,icon:(0,$.jsx)(p0,{}),onClick:()=>{let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${a===`video`?e.videoUrl:e.imageUrl}&download=1`,t.download=`${e.projectName}${a===`video`?`.mp4`:`.png`}`,t.click()},style:{background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,backdropFilter:`blur(4px)`,borderRadius:8},children:`下载`})})}),(0,$.jsx)(`div`,{style:{minHeight:180,overflow:`hidden`},children:a===`video`?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.videoUrl}`,controls:!0,preload:`metadata`,style:{width:`100%`,height:`400px`,borderRadius:0}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.imageUrl}`,alt:e.projectName,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`,borderRadius:0}})}),(0,$.jsxs)(`div`,{style:{padding:`8px 12px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:`#fafbff`},children:[(0,$.jsxs)(DU,{children:[a===`video`?(0,$.jsx)(Y8,{style:{color:`#6366f1`,fontSize:13}}):(0,$.jsx)(p6,{style:{color:`#6366f1`,fontSize:13}}),(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#475569`},children:e.projectName})]}),e.generatedAt&&(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:11,color:`#94a3b8`},children:a9(e.generatedAt)})]})]}):n===`failed`?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`rgba(239,68,68,0.03)`,border:`1px dashed rgba(239,68,68,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10,padding:16},children:[(0,$.jsx)(s4,{style:{color:`#ef4444`,fontSize:28}}),(0,$.jsxs)(Q.Text,{style:{color:`#ef4444`,fontSize:14,fontWeight:600},children:[a===`video`?`视频`:`图片`,`生成失败`]}),e.errorMessage&&(0,$.jsx)(Q.Text,{style:{color:`#ef4444`,fontSize:12,textAlign:`center`,lineHeight:1.6},children:e.errorMessage})]}):(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`#f8f9fc`,border:`1px dashed #e2e8f0`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10},children:[(0,$.jsx)(OH,{style:{color:`#94a3b8`,fontSize:28}}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:a===`image`?`待生成图片`:n===`prompt_optimized`?`待配置视频参数`:`待生成视频`})]})]})]})})]},e.id)})})]}),(0,$.jsx)(Pq,{open:!!J,onCancel:()=>ae(null),footer:null,width:480,centered:!0,destroyOnClose:!0,closable:!1,title:null,styles:{body:{padding:0,background:`#000`,position:`relative`}},children:J&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:J,controls:!0,autoPlay:!0,style:{width:`100%`,display:`block`,maxHeight:`70vh`}}),(0,$.jsx)(`div`,{onClick:()=>ae(null),style:{position:`absolute`,top:8,right:8,width:28,height:28,borderRadius:`50%`,background:`rgba(0,0,0,0.6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,transition:`background 0.15s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(0,0,0,0.85)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(0,0,0,0.6)`},children:(0,$.jsx)(s4,{style:{color:`#fff`,fontSize:16}})})]})})]})},l9={optimizing:{color:`processing`,text:`优化中`,icon:(0,$.jsx)(Xm,{spin:!0})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,$.jsx)(OH,{})},generating:{color:`warning`,text:`生成中`,icon:(0,$.jsx)(Xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,$.jsx)(i4,{})},failed:{color:`error`,text:`失败`,icon:(0,$.jsx)(s4,{})}},_te=()=>{let{records:e,projects:t,fetchRecords:n,fetchProjects:r,generateVideo:i}=i9(),a=e.items,[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(10),[u,d]=(0,S.useState)({}),[f,p]=(0,S.useState)(void 0),[m,h]=(0,S.useState)(void 0),[g,_]=(0,S.useState)({}),[v,y]=(0,S.useState)(null),[b,x]=(0,S.useState)(null),[C,w]=(0,S.useState)(null);(0,S.useEffect)(()=>{r()},[r]),(0,S.useEffect)(()=>{n({projectId:f,status:m,page:o,pageSize:c})},[n,f,m,o,c]);let T=async()=>{if(!C)return;let{recordId:e,projectName:t,ratio:n,resolution:r}=C;d(t=>({...t,[e]:!0})),w(null),Z.loading({content:`「${t}」正在生成视频...`,duration:0,key:e});try{await i(e,{aspectRatio:n,resolution:r}),Z.success({content:`「${t}」视频生成成功!`,key:e,duration:3})}catch{Z.error({content:`「${t}」视频生成失败`,key:e,duration:3})}finally{d(t=>({...t,[e]:!1}))}},E=e=>{if((e.genType||`image`)===`image`){d(t=>({...t,[e.id]:!0})),Z.loading({content:`「${e.projectName}」正在生成图片...`,duration:0,key:e.id}),i(e.id,{}).then(()=>{Z.success({content:`「${e.projectName}」图片生成成功!`,key:e.id,duration:3})}).catch(()=>{Z.error({content:`「${e.projectName}」图片生成失败`,key:e.id,duration:3})}).finally(()=>{d(t=>({...t,[e.id]:!1}))});return}w({recordId:e.id,projectName:e.projectName,ratio:e.aspectRatio||`16:9`,resolution:e.resolution||`720p`})},D=a;return(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#94a3b8`},children:`查看所有视频生成记录,点击记录查看完整内容和视频`})}),(0,$.jsxs)(`div`,{className:`record-filter-bar animate-fadeInUp`,style:{display:`flex`,gap:12,marginBottom:20,padding:`14px 20px`,borderRadius:14,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(DU,{children:[(0,$.jsx)(K4,{style:{color:`#94a3b8`}}),(0,$.jsx)(lw,{placeholder:`全部项目`,allowClear:!0,style:{width:200},onChange:e=>{p(e),s(1)},children:t.map(e=>(0,$.jsx)(lw.Option,{value:e.id,children:e.name},e.id))}),(0,$.jsxs)(lw,{placeholder:`全部状态`,allowClear:!0,style:{width:140},onChange:e=>{h(e),s(1)},children:[(0,$.jsx)(lw.Option,{value:`prompt_optimized`,children:`待生成`}),(0,$.jsx)(lw.Option,{value:`generating`,children:`生成中`}),(0,$.jsx)(lw.Option,{value:`completed`,children:`已完成`}),(0,$.jsx)(lw.Option,{value:`failed`,children:`失败`})]})]}),(0,$.jsxs)(Q.Text,{style:{marginLeft:`auto`,lineHeight:`32px`,color:`#94a3b8`,fontSize:13},children:[`共 `,e.total,` 条记录`]})]}),D.length===0?(0,$.jsx)(NC,{image:NC.PRESENTED_IMAGE_SIMPLE,description:`暂无生成记录`,style:{padding:60}}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},className:`stagger-children`,children:D.map((e,t)=>{let n=v===e.id,r=g[e.id]??e.optimizedPrompt,i=u[e.id],a=b===e.id,o=e.genType||`image`;return(0,$.jsxs)(`div`,{className:`animate-slideInCard`,style:{animationDelay:`${t*.04}s`},children:[(0,$.jsxs)(`div`,{className:`record-item`,onClick:()=>x(a?null:e.id),style:{padding:`14px 20px`,borderRadius:a?`14px 14px 0 0`:14,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,transition:`all 0.2s`,display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,background:o===`image`?`#fef3c7`:`#dbeafe`},children:o===`image`?(0,$.jsx)(p6,{style:{color:`#d97706`,fontSize:12}}):(0,$.jsx)(Y8,{style:{color:`#2563eb`,fontSize:12}})}),a?(0,$.jsx)(wQ,{style:{color:`#6366f1`,fontSize:12,flexShrink:0}}):(0,$.jsx)(t4,{style:{color:`#cbd5e1`,fontSize:12,flexShrink:0}}),(0,$.jsx)(T$,{color:l9[e.status].color,icon:l9[e.status].icon,style:{margin:0},children:l9[e.status].text}),(0,$.jsx)(T$,{style:{background:`#f0f0ff`,border:`none`,color:`#6366f1`,margin:0},children:e.projectName}),(0,$.jsx)(Q.Text,{style:{flex:1,fontSize:13,color:`#475569`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:r}),o===`image`?(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.imageSize}`:`-`,` · `,e.imageProportion||`-`,` · `,e.imagePx||`-`,` · `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:a9(e.createdAt)})]}):(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.duration}秒`:`-`,` · `,e.aspectRatio||`-`,` · `,e.resolution||`-`,` · `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:a9(e.createdAt)})]}),(0,$.jsx)(`div`,{className:`record-actions`,onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(DU,{children:[e.status===`prompt_optimized`&&(0,$.jsx)(vD,{type:`primary`,size:`small`,icon:(0,$.jsx)(S6,{}),loading:i,onClick:()=>E(e),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`生成`}),e.status===`generating`&&(0,$.jsx)(T$,{color:`processing`,icon:(0,$.jsx)(Xm,{spin:!0}),style:{padding:`4px 12px`,fontSize:12},children:`生成中...`}),e.status===`failed`&&(0,$.jsx)(vD,{type:`primary`,danger:!0,size:`small`,icon:(0,$.jsx)(S6,{}),loading:i,onClick:()=>E(e),style:{borderRadius:8},children:`重试`})]})})]}),a&&(0,$.jsx)(`div`,{style:{background:`#fff`,border:`1px solid #f0f0f5`,borderTop:`none`,borderRadius:`0 0 14px 14px`,padding:`20px 24px`,animation:`fadeInUp 0.25s ease both`},children:(0,$.jsxs)(`div`,{className:`gen-detail-row`,style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 50%`,minWidth:280},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.7},children:e.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词 `,e.status===`prompt_optimized`&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!n&&(0,$.jsxs)(DU,{size:4,children:[(0,$.jsx)($w,{title:`复制`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(e1,{}),onClick:()=>{navigator.clipboard.writeText(r),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),e.status===`prompt_optimized`&&(0,$.jsx)($w,{title:`编辑`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(j$,{}),onClick:()=>{y(e.id),_(t=>({...t,[e.id]:t[e.id]??e.optimizedPrompt}))},style:{color:`#6366f1`}})})]})]}),n?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(nK.TextArea,{value:r,onChange:t=>_(n=>({...n,[e.id]:t.target.value})),rows:4,style:{borderRadius:10,fontSize:13,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(vD,{size:`small`,onClick:()=>y(null),children:`取消`}),(0,$.jsx)(vD,{size:`small`,type:`primary`,onClick:()=>{_(t=>({...t,[e.id]:r})),y(null),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:r})})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:16,padding:`12px 16px`,borderRadius:10,background:`#f8f9fc`},children:o===`image`?[{label:`分辨率`,value:e.imageSize?`${e.imageSize} `:`-`},{label:`画面比例`,value:e.imageProportion?`${e.imageProportion} `:`-`},{label:`画面尺寸`,value:e.imageProportion?`${e.imageProportion} `:`-`},{label:`消耗积分`,value:e.creditsCost?`${e.creditsCost} `:`-`,highlight:!!e.creditsCost}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:e.highlight?`#6366f1`:`#1a1a2e`},children:e.value})]},t)):[{label:`时长`,value:e.duration?`${e.duration} 秒`:`-`},{label:`画面比例`,value:e.aspectRatio||(e.status===`prompt_optimized`?`待选择`:`-`)},{label:`分辨率`,value:e.resolution||(e.status===`prompt_optimized`?`待选择`:`-`)},{label:`消耗积分`,value:e.creditsCost?`${e.creditsCost}`:`-`,highlight:!!e.creditsCost}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:e.highlight?`#6366f1`:`#1a1a2e`},children:e.value})]},t))}),e.status===`prompt_optimized`&&(0,$.jsx)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:(0,$.jsx)(vD,{type:`primary`,size:`large`,icon:(0,$.jsx)(L6,{}),loading:i,onClick:()=>E(e),style:{borderRadius:12,fontWeight:600,height:44,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.3)`},children:o===`video`?`选择参数生成视频`:`生成图片`})}),e.status===`failed`&&(0,$.jsx)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:(0,$.jsxs)(vD,{type:`primary`,danger:!0,size:`large`,icon:(0,$.jsx)(S6,{}),loading:i,onClick:()=>E(e),style:{borderRadius:12,fontWeight:600,height:44},children:[`重新生成`,o===`video`?`视频`:`图片`]})})]}),(0,$.jsx)(`div`,{style:{flex:`1 1 40%`,minWidth:240},children:e.status===`generating`?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`linear-gradient(135deg, rgba(99,102,241,0.04), rgba(139,92,246,0.04))`,border:`1px dashed rgba(99,102,241,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(Xm,{style:{color:`#6366f1`,fontSize:32},spin:!0}),(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:[o===`video`?`视频`:`图片`,`生成中...`]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:12},children:`请耐心等待,生成完成后将自动展示`})]}):e.status===`completed`&&(e.videoUrl||e.imageUrl)?(0,$.jsxs)(`div`,{style:{borderRadius:14,overflow:`hidden`,border:`1px solid #f0f0f5`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:10,right:10,zIndex:10},children:(0,$.jsx)($w,{title:`下载${o===`video`?`视频`:`图片`}`,children:(0,$.jsx)(vD,{size:`small`,icon:(0,$.jsx)(p0,{}),onClick:()=>{let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${o===`video`?e.videoUrl:e.imageUrl}&download=1`,t.download=`${e.projectName}${o===`video`?`.mp4`:`.png`}`,t.click()},style:{background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,backdropFilter:`blur(4px)`,borderRadius:8},children:`下载`})})}),(0,$.jsx)(`div`,{style:{minHeight:280,overflow:`hidden`},children:o===`video`?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.videoUrl}`,controls:!0,preload:`metadata`,style:{width:`100%`,height:`400px`,display:`block`}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.imageUrl}`,alt:e.projectName,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`,display:`block`}})}),(0,$.jsxs)(`div`,{style:{padding:`10px 14px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:`#fafbff`},children:[(0,$.jsxs)(DU,{children:[o===`video`?(0,$.jsx)(Y8,{style:{color:`#6366f1`}}):(0,$.jsx)(p6,{style:{color:`#6366f1`}}),(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#475569`},children:e.projectName})]}),e.generatedAt&&(0,$.jsxs)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:12,color:`#94a3b8`},children:[`生成于 `,a9(e.generatedAt)]})]})]}):e.status===`failed`?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`rgba(239,68,68,0.03)`,border:`1px dashed rgba(239,68,68,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(s4,{style:{color:`#ef4444`,fontSize:32}}),(0,$.jsxs)(Q.Text,{style:{color:`#ef4444`,fontSize:14},children:[o===`video`?`视频`:`图片`,`生成失败`]}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:12},children:`请在左侧点击重新生成`})]}):(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`#f8f9fc`,border:`1px dashed #e2e8f0`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(OH,{style:{color:`#94a3b8`,fontSize:32}}),(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:[`待生成`,o===`video`?`视频`:`图片`]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:12},children:`点击左侧生成按钮开始生成`})]})})]})})]},e.id)})}),e.total>0&&(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:18},children:(0,$.jsx)(HK,{current:e.page||o,pageSize:e.pageSize||c,total:e.total,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{s(e),l(t)}})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(L6,{}),`生成视频`]}),open:!!C,onCancel:()=>w(null),onOk:T,okText:`提交生成`,cancelText:`取消`,width:420,children:C&&(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:(()=>{let e=a.find(e=>e.id===C.recordId);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`时长`}),(0,$.jsxs)(Q.Text,{strong:!0,children:[e?.duration||5,`秒`]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`画面比例`}),(0,$.jsx)(lw,{value:C.ratio,onChange:e=>w(t=>t?{...t,ratio:e}:null),style:{width:`100%`},options:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`].map(e=>({value:e,label:e}))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`分辨率`}),(0,$.jsx)(lw,{value:C.resolution,onChange:e=>w(t=>t?{...t,resolution:e}:null),style:{width:`100%`},options:[`480p`,`720p`,`1080p`].map(e=>({value:e,label:e}))})]})]})})()})})]})},u9=({value:e,duration:t=1200})=>{let[n,r]=(0,S.useState)(0),i=(0,S.useRef)(0);return(0,S.useEffect)(()=>{let a=n,o=e-a;if(o===0)return;let s=performance.now(),c=e=>{let n=e-s,l=Math.min(n/t,1);r(a+o*(1-(1-l)**3)),l<1&&(i.current=requestAnimationFrame(c))};return i.current=requestAnimationFrame(c),()=>cancelAnimationFrame(i.current)},[e]),(0,$.jsx)($.Fragment,{children:n.toLocaleString()})},vte=()=>{let{user:e}=$7(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(1),[s,c]=(0,S.useState)(10),[l,u]=(0,S.useState)(0);(0,S.useEffect)(()=>{(async()=>{i(!0);let e=await K5(a,s);n(e.records),u(e.total),i(!1)})()},[a,s]);let d=(e,t)=>{o(e),c(t)},f=t.filter(e=>e.type===`recharge`).reduce((e,t)=>e+t.amount,0),p=t.filter(e=>e.type===`consume`).reduce((e,t)=>e+Math.abs(t.amount),0);return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(wJ,{gutter:[16,16],style:{marginBottom:24},children:[(0,$.jsx)(fV,{xs:24,sm:8,children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:16,padding:24,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-20,top:-20,width:120,height:120,borderRadius:`50%`,background:`rgba(255,255,255,0.1)`}}),(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsxs)(DU,{style:{marginBottom:10},children:[(0,$.jsx)(Q8,{style:{color:`rgba(255,255,255,0.8)`,fontSize:16}}),(0,$.jsx)(`span`,{style:{color:`rgba(255,255,255,0.8)`,fontSize:14},children:`当前可用积分`})]}),(0,$.jsx)(`div`,{style:{color:`#fff`,fontSize:38,fontWeight:800,lineHeight:1},children:(0,$.jsx)(u9,{value:e?.credits??0})})]})]})}),(0,$.jsx)(fV,{xs:12,sm:8,children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:16,padding:24,background:`#fff`,border:`1px solid #f0f0f5`,animationDelay:`0.06s`},children:[(0,$.jsxs)(DU,{style:{marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:`rgba(16,185,129,0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(y2,{style:{color:`#10b981`,fontSize:14}})}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:14},children:`累计获得`})]}),(0,$.jsx)(`div`,{style:{color:`#10b981`,fontSize:28,fontWeight:800},children:(0,$.jsx)(u9,{value:f})})]})}),(0,$.jsx)(fV,{xs:12,sm:8,children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:16,padding:24,background:`#fff`,border:`1px solid #f0f0f5`,animationDelay:`0.12s`},children:[(0,$.jsxs)(DU,{style:{marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:`rgba(239,68,68,0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(p2,{style:{color:`#ef4444`,fontSize:14}})}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:14},children:`累计消耗`})]}),(0,$.jsx)(`div`,{style:{color:`#ef4444`,fontSize:28,fontWeight:800},children:(0,$.jsx)(u9,{value:p})})]})})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{animationDelay:`0.15s`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(j8,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`积分明细`})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(f$,{columns:[{title:`类型`,dataIndex:`type`,key:`type`,width:100,render:e=>(0,$.jsx)(T$,{color:e===`recharge`?`green`:`orange`,icon:e===`recharge`?(0,$.jsx)(y2,{}):(0,$.jsx)(p2,{}),children:e===`recharge`?`充值`:`消费`})},{title:`积分变动`,dataIndex:`amount`,key:`amount`,width:120,render:e=>(0,$.jsxs)(Q.Text,{strong:!0,style:{color:e>0?`#10b981`:`#ef4444`,fontSize:15},children:[e>0?`+`:``,e]})},{title:`说明`,dataIndex:`description`,key:`description`},{title:`时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,style:{color:`#94a3b8`},children:a9(e)})}],dataSource:t,rowKey:`id`,loading:r,pagination:{current:a,pageSize:s,total:l,onChange:d,showSizeChanger:!0,showTotal:e=>`共 ${e} 条`},scroll:{x:500}})})]})]})},yte=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(1),[u]=(0,S.useState)(10);(0,S.useEffect)(()=>{d()},[c]);let d=async()=>{t(!0);try{let e=await K5(c,u);r(e.records||[]),a(e.credits||0),s(e.total||0)}catch{r([])}t(!1)};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(wJ,{gutter:[16,16],style:{marginBottom:24},children:[(0,$.jsx)(fV,{xs:24,sm:8,children:(0,$.jsxs)(`div`,{style:{borderRadius:16,padding:24,background:`linear-gradient(135deg, #f59e0b 0%, #ea580c 100%)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-20,top:-20,width:120,height:120,borderRadius:`50%`,background:`rgba(255,255,255,0.1)`}}),(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:10},children:[(0,$.jsx)(Q8,{style:{color:`rgba(255,255,255,0.8)`,fontSize:16}}),(0,$.jsx)(`span`,{style:{color:`rgba(255,255,255,0.8)`,fontSize:14},children:`可用积分`})]}),(0,$.jsx)(`div`,{style:{color:`#fff`,fontSize:38,fontWeight:800,lineHeight:1},children:i.toLocaleString()})]})]})}),(0,$.jsx)(fV,{xs:12,sm:8,children:(0,$.jsxs)(`div`,{style:{borderRadius:16,padding:24,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:`rgba(16,185,129,0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(T6,{style:{color:`#10b981`,fontSize:14}})}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:14},children:`累计获得`})]}),(0,$.jsx)(`div`,{style:{color:`#10b981`,fontSize:28,fontWeight:800},children:n.filter(e=>e.amount>0).reduce((e,t)=>e+t.amount,0).toLocaleString()})]})}),(0,$.jsx)(fV,{xs:12,sm:8,children:(0,$.jsxs)(`div`,{style:{borderRadius:16,padding:24,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:`rgba(239,68,68,0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(j8,{style:{color:`#ef4444`,fontSize:14}})}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:14},children:`累计消耗`})]}),(0,$.jsx)(`div`,{style:{color:`#ef4444`,fontSize:28,fontWeight:800},children:n.filter(e=>e.amount<0).reduce((e,t)=>e+Math.abs(t.amount),0).toLocaleString()})]})})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(j8,{style:{color:`#f59e0b`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`积分明细`})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(lq,{spinning:e,children:n.length===0?(0,$.jsx)(NC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无积分变动记录`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(f$,{dataSource:n,columns:[{title:`变动类型`,dataIndex:`type`,key:`type`,width:120,render:e=>{let t={recharge:{color:`#10b981`,label:`充值`,bg:`rgba(16,185,129,0.1)`},consume:{color:`#ef4444`,label:`消费`,bg:`rgba(239,68,68,0.1)`},admin:{color:`#f59e0b`,label:`管理员调整`,bg:`rgba(245,158,11,0.1)`},refund:{color:`#8b5cf6`,label:`退款`,bg:`rgba(139,92,246,0.1)`}}[e]||{color:`#64748b`,label:e,bg:`rgba(100,116,139,0.1)`};return(0,$.jsx)(T$,{color:t.color,style:{background:t.bg,fontWeight:500,padding:`4px 12px`},children:t.label})}},{title:`描述`,dataIndex:`description`,key:`description`,ellipsis:!0},{title:`变动积分`,dataIndex:`amount`,key:`amount`,width:120,align:`right`,render:e=>(0,$.jsxs)(Q.Text,{strong:!0,style:{fontWeight:700,color:e>0?`#10b981`:`#ef4444`,fontSize:15},children:[e>0?`+`:``,e]})},{title:`创建时间`,key:`createdAt`,width:180,render:(e,t)=>{let n=t.created_at||t.createdAt||t.create_time||t.createTime;return n?new Date(n).toLocaleString(`zh-CN`):`-`}}],rowKey:`id`,pagination:!1,bordered:!1}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(HK,{current:c,pageSize:u,total:o,onChange:e=>{l(e)},size:`small`})})]})})})]})]})},bte=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(1),[c]=(0,S.useState)(10);(0,S.useEffect)(()=>{l()},[o]);let l=async()=>{t(!0);try{let e=await a7(o,c);r(e.items||[]),a(e.total||0)}catch{r([])}t(!1)};return(0,$.jsx)(`div`,{children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(MU,{style:{color:`#0ea5e9`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`订单记录`}),(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:[`共 `,n.length,` 条记录`]})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(lq,{spinning:e,children:n.length===0?(0,$.jsx)(NC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无订单记录`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(f$,{dataSource:n,columns:[{title:`订单号`,key:`orderNo`,width:200,render:(e,t)=>(0,$.jsx)(`span`,{style:{fontFamily:`monospace`,fontSize:13,color:`#64748b`},children:t.order_no||t.orderNo||t.id})},{title:`支付方式`,key:`paymentMethod`,width:100,render:(e,t)=>{let n=t.payment_method||t.paymentMethod||`wechat`,r={alipay:{icon:(0,$.jsx)(i2,{style:{fontSize:16}}),label:`支付宝`,color:`#1677ff`},wechat:{icon:(0,$.jsx)(i5,{style:{fontSize:16}}),label:`微信支付`,color:`#07c160`}},i=r[n]||r.wechat;return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{color:i.color},children:i.icon}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#374151`},children:i.label})]})}},{title:`金额`,key:`amount`,width:100,align:`right`,render:(e,t)=>{let n=t.amount||t.total_amount||0;return(0,$.jsxs)(Q.Text,{strong:!0,style:{fontWeight:700,fontSize:14,color:`#1e293b`},children:[`¥`,n]})}},{title:`获得积分`,key:`credits`,width:100,align:`center`,render:(e,t)=>{let n=t.credits||t.credit_amount||0;return(0,$.jsx)(Q.Text,{strong:!0,style:{fontWeight:600,fontSize:14,color:`#f59e0b`},children:n})}},{title:`状态`,key:`status`,width:100,render:(e,t)=>{let n=t.status||`pending`,r={pending:{color:`#f59e0b`,label:`待支付`,bg:`rgba(245,158,11,0.1)`},paid:{color:`#10b981`,label:`已支付`,bg:`rgba(16,185,129,0.1)`},refunded:{color:`#94a3b8`,label:`已退款`,bg:`rgba(148,163,184,0.1)`},failed:{color:`#ef4444`,label:`支付失败`,bg:`rgba(239,68,68,0.1)`},cancelled:{color:`#64748b`,label:`已取消`,bg:`rgba(100,116,139,0.1)`},processing:{color:`#0ea5e9`,label:`处理中`,bg:`rgba(14,165,233,0.1)`}}[n]||{color:`#64748b`,label:n,bg:`rgba(100,116,139,0.1)`};return(0,$.jsx)(T$,{color:r.color,style:{background:r.bg,fontWeight:500,padding:`4px 12px`},children:r.label})}},{title:`创建时间`,key:`createdAt`,width:180,render:(e,t)=>{let n=t.created_at||t.createdAt;return n?new Date(n).toLocaleString(`zh-CN`):`-`}},{title:`支付时间`,key:`paidAt`,width:180,render:(e,t)=>{let n=t.paid_at||t.paidAt;return n?new Date(n).toLocaleString(`zh-CN`):`-`}}],rowKey:`order_no`,pagination:!1,bordered:!1}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(HK,{current:o,pageSize:c,total:i,onChange:e=>{s(e)},size:`small`})})]})})})]})})},xte=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(1),[u]=(0,S.useState)(10);(0,S.useEffect)(()=>{d(),f()},[c]);let d=async()=>{t(!0);try{let e=await Z5(c,u);r(e.items||[]),s(e.total||0)}catch{r([])}t(!1)},f=async()=>{try{a(await Q5())}catch{a(0)}},p=async e=>{try{await $5(e),d(),f()}catch{}};return(0,$.jsx)(`div`,{children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(P2,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`消息中心`}),(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:[`未读 `,i,` 条`]})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(lq,{spinning:e,children:n.length===0?(0,$.jsx)(NC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无消息`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(f$,{dataSource:n,columns:[{title:`类型`,dataIndex:`type`,key:`type`,width:100,render:e=>{let t={system:{color:`#6366f1`,label:`系统`,bg:`rgba(99,102,241,0.1)`,icon:(0,$.jsx)(Y6,{style:{fontSize:14}})},credit:{color:`#f59e0b`,label:`积分`,bg:`rgba(245,158,11,0.1)`,icon:(0,$.jsx)(Q8,{style:{fontSize:14}})},promo:{color:`#8b5cf6`,label:`活动`,bg:`rgba(139,92,246,0.1)`,icon:(0,$.jsx)(i3,{style:{fontSize:14}})}},n=t[e]||t.system;return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{color:n.color},children:n.icon}),(0,$.jsx)(`span`,{style:{fontSize:13,color:n.color,fontWeight:500},children:n.label})]})}},{title:`标题`,dataIndex:`title`,key:`title`,ellipsis:!0},{title:`内容`,dataIndex:`content`,key:`content`,ellipsis:!0},{title:`状态`,dataIndex:`isRead`,key:`isRead`,width:80,render:(e,t)=>e??t.is_read?(0,$.jsx)(T$,{color:`gray`,style:{background:`rgba(148,163,184,0.1)`},children:`已读`}):(0,$.jsx)(T$,{color:`purple`,style:{background:`rgba(139,92,246,0.1)`},children:`未读`})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>{if(!e)return`-`;let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/(1e3*60*60));if(r<1)return`刚刚`;if(r<24)return`${r}小时前`;let i=Math.floor(r/24);return i<7?`${i}天前`:t.toLocaleDateString(`zh-CN`)}},{title:`操作`,key:`action`,width:100,render:(e,t)=>t.isRead??t.is_read?null:(0,$.jsx)(vD,{type:`text`,size:`small`,onClick:()=>p(t.id),style:{color:`#6366f1`},children:`标记已读`})}],rowKey:`id`,pagination:!1,bordered:!1}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(HK,{current:c,pageSize:u,total:o,onChange:e=>{l(e)},size:`small`})})]})})})]})})},d9=()=>{let[e]=Dn(),[t,n]=(0,S.useState)(`credits`);return(0,S.useEffect)(()=>{(e.get(`tab`)||`credits`)===`orders`?n(`orders`):n(`credits`)},[e]),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(mz,{activeKey:t,onChange:n,items:[{key:`credits`,label:`积分明细`},{key:`orders`,label:`订单记录`}],style:{marginBottom:24},size:`large`}),t===`credits`&&(0,$.jsx)(yte,{}),t===`orders`&&(0,$.jsx)(bte,{})]})},Ste=`/assets/bg1-CQh9PRPW.png`,Cte=`/assets/bg2-CNoKndHs.png`,{Header:wte,Sider:Tte,Content:Ete}=dK,{TextArea:Dte}=nK,{Option:f9}=lw,{Text:p9}=Q,Ote=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(`1`),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(``),{mediaType:c,countType:l,selectedRatio:u,selectedResolution:d,width:f,height:p,videoDuration:m,videoAspectRatio:h,videoResolution:g,engineOptions:_,enginesele:v,setMediaType:y,setCountType:b,setSelectedRatio:x,setSelectedResolution:C,setWidth:w,setHeight:T,setVideoDuration:E,setVideoAspectRatio:D,setVideoResolution:O,setEngineOptions:k,setEnginesele:A}=i9(),[j,M]=(0,S.useState)(!1),[N,P]=(0,S.useState)(!1),[F,I]=(0,S.useState)([]),[L,R]=(0,S.useState)(!1),[z,B]=(0,S.useState)(``),[V,H]=(0,S.useState)(`image`),U=(0,S.useRef)(null),[ee,te]=(0,S.useState)(new Set),ne=e=>{if(!e)return null;try{let t=new URL(e).searchParams.get(`exp`);return t?parseInt(t,10):null}catch{try{let t=e.indexOf(`?`);if(t!==-1){let n=e.substring(t+1),r=new URLSearchParams(n).get(`exp`);if(r)return parseInt(r,10)}return null}catch{return null}}},W=e=>{let t=ne(e);return t?Math.floor(Date.now()/1e3)>t:!1},[re,G]=(0,S.useState)(!1),[K,q]=(0,S.useState)(``),[ie,J]=(0,S.useState)(`image`),[ae,oe]=(0,S.useState)(``),[se,ce]=(0,S.useState)(!1),[le,ue]=(0,S.useState)(null),[de,fe]=(0,S.useState)({x:0,y:0}),[pe,me]=(0,S.useState)(!1),[he,ge]=(0,S.useState)(!1),[_e,ve]=(0,S.useState)([]),[ye,be]=(0,S.useState)([]),[xe,Se]=(0,S.useState)([]),[Ce,we]=(0,S.useState)(0),[Te,Ee]=(0,S.useState)(0),[De,Oe]=(0,S.useState)(!1),[ke,Ae]=(0,S.useState)([]),[je,Me]=(0,S.useState)([]),[Ne,Pe]=(0,S.useState)([]),Fe=()=>{let e={};return e=Ne.find(e=>e.modelConfigId===l&&e.genType===c&&e.resolution===(c===`video`?g:d)),e||(c===`video`?(e={perSecondCredits:2,baseCredits:60,ratio:1},g===`1080p`?e.ratio=2:g===`720p`?e.ratio=1.5:g===`480p`&&(e.ratio=1)):(e={perSecondCredits:.1,baseCredits:4,ratio:1},d===`2K`?e.ratio=1:d===`4K`&&(e.ratio=2))),c===`video`?Math.round((m*e.perSecondCredits+e.baseCredits)*e.ratio):e.baseCredits*e.ratio},Ie=(0,S.useRef)(null),Le=(0,S.useRef)(null),Re=(0,S.useRef)(null);(0,S.useRef)(!0),i.find(e=>e.id===n);let[ze,Be]=(0,S.useState)([]),[Ve,He]=(0,S.useState)({page:1,pageSize:20}),[Ue,We]=(0,S.useState)(0),[Ge,Ke]=(0,S.useState)(!1),qe=(0,S.useRef)(!1),Je=(0,S.useCallback)((e=`instant`)=>{let t=Le.current;t&&requestAnimationFrame(()=>{t.scrollTo({top:t.scrollHeight,behavior:e})})},[]);(0,S.useEffect)(()=>{if(ze.length>0&&!qe.current){let e=setTimeout(()=>{Je(`smooth`),qe.current=!0},300);return()=>clearTimeout(e)}},[ze.length,Je]),(0,S.useEffect)(()=>{let e=c===`image`?v.image:v.video;e&&e.length>0&&(e.some(e=>e.id===l)||b(e[0].id))},[c,v]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;De&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&Oe(!1),pe&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&me(!1),he&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&ge(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[De,pe,he]),(0,S.useEffect)(()=>{l7().then(e=>{if(A(e.engine),e.engine.video&&e.engine.video.length>0){let t=e.engine.video[0],n=e.engine.video.find(e=>e.id===l)||t;k({ratios:n.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:n.supportedResolutions||[`480p`,`720p`,`1080p`],durations:n.supportedDurations||[5,8,10,12,15]}),n.supportedRatios?.includes(h)||D(n.supportedRatios?.[0]||`16:9`),n.supportedResolutions?.includes(g)||O(n.supportedResolutions?.[0]||`720p`),n.supportedDurations?.includes(m)||E(n.supportedDurations?.[0]||5),l===`请选择`&&b(n.id)}}).catch(()=>{}),c7().then(e=>{Ae(e.video||[]),Me(e.image||[])}).catch(e=>{}),h7().then(e=>{Pe(e)}),d7(Ve).then(e=>{let t=e.items,n=e.total;Be(t),We(n)}),Y5().then(e=>{let t=e.items?.[0]?.supportedSizes||{},n=[],r=[],i=[];for(let e in t[`2K`])n.push(e),r.push(t[`2K`][e]);ve(n.map((e,t)=>({value:e,label:String(t)})));for(let e in t[`4K`])i.push(t[`4K`][e]);Se([r,i]),be([{value:`2K`,label:`高清 2K`},{value:`4K`,label:`超清 4K`}])}).catch(()=>{})},[]),(0,S.useEffect)(()=>{if(Re.current&&=(clearInterval(Re.current),null),ze.some(e=>e.status===`generating`))return Re.current=window.setInterval(()=>{d7(Ve).then(e=>{Be(t=>t.map(t=>t.status===`generating`&&e.items.find(e=>e.id===t.id)||t)),We(e.total)}).catch(e=>{})},1e4),()=>{Re.current&&=(clearInterval(Re.current),null)}},[ze,Ve]),(0,S.useEffect)(()=>{if(!pe)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&me(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[pe]),(0,S.useEffect)(()=>{if(!he)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&ge(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[he]),(0,S.useEffect)(()=>{xe[Te]&&xe[Te][Ce]!==void 0&&(w(Number(xe[Te][Ce].substring(0,4))),T(Number(xe[Te][Ce].substring(5))))},[Ce]),(0,S.useEffect)(()=>{xe[Te]&&xe[Te][Ce]!==void 0&&(w(Number(xe[Te][Ce].substring(0,4))),T(Number(xe[Te][Ce].substring(5))))},[Te]);let Ye=e=>{we(e)},Xe=e=>{Ee(parseInt(e===`2K`?`0`:`1`))},Ze=()=>{w(p),T(f)},Qe=async()=>{if(!o.trim()&&F.length===0){Z.warning(`请输入内容或上传图片/视频`);return}let e={id:``,gen_type:c,original_prompt:o.trim(),engine_id:l,idempotency_key:new Date().toLocaleString(`zh-CN`),media_references:F.length>0?[...F]:void 0,...c===`image`&&{image_size:d,image_proportion:u,image_px:f+`x`+p},...c===`video`&&{duration:m,aspect_ratio:h,resolution:g}};P(!0),u7(e).then(()=>{s(``),I([]);let e={...Ve,page:1};He(e),d7(e).then(e=>{Be(t=>[...t,e.items[e.items.length-1]]),We(e.total),setTimeout(()=>{Ie.current?.scrollIntoView({behavior:`smooth`})},100)}).catch(e=>{})}).catch(e=>{let t=`创建任务失败`;e?.response?.data?.detail?t=e.response.data.detail:e?.data?.detail?t=e.data.detail:e?.detail?t=e.detail:e?.message&&(t=e.message),Z.error({content:t,duration:3})}).finally(()=>{P(!1)}),setTimeout(()=>{P(!1)},3e3)},$e=async()=>{if(ze.length>=Ue)return;let e=Le.current;if(!e)return;let t=e.scrollTop,n=e.scrollHeight;Ke(!0);try{let r=Ve.page+1,i=await d7({...Ve,page:r}),a=Array.isArray(i)?{items:i,total:i.length}:i;a.total&&We(a.total),He(e=>({...e,page:r})),Be(e=>{let t=new Set(e.map(e=>e.id));return[...a.items.filter(e=>!e.id||t.has(e.id)?!1:(t.add(e.id),!0)),...e]}),setTimeout(()=>{e.scrollTop=t+(e.scrollHeight-n)},200)}catch{}finally{Ke(!1)}},et=async e=>{let t=e.type.startsWith(`image/`),n=e.type.startsWith(`video/`);if(!t&&!n)return Z.error(`仅支持图片或视频文件`),!1;let r=n?100:10;if(e.size/1024/1024>r)return Z.error(`${n?`视频`:`图片`}大小不能超过${r}MB`),!1;let i=F.filter(e=>e.type===`image`).length;if(t&&i>=4)return Z.error(`最多上传4张图片`),!1;let a=F.filter(e=>e.type===`video`).length;if(n&&a>=1)return Z.error(`最多上传1个视频`),!1;M(!0);try{let n=await(t?V5:H5)(e);I(r=>[...r,{name:e.name,type:t?`image`:`video`,url:n.url}]),Z.success(`${t?`图片`:`视频`}上传成功`)}catch{Z.error(`上传失败`)}finally{M(!1)}return!1},tt=e=>{I(t=>t.filter((t,n)=>n!==e))},nt=e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),Qe())},rt=()=>{R(!1),B(``),U.current&&U.current.pause()},it=e=>{if(e.preventDefault(),e.stopPropagation(),!z)return;let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${z}&download=1`,t.download=V===`image`?`image.png`:`video.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)};return(0,$.jsxs)(dK,{style:{margin:`-24px -32px -32px`,borderRadius:20,height:`calc(100vh - 34px)`,background:`linear-gradient(135deg, #f8fafc 0%, #f0f4ff 50%, #faf5ff 100%)`,backgroundImage:`url(${Cte})`,backgroundRepeat:`no-repeat`,backgroundSize:`100% 100%`,backgroundPosition:`center`},children:[!1,(0,$.jsxs)(dK,{style:{display:`flex`,flex:1,background:`transparent`},children:[(0,$.jsx)(wte,{style:{borderRadius:`20px 20px 0 0`,background:`rgba(255,255,255,0.1)`,backdropFilter:`blur(20px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`0 24px`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:36,height:36,borderRadius:12,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(P6,{style:{fontSize:18,color:`#fff`}})}),(0,$.jsx)(`div`,{children:(0,$.jsx)(p9,{strong:!0,style:{fontSize:16,background:`linear-gradient(90deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`开启创作`})})]})}),(0,$.jsxs)(Ete,{style:{flex:1,margin:0,padding:24,boxSizing:`border-box`,display:`flex`,flexDirection:`column`,overflow:`hidden`,minHeight:0},children:[ze.length===0&&(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,borderRadius:50,background:`linear-gradient(135deg, #6366f1 0%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,marginBottom:16},children:(0,$.jsx)(P6,{style:{fontSize:40,color:`#fff`}})}),(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:500,color:`#333`},children:`你好,想创作什么?`}),(0,$.jsx)(`p`,{style:{margin:8,fontSize:13,color:`#999`},children:`输入想法、剧本或上传参考,开始你的创作之旅`})]}),ze.length>0&&(0,$.jsxs)(`div`,{ref:Le,style:{flex:1,overflowY:`auto`,paddingRight:8},children:[(0,$.jsx)(`div`,{style:{padding:`8px 0`,textAlign:`center`,marginBottom:16},children:ze.length>=Ue?(0,$.jsx)(`span`,{style:{fontSize:12,color:`#999`},children:`消息全部加载`}):(0,$.jsx)(`button`,{onClick:$e,disabled:Ge,style:{fontSize:12,color:`#6366f1`,background:`none`,border:`none`,cursor:Ge?`not-allowed`:`pointer`},children:Ge?`加载中...`:`加载更多`})}),(()=>{let e=Z;return ze.map(t=>(0,$.jsx)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`flex-start`,marginBottom:16},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:36,height:36,borderRadius:12,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},children:(0,$.jsx)(P6,{style:{color:`#fff`,fontSize:16}})}),(0,$.jsx)(`div`,{style:{flex:1},children:(0,$.jsxs)(`div`,{style:{background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:`16px 16px 16px 4px`,padding:`12px 16px`,width:`70%`,minWidth:500,boxSizing:`border-box`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.08), 0 1px 3px rgba(0,0,0,0.04)`,position:`relative`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:[(0,$.jsxs)(`div`,{style:{margin:4,fontSize:11,color:`#999`,textAlign:`left`,display:`flex`,flexWrap:`wrap`,gap:8,alignItems:`center`},children:[(0,$.jsx)(`span`,{children:t.createdAt?.replace(`T`,` `).split(`.`)[0]}),(0,$.jsx)(`span`,{style:{background:t.genType===`image`?`rgba(34, 197, 94, 0.12)`:`rgba(249, 115, 22, 0.12)`,color:t.genType===`image`?`#22c55e`:`#f97316`,padding:`2px 8px`,borderRadius:12,fontWeight:500,fontSize:11,marginLeft:8},children:t.genType===`image`?`图片生成`:`视频生成`})]}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,zIndex:100},children:(0,$.jsx)(Rq,{title:`确定要删除吗?`,onConfirm:async()=>{try{await m7(t.id),e.success(`删除成功`),Be(e=>e.filter(e=>e.id!==t.id)),We(e=>e-1)}catch(t){let n=t?.response?.data?.message||t?.message||`删除失败`;e.error(n)}},okText:`确定`,cancelText:`取消`,children:(0,$.jsx)(`button`,{onClick:e=>e.stopPropagation(),style:{width:28,height:28,borderRadius:8,border:`none`,background:`rgba(99, 102, 241, 0.08)`,color:`#6366f1`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s ease`,padding:0},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`,e.currentTarget.style.color=`#ef4444`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.08)`,e.currentTarget.style.color=`#6366f1`},children:(0,$.jsx)(O$,{style:{fontSize:12}})})})}),(t.status===`generating`||t.status===`failed`||t.status===`completed`)&&(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:16,marginTop:16,width:`100%`,alignItems:`flex-start`},children:[(0,$.jsx)(`div`,{style:{width:`50%`,overflow:`hidden`,borderRadius:12,position:`relative`,height:220,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%)`},children:t.status===`generating`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:12,left:12,display:`flex`,alignItems:`center`,gap:8,zIndex:2}}),(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%)`,animation:`shimmer 2s infinite`}}),(0,$.jsxs)(`div`,{style:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,display:`flex`,flexDirection:`column`,alignItems:`center`,gap:16},children:[(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:`50%`,background:`rgba(99, 102, 241, 0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 0 30px rgba(99, 102, 241, 0.2)`},children:(0,$.jsx)(`div`,{style:{width:48,height:48,border:`3px solid #c7d2fe`,borderTopColor:`#6366f1`,borderRadius:`50%`,animation:`spin 1s linear infinite`}})}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`,fontWeight:500},children:`生成中...`})]})]}):t.status===`failed`?(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:`50%`,background:`rgba(254, 226, 226, 0.8)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(t5,{style:{color:`#ef4444`,fontSize:22}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#94a3b8`},children:`生成失败`})]}):(0,$.jsx)($.Fragment,{children:t.genType===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${t.imageUrl}&w=300&p=50`,alt:t.name,style:{width:`100%`,height:`100%`,borderRadius:12,objectFit:`contain`,cursor:`pointer`,transition:`transform 0.3s ease`},onClick:()=>{B(t.imageUrl),H(`image`),R(!0)},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.05)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${t.videoCoverUrl}&w=300&p=50`,alt:t.name,style:{width:`100%`,height:`100%`,borderRadius:12,objectFit:`contain`,cursor:`pointer`,transition:`transform 0.3s ease`},onClick:()=>{B(t.videoUrl),H(`video`),R(!0)},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.05)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,width:56,height:56,background:`rgba(99, 102, 241, 0.85)`,borderRadius:`50%`,display:`flex`,alignItems:`center`,justifyContent:`center`,pointerEvents:`none`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.4)`},children:(0,$.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`#fff`,children:(0,$.jsx)(`path`,{d:`M8 5v14l11-7z`})})})]})})}),(0,$.jsxs)(`div`,{style:{width:`50%`,display:`flex`,flexDirection:`column`,gap:12},children:[(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:12,padding:12,border:`1px solid rgba(99, 102, 241, 0.08)`,flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`p`,{style:{width:`100%`,height:150,overflow:`auto`,padding:0,marginTop:0,marginBottom:0,lineHeight:2,color:`#475569`,fontSize:13},children:t.originalPrompt})}),(0,$.jsxs)(`div`,{style:{fontSize:12,color:`#64748b`,textAlign:`left`,display:`flex`,flexWrap:`wrap`,gap:12,alignItems:`center`,justifyContent:`space-between`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{borderRadius:16,color:`#6366f1`,fontWeight:500},children:t.engineSnapshot.name}),(0,$.jsx)(`span`,{style:{borderRadius:16,color:`#64748b`},children:t.genType===`image`?`${t.imageProportion||``} · ${t.imagePx||``} · ${t.imageSize||``}`:`${t.duration||``}s · ${t.aspectRatio||``} · ${t.resolution||``}`}),(0,$.jsxs)(`span`,{style:{borderRadius:16,color:`#ef4444`,fontWeight:500},children:[`消耗积分:`,t.creditsCost]})]})]})]}),(0,$.jsx)(`div`,{style:{textAlign:`right`},children:t.mediaReferences&&t.mediaReferences.length>0&&(0,$.jsx)(`span`,{style:{padding:`4px 12px`,borderRadius:16,color:`#6366f1`,cursor:`pointer`,fontWeight:500,border:`1px solid rgba(99, 102, 241, 0.2)`,background:`rgba(99, 102, 241, 0.04)`},onClick:e=>{e.stopPropagation();let n=e.currentTarget.getBoundingClientRect();fe({x:n.left,y:n.top-10}),ue(t.id),ce(!0)},children:`附件详情`})})]})})]})},t.id))})(),(0,$.jsx)(`div`,{ref:Ie})]}),se&&le&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`transparent`,zIndex:9998},onClick:()=>{ce(!1),ue(null)}}),(0,$.jsxs)(`div`,{style:{position:`fixed`,top:de.y-100,left:de.x,background:`#fff`,borderRadius:12,boxShadow:`0 4px 20px rgba(0,0,0,0.15)`,padding:16,minWidth:200,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500},children:`附件列表`}),(0,$.jsx)(`button`,{onClick:()=>{ce(!1),ue(null)},style:{width:24,height:24,borderRadius:`50%`,border:`none`,background:`#ff4d4f`,cursor:`pointer`,fontSize:14,color:`#fff`,fontWeight:`bold`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s`},onMouseEnter:e=>{e.currentTarget.style.background=`#ff7875`,e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.background=`#ff4d4f`,e.currentTarget.style.transform=`scale(1)`},children:`×`})]}),ze.find(e=>e.id===le)?.mediaReferences?.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>{q(e.url),J(e.url.includes(`.mp4`)||e.url.includes(`.mov`)||e.url.includes(`.avi`)||e.url.includes(`.video`)?`video`:`image`),oe(e.name),G(!0),ce(!1),ue(null)},style:{display:`flex`,alignItems:`center`,gap:8,padding:`8px 12px`,borderRadius:6,cursor:`pointer`,fontSize:13,color:`#333`,transition:`background 0.2s`},onMouseEnter:e=>e.currentTarget.style.background=`#f5f5f5`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,children:[e.type===`image`?(0,$.jsx)(p6,{style:{color:`#3b82f6`,fontSize:14}}):(0,$.jsx)(Y8,{style:{color:`#f59e0b`,fontSize:14}}),e.name]},t))]})]}),(0,$.jsxs)(`div`,{style:{background:`rgba(255,255,255,0.1)`,backdropFilter:`blur(20px)`,borderRadius:24,padding:16,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.1), 0 2px 8px rgba(0,0,0,0.04)`,transition:`all 0.3s ease`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:[F.length>0&&(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,marginBottom:12,overflowX:`auto`},children:F.map((e,t)=>(0,$.jsxs)(`div`,{style:{position:`relative`,width:e.type===`video`?120:80,flexShrink:0},children:[e.type===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,alt:e.name,style:{width:`100%`,height:80,objectFit:`cover`,borderRadius:8}}):(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:80,objectFit:`cover`,borderRadius:8}}),(0,$.jsx)(`button`,{onClick:()=>tt(t),style:{position:`absolute`,top:0,right:0,width:20,height:20,border:`none`,background:`#ff4d4f`,borderRadius:50,cursor:`pointer`,color:`#fff`,fontSize:12,display:`flex`,alignItems:`center`,justifyContent:`center`},children:`×`})]},`media-${t}`))}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:`12px 16px`,backgroundColor:`rgba(248,250,252,0.6)`,borderRadius:16,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`,transition:`all 0.2s ease`},children:[(0,$.jsx)(y0,{accept:`image/*,video/*`,showUploadList:!1,beforeUpload:et,children:(0,$.jsx)($w,{title:`图片${F.filter(e=>e.type===`image`).length}/4,视频${F.filter(e=>e.type===`video`).length}/1`,children:(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:14,border:`2px dashed rgba(99, 102, 241, 0.2)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.25s ease`,flexShrink:0,backgroundColor:`rgba(255,255,255,0.7)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.backgroundColor=`rgba(99, 102, 241, 0.06)`,e.currentTarget.style.transform=`scale(1.05)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.2)`,e.currentTarget.style.backgroundColor=`rgba(255,255,255,0.7)`,e.currentTarget.style.transform=`scale(1)`},children:j?(0,$.jsx)(Xm,{style:{fontSize:18,color:`#6366f1`}}):(0,$.jsx)(gR,{style:{fontSize:18,color:`#64748b`}})})})}),(0,$.jsx)(Dte,{value:o,onChange:e=>s(e.target.value),onKeyPress:nt,placeholder:`上传最多4张参考图,输入提示词描述您想生成的画面...`,autoSize:{minRows:1,maxRows:4},style:{flex:1,height:`100%`,borderRadius:12,border:`none`,outline:`none`,boxShadow:`none`,fontSize:14,lineHeight:1.5,color:`#1e293b`},disabled:N}),(0,$.jsx)(vD,{type:`primary`,shape:`circle`,icon:(0,$.jsx)(K6,{}),onClick:Qe,disabled:!o.trim()&&F.length===0,loading:N,style:{flexShrink:0,width:48,height:48,borderRadius:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.4)`,transition:`all 0.2s ease`,border:`none`}})]}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginTop:12,paddingTop:12,borderTop:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsxs)(DU,{size:`middle`,children:[(0,$.jsxs)(lw,{value:c,onChange:e=>y(e),style:{width:100,height:34,outline:`none`,border:`none`,backgroundColor:`#f1f5f9`,borderRadius:10},size:`middle`,children:[(0,$.jsxs)(f9,{value:`image`,children:[(0,$.jsx)(p6,{style:{marginRight:6,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:`图片`})]}),(0,$.jsxs)(f9,{value:`video`,children:[(0,$.jsx)(Y8,{style:{marginRight:6,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:`视频`})]})]}),(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>Oe(!0),className:`image-settings-trigger`,style:{minWidth:200,padding:`6px 14px`,height:34,borderRadius:10,border:`none`,backgroundColor:`#f1f5f9`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.boxShadow=`0 4px 12px rgba(99, 102, 241, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.15)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(99, 102, 241, 0.04)`},children:[(0,$.jsx)(Y6,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(p9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:c===`image`?v.image?.find(e=>e.id===l)?.name:v.video?.find(e=>e.id===l)?.name||`选择引擎`})]}),De&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:360,backgroundColor:`rgba(255,255,255,0.95)`,backdropFilter:`blur(20px)`,borderRadius:14,boxShadow:`0 12px 48px rgba(99, 102, 241, 0.15)`,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475569`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:(c===`image`?v.image:v.video)?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{b(e.id),c===`video`&&(k({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(h)||D(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(g)||O(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(m)||E(e.supportedDurations?.[0]||5)),Oe(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:l===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:l===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:l===e.id?600:500,color:l===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),c===`image`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>me(!pe),className:`image-settings-trigger`,style:{minWidth:220,padding:`4px 12px`,height:34,borderRadius:8,border:`none`,backgroundColor:`#f1f5f9`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(j3,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsxs)(p9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[u===`auto`?`智能`:u,` · `,d==`2K`?`2K高清`:`4K超清`,` · `,f,`×`,p]})]}),pe&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:480,backgroundColor:`rgba(255,255,255,0.95)`,backdropFilter:`blur(20px)`,borderRadius:14,boxShadow:`0 12px 48px rgba(99, 102, 241, 0.15)`,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:_e.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{x(e.value),Ye(e.label)},style:{flex:`0 0 calc(11.11% - 4px)`,minWidth:44,height:52,borderRadius:6,border:u===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:u===e.value?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:e.value===`auto`?14:18,height:e.value===`auto`?14:18,border:`2px solid ${u===e.value?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e.value===`auto`&&(0,$.jsx)(`span`,{style:{fontSize:7,color:u===e.value?`#6366f1`:`#9ca3af`},children:`智`})}),(0,$.jsx)(`span`,{style:{fontSize:9,color:u===e.value?`#6366f1`:`#6b7280`,fontWeight:u===e.value?600:400},children:e.value})]},e.value))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:ye.map(e=>(0,$.jsx)(`button`,{onClick:()=>{C(e.value),Xe(e.value)},style:{flex:1,height:42,borderRadius:6,border:d===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:d===e.value?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsxs)(`span`,{style:{fontSize:12,fontWeight:600,color:d===e.value?`#fff`:`#4b5563`},children:[e.value,e.value===`4K`&&(0,$.jsx)(`span`,{style:{marginLeft:2},children:`✨`})]})},e.value))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`尺寸`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:120},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:11,marginRight:4},children:`W`}),(0,$.jsx)(nK,{value:f,onChange:e=>w(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:12,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`button`,{onClick:Ze,style:{width:24,height:24,borderRadius:4,border:`1px solid #e5e7eb`,backgroundColor:`#fff`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:`#6366f1`},children:(0,$.jsx)(oG,{style:{fontSize:10}})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:120},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:11,marginRight:4},children:`H`}),(0,$.jsx)(nK,{value:p,onChange:e=>T(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:12,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:11},children:`PX`})]})]})]})]}),c===`video`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>ge(!he),className:`image-settings-trigger`,style:{minWidth:220,padding:`4px 12px`,height:34,borderRadius:8,border:`none`,backgroundColor:`#f1f5f9`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(j3,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsxs)(p9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[h,` · `,m,`s · `,g]})]}),he&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:400,backgroundColor:`rgba(255,255,255,0.95)`,backdropFilter:`blur(20px)`,borderRadius:14,boxShadow:`0 12px 48px rgba(99, 102, 241, 0.15)`,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:_.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>D(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:h===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:h===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${h===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:h===e?`#6366f1`:`#6b7280`,fontWeight:h===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(m-Math.min(..._.durations))/(Math.max(..._.durations)-Math.min(..._.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(..._.durations),max:Math.max(..._.durations),value:m,onChange:e=>E(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:m}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:_.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>O(e),style:{flex:1,height:42,borderRadius:6,border:g===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:g===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:g===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`6px 14px`,backgroundColor:`rgba(99, 102, 241, 0.06)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsx)(p9,{style:{fontSize:13,color:`#6366f1`,fontWeight:500},children:`预估积分`}),(0,$.jsx)(p9,{style:{fontSize:14,color:`#6366f1`,fontWeight:600},children:Fe()})]})]})})]})]})]}),(0,$.jsx)(`style`,{children:` @keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0.3; } } - `}),(0,$.jsx)(Rq,{open:L,onCancel:rt,footer:[(0,$.jsx)(bD,{type:`primary`,onClick:it,style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:10,border:`none`},children:`下载`},`download`)],width:800,centered:!0,closeIcon:(0,$.jsx)(`button`,{onClick:rt,style:{width:32,height:32,borderRadius:`50%`,border:`none`,background:`rgba(99, 102, 241, 0.1)`,cursor:`pointer`,fontSize:16,color:`#6366f1`,fontWeight:`bold`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`,e.currentTarget.style.color=`#ef4444`,e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`,e.currentTarget.style.color=`#6366f1`,e.currentTarget.style.transform=`scale(1)`},children:`×`}),style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:W(z)?(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:`40px`},children:(0,$.jsx)(`p`,{style:{fontSize:16,color:`#ff4d4f`,marginBottom:16},children:`图片/视频资源已过期,请刷新重新加载~`})}):V===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${z}&w=300&q=50`,alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:U,src:`http://ceshi.apiforeign.minzhong.cn${z}`,controls:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})}),(0,$.jsx)(Rq,{open:re,onCancel:()=>G(!1),footer:[(0,$.jsx)(bD,{type:`primary`,onClick:()=>{if(!K)return;let e=document.createElement(`a`);e.href=`http://ceshi.apiforeign.minzhong.cn${K}&download=1`,e.download=ae||(ie===`image`?`image.png`:`video.mp4`),document.body.appendChild(e),e.click(),document.body.removeChild(e)},style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:10,border:`none`},children:`下载`},`download`)],width:800,centered:!0,closeIcon:(0,$.jsx)(`button`,{onClick:()=>G(!1),style:{width:32,height:32,borderRadius:`50%`,border:`none`,background:`rgba(99, 102, 241, 0.1)`,cursor:`pointer`,fontSize:16,color:`#6366f1`,fontWeight:`bold`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`,e.currentTarget.style.color=`#ef4444`,e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`,e.currentTarget.style.color=`#6366f1`,e.currentTarget.style.transform=`scale(1)`},children:`×`}),style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:ie===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${K}`,alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${K}`,controls:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})})]})},{Header:Ste,Content:Cte}=hK,{TextArea:wte}=oK,Tte=()=>{let e=Je(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(1),[a,o]=(0,S.useState)(20),[s,c]=(0,S.useState)(0),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)(1),[h,g]=(0,S.useState)(8),[_,v]=(0,S.useState)(0),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(``),[w,T]=(0,S.useState)(``),[E,D]=(0,S.useState)(null),[O,k]=(0,S.useState)(``),[A,j]=(0,S.useState)(null),[M,N]=(0,S.useState)(``),[P,F]=(0,S.useState)(!1),[I,L]=(0,S.useState)(!1),[R,z]=(0,S.useState)(!1),B=(0,S.useRef)(null),V=(0,S.useRef)(null),H=(e,t,n=!1)=>{h7(e,t).then(e=>{if(e.items){f(n?t=>t.map(t=>{let n=e.items.find(e=>e.id===t.id);return n&&n.status!==t.status?n:t}):e.items);let t=e.items.some(e=>e.status===`processing`);t&&!B.current?B.current=setInterval(()=>{H(p,h,!0)},5e3):!t&&B.current&&(clearInterval(B.current),B.current=null)}e.total!==void 0&&v(e.total)}).catch(e=>{})},U=e=>{m(e),H(e,h)},ee=(e,t,i=!1,o)=>{h7(e,t,o).then(e=>{if(e.items){n(i?t=>t.map(t=>{let n=e.items.find(e=>e.id===t.id);return n&&n.status!==t.status?n:t}):e.items);let t=e.items.some(e=>e.status===`processing`);t&&!V.current?V.current=setInterval(()=>{ee(r,a,!0,l)},5e3):!t&&V.current&&(clearInterval(V.current),V.current=null)}e.total!==void 0&&c(e.total)}).catch(e=>{})};(0,S.useEffect)(()=>(ee(r,a),H(p,h),()=>{B.current&&=(clearInterval(B.current),null),V.current&&=(clearInterval(V.current),null)}),[]);let te=(e,t)=>{i(e),o(t),ee(e,t,!1,l)},ne=()=>{i(1),ee(1,a,!1,l)};return(0,$.jsxs)(`div`,{className:`replication-container`,style:{margin:`-24px -32px -32px`,height:`calc(100vh - 34px)`,display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:`2%`,position:`relative`,boxSizing:`border-box`},children:[(0,$.jsxs)(`div`,{className:`replication-preview`,style:{width:`70%`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,display:`flex`,flexDirection:`column`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,position:`relative`,zIndex:10},children:[(0,$.jsxs)(Ste,{style:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`爆款开头复刻`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(bD,{type:`primary`,ghost:!0,style:{borderRadius:10,padding:`6px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},onClick:()=>z(!0),children:`创作记录`})]}),(0,$.jsx)(`div`,{style:{flex:1,background:`rgba(248, 250, 252, 0.5)`,borderRight:`1px solid rgba(99, 102, 241, 0.08)`,overflowY:`auto`},children:d.length>0?(0,$.jsxs)(`div`,{style:{height:`100%`,padding:`24px`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24},children:(0,$.jsx)(`h2`,{style:{margin:0,fontSize:16,fontWeight:600,color:`#1e293b`},children:`历史生成作品`})}),(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(190px, 1fr))`,gap:16},children:d.map(t=>(0,$.jsxs)(`div`,{style:{background:`rgba(255,255,255,0.9)`,border:`1px solid rgba(99, 102, 241, 0.6)`,backdropFilter:`blur(10px)`,borderRadius:16,overflow:`hidden`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.06)`,cursor:`pointer`,transition:`transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1)`},onClick:()=>e(`/initial/${t.id}/initialinfo`),onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-6px)`,e.currentTarget.style.boxShadow=`0 12px 32px rgba(99, 102, 241, 0.12)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(99, 102, 241, 0.06)`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,aspectRatio:`1/1`,background:`#f8fafc`},children:[t.finalVideoUrl?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${t.finalVideoCoverUrl}`,alt:t.targetProjectName,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:60,height:60,borderRadius:`50%`,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(q8,{style:{fontSize:24,color:`#fff`}})})}),(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:8,right:8,padding:`4px 12px`,background:`rgba(0,0,0,0.7)`,borderRadius:16,fontSize:10,color:`#fff`,backdropFilter:`blur(4px)`},children:(()=>{let e=t.status,n=t.current_step_code||t.currentStepCode;if(n===`image_prompt_optimize`)switch(e){case`waiting_user`:return`等待融合图生成`;case`processing`:return`图片提示词生成中`;case`completed`:return`图片提示词生成成功`;case`failed`:return`图片提示词生成失败`;default:return e||`待处理`}else if(n===`image_generate`)switch(e){case`waiting_user`:return`等待生成视频提示词`;case`processing`:return`融合图生成中`;case`completed`:return`融合图生成成功`;case`failed`:return`融合图生成失败`;default:return e||`待处理`}else if(n===`video_prompt_optimize`)switch(e){case`waiting_user`:return`等待最终视频生成`;case`processing`:return`视频提示词生成中`;case`completed`:return`视频提示词生成成功`;case`failed`:return`视频提示词生成失败`;default:return e||`待处理`}else if(n===`video_generate`)switch(e){case`waiting_user`:return``;case`processing`:return`最终视频生成中`;case`completed`:return`最终视频生成成功`;case`failed`:return`最终视频生成失败`;default:return e||`待处理`}else if(n===`material_input`)switch(e){case`waiting_user`:return`等待生成图片提示词`;case`processing`:return`素材处理中`;case`completed`:return`素材上传成功`;case`failed`:return`素材上传失败`;default:return e||`待处理`}else return{pending:`子任务待处理`,waiting_user:`等待用户确认或触发`,processing:`子任务处理中`,completed:`子任务完成`,failed:`子任务失败`,cancelled:`子任务取消`}[e]||e||`待处理`})()})]}),(0,$.jsxs)(`div`,{style:{padding:14},children:[(0,$.jsx)(`h4`,{style:{margin:0,fontSize:14,fontWeight:600,color:`#1e293b`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:t.targetProjectName||`未命名作品`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginTop:6},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:12,color:`#64748b`},children:t.createdAt?new Date(t.createdAt).toLocaleDateString(`zh-CN`):``}),(()=>{let e=t.status;return e===`waiting_user`?(0,$.jsx)(`span`,{style:{fontSize:11,color:`#f59e0b`},children:`等待下一步`}):e===`processing`?(0,$.jsxs)(`span`,{style:{fontSize:11,color:`#6366f1`,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`span`,{children:`进行中`}),(0,$.jsx)(`span`,{style:{animation:`dots 1s infinite`},children:`...`}),(0,$.jsx)(`style`,{children:` + `}),(0,$.jsx)(Pq,{open:L,onCancel:rt,footer:[(0,$.jsx)(vD,{type:`primary`,onClick:it,style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:10,border:`none`},children:`下载`},`download`)],width:800,centered:!0,closeIcon:(0,$.jsx)(`button`,{onClick:rt,style:{width:32,height:32,borderRadius:`50%`,border:`none`,background:`rgba(99, 102, 241, 0.1)`,cursor:`pointer`,fontSize:16,color:`#6366f1`,fontWeight:`bold`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`,e.currentTarget.style.color=`#ef4444`,e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`,e.currentTarget.style.color=`#6366f1`,e.currentTarget.style.transform=`scale(1)`},children:`×`}),style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:W(z)?(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:`40px`},children:(0,$.jsx)(`p`,{style:{fontSize:16,color:`#ff4d4f`,marginBottom:16},children:`图片/视频资源已过期,请刷新重新加载~`})}):V===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${z}&w=300&q=50`,alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:U,src:`http://ceshi.apiforeign.minzhong.cn${z}`,controls:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})}),(0,$.jsx)(Pq,{open:re,onCancel:()=>G(!1),footer:[(0,$.jsx)(vD,{type:`primary`,onClick:()=>{if(!K)return;let e=document.createElement(`a`);e.href=`http://ceshi.apiforeign.minzhong.cn${K}&download=1`,e.download=ae||(ie===`image`?`image.png`:`video.mp4`),document.body.appendChild(e),e.click(),document.body.removeChild(e)},style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:10,border:`none`},children:`下载`},`download`)],width:800,centered:!0,closeIcon:(0,$.jsx)(`button`,{onClick:()=>G(!1),style:{width:32,height:32,borderRadius:`50%`,border:`none`,background:`rgba(99, 102, 241, 0.1)`,cursor:`pointer`,fontSize:16,color:`#6366f1`,fontWeight:`bold`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`,e.currentTarget.style.color=`#ef4444`,e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`,e.currentTarget.style.color=`#6366f1`,e.currentTarget.style.transform=`scale(1)`},children:`×`}),style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:ie===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${K}`,alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${K}`,controls:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})})]})},{Header:kte,Content:Ate}=dK,{TextArea:jte}=nK,Mte=()=>{let e=Je(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(1),[a,o]=(0,S.useState)(20),[s,c]=(0,S.useState)(0),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)(1),[h,g]=(0,S.useState)(8),[_,v]=(0,S.useState)(0),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(``),[w,T]=(0,S.useState)(``),[E,D]=(0,S.useState)(null),[O,k]=(0,S.useState)(``),[A,j]=(0,S.useState)(null),[M,N]=(0,S.useState)(``),[P,F]=(0,S.useState)(!1),[I,L]=(0,S.useState)(!1),[R,z]=(0,S.useState)(!1),B=(0,S.useRef)(null),V=(0,S.useRef)(null),H=(e,t,n=!1)=>{_7(e,t).then(e=>{if(e.items){f(n?t=>t.map(t=>{let n=e.items.find(e=>e.id===t.id);return n&&n.status!==t.status?n:t}):e.items);let t=e.items.some(e=>e.status===`processing`);t&&!B.current?B.current=setInterval(()=>{H(p,h,!0)},5e3):!t&&B.current&&(clearInterval(B.current),B.current=null)}e.total!==void 0&&v(e.total)}).catch(e=>{})},U=e=>{m(e),H(e,h)},ee=(e,t,i=!1,o)=>{_7(e,t,o).then(e=>{if(e.items){n(i?t=>t.map(t=>{let n=e.items.find(e=>e.id===t.id);return n&&n.status!==t.status?n:t}):e.items);let t=e.items.some(e=>e.status===`processing`);t&&!V.current?V.current=setInterval(()=>{ee(r,a,!0,l)},5e3):!t&&V.current&&(clearInterval(V.current),V.current=null)}e.total!==void 0&&c(e.total)}).catch(e=>{})};(0,S.useEffect)(()=>(ee(r,a),H(p,h),()=>{B.current&&=(clearInterval(B.current),null),V.current&&=(clearInterval(V.current),null)}),[]);let te=(e,t)=>{i(e),o(t),ee(e,t,!1,l)},ne=()=>{i(1),ee(1,a,!1,l)};return(0,$.jsxs)(`div`,{className:`replication-container`,style:{margin:`-24px -32px -32px`,height:`calc(100vh - 34px)`,display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:`2%`,position:`relative`,boxSizing:`border-box`},children:[(0,$.jsxs)(`div`,{className:`replication-preview`,style:{width:`70%`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,display:`flex`,flexDirection:`column`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,position:`relative`,zIndex:10},children:[(0,$.jsxs)(kte,{style:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`爆款开头复刻`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(vD,{type:`primary`,ghost:!0,style:{borderRadius:10,padding:`6px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},onClick:()=>z(!0),children:`创作记录`})]}),(0,$.jsx)(`div`,{style:{flex:1,background:`rgba(248, 250, 252, 0.5)`,borderRight:`1px solid rgba(99, 102, 241, 0.08)`,overflowY:`auto`},children:d.length>0?(0,$.jsxs)(`div`,{style:{height:`100%`,padding:`24px`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24},children:(0,$.jsx)(`h2`,{style:{margin:0,fontSize:16,fontWeight:600,color:`#1e293b`},children:`历史生成作品`})}),(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(190px, 1fr))`,gap:16},children:d.map(t=>(0,$.jsxs)(`div`,{style:{background:`rgba(255,255,255,0.9)`,border:`1px solid rgba(99, 102, 241, 0.6)`,backdropFilter:`blur(10px)`,borderRadius:16,overflow:`hidden`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.06)`,cursor:`pointer`,transition:`transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1)`},onClick:()=>e(`/initial/${t.id}/initialinfo`),onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-6px)`,e.currentTarget.style.boxShadow=`0 12px 32px rgba(99, 102, 241, 0.12)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(99, 102, 241, 0.06)`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,aspectRatio:`1/1`,background:`#f8fafc`},children:[t.finalVideoUrl?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${t.finalVideoCoverUrl}`,alt:t.targetProjectName,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:60,height:60,borderRadius:`50%`,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(Y8,{style:{fontSize:24,color:`#fff`}})})}),(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:8,right:8,padding:`4px 12px`,background:`rgba(0,0,0,0.7)`,borderRadius:16,fontSize:10,color:`#fff`,backdropFilter:`blur(4px)`},children:(()=>{let e=t.status,n=t.current_step_code||t.currentStepCode;if(n===`image_prompt_optimize`)switch(e){case`waiting_user`:return`等待融合图生成`;case`processing`:return`图片提示词生成中`;case`completed`:return`图片提示词生成成功`;case`failed`:return`图片提示词生成失败`;default:return e||`待处理`}else if(n===`image_generate`)switch(e){case`waiting_user`:return`等待生成视频提示词`;case`processing`:return`融合图生成中`;case`completed`:return`融合图生成成功`;case`failed`:return`融合图生成失败`;default:return e||`待处理`}else if(n===`video_prompt_optimize`)switch(e){case`waiting_user`:return`等待最终视频生成`;case`processing`:return`视频提示词生成中`;case`completed`:return`视频提示词生成成功`;case`failed`:return`视频提示词生成失败`;default:return e||`待处理`}else if(n===`video_generate`)switch(e){case`waiting_user`:return``;case`processing`:return`最终视频生成中`;case`completed`:return`最终视频生成成功`;case`failed`:return`最终视频生成失败`;default:return e||`待处理`}else if(n===`material_input`)switch(e){case`waiting_user`:return`等待生成图片提示词`;case`processing`:return`素材处理中`;case`completed`:return`素材上传成功`;case`failed`:return`素材上传失败`;default:return e||`待处理`}else return{pending:`子任务待处理`,waiting_user:`等待用户确认或触发`,processing:`子任务处理中`,completed:`子任务完成`,failed:`子任务失败`,cancelled:`子任务取消`}[e]||e||`待处理`})()})]}),(0,$.jsxs)(`div`,{style:{padding:14},children:[(0,$.jsx)(`h4`,{style:{margin:0,fontSize:14,fontWeight:600,color:`#1e293b`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:t.targetProjectName||`未命名作品`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginTop:6},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:12,color:`#64748b`},children:t.createdAt?new Date(t.createdAt).toLocaleDateString(`zh-CN`):``}),(()=>{let e=t.status;return e===`waiting_user`?(0,$.jsx)(`span`,{style:{fontSize:11,color:`#f59e0b`},children:`等待下一步`}):e===`processing`?(0,$.jsxs)(`span`,{style:{fontSize:11,color:`#6366f1`,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`span`,{children:`进行中`}),(0,$.jsx)(`span`,{style:{animation:`dots 1s infinite`},children:`...`}),(0,$.jsx)(`style`,{children:` @keyframes dots { 0%, 20% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } } - `})]}):e===`failed`?(0,$.jsx)(`span`,{style:{fontSize:11,color:`#ef4444`},children:`失败`}):e===`completed`&&t.finalVideoUrl?(0,$.jsx)(`span`,{style:{fontSize:11,color:`#10b981`},children:`任务完成`}):null})()]})]})]},t.id))}),(0,$.jsx)(`div`,{style:{paddingTop:20,paddingBottom:20,display:`flex`,justifyContent:`center`},children:(0,$.jsx)(KK,{current:p,pageSize:h,total:_,onChange:U,showSizeChanger:!1,showQuickJumper:!1,showTotal:e=>`共 ${e} 条`,itemRender:(e,t,n)=>t===`prev`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid #e5e7eb`,borderRadius:6,background:p===1?`#f9fafb`:`#fff`,cursor:p===1?`not-allowed`:`pointer`,color:p===1?`#d1d5db`:`#6b7280`,fontSize:14},disabled:p===1,children:`‹`}):t===`next`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid #e5e7eb`,borderRadius:6,background:p>=Math.ceil(_/h)?`#f9fafb`:`#fff`,cursor:p>=Math.ceil(_/h)?`not-allowed`:`pointer`,color:p>=Math.ceil(_/h)?`#d1d5db`:`#6b7280`,fontSize:14},disabled:p>=Math.ceil(_/h),children:`›`}):t===`page`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`none`,borderRadius:6,background:e===p?`#6366f1`:`#fff`,color:e===p?`#fff`:`#374151`,fontWeight:e===p?500:400,cursor:`pointer`,fontSize:14},children:e}):n})})]}):(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`40px`},children:[(0,$.jsxs)(`div`,{style:{width:120,height:120,display:`flex`,alignItems:`center`,justifyContent:`center`,marginBottom:24,position:`relative`},children:[(0,$.jsx)(`div`,{style:{width:60,height:60,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:20,position:`absolute`,bottom:0,right:10}}),(0,$.jsx)(`div`,{style:{width:50,height:50,border:`2px solid rgba(99, 102, 241, 0.2)`,borderRadius:16,position:`absolute`,top:0,left:10}}),(0,$.jsx)(`div`,{style:{width:56,height:56,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:18,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 24px rgba(99, 102, 241, 0.25)`},children:(0,$.jsx)(q8,{style:{fontSize:28,color:`#fff`}})})]}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:600,color:`#1e293b`,marginBottom:8},children:`暂无生成内容`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#64748b`,textAlign:`center`,padding:`0 40px`,lineHeight:1.6},children:`请完善素材与卖点,生成专属爆款开头复刻视频`})]})})]}),(0,$.jsx)(`div`,{className:`replication-form`,style:{flex:1,overflow:`auto`,width:`28%`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,position:`relative`,zIndex:10},children:(0,$.jsxs)(`div`,{className:`replication-form-content`,style:{width:`100%`,height:`100%`,background:`rgba(248, 250, 252, 0.5)`,padding:24,overflowY:`auto`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10},children:`上传复刻视频`}),O?(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`video`,{src:O,controls:!0,style:{width:`100%`,borderRadius:12,maxHeight:200,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`}}),(0,$.jsx)(`button`,{onClick:()=>{O&&URL.revokeObjectURL(O),D(null),k(``)},style:{position:`absolute`,top:8,right:8,width:28,height:28,border:`none`,background:`rgba(239, 68, 68, 0.9)`,borderRadius:`50%`,cursor:`pointer`,color:`#fff`,fontSize:16,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10,transition:`all 0.2s`},children:`×`}),(0,$.jsxs)(`div`,{style:{marginTop:10,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(q8,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#475569`},children:E?.name}),(0,$.jsxs)(`span`,{style:{fontSize:11,color:`#94a3b8`},children:[`(`,E?.size?(E.size/1024/1024).toFixed(2):0,`MB)`]})]})]}):(0,$.jsx)(C0,{beforeUpload:async e=>{if(!e.type.startsWith(`video/`))return Z.error(`只能上传视频文件`),!1;if(!(e.size/1024/1024<50))return Z.error(`视频大小不能超过50MB`),!1;let t=document.createElement(`video`);return t.preload=`metadata`,new Promise(n=>{t.onloadedmetadata=async()=>{if(t.duration<2){Z.error(`视频时长不能少于2秒`),URL.revokeObjectURL(t.src),n(!1);return}if(t.duration>=16){Z.error(`视频时长不能超过15秒`),URL.revokeObjectURL(t.src),n(!1);return}F(!0);try{let t=await B5(e);D(e),k(`http://ceshi.apiforeign.minzhong.cn${t.url}`),Z.success(`视频上传成功`),n(!1)}catch(e){let t=``;if(e instanceof Error)try{t=JSON.parse(e.message).detail||e.message}catch{t=e.message}Z.error(t||`视频上传失败`),n(!1)}finally{F(!1),URL.revokeObjectURL(t.src)}},t.onerror=()=>{Z.error(`视频文件无效`),URL.revokeObjectURL(t.src),n(!1)},t.src=URL.createObjectURL(e)})},showUploadList:!1,accept:`video/mp4,video/quicktime,.mp4,.mov`,children:(0,$.jsx)(`div`,{style:{border:`2px dashed rgba(99, 102, 241, 0.3)`,borderRadius:12,padding:24,textAlign:`center`,cursor:`pointer`,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`,background:`rgba(99, 102, 241, 0.02)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.02)`},children:P?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{width:40,height:40,margin:`0 auto 12px`,border:`3px solid rgba(99, 102, 241, 0.2)`,borderTopColor:`#6366f1`,borderRadius:`50%`,animation:`spin 1s linear infinite`}}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#6366f1`,fontWeight:500},children:`上传中...`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持的文件类型:MP4、MOV | 视频最大时长:15 秒 | 最大大小:50M`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:48,height:48,margin:`0 auto 12px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:16,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(q8,{style:{fontSize:24,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#475569`,fontWeight:500},children:`点击或拖拽上传视频`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持的文件类型:MP4、MOV | 视频最大时长:15 秒 | 最大大小:50M`})]})})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10},children:`上传产品图片`}),M?(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`img`,{src:M,alt:`产品图片`,style:{width:`100%`,borderRadius:12,maxHeight:200,objectFit:`contain`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`}}),(0,$.jsx)(`button`,{onClick:()=>{M&&URL.revokeObjectURL(M),j(null),N(``)},style:{position:`absolute`,top:8,right:8,width:28,height:28,border:`none`,background:`rgba(239, 68, 68, 0.9)`,borderRadius:`50%`,cursor:`pointer`,color:`#fff`,fontSize:16,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10,transition:`all 0.2s`},children:`×`}),(0,$.jsxs)(`div`,{style:{marginTop:10,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(d6,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#475569`},children:A?.name}),(0,$.jsxs)(`span`,{style:{fontSize:11,color:`#94a3b8`},children:[`(`,A?.size?(A.size/1024/1024).toFixed(2):0,`MB)`]})]})]}):(0,$.jsx)(C0,{beforeUpload:async e=>{if(!e.type.startsWith(`image/`))return Z.error(`只能上传图片文件`),!1;if(!(e.size/1024/1024<10))return Z.error(`图片大小不能超过10MB`),!1;let t=new Image;return new Promise(n=>{t.onload=async()=>{let r=t.width/t.height;Math.abs(r-.75)<.1||Math.abs(r-.5625),L(!0);try{let t=await z5(e);j(e),N(`http://ceshi.apiforeign.minzhong.cn${t.url}`),Z.success(`图片上传成功`),n(!1)}catch(e){let t=``;if(e instanceof Error)try{t=JSON.parse(e.message).detail||e.message}catch{t=e.message}Z.error(t||`图片上传失败`),n(!1)}finally{L(!1),URL.revokeObjectURL(t.src)}},t.onerror=()=>{Z.error(`图片文件无效`),URL.revokeObjectURL(t.src),n(!1)},t.src=URL.createObjectURL(e)})},showUploadList:!1,accept:`image/jpeg,image/jpg,image/png,.jpg,.jpeg,.png`,children:(0,$.jsx)(`div`,{style:{border:`2px dashed rgba(99, 102, 241, 0.3)`,borderRadius:12,padding:20,textAlign:`center`,cursor:`pointer`,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`,background:`rgba(99, 102, 241, 0.02)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.02)`},children:I?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{width:36,height:36,margin:`0 auto 10px`,border:`3px solid rgba(99, 102, 241, 0.2)`,borderTopColor:`#6366f1`,borderRadius:`50%`,animation:`spin 1s linear infinite`}}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#6366f1`,fontWeight:500},children:`上传中...`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持 JPG, JPEG, PNG 格式,图片比例为 3:4 或 9:16 效果最佳`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:44,height:44,margin:`0 auto 10px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:14,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(d6,{style:{fontSize:22,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#475569`,fontWeight:500},children:`+ 点击上传`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持 JPG, JPEG, PNG 格式,图片比例为 3:4 或 9:16 效果最佳`})]})})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:`原视频产品名称`}),(0,$.jsx)(oK,{value:y,onChange:e=>b(e.target.value),placeholder:`请输入原视频产品名称`,style:{borderRadius:10,height:40,fontSize:13,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},maxLength:10,suffix:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[y.length,`/10`]})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:`自有产品名称`}),(0,$.jsx)(oK,{value:x,onChange:e=>C(e.target.value),placeholder:`请输入自有产品名称`,style:{borderRadius:10,height:40,fontSize:13,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},maxLength:10,suffix:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[x.length,`/10`]})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:24},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:`产品卖点`}),(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(wte,{value:w,onChange:e=>T(e.target.value),placeholder:`请输入产品卖点`,style:{borderRadius:10,fontSize:13,height:80,resize:`none`,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},rows:3,maxLength:30}),(0,$.jsxs)(`span`,{style:{position:`absolute`,right:10,bottom:8,color:`#94a3b8`,fontSize:12},children:[w.length,`/30`]})]})]}),(0,$.jsx)(bD,{type:`primary`,block:!0,size:`large`,onClick:()=>{if(!O){Z.warning(`请上传复刻视频`);return}if(!M){Z.warning(`请上传产品图片`);return}if(!y.trim()){Z.warning(`请输入原视频产品名称`);return}if(!x.trim()){Z.warning(`请输入自有产品名称`);return}if(!w.trim()){Z.warning(`请输入产品卖点`);return}m7({material_video_url:O,material_image_url:M,source_project_name:y,target_project_name:x,core_content_point:w,idempotency_key:Date.now().toString()}).then(t=>{let r=``,i=``;k(``),N(``),b(``),C(``),T(``),H(1,8),h7(1,20).then(t=>{if(t.items){let a=t.items[0].id;n(t.items),g7(t.items[0].id).then(t=>{r=t.id,i=t.steps[0].id,_7(r,i).then(t=>{Z.loading(`创建中...`,3),setTimeout(()=>{e(`/initial/${a}/initialinfo`)},3e3)})}).catch(e=>{})}}).catch(e=>{})}).catch(e=>{Z.error(`视频开头复刻失败`)})},style:{borderRadius:12,height:44,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`,border:`none`,fontSize:15,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.3)`,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`},children:`立即生成+`})]})}),(0,$.jsxs)(Rq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`创作记录`})]}),open:R,onCancel:()=>z(!1),width:850,footer:null,style:{borderRadius:20},styles:{body:{height:580,display:`flex`,flexDirection:`column`,padding:0},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,margin:`16px 24px`,flexShrink:0},children:[(0,$.jsx)(oK,{placeholder:`搜索产品名称`,value:l,onChange:e=>u(e.target.value),onPressEnter:ne,style:{width:220,borderRadius:10,marginRight:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`}}),(0,$.jsx)(bD,{type:`primary`,onClick:ne,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflow:`auto`,padding:`0 24px 24px`},children:(0,$.jsx)(`div`,{style:{background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(10px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.06)`},children:(0,$.jsx)(g$,{columns:[{title:`产品名称`,dataIndex:`targetProjectName`,key:`targetProjectName`,align:`center`,width:200,render:e=>(0,$.jsx)(`span`,{style:{fontSize:13,color:`#1e293b`,fontWeight:500},children:e||`-`})},{title:`状态`,dataIndex:`status`,key:`status`,align:`center`,width:220,render:(e,t)=>{let n=e,r=t.current_step_code||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#64748b`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else return{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#64748b`}})();return(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,align:`center`,width:200,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:12,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,width:120,render:(t,n)=>(0,$.jsx)(`button`,{onClick:()=>e(`/initial/${n.id}/initialinfo`),style:{color:`#6366f1`,textDecoration:`none`,fontSize:13,border:`none`,background:`rgba(99, 102, 241, 0.08)`,padding:`4px 12px`,borderRadius:8,cursor:`pointer`,transition:`all 0.2s`},children:`查看详情`})}],dataSource:t,rowKey:`id`,pagination:{current:r,pageSize:a,total:s,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:te,itemRender:(e,t,n)=>t===`prev`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid rgba(99, 102, 241, 0.15)`,borderRadius:8,background:r===1?`rgba(243, 244, 246, 0.5)`:`#fff`,cursor:r===1?`not-allowed`:`pointer`,color:r===1?`#94a3b8`:`#6366f1`,fontSize:14},disabled:r===1,children:`‹`}):t===`next`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid rgba(99, 102, 241, 0.15)`,borderRadius:8,background:r>=Math.ceil(s/a)?`rgba(243, 244, 246, 0.5)`:`#fff`,cursor:r>=Math.ceil(s/a)?`not-allowed`:`pointer`,color:r>=Math.ceil(s/a)?`#94a3b8`:`#6366f1`,fontSize:14},disabled:r>=Math.ceil(s/a),children:`›`}):t===`page`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`none`,borderRadius:8,background:e===r?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`:`#fff`,color:e===r?`#fff`:`#475569`,fontWeight:e===r?600:400,cursor:`pointer`,fontSize:14},children:e}):n},style:{fontSize:13},scroll:{y:350}})})})]})]})};function m9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function h9(e,...t){for(let n of t){let t=e[n];if(t!=null&&String(t).trim()!==``)return String(t)}return``}function g9(e,t,...n){for(let t of n){let n=e[t];if(n===!0||n===!1)return n;if(n===`true`)return!0;if(n===`false`)return!1}return t}function Ete(e,...t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t)&&t>0)return t;if(typeof t==`string`&&t.trim()){let e=Number(t);if(Number.isFinite(e)&&e>0)return e}}}function _9(e){if(!m9(e))return null;let t=h9(e,`key`);return t?{key:t,label:h9(e,`label`)||t,type:h9(e,`type`)||void 0,enabled:g9(e,!0,`enabled`),editable:g9(e,!0,`editable`),maxLength:Ete(e,`maxLength`,`max_length`)}:null}function v9(e){if(!m9(e))return null;let t=e.data;return m9(t)?t:Array.isArray(e.sections)?e:null}function Dte(e){return!!v9(e)}function y9(e){let t=v9(e);return(Array.isArray(t?.sections)?t.sections:[]).map(e=>{let t=_9(e);if(!t||!m9(e))return null;let n=Array.isArray(e.children)?e.children.map(_9).filter(Boolean):[],r=Array.isArray(e.itemFields)?e.itemFields.map(_9).filter(Boolean):Array.isArray(e.item_fields)?e.item_fields.map(_9).filter(Boolean):[];return{...t,contentKey:h9(e,`contentKey`,`content_key`)||void 0,children:n,itemFields:r}}).filter(e=>!!e&&e.enabled)}function b9(e){if(e==null)return``;if(typeof e==`object`)try{return JSON.stringify(e,null,2)}catch{return String(e)}return String(e)}function x9(e){let t=b9(e);return t.length>40||t.includes(` -`)||t.includes(`,`)||t.includes(`。`)||t.includes(`;`)||t.includes(`;`)}function S9(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function C9(e,t,n,r){let i=S9(e||{});return m9(i[t])||(i[t]={}),i[t][n]=r,i}function w9(e,t,n,r,i){let a=S9(e||{});return Array.isArray(a[t])||(a[t]=[]),m9(a[t][n])||(a[t][n]={}),a[t][n][r]=i,a}function T9(e,t){if(!m9(e))return`视频提示词不能为空`;let n=y9(t);if(!n.length)return`视频提词配置缺失,无法保存`;for(let t of n){if(!t.editable)continue;let n=e[t.key];if(t.type===`object`){if(!m9(n))continue;for(let e of t.children)if(!(!e.enabled||!e.editable||!e.maxLength)&&b9(n[e.key]).length>e.maxLength)return`字段【${t.label}.${e.label}】长度不能超过 ${e.maxLength} 个字符`;continue}if(t.type===`flow`){if(!Array.isArray(n))continue;for(let e=0;en.maxLength)return`字段【${t.label} 第 ${e+1} 项.${n.label}】长度不能超过 ${n.maxLength} 个字符`}}continue}if(t.editable&&t.maxLength&&b9(n).length>t.maxLength)return`字段【${t.label}】长度不能超过 ${t.maxLength} 个字符`}return null}var{Text:E9}=Q,{TextArea:D9}=oK;function O9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function k9({value:e}){let t=e===`true`?`是`:e===`false`?`否`:b9(e);return x9(e)?(0,$.jsx)(D9,{value:t,rows:Math.min(6,Math.max(2,Math.ceil(t.length/42))),disabled:!0,style:{borderRadius:8,color:`#64748b`}}):(0,$.jsx)(oK,{value:t,disabled:!0,style:{borderRadius:8,color:`#64748b`}})}function A9({value:e,maxLength:t,onChange:n}){let r=b9(e),i={value:r,maxLength:t,showCount:!!t,onChange:e=>n(e.target.value),style:{borderRadius:8}};return x9(e)?(0,$.jsx)(D9,{...i,rows:Math.min(8,Math.max(3,Math.ceil(r.length/42)))}):(0,$.jsx)(oK,{...i})}function j9({value:e,onChange:t}){let n=e===!0||e===`true`;return(0,$.jsxs)(RL.Group,{value:n,onChange:e=>t(e.target.value),style:{display:`flex`,gap:24},children:[(0,$.jsx)(RL,{value:!0,style:{fontSize:14,color:`#475569`},children:`是`}),(0,$.jsx)(RL,{value:!1,style:{fontSize:14,color:`#475569`},children:`否`})]})}var M9=({value:e,schemaConfigSnapshot:t,onChange:n})=>{let r=O9(e)?e:{},i=y9(t);if(!Dte(t))return(0,$.jsxs)(jU,{direction:`vertical`,size:12,style:{width:`100%`},children:[(0,$.jsx)(Kf,{type:`warning`,showIcon:!0,message:`视频提词配置缺失,暂不能编辑`,description:`请刷新详情后重试;如果仍然缺失,请联系管理员排查第4步 schema_config_snapshot 返回。`}),Object.keys(r).length?(0,$.jsx)(`pre`,{style:{margin:0,padding:12,borderRadius:10,background:`#f8fafc`,maxHeight:420,overflow:`auto`,color:`#475569`},children:JSON.stringify(r,null,2)}):null]});if(!i.length)return(0,$.jsx)(Kf,{type:`warning`,showIcon:!0,message:`视频提词配置为空`,description:`当前 Schema 配置没有可展示字段。`});let a=e=>{let t=O9(r[e.key])?r[e.key]:{},i=e.children.filter(e=>e.enabled);return i.length?(0,$.jsxs)(`div`,{style:{marginBottom:18},children:[(0,$.jsx)(jU,{style:{marginBottom:8},children:(0,$.jsx)(E9,{strong:!0,style:{color:`#334155`,fontSize:13},children:e.label})}),(0,$.jsx)(`div`,{style:{borderLeft:`3px solid #6366f1`,paddingLeft:12,marginLeft:4},children:i.map(i=>(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsx)(jU,{style:{marginBottom:4},children:(0,$.jsx)(E9,{style:{color:`#64748b`,fontSize:12},children:i.label})}),i.editable?i.type===`boolean`?(0,$.jsx)(j9,{value:t[i.key],onChange:t=>n(C9(r,e.key,i.key,t))}):(0,$.jsx)(A9,{value:t[i.key],maxLength:i.maxLength,onChange:t=>n(C9(r,e.key,i.key,t))}):(0,$.jsx)(k9,{value:t[i.key]})]},i.key))})]},e.key):null},o=e=>{let t=Array.isArray(r[e.key])?r[e.key]:[],i=[{key:`时间段`,label:`时间段`,enabled:!0,editable:!1},...e.itemFields.filter(e=>e.enabled)];return(0,$.jsxs)(`div`,{style:{marginBottom:18},children:[(0,$.jsxs)(jU,{style:{marginBottom:8},children:[(0,$.jsx)(E9,{strong:!0,style:{color:`#334155`,fontSize:13},children:e.label}),(0,$.jsx)(k$,{color:`default`,children:`锁定条目和时间段`})]}),(0,$.jsx)(`div`,{style:{border:`1px solid #e5e7eb`,borderRadius:10,padding:12,background:`#fff`},children:t.length===0?(0,$.jsx)(E9,{style:{color:`#94a3b8`,fontSize:12},children:`暂无内容`}):t.map((a,o)=>{let s=O9(a)?a:{};return(0,$.jsxs)(`div`,{style:{marginBottom:o===t.length-1?0:14,paddingBottom:o===t.length-1?0:14,borderBottom:o===t.length-1?`none`:`1px dashed #e2e8f0`},children:[(0,$.jsxs)(E9,{strong:!0,style:{display:`block`,marginBottom:8,color:`#475569`,fontSize:12},children:[`第 `,o+1,` 段`]}),i.map(t=>(0,$.jsxs)(`div`,{style:{marginBottom:10},children:[(0,$.jsx)(jU,{style:{marginBottom:4},children:(0,$.jsx)(E9,{style:{color:`#64748b`,fontSize:12},children:t.label})}),t.editable?t.type===`boolean`?(0,$.jsx)(j9,{value:s[t.key],onChange:i=>n(w9(r,e.key,o,t.key,i))}):(0,$.jsx)(A9,{value:s[t.key],maxLength:t.maxLength,onChange:i=>n(w9(r,e.key,o,t.key,i))}):(0,$.jsx)(k9,{value:s[t.key]})]},t.key))]},`${e.key}-${o}`)})})]},e.key)},s=e=>e.key in r?(0,$.jsxs)(`div`,{style:{marginBottom:18},children:[(0,$.jsx)(jU,{style:{marginBottom:8},children:(0,$.jsx)(E9,{strong:!0,style:{color:`#334155`,fontSize:13},children:e.label})}),e.editable?(0,$.jsx)(A9,{value:r[e.key],maxLength:e.maxLength,onChange:t=>{let i=S9(r);i[e.key]=t,n(i)}}):(0,$.jsx)(k9,{value:r[e.key]})]},e.key):null;return(0,$.jsx)(`div`,{children:i.map(e=>e.key in r?e.type===`object`?a(e):e.type===`flow`?o(e):s(e):null)})},{Title:Ote,Text:N9}=Q,{TextArea:kte}=oK;function Ate(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function jte(){let e=Je(),{creatID:t}=Qe(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(`image`),[u,d]=(0,S.useState)({}),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(``),[g,_]=(0,S.useState)(!1),[v,y]=(0,S.useState)(null),[b,x]=(0,S.useState)({}),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(5),[j,M]=(0,S.useState)(`16:9`),[N,P]=(0,S.useState)(`480p`),[F,I]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]}),[L,R]=(0,S.useState)([]),[z,B]=(0,S.useState)(1),[V,H]=(0,S.useState)(20),[U,ee]=(0,S.useState)(0),[te,ne]=(0,S.useState)(``),[W,re]=(0,S.useState)({}),[G,K]=(0,S.useState)([]),[q,ie]=(0,S.useState)([]),J=[{id:1,title:`原始素材`,description:`上传原始视频素材`,childId:1},{id:2,title:`生成提示词`,description:`根据素材生成描述词`,childId:2},{id:3,title:`生成产品融合图`,description:`生成产品与场景融合图`,childId:3},{id:4,title:`生成视频提示词`,description:`生成视频生成提示词`,childId:4},{id:5,title:`生成最终视频`,description:`合成最终视频`,childId:5}].map((e,t)=>({...e,status:G[t]?.status||``,id:G[t]?.id||t,output:G[t]?.output||``,engineId:G[t]?.input?.payload?.videoConfig?.engineId||``}));(0,S.useEffect)(()=>{let e=new Set;q.forEach(t=>{let n=J.find(e=>String(e.childId)===t);n&&(n.status===`completed`||n.status===`failed`)&&e.add(t)});for(let t=J.length-1;t>=0;t--)if(J[t].status===`completed`||J[t].status===`failed`){e.add(String(J[t].childId));break}e.size>0?ie(Array.from(e)):ie([])},[G]);let ae=(e,t,n)=>{h7(e,t,n).then(e=>{e.items&&R(e.items),e.total!==void 0&&ee(e.total)}).catch(e=>{})},oe=(e,t)=>{B(e),H(t),ae(e,t,te)},se=()=>{B(1),ae(1,V,te)};(0,S.useEffect)(()=>{ae(z,V)},[]),(0,S.useEffect)(()=>{s7().then(e=>{if(x(e.engine||{}),e.engine?.video&&e.engine.video.length>0){w(e.engine.video[0].id);let t=e.engine.video[0];I({ratios:t.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions||[`480p`,`720p`,`1080p`],durations:t.supportedDurations||[5,8,10,12,15]})}}).catch(e=>{})},[]),(0,S.useEffect)(()=>()=>{v&&(clearInterval(v),y(null))},[v]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;!t.closest(`.image-settings-trigger`)&&!t.closest(`.image-settings-popover`)&&(E(!1),O(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,S.useEffect)(()=>{t&&g7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},[t]),(0,S.useEffect)(()=>{let e=J[4];e&&e.status!==`completed`&&e.status!==`failed`?v||y(setInterval(ue,15e3)):e&&v&&(clearInterval(v),y(null))},[J]);let ce=(e,t,n,i)=>{l(t||`image`),h(n?String(n):``),t===`video`?(p(i||null),d(e&&typeof e==`object`?Ate(e):{}),a(``)):(p(null),a(e||``),d({})),r(!0)},le=async()=>{if(c===`image`){if(!W?.id||!m){Z.warning(`缺少任务或步骤 ID,无法保存图片提示词`);return}if(!i||!i.trim()){Z.warning(`图片提示词不能为空`);return}_(!0);try{await v7(W.id,m,{prompt:i.trim()}),Z.success(`图片提示词已保存`),de(),r(!1),h(``)}catch(e){Z.error(e?.message||`保存图片提示词失败`)}finally{_(!1)}return}if(!W?.id||!m){Z.warning(`缺少任务或步骤 ID,无法保存视频提示词`);return}if(!u||typeof u!=`object`||Object.keys(u).length===0){Z.warning(`视频提示词不能为空`);return}if(!f){Z.warning(`视频提词配置缺失,暂不能保存`);return}let e=T9(u,f);if(e){Z.warning(e);return}_(!0);try{await D7(W.id,m,{prompt_schema:u}),Z.success(`视频提示词已保存`),de(),r(!1),h(``)}catch(e){Z.error(e?.message||`保存视频提示词失败`)}finally{_(!1)}},ue=()=>{t&&g7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},de=()=>{t&&g7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},fe=e=>{y7(W.id,e.toString(),{engine_id:`0019e3dac0b795b925b`,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`}).then(e=>{de()}).catch(e=>{})},pe=()=>{y7(W.id,J[1].id.toString(),{engine_id:`0019e3dac0b795b925b`,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`}).then(e=>{de()}).catch(e=>{})},me=e=>{let t={engine_id:C,duration:k,aspect_ratio:j,resolution:N,target_platform:`抖音`};b7(W.id,e.toString(),t).then(e=>{de()}).catch(e=>{})},he=(e,t)=>{let n={engine_id:t};x7(W.id,e.toString(),n).then(e=>{de()}).catch(e=>{})},ge=()=>{let e={engine_id:J[3].engineId};x7(W.id,J[2].id.toString(),e).then(e=>{de()}).catch(e=>{})};return(0,$.jsxs)(S.Fragment,{children:[(0,$.jsx)(`div`,{className:`initialinfo-container`,style:{margin:`-24px -32px -32px`,height:`calc(100vh - 34px)`,position:`relative`,boxSizing:`border-box`,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:`2%`,position:`relative`,zIndex:1,minHeight:0},children:[(0,$.jsxs)(`div`,{className:`replication-preview`,style:{flex:4,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,boxSizing:`border-box`},children:[(0,$.jsx)(bD,{type:`text`,icon:(0,$.jsx)(b2,{}),onClick:()=>e(-1),style:{color:`#64748b`,borderRadius:10,fontSize:13,height:32,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`},children:`返回`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`爆款开头复刻 - 任务详情`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(bD,{type:`primary`,ghost:!0,style:{borderRadius:10,padding:`4px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},onClick:()=>s(!0),children:`创作记录`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`},children:(0,$.jsxs)(`div`,{className:`material_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,alignItems:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:W?.material?.materialVideoUrl?(0,$.jsx)(`video`,{controls:!0,src:W.material.materialVideoUrl,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无视频`})})]}),(0,$.jsxs)(`div`,{className:`product_img`,style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`产品图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:W?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:W.material.materialImageUrl,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无图片`})})]})]}),W?.finalImageUrl&&(0,$.jsx)(`div`,{style:{marginTop:16},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalImageUrl}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})}),W?.finalVideoUrl&&(0,$.jsx)(`div`,{style:{marginTop:16},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(`video`,{controls:!0,src:`http://ceshi.apiforeign.minzhong.cn${W.finalVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})})]})})]}),(0,$.jsxs)(`div`,{className:`replication-form`,style:{flex:1,minWidth:`450px`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,gap:10,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`生成步骤`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px 16px 16px`},children:(0,$.jsx)(r_,{activeKey:q,onChange:ie,ghost:!0,bordered:!1,style:{background:`transparent`},expandIconPlacement:`end`,items:J.map(e=>({key:String(e.childId),label:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,width:`100%`,justifyContent:`space-between`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:16,height:16},children:e.status===`completed`?(0,$.jsx)(c4,{style:{fontSize:16,color:`#22c55e`}}):e.status===`processing`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,background:`#ef4444`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:`#fff`,fontSize:10},children:`×`})}):(0,$.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:`#cbd5e1`}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:e.status===`processing`||e.status===`waiting_user`?`#6366f1`:`#1e293b`,fontWeight:500},children:e.title}),(e.status===`processing`||e.status===`waiting_user`)&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`,marginLeft:8},children:`生成中`}),e.status===`failed`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`,marginLeft:8},children:`失败`}),e.status===``&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#717d8b`,marginLeft:8},children:`待生成`})]})}),children:(0,$.jsxs)(`div`,{style:{padding:`16px`,background:`linear-gradient(135deg, rgba(248,250,252,0.6) 0%, rgba(238,242,255,0.4) 100%)`,borderRadius:12,marginTop:8,border:`1px solid rgba(99, 102, 241, 0.06)`},children:[e.childId===1&&(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,marginBottom:20,alignItems:`flex-start`,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(N9,{style:{color:`#475569`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`原视频`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},children:W?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:W.material.materialVideoUrl,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10},controls:!0}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,height:`16`,rx:`2`,ry:`2`}),(0,$.jsx)(`path`,{d:`M8 12l4 2 4-2`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无视频`})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(N9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`产品图片`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:10,background:`#f1f5f9`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:W?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:W.material.materialImageUrl,alt:`产品图片`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10}}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,$.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`,fill:`currentColor`}),(0,$.jsx)(`path`,{d:`M21 15l-5-5L5 21`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无图片`})]})})]})]})}),e.childId===2&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(N9,{style:{color:`#475569`,fontSize:13,lineHeight:1.8,whiteSpace:`pre-wrap`},children:e?.output?.payload?.prompt||`暂无提示词`})}),(0,$.jsxs)(jU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(bD,{type:`default`,icon:(0,$.jsx)(F$,{}),onClick:()=>ce(e?.output?.payload?.prompt,`image`,e.id),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`修改提示词`}),(0,$.jsx)(bD,{onClick:()=>{Z.info(`正在生成图片,请稍候...`),fe(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片`})]})]}),e.childId===3&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`,position:`relative`},children:[W.finalImageUrl?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalImageUrl}`,alt:`融合图`,style:{width:`100%`,height:180,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无融合图`}),(0,$.jsx)(bD,{type:`default`,icon:(0,$.jsx)(F$,{}),onClick:()=>pe(),disabled:e.status!==`completed`,style:{position:`absolute`,bottom:8,left:8,borderRadius:8,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:30,fontWeight:500,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(4px)`,padding:`0 12px`,fontSize:12},children:`重新生成`})]}),(0,$.jsx)(`p`,{style:{marginBottom:6,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`视频参数选择:`}),(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{E(!T),O(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(q6,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(N9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:b.video?.find(e=>e.id===C)?.name||`选择引擎`})]}),T&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-10,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(N9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:b.video?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{w(e.id),I({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(j)||M(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(N)||P(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(k)||A(e.supportedDurations?.[0]||5),E(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:C===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:C===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:C===e.id?600:500,color:C===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{O(!D),E(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(M3,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(N9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[j,` · `,k,`s · `,N]})]}),D&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(N9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:F.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>M(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:j===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:j===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${j===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:j===e?`#6366f1`:`#6b7280`,fontWeight:j===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(N9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(k-Math.min(...F.durations))/(Math.max(...F.durations)-Math.min(...F.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...F.durations),max:Math.max(...F.durations),value:k,onChange:e=>A(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:k}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(N9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:F.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>P(e),style:{flex:1,height:42,borderRadius:6,border:N===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:N===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:N===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(bD,{type:`primary`,style:{width:`100%`,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},onClick:()=>{Z.info(`正在生成视频提示词,请稍候...`),me(e.id)},disabled:e.status!==`completed`,children:`下一步:生成视频提示词`})]}),e.childId===4&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(N9,{style:{color:`#64748b`,fontSize:13,lineHeight:1.8},children:`视频提词已生成,可点击按钮查看/修改`})}),(0,$.jsxs)(jU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(bD,{type:`default`,icon:(0,$.jsx)(F$,{}),onClick:()=>ce(W?.videoGeneration?.promptSchema,`video`,e.id,W?.videoGeneration?.schemaConfigSnapshot),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`||!W?.videoGeneration?.promptSchema||!W?.videoGeneration?.schemaConfigSnapshot,children:`查看/修改视频提词`}),(0,$.jsx)(bD,{onClick:()=>{Z.info(`正在生成视频,请稍候...`),he(e.id,e.engineId)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成视频`})]})]}),e.childId===5&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,position:`relative`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},children:e.status===`completed`&&W?.finalVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalVideoUrl}`,style:{width:`100%`,height:180,objectFit:`cover`},controls:!0}):e.status===`processing`?(0,$.jsxs)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:20,height:20,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}),(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontSize:14},children:`视频生成中...`})]}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#ef4444`,fontSize:14},children:`视频生成失败`}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无视频`})}),(0,$.jsxs)(jU,{style:{width:`100%`,gap:12},children:[(0,$.jsx)(bD,{onClick:()=>ge(),type:`default`,icon:(0,$.jsx)(F$,{}),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`重新生成`}),(0,$.jsx)(bD,{type:`primary`,icon:(0,$.jsx)(_0,{}),style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,onClick:()=>{let e=`http://ceshi.apiforeign.minzhong.cn${W?.finalVideoUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=`video_${Date.now()}.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},children:`下载视频`})]})]})]})}))})})]})]})}),(0,$.jsx)(Rq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:c===`video`?`查看/编辑视频提词`:`修改提示词`})]}),open:n,onCancel:()=>{g||r(!1)},footer:[(0,$.jsx)(bD,{onClick:()=>r(!1),disabled:g,style:{borderRadius:8},children:`取消`},`cancel`),(0,$.jsx)(bD,{type:`primary`,onClick:le,loading:g,disabled:g,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`确认`},`confirm`)],width:800,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`},body:{background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,padding:`20px 24px`}},children:c===`image`?(0,$.jsx)(kte,{value:i,onChange:e=>a(e.target.value),rows:8,style:{width:`100%`,height:300,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},placeholder:`请输入提示词`}):(0,$.jsx)(`div`,{style:{maxHeight:500,overflowY:`auto`,paddingRight:10},children:(0,$.jsx)(M9,{value:u,schemaConfigSnapshot:f,onChange:d})})}),(0,$.jsxs)(Rq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`创作记录`})]}),open:o,onCancel:()=>s(!1),width:850,footer:null,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`},body:{background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginBottom:16},children:[(0,$.jsx)(oK,{placeholder:`搜索产品名称`,value:te,onChange:e=>ne(e.target.value),onPressEnter:se,style:{width:200,borderRadius:8,marginRight:8,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`}}),(0,$.jsx)(bD,{type:`primary`,onClick:se,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},children:`搜索`})]}),(0,$.jsx)(g$,{columns:[{title:`产品名称`,dataIndex:`targetProjectName`,key:`targetProjectName`,align:`center`},{title:`状态`,dataIndex:`status`,key:`status`,align:`center`,render:(e,t)=>{let n=e,r=t.current_step_code||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#666`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else return{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#666`}})();return typeof i==`string`?(0,$.jsx)(`span`,{style:{fontSize:12,color:`#666`,fontWeight:500},children:i}):(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,align:`center`,render:e=>{if(!e)return`-`;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`}},{title:`操作`,key:`action`,align:`center`,render:(t,n)=>(0,$.jsx)(`button`,{onClick:()=>e(`/initial/${n.id}/initialinfo`),style:{color:`#6366f1`,textDecoration:`none`,fontSize:12,border:`none`,background:`rgba(99, 102, 241, 0.08)`,padding:`4px 12px`,borderRadius:8,cursor:`pointer`,transition:`all 0.2s`,fontWeight:500},children:`查看详情`})}],dataSource:L,rowKey:`id`,pagination:{current:z,pageSize:V,total:U,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:oe},style:{fontSize:13},scroll:{y:350}})]})]})}function Mte(){let e=Je(),[t,n]=(0,S.useState)(``),[r,i]=(0,S.useState)(``),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(``),[l,u]=(0,S.useState)(0),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)(1),[_,v]=(0,S.useState)(10),[y,b]=(0,S.useState)(0),[x,C]=(0,S.useState)(``),w=(0,S.useRef)(null),T=(0,S.useRef)(null),E=(0,S.useCallback)(()=>{t&&URL.revokeObjectURL(t),n(``),i(``),u(0),c(``)},[t]),D=async e=>{if(!e.type.startsWith(`video/`))return i(`请选择视频文件`),!1;if(e.size>100*1024*1024)return i(`视频文件大小不能超过 100MB`),!1;if(await new Promise(t=>{let n=document.createElement(`video`);n.preload=`metadata`,n.onloadedmetadata=()=>{t(n.duration),URL.revokeObjectURL(n.src)},n.onerror=()=>{t(0)},n.src=URL.createObjectURL(e)})>60)return i(`视频时长不能超过 1分钟`),!1;E(),f(!0);try{n((await B5(e)).url),i(``),Z.success(`视频上传成功`)}catch{i(`视频上传失败,请重试`),Z.error(`视频上传失败`)}finally{f(!1)}return!1},O=(0,S.useCallback)(()=>{w.current&&u(w.current.duration)},[]),k=async()=>{if(!t||!s.trim()){Z.warning(`请先上传视频并输入产品名称`);return}f(!0);try{O7({video_url:t,video_duration_seconds:l,title:s.trim(),idempotency_key:`shot_${Date.now()}`}).then(t=>{k7(1,20,x).then(t=>{Z.loading(`创建中...`,3),setTimeout(()=>{e(`/removelens/${t.items[0].id}/removeinfo`)},3e3)})}),E()}catch{Z.error(`任务创建失败,请重试`)}finally{f(!1)}},A=async(e,t,n)=>{try{let r=await k7(e,t,n);m(r.items||[]),b(r.total||0),g(e),v(t)}catch{Z.error(`获取列表失败`)}},j=(e,t)=>{A(e,t,x)},M=()=>{A(1,10,x)};return(0,$.jsx)(`div`,{style:{margin:`-24px -32px -32px`,borderRadius:20,minHeight:`calc(100vh - 34px)`,overflow:`auto`,background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,position:`relative`,padding:`20px 32px`,backgroundImage:`url(${hte})`,backgroundRepeat:`no-repeat`,backgroundSize:`100% 100%`,backgroundPosition:`center`},children:(0,$.jsxs)(`div`,{style:{maxWidth:1200,margin:`50px auto`,position:`relative`,zIndex:10},children:[(0,$.jsxs)(`div`,{style:{marginBottom:50,height:160,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(`div`,{style:{width:40,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h1`,{style:{fontSize:24,fontWeight:700,margin:0,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`AI视频拆镜工作台`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`一键拆解画面分镜,助力仿拍或创作`})]}),(0,$.jsx)(`div`,{style:{width:40,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(bD,{type:`text`,icon:(0,$.jsx)(IU,{}),onClick:()=>{o(!0),A(1,10,x)},style:{fontSize:14,color:`#6366f1`,background:`rgba(99, 102, 241, 0.1)`,borderRadius:12,padding:`10px 20px`,display:`flex`,alignItems:`center`,gap:8,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`},children:`创作记录`})]}),(0,$.jsxs)(`div`,{style:{width:`100%`,maxWidth:720,margin:`0 auto`},children:[r&&(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(239, 68, 68, 0.2)`,borderRadius:12,padding:`14px 20px`,marginBottom:24,color:`#ef4444`,fontSize:14,textAlign:`center`,fontWeight:500},children:r}),!t&&(0,$.jsxs)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%)`,backdropFilter:`blur(20px)`,borderRadius:24,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(C0.Dragger,{accept:`video/*`,beforeUpload:D,showUploadList:!1,disabled:d,style:{background:d?`rgba(243, 244, 246, 0.3)`:`transparent`,border:`2px dashed ${d?`rgba(209, 213, 219, 0.5)`:`rgba(99, 102, 241, 0.3)`}`,borderRadius:24,padding:`56px 20px`,cursor:d?`not-allowed`:`pointer`,margin:0},children:d?(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:100,height:100,margin:`0 auto 20px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:24,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:40,height:40,border:`4px solid #6366f1`,borderTopColor:`transparent`,borderRadius:`50%`,animation:`spin 1s linear infinite`}})}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#6366f1`,margin:`0 0 8px 0`,fontWeight:600},children:`上传中...`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:0},children:`请稍候,视频正在上传`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:100,height:100,margin:`0 auto 20px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:24,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(b4,{style:{fontSize:40,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#1e293b`,margin:`0 0 8px 0`,fontWeight:600},children:`点击或拖拽到此上传视频文件`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:0},children:`支持 MP4、MOV 格式视频,最大支持 100MB 的文件,支持上传 1 分钟内的视频`})]})})]}),t&&(0,$.jsxs)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%)`,backdropFilter:`blur(20px)`,borderRadius:24,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,overflow:`hidden`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsxs)(`div`,{style:{borderRadius:22,background:`#ffffff`,padding:`24px`,position:`relative`,zIndex:1},children:[(0,$.jsx)(Hq,{title:`确定要删除吗?`,okText:`确定`,cancelText:`取消`,onConfirm:E,children:(0,$.jsx)(`button`,{style:{position:`absolute`,top:20,right:20,width:36,height:36,border:`1px solid rgba(99, 102, 241, 0.2)`,background:`rgba(99, 102, 241, 0.05)`,borderRadius:10,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:16,color:`#6366f1`,zIndex:10,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`,e.currentTarget.style.borderColor=`rgba(239, 68, 68, 0.3)`,e.currentTarget.style.color=`#ef4444`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`,e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.2)`,e.currentTarget.style.color=`#6366f1`},children:`🗑️`})}),(0,$.jsx)(`div`,{style:{textAlign:`center`,marginBottom:20},children:(0,$.jsx)(`video`,{ref:w,src:`http://ceshi.apiforeign.minzhong.cn${t}`,controls:!0,onLoadedMetadata:O,style:{maxWidth:`100%`,maxHeight:320,borderRadius:12,background:`#000`,boxShadow:`0 4px 16px rgba(0,0,0,0.1)`}})}),(0,$.jsxs)(`div`,{style:{marginBottom:24},children:[(0,$.jsxs)(`label`,{style:{display:`block`,fontSize:14,fontWeight:500,color:`#334155`,marginBottom:8},children:[`产品名称 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(oK,{placeholder:`请输入产品名称`,value:s,onChange:e=>c(e.target.value),style:{width:`100%`,height:44,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.4)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.2)`}})]}),(0,$.jsx)(`div`,{style:{textAlign:`center`,marginTop:16},children:(0,$.jsx)(`button`,{onClick:k,disabled:!t||!s.trim()||d,style:{padding:`14px 56px`,background:t&&s.trim()&&!d?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`:`#e2e8f0`,color:`white`,border:`none`,borderRadius:12,fontSize:15,fontWeight:600,cursor:t&&s.trim()&&!d?`pointer`:`not-allowed`,boxShadow:t&&s.trim()&&!d?`0 6px 20px rgba(99, 102, 241, 0.3)`:`none`,display:`inline-flex`,alignItems:`center`,gap:10,transition:`all 0.3s ease`},onMouseEnter:e=>{t&&s.trim()&&!d&&(e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 8px 25px rgba(99, 102, 241, 0.4)`)},onMouseLeave:e=>{t&&s.trim()&&!d&&(e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.3)`)},children:(0,$.jsx)(`span`,{children:d?`创建中...`:`创建`})})})]})]}),(0,$.jsx)(`canvas`,{ref:T,style:{display:`none`}}),(0,$.jsxs)(Rq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`创作记录`})]}),open:a,onCancel:()=>o(!1),width:800,footer:null,styles:{body:{background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginBottom:16,gap:8},children:[(0,$.jsx)(oK,{placeholder:`搜索产品名称`,value:x,onChange:e=>C(e.target.value),onPressEnter:M,style:{width:200,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,height:40}}),(0,$.jsx)(bD,{type:`primary`,onClick:M,style:{borderRadius:10,height:40,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%)`,backdropFilter:`blur(20px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(g$,{columns:[{title:`产品名称`,dataIndex:`title`,key:`title`,render:e=>(0,$.jsx)(`span`,{style:{fontSize:14,color:`#1e293b`,fontWeight:500},children:e})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:13,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,render:t=>(0,$.jsx)(bD,{type:`text`,onClick:()=>e(`/removelens/${t.id}/removeinfo`),style:{color:`#6366f1`,fontSize:13,padding:`4px 12px`,borderRadius:6,background:`rgba(99, 102, 241, 0.1)`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`},children:`查看详情`})}],dataSource:p,rowKey:`id`,pagination:{current:h,pageSize:_,total:y,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:j,style:{padding:`16px 24px`,borderTop:`1px solid rgba(99, 102, 241, 0.1)`}},style:{fontSize:13},scroll:{y:350},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(99, 102, 241, 0.03)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})})]})]})]})})}var Nte=c(o(((e,t)=>{(function(n){typeof e==`object`&&t!==void 0?t.exports=n():typeof define==`function`&&define.amd?define([],n):(typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this).JSZip=n()})(function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var c=typeof l==`function`&&l;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var u=Error(`Cannot find module '`+o+`'`);throw u.code=`MODULE_NOT_FOUND`,u}var d=n[o]={exports:{}};t[o][0].call(d.exports,function(e){var n=t[o][1][e];return i(n||e)},d,d.exports,e,t,n,r)}return n[o].exports}for(var a=typeof l==`function`&&l,o=0;o>2,s=(3&t)<<4|n>>4,c=1>6:64,l=2>4,n=(15&o)<<4|(s=a.indexOf(e.charAt(l++)))>>2,r=(3&s)<<6|(c=a.indexOf(e.charAt(l++))),f[u++]=t,s!==64&&(f[u++]=n),c!==64&&(f[u++]=r);return f}},{"./support":30,"./utils":32}],2:[function(e,t,n){var r=e(`./external`),i=e(`./stream/DataWorker`),a=e(`./stream/Crc32Probe`),o=e(`./stream/DataLengthProbe`);function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o(`data_length`)),t=this;return e.on(`end`,function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw Error(`Bug : uncompressed data size mismatch`)}),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo(`compressedSize`,this.compressedSize).withStreamInfo(`uncompressedSize`,this.uncompressedSize).withStreamInfo(`crc32`,this.crc32).withStreamInfo(`compression`,this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new a).pipe(new o(`uncompressedSize`)).pipe(t.compressWorker(n)).pipe(new o(`compressedSize`)).withStreamInfo(`compression`,t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){var r=e(`./stream/GenericWorker`);n.STORE={magic:`\0\0`,compressWorker:function(){return new r(`STORE compression`)},uncompressWorker:function(){return new r(`STORE decompression`)}},n.DEFLATE=e(`./flate`)},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){var r=e(`./utils`),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return e!==void 0&&e.length?r.getTypeOf(e)===`string`?function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){var r=null;r=typeof Promise<`u`?Promise:e(`lie`),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){var r=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Uint32Array<`u`,i=e(`pako`),a=e(`./utils`),o=e(`./stream/GenericWorker`),s=r?`uint8array`:`array`;function c(e,t){o.call(this,`FlateWorker/`+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic=`\b\0`,a.inherits(c,o),c.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(s,e.data),!1)},c.prototype.flush=function(){o.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new c(`Deflate`,e)},n.uncompressWorker=function(){return new c(`Inflate`,{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){function r(e,t){var n,r=``;for(n=0;n>>=8;return r}function i(e,t,n,i,o,u){var d,f,p=e.file,m=e.compression,h=u!==s.utf8encode,g=a.transformTo(`string`,u(p.name)),_=a.transformTo(`string`,s.utf8encode(p.name)),v=p.comment,y=a.transformTo(`string`,u(v)),b=a.transformTo(`string`,s.utf8encode(v)),x=_.length!==p.name.length,S=b.length!==v.length,C=``,w=``,T=``,E=p.dir,D=p.date,O={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(O.crc32=e.crc32,O.compressedSize=e.compressedSize,O.uncompressedSize=e.uncompressedSize);var k=0;t&&(k|=8),h||!x&&!S||(k|=2048);var A=0,j=0;E&&(A|=16),o===`UNIX`?(j=798,A|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,E)):(j=20,A|=function(e){return 63&(e||0)}(p.dosPermissions)),d=D.getUTCHours(),d<<=6,d|=D.getUTCMinutes(),d<<=5,d|=D.getUTCSeconds()/2,f=D.getUTCFullYear()-1980,f<<=4,f|=D.getUTCMonth()+1,f<<=5,f|=D.getUTCDate(),x&&(w=r(1,1)+r(c(g),4)+_,C+=`up`+r(w.length,2)+w),S&&(T=r(1,1)+r(c(y),4)+b,C+=`uc`+r(T.length,2)+T);var M=``;return M+=` -\0`,M+=r(k,2),M+=m.magic,M+=r(d,2),M+=r(f,2),M+=r(O.crc32,4),M+=r(O.compressedSize,4),M+=r(O.uncompressedSize,4),M+=r(g.length,2),M+=r(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+M+g+C,dirRecord:l.CENTRAL_FILE_HEADER+r(j,2)+M+r(y.length,2)+`\0\0\0\0`+r(A,4)+r(i,4)+g+C+y}}var a=e(`../utils`),o=e(`../stream/GenericWorker`),s=e(`../utf8`),c=e(`../crc32`),l=e(`../signature`);function u(e,t,n,r){o.call(this,`ZipFileWorker`),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo(`string`,this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){var r=e(`./Uint8ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){var r=e(`./DataReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){var r=e(`./ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array;var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){var r=e(`../utils`),i=e(`../support`),a=e(`./ArrayReader`),o=e(`./StringReader`),s=e(`./NodeBufferReader`),c=e(`./Uint8ArrayReader`);t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),t!==`string`||i.uint8array?t===`nodebuffer`?new s(e):i.uint8array?new c(r.transformTo(`uint8array`,e)):new a(r.transformTo(`array`,e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){n.LOCAL_FILE_HEADER=`PK`,n.CENTRAL_FILE_HEADER=`PK`,n.CENTRAL_DIRECTORY_END=`PK`,n.ZIP64_CENTRAL_DIRECTORY_LOCATOR=`PK\x07`,n.ZIP64_CENTRAL_DIRECTORY_END=`PK`,n.DATA_DESCRIPTOR=`PK\x07\b`},{}],24:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../utils`);function a(e){r.call(this,`ConvertWorker to `+e),this.destType=e}i.inherits(a,r),a.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../crc32`);function a(){r.call(this,`Crc32Probe`),this.withStreamInfo(`crc32`,0)}e(`../utils`).inherits(a,r),a.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataLengthProbe for `+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(a,i),a.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataWorker`);var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=``,this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}r.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case`string`:e=this.data.substring(this.index,t);break;case`uint8array`:e=this.data.subarray(this.index,t);break;case`array`:case`nodebuffer`:e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){function r(e){this.name=e||`default`,this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit(`data`,e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(`end`),this.cleanUp(),this.isFinished=!0}catch(e){this.emit(`error`,e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit(`error`,e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n `+e:e}},t.exports=r},{}],29:[function(e,t,n){var r=e(`../utils`),i=e(`./ConvertWorker`),a=e(`./GenericWorker`),o=e(`../base64`),s=e(`../support`),c=e(`../external`),l=null;if(s.nodestream)try{l=e(`../nodejs/NodejsStreamOutputAdapter`)}catch{}function u(e,t){return new c.Promise(function(n,i){var a=[],s=e._internalType,c=e._outputType,l=e._mimeType;e.on(`data`,function(e,n){a.push(e),t&&t(n)}).on(`error`,function(e){a=[],i(e)}).on(`end`,function(){try{n(function(e,t,n){switch(e){case`blob`:return r.newBlob(r.transformTo(`arraybuffer`,t),n);case`base64`:return o.encode(t);default:return r.transformTo(e,t)}}(c,function(e,t){var n,r=0,i=null,a=0;for(n=0;n`u`)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=new Blob([r],{type:`application/zip`}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),n.blob=i.getBlob(`application/zip`).size===0}catch{n.blob=!1}}}try{n.nodestream=!!e(`readable-stream`).Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){for(var r=e(`./utils`),i=e(`./support`),a=e(`./nodejsUtils`),o=e(`./stream/GenericWorker`),s=Array(256),c=0;c<256;c++)s[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;s[254]=s[254]=1;function l(){o.call(this,`utf-8 decode`),this.leftOver=null}function u(){o.call(this,`utf-8 encode`)}n.utf8encode=function(e){return i.nodebuffer?a.newBufferFrom(e,`utf-8`):function(e){var t,n,r,a,o,s=e.length,c=0;for(a=0;a>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo(`nodebuffer`,e).toString(`utf-8`):function(e){var t,n,i,a,o=e.length,c=Array(2*o);for(t=n=0;t>10&1023,c[n++]=56320|1023&i)}return c.length!==n&&(c.subarray?c=c.subarray(0,n):c.length=n),r.applyFromCharCode(c)}(e=r.transformTo(i.uint8array?`uint8array`:`array`,e))},r.inherits(l,o),l.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?`uint8array`:`array`,e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=t;(t=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),t.set(a,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+s[e[n]]>t?n:t}(t),c=t;o!==t.length&&(i.uint8array?(c=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(c=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:n.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=l,r.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){var r=e(`./support`),i=e(`./base64`),a=e(`./nodejsUtils`),o=e(`./external`);function s(e){return e}function c(e,t){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),e==0&&(this.dosPermissions=63&this.externalFileAttributes),e==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!==`/`||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||={};e.index+4>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},n.buf2binstring=function(e){return c(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n>10&1023,l[r++]=56320|1023&i)}return c(l,r)},n.utf8border=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+o[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){t.exports=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;n!==0;){for(n-=o=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s>>8^a[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){var r,i=e(`../utils/common`),a=e(`./trees`),o=e(`./adler32`),s=e(`./crc32`),c=e(`./messages`),l=0,u=4,d=0,f=-2,p=-1,m=4,h=2,g=8,_=9,v=286,y=30,b=19,x=2*v+1,S=15,C=3,w=258,T=w+C+1,E=42,D=113,O=1,k=2,A=3,j=4;function M(e,t){return e.msg=c[t],t}function N(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),n!==0&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function I(e,t){a._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function L(e,t){e.pending_buf[e.pending++]=t}function R(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function z(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-T?e.strstart-(e.w_size-T):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+w,p=l[a+o-1],m=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do if(l[(n=t)+o]===m&&l[n+o-1]===p&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do;while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&ac&&--i!=0);return o<=e.lookahead?o:e.lookahead}function B(e){var t,n,r,a,c,l,u,d,f,p,m=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-T)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);a+=m}if(e.strm.avail_in===0)break;if(l=e.strm,u=e.window,d=e.strstart+e.lookahead,f=a,p=void 0,p=l.avail_in,f=C)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C)if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-C,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(B(e),e.lookahead===0&&t===l)return O;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,I(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-T&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):(e.strstart>e.block_start&&(I(e,!1),e.strm.avail_out),O)}),new U(4,4,8,4,V),new U(4,5,16,8,V),new U(4,6,32,32,V),new U(4,4,16,16,H),new U(8,16,32,32,H),new U(8,16,128,128,H),new U(8,32,128,256,H),new U(32,128,258,1024,H),new U(32,258,258,4096,H)],n.deflateInit=function(e,t){return W(e,t,g,15,8,0)},n.deflateInit2=W,n.deflateReset=ne,n.deflateResetKeep=te,n.deflateSetHeader=function(e,t){return e&&e.state&&e.state.wrap===2?(e.state.gzhead=t,d):f},n.deflate=function(e,t){var n,i,o,c;if(!e||!e.state||5>8&255),L(i,i.gzhead.time>>16&255),L(i,i.gzhead.time>>24&255),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(L(i,255&i.gzhead.extra.length),L(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(L(i,0),L(i,0),L(i,0),L(i,0),L(i,0),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,3),i.status=D);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:i.level===6?2:3)<<6,i.strstart!==0&&(p|=32),p+=31-p%31,i.status=D,R(i,p),i.strstart!==0&&(R(i,e.adler>>>16),R(i,65535&e.adler)),e.adler=1}if(i.status===69)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending!==i.pending_buf_size));)L(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(i.status===73)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.gzindex=0,i.status=91)}else i.status=91;if(i.status===91)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.status=103)}else i.status=103;if(i.status===103&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&F(e),i.pending+2<=i.pending_buf_size&&(L(i,255&e.adler),L(i,e.adler>>8&255),e.adler=0,i.status=D)):i.status=D),i.pending!==0){if(F(e),e.avail_out===0)return i.last_flush=-1,d}else if(e.avail_in===0&&N(t)<=N(n)&&t!==u)return M(e,-5);if(i.status===666&&e.avail_in!==0)return M(e,-5);if(e.avail_in!==0||i.lookahead!==0||t!==l&&i.status!==666){var m=i.strategy===2?function(e,t){for(var n;;){if(e.lookahead===0&&(B(e),e.lookahead===0)){if(t===l)return O;break}if(e.match_length=0,n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):i.strategy===3?function(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=w){if(B(e),e.lookahead<=w&&t===l)return O;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=C&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(n=a._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):r[i.level].func(i,t);if(m!==A&&m!==j||(i.status=666),m===O||m===A)return e.avail_out===0&&(i.last_flush=-1),d;if(m===k&&(t===1?a._tr_align(i):t!==5&&(a._tr_stored_block(i,0,0,!1),t===3&&(P(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),F(e),e.avail_out===0))return i.last_flush=-1,d}return t===u?i.wrap<=0?1:(i.wrap===2?(L(i,255&e.adler),L(i,e.adler>>8&255),L(i,e.adler>>16&255),L(i,e.adler>>24&255),L(i,255&e.total_in),L(i,e.total_in>>8&255),L(i,e.total_in>>16&255),L(i,e.total_in>>24&255)):(R(i,e.adler>>>16),R(i,65535&e.adler)),F(e),0=n.w_size&&(s===0&&(P(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),c=e.avail_in,l=e.next_in,u=e.input,e.avail_in=m,e.next_in=0,e.input=t,B(n);n.lookahead>=C;){for(r=n.strstart,a=n.lookahead-(C-1);n.ins_h=(n.ins_h<>>=b=y>>>24,m-=b,(b=y>>>16&255)==0)E[a++]=65535&y;else{if(!(16&b)){if(!(64&b)){y=h[(65535&y)+(p&(1<>>=b,m-=b),m<15&&(p+=T[r++]<>>=b=y>>>24,m-=b,!(16&(b=y>>>16&255))){if(!(64&b)){y=g[(65535&y)+(p&(1<>>=b,m-=b,(b=a-o)>3,p&=(1<<(m-=x<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=1&t.wrap),t.mode=f,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(p),t.distcode=t.distdyn=new r.Buf32(m),t.sane=1,t.back=-1,u):d}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,_(e)):d}function y(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(a=o.wsize-o.wnext)&&(a=i),r.arraySet(o.window,t,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=a(n.check,B,2,0),x=b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg=`incorrect header check`,n.mode=30;break}if((15&b)!=8){e.msg=`unknown compression method`,n.mode=30;break}if(x-=4,F=8+(15&(b>>>=4)),n.wbits===0)n.wbits=F;else if(F>n.wbits){e.msg=`invalid window size`,n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=3;case 3:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>8&255,B[2]=b>>>16&255,B[3]=b>>>24&255,n.check=a(n.check,B,4,0)),x=b=0,n.mode=4;case 4:for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>8),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>>8&255,n.check=a(n.check,B,2,0)),x=b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(E=n.length)&&(E=v),E&&(n.head&&(F=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,E,F)),512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(v===0)break e;for(E=0;F=p[g+ E++],n.head&&F&&n.length<65536&&(n.head.name+=String.fromCharCode(F)),F&&E>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(v===0)break e;v--,b+=p[g++]<>>=1)){case 0:n.mode=14;break;case 1:if(w(n),n.mode=20,t!==6)break;b>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg=`invalid block type`,n.mode=30}b>>>=2,x-=2;break;case 14:for(b>>>=7&x,x-=7&x;x<32;){if(v===0)break e;v--,b+=p[g++]<>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=30;break}if(n.length=65535&b,x=b=0,n.mode=15,t===6)break e;case 15:n.mode=16;case 16:if(E=n.length){if(v>>=5,x-=5,n.ndist=1+(31&b),b>>>=5,x-=5,n.ncode=4+(15&b),b>>>=4,x-=4,286>>=3,x-=3}for(;n.have<19;)n.lens[V[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,L={bits:n.lenbits},I=s(0,n.lens,0,19,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid code lengths set`,n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=k,x-=k,n.lens[n.have++]=j;else{if(j===16){for(R=k+2;x>>=k,x-=k,n.have===0){e.msg=`invalid bit length repeat`,n.mode=30;break}F=n.lens[n.have-1],E=3+(3&b),b>>>=2,x-=2}else if(j===17){for(R=k+3;x>>=k)),b>>>=3,x-=3}else{for(R=k+7;x>>=k)),b>>>=7,x-=7}if(n.have+E>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=30;break}for(;E--;)n.lens[n.have++]=F}}if(n.mode===30)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=30;break}if(n.lenbits=9,L={bits:n.lenbits},I=s(c,n.lens,0,n.nlen,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid literal/lengths set`,n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,L={bits:n.distbits},I=s(l,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,L),n.distbits=L.bits,I){e.msg=`invalid distances set`,n.mode=30;break}if(n.mode=20,t===6)break e;case 20:n.mode=21;case 21:if(6<=v&&258<=y){e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,o(e,C),_=e.next_out,m=e.output,y=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,b=n.hold,x=n.bits,n.mode===12&&(n.back=-1);break}for(n.back=0;A=(z=n.lencode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,n.length=j,A===0){n.mode=26;break}if(32&A){n.back=-1,n.mode=12;break}if(64&A){e.msg=`invalid literal/length code`,n.mode=30;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(z=n.distcode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,64&A){e.msg=`invalid distance code`,n.mode=30;break}n.offset=j,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=30;break}n.mode=25;case 25:if(y===0)break e;if(E=C-y,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break}D=E>n.wnext?(E-=n.wnext,n.wsize-E):n.wnext-E,E>n.length&&(E=n.length),O=n.window}else O=m,D=_-n.offset,E=n.length;for(yv?(b=L[R+d[w]],N[P+d[w]]):(b=96,0),p=1<>k)+(m-=p)]=y<<24|b<<16|x|0,m!==0;);for(p=1<>=1;if(p===0?M=0:(M&=p-1,M+=p),w++,--F[C]==0){if(C===E)break;C=t[n+d[w]]}if(D>>7)]}function L(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function R(e,t,n){e.bi_valid>h-n?(e.bi_buf|=t<>h-e.bi_valid,e.bi_valid+=n-h):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function V(e,t,n){var r,i,a=Array(m+1),o=0;for(r=1;r<=m;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];s!==0&&(e[2*i]=B(a[s]++,s))}}function H(e){var t;for(t=0;t>1;1<=n;n--)te(e,a,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],te(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,te(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,o,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,g=t.stat_desc.max_length,_=0;for(a=0;a<=m;a++)e.bl_count[a]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n>=7;r>>=1)if(1&n&&e.dyn_ltree[2*t]!==0)return i;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return a;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=n+5,n+4<=o&&t!==-1?q(e,t,n,r):e.strategy===4||s===o?(R(e,2+ +!!r,3),ne(e,T,E)):(R(e,4+ +!!r,3),function(e,t,n,r){var i;for(R(e,t-257,5),R(e,n-1,5),R(e,r-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(O[n]+l+1)]++,e.dyn_dtree[2*I(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){R(e,2,3),z(e,_,T),function(e){e.bi_valid===16?(L(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){(function(e,t){if(!e.setImmediate){var n,r,i,a,o=1,s={},c=!1,l=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,n={}.toString.call(e.process)===`[object process]`?function(e){process.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage(``,`*`),e.onmessage=n,t}}()?(a=`setImmediate$`+Math.random()+`$`,e.addEventListener?e.addEventListener(`message`,p,!1):e.attachEvent(`onmessage`,p),function(t){e.postMessage(a+t,`*`)}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):l&&`onreadystatechange`in l.createElement(`script`)?(r=l.documentElement,function(e){var t=l.createElement(`script`);t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(f,0,e)},u.setImmediate=function(e){typeof e!=`function`&&(e=Function(``+e));for(var t=Array(arguments.length-1),r=0;r`u`?e===void 0?this:e:self)}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{}]},{},[10])(10)})}))(),1),{Search:Pte}=oK,{Text:Fte}=Q,Ite=()=>{let[e,t]=(0,S.useState)(`project`),[n,r]=(0,S.useState)(`video`),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)({page:1,pageSize:10}),[c,l]=(0,S.useState)(0),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(new Set),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(null),v=S.createRef(),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),[E,D]=(0,S.useState)([]),[O,k]=(0,S.useState)(``),[A,j]=(0,S.useState)([]),[M,N]=(0,S.useState)(!1),[P,F]=(0,S.useState)(0),[I,L]=(0,S.useState)(void 0),[R,z]=(0,S.useState)(new Map),[B,V]=(0,S.useState)(``),H=(0,S.useRef)(null),[U,ee]=(0,S.useState)(1),[te,ne]=(0,S.useState)(10),[W,re]=(0,S.useState)(!1),[G,K]=(0,S.useState)(!1),[q,ie]=(0,S.useState)([]),[J,ae]=(0,S.useState)(0),[oe,se]=(0,S.useState)(1),[ce,le]=(0,S.useState)(10),[ue,de]=(0,S.useState)(!1),[fe,pe]=(0,S.useState)(``),[me,he]=(0,S.useState)(!1),[ge,_e]=(0,S.useState)(new Set),ve=null,ye=new Map,be=[],xe=0,Se=0,Ce=(e,t,n)=>{if(n&&Se<8)Se++,xe++,e();else if(xe<15)xe++,e();else{let r={callback:e,priority:n?2:1,element:t};be.push(r),be.sort((e,t)=>t.priority-e.priority)}},we=()=>{if(xe--,Se>0&&Se--,be.length>0){let e=be.shift();e&&(xe++,e.priority===2&&Se++,e.callback())}},Te=()=>(ve||=new IntersectionObserver(e=>{e.forEach(e=>{let t=ye.get(e.target);if(e.isIntersecting&&t){ye.delete(e.target),ve?.unobserve(e.target);let n=e.intersectionRatio>=1;Ce(t,e.target,n)}})},{rootMargin:`400px`,threshold:[.01,.5,1]}),ve),Ee=e=>{if(!e)return null;try{let t=new URL(e).searchParams.get(`exp`);return t?parseInt(t,10):null}catch{try{let t=e.indexOf(`?`);if(t!==-1){let n=e.substring(t+1),r=new URLSearchParams(n).get(`exp`);if(r)return parseInt(r,10)}return null}catch{return null}}},De=e=>{let t=Ee(e);return t?Math.floor(Date.now()/1e3)>t:!1},Oe=({item:e,mediaType:t,onClick:n,isSelected:r=!1,onToggleSelect:i,isSelectionMode:a=!1})=>{let[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),m=(0,S.useRef)(null),h=(0,S.useRef)(null),g=(0,S.useRef)(null);(0,S.useEffect)(()=>{let n=t===`video`?e.videoUrl:e.imageUrl;n&&De(n)&&d(!0)},[e,t]),(0,S.useEffect)(()=>{if(u)return;let e=m.current;if(!e)return;let t=Te();return ye.set(e,()=>{p(!0)}),t.observe(e),()=>{ye.delete(e),t.unobserve(e)}},[u]);let _=(e,t=!1)=>{let n=`http://ceshi.apiforeign.minzhong.cn`,r=e.startsWith(`/`)?e.slice(1):e,i=n.endsWith(`/`)?n.slice(0,-1):n;return t?`${i}/static/${r}&w=300&q=50`:`${i}/${r}`},v=()=>{g.current&&clearTimeout(g.current),s(!0),p(!1),we()},y=()=>{g.current=setTimeout(()=>{_(t===`video`?e.videoUrl:e.imageUrl),l(!0),p(!1),we()},1e3)},b=t===`video`?_(e.videoUrl):_(e.imageUrl,!0),x=e.videoCoverUrl?_(e.videoCoverUrl,!0):void 0;return(0,$.jsxs)(`div`,{ref:m,style:{width:160,height:120,position:`relative`,borderRadius:4,cursor:`pointer`,overflow:`hidden`,boxShadow:`0 2px 8px rgba(0,0,0,0.1)`,transition:`transform 0.2s, box-shadow 0.2s`},onClick:a?void 0:n,onMouseEnter:e=>{a||(e.currentTarget.style.transform=`scale(1.05)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0,0,0,0.2)`)},onMouseLeave:e=>{a||(e.currentTarget.style.transform=`scale(1)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(0,0,0,0.1)`)},children:[(t===`video`&&e.videoCoverUrl||t===`image`)&&(f||o)&&!c&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`},children:[f&&!o&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,backgroundColor:`rgba(248, 250, 252, 0.9)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1},children:(0,$.jsx)(`div`,{style:{width:28,height:28,border:`3px solid #e2e8f0`,borderTopColor:`#3b82f6`,borderRadius:`50%`,animation:`spin 0.8s linear infinite`}})}),t===`video`&&e.videoCoverUrl&&(0,$.jsx)(`img`,{ref:h,src:x,style:{width:`100%`,height:`100%`,objectFit:`cover`,opacity:+!!o,transition:`opacity 0.3s ease-in-out`},loading:`lazy`,onLoad:v,onError:y}),t===`image`&&(0,$.jsx)(`img`,{ref:h,src:b,alt:`图片预览`,style:{width:`100%`,height:`100%`,objectFit:`cover`,opacity:+!!o,transition:`opacity 0.3s ease-in-out`},loading:`lazy`,onLoad:v,onError:y})]}),!f&&!o&&!c&&(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,backgroundColor:`#cbd5e1`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:t===`video`?(0,$.jsx)(q8,{style:{color:`#64748b`,fontSize:16}}):(0,$.jsx)(d6,{style:{color:`#64748b`,fontSize:16}})})}),t===`video`&&!e.videoCoverUrl&&!c&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#1e293b`},children:[(0,$.jsx)(q8,{style:{color:`#64748b`,fontSize:24}}),(0,$.jsx)(Fte,{style:{fontSize:12,color:`#94a3b8`,marginTop:4},children:`暂无封面`})]}),u&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#fef3c7`,color:`#d97706`,fontSize:12,flexDirection:`column`,gap:4},children:[(0,$.jsx)(MH,{style:{fontSize:24}}),`图片过期`]}),c&&(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#fef2f2`,color:`#dc2626`,fontSize:12},children:`加载失败`}),!u&&!a&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:0,left:0,right:0,background:`linear-gradient(transparent, rgba(0,0,0,0.5))`,padding:`8px`,color:`#fff`,fontSize:12,opacity:0,transition:`opacity 0.2s`},onMouseEnter:e=>{e.currentTarget.style.opacity=`1`},onMouseLeave:e=>{e.currentTarget.style.opacity=`0`},children:`点击预览`}),a&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,width:20,height:20,borderRadius:`50%`,backgroundColor:r?`#10b981`:`rgba(255,255,255,0.9)`,border:r?`2px solid #10b981`:`2px solid #d1d5db`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,transition:`all 0.2s`},onClick:t=>{t.stopPropagation(),i?.(e.generatedResourceId||e.id)},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`},children:r&&(0,$.jsx)(`svg`,{width:12,height:12,viewBox:`0 0 12 12`,fill:`none`,children:(0,$.jsx)(`path`,{d:`M10 3L4.5 8.5L2 6`,stroke:`white`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`})})}),a&&r&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,border:`3px solid #10b981`,borderRadius:4,pointerEvents:`none`,zIndex:5}})]})},ke=e=>{_(e),h(!0),window.dispatchEvent(new Event(`previewOpen`))},Ae=()=>{v.current&&(v.current.pause(),v.current.currentTime=0),document.querySelectorAll(`video`).forEach(e=>{e.pause(),e.currentTime=0}),h(!1)},je=e=>e.generatedResourceId||e.id,Me=e=>!!e.generatedResourceId,Ne=e=>{_e(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},Pe=()=>{let e=i.flatMap(e=>e.items.map(e=>je(e)));ge.size===e.length?_e(new Set):_e(new Set(e))},Fe=async()=>{if(ge.size===0){Z.warning(`请先选择要下载的媒体`);return}if(ge.size>10){Z.warning(`最多只能单次下载10个文件`);return}let e=[];i.forEach(t=>{t.items.forEach(t=>{ge.has(je(t))&&e.push(t)})});let t=new Nte.default,n=`http://ceshi.apiforeign.minzhong.cn`,r=t.folder(`downloads`),a=!1,o=0;Z.loading({content:`下载中,请稍候...`,key:`downloadProgress`});for(let t of e){let e=`${n}${t.videoUrl||t.imageUrl}`,i=((t.videoUrl||t.imageUrl).split(`/`).pop()||`file_${Date.now()}`).split(`?`)[0];try{let t=await fetch(e);if(!t.ok)throw Error(`Network response was not ok`);let n=await t.blob();r?.file(i,n),o++}catch{console.warn(`文件下载失败(CORS限制): ${i},将使用备用方式下载`),a=!0;break}}if(a){Z.destroy(`downloadProgress`),Z.info(`由于跨域限制,将逐个下载文件`),e.forEach((e,t)=>{setTimeout(()=>{let t=`${n}${e.videoUrl||e.imageUrl}&download=1`,r=document.createElement(`a`);r.href=t,r.download=``,document.body.appendChild(r),r.click(),document.body.removeChild(r)},t*500)});return}let s=await t.generateAsync({type:`blob`}),c=document.createElement(`a`);c.href=URL.createObjectURL(s),c.download=`downloads_${Date.now()}.zip`,c.click(),URL.revokeObjectURL(c.href),Z.destroy(`downloadProgress`),Z.success(`下载完成,共 ${o} 个文件`)},Ie=()=>{if(ge.size===0){Z.warning(`请先选择要上传的媒体`);return}D([]),k(``),T(!0)},Le=async(e,t)=>{N(!0);try{let n=await w7({page:e,page_size:t});j(n?.data||n||[]),F(n.pagination.total||0)}catch(e){console.error(`加载授权列表失败:`,e),j([]),F(0)}finally{N(!1)}},Re=async()=>{de(!0);try{let e=await W7({status:fe||void 0,page:oe,pageSize:ce});ie(e?.data||e||[]),ae(e.pagination?.total||e.total||0)}catch(e){console.error(`加载上传历史失败:`,e),ie([]),ae(0)}finally{de(!1)}},ze=()=>{K(!0),se(1),pe(``),Re()},Be=()=>{se(1),Re()},Ve=(e,t)=>{se(e),le(t),Re()},He=async()=>{if(!I){Z.warning(`请先选择授权账户`);return}if(ge.size===0){Z.warning(`请先选择要上传的媒体`);return}C(!0);try{let t=[],n=E.map(e=>e.accountId),r=new Map;i.forEach(e=>{e.items.forEach(e=>{let t=je(e);r.set(t,e)})});for(let i of ge){let a=r.get(i),o;o=a&&Me(a)?`generated_resources`:e===`project`?`generation_records`:`chat_generation_tasks`,t.push({advertiser_ids:n,resource_ids:[i],oauth_id:I.value,source_model:o})}await U7({tasks:t}),Z.success(`已提交 ${t.length} 个上传任务,后台异步处理中`),he(!1),_e(new Set),T(!1),D([]),k(``),L(void 0),z(new Map),V(``)}catch(e){console.error(`批量上传失败:`,e),Z.error(e.message||`批量上传失败`)}finally{C(!1)}},Ue=async(e,t)=>{if(t.trim())try{let n=(await G7({filenames:[{source_id:e,file_name:t}]}))?.results?.find(t=>t.source_id===e)?.new_file_name||t;a(t=>t.map(t=>({...t,items:t.items.map(t=>je(t)===e?{...t,fileName:n}:t)}))),Z.success(`文件名更新成功`)}catch(e){console.error(`文件名更新失败:`,e),Z.error(e.message||`文件名更新失败`)}},We=async(e,t)=>{if(!(!t.trim()||e.length===0))try{let n=await G7({filenames:e.map(e=>({source_id:e,file_name:t}))}),r=new Map;n?.results?.forEach(e=>{e.success&&e.newFileName&&r.set(e.sourceId,e.newFileName)}),a(n=>{let i=new Set(e);return n.map(e=>({...e,items:e.items.map(e=>{let n=je(e);if(i.has(n)){let i=r.get(n)||t;return{...e,fileName:i}}return e})}))}),console.log(n);let i=n?.successCount||0;Z.success(`已更新 ${i} 个文件名`)}catch(e){console.error(`文件名更新失败:`,e),Z.error(e.message||`文件名更新失败`)}},Ge=e=>{b(e)};(0,S.useEffect)(()=>{d(!0);let t=``;if(t=e===`project`?`?gen_type=${n}&history_source=generation_record&page=${o.page}&page_size=${o.pageSize}`:`?gen_type=${n}&page=${o.page}&page_size=${o.pageSize}`,y){let t=``;t=e===`project`?`${y}?gen_type=${n}&history_source=generation_record&page=${o.page}&page_size=${o.pageSize}`:`${y}?gen_type=${n}&page=${o.page}&page_size=${o.pageSize}`,d7(t).then(e=>{let t=Array.isArray(e)?e:e?.items||[],n=[{generatedDate:e.generatedDate,items:t,total:e.total,page:e.page}];n&&n[0].items.length>0?a(n):a([])}).catch(e=>{}).finally(()=>{d(!1)})}else u7(t).then(e=>{let t=Array.isArray(e)?e:e?.groups||[];t.forEach(e=>{e.page=1}),o.page===1?a(t):a(e=>[...e,...t]),l(e?.totalDays||0)}).catch(e=>{o.page===1&&a([])}).finally(()=>{d(!1)})},[e,n,o.page,y]);let Ke=()=>{u||s(e=>({...e,page:e.page+1}))},qe=async(t,r,i)=>{if(f.has(r))return;p(e=>new Set([...e,r]));let s=i+1,c=``;c=e===`project`?`${t}?gen_type=${n}&history_source=generation_record&page=${s}&page_size=${o.pageSize}`:`${t}?gen_type=${n}&page=${s}&page_size=${o.pageSize}`;try{let e=(await d7(c)).items||[];e&&e.length>0&&a(n=>n.map(n=>n.generatedDate===t?{...n,items:[...n.items,...e],page:s}:n))}catch{}finally{p(e=>{let t=new Set(e);return t.delete(r),t})}};return(0,S.useEffect)(()=>{s(e=>({...e,page:1}))},[e,n]),(0,$.jsxs)(`div`,{style:{minHeight:`calc(100vh - 90px)`,background:`#ffffffff`,overflowY:`auto`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:16,padding:`12px 20px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(X4,{style:{color:`#94a3b8`,fontSize:14}}),(0,$.jsxs)(jU,{children:[(0,$.jsx)(bD,{type:e===`project`?`primary`:`default`,onClick:()=>{t(`project`),he(!1),_e(new Set)},style:{borderRadius:8,background:e===`project`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:e===`project`?`none`:`1px solid #e2e8f0`,color:e===`project`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(TZ,{}),children:`项目记录`}),(0,$.jsx)(bD,{type:e===`creation`?`primary`:`default`,onClick:()=>{t(`creation`),he(!1),_e(new Set)},style:{borderRadius:8,background:e===`creation`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:e===`creation`?`none`:`1px solid #e2e8f0`,color:e===`creation`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(IU,{}),children:`创作记录`})]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:me?(0,$.jsxs)(jU,{children:[(0,$.jsx)(bD,{onClick:Pe,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#222222ff`,fontWeight:600},children:ge.size===i.reduce((e,t)=>e+t.items.length,0)?`取消全选`:`全选`}),(0,$.jsx)(bD,{onClick:()=>{he(!1),_e(new Set)},style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:600},children:`取消选择`}),(0,$.jsxs)(bD,{onClick:()=>Fe(),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,fontWeight:600},children:[`下载 (`,ge.size,`)`]}),(0,$.jsx)(bD,{type:`primary`,onClick:Ie,loading:x,disabled:x||ge.size===0,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,fontWeight:600},children:x?`上传中...`:`推送至账户 (${ge.size})`})]}):(0,$.jsx)(bD,{type:`primary`,icon:(0,$.jsx)(V8,{}),onClick:()=>he(!0),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600},children:`批量操作`})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:24,padding:`12px 20px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:`媒体类型:`}),(0,$.jsxs)(jU,{children:[(0,$.jsx)(bD,{type:n===`video`?`primary`:`default`,onClick:()=>{r(`video`),he(!1),_e(new Set)},style:{borderRadius:8,background:n===`video`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:n===`video`?`none`:`1px solid #e2e8f0`,color:n===`video`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(q8,{}),children:`视频`}),(0,$.jsx)(bD,{type:n===`image`?`primary`:`default`,onClick:()=>{r(`image`),he(!1),_e(new Set)},style:{borderRadius:8,background:n===`image`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:n===`image`?`none`:`1px solid #e2e8f0`,color:n===`image`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(d6,{}),children:`图片`}),(0,$.jsx)(zH,{picker:`date`,value:y?(0,OD.default)(y):void 0,onChange:(e,t)=>Ge(t||``),format:`YYYY-MM-DD`,style:{width:160,borderRadius:8,border:`1px solid #e2e8f0`},placeholder:`选择日期`}),y&&(0,$.jsx)(bD,{type:`text`,onClick:()=>Ge(``),style:{color:`#94a3b8`,fontSize:12},children:`清除`})]})]}),(0,$.jsx)(bD,{icon:(0,$.jsx)(MH,{}),onClick:ze,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,color:`#ffffff`,fontWeight:600,boxShadow:`0 4px 15px rgba(102, 126, 234, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(102, 126, 234, 0.6)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 15px rgba(102, 126, 234, 0.4)`},children:`查询上传任务历史`})]}),i.length===0?(0,$.jsx)(PC,{image:PC.PRESENTED_IMAGE_SIMPLE,description:`暂无生成记录`,style:{padding:`60px 0`}}):(0,$.jsxs)(`div`,{style:{padding:`0 4px`},children:[i.map((e,t)=>(0,$.jsxs)(`div`,{style:{marginBottom:32},children:[(0,$.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`#64748b`,marginBottom:12,paddingLeft:8},children:e.generatedDate}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8},children:e.items.map(e=>(0,$.jsx)(Oe,{item:e,mediaType:n,onClick:()=>me?Ne(je(e)):ke(e),isSelected:ge.has(je(e)),onToggleSelect:Ne,isSelectionMode:me},je(e)))}),e.total&&e.total>e.items.length&&(0,$.jsx)(`div`,{style:{padding:`12px 0`,textAlign:`left`},children:(0,$.jsx)(bD,{onClick:()=>qe(e.generatedDate,e.items,e.page),loading:f.has(e.generatedDate),disabled:f.has(e.generatedDate),size:`small`,style:{borderRadius:6,background:`transparent`,border:`1px dashed #cbd5e1`,color:`#64748b`,fontSize:12},children:f.has(e.date)?`加载中...`:`查看全部 (${e.total})`})})]},t)),i.length>0&&c>i.length&&(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:`20px 0`},children:(0,$.jsx)(bD,{onClick:Ke,loading:u,disabled:u,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:500},children:u?`加载中...`:`加载更多`})})]}),(0,$.jsx)(Rq,{title:`批量上传配置`,open:w,onCancel:()=>{T(!1),D([]),k(``),L(void 0),z(new Map),V(``)},footer:null,width:900,mask:{closable:!1},children:(0,$.jsxs)(`div`,{style:{padding:`16px 0`},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`},children:[`选中素材 (`,ge.size,`个)`]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:12,alignItems:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`},children:`统一修改名称:`}),(0,$.jsx)(oK,{value:B,onChange:e=>V(e.target.value),placeholder:`输入名称后点击应用`,style:{flex:1,borderRadius:8},size:`small`}),(0,$.jsx)(bD,{type:`primary`,size:`small`,onClick:()=>{B.trim()&&ge.size>0&&We(Array.from(ge),B)},disabled:!B.trim()||ge.size===0,style:{borderRadius:8},children:`应用`})]}),(0,$.jsx)(`div`,{style:{maxHeight:300,overflow:`auto`,border:`1px solid #f0f0f0`,borderRadius:8,padding:12},children:(()=>{let e=new Map;return i.forEach(t=>{t.items.forEach(t=>{let n=je(t);e.set(n,t)})}),Array.from(ge).map(t=>{let r=e.get(t);return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 0`,borderBottom:`1px solid #f5f5f5`},children:[(0,$.jsx)(`div`,{style:{width:60,height:40,borderRadius:4,backgroundColor:`#f5f5f5`,display:`flex`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,flexShrink:0},children:(()=>{let e=n===`video`?r?.videoCoverUrl:r?.imageUrl;if(!e)return(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`预览`});let t=`http://ceshi.apiforeign.minzhong.cn`,i=e.startsWith(`/`)?e.slice(1):e;return(0,$.jsx)(`img`,{src:`${t.endsWith(`/`)?t.slice(0,-1):t}/static/${i}&w=300&q=50`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})()}),(0,$.jsx)(`div`,{style:{flex:1,minWidth:0},children:(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#1e293b`},children:r?.fileName||`素材 ${r.id}`})}),(0,$.jsx)(oK,{value:R.has(t)?R.get(t):r?.fileName||``,onChange:e=>{let n=e.target.value,r=new Map(R);r.set(t,n),z(r),H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{Ue(t,n)},800)},placeholder:`输入新名称`,style:{width:200,borderRadius:4},size:`small`})]},t)})})()})]}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`},children:`选择授权账户`}),(0,$.jsx)(uw,{value:I,onChange:e=>{L(e)},placeholder:`点击选择授权账户`,style:{width:`100%`,marginBottom:16,borderRadius:8},popupRender:()=>(0,$.jsx)(`div`,{style:{padding:8,width:800,maxHeight:500,overflow:`auto`},children:(0,$.jsx)(g$,{dataSource:A,columns:[{title:`ID`,dataIndex:`id`,key:`id`,width:120},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`,width:120},{title:`授权应用ID`,dataIndex:`appid`,key:`appid`,width:120},{title:`授权用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,width:120},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,width:160,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权账户用户名`,dataIndex:`accountUsername`,key:`accountUsername`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})}],loading:M,pagination:{current:U,pageSize:te,total:P,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{ee(e),ne(t),Le(e,t)}},rowKey:`id`,size:`small`,scroll:{x:`max-content`},onRow:e=>({onClick:()=>{L({value:String(e.id),label:String(e.accountUserid)}),re(!1)},style:{cursor:`pointer`,backgroundColor:I?.value===String(e.id)?`#e6f7ff`:void 0}})})}),open:W,onOpenChange:e=>{re(e),e&&Le(1,te)},labelInValue:!0,fieldNames:{label:`accountUserid`,value:`id`}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`,marginTop:16},children:`粘贴账户ID(每行一个或用逗号分隔)`}),(0,$.jsx)(oK.TextArea,{value:O,onChange:e=>{let t=e.target.value;k(t);let n=t.split(/[\n,]/).map(e=>e.trim()).filter(e=>e.length>0),r=[...new Set(n)].map(e=>({accountId:e})),i=new Set;D(r.filter(e=>i.has(e.accountId)?!1:(i.add(e.accountId),!0)))},placeholder:`粘贴账户ID,每行一个或用逗号分隔,例如:\r + `})]}):e===`failed`?(0,$.jsx)(`span`,{style:{fontSize:11,color:`#ef4444`},children:`失败`}):e===`completed`&&t.finalVideoUrl?(0,$.jsx)(`span`,{style:{fontSize:11,color:`#10b981`},children:`任务完成`}):null})()]})]})]},t.id))}),(0,$.jsx)(`div`,{style:{paddingTop:20,paddingBottom:20,display:`flex`,justifyContent:`center`},children:(0,$.jsx)(HK,{current:p,pageSize:h,total:_,onChange:U,showSizeChanger:!1,showQuickJumper:!1,showTotal:e=>`共 ${e} 条`,itemRender:(e,t,n)=>t===`prev`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid #e5e7eb`,borderRadius:6,background:p===1?`#f9fafb`:`#fff`,cursor:p===1?`not-allowed`:`pointer`,color:p===1?`#d1d5db`:`#6b7280`,fontSize:14},disabled:p===1,children:`‹`}):t===`next`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid #e5e7eb`,borderRadius:6,background:p>=Math.ceil(_/h)?`#f9fafb`:`#fff`,cursor:p>=Math.ceil(_/h)?`not-allowed`:`pointer`,color:p>=Math.ceil(_/h)?`#d1d5db`:`#6b7280`,fontSize:14},disabled:p>=Math.ceil(_/h),children:`›`}):t===`page`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`none`,borderRadius:6,background:e===p?`#6366f1`:`#fff`,color:e===p?`#fff`:`#374151`,fontWeight:e===p?500:400,cursor:`pointer`,fontSize:14},children:e}):n})})]}):(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`40px`},children:[(0,$.jsxs)(`div`,{style:{width:120,height:120,display:`flex`,alignItems:`center`,justifyContent:`center`,marginBottom:24,position:`relative`},children:[(0,$.jsx)(`div`,{style:{width:60,height:60,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:20,position:`absolute`,bottom:0,right:10}}),(0,$.jsx)(`div`,{style:{width:50,height:50,border:`2px solid rgba(99, 102, 241, 0.2)`,borderRadius:16,position:`absolute`,top:0,left:10}}),(0,$.jsx)(`div`,{style:{width:56,height:56,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:18,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 24px rgba(99, 102, 241, 0.25)`},children:(0,$.jsx)(Y8,{style:{fontSize:28,color:`#fff`}})})]}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:600,color:`#1e293b`,marginBottom:8},children:`暂无生成内容`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#64748b`,textAlign:`center`,padding:`0 40px`,lineHeight:1.6},children:`请完善素材与卖点,生成专属爆款开头复刻视频`})]})})]}),(0,$.jsx)(`div`,{className:`replication-form`,style:{flex:1,overflow:`auto`,width:`28%`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,position:`relative`,zIndex:10},children:(0,$.jsxs)(`div`,{className:`replication-form-content`,style:{width:`100%`,height:`100%`,background:`rgba(248, 250, 252, 0.5)`,padding:24,overflowY:`auto`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10},children:`上传复刻视频`}),O?(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`video`,{src:O,controls:!0,style:{width:`100%`,borderRadius:12,maxHeight:200,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`}}),(0,$.jsx)(`button`,{onClick:()=>{O&&URL.revokeObjectURL(O),D(null),k(``)},style:{position:`absolute`,top:8,right:8,width:28,height:28,border:`none`,background:`rgba(239, 68, 68, 0.9)`,borderRadius:`50%`,cursor:`pointer`,color:`#fff`,fontSize:16,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10,transition:`all 0.2s`},children:`×`}),(0,$.jsxs)(`div`,{style:{marginTop:10,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(Y8,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#475569`},children:E?.name}),(0,$.jsxs)(`span`,{style:{fontSize:11,color:`#94a3b8`},children:[`(`,E?.size?(E.size/1024/1024).toFixed(2):0,`MB)`]})]})]}):(0,$.jsx)(y0,{beforeUpload:async e=>{if(!e.type.startsWith(`video/`))return Z.error(`只能上传视频文件`),!1;if(!(e.size/1024/1024<50))return Z.error(`视频大小不能超过50MB`),!1;let t=document.createElement(`video`);return t.preload=`metadata`,new Promise(n=>{t.onloadedmetadata=async()=>{if(t.duration<2){Z.error(`视频时长不能少于2秒`),URL.revokeObjectURL(t.src),n(!1);return}if(t.duration>=16){Z.error(`视频时长不能超过15秒`),URL.revokeObjectURL(t.src),n(!1);return}F(!0);try{let t=await H5(e);D(e),k(`http://ceshi.apiforeign.minzhong.cn${t.url}`),Z.success(`视频上传成功`),n(!1)}catch(e){let t=``;if(e instanceof Error)try{t=JSON.parse(e.message).detail||e.message}catch{t=e.message}Z.error(t||`视频上传失败`),n(!1)}finally{F(!1),URL.revokeObjectURL(t.src)}},t.onerror=()=>{Z.error(`视频文件无效`),URL.revokeObjectURL(t.src),n(!1)},t.src=URL.createObjectURL(e)})},showUploadList:!1,accept:`video/mp4,video/quicktime,.mp4,.mov`,children:(0,$.jsx)(`div`,{style:{border:`2px dashed rgba(99, 102, 241, 0.3)`,borderRadius:12,padding:24,textAlign:`center`,cursor:`pointer`,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`,background:`rgba(99, 102, 241, 0.02)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.02)`},children:P?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{width:40,height:40,margin:`0 auto 12px`,border:`3px solid rgba(99, 102, 241, 0.2)`,borderTopColor:`#6366f1`,borderRadius:`50%`,animation:`spin 1s linear infinite`}}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#6366f1`,fontWeight:500},children:`上传中...`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持的文件类型:MP4、MOV | 视频最大时长:15 秒 | 最大大小:50M`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:48,height:48,margin:`0 auto 12px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:16,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(Y8,{style:{fontSize:24,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#475569`,fontWeight:500},children:`点击或拖拽上传视频`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持的文件类型:MP4、MOV | 视频最大时长:15 秒 | 最大大小:50M`})]})})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10},children:`上传产品图片`}),M?(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`img`,{src:M,alt:`产品图片`,style:{width:`100%`,borderRadius:12,maxHeight:200,objectFit:`contain`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`}}),(0,$.jsx)(`button`,{onClick:()=>{M&&URL.revokeObjectURL(M),j(null),N(``)},style:{position:`absolute`,top:8,right:8,width:28,height:28,border:`none`,background:`rgba(239, 68, 68, 0.9)`,borderRadius:`50%`,cursor:`pointer`,color:`#fff`,fontSize:16,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10,transition:`all 0.2s`},children:`×`}),(0,$.jsxs)(`div`,{style:{marginTop:10,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(p6,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#475569`},children:A?.name}),(0,$.jsxs)(`span`,{style:{fontSize:11,color:`#94a3b8`},children:[`(`,A?.size?(A.size/1024/1024).toFixed(2):0,`MB)`]})]})]}):(0,$.jsx)(y0,{beforeUpload:async e=>{if(!e.type.startsWith(`image/`))return Z.error(`只能上传图片文件`),!1;if(!(e.size/1024/1024<10))return Z.error(`图片大小不能超过10MB`),!1;let t=new Image;return new Promise(n=>{t.onload=async()=>{let r=t.width/t.height;Math.abs(r-.75)<.1||Math.abs(r-.5625),L(!0);try{let t=await V5(e);j(e),N(`http://ceshi.apiforeign.minzhong.cn${t.url}`),Z.success(`图片上传成功`),n(!1)}catch(e){let t=``;if(e instanceof Error)try{t=JSON.parse(e.message).detail||e.message}catch{t=e.message}Z.error(t||`图片上传失败`),n(!1)}finally{L(!1),URL.revokeObjectURL(t.src)}},t.onerror=()=>{Z.error(`图片文件无效`),URL.revokeObjectURL(t.src),n(!1)},t.src=URL.createObjectURL(e)})},showUploadList:!1,accept:`image/jpeg,image/jpg,image/png,.jpg,.jpeg,.png`,children:(0,$.jsx)(`div`,{style:{border:`2px dashed rgba(99, 102, 241, 0.3)`,borderRadius:12,padding:20,textAlign:`center`,cursor:`pointer`,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`,background:`rgba(99, 102, 241, 0.02)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.02)`},children:I?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{width:36,height:36,margin:`0 auto 10px`,border:`3px solid rgba(99, 102, 241, 0.2)`,borderTopColor:`#6366f1`,borderRadius:`50%`,animation:`spin 1s linear infinite`}}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#6366f1`,fontWeight:500},children:`上传中...`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持 JPG, JPEG, PNG 格式,图片比例为 3:4 或 9:16 效果最佳`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:44,height:44,margin:`0 auto 10px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:14,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(p6,{style:{fontSize:22,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#475569`,fontWeight:500},children:`+ 点击上传`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持 JPG, JPEG, PNG 格式,图片比例为 3:4 或 9:16 效果最佳`})]})})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:`原视频产品名称`}),(0,$.jsx)(nK,{value:y,onChange:e=>b(e.target.value),placeholder:`请输入原视频产品名称`,style:{borderRadius:10,height:40,fontSize:13,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},maxLength:10,suffix:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[y.length,`/10`]})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:`自有产品名称`}),(0,$.jsx)(nK,{value:x,onChange:e=>C(e.target.value),placeholder:`请输入自有产品名称`,style:{borderRadius:10,height:40,fontSize:13,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},maxLength:10,suffix:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[x.length,`/10`]})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:24},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:`产品卖点`}),(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(jte,{value:w,onChange:e=>T(e.target.value),placeholder:`请输入产品卖点`,style:{borderRadius:10,fontSize:13,height:80,resize:`none`,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},rows:3,maxLength:30}),(0,$.jsxs)(`span`,{style:{position:`absolute`,right:10,bottom:8,color:`#94a3b8`,fontSize:12},children:[w.length,`/30`]})]})]}),(0,$.jsx)(vD,{type:`primary`,block:!0,size:`large`,onClick:()=>{if(!O){Z.warning(`请上传复刻视频`);return}if(!M){Z.warning(`请上传产品图片`);return}if(!y.trim()){Z.warning(`请输入原视频产品名称`);return}if(!x.trim()){Z.warning(`请输入自有产品名称`);return}if(!w.trim()){Z.warning(`请输入产品卖点`);return}g7({material_video_url:O,material_image_url:M,source_project_name:y,target_project_name:x,core_content_point:w,idempotency_key:Date.now().toString()}).then(t=>{let r=``,i=``;k(``),N(``),b(``),C(``),T(``),H(1,8),_7(1,20).then(t=>{if(t.items){let a=t.items[0].id;n(t.items),v7(t.items[0].id).then(t=>{r=t.id,i=t.steps[0].id,y7(r,i).then(t=>{Z.loading(`创建中...`,3),setTimeout(()=>{e(`/initial/${a}/initialinfo`)},3e3)})}).catch(e=>{})}}).catch(e=>{})}).catch(e=>{Z.error(`视频开头复刻失败`)})},style:{borderRadius:12,height:44,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`,border:`none`,fontSize:15,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.3)`,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`},children:`立即生成+`})]})}),(0,$.jsxs)(Pq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`创作记录`})]}),open:R,onCancel:()=>z(!1),width:850,footer:null,style:{borderRadius:20},styles:{body:{height:580,display:`flex`,flexDirection:`column`,padding:0},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,margin:`16px 24px`,flexShrink:0},children:[(0,$.jsx)(nK,{placeholder:`搜索产品名称`,value:l,onChange:e=>u(e.target.value),onPressEnter:ne,style:{width:220,borderRadius:10,marginRight:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`}}),(0,$.jsx)(vD,{type:`primary`,onClick:ne,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflow:`auto`,padding:`0 24px 24px`},children:(0,$.jsx)(`div`,{style:{background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(10px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.06)`},children:(0,$.jsx)(f$,{columns:[{title:`产品名称`,dataIndex:`targetProjectName`,key:`targetProjectName`,align:`center`,width:200,render:e=>(0,$.jsx)(`span`,{style:{fontSize:13,color:`#1e293b`,fontWeight:500},children:e||`-`})},{title:`状态`,dataIndex:`status`,key:`status`,align:`center`,width:220,render:(e,t)=>{let n=e,r=t.current_step_code||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#64748b`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else return{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#64748b`}})();return(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,align:`center`,width:200,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:12,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,width:120,render:(t,n)=>(0,$.jsx)(`button`,{onClick:()=>e(`/initial/${n.id}/initialinfo`),style:{color:`#6366f1`,textDecoration:`none`,fontSize:13,border:`none`,background:`rgba(99, 102, 241, 0.08)`,padding:`4px 12px`,borderRadius:8,cursor:`pointer`,transition:`all 0.2s`},children:`查看详情`})}],dataSource:t,rowKey:`id`,pagination:{current:r,pageSize:a,total:s,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:te,itemRender:(e,t,n)=>t===`prev`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid rgba(99, 102, 241, 0.15)`,borderRadius:8,background:r===1?`rgba(243, 244, 246, 0.5)`:`#fff`,cursor:r===1?`not-allowed`:`pointer`,color:r===1?`#94a3b8`:`#6366f1`,fontSize:14},disabled:r===1,children:`‹`}):t===`next`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid rgba(99, 102, 241, 0.15)`,borderRadius:8,background:r>=Math.ceil(s/a)?`rgba(243, 244, 246, 0.5)`:`#fff`,cursor:r>=Math.ceil(s/a)?`not-allowed`:`pointer`,color:r>=Math.ceil(s/a)?`#94a3b8`:`#6366f1`,fontSize:14},disabled:r>=Math.ceil(s/a),children:`›`}):t===`page`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`none`,borderRadius:8,background:e===r?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`:`#fff`,color:e===r?`#fff`:`#475569`,fontWeight:e===r?600:400,cursor:`pointer`,fontSize:14},children:e}):n},style:{fontSize:13},scroll:{y:350}})})})]})]})};function m9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function h9(e,...t){for(let n of t){let t=e[n];if(t!=null&&String(t).trim()!==``)return String(t)}return``}function g9(e,t,...n){for(let t of n){let n=e[t];if(n===!0||n===!1)return n;if(n===`true`)return!0;if(n===`false`)return!1}return t}function Nte(e,...t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t)&&t>0)return t;if(typeof t==`string`&&t.trim()){let e=Number(t);if(Number.isFinite(e)&&e>0)return e}}}function _9(e){if(!m9(e))return null;let t=h9(e,`key`);return t?{key:t,label:h9(e,`label`)||t,type:h9(e,`type`)||void 0,enabled:g9(e,!0,`enabled`),editable:g9(e,!0,`editable`),maxLength:Nte(e,`maxLength`,`max_length`)}:null}function v9(e){if(!m9(e))return null;let t=e.data;return m9(t)?t:Array.isArray(e.sections)?e:null}function Pte(e){return!!v9(e)}function y9(e){let t=v9(e);return(Array.isArray(t?.sections)?t.sections:[]).map(e=>{let t=_9(e);if(!t||!m9(e))return null;let n=Array.isArray(e.children)?e.children.map(_9).filter(Boolean):[],r=Array.isArray(e.itemFields)?e.itemFields.map(_9).filter(Boolean):Array.isArray(e.item_fields)?e.item_fields.map(_9).filter(Boolean):[];return{...t,contentKey:h9(e,`contentKey`,`content_key`)||void 0,children:n,itemFields:r}}).filter(e=>!!e&&e.enabled)}function b9(e){if(e==null)return``;if(typeof e==`object`)try{return JSON.stringify(e,null,2)}catch{return String(e)}return String(e)}function x9(e){let t=b9(e);return t.length>40||t.includes(` +`)||t.includes(`,`)||t.includes(`。`)||t.includes(`;`)||t.includes(`;`)}function S9(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function C9(e,t,n,r){let i=S9(e||{});return m9(i[t])||(i[t]={}),i[t][n]=r,i}function w9(e,t,n,r,i){let a=S9(e||{});return Array.isArray(a[t])||(a[t]=[]),m9(a[t][n])||(a[t][n]={}),a[t][n][r]=i,a}function T9(e,t){if(!m9(e))return`视频提示词不能为空`;let n=y9(t);if(!n.length)return`视频提词配置缺失,无法保存`;for(let t of n){if(!t.editable)continue;let n=e[t.key];if(t.type===`object`){if(!m9(n))continue;for(let e of t.children)if(!(!e.enabled||!e.editable||!e.maxLength)&&b9(n[e.key]).length>e.maxLength)return`字段【${t.label}.${e.label}】长度不能超过 ${e.maxLength} 个字符`;continue}if(t.type===`flow`){if(!Array.isArray(n))continue;for(let e=0;en.maxLength)return`字段【${t.label} 第 ${e+1} 项.${n.label}】长度不能超过 ${n.maxLength} 个字符`}}continue}if(t.editable&&t.maxLength&&b9(n).length>t.maxLength)return`字段【${t.label}】长度不能超过 ${t.maxLength} 个字符`}return null}var{Text:E9}=Q,{TextArea:D9}=nK;function O9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function k9({value:e}){let t=e===`true`?`是`:e===`false`?`否`:b9(e);return x9(e)?(0,$.jsx)(D9,{value:t,rows:Math.min(6,Math.max(2,Math.ceil(t.length/42))),disabled:!0,style:{borderRadius:8,color:`#64748b`}}):(0,$.jsx)(nK,{value:t,disabled:!0,style:{borderRadius:8,color:`#64748b`}})}function A9({value:e,maxLength:t,onChange:n}){let r=b9(e),i={value:r,maxLength:t,showCount:!!t,onChange:e=>n(e.target.value),style:{borderRadius:8}};return x9(e)?(0,$.jsx)(D9,{...i,rows:Math.min(8,Math.max(3,Math.ceil(r.length/42)))}):(0,$.jsx)(nK,{...i})}function j9({value:e,onChange:t}){let n=e===!0||e===`true`;return(0,$.jsxs)(LL.Group,{value:n,onChange:e=>t(e.target.value),style:{display:`flex`,gap:24},children:[(0,$.jsx)(LL,{value:!0,style:{fontSize:14,color:`#475569`},children:`是`}),(0,$.jsx)(LL,{value:!1,style:{fontSize:14,color:`#475569`},children:`否`})]})}var M9=({value:e,schemaConfigSnapshot:t,onChange:n})=>{let r=O9(e)?e:{},i=y9(t);if(!Pte(t))return(0,$.jsxs)(DU,{direction:`vertical`,size:12,style:{width:`100%`},children:[(0,$.jsx)(Kf,{type:`warning`,showIcon:!0,message:`视频提词配置缺失,暂不能编辑`,description:`请刷新详情后重试;如果仍然缺失,请联系管理员排查第4步 schema_config_snapshot 返回。`}),Object.keys(r).length?(0,$.jsx)(`pre`,{style:{margin:0,padding:12,borderRadius:10,background:`#f8fafc`,maxHeight:420,overflow:`auto`,color:`#475569`},children:JSON.stringify(r,null,2)}):null]});if(!i.length)return(0,$.jsx)(Kf,{type:`warning`,showIcon:!0,message:`视频提词配置为空`,description:`当前 Schema 配置没有可展示字段。`});let a=e=>{let t=O9(r[e.key])?r[e.key]:{},i=e.children.filter(e=>e.enabled);return i.length?(0,$.jsxs)(`div`,{style:{marginBottom:18},children:[(0,$.jsx)(DU,{style:{marginBottom:8},children:(0,$.jsx)(E9,{strong:!0,style:{color:`#334155`,fontSize:13},children:e.label})}),(0,$.jsx)(`div`,{style:{borderLeft:`3px solid #6366f1`,paddingLeft:12,marginLeft:4},children:i.map(i=>(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsx)(DU,{style:{marginBottom:4},children:(0,$.jsx)(E9,{style:{color:`#64748b`,fontSize:12},children:i.label})}),i.editable?i.type===`boolean`?(0,$.jsx)(j9,{value:t[i.key],onChange:t=>n(C9(r,e.key,i.key,t))}):(0,$.jsx)(A9,{value:t[i.key],maxLength:i.maxLength,onChange:t=>n(C9(r,e.key,i.key,t))}):(0,$.jsx)(k9,{value:t[i.key]})]},i.key))})]},e.key):null},o=e=>{let t=Array.isArray(r[e.key])?r[e.key]:[],i=[{key:`时间段`,label:`时间段`,enabled:!0,editable:!1},...e.itemFields.filter(e=>e.enabled)];return(0,$.jsxs)(`div`,{style:{marginBottom:18},children:[(0,$.jsxs)(DU,{style:{marginBottom:8},children:[(0,$.jsx)(E9,{strong:!0,style:{color:`#334155`,fontSize:13},children:e.label}),(0,$.jsx)(T$,{color:`default`,children:`锁定条目和时间段`})]}),(0,$.jsx)(`div`,{style:{border:`1px solid #e5e7eb`,borderRadius:10,padding:12,background:`#fff`},children:t.length===0?(0,$.jsx)(E9,{style:{color:`#94a3b8`,fontSize:12},children:`暂无内容`}):t.map((a,o)=>{let s=O9(a)?a:{};return(0,$.jsxs)(`div`,{style:{marginBottom:o===t.length-1?0:14,paddingBottom:o===t.length-1?0:14,borderBottom:o===t.length-1?`none`:`1px dashed #e2e8f0`},children:[(0,$.jsxs)(E9,{strong:!0,style:{display:`block`,marginBottom:8,color:`#475569`,fontSize:12},children:[`第 `,o+1,` 段`]}),i.map(t=>(0,$.jsxs)(`div`,{style:{marginBottom:10},children:[(0,$.jsx)(DU,{style:{marginBottom:4},children:(0,$.jsx)(E9,{style:{color:`#64748b`,fontSize:12},children:t.label})}),t.editable?t.type===`boolean`?(0,$.jsx)(j9,{value:s[t.key],onChange:i=>n(w9(r,e.key,o,t.key,i))}):(0,$.jsx)(A9,{value:s[t.key],maxLength:t.maxLength,onChange:i=>n(w9(r,e.key,o,t.key,i))}):(0,$.jsx)(k9,{value:s[t.key]})]},t.key))]},`${e.key}-${o}`)})})]},e.key)},s=e=>e.key in r?(0,$.jsxs)(`div`,{style:{marginBottom:18},children:[(0,$.jsx)(DU,{style:{marginBottom:8},children:(0,$.jsx)(E9,{strong:!0,style:{color:`#334155`,fontSize:13},children:e.label})}),e.editable?(0,$.jsx)(A9,{value:r[e.key],maxLength:e.maxLength,onChange:t=>{let i=S9(r);i[e.key]=t,n(i)}}):(0,$.jsx)(k9,{value:r[e.key]})]},e.key):null;return(0,$.jsx)(`div`,{children:i.map(e=>e.key in r?e.type===`object`?a(e):e.type===`flow`?o(e):s(e):null)})},{Title:Fte,Text:N9}=Q,{TextArea:Ite}=nK;function Lte(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function Rte(){let e=Je(),{creatID:t}=Qe(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(`image`),[u,d]=(0,S.useState)({}),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(``),[g,_]=(0,S.useState)(!1),[v,y]=(0,S.useState)(null),[b,x]=(0,S.useState)({}),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(5),[j,M]=(0,S.useState)(`16:9`),[N,P]=(0,S.useState)(`480p`),[F,I]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]}),[L,R]=(0,S.useState)([]),[z,B]=(0,S.useState)(1),[V,H]=(0,S.useState)(20),[U,ee]=(0,S.useState)(0),[te,ne]=(0,S.useState)(``),[W,re]=(0,S.useState)({}),[G,K]=(0,S.useState)([]),[q,ie]=(0,S.useState)([]),J=[{id:1,title:`原始素材`,description:`上传原始视频素材`,childId:1},{id:2,title:`生成提示词`,description:`根据素材生成描述词`,childId:2},{id:3,title:`生成产品融合图`,description:`生成产品与场景融合图`,childId:3},{id:4,title:`生成视频提示词`,description:`生成视频生成提示词`,childId:4},{id:5,title:`生成最终视频`,description:`合成最终视频`,childId:5}].map((e,t)=>({...e,status:G[t]?.status||``,id:G[t]?.id||t,output:G[t]?.output||``,engineId:G[t]?.input?.payload?.videoConfig?.engineId||``}));(0,S.useEffect)(()=>{let e=new Set;q.forEach(t=>{let n=J.find(e=>String(e.childId)===t);n&&(n.status===`completed`||n.status===`failed`)&&e.add(t)});for(let t=J.length-1;t>=0;t--)if(J[t].status===`completed`||J[t].status===`failed`){e.add(String(J[t].childId));break}e.size>0?ie(Array.from(e)):ie([])},[G]);let ae=(e,t,n)=>{_7(e,t,n).then(e=>{e.items&&R(e.items),e.total!==void 0&&ee(e.total)}).catch(e=>{})},oe=(e,t)=>{B(e),H(t),ae(e,t,te)},se=()=>{B(1),ae(1,V,te)};(0,S.useEffect)(()=>{ae(z,V)},[]),(0,S.useEffect)(()=>{l7().then(e=>{if(x(e.engine||{}),e.engine?.video&&e.engine.video.length>0){w(e.engine.video[0].id);let t=e.engine.video[0];I({ratios:t.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions||[`480p`,`720p`,`1080p`],durations:t.supportedDurations||[5,8,10,12,15]})}}).catch(e=>{})},[]),(0,S.useEffect)(()=>()=>{v&&(clearInterval(v),y(null))},[v]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;!t.closest(`.image-settings-trigger`)&&!t.closest(`.image-settings-popover`)&&(E(!1),O(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,S.useEffect)(()=>{t&&v7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},[t]),(0,S.useEffect)(()=>{let e=J[4];e&&e.status!==`completed`&&e.status!==`failed`?v||y(setInterval(ue,15e3)):e&&v&&(clearInterval(v),y(null))},[J]);let ce=(e,t,n,i)=>{l(t||`image`),h(n?String(n):``),t===`video`?(p(i||null),d(e&&typeof e==`object`?Lte(e):{}),a(``)):(p(null),a(e||``),d({})),r(!0)},le=async()=>{if(c===`image`){if(!W?.id||!m){Z.warning(`缺少任务或步骤 ID,无法保存图片提示词`);return}if(!i||!i.trim()){Z.warning(`图片提示词不能为空`);return}_(!0);try{await b7(W.id,m,{prompt:i.trim()}),Z.success(`图片提示词已保存`),de(),r(!1),h(``)}catch(e){Z.error(e?.message||`保存图片提示词失败`)}finally{_(!1)}return}if(!W?.id||!m){Z.warning(`缺少任务或步骤 ID,无法保存视频提示词`);return}if(!u||typeof u!=`object`||Object.keys(u).length===0){Z.warning(`视频提示词不能为空`);return}if(!f){Z.warning(`视频提词配置缺失,暂不能保存`);return}let e=T9(u,f);if(e){Z.warning(e);return}_(!0);try{await k7(W.id,m,{prompt_schema:u}),Z.success(`视频提示词已保存`),de(),r(!1),h(``)}catch(e){Z.error(e?.message||`保存视频提示词失败`)}finally{_(!1)}},ue=()=>{t&&v7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},de=()=>{t&&v7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},fe=e=>{x7(W.id,e.toString(),{engine_id:`0019e3dac0b795b925b`,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`}).then(e=>{de()}).catch(e=>{})},pe=()=>{x7(W.id,J[1].id.toString(),{engine_id:`0019e3dac0b795b925b`,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`}).then(e=>{de()}).catch(e=>{})},me=e=>{let t={engine_id:C,duration:k,aspect_ratio:j,resolution:N,target_platform:`抖音`};S7(W.id,e.toString(),t).then(e=>{de()}).catch(e=>{})},he=(e,t)=>{let n={engine_id:t};C7(W.id,e.toString(),n).then(e=>{de()}).catch(e=>{})},ge=()=>{let e={engine_id:J[3].engineId};C7(W.id,J[2].id.toString(),e).then(e=>{de()}).catch(e=>{})};return(0,$.jsxs)(S.Fragment,{children:[(0,$.jsx)(`div`,{className:`initialinfo-container`,style:{margin:`-24px -32px -32px`,height:`calc(100vh - 34px)`,position:`relative`,boxSizing:`border-box`,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:`2%`,position:`relative`,zIndex:1,minHeight:0},children:[(0,$.jsxs)(`div`,{className:`replication-preview`,style:{flex:4,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,boxSizing:`border-box`},children:[(0,$.jsx)(vD,{type:`text`,icon:(0,$.jsx)(g2,{}),onClick:()=>e(-1),style:{color:`#64748b`,borderRadius:10,fontSize:13,height:32,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`},children:`返回`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`爆款开头复刻 - 任务详情`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(vD,{type:`primary`,ghost:!0,style:{borderRadius:10,padding:`4px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},onClick:()=>s(!0),children:`创作记录`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`},children:(0,$.jsxs)(`div`,{className:`material_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,alignItems:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:W?.material?.materialVideoUrl?(0,$.jsx)(`video`,{controls:!0,src:W.material.materialVideoUrl,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无视频`})})]}),(0,$.jsxs)(`div`,{className:`product_img`,style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`产品图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:W?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:W.material.materialImageUrl,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无图片`})})]})]}),W?.finalImageUrl&&(0,$.jsx)(`div`,{style:{marginTop:16},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalImageUrl}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})}),W?.finalVideoUrl&&(0,$.jsx)(`div`,{style:{marginTop:16},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(`video`,{controls:!0,src:`http://ceshi.apiforeign.minzhong.cn${W.finalVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})})]})})]}),(0,$.jsxs)(`div`,{className:`replication-form`,style:{flex:1,minWidth:`450px`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,gap:10,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`生成步骤`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px 16px 16px`},children:(0,$.jsx)(r_,{activeKey:q,onChange:ie,ghost:!0,bordered:!1,style:{background:`transparent`},expandIconPlacement:`end`,items:J.map(e=>({key:String(e.childId),label:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,width:`100%`,justifyContent:`space-between`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:16,height:16},children:e.status===`completed`?(0,$.jsx)(i4,{style:{fontSize:16,color:`#22c55e`}}):e.status===`processing`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,background:`#ef4444`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:`#fff`,fontSize:10},children:`×`})}):(0,$.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:`#cbd5e1`}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:e.status===`processing`||e.status===`waiting_user`?`#6366f1`:`#1e293b`,fontWeight:500},children:e.title}),(e.status===`processing`||e.status===`waiting_user`)&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`,marginLeft:8},children:`生成中`}),e.status===`failed`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`,marginLeft:8},children:`失败`}),e.status===``&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#717d8b`,marginLeft:8},children:`待生成`})]})}),children:(0,$.jsxs)(`div`,{style:{padding:`16px`,background:`linear-gradient(135deg, rgba(248,250,252,0.6) 0%, rgba(238,242,255,0.4) 100%)`,borderRadius:12,marginTop:8,border:`1px solid rgba(99, 102, 241, 0.06)`},children:[e.childId===1&&(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,marginBottom:20,alignItems:`flex-start`,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(N9,{style:{color:`#475569`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`原视频`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},children:W?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:W.material.materialVideoUrl,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10},controls:!0}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,height:`16`,rx:`2`,ry:`2`}),(0,$.jsx)(`path`,{d:`M8 12l4 2 4-2`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无视频`})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(N9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`产品图片`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:10,background:`#f1f5f9`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:W?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:W.material.materialImageUrl,alt:`产品图片`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10}}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,$.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`,fill:`currentColor`}),(0,$.jsx)(`path`,{d:`M21 15l-5-5L5 21`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无图片`})]})})]})]})}),e.childId===2&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(N9,{style:{color:`#475569`,fontSize:13,lineHeight:1.8,whiteSpace:`pre-wrap`},children:e?.output?.payload?.prompt||`暂无提示词`})}),(0,$.jsxs)(DU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(vD,{type:`default`,icon:(0,$.jsx)(j$,{}),onClick:()=>ce(e?.output?.payload?.prompt,`image`,e.id),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`修改提示词`}),(0,$.jsx)(vD,{onClick:()=>{Z.info(`正在生成图片,请稍候...`),fe(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片`})]})]}),e.childId===3&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`,position:`relative`},children:[W.finalImageUrl?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalImageUrl}`,alt:`融合图`,style:{width:`100%`,height:180,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无融合图`}),(0,$.jsx)(vD,{type:`default`,icon:(0,$.jsx)(j$,{}),onClick:()=>pe(),disabled:e.status!==`completed`,style:{position:`absolute`,bottom:8,left:8,borderRadius:8,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:30,fontWeight:500,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(4px)`,padding:`0 12px`,fontSize:12},children:`重新生成`})]}),(0,$.jsx)(`p`,{style:{marginBottom:6,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`视频参数选择:`}),(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{E(!T),O(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(Y6,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(N9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:b.video?.find(e=>e.id===C)?.name||`选择引擎`})]}),T&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-10,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(N9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:b.video?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{w(e.id),I({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(j)||M(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(N)||P(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(k)||A(e.supportedDurations?.[0]||5),E(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:C===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:C===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:C===e.id?600:500,color:C===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{O(!D),E(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(j3,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(N9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[j,` · `,k,`s · `,N]})]}),D&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(N9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:F.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>M(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:j===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:j===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${j===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:j===e?`#6366f1`:`#6b7280`,fontWeight:j===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(N9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(k-Math.min(...F.durations))/(Math.max(...F.durations)-Math.min(...F.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...F.durations),max:Math.max(...F.durations),value:k,onChange:e=>A(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:k}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(N9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:F.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>P(e),style:{flex:1,height:42,borderRadius:6,border:N===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:N===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:N===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(vD,{type:`primary`,style:{width:`100%`,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},onClick:()=>{Z.info(`正在生成视频提示词,请稍候...`),me(e.id)},disabled:e.status!==`completed`,children:`下一步:生成视频提示词`})]}),e.childId===4&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(N9,{style:{color:`#64748b`,fontSize:13,lineHeight:1.8},children:`视频提词已生成,可点击按钮查看/修改`})}),(0,$.jsxs)(DU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(vD,{type:`default`,icon:(0,$.jsx)(j$,{}),onClick:()=>ce(W?.videoGeneration?.promptSchema,`video`,e.id,W?.videoGeneration?.schemaConfigSnapshot),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`||!W?.videoGeneration?.promptSchema||!W?.videoGeneration?.schemaConfigSnapshot,children:`查看/修改视频提词`}),(0,$.jsx)(vD,{onClick:()=>{Z.info(`正在生成视频,请稍候...`),he(e.id,e.engineId)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成视频`})]})]}),e.childId===5&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,position:`relative`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},children:e.status===`completed`&&W?.finalVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalVideoUrl}`,style:{width:`100%`,height:180,objectFit:`cover`},controls:!0}):e.status===`processing`?(0,$.jsxs)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:20,height:20,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}),(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontSize:14},children:`视频生成中...`})]}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#ef4444`,fontSize:14},children:`视频生成失败`}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无视频`})}),(0,$.jsxs)(DU,{style:{width:`100%`,gap:12},children:[(0,$.jsx)(vD,{onClick:()=>ge(),type:`default`,icon:(0,$.jsx)(j$,{}),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`重新生成`}),(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(p0,{}),style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,onClick:()=>{let e=`http://ceshi.apiforeign.minzhong.cn${W?.finalVideoUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=`video_${Date.now()}.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},children:`下载视频`})]})]})]})}))})})]})]})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:c===`video`?`查看/编辑视频提词`:`修改提示词`})]}),open:n,onCancel:()=>{g||r(!1)},footer:[(0,$.jsx)(vD,{onClick:()=>r(!1),disabled:g,style:{borderRadius:8},children:`取消`},`cancel`),(0,$.jsx)(vD,{type:`primary`,onClick:le,loading:g,disabled:g,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`确认`},`confirm`)],width:800,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`},body:{background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,padding:`20px 24px`}},children:c===`image`?(0,$.jsx)(Ite,{value:i,onChange:e=>a(e.target.value),rows:8,style:{width:`100%`,height:300,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},placeholder:`请输入提示词`}):(0,$.jsx)(`div`,{style:{maxHeight:500,overflowY:`auto`,paddingRight:10},children:(0,$.jsx)(M9,{value:u,schemaConfigSnapshot:f,onChange:d})})}),(0,$.jsxs)(Pq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`创作记录`})]}),open:o,onCancel:()=>s(!1),width:850,footer:null,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`},body:{background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginBottom:16},children:[(0,$.jsx)(nK,{placeholder:`搜索产品名称`,value:te,onChange:e=>ne(e.target.value),onPressEnter:se,style:{width:200,borderRadius:8,marginRight:8,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`}}),(0,$.jsx)(vD,{type:`primary`,onClick:se,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},children:`搜索`})]}),(0,$.jsx)(f$,{columns:[{title:`产品名称`,dataIndex:`targetProjectName`,key:`targetProjectName`,align:`center`},{title:`状态`,dataIndex:`status`,key:`status`,align:`center`,render:(e,t)=>{let n=e,r=t.current_step_code||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#666`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else return{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#666`}})();return typeof i==`string`?(0,$.jsx)(`span`,{style:{fontSize:12,color:`#666`,fontWeight:500},children:i}):(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,align:`center`,render:e=>{if(!e)return`-`;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`}},{title:`操作`,key:`action`,align:`center`,render:(t,n)=>(0,$.jsx)(`button`,{onClick:()=>e(`/initial/${n.id}/initialinfo`),style:{color:`#6366f1`,textDecoration:`none`,fontSize:12,border:`none`,background:`rgba(99, 102, 241, 0.08)`,padding:`4px 12px`,borderRadius:8,cursor:`pointer`,transition:`all 0.2s`,fontWeight:500},children:`查看详情`})}],dataSource:L,rowKey:`id`,pagination:{current:z,pageSize:V,total:U,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:oe},style:{fontSize:13},scroll:{y:350}})]})]})}function zte(){let e=Je(),[t,n]=(0,S.useState)(``),[r,i]=(0,S.useState)(``),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(``),[l,u]=(0,S.useState)(0),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)(1),[_,v]=(0,S.useState)(10),[y,b]=(0,S.useState)(0),[x,C]=(0,S.useState)(``),w=(0,S.useRef)(null),T=(0,S.useRef)(null),E=(0,S.useCallback)(()=>{t&&URL.revokeObjectURL(t),n(``),i(``),u(0),c(``)},[t]),D=async e=>{if(!e.type.startsWith(`video/`))return i(`请选择视频文件`),!1;if(e.size>100*1024*1024)return i(`视频文件大小不能超过 100MB`),!1;if(await new Promise(t=>{let n=document.createElement(`video`);n.preload=`metadata`,n.onloadedmetadata=()=>{t(n.duration),URL.revokeObjectURL(n.src)},n.onerror=()=>{t(0)},n.src=URL.createObjectURL(e)})>60)return i(`视频时长不能超过 1分钟`),!1;E(),f(!0);try{n((await H5(e)).url),i(``),Z.success(`视频上传成功`)}catch{i(`视频上传失败,请重试`),Z.error(`视频上传失败`)}finally{f(!1)}return!1},O=(0,S.useCallback)(()=>{w.current&&u(w.current.duration)},[]),k=async()=>{if(!t||!s.trim()){Z.warning(`请先上传视频并输入产品名称`);return}f(!0);try{A7({video_url:t,video_duration_seconds:l,title:s.trim(),idempotency_key:`shot_${Date.now()}`}).then(t=>{j7(1,20,x).then(t=>{Z.loading(`创建中...`,3),setTimeout(()=>{e(`/removelens/${t.items[0].id}/removeinfo`)},3e3)})}),E()}catch{Z.error(`任务创建失败,请重试`)}finally{f(!1)}},A=async(e,t,n)=>{try{let r=await j7(e,t,n);m(r.items||[]),b(r.total||0),g(e),v(t)}catch{Z.error(`获取列表失败`)}},j=(e,t)=>{A(e,t,x)},M=()=>{A(1,10,x)};return(0,$.jsx)(`div`,{style:{margin:`-24px -32px -32px`,borderRadius:20,minHeight:`calc(100vh - 34px)`,overflow:`auto`,background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,position:`relative`,padding:`20px 32px`,backgroundImage:`url(${Ste})`,backgroundRepeat:`no-repeat`,backgroundSize:`100% 100%`,backgroundPosition:`center`},children:(0,$.jsxs)(`div`,{style:{maxWidth:1200,margin:`50px auto`,position:`relative`,zIndex:10},children:[(0,$.jsxs)(`div`,{style:{marginBottom:50,height:160,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(`div`,{style:{width:40,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h1`,{style:{fontSize:24,fontWeight:700,margin:0,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`AI视频拆镜工作台`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`一键拆解画面分镜,助力仿拍或创作`})]}),(0,$.jsx)(`div`,{style:{width:40,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(vD,{type:`text`,icon:(0,$.jsx)(MU,{}),onClick:()=>{o(!0),A(1,10,x)},style:{fontSize:14,color:`#6366f1`,background:`rgba(99, 102, 241, 0.1)`,borderRadius:12,padding:`10px 20px`,display:`flex`,alignItems:`center`,gap:8,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`},children:`创作记录`})]}),(0,$.jsxs)(`div`,{style:{width:`100%`,maxWidth:720,margin:`0 auto`},children:[r&&(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(239, 68, 68, 0.2)`,borderRadius:12,padding:`14px 20px`,marginBottom:24,color:`#ef4444`,fontSize:14,textAlign:`center`,fontWeight:500},children:r}),!t&&(0,$.jsxs)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%)`,backdropFilter:`blur(20px)`,borderRadius:24,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(y0.Dragger,{accept:`video/*`,beforeUpload:D,showUploadList:!1,disabled:d,style:{background:d?`rgba(243, 244, 246, 0.3)`:`transparent`,border:`2px dashed ${d?`rgba(209, 213, 219, 0.5)`:`rgba(99, 102, 241, 0.3)`}`,borderRadius:24,padding:`56px 20px`,cursor:d?`not-allowed`:`pointer`,margin:0},children:d?(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:100,height:100,margin:`0 auto 20px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:24,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:40,height:40,border:`4px solid #6366f1`,borderTopColor:`transparent`,borderRadius:`50%`,animation:`spin 1s linear infinite`}})}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#6366f1`,margin:`0 0 8px 0`,fontWeight:600},children:`上传中...`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:0},children:`请稍候,视频正在上传`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:100,height:100,margin:`0 auto 20px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:24,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(g4,{style:{fontSize:40,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#1e293b`,margin:`0 0 8px 0`,fontWeight:600},children:`点击或拖拽到此上传视频文件`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:0},children:`支持 MP4、MOV 格式视频,最大支持 100MB 的文件,支持上传 1 分钟内的视频`})]})})]}),t&&(0,$.jsxs)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%)`,backdropFilter:`blur(20px)`,borderRadius:24,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,overflow:`hidden`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsxs)(`div`,{style:{borderRadius:22,background:`#ffffff`,padding:`24px`,position:`relative`,zIndex:1},children:[(0,$.jsx)(Rq,{title:`确定要删除吗?`,okText:`确定`,cancelText:`取消`,onConfirm:E,children:(0,$.jsx)(`button`,{style:{position:`absolute`,top:20,right:20,width:36,height:36,border:`1px solid rgba(99, 102, 241, 0.2)`,background:`rgba(99, 102, 241, 0.05)`,borderRadius:10,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:16,color:`#6366f1`,zIndex:10,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`,e.currentTarget.style.borderColor=`rgba(239, 68, 68, 0.3)`,e.currentTarget.style.color=`#ef4444`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`,e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.2)`,e.currentTarget.style.color=`#6366f1`},children:`🗑️`})}),(0,$.jsx)(`div`,{style:{textAlign:`center`,marginBottom:20},children:(0,$.jsx)(`video`,{ref:w,src:`http://ceshi.apiforeign.minzhong.cn${t}`,controls:!0,onLoadedMetadata:O,style:{maxWidth:`100%`,maxHeight:320,borderRadius:12,background:`#000`,boxShadow:`0 4px 16px rgba(0,0,0,0.1)`}})}),(0,$.jsxs)(`div`,{style:{marginBottom:24},children:[(0,$.jsxs)(`label`,{style:{display:`block`,fontSize:14,fontWeight:500,color:`#334155`,marginBottom:8},children:[`产品名称 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(nK,{placeholder:`请输入产品名称`,value:s,onChange:e=>c(e.target.value),style:{width:`100%`,height:44,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.4)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.2)`}})]}),(0,$.jsx)(`div`,{style:{textAlign:`center`,marginTop:16},children:(0,$.jsx)(`button`,{onClick:k,disabled:!t||!s.trim()||d,style:{padding:`14px 56px`,background:t&&s.trim()&&!d?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`:`#e2e8f0`,color:`white`,border:`none`,borderRadius:12,fontSize:15,fontWeight:600,cursor:t&&s.trim()&&!d?`pointer`:`not-allowed`,boxShadow:t&&s.trim()&&!d?`0 6px 20px rgba(99, 102, 241, 0.3)`:`none`,display:`inline-flex`,alignItems:`center`,gap:10,transition:`all 0.3s ease`},onMouseEnter:e=>{t&&s.trim()&&!d&&(e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 8px 25px rgba(99, 102, 241, 0.4)`)},onMouseLeave:e=>{t&&s.trim()&&!d&&(e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.3)`)},children:(0,$.jsx)(`span`,{children:d?`创建中...`:`创建`})})})]})]}),(0,$.jsx)(`canvas`,{ref:T,style:{display:`none`}}),(0,$.jsxs)(Pq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`创作记录`})]}),open:a,onCancel:()=>o(!1),width:800,footer:null,styles:{body:{background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginBottom:16,gap:8},children:[(0,$.jsx)(nK,{placeholder:`搜索产品名称`,value:x,onChange:e=>C(e.target.value),onPressEnter:M,style:{width:200,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,height:40}}),(0,$.jsx)(vD,{type:`primary`,onClick:M,style:{borderRadius:10,height:40,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%)`,backdropFilter:`blur(20px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(f$,{columns:[{title:`产品名称`,dataIndex:`title`,key:`title`,render:e=>(0,$.jsx)(`span`,{style:{fontSize:14,color:`#1e293b`,fontWeight:500},children:e})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:13,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,render:t=>(0,$.jsx)(vD,{type:`text`,onClick:()=>e(`/removelens/${t.id}/removeinfo`),style:{color:`#6366f1`,fontSize:13,padding:`4px 12px`,borderRadius:6,background:`rgba(99, 102, 241, 0.1)`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`},children:`查看详情`})}],dataSource:p,rowKey:`id`,pagination:{current:h,pageSize:_,total:y,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:j,style:{padding:`16px 24px`,borderTop:`1px solid rgba(99, 102, 241, 0.1)`}},style:{fontSize:13},scroll:{y:350},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(99, 102, 241, 0.03)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})})]})]})]})})}var Bte=c(o(((e,t)=>{(function(n){typeof e==`object`&&t!==void 0?t.exports=n():typeof define==`function`&&define.amd?define([],n):(typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this).JSZip=n()})(function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var c=typeof l==`function`&&l;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var u=Error(`Cannot find module '`+o+`'`);throw u.code=`MODULE_NOT_FOUND`,u}var d=n[o]={exports:{}};t[o][0].call(d.exports,function(e){var n=t[o][1][e];return i(n||e)},d,d.exports,e,t,n,r)}return n[o].exports}for(var a=typeof l==`function`&&l,o=0;o>2,s=(3&t)<<4|n>>4,c=1>6:64,l=2>4,n=(15&o)<<4|(s=a.indexOf(e.charAt(l++)))>>2,r=(3&s)<<6|(c=a.indexOf(e.charAt(l++))),f[u++]=t,s!==64&&(f[u++]=n),c!==64&&(f[u++]=r);return f}},{"./support":30,"./utils":32}],2:[function(e,t,n){var r=e(`./external`),i=e(`./stream/DataWorker`),a=e(`./stream/Crc32Probe`),o=e(`./stream/DataLengthProbe`);function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o(`data_length`)),t=this;return e.on(`end`,function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw Error(`Bug : uncompressed data size mismatch`)}),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo(`compressedSize`,this.compressedSize).withStreamInfo(`uncompressedSize`,this.uncompressedSize).withStreamInfo(`crc32`,this.crc32).withStreamInfo(`compression`,this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new a).pipe(new o(`uncompressedSize`)).pipe(t.compressWorker(n)).pipe(new o(`compressedSize`)).withStreamInfo(`compression`,t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){var r=e(`./stream/GenericWorker`);n.STORE={magic:`\0\0`,compressWorker:function(){return new r(`STORE compression`)},uncompressWorker:function(){return new r(`STORE decompression`)}},n.DEFLATE=e(`./flate`)},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){var r=e(`./utils`),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return e!==void 0&&e.length?r.getTypeOf(e)===`string`?function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){var r=null;r=typeof Promise<`u`?Promise:e(`lie`),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){var r=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Uint32Array<`u`,i=e(`pako`),a=e(`./utils`),o=e(`./stream/GenericWorker`),s=r?`uint8array`:`array`;function c(e,t){o.call(this,`FlateWorker/`+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic=`\b\0`,a.inherits(c,o),c.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(s,e.data),!1)},c.prototype.flush=function(){o.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new c(`Deflate`,e)},n.uncompressWorker=function(){return new c(`Inflate`,{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){function r(e,t){var n,r=``;for(n=0;n>>=8;return r}function i(e,t,n,i,o,u){var d,f,p=e.file,m=e.compression,h=u!==s.utf8encode,g=a.transformTo(`string`,u(p.name)),_=a.transformTo(`string`,s.utf8encode(p.name)),v=p.comment,y=a.transformTo(`string`,u(v)),b=a.transformTo(`string`,s.utf8encode(v)),x=_.length!==p.name.length,S=b.length!==v.length,C=``,w=``,T=``,E=p.dir,D=p.date,O={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(O.crc32=e.crc32,O.compressedSize=e.compressedSize,O.uncompressedSize=e.uncompressedSize);var k=0;t&&(k|=8),h||!x&&!S||(k|=2048);var A=0,j=0;E&&(A|=16),o===`UNIX`?(j=798,A|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,E)):(j=20,A|=function(e){return 63&(e||0)}(p.dosPermissions)),d=D.getUTCHours(),d<<=6,d|=D.getUTCMinutes(),d<<=5,d|=D.getUTCSeconds()/2,f=D.getUTCFullYear()-1980,f<<=4,f|=D.getUTCMonth()+1,f<<=5,f|=D.getUTCDate(),x&&(w=r(1,1)+r(c(g),4)+_,C+=`up`+r(w.length,2)+w),S&&(T=r(1,1)+r(c(y),4)+b,C+=`uc`+r(T.length,2)+T);var M=``;return M+=` +\0`,M+=r(k,2),M+=m.magic,M+=r(d,2),M+=r(f,2),M+=r(O.crc32,4),M+=r(O.compressedSize,4),M+=r(O.uncompressedSize,4),M+=r(g.length,2),M+=r(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+M+g+C,dirRecord:l.CENTRAL_FILE_HEADER+r(j,2)+M+r(y.length,2)+`\0\0\0\0`+r(A,4)+r(i,4)+g+C+y}}var a=e(`../utils`),o=e(`../stream/GenericWorker`),s=e(`../utf8`),c=e(`../crc32`),l=e(`../signature`);function u(e,t,n,r){o.call(this,`ZipFileWorker`),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo(`string`,this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){var r=e(`./Uint8ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){var r=e(`./DataReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){var r=e(`./ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array;var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){var r=e(`../utils`),i=e(`../support`),a=e(`./ArrayReader`),o=e(`./StringReader`),s=e(`./NodeBufferReader`),c=e(`./Uint8ArrayReader`);t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),t!==`string`||i.uint8array?t===`nodebuffer`?new s(e):i.uint8array?new c(r.transformTo(`uint8array`,e)):new a(r.transformTo(`array`,e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){n.LOCAL_FILE_HEADER=`PK`,n.CENTRAL_FILE_HEADER=`PK`,n.CENTRAL_DIRECTORY_END=`PK`,n.ZIP64_CENTRAL_DIRECTORY_LOCATOR=`PK\x07`,n.ZIP64_CENTRAL_DIRECTORY_END=`PK`,n.DATA_DESCRIPTOR=`PK\x07\b`},{}],24:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../utils`);function a(e){r.call(this,`ConvertWorker to `+e),this.destType=e}i.inherits(a,r),a.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../crc32`);function a(){r.call(this,`Crc32Probe`),this.withStreamInfo(`crc32`,0)}e(`../utils`).inherits(a,r),a.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataLengthProbe for `+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(a,i),a.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataWorker`);var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=``,this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}r.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case`string`:e=this.data.substring(this.index,t);break;case`uint8array`:e=this.data.subarray(this.index,t);break;case`array`:case`nodebuffer`:e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){function r(e){this.name=e||`default`,this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit(`data`,e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(`end`),this.cleanUp(),this.isFinished=!0}catch(e){this.emit(`error`,e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit(`error`,e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n `+e:e}},t.exports=r},{}],29:[function(e,t,n){var r=e(`../utils`),i=e(`./ConvertWorker`),a=e(`./GenericWorker`),o=e(`../base64`),s=e(`../support`),c=e(`../external`),l=null;if(s.nodestream)try{l=e(`../nodejs/NodejsStreamOutputAdapter`)}catch{}function u(e,t){return new c.Promise(function(n,i){var a=[],s=e._internalType,c=e._outputType,l=e._mimeType;e.on(`data`,function(e,n){a.push(e),t&&t(n)}).on(`error`,function(e){a=[],i(e)}).on(`end`,function(){try{n(function(e,t,n){switch(e){case`blob`:return r.newBlob(r.transformTo(`arraybuffer`,t),n);case`base64`:return o.encode(t);default:return r.transformTo(e,t)}}(c,function(e,t){var n,r=0,i=null,a=0;for(n=0;n`u`)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=new Blob([r],{type:`application/zip`}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),n.blob=i.getBlob(`application/zip`).size===0}catch{n.blob=!1}}}try{n.nodestream=!!e(`readable-stream`).Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){for(var r=e(`./utils`),i=e(`./support`),a=e(`./nodejsUtils`),o=e(`./stream/GenericWorker`),s=Array(256),c=0;c<256;c++)s[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;s[254]=s[254]=1;function l(){o.call(this,`utf-8 decode`),this.leftOver=null}function u(){o.call(this,`utf-8 encode`)}n.utf8encode=function(e){return i.nodebuffer?a.newBufferFrom(e,`utf-8`):function(e){var t,n,r,a,o,s=e.length,c=0;for(a=0;a>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo(`nodebuffer`,e).toString(`utf-8`):function(e){var t,n,i,a,o=e.length,c=Array(2*o);for(t=n=0;t>10&1023,c[n++]=56320|1023&i)}return c.length!==n&&(c.subarray?c=c.subarray(0,n):c.length=n),r.applyFromCharCode(c)}(e=r.transformTo(i.uint8array?`uint8array`:`array`,e))},r.inherits(l,o),l.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?`uint8array`:`array`,e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=t;(t=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),t.set(a,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+s[e[n]]>t?n:t}(t),c=t;o!==t.length&&(i.uint8array?(c=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(c=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:n.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=l,r.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){var r=e(`./support`),i=e(`./base64`),a=e(`./nodejsUtils`),o=e(`./external`);function s(e){return e}function c(e,t){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),e==0&&(this.dosPermissions=63&this.externalFileAttributes),e==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!==`/`||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||={};e.index+4>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},n.buf2binstring=function(e){return c(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n>10&1023,l[r++]=56320|1023&i)}return c(l,r)},n.utf8border=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+o[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){t.exports=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;n!==0;){for(n-=o=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s>>8^a[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){var r,i=e(`../utils/common`),a=e(`./trees`),o=e(`./adler32`),s=e(`./crc32`),c=e(`./messages`),l=0,u=4,d=0,f=-2,p=-1,m=4,h=2,g=8,_=9,v=286,y=30,b=19,x=2*v+1,S=15,C=3,w=258,T=w+C+1,E=42,D=113,O=1,k=2,A=3,j=4;function M(e,t){return e.msg=c[t],t}function N(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),n!==0&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function I(e,t){a._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function L(e,t){e.pending_buf[e.pending++]=t}function R(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function z(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-T?e.strstart-(e.w_size-T):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+w,p=l[a+o-1],m=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do if(l[(n=t)+o]===m&&l[n+o-1]===p&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do;while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&ac&&--i!=0);return o<=e.lookahead?o:e.lookahead}function B(e){var t,n,r,a,c,l,u,d,f,p,m=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-T)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);a+=m}if(e.strm.avail_in===0)break;if(l=e.strm,u=e.window,d=e.strstart+e.lookahead,f=a,p=void 0,p=l.avail_in,f=C)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C)if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-C,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(B(e),e.lookahead===0&&t===l)return O;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,I(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-T&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):(e.strstart>e.block_start&&(I(e,!1),e.strm.avail_out),O)}),new U(4,4,8,4,V),new U(4,5,16,8,V),new U(4,6,32,32,V),new U(4,4,16,16,H),new U(8,16,32,32,H),new U(8,16,128,128,H),new U(8,32,128,256,H),new U(32,128,258,1024,H),new U(32,258,258,4096,H)],n.deflateInit=function(e,t){return W(e,t,g,15,8,0)},n.deflateInit2=W,n.deflateReset=ne,n.deflateResetKeep=te,n.deflateSetHeader=function(e,t){return e&&e.state&&e.state.wrap===2?(e.state.gzhead=t,d):f},n.deflate=function(e,t){var n,i,o,c;if(!e||!e.state||5>8&255),L(i,i.gzhead.time>>16&255),L(i,i.gzhead.time>>24&255),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(L(i,255&i.gzhead.extra.length),L(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(L(i,0),L(i,0),L(i,0),L(i,0),L(i,0),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,3),i.status=D);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:i.level===6?2:3)<<6,i.strstart!==0&&(p|=32),p+=31-p%31,i.status=D,R(i,p),i.strstart!==0&&(R(i,e.adler>>>16),R(i,65535&e.adler)),e.adler=1}if(i.status===69)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending!==i.pending_buf_size));)L(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(i.status===73)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.gzindex=0,i.status=91)}else i.status=91;if(i.status===91)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.status=103)}else i.status=103;if(i.status===103&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&F(e),i.pending+2<=i.pending_buf_size&&(L(i,255&e.adler),L(i,e.adler>>8&255),e.adler=0,i.status=D)):i.status=D),i.pending!==0){if(F(e),e.avail_out===0)return i.last_flush=-1,d}else if(e.avail_in===0&&N(t)<=N(n)&&t!==u)return M(e,-5);if(i.status===666&&e.avail_in!==0)return M(e,-5);if(e.avail_in!==0||i.lookahead!==0||t!==l&&i.status!==666){var m=i.strategy===2?function(e,t){for(var n;;){if(e.lookahead===0&&(B(e),e.lookahead===0)){if(t===l)return O;break}if(e.match_length=0,n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):i.strategy===3?function(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=w){if(B(e),e.lookahead<=w&&t===l)return O;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=C&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(n=a._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):r[i.level].func(i,t);if(m!==A&&m!==j||(i.status=666),m===O||m===A)return e.avail_out===0&&(i.last_flush=-1),d;if(m===k&&(t===1?a._tr_align(i):t!==5&&(a._tr_stored_block(i,0,0,!1),t===3&&(P(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),F(e),e.avail_out===0))return i.last_flush=-1,d}return t===u?i.wrap<=0?1:(i.wrap===2?(L(i,255&e.adler),L(i,e.adler>>8&255),L(i,e.adler>>16&255),L(i,e.adler>>24&255),L(i,255&e.total_in),L(i,e.total_in>>8&255),L(i,e.total_in>>16&255),L(i,e.total_in>>24&255)):(R(i,e.adler>>>16),R(i,65535&e.adler)),F(e),0=n.w_size&&(s===0&&(P(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),c=e.avail_in,l=e.next_in,u=e.input,e.avail_in=m,e.next_in=0,e.input=t,B(n);n.lookahead>=C;){for(r=n.strstart,a=n.lookahead-(C-1);n.ins_h=(n.ins_h<>>=b=y>>>24,m-=b,(b=y>>>16&255)==0)E[a++]=65535&y;else{if(!(16&b)){if(!(64&b)){y=h[(65535&y)+(p&(1<>>=b,m-=b),m<15&&(p+=T[r++]<>>=b=y>>>24,m-=b,!(16&(b=y>>>16&255))){if(!(64&b)){y=g[(65535&y)+(p&(1<>>=b,m-=b,(b=a-o)>3,p&=(1<<(m-=x<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=1&t.wrap),t.mode=f,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(p),t.distcode=t.distdyn=new r.Buf32(m),t.sane=1,t.back=-1,u):d}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,_(e)):d}function y(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(a=o.wsize-o.wnext)&&(a=i),r.arraySet(o.window,t,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=a(n.check,B,2,0),x=b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg=`incorrect header check`,n.mode=30;break}if((15&b)!=8){e.msg=`unknown compression method`,n.mode=30;break}if(x-=4,F=8+(15&(b>>>=4)),n.wbits===0)n.wbits=F;else if(F>n.wbits){e.msg=`invalid window size`,n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=3;case 3:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>8&255,B[2]=b>>>16&255,B[3]=b>>>24&255,n.check=a(n.check,B,4,0)),x=b=0,n.mode=4;case 4:for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>8),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>>8&255,n.check=a(n.check,B,2,0)),x=b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(E=n.length)&&(E=v),E&&(n.head&&(F=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,E,F)),512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(v===0)break e;for(E=0;F=p[g+ E++],n.head&&F&&n.length<65536&&(n.head.name+=String.fromCharCode(F)),F&&E>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(v===0)break e;v--,b+=p[g++]<>>=1)){case 0:n.mode=14;break;case 1:if(w(n),n.mode=20,t!==6)break;b>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg=`invalid block type`,n.mode=30}b>>>=2,x-=2;break;case 14:for(b>>>=7&x,x-=7&x;x<32;){if(v===0)break e;v--,b+=p[g++]<>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=30;break}if(n.length=65535&b,x=b=0,n.mode=15,t===6)break e;case 15:n.mode=16;case 16:if(E=n.length){if(v>>=5,x-=5,n.ndist=1+(31&b),b>>>=5,x-=5,n.ncode=4+(15&b),b>>>=4,x-=4,286>>=3,x-=3}for(;n.have<19;)n.lens[V[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,L={bits:n.lenbits},I=s(0,n.lens,0,19,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid code lengths set`,n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=k,x-=k,n.lens[n.have++]=j;else{if(j===16){for(R=k+2;x>>=k,x-=k,n.have===0){e.msg=`invalid bit length repeat`,n.mode=30;break}F=n.lens[n.have-1],E=3+(3&b),b>>>=2,x-=2}else if(j===17){for(R=k+3;x>>=k)),b>>>=3,x-=3}else{for(R=k+7;x>>=k)),b>>>=7,x-=7}if(n.have+E>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=30;break}for(;E--;)n.lens[n.have++]=F}}if(n.mode===30)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=30;break}if(n.lenbits=9,L={bits:n.lenbits},I=s(c,n.lens,0,n.nlen,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid literal/lengths set`,n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,L={bits:n.distbits},I=s(l,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,L),n.distbits=L.bits,I){e.msg=`invalid distances set`,n.mode=30;break}if(n.mode=20,t===6)break e;case 20:n.mode=21;case 21:if(6<=v&&258<=y){e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,o(e,C),_=e.next_out,m=e.output,y=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,b=n.hold,x=n.bits,n.mode===12&&(n.back=-1);break}for(n.back=0;A=(z=n.lencode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,n.length=j,A===0){n.mode=26;break}if(32&A){n.back=-1,n.mode=12;break}if(64&A){e.msg=`invalid literal/length code`,n.mode=30;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(z=n.distcode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,64&A){e.msg=`invalid distance code`,n.mode=30;break}n.offset=j,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=30;break}n.mode=25;case 25:if(y===0)break e;if(E=C-y,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break}D=E>n.wnext?(E-=n.wnext,n.wsize-E):n.wnext-E,E>n.length&&(E=n.length),O=n.window}else O=m,D=_-n.offset,E=n.length;for(yv?(b=L[R+d[w]],N[P+d[w]]):(b=96,0),p=1<>k)+(m-=p)]=y<<24|b<<16|x|0,m!==0;);for(p=1<>=1;if(p===0?M=0:(M&=p-1,M+=p),w++,--F[C]==0){if(C===E)break;C=t[n+d[w]]}if(D>>7)]}function L(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function R(e,t,n){e.bi_valid>h-n?(e.bi_buf|=t<>h-e.bi_valid,e.bi_valid+=n-h):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function V(e,t,n){var r,i,a=Array(m+1),o=0;for(r=1;r<=m;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];s!==0&&(e[2*i]=B(a[s]++,s))}}function H(e){var t;for(t=0;t>1;1<=n;n--)te(e,a,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],te(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,te(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,o,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,g=t.stat_desc.max_length,_=0;for(a=0;a<=m;a++)e.bl_count[a]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n>=7;r>>=1)if(1&n&&e.dyn_ltree[2*t]!==0)return i;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return a;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=n+5,n+4<=o&&t!==-1?q(e,t,n,r):e.strategy===4||s===o?(R(e,2+ +!!r,3),ne(e,T,E)):(R(e,4+ +!!r,3),function(e,t,n,r){var i;for(R(e,t-257,5),R(e,n-1,5),R(e,r-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(O[n]+l+1)]++,e.dyn_dtree[2*I(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){R(e,2,3),z(e,_,T),function(e){e.bi_valid===16?(L(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){(function(e,t){if(!e.setImmediate){var n,r,i,a,o=1,s={},c=!1,l=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,n={}.toString.call(e.process)===`[object process]`?function(e){process.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage(``,`*`),e.onmessage=n,t}}()?(a=`setImmediate$`+Math.random()+`$`,e.addEventListener?e.addEventListener(`message`,p,!1):e.attachEvent(`onmessage`,p),function(t){e.postMessage(a+t,`*`)}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):l&&`onreadystatechange`in l.createElement(`script`)?(r=l.documentElement,function(e){var t=l.createElement(`script`);t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(f,0,e)},u.setImmediate=function(e){typeof e!=`function`&&(e=Function(``+e));for(var t=Array(arguments.length-1),r=0;r`u`?e===void 0?this:e:self)}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{}]},{},[10])(10)})}))(),1),{Search:Vte}=nK,{Text:Hte}=Q,Ute=()=>{let[e,t]=(0,S.useState)(`project`),[n,r]=(0,S.useState)(`video`),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)({page:1,pageSize:10}),[c,l]=(0,S.useState)(0),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(new Set),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(null),v=S.createRef(),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),[E,D]=(0,S.useState)([]),[O,k]=(0,S.useState)(``),[A,j]=(0,S.useState)([]),[M,N]=(0,S.useState)(!1),[P,F]=(0,S.useState)(0),[I,L]=(0,S.useState)(void 0),[R,z]=(0,S.useState)(new Map),[B,V]=(0,S.useState)(``),H=(0,S.useRef)(null),[U,ee]=(0,S.useState)(1),[te,ne]=(0,S.useState)(10),[W,re]=(0,S.useState)(!1),[G,K]=(0,S.useState)(!1),[q,ie]=(0,S.useState)([]),[J,ae]=(0,S.useState)(0),[oe,se]=(0,S.useState)(1),[ce,le]=(0,S.useState)(10),[ue,de]=(0,S.useState)(!1),[fe,pe]=(0,S.useState)(``),[me,he]=(0,S.useState)(!1),[ge,_e]=(0,S.useState)(new Set),ve=null,ye=new Map,be=[],xe=0,Se=0,Ce=(e,t,n)=>{if(n&&Se<8)Se++,xe++,e();else if(xe<15)xe++,e();else{let r={callback:e,priority:n?2:1,element:t};be.push(r),be.sort((e,t)=>t.priority-e.priority)}},we=()=>{if(xe--,Se>0&&Se--,be.length>0){let e=be.shift();e&&(xe++,e.priority===2&&Se++,e.callback())}},Te=()=>(ve||=new IntersectionObserver(e=>{e.forEach(e=>{let t=ye.get(e.target);if(e.isIntersecting&&t){ye.delete(e.target),ve?.unobserve(e.target);let n=e.intersectionRatio>=1;Ce(t,e.target,n)}})},{rootMargin:`400px`,threshold:[.01,.5,1]}),ve),Ee=e=>{if(!e)return null;try{let t=new URL(e).searchParams.get(`exp`);return t?parseInt(t,10):null}catch{try{let t=e.indexOf(`?`);if(t!==-1){let n=e.substring(t+1),r=new URLSearchParams(n).get(`exp`);if(r)return parseInt(r,10)}return null}catch{return null}}},De=e=>{let t=Ee(e);return t?Math.floor(Date.now()/1e3)>t:!1},Oe=({item:e,mediaType:t,onClick:n,isSelected:r=!1,onToggleSelect:i,isSelectionMode:a=!1})=>{let[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),m=(0,S.useRef)(null),h=(0,S.useRef)(null),g=(0,S.useRef)(null);(0,S.useEffect)(()=>{let n=t===`video`?e.videoUrl:e.imageUrl;n&&De(n)&&d(!0)},[e,t]),(0,S.useEffect)(()=>{if(u)return;let e=m.current;if(!e)return;let t=Te();return ye.set(e,()=>{p(!0)}),t.observe(e),()=>{ye.delete(e),t.unobserve(e)}},[u]);let _=(e,t=!1)=>{let n=`http://ceshi.apiforeign.minzhong.cn`,r=e.startsWith(`/`)?e.slice(1):e,i=n.endsWith(`/`)?n.slice(0,-1):n;return t?`${i}/static/${r}&w=300&q=50`:`${i}/${r}`},v=()=>{g.current&&clearTimeout(g.current),s(!0),p(!1),we()},y=()=>{g.current=setTimeout(()=>{_(t===`video`?e.videoUrl:e.imageUrl),l(!0),p(!1),we()},1e3)},b=t===`video`?_(e.videoUrl):_(e.imageUrl,!0),x=e.videoCoverUrl?_(e.videoCoverUrl,!0):void 0;return(0,$.jsxs)(`div`,{ref:m,style:{width:160,height:120,position:`relative`,borderRadius:4,cursor:`pointer`,overflow:`hidden`,boxShadow:`0 2px 8px rgba(0,0,0,0.1)`,transition:`transform 0.2s, box-shadow 0.2s`},onClick:a?void 0:n,onMouseEnter:e=>{a||(e.currentTarget.style.transform=`scale(1.05)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0,0,0,0.2)`)},onMouseLeave:e=>{a||(e.currentTarget.style.transform=`scale(1)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(0,0,0,0.1)`)},children:[(t===`video`&&e.videoCoverUrl||t===`image`)&&(f||o)&&!c&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`},children:[f&&!o&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,backgroundColor:`rgba(248, 250, 252, 0.9)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1},children:(0,$.jsx)(`div`,{style:{width:28,height:28,border:`3px solid #e2e8f0`,borderTopColor:`#3b82f6`,borderRadius:`50%`,animation:`spin 0.8s linear infinite`}})}),t===`video`&&e.videoCoverUrl&&(0,$.jsx)(`img`,{ref:h,src:x,style:{width:`100%`,height:`100%`,objectFit:`cover`,opacity:+!!o,transition:`opacity 0.3s ease-in-out`},loading:`lazy`,onLoad:v,onError:y}),t===`image`&&(0,$.jsx)(`img`,{ref:h,src:b,alt:`图片预览`,style:{width:`100%`,height:`100%`,objectFit:`cover`,opacity:+!!o,transition:`opacity 0.3s ease-in-out`},loading:`lazy`,onLoad:v,onError:y})]}),!f&&!o&&!c&&(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,backgroundColor:`#cbd5e1`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:t===`video`?(0,$.jsx)(Y8,{style:{color:`#64748b`,fontSize:16}}):(0,$.jsx)(p6,{style:{color:`#64748b`,fontSize:16}})})}),t===`video`&&!e.videoCoverUrl&&!c&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#1e293b`},children:[(0,$.jsx)(Y8,{style:{color:`#64748b`,fontSize:24}}),(0,$.jsx)(Hte,{style:{fontSize:12,color:`#94a3b8`,marginTop:4},children:`暂无封面`})]}),u&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#fef3c7`,color:`#d97706`,fontSize:12,flexDirection:`column`,gap:4},children:[(0,$.jsx)(OH,{style:{fontSize:24}}),`图片过期`]}),c&&(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#fef2f2`,color:`#dc2626`,fontSize:12},children:`加载失败`}),!u&&!a&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:0,left:0,right:0,background:`linear-gradient(transparent, rgba(0,0,0,0.5))`,padding:`8px`,color:`#fff`,fontSize:12,opacity:0,transition:`opacity 0.2s`},onMouseEnter:e=>{e.currentTarget.style.opacity=`1`},onMouseLeave:e=>{e.currentTarget.style.opacity=`0`},children:`点击预览`}),a&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,width:20,height:20,borderRadius:`50%`,backgroundColor:r?`#10b981`:`rgba(255,255,255,0.9)`,border:r?`2px solid #10b981`:`2px solid #d1d5db`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,transition:`all 0.2s`},onClick:t=>{t.stopPropagation(),i?.(e.generatedResourceId||e.id)},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`},children:r&&(0,$.jsx)(`svg`,{width:12,height:12,viewBox:`0 0 12 12`,fill:`none`,children:(0,$.jsx)(`path`,{d:`M10 3L4.5 8.5L2 6`,stroke:`white`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`})})}),a&&r&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,border:`3px solid #10b981`,borderRadius:4,pointerEvents:`none`,zIndex:5}})]})},ke=e=>{_(e),h(!0),window.dispatchEvent(new Event(`previewOpen`))},Ae=()=>{v.current&&(v.current.pause(),v.current.currentTime=0),document.querySelectorAll(`video`).forEach(e=>{e.pause(),e.currentTime=0}),h(!1)},je=e=>e.generatedResourceId||e.id,Me=e=>!!e.generatedResourceId,Ne=e=>{_e(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},Pe=()=>{let e=i.flatMap(e=>e.items.map(e=>je(e)));ge.size===e.length?_e(new Set):_e(new Set(e))},Fe=async()=>{if(ge.size===0){Z.warning(`请先选择要下载的媒体`);return}if(ge.size>10){Z.warning(`最多只能单次下载10个文件`);return}let e=[];i.forEach(t=>{t.items.forEach(t=>{ge.has(je(t))&&e.push(t)})});let t=new Bte.default,n=`http://ceshi.apiforeign.minzhong.cn`,r=t.folder(`downloads`),a=!1,o=0;Z.loading({content:`下载中,请稍候...`,key:`downloadProgress`});for(let t of e){let e=`${n}${t.videoUrl||t.imageUrl}`,i=((t.videoUrl||t.imageUrl).split(`/`).pop()||`file_${Date.now()}`).split(`?`)[0];try{let t=await fetch(e);if(!t.ok)throw Error(`Network response was not ok`);let n=await t.blob();r?.file(i,n),o++}catch{console.warn(`文件下载失败(CORS限制): ${i},将使用备用方式下载`),a=!0;break}}if(a){Z.destroy(`downloadProgress`),Z.info(`由于跨域限制,将逐个下载文件`),e.forEach((e,t)=>{setTimeout(()=>{let t=`${n}${e.videoUrl||e.imageUrl}&download=1`,r=document.createElement(`a`);r.href=t,r.download=``,document.body.appendChild(r),r.click(),document.body.removeChild(r)},t*500)});return}let s=await t.generateAsync({type:`blob`}),c=document.createElement(`a`);c.href=URL.createObjectURL(s),c.download=`downloads_${Date.now()}.zip`,c.click(),URL.revokeObjectURL(c.href),Z.destroy(`downloadProgress`),Z.success(`下载完成,共 ${o} 个文件`)},Ie=()=>{if(ge.size===0){Z.warning(`请先选择要上传的媒体`);return}D([]),k(``),T(!0)},Le=async(e,t)=>{N(!0);try{let n=await E7({page:e,page_size:t});j(n?.data||n||[]),F(n.pagination.total||0)}catch(e){console.error(`加载授权列表失败:`,e),j([]),F(0)}finally{N(!1)}},Re=async()=>{de(!0);try{let e=await K7({status:fe||void 0,page:oe,pageSize:ce});ie(e?.data||e||[]),ae(e.pagination?.total||e.total||0)}catch(e){console.error(`加载上传历史失败:`,e),ie([]),ae(0)}finally{de(!1)}},ze=()=>{K(!0),se(1),pe(``),Re()},Be=()=>{se(1),Re()},Ve=(e,t)=>{se(e),le(t),Re()},He=async()=>{if(!I){Z.warning(`请先选择授权账户`);return}if(ge.size===0){Z.warning(`请先选择要上传的媒体`);return}C(!0);try{let t=[],n=E.map(e=>e.accountId),r=new Map;i.forEach(e=>{e.items.forEach(e=>{let t=je(e);r.set(t,e)})});for(let i of ge){let a=r.get(i),o;o=a&&Me(a)?`generated_resources`:e===`project`?`generation_records`:`chat_generation_tasks`,t.push({advertiser_ids:n,resource_ids:[i],oauth_id:I.value,source_model:o})}await G7({tasks:t}),Z.success(`已提交 ${t.length} 个上传任务,后台异步处理中`),he(!1),_e(new Set),T(!1),D([]),k(``),L(void 0),z(new Map),V(``)}catch(e){console.error(`批量上传失败:`,e),Z.error(e.message||`批量上传失败`)}finally{C(!1)}},Ue=async(e,t)=>{if(t.trim())try{let n=(await q7({filenames:[{source_id:e,file_name:t}]}))?.results?.find(t=>t.source_id===e)?.new_file_name||t;a(t=>t.map(t=>({...t,items:t.items.map(t=>je(t)===e?{...t,fileName:n}:t)}))),Z.success(`文件名更新成功`)}catch(e){console.error(`文件名更新失败:`,e),Z.error(e.message||`文件名更新失败`)}},We=async(e,t)=>{if(!(!t.trim()||e.length===0))try{let n=await q7({filenames:e.map(e=>({source_id:e,file_name:t}))}),r=new Map;n?.results?.forEach(e=>{e.success&&e.newFileName&&r.set(e.sourceId,e.newFileName)}),a(n=>{let i=new Set(e);return n.map(e=>({...e,items:e.items.map(e=>{let n=je(e);if(i.has(n)){let i=r.get(n)||t;return{...e,fileName:i}}return e})}))}),console.log(n);let i=n?.successCount||0;Z.success(`已更新 ${i} 个文件名`)}catch(e){console.error(`文件名更新失败:`,e),Z.error(e.message||`文件名更新失败`)}},Ge=e=>{b(e)};(0,S.useEffect)(()=>{d(!0);let t=``;if(t=e===`project`?`?gen_type=${n}&history_source=generation_record&page=${o.page}&page_size=${o.pageSize}`:`?gen_type=${n}&page=${o.page}&page_size=${o.pageSize}`,y){let t=``;t=e===`project`?`${y}?gen_type=${n}&history_source=generation_record&page=${o.page}&page_size=${o.pageSize}`:`${y}?gen_type=${n}&page=${o.page}&page_size=${o.pageSize}`,p7(t).then(e=>{let t=Array.isArray(e)?e:e?.items||[],n=[{generatedDate:e.generatedDate,items:t,total:e.total,page:e.page}];n&&n[0].items.length>0?a(n):a([])}).catch(e=>{}).finally(()=>{d(!1)})}else f7(t).then(e=>{let t=Array.isArray(e)?e:e?.groups||[];t.forEach(e=>{e.page=1}),o.page===1?a(t):a(e=>[...e,...t]),l(e?.totalDays||0)}).catch(e=>{o.page===1&&a([])}).finally(()=>{d(!1)})},[e,n,o.page,y]);let Ke=()=>{u||s(e=>({...e,page:e.page+1}))},qe=async(t,r,i)=>{if(f.has(r))return;p(e=>new Set([...e,r]));let s=i+1,c=``;c=e===`project`?`${t}?gen_type=${n}&history_source=generation_record&page=${s}&page_size=${o.pageSize}`:`${t}?gen_type=${n}&page=${s}&page_size=${o.pageSize}`;try{let e=(await p7(c)).items||[];e&&e.length>0&&a(n=>n.map(n=>n.generatedDate===t?{...n,items:[...n.items,...e],page:s}:n))}catch{}finally{p(e=>{let t=new Set(e);return t.delete(r),t})}};return(0,S.useEffect)(()=>{s(e=>({...e,page:1}))},[e,n]),(0,$.jsxs)(`div`,{style:{minHeight:`calc(100vh - 90px)`,background:`#ffffffff`,overflowY:`auto`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:16,padding:`12px 20px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(K4,{style:{color:`#94a3b8`,fontSize:14}}),(0,$.jsxs)(DU,{children:[(0,$.jsx)(vD,{type:e===`project`?`primary`:`default`,onClick:()=>{t(`project`),he(!1),_e(new Set)},style:{borderRadius:8,background:e===`project`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:e===`project`?`none`:`1px solid #e2e8f0`,color:e===`project`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(xZ,{}),children:`项目记录`}),(0,$.jsx)(vD,{type:e===`creation`?`primary`:`default`,onClick:()=>{t(`creation`),he(!1),_e(new Set)},style:{borderRadius:8,background:e===`creation`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:e===`creation`?`none`:`1px solid #e2e8f0`,color:e===`creation`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(MU,{}),children:`创作记录`})]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:me?(0,$.jsxs)(DU,{children:[(0,$.jsx)(vD,{onClick:Pe,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#222222ff`,fontWeight:600},children:ge.size===i.reduce((e,t)=>e+t.items.length,0)?`取消全选`:`全选`}),(0,$.jsx)(vD,{onClick:()=>{he(!1),_e(new Set)},style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:600},children:`取消选择`}),(0,$.jsxs)(vD,{onClick:()=>Fe(),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,fontWeight:600},children:[`下载 (`,ge.size,`)`]}),(0,$.jsx)(vD,{type:`primary`,onClick:Ie,loading:x,disabled:x||ge.size===0,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,fontWeight:600},children:x?`上传中...`:`推送至账户 (${ge.size})`})]}):(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(U8,{}),onClick:()=>he(!0),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600},children:`批量操作`})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:24,padding:`12px 20px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:`媒体类型:`}),(0,$.jsxs)(DU,{children:[(0,$.jsx)(vD,{type:n===`video`?`primary`:`default`,onClick:()=>{r(`video`),he(!1),_e(new Set)},style:{borderRadius:8,background:n===`video`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:n===`video`?`none`:`1px solid #e2e8f0`,color:n===`video`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(Y8,{}),children:`视频`}),(0,$.jsx)(vD,{type:n===`image`?`primary`:`default`,onClick:()=>{r(`image`),he(!1),_e(new Set)},style:{borderRadius:8,background:n===`image`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:n===`image`?`none`:`1px solid #e2e8f0`,color:n===`image`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(p6,{}),children:`图片`}),(0,$.jsx)(FH,{picker:`date`,value:y?(0,ED.default)(y):void 0,onChange:(e,t)=>Ge(t||``),format:`YYYY-MM-DD`,style:{width:160,borderRadius:8,border:`1px solid #e2e8f0`},placeholder:`选择日期`}),y&&(0,$.jsx)(vD,{type:`text`,onClick:()=>Ge(``),style:{color:`#94a3b8`,fontSize:12},children:`清除`})]})]}),(0,$.jsx)(vD,{icon:(0,$.jsx)(OH,{}),onClick:ze,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,color:`#ffffff`,fontWeight:600,boxShadow:`0 4px 15px rgba(102, 126, 234, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(102, 126, 234, 0.6)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 15px rgba(102, 126, 234, 0.4)`},children:`查询上传任务历史`})]}),i.length===0?(0,$.jsx)(NC,{image:NC.PRESENTED_IMAGE_SIMPLE,description:`暂无生成记录`,style:{padding:`60px 0`}}):(0,$.jsxs)(`div`,{style:{padding:`0 4px`},children:[i.map((e,t)=>(0,$.jsxs)(`div`,{style:{marginBottom:32},children:[(0,$.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`#64748b`,marginBottom:12,paddingLeft:8},children:e.generatedDate}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8},children:e.items.map(e=>(0,$.jsx)(Oe,{item:e,mediaType:n,onClick:()=>me?Ne(je(e)):ke(e),isSelected:ge.has(je(e)),onToggleSelect:Ne,isSelectionMode:me},je(e)))}),e.total&&e.total>e.items.length&&(0,$.jsx)(`div`,{style:{padding:`12px 0`,textAlign:`left`},children:(0,$.jsx)(vD,{onClick:()=>qe(e.generatedDate,e.items,e.page),loading:f.has(e.generatedDate),disabled:f.has(e.generatedDate),size:`small`,style:{borderRadius:6,background:`transparent`,border:`1px dashed #cbd5e1`,color:`#64748b`,fontSize:12},children:f.has(e.date)?`加载中...`:`查看全部 (${e.total})`})})]},t)),i.length>0&&c>i.length&&(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:`20px 0`},children:(0,$.jsx)(vD,{onClick:Ke,loading:u,disabled:u,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:500},children:u?`加载中...`:`加载更多`})})]}),(0,$.jsx)(Pq,{title:`批量上传配置`,open:w,onCancel:()=>{T(!1),D([]),k(``),L(void 0),z(new Map),V(``)},footer:null,width:900,mask:{closable:!1},children:(0,$.jsxs)(`div`,{style:{padding:`16px 0`},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`},children:[`选中素材 (`,ge.size,`个)`]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:12,alignItems:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`},children:`统一修改名称:`}),(0,$.jsx)(nK,{value:B,onChange:e=>V(e.target.value),placeholder:`输入名称后点击应用`,style:{flex:1,borderRadius:8},size:`small`}),(0,$.jsx)(vD,{type:`primary`,size:`small`,onClick:()=>{B.trim()&&ge.size>0&&We(Array.from(ge),B)},disabled:!B.trim()||ge.size===0,style:{borderRadius:8},children:`应用`})]}),(0,$.jsx)(`div`,{style:{maxHeight:300,overflow:`auto`,border:`1px solid #f0f0f0`,borderRadius:8,padding:12},children:(()=>{let e=new Map;return i.forEach(t=>{t.items.forEach(t=>{let n=je(t);e.set(n,t)})}),Array.from(ge).map(t=>{let r=e.get(t);return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 0`,borderBottom:`1px solid #f5f5f5`},children:[(0,$.jsx)(`div`,{style:{width:60,height:40,borderRadius:4,backgroundColor:`#f5f5f5`,display:`flex`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,flexShrink:0},children:(()=>{let e=n===`video`?r?.videoCoverUrl:r?.imageUrl;if(!e)return(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`预览`});let t=`http://ceshi.apiforeign.minzhong.cn`,i=e.startsWith(`/`)?e.slice(1):e;return(0,$.jsx)(`img`,{src:`${t.endsWith(`/`)?t.slice(0,-1):t}/static/${i}&w=300&q=50`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})()}),(0,$.jsx)(`div`,{style:{flex:1,minWidth:0},children:(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#1e293b`},children:r?.fileName||`素材 ${r.id}`})}),(0,$.jsx)(nK,{value:R.has(t)?R.get(t):r?.fileName||``,onChange:e=>{let n=e.target.value,r=new Map(R);r.set(t,n),z(r),H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{Ue(t,n)},800)},placeholder:`输入新名称`,style:{width:200,borderRadius:4},size:`small`})]},t)})})()})]}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`},children:`选择授权账户`}),(0,$.jsx)(lw,{value:I,onChange:e=>{L(e)},placeholder:`点击选择授权账户`,style:{width:`100%`,marginBottom:16,borderRadius:8},popupRender:()=>(0,$.jsx)(`div`,{style:{padding:8,width:800,maxHeight:500,overflow:`auto`},children:(0,$.jsx)(f$,{dataSource:A,columns:[{title:`ID`,dataIndex:`id`,key:`id`,width:120},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`,width:120},{title:`授权应用ID`,dataIndex:`appid`,key:`appid`,width:120},{title:`授权用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,width:120},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,width:160,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权账户用户名`,dataIndex:`accountUsername`,key:`accountUsername`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})}],loading:M,pagination:{current:U,pageSize:te,total:P,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{ee(e),ne(t),Le(e,t)}},rowKey:`id`,size:`small`,scroll:{x:`max-content`},onRow:e=>({onClick:()=>{L({value:String(e.id),label:String(e.accountUserid)}),re(!1)},style:{cursor:`pointer`,backgroundColor:I?.value===String(e.id)?`#e6f7ff`:void 0}})})}),open:W,onOpenChange:e=>{re(e),e&&Le(1,te)},labelInValue:!0,fieldNames:{label:`accountUserid`,value:`id`}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`,marginTop:16},children:`粘贴账户ID(每行一个或用逗号分隔)`}),(0,$.jsx)(nK.TextArea,{value:O,onChange:e=>{let t=e.target.value;k(t);let n=t.split(/[\n,]/).map(e=>e.trim()).filter(e=>e.length>0),r=[...new Set(n)].map(e=>({accountId:e})),i=new Set;D(r.filter(e=>i.has(e.accountId)?!1:(i.add(e.accountId),!0)))},placeholder:`粘贴账户ID,每行一个或用逗号分隔,例如:\r 10001,10002,10003\r -10004`,rows:4,style:{borderRadius:8,marginBottom:16}}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,justifyContent:`flex-end`},children:[(0,$.jsx)(bD,{onClick:()=>{T(!1),D([]),k(``),L(void 0),z(new Map),V(``)},style:{borderRadius:8},children:`取消`}),(0,$.jsx)(bD,{type:`primary`,onClick:He,loading:x,disabled:x||E.length===0,style:{borderRadius:8},children:x?`上传中...`:`开始上传`})]})]})}),(0,$.jsxs)(Rq,{title:`上传任务历史`,open:G,onCancel:()=>K(!1),footer:null,width:800,style:{borderRadius:8},mask:{closable:!1},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(uw,{value:fe,onChange:e=>pe(e),placeholder:`选择状态`,style:{width:200,marginRight:12},options:[{value:`1`,label:`待上传`},{value:`2`,label:`上传中`},{value:`3`,label:`上传成功`},{value:`4`,label:`上传失败`}],allowClear:!0}),(0,$.jsx)(bD,{type:`primary`,onClick:Be,style:{borderRadius:8},children:`查询`})]}),(0,$.jsx)(g$,{dataSource:q,columns:[{title:`素材名称`,dataIndex:`fileName`,key:`fileName`,width:200},{title:`账户ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:180},{title:`状态`,dataIndex:`status`,key:`status`,width:100,render:e=>(0,$.jsx)(k$,{color:{1:`#f59e0b`,2:`#6366f1`,3:`#10b981`,4:`#ef4444`}[e]||`#64748b`,style:{borderRadius:4},children:{1:`待上传`,2:`上传中`,3:`上传成功`,4:`上传失败`}[e]||e})},{title:`备注`,dataIndex:`note`,key:`note`,width:250,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:e||`-`})},{title:`创建时间`,dataIndex:`created_at`,key:`created_at`,width:180,render:e=>(0,OD.default)(e).format(`YYYY-MM-DD HH:mm:ss`)}],loading:ue,scroll:{x:`max-content`},pagination:{current:oe,pageSize:ce,total:J,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:Ve},rowKey:(e,t)=>e.task_id||e.resource_id||t,size:`small`})]}),m&&g&&(0,$.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`rgba(0,0,0,0.85)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1e3,padding:16,boxSizing:`border-box`,overflow:`auto`},onClick:Ae,children:(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:16,padding:0,width:`100%`,maxWidth:`1200px`,maxHeight:`95vh`,minHeight:`300px`,overflow:`hidden`,position:`relative`,display:`flex`,flexDirection:`column`,boxShadow:`0 20px 60px rgba(0,0,0,0.3)`},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`12px 16px`,borderBottom:`1px solid #f0f0f0`,flexShrink:0},children:[(0,$.jsx)(Q.Title,{level:5,style:{margin:0,color:`#1a1a2e`,fontSize:16},children:g.title||`预览`}),(0,$.jsx)(bD,{icon:(0,$.jsx)(a5,{}),onClick:Ae,style:{background:`transparent`,border:`none`,color:`#94a3b8`,fontSize:16}})]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexWrap:`wrap`,height:`500px`,gap:20,padding:20,overflow:`auto`,justifyContent:`center`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{flex:1,minWidth:`280px`,maxWidth:`800px`,display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`200px`},children:De(g.videoUrl||g.imageUrl)?(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`40px`},children:[(0,$.jsx)(`div`,{style:{fontSize:48,marginBottom:16},children:`⚠️`}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#ff4d4f`,marginBottom:16},children:`图片/视频资源已过期,请刷新重新加载~`})]}):n===`video`?(0,$.jsx)(`video`,{ref:v,src:`http://ceshi.apiforeign.minzhong.cn${g.videoUrl}`,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:`55vh`,borderRadius:8,objectFit:`contain`}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${g.imageUrl}&w=300&q=50`,alt:`预览`,style:{maxWidth:`100%`,maxHeight:`55vh`,objectFit:`contain`,borderRadius:8}})}),(0,$.jsxs)(`div`,{style:{width:`100%`,minWidth:`280px`,maxWidth:`320px`,background:`#f8fafc`,borderRadius:12,padding:20,maxHeight:`55vh`,overflowY:`auto`,overflowX:`hidden`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,display:`block`,marginBottom:16},children:`文件信息`}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`类型`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:n===`video`?`视频`:`图片`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,flexShrink:0,width:40},children:`请求`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500,flex:1,wordBreak:`break-all`},children:g.originalPrompt})]}),n===`image`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imageProportion})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imageSize})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`尺寸`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imagePx})]})]}),n===`video`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.aspectRatio})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.resolution})]})]}),n===`video`&&(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`时长`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:`${g.duration}秒`||`-`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`创建时间`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:Lte(g.createdAt||g.generatedDate)})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`生成引擎`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.engine||g.engineName||`-`})]})]}),(0,$.jsx)(`div`,{style:{borderTop:`1px dashed #e2e8f0`,margin:`16px 0`}}),g.mediaReferences&&g.mediaReferences.length>0&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,display:`block`,marginBottom:12},children:`依靠附件`}),g.mediaReferences.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>{v.current&&v.current.pause();let t=`http://ceshi.apiforeign.minzhong.cn${e.url}`;window.open(t,`_blank`)},style:{display:`flex`,alignItems:`center`,gap:8,padding:8,borderRadius:6,cursor:`pointer`,backgroundColor:`#f1f5f9`,marginBottom:4,transition:`background-color 0.2s`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#e2e8f0`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#f1f5f9`},children:[e.type===`image`?(0,$.jsx)(d6,{style:{color:`#3b82f6`,fontSize:14}}):(0,$.jsx)(q8,{style:{color:`#f59e0b`,fontSize:14}}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13},children:e.name||`媒体${t+1}`})]},e.url))]}),(0,$.jsx)(`div`,{children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,marginTop:20},children:[(0,$.jsx)(bD,{type:`primary`,icon:(0,$.jsx)(_0,{}),onClick:()=>{v.current&&v.current.pause();let e=`http://ceshi.apiforeign.minzhong.cn${g.videoUrl||g.imageUrl}&download=1`;window.open(e,`_blank`)},style:{flex:1,borderRadius:8},disabled:De(g.videoUrl||g.imageUrl),children:De(g.videoUrl||g.imageUrl)?`资源已过期`:`下载`}),(0,$.jsx)(bD,{onClick:Ae,style:{flex:1,borderRadius:8},children:`关闭`})]})})]})]})]})})]})},P9=document.createElement(`style`);P9.textContent=` +10004`,rows:4,style:{borderRadius:8,marginBottom:16}}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,justifyContent:`flex-end`},children:[(0,$.jsx)(vD,{onClick:()=>{T(!1),D([]),k(``),L(void 0),z(new Map),V(``)},style:{borderRadius:8},children:`取消`}),(0,$.jsx)(vD,{type:`primary`,onClick:He,loading:x,disabled:x||E.length===0,style:{borderRadius:8},children:x?`上传中...`:`开始上传`})]})]})}),(0,$.jsxs)(Pq,{title:`上传任务历史`,open:G,onCancel:()=>K(!1),footer:null,width:800,style:{borderRadius:8},mask:{closable:!1},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(lw,{value:fe,onChange:e=>pe(e),placeholder:`选择状态`,style:{width:200,marginRight:12},options:[{value:`1`,label:`待上传`},{value:`2`,label:`上传中`},{value:`3`,label:`上传成功`},{value:`4`,label:`上传失败`}],allowClear:!0}),(0,$.jsx)(vD,{type:`primary`,onClick:Be,style:{borderRadius:8},children:`查询`})]}),(0,$.jsx)(f$,{dataSource:q,columns:[{title:`素材名称`,dataIndex:`fileName`,key:`fileName`,width:200},{title:`账户ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:180},{title:`状态`,dataIndex:`status`,key:`status`,width:100,render:e=>(0,$.jsx)(T$,{color:{1:`#f59e0b`,2:`#6366f1`,3:`#10b981`,4:`#ef4444`}[e]||`#64748b`,style:{borderRadius:4},children:{1:`待上传`,2:`上传中`,3:`上传成功`,4:`上传失败`}[e]||e})},{title:`备注`,dataIndex:`note`,key:`note`,width:250,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:e||`-`})},{title:`创建时间`,dataIndex:`created_at`,key:`created_at`,width:180,render:e=>(0,ED.default)(e).format(`YYYY-MM-DD HH:mm:ss`)}],loading:ue,scroll:{x:`max-content`},pagination:{current:oe,pageSize:ce,total:J,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:Ve},rowKey:(e,t)=>e.task_id||e.resource_id||t,size:`small`})]}),m&&g&&(0,$.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`rgba(0,0,0,0.85)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1e3,padding:16,boxSizing:`border-box`,overflow:`auto`},onClick:Ae,children:(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:16,padding:0,width:`100%`,maxWidth:`1200px`,maxHeight:`95vh`,minHeight:`300px`,overflow:`hidden`,position:`relative`,display:`flex`,flexDirection:`column`,boxShadow:`0 20px 60px rgba(0,0,0,0.3)`},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`12px 16px`,borderBottom:`1px solid #f0f0f0`,flexShrink:0},children:[(0,$.jsx)(Q.Title,{level:5,style:{margin:0,color:`#1a1a2e`,fontSize:16},children:g.title||`预览`}),(0,$.jsx)(vD,{icon:(0,$.jsx)(s5,{}),onClick:Ae,style:{background:`transparent`,border:`none`,color:`#94a3b8`,fontSize:16}})]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexWrap:`wrap`,height:`500px`,gap:20,padding:20,overflow:`auto`,justifyContent:`center`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{flex:1,minWidth:`280px`,maxWidth:`800px`,display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`200px`},children:De(g.videoUrl||g.imageUrl)?(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`40px`},children:[(0,$.jsx)(`div`,{style:{fontSize:48,marginBottom:16},children:`⚠️`}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#ff4d4f`,marginBottom:16},children:`图片/视频资源已过期,请刷新重新加载~`})]}):n===`video`?(0,$.jsx)(`video`,{ref:v,src:`http://ceshi.apiforeign.minzhong.cn${g.videoUrl}`,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:`55vh`,borderRadius:8,objectFit:`contain`}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${g.imageUrl}&w=300&q=50`,alt:`预览`,style:{maxWidth:`100%`,maxHeight:`55vh`,objectFit:`contain`,borderRadius:8}})}),(0,$.jsxs)(`div`,{style:{width:`100%`,minWidth:`280px`,maxWidth:`320px`,background:`#f8fafc`,borderRadius:12,padding:20,maxHeight:`55vh`,overflowY:`auto`,overflowX:`hidden`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,display:`block`,marginBottom:16},children:`文件信息`}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`类型`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:n===`video`?`视频`:`图片`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,flexShrink:0,width:40},children:`请求`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500,flex:1,wordBreak:`break-all`},children:g.originalPrompt})]}),n===`image`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imageProportion})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imageSize})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`尺寸`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imagePx})]})]}),n===`video`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.aspectRatio})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.resolution})]})]}),n===`video`&&(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`时长`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:`${g.duration}秒`||`-`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`创建时间`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:Wte(g.createdAt||g.generatedDate)})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`生成引擎`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.engine||g.engineName||`-`})]})]}),(0,$.jsx)(`div`,{style:{borderTop:`1px dashed #e2e8f0`,margin:`16px 0`}}),g.mediaReferences&&g.mediaReferences.length>0&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,display:`block`,marginBottom:12},children:`依靠附件`}),g.mediaReferences.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>{v.current&&v.current.pause();let t=`http://ceshi.apiforeign.minzhong.cn${e.url}`;window.open(t,`_blank`)},style:{display:`flex`,alignItems:`center`,gap:8,padding:8,borderRadius:6,cursor:`pointer`,backgroundColor:`#f1f5f9`,marginBottom:4,transition:`background-color 0.2s`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#e2e8f0`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#f1f5f9`},children:[e.type===`image`?(0,$.jsx)(p6,{style:{color:`#3b82f6`,fontSize:14}}):(0,$.jsx)(Y8,{style:{color:`#f59e0b`,fontSize:14}}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13},children:e.name||`媒体${t+1}`})]},e.url))]}),(0,$.jsx)(`div`,{children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,marginTop:20},children:[(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(p0,{}),onClick:()=>{v.current&&v.current.pause();let e=`http://ceshi.apiforeign.minzhong.cn${g.videoUrl||g.imageUrl}&download=1`;window.open(e,`_blank`)},style:{flex:1,borderRadius:8},disabled:De(g.videoUrl||g.imageUrl),children:De(g.videoUrl||g.imageUrl)?`资源已过期`:`下载`}),(0,$.jsx)(vD,{onClick:Ae,style:{flex:1,borderRadius:8},children:`关闭`})]})})]})]})]})})]})},P9=document.createElement(`style`);P9.textContent=` @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } -`,document.head.appendChild(P9);function Lte(e){if(!e)return`-`;let t=new Date(e);return isNaN(t.getTime())?`-`:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`}var F9=[{id:`AD_APP_ACTIVATE`,name:`AD_APP_ACTIVATE`,label:`应用-激活`,description:`应用激活行为`},{id:`AD_APP_AUTH`,name:`AD_APP_AUTH`,label:`应用-授信`,description:`应用授信行为`},{id:`AD_APP_BOOK`,name:`AD_APP_BOOK`,label:`应用-预约表单`,description:`应用预约表单`},{id:`AD_APP_BUY`,name:`AD_APP_BUY`,label:`应用-APP内付费`,description:`APP内付费行为`},{id:`AD_APP_CLICKS`,name:`AD_APP_CLICKS`,label:`应用-点击量`,description:`应用点击量`},{id:`AD_APP_DETAIL`,name:`AD_APP_DETAIL`,label:`应用-APP内详情页到站UV`,description:`APP内详情页到站UV`},{id:`AD_APP_DOWNLOADED`,name:`AD_APP_DOWNLOADED`,label:`应用-下载完成`,description:`应用下载完成`},{id:`AD_APP_INSTALLED`,name:`AD_APP_INSTALLED`,label:`应用-安装完成`,description:`应用安装完成`},{id:`AD_APP_KEY_BEHAVIOR`,name:`AD_APP_KEY_BEHAVIOR`,label:`应用-关键行为`,description:`应用关键行为`},{id:`AD_APP_ORDER`,name:`AD_APP_ORDER`,label:`应用-APP内下单`,description:`APP内下单行为`},{id:`AD_APP_PAY`,name:`AD_APP_PAY`,label:`应用-付费`,description:`应用付费行为`},{id:`AD_APP_PRE_AUTH`,name:`AD_APP_PRE_AUTH`,label:`应用-预授信`,description:`应用预授信行为`},{id:`AD_APP_PRE_DOWNLOAD`,name:`AD_APP_PRE_DOWNLOAD`,label:`应用-预约下载`,description:`应用预约下载`},{id:`AD_APP_PUSH_ORDER`,name:`AD_APP_PUSH_ORDER`,label:`应用-首次发单(乘客)`,description:`首次发单行为`},{id:`AD_APP_REGISTER`,name:`AD_APP_REGISTER`,label:`应用-注册`,description:`应用注册行为`},{id:`AD_APP_SHOW`,name:`AD_APP_SHOW`,label:`应用-展示量`,description:`应用展示量`},{id:`AD_APP_SUBMIT`,name:`AD_APP_SUBMIT`,label:`应用-提交认证`,description:`应用提交认证`},{id:`AD_APP_VIEW`,name:`AD_APP_VIEW`,label:`应用-APP内访问`,description:`APP内访问行为`},{id:`AD_CLUE_AUTH`,name:`AD_CLUE_AUTH`,label:`销售线索收集-授信`,description:`销售线索授信`},{id:`AD_CLUE_BUTTON`,name:`AD_CLUE_BUTTON`,label:`销售线索收集-按钮跳转`,description:`按钮跳转`},{id:`AD_CLUE_CLICKS`,name:`AD_CLUE_CLICKS`,label:`销售线索收集-点击量`,description:`点击量`},{id:`AD_CLUE_CONFIRM`,name:`AD_CLUE_CONFIRM`,label:`销售线索收集-回访-信息确认`,description:`回访信息确认`},{id:`AD_CLUE_CONSULT`,name:`AD_CLUE_CONSULT`,label:`销售线索收集-有效咨询`,description:`有效咨询`},{id:`AD_CLUE_CONSULT_MSG`,name:`AD_CLUE_CONSULT_MSG`,label:`销售线索收集-留资咨询`,description:`留资咨询`},{id:`AD_CLUE_COUPON`,name:`AD_CLUE_COUPON`,label:`销售线索收集-卡券领取`,description:`卡券领取`},{id:`AD_CLUE_CUSTOMER`,name:`AD_CLUE_CUSTOMER`,label:`销售线索收集-有效获客`,description:`有效获客`},{id:`AD_CLUE_CVT`,name:`AD_CLUE_CVT`,label:`销售线索收集-多转化`,description:`多转化`},{id:`AD_CLUE_DONE`,name:`AD_CLUE_DONE`,label:`销售线索收集-完件`,description:`完件`},{id:`AD_CLUE_FORM`,name:`AD_CLUE_FORM`,label:`销售线索收集-表单提交`,description:`表单提交`},{id:`AD_CLUE_FRIENDS`,name:`AD_CLUE_FRIENDS`,label:`销售线索收集-回访-加为好友`,description:`回访加为好友`},{id:`AD_CLUE_INSURANCE`,name:`AD_CLUE_INSURANCE`,label:`销售线索收集-保险支付`,description:`保险支付`},{id:`AD_CLUE_INTENTION`,name:`AD_CLUE_INTENTION`,label:`销售线索收集-存在意向`,description:`存在意向`},{id:`AD_CLUE_INTENTION_FORM`,name:`AD_CLUE_INTENTION_FORM`,label:`销售线索收集-意向表单`,description:`意向表单`},{id:`AD_CLUE_INTENTION_TEL`,name:`AD_CLUE_INTENTION_TEL`,label:`销售线索收集-意向话单`,description:`意向话单`},{id:`AD_CLUE_MESSAGE`,name:`AD_CLUE_MESSAGE`,label:`销售线索收集-私信消息`,description:`私信消息`},{id:`AD_CLUE_MONEY`,name:`AD_CLUE_MONEY`,label:`销售线索收集-放款`,description:`放款`},{id:`AD_CLUE_MSG`,name:`AD_CLUE_MSG`,label:`销售线索收集-私信留资`,description:`私信留资`},{id:`AD_CLUE_PAGE`,name:`AD_CLUE_PAGE`,label:`销售线索收集-访问目标页面`,description:`访问目标页面`},{id:`AD_CLUE_PAY`,name:`AD_CLUE_PAY`,label:`销售线索收集-付费`,description:`付费`},{id:`AD_CLUE_PRE_AUTH`,name:`AD_CLUE_PRE_AUTH`,label:`销售线索收集-预授信`,description:`预授信`},{id:`AD_CLUE_PROTENTIAL_DEAL`,name:`AD_CLUE_PROTENTIAL_DEAL`,label:`销售线索收集-回访-高潜成交`,description:`回访高潜成交`},{id:`AD_CLUE_PUSH_ORDER`,name:`AD_CLUE_PUSH_ORDER`,label:`销售线索收集-首次发单(乘客)`,description:`首次发单`},{id:`AD_CLUE_REGISTER`,name:`AD_CLUE_REGISTER`,label:`销售线索收集-注册`,description:`注册`},{id:`AD_CLUE_SHOW`,name:`AD_CLUE_SHOW`,label:`销售线索收集-展示量`,description:`展示量`},{id:`AD_CLUE_SUBMIT`,name:`AD_CLUE_SUBMIT`,label:`销售线索收集-提交认证`,description:`提交认证`},{id:`AD_CLUE_TEL`,name:`AD_CLUE_TEL`,label:`销售线索收集-智能电话确认接通`,description:`智能电话确认接通`},{id:`AD_CLUE_TEL_CALL`,name:`AD_CLUE_TEL_CALL`,label:`销售线索收集-电话接通`,description:`电话接通`},{id:`AD_CLUE_WX_ADD`,name:`AD_CLUE_WX_ADD`,label:`销售线索收集-微信-添加企业微信`,description:`添加企业微信`},{id:`AD_CLUE_WX_COPY`,name:`AD_CLUE_WX_COPY`,label:`销售线索收集-微信复制`,description:`微信复制`},{id:`AD_CLUE_WX_MSG`,name:`AD_CLUE_WX_MSG`,label:`销售线索收集-微信-用户首次消息`,description:`用户首次消息`},{id:`AD_ECP_APP_BUY`,name:`AD_ECP_APP_BUY`,label:`电商-app内下单`,description:`电商app内下单`},{id:`AD_ECP_APP_DETAIL`,name:`AD_ECP_APP_DETAIL`,label:`电商-app内详情页到站uv`,description:`电商app内详情页到站uv`},{id:`AD_ECP_APP_VIEW`,name:`AD_ECP_APP_VIEW`,label:`电商-app内访问`,description:`电商app内访问`},{id:`AD_ECP_BUTTON`,name:`AD_ECP_BUTTON`,label:`电商-按钮跳转`,description:`电商按钮跳转`},{id:`AD_ECP_INTEREST`,name:`AD_ECP_INTEREST`,label:`电商-引流电商种草`,description:`引流电商种草`},{id:`AD_ECP_SHOP`,name:`AD_ECP_SHOP`,label:`电商-调起店铺`,description:`调起店铺`},{id:`AD_ECP_SHOP_STAY`,name:`AD_ECP_SHOP_STAY`,label:`电商-店铺停留`,description:`店铺停留`},{id:`AD_MINIAPP_ACTIVATE`,name:`AD_MINIAPP_ACTIVATE`,label:`快应用-激活`,description:`快应用激活`},{id:`AD_MINIAPP_KEY_BEHAVIOR`,name:`AD_MINIAPP_KEY_BEHAVIOR`,label:`快应用-关键行为`,description:`快应用关键行为`},{id:`AD_MINIAPP_PAY`,name:`AD_MINIAPP_PAY`,label:`快应用-付费`,description:`快应用付费`},{id:`AD_MINIAPP_REGISTER`,name:`AD_MINIAPP_REGISTER`,label:`快应用-注册`,description:`快应用注册`},{id:`AD_NATIVE_ACTIVATE`,name:`AD_NATIVE_ACTIVATE`,label:`原声互动-激活`,description:`原声互动激活`},{id:`AD_NATIVE_CLICKS`,name:`AD_NATIVE_CLICKS`,label:`原声互动-组件点击`,description:`组件点击`},{id:`AD_NATIVE_FANS_GROUP`,name:`AD_NATIVE_FANS_GROUP`,label:`原声互动-粉丝入群`,description:`粉丝入群`},{id:`AD_NATIVE_FOLLOW`,name:`AD_NATIVE_FOLLOW`,label:`原声互动-帐号关注`,description:`帐号关注`},{id:`AD_NATIVE_INTERACTIVE`,name:`AD_NATIVE_INTERACTIVE`,label:`原声互动-互动`,description:`互动`},{id:`AD_NATIVE_LIVE`,name:`AD_NATIVE_LIVE`,label:`原声互动-预约直播`,description:`预约直播`},{id:`AD_NATIVE_LIVE_DONATE`,name:`AD_NATIVE_LIVE_DONATE`,label:`原声互动-直播间营销捐赠`,description:`直播间营销捐赠`},{id:`AD_NATIVE_LIVE_PAY`,name:`AD_NATIVE_LIVE_PAY`,label:`原声互动-直播间打赏`,description:`直播间打赏`},{id:`AD_NATIVE_LIVE_STAY`,name:`AD_NATIVE_LIVE_STAY`,label:`原声互动-直播间停留`,description:`直播间停留`},{id:`AD_NATIVE_LIVE_VIEW`,name:`AD_NATIVE_LIVE_VIEW`,label:`原声互动-直播间观看`,description:`直播间观看`},{id:`AD_NATIVE_PAY`,name:`AD_NATIVE_PAY`,label:`原声互动-付费`,description:`原声互动付费`},{id:`AD_PRODUCT_ACTIVATE`,name:`AD_PRODUCT_ACTIVATE`,label:`商品-激活`,description:`商品激活`},{id:`AD_PRODUCT_APP_BUY`,name:`AD_PRODUCT_APP_BUY`,label:`商品-app内下单`,description:`商品app内下单`},{id:`AD_PRODUCT_APP_DETAIL`,name:`AD_PRODUCT_APP_DETAIL`,label:`商品-app内详情页到站uv`,description:`商品app内详情页到站uv`},{id:`AD_PRODUCT_APP_PAY`,name:`AD_PRODUCT_APP_PAY`,label:`商品-app内付费`,description:`商品app内付费`},{id:`AD_PRODUCT_APP_VIEW`,name:`AD_PRODUCT_APP_VIEW`,label:`商品-app内访问`,description:`商品app内访问`},{id:`AD_PRODUCT_FORM`,name:`AD_PRODUCT_FORM`,label:`商品-表单提交`,description:`商品表单提交`},{id:`AD_PRODUCT_KEY_BEHAVIOR`,name:`AD_PRODUCT_KEY_BEHAVIOR`,label:`商品-关键行为`,description:`商品关键行为`},{id:`AD_PRODUCT_PAY`,name:`AD_PRODUCT_PAY`,label:`商品-付费`,description:`商品付费`},{id:`AD_TINYAPP_ACTIVATE`,name:`AD_TINYAPP_ACTIVATE`,label:`小程序-激活`,description:`小程序激活`},{id:`AD_TINYAPP_KEY_BEHAVIOR`,name:`AD_TINYAPP_KEY_BEHAVIOR`,label:`小程序-关键行为`,description:`小程序关键行为`},{id:`AD_TINYAPP_PAY`,name:`AD_TINYAPP_PAY`,label:`小程序-付费`,description:`小程序付费`},{id:`QC_LIVE_BUY`,name:`QC_LIVE_BUY`,label:`直播投放-直播间下单`,description:`直播间下单`},{id:`QC_LIVE_CHECK`,name:`QC_LIVE_CHECK`,label:`直播投放-直播间结算`,description:`直播间结算`},{id:`QC_LIVE_COMMENTS`,name:`QC_LIVE_COMMENTS`,label:`直播投放-直播间评论`,description:`直播间评论`},{id:`QC_LIVE_DEAL`,name:`QC_LIVE_DEAL`,label:`直播投放-直播间成交`,description:`直播间成交`},{id:`QC_LIVE_ENTRY`,name:`QC_LIVE_ENTRY`,label:`直播投放-进入直播间`,description:`进入直播间`},{id:`QC_LIVE_FANS`,name:`QC_LIVE_FANS`,label:`直播投放-直播间粉丝提升`,description:`直播间粉丝提升`},{id:`QC_LIVE_HIT`,name:`QC_LIVE_HIT`,label:`直播投放-直播加热`,description:`直播加热`},{id:`QC_LIVE_PRODUCT_CLICKS`,name:`QC_LIVE_PRODUCT_CLICKS`,label:`直播投放-直播间商品点击`,description:`直播间商品点击`},{id:`QC_LIVE_ROI_CHECK`,name:`QC_LIVE_ROI_CHECK`,label:`直播投放-结算roi`,description:`结算roi`},{id:`QC_LIVE_ROI_DEAL`,name:`QC_LIVE_ROI_DEAL`,label:`直播投放-支付roi-直播间成交`,description:`支付roi直播间成交`},{id:`QC_LIVE_ROI_QC`,name:`QC_LIVE_ROI_QC`,label:`直播投放-支付roi-千川直接+间接订单`,description:`支付roi千川订单`},{id:`QC_PRODUCT_BUY`,name:`QC_PRODUCT_BUY`,label:`商品投放-商品购买`,description:`商品购买`},{id:`QC_PRODUCT_COMMENTS`,name:`QC_PRODUCT_COMMENTS`,label:`商品投放-点赞评论`,description:`点赞评论`},{id:`QC_PRODUCT_FANS`,name:`QC_PRODUCT_FANS`,label:`商品投放-粉丝提升`,description:`粉丝提升`},{id:`QC_PRODUCT_INTEREST`,name:`QC_PRODUCT_INTEREST`,label:`商品投放-人群种草`,description:`人群种草`},{id:`QC_PRODUCT_QC`,name:`QC_PRODUCT_QC`,label:`商品投放-千川直接+间接订单`,description:`千川订单`},{id:`QC_PRODUCT_ROI`,name:`QC_PRODUCT_ROI`,label:`商品投放-商品支付roi`,description:`商品支付roi`}],Rte=[{title:`前测模板ID`,dataIndex:`id`,key:`id`,width:110,render:e=>(0,$.jsx)(Q.Text,{strong:!0,style:{color:`#1e293b`,fontSize:13},children:e})},{title:`模板名称`,dataIndex:`name`,key:`name`,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontWeight:500,fontSize:13},children:e})},{title:`平台`,dataIndex:`platform`,key:`platform`,render:e=>(0,$.jsx)(k$,{color:e===`AD`?`blue`:e===`QIANCHUAN`?`green`:`orange`,style:{borderRadius:6,fontSize:12},children:e===`AD`?`AD`:e===`QIANCHUAN`?`千川`:`本地推`})},{title:`转化目标`,dataIndex:`externalAction`,key:`externalAction`,ellipsis:!0,width:200,render:e=>e?(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e.split(`,`).filter(e=>e.trim()).map(e=>{let t=F9.find(t=>t.name===e.trim());return t?t.label:e}).join(`, `)}):(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`-`})},{title:`目标转化成本`,dataIndex:`cpaBid`,key:`cpaBid`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e===void 0?`-`:e})},{title:`受众性别`,dataIndex:`audienceGender`,key:`audienceGender`,width:90,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e===`ALL`?`不限`:e===`MALE`?`男`:e===`FEMALE`?`女`:e||`-`})},{title:`受众年龄`,dataIndex:`audienceAge`,key:`audienceAge`,width:90,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:Array.isArray(e)?e.join(`, `):e||`-`})},{title:`受众地区`,dataIndex:`audience_region`,key:`audience_region`,ellipsis:!0,width:150,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:Array.isArray(e)?e.join(`, `):e||`-`})},{title:`网络类型`,dataIndex:`audienceNetwork`,key:`audienceNetwork`,width:90,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:Array.isArray(e)?e.join(`, `):e||`-`})},{title:`客户主体名称`,dataIndex:`cusName`,key:`cusName`,ellipsis:!0,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e||`-`})},{title:`出价类型`,dataIndex:`pricingType`,key:`pricingType`,width:90,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e||`-`})},{title:`目标点击成本`,dataIndex:`cpcBid`,key:`cpcBid`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e===void 0?`-`:e})},{title:`预算金额`,dataIndex:`budget`,key:`budget`,width:100,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e===void 0?`-`:e})},{title:`默认模板`,dataIndex:`isDefault`,key:`isDefault`,width:90,render:e=>(0,$.jsx)(k$,{color:e?`green`:`default`,style:{borderRadius:6,fontSize:12},children:e?`是`:`否`})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:12},children:e})},{title:`操作`,dataIndex:`operation`,key:`operation`,width:140,render:(e,t)=>(0,$.jsx)(jU,{size:4,children:(0,$.jsx)(bD,{type:`text`,size:`small`,icon:(0,$.jsx)(F$,{}),style:{color:`#6366f1`,fontSize:12},children:`编辑`})})}],zte=()=>{let{message:e}=Tx.useApp(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(!1),[l]=TW.useForm(),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(1),[m,h]=(0,S.useState)(10),[g,_]=(0,S.useState)(`AD`),[v,y]=(0,S.useState)([]);(0,S.useEffect)(()=>{b()},[f,m]),(0,S.useEffect)(()=>{x()},[]);let b=async()=>{o(!0);try{let e=await T7({page:f,pageSize:m});console.log(e),n(e.data||[]),i(e.pagination?.total||0),p(e.pagination?.page||1),h(e.pagination?.pageSize||10)}catch{e.error(`获取前测列表失败`)}finally{o(!1)}},x=async()=>{try{y(((await H7({level:`ONE_LEVEL`})).data||[]).map(e=>({value:e.code,label:e.name,isLeaf:!1})))}catch{e.error(`获取省份信息失败`)}},C=async t=>{let n=t[t.length-1];n.loading=!0;try{n.children=((await H7({level:`TWO_LEVEL`,parent_code:n.value})).data||[]).map(e=>({value:e.code,label:e.name,isLeaf:!0})),n.loading=!1,y([...v])}catch{e.error(`获取城市信息失败`),n.loading=!1,y([...v])}},w=t.map((e,t)=>({...e,index:(f-1)*m+t+1,key:e.id}));return(0,$.jsxs)(`div`,{style:{minHeight:`calc(100vh - 80px)`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(IU,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`素材前测`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,marginBottom:16},children:(0,$.jsx)(bD,{type:`primary`,size:`medium`,icon:(0,$.jsx)(bR,{}),loading:a,onClick:()=>{l.resetFields(),_(`AD`),c(!0)},style:{borderRadius:12,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 14px rgba(99,102,241,0.3)`},children:`新增前测`})}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:16,boxShadow:`0 4px 20px rgba(0,0,0,0.04)`,overflow:`hidden`},children:[(0,$.jsx)(g$,{dataSource:w,columns:Rte,loading:a,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`},onRow:()=>({style:{cursor:`pointer`,transition:`background-color 0.15s`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#f8fafc`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`transparent`}})}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(KK,{current:f,pageSize:m,total:r,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,pageSizeOptions:[`10`,`20`,`50`,`100`],onChange:(e,t)=>{p(e),h(t)},size:`small`})})]}),(0,$.jsx)(Rq,{title:(0,$.jsx)(jU,{children:`新增前测模板`}),open:s,onCancel:()=>{c(!1),l.resetFields(),_(`AD`)},onOk:async()=>{try{let t=await l.validateFields();d(!0);let n=(t.audience_region||[]).map(e=>e[e.length-1]),r=(t.external_action||[]).join(`,`);await E7({name:t.name,note:t.note,platform:t.platform,external_action:r,cpa_bid:t.cpa_bid||0,audience_gender:t.audience_gender,audience_age:t.audience_age||[],audience_region:n,audience_network:t.audience_network||[],cus_name:t.cus_name,pricing_type:t.pricing_type,cost_cap:t.cost_cap||!1,target_cost:t.target_cost||!1,nobid:t.nobid||!1,cpc_bid:t.cpc_bid||0,budget:t.budget||0,is_default:t.is_default||!1}),e.success(`前测模板创建成功`),c(!1),l.resetFields(),b()}catch(t){t?.message?e.error(t.message):t?.response?.data?.message?e.error(t.response.data.message):e.error(`创建失败,请重试`)}finally{d(!1)}},okText:`提交`,cancelText:`取消`,width:720,height:600,confirmLoading:u,style:{borderRadius:16},children:(0,$.jsxs)(TW,{form:l,layout:`vertical`,style:{marginTop:16},children:[(0,$.jsx)(TW.Item,{name:`name`,label:`模板名称`,rules:[{required:!0,message:`请输入模板名称`}],children:(0,$.jsx)(oK,{placeholder:`请输入模板名称`,style:{borderRadius:8,height:40}})}),(0,$.jsx)(TW.Item,{name:`platform`,label:`平台`,initialValue:`AD`,rules:[{required:!0,message:`请选择平台`}],children:(0,$.jsx)(uw,{placeholder:`请选择平台`,style:{borderRadius:8,height:40},onChange:e=>{_(e)},options:[{value:`AD`,label:`AD`},{value:`QIANCHUAN`,label:`千川`},{value:`LOCAL`,label:`本地推`}]})}),(0,$.jsx)(TW.Item,{name:`external_action`,label:`转化目标`,children:(0,$.jsx)(uw,{mode:`multiple`,placeholder:`请选择转化目标(可多选)`,style:{borderRadius:8,minHeight:40},maxTagCount:`responsive`,options:F9.filter(e=>g===`AD`?e.name.startsWith(`AD_`):g===`QIANCHUAN`?e.name.startsWith(`QC_`):g===`LOCAL`?e.name.startsWith(`LOCAL_`):!0).map(e=>({value:e.name,label:(0,$.jsxs)(`span`,{children:[e.label,e.description&&(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:12,marginLeft:4},children:[`(`,e.description,`)`]})]})}))})}),(0,$.jsx)(TW.Item,{name:`cpa_bid`,label:`目标转化成本`,rules:[{type:`number`,min:1,max:1e4,message:`取值范围: 1-10000`}],getValueFromEvent:e=>parseFloat(e.target.value)||void 0,children:(0,$.jsx)(oK,{type:`number`,placeholder:`取值范围: 1-10000,精确到小数点后2位`,style:{borderRadius:8,height:40},min:1,max:1e4,step:.01})}),(0,$.jsx)(TW.Item,{name:`audience_gender`,label:`受众性别`,children:(0,$.jsx)(uw,{placeholder:`请选择受众性别`,style:{borderRadius:8,height:40},options:[{value:`ALL`,label:`不限`},{value:`MALE`,label:`男`},{value:`FEMALE`,label:`女`}]})}),(0,$.jsx)(TW.Item,{name:`audience_age`,label:`受众年龄`,children:(0,$.jsx)(uw,{mode:`multiple`,placeholder:`请选择受众年龄(可多选)`,style:{borderRadius:8,minHeight:40},maxTagCount:`responsive`,options:[{value:`ALL`,label:`不限`},{value:`18-23`,label:`18-23岁`},{value:`24-30`,label:`24-30岁`},{value:`31-40`,label:`31-40岁`},{value:`41-49`,label:`41-49岁`},{value:`50`,label:`50岁以上`}]})}),(0,$.jsx)(TW.Item,{name:`audience_region`,label:`受众地区`,children:(0,$.jsx)(iV,{multiple:!0,placeholder:`请选择受众地区(可多选)`,style:{borderRadius:8,minHeight:40},options:v,loadData:C,changeOnSelect:!0,maxTagCount:`responsive`})}),(0,$.jsx)(TW.Item,{name:`audience_network`,label:`网络类型`,children:(0,$.jsx)(uw,{mode:`multiple`,placeholder:`请选择网络类型(可多选)`,style:{borderRadius:8,minHeight:40},maxTagCount:`responsive`,options:[{value:`ALL`,label:`不限`},{value:`5G`,label:`5G`},{value:`4G`,label:`4G`},{value:`3G`,label:`3G`},{value:`2G`,label:`2G`},{value:`WIFI`,label:`wifi`}]})}),(0,$.jsx)(TW.Item,{name:`cus_name`,label:`客户主体名称`,children:(0,$.jsx)(oK,{placeholder:`请输入客户主体名称`,style:{borderRadius:8,height:40}})}),(0,$.jsx)(TW.Item,{name:`pricing_type`,label:`出价类型`,children:(0,$.jsx)(uw,{placeholder:`请选择出价类型`,style:{borderRadius:8,height:40},options:[{value:`OCPC`,label:`OCPC`},{value:`CPA`,label:`CPA`},{value:`OCPM`,label:`OCPM`}]})}),g==`AD`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(TW.Item,{name:`cost_cap`,label:`是否最优成本出价`,valuePropName:`checked`,children:(0,$.jsx)(uw,{placeholder:`是否最优成本出价`,style:{borderRadius:8,height:40},options:[{value:!0,label:`开启`},{value:!1,label:`关闭`}]})}),(0,$.jsx)(TW.Item,{name:`target_cost`,label:`是否稳定成本出价`,valuePropName:`checked`,children:(0,$.jsx)(uw,{placeholder:`是否稳定成本出价`,style:{borderRadius:8,height:40},options:[{value:!0,label:`开启`},{value:!1,label:`关闭`}]})}),(0,$.jsx)(TW.Item,{name:`nobid`,label:`是否最大转化出价`,valuePropName:`checked`,children:(0,$.jsx)(uw,{placeholder:`是否最大转化出价`,style:{borderRadius:8,height:40},options:[{value:!0,label:`开启`},{value:!1,label:`关闭`}]})})]}),(0,$.jsx)(TW.Item,{name:`cpc_bid`,label:`目标点击成本`,getValueFromEvent:e=>parseFloat(e.target.value)||void 0,children:(0,$.jsx)(oK,{type:`number`,placeholder:`请输入目标点击成本`,style:{borderRadius:8,height:40}})}),(0,$.jsx)(TW.Item,{name:`budget`,label:`预算金额`,getValueFromEvent:e=>parseFloat(e.target.value)||void 0,children:(0,$.jsx)(oK,{type:`number`,placeholder:`请输入预算金额`,style:{borderRadius:8,height:40}})}),(0,$.jsx)(TW.Item,{name:`note`,label:`备注`,children:(0,$.jsx)(oK.TextArea,{placeholder:`请输入备注`,rows:3,style:{borderRadius:8}})}),(0,$.jsx)(TW.Item,{name:`is_default`,label:`默认模板`,initialValue:!1,valuePropName:`checked`,children:(0,$.jsx)(uw,{placeholder:`请选择默认模板`,style:{borderRadius:8,height:40},options:[{value:!0,label:`是`},{value:!1,label:`否`}]})})]})})]})},I9={1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`},Bte={1:`巨量`,2:`磁力`,3:`巨量星图`,4:`服务单`,5:`腾讯`},L9=e=>{if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`},Vte=()=>{let{message:e}=Tx.useApp(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(void 0),[d,f]=(0,S.useState)(1),[p,m]=(0,S.useState)(10),[h,g]=(0,S.useState)(0),[_,v]=(0,S.useState)({account_userid:``,open_type:void 0,account_id:``});(0,S.useEffect)(()=>{y()},[]);let y=async(t=1,r=10,i=_)=>{o(!0);try{let e=await w7({page:t,page_size:r,account_userid:i.account_userid||void 0,open_type:i.open_type,account_id:i.account_id||void 0});e?(e.data&&n(e.data.data||e.data),e.pagination&&(g(e.pagination.total||0),f(e.pagination.page||1),m(e.pagination.pageSize||10))):n(e||[])}catch{e.error(`获取授权列表失败`)}finally{o(!1)}},b=()=>{c(!0)},x=async()=>{if(!l){e.warning(`请选择开户方式`);return}i(!0);try{let t=await S7({open_type:l});t.authUrl?window.open(t.authUrl,`_blank`):e.error(`获取授权链接失败`)}catch{e.error(`请求授权失败`)}finally{i(!1),c(!1),u(void 0)}},C=[{title:`ID`,dataIndex:`id`,key:`id`},{title:`授权账户ID`,dataIndex:`accountId`,key:`accountId`,width:160},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权账户用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})},{title:`授权账户用户名`,dataIndex:`accountUsername`,key:`accountUsername`},{title:`授权应用ID`,dataIndex:`appid`,key:`appid`},{title:`是否敏感物料授权`,dataIndex:`materialAuthStatus`,key:`materialAuthStatus`,width:100,render:e=>(0,$.jsx)(k$,{color:e?`green`:`default`,children:e?`是`:`否`})},{title:`开户方式`,dataIndex:`openType`,key:`openType`,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:I9[e]||e})},{title:`平台端口`,dataIndex:`portType`,key:`portType`,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:Bte[e]||e})},{title:`用户id`,dataIndex:`userId`,key:`userId`},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:L9(e)})},{title:`更新时间`,dataIndex:`updatedAt`,key:`updatedAt`,width:160,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:L9(e)})}],w=t.map((e,t)=>({...e,index:t+1,key:e.id}));return(0,$.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(R3,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`授权管理`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(oK,{placeholder:`账号用户ID`,value:_.account_userid,onChange:e=>v(t=>({...t,account_userid:e.target.value})),style:{width:180},onPressEnter:()=>{f(1),y(1,p)}}),(0,$.jsx)(uw,{placeholder:`开户方式`,value:_.open_type,onChange:e=>v(t=>({...t,open_type:e})),style:{width:140},options:Object.entries(I9).map(([e,t])=>({value:Number(e),label:t}))}),(0,$.jsx)(oK,{placeholder:`账号ID`,value:_.account_id,onChange:e=>v(t=>({...t,account_id:e.target.value})),style:{width:180},onPressEnter:()=>{f(1),y(1,p)}}),(0,$.jsx)(bD,{type:`primary`,size:`medium`,onClick:()=>{f(1),y(1,p)},children:`搜索`}),(0,$.jsx)(bD,{size:`medium`,onClick:()=>{v({account_userid:``,open_type:void 0,account_id:``}),f(1),y(1,p)},children:`重置`})]}),(0,$.jsx)(bD,{type:`primary`,size:`medium`,icon:(0,$.jsx)(bR,{}),onClick:b,loading:r,style:{borderRadius:8,fontSize:14,fontWeight:500},children:`点击授权`})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(g$,{dataSource:w,columns:C,loading:a,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(KK,{current:d,pageSize:p,total:h,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{f(e),m(t),y(e,t)},size:`small`})})]}),(0,$.jsx)(Rq,{title:`选择开户方式`,open:s,onOk:x,onCancel:()=>{c(!1),u(void 0)},okText:`确认授权`,cancelText:`取消`,confirmLoading:r,children:(0,$.jsx)(uw,{placeholder:`请选择开户方式`,value:l,onChange:e=>u(e),style:{width:`100%`},options:Object.entries(I9).map(([e,t])=>({value:Number(e),label:t}))})})]})},R9={YES:{color:`green`,label:`是`},NO:{color:`red`,label:`否`},UNKNOWN:{color:`default`,label:`未知`}},Hte=({preResult:e})=>{let[t,n]=(0,S.useState)(null),[r,i]=(0,S.useState)(!1);if(S.useEffect(()=>{if(!e){n(null),i(!1);return}try{n(JSON.parse(e)),i(!1)}catch{n(null),i(!0)}},[e]),!e||r||!t)return(0,$.jsx)(`span`,{style:{color:`#64748b`},children:`-`});let a=[t.is_ad_high_quality_material,t.is_ecp_high_quality_material,t.is_local_high_quality_material],o=a.some(e=>e===`NO`),s=a.every(e=>e===`YES`),c;return c=o?(0,$.jsx)(k$,{color:`red`,children:`非优质`}):s?(0,$.jsx)(k$,{color:`green`,children:`优质`}):(0,$.jsx)(k$,{color:`default`,children:`待评估`}),(0,$.jsx)(cT,{content:(0,$.jsxs)(`div`,{style:{maxWidth:500},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,display:`block`,marginBottom:12},children:`前测结果详情`}),(0,$.jsxs)($H,{column:1,size:`small`,style:{marginBottom:12},children:[(0,$.jsx)($H.Item,{label:`视频ID`,children:t.video_id}),(0,$.jsx)($H.Item,{label:`广告主ID`,children:t.advertiser_id}),(0,$.jsx)($H.Item,{label:`素材ID`,children:t.material_id})]}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:8},children:`质量评估`}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8,marginBottom:12},children:[(0,$.jsxs)(k$,{color:R9[t.is_ad_high_quality_material]?.color,children:[`AD优质素材: `,R9[t.is_ad_high_quality_material]?.label]}),(0,$.jsxs)(k$,{color:R9[t.is_ecp_high_quality_material]?.color,children:[`千川优质素材: `,R9[t.is_ecp_high_quality_material]?.label]}),(0,$.jsxs)(k$,{color:R9[t.is_local_high_quality_material]?.color,children:[`本地推优质素材: `,R9[t.is_local_high_quality_material]?.label]}),(0,$.jsxs)(k$,{color:R9[t.is_inefficient_material]?.color,children:[`低效素材: `,R9[t.is_inefficient_material]?.label]}),(0,$.jsxs)(k$,{color:R9[t.is_first_publish_material]?.color,children:[`首发素材: `,R9[t.is_first_publish_material]?.label]})]}),t.not_ad_high_quality_reason&&t.not_ad_high_quality_reason.length>0&&(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:12,color:`#ef4444`,display:`block`,marginBottom:8},children:`AD非优质原因`}),(0,$.jsx)(xq,{dataSource:t.not_ad_high_quality_reason,renderItem:(e,t)=>(0,$.jsxs)(xq.Item,{style:{padding:`4px 0`,fontSize:12,color:`#64748b`},children:[t+1,`. `,e]},t),size:`small`})]}),t.not_ecp_high_quality_reason&&t.not_ecp_high_quality_reason.length>0&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:12,color:`#ef4444`,display:`block`,marginBottom:8},children:`千川非优质原因`}),(0,$.jsx)(xq,{dataSource:t.not_ecp_high_quality_reason,renderItem:(e,t)=>(0,$.jsxs)(xq.Item,{style:{padding:`4px 0`,fontSize:12,color:`#64748b`},children:[t+1,`. `,e]},t),size:`small`})]})]}),title:null,trigger:`hover`,children:c})},Ute=e=>{if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`},Wte=e=>{if(!e)return``;let t=`http://ceshi.apiforeign.minzhong.cn`,n=e.startsWith(`/`)?e.slice(1):e;return`${t.endsWith(`/`)?t.slice(0,-1):t}/${n}`},Gte={image:{label:`图片`,color:`green`},video:{label:`视频`,color:`blue`}},Kte={FAILED:{label:`失败`,color:`error`},PENDING:{label:`处理中`,color:`processing`},SUCCESS:{label:`成功`,color:`success`}},qte=()=>{let{message:e}=Tx.useApp(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(1),[s,c]=(0,S.useState)(10),[l,u]=(0,S.useState)(0),[d,f]=(0,S.useState)({advertiser_id:``,material_id:``,upload_id:``,file_name:``,resource_type:void 0});(0,S.useEffect)(()=>{p()},[]);let p=async(t=1,r=10,a=d)=>{i(!0);try{let e=await Y7({advertiser_id:a.advertiser_id||void 0,material_id:a.material_id||void 0,upload_id:a.upload_id||void 0,file_name:a.file_name||void 0,resource_type:a.resource_type,page:t,page_size:r});e?.code===0?(n(e.data||[]),u(e.total||0)):(n([]),u(0))}catch(t){e.error(`获取素材列表失败`),console.error(`获取素材列表失败:`,t)}finally{i(!1)}},m=[{title:`广告主ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:100},{title:`素材ID`,dataIndex:`materialId`,key:`materialId`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})},{title:`上传平台Id`,dataIndex:`uploadId`,key:`uploadId`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})},{title:`资源类型`,dataIndex:`resourceType`,key:`resourceType`,width:100,render:e=>{let t=Gte[e];return(0,$.jsx)(k$,{color:t?.color,children:t?.label||e})}},{title:`预览`,key:`preview`,width:100,render:(e,t)=>{let n=t.resource?.resourceUrl||t.resource?.remoteUrl;return n?(0,$.jsx)(bD,{type:`link`,icon:(0,$.jsx)(RG,{}),onClick:()=>window.open(Wte(n),`_blank`),size:`small`,children:`查看`}):(0,$.jsx)(k$,{children:`-`})}},{title:`文件名`,dataIndex:[`resource`,`fileName`],key:`fileName`,width:160,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:e||`-`})},{title:`文件大小`,dataIndex:[`resource`,`fileSizeBytes`],key:`fileSizeBytes`,ellipsis:!0,render:e=>`${(e/1024/1024).toFixed(2)} MB`},{title:`前测状态`,dataIndex:`status`,key:`status`,width:100,render:e=>{let t=Kte[e];return(0,$.jsx)(k$,{color:t?.color,children:t?.label||e||`-`})}},{title:`前测结果`,dataIndex:`preResult`,key:`preResult`,width:120,render:e=>(0,$.jsx)(Hte,{preResult:e})},{title:`备注`,dataIndex:`note`,key:`note`,width:150,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:e||`-`})},{title:`用户ID`,dataIndex:`userId`,key:`userId`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:e||`-`})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:Ute(e)})},{title:`操作`,key:`action`,width:120,render:(e,t)=>(0,$.jsx)(yn,{to:`/consume?accountId=${t.advertiserId}`,style:{color:`#6366f1`},children:`查看消耗`})}],h=t.map((e,t)=>({...e,index:t+1,key:e.id}));return(0,$.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(TZ,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`素材列表`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,marginBottom:16,flexWrap:`wrap`},children:[(0,$.jsx)(oK,{placeholder:`广告主ID`,value:d.advertiser_id,onChange:e=>f(t=>({...t,advertiser_id:e.target.value})),style:{width:160},onPressEnter:()=>{o(1),p(1,s)}}),(0,$.jsx)(oK,{placeholder:`素材ID`,value:d.material_id,onChange:e=>f(t=>({...t,material_id:e.target.value})),style:{width:160},onPressEnter:()=>{o(1),p(1,s)}}),(0,$.jsx)(oK,{placeholder:`上传ID`,value:d.upload_id,onChange:e=>f(t=>({...t,upload_id:e.target.value})),style:{width:160},onPressEnter:()=>{o(1),p(1,s)}}),(0,$.jsx)(oK,{placeholder:`文件名`,value:d.file_name,onChange:e=>f(t=>({...t,file_name:e.target.value})),style:{width:140},onPressEnter:()=>{o(1),p(1,s)}}),(0,$.jsx)(uw,{placeholder:`资源类型`,value:d.resource_type,onChange:e=>f(t=>({...t,resource_type:e})),style:{width:120},allowClear:!0,options:[{value:`image`,label:`图片`},{value:`video`,label:`视频`}]}),(0,$.jsx)(bD,{type:`primary`,onClick:()=>{o(1),p(1,s)},children:`搜索`}),(0,$.jsx)(bD,{onClick:()=>{f({advertiser_id:``,material_id:``,upload_id:``,file_name:``,resource_type:void 0}),o(1),p(1,s)},children:`重置`})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(g$,{dataSource:h,columns:m,loading:r,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(KK,{current:a,pageSize:s,total:l,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{o(e),c(t),p(e,t)},size:`small`})})]})]})},{Text:Jte}=Q,Yte=2,Xte=15,z9=7,B9=160,V9=90;function H9(e){return String(e).padStart(2,`0`)}function U9(e){return Number.isFinite(e)?Math.max(0,Math.round(e)):0}function W9(e){let t=U9(e),n=Math.floor(t/60),r=t%60;return`${H9(n)}:${H9(r)}`}function G9(e,t,n){return Math.min(Math.max(e,t),n)}function Zte(e,t){return e[0]===t[0]&&e[1]===t[1]}function K9(e,t,n=8e3){return new Promise((r,i)=>{let a,o=()=>{a&&window.clearTimeout(a),e.removeEventListener(t,s),e.removeEventListener(`error`,c)},s=()=>{o(),r()},c=()=>{o(),i(Error(`视频${t}失败`))};e.addEventListener(t,s,{once:!0}),e.addEventListener(`error`,c,{once:!0}),a=window.setTimeout(()=>{o(),i(Error(`视频${t}超时`))},n)})}function Qte(){return new Promise(e=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>e())})})}async function $te(e,t){let n=Math.max(0,t);if(Math.abs(e.currentTime-n)>.01){let t=K9(e,`seeked`);e.currentTime=n,await t}await Qte()}function ene(e,t,n){let r;try{r=e.getImageData(0,0,t,n).data}catch{return!1}let i=0,a=0;for(let e=0;e0&&a/i>=.85}async function tne(e,t,n,r,i){let a=Math.max(0,i-.05),o=Array.from(new Set([r,r+.2,r+.5,r+1,r+2].map(e=>Math.min(e,a)).filter(e=>e>=0&&e<=a)));for(let i of o)try{if(await $te(e,i),t.clearRect(0,0,B9,V9),t.drawImage(e,0,0,B9,V9),ene(t,B9,V9))continue;return{second:r,captureSecond:i,image:n.toDataURL(`image/jpeg`,.76),status:`success`,fallback:Math.abs(i-r)>.01}}catch{}return{second:r,image:``,status:`failed`}}function q9(e,t,n){return!e||e<=0?[0,t]:[0,Math.min(e,Math.max(t,Math.min(z9,n)))]}var nne=({open:e,videoUrl:t,title:n=`手动拆镜`,loading:r=!1,minDuration:i=Yte,maxDuration:a=Xte,onCancel:o,onConfirm:s})=>{let c=(0,S.useRef)(null),l=(0,S.useRef)(!1),u=(0,S.useRef)([0,i]),d=(0,S.useRef)(0),f=(0,S.useRef)(null),[p,m]=(0,S.useState)(0),[h,g]=(0,S.useState)(0),[_,v]=(0,S.useState)([0,i]),[y,b]=(0,S.useState)([]),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),[E,D]=(0,S.useState)(``),O=(0,S.useMemo)(()=>Math.max(0,Math.floor(p||0)),[p]),k=(0,S.useMemo)(()=>Math.max(0,_[1]-_[0]),[_]),A=O>0&&O{v(t=>{let n=typeof e==`function`?e(t):e;return Zte(t,n)?t:(u.current=n,n)})},[]),M=(0,S.useCallback)(e=>{let t=U9(e);d.current!==t&&(d.current=t,g(t))},[]),N=(0,S.useCallback)(e=>{let t=c.current;if(!t||!O)return;let n=U9(G9(e,0,O));try{t.currentTime=n}catch{}M(n)},[O,M]);(0,S.useEffect)(()=>{if(!e){l.current=!0,T(!1),b([]),C(!1),m(0),M(0),D(``),j([0,i]),c.current&&c.current.pause();return}l.current=!1,T(!1),C(!0),b([]),m(0),M(0),D(``),j([0,i]);let n=document.createElement(`video`);return n.crossOrigin=`anonymous`,n.muted=!0,n.playsInline=!0,n.preload=`auto`,n.src=t,(async()=>{try{if(await K9(n,`loadedmetadata`),await K9(n,`loadeddata`).catch(()=>void 0),l.current)return;let e=Number.isFinite(n.duration)?n.duration:0,t=Math.max(0,Math.floor(e));if(m(e),j(q9(t,i,a)),!e||t<=0){D(`视频时长异常,无法抽取帧`);return}let r=document.createElement(`canvas`);r.width=B9,r.height=V9;let o=r.getContext(`2d`,{willReadFrequently:!0});if(!o){D(`当前浏览器不支持 Canvas 抽帧`);return}let s=Array.from({length:t},(e,t)=>({second:t,image:``,status:`loading`}));b(s);let c=[...s];for(let i=0;i{l.current=!0,n.pause(),n.removeAttribute(`src`),n.load()}},[e,t,i,a,M,j]);let P=(0,S.useCallback)(e=>{if(!O)return;D(``);let t=[Number(e[0]),Number(e[1])];j([Math.max(0,Math.min(O,t[0])),Math.max(t[0],Math.min(O,t[1]))])},[O,j]),F=(0,S.useCallback)(()=>{N(u.current[0])},[N]),I=(0,S.useCallback)(e=>{if(!O||A)return;let t=G9(k||Math.min(z9,a),i,Math.min(a,O)),n=G9(e,0,Math.max(0,O-t));n=U9(n);let r=[n,n+t];j(r),N(r[0])},[A,O,a,i,N,k,j]);return(0,$.jsx)(Rq,{title:n,open:e,onCancel:o,width:Math.min(window.innerWidth-40,1400),destroyOnHidden:!0,footer:[(0,$.jsx)(bD,{onClick:o,disabled:r,style:{borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`取消`},`cancel`),(0,$.jsx)(bD,{type:`primary`,onClick:async()=>{if(!O||O<=0){D(`请等待视频加载完成`);return}if(A){D(`视频总时长不足 ${i} 秒,无法手动拆镜`);return}if(ka){D(`拆镜片段不能超过 ${a} 秒`);return}D(``),await s({startSecond:_[0],endSecond:_[1],durationSecond:k})},loading:r,disabled:r||A||!O,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},children:`确认拆镜`},`confirm`)],children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:18},children:[(0,$.jsx)(`style`,{children:` +`,document.head.appendChild(P9);function Wte(e){if(!e)return`-`;let t=new Date(e);return isNaN(t.getTime())?`-`:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`}var F9=[{id:`AD_APP_ACTIVATE`,name:`AD_APP_ACTIVATE`,label:`应用-激活`,description:`应用激活行为`},{id:`AD_APP_AUTH`,name:`AD_APP_AUTH`,label:`应用-授信`,description:`应用授信行为`},{id:`AD_APP_BOOK`,name:`AD_APP_BOOK`,label:`应用-预约表单`,description:`应用预约表单`},{id:`AD_APP_BUY`,name:`AD_APP_BUY`,label:`应用-APP内付费`,description:`APP内付费行为`},{id:`AD_APP_CLICKS`,name:`AD_APP_CLICKS`,label:`应用-点击量`,description:`应用点击量`},{id:`AD_APP_DETAIL`,name:`AD_APP_DETAIL`,label:`应用-APP内详情页到站UV`,description:`APP内详情页到站UV`},{id:`AD_APP_DOWNLOADED`,name:`AD_APP_DOWNLOADED`,label:`应用-下载完成`,description:`应用下载完成`},{id:`AD_APP_INSTALLED`,name:`AD_APP_INSTALLED`,label:`应用-安装完成`,description:`应用安装完成`},{id:`AD_APP_KEY_BEHAVIOR`,name:`AD_APP_KEY_BEHAVIOR`,label:`应用-关键行为`,description:`应用关键行为`},{id:`AD_APP_ORDER`,name:`AD_APP_ORDER`,label:`应用-APP内下单`,description:`APP内下单行为`},{id:`AD_APP_PAY`,name:`AD_APP_PAY`,label:`应用-付费`,description:`应用付费行为`},{id:`AD_APP_PRE_AUTH`,name:`AD_APP_PRE_AUTH`,label:`应用-预授信`,description:`应用预授信行为`},{id:`AD_APP_PRE_DOWNLOAD`,name:`AD_APP_PRE_DOWNLOAD`,label:`应用-预约下载`,description:`应用预约下载`},{id:`AD_APP_PUSH_ORDER`,name:`AD_APP_PUSH_ORDER`,label:`应用-首次发单(乘客)`,description:`首次发单行为`},{id:`AD_APP_REGISTER`,name:`AD_APP_REGISTER`,label:`应用-注册`,description:`应用注册行为`},{id:`AD_APP_SHOW`,name:`AD_APP_SHOW`,label:`应用-展示量`,description:`应用展示量`},{id:`AD_APP_SUBMIT`,name:`AD_APP_SUBMIT`,label:`应用-提交认证`,description:`应用提交认证`},{id:`AD_APP_VIEW`,name:`AD_APP_VIEW`,label:`应用-APP内访问`,description:`APP内访问行为`},{id:`AD_CLUE_AUTH`,name:`AD_CLUE_AUTH`,label:`销售线索收集-授信`,description:`销售线索授信`},{id:`AD_CLUE_BUTTON`,name:`AD_CLUE_BUTTON`,label:`销售线索收集-按钮跳转`,description:`按钮跳转`},{id:`AD_CLUE_CLICKS`,name:`AD_CLUE_CLICKS`,label:`销售线索收集-点击量`,description:`点击量`},{id:`AD_CLUE_CONFIRM`,name:`AD_CLUE_CONFIRM`,label:`销售线索收集-回访-信息确认`,description:`回访信息确认`},{id:`AD_CLUE_CONSULT`,name:`AD_CLUE_CONSULT`,label:`销售线索收集-有效咨询`,description:`有效咨询`},{id:`AD_CLUE_CONSULT_MSG`,name:`AD_CLUE_CONSULT_MSG`,label:`销售线索收集-留资咨询`,description:`留资咨询`},{id:`AD_CLUE_COUPON`,name:`AD_CLUE_COUPON`,label:`销售线索收集-卡券领取`,description:`卡券领取`},{id:`AD_CLUE_CUSTOMER`,name:`AD_CLUE_CUSTOMER`,label:`销售线索收集-有效获客`,description:`有效获客`},{id:`AD_CLUE_CVT`,name:`AD_CLUE_CVT`,label:`销售线索收集-多转化`,description:`多转化`},{id:`AD_CLUE_DONE`,name:`AD_CLUE_DONE`,label:`销售线索收集-完件`,description:`完件`},{id:`AD_CLUE_FORM`,name:`AD_CLUE_FORM`,label:`销售线索收集-表单提交`,description:`表单提交`},{id:`AD_CLUE_FRIENDS`,name:`AD_CLUE_FRIENDS`,label:`销售线索收集-回访-加为好友`,description:`回访加为好友`},{id:`AD_CLUE_INSURANCE`,name:`AD_CLUE_INSURANCE`,label:`销售线索收集-保险支付`,description:`保险支付`},{id:`AD_CLUE_INTENTION`,name:`AD_CLUE_INTENTION`,label:`销售线索收集-存在意向`,description:`存在意向`},{id:`AD_CLUE_INTENTION_FORM`,name:`AD_CLUE_INTENTION_FORM`,label:`销售线索收集-意向表单`,description:`意向表单`},{id:`AD_CLUE_INTENTION_TEL`,name:`AD_CLUE_INTENTION_TEL`,label:`销售线索收集-意向话单`,description:`意向话单`},{id:`AD_CLUE_MESSAGE`,name:`AD_CLUE_MESSAGE`,label:`销售线索收集-私信消息`,description:`私信消息`},{id:`AD_CLUE_MONEY`,name:`AD_CLUE_MONEY`,label:`销售线索收集-放款`,description:`放款`},{id:`AD_CLUE_MSG`,name:`AD_CLUE_MSG`,label:`销售线索收集-私信留资`,description:`私信留资`},{id:`AD_CLUE_PAGE`,name:`AD_CLUE_PAGE`,label:`销售线索收集-访问目标页面`,description:`访问目标页面`},{id:`AD_CLUE_PAY`,name:`AD_CLUE_PAY`,label:`销售线索收集-付费`,description:`付费`},{id:`AD_CLUE_PRE_AUTH`,name:`AD_CLUE_PRE_AUTH`,label:`销售线索收集-预授信`,description:`预授信`},{id:`AD_CLUE_PROTENTIAL_DEAL`,name:`AD_CLUE_PROTENTIAL_DEAL`,label:`销售线索收集-回访-高潜成交`,description:`回访高潜成交`},{id:`AD_CLUE_PUSH_ORDER`,name:`AD_CLUE_PUSH_ORDER`,label:`销售线索收集-首次发单(乘客)`,description:`首次发单`},{id:`AD_CLUE_REGISTER`,name:`AD_CLUE_REGISTER`,label:`销售线索收集-注册`,description:`注册`},{id:`AD_CLUE_SHOW`,name:`AD_CLUE_SHOW`,label:`销售线索收集-展示量`,description:`展示量`},{id:`AD_CLUE_SUBMIT`,name:`AD_CLUE_SUBMIT`,label:`销售线索收集-提交认证`,description:`提交认证`},{id:`AD_CLUE_TEL`,name:`AD_CLUE_TEL`,label:`销售线索收集-智能电话确认接通`,description:`智能电话确认接通`},{id:`AD_CLUE_TEL_CALL`,name:`AD_CLUE_TEL_CALL`,label:`销售线索收集-电话接通`,description:`电话接通`},{id:`AD_CLUE_WX_ADD`,name:`AD_CLUE_WX_ADD`,label:`销售线索收集-微信-添加企业微信`,description:`添加企业微信`},{id:`AD_CLUE_WX_COPY`,name:`AD_CLUE_WX_COPY`,label:`销售线索收集-微信复制`,description:`微信复制`},{id:`AD_CLUE_WX_MSG`,name:`AD_CLUE_WX_MSG`,label:`销售线索收集-微信-用户首次消息`,description:`用户首次消息`},{id:`AD_ECP_APP_BUY`,name:`AD_ECP_APP_BUY`,label:`电商-app内下单`,description:`电商app内下单`},{id:`AD_ECP_APP_DETAIL`,name:`AD_ECP_APP_DETAIL`,label:`电商-app内详情页到站uv`,description:`电商app内详情页到站uv`},{id:`AD_ECP_APP_VIEW`,name:`AD_ECP_APP_VIEW`,label:`电商-app内访问`,description:`电商app内访问`},{id:`AD_ECP_BUTTON`,name:`AD_ECP_BUTTON`,label:`电商-按钮跳转`,description:`电商按钮跳转`},{id:`AD_ECP_INTEREST`,name:`AD_ECP_INTEREST`,label:`电商-引流电商种草`,description:`引流电商种草`},{id:`AD_ECP_SHOP`,name:`AD_ECP_SHOP`,label:`电商-调起店铺`,description:`调起店铺`},{id:`AD_ECP_SHOP_STAY`,name:`AD_ECP_SHOP_STAY`,label:`电商-店铺停留`,description:`店铺停留`},{id:`AD_MINIAPP_ACTIVATE`,name:`AD_MINIAPP_ACTIVATE`,label:`快应用-激活`,description:`快应用激活`},{id:`AD_MINIAPP_KEY_BEHAVIOR`,name:`AD_MINIAPP_KEY_BEHAVIOR`,label:`快应用-关键行为`,description:`快应用关键行为`},{id:`AD_MINIAPP_PAY`,name:`AD_MINIAPP_PAY`,label:`快应用-付费`,description:`快应用付费`},{id:`AD_MINIAPP_REGISTER`,name:`AD_MINIAPP_REGISTER`,label:`快应用-注册`,description:`快应用注册`},{id:`AD_NATIVE_ACTIVATE`,name:`AD_NATIVE_ACTIVATE`,label:`原声互动-激活`,description:`原声互动激活`},{id:`AD_NATIVE_CLICKS`,name:`AD_NATIVE_CLICKS`,label:`原声互动-组件点击`,description:`组件点击`},{id:`AD_NATIVE_FANS_GROUP`,name:`AD_NATIVE_FANS_GROUP`,label:`原声互动-粉丝入群`,description:`粉丝入群`},{id:`AD_NATIVE_FOLLOW`,name:`AD_NATIVE_FOLLOW`,label:`原声互动-帐号关注`,description:`帐号关注`},{id:`AD_NATIVE_INTERACTIVE`,name:`AD_NATIVE_INTERACTIVE`,label:`原声互动-互动`,description:`互动`},{id:`AD_NATIVE_LIVE`,name:`AD_NATIVE_LIVE`,label:`原声互动-预约直播`,description:`预约直播`},{id:`AD_NATIVE_LIVE_DONATE`,name:`AD_NATIVE_LIVE_DONATE`,label:`原声互动-直播间营销捐赠`,description:`直播间营销捐赠`},{id:`AD_NATIVE_LIVE_PAY`,name:`AD_NATIVE_LIVE_PAY`,label:`原声互动-直播间打赏`,description:`直播间打赏`},{id:`AD_NATIVE_LIVE_STAY`,name:`AD_NATIVE_LIVE_STAY`,label:`原声互动-直播间停留`,description:`直播间停留`},{id:`AD_NATIVE_LIVE_VIEW`,name:`AD_NATIVE_LIVE_VIEW`,label:`原声互动-直播间观看`,description:`直播间观看`},{id:`AD_NATIVE_PAY`,name:`AD_NATIVE_PAY`,label:`原声互动-付费`,description:`原声互动付费`},{id:`AD_PRODUCT_ACTIVATE`,name:`AD_PRODUCT_ACTIVATE`,label:`商品-激活`,description:`商品激活`},{id:`AD_PRODUCT_APP_BUY`,name:`AD_PRODUCT_APP_BUY`,label:`商品-app内下单`,description:`商品app内下单`},{id:`AD_PRODUCT_APP_DETAIL`,name:`AD_PRODUCT_APP_DETAIL`,label:`商品-app内详情页到站uv`,description:`商品app内详情页到站uv`},{id:`AD_PRODUCT_APP_PAY`,name:`AD_PRODUCT_APP_PAY`,label:`商品-app内付费`,description:`商品app内付费`},{id:`AD_PRODUCT_APP_VIEW`,name:`AD_PRODUCT_APP_VIEW`,label:`商品-app内访问`,description:`商品app内访问`},{id:`AD_PRODUCT_FORM`,name:`AD_PRODUCT_FORM`,label:`商品-表单提交`,description:`商品表单提交`},{id:`AD_PRODUCT_KEY_BEHAVIOR`,name:`AD_PRODUCT_KEY_BEHAVIOR`,label:`商品-关键行为`,description:`商品关键行为`},{id:`AD_PRODUCT_PAY`,name:`AD_PRODUCT_PAY`,label:`商品-付费`,description:`商品付费`},{id:`AD_TINYAPP_ACTIVATE`,name:`AD_TINYAPP_ACTIVATE`,label:`小程序-激活`,description:`小程序激活`},{id:`AD_TINYAPP_KEY_BEHAVIOR`,name:`AD_TINYAPP_KEY_BEHAVIOR`,label:`小程序-关键行为`,description:`小程序关键行为`},{id:`AD_TINYAPP_PAY`,name:`AD_TINYAPP_PAY`,label:`小程序-付费`,description:`小程序付费`},{id:`QC_LIVE_BUY`,name:`QC_LIVE_BUY`,label:`直播投放-直播间下单`,description:`直播间下单`},{id:`QC_LIVE_CHECK`,name:`QC_LIVE_CHECK`,label:`直播投放-直播间结算`,description:`直播间结算`},{id:`QC_LIVE_COMMENTS`,name:`QC_LIVE_COMMENTS`,label:`直播投放-直播间评论`,description:`直播间评论`},{id:`QC_LIVE_DEAL`,name:`QC_LIVE_DEAL`,label:`直播投放-直播间成交`,description:`直播间成交`},{id:`QC_LIVE_ENTRY`,name:`QC_LIVE_ENTRY`,label:`直播投放-进入直播间`,description:`进入直播间`},{id:`QC_LIVE_FANS`,name:`QC_LIVE_FANS`,label:`直播投放-直播间粉丝提升`,description:`直播间粉丝提升`},{id:`QC_LIVE_HIT`,name:`QC_LIVE_HIT`,label:`直播投放-直播加热`,description:`直播加热`},{id:`QC_LIVE_PRODUCT_CLICKS`,name:`QC_LIVE_PRODUCT_CLICKS`,label:`直播投放-直播间商品点击`,description:`直播间商品点击`},{id:`QC_LIVE_ROI_CHECK`,name:`QC_LIVE_ROI_CHECK`,label:`直播投放-结算roi`,description:`结算roi`},{id:`QC_LIVE_ROI_DEAL`,name:`QC_LIVE_ROI_DEAL`,label:`直播投放-支付roi-直播间成交`,description:`支付roi直播间成交`},{id:`QC_LIVE_ROI_QC`,name:`QC_LIVE_ROI_QC`,label:`直播投放-支付roi-千川直接+间接订单`,description:`支付roi千川订单`},{id:`QC_PRODUCT_BUY`,name:`QC_PRODUCT_BUY`,label:`商品投放-商品购买`,description:`商品购买`},{id:`QC_PRODUCT_COMMENTS`,name:`QC_PRODUCT_COMMENTS`,label:`商品投放-点赞评论`,description:`点赞评论`},{id:`QC_PRODUCT_FANS`,name:`QC_PRODUCT_FANS`,label:`商品投放-粉丝提升`,description:`粉丝提升`},{id:`QC_PRODUCT_INTEREST`,name:`QC_PRODUCT_INTEREST`,label:`商品投放-人群种草`,description:`人群种草`},{id:`QC_PRODUCT_QC`,name:`QC_PRODUCT_QC`,label:`商品投放-千川直接+间接订单`,description:`千川订单`},{id:`QC_PRODUCT_ROI`,name:`QC_PRODUCT_ROI`,label:`商品投放-商品支付roi`,description:`商品支付roi`}],Gte=[{title:`前测模板ID`,dataIndex:`id`,key:`id`,width:110,render:e=>(0,$.jsx)(Q.Text,{strong:!0,style:{color:`#1e293b`,fontSize:13},children:e})},{title:`模板名称`,dataIndex:`name`,key:`name`,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontWeight:500,fontSize:13},children:e})},{title:`平台`,dataIndex:`platform`,key:`platform`,render:e=>(0,$.jsx)(T$,{color:e===`AD`?`blue`:e===`QIANCHUAN`?`green`:`orange`,style:{borderRadius:6,fontSize:12},children:e===`AD`?`AD`:e===`QIANCHUAN`?`千川`:`本地推`})},{title:`转化目标`,dataIndex:`externalAction`,key:`externalAction`,ellipsis:!0,width:200,render:e=>e?(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e.split(`,`).filter(e=>e.trim()).map(e=>{let t=F9.find(t=>t.name===e.trim());return t?t.label:e}).join(`, `)}):(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`-`})},{title:`目标转化成本`,dataIndex:`cpaBid`,key:`cpaBid`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e===void 0?`-`:e})},{title:`受众性别`,dataIndex:`audienceGender`,key:`audienceGender`,width:90,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e===`ALL`?`不限`:e===`MALE`?`男`:e===`FEMALE`?`女`:e||`-`})},{title:`受众年龄`,dataIndex:`audienceAge`,key:`audienceAge`,width:90,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:Array.isArray(e)?e.join(`, `):e||`-`})},{title:`受众地区`,dataIndex:`audience_region`,key:`audience_region`,ellipsis:!0,width:150,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:Array.isArray(e)?e.join(`, `):e||`-`})},{title:`网络类型`,dataIndex:`audienceNetwork`,key:`audienceNetwork`,width:90,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:Array.isArray(e)?e.join(`, `):e||`-`})},{title:`客户主体名称`,dataIndex:`cusName`,key:`cusName`,ellipsis:!0,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e||`-`})},{title:`出价类型`,dataIndex:`pricingType`,key:`pricingType`,width:90,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e||`-`})},{title:`目标点击成本`,dataIndex:`cpcBid`,key:`cpcBid`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e===void 0?`-`:e})},{title:`预算金额`,dataIndex:`budget`,key:`budget`,width:100,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e===void 0?`-`:e})},{title:`默认模板`,dataIndex:`isDefault`,key:`isDefault`,width:90,render:e=>(0,$.jsx)(T$,{color:e?`green`:`default`,style:{borderRadius:6,fontSize:12},children:e?`是`:`否`})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:12},children:e})},{title:`操作`,dataIndex:`operation`,key:`operation`,width:140,render:(e,t)=>(0,$.jsx)(DU,{size:4,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(j$,{}),style:{color:`#6366f1`,fontSize:12},children:`编辑`})})}],Kte=()=>{let{message:e}=wx.useApp(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(!1),[l]=xW.useForm(),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(1),[m,h]=(0,S.useState)(10),[g,_]=(0,S.useState)(`AD`),[v,y]=(0,S.useState)([]);(0,S.useEffect)(()=>{b()},[f,m]),(0,S.useEffect)(()=>{x()},[]);let b=async()=>{o(!0);try{let e=await D7({page:f,pageSize:m});console.log(e),n(e.data||[]),i(e.pagination?.total||0),p(e.pagination?.page||1),h(e.pagination?.pageSize||10)}catch{e.error(`获取前测列表失败`)}finally{o(!1)}},x=async()=>{try{y(((await W7({level:`ONE_LEVEL`})).data||[]).map(e=>({value:e.code,label:e.name,isLeaf:!1})))}catch{e.error(`获取省份信息失败`)}},C=async t=>{let n=t[t.length-1];n.loading=!0;try{n.children=((await W7({level:`TWO_LEVEL`,parent_code:n.value})).data||[]).map(e=>({value:e.code,label:e.name,isLeaf:!0})),n.loading=!1,y([...v])}catch{e.error(`获取城市信息失败`),n.loading=!1,y([...v])}},w=t.map((e,t)=>({...e,index:(f-1)*m+t+1,key:e.id}));return(0,$.jsxs)(`div`,{style:{minHeight:`calc(100vh - 80px)`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(MU,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`素材前测`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,marginBottom:16},children:(0,$.jsx)(vD,{type:`primary`,size:`medium`,icon:(0,$.jsx)(gR,{}),loading:a,onClick:()=>{l.resetFields(),_(`AD`),c(!0)},style:{borderRadius:12,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 14px rgba(99,102,241,0.3)`},children:`新增前测`})}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:16,boxShadow:`0 4px 20px rgba(0,0,0,0.04)`,overflow:`hidden`},children:[(0,$.jsx)(f$,{dataSource:w,columns:Gte,loading:a,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`},onRow:()=>({style:{cursor:`pointer`,transition:`background-color 0.15s`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#f8fafc`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`transparent`}})}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(HK,{current:f,pageSize:m,total:r,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,pageSizeOptions:[`10`,`20`,`50`,`100`],onChange:(e,t)=>{p(e),h(t)},size:`small`})})]}),(0,$.jsx)(Pq,{title:(0,$.jsx)(DU,{children:`新增前测模板`}),open:s,onCancel:()=>{c(!1),l.resetFields(),_(`AD`)},onOk:async()=>{try{let t=await l.validateFields();d(!0);let n=(t.audience_region||[]).map(e=>e[e.length-1]),r=(t.external_action||[]).join(`,`);await O7({name:t.name,note:t.note,platform:t.platform,external_action:r,cpa_bid:t.cpa_bid||0,audience_gender:t.audience_gender,audience_age:t.audience_age||[],audience_region:n,audience_network:t.audience_network||[],cus_name:t.cus_name,pricing_type:t.pricing_type,cost_cap:t.cost_cap||!1,target_cost:t.target_cost||!1,nobid:t.nobid||!1,cpc_bid:t.cpc_bid||0,budget:t.budget||0,is_default:t.is_default||!1}),e.success(`前测模板创建成功`),c(!1),l.resetFields(),b()}catch(t){t?.message?e.error(t.message):t?.response?.data?.message?e.error(t.response.data.message):e.error(`创建失败,请重试`)}finally{d(!1)}},okText:`提交`,cancelText:`取消`,width:720,height:600,confirmLoading:u,style:{borderRadius:16},children:(0,$.jsxs)(xW,{form:l,layout:`vertical`,style:{marginTop:16},children:[(0,$.jsx)(xW.Item,{name:`name`,label:`模板名称`,rules:[{required:!0,message:`请输入模板名称`}],children:(0,$.jsx)(nK,{placeholder:`请输入模板名称`,style:{borderRadius:8,height:40}})}),(0,$.jsx)(xW.Item,{name:`platform`,label:`平台`,initialValue:`AD`,rules:[{required:!0,message:`请选择平台`}],children:(0,$.jsx)(lw,{placeholder:`请选择平台`,style:{borderRadius:8,height:40},onChange:e=>{_(e)},options:[{value:`AD`,label:`AD`},{value:`QIANCHUAN`,label:`千川`},{value:`LOCAL`,label:`本地推`}]})}),(0,$.jsx)(xW.Item,{name:`external_action`,label:`转化目标`,children:(0,$.jsx)(lw,{mode:`multiple`,placeholder:`请选择转化目标(可多选)`,style:{borderRadius:8,minHeight:40},maxTagCount:`responsive`,options:F9.filter(e=>g===`AD`?e.name.startsWith(`AD_`):g===`QIANCHUAN`?e.name.startsWith(`QC_`):g===`LOCAL`?e.name.startsWith(`LOCAL_`):!0).map(e=>({value:e.name,label:(0,$.jsxs)(`span`,{children:[e.label,e.description&&(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:12,marginLeft:4},children:[`(`,e.description,`)`]})]})}))})}),(0,$.jsx)(xW.Item,{name:`cpa_bid`,label:`目标转化成本`,rules:[{type:`number`,min:1,max:1e4,message:`取值范围: 1-10000`}],getValueFromEvent:e=>parseFloat(e.target.value)||void 0,children:(0,$.jsx)(nK,{type:`number`,placeholder:`取值范围: 1-10000,精确到小数点后2位`,style:{borderRadius:8,height:40},min:1,max:1e4,step:.01})}),(0,$.jsx)(xW.Item,{name:`audience_gender`,label:`受众性别`,children:(0,$.jsx)(lw,{placeholder:`请选择受众性别`,style:{borderRadius:8,height:40},options:[{value:`ALL`,label:`不限`},{value:`MALE`,label:`男`},{value:`FEMALE`,label:`女`}]})}),(0,$.jsx)(xW.Item,{name:`audience_age`,label:`受众年龄`,children:(0,$.jsx)(lw,{mode:`multiple`,placeholder:`请选择受众年龄(可多选)`,style:{borderRadius:8,minHeight:40},maxTagCount:`responsive`,options:[{value:`ALL`,label:`不限`},{value:`18-23`,label:`18-23岁`},{value:`24-30`,label:`24-30岁`},{value:`31-40`,label:`31-40岁`},{value:`41-49`,label:`41-49岁`},{value:`50`,label:`50岁以上`}]})}),(0,$.jsx)(xW.Item,{name:`audience_region`,label:`受众地区`,children:(0,$.jsx)(eV,{multiple:!0,placeholder:`请选择受众地区(可多选)`,style:{borderRadius:8,minHeight:40},options:v,loadData:C,changeOnSelect:!0,maxTagCount:`responsive`})}),(0,$.jsx)(xW.Item,{name:`audience_network`,label:`网络类型`,children:(0,$.jsx)(lw,{mode:`multiple`,placeholder:`请选择网络类型(可多选)`,style:{borderRadius:8,minHeight:40},maxTagCount:`responsive`,options:[{value:`ALL`,label:`不限`},{value:`5G`,label:`5G`},{value:`4G`,label:`4G`},{value:`3G`,label:`3G`},{value:`2G`,label:`2G`},{value:`WIFI`,label:`wifi`}]})}),(0,$.jsx)(xW.Item,{name:`cus_name`,label:`客户主体名称`,children:(0,$.jsx)(nK,{placeholder:`请输入客户主体名称`,style:{borderRadius:8,height:40}})}),(0,$.jsx)(xW.Item,{name:`pricing_type`,label:`出价类型`,children:(0,$.jsx)(lw,{placeholder:`请选择出价类型`,style:{borderRadius:8,height:40},options:[{value:`OCPC`,label:`OCPC`},{value:`CPA`,label:`CPA`},{value:`OCPM`,label:`OCPM`}]})}),g==`AD`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(xW.Item,{name:`cost_cap`,label:`是否最优成本出价`,valuePropName:`checked`,children:(0,$.jsx)(lw,{placeholder:`是否最优成本出价`,style:{borderRadius:8,height:40},options:[{value:!0,label:`开启`},{value:!1,label:`关闭`}]})}),(0,$.jsx)(xW.Item,{name:`target_cost`,label:`是否稳定成本出价`,valuePropName:`checked`,children:(0,$.jsx)(lw,{placeholder:`是否稳定成本出价`,style:{borderRadius:8,height:40},options:[{value:!0,label:`开启`},{value:!1,label:`关闭`}]})}),(0,$.jsx)(xW.Item,{name:`nobid`,label:`是否最大转化出价`,valuePropName:`checked`,children:(0,$.jsx)(lw,{placeholder:`是否最大转化出价`,style:{borderRadius:8,height:40},options:[{value:!0,label:`开启`},{value:!1,label:`关闭`}]})})]}),(0,$.jsx)(xW.Item,{name:`cpc_bid`,label:`目标点击成本`,getValueFromEvent:e=>parseFloat(e.target.value)||void 0,children:(0,$.jsx)(nK,{type:`number`,placeholder:`请输入目标点击成本`,style:{borderRadius:8,height:40}})}),(0,$.jsx)(xW.Item,{name:`budget`,label:`预算金额`,getValueFromEvent:e=>parseFloat(e.target.value)||void 0,children:(0,$.jsx)(nK,{type:`number`,placeholder:`请输入预算金额`,style:{borderRadius:8,height:40}})}),(0,$.jsx)(xW.Item,{name:`note`,label:`备注`,children:(0,$.jsx)(nK.TextArea,{placeholder:`请输入备注`,rows:3,style:{borderRadius:8}})}),(0,$.jsx)(xW.Item,{name:`is_default`,label:`默认模板`,initialValue:!1,valuePropName:`checked`,children:(0,$.jsx)(lw,{placeholder:`请选择默认模板`,style:{borderRadius:8,height:40},options:[{value:!0,label:`是`},{value:!1,label:`否`}]})})]})})]})},I9={1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`},qte={1:`巨量`,2:`磁力`,3:`巨量星图`,4:`服务单`,5:`腾讯`},L9=e=>{if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`},Jte=()=>{let{message:e}=wx.useApp(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(void 0),[d,f]=(0,S.useState)(1),[p,m]=(0,S.useState)(10),[h,g]=(0,S.useState)(0),[_,v]=(0,S.useState)({account_userid:``,open_type:void 0,account_id:``});(0,S.useEffect)(()=>{y()},[]);let y=async(t=1,r=10,i=_)=>{o(!0);try{let e=await E7({page:t,page_size:r,account_userid:i.account_userid||void 0,open_type:i.open_type,account_id:i.account_id||void 0});e?(e.data&&n(e.data.data||e.data),e.pagination&&(g(e.pagination.total||0),f(e.pagination.page||1),m(e.pagination.pageSize||10))):n(e||[])}catch{e.error(`获取授权列表失败`)}finally{o(!1)}},b=()=>{c(!0)},x=async()=>{if(!l){e.warning(`请选择开户方式`);return}i(!0);try{let t=await w7({open_type:l});t.authUrl?window.open(t.authUrl,`_blank`):e.error(`获取授权链接失败`)}catch{e.error(`请求授权失败`)}finally{i(!1),c(!1),u(void 0)}},C=[{title:`ID`,dataIndex:`id`,key:`id`},{title:`授权账户ID`,dataIndex:`accountId`,key:`accountId`,width:160},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权账户用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})},{title:`授权账户用户名`,dataIndex:`accountUsername`,key:`accountUsername`},{title:`授权应用ID`,dataIndex:`appid`,key:`appid`},{title:`是否敏感物料授权`,dataIndex:`materialAuthStatus`,key:`materialAuthStatus`,width:100,render:e=>(0,$.jsx)(T$,{color:e?`green`:`default`,children:e?`是`:`否`})},{title:`开户方式`,dataIndex:`openType`,key:`openType`,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:I9[e]||e})},{title:`平台端口`,dataIndex:`portType`,key:`portType`,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:qte[e]||e})},{title:`用户id`,dataIndex:`userId`,key:`userId`},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:L9(e)})},{title:`更新时间`,dataIndex:`updatedAt`,key:`updatedAt`,width:160,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:L9(e)})}],w=t.map((e,t)=>({...e,index:t+1,key:e.id}));return(0,$.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(L3,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`授权管理`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(nK,{placeholder:`账号用户ID`,value:_.account_userid,onChange:e=>v(t=>({...t,account_userid:e.target.value})),style:{width:180},onPressEnter:()=>{f(1),y(1,p)}}),(0,$.jsx)(lw,{placeholder:`开户方式`,value:_.open_type,onChange:e=>v(t=>({...t,open_type:e})),style:{width:140},options:Object.entries(I9).map(([e,t])=>({value:Number(e),label:t}))}),(0,$.jsx)(nK,{placeholder:`账号ID`,value:_.account_id,onChange:e=>v(t=>({...t,account_id:e.target.value})),style:{width:180},onPressEnter:()=>{f(1),y(1,p)}}),(0,$.jsx)(vD,{type:`primary`,size:`medium`,onClick:()=>{f(1),y(1,p)},children:`搜索`}),(0,$.jsx)(vD,{size:`medium`,onClick:()=>{v({account_userid:``,open_type:void 0,account_id:``}),f(1),y(1,p)},children:`重置`})]}),(0,$.jsx)(vD,{type:`primary`,size:`medium`,icon:(0,$.jsx)(gR,{}),onClick:b,loading:r,style:{borderRadius:8,fontSize:14,fontWeight:500},children:`点击授权`})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(f$,{dataSource:w,columns:C,loading:a,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(HK,{current:d,pageSize:p,total:h,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{f(e),m(t),y(e,t)},size:`small`})})]}),(0,$.jsx)(Pq,{title:`选择开户方式`,open:s,onOk:x,onCancel:()=>{c(!1),u(void 0)},okText:`确认授权`,cancelText:`取消`,confirmLoading:r,children:(0,$.jsx)(lw,{placeholder:`请选择开户方式`,value:l,onChange:e=>u(e),style:{width:`100%`},options:Object.entries(I9).map(([e,t])=>({value:Number(e),label:t}))})})]})},R9={YES:{color:`green`,label:`是`},NO:{color:`red`,label:`否`},UNKNOWN:{color:`default`,label:`未知`}},Yte=({preResult:e})=>{let[t,n]=(0,S.useState)(null),[r,i]=(0,S.useState)(!1);if(S.useEffect(()=>{if(!e){n(null),i(!1);return}try{n(JSON.parse(e)),i(!1)}catch{n(null),i(!0)}},[e]),!e||r||!t)return(0,$.jsx)(`span`,{style:{color:`#64748b`},children:`-`});let a=[t.is_ad_high_quality_material,t.is_ecp_high_quality_material,t.is_local_high_quality_material],o=a.some(e=>e===`NO`),s=a.every(e=>e===`YES`),c;return c=o?(0,$.jsx)(T$,{color:`red`,children:`非优质`}):s?(0,$.jsx)(T$,{color:`green`,children:`优质`}):(0,$.jsx)(T$,{color:`default`,children:`待评估`}),(0,$.jsx)(sT,{content:(0,$.jsxs)(`div`,{style:{maxWidth:500},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,display:`block`,marginBottom:12},children:`前测结果详情`}),(0,$.jsxs)(YH,{column:1,size:`small`,style:{marginBottom:12},children:[(0,$.jsx)(YH.Item,{label:`视频ID`,children:t.video_id}),(0,$.jsx)(YH.Item,{label:`广告主ID`,children:t.advertiser_id}),(0,$.jsx)(YH.Item,{label:`素材ID`,children:t.material_id})]}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:8},children:`质量评估`}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8,marginBottom:12},children:[(0,$.jsxs)(T$,{color:R9[t.is_ad_high_quality_material]?.color,children:[`AD优质素材: `,R9[t.is_ad_high_quality_material]?.label]}),(0,$.jsxs)(T$,{color:R9[t.is_ecp_high_quality_material]?.color,children:[`千川优质素材: `,R9[t.is_ecp_high_quality_material]?.label]}),(0,$.jsxs)(T$,{color:R9[t.is_local_high_quality_material]?.color,children:[`本地推优质素材: `,R9[t.is_local_high_quality_material]?.label]}),(0,$.jsxs)(T$,{color:R9[t.is_inefficient_material]?.color,children:[`低效素材: `,R9[t.is_inefficient_material]?.label]}),(0,$.jsxs)(T$,{color:R9[t.is_first_publish_material]?.color,children:[`首发素材: `,R9[t.is_first_publish_material]?.label]})]}),t.not_ad_high_quality_reason&&t.not_ad_high_quality_reason.length>0&&(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:12,color:`#ef4444`,display:`block`,marginBottom:8},children:`AD非优质原因`}),(0,$.jsx)(_q,{dataSource:t.not_ad_high_quality_reason,renderItem:(e,t)=>(0,$.jsxs)(_q.Item,{style:{padding:`4px 0`,fontSize:12,color:`#64748b`},children:[t+1,`. `,e]},t),size:`small`})]}),t.not_ecp_high_quality_reason&&t.not_ecp_high_quality_reason.length>0&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:12,color:`#ef4444`,display:`block`,marginBottom:8},children:`千川非优质原因`}),(0,$.jsx)(_q,{dataSource:t.not_ecp_high_quality_reason,renderItem:(e,t)=>(0,$.jsxs)(_q.Item,{style:{padding:`4px 0`,fontSize:12,color:`#64748b`},children:[t+1,`. `,e]},t),size:`small`})]})]}),title:null,trigger:`hover`,children:c})},Xte=e=>{if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`},Zte=e=>{if(!e)return``;let t=`http://ceshi.apiforeign.minzhong.cn`,n=e.startsWith(`/`)?e.slice(1):e;return`${t.endsWith(`/`)?t.slice(0,-1):t}/${n}`},Qte={image:{label:`图片`,color:`green`},video:{label:`视频`,color:`blue`}},$te={FAILED:{label:`失败`,color:`error`},PENDING:{label:`处理中`,color:`processing`},SUCCESS:{label:`成功`,color:`success`}},ene=()=>{let{message:e}=wx.useApp(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(1),[s,c]=(0,S.useState)(10),[l,u]=(0,S.useState)(0),[d,f]=(0,S.useState)({advertiser_id:``,material_id:``,upload_id:``,file_name:``,resource_type:void 0});(0,S.useEffect)(()=>{p()},[]);let p=async(t=1,r=10,a=d)=>{i(!0);try{let e=await Q7({advertiser_id:a.advertiser_id||void 0,material_id:a.material_id||void 0,upload_id:a.upload_id||void 0,file_name:a.file_name||void 0,resource_type:a.resource_type,page:t,page_size:r});e?.code===0?(n(e.data||[]),u(e.total||0)):(n([]),u(0))}catch(t){e.error(`获取素材列表失败`),console.error(`获取素材列表失败:`,t)}finally{i(!1)}},m=[{title:`广告主ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:100},{title:`素材ID`,dataIndex:`materialId`,key:`materialId`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})},{title:`上传平台Id`,dataIndex:`uploadId`,key:`uploadId`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})},{title:`资源类型`,dataIndex:`resourceType`,key:`resourceType`,width:100,render:e=>{let t=Qte[e];return(0,$.jsx)(T$,{color:t?.color,children:t?.label||e})}},{title:`预览`,key:`preview`,width:100,render:(e,t)=>{let n=t.resource?.resourceUrl||t.resource?.remoteUrl;return n?(0,$.jsx)(vD,{type:`link`,icon:(0,$.jsx)(PG,{}),onClick:()=>window.open(Zte(n),`_blank`),size:`small`,children:`查看`}):(0,$.jsx)(T$,{children:`-`})}},{title:`文件名`,dataIndex:[`resource`,`fileName`],key:`fileName`,width:160,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:e||`-`})},{title:`文件大小`,dataIndex:[`resource`,`fileSizeBytes`],key:`fileSizeBytes`,ellipsis:!0,render:e=>`${(e/1024/1024).toFixed(2)} MB`},{title:`前测状态`,dataIndex:`status`,key:`status`,width:100,render:e=>{let t=$te[e];return(0,$.jsx)(T$,{color:t?.color,children:t?.label||e||`-`})}},{title:`前测结果`,dataIndex:`preResult`,key:`preResult`,width:120,render:e=>(0,$.jsx)(Yte,{preResult:e})},{title:`备注`,dataIndex:`note`,key:`note`,width:150,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:e||`-`})},{title:`用户ID`,dataIndex:`userId`,key:`userId`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:e||`-`})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:Xte(e)})},{title:`操作`,key:`action`,width:120,render:(e,t)=>(0,$.jsx)(yn,{to:`/consume?accountId=${t.advertiserId}`,style:{color:`#6366f1`},children:`查看消耗`})}],h=t.map((e,t)=>({...e,index:t+1,key:e.id}));return(0,$.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(xZ,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`素材列表`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,marginBottom:16,flexWrap:`wrap`},children:[(0,$.jsx)(nK,{placeholder:`广告主ID`,value:d.advertiser_id,onChange:e=>f(t=>({...t,advertiser_id:e.target.value})),style:{width:160},onPressEnter:()=>{o(1),p(1,s)}}),(0,$.jsx)(nK,{placeholder:`素材ID`,value:d.material_id,onChange:e=>f(t=>({...t,material_id:e.target.value})),style:{width:160},onPressEnter:()=>{o(1),p(1,s)}}),(0,$.jsx)(nK,{placeholder:`上传ID`,value:d.upload_id,onChange:e=>f(t=>({...t,upload_id:e.target.value})),style:{width:160},onPressEnter:()=>{o(1),p(1,s)}}),(0,$.jsx)(nK,{placeholder:`文件名`,value:d.file_name,onChange:e=>f(t=>({...t,file_name:e.target.value})),style:{width:140},onPressEnter:()=>{o(1),p(1,s)}}),(0,$.jsx)(lw,{placeholder:`资源类型`,value:d.resource_type,onChange:e=>f(t=>({...t,resource_type:e})),style:{width:120},allowClear:!0,options:[{value:`image`,label:`图片`},{value:`video`,label:`视频`}]}),(0,$.jsx)(vD,{type:`primary`,onClick:()=>{o(1),p(1,s)},children:`搜索`}),(0,$.jsx)(vD,{onClick:()=>{f({advertiser_id:``,material_id:``,upload_id:``,file_name:``,resource_type:void 0}),o(1),p(1,s)},children:`重置`})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(f$,{dataSource:h,columns:m,loading:r,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(HK,{current:a,pageSize:s,total:l,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{o(e),c(t),p(e,t)},size:`small`})})]})]})},{Text:tne}=Q,nne=2,rne=15,z9=7,B9=160,V9=90;function H9(e){return String(e).padStart(2,`0`)}function U9(e){return Number.isFinite(e)?Math.max(0,Math.round(e)):0}function W9(e){let t=U9(e),n=Math.floor(t/60),r=t%60;return`${H9(n)}:${H9(r)}`}function G9(e,t,n){return Math.min(Math.max(e,t),n)}function ine(e,t){return e[0]===t[0]&&e[1]===t[1]}function K9(e,t,n=8e3){return new Promise((r,i)=>{let a,o=()=>{a&&window.clearTimeout(a),e.removeEventListener(t,s),e.removeEventListener(`error`,c)},s=()=>{o(),r()},c=()=>{o(),i(Error(`视频${t}失败`))};e.addEventListener(t,s,{once:!0}),e.addEventListener(`error`,c,{once:!0}),a=window.setTimeout(()=>{o(),i(Error(`视频${t}超时`))},n)})}function ane(){return new Promise(e=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>e())})})}async function one(e,t){let n=Math.max(0,t);if(Math.abs(e.currentTime-n)>.01){let t=K9(e,`seeked`);e.currentTime=n,await t}await ane()}function sne(e,t,n){let r;try{r=e.getImageData(0,0,t,n).data}catch{return!1}let i=0,a=0;for(let e=0;e0&&a/i>=.85}async function cne(e,t,n,r,i){let a=Math.max(0,i-.05),o=Array.from(new Set([r,r+.2,r+.5,r+1,r+2].map(e=>Math.min(e,a)).filter(e=>e>=0&&e<=a)));for(let i of o)try{if(await one(e,i),t.clearRect(0,0,B9,V9),t.drawImage(e,0,0,B9,V9),sne(t,B9,V9))continue;return{second:r,captureSecond:i,image:n.toDataURL(`image/jpeg`,.76),status:`success`,fallback:Math.abs(i-r)>.01}}catch{}return{second:r,image:``,status:`failed`}}function q9(e,t,n){return!e||e<=0?[0,t]:[0,Math.min(e,Math.max(t,Math.min(z9,n)))]}var lne=({open:e,videoUrl:t,title:n=`手动拆镜`,loading:r=!1,minDuration:i=nne,maxDuration:a=rne,onCancel:o,onConfirm:s})=>{let c=(0,S.useRef)(null),l=(0,S.useRef)(!1),u=(0,S.useRef)([0,i]),d=(0,S.useRef)(0),f=(0,S.useRef)(null),[p,m]=(0,S.useState)(0),[h,g]=(0,S.useState)(0),[_,v]=(0,S.useState)([0,i]),[y,b]=(0,S.useState)([]),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),[E,D]=(0,S.useState)(``),O=(0,S.useMemo)(()=>Math.max(0,Math.floor(p||0)),[p]),k=(0,S.useMemo)(()=>Math.max(0,_[1]-_[0]),[_]),A=O>0&&O{v(t=>{let n=typeof e==`function`?e(t):e;return ine(t,n)?t:(u.current=n,n)})},[]),M=(0,S.useCallback)(e=>{let t=U9(e);d.current!==t&&(d.current=t,g(t))},[]),N=(0,S.useCallback)(e=>{let t=c.current;if(!t||!O)return;let n=U9(G9(e,0,O));try{t.currentTime=n}catch{}M(n)},[O,M]);(0,S.useEffect)(()=>{if(!e){l.current=!0,T(!1),b([]),C(!1),m(0),M(0),D(``),j([0,i]),c.current&&c.current.pause();return}l.current=!1,T(!1),C(!0),b([]),m(0),M(0),D(``),j([0,i]);let n=document.createElement(`video`);return n.crossOrigin=`anonymous`,n.muted=!0,n.playsInline=!0,n.preload=`auto`,n.src=t,(async()=>{try{if(await K9(n,`loadedmetadata`),await K9(n,`loadeddata`).catch(()=>void 0),l.current)return;let e=Number.isFinite(n.duration)?n.duration:0,t=Math.max(0,Math.floor(e));if(m(e),j(q9(t,i,a)),!e||t<=0){D(`视频时长异常,无法抽取帧`);return}let r=document.createElement(`canvas`);r.width=B9,r.height=V9;let o=r.getContext(`2d`,{willReadFrequently:!0});if(!o){D(`当前浏览器不支持 Canvas 抽帧`);return}let s=Array.from({length:t},(e,t)=>({second:t,image:``,status:`loading`}));b(s);let c=[...s];for(let i=0;i{l.current=!0,n.pause(),n.removeAttribute(`src`),n.load()}},[e,t,i,a,M,j]);let P=(0,S.useCallback)(e=>{if(!O)return;D(``);let t=[Number(e[0]),Number(e[1])];j([Math.max(0,Math.min(O,t[0])),Math.max(t[0],Math.min(O,t[1]))])},[O,j]),F=(0,S.useCallback)(()=>{N(u.current[0])},[N]),I=(0,S.useCallback)(e=>{if(!O||A)return;let t=G9(k||Math.min(z9,a),i,Math.min(a,O)),n=G9(e,0,Math.max(0,O-t));n=U9(n);let r=[n,n+t];j(r),N(r[0])},[A,O,a,i,N,k,j]);return(0,$.jsx)(Pq,{title:n,open:e,onCancel:o,width:Math.min(window.innerWidth-40,1400),destroyOnHidden:!0,footer:[(0,$.jsx)(vD,{onClick:o,disabled:r,style:{borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`取消`},`cancel`),(0,$.jsx)(vD,{type:`primary`,onClick:async()=>{if(!O||O<=0){D(`请等待视频加载完成`);return}if(A){D(`视频总时长不足 ${i} 秒,无法手动拆镜`);return}if(ka){D(`拆镜片段不能超过 ${a} 秒`);return}D(``),await s({startSecond:_[0],endSecond:_[1],durationSecond:k})},loading:r,disabled:r||A||!O,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},children:`确认拆镜`},`confirm`)],children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:18},children:[(0,$.jsx)(`style`,{children:` .ant-slider-handle::after { height: 80px !important; width: 10px !important; @@ -435,8 +435,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho height: 80px !important; margin-top: -37px !important; } - `}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,background:`#fff`,borderRadius:16,overflow:`hidden`},children:(0,$.jsx)(`video`,{ref:c,src:t,crossOrigin:`anonymous`,preload:`metadata`,playsInline:!0,onLoadedMetadata:e=>{let t=Number.isFinite(e.currentTarget.duration)?e.currentTarget.duration:0;if(!t)return;let n=Math.max(0,Math.floor(t));m(e=>Math.floor(e||0)===n?e:t),j(e=>e[1]>i||e[0]!==0?e:q9(n,i,a))},onTimeUpdate:()=>{let e=c.current;e&&(M(U9(e.currentTime||0)),w&&e.currentTime>=u.current[1]&&(e.pause(),e.currentTime=u.current[1],M(u.current[1]),T(!1)))},onPause:()=>T(!1),style:{maxHeight:320,objectFit:`contain`,background:`#111`}})}),(0,$.jsxs)(`div`,{style:{borderRadius:20,background:`#f0f5ff`,padding:`20px 24px`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:16,marginBottom:18},children:[(0,$.jsx)(bD,{type:`text`,icon:w?(0,$.jsx)(n6,{}):(0,$.jsx)(_6,{}),onClick:async()=>{let e=c.current;if(!(!e||!O)){if(w){e.pause(),T(!1);return}(e.currentTime<_[0]||e.currentTime>=_[1])&&(e.currentTime=_[0],M(_[0]));try{await e.play(),T(!0),D(``)}catch{D(`视频播放失败,请检查视频地址`)}}},disabled:!O||A,style:{fontSize:20,color:`#1e293b`,padding:0}}),(0,$.jsxs)(`span`,{style:{fontSize:18,color:`#1e293b`,fontFamily:`monospace`},children:[W9(h),` / `,W9(O)]})]}),(0,$.jsxs)(`div`,{ref:f,style:{overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,msOverflowStyle:`none`,padding:`0 6px`},children:[(0,$.jsx)(`style`,{children:` + `}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,background:`#fff`,borderRadius:16,overflow:`hidden`},children:(0,$.jsx)(`video`,{ref:c,src:t,crossOrigin:`anonymous`,preload:`metadata`,playsInline:!0,onLoadedMetadata:e=>{let t=Number.isFinite(e.currentTarget.duration)?e.currentTarget.duration:0;if(!t)return;let n=Math.max(0,Math.floor(t));m(e=>Math.floor(e||0)===n?e:t),j(e=>e[1]>i||e[0]!==0?e:q9(n,i,a))},onTimeUpdate:()=>{let e=c.current;e&&(M(U9(e.currentTime||0)),w&&e.currentTime>=u.current[1]&&(e.pause(),e.currentTime=u.current[1],M(u.current[1]),T(!1)))},onPause:()=>T(!1),style:{maxHeight:320,objectFit:`contain`,background:`#111`}})}),(0,$.jsxs)(`div`,{style:{borderRadius:20,background:`#f0f5ff`,padding:`20px 24px`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:16,marginBottom:18},children:[(0,$.jsx)(vD,{type:`text`,icon:w?(0,$.jsx)(i6,{}):(0,$.jsx)(y6,{}),onClick:async()=>{let e=c.current;if(!(!e||!O)){if(w){e.pause(),T(!1);return}(e.currentTime<_[0]||e.currentTime>=_[1])&&(e.currentTime=_[0],M(_[0]));try{await e.play(),T(!0),D(``)}catch{D(`视频播放失败,请检查视频地址`)}}},disabled:!O||A,style:{fontSize:20,color:`#1e293b`,padding:0}}),(0,$.jsxs)(`span`,{style:{fontSize:18,color:`#1e293b`,fontFamily:`monospace`},children:[W9(h),` / `,W9(O)]})]}),(0,$.jsxs)(`div`,{ref:f,style:{overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,msOverflowStyle:`none`,padding:`0 6px`},children:[(0,$.jsx)(`style`,{children:` div::-webkit-scrollbar { display: none; } - `}),(0,$.jsx)(`div`,{style:{margin:`auto`,display:`flex`,flexDirection:`column`,width:y.length>0?`${y.length*80+Math.max(0,y.length-1)*1}px`:`100%`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,height:86,borderRadius:12,background:`#fff`,gap:1,position:`relative`},children:[x&&y.length===0?(0,$.jsxs)(`div`,{style:{flex:`1 1 auto`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(pq,{size:`small`}),(0,$.jsx)(Jte,{style:{marginLeft:8,color:`#64748b`},children:`正在抽取每秒帧...`})]}):y.length>0?y.map(e=>{let t=e.second>=_[0]&&e.second<_[1];return(0,$.jsxs)(`button`,{type:`button`,onClick:()=>I(e.second),title:`${e.second}s${e.fallback?`,实际取帧 ${e.captureSecond?.toFixed(1)}s`:``}`,style:{minWidth:80,flex:`0 0 80px`,height:86,borderTop:t?`5px solid #6366f1`:`none`,borderBottom:t?`5px solid #6366f1`:`none`,padding:0,background:`transparent`,overflow:`hidden`,cursor:A?`not-allowed`:`pointer`,position:`relative`},children:[e.status===`success`&&e.image?(0,$.jsx)(`img`,{src:e.image,alt:`${e.second}s`,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):e.status===`loading`?(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(pq,{size:`small`})}):(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,color:`#64748b`,fontSize:12,background:`#fff`},children:[(0,$.jsxs)(`span`,{children:[e.second,`s`]}),(0,$.jsx)(`span`,{style:{fontSize:11},children:`无有效帧`})]}),(0,$.jsxs)(`span`,{style:{position:`absolute`,left:0,bottom:3,color:`#ffffffff`,fontSize:16,textShadow:`0 1px 3px rgba(0,0,0,.7)`},children:[e.second,`s`]})]},e.second)}):(0,$.jsx)(`div`,{style:{flex:`1 1 auto`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#64748b`},children:`暂无帧预览,请确认视频是否加载完成`}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:-10,left:0,right:0,bottom:0},children:(0,$.jsx)(lH,{range:!0,min:0,max:O||a,step:1,value:_,onChange:P,onChangeComplete:F,tooltip:{formatter:e=>`${U9(Number(e||0))}s`},disabled:!O||A,styles:{track:{background:`#6969dd63`,height:86,borderRadius:12,margin:`0 `},rail:{height:86,borderRadius:12},handle:{width:20,height:86,marginTop:0,borderRadius:`50%`}}})})]})})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,textAlign:`center`,color:`#64748b`,fontSize:14},children:[`已选取 `,k,`s`]}),E&&(0,$.jsx)(`div`,{style:{marginTop:12,padding:`10px 14px`,borderRadius:8,background:`rgba(239, 68, 68, 0.08)`,border:`1px solid rgba(239, 68, 68, 0.15)`,color:`#ef4444`,fontSize:13,textAlign:`center`},children:E})]})]})})},{TextArea:J9}=oK,rne=`http://ceshi.apiforeign.minzhong.cn`,Y9=2,X9=15;function Z9(e){return e?/^https?:\/\//i.test(e)?e:`${rne}${e}`:``}function ine(){let{creatID:e}=Qe(),t=Je(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(null),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(!1),m=(0,S.useRef)(null),[h,g]=(0,S.useState)(``),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(null),[w,T]=(0,S.useState)([]),[E,D]=(0,S.useState)(!1),[O,k]=(0,S.useState)(!1),[A,j]=(0,S.useState)(!1),M=(0,S.useRef)(null),N=(0,S.useRef)(null),P=(0,S.useMemo)(()=>Z9(x?.videoUrl),[x?.videoUrl]),F=(0,S.useMemo)(()=>w.length===0?`AI自动拆分`:w.some(e=>e.sourceMode===`ai_suggestion`)?`AI重拆`:`AI自动拆分`,[w]),I=(0,S.useCallback)(async()=>{if(e)try{C(await A7(e))}catch{Z.error(`获取任务详情失败`)}},[e]),L=(0,S.useCallback)(async()=>{if(e)try{let t=(await N7(e)).items||[];T(t),t.some(e=>e.moduleProjectCurrentStepCode!==`video_generate`&&e.moduleProjectStatus!==`completed`&&e.moduleProjectStatus!==`failed`)?M.current||=window.setInterval(async()=>{try{let t=(await N7(e)).items||[];T(e=>e.map(e=>{let n=t.find(t=>t.id===e.id);return n&&(e.moduleProjectCurrentStepCode!==`video_generate`||e.moduleProjectStatus!==`completed`&&e.moduleProjectStatus!==`failed`)?n:e})),t.every(e=>e.moduleProjectCurrentStepCode===`video_generate`||e.moduleProjectStatus===`completed`||e.moduleProjectStatus===`failed`)&&(M.current&&=(clearInterval(M.current),null))}catch(e){console.error(`轮询获取拆镜列表失败:`,e)}},3e4):M.current&&=(clearInterval(M.current),null)}catch{Z.error(`获取拆镜列表失败`)}},[e]),R=(0,S.useCallback)(async()=>{await Promise.all([I(),L()])},[I,L]);(0,S.useEffect)(()=>(R(),()=>{M.current&&=(clearInterval(M.current),null),N.current&&=(clearInterval(N.current),null)}),[R]),(0,S.useEffect)(()=>{if(x)return x.analysisStatus===`processing`?(console.log(`开始轮询`),N.current=window.setInterval(async()=>{try{C(await A7(e))}catch{}},3e3)):N.current&&=(clearInterval(N.current),null),()=>{N.current&&=(clearInterval(N.current),null)}},[x?.analysisStatus,e]);let z=(e,t)=>{s(e),l(t),r(!0)},B=()=>{r(!1),s(null),g(``),l(``),v(``),b(``)},V=e=>{e.fileList.length===0&&b(``)},H=async e=>{try{b((await z5(e)).url),Z.success(`图片上传成功`)}catch{Z.error(`图片上传失败,请重试`)}return!1},U=async()=>{if(!o){Z.warning(`请先选择拆镜片段`);return}if(!y){Z.warning(`请上传产品图`);return}if(!h.trim()){Z.warning(`请输入产品名称`);return}if(!_.trim()){Z.warning(`请输入产品卖点`);return}let n={target_project_name:h.trim(),core_content_point:_.trim(),material_image_url:Z9(y),idempotency_key:`replication_${Date.now()}`};console.log(o,n),D(!0);try{await P7(o,n),Z.success(`视频生成任务创建成功`),B(),N7(e).then(e=>{console.log(`123123123123`,e);let n=e.items.find(e=>e.id===o);console.log(n),Z.loading(`创建中...`,3),setTimeout(()=>{t(`/removelens/${n.moduleProjectId}/removefenbu`)},3e3)})}catch(e){Z.error(e?.message||`创建失败,请重试`)}finally{D(!1)}},ee=async()=>{if(e){j(!0);try{let t=w.some(e=>e.sourceMode===`ai_suggestion`);await j7(e,{selected_indices:[],replace_existing:t}),Z.success(t?`AI 重拆任务已提交`:`AI 拆镜任务已提交`),await R()}catch(e){Z.error(e?.message||`拆镜失败`)}finally{j(!1)}}},te=()=>{if(!P){Z.warning(`原视频地址不存在`);return}a(!0)},ne=async t=>{if(e){if(t.durationSecondX9){Z.warning(`拆镜片段不能超过 ${X9} 秒`);return}k(!0);try{await M7(e,{start_second:t.startSecond,end_second:t.endSecond}),Z.success(`手动拆镜任务已提交`),a(!1),await R()}catch(e){Z.error(e?.message||`手动拆镜失败`)}finally{k(!1)}}},W=e=>e?.splitStatus===`completed`&&!!e?.segmentVideoUrl;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{margin:`-24px -32px -32px`,borderRadius:20,minHeight:`calc(100vh - 34px)`,display:`flex`,flexDirection:`column`,overflow:`hidden`,background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-100,right:-100,width:300,height:300,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:-100,left:-100,width:300,height:300,background:`radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsxs)(`div`,{style:{padding:`20px 32px`,display:`flex`,alignItems:`center`,gap:16,position:`relative`,zIndex:10},children:[(0,$.jsx)(bD,{type:`text`,icon:(0,$.jsx)(b2,{}),onClick:()=>t(-1),style:{fontSize:16,color:`#6366f1`,background:`rgba(99, 102, 241, 0.1)`,borderRadius:12,padding:`8px 16px`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`}}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(`div`,{style:{width:40,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsx)(`h1`,{style:{fontSize:22,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,margin:0},children:`AI视频拆镜工作台`}),(0,$.jsx)(`div`,{style:{width:40,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]})})]}),x?(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,overflow:`hidden`,padding:`0 32px 32px`},children:[(0,$.jsxs)(`div`,{style:{flex:1,background:`linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.6) 100%)`,backdropFilter:`blur(20px)`,borderRadius:20,display:`flex`,alignItems:`center`,gap:30,padding:24,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{position:`relative`,width:280,height:160,borderRadius:12,overflow:`hidden`,flexShrink:0,boxShadow:`0 4px 16px rgba(0,0,0,0.1)`},children:(0,$.jsx)(`video`,{controls:!0,src:P,style:{width:`100%`,height:`100%`,objectFit:`cover`}})}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,position:`relative`,zIndex:1},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsx)(`h2`,{style:{fontSize:20,fontWeight:600,marginBottom:16,background:`linear-gradient(135deg, #1e293b 0%, #334155 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`视频总结`}),(0,$.jsx)(`div`,{style:{textAlign:`right`},children:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[`上传时间: `,x.createdAt?new Date(x.createdAt).toLocaleString(`zh-CN`,{year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}):`-`]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`产品名称:`}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontWeight:500},children:x.title})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`受众群体:`}),x.analysisStatus===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(pq,{size:`small`,style:{color:`#f59e0b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):x.analysisStatus===`completed`?(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:(x.originalVideoAudience?.split(`、`)||[]).map((e,t)=>(0,$.jsx)(k$,{style:{fontSize:12,background:`rgba(99, 102, 241, 0.1)`,color:`#6366f1`,border:`none`,borderRadius:20},children:e},t))}):null]}),(0,$.jsxs)(`div`,{style:{display:`flex`},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`视频内容:`}),x.analysisStatus===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(pq,{size:`small`,style:{color:`#f59e0b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):x.analysisStatus===`completed`?(0,$.jsx)(`span`,{style:{color:`#475569`,lineHeight:1.6,height:100,overflowY:`auto`},children:x.originalVideoContent}):null]})]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:20,marginTop:20},children:[(0,$.jsx)(bD,{type:`default`,onClick:te,disabled:!P||O,style:{flex:1,height:52,borderRadius:12,border:`2px solid rgba(99, 102, 241, 0.3)`,color:`#6366f1`,fontWeight:600,fontSize:15,background:`rgba(255, 255, 255, 0.9)`,backdropFilter:`blur(10px)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.2)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.boxShadow=`none`},children:`手动`}),(0,$.jsx)(Hq,{title:F===`AI重拆`?`确定要AI重拆吗?`:`确定要AI拆分吗?`,okText:`确定`,cancelText:`取消`,onConfirm:ee,children:(0,$.jsxs)(bD,{type:`primary`,loading:A,disabled:A,style:{flex:1,height:52,borderRadius:12,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`,fontWeight:600,fontSize:15,border:`none`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.3)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`,position:`relative`,overflow:`hidden`},onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 6px 25px rgba(99, 102, 241, 0.4)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.3)`},children:[(0,$.jsx)(`span`,{style:{position:`relative`,zIndex:1},children:F}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:`-100%`,width:`100%`,height:`100%`,background:`linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent)`,transition:`left 0.5s ease`},onMouseEnter:e=>{e.currentTarget.style.left=`100%`}}),x?.aiSuggestions&&x.aiSuggestions.length>0&&(0,$.jsx)(eT,{title:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontWeight:600,marginBottom:8,color:`#6366f1`},children:`AI拆分方案`}),(x?.ai_suggestions||x?.aiSuggestions||[]).map(e=>(0,$.jsxs)(`div`,{style:{marginBottom:8,fontSize:13,lineHeight:1.5},children:[(0,$.jsxs)(`span`,{style:{fontWeight:500,color:`#6366f1`},children:[e.index,`.`]}),(0,$.jsx)(`span`,{style:{marginLeft:4,color:`#000000ff`},children:e.timeNode}),(0,$.jsx)(`br`,{}),(0,$.jsx)(`span`,{style:{color:`#666`},children:e.content})]},e.index))]}),placement:`top`,trigger:`hover`,overlayInnerStyle:{backgroundColor:`#fff`,height:300,overflowY:`auto`,border:`1px solid rgba(99, 102, 241, 0.1)`,borderRadius:12,boxShadow:`0 8px 24px rgba(99, 102, 241, 0.12)`},children:(0,$.jsx)(`span`,{style:{marginLeft:8,fontSize:13,opacity:.9},children:`(AI 镜头拆分方案)`})})]})})]}),(0,$.jsxs)(`div`,{style:{flex:2,background:`linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,display:`flex`,flexDirection:`column`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,background:`linear-gradient(135deg, rgba(99,102,241,0.02) 0%, transparent 100%)`},children:[(0,$.jsx)(`h3`,{style:{fontSize:16,fontWeight:600,color:`#1e293b`,margin:0},children:`拆镜片段列表`}),(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#64748b`,marginLeft:12},children:[`共 `,w.length,` 个片段`]})]}),(0,$.jsx)(g$,{columns:[{title:`片段`,width:100,fixed:`left`,align:`center`,render:(e,t)=>(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontSize:16,fontWeight:600,color:`#333`},children:t.segmentName||`片段${t.segmentIndex||``}`}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#999`},children:t.timeNode}),t.sourceMode===`custom`&&(0,$.jsx)(k$,{color:`blue`,style:{marginTop:6},children:`手动`}),t.sourceMode===`ai_suggestion`&&(0,$.jsx)(k$,{color:`orange`,style:{marginTop:6},children:`自动`})]})},{title:`片段视频`,width:150,align:`center`,render:(e,t)=>(0,$.jsx)(`div`,{style:{position:`relative`,width:120,height:80,borderRadius:6,overflow:`hidden`,background:`#f1f5f9`,cursor:`pointer`},onClick:()=>{console.log(`video clicked:`,t.segmentVideoUrl),t.segmentVideoUrl&&(d(Z9(t.segmentVideoUrl)),p(!0))},children:t.segmentVideoUrl?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:Z9(t.segmentVideoUrl),style:{width:`100%`,height:`100%`,objectFit:`cover`,pointerEvents:`none`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.3)`},children:(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:`50%`,background:`rgba(255,255,255,0.9)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:0,height:0,borderTop:`8px solid transparent`,borderBottom:`8px solid transparent`,borderLeft:`14px solid #6366f1`,marginLeft:2}})})})]}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:12},children:t.splitStatus===`failed`?`切割失败`:`切割中`})})},{title:`视频内容`,width:500,align:`left`,render:(e,t)=>{if(t.source_mode===`ai_suggestion`||t.sourceMode===`ai_suggestion`)return(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,lineHeight:1.6},children:t.segmentContent||t.lastError||`-`});let n=t.analysis_status||t.analysisStatus,r={not_required:`无需单独分析`,pending:`等待分析`,processing:`分析中`,failed:`分析失败`};return n===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(pq,{size:`small`}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):n===`failed`?(0,$.jsx)(`div`,{style:{fontSize:14,color:`#ef4444`,lineHeight:1.6},children:`分析失败`}):(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,lineHeight:1.6},children:n&&r[n]?r[n]:t.segmentContent||t.lastError||`-`})}},{title:`视频类型`,width:120,align:`center`,render:(e,t)=>(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,fontWeight:500},children:t.segmentCategory||`-`})},{title:`状态`,width:120,align:`center`,dataIndex:`moduleProjectStatus`,render:(e,t)=>{let n=e,r=t.moduleProjectCurrentStepCode||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return n||`-`}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#666`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else return t.moduleProjectId?{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#666`}:{text:`待生成任务`,color:`#94a3b8`}})();return typeof i==`string`?(0,$.jsx)(`span`,{style:{fontSize:12,color:`#666`,fontWeight:500},children:i}):(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`操作`,width:140,fixed:`right`,align:`center`,render:(e,n)=>(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:8},children:n.moduleProjectId?(0,$.jsx)(bD,{type:`text`,onClick:()=>t(`/removelens/${n.moduleProjectId}/removefenbu`),style:{color:`#10b981`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`详情任务`}):(0,$.jsx)(bD,{type:`text`,onClick:()=>z(String(n.id),n.segmentName),disabled:!W(n),style:{color:W(n)?`#f59e0b`:`#94a3b8`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:W(n)?`视频生成`:`待切割完成`})})}],dataSource:w,pagination:!1,bordered:!1,rowKey:`id`,scroll:{y:300},style:{flex:1},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`,height:80,overflow:`auto`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(255, 255, 255, 1)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})]})]}):(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{fontSize:16,color:`#999`},children:`加载中...`})})]}),(0,$.jsx)(nne,{open:i,videoUrl:P,title:`手动视频切片`,loading:O,minDuration:Y9,maxDuration:X9,onCancel:()=>a(!1),onConfirm:ne}),(0,$.jsx)(SU,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:18,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`智能视频复刻`}),c&&(0,$.jsxs)(`span`,{style:{fontSize:14,color:`#64748b`},children:[`- `,c]})]}),(0,$.jsx)(bD,{type:`text`,icon:(0,$.jsx)(a5,{}),onClick:B,style:{padding:0,color:`#64748b`,fontSize:14}})]}),placement:`right`,closable:!1,onClose:B,open:n,size:480,styles:{body:{padding:`24px`,background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`},section:{borderRadius:`20px 0 0 20px`,overflow:`hidden`}},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:20},children:[(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsxs)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:[`产品白底图 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12},children:(0,$.jsx)(C0,{listType:`picture-card`,onChange:V,beforeUpload:H,maxCount:1,accept:`image/*`,style:{width:120,height:120,borderRadius:8,border:`2px dashed rgba(99, 102, 241, 0.3)`,background:`rgba(99, 102, 241, 0.02)`},children:!y&&(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:6},children:[(0,$.jsx)(bR,{style:{fontSize:20,color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#64748b`},children:`上传产品图`})]})})})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsxs)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:[`产品名称 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(oK,{value:h,onChange:e=>g(e.target.value),placeholder:`请输入产品名称`,style:{height:44,borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`},maxLength:10,showCount:!0})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsxs)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:[`产品卖点 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(J9,{value:_,onChange:e=>v(e.target.value),placeholder:`请输入产品卖点`,style:{borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`},maxLength:100,showCount:!0,rows:3})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12,marginTop:8},children:(0,$.jsx)(bD,{type:`primary`,onClick:U,loading:E,disabled:E,style:{flex:1,height:48,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,fontWeight:600,fontSize:15,border:`none`,boxShadow:`0 4px 15px rgba(99, 102, 241, 0.3)`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.4)`,e.currentTarget.style.transform=`translateY(-1px)`},onMouseLeave:e=>{e.currentTarget.style.boxShadow=`0 4px 15px rgba(99, 102, 241, 0.3)`,e.currentTarget.style.transform=`translateY(0)`},children:E?`生成中...`:`手动生成`})})]})}),(0,$.jsx)(Rq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`视频预览`})]}),open:f,onCancel:()=>p(!1),afterClose:()=>{m.current&&(m.current.pause(),m.current.currentTime=0)},footer:null,width:640,centered:!0,styles:{body:{padding:24},header:{borderBottom:`1px solid #e0e0e0`,padding:`20px 24px`}},children:(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`},children:(0,$.jsx)(`video`,{ref:m,controls:!0,src:u||``,style:{width:`100%`,maxHeight:420,objectFit:`contain`,backgroundColor:`#000`},playsInline:!0,"webkit-playsinline":!0,autoPlay:!0})})})]})}var{Title:ane,Text:Q9}=Q,{TextArea:one}=oK;function sne(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function cne(){let e=Je(),{creatID:t}=Qe(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(`image`),[u,d]=(0,S.useState)({}),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(null),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(!1),[b,x]=(0,S.useState)({}),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(5),[j,M]=(0,S.useState)(`16:9`),[N,P]=(0,S.useState)(`480p`),[F,I]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]}),[L,R]=(0,S.useState)([]),[z,B]=(0,S.useState)(1),[V,H]=(0,S.useState)(20),[U,ee]=(0,S.useState)(0),[te,ne]=(0,S.useState)(``),[W,re]=(0,S.useState)({}),[G,K]=(0,S.useState)([]),[q,ie]=(0,S.useState)([]),J=[{id:1,title:`原始素材`,description:`上传原始视频素材`,childId:1},{id:2,title:`生成提示词`,description:`根据素材生成描述词`,childId:2},{id:3,title:`生成产品融合图`,description:`生成产品与场景融合图`,childId:3},{id:4,title:`生成视频提示词`,description:`生成视频生成提示词`,childId:4},{id:5,title:`生成最终视频`,description:`合成最终视频`,childId:5}].map((e,t)=>({...e,status:G[t]?.status||``,id:G[t]?.id||t,output:G[t]?.output||``,engineId:G[t]?.input?.payload?.videoConfig?.engineId||``}));(0,S.useEffect)(()=>{let e=new Set;q.forEach(t=>{let n=J.find(e=>String(e.childId)===t);n&&(n.status===`completed`||n.status===`failed`)&&e.add(t)});for(let t=J.length-1;t>=0;t--)if(J[t].status===`completed`||J[t].status===`failed`){e.add(String(J[t].childId));break}e.size>0?ie(Array.from(e)):ie([])},[G]);let ae=(e,t,n)=>{k7(e,t,n).then(e=>{e.items&&R(e.items),e.total!==void 0&&ee(e.total)}).catch(e=>{})},oe=(e,t)=>{B(e),H(t),ae(e,t,te)},se=()=>{ae(1,20,te)};(0,S.useEffect)(()=>{ae(z,V,te)},[]),(0,S.useEffect)(()=>{s7().then(e=>{if(x(e.engine||{}),e.engine?.video&&e.engine.video.length>0){w(e.engine.video[0].id);let t=e.engine.video[0];I({ratios:t.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions||[`480p`,`720p`,`1080p`],durations:t.supportedDurations||[5,8,10,12,15]})}}).catch(e=>{})},[]),(0,S.useEffect)(()=>()=>{m&&(clearInterval(m),h(null))},[m]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;!t.closest(`.image-settings-trigger`)&&!t.closest(`.image-settings-popover`)&&(E(!1),O(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,S.useEffect)(()=>{console.log(`creatID`,t),t&&F7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},[t]),(0,S.useEffect)(()=>{let e=J[4];e&&e.status!==`completed`&&e.status!==`failed`?m||h(setInterval(ue,3e4)):e&&m&&(clearInterval(m),h(null))},[J]);let ce=(e,t,n,i)=>{l(t||`image`),_(n?String(n):``),t===`video`?(p(i||null),d(e&&typeof e==`object`?sne(e):{}),a(``)):(p(null),a(e||``),d({})),r(!0)},le=async()=>{if(c===`image`){if(!W?.id||!g){Z.warning(`缺少任务或步骤 ID,无法保存图片提示词`);return}if(!i||!i.trim()){Z.warning(`图片提示词不能为空`);return}y(!0);try{await L7(W.id,g,{prompt:i.trim()}),Z.success(`图片提示词已保存`),de(),r(!1),_(``)}catch(e){Z.error(e?.message||`保存图片提示词失败`)}finally{y(!1)}return}if(!W?.id||!g){Z.warning(`缺少任务或步骤 ID,无法保存视频提示词`);return}if(!u||typeof u!=`object`||Object.keys(u).length===0){Z.warning(`视频提示词不能为空`);return}if(!f){Z.warning(`视频提词配置缺失,暂不能保存`);return}let e=T9(u,f);if(e){Z.warning(e);return}y(!0);try{await R7(W.id,g,{prompt_schema:u}),Z.success(`视频提示词已保存`),de(),r(!1),_(``)}catch(e){Z.error(e?.message||`保存视频提示词失败`)}finally{y(!1)}},ue=()=>{t&&F7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},de=()=>{t&&F7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},fe=e=>{I7(W.id,e.toString()).then(e=>{de()}).catch(e=>{})},pe=e=>{z7(W.id,e.toString(),{engine_id:`0019e3dac0b795b925b`,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`}).then(e=>{de()}).catch(e=>{})},me=()=>{z7(W.id,J[1].id.toString(),{engine_id:`0019e3dac0b795b925b`,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`}).then(e=>{de()}).catch(e=>{})},he=e=>{let t={engine_id:C,duration:k,aspect_ratio:j,resolution:N,target_platform:`抖音`};B7(W.id,e.toString(),t).then(e=>{de()}).catch(e=>{})},ge=(e,t)=>{let n={engine_id:t};V7(W.id,e.toString(),n).then(e=>{de()}).catch(e=>{})},_e=()=>{let e={engine_id:J[3].engineId};V7(W.id,J[2].id.toString(),e).then(e=>{de()}).catch(e=>{})};return(0,$.jsxs)(S.Fragment,{children:[(0,$.jsxs)(`div`,{className:`initialinfo-container`,style:{margin:`-24px -32px -32px`,height:`calc(100vh - 34px)`,position:`relative`,boxSizing:`border-box`,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-100,right:-100,width:300,height:300,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,borderRadius:`50%`,pointerEvents:`none`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:-100,left:-100,width:300,height:300,background:`radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%)`,borderRadius:`50%`,pointerEvents:`none`}}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:`2%`,position:`relative`,zIndex:1,minHeight:0},children:[(0,$.jsxs)(`div`,{className:`replication-preview`,style:{flex:4,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,boxSizing:`border-box`},children:[(0,$.jsx)(bD,{type:`text`,icon:(0,$.jsx)(b2,{}),onClick:()=>window.history.back(),style:{color:`#64748b`,borderRadius:10,fontSize:13,height:32,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`},children:`返回`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`拆镜复刻 - 任务详情`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(bD,{type:`primary`,ghost:!0,style:{borderRadius:10,padding:`4px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},onClick:()=>s(!0),children:`创作记录`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`},children:(0,$.jsxs)(`div`,{className:`material_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,alignItems:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:W?.material?.materialVideoUrl?(0,$.jsx)(`video`,{controls:!0,src:`http://ceshi.apiforeign.minzhong.cn${W.material.materialVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无视频`})})]}),(0,$.jsxs)(`div`,{className:`product_img`,style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`产品图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:W?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:W.material.materialImageUrl,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无图片`})})]})]}),W?.finalImageUrl&&(0,$.jsx)(`div`,{style:{marginTop:24},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalImageUrl}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})}),W?.finalVideoUrl&&(0,$.jsx)(`div`,{style:{marginTop:24},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(`video`,{controls:!0,src:`http://ceshi.apiforeign.minzhong.cn${W.finalVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})})]})})]}),(0,$.jsxs)(`div`,{className:`replication-form`,style:{flex:1,minWidth:`450px`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,gap:10,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`生成步骤`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px 16px 16px`},children:(0,$.jsx)(r_,{activeKey:q,onChange:ie,ghost:!0,bordered:!1,style:{background:`transparent`},expandIconPlacement:`end`,items:J.map(e=>({key:String(e.childId),label:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,width:`100%`,justifyContent:`space-between`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:16,height:16},children:e.status===`completed`?(0,$.jsx)(c4,{style:{fontSize:16,color:`#22c55e`}}):e.status===`processing`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,background:`#ef4444`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:`#fff`,fontSize:10},children:`×`})}):(0,$.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:`#cbd5e1`}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:e.status===`processing`||e.status===`waiting_user`?`#6366f1`:`#1e293b`,fontWeight:500},children:e.title}),(e.status===`processing`||e.status===`waiting_user`)&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`,marginLeft:8},children:`生成中`}),e.status===`failed`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`,marginLeft:8},children:`失败`}),e.status===``&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#717d8b`,marginLeft:8},children:`待生成`})]})}),children:(0,$.jsxs)(`div`,{style:{padding:`16px`,background:`linear-gradient(135deg, rgba(248,250,252,0.6) 0%, rgba(238,242,255,0.4) 100%)`,borderRadius:12,marginTop:8,border:`1px solid rgba(99, 102, 241, 0.06)`},children:[e.childId===1&&(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,marginBottom:20,alignItems:`flex-start`,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(Q9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`原视频`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:W?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${W.material.materialVideoUrl}`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10},controls:!0}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,height:`16`,rx:`2`,ry:`2`}),(0,$.jsx)(`path`,{d:`M8 12l4 2 4-2`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无视频`})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(Q9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`产品图片`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:W?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:W.material.materialImageUrl,alt:`产品图片`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10}}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,$.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`,fill:`currentColor`}),(0,$.jsx)(`path`,{d:`M21 15l-5-5L5 21`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无图片`})]})})]}),(0,$.jsx)(bD,{onClick:()=>{Z.info(`正在生成图片提示词,请稍候...`),fe(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片提示词`})]})}),e.childId===2&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(Q9,{style:{color:`#475569`,fontSize:13,lineHeight:1.8,whiteSpace:`pre-wrap`},children:e?.output?.payload?.prompt||`暂无提示词`})}),(0,$.jsxs)(jU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(bD,{type:`default`,icon:(0,$.jsx)(F$,{}),onClick:()=>ce(e?.output?.payload?.prompt,`image`,e.id),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`修改提示词`}),(0,$.jsx)(bD,{onClick:()=>{Z.info(`正在生成图片,请稍候...`),pe(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片`})]})]}),e.childId===3&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`,position:`relative`},children:[W.finalImageUrl?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalImageUrl}`,alt:`融合图`,style:{width:`100%`,height:180,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无融合图`}),(0,$.jsx)(bD,{type:`default`,icon:(0,$.jsx)(F$,{}),onClick:()=>me(),disabled:e.status!==`completed`,style:{position:`absolute`,bottom:8,left:8,borderRadius:8,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:30,fontWeight:500,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(4px)`,padding:`0 12px`,fontSize:12},children:`重新生成`})]}),(0,$.jsx)(`p`,{style:{marginBottom:6,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`视频参数选择:`}),(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{E(!T),O(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(q6,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(Q9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:b.video?.find(e=>e.id===C)?.name||`选择引擎`})]}),T&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-10,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(Q9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:b.video?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{w(e.id),I({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(j)||M(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(N)||P(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(k)||A(e.supportedDurations?.[0]||5),E(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:C===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:C===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:C===e.id?600:500,color:C===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{O(!D),E(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(M3,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(Q9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[j,` · `,k,`s · `,N]})]}),D&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:F.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>M(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:j===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:j===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${j===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:j===e?`#6366f1`:`#6b7280`,fontWeight:j===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(k-Math.min(...F.durations))/(Math.max(...F.durations)-Math.min(...F.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...F.durations),max:Math.max(...F.durations),value:k,onChange:e=>A(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:k}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:F.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>P(e),style:{flex:1,height:42,borderRadius:6,border:N===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:N===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:N===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(bD,{type:`primary`,style:{width:`100%`,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},onClick:()=>{Z.info(`正在生成视频提示词,请稍候...`),he(e.id)},disabled:e.status!==`completed`,children:`下一步:生成视频提示词`})]}),e.childId===4&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(Q9,{style:{color:`#64748b`,fontSize:13,lineHeight:1.8},children:`视频提词已生成,可点击按钮查看/修改`})}),(0,$.jsxs)(jU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(bD,{type:`default`,icon:(0,$.jsx)(F$,{}),onClick:()=>ce(W?.videoGeneration?.promptSchema,`video`,e.id,W?.videoGeneration?.schemaConfigSnapshot),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`||!W?.videoGeneration?.promptSchema||!W?.videoGeneration?.schemaConfigSnapshot,children:`查看/修改视频提词`}),(0,$.jsx)(bD,{onClick:()=>{Z.info(`正在生成视频,请稍候...`),ge(e.id,e.engineId)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成视频`})]})]}),e.childId===5&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,position:`relative`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},children:e.status===`completed`&&W?.finalVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalVideoUrl}`,style:{width:`100%`,height:180,objectFit:`cover`},controls:!0}):e.status===`processing`?(0,$.jsxs)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:20,height:20,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}),(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontSize:14},children:`视频生成中...`})]}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#ef4444`,fontSize:14},children:`视频生成失败`}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无视频`})}),(0,$.jsxs)(jU,{style:{width:`100%`,gap:12},children:[(0,$.jsx)(bD,{onClick:()=>_e(),type:`default`,icon:(0,$.jsx)(F$,{}),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`重新生成`}),(0,$.jsx)(bD,{type:`primary`,icon:(0,$.jsx)(_0,{}),style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,onClick:()=>{let e=`http://ceshi.apiforeign.minzhong.cn${W?.finalVideoUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=`video_${Date.now()}.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},children:`下载视频`})]})]})]})}))})})]})]})]}),(0,$.jsx)(Rq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:c===`video`?`查看/编辑视频提词`:`修改提示词`})]}),open:n,onCancel:()=>{v||r(!1)},footer:[(0,$.jsx)(bD,{onClick:()=>r(!1),disabled:v,style:{borderRadius:8},children:`取消`},`cancel`),(0,$.jsx)(bD,{type:`primary`,onClick:le,loading:v,disabled:v,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`确认`},`confirm`)],width:800,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`},body:{background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,padding:`20px 24px`}},children:c===`image`?(0,$.jsx)(one,{value:i,onChange:e=>a(e.target.value),rows:8,style:{width:`100%`,height:300,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},placeholder:`请输入提示词`}):(0,$.jsx)(`div`,{style:{maxHeight:500,overflowY:`auto`,paddingRight:10},children:(0,$.jsx)(M9,{value:u,schemaConfigSnapshot:f,onChange:d})})}),(0,$.jsxs)(Rq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`创作记录`})]}),open:o,onCancel:()=>s(!1),width:800,footer:null,styles:{body:{background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginBottom:16,gap:8},children:[(0,$.jsx)(oK,{placeholder:`搜索产品名称`,value:te,onChange:e=>ne(e.target.value),onPressEnter:se,style:{width:200,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,height:40}}),(0,$.jsx)(bD,{type:`primary`,onClick:se,style:{borderRadius:10,height:40,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%)`,backdropFilter:`blur(20px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(g$,{columns:[{title:`产品名称`,dataIndex:`title`,key:`title`,render:e=>(0,$.jsx)(`span`,{style:{fontSize:14,color:`#1e293b`,fontWeight:500},children:e})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:13,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,render:t=>(0,$.jsx)(bD,{type:`text`,onClick:()=>e(`/removelens/${t.id}/removeinfo`),style:{color:`#6366f1`,fontSize:13,padding:`4px 12px`,borderRadius:6,background:`rgba(99, 102, 241, 0.1)`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`},children:`查看详情`})}],dataSource:L,rowKey:`id`,pagination:{current:z,pageSize:V,total:U,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:oe,style:{padding:`16px 24px`,borderTop:`1px solid rgba(99, 102, 241, 0.1)`}},style:{fontSize:13},scroll:{y:350},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(99, 102, 241, 0.03)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})})]})]})}var{RangePicker:lne}=zH,$9=e=>e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),une=()=>{let e=Je(),[t]=Dn(),{message:n}=Tx.useApp(),[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)(0),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(!1),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)([]),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(1),[x,C]=(0,S.useState)(10),[w,T]=(0,S.useState)(t.get(`accountId`)||``),[E,D]=(0,S.useState)(),[O,k]=(0,S.useState)((0,OD.default)().subtract(1,`day`).format(`YYYY-MM-DD`)),[A,j]=(0,S.useState)(``);(0,S.useEffect)(()=>{N(),M()},[]);let M=async(e=1,t=10,r,a)=>{c(!0);try{let n=await K7({advertiser_id:a??w,consume_date:r??E,page:e,page_size:t});i(n.data||[]),o(n.pagination?.total||0),b(n.pagination?.page||1),C(n.pagination?.pageSize||10)}catch{n.error(`加载数据失败`)}finally{c(!1)}},N=async()=>{try{let e=((await J7()).data||[]).map(e=>({name:$9(e.field),description:e.description}));m(e);let t=localStorage.getItem(`consumeColumns`);g(t?JSON.parse(t):e.map(e=>e.name))}catch{n.error(`加载表头字段失败`)}},P=r.map((e,t)=>({...e,index:t+1,key:e.id})),F=()=>{e(`/authorization`)},I=()=>{b(1),M(1,x)},L=()=>{T(``),D(void 0),b(1),M(1,x,null,``)},R=()=>{Rq.confirm({title:`拉取消耗数据`,content:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8},children:`同步日期:`}),(0,$.jsx)(zH,{value:(0,OD.default)(O),onChange:e=>k(e?e.format(`YYYY-MM-DD`):(0,OD.default)().subtract(1,`day`).format(`YYYY-MM-DD`)),style:{width:`100%`}})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8},children:`广告主ID(可选):`}),(0,$.jsx)(oK,{placeholder:`不指定则同步所有授权的广告主`,value:A,onChange:e=>j(e.target.value)})]})]}),onOk:async()=>{u(!0);try{await q7({date:O,advertiser_id:A||void 0}),n.success(`拉取消耗数据成功`),M(y,x)}catch{n.error(`拉取消耗数据失败`)}finally{u(!1)}},okText:`开始拉取`,cancelText:`取消`})},z=h.map(e=>p.find(t=>t.name===e)).filter(e=>!!e).map(e=>({title:e.description,dataIndex:e.name,key:e.name,ellipsis:!0}));return(0,$.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(bD,{type:`text`,icon:(0,$.jsx)(b2,{}),onClick:F}),(0,$.jsx)(W4,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`消耗记录`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(oK,{placeholder:`广告主ID`,value:w,onChange:e=>T(e.target.value),style:{width:180},onPressEnter:()=>{b(1),M(1,x)}}),(0,$.jsx)(lne,{value:E?[(0,OD.default)(E[0]),(0,OD.default)(E[1])]:void 0,onChange:e=>{e&&e[0]&&e[1]?D([e[0].format(`YYYY-MM-DD`),e[1].format(`YYYY-MM-DD`)]):D(void 0)}}),(0,$.jsx)(bD,{type:`primary`,size:`medium`,onClick:I,children:`搜索`}),(0,$.jsx)(bD,{size:`medium`,onClick:L,children:`重置`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(bD,{icon:(0,$.jsx)(b8,{}),onClick:R,loading:l,style:{borderRadius:8},children:`拉取消耗`}),(0,$.jsx)(bD,{icon:(0,$.jsx)(q6,{}),onClick:()=>f(!0),style:{borderRadius:8},children:`自定义表头`})]})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(g$,{dataSource:P,columns:z,loading:s,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(KK,{current:y,pageSize:x,total:a,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{b(e),C(t),M(e,t)},size:`small`})})]}),(0,$.jsx)(Rq,{title:`自定义表头`,open:d,onOk:()=>{localStorage.setItem(`consumeColumns`,JSON.stringify(h)),n.success(`表头设置已保存`),f(!1)},onCancel:()=>{f(!1),v(``)},okText:`确定`,cancelText:`取消`,width:800,children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,height:400},children:[(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(oK,{placeholder:`搜索指标...`,value:_,allowClear:!0,onChange:e=>v(e.target.value),style:{marginBottom:8}}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:12,marginBottom:12,display:`block`},children:`输入指标名称进行搜索`}),(0,$.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:[(0,$.jsx)(`div`,{style:{marginBottom:16},children:(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:`任务详情指标`})}),(0,$.jsx)(lV,{checked:h.length===p.length&&p.length>0,indeterminate:h.length>0&&h.length{e.target.checked?g(p.map(e=>e.name)):g([])},style:{marginBottom:12},children:`全选`}),(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:8},children:p.filter(e=>e.description.toLowerCase().includes(_.toLowerCase())||e.name.toLowerCase().includes(_.toLowerCase())).map(e=>(0,$.jsx)(lV,{checked:h.includes(e.name),onChange:t=>{t.target.checked?g(t=>[...t,e.name]):g(t=>t.filter(t=>t!==e.name))},children:e.description},e.name))})]})]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:[`已添加(`,h.length,`)`]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,$.jsx)(bD,{size:`small`,onClick:()=>g([]),disabled:h.length===0,children:`清空`}),(0,$.jsx)(bD,{size:`small`,onClick:async()=>{try{let e=((await J7()).data||[]).map(e=>({name:$9(e.field),description:e.description}));m(e),g(e.map(e=>e.name)),localStorage.removeItem(`consumeColumns`),n.success(`表头字段已更新`)}catch{n.error(`更新表头字段失败`)}},children:`更新表头字段`})]})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:h.length===0?(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:14,textAlign:`center`,display:`block`,padding:`40px 0`},children:`暂无已选指标`}):(0,$.jsx)(`div`,{children:h.map((e,t)=>{let n=p.find(t=>t.name===e);return(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`8px 12px`,borderBottom:`1px solid #f0f0f5`,cursor:`move`,userSelect:`none`},draggable:!0,onDragStart:e=>{e.dataTransfer.setData(`index`,String(t))},onDragOver:e=>{e.preventDefault()},onDrop:e=>{let n=parseInt(e.dataTransfer.getData(`index`)),r=t;if(n!==r){let e=[...h],[t]=e.splice(n,1);e.splice(r,0,t),g(e)}},children:[(0,$.jsx)(Q.Text,{children:n?.description||e}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:12},children:t+1})]},e)})})})]})]})})]})},dne=()=>{let e=Je(),[t]=Dn(),{message:n}=Tx.useApp(),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!0),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(``);(0,S.useEffect)(()=>{let r=t.get(`auth_code`),a=t.get(`state`);if(!r||!a){o(!1),i(10);return}let s={auth_code:r,state:a,app_id:t.get(`app_id`)||void 0,material_auth_status:t.get(`material_auth_status`)||void 0,scope:t.get(`scope`)||void 0,uid:t.get(`uid`)||void 0};(async()=>{try{let t=await C7(s);c(!0),o(!1),n.success(t?.message||`授权成功`),setTimeout(()=>{e(`/authorization`)},1500)}catch(e){let t=e?.message||`授权失败`;u(t),o(!1),n.error(t)}})();let l=setInterval(()=>{i(e=>e>=11?(o(!1),e):e+1)},1e3);return()=>{clearInterval(l)}},[e,t,n]);let d=()=>{i(0),o(!0),c(!1),u(``),window.location.href=`/authorization`};return s?(0,$.jsx)(`div`,{style:{minHeight:`100vh`,display:`flex`,justifyContent:`center`,alignItems:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`60px 80px`,background:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.1)`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,background:`#dcfce7`,borderRadius:`50%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`0 auto 24px`},children:(0,$.jsx)(Q.Text,{style:{fontSize:40,color:`#22c55e`},children:`✓`})}),(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#1e293b`},children:`授权成功`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`},children:`正在跳转至授权管理页面...`})]})}):(0,$.jsx)(`div`,{style:{minHeight:`100vh`,display:`flex`,justifyContent:`center`,alignItems:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`60px 80px`,background:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.1)`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:`50%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`0 auto 24px`},children:a&&r<10?(0,$.jsx)(pq,{size:`large`,tip:`加载中`,style:{color:`#fff`}}):(0,$.jsx)(MH,{style:{fontSize:40,color:`#fff`}})}),l?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#ef4444`},children:`授权失败`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:l}),(0,$.jsx)(bD,{type:`primary`,size:`large`,icon:(0,$.jsx)(wJ,{}),onClick:d,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600,padding:`12px 32px`},children:`重新授权`})]}):r>=10?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#ef4444`},children:`授权无响应`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:`请重新授权`}),(0,$.jsx)(bD,{type:`primary`,size:`large`,icon:(0,$.jsx)(wJ,{}),onClick:d,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600,padding:`12px 32px`},children:`重新授权`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#1e293b`},children:`授权中,请等待`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:`正在等待平台完成授权操作`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8},children:[(0,$.jsx)(MH,{style:{color:`#6366f1`}}),(0,$.jsxs)(Q.Text,{style:{color:`#6366f1`,fontWeight:500,fontSize:16},children:[r,`s`]})]})]})]})})},fne=()=>(0,$.jsxs)(`div`,{style:{padding:`20px 0`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:32},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:14,background:`linear-gradient(135deg, #f59e0b 0%, #d97706 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(245,158,11,0.3)`},children:(0,$.jsx)(F2,{style:{fontSize:22,color:`#fff`}})}),(0,$.jsx)(`div`,{children:(0,$.jsxs)(Q.Title,{level:2,style:{margin:0,color:`#1e293b`,fontWeight:700},children:[`行业爆款大盘`,(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontSize:14,fontWeight:400,marginLeft:8},children:`发现热门素材趋势`})]})})]}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`},children:`实时追踪各行业爆款素材,把握创作风向,打造热门内容`})]}),(0,$.jsxs)(Mz,{bordered:!1,style:{borderRadius:20,background:`linear-gradient(135deg, rgba(245,158,11,0.04) 0%, rgba(217,119,6,0.04) 100%)`,border:`1px solid rgba(245,158,11,0.1)`,padding:10,marginBottom:32},children:[(0,$.jsxs)(Q.Title,{level:4,style:{marginBottom:20,color:`#1e293b`},children:[(0,$.jsx)(n3,{style:{marginRight:8,color:`#f59e0b`}}),`行业热度排行`]}),(0,$.jsx)(Mz,{bordered:!1,style:{borderRadius:16,background:`#fafafa`,padding:40,textAlign:`center`},children:(0,$.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:14},children:`敬请期待行业热度排行`})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:[(0,$.jsxs)(Q.Title,{level:4,style:{margin:0,color:`#1e293b`},children:[(0,$.jsx)(F8,{style:{marginRight:8,color:`#6366f1`}}),`爆款素材榜单`]}),(0,$.jsxs)(bD,{type:`primary`,size:`middle`,onClick:()=>{Z.info(`请联系客服开通`)},style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:[(0,$.jsx)(R3,{style:{marginRight:6}}),`立即解锁全部`]})]}),(0,$.jsx)(Mz,{bordered:!1,style:{borderRadius:16,background:`#fafafa`,padding:40,textAlign:`center`},children:(0,$.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:14},children:`敬请期待更多爆款素材`})})]}),pne=()=>{let e=()=>{Z.info(`请联系客服开通`)},t=[{icon:(0,$.jsx)(k8,{style:{fontSize:28,color:`#8b5cf6`}}),title:`AI智能生成`,description:`先进的AI技术,一键生成高质量视频内容`},{icon:(0,$.jsx)(b6,{style:{fontSize:28,color:`#ec4899`}}),title:`多格式输出`,description:`支持多种视频格式,满足不同场景需求`},{icon:(0,$.jsx)(c4,{style:{fontSize:28,color:`#10b981`}}),title:`品质保证`,description:`专业级画质,细节清晰,色彩鲜艳`},{icon:(0,$.jsx)(m3,{style:{fontSize:28,color:`#f59e0b`}}),title:`创意无限`,description:`丰富的模板和风格,激发创作灵感`}];return(0,$.jsxs)(`div`,{style:{padding:`20px 0`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:32},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:14,background:`linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(139,92,246,0.3)`},children:(0,$.jsx)(c3,{style:{fontSize:22,color:`#fff`}})}),(0,$.jsx)(`div`,{children:(0,$.jsxs)(Q.Title,{level:2,style:{margin:0,color:`#1e293b`,fontWeight:700},children:[`创意素材案例`,(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontSize:14,fontWeight:400,marginLeft:8},children:`探索AI创作无限可能`})]})})]}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`},children:`精选AI生成的优秀素材案例,展示AI创作的无限潜力与创意灵感`})]}),(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, 1fr)`,gap:20,marginBottom:32},children:t.map((e,t)=>(0,$.jsx)(Mz,{bordered:!1,style:{borderRadius:16,background:`linear-gradient(135deg, rgba(139,92,246,0.04) 0%, rgba(99,102,241,0.04) 100%)`,border:`1px solid rgba(139,92,246,0.1)`,padding:20},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(`div`,{style:{marginBottom:16},children:e.icon}),(0,$.jsx)(Q.Title,{level:4,style:{marginBottom:8,color:`#1e293b`},children:e.title}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13},children:e.description})]})},t))}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:[(0,$.jsxs)(Q.Title,{level:4,style:{margin:0,color:`#1e293b`},children:[(0,$.jsx)(_8,{style:{marginRight:8,color:`#f59e0b`}}),`精选案例展示`]}),(0,$.jsxs)(bD,{type:`primary`,size:`middle`,onClick:e,style:{borderRadius:10,background:`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`,border:`none`},children:[(0,$.jsx)(R3,{style:{marginRight:6}}),`解锁全部案例`]})]}),(0,$.jsx)(Mz,{bordered:!1,style:{borderRadius:16,background:`#fafafa`,padding:40,textAlign:`center`},children:(0,$.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:14},children:`敬请期待更多创意案例`})})]})},mne=({children:e})=>{let{user:t,loading:n,checkAuth:r}=X7();return(0,S.useEffect)(()=>{!localStorage.getItem(`auth_token`)&&!n&&!t&&(window.location.href=`/login`)},[t,n]),n?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,$.jsx)(pq,{size:`large`})}):t?(0,$.jsx)($.Fragment,{children:e}):(window.location.href=`/login`,null)};(0,_.createRoot)(document.getElementById(`root`)).render((0,$.jsx)(()=>{let{checkAuth:e}=X7();return(0,S.useEffect)(()=>{e()},[]),(0,$.jsx)(Nm,{locale:M0.default,theme:{token:{colorPrimary:`#6366f1`,borderRadius:8,fontFamily:`'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif`},components:{Button:{controlHeight:36,controlHeightLG:44},Card:{boxShadow:`0 1px 3px rgba(0,0,0,0.04)`},Table:{headerBg:`#fafbfc`}}},children:(0,$.jsx)(Tx,{children:(0,$.jsx)(gn,{children:(0,$.jsxs)(Et,{children:[(0,$.jsx)(wt,{path:`/login`,element:(0,$.jsx)(ate,{})}),(0,$.jsxs)(wt,{path:`/`,element:(0,$.jsx)(mne,{children:(0,$.jsx)(rte,{})}),children:[(0,$.jsx)(wt,{index:!0,element:(0,$.jsx)(St,{to:`/projects`,replace:!0})}),(0,$.jsx)(wt,{path:`projects`,element:(0,$.jsx)(ste,{})}),(0,$.jsx)(wt,{path:`projects/:projectId/generate`,element:(0,$.jsx)(lte,{})}),(0,$.jsx)(wt,{path:`records`,element:(0,$.jsx)(ute,{})}),(0,$.jsx)(wt,{path:`credits`,element:(0,$.jsx)(dte,{})}),(0,$.jsx)(wt,{path:`credit-records`,element:(0,$.jsx)(d9,{})}),(0,$.jsx)(wt,{path:`order-records`,element:(0,$.jsx)(d9,{})}),(0,$.jsx)(wt,{path:`user-center`,element:(0,$.jsx)(d9,{})}),(0,$.jsx)(wt,{path:`messages`,element:(0,$.jsx)(mte,{})}),(0,$.jsx)(wt,{path:`conversation`,element:(0,$.jsx)(xte,{})}),(0,$.jsx)(wt,{path:`initial`,element:(0,$.jsx)(Tte,{})}),(0,$.jsx)(wt,{path:`initial/:creatID/initialinfo`,element:(0,$.jsx)(jte,{})}),(0,$.jsx)(wt,{path:`removelens`,element:(0,$.jsx)(Mte,{})}),(0,$.jsx)(wt,{path:`removelens/:creatID/removeinfo`,element:(0,$.jsx)(ine,{})}),(0,$.jsx)(wt,{path:`removelens/:creatID/removefenbu`,element:(0,$.jsx)(cne,{})}),(0,$.jsx)(wt,{path:`generated`,element:(0,$.jsx)(Ite,{})}),(0,$.jsx)(wt,{path:`pretest`,element:(0,$.jsx)(zte,{})}),(0,$.jsx)(wt,{path:`authorization`,element:(0,$.jsx)(Vte,{})}),(0,$.jsx)(wt,{path:`authoriza-waiting`,element:(0,$.jsx)(dne,{})}),(0,$.jsx)(wt,{path:`materials`,element:(0,$.jsx)(qte,{})}),(0,$.jsx)(wt,{path:`consume`,element:(0,$.jsx)(une,{})}),(0,$.jsx)(wt,{path:`popular`,element:(0,$.jsx)(fne,{})}),(0,$.jsx)(wt,{path:`creativeplaza`,element:(0,$.jsx)(pne,{})})]}),(0,$.jsx)(wt,{path:`*`,element:(0,$.jsx)(St,{to:`/projects`,replace:!0})})]})})})})},{})); \ No newline at end of file + `}),(0,$.jsx)(`div`,{style:{margin:`auto`,display:`flex`,flexDirection:`column`,width:y.length>0?`${y.length*80+Math.max(0,y.length-1)*1}px`:`100%`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,height:86,borderRadius:12,background:`#fff`,gap:1,position:`relative`},children:[x&&y.length===0?(0,$.jsxs)(`div`,{style:{flex:`1 1 auto`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(lq,{size:`small`}),(0,$.jsx)(tne,{style:{marginLeft:8,color:`#64748b`},children:`正在抽取每秒帧...`})]}):y.length>0?y.map(e=>{let t=e.second>=_[0]&&e.second<_[1];return(0,$.jsxs)(`button`,{type:`button`,onClick:()=>I(e.second),title:`${e.second}s${e.fallback?`,实际取帧 ${e.captureSecond?.toFixed(1)}s`:``}`,style:{minWidth:80,flex:`0 0 80px`,height:86,borderTop:t?`5px solid #6366f1`:`none`,borderBottom:t?`5px solid #6366f1`:`none`,padding:0,background:`transparent`,overflow:`hidden`,cursor:A?`not-allowed`:`pointer`,position:`relative`},children:[e.status===`success`&&e.image?(0,$.jsx)(`img`,{src:e.image,alt:`${e.second}s`,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):e.status===`loading`?(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(lq,{size:`small`})}):(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,color:`#64748b`,fontSize:12,background:`#fff`},children:[(0,$.jsxs)(`span`,{children:[e.second,`s`]}),(0,$.jsx)(`span`,{style:{fontSize:11},children:`无有效帧`})]}),(0,$.jsxs)(`span`,{style:{position:`absolute`,left:0,bottom:3,color:`#ffffffff`,fontSize:16,textShadow:`0 1px 3px rgba(0,0,0,.7)`},children:[e.second,`s`]})]},e.second)}):(0,$.jsx)(`div`,{style:{flex:`1 1 auto`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#64748b`},children:`暂无帧预览,请确认视频是否加载完成`}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:-10,left:0,right:0,bottom:0},children:(0,$.jsx)(aH,{range:!0,min:0,max:O||a,step:1,value:_,onChange:P,onChangeComplete:F,tooltip:{formatter:e=>`${U9(Number(e||0))}s`},disabled:!O||A,styles:{track:{background:`#6969dd63`,height:86,borderRadius:12,margin:`0 `},rail:{height:86,borderRadius:12},handle:{width:20,height:86,marginTop:0,borderRadius:`50%`}}})})]})})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,textAlign:`center`,color:`#64748b`,fontSize:14},children:[`已选取 `,k,`s`]}),E&&(0,$.jsx)(`div`,{style:{marginTop:12,padding:`10px 14px`,borderRadius:8,background:`rgba(239, 68, 68, 0.08)`,border:`1px solid rgba(239, 68, 68, 0.15)`,color:`#ef4444`,fontSize:13,textAlign:`center`},children:E})]})]})})},{TextArea:J9}=nK,une=`http://ceshi.apiforeign.minzhong.cn`,Y9=2,X9=15;function Z9(e){return e?/^https?:\/\//i.test(e)?e:`${une}${e}`:``}function dne(){let{creatID:e}=Qe(),t=Je(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(null),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(!1),m=(0,S.useRef)(null),[h,g]=(0,S.useState)(``),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(null),[w,T]=(0,S.useState)([]),[E,D]=(0,S.useState)(!1),[O,k]=(0,S.useState)(!1),[A,j]=(0,S.useState)(!1),M=(0,S.useRef)(null),N=(0,S.useRef)(null),P=(0,S.useMemo)(()=>Z9(x?.videoUrl),[x?.videoUrl]),F=(0,S.useMemo)(()=>w.length===0?`AI自动拆分`:w.some(e=>e.sourceMode===`ai_suggestion`)?`AI重拆`:`AI自动拆分`,[w]),I=(0,S.useCallback)(async()=>{if(e)try{C(await M7(e))}catch{Z.error(`获取任务详情失败`)}},[e]),L=(0,S.useCallback)(async()=>{if(e)try{let t=(await F7(e)).items||[];T(t),t.some(e=>e.moduleProjectCurrentStepCode!==`video_generate`&&e.moduleProjectStatus!==`completed`&&e.moduleProjectStatus!==`failed`)?M.current||=window.setInterval(async()=>{try{let t=(await F7(e)).items||[];T(e=>e.map(e=>{let n=t.find(t=>t.id===e.id);return n&&(e.moduleProjectCurrentStepCode!==`video_generate`||e.moduleProjectStatus!==`completed`&&e.moduleProjectStatus!==`failed`)?n:e})),t.every(e=>e.moduleProjectCurrentStepCode===`video_generate`||e.moduleProjectStatus===`completed`||e.moduleProjectStatus===`failed`)&&(M.current&&=(clearInterval(M.current),null))}catch(e){console.error(`轮询获取拆镜列表失败:`,e)}},3e4):M.current&&=(clearInterval(M.current),null)}catch{Z.error(`获取拆镜列表失败`)}},[e]),R=(0,S.useCallback)(async()=>{await Promise.all([I(),L()])},[I,L]);(0,S.useEffect)(()=>(R(),()=>{M.current&&=(clearInterval(M.current),null),N.current&&=(clearInterval(N.current),null)}),[R]),(0,S.useEffect)(()=>{if(x)return x.analysisStatus===`processing`?(console.log(`开始轮询`),N.current=window.setInterval(async()=>{try{C(await M7(e))}catch{}},3e3)):N.current&&=(clearInterval(N.current),null),()=>{N.current&&=(clearInterval(N.current),null)}},[x?.analysisStatus,e]);let z=(e,t)=>{s(e),l(t),r(!0)},B=()=>{r(!1),s(null),g(``),l(``),v(``),b(``)},V=e=>{e.fileList.length===0&&b(``)},H=async e=>{try{b((await V5(e)).url),Z.success(`图片上传成功`)}catch{Z.error(`图片上传失败,请重试`)}return!1},U=async()=>{if(!o){Z.warning(`请先选择拆镜片段`);return}if(!y){Z.warning(`请上传产品图`);return}if(!h.trim()){Z.warning(`请输入产品名称`);return}if(!_.trim()){Z.warning(`请输入产品卖点`);return}let n={target_project_name:h.trim(),core_content_point:_.trim(),material_image_url:Z9(y),idempotency_key:`replication_${Date.now()}`};console.log(o,n),D(!0);try{await I7(o,n),Z.success(`视频生成任务创建成功`),B(),F7(e).then(e=>{console.log(`123123123123`,e);let n=e.items.find(e=>e.id===o);console.log(n),Z.loading(`创建中...`,3),setTimeout(()=>{t(`/removelens/${n.moduleProjectId}/removefenbu`)},3e3)})}catch(e){Z.error(e?.message||`创建失败,请重试`)}finally{D(!1)}},ee=async()=>{if(e){j(!0);try{let t=w.some(e=>e.sourceMode===`ai_suggestion`);await N7(e,{selected_indices:[],replace_existing:t}),Z.success(t?`AI 重拆任务已提交`:`AI 拆镜任务已提交`),await R()}catch(e){Z.error(e?.message||`拆镜失败`)}finally{j(!1)}}},te=()=>{if(!P){Z.warning(`原视频地址不存在`);return}a(!0)},ne=async t=>{if(e){if(t.durationSecondX9){Z.warning(`拆镜片段不能超过 ${X9} 秒`);return}k(!0);try{await P7(e,{start_second:t.startSecond,end_second:t.endSecond}),Z.success(`手动拆镜任务已提交`),a(!1),await R()}catch(e){Z.error(e?.message||`手动拆镜失败`)}finally{k(!1)}}},W=e=>e?.splitStatus===`completed`&&!!e?.segmentVideoUrl;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{margin:`-24px -32px -32px`,borderRadius:20,minHeight:`calc(100vh - 34px)`,display:`flex`,flexDirection:`column`,overflow:`hidden`,background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-100,right:-100,width:300,height:300,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:-100,left:-100,width:300,height:300,background:`radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsxs)(`div`,{style:{padding:`20px 32px`,display:`flex`,alignItems:`center`,gap:16,position:`relative`,zIndex:10},children:[(0,$.jsx)(vD,{type:`text`,icon:(0,$.jsx)(g2,{}),onClick:()=>t(-1),style:{fontSize:16,color:`#6366f1`,background:`rgba(99, 102, 241, 0.1)`,borderRadius:12,padding:`8px 16px`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`}}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(`div`,{style:{width:40,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsx)(`h1`,{style:{fontSize:22,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,margin:0},children:`AI视频拆镜工作台`}),(0,$.jsx)(`div`,{style:{width:40,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]})})]}),x?(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,overflow:`hidden`,padding:`0 32px 32px`},children:[(0,$.jsxs)(`div`,{style:{flex:1,background:`linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.6) 100%)`,backdropFilter:`blur(20px)`,borderRadius:20,display:`flex`,alignItems:`center`,gap:30,padding:24,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{position:`relative`,width:280,height:160,borderRadius:12,overflow:`hidden`,flexShrink:0,boxShadow:`0 4px 16px rgba(0,0,0,0.1)`},children:(0,$.jsx)(`video`,{controls:!0,src:P,style:{width:`100%`,height:`100%`,objectFit:`cover`}})}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,position:`relative`,zIndex:1},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsx)(`h2`,{style:{fontSize:20,fontWeight:600,marginBottom:16,background:`linear-gradient(135deg, #1e293b 0%, #334155 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`视频总结`}),(0,$.jsx)(`div`,{style:{textAlign:`right`},children:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[`上传时间: `,x.createdAt?new Date(x.createdAt).toLocaleString(`zh-CN`,{year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}):`-`]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`产品名称:`}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontWeight:500},children:x.title})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`受众群体:`}),x.analysisStatus===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(lq,{size:`small`,style:{color:`#f59e0b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):x.analysisStatus===`completed`?(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:(x.originalVideoAudience?.split(`、`)||[]).map((e,t)=>(0,$.jsx)(T$,{style:{fontSize:12,background:`rgba(99, 102, 241, 0.1)`,color:`#6366f1`,border:`none`,borderRadius:20},children:e},t))}):null]}),(0,$.jsxs)(`div`,{style:{display:`flex`},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`视频内容:`}),x.analysisStatus===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(lq,{size:`small`,style:{color:`#f59e0b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):x.analysisStatus===`completed`?(0,$.jsx)(`span`,{style:{color:`#475569`,lineHeight:1.6,height:100,overflowY:`auto`},children:x.originalVideoContent}):null]})]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:20,marginTop:20},children:[(0,$.jsx)(vD,{type:`default`,onClick:te,disabled:!P||O,style:{flex:1,height:52,borderRadius:12,border:`2px solid rgba(99, 102, 241, 0.3)`,color:`#6366f1`,fontWeight:600,fontSize:15,background:`rgba(255, 255, 255, 0.9)`,backdropFilter:`blur(10px)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.2)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.boxShadow=`none`},children:`手动`}),(0,$.jsx)(Rq,{title:F===`AI重拆`?`确定要AI重拆吗?`:`确定要AI拆分吗?`,okText:`确定`,cancelText:`取消`,onConfirm:ee,children:(0,$.jsxs)(vD,{type:`primary`,loading:A,disabled:A,style:{flex:1,height:52,borderRadius:12,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`,fontWeight:600,fontSize:15,border:`none`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.3)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`,position:`relative`,overflow:`hidden`},onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 6px 25px rgba(99, 102, 241, 0.4)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.3)`},children:[(0,$.jsx)(`span`,{style:{position:`relative`,zIndex:1},children:F}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:`-100%`,width:`100%`,height:`100%`,background:`linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent)`,transition:`left 0.5s ease`},onMouseEnter:e=>{e.currentTarget.style.left=`100%`}}),x?.aiSuggestions&&x.aiSuggestions.length>0&&(0,$.jsx)($w,{title:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontWeight:600,marginBottom:8,color:`#6366f1`},children:`AI拆分方案`}),(x?.ai_suggestions||x?.aiSuggestions||[]).map(e=>(0,$.jsxs)(`div`,{style:{marginBottom:8,fontSize:13,lineHeight:1.5},children:[(0,$.jsxs)(`span`,{style:{fontWeight:500,color:`#6366f1`},children:[e.index,`.`]}),(0,$.jsx)(`span`,{style:{marginLeft:4,color:`#000000ff`},children:e.timeNode}),(0,$.jsx)(`br`,{}),(0,$.jsx)(`span`,{style:{color:`#666`},children:e.content})]},e.index))]}),placement:`top`,trigger:`hover`,overlayInnerStyle:{backgroundColor:`#fff`,height:300,overflowY:`auto`,border:`1px solid rgba(99, 102, 241, 0.1)`,borderRadius:12,boxShadow:`0 8px 24px rgba(99, 102, 241, 0.12)`},children:(0,$.jsx)(`span`,{style:{marginLeft:8,fontSize:13,opacity:.9},children:`(AI 镜头拆分方案)`})})]})})]}),(0,$.jsxs)(`div`,{style:{flex:2,background:`linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,display:`flex`,flexDirection:`column`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,background:`linear-gradient(135deg, rgba(99,102,241,0.02) 0%, transparent 100%)`},children:[(0,$.jsx)(`h3`,{style:{fontSize:16,fontWeight:600,color:`#1e293b`,margin:0},children:`拆镜片段列表`}),(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#64748b`,marginLeft:12},children:[`共 `,w.length,` 个片段`]})]}),(0,$.jsx)(f$,{columns:[{title:`片段`,width:100,fixed:`left`,align:`center`,render:(e,t)=>(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontSize:16,fontWeight:600,color:`#333`},children:t.segmentName||`片段${t.segmentIndex||``}`}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#999`},children:t.timeNode}),t.sourceMode===`custom`&&(0,$.jsx)(T$,{color:`blue`,style:{marginTop:6},children:`手动`}),t.sourceMode===`ai_suggestion`&&(0,$.jsx)(T$,{color:`orange`,style:{marginTop:6},children:`自动`})]})},{title:`片段视频`,width:150,align:`center`,render:(e,t)=>(0,$.jsx)(`div`,{style:{position:`relative`,width:120,height:80,borderRadius:6,overflow:`hidden`,background:`#f1f5f9`,cursor:`pointer`},onClick:()=>{console.log(`video clicked:`,t.segmentVideoUrl),t.segmentVideoUrl&&(d(Z9(t.segmentVideoUrl)),p(!0))},children:t.segmentVideoUrl?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:Z9(t.segmentVideoUrl),style:{width:`100%`,height:`100%`,objectFit:`cover`,pointerEvents:`none`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.3)`},children:(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:`50%`,background:`rgba(255,255,255,0.9)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:0,height:0,borderTop:`8px solid transparent`,borderBottom:`8px solid transparent`,borderLeft:`14px solid #6366f1`,marginLeft:2}})})})]}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:12},children:t.splitStatus===`failed`?`切割失败`:`切割中`})})},{title:`视频内容`,width:500,align:`left`,render:(e,t)=>{if(t.source_mode===`ai_suggestion`||t.sourceMode===`ai_suggestion`)return(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,lineHeight:1.6},children:t.segmentContent||t.lastError||`-`});let n=t.analysis_status||t.analysisStatus,r={not_required:`无需单独分析`,pending:`等待分析`,processing:`分析中`,failed:`分析失败`};return n===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(lq,{size:`small`}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):n===`failed`?(0,$.jsx)(`div`,{style:{fontSize:14,color:`#ef4444`,lineHeight:1.6},children:`分析失败`}):(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,lineHeight:1.6},children:n&&r[n]?r[n]:t.segmentContent||t.lastError||`-`})}},{title:`视频类型`,width:120,align:`center`,render:(e,t)=>(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,fontWeight:500},children:t.segmentCategory||`-`})},{title:`状态`,width:120,align:`center`,dataIndex:`moduleProjectStatus`,render:(e,t)=>{let n=e,r=t.moduleProjectCurrentStepCode||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return n||`-`}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#666`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else return t.moduleProjectId?{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#666`}:{text:`待生成任务`,color:`#94a3b8`}})();return typeof i==`string`?(0,$.jsx)(`span`,{style:{fontSize:12,color:`#666`,fontWeight:500},children:i}):(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`操作`,width:140,fixed:`right`,align:`center`,render:(e,n)=>(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:8},children:n.moduleProjectId?(0,$.jsx)(vD,{type:`text`,onClick:()=>t(`/removelens/${n.moduleProjectId}/removefenbu`),style:{color:`#10b981`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`详情任务`}):(0,$.jsx)(vD,{type:`text`,onClick:()=>z(String(n.id),n.segmentName),disabled:!W(n),style:{color:W(n)?`#f59e0b`:`#94a3b8`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:W(n)?`视频生成`:`待切割完成`})})}],dataSource:w,pagination:!1,bordered:!1,rowKey:`id`,scroll:{y:300},style:{flex:1},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`,height:80,overflow:`auto`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(255, 255, 255, 1)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})]})]}):(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{fontSize:16,color:`#999`},children:`加载中...`})})]}),(0,$.jsx)(lne,{open:i,videoUrl:P,title:`手动视频切片`,loading:O,minDuration:Y9,maxDuration:X9,onCancel:()=>a(!1),onConfirm:ne}),(0,$.jsx)(vU,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:18,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`智能视频复刻`}),c&&(0,$.jsxs)(`span`,{style:{fontSize:14,color:`#64748b`},children:[`- `,c]})]}),(0,$.jsx)(vD,{type:`text`,icon:(0,$.jsx)(s5,{}),onClick:B,style:{padding:0,color:`#64748b`,fontSize:14}})]}),placement:`right`,closable:!1,onClose:B,open:n,size:480,styles:{body:{padding:`24px`,background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`},section:{borderRadius:`20px 0 0 20px`,overflow:`hidden`}},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:20},children:[(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsxs)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:[`产品白底图 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12},children:(0,$.jsx)(y0,{listType:`picture-card`,onChange:V,beforeUpload:H,maxCount:1,accept:`image/*`,style:{width:120,height:120,borderRadius:8,border:`2px dashed rgba(99, 102, 241, 0.3)`,background:`rgba(99, 102, 241, 0.02)`},children:!y&&(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:6},children:[(0,$.jsx)(gR,{style:{fontSize:20,color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#64748b`},children:`上传产品图`})]})})})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsxs)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:[`产品名称 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(nK,{value:h,onChange:e=>g(e.target.value),placeholder:`请输入产品名称`,style:{height:44,borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`},maxLength:10,showCount:!0})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsxs)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:[`产品卖点 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(J9,{value:_,onChange:e=>v(e.target.value),placeholder:`请输入产品卖点`,style:{borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`},maxLength:100,showCount:!0,rows:3})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12,marginTop:8},children:(0,$.jsx)(vD,{type:`primary`,onClick:U,loading:E,disabled:E,style:{flex:1,height:48,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,fontWeight:600,fontSize:15,border:`none`,boxShadow:`0 4px 15px rgba(99, 102, 241, 0.3)`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.4)`,e.currentTarget.style.transform=`translateY(-1px)`},onMouseLeave:e=>{e.currentTarget.style.boxShadow=`0 4px 15px rgba(99, 102, 241, 0.3)`,e.currentTarget.style.transform=`translateY(0)`},children:E?`生成中...`:`手动生成`})})]})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`视频预览`})]}),open:f,onCancel:()=>p(!1),afterClose:()=>{m.current&&(m.current.pause(),m.current.currentTime=0)},footer:null,width:640,centered:!0,styles:{body:{padding:24},header:{borderBottom:`1px solid #e0e0e0`,padding:`20px 24px`}},children:(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`},children:(0,$.jsx)(`video`,{ref:m,controls:!0,src:u||``,style:{width:`100%`,maxHeight:420,objectFit:`contain`,backgroundColor:`#000`},playsInline:!0,"webkit-playsinline":!0,autoPlay:!0})})})]})}var{Title:fne,Text:Q9}=Q,{TextArea:pne}=nK;function mne(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function hne(){let e=Je(),{creatID:t}=Qe(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(`image`),[u,d]=(0,S.useState)({}),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(null),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(!1),[b,x]=(0,S.useState)({}),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(5),[j,M]=(0,S.useState)(`16:9`),[N,P]=(0,S.useState)(`480p`),[F,I]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]}),[L,R]=(0,S.useState)([]),[z,B]=(0,S.useState)(1),[V,H]=(0,S.useState)(20),[U,ee]=(0,S.useState)(0),[te,ne]=(0,S.useState)(``),[W,re]=(0,S.useState)({}),[G,K]=(0,S.useState)([]),[q,ie]=(0,S.useState)([]),J=[{id:1,title:`原始素材`,description:`上传原始视频素材`,childId:1},{id:2,title:`生成提示词`,description:`根据素材生成描述词`,childId:2},{id:3,title:`生成产品融合图`,description:`生成产品与场景融合图`,childId:3},{id:4,title:`生成视频提示词`,description:`生成视频生成提示词`,childId:4},{id:5,title:`生成最终视频`,description:`合成最终视频`,childId:5}].map((e,t)=>({...e,status:G[t]?.status||``,id:G[t]?.id||t,output:G[t]?.output||``,engineId:G[t]?.input?.payload?.videoConfig?.engineId||``}));(0,S.useEffect)(()=>{let e=new Set;q.forEach(t=>{let n=J.find(e=>String(e.childId)===t);n&&(n.status===`completed`||n.status===`failed`)&&e.add(t)});for(let t=J.length-1;t>=0;t--)if(J[t].status===`completed`||J[t].status===`failed`){e.add(String(J[t].childId));break}e.size>0?ie(Array.from(e)):ie([])},[G]);let ae=(e,t,n)=>{j7(e,t,n).then(e=>{e.items&&R(e.items),e.total!==void 0&&ee(e.total)}).catch(e=>{})},oe=(e,t)=>{B(e),H(t),ae(e,t,te)},se=()=>{ae(1,20,te)};(0,S.useEffect)(()=>{ae(z,V,te)},[]),(0,S.useEffect)(()=>{l7().then(e=>{if(x(e.engine||{}),e.engine?.video&&e.engine.video.length>0){w(e.engine.video[0].id);let t=e.engine.video[0];I({ratios:t.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions||[`480p`,`720p`,`1080p`],durations:t.supportedDurations||[5,8,10,12,15]})}}).catch(e=>{})},[]),(0,S.useEffect)(()=>()=>{m&&(clearInterval(m),h(null))},[m]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;!t.closest(`.image-settings-trigger`)&&!t.closest(`.image-settings-popover`)&&(E(!1),O(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,S.useEffect)(()=>{console.log(`creatID`,t),t&&L7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},[t]),(0,S.useEffect)(()=>{let e=J[4];e&&e.status!==`completed`&&e.status!==`failed`?m||h(setInterval(ue,3e4)):e&&m&&(clearInterval(m),h(null))},[J]);let ce=(e,t,n,i)=>{l(t||`image`),_(n?String(n):``),t===`video`?(p(i||null),d(e&&typeof e==`object`?mne(e):{}),a(``)):(p(null),a(e||``),d({})),r(!0)},le=async()=>{if(c===`image`){if(!W?.id||!g){Z.warning(`缺少任务或步骤 ID,无法保存图片提示词`);return}if(!i||!i.trim()){Z.warning(`图片提示词不能为空`);return}y(!0);try{await z7(W.id,g,{prompt:i.trim()}),Z.success(`图片提示词已保存`),de(),r(!1),_(``)}catch(e){Z.error(e?.message||`保存图片提示词失败`)}finally{y(!1)}return}if(!W?.id||!g){Z.warning(`缺少任务或步骤 ID,无法保存视频提示词`);return}if(!u||typeof u!=`object`||Object.keys(u).length===0){Z.warning(`视频提示词不能为空`);return}if(!f){Z.warning(`视频提词配置缺失,暂不能保存`);return}let e=T9(u,f);if(e){Z.warning(e);return}y(!0);try{await B7(W.id,g,{prompt_schema:u}),Z.success(`视频提示词已保存`),de(),r(!1),_(``)}catch(e){Z.error(e?.message||`保存视频提示词失败`)}finally{y(!1)}},ue=()=>{t&&L7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},de=()=>{t&&L7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},fe=e=>{R7(W.id,e.toString()).then(e=>{de()}).catch(e=>{})},pe=e=>{V7(W.id,e.toString(),{engine_id:`0019e3dac0b795b925b`,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`}).then(e=>{de()}).catch(e=>{})},me=()=>{V7(W.id,J[1].id.toString(),{engine_id:`0019e3dac0b795b925b`,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`}).then(e=>{de()}).catch(e=>{})},he=e=>{let t={engine_id:C,duration:k,aspect_ratio:j,resolution:N,target_platform:`抖音`};H7(W.id,e.toString(),t).then(e=>{de()}).catch(e=>{})},ge=(e,t)=>{let n={engine_id:t};U7(W.id,e.toString(),n).then(e=>{de()}).catch(e=>{})},_e=()=>{let e={engine_id:J[3].engineId};U7(W.id,J[2].id.toString(),e).then(e=>{de()}).catch(e=>{})};return(0,$.jsxs)(S.Fragment,{children:[(0,$.jsxs)(`div`,{className:`initialinfo-container`,style:{margin:`-24px -32px -32px`,height:`calc(100vh - 34px)`,position:`relative`,boxSizing:`border-box`,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-100,right:-100,width:300,height:300,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,borderRadius:`50%`,pointerEvents:`none`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:-100,left:-100,width:300,height:300,background:`radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%)`,borderRadius:`50%`,pointerEvents:`none`}}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:`2%`,position:`relative`,zIndex:1,minHeight:0},children:[(0,$.jsxs)(`div`,{className:`replication-preview`,style:{flex:4,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,boxSizing:`border-box`},children:[(0,$.jsx)(vD,{type:`text`,icon:(0,$.jsx)(g2,{}),onClick:()=>window.history.back(),style:{color:`#64748b`,borderRadius:10,fontSize:13,height:32,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`},children:`返回`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`拆镜复刻 - 任务详情`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(vD,{type:`primary`,ghost:!0,style:{borderRadius:10,padding:`4px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},onClick:()=>s(!0),children:`创作记录`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`},children:(0,$.jsxs)(`div`,{className:`material_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,alignItems:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:W?.material?.materialVideoUrl?(0,$.jsx)(`video`,{controls:!0,src:`http://ceshi.apiforeign.minzhong.cn${W.material.materialVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无视频`})})]}),(0,$.jsxs)(`div`,{className:`product_img`,style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`产品图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:W?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:W.material.materialImageUrl,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无图片`})})]})]}),W?.finalImageUrl&&(0,$.jsx)(`div`,{style:{marginTop:24},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalImageUrl}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})}),W?.finalVideoUrl&&(0,$.jsx)(`div`,{style:{marginTop:24},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(`video`,{controls:!0,src:`http://ceshi.apiforeign.minzhong.cn${W.finalVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})})]})})]}),(0,$.jsxs)(`div`,{className:`replication-form`,style:{flex:1,minWidth:`450px`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,gap:10,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`生成步骤`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px 16px 16px`},children:(0,$.jsx)(r_,{activeKey:q,onChange:ie,ghost:!0,bordered:!1,style:{background:`transparent`},expandIconPlacement:`end`,items:J.map(e=>({key:String(e.childId),label:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,width:`100%`,justifyContent:`space-between`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:16,height:16},children:e.status===`completed`?(0,$.jsx)(i4,{style:{fontSize:16,color:`#22c55e`}}):e.status===`processing`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,background:`#ef4444`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:`#fff`,fontSize:10},children:`×`})}):(0,$.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:`#cbd5e1`}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:e.status===`processing`||e.status===`waiting_user`?`#6366f1`:`#1e293b`,fontWeight:500},children:e.title}),(e.status===`processing`||e.status===`waiting_user`)&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`,marginLeft:8},children:`生成中`}),e.status===`failed`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`,marginLeft:8},children:`失败`}),e.status===``&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#717d8b`,marginLeft:8},children:`待生成`})]})}),children:(0,$.jsxs)(`div`,{style:{padding:`16px`,background:`linear-gradient(135deg, rgba(248,250,252,0.6) 0%, rgba(238,242,255,0.4) 100%)`,borderRadius:12,marginTop:8,border:`1px solid rgba(99, 102, 241, 0.06)`},children:[e.childId===1&&(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,marginBottom:20,alignItems:`flex-start`,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(Q9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`原视频`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:W?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${W.material.materialVideoUrl}`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10},controls:!0}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,height:`16`,rx:`2`,ry:`2`}),(0,$.jsx)(`path`,{d:`M8 12l4 2 4-2`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无视频`})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(Q9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`产品图片`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:W?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:W.material.materialImageUrl,alt:`产品图片`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10}}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,$.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`,fill:`currentColor`}),(0,$.jsx)(`path`,{d:`M21 15l-5-5L5 21`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无图片`})]})})]}),(0,$.jsx)(vD,{onClick:()=>{Z.info(`正在生成图片提示词,请稍候...`),fe(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片提示词`})]})}),e.childId===2&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(Q9,{style:{color:`#475569`,fontSize:13,lineHeight:1.8,whiteSpace:`pre-wrap`},children:e?.output?.payload?.prompt||`暂无提示词`})}),(0,$.jsxs)(DU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(vD,{type:`default`,icon:(0,$.jsx)(j$,{}),onClick:()=>ce(e?.output?.payload?.prompt,`image`,e.id),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`修改提示词`}),(0,$.jsx)(vD,{onClick:()=>{Z.info(`正在生成图片,请稍候...`),pe(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片`})]})]}),e.childId===3&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`,position:`relative`},children:[W.finalImageUrl?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalImageUrl}`,alt:`融合图`,style:{width:`100%`,height:180,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无融合图`}),(0,$.jsx)(vD,{type:`default`,icon:(0,$.jsx)(j$,{}),onClick:()=>me(),disabled:e.status!==`completed`,style:{position:`absolute`,bottom:8,left:8,borderRadius:8,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:30,fontWeight:500,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(4px)`,padding:`0 12px`,fontSize:12},children:`重新生成`})]}),(0,$.jsx)(`p`,{style:{marginBottom:6,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`视频参数选择:`}),(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{E(!T),O(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(Y6,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(Q9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:b.video?.find(e=>e.id===C)?.name||`选择引擎`})]}),T&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-10,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(Q9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:b.video?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{w(e.id),I({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(j)||M(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(N)||P(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(k)||A(e.supportedDurations?.[0]||5),E(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:C===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:C===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:C===e.id?600:500,color:C===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{O(!D),E(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(j3,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(Q9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[j,` · `,k,`s · `,N]})]}),D&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:F.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>M(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:j===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:j===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${j===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:j===e?`#6366f1`:`#6b7280`,fontWeight:j===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(k-Math.min(...F.durations))/(Math.max(...F.durations)-Math.min(...F.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...F.durations),max:Math.max(...F.durations),value:k,onChange:e=>A(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:k}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:F.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>P(e),style:{flex:1,height:42,borderRadius:6,border:N===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:N===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:N===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(vD,{type:`primary`,style:{width:`100%`,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},onClick:()=>{Z.info(`正在生成视频提示词,请稍候...`),he(e.id)},disabled:e.status!==`completed`,children:`下一步:生成视频提示词`})]}),e.childId===4&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(Q9,{style:{color:`#64748b`,fontSize:13,lineHeight:1.8},children:`视频提词已生成,可点击按钮查看/修改`})}),(0,$.jsxs)(DU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(vD,{type:`default`,icon:(0,$.jsx)(j$,{}),onClick:()=>ce(W?.videoGeneration?.promptSchema,`video`,e.id,W?.videoGeneration?.schemaConfigSnapshot),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`||!W?.videoGeneration?.promptSchema||!W?.videoGeneration?.schemaConfigSnapshot,children:`查看/修改视频提词`}),(0,$.jsx)(vD,{onClick:()=>{Z.info(`正在生成视频,请稍候...`),ge(e.id,e.engineId)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成视频`})]})]}),e.childId===5&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,position:`relative`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},children:e.status===`completed`&&W?.finalVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalVideoUrl}`,style:{width:`100%`,height:180,objectFit:`cover`},controls:!0}):e.status===`processing`?(0,$.jsxs)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:20,height:20,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}),(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontSize:14},children:`视频生成中...`})]}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#ef4444`,fontSize:14},children:`视频生成失败`}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无视频`})}),(0,$.jsxs)(DU,{style:{width:`100%`,gap:12},children:[(0,$.jsx)(vD,{onClick:()=>_e(),type:`default`,icon:(0,$.jsx)(j$,{}),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`重新生成`}),(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(p0,{}),style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,onClick:()=>{let e=`http://ceshi.apiforeign.minzhong.cn${W?.finalVideoUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=`video_${Date.now()}.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},children:`下载视频`})]})]})]})}))})})]})]})]}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:c===`video`?`查看/编辑视频提词`:`修改提示词`})]}),open:n,onCancel:()=>{v||r(!1)},footer:[(0,$.jsx)(vD,{onClick:()=>r(!1),disabled:v,style:{borderRadius:8},children:`取消`},`cancel`),(0,$.jsx)(vD,{type:`primary`,onClick:le,loading:v,disabled:v,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`确认`},`confirm`)],width:800,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`},body:{background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,padding:`20px 24px`}},children:c===`image`?(0,$.jsx)(pne,{value:i,onChange:e=>a(e.target.value),rows:8,style:{width:`100%`,height:300,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},placeholder:`请输入提示词`}):(0,$.jsx)(`div`,{style:{maxHeight:500,overflowY:`auto`,paddingRight:10},children:(0,$.jsx)(M9,{value:u,schemaConfigSnapshot:f,onChange:d})})}),(0,$.jsxs)(Pq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`创作记录`})]}),open:o,onCancel:()=>s(!1),width:800,footer:null,styles:{body:{background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginBottom:16,gap:8},children:[(0,$.jsx)(nK,{placeholder:`搜索产品名称`,value:te,onChange:e=>ne(e.target.value),onPressEnter:se,style:{width:200,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,height:40}}),(0,$.jsx)(vD,{type:`primary`,onClick:se,style:{borderRadius:10,height:40,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%)`,backdropFilter:`blur(20px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(f$,{columns:[{title:`产品名称`,dataIndex:`title`,key:`title`,render:e=>(0,$.jsx)(`span`,{style:{fontSize:14,color:`#1e293b`,fontWeight:500},children:e})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:13,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,render:t=>(0,$.jsx)(vD,{type:`text`,onClick:()=>e(`/removelens/${t.id}/removeinfo`),style:{color:`#6366f1`,fontSize:13,padding:`4px 12px`,borderRadius:6,background:`rgba(99, 102, 241, 0.1)`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`},children:`查看详情`})}],dataSource:L,rowKey:`id`,pagination:{current:z,pageSize:V,total:U,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:oe,style:{padding:`16px 24px`,borderTop:`1px solid rgba(99, 102, 241, 0.1)`}},style:{fontSize:13},scroll:{y:350},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(99, 102, 241, 0.03)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})})]})]})}var{RangePicker:gne}=FH,$9=e=>e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),_ne=()=>{let e=Je(),[t]=Dn(),{message:n}=wx.useApp(),[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)(0),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(!1),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)([]),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(1),[x,C]=(0,S.useState)(10),[w,T]=(0,S.useState)(t.get(`accountId`)||``),[E,D]=(0,S.useState)(),[O,k]=(0,S.useState)((0,ED.default)().subtract(1,`day`).format(`YYYY-MM-DD`)),[A,j]=(0,S.useState)(``);(0,S.useEffect)(()=>{N(),M()},[]);let M=async(e=1,t=10,r,a)=>{c(!0);try{let n=await J7({advertiser_id:a??w,consume_date:r??E,page:e,page_size:t});i(n.data||[]),o(n.pagination?.total||0),b(n.pagination?.page||1),C(n.pagination?.pageSize||10)}catch{n.error(`加载数据失败`)}finally{c(!1)}},N=async()=>{try{let e=((await X7()).data||[]).map(e=>({name:$9(e.field),description:e.description}));m(e);let t=localStorage.getItem(`consumeColumns`);g(t?JSON.parse(t):e.map(e=>e.name))}catch{n.error(`加载表头字段失败`)}},P=r.map((e,t)=>({...e,index:t+1,key:e.id})),F=()=>{e(`/authorization`)},I=()=>{b(1),M(1,x)},L=()=>{T(``),D(void 0),b(1),M(1,x,null,``)},R=()=>{Pq.confirm({title:`拉取消耗数据`,content:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8},children:`同步日期:`}),(0,$.jsx)(FH,{value:(0,ED.default)(O),onChange:e=>k(e?e.format(`YYYY-MM-DD`):(0,ED.default)().subtract(1,`day`).format(`YYYY-MM-DD`)),style:{width:`100%`}})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8},children:`广告主ID(可选):`}),(0,$.jsx)(nK,{placeholder:`不指定则同步所有授权的广告主`,value:A,onChange:e=>j(e.target.value)})]})]}),onOk:async()=>{u(!0);try{await Y7({date:O,advertiser_id:A||void 0}),n.success(`拉取消耗数据成功`),M(y,x)}catch{n.error(`拉取消耗数据失败`)}finally{u(!1)}},okText:`开始拉取`,cancelText:`取消`})},z=h.map(e=>p.find(t=>t.name===e)).filter(e=>!!e).map(e=>({title:e.description,dataIndex:e.name,key:e.name,ellipsis:!0}));return(0,$.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(vD,{type:`text`,icon:(0,$.jsx)(g2,{}),onClick:F}),(0,$.jsx)(B4,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`消耗记录`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(nK,{placeholder:`广告主ID`,value:w,onChange:e=>T(e.target.value),style:{width:180},onPressEnter:()=>{b(1),M(1,x)}}),(0,$.jsx)(gne,{value:E?[(0,ED.default)(E[0]),(0,ED.default)(E[1])]:void 0,onChange:e=>{e&&e[0]&&e[1]?D([e[0].format(`YYYY-MM-DD`),e[1].format(`YYYY-MM-DD`)]):D(void 0)}}),(0,$.jsx)(vD,{type:`primary`,size:`medium`,onClick:I,children:`搜索`}),(0,$.jsx)(vD,{size:`medium`,onClick:L,children:`重置`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(vD,{icon:(0,$.jsx)(S8,{}),onClick:R,loading:l,style:{borderRadius:8},children:`拉取消耗`}),(0,$.jsx)(vD,{icon:(0,$.jsx)(Y6,{}),onClick:()=>f(!0),style:{borderRadius:8},children:`自定义表头`})]})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(f$,{dataSource:P,columns:z,loading:s,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(HK,{current:y,pageSize:x,total:a,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{b(e),C(t),M(e,t)},size:`small`})})]}),(0,$.jsx)(Pq,{title:`自定义表头`,open:d,onOk:()=>{localStorage.setItem(`consumeColumns`,JSON.stringify(h)),n.success(`表头设置已保存`),f(!1)},onCancel:()=>{f(!1),v(``)},okText:`确定`,cancelText:`取消`,width:800,children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,height:400},children:[(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(nK,{placeholder:`搜索指标...`,value:_,allowClear:!0,onChange:e=>v(e.target.value),style:{marginBottom:8}}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:12,marginBottom:12,display:`block`},children:`输入指标名称进行搜索`}),(0,$.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:[(0,$.jsx)(`div`,{style:{marginBottom:16},children:(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:`任务详情指标`})}),(0,$.jsx)(aV,{checked:h.length===p.length&&p.length>0,indeterminate:h.length>0&&h.length{e.target.checked?g(p.map(e=>e.name)):g([])},style:{marginBottom:12},children:`全选`}),(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:8},children:p.filter(e=>e.description.toLowerCase().includes(_.toLowerCase())||e.name.toLowerCase().includes(_.toLowerCase())).map(e=>(0,$.jsx)(aV,{checked:h.includes(e.name),onChange:t=>{t.target.checked?g(t=>[...t,e.name]):g(t=>t.filter(t=>t!==e.name))},children:e.description},e.name))})]})]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:[`已添加(`,h.length,`)`]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,$.jsx)(vD,{size:`small`,onClick:()=>g([]),disabled:h.length===0,children:`清空`}),(0,$.jsx)(vD,{size:`small`,onClick:async()=>{try{let e=((await X7()).data||[]).map(e=>({name:$9(e.field),description:e.description}));m(e),g(e.map(e=>e.name)),localStorage.removeItem(`consumeColumns`),n.success(`表头字段已更新`)}catch{n.error(`更新表头字段失败`)}},children:`更新表头字段`})]})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:h.length===0?(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:14,textAlign:`center`,display:`block`,padding:`40px 0`},children:`暂无已选指标`}):(0,$.jsx)(`div`,{children:h.map((e,t)=>{let n=p.find(t=>t.name===e);return(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`8px 12px`,borderBottom:`1px solid #f0f0f5`,cursor:`move`,userSelect:`none`},draggable:!0,onDragStart:e=>{e.dataTransfer.setData(`index`,String(t))},onDragOver:e=>{e.preventDefault()},onDrop:e=>{let n=parseInt(e.dataTransfer.getData(`index`)),r=t;if(n!==r){let e=[...h],[t]=e.splice(n,1);e.splice(r,0,t),g(e)}},children:[(0,$.jsx)(Q.Text,{children:n?.description||e}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:12},children:t+1})]},e)})})})]})]})})]})},vne=()=>{let e=Je(),[t]=Dn(),{message:n}=wx.useApp(),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!0),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(``);(0,S.useEffect)(()=>{let r=t.get(`auth_code`),a=t.get(`state`);if(!r||!a){o(!1),i(10);return}let s={auth_code:r,state:a,app_id:t.get(`app_id`)||void 0,material_auth_status:t.get(`material_auth_status`)||void 0,scope:t.get(`scope`)||void 0,uid:t.get(`uid`)||void 0};(async()=>{try{let t=await T7(s);c(!0),o(!1),n.success(t?.message||`授权成功`),setTimeout(()=>{e(`/authorization`)},1500)}catch(e){let t=e?.message||`授权失败`;u(t),o(!1),n.error(t)}})();let l=setInterval(()=>{i(e=>e>=11?(o(!1),e):e+1)},1e3);return()=>{clearInterval(l)}},[e,t,n]);let d=()=>{i(0),o(!0),c(!1),u(``),window.location.href=`/authorization`};return s?(0,$.jsx)(`div`,{style:{minHeight:`100vh`,display:`flex`,justifyContent:`center`,alignItems:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`60px 80px`,background:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.1)`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,background:`#dcfce7`,borderRadius:`50%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`0 auto 24px`},children:(0,$.jsx)(Q.Text,{style:{fontSize:40,color:`#22c55e`},children:`✓`})}),(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#1e293b`},children:`授权成功`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`},children:`正在跳转至授权管理页面...`})]})}):(0,$.jsx)(`div`,{style:{minHeight:`100vh`,display:`flex`,justifyContent:`center`,alignItems:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`60px 80px`,background:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.1)`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:`50%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`0 auto 24px`},children:a&&r<10?(0,$.jsx)(lq,{size:`large`,tip:`加载中`,style:{color:`#fff`}}):(0,$.jsx)(OH,{style:{fontSize:40,color:`#fff`}})}),l?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#ef4444`},children:`授权失败`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:l}),(0,$.jsx)(vD,{type:`primary`,size:`large`,icon:(0,$.jsx)(bJ,{}),onClick:d,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600,padding:`12px 32px`},children:`重新授权`})]}):r>=10?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#ef4444`},children:`授权无响应`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:`请重新授权`}),(0,$.jsx)(vD,{type:`primary`,size:`large`,icon:(0,$.jsx)(bJ,{}),onClick:d,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600,padding:`12px 32px`},children:`重新授权`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#1e293b`},children:`授权中,请等待`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:`正在等待平台完成授权操作`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8},children:[(0,$.jsx)(OH,{style:{color:`#6366f1`}}),(0,$.jsxs)(Q.Text,{style:{color:`#6366f1`,fontWeight:500,fontSize:16},children:[r,`s`]})]})]})]})})},yne=()=>(0,$.jsxs)(`div`,{style:{padding:`20px 0`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:32},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:14,background:`linear-gradient(135deg, #f59e0b 0%, #d97706 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(245,158,11,0.3)`},children:(0,$.jsx)(j2,{style:{fontSize:22,color:`#fff`}})}),(0,$.jsx)(`div`,{children:(0,$.jsxs)(Q.Title,{level:2,style:{margin:0,color:`#1e293b`,fontWeight:700},children:[`行业爆款大盘`,(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontSize:14,fontWeight:400,marginLeft:8},children:`发现热门素材趋势`})]})})]}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`},children:`实时追踪各行业爆款素材,把握创作风向,打造热门内容`})]}),(0,$.jsxs)(Oz,{bordered:!1,style:{borderRadius:20,background:`linear-gradient(135deg, rgba(245,158,11,0.04) 0%, rgba(217,119,6,0.04) 100%)`,border:`1px solid rgba(245,158,11,0.1)`,padding:10,marginBottom:32},children:[(0,$.jsxs)(Q.Title,{level:4,style:{marginBottom:20,color:`#1e293b`},children:[(0,$.jsx)(Q4,{style:{marginRight:8,color:`#f59e0b`}}),`行业热度排行`]}),(0,$.jsx)(Oz,{bordered:!1,style:{borderRadius:16,background:`#fafafa`,padding:40,textAlign:`center`},children:(0,$.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:14},children:`敬请期待行业热度排行`})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:[(0,$.jsxs)(Q.Title,{level:4,style:{margin:0,color:`#1e293b`},children:[(0,$.jsx)(L8,{style:{marginRight:8,color:`#6366f1`}}),`爆款素材榜单`]}),(0,$.jsxs)(vD,{type:`primary`,size:`middle`,onClick:()=>{Z.info(`请联系客服开通`)},style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:[(0,$.jsx)(L3,{style:{marginRight:6}}),`立即解锁全部`]})]}),(0,$.jsx)(Oz,{bordered:!1,style:{borderRadius:16,background:`#fafafa`,padding:40,textAlign:`center`},children:(0,$.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:14},children:`敬请期待更多爆款素材`})})]}),bne=()=>{let e=()=>{Z.info(`请联系客服开通`)},t=[{icon:(0,$.jsx)(j8,{style:{fontSize:28,color:`#8b5cf6`}}),title:`AI智能生成`,description:`先进的AI技术,一键生成高质量视频内容`},{icon:(0,$.jsx)(S6,{style:{fontSize:28,color:`#ec4899`}}),title:`多格式输出`,description:`支持多种视频格式,满足不同场景需求`},{icon:(0,$.jsx)(i4,{style:{fontSize:28,color:`#10b981`}}),title:`品质保证`,description:`专业级画质,细节清晰,色彩鲜艳`},{icon:(0,$.jsx)(u3,{style:{fontSize:28,color:`#f59e0b`}}),title:`创意无限`,description:`丰富的模板和风格,激发创作灵感`}];return(0,$.jsxs)(`div`,{style:{padding:`20px 0`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:32},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:14,background:`linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(139,92,246,0.3)`},children:(0,$.jsx)(i3,{style:{fontSize:22,color:`#fff`}})}),(0,$.jsx)(`div`,{children:(0,$.jsxs)(Q.Title,{level:2,style:{margin:0,color:`#1e293b`,fontWeight:700},children:[`创意素材案例`,(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontSize:14,fontWeight:400,marginLeft:8},children:`探索AI创作无限可能`})]})})]}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`},children:`精选AI生成的优秀素材案例,展示AI创作的无限潜力与创意灵感`})]}),(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, 1fr)`,gap:20,marginBottom:32},children:t.map((e,t)=>(0,$.jsx)(Oz,{bordered:!1,style:{borderRadius:16,background:`linear-gradient(135deg, rgba(139,92,246,0.04) 0%, rgba(99,102,241,0.04) 100%)`,border:`1px solid rgba(139,92,246,0.1)`,padding:20},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(`div`,{style:{marginBottom:16},children:e.icon}),(0,$.jsx)(Q.Title,{level:4,style:{marginBottom:8,color:`#1e293b`},children:e.title}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13},children:e.description})]})},t))}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:[(0,$.jsxs)(Q.Title,{level:4,style:{margin:0,color:`#1e293b`},children:[(0,$.jsx)(y8,{style:{marginRight:8,color:`#f59e0b`}}),`精选案例展示`]}),(0,$.jsxs)(vD,{type:`primary`,size:`middle`,onClick:e,style:{borderRadius:10,background:`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`,border:`none`},children:[(0,$.jsx)(L3,{style:{marginRight:6}}),`解锁全部案例`]})]}),(0,$.jsx)(Oz,{bordered:!1,style:{borderRadius:16,background:`#fafafa`,padding:40,textAlign:`center`},children:(0,$.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:14},children:`敬请期待更多创意案例`})})]})},xne=({children:e})=>{let{user:t,loading:n,checkAuth:r}=$7();return(0,S.useEffect)(()=>{!localStorage.getItem(`auth_token`)&&!n&&!t&&(window.location.href=`/login`)},[t,n]),n?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,$.jsx)(lq,{size:`large`})}):t?(0,$.jsx)($.Fragment,{children:e}):(window.location.href=`/login`,null)};(0,_.createRoot)(document.getElementById(`root`)).render((0,$.jsx)(()=>{let{checkAuth:e}=$7();return(0,S.useEffect)(()=>{e()},[]),(0,$.jsx)(Nm,{locale:O0.default,theme:{token:{colorPrimary:`#6366f1`,borderRadius:8,fontFamily:`'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif`},components:{Button:{controlHeight:36,controlHeightLG:44},Card:{boxShadow:`0 1px 3px rgba(0,0,0,0.04)`},Table:{headerBg:`#fafbfc`}}},children:(0,$.jsx)(wx,{children:(0,$.jsx)(gn,{children:(0,$.jsxs)(Et,{children:[(0,$.jsx)(wt,{path:`/login`,element:(0,$.jsx)(fte,{})}),(0,$.jsxs)(wt,{path:`/`,element:(0,$.jsx)(xne,{children:(0,$.jsx)(ute,{})}),children:[(0,$.jsx)(wt,{index:!0,element:(0,$.jsx)(St,{to:`/projects`,replace:!0})}),(0,$.jsx)(wt,{path:`projects`,element:(0,$.jsx)(mte,{})}),(0,$.jsx)(wt,{path:`projects/:projectId/generate`,element:(0,$.jsx)(gte,{})}),(0,$.jsx)(wt,{path:`records`,element:(0,$.jsx)(_te,{})}),(0,$.jsx)(wt,{path:`credits`,element:(0,$.jsx)(vte,{})}),(0,$.jsx)(wt,{path:`credit-records`,element:(0,$.jsx)(d9,{})}),(0,$.jsx)(wt,{path:`order-records`,element:(0,$.jsx)(d9,{})}),(0,$.jsx)(wt,{path:`user-center`,element:(0,$.jsx)(d9,{})}),(0,$.jsx)(wt,{path:`messages`,element:(0,$.jsx)(xte,{})}),(0,$.jsx)(wt,{path:`conversation`,element:(0,$.jsx)(Ote,{})}),(0,$.jsx)(wt,{path:`initial`,element:(0,$.jsx)(Mte,{})}),(0,$.jsx)(wt,{path:`initial/:creatID/initialinfo`,element:(0,$.jsx)(Rte,{})}),(0,$.jsx)(wt,{path:`removelens`,element:(0,$.jsx)(zte,{})}),(0,$.jsx)(wt,{path:`removelens/:creatID/removeinfo`,element:(0,$.jsx)(dne,{})}),(0,$.jsx)(wt,{path:`removelens/:creatID/removefenbu`,element:(0,$.jsx)(hne,{})}),(0,$.jsx)(wt,{path:`generated`,element:(0,$.jsx)(Ute,{})}),(0,$.jsx)(wt,{path:`pretest`,element:(0,$.jsx)(Kte,{})}),(0,$.jsx)(wt,{path:`authorization`,element:(0,$.jsx)(Jte,{})}),(0,$.jsx)(wt,{path:`authoriza-waiting`,element:(0,$.jsx)(vne,{})}),(0,$.jsx)(wt,{path:`materials`,element:(0,$.jsx)(ene,{})}),(0,$.jsx)(wt,{path:`consume`,element:(0,$.jsx)(_ne,{})}),(0,$.jsx)(wt,{path:`popular`,element:(0,$.jsx)(yne,{})}),(0,$.jsx)(wt,{path:`creativeplaza`,element:(0,$.jsx)(bne,{})})]}),(0,$.jsx)(wt,{path:`*`,element:(0,$.jsx)(St,{to:`/projects`,replace:!0})})]})})})})},{})); \ No newline at end of file diff --git a/video-gen-app/dist/index.html b/video-gen-app/dist/index.html index 69ebb89d..29166543 100644 --- a/video-gen-app/dist/index.html +++ b/video-gen-app/dist/index.html @@ -1,37 +1,37 @@ - - - - - - - - - - 民众智创 - - + + + + + + + + + + 民众智创 + + - - -
- - + + +
+ + diff --git a/video-gen-app/src/api/index.ts b/video-gen-app/src/api/index.ts index c0abf845..9f130277 100644 --- a/video-gen-app/src/api/index.ts +++ b/video-gen-app/src/api/index.ts @@ -666,6 +666,19 @@ export async function getMaterialConsumptionFields(): Promise { return api.get('/material-consumption/fields'); } +// ── Contact ──────────────────────────────────────────────── +export interface ContactRequestParams { + phone: string; + company_name: string; + industry: string; + name: string; + message?: string; +} + +export async function createContactRequest(params: ContactRequestParams): Promise { + return api.post('/contact/request', params); +} + // 查询上传素材列表 export interface ResourcesMaterialListParams { advertiser_id?: string; diff --git a/video-gen-app/src/components/Layout/AppLayout.tsx b/video-gen-app/src/components/Layout/AppLayout.tsx index 8d9ea393..19aaeb4b 100644 --- a/video-gen-app/src/components/Layout/AppLayout.tsx +++ b/video-gen-app/src/components/Layout/AppLayout.tsx @@ -53,10 +53,13 @@ import { ApiOutlined, DatabaseOutlined, CloudServerOutlined, + MessageOutlined, + DownOutlined, + InfoOutlined, } from '@ant-design/icons'; import { Outlet, useNavigate, useLocation } from 'react-router-dom'; import { useAuthStore } from '../../store/useAuthStore'; -import { getMenuConfigs, getRechargePackages, getPaymentMethods, createRechargeOrder, getPaymentOrder, cancelPaymentOrder, getSiteInfo, getUnreadCount } from '../../api'; +import { getMenuConfigs, getRechargePackages, getPaymentMethods, createRechargeOrder, getPaymentOrder, cancelPaymentOrder, getSiteInfo, getUnreadCount, createContactRequest } from '../../api'; import NotificationPopup from '../NotificationPopup'; interface MenuConfig { @@ -167,6 +170,10 @@ const AppLayout: React.FC = () => { const countdownTimerRef = useRef | null>(null); const currentOrderNoRef = useRef(null); const [enabledMethods, setEnabledMethods] = useState<{ alipay: boolean; wechat: boolean }>({ alipay: false, wechat: false }); + const [contactModalOpen, setContactModalOpen] = useState(false); + const [contactForm] = Form.useForm(); + const [contactExpanded, setContactExpanded] = useState(true); + const [submittingContact, setSubmittingContact] = useState(false); // LocalStorage keys const PENDING_ORDER_KEY = 'pending_payment_order'; @@ -316,6 +323,31 @@ const AppLayout: React.FC = () => { setRechargeModalOpen(true); }; + const handleContactSubmit = async () => { + if (!user) { + message.warning('请先登录'); + return; + } + try { + const values = await contactForm.validateFields(); + setSubmittingContact(true); + await createContactRequest({ + phone: values.phone, + company_name: values.companyName, + industry: values.industry, + name: values.name, + message: values.message, + }); + message.success('提交成功,我们会尽快与您联系'); + setContactModalOpen(false); + contactForm.resetFields(); + } catch (err: any) { + message.error(err?.message || '提交失败'); + } finally { + setSubmittingContact(false); + } + }; + const stopPolling = useCallback(() => { if (pollingTimerRef.current) { clearInterval(pollingTimerRef.current); @@ -674,6 +706,20 @@ const AppLayout: React.FC = () => { 当前积分余额 {user?.credits ?? 0} +
+ + + 当前后台仅支持支付宝/微信扫码充值,如需转账支付请联系我们 + +
{rechargeOptions.map((opt, idx) => { const g = GRADIENTS[idx % GRADIENTS.length]; @@ -958,6 +1004,173 @@ const AppLayout: React.FC = () => { + + {/* Contact Button */} +
+
+ {contactExpanded && ( +
+
+ + 联系我们 +
+
+
商务咨询
+
400-888-8888
+
+ +
+ )} + +
+
+ + {/* Contact Modal */} + 联系我们} + open={contactModalOpen} + onCancel={() => { setContactModalOpen(false); contactForm.resetFields(); }} + footer={null} + width={480} + > +
+
+ + + + + + + + + + + + + + + + +
+ + +
+
+
+ ); }; From 24fac8fc1bee7a315b2f7f96cf48cf76294cdca9 Mon Sep 17 00:00:00 2001 From: wwwwwwwww <526125649@qq.com> Date: Fri, 26 Jun 2026 12:00:08 +0800 Subject: [PATCH 2/7] 1 --- .../{index-C1APw6hP.js => index-DHcd1Fwz.js} | 98 +++++------ video-gen-admin/dist/index.html | 2 +- .../src/pages/AdminContactRequests.tsx | 164 +++++++++--------- .../{index-Di-nQw13.js => index-B5mkO6qz.js} | 2 +- video-gen-app/dist/index.html | 2 +- .../src/components/Layout/AppLayout.tsx | 81 +++------ 6 files changed, 157 insertions(+), 192 deletions(-) rename video-gen-admin/dist/assets/{index-C1APw6hP.js => index-DHcd1Fwz.js} (88%) rename video-gen-app/dist/assets/{index-Di-nQw13.js => index-B5mkO6qz.js} (97%) diff --git a/video-gen-admin/dist/assets/index-C1APw6hP.js b/video-gen-admin/dist/assets/index-DHcd1Fwz.js similarity index 88% rename from video-gen-admin/dist/assets/index-C1APw6hP.js rename to video-gen-admin/dist/assets/index-DHcd1Fwz.js index afcdfcae..90d80743 100644 --- a/video-gen-admin/dist/assets/index-C1APw6hP.js +++ b/video-gen-admin/dist/assets/index-DHcd1Fwz.js @@ -207,46 +207,46 @@ html body { &${o}-slide-down-leave${o}-slide-down-leave-active${t}-placement-bottom, &${o}-slide-down-leave${o}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:Ph},[`&${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-topLeft, &${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-top, - &${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-topRight`]:{animationName:Ih}}},uw(e,h,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${n}`]:{position:`relative`,margin:0},[`${n}-submenu-popup`]:{position:`absolute`,zIndex:r,background:`transparent`,boxShadow:`none`,transformOrigin:`0 0`,"ul, li":{listStyle:`none`,margin:0}},[`${t}, ${t}-menu-submenu`]:{...Jc(e),[n]:{padding:d,listStyleType:`none`,backgroundColor:h,backgroundClip:`padding-box`,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,...Qc(e),"&:empty":{padding:0,boxShadow:`none`},[`${n}-item-group-title`]:{padding:`${Y(l)} ${Y(m)}`,color:e.colorTextDescription,transition:`all ${c}`},[`${n}-item`]:{position:`relative`,display:`flex`,alignItems:`center`},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:`auto`,"&-with-extra":{display:`inline-flex`,alignItems:`center`,width:`100%`},"> a":{color:`inherit`,transition:`all ${c}`,"&:hover":{color:`inherit`},"&::after":{position:`absolute`,inset:0,content:`""`}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:`auto`,fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:{display:`flex`,margin:0,padding:`${Y(l)} ${Y(m)}`,color:e.colorText,fontWeight:`normal`,fontSize:u,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${c}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...Qc(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:`not-allowed`,"&:hover":{color:f,backgroundColor:h,cursor:`not-allowed`},a:{pointerEvents:`none`}},"&-divider":{height:1,margin:`${Y(e.marginXXS)} 0`,overflow:`hidden`,lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:`absolute`,insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:`0 !important`,color:e.colorIcon,fontSize:p,fontStyle:`normal`}}},[`${n}-item-group-list`]:{margin:`0 ${Y(e.marginXS)}`,padding:0,listStyle:`none`},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(m).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:`relative`},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:h,cursor:`not-allowed`}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[Hh(e,`slide-up`),Hh(e,`slide-down`),Mh(e,`move-up`),Mh(e,`move-down`),rg(e,`zoom-big`)]]},Qee=rl(`Dropdown`,e=>{let{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:i}=e,a=gs(e,{menuCls:`${i}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[Zee(a),Xee(a)]},e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...cw({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...ow(e)}),{resetStyle:!1}),KE=e=>{let{menu:t,arrow:n,prefixCls:r,children:i,trigger:a,disabled:o,dropdownRender:s,popupRender:c,getPopupContainer:l,overlayClassName:u,rootClassName:d,overlayStyle:f,open:p,onOpenChange:m,mouseEnterDelay:h=.15,mouseLeaveDelay:g=.1,autoAdjustOverflow:_=!0,placement:v=``,transitionName:y,classNames:b,styles:x,destroyPopupOnHide:C,destroyOnHidden:w}=e,{getPrefixCls:T,direction:E,getPopupContainer:D,className:O,style:k,classNames:A,styles:j}=li(`dropdown`),M={...e,mouseEnterDelay:h,mouseLeaveDelay:g,autoAdjustOverflow:_},[N,P]=Fd([A,b],[j,x],{props:M}),F={...k,...f,...P.root},I=c||s;Dr(`Dropdown`);let L=S.useMemo(()=>{let e=T();return y===void 0?v.includes(`top`)?`${e}-slide-down`:`${e}-slide-up`:y},[T,v,y]),R=S.useMemo(()=>v?v.includes(`Center`)?v.slice(0,v.indexOf(`Center`)):v:E===`rtl`?`bottomRight`:`bottomLeft`,[v,E]),z=T(`dropdown`,r),B=bf(z),[V,H]=Qee(z,B),[,U]=Kc(),W=S.Children.only(vd(i)?S.createElement(`span`,null,i):i),ee=Pp(W,{className:J(`${z}-trigger`,{[`${z}-rtl`]:E===`rtl`},W.props.className),disabled:W.props.disabled??o}),te=o?[]:a,ne=!!te?.includes(`contextMenu`),[re,ie]=Hn(!1,p),ae=In(e=>{m?.(e,{source:`trigger`}),ie(e)}),G=J(u,d,V,H,B,O,N.root,{[`${z}-rtl`]:E===`rtl`}),oe=hw({arrowPointAtCenter:hd(n)&&n.pointAtCenter,autoAdjustOverflow:_,offset:U.marginXXS,arrowWidth:n?U.sizePopupArrow:0,borderRadius:U.borderRadius}),K=In(()=>{t?.selectable&&t?.multiple||(m?.(!1,{source:`menu`}),ie(!1))}),se=()=>{let e=Sr(N,[`root`]),n=Sr(P,[`root`]),r;return t?.items&&(r=S.createElement(GE,{...t,classNames:{...e,subMenu:{...e}},styles:{...n,subMenu:{...n}}})),I&&(r=I(r)),r=S.Children.only(typeof r==`string`?S.createElement(`span`,null,r):r),S.createElement(PE,{prefixCls:`${z}-menu`,rootClassName:J(H,B),expandIcon:S.createElement(`span`,{className:`${z}-menu-submenu-arrow`},E===`rtl`?S.createElement(Hw,{className:`${z}-menu-submenu-arrow-icon`}):S.createElement(mg,{className:`${z}-menu-submenu-arrow-icon`})),mode:`vertical`,selectable:!1,onClick:K,validator:({mode:e})=>{}},r)},[ce,q]=Yd(`Dropdown`,F.zIndex),le=S.createElement(Zw,{alignPoint:ne,...Sr(e,[`rootClassName`,`onOpenChange`]),mouseEnterDelay:h,mouseLeaveDelay:g,visible:re,builtinPlacements:oe,arrow:!!n,overlayClassName:G,prefixCls:z,getPopupContainer:l||D,transitionName:L,trigger:te,overlay:se,placement:R,onVisibleChange:ae,overlayStyle:{...F,zIndex:ce},autoDestroy:w??C},ee);return ce&&(le=S.createElement(Ud.Provider,{value:q},le)),le},$ee=cx(KE,`align`,void 0,`dropdown`,e=>e);KE._InternalPanelDoNotUseOrYouWillBeFired=e=>S.createElement($ee,{...e},S.createElement(`span`,null));var qE=Zg,JE=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e){(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekday=r()})(e,(function(){return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,n=this.$W,r=(n{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_localeData=r()})(e,(function(){return function(e,t,n){var r=t.prototype,i=function(e){return e&&(e.indexOf?e:e.s)},a=function(e,t,n,r,a){var o=e.name?e:e.$locale(),s=i(o[t]),c=i(o[n]),l=s||c.map((function(e){return e.slice(0,r)}));if(!a)return l;var u=o.weekStart;return l.map((function(e,t){return l[(t+(u||0))%7]}))},o=function(){return n.Ls[n.locale()]},s=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}(e.formats[t.toUpperCase()])},c=function(){var e=this;return{months:function(t){return t?t.format(`MMMM`):a(e,`months`)},monthsShort:function(t){return t?t.format(`MMM`):a(e,`monthsShort`,`months`,3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format(`dddd`):a(e,`weekdays`)},weekdaysMin:function(t){return t?t.format(`dd`):a(e,`weekdaysMin`,`weekdays`,2)},weekdaysShort:function(t){return t?t.format(`ddd`):a(e,`weekdaysShort`,`weekdays`,3)},longDateFormat:function(t){return s(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return c.bind(this)()},n.localeData=function(){var e=o();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(t){return s(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return a(o(),`months`)},n.monthsShort=function(){return a(o(),`monthsShort`,`months`,3)},n.weekdays=function(e){return a(o(),`weekdays`,null,null,e)},n.weekdaysShort=function(e){return a(o(),`weekdaysShort`,`weekdays`,3,e)},n.weekdaysMin=function(e){return a(o(),`weekdaysMin`,`weekdays`,2,e)}}}))})),nte=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekOfYear=r()})(e,(function(){var e=`week`,t=`year`;return function(n,r,i){var a=r.prototype;a.week=function(n){if(n===void 0&&(n=null),n!==null)return this.add(7*(n-this.week()),`day`);var r=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var a=i(this).startOf(t).add(1,t).date(r),o=i(this).endOf(e);if(a.isBefore(o))return 1}var s=i(this).startOf(t).date(r).startOf(e).subtract(1,`millisecond`),c=this.diff(s,e,!0);return c<0?i(this).startOf(`week`).week():Math.ceil(c)},a.weeks=function(e){return e===void 0&&(e=null),this.week(e)}}}))})),rte=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekYear=r()})(e,(function(){return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return t===1&&e===11?n+1:e===0&&t>=52?n-1:n}}}))})),ite=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),ate=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),YE=c(JE()),ote=c(ete()),ste=c(tte()),cte=c(nte()),lte=c(rte()),ute=c(ite()),dte=c(ate());YE.default.extend(dte.default),YE.default.extend(ute.default),YE.default.extend(ote.default),YE.default.extend(ste.default),YE.default.extend(cte.default),YE.default.extend(lte.default),YE.default.extend(function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=(e||``).replace(`Wo`,`wo`);return r.bind(this)(t)}});var fte={bn_BD:`bn-bd`,by_BY:`be`,en_GB:`en-gb`,en_US:`en`,fr_BE:`fr`,fr_CA:`fr-ca`,hy_AM:`hy-am`,kmr_IQ:`ku`,nl_BE:`nl-be`,pt_BR:`pt-br`,zh_CN:`zh-cn`,zh_HK:`zh-hk`,zh_TW:`zh-tw`},XE=function(e){return fte[e]||e.split(`_`)[0]},ZE=function(e){return!YE.default.isDayjs(e)||e instanceof YE.default?e:(0,YE.default)(e.valueOf())},QE={getNow:function(){var e=(0,YE.default)();return typeof e.tz==`function`?e.tz():e},getFixedDate:function(e){return(0,YE.default)(e,[`YYYY-M-DD`,`YYYY-MM-DD`])},getEndDate:function(e){return ZE(e).endOf(`month`)},getWeekDay:function(e){var t=ZE(e).locale(`en`);return t.weekday()+t.localeData().firstDayOfWeek()},getYear:function(e){return ZE(e).year()},getMonth:function(e){return ZE(e).month()},getDate:function(e){return ZE(e).date()},getHour:function(e){return ZE(e).hour()},getMinute:function(e){return ZE(e).minute()},getSecond:function(e){return ZE(e).second()},getMillisecond:function(e){return ZE(e).millisecond()},addYear:function(e,t){return ZE(e).add(t,`year`)},addMonth:function(e,t){return ZE(e).add(t,`month`)},addDate:function(e,t){return ZE(e).add(t,`day`)},setYear:function(e,t){return ZE(e).year(t)},setMonth:function(e,t){return ZE(e).month(t)},setDate:function(e,t){return ZE(e).date(t)},setHour:function(e,t){return ZE(e).hour(t)},setMinute:function(e,t){return ZE(e).minute(t)},setSecond:function(e,t){return ZE(e).second(t)},setMillisecond:function(e,t){return ZE(e).millisecond(t)},isAfter:function(e,t){return ZE(e).isAfter(ZE(t))},isValidate:function(e){return ZE(e).isValid()},locale:{getWeekFirstDay:function(e){return(0,YE.default)().locale(XE(e)).localeData().firstDayOfWeek()},getWeekFirstDate:function(e,t){return ZE(t).locale(XE(e)).weekday(0)},getWeek:function(e,t){return ZE(t).locale(XE(e)).week()},getShortWeekDays:function(e){return(0,YE.default)().locale(XE(e)).localeData().weekdaysMin()},getShortMonths:function(e){return(0,YE.default)().locale(XE(e)).localeData().monthsShort()},format:function(e,t,n){return ZE(t).locale(XE(e)).format(n)},parse:function(e,t,n){for(var r=XE(e),i=0;ie.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:`0`,r=String(e);r.lengthe.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=DD(S.useState([!1,!1]),2),i=r[0],a=r[1];return[S.useMemo(function(){return i.map(function(r,i){if(r)return!0;var a=e[i];return a?!!(!n[i]&&!a||a&&t(a,{activeIndex:i})):!1})},[e,i,t,n]),function(e,t){a(function(n){return hD(n,t,e)})}]}function PD(e){"@babel/helpers - typeof";return PD=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},PD(e)}function FD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ID(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&(o=t.addDate(o,-7)),o}function TO(e,t){var n=t.generateConfig,r=t.locale,i=t.format;return e?typeof i==`function`?i(e):n.locale.format(r.locale,e,i):``}function EO(e,t,n){var r=t,i=[`getHour`,`getMinute`,`getSecond`,`getMillisecond`];return[`setHour`,`setMinute`,`setSecond`,`setMillisecond`].forEach(function(t,a){r=n?e[t](r,e[i[a]](n)):e[t](r,0)}),r}function DO(e,t,n,r,i){return In(function(a,o){return!!(n&&n(a,o)||r&&e.isAfter(r,a)&&!xO(e,t,r,a,o.type)||i&&e.isAfter(a,i)&&!xO(e,t,i,a,o.type))})}function OO(e){"@babel/helpers - typeof";return OO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},OO(e)}function kO(e,t,n){return S.useMemo(function(){var r=mD(_D(e,t,n)),i=r[0],a=OO(i)===`object`&&i.type===`mask`?i.format:null;return[r.map(function(e){return typeof e==`string`||typeof e==`function`?e:e.format}),a]},[e,t,n])}function AO(e,t,n){return typeof e[0]==`function`||n?!0:t}function jO(e){"@babel/helpers - typeof";return jO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},jO(e)}function MO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function NO(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;return S.useMemo(function(){var n=e&&mD(e);return t&&n&&(n[1]=n[1]||n[0]),n},[e,t])}function ZO(e,t){var n=e.generateConfig,r=e.locale,i=e.picker,a=i===void 0?`date`:i,o=e.prefixCls,s=o===void 0?`rc-picker`:o,c=e.previewValue,l=c===void 0?`hover`:c,u=e.styles,d=u===void 0?{}:u,f=e.classNames,p=f===void 0?{}:f,m=e.order,h=m===void 0?!0:m,g=e.components,_=g===void 0?{}:g,v=e.inputRender,y=e.allowClear,b=e.clearIcon,x=e.needConfirm,C=e.multiple,w=e.format,T=e.inputReadOnly,E=e.disabledDate,D=e.minDate,O=e.maxDate,k=e.showTime,A=e.value,j=e.defaultValue,M=e.pickerValue,N=e.defaultPickerValue,P=XO(A),F=XO(j),I=XO(M),L=XO(N),R=a===`date`&&k?`datetime`:a,z=R===`time`||R===`datetime`,B=z||C,V=x??z,H=WO(sO(e),4),U=H[0],W=H[1],ee=H[2],te=H[3],ne=HD(r,W),re=S.useMemo(function(){return cO(R,ee,te,U,ne)},[R,ee,te,U,ne]),ie=S.useMemo(function(){return BO(BO({},e),{},{previewValue:l,prefixCls:s,locale:ne,picker:a,styles:d,classNames:p,order:h,components:BO({input:v},_),clearIcon:uO(s,y,b),showTime:re,value:P,defaultValue:F,pickerValue:I,defaultPickerValue:L},t?.())},[e]),ae=WO(kO(R,ne,w),2),G=ae[0],oe=ae[1],K=AO(G,T,C),se=DO(n,r,E,D,O),ce=LO(n,a,se,re);return[S.useMemo(function(){return BO(BO({},ie),{},{needConfirm:V,inputReadOnly:K,disabledDate:se})},[ie,V,K,se]),R,B,G,oe,ce]}function QO(e,t){return rk(e)||nk(e,t)||ek(e,t)||$O()}function $O(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ek(e,t){if(e){if(typeof e==`string`)return tk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tk(e,t)}}function tk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,i=ak(ik(n.every(function(e){return e})?!1:e,t||!1,r),2),a=i[0],o=i[1];function s(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!t.inherit||a)&&o(e,t.force)}return[a,s]}function fk(e){var t=S.useRef();return S.useImperativeHandle(e,function(){return{nativeElement:t.current?.nativeElement,focus:function(e){var n;(n=t.current)==null||n.focus(e)},blur:function(){var e;(e=t.current)==null||e.blur()}}}),t}function pk(e,t){return vk(e)||_k(e,t)||hk(e,t)||mk()}function mk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hk(e,t){if(e){if(typeof e==`string`)return gk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gk(e,t)}}function gk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=S.useRef(t);r.current=t,Bn(function(){if(e)r.current(e);else{var t=ri(function(){r.current(e)},n);return function(){ri.cancel(t)}}},[e])}function xk(e,t){return Ek(e)||Tk(e,t)||Ck(e,t)||Sk()}function Sk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ck(e,t){if(e){if(typeof e==`string`)return wk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wk(e,t)}}function wk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=xk(S.useState(0),2),i=r[0],a=r[1],o=xk(S.useState(!1),2),s=o[0],c=o[1],l=S.useRef([]),u=S.useRef(null),d=S.useRef(null),f=function(e){u.current=e};return bk(s||n,function(){s||(l.current=[],f(null))}),S.useEffect(function(){s&&l.current.push(i)},[s,i]),[s,function(e){c(e)},function(e){return e&&(d.current=e),d.current},i,a,function(n){var r=l.current,i=new Set(r.filter(function(e){return n[e]||t[e]})),a=+(r[r.length-1]===0);return i.size>=2||e[a]?null:a},l.current,f,function(e){return u.current===e}]}function Ok(e){"@babel/helpers - typeof";return Ok=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ok(e)}function kk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ak(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n8&&arguments[8]!==void 0?arguments[8]:Jk,l=arguments.length>9&&arguments[9]!==void 0?arguments[9]:Jk,u=arguments.length>10&&arguments[10]!==void 0?arguments[10]:Jk,d=arguments.length>11?arguments[11]:void 0,f=arguments.length>12?arguments[12]:void 0,p=arguments.length>13?arguments[13]:void 0,m=o===`time`,h=a||0,g=function(t){var r=e.getNow();return m&&(r=EO(e,r)),c[t]||n[t]||r},_=Vk(l,2),v=_[0],y=_[1],b=Vk(Hn(function(){return g(0)},v),2),x=b[0],C=b[1],w=Vk(Hn(function(){return g(1)},y),2),T=w[0],E=w[1],D=S.useMemo(function(){var t=[x,T][h];return m?t:EO(e,t,u[h])},[m,x,T,h,e,u]),O=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`panel`,a=[C,E][h];a(n);var s=[x,T];s[h]=n,d&&(!xO(e,t,x,s[0],o)||!xO(e,t,T,s[1],o))&&d(s,{source:i,range:h===1?`end`:`start`,mode:r})},k=function(n,r){if(s){var i={date:`month`,week:`month`,month:`year`,quarter:`year`}[o];if(i&&!xO(e,t,n,r,i)||o===`year`&&n&&Math.floor(e.getYear(n)/10)!==Math.floor(e.getYear(r)/10))return qk(e,o,r,-1)}return r},A=S.useRef(null);return zn(function(){if(i&&!c[h]){var t=m?null:e.getNow();if(A.current!==null&&A.current!==h?t=[x,T][h^1]:n[h]?t=h===0?n[0]:k(n[0],n[1]):n[h^1]&&(t=n[h^1]),t){f&&e.isAfter(f,t)&&(t=f);var r=s?qk(e,o,t,1):t;p&&e.isAfter(r,p)&&(t=s?qk(e,o,p,-1):p),O(t,`reset`)}}},[i,h,n[h]]),S.useEffect(function(){i?A.current=h:A.current=null},[i,h]),zn(function(){i&&c&&c[h]&&O(c[h],`reset`)},[i,h]),[D,O]}function Xk(e,t){return tA(e)||eA(e,t)||Qk(e,t)||Zk()}function Zk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qk(e,t){if(e){if(typeof e==`string`)return $k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $k(e,t)}}function $k(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:2,o=[],s=n>=1?n|0:1,c=e;c<=t;c+=s){var l=i.includes(c);(!l||!r)&&o.push({label:pD(c,a),value:c,disabled:l})}return o}function VA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t||{},i=r.use12Hours,a=r.hourStep,o=a===void 0?1:a,s=r.minuteStep,c=s===void 0?1:s,l=r.secondStep,u=l===void 0?1:l,d=r.millisecondStep,f=d===void 0?100:d,p=r.hideDisabledOptions,m=r.disabledTime,h=r.disabledHours,g=r.disabledMinutes,_=r.disabledSeconds,v=S.useMemo(function(){return n||e.getNow()},[n,e]),y=S.useCallback(function(e){var t=m?.(e)||{};return[t.disabledHours||h||zA,t.disabledMinutes||g||zA,t.disabledSeconds||_||zA,t.disabledMilliseconds||zA]},[m,h,g,_]),b=NA(S.useMemo(function(){return y(v)},[v,y]),4),x=b[0],C=b[1],w=b[2],T=b[3],E=S.useCallback(function(e,t,n,r){var a=BA(0,23,o,p,e());return[i?a.map(function(e){return kA(kA({},e),{},{label:pD(e.value%12||12,2)})}):a,function(e){return BA(0,59,c,p,t(e))},function(e,t){return BA(0,59,u,p,n(e,t))},function(e,t,n){return BA(0,999,f,p,r(e,t,n),3)}]},[p,o,i,f,c,u]),D=NA(S.useMemo(function(){return E(x,C,w,T)},[E,x,C,w,T]),4),O=D[0],k=D[1],A=D[2],j=D[3];return[function(t,n){var r=function(){return O},i=k,a=A,o=j;if(n){var s=NA(y(n),4),c=s[0],l=s[1],u=s[2],d=s[3],f=NA(E(c,l,u,d),4),p=f[0],m=f[1],h=f[2],g=f[3];r=function(){return p},i=m,a=h,o=g}return EA(t,r,i,a,o,e)},O,k,A,j]}function HA(e,t){return qA(e)||KA(e,t)||WA(e,t)||UA()}function UA(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WA(e,t){if(e){if(typeof e==`string`)return GA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GA(e,t)}}function GA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n a":{color:`inherit`,transition:`all ${c}`,"&:hover":{color:`inherit`},"&::after":{position:`absolute`,inset:0,content:`""`}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:`auto`,fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:{display:`flex`,margin:0,padding:`${Y(l)} ${Y(m)}`,color:e.colorText,fontWeight:`normal`,fontSize:u,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${c}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...Qc(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:`not-allowed`,"&:hover":{color:f,backgroundColor:h,cursor:`not-allowed`},a:{pointerEvents:`none`}},"&-divider":{height:1,margin:`${Y(e.marginXXS)} 0`,overflow:`hidden`,lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:`absolute`,insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:`0 !important`,color:e.colorIcon,fontSize:p,fontStyle:`normal`}}},[`${n}-item-group-list`]:{margin:`0 ${Y(e.marginXS)}`,padding:0,listStyle:`none`},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(m).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:`relative`},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:h,cursor:`not-allowed`}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[Hh(e,`slide-up`),Hh(e,`slide-down`),Mh(e,`move-up`),Mh(e,`move-down`),rg(e,`zoom-big`)]]},Qee=rl(`Dropdown`,e=>{let{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:i}=e,a=gs(e,{menuCls:`${i}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[Zee(a),Xee(a)]},e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...cw({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...ow(e)}),{resetStyle:!1}),KE=e=>{let{menu:t,arrow:n,prefixCls:r,children:i,trigger:a,disabled:o,dropdownRender:s,popupRender:c,getPopupContainer:l,overlayClassName:u,rootClassName:d,overlayStyle:f,open:p,onOpenChange:m,mouseEnterDelay:h=.15,mouseLeaveDelay:g=.1,autoAdjustOverflow:_=!0,placement:v=``,transitionName:y,classNames:b,styles:x,destroyPopupOnHide:C,destroyOnHidden:w}=e,{getPrefixCls:T,direction:E,getPopupContainer:D,className:O,style:k,classNames:A,styles:j}=li(`dropdown`),M={...e,mouseEnterDelay:h,mouseLeaveDelay:g,autoAdjustOverflow:_},[N,P]=Fd([A,b],[j,x],{props:M}),F={...k,...f,...P.root},I=c||s;Dr(`Dropdown`);let L=S.useMemo(()=>{let e=T();return y===void 0?v.includes(`top`)?`${e}-slide-down`:`${e}-slide-up`:y},[T,v,y]),R=S.useMemo(()=>v?v.includes(`Center`)?v.slice(0,v.indexOf(`Center`)):v:E===`rtl`?`bottomRight`:`bottomLeft`,[v,E]),z=T(`dropdown`,r),B=bf(z),[V,H]=Qee(z,B),[,U]=Kc(),W=S.Children.only(vd(i)?S.createElement(`span`,null,i):i),ee=Pp(W,{className:J(`${z}-trigger`,{[`${z}-rtl`]:E===`rtl`},W.props.className),disabled:W.props.disabled??o}),te=o?[]:a,ne=!!te?.includes(`contextMenu`),[re,ie]=Hn(!1,p),ae=In(e=>{m?.(e,{source:`trigger`}),ie(e)}),G=J(u,d,V,H,B,O,N.root,{[`${z}-rtl`]:E===`rtl`}),oe=hw({arrowPointAtCenter:hd(n)&&n.pointAtCenter,autoAdjustOverflow:_,offset:U.marginXXS,arrowWidth:n?U.sizePopupArrow:0,borderRadius:U.borderRadius}),K=In(()=>{t?.selectable&&t?.multiple||(m?.(!1,{source:`menu`}),ie(!1))}),se=()=>{let e=Sr(N,[`root`]),n=Sr(P,[`root`]),r;return t?.items&&(r=S.createElement(GE,{...t,classNames:{...e,subMenu:{...e}},styles:{...n,subMenu:{...n}}})),I&&(r=I(r)),r=S.Children.only(typeof r==`string`?S.createElement(`span`,null,r):r),S.createElement(PE,{prefixCls:`${z}-menu`,rootClassName:J(H,B),expandIcon:S.createElement(`span`,{className:`${z}-menu-submenu-arrow`},E===`rtl`?S.createElement(Hw,{className:`${z}-menu-submenu-arrow-icon`}):S.createElement(mg,{className:`${z}-menu-submenu-arrow-icon`})),mode:`vertical`,selectable:!1,onClick:K,validator:({mode:e})=>{}},r)},[ce,q]=Yd(`Dropdown`,F.zIndex),le=S.createElement(Zw,{alignPoint:ne,...Sr(e,[`rootClassName`,`onOpenChange`]),mouseEnterDelay:h,mouseLeaveDelay:g,visible:re,builtinPlacements:oe,arrow:!!n,overlayClassName:G,prefixCls:z,getPopupContainer:l||D,transitionName:L,trigger:te,overlay:se,placement:R,onVisibleChange:ae,overlayStyle:{...F,zIndex:ce},autoDestroy:w??C},ee);return ce&&(le=S.createElement(Ud.Provider,{value:q},le)),le},$ee=cx(KE,`align`,void 0,`dropdown`,e=>e);KE._InternalPanelDoNotUseOrYouWillBeFired=e=>S.createElement($ee,{...e},S.createElement(`span`,null));var qE=Zg,JE=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e){(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekday=r()})(e,(function(){return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,n=this.$W,r=(n{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_localeData=r()})(e,(function(){return function(e,t,n){var r=t.prototype,i=function(e){return e&&(e.indexOf?e:e.s)},a=function(e,t,n,r,a){var o=e.name?e:e.$locale(),s=i(o[t]),c=i(o[n]),l=s||c.map((function(e){return e.slice(0,r)}));if(!a)return l;var u=o.weekStart;return l.map((function(e,t){return l[(t+(u||0))%7]}))},o=function(){return n.Ls[n.locale()]},s=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}(e.formats[t.toUpperCase()])},c=function(){var e=this;return{months:function(t){return t?t.format(`MMMM`):a(e,`months`)},monthsShort:function(t){return t?t.format(`MMM`):a(e,`monthsShort`,`months`,3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format(`dddd`):a(e,`weekdays`)},weekdaysMin:function(t){return t?t.format(`dd`):a(e,`weekdaysMin`,`weekdays`,2)},weekdaysShort:function(t){return t?t.format(`ddd`):a(e,`weekdaysShort`,`weekdays`,3)},longDateFormat:function(t){return s(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return c.bind(this)()},n.localeData=function(){var e=o();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(t){return s(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return a(o(),`months`)},n.monthsShort=function(){return a(o(),`monthsShort`,`months`,3)},n.weekdays=function(e){return a(o(),`weekdays`,null,null,e)},n.weekdaysShort=function(e){return a(o(),`weekdaysShort`,`weekdays`,3,e)},n.weekdaysMin=function(e){return a(o(),`weekdaysMin`,`weekdays`,2,e)}}}))})),nte=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekOfYear=r()})(e,(function(){var e=`week`,t=`year`;return function(n,r,i){var a=r.prototype;a.week=function(n){if(n===void 0&&(n=null),n!==null)return this.add(7*(n-this.week()),`day`);var r=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var a=i(this).startOf(t).add(1,t).date(r),o=i(this).endOf(e);if(a.isBefore(o))return 1}var s=i(this).startOf(t).date(r).startOf(e).subtract(1,`millisecond`),c=this.diff(s,e,!0);return c<0?i(this).startOf(`week`).week():Math.ceil(c)},a.weeks=function(e){return e===void 0&&(e=null),this.week(e)}}}))})),rte=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekYear=r()})(e,(function(){return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return t===1&&e===11?n+1:e===0&&t>=52?n-1:n}}}))})),ite=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),ate=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),YE=c(JE()),ote=c(ete()),ste=c(tte()),cte=c(nte()),lte=c(rte()),ute=c(ite()),dte=c(ate());YE.default.extend(dte.default),YE.default.extend(ute.default),YE.default.extend(ote.default),YE.default.extend(ste.default),YE.default.extend(cte.default),YE.default.extend(lte.default),YE.default.extend(function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=(e||``).replace(`Wo`,`wo`);return r.bind(this)(t)}});var fte={bn_BD:`bn-bd`,by_BY:`be`,en_GB:`en-gb`,en_US:`en`,fr_BE:`fr`,fr_CA:`fr-ca`,hy_AM:`hy-am`,kmr_IQ:`ku`,nl_BE:`nl-be`,pt_BR:`pt-br`,zh_CN:`zh-cn`,zh_HK:`zh-hk`,zh_TW:`zh-tw`},XE=function(e){return fte[e]||e.split(`_`)[0]},ZE=function(e){return!YE.default.isDayjs(e)||e instanceof YE.default?e:(0,YE.default)(e.valueOf())},pte={getNow:function(){var e=(0,YE.default)();return typeof e.tz==`function`?e.tz():e},getFixedDate:function(e){return(0,YE.default)(e,[`YYYY-M-DD`,`YYYY-MM-DD`])},getEndDate:function(e){return ZE(e).endOf(`month`)},getWeekDay:function(e){var t=ZE(e).locale(`en`);return t.weekday()+t.localeData().firstDayOfWeek()},getYear:function(e){return ZE(e).year()},getMonth:function(e){return ZE(e).month()},getDate:function(e){return ZE(e).date()},getHour:function(e){return ZE(e).hour()},getMinute:function(e){return ZE(e).minute()},getSecond:function(e){return ZE(e).second()},getMillisecond:function(e){return ZE(e).millisecond()},addYear:function(e,t){return ZE(e).add(t,`year`)},addMonth:function(e,t){return ZE(e).add(t,`month`)},addDate:function(e,t){return ZE(e).add(t,`day`)},setYear:function(e,t){return ZE(e).year(t)},setMonth:function(e,t){return ZE(e).month(t)},setDate:function(e,t){return ZE(e).date(t)},setHour:function(e,t){return ZE(e).hour(t)},setMinute:function(e,t){return ZE(e).minute(t)},setSecond:function(e,t){return ZE(e).second(t)},setMillisecond:function(e,t){return ZE(e).millisecond(t)},isAfter:function(e,t){return ZE(e).isAfter(ZE(t))},isValidate:function(e){return ZE(e).isValid()},locale:{getWeekFirstDay:function(e){return(0,YE.default)().locale(XE(e)).localeData().firstDayOfWeek()},getWeekFirstDate:function(e,t){return ZE(t).locale(XE(e)).weekday(0)},getWeek:function(e,t){return ZE(t).locale(XE(e)).week()},getShortWeekDays:function(e){return(0,YE.default)().locale(XE(e)).localeData().weekdaysMin()},getShortMonths:function(e){return(0,YE.default)().locale(XE(e)).localeData().monthsShort()},format:function(e,t,n){return ZE(t).locale(XE(e)).format(n)},parse:function(e,t,n){for(var r=XE(e),i=0;ie.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:`0`,r=String(e);r.lengthe.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=ED(S.useState([!1,!1]),2),i=r[0],a=r[1];return[S.useMemo(function(){return i.map(function(r,i){if(r)return!0;var a=e[i];return a?!!(!n[i]&&!a||a&&t(a,{activeIndex:i})):!1})},[e,i,t,n]),function(e,t){a(function(n){return mD(n,t,e)})}]}function ND(e){"@babel/helpers - typeof";return ND=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ND(e)}function PD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function FD(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&(o=t.addDate(o,-7)),o}function wO(e,t){var n=t.generateConfig,r=t.locale,i=t.format;return e?typeof i==`function`?i(e):n.locale.format(r.locale,e,i):``}function TO(e,t,n){var r=t,i=[`getHour`,`getMinute`,`getSecond`,`getMillisecond`];return[`setHour`,`setMinute`,`setSecond`,`setMillisecond`].forEach(function(t,a){r=n?e[t](r,e[i[a]](n)):e[t](r,0)}),r}function EO(e,t,n,r,i){return In(function(a,o){return!!(n&&n(a,o)||r&&e.isAfter(r,a)&&!bO(e,t,r,a,o.type)||i&&e.isAfter(a,i)&&!bO(e,t,i,a,o.type))})}function DO(e){"@babel/helpers - typeof";return DO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},DO(e)}function OO(e,t,n){return S.useMemo(function(){var r=pD(gD(e,t,n)),i=r[0],a=DO(i)===`object`&&i.type===`mask`?i.format:null;return[r.map(function(e){return typeof e==`string`||typeof e==`function`?e:e.format}),a]},[e,t,n])}function kO(e,t,n){return typeof e[0]==`function`||n?!0:t}function AO(e){"@babel/helpers - typeof";return AO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},AO(e)}function jO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function MO(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;return S.useMemo(function(){var n=e&&pD(e);return t&&n&&(n[1]=n[1]||n[0]),n},[e,t])}function XO(e,t){var n=e.generateConfig,r=e.locale,i=e.picker,a=i===void 0?`date`:i,o=e.prefixCls,s=o===void 0?`rc-picker`:o,c=e.previewValue,l=c===void 0?`hover`:c,u=e.styles,d=u===void 0?{}:u,f=e.classNames,p=f===void 0?{}:f,m=e.order,h=m===void 0?!0:m,g=e.components,_=g===void 0?{}:g,v=e.inputRender,y=e.allowClear,b=e.clearIcon,x=e.needConfirm,C=e.multiple,w=e.format,T=e.inputReadOnly,E=e.disabledDate,D=e.minDate,O=e.maxDate,k=e.showTime,A=e.value,j=e.defaultValue,M=e.pickerValue,N=e.defaultPickerValue,P=YO(A),F=YO(j),I=YO(M),L=YO(N),R=a===`date`&&k?`datetime`:a,z=R===`time`||R===`datetime`,B=z||C,V=x??z,H=UO(oO(e),4),U=H[0],W=H[1],ee=H[2],te=H[3],ne=VD(r,W),re=S.useMemo(function(){return sO(R,ee,te,U,ne)},[R,ee,te,U,ne]),ie=S.useMemo(function(){return zO(zO({},e),{},{previewValue:l,prefixCls:s,locale:ne,picker:a,styles:d,classNames:p,order:h,components:zO({input:v},_),clearIcon:lO(s,y,b),showTime:re,value:P,defaultValue:F,pickerValue:I,defaultPickerValue:L},t?.())},[e]),ae=UO(OO(R,ne,w),2),G=ae[0],oe=ae[1],K=kO(G,T,C),se=EO(n,r,E,D,O),ce=IO(n,a,se,re);return[S.useMemo(function(){return zO(zO({},ie),{},{needConfirm:V,inputReadOnly:K,disabledDate:se})},[ie,V,K,se]),R,B,G,oe,ce]}function ZO(e,t){return nk(e)||tk(e,t)||$O(e,t)||QO()}function QO(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $O(e,t){if(e){if(typeof e==`string`)return ek(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ek(e,t)}}function ek(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,i=ik(rk(n.every(function(e){return e})?!1:e,t||!1,r),2),a=i[0],o=i[1];function s(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!t.inherit||a)&&o(e,t.force)}return[a,s]}function dk(e){var t=S.useRef();return S.useImperativeHandle(e,function(){return{nativeElement:t.current?.nativeElement,focus:function(e){var n;(n=t.current)==null||n.focus(e)},blur:function(){var e;(e=t.current)==null||e.blur()}}}),t}function fk(e,t){return _k(e)||gk(e,t)||mk(e,t)||pk()}function pk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mk(e,t){if(e){if(typeof e==`string`)return hk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hk(e,t)}}function hk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=S.useRef(t);r.current=t,Bn(function(){if(e)r.current(e);else{var t=ri(function(){r.current(e)},n);return function(){ri.cancel(t)}}},[e])}function bk(e,t){return Tk(e)||wk(e,t)||Sk(e,t)||xk()}function xk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sk(e,t){if(e){if(typeof e==`string`)return Ck(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ck(e,t)}}function Ck(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=bk(S.useState(0),2),i=r[0],a=r[1],o=bk(S.useState(!1),2),s=o[0],c=o[1],l=S.useRef([]),u=S.useRef(null),d=S.useRef(null),f=function(e){u.current=e};return yk(s||n,function(){s||(l.current=[],f(null))}),S.useEffect(function(){s&&l.current.push(i)},[s,i]),[s,function(e){c(e)},function(e){return e&&(d.current=e),d.current},i,a,function(n){var r=l.current,i=new Set(r.filter(function(e){return n[e]||t[e]})),a=+(r[r.length-1]===0);return i.size>=2||e[a]?null:a},l.current,f,function(e){return u.current===e}]}function Dk(e){"@babel/helpers - typeof";return Dk=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Dk(e)}function Ok(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kk(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n8&&arguments[8]!==void 0?arguments[8]:qk,l=arguments.length>9&&arguments[9]!==void 0?arguments[9]:qk,u=arguments.length>10&&arguments[10]!==void 0?arguments[10]:qk,d=arguments.length>11?arguments[11]:void 0,f=arguments.length>12?arguments[12]:void 0,p=arguments.length>13?arguments[13]:void 0,m=o===`time`,h=a||0,g=function(t){var r=e.getNow();return m&&(r=TO(e,r)),c[t]||n[t]||r},_=Bk(l,2),v=_[0],y=_[1],b=Bk(Hn(function(){return g(0)},v),2),x=b[0],C=b[1],w=Bk(Hn(function(){return g(1)},y),2),T=w[0],E=w[1],D=S.useMemo(function(){var t=[x,T][h];return m?t:TO(e,t,u[h])},[m,x,T,h,e,u]),O=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`panel`,a=[C,E][h];a(n);var s=[x,T];s[h]=n,d&&(!bO(e,t,x,s[0],o)||!bO(e,t,T,s[1],o))&&d(s,{source:i,range:h===1?`end`:`start`,mode:r})},k=function(n,r){if(s){var i={date:`month`,week:`month`,month:`year`,quarter:`year`}[o];if(i&&!bO(e,t,n,r,i)||o===`year`&&n&&Math.floor(e.getYear(n)/10)!==Math.floor(e.getYear(r)/10))return Kk(e,o,r,-1)}return r},A=S.useRef(null);return zn(function(){if(i&&!c[h]){var t=m?null:e.getNow();if(A.current!==null&&A.current!==h?t=[x,T][h^1]:n[h]?t=h===0?n[0]:k(n[0],n[1]):n[h^1]&&(t=n[h^1]),t){f&&e.isAfter(f,t)&&(t=f);var r=s?Kk(e,o,t,1):t;p&&e.isAfter(r,p)&&(t=s?Kk(e,o,p,-1):p),O(t,`reset`)}}},[i,h,n[h]]),S.useEffect(function(){i?A.current=h:A.current=null},[i,h]),zn(function(){i&&c&&c[h]&&O(c[h],`reset`)},[i,h]),[D,O]}function Yk(e,t){return eA(e)||$k(e,t)||Zk(e,t)||Xk()}function Xk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zk(e,t){if(e){if(typeof e==`string`)return Qk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qk(e,t)}}function Qk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:2,o=[],s=n>=1?n|0:1,c=e;c<=t;c+=s){var l=i.includes(c);(!l||!r)&&o.push({label:fD(c,a),value:c,disabled:l})}return o}function BA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t||{},i=r.use12Hours,a=r.hourStep,o=a===void 0?1:a,s=r.minuteStep,c=s===void 0?1:s,l=r.secondStep,u=l===void 0?1:l,d=r.millisecondStep,f=d===void 0?100:d,p=r.hideDisabledOptions,m=r.disabledTime,h=r.disabledHours,g=r.disabledMinutes,_=r.disabledSeconds,v=S.useMemo(function(){return n||e.getNow()},[n,e]),y=S.useCallback(function(e){var t=m?.(e)||{};return[t.disabledHours||h||RA,t.disabledMinutes||g||RA,t.disabledSeconds||_||RA,t.disabledMilliseconds||RA]},[m,h,g,_]),b=MA(S.useMemo(function(){return y(v)},[v,y]),4),x=b[0],C=b[1],w=b[2],T=b[3],E=S.useCallback(function(e,t,n,r){var a=zA(0,23,o,p,e());return[i?a.map(function(e){return OA(OA({},e),{},{label:fD(e.value%12||12,2)})}):a,function(e){return zA(0,59,c,p,t(e))},function(e,t){return zA(0,59,u,p,n(e,t))},function(e,t,n){return zA(0,999,f,p,r(e,t,n),3)}]},[p,o,i,f,c,u]),D=MA(S.useMemo(function(){return E(x,C,w,T)},[E,x,C,w,T]),4),O=D[0],k=D[1],A=D[2],j=D[3];return[function(t,n){var r=function(){return O},i=k,a=A,o=j;if(n){var s=MA(y(n),4),c=s[0],l=s[1],u=s[2],d=s[3],f=MA(E(c,l,u,d),4),p=f[0],m=f[1],h=f[2],g=f[3];r=function(){return p},i=m,a=h,o=g}return TA(t,r,i,a,o,e)},O,k,A,j]}function VA(e,t){return KA(e)||GA(e,t)||UA(e,t)||HA()}function HA(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UA(e,t){if(e){if(typeof e==`string`)return WA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WA(e,t)}}function WA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;fe(e),_?.(e),t&&pe(e)},he=function(e,t){ie(e),t&&me(t),pe(t,e)},ge=function(e){if(le(e),me(e),re!==x){var t=[`decade`,`year`],n=[].concat(t,[`month`]),r={quarter:[].concat(t,[`quarter`]),week:[].concat(FN(n),[`week`]),date:[].concat(FN(n),[`date`])}[x]||n,i=r[r.indexOf(re)+1];i&&he(i,e)}},_e=S.useMemo(function(){var e,t;if(Array.isArray(T)){var n=zN(T,2);e=n[0],t=n[1]}else e=T;return!e&&!t?null:(e||=t,t||=e,a.isAfter(e,t)?[t,e]:[e,t])},[T,a]),ve=ED(E,D,O),ye=A[ae]||GN[ae]||Nj,be=S.useMemo(function(){return{classNames:P?.popup??n??{},styles:F?.popup??r??{}}},[P,n,F,r]),xe=S.useContext(oj),Se=S.useMemo(function(){return jN(jN({},xe),{},{hideHeader:j})},[xe,j]),Ce=`${I}-panel`,we=gD(e,[`showWeek`,`prevIcon`,`nextIcon`,`superPrevIcon`,`superNextIcon`,`disabledDate`,`minDate`,`maxDate`,`onHover`]);return S.createElement(nj.Provider,{value:be},S.createElement(oj.Provider,{value:Se},S.createElement(`div`,{ref:L,tabIndex:l,className:J(Ce,MN({},`${Ce}-rtl`,o===`rtl`))},S.createElement(ye,kN({},we,{showTime:ee,prefixCls:I,locale:U,generateConfig:a,onModeChange:he,pickerValue:de,onPickerValueChange:function(e){me(e,!0)},value:ce[0],onSelect:ge,values:ce,cellRender:ve,hoverRangeValue:_e,hoverValue:w})))))}var qN=S.memo(S.forwardRef(KN));function JN(e){"@babel/helpers - typeof";return JN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},JN(e)}function YN(){return YN=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jP(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function MP(e){var t=e.icon,n=e.type,r=AP(e,DP),i=S.useContext(eD),a=i.prefixCls,o=i.classNames,s=i.styles;return t?S.createElement(`span`,kP({className:J(`${a}-${n}`,o.suffix),style:s.suffix},r),t):null}function NP(e){var t=e.onClear,n=AP(e,OP);return S.createElement(MP,kP({},n,{type:`clear`,role:`button`,onMouseDown:function(e){e.preventDefault()},onClick:function(e){e.stopPropagation(),t()}}))}function PP(e){"@babel/helpers - typeof";return PP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},PP(e)}function FP(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function IP(e,t){for(var n=0;n=a&&e<=o)return r;var s=Math.min(Math.abs(e-a),Math.abs(e-o));se.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var aF=S.forwardRef(function(e,t){var n=e.className,r=e.active,i=e.showActiveCls,a=i===void 0?!0:i,o=e.suffixIcon,s=e.format,c=e.validateFormat,l=e.onChange;e.onInput;var u=e.helped,d=e.onHelp,f=e.onSubmit,p=e.onKeyDown,m=e.preserveInvalidOnBlur,h=m===void 0?!1:m,g=e.invalid,_=e.clearIcon,v=rF(e,KP),y=e.value,b=e.onFocus,x=e.onBlur,C=e.onMouseUp,w=S.useContext(eD),T=w.prefixCls,E=w.input,D=E===void 0?`input`:E,O=w.classNames,k=w.styles,A=`${T}-input`,j=ZP(S.useState(!1),2),M=j[0],N=j[1],P=ZP(S.useState(y),2),F=P[0],I=P[1],L=ZP(S.useState(``),2),R=L[0],z=L[1],B=ZP(S.useState(null),2),V=B[0],H=B[1],U=ZP(S.useState(null),2),W=U[0],ee=U[1],te=F||``;S.useEffect(function(){I(y)},[y]);var ne=S.useRef(null),re=S.useRef(null),ie=S.useRef(!1);S.useImperativeHandle(t,function(){return{nativeElement:ne.current,inputElement:re.current,focus:function(e){re.current.focus(e)},blur:function(){re.current.blur()}}});var ae=S.useMemo(function(){return new UP(s||``)},[s]),G=ZP(S.useMemo(function(){return u?[0,0]:ae.getSelection(V)},[ae,V,u]),2),oe=G[0],K=G[1],se=function(e){e&&e!==s&&e!==y&&d()},ce=In(function(e){c(e)&&l(e),I(e),se(e)}),q=function(e){if(!s){var t=e.target.value;se(t),I(t),l(t)}},le=function(e){if(ie.current){e.preventDefault();return}var t=e.clipboardData.getData(`text`);c(t)&&ce(t)},ue=function(){ie.current=!0},de=function(e){var t=e.target.selectionStart;H(ae.getMaskCellIndex(t)),ee({}),C?.(e),ie.current=!1},fe=function(e){N(!0),H(0),z(``),b(e)},pe=function(e){x(e)},me=function(e){N(!1),pe(e)};bk(r,function(){!r&&!h&&I(y)});var he=function(e){e.key===`Enter`&&c(te)&&f(),p?.(e)},ge=function(e){if(ie.current){e.preventDefault();return}he(e);var t=e.key,n=null,r=null,i=K-oe,a=s.slice(oe,K),o=function(e){H(function(t){var n=t+e;return n=Math.max(n,0),n=Math.min(n,ae.size()-1),n})},c=function(e){var t=ZP(WP(a),3),n=t[0],r=t[1],i=t[2],o=te.slice(oe,K),s=Number(o);if(isNaN(s))return String(i||(e>0?n:r));var c=s+e,l=r-n+1;return String(n+(l+c-n)%l)};switch(t){case`Backspace`:case`Delete`:n=``,r=a;break;case`ArrowLeft`:n=``,o(-1);break;case`ArrowRight`:n=``,o(1);break;case`ArrowUp`:n=``,r=c(1);break;case`ArrowDown`:n=``,r=c(-1);break;default:isNaN(Number(t))||(n=R+t,r=n);break}n!==null&&(z(n),n.length>=i&&(o(1),z(``))),r!==null&&ce((te.slice(0,oe)+pD(r,i)+te.slice(K)).slice(0,s.length)),ee({})},_e=S.useRef();zn(function(){if(!(!M||!s||ie.current)){if(!ae.match(te)){ce(s);return}return re.current.setSelectionRange(oe,K),_e.current=ri(function(){re.current.setSelectionRange(oe,K)}),function(){ri.cancel(_e.current)}}},[ae,s,M,te,V,oe,K,W,ce]);var ve=s?{onFocus:fe,onBlur:me,onKeyDown:ge,onMouseDown:ue,onMouseUp:de,onPaste:le}:{};return S.createElement(`div`,{ref:ne,className:J(A,JP(JP({},`${A}-active`,r&&a),`${A}-placeholder`,u),n)},S.createElement(D,qP({ref:re,"aria-invalid":g,autoComplete:`off`},v,{onKeyDown:he,onBlur:pe},ve,{value:te,onChange:q,className:O.input,style:k.input})),S.createElement(MP,{type:`suffix`,icon:o}),_)}),oF=`id.prefix.clearIcon.suffixIcon.separator.activeIndex.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.value.onChange.onSubmit.onInputChange.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onActiveInfo.placement.onMouseDown.required.aria-required.autoFocus.tabIndex`.split(`.`),sF=[`index`];function cF(){return cF=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function CF(e,t){var n=e.id,r=e.prefix,i=e.clearIcon,a=e.suffixIcon,o=e.separator,s=o===void 0?`~`:o,c=e.activeIndex;e.activeHelp,e.allHelp;var l=e.focused;e.onFocus,e.onBlur,e.onKeyDown,e.locale,e.generateConfig;var u=e.placeholder,d=e.className,f=e.style,p=e.onClick,m=e.onClear,h=e.value;e.onChange,e.onSubmit,e.onInputChange,e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var g=e.disabled,_=e.invalid;e.inputReadOnly;var v=e.direction;e.onOpenChange;var y=e.onActiveInfo;e.placement;var b=e.onMouseDown;e.required,e[`aria-required`];var x=e.autoFocus,C=e.tabIndex,w=xF(e,oF),T=v===`rtl`,E=S.useContext(eD),D=E.prefixCls,O=E.classNames,k=E.styles,A=S.useMemo(function(){if(typeof n==`string`)return[n];var e=n||{};return[e.start,e.end]},[n]),j=S.useRef(),M=S.useRef(),N=S.useRef(),P=function(e){return[M,N][e]?.current};S.useImperativeHandle(t,function(){return{nativeElement:j.current,focus:function(e){if(bF(e)===`object`){var t,n=e||{},r=n.index,i=r===void 0?0:r,a=xF(n,sF);(t=P(i))==null||t.focus(a)}else{var o;(o=P(e??0))==null||o.focus()}},blur:function(){var e,t;(e=P(0))==null||e.blur(),(t=P(1))==null||t.blur()}}});var F=EP(w),I=S.useMemo(function(){return Array.isArray(u)?u:[u,u]},[u]),L=mF(wP(uF(uF({},e),{},{id:A,placeholder:I})),1)[0],R=mF(S.useState({position:`absolute`,width:0}),2),z=R[0],B=R[1],V=In(function(){var e=P(c);if(e){var t=e.nativeElement.getBoundingClientRect(),n=j.current.getBoundingClientRect(),r=t.left-n.left;B(function(e){return uF(uF({},e),{},{width:t.width,left:r})}),y([t.left,t.right,n.width])}});S.useEffect(function(){V()},[c]);var H=i&&(h[0]&&!g[0]||h[1]&&!g[1]),U=x&&!g[0],W=x&&!U&&!g[1];return S.createElement(Wr,{onResize:V},S.createElement(`div`,cF({},F,{className:J(D,`${D}-range`,dF(dF(dF(dF({},`${D}-focused`,l),`${D}-disabled`,g.every(function(e){return e})),`${D}-invalid`,_.some(function(e){return e})),`${D}-rtl`,T),d),style:f,ref:j,onClick:p,onMouseDown:function(e){var t=e.target;t!==M.current.inputElement&&t!==N.current.inputElement&&e.preventDefault(),b?.(e)}}),r&&S.createElement(`div`,{className:J(`${D}-prefix`,O.prefix),style:k.prefix},r),S.createElement(aF,cF({ref:M},L(0),{className:`${D}-input-start`,autoFocus:U,tabIndex:C,"date-range":`start`})),S.createElement(`div`,{className:`${D}-range-separator`},s),S.createElement(aF,cF({ref:N},L(1),{className:`${D}-input-end`,autoFocus:W,tabIndex:C,"date-range":`end`})),S.createElement(`div`,{className:`${D}-active-bar`,style:z}),S.createElement(MP,{type:`suffix`,icon:a}),H&&S.createElement(NP,{icon:i,onClear:m})))}var wF=S.forwardRef(CF);function TF(e){"@babel/helpers - typeof";return TF=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},TF(e)}function EF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function DF(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;fe(e),_?.(e),t&&pe(e)},he=function(e,t){ie(e),t&&me(t),pe(t,e)},ge=function(e){if(le(e),me(e),re!==x){var t=[`decade`,`year`],n=[].concat(t,[`month`]),r={quarter:[].concat(t,[`quarter`]),week:[].concat(FN(n),[`week`]),date:[].concat(FN(n),[`date`])}[x]||n,i=r[r.indexOf(re)+1];i&&he(i,e)}},_e=S.useMemo(function(){var e,t;if(Array.isArray(T)){var n=zN(T,2);e=n[0],t=n[1]}else e=T;return!e&&!t?null:(e||=t,t||=e,a.isAfter(e,t)?[t,e]:[e,t])},[T,a]),ve=TD(E,D,O),ye=A[ae]||GN[ae]||Mj,be=S.useMemo(function(){return{classNames:P?.popup??n??{},styles:F?.popup??r??{}}},[P,n,F,r]),xe=S.useContext(aj),Se=S.useMemo(function(){return jN(jN({},xe),{},{hideHeader:j})},[xe,j]),Ce=`${I}-panel`,we=hD(e,[`showWeek`,`prevIcon`,`nextIcon`,`superPrevIcon`,`superNextIcon`,`disabledDate`,`minDate`,`maxDate`,`onHover`]);return S.createElement(tj.Provider,{value:be},S.createElement(aj.Provider,{value:Se},S.createElement(`div`,{ref:L,tabIndex:l,className:J(Ce,MN({},`${Ce}-rtl`,o===`rtl`))},S.createElement(ye,kN({},we,{showTime:ee,prefixCls:I,locale:U,generateConfig:a,onModeChange:he,pickerValue:de,onPickerValueChange:function(e){me(e,!0)},value:ce[0],onSelect:ge,values:ce,cellRender:ve,hoverRangeValue:_e,hoverValue:w})))))}var qN=S.memo(S.forwardRef(KN));function JN(e){"@babel/helpers - typeof";return JN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},JN(e)}function YN(){return YN=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jP(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function MP(e){var t=e.icon,n=e.type,r=AP(e,DP),i=S.useContext($E),a=i.prefixCls,o=i.classNames,s=i.styles;return t?S.createElement(`span`,kP({className:J(`${a}-${n}`,o.suffix),style:s.suffix},r),t):null}function NP(e){var t=e.onClear,n=AP(e,OP);return S.createElement(MP,kP({},n,{type:`clear`,role:`button`,onMouseDown:function(e){e.preventDefault()},onClick:function(e){e.stopPropagation(),t()}}))}function PP(e){"@babel/helpers - typeof";return PP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},PP(e)}function FP(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function IP(e,t){for(var n=0;n=a&&e<=o)return r;var s=Math.min(Math.abs(e-a),Math.abs(e-o));se.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var aF=S.forwardRef(function(e,t){var n=e.className,r=e.active,i=e.showActiveCls,a=i===void 0?!0:i,o=e.suffixIcon,s=e.format,c=e.validateFormat,l=e.onChange;e.onInput;var u=e.helped,d=e.onHelp,f=e.onSubmit,p=e.onKeyDown,m=e.preserveInvalidOnBlur,h=m===void 0?!1:m,g=e.invalid,_=e.clearIcon,v=rF(e,KP),y=e.value,b=e.onFocus,x=e.onBlur,C=e.onMouseUp,w=S.useContext($E),T=w.prefixCls,E=w.input,D=E===void 0?`input`:E,O=w.classNames,k=w.styles,A=`${T}-input`,j=ZP(S.useState(!1),2),M=j[0],N=j[1],P=ZP(S.useState(y),2),F=P[0],I=P[1],L=ZP(S.useState(``),2),R=L[0],z=L[1],B=ZP(S.useState(null),2),V=B[0],H=B[1],U=ZP(S.useState(null),2),W=U[0],ee=U[1],te=F||``;S.useEffect(function(){I(y)},[y]);var ne=S.useRef(null),re=S.useRef(null),ie=S.useRef(!1);S.useImperativeHandle(t,function(){return{nativeElement:ne.current,inputElement:re.current,focus:function(e){re.current.focus(e)},blur:function(){re.current.blur()}}});var ae=S.useMemo(function(){return new UP(s||``)},[s]),G=ZP(S.useMemo(function(){return u?[0,0]:ae.getSelection(V)},[ae,V,u]),2),oe=G[0],K=G[1],se=function(e){e&&e!==s&&e!==y&&d()},ce=In(function(e){c(e)&&l(e),I(e),se(e)}),q=function(e){if(!s){var t=e.target.value;se(t),I(t),l(t)}},le=function(e){if(ie.current){e.preventDefault();return}var t=e.clipboardData.getData(`text`);c(t)&&ce(t)},ue=function(){ie.current=!0},de=function(e){var t=e.target.selectionStart;H(ae.getMaskCellIndex(t)),ee({}),C?.(e),ie.current=!1},fe=function(e){N(!0),H(0),z(``),b(e)},pe=function(e){x(e)},me=function(e){N(!1),pe(e)};yk(r,function(){!r&&!h&&I(y)});var he=function(e){e.key===`Enter`&&c(te)&&f(),p?.(e)},ge=function(e){if(ie.current){e.preventDefault();return}he(e);var t=e.key,n=null,r=null,i=K-oe,a=s.slice(oe,K),o=function(e){H(function(t){var n=t+e;return n=Math.max(n,0),n=Math.min(n,ae.size()-1),n})},c=function(e){var t=ZP(WP(a),3),n=t[0],r=t[1],i=t[2],o=te.slice(oe,K),s=Number(o);if(isNaN(s))return String(i||(e>0?n:r));var c=s+e,l=r-n+1;return String(n+(l+c-n)%l)};switch(t){case`Backspace`:case`Delete`:n=``,r=a;break;case`ArrowLeft`:n=``,o(-1);break;case`ArrowRight`:n=``,o(1);break;case`ArrowUp`:n=``,r=c(1);break;case`ArrowDown`:n=``,r=c(-1);break;default:isNaN(Number(t))||(n=R+t,r=n);break}n!==null&&(z(n),n.length>=i&&(o(1),z(``))),r!==null&&ce((te.slice(0,oe)+fD(r,i)+te.slice(K)).slice(0,s.length)),ee({})},_e=S.useRef();zn(function(){if(!(!M||!s||ie.current)){if(!ae.match(te)){ce(s);return}return re.current.setSelectionRange(oe,K),_e.current=ri(function(){re.current.setSelectionRange(oe,K)}),function(){ri.cancel(_e.current)}}},[ae,s,M,te,V,oe,K,W,ce]);var ve=s?{onFocus:fe,onBlur:me,onKeyDown:ge,onMouseDown:ue,onMouseUp:de,onPaste:le}:{};return S.createElement(`div`,{ref:ne,className:J(A,JP(JP({},`${A}-active`,r&&a),`${A}-placeholder`,u),n)},S.createElement(D,qP({ref:re,"aria-invalid":g,autoComplete:`off`},v,{onKeyDown:he,onBlur:pe},ve,{value:te,onChange:q,className:O.input,style:k.input})),S.createElement(MP,{type:`suffix`,icon:o}),_)}),oF=`id.prefix.clearIcon.suffixIcon.separator.activeIndex.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.value.onChange.onSubmit.onInputChange.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onActiveInfo.placement.onMouseDown.required.aria-required.autoFocus.tabIndex`.split(`.`),sF=[`index`];function cF(){return cF=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function CF(e,t){var n=e.id,r=e.prefix,i=e.clearIcon,a=e.suffixIcon,o=e.separator,s=o===void 0?`~`:o,c=e.activeIndex;e.activeHelp,e.allHelp;var l=e.focused;e.onFocus,e.onBlur,e.onKeyDown,e.locale,e.generateConfig;var u=e.placeholder,d=e.className,f=e.style,p=e.onClick,m=e.onClear,h=e.value;e.onChange,e.onSubmit,e.onInputChange,e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var g=e.disabled,_=e.invalid;e.inputReadOnly;var v=e.direction;e.onOpenChange;var y=e.onActiveInfo;e.placement;var b=e.onMouseDown;e.required,e[`aria-required`];var x=e.autoFocus,C=e.tabIndex,w=xF(e,oF),T=v===`rtl`,E=S.useContext($E),D=E.prefixCls,O=E.classNames,k=E.styles,A=S.useMemo(function(){if(typeof n==`string`)return[n];var e=n||{};return[e.start,e.end]},[n]),j=S.useRef(),M=S.useRef(),N=S.useRef(),P=function(e){return[M,N][e]?.current};S.useImperativeHandle(t,function(){return{nativeElement:j.current,focus:function(e){if(bF(e)===`object`){var t,n=e||{},r=n.index,i=r===void 0?0:r,a=xF(n,sF);(t=P(i))==null||t.focus(a)}else{var o;(o=P(e??0))==null||o.focus()}},blur:function(){var e,t;(e=P(0))==null||e.blur(),(t=P(1))==null||t.blur()}}});var F=EP(w),I=S.useMemo(function(){return Array.isArray(u)?u:[u,u]},[u]),L=mF(wP(uF(uF({},e),{},{id:A,placeholder:I})),1)[0],R=mF(S.useState({position:`absolute`,width:0}),2),z=R[0],B=R[1],V=In(function(){var e=P(c);if(e){var t=e.nativeElement.getBoundingClientRect(),n=j.current.getBoundingClientRect(),r=t.left-n.left;B(function(e){return uF(uF({},e),{},{width:t.width,left:r})}),y([t.left,t.right,n.width])}});S.useEffect(function(){V()},[c]);var H=i&&(h[0]&&!g[0]||h[1]&&!g[1]),U=x&&!g[0],W=x&&!U&&!g[1];return S.createElement(Wr,{onResize:V},S.createElement(`div`,cF({},F,{className:J(D,`${D}-range`,dF(dF(dF(dF({},`${D}-focused`,l),`${D}-disabled`,g.every(function(e){return e})),`${D}-invalid`,_.some(function(e){return e})),`${D}-rtl`,T),d),style:f,ref:j,onClick:p,onMouseDown:function(e){var t=e.target;t!==M.current.inputElement&&t!==N.current.inputElement&&e.preventDefault(),b?.(e)}}),r&&S.createElement(`div`,{className:J(`${D}-prefix`,O.prefix),style:k.prefix},r),S.createElement(aF,cF({ref:M},L(0),{className:`${D}-input-start`,autoFocus:U,tabIndex:C,"date-range":`start`})),S.createElement(`div`,{className:`${D}-range-separator`},s),S.createElement(aF,cF({ref:N},L(1),{className:`${D}-input-end`,autoFocus:W,tabIndex:C,"date-range":`end`})),S.createElement(`div`,{className:`${D}-active-bar`,style:z}),S.createElement(MP,{type:`suffix`,icon:a}),H&&S.createElement(NP,{icon:i,onClear:m})))}var wF=S.forwardRef(CF);function TF(e){"@babel/helpers - typeof";return TF=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},TF(e)}function EF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function DF(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0&&G.current.focus({index:n})}ue(!0),ae?.(e)},Qe=function(){Be(null),ue(!1,{force:!0})},$e=UF(S.useState(null),2),et=$e[0],tt=$e[1],nt=UF(S.useState(null),2),rt=nt[0],it=nt[1],at=S.useMemo(function(){return rt||_e},[_e,rt]);S.useEffect(function(){q||it(null)},[q]);var ot=UF(S.useState([0,0,0]),2),st=ot[0],ct=ot[1],lt=function(e,t){p===`hover`&&(it(e),tt(t))},ut=yk(W,ee),dt=function(e){lt(e,`preset`)},ft=function(e){Be(e)&&(xe(`preset-click`),ue(!1,{force:!0}))},pt=function(e){Xe(e)},mt=function(e){lt(e?Ye(e,Se):null,`cell`)},ht=function(e){ue(!0),Oe(e)},gt=function(){xe(`panel`)},_t=function(e){he(hD(_e,Se,e)),!g&&!a&&i===Fe&&Xe(e)},vt=function(){ue(!1)},yt=ED(ne,re,ie,XF(Se)),bt=_e[Se]||null,xt=In(function(e){return c(e,{activeIndex:Se})}),St=S.useMemo(function(){var e=Vu(r,!1);return Sr(r,[].concat(PF(Object.keys(e)),[`onChange`,`onCalendarChange`,`style`,`className`,`onPanelChange`,`disabledTime`,`classNames`,`styles`]))},[r]),Ct=S.createElement(_P,NF({},St,{showNow:Le,showTime:Ae,range:!0,multiplePanel:Ie,activeInfo:st,disabledDate:Ve,onFocus:ht,onBlur:ke,onPanelMouseDown:gt,picker:k,mode:Pe,internalMode:Fe,onPanelChange:Je,format:s,value:bt,isInvalid:xt,onChange:null,onSelect:_t,pickerValue:Ke,defaultOpenValue:mD(M?.defaultOpenValue)[Se],onPickerValueChange:qe,hoverValue:at,onHover:mt,needConfirm:g,onSubmit:Xe,onOk:ge,presets:ut,onPresetHover:dt,onPresetSubmit:ft,onNow:pt,cellRender:yt,classNames:K,styles:se})),wt=function(e,t){he(Ye(e,t))},Tt=function(){xe(`input`)},Et=function(e,t){var n=Te.length,r=Te[n-1];if(n&&r!==t&&g&&!y[r]&&!De(r)&&_e[r]){G.current.focus({index:r});return}xe(`input`),ue(!0,{inherit:!0}),Se!==t&&q&&!g&&a&&Xe(null,!0),Ce(t),Oe(e,t)},Dt=function(e,t){ue(!1),!g&&xe()===`input`&&ze(Se,we(_e)===null),ke(e,t)},Ot=function(e,t){e.key===`Tab`&&Xe(null,!0),_?.(e,t)},kt=S.useMemo(function(){return{prefixCls:l,locale:D,generateConfig:O,button:te.button,input:te.input,classNames:K,styles:se}},[l,D,O,te.button,te.input,K,se]);return zn(function(){q&&Se!==void 0&&Je(null,k,!1)},[q,Se,k]),zn(function(){var e=xe();!q&&e===`input`&&(ue(!1),Xe(null,!0)),!q&&a&&!g&&e===`panel`&&(ue(!0),Xe())},[q]),S.createElement(eD.Provider,{value:kt},S.createElement(oD,NF({},yD(r),{popupElement:Ct,popupStyle:se.popup.root,popupClassName:J(u,K.popup.root),visible:q,onClose:vt,range:!0}),S.createElement(wF,NF({},r,{ref:G,className:J(r.className,u,K.root),style:zF(zF({},se.root),r.style),suffixIcon:V,activeIndex:ye||q?Se:null,activeHelp:!!rt,allHelp:!!rt&&et===`preset`,focused:ye,onFocus:Et,onBlur:Dt,onKeyDown:Ot,onSubmit:Xe,value:at,maskFormat:s,onChange:wt,onInputChange:Tt,format:o,inputReadOnly:B,disabled:v,open:q,onOpenChange:ue,onClick:Ze,onClear:Qe,invalid:Ue,onInvalid:We,onActiveInfo:ct}))))}var QF=S.forwardRef(ZF);function $F(e){var t=e.prefixCls,n=e.value,r=e.onRemove,i=e.removeIcon,a=i===void 0?`×`:i,o=e.formatDate,s=e.disabled,c=e.maxTagCount,l=e.placeholder,u=`${t}-selector`,d=`${t}-selection`,f=`${d}-overflow`;function p(e,t){return S.createElement(`span`,{className:J(`${d}-item`),title:typeof e==`string`?e:null},S.createElement(`span`,{className:`${d}-item-content`},e),!s&&t&&S.createElement(`span`,{onMouseDown:function(e){e.preventDefault()},onClick:t,className:`${d}-item-remove`},a))}function m(e){return p(o(e),function(t){t&&t.stopPropagation(),r(e)})}function h(e){return p(`+ ${e.length} ...`)}return S.createElement(`div`,{className:u},S.createElement(Qx,{prefixCls:f,data:n,renderItem:m,renderRest:h,itemKey:function(e){return o(e)},maxCount:c}),!n.length&&S.createElement(`span`,{className:`${t}-selection-placeholder`},l))}function eI(e){"@babel/helpers - typeof";return eI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},eI(e)}var tI=`id.open.prefix.clearIcon.suffixIcon.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.internalPicker.value.onChange.onSubmit.onInputChange.multiple.maxTagCount.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onMouseDown.required.aria-required.autoFocus.tabIndex.removeIcon`.split(`.`);function nI(){return nI=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hI(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function gI(e,t){e.id;var n=e.open,r=e.prefix,i=e.clearIcon,a=e.suffixIcon;e.activeHelp,e.allHelp;var o=e.focused;e.onFocus,e.onBlur,e.onKeyDown;var s=e.locale,c=e.generateConfig,l=e.placeholder,u=e.className,d=e.style,f=e.onClick,p=e.onClear,m=e.internalPicker,h=e.value,g=e.onChange,_=e.onSubmit;e.onInputChange;var v=e.multiple,y=e.maxTagCount;e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var b=e.disabled,x=e.invalid;e.inputReadOnly;var C=e.direction;e.onOpenChange;var w=e.onMouseDown;e.required,e[`aria-required`];var T=e.autoFocus,E=e.tabIndex,D=e.removeIcon,O=mI(e,tI),k=C===`rtl`,A=S.useContext(eD),j=A.prefixCls,M=A.classNames,N=A.styles,P=S.useRef(),F=S.useRef();S.useImperativeHandle(t,function(){return{nativeElement:P.current,focus:function(e){var t;(t=F.current)==null||t.focus(e)},blur:function(){var e;(e=F.current)==null||e.blur()}}});var I=EP(O),L=function(e){g([e])},R=function(e){g(h.filter(function(t){return t&&!xO(c,s,t,e,m)})),n||_()},z=cI(wP(iI(iI({},e),{},{onChange:L}),function(e){return{value:e.valueTexts[0]||``,active:o}}),2),B=z[0],V=z[1],H=!!(i&&h.length&&!b),U=v?S.createElement(S.Fragment,null,S.createElement($F,{prefixCls:j,value:h,onRemove:R,formatDate:V,maxTagCount:y,disabled:b,removeIcon:D,placeholder:l}),S.createElement(`input`,{className:`${j}-multiple-input`,value:h.map(V).join(`,`),ref:F,readOnly:!0,autoFocus:T,tabIndex:E}),S.createElement(MP,{type:`suffix`,icon:a}),H&&S.createElement(NP,{icon:i,onClear:p})):S.createElement(aF,nI({ref:F},B(),{autoFocus:T,tabIndex:E,suffixIcon:a,clearIcon:H&&S.createElement(NP,{icon:i,onClear:p}),showActiveCls:!1}));return S.createElement(`div`,nI({},I,{className:J(j,aI(aI(aI(aI(aI({},`${j}-multiple`,v),`${j}-focused`,o),`${j}-disabled`,b),`${j}-invalid`,x),`${j}-rtl`,k),u),style:d,ref:P,onClick:f,onMouseDown:function(e){e.target!==F.current?.inputElement&&e.preventDefault(),w?.(e)}}),r&&S.createElement(`div`,{className:J(`${j}-prefix`,M.prefix),style:N.prefix},r),U)}var _I=S.forwardRef(gI);function vI(e){"@babel/helpers - typeof";return vI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},vI(e)}function yI(){return yI=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0&&G.current.focus({index:n})}ue(!0),ae?.(e)},Qe=function(){Be(null),ue(!1,{force:!0})},$e=UF(S.useState(null),2),et=$e[0],tt=$e[1],nt=UF(S.useState(null),2),rt=nt[0],it=nt[1],at=S.useMemo(function(){return rt||_e},[_e,rt]);S.useEffect(function(){q||it(null)},[q]);var ot=UF(S.useState([0,0,0]),2),st=ot[0],ct=ot[1],lt=function(e,t){p===`hover`&&(it(e),tt(t))},ut=vk(W,ee),dt=function(e){lt(e,`preset`)},ft=function(e){Be(e)&&(xe(`preset-click`),ue(!1,{force:!0}))},pt=function(e){Xe(e)},mt=function(e){lt(e?Ye(e,Se):null,`cell`)},ht=function(e){ue(!0),Oe(e)},gt=function(){xe(`panel`)},_t=function(e){he(mD(_e,Se,e)),!g&&!a&&i===Fe&&Xe(e)},vt=function(){ue(!1)},yt=TD(ne,re,ie,XF(Se)),bt=_e[Se]||null,xt=In(function(e){return c(e,{activeIndex:Se})}),St=S.useMemo(function(){var e=Vu(r,!1);return Sr(r,[].concat(PF(Object.keys(e)),[`onChange`,`onCalendarChange`,`style`,`className`,`onPanelChange`,`disabledTime`,`classNames`,`styles`]))},[r]),Ct=S.createElement(_P,NF({},St,{showNow:Le,showTime:Ae,range:!0,multiplePanel:Ie,activeInfo:st,disabledDate:Ve,onFocus:ht,onBlur:ke,onPanelMouseDown:gt,picker:k,mode:Pe,internalMode:Fe,onPanelChange:Je,format:s,value:bt,isInvalid:xt,onChange:null,onSelect:_t,pickerValue:Ke,defaultOpenValue:pD(M?.defaultOpenValue)[Se],onPickerValueChange:qe,hoverValue:at,onHover:mt,needConfirm:g,onSubmit:Xe,onOk:ge,presets:ut,onPresetHover:dt,onPresetSubmit:ft,onNow:pt,cellRender:yt,classNames:K,styles:se})),wt=function(e,t){he(Ye(e,t))},Tt=function(){xe(`input`)},Et=function(e,t){var n=Te.length,r=Te[n-1];if(n&&r!==t&&g&&!y[r]&&!De(r)&&_e[r]){G.current.focus({index:r});return}xe(`input`),ue(!0,{inherit:!0}),Se!==t&&q&&!g&&a&&Xe(null,!0),Ce(t),Oe(e,t)},Dt=function(e,t){ue(!1),!g&&xe()===`input`&&ze(Se,we(_e)===null),ke(e,t)},Ot=function(e,t){e.key===`Tab`&&Xe(null,!0),_?.(e,t)},kt=S.useMemo(function(){return{prefixCls:l,locale:D,generateConfig:O,button:te.button,input:te.input,classNames:K,styles:se}},[l,D,O,te.button,te.input,K,se]);return zn(function(){q&&Se!==void 0&&Je(null,k,!1)},[q,Se,k]),zn(function(){var e=xe();!q&&e===`input`&&(ue(!1),Xe(null,!0)),!q&&a&&!g&&e===`panel`&&(ue(!0),Xe())},[q]),S.createElement($E.Provider,{value:kt},S.createElement(aD,NF({},vD(r),{popupElement:Ct,popupStyle:se.popup.root,popupClassName:J(u,K.popup.root),visible:q,onClose:vt,range:!0}),S.createElement(wF,NF({},r,{ref:G,className:J(r.className,u,K.root),style:zF(zF({},se.root),r.style),suffixIcon:V,activeIndex:ye||q?Se:null,activeHelp:!!rt,allHelp:!!rt&&et===`preset`,focused:ye,onFocus:Et,onBlur:Dt,onKeyDown:Ot,onSubmit:Xe,value:at,maskFormat:s,onChange:wt,onInputChange:Tt,format:o,inputReadOnly:B,disabled:v,open:q,onOpenChange:ue,onClick:Ze,onClear:Qe,invalid:Ue,onInvalid:We,onActiveInfo:ct}))))}var QF=S.forwardRef(ZF);function $F(e){var t=e.prefixCls,n=e.value,r=e.onRemove,i=e.removeIcon,a=i===void 0?`×`:i,o=e.formatDate,s=e.disabled,c=e.maxTagCount,l=e.placeholder,u=`${t}-selector`,d=`${t}-selection`,f=`${d}-overflow`;function p(e,t){return S.createElement(`span`,{className:J(`${d}-item`),title:typeof e==`string`?e:null},S.createElement(`span`,{className:`${d}-item-content`},e),!s&&t&&S.createElement(`span`,{onMouseDown:function(e){e.preventDefault()},onClick:t,className:`${d}-item-remove`},a))}function m(e){return p(o(e),function(t){t&&t.stopPropagation(),r(e)})}function h(e){return p(`+ ${e.length} ...`)}return S.createElement(`div`,{className:u},S.createElement(Qx,{prefixCls:f,data:n,renderItem:m,renderRest:h,itemKey:function(e){return o(e)},maxCount:c}),!n.length&&S.createElement(`span`,{className:`${t}-selection-placeholder`},l))}function eI(e){"@babel/helpers - typeof";return eI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},eI(e)}var tI=`id.open.prefix.clearIcon.suffixIcon.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.internalPicker.value.onChange.onSubmit.onInputChange.multiple.maxTagCount.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onMouseDown.required.aria-required.autoFocus.tabIndex.removeIcon`.split(`.`);function nI(){return nI=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hI(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function gI(e,t){e.id;var n=e.open,r=e.prefix,i=e.clearIcon,a=e.suffixIcon;e.activeHelp,e.allHelp;var o=e.focused;e.onFocus,e.onBlur,e.onKeyDown;var s=e.locale,c=e.generateConfig,l=e.placeholder,u=e.className,d=e.style,f=e.onClick,p=e.onClear,m=e.internalPicker,h=e.value,g=e.onChange,_=e.onSubmit;e.onInputChange;var v=e.multiple,y=e.maxTagCount;e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var b=e.disabled,x=e.invalid;e.inputReadOnly;var C=e.direction;e.onOpenChange;var w=e.onMouseDown;e.required,e[`aria-required`];var T=e.autoFocus,E=e.tabIndex,D=e.removeIcon,O=mI(e,tI),k=C===`rtl`,A=S.useContext($E),j=A.prefixCls,M=A.classNames,N=A.styles,P=S.useRef(),F=S.useRef();S.useImperativeHandle(t,function(){return{nativeElement:P.current,focus:function(e){var t;(t=F.current)==null||t.focus(e)},blur:function(){var e;(e=F.current)==null||e.blur()}}});var I=EP(O),L=function(e){g([e])},R=function(e){g(h.filter(function(t){return t&&!bO(c,s,t,e,m)})),n||_()},z=cI(wP(iI(iI({},e),{},{onChange:L}),function(e){return{value:e.valueTexts[0]||``,active:o}}),2),B=z[0],V=z[1],H=!!(i&&h.length&&!b),U=v?S.createElement(S.Fragment,null,S.createElement($F,{prefixCls:j,value:h,onRemove:R,formatDate:V,maxTagCount:y,disabled:b,removeIcon:D,placeholder:l}),S.createElement(`input`,{className:`${j}-multiple-input`,value:h.map(V).join(`,`),ref:F,readOnly:!0,autoFocus:T,tabIndex:E}),S.createElement(MP,{type:`suffix`,icon:a}),H&&S.createElement(NP,{icon:i,onClear:p})):S.createElement(aF,nI({ref:F},B(),{autoFocus:T,tabIndex:E,suffixIcon:a,clearIcon:H&&S.createElement(NP,{icon:i,onClear:p}),showActiveCls:!1}));return S.createElement(`div`,nI({},I,{className:J(j,aI(aI(aI(aI(aI({},`${j}-multiple`,v),`${j}-focused`,o),`${j}-disabled`,b),`${j}-invalid`,x),`${j}-rtl`,k),u),style:d,ref:P,onClick:f,onMouseDown:function(e){e.target!==F.current?.inputElement&&e.preventDefault(),w?.(e)}}),r&&S.createElement(`div`,{className:J(`${j}-prefix`,M.prefix),style:N.prefix},r),U)}var _I=S.forwardRef(gI);function vI(e){"@babel/helpers - typeof";return vI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},vI(e)}function yI(){return yI=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne??{...t,__INTERNAL__:{itemRef:e=>t=>{let r=HI(e);t?n.current[r]=t:delete n.current[r]}},scrollToField:(e,t={})=>{let{focus:n,...i}=t,a=UI(e,r);a&&(hf(a,{scrollMode:`if-needed`,block:`nearest`,...i}),n&&r.focusField(e))},focusField:e=>{let t=r.getFieldInstance(e);typeof t?.focus==`function`?t.focus():UI(e,r)?.focus?.()},getFieldInstance:e=>{let t=HI(e);return n.current[t]}},[e,t]);return[r]}var GI=S.createContext(void 0),KI=GI.Provider,qI=S.createContext(void 0),mte=qI.Provider;function JI(){return JI=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n=`rc-checkbox`,className:r,style:i,checked:a,disabled:o,defaultChecked:s=!1,type:c=`checkbox`,title:l,onChange:u,...d}=e,f=(0,S.useRef)(null),p=(0,S.useRef)(null),[m,h]=Hn(s,a);(0,S.useImperativeHandle)(t,()=>({focus:e=>{f.current?.focus(e)},blur:()=>{f.current?.blur()},input:f.current,nativeElement:p.current}));let g=J(n,r,{[`${n}-checked`]:m,[`${n}-disabled`]:o});return S.createElement(`span`,{className:g,title:l,style:i,ref:p},S.createElement(`input`,JI({},d,{className:`${n}-input`,ref:f,onChange:t=>{o||(`checked`in e||h(t.target.checked),u?.({target:{...e,type:c,checked:t.target.checked},stopPropagation(){t.stopPropagation()},preventDefault(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:o,checked:!!m,type:c})))});function XI(e){let t=S.useRef(null),n=()=>{ri.cancel(t.current),t.current=null};return[()=>{n(),t.current=ri(()=>{t.current=null})},r=>{t.current&&(r.stopPropagation(),n()),e?.(r)}]}var hte=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:{...Jc(e),display:`inline-block`,fontSize:0,[`&${r}-rtl`]:{direction:`rtl`},[`&${r}-block`]:{display:`flex`},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:`none`},"&-vertical":{display:`flex`,flexDirection:`column`,rowGap:e.marginXS,[`${t}-wrapper`]:{marginInlineEnd:0}}}}},gte=e=>{let{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,colorPrimaryHover:i,radioSize:a,motionDurationSlow:o,motionDurationMid:s,motionEaseInOutCirc:c,colorBgContainer:l,colorBorder:u,lineWidth:d,colorBgContainerDisabled:f,colorTextDisabled:p,paddingXS:m,dotColorDisabled:h,dotSize:g,lineType:_,radioColor:v,radioBgColor:y}=e;return{[`${t}-wrapper`]:{...Jc(e),display:`inline-flex`,alignItems:`baseline`,marginInlineStart:0,marginInlineEnd:n,cursor:`pointer`,"&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:`rtl`},"&-disabled":{cursor:`not-allowed`,color:e.colorTextDisabled},"&::after":{display:`inline-block`,width:0,overflow:`hidden`,content:`"\\a0"`},"&-block":{flex:1,justifyContent:`center`},[t]:{...Jc(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:`calc(${a} * 1px)`,height:`calc(${a} * 1px)`,backgroundColor:l,border:`${Y(d)} ${_} ${u}`,borderRadius:`50%`,transition:`all ${s}`,flex:`none`,"&:after":{content:`""`,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%) scale(0)`,width:`calc(${g} * 1px)`,height:`calc(${g} * 1px)`,backgroundColor:v,borderRadius:`50%`,transformOrigin:`50% 50%`,opacity:0,transition:`all ${o} ${c}`},[`${t}-input`]:{position:`absolute`,inset:0,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:Zc(e)},[`&:hover:not(${t}-wrapper-disabled) ${t}`]:{borderColor:r},[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:i,borderColor:`transparent`},[`${t}-checked`]:{backgroundColor:y,borderColor:r,"&::after":{transform:`translate(-50%, -50%)`,opacity:1}},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:f,borderColor:u,"&::after":{backgroundColor:h}},[`${t}-disabled + span`]:{color:p,cursor:`not-allowed`},[`span${t} + *`]:{paddingInlineStart:m,paddingInlineEnd:m}}}},_te=e=>{let{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:i,lineType:a,colorBorder:o,motionDurationMid:s,buttonPaddingInline:c,fontSize:l,buttonBg:u,fontSizeLG:d,controlHeightLG:f,controlHeightSM:p,paddingXS:m,borderRadius:h,borderRadiusSM:g,borderRadiusLG:_,buttonCheckedBg:v,buttonSolidCheckedColor:y,colorTextDisabled:b,colorBgContainerDisabled:x,buttonCheckedBgDisabled:S,buttonCheckedColorDisabled:C,colorPrimary:w,colorPrimaryHover:T,colorPrimaryActive:E,buttonSolidCheckedBg:D,buttonSolidCheckedHoverBg:O,buttonSolidCheckedActiveBg:k,calc:A}=e;return{[`${r}-button-wrapper`]:{position:`relative`,display:`inline-block`,height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:l,lineHeight:Y(A(n).sub(A(i).mul(2)).equal()),background:u,border:`${Y(i)} ${a} ${o}`,borderBlockStartWidth:A(i).add(.02).equal(),borderInlineEndWidth:i,cursor:`pointer`,transition:[`color`,`background-color`,`box-shadow`].map(e=>`${e} ${s}`).join(`,`),a:{color:t},[`> ${r}-button`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:`100%`,height:`100%`},"&:not(:last-child)":{marginInlineEnd:A(i).mul(-1).equal()},"&:first-child":{borderInlineStart:`${Y(i)} ${a} ${o}`,borderStartStartRadius:h,borderEndStartRadius:h},"&:last-child":{borderStartEndRadius:h,borderEndEndRadius:h},"&:first-child:last-child":{borderRadius:h},[`${r}-group-large &`]:{height:f,fontSize:d,lineHeight:Y(A(f).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:_,borderEndStartRadius:_},"&:last-child":{borderStartEndRadius:_,borderEndEndRadius:_}},[`${r}-group-small &`]:{height:p,paddingInline:A(m).sub(i).equal(),paddingBlock:0,lineHeight:Y(A(p).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g}},"&:hover":{position:`relative`,color:w},"&:has(:focus-visible)":Zc(e),[`${r}, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:`none`},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:w,background:v,borderColor:w,"&::before":{backgroundColor:w},"&:first-child":{borderColor:w},"&:hover":{color:T,borderColor:T,"&::before":{backgroundColor:T}},"&:active":{color:E,borderColor:E,"&::before":{backgroundColor:E}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:y,background:D,borderColor:D,"&:hover":{color:y,background:O,borderColor:O},"&:active":{color:y,background:k,borderColor:k}},"&-disabled":{color:b,backgroundColor:x,borderColor:o,cursor:`not-allowed`,"&:first-child, &:hover":{color:b,backgroundColor:x,borderColor:o}},[`&-disabled${r}-button-wrapper-checked`]:{color:C,backgroundColor:S,borderColor:o,boxShadow:`none`},"&-block":{flex:1,textAlign:`center`}}}},ZI=rl(`Radio`,e=>{let{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${Y(n)} ${t}`,i=gs(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[hte(i),gte(i),_te(i)]},e=>{let{wireframe:t,padding:n,marginXS:r,lineWidth:i,fontSizeLG:a,colorText:o,colorBgContainer:s,colorTextDisabled:c,controlItemBgActiveDisabled:l,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:f,colorPrimaryActive:p,colorWhite:m}=e,h=a;return{radioSize:h,dotSize:t?h-8:h-(4+i)*2,dotColorDisabled:c,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:p,buttonBg:s,buttonCheckedBg:s,buttonColor:o,buttonCheckedBgDisabled:l,buttonCheckedColorDisabled:c,buttonPaddingInline:n-i,wrapperMarginInlineEnd:r,radioColor:t?d:m,radioBgColor:t?s:d}},{unitless:{radioSize:!0,dotSize:!0}}),QI=S.forwardRef((e,t)=>{let n=S.useContext(GI),r=S.useContext(qI),{getPrefixCls:i,direction:a,className:o,style:s,classNames:c,styles:l}=li(`radio`),u=$n(t,S.useRef(null)),{isFormItemInput:d}=S.useContext(Sy),f=t=>{e.onChange?.(t),n?.onChange?.(t)},{prefixCls:p,className:m,rootClassName:h,children:g,style:_,title:v,classNames:y,styles:b,...x}=e,C=i(`radio`,p),w=(n?.optionType||r)===`button`,T=w?`${C}-button`:C,E=bf(C),[D,O]=ZI(C,E),k={...x},A=S.useContext(zp),j=k.checked;n&&(k.name=n.name,k.onChange=f,j=e.value===n.value,k.disabled=k.disabled??n.disabled),k.disabled=k.disabled??A;let M={...e,...k,checked:j},[N,P]=Fd([c,y],[l,b],{props:M}),F=J(`${T}-wrapper`,{[`${T}-wrapper-checked`]:j,[`${T}-wrapper-disabled`]:k.disabled,[`${T}-wrapper-rtl`]:a===`rtl`,[`${T}-wrapper-in-form-item`]:d,[`${T}-wrapper-block`]:!!n?.block},o,m,h,N.root,D,O,E),[I,L]=XI(k.onClick);return S.createElement(eh,{component:`Radio`,disabled:k.disabled},S.createElement(`label`,{className:F,style:{...P.root,...s,..._},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:v,onClick:I},S.createElement(YI,{...k,checked:j,className:J(N.icon,{[qm]:!w}),style:P.icon,type:`radio`,prefixCls:T,ref:u,onClick:L}),g===void 0?null:S.createElement(`span`,{className:J(`${T}-label`,N.label),style:P.label},g)))}),vte=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=S.useContext(oi),{name:i}=S.useContext(Sy),a=zf(HI(i)),{prefixCls:o,className:s,rootClassName:c,options:l,buttonStyle:u=`outline`,disabled:d,children:f,size:p,style:m,id:h,optionType:g,name:_=a,defaultValue:v,value:y,block:b=!1,onChange:x,onMouseEnter:C,onMouseLeave:w,onFocus:T,onBlur:E,orientation:D,vertical:O,role:k=`radiogroup`}=e,[A,j]=Hn(v,y),M=S.useCallback(t=>{let n=A,r=t.target.value;`value`in e||j(r),r!==n&&x?.(t)},[A,j,x]),N=n(`radio`,o),P=`${N}-group`,F=bf(N),[I,L]=ZI(N,F),R=f;l&&l.length>0&&(R=l.map(e=>typeof e==`string`||pd(e)?S.createElement(QI,{key:e.toString(),prefixCls:N,disabled:d,value:e,checked:A===e},e):S.createElement(QI,{key:`radio-group-value-options-${e.value}`,prefixCls:N,disabled:e.disabled||d,value:e.value,checked:A===e.value,title:e.title,style:e.style,className:e.className,id:e.id,required:e.required},e.label)));let z=th(p),[,B]=Rd(D,O),V=J(P,`${P}-${u}`,{[`${P}-large`]:z===`large`,[`${P}-small`]:z===`small`,[`${P}-rtl`]:r===`rtl`,[`${P}-block`]:b},s,c,I,L,F),H=S.useMemo(()=>({onChange:M,value:A,disabled:d,name:_,optionType:g,block:b}),[M,A,d,_,g,b]);return S.createElement(`div`,{...Vu(e,{aria:!0,data:!0}),role:k,className:J(V,{[`${N}-group-vertical`]:B}),style:m,onMouseEnter:C,onMouseLeave:w,onFocus:T,onBlur:E,id:h,ref:t},S.createElement(KI,{value:H},R))}),yte=S.memo(vte),bte=S.forwardRef((e,t)=>{let{getPrefixCls:n}=S.useContext(oi),{prefixCls:r,...i}=e,a=n(`radio`,r);return S.createElement(mte,{value:`button`},S.createElement(QI,{prefixCls:a,...i,type:`radio`,ref:t}))}),$I=QI;$I.Button=bte,$I.Group=yte,$I.__ANT_RADIO=!0;function eL(e){return gs(e,{inputAffixPadding:e.paddingXXS})}var tL=e=>{let{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:a,controlHeightLG:o,fontSizeLG:s,lineHeightLG:c,paddingSM:l,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:p,colorPrimary:m,controlOutlineWidth:h,controlOutline:g,colorErrorOutline:_,colorWarningOutline:v,colorBgContainer:y,inputFontSize:b,inputFontSizeLG:x,inputFontSizeSM:S}=e,C=b||n,w=S||C,T=x||s,E=Math.round((t-C*r)/2*10)/10-i,D=Math.round((a-w*r)/2*10)/10-i,O=Math.ceil((o-T*c)/2*10)/10-i;return{paddingBlock:Math.max(E,0),paddingBlockSM:Math.max(D,0),paddingBlockLG:Math.max(O,0),paddingInline:l-i,paddingInlineSM:u-i,paddingInlineLG:d-i,addonBg:f,activeBorderColor:m,hoverBorderColor:p,activeShadow:`0 0 0 ${h}px ${g}`,errorActiveShadow:`0 0 0 ${h}px ${_}`,warningActiveShadow:`0 0 0 ${h}px ${v}`,hoverBg:y,activeBg:y,inputFontSize:C,inputFontSizeLG:T,inputFontSizeSM:w}},xte=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),nL=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorderDisabled,boxShadow:`none`,cursor:`not-allowed`,opacity:1,"input[disabled], textarea[disabled]":{cursor:`not-allowed`},"&:hover:not([disabled])":{...xte(gs(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),rL=(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}}),iL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...rL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),aL=(e,t)=>({"&-outlined":{...rL(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...nL(e)},...iL(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...iL(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),oL=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),Ste=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...oL(e,{status:`error`,addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...oL(e,{status:`warning`,addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...nL(e)}}}}),sL=(e,t)=>{let{componentCls:n}=e;return{"&-borderless":{background:`transparent`,border:`none`,paddingBlock:e.calc(e.paddingBlock).add(e.lineWidth).equal(),[`&${n}-sm, &${n}-affix-wrapper-sm`]:{paddingBlock:e.calc(e.paddingBlockSM).add(e.lineWidth).equal()},[`&${n}-lg, &${n}-affix-wrapper-lg`]:{paddingBlock:e.calc(e.paddingBlockLG).add(e.lineWidth).equal()},"&: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}}},cL=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:`transparent`,"input&, & input, textarea&, & textarea":{color:t?.inputColor??`unset`},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),lL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...cL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),uL=(e,t)=>({"&-filled":{...cL(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...nL(e)},...lL(e,{status:`error`,bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError}),...lL(e,{status:`warning`,bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning}),...t}}),dL=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),Cte=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:`static`}},...dL(e,{status:`error`,addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...dL(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:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),fL=(e,t)=>({background:e.colorBgContainer,borderWidth:`${Y(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),pL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...fL(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`}}),mL=(e,t)=>({"&-underlined":{...fL(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`},...pL(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...pL(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),hL=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:`none`},"&:placeholder-shown":{textOverflow:`ellipsis`}}),gL=e=>{let{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=e;return{padding:`${Y(t)} ${Y(i)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},_L=e=>({padding:`${Y(e.paddingBlockSM)} ${Y(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),vL=(e,t={})=>({position:`relative`,display:`inline-block`,width:`100%`,minWidth:0,padding:`${Y(e.paddingBlock)} ${Y(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...hL(e.colorTextPlaceholder),"&-lg":{...gL(e),...t.largeStyle},"&-sm":{..._L(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:`rtl`}}),wte=e=>{let{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`]:{...gL(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{..._L(e)},[`&-lg ${n}-select-single`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single`]:{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 ${Y(e.paddingInline)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.inputFontSize,textAlign:`center`,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${Y(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${Y(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{backgroundColor:`inherit`,border:`${Y(e.lineWidth)} ${e.lineType} transparent`,boxShadow:`none`}},[`${n}-cascader-picker`]:{margin:`-9px ${Y(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}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select`]:{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`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:`block`,...Xc(),[`${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},[` +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jI(e,t){if(e){if(typeof e==`string`)return MI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return MI(e,t)}}function MI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne??{...t,__INTERNAL__:{itemRef:e=>t=>{let r=HI(e);t?n.current[r]=t:delete n.current[r]}},scrollToField:(e,t={})=>{let{focus:n,...i}=t,a=UI(e,r);a&&(hf(a,{scrollMode:`if-needed`,block:`nearest`,...i}),n&&r.focusField(e))},focusField:e=>{let t=r.getFieldInstance(e);typeof t?.focus==`function`?t.focus():UI(e,r)?.focus?.()},getFieldInstance:e=>{let t=HI(e);return n.current[t]}},[e,t]);return[r]}var GI=S.createContext(void 0),KI=GI.Provider,qI=S.createContext(void 0),mte=qI.Provider;function JI(){return JI=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n=`rc-checkbox`,className:r,style:i,checked:a,disabled:o,defaultChecked:s=!1,type:c=`checkbox`,title:l,onChange:u,...d}=e,f=(0,S.useRef)(null),p=(0,S.useRef)(null),[m,h]=Hn(s,a);(0,S.useImperativeHandle)(t,()=>({focus:e=>{f.current?.focus(e)},blur:()=>{f.current?.blur()},input:f.current,nativeElement:p.current}));let g=J(n,r,{[`${n}-checked`]:m,[`${n}-disabled`]:o});return S.createElement(`span`,{className:g,title:l,style:i,ref:p},S.createElement(`input`,JI({},d,{className:`${n}-input`,ref:f,onChange:t=>{o||(`checked`in e||h(t.target.checked),u?.({target:{...e,type:c,checked:t.target.checked},stopPropagation(){t.stopPropagation()},preventDefault(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:o,checked:!!m,type:c})))});function XI(e){let t=S.useRef(null),n=()=>{ri.cancel(t.current),t.current=null};return[()=>{n(),t.current=ri(()=>{t.current=null})},r=>{t.current&&(r.stopPropagation(),n()),e?.(r)}]}var hte=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:{...Jc(e),display:`inline-block`,fontSize:0,[`&${r}-rtl`]:{direction:`rtl`},[`&${r}-block`]:{display:`flex`},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:`none`},"&-vertical":{display:`flex`,flexDirection:`column`,rowGap:e.marginXS,[`${t}-wrapper`]:{marginInlineEnd:0}}}}},gte=e=>{let{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,colorPrimaryHover:i,radioSize:a,motionDurationSlow:o,motionDurationMid:s,motionEaseInOutCirc:c,colorBgContainer:l,colorBorder:u,lineWidth:d,colorBgContainerDisabled:f,colorTextDisabled:p,paddingXS:m,dotColorDisabled:h,dotSize:g,lineType:_,radioColor:v,radioBgColor:y}=e;return{[`${t}-wrapper`]:{...Jc(e),display:`inline-flex`,alignItems:`baseline`,marginInlineStart:0,marginInlineEnd:n,cursor:`pointer`,"&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:`rtl`},"&-disabled":{cursor:`not-allowed`,color:e.colorTextDisabled},"&::after":{display:`inline-block`,width:0,overflow:`hidden`,content:`"\\a0"`},"&-block":{flex:1,justifyContent:`center`},[t]:{...Jc(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:`calc(${a} * 1px)`,height:`calc(${a} * 1px)`,backgroundColor:l,border:`${Y(d)} ${_} ${u}`,borderRadius:`50%`,transition:`all ${s}`,flex:`none`,"&:after":{content:`""`,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%) scale(0)`,width:`calc(${g} * 1px)`,height:`calc(${g} * 1px)`,backgroundColor:v,borderRadius:`50%`,transformOrigin:`50% 50%`,opacity:0,transition:`all ${o} ${c}`},[`${t}-input`]:{position:`absolute`,inset:0,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:Zc(e)},[`&:hover:not(${t}-wrapper-disabled) ${t}`]:{borderColor:r},[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:i,borderColor:`transparent`},[`${t}-checked`]:{backgroundColor:y,borderColor:r,"&::after":{transform:`translate(-50%, -50%)`,opacity:1}},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:f,borderColor:u,"&::after":{backgroundColor:h}},[`${t}-disabled + span`]:{color:p,cursor:`not-allowed`},[`span${t} + *`]:{paddingInlineStart:m,paddingInlineEnd:m}}}},_te=e=>{let{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:i,lineType:a,colorBorder:o,motionDurationMid:s,buttonPaddingInline:c,fontSize:l,buttonBg:u,fontSizeLG:d,controlHeightLG:f,controlHeightSM:p,paddingXS:m,borderRadius:h,borderRadiusSM:g,borderRadiusLG:_,buttonCheckedBg:v,buttonSolidCheckedColor:y,colorTextDisabled:b,colorBgContainerDisabled:x,buttonCheckedBgDisabled:S,buttonCheckedColorDisabled:C,colorPrimary:w,colorPrimaryHover:T,colorPrimaryActive:E,buttonSolidCheckedBg:D,buttonSolidCheckedHoverBg:O,buttonSolidCheckedActiveBg:k,calc:A}=e;return{[`${r}-button-wrapper`]:{position:`relative`,display:`inline-block`,height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:l,lineHeight:Y(A(n).sub(A(i).mul(2)).equal()),background:u,border:`${Y(i)} ${a} ${o}`,borderBlockStartWidth:A(i).add(.02).equal(),borderInlineEndWidth:i,cursor:`pointer`,transition:[`color`,`background-color`,`box-shadow`].map(e=>`${e} ${s}`).join(`,`),a:{color:t},[`> ${r}-button`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:`100%`,height:`100%`},"&:not(:last-child)":{marginInlineEnd:A(i).mul(-1).equal()},"&:first-child":{borderInlineStart:`${Y(i)} ${a} ${o}`,borderStartStartRadius:h,borderEndStartRadius:h},"&:last-child":{borderStartEndRadius:h,borderEndEndRadius:h},"&:first-child:last-child":{borderRadius:h},[`${r}-group-large &`]:{height:f,fontSize:d,lineHeight:Y(A(f).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:_,borderEndStartRadius:_},"&:last-child":{borderStartEndRadius:_,borderEndEndRadius:_}},[`${r}-group-small &`]:{height:p,paddingInline:A(m).sub(i).equal(),paddingBlock:0,lineHeight:Y(A(p).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g}},"&:hover":{position:`relative`,color:w},"&:has(:focus-visible)":Zc(e),[`${r}, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:`none`},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:w,background:v,borderColor:w,"&::before":{backgroundColor:w},"&:first-child":{borderColor:w},"&:hover":{color:T,borderColor:T,"&::before":{backgroundColor:T}},"&:active":{color:E,borderColor:E,"&::before":{backgroundColor:E}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:y,background:D,borderColor:D,"&:hover":{color:y,background:O,borderColor:O},"&:active":{color:y,background:k,borderColor:k}},"&-disabled":{color:b,backgroundColor:x,borderColor:o,cursor:`not-allowed`,"&:first-child, &:hover":{color:b,backgroundColor:x,borderColor:o}},[`&-disabled${r}-button-wrapper-checked`]:{color:C,backgroundColor:S,borderColor:o,boxShadow:`none`},"&-block":{flex:1,textAlign:`center`}}}},ZI=rl(`Radio`,e=>{let{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${Y(n)} ${t}`,i=gs(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[hte(i),gte(i),_te(i)]},e=>{let{wireframe:t,padding:n,marginXS:r,lineWidth:i,fontSizeLG:a,colorText:o,colorBgContainer:s,colorTextDisabled:c,controlItemBgActiveDisabled:l,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:f,colorPrimaryActive:p,colorWhite:m}=e,h=a;return{radioSize:h,dotSize:t?h-8:h-(4+i)*2,dotColorDisabled:c,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:p,buttonBg:s,buttonCheckedBg:s,buttonColor:o,buttonCheckedBgDisabled:l,buttonCheckedColorDisabled:c,buttonPaddingInline:n-i,wrapperMarginInlineEnd:r,radioColor:t?d:m,radioBgColor:t?s:d}},{unitless:{radioSize:!0,dotSize:!0}}),QI=S.forwardRef((e,t)=>{let n=S.useContext(GI),r=S.useContext(qI),{getPrefixCls:i,direction:a,className:o,style:s,classNames:c,styles:l}=li(`radio`),u=$n(t,S.useRef(null)),{isFormItemInput:d}=S.useContext(Sy),f=t=>{e.onChange?.(t),n?.onChange?.(t)},{prefixCls:p,className:m,rootClassName:h,children:g,style:_,title:v,classNames:y,styles:b,...x}=e,C=i(`radio`,p),w=(n?.optionType||r)===`button`,T=w?`${C}-button`:C,E=bf(C),[D,O]=ZI(C,E),k={...x},A=S.useContext(zp),j=k.checked;n&&(k.name=n.name,k.onChange=f,j=e.value===n.value,k.disabled=k.disabled??n.disabled),k.disabled=k.disabled??A;let M={...e,...k,checked:j},[N,P]=Fd([c,y],[l,b],{props:M}),F=J(`${T}-wrapper`,{[`${T}-wrapper-checked`]:j,[`${T}-wrapper-disabled`]:k.disabled,[`${T}-wrapper-rtl`]:a===`rtl`,[`${T}-wrapper-in-form-item`]:d,[`${T}-wrapper-block`]:!!n?.block},o,m,h,N.root,D,O,E),[I,L]=XI(k.onClick);return S.createElement(eh,{component:`Radio`,disabled:k.disabled},S.createElement(`label`,{className:F,style:{...P.root,...s,..._},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:v,onClick:I},S.createElement(YI,{...k,checked:j,className:J(N.icon,{[qm]:!w}),style:P.icon,type:`radio`,prefixCls:T,ref:u,onClick:L}),g===void 0?null:S.createElement(`span`,{className:J(`${T}-label`,N.label),style:P.label},g)))}),vte=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=S.useContext(oi),{name:i}=S.useContext(Sy),a=zf(HI(i)),{prefixCls:o,className:s,rootClassName:c,options:l,buttonStyle:u=`outline`,disabled:d,children:f,size:p,style:m,id:h,optionType:g,name:_=a,defaultValue:v,value:y,block:b=!1,onChange:x,onMouseEnter:C,onMouseLeave:w,onFocus:T,onBlur:E,orientation:D,vertical:O,role:k=`radiogroup`}=e,[A,j]=Hn(v,y),M=S.useCallback(t=>{let n=A,r=t.target.value;`value`in e||j(r),r!==n&&x?.(t)},[A,j,x]),N=n(`radio`,o),P=`${N}-group`,F=bf(N),[I,L]=ZI(N,F),R=f;l&&l.length>0&&(R=l.map(e=>typeof e==`string`||pd(e)?S.createElement(QI,{key:e.toString(),prefixCls:N,disabled:d,value:e,checked:A===e},e):S.createElement(QI,{key:`radio-group-value-options-${e.value}`,prefixCls:N,disabled:e.disabled||d,value:e.value,checked:A===e.value,title:e.title,style:e.style,className:e.className,id:e.id,required:e.required},e.label)));let z=th(p),[,B]=Rd(D,O),V=J(P,`${P}-${u}`,{[`${P}-large`]:z===`large`,[`${P}-small`]:z===`small`,[`${P}-rtl`]:r===`rtl`,[`${P}-block`]:b},s,c,I,L,F),H=S.useMemo(()=>({onChange:M,value:A,disabled:d,name:_,optionType:g,block:b}),[M,A,d,_,g,b]);return S.createElement(`div`,{...Vu(e,{aria:!0,data:!0}),role:k,className:J(V,{[`${N}-group-vertical`]:B}),style:m,onMouseEnter:C,onMouseLeave:w,onFocus:T,onBlur:E,id:h,ref:t},S.createElement(KI,{value:H},R))}),yte=S.memo(vte),bte=S.forwardRef((e,t)=>{let{getPrefixCls:n}=S.useContext(oi),{prefixCls:r,...i}=e,a=n(`radio`,r);return S.createElement(mte,{value:`button`},S.createElement(QI,{prefixCls:a,...i,type:`radio`,ref:t}))}),$I=QI;$I.Button=bte,$I.Group=yte,$I.__ANT_RADIO=!0;function eL(e){return gs(e,{inputAffixPadding:e.paddingXXS})}var tL=e=>{let{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:a,controlHeightLG:o,fontSizeLG:s,lineHeightLG:c,paddingSM:l,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:p,colorPrimary:m,controlOutlineWidth:h,controlOutline:g,colorErrorOutline:_,colorWarningOutline:v,colorBgContainer:y,inputFontSize:b,inputFontSizeLG:x,inputFontSizeSM:S}=e,C=b||n,w=S||C,T=x||s,E=Math.round((t-C*r)/2*10)/10-i,D=Math.round((a-w*r)/2*10)/10-i,O=Math.ceil((o-T*c)/2*10)/10-i;return{paddingBlock:Math.max(E,0),paddingBlockSM:Math.max(D,0),paddingBlockLG:Math.max(O,0),paddingInline:l-i,paddingInlineSM:u-i,paddingInlineLG:d-i,addonBg:f,activeBorderColor:m,hoverBorderColor:p,activeShadow:`0 0 0 ${h}px ${g}`,errorActiveShadow:`0 0 0 ${h}px ${_}`,warningActiveShadow:`0 0 0 ${h}px ${v}`,hoverBg:y,activeBg:y,inputFontSize:C,inputFontSizeLG:T,inputFontSizeSM:w}},xte=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),nL=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorderDisabled,boxShadow:`none`,cursor:`not-allowed`,opacity:1,"input[disabled], textarea[disabled]":{cursor:`not-allowed`},"&:hover:not([disabled])":{...xte(gs(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),rL=(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}}),iL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...rL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),aL=(e,t)=>({"&-outlined":{...rL(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...nL(e)},...iL(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...iL(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),oL=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),Ste=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...oL(e,{status:`error`,addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...oL(e,{status:`warning`,addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...nL(e)}}}}),sL=(e,t)=>{let{componentCls:n}=e;return{"&-borderless":{background:`transparent`,border:`none`,paddingBlock:e.calc(e.paddingBlock).add(e.lineWidth).equal(),[`&${n}-sm, &${n}-affix-wrapper-sm`]:{paddingBlock:e.calc(e.paddingBlockSM).add(e.lineWidth).equal()},[`&${n}-lg, &${n}-affix-wrapper-lg`]:{paddingBlock:e.calc(e.paddingBlockLG).add(e.lineWidth).equal()},"&: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}}},cL=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:`transparent`,"input&, & input, textarea&, & textarea":{color:t?.inputColor??`unset`},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),lL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...cL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),uL=(e,t)=>({"&-filled":{...cL(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...nL(e)},...lL(e,{status:`error`,bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError}),...lL(e,{status:`warning`,bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning}),...t}}),dL=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),Cte=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:`static`}},...dL(e,{status:`error`,addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...dL(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:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),fL=(e,t)=>({background:e.colorBgContainer,borderWidth:`${Y(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),pL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...fL(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`}}),mL=(e,t)=>({"&-underlined":{...fL(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`},...pL(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...pL(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),hL=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:`none`},"&:placeholder-shown":{textOverflow:`ellipsis`}}),gL=e=>{let{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=e;return{padding:`${Y(t)} ${Y(i)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},_L=e=>({padding:`${Y(e.paddingBlockSM)} ${Y(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),vL=(e,t={})=>({position:`relative`,display:`inline-block`,width:`100%`,minWidth:0,padding:`${Y(e.paddingBlock)} ${Y(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...hL(e.colorTextPlaceholder),"&-lg":{...gL(e),...t.largeStyle},"&-sm":{..._L(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:`rtl`}}),wte=e=>{let{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`]:{...gL(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{..._L(e)},[`&-lg ${n}-select-single`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single`]:{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 ${Y(e.paddingInline)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.inputFontSize,textAlign:`center`,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${Y(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${Y(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{backgroundColor:`inherit`,border:`${Y(e.lineWidth)} ${e.lineType} transparent`,boxShadow:`none`}},[`${n}-cascader-picker`]:{margin:`-9px ${Y(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}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select`]:{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`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:`block`,...Xc(),[`${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},[` & > ${t}-affix-wrapper, & > ${t}-number-affix-wrapper, & > ${n}-picker-range @@ -291,7 +291,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:`relative`,zIndex:1,boxShadow:r}}},wR=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:a,actionsBg:o}=e;return{margin:0,padding:0,listStyle:`none`,background:o,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${a}`,display:`flex`,borderRadius:`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`,...Xc(),"& > li":{margin:r,color:e.colorTextDescription,textAlign:`center`,"> span":{position:`relative`,display:`block`,minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,"&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:`inline-block`,width:`100%`,color:e.colorIcon,lineHeight:Y(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:Y(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${a}`}}}},TR=e=>({margin:`${Y(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:`flex`,...Xc(),"&-avatar":{paddingInlineEnd:e.padding},"&-section":{overflow:`hidden`,flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,...qc},"&-description":{color:e.colorTextDescription}}),ER=e=>{let{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${Y(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${Y(e.padding)} ${Y(i)}`}}},DR=e=>{let{componentCls:t}=e;return{overflow:`hidden`,[`${t}-body`]:{userSelect:`none`}}},OR=e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:a,bodyPadding:o,extraColor:s,motionDurationMid:c}=e;return{[t]:{...Jc(e),position:`relative`,background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:a},[`${t}-head`]:SR(e),[`${t}-extra`]:{marginInlineStart:`auto`,color:s,fontWeight:`normal`,fontSize:e.fontSize},[`${t}-body`]:{padding:o,borderRadius:`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`,"&:first-child":{borderStartStartRadius:e.borderRadiusLG,borderStartEndRadius:e.borderRadiusLG},"&:not(:last-child)":{borderEndStartRadius:0,borderEndEndRadius:0}},[`${t}-grid`]:CR(e),[`${t}-cover`]:{"> *":{display:`block`,width:`100%`,borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:wR(e),[`${t}-meta`]:TR(e)},[`${t}-bordered`]:{border:`${Y(e.lineWidth)} ${e.lineType} ${i}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:`pointer`,transition:[`box-shadow`,`border-color`].map(e=>`${e} ${c}`).join(`, `),"&:hover":{borderColor:`transparent`,boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0 `,[`&:not(:has(> ${t}-head))`]:{borderRadius:0},[`${t}-body`]:{display:`flex`,flexWrap:`wrap`},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:r}}},[`${t}-type-inner`]:ER(e),[`${t}-loading`]:DR(e),[`${t}-rtl`]:{direction:`rtl`}}},kR=e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:a}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${Y(r)}`,fontSize:a,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:`flex`,alignItems:`center`}}}}},AR=rl(`Card`,e=>{let t=gs(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[OR(t),kR(t)]},e=>({headerBg:`transparent`,headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:e.bodyPadding??e.paddingLG,headerPadding:e.headerPadding??e.paddingLG})),jR=e=>{let{actionClasses:t,actions:n=[],actionStyle:r}=e;return S.createElement(`ul`,{className:t,style:r},n.map((e,t)=>{let r=`action-${t}`;return S.createElement(`li`,{style:{width:`${100/n.length}%`},key:r},S.createElement(`span`,null,e))}))},MR=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,extra:o,headStyle:s={},bodyStyle:c={},title:l,loading:u,bordered:d,variant:f,size:p,type:m,cover:h,actions:g,tabList:_,children:v,activeTabKey:y,defaultActiveTabKey:b,tabBarExtraContent:x,hoverable:C,tabProps:w={},classNames:T,styles:E,...D}=e,{getPrefixCls:O,direction:k,className:A,style:j,classNames:M,styles:N}=li(`card`),[P]=hC(`card`,f,d),F=th(p),I={...e,size:F,variant:P},[L,R]=Fd([M,T],[N,E],{props:I}),z=t=>{e.onTabChange?.(t)},B=S.useMemo(()=>Cr(v),[v]),V=S.useMemo(()=>B.some(e=>S.isValidElement(e)&&e.type===xR),[B]),H=O(`card`,n),[U,W]=AR(H),ee=S.createElement(Wy,{loading:!0,active:!0,paragraph:{rows:4},title:!1},v),te=y!==void 0,ne={...w,[te?`activeKey`:`defaultActiveKey`]:te?y:b,tabBarExtraContent:x},re,ie=F===`small`?F:`large`,ae=_?S.createElement(bR,{size:ie,...ne,className:`${H}-head-tabs`,onChange:z,items:_.map(({tab:e,...t})=>({label:e,...t}))}):null;if(l||o||ae){let e=J(`${H}-head`,L.header),t=J(`${H}-head-title`,L.title),n=J(`${H}-extra`,L.extra),r={...s,...R.header};re=S.createElement(`div`,{className:e,style:r},S.createElement(`div`,{className:`${H}-head-wrapper`},l&&S.createElement(`div`,{className:t,style:R.title},l),o&&S.createElement(`div`,{className:n,style:R.extra},o)),ae)}let G=J(`${H}-cover`,L.cover),oe=h?S.createElement(`div`,{className:G,style:R.cover},h):null,K=J(`${H}-body`,L.body),se={...c,...R.body},ce=u||B.length?S.createElement(`div`,{className:K,style:se},u?ee:v):null,q=J(`${H}-actions`,L.actions),le=g?.length?S.createElement(jR,{actionClasses:q,actionStyle:R.actions,actions:g}):null,ue=Sr(D,[`onTabChange`]),de=J(H,A,{[`${H}-loading`]:u,[`${H}-bordered`]:P!==`borderless`,[`${H}-hoverable`]:C,[`${H}-contain-grid`]:V,[`${H}-contain-tabs`]:_?.length,[`${H}-small`]:F===`small`,[`${H}-type-${m}`]:!!m,[`${H}-rtl`]:k===`rtl`},r,i,U,W,L.root),fe={...R.root,...j,...a};return S.createElement(`div`,{ref:t,...ue,className:de,style:fe},re,oe,ce,le)}),NR=e=>{let{prefixCls:t,className:n,avatar:r,title:i,description:a,style:o,classNames:s,styles:c,...l}=e,{getPrefixCls:u,className:d,style:f,classNames:p,styles:m}=li(`cardMeta`),h=`${u(`card`,t)}-meta`,[g,_]=Fd([p,s],[m,c],{props:e}),v=J(h,n,d,g.root),y={...f,..._.root,...o},b=J(`${h}-avatar`,g.avatar),x=J(`${h}-title`,g.title),C=J(`${h}-description`,g.description),w=J(`${h}-section`,g.section),T=r?S.createElement(`div`,{className:b,style:_.avatar},r):null,E=i?S.createElement(`div`,{className:x,style:_.title},i):null,D=a?S.createElement(`div`,{className:C,style:_.description},a):null,O=E||D?S.createElement(`div`,{className:w,style:_.section},E,D):null;return S.createElement(`div`,{...l,className:v,style:y},T,O)},PR=MR;PR.Grid=xR,PR.Meta=NR;function FR(e,t,n){var r=n||{},i=r.noTrailing,a=i===void 0?!1:i,o=r.noLeading,s=o===void 0?!1:o,c=r.debounceMode,l=c===void 0?void 0:c,u,d=!1,f=0;function p(){u&&clearTimeout(u)}function m(e){var t=(e||{}).upcomingOnly,n=t===void 0?!1:t;p(),d=!n}function h(){var n=[...arguments],r=this,i=Date.now()-f;if(d)return;function o(){f=Date.now(),t.apply(r,n)}function c(){u=void 0}!s&&l&&!u&&o(),p(),l===void 0&&i>e?s?(f=Date.now(),a||(u=setTimeout(l?c:o,e))):o():a!==!0&&(u=setTimeout(l?c:o,l===void 0?e-i:e))}return h.cancel=m,h}function IR(e,t,n){var r=(n||{}).atBegin;return FR(e,t,{debounceMode:(r===void 0?!1:r)!==!1})}function LR(e,t){return e[t]}function RR(e,t){return`${e}-${t}`}function zR(e){return e&&e.type&&e.type.isTreeNode}function BR(e,t){return e??t}function VR(e){let{title:t,_title:n,key:r,children:i}=e||{},a=t||`title`;return{title:a,_title:n||[a],key:r||`key`,children:i||`children`}}function HR(e){function t(e){return Cr(e).map(e=>{if(!zR(e))return br(!e,`Tree/TreeNode can only accept TreeNode as children.`),null;let{key:n}=e,{children:r,...i}=e.props,a={key:n,...i},o=t(r);return o.length&&(a.children=o),a}).filter(e=>e)}return t(e)}function UR(e,t,n){let{_title:r,key:i,children:a}=VR(n),o=new Set(t===!0?[]:t),s=[];function c(e,n=null){return e.map((l,u)=>{let d=RR(n?n.pos:`0`,u),f=BR(l[i],d),p;for(let e=0;ee[a]:typeof a==`function`&&(u=e=>a(e)):u=(e,t)=>BR(e[s],t);function d(n,r,i,a){let o=n?n[l]:e,s=n?RR(i.pos,r):`0`,c=n?[...a,n]:[];n&&t({node:n,index:r,pos:s,key:u(n,s),parentPos:i.node?i.pos:null,level:i.level+1,nodes:c}),o&&o.forEach((e,t)=>{d(e,t,{node:n,pos:s,level:i?i.level+1:-1},c)})}d(null)}function GR(e,{initWrapper:t,processEntity:n,onProcessFinished:r,externalGetKey:i,childrenPropName:a,fieldNames:o}={},s){let c=i||s,l={},u={},d={posEntities:l,keyEntities:u};return t&&(d=t(d)||d),WR(e,e=>{let{node:t,index:r,pos:i,key:a,parentPos:o,level:s,nodes:c}=e,f={node:t,nodes:c,index:r,key:a,pos:i,level:s},p=BR(a,i);l[i]=f,u[p]=f,f.parent=l[o],f.parent&&(f.parent.children=f.parent.children||[],f.parent.children.push(f)),n&&n(f,d)},{externalGetKey:c,childrenPropName:a,fieldNames:o}),r&&r(d),d}function KR(e,t,n,r){return e===!1?!1:e||!t&&!n||t&&r&&!n}function qR(e,{expandedKeys:t,selectedKeys:n,loadedKeys:r,loadingKeys:i,checkedKeys:a,halfCheckedKeys:o,dragOverNodeKey:s,dropPosition:c,keyEntities:l}){let u=LR(l,e);return{eventKey:e,expanded:t.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:r.indexOf(e)!==-1,loading:i.indexOf(e)!==-1,checked:a.indexOf(e)!==-1,halfChecked:o.indexOf(e)!==-1,pos:String(u?u.pos:``),dragOver:s===e&&c===0,dragOverGapTop:s===e&&c===-1,dragOverGapBottom:s===e&&c===1}}function JR(e){let{data:t,expanded:n,selected:r,checked:i,loaded:a,loading:o,halfChecked:s,dragOver:c,dragOverGapTop:l,dragOverGapBottom:u,pos:d,active:f,eventKey:p}=e,m={...t,expanded:n,selected:r,checked:i,loaded:a,loading:o,halfChecked:s,dragOver:c,dragOverGapTop:l,dragOverGapBottom:u,pos:d,active:f,key:p};return`props`in m||Object.defineProperty(m,`props`,{get(){return br(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}function YR(e,t){let n=new Set;return e.forEach(e=>{t.has(e)||n.add(e)}),n}function XR(e){let{disabled:t,disableCheckbox:n,checkable:r}=e||{};return!!(t||n)||r===!1}function ZR(e,t,n,r){let i=new Set(e),a=new Set;for(let e=0;e<=n;e+=1)(t.get(e)||new Set).forEach(e=>{let{key:t,node:n,children:a=[]}=e;i.has(t)&&!r(n)&&a.filter(e=>!r(e.node)).forEach(e=>{i.add(e.key)})});let o=new Set;for(let e=n;e>=0;--e)(t.get(e)||new Set).forEach(e=>{let{parent:t,node:n}=e;if(r(n)||!e.parent||o.has(e.parent.key))return;if(r(e.parent.node)){o.add(t.key);return}let s=!0,c=!1;(t.children||[]).filter(e=>!r(e.node)).forEach(({key:e})=>{let t=i.has(e);s&&!t&&(s=!1),!c&&(t||a.has(e))&&(c=!0)}),s&&i.add(t.key),c&&a.add(t.key),o.add(t.key)});return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(YR(a,i))}}function QR(e,t,n,r,i){let a=new Set(e),o=new Set(t);for(let e=0;e<=r;e+=1)(n.get(e)||new Set).forEach(e=>{let{key:t,node:n,children:r=[]}=e;!a.has(t)&&!o.has(t)&&!i(n)&&r.filter(e=>!i(e.node)).forEach(e=>{a.delete(e.key)})});o=new Set;let s=new Set;for(let e=r;e>=0;--e)(n.get(e)||new Set).forEach(e=>{let{parent:t,node:n}=e;if(i(n)||!e.parent||s.has(e.parent.key))return;if(i(e.parent.node)){s.add(t.key);return}let r=!0,c=!1;(t.children||[]).filter(e=>!i(e.node)).forEach(({key:e})=>{let t=a.has(e);r&&!t&&(r=!1),!c&&(t||o.has(e))&&(c=!0)}),r||a.delete(t.key),c&&o.add(t.key),s.add(t.key)});return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(YR(o,a))}}function $R(e,t,n,r){let i=[],a;a=r||XR;let o=new Set(e.filter(e=>{let t=!!LR(n,e);return t||i.push(e),t})),s=new Map,c=0;Object.keys(n).forEach(e=>{let t=n[e],{level:r}=t,i=s.get(r);i||(i=new Set,s.set(r,i)),i.add(t),c=Math.max(c,r)}),br(!i.length,`Tree missing follow keys: ${i.slice(0,100).map(e=>`'${e}'`).join(`, `)}`);let l;return l=t===!0?ZR(o,s,c,a):QR(o,t.halfCheckedKeys,s,c,a),l}var ez=e=>{let{checkboxCls:t,checkboxSize:n,lineWidth:r}=e,i=`${t}-wrapper`;return[{[`${t}-group`]:{...Jc(e),display:`inline-flex`,flexWrap:`wrap`,columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[i]:{...Jc(e),display:`inline-flex`,alignItems:`baseline`,cursor:`pointer`,"&:after":{display:`inline-block`,width:0,overflow:`hidden`,content:`'\\a0'`},[`& + ${i}`]:{marginInlineStart:0},[`&${i}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}},[t]:{...Jc(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:n,height:n,direction:`ltr`,backgroundColor:e.colorBgContainer,border:`${Y(r)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:`separate`,transition:`all ${e.motionDurationSlow}`,flex:`none`,...Uh(),"&:after":{boxSizing:`border-box`,position:`absolute`,top:`calc(${n} / 2 - ${r})`,insetInlineStart:`calc(${n} / 4 - ${r})`,display:`table`,width:e.calc(n).div(14).mul(5).equal(),height:e.calc(n).div(14).mul(8).equal(),border:`${Y(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:`rotate(45deg) scale(0) translate(-50%,-50%)`,opacity:0,content:`""`,transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`,...Uh()},[`${t}-input`]:{position:`absolute`,inset:`calc(-1 * (${r}))`,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:Zc(e),"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[` ${i}:not(${i}-disabled), ${t}:not(${t}-disabled) - `]:{[`&:hover ${t}`]:{borderColor:e.colorPrimary}},[`${i}:not(${i}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[`${t}-checked`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:`rotate(45deg) scale(1) translate(-50%,-50%)`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`,...Uh()},[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[t]:{"&-indeterminate":{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:`50%`,insetInlineStart:`50%`,width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:`translate(-50%, -50%) scale(1)`,opacity:1,content:`""`},"&:hover":{backgroundColor:e.colorBgContainer,borderColor:e.colorPrimary}}}},{[`${i}-disabled`]:{cursor:`not-allowed`},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate::after`]:{background:e.colorTextDisabled}}}]};function tz(e,t){return ez(gs(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}var nz=rl(`Checkbox`,(e,{prefixCls:t})=>[tz(t,e)]),rz=S.createContext(null),iz=S.forwardRef((e,t)=>{let{prefixCls:n,children:r,indeterminate:i=!1,onMouseEnter:a,onMouseLeave:o,skipGroup:s=!1,disabled:c,rootClassName:l,className:u,style:d,classNames:f,styles:p,name:m,value:h,checked:g,defaultChecked:_,onChange:v,...y}=e,{getPrefixCls:b,direction:x,className:C,style:w,classNames:T,styles:E}=li(`checkbox`),D=S.useContext(rz),{isFormItemInput:O}=S.useContext(Sy),k=S.useContext(zp),A=(D?.disabled||c)??k,[j,M]=Hn(_,g),N=j,P=In(e=>{M(e.target.checked),v?.(e),!s&&D?.toggleOption&&D.toggleOption({label:r,value:h})});D&&!s&&(N=D.value.includes(h));let F=S.useRef(null),I=er(t,F);S.useEffect(()=>{if(!(s||!D))return D.registerValue(h),()=>{D.cancelValue(h)}},[h,s]),S.useEffect(()=>{F.current?.input&&(F.current.input.indeterminate=i)},[i]);let L=b(`checkbox`,n),R=bf(L),[z,B]=nz(L,R),V={...y},H={...e,indeterminate:i,disabled:A,checked:N},[U,W]=Fd([T,f],[E,p],{props:H}),ee=J(`${L}-wrapper`,{[`${L}-rtl`]:x===`rtl`,[`${L}-wrapper-checked`]:N,[`${L}-wrapper-disabled`]:A,[`${L}-wrapper-in-form-item`]:O},C,u,U.root,l,B,R,z),te=J(U.icon,{[`${L}-indeterminate`]:i},qm,z),[ne,re]=XI(V.onClick);return S.createElement(eh,{component:`Checkbox`,disabled:A},S.createElement(`label`,{className:ee,style:{...W.root,...w,...d},onMouseEnter:a,onMouseLeave:o,onClick:ne},S.createElement(YI,{...V,name:!s&&D?D.name:m,checked:N,onClick:re,onChange:P,prefixCls:L,className:te,style:W.icon,disabled:A,ref:I,value:h}),fd(r)&&S.createElement(`span`,{className:J(`${L}-label`,U.label),style:W.label},r)))}),az=S.forwardRef((e,t)=>{let{defaultValue:n,children:r,options:i=[],prefixCls:a,className:o,rootClassName:s,style:c,onChange:l,role:u=`group`,...d}=e,{getPrefixCls:f,direction:p}=S.useContext(oi),[m,h]=S.useState(d.value||n||[]),[g,_]=S.useState([]);S.useEffect(()=>{`value`in d&&h(d.value||[])},[d.value]);let v=S.useMemo(()=>i.map(e=>typeof e==`string`||pd(e)?{label:e,value:e}:e),[i]),y=e=>{_(t=>t.filter(t=>t!==e))},b=e=>{_(t=>[].concat(Zr(t),[e]))},x=e=>{let t=m.indexOf(e.value),n=Zr(m);t===-1?n.push(e.value):n.splice(t,1),`value`in d||h(n),l?.(n.filter(e=>g.includes(e)).sort((e,t)=>v.findIndex(t=>t.value===e)-v.findIndex(e=>e.value===t)))},C=f(`checkbox`,a),w=`${C}-group`,T=bf(C),[E,D]=nz(C,T),O=Sr(d,[`value`,`disabled`]),k=i.length?v.map(e=>S.createElement(iz,{prefixCls:C,key:e.value.toString(),disabled:`disabled`in e?e.disabled:d.disabled,value:e.value,checked:m.includes(e.value),onChange:e.onChange,className:J(`${w}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):r,A=S.useMemo(()=>({toggleOption:x,value:m,disabled:d.disabled,name:d.name,registerValue:b,cancelValue:y}),[x,m,d.disabled,d.name,b,y]),j=J(w,{[`${w}-rtl`]:p===`rtl`},o,s,D,T,E);return S.createElement(`div`,{className:j,style:c,role:u,...O,ref:t},S.createElement(rz.Provider,{value:A},k))}),oz=iz;oz.Group=az,oz.__ANT_CHECKBOX=!0;var sz=(0,S.createContext)({});function cz(e){return e===`auto`?`1 1 auto`:pd(e)?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}var lz=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=S.useContext(oi),{gutter:i,wrap:a}=S.useContext(sz),{prefixCls:o,span:s,order:c,offset:l,push:u,pull:d,className:f,children:p,flex:m,style:h,...g}=e,_=n(`col`,o),v=n(),[y,b]=$y(_),[x]=ol(v,`col`),C={},w={};VC.forEach(t=>{let n={},i=e[t];pd(i)?n.span=i:hd(i)&&(n=i||{}),delete g[t],w={...w,[`${_}-${t}-${n.span}`]:fd(n.span),[`${_}-${t}-order-${n.order}`]:n.order||n.order===0,[`${_}-${t}-offset-${n.offset}`]:n.offset||n.offset===0,[`${_}-${t}-push-${n.push}`]:n.push||n.push===0,[`${_}-${t}-pull-${n.pull}`]:n.pull||n.pull===0,[`${_}-rtl`]:r===`rtl`},n.flex&&(w[`${_}-${t}-flex`]=!0,C[x(`${t}-flex`)]=cz(n.flex))});let T=J(_,{[`${_}-${s}`]:s!==void 0,[`${_}-order-${c}`]:c,[`${_}-offset-${l}`]:l,[`${_}-push-${u}`]:u,[`${_}-pull-${d}`]:d},f,w,y,b),E={};return i?.[0]&&(E.paddingInline=pd(i[0])?`${i[0]/2}px`:`calc(${i[0]} / 2)`),m&&(E.flex=cz(m),a===!1&&!E.minWidth&&(E.minWidth=0)),S.createElement(`div`,{...g,style:{...E,...h,...C},className:T,ref:t},p)});function uz(e,t){let n=[void 0,void 0],r=Array.isArray(e)?e:[e,void 0],i=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0};return r.forEach((e,t)=>{if(hd(e))for(let r=0;r{let[n,r]=S.useState(()=>md(e)?e:``),i=()=>{if(md(e)&&r(e),hd(e))for(let n=0;n{i()},[JSON.stringify(e),t]),n},fz=S.forwardRef((e,t)=>{let{prefixCls:n,justify:r,align:i,className:a,style:o,children:s,gutter:c=0,wrap:l,...u}=e,{getPrefixCls:d,direction:f}=S.useContext(oi),p=KC(!0,null),m=dz(i,p),h=dz(r,p),g=d(`row`,n),[_,v]=Iee(g),y=uz(c,p),b=J(g,{[`${g}-no-wrap`]:l===!1,[`${g}-${h}`]:h,[`${g}-${m}`]:m,[`${g}-rtl`]:f===`rtl`},a,_,v),x={};y?.[0]&&(x.marginInline=pd(y[0])?`${y[0]/-2}px`:`calc(${y[0]} / -2)`);let[C,w]=y;x.rowGap=w;let T=S.useMemo(()=>({gutter:[C,w],wrap:l}),[C,w,l]);return S.createElement(sz.Provider,{value:T},S.createElement(`div`,{...u,className:b,style:{...x,...o},ref:t},s))}),pz=lz,mz=e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},hz=e=>{let{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:a,orientationMargin:o,verticalMarginInline:s}=e,c=`${t}-rail`;return{[t]:{...Jc(e),borderBlockStart:`${Y(i)} solid ${r}`,[c]:{borderBlockStart:`${Y(i)} solid ${r}`},"&-vertical":{position:`relative`,top:`-0.06em`,display:`inline-block`,height:`0.9em`,marginInline:s,marginBlock:0,verticalAlign:`middle`,borderTop:0,borderInlineStart:`${Y(i)} solid ${r}`},"&-horizontal":{display:`flex`,clear:`both`,width:`100%`,minWidth:`100%`,margin:`${Y(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:`flex`,alignItems:`center`,margin:`${Y(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:`nowrap`,textAlign:`center`,borderBlockStart:`0 ${r}`,[`${c}-start, ${c}-end`]:{width:`50%`,borderBlockStartColor:`inherit`,borderBlockEnd:0,content:`''`}},[`&-horizontal${t}-with-text-start`]:{[`${c}-start`]:{width:`calc(${o} * 100%)`},[`${c}-end`]:{width:`calc(100% - ${o} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{[`${c}-start`]:{width:`calc(100% - ${o} * 100%)`},[`${c}-end`]:{width:`calc(${o} * 100%)`}},[`${t}-inner-text`]:{display:`inline-block`,paddingBlock:0,paddingInline:a},"&-dashed":{background:`none`,borderColor:r,borderStyle:`dashed`,borderWidth:`${Y(i)} 0 0`,[c]:{borderBlockStart:`${Y(i)} dashed ${r}`}},[`&-horizontal${t}-with-text${t}-dashed`]:{[`${c}-start, ${c}-end`]:{borderStyle:`dashed none none`}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:`none`,borderColor:r,borderStyle:`dotted`,borderWidth:`${Y(i)} 0 0`,[c]:{borderBlockStart:`${Y(i)} dotted ${r}`}},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:`dotted none none`}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{[`${c}-start`]:{width:0},[`${c}-end`]:{width:`100%`},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{[`${c}-start`]:{width:`100%`},[`${c}-end`]:{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}}}},gz=rl(`Divider`,e=>{let t=gs(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[hz(t),mz(t)]},e=>({textPaddingInline:`1em`,orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}}),_z=[`left`,`right`,`center`,`start`,`end`],vz=e=>{let{getPrefixCls:t,direction:n,className:r,style:i,classNames:a,styles:o}=li(`divider`),{prefixCls:s,type:c,orientation:l,vertical:u,titlePlacement:d,orientationMargin:f,className:p,rootClassName:m,children:h,dashed:g,variant:_=`solid`,plain:v,style:y,size:b,classNames:x,styles:C,...w}=e,T=t(`divider`,s),E=`${T}-rail`,[D,O]=gz(T),k=th(b),A=!!h,j=_z.includes(l||``),M=S.useMemo(()=>{let e=d??(j?l:`center`);return e===`left`?n===`rtl`?`end`:`start`:e===`right`?n===`rtl`?`start`:`end`:e},[n,l,d,j]),N=M===`start`&&f!=null,P=M===`end`&&f!=null,[F,I]=Rd(l,u,c),L={...e,orientation:F,titlePlacement:M,size:k},[R,z]=Fd([a,x],[o,C],{props:L}),B=J(T,r,D,O,`${T}-${F}`,{[`${T}-with-text`]:A,[`${T}-with-text-${M}`]:A,[`${T}-dashed`]:!!g,[`${T}-${_}`]:_!==`solid`,[`${T}-plain`]:!!v,[`${T}-rtl`]:n===`rtl`,[`${T}-no-default-orientation-margin-start`]:N,[`${T}-no-default-orientation-margin-end`]:P,[`${T}-md`]:k===`medium`||k===`middle`,[`${T}-sm`]:k===`small`,[E]:!h,[R.rail]:R.rail&&!h},p,m,R.root),V=S.useMemo(()=>pd(f)?f:/^\d+$/.test(f)?Number(f):f,[f]),H={marginInlineStart:N?V:void 0,marginInlineEnd:P?V:void 0};return S.createElement(`div`,{className:B,style:{...i,...z.root,...h?{}:z.rail,...y},...w,role:`separator`},h&&!I&&S.createElement(S.Fragment,null,S.createElement(`div`,{className:J(E,`${E}-start`,R.rail),style:z.rail}),S.createElement(`span`,{className:J(`${T}-inner-text`,R.content),style:{...H,...z.content}},h),S.createElement(`div`,{className:J(E,`${E}-end`,R.rail),style:z.rail})))},yz={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`minus`,theme:`outlined`};function bz(){return bz=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,bz({},e,{ref:t,icon:yz}))),Sz={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z`}}]},name:`up`,theme:`outlined`};function Cz(){return Cz=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Cz({},e,{ref:t,icon:Sz})));function Tz(){return typeof BigInt==`function`}function Ez(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function Dz(e){var t=e.trim(),n=t.startsWith(`-`);n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,`$1`).replace(/\.0*$/,``).replace(/^0+/,``),t.startsWith(`.`)&&(t=`0${t}`);var r=t||`0`,i=r.split(`.`),a=i[0]||`0`,o=i[1]||`0`;a===`0`&&o===`0`&&(n=!1);var s=n?`-`:``;return{negative:n,negativeStr:s,trimStr:r,integerStr:a,decimalStr:o,fullStr:`${s}${r}`}}function Oz(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes(`e`)}function kz(e){var t=Uo(e.toLowerCase().split(`e`),2),n=t[0],r=t[1],i=r===void 0?`0`:r,a=n.startsWith(`-`),o=Uo((a?n.slice(1):n).split(`.`),2),s=o[0],c=s===void 0?`0`:s,l=o[1],u=l===void 0?``:l;return{decimal:u,digits:`${c}${u}`.replace(/^0+/,``)||`0`,exponent:Number(i),integer:c,negative:a}}function Az(e){var t=e.decimal,n=e.digits,r=e.exponent,i=e.integer,a=e.negative;if(n===`0`)return`0`;var o=i.replace(/^0+/,``).length,s=(t.match(/^0*/)||[``])[0].length,c=(o||-s)+r,l=``;return l=c<=0?`0.${`0`.repeat(-c)}${n}`:c>=n.length?`${n}${`0`.repeat(c-n.length)}`:`${n.slice(0,c)}.${n.slice(c)}`,`${a?`-`:``}${l}`}function jz(e){return e.exponent>=0?Math.max(0,e.decimal.length-e.exponent):Math.abs(e.exponent)+e.decimal.length}function Mz(e){var t=String(e);return Oz(e)?jz(kz(t)):t.includes(`.`)&&Pz(t)?t.length-t.indexOf(`.`)-1:0}function Nz(e){var t=String(e);if(Oz(e)){if(e>2**53-1)return String(Tz()?BigInt(e).toString():2**53-1);if(e<-(2**53-1))return String(Tz()?BigInt(e).toString():-(2**53-1));var n=kz(t),r=jz(n);t=r>100?Az(n):e.toFixed(r)}return Dz(t).fullStr}function Pz(e){return typeof e==`number`?!Number.isNaN(e):e?/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e):!1}var Fz=function(){function e(t){if(Yo(this,e),Ko(this,`origin`,``),Ko(this,`negative`,void 0),Ko(this,`integer`,void 0),Ko(this,`decimal`,void 0),Ko(this,`decimalLen`,void 0),Ko(this,`empty`,void 0),Ko(this,`nan`,void 0),Ez(t)){this.empty=!0;return}if(this.origin=String(t),t===`-`||Number.isNaN(t)){this.nan=!0;return}var n=t;if(Oz(n)&&(n=Number(n)),n=typeof n==`string`?n:Nz(n),Pz(n)){var r=Dz(n);this.negative=r.negative;var i=r.trimStr.split(`.`);this.integer=BigInt(i[0]);var a=i[1]||`0`;this.decimal=BigInt(a),this.decimalLen=a.length}else this.nan=!0}return Zo(e,[{key:`getMark`,value:function(){return this.negative?`-`:``}},{key:`getIntegerStr`,value:function(){return this.integer.toString()}},{key:`getDecimalStr`,value:function(){return this.decimal.toString().padStart(this.decimalLen,`0`)}},{key:`alignDecimal`,value:function(e){var t=`${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(e,`0`)}`;return BigInt(t)}},{key:`negate`,value:function(){var t=new e(this.toString());return t.negative=!t.negative,t}},{key:`cal`,value:function(t,n,r){var i=Math.max(this.getDecimalStr().length,t.getDecimalStr().length),a=n(this.alignDecimal(i),t.alignDecimal(i)).toString(),o=r(i),s=Dz(a),c=`${s.negativeStr}${s.trimStr.padStart(o+1,`0`)}`;return new e(`${c.slice(0,-o)}.${c.slice(-o)}`)}},{key:`add`,value:function(t){if(this.isInvalidate())return new e(t);var n=new e(t);return n.isInvalidate()?this:this.cal(n,function(e,t){return e+t},function(e){return e})}},{key:`multi`,value:function(t){var n=new e(t);return this.isInvalidate()||n.isInvalidate()?new e(NaN):this.cal(n,function(e,t){return e*t},function(e){return e*2})}},{key:`isEmpty`,value:function(){return this.empty}},{key:`isNaN`,value:function(){return this.nan}},{key:`isInvalidate`,value:function(){return this.isEmpty()||this.isNaN()}},{key:`equals`,value:function(e){return this.toString()===e?.toString()}},{key:`lessEquals`,value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:`toNumber`,value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:`toString`,value:function(){return!(arguments.length>0&&arguments[0]!==void 0)||arguments[0]?this.isInvalidate()?``:Dz(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr:this.origin}}]),e}(),Iz=function(){function e(t){if(Yo(this,e),Ko(this,`origin`,``),Ko(this,`number`,void 0),Ko(this,`empty`,void 0),Ez(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return Zo(e,[{key:`negate`,value:function(){return new e(-this.toNumber())}},{key:`add`,value:function(t){if(this.isInvalidate())return new e(t);var n=Number(t);if(Number.isNaN(n))return this;var r=this.number+n;if(r>2**53-1)return new e(2**53-1);if(r<-(2**53-1))return new e(-(2**53-1));var i=Math.max(Mz(this.number),Mz(n));return new e(r.toFixed(i))}},{key:`multi`,value:function(t){var n=Number(t);if(this.isInvalidate()||Number.isNaN(n))return new e(NaN);var r=this.number*n;if(r>2**53-1)return new e(2**53-1);if(r<-(2**53-1))return new e(-(2**53-1));var i=Math.max(Mz(this.number),Mz(n));return new e(r.toFixed(i))}},{key:`isEmpty`,value:function(){return this.empty}},{key:`isNaN`,value:function(){return Number.isNaN(this.number)}},{key:`isInvalidate`,value:function(){return this.isEmpty()||this.isNaN()}},{key:`equals`,value:function(e){return this.toNumber()===e?.toNumber()}},{key:`lessEquals`,value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:`toNumber`,value:function(){return this.number}},{key:`toString`,value:function(){return!(arguments.length>0&&arguments[0]!==void 0)||arguments[0]?this.isInvalidate()?``:Oz(this.number)&&Mz(this.number)>100?String(this.number):Nz(this.number):this.origin}}]),e}();function Lz(e){return Tz()?new Fz(e):new Iz(e)}function Rz(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===``)return``;var i=Dz(e),a=i.negativeStr,o=i.integerStr,s=i.decimalStr,c=`${t}${s}`,l=`${a}${o}`;if(n>=0){var u=Number(s[n]);return u>=5&&!r?Rz(Lz(e).add(`${a}0.${`0`.repeat(n)}${10-u}`).toString(),t,n,r):n===0?l:`${l}${t}${s.padEnd(n,`0`).slice(0,n)}`}return c===`.0`?l:`${l}${c}`}var zz=Lz;function Bz(e,t){return typeof Proxy<`u`&&e?new Proxy(e,{get(e,n){if(t[n])return t[n];let r=e[n];return typeof r==`function`?r.bind(e):r}}):e}function Vz(e,t){let n=(0,S.useRef)(null);function r(){try{let{selectionStart:t,selectionEnd:r,value:i}=e;n.current={start:t,end:r,value:i,beforeTxt:i.substring(0,t),afterTxt:i.substring(r)}}catch{}}function i(){if(e&&n.current&&t)try{let{value:t}=e,{beforeTxt:r,afterTxt:i,start:a}=n.current,o=t.length;if(t.startsWith(r))o=r.length;else if(t.endsWith(i))o=t.length-n.current.afterTxt.length;else{let e=r[a-1],n=t.indexOf(e,a-1);n!==-1&&(o=n+1)}e.setSelectionRange(o,o)}catch(e){br(!1,`Something warning of cursor restore. Please fire issue about this: ${e.message}`)}}return[r,i]}var Hz=200,Uz=600;function Wz({prefixCls:e,action:t,children:n,disabled:r,className:i,style:a,onStep:o}){let s=t===`up`,c=S.useRef(),l=S.useRef([]),u=()=>{clearTimeout(c.current)},d=e=>{e.preventDefault(),u(),o(s,`handler`);function t(){o(s,`handler`),c.current=setTimeout(t,Hz)}c.current=setTimeout(t,Uz)};S.useEffect(()=>()=>{u(),l.current.forEach(e=>{ri.cancel(e)})},[]);let f=`${e}-action`,p=J(f,`${f}-${t}`,{[`${f}-${t}-disabled`]:r},i),m=()=>l.current.push(ri(u));return S.createElement(`span`,{unselectable:`on`,role:`button`,onMouseUp:m,onMouseLeave:m,onMouseDown:e=>{d(e)},"aria-label":s?`Increase Value`:`Decrease Value`,"aria-disabled":r,className:p,style:a},n||S.createElement(`span`,{unselectable:`on`,className:`${e}-action-${t}-inner`}))}function Gz(e){let t=typeof e==`number`?Nz(e):Dz(e).fullStr;return t.includes(`.`)?Dz(t.replace(/(\d)\.(\d)/g,`$1$2.`)).fullStr:e+`0`}var Kz=(()=>{let e=(0,S.useRef)(0),t=()=>{ri.cancel(e.current)};return(0,S.useEffect)(()=>t,[]),n=>{t(),e.current=ri(()=>{n()})}});function qz(){return qz=Object.assign?Object.assign.bind():function(e){for(var t=1;te||t.isEmpty()?t.toString():t.toNumber(),Yz=e=>{let t=zz(e);return t.isInvalidate()?null:t},Xz=S.forwardRef((e,t)=>{let{mode:n=`input`,prefixCls:r=`rc-input-number`,className:i,style:a,classNames:o,styles:s,min:c,max:l,step:u=1,defaultValue:d,value:f,disabled:p,readOnly:m,upHandler:h,downHandler:g,keyboard:_,changeOnWheel:v=!1,controls:y=!0,prefix:b,suffix:x,stringMode:C,parser:w,formatter:T,precision:E,decimalSeparator:D,onChange:O,onInput:k,onPressEnter:A,onStep:j,onMouseDown:M,onClick:N,onMouseUp:P,onMouseLeave:F,onMouseMove:I,onMouseEnter:L,onMouseOut:R,changeOnBlur:z=!0,...B}=e,[V,H]=S.useState(!1),U=S.useRef(!1),W=S.useRef(!1),ee=S.useRef(!1),te=S.useRef(null),ne=S.useRef(null);S.useImperativeHandle(t,()=>Bz(ne.current,{focus:e=>{l_(ne.current,e)},blur:()=>{ne.current?.blur()},nativeElement:te.current}));let[re,ie]=S.useState(()=>zz(f??d));function ae(e){f===void 0&&ie(e)}let G=S.useCallback((e,t)=>{if(!t)return E>=0?E:Math.max(Mz(e),Mz(u))},[E,u]),oe=S.useCallback(e=>{let t=String(e);if(w)return w(t);let n=t;return D&&(n=n.replace(D,`.`)),n.replace(/[^\w.-]+/g,``)},[w,D]),K=S.useRef(``),se=S.useCallback((e,t)=>{if(T)return T(e,{userTyping:t,input:String(K.current)});let n=typeof e==`number`?Nz(e):e;if(!t){let e=G(n,t);Pz(n)&&(D||e>=0)&&(n=Rz(n,D||`.`,e))}return n},[T,G,D]),[ce,q]=S.useState(()=>{let e=d??f;return re.isInvalidate()&&[`string`,`number`].includes(typeof e)?Number.isNaN(e)?``:e:se(re.toString(),!1)});K.current=ce;function le(e,t){q(se(e.isInvalidate()?e.toString(!1):e.toString(!t),t))}let ue=S.useMemo(()=>Yz(l),[l,E]),de=S.useMemo(()=>Yz(c),[c,E]),fe=S.useMemo(()=>!ue||!re||re.isInvalidate()?!1:ue.lessEquals(re),[ue,re]),pe=S.useMemo(()=>!de||!re||re.isInvalidate()?!1:re.lessEquals(de),[de,re]),[me,he]=Vz(ne.current,V),ge=e=>ue&&!e.lessEquals(ue)?ue:de&&!de.lessEquals(e)?de:null,_e=e=>!ge(e),ve=(e,t)=>{let n=e,r=_e(n)||n.isEmpty();if(!n.isEmpty()&&!t&&(n=ge(n)||n,r=!0),!m&&!p&&r){let e=n.toString(),r=G(e,t);return r>=0&&(n=zz(Rz(e,`.`,r)),_e(n)||(n=zz(Rz(e,`.`,r,!0)))),n.equals(re)||(ae(n),O?.(n.isEmpty()?null:Jz(C,n)),f===void 0&&le(n,t)),n}return re},ye=Kz(),be=e=>{if(me(),K.current=e,q(e),!W.current){let t=zz(oe(e));t.isNaN()||ve(t,!0)}k?.(e),ye(()=>{let t=e;w||(t=e.replace(/。/g,`.`)),t!==e&&be(t)})},xe=()=>{W.current=!0},Se=()=>{W.current=!1,be(ne.current.value)},Ce=e=>{be(e.target.value)},we=In((e,t)=>{if(e&&fe||!e&&pe)return;U.current=!1;let n=zz(ee.current?Gz(u):u);e||(n=n.negate());let r=ve((re||zz(0)).add(n.toString()),!1);j?.(Jz(C,r),{offset:ee.current?Gz(u):u,type:e?`up`:`down`,emitter:t}),ne.current?.focus()}),Te=e=>{let t=zz(oe(ce)),n;n=t.isNaN()?ve(re,e):ve(t,e),f===void 0?n.isNaN()||le(n,!1):le(re,!1)},Ee=()=>{U.current=!0},De=e=>{let{key:t,shiftKey:n}=e;U.current=!0,ee.current=n,t===`Enter`&&(W.current||(U.current=!1),Te(!1),A?.(e)),_!==!1&&!W.current&&[`Up`,`ArrowUp`,`Down`,`ArrowDown`].includes(t)&&(we(t===`Up`||t===`ArrowUp`,`keyboard`),e.preventDefault())},Oe=()=>{U.current=!1,ee.current=!1};S.useEffect(()=>{if(v&&V){let e=e=>{we(e.deltaY<0,`wheel`),e.preventDefault()},t=ne.current;if(t)return t.addEventListener(`wheel`,e,{passive:!1}),()=>t.removeEventListener(`wheel`,e)}});let ke=()=>{z&&Te(!1),H(!1),U.current=!1},Ae=e=>{ne.current&&e.target!==ne.current&&(ne.current.focus(),e.preventDefault()),M?.(e)};Bn(()=>{re.isInvalidate()||le(re,!1)},[E,T]),Bn(()=>{let e=zz(f);ie(e);let t=zz(oe(ce));(!e.equals(t)||!U.current||T)&&le(e,U.current)},[f]),Bn(()=>{T&&he()},[ce]);let je={prefixCls:r,onStep:we,className:o?.action,style:s?.action},Me=S.createElement(Wz,qz({},je,{action:`up`,disabled:fe}),h),Ne=S.createElement(Wz,qz({},je,{action:`down`,disabled:pe}),g);return S.createElement(`div`,{ref:te,className:J(r,`${r}-mode-${n}`,i,o?.root,{[`${r}-focused`]:V,[`${r}-disabled`]:p,[`${r}-readonly`]:m,[`${r}-not-a-number`]:re.isNaN(),[`${r}-out-of-range`]:!re.isInvalidate()&&!_e(re)}),style:{...s?.root,...a},onMouseDown:Ae,onMouseUp:P,onMouseLeave:F,onMouseMove:I,onMouseEnter:L,onMouseOut:R,onClick:N,onFocus:()=>{H(!0)},onBlur:ke,onKeyDown:De,onKeyUp:Oe,onCompositionStart:xe,onCompositionEnd:Se,onBeforeInput:Ee},n===`spinner`&&y&&Ne,b!==void 0&&S.createElement(`div`,{className:J(`${r}-prefix`,o?.prefix),style:s?.prefix},b),S.createElement(`input`,qz({autoComplete:`off`,role:`spinbutton`,"aria-valuemin":c,"aria-valuemax":l,"aria-valuenow":re.isInvalidate()?null:re.toString(),step:u,ref:ne,className:J(`${r}-input`,o?.input),style:s?.input,value:ce,onChange:Ce,disabled:p,readOnly:m},B)),x!==void 0&&S.createElement(`div`,{className:J(`${r}-suffix`,o?.suffix),style:s?.suffix},x),n===`spinner`&&y&&Me,n===`input`&&y&&S.createElement(`div`,{className:J(`${r}-actions`,o?.actions),style:s?.actions},Me,Ne))}),Zz=e=>{let{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:a,fontSizeLG:o,fontSizeSM:s,borderRadiusLG:c,borderRadiusSM:l,colorBgContainerDisabled:u,lineWidth:d,antCls:f}=e,[p,m]=ol(f,`space`);return{[t]:[{display:`inline-flex`,alignItems:`center`,gap:0,whiteSpace:`nowrap`,paddingInline:r,margin:0,borderWidth:d,borderStyle:`solid`,borderRadius:n,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:o,borderRadius:c},"&-small":{paddingInline:a,borderRadius:l,fontSize:s},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[p(`addon-border-color`)]:i,[p(`addon-background`)]:u,[p(`addon-border-color-outlined`)]:i,[p(`addon-background-filled`)]:u,borderColor:m(`addon-border-color`),background:m(`addon-background`),"&-variant-outlined":{[p(`addon-border-color`)]:m(`addon-border-color-outlined`)},"&-variant-filled":{[p(`addon-border-color`)]:`transparent`,[p(`addon-background`)]:m(`addon-background-filled`),[`&${t}-disabled`]:{[p(`addon-border-color`)]:i,[p(`addon-background`)]:u}},"&-variant-borderless":{border:`none`,background:`transparent`},"&-variant-underlined":{border:`none`,background:`transparent`}},{"&-status-error":{[p(`addon-border-color-outlined`)]:e.colorError,[p(`addon-background-filled`)]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[p(`addon-border-color-outlined`)]:e.colorWarning,[p(`addon-background-filled`)]:e.colorWarningBg,color:e.colorWarning}}]}},Qz=rl([`Space`,`Addon`],e=>[Zz(e),Yg(e,{focus:!1})]),$z=S.forwardRef((e,t)=>{let{className:n,children:r,style:i,prefixCls:a,variant:o=`outlined`,disabled:s,status:c,...l}=e,{getPrefixCls:u,direction:d}=S.useContext(oi),f=u(`space-addon`,a),[p,m]=Qz(f),{compactItemClassnames:h,compactSize:g}=ih(f,d),_=aC(f,c),v=J(f,p,h,m,`${f}-variant-${o}`,_,{[`${f}-${g}`]:g,[`${f}-disabled`]:s},n);return S.createElement(`div`,{ref:t,className:v,style:i,...l},r)}),eB=e=>{let t=e.handleVisible??`auto`,n=e.controlHeightSM-e.lineWidth*2;return{...tL(e),controlWidth:90,handleWidth:n,handleFontSize:e.fontSize/2,handleVisible:t,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new Rs(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:+(t===!0),handleVisibleWidth:t===!0?n:0}},tB=e=>{let{componentCls:t,lineWidth:n,lineType:r,borderRadius:i,inputFontSizeSM:a,inputFontSizeLG:o,colorError:s,paddingInlineSM:c,paddingBlockSM:l,paddingBlockLG:u,paddingInlineLG:d,colorIcon:f,colorTextDisabled:p,motionDurationMid:m,handleHoverColor:h,handleOpacity:g,paddingInline:_,paddingBlock:v,handleBg:y,handleActiveBg:b,inputAffixPadding:x,borderRadiusSM:S,controlWidth:C,handleBorderColor:w,filledHandleBg:T,lineHeightLG:E,antCls:D}=e,O=`${Y(n)} ${r} ${w}`,[k,A]=ol(D,`input-number`);return[{[t]:{...Jc(e),...vL(e),[k(`input-padding-block`)]:Y(v),[k(`input-padding-inline`)]:Y(_),display:`inline-flex`,width:C,margin:0,paddingBlock:0,borderRadius:i,...aL(e,{[`${t}-actions`]:{background:y,[`${t}-action-down`]:{borderBlockStart:O}}}),...uL(e,{[`${t}-actions`]:{background:T,[`${t}-action-down`]:{borderBlockStart:O}},"&:focus-within":{[`${t}-actions`]:{background:y}}}),...mL(e,{[`${t}-actions`]:{background:y,[`${t}-action-down`]:{borderBlockStart:O}}}),...sL(e),[`&${t}-borderless`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(v).add(n).equal())},[`&${t}-borderless${t}-sm`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(l).add(n).equal())},[`&${t}-borderless${t}-lg`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(u).add(n).equal())},"&-rtl":{direction:`rtl`,[`${t}-input`]:{direction:`rtl`}},[`&${t}-out-of-range`]:{[`${t}-input`]:{color:s}},[`${t}-input`]:{...Jc(e),width:`100%`,paddingBlock:A(`input-padding-block`),textAlign:`start`,backgroundColor:`transparent`,border:0,borderRadius:0,outline:0,transition:`all ${m} linear`,appearance:`textfield`,fontSize:`inherit`,lineHeight:`inherit`,...hL(e.colorTextPlaceholder),'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:`none`}},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1},[`&-disabled ${t}-input`]:{cursor:`not-allowed`,color:e.colorTextDisabled}}},{[t]:{[`${t}-action`]:{...Yc(),userSelect:`none`,overflow:`hidden`,fontWeight:`bold`,lineHeight:0,textAlign:`center`,cursor:`pointer`,transition:`all ${m} linear`,[`&:active:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{background:b},[`&:hover:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{color:h},[`&${t}-action-up-disabled, &${t}-action-down-disabled`]:{cursor:`not-allowed`,color:p}},"&-mode-input":{overflow:`hidden`,[`${t}-actions`]:{position:`absolute`,insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:g,height:`100%`,borderRadius:0,display:`flex`,flexDirection:`column`,alignItems:`stretch`,transition:`all ${m}`,overflow:`hidden`,[`${t}-action`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,flex:`auto`,height:`40%`,marginInlineEnd:0,fontSize:e.handleFontSize}},[`&:hover ${t}-actions, &-focused ${t}-actions`]:{width:e.handleWidth,opacity:1},[`${t}-action`]:{color:f,height:`50%`,borderInlineStart:O,[`&:hover:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{height:`60%`}},[`&${t}-disabled, &${t}-readonly`]:{[`${t}-actions`]:{display:`none`}}},[`&${t}-mode-spinner`]:{padding:0,width:`auto`,[`${t}-action`]:{flex:`none`,paddingInline:A(`input-padding-inline`),"&-up":{borderInlineStart:O},"&-down":{borderInlineEnd:O}},[`${t}-input`]:{textAlign:`center`,paddingInline:A(`input-padding-inline`)}}}},{[t]:{"&-lg":{[k(`input-padding-block`)]:Y(u),[k(`input-padding-inline`)]:Y(d),paddingBlock:0,fontSize:o,lineHeight:E},"&-sm":{[k(`input-padding-block`)]:Y(l),[k(`input-padding-inline`)]:Y(c),paddingBlock:0,fontSize:a,borderRadius:S}}},{[t]:{[`${t}-prefix, ${t}-suffix`]:{display:`flex`,flex:`none`,alignItems:`center`,alignSelf:`center`,pointerEvents:`none`},[`${t}-prefix`]:{marginInlineEnd:x},[`${t}-suffix`]:{height:`100%`,marginInlineStart:x,transition:`margin ${m}`},[`&:hover:not(${t}-without-controls)`]:{[`${t}-suffix`]:{marginInlineEnd:e.handleWidth}}}}]},nB=e=>{let{componentCls:t,antCls:n}=e;return{[`${t}-addon`]:{[`&:has(${n}-select)`]:{border:0,padding:0}}}},rB=rl(`InputNumber`,e=>{let t=gs(e,eL(e));return[tB(t),nB(t),Yg(t)]},eB,{unitless:{handleOpacity:!0},resetFont:!1}),iB=S.forwardRef((e,t)=>{let n=S.useRef(null);S.useImperativeHandle(t,()=>n.current);let{rootClassName:r,size:i,disabled:a,prefixCls:o,addonBefore:s,addonAfter:c,prefix:l,suffix:u,bordered:d,readOnly:f,status:p,controls:m=!0,variant:h,className:g,style:_,classNames:v,styles:y,mode:b,...x}=e,{direction:C,className:w,style:T,styles:E,classNames:D}=li(`inputNumber`),O=S.useContext(zp),k=a??O,A=S.useMemo(()=>!m||k||f?!1:m,[m,k,f]),{compactSize:j,compactItemClassnames:M}=ih(o,C),N=b===`spinner`?S.createElement(TL,null):S.createElement(wz,null),P=b===`spinner`?S.createElement(xz,null):S.createElement(AC,null),F=typeof A==`boolean`?A:void 0;hd(A)&&(N=A.upIcon||N,P=A.downIcon||P);let{hasFeedback:I,isFormItemInput:L,feedbackIcon:R}=S.useContext(Sy),z=th(e=>i??j??e),[B,V]=hC(`inputNumber`,h,d),H=I&&S.createElement(S.Fragment,null,R),U={...e,size:z,disabled:k,controls:A},[W,ee]=Fd([D,v],[E,y],{props:U});return S.createElement(Xz,{ref:n,mode:b,disabled:k,className:J(g,r,W.root,w,M,aC(o,p,I),{[`${o}-${B}`]:V,[`${o}-lg`]:z===`large`,[`${o}-sm`]:z===`small`,[`${o}-rtl`]:C===`rtl`,[`${o}-in-form-item`]:L,[`${o}-without-controls`]:!A}),style:{...ee.root,...T,..._},upHandler:N,downHandler:P,prefixCls:o,readOnly:f,controls:F,prefix:l,suffix:H||u,classNames:W,styles:ee,...x})}),aB=S.forwardRef((e,t)=>{let{addonBefore:n,addonAfter:r,prefixCls:i,className:a,status:o,rootClassName:s,...c}=e,{getPrefixCls:l}=li(`inputNumber`),u=l(`input-number`,i),{status:d}=S.useContext(Sy),f=oC(d,o),p=bf(u),[m,h]=rB(u,p),g=n||r,_=S.createElement(iB,{ref:t,...c,prefixCls:u,status:f,className:J(h,p,m,a),rootClassName:g?void 0:s});if(g){let t=t=>t?S.createElement($z,{className:J(`${u}-addon`,h,m),variant:e.variant,disabled:e.disabled,status:f},S.createElement(Ty,{form:!0},t)):null,i=t(n),a=t(r);return S.createElement(sh,{rootClassName:s},i,_,a)}return _}),oB=aB;oB._InternalPanelDoNotUseOrYouWillBeFired=e=>S.createElement(am,{theme:{components:{InputNumber:{handleVisible:!0}}}},S.createElement(aB,{...e}));function sB(e){return!!(e.addonBefore||e.addonAfter)}function cB(e){return!!(e.prefix||e.suffix||e.allowClear)}function lB(e,t,n){let r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart==`number`&&typeof t.selectionEnd==`number`&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=(...e)=>{t.setSelectionRange(...e)},i}function uB(e,t,n,r){if(!n)return;let i=t;if(t.type===`click`){i=lB(t,e,``),n(i);return}if(e.type!==`file`&&r!==void 0){i=lB(t,e,r),n(i);return}n(i)}function dB(){return dB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{inputElement:n,children:r,prefixCls:i,prefix:a,suffix:o,addonBefore:s,addonAfter:c,className:l,style:u,disabled:d,readOnly:f,focused:p,triggerFocus:m,allowClear:h,value:g,handleReset:_,hidden:v,classes:y,classNames:b,dataAttrs:x,styles:C,components:w,onClear:T}=e,E=r??n,D=w?.affixWrapper||`span`,O=w?.groupWrapper||`span`,k=w?.wrapper||`span`,A=w?.groupAddon||`span`,j=(0,S.useRef)(null),M=e=>{j.current?.contains(e.target)&&m?.()},N=cB(e),P=(0,S.cloneElement)(E,{value:g,className:J(E.props?.className,!N&&b?.variant)||null}),F=(0,S.useRef)(null);if(S.useImperativeHandle(t,()=>({nativeElement:F.current||j.current})),N){let e=null;if(h){let t=!d&&!f&&g,n=`${i}-clear-icon`,r=typeof h==`object`&&h?.clearIcon?h.clearIcon:`✖`;e=S.createElement(`button`,{type:`button`,tabIndex:-1,onClick:e=>{_?.(e),T?.()},onMouseDown:e=>e.preventDefault(),className:J(n,{[`${n}-hidden`]:!t,[`${n}-has-suffix`]:!!o})},r)}let t=`${i}-affix-wrapper`,n=J(t,{[`${i}-disabled`]:d,[`${t}-disabled`]:d,[`${t}-focused`]:p,[`${t}-readonly`]:f,[`${t}-input-with-clear-btn`]:o&&h&&g},y?.affixWrapper,b?.affixWrapper,b?.variant),r=(o||h)&&S.createElement(`span`,{className:J(`${i}-suffix`,b?.suffix),style:C?.suffix},e,o);P=S.createElement(D,dB({className:n,style:C?.affixWrapper,onClick:M},x?.affixWrapper,{ref:j}),a&&S.createElement(`span`,{className:J(`${i}-prefix`,b?.prefix),style:C?.prefix},a),P,r)}if(sB(e)){let e=`${i}-group`,t=`${e}-addon`,n=`${e}-wrapper`,r=J(`${i}-wrapper`,e,y?.wrapper,b?.wrapper),a=J(n,{[`${n}-disabled`]:d},y?.group,b?.groupWrapper);P=S.createElement(O,{className:a,ref:F},S.createElement(k,{className:r},s&&S.createElement(A,{className:t},s),P,c&&S.createElement(A,{className:t},c)))}return S.cloneElement(P,{className:J(P.props?.className,l)||null,style:{...P.props?.style,...u},hidden:v})});function pB(e,t){return S.useMemo(()=>{let n={};t&&(n.show=typeof t==`object`&&t.formatter?t.formatter:!!t),n={...n,...e};let{show:r,...i}=n;return{...i,show:!!r,showFormatter:typeof r==`function`?r:void 0,strategy:i.strategy||(e=>e.length)}},[e,t])}function mB(){return mB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{autoComplete:n,onChange:r,onFocus:i,onBlur:a,onPressEnter:o,onKeyDown:s,onKeyUp:c,prefixCls:l=`rc-input`,disabled:u,htmlSize:d,className:f,maxLength:p,suffix:m,showCount:h,count:g,type:_=`text`,classes:v,classNames:y,styles:b,onCompositionStart:x,onCompositionEnd:C,...w}=e,[T,E]=(0,S.useState)(!1),D=(0,S.useRef)(!1),O=(0,S.useRef)(!1),k=(0,S.useRef)(null),A=(0,S.useRef)(null),j=e=>{k.current&&l_(k.current,e)},[M,N]=Hn(e.defaultValue,e.value),P=M==null?``:String(M),[F,I]=(0,S.useState)(null),L=pB(g,h),R=L.max||p,z=L.strategy(P),B=!!R&&z>R;(0,S.useImperativeHandle)(t,()=>({focus:j,blur:()=>{k.current?.blur()},setSelectionRange:(e,t,n)=>{k.current?.setSelectionRange(e,t,n)},select:()=>{k.current?.select()},input:k.current,nativeElement:A.current?.nativeElement||k.current})),(0,S.useEffect)(()=>{O.current&&=!1,E(e=>e&&u?!1:e)},[u]);let V=(e,t,n)=>{let i=t;if(!D.current&&L.exceedFormatter&&L.max&&L.strategy(t)>L.max)i=L.exceedFormatter(t,{max:L.max}),t!==i&&I([k.current?.selectionStart||0,k.current?.selectionEnd||0]);else if(n.source===`compositionEnd`)return;N(i),k.current&&uB(k.current,e,r,i)};(0,S.useEffect)(()=>{F&&k.current?.setSelectionRange(...F)},[F]);let H=e=>{V(e,e.target.value,{source:`change`})},U=e=>{D.current=!1,V(e,e.currentTarget.value,{source:`compositionEnd`}),C?.(e)},W=e=>{o&&e.key===`Enter`&&!O.current&&!e.nativeEvent.isComposing&&(O.current=!0,o(e)),s?.(e)},ee=e=>{e.key===`Enter`&&(O.current=!1),c?.(e)},te=e=>{E(!0),i?.(e)},ne=e=>{O.current&&=!1,E(!1),a?.(e)},re=e=>{N(``),j(),k.current&&uB(k.current,e,r)},ie=B&&`${l}-out-of-range`;return S.createElement(fB,mB({},w,{prefixCls:l,className:J(f,ie),handleReset:re,value:P,focused:T,triggerFocus:j,suffix:(()=>{let e=Number(R)>0;if(m||L.show){let t=L.showFormatter?L.showFormatter({value:P,count:z,maxLength:R}):`${z}${e?` / ${R}`:``}`;return S.createElement(S.Fragment,null,L.show&&S.createElement(`span`,{className:J(`${l}-show-count-suffix`,{[`${l}-show-count-has-suffix`]:!!m},y?.count),style:{...b?.count}},t),m)}return null})(),disabled:u,classes:v,classNames:y,styles:b,ref:A}),(()=>{let t=Sr(e,[`prefixCls`,`onPressEnter`,`addonBefore`,`addonAfter`,`prefix`,`suffix`,`allowClear`,`defaultValue`,`showCount`,`count`,`classes`,`htmlSize`,`styles`,`classNames`,`onClear`]);return S.createElement(`input`,mB({autoComplete:n},t,{onChange:H,onFocus:te,onBlur:ne,onKeyDown:W,onKeyUp:ee,className:J(l,{[`${l}-disabled`]:u},y?.input),style:b?.input,ref:k,size:d,type:_,onCompositionStart:e=>{D.current=!0,x?.(e)},onCompositionEnd:U}))})())}),gB=e=>{let t;return hd(e)&&e?.clearIcon?t=e:e&&(t={clearIcon:S.createElement(Fl,null)}),t};function _B(e,t){let n=(0,S.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute(`type`)===`password`&&e.current?.input.hasAttribute(`value`)&&e.current?.input.removeAttribute(`value`)}))};return(0,S.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[]),r}function vB(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var yB=(0,S.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,status:i,size:a,disabled:o,onBlur:s,onFocus:c,suffix:l,allowClear:u,addonAfter:d,addonBefore:f,className:p,style:m,styles:h,rootClassName:g,onChange:_,classNames:v,variant:y,...b}=e,{getPrefixCls:x,direction:C,allowClear:w,autoComplete:T,className:E,style:D,classNames:O,styles:k}=li(`input`),A=x(`input`,n),j=(0,S.useRef)(null),M=bf(A),[N,P]=yL(A,g);bL(A,M);let{compactSize:F,compactItemClassnames:I}=ih(A,C),L=th(e=>a??F??e),R=S.useContext(zp),z=o??R,B={...e,size:L,disabled:z},[V,H]=Fd([O,v],[k,h],{props:B}),{status:U,hasFeedback:W,feedbackIcon:ee}=(0,S.useContext)(Sy),te=oC(U,i);(0,S.useRef)(vB(e)||!!W);let ne=_B(j,!0),re=e=>{ne(),s?.(e)},ie=e=>{ne(),c?.(e)},ae=e=>{ne(),_?.(e)},G=(W||l)&&S.createElement(S.Fragment,null,l,W&&ee),oe=gB(u??w),[K,se]=hC(`input`,y,r);return S.createElement(hB,{ref:$n(t,j),prefixCls:A,autoComplete:T,...b,disabled:z,onBlur:re,onFocus:ie,style:{...H.root,...D,...m},styles:H,suffix:G,allowClear:oe,className:J(p,g,P,M,I,E,V.root),onChange:ae,addonBefore:f&&S.createElement(Ty,{form:!0,space:!0},f),addonAfter:d&&S.createElement(Ty,{form:!0,space:!0},d),classNames:{...V,input:J({[`${A}-sm`]:L===`small`,[`${A}-lg`]:L===`large`,[`${A}-rtl`]:C===`rtl`},V.input,N),variant:J({[`${A}-${K}`]:se},aC(A,te)),affixWrapper:J({[`${A}-affix-wrapper-sm`]:L===`small`,[`${A}-affix-wrapper-lg`]:L===`large`,[`${A}-affix-wrapper-rtl`]:C===`rtl`},N),wrapper:J({[`${A}-group-rtl`]:C===`rtl`},N),groupWrapper:J({[`${A}-group-wrapper-sm`]:L===`small`,[`${A}-group-wrapper-lg`]:L===`large`,[`${A}-group-wrapper-rtl`]:C===`rtl`,[`${A}-group-wrapper-${K}`]:se},aC(`${A}-group-wrapper`,te,W),N)}})}),bB={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z`}}]},name:`swap-right`,theme:`outlined`};function xB(){return xB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,xB({},e,{ref:t,icon:bB}))),CB=(e,t,n,r,i,a)=>{let{classNames:o,styles:s}=li(e),[c,l]=Fd([o,t],[s,n],{props:a},{popup:{_default:`root`}});return S.useMemo(()=>[{...c,popup:{...c.popup,root:J(c.popup?.root,r)}},{...l,popup:{...l.popup,root:{...l.popup?.root,...i}}}],[c,l,r,i])};function wB(e,t,n){return n===void 0?t===`year`&&e.lang.yearPlaceholder?e.lang.yearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.quarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.monthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.weekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.placeholder:e.lang.placeholder:n}function TB(e,t,n){return n===void 0?t===`year`&&e.lang.yearPlaceholder?e.lang.rangeYearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.rangeQuarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.rangeMonthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.rangeWeekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.rangePlaceholder:e.lang.rangePlaceholder:n}function EB(e,t){let{allowClear:n=!0}=e,{clearIcon:r,removeIcon:i}=PC({...e,prefixCls:t,componentName:`DatePicker`});return[S.useMemo(()=>n===!1?!1:{clearIcon:r,...n===!0?{}:n},[n,r]),i]}var[DB,OB]=[`week`,`WeekPicker`],[kB,AB]=[`month`,`MonthPicker`],[jB,MB]=[`year`,`YearPicker`],[NB,PB]=[`quarter`,`QuarterPicker`],[FB,IB]=[`time`,`TimePicker`],LB={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z`}}]},name:`calendar`,theme:`outlined`};function RB(){return RB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,RB({},e,{ref:t,icon:LB}))),BB={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`};function VB(){return VB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,VB({},e,{ref:t,icon:BB}))),UB=({picker:e,hasFeedback:t,feedbackIcon:n,suffixIcon:r})=>r===null||r===!1?null:r===!0||r===void 0?S.createElement(S.Fragment,null,e===FB?S.createElement(HB,null):S.createElement(zB,null),t&&n):r,WB=e=>S.createElement(Zg,{size:`small`,type:`primary`,...e});function GB(e){return(0,S.useMemo)(()=>({button:WB,...e}),[e])}var KB=e=>(0,S.forwardRef)((t,n)=>{let{prefixCls:r,getPopupContainer:i,components:a,className:o,style:s,classNames:c,styles:l,placement:u,size:d,disabled:f,bordered:p=!0,placeholder:m,status:h,variant:g,picker:_,dropdownClassName:v,popupClassName:y,popupStyle:b,rootClassName:x,suffixIcon:C,separator:w,...T}=t,[E,D]=CB(_===FB?`timePicker`:`datePicker`,c,l,y||v,b),O=S.useRef(null),{getPrefixCls:k,direction:A,getPopupContainer:j,rangePicker:M}=(0,S.useContext)(oi),N=k(`picker`,r),{compactSize:P,compactItemClassnames:F}=ih(N,A),I=k(),L=w??M?.separator,[R,z]=hC(`rangePicker`,g,p),B=bf(N),[V,H]=CL(N,B),U=J(V,H,B,x),[W]=EB(t,N),ee=GB(a),te=th(e=>d??P??e),ne=S.useContext(zp),re=f??ne,{hasFeedback:ie,status:ae,feedbackIcon:G}=(0,S.useContext)(Sy),oe=UB({picker:_,hasFeedback:ie,feedbackIcon:G,suffixIcon:C});(0,S.useImperativeHandle)(n,()=>O.current);let[K]=cd(`Calendar`,Qu),se=fr(K,t.locale||{}),[ce]=Yd(`DatePicker`,D?.popup?.root?.zIndex);return S.createElement(Ty,{space:!0},S.createElement(QF,{separator:S.createElement(`span`,{"aria-label":`to`,className:`${N}-separator`},L??S.createElement(SB,null)),disabled:re,ref:O,placement:u,placeholder:TB(se,_,m),suffixIcon:oe,prevIcon:S.createElement(`span`,{className:`${N}-prev-icon`}),nextIcon:S.createElement(`span`,{className:`${N}-next-icon`}),superPrevIcon:S.createElement(`span`,{className:`${N}-super-prev-icon`}),superNextIcon:S.createElement(`span`,{className:`${N}-super-next-icon`}),transitionName:`${I}-slide-up`,picker:_,...T,locale:se.lang,getPopupContainer:i||j,generateConfig:e,components:ee,direction:A,prefixCls:N,rootClassName:U,className:J({[`${N}-large`]:te===`large`,[`${N}-small`]:te===`small`,[`${N}-${R}`]:z},aC(N,oC(ae,h),ie),F,o,M?.className),style:{...M?.style,...s},classNames:E,styles:{...D,popup:{...D.popup,root:{...D.popup.root,zIndex:ce}}},allowClear:W}))}),qB=e=>{let t=(t,n)=>{let r=n===IB?`timePicker`:`datePicker`;return(0,S.forwardRef)((i,a)=>{let{prefixCls:o,getPopupContainer:s,components:c,style:l,className:u,size:d,bordered:f,placement:p,placeholder:m,disabled:h,status:g,variant:_,onCalendarChange:v,classNames:y,styles:b,dropdownClassName:x,popupClassName:C,popupStyle:w,rootClassName:T,suffixIcon:E,...D}=i,{suffixIcon:O}=li(n===IB?`timePicker`:`datePicker`),{getPrefixCls:k,direction:A,getPopupContainer:j,[r]:M}=(0,S.useContext)(oi),N=k(`picker`,o),{compactSize:P,compactItemClassnames:F}=ih(N,A),I=th(e=>d??P??e),L=S.useContext(zp),R=h??L,z={...i,size:I,disabled:R,status:g,variant:_},[B,V]=CB(r,y,b,C||x,w,z),H=S.useRef(null),[U,W]=hC(`datePicker`,_,f),ee=bf(N),[te,ne]=CL(N,ee),re=J(te,ne,ee,T);(0,S.useImperativeHandle)(a,()=>H.current);let ie={showToday:!0},ae=t||i.picker,G=k(),{onSelect:oe,multiple:K}=D,se=oe&&t===`time`&&!K,ce=(e,t,n)=>{v?.(e,t,n),se&&oe(e)},[q,le]=EB(i,N),ue=GB(c),{hasFeedback:de,status:fe,feedbackIcon:pe}=(0,S.useContext)(Sy),me=UB({picker:ae,hasFeedback:de,feedbackIcon:pe,suffixIcon:E===void 0?O:E}),[he]=cd(`DatePicker`,Qu),ge=fr(he,i.locale||{}),[_e]=Yd(`DatePicker`,V?.popup?.root?.zIndex);return S.createElement(Ty,{space:!0},S.createElement(II,{ref:H,placeholder:wB(ge,ae,m),suffixIcon:me,placement:p,prevIcon:S.createElement(`span`,{className:`${N}-prev-icon`}),nextIcon:S.createElement(`span`,{className:`${N}-next-icon`}),superPrevIcon:S.createElement(`span`,{className:`${N}-super-prev-icon`}),superNextIcon:S.createElement(`span`,{className:`${N}-super-next-icon`}),transitionName:`${G}-slide-up`,picker:t,onCalendarChange:ce,...ie,...D,locale:ge.lang,getPopupContainer:s||j,generateConfig:e,components:ue,direction:A,disabled:R,prefixCls:N,rootClassName:re,className:J({[`${N}-large`]:I===`large`,[`${N}-small`]:I===`small`,[`${N}-${U}`]:W},aC(N,oC(fe,g),de),F,M?.className,u),style:{...M?.style,...l},classNames:B,styles:{...V,popup:{...V.popup,root:{...V.popup.root,zIndex:_e}}},allowClear:q,removeIcon:le}))})},n=t(),r=t(DB,OB),i=t(kB,AB),a=t(jB,MB),o=t(NB,PB);return{DatePicker:n,WeekPicker:r,MonthPicker:i,YearPicker:a,TimePicker:t(FB,IB),QuarterPicker:o}},JB=e=>{let{DatePicker:t,WeekPicker:n,MonthPicker:r,YearPicker:i,TimePicker:a,QuarterPicker:o}=qB(e),s=KB(e),c=t;return c.WeekPicker=n,c.MonthPicker=r,c.YearPicker=i,c.RangePicker=s,c.TimePicker=a,c.QuarterPicker=o,c},YB=JB(QE);YB._InternalPanelDoNotUseOrYouWillBeFired=cx(YB,`popupAlign`,void 0,`picker`),YB._InternalRangePanelDoNotUseOrYouWillBeFired=cx(YB.RangePicker,`popupAlign`,void 0,`picker`),YB.generatePicker=JB;var XB={xxxl:4,xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},ZB=S.createContext(null),QB=e=>Cr(e).map(e=>({...e?.props,key:e.key}));function $B(e,t,n){let r=S.useMemo(()=>t||QB(n),[t,n]);return S.useMemo(()=>r.map(({span:t,...n})=>t===`filled`?{...n,filled:!0}:{...n,span:pd(t)?t:WC(e,t)}),[r,e])}function eV(e,t){let n=[],r=[],i=!1,a=0;return e.filter(e=>e).forEach(e=>{let{filled:o,...s}=e;if(o){r.push(s),n.push(r),r=[],a=0;return}let c=t-a;a+=e.span||1,a>=t?(a>t?(i=!0,r.push({...s,span:c})):r.push(s),n.push(r),r=[],a=0):r.push(s)}),r.length>0&&n.push(r),n=n.map(e=>{let n=e.reduce((e,t)=>e+(t.span||1),0);if(n{let[n,r]=(0,S.useMemo)(()=>eV(t,e),[t,e]);return n},nV=e=>e.children,rV=e=>{let{itemPrefixCls:t,component:n,span:r,className:i,style:a,labelStyle:o,contentStyle:s,bordered:c,label:l,content:u,colon:d,type:f,styles:p,classNames:m}=e,h=n,{classNames:g,styles:_}=S.useContext(ZB),[v,y]=Fd([g,m],[_,p],{props:e}),b={...o,...y.label},x={...s,...y.content};return c?S.createElement(h,{colSpan:r,style:a,className:J(i,{[`${t}-item-${f}`]:f===`label`||f===`content`,[v.label]:v.label&&f===`label`,[v.content]:v.content&&f===`content`})},fd(l)&&S.createElement(`span`,{style:b},l),fd(u)&&S.createElement(`span`,{style:x},u)):S.createElement(h,{className:J(`${t}-item`,i),style:a,colSpan:r},S.createElement(`div`,{className:`${t}-item-container`},fd(l)&&S.createElement(`span`,{style:b,className:J(`${t}-item-label`,v.label,{[`${t}-item-no-colon`]:!d})},l),fd(u)&&S.createElement(`span`,{style:x,className:J(`${t}-item-content`,v.content)},u)))};function iV(e,{colon:t,prefixCls:n,bordered:r},{component:i,type:a,showLabel:o,showContent:s,labelStyle:c,contentStyle:l,styles:u}){return e.map(({label:e,children:d,prefixCls:f=n,className:p,style:m,labelStyle:h,contentStyle:g,span:_=1,key:v,styles:y,classNames:b},x)=>typeof i==`string`?S.createElement(rV,{key:`${a}-${v||x}`,className:p,style:m,classNames:b,styles:{label:{...c,...u?.label,...h,...y?.label},content:{...l,...u?.content,...g,...y?.content}},span:_,colon:t,component:i,itemPrefixCls:f,bordered:r,label:o?e:null,content:s?d:null,type:a}):[S.createElement(rV,{key:`label-${v||x}`,className:p,style:{...c,...u?.label,...m,...h,...y?.label},span:1,colon:t,component:i[0],itemPrefixCls:f,bordered:r,label:e,type:`label`}),S.createElement(rV,{key:`content-${v||x}`,className:p,style:{...l,...u?.content,...m,...g,...y?.content},span:_*2-1,component:i[1],itemPrefixCls:f,bordered:r,content:d,type:`content`})])}var aV=e=>{let t=S.useContext(ZB),{prefixCls:n,vertical:r,row:i,index:a,bordered:o}=e;return r?S.createElement(S.Fragment,null,S.createElement(`tr`,{key:`label-${a}`,className:`${n}-row`},iV(i,e,{component:`th`,type:`label`,showLabel:!0,...t})),S.createElement(`tr`,{key:`content-${a}`,className:`${n}-row`},iV(i,e,{component:`td`,type:`content`,showContent:!0,...t}))):S.createElement(`tr`,{key:a,className:`${n}-row`},iV(i,e,{component:o?[`th`,`td`]:`td`,type:`item`,showLabel:!0,showContent:!0,...t}))},oV=e=>{let{componentCls:t,labelBg:n}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:`auto`},[`${t}-row`]:{borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:`none`,"> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.padding)} ${Y(e.paddingLG)}`,borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:`none`}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:n,"&::after":{display:`none`}}}},[`&${t}-medium`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.paddingSM)} ${Y(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.paddingXS)} ${Y(e.padding)}`}}}}}},sV=e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:r,itemPaddingEnd:i,colonMarginRight:a,colonMarginLeft:o,titleMarginBottom:s}=e;return{[t]:{...Jc(e),...oV(e),"&-rtl":{direction:`rtl`},[`${t}-header`]:{display:`flex`,alignItems:`center`,marginBottom:s},[`${t}-title`]:{...qc,flex:`auto`,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG},[`${t}-extra`]:{marginInlineStart:`auto`,color:n,fontSize:e.fontSize},[`${t}-view`]:{width:`100%`,borderRadius:e.borderRadiusLG,table:{width:`100%`,tableLayout:`fixed`,borderCollapse:`collapse`}},[`${t}-row`]:{"> th, > td":{paddingBottom:r,paddingInlineEnd:i},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:`none`,"> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:`normal`,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:`start`,"&::after":{content:`":"`,position:`relative`,top:-.5,marginInline:`${Y(o)} ${Y(a)}`},[`&${t}-item-no-colon::after`]:{content:`""`}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:`""`}},[`${t}-item-content`]:{display:`table-cell`,flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:`break-word`,overflowWrap:`break-word`},[`${t}-item`]:{paddingBottom:0,verticalAlign:`top`,"&-container":{display:`flex`,[`${t}-item-label`]:{display:`inline-flex`,alignItems:`baseline`},[`${t}-item-content`]:{display:`inline-flex`,alignItems:`baseline`,minWidth:`1em`}}},"&-medium":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}}}},cV=rl(`Descriptions`,e=>sV(gs(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText})),lV=e=>{let{prefixCls:t,title:n,extra:r,column:i,colon:a=!0,bordered:o,layout:s,children:c,className:l,rootClassName:u,style:d,size:f,labelStyle:p,contentStyle:m,styles:h,items:g,classNames:_,...v}=e,{getPrefixCls:y,direction:b,className:x,style:C,classNames:w,styles:T}=li(`descriptions`),E=y(`descriptions`,t),D=KC(),O=S.useMemo(()=>pd(i)?i:WC(D,{...XB,...i})??3,[D,i]),k=$B(D,g,c),A=th(f),j=tV(O,k),[M,N]=cV(E),P={...e,column:O,items:k,size:A},[F,I]=Fd([w,_],[T,h],{props:P}),L=S.useMemo(()=>({labelStyle:p,contentStyle:m,styles:{label:I.label,content:I.content},classNames:{label:F.label,content:F.content}}),[p,m,I.label,I.content,F.label,F.content]);return S.createElement(ZB.Provider,{value:L},S.createElement(`div`,{className:J(E,x,F.root,{[`${E}-medium`]:A===`medium`||A===`middle`,[`${E}-small`]:A===`small`,[`${E}-bordered`]:!!o,[`${E}-rtl`]:b===`rtl`},l,u,M,N),style:{...C,...I.root,...d},...v},(n||r)&&S.createElement(`div`,{className:J(`${E}-header`,F.header),style:I.header},n&&S.createElement(`div`,{className:J(`${E}-title`,F.title),style:I.title},n),r&&S.createElement(`div`,{className:J(`${E}-extra`,F.extra),style:I.extra},r)),S.createElement(`div`,{className:`${E}-view`},S.createElement(`table`,null,S.createElement(`tbody`,null,j.map((e,t)=>S.createElement(aV,{key:t,index:t,colon:a,prefixCls:E,vertical:s===`vertical`,bordered:o,row:e})))))))};lV.Item=nV;var uV=S.createContext(null),dV=S.createContext({});function fV(){return fV=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t,className:n,containerRef:r,...i}=e,{panel:a}=S.useContext(dV),o=er(a,r);return S.createElement(`div`,fV({className:J(`${t}-section`,n),role:`dialog`,ref:o},Vu(e,{aria:!0}),{"aria-modal":`true`},i))};function mV(e){let{prefixCls:t,direction:n,className:r,style:i,maxSize:a,containerRef:o,currentSize:s,onResize:c,onResizeEnd:l,onResizeStart:u}=e,[d,f]=S.useState(!1),[p,m]=S.useState(0),[h,g]=S.useState(0),_=n===`left`||n===`right`,v=In(e=>{e.preventDefault(),e.stopPropagation(),f(!0),m(_?e.clientX:e.clientY);let t;if(typeof s==`number`)t=s;else if(o?.current){let e=o.current.getBoundingClientRect();t=_?e.width:e.height}g(t),u?.(t)}),y=In(e=>{if(!d)return;let t=(_?e.clientX:e.clientY)-p;(n===`right`||n===`bottom`)&&(t=-t);let r=h+t;r<0&&(r=0),a&&r>a&&(r=a),c?.(r)}),b=S.useCallback(()=>{if(d&&(f(!1),o?.current)){let e=o.current.getBoundingClientRect(),t=_?e.width:e.height;l?.(t)}},[d,o,l,_]);return S.useEffect(()=>{if(d)return document.addEventListener(`mousemove`,y),document.addEventListener(`mouseup`,b),()=>{document.removeEventListener(`mousemove`,y),document.removeEventListener(`mouseup`,b)}},[d,y,b]),{dragElementProps:{className:J(`${t}-dragger`,`${t}-dragger-${n}`,{[`${t}-dragger-dragging`]:d,[`${t}-dragger-horizontal`]:_,[`${t}-dragger-vertical`]:!_},r),style:i,onMouseDown:v},isDragging:d}}function hV(e){if(typeof e==`string`){let t=Number(e.replace(/px$/i,``));if(parseFloat(e)===t&&br(!1,"Invalid value type of `width` or `height` which should be number type instead."),!Number.isNaN(t))return t}return e}function gV(e,t,n,r,i){let[a]=x_(t&&(r??i!==!1),e);return S.useEffect(()=>{t&&n===!0&&e()?.focus({preventScroll:!0})},[t]),a}function _V(){return _V=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,open:r,placement:i,inline:a,push:o,forceRender:s,autoFocus:c,focusTrap:l,classNames:u,rootClassName:d,rootStyle:f,zIndex:p,className:m,id:h,style:g,motion:_,width:v,height:y,size:b,maxSize:x,children:C,mask:w,maskClosable:T,maskMotion:E,maskClassName:D,maskStyle:O,afterOpenChange:k,onClose:A,onMouseEnter:j,onMouseOver:M,onMouseLeave:N,onClick:P,onKeyDown:F,onKeyUp:I,styles:L,drawerRender:R,resizable:z,defaultSize:B}=e,V=S.useRef(null);S.useImperativeHandle(t,()=>V.current);let H=gV(()=>V.current,r,c,l,w),[U,W]=S.useState(!1),ee=S.useContext(uV),te;te=typeof o==`boolean`?o?{}:{distance:0}:o||{};let ne=te?.distance??ee?.pushDistance??180,re=S.useMemo(()=>({pushDistance:ne,push:()=>{W(!0)},pull:()=>{W(!1)}}),[ne]);S.useEffect(()=>{r?ee?.push?.():ee?.pull?.()},[r]),S.useEffect(()=>()=>{ee?.pull?.()},[]);let ie=S.createElement(Iu,_V({key:`mask`},E,{visible:w&&r}),({className:e,style:t},i)=>S.createElement(`div`,{className:J(`${n}-mask`,e,u?.mask,D),style:{...t,...O,...L?.mask},onClick:T&&r?A:void 0,ref:i})),ae=typeof _==`function`?_(i):_,[G,oe]=S.useState(),K=i===`left`||i===`right`,se=S.useMemo(()=>hV(b??(K?v:y)??G??B??(K?378:void 0)),[b,v,y,B,K,G]),ce=S.useMemo(()=>{let e={};if(U&&ne)switch(i){case`top`:e.transform=`translateY(${ne}px)`;break;case`bottom`:e.transform=`translateY(${-ne}px)`;break;case`left`:e.transform=`translateX(${ne}px)`;break;default:e.transform=`translateX(${-ne}px)`;break}return K?e.width=hV(se):e.height=hV(se),e},[U,ne,i,K,se]),q=S.useRef(null),le=!!z,ue=typeof z==`object`&&z||{},de=In(e=>{oe(e),ue.onResize?.(e)}),{dragElementProps:fe,isDragging:pe}=mV({prefixCls:`${n}-resizable`,direction:i,className:u?.dragger,style:L?.dragger,maxSize:x,containerRef:q,currentSize:se,onResize:de,onResizeStart:ue.onResizeStart,onResizeEnd:ue.onResizeEnd}),me={onMouseEnter:j,onMouseOver:M,onMouseLeave:N,onClick:P,onKeyDown:F,onKeyUp:I,onFocus:e=>{H(e.target)}},he=S.createElement(Iu,_V({key:`panel`},ae,{visible:r,forceRender:s,onVisibleChanged:k,removeOnLeave:!1,leavedClassName:`${n}-content-wrapper-hidden`}),({className:t,style:r},i)=>{let a=S.createElement(pV,_V({id:h,containerRef:i,prefixCls:n,className:J(m,u?.section),style:{...g,...L?.section}},Vu(e,{aria:!0}),me),C);return S.createElement(`div`,_V({ref:q,className:J(`${n}-content-wrapper`,pe&&`${n}-content-wrapper-dragging`,u?.wrapper,!pe&&t),style:{...r,...ce,...L?.wrapper}},Vu(e,{data:!0})),le&&S.createElement(`div`,fe),R?R(a):a)}),ge={...f};return p&&(ge.zIndex=p),S.createElement(uV.Provider,{value:re},S.createElement(`div`,{className:J(n,`${n}-${i}`,d,{[`${n}-open`]:r,[`${n}-inline`]:a}),style:ge,tabIndex:-1,ref:V},ie,he))}),yV=e=>{let{open:t=!1,prefixCls:n=`rc-drawer`,placement:r=`right`,autoFocus:i=!0,keyboard:a=!0,width:o,height:s,size:c,maxSize:l,mask:u=!0,maskClosable:d=!0,getContainer:f,forceRender:p,afterOpenChange:m,destroyOnHidden:h,onMouseEnter:g,onMouseOver:_,onMouseLeave:v,onClick:y,onKeyDown:b,onKeyUp:x,onClose:C,resizable:w,defaultSize:T,focusTriggerAfterClose:E,panelRef:D}=e,[O,k]=S.useState(!1),[A,j]=S.useState(!1);zn(()=>{j(!0)},[]);let M=A?t:!1,N=S.useRef(null),P=S.useRef(null);zn(()=>{M&&(P.current=document.activeElement)},[M]);let F=e=>{k(e),m?.(e),!e&&E!==!1&&P.current&&!N.current?.contains(P.current)&&P.current?.focus({preventScroll:!0})},I=S.useMemo(()=>({panel:D}),[D]);if(!p&&!O&&!M&&h)return null;let L={onMouseEnter:g,onMouseOver:_,onMouseLeave:v,onClick:y,onKeyDown:b,onKeyUp:x},R={...e,open:M,prefixCls:n,placement:r,autoFocus:i,keyboard:a,width:o,height:s,size:c,maxSize:l,defaultSize:T,mask:u,maskClosable:d,inline:f===!1,afterOpenChange:F,ref:N,resizable:w,...L};return S.createElement(dV.Provider,{value:I},S.createElement(Xf,{open:M||p||O,autoDestroy:!1,getContainer:f,autoLock:u&&(M||O),onEsc:({top:e,event:t})=>{e&&a&&(t.stopPropagation(),C?.(t))}},S.createElement(vV,R)))},bV=e=>{let{prefixCls:t,ariaId:n,title:r,footer:i,extra:a,closable:o,loading:s,onClose:c,headerStyle:l,bodyStyle:u,footerStyle:d,children:f,classNames:p,styles:m}=e,h=li(`drawer`),{classNames:g,styles:_,closable:v}=h,[y,b]=Fd([g,p],[_,m],{props:{...e,closable:o??v}}),x=S.useMemo(()=>{let e=o??v;if(e!==!1)return hd(e)&&e?.placement===`end`?`end`:`start`},[o,v]),C=S.useCallback(e=>S.createElement(`button`,{type:`button`,onClick:c,className:J(`${t}-close`,{[`${t}-close-${x}`]:x===`end`},y.close),style:b.close},e),[c,t,x,y.close,b.close]),[w,T]=Td(yd(e),yd(h),{closable:!0,closeIconRender:C}),E=()=>!r&&!w?null:S.createElement(`div`,{style:{...b.header,...l},className:J(`${t}-header`,y.header,{[`${t}-header-close-only`]:w&&!r&&!a})},S.createElement(`div`,{className:`${t}-header-title`},x===`start`&&T,r&&S.createElement(`div`,{className:J(`${t}-title`,y.title),style:b.title,id:n},r)),a&&S.createElement(`div`,{className:J(`${t}-extra`,y.extra),style:b.extra},a),x===`end`&&T),D=()=>i?S.createElement(`div`,{className:J(`${t}-footer`,y.footer),style:{...b.footer,...d}},i):null;return S.createElement(S.Fragment,null,E(),S.createElement(`div`,{className:J(`${t}-body`,y.body),style:{...b.body,...u}},s?S.createElement(Wy,{active:!0,title:!1,paragraph:{rows:5},className:`${t}-body-skeleton`}):f),D())},xV=e=>{let t=`100%`;return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},SV=(e,t)=>({"&-enter, &-appear":{...e,"&-active":t},"&-leave":{...t,"&-active":e}}),CV=(e,t)=>({"&-enter, &-appear, &-leave":{"&-start":{transition:`none`},"&-active":{transition:`all ${t}`}},...SV({opacity:e},{opacity:1})}),wV=(e,t)=>[CV(.7,t),SV({transform:xV(e)},{transform:`none`})],TV=e=>{let{componentCls:t,motionDurationSlow:n}=e;return{[t]:{[`${t}-mask-motion`]:CV(0,n),[`${t}-panel-motion`]:[`left`,`right`,`top`,`bottom`].reduce((e,t)=>({...e,[`&-${t}`]:wV(t,n)}),{})}}},EV=e=>{let{borderRadiusSM:t,componentCls:n,zIndexPopup:r,colorBgMask:i,colorBgElevated:a,motionDurationSlow:o,motionDurationMid:s,paddingXS:c,padding:l,paddingLG:u,fontSizeLG:d,lineHeightLG:f,lineWidth:p,lineType:m,colorSplit:h,marginXS:g,colorIcon:_,colorIconHover:v,colorBgTextHover:y,colorBgTextActive:b,colorText:x,fontWeightStrong:S,footerPaddingBlock:C,footerPaddingInline:w,draggerSize:T,calc:E}=e,D=`${n}-content-wrapper`,O=`${n}-resizable-dragger`;return{[n]:{position:`fixed`,inset:0,zIndex:r,pointerEvents:`none`,color:x,"&-pure":{position:`relative`,background:a,display:`flex`,flexDirection:`column`,pointerEvents:`auto`,[`&${n}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${n}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${n}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${n}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:`absolute`},[`${n}-mask`]:{position:`absolute`,inset:0,zIndex:r,background:i,pointerEvents:`auto`,[`&${n}-mask-blur`]:{backdropFilter:`blur(4px)`}},[D]:{position:`absolute`,zIndex:r,maxWidth:`100vw`,transition:`all ${o}`,"&-hidden":{display:`none`}},[`&-left > ${D}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${D}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${D}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${D}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${n}-section`]:{display:`flex`,flexDirection:`column`,width:`100%`,height:`100%`,overflow:`auto`,background:a,pointerEvents:`auto`},[`${n}-header`]:{display:`flex`,flex:0,alignItems:`center`,padding:`${Y(l)} ${Y(u)}`,fontSize:d,lineHeight:f,borderBottom:`${Y(p)} ${m} ${h}`,"&-title":{display:`flex`,flex:1,alignItems:`center`,minWidth:0,minHeight:0}},[`${n}-extra`]:{flex:`none`},[`${n}-close`]:{display:`inline-flex`,width:E(d).add(c).equal(),height:E(d).add(c).equal(),borderRadius:t,justifyContent:`center`,alignItems:`center`,color:_,fontWeight:S,fontSize:d,fontStyle:`normal`,lineHeight:1,textAlign:`center`,textTransform:`none`,textDecoration:`none`,background:`transparent`,border:0,cursor:`pointer`,transition:`all ${s}`,textRendering:`auto`,[`&${n}-close-end`]:{marginInlineStart:g},[`&:not(${n}-close-end)`]:{marginInlineEnd:g},"&:hover":{color:v,backgroundColor:y,textDecoration:`none`},"&:active":{backgroundColor:b},...Qc(e)},[`${n}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:d,lineHeight:f},[`${n}-body`]:{flex:1,minWidth:0,minHeight:0,padding:u,overflow:`auto`,[`${n}-body-skeleton`]:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`}},[`${n}-footer`]:{flexShrink:0,padding:`${Y(C)} ${Y(w)}`,borderTop:`${Y(p)} ${m} ${h}`},[O]:{position:`absolute`,zIndex:1,backgroundColor:`transparent`,userSelect:`none`,pointerEvents:`auto`,"&:hover":{backgroundColor:e.colorPrimary,opacity:.2},"&-dragging":{backgroundColor:e.colorPrimary,opacity:.3}},[`${O}-left`]:{top:0,bottom:0,right:{_skip_check_:!0,value:0},width:T,cursor:`col-resize`},[`${O}-right`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},width:T,cursor:`col-resize`},[`${O}-top`]:{insetInline:0,bottom:0,height:T,cursor:`row-resize`},[`${O}-bottom`]:{insetInline:0,top:0,height:T,cursor:`row-resize`},[`${D}-dragging`]:{userSelect:`none`,transition:`none`,willChange:`width, height`,[`${n}-content`]:{pointerEvents:`none`},[`${n}-section`]:{pointerEvents:`none`}},"&-rtl":{direction:`rtl`}}}},DV=rl(`Drawer`,e=>{let t=gs(e,{});return[EV(t),TV(t)]},e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding,draggerSize:4})),OV={distance:180},kV=378,AV={motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},jV=e=>{let{rootClassName:t,size:n,defaultSize:r=kV,height:i,width:a,mask:o,push:s=OV,open:c,afterOpenChange:l,onClose:u,prefixCls:d,getContainer:f,panelRef:p=null,style:m,className:h,resizable:g,"aria-labelledby":_,focusable:v,maskClosable:y,maskStyle:b,drawerStyle:x,contentWrapperStyle:C,destroyOnClose:w,destroyOnHidden:T,...E}=e,{placement:D}=E,O=zf(),k=E.title?O:void 0,{getPopupContainer:A,getPrefixCls:j,direction:M,className:N,style:P,classNames:F,styles:I,mask:L}=li(`drawer`),R=j(`drawer`,d),[z,B]=DV(R),V=f===void 0&&A?()=>A(document.body):f,H=S.useMemo(()=>pd(n)?n:n===`large`?736:n===`default`?kV:typeof n==`string`?/^\d+(\.\d+)?$/.test(n)?Number(n):n:!D||D===`left`||D===`right`?a:i,[n,D,a,i]),U={motionName:Gm(R,`mask-motion`),...AV},W=e=>({motionName:Gm(R,`panel-motion-${e}`),...AV}),ee=$n(p,Ky()),[te,ne]=Yd(`Drawer`,E.zIndex),[re,ie,ae]=Od(o,L,R,y),G=Ay(v,V!==!1&&re),{classNames:oe,styles:K,rootStyle:se}=E,ce={...e,zIndex:te,panelRef:p,mask:re,maskClosable:ae,defaultSize:r,push:s,focusable:G},[q,le]=Fd([F,oe],[I,K],{props:ce}),ue=J({"no-mask":!re,[`${R}-rtl`]:M===`rtl`},t,z,B,q.root);return S.createElement(Ty,{form:!0,space:!0},S.createElement(Ud.Provider,{value:ne},S.createElement(yV,{prefixCls:R,onClose:u,maskMotion:U,motion:W,...E,classNames:{mask:J(q.mask,ie.mask),section:q.section,wrapper:q.wrapper,dragger:q.dragger},styles:{mask:{...le.mask,...b},section:{...le.section,...x},wrapper:{...le.wrapper,...C},dragger:le.dragger},open:c,mask:re,maskClosable:ae,push:s,size:H,defaultSize:r,style:{...P,...m},rootStyle:{...se,...le.root},className:J(N,h),rootClassName:ue,getContainer:V,afterOpenChange:l,panelRef:ee,zIndex:te,...g?{resizable:g}:{},"aria-labelledby":_??k,destroyOnHidden:T??w,focusTriggerAfterClose:G.focusTriggerAfterClose,focusTrap:G.trap},S.createElement(bV,{prefixCls:R,size:n,...E,ariaId:k,onClose:u}))))};jV._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,style:n,className:r,placement:i=`right`,...a}=e,{getPrefixCls:o}=S.useContext(oi),s=o(`drawer`,t),[c,l]=DV(s),u=J(s,`${s}-pure`,`${s}-${i}`,c,l,r);return S.createElement(`div`,{className:u,style:n},S.createElement(bV,{prefixCls:s,...a}))};var MV=jV;function NV(e){return[`small`,`middle`,`medium`,`large`].includes(e)}function PV(e){return e?pd(e):!1}var FV=S.createContext({latestIndex:0}),IV=FV.Provider,LV=e=>{let{className:t,prefix:n,index:r,children:i,separator:a,style:o,classNames:s,styles:c}=e,{latestIndex:l}=S.useContext(FV);return fd(i)?S.createElement(S.Fragment,null,S.createElement(`div`,{className:t,style:o},i),r{let{componentCls:t,antCls:n}=e;return{[t]:{display:`inline-flex`,"&-rtl":{direction:`rtl`},"&-vertical":{flexDirection:`column`},"&-align":{flexDirection:`column`,"&-center":{alignItems:`center`},"&-start":{alignItems:`flex-start`},"&-end":{alignItems:`flex-end`},"&-baseline":{alignItems:`baseline`}},[`${t}-item:empty`]:{display:`none`},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:`block`}}}},zV=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},BV=rl(`Space`,e=>{let t=gs(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[RV(t),zV(t)]},()=>({}),{resetStyle:!1}),VV=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,size:i,className:a,style:o,classNames:s,styles:c}=li(`space`),{size:l=i??`small`,align:u,className:d,rootClassName:f,children:p,direction:m,orientation:h,prefixCls:g,split:_,separator:v,style:y,vertical:b,wrap:x=!1,classNames:C,styles:w,...T}=e,[E,D]=Array.isArray(l)?l:[l,l],O=NV(D),k=NV(E),A=PV(D),j=PV(E),M=Cr(p,{keepEmpty:!0}),[N,P]=Rd(h,b,m),F=u===void 0&&!P?`center`:u,I=v??_,L=n(`space`,g),[R,z]=BV(L),B={...e,size:l,orientation:N,align:F},[V,H]=Fd([s,C],[c,w],{props:B}),U=J(L,a,R,`${L}-${N}`,{[`${L}-rtl`]:r===`rtl`,[`${L}-align-${F}`]:F,[`${L}-gap-row-${D}`]:O,[`${L}-gap-col-${E}`]:k},d,f,z,V.root),W=J(`${L}-item`,V.item),ee=M.map((e,t)=>{let n=e?.key||`${W}-${t}`;return S.createElement(LV,{prefix:L,classNames:V,styles:H,className:W,key:n,index:t,separator:I,style:H.item},e)}),te=S.useMemo(()=>({latestIndex:M.reduce((e,t,n)=>fd(t)?n:e,0)}),[M]);if(M.length===0)return null;let ne={};return x&&(ne.flexWrap=`wrap`),!k&&j&&(ne.columnGap=E),!O&&A&&(ne.rowGap=D),S.createElement(`div`,{ref:t,className:U,style:{...ne,...H.root,...o,...y},...T},S.createElement(IV,{value:te},ee))});VV.Compact=sh,VV.Addon=$z;var HV=e=>{let{getPopupContainer:t,getPrefixCls:n,direction:r}=S.useContext(oi),{prefixCls:i,type:a=`default`,danger:o,disabled:s,loading:c,onClick:l,htmlType:u,children:d,className:f,menu:p,arrow:m,autoFocus:h,trigger:g,align:_,open:v,onOpenChange:y,placement:b,getPopupContainer:x,href:C,icon:w=S.createElement(kE,null),title:T,buttonsRender:E=e=>e,mouseEnterDelay:D,mouseLeaveDelay:O,overlayClassName:k,overlayStyle:A,destroyOnHidden:j,destroyPopupOnHide:M,dropdownRender:N,popupRender:P,...F}=e,I=n(`dropdown`,i),L=`${I}-button`,R={menu:p,arrow:m,autoFocus:h,align:_,disabled:s,trigger:s?[]:g,onOpenChange:y,getPopupContainer:x||t,mouseEnterDelay:D,mouseLeaveDelay:O,classNames:{root:k},styles:{root:A},destroyOnHidden:j,popupRender:P||N},{compactSize:z,compactItemClassnames:B}=ih(I,r),V=J(L,B,f);`destroyPopupOnHide`in e&&(R.destroyPopupOnHide=M),`open`in e&&(R.open=v),`placement`in e?R.placement=b:R.placement=r===`rtl`?`bottomLeft`:`bottomRight`;let[H,U]=E([S.createElement(qE,{type:a,danger:o,disabled:s,loading:c,onClick:l,htmlType:u,href:C,title:T},d),S.createElement(qE,{type:a,danger:o,icon:w})]);return S.createElement(VV.Compact,{className:V,size:z,block:!0,...F},H,S.createElement(KE,{...R},U))};HV.__ANT_BUTTON=!0;var UV=KE;UV.Button=HV;var WV={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z`}}]},name:`file-text`,theme:`outlined`};function GV(){return GV=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,GV({},e,{ref:t,icon:WV}))),qV=(e,t)=>fd(e)?hd(e)&&!(0,S.isValidElement)(e)?{...t,...e}:{...t,title:e}:null;function JV(e){let[t,n]=S.useState(e);return S.useEffect(()=>{let t=setTimeout(()=>{n(e)},e.length?0:10);return()=>{clearTimeout(t)}},[e]),t}var YV=e=>{let{componentCls:t,motionDurationFast:n,motionEaseInOut:r}=e,i=`${t}-show-help`,a=`${t}-show-help-item`;return{[i]:{transition:`opacity ${n} ${r}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[a]:{overflow:`hidden`,transition:`${[`height`,`opacity`,`transform`].map(e=>`${e} ${n} ${r}`).join(`, `)} !important`,[`&${a}-appear, &${a}-enter`]:{transform:`translateY(-5px)`,opacity:0,"&-active":{transform:`translateY(0)`,opacity:1}},[`&${a}-leave-active`]:{transform:`translateY(-5px)`}}}}},XV=e=>({legend:{display:`block`,width:`100%`,marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:`inherit`,border:0,borderBottom:`${Y(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, input[type='radio']:focus, input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${Y(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:`block`,paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),ZV=(e,t)=>{let{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},QV=e=>{let{componentCls:t}=e;return{[t]:{...Jc(e),...XV(e),[`${t}-text`]:{display:`inline-block`,paddingInlineEnd:e.paddingSM},"&-small":{...ZV(e,e.controlHeightSM)},"&-large":{...ZV(e,e.controlHeightLG)}}}},$V=e=>{let{formItemCls:t,iconCls:n,rootPrefixCls:r,antCls:i,labelRequiredMarkColor:a,labelColor:o,labelFontSize:s,labelHeight:c,labelColonMarginInlineStart:l,labelColonMarginInlineEnd:u,itemMarginBottom:d}=e,[f]=ol(i,`grid`);return{[t]:{...Jc(e),marginBottom:d,verticalAlign:`top`,"&-with-help":{transition:`none`},[`&-hidden, + `]:{[`&:hover ${t}`]:{borderColor:e.colorPrimary}},[`${i}:not(${i}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[`${t}-checked`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:`rotate(45deg) scale(1) translate(-50%,-50%)`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`,...Uh()},[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[t]:{"&-indeterminate":{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:`50%`,insetInlineStart:`50%`,width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:`translate(-50%, -50%) scale(1)`,opacity:1,content:`""`},"&:hover":{backgroundColor:e.colorBgContainer,borderColor:e.colorPrimary}}}},{[`${i}-disabled`]:{cursor:`not-allowed`},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate::after`]:{background:e.colorTextDisabled}}}]};function tz(e,t){return ez(gs(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}var nz=rl(`Checkbox`,(e,{prefixCls:t})=>[tz(t,e)]),rz=S.createContext(null),iz=S.forwardRef((e,t)=>{let{prefixCls:n,children:r,indeterminate:i=!1,onMouseEnter:a,onMouseLeave:o,skipGroup:s=!1,disabled:c,rootClassName:l,className:u,style:d,classNames:f,styles:p,name:m,value:h,checked:g,defaultChecked:_,onChange:v,...y}=e,{getPrefixCls:b,direction:x,className:C,style:w,classNames:T,styles:E}=li(`checkbox`),D=S.useContext(rz),{isFormItemInput:O}=S.useContext(Sy),k=S.useContext(zp),A=(D?.disabled||c)??k,[j,M]=Hn(_,g),N=j,P=In(e=>{M(e.target.checked),v?.(e),!s&&D?.toggleOption&&D.toggleOption({label:r,value:h})});D&&!s&&(N=D.value.includes(h));let F=S.useRef(null),I=er(t,F);S.useEffect(()=>{if(!(s||!D))return D.registerValue(h),()=>{D.cancelValue(h)}},[h,s]),S.useEffect(()=>{F.current?.input&&(F.current.input.indeterminate=i)},[i]);let L=b(`checkbox`,n),R=bf(L),[z,B]=nz(L,R),V={...y},H={...e,indeterminate:i,disabled:A,checked:N},[U,W]=Fd([T,f],[E,p],{props:H}),ee=J(`${L}-wrapper`,{[`${L}-rtl`]:x===`rtl`,[`${L}-wrapper-checked`]:N,[`${L}-wrapper-disabled`]:A,[`${L}-wrapper-in-form-item`]:O},C,u,U.root,l,B,R,z),te=J(U.icon,{[`${L}-indeterminate`]:i},qm,z),[ne,re]=XI(V.onClick);return S.createElement(eh,{component:`Checkbox`,disabled:A},S.createElement(`label`,{className:ee,style:{...W.root,...w,...d},onMouseEnter:a,onMouseLeave:o,onClick:ne},S.createElement(YI,{...V,name:!s&&D?D.name:m,checked:N,onClick:re,onChange:P,prefixCls:L,className:te,style:W.icon,disabled:A,ref:I,value:h}),fd(r)&&S.createElement(`span`,{className:J(`${L}-label`,U.label),style:W.label},r)))}),az=S.forwardRef((e,t)=>{let{defaultValue:n,children:r,options:i=[],prefixCls:a,className:o,rootClassName:s,style:c,onChange:l,role:u=`group`,...d}=e,{getPrefixCls:f,direction:p}=S.useContext(oi),[m,h]=S.useState(d.value||n||[]),[g,_]=S.useState([]);S.useEffect(()=>{`value`in d&&h(d.value||[])},[d.value]);let v=S.useMemo(()=>i.map(e=>typeof e==`string`||pd(e)?{label:e,value:e}:e),[i]),y=e=>{_(t=>t.filter(t=>t!==e))},b=e=>{_(t=>[].concat(Zr(t),[e]))},x=e=>{let t=m.indexOf(e.value),n=Zr(m);t===-1?n.push(e.value):n.splice(t,1),`value`in d||h(n),l?.(n.filter(e=>g.includes(e)).sort((e,t)=>v.findIndex(t=>t.value===e)-v.findIndex(e=>e.value===t)))},C=f(`checkbox`,a),w=`${C}-group`,T=bf(C),[E,D]=nz(C,T),O=Sr(d,[`value`,`disabled`]),k=i.length?v.map(e=>S.createElement(iz,{prefixCls:C,key:e.value.toString(),disabled:`disabled`in e?e.disabled:d.disabled,value:e.value,checked:m.includes(e.value),onChange:e.onChange,className:J(`${w}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):r,A=S.useMemo(()=>({toggleOption:x,value:m,disabled:d.disabled,name:d.name,registerValue:b,cancelValue:y}),[x,m,d.disabled,d.name,b,y]),j=J(w,{[`${w}-rtl`]:p===`rtl`},o,s,D,T,E);return S.createElement(`div`,{className:j,style:c,role:u,...O,ref:t},S.createElement(rz.Provider,{value:A},k))}),oz=iz;oz.Group=az,oz.__ANT_CHECKBOX=!0;var sz=(0,S.createContext)({});function cz(e){return e===`auto`?`1 1 auto`:pd(e)?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}var lz=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=S.useContext(oi),{gutter:i,wrap:a}=S.useContext(sz),{prefixCls:o,span:s,order:c,offset:l,push:u,pull:d,className:f,children:p,flex:m,style:h,...g}=e,_=n(`col`,o),v=n(),[y,b]=$y(_),[x]=ol(v,`col`),C={},w={};VC.forEach(t=>{let n={},i=e[t];pd(i)?n.span=i:hd(i)&&(n=i||{}),delete g[t],w={...w,[`${_}-${t}-${n.span}`]:fd(n.span),[`${_}-${t}-order-${n.order}`]:n.order||n.order===0,[`${_}-${t}-offset-${n.offset}`]:n.offset||n.offset===0,[`${_}-${t}-push-${n.push}`]:n.push||n.push===0,[`${_}-${t}-pull-${n.pull}`]:n.pull||n.pull===0,[`${_}-rtl`]:r===`rtl`},n.flex&&(w[`${_}-${t}-flex`]=!0,C[x(`${t}-flex`)]=cz(n.flex))});let T=J(_,{[`${_}-${s}`]:s!==void 0,[`${_}-order-${c}`]:c,[`${_}-offset-${l}`]:l,[`${_}-push-${u}`]:u,[`${_}-pull-${d}`]:d},f,w,y,b),E={};return i?.[0]&&(E.paddingInline=pd(i[0])?`${i[0]/2}px`:`calc(${i[0]} / 2)`),m&&(E.flex=cz(m),a===!1&&!E.minWidth&&(E.minWidth=0)),S.createElement(`div`,{...g,style:{...E,...h,...C},className:T,ref:t},p)});function uz(e,t){let n=[void 0,void 0],r=Array.isArray(e)?e:[e,void 0],i=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0};return r.forEach((e,t)=>{if(hd(e))for(let r=0;r{let[n,r]=S.useState(()=>md(e)?e:``),i=()=>{if(md(e)&&r(e),hd(e))for(let n=0;n{i()},[JSON.stringify(e),t]),n},fz=S.forwardRef((e,t)=>{let{prefixCls:n,justify:r,align:i,className:a,style:o,children:s,gutter:c=0,wrap:l,...u}=e,{getPrefixCls:d,direction:f}=S.useContext(oi),p=KC(!0,null),m=dz(i,p),h=dz(r,p),g=d(`row`,n),[_,v]=Iee(g),y=uz(c,p),b=J(g,{[`${g}-no-wrap`]:l===!1,[`${g}-${h}`]:h,[`${g}-${m}`]:m,[`${g}-rtl`]:f===`rtl`},a,_,v),x={};y?.[0]&&(x.marginInline=pd(y[0])?`${y[0]/-2}px`:`calc(${y[0]} / -2)`);let[C,w]=y;x.rowGap=w;let T=S.useMemo(()=>({gutter:[C,w],wrap:l}),[C,w,l]);return S.createElement(sz.Provider,{value:T},S.createElement(`div`,{...u,className:b,style:{...x,...o},ref:t},s))}),pz=lz,mz=e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},hz=e=>{let{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:a,orientationMargin:o,verticalMarginInline:s}=e,c=`${t}-rail`;return{[t]:{...Jc(e),borderBlockStart:`${Y(i)} solid ${r}`,[c]:{borderBlockStart:`${Y(i)} solid ${r}`},"&-vertical":{position:`relative`,top:`-0.06em`,display:`inline-block`,height:`0.9em`,marginInline:s,marginBlock:0,verticalAlign:`middle`,borderTop:0,borderInlineStart:`${Y(i)} solid ${r}`},"&-horizontal":{display:`flex`,clear:`both`,width:`100%`,minWidth:`100%`,margin:`${Y(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:`flex`,alignItems:`center`,margin:`${Y(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:`nowrap`,textAlign:`center`,borderBlockStart:`0 ${r}`,[`${c}-start, ${c}-end`]:{width:`50%`,borderBlockStartColor:`inherit`,borderBlockEnd:0,content:`''`}},[`&-horizontal${t}-with-text-start`]:{[`${c}-start`]:{width:`calc(${o} * 100%)`},[`${c}-end`]:{width:`calc(100% - ${o} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{[`${c}-start`]:{width:`calc(100% - ${o} * 100%)`},[`${c}-end`]:{width:`calc(${o} * 100%)`}},[`${t}-inner-text`]:{display:`inline-block`,paddingBlock:0,paddingInline:a},"&-dashed":{background:`none`,borderColor:r,borderStyle:`dashed`,borderWidth:`${Y(i)} 0 0`,[c]:{borderBlockStart:`${Y(i)} dashed ${r}`}},[`&-horizontal${t}-with-text${t}-dashed`]:{[`${c}-start, ${c}-end`]:{borderStyle:`dashed none none`}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:`none`,borderColor:r,borderStyle:`dotted`,borderWidth:`${Y(i)} 0 0`,[c]:{borderBlockStart:`${Y(i)} dotted ${r}`}},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:`dotted none none`}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{[`${c}-start`]:{width:0},[`${c}-end`]:{width:`100%`},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{[`${c}-start`]:{width:`100%`},[`${c}-end`]:{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}}}},gz=rl(`Divider`,e=>{let t=gs(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[hz(t),mz(t)]},e=>({textPaddingInline:`1em`,orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}}),_z=[`left`,`right`,`center`,`start`,`end`],vz=e=>{let{getPrefixCls:t,direction:n,className:r,style:i,classNames:a,styles:o}=li(`divider`),{prefixCls:s,type:c,orientation:l,vertical:u,titlePlacement:d,orientationMargin:f,className:p,rootClassName:m,children:h,dashed:g,variant:_=`solid`,plain:v,style:y,size:b,classNames:x,styles:C,...w}=e,T=t(`divider`,s),E=`${T}-rail`,[D,O]=gz(T),k=th(b),A=!!h,j=_z.includes(l||``),M=S.useMemo(()=>{let e=d??(j?l:`center`);return e===`left`?n===`rtl`?`end`:`start`:e===`right`?n===`rtl`?`start`:`end`:e},[n,l,d,j]),N=M===`start`&&f!=null,P=M===`end`&&f!=null,[F,I]=Rd(l,u,c),L={...e,orientation:F,titlePlacement:M,size:k},[R,z]=Fd([a,x],[o,C],{props:L}),B=J(T,r,D,O,`${T}-${F}`,{[`${T}-with-text`]:A,[`${T}-with-text-${M}`]:A,[`${T}-dashed`]:!!g,[`${T}-${_}`]:_!==`solid`,[`${T}-plain`]:!!v,[`${T}-rtl`]:n===`rtl`,[`${T}-no-default-orientation-margin-start`]:N,[`${T}-no-default-orientation-margin-end`]:P,[`${T}-md`]:k===`medium`||k===`middle`,[`${T}-sm`]:k===`small`,[E]:!h,[R.rail]:R.rail&&!h},p,m,R.root),V=S.useMemo(()=>pd(f)?f:/^\d+$/.test(f)?Number(f):f,[f]),H={marginInlineStart:N?V:void 0,marginInlineEnd:P?V:void 0};return S.createElement(`div`,{className:B,style:{...i,...z.root,...h?{}:z.rail,...y},...w,role:`separator`},h&&!I&&S.createElement(S.Fragment,null,S.createElement(`div`,{className:J(E,`${E}-start`,R.rail),style:z.rail}),S.createElement(`span`,{className:J(`${T}-inner-text`,R.content),style:{...H,...z.content}},h),S.createElement(`div`,{className:J(E,`${E}-end`,R.rail),style:z.rail})))},yz={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`minus`,theme:`outlined`};function bz(){return bz=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,bz({},e,{ref:t,icon:yz}))),Sz={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z`}}]},name:`up`,theme:`outlined`};function Cz(){return Cz=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Cz({},e,{ref:t,icon:Sz})));function Tz(){return typeof BigInt==`function`}function Ez(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function Dz(e){var t=e.trim(),n=t.startsWith(`-`);n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,`$1`).replace(/\.0*$/,``).replace(/^0+/,``),t.startsWith(`.`)&&(t=`0${t}`);var r=t||`0`,i=r.split(`.`),a=i[0]||`0`,o=i[1]||`0`;a===`0`&&o===`0`&&(n=!1);var s=n?`-`:``;return{negative:n,negativeStr:s,trimStr:r,integerStr:a,decimalStr:o,fullStr:`${s}${r}`}}function Oz(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes(`e`)}function kz(e){var t=Uo(e.toLowerCase().split(`e`),2),n=t[0],r=t[1],i=r===void 0?`0`:r,a=n.startsWith(`-`),o=Uo((a?n.slice(1):n).split(`.`),2),s=o[0],c=s===void 0?`0`:s,l=o[1],u=l===void 0?``:l;return{decimal:u,digits:`${c}${u}`.replace(/^0+/,``)||`0`,exponent:Number(i),integer:c,negative:a}}function Az(e){var t=e.decimal,n=e.digits,r=e.exponent,i=e.integer,a=e.negative;if(n===`0`)return`0`;var o=i.replace(/^0+/,``).length,s=(t.match(/^0*/)||[``])[0].length,c=(o||-s)+r,l=``;return l=c<=0?`0.${`0`.repeat(-c)}${n}`:c>=n.length?`${n}${`0`.repeat(c-n.length)}`:`${n.slice(0,c)}.${n.slice(c)}`,`${a?`-`:``}${l}`}function jz(e){return e.exponent>=0?Math.max(0,e.decimal.length-e.exponent):Math.abs(e.exponent)+e.decimal.length}function Mz(e){var t=String(e);return Oz(e)?jz(kz(t)):t.includes(`.`)&&Pz(t)?t.length-t.indexOf(`.`)-1:0}function Nz(e){var t=String(e);if(Oz(e)){if(e>2**53-1)return String(Tz()?BigInt(e).toString():2**53-1);if(e<-(2**53-1))return String(Tz()?BigInt(e).toString():-(2**53-1));var n=kz(t),r=jz(n);t=r>100?Az(n):e.toFixed(r)}return Dz(t).fullStr}function Pz(e){return typeof e==`number`?!Number.isNaN(e):e?/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e):!1}var Fz=function(){function e(t){if(Yo(this,e),Ko(this,`origin`,``),Ko(this,`negative`,void 0),Ko(this,`integer`,void 0),Ko(this,`decimal`,void 0),Ko(this,`decimalLen`,void 0),Ko(this,`empty`,void 0),Ko(this,`nan`,void 0),Ez(t)){this.empty=!0;return}if(this.origin=String(t),t===`-`||Number.isNaN(t)){this.nan=!0;return}var n=t;if(Oz(n)&&(n=Number(n)),n=typeof n==`string`?n:Nz(n),Pz(n)){var r=Dz(n);this.negative=r.negative;var i=r.trimStr.split(`.`);this.integer=BigInt(i[0]);var a=i[1]||`0`;this.decimal=BigInt(a),this.decimalLen=a.length}else this.nan=!0}return Zo(e,[{key:`getMark`,value:function(){return this.negative?`-`:``}},{key:`getIntegerStr`,value:function(){return this.integer.toString()}},{key:`getDecimalStr`,value:function(){return this.decimal.toString().padStart(this.decimalLen,`0`)}},{key:`alignDecimal`,value:function(e){var t=`${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(e,`0`)}`;return BigInt(t)}},{key:`negate`,value:function(){var t=new e(this.toString());return t.negative=!t.negative,t}},{key:`cal`,value:function(t,n,r){var i=Math.max(this.getDecimalStr().length,t.getDecimalStr().length),a=n(this.alignDecimal(i),t.alignDecimal(i)).toString(),o=r(i),s=Dz(a),c=`${s.negativeStr}${s.trimStr.padStart(o+1,`0`)}`;return new e(`${c.slice(0,-o)}.${c.slice(-o)}`)}},{key:`add`,value:function(t){if(this.isInvalidate())return new e(t);var n=new e(t);return n.isInvalidate()?this:this.cal(n,function(e,t){return e+t},function(e){return e})}},{key:`multi`,value:function(t){var n=new e(t);return this.isInvalidate()||n.isInvalidate()?new e(NaN):this.cal(n,function(e,t){return e*t},function(e){return e*2})}},{key:`isEmpty`,value:function(){return this.empty}},{key:`isNaN`,value:function(){return this.nan}},{key:`isInvalidate`,value:function(){return this.isEmpty()||this.isNaN()}},{key:`equals`,value:function(e){return this.toString()===e?.toString()}},{key:`lessEquals`,value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:`toNumber`,value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:`toString`,value:function(){return!(arguments.length>0&&arguments[0]!==void 0)||arguments[0]?this.isInvalidate()?``:Dz(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr:this.origin}}]),e}(),Iz=function(){function e(t){if(Yo(this,e),Ko(this,`origin`,``),Ko(this,`number`,void 0),Ko(this,`empty`,void 0),Ez(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return Zo(e,[{key:`negate`,value:function(){return new e(-this.toNumber())}},{key:`add`,value:function(t){if(this.isInvalidate())return new e(t);var n=Number(t);if(Number.isNaN(n))return this;var r=this.number+n;if(r>2**53-1)return new e(2**53-1);if(r<-(2**53-1))return new e(-(2**53-1));var i=Math.max(Mz(this.number),Mz(n));return new e(r.toFixed(i))}},{key:`multi`,value:function(t){var n=Number(t);if(this.isInvalidate()||Number.isNaN(n))return new e(NaN);var r=this.number*n;if(r>2**53-1)return new e(2**53-1);if(r<-(2**53-1))return new e(-(2**53-1));var i=Math.max(Mz(this.number),Mz(n));return new e(r.toFixed(i))}},{key:`isEmpty`,value:function(){return this.empty}},{key:`isNaN`,value:function(){return Number.isNaN(this.number)}},{key:`isInvalidate`,value:function(){return this.isEmpty()||this.isNaN()}},{key:`equals`,value:function(e){return this.toNumber()===e?.toNumber()}},{key:`lessEquals`,value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:`toNumber`,value:function(){return this.number}},{key:`toString`,value:function(){return!(arguments.length>0&&arguments[0]!==void 0)||arguments[0]?this.isInvalidate()?``:Oz(this.number)&&Mz(this.number)>100?String(this.number):Nz(this.number):this.origin}}]),e}();function Lz(e){return Tz()?new Fz(e):new Iz(e)}function Rz(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===``)return``;var i=Dz(e),a=i.negativeStr,o=i.integerStr,s=i.decimalStr,c=`${t}${s}`,l=`${a}${o}`;if(n>=0){var u=Number(s[n]);return u>=5&&!r?Rz(Lz(e).add(`${a}0.${`0`.repeat(n)}${10-u}`).toString(),t,n,r):n===0?l:`${l}${t}${s.padEnd(n,`0`).slice(0,n)}`}return c===`.0`?l:`${l}${c}`}var zz=Lz;function Bz(e,t){return typeof Proxy<`u`&&e?new Proxy(e,{get(e,n){if(t[n])return t[n];let r=e[n];return typeof r==`function`?r.bind(e):r}}):e}function Vz(e,t){let n=(0,S.useRef)(null);function r(){try{let{selectionStart:t,selectionEnd:r,value:i}=e;n.current={start:t,end:r,value:i,beforeTxt:i.substring(0,t),afterTxt:i.substring(r)}}catch{}}function i(){if(e&&n.current&&t)try{let{value:t}=e,{beforeTxt:r,afterTxt:i,start:a}=n.current,o=t.length;if(t.startsWith(r))o=r.length;else if(t.endsWith(i))o=t.length-n.current.afterTxt.length;else{let e=r[a-1],n=t.indexOf(e,a-1);n!==-1&&(o=n+1)}e.setSelectionRange(o,o)}catch(e){br(!1,`Something warning of cursor restore. Please fire issue about this: ${e.message}`)}}return[r,i]}var Hz=200,Uz=600;function Wz({prefixCls:e,action:t,children:n,disabled:r,className:i,style:a,onStep:o}){let s=t===`up`,c=S.useRef(),l=S.useRef([]),u=()=>{clearTimeout(c.current)},d=e=>{e.preventDefault(),u(),o(s,`handler`);function t(){o(s,`handler`),c.current=setTimeout(t,Hz)}c.current=setTimeout(t,Uz)};S.useEffect(()=>()=>{u(),l.current.forEach(e=>{ri.cancel(e)})},[]);let f=`${e}-action`,p=J(f,`${f}-${t}`,{[`${f}-${t}-disabled`]:r},i),m=()=>l.current.push(ri(u));return S.createElement(`span`,{unselectable:`on`,role:`button`,onMouseUp:m,onMouseLeave:m,onMouseDown:e=>{d(e)},"aria-label":s?`Increase Value`:`Decrease Value`,"aria-disabled":r,className:p,style:a},n||S.createElement(`span`,{unselectable:`on`,className:`${e}-action-${t}-inner`}))}function Gz(e){let t=typeof e==`number`?Nz(e):Dz(e).fullStr;return t.includes(`.`)?Dz(t.replace(/(\d)\.(\d)/g,`$1$2.`)).fullStr:e+`0`}var Kz=(()=>{let e=(0,S.useRef)(0),t=()=>{ri.cancel(e.current)};return(0,S.useEffect)(()=>t,[]),n=>{t(),e.current=ri(()=>{n()})}});function qz(){return qz=Object.assign?Object.assign.bind():function(e){for(var t=1;te||t.isEmpty()?t.toString():t.toNumber(),Yz=e=>{let t=zz(e);return t.isInvalidate()?null:t},Xz=S.forwardRef((e,t)=>{let{mode:n=`input`,prefixCls:r=`rc-input-number`,className:i,style:a,classNames:o,styles:s,min:c,max:l,step:u=1,defaultValue:d,value:f,disabled:p,readOnly:m,upHandler:h,downHandler:g,keyboard:_,changeOnWheel:v=!1,controls:y=!0,prefix:b,suffix:x,stringMode:C,parser:w,formatter:T,precision:E,decimalSeparator:D,onChange:O,onInput:k,onPressEnter:A,onStep:j,onMouseDown:M,onClick:N,onMouseUp:P,onMouseLeave:F,onMouseMove:I,onMouseEnter:L,onMouseOut:R,changeOnBlur:z=!0,...B}=e,[V,H]=S.useState(!1),U=S.useRef(!1),W=S.useRef(!1),ee=S.useRef(!1),te=S.useRef(null),ne=S.useRef(null);S.useImperativeHandle(t,()=>Bz(ne.current,{focus:e=>{l_(ne.current,e)},blur:()=>{ne.current?.blur()},nativeElement:te.current}));let[re,ie]=S.useState(()=>zz(f??d));function ae(e){f===void 0&&ie(e)}let G=S.useCallback((e,t)=>{if(!t)return E>=0?E:Math.max(Mz(e),Mz(u))},[E,u]),oe=S.useCallback(e=>{let t=String(e);if(w)return w(t);let n=t;return D&&(n=n.replace(D,`.`)),n.replace(/[^\w.-]+/g,``)},[w,D]),K=S.useRef(``),se=S.useCallback((e,t)=>{if(T)return T(e,{userTyping:t,input:String(K.current)});let n=typeof e==`number`?Nz(e):e;if(!t){let e=G(n,t);Pz(n)&&(D||e>=0)&&(n=Rz(n,D||`.`,e))}return n},[T,G,D]),[ce,q]=S.useState(()=>{let e=d??f;return re.isInvalidate()&&[`string`,`number`].includes(typeof e)?Number.isNaN(e)?``:e:se(re.toString(),!1)});K.current=ce;function le(e,t){q(se(e.isInvalidate()?e.toString(!1):e.toString(!t),t))}let ue=S.useMemo(()=>Yz(l),[l,E]),de=S.useMemo(()=>Yz(c),[c,E]),fe=S.useMemo(()=>!ue||!re||re.isInvalidate()?!1:ue.lessEquals(re),[ue,re]),pe=S.useMemo(()=>!de||!re||re.isInvalidate()?!1:re.lessEquals(de),[de,re]),[me,he]=Vz(ne.current,V),ge=e=>ue&&!e.lessEquals(ue)?ue:de&&!de.lessEquals(e)?de:null,_e=e=>!ge(e),ve=(e,t)=>{let n=e,r=_e(n)||n.isEmpty();if(!n.isEmpty()&&!t&&(n=ge(n)||n,r=!0),!m&&!p&&r){let e=n.toString(),r=G(e,t);return r>=0&&(n=zz(Rz(e,`.`,r)),_e(n)||(n=zz(Rz(e,`.`,r,!0)))),n.equals(re)||(ae(n),O?.(n.isEmpty()?null:Jz(C,n)),f===void 0&&le(n,t)),n}return re},ye=Kz(),be=e=>{if(me(),K.current=e,q(e),!W.current){let t=zz(oe(e));t.isNaN()||ve(t,!0)}k?.(e),ye(()=>{let t=e;w||(t=e.replace(/。/g,`.`)),t!==e&&be(t)})},xe=()=>{W.current=!0},Se=()=>{W.current=!1,be(ne.current.value)},Ce=e=>{be(e.target.value)},we=In((e,t)=>{if(e&&fe||!e&&pe)return;U.current=!1;let n=zz(ee.current?Gz(u):u);e||(n=n.negate());let r=ve((re||zz(0)).add(n.toString()),!1);j?.(Jz(C,r),{offset:ee.current?Gz(u):u,type:e?`up`:`down`,emitter:t}),ne.current?.focus()}),Te=e=>{let t=zz(oe(ce)),n;n=t.isNaN()?ve(re,e):ve(t,e),f===void 0?n.isNaN()||le(n,!1):le(re,!1)},Ee=()=>{U.current=!0},De=e=>{let{key:t,shiftKey:n}=e;U.current=!0,ee.current=n,t===`Enter`&&(W.current||(U.current=!1),Te(!1),A?.(e)),_!==!1&&!W.current&&[`Up`,`ArrowUp`,`Down`,`ArrowDown`].includes(t)&&(we(t===`Up`||t===`ArrowUp`,`keyboard`),e.preventDefault())},Oe=()=>{U.current=!1,ee.current=!1};S.useEffect(()=>{if(v&&V){let e=e=>{we(e.deltaY<0,`wheel`),e.preventDefault()},t=ne.current;if(t)return t.addEventListener(`wheel`,e,{passive:!1}),()=>t.removeEventListener(`wheel`,e)}});let ke=()=>{z&&Te(!1),H(!1),U.current=!1},Ae=e=>{ne.current&&e.target!==ne.current&&(ne.current.focus(),e.preventDefault()),M?.(e)};Bn(()=>{re.isInvalidate()||le(re,!1)},[E,T]),Bn(()=>{let e=zz(f);ie(e);let t=zz(oe(ce));(!e.equals(t)||!U.current||T)&&le(e,U.current)},[f]),Bn(()=>{T&&he()},[ce]);let je={prefixCls:r,onStep:we,className:o?.action,style:s?.action},Me=S.createElement(Wz,qz({},je,{action:`up`,disabled:fe}),h),Ne=S.createElement(Wz,qz({},je,{action:`down`,disabled:pe}),g);return S.createElement(`div`,{ref:te,className:J(r,`${r}-mode-${n}`,i,o?.root,{[`${r}-focused`]:V,[`${r}-disabled`]:p,[`${r}-readonly`]:m,[`${r}-not-a-number`]:re.isNaN(),[`${r}-out-of-range`]:!re.isInvalidate()&&!_e(re)}),style:{...s?.root,...a},onMouseDown:Ae,onMouseUp:P,onMouseLeave:F,onMouseMove:I,onMouseEnter:L,onMouseOut:R,onClick:N,onFocus:()=>{H(!0)},onBlur:ke,onKeyDown:De,onKeyUp:Oe,onCompositionStart:xe,onCompositionEnd:Se,onBeforeInput:Ee},n===`spinner`&&y&&Ne,b!==void 0&&S.createElement(`div`,{className:J(`${r}-prefix`,o?.prefix),style:s?.prefix},b),S.createElement(`input`,qz({autoComplete:`off`,role:`spinbutton`,"aria-valuemin":c,"aria-valuemax":l,"aria-valuenow":re.isInvalidate()?null:re.toString(),step:u,ref:ne,className:J(`${r}-input`,o?.input),style:s?.input,value:ce,onChange:Ce,disabled:p,readOnly:m},B)),x!==void 0&&S.createElement(`div`,{className:J(`${r}-suffix`,o?.suffix),style:s?.suffix},x),n===`spinner`&&y&&Me,n===`input`&&y&&S.createElement(`div`,{className:J(`${r}-actions`,o?.actions),style:s?.actions},Me,Ne))}),Zz=e=>{let{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:a,fontSizeLG:o,fontSizeSM:s,borderRadiusLG:c,borderRadiusSM:l,colorBgContainerDisabled:u,lineWidth:d,antCls:f}=e,[p,m]=ol(f,`space`);return{[t]:[{display:`inline-flex`,alignItems:`center`,gap:0,whiteSpace:`nowrap`,paddingInline:r,margin:0,borderWidth:d,borderStyle:`solid`,borderRadius:n,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:o,borderRadius:c},"&-small":{paddingInline:a,borderRadius:l,fontSize:s},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[p(`addon-border-color`)]:i,[p(`addon-background`)]:u,[p(`addon-border-color-outlined`)]:i,[p(`addon-background-filled`)]:u,borderColor:m(`addon-border-color`),background:m(`addon-background`),"&-variant-outlined":{[p(`addon-border-color`)]:m(`addon-border-color-outlined`)},"&-variant-filled":{[p(`addon-border-color`)]:`transparent`,[p(`addon-background`)]:m(`addon-background-filled`),[`&${t}-disabled`]:{[p(`addon-border-color`)]:i,[p(`addon-background`)]:u}},"&-variant-borderless":{border:`none`,background:`transparent`},"&-variant-underlined":{border:`none`,background:`transparent`}},{"&-status-error":{[p(`addon-border-color-outlined`)]:e.colorError,[p(`addon-background-filled`)]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[p(`addon-border-color-outlined`)]:e.colorWarning,[p(`addon-background-filled`)]:e.colorWarningBg,color:e.colorWarning}}]}},Qz=rl([`Space`,`Addon`],e=>[Zz(e),Yg(e,{focus:!1})]),$z=S.forwardRef((e,t)=>{let{className:n,children:r,style:i,prefixCls:a,variant:o=`outlined`,disabled:s,status:c,...l}=e,{getPrefixCls:u,direction:d}=S.useContext(oi),f=u(`space-addon`,a),[p,m]=Qz(f),{compactItemClassnames:h,compactSize:g}=ih(f,d),_=aC(f,c),v=J(f,p,h,m,`${f}-variant-${o}`,_,{[`${f}-${g}`]:g,[`${f}-disabled`]:s},n);return S.createElement(`div`,{ref:t,className:v,style:i,...l},r)}),eB=e=>{let t=e.handleVisible??`auto`,n=e.controlHeightSM-e.lineWidth*2;return{...tL(e),controlWidth:90,handleWidth:n,handleFontSize:e.fontSize/2,handleVisible:t,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new Rs(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:+(t===!0),handleVisibleWidth:t===!0?n:0}},tB=e=>{let{componentCls:t,lineWidth:n,lineType:r,borderRadius:i,inputFontSizeSM:a,inputFontSizeLG:o,colorError:s,paddingInlineSM:c,paddingBlockSM:l,paddingBlockLG:u,paddingInlineLG:d,colorIcon:f,colorTextDisabled:p,motionDurationMid:m,handleHoverColor:h,handleOpacity:g,paddingInline:_,paddingBlock:v,handleBg:y,handleActiveBg:b,inputAffixPadding:x,borderRadiusSM:S,controlWidth:C,handleBorderColor:w,filledHandleBg:T,lineHeightLG:E,antCls:D}=e,O=`${Y(n)} ${r} ${w}`,[k,A]=ol(D,`input-number`);return[{[t]:{...Jc(e),...vL(e),[k(`input-padding-block`)]:Y(v),[k(`input-padding-inline`)]:Y(_),display:`inline-flex`,width:C,margin:0,paddingBlock:0,borderRadius:i,...aL(e,{[`${t}-actions`]:{background:y,[`${t}-action-down`]:{borderBlockStart:O}}}),...uL(e,{[`${t}-actions`]:{background:T,[`${t}-action-down`]:{borderBlockStart:O}},"&:focus-within":{[`${t}-actions`]:{background:y}}}),...mL(e,{[`${t}-actions`]:{background:y,[`${t}-action-down`]:{borderBlockStart:O}}}),...sL(e),[`&${t}-borderless`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(v).add(n).equal())},[`&${t}-borderless${t}-sm`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(l).add(n).equal())},[`&${t}-borderless${t}-lg`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(u).add(n).equal())},"&-rtl":{direction:`rtl`,[`${t}-input`]:{direction:`rtl`}},[`&${t}-out-of-range`]:{[`${t}-input`]:{color:s}},[`${t}-input`]:{...Jc(e),width:`100%`,paddingBlock:A(`input-padding-block`),textAlign:`start`,backgroundColor:`transparent`,border:0,borderRadius:0,outline:0,transition:`all ${m} linear`,appearance:`textfield`,fontSize:`inherit`,lineHeight:`inherit`,...hL(e.colorTextPlaceholder),'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:`none`}},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1},[`&-disabled ${t}-input`]:{cursor:`not-allowed`,color:e.colorTextDisabled}}},{[t]:{[`${t}-action`]:{...Yc(),userSelect:`none`,overflow:`hidden`,fontWeight:`bold`,lineHeight:0,textAlign:`center`,cursor:`pointer`,transition:`all ${m} linear`,[`&:active:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{background:b},[`&:hover:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{color:h},[`&${t}-action-up-disabled, &${t}-action-down-disabled`]:{cursor:`not-allowed`,color:p}},"&-mode-input":{overflow:`hidden`,[`${t}-actions`]:{position:`absolute`,insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:g,height:`100%`,borderRadius:0,display:`flex`,flexDirection:`column`,alignItems:`stretch`,transition:`all ${m}`,overflow:`hidden`,[`${t}-action`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,flex:`auto`,height:`40%`,marginInlineEnd:0,fontSize:e.handleFontSize}},[`&:hover ${t}-actions, &-focused ${t}-actions`]:{width:e.handleWidth,opacity:1},[`${t}-action`]:{color:f,height:`50%`,borderInlineStart:O,[`&:hover:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{height:`60%`}},[`&${t}-disabled, &${t}-readonly`]:{[`${t}-actions`]:{display:`none`}}},[`&${t}-mode-spinner`]:{padding:0,width:`auto`,[`${t}-action`]:{flex:`none`,paddingInline:A(`input-padding-inline`),"&-up":{borderInlineStart:O},"&-down":{borderInlineEnd:O}},[`${t}-input`]:{textAlign:`center`,paddingInline:A(`input-padding-inline`)}}}},{[t]:{"&-lg":{[k(`input-padding-block`)]:Y(u),[k(`input-padding-inline`)]:Y(d),paddingBlock:0,fontSize:o,lineHeight:E},"&-sm":{[k(`input-padding-block`)]:Y(l),[k(`input-padding-inline`)]:Y(c),paddingBlock:0,fontSize:a,borderRadius:S}}},{[t]:{[`${t}-prefix, ${t}-suffix`]:{display:`flex`,flex:`none`,alignItems:`center`,alignSelf:`center`,pointerEvents:`none`},[`${t}-prefix`]:{marginInlineEnd:x},[`${t}-suffix`]:{height:`100%`,marginInlineStart:x,transition:`margin ${m}`},[`&:hover:not(${t}-without-controls)`]:{[`${t}-suffix`]:{marginInlineEnd:e.handleWidth}}}}]},nB=e=>{let{componentCls:t,antCls:n}=e;return{[`${t}-addon`]:{[`&:has(${n}-select)`]:{border:0,padding:0}}}},rB=rl(`InputNumber`,e=>{let t=gs(e,eL(e));return[tB(t),nB(t),Yg(t)]},eB,{unitless:{handleOpacity:!0},resetFont:!1}),iB=S.forwardRef((e,t)=>{let n=S.useRef(null);S.useImperativeHandle(t,()=>n.current);let{rootClassName:r,size:i,disabled:a,prefixCls:o,addonBefore:s,addonAfter:c,prefix:l,suffix:u,bordered:d,readOnly:f,status:p,controls:m=!0,variant:h,className:g,style:_,classNames:v,styles:y,mode:b,...x}=e,{direction:C,className:w,style:T,styles:E,classNames:D}=li(`inputNumber`),O=S.useContext(zp),k=a??O,A=S.useMemo(()=>!m||k||f?!1:m,[m,k,f]),{compactSize:j,compactItemClassnames:M}=ih(o,C),N=b===`spinner`?S.createElement(TL,null):S.createElement(wz,null),P=b===`spinner`?S.createElement(xz,null):S.createElement(AC,null),F=typeof A==`boolean`?A:void 0;hd(A)&&(N=A.upIcon||N,P=A.downIcon||P);let{hasFeedback:I,isFormItemInput:L,feedbackIcon:R}=S.useContext(Sy),z=th(e=>i??j??e),[B,V]=hC(`inputNumber`,h,d),H=I&&S.createElement(S.Fragment,null,R),U={...e,size:z,disabled:k,controls:A},[W,ee]=Fd([D,v],[E,y],{props:U});return S.createElement(Xz,{ref:n,mode:b,disabled:k,className:J(g,r,W.root,w,M,aC(o,p,I),{[`${o}-${B}`]:V,[`${o}-lg`]:z===`large`,[`${o}-sm`]:z===`small`,[`${o}-rtl`]:C===`rtl`,[`${o}-in-form-item`]:L,[`${o}-without-controls`]:!A}),style:{...ee.root,...T,..._},upHandler:N,downHandler:P,prefixCls:o,readOnly:f,controls:F,prefix:l,suffix:H||u,classNames:W,styles:ee,...x})}),aB=S.forwardRef((e,t)=>{let{addonBefore:n,addonAfter:r,prefixCls:i,className:a,status:o,rootClassName:s,...c}=e,{getPrefixCls:l}=li(`inputNumber`),u=l(`input-number`,i),{status:d}=S.useContext(Sy),f=oC(d,o),p=bf(u),[m,h]=rB(u,p),g=n||r,_=S.createElement(iB,{ref:t,...c,prefixCls:u,status:f,className:J(h,p,m,a),rootClassName:g?void 0:s});if(g){let t=t=>t?S.createElement($z,{className:J(`${u}-addon`,h,m),variant:e.variant,disabled:e.disabled,status:f},S.createElement(Ty,{form:!0},t)):null,i=t(n),a=t(r);return S.createElement(sh,{rootClassName:s},i,_,a)}return _}),oB=aB;oB._InternalPanelDoNotUseOrYouWillBeFired=e=>S.createElement(am,{theme:{components:{InputNumber:{handleVisible:!0}}}},S.createElement(aB,{...e}));function sB(e){return!!(e.addonBefore||e.addonAfter)}function cB(e){return!!(e.prefix||e.suffix||e.allowClear)}function lB(e,t,n){let r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart==`number`&&typeof t.selectionEnd==`number`&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=(...e)=>{t.setSelectionRange(...e)},i}function uB(e,t,n,r){if(!n)return;let i=t;if(t.type===`click`){i=lB(t,e,``),n(i);return}if(e.type!==`file`&&r!==void 0){i=lB(t,e,r),n(i);return}n(i)}function dB(){return dB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{inputElement:n,children:r,prefixCls:i,prefix:a,suffix:o,addonBefore:s,addonAfter:c,className:l,style:u,disabled:d,readOnly:f,focused:p,triggerFocus:m,allowClear:h,value:g,handleReset:_,hidden:v,classes:y,classNames:b,dataAttrs:x,styles:C,components:w,onClear:T}=e,E=r??n,D=w?.affixWrapper||`span`,O=w?.groupWrapper||`span`,k=w?.wrapper||`span`,A=w?.groupAddon||`span`,j=(0,S.useRef)(null),M=e=>{j.current?.contains(e.target)&&m?.()},N=cB(e),P=(0,S.cloneElement)(E,{value:g,className:J(E.props?.className,!N&&b?.variant)||null}),F=(0,S.useRef)(null);if(S.useImperativeHandle(t,()=>({nativeElement:F.current||j.current})),N){let e=null;if(h){let t=!d&&!f&&g,n=`${i}-clear-icon`,r=typeof h==`object`&&h?.clearIcon?h.clearIcon:`✖`;e=S.createElement(`button`,{type:`button`,tabIndex:-1,onClick:e=>{_?.(e),T?.()},onMouseDown:e=>e.preventDefault(),className:J(n,{[`${n}-hidden`]:!t,[`${n}-has-suffix`]:!!o})},r)}let t=`${i}-affix-wrapper`,n=J(t,{[`${i}-disabled`]:d,[`${t}-disabled`]:d,[`${t}-focused`]:p,[`${t}-readonly`]:f,[`${t}-input-with-clear-btn`]:o&&h&&g},y?.affixWrapper,b?.affixWrapper,b?.variant),r=(o||h)&&S.createElement(`span`,{className:J(`${i}-suffix`,b?.suffix),style:C?.suffix},e,o);P=S.createElement(D,dB({className:n,style:C?.affixWrapper,onClick:M},x?.affixWrapper,{ref:j}),a&&S.createElement(`span`,{className:J(`${i}-prefix`,b?.prefix),style:C?.prefix},a),P,r)}if(sB(e)){let e=`${i}-group`,t=`${e}-addon`,n=`${e}-wrapper`,r=J(`${i}-wrapper`,e,y?.wrapper,b?.wrapper),a=J(n,{[`${n}-disabled`]:d},y?.group,b?.groupWrapper);P=S.createElement(O,{className:a,ref:F},S.createElement(k,{className:r},s&&S.createElement(A,{className:t},s),P,c&&S.createElement(A,{className:t},c)))}return S.cloneElement(P,{className:J(P.props?.className,l)||null,style:{...P.props?.style,...u},hidden:v})});function pB(e,t){return S.useMemo(()=>{let n={};t&&(n.show=typeof t==`object`&&t.formatter?t.formatter:!!t),n={...n,...e};let{show:r,...i}=n;return{...i,show:!!r,showFormatter:typeof r==`function`?r:void 0,strategy:i.strategy||(e=>e.length)}},[e,t])}function mB(){return mB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{autoComplete:n,onChange:r,onFocus:i,onBlur:a,onPressEnter:o,onKeyDown:s,onKeyUp:c,prefixCls:l=`rc-input`,disabled:u,htmlSize:d,className:f,maxLength:p,suffix:m,showCount:h,count:g,type:_=`text`,classes:v,classNames:y,styles:b,onCompositionStart:x,onCompositionEnd:C,...w}=e,[T,E]=(0,S.useState)(!1),D=(0,S.useRef)(!1),O=(0,S.useRef)(!1),k=(0,S.useRef)(null),A=(0,S.useRef)(null),j=e=>{k.current&&l_(k.current,e)},[M,N]=Hn(e.defaultValue,e.value),P=M==null?``:String(M),[F,I]=(0,S.useState)(null),L=pB(g,h),R=L.max||p,z=L.strategy(P),B=!!R&&z>R;(0,S.useImperativeHandle)(t,()=>({focus:j,blur:()=>{k.current?.blur()},setSelectionRange:(e,t,n)=>{k.current?.setSelectionRange(e,t,n)},select:()=>{k.current?.select()},input:k.current,nativeElement:A.current?.nativeElement||k.current})),(0,S.useEffect)(()=>{O.current&&=!1,E(e=>e&&u?!1:e)},[u]);let V=(e,t,n)=>{let i=t;if(!D.current&&L.exceedFormatter&&L.max&&L.strategy(t)>L.max)i=L.exceedFormatter(t,{max:L.max}),t!==i&&I([k.current?.selectionStart||0,k.current?.selectionEnd||0]);else if(n.source===`compositionEnd`)return;N(i),k.current&&uB(k.current,e,r,i)};(0,S.useEffect)(()=>{F&&k.current?.setSelectionRange(...F)},[F]);let H=e=>{V(e,e.target.value,{source:`change`})},U=e=>{D.current=!1,V(e,e.currentTarget.value,{source:`compositionEnd`}),C?.(e)},W=e=>{o&&e.key===`Enter`&&!O.current&&!e.nativeEvent.isComposing&&(O.current=!0,o(e)),s?.(e)},ee=e=>{e.key===`Enter`&&(O.current=!1),c?.(e)},te=e=>{E(!0),i?.(e)},ne=e=>{O.current&&=!1,E(!1),a?.(e)},re=e=>{N(``),j(),k.current&&uB(k.current,e,r)},ie=B&&`${l}-out-of-range`;return S.createElement(fB,mB({},w,{prefixCls:l,className:J(f,ie),handleReset:re,value:P,focused:T,triggerFocus:j,suffix:(()=>{let e=Number(R)>0;if(m||L.show){let t=L.showFormatter?L.showFormatter({value:P,count:z,maxLength:R}):`${z}${e?` / ${R}`:``}`;return S.createElement(S.Fragment,null,L.show&&S.createElement(`span`,{className:J(`${l}-show-count-suffix`,{[`${l}-show-count-has-suffix`]:!!m},y?.count),style:{...b?.count}},t),m)}return null})(),disabled:u,classes:v,classNames:y,styles:b,ref:A}),(()=>{let t=Sr(e,[`prefixCls`,`onPressEnter`,`addonBefore`,`addonAfter`,`prefix`,`suffix`,`allowClear`,`defaultValue`,`showCount`,`count`,`classes`,`htmlSize`,`styles`,`classNames`,`onClear`]);return S.createElement(`input`,mB({autoComplete:n},t,{onChange:H,onFocus:te,onBlur:ne,onKeyDown:W,onKeyUp:ee,className:J(l,{[`${l}-disabled`]:u},y?.input),style:b?.input,ref:k,size:d,type:_,onCompositionStart:e=>{D.current=!0,x?.(e)},onCompositionEnd:U}))})())}),gB=e=>{let t;return hd(e)&&e?.clearIcon?t=e:e&&(t={clearIcon:S.createElement(Fl,null)}),t};function _B(e,t){let n=(0,S.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute(`type`)===`password`&&e.current?.input.hasAttribute(`value`)&&e.current?.input.removeAttribute(`value`)}))};return(0,S.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[]),r}function vB(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var yB=(0,S.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,status:i,size:a,disabled:o,onBlur:s,onFocus:c,suffix:l,allowClear:u,addonAfter:d,addonBefore:f,className:p,style:m,styles:h,rootClassName:g,onChange:_,classNames:v,variant:y,...b}=e,{getPrefixCls:x,direction:C,allowClear:w,autoComplete:T,className:E,style:D,classNames:O,styles:k}=li(`input`),A=x(`input`,n),j=(0,S.useRef)(null),M=bf(A),[N,P]=yL(A,g);bL(A,M);let{compactSize:F,compactItemClassnames:I}=ih(A,C),L=th(e=>a??F??e),R=S.useContext(zp),z=o??R,B={...e,size:L,disabled:z},[V,H]=Fd([O,v],[k,h],{props:B}),{status:U,hasFeedback:W,feedbackIcon:ee}=(0,S.useContext)(Sy),te=oC(U,i);(0,S.useRef)(vB(e)||!!W);let ne=_B(j,!0),re=e=>{ne(),s?.(e)},ie=e=>{ne(),c?.(e)},ae=e=>{ne(),_?.(e)},G=(W||l)&&S.createElement(S.Fragment,null,l,W&&ee),oe=gB(u??w),[K,se]=hC(`input`,y,r);return S.createElement(hB,{ref:$n(t,j),prefixCls:A,autoComplete:T,...b,disabled:z,onBlur:re,onFocus:ie,style:{...H.root,...D,...m},styles:H,suffix:G,allowClear:oe,className:J(p,g,P,M,I,E,V.root),onChange:ae,addonBefore:f&&S.createElement(Ty,{form:!0,space:!0},f),addonAfter:d&&S.createElement(Ty,{form:!0,space:!0},d),classNames:{...V,input:J({[`${A}-sm`]:L===`small`,[`${A}-lg`]:L===`large`,[`${A}-rtl`]:C===`rtl`},V.input,N),variant:J({[`${A}-${K}`]:se},aC(A,te)),affixWrapper:J({[`${A}-affix-wrapper-sm`]:L===`small`,[`${A}-affix-wrapper-lg`]:L===`large`,[`${A}-affix-wrapper-rtl`]:C===`rtl`},N),wrapper:J({[`${A}-group-rtl`]:C===`rtl`},N),groupWrapper:J({[`${A}-group-wrapper-sm`]:L===`small`,[`${A}-group-wrapper-lg`]:L===`large`,[`${A}-group-wrapper-rtl`]:C===`rtl`,[`${A}-group-wrapper-${K}`]:se},aC(`${A}-group-wrapper`,te,W),N)}})}),bB={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z`}}]},name:`swap-right`,theme:`outlined`};function xB(){return xB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,xB({},e,{ref:t,icon:bB}))),CB=(e,t,n,r,i,a)=>{let{classNames:o,styles:s}=li(e),[c,l]=Fd([o,t],[s,n],{props:a},{popup:{_default:`root`}});return S.useMemo(()=>[{...c,popup:{...c.popup,root:J(c.popup?.root,r)}},{...l,popup:{...l.popup,root:{...l.popup?.root,...i}}}],[c,l,r,i])};function wB(e,t,n){return n===void 0?t===`year`&&e.lang.yearPlaceholder?e.lang.yearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.quarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.monthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.weekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.placeholder:e.lang.placeholder:n}function TB(e,t,n){return n===void 0?t===`year`&&e.lang.yearPlaceholder?e.lang.rangeYearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.rangeQuarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.rangeMonthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.rangeWeekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.rangePlaceholder:e.lang.rangePlaceholder:n}function EB(e,t){let{allowClear:n=!0}=e,{clearIcon:r,removeIcon:i}=PC({...e,prefixCls:t,componentName:`DatePicker`});return[S.useMemo(()=>n===!1?!1:{clearIcon:r,...n===!0?{}:n},[n,r]),i]}var[DB,OB]=[`week`,`WeekPicker`],[kB,AB]=[`month`,`MonthPicker`],[jB,MB]=[`year`,`YearPicker`],[NB,PB]=[`quarter`,`QuarterPicker`],[FB,IB]=[`time`,`TimePicker`],LB={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z`}}]},name:`calendar`,theme:`outlined`};function RB(){return RB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,RB({},e,{ref:t,icon:LB}))),BB={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`};function VB(){return VB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,VB({},e,{ref:t,icon:BB}))),UB=({picker:e,hasFeedback:t,feedbackIcon:n,suffixIcon:r})=>r===null||r===!1?null:r===!0||r===void 0?S.createElement(S.Fragment,null,e===FB?S.createElement(HB,null):S.createElement(zB,null),t&&n):r,WB=e=>S.createElement(Zg,{size:`small`,type:`primary`,...e});function GB(e){return(0,S.useMemo)(()=>({button:WB,...e}),[e])}var KB=e=>(0,S.forwardRef)((t,n)=>{let{prefixCls:r,getPopupContainer:i,components:a,className:o,style:s,classNames:c,styles:l,placement:u,size:d,disabled:f,bordered:p=!0,placeholder:m,status:h,variant:g,picker:_,dropdownClassName:v,popupClassName:y,popupStyle:b,rootClassName:x,suffixIcon:C,separator:w,...T}=t,[E,D]=CB(_===FB?`timePicker`:`datePicker`,c,l,y||v,b),O=S.useRef(null),{getPrefixCls:k,direction:A,getPopupContainer:j,rangePicker:M}=(0,S.useContext)(oi),N=k(`picker`,r),{compactSize:P,compactItemClassnames:F}=ih(N,A),I=k(),L=w??M?.separator,[R,z]=hC(`rangePicker`,g,p),B=bf(N),[V,H]=CL(N,B),U=J(V,H,B,x),[W]=EB(t,N),ee=GB(a),te=th(e=>d??P??e),ne=S.useContext(zp),re=f??ne,{hasFeedback:ie,status:ae,feedbackIcon:G}=(0,S.useContext)(Sy),oe=UB({picker:_,hasFeedback:ie,feedbackIcon:G,suffixIcon:C});(0,S.useImperativeHandle)(n,()=>O.current);let[K]=cd(`Calendar`,Qu),se=fr(K,t.locale||{}),[ce]=Yd(`DatePicker`,D?.popup?.root?.zIndex);return S.createElement(Ty,{space:!0},S.createElement(QF,{separator:S.createElement(`span`,{"aria-label":`to`,className:`${N}-separator`},L??S.createElement(SB,null)),disabled:re,ref:O,placement:u,placeholder:TB(se,_,m),suffixIcon:oe,prevIcon:S.createElement(`span`,{className:`${N}-prev-icon`}),nextIcon:S.createElement(`span`,{className:`${N}-next-icon`}),superPrevIcon:S.createElement(`span`,{className:`${N}-super-prev-icon`}),superNextIcon:S.createElement(`span`,{className:`${N}-super-next-icon`}),transitionName:`${I}-slide-up`,picker:_,...T,locale:se.lang,getPopupContainer:i||j,generateConfig:e,components:ee,direction:A,prefixCls:N,rootClassName:U,className:J({[`${N}-large`]:te===`large`,[`${N}-small`]:te===`small`,[`${N}-${R}`]:z},aC(N,oC(ae,h),ie),F,o,M?.className),style:{...M?.style,...s},classNames:E,styles:{...D,popup:{...D.popup,root:{...D.popup.root,zIndex:ce}}},allowClear:W}))}),qB=e=>{let t=(t,n)=>{let r=n===IB?`timePicker`:`datePicker`;return(0,S.forwardRef)((i,a)=>{let{prefixCls:o,getPopupContainer:s,components:c,style:l,className:u,size:d,bordered:f,placement:p,placeholder:m,disabled:h,status:g,variant:_,onCalendarChange:v,classNames:y,styles:b,dropdownClassName:x,popupClassName:C,popupStyle:w,rootClassName:T,suffixIcon:E,...D}=i,{suffixIcon:O}=li(n===IB?`timePicker`:`datePicker`),{getPrefixCls:k,direction:A,getPopupContainer:j,[r]:M}=(0,S.useContext)(oi),N=k(`picker`,o),{compactSize:P,compactItemClassnames:F}=ih(N,A),I=th(e=>d??P??e),L=S.useContext(zp),R=h??L,z={...i,size:I,disabled:R,status:g,variant:_},[B,V]=CB(r,y,b,C||x,w,z),H=S.useRef(null),[U,W]=hC(`datePicker`,_,f),ee=bf(N),[te,ne]=CL(N,ee),re=J(te,ne,ee,T);(0,S.useImperativeHandle)(a,()=>H.current);let ie={showToday:!0},ae=t||i.picker,G=k(),{onSelect:oe,multiple:K}=D,se=oe&&t===`time`&&!K,ce=(e,t,n)=>{v?.(e,t,n),se&&oe(e)},[q,le]=EB(i,N),ue=GB(c),{hasFeedback:de,status:fe,feedbackIcon:pe}=(0,S.useContext)(Sy),me=UB({picker:ae,hasFeedback:de,feedbackIcon:pe,suffixIcon:E===void 0?O:E}),[he]=cd(`DatePicker`,Qu),ge=fr(he,i.locale||{}),[_e]=Yd(`DatePicker`,V?.popup?.root?.zIndex);return S.createElement(Ty,{space:!0},S.createElement(II,{ref:H,placeholder:wB(ge,ae,m),suffixIcon:me,placement:p,prevIcon:S.createElement(`span`,{className:`${N}-prev-icon`}),nextIcon:S.createElement(`span`,{className:`${N}-next-icon`}),superPrevIcon:S.createElement(`span`,{className:`${N}-super-prev-icon`}),superNextIcon:S.createElement(`span`,{className:`${N}-super-next-icon`}),transitionName:`${G}-slide-up`,picker:t,onCalendarChange:ce,...ie,...D,locale:ge.lang,getPopupContainer:s||j,generateConfig:e,components:ue,direction:A,disabled:R,prefixCls:N,rootClassName:re,className:J({[`${N}-large`]:I===`large`,[`${N}-small`]:I===`small`,[`${N}-${U}`]:W},aC(N,oC(fe,g),de),F,M?.className,u),style:{...M?.style,...l},classNames:B,styles:{...V,popup:{...V.popup,root:{...V.popup.root,zIndex:_e}}},allowClear:q,removeIcon:le}))})},n=t(),r=t(DB,OB),i=t(kB,AB),a=t(jB,MB),o=t(NB,PB);return{DatePicker:n,WeekPicker:r,MonthPicker:i,YearPicker:a,TimePicker:t(FB,IB),QuarterPicker:o}},JB=e=>{let{DatePicker:t,WeekPicker:n,MonthPicker:r,YearPicker:i,TimePicker:a,QuarterPicker:o}=qB(e),s=KB(e),c=t;return c.WeekPicker=n,c.MonthPicker=r,c.YearPicker=i,c.RangePicker=s,c.TimePicker=a,c.QuarterPicker=o,c},YB=JB(pte);YB._InternalPanelDoNotUseOrYouWillBeFired=cx(YB,`popupAlign`,void 0,`picker`),YB._InternalRangePanelDoNotUseOrYouWillBeFired=cx(YB.RangePicker,`popupAlign`,void 0,`picker`),YB.generatePicker=JB;var XB={xxxl:4,xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},ZB=S.createContext(null),QB=e=>Cr(e).map(e=>({...e?.props,key:e.key}));function $B(e,t,n){let r=S.useMemo(()=>t||QB(n),[t,n]);return S.useMemo(()=>r.map(({span:t,...n})=>t===`filled`?{...n,filled:!0}:{...n,span:pd(t)?t:WC(e,t)}),[r,e])}function eV(e,t){let n=[],r=[],i=!1,a=0;return e.filter(e=>e).forEach(e=>{let{filled:o,...s}=e;if(o){r.push(s),n.push(r),r=[],a=0;return}let c=t-a;a+=e.span||1,a>=t?(a>t?(i=!0,r.push({...s,span:c})):r.push(s),n.push(r),r=[],a=0):r.push(s)}),r.length>0&&n.push(r),n=n.map(e=>{let n=e.reduce((e,t)=>e+(t.span||1),0);if(n{let[n,r]=(0,S.useMemo)(()=>eV(t,e),[t,e]);return n},nV=e=>e.children,rV=e=>{let{itemPrefixCls:t,component:n,span:r,className:i,style:a,labelStyle:o,contentStyle:s,bordered:c,label:l,content:u,colon:d,type:f,styles:p,classNames:m}=e,h=n,{classNames:g,styles:_}=S.useContext(ZB),[v,y]=Fd([g,m],[_,p],{props:e}),b={...o,...y.label},x={...s,...y.content};return c?S.createElement(h,{colSpan:r,style:a,className:J(i,{[`${t}-item-${f}`]:f===`label`||f===`content`,[v.label]:v.label&&f===`label`,[v.content]:v.content&&f===`content`})},fd(l)&&S.createElement(`span`,{style:b},l),fd(u)&&S.createElement(`span`,{style:x},u)):S.createElement(h,{className:J(`${t}-item`,i),style:a,colSpan:r},S.createElement(`div`,{className:`${t}-item-container`},fd(l)&&S.createElement(`span`,{style:b,className:J(`${t}-item-label`,v.label,{[`${t}-item-no-colon`]:!d})},l),fd(u)&&S.createElement(`span`,{style:x,className:J(`${t}-item-content`,v.content)},u)))};function iV(e,{colon:t,prefixCls:n,bordered:r},{component:i,type:a,showLabel:o,showContent:s,labelStyle:c,contentStyle:l,styles:u}){return e.map(({label:e,children:d,prefixCls:f=n,className:p,style:m,labelStyle:h,contentStyle:g,span:_=1,key:v,styles:y,classNames:b},x)=>typeof i==`string`?S.createElement(rV,{key:`${a}-${v||x}`,className:p,style:m,classNames:b,styles:{label:{...c,...u?.label,...h,...y?.label},content:{...l,...u?.content,...g,...y?.content}},span:_,colon:t,component:i,itemPrefixCls:f,bordered:r,label:o?e:null,content:s?d:null,type:a}):[S.createElement(rV,{key:`label-${v||x}`,className:p,style:{...c,...u?.label,...m,...h,...y?.label},span:1,colon:t,component:i[0],itemPrefixCls:f,bordered:r,label:e,type:`label`}),S.createElement(rV,{key:`content-${v||x}`,className:p,style:{...l,...u?.content,...m,...g,...y?.content},span:_*2-1,component:i[1],itemPrefixCls:f,bordered:r,content:d,type:`content`})])}var aV=e=>{let t=S.useContext(ZB),{prefixCls:n,vertical:r,row:i,index:a,bordered:o}=e;return r?S.createElement(S.Fragment,null,S.createElement(`tr`,{key:`label-${a}`,className:`${n}-row`},iV(i,e,{component:`th`,type:`label`,showLabel:!0,...t})),S.createElement(`tr`,{key:`content-${a}`,className:`${n}-row`},iV(i,e,{component:`td`,type:`content`,showContent:!0,...t}))):S.createElement(`tr`,{key:a,className:`${n}-row`},iV(i,e,{component:o?[`th`,`td`]:`td`,type:`item`,showLabel:!0,showContent:!0,...t}))},oV=e=>{let{componentCls:t,labelBg:n}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:`auto`},[`${t}-row`]:{borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:`none`,"> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.padding)} ${Y(e.paddingLG)}`,borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:`none`}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:n,"&::after":{display:`none`}}}},[`&${t}-medium`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.paddingSM)} ${Y(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.paddingXS)} ${Y(e.padding)}`}}}}}},sV=e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:r,itemPaddingEnd:i,colonMarginRight:a,colonMarginLeft:o,titleMarginBottom:s}=e;return{[t]:{...Jc(e),...oV(e),"&-rtl":{direction:`rtl`},[`${t}-header`]:{display:`flex`,alignItems:`center`,marginBottom:s},[`${t}-title`]:{...qc,flex:`auto`,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG},[`${t}-extra`]:{marginInlineStart:`auto`,color:n,fontSize:e.fontSize},[`${t}-view`]:{width:`100%`,borderRadius:e.borderRadiusLG,table:{width:`100%`,tableLayout:`fixed`,borderCollapse:`collapse`}},[`${t}-row`]:{"> th, > td":{paddingBottom:r,paddingInlineEnd:i},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:`none`,"> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:`normal`,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:`start`,"&::after":{content:`":"`,position:`relative`,top:-.5,marginInline:`${Y(o)} ${Y(a)}`},[`&${t}-item-no-colon::after`]:{content:`""`}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:`""`}},[`${t}-item-content`]:{display:`table-cell`,flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:`break-word`,overflowWrap:`break-word`},[`${t}-item`]:{paddingBottom:0,verticalAlign:`top`,"&-container":{display:`flex`,[`${t}-item-label`]:{display:`inline-flex`,alignItems:`baseline`},[`${t}-item-content`]:{display:`inline-flex`,alignItems:`baseline`,minWidth:`1em`}}},"&-medium":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}}}},cV=rl(`Descriptions`,e=>sV(gs(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText})),lV=e=>{let{prefixCls:t,title:n,extra:r,column:i,colon:a=!0,bordered:o,layout:s,children:c,className:l,rootClassName:u,style:d,size:f,labelStyle:p,contentStyle:m,styles:h,items:g,classNames:_,...v}=e,{getPrefixCls:y,direction:b,className:x,style:C,classNames:w,styles:T}=li(`descriptions`),E=y(`descriptions`,t),D=KC(),O=S.useMemo(()=>pd(i)?i:WC(D,{...XB,...i})??3,[D,i]),k=$B(D,g,c),A=th(f),j=tV(O,k),[M,N]=cV(E),P={...e,column:O,items:k,size:A},[F,I]=Fd([w,_],[T,h],{props:P}),L=S.useMemo(()=>({labelStyle:p,contentStyle:m,styles:{label:I.label,content:I.content},classNames:{label:F.label,content:F.content}}),[p,m,I.label,I.content,F.label,F.content]);return S.createElement(ZB.Provider,{value:L},S.createElement(`div`,{className:J(E,x,F.root,{[`${E}-medium`]:A===`medium`||A===`middle`,[`${E}-small`]:A===`small`,[`${E}-bordered`]:!!o,[`${E}-rtl`]:b===`rtl`},l,u,M,N),style:{...C,...I.root,...d},...v},(n||r)&&S.createElement(`div`,{className:J(`${E}-header`,F.header),style:I.header},n&&S.createElement(`div`,{className:J(`${E}-title`,F.title),style:I.title},n),r&&S.createElement(`div`,{className:J(`${E}-extra`,F.extra),style:I.extra},r)),S.createElement(`div`,{className:`${E}-view`},S.createElement(`table`,null,S.createElement(`tbody`,null,j.map((e,t)=>S.createElement(aV,{key:t,index:t,colon:a,prefixCls:E,vertical:s===`vertical`,bordered:o,row:e})))))))};lV.Item=nV;var uV=S.createContext(null),dV=S.createContext({});function fV(){return fV=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t,className:n,containerRef:r,...i}=e,{panel:a}=S.useContext(dV),o=er(a,r);return S.createElement(`div`,fV({className:J(`${t}-section`,n),role:`dialog`,ref:o},Vu(e,{aria:!0}),{"aria-modal":`true`},i))};function mV(e){let{prefixCls:t,direction:n,className:r,style:i,maxSize:a,containerRef:o,currentSize:s,onResize:c,onResizeEnd:l,onResizeStart:u}=e,[d,f]=S.useState(!1),[p,m]=S.useState(0),[h,g]=S.useState(0),_=n===`left`||n===`right`,v=In(e=>{e.preventDefault(),e.stopPropagation(),f(!0),m(_?e.clientX:e.clientY);let t;if(typeof s==`number`)t=s;else if(o?.current){let e=o.current.getBoundingClientRect();t=_?e.width:e.height}g(t),u?.(t)}),y=In(e=>{if(!d)return;let t=(_?e.clientX:e.clientY)-p;(n===`right`||n===`bottom`)&&(t=-t);let r=h+t;r<0&&(r=0),a&&r>a&&(r=a),c?.(r)}),b=S.useCallback(()=>{if(d&&(f(!1),o?.current)){let e=o.current.getBoundingClientRect(),t=_?e.width:e.height;l?.(t)}},[d,o,l,_]);return S.useEffect(()=>{if(d)return document.addEventListener(`mousemove`,y),document.addEventListener(`mouseup`,b),()=>{document.removeEventListener(`mousemove`,y),document.removeEventListener(`mouseup`,b)}},[d,y,b]),{dragElementProps:{className:J(`${t}-dragger`,`${t}-dragger-${n}`,{[`${t}-dragger-dragging`]:d,[`${t}-dragger-horizontal`]:_,[`${t}-dragger-vertical`]:!_},r),style:i,onMouseDown:v},isDragging:d}}function hV(e){if(typeof e==`string`){let t=Number(e.replace(/px$/i,``));if(parseFloat(e)===t&&br(!1,"Invalid value type of `width` or `height` which should be number type instead."),!Number.isNaN(t))return t}return e}function gV(e,t,n,r,i){let[a]=x_(t&&(r??i!==!1),e);return S.useEffect(()=>{t&&n===!0&&e()?.focus({preventScroll:!0})},[t]),a}function _V(){return _V=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,open:r,placement:i,inline:a,push:o,forceRender:s,autoFocus:c,focusTrap:l,classNames:u,rootClassName:d,rootStyle:f,zIndex:p,className:m,id:h,style:g,motion:_,width:v,height:y,size:b,maxSize:x,children:C,mask:w,maskClosable:T,maskMotion:E,maskClassName:D,maskStyle:O,afterOpenChange:k,onClose:A,onMouseEnter:j,onMouseOver:M,onMouseLeave:N,onClick:P,onKeyDown:F,onKeyUp:I,styles:L,drawerRender:R,resizable:z,defaultSize:B}=e,V=S.useRef(null);S.useImperativeHandle(t,()=>V.current);let H=gV(()=>V.current,r,c,l,w),[U,W]=S.useState(!1),ee=S.useContext(uV),te;te=typeof o==`boolean`?o?{}:{distance:0}:o||{};let ne=te?.distance??ee?.pushDistance??180,re=S.useMemo(()=>({pushDistance:ne,push:()=>{W(!0)},pull:()=>{W(!1)}}),[ne]);S.useEffect(()=>{r?ee?.push?.():ee?.pull?.()},[r]),S.useEffect(()=>()=>{ee?.pull?.()},[]);let ie=S.createElement(Iu,_V({key:`mask`},E,{visible:w&&r}),({className:e,style:t},i)=>S.createElement(`div`,{className:J(`${n}-mask`,e,u?.mask,D),style:{...t,...O,...L?.mask},onClick:T&&r?A:void 0,ref:i})),ae=typeof _==`function`?_(i):_,[G,oe]=S.useState(),K=i===`left`||i===`right`,se=S.useMemo(()=>hV(b??(K?v:y)??G??B??(K?378:void 0)),[b,v,y,B,K,G]),ce=S.useMemo(()=>{let e={};if(U&&ne)switch(i){case`top`:e.transform=`translateY(${ne}px)`;break;case`bottom`:e.transform=`translateY(${-ne}px)`;break;case`left`:e.transform=`translateX(${ne}px)`;break;default:e.transform=`translateX(${-ne}px)`;break}return K?e.width=hV(se):e.height=hV(se),e},[U,ne,i,K,se]),q=S.useRef(null),le=!!z,ue=typeof z==`object`&&z||{},de=In(e=>{oe(e),ue.onResize?.(e)}),{dragElementProps:fe,isDragging:pe}=mV({prefixCls:`${n}-resizable`,direction:i,className:u?.dragger,style:L?.dragger,maxSize:x,containerRef:q,currentSize:se,onResize:de,onResizeStart:ue.onResizeStart,onResizeEnd:ue.onResizeEnd}),me={onMouseEnter:j,onMouseOver:M,onMouseLeave:N,onClick:P,onKeyDown:F,onKeyUp:I,onFocus:e=>{H(e.target)}},he=S.createElement(Iu,_V({key:`panel`},ae,{visible:r,forceRender:s,onVisibleChanged:k,removeOnLeave:!1,leavedClassName:`${n}-content-wrapper-hidden`}),({className:t,style:r},i)=>{let a=S.createElement(pV,_V({id:h,containerRef:i,prefixCls:n,className:J(m,u?.section),style:{...g,...L?.section}},Vu(e,{aria:!0}),me),C);return S.createElement(`div`,_V({ref:q,className:J(`${n}-content-wrapper`,pe&&`${n}-content-wrapper-dragging`,u?.wrapper,!pe&&t),style:{...r,...ce,...L?.wrapper}},Vu(e,{data:!0})),le&&S.createElement(`div`,fe),R?R(a):a)}),ge={...f};return p&&(ge.zIndex=p),S.createElement(uV.Provider,{value:re},S.createElement(`div`,{className:J(n,`${n}-${i}`,d,{[`${n}-open`]:r,[`${n}-inline`]:a}),style:ge,tabIndex:-1,ref:V},ie,he))}),yV=e=>{let{open:t=!1,prefixCls:n=`rc-drawer`,placement:r=`right`,autoFocus:i=!0,keyboard:a=!0,width:o,height:s,size:c,maxSize:l,mask:u=!0,maskClosable:d=!0,getContainer:f,forceRender:p,afterOpenChange:m,destroyOnHidden:h,onMouseEnter:g,onMouseOver:_,onMouseLeave:v,onClick:y,onKeyDown:b,onKeyUp:x,onClose:C,resizable:w,defaultSize:T,focusTriggerAfterClose:E,panelRef:D}=e,[O,k]=S.useState(!1),[A,j]=S.useState(!1);zn(()=>{j(!0)},[]);let M=A?t:!1,N=S.useRef(null),P=S.useRef(null);zn(()=>{M&&(P.current=document.activeElement)},[M]);let F=e=>{k(e),m?.(e),!e&&E!==!1&&P.current&&!N.current?.contains(P.current)&&P.current?.focus({preventScroll:!0})},I=S.useMemo(()=>({panel:D}),[D]);if(!p&&!O&&!M&&h)return null;let L={onMouseEnter:g,onMouseOver:_,onMouseLeave:v,onClick:y,onKeyDown:b,onKeyUp:x},R={...e,open:M,prefixCls:n,placement:r,autoFocus:i,keyboard:a,width:o,height:s,size:c,maxSize:l,defaultSize:T,mask:u,maskClosable:d,inline:f===!1,afterOpenChange:F,ref:N,resizable:w,...L};return S.createElement(dV.Provider,{value:I},S.createElement(Xf,{open:M||p||O,autoDestroy:!1,getContainer:f,autoLock:u&&(M||O),onEsc:({top:e,event:t})=>{e&&a&&(t.stopPropagation(),C?.(t))}},S.createElement(vV,R)))},bV=e=>{let{prefixCls:t,ariaId:n,title:r,footer:i,extra:a,closable:o,loading:s,onClose:c,headerStyle:l,bodyStyle:u,footerStyle:d,children:f,classNames:p,styles:m}=e,h=li(`drawer`),{classNames:g,styles:_,closable:v}=h,[y,b]=Fd([g,p],[_,m],{props:{...e,closable:o??v}}),x=S.useMemo(()=>{let e=o??v;if(e!==!1)return hd(e)&&e?.placement===`end`?`end`:`start`},[o,v]),C=S.useCallback(e=>S.createElement(`button`,{type:`button`,onClick:c,className:J(`${t}-close`,{[`${t}-close-${x}`]:x===`end`},y.close),style:b.close},e),[c,t,x,y.close,b.close]),[w,T]=Td(yd(e),yd(h),{closable:!0,closeIconRender:C}),E=()=>!r&&!w?null:S.createElement(`div`,{style:{...b.header,...l},className:J(`${t}-header`,y.header,{[`${t}-header-close-only`]:w&&!r&&!a})},S.createElement(`div`,{className:`${t}-header-title`},x===`start`&&T,r&&S.createElement(`div`,{className:J(`${t}-title`,y.title),style:b.title,id:n},r)),a&&S.createElement(`div`,{className:J(`${t}-extra`,y.extra),style:b.extra},a),x===`end`&&T),D=()=>i?S.createElement(`div`,{className:J(`${t}-footer`,y.footer),style:{...b.footer,...d}},i):null;return S.createElement(S.Fragment,null,E(),S.createElement(`div`,{className:J(`${t}-body`,y.body),style:{...b.body,...u}},s?S.createElement(Wy,{active:!0,title:!1,paragraph:{rows:5},className:`${t}-body-skeleton`}):f),D())},xV=e=>{let t=`100%`;return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},SV=(e,t)=>({"&-enter, &-appear":{...e,"&-active":t},"&-leave":{...t,"&-active":e}}),CV=(e,t)=>({"&-enter, &-appear, &-leave":{"&-start":{transition:`none`},"&-active":{transition:`all ${t}`}},...SV({opacity:e},{opacity:1})}),wV=(e,t)=>[CV(.7,t),SV({transform:xV(e)},{transform:`none`})],TV=e=>{let{componentCls:t,motionDurationSlow:n}=e;return{[t]:{[`${t}-mask-motion`]:CV(0,n),[`${t}-panel-motion`]:[`left`,`right`,`top`,`bottom`].reduce((e,t)=>({...e,[`&-${t}`]:wV(t,n)}),{})}}},EV=e=>{let{borderRadiusSM:t,componentCls:n,zIndexPopup:r,colorBgMask:i,colorBgElevated:a,motionDurationSlow:o,motionDurationMid:s,paddingXS:c,padding:l,paddingLG:u,fontSizeLG:d,lineHeightLG:f,lineWidth:p,lineType:m,colorSplit:h,marginXS:g,colorIcon:_,colorIconHover:v,colorBgTextHover:y,colorBgTextActive:b,colorText:x,fontWeightStrong:S,footerPaddingBlock:C,footerPaddingInline:w,draggerSize:T,calc:E}=e,D=`${n}-content-wrapper`,O=`${n}-resizable-dragger`;return{[n]:{position:`fixed`,inset:0,zIndex:r,pointerEvents:`none`,color:x,"&-pure":{position:`relative`,background:a,display:`flex`,flexDirection:`column`,pointerEvents:`auto`,[`&${n}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${n}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${n}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${n}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:`absolute`},[`${n}-mask`]:{position:`absolute`,inset:0,zIndex:r,background:i,pointerEvents:`auto`,[`&${n}-mask-blur`]:{backdropFilter:`blur(4px)`}},[D]:{position:`absolute`,zIndex:r,maxWidth:`100vw`,transition:`all ${o}`,"&-hidden":{display:`none`}},[`&-left > ${D}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${D}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${D}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${D}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${n}-section`]:{display:`flex`,flexDirection:`column`,width:`100%`,height:`100%`,overflow:`auto`,background:a,pointerEvents:`auto`},[`${n}-header`]:{display:`flex`,flex:0,alignItems:`center`,padding:`${Y(l)} ${Y(u)}`,fontSize:d,lineHeight:f,borderBottom:`${Y(p)} ${m} ${h}`,"&-title":{display:`flex`,flex:1,alignItems:`center`,minWidth:0,minHeight:0}},[`${n}-extra`]:{flex:`none`},[`${n}-close`]:{display:`inline-flex`,width:E(d).add(c).equal(),height:E(d).add(c).equal(),borderRadius:t,justifyContent:`center`,alignItems:`center`,color:_,fontWeight:S,fontSize:d,fontStyle:`normal`,lineHeight:1,textAlign:`center`,textTransform:`none`,textDecoration:`none`,background:`transparent`,border:0,cursor:`pointer`,transition:`all ${s}`,textRendering:`auto`,[`&${n}-close-end`]:{marginInlineStart:g},[`&:not(${n}-close-end)`]:{marginInlineEnd:g},"&:hover":{color:v,backgroundColor:y,textDecoration:`none`},"&:active":{backgroundColor:b},...Qc(e)},[`${n}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:d,lineHeight:f},[`${n}-body`]:{flex:1,minWidth:0,minHeight:0,padding:u,overflow:`auto`,[`${n}-body-skeleton`]:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`}},[`${n}-footer`]:{flexShrink:0,padding:`${Y(C)} ${Y(w)}`,borderTop:`${Y(p)} ${m} ${h}`},[O]:{position:`absolute`,zIndex:1,backgroundColor:`transparent`,userSelect:`none`,pointerEvents:`auto`,"&:hover":{backgroundColor:e.colorPrimary,opacity:.2},"&-dragging":{backgroundColor:e.colorPrimary,opacity:.3}},[`${O}-left`]:{top:0,bottom:0,right:{_skip_check_:!0,value:0},width:T,cursor:`col-resize`},[`${O}-right`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},width:T,cursor:`col-resize`},[`${O}-top`]:{insetInline:0,bottom:0,height:T,cursor:`row-resize`},[`${O}-bottom`]:{insetInline:0,top:0,height:T,cursor:`row-resize`},[`${D}-dragging`]:{userSelect:`none`,transition:`none`,willChange:`width, height`,[`${n}-content`]:{pointerEvents:`none`},[`${n}-section`]:{pointerEvents:`none`}},"&-rtl":{direction:`rtl`}}}},DV=rl(`Drawer`,e=>{let t=gs(e,{});return[EV(t),TV(t)]},e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding,draggerSize:4})),OV={distance:180},kV=378,AV={motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},jV=e=>{let{rootClassName:t,size:n,defaultSize:r=kV,height:i,width:a,mask:o,push:s=OV,open:c,afterOpenChange:l,onClose:u,prefixCls:d,getContainer:f,panelRef:p=null,style:m,className:h,resizable:g,"aria-labelledby":_,focusable:v,maskClosable:y,maskStyle:b,drawerStyle:x,contentWrapperStyle:C,destroyOnClose:w,destroyOnHidden:T,...E}=e,{placement:D}=E,O=zf(),k=E.title?O:void 0,{getPopupContainer:A,getPrefixCls:j,direction:M,className:N,style:P,classNames:F,styles:I,mask:L}=li(`drawer`),R=j(`drawer`,d),[z,B]=DV(R),V=f===void 0&&A?()=>A(document.body):f,H=S.useMemo(()=>pd(n)?n:n===`large`?736:n===`default`?kV:typeof n==`string`?/^\d+(\.\d+)?$/.test(n)?Number(n):n:!D||D===`left`||D===`right`?a:i,[n,D,a,i]),U={motionName:Gm(R,`mask-motion`),...AV},W=e=>({motionName:Gm(R,`panel-motion-${e}`),...AV}),ee=$n(p,Ky()),[te,ne]=Yd(`Drawer`,E.zIndex),[re,ie,ae]=Od(o,L,R,y),G=Ay(v,V!==!1&&re),{classNames:oe,styles:K,rootStyle:se}=E,ce={...e,zIndex:te,panelRef:p,mask:re,maskClosable:ae,defaultSize:r,push:s,focusable:G},[q,le]=Fd([F,oe],[I,K],{props:ce}),ue=J({"no-mask":!re,[`${R}-rtl`]:M===`rtl`},t,z,B,q.root);return S.createElement(Ty,{form:!0,space:!0},S.createElement(Ud.Provider,{value:ne},S.createElement(yV,{prefixCls:R,onClose:u,maskMotion:U,motion:W,...E,classNames:{mask:J(q.mask,ie.mask),section:q.section,wrapper:q.wrapper,dragger:q.dragger},styles:{mask:{...le.mask,...b},section:{...le.section,...x},wrapper:{...le.wrapper,...C},dragger:le.dragger},open:c,mask:re,maskClosable:ae,push:s,size:H,defaultSize:r,style:{...P,...m},rootStyle:{...se,...le.root},className:J(N,h),rootClassName:ue,getContainer:V,afterOpenChange:l,panelRef:ee,zIndex:te,...g?{resizable:g}:{},"aria-labelledby":_??k,destroyOnHidden:T??w,focusTriggerAfterClose:G.focusTriggerAfterClose,focusTrap:G.trap},S.createElement(bV,{prefixCls:R,size:n,...E,ariaId:k,onClose:u}))))};jV._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,style:n,className:r,placement:i=`right`,...a}=e,{getPrefixCls:o}=S.useContext(oi),s=o(`drawer`,t),[c,l]=DV(s),u=J(s,`${s}-pure`,`${s}-${i}`,c,l,r);return S.createElement(`div`,{className:u,style:n},S.createElement(bV,{prefixCls:s,...a}))};var MV=jV;function NV(e){return[`small`,`middle`,`medium`,`large`].includes(e)}function PV(e){return e?pd(e):!1}var FV=S.createContext({latestIndex:0}),IV=FV.Provider,LV=e=>{let{className:t,prefix:n,index:r,children:i,separator:a,style:o,classNames:s,styles:c}=e,{latestIndex:l}=S.useContext(FV);return fd(i)?S.createElement(S.Fragment,null,S.createElement(`div`,{className:t,style:o},i),r{let{componentCls:t,antCls:n}=e;return{[t]:{display:`inline-flex`,"&-rtl":{direction:`rtl`},"&-vertical":{flexDirection:`column`},"&-align":{flexDirection:`column`,"&-center":{alignItems:`center`},"&-start":{alignItems:`flex-start`},"&-end":{alignItems:`flex-end`},"&-baseline":{alignItems:`baseline`}},[`${t}-item:empty`]:{display:`none`},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:`block`}}}},zV=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},BV=rl(`Space`,e=>{let t=gs(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[RV(t),zV(t)]},()=>({}),{resetStyle:!1}),VV=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,size:i,className:a,style:o,classNames:s,styles:c}=li(`space`),{size:l=i??`small`,align:u,className:d,rootClassName:f,children:p,direction:m,orientation:h,prefixCls:g,split:_,separator:v,style:y,vertical:b,wrap:x=!1,classNames:C,styles:w,...T}=e,[E,D]=Array.isArray(l)?l:[l,l],O=NV(D),k=NV(E),A=PV(D),j=PV(E),M=Cr(p,{keepEmpty:!0}),[N,P]=Rd(h,b,m),F=u===void 0&&!P?`center`:u,I=v??_,L=n(`space`,g),[R,z]=BV(L),B={...e,size:l,orientation:N,align:F},[V,H]=Fd([s,C],[c,w],{props:B}),U=J(L,a,R,`${L}-${N}`,{[`${L}-rtl`]:r===`rtl`,[`${L}-align-${F}`]:F,[`${L}-gap-row-${D}`]:O,[`${L}-gap-col-${E}`]:k},d,f,z,V.root),W=J(`${L}-item`,V.item),ee=M.map((e,t)=>{let n=e?.key||`${W}-${t}`;return S.createElement(LV,{prefix:L,classNames:V,styles:H,className:W,key:n,index:t,separator:I,style:H.item},e)}),te=S.useMemo(()=>({latestIndex:M.reduce((e,t,n)=>fd(t)?n:e,0)}),[M]);if(M.length===0)return null;let ne={};return x&&(ne.flexWrap=`wrap`),!k&&j&&(ne.columnGap=E),!O&&A&&(ne.rowGap=D),S.createElement(`div`,{ref:t,className:U,style:{...ne,...H.root,...o,...y},...T},S.createElement(IV,{value:te},ee))});VV.Compact=sh,VV.Addon=$z;var HV=e=>{let{getPopupContainer:t,getPrefixCls:n,direction:r}=S.useContext(oi),{prefixCls:i,type:a=`default`,danger:o,disabled:s,loading:c,onClick:l,htmlType:u,children:d,className:f,menu:p,arrow:m,autoFocus:h,trigger:g,align:_,open:v,onOpenChange:y,placement:b,getPopupContainer:x,href:C,icon:w=S.createElement(kE,null),title:T,buttonsRender:E=e=>e,mouseEnterDelay:D,mouseLeaveDelay:O,overlayClassName:k,overlayStyle:A,destroyOnHidden:j,destroyPopupOnHide:M,dropdownRender:N,popupRender:P,...F}=e,I=n(`dropdown`,i),L=`${I}-button`,R={menu:p,arrow:m,autoFocus:h,align:_,disabled:s,trigger:s?[]:g,onOpenChange:y,getPopupContainer:x||t,mouseEnterDelay:D,mouseLeaveDelay:O,classNames:{root:k},styles:{root:A},destroyOnHidden:j,popupRender:P||N},{compactSize:z,compactItemClassnames:B}=ih(I,r),V=J(L,B,f);`destroyPopupOnHide`in e&&(R.destroyPopupOnHide=M),`open`in e&&(R.open=v),`placement`in e?R.placement=b:R.placement=r===`rtl`?`bottomLeft`:`bottomRight`;let[H,U]=E([S.createElement(qE,{type:a,danger:o,disabled:s,loading:c,onClick:l,htmlType:u,href:C,title:T},d),S.createElement(qE,{type:a,danger:o,icon:w})]);return S.createElement(VV.Compact,{className:V,size:z,block:!0,...F},H,S.createElement(KE,{...R},U))};HV.__ANT_BUTTON=!0;var UV=KE;UV.Button=HV;var WV={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z`}}]},name:`file-text`,theme:`outlined`};function GV(){return GV=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,GV({},e,{ref:t,icon:WV}))),qV=(e,t)=>fd(e)?hd(e)&&!(0,S.isValidElement)(e)?{...t,...e}:{...t,title:e}:null;function JV(e){let[t,n]=S.useState(e);return S.useEffect(()=>{let t=setTimeout(()=>{n(e)},e.length?0:10);return()=>{clearTimeout(t)}},[e]),t}var YV=e=>{let{componentCls:t,motionDurationFast:n,motionEaseInOut:r}=e,i=`${t}-show-help`,a=`${t}-show-help-item`;return{[i]:{transition:`opacity ${n} ${r}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[a]:{overflow:`hidden`,transition:`${[`height`,`opacity`,`transform`].map(e=>`${e} ${n} ${r}`).join(`, `)} !important`,[`&${a}-appear, &${a}-enter`]:{transform:`translateY(-5px)`,opacity:0,"&-active":{transform:`translateY(0)`,opacity:1}},[`&${a}-leave-active`]:{transform:`translateY(-5px)`}}}}},XV=e=>({legend:{display:`block`,width:`100%`,marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:`inherit`,border:0,borderBottom:`${Y(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, input[type='radio']:focus, input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${Y(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:`block`,paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),ZV=(e,t)=>{let{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},QV=e=>{let{componentCls:t}=e;return{[t]:{...Jc(e),...XV(e),[`${t}-text`]:{display:`inline-block`,paddingInlineEnd:e.paddingSM},"&-small":{...ZV(e,e.controlHeightSM)},"&-large":{...ZV(e,e.controlHeightLG)}}}},$V=e=>{let{formItemCls:t,iconCls:n,rootPrefixCls:r,antCls:i,labelRequiredMarkColor:a,labelColor:o,labelFontSize:s,labelHeight:c,labelColonMarginInlineStart:l,labelColonMarginInlineEnd:u,itemMarginBottom:d}=e,[f]=ol(i,`grid`);return{[t]:{...Jc(e),marginBottom:d,verticalAlign:`top`,"&-with-help":{transition:`none`},[`&-hidden, &-hidden${i}-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:c,color:o,fontSize:s,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:`top`},[`&${t}-required`]:{"&::before":{display:`inline-block`,marginInlineEnd:e.marginXXS,color:a,fontSize:e.fontSize,fontFamily:`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:l,marginInlineEnd:u},[`&${t}-no-colon::after`]:{content:`"\\a0"`}}},[`${t}-control`]:{[f(`display`)]:`flex`,flexDirection:`column`,flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:`100%`},"&-input":{position:`relative`,display:`flex`,alignItems:`center`,minHeight:e.controlHeight,"&-content":{flex:`auto`,maxWidth:`100%`,[`&:has(> ${i}-switch:only-child, > ${i}-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:Wh,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:`none`,"&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}}}},eH=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:`initial`,textAlign:`start`,"> label":{margin:0,"&::after":{visibility:`hidden`}}}),tH=e=>{let{antCls:t,formItemCls:n}=e;return{[`${n}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:`1 1 0`,minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:`unset`}},[`${t}-col-24${n}-label, ${t}-col-xl-24${n}-label`]:eH(e)}}},nH=e=>{let{componentCls:t,formItemCls:n,inlineItemMarginBottom:r}=e;return{[`${t}-inline`]:{display:`flex`,flexWrap:`wrap`,[`${n}-inline`]:{flex:`none`,marginInlineEnd:e.margin,marginBottom:r,"&-row":{flexWrap:`nowrap`},[`> ${n}-label, > ${n}-control`]:{display:`inline-block`,verticalAlign:`top`},[`> ${n}-label`]:{flex:`none`},[`${t}-text`]:{display:`inline-block`},[`${n}-has-feedback`]:{display:`inline-block`}}}}},rH=e=>{let{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${n} ${n}-label`]:eH(e),[`${t}:not(${t}-inline)`]:{[n]:{flexWrap:`wrap`,[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:`0 0 100%`,maxWidth:`100%`}}}}}},iH=e=>{let{componentCls:t,formItemCls:n,antCls:r}=e;return{[`${n}-vertical`]:{[`${n}-row`]:{flexDirection:`column`},[`${n}-label > label`]:{height:`auto`},[`${n}-control`]:{width:`100%`},[`${n}-label, @@ -369,27 +369,27 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${t}-collapse, ${t}-edit, ${t}-copy - `]:{...nl(e),marginInlineStart:e.marginXXS},...qQ(e),...JQ(e),...YQ(),"&-rtl":{direction:`rtl`}}}},()=>({titleMarginTop:`1.2em`,titleMarginBottom:`0.5em`})),ZQ=e=>{let{prefixCls:t,"aria-label":n,className:r,style:i,direction:a,maxLength:o,autoSize:s=!0,value:c,onSave:l,onCancel:u,onEnd:d,component:f,enterIcon:p=S.createElement(HQ,null)}=e,m=S.useRef(null),h=S.useRef(!1),g=S.useRef(null),[_,v]=S.useState(c);S.useEffect(()=>{v(c)},[c]),S.useEffect(()=>{if(m.current?.resizableTextArea){let{textArea:e}=m.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let y=({target:e})=>{v(e.value.replace(/[\n\r]/g,``))},b=()=>{h.current=!0},x=()=>{h.current=!1},C=({keyCode:e})=>{h.current||(g.current=e)},w=()=>{l(_.trim())},T=({keyCode:e,ctrlKey:t,altKey:n,metaKey:r,shiftKey:i})=>{g.current!==e||h.current||t||n||r||i||(e===om.ENTER?(w(),d?.()):e===om.ESC&&u())},E=()=>{w()},[D,O]=XQ(t),k=J(t,`${t}-edit-content`,{[`${t}-rtl`]:a===`rtl`,[`${t}-${f}`]:!!f},r,D,O);return S.createElement(`div`,{className:k,style:i},S.createElement(mW,{ref:m,maxLength:o,value:_,onChange:y,onKeyDown:C,onKeyUp:T,onCompositionStart:b,onCompositionEnd:x,onBlur:E,"aria-label":n,rows:1,autoSize:s}),p===null?null:Pp(p,{className:`${t}-edit-content-confirm`}))},QQ=(e,t)=>{let n=!1,r=r=>{r.stopPropagation(),r.preventDefault(),r.clipboardData?.clearData(),r.clipboardData?.setData(`text/plain`,e),t&&r.clipboardData?.setData(`text/html`,e),n=!0};try{return document.addEventListener(`copy`,r,{capture:!0}),document.execCommand(`copy`),n}catch{return!1}finally{document.removeEventListener(`copy`,r,{capture:!0})}},$Q=async(e,t)=>{try{return t?await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:`text/html`}),"text/plain":new Blob([e],{type:`text/plain`})})]):await navigator.clipboard.writeText(e),!0}catch{return!1}};async function e$(e,t){if(typeof e!=`string`)return!1;let n=t?.format===`text/html`;return!!(await $Q(e,n)||QQ(e,n))}var t$=({copyConfig:e,children:t})=>{let[n,r]=S.useState(!1),[i,a]=S.useState(!1),o=S.useRef(null),s=()=>{o.current&&clearTimeout(o.current)},c={};return e.format&&(c.format=e.format),S.useEffect(()=>s,[]),{copied:n,copyLoading:i,onClick:In(async n=>{n?.preventDefault(),n?.stopPropagation(),a(!0);try{await e$((typeof e.text==`function`?await e.text():e.text)||CG(t,{skipEmpty:!0}).join(``)||``,c),a(!1),r(!0),s(),o.current=setTimeout(()=>{r(!1)},3e3),e.onCopy?.(n)}catch(e){throw a(!1),e}})}};function n$(e,t){return S.useMemo(()=>{let n=!!e;return[n,{...t,...n&&typeof e==`object`?e:null}]},[e])}var r$=e=>{let t=(0,S.useRef)(void 0);return(0,S.useEffect)(()=>{t.current=e}),t.current},i$=(e,t,n)=>(0,S.useMemo)(()=>e===!0?{title:t??n}:(0,S.isValidElement)(e)?{title:e}:hd(e)?{title:t??n,...e}:{title:e},[e,t,n]),a$=S.forwardRef((e,t)=>{let{prefixCls:n,component:r=`article`,className:i,rootClassName:a,children:o,direction:s,style:c,...l}=e,{getPrefixCls:u,direction:d,className:f,style:p}=li(`typography`),m=s??d,h=u(`typography`,n),[g,_]=XQ(h),v=J(h,f,{[`${h}-rtl`]:m===`rtl`},i,a,g,_),y={...p,...c};return S.createElement(r,{className:v,style:y,ref:t,...l},o)}),o$={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`};function s$(){return s$=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,s$({},e,{ref:t,icon:o$}))),l$=e=>e===!1?[!1,!1]:CG(e);function u$(e,t,n){return e===!0||e===void 0?t:e||n&&t}function d$(e){let t=document.createElement(`em`);e.appendChild(t);let 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}var f$=e=>[`string`,`number`].includes(typeof e),p$=e=>{let{prefixCls:t,copied:n,locale:r,iconOnly:i,tooltips:a,icon:o,tabIndex:s,onCopy:c,loading:l}=e,u=l$(a),d=l$(o),{copied:f,copy:p}=r??{},m=n?f:p,h=u$(u[+!!n],m),g=typeof h==`string`?h:m;return S.createElement(Ow,{title:h},S.createElement(`button`,{type:`button`,className:J(`${t}-copy`,{[`${t}-copy-success`]:n,[`${t}-copy-icon-only`]:i}),onClick:c,"aria-label":g,tabIndex:s},n?u$(d[1],S.createElement(DC,null),!0):u$(d[0],l?S.createElement(xm,null):S.createElement(c$,null),!0)))},m$=S.forwardRef(({style:e,children:t},n)=>{let r=S.useRef(null);return S.useImperativeHandle(n,()=>({isExceed:()=>{let e=r.current;return e.scrollHeight>e.clientHeight},getHeight:()=>r.current.clientHeight})),S.createElement(`span`,{"aria-hidden":!0,ref:r,style:{position:`fixed`,display:`block`,left:0,top:0,pointerEvents:`none`,backgroundColor:`rgba(255, 0, 0, 0.65)`,...e}},t)}),h$=e=>e.reduce((e,t)=>e+(f$(t)?String(t).length:1),0);function g$(e,t){let n=0,r=[];for(let i=0;it){let e=t-n;return r.push(String(a).slice(0,e)),r}r.push(a),n=s}return e}var _$=0,v$=1,y$=2,b$=3,x$=4,S$={display:`-webkit-box`,overflow:`hidden`,WebkitBoxOrient:`vertical`};function C$(e){let{enableMeasure:t,width:n,text:r,children:i,rows:a,expanded:o,miscDeps:s,onEllipsis:c}=e,l=S.useMemo(()=>Cr(r),[r]),u=S.useMemo(()=>h$(l),[r]),d=S.useMemo(()=>i(l,!1),[r]),[f,p]=S.useState(null),m=S.useRef(null),h=S.useRef(null),g=S.useRef(null),_=S.useRef(null),v=S.useRef(null),[y,b]=S.useState(!1),[x,C]=S.useState(_$),[w,T]=S.useState(0),[E,D]=S.useState(null);zn(()=>{C(t&&n&&u?v$:_$)},[n,r,a,t,l]),zn(()=>{if(x===v$)C(y$),D(h.current&&getComputedStyle(h.current).whiteSpace);else if(x===y$){let e=!!g.current?.isExceed();C(e?b$:x$),p(e?[0,u]:null),b(e);let t=g.current?.getHeight()||0,n=a===1?0:_.current?.getHeight()||0,r=v.current?.getHeight()||0;T(Math.max(t,n+r)+1),c(e)}},[x]);let O=f?Math.ceil((f[0]+f[1])/2):0;zn(()=>{let[e,t]=f||[0,0];if(e!==t){let n=(m.current?.getHeight()||0)>w,r=O;t-e===1&&(r=n?e:t),p(n?[e,r]:[r,t])}},[f,O]);let k=S.useMemo(()=>{if(!t)return i(l,!1);if(x!==b$||!f||f[0]!==f[1]){let e=i(l,!1);return[x$,_$].includes(x)?e:S.createElement(`span`,{style:{...S$,WebkitLineClamp:a}},e)}return i(o?l:g$(l,f[0]),y)},[o,x,f,l].concat(Zr(s))),A={width:n,margin:0,padding:0,whiteSpace:E===`nowrap`?`normal`:`inherit`};return S.createElement(S.Fragment,null,k,x===y$&&S.createElement(S.Fragment,null,S.createElement(m$,{style:{...A,...S$,WebkitLineClamp:a},ref:g},d),S.createElement(m$,{style:{...A,...S$,WebkitLineClamp:a-1},ref:_},d),S.createElement(m$,{style:{...A,...S$,WebkitLineClamp:1},ref:v},i([],!0))),x===b$&&f&&f[0]!==f[1]&&S.createElement(m$,{style:{...A,top:400},ref:m},i(g$(l,O),!0)),x===v$&&S.createElement(`span`,{style:{whiteSpace:`inherit`},ref:h}))}var w$=({enableEllipsis:e,isEllipsis:t,open:n,children:r,tooltipProps:i})=>{if(!i?.title||!e)return r;let a=n&&t;return S.createElement(Ow,{open:a,...i},r)};function T$({mark:e,code:t,underline:n,delete:r,strong:i,keyboard:a,italic:o},s){let c=s;function l(e,t){t&&(c=S.createElement(e,{},c))}return l(`strong`,i),l(`u`,n),l(`del`,r),l(`code`,t),l(`mark`,e),l(`kbd`,a),l(`i`,o),c}var E$=`...`,D$=[`delete`,`mark`,`code`,`underline`,`strong`,`keyboard`,`italic`],O$=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,type:a,disabled:o,children:s,ellipsis:c,editable:l,copyable:u,component:d,title:f,onMouseEnter:p,onMouseLeave:m,...h}=e,{getPrefixCls:g,direction:_}=S.useContext(oi),[v]=cd(`Text`),y=S.useRef(null),b=S.useRef(null),x=g(`typography`,n),C=Sr(h,D$),[w,T]=n$(l),[E,D]=Hn(!1,T.editing),{triggerType:O=[`icon`]}=T,k=e=>{e&&T.onStart?.(),D(e)},A=r$(E);zn(()=>{!E&&A&&b.current?.focus()},[E]);let j=e=>{e?.preventDefault(),k(!0)},M=e=>{T.onChange?.(e),k(!1)},N=()=>{T.onCancel?.(),k(!1)},[P,F]=n$(u),{copied:I,copyLoading:L,onClick:R}=t$({copyConfig:F,children:s}),[z,B]=S.useState(!1),[V,H]=S.useState(!1),[U,W]=S.useState(!1),[ee,te]=S.useState(!1),[ne,re]=S.useState(!0),[ie,ae]=n$(c,{expandable:!1,symbol:e=>e?v?.collapse:v?.expand}),[G,oe]=Hn(ae.defaultExpanded||!1,ae.expanded),K=ie&&(!G||ae.expandable===`collapsible`),{rows:se=1}=ae,ce=S.useMemo(()=>K&&(ae.suffix!==void 0||ae.onEllipsis||ae.expandable||w||P),[K,ae,w,P]);zn(()=>{ie&&!ce&&(B(Oy(`webkitLineClamp`)),H(Oy(`textOverflow`)))},[ce,ie]);let[q,le]=S.useState(K),ue=S.useMemo(()=>ce?!1:se===1?V:z,[ce,V,z]);zn(()=>{le(ue&&K)},[ue,K]);let de=i$(ae.tooltip,T.text,s),fe=q&&!!de.title,pe=K&&(q?fe&&ee:U),me=K&&se===1&&q,he=K&&se>1&&q,ge=(e,t)=>{oe(t.expanded),ae.onExpand?.(e,t)},[_e,ve]=S.useState(0),[ye,be]=S.useState(!1),[xe,Se]=S.useState(!1),Ce=({offsetWidth:e})=>{ve(e)},we=e=>{W(e),U!==e&&ae.onEllipsis?.(e)};S.useEffect(()=>{let e=y.current;if(ie&&fe&&e){let t=d$(e);ee!==t&&te(t)}},[ie,fe,s,he,ne,_e]),S.useEffect(()=>{let e=y.current;if(typeof IntersectionObserver>`u`||!e||!fe||!K)return;let t=new IntersectionObserver(()=>{re(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[fe,K]);let Te=S.useMemo(()=>{if(!(!ie||q))return[T.text,s,f,de.title].find(f$)},[ie,q,f,de.title,pe]);if(E)return S.createElement(ZQ,{value:T.text??(typeof s==`string`?s:``),onSave:M,onCancel:N,onEnd:T.onEnd,prefixCls:x,className:r,style:i,direction:_,component:d,maxLength:T.maxLength,autoSize:T.autoSize,enterIcon:T.enterIcon});let Ee=()=>{let{expandable:e,symbol:t}=ae;return e?S.createElement(`button`,{type:`button`,key:`expand`,className:`${x}-${G?`collapse`:`expand`}`,onClick:e=>ge(e,{expanded:!G}),"aria-label":G?v.collapse:v?.expand},typeof t==`function`?t(G):t):null},De=()=>{if(!w)return;let{icon:e,tooltip:t,tabIndex:n}=T,r=Cr(t)[0]||v?.edit,i=typeof r==`string`?r:``;return O.includes(`icon`)?S.createElement(Ow,{key:`edit`,title:t===!1?``:r},S.createElement(`button`,{type:`button`,ref:b,className:`${x}-edit`,onClick:j,"aria-label":i,tabIndex:n},e||S.createElement(zQ,{role:`button`}))):null},Oe=()=>P?S.createElement(p$,{key:`copy`,...F,prefixCls:x,copied:I,locale:v,onCopy:R,loading:L,iconOnly:!fd(s)}):null,ke=e=>{let t=e&&Ee(),n=De(),r=Oe();return!t&&!n&&!r?null:S.createElement(`span`,{key:`operations`,className:`${x}-actions`,onMouseEnter:()=>be(!0),onMouseLeave:()=>be(!1)},t,n,r)},Ae=e=>[e&&!G&&S.createElement(`span`,{"aria-hidden":!0,key:`ellipsis`},E$),ae.suffix,ke(e)];return S.createElement(Wr,{onResize:Ce,disabled:!K},c=>S.createElement(w$,{tooltipProps:de,enableEllipsis:K,isEllipsis:pe,open:xe&&!ye},S.createElement(a$,{onMouseEnter:e=>{Se(!0),p?.(e)},onMouseLeave:e=>{Se(!1),m?.(e)},className:J({[`${x}-${a}`]:a,[`${x}-disabled`]:o,[`${x}-ellipsis`]:ie,[`${x}-ellipsis-single-line`]:me,[`${x}-ellipsis-multiple-line`]:he,[`${x}-link`]:d===`a`},r),prefixCls:n,style:{...i,WebkitLineClamp:he?se:void 0},component:d,ref:$n(c,y,t),direction:_,onClick:O.includes(`text`)?j:void 0,"aria-label":Te?.toString(),title:f,...C},S.createElement(C$,{enableMeasure:K&&!q,text:s,rows:se,width:_e,onEllipsis:we,expanded:G,miscDeps:[I,G,L,w,P,v].concat(Zr(D$.map(t=>e[t])))},(t,n)=>T$(e,S.createElement(S.Fragment,null,t.length>0&&n&&!G&&Te?S.createElement(`span`,{key:`show-content`,"aria-hidden":!0},t):t,Ae(n)))))))}),k$=S.forwardRef((e,t)=>{let{ellipsis:n,rel:r,children:i,navigate:a,...o}=e,s={...o,rel:r===void 0&&o.target===`_blank`?`noopener noreferrer`:r};return S.createElement(O$,{...s,ref:t,ellipsis:!!n,component:`a`},i)}),A$=S.forwardRef((e,t)=>{let{children:n,...r}=e;return S.createElement(O$,{ref:t,...r,component:`div`},n)}),j$=S.forwardRef((e,t)=>{let{ellipsis:n,children:r,...i}=e,a=S.useMemo(()=>hd(n)?Sr(n,[`expandable`,`rows`]):n,[n]);return S.createElement(O$,{ref:t,...i,ellipsis:a,component:`span`},r)}),M$=[1,2,3,4,5],N$=S.forwardRef((e,t)=>{let{level:n=1,children:r,...i}=e,a=M$.includes(n)?`h${n}`:`h1`;return S.createElement(O$,{ref:t,...i,component:a},r)}),Z=a$;Z.Text=j$,Z.Link=k$,Z.Title=N$,Z.Paragraph=A$;var P$=((e,t)=>{if(e&&t){let n=Array.isArray(t)?t:t.split(`,`),r=e.name||``,i=e.type||``,a=i.replace(/\/.*$/,``);return n.some(e=>{let t=e.trim();if(/^\*(\/\*)?$/.test(e))return!0;if(t.charAt(0)===`.`){let e=r.toLowerCase(),n=t.toLowerCase(),i=[n];return(n===`.jpg`||n===`.jpeg`)&&(i=[`.jpg`,`.jpeg`]),i.some(t=>e.endsWith(t))}return/\/\*$/.test(t)?a===t.replace(/\/.*$/,``):i===t?!0:/^\w+$/.test(t)?(br(!1,`Upload takes an invalidate 'accept' type '${t}'.Skip for check.`),!0):!1})}return!0});function F$(e,t){let n=`cannot ${e.method} ${e.action} ${t.status}'`,r=Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}function I$(e){let t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function L$(e){let t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});let n=new FormData;e.data&&Object.keys(e.data).forEach(t=>{let r=e.data[t];if(Array.isArray(r)){r.forEach(e=>{n.append(`${t}[]`,e)});return}n.append(t,r)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(F$(e,t),I$(t)):e.onSuccess(I$(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&`withCredentials`in t&&(t.withCredentials=!0);let r=e.headers||{};return r[`X-Requested-With`]!==null&&t.setRequestHeader(`X-Requested-With`,`XMLHttpRequest`),Object.keys(r).forEach(e=>{r[e]!==null&&t.setRequestHeader(e,r[e])}),t.send(n),{abort(){t.abort()}}}var R$=async(e,t)=>{let n=[],r=[];e.forEach(e=>r.push(e.webkitGetAsEntry()));async function i(e){let t=e.createReader(),n=[];for(;;){let e=await new Promise(e=>{t.readEntries(e,()=>e([]))}),r=e.length;if(!r)break;for(let t=0;t{e.file(r=>{t(r)?(e.fullPath&&!r.webkitRelativePath&&(Object.defineProperties(r,{webkitRelativePath:{writable:!0}}),r.webkitRelativePath=e.fullPath.replace(/^\//,``),Object.defineProperties(r,{webkitRelativePath:{writable:!1}})),n(r)):n(null)})})}let o=async(e,t)=>{if(e){if(e.path=t||``,e.isFile){let t=await a(e);t&&n.push(t)}else if(e.isDirectory){let t=await i(e);r.push(...t)}}},s=0;for(;s{let{accept:n,directory:r}=this.props,i,a;if(typeof n==`string`)a=n;else{let{filter:e,format:t}=n||{};a=t,i=e===`native`?()=>!0:e}return(i||(r||t?e=>P$(e,a):()=>!0))(e)};onChange=e=>{let{files:t}=e.target,n=[...t].filter(e=>this.filterFile(e));this.uploadFiles(n),this.reset()};onClick=e=>{let t=this.fileInput;if(!t)return;let n=e.target,{onClick:r}=this.props;n&&n.tagName===`BUTTON`&&(t.parentNode.focus(),n.blur()),t.click(),r&&r(e)};onKeyDown=e=>{e.key===`Enter`&&this.onClick(e)};onDataTransferFiles=async(e,t)=>{let{multiple:n,directory:r}=this.props,i=[...e.items||[]],a=[...e.files||[]];if((a.length>0||i.some(e=>e.kind===`file`))&&t?.(),r)a=await R$(Array.prototype.slice.call(i),this.filterFile),this.uploadFiles(a);else{let e=[...a].filter(e=>this.filterFile(e,!0));n===!1&&(e=a.slice(0,1)),this.uploadFiles(e)}};onFilePaste=async e=>{let{pastable:t}=this.props;if(t&&e.type===`paste`){let t=e.clipboardData;return this.onDataTransferFiles(t,()=>{e.preventDefault()})}};onFileDragOver=e=>{e.preventDefault()};onFileDrop=async e=>{if(e.preventDefault(),e.type===`drop`){let t=e.dataTransfer;return this.onDataTransferFiles(t)}};componentDidMount(){this._isMounted=!0;let{pastable:e}=this.props;e&&document.addEventListener(`paste`,this.onFilePaste)}componentWillUnmount(){this._isMounted=!1,this.abort(),document.removeEventListener(`paste`,this.onFilePaste)}componentDidUpdate(e){let{pastable:t}=this.props;t&&!e.pastable?document.addEventListener(`paste`,this.onFilePaste):!t&&e.pastable&&document.removeEventListener(`paste`,this.onFilePaste)}uploadFiles=e=>{let t=[...e],n=t.map(e=>(e.uid=V$(),this.processFile(e,t)));Promise.all(n).then(e=>{let{onBatchStart:t}=this.props;t?.(e.map(({origin:e,parsedFile:t})=>({file:e,parsedFile:t}))),e.filter(e=>e.parsedFile!==null).forEach(e=>{this.post(e)})})};processFile=async(e,t)=>{let{beforeUpload:n}=this.props,r=e;if(n){try{r=await n(e,t)}catch{r=!1}if(r===!1)return{origin:e,parsedFile:null,action:null,data:null}}let{action:i}=this.props,a;a=typeof i==`function`?await i(e):i;let{data:o}=this.props,s;s=typeof o==`function`?await o(e):o;let c=(typeof r==`object`||typeof r==`string`)&&r?r:e,l;l=c instanceof File?c:new File([c],e.name,{type:e.type});let u=l;return u.uid=e.uid,{origin:e,data:s,parsedFile:u,action:a}};post({data:e,origin:t,action:n,parsedFile:r}){if(!this._isMounted)return;let{onStart:i,customRequest:a,name:o,headers:s,withCredentials:c,method:l}=this.props,{uid:u}=t,d=a||L$,f={action:n,filename:o,data:e,file:r,headers:s,withCredentials:c,method:l||`post`,onProgress:e=>{let{onProgress:t}=this.props;t?.(e,r)},onSuccess:(e,t)=>{let{onSuccess:n}=this.props;n?.(e,r,t),delete this.reqs[u]},onError:(e,t)=>{let{onError:n}=this.props;n?.(e,t,r),delete this.reqs[u]}};i(t),this.reqs[u]=d(f,{defaultRequest:L$})}reset(){this.setState({uid:V$()})}abort(e){let{reqs:t}=this;if(e){let n=e.uid?e.uid:e;t[n]&&t[n].abort&&t[n].abort(),delete t[n]}else Object.keys(t).forEach(e=>{t[e]&&t[e].abort&&t[e].abort(),delete t[e]})}saveFileInput=e=>{this.fileInput=e};render(){let{component:e,prefixCls:t,className:n,classNames:r={},disabled:i,id:a,name:o,style:s,styles:c={},multiple:l,accept:u,capture:d,children:f,directory:p,openFileDialogOnClick:m,onMouseEnter:h,onMouseLeave:g,hasControlInside:_,...v}=this.props,y=typeof u==`string`?u:u?.format,b=J(t,{[`${t}-disabled`]:i,[n]:n}),x=p?{directory:`directory`,webkitdirectory:`webkitdirectory`}:{},C=i?{}:{onClick:m?this.onClick:()=>{},onKeyDown:m?this.onKeyDown:()=>{},onMouseEnter:h,onMouseLeave:g,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:_?void 0:`0`};return S.createElement(e,H$({},C,{className:b,role:_?void 0:`button`,style:s}),S.createElement(`input`,H$({},Vu(v,{aria:!0,data:!0}),{id:a,name:o,disabled:i,type:`file`,ref:this.saveFileInput,onClick:e=>e.stopPropagation(),key:this.state.uid,style:{display:`none`,...c.input},className:r.input,accept:y},x,{multiple:l,onChange:this.onChange},d==null?{}:{capture:d})),f)}};function W$(){return W$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.uploader=e};render(){return S.createElement(U$,W$({},this.props,{ref:this.saveUploader}))}},q$=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:`relative`,width:`100%`,height:`100%`,textAlign:`center`,background:e.colorFillAlter,border:`${Y(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:e.padding},[`${t}-btn`]:{display:`table`,width:`100%`,height:`100%`,outline:`none`,borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:`${Y(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`}},[`${t}-drag-container`]:{display:`table-cell`,verticalAlign:`middle`},[` + `]:{...nl(e),marginInlineStart:e.marginXXS},...qQ(e),...JQ(e),...YQ(),"&-rtl":{direction:`rtl`}}}},()=>({titleMarginTop:`1.2em`,titleMarginBottom:`0.5em`})),ZQ=e=>{let{prefixCls:t,"aria-label":n,className:r,style:i,direction:a,maxLength:o,autoSize:s=!0,value:c,onSave:l,onCancel:u,onEnd:d,component:f,enterIcon:p=S.createElement(HQ,null)}=e,m=S.useRef(null),h=S.useRef(!1),g=S.useRef(null),[_,v]=S.useState(c);S.useEffect(()=>{v(c)},[c]),S.useEffect(()=>{if(m.current?.resizableTextArea){let{textArea:e}=m.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let y=({target:e})=>{v(e.value.replace(/[\n\r]/g,``))},b=()=>{h.current=!0},x=()=>{h.current=!1},C=({keyCode:e})=>{h.current||(g.current=e)},w=()=>{l(_.trim())},T=({keyCode:e,ctrlKey:t,altKey:n,metaKey:r,shiftKey:i})=>{g.current!==e||h.current||t||n||r||i||(e===om.ENTER?(w(),d?.()):e===om.ESC&&u())},E=()=>{w()},[D,O]=XQ(t),k=J(t,`${t}-edit-content`,{[`${t}-rtl`]:a===`rtl`,[`${t}-${f}`]:!!f},r,D,O);return S.createElement(`div`,{className:k,style:i},S.createElement(mW,{ref:m,maxLength:o,value:_,onChange:y,onKeyDown:C,onKeyUp:T,onCompositionStart:b,onCompositionEnd:x,onBlur:E,"aria-label":n,rows:1,autoSize:s}),p===null?null:Pp(p,{className:`${t}-edit-content-confirm`}))},QQ=(e,t)=>{let n=!1,r=r=>{r.stopPropagation(),r.preventDefault(),r.clipboardData?.clearData(),r.clipboardData?.setData(`text/plain`,e),t&&r.clipboardData?.setData(`text/html`,e),n=!0};try{return document.addEventListener(`copy`,r,{capture:!0}),document.execCommand(`copy`),n}catch{return!1}finally{document.removeEventListener(`copy`,r,{capture:!0})}},$Q=async(e,t)=>{try{return t?await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:`text/html`}),"text/plain":new Blob([e],{type:`text/plain`})})]):await navigator.clipboard.writeText(e),!0}catch{return!1}};async function e$(e,t){if(typeof e!=`string`)return!1;let n=t?.format===`text/html`;return!!(await $Q(e,n)||QQ(e,n))}var t$=({copyConfig:e,children:t})=>{let[n,r]=S.useState(!1),[i,a]=S.useState(!1),o=S.useRef(null),s=()=>{o.current&&clearTimeout(o.current)},c={};return e.format&&(c.format=e.format),S.useEffect(()=>s,[]),{copied:n,copyLoading:i,onClick:In(async n=>{n?.preventDefault(),n?.stopPropagation(),a(!0);try{await e$((typeof e.text==`function`?await e.text():e.text)||CG(t,{skipEmpty:!0}).join(``)||``,c),a(!1),r(!0),s(),o.current=setTimeout(()=>{r(!1)},3e3),e.onCopy?.(n)}catch(e){throw a(!1),e}})}};function n$(e,t){return S.useMemo(()=>{let n=!!e;return[n,{...t,...n&&typeof e==`object`?e:null}]},[e])}var r$=e=>{let t=(0,S.useRef)(void 0);return(0,S.useEffect)(()=>{t.current=e}),t.current},i$=(e,t,n)=>(0,S.useMemo)(()=>e===!0?{title:t??n}:(0,S.isValidElement)(e)?{title:e}:hd(e)?{title:t??n,...e}:{title:e},[e,t,n]),a$=S.forwardRef((e,t)=>{let{prefixCls:n,component:r=`article`,className:i,rootClassName:a,children:o,direction:s,style:c,...l}=e,{getPrefixCls:u,direction:d,className:f,style:p}=li(`typography`),m=s??d,h=u(`typography`,n),[g,_]=XQ(h),v=J(h,f,{[`${h}-rtl`]:m===`rtl`},i,a,g,_),y={...p,...c};return S.createElement(r,{className:v,style:y,ref:t,...l},o)}),o$={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`};function s$(){return s$=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,s$({},e,{ref:t,icon:o$}))),l$=e=>e===!1?[!1,!1]:CG(e);function u$(e,t,n){return e===!0||e===void 0?t:e||n&&t}function d$(e){let t=document.createElement(`em`);e.appendChild(t);let 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}var f$=e=>[`string`,`number`].includes(typeof e),p$=e=>{let{prefixCls:t,copied:n,locale:r,iconOnly:i,tooltips:a,icon:o,tabIndex:s,onCopy:c,loading:l}=e,u=l$(a),d=l$(o),{copied:f,copy:p}=r??{},m=n?f:p,h=u$(u[+!!n],m),g=typeof h==`string`?h:m;return S.createElement(Ow,{title:h},S.createElement(`button`,{type:`button`,className:J(`${t}-copy`,{[`${t}-copy-success`]:n,[`${t}-copy-icon-only`]:i}),onClick:c,"aria-label":g,tabIndex:s},n?u$(d[1],S.createElement(DC,null),!0):u$(d[0],l?S.createElement(xm,null):S.createElement(c$,null),!0)))},m$=S.forwardRef(({style:e,children:t},n)=>{let r=S.useRef(null);return S.useImperativeHandle(n,()=>({isExceed:()=>{let e=r.current;return e.scrollHeight>e.clientHeight},getHeight:()=>r.current.clientHeight})),S.createElement(`span`,{"aria-hidden":!0,ref:r,style:{position:`fixed`,display:`block`,left:0,top:0,pointerEvents:`none`,backgroundColor:`rgba(255, 0, 0, 0.65)`,...e}},t)}),h$=e=>e.reduce((e,t)=>e+(f$(t)?String(t).length:1),0);function g$(e,t){let n=0,r=[];for(let i=0;it){let e=t-n;return r.push(String(a).slice(0,e)),r}r.push(a),n=s}return e}var _$=0,v$=1,y$=2,b$=3,x$=4,S$={display:`-webkit-box`,overflow:`hidden`,WebkitBoxOrient:`vertical`};function C$(e){let{enableMeasure:t,width:n,text:r,children:i,rows:a,expanded:o,miscDeps:s,onEllipsis:c}=e,l=S.useMemo(()=>Cr(r),[r]),u=S.useMemo(()=>h$(l),[r]),d=S.useMemo(()=>i(l,!1),[r]),[f,p]=S.useState(null),m=S.useRef(null),h=S.useRef(null),g=S.useRef(null),_=S.useRef(null),v=S.useRef(null),[y,b]=S.useState(!1),[x,C]=S.useState(_$),[w,T]=S.useState(0),[E,D]=S.useState(null);zn(()=>{C(t&&n&&u?v$:_$)},[n,r,a,t,l]),zn(()=>{if(x===v$)C(y$),D(h.current&&getComputedStyle(h.current).whiteSpace);else if(x===y$){let e=!!g.current?.isExceed();C(e?b$:x$),p(e?[0,u]:null),b(e);let t=g.current?.getHeight()||0,n=a===1?0:_.current?.getHeight()||0,r=v.current?.getHeight()||0;T(Math.max(t,n+r)+1),c(e)}},[x]);let O=f?Math.ceil((f[0]+f[1])/2):0;zn(()=>{let[e,t]=f||[0,0];if(e!==t){let n=(m.current?.getHeight()||0)>w,r=O;t-e===1&&(r=n?e:t),p(n?[e,r]:[r,t])}},[f,O]);let k=S.useMemo(()=>{if(!t)return i(l,!1);if(x!==b$||!f||f[0]!==f[1]){let e=i(l,!1);return[x$,_$].includes(x)?e:S.createElement(`span`,{style:{...S$,WebkitLineClamp:a}},e)}return i(o?l:g$(l,f[0]),y)},[o,x,f,l].concat(Zr(s))),A={width:n,margin:0,padding:0,whiteSpace:E===`nowrap`?`normal`:`inherit`};return S.createElement(S.Fragment,null,k,x===y$&&S.createElement(S.Fragment,null,S.createElement(m$,{style:{...A,...S$,WebkitLineClamp:a},ref:g},d),S.createElement(m$,{style:{...A,...S$,WebkitLineClamp:a-1},ref:_},d),S.createElement(m$,{style:{...A,...S$,WebkitLineClamp:1},ref:v},i([],!0))),x===b$&&f&&f[0]!==f[1]&&S.createElement(m$,{style:{...A,top:400},ref:m},i(g$(l,O),!0)),x===v$&&S.createElement(`span`,{style:{whiteSpace:`inherit`},ref:h}))}var w$=({enableEllipsis:e,isEllipsis:t,open:n,children:r,tooltipProps:i})=>{if(!i?.title||!e)return r;let a=n&&t;return S.createElement(Ow,{open:a,...i},r)};function T$({mark:e,code:t,underline:n,delete:r,strong:i,keyboard:a,italic:o},s){let c=s;function l(e,t){t&&(c=S.createElement(e,{},c))}return l(`strong`,i),l(`u`,n),l(`del`,r),l(`code`,t),l(`mark`,e),l(`kbd`,a),l(`i`,o),c}var E$=`...`,D$=[`delete`,`mark`,`code`,`underline`,`strong`,`keyboard`,`italic`],O$=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,type:a,disabled:o,children:s,ellipsis:c,editable:l,copyable:u,component:d,title:f,onMouseEnter:p,onMouseLeave:m,...h}=e,{getPrefixCls:g,direction:_}=S.useContext(oi),[v]=cd(`Text`),y=S.useRef(null),b=S.useRef(null),x=g(`typography`,n),C=Sr(h,D$),[w,T]=n$(l),[E,D]=Hn(!1,T.editing),{triggerType:O=[`icon`]}=T,k=e=>{e&&T.onStart?.(),D(e)},A=r$(E);zn(()=>{!E&&A&&b.current?.focus()},[E]);let j=e=>{e?.preventDefault(),k(!0)},M=e=>{T.onChange?.(e),k(!1)},N=()=>{T.onCancel?.(),k(!1)},[P,F]=n$(u),{copied:I,copyLoading:L,onClick:R}=t$({copyConfig:F,children:s}),[z,B]=S.useState(!1),[V,H]=S.useState(!1),[U,W]=S.useState(!1),[ee,te]=S.useState(!1),[ne,re]=S.useState(!0),[ie,ae]=n$(c,{expandable:!1,symbol:e=>e?v?.collapse:v?.expand}),[G,oe]=Hn(ae.defaultExpanded||!1,ae.expanded),K=ie&&(!G||ae.expandable===`collapsible`),{rows:se=1}=ae,ce=S.useMemo(()=>K&&(ae.suffix!==void 0||ae.onEllipsis||ae.expandable||w||P),[K,ae,w,P]);zn(()=>{ie&&!ce&&(B(Oy(`webkitLineClamp`)),H(Oy(`textOverflow`)))},[ce,ie]);let[q,le]=S.useState(K),ue=S.useMemo(()=>ce?!1:se===1?V:z,[ce,V,z]);zn(()=>{le(ue&&K)},[ue,K]);let de=i$(ae.tooltip,T.text,s),fe=q&&!!de.title,pe=K&&(q?fe&&ee:U),me=K&&se===1&&q,he=K&&se>1&&q,ge=(e,t)=>{oe(t.expanded),ae.onExpand?.(e,t)},[_e,ve]=S.useState(0),[ye,be]=S.useState(!1),[xe,Se]=S.useState(!1),Ce=({offsetWidth:e})=>{ve(e)},we=e=>{W(e),U!==e&&ae.onEllipsis?.(e)};S.useEffect(()=>{let e=y.current;if(ie&&fe&&e){let t=d$(e);ee!==t&&te(t)}},[ie,fe,s,he,ne,_e]),S.useEffect(()=>{let e=y.current;if(typeof IntersectionObserver>`u`||!e||!fe||!K)return;let t=new IntersectionObserver(()=>{re(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[fe,K]);let Te=S.useMemo(()=>{if(!(!ie||q))return[T.text,s,f,de.title].find(f$)},[ie,q,f,de.title,pe]);if(E)return S.createElement(ZQ,{value:T.text??(typeof s==`string`?s:``),onSave:M,onCancel:N,onEnd:T.onEnd,prefixCls:x,className:r,style:i,direction:_,component:d,maxLength:T.maxLength,autoSize:T.autoSize,enterIcon:T.enterIcon});let Ee=()=>{let{expandable:e,symbol:t}=ae;return e?S.createElement(`button`,{type:`button`,key:`expand`,className:`${x}-${G?`collapse`:`expand`}`,onClick:e=>ge(e,{expanded:!G}),"aria-label":G?v.collapse:v?.expand},typeof t==`function`?t(G):t):null},De=()=>{if(!w)return;let{icon:e,tooltip:t,tabIndex:n}=T,r=Cr(t)[0]||v?.edit,i=typeof r==`string`?r:``;return O.includes(`icon`)?S.createElement(Ow,{key:`edit`,title:t===!1?``:r},S.createElement(`button`,{type:`button`,ref:b,className:`${x}-edit`,onClick:j,"aria-label":i,tabIndex:n},e||S.createElement(zQ,{role:`button`}))):null},Oe=()=>P?S.createElement(p$,{key:`copy`,...F,prefixCls:x,copied:I,locale:v,onCopy:R,loading:L,iconOnly:!fd(s)}):null,ke=e=>{let t=e&&Ee(),n=De(),r=Oe();return!t&&!n&&!r?null:S.createElement(`span`,{key:`operations`,className:`${x}-actions`,onMouseEnter:()=>be(!0),onMouseLeave:()=>be(!1)},t,n,r)},Ae=e=>[e&&!G&&S.createElement(`span`,{"aria-hidden":!0,key:`ellipsis`},E$),ae.suffix,ke(e)];return S.createElement(Wr,{onResize:Ce,disabled:!K},c=>S.createElement(w$,{tooltipProps:de,enableEllipsis:K,isEllipsis:pe,open:xe&&!ye},S.createElement(a$,{onMouseEnter:e=>{Se(!0),p?.(e)},onMouseLeave:e=>{Se(!1),m?.(e)},className:J({[`${x}-${a}`]:a,[`${x}-disabled`]:o,[`${x}-ellipsis`]:ie,[`${x}-ellipsis-single-line`]:me,[`${x}-ellipsis-multiple-line`]:he,[`${x}-link`]:d===`a`},r),prefixCls:n,style:{...i,WebkitLineClamp:he?se:void 0},component:d,ref:$n(c,y,t),direction:_,onClick:O.includes(`text`)?j:void 0,"aria-label":Te?.toString(),title:f,...C},S.createElement(C$,{enableMeasure:K&&!q,text:s,rows:se,width:_e,onEllipsis:we,expanded:G,miscDeps:[I,G,L,w,P,v].concat(Zr(D$.map(t=>e[t])))},(t,n)=>T$(e,S.createElement(S.Fragment,null,t.length>0&&n&&!G&&Te?S.createElement(`span`,{key:`show-content`,"aria-hidden":!0},t):t,Ae(n)))))))}),k$=S.forwardRef((e,t)=>{let{ellipsis:n,rel:r,children:i,navigate:a,...o}=e,s={...o,rel:r===void 0&&o.target===`_blank`?`noopener noreferrer`:r};return S.createElement(O$,{...s,ref:t,ellipsis:!!n,component:`a`},i)}),A$=S.forwardRef((e,t)=>{let{children:n,...r}=e;return S.createElement(O$,{ref:t,...r,component:`div`},n)}),j$=S.forwardRef((e,t)=>{let{ellipsis:n,children:r,...i}=e,a=S.useMemo(()=>hd(n)?Sr(n,[`expandable`,`rows`]):n,[n]);return S.createElement(O$,{ref:t,...i,ellipsis:a,component:`span`},r)}),M$=[1,2,3,4,5],N$=S.forwardRef((e,t)=>{let{level:n=1,children:r,...i}=e,a=M$.includes(n)?`h${n}`:`h1`;return S.createElement(O$,{ref:t,...i,component:a},r)}),Z=a$;Z.Text=j$,Z.Link=k$,Z.Title=N$,Z.Paragraph=A$;var P$=((e,t)=>{if(e&&t){let n=Array.isArray(t)?t:t.split(`,`),r=e.name||``,i=e.type||``,a=i.replace(/\/.*$/,``);return n.some(e=>{let t=e.trim();if(/^\*(\/\*)?$/.test(e))return!0;if(t.charAt(0)===`.`){let e=r.toLowerCase(),n=t.toLowerCase(),i=[n];return(n===`.jpg`||n===`.jpeg`)&&(i=[`.jpg`,`.jpeg`]),i.some(t=>e.endsWith(t))}return/\/\*$/.test(t)?a===t.replace(/\/.*$/,``):i===t?!0:/^\w+$/.test(t)?(br(!1,`Upload takes an invalidate 'accept' type '${t}'.Skip for check.`),!0):!1})}return!0});function F$(e,t){let n=`cannot ${e.method} ${e.action} ${t.status}'`,r=Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}function I$(e){let t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function L$(e){let t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});let n=new FormData;e.data&&Object.keys(e.data).forEach(t=>{let r=e.data[t];if(Array.isArray(r)){r.forEach(e=>{n.append(`${t}[]`,e)});return}n.append(t,r)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(F$(e,t),I$(t)):e.onSuccess(I$(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&`withCredentials`in t&&(t.withCredentials=!0);let r=e.headers||{};return r[`X-Requested-With`]!==null&&t.setRequestHeader(`X-Requested-With`,`XMLHttpRequest`),Object.keys(r).forEach(e=>{r[e]!==null&&t.setRequestHeader(e,r[e])}),t.send(n),{abort(){t.abort()}}}var R$=async(e,t)=>{let n=[],r=[];e.forEach(e=>r.push(e.webkitGetAsEntry()));async function i(e){let t=e.createReader(),n=[];for(;;){let e=await new Promise(e=>{t.readEntries(e,()=>e([]))}),r=e.length;if(!r)break;for(let t=0;t{e.file(r=>{t(r)?(e.fullPath&&!r.webkitRelativePath&&(Object.defineProperties(r,{webkitRelativePath:{writable:!0}}),r.webkitRelativePath=e.fullPath.replace(/^\//,``),Object.defineProperties(r,{webkitRelativePath:{writable:!1}})),n(r)):n(null)})})}let o=async(e,t)=>{if(e){if(e.path=t||``,e.isFile){let t=await a(e);t&&n.push(t)}else if(e.isDirectory){let t=await i(e);r.push(...t)}}},s=0;for(;s{let{accept:n,directory:r}=this.props,i,a;if(typeof n==`string`)a=n;else{let{filter:e,format:t}=n||{};a=t,i=e===`native`?()=>!0:e}return(i||(r||t?e=>P$(e,a):()=>!0))(e)};onChange=e=>{let{files:t}=e.target,n=[...t].filter(e=>this.filterFile(e));this.uploadFiles(n),this.reset()};onClick=e=>{let t=this.fileInput;if(!t)return;let n=e.target,{onClick:r}=this.props;n&&n.tagName===`BUTTON`&&(t.parentNode.focus(),n.blur()),t.click(),r&&r(e)};onKeyDown=e=>{e.key===`Enter`&&this.onClick(e)};onDataTransferFiles=async(e,t)=>{let{multiple:n,directory:r}=this.props,i=[...e.items||[]],a=[...e.files||[]];if((a.length>0||i.some(e=>e.kind===`file`))&&t?.(),r)a=await R$(Array.prototype.slice.call(i),this.filterFile),this.uploadFiles(a);else{let e=[...a].filter(e=>this.filterFile(e,!0));n===!1&&(e=a.slice(0,1)),this.uploadFiles(e)}};onFilePaste=async e=>{let{pastable:t}=this.props;if(t&&e.type===`paste`){let t=e.clipboardData;return this.onDataTransferFiles(t,()=>{e.preventDefault()})}};onFileDragOver=e=>{e.preventDefault()};onFileDrop=async e=>{if(e.preventDefault(),e.type===`drop`){let t=e.dataTransfer;return this.onDataTransferFiles(t)}};componentDidMount(){this._isMounted=!0;let{pastable:e}=this.props;e&&document.addEventListener(`paste`,this.onFilePaste)}componentWillUnmount(){this._isMounted=!1,this.abort(),document.removeEventListener(`paste`,this.onFilePaste)}componentDidUpdate(e){let{pastable:t}=this.props;t&&!e.pastable?document.addEventListener(`paste`,this.onFilePaste):!t&&e.pastable&&document.removeEventListener(`paste`,this.onFilePaste)}uploadFiles=e=>{let t=[...e],n=t.map(e=>(e.uid=B$(),this.processFile(e,t)));Promise.all(n).then(e=>{let{onBatchStart:t}=this.props;t?.(e.map(({origin:e,parsedFile:t})=>({file:e,parsedFile:t}))),e.filter(e=>e.parsedFile!==null).forEach(e=>{this.post(e)})})};processFile=async(e,t)=>{let{beforeUpload:n}=this.props,r=e;if(n){try{r=await n(e,t)}catch{r=!1}if(r===!1)return{origin:e,parsedFile:null,action:null,data:null}}let{action:i}=this.props,a;a=typeof i==`function`?await i(e):i;let{data:o}=this.props,s;s=typeof o==`function`?await o(e):o;let c=(typeof r==`object`||typeof r==`string`)&&r?r:e,l;l=c instanceof File?c:new File([c],e.name,{type:e.type});let u=l;return u.uid=e.uid,{origin:e,data:s,parsedFile:u,action:a}};post({data:e,origin:t,action:n,parsedFile:r}){if(!this._isMounted)return;let{onStart:i,customRequest:a,name:o,headers:s,withCredentials:c,method:l}=this.props,{uid:u}=t,d=a||L$,f={action:n,filename:o,data:e,file:r,headers:s,withCredentials:c,method:l||`post`,onProgress:e=>{let{onProgress:t}=this.props;t?.(e,r)},onSuccess:(e,t)=>{let{onSuccess:n}=this.props;n?.(e,r,t),delete this.reqs[u]},onError:(e,t)=>{let{onError:n}=this.props;n?.(e,t,r),delete this.reqs[u]}};i(t),this.reqs[u]=d(f,{defaultRequest:L$})}reset(){this.setState({uid:B$()})}abort(e){let{reqs:t}=this;if(e){let n=e.uid?e.uid:e;t[n]&&t[n].abort&&t[n].abort(),delete t[n]}else Object.keys(t).forEach(e=>{t[e]&&t[e].abort&&t[e].abort(),delete t[e]})}saveFileInput=e=>{this.fileInput=e};render(){let{component:e,prefixCls:t,className:n,classNames:r={},disabled:i,id:a,name:o,style:s,styles:c={},multiple:l,accept:u,capture:d,children:f,directory:p,openFileDialogOnClick:m,onMouseEnter:h,onMouseLeave:g,hasControlInside:_,...v}=this.props,y=typeof u==`string`?u:u?.format,b=J(t,{[`${t}-disabled`]:i,[n]:n}),x=p?{directory:`directory`,webkitdirectory:`webkitdirectory`}:{},C=i?{}:{onClick:m?this.onClick:()=>{},onKeyDown:m?this.onKeyDown:()=>{},onMouseEnter:h,onMouseLeave:g,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:_?void 0:`0`};return S.createElement(e,V$({},C,{className:b,role:_?void 0:`button`,style:s}),S.createElement(`input`,V$({},Vu(v,{aria:!0,data:!0}),{id:a,name:o,disabled:i,type:`file`,ref:this.saveFileInput,onClick:e=>e.stopPropagation(),key:this.state.uid,style:{display:`none`,...c.input},className:r.input,accept:y},x,{multiple:l,onChange:this.onChange},d==null?{}:{capture:d})),f)}};function U$(){return U$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.uploader=e};render(){return S.createElement(H$,U$({},this.props,{ref:this.saveUploader}))}},K$=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:`relative`,width:`100%`,height:`100%`,textAlign:`center`,background:e.colorFillAlter,border:`${Y(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:e.padding},[`${t}-btn`]:{display:`table`,width:`100%`,height:`100%`,outline:`none`,borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:`${Y(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`}},[`${t}-drag-container`]:{display:`table-cell`,verticalAlign:`middle`},[` &:not(${t}-disabled):hover, &-hover:not(${t}-disabled) `]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[n]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${Y(e.marginXXS)}`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{[`p${t}-drag-icon ${n}, p${t}-text, p${t}-hint - `]:{color:e.colorTextDisabled}}}}}},J$=e=>{let{componentCls:t,iconCls:n,fontSize:r,lineHeight:i,motionDurationSlow:a,calc:o}=e,s=`${t}-list-item`,c=`${s}-actions`,l=`${s}-action`;return{[`${t}-wrapper`]:{[`${t}-list`]:{...Xc(),lineHeight:e.lineHeight,[s]:{position:`relative`,height:o(e.lineHeight).mul(r).equal(),marginTop:e.marginXS,fontSize:r,display:`flex`,alignItems:`center`,transition:`background-color ${a}`,borderRadius:e.borderRadiusSM,"&:hover":{backgroundColor:e.controlItemBgHover},[`${s}-name`]:{...qc,padding:`0 ${Y(e.paddingXS)}`,lineHeight:i,flex:`auto`,transition:`all ${a}`},[c]:{whiteSpace:`nowrap`,[l]:{opacity:0},"@media (hover: none), (pointer: coarse)":{[l]:{opacity:1}},[n]:{color:e.actionsColor,transition:`all ${a}`},[` + `]:{color:e.colorTextDisabled}}}}}},q$=e=>{let{componentCls:t,iconCls:n,fontSize:r,lineHeight:i,motionDurationSlow:a,calc:o}=e,s=`${t}-list-item`,c=`${s}-actions`,l=`${s}-action`;return{[`${t}-wrapper`]:{[`${t}-list`]:{...Xc(),lineHeight:e.lineHeight,[s]:{position:`relative`,height:o(e.lineHeight).mul(r).equal(),marginTop:e.marginXS,fontSize:r,display:`flex`,alignItems:`center`,transition:`background-color ${a}`,borderRadius:e.borderRadiusSM,"&:hover":{backgroundColor:e.controlItemBgHover},[`${s}-name`]:{...qc,padding:`0 ${Y(e.paddingXS)}`,lineHeight:i,flex:`auto`,transition:`all ${a}`},[c]:{whiteSpace:`nowrap`,[l]:{opacity:0},"@media (hover: none), (pointer: coarse)":{[l]:{opacity:1}},[n]:{color:e.actionsColor,transition:`all ${a}`},[` ${l}:focus-visible, &.picture ${l} - `]:{opacity:1}},[`${t}-icon ${n}`]:{color:e.colorIcon,fontSize:r},[`${s}-progress`]:{position:`absolute`,bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:`100%`,paddingInlineStart:o(r).add(e.paddingXS).equal(),fontSize:r,lineHeight:0,pointerEvents:`none`,"> div":{margin:0}}},[`${s}:hover ${l}`]:{opacity:1},[`${s}-error`]:{color:e.colorError,[`${s}-name, ${t}-icon ${n}`]:{color:e.colorError},[c]:{[`${n}, ${n}:hover`]:{color:e.colorError},[l]:{opacity:1}}},[`${t}-list-item-container`]:{transition:[`opacity`,`height`].map(e=>`${e} ${a}`).join(`, `),"&::before":{display:`table`,width:0,height:0,content:`""`}}}}}},Y$=e=>{let{componentCls:t}=e,n=new Lo(`uploadAnimateInlineIn`,{from:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),r=new Lo(`uploadAnimateInlineOut`,{to:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),i=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${i}-appear, ${i}-enter, ${i}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:`forwards`},[`${i}-appear, ${i}-enter`]:{animationName:n},[`${i}-leave`]:{animationName:r}}},{[`${t}-wrapper`]:wh(e)},n,r]},X$=e=>{let{componentCls:t,iconCls:n,uploadThumbnailSize:r,uploadProgressOffset:i,calc:a}=e,o=`${t}-list`,s=`${o}-item`;return{[`${t}-wrapper`]:{[` + `]:{opacity:1}},[`${t}-icon ${n}`]:{color:e.colorIcon,fontSize:r},[`${s}-progress`]:{position:`absolute`,bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:`100%`,paddingInlineStart:o(r).add(e.paddingXS).equal(),fontSize:r,lineHeight:0,pointerEvents:`none`,"> div":{margin:0}}},[`${s}:hover ${l}`]:{opacity:1},[`${s}-error`]:{color:e.colorError,[`${s}-name, ${t}-icon ${n}`]:{color:e.colorError},[c]:{[`${n}, ${n}:hover`]:{color:e.colorError},[l]:{opacity:1}}},[`${t}-list-item-container`]:{transition:[`opacity`,`height`].map(e=>`${e} ${a}`).join(`, `),"&::before":{display:`table`,width:0,height:0,content:`""`}}}}}},J$=e=>{let{componentCls:t}=e,n=new Lo(`uploadAnimateInlineIn`,{from:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),r=new Lo(`uploadAnimateInlineOut`,{to:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),i=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${i}-appear, ${i}-enter, ${i}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:`forwards`},[`${i}-appear, ${i}-enter`]:{animationName:n},[`${i}-leave`]:{animationName:r}}},{[`${t}-wrapper`]:wh(e)},n,r]},Y$=e=>{let{componentCls:t,iconCls:n,uploadThumbnailSize:r,uploadProgressOffset:i,calc:a}=e,o=`${t}-list`,s=`${o}-item`;return{[`${t}-wrapper`]:{[` ${o}${o}-picture, ${o}${o}-picture-card, ${o}${o}-picture-circle - `]:{[s]:{position:`relative`,height:a(r).add(a(e.lineWidth).mul(2)).add(a(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:`transparent`},[`${s}-thumbnail`]:{...qc,width:r,height:r,lineHeight:Y(a(r).add(e.paddingSM).equal()),textAlign:`center`,flex:`none`,[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:`block`,width:`100%`,height:`100%`,overflow:`hidden`}},[`${s}-progress`]:{bottom:a(e.fontSize).mul(e.lineHeight).div(2).add(i).equal(),width:`calc(100% - ${Y(a(e.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:a(r).add(e.paddingXS).equal()}},[`${s}-error`]:{borderColor:e.colorError,[`${s}-thumbnail ${n}`]:{[`svg path[fill='${oc[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${oc.primary}']`]:{fill:e.colorError}}},[`${s}-uploading`]:{borderStyle:`dashed`,[`${s}-name`]:{marginBottom:i}}},[`${o}${o}-picture-circle ${s}`]:{[`&, &::before, ${s}-thumbnail`]:{borderRadius:`50%`}}}}},Z$=e=>{let{componentCls:t,iconCls:n,fontSizeLG:r,colorTextLightSolid:i,calc:a}=e,o=`${t}-list`,s=`${o}-item`,c=e.uploadPicCardSize;return{[` + `]:{[s]:{position:`relative`,height:a(r).add(a(e.lineWidth).mul(2)).add(a(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:`transparent`},[`${s}-thumbnail`]:{...qc,width:r,height:r,lineHeight:Y(a(r).add(e.paddingSM).equal()),textAlign:`center`,flex:`none`,[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:`block`,width:`100%`,height:`100%`,overflow:`hidden`}},[`${s}-progress`]:{bottom:a(e.fontSize).mul(e.lineHeight).div(2).add(i).equal(),width:`calc(100% - ${Y(a(e.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:a(r).add(e.paddingXS).equal()}},[`${s}-error`]:{borderColor:e.colorError,[`${s}-thumbnail ${n}`]:{[`svg path[fill='${oc[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${oc.primary}']`]:{fill:e.colorError}}},[`${s}-uploading`]:{borderStyle:`dashed`,[`${s}-name`]:{marginBottom:i}}},[`${o}${o}-picture-circle ${s}`]:{[`&, &::before, ${s}-thumbnail`]:{borderRadius:`50%`}}}}},X$=e=>{let{componentCls:t,iconCls:n,fontSizeLG:r,colorTextLightSolid:i,calc:a}=e,o=`${t}-list`,s=`${o}-item`,c=e.uploadPicCardSize;return{[` ${t}-wrapper${t}-picture-card-wrapper, ${t}-wrapper${t}-picture-circle-wrapper `]:{...Xc(),display:`block`,[`${t}${t}-select`]:{width:c,height:c,textAlign:`center`,verticalAlign:`top`,backgroundColor:e.colorFillAlter,border:`${Y(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`,textAlign:`center`},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${o}${o}-picture-card, ${o}${o}-picture-circle`]:{display:`flex`,flexWrap:`wrap`,"&:not(:empty)":{minHeight:c},"@supports not (gap: 1px)":{"& > *":{marginBlockEnd:e.marginXS,marginInlineEnd:e.marginXS}},"@supports (gap: 1px)":{gap:e.marginXS},[`${o}-item-container`]:{display:`inline-block`,width:c,height:c,verticalAlign:`top`},"&::after":{display:`none`},"&::before":{display:`none`},[s]:{height:`100%`,margin:0,"&::before":{position:`absolute`,zIndex:1,width:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`,height:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:`" "`}},[`${s}:hover`]:{[`&::before, ${s}-actions`]:{opacity:1}},[`${s}-actions`]:{position:`absolute`,insetInlineStart:0,zIndex:10,width:`100%`,whiteSpace:`nowrap`,textAlign:`center`,opacity:0,transition:`all ${e.motionDurationSlow}`,[` ${n}-eye, ${n}-download, ${n}-delete - `]:{zIndex:10,width:r,margin:`0 ${Y(e.marginXXS)}`,fontSize:r,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,color:i,"&:hover":{color:i},svg:{verticalAlign:`baseline`}}},[`${s}-thumbnail, ${s}-thumbnail img`]:{position:`static`,display:`block`,width:`100%`,height:`100%`,objectFit:`contain`},[`${s}-name`]:{display:`none`,textAlign:`center`},[`${s}-file + ${s}-name`]:{position:`absolute`,bottom:e.margin,display:`block`,width:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`},[`${s}-uploading`]:{[`&${s}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:`none`}},[`${s}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}},[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:`50%`}}}},Q$=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:`rtl`}}},$$=e=>{let{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:{...Jc(e),[t]:{outline:0,"input[type='file']":{cursor:`pointer`}},[`${t}-select`]:{display:`inline-block`},[`${t}-hidden`]:{display:`none`},[`${t}-disabled`]:{color:n,cursor:`not-allowed`}}}},e1=rl(`Upload`,e=>{let{fontSizeHeading3:t,marginXS:n,lineWidth:r,pictureCardSize:i,calc:a}=e,o=gs(e,{uploadThumbnailSize:a(t).mul(2).equal(),uploadProgressOffset:a(a(n).div(2)).add(r).equal(),uploadPicCardSize:i});return[$$(o),q$(o),X$(o),Z$(o),J$(o),Y$(o),Q$(o),bh(o)]},e=>({actionsColor:e.colorIcon,pictureCardSize:e.controlHeightLG*2.55})),t1={icon:function(e,t){return{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M534 352V136H232v752h560V394H576a42 42 0 01-42-42z`,fill:t}},{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z`,fill:e}}]}},name:`file`,theme:`twotone`};function n1(){return n1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n1({},e,{ref:t,icon:t1}))),i1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z`}}]},name:`paper-clip`,theme:`outlined`};function a1(){return a1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a1({},e,{ref:t,icon:i1}))),s1={icon:function(e,t){return{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z`,fill:e}},{tag:`path`,attrs:{d:`M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z`,fill:t}},{tag:`path`,attrs:{d:`M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z`,fill:t}},{tag:`path`,attrs:{d:`M276 368a28 28 0 1056 0 28 28 0 10-56 0z`,fill:t}},{tag:`path`,attrs:{d:`M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`,fill:e}}]}},name:`picture`,theme:`twotone`};function c1(){return c1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c1({},e,{ref:t,icon:s1})));function u1(e){return{...e,lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e}}function d1(e,t){let n=Zr(t),r=n.findIndex(({uid:t})=>t===e.uid);return r===-1?n.push(e):n[r]=e,n}function f1(e,t){let n=e.uid===void 0?`name`:`uid`;return t.filter(t=>t[n]===e[n])[0]}function p1(e,t){let n=e.uid===void 0?`name`:`uid`,r=t.filter(t=>t[n]!==e[n]);return r.length===t.length?null:r}var m1=(e=``)=>{let t=e.split(`/`),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[``])[0]},h1=e=>e.indexOf(`image/`)===0,g1=e=>{if(e.type&&!e.thumbUrl)return h1(e.type);let t=e.thumbUrl||e.url||``,n=m1(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n)?!0:!(/^data:/.test(t)||n)},_1=200;function v1(e){return new Promise(t=>{if(!e.type||!h1(e.type)){t(``);return}let n=document.createElement(`canvas`);n.width=_1,n.height=_1,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${_1}px; height: ${_1}px; z-index: 9999; display: none;`,document.body.appendChild(n);let r=n.getContext(`2d`),i=new Image;if(i.onload=()=>{let{width:e,height:a}=i,o=_1,s=_1,c=0,l=0;e>a?(s=_1/e*a,l=-(s-o)/2):(o=_1/a*e,c=-(o-s)/2),r.drawImage(i,c,l,o,s);let u=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(i.src),t(u)},i.crossOrigin=`anonymous`,e.type.startsWith(`image/svg+xml`)){let t=new FileReader;t.onload=()=>{t.result&&typeof t.result==`string`&&(i.src=t.result)},t.readAsDataURL(e)}else if(e.type.startsWith(`image/gif`)){let n=new FileReader;n.onload=()=>{n.result&&t(n.result)},n.readAsDataURL(e)}else i.src=window.URL.createObjectURL(e)})}var y1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`download`,theme:`outlined`};function b1(){return b1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b1({},e,{ref:t,icon:y1}))),S1=S.forwardRef(({prefixCls:e,className:t,style:n,classNames:r,styles:i,locale:a,listType:o,file:s,items:c,progress:l,iconRender:u,actionIconRender:d,itemRender:f,isImgUrl:p,showPreviewIcon:m,showRemoveIcon:h,showDownloadIcon:g,previewIcon:_,removeIcon:v,downloadIcon:y,extra:b,onPreview:x,onDownload:C,onClose:w},T)=>{let{status:E}=s,[D,O]=S.useState(E);S.useEffect(()=>{E!==`removed`&&O(E)},[E]);let[k,A]=S.useState(!1);S.useEffect(()=>{let e=setTimeout(()=>{A(!0)},300);return()=>{clearTimeout(e)}},[]);let j=u(s),M=S.createElement(`div`,{className:`${e}-icon`},j);if(o===`picture`||o===`picture-card`||o===`picture-circle`)if(D===`uploading`||!s.thumbUrl&&!s.url){let t=J(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:D!==`uploading`});M=S.createElement(`div`,{className:t},j)}else{let t=p?.(s)?S.createElement(`img`,{src:s.thumbUrl||s.url,alt:s.name,className:`${e}-list-item-image`,crossOrigin:s.crossOrigin}):j,n=J(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:p&&!p(s)});M=S.createElement(`a`,{className:n,onClick:e=>x(s,e),href:s.url||s.thumbUrl,target:`_blank`,rel:`noopener noreferrer`},t)}let N=J(`${e}-list-item`,`${e}-list-item-${D}`,r?.item),P=typeof s.linkProps==`string`?JSON.parse(s.linkProps):s.linkProps,F=(typeof h==`function`?h(s):h)?d((typeof v==`function`?v(s):v)||S.createElement(IQ,null),()=>w(s),e,a.removeFile,!0):null,I=(typeof g==`function`?g(s):g)&&D===`done`?d((typeof y==`function`?y(s):y)||S.createElement(x1,null),()=>C(s),e,a.downloadFile):null,L=o!==`picture-card`&&o!==`picture-circle`&&S.createElement(`span`,{key:`download-delete`,className:J(`${e}-list-item-actions`,{picture:o===`picture`})},I,F),R=typeof b==`function`?b(s):b,z=R&&S.createElement(`span`,{className:`${e}-list-item-extra`},R),B=J(`${e}-list-item-name`),V=s.url?S.createElement(`a`,{key:`view`,target:`_blank`,rel:`noopener noreferrer`,className:B,title:s.name,...P,href:s.url,onClick:e=>x(s,e)},s.name,z):S.createElement(`span`,{key:`view`,className:B,onClick:e=>x(s,e),title:s.name},s.name,z),H=(typeof m==`function`?m(s):m)&&(s.url||s.thumbUrl)?S.createElement(`a`,{href:s.url||s.thumbUrl,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>x(s,e),title:a.previewFile},typeof _==`function`?_(s):_||S.createElement(qU,null)):null,U=(o===`picture-card`||o===`picture-circle`)&&D!==`uploading`&&S.createElement(`span`,{className:`${e}-list-item-actions`},H,D===`done`&&I,F),{getPrefixCls:W}=S.useContext(oi),ee=W(),te=S.createElement(`div`,{className:N,style:i?.item},M,V,L,U,k&&S.createElement(Iu,{motionName:`${ee}-fade`,visible:D===`uploading`,motionDeadline:2e3},({className:t})=>{let n=`percent`in s?S.createElement(CK,{type:`line`,percent:s.percent,"aria-label":s[`aria-label`],"aria-labelledby":s[`aria-labelledby`],...l}):null;return S.createElement(`div`,{className:J(`${e}-list-item-progress`,t)},n)})),ne=s.response&&typeof s.response==`string`?s.response:s.error?.statusText||s.error?.message||a.uploadError,re=D===`error`?S.createElement(Ow,{title:ne,getPopupContainer:e=>e.parentNode},te):te;return S.createElement(`div`,{className:J(`${e}-list-item-container`,t),style:n,ref:T},f?f(re,s,c,{download:C.bind(null,s),preview:x.bind(null,s),remove:w.bind(null,s)}):re)}),C1=S.forwardRef((e,t)=>{let{listType:n=`text`,previewFile:r=v1,onPreview:i,onDownload:a,onRemove:o,locale:s,iconRender:c,isImageUrl:l=g1,prefixCls:u,items:d=[],showPreviewIcon:f=!0,showRemoveIcon:p=!0,showDownloadIcon:m=!1,removeIcon:h,previewIcon:g,downloadIcon:_,extra:v,progress:y={size:[-1,2],showInfo:!1},appendAction:b,appendActionVisible:x=!0,itemRender:C,disabled:w,classNames:T,styles:E}=e,[,D]=Ed(),[O,k]=S.useState(!1),A=[`picture-card`,`picture-circle`].includes(n);S.useEffect(()=>{n.startsWith(`picture`)&&(d||[]).forEach(e=>{!(e.originFileObj instanceof File||e.originFileObj instanceof Blob)||e.thumbUrl!==void 0||(e.thumbUrl=``,r?.(e.originFileObj).then(t=>{e.thumbUrl=t||``,D()}))})},[n,d,r]),S.useEffect(()=>{k(!0)},[]);let j=(e,t)=>{if(i)return t?.preventDefault(),i(e)},M=e=>{typeof a==`function`?a(e):e.url&&window.open(e.url)},N=e=>{o?.(e)},P=e=>{if(c)return c(e,n);let t=e.status===`uploading`;if(n.startsWith(`picture`)){let r=n===`picture`?S.createElement(xm,null):s.uploading,i=l?.(e)?S.createElement(l1,null):S.createElement(r1,null);return t?r:i}return t?S.createElement(xm,null):S.createElement(o1,null)},F=(e,t,n,r,i)=>{let a={type:`text`,size:`small`,title:r,onClick:n=>{t(),S.isValidElement(e)&&e.props.onClick?.(n)},className:`${n}-list-item-action`,disabled:i?w:!1};return S.isValidElement(e)?S.createElement(Zg,{...a,icon:Pp(e,{...e.props,onClick:()=>{}})}):S.createElement(Zg,{...a},S.createElement(`span`,null,e))};S.useImperativeHandle(t,()=>({handlePreview:j,handleDownload:M}));let{getPrefixCls:I}=S.useContext(oi),L=I(`upload`,u),R=I(),z=J(`${L}-list`,`${L}-list-${n}`,T?.list),B=S.useMemo(()=>Sr(Wm(R),[`onAppearEnd`,`onEnterEnd`,`onLeaveEnd`]),[R]),V={...A?{}:B,motionDeadline:2e3,motionName:`${L}-${A?`animate-inline`:`animate`}`,keys:Zr(d.map(e=>({key:e.uid,file:e}))),motionAppear:O};return S.createElement(`div`,{className:z,style:E?.list},S.createElement(Fu,{...V,component:!1},({key:e,file:t,className:r,style:i})=>S.createElement(S1,{key:e,locale:s,prefixCls:L,className:r,style:i,classNames:T,styles:E,file:t,items:d,progress:y,listType:n,isImgUrl:l,showPreviewIcon:f,showRemoveIcon:p,showDownloadIcon:m,removeIcon:h,previewIcon:g,downloadIcon:_,extra:v,iconRender:P,actionIconRender:F,itemRender:C,onPreview:j,onDownload:M,onClose:N})),b&&S.createElement(Iu,{...V,visible:x,forceRender:!0},({className:e,style:t})=>Pp(b,n=>({className:J(n.className,e),style:{...t,pointerEvents:e?`none`:void 0,...n.style}}))))}),w1=`__LIST_IGNORE_${Date.now()}__`,T1=S.forwardRef((e,t)=>{let n=li(`upload`),{fileList:r,defaultFileList:i,onRemove:a,showUploadList:o=!0,listType:s=`text`,onPreview:c,onDownload:l,onChange:u,onDrop:d,previewFile:f,disabled:p,locale:m,iconRender:h,isImageUrl:g,progress:_,prefixCls:v,className:y,type:b=`select`,children:x,style:C,itemRender:w,maxCount:T,data:E={},multiple:D=!1,hasControlInside:O=!0,action:k=``,accept:A=``,supportServerRender:j=!0,rootClassName:M,styles:N,classNames:P}=e,F=S.useContext(zp),I=p??F,L=e.customRequest||n.customRequest,[R,z]=Hn(i,r),B=R||[],[V,H]=S.useState(`drop`),U=S.useRef(null),W=S.useRef(null);S.useMemo(()=>{let e=Date.now();(r||[]).forEach((t,n)=>{!t.uid&&!Object.isFrozen(t)&&(t.uid=`__AUTO__${e}_${n}__`)})},[r]);let ee=(e,t,n)=>{let r=Zr(t),i=!1;T===1?r=r.slice(-1):T&&(i=r.length>T,r=r.slice(0,T)),(0,Jf.flushSync)(()=>{z(r)});let a={file:e,fileList:r};n&&(a.event=n),(!i||e.status===`removed`||r.some(t=>t.uid===e.uid))&&(0,Jf.flushSync)(()=>{u?.(a)})},te=async(t,n)=>{let{beforeUpload:r}=e,i=t;if(r){let e=await r(t,n);if(e===!1)return!1;if(delete t[w1],e===w1)return Object.defineProperty(t,w1,{value:!0,configurable:!0}),!1;hd(e)&&(i=e)}return i},ne=e=>{let t=e.filter(e=>!e.file[w1]);if(!t.length)return;let n=t.map(e=>u1(e.file)),r=Zr(B);n.forEach(e=>{r=d1(e,r)}),n.forEach((e,n)=>{let i=e;if(t[n].parsedFile)e.status=`uploading`;else{let{originFileObj:t}=e,n;try{n=new File([t],t.name,{type:t.type})}catch{n=new Blob([t],{type:t.type}),n.name=t.name,n.lastModifiedDate=new Date,n.lastModified=new Date().getTime()}n.uid=e.uid,i=n}ee(i,r)})},re=(e,t,n)=>{try{typeof e==`string`&&(e=JSON.parse(e))}catch{}if(!f1(t,B))return;let r=u1(t);r.status=`done`,r.percent=100,r.response=e,r.xhr=n,ee(r,d1(r,B))},ie=(e,t)=>{if(!f1(t,B))return;let n=u1(t);n.status=`uploading`,n.percent=e.percent,ee(n,d1(n,B),e)},ae=(e,t,n)=>{if(!f1(n,B))return;let r=u1(n);r.error=e,r.response=t,r.status=`error`,ee(r,d1(r,B))},G=e=>{let t;Promise.resolve(typeof a==`function`?a(e):a).then(n=>{if(n===!1)return;let r=p1(e,B);r&&(t={...e,status:`removed`},B?.forEach(e=>{let n=t.uid===void 0?`name`:`uid`;e[n]===t[n]&&!Object.isFrozen(e)&&(e.status=`removed`)}),U.current?.abort(t),ee(t,r))})},oe=e=>{H(e.type),e.type===`drop`&&d?.(e)};S.useImperativeHandle(t,()=>({onBatchStart:ne,onSuccess:re,onProgress:ie,onError:ae,fileList:B,upload:U.current,nativeElement:W.current}));let{getPrefixCls:K,direction:se,className:ce,style:q,classNames:le,styles:ue}=li(`upload`),de=K(`upload`,v),fe={...e,listType:s,showUploadList:o,type:b,multiple:D,hasControlInside:O,supportServerRender:j,disabled:I},[pe,me]=Fd([le,P],[ue,N],{props:fe}),he={onBatchStart:ne,onError:ae,onProgress:ie,onSuccess:re,...e,customRequest:L,data:E,multiple:D,action:k,accept:A,supportServerRender:j,prefixCls:de,disabled:I,beforeUpload:te,onChange:void 0,hasControlInside:O};delete he.className,delete he.style,(!x||I)&&delete he.id;let ge=`${de}-wrapper`,[_e,ve]=e1(de,ge),[ye]=cd(`Upload`,td.Upload),{showRemoveIcon:be,showPreviewIcon:xe,showDownloadIcon:Se,removeIcon:Ce,previewIcon:we,downloadIcon:Te,extra:Ee}=typeof o==`boolean`?{}:o,De=be===void 0?!I:be,Oe=(e,t)=>o?S.createElement(C1,{classNames:pe,styles:me,prefixCls:de,listType:s,items:B,previewFile:f,onPreview:c,onDownload:l,onRemove:G,showRemoveIcon:De,showPreviewIcon:xe,showDownloadIcon:Se,removeIcon:Ce,previewIcon:we,downloadIcon:Te,iconRender:h,extra:Ee,locale:{...ye,...m},isImageUrl:g,progress:_,appendAction:e,appendActionVisible:t,itemRender:w,disabled:I}):e,ke=J(ge,y,M,_e,ve,ce,pe.root,{[`${de}-rtl`]:se===`rtl`,[`${de}-picture-card-wrapper`]:s===`picture-card`,[`${de}-picture-circle-wrapper`]:s===`picture-circle`}),Ae={...me.root},je={...q,...C};if(b===`drag`){let e=J(_e,de,`${de}-drag`,{[`${de}-drag-uploading`]:B.some(e=>e.status===`uploading`),[`${de}-drag-hover`]:V===`dragover`,[`${de}-disabled`]:I,[`${de}-rtl`]:se===`rtl`},pe.trigger);return S.createElement(`span`,{className:ke,ref:W,style:Ae},S.createElement(`div`,{className:e,style:{...je,...me.trigger},onDrop:oe,onDragOver:oe,onDragLeave:oe},S.createElement(K$,{...he,ref:U,className:`${de}-btn`},S.createElement(`div`,{className:`${de}-drag-container`},x))),Oe())}let Me=J(de,`${de}-select`,{[`${de}-disabled`]:I,[`${de}-hidden`]:!x},pe.trigger),Ne=S.createElement(`div`,{className:Me,style:{...je,...me.trigger}},S.createElement(K$,{...he,ref:U}));return s===`picture-card`||s===`picture-circle`?S.createElement(`span`,{className:ke,ref:W,style:Ae},Oe(Ne,!!x)):S.createElement(`span`,{className:ke,ref:W,style:Ae},Ne,Oe())}),E1=S.forwardRef((e,t)=>{let{style:n,height:r,hasControlInside:i=!1,children:a,...o}=e,s={...n,height:r};return S.createElement(T1,{ref:t,hasControlInside:i,...o,style:s,type:`drag`},a)}),D1=T1;D1.Dragger=E1,D1.LIST_IGNORE=w1;var O1=o(((e,t)=>{function n(e){return e&&e.__esModule?e:{default:e}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),k1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default={items_per_page:`条/页`,jump_to:`跳至`,jump_to_confirm:`确定`,page:`页`,prev_page:`上一页`,next_page:`下一页`,prev_5:`向前 5 页`,next_5:`向后 5 页`,prev_3:`向前 3 页`,next_3:`向后 3 页`,page_size:`页码`}})),A1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.commonLocale=void 0,e.commonLocale={yearFormat:`YYYY`,dayFormat:`D`,cellMeridiemFormat:`A`,monthBeforeYear:!0}})),j1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=A1();function n(e){"@babel/helpers - typeof";return n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n(e)}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default={placeholder:`请选择时间`,rangePlaceholder:[`开始时间`,`结束时间`]}})),N1=o((e=>{var t=O1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(j1()),r=t(M1()),i={lang:{placeholder:`请选择日期`,yearPlaceholder:`请选择年份`,quarterPlaceholder:`请选择季度`,monthPlaceholder:`请选择月份`,weekPlaceholder:`请选择周`,rangePlaceholder:[`开始日期`,`结束日期`],rangeYearPlaceholder:[`开始年份`,`结束年份`],rangeMonthPlaceholder:[`开始月份`,`结束月份`],rangeQuarterPlaceholder:[`开始季度`,`结束季度`],rangeWeekPlaceholder:[`开始周`,`结束周`],...n.default},timePickerLocale:{...r.default}};i.lang.ok=`确定`,e.default=i})),P1=o((e=>{var t=O1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=t(N1()).default})),F1=o((e=>{var t=O1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(k1()),r=t(P1()),i=t(N1()),a=t(M1()),o="${label}不是一个有效的${type}";e.default={locale:`zh-cn`,Pagination:n.default,DatePicker:i.default,TimePicker:a.default,Calendar:r.default,global:{placeholder:`请选择`,close:`关闭`,sortable:`可排序`},Table:{filterTitle:`筛选`,filterConfirm:`确定`,filterReset:`重置`,filterEmptyText:`无筛选项`,filterCheckAll:`全选`,filterSearchPlaceholder:`在筛选项中搜索`,emptyText:`暂无数据`,selectAll:`全选当页`,selectInvert:`反选当页`,selectNone:`清空所有`,selectionAll:`全选所有`,sortTitle:`排序`,expand:`展开行`,collapse:`关闭行`,triggerDesc:`点击降序`,triggerAsc:`点击升序`,cancelSort:`取消排序`},Modal:{okText:`确定`,cancelText:`取消`,justOkText:`知道了`},Tour:{Next:`下一步`,Previous:`上一步`,Finish:`结束导览`},Popconfirm:{cancelText:`取消`,okText:`确定`},Transfer:{titles:[``,``],searchPlaceholder:`请输入搜索内容`,itemUnit:`项`,itemsUnit:`项`,remove:`删除`,selectCurrent:`全选当页`,removeCurrent:`删除当页`,selectAll:`全选所有`,deselectAll:`取消全选`,removeAll:`删除全部`,selectInvert:`反选当页`},Upload:{uploading:`文件上传中`,removeFile:`删除文件`,uploadError:`上传错误`,previewFile:`预览文件`,downloadFile:`下载文件`},Empty:{description:`暂无数据`},Icon:{icon:`图标`},Text:{edit:`编辑`,copy:`复制`,copied:`复制成功`,expand:`展开`,collapse:`收起`},Form:{optional:`(可选)`,defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:o,method:o,array:o,object:o,number:o,date:o,boolean:o,integer:o,float:o,regexp:o,email:o,url:o,hex:o},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},QRCode:{expired:`二维码过期`,refresh:`点击刷新`,scanned:`已扫描`},ColorPicker:{presetEmpty:`暂无`,transparent:`无色`,singleColor:`单色`,gradientColor:`渐变色`}}})),I1=o(((e,t)=>{t.exports=F1()})),L1={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.42 0 448 200.58 448 448S759.42 960 512 960 64 759.42 64 512 264.58 64 512 64m32.5 168c-69.67 0-86.06 16.84-86.72 39.08l-.02 1.43v46.62H291.45c-9.92 0-14.28 23.05-14.27 39.3 0 2.7 2.08 4.93 4.77 4.93h175.81v58.3h-116.5c-9.96 0-14.3 23.76-14.27 39.47a4.77 4.77 0 004.77 4.76h233.45c-4.53 41.06-15.43 77.59-30.72 109.32l-1.22 2.5-.32-.28c-60.24-28.47-120.43-52.57-194.4-52.57l-2.62.01c-84.98 1.11-144.71 56.5-145.91 127.04l-.02 1.22.02 2.13c1.24 70.4 63.56 126.45 148.52 126.45 61.25 0 116.38-16.85 163.46-45.02a138.58 138.58 0 0014.07-7.96 345.6 345.6 0 0050.3-41.16l9.45 6.35 12.46 8.32c57.53 38.26 113.76 72.62 169.86 79.27a142.62 142.62 0 0018.31 1.16c43.02 0 55-52.68 57.39-95.51l.14-2.84c.4-8.46-6.2-15.6-14.65-15.86-75.46-2.37-136.45-22.05-192-46.11l-6.27-2.75c35.15-56.8 56.66-121.81 57.15-186.66l.09-1.08c.4-5.51-4-10.2-9.52-10.2H549.33v-58.3h165.73c9.92 0 14.28-22.12 14.27-39.31a4.85 4.85 0 00-4.78-4.92H549.32v-82.35a4.8 4.8 0 00-4.83-4.78M328 583.85c54.63 0 107.08 22.41 158.1 52.19l5.76 3.4c-103.57 119.84-247.17 95.9-261.72 26.37a66.89 66.89 0 01-1.14-9.83l-.06-2.34.02-.9c.97-40.12 45.33-68.9 99.04-68.9`}}]},name:`alipay-circle`,theme:`outlined`};function R1(){return R1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,R1({},e,{ref:t,icon:L1}))),B1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z`}}]},name:`api`,theme:`outlined`};function V1(){return V1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,V1({},e,{ref:t,icon:B1}))),U1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z`}}]},name:`appstore`,theme:`outlined`};function W1(){return W1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,W1({},e,{ref:t,icon:U1}))),K1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z`}}]},name:`arrow-down`,theme:`outlined`};function q1(){return q1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,q1({},e,{ref:t,icon:K1}))),Y1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`arrow-left`,theme:`outlined`};function X1(){return X1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,X1({},e,{ref:t,icon:Y1}))),Q1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z`}}]},name:`arrow-up`,theme:`outlined`};function $1(){return $1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,$1({},e,{ref:t,icon:Q1}))),t0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z`}}]},name:`audio`,theme:`outlined`};function n0(){return n0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n0({},e,{ref:t,icon:t0}))),i0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z`}}]},name:`bank`,theme:`outlined`};function a0(){return a0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a0({},e,{ref:t,icon:i0}))),s0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z`}}]},name:`bar-chart`,theme:`outlined`};function c0(){return c0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c0({},e,{ref:t,icon:s0}))),u0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M816 768h-24V428c0-141.1-104.3-257.7-240-277.1V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.9c-135.7 19.4-240 136-240 277.1v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48zM304 768V428c0-55.6 21.6-107.8 60.9-147.1S456.4 220 512 220c55.6 0 107.8 21.6 147.1 60.9S720 372.4 720 428v340H304z`}}]},name:`bell`,theme:`outlined`};function d0(){return d0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d0({},e,{ref:t,icon:u0}))),p0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z`}}]},name:`book`,theme:`outlined`};function m0(){return m0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,m0({},e,{ref:t,icon:p0}))),g0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M916 210H376c-17.7 0-32 14.3-32 32v236H108c-17.7 0-32 14.3-32 32v272c0 17.7 14.3 32 32 32h540c17.7 0 32-14.3 32-32V546h236c17.7 0 32-14.3 32-32V242c0-17.7-14.3-32-32-32zm-504 68h200v200H412V278zm-68 468H144V546h200v200zm268 0H412V546h200v200zm268-268H680V278h200v200z`}}]},name:`build`,theme:`outlined`};function _0(){return _0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,_0({},e,{ref:t,icon:g0}))),y0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z`}}]},name:`bulb`,theme:`outlined`};function b0(){return b0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b0({},e,{ref:t,icon:y0}))),S0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M251.2 387H320v68.8c0 1.8 1.8 3.2 4 3.2h48c2.2 0 4-1.4 4-3.3V387h68.8c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H376v-68.8c0-1.8-1.8-3.2-4-3.2h-48c-2.2 0-4 1.4-4 3.2V331h-68.8c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm328 0h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm0 265h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm0 104h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm-195.7-81l61.2-74.9c4.3-5.2.7-13.1-5.9-13.1H388c-2.3 0-4.5 1-5.9 2.9l-34 41.6-34-41.6a7.85 7.85 0 00-5.9-2.9h-50.9c-6.6 0-10.2 7.9-5.9 13.1l61.2 74.9-62.7 76.8c-4.4 5.2-.8 13.1 5.8 13.1h50.8c2.3 0 4.5-1 5.9-2.9l35.5-43.5 35.5 43.5c1.5 1.8 3.7 2.9 5.9 2.9h50.8c6.6 0 10.2-7.9 5.9-13.1L383.5 675zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-36 732H180V180h664v664z`}}]},name:`calculator`,theme:`outlined`};function C0(){return C0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C0({},e,{ref:t,icon:S0}))),T0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 248H728l-32.4-90.8a32.07 32.07 0 00-30.2-21.2H358.6c-13.5 0-25.6 8.5-30.1 21.2L296 248H160c-44.2 0-80 35.8-80 80v456c0 44.2 35.8 80 80 80h704c44.2 0 80-35.8 80-80V328c0-44.2-35.8-80-80-80zm8 536c0 4.4-3.6 8-8 8H160c-4.4 0-8-3.6-8-8V328c0-4.4 3.6-8 8-8h186.7l17.1-47.8 22.9-64.2h250.5l22.9 64.2 17.1 47.8H864c4.4 0 8 3.6 8 8v456zM512 384c-88.4 0-160 71.6-160 160s71.6 160 160 160 160-71.6 160-160-71.6-160-160-160zm0 256c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z`}}]},name:`camera`,theme:`outlined`};function E0(){return E0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,E0({},e,{ref:t,icon:T0}))),O0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M380 704h264c4.4 0 8-3.6 8-8v-84c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v36H428v-36c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v84c0 4.4 3.6 8 8 8zm340-123a40 40 0 1080 0 40 40 0 10-80 0zm239-167.6L935.3 372a8 8 0 00-10.9-2.9l-50.7 29.6-78.3-216.2a63.9 63.9 0 00-60.9-44.4H301.2c-34.7 0-65.5 22.4-76.2 55.5l-74.6 205.2-50.8-29.6a8 8 0 00-10.9 2.9L65 413.4c-2.2 3.8-.9 8.6 2.9 10.8l60.4 35.2-14.5 40c-1.2 3.2-1.8 6.6-1.8 10v348.2c0 15.7 11.8 28.4 26.3 28.4h67.6c12.3 0 23-9.3 25.6-22.3l7.7-37.7h545.6l7.7 37.7c2.7 13 13.3 22.3 25.6 22.3h67.6c14.5 0 26.3-12.7 26.3-28.4V509.4c0-3.4-.6-6.8-1.8-10l-14.5-40 60.3-35.2a8 8 0 003-10.8zM840 517v237H184V517l15.6-43h624.8l15.6 43zM292.7 218.1l.5-1.3.4-1.3c1.1-3.3 4.1-5.5 7.6-5.5h427.6l75.4 208H220l72.7-199.9zM224 581a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`car`,theme:`outlined`};function k0(){return k0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,k0({},e,{ref:t,icon:O0}))),j0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z`}},{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}}]},name:`check-circle`,theme:`outlined`};function M0(){return M0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,M0({},e,{ref:t,icon:j0}))),P0={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z`}}]},name:`close-circle`,theme:`outlined`};function F0(){return F0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,F0({},e,{ref:t,icon:P0}))),L0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M811.4 418.7C765.6 297.9 648.9 212 512.2 212S258.8 297.8 213 418.6C127.3 441.1 64 519.1 64 612c0 110.5 89.5 200 199.9 200h496.2C870.5 812 960 722.5 960 612c0-92.7-63.1-170.7-148.6-193.3zm36.3 281a123.07 123.07 0 01-87.6 36.3H263.9c-33.1 0-64.2-12.9-87.6-36.3A123.3 123.3 0 01140 612c0-28 9.1-54.3 26.2-76.3a125.7 125.7 0 0166.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10c54.3 14.5 92.1 63.8 92.1 120 0 33.1-12.9 64.3-36.3 87.7z`}}]},name:`cloud`,theme:`outlined`};function R0(){return R0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,R0({},e,{ref:t,icon:L0}))),B0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z`}},{tag:`path`,attrs:{d:`M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z`}},{tag:`path`,attrs:{d:`M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z`}}]},name:`cloud-server`,theme:`outlined`};function V0(){return V0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,V0({},e,{ref:t,icon:B0}))),U0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`code`,theme:`outlined`};function W0(){return W0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,W0({},e,{ref:t,icon:U0}))),K0={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M275 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm613 144H768c0-39.8-32.2-72-72-72H200c-39.8 0-72 32.2-72 72v248c0 3.4.2 6.7.7 9.9-.5 7-.7 14-.7 21.1 0 176.7 143.3 320 320 320 160.1 0 292.7-117.5 316.3-271H888c39.8 0 72-32.2 72-72V497c0-39.8-32.2-72-72-72zM696 681h-1.1c.7 7.6 1.1 15.2 1.1 23 0 137-111 248-248 248S200 841 200 704c0-7.8.4-15.4 1.1-23H200V425h496v256zm192-8H776V497h112v176zM613 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm-170 0c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36z`}}]},name:`coffee`,theme:`outlined`};function q0(){return q0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,q0({},e,{ref:t,icon:K0}))),Y0={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 372zm198.4-588.1a32 32 0 00-24.5.5L414.9 415 296.4 686c-3.6 8.2-3.6 17.5 0 25.7 3.4 7.8 9.7 13.9 17.7 17 3.8 1.5 7.7 2.2 11.7 2.2 4.4 0 8.7-.9 12.8-2.7l271-118.6 118.5-271a32.06 32.06 0 00-17.7-42.7zM576.8 534.4l26.2 26.2-42.4 42.4-26.2-26.2L380 644.4 447.5 490 422 464.4l42.4-42.4 25.5 25.5L644.4 380l-67.6 154.4zM464.4 422L422 464.4l25.5 25.6 86.9 86.8 26.2 26.2 42.4-42.4-26.2-26.2-86.8-86.9z`}}]},name:`compass`,theme:`outlined`};function X0(){return X0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,X0({},e,{ref:t,icon:Y0}))),Q0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z`}}]},name:`crown`,theme:`outlined`};function $0(){return $0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,$0({},e,{ref:t,icon:Q0}))),t2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z`}}]},name:`dashboard`,theme:`outlined`};function n2(){return n2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n2({},e,{ref:t,icon:t2}))),i2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`database`,theme:`outlined`};function a2(){return a2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a2({},e,{ref:t,icon:i2}))),s2={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 372zm47.7-395.2l-25.4-5.9V348.6c38 5.2 61.5 29 65.5 58.2.5 4 3.9 6.9 7.9 6.9h44.9c4.7 0 8.4-4.1 8-8.8-6.1-62.3-57.4-102.3-125.9-109.2V263c0-4.4-3.6-8-8-8h-28.1c-4.4 0-8 3.6-8 8v33c-70.8 6.9-126.2 46-126.2 119 0 67.6 49.8 100.2 102.1 112.7l24.7 6.3v142.7c-44.2-5.9-69-29.5-74.1-61.3-.6-3.8-4-6.6-7.9-6.6H363c-4.7 0-8.4 4-8 8.7 4.5 55 46.2 105.6 135.2 112.1V761c0 4.4 3.6 8 8 8h28.4c4.4 0 8-3.6 8-8.1l-.2-31.7c78.3-6.9 134.3-48.8 134.3-124-.1-69.4-44.2-100.4-109-116.4zm-68.6-16.2c-5.6-1.6-10.3-3.1-15-5-33.8-12.2-49.5-31.9-49.5-57.3 0-36.3 27.5-57 64.5-61.7v124zM534.3 677V543.3c3.1.9 5.9 1.6 8.8 2.2 47.3 14.4 63.2 34.4 63.2 65.1 0 39.1-29.4 62.6-72 66.4z`}}]},name:`dollar`,theme:`outlined`};function c2(){return c2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c2({},e,{ref:t,icon:s2}))),u2={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 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z`}}]},name:`exclamation-circle`,theme:`outlined`};function d2(){return d2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d2({},e,{ref:t,icon:u2}))),p2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 472a40 40 0 1080 0 40 40 0 10-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 01-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z`}}]},name:`experiment`,theme:`outlined`};function m2(){return m2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,m2({},e,{ref:t,icon:p2}))),g2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z`}}]},name:`file-image`,theme:`outlined`};function _2(){return _2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,_2({},e,{ref:t,icon:g2}))),y2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z`}}]},name:`file-pdf`,theme:`outlined`};function b2(){return b2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b2({},e,{ref:t,icon:y2}))),S2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z`}}]},name:`filter`,theme:`outlined`};function C2(){return C2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C2({},e,{ref:t,icon:S2}))),T2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9zM713 808.5c-53.7 53.2-125 82.4-201 82.4s-147.3-29.2-201-82.4c-53.5-53.1-83-123.5-83-198.4 0-43.5 9.8-85.2 29.1-124 18.8-37.9 46.8-71.8 80.8-97.9a349.6 349.6 0 0058.6-56.8c25-30.5 44.6-64.5 58.2-101a240 240 0 0012.1-46.5c24.1 22.2 44.3 49 61.2 80.4 33.4 62.6 48.8 118.3 45.8 165.7a74.01 74.01 0 0024.4 59.8 73.36 73.36 0 0053.4 18.8c19.7-1 37.8-9.7 51-24.4 13.3-14.9 24.8-30.1 34.4-45.6 14 17.9 25.7 37.4 35 58.4 15.9 35.8 24 73.9 24 113.1 0 74.9-29.5 145.4-83 198.4z`}}]},name:`fire`,theme:`outlined`};function E2(){return E2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,E2({},e,{ref:t,icon:T2}))),O2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 305H624V192c0-17.7-14.3-32-32-32H184v-40c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v784c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V640h248v113c0 17.7 14.3 32 32 32h416c17.7 0 32-14.3 32-32V337c0-17.7-14.3-32-32-32zM184 568V232h368v336H184zm656 145H504v-73h112c4.4 0 8-3.6 8-8V377h216v336z`}}]},name:`flag`,theme:`outlined`};function k2(){return k2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,k2({},e,{ref:t,icon:O2}))),j2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M920 416H616c-4.4 0-8 3.6-8 8v112c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-56h60v320h-46c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h164c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8h-46V480h60v56c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V424c0-4.4-3.6-8-8-8zM656 296V168c0-4.4-3.6-8-8-8H104c-4.4 0-8 3.6-8 8v128c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-64h168v560h-92c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-92V232h168v64c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8z`}}]},name:`font-size`,theme:`outlined`};function M2(){return M2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,M2({},e,{ref:t,icon:j2}))),P2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 310H732.4c13.6-21.4 21.6-46.8 21.6-74 0-76.1-61.9-138-138-138-41.4 0-78.7 18.4-104 47.4-25.3-29-62.6-47.4-104-47.4-76.1 0-138 61.9-138 138 0 27.2 7.9 52.6 21.6 74H144c-17.7 0-32 14.3-32 32v200c0 4.4 3.6 8 8 8h40v344c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V550h40c4.4 0 8-3.6 8-8V342c0-17.7-14.3-32-32-32zm-334-74c0-38.6 31.4-70 70-70s70 31.4 70 70-31.4 70-70 70h-70v-70zm-138-70c38.6 0 70 31.4 70 70v70h-70c-38.6 0-70-31.4-70-70s31.4-70 70-70zM180 482V378h298v104H180zm48 68h250v308H228V550zm568 308H546V550h250v308zm48-376H546V378h298v104z`}}]},name:`gift`,theme:`outlined`};function F2(){return F2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,F2({},e,{ref:t,icon:P2}))),L2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z`}}]},name:`global`,theme:`outlined`};function R2(){return R2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,R2({},e,{ref:t,icon:L2}))),B2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z`}}]},name:`heart`,theme:`outlined`};function V2(){return V2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,V2({},e,{ref:t,icon:B2}))),U2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M957.6 507.4L603.2 158.2a7.9 7.9 0 00-11.2 0L353.3 393.4a8.03 8.03 0 00-.1 11.3l.1.1 40 39.4-117.2 115.3a8.03 8.03 0 00-.1 11.3l.1.1 39.5 38.9-189.1 187H72.1c-4.4 0-8.1 3.6-8.1 8V860c0 4.4 3.6 8 8 8h344.9c2.1 0 4.1-.8 5.6-2.3l76.1-75.6 40.4 39.8a7.9 7.9 0 0011.2 0l117.1-115.6 40.1 39.5a7.9 7.9 0 0011.2 0l238.7-235.2c3.4-3 3.4-8 .3-11.2zM389.8 796.2H229.6l134.4-133 80.1 78.9-54.3 54.1zm154.8-62.1L373.2 565.2l68.6-67.6 171.4 168.9-68.6 67.6zM713.1 658L450.3 399.1 597.6 254l262.8 259-147.3 145z`}}]},name:`highlight`,theme:`outlined`};function W2(){return W2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,W2({},e,{ref:t,icon:U2}))),K2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z`}}]},name:`history`,theme:`outlined`};function q2(){return q2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,q2({},e,{ref:t,icon:K2}))),Y2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z`}}]},name:`home`,theme:`outlined`};function X2(){return X2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,X2({},e,{ref:t,icon:Y2}))),Q2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136V232h752v560zM610.3 476h123.4c1.3 0 2.3-3.6 2.3-8v-48c0-4.4-1-8-2.3-8H610.3c-1.3 0-2.3 3.6-2.3 8v48c0 4.4 1 8 2.3 8zm4.8 144h185.7c3.9 0 7.1-3.6 7.1-8v-48c0-4.4-3.2-8-7.1-8H615.1c-3.9 0-7.1 3.6-7.1 8v48c0 4.4 3.2 8 7.1 8zM224 673h43.9c4.2 0 7.6-3.3 7.9-7.5 3.8-50.5 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H522a8 8 0 008-8.4c-2.8-53.3-32-99.7-74.6-126.1a111.8 111.8 0 0029.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 00-74.6 126.1c-.4 4.6 3.2 8.4 7.8 8.4zm149-262c28.5 0 51.7 23.3 51.7 52s-23.2 52-51.7 52-51.7-23.3-51.7-52 23.2-52 51.7-52z`}}]},name:`idcard`,theme:`outlined`};function $2(){return $2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,$2({},e,{ref:t,icon:Q2}))),t4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M956.9 845.1L896.4 632V168c0-17.7-14.3-32-32-32h-704c-17.7 0-32 14.3-32 32v464L67.9 845.1C60.4 866 75.8 888 98 888h828.8c22.2 0 37.6-22 30.1-42.9zM200.4 208h624v395h-624V208zm228.3 608l8.1-37h150.3l8.1 37H428.7zm224 0l-19.1-86.7c-.8-3.7-4.1-6.3-7.8-6.3H398.2c-3.8 0-7 2.6-7.8 6.3L371.3 816H151l42.3-149h638.2l42.3 149H652.7z`}}]},name:`laptop`,theme:`outlined`};function n4(){return n4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n4({},e,{ref:t,icon:t4}))),i4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z`}}]},name:`line-chart`,theme:`outlined`};function a4(){return a4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a4({},e,{ref:t,icon:i4}))),s4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z`}}]},name:`link`,theme:`outlined`};function c4(){return c4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c4({},e,{ref:t,icon:s4}))),u4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z`}}]},name:`lock`,theme:`outlined`};function d4(){return d4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d4({},e,{ref:t,icon:u4}))),p4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z`}}]},name:`logout`,theme:`outlined`};function m4(){return m4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,m4({},e,{ref:t,icon:p4}))),g4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z`}}]},name:`mail`,theme:`outlined`};function _4(){return _4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,_4({},e,{ref:t,icon:g4}))),y4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M839.2 278.1a32 32 0 00-30.4-22.1H736V144c0-17.7-14.3-32-32-32H320c-17.7 0-32 14.3-32 32v112h-72.8a31.9 31.9 0 00-30.4 22.1L112 502v378c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V502l-72.8-223.9zM360 184h304v72H360v-72zm480 656H184V513.4L244.3 328h535.4L840 513.4V840zM652 572H544V464c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v108H372c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h108v108c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V636h108c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z`}}]},name:`medicine-box`,theme:`outlined`};function b4(){return b4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b4({},e,{ref:t,icon:y4}))),S4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z`}}]},name:`menu`,theme:`outlined`};function C4(){return C4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C4({},e,{ref:t,icon:S4}))),T4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z`}},{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}}]},name:`minus-circle`,theme:`outlined`};function E4(){return E4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,E4({},e,{ref:t,icon:T4}))),O4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`mobile`,theme:`outlined`};function k4(){return k4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,k4({},e,{ref:t,icon:O4}))),j4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M692.8 412.7l.2-.2-34.6-44.3a7.97 7.97 0 00-11.2-1.4l-50.4 39.3-70.5-90.1a7.97 7.97 0 00-11.2-1.4l-37.9 29.7a7.97 7.97 0 00-1.4 11.2l70.5 90.2-.2.1 34.6 44.3c2.7 3.5 7.7 4.1 11.2 1.4l50.4-39.3 64.1 82c2.7 3.5 7.7 4.1 11.2 1.4l37.9-29.6c3.5-2.7 4.1-7.7 1.4-11.2l-64.1-82.1zM608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5L114.3 856.1a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6C473 696.1 537.7 720 608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644s-118.2-23.7-161.2-66.8C403.7 534.2 380 476.9 380 416s23.7-118.2 66.8-161.2c43-43.1 100.3-66.8 161.2-66.8s118.2 23.7 161.2 66.8c43.1 43 66.8 100.3 66.8 161.2s-23.7 118.2-66.8 161.2z`}}]},name:`monitor`,theme:`outlined`};function M4(){return M4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,M4({},e,{ref:t,icon:j4}))),P4={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 372zm159.6-585h-59.5c-3 0-5.8 1.7-7.1 4.4l-90.6 180H511l-90.6-180a8 8 0 00-7.1-4.4h-60.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.9L457 515.7h-61.4c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V603h-81.7c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V717c0 4.4 3.6 8 8 8h54.3c4.4 0 8-3.6 8-8v-68.1h82c4.4 0 8-3.6 8-8V611c0-4.4-3.6-8-8-8h-82v-41.5h82c4.4 0 8-3.6 8-8v-29.9c0-4.4-3.6-8-8-8h-62l111.1-204.8c.6-1.2 1-2.5 1-3.8-.1-4.4-3.7-8-8.1-8z`}}]},name:`pay-circle`,theme:`outlined`};function F4(){return F4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,F4({},e,{ref:t,icon:P4}))),L4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M877.1 238.7L770.6 132.3c-13-13-30.4-20.3-48.8-20.3s-35.8 7.2-48.8 20.3L558.3 246.8c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l89.6 89.7a405.46 405.46 0 01-86.4 127.3c-36.7 36.9-79.6 66-127.2 86.6l-89.6-89.7c-13-13-30.4-20.3-48.8-20.3a68.2 68.2 0 00-48.8 20.3L132.3 673c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l106.4 106.4c22.2 22.2 52.8 34.9 84.2 34.9 6.5 0 12.8-.5 19.2-1.6 132.4-21.8 263.8-92.3 369.9-198.3C818 606 888.4 474.6 910.4 342.1c6.3-37.6-6.3-76.3-33.3-103.4zm-37.6 91.5c-19.5 117.9-82.9 235.5-178.4 331s-213 158.9-330.9 178.4c-14.8 2.5-30-2.5-40.8-13.2L184.9 721.9 295.7 611l119.8 120 .9.9 21.6-8a481.29 481.29 0 00285.7-285.8l8-21.6-120.8-120.7 110.8-110.9 104.5 104.5c10.8 10.8 15.8 26 13.3 40.8z`}}]},name:`phone`,theme:`outlined`};function R4(){return R4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,R4({},e,{ref:t,icon:L4}))),B4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`}}]},name:`picture`,theme:`outlined`};function V4(){return V4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,V4({},e,{ref:t,icon:B4}))),U4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 518H506V160c0-4.4-3.6-8-8-8h-26a398.46 398.46 0 00-282.8 117.1 398.19 398.19 0 00-85.7 127.1A397.61 397.61 0 0072 552a398.46 398.46 0 00117.1 282.8c36.7 36.7 79.5 65.6 127.1 85.7A397.61 397.61 0 00472 952a398.46 398.46 0 00282.8-117.1c36.7-36.7 65.6-79.5 85.7-127.1A397.61 397.61 0 00872 552v-26c0-4.4-3.6-8-8-8zM705.7 787.8A331.59 331.59 0 01470.4 884c-88.1-.4-170.9-34.9-233.2-97.2C174.5 724.1 140 640.7 140 552c0-88.7 34.5-172.1 97.2-234.8 54.6-54.6 124.9-87.9 200.8-95.5V586h364.3c-7.7 76.3-41.3 147-96.6 201.8zM952 462.4l-2.6-28.2c-8.5-92.1-49.4-179-115.2-244.6A399.4 399.4 0 00589 74.6L560.7 72c-4.7-.4-8.7 3.2-8.7 7.9V464c0 4.4 3.6 8 8 8l384-1c4.7 0 8.4-4 8-8.6zm-332.2-58.2V147.6a332.24 332.24 0 01166.4 89.8c45.7 45.6 77 103.6 90 166.1l-256.4.7z`}}]},name:`pie-chart`,theme:`outlined`};function W4(){return W4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,W4({},e,{ref:t,icon:U4}))),K4={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`};function q4(){return q4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,q4({},e,{ref:t,icon:K4}))),Y4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M280 752h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8zm192-280h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v184c0 4.4 3.6 8 8 8zm192 72h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v256c0 4.4 3.6 8 8 8zm216-432H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`project`,theme:`outlined`};function X4(){return X4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,X4({},e,{ref:t,icon:Y4}))),Q4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 161H699.2c-49.1 0-97.1 14.1-138.4 40.7L512 233l-48.8-31.3A255.2 255.2 0 00324.8 161H96c-17.7 0-32 14.3-32 32v568c0 17.7 14.3 32 32 32h228.8c49.1 0 97.1 14.1 138.4 40.7l44.4 28.6c1.3.8 2.8 1.3 4.3 1.3s3-.4 4.3-1.3l44.4-28.6C602 807.1 650.1 793 699.2 793H928c17.7 0 32-14.3 32-32V193c0-17.7-14.3-32-32-32zM324.8 721H136V233h188.8c35.4 0 69.8 10.1 99.5 29.2l48.8 31.3 6.9 4.5v462c-47.6-25.6-100.8-39-155.2-39zm563.2 0H699.2c-54.4 0-107.6 13.4-155.2 39V298l6.9-4.5 48.8-31.3c29.7-19.1 64.1-29.2 99.5-29.2H888v488zM396.9 361H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm223.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c0-4.1-3.2-7.5-7.1-7.5H627.1c-3.9 0-7.1 3.4-7.1 7.5zM396.9 501H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm416 0H627.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5z`}}]},name:`read`,theme:`outlined`};function $4(){return $4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,$4({},e,{ref:t,icon:Q4}))),t3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M508 704c79.5 0 144-64.5 144-144s-64.5-144-144-144-144 64.5-144 144 64.5 144 144 144zm0-224c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z`}},{tag:`path`,attrs:{d:`M832 256h-28.1l-35.7-120.9c-4-13.7-16.5-23.1-30.7-23.1h-451c-14.3 0-26.8 9.4-30.7 23.1L220.1 256H192c-17.7 0-32 14.3-32 32v28c0 4.4 3.6 8 8 8h45.8l47.7 558.7a32 32 0 0031.9 29.3h429.2a32 32 0 0031.9-29.3L802.2 324H856c4.4 0 8-3.6 8-8v-28c0-17.7-14.3-32-32-32zm-518.6-76h397.2l22.4 76H291l22.4-76zm376.2 664H326.4L282 324h451.9l-44.3 520z`}}]},name:`rest`,theme:`outlined`};function n3(){return n3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n3({},e,{ref:t,icon:t3}))),i3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`robot`,theme:`outlined`};function a3(){return a3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a3({},e,{ref:t,icon:i3}))),s3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 00-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0043.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0043.1-30.5 97.52 97.52 0 0021.4-60.8c0-8.4-1.1-16.4-3.1-23.8H864zM762.3 621.4c9.4 14.6 17 30.3 22.5 46.6H700V558.7a211.6 211.6 0 0162.3 62.7zM388 483.1V318.8l124-147 124 147V668H388V483.1zM239.2 668c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668h-84.8zm388.9 116.2c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5-38.3 0-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 01-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM464 400a48 48 0 1096 0 48 48 0 10-96 0z`}}]},name:`rocket`,theme:`outlined`};function c3(){return c3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c3({},e,{ref:t,icon:s3}))),u3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M793 242H366v-74c0-6.7-7.7-10.4-12.9-6.3l-142 112a8 8 0 000 12.6l142 112c5.2 4.1 12.9.4 12.9-6.3v-74h415v470H175c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h618c35.3 0 64-28.7 64-64V306c0-35.3-28.7-64-64-64z`}}]},name:`rollback`,theme:`outlined`};function d3(){return d3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d3({},e,{ref:t,icon:u3}))),p3={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z`}},{tag:`path`,attrs:{d:`M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z`}}]},name:`safety`,theme:`outlined`};function m3(){return m3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,m3({},e,{ref:t,icon:p3}))),g3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z`}}]},name:`save`,theme:`outlined`};function _3(){return _3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,_3({},e,{ref:t,icon:g3}))),y3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zM402.9 528.8l-77.5 77.5a8.03 8.03 0 000 11.3l34 34c3.1 3.1 8.2 3.1 11.3 0l77.5-77.5c55.7 35.1 130.1 28.4 178.6-20.1 56.3-56.3 56.3-147.5 0-203.8-56.3-56.3-147.5-56.3-203.8 0-48.5 48.5-55.2 123-20.1 178.6zm65.4-133.3c31.3-31.3 82-31.3 113.2 0 31.3 31.3 31.3 82 0 113.2-31.3 31.3-82 31.3-113.2 0s-31.3-81.9 0-113.2z`}}]},name:`security-scan`,theme:`outlined`};function b3(){return b3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b3({},e,{ref:t,icon:y3}))),S3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z`}}]},name:`send`,theme:`outlined`};function C3(){return C3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C3({},e,{ref:t,icon:S3}))),T3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z`}}]},name:`setting`,theme:`outlined`};function E3(){return E3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,E3({},e,{ref:t,icon:T3}))),O3={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z`}}]},name:`shopping-cart`,theme:`outlined`};function k3(){return k3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,k3({},e,{ref:t,icon:O3}))),j3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 312H696v-16c0-101.6-82.4-184-184-184s-184 82.4-184 184v16H192c-17.7 0-32 14.3-32 32v536c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V344c0-17.7-14.3-32-32-32zm-432-16c0-61.9 50.1-112 112-112s112 50.1 112 112v16H400v-16zm392 544H232V384h96v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h224v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h96v456z`}}]},name:`shopping`,theme:`outlined`};function M3(){return M3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,M3({},e,{ref:t,icon:j3}))),P3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M925.6 405.1l-203-253.7a6.5 6.5 0 00-5-2.4H306.4c-1.9 0-3.8.9-5 2.4l-203 253.7a6.5 6.5 0 00.2 8.3l408.6 459.5c1.2 1.4 3 2.1 4.8 2.1 1.8 0 3.5-.8 4.8-2.1l408.6-459.5a6.5 6.5 0 00.2-8.3zM645.2 206.4l34.4 133.9-132.5-133.9h98.1zm8.2 178.5H370.6L512 242l141.4 142.9zM378.8 206.4h98.1L344.3 340.3l34.5-133.9zm-53.4 7l-44.1 171.5h-93.1l137.2-171.5zM194.6 434.9H289l125.8 247.7-220.2-247.7zM512 763.4L345.1 434.9h333.7L512 763.4zm97.1-80.8L735 434.9h94.4L609.1 682.6zm133.6-297.7l-44.1-171.5 137.2 171.5h-93.1z`}}]},name:`sketch`,theme:`outlined`};function F3(){return F3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,F3({},e,{ref:t,icon:P3}))),L3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M870 126H663.8c-17.4 0-32.9 11.9-37 29.3C614.3 208.1 567 246 512 246s-102.3-37.9-114.8-90.7a37.93 37.93 0 00-37-29.3H154a44 44 0 00-44 44v252a44 44 0 0044 44h75v388a44 44 0 0044 44h478a44 44 0 0044-44V466h75a44 44 0 0044-44V170a44 44 0 00-44-44zm-28 268H723v432H301V394H182V198h153.3c28.2 71.2 97.5 120 176.7 120s148.5-48.8 176.7-120H842v196z`}}]},name:`skin`,theme:`outlined`};function R3(){return R3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,R3({},e,{ref:t,icon:L3}))),B3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z`}}]},name:`smile`,theme:`outlined`};function V3(){return V3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,V3({},e,{ref:t,icon:B3}))),U3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M688 264c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48zm-8 136H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM480 544H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 308H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm356.8-74.4c29-26.3 47.2-64.3 47.2-106.6 0-79.5-64.5-144-144-144s-144 64.5-144 144c0 42.3 18.2 80.3 47.2 106.6-57 32.5-96.2 92.7-99.2 162.1-.2 4.5 3.5 8.3 8 8.3h48.1c4.2 0 7.7-3.3 8-7.6C564 871.2 621.7 816 692 816s128 55.2 131.9 124.4c.2 4.2 3.7 7.6 8 7.6H880c4.6 0 8.2-3.8 8-8.3-2.9-69.5-42.2-129.6-99.2-162.1zM692 591c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z`}}]},name:`solution`,theme:`outlined`};function W3(){return W3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,W3({},e,{ref:t,icon:U3}))),K3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1zM586 803L293.4 611.7l-18-11.7H146V424h129.4l17.9-11.7L586 221v582zm348-327H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zm-41.9 261.8l-110.3-63.7a15.9 15.9 0 00-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0021.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM760 344a15.9 15.9 0 0021.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 00-21.7-5.9L746 287.8a15.99 15.99 0 00-5.8 21.8L760 344z`}}]},name:`sound`,theme:`outlined`};function q3(){return q3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,q3({},e,{ref:t,icon:K3}))),Y3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z`}}]},name:`star`,theme:`outlined`};function X3(){return X3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,X3({},e,{ref:t,icon:Y3}))),Q3={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`};function $3(){return $3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,$3({},e,{ref:t,icon:Q3}))),t6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M938 458.8l-29.6-312.6c-1.5-16.2-14.4-29-30.6-30.6L565.2 86h-.4c-3.2 0-5.7 1-7.6 2.9L88.9 557.2a9.96 9.96 0 000 14.1l363.8 363.8c1.9 1.9 4.4 2.9 7.1 2.9s5.2-1 7.1-2.9l468.3-468.3c2-2.1 3-5 2.8-8zM459.7 834.7L189.3 564.3 589 164.6 836 188l23.4 247-399.7 399.7zM680 256c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm0 120c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z`}}]},name:`tag`,theme:`outlined`};function n6(){return n6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n6({},e,{ref:t,icon:t6}))),i6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z`}}]},name:`team`,theme:`outlined`};function a6(){return a6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a6({},e,{ref:t,icon:i6}))),s6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z`}}]},name:`thunderbolt`,theme:`outlined`};function c6(){return c6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c6({},e,{ref:t,icon:s6}))),u6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z`}}]},name:`tool`,theme:`outlined`};function d6(){return d6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d6({},e,{ref:t,icon:u6}))),p6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 160h-92v-40c0-4.4-3.6-8-8-8H256c-4.4 0-8 3.6-8 8v40h-92a44 44 0 00-44 44v148c0 81.7 60 149.6 138.2 162C265.7 630.2 359 721.7 476 734.5v105.2H280c-17.7 0-32 14.3-32 32V904c0 4.4 3.6 8 8 8h512c4.4 0 8-3.6 8-8v-32.3c0-17.7-14.3-32-32-32H548V734.5C665 721.7 758.3 630.2 773.8 514 852 501.6 912 433.7 912 352V204a44 44 0 00-44-44zM184 352V232h64v207.6a91.99 91.99 0 01-64-87.6zm520 128c0 49.1-19.1 95.4-53.9 130.1-34.8 34.8-81 53.9-130.1 53.9h-16c-49.1 0-95.4-19.1-130.1-53.9-34.8-34.8-53.9-81-53.9-130.1V184h384v296zm136-128c0 41-26.9 75.8-64 87.6V232h64v120z`}}]},name:`trophy`,theme:`outlined`};function m6(){return m6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,m6({},e,{ref:t,icon:p6}))),g6={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M608 192a32 32 0 0132 32v160h174.81a32 32 0 0126.68 14.33l113.19 170.84a32 32 0 015.32 17.68V672a32 32 0 01-32 32h-96c0 70.7-57.3 128-128 128s-128-57.3-128-128H384c0 70.7-57.3 128-128 128s-128-57.3-128-128H96a32 32 0 01-32-32V224a32 32 0 0132-32zM256 640a64 64 0 000 128h1.06A64 64 0 00256 640m448 0a64 64 0 000 128h1.06A64 64 0 00704 640M576 256H128v384h17.12c22.13-38.26 63.5-64 110.88-64 47.38 0 88.75 25.74 110.88 64H576zm221.63 192H640v145.12A127.43 127.43 0 01704 576c47.38 0 88.75 25.74 110.88 64H896v-43.52zM500 448a12 12 0 0112 12v40a12 12 0 01-12 12H332a12 12 0 01-12-12v-40a12 12 0 0112-12zM308 320a12 12 0 0112 12v40a12 12 0 01-12 12H204a12 12 0 01-12-12v-40a12 12 0 0112-12z`}}]},name:`truck`,theme:`outlined`};function _6(){return _6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,_6({},e,{ref:t,icon:g6}))),y6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M511.4 124C290.5 124.3 112 303 112 523.9c0 128 60.2 242 153.8 315.2l-37.5 48c-4.1 5.3-.3 13 6.3 12.9l167-.8c5.2 0 9-4.9 7.7-9.9L369.8 727a8 8 0 00-14.1-3L315 776.1c-10.2-8-20-16.7-29.3-26a318.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-7.5 7.5-15.3 14.5-23.4 21.2a7.93 7.93 0 00-1.2 11.1l39.4 50.5c2.8 3.5 7.9 4.1 11.4 1.3C854.5 760.8 912 649.1 912 523.9c0-221.1-179.4-400.2-400.6-399.9z`}}]},name:`undo`,theme:`outlined`};function b6(){return b6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b6({},e,{ref:t,icon:y6}))),S6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`upload`,theme:`outlined`};function C6(){return C6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C6({},e,{ref:t,icon:S6}))),T6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z`}}]},name:`user`,theme:`outlined`};function E6(){return E6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,E6({},e,{ref:t,icon:T6}))),O6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v576c0 35.3 28.7 64 64 64h592c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM712 792H136V232h576v560zm176-167l-104-59.8V458.9L888 399v226zM208 360h112c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H208c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}}]},name:`video-camera`,theme:`outlined`};function k6(){return k6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,k6({},e,{ref:t,icon:O6}))),j6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 464H528V448h312v128zm0 264H184V184h656v200H496c-17.7 0-32 14.3-32 32v192c0 17.7 14.3 32 32 32h344v200zM580 512a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`wallet`,theme:`outlined`};function M6(){return M6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,M6({},e,{ref:t,icon:j6}))),P6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M690.1 377.4c5.9 0 11.8.2 17.6.5-24.4-128.7-158.3-227.1-319.9-227.1C209 150.8 64 271.4 64 420.2c0 81.1 43.6 154.2 111.9 203.6a21.5 21.5 0 019.1 17.6c0 2.4-.5 4.6-1.1 6.9-5.5 20.3-14.2 52.8-14.6 54.3-.7 2.6-1.7 5.2-1.7 7.9 0 5.9 4.8 10.8 10.8 10.8 2.3 0 4.2-.9 6.2-2l70.9-40.9c5.3-3.1 11-5 17.2-5 3.2 0 6.4.5 9.5 1.4 33.1 9.5 68.8 14.8 105.7 14.8 6 0 11.9-.1 17.8-.4-7.1-21-10.9-43.1-10.9-66 0-135.8 132.2-245.8 295.3-245.8zm-194.3-86.5c23.8 0 43.2 19.3 43.2 43.1s-19.3 43.1-43.2 43.1c-23.8 0-43.2-19.3-43.2-43.1s19.4-43.1 43.2-43.1zm-215.9 86.2c-23.8 0-43.2-19.3-43.2-43.1s19.3-43.1 43.2-43.1 43.2 19.3 43.2 43.1-19.4 43.1-43.2 43.1zm586.8 415.6c56.9-41.2 93.2-102 93.2-169.7 0-124-120.8-224.5-269.9-224.5-149 0-269.9 100.5-269.9 224.5S540.9 847.5 690 847.5c30.8 0 60.6-4.4 88.1-12.3 2.6-.8 5.2-1.2 7.9-1.2 5.2 0 9.9 1.6 14.3 4.1l59.1 34c1.7 1 3.3 1.7 5.2 1.7a9 9 0 006.4-2.6 9 9 0 002.6-6.4c0-2.2-.9-4.4-1.4-6.6-.3-1.2-7.6-28.3-12.2-45.3-.5-1.9-.9-3.8-.9-5.7.1-5.9 3.1-11.2 7.6-14.5zM600.2 587.2c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9c0 19.8-16.2 35.9-36 35.9zm179.9 0c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9a36.08 36.08 0 01-36 35.9z`}}]},name:`wechat`,theme:`outlined`};function F6(){return F6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,F6({},e,{ref:t,icon:P6}))),L6=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},R6=(e=>e?L6(e):L6),z6=e=>e;function B6(e,t=z6){let n=S.useSyncExternalStore(e.subscribe,S.useCallback(()=>t(e.getState()),[e,t]),S.useCallback(()=>t(e.getInitialState()),[e,t]));return S.useDebugValue(n),n}var V6=e=>{let t=R6(e),n=e=>B6(t,e);return Object.assign(n,t),n},H6=(e=>e?V6(e):V6),U6=c(I1(),1),W6=`AES-GCM`,G6=12,K6=128;async function q6(){throw Error(`VITE_ENCRYPTION_KEY not configured`)}async function J6(e){let t=await q6(),n=crypto.getRandomValues(new Uint8Array(G6)),r=new TextEncoder().encode(e),i=await crypto.subtle.encrypt({name:W6,iv:n,tagLength:K6},t,r),a=new Uint8Array(i),o=new Uint8Array(n.length+a.length);return o.set(n),o.set(a,n.length),btoa(String.fromCharCode(...o))}async function Y6(e){let t=await q6(),n=Uint8Array.from(atob(e),e=>e.charCodeAt(0)),r=n.slice(0,G6),i=n.slice(G6),a=await crypto.subtle.decrypt({name:W6,iv:r,tagLength:K6},t,i);return new TextDecoder().decode(a)}var X6=`http://ceshi.apiforeign.minzhong.cn`,Z6=!1;function Q6(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}function $6(e){return Array.isArray(e)?e.map($6):typeof e==`object`&&e?Object.fromEntries(Object.entries(e).map(([e,t])=>[Q6(e),$6(t)])):e}function e8(){return localStorage.getItem(`auth_token`)}function t8(e){localStorage.setItem(`auth_token`,e)}function n8(){localStorage.removeItem(`auth_token`)}async function r8(e){try{return await Y6(e)}catch{return null}}async function i8(e,t={}){let{method:n=`GET`,body:r,auth:i=!0,encryptBody:a=Z6}=t,o={"Content-Type":`application/json`};if(i){let e=e8();e&&(o.Authorization=`Bearer ${e}`)}let s;if(r!==void 0){let e=JSON.stringify(r);a?(o[`X-Encrypted`]=`true`,s=JSON.stringify({data:await J6(e)})):s=e}let c=await fetch(`${X6}/api${e}`,{method:n,headers:o,body:s});if(c.status===204)return;let l=await c.text();if(!l)return;let u;try{u=JSON.parse(l)}catch{throw Error(`响应解析失败 (${c.status})`)}if(u&&typeof u.data==`string`&&a){let e=await r8(u.data);e!==null&&(u=JSON.parse(e))}if(!c.ok){let e=u?.detail||`请求失败 (${c.status})`;throw c.status===401&&(n8(),window.location.pathname!==`/login`&&(window.location.href=`/login`)),Error(e)}return $6(u)}var a8={get:(e,t=!0)=>i8(e,{auth:t}),post:(e,t,n=!0)=>i8(e,{method:`POST`,body:t,auth:n}),put:(e,t,n=!0)=>i8(e,{method:`PUT`,body:t,auth:n}),delete:(e,t=!0)=>i8(e,{method:`DELETE`,auth:t})};async function o8(e,t,n,r){let i=await a8.post(`/auth/admin-login`,{username:e,password:t,captcha_token:n,remember_me:r||!1},!1);return t8(i.accessToken),i.user}async function s8(){await a8.post(`/auth/logout`),n8()}async function c8(){try{return await a8.get(`/auth/me`)}catch{return null}}async function l8(e,t){let n={};e&&(n.start_date=e),t&&(n.end_date=t);let r=new URLSearchParams(n).toString();return a8.get(`/admin/stats${r?`?${r}`:``}`)}async function u8(e=1,t=20,n,r,i){let a=new URLSearchParams;return a.set(`page`,String(e)),a.set(`page_size`,String(t)),n&&a.set(`search`,n),r&&a.set(`user_type`,r),i&&a.set(`frontend_user_kind`,i),a8.get(`/admin/users?${a.toString()}`)}async function d8(e,t){return a8.put(`/admin/users/${e}/frontend-kind`,{frontend_user_kind:t})}async function f8(e,t,n){await a8.post(`/admin/users/${e}/credits`,{amount:t,description:n})}async function p8(e,t){await a8.put(`/admin/users/${e}/status`,{is_active:t})}async function m8(){return a8.get(`/admin/model-configs`)}async function h8(e){return e.id?a8.put(`/admin/model-configs/${e.id}`,e):a8.post(`/admin/model-configs`,e)}async function g8(e){await a8.delete(`/admin/model-configs/${e}`)}async function _8(){return a8.get(`/admin/system-configs`)}async function v8(e,t){await a8.put(`/admin/system-configs/${e}`,{value:t})}async function y8(e,t){let n=new FormData;n.append(`file`,e),n.append(`config_key`,t);let r=localStorage.getItem(`auth_token`),i=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/admin/upload-pdf`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!i.ok){let e=await i.text();throw Error(e||`上传失败`)}return i.json()}async function b8(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/admin/upload-logo`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok){let e=await r.text();throw Error(e||`上传失败`)}return r.json()}function x8(e,t,n){n!=null&&String(n)!==``&&e.set(t,String(n))}async function S8(e){let t=new URLSearchParams;x8(t,`page`,e?.page),x8(t,`page_size`,e?.pageSize),x8(t,`user_id`,e?.userId),x8(t,`user_name`,e?.userName),x8(t,`user_type`,e?.userType),x8(t,`frontend_user_kind`,e?.frontendUserKind),x8(t,`record_type`,e?.recordType||e?.type),x8(t,`credit_subject`,e?.creditSubject),x8(t,`media_type`,e?.mediaType),x8(t,`charge_kind`,e?.chargeKind),x8(t,`source_module`,e?.sourceModule),x8(t,`source_step_code`,e?.sourceStepCode),x8(t,`billing_scene`,e?.billingScene),x8(t,`start_date`,e?.startDate),x8(t,`end_date`,e?.endDate);let n=t.toString()?`?${t}`:``;return a8.get(`/admin/credit-records${n}`)}async function C8(){return a8.get(`/admin/industry-configs`)}async function w8(e){return e.id?a8.put(`/admin/industry-configs/${e.id}`,e):a8.post(`/admin/industry-configs`,e)}async function T8(e){await a8.delete(`/admin/industry-configs/${e}`)}async function E8(){return a8.get(`/admin/video-engines`)}async function D8(e){return e.id?a8.put(`/admin/video-engines/${e.id}`,e):a8.post(`/admin/video-engines`,e)}async function O8(e){await a8.delete(`/admin/video-engines/${e}`)}async function k8(){return a8.get(`/admin/image-engines`)}async function A8(e){return e.id?a8.put(`/admin/image-engines/${e.id}`,e):a8.post(`/admin/image-engines`,e)}async function j8(e){await a8.delete(`/admin/image-engines/${e}`)}async function M8(){return a8.get(`/admin/credit-ratios`)}async function N8(e){return e.id?a8.put(`/admin/credit-ratios/${e.id}`,e):a8.post(`/admin/credit-ratios`,e)}async function P8(e){await a8.delete(`/admin/credit-ratios/${e}`)}async function F8(){return a8.get(`/admin/payment-configs`)}async function I8(e){await a8.put(`/admin/payment-configs/batch`,e)}async function L8(e){let t=new URLSearchParams;e?.paymentMethod&&t.set(`payment_method`,e.paymentMethod),e?.status&&t.set(`status`,e.status),e?.startDate&&t.set(`start_date`,e.startDate),e?.endDate&&t.set(`end_date`,e.endDate);let n=t.toString(),r=n?`/admin/payment-stats?${n}`:`/admin/payment-stats`;return a8.get(r)}async function R8(e){let t=new URLSearchParams;return e?.method&&t.set(`payment_method`,e.method),e?.status&&t.set(`status`,e.status),e?.startDate&&t.set(`start_date`,e.startDate),e?.endDate&&t.set(`end_date`,e.endDate),e?.page&&t.set(`page`,String(e.page)),e?.pageSize&&t.set(`page_size`,String(e.pageSize)),a8.get(`/admin/payment-orders?${t.toString()}`)}async function z8(e){await a8.post(`/admin/payment-orders/${e}/refund`)}async function B8(e=1,t=20){let n=new URLSearchParams;return n.set(`page`,String(e)),n.set(`page_size`,String(t)),a8.get(`/admin/notifications?${n.toString()}`)}async function V8(e){await a8.post(`/admin/notifications`,e)}async function H8(e){await a8.delete(`/admin/notifications/${e}`)}async function U8(e){return a8.get(`/admin/notifications/${e}/read-users`)}async function W8(){return a8.get(`/admin/menu-configs`)}async function G8(e){return e.id?a8.put(`/admin/menu-configs/${e.id}`,e):a8.post(`/admin/menu-configs`,e)}async function K8(e){await a8.delete(`/admin/menu-configs/${e}`)}async function q8(e){return a8.post(`/admin/users`,e)}async function J8(e,t){await a8.put(`/admin/users/${e}/menus`,{allowed_menus:t})}async function Y8(e,t){await a8.put(`/admin/users/${e}/reset-password`,{new_password:t})}async function X8(e,t){await a8.post(`/admin/change-password`,{old_password:e,new_password:t})}async function Z8(){return a8.get(`/auth/site-info`,!1)}async function Q8(){return a8.get(`/admin/recharge-packages`)}async function $8(e){return e.id?a8.put(`/admin/recharge-packages/${e.id}`,e):a8.post(`/admin/recharge-packages`,e)}async function e5(e){await a8.delete(`/admin/recharge-packages/${e}`)}async function t5(e){let t=e?`?page=${e}`:``;return a8.get(`/admin/operation-logs${t}`)}async function n5(e){let t=e?`?page=${e}`:``;return a8.get(`/admin/user-oauth-apps/list${t}`)}async function r5(e){return a8.post(`/admin/user-oauth-apps/create`,e)}async function i5(e){return a8.get(`/admin/user-oauth-apps/read/${e}`)}async function a5(e,t){return a8.post(`/admin/user-oauth-apps/update/${e}`,t)}async function o5(e){await a8.get(`/admin/user-oauth-apps/delete/${e}`)}async function s5(e){let t=new URLSearchParams;e?.page&&t.set(`page`,String(e.page)),e?.page_size&&t.set(`page_size`,String(e.page_size)),e?.type_name&&t.set(`type_name`,e.type_name),e?.open_type&&t.set(`open_type`,String(e.open_type));let n=t.toString();return a8.get(`/open-type/list${n?`?${n}`:``}`)}async function c5(e){return a8.get(`/open-type/select/${e}`)}async function l5(e){return a8.post(`/open-type/create`,e)}async function u5(e,t){return a8.put(`/open-type/update/${e}`,t)}async function d5(e){await a8.delete(`/open-type/delete/${e}`)}async function f5(e){let t=new URLSearchParams;e?.userId&&t.set(`user_id`,e.userId),e?.status&&t.set(`status`,e.status),e?.page&&t.set(`page`,String(e.page)),e?.pageSize&&t.set(`page_size`,String(e.pageSize));let n=t.toString();return a8.get(`/admin/generation-records${n?`?${n}`:``}`)}async function p5(e,t,n){await a8.put(`/admin/generation-records/${e}/status`,{status:t,video_url:n})}async function m5(e,t,n,r){await a8.post(`/admin/generation-records/${e}/generate`,{aspect_ratio:t,resolution:n,image_size:r})}async function h5(){return a8.get(`/generation-ai/engines`)}async function g5(e){let t=new URLSearchParams;e?.genType&&t.set(`gen_type`,e.genType),e?.status&&t.set(`status`,e.status),e?.page&&t.set(`page`,String(e.page)),e?.pageSize&&t.set(`page_size`,String(e.pageSize)),e?.userId&&t.set(`user_id`,e.userId),e?.userName&&t.set(`user_name`,e.userName);let n=t.toString();return a8.get(`/generation-ai/tasks${n?`?${n}`:``}`)}function _5(e,t,n){n==null||String(n).trim()===``||e.set(t,String(n))}async function v5(e){let t=new URLSearchParams;_5(t,`status`,e?.status),_5(t,`keyword`,e?.keyword),_5(t,`user_id`,e?.userId),_5(t,`user_name`,e?.userName),_5(t,`created_start`,e?.createdStart),_5(t,`created_end`,e?.createdEnd),_5(t,`page`,e?.page),_5(t,`page_size`,e?.pageSize);let n=t.toString();return a8.get(`/hot-opening-replications/tasks${n?`?${n}`:``}`)}async function y5(e){return a8.get(`/hot-opening-replications/tasks/${e}`)}async function b5(e){let t=new URLSearchParams;_5(t,`status`,e?.status),_5(t,`analysis_status`,e?.analysisStatus),_5(t,`split_status`,e?.splitStatus),_5(t,`keyword`,e?.keyword),_5(t,`user_id`,e?.userId),_5(t,`user_name`,e?.userName),_5(t,`created_start`,e?.createdStart),_5(t,`created_end`,e?.createdEnd),_5(t,`page`,e?.page),_5(t,`page_size`,e?.pageSize);let n=t.toString();return a8.get(`/shot-replications/task-sets${n?`?${n}`:``}`)}async function x5(e){return a8.get(`/shot-replications/task-sets/${e}`)}async function S5(e,t){let n=new URLSearchParams;_5(n,`source_mode`,t?.sourceMode),_5(n,`split_status`,t?.splitStatus),_5(n,`analysis_status`,t?.analysisStatus),_5(n,`replicate_status`,t?.replicateStatus),_5(n,`page`,t?.page),_5(n,`page_size`,t?.pageSize);let r=n.toString();return a8.get(`/shot-replications/task-sets/${e}/segments${r?`?${r}`:``}`)}async function C5(e){return a8.get(`/shot-replications/segments/${e}`)}async function w5(e){return a8.get(`/shot-replications/projects/${e}`)}async function T5(){return a8.get(`/admin/video-prompt-schema-config`)}async function E5(e){return a8.put(`/admin/video-prompt-schema-config`,e)}async function D5(){return a8.post(`/admin/video-prompt-schema-config/reset-default`)}async function O5(){return a8.get(`/admin/video-prompt-schema-config/export`)}async function k5(e){return a8.post(`/admin/video-prompt-schema-config/import`,e)}async function A5(e){return a8.post(`/admin/video-prompt-schema-config/preview`,e)}async function j5(e){return a8.post(`/user-oauth/request_oauth`,e)}async function M5(e){let t=new URLSearchParams;return e.account_userid&&t.set(`account_userid`,e.account_userid),e.open_type!==void 0&&t.set(`open_type`,String(e.open_type)),e.account_id&&t.set(`account_id`,e.account_id),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),a8.get(`/user-oauth/oauth_list?${t.toString()}`)}async function N5(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/generation-records/upload-image`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok)throw Error(`图片上传失败`);let i=await r.json();return{url:i.url,filename:i.filename}}async function P5(){return a8.get(`/material-consumption/fields`)}async function F5(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.user_id&&t.set(`user_id`,e.user_id),e.consume_date!==void 0&&t.set(`consume_date`,e.consume_date[0]+`,`+e.consume_date[1]),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),a8.get(`/material-consumption/admin/list?${t.toString()}`)}var I5=H6(e=>({user:null,loading:!0,login:async(t,n,r)=>{e({user:await o8(t,n,void 0,r)})},logout:async()=>{await s8(),e({user:null})},checkAuth:async()=>{try{if(!localStorage.getItem(`auth_token`)){e({user:null,loading:!1});return}e({user:await c8(),loading:!1})}catch(t){(t?.message?.includes(`401`)||t?.message?.includes(`Unauthorized`))&&localStorage.removeItem(`auth_token`),e({user:null,loading:!1})}}})),L5=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Q=o(((e,t)=>{t.exports=L5()}))(),{Sider:R5,Content:z5}=wW,B5={HomeOutlined:(0,Q.jsx)(Z2,{}),PlayCircleOutlined:(0,Q.jsx)(J4,{}),WalletOutlined:(0,Q.jsx)(N6,{}),RobotOutlined:(0,Q.jsx)(o3,{}),SettingOutlined:(0,Q.jsx)(D3,{}),BellOutlined:(0,Q.jsx)(f0,{}),UserOutlined:(0,Q.jsx)(D6,{}),AppstoreOutlined:(0,Q.jsx)(G1,{}),FileTextOutlined:(0,Q.jsx)(KV,{}),StarOutlined:(0,Q.jsx)(Z3,{}),HeartOutlined:(0,Q.jsx)(H2,{}),CameraOutlined:(0,Q.jsx)(D0,{}),DashboardOutlined:(0,Q.jsx)(r2,{}),CalculatorOutlined:(0,Q.jsx)(w0,{}),DollarOutlined:(0,Q.jsx)(l2,{}),GiftOutlined:(0,Q.jsx)(I2,{}),ThunderboltOutlined:(0,Q.jsx)(l6,{}),FireOutlined:(0,Q.jsx)(D2,{}),CloudOutlined:(0,Q.jsx)(z0,{}),SmileOutlined:(0,Q.jsx)(H3,{}),TrophyOutlined:(0,Q.jsx)(h6,{}),RocketOutlined:(0,Q.jsx)(l3,{}),BulbOutlined:(0,Q.jsx)(x0,{}),CodeOutlined:(0,Q.jsx)(G0,{}),PictureOutlined:(0,Q.jsx)(H4,{}),VideoCameraOutlined:(0,Q.jsx)(A6,{}),AudioOutlined:(0,Q.jsx)(r0,{}),MailOutlined:(0,Q.jsx)(v4,{}),PhoneOutlined:(0,Q.jsx)(z4,{}),GlobalOutlined:(0,Q.jsx)(z2,{}),ShoppingCartOutlined:(0,Q.jsx)(A3,{}),TeamOutlined:(0,Q.jsx)(o6,{}),BarChartOutlined:(0,Q.jsx)(l0,{}),PieChartOutlined:(0,Q.jsx)(G4,{}),LineChartOutlined:(0,Q.jsx)(o4,{}),SecurityScanOutlined:(0,Q.jsx)(x3,{}),ApiOutlined:(0,Q.jsx)(H1,{}),DatabaseOutlined:(0,Q.jsx)(o2,{}),CloudServerOutlined:(0,Q.jsx)(H0,{}),MenuOutlined:(0,Q.jsx)(w4,{}),PlusOutlined:(0,Q.jsx)(TL,{}),EditOutlined:(0,Q.jsx)(zQ,{}),DeleteOutlined:(0,Q.jsx)(IQ,{}),LockOutlined:(0,Q.jsx)(f4,{}),LogoutOutlined:(0,Q.jsx)(h4,{})},V5=()=>{let e=Ye(),t=Ke(),{user:n,loading:r,logout:i}=I5(),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)(!1),[l]=X.useForm(),[u,d]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`);return e&&JSON.parse(e).siteName||`管理后台`}),[f,p]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`);return e&&JSON.parse(e).siteLogo||``});if((0,S.useEffect)(()=>{Z8().then(e=>{let t=e.siteName||`管理后台`,n=e.siteLogo||``;if(d(t),p(n),document.title=t,localStorage.setItem(`siteInfo`,JSON.stringify({siteName:t,siteLogo:n})),n){let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=n,e.type=`image/png`}}).catch(()=>{})},[]),(0,S.useEffect)(()=>{W8().then(e=>{let t=e.filter(e=>{let t=e.menu_target??e.menuTarget??`admin`;return(e.is_active??e.isActive??!0)&&(t===`admin`||t===`both`)}),r=!!(n?.isAdmin??n?.is_admin);if(n&&!r){let e=n.allowedMenus??n?.allowed_menus;if(e&&Array.isArray(e)&&e.length>0){let n=new Set(e);t=t.filter(e=>(e.menu_type??e.menuType)===`group`?t.some(t=>(t.parent_id??t.parentId)===e.id&&n.has(t.path)):n.has(e.path))}else t=[]}o(t)}).catch(()=>{})},[n]),r)return(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,Q.jsx)(SG,{size:`large`})});if(!n)return(0,Q.jsx)(Ct,{to:`/admin/login`,replace:!0});let m={};a.filter(e=>(e.menu_type??e.menuType)!==`group`&&(e.parent_id??e.parentId)).forEach(e=>{let t=e.parent_id??e.parentId;m[t]||(m[t]=[]),m[t].push(e)});let h=[...a].sort((e,t)=>(e.sort_order??e.sortOrder??0)-(t.sort_order??t.sortOrder??0)),g=[];h.forEach(e=>{let t=e.menu_type??e.menuType,n=e.parent_id??e.parentId;if(t===`group`){let t=(m[e.id]||[]).sort((e,t)=>(e.sort_order??e.sortOrder??0)-(t.sort_order??t.sortOrder??0)).map(e=>({key:e.path,icon:B5[e.icon]||void 0,label:e.label}));t.length>0&&g.push({key:`group-${e.id}`,icon:B5[e.icon]||void 0,label:e.label,children:t})}else n||g.push({key:e.path,icon:B5[e.icon]||void 0,label:e.label})});let _=!!(n?.isAdmin??n?.is_admin);g.length===0&&_&&g.push({key:`/`,icon:(0,Q.jsx)(r2,{}),label:`数据概览`},{key:`/users`,icon:(0,Q.jsx)(D6,{}),label:`用户管理`});let v=t.pathname,y=[];g.forEach(e=>{e.children?e.children.forEach(e=>y.push(e.key)):y.push(e.key)}),y.includes(v)||(v=y.find(e=>v.startsWith(e))||`/`);let b=[];return g.forEach(e=>{e.children&&e.children.some(e=>e.key===v)&&b.push(e.key)}),(0,Q.jsxs)(wW,{style:{minHeight:`100vh`,background:`#f1f5f9`},children:[(0,Q.jsxs)(R5,{width:240,theme:`light`,style:{position:`fixed`,left:16,top:16,bottom:16,width:240,background:`linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,border:`1px solid rgba(0, 0, 0, 0.06)`,zIndex:100},children:[(0,Q.jsxs)(`div`,{style:{height:80,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:12,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`},children:[(0,Q.jsx)(`div`,{style:{width:42,height:42,borderRadius:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,overflow:`hidden`},children:f?(0,Q.jsx)(`img`,{src:f,alt:`logo`,style:{width:28,height:28,objectFit:`contain`}}):(0,Q.jsx)(l6,{style:{fontSize:20,color:`#ffffff`}})}),(0,Q.jsx)(`span`,{style:{color:`#1e293b`,fontSize:17,fontWeight:700,letterSpacing:-.02,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:u})]}),(0,Q.jsx)(`div`,{style:{overflowY:`auto`,maxHeight:`calc(100vh - 200px)`,paddingRight:8},children:(0,Q.jsx)(GE,{mode:`inline`,selectedKeys:[v],defaultOpenKeys:b,items:g,style:{background:`transparent`,border:`none`,paddingTop:8,marginTop:8},onClick:({key:t})=>{t.startsWith(`group-`)||e(t)},theme:`light`})}),(0,Q.jsx)(`div`,{style:{position:`absolute`,bottom:16,left:16,right:16,padding:12,background:`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,borderRadius:12,border:`1px solid rgba(0, 0, 0, 0.06)`},children:(0,Q.jsx)(UV,{menu:{items:[{key:`user`,icon:(0,Q.jsx)(D6,{}),label:n?.username,disabled:!0},{type:`divider`},{key:`changePwd`,icon:(0,Q.jsx)(f4,{}),label:`修改密码`},{key:`logout`,icon:(0,Q.jsx)(h4,{}),label:`退出登录`,danger:!0}],onClick:({key:t})=>{t===`logout`&&(i(),e(`/login`)),t===`changePwd`&&(c(!0),l.resetFields())}},placement:`topRight`,arrow:!0,children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,cursor:`pointer`,padding:`8px 12px`,borderRadius:12,transition:`all 0.25s ease`,background:`transparent`},onMouseEnter:e=>{e.currentTarget.style.background=`#ffffff`,e.currentTarget.style.boxShadow=`0 4px 12px rgba(0, 0, 0, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`,e.currentTarget.style.boxShadow=`none`},children:[(0,Q.jsx)(zw,{size:32,icon:(0,Q.jsx)(D6,{}),style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`}}),(0,Q.jsxs)(`div`,{style:{flex:1,overflow:`hidden`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:13,fontWeight:600,color:`#1e293b`,display:`block`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:n?.username}),(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:_?`管理员`:`普通用户`})]})]})})})]}),(0,Q.jsxs)(wW,{style:{marginLeft:272,marginTop:16,marginRight:16,marginBottom:16,background:`transparent`},children:[(0,Q.jsx)(`div`,{style:{height:72,background:`#ffffff`,borderRadius:`16px 16px 0 0`,boxShadow:`0 2px 12px rgba(0, 0, 0, 0.04)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`0 32px`,fontFamily:`var(--font-sans)`,border:`1px solid rgba(0, 0, 0, 0.06)`,borderBottom:`none`},children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:18,color:`#1e293b`,fontWeight:600},children:g.find(e=>e.key===v)?.label||g.flatMap(e=>e.children||[]).find(e=>e.key===v)?.label||`管理后台`})}),(0,Q.jsx)(z5,{style:{padding:32,background:`#ffffff`,borderRadius:`0 0 16px 16px`,boxShadow:`0 4px 24px rgba(0, 0, 0, 0.06)`,overflow:`auto`,border:`1px solid rgba(0, 0, 0, 0.06)`,borderTop:`none`},children:g.length===0&&!_?(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`60vh`,color:`#94a3b8`},children:[(0,Q.jsx)(f4,{style:{fontSize:48,marginBottom:16,color:`#cbd5e1`}}),(0,Q.jsx)(`div`,{style:{fontSize:16,fontWeight:600,color:`#64748b`},children:`暂无任何权限`}),(0,Q.jsx)(`div`,{style:{fontSize:13,marginTop:8},children:`请联系管理员配置菜单权限`})]}):(0,Q.jsx)(wt,{})})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(f4,{}),`修改密码`]}),open:s,onOk:async()=>{try{let e=await l.validateFields();if(e.newPassword!==e.confirmPassword){LG.error(`两次输入的密码不一致`);return}await X8(e.oldPassword,e.newPassword),LG.success(`密码修改成功`),c(!1),l.resetFields()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`修改失败`)}},onCancel:()=>{c(!1),l.resetFields()},okText:`确认修改`,cancelText:`取消`,width:420,children:(0,Q.jsxs)(X,{form:l,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`oldPassword`,label:`原密码`,rules:[{required:!0,message:`请输入原密码`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请输入原密码`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`newPassword`,label:`新密码`,rules:[{required:!0,min:6,message:`密码至少6位`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`confirmPassword`,label:`确认新密码`,rules:[{required:!0,message:`请再次输入新密码`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请再次输入新密码`,size:`large`})})]})})]})},H5={1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`},U5={1:`巨量`,2:`磁力`,3:`巨量星图`,4:`服务单`,5:`腾讯`},W5=e=>{if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`},G5=()=>{let{message:e}=ox.useApp(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(void 0),[d,f]=(0,S.useState)(1),[p,m]=(0,S.useState)(10),[h,g]=(0,S.useState)(0),[_,v]=(0,S.useState)({account_userid:``,open_type:void 0,account_id:``});(0,S.useEffect)(()=>{y()},[]);let y=async(t=1,r=10,i=_)=>{o(!0);try{let e=await M5({page:t,page_size:r,account_userid:i.account_userid||void 0,open_type:i.open_type,account_id:i.account_id||void 0});e?(e.data&&n(e.data.data||e.data),e.pagination&&(g(e.pagination.total||0),f(e.pagination.page||1),m(e.pagination.pageSize||10))):n(e||[])}catch{e.error(`获取授权列表失败`)}finally{o(!1)}},b=()=>{c(!0)},x=async()=>{if(!l){e.warning(`请选择开户方式`);return}i(!0);try{let t=await j5({open_type:l});t.authUrl?window.open(t.authUrl,`_blank`):e.error(`获取授权链接失败`)}catch{e.error(`请求授权失败`)}finally{i(!1),c(!1),u(void 0)}},C=[{title:`ID`,dataIndex:`id`,key:`id`},{title:`授权账户ID`,dataIndex:`accountId`,key:`accountId`,width:160},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权账户用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,render:e=>(0,Q.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})},{title:`授权账户用户名`,dataIndex:`accountUsername`,key:`accountUsername`},{title:`授权应用ID`,dataIndex:`appid`,key:`appid`},{title:`是否敏感物料授权`,dataIndex:`materialAuthStatus`,key:`materialAuthStatus`,width:100,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`是`:`否`})},{title:`开户方式`,dataIndex:`openType`,key:`openType`,render:e=>(0,Q.jsx)(`span`,{style:{color:`#1e293b`},children:H5[e]||e})},{title:`平台端口`,dataIndex:`portType`,key:`portType`,ellipsis:!0,render:e=>(0,Q.jsx)(`span`,{style:{color:`#1e293b`},children:U5[e]||e})},{title:`用户id`,dataIndex:`userId`,key:`userId`},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,Q.jsx)(`span`,{style:{color:`#64748b`},children:W5(e)})},{title:`更新时间`,dataIndex:`updatedAt`,key:`updatedAt`,width:160,render:e=>(0,Q.jsx)(`span`,{style:{color:`#64748b`},children:W5(e)})},{title:`操作`,key:`action`,width:120,render:(e,t)=>(0,Q.jsx)(vn,{to:`/consume?accountId=${t.id}`,style:{color:`#6366f1`},children:`查看消耗`})}],w=t.map((e,t)=>({...e,index:t+1,key:e.id}));return(0,Q.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(f4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`授权管理`})]}),(0,Q.jsx)(qE,{type:`primary`,size:`medium`,icon:(0,Q.jsx)(TL,{}),onClick:b,loading:r,style:{borderRadius:8,fontSize:14,fontWeight:500},children:`点击授权`})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12,marginBottom:16},children:[(0,Q.jsx)(hW,{placeholder:`账号用户ID`,value:_.account_userid,onChange:e=>v(t=>({...t,account_userid:e.target.value})),style:{width:180},onPressEnter:()=>{f(1),y(1,p)}}),(0,Q.jsx)(RC,{placeholder:`开户方式`,value:_.open_type,onChange:e=>v(t=>({...t,open_type:e})),style:{width:140},options:Object.entries(H5).map(([e,t])=>({value:Number(e),label:t}))}),(0,Q.jsx)(hW,{placeholder:`账号ID`,value:_.account_id,onChange:e=>v(t=>({...t,account_id:e.target.value})),style:{width:180},onPressEnter:()=>{f(1),y(1,p)}}),(0,Q.jsx)(qE,{type:`primary`,size:`medium`,onClick:()=>{f(1),y(1,p)},children:`搜索`}),(0,Q.jsx)(qE,{size:`medium`,onClick:()=>{v({account_userid:``,open_type:void 0,account_id:``}),f(1),y(1,p)},children:`重置`})]}),(0,Q.jsx)(bQ,{dataSource:w,columns:C,loading:a,rowKey:`id`,bordered:!1,scroll:{x:`max-content`},pagination:{current:d,pageSize:p,total:h,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{f(e),m(t),y(e,t)},size:`small`}})]}),(0,Q.jsx)(BG,{title:`选择开户方式`,open:s,onOk:x,onCancel:()=>{c(!1),u(void 0)},okText:`确认授权`,cancelText:`取消`,confirmLoading:r,children:(0,Q.jsx)(RC,{placeholder:`请选择开户方式`,value:l,onChange:e=>u(e),style:{width:`100%`},options:Object.entries(H5).map(([e,t])=>({value:Number(e),label:t}))})})]})},{RangePicker:K5}=YB,q5=e=>e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),J5=()=>{Ye();let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)([]),[u,d]=(0,S.useState)([]),[f,p]=(0,S.useState)(``),[m,h]=(0,S.useState)(1),[g,_]=(0,S.useState)(10),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)();(0,S.useEffect)(()=>{E(),T()},[m,g,C]);let T=async()=>{a(!0);try{let e=await F5({advertiser_id:v||void 0,user_id:b||void 0,consume_date:C,page:m,page_size:g});t(e.data||[]),r(e.pagination?.total||0)}catch{LG.error(`加载数据失败`)}finally{a(!1)}},E=async()=>{try{let e=((await P5()).data||[]).map(e=>({name:q5(e.field),description:e.description}));l(e);let t=localStorage.getItem(`consumeColumns`);d(t?JSON.parse(t):e.map(e=>e.name))}catch{LG.error(`加载表头字段失败`)}},D=e.map((e,t)=>({...e,index:t+1,key:e.id})),O=()=>{h(1),T()},k=()=>{y(``),x(``),w(void 0),h(1),T()},A=u.map(e=>c.find(t=>t.name===e)).filter(e=>!!e).map(e=>({title:e.description,dataIndex:e.name,key:e.name,ellipsis:!0}));return(0,Q.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(l2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`消耗记录`})]}),(0,Q.jsx)(VV,{children:(0,Q.jsx)(qE,{icon:(0,Q.jsx)(D3,{}),onClick:()=>s(!0),children:`自定义表头`})})]}),(0,Q.jsx)(`div`,{style:{marginBottom:16},children:(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(hW,{placeholder:`广告主ID`,value:v,onChange:e=>y(e.target.value),style:{width:200}}),(0,Q.jsx)(hW,{placeholder:`用户ID`,value:b,onChange:e=>x(e.target.value),style:{width:200}}),(0,Q.jsx)(K5,{value:C?[(0,YE.default)(C[0]),(0,YE.default)(C[1])]:void 0,onChange:e=>{e&&e[0]&&e[1]?w([e[0].format(`YYYY-MM-DD`),e[1].format(`YYYY-MM-DD`)]):w(void 0)}}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(NC,{}),onClick:O,children:`搜索`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:k,children:`重置`})]})}),(0,Q.jsx)(bQ,{dataSource:D,columns:A,loading:i,rowKey:`id`,bordered:!1,scroll:{x:`max-content`},pagination:{current:m,pageSize:g,total:n,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,size:`small`,onChange:(e,t)=>{h(e),_(t)}}})]}),(0,Q.jsx)(BG,{title:`自定义表头`,open:o,onOk:()=>{localStorage.setItem(`consumeColumns`,JSON.stringify(u)),LG.success(`表头设置已保存`),s(!1)},onCancel:()=>{s(!1),p(``)},okText:`确定`,cancelText:`取消`,width:800,children:(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:20,height:400},children:[(0,Q.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,Q.jsx)(hW,{placeholder:`搜索指标...`,value:f,allowClear:!0,onChange:e=>p(e.target.value),style:{marginBottom:8}}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,marginBottom:12,display:`block`},children:`输入指标名称进行搜索`}),(0,Q.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:[(0,Q.jsx)(`div`,{style:{marginBottom:16},children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:`任务详情指标`})}),(0,Q.jsx)(oz,{checked:u.length===c.length&&c.length>0,indeterminate:u.length>0&&u.length{e.target.checked?d(c.map(e=>e.name)):d([])},style:{marginBottom:12},children:`全选`}),(0,Q.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:8},children:c.filter(e=>e.description.toLowerCase().includes(f.toLowerCase())||e.name.toLowerCase().includes(f.toLowerCase())).map(e=>(0,Q.jsx)(oz,{checked:u.includes(e.name),onChange:t=>{t.target.checked?d(t=>[...t,e.name]):d(t=>t.filter(t=>t!==e.name))},children:e.description},e.name))})]})]}),(0,Q.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,Q.jsxs)(Z.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:[`已添加(`,u.length,`)`]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{size:`small`,onClick:()=>d([]),disabled:u.length===0,children:`清空`}),(0,Q.jsx)(qE,{size:`small`,onClick:async()=>{try{let e=((await P5()).data||[]).map(e=>({name:q5(e.field),description:e.description}));l(e),d(e.map(e=>e.name)),localStorage.removeItem(`consumeColumns`),LG.success(`表头字段已更新`)}catch{LG.error(`更新表头字段失败`)}},children:`更新表头字段`})]})]}),(0,Q.jsx)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:u.length===0?(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:14,textAlign:`center`,display:`block`,padding:`40px 0`},children:`暂无已选指标`}):(0,Q.jsx)(`div`,{children:u.map((e,t)=>{let n=c.find(t=>t.name===e);return(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`8px 12px`,borderBottom:`1px solid #f0f0f5`,cursor:`move`,userSelect:`none`},draggable:!0,onDragStart:e=>{e.dataTransfer.setData(`index`,String(t))},onDragOver:e=>{e.preventDefault()},onDrop:e=>{let n=parseInt(e.dataTransfer.getData(`index`)),r=t;if(n!==r){let e=[...u],[t]=e.splice(n,1);e.splice(r,0,t),d(e)}},children:[(0,Q.jsx)(Z.Text,{children:n?.description||e}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:t+1})]},e)})})})]})]})})]})},Y5=()=>{let e=Ye(),{login:t}=I5(),[n,r]=(0,S.useState)(!1),i=(()=>{try{let e=localStorage.getItem(`siteInfo`);if(e){let t=JSON.parse(e);return{siteName:t.siteName||`VideoGen.AI`,siteLogo:t.siteLogo||``}}}catch{}return{siteName:`VideoGen.AI`,siteLogo:``}})(),[a,o]=(0,S.useState)(i.siteName),[s,c]=(0,S.useState)(i.siteLogo);return(0,S.useEffect)(()=>{Z8().then(e=>{o(e.siteName),c(e.siteLogo)}).catch(()=>{})},[]),(0,Q.jsxs)(`div`,{style:{minHeight:`100vh`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundImage:`url(/backimage.png)`,backgroundSize:`cover`,backgroundPosition:`center`,backgroundRepeat:`no-repeat`,backgroundAttachment:`fixed`,position:`relative`,overflow:`hidden`},children:[(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(135deg, rgba(240,244,255,0.9) 0%, rgba(232,236,248,0.85) 40%, rgba(240,240,255,0.9) 70%, rgba(248,249,255,0.95) 100%)`}}),(0,Q.jsx)(`div`,{style:{position:`absolute`,width:500,height:500,borderRadius:`50%`,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,top:-150,right:-100,filter:`blur(40px)`}}),(0,Q.jsx)(`div`,{style:{position:`absolute`,width:400,height:400,borderRadius:`50%`,background:`radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%)`,bottom:-100,left:-80,filter:`blur(50px)`}}),(0,Q.jsxs)(PR,{variant:`outlined`,style:{width:440,borderRadius:20,boxShadow:`0 20px 60px rgba(0,0,0,0.08)`,border:`1px solid #e2e8f0`,background:`#fff`,zIndex:1},styles:{body:{padding:`36px 28px`}},children:[(0,Q.jsxs)(`div`,{style:{textAlign:`center`,marginBottom:28},children:[(0,Q.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,margin:`0 auto 16px`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:s?`transparent`:`linear-gradient(135deg, #6366f1, #8b5cf6)`,boxShadow:s?`none`:`0 8px 24px rgba(99,102,241,0.25)`},children:s?(0,Q.jsx)(`img`,{src:s,alt:`logo`,style:{width:`100%`,height:`100%`,borderRadius:14,objectFit:`contain`}}):(0,Q.jsx)(l6,{style:{fontSize:26,color:`#fff`}})}),(0,Q.jsxs)(Z.Title,{level:3,style:{margin:0,color:`#1e293b`,fontWeight:700},children:[a,(0,Q.jsx)(`span`,{style:{color:`#6366f1`},children:`.AI`})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:14,color:`#94a3b8`},children:`管理后台`})]}),(0,Q.jsxs)(X,{onFinish:async n=>{r(!0);try{await t(n.username,n.password,n.rememberMe),LG.success(`登录成功`),e(`/`)}catch(e){let t=e?.message||`登录失败`;LG.error(t)}finally{r(!1)}},layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`username`,rules:[{required:!0,message:`请输入用户名`}],children:(0,Q.jsx)(hW,{placeholder:`用户名`,size:`large`,prefix:(0,Q.jsx)(D6,{style:{color:`#94a3b8`,marginRight:8}}),style:{background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,height:48,borderRadius:10,fontSize:14}})}),(0,Q.jsx)(X.Item,{name:`password`,rules:[{required:!0,message:`请输入密码`}],children:(0,Q.jsx)(hW.Password,{placeholder:`密码`,size:`large`,prefix:(0,Q.jsx)(f4,{style:{color:`#94a3b8`,marginRight:8}}),style:{background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,height:48,borderRadius:10,fontSize:14}})}),(0,Q.jsx)(X.Item,{name:`rememberMe`,valuePropName:`checked`,style:{marginBottom:12},children:(0,Q.jsx)(oz,{children:`记住我的登录状态`})}),(0,Q.jsx)(X.Item,{style:{marginBottom:8},children:(0,Q.jsx)(qE,{type:`primary`,htmlType:`submit`,loading:n,block:!0,size:`large`,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登录管理后台`})})]})]})]})};o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(JE()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_zh_cn=r(n.dayjs)})(e,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`zh-cn`,weekdays:`星期日_星期一_星期二_星期三_星期四_星期五_星期六`.split(`_`),weekdaysShort:`周日_周一_周二_周三_周四_周五_周六`.split(`_`),weekdaysMin:`日_一_二_三_四_五_六`.split(`_`),months:`一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月`.split(`_`),monthsShort:`1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月`.split(`_`),ordinal:function(e,t){return t===`W`?e+`周`:e+`日`},weekStart:1,yearStart:4,formats:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`YYYY/MM/DD`,LL:`YYYY年M月D日`,LLL:`YYYY年M月D日Ah点mm分`,LLLL:`YYYY年M月D日ddddAh点mm分`,l:`YYYY/M/D`,ll:`YYYY年M月D日`,lll:`YYYY年M月D日 HH:mm`,llll:`YYYY年M月D日dddd HH:mm`},relativeTime:{future:`%s内`,past:`%s前`,s:`几秒`,m:`1 分钟`,mm:`%d 分钟`,h:`1 小时`,hh:`%d 小时`,d:`1 天`,dd:`%d 天`,M:`1 个月`,MM:`%d 个月`,y:`1 年`,yy:`%d 年`},meridiem:function(e,t){var n=100*e+t;return n<600?`凌晨`:n<900?`早上`:n<1100?`上午`:n<1300?`中午`:n<1800?`下午`:`晚上`}};return n.default.locale(r,null,!0),r}))}))(),YE.default.locale(`zh-cn`);var X5=()=>{let[e,t]=(0,S.useState)(null),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)([(0,YE.default)().startOf(`day`),(0,YE.default)()]),[o,s]=(0,S.useState)(`数据概览`),c=async()=>{r(!0);try{t(await l8(i[0]?.format(`YYYY-MM-DD`)||void 0,i[1]?.format(`YYYY-MM-DD`)||void 0))}catch{}r(!1)},l=async()=>{try{let e=(await _8()).find(e=>e.key===`site_name`);if(e){let t=`${e.value} 管理后台`;s(t),document.title=t}}catch{s(`数据概览`),document.title=`数据概览`}};(0,S.useEffect)(()=>{c(),l()},[]);let u=()=>{let e=[(0,YE.default)().startOf(`day`),(0,YE.default)()];a(e),m(e)},d=()=>{let e=(0,YE.default)().subtract(1,`day`),t=[e.startOf(`day`),e.endOf(`day`)];a(t),m(t)},f=()=>{let e=[(0,YE.default)().startOf(`week`),(0,YE.default)()];a(e),m(e)},p=()=>{let e=[(0,YE.default)().startOf(`month`),(0,YE.default)()];a(e),m(e)},m=e=>{let n=e[0]?.format(`YYYY-MM-DD`)||void 0,i=e[1]?.format(`YYYY-MM-DD`)||void 0;r(!0),l8(n,i).then(e=>{t(e),r(!1)}).catch(()=>{r(!1)})},h=e=>{e&&(a([e[0],e[1]]),m([e[0],e[1]]))},g=e?[{title:`用户数量`,value:e.totalUsers,lastPeriodValue:e.lastPeriodUsers,icon:(0,Q.jsx)(D6,{}),gradient:`linear-gradient(135deg, #667eea 0%, #764ba2 100%)`,prefix:``,suffix:`位用户`,description:`平台注册用户总数`},{title:`总项目数`,value:e.totalProjects,lastPeriodValue:e.lastPeriodProjects,icon:(0,Q.jsx)(Z4,{}),gradient:`linear-gradient(135deg, #00d4ff 0%, #0099cc 100%)`,prefix:``,suffix:`个项目`,description:`创建的项目总数`},{title:`项目记录`,value:e.totalRecords,lastPeriodValue:e.lastPeriodRecords,icon:(0,Q.jsx)(KV,{}),gradient:`linear-gradient(135deg, #10b981 0%, #059669 100%)`,prefix:``,suffix:`条记录`,description:`项目记录总数`},{title:`创作记录`,value:e.totalGenerations,lastPeriodValue:e.lastPeriodGenerations,icon:(0,Q.jsx)(J4,{}),gradient:`linear-gradient(135deg, #f59e0b 0%, #d97706 100%)`,prefix:``,suffix:`次创作`,description:`AI创作记录总数`}]:[],_=e?[{title:`支付宝收入`,value:e.todayAlipayRevenue,icon:(0,Q.jsx)(N6,{}),gradient:`linear-gradient(135deg, #22c55e 0%, #16a34a 100%)`,prefix:`¥`,suffix:``,description:`支付宝收款`,tag:`支付宝`},{title:`微信收入`,value:e.todayWechatRevenue,icon:(0,Q.jsx)(l2,{}),gradient:`linear-gradient(135deg, #3b82f6 0%, #2563eb 100%)`,prefix:`¥`,suffix:``,description:`微信收款`,tag:`微信支付`},{title:`总收入`,value:e.totalRevenue,lastPeriodValue:e.lastPeriodRevenue,icon:(0,Q.jsx)(e0,{}),gradient:`linear-gradient(135deg, #ec4899 0%, #be185d 100%)`,prefix:`¥`,suffix:``,description:`平台总收入`,tag:`总收入`},{title:`消耗积分`,value:e.creditsConsumedToday,lastPeriodValue:e.lastPeriodCreditsConsumed,icon:(0,Q.jsx)(l2,{}),gradient:`linear-gradient(135deg, #ef4444 0%, #dc2626 100%)`,prefix:``,suffix:`积分`,description:`用户消耗积分`,tag:`积分消耗`}]:[],v=({title:e,value:t,lastPeriodValue:r,icon:i,gradient:a,prefix:o=``,suffix:s=``,description:c,tag:l})=>{let u=r!==void 0&&r>0?((t-r)/r*100).toFixed(1):null,d=u!==null&&parseFloat(u)>=0;return(0,Q.jsx)(PR,{bordered:!1,loading:n,hoverable:!0,style:{borderRadius:16,border:`1px solid rgba(0,0,0,0.04)`,background:`#ffffff`,boxShadow:`0 4px 20px rgba(0,0,0,0.05)`,transition:`all 0.3s ease`,overflow:`hidden`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16,padding:`16px 0`},children:[(0,Q.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:a,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:24,color:`#fff`,flexShrink:0,boxShadow:`0 8px 24px rgba(0,0,0,0.1)`},children:i}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`,fontSize:13},children:e}),l&&(0,Q.jsx)(`span`,{style:{fontSize:10,padding:`2px 8px`,borderRadius:10,background:`rgba(99,102,241,0.1)`,color:`#6366f1`,fontWeight:500},children:l})]}),(0,Q.jsxs)(`div`,{style:{fontSize:28,fontWeight:800,color:`#1e293b`,letterSpacing:-.5,marginBottom:2},children:[o,typeof t==`number`?t.toLocaleString():t,s]}),c&&(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`,fontSize:11},children:c}),u!==null&&r!==void 0&&(0,Q.jsxs)(`div`,{style:{marginTop:8,paddingTop:8,borderTop:`1px solid #f1f5f9`,display:`flex`,alignItems:`center`,gap:8},children:[(0,Q.jsxs)(Z.Text,{style:{color:`#94a3b8`,fontSize:11},children:[`上一周期: `,o,r.toLocaleString(),s]}),(0,Q.jsxs)(`span`,{style:{fontSize:11,fontWeight:500,color:d?`#10b981`:`#ef4444`,display:`flex`,alignItems:`center`,gap:2},children:[d?`↑`:`↓`,` `,Math.abs(parseFloat(u)),`%`]})]})]})]})})};return(0,Q.jsxs)(`div`,{style:{padding:0},children:[(0,Q.jsxs)(`div`,{style:{background:`linear-gradient(135deg, #667eea 0%, #764ba2 100%)`,padding:`24px 24px 32px`,borderRadius:0,marginBottom:-24,position:`relative`,overflow:`hidden`},children:[(0,Q.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`rgba(255,255,255,0.1)`,borderRadius:`50%`}}),(0,Q.jsx)(`div`,{style:{position:`absolute`,bottom:-30,left:-30,width:150,height:150,background:`rgba(255,255,255,0.08)`,borderRadius:`50%`}}),(0,Q.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,Q.jsx)(Z.Title,{level:2,style:{color:`#fff`,marginBottom:4,fontWeight:700},children:o}),(0,Q.jsx)(Z.Text,{style:{color:`rgba(255,255,255,0.8)`,fontSize:14},children:`欢迎回来,查看平台运营数据统计`})]})]}),(0,Q.jsxs)(`div`,{style:{marginTop:40},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,alignItems:`center`,gap:12,flexWrap:`wrap`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{type:!i[0]||!i[1]||i[0]?.isSame((0,YE.default)().startOf(`day`))&&i[1]?.isSame((0,YE.default)(),`day`)?`primary`:`default`,size:`small`,onClick:u,children:`今日`}),(0,Q.jsx)(qE,{type:`default`,size:`small`,onClick:d,children:`昨日`}),(0,Q.jsx)(qE,{type:`default`,size:`small`,onClick:f,children:`本周`}),(0,Q.jsx)(qE,{type:`default`,size:`small`,onClick:p,children:`本月`})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,background:`#fff`,border:`1px solid #e2e8f0`,padding:`6px 12px`,borderRadius:8,boxShadow:`0 1px 2px rgba(0,0,0,0.05)`},children:[(0,Q.jsx)(zB,{style:{color:`#64748b`,fontSize:14}}),(0,Q.jsx)(YB.RangePicker,{value:i,onChange:h,placeholder:[`开始日期`,`结束日期`],size:`small`})]})]}),(0,Q.jsxs)(`div`,{style:{marginBottom:16,paddingLeft:4},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#1e293b`,fontSize:15},children:`核心数据`}),(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`,fontSize:12,marginLeft:8},children:`平台基础运营指标`})]}),(0,Q.jsx)(DK,{gutter:[16,16],children:g.map(e=>(0,Q.jsx)(pz,{xs:12,sm:8,lg:6,children:(0,Q.jsx)(v,{...e})},e.title))})]}),(0,Q.jsxs)(`div`,{style:{marginTop:24},children:[(0,Q.jsxs)(`div`,{style:{marginBottom:16,paddingLeft:4},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#1e293b`,fontSize:15},children:`财务统计`}),(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`,fontSize:12,marginLeft:8},children:`收入与消耗数据`})]}),(0,Q.jsx)(DK,{gutter:[16,16],children:_.map(e=>(0,Q.jsx)(pz,{xs:12,sm:8,lg:6,children:(0,Q.jsx)(v,{...e})},e.title))})]})]})};function Z5(e){if(!e)return`-`;let t=e.trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);return n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``),t.replace(`T`,` `).slice(0,16)}var Q5=e=>e instanceof Error?e:Error(typeof e==`string`?e:`上传失败`),$5=e=>{if(e instanceof File)return e;throw Error(`请选择有效图片文件`)},e7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(20),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(null),[v]=X.useForm(),[y]=X.useForm(),b=async(e,n)=>{a(!0);try{let i=await s5({page:e||o,page_size:n||c});t(i.items||[]),r(i.total||0)}catch{LG.error(`加载开户方式列表失败`)}finally{a(!1)}};(0,S.useEffect)(()=>{b()},[]);let x=async()=>{try{let e=await v.validateFields();console.log(e),await l5({open_type:e.open_type,type_name:e.type_name,description:e.description,thumb:e.thumb}),LG.success(`创建成功`),d(!1),v.resetFields(),b()}catch(e){LG.error(e?.message||`创建失败`)}},C=async e=>{try{_(await c5(e)),p(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},w=async e=>{try{let t=await c5(e);_(t),y.setFieldsValue({open_type:t.open_type,type_name:t.type_name,description:t.description,thumb:t.thumb}),h(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},T=async()=>{if(g)try{let e=await y.validateFields();await u5(g.id,{open_type:e.open_type,type_name:e.type_name,description:e.description,thumb:e.thumb}),LG.success(`更新成功`),h(!1),y.resetFields(),_(null),b()}catch(e){LG.error(e?.message||`更新失败`)}},E=e=>{BG.confirm({title:`确认删除`,content:`确定要删除这个开户方式吗?`,okText:`删除`,okType:`danger`,cancelText:`取消`,onOk:async()=>{try{await d5(e),LG.success(`删除成功`),b()}catch(e){LG.error(e?.message||`删除失败`)}}})};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`平台开户方式管理`})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>d(!0),children:`新增`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>b(),children:`刷新`})]})]}),(0,Q.jsx)(bQ,{columns:[{title:`ID`,dataIndex:`id`,width:100,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`开户类型`,dataIndex:`open_type`,width:100,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`类型名称`,dataIndex:`type_name`,width:150,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`描述`,dataIndex:`description`,width:250,ellipsis:!0,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:e})},{title:`缩略图`,dataIndex:`thumb`,width:120,render:e=>e?(0,Q.jsx)(`img`,{src:e,alt:`thumb`,style:{width:80,height:60,objectFit:`cover`}}):`-`},{title:`创建时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})},{title:`更新时间`,dataIndex:`updatedAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})},{title:`操作`,width:200,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(qU,{}),size:`small`,onClick:()=>C(t.id),children:`详情`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(zQ,{}),size:`small`,onClick:()=>w(t.id),children:`更新`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(IQ,{}),size:`small`,danger:!0,onClick:()=>E(t.id),children:`删除`})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:c,total:n,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{s(e),l(t),b(e,t)}},scroll:{x:1e3}})]}),(0,Q.jsx)(BG,{title:`新增开户方式`,open:u,onOk:x,onCancel:()=>{d(!1),v.resetFields()},okText:`创建`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:v,layout:`vertical`,children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户方式Id`,style:{flex:1},rules:[{required:!0,message:`请输入开户方式Id`}],children:(0,Q.jsx)(oB,{style:{width:`100%`},min:1,placeholder:`请输入开户方式Id`})}),(0,Q.jsx)(X.Item,{name:`type_name`,label:`类型名称`,style:{flex:1},rules:[{required:!0,message:`请输入类型名称`},{max:100,message:`类型名称不能超过100个字符`}],children:(0,Q.jsx)(hW,{style:{width:`100%`},placeholder:`请输入类型名称`})})]}),(0,Q.jsx)(X.Item,{name:`description`,label:`描述`,rules:[{required:!0,message:`请输入描述`}],children:(0,Q.jsx)(hW.TextArea,{placeholder:`请输入描述`,rows:4})}),(0,Q.jsx)(X.Item,{name:`thumb`,label:`缩略图`,children:(0,Q.jsx)(D1,{listType:`picture-card`,customRequest:async({file:e,onSuccess:t,onError:n})=>{try{let n=await N5($5(e));console.log(n),v.setFieldsValue({thumb:n.url}),t?.({url:n.url})}catch(e){n?.(Q5(e))}},children:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(w6,{style:{fontSize:24,color:`#999`}}),(0,Q.jsx)(`div`,{style:{marginTop:8},children:`上传图片`})]})})})]})}),(0,Q.jsx)(BG,{title:`开户方式详情`,open:f,onCancel:()=>{p(!1),_(null)},okText:`关闭`,cancelText:`取消`,width:600,children:g&&(0,Q.jsxs)(`div`,{style:{lineHeight:`2`},children:[(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`ID:`}),` `,g.id]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`开户类型:`}),` `,g.open_type]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`类型名称:`}),` `,g.type_name]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`描述:`}),` `,g.description]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`缩略图:`}),` `,g.thumb?(0,Q.jsx)(`img`,{src:g.thumb,alt:`thumb`,style:{width:120,height:80,objectFit:`cover`}}):`-`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`创建时间:`}),` `,Z5(g.createdAt)]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`更新时间:`}),` `,Z5(g.updatedAt)]})]})}),(0,Q.jsx)(BG,{title:`更新开户方式`,open:m,onOk:T,onCancel:()=>{h(!1),y.resetFields(),_(null)},okText:`更新`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:y,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户类型`,rules:[{required:!0,message:`请输入开户类型`}],children:(0,Q.jsx)(oB,{min:1,placeholder:`请输入开户类型编号`})}),(0,Q.jsx)(X.Item,{name:`type_name`,label:`类型名称`,rules:[{required:!0,message:`请输入类型名称`},{max:100,message:`类型名称不能超过100个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入类型名称`})}),(0,Q.jsx)(X.Item,{name:`description`,label:`描述`,rules:[{required:!0,message:`请输入描述`}],children:(0,Q.jsx)(hW.TextArea,{placeholder:`请输入描述`,rows:4})}),(0,Q.jsx)(X.Item,{name:`thumb`,label:`缩略图`,children:(0,Q.jsx)(D1,{listType:`picture-card`,defaultFileList:g?.thumb?[{uid:`1`,name:`thumb`,status:`done`,url:g.thumb}]:[],customRequest:async({file:e,onSuccess:t,onError:n})=>{try{let n=await N5($5(e));y.setFieldsValue({thumb:n.url}),t?.({url:n.url})}catch(e){n?.(Q5(e))}},children:!y.getFieldValue(`thumb`)&&(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(w6,{style:{fontSize:24,color:`#999`}}),(0,Q.jsx)(`div`,{style:{marginTop:8},children:`上传图片`})]})})})]})})]})},t7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(`frontend`),[c,l]=(0,S.useState)(``),[u,d]=(0,S.useState)({open:!1,user:null}),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(`frontend`),[g,_]=(0,S.useState)({open:!1,user:null}),[v,y]=(0,S.useState)([]),[b,x]=(0,S.useState)([]),[C,w]=(0,S.useState)({open:!1,user:null}),[T]=X.useForm(),[E]=X.useForm(),[D]=X.useForm(),[O,k]=(0,S.useState)(1),[A,j]=(0,S.useState)(20),[M,N]=(0,S.useState)(0),[P,F]=(0,S.useState)([]),[I]=X.useForm(),[L,R]=(0,S.useState)(!1),z=async()=>{r(!0);try{let e=await u8(O,A,i||void 0,o,o===`frontend`&&c||void 0);t(e.items||[]),N(e.total||0)}catch{}r(!1)};(0,S.useEffect)(()=>{z()},[O,A,i,o,c]),(0,S.useEffect)(()=>{(async()=>{try{let e=(await _8()).filter(e=>e.key.startsWith(`user_`)&&e.key.includes(`credits`));F(e);let t={};e.forEach(e=>{t[e.key]=e.value}),I.setFieldsValue(t)}catch{}})()},[]);let B=async()=>{try{let e=await I.validateFields();R(!0);for(let t of P){let n=e[t.key];n!==void 0&&n!==t.value&&await v8(t.id,n??``)}LG.success(`积分配置已保存`),F((await _8()).filter(e=>e.key.startsWith(`user_`)&&e.key.includes(`credits`))),R(!1)}catch(e){R(!1),LG.error(e?.message||`保存失败`)}},V=(e,t)=>{k(e),j(t)},H=()=>z(),U=async()=>{try{let e=await T.validateFields(),{user:t}=u;if(!t)return;await f8(t.id,e.amount,e.description),LG.success(`已${e.amount>0?`增加`:`扣除`} ${Math.abs(e.amount)} 积分`),d({open:!1,user:null}),T.resetFields(),z()}catch{}},W=async e=>{await p8(e.id,!e.isActive),LG.success(e.isActive?`已禁用该用户`:`已启用该用户`),z()},ee=async()=>{try{let e=await E.validateFields(),t=e.user_type||`frontend`;await q8({username:t===`admin`?e.username:void 0,password:e.password,email:e.email||void 0,phone:t===`frontend`?e.phone:e.phone||void 0,credits:e.credits||0,user_type:t,frontend_user_kind:e.frontend_user_kind||`external`}),LG.success(`用户创建成功`),p(!1),E.resetFields(),h(`frontend`),z()}catch{}},te=async e=>{try{let t=await W8(),n=e.userType===`admin`;y(t.filter(e=>{let t=e.menu_target??e.menuTarget??`frontend`;return n?t===`admin`||t===`both`:t===`frontend`||t===`both`})),x(e.allowedMenus||[]),_({open:!0,user:e})}catch{LG.error(`加载菜单失败`)}},ne=v.filter(e=>(e.menu_type??e.menuType)===`group`),re=v.filter(e=>(e.menu_type??e.menuType)!==`group`),ie={};re.filter(e=>e.parent_id??e.parentId).forEach(e=>{let t=e.parent_id??e.parentId;ie[t]||(ie[t]=[]),ie[t].push(e)});let ae=re.filter(e=>!(e.parent_id??e.parentId)),G=async()=>{let{user:e}=g;if(e)try{await J8(e.id,b.length>0?b:null),LG.success(`菜单权限已更新`),_({open:!1,user:null}),z()}catch(e){LG.error(e?.message||`保存失败`)}},oe=async()=>{try{let e=await D.validateFields(),{user:t}=C;if(!t)return;await Y8(t.id,e.newPassword),LG.success(`已重置 ${t.username} 的密码`),w({open:!1,user:null}),D.resetFields()}catch{}},K=async(e,t)=>{try{await d8(e.id,t),LG.success(t===`internal`?`已设为前台内部用户`:`已设为前台外部用户`),z()}catch(e){LG.error(e?.message||`设置失败`)}},se=o===`admin`,ce=[{title:`用户`,key:`user`,width:200,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:t.isAdmin?`linear-gradient(135deg, #f59e0b, #f97316)`:`linear-gradient(135deg, #6366f1, #8b5cf6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:13,fontWeight:700},children:t.username.charAt(0).toUpperCase()}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{fontWeight:600},children:[t.username,t.isAdmin&&(0,Q.jsx)(NQ,{color:`orange`,style:{marginLeft:6,fontSize:10},children:`管理员`})]}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.email})]})]})},...se?[]:[{title:`积分余额`,dataIndex:`credits`,width:120,sorter:(e,t)=>e.credits-t.credits,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,style:{color:e>0?`#10b981`:`#ef4444`,fontSize:15},children:e.toLocaleString()})}],{title:`手机号`,dataIndex:`phone`,width:130,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,children:e||`-`})},...se?[]:[{title:`前台归类`,dataIndex:`frontendUserKind`,width:110,render:e=>(0,Q.jsx)(NQ,{color:e===`internal`?`geekblue`:`default`,children:e===`internal`?`内部用户`:`外部用户`})}],{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`red`,children:e?`正常`:`禁用`})},{title:`注册时间`,dataIndex:`createdAt`,width:120,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})},{title:`最后登录`,dataIndex:`lastLoginAt`,width:140,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})},{title:`操作`,key:`action`,width:320,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[!se&&(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(N6,{}),onClick:()=>{d({open:!0,user:t}),T.resetFields()},children:`调整积分`}),!se&&t.frontendUserKind!==`internal`&&(0,Q.jsx)(qE,{type:`link`,size:`small`,onClick:()=>K(t,`internal`),children:`设为内部`}),!se&&t.frontendUserKind===`internal`&&(0,Q.jsx)(qE,{type:`link`,size:`small`,onClick:()=>K(t,`external`),children:`取消内部`}),(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(w4,{}),onClick:()=>te(t),children:`菜单权限`}),(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(f4,{}),onClick:()=>{w({open:!0,user:t}),D.resetFields()},children:`重置密码`}),(0,Q.jsx)(WG,{title:t.isActive?`确定禁用该用户?`:`确定启用该用户?`,onConfirm:()=>W(t),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:t.isActive,icon:t.isActive?(0,Q.jsx)(e6,{}):(0,Q.jsx)(N0,{}),children:t.isActive?`禁用`:`启用`})})]})}];return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:20},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:`#6366f1`},children:(0,Q.jsx)(D3,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:4,style:{margin:0},children:`积分配置`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`设置用户注册和登录赠送的积分`})]})]}),(0,Q.jsxs)(X,{form:I,layout:`vertical`,children:[(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr 1fr`,gap:20},children:[(0,Q.jsx)(X.Item,{name:`user_register_credits`,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:`注册赠送积分`}),extra:`用户注册时赠送的初始积分`,children:(0,Q.jsx)(oB,{min:0,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`user_login_credits`,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:`每日登录赠送积分`}),extra:`用户每日首次登录赠送的积分`,children:(0,Q.jsx)(oB,{min:0,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`user_login_credits_enabled`,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:`启用每日登录积分`}),extra:`是否开启每日登录赠送积分功能`,children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(Mq,{defaultChecked:P.find(e=>e.key===`user_login_credits_enabled`)?.value===`true`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:13},children:P.find(e=>e.key===`user_login_credits_enabled`)?.value===`true`?`已启用`:`已禁用`})]})})]}),(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:16},children:(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(v3,{}),onClick:B,loading:L,size:`large`,style:{borderRadius:8},children:`保存配置`})})]})]}),(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,Q.jsx)(hW,{placeholder:`搜索用户名或手机号`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),value:i,onChange:e=>a(e.target.value),onPressEnter:H,style:{width:280,borderRadius:8},allowClear:!0}),!se&&(0,Q.jsx)(RC,{value:c,onChange:e=>{k(1),l(e)},style:{width:140},options:[{value:``,label:`全部前台用户`},{value:`internal`,label:`内部用户`},{value:`external`,label:`外部用户`}]}),(0,Q.jsx)(qE,{type:`primary`,onClick:H,style:{borderRadius:8},children:`搜索`})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>{h(o),E.setFieldsValue({user_type:o}),p(!0)},style:{borderRadius:8},children:`创建用户`})]}),(0,Q.jsx)(bR,{activeKey:o,onChange:e=>{s(e),l(``),k(1)},items:[{key:`frontend`,label:`前台用户`},{key:`admin`,label:`后台用户`}]}),(0,Q.jsx)(bQ,{columns:ce,dataSource:e,rowKey:`id`,loading:n,pagination:{current:O,pageSize:A,total:M,onChange:V,showSizeChanger:!0,showTotal:e=>`共 ${e} 个用户`},scroll:{x:1e3}})]}),(0,Q.jsxs)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(N6,{}),`调整积分 - `,u.user?.username]}),open:u.open,onOk:U,onCancel:()=>{d({open:!1,user:null}),T.resetFields()},okText:`确认`,cancelText:`取消`,width:440,children:[(0,Q.jsxs)(`div`,{style:{marginBottom:16,padding:`12px 16px`,background:`#f8fafc`,borderRadius:8},children:[(0,Q.jsx)(`span`,{style:{color:`#64748b`},children:`当前积分:`}),(0,Q.jsx)(`span`,{style:{fontWeight:800,fontSize:18,color:`#6366f1`},children:u.user?.credits.toLocaleString()})]}),(0,Q.jsxs)(X,{form:T,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`amount`,label:`积分变动`,rules:[{required:!0,message:`请输入积分数量`}],children:(0,Q.jsx)(oB,{style:{width:`100%`},size:`large`,placeholder:`正数增加,负数扣除`,formatter:e=>`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,`,`)})}),(0,Q.jsx)(X.Item,{name:`description`,label:`原因`,rules:[{required:!0,message:`请输入调整原因`}],children:(0,Q.jsx)(hW.TextArea,{rows:2,placeholder:`请输入调整原因`,size:`large`})})]})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(D6,{}),`创建用户`]}),open:f,onOk:ee,onCancel:()=>{p(!1),E.resetFields(),h(`frontend`)},okText:`创建`,cancelText:`取消`,width:480,children:(0,Q.jsxs)(X,{form:E,layout:`vertical`,style:{marginTop:16},onValuesChange:e=>{e.user_type&&h(e.user_type)},children:[(0,Q.jsx)(X.Item,{name:`user_type`,label:`用户类型`,initialValue:`frontend`,rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`frontend`,label:`前端用户`},{value:`admin`,label:`后台管理员`}]})}),m===`frontend`&&(0,Q.jsx)(X.Item,{name:`frontend_user_kind`,label:`前台归类`,initialValue:`external`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`external`,label:`外部用户`},{value:`internal`,label:`内部用户`}]})}),m===`frontend`?(0,Q.jsx)(X.Item,{name:`phone`,label:`手机号`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,Q.jsx)(hW,{placeholder:`请输入手机号`,maxLength:11,size:`large`})}):(0,Q.jsx)(X.Item,{name:`username`,label:`用户名`,rules:[{required:!0,message:`请输入用户名`}],children:(0,Q.jsx)(hW,{placeholder:`请输入用户名`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`password`,label:`密码`,rules:[{required:!0,min:6,message:`密码至少6位`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请输入密码(至少6位)`,size:`large`})}),m===`frontend`&&(0,Q.jsx)(X.Item,{name:`credits`,label:`初始积分`,initialValue:0,children:(0,Q.jsx)(oB,{min:0,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`email`,label:`邮箱`,children:(0,Q.jsx)(hW,{placeholder:`选填`,size:`large`})})]})}),(0,Q.jsxs)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w4,{}),`菜单权限 - `,g.user?.username,` (`,g.user?.userType===`admin`?`后台菜单`:`前台菜单`,`)`]}),open:g.open,onOk:G,onCancel:()=>{_({open:!1,user:null})},okText:`保存`,cancelText:`取消`,width:520,children:[(0,Q.jsx)(`div`,{style:{marginBottom:12},children:(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:13},children:`勾选该用户可访问的菜单,不勾选则显示全部菜单`})}),(0,Q.jsx)(`div`,{style:{padding:`12px 16px`,background:`#f8fafc`,borderRadius:8,maxHeight:400,overflow:`auto`},children:(0,Q.jsx)(oz.Group,{value:b,onChange:e=>x(e),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:8,style:{width:`100%`},children:[ae.map(e=>(0,Q.jsxs)(oz,{value:e.path,style:{width:`100%`},children:[e.label,(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,marginLeft:8},children:e.path})]},e.path)),ne.map(e=>{let t=ie[e.id]||[];return t.length===0?null:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{fontWeight:600,fontSize:13,color:`#6366f1`,marginBottom:4,marginTop:4},children:e.label}),(0,Q.jsx)(VV,{direction:`vertical`,size:4,style:{paddingLeft:12,width:`100%`},children:t.map(e=>(0,Q.jsxs)(oz,{value:e.path,style:{width:`100%`},children:[e.label,(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,marginLeft:8},children:e.path})]},e.path))})]},e.id)})]})})})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(f4,{}),`重置密码 - `,C.user?.username]}),open:C.open,onOk:oe,onCancel:()=>{w({open:!1,user:null}),D.resetFields()},okText:`确认重置`,cancelText:`取消`,width:420,children:(0,Q.jsx)(X,{form:D,layout:`vertical`,style:{marginTop:16},children:(0,Q.jsx)(X.Item,{name:`newPassword`,label:`新密码`,rules:[{required:!0,min:6,message:`密码至少6位`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`})})})})]})},n7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)({open:!1,model:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t(await m8())}catch{}r(!1)};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={name:e.name,provider:e.provider,model_name:e.modelName,api_base:e.apiBase,api_key:e.apiKey,weight:e.weight,max_tokens:e.maxTokens,temperature:e.temperature,is_active:e.isActive??!0,priority:e.priority??0};i.model?.id?await h8({id:i.model.id,...t}):await h8(t),LG.success(i.model?.id?`模型配置已更新`:`模型配置已添加`),a({open:!1,model:null}),o.resetFields(),s()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},l=async e=>{try{await g8(e),LG.success(`模型配置已删除`),s()}catch(e){LG.error(e?.message||`删除失败`)}},u=e=>{a({open:!0,model:e||null}),e?o.setFieldsValue(e):(o.resetFields(),o.setFieldsValue({provider:`sdk`,weight:1,maxTokens:4096,temperature:.7,isActive:!0,priority:0}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(Z.Text,{type:`secondary`,children:[`共 `,e.length,` 个模型配置,按权重进行加权随机调度`]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加模型`})]}),(0,Q.jsx)(bQ,{columns:[{title:`模型名称`,dataIndex:`name`,width:150,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:t.isActive?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`linear-gradient(135deg, #94a3b8, #cbd5e1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:14},children:(0,Q.jsx)(o3,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{fontWeight:600},children:e}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.modelName})]})]})},{title:`提供商`,dataIndex:`provider`,width:140,render:e=>(0,Q.jsx)(NQ,{color:e===`mock`?`default`:`blue`,children:{sdk:`SDK模式`,openai_compatible:`OpenAI兼容`,mock:`Mock模式`}[e]||e})},{title:`API地址`,dataIndex:`apiBase`,width:200,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},ellipsis:!0,children:e||`-`})},{title:`权重`,dataIndex:`weight`,width:80,sorter:(e,t)=>e.weight-t.weight},{title:`Max Tokens`,dataIndex:`maxTokens`,width:100},{title:`Temperature`,dataIndex:`temperature`,width:100,render:e=>e.toFixed(1)},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除该模型配置?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(o3,{}),i.model?.id?`编辑模型`:`添加模型`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,model:null}),o.resetFields()},okText:`确认`,cancelText:`取消`,width:560,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`name`,label:`显示名称`,rules:[{required:!0,message:`请输入模型名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:GPT-4o`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`provider`,label:`提供商`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`sdk`,label:`SDK模式`},{value:`openai_compatible`,label:`OpenAI兼容`},{value:`mock`,label:`Mock模式`}]})}),(0,Q.jsx)(X.Item,{name:`modelName`,label:`模型标识`,style:{flex:1},rules:[{required:!0,message:`请输入模型标识`}],children:(0,Q.jsx)(hW,{placeholder:`例如:gpt-4o`,size:`large`})})]}),(0,Q.jsx)(X.Item,{name:`apiBase`,label:`API地址`,children:(0,Q.jsx)(hW,{placeholder:`https://api.openai.com/v1`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`apiKey`,label:`API Key`,children:(0,Q.jsx)(hW.Password,{placeholder:`sk-****`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`weight`,label:`权重`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:0,max:10,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`maxTokens`,label:`Max Tokens`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:256,max:128e3,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`temperature`,label:`Temperature`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:0,max:2,step:.1,style:{width:`100%`},size:`large`})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`priority`,label:`优先级`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:0,max:10,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用`,valuePropName:`checked`,style:{flex:1,paddingTop:30},children:(0,Q.jsx)(Mq,{})})]})]})})]})},r7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(``),[c]=X.useForm(),[l,u]=(0,S.useState)(``);(0,S.useEffect)(()=>{d()},[]);let d=async()=>{r(!0);let e=await _8();t(e);let n={};e.forEach(e=>{n[e.key]=e.value}),c.setFieldsValue(n),r(!1)},f=async()=>{try{let n=await c.validateFields();a(!0);for(let t of e){let e=n[t.key];e!==void 0&&e!==t.value&&await v8(t.id,e??``)}LG.success(`系统配置已保存`),t(await _8()),a(!1)}catch(e){a(!1),LG.error(e?.message||`保存失败`)}},p=async(e,n)=>{s(n);try{let r=await y8(e,n);t(e=>e.map(e=>e.key===n?{...e,value:r.url}:e)),c.setFieldsValue({[n]:r.url}),LG.success(`PDF上传成功`)}catch{LG.error(`上传失败`)}finally{s(``)}return!1},m=async e=>{s(`site_logo`);try{let n=await b8(e);t(e=>e.map(e=>e.key===`site_logo`?{...e,value:n.url}:e)),c.setFieldsValue({site_logo:n.url}),u(n.url),LG.success(`Logo上传成功`)}catch{LG.error(`上传失败`)}finally{s(``)}return!1},h={站点信息:e.filter(e=>e.key.startsWith(`site_`)),协议配置:e.filter(e=>e.key===`user_agreement_url`||e.key===`privacy_policy_url`),"SEO 设置":e.filter(e=>e.key.startsWith(`seo_`)),用户积分配置:e.filter(e=>e.key.startsWith(`user_`)&&e.key.includes(`credits`))},g=e=>({site_name:`平台显示名称,将展示在页面标题和导航栏`,site_logo:`平台Logo图片URL,建议尺寸 200x40px`,user_agreement_url:`用户注册/登录时需同意的用户协议PDF文件`,privacy_policy_url:`用户注册/登录时需同意的隐私政策PDF文件`,seo_title:`搜索引擎结果中显示的标题`,seo_description:`搜索引擎结果中显示的描述文字,建议150字以内`,seo_keywords:`用逗号分隔的关键词列表`,user_register_credits:`用户注册时赠送的初始积分,默认100`,user_login_credits:`用户每日登录赠送的积分数量`,user_login_credits_enabled:`是否启用每日登录赠送积分功能`})[e.key]||e.description||``,_=e=>e.key===`site_logo`?(0,Q.jsx)(v,{config:e}):e.key===`seo_description`?(0,Q.jsx)(hW.TextArea,{rows:3,placeholder:e.description,size:`large`}):e.key===`seo_keywords`?(0,Q.jsx)(hW,{placeholder:`关键词1, 关键词2, 关键词3`,size:`large`}):e.key===`user_login_credits_enabled`?(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(Mq,{defaultChecked:e.value===`true`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:13},children:e.value===`true`?`已启用`:`已禁用`})]}):e.key===`user_register_credits`||e.key===`user_login_credits`?(0,Q.jsx)(hW,{type:`number`,min:0,placeholder:e.description,size:`large`}):(0,Q.jsx)(hW,{placeholder:e.description,size:`large`}),v=({config:e})=>{let n=e.value&&e.value.startsWith(`/uploads/`),r=n?`http://ceshi.apiforeign.minzhong.cn${e.value}`:``;return(0,Q.jsxs)(`div`,{style:{padding:`16px`,borderRadius:10,border:`1px solid #f0f0f5`,background:`#fafbfc`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w6,{style:{color:`#6366f1`,fontSize:18}}),(0,Q.jsx)(Z.Text,{strong:!0,children:`网站Logo`})]}),(0,Q.jsxs)(VV,{children:[n&&(0,Q.jsx)(qE,{size:`small`,danger:!0,onClick:()=>{t(e=>e.map(e=>e.key===`site_logo`?{...e,value:``}:e)),c.setFieldsValue({site_logo:``}),LG.success(`Logo已移除`)},children:`移除`}),(0,Q.jsx)(D1,{accept:`image/*`,showUploadList:!1,beforeUpload:m,children:(0,Q.jsx)(qE,{size:`small`,type:`primary`,icon:(0,Q.jsx)(w6,{}),loading:o===`site_logo`,children:n?`重新上传`:`上传Logo`})})]})]}),n?(0,Q.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,Q.jsx)(`img`,{src:r,alt:`Logo预览`,style:{maxWidth:200,maxHeight:80,objectFit:`contain`,border:`1px solid #e2e8f0`,borderRadius:8,padding:8}}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,display:`block`,marginTop:8},children:`建议尺寸:200x40px,支持 PNG、JPG 格式`})]}):(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:`尚未上传Logo,将使用系统默认Logo`})]})},y=({config:e})=>{let t=e.key===`user_agreement_url`?`用户协议`:`隐私政策`,n=e.value&&e.value.startsWith(`/uploads/`);return(0,Q.jsxs)(`div`,{style:{padding:`16px`,borderRadius:10,border:`1px solid #f0f0f5`,background:`#fafbfc`,marginBottom:12},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(x2,{style:{color:`#ef4444`,fontSize:18}}),(0,Q.jsx)(Z.Text,{strong:!0,children:t})]}),(0,Q.jsxs)(VV,{children:[n&&(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>window.open(`http://localhost:8000${e.value}`,`_blank`),children:`预览`}),(0,Q.jsx)(D1,{accept:`.pdf`,showUploadList:!1,beforeUpload:t=>p(t,e.key),children:(0,Q.jsx)(qE,{size:`small`,type:`primary`,icon:(0,Q.jsx)(w6,{}),loading:o===e.key,children:n?`重新上传`:`上传PDF`})})]})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:n?`已上传: ${e.value}`:`尚未上传,前台将不显示对应链接`})]})};return n?(0,Q.jsx)(PR,{loading:!0,variant:`outlined`,style:{borderRadius:12}}):(0,Q.jsxs)(`div`,{style:{maxWidth:720},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:24},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:`#6366f1`},children:(0,Q.jsx)(D3,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:4,style:{margin:0},children:`系统设置`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`管理站点基础信息、协议文件和SEO配置`})]})]}),(0,Q.jsx)(X,{form:c,layout:`vertical`,children:Object.entries(h).map(([e,t])=>(0,Q.jsxs)(`div`,{style:{marginBottom:24},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14,display:`block`,marginBottom:12,paddingBottom:8,borderBottom:`1px solid #f0f0f5`},children:e}),e===`协议配置`?t.map(e=>(0,Q.jsx)(y,{config:e},e.id)):t.map(e=>(0,Q.jsx)(X.Item,{name:e.key,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:e.description}),extra:g(e),children:_(e)},e.id))]},e))})]}),(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`},children:(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(v3,{}),onClick:f,loading:i,size:`large`,style:{borderRadius:8,minWidth:140},children:`保存配置`})})]})},i7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(!1),[c]=X.useForm(),[l,u]=(0,S.useState)({open:!1,notifId:``,title:``}),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(1),[_,v]=(0,S.useState)(10),[y,b]=(0,S.useState)(0),x=async()=>{r(!0);try{let e=await B8(h,_),n=(await u8(1,1e3)).items||[],r={};n.forEach(e=>{r[e.id]=e.username}),t((e.items||[]).map(e=>({id:e.id,title:e.title,content:e.content,type:e.type,targetUserId:e.userId||null,target:e.userId?r[e.userId]||e.userId:`全部用户`,createdAt:e.createdAt}))),b(e.total||0),a(n.map(e=>({id:e.id,username:e.username})))}catch{LG.error(`加载通知列表失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{x()},[h,_]);let C=(e,t)=>{g(e),v(t)},w=async()=>{try{let e=await c.validateFields();await V8({title:e.title,content:e.content,type:e.type||`system`,target_user_id:e.target_user_id||void 0}),LG.success(`消息已发送`),s(!1),c.resetFields(),x()}catch{}},T=async e=>{try{await H8(e),LG.success(`已删除`),x()}catch(e){LG.error(e?.message||`删除失败`)}},E=async(e,t)=>{u({open:!0,notifId:e,title:t}),m(!0);try{f((await U8(e)).items||[])}catch{LG.error(`加载已读列表失败`)}finally{m(!1)}},D=e=>{switch(e){case`system`:return`blue`;case`credit`:return`orange`;case`promo`:return`purple`;default:return`default`}};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(f0,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`消息推送管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[`共 `,y,` 条消息`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>s(!0),style:{borderRadius:8},children:`发送新消息`})]}),(0,Q.jsx)(bQ,{columns:[{title:`标题`,dataIndex:`title`,width:200,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`内容`,dataIndex:`content`,ellipsis:!0},{title:`类型`,dataIndex:`type`,width:80,render:e=>(0,Q.jsx)(NQ,{color:D(e),children:{system:`系统`,credit:`积分`,promo:`活动`}[e]||e})},{title:`发送目标`,dataIndex:`target`,width:120,render:e=>(0,Q.jsx)(NQ,{color:e===`全部用户`?`green`:`blue`,children:e})},{title:`发送时间`,dataIndex:`createdAt`,width:160,render:e=>Z5(e)},{title:`操作`,key:`action`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>E(t.id,t.title),children:`已读`}),(0,Q.jsx)(WG,{title:`确定删除该消息?`,onConfirm:()=>T(t.id),children:(0,Q.jsx)(qE,{type:`link`,danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:{current:h,pageSize:_,total:y,onChange:C,showSizeChanger:!0,showTotal:e=>`共 ${e} 条消息`},scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w3,{}),`发送消息`]}),open:o,onOk:w,onCancel:()=>{s(!1),c.resetFields()},okText:`发送`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`title`,label:`消息标题`,rules:[{required:!0,message:`请输入标题`}],children:(0,Q.jsx)(hW,{placeholder:`请输入消息标题`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`content`,label:`消息内容`,rules:[{required:!0,message:`请输入内容`}],children:(0,Q.jsx)(hW.TextArea,{rows:4,placeholder:`请输入消息内容`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`type`,label:`消息类型`,style:{flex:1},initialValue:`system`,rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`system`,label:`系统通知`},{value:`credit`,label:`积分通知`},{value:`promo`,label:`活动通知`}]})}),(0,Q.jsx)(X.Item,{name:`target_user_id`,label:`发送目标`,style:{flex:1},extra:`留空则发送给全部用户`,children:(0,Q.jsx)(RC,{size:`large`,allowClear:!0,placeholder:`全部用户`,options:i.map(e=>({value:e.id,label:e.username}))})})]})]})}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(o6,{}),`已读用户 — `,l.title]}),open:l.open,onCancel:()=>{u({open:!1,notifId:``,title:``}),f([])},footer:null,width:480,children:p?(0,Q.jsx)(`div`,{style:{textAlign:`center`,padding:40},children:`加载中...`}):d.length===0?(0,Q.jsx)(pC,{description:`暂无用户已读`,style:{padding:`40px 0`}}):(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{marginBottom:12,color:`#64748b`,fontSize:13},children:[`共 `,d.length,` 人已读`]}),(0,Q.jsx)(bQ,{dataSource:d,rowKey:`userId`,pagination:!1,size:`small`,columns:[{title:`用户名`,dataIndex:`username`,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`已读时间`,dataIndex:`readAt`,width:180,render:e=>Z5(e)}]})]})})]})},a7=o(((e,t)=>{var n={version:`1.15.0`};n[437]=(function(){for(var e=`\0\x07\b + `]:{zIndex:10,width:r,margin:`0 ${Y(e.marginXXS)}`,fontSize:r,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,color:i,"&:hover":{color:i},svg:{verticalAlign:`baseline`}}},[`${s}-thumbnail, ${s}-thumbnail img`]:{position:`static`,display:`block`,width:`100%`,height:`100%`,objectFit:`contain`},[`${s}-name`]:{display:`none`,textAlign:`center`},[`${s}-file + ${s}-name`]:{position:`absolute`,bottom:e.margin,display:`block`,width:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`},[`${s}-uploading`]:{[`&${s}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:`none`}},[`${s}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}},[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:`50%`}}}},Z$=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:`rtl`}}},Q$=e=>{let{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:{...Jc(e),[t]:{outline:0,"input[type='file']":{cursor:`pointer`}},[`${t}-select`]:{display:`inline-block`},[`${t}-hidden`]:{display:`none`},[`${t}-disabled`]:{color:n,cursor:`not-allowed`}}}},$$=rl(`Upload`,e=>{let{fontSizeHeading3:t,marginXS:n,lineWidth:r,pictureCardSize:i,calc:a}=e,o=gs(e,{uploadThumbnailSize:a(t).mul(2).equal(),uploadProgressOffset:a(a(n).div(2)).add(r).equal(),uploadPicCardSize:i});return[Q$(o),K$(o),Y$(o),X$(o),q$(o),J$(o),Z$(o),bh(o)]},e=>({actionsColor:e.colorIcon,pictureCardSize:e.controlHeightLG*2.55})),e1={icon:function(e,t){return{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M534 352V136H232v752h560V394H576a42 42 0 01-42-42z`,fill:t}},{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z`,fill:e}}]}},name:`file`,theme:`twotone`};function t1(){return t1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,t1({},e,{ref:t,icon:e1}))),r1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z`}}]},name:`paper-clip`,theme:`outlined`};function i1(){return i1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,i1({},e,{ref:t,icon:r1}))),o1={icon:function(e,t){return{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z`,fill:e}},{tag:`path`,attrs:{d:`M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z`,fill:t}},{tag:`path`,attrs:{d:`M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z`,fill:t}},{tag:`path`,attrs:{d:`M276 368a28 28 0 1056 0 28 28 0 10-56 0z`,fill:t}},{tag:`path`,attrs:{d:`M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`,fill:e}}]}},name:`picture`,theme:`twotone`};function s1(){return s1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,s1({},e,{ref:t,icon:o1})));function l1(e){return{...e,lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e}}function u1(e,t){let n=Zr(t),r=n.findIndex(({uid:t})=>t===e.uid);return r===-1?n.push(e):n[r]=e,n}function d1(e,t){let n=e.uid===void 0?`name`:`uid`;return t.filter(t=>t[n]===e[n])[0]}function f1(e,t){let n=e.uid===void 0?`name`:`uid`,r=t.filter(t=>t[n]!==e[n]);return r.length===t.length?null:r}var p1=(e=``)=>{let t=e.split(`/`),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[``])[0]},m1=e=>e.indexOf(`image/`)===0,h1=e=>{if(e.type&&!e.thumbUrl)return m1(e.type);let t=e.thumbUrl||e.url||``,n=p1(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n)?!0:!(/^data:/.test(t)||n)},g1=200;function _1(e){return new Promise(t=>{if(!e.type||!m1(e.type)){t(``);return}let n=document.createElement(`canvas`);n.width=g1,n.height=g1,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${g1}px; height: ${g1}px; z-index: 9999; display: none;`,document.body.appendChild(n);let r=n.getContext(`2d`),i=new Image;if(i.onload=()=>{let{width:e,height:a}=i,o=g1,s=g1,c=0,l=0;e>a?(s=g1/e*a,l=-(s-o)/2):(o=g1/a*e,c=-(o-s)/2),r.drawImage(i,c,l,o,s);let u=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(i.src),t(u)},i.crossOrigin=`anonymous`,e.type.startsWith(`image/svg+xml`)){let t=new FileReader;t.onload=()=>{t.result&&typeof t.result==`string`&&(i.src=t.result)},t.readAsDataURL(e)}else if(e.type.startsWith(`image/gif`)){let n=new FileReader;n.onload=()=>{n.result&&t(n.result)},n.readAsDataURL(e)}else i.src=window.URL.createObjectURL(e)})}var v1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`download`,theme:`outlined`};function y1(){return y1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,y1({},e,{ref:t,icon:v1}))),x1=S.forwardRef(({prefixCls:e,className:t,style:n,classNames:r,styles:i,locale:a,listType:o,file:s,items:c,progress:l,iconRender:u,actionIconRender:d,itemRender:f,isImgUrl:p,showPreviewIcon:m,showRemoveIcon:h,showDownloadIcon:g,previewIcon:_,removeIcon:v,downloadIcon:y,extra:b,onPreview:x,onDownload:C,onClose:w},T)=>{let{status:E}=s,[D,O]=S.useState(E);S.useEffect(()=>{E!==`removed`&&O(E)},[E]);let[k,A]=S.useState(!1);S.useEffect(()=>{let e=setTimeout(()=>{A(!0)},300);return()=>{clearTimeout(e)}},[]);let j=u(s),M=S.createElement(`div`,{className:`${e}-icon`},j);if(o===`picture`||o===`picture-card`||o===`picture-circle`)if(D===`uploading`||!s.thumbUrl&&!s.url){let t=J(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:D!==`uploading`});M=S.createElement(`div`,{className:t},j)}else{let t=p?.(s)?S.createElement(`img`,{src:s.thumbUrl||s.url,alt:s.name,className:`${e}-list-item-image`,crossOrigin:s.crossOrigin}):j,n=J(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:p&&!p(s)});M=S.createElement(`a`,{className:n,onClick:e=>x(s,e),href:s.url||s.thumbUrl,target:`_blank`,rel:`noopener noreferrer`},t)}let N=J(`${e}-list-item`,`${e}-list-item-${D}`,r?.item),P=typeof s.linkProps==`string`?JSON.parse(s.linkProps):s.linkProps,F=(typeof h==`function`?h(s):h)?d((typeof v==`function`?v(s):v)||S.createElement(IQ,null),()=>w(s),e,a.removeFile,!0):null,I=(typeof g==`function`?g(s):g)&&D===`done`?d((typeof y==`function`?y(s):y)||S.createElement(b1,null),()=>C(s),e,a.downloadFile):null,L=o!==`picture-card`&&o!==`picture-circle`&&S.createElement(`span`,{key:`download-delete`,className:J(`${e}-list-item-actions`,{picture:o===`picture`})},I,F),R=typeof b==`function`?b(s):b,z=R&&S.createElement(`span`,{className:`${e}-list-item-extra`},R),B=J(`${e}-list-item-name`),V=s.url?S.createElement(`a`,{key:`view`,target:`_blank`,rel:`noopener noreferrer`,className:B,title:s.name,...P,href:s.url,onClick:e=>x(s,e)},s.name,z):S.createElement(`span`,{key:`view`,className:B,onClick:e=>x(s,e),title:s.name},s.name,z),H=(typeof m==`function`?m(s):m)&&(s.url||s.thumbUrl)?S.createElement(`a`,{href:s.url||s.thumbUrl,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>x(s,e),title:a.previewFile},typeof _==`function`?_(s):_||S.createElement(qU,null)):null,U=(o===`picture-card`||o===`picture-circle`)&&D!==`uploading`&&S.createElement(`span`,{className:`${e}-list-item-actions`},H,D===`done`&&I,F),{getPrefixCls:W}=S.useContext(oi),ee=W(),te=S.createElement(`div`,{className:N,style:i?.item},M,V,L,U,k&&S.createElement(Iu,{motionName:`${ee}-fade`,visible:D===`uploading`,motionDeadline:2e3},({className:t})=>{let n=`percent`in s?S.createElement(CK,{type:`line`,percent:s.percent,"aria-label":s[`aria-label`],"aria-labelledby":s[`aria-labelledby`],...l}):null;return S.createElement(`div`,{className:J(`${e}-list-item-progress`,t)},n)})),ne=s.response&&typeof s.response==`string`?s.response:s.error?.statusText||s.error?.message||a.uploadError,re=D===`error`?S.createElement(Ow,{title:ne,getPopupContainer:e=>e.parentNode},te):te;return S.createElement(`div`,{className:J(`${e}-list-item-container`,t),style:n,ref:T},f?f(re,s,c,{download:C.bind(null,s),preview:x.bind(null,s),remove:w.bind(null,s)}):re)}),S1=S.forwardRef((e,t)=>{let{listType:n=`text`,previewFile:r=_1,onPreview:i,onDownload:a,onRemove:o,locale:s,iconRender:c,isImageUrl:l=h1,prefixCls:u,items:d=[],showPreviewIcon:f=!0,showRemoveIcon:p=!0,showDownloadIcon:m=!1,removeIcon:h,previewIcon:g,downloadIcon:_,extra:v,progress:y={size:[-1,2],showInfo:!1},appendAction:b,appendActionVisible:x=!0,itemRender:C,disabled:w,classNames:T,styles:E}=e,[,D]=Ed(),[O,k]=S.useState(!1),A=[`picture-card`,`picture-circle`].includes(n);S.useEffect(()=>{n.startsWith(`picture`)&&(d||[]).forEach(e=>{!(e.originFileObj instanceof File||e.originFileObj instanceof Blob)||e.thumbUrl!==void 0||(e.thumbUrl=``,r?.(e.originFileObj).then(t=>{e.thumbUrl=t||``,D()}))})},[n,d,r]),S.useEffect(()=>{k(!0)},[]);let j=(e,t)=>{if(i)return t?.preventDefault(),i(e)},M=e=>{typeof a==`function`?a(e):e.url&&window.open(e.url)},N=e=>{o?.(e)},P=e=>{if(c)return c(e,n);let t=e.status===`uploading`;if(n.startsWith(`picture`)){let r=n===`picture`?S.createElement(xm,null):s.uploading,i=l?.(e)?S.createElement(c1,null):S.createElement(n1,null);return t?r:i}return t?S.createElement(xm,null):S.createElement(a1,null)},F=(e,t,n,r,i)=>{let a={type:`text`,size:`small`,title:r,onClick:n=>{t(),S.isValidElement(e)&&e.props.onClick?.(n)},className:`${n}-list-item-action`,disabled:i?w:!1};return S.isValidElement(e)?S.createElement(Zg,{...a,icon:Pp(e,{...e.props,onClick:()=>{}})}):S.createElement(Zg,{...a},S.createElement(`span`,null,e))};S.useImperativeHandle(t,()=>({handlePreview:j,handleDownload:M}));let{getPrefixCls:I}=S.useContext(oi),L=I(`upload`,u),R=I(),z=J(`${L}-list`,`${L}-list-${n}`,T?.list),B=S.useMemo(()=>Sr(Wm(R),[`onAppearEnd`,`onEnterEnd`,`onLeaveEnd`]),[R]),V={...A?{}:B,motionDeadline:2e3,motionName:`${L}-${A?`animate-inline`:`animate`}`,keys:Zr(d.map(e=>({key:e.uid,file:e}))),motionAppear:O};return S.createElement(`div`,{className:z,style:E?.list},S.createElement(Fu,{...V,component:!1},({key:e,file:t,className:r,style:i})=>S.createElement(x1,{key:e,locale:s,prefixCls:L,className:r,style:i,classNames:T,styles:E,file:t,items:d,progress:y,listType:n,isImgUrl:l,showPreviewIcon:f,showRemoveIcon:p,showDownloadIcon:m,removeIcon:h,previewIcon:g,downloadIcon:_,extra:v,iconRender:P,actionIconRender:F,itemRender:C,onPreview:j,onDownload:M,onClose:N})),b&&S.createElement(Iu,{...V,visible:x,forceRender:!0},({className:e,style:t})=>Pp(b,n=>({className:J(n.className,e),style:{...t,pointerEvents:e?`none`:void 0,...n.style}}))))}),C1=`__LIST_IGNORE_${Date.now()}__`,w1=S.forwardRef((e,t)=>{let n=li(`upload`),{fileList:r,defaultFileList:i,onRemove:a,showUploadList:o=!0,listType:s=`text`,onPreview:c,onDownload:l,onChange:u,onDrop:d,previewFile:f,disabled:p,locale:m,iconRender:h,isImageUrl:g,progress:_,prefixCls:v,className:y,type:b=`select`,children:x,style:C,itemRender:w,maxCount:T,data:E={},multiple:D=!1,hasControlInside:O=!0,action:k=``,accept:A=``,supportServerRender:j=!0,rootClassName:M,styles:N,classNames:P}=e,F=S.useContext(zp),I=p??F,L=e.customRequest||n.customRequest,[R,z]=Hn(i,r),B=R||[],[V,H]=S.useState(`drop`),U=S.useRef(null),W=S.useRef(null);S.useMemo(()=>{let e=Date.now();(r||[]).forEach((t,n)=>{!t.uid&&!Object.isFrozen(t)&&(t.uid=`__AUTO__${e}_${n}__`)})},[r]);let ee=(e,t,n)=>{let r=Zr(t),i=!1;T===1?r=r.slice(-1):T&&(i=r.length>T,r=r.slice(0,T)),(0,Jf.flushSync)(()=>{z(r)});let a={file:e,fileList:r};n&&(a.event=n),(!i||e.status===`removed`||r.some(t=>t.uid===e.uid))&&(0,Jf.flushSync)(()=>{u?.(a)})},te=async(t,n)=>{let{beforeUpload:r}=e,i=t;if(r){let e=await r(t,n);if(e===!1)return!1;if(delete t[C1],e===C1)return Object.defineProperty(t,C1,{value:!0,configurable:!0}),!1;hd(e)&&(i=e)}return i},ne=e=>{let t=e.filter(e=>!e.file[C1]);if(!t.length)return;let n=t.map(e=>l1(e.file)),r=Zr(B);n.forEach(e=>{r=u1(e,r)}),n.forEach((e,n)=>{let i=e;if(t[n].parsedFile)e.status=`uploading`;else{let{originFileObj:t}=e,n;try{n=new File([t],t.name,{type:t.type})}catch{n=new Blob([t],{type:t.type}),n.name=t.name,n.lastModifiedDate=new Date,n.lastModified=new Date().getTime()}n.uid=e.uid,i=n}ee(i,r)})},re=(e,t,n)=>{try{typeof e==`string`&&(e=JSON.parse(e))}catch{}if(!d1(t,B))return;let r=l1(t);r.status=`done`,r.percent=100,r.response=e,r.xhr=n,ee(r,u1(r,B))},ie=(e,t)=>{if(!d1(t,B))return;let n=l1(t);n.status=`uploading`,n.percent=e.percent,ee(n,u1(n,B),e)},ae=(e,t,n)=>{if(!d1(n,B))return;let r=l1(n);r.error=e,r.response=t,r.status=`error`,ee(r,u1(r,B))},G=e=>{let t;Promise.resolve(typeof a==`function`?a(e):a).then(n=>{if(n===!1)return;let r=f1(e,B);r&&(t={...e,status:`removed`},B?.forEach(e=>{let n=t.uid===void 0?`name`:`uid`;e[n]===t[n]&&!Object.isFrozen(e)&&(e.status=`removed`)}),U.current?.abort(t),ee(t,r))})},oe=e=>{H(e.type),e.type===`drop`&&d?.(e)};S.useImperativeHandle(t,()=>({onBatchStart:ne,onSuccess:re,onProgress:ie,onError:ae,fileList:B,upload:U.current,nativeElement:W.current}));let{getPrefixCls:K,direction:se,className:ce,style:q,classNames:le,styles:ue}=li(`upload`),de=K(`upload`,v),fe={...e,listType:s,showUploadList:o,type:b,multiple:D,hasControlInside:O,supportServerRender:j,disabled:I},[pe,me]=Fd([le,P],[ue,N],{props:fe}),he={onBatchStart:ne,onError:ae,onProgress:ie,onSuccess:re,...e,customRequest:L,data:E,multiple:D,action:k,accept:A,supportServerRender:j,prefixCls:de,disabled:I,beforeUpload:te,onChange:void 0,hasControlInside:O};delete he.className,delete he.style,(!x||I)&&delete he.id;let ge=`${de}-wrapper`,[_e,ve]=$$(de,ge),[ye]=cd(`Upload`,td.Upload),{showRemoveIcon:be,showPreviewIcon:xe,showDownloadIcon:Se,removeIcon:Ce,previewIcon:we,downloadIcon:Te,extra:Ee}=typeof o==`boolean`?{}:o,De=be===void 0?!I:be,Oe=(e,t)=>o?S.createElement(S1,{classNames:pe,styles:me,prefixCls:de,listType:s,items:B,previewFile:f,onPreview:c,onDownload:l,onRemove:G,showRemoveIcon:De,showPreviewIcon:xe,showDownloadIcon:Se,removeIcon:Ce,previewIcon:we,downloadIcon:Te,iconRender:h,extra:Ee,locale:{...ye,...m},isImageUrl:g,progress:_,appendAction:e,appendActionVisible:t,itemRender:w,disabled:I}):e,ke=J(ge,y,M,_e,ve,ce,pe.root,{[`${de}-rtl`]:se===`rtl`,[`${de}-picture-card-wrapper`]:s===`picture-card`,[`${de}-picture-circle-wrapper`]:s===`picture-circle`}),Ae={...me.root},je={...q,...C};if(b===`drag`){let e=J(_e,de,`${de}-drag`,{[`${de}-drag-uploading`]:B.some(e=>e.status===`uploading`),[`${de}-drag-hover`]:V===`dragover`,[`${de}-disabled`]:I,[`${de}-rtl`]:se===`rtl`},pe.trigger);return S.createElement(`span`,{className:ke,ref:W,style:Ae},S.createElement(`div`,{className:e,style:{...je,...me.trigger},onDrop:oe,onDragOver:oe,onDragLeave:oe},S.createElement(G$,{...he,ref:U,className:`${de}-btn`},S.createElement(`div`,{className:`${de}-drag-container`},x))),Oe())}let Me=J(de,`${de}-select`,{[`${de}-disabled`]:I,[`${de}-hidden`]:!x},pe.trigger),Ne=S.createElement(`div`,{className:Me,style:{...je,...me.trigger}},S.createElement(G$,{...he,ref:U}));return s===`picture-card`||s===`picture-circle`?S.createElement(`span`,{className:ke,ref:W,style:Ae},Oe(Ne,!!x)):S.createElement(`span`,{className:ke,ref:W,style:Ae},Ne,Oe())}),T1=S.forwardRef((e,t)=>{let{style:n,height:r,hasControlInside:i=!1,children:a,...o}=e,s={...n,height:r};return S.createElement(w1,{ref:t,hasControlInside:i,...o,style:s,type:`drag`},a)}),E1=w1;E1.Dragger=T1,E1.LIST_IGNORE=C1;var D1=o(((e,t)=>{function n(e){return e&&e.__esModule?e:{default:e}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),O1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default={items_per_page:`条/页`,jump_to:`跳至`,jump_to_confirm:`确定`,page:`页`,prev_page:`上一页`,next_page:`下一页`,prev_5:`向前 5 页`,next_5:`向后 5 页`,prev_3:`向前 3 页`,next_3:`向后 3 页`,page_size:`页码`}})),k1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.commonLocale=void 0,e.commonLocale={yearFormat:`YYYY`,dayFormat:`D`,cellMeridiemFormat:`A`,monthBeforeYear:!0}})),A1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=k1();function n(e){"@babel/helpers - typeof";return n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n(e)}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default={placeholder:`请选择时间`,rangePlaceholder:[`开始时间`,`结束时间`]}})),M1=o((e=>{var t=D1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(A1()),r=t(j1()),i={lang:{placeholder:`请选择日期`,yearPlaceholder:`请选择年份`,quarterPlaceholder:`请选择季度`,monthPlaceholder:`请选择月份`,weekPlaceholder:`请选择周`,rangePlaceholder:[`开始日期`,`结束日期`],rangeYearPlaceholder:[`开始年份`,`结束年份`],rangeMonthPlaceholder:[`开始月份`,`结束月份`],rangeQuarterPlaceholder:[`开始季度`,`结束季度`],rangeWeekPlaceholder:[`开始周`,`结束周`],...n.default},timePickerLocale:{...r.default}};i.lang.ok=`确定`,e.default=i})),N1=o((e=>{var t=D1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=t(M1()).default})),P1=o((e=>{var t=D1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(O1()),r=t(N1()),i=t(M1()),a=t(j1()),o="${label}不是一个有效的${type}";e.default={locale:`zh-cn`,Pagination:n.default,DatePicker:i.default,TimePicker:a.default,Calendar:r.default,global:{placeholder:`请选择`,close:`关闭`,sortable:`可排序`},Table:{filterTitle:`筛选`,filterConfirm:`确定`,filterReset:`重置`,filterEmptyText:`无筛选项`,filterCheckAll:`全选`,filterSearchPlaceholder:`在筛选项中搜索`,emptyText:`暂无数据`,selectAll:`全选当页`,selectInvert:`反选当页`,selectNone:`清空所有`,selectionAll:`全选所有`,sortTitle:`排序`,expand:`展开行`,collapse:`关闭行`,triggerDesc:`点击降序`,triggerAsc:`点击升序`,cancelSort:`取消排序`},Modal:{okText:`确定`,cancelText:`取消`,justOkText:`知道了`},Tour:{Next:`下一步`,Previous:`上一步`,Finish:`结束导览`},Popconfirm:{cancelText:`取消`,okText:`确定`},Transfer:{titles:[``,``],searchPlaceholder:`请输入搜索内容`,itemUnit:`项`,itemsUnit:`项`,remove:`删除`,selectCurrent:`全选当页`,removeCurrent:`删除当页`,selectAll:`全选所有`,deselectAll:`取消全选`,removeAll:`删除全部`,selectInvert:`反选当页`},Upload:{uploading:`文件上传中`,removeFile:`删除文件`,uploadError:`上传错误`,previewFile:`预览文件`,downloadFile:`下载文件`},Empty:{description:`暂无数据`},Icon:{icon:`图标`},Text:{edit:`编辑`,copy:`复制`,copied:`复制成功`,expand:`展开`,collapse:`收起`},Form:{optional:`(可选)`,defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:o,method:o,array:o,object:o,number:o,date:o,boolean:o,integer:o,float:o,regexp:o,email:o,url:o,hex:o},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},QRCode:{expired:`二维码过期`,refresh:`点击刷新`,scanned:`已扫描`},ColorPicker:{presetEmpty:`暂无`,transparent:`无色`,singleColor:`单色`,gradientColor:`渐变色`}}})),F1=o(((e,t)=>{t.exports=P1()})),I1={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.42 0 448 200.58 448 448S759.42 960 512 960 64 759.42 64 512 264.58 64 512 64m32.5 168c-69.67 0-86.06 16.84-86.72 39.08l-.02 1.43v46.62H291.45c-9.92 0-14.28 23.05-14.27 39.3 0 2.7 2.08 4.93 4.77 4.93h175.81v58.3h-116.5c-9.96 0-14.3 23.76-14.27 39.47a4.77 4.77 0 004.77 4.76h233.45c-4.53 41.06-15.43 77.59-30.72 109.32l-1.22 2.5-.32-.28c-60.24-28.47-120.43-52.57-194.4-52.57l-2.62.01c-84.98 1.11-144.71 56.5-145.91 127.04l-.02 1.22.02 2.13c1.24 70.4 63.56 126.45 148.52 126.45 61.25 0 116.38-16.85 163.46-45.02a138.58 138.58 0 0014.07-7.96 345.6 345.6 0 0050.3-41.16l9.45 6.35 12.46 8.32c57.53 38.26 113.76 72.62 169.86 79.27a142.62 142.62 0 0018.31 1.16c43.02 0 55-52.68 57.39-95.51l.14-2.84c.4-8.46-6.2-15.6-14.65-15.86-75.46-2.37-136.45-22.05-192-46.11l-6.27-2.75c35.15-56.8 56.66-121.81 57.15-186.66l.09-1.08c.4-5.51-4-10.2-9.52-10.2H549.33v-58.3h165.73c9.92 0 14.28-22.12 14.27-39.31a4.85 4.85 0 00-4.78-4.92H549.32v-82.35a4.8 4.8 0 00-4.83-4.78M328 583.85c54.63 0 107.08 22.41 158.1 52.19l5.76 3.4c-103.57 119.84-247.17 95.9-261.72 26.37a66.89 66.89 0 01-1.14-9.83l-.06-2.34.02-.9c.97-40.12 45.33-68.9 99.04-68.9`}}]},name:`alipay-circle`,theme:`outlined`};function L1(){return L1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,L1({},e,{ref:t,icon:I1}))),z1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z`}}]},name:`api`,theme:`outlined`};function B1(){return B1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,B1({},e,{ref:t,icon:z1}))),H1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z`}}]},name:`appstore`,theme:`outlined`};function U1(){return U1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,U1({},e,{ref:t,icon:H1}))),G1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z`}}]},name:`arrow-down`,theme:`outlined`};function K1(){return K1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,K1({},e,{ref:t,icon:G1}))),J1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`arrow-left`,theme:`outlined`};function Y1(){return Y1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Y1({},e,{ref:t,icon:J1}))),Z1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z`}}]},name:`arrow-up`,theme:`outlined`};function Q1(){return Q1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Q1({},e,{ref:t,icon:Z1}))),e0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z`}}]},name:`audio`,theme:`outlined`};function t0(){return t0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,t0({},e,{ref:t,icon:e0}))),r0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z`}}]},name:`bank`,theme:`outlined`};function i0(){return i0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,i0({},e,{ref:t,icon:r0}))),o0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z`}}]},name:`bar-chart`,theme:`outlined`};function s0(){return s0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,s0({},e,{ref:t,icon:o0}))),l0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M816 768h-24V428c0-141.1-104.3-257.7-240-277.1V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.9c-135.7 19.4-240 136-240 277.1v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48zM304 768V428c0-55.6 21.6-107.8 60.9-147.1S456.4 220 512 220c55.6 0 107.8 21.6 147.1 60.9S720 372.4 720 428v340H304z`}}]},name:`bell`,theme:`outlined`};function u0(){return u0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,u0({},e,{ref:t,icon:l0}))),f0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z`}}]},name:`book`,theme:`outlined`};function p0(){return p0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,p0({},e,{ref:t,icon:f0}))),h0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M916 210H376c-17.7 0-32 14.3-32 32v236H108c-17.7 0-32 14.3-32 32v272c0 17.7 14.3 32 32 32h540c17.7 0 32-14.3 32-32V546h236c17.7 0 32-14.3 32-32V242c0-17.7-14.3-32-32-32zm-504 68h200v200H412V278zm-68 468H144V546h200v200zm268 0H412V546h200v200zm268-268H680V278h200v200z`}}]},name:`build`,theme:`outlined`};function g0(){return g0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,g0({},e,{ref:t,icon:h0}))),v0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z`}}]},name:`bulb`,theme:`outlined`};function y0(){return y0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,y0({},e,{ref:t,icon:v0}))),x0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M251.2 387H320v68.8c0 1.8 1.8 3.2 4 3.2h48c2.2 0 4-1.4 4-3.3V387h68.8c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H376v-68.8c0-1.8-1.8-3.2-4-3.2h-48c-2.2 0-4 1.4-4 3.2V331h-68.8c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm328 0h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm0 265h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm0 104h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm-195.7-81l61.2-74.9c4.3-5.2.7-13.1-5.9-13.1H388c-2.3 0-4.5 1-5.9 2.9l-34 41.6-34-41.6a7.85 7.85 0 00-5.9-2.9h-50.9c-6.6 0-10.2 7.9-5.9 13.1l61.2 74.9-62.7 76.8c-4.4 5.2-.8 13.1 5.8 13.1h50.8c2.3 0 4.5-1 5.9-2.9l35.5-43.5 35.5 43.5c1.5 1.8 3.7 2.9 5.9 2.9h50.8c6.6 0 10.2-7.9 5.9-13.1L383.5 675zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-36 732H180V180h664v664z`}}]},name:`calculator`,theme:`outlined`};function S0(){return S0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,S0({},e,{ref:t,icon:x0}))),w0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 248H728l-32.4-90.8a32.07 32.07 0 00-30.2-21.2H358.6c-13.5 0-25.6 8.5-30.1 21.2L296 248H160c-44.2 0-80 35.8-80 80v456c0 44.2 35.8 80 80 80h704c44.2 0 80-35.8 80-80V328c0-44.2-35.8-80-80-80zm8 536c0 4.4-3.6 8-8 8H160c-4.4 0-8-3.6-8-8V328c0-4.4 3.6-8 8-8h186.7l17.1-47.8 22.9-64.2h250.5l22.9 64.2 17.1 47.8H864c4.4 0 8 3.6 8 8v456zM512 384c-88.4 0-160 71.6-160 160s71.6 160 160 160 160-71.6 160-160-71.6-160-160-160zm0 256c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z`}}]},name:`camera`,theme:`outlined`};function T0(){return T0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,T0({},e,{ref:t,icon:w0}))),D0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M380 704h264c4.4 0 8-3.6 8-8v-84c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v36H428v-36c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v84c0 4.4 3.6 8 8 8zm340-123a40 40 0 1080 0 40 40 0 10-80 0zm239-167.6L935.3 372a8 8 0 00-10.9-2.9l-50.7 29.6-78.3-216.2a63.9 63.9 0 00-60.9-44.4H301.2c-34.7 0-65.5 22.4-76.2 55.5l-74.6 205.2-50.8-29.6a8 8 0 00-10.9 2.9L65 413.4c-2.2 3.8-.9 8.6 2.9 10.8l60.4 35.2-14.5 40c-1.2 3.2-1.8 6.6-1.8 10v348.2c0 15.7 11.8 28.4 26.3 28.4h67.6c12.3 0 23-9.3 25.6-22.3l7.7-37.7h545.6l7.7 37.7c2.7 13 13.3 22.3 25.6 22.3h67.6c14.5 0 26.3-12.7 26.3-28.4V509.4c0-3.4-.6-6.8-1.8-10l-14.5-40 60.3-35.2a8 8 0 003-10.8zM840 517v237H184V517l15.6-43h624.8l15.6 43zM292.7 218.1l.5-1.3.4-1.3c1.1-3.3 4.1-5.5 7.6-5.5h427.6l75.4 208H220l72.7-199.9zM224 581a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`car`,theme:`outlined`};function O0(){return O0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,O0({},e,{ref:t,icon:D0}))),A0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z`}},{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}}]},name:`check-circle`,theme:`outlined`};function j0(){return j0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,j0({},e,{ref:t,icon:A0}))),N0={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z`}}]},name:`close-circle`,theme:`outlined`};function P0(){return P0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,P0({},e,{ref:t,icon:N0}))),I0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M811.4 418.7C765.6 297.9 648.9 212 512.2 212S258.8 297.8 213 418.6C127.3 441.1 64 519.1 64 612c0 110.5 89.5 200 199.9 200h496.2C870.5 812 960 722.5 960 612c0-92.7-63.1-170.7-148.6-193.3zm36.3 281a123.07 123.07 0 01-87.6 36.3H263.9c-33.1 0-64.2-12.9-87.6-36.3A123.3 123.3 0 01140 612c0-28 9.1-54.3 26.2-76.3a125.7 125.7 0 0166.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10c54.3 14.5 92.1 63.8 92.1 120 0 33.1-12.9 64.3-36.3 87.7z`}}]},name:`cloud`,theme:`outlined`};function L0(){return L0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,L0({},e,{ref:t,icon:I0}))),z0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z`}},{tag:`path`,attrs:{d:`M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z`}},{tag:`path`,attrs:{d:`M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z`}}]},name:`cloud-server`,theme:`outlined`};function B0(){return B0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,B0({},e,{ref:t,icon:z0}))),H0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`code`,theme:`outlined`};function U0(){return U0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,U0({},e,{ref:t,icon:H0}))),G0={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M275 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm613 144H768c0-39.8-32.2-72-72-72H200c-39.8 0-72 32.2-72 72v248c0 3.4.2 6.7.7 9.9-.5 7-.7 14-.7 21.1 0 176.7 143.3 320 320 320 160.1 0 292.7-117.5 316.3-271H888c39.8 0 72-32.2 72-72V497c0-39.8-32.2-72-72-72zM696 681h-1.1c.7 7.6 1.1 15.2 1.1 23 0 137-111 248-248 248S200 841 200 704c0-7.8.4-15.4 1.1-23H200V425h496v256zm192-8H776V497h112v176zM613 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm-170 0c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36z`}}]},name:`coffee`,theme:`outlined`};function K0(){return K0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,K0({},e,{ref:t,icon:G0}))),J0={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 372zm198.4-588.1a32 32 0 00-24.5.5L414.9 415 296.4 686c-3.6 8.2-3.6 17.5 0 25.7 3.4 7.8 9.7 13.9 17.7 17 3.8 1.5 7.7 2.2 11.7 2.2 4.4 0 8.7-.9 12.8-2.7l271-118.6 118.5-271a32.06 32.06 0 00-17.7-42.7zM576.8 534.4l26.2 26.2-42.4 42.4-26.2-26.2L380 644.4 447.5 490 422 464.4l42.4-42.4 25.5 25.5L644.4 380l-67.6 154.4zM464.4 422L422 464.4l25.5 25.6 86.9 86.8 26.2 26.2 42.4-42.4-26.2-26.2-86.8-86.9z`}}]},name:`compass`,theme:`outlined`};function Y0(){return Y0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Y0({},e,{ref:t,icon:J0}))),Z0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z`}}]},name:`crown`,theme:`outlined`};function Q0(){return Q0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Q0({},e,{ref:t,icon:Z0}))),e2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z`}}]},name:`dashboard`,theme:`outlined`};function t2(){return t2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,t2({},e,{ref:t,icon:e2}))),r2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`database`,theme:`outlined`};function i2(){return i2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,i2({},e,{ref:t,icon:r2}))),o2={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 372zm47.7-395.2l-25.4-5.9V348.6c38 5.2 61.5 29 65.5 58.2.5 4 3.9 6.9 7.9 6.9h44.9c4.7 0 8.4-4.1 8-8.8-6.1-62.3-57.4-102.3-125.9-109.2V263c0-4.4-3.6-8-8-8h-28.1c-4.4 0-8 3.6-8 8v33c-70.8 6.9-126.2 46-126.2 119 0 67.6 49.8 100.2 102.1 112.7l24.7 6.3v142.7c-44.2-5.9-69-29.5-74.1-61.3-.6-3.8-4-6.6-7.9-6.6H363c-4.7 0-8.4 4-8 8.7 4.5 55 46.2 105.6 135.2 112.1V761c0 4.4 3.6 8 8 8h28.4c4.4 0 8-3.6 8-8.1l-.2-31.7c78.3-6.9 134.3-48.8 134.3-124-.1-69.4-44.2-100.4-109-116.4zm-68.6-16.2c-5.6-1.6-10.3-3.1-15-5-33.8-12.2-49.5-31.9-49.5-57.3 0-36.3 27.5-57 64.5-61.7v124zM534.3 677V543.3c3.1.9 5.9 1.6 8.8 2.2 47.3 14.4 63.2 34.4 63.2 65.1 0 39.1-29.4 62.6-72 66.4z`}}]},name:`dollar`,theme:`outlined`};function s2(){return s2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,s2({},e,{ref:t,icon:o2}))),l2={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 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z`}}]},name:`exclamation-circle`,theme:`outlined`};function u2(){return u2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,u2({},e,{ref:t,icon:l2}))),f2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 472a40 40 0 1080 0 40 40 0 10-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 01-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z`}}]},name:`experiment`,theme:`outlined`};function p2(){return p2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,p2({},e,{ref:t,icon:f2}))),h2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z`}}]},name:`file-image`,theme:`outlined`};function g2(){return g2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,g2({},e,{ref:t,icon:h2}))),v2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z`}}]},name:`file-pdf`,theme:`outlined`};function y2(){return y2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,y2({},e,{ref:t,icon:v2}))),x2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z`}}]},name:`filter`,theme:`outlined`};function S2(){return S2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,S2({},e,{ref:t,icon:x2}))),w2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9zM713 808.5c-53.7 53.2-125 82.4-201 82.4s-147.3-29.2-201-82.4c-53.5-53.1-83-123.5-83-198.4 0-43.5 9.8-85.2 29.1-124 18.8-37.9 46.8-71.8 80.8-97.9a349.6 349.6 0 0058.6-56.8c25-30.5 44.6-64.5 58.2-101a240 240 0 0012.1-46.5c24.1 22.2 44.3 49 61.2 80.4 33.4 62.6 48.8 118.3 45.8 165.7a74.01 74.01 0 0024.4 59.8 73.36 73.36 0 0053.4 18.8c19.7-1 37.8-9.7 51-24.4 13.3-14.9 24.8-30.1 34.4-45.6 14 17.9 25.7 37.4 35 58.4 15.9 35.8 24 73.9 24 113.1 0 74.9-29.5 145.4-83 198.4z`}}]},name:`fire`,theme:`outlined`};function T2(){return T2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,T2({},e,{ref:t,icon:w2}))),D2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 305H624V192c0-17.7-14.3-32-32-32H184v-40c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v784c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V640h248v113c0 17.7 14.3 32 32 32h416c17.7 0 32-14.3 32-32V337c0-17.7-14.3-32-32-32zM184 568V232h368v336H184zm656 145H504v-73h112c4.4 0 8-3.6 8-8V377h216v336z`}}]},name:`flag`,theme:`outlined`};function O2(){return O2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,O2({},e,{ref:t,icon:D2}))),A2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M920 416H616c-4.4 0-8 3.6-8 8v112c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-56h60v320h-46c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h164c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8h-46V480h60v56c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V424c0-4.4-3.6-8-8-8zM656 296V168c0-4.4-3.6-8-8-8H104c-4.4 0-8 3.6-8 8v128c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-64h168v560h-92c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-92V232h168v64c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8z`}}]},name:`font-size`,theme:`outlined`};function j2(){return j2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,j2({},e,{ref:t,icon:A2}))),N2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 310H732.4c13.6-21.4 21.6-46.8 21.6-74 0-76.1-61.9-138-138-138-41.4 0-78.7 18.4-104 47.4-25.3-29-62.6-47.4-104-47.4-76.1 0-138 61.9-138 138 0 27.2 7.9 52.6 21.6 74H144c-17.7 0-32 14.3-32 32v200c0 4.4 3.6 8 8 8h40v344c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V550h40c4.4 0 8-3.6 8-8V342c0-17.7-14.3-32-32-32zm-334-74c0-38.6 31.4-70 70-70s70 31.4 70 70-31.4 70-70 70h-70v-70zm-138-70c38.6 0 70 31.4 70 70v70h-70c-38.6 0-70-31.4-70-70s31.4-70 70-70zM180 482V378h298v104H180zm48 68h250v308H228V550zm568 308H546V550h250v308zm48-376H546V378h298v104z`}}]},name:`gift`,theme:`outlined`};function P2(){return P2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,P2({},e,{ref:t,icon:N2}))),I2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z`}}]},name:`global`,theme:`outlined`};function L2(){return L2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,L2({},e,{ref:t,icon:I2}))),z2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z`}}]},name:`heart`,theme:`outlined`};function B2(){return B2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,B2({},e,{ref:t,icon:z2}))),H2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M957.6 507.4L603.2 158.2a7.9 7.9 0 00-11.2 0L353.3 393.4a8.03 8.03 0 00-.1 11.3l.1.1 40 39.4-117.2 115.3a8.03 8.03 0 00-.1 11.3l.1.1 39.5 38.9-189.1 187H72.1c-4.4 0-8.1 3.6-8.1 8V860c0 4.4 3.6 8 8 8h344.9c2.1 0 4.1-.8 5.6-2.3l76.1-75.6 40.4 39.8a7.9 7.9 0 0011.2 0l117.1-115.6 40.1 39.5a7.9 7.9 0 0011.2 0l238.7-235.2c3.4-3 3.4-8 .3-11.2zM389.8 796.2H229.6l134.4-133 80.1 78.9-54.3 54.1zm154.8-62.1L373.2 565.2l68.6-67.6 171.4 168.9-68.6 67.6zM713.1 658L450.3 399.1 597.6 254l262.8 259-147.3 145z`}}]},name:`highlight`,theme:`outlined`};function U2(){return U2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,U2({},e,{ref:t,icon:H2}))),G2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z`}}]},name:`history`,theme:`outlined`};function K2(){return K2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,K2({},e,{ref:t,icon:G2}))),J2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z`}}]},name:`home`,theme:`outlined`};function Y2(){return Y2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Y2({},e,{ref:t,icon:J2}))),Z2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136V232h752v560zM610.3 476h123.4c1.3 0 2.3-3.6 2.3-8v-48c0-4.4-1-8-2.3-8H610.3c-1.3 0-2.3 3.6-2.3 8v48c0 4.4 1 8 2.3 8zm4.8 144h185.7c3.9 0 7.1-3.6 7.1-8v-48c0-4.4-3.2-8-7.1-8H615.1c-3.9 0-7.1 3.6-7.1 8v48c0 4.4 3.2 8 7.1 8zM224 673h43.9c4.2 0 7.6-3.3 7.9-7.5 3.8-50.5 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H522a8 8 0 008-8.4c-2.8-53.3-32-99.7-74.6-126.1a111.8 111.8 0 0029.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 00-74.6 126.1c-.4 4.6 3.2 8.4 7.8 8.4zm149-262c28.5 0 51.7 23.3 51.7 52s-23.2 52-51.7 52-51.7-23.3-51.7-52 23.2-52 51.7-52z`}}]},name:`idcard`,theme:`outlined`};function Q2(){return Q2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Q2({},e,{ref:t,icon:Z2}))),e4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M956.9 845.1L896.4 632V168c0-17.7-14.3-32-32-32h-704c-17.7 0-32 14.3-32 32v464L67.9 845.1C60.4 866 75.8 888 98 888h828.8c22.2 0 37.6-22 30.1-42.9zM200.4 208h624v395h-624V208zm228.3 608l8.1-37h150.3l8.1 37H428.7zm224 0l-19.1-86.7c-.8-3.7-4.1-6.3-7.8-6.3H398.2c-3.8 0-7 2.6-7.8 6.3L371.3 816H151l42.3-149h638.2l42.3 149H652.7z`}}]},name:`laptop`,theme:`outlined`};function t4(){return t4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,t4({},e,{ref:t,icon:e4}))),r4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z`}}]},name:`line-chart`,theme:`outlined`};function i4(){return i4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,i4({},e,{ref:t,icon:r4}))),o4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z`}}]},name:`link`,theme:`outlined`};function s4(){return s4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,s4({},e,{ref:t,icon:o4}))),l4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z`}}]},name:`lock`,theme:`outlined`};function u4(){return u4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,u4({},e,{ref:t,icon:l4}))),f4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z`}}]},name:`logout`,theme:`outlined`};function p4(){return p4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,p4({},e,{ref:t,icon:f4}))),h4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z`}}]},name:`mail`,theme:`outlined`};function g4(){return g4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,g4({},e,{ref:t,icon:h4}))),v4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M839.2 278.1a32 32 0 00-30.4-22.1H736V144c0-17.7-14.3-32-32-32H320c-17.7 0-32 14.3-32 32v112h-72.8a31.9 31.9 0 00-30.4 22.1L112 502v378c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V502l-72.8-223.9zM360 184h304v72H360v-72zm480 656H184V513.4L244.3 328h535.4L840 513.4V840zM652 572H544V464c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v108H372c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h108v108c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V636h108c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z`}}]},name:`medicine-box`,theme:`outlined`};function y4(){return y4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,y4({},e,{ref:t,icon:v4}))),x4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z`}}]},name:`menu`,theme:`outlined`};function S4(){return S4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,S4({},e,{ref:t,icon:x4}))),w4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z`}}]},name:`message`,theme:`outlined`};function T4(){return T4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,T4({},e,{ref:t,icon:w4}))),D4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z`}},{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}}]},name:`minus-circle`,theme:`outlined`};function O4(){return O4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,O4({},e,{ref:t,icon:D4}))),A4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`mobile`,theme:`outlined`};function j4(){return j4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,j4({},e,{ref:t,icon:A4}))),N4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M692.8 412.7l.2-.2-34.6-44.3a7.97 7.97 0 00-11.2-1.4l-50.4 39.3-70.5-90.1a7.97 7.97 0 00-11.2-1.4l-37.9 29.7a7.97 7.97 0 00-1.4 11.2l70.5 90.2-.2.1 34.6 44.3c2.7 3.5 7.7 4.1 11.2 1.4l50.4-39.3 64.1 82c2.7 3.5 7.7 4.1 11.2 1.4l37.9-29.6c3.5-2.7 4.1-7.7 1.4-11.2l-64.1-82.1zM608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5L114.3 856.1a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6C473 696.1 537.7 720 608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644s-118.2-23.7-161.2-66.8C403.7 534.2 380 476.9 380 416s23.7-118.2 66.8-161.2c43-43.1 100.3-66.8 161.2-66.8s118.2 23.7 161.2 66.8c43.1 43 66.8 100.3 66.8 161.2s-23.7 118.2-66.8 161.2z`}}]},name:`monitor`,theme:`outlined`};function P4(){return P4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,P4({},e,{ref:t,icon:N4}))),I4={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 372zm159.6-585h-59.5c-3 0-5.8 1.7-7.1 4.4l-90.6 180H511l-90.6-180a8 8 0 00-7.1-4.4h-60.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.9L457 515.7h-61.4c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V603h-81.7c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V717c0 4.4 3.6 8 8 8h54.3c4.4 0 8-3.6 8-8v-68.1h82c4.4 0 8-3.6 8-8V611c0-4.4-3.6-8-8-8h-82v-41.5h82c4.4 0 8-3.6 8-8v-29.9c0-4.4-3.6-8-8-8h-62l111.1-204.8c.6-1.2 1-2.5 1-3.8-.1-4.4-3.7-8-8.1-8z`}}]},name:`pay-circle`,theme:`outlined`};function L4(){return L4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,L4({},e,{ref:t,icon:I4}))),z4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M877.1 238.7L770.6 132.3c-13-13-30.4-20.3-48.8-20.3s-35.8 7.2-48.8 20.3L558.3 246.8c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l89.6 89.7a405.46 405.46 0 01-86.4 127.3c-36.7 36.9-79.6 66-127.2 86.6l-89.6-89.7c-13-13-30.4-20.3-48.8-20.3a68.2 68.2 0 00-48.8 20.3L132.3 673c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l106.4 106.4c22.2 22.2 52.8 34.9 84.2 34.9 6.5 0 12.8-.5 19.2-1.6 132.4-21.8 263.8-92.3 369.9-198.3C818 606 888.4 474.6 910.4 342.1c6.3-37.6-6.3-76.3-33.3-103.4zm-37.6 91.5c-19.5 117.9-82.9 235.5-178.4 331s-213 158.9-330.9 178.4c-14.8 2.5-30-2.5-40.8-13.2L184.9 721.9 295.7 611l119.8 120 .9.9 21.6-8a481.29 481.29 0 00285.7-285.8l8-21.6-120.8-120.7 110.8-110.9 104.5 104.5c10.8 10.8 15.8 26 13.3 40.8z`}}]},name:`phone`,theme:`outlined`};function B4(){return B4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,B4({},e,{ref:t,icon:z4}))),H4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`}}]},name:`picture`,theme:`outlined`};function U4(){return U4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,U4({},e,{ref:t,icon:H4}))),G4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 518H506V160c0-4.4-3.6-8-8-8h-26a398.46 398.46 0 00-282.8 117.1 398.19 398.19 0 00-85.7 127.1A397.61 397.61 0 0072 552a398.46 398.46 0 00117.1 282.8c36.7 36.7 79.5 65.6 127.1 85.7A397.61 397.61 0 00472 952a398.46 398.46 0 00282.8-117.1c36.7-36.7 65.6-79.5 85.7-127.1A397.61 397.61 0 00872 552v-26c0-4.4-3.6-8-8-8zM705.7 787.8A331.59 331.59 0 01470.4 884c-88.1-.4-170.9-34.9-233.2-97.2C174.5 724.1 140 640.7 140 552c0-88.7 34.5-172.1 97.2-234.8 54.6-54.6 124.9-87.9 200.8-95.5V586h364.3c-7.7 76.3-41.3 147-96.6 201.8zM952 462.4l-2.6-28.2c-8.5-92.1-49.4-179-115.2-244.6A399.4 399.4 0 00589 74.6L560.7 72c-4.7-.4-8.7 3.2-8.7 7.9V464c0 4.4 3.6 8 8 8l384-1c4.7 0 8.4-4 8-8.6zm-332.2-58.2V147.6a332.24 332.24 0 01166.4 89.8c45.7 45.6 77 103.6 90 166.1l-256.4.7z`}}]},name:`pie-chart`,theme:`outlined`};function K4(){return K4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,K4({},e,{ref:t,icon:G4}))),J4={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`};function Y4(){return Y4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Y4({},e,{ref:t,icon:J4}))),Z4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M280 752h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8zm192-280h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v184c0 4.4 3.6 8 8 8zm192 72h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v256c0 4.4 3.6 8 8 8zm216-432H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`project`,theme:`outlined`};function Q4(){return Q4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Q4({},e,{ref:t,icon:Z4}))),e3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 161H699.2c-49.1 0-97.1 14.1-138.4 40.7L512 233l-48.8-31.3A255.2 255.2 0 00324.8 161H96c-17.7 0-32 14.3-32 32v568c0 17.7 14.3 32 32 32h228.8c49.1 0 97.1 14.1 138.4 40.7l44.4 28.6c1.3.8 2.8 1.3 4.3 1.3s3-.4 4.3-1.3l44.4-28.6C602 807.1 650.1 793 699.2 793H928c17.7 0 32-14.3 32-32V193c0-17.7-14.3-32-32-32zM324.8 721H136V233h188.8c35.4 0 69.8 10.1 99.5 29.2l48.8 31.3 6.9 4.5v462c-47.6-25.6-100.8-39-155.2-39zm563.2 0H699.2c-54.4 0-107.6 13.4-155.2 39V298l6.9-4.5 48.8-31.3c29.7-19.1 64.1-29.2 99.5-29.2H888v488zM396.9 361H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm223.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c0-4.1-3.2-7.5-7.1-7.5H627.1c-3.9 0-7.1 3.4-7.1 7.5zM396.9 501H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm416 0H627.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5z`}}]},name:`read`,theme:`outlined`};function t3(){return t3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,t3({},e,{ref:t,icon:e3}))),r3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M508 704c79.5 0 144-64.5 144-144s-64.5-144-144-144-144 64.5-144 144 64.5 144 144 144zm0-224c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z`}},{tag:`path`,attrs:{d:`M832 256h-28.1l-35.7-120.9c-4-13.7-16.5-23.1-30.7-23.1h-451c-14.3 0-26.8 9.4-30.7 23.1L220.1 256H192c-17.7 0-32 14.3-32 32v28c0 4.4 3.6 8 8 8h45.8l47.7 558.7a32 32 0 0031.9 29.3h429.2a32 32 0 0031.9-29.3L802.2 324H856c4.4 0 8-3.6 8-8v-28c0-17.7-14.3-32-32-32zm-518.6-76h397.2l22.4 76H291l22.4-76zm376.2 664H326.4L282 324h451.9l-44.3 520z`}}]},name:`rest`,theme:`outlined`};function i3(){return i3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,i3({},e,{ref:t,icon:r3}))),o3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`robot`,theme:`outlined`};function s3(){return s3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,s3({},e,{ref:t,icon:o3}))),l3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 00-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0043.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0043.1-30.5 97.52 97.52 0 0021.4-60.8c0-8.4-1.1-16.4-3.1-23.8H864zM762.3 621.4c9.4 14.6 17 30.3 22.5 46.6H700V558.7a211.6 211.6 0 0162.3 62.7zM388 483.1V318.8l124-147 124 147V668H388V483.1zM239.2 668c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668h-84.8zm388.9 116.2c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5-38.3 0-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 01-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM464 400a48 48 0 1096 0 48 48 0 10-96 0z`}}]},name:`rocket`,theme:`outlined`};function u3(){return u3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,u3({},e,{ref:t,icon:l3}))),f3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M793 242H366v-74c0-6.7-7.7-10.4-12.9-6.3l-142 112a8 8 0 000 12.6l142 112c5.2 4.1 12.9.4 12.9-6.3v-74h415v470H175c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h618c35.3 0 64-28.7 64-64V306c0-35.3-28.7-64-64-64z`}}]},name:`rollback`,theme:`outlined`};function p3(){return p3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,p3({},e,{ref:t,icon:f3}))),h3={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z`}},{tag:`path`,attrs:{d:`M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z`}}]},name:`safety`,theme:`outlined`};function g3(){return g3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,g3({},e,{ref:t,icon:h3}))),v3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z`}}]},name:`save`,theme:`outlined`};function y3(){return y3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,y3({},e,{ref:t,icon:v3}))),x3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zM402.9 528.8l-77.5 77.5a8.03 8.03 0 000 11.3l34 34c3.1 3.1 8.2 3.1 11.3 0l77.5-77.5c55.7 35.1 130.1 28.4 178.6-20.1 56.3-56.3 56.3-147.5 0-203.8-56.3-56.3-147.5-56.3-203.8 0-48.5 48.5-55.2 123-20.1 178.6zm65.4-133.3c31.3-31.3 82-31.3 113.2 0 31.3 31.3 31.3 82 0 113.2-31.3 31.3-82 31.3-113.2 0s-31.3-81.9 0-113.2z`}}]},name:`security-scan`,theme:`outlined`};function S3(){return S3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,S3({},e,{ref:t,icon:x3}))),w3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z`}}]},name:`send`,theme:`outlined`};function T3(){return T3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,T3({},e,{ref:t,icon:w3}))),D3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z`}}]},name:`setting`,theme:`outlined`};function O3(){return O3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,O3({},e,{ref:t,icon:D3}))),A3={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z`}}]},name:`shopping-cart`,theme:`outlined`};function j3(){return j3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,j3({},e,{ref:t,icon:A3}))),N3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 312H696v-16c0-101.6-82.4-184-184-184s-184 82.4-184 184v16H192c-17.7 0-32 14.3-32 32v536c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V344c0-17.7-14.3-32-32-32zm-432-16c0-61.9 50.1-112 112-112s112 50.1 112 112v16H400v-16zm392 544H232V384h96v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h224v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h96v456z`}}]},name:`shopping`,theme:`outlined`};function P3(){return P3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,P3({},e,{ref:t,icon:N3}))),I3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M925.6 405.1l-203-253.7a6.5 6.5 0 00-5-2.4H306.4c-1.9 0-3.8.9-5 2.4l-203 253.7a6.5 6.5 0 00.2 8.3l408.6 459.5c1.2 1.4 3 2.1 4.8 2.1 1.8 0 3.5-.8 4.8-2.1l408.6-459.5a6.5 6.5 0 00.2-8.3zM645.2 206.4l34.4 133.9-132.5-133.9h98.1zm8.2 178.5H370.6L512 242l141.4 142.9zM378.8 206.4h98.1L344.3 340.3l34.5-133.9zm-53.4 7l-44.1 171.5h-93.1l137.2-171.5zM194.6 434.9H289l125.8 247.7-220.2-247.7zM512 763.4L345.1 434.9h333.7L512 763.4zm97.1-80.8L735 434.9h94.4L609.1 682.6zm133.6-297.7l-44.1-171.5 137.2 171.5h-93.1z`}}]},name:`sketch`,theme:`outlined`};function L3(){return L3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,L3({},e,{ref:t,icon:I3}))),z3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M870 126H663.8c-17.4 0-32.9 11.9-37 29.3C614.3 208.1 567 246 512 246s-102.3-37.9-114.8-90.7a37.93 37.93 0 00-37-29.3H154a44 44 0 00-44 44v252a44 44 0 0044 44h75v388a44 44 0 0044 44h478a44 44 0 0044-44V466h75a44 44 0 0044-44V170a44 44 0 00-44-44zm-28 268H723v432H301V394H182V198h153.3c28.2 71.2 97.5 120 176.7 120s148.5-48.8 176.7-120H842v196z`}}]},name:`skin`,theme:`outlined`};function B3(){return B3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,B3({},e,{ref:t,icon:z3}))),H3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z`}}]},name:`smile`,theme:`outlined`};function U3(){return U3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,U3({},e,{ref:t,icon:H3}))),G3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M688 264c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48zm-8 136H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM480 544H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 308H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm356.8-74.4c29-26.3 47.2-64.3 47.2-106.6 0-79.5-64.5-144-144-144s-144 64.5-144 144c0 42.3 18.2 80.3 47.2 106.6-57 32.5-96.2 92.7-99.2 162.1-.2 4.5 3.5 8.3 8 8.3h48.1c4.2 0 7.7-3.3 8-7.6C564 871.2 621.7 816 692 816s128 55.2 131.9 124.4c.2 4.2 3.7 7.6 8 7.6H880c4.6 0 8.2-3.8 8-8.3-2.9-69.5-42.2-129.6-99.2-162.1zM692 591c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z`}}]},name:`solution`,theme:`outlined`};function K3(){return K3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,K3({},e,{ref:t,icon:G3}))),J3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1zM586 803L293.4 611.7l-18-11.7H146V424h129.4l17.9-11.7L586 221v582zm348-327H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zm-41.9 261.8l-110.3-63.7a15.9 15.9 0 00-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0021.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM760 344a15.9 15.9 0 0021.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 00-21.7-5.9L746 287.8a15.99 15.99 0 00-5.8 21.8L760 344z`}}]},name:`sound`,theme:`outlined`};function Y3(){return Y3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Y3({},e,{ref:t,icon:J3}))),Z3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z`}}]},name:`star`,theme:`outlined`};function Q3(){return Q3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Q3({},e,{ref:t,icon:Z3}))),e6={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`};function t6(){return t6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,t6({},e,{ref:t,icon:e6}))),r6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M938 458.8l-29.6-312.6c-1.5-16.2-14.4-29-30.6-30.6L565.2 86h-.4c-3.2 0-5.7 1-7.6 2.9L88.9 557.2a9.96 9.96 0 000 14.1l363.8 363.8c1.9 1.9 4.4 2.9 7.1 2.9s5.2-1 7.1-2.9l468.3-468.3c2-2.1 3-5 2.8-8zM459.7 834.7L189.3 564.3 589 164.6 836 188l23.4 247-399.7 399.7zM680 256c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm0 120c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z`}}]},name:`tag`,theme:`outlined`};function i6(){return i6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,i6({},e,{ref:t,icon:r6}))),o6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z`}}]},name:`team`,theme:`outlined`};function s6(){return s6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,s6({},e,{ref:t,icon:o6}))),l6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z`}}]},name:`thunderbolt`,theme:`outlined`};function u6(){return u6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,u6({},e,{ref:t,icon:l6}))),f6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z`}}]},name:`tool`,theme:`outlined`};function p6(){return p6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,p6({},e,{ref:t,icon:f6}))),h6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 160h-92v-40c0-4.4-3.6-8-8-8H256c-4.4 0-8 3.6-8 8v40h-92a44 44 0 00-44 44v148c0 81.7 60 149.6 138.2 162C265.7 630.2 359 721.7 476 734.5v105.2H280c-17.7 0-32 14.3-32 32V904c0 4.4 3.6 8 8 8h512c4.4 0 8-3.6 8-8v-32.3c0-17.7-14.3-32-32-32H548V734.5C665 721.7 758.3 630.2 773.8 514 852 501.6 912 433.7 912 352V204a44 44 0 00-44-44zM184 352V232h64v207.6a91.99 91.99 0 01-64-87.6zm520 128c0 49.1-19.1 95.4-53.9 130.1-34.8 34.8-81 53.9-130.1 53.9h-16c-49.1 0-95.4-19.1-130.1-53.9-34.8-34.8-53.9-81-53.9-130.1V184h384v296zm136-128c0 41-26.9 75.8-64 87.6V232h64v120z`}}]},name:`trophy`,theme:`outlined`};function g6(){return g6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,g6({},e,{ref:t,icon:h6}))),v6={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M608 192a32 32 0 0132 32v160h174.81a32 32 0 0126.68 14.33l113.19 170.84a32 32 0 015.32 17.68V672a32 32 0 01-32 32h-96c0 70.7-57.3 128-128 128s-128-57.3-128-128H384c0 70.7-57.3 128-128 128s-128-57.3-128-128H96a32 32 0 01-32-32V224a32 32 0 0132-32zM256 640a64 64 0 000 128h1.06A64 64 0 00256 640m448 0a64 64 0 000 128h1.06A64 64 0 00704 640M576 256H128v384h17.12c22.13-38.26 63.5-64 110.88-64 47.38 0 88.75 25.74 110.88 64H576zm221.63 192H640v145.12A127.43 127.43 0 01704 576c47.38 0 88.75 25.74 110.88 64H896v-43.52zM500 448a12 12 0 0112 12v40a12 12 0 01-12 12H332a12 12 0 01-12-12v-40a12 12 0 0112-12zM308 320a12 12 0 0112 12v40a12 12 0 01-12 12H204a12 12 0 01-12-12v-40a12 12 0 0112-12z`}}]},name:`truck`,theme:`outlined`};function y6(){return y6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,y6({},e,{ref:t,icon:v6}))),x6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M511.4 124C290.5 124.3 112 303 112 523.9c0 128 60.2 242 153.8 315.2l-37.5 48c-4.1 5.3-.3 13 6.3 12.9l167-.8c5.2 0 9-4.9 7.7-9.9L369.8 727a8 8 0 00-14.1-3L315 776.1c-10.2-8-20-16.7-29.3-26a318.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-7.5 7.5-15.3 14.5-23.4 21.2a7.93 7.93 0 00-1.2 11.1l39.4 50.5c2.8 3.5 7.9 4.1 11.4 1.3C854.5 760.8 912 649.1 912 523.9c0-221.1-179.4-400.2-400.6-399.9z`}}]},name:`undo`,theme:`outlined`};function S6(){return S6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,S6({},e,{ref:t,icon:x6}))),w6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`upload`,theme:`outlined`};function T6(){return T6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,T6({},e,{ref:t,icon:w6}))),D6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z`}}]},name:`user`,theme:`outlined`};function O6(){return O6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,O6({},e,{ref:t,icon:D6}))),A6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v576c0 35.3 28.7 64 64 64h592c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM712 792H136V232h576v560zm176-167l-104-59.8V458.9L888 399v226zM208 360h112c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H208c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}}]},name:`video-camera`,theme:`outlined`};function j6(){return j6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,j6({},e,{ref:t,icon:A6}))),N6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 464H528V448h312v128zm0 264H184V184h656v200H496c-17.7 0-32 14.3-32 32v192c0 17.7 14.3 32 32 32h344v200zM580 512a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`wallet`,theme:`outlined`};function P6(){return P6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,P6({},e,{ref:t,icon:N6}))),I6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M690.1 377.4c5.9 0 11.8.2 17.6.5-24.4-128.7-158.3-227.1-319.9-227.1C209 150.8 64 271.4 64 420.2c0 81.1 43.6 154.2 111.9 203.6a21.5 21.5 0 019.1 17.6c0 2.4-.5 4.6-1.1 6.9-5.5 20.3-14.2 52.8-14.6 54.3-.7 2.6-1.7 5.2-1.7 7.9 0 5.9 4.8 10.8 10.8 10.8 2.3 0 4.2-.9 6.2-2l70.9-40.9c5.3-3.1 11-5 17.2-5 3.2 0 6.4.5 9.5 1.4 33.1 9.5 68.8 14.8 105.7 14.8 6 0 11.9-.1 17.8-.4-7.1-21-10.9-43.1-10.9-66 0-135.8 132.2-245.8 295.3-245.8zm-194.3-86.5c23.8 0 43.2 19.3 43.2 43.1s-19.3 43.1-43.2 43.1c-23.8 0-43.2-19.3-43.2-43.1s19.4-43.1 43.2-43.1zm-215.9 86.2c-23.8 0-43.2-19.3-43.2-43.1s19.3-43.1 43.2-43.1 43.2 19.3 43.2 43.1-19.4 43.1-43.2 43.1zm586.8 415.6c56.9-41.2 93.2-102 93.2-169.7 0-124-120.8-224.5-269.9-224.5-149 0-269.9 100.5-269.9 224.5S540.9 847.5 690 847.5c30.8 0 60.6-4.4 88.1-12.3 2.6-.8 5.2-1.2 7.9-1.2 5.2 0 9.9 1.6 14.3 4.1l59.1 34c1.7 1 3.3 1.7 5.2 1.7a9 9 0 006.4-2.6 9 9 0 002.6-6.4c0-2.2-.9-4.4-1.4-6.6-.3-1.2-7.6-28.3-12.2-45.3-.5-1.9-.9-3.8-.9-5.7.1-5.9 3.1-11.2 7.6-14.5zM600.2 587.2c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9c0 19.8-16.2 35.9-36 35.9zm179.9 0c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9a36.08 36.08 0 01-36 35.9z`}}]},name:`wechat`,theme:`outlined`};function L6(){return L6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,L6({},e,{ref:t,icon:I6}))),z6=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},B6=(e=>e?z6(e):z6),V6=e=>e;function H6(e,t=V6){let n=S.useSyncExternalStore(e.subscribe,S.useCallback(()=>t(e.getState()),[e,t]),S.useCallback(()=>t(e.getInitialState()),[e,t]));return S.useDebugValue(n),n}var U6=e=>{let t=B6(e),n=e=>H6(t,e);return Object.assign(n,t),n},W6=(e=>e?U6(e):U6),G6=c(F1(),1),K6=`AES-GCM`,q6=12,J6=128;async function Y6(){throw Error(`VITE_ENCRYPTION_KEY not configured`)}async function X6(e){let t=await Y6(),n=crypto.getRandomValues(new Uint8Array(q6)),r=new TextEncoder().encode(e),i=await crypto.subtle.encrypt({name:K6,iv:n,tagLength:J6},t,r),a=new Uint8Array(i),o=new Uint8Array(n.length+a.length);return o.set(n),o.set(a,n.length),btoa(String.fromCharCode(...o))}async function Z6(e){let t=await Y6(),n=Uint8Array.from(atob(e),e=>e.charCodeAt(0)),r=n.slice(0,q6),i=n.slice(q6),a=await crypto.subtle.decrypt({name:K6,iv:r,tagLength:J6},t,i);return new TextDecoder().decode(a)}var Q6=`http://ceshi.apiforeign.minzhong.cn`,$6=!1;function e8(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}function t8(e){return Array.isArray(e)?e.map(t8):typeof e==`object`&&e?Object.fromEntries(Object.entries(e).map(([e,t])=>[e8(e),t8(t)])):e}function n8(){return localStorage.getItem(`auth_token`)}function r8(e){localStorage.setItem(`auth_token`,e)}function i8(){localStorage.removeItem(`auth_token`)}async function a8(e){try{return await Z6(e)}catch{return null}}async function o8(e,t={}){let{method:n=`GET`,body:r,auth:i=!0,encryptBody:a=$6}=t,o={"Content-Type":`application/json`};if(i){let e=n8();e&&(o.Authorization=`Bearer ${e}`)}let s;if(r!==void 0){let e=JSON.stringify(r);a?(o[`X-Encrypted`]=`true`,s=JSON.stringify({data:await X6(e)})):s=e}let c=await fetch(`${Q6}/api${e}`,{method:n,headers:o,body:s});if(c.status===204)return;let l=await c.text();if(!l)return;let u;try{u=JSON.parse(l)}catch{throw Error(`响应解析失败 (${c.status})`)}if(u&&typeof u.data==`string`&&a){let e=await a8(u.data);e!==null&&(u=JSON.parse(e))}if(!c.ok){let e=u?.detail||`请求失败 (${c.status})`;throw c.status===401&&(i8(),window.location.pathname!==`/login`&&(window.location.href=`/login`)),Error(e)}return t8(u)}var s8={get:(e,t=!0)=>o8(e,{auth:t}),post:(e,t,n=!0)=>o8(e,{method:`POST`,body:t,auth:n}),put:(e,t,n=!0)=>o8(e,{method:`PUT`,body:t,auth:n}),delete:(e,t=!0)=>o8(e,{method:`DELETE`,auth:t})};async function c8(e,t,n,r){let i=await s8.post(`/auth/admin-login`,{username:e,password:t,captcha_token:n,remember_me:r||!1},!1);return r8(i.accessToken),i.user}async function l8(){await s8.post(`/auth/logout`),i8()}async function u8(){try{return await s8.get(`/auth/me`)}catch{return null}}async function d8(e,t){let n={};e&&(n.start_date=e),t&&(n.end_date=t);let r=new URLSearchParams(n).toString();return s8.get(`/admin/stats${r?`?${r}`:``}`)}async function f8(e=1,t=20,n,r,i){let a=new URLSearchParams;return a.set(`page`,String(e)),a.set(`page_size`,String(t)),n&&a.set(`search`,n),r&&a.set(`user_type`,r),i&&a.set(`frontend_user_kind`,i),s8.get(`/admin/users?${a.toString()}`)}async function p8(e,t){return s8.put(`/admin/users/${e}/frontend-kind`,{frontend_user_kind:t})}async function m8(e,t,n){await s8.post(`/admin/users/${e}/credits`,{amount:t,description:n})}async function h8(e,t){await s8.put(`/admin/users/${e}/status`,{is_active:t})}async function g8(){return s8.get(`/admin/model-configs`)}async function _8(e){return e.id?s8.put(`/admin/model-configs/${e.id}`,e):s8.post(`/admin/model-configs`,e)}async function v8(e){await s8.delete(`/admin/model-configs/${e}`)}async function y8(){return s8.get(`/admin/system-configs`)}async function b8(e,t){await s8.put(`/admin/system-configs/${e}`,{value:t})}async function x8(e,t){let n=new FormData;n.append(`file`,e),n.append(`config_key`,t);let r=localStorage.getItem(`auth_token`),i=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/admin/upload-pdf`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!i.ok){let e=await i.text();throw Error(e||`上传失败`)}return i.json()}async function S8(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/admin/upload-logo`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok){let e=await r.text();throw Error(e||`上传失败`)}return r.json()}function C8(e,t,n){n!=null&&String(n)!==``&&e.set(t,String(n))}async function w8(e){let t=new URLSearchParams;C8(t,`page`,e?.page),C8(t,`page_size`,e?.pageSize),C8(t,`user_id`,e?.userId),C8(t,`user_name`,e?.userName),C8(t,`user_type`,e?.userType),C8(t,`frontend_user_kind`,e?.frontendUserKind),C8(t,`record_type`,e?.recordType||e?.type),C8(t,`credit_subject`,e?.creditSubject),C8(t,`media_type`,e?.mediaType),C8(t,`charge_kind`,e?.chargeKind),C8(t,`source_module`,e?.sourceModule),C8(t,`source_step_code`,e?.sourceStepCode),C8(t,`billing_scene`,e?.billingScene),C8(t,`start_date`,e?.startDate),C8(t,`end_date`,e?.endDate);let n=t.toString()?`?${t}`:``;return s8.get(`/admin/credit-records${n}`)}async function T8(){return s8.get(`/admin/industry-configs`)}async function E8(e){return e.id?s8.put(`/admin/industry-configs/${e.id}`,e):s8.post(`/admin/industry-configs`,e)}async function D8(e){await s8.delete(`/admin/industry-configs/${e}`)}async function O8(){return s8.get(`/admin/video-engines`)}async function k8(e){return e.id?s8.put(`/admin/video-engines/${e.id}`,e):s8.post(`/admin/video-engines`,e)}async function A8(e){await s8.delete(`/admin/video-engines/${e}`)}async function j8(){return s8.get(`/admin/image-engines`)}async function M8(e){return e.id?s8.put(`/admin/image-engines/${e.id}`,e):s8.post(`/admin/image-engines`,e)}async function N8(e){await s8.delete(`/admin/image-engines/${e}`)}async function P8(){return s8.get(`/admin/credit-ratios`)}async function F8(e){return e.id?s8.put(`/admin/credit-ratios/${e.id}`,e):s8.post(`/admin/credit-ratios`,e)}async function I8(e){await s8.delete(`/admin/credit-ratios/${e}`)}async function L8(){return s8.get(`/admin/payment-configs`)}async function R8(e){await s8.put(`/admin/payment-configs/batch`,e)}async function z8(e){let t=new URLSearchParams;e?.paymentMethod&&t.set(`payment_method`,e.paymentMethod),e?.status&&t.set(`status`,e.status),e?.startDate&&t.set(`start_date`,e.startDate),e?.endDate&&t.set(`end_date`,e.endDate);let n=t.toString(),r=n?`/admin/payment-stats?${n}`:`/admin/payment-stats`;return s8.get(r)}async function B8(e){let t=new URLSearchParams;return e?.method&&t.set(`payment_method`,e.method),e?.status&&t.set(`status`,e.status),e?.startDate&&t.set(`start_date`,e.startDate),e?.endDate&&t.set(`end_date`,e.endDate),e?.page&&t.set(`page`,String(e.page)),e?.pageSize&&t.set(`page_size`,String(e.pageSize)),s8.get(`/admin/payment-orders?${t.toString()}`)}async function V8(e){await s8.post(`/admin/payment-orders/${e}/refund`)}async function H8(e=1,t=20){let n=new URLSearchParams;return n.set(`page`,String(e)),n.set(`page_size`,String(t)),s8.get(`/admin/notifications?${n.toString()}`)}async function U8(e){await s8.post(`/admin/notifications`,e)}async function W8(e){await s8.delete(`/admin/notifications/${e}`)}async function G8(e){return s8.get(`/admin/notifications/${e}/read-users`)}async function K8(){return s8.get(`/admin/menu-configs`)}async function q8(e){return e.id?s8.put(`/admin/menu-configs/${e.id}`,e):s8.post(`/admin/menu-configs`,e)}async function J8(e){await s8.delete(`/admin/menu-configs/${e}`)}async function Y8(e){return s8.post(`/admin/users`,e)}async function X8(e,t){await s8.put(`/admin/users/${e}/menus`,{allowed_menus:t})}async function Z8(e,t){await s8.put(`/admin/users/${e}/reset-password`,{new_password:t})}async function Q8(e,t){await s8.post(`/admin/change-password`,{old_password:e,new_password:t})}async function $8(){return s8.get(`/auth/site-info`,!1)}async function e5(){return s8.get(`/admin/recharge-packages`)}async function t5(e){return e.id?s8.put(`/admin/recharge-packages/${e.id}`,e):s8.post(`/admin/recharge-packages`,e)}async function n5(e){await s8.delete(`/admin/recharge-packages/${e}`)}async function r5(e){let t=e?`?page=${e}`:``;return s8.get(`/admin/operation-logs${t}`)}async function i5(e){let t=e?`?page=${e}`:``;return s8.get(`/admin/user-oauth-apps/list${t}`)}async function a5(e){return s8.post(`/admin/user-oauth-apps/create`,e)}async function o5(e){return s8.get(`/admin/user-oauth-apps/read/${e}`)}async function s5(e,t){return s8.post(`/admin/user-oauth-apps/update/${e}`,t)}async function c5(e){await s8.get(`/admin/user-oauth-apps/delete/${e}`)}async function l5(e){let t=new URLSearchParams;e?.page&&t.set(`page`,String(e.page)),e?.page_size&&t.set(`page_size`,String(e.page_size)),e?.type_name&&t.set(`type_name`,e.type_name),e?.open_type&&t.set(`open_type`,String(e.open_type));let n=t.toString();return s8.get(`/open-type/list${n?`?${n}`:``}`)}async function u5(e){return s8.get(`/open-type/select/${e}`)}async function d5(e){return s8.post(`/open-type/create`,e)}async function f5(e,t){return s8.put(`/open-type/update/${e}`,t)}async function p5(e){await s8.delete(`/open-type/delete/${e}`)}async function m5(e){let t=new URLSearchParams;e?.userId&&t.set(`user_id`,e.userId),e?.status&&t.set(`status`,e.status),e?.page&&t.set(`page`,String(e.page)),e?.pageSize&&t.set(`page_size`,String(e.pageSize));let n=t.toString();return s8.get(`/admin/generation-records${n?`?${n}`:``}`)}async function h5(e,t,n){await s8.put(`/admin/generation-records/${e}/status`,{status:t,video_url:n})}async function g5(e,t,n,r){await s8.post(`/admin/generation-records/${e}/generate`,{aspect_ratio:t,resolution:n,image_size:r})}async function _5(){return s8.get(`/generation-ai/engines`)}async function v5(e){let t=new URLSearchParams;e?.genType&&t.set(`gen_type`,e.genType),e?.status&&t.set(`status`,e.status),e?.page&&t.set(`page`,String(e.page)),e?.pageSize&&t.set(`page_size`,String(e.pageSize)),e?.userId&&t.set(`user_id`,e.userId),e?.userName&&t.set(`user_name`,e.userName);let n=t.toString();return s8.get(`/generation-ai/tasks${n?`?${n}`:``}`)}function y5(e,t,n){n==null||String(n).trim()===``||e.set(t,String(n))}async function b5(e){let t=new URLSearchParams;y5(t,`status`,e?.status),y5(t,`keyword`,e?.keyword),y5(t,`user_id`,e?.userId),y5(t,`user_name`,e?.userName),y5(t,`created_start`,e?.createdStart),y5(t,`created_end`,e?.createdEnd),y5(t,`page`,e?.page),y5(t,`page_size`,e?.pageSize);let n=t.toString();return s8.get(`/hot-opening-replications/tasks${n?`?${n}`:``}`)}async function x5(e){return s8.get(`/hot-opening-replications/tasks/${e}`)}async function S5(e){let t=new URLSearchParams;y5(t,`status`,e?.status),y5(t,`analysis_status`,e?.analysisStatus),y5(t,`split_status`,e?.splitStatus),y5(t,`keyword`,e?.keyword),y5(t,`user_id`,e?.userId),y5(t,`user_name`,e?.userName),y5(t,`created_start`,e?.createdStart),y5(t,`created_end`,e?.createdEnd),y5(t,`page`,e?.page),y5(t,`page_size`,e?.pageSize);let n=t.toString();return s8.get(`/shot-replications/task-sets${n?`?${n}`:``}`)}async function C5(e){return s8.get(`/shot-replications/task-sets/${e}`)}async function w5(e,t){let n=new URLSearchParams;y5(n,`source_mode`,t?.sourceMode),y5(n,`split_status`,t?.splitStatus),y5(n,`analysis_status`,t?.analysisStatus),y5(n,`replicate_status`,t?.replicateStatus),y5(n,`page`,t?.page),y5(n,`page_size`,t?.pageSize);let r=n.toString();return s8.get(`/shot-replications/task-sets/${e}/segments${r?`?${r}`:``}`)}async function T5(e){return s8.get(`/shot-replications/segments/${e}`)}async function E5(e){return s8.get(`/shot-replications/projects/${e}`)}async function D5(){return s8.get(`/admin/video-prompt-schema-config`)}async function O5(e){return s8.put(`/admin/video-prompt-schema-config`,e)}async function k5(){return s8.post(`/admin/video-prompt-schema-config/reset-default`)}async function A5(){return s8.get(`/admin/video-prompt-schema-config/export`)}async function j5(e){return s8.post(`/admin/video-prompt-schema-config/import`,e)}async function M5(e){return s8.post(`/admin/video-prompt-schema-config/preview`,e)}async function N5(e){return s8.post(`/user-oauth/request_oauth`,e)}async function P5(e){let t=new URLSearchParams;return e.account_userid&&t.set(`account_userid`,e.account_userid),e.open_type!==void 0&&t.set(`open_type`,String(e.open_type)),e.account_id&&t.set(`account_id`,e.account_id),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),s8.get(`/user-oauth/oauth_list?${t.toString()}`)}async function F5(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/generation-records/upload-image`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok)throw Error(`图片上传失败`);let i=await r.json();return{url:i.url,filename:i.filename}}async function I5(){return s8.get(`/material-consumption/fields`)}async function L5(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.user_id&&t.set(`user_id`,e.user_id),e.consume_date!==void 0&&t.set(`consume_date`,e.consume_date[0]+`,`+e.consume_date[1]),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),s8.get(`/material-consumption/admin/list?${t.toString()}`)}var R5=W6(e=>({user:null,loading:!0,login:async(t,n,r)=>{e({user:await c8(t,n,void 0,r)})},logout:async()=>{await l8(),e({user:null})},checkAuth:async()=>{try{if(!localStorage.getItem(`auth_token`)){e({user:null,loading:!1});return}e({user:await u8(),loading:!1})}catch(t){(t?.message?.includes(`401`)||t?.message?.includes(`Unauthorized`))&&localStorage.removeItem(`auth_token`),e({user:null,loading:!1})}}})),z5=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Q=o(((e,t)=>{t.exports=z5()}))(),{Sider:B5,Content:V5}=wW,H5={HomeOutlined:(0,Q.jsx)(X2,{}),PlayCircleOutlined:(0,Q.jsx)(X4,{}),WalletOutlined:(0,Q.jsx)(F6,{}),RobotOutlined:(0,Q.jsx)(c3,{}),SettingOutlined:(0,Q.jsx)(k3,{}),BellOutlined:(0,Q.jsx)(d0,{}),UserOutlined:(0,Q.jsx)(k6,{}),AppstoreOutlined:(0,Q.jsx)(W1,{}),FileTextOutlined:(0,Q.jsx)(KV,{}),StarOutlined:(0,Q.jsx)($3,{}),HeartOutlined:(0,Q.jsx)(V2,{}),CameraOutlined:(0,Q.jsx)(E0,{}),DashboardOutlined:(0,Q.jsx)(n2,{}),CalculatorOutlined:(0,Q.jsx)(C0,{}),DollarOutlined:(0,Q.jsx)(c2,{}),GiftOutlined:(0,Q.jsx)(F2,{}),ThunderboltOutlined:(0,Q.jsx)(d6,{}),FireOutlined:(0,Q.jsx)(E2,{}),CloudOutlined:(0,Q.jsx)(R0,{}),SmileOutlined:(0,Q.jsx)(W3,{}),TrophyOutlined:(0,Q.jsx)(_6,{}),RocketOutlined:(0,Q.jsx)(d3,{}),BulbOutlined:(0,Q.jsx)(b0,{}),CodeOutlined:(0,Q.jsx)(W0,{}),PictureOutlined:(0,Q.jsx)(W4,{}),VideoCameraOutlined:(0,Q.jsx)(M6,{}),AudioOutlined:(0,Q.jsx)(n0,{}),MailOutlined:(0,Q.jsx)(_4,{}),PhoneOutlined:(0,Q.jsx)(V4,{}),GlobalOutlined:(0,Q.jsx)(R2,{}),ShoppingCartOutlined:(0,Q.jsx)(M3,{}),TeamOutlined:(0,Q.jsx)(c6,{}),BarChartOutlined:(0,Q.jsx)(c0,{}),PieChartOutlined:(0,Q.jsx)(q4,{}),LineChartOutlined:(0,Q.jsx)(a4,{}),SecurityScanOutlined:(0,Q.jsx)(C3,{}),ApiOutlined:(0,Q.jsx)(V1,{}),DatabaseOutlined:(0,Q.jsx)(a2,{}),CloudServerOutlined:(0,Q.jsx)(V0,{}),MenuOutlined:(0,Q.jsx)(C4,{}),PlusOutlined:(0,Q.jsx)(TL,{}),EditOutlined:(0,Q.jsx)(zQ,{}),DeleteOutlined:(0,Q.jsx)(IQ,{}),LockOutlined:(0,Q.jsx)(d4,{}),LogoutOutlined:(0,Q.jsx)(m4,{})},U5=()=>{let e=Ye(),t=Ke(),{user:n,loading:r,logout:i}=R5(),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)(!1),[l]=X.useForm(),[u,d]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`);return e&&JSON.parse(e).siteName||`管理后台`}),[f,p]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`);return e&&JSON.parse(e).siteLogo||``});if((0,S.useEffect)(()=>{$8().then(e=>{let t=e.siteName||`管理后台`,n=e.siteLogo||``;if(d(t),p(n),document.title=t,localStorage.setItem(`siteInfo`,JSON.stringify({siteName:t,siteLogo:n})),n){let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=n,e.type=`image/png`}}).catch(()=>{})},[]),(0,S.useEffect)(()=>{K8().then(e=>{let t=e.filter(e=>{let t=e.menu_target??e.menuTarget??`admin`;return(e.is_active??e.isActive??!0)&&(t===`admin`||t===`both`)}),r=!!(n?.isAdmin??n?.is_admin);if(n&&!r){let e=n.allowedMenus??n?.allowed_menus;if(e&&Array.isArray(e)&&e.length>0){let n=new Set(e);t=t.filter(e=>(e.menu_type??e.menuType)===`group`?t.some(t=>(t.parent_id??t.parentId)===e.id&&n.has(t.path)):n.has(e.path))}else t=[]}o(t)}).catch(()=>{})},[n]),r)return(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,Q.jsx)(SG,{size:`large`})});if(!n)return(0,Q.jsx)(Ct,{to:`/admin/login`,replace:!0});let m={};a.filter(e=>(e.menu_type??e.menuType)!==`group`&&(e.parent_id??e.parentId)).forEach(e=>{let t=e.parent_id??e.parentId;m[t]||(m[t]=[]),m[t].push(e)});let h=[...a].sort((e,t)=>(e.sort_order??e.sortOrder??0)-(t.sort_order??t.sortOrder??0)),g=[];h.forEach(e=>{let t=e.menu_type??e.menuType,n=e.parent_id??e.parentId;if(t===`group`){let t=(m[e.id]||[]).sort((e,t)=>(e.sort_order??e.sortOrder??0)-(t.sort_order??t.sortOrder??0)).map(e=>({key:e.path,icon:H5[e.icon]||void 0,label:e.label}));t.length>0&&g.push({key:`group-${e.id}`,icon:H5[e.icon]||void 0,label:e.label,children:t})}else n||g.push({key:e.path,icon:H5[e.icon]||void 0,label:e.label})});let _=!!(n?.isAdmin??n?.is_admin);g.length===0&&_&&g.push({key:`/`,icon:(0,Q.jsx)(n2,{}),label:`数据概览`},{key:`/users`,icon:(0,Q.jsx)(k6,{}),label:`用户管理`});let v=t.pathname,y=[];g.forEach(e=>{e.children?e.children.forEach(e=>y.push(e.key)):y.push(e.key)}),y.includes(v)||(v=y.find(e=>v.startsWith(e))||`/`);let b=[];return g.forEach(e=>{e.children&&e.children.some(e=>e.key===v)&&b.push(e.key)}),(0,Q.jsxs)(wW,{style:{minHeight:`100vh`,background:`#f1f5f9`},children:[(0,Q.jsxs)(B5,{width:240,theme:`light`,style:{position:`fixed`,left:16,top:16,bottom:16,width:240,background:`linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,border:`1px solid rgba(0, 0, 0, 0.06)`,zIndex:100},children:[(0,Q.jsxs)(`div`,{style:{height:80,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:12,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`},children:[(0,Q.jsx)(`div`,{style:{width:42,height:42,borderRadius:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,overflow:`hidden`},children:f?(0,Q.jsx)(`img`,{src:f,alt:`logo`,style:{width:28,height:28,objectFit:`contain`}}):(0,Q.jsx)(d6,{style:{fontSize:20,color:`#ffffff`}})}),(0,Q.jsx)(`span`,{style:{color:`#1e293b`,fontSize:17,fontWeight:700,letterSpacing:-.02,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:u})]}),(0,Q.jsx)(`div`,{style:{overflowY:`auto`,maxHeight:`calc(100vh - 200px)`,paddingRight:8},children:(0,Q.jsx)(GE,{mode:`inline`,selectedKeys:[v],defaultOpenKeys:b,items:g,style:{background:`transparent`,border:`none`,paddingTop:8,marginTop:8},onClick:({key:t})=>{t.startsWith(`group-`)||e(t)},theme:`light`})}),(0,Q.jsx)(`div`,{style:{position:`absolute`,bottom:16,left:16,right:16,padding:12,background:`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,borderRadius:12,border:`1px solid rgba(0, 0, 0, 0.06)`},children:(0,Q.jsx)(UV,{menu:{items:[{key:`user`,icon:(0,Q.jsx)(k6,{}),label:n?.username,disabled:!0},{type:`divider`},{key:`changePwd`,icon:(0,Q.jsx)(d4,{}),label:`修改密码`},{key:`logout`,icon:(0,Q.jsx)(m4,{}),label:`退出登录`,danger:!0}],onClick:({key:t})=>{t===`logout`&&(i(),e(`/login`)),t===`changePwd`&&(c(!0),l.resetFields())}},placement:`topRight`,arrow:!0,children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,cursor:`pointer`,padding:`8px 12px`,borderRadius:12,transition:`all 0.25s ease`,background:`transparent`},onMouseEnter:e=>{e.currentTarget.style.background=`#ffffff`,e.currentTarget.style.boxShadow=`0 4px 12px rgba(0, 0, 0, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`,e.currentTarget.style.boxShadow=`none`},children:[(0,Q.jsx)(zw,{size:32,icon:(0,Q.jsx)(k6,{}),style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`}}),(0,Q.jsxs)(`div`,{style:{flex:1,overflow:`hidden`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:13,fontWeight:600,color:`#1e293b`,display:`block`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:n?.username}),(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:_?`管理员`:`普通用户`})]})]})})})]}),(0,Q.jsxs)(wW,{style:{marginLeft:272,marginTop:16,marginRight:16,marginBottom:16,background:`transparent`},children:[(0,Q.jsx)(`div`,{style:{height:72,background:`#ffffff`,borderRadius:`16px 16px 0 0`,boxShadow:`0 2px 12px rgba(0, 0, 0, 0.04)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`0 32px`,fontFamily:`var(--font-sans)`,border:`1px solid rgba(0, 0, 0, 0.06)`,borderBottom:`none`},children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:18,color:`#1e293b`,fontWeight:600},children:g.find(e=>e.key===v)?.label||g.flatMap(e=>e.children||[]).find(e=>e.key===v)?.label||`管理后台`})}),(0,Q.jsx)(V5,{style:{padding:32,background:`#ffffff`,borderRadius:`0 0 16px 16px`,boxShadow:`0 4px 24px rgba(0, 0, 0, 0.06)`,overflow:`auto`,border:`1px solid rgba(0, 0, 0, 0.06)`,borderTop:`none`},children:g.length===0&&!_?(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`60vh`,color:`#94a3b8`},children:[(0,Q.jsx)(d4,{style:{fontSize:48,marginBottom:16,color:`#cbd5e1`}}),(0,Q.jsx)(`div`,{style:{fontSize:16,fontWeight:600,color:`#64748b`},children:`暂无任何权限`}),(0,Q.jsx)(`div`,{style:{fontSize:13,marginTop:8},children:`请联系管理员配置菜单权限`})]}):(0,Q.jsx)(wt,{})})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(d4,{}),`修改密码`]}),open:s,onOk:async()=>{try{let e=await l.validateFields();if(e.newPassword!==e.confirmPassword){LG.error(`两次输入的密码不一致`);return}await Q8(e.oldPassword,e.newPassword),LG.success(`密码修改成功`),c(!1),l.resetFields()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`修改失败`)}},onCancel:()=>{c(!1),l.resetFields()},okText:`确认修改`,cancelText:`取消`,width:420,children:(0,Q.jsxs)(X,{form:l,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`oldPassword`,label:`原密码`,rules:[{required:!0,message:`请输入原密码`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请输入原密码`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`newPassword`,label:`新密码`,rules:[{required:!0,min:6,message:`密码至少6位`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`confirmPassword`,label:`确认新密码`,rules:[{required:!0,message:`请再次输入新密码`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请再次输入新密码`,size:`large`})})]})})]})},W5={1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`},G5={1:`巨量`,2:`磁力`,3:`巨量星图`,4:`服务单`,5:`腾讯`},K5=e=>{if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`},q5=()=>{let{message:e}=ox.useApp(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(void 0),[d,f]=(0,S.useState)(1),[p,m]=(0,S.useState)(10),[h,g]=(0,S.useState)(0),[_,v]=(0,S.useState)({account_userid:``,open_type:void 0,account_id:``});(0,S.useEffect)(()=>{y()},[]);let y=async(t=1,r=10,i=_)=>{o(!0);try{let e=await P5({page:t,page_size:r,account_userid:i.account_userid||void 0,open_type:i.open_type,account_id:i.account_id||void 0});e?(e.data&&n(e.data.data||e.data),e.pagination&&(g(e.pagination.total||0),f(e.pagination.page||1),m(e.pagination.pageSize||10))):n(e||[])}catch{e.error(`获取授权列表失败`)}finally{o(!1)}},b=()=>{c(!0)},x=async()=>{if(!l){e.warning(`请选择开户方式`);return}i(!0);try{let t=await N5({open_type:l});t.authUrl?window.open(t.authUrl,`_blank`):e.error(`获取授权链接失败`)}catch{e.error(`请求授权失败`)}finally{i(!1),c(!1),u(void 0)}},C=[{title:`ID`,dataIndex:`id`,key:`id`},{title:`授权账户ID`,dataIndex:`accountId`,key:`accountId`,width:160},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权账户用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,render:e=>(0,Q.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})},{title:`授权账户用户名`,dataIndex:`accountUsername`,key:`accountUsername`},{title:`授权应用ID`,dataIndex:`appid`,key:`appid`},{title:`是否敏感物料授权`,dataIndex:`materialAuthStatus`,key:`materialAuthStatus`,width:100,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`是`:`否`})},{title:`开户方式`,dataIndex:`openType`,key:`openType`,render:e=>(0,Q.jsx)(`span`,{style:{color:`#1e293b`},children:W5[e]||e})},{title:`平台端口`,dataIndex:`portType`,key:`portType`,ellipsis:!0,render:e=>(0,Q.jsx)(`span`,{style:{color:`#1e293b`},children:G5[e]||e})},{title:`用户id`,dataIndex:`userId`,key:`userId`},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,Q.jsx)(`span`,{style:{color:`#64748b`},children:K5(e)})},{title:`更新时间`,dataIndex:`updatedAt`,key:`updatedAt`,width:160,render:e=>(0,Q.jsx)(`span`,{style:{color:`#64748b`},children:K5(e)})},{title:`操作`,key:`action`,width:120,render:(e,t)=>(0,Q.jsx)(vn,{to:`/consume?accountId=${t.id}`,style:{color:`#6366f1`},children:`查看消耗`})}],w=t.map((e,t)=>({...e,index:t+1,key:e.id}));return(0,Q.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(d4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`授权管理`})]}),(0,Q.jsx)(qE,{type:`primary`,size:`medium`,icon:(0,Q.jsx)(TL,{}),onClick:b,loading:r,style:{borderRadius:8,fontSize:14,fontWeight:500},children:`点击授权`})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12,marginBottom:16},children:[(0,Q.jsx)(hW,{placeholder:`账号用户ID`,value:_.account_userid,onChange:e=>v(t=>({...t,account_userid:e.target.value})),style:{width:180},onPressEnter:()=>{f(1),y(1,p)}}),(0,Q.jsx)(RC,{placeholder:`开户方式`,value:_.open_type,onChange:e=>v(t=>({...t,open_type:e})),style:{width:140},options:Object.entries(W5).map(([e,t])=>({value:Number(e),label:t}))}),(0,Q.jsx)(hW,{placeholder:`账号ID`,value:_.account_id,onChange:e=>v(t=>({...t,account_id:e.target.value})),style:{width:180},onPressEnter:()=>{f(1),y(1,p)}}),(0,Q.jsx)(qE,{type:`primary`,size:`medium`,onClick:()=>{f(1),y(1,p)},children:`搜索`}),(0,Q.jsx)(qE,{size:`medium`,onClick:()=>{v({account_userid:``,open_type:void 0,account_id:``}),f(1),y(1,p)},children:`重置`})]}),(0,Q.jsx)(bQ,{dataSource:w,columns:C,loading:a,rowKey:`id`,bordered:!1,scroll:{x:`max-content`},pagination:{current:d,pageSize:p,total:h,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{f(e),m(t),y(e,t)},size:`small`}})]}),(0,Q.jsx)(BG,{title:`选择开户方式`,open:s,onOk:x,onCancel:()=>{c(!1),u(void 0)},okText:`确认授权`,cancelText:`取消`,confirmLoading:r,children:(0,Q.jsx)(RC,{placeholder:`请选择开户方式`,value:l,onChange:e=>u(e),style:{width:`100%`},options:Object.entries(W5).map(([e,t])=>({value:Number(e),label:t}))})})]})},{RangePicker:J5}=YB,Y5=e=>e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),X5=()=>{Ye();let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)([]),[u,d]=(0,S.useState)([]),[f,p]=(0,S.useState)(``),[m,h]=(0,S.useState)(1),[g,_]=(0,S.useState)(10),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)();(0,S.useEffect)(()=>{E(),T()},[m,g,C]);let T=async()=>{a(!0);try{let e=await L5({advertiser_id:v||void 0,user_id:b||void 0,consume_date:C,page:m,page_size:g});t(e.data||[]),r(e.pagination?.total||0)}catch{LG.error(`加载数据失败`)}finally{a(!1)}},E=async()=>{try{let e=((await I5()).data||[]).map(e=>({name:Y5(e.field),description:e.description}));l(e);let t=localStorage.getItem(`consumeColumns`);d(t?JSON.parse(t):e.map(e=>e.name))}catch{LG.error(`加载表头字段失败`)}},D=e.map((e,t)=>({...e,index:t+1,key:e.id})),O=()=>{h(1),T()},k=()=>{y(``),x(``),w(void 0),h(1),T()},A=u.map(e=>c.find(t=>t.name===e)).filter(e=>!!e).map(e=>({title:e.description,dataIndex:e.name,key:e.name,ellipsis:!0}));return(0,Q.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(c2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`消耗记录`})]}),(0,Q.jsx)(VV,{children:(0,Q.jsx)(qE,{icon:(0,Q.jsx)(k3,{}),onClick:()=>s(!0),children:`自定义表头`})})]}),(0,Q.jsx)(`div`,{style:{marginBottom:16},children:(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(hW,{placeholder:`广告主ID`,value:v,onChange:e=>y(e.target.value),style:{width:200}}),(0,Q.jsx)(hW,{placeholder:`用户ID`,value:b,onChange:e=>x(e.target.value),style:{width:200}}),(0,Q.jsx)(J5,{value:C?[(0,YE.default)(C[0]),(0,YE.default)(C[1])]:void 0,onChange:e=>{e&&e[0]&&e[1]?w([e[0].format(`YYYY-MM-DD`),e[1].format(`YYYY-MM-DD`)]):w(void 0)}}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(NC,{}),onClick:O,children:`搜索`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:k,children:`重置`})]})}),(0,Q.jsx)(bQ,{dataSource:D,columns:A,loading:i,rowKey:`id`,bordered:!1,scroll:{x:`max-content`},pagination:{current:m,pageSize:g,total:n,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,size:`small`,onChange:(e,t)=>{h(e),_(t)}}})]}),(0,Q.jsx)(BG,{title:`自定义表头`,open:o,onOk:()=>{localStorage.setItem(`consumeColumns`,JSON.stringify(u)),LG.success(`表头设置已保存`),s(!1)},onCancel:()=>{s(!1),p(``)},okText:`确定`,cancelText:`取消`,width:800,children:(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:20,height:400},children:[(0,Q.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,Q.jsx)(hW,{placeholder:`搜索指标...`,value:f,allowClear:!0,onChange:e=>p(e.target.value),style:{marginBottom:8}}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,marginBottom:12,display:`block`},children:`输入指标名称进行搜索`}),(0,Q.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:[(0,Q.jsx)(`div`,{style:{marginBottom:16},children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:`任务详情指标`})}),(0,Q.jsx)(oz,{checked:u.length===c.length&&c.length>0,indeterminate:u.length>0&&u.length{e.target.checked?d(c.map(e=>e.name)):d([])},style:{marginBottom:12},children:`全选`}),(0,Q.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:8},children:c.filter(e=>e.description.toLowerCase().includes(f.toLowerCase())||e.name.toLowerCase().includes(f.toLowerCase())).map(e=>(0,Q.jsx)(oz,{checked:u.includes(e.name),onChange:t=>{t.target.checked?d(t=>[...t,e.name]):d(t=>t.filter(t=>t!==e.name))},children:e.description},e.name))})]})]}),(0,Q.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,Q.jsxs)(Z.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:[`已添加(`,u.length,`)`]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{size:`small`,onClick:()=>d([]),disabled:u.length===0,children:`清空`}),(0,Q.jsx)(qE,{size:`small`,onClick:async()=>{try{let e=((await I5()).data||[]).map(e=>({name:Y5(e.field),description:e.description}));l(e),d(e.map(e=>e.name)),localStorage.removeItem(`consumeColumns`),LG.success(`表头字段已更新`)}catch{LG.error(`更新表头字段失败`)}},children:`更新表头字段`})]})]}),(0,Q.jsx)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:u.length===0?(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:14,textAlign:`center`,display:`block`,padding:`40px 0`},children:`暂无已选指标`}):(0,Q.jsx)(`div`,{children:u.map((e,t)=>{let n=c.find(t=>t.name===e);return(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`8px 12px`,borderBottom:`1px solid #f0f0f5`,cursor:`move`,userSelect:`none`},draggable:!0,onDragStart:e=>{e.dataTransfer.setData(`index`,String(t))},onDragOver:e=>{e.preventDefault()},onDrop:e=>{let n=parseInt(e.dataTransfer.getData(`index`)),r=t;if(n!==r){let e=[...u],[t]=e.splice(n,1);e.splice(r,0,t),d(e)}},children:[(0,Q.jsx)(Z.Text,{children:n?.description||e}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:t+1})]},e)})})})]})]})})]})},Z5=()=>{let e=Ye(),{login:t}=R5(),[n,r]=(0,S.useState)(!1),i=(()=>{try{let e=localStorage.getItem(`siteInfo`);if(e){let t=JSON.parse(e);return{siteName:t.siteName||`VideoGen.AI`,siteLogo:t.siteLogo||``}}}catch{}return{siteName:`VideoGen.AI`,siteLogo:``}})(),[a,o]=(0,S.useState)(i.siteName),[s,c]=(0,S.useState)(i.siteLogo);return(0,S.useEffect)(()=>{$8().then(e=>{o(e.siteName),c(e.siteLogo)}).catch(()=>{})},[]),(0,Q.jsxs)(`div`,{style:{minHeight:`100vh`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundImage:`url(/backimage.png)`,backgroundSize:`cover`,backgroundPosition:`center`,backgroundRepeat:`no-repeat`,backgroundAttachment:`fixed`,position:`relative`,overflow:`hidden`},children:[(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(135deg, rgba(240,244,255,0.9) 0%, rgba(232,236,248,0.85) 40%, rgba(240,240,255,0.9) 70%, rgba(248,249,255,0.95) 100%)`}}),(0,Q.jsx)(`div`,{style:{position:`absolute`,width:500,height:500,borderRadius:`50%`,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,top:-150,right:-100,filter:`blur(40px)`}}),(0,Q.jsx)(`div`,{style:{position:`absolute`,width:400,height:400,borderRadius:`50%`,background:`radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%)`,bottom:-100,left:-80,filter:`blur(50px)`}}),(0,Q.jsxs)(PR,{variant:`outlined`,style:{width:440,borderRadius:20,boxShadow:`0 20px 60px rgba(0,0,0,0.08)`,border:`1px solid #e2e8f0`,background:`#fff`,zIndex:1},styles:{body:{padding:`36px 28px`}},children:[(0,Q.jsxs)(`div`,{style:{textAlign:`center`,marginBottom:28},children:[(0,Q.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,margin:`0 auto 16px`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:s?`transparent`:`linear-gradient(135deg, #6366f1, #8b5cf6)`,boxShadow:s?`none`:`0 8px 24px rgba(99,102,241,0.25)`},children:s?(0,Q.jsx)(`img`,{src:s,alt:`logo`,style:{width:`100%`,height:`100%`,borderRadius:14,objectFit:`contain`}}):(0,Q.jsx)(d6,{style:{fontSize:26,color:`#fff`}})}),(0,Q.jsxs)(Z.Title,{level:3,style:{margin:0,color:`#1e293b`,fontWeight:700},children:[a,(0,Q.jsx)(`span`,{style:{color:`#6366f1`},children:`.AI`})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:14,color:`#94a3b8`},children:`管理后台`})]}),(0,Q.jsxs)(X,{onFinish:async n=>{r(!0);try{await t(n.username,n.password,n.rememberMe),LG.success(`登录成功`),e(`/`)}catch(e){let t=e?.message||`登录失败`;LG.error(t)}finally{r(!1)}},layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`username`,rules:[{required:!0,message:`请输入用户名`}],children:(0,Q.jsx)(hW,{placeholder:`用户名`,size:`large`,prefix:(0,Q.jsx)(k6,{style:{color:`#94a3b8`,marginRight:8}}),style:{background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,height:48,borderRadius:10,fontSize:14}})}),(0,Q.jsx)(X.Item,{name:`password`,rules:[{required:!0,message:`请输入密码`}],children:(0,Q.jsx)(hW.Password,{placeholder:`密码`,size:`large`,prefix:(0,Q.jsx)(d4,{style:{color:`#94a3b8`,marginRight:8}}),style:{background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,height:48,borderRadius:10,fontSize:14}})}),(0,Q.jsx)(X.Item,{name:`rememberMe`,valuePropName:`checked`,style:{marginBottom:12},children:(0,Q.jsx)(oz,{children:`记住我的登录状态`})}),(0,Q.jsx)(X.Item,{style:{marginBottom:8},children:(0,Q.jsx)(qE,{type:`primary`,htmlType:`submit`,loading:n,block:!0,size:`large`,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登录管理后台`})})]})]})]})};o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(JE()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_zh_cn=r(n.dayjs)})(e,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`zh-cn`,weekdays:`星期日_星期一_星期二_星期三_星期四_星期五_星期六`.split(`_`),weekdaysShort:`周日_周一_周二_周三_周四_周五_周六`.split(`_`),weekdaysMin:`日_一_二_三_四_五_六`.split(`_`),months:`一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月`.split(`_`),monthsShort:`1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月`.split(`_`),ordinal:function(e,t){return t===`W`?e+`周`:e+`日`},weekStart:1,yearStart:4,formats:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`YYYY/MM/DD`,LL:`YYYY年M月D日`,LLL:`YYYY年M月D日Ah点mm分`,LLLL:`YYYY年M月D日ddddAh点mm分`,l:`YYYY/M/D`,ll:`YYYY年M月D日`,lll:`YYYY年M月D日 HH:mm`,llll:`YYYY年M月D日dddd HH:mm`},relativeTime:{future:`%s内`,past:`%s前`,s:`几秒`,m:`1 分钟`,mm:`%d 分钟`,h:`1 小时`,hh:`%d 小时`,d:`1 天`,dd:`%d 天`,M:`1 个月`,MM:`%d 个月`,y:`1 年`,yy:`%d 年`},meridiem:function(e,t){var n=100*e+t;return n<600?`凌晨`:n<900?`早上`:n<1100?`上午`:n<1300?`中午`:n<1800?`下午`:`晚上`}};return n.default.locale(r,null,!0),r}))}))(),YE.default.locale(`zh-cn`);var Q5=()=>{let[e,t]=(0,S.useState)(null),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)([(0,YE.default)().startOf(`day`),(0,YE.default)()]),[o,s]=(0,S.useState)(`数据概览`),c=async()=>{r(!0);try{t(await d8(i[0]?.format(`YYYY-MM-DD`)||void 0,i[1]?.format(`YYYY-MM-DD`)||void 0))}catch{}r(!1)},l=async()=>{try{let e=(await y8()).find(e=>e.key===`site_name`);if(e){let t=`${e.value} 管理后台`;s(t),document.title=t}}catch{s(`数据概览`),document.title=`数据概览`}};(0,S.useEffect)(()=>{c(),l()},[]);let u=()=>{let e=[(0,YE.default)().startOf(`day`),(0,YE.default)()];a(e),m(e)},d=()=>{let e=(0,YE.default)().subtract(1,`day`),t=[e.startOf(`day`),e.endOf(`day`)];a(t),m(t)},f=()=>{let e=[(0,YE.default)().startOf(`week`),(0,YE.default)()];a(e),m(e)},p=()=>{let e=[(0,YE.default)().startOf(`month`),(0,YE.default)()];a(e),m(e)},m=e=>{let n=e[0]?.format(`YYYY-MM-DD`)||void 0,i=e[1]?.format(`YYYY-MM-DD`)||void 0;r(!0),d8(n,i).then(e=>{t(e),r(!1)}).catch(()=>{r(!1)})},h=e=>{e&&(a([e[0],e[1]]),m([e[0],e[1]]))},g=e?[{title:`用户数量`,value:e.totalUsers,lastPeriodValue:e.lastPeriodUsers,icon:(0,Q.jsx)(k6,{}),gradient:`linear-gradient(135deg, #667eea 0%, #764ba2 100%)`,prefix:``,suffix:`位用户`,description:`平台注册用户总数`},{title:`总项目数`,value:e.totalProjects,lastPeriodValue:e.lastPeriodProjects,icon:(0,Q.jsx)($4,{}),gradient:`linear-gradient(135deg, #00d4ff 0%, #0099cc 100%)`,prefix:``,suffix:`个项目`,description:`创建的项目总数`},{title:`项目记录`,value:e.totalRecords,lastPeriodValue:e.lastPeriodRecords,icon:(0,Q.jsx)(KV,{}),gradient:`linear-gradient(135deg, #10b981 0%, #059669 100%)`,prefix:``,suffix:`条记录`,description:`项目记录总数`},{title:`创作记录`,value:e.totalGenerations,lastPeriodValue:e.lastPeriodGenerations,icon:(0,Q.jsx)(X4,{}),gradient:`linear-gradient(135deg, #f59e0b 0%, #d97706 100%)`,prefix:``,suffix:`次创作`,description:`AI创作记录总数`}]:[],_=e?[{title:`支付宝收入`,value:e.todayAlipayRevenue,icon:(0,Q.jsx)(F6,{}),gradient:`linear-gradient(135deg, #22c55e 0%, #16a34a 100%)`,prefix:`¥`,suffix:``,description:`支付宝收款`,tag:`支付宝`},{title:`微信收入`,value:e.todayWechatRevenue,icon:(0,Q.jsx)(c2,{}),gradient:`linear-gradient(135deg, #3b82f6 0%, #2563eb 100%)`,prefix:`¥`,suffix:``,description:`微信收款`,tag:`微信支付`},{title:`总收入`,value:e.totalRevenue,lastPeriodValue:e.lastPeriodRevenue,icon:(0,Q.jsx)($1,{}),gradient:`linear-gradient(135deg, #ec4899 0%, #be185d 100%)`,prefix:`¥`,suffix:``,description:`平台总收入`,tag:`总收入`},{title:`消耗积分`,value:e.creditsConsumedToday,lastPeriodValue:e.lastPeriodCreditsConsumed,icon:(0,Q.jsx)(c2,{}),gradient:`linear-gradient(135deg, #ef4444 0%, #dc2626 100%)`,prefix:``,suffix:`积分`,description:`用户消耗积分`,tag:`积分消耗`}]:[],v=({title:e,value:t,lastPeriodValue:r,icon:i,gradient:a,prefix:o=``,suffix:s=``,description:c,tag:l})=>{let u=r!==void 0&&r>0?((t-r)/r*100).toFixed(1):null,d=u!==null&&parseFloat(u)>=0;return(0,Q.jsx)(PR,{bordered:!1,loading:n,hoverable:!0,style:{borderRadius:16,border:`1px solid rgba(0,0,0,0.04)`,background:`#ffffff`,boxShadow:`0 4px 20px rgba(0,0,0,0.05)`,transition:`all 0.3s ease`,overflow:`hidden`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16,padding:`16px 0`},children:[(0,Q.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:a,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:24,color:`#fff`,flexShrink:0,boxShadow:`0 8px 24px rgba(0,0,0,0.1)`},children:i}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`,fontSize:13},children:e}),l&&(0,Q.jsx)(`span`,{style:{fontSize:10,padding:`2px 8px`,borderRadius:10,background:`rgba(99,102,241,0.1)`,color:`#6366f1`,fontWeight:500},children:l})]}),(0,Q.jsxs)(`div`,{style:{fontSize:28,fontWeight:800,color:`#1e293b`,letterSpacing:-.5,marginBottom:2},children:[o,typeof t==`number`?t.toLocaleString():t,s]}),c&&(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`,fontSize:11},children:c}),u!==null&&r!==void 0&&(0,Q.jsxs)(`div`,{style:{marginTop:8,paddingTop:8,borderTop:`1px solid #f1f5f9`,display:`flex`,alignItems:`center`,gap:8},children:[(0,Q.jsxs)(Z.Text,{style:{color:`#94a3b8`,fontSize:11},children:[`上一周期: `,o,r.toLocaleString(),s]}),(0,Q.jsxs)(`span`,{style:{fontSize:11,fontWeight:500,color:d?`#10b981`:`#ef4444`,display:`flex`,alignItems:`center`,gap:2},children:[d?`↑`:`↓`,` `,Math.abs(parseFloat(u)),`%`]})]})]})]})})};return(0,Q.jsxs)(`div`,{style:{padding:0},children:[(0,Q.jsxs)(`div`,{style:{background:`linear-gradient(135deg, #667eea 0%, #764ba2 100%)`,padding:`24px 24px 32px`,borderRadius:0,marginBottom:-24,position:`relative`,overflow:`hidden`},children:[(0,Q.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`rgba(255,255,255,0.1)`,borderRadius:`50%`}}),(0,Q.jsx)(`div`,{style:{position:`absolute`,bottom:-30,left:-30,width:150,height:150,background:`rgba(255,255,255,0.08)`,borderRadius:`50%`}}),(0,Q.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,Q.jsx)(Z.Title,{level:2,style:{color:`#fff`,marginBottom:4,fontWeight:700},children:o}),(0,Q.jsx)(Z.Text,{style:{color:`rgba(255,255,255,0.8)`,fontSize:14},children:`欢迎回来,查看平台运营数据统计`})]})]}),(0,Q.jsxs)(`div`,{style:{marginTop:40},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,alignItems:`center`,gap:12,flexWrap:`wrap`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{type:!i[0]||!i[1]||i[0]?.isSame((0,YE.default)().startOf(`day`))&&i[1]?.isSame((0,YE.default)(),`day`)?`primary`:`default`,size:`small`,onClick:u,children:`今日`}),(0,Q.jsx)(qE,{type:`default`,size:`small`,onClick:d,children:`昨日`}),(0,Q.jsx)(qE,{type:`default`,size:`small`,onClick:f,children:`本周`}),(0,Q.jsx)(qE,{type:`default`,size:`small`,onClick:p,children:`本月`})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,background:`#fff`,border:`1px solid #e2e8f0`,padding:`6px 12px`,borderRadius:8,boxShadow:`0 1px 2px rgba(0,0,0,0.05)`},children:[(0,Q.jsx)(zB,{style:{color:`#64748b`,fontSize:14}}),(0,Q.jsx)(YB.RangePicker,{value:i,onChange:h,placeholder:[`开始日期`,`结束日期`],size:`small`})]})]}),(0,Q.jsxs)(`div`,{style:{marginBottom:16,paddingLeft:4},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#1e293b`,fontSize:15},children:`核心数据`}),(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`,fontSize:12,marginLeft:8},children:`平台基础运营指标`})]}),(0,Q.jsx)(DK,{gutter:[16,16],children:g.map(e=>(0,Q.jsx)(pz,{xs:12,sm:8,lg:6,children:(0,Q.jsx)(v,{...e})},e.title))})]}),(0,Q.jsxs)(`div`,{style:{marginTop:24},children:[(0,Q.jsxs)(`div`,{style:{marginBottom:16,paddingLeft:4},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#1e293b`,fontSize:15},children:`财务统计`}),(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`,fontSize:12,marginLeft:8},children:`收入与消耗数据`})]}),(0,Q.jsx)(DK,{gutter:[16,16],children:_.map(e=>(0,Q.jsx)(pz,{xs:12,sm:8,lg:6,children:(0,Q.jsx)(v,{...e})},e.title))})]})]})};function $5(e){if(!e)return`-`;let t=e.trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);return n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``),t.replace(`T`,` `).slice(0,16)}var e7=e=>e instanceof Error?e:Error(typeof e==`string`?e:`上传失败`),t7=e=>{if(e instanceof File)return e;throw Error(`请选择有效图片文件`)},n7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(20),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(null),[v]=X.useForm(),[y]=X.useForm(),b=async(e,n)=>{a(!0);try{let i=await l5({page:e||o,page_size:n||c});t(i.items||[]),r(i.total||0)}catch{LG.error(`加载开户方式列表失败`)}finally{a(!1)}};(0,S.useEffect)(()=>{b()},[]);let x=async()=>{try{let e=await v.validateFields();console.log(e),await d5({open_type:e.open_type,type_name:e.type_name,description:e.description,thumb:e.thumb}),LG.success(`创建成功`),d(!1),v.resetFields(),b()}catch(e){LG.error(e?.message||`创建失败`)}},C=async e=>{try{_(await u5(e)),p(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},w=async e=>{try{let t=await u5(e);_(t),y.setFieldsValue({open_type:t.open_type,type_name:t.type_name,description:t.description,thumb:t.thumb}),h(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},T=async()=>{if(g)try{let e=await y.validateFields();await f5(g.id,{open_type:e.open_type,type_name:e.type_name,description:e.description,thumb:e.thumb}),LG.success(`更新成功`),h(!1),y.resetFields(),_(null),b()}catch(e){LG.error(e?.message||`更新失败`)}},E=e=>{BG.confirm({title:`确认删除`,content:`确定要删除这个开户方式吗?`,okText:`删除`,okType:`danger`,cancelText:`取消`,onOk:async()=>{try{await p5(e),LG.success(`删除成功`),b()}catch(e){LG.error(e?.message||`删除失败`)}}})};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(q2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`平台开户方式管理`})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>d(!0),children:`新增`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>b(),children:`刷新`})]})]}),(0,Q.jsx)(bQ,{columns:[{title:`ID`,dataIndex:`id`,width:100,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`开户类型`,dataIndex:`open_type`,width:100,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`类型名称`,dataIndex:`type_name`,width:150,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`描述`,dataIndex:`description`,width:250,ellipsis:!0,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:e})},{title:`缩略图`,dataIndex:`thumb`,width:120,render:e=>e?(0,Q.jsx)(`img`,{src:e,alt:`thumb`,style:{width:80,height:60,objectFit:`cover`}}):`-`},{title:`创建时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:$5(e)})},{title:`更新时间`,dataIndex:`updatedAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:$5(e)})},{title:`操作`,width:200,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(qU,{}),size:`small`,onClick:()=>C(t.id),children:`详情`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(zQ,{}),size:`small`,onClick:()=>w(t.id),children:`更新`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(IQ,{}),size:`small`,danger:!0,onClick:()=>E(t.id),children:`删除`})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:c,total:n,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{s(e),l(t),b(e,t)}},scroll:{x:1e3}})]}),(0,Q.jsx)(BG,{title:`新增开户方式`,open:u,onOk:x,onCancel:()=>{d(!1),v.resetFields()},okText:`创建`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:v,layout:`vertical`,children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户方式Id`,style:{flex:1},rules:[{required:!0,message:`请输入开户方式Id`}],children:(0,Q.jsx)(oB,{style:{width:`100%`},min:1,placeholder:`请输入开户方式Id`})}),(0,Q.jsx)(X.Item,{name:`type_name`,label:`类型名称`,style:{flex:1},rules:[{required:!0,message:`请输入类型名称`},{max:100,message:`类型名称不能超过100个字符`}],children:(0,Q.jsx)(hW,{style:{width:`100%`},placeholder:`请输入类型名称`})})]}),(0,Q.jsx)(X.Item,{name:`description`,label:`描述`,rules:[{required:!0,message:`请输入描述`}],children:(0,Q.jsx)(hW.TextArea,{placeholder:`请输入描述`,rows:4})}),(0,Q.jsx)(X.Item,{name:`thumb`,label:`缩略图`,children:(0,Q.jsx)(E1,{listType:`picture-card`,customRequest:async({file:e,onSuccess:t,onError:n})=>{try{let n=await F5(t7(e));console.log(n),v.setFieldsValue({thumb:n.url}),t?.({url:n.url})}catch(e){n?.(e7(e))}},children:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(E6,{style:{fontSize:24,color:`#999`}}),(0,Q.jsx)(`div`,{style:{marginTop:8},children:`上传图片`})]})})})]})}),(0,Q.jsx)(BG,{title:`开户方式详情`,open:f,onCancel:()=>{p(!1),_(null)},okText:`关闭`,cancelText:`取消`,width:600,children:g&&(0,Q.jsxs)(`div`,{style:{lineHeight:`2`},children:[(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`ID:`}),` `,g.id]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`开户类型:`}),` `,g.open_type]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`类型名称:`}),` `,g.type_name]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`描述:`}),` `,g.description]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`缩略图:`}),` `,g.thumb?(0,Q.jsx)(`img`,{src:g.thumb,alt:`thumb`,style:{width:120,height:80,objectFit:`cover`}}):`-`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`创建时间:`}),` `,$5(g.createdAt)]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`更新时间:`}),` `,$5(g.updatedAt)]})]})}),(0,Q.jsx)(BG,{title:`更新开户方式`,open:m,onOk:T,onCancel:()=>{h(!1),y.resetFields(),_(null)},okText:`更新`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:y,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户类型`,rules:[{required:!0,message:`请输入开户类型`}],children:(0,Q.jsx)(oB,{min:1,placeholder:`请输入开户类型编号`})}),(0,Q.jsx)(X.Item,{name:`type_name`,label:`类型名称`,rules:[{required:!0,message:`请输入类型名称`},{max:100,message:`类型名称不能超过100个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入类型名称`})}),(0,Q.jsx)(X.Item,{name:`description`,label:`描述`,rules:[{required:!0,message:`请输入描述`}],children:(0,Q.jsx)(hW.TextArea,{placeholder:`请输入描述`,rows:4})}),(0,Q.jsx)(X.Item,{name:`thumb`,label:`缩略图`,children:(0,Q.jsx)(E1,{listType:`picture-card`,defaultFileList:g?.thumb?[{uid:`1`,name:`thumb`,status:`done`,url:g.thumb}]:[],customRequest:async({file:e,onSuccess:t,onError:n})=>{try{let n=await F5(t7(e));y.setFieldsValue({thumb:n.url}),t?.({url:n.url})}catch(e){n?.(e7(e))}},children:!y.getFieldValue(`thumb`)&&(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(E6,{style:{fontSize:24,color:`#999`}}),(0,Q.jsx)(`div`,{style:{marginTop:8},children:`上传图片`})]})})})]})})]})},r7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(`frontend`),[c,l]=(0,S.useState)(``),[u,d]=(0,S.useState)({open:!1,user:null}),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(`frontend`),[g,_]=(0,S.useState)({open:!1,user:null}),[v,y]=(0,S.useState)([]),[b,x]=(0,S.useState)([]),[C,w]=(0,S.useState)({open:!1,user:null}),[T]=X.useForm(),[E]=X.useForm(),[D]=X.useForm(),[O,k]=(0,S.useState)(1),[A,j]=(0,S.useState)(20),[M,N]=(0,S.useState)(0),[P,F]=(0,S.useState)([]),[I]=X.useForm(),[L,R]=(0,S.useState)(!1),z=async()=>{r(!0);try{let e=await f8(O,A,i||void 0,o,o===`frontend`&&c||void 0);t(e.items||[]),N(e.total||0)}catch{}r(!1)};(0,S.useEffect)(()=>{z()},[O,A,i,o,c]),(0,S.useEffect)(()=>{(async()=>{try{let e=(await y8()).filter(e=>e.key.startsWith(`user_`)&&e.key.includes(`credits`));F(e);let t={};e.forEach(e=>{t[e.key]=e.value}),I.setFieldsValue(t)}catch{}})()},[]);let B=async()=>{try{let e=await I.validateFields();R(!0);for(let t of P){let n=e[t.key];n!==void 0&&n!==t.value&&await b8(t.id,n??``)}LG.success(`积分配置已保存`),F((await y8()).filter(e=>e.key.startsWith(`user_`)&&e.key.includes(`credits`))),R(!1)}catch(e){R(!1),LG.error(e?.message||`保存失败`)}},V=(e,t)=>{k(e),j(t)},H=()=>z(),U=async()=>{try{let e=await T.validateFields(),{user:t}=u;if(!t)return;await m8(t.id,e.amount,e.description),LG.success(`已${e.amount>0?`增加`:`扣除`} ${Math.abs(e.amount)} 积分`),d({open:!1,user:null}),T.resetFields(),z()}catch{}},W=async e=>{await h8(e.id,!e.isActive),LG.success(e.isActive?`已禁用该用户`:`已启用该用户`),z()},ee=async()=>{try{let e=await E.validateFields(),t=e.user_type||`frontend`;await Y8({username:t===`admin`?e.username:void 0,password:e.password,email:e.email||void 0,phone:t===`frontend`?e.phone:e.phone||void 0,credits:e.credits||0,user_type:t,frontend_user_kind:e.frontend_user_kind||`external`}),LG.success(`用户创建成功`),p(!1),E.resetFields(),h(`frontend`),z()}catch{}},te=async e=>{try{let t=await K8(),n=e.userType===`admin`;y(t.filter(e=>{let t=e.menu_target??e.menuTarget??`frontend`;return n?t===`admin`||t===`both`:t===`frontend`||t===`both`})),x(e.allowedMenus||[]),_({open:!0,user:e})}catch{LG.error(`加载菜单失败`)}},ne=v.filter(e=>(e.menu_type??e.menuType)===`group`),re=v.filter(e=>(e.menu_type??e.menuType)!==`group`),ie={};re.filter(e=>e.parent_id??e.parentId).forEach(e=>{let t=e.parent_id??e.parentId;ie[t]||(ie[t]=[]),ie[t].push(e)});let ae=re.filter(e=>!(e.parent_id??e.parentId)),G=async()=>{let{user:e}=g;if(e)try{await X8(e.id,b.length>0?b:null),LG.success(`菜单权限已更新`),_({open:!1,user:null}),z()}catch(e){LG.error(e?.message||`保存失败`)}},oe=async()=>{try{let e=await D.validateFields(),{user:t}=C;if(!t)return;await Z8(t.id,e.newPassword),LG.success(`已重置 ${t.username} 的密码`),w({open:!1,user:null}),D.resetFields()}catch{}},K=async(e,t)=>{try{await p8(e.id,t),LG.success(t===`internal`?`已设为前台内部用户`:`已设为前台外部用户`),z()}catch(e){LG.error(e?.message||`设置失败`)}},se=o===`admin`,ce=[{title:`用户`,key:`user`,width:200,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:t.isAdmin?`linear-gradient(135deg, #f59e0b, #f97316)`:`linear-gradient(135deg, #6366f1, #8b5cf6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:13,fontWeight:700},children:t.username.charAt(0).toUpperCase()}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{fontWeight:600},children:[t.username,t.isAdmin&&(0,Q.jsx)(NQ,{color:`orange`,style:{marginLeft:6,fontSize:10},children:`管理员`})]}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.email})]})]})},...se?[]:[{title:`积分余额`,dataIndex:`credits`,width:120,sorter:(e,t)=>e.credits-t.credits,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,style:{color:e>0?`#10b981`:`#ef4444`,fontSize:15},children:e.toLocaleString()})}],{title:`手机号`,dataIndex:`phone`,width:130,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,children:e||`-`})},...se?[]:[{title:`前台归类`,dataIndex:`frontendUserKind`,width:110,render:e=>(0,Q.jsx)(NQ,{color:e===`internal`?`geekblue`:`default`,children:e===`internal`?`内部用户`:`外部用户`})}],{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`red`,children:e?`正常`:`禁用`})},{title:`注册时间`,dataIndex:`createdAt`,width:120,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:$5(e)})},{title:`最后登录`,dataIndex:`lastLoginAt`,width:140,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:$5(e)})},{title:`操作`,key:`action`,width:320,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[!se&&(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(F6,{}),onClick:()=>{d({open:!0,user:t}),T.resetFields()},children:`调整积分`}),!se&&t.frontendUserKind!==`internal`&&(0,Q.jsx)(qE,{type:`link`,size:`small`,onClick:()=>K(t,`internal`),children:`设为内部`}),!se&&t.frontendUserKind===`internal`&&(0,Q.jsx)(qE,{type:`link`,size:`small`,onClick:()=>K(t,`external`),children:`取消内部`}),(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(C4,{}),onClick:()=>te(t),children:`菜单权限`}),(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(d4,{}),onClick:()=>{w({open:!0,user:t}),D.resetFields()},children:`重置密码`}),(0,Q.jsx)(WG,{title:t.isActive?`确定禁用该用户?`:`确定启用该用户?`,onConfirm:()=>W(t),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:t.isActive,icon:t.isActive?(0,Q.jsx)(n6,{}):(0,Q.jsx)(M0,{}),children:t.isActive?`禁用`:`启用`})})]})}];return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:20},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:`#6366f1`},children:(0,Q.jsx)(k3,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:4,style:{margin:0},children:`积分配置`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`设置用户注册和登录赠送的积分`})]})]}),(0,Q.jsxs)(X,{form:I,layout:`vertical`,children:[(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr 1fr`,gap:20},children:[(0,Q.jsx)(X.Item,{name:`user_register_credits`,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:`注册赠送积分`}),extra:`用户注册时赠送的初始积分`,children:(0,Q.jsx)(oB,{min:0,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`user_login_credits`,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:`每日登录赠送积分`}),extra:`用户每日首次登录赠送的积分`,children:(0,Q.jsx)(oB,{min:0,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`user_login_credits_enabled`,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:`启用每日登录积分`}),extra:`是否开启每日登录赠送积分功能`,children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(Mq,{defaultChecked:P.find(e=>e.key===`user_login_credits_enabled`)?.value===`true`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:13},children:P.find(e=>e.key===`user_login_credits_enabled`)?.value===`true`?`已启用`:`已禁用`})]})})]}),(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:16},children:(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(b3,{}),onClick:B,loading:L,size:`large`,style:{borderRadius:8},children:`保存配置`})})]})]}),(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,Q.jsx)(hW,{placeholder:`搜索用户名或手机号`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),value:i,onChange:e=>a(e.target.value),onPressEnter:H,style:{width:280,borderRadius:8},allowClear:!0}),!se&&(0,Q.jsx)(RC,{value:c,onChange:e=>{k(1),l(e)},style:{width:140},options:[{value:``,label:`全部前台用户`},{value:`internal`,label:`内部用户`},{value:`external`,label:`外部用户`}]}),(0,Q.jsx)(qE,{type:`primary`,onClick:H,style:{borderRadius:8},children:`搜索`})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>{h(o),E.setFieldsValue({user_type:o}),p(!0)},style:{borderRadius:8},children:`创建用户`})]}),(0,Q.jsx)(bR,{activeKey:o,onChange:e=>{s(e),l(``),k(1)},items:[{key:`frontend`,label:`前台用户`},{key:`admin`,label:`后台用户`}]}),(0,Q.jsx)(bQ,{columns:ce,dataSource:e,rowKey:`id`,loading:n,pagination:{current:O,pageSize:A,total:M,onChange:V,showSizeChanger:!0,showTotal:e=>`共 ${e} 个用户`},scroll:{x:1e3}})]}),(0,Q.jsxs)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(F6,{}),`调整积分 - `,u.user?.username]}),open:u.open,onOk:U,onCancel:()=>{d({open:!1,user:null}),T.resetFields()},okText:`确认`,cancelText:`取消`,width:440,children:[(0,Q.jsxs)(`div`,{style:{marginBottom:16,padding:`12px 16px`,background:`#f8fafc`,borderRadius:8},children:[(0,Q.jsx)(`span`,{style:{color:`#64748b`},children:`当前积分:`}),(0,Q.jsx)(`span`,{style:{fontWeight:800,fontSize:18,color:`#6366f1`},children:u.user?.credits.toLocaleString()})]}),(0,Q.jsxs)(X,{form:T,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`amount`,label:`积分变动`,rules:[{required:!0,message:`请输入积分数量`}],children:(0,Q.jsx)(oB,{style:{width:`100%`},size:`large`,placeholder:`正数增加,负数扣除`,formatter:e=>`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,`,`)})}),(0,Q.jsx)(X.Item,{name:`description`,label:`原因`,rules:[{required:!0,message:`请输入调整原因`}],children:(0,Q.jsx)(hW.TextArea,{rows:2,placeholder:`请输入调整原因`,size:`large`})})]})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(k6,{}),`创建用户`]}),open:f,onOk:ee,onCancel:()=>{p(!1),E.resetFields(),h(`frontend`)},okText:`创建`,cancelText:`取消`,width:480,children:(0,Q.jsxs)(X,{form:E,layout:`vertical`,style:{marginTop:16},onValuesChange:e=>{e.user_type&&h(e.user_type)},children:[(0,Q.jsx)(X.Item,{name:`user_type`,label:`用户类型`,initialValue:`frontend`,rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`frontend`,label:`前端用户`},{value:`admin`,label:`后台管理员`}]})}),m===`frontend`&&(0,Q.jsx)(X.Item,{name:`frontend_user_kind`,label:`前台归类`,initialValue:`external`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`external`,label:`外部用户`},{value:`internal`,label:`内部用户`}]})}),m===`frontend`?(0,Q.jsx)(X.Item,{name:`phone`,label:`手机号`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,Q.jsx)(hW,{placeholder:`请输入手机号`,maxLength:11,size:`large`})}):(0,Q.jsx)(X.Item,{name:`username`,label:`用户名`,rules:[{required:!0,message:`请输入用户名`}],children:(0,Q.jsx)(hW,{placeholder:`请输入用户名`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`password`,label:`密码`,rules:[{required:!0,min:6,message:`密码至少6位`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请输入密码(至少6位)`,size:`large`})}),m===`frontend`&&(0,Q.jsx)(X.Item,{name:`credits`,label:`初始积分`,initialValue:0,children:(0,Q.jsx)(oB,{min:0,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`email`,label:`邮箱`,children:(0,Q.jsx)(hW,{placeholder:`选填`,size:`large`})})]})}),(0,Q.jsxs)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(C4,{}),`菜单权限 - `,g.user?.username,` (`,g.user?.userType===`admin`?`后台菜单`:`前台菜单`,`)`]}),open:g.open,onOk:G,onCancel:()=>{_({open:!1,user:null})},okText:`保存`,cancelText:`取消`,width:520,children:[(0,Q.jsx)(`div`,{style:{marginBottom:12},children:(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:13},children:`勾选该用户可访问的菜单,不勾选则显示全部菜单`})}),(0,Q.jsx)(`div`,{style:{padding:`12px 16px`,background:`#f8fafc`,borderRadius:8,maxHeight:400,overflow:`auto`},children:(0,Q.jsx)(oz.Group,{value:b,onChange:e=>x(e),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:8,style:{width:`100%`},children:[ae.map(e=>(0,Q.jsxs)(oz,{value:e.path,style:{width:`100%`},children:[e.label,(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,marginLeft:8},children:e.path})]},e.path)),ne.map(e=>{let t=ie[e.id]||[];return t.length===0?null:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{fontWeight:600,fontSize:13,color:`#6366f1`,marginBottom:4,marginTop:4},children:e.label}),(0,Q.jsx)(VV,{direction:`vertical`,size:4,style:{paddingLeft:12,width:`100%`},children:t.map(e=>(0,Q.jsxs)(oz,{value:e.path,style:{width:`100%`},children:[e.label,(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,marginLeft:8},children:e.path})]},e.path))})]},e.id)})]})})})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(d4,{}),`重置密码 - `,C.user?.username]}),open:C.open,onOk:oe,onCancel:()=>{w({open:!1,user:null}),D.resetFields()},okText:`确认重置`,cancelText:`取消`,width:420,children:(0,Q.jsx)(X,{form:D,layout:`vertical`,style:{marginTop:16},children:(0,Q.jsx)(X.Item,{name:`newPassword`,label:`新密码`,rules:[{required:!0,min:6,message:`密码至少6位`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`})})})})]})},i7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)({open:!1,model:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t(await g8())}catch{}r(!1)};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={name:e.name,provider:e.provider,model_name:e.modelName,api_base:e.apiBase,api_key:e.apiKey,weight:e.weight,max_tokens:e.maxTokens,temperature:e.temperature,is_active:e.isActive??!0,priority:e.priority??0};i.model?.id?await _8({id:i.model.id,...t}):await _8(t),LG.success(i.model?.id?`模型配置已更新`:`模型配置已添加`),a({open:!1,model:null}),o.resetFields(),s()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},l=async e=>{try{await v8(e),LG.success(`模型配置已删除`),s()}catch(e){LG.error(e?.message||`删除失败`)}},u=e=>{a({open:!0,model:e||null}),e?o.setFieldsValue(e):(o.resetFields(),o.setFieldsValue({provider:`sdk`,weight:1,maxTokens:4096,temperature:.7,isActive:!0,priority:0}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(Z.Text,{type:`secondary`,children:[`共 `,e.length,` 个模型配置,按权重进行加权随机调度`]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加模型`})]}),(0,Q.jsx)(bQ,{columns:[{title:`模型名称`,dataIndex:`name`,width:150,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:t.isActive?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`linear-gradient(135deg, #94a3b8, #cbd5e1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:14},children:(0,Q.jsx)(c3,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{fontWeight:600},children:e}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.modelName})]})]})},{title:`提供商`,dataIndex:`provider`,width:140,render:e=>(0,Q.jsx)(NQ,{color:e===`mock`?`default`:`blue`,children:{sdk:`SDK模式`,openai_compatible:`OpenAI兼容`,mock:`Mock模式`}[e]||e})},{title:`API地址`,dataIndex:`apiBase`,width:200,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},ellipsis:!0,children:e||`-`})},{title:`权重`,dataIndex:`weight`,width:80,sorter:(e,t)=>e.weight-t.weight},{title:`Max Tokens`,dataIndex:`maxTokens`,width:100},{title:`Temperature`,dataIndex:`temperature`,width:100,render:e=>e.toFixed(1)},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除该模型配置?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(c3,{}),i.model?.id?`编辑模型`:`添加模型`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,model:null}),o.resetFields()},okText:`确认`,cancelText:`取消`,width:560,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`name`,label:`显示名称`,rules:[{required:!0,message:`请输入模型名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:GPT-4o`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`provider`,label:`提供商`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`sdk`,label:`SDK模式`},{value:`openai_compatible`,label:`OpenAI兼容`},{value:`mock`,label:`Mock模式`}]})}),(0,Q.jsx)(X.Item,{name:`modelName`,label:`模型标识`,style:{flex:1},rules:[{required:!0,message:`请输入模型标识`}],children:(0,Q.jsx)(hW,{placeholder:`例如:gpt-4o`,size:`large`})})]}),(0,Q.jsx)(X.Item,{name:`apiBase`,label:`API地址`,children:(0,Q.jsx)(hW,{placeholder:`https://api.openai.com/v1`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`apiKey`,label:`API Key`,children:(0,Q.jsx)(hW.Password,{placeholder:`sk-****`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`weight`,label:`权重`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:0,max:10,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`maxTokens`,label:`Max Tokens`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:256,max:128e3,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`temperature`,label:`Temperature`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:0,max:2,step:.1,style:{width:`100%`},size:`large`})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`priority`,label:`优先级`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:0,max:10,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用`,valuePropName:`checked`,style:{flex:1,paddingTop:30},children:(0,Q.jsx)(Mq,{})})]})]})})]})},a7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(``),[c]=X.useForm(),[l,u]=(0,S.useState)(``);(0,S.useEffect)(()=>{d()},[]);let d=async()=>{r(!0);let e=await y8();t(e);let n={};e.forEach(e=>{n[e.key]=e.value}),c.setFieldsValue(n),r(!1)},f=async()=>{try{let n=await c.validateFields();a(!0);for(let t of e){let e=n[t.key];e!==void 0&&e!==t.value&&await b8(t.id,e??``)}LG.success(`系统配置已保存`),t(await y8()),a(!1)}catch(e){a(!1),LG.error(e?.message||`保存失败`)}},p=async(e,n)=>{s(n);try{let r=await x8(e,n);t(e=>e.map(e=>e.key===n?{...e,value:r.url}:e)),c.setFieldsValue({[n]:r.url}),LG.success(`PDF上传成功`)}catch{LG.error(`上传失败`)}finally{s(``)}return!1},m=async e=>{s(`site_logo`);try{let n=await S8(e);t(e=>e.map(e=>e.key===`site_logo`?{...e,value:n.url}:e)),c.setFieldsValue({site_logo:n.url}),u(n.url),LG.success(`Logo上传成功`)}catch{LG.error(`上传失败`)}finally{s(``)}return!1},h={站点信息:e.filter(e=>e.key.startsWith(`site_`)),协议配置:e.filter(e=>e.key===`user_agreement_url`||e.key===`privacy_policy_url`),"SEO 设置":e.filter(e=>e.key.startsWith(`seo_`)),用户积分配置:e.filter(e=>e.key.startsWith(`user_`)&&e.key.includes(`credits`))},g=e=>({site_name:`平台显示名称,将展示在页面标题和导航栏`,site_logo:`平台Logo图片URL,建议尺寸 200x40px`,user_agreement_url:`用户注册/登录时需同意的用户协议PDF文件`,privacy_policy_url:`用户注册/登录时需同意的隐私政策PDF文件`,seo_title:`搜索引擎结果中显示的标题`,seo_description:`搜索引擎结果中显示的描述文字,建议150字以内`,seo_keywords:`用逗号分隔的关键词列表`,user_register_credits:`用户注册时赠送的初始积分,默认100`,user_login_credits:`用户每日登录赠送的积分数量`,user_login_credits_enabled:`是否启用每日登录赠送积分功能`})[e.key]||e.description||``,_=e=>e.key===`site_logo`?(0,Q.jsx)(v,{config:e}):e.key===`seo_description`?(0,Q.jsx)(hW.TextArea,{rows:3,placeholder:e.description,size:`large`}):e.key===`seo_keywords`?(0,Q.jsx)(hW,{placeholder:`关键词1, 关键词2, 关键词3`,size:`large`}):e.key===`user_login_credits_enabled`?(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(Mq,{defaultChecked:e.value===`true`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:13},children:e.value===`true`?`已启用`:`已禁用`})]}):e.key===`user_register_credits`||e.key===`user_login_credits`?(0,Q.jsx)(hW,{type:`number`,min:0,placeholder:e.description,size:`large`}):(0,Q.jsx)(hW,{placeholder:e.description,size:`large`}),v=({config:e})=>{let n=e.value&&e.value.startsWith(`/uploads/`),r=n?`http://ceshi.apiforeign.minzhong.cn${e.value}`:``;return(0,Q.jsxs)(`div`,{style:{padding:`16px`,borderRadius:10,border:`1px solid #f0f0f5`,background:`#fafbfc`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(E6,{style:{color:`#6366f1`,fontSize:18}}),(0,Q.jsx)(Z.Text,{strong:!0,children:`网站Logo`})]}),(0,Q.jsxs)(VV,{children:[n&&(0,Q.jsx)(qE,{size:`small`,danger:!0,onClick:()=>{t(e=>e.map(e=>e.key===`site_logo`?{...e,value:``}:e)),c.setFieldsValue({site_logo:``}),LG.success(`Logo已移除`)},children:`移除`}),(0,Q.jsx)(E1,{accept:`image/*`,showUploadList:!1,beforeUpload:m,children:(0,Q.jsx)(qE,{size:`small`,type:`primary`,icon:(0,Q.jsx)(E6,{}),loading:o===`site_logo`,children:n?`重新上传`:`上传Logo`})})]})]}),n?(0,Q.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,Q.jsx)(`img`,{src:r,alt:`Logo预览`,style:{maxWidth:200,maxHeight:80,objectFit:`contain`,border:`1px solid #e2e8f0`,borderRadius:8,padding:8}}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,display:`block`,marginTop:8},children:`建议尺寸:200x40px,支持 PNG、JPG 格式`})]}):(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:`尚未上传Logo,将使用系统默认Logo`})]})},y=({config:e})=>{let t=e.key===`user_agreement_url`?`用户协议`:`隐私政策`,n=e.value&&e.value.startsWith(`/uploads/`);return(0,Q.jsxs)(`div`,{style:{padding:`16px`,borderRadius:10,border:`1px solid #f0f0f5`,background:`#fafbfc`,marginBottom:12},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(b2,{style:{color:`#ef4444`,fontSize:18}}),(0,Q.jsx)(Z.Text,{strong:!0,children:t})]}),(0,Q.jsxs)(VV,{children:[n&&(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>window.open(`http://localhost:8000${e.value}`,`_blank`),children:`预览`}),(0,Q.jsx)(E1,{accept:`.pdf`,showUploadList:!1,beforeUpload:t=>p(t,e.key),children:(0,Q.jsx)(qE,{size:`small`,type:`primary`,icon:(0,Q.jsx)(E6,{}),loading:o===e.key,children:n?`重新上传`:`上传PDF`})})]})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:n?`已上传: ${e.value}`:`尚未上传,前台将不显示对应链接`})]})};return n?(0,Q.jsx)(PR,{loading:!0,variant:`outlined`,style:{borderRadius:12}}):(0,Q.jsxs)(`div`,{style:{maxWidth:720},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:24},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:`#6366f1`},children:(0,Q.jsx)(k3,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:4,style:{margin:0},children:`系统设置`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`管理站点基础信息、协议文件和SEO配置`})]})]}),(0,Q.jsx)(X,{form:c,layout:`vertical`,children:Object.entries(h).map(([e,t])=>(0,Q.jsxs)(`div`,{style:{marginBottom:24},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14,display:`block`,marginBottom:12,paddingBottom:8,borderBottom:`1px solid #f0f0f5`},children:e}),e===`协议配置`?t.map(e=>(0,Q.jsx)(y,{config:e},e.id)):t.map(e=>(0,Q.jsx)(X.Item,{name:e.key,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:e.description}),extra:g(e),children:_(e)},e.id))]},e))})]}),(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`},children:(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(b3,{}),onClick:f,loading:i,size:`large`,style:{borderRadius:8,minWidth:140},children:`保存配置`})})]})},$te=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(!1),[c]=X.useForm(),[l,u]=(0,S.useState)({open:!1,notifId:``,title:``}),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(1),[_,v]=(0,S.useState)(10),[y,b]=(0,S.useState)(0),x=async()=>{r(!0);try{let e=await H8(h,_),n=(await f8(1,1e3)).items||[],r={};n.forEach(e=>{r[e.id]=e.username}),t((e.items||[]).map(e=>({id:e.id,title:e.title,content:e.content,type:e.type,targetUserId:e.userId||null,target:e.userId?r[e.userId]||e.userId:`全部用户`,createdAt:e.createdAt}))),b(e.total||0),a(n.map(e=>({id:e.id,username:e.username})))}catch{LG.error(`加载通知列表失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{x()},[h,_]);let C=(e,t)=>{g(e),v(t)},w=async()=>{try{let e=await c.validateFields();await U8({title:e.title,content:e.content,type:e.type||`system`,target_user_id:e.target_user_id||void 0}),LG.success(`消息已发送`),s(!1),c.resetFields(),x()}catch{}},T=async e=>{try{await W8(e),LG.success(`已删除`),x()}catch(e){LG.error(e?.message||`删除失败`)}},E=async(e,t)=>{u({open:!0,notifId:e,title:t}),m(!0);try{f((await G8(e)).items||[])}catch{LG.error(`加载已读列表失败`)}finally{m(!1)}},D=e=>{switch(e){case`system`:return`blue`;case`credit`:return`orange`;case`promo`:return`purple`;default:return`default`}};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(d0,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`消息推送管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[`共 `,y,` 条消息`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>s(!0),style:{borderRadius:8},children:`发送新消息`})]}),(0,Q.jsx)(bQ,{columns:[{title:`标题`,dataIndex:`title`,width:200,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`内容`,dataIndex:`content`,ellipsis:!0},{title:`类型`,dataIndex:`type`,width:80,render:e=>(0,Q.jsx)(NQ,{color:D(e),children:{system:`系统`,credit:`积分`,promo:`活动`}[e]||e})},{title:`发送目标`,dataIndex:`target`,width:120,render:e=>(0,Q.jsx)(NQ,{color:e===`全部用户`?`green`:`blue`,children:e})},{title:`发送时间`,dataIndex:`createdAt`,width:160,render:e=>$5(e)},{title:`操作`,key:`action`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>E(t.id,t.title),children:`已读`}),(0,Q.jsx)(WG,{title:`确定删除该消息?`,onConfirm:()=>T(t.id),children:(0,Q.jsx)(qE,{type:`link`,danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:{current:h,pageSize:_,total:y,onChange:C,showSizeChanger:!0,showTotal:e=>`共 ${e} 条消息`},scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(E3,{}),`发送消息`]}),open:o,onOk:w,onCancel:()=>{s(!1),c.resetFields()},okText:`发送`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`title`,label:`消息标题`,rules:[{required:!0,message:`请输入标题`}],children:(0,Q.jsx)(hW,{placeholder:`请输入消息标题`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`content`,label:`消息内容`,rules:[{required:!0,message:`请输入内容`}],children:(0,Q.jsx)(hW.TextArea,{rows:4,placeholder:`请输入消息内容`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`type`,label:`消息类型`,style:{flex:1},initialValue:`system`,rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`system`,label:`系统通知`},{value:`credit`,label:`积分通知`},{value:`promo`,label:`活动通知`}]})}),(0,Q.jsx)(X.Item,{name:`target_user_id`,label:`发送目标`,style:{flex:1},extra:`留空则发送给全部用户`,children:(0,Q.jsx)(RC,{size:`large`,allowClear:!0,placeholder:`全部用户`,options:i.map(e=>({value:e.id,label:e.username}))})})]})]})}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(c6,{}),`已读用户 — `,l.title]}),open:l.open,onCancel:()=>{u({open:!1,notifId:``,title:``}),f([])},footer:null,width:480,children:p?(0,Q.jsx)(`div`,{style:{textAlign:`center`,padding:40},children:`加载中...`}):d.length===0?(0,Q.jsx)(pC,{description:`暂无用户已读`,style:{padding:`40px 0`}}):(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{marginBottom:12,color:`#64748b`,fontSize:13},children:[`共 `,d.length,` 人已读`]}),(0,Q.jsx)(bQ,{dataSource:d,rowKey:`userId`,pagination:!1,size:`small`,columns:[{title:`用户名`,dataIndex:`username`,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`已读时间`,dataIndex:`readAt`,width:180,render:e=>$5(e)}]})]})})]})},ene=o(((e,t)=>{var n={version:`1.15.0`};n[437]=(function(){for(var e=`\0\x07\b \v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■\xA0`,t=[],n={},r=0;r!=e.length;++r)e.charCodeAt(r)!==65533&&(n[e.charAt(r)]=r),t[r]=e.charAt(r);return{enc:n,dec:t}})(),n[620]=(function(){for(var e=`\0\x07\b \v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ÇüéâäàąçêëèïîćÄĄĘęłôöĆûùŚÖܢ٥śƒŹŻóÓńŃźż¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■\xA0`,t=[],n={},r=0;r!=e.length;++r)e.charCodeAt(r)!==65533&&(n[e.charAt(r)]=r),t[r]=e.charAt(r);return{enc:n,dec:t}})(),n[737]=(function(){for(var e=`\0\x07\b \v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■\xA0`,t=[],n={},r=0;r!=e.length;++r)e.charCodeAt(r)!==65533&&(n[e.charAt(r)]=r),t[r]=e.charAt(r);return{enc:n,dec:t}})(),n[850]=(function(){for(var e=`\0\x07\b @@ -421,7 +421,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho \v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»…\xA0ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ`,t=[],n={},r=0;r!=e.length;++r)e.charCodeAt(r)!==65533&&(n[e.charAt(r)]=r),t[r]=e.charAt(r);return{enc:n,dec:t}})(),n[10079]=(function(){for(var e=`\0\x07\b \v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»…\xA0ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ`,t=[],n={},r=0;r!=e.length;++r)e.charCodeAt(r)!==65533&&(n[e.charAt(r)]=r),t[r]=e.charAt(r);return{enc:n,dec:t}})(),n[10081]=(function(){for(var e=`\0\x07\b \v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»…\xA0ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ`,t=[],n={},r=0;r!=e.length;++r)e.charCodeAt(r)!==65533&&(n[e.charAt(r)]=r),t[r]=e.charAt(r);return{enc:n,dec:t}})(),n[28591]=(function(){for(var e=`\0\x07\b -\v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ\xA0¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ`,t=[],n={},r=0;r!=e.length;++r)e.charCodeAt(r)!==65533&&(n[e.charAt(r)]=r),t[r]=e.charAt(r);return{enc:n,dec:t}})(),t!==void 0&&t.exports&&typeof DO_NOT_EXPORT_CODEPAGE>`u`&&(t.exports=n),(function(e,r){if(n===void 0)if(l!==void 0){var i=n;t!==void 0&&t.exports&&typeof DO_NOT_EXPORT_CODEPAGE>`u`?t.exports=r(i):e.cptable=r(i)}else throw Error(`cptable not found`);else n=r(n)})(e,function(e){var t={1200:`utf16le`,1201:`utf16be`,12e3:`utf32le`,12001:`utf32be`,16969:`utf64le`,20127:`ascii`,65e3:`utf7`,65001:`utf8`},n=[874,1250,1251,1252,1253,1254,1255,1256,1e4],r=[932,936,949,950],i=[65001],a={},o={},s={},c={},l=function(e){return String.fromCharCode(e)},u=function(e){return e.charCodeAt(0)},d=typeof Buffer<`u`,f=function(){};if(d){var p=!Buffer.from;if(!p)try{Buffer.from(`foo`,`utf8`)}catch{p=!0}f=p?function(e,t){return t?new Buffer(e,t):new Buffer(e)}:Buffer.from.bind(Buffer),Buffer.allocUnsafe||(Buffer.allocUnsafe=function(e){return new Buffer(e)});var m=1024,h=Buffer.allocUnsafe(m),g=function(e){for(var t=Buffer.allocUnsafe(65536),n=0;n<65536;++n)t[n]=0;for(var r=Object.keys(e),i=r.length,a=0,o=r[a];a>10&1023)],i[o++]=n[56320+(c&1023)]));i=i.slice(0,o)}else for(i=Buffer.allocUnsafe(r),a=0;a>8}return function(e){var t=e.length,n=0,i=0;if(2*t>m&&(m=2*t,h=Buffer.allocUnsafe(m)),Buffer.isBuffer(e))for(n=0;n>8}return function(e,t){var n=e.length,i=Buffer.allocUnsafe(2*n),a=0,o=0,s=0,c=0,l=0;if(typeof e==`string`){for(a=c=0;a0&&(i[c++]=r[o]);i=i.slice(0,c)}else if(Buffer.isBuffer(e)){for(a=c=0;a0&&(i[c++]=r[o])):(s=o-65536,o=2*(55296+(s>>10&1023)),i[c++]=r[o+1]||r[o],r[o+1]>0&&(i[c++]=r[o]),o=2*(56320+(s&1023)),i[c++]=r[o+1]||r[o],r[o+1]>0&&(i[c++]=r[o]));i=i.slice(0,c)}else for(a=c=0;a0&&(i[c++]=r[o]);return!t||t===`buf`?i:t===`arr`?[].slice.call(i):i.toString(`binary`)}},b=function(t){var n=e[t].dec,r=Buffer.allocUnsafe(131072),i=0,a,o=0,s=0,c=0;for(c=0;c<65536;++c)r[2*c]=255,r[2*c+1]=253;for(i=0;i>8);return function(e){var t=e.length,n=Buffer.allocUnsafe(2*t),i=0,a=0,o=0;if(Buffer.isBuffer(e))for(i=0;im&&(m=4*n,h=Buffer.allocUnsafe(m));var a=0;n>=3&&t[0]==239&&t[1]==187&&t[2]==191&&(a=3);for(var o=1,s=0,c=0;a>8):(r-=65536,i=55296+(r>>10&1023),r=56320+(r&1023),h[s++]=i&255,h[s++]=i>>>8,h[s++]=r&255,h[s++]=r>>>8&255);return h.slice(0,s).toString(`ucs2`)},o[65001]=function(e,t){if(d&&Buffer.isBuffer(e))return!t||t===`buf`?e:t===`arr`?[].slice.call(e):e.toString(`binary`);var n=e.length,r=0,i=0,a=0,o=typeof e==`string`;4*n>m&&(m=4*n,h=Buffer.allocUnsafe(m));for(var s=0;s>6),h[a++]=128+(r&63)):r>=55296&&r<=57343?(r-=55296,++s,i=(o?e.charCodeAt(s):e[s].charCodeAt(0))-56320+(r<<10),h[a++]=240+(i>>>18&7),h[a++]=144+(i>>>12&63),h[a++]=128+(i>>>6&63),h[a++]=128+(i&63)):(h[a++]=224+(r>>12),h[a++]=128+(r>>6&63),h[a++]=128+(r&63));return!t||t===`buf`?h.slice(0,a):t===`arr`?[].slice.call(h,0,a):h.slice(0,a).toString(`binary`)}}var x=function(){if(d){if(s[n[0]])return;var t=0,l=0;for(t=0;t=3&&i[0]==239&&i[1]==187&&i[2]==191&&(p=3);p>10&1023),f=56320+(f&1023),c[h++]=String.fromCharCode(g),c[h++]=String.fromCharCode(f));break;case`ascii`:if(d&&Buffer.isBuffer(i))return i.toString(y);for(p=0;p=2&&i[0]==255&&i[1]==254&&(p=2),d&&Buffer.isBuffer(i))return i.toString(y);for(m=2;p+1=2&&i[0]==254&&i[1]==255&&(p=2),m=2;p+1=4&&i[0]==255&&i[1]==254&&i[2]===0&&i[3]===0&&(p=4),m=4;p65535?(f-=65536,c[h++]=String.fromCharCode(55296+(f>>10&1023)),c[h++]=String.fromCharCode(56320+(f&1023))):c[h++]=String.fromCharCode(f);break;case`utf32be`:for(o>=4&&i[3]==255&&i[2]==254&&i[1]===0&&i[0]===0&&(p=4),m=4;p65535?(f-=65536,c[h++]=String.fromCharCode(55296+(f>>10&1023)),c[h++]=String.fromCharCode(56320+(f&1023))):c[h++]=String.fromCharCode(f);break;case`utf7`:for(o>=4&&i[0]==43&&i[1]==47&&i[2]==118&&(o>=5&&i[3]==56&&i[4]==45?p=5:(i[3]==56||i[3]==57||i[3]==43||i[3]==47)&&(p=4));p>4,x.push(C),k=T.indexOf(String.fromCharCode(i[p+ j++])),!(k===-1||(w=(O&15)<<4|k>>2,x.push(w),A=T.indexOf(String.fromCharCode(i[p+ j++])),A===-1)));)E=(k&3)<<6|A,A<64&&x.push(E);for(S=n(1201,x),j=0;j255?(s[m]=u>>8,s[++m]=u&255):s[m]=u&255;else if(v=t[r])switch(v){case`utf8`:if(d&&y){s=f(i,v),m=s.length;break}for(p=0;p>6),s[++m]=128+(u&63)):u>=55296&&u<=57343?(u-=55296,h=(y?i.charCodeAt(++p):i[++p].charCodeAt(0))-56320+(u<<10),s[m]=240+(h>>>18&7),s[++m]=144+(h>>>12&63),s[++m]=128+(h>>>6&63),s[++m]=128+(h&63)):(s[m]=224+(u>>12),s[++m]=128+(u>>6&63),s[++m]=128+(u&63));break;case`ascii`:if(d&&typeof i==`string`){s=f(i,v),m=s.length;break}for(p=0;p>8;break;case`utf16be`:for(p=0;p>8,s[m++]=u&255;break;case`utf32le`:for(p=0;p=55296&&u<=57343&&(u=65536+(u-55296<<10)+(i[++p].charCodeAt(0)-56320)),s[m++]=u&255,u>>=8,s[m++]=u&255,u>>=8,s[m++]=u&255,u>>=8,s[m++]=u&255;break;case`utf32be`:for(p=0;p=55296&&u<=57343&&(u=65536+(u-55296<<10)+(i[++p].charCodeAt(0)-56320)),s[m+3]=u&255,u>>=8,s[m+2]=u&255,u>>=8,s[m+1]=u&255,u>>=8,s[m]=u&255,m+=4;break;case`utf7`:for(p=0;p-1){s[m++]=b.charCodeAt(0);continue}var x=n(1201,b);s[m++]=43,s[m++]=T.charCodeAt(x[0]>>2),s[m++]=T.charCodeAt(((x[0]&3)<<4)+((x[1]||0)>>4)),s[m++]=T.charCodeAt(((x[1]&15)<<2)+((x[2]||0)>>6)),s[m++]=45}break;default:throw Error(`Unsupported magic: `+r+` `+t[r])}else throw Error(`Unrecognized CP: `+r);return s=s.slice(0,m),d?!a||a===`buf`?s:a===`arr`?[].slice.call(s):s.toString(`binary`):a==`str`?s.map(l).join(``):s},hascp:function(n){return!!(e[n]||t[n])},magic:t,cache:w},e})})),o7=o(((e,t)=>{t.exports={}})),s7=c(o(((e,t)=>{var n={};function r(e){e.version=`0.18.5`,e.style_version=`1.2.0`;var n,r=1200,i=1252;typeof cptable<`u`?n=cptable:t!==void 0&&l!==void 0&&(n=a7());var a=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],o={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},s=function(e){a.indexOf(e)!=-1&&(i=o[0]=e)},c=function(e){s(r=e)};function u(){c(1200),s(1252)}function d(e){for(var t=[],n=0,r=e.length;n>1;++n)t[n]=String.fromCharCode(e.charCodeAt(2*n+1)+(e.charCodeAt(2*n)<<8));return t.join(``)}var p=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return t==255&&n==254?function(e){for(var t=[],n=0;n>1;++n)t[n]=String.fromCharCode(e.charCodeAt(2*n)+(e.charCodeAt(2*n+1)<<8));return t.join(``)}(e.slice(2)):t==254&&n==255?f(e.slice(2)):t==65279?e.slice(1):e},m=function(e){return String.fromCharCode(e)},h=function(e){return String.fromCharCode(e)};n!==void 0&&(c=function(e){s(r=e)},p=function(e){return e.charCodeAt(0)===255&&e.charCodeAt(1)===254?n.utils.decode(1200,d(e.slice(2))):e},m=function(e){return r===1200?String.fromCharCode(e):n.utils.decode(r,[255&e,e>>8])[0]},h=function(e){return n.utils.decode(i,[e])[0]});var g=null,_=!0,v=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`;function y(e){for(var t,n,r,i,a,o=``,s=0,c=0,l=0;l>2,a=(3&t)<<4|(n=e.charCodeAt(l++))>>4,s=(15&n)<<2|(r=e.charCodeAt(l++))>>6,c=63&r,isNaN(n)?s=c=64:isNaN(r)&&(c=64),o+=v.charAt(i)+v.charAt(a)+v.charAt(s)+v.charAt(c);return o}function b(e){var t,n,r,i,a,o,s=``;e=e.replace(/[^\w\+\/\=]/g,``);for(var c=0;c>4,s+=String.fromCharCode(t),n=(15&i)<<4|(a=v.indexOf(e.charAt(c++)))>>2,a!==64&&(s+=String.fromCharCode(n)),r=(3&a)<<6|(o=v.indexOf(e.charAt(c++))),o!==64&&(s+=String.fromCharCode(r));return s}var x=typeof Buffer<`u`&&typeof process<`u`&&process.versions!==void 0&&!!process.versions.node,S=function(){if(typeof Buffer>`u`)return function(){};var e=!Buffer.from;if(!e)try{Buffer.from(`foo`,`utf8`)}catch{e=!0}return e?function(e,t){return t?new Buffer(e,t):new Buffer(e)}:Buffer.from.bind(Buffer)}();function C(e){return x?Buffer.alloc?Buffer.alloc(e):new Buffer(e):new(typeof Uint8Array<`u`?Uint8Array:Array)(e)}function w(e){return x?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):new(typeof Uint8Array<`u`?Uint8Array:Array)(e)}var T=function(e){return x?S(e,`binary`):e.split(``).map(function(e){return 255&e.charCodeAt(0)})};function E(e){if(typeof ArrayBuffer>`u`)return T(e);for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r!=e.length;++r)n[r]=255&e.charCodeAt(r);return t}function D(e){if(Array.isArray(e))return e.map(function(e){return String.fromCharCode(e)}).join(``);for(var t=[],n=0;n`u`)throw Error(`Unsupported`);if(e instanceof ArrayBuffer)return O(new Uint8Array(e));for(var t=Array(e.length),n=0;n`u`)return[].concat.apply([],e.map(function(e){return Array.isArray(e)?e:[].slice.call(e)}));for(var t=0,n=0,t=0;t=7+t&&(32|e.charCodeAt(t))==103&&(32|e.charCodeAt(t+1))==101&&(32|e.charCodeAt(t+2))==110&&(32|e.charCodeAt(t+3))==101&&(32|e.charCodeAt(t+4))==114&&(32|e.charCodeAt(t+5))==97&&(32|e.charCodeAt(t+6))==108}var z=[[`Sun`,`Sunday`],[`Mon`,`Monday`],[`Tue`,`Tuesday`],[`Wed`,`Wednesday`],[`Thu`,`Thursday`],[`Fri`,`Friday`],[`Sat`,`Saturday`]],B=[[`J`,`Jan`,`January`],[`F`,`Feb`,`February`],[`M`,`Mar`,`March`],[`A`,`Apr`,`April`],[`M`,`May`,`May`],[`J`,`Jun`,`June`],[`J`,`Jul`,`July`],[`A`,`Aug`,`August`],[`S`,`Sep`,`September`],[`O`,`Oct`,`October`],[`N`,`Nov`,`November`],[`D`,`Dec`,`December`]],V={0:`General`,1:`0`,2:`0.00`,3:`#,##0`,4:`#,##0.00`,9:`0%`,10:`0.00%`,11:`0.00E+00`,12:`# ?/?`,13:`# ??/??`,14:`m/d/yy`,15:`d-mmm-yy`,16:`d-mmm`,17:`mmm-yy`,18:`h:mm AM/PM`,19:`h:mm:ss AM/PM`,20:`h:mm`,21:`h:mm:ss`,22:`m/d/yy h:mm`,37:`#,##0 ;(#,##0)`,38:`#,##0 ;[Red](#,##0)`,39:`#,##0.00;(#,##0.00)`,40:`#,##0.00;[Red](#,##0.00)`,45:`mm:ss`,46:`[h]:mm:ss`,47:`mmss.0`,48:`##0.0E+0`,49:`@`,56:`"上午/下午 "hh"時"mm"分"ss"秒 "`},H={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},U={5:`"$"#,##0_);\\("$"#,##0\\)`,63:`"$"#,##0_);\\("$"#,##0\\)`,6:`"$"#,##0_);[Red]\\("$"#,##0\\)`,64:`"$"#,##0_);[Red]\\("$"#,##0\\)`,7:`"$"#,##0.00_);\\("$"#,##0.00\\)`,65:`"$"#,##0.00_);\\("$"#,##0.00\\)`,8:`"$"#,##0.00_);[Red]\\("$"#,##0.00\\)`,66:`"$"#,##0.00_);[Red]\\("$"#,##0.00\\)`,41:`_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)`,42:`_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)`,43:`_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)`,44:`_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)`};function W(e,t,n){for(var r=e<0?-1:1,i=e*r,a=0,o=1,s=0,c=1,l=0,u=0,d=Math.floor(i);l(e<0?12:11)||a===`0`||a===`-0`?e.toPrecision(6):a;return ae((a=a.toUpperCase()).indexOf(`E`)==-1?a:a.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,`$1E`).replace(/(E[+-])(\d)$/,`$10$2`))}function oe(e,t){switch(typeof e){case`string`:return e;case`boolean`:return e?`TRUE`:`FALSE`;case`number`:return(0|e)===e?e.toString(10):G(e);case`undefined`:return``;case`object`:if(e==null)return``;if(e instanceof Date)return Ce(14,ie(e,t&&t.date1904),t)}throw Error(`unsupported value in General format: `+e)}function K(e){if(e.length<=3)return e;for(var t=e.length%3,n=e.substr(0,t);t!=e.length;t+=3)n+=(0t.length?i:de(t.substr(0,t.length-i.length))+i;if(a=t.match(ce))return d=a,s=f,c=p,l=parseInt(d[4],10),u=Math.round(s*l),s=Math.floor(u/l),c+(s===0?``:``+s)+` `+((u-=s*l)==0?Ze(` `,d[1].length+1+d[4].length):P(u,d[1].length)+d[2]+`/`+d[3]+N(l,d[4].length));if(t.match(/^#+0+$/))return p+L(f,t.length-t.indexOf(`0`));if(a=t.match(q))return i=fe(n,a[1].length).replace(/^([^\.]+)$/,`$1.`+de(a[1])).replace(/\.$/,`.`+de(a[1])).replace(/\.(\d*)$/,function(e,t){return`.`+t+Ze(`0`,de(a[1]).length-t.length)}),t.indexOf(`0.`)===-1?i.replace(/^0\./,`.`):i;if(t=t.replace(/^#+([0.])/,`$1`),a=t.match(/^(0*)\.(#*)$/))return p+fe(f,a[2].length).replace(/\.(\d*[1-9])0*$/,`.$1`).replace(/^(-?\d*)$/,`$1.`).replace(/^0\./,a[1].length?`0.`:`.`);if(a=t.match(/^#{1,3},##0(\.?)$/))return p+K(L(f,0));if(a=t.match(/^#,##0\.([#0]*0)$/))return n<0?`-`+me(e,t,-n):K(``+(Math.floor(n)+(d=n,+((m=a[1].length)<(``+Math.round((d-Math.floor(d))*10**m)).length))))+`.`+N(pe(n,a[1].length),a[1].length);if(a=t.match(/^#,#*,#0/))return me(e,t.replace(/^#,#*,/,``),n);if(a=t.match(/^([0#]+)(\\?-([0#]+))+$/))return i=M(me(e,t.replace(/[\\-]/g,``),n)),o=0,M(M(t.replace(/\\/g,``)).replace(/[0#]/g,function(e){return ot.length?s:de(t.substr(0,t.length-s.length))+s;if(c=t.match(ce))return d+((f=u)===0?``:``+f)+Ze(` `,(f=c)[1].length+2+f[4].length);if(t.match(/^#+0+$/))return d+N(u,t.length-t.indexOf(`0`));if(c=t.match(q))return s=(s=(``+n).replace(/^([^\.]+)$/,`$1.`+de(c[1])).replace(/\.$/,`.`+de(c[1]))).replace(/\.(\d*)$/,function(e,t){return`.`+t+Ze(`0`,de(c[1]).length-t.length)}),t.indexOf(`0.`)===-1?s.replace(/^0\./,`.`):s;if(t=t.replace(/^#+([0.])/,`$1`),c=t.match(/^(0*)\.(#*)$/))return d+(``+u).replace(/\.(\d*[1-9])0*$/,`.$1`).replace(/^(-?\d*)$/,`$1.`).replace(/^0\./,c[1].length?`0.`:`.`);if(c=t.match(/^#{1,3},##0(\.?)$/))return d+K(``+u);if(c=t.match(/^#,##0\.([#0]*0)$/))return n<0?`-`+he(e,t,-n):K(``+n)+`.`+Ze(`0`,c[1].length);if(c=t.match(/^#,#*,#0/))return he(e,t.replace(/^#,#*,/,``),n);if(c=t.match(/^([0#]+)(\\?-([0#]+))+$/))return s=M(he(e,t.replace(/[\\-]/g,``),n)),l=0,M(M(t.replace(/\\/g,``)).replace(/[0#]/g,function(e){return l=€acfijklopqrtuvwxzP`.indexOf(u)===-1)throw Error(`unrecognized character `+u+` in `+e);s[s.length]={t:`t`,v:u},++l}var h,g=0,_=0;for(l=s.length-1,d=`t`;0<=l;--l)switch(s[l].t){case`h`:case`H`:s[l].t=f,d=`h`,g<1&&(g=1);break;case`s`:(h=s[l].v.match(/\.0+$/))&&(_=Math.max(_,h[0].length-1)),g<3&&(g=3);case`d`:case`y`:case`M`:case`e`:d=s[l].t;break;case`m`:d===`s`&&(s[l].t=`M`,g<2&&(g=2));break;case`X`:break;case`Z`:(g=(g=g<1&&s[l].v.match(/[Hh]/)?1:g)<2&&s[l].v.match(/[Mm]/)?2:g)<3&&s[l].v.match(/[Ss]/)&&(g=3)}switch(g){case 0:break;case 1:.5<=i.u&&(i.u=0,++i.S),60<=i.S&&(i.S=0,++i.M),60<=i.M&&(i.M=0,++i.H);break;case 2:.5<=i.u&&(i.u=0,++i.S),60<=i.S&&(i.S=0,++i.M)}var v,y=``;for(l=0;l=s[l].v.length-1?(v-=s[l].v.length,s[l].v=x.substr(v+1,s[l].v.length)):v<0?s[l].v=``:(s[l].v=x.substr(0,v+1),v=-1),s[l].t=`t`,w=l);0<=v&&w[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function xe(e,t){if(t!=null){var n=parseFloat(t[2]);switch(t[1]){case`=`:if(e==n)return 1;break;case`>`:if(n`:if(e!=n)return 1;break;case`>=`:if(n<=e)return 1;break;case`<=`:if(e<=n)return 1}}}function Se(e,t){var n=function(e){for(var t=[],n=!1,r=0,i=0;r]/)==null&&n[1].match(/\[[=<>]/)==null?[r,a]:(e=n[0].match(be),a=n[1].match(be),xe(t,e)?[r,n[0]]:xe(t,a)?[r,n[1]]:[r,n[e!=null&&a!=null?2:1]])}function Ce(e,t,n){n??={};var r=``;switch(typeof e){case`string`:r=e==`m/d/yy`&&n.dateNF?n.dateNF:e;break;case`number`:(r=(r=e==14&&n.dateNF?n.dateNF:(n.table==null?V:n.table)[e])??(n.table&&n.table[H[e]]||V[H[e]]))??(r=U[e]||`General`)}if(R(r,0))return oe(t,n);var i=Se(r,t=t instanceof Date?ie(t,n.date1904):t);if(R(i[1]))return oe(t,n);if(!0===t)t=`TRUE`;else if(!1===t)t=`FALSE`;else if(t===``||t==null)return``;return ye(i[1],t,n,i[0])}function we(e,t){if(typeof t!=`number`){t=+t||-1;for(var n=0;n<392;++n)if(V[n]!=null){if(V[n]==e){t=n;break}}else t<0&&(t=n);t<0&&(t=391)}return V[t]=e,t}function Te(e){for(var t=0;t!=392;++t)e[t]!==void 0&&we(e[t],t)}function Ee(){var e;(e||={})[0]=`General`,e[1]=`0`,e[2]=`0.00`,e[3]=`#,##0`,e[4]=`#,##0.00`,e[9]=`0%`,e[10]=`0.00%`,e[11]=`0.00E+00`,e[12]=`# ?/?`,e[13]=`# ??/??`,e[14]=`m/d/yy`,e[15]=`d-mmm-yy`,e[16]=`d-mmm`,e[17]=`mmm-yy`,e[18]=`h:mm AM/PM`,e[19]=`h:mm:ss AM/PM`,e[20]=`h:mm`,e[21]=`h:mm:ss`,e[22]=`m/d/yy h:mm`,e[37]=`#,##0 ;(#,##0)`,e[38]=`#,##0 ;[Red](#,##0)`,e[39]=`#,##0.00;(#,##0.00)`,e[40]=`#,##0.00;[Red](#,##0.00)`,e[45]=`mm:ss`,e[46]=`[h]:mm:ss`,e[47]=`mmss.0`,e[48]=`##0.0E+0`,e[49]=`@`,e[56]=`"上午/下午 "hh"時"mm"分"ss"秒 "`,V=e}var De={format:Ce,load:we,_table:V,load_table:Te,parse_date_code:ee,is_date:ve,get_table:function(){return De._table=V}},Oe={5:`"$"#,##0_);\\("$"#,##0\\)`,6:`"$"#,##0_);[Red]\\("$"#,##0\\)`,7:`"$"#,##0.00_);\\("$"#,##0.00\\)`,8:`"$"#,##0.00_);[Red]\\("$"#,##0.00\\)`,23:`General`,24:`General`,25:`General`,26:`General`,27:`m/d/yy`,28:`m/d/yy`,29:`m/d/yy`,30:`m/d/yy`,31:`m/d/yy`,32:`h:mm:ss`,33:`h:mm:ss`,34:`h:mm:ss`,35:`h:mm:ss`,36:`m/d/yy`,41:`_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)`,42:`_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)`,43:`_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)`,44:`_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)`,50:`m/d/yy`,51:`m/d/yy`,52:`m/d/yy`,53:`m/d/yy`,54:`m/d/yy`,55:`m/d/yy`,56:`m/d/yy`,57:`m/d/yy`,58:`m/d/yy`,59:`0`,60:`0.00`,61:`#,##0`,62:`#,##0.00`,63:`"$"#,##0_);\\("$"#,##0\\)`,64:`"$"#,##0_);[Red]\\("$"#,##0\\)`,65:`"$"#,##0.00_);\\("$"#,##0.00\\)`,66:`"$"#,##0.00_);[Red]\\("$"#,##0.00\\)`,67:`0%`,68:`0.00%`,69:`# ?/?`,70:`# ??/??`,71:`m/d/yy`,72:`m/d/yy`,73:`d-mmm-yy`,74:`d-mmm`,75:`mmm-yy`,76:`h:mm`,77:`h:mm:ss`,78:`m/d/yy h:mm`,79:`mm:ss`,80:`[h]:mm:ss`,81:`mmss.0`},ke=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g,Ae,je=function(){var e={};e.version=`1.2.0`;var t=function(){for(var e=0,t=Array(256),n=0;n!=256;++n)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=n)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[n]=e;return typeof Int32Array<`u`?new Int32Array(t):t}(),n=function(e){for(var t=0,n=0,r=0,i=new(typeof Int32Array<`u`?Int32Array:Array)(4096),r=0;r!=256;++r)i[r]=e[r];for(r=0;r!=256;++r)for(n=e[r],t=256+r;t<4096;t+=256)n=i[t]=n>>>8^e[255&n];var a=[];for(r=1;r!=16;++r)a[r-1]=typeof Int32Array<`u`?i.subarray(256*r,256*r+256):i.slice(256*r,256*r+256);return a}(t),r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7],d=n[8],f=n[9],p=n[10],m=n[11],h=n[12],g=n[13],_=n[14];return e.table=t,e.bstr=function(e,n){for(var r=-1^n,i=0,a=e.length;i>>8^t[255&(r^e.charCodeAt(i++))];return~r},e.buf=function(e,n){for(var v=-1^n,y=e.length-15,b=0;b>8&255]^h[e[b++]^v>>16&255]^m[e[b++]^v>>>24]^p[e[b++]]^f[e[b++]]^d[e[b++]]^u[e[b++]]^l[e[b++]]^c[e[b++]]^s[e[b++]]^o[e[b++]]^a[e[b++]]^i[e[b++]]^r[e[b++]]^t[e[b++]];for(y+=15;b>>8^t[255&(v^e[b++])];return~v},e.str=function(e,n){for(var r,i=-1^n,a=0,o=e.length,s=0;a>>8^t[255&(i^s)]:s<2048?(i=i>>>8^t[255&(i^(192|s>>6&31))])>>>8^t[255&(i^(128|63&s))]:55296<=s&&s<57344?(s=64+(1023&s),r=1023&e.charCodeAt(a++),(i=(i=(i=i>>>8^t[255&(i^(240|s>>8&7))])>>>8^t[255&(i^(128|s>>2&63))])>>>8^t[255&(i^(128|r>>6&15|(3&s)<<4))])>>>8^t[255&(i^(128|63&r))]):(i=(i=i>>>8^t[255&(i^(224|s>>12&15))])>>>8^t[255&(i^(128|s>>6&63))])>>>8^t[255&(i^(128|63&s))];return~i},e}(),Me=function(){var e,t={};function n(e){if(e.charAt(e.length-1)==`/`)return e.slice(0,-1).indexOf(`/`)===-1?e:n(e.slice(0,-1));var t=e.lastIndexOf(`/`);return t===-1?e:e.slice(0,t+1)}function r(e){if(e.charAt(e.length-1)==`/`)return r(e.slice(0,-1));var t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function i(e){Hn(e,0);for(var t,n={};e.l<=e.length-4;){var r=e.read_shift(2),i=e.read_shift(2),a=e.l+i,o={};r===21589&&(1&(t=e.read_shift(1))&&(o.mtime=e.read_shift(4)),5?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ\xA0¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ`,t=[],n={},r=0;r!=e.length;++r)e.charCodeAt(r)!==65533&&(n[e.charAt(r)]=r),t[r]=e.charAt(r);return{enc:n,dec:t}})(),t!==void 0&&t.exports&&typeof DO_NOT_EXPORT_CODEPAGE>`u`&&(t.exports=n),(function(e,r){if(n===void 0)if(l!==void 0){var i=n;t!==void 0&&t.exports&&typeof DO_NOT_EXPORT_CODEPAGE>`u`?t.exports=r(i):e.cptable=r(i)}else throw Error(`cptable not found`);else n=r(n)})(e,function(e){var t={1200:`utf16le`,1201:`utf16be`,12e3:`utf32le`,12001:`utf32be`,16969:`utf64le`,20127:`ascii`,65e3:`utf7`,65001:`utf8`},n=[874,1250,1251,1252,1253,1254,1255,1256,1e4],r=[932,936,949,950],i=[65001],a={},o={},s={},c={},l=function(e){return String.fromCharCode(e)},u=function(e){return e.charCodeAt(0)},d=typeof Buffer<`u`,f=function(){};if(d){var p=!Buffer.from;if(!p)try{Buffer.from(`foo`,`utf8`)}catch{p=!0}f=p?function(e,t){return t?new Buffer(e,t):new Buffer(e)}:Buffer.from.bind(Buffer),Buffer.allocUnsafe||(Buffer.allocUnsafe=function(e){return new Buffer(e)});var m=1024,h=Buffer.allocUnsafe(m),g=function(e){for(var t=Buffer.allocUnsafe(65536),n=0;n<65536;++n)t[n]=0;for(var r=Object.keys(e),i=r.length,a=0,o=r[a];a>10&1023)],i[o++]=n[56320+(c&1023)]));i=i.slice(0,o)}else for(i=Buffer.allocUnsafe(r),a=0;a>8}return function(e){var t=e.length,n=0,i=0;if(2*t>m&&(m=2*t,h=Buffer.allocUnsafe(m)),Buffer.isBuffer(e))for(n=0;n>8}return function(e,t){var n=e.length,i=Buffer.allocUnsafe(2*n),a=0,o=0,s=0,c=0,l=0;if(typeof e==`string`){for(a=c=0;a0&&(i[c++]=r[o]);i=i.slice(0,c)}else if(Buffer.isBuffer(e)){for(a=c=0;a0&&(i[c++]=r[o])):(s=o-65536,o=2*(55296+(s>>10&1023)),i[c++]=r[o+1]||r[o],r[o+1]>0&&(i[c++]=r[o]),o=2*(56320+(s&1023)),i[c++]=r[o+1]||r[o],r[o+1]>0&&(i[c++]=r[o]));i=i.slice(0,c)}else for(a=c=0;a0&&(i[c++]=r[o]);return!t||t===`buf`?i:t===`arr`?[].slice.call(i):i.toString(`binary`)}},b=function(t){var n=e[t].dec,r=Buffer.allocUnsafe(131072),i=0,a,o=0,s=0,c=0;for(c=0;c<65536;++c)r[2*c]=255,r[2*c+1]=253;for(i=0;i>8);return function(e){var t=e.length,n=Buffer.allocUnsafe(2*t),i=0,a=0,o=0;if(Buffer.isBuffer(e))for(i=0;im&&(m=4*n,h=Buffer.allocUnsafe(m));var a=0;n>=3&&t[0]==239&&t[1]==187&&t[2]==191&&(a=3);for(var o=1,s=0,c=0;a>8):(r-=65536,i=55296+(r>>10&1023),r=56320+(r&1023),h[s++]=i&255,h[s++]=i>>>8,h[s++]=r&255,h[s++]=r>>>8&255);return h.slice(0,s).toString(`ucs2`)},o[65001]=function(e,t){if(d&&Buffer.isBuffer(e))return!t||t===`buf`?e:t===`arr`?[].slice.call(e):e.toString(`binary`);var n=e.length,r=0,i=0,a=0,o=typeof e==`string`;4*n>m&&(m=4*n,h=Buffer.allocUnsafe(m));for(var s=0;s>6),h[a++]=128+(r&63)):r>=55296&&r<=57343?(r-=55296,++s,i=(o?e.charCodeAt(s):e[s].charCodeAt(0))-56320+(r<<10),h[a++]=240+(i>>>18&7),h[a++]=144+(i>>>12&63),h[a++]=128+(i>>>6&63),h[a++]=128+(i&63)):(h[a++]=224+(r>>12),h[a++]=128+(r>>6&63),h[a++]=128+(r&63));return!t||t===`buf`?h.slice(0,a):t===`arr`?[].slice.call(h,0,a):h.slice(0,a).toString(`binary`)}}var x=function(){if(d){if(s[n[0]])return;var t=0,l=0;for(t=0;t=3&&i[0]==239&&i[1]==187&&i[2]==191&&(p=3);p>10&1023),f=56320+(f&1023),c[h++]=String.fromCharCode(g),c[h++]=String.fromCharCode(f));break;case`ascii`:if(d&&Buffer.isBuffer(i))return i.toString(y);for(p=0;p=2&&i[0]==255&&i[1]==254&&(p=2),d&&Buffer.isBuffer(i))return i.toString(y);for(m=2;p+1=2&&i[0]==254&&i[1]==255&&(p=2),m=2;p+1=4&&i[0]==255&&i[1]==254&&i[2]===0&&i[3]===0&&(p=4),m=4;p65535?(f-=65536,c[h++]=String.fromCharCode(55296+(f>>10&1023)),c[h++]=String.fromCharCode(56320+(f&1023))):c[h++]=String.fromCharCode(f);break;case`utf32be`:for(o>=4&&i[3]==255&&i[2]==254&&i[1]===0&&i[0]===0&&(p=4),m=4;p65535?(f-=65536,c[h++]=String.fromCharCode(55296+(f>>10&1023)),c[h++]=String.fromCharCode(56320+(f&1023))):c[h++]=String.fromCharCode(f);break;case`utf7`:for(o>=4&&i[0]==43&&i[1]==47&&i[2]==118&&(o>=5&&i[3]==56&&i[4]==45?p=5:(i[3]==56||i[3]==57||i[3]==43||i[3]==47)&&(p=4));p>4,x.push(C),k=T.indexOf(String.fromCharCode(i[p+ j++])),!(k===-1||(w=(O&15)<<4|k>>2,x.push(w),A=T.indexOf(String.fromCharCode(i[p+ j++])),A===-1)));)E=(k&3)<<6|A,A<64&&x.push(E);for(S=n(1201,x),j=0;j255?(s[m]=u>>8,s[++m]=u&255):s[m]=u&255;else if(v=t[r])switch(v){case`utf8`:if(d&&y){s=f(i,v),m=s.length;break}for(p=0;p>6),s[++m]=128+(u&63)):u>=55296&&u<=57343?(u-=55296,h=(y?i.charCodeAt(++p):i[++p].charCodeAt(0))-56320+(u<<10),s[m]=240+(h>>>18&7),s[++m]=144+(h>>>12&63),s[++m]=128+(h>>>6&63),s[++m]=128+(h&63)):(s[m]=224+(u>>12),s[++m]=128+(u>>6&63),s[++m]=128+(u&63));break;case`ascii`:if(d&&typeof i==`string`){s=f(i,v),m=s.length;break}for(p=0;p>8;break;case`utf16be`:for(p=0;p>8,s[m++]=u&255;break;case`utf32le`:for(p=0;p=55296&&u<=57343&&(u=65536+(u-55296<<10)+(i[++p].charCodeAt(0)-56320)),s[m++]=u&255,u>>=8,s[m++]=u&255,u>>=8,s[m++]=u&255,u>>=8,s[m++]=u&255;break;case`utf32be`:for(p=0;p=55296&&u<=57343&&(u=65536+(u-55296<<10)+(i[++p].charCodeAt(0)-56320)),s[m+3]=u&255,u>>=8,s[m+2]=u&255,u>>=8,s[m+1]=u&255,u>>=8,s[m]=u&255,m+=4;break;case`utf7`:for(p=0;p-1){s[m++]=b.charCodeAt(0);continue}var x=n(1201,b);s[m++]=43,s[m++]=T.charCodeAt(x[0]>>2),s[m++]=T.charCodeAt(((x[0]&3)<<4)+((x[1]||0)>>4)),s[m++]=T.charCodeAt(((x[1]&15)<<2)+((x[2]||0)>>6)),s[m++]=45}break;default:throw Error(`Unsupported magic: `+r+` `+t[r])}else throw Error(`Unrecognized CP: `+r);return s=s.slice(0,m),d?!a||a===`buf`?s:a===`arr`?[].slice.call(s):s.toString(`binary`):a==`str`?s.map(l).join(``):s},hascp:function(n){return!!(e[n]||t[n])},magic:t,cache:w},e})})),o7=o(((e,t)=>{t.exports={}})),s7=c(o(((e,t)=>{var n={};function r(e){e.version=`0.18.5`,e.style_version=`1.2.0`;var n,r=1200,i=1252;typeof cptable<`u`?n=cptable:t!==void 0&&l!==void 0&&(n=ene());var a=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],o={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},s=function(e){a.indexOf(e)!=-1&&(i=o[0]=e)},c=function(e){s(r=e)};function u(){c(1200),s(1252)}function d(e){for(var t=[],n=0,r=e.length;n>1;++n)t[n]=String.fromCharCode(e.charCodeAt(2*n+1)+(e.charCodeAt(2*n)<<8));return t.join(``)}var p=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return t==255&&n==254?function(e){for(var t=[],n=0;n>1;++n)t[n]=String.fromCharCode(e.charCodeAt(2*n)+(e.charCodeAt(2*n+1)<<8));return t.join(``)}(e.slice(2)):t==254&&n==255?f(e.slice(2)):t==65279?e.slice(1):e},m=function(e){return String.fromCharCode(e)},h=function(e){return String.fromCharCode(e)};n!==void 0&&(c=function(e){s(r=e)},p=function(e){return e.charCodeAt(0)===255&&e.charCodeAt(1)===254?n.utils.decode(1200,d(e.slice(2))):e},m=function(e){return r===1200?String.fromCharCode(e):n.utils.decode(r,[255&e,e>>8])[0]},h=function(e){return n.utils.decode(i,[e])[0]});var g=null,_=!0,v=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`;function y(e){for(var t,n,r,i,a,o=``,s=0,c=0,l=0;l>2,a=(3&t)<<4|(n=e.charCodeAt(l++))>>4,s=(15&n)<<2|(r=e.charCodeAt(l++))>>6,c=63&r,isNaN(n)?s=c=64:isNaN(r)&&(c=64),o+=v.charAt(i)+v.charAt(a)+v.charAt(s)+v.charAt(c);return o}function b(e){var t,n,r,i,a,o,s=``;e=e.replace(/[^\w\+\/\=]/g,``);for(var c=0;c>4,s+=String.fromCharCode(t),n=(15&i)<<4|(a=v.indexOf(e.charAt(c++)))>>2,a!==64&&(s+=String.fromCharCode(n)),r=(3&a)<<6|(o=v.indexOf(e.charAt(c++))),o!==64&&(s+=String.fromCharCode(r));return s}var x=typeof Buffer<`u`&&typeof process<`u`&&process.versions!==void 0&&!!process.versions.node,S=function(){if(typeof Buffer>`u`)return function(){};var e=!Buffer.from;if(!e)try{Buffer.from(`foo`,`utf8`)}catch{e=!0}return e?function(e,t){return t?new Buffer(e,t):new Buffer(e)}:Buffer.from.bind(Buffer)}();function C(e){return x?Buffer.alloc?Buffer.alloc(e):new Buffer(e):new(typeof Uint8Array<`u`?Uint8Array:Array)(e)}function w(e){return x?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):new(typeof Uint8Array<`u`?Uint8Array:Array)(e)}var T=function(e){return x?S(e,`binary`):e.split(``).map(function(e){return 255&e.charCodeAt(0)})};function E(e){if(typeof ArrayBuffer>`u`)return T(e);for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r!=e.length;++r)n[r]=255&e.charCodeAt(r);return t}function D(e){if(Array.isArray(e))return e.map(function(e){return String.fromCharCode(e)}).join(``);for(var t=[],n=0;n`u`)throw Error(`Unsupported`);if(e instanceof ArrayBuffer)return O(new Uint8Array(e));for(var t=Array(e.length),n=0;n`u`)return[].concat.apply([],e.map(function(e){return Array.isArray(e)?e:[].slice.call(e)}));for(var t=0,n=0,t=0;t=7+t&&(32|e.charCodeAt(t))==103&&(32|e.charCodeAt(t+1))==101&&(32|e.charCodeAt(t+2))==110&&(32|e.charCodeAt(t+3))==101&&(32|e.charCodeAt(t+4))==114&&(32|e.charCodeAt(t+5))==97&&(32|e.charCodeAt(t+6))==108}var z=[[`Sun`,`Sunday`],[`Mon`,`Monday`],[`Tue`,`Tuesday`],[`Wed`,`Wednesday`],[`Thu`,`Thursday`],[`Fri`,`Friday`],[`Sat`,`Saturday`]],B=[[`J`,`Jan`,`January`],[`F`,`Feb`,`February`],[`M`,`Mar`,`March`],[`A`,`Apr`,`April`],[`M`,`May`,`May`],[`J`,`Jun`,`June`],[`J`,`Jul`,`July`],[`A`,`Aug`,`August`],[`S`,`Sep`,`September`],[`O`,`Oct`,`October`],[`N`,`Nov`,`November`],[`D`,`Dec`,`December`]],V={0:`General`,1:`0`,2:`0.00`,3:`#,##0`,4:`#,##0.00`,9:`0%`,10:`0.00%`,11:`0.00E+00`,12:`# ?/?`,13:`# ??/??`,14:`m/d/yy`,15:`d-mmm-yy`,16:`d-mmm`,17:`mmm-yy`,18:`h:mm AM/PM`,19:`h:mm:ss AM/PM`,20:`h:mm`,21:`h:mm:ss`,22:`m/d/yy h:mm`,37:`#,##0 ;(#,##0)`,38:`#,##0 ;[Red](#,##0)`,39:`#,##0.00;(#,##0.00)`,40:`#,##0.00;[Red](#,##0.00)`,45:`mm:ss`,46:`[h]:mm:ss`,47:`mmss.0`,48:`##0.0E+0`,49:`@`,56:`"上午/下午 "hh"時"mm"分"ss"秒 "`},H={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},U={5:`"$"#,##0_);\\("$"#,##0\\)`,63:`"$"#,##0_);\\("$"#,##0\\)`,6:`"$"#,##0_);[Red]\\("$"#,##0\\)`,64:`"$"#,##0_);[Red]\\("$"#,##0\\)`,7:`"$"#,##0.00_);\\("$"#,##0.00\\)`,65:`"$"#,##0.00_);\\("$"#,##0.00\\)`,8:`"$"#,##0.00_);[Red]\\("$"#,##0.00\\)`,66:`"$"#,##0.00_);[Red]\\("$"#,##0.00\\)`,41:`_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)`,42:`_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)`,43:`_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)`,44:`_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)`};function W(e,t,n){for(var r=e<0?-1:1,i=e*r,a=0,o=1,s=0,c=1,l=0,u=0,d=Math.floor(i);l(e<0?12:11)||a===`0`||a===`-0`?e.toPrecision(6):a;return ae((a=a.toUpperCase()).indexOf(`E`)==-1?a:a.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,`$1E`).replace(/(E[+-])(\d)$/,`$10$2`))}function oe(e,t){switch(typeof e){case`string`:return e;case`boolean`:return e?`TRUE`:`FALSE`;case`number`:return(0|e)===e?e.toString(10):G(e);case`undefined`:return``;case`object`:if(e==null)return``;if(e instanceof Date)return Ce(14,ie(e,t&&t.date1904),t)}throw Error(`unsupported value in General format: `+e)}function K(e){if(e.length<=3)return e;for(var t=e.length%3,n=e.substr(0,t);t!=e.length;t+=3)n+=(0t.length?i:de(t.substr(0,t.length-i.length))+i;if(a=t.match(ce))return d=a,s=f,c=p,l=parseInt(d[4],10),u=Math.round(s*l),s=Math.floor(u/l),c+(s===0?``:``+s)+` `+((u-=s*l)==0?Ze(` `,d[1].length+1+d[4].length):P(u,d[1].length)+d[2]+`/`+d[3]+N(l,d[4].length));if(t.match(/^#+0+$/))return p+L(f,t.length-t.indexOf(`0`));if(a=t.match(q))return i=fe(n,a[1].length).replace(/^([^\.]+)$/,`$1.`+de(a[1])).replace(/\.$/,`.`+de(a[1])).replace(/\.(\d*)$/,function(e,t){return`.`+t+Ze(`0`,de(a[1]).length-t.length)}),t.indexOf(`0.`)===-1?i.replace(/^0\./,`.`):i;if(t=t.replace(/^#+([0.])/,`$1`),a=t.match(/^(0*)\.(#*)$/))return p+fe(f,a[2].length).replace(/\.(\d*[1-9])0*$/,`.$1`).replace(/^(-?\d*)$/,`$1.`).replace(/^0\./,a[1].length?`0.`:`.`);if(a=t.match(/^#{1,3},##0(\.?)$/))return p+K(L(f,0));if(a=t.match(/^#,##0\.([#0]*0)$/))return n<0?`-`+me(e,t,-n):K(``+(Math.floor(n)+(d=n,+((m=a[1].length)<(``+Math.round((d-Math.floor(d))*10**m)).length))))+`.`+N(pe(n,a[1].length),a[1].length);if(a=t.match(/^#,#*,#0/))return me(e,t.replace(/^#,#*,/,``),n);if(a=t.match(/^([0#]+)(\\?-([0#]+))+$/))return i=M(me(e,t.replace(/[\\-]/g,``),n)),o=0,M(M(t.replace(/\\/g,``)).replace(/[0#]/g,function(e){return ot.length?s:de(t.substr(0,t.length-s.length))+s;if(c=t.match(ce))return d+((f=u)===0?``:``+f)+Ze(` `,(f=c)[1].length+2+f[4].length);if(t.match(/^#+0+$/))return d+N(u,t.length-t.indexOf(`0`));if(c=t.match(q))return s=(s=(``+n).replace(/^([^\.]+)$/,`$1.`+de(c[1])).replace(/\.$/,`.`+de(c[1]))).replace(/\.(\d*)$/,function(e,t){return`.`+t+Ze(`0`,de(c[1]).length-t.length)}),t.indexOf(`0.`)===-1?s.replace(/^0\./,`.`):s;if(t=t.replace(/^#+([0.])/,`$1`),c=t.match(/^(0*)\.(#*)$/))return d+(``+u).replace(/\.(\d*[1-9])0*$/,`.$1`).replace(/^(-?\d*)$/,`$1.`).replace(/^0\./,c[1].length?`0.`:`.`);if(c=t.match(/^#{1,3},##0(\.?)$/))return d+K(``+u);if(c=t.match(/^#,##0\.([#0]*0)$/))return n<0?`-`+he(e,t,-n):K(``+n)+`.`+Ze(`0`,c[1].length);if(c=t.match(/^#,#*,#0/))return he(e,t.replace(/^#,#*,/,``),n);if(c=t.match(/^([0#]+)(\\?-([0#]+))+$/))return s=M(he(e,t.replace(/[\\-]/g,``),n)),l=0,M(M(t.replace(/\\/g,``)).replace(/[0#]/g,function(e){return l=€acfijklopqrtuvwxzP`.indexOf(u)===-1)throw Error(`unrecognized character `+u+` in `+e);s[s.length]={t:`t`,v:u},++l}var h,g=0,_=0;for(l=s.length-1,d=`t`;0<=l;--l)switch(s[l].t){case`h`:case`H`:s[l].t=f,d=`h`,g<1&&(g=1);break;case`s`:(h=s[l].v.match(/\.0+$/))&&(_=Math.max(_,h[0].length-1)),g<3&&(g=3);case`d`:case`y`:case`M`:case`e`:d=s[l].t;break;case`m`:d===`s`&&(s[l].t=`M`,g<2&&(g=2));break;case`X`:break;case`Z`:(g=(g=g<1&&s[l].v.match(/[Hh]/)?1:g)<2&&s[l].v.match(/[Mm]/)?2:g)<3&&s[l].v.match(/[Ss]/)&&(g=3)}switch(g){case 0:break;case 1:.5<=i.u&&(i.u=0,++i.S),60<=i.S&&(i.S=0,++i.M),60<=i.M&&(i.M=0,++i.H);break;case 2:.5<=i.u&&(i.u=0,++i.S),60<=i.S&&(i.S=0,++i.M)}var v,y=``;for(l=0;l=s[l].v.length-1?(v-=s[l].v.length,s[l].v=x.substr(v+1,s[l].v.length)):v<0?s[l].v=``:(s[l].v=x.substr(0,v+1),v=-1),s[l].t=`t`,w=l);0<=v&&w[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function xe(e,t){if(t!=null){var n=parseFloat(t[2]);switch(t[1]){case`=`:if(e==n)return 1;break;case`>`:if(n`:if(e!=n)return 1;break;case`>=`:if(n<=e)return 1;break;case`<=`:if(e<=n)return 1}}}function Se(e,t){var n=function(e){for(var t=[],n=!1,r=0,i=0;r]/)==null&&n[1].match(/\[[=<>]/)==null?[r,a]:(e=n[0].match(be),a=n[1].match(be),xe(t,e)?[r,n[0]]:xe(t,a)?[r,n[1]]:[r,n[e!=null&&a!=null?2:1]])}function Ce(e,t,n){n??={};var r=``;switch(typeof e){case`string`:r=e==`m/d/yy`&&n.dateNF?n.dateNF:e;break;case`number`:(r=(r=e==14&&n.dateNF?n.dateNF:(n.table==null?V:n.table)[e])??(n.table&&n.table[H[e]]||V[H[e]]))??(r=U[e]||`General`)}if(R(r,0))return oe(t,n);var i=Se(r,t=t instanceof Date?ie(t,n.date1904):t);if(R(i[1]))return oe(t,n);if(!0===t)t=`TRUE`;else if(!1===t)t=`FALSE`;else if(t===``||t==null)return``;return ye(i[1],t,n,i[0])}function we(e,t){if(typeof t!=`number`){t=+t||-1;for(var n=0;n<392;++n)if(V[n]!=null){if(V[n]==e){t=n;break}}else t<0&&(t=n);t<0&&(t=391)}return V[t]=e,t}function Te(e){for(var t=0;t!=392;++t)e[t]!==void 0&&we(e[t],t)}function Ee(){var e;(e||={})[0]=`General`,e[1]=`0`,e[2]=`0.00`,e[3]=`#,##0`,e[4]=`#,##0.00`,e[9]=`0%`,e[10]=`0.00%`,e[11]=`0.00E+00`,e[12]=`# ?/?`,e[13]=`# ??/??`,e[14]=`m/d/yy`,e[15]=`d-mmm-yy`,e[16]=`d-mmm`,e[17]=`mmm-yy`,e[18]=`h:mm AM/PM`,e[19]=`h:mm:ss AM/PM`,e[20]=`h:mm`,e[21]=`h:mm:ss`,e[22]=`m/d/yy h:mm`,e[37]=`#,##0 ;(#,##0)`,e[38]=`#,##0 ;[Red](#,##0)`,e[39]=`#,##0.00;(#,##0.00)`,e[40]=`#,##0.00;[Red](#,##0.00)`,e[45]=`mm:ss`,e[46]=`[h]:mm:ss`,e[47]=`mmss.0`,e[48]=`##0.0E+0`,e[49]=`@`,e[56]=`"上午/下午 "hh"時"mm"分"ss"秒 "`,V=e}var De={format:Ce,load:we,_table:V,load_table:Te,parse_date_code:ee,is_date:ve,get_table:function(){return De._table=V}},Oe={5:`"$"#,##0_);\\("$"#,##0\\)`,6:`"$"#,##0_);[Red]\\("$"#,##0\\)`,7:`"$"#,##0.00_);\\("$"#,##0.00\\)`,8:`"$"#,##0.00_);[Red]\\("$"#,##0.00\\)`,23:`General`,24:`General`,25:`General`,26:`General`,27:`m/d/yy`,28:`m/d/yy`,29:`m/d/yy`,30:`m/d/yy`,31:`m/d/yy`,32:`h:mm:ss`,33:`h:mm:ss`,34:`h:mm:ss`,35:`h:mm:ss`,36:`m/d/yy`,41:`_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)`,42:`_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)`,43:`_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)`,44:`_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)`,50:`m/d/yy`,51:`m/d/yy`,52:`m/d/yy`,53:`m/d/yy`,54:`m/d/yy`,55:`m/d/yy`,56:`m/d/yy`,57:`m/d/yy`,58:`m/d/yy`,59:`0`,60:`0.00`,61:`#,##0`,62:`#,##0.00`,63:`"$"#,##0_);\\("$"#,##0\\)`,64:`"$"#,##0_);[Red]\\("$"#,##0\\)`,65:`"$"#,##0.00_);\\("$"#,##0.00\\)`,66:`"$"#,##0.00_);[Red]\\("$"#,##0.00\\)`,67:`0%`,68:`0.00%`,69:`# ?/?`,70:`# ??/??`,71:`m/d/yy`,72:`m/d/yy`,73:`d-mmm-yy`,74:`d-mmm`,75:`mmm-yy`,76:`h:mm`,77:`h:mm:ss`,78:`m/d/yy h:mm`,79:`mm:ss`,80:`[h]:mm:ss`,81:`mmss.0`},ke=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g,Ae,je=function(){var e={};e.version=`1.2.0`;var t=function(){for(var e=0,t=Array(256),n=0;n!=256;++n)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=n)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[n]=e;return typeof Int32Array<`u`?new Int32Array(t):t}(),n=function(e){for(var t=0,n=0,r=0,i=new(typeof Int32Array<`u`?Int32Array:Array)(4096),r=0;r!=256;++r)i[r]=e[r];for(r=0;r!=256;++r)for(n=e[r],t=256+r;t<4096;t+=256)n=i[t]=n>>>8^e[255&n];var a=[];for(r=1;r!=16;++r)a[r-1]=typeof Int32Array<`u`?i.subarray(256*r,256*r+256):i.slice(256*r,256*r+256);return a}(t),r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7],d=n[8],f=n[9],p=n[10],m=n[11],h=n[12],g=n[13],_=n[14];return e.table=t,e.bstr=function(e,n){for(var r=-1^n,i=0,a=e.length;i>>8^t[255&(r^e.charCodeAt(i++))];return~r},e.buf=function(e,n){for(var v=-1^n,y=e.length-15,b=0;b>8&255]^h[e[b++]^v>>16&255]^m[e[b++]^v>>>24]^p[e[b++]]^f[e[b++]]^d[e[b++]]^u[e[b++]]^l[e[b++]]^c[e[b++]]^s[e[b++]]^o[e[b++]]^a[e[b++]]^i[e[b++]]^r[e[b++]]^t[e[b++]];for(y+=15;b>>8^t[255&(v^e[b++])];return~v},e.str=function(e,n){for(var r,i=-1^n,a=0,o=e.length,s=0;a>>8^t[255&(i^s)]:s<2048?(i=i>>>8^t[255&(i^(192|s>>6&31))])>>>8^t[255&(i^(128|63&s))]:55296<=s&&s<57344?(s=64+(1023&s),r=1023&e.charCodeAt(a++),(i=(i=(i=i>>>8^t[255&(i^(240|s>>8&7))])>>>8^t[255&(i^(128|s>>2&63))])>>>8^t[255&(i^(128|r>>6&15|(3&s)<<4))])>>>8^t[255&(i^(128|63&r))]):(i=(i=i>>>8^t[255&(i^(224|s>>12&15))])>>>8^t[255&(i^(128|s>>6&63))])>>>8^t[255&(i^(128|63&s))];return~i},e}(),Me=function(){var e,t={};function n(e){if(e.charAt(e.length-1)==`/`)return e.slice(0,-1).indexOf(`/`)===-1?e:n(e.slice(0,-1));var t=e.lastIndexOf(`/`);return t===-1?e:e.slice(0,t+1)}function r(e){if(e.charAt(e.length-1)==`/`)return r(e.slice(0,-1));var t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function i(e){Hn(e,0);for(var t,n={};e.l<=e.length-4;){var r=e.read_shift(2),i=e.read_shift(2),a=e.l+i,o={};r===21589&&(1&(t=e.read_shift(1))&&(o.mtime=e.read_shift(4)),5>>2)-1;if(s){for(var l=0;l=f.length?-1:u,u=o+1;u=f.length?-1:u,m.type=1}else n(e.FullPaths[o+1]||``)==n(h)&&(m.R=o+1),m.type=2}}}function u(e,t){var n=t||{};if(n.fileType==`mad`)return function(e,t){for(var n=t||{},r=n.boundary||`SheetJS`,i=[`MIME-Version: 1.0`,`Content-Type: multipart/related; boundary="`+(r=`------=`+r).slice(2)+`"`,``,``,``],a=e.FullPaths[0],o=a,s=e.FileIndex[0],c=1;c`:l=!0;break;case``:l=!1;break;case``:case``:case``:break;case``:l=!1;break;default:if(!l&&o.WTF)throw Error(`unrecognized `+n[0]+` in threaded comments`)}return e}),s)))}),_&&_.length&&ac(g,_,!0,c.people||[])}catch(e){if(c.WTF)throw e}var v,h}function Gd(e){return e.charAt(0)==`/`?e.slice(1):e}function Kd(e,t){if(Ee(),Vd(t||={}),at(e,`META-INF/manifest.xml`)||at(e,`objectdata.xml`))return ld(e,t);if(at(e,`Index/Document.iwa`)){if(typeof Uint8Array>`u`)throw Error(`NUMBERS file parsing requires Uint8Array support`);if(e.FileIndex)return Rd(e);var n=Me.utils.cfb_new();return lt(e).forEach(function(t){ut(n,t,function e(t,n,r){if(!r)return it(ot(t,n));if(!n)return null;try{return e(t,n)}catch{return null}}(e,t))}),Rd(n)}if(!at(e,`[Content_Types].xml`))throw at(e,`index.xml.gz`)?Error(`Unsupported NUMBERS 08 file`):at(e,`index.xml`)?Error(`Unsupported NUMBERS 09 file`):Error(`Unsupported ZIP file`);var r,i,a=lt(e),o=function(e){var t=Zr();if(!e||!e.match)return t;var n={};if((e.match(_t)||[]).forEach(function(e){var r=bt(e);switch(r[0].replace(vt,`<`)){case`]*>([\\s\\S]*?)`));n&&0`:r=null;break;default:if(o.indexOf(``),l=c[0].slice(4),u=c[1];switch(l){case`lpstr`:case`bstr`:case`lpwstr`:n[r]=Et(u);break;case`bool`:n[r]=It(u);break;case`i1`:case`i2`:case`i4`:case`i8`:case`int`:case`uint`:n[r]=parseInt(u,10);break;case`r4`:case`r8`:case`decimal`:n[r]=parseFloat(u);break;case`filetime`:case`date`:n[r]=Je(u);break;case`cy`:case`error`:n[r]=Et(u);break;default:if(l.slice(-1)==`/`)break;t.WTF&&typeof console<`u`&&console.warn(`Unexpected`,o,l,c)}}else if(o.slice(0,2)!==``:break;case``:break;case``:case``:case``:break;case``:O=!1;break;default:if(!O&&E.WTF)throw Error(`unrecognized `+t[0]+` in threaded comments`)}return e}),D)),k&&=Ud(k,p.Sheets);var A=+!!st(e,`xl/worksheets/sheet.xml`,!0);e:for(b=0;b!=m.Worksheets;++b){var j=`sheet`;if(k&&k[b]?(v=`xl/`+k[b][1].replace(/[\/]?xl\//,``),at(e,v)||(v=k[b][1]),at(e,v)||(v=T.replace(/_rels\/.*$/,``)+k[b][1]),j=k[b][2]):v=(v=`xl/worksheets/sheet`+(b+1-A)+`.`+w).replace(/sheet0\./,`sheet.`),y=v.replace(/^(.*)(\/)([^\/]*)$/,`$1/_rels/$3.rels`),t&&t.sheets!=null)switch(typeof t.sheets){case`number`:if(b!=t.sheets)continue e;break;case`string`:if(m.SheetNames[b].toLowerCase()!=t.sheets.toLowerCase())continue e;break;default:if(Array.isArray&&Array.isArray(t.sheets)){for(var M=!1,N=0;N!=t.sheets.length;++N)typeof t.sheets[N]==`number`&&t.sheets[N]==b&&(M=1),typeof t.sheets[N]==`string`&&t.sheets[N].toLowerCase()==m.SheetNames[b].toLowerCase()&&(M=1);if(!M)continue e}}Wd(e,v,y,m.SheetNames[b],b,x,r,j,t,p,c,l)}return _={Directory:o,Workbook:p,Props:m,Custprops:g,Deps:h,Sheets:r,SheetNames:m.SheetNames,Strings:$c,Styles:l,Themes:c,SSF:Xe(V)},t&&t.bookFiles&&(e.files?(_.keys=a,_.files=e.files):(_.keys=[],_.files={},e.FullPaths.forEach(function(t,n){t=t.replace(/^Root Entry[\/]/,``),_.keys.push(t),_.files[t]=e.FileIndex[n]}))),t&&t.bookVBA&&(0/,`>`)];return e.forEach(function(e){var i=``;(e[1]||[]).forEach(function(a,o){var s;a.T?(a.a&&t.indexOf(a.a)==-1&&t.push(a.a),s={ref:e[0],id:`{54EE7951-7262-4200-6969-`+(`000000000000`+ n.tcid++).slice(-12)+`}`},o==0?i=s.id:s.parentId=i,a.ID=s.id,a.a&&(s.personId=`{54EE7950-7262-4200-6969-`+(`000000000000`+t.indexOf(a.a)).slice(-12)+`}`),r.push(tn(`threadedComment`,$t(`text`,a.t||``),s))):delete a.ID})}),r.push(``),r.join(``)}(f,d,t)),i.threadedcomments.push(m),ri(g,-1,`../threadedComments/threadedComment`+s+`.`+n,$r.TCMNT)),ut(a,m=`xl/comments`+s+`.`+n,oc(f)),i.comments.push(m),ri(g,-1,`../comments`+s+`.`+n,$r.CMNT),p=!0),_[`!legacy`]&&p&&ut(a,`xl/drawings/vmlDrawing`+s+`.vml`,ic(s,_[`!comments`])),delete _[`!comments`],delete _[`!legacy`]),g[`!id`].rId1&&ut(a,ei(o),ni(g))}return t.Strings!=null&&0/,`>`)],r.forEach(function(e,t){u.push(tn(`person`,null,{displayName:e,id:`{54EE7950-7262-4200-6969-`+(`000000000000`+t).slice(-12)+`}`,userId:e,providerId:`None`}))}),u.push(``),u.join(``))),i.people.push(o),ri(t.wbrels,-1,`persons/person.xml`,$r.PEOPLE)),ut(a,`[Content_Types].xml`,Qr(i,t)),ut(a,`_rels/.rels`,ni(t.rels)),ut(a,`xl/_rels/workbook.xml.rels`,ni(t.wbrels)),delete t.revssf,delete t.ssf,a}function Xd(e,t){var n=``;switch((t||{}).type||`base64`){case`buffer`:return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case`base64`:n=b(e.slice(0,12));break;case`binary`:n=e;break;case`array`:return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];default:throw Error(`Unrecognized type `+(t&&t.type||`undefined`))}return[n.charCodeAt(0),n.charCodeAt(1),n.charCodeAt(2),n.charCodeAt(3),n.charCodeAt(4),n.charCodeAt(5),n.charCodeAt(6),n.charCodeAt(7)]}function Zd(e,t){var n=0;e:for(;n`u`||x||(r.type=`array`)),r.type==`string`&&(d=!0,r.type=`binary`,r.codepage=65001,l=(f=e).match(/[^\x00-\x7F]/)?Gt(f):f),r.type==`array`&&typeof Uint8Array<`u`&&e instanceof Uint8Array&&typeof ArrayBuffer<`u`){var f=new ArrayBuffer(3),f=new Uint8Array(f);if(f.foo=`bar`,!f.foo)return(r=Xe(r)).type=`array`,$d(O(l),r)}switch((i=Xd(l,r))[0]){case 208:if(i[1]===207&&i[2]===17&&i[3]===224&&i[4]===161&&i[5]===177&&i[6]===26&&i[7]===225)return s=Me.read(l,r),c=r,(Me.find(s,`EncryptedPackage`)?qd:Iu)(s,c);break;case 9:if(i[1]<=8)return Iu(l,r);break;case 60:return Cu(l,r);case 73:if(i[1]===73&&i[2]===42&&i[3]===0)throw Error(`TIFF Image File is not a spreadsheet`);if(i[1]===68)return function(e,t){var n=t||{},r=!!n.WTF;n.WTF=!0;try{var i=La.to_workbook(e,n);return n.WTF=r,i}catch(i){if(n.WTF=r,!i.message.match(/SYLK bad record ID/)&&r)throw i;return eo.to_workbook(e,t)}}(l,r);break;case 84:if(i[1]===65&&i[2]===66&&i[3]===76)return Ba.to_workbook(l,r);break;case 80:return i[1]===75&&i[2]<9&&i[3]<9?(o=c=l,(a=(a=r)||{}).type||(a.type=x&&Buffer.isBuffer(c)?`buffer`:`base64`),Kd(ft(o,a),a)):Qd(e,l,r,d);case 239:return i[3]===60?Cu(l,r):Qd(e,l,r,d);case 255:if(i[1]===254)return o=l,(a=r).type==`base64`&&(o=b(o)),o=n.utils.decode(1200,o.slice(2),`str`),a.type=`binary`,Zd(o,a);if(i[1]===0&&i[2]===2&&i[3]===0)return uo.to_workbook(l,r);break;case 0:if(i[1]===0&&(2<=i[2]&&i[3]===0||i[2]===0&&(i[3]===8||i[3]===9)))return uo.to_workbook(l,r);break;case 3:case 131:case 139:case 140:return ja.to_workbook(l,r);case 123:if(i[1]===92&&i[2]===114&&i[3]===116)return ns.to_workbook(l,r);break;case 10:case 13:case 32:return function(e,t){var n=``,r=Xd(e,t);switch(t.type){case`base64`:n=b(e);break;case`binary`:n=e;break;case`buffer`:n=e.toString(`binary`);break;case`array`:n=Ye(e);break;default:throw Error(`Unrecognized type `+t.type)}return r[0]==239&&r[1]==187&&r[2]==191&&(n=Wt(n)),t.type=`binary`,Zd(n,t)}(l,r);case 137:if(i[1]===80&&i[2]===78&&i[3]===71)throw Error(`PNG Image File is not a spreadsheet`)}return-1t)return t;throw Error(`Cannot find sheet # `+t)}if(typeof t!=`string`)throw Error(`Cannot find sheet |`+t+`|`);if(-1<(e=e.SheetNames.indexOf(t)))return e;throw Error(`Cannot find sheet name |`+t+`|`)}(e,t),e.Workbook.Sheets[t]||(e.Workbook.Sheets[t]={}),n){case 0:case 1:case 2:break;default:throw Error(`Bad sheet visibility setting `+n)}e.Workbook.Sheets[t].Hidden=n},cell_set_number_format:function(e,t){return e.z=t,e},cell_set_hyperlink:bf,cell_set_internal_link:function(e,t,n){return bf(e,`#`+t,n)},cell_add_comment:function(e,t,n){e.c||=[],e.c.push({t,a:n||`SheetJS`})},sheet_set_array_formula:function(e,t,n,r){for(var i=typeof t==`string`?or(t):t,a=typeof t==`string`?t:ar(t),o=i.s.r;o<=i.e.r;++o)for(var s=i.s.c;s<=i.e.c;++s){var c=_f(e,o,s);c.t=`n`,c.F=a,delete c.v,o==i.s.r&&s==i.s.c&&(c.f=n,r&&(c.D=!0))}return e},consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};function Sf(e){xf=e}var da={to_json:function(e,t){var n=xf({objectMode:!0});if(e==null||e[`!ref`]==null)return n.push(null),n;var r,i={t:`n`,v:0},a=0,o=1,s=[],c=``,l={s:{r:0,c:0},e:{r:0,c:0}},u=t||{},d=u.range==null?e[`!ref`]:u.range;switch(u.header===1?a=1:u.header===`A`?a=2:Array.isArray(u.header)&&(a=3),typeof d){case`string`:l=or(d);break;case`number`:(l=or(e[`!ref`])).s.r=d;break;default:l=d}0a.e.r)return s||(s=!0,n.push(`
`+i)),n.push(null);for(;o<=a.e.r;){n.push($u(e,a,o,r)),++o;break}},n},to_csv:function(e,t){var n=xf(),r=t??{};if(e==null||e[`!ref`]==null)return n.push(null),n;var i=or(e[`!ref`]),a=r.FS===void 0?`,`:r.FS,o=a.charCodeAt(0),s=r.RS===void 0?` -`:r.RS,c=s.charCodeAt(0),l=RegExp((a==`|`?`\\|`:a)+`+$`),u=``,d=[];r.dense=Array.isArray(e);for(var f=r.skipHidden&&e[`!cols`]||[],p=r.skipHidden&&e[`!rows`]||[],m=i.s.c;m<=i.e.c;++m)(f[m]||{}).hidden||(d[m]=tr(m));var h=i.s.r,g=!1,_=0;return n._read=function(){if(!g)return g=!0,n.push(``);for(;h<=i.e.r;)if(++h,!(p[h-1]||{}).hidden&&(u=pf(e,i,h-1,d,o,c,a,r),u!=null&&((u=r.strip?u.replace(l,``):u)||!1!==r.blankrows)))return n.push((_++?s:``)+u);return n.push(null)},n},set_readable:Sf},Cf=function(){function e(t,n,r){return this instanceof e?(this.tagName=t,this._attributes=n||{},this._children=r||[],this._prefix=``,this):new e(t,n,r)}return e.prototype.createElement=function(){return new e(arguments)},e.prototype.children=function(){return this._children},e.prototype.append=function(e){return this._children.push(e),this},e.prototype.prefix=function(e){return arguments.length==0?this._prefix:(this._prefix=e,this)},e.prototype.attr=function(e,t){if(t==null)return delete this._attributes[e],this;if(arguments.length==0)return this._attributes;if(typeof e==`string`&&arguments.length==1)return this._attributes.attr[e];if(typeof e==`object`&&arguments.length==1)for(var n in e)this._attributes[n]=e[n];else arguments.length==2&&typeof e==`string`&&(this._attributes[e]=t);return this},e.prototype.escapeAttributeValue=function(e){return`"`+e.replace(/\"/g,`"`)+`"`},e.prototype.toXml=function(e){var t=(e||=this)._prefix;if(t+=`<`+e.tagName,e._attributes)for(var n in e._attributes)t+=` `+n+`=`+this.escapeAttributeValue(``+e._attributes[n]);if(e._children&&0`;for(var r=0;r`}else t+=`/>`;return t},e}(),wf=function(e){var t,n=164,r={0:`General`,1:`0`,2:`0.00`,3:`#,##0`,4:`#,##0.00`,9:`0%`,10:`0.00%`,11:`0.00E+00`,12:`# ?/?`,13:`# ??/??`,14:`m/d/yy`,15:`d-mmm-yy`,16:`d-mmm`,17:`mmm-yy`,18:`h:mm AM/PM`,19:`h:mm:ss AM/PM`,20:`h:mm`,21:`h:mm:ss`,22:`m/d/yy h:mm`,37:`#,##0 ;(#,##0)`,38:`#,##0 ;[Red](#,##0)`,39:`#,##0.00;(#,##0.00)`,40:`#,##0.00;[Red](#,##0.00)`,45:`mm:ss`,46:`[h]:mm:ss`,47:`mmss.0`,48:`##0.0E+0`,49:`@`,56:`"上午/下午 "hh"時"mm"分"ss"秒 "`},i={};for(t in r)i[r[t]]=t;var a={};return{initialize:function(e){this.$fonts=Cf(`fonts`).attr(`count`,0).attr(`x14ac:knownFonts`,`1`),this.$fills=Cf(`fills`).attr(`count`,0),this.$borders=Cf(`borders`).attr(`count`,0),this.$numFmts=Cf(`numFmts`).attr(`count`,0),this.$cellStyleXfs=Cf(`cellStyleXfs`),this.$xf=Cf(`xf`).attr(`numFmtId`,0).attr(`fontId`,0).attr(`fillId`,0).attr(`borderId`,0),this.$cellXfs=Cf(`cellXfs`).attr(`count`,0),this.$cellStyles=Cf(`cellStyles`).append(Cf(`cellStyle`).attr(`name`,`Normal`).attr(`xfId`,0).attr(`builtinId`,0)),this.$dxfs=Cf(`dxfs`).attr(`count`,`0`),this.$tableStyles=Cf(`tableStyles`).attr(`count`,`0`).attr(`defaultTableStyle`,`TableStyleMedium9`).attr(`defaultPivotStyle`,`PivotStyleMedium4`),this.$styles=Cf(`styleSheet`).attr(`xmlns:mc`,`http://schemas.openxmlformats.org/markup-compatibility/2006`).attr(`xmlns:x14ac`,`http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac`).attr(`xmlns`,`http://schemas.openxmlformats.org/spreadsheetml/2006/main`).attr(`mc:Ignorable`,`x14ac`).prefix(``).append(this.$numFmts).append(this.$fonts).append(this.$fills).append(this.$borders).append(this.$cellStyleXfs.append(this.$xf)).append(this.$cellXfs).append(this.$cellStyles).append(this.$dxfs).append(this.$tableStyles);var t=e.defaultCellStyle||{};return t.font||={name:`Calibri`,sz:`11`},t.font.name||(t.font.name=`Calibri`),t.font.sz||(t.font.sz=11),t.fill||={patternType:`none`,fgColor:{}},t.border||={},t.numFmt||=0,this.defaultStyle=t,e=JSON.parse(JSON.stringify(t)),e.fill={patternType:`gray125`,fgColor:{}},this.addStyles([t,e]),this},addStyle:function(e){var t=JSON.stringify(e),n=a[t];return n==null?(n=this._addXf(e),a[t]=n):n=a[t],n},addStyles:function(e){var t=this;return e.map(function(e){return t.addStyle(e)})},_duckTypeStyle:function(e){return typeof e==`object`&&(e.patternFill||e.fgColor)?{fill:e}:e.font||e.numFmt||e.border||e.fill?e:this._getStyleCSS(e)},_getStyleCSS:function(e){return e},_addXf:function(e){var t=this._addFont(e.font),n=this._addFill(e.fill),r=this._addBorder(e.border),i=this._addNumFmt(e.numFmt),a=Cf(`xf`).attr(`numFmtId`,i).attr(`fontId`,t).attr(`fillId`,n).attr(`borderId`,r).attr(`xfId`,`0`);return 0/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`),e=Cf(`numFmt`).attr(`numFmtId`,++n).attr(`formatCode`,e),this.$numFmts.append(e),e=this.$numFmts.children().length,this.$numFmts.attr(`count`,e),n)},_addFill:function(e){if(!e)return 0;var t,n=Cf(`patternFill`).attr(`patternType`,e.patternType||`solid`);return e.fgColor&&(t=Cf(`fgColor`),e.fgColor.rgb?(e.fgColor.rgb.length==6&&(e.fgColor.rgb=`FF`+e.fgColor.rgb),t.attr(`rgb`,e.fgColor.rgb),n.append(t)):e.fgColor.theme&&(t.attr(`theme`,e.fgColor.theme),e.fgColor.tint&&t.attr(`tint`,e.fgColor.tint),n.append(t)),e.bgColor||={indexed:`64`}),e.bgColor&&(e=Cf(`bgColor`).attr(e.bgColor),n.append(e)),n=Cf(`fill`).append(n),this.$fills.append(n),n=this.$fills.children().length,this.$fills.attr(`count`,n),n-1},_getSubBorder:function(e,t){var n=Cf(e);return t&&(n.attr(`style`,t.style||`medium`),t.color&&(e=Cf(`color`),t.color.auto?e.attr(`auto`,t.color.auto):t.color.rgb?e.attr(`rgb`,t.color.rgb):(t.color.theme||t.color.tint)&&(e.attr(`theme`,t.color.theme||`1`),e.attr(`tint`,t.color.tint||`0`)),n.append(e))),n},_addBorder:function(e){if(!e)return 0;var t=this,n=Cf(`border`).attr(`diagonalUp`,e.diagonalUp).attr(`diagonalDown`,e.diagonalDown);[`left`,`right`,`top`,`bottom`,`diagonal`].forEach(function(r){n.append(t._getSubBorder(r,e[r]))}),this.$borders.append(n);var r=this.$borders.children().length;return this.$borders.attr(`count`,r),r-1},toXml:function(){return this.$styles.toXml()}}.initialize(e||{})};Iu!==void 0&&(e.parse_xlscfb=Iu),e.parse_zip=Kd,e.read=$d,e.readFile=ef,e.readFileSync=ef,e.write=sf,e.writeFile=lf,e.writeFileSync=lf,e.writeFileAsync=function(e,t,n,r){var i=n||{};return i.type=`file`,i.file=e,cf(i),i.type=`buffer`,r instanceof Function||(r=n),Ae.writeFile(e,sf(t,i),r)},e.utils=Ea,e.writeXLSX=of,e.writeFileXLSX=function(e,t,n){return(n||={}).type=`file`,n.file=t,cf(n),of(e,n)},e.SSF=De,da!==void 0&&(e.stream=da),Me!==void 0&&(e.CFB=Me),l===void 0||((da=o7())||{}).Readable&&Sf(da.Readable)}if(e===void 0?t!==void 0&&t.exports?r(t.exports):typeof define==`function`&&define.amd?define(`xlsx`,function(){return n.version||r(n),n}):r(n):r(e),typeof window<`u`&&!window.XLSX)try{window.XLSX=n}catch{}}))(),1),c7={top:{style:`thin`,color:{rgb:`000000`}},right:{style:`thin`,color:{rgb:`000000`}},bottom:{style:`thin`,color:{rgb:`000000`}},left:{style:`thin`,color:{rgb:`000000`}}},l7={vertical:`center`,wrapText:!0},Qte={font:{bold:!0,sz:16,color:{rgb:`FFFFFF`}},fill:{fgColor:{rgb:`111827`}},alignment:{...l7,horizontal:`center`},border:c7},$te={font:{bold:!0,color:{rgb:`111827`}},fill:{fgColor:{rgb:`F3F4F6`}},alignment:{...l7,horizontal:`center`},border:c7},ene={font:{color:{rgb:`111827`}},fill:{fgColor:{rgb:`FFFFFF`}},alignment:{...l7,horizontal:`left`},border:c7},tne={font:{bold:!0,color:{rgb:`FFFFFF`}},fill:{fgColor:{rgb:`374151`}},alignment:{...l7,horizontal:`center`},border:c7},nne={font:{color:{rgb:`111827`}},fill:{fgColor:{rgb:`FFFFFF`}},alignment:{...l7,horizontal:`left`},border:c7};function u7(e){return e??``}function d7(e){if(e==null)return 0;let t=(e instanceof Date?e.toISOString():String(e)).split(/\r?\n/);return Math.max(...t.map(e=>Array.from(e).reduce((e,t)=>e+(t.charCodeAt(0)>255?2:1),0)),0)}function f7(e,t,n){return Math.min(n,Math.max(t,e))}function rne(e,t){let n=Math.max(t.length,...e.map(e=>e.length));return Array.from({length:n},(n,r)=>{let i=t[r];if(i?.width)return{wch:i.width};let a=e.reduce((e,t)=>Math.max(e,d7(t[r])),d7(i?.title)),o=i?.minWidth??10,s=i?.maxWidth??42;return{wch:f7(Math.ceil(a*1.15)+2,o,s)}})}function ine(e,t,n=20){return f7(n+(e.reduce((e,n,r)=>{let i=Math.max(8,t[r]?.wch||12),a=(n==null?``:String(n)).split(/\r?\n/).reduce((e,t)=>e+Math.max(1,Math.ceil(d7(t)/Math.max(8,i-2))),0);return Math.max(e,a)},1)-1)*16,n,120)}function p7(e,t,n){e.s={...t,alignment:{...t.alignment},border:c7},n&&(e.z=n)}function m7(e){return typeof e==`number`&&Number.isFinite(e)}function ane(e){let{filename:t,sheetName:n,title:r,metadataRows:i=[],summaryRows:a=[],columns:o,rows:s}=e,c=Math.max(1,o.length),l=[],u=-1,d=-1;r&&(u=l.length,l.push([r,...Array.from({length:c-1},()=>``)])),i.forEach(e=>l.push(e.map(u7))),a.forEach(e=>l.push(e.map(u7))),(i.length||a.length)&&l.push(Array.from({length:c},()=>``)),d=l.length,l.push(o.map(e=>e.title)),s.forEach((e,t)=>{l.push(o.map(n=>u7(n.render(e,t))))});let f=s7.utils.aoa_to_sheet(l),p=s7.utils.decode_range(f[`!ref`]||`A1:A1`),m=rne(l,o);f[`!cols`]=m,f[`!rows`]=l.map((e,t)=>t===u?{hpt:34}:t===d?{hpt:28}:e.every(e=>e===``)?{hpt:10}:{hpt:ine(e,m)}),u>=0&&c>1&&(f[`!merges`]=f[`!merges`]||[],f[`!merges`].push({s:{r:u,c:0},e:{r:u,c:c-1}})),f[`!autofilter`]={ref:s7.utils.encode_range({s:{r:d,c:0},e:{r:Math.max(d,l.length-1),c:c-1}})};for(let e=p.s.r;e<=p.e.r;e+=1)for(let t=p.s.c;t<=p.e.c;t+=1){let n=s7.utils.encode_cell({r:e,c:t}),r=f[n]||{t:`s`,v:``};if(f[n]=r,e===u){p7(r,Qte);continue}if(e===d){p7(r,tne);continue}if(e{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(h7),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)(1),[m,h]=(0,S.useState)(10),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(``),[D,O]=(0,S.useState)(``),[k,A]=(0,S.useState)(``),[j,M]=(0,S.useState)(``),[N,P]=(0,S.useState)(``),[F,I]=(0,S.useState)([null,null]),L=(0,S.useMemo)(()=>({page:f,pageSize:m,userName:N||void 0,recordType:v||void 0,creditSubject:b||void 0,mediaType:C||void 0,chargeKind:T||void 0,sourceModule:D||void 0,sourceStepCode:k||void 0,billingScene:j||void 0,startDate:F[0]?.format(`YYYY-MM-DD`),endDate:F[1]?.format(`YYYY-MM-DD`),...hne(g)}),[f,m,N,v,b,C,T,D,k,j,F,g]),R=async()=>{s(!0);try{let e=await S8(L);t(e.items||[]),a(e.total||0),r(e.summary||h7)}catch(e){LG.error(e?.message||`加载积分记录失败`)}finally{s(!1)}};return(0,S.useEffect)(()=>{R()},[L]),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, minmax(0, 1fr))`,gap:16,marginBottom:16},children:[(0,Q.jsx)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(e0,{style:{color:`#10b981`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总充值`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#10b981`},children:[`+`,g7(n.totalRecharge)]})]})]})}),(0,Q.jsx)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J1,{style:{color:`#ef4444`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总消费`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#ef4444`},children:[`-`,g7(n.totalConsume)]})]})]})}),(0,Q.jsx)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(f3,{style:{color:`#3b82f6`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总回退`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#3b82f6`},children:[`+`,g7(n.totalRefund)]})]})]})}),(0,Q.jsx)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(N6,{style:{color:`#6366f1`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`交易 / 生成`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800},children:[g7(n.transactionCount),` / `,g7(n.generationCount)]})]})]})})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, minmax(0, 1fr))`,gap:16,marginBottom:16},children:[(0,Q.jsxs)(PR,{size:`small`,bordered:!1,children:[`图片生成:`,g7(n.imageGenerationCount),` 条 / `,g7(n.imageConsume),` 积分`]}),(0,Q.jsxs)(PR,{size:`small`,bordered:!1,children:[`视频生成:`,g7(n.videoGenerationCount),` 条 / `,g7(n.videoConsume),` 积分`]}),(0,Q.jsxs)(PR,{size:`small`,bordered:!1,children:[`提词消费:`,g7(n.textConsume),` 积分`]}),(0,Q.jsxs)(PR,{size:`small`,bordered:!1,children:[`视频分析:`,g7(n.analysisConsume),` 积分`]})]}),(0,Q.jsxs)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(RC,{value:g,onChange:e=>{p(1),_(e)},style:{width:150},options:sne}),(0,Q.jsx)(RC,{value:v,onChange:e=>{p(1),y(e)},style:{width:130},options:cne}),(0,Q.jsx)(RC,{value:b,onChange:e=>{p(1),x(e)},style:{width:180},options:lne}),(0,Q.jsx)(RC,{value:C,onChange:e=>{p(1),w(e)},style:{width:110},options:une}),(0,Q.jsx)(RC,{value:T,onChange:e=>{p(1),E(e)},style:{width:150},options:dne}),(0,Q.jsx)(RC,{value:D,onChange:e=>{p(1),O(e)},style:{width:150},options:fne}),(0,Q.jsx)(RC,{value:k,onChange:e=>{p(1),A(e)},style:{width:150},options:pne}),(0,Q.jsx)(RC,{value:j,onChange:e=>{p(1),M(e)},style:{width:220},options:mne}),(0,Q.jsx)(hW,{placeholder:`用户名/手机号/邮箱`,value:N,onChange:e=>{p(1),P(e.target.value)},style:{width:180},allowClear:!0}),(0,Q.jsx)(YB.RangePicker,{value:F,onChange:e=>{p(1),I(e?[e[0],e[1]]:[null,null])},placeholder:[`开始日期`,`结束日期`],style:{width:250}})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{onClick:()=>{_(``),y(``),x(``),w(``),E(``),O(``),A(``),M(``),P(``),I([null,null]),p(1)},children:`重置`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:R,children:`刷新`}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(x1,{}),loading:c,onClick:async()=>{l(!0),d(`准备导出...`);try{let e={...L,page:1,pageSize:500},t=await S8(e),n=[...t.items||[]],r=t.summary||h7,i=t.total||0,a=Math.max(1,Math.ceil(i/500));d(`正在获取 ${n.length} / ${i}`);for(let t=2;t<=a;t+=1){let r=await S8({...e,page:t});n.push(...r.items||[]),d(`正在获取 ${Math.min(n.length,i)} / ${i}`)}ane({filename:`积分流水_${(0,YE.default)().format(`YYYYMMDD_HHmmss`)}.xlsx`,sheetName:`积分流水`,title:`积分流水汇总`,metadataRows:[[`筛选时间`,`${F[0]?.format(`YYYY-MM-DD`)||`不限`} 至 ${F[1]?.format(`YYYY-MM-DD`)||`不限`}`],[`导出时间`,(0,YE.default)().format(`YYYY-MM-DD HH:mm:ss`)],[`导出条数`,i]],summaryRows:[[`总充值`,r.totalRecharge],[`总消费`,r.totalConsume],[`总回退`,r.totalRefund],[`交易笔数`,r.transactionCount],[`生成条数`,r.generationCount],[`生成尝试次数`,r.generationAttemptCount],[`图片生成条数`,r.imageGenerationCount],[`视频生成条数`,r.videoGenerationCount],[`图片消费积分`,r.imageConsume],[`视频消费积分`,r.videoConsume],[`提词消费积分`,r.textConsume],[`视频分析积分`,r.analysisConsume],[`总 Token`,r.totalTokens],[`输入 Token`,r.inputTokens],[`输出 Token`,r.outputTokens]],columns:[{title:`时间`,maxWidth:22,render:e=>Z5(e.createdAt||``)},{title:`用户`,minWidth:12,maxWidth:20,render:e=>e.username||`-`},{title:`手机号`,minWidth:13,maxWidth:18,render:e=>e.phone||`-`},{title:`用户类型`,maxWidth:16,render:e=>e.userTypeLabel||`-`},{title:`前台归类`,maxWidth:18,render:e=>e.frontendUserKindLabel||`-`},{title:`流水类型`,maxWidth:14,align:`center`,render:e=>e.recordTypeLabel||e.type||`-`},{title:`积分类型`,maxWidth:20,render:e=>e.creditSubjectLabel||`-`},{title:`扣费子类`,maxWidth:22,render:e=>e.chargeKindLabel||`-`},{title:`模块`,maxWidth:20,render:e=>e.sourceModuleLabel||`-`},{title:`模块步骤`,maxWidth:22,render:e=>e.sourceStepCodeLabel||`-`},{title:`计费场景`,maxWidth:32,render:e=>e.billingSceneLabel||`-`},{title:`媒体类型`,maxWidth:12,align:`center`,render:e=>e.mediaTypeLabel||`-`},{title:`变动积分`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0.00`,render:e=>e.amount},{title:`变动后余额`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0.00`,render:e=>e.balanceAfter},{title:`实际 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.totalTokens||0},{title:`输入 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.inputTokens||0},{title:`输出 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.outputTokens||0},{title:`执行类型`,maxWidth:18,render:e=>_7(e.engineType)},{title:`执行配置`,maxWidth:28,render:e=>e.engineName||`-`},{title:`供应商`,maxWidth:18,render:e=>e.engineProvider||`-`},{title:`模型版本`,maxWidth:26,render:e=>e.engineModelName||`-`},{title:`关联状态`,maxWidth:14,align:`center`,render:e=>e.ownerDeleted?`关联已删除`:`正常`},{title:`说明`,minWidth:18,maxWidth:42,render:e=>e.description||``},{title:`业务归属类型`,maxWidth:18,render:e=>e.ownerType||``},{title:`业务归属ID`,maxWidth:28,render:e=>e.ownerId||``},{title:`BizKey`,maxWidth:36,render:e=>e.bizKey||``}],rows:n}),LG.success(`Excel 已导出`)}catch(e){LG.error(e?.message||`导出失败`)}finally{l(!1),d(``)}},children:`下载 Excel`})]})]}),u&&(0,Q.jsx)(`div`,{style:{marginBottom:12,color:`#6366f1`},children:u}),(0,Q.jsx)(bQ,{columns:[{title:`用户`,dataIndex:`username`,width:130,fixed:`left`,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:e||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:t.phone||`-`})]})},{title:`用户类型`,dataIndex:`userTypeLabel`,width:120,render:(e,t)=>(0,Q.jsx)(NQ,{color:t.userType===`admin`?`orange`:`blue`,children:t.userTypeLabel||`-`})},{title:`流水类型`,dataIndex:`recordType`,width:100,render:(e,t)=>{let n=one[e]||{text:t.recordTypeLabel||e||`-`,color:`default`,icon:null};return(0,Q.jsx)(NQ,{color:n.color,icon:n.icon,children:n.text})}},{title:`积分类型`,dataIndex:`creditSubjectLabel`,width:150,render:e=>(0,Q.jsx)(NQ,{children:e||`-`})},{title:`模块`,dataIndex:`sourceModuleLabel`,width:130,render:e=>e||`-`},{title:`步骤/场景`,key:`scene`,width:210,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{children:t.billingSceneLabel||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:t.sourceStepCodeLabel||`-`})]})},{title:`媒体`,dataIndex:`mediaTypeLabel`,width:80,render:e=>e?(0,Q.jsx)(NQ,{color:`purple`,children:e}):`-`},{title:`变动积分`,dataIndex:`amount`,width:120,sorter:(e,t)=>e.amount-t.amount,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:e>0?`#10b981`:`#ef4444`},children:[e>0?`+`:``,g7(e)]})},{title:`余额`,dataIndex:`balanceAfter`,width:110,render:e=>g7(e)},{title:`Token`,key:`tokens`,width:140,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`b`,{children:g7(t.totalTokens)}),(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[`入 `,g7(t.inputTokens),` / 出 `,g7(t.outputTokens)]})]})},{title:`执行配置`,key:`engine`,width:230,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(NQ,{color:t.engineType===`model`?`geekblue`:t.engineType===`image`?`purple`:t.engineType===`video`?`cyan`:`default`,children:_7(t.engineType)}),(0,Q.jsx)(`div`,{children:t.engineName||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[t.engineProvider,t.engineModelName].filter(Boolean).join(` / `)||`-`})]})},{title:`关联状态`,dataIndex:`ownerDeleted`,width:100,render:e=>(0,Q.jsx)(NQ,{color:e?`red`:`green`,children:e?`已删除`:`正常`})},{title:`说明`,dataIndex:`description`,width:240,ellipsis:!0},{title:`时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})}],dataSource:e,rowKey:`id`,loading:o,pagination:{current:f,pageSize:m,total:i,onChange:(e,t)=>{p(e),h(t)},showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`},scroll:{x:1900}})]})]})},_ne=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(180),[u]=X.useForm(),d=async()=>{try{let e=await F8(),t={};e.forEach(e=>{t[e.key]=e.value}),u.setFieldsValue({wechat_appid:t.payment_wechat_appid||``,wechat_mch_id:t.payment_wechat_mch_id||``,wechat_private_key:t.payment_wechat_private_key||``,wechat_cert_serial_no:t.payment_wechat_cert_serial_no||``,wechat_api_v3_key:t.payment_wechat_api_v3_key||``,wechat_notify_url:t.payment_wechat_notify_url||``,wechat_public_key:t.payment_wechat_public_key||``,wechat_public_key_id:t.payment_wechat_public_key_id||``,alipay_app_id:t.payment_alipay_app_id||``,alipay_private_key:t.payment_alipay_private_key||``,alipay_public_key:t.payment_alipay_public_key||``,alipay_notify_url:t.payment_alipay_notify_url||``,alipay_gateway:t.payment_alipay_gateway||``,order_timeout:t.payment_order_timeout||`180`}),r(t.payment_wechat_enabled===`true`),a(t.payment_alipay_enabled===`true`),s(t.payment_mock===`true`),l(parseInt(t.payment_order_timeout||`180`,10))}catch{LG.error(`加载支付配置失败`)}};return(0,S.useEffect)(()=>{d()},[]),(0,Q.jsxs)(`div`,{style:{maxWidth:`100%`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,marginBottom:24},children:[(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsx)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:40,height:40,borderRadius:10,background:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:`#6366f1`},children:(0,Q.jsx)(HB,{})}),(0,Q.jsx)(`div`,{children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`订单超时时间`})})]}),(0,Q.jsx)(X,{form:u,layout:`inline`,children:(0,Q.jsx)(X.Item,{name:`order_timeout`,style:{margin:0},children:(0,Q.jsxs)(VV.Compact,{style:{width:140},children:[(0,Q.jsx)(oB,{min:30,max:86400,placeholder:`180`,style:{width:`100%`},size:`middle`}),(0,Q.jsx)(Z.Text,{children:`秒`})]})})})]})})}),(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsx)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,background:o?`#fff7e6`:`#fafbff`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:40,height:40,borderRadius:10,background:o?`rgba(245,158,11,0.15)`:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:o?`#f59e0b`:`#6366f1`},children:(0,Q.jsx)(l2,{})}),(0,Q.jsx)(`div`,{children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`模拟支付模式`})})]}),(0,Q.jsx)(Mq,{checked:o,onChange:s,checkedChildren:`已开启`,unCheckedChildren:`已关闭`})]})})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(7,193,96,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:22,color:`#07c160`},children:(0,Q.jsx)(I6,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:5,style:{margin:0},children:`微信支付`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:`微信商户号支付配置`})]})]}),(0,Q.jsx)(Mq,{checked:n,onChange:r,checkedChildren:`已启用`,unCheckedChildren:`未启用`})]}),(0,Q.jsxs)(X,{form:u,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`wechat_appid`,label:`AppID`,children:(0,Q.jsx)(hW,{placeholder:`微信支付 AppID`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_mch_id`,label:`商户号 (MchID)`,children:(0,Q.jsx)(hW,{placeholder:`微信支付商户号`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_private_key`,label:`商户私钥`,extra:` +`:r.RS,c=s.charCodeAt(0),l=RegExp((a==`|`?`\\|`:a)+`+$`),u=``,d=[];r.dense=Array.isArray(e);for(var f=r.skipHidden&&e[`!cols`]||[],p=r.skipHidden&&e[`!rows`]||[],m=i.s.c;m<=i.e.c;++m)(f[m]||{}).hidden||(d[m]=tr(m));var h=i.s.r,g=!1,_=0;return n._read=function(){if(!g)return g=!0,n.push(``);for(;h<=i.e.r;)if(++h,!(p[h-1]||{}).hidden&&(u=pf(e,i,h-1,d,o,c,a,r),u!=null&&((u=r.strip?u.replace(l,``):u)||!1!==r.blankrows)))return n.push((_++?s:``)+u);return n.push(null)},n},set_readable:Sf},Cf=function(){function e(t,n,r){return this instanceof e?(this.tagName=t,this._attributes=n||{},this._children=r||[],this._prefix=``,this):new e(t,n,r)}return e.prototype.createElement=function(){return new e(arguments)},e.prototype.children=function(){return this._children},e.prototype.append=function(e){return this._children.push(e),this},e.prototype.prefix=function(e){return arguments.length==0?this._prefix:(this._prefix=e,this)},e.prototype.attr=function(e,t){if(t==null)return delete this._attributes[e],this;if(arguments.length==0)return this._attributes;if(typeof e==`string`&&arguments.length==1)return this._attributes.attr[e];if(typeof e==`object`&&arguments.length==1)for(var n in e)this._attributes[n]=e[n];else arguments.length==2&&typeof e==`string`&&(this._attributes[e]=t);return this},e.prototype.escapeAttributeValue=function(e){return`"`+e.replace(/\"/g,`"`)+`"`},e.prototype.toXml=function(e){var t=(e||=this)._prefix;if(t+=`<`+e.tagName,e._attributes)for(var n in e._attributes)t+=` `+n+`=`+this.escapeAttributeValue(``+e._attributes[n]);if(e._children&&0`;for(var r=0;r`}else t+=`/>`;return t},e}(),wf=function(e){var t,n=164,r={0:`General`,1:`0`,2:`0.00`,3:`#,##0`,4:`#,##0.00`,9:`0%`,10:`0.00%`,11:`0.00E+00`,12:`# ?/?`,13:`# ??/??`,14:`m/d/yy`,15:`d-mmm-yy`,16:`d-mmm`,17:`mmm-yy`,18:`h:mm AM/PM`,19:`h:mm:ss AM/PM`,20:`h:mm`,21:`h:mm:ss`,22:`m/d/yy h:mm`,37:`#,##0 ;(#,##0)`,38:`#,##0 ;[Red](#,##0)`,39:`#,##0.00;(#,##0.00)`,40:`#,##0.00;[Red](#,##0.00)`,45:`mm:ss`,46:`[h]:mm:ss`,47:`mmss.0`,48:`##0.0E+0`,49:`@`,56:`"上午/下午 "hh"時"mm"分"ss"秒 "`},i={};for(t in r)i[r[t]]=t;var a={};return{initialize:function(e){this.$fonts=Cf(`fonts`).attr(`count`,0).attr(`x14ac:knownFonts`,`1`),this.$fills=Cf(`fills`).attr(`count`,0),this.$borders=Cf(`borders`).attr(`count`,0),this.$numFmts=Cf(`numFmts`).attr(`count`,0),this.$cellStyleXfs=Cf(`cellStyleXfs`),this.$xf=Cf(`xf`).attr(`numFmtId`,0).attr(`fontId`,0).attr(`fillId`,0).attr(`borderId`,0),this.$cellXfs=Cf(`cellXfs`).attr(`count`,0),this.$cellStyles=Cf(`cellStyles`).append(Cf(`cellStyle`).attr(`name`,`Normal`).attr(`xfId`,0).attr(`builtinId`,0)),this.$dxfs=Cf(`dxfs`).attr(`count`,`0`),this.$tableStyles=Cf(`tableStyles`).attr(`count`,`0`).attr(`defaultTableStyle`,`TableStyleMedium9`).attr(`defaultPivotStyle`,`PivotStyleMedium4`),this.$styles=Cf(`styleSheet`).attr(`xmlns:mc`,`http://schemas.openxmlformats.org/markup-compatibility/2006`).attr(`xmlns:x14ac`,`http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac`).attr(`xmlns`,`http://schemas.openxmlformats.org/spreadsheetml/2006/main`).attr(`mc:Ignorable`,`x14ac`).prefix(``).append(this.$numFmts).append(this.$fonts).append(this.$fills).append(this.$borders).append(this.$cellStyleXfs.append(this.$xf)).append(this.$cellXfs).append(this.$cellStyles).append(this.$dxfs).append(this.$tableStyles);var t=e.defaultCellStyle||{};return t.font||={name:`Calibri`,sz:`11`},t.font.name||(t.font.name=`Calibri`),t.font.sz||(t.font.sz=11),t.fill||={patternType:`none`,fgColor:{}},t.border||={},t.numFmt||=0,this.defaultStyle=t,e=JSON.parse(JSON.stringify(t)),e.fill={patternType:`gray125`,fgColor:{}},this.addStyles([t,e]),this},addStyle:function(e){var t=JSON.stringify(e),n=a[t];return n==null?(n=this._addXf(e),a[t]=n):n=a[t],n},addStyles:function(e){var t=this;return e.map(function(e){return t.addStyle(e)})},_duckTypeStyle:function(e){return typeof e==`object`&&(e.patternFill||e.fgColor)?{fill:e}:e.font||e.numFmt||e.border||e.fill?e:this._getStyleCSS(e)},_getStyleCSS:function(e){return e},_addXf:function(e){var t=this._addFont(e.font),n=this._addFill(e.fill),r=this._addBorder(e.border),i=this._addNumFmt(e.numFmt),a=Cf(`xf`).attr(`numFmtId`,i).attr(`fontId`,t).attr(`fillId`,n).attr(`borderId`,r).attr(`xfId`,`0`);return 0/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`),e=Cf(`numFmt`).attr(`numFmtId`,++n).attr(`formatCode`,e),this.$numFmts.append(e),e=this.$numFmts.children().length,this.$numFmts.attr(`count`,e),n)},_addFill:function(e){if(!e)return 0;var t,n=Cf(`patternFill`).attr(`patternType`,e.patternType||`solid`);return e.fgColor&&(t=Cf(`fgColor`),e.fgColor.rgb?(e.fgColor.rgb.length==6&&(e.fgColor.rgb=`FF`+e.fgColor.rgb),t.attr(`rgb`,e.fgColor.rgb),n.append(t)):e.fgColor.theme&&(t.attr(`theme`,e.fgColor.theme),e.fgColor.tint&&t.attr(`tint`,e.fgColor.tint),n.append(t)),e.bgColor||={indexed:`64`}),e.bgColor&&(e=Cf(`bgColor`).attr(e.bgColor),n.append(e)),n=Cf(`fill`).append(n),this.$fills.append(n),n=this.$fills.children().length,this.$fills.attr(`count`,n),n-1},_getSubBorder:function(e,t){var n=Cf(e);return t&&(n.attr(`style`,t.style||`medium`),t.color&&(e=Cf(`color`),t.color.auto?e.attr(`auto`,t.color.auto):t.color.rgb?e.attr(`rgb`,t.color.rgb):(t.color.theme||t.color.tint)&&(e.attr(`theme`,t.color.theme||`1`),e.attr(`tint`,t.color.tint||`0`)),n.append(e))),n},_addBorder:function(e){if(!e)return 0;var t=this,n=Cf(`border`).attr(`diagonalUp`,e.diagonalUp).attr(`diagonalDown`,e.diagonalDown);[`left`,`right`,`top`,`bottom`,`diagonal`].forEach(function(r){n.append(t._getSubBorder(r,e[r]))}),this.$borders.append(n);var r=this.$borders.children().length;return this.$borders.attr(`count`,r),r-1},toXml:function(){return this.$styles.toXml()}}.initialize(e||{})};Iu!==void 0&&(e.parse_xlscfb=Iu),e.parse_zip=Kd,e.read=$d,e.readFile=ef,e.readFileSync=ef,e.write=sf,e.writeFile=lf,e.writeFileSync=lf,e.writeFileAsync=function(e,t,n,r){var i=n||{};return i.type=`file`,i.file=e,cf(i),i.type=`buffer`,r instanceof Function||(r=n),Ae.writeFile(e,sf(t,i),r)},e.utils=Ea,e.writeXLSX=of,e.writeFileXLSX=function(e,t,n){return(n||={}).type=`file`,n.file=t,cf(n),of(e,n)},e.SSF=De,da!==void 0&&(e.stream=da),Me!==void 0&&(e.CFB=Me),l===void 0||((da=o7())||{}).Readable&&Sf(da.Readable)}if(e===void 0?t!==void 0&&t.exports?r(t.exports):typeof define==`function`&&define.amd?define(`xlsx`,function(){return n.version||r(n),n}):r(n):r(e),typeof window<`u`&&!window.XLSX)try{window.XLSX=n}catch{}}))(),1),c7={top:{style:`thin`,color:{rgb:`000000`}},right:{style:`thin`,color:{rgb:`000000`}},bottom:{style:`thin`,color:{rgb:`000000`}},left:{style:`thin`,color:{rgb:`000000`}}},l7={vertical:`center`,wrapText:!0},tne={font:{bold:!0,sz:16,color:{rgb:`FFFFFF`}},fill:{fgColor:{rgb:`111827`}},alignment:{...l7,horizontal:`center`},border:c7},nne={font:{bold:!0,color:{rgb:`111827`}},fill:{fgColor:{rgb:`F3F4F6`}},alignment:{...l7,horizontal:`center`},border:c7},rne={font:{color:{rgb:`111827`}},fill:{fgColor:{rgb:`FFFFFF`}},alignment:{...l7,horizontal:`left`},border:c7},ine={font:{bold:!0,color:{rgb:`FFFFFF`}},fill:{fgColor:{rgb:`374151`}},alignment:{...l7,horizontal:`center`},border:c7},ane={font:{color:{rgb:`111827`}},fill:{fgColor:{rgb:`FFFFFF`}},alignment:{...l7,horizontal:`left`},border:c7};function u7(e){return e??``}function d7(e){if(e==null)return 0;let t=(e instanceof Date?e.toISOString():String(e)).split(/\r?\n/);return Math.max(...t.map(e=>Array.from(e).reduce((e,t)=>e+(t.charCodeAt(0)>255?2:1),0)),0)}function f7(e,t,n){return Math.min(n,Math.max(t,e))}function one(e,t){let n=Math.max(t.length,...e.map(e=>e.length));return Array.from({length:n},(n,r)=>{let i=t[r];if(i?.width)return{wch:i.width};let a=e.reduce((e,t)=>Math.max(e,d7(t[r])),d7(i?.title)),o=i?.minWidth??10,s=i?.maxWidth??42;return{wch:f7(Math.ceil(a*1.15)+2,o,s)}})}function sne(e,t,n=20){return f7(n+(e.reduce((e,n,r)=>{let i=Math.max(8,t[r]?.wch||12),a=(n==null?``:String(n)).split(/\r?\n/).reduce((e,t)=>e+Math.max(1,Math.ceil(d7(t)/Math.max(8,i-2))),0);return Math.max(e,a)},1)-1)*16,n,120)}function p7(e,t,n){e.s={...t,alignment:{...t.alignment},border:c7},n&&(e.z=n)}function m7(e){return typeof e==`number`&&Number.isFinite(e)}function cne(e){let{filename:t,sheetName:n,title:r,metadataRows:i=[],summaryRows:a=[],columns:o,rows:s}=e,c=Math.max(1,o.length),l=[],u=-1,d=-1;r&&(u=l.length,l.push([r,...Array.from({length:c-1},()=>``)])),i.forEach(e=>l.push(e.map(u7))),a.forEach(e=>l.push(e.map(u7))),(i.length||a.length)&&l.push(Array.from({length:c},()=>``)),d=l.length,l.push(o.map(e=>e.title)),s.forEach((e,t)=>{l.push(o.map(n=>u7(n.render(e,t))))});let f=s7.utils.aoa_to_sheet(l),p=s7.utils.decode_range(f[`!ref`]||`A1:A1`),m=one(l,o);f[`!cols`]=m,f[`!rows`]=l.map((e,t)=>t===u?{hpt:34}:t===d?{hpt:28}:e.every(e=>e===``)?{hpt:10}:{hpt:sne(e,m)}),u>=0&&c>1&&(f[`!merges`]=f[`!merges`]||[],f[`!merges`].push({s:{r:u,c:0},e:{r:u,c:c-1}})),f[`!autofilter`]={ref:s7.utils.encode_range({s:{r:d,c:0},e:{r:Math.max(d,l.length-1),c:c-1}})};for(let e=p.s.r;e<=p.e.r;e+=1)for(let t=p.s.c;t<=p.e.c;t+=1){let n=s7.utils.encode_cell({r:e,c:t}),r=f[n]||{t:`s`,v:``};if(f[n]=r,e===u){p7(r,tne);continue}if(e===d){p7(r,ine);continue}if(e{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(h7),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)(1),[m,h]=(0,S.useState)(10),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(``),[D,O]=(0,S.useState)(``),[k,A]=(0,S.useState)(``),[j,M]=(0,S.useState)(``),[N,P]=(0,S.useState)(``),[F,I]=(0,S.useState)([null,null]),L=(0,S.useMemo)(()=>({page:f,pageSize:m,userName:N||void 0,recordType:v||void 0,creditSubject:b||void 0,mediaType:C||void 0,chargeKind:T||void 0,sourceModule:D||void 0,sourceStepCode:k||void 0,billingScene:j||void 0,startDate:F[0]?.format(`YYYY-MM-DD`),endDate:F[1]?.format(`YYYY-MM-DD`),...vne(g)}),[f,m,N,v,b,C,T,D,k,j,F,g]),R=async()=>{s(!0);try{let e=await w8(L);t(e.items||[]),a(e.total||0),r(e.summary||h7)}catch(e){LG.error(e?.message||`加载积分记录失败`)}finally{s(!1)}};return(0,S.useEffect)(()=>{R()},[L]),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, minmax(0, 1fr))`,gap:16,marginBottom:16},children:[(0,Q.jsx)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)($1,{style:{color:`#10b981`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总充值`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#10b981`},children:[`+`,g7(n.totalRecharge)]})]})]})}),(0,Q.jsx)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(q1,{style:{color:`#ef4444`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总消费`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#ef4444`},children:[`-`,g7(n.totalConsume)]})]})]})}),(0,Q.jsx)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(m3,{style:{color:`#3b82f6`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总回退`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#3b82f6`},children:[`+`,g7(n.totalRefund)]})]})]})}),(0,Q.jsx)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(F6,{style:{color:`#6366f1`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`交易 / 生成`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800},children:[g7(n.transactionCount),` / `,g7(n.generationCount)]})]})]})})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, minmax(0, 1fr))`,gap:16,marginBottom:16},children:[(0,Q.jsxs)(PR,{size:`small`,bordered:!1,children:[`图片生成:`,g7(n.imageGenerationCount),` 条 / `,g7(n.imageConsume),` 积分`]}),(0,Q.jsxs)(PR,{size:`small`,bordered:!1,children:[`视频生成:`,g7(n.videoGenerationCount),` 条 / `,g7(n.videoConsume),` 积分`]}),(0,Q.jsxs)(PR,{size:`small`,bordered:!1,children:[`提词消费:`,g7(n.textConsume),` 积分`]}),(0,Q.jsxs)(PR,{size:`small`,bordered:!1,children:[`视频分析:`,g7(n.analysisConsume),` 积分`]})]}),(0,Q.jsxs)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(RC,{value:g,onChange:e=>{p(1),_(e)},style:{width:150},options:une}),(0,Q.jsx)(RC,{value:v,onChange:e=>{p(1),y(e)},style:{width:130},options:dne}),(0,Q.jsx)(RC,{value:b,onChange:e=>{p(1),x(e)},style:{width:180},options:fne}),(0,Q.jsx)(RC,{value:C,onChange:e=>{p(1),w(e)},style:{width:110},options:pne}),(0,Q.jsx)(RC,{value:T,onChange:e=>{p(1),E(e)},style:{width:150},options:mne}),(0,Q.jsx)(RC,{value:D,onChange:e=>{p(1),O(e)},style:{width:150},options:hne}),(0,Q.jsx)(RC,{value:k,onChange:e=>{p(1),A(e)},style:{width:150},options:gne}),(0,Q.jsx)(RC,{value:j,onChange:e=>{p(1),M(e)},style:{width:220},options:_ne}),(0,Q.jsx)(hW,{placeholder:`用户名/手机号/邮箱`,value:N,onChange:e=>{p(1),P(e.target.value)},style:{width:180},allowClear:!0}),(0,Q.jsx)(YB.RangePicker,{value:F,onChange:e=>{p(1),I(e?[e[0],e[1]]:[null,null])},placeholder:[`开始日期`,`结束日期`],style:{width:250}})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{onClick:()=>{_(``),y(``),x(``),w(``),E(``),O(``),A(``),M(``),P(``),I([null,null]),p(1)},children:`重置`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:R,children:`刷新`}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(b1,{}),loading:c,onClick:async()=>{l(!0),d(`准备导出...`);try{let e={...L,page:1,pageSize:500},t=await w8(e),n=[...t.items||[]],r=t.summary||h7,i=t.total||0,a=Math.max(1,Math.ceil(i/500));d(`正在获取 ${n.length} / ${i}`);for(let t=2;t<=a;t+=1){let r=await w8({...e,page:t});n.push(...r.items||[]),d(`正在获取 ${Math.min(n.length,i)} / ${i}`)}cne({filename:`积分流水_${(0,YE.default)().format(`YYYYMMDD_HHmmss`)}.xlsx`,sheetName:`积分流水`,title:`积分流水汇总`,metadataRows:[[`筛选时间`,`${F[0]?.format(`YYYY-MM-DD`)||`不限`} 至 ${F[1]?.format(`YYYY-MM-DD`)||`不限`}`],[`导出时间`,(0,YE.default)().format(`YYYY-MM-DD HH:mm:ss`)],[`导出条数`,i]],summaryRows:[[`总充值`,r.totalRecharge],[`总消费`,r.totalConsume],[`总回退`,r.totalRefund],[`交易笔数`,r.transactionCount],[`生成条数`,r.generationCount],[`生成尝试次数`,r.generationAttemptCount],[`图片生成条数`,r.imageGenerationCount],[`视频生成条数`,r.videoGenerationCount],[`图片消费积分`,r.imageConsume],[`视频消费积分`,r.videoConsume],[`提词消费积分`,r.textConsume],[`视频分析积分`,r.analysisConsume],[`总 Token`,r.totalTokens],[`输入 Token`,r.inputTokens],[`输出 Token`,r.outputTokens]],columns:[{title:`时间`,maxWidth:22,render:e=>$5(e.createdAt||``)},{title:`用户`,minWidth:12,maxWidth:20,render:e=>e.username||`-`},{title:`手机号`,minWidth:13,maxWidth:18,render:e=>e.phone||`-`},{title:`用户类型`,maxWidth:16,render:e=>e.userTypeLabel||`-`},{title:`前台归类`,maxWidth:18,render:e=>e.frontendUserKindLabel||`-`},{title:`流水类型`,maxWidth:14,align:`center`,render:e=>e.recordTypeLabel||e.type||`-`},{title:`积分类型`,maxWidth:20,render:e=>e.creditSubjectLabel||`-`},{title:`扣费子类`,maxWidth:22,render:e=>e.chargeKindLabel||`-`},{title:`模块`,maxWidth:20,render:e=>e.sourceModuleLabel||`-`},{title:`模块步骤`,maxWidth:22,render:e=>e.sourceStepCodeLabel||`-`},{title:`计费场景`,maxWidth:32,render:e=>e.billingSceneLabel||`-`},{title:`媒体类型`,maxWidth:12,align:`center`,render:e=>e.mediaTypeLabel||`-`},{title:`变动积分`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0.00`,render:e=>e.amount},{title:`变动后余额`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0.00`,render:e=>e.balanceAfter},{title:`实际 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.totalTokens||0},{title:`输入 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.inputTokens||0},{title:`输出 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.outputTokens||0},{title:`执行类型`,maxWidth:18,render:e=>_7(e.engineType)},{title:`执行配置`,maxWidth:28,render:e=>e.engineName||`-`},{title:`供应商`,maxWidth:18,render:e=>e.engineProvider||`-`},{title:`模型版本`,maxWidth:26,render:e=>e.engineModelName||`-`},{title:`关联状态`,maxWidth:14,align:`center`,render:e=>e.ownerDeleted?`关联已删除`:`正常`},{title:`说明`,minWidth:18,maxWidth:42,render:e=>e.description||``},{title:`业务归属类型`,maxWidth:18,render:e=>e.ownerType||``},{title:`业务归属ID`,maxWidth:28,render:e=>e.ownerId||``},{title:`BizKey`,maxWidth:36,render:e=>e.bizKey||``}],rows:n}),LG.success(`Excel 已导出`)}catch(e){LG.error(e?.message||`导出失败`)}finally{l(!1),d(``)}},children:`下载 Excel`})]})]}),u&&(0,Q.jsx)(`div`,{style:{marginBottom:12,color:`#6366f1`},children:u}),(0,Q.jsx)(bQ,{columns:[{title:`用户`,dataIndex:`username`,width:130,fixed:`left`,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:e||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:t.phone||`-`})]})},{title:`用户类型`,dataIndex:`userTypeLabel`,width:120,render:(e,t)=>(0,Q.jsx)(NQ,{color:t.userType===`admin`?`orange`:`blue`,children:t.userTypeLabel||`-`})},{title:`流水类型`,dataIndex:`recordType`,width:100,render:(e,t)=>{let n=lne[e]||{text:t.recordTypeLabel||e||`-`,color:`default`,icon:null};return(0,Q.jsx)(NQ,{color:n.color,icon:n.icon,children:n.text})}},{title:`积分类型`,dataIndex:`creditSubjectLabel`,width:150,render:e=>(0,Q.jsx)(NQ,{children:e||`-`})},{title:`模块`,dataIndex:`sourceModuleLabel`,width:130,render:e=>e||`-`},{title:`步骤/场景`,key:`scene`,width:210,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{children:t.billingSceneLabel||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:t.sourceStepCodeLabel||`-`})]})},{title:`媒体`,dataIndex:`mediaTypeLabel`,width:80,render:e=>e?(0,Q.jsx)(NQ,{color:`purple`,children:e}):`-`},{title:`变动积分`,dataIndex:`amount`,width:120,sorter:(e,t)=>e.amount-t.amount,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:e>0?`#10b981`:`#ef4444`},children:[e>0?`+`:``,g7(e)]})},{title:`余额`,dataIndex:`balanceAfter`,width:110,render:e=>g7(e)},{title:`Token`,key:`tokens`,width:140,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`b`,{children:g7(t.totalTokens)}),(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[`入 `,g7(t.inputTokens),` / 出 `,g7(t.outputTokens)]})]})},{title:`执行配置`,key:`engine`,width:230,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(NQ,{color:t.engineType===`model`?`geekblue`:t.engineType===`image`?`purple`:t.engineType===`video`?`cyan`:`default`,children:_7(t.engineType)}),(0,Q.jsx)(`div`,{children:t.engineName||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[t.engineProvider,t.engineModelName].filter(Boolean).join(` / `)||`-`})]})},{title:`关联状态`,dataIndex:`ownerDeleted`,width:100,render:e=>(0,Q.jsx)(NQ,{color:e?`red`:`green`,children:e?`已删除`:`正常`})},{title:`说明`,dataIndex:`description`,width:240,ellipsis:!0},{title:`时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:$5(e)})}],dataSource:e,rowKey:`id`,loading:o,pagination:{current:f,pageSize:m,total:i,onChange:(e,t)=>{p(e),h(t)},showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`},scroll:{x:1900}})]})]})},bne=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(180),[u]=X.useForm(),d=async()=>{try{let e=await L8(),t={};e.forEach(e=>{t[e.key]=e.value}),u.setFieldsValue({wechat_appid:t.payment_wechat_appid||``,wechat_mch_id:t.payment_wechat_mch_id||``,wechat_private_key:t.payment_wechat_private_key||``,wechat_cert_serial_no:t.payment_wechat_cert_serial_no||``,wechat_api_v3_key:t.payment_wechat_api_v3_key||``,wechat_notify_url:t.payment_wechat_notify_url||``,wechat_public_key:t.payment_wechat_public_key||``,wechat_public_key_id:t.payment_wechat_public_key_id||``,alipay_app_id:t.payment_alipay_app_id||``,alipay_private_key:t.payment_alipay_private_key||``,alipay_public_key:t.payment_alipay_public_key||``,alipay_notify_url:t.payment_alipay_notify_url||``,alipay_gateway:t.payment_alipay_gateway||``,order_timeout:t.payment_order_timeout||`180`}),r(t.payment_wechat_enabled===`true`),a(t.payment_alipay_enabled===`true`),s(t.payment_mock===`true`),l(parseInt(t.payment_order_timeout||`180`,10))}catch{LG.error(`加载支付配置失败`)}};return(0,S.useEffect)(()=>{d()},[]),(0,Q.jsxs)(`div`,{style:{maxWidth:`100%`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,marginBottom:24},children:[(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsx)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:40,height:40,borderRadius:10,background:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:`#6366f1`},children:(0,Q.jsx)(HB,{})}),(0,Q.jsx)(`div`,{children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`订单超时时间`})})]}),(0,Q.jsx)(X,{form:u,layout:`inline`,children:(0,Q.jsx)(X.Item,{name:`order_timeout`,style:{margin:0},children:(0,Q.jsxs)(VV.Compact,{style:{width:140},children:[(0,Q.jsx)(oB,{min:30,max:86400,placeholder:`180`,style:{width:`100%`},size:`middle`}),(0,Q.jsx)(Z.Text,{children:`秒`})]})})})]})})}),(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsx)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,background:o?`#fff7e6`:`#fafbff`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:40,height:40,borderRadius:10,background:o?`rgba(245,158,11,0.15)`:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:o?`#f59e0b`:`#6366f1`},children:(0,Q.jsx)(c2,{})}),(0,Q.jsx)(`div`,{children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`模拟支付模式`})})]}),(0,Q.jsx)(Mq,{checked:o,onChange:s,checkedChildren:`已开启`,unCheckedChildren:`已关闭`})]})})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(7,193,96,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:22,color:`#07c160`},children:(0,Q.jsx)(R6,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:5,style:{margin:0},children:`微信支付`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:`微信商户号支付配置`})]})]}),(0,Q.jsx)(Mq,{checked:n,onChange:r,checkedChildren:`已启用`,unCheckedChildren:`未启用`})]}),(0,Q.jsxs)(X,{form:u,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`wechat_appid`,label:`AppID`,children:(0,Q.jsx)(hW,{placeholder:`微信支付 AppID`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_mch_id`,label:`商户号 (MchID)`,children:(0,Q.jsx)(hW,{placeholder:`微信支付商户号`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_private_key`,label:`商户私钥`,extra:` ⚠️ 重要:请填写 apiclient_key.pem 的内容,不是 apiclient_cert.pem! 内容应该以 -----BEGIN PRIVATE KEY----- 或 -----BEGIN RSA PRIVATE KEY----- 开头 `,children:(0,Q.jsx)(hW.TextArea,{rows:4,placeholder:`\r -----BEGIN PRIVATE KEY-----\r ...这里是私钥内容...\r -----END PRIVATE KEY-----\r - `,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_cert_serial_no`,label:`商户证书序列号`,extra:`从 apiclient_cert.pem 中提取的证书序列号`,children:(0,Q.jsx)(hW,{placeholder:`商户证书序列号`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_api_v3_key`,label:`API v3 密钥`,children:(0,Q.jsx)(hW.Password,{placeholder:`API v3 密钥`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_notify_url`,label:`回调地址`,children:(0,Q.jsx)(hW,{placeholder:`https://yourdomain.com/api/payments/wechat/callback`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_public_key`,label:`微信平台公钥(可选)`,children:(0,Q.jsx)(hW.TextArea,{rows:3,placeholder:`微信支付平台公钥内容`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_public_key_id`,label:`微信平台公钥ID(可选)`,children:(0,Q.jsx)(hW,{placeholder:`平台公钥ID`,size:`large`,disabled:!n})})]})]})}),(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(0,122,255,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:22,color:`#007aff`},children:(0,Q.jsx)(z1,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:5,style:{margin:0},children:`支付宝`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:`支付宝应用支付配置`})]})]}),(0,Q.jsx)(Mq,{checked:i,onChange:a,checkedChildren:`已启用`,unCheckedChildren:`未启用`})]}),(0,Q.jsxs)(X,{form:u,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`alipay_app_id`,label:`AppID`,children:(0,Q.jsx)(hW,{placeholder:`支付宝应用AppID`,size:`large`,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_private_key`,label:`应用私钥`,extra:`支付宝应用私钥(PKCS8格式),不需要添加头部和尾部标记`,children:(0,Q.jsx)(hW.TextArea,{rows:4,placeholder:`\r + `,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_cert_serial_no`,label:`商户证书序列号`,extra:`从 apiclient_cert.pem 中提取的证书序列号`,children:(0,Q.jsx)(hW,{placeholder:`商户证书序列号`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_api_v3_key`,label:`API v3 密钥`,children:(0,Q.jsx)(hW.Password,{placeholder:`API v3 密钥`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_notify_url`,label:`回调地址`,children:(0,Q.jsx)(hW,{placeholder:`https://yourdomain.com/api/payments/wechat/callback`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_public_key`,label:`微信平台公钥(可选)`,children:(0,Q.jsx)(hW.TextArea,{rows:3,placeholder:`微信支付平台公钥内容`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_public_key_id`,label:`微信平台公钥ID(可选)`,children:(0,Q.jsx)(hW,{placeholder:`平台公钥ID`,size:`large`,disabled:!n})})]})]})}),(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(0,122,255,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:22,color:`#007aff`},children:(0,Q.jsx)(R1,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:5,style:{margin:0},children:`支付宝`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:`支付宝应用支付配置`})]})]}),(0,Q.jsx)(Mq,{checked:i,onChange:a,checkedChildren:`已启用`,unCheckedChildren:`未启用`})]}),(0,Q.jsxs)(X,{form:u,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`alipay_app_id`,label:`AppID`,children:(0,Q.jsx)(hW,{placeholder:`支付宝应用AppID`,size:`large`,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_private_key`,label:`应用私钥`,extra:`支付宝应用私钥(PKCS8格式),不需要添加头部和尾部标记`,children:(0,Q.jsx)(hW.TextArea,{rows:4,placeholder:`\r MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC...\r `,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_public_key`,label:`支付宝公钥`,extra:`从支付宝开放平台获取的支付宝公钥`,children:(0,Q.jsx)(hW.TextArea,{rows:4,placeholder:`\r MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...\r - `,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_gateway`,label:`网关地址`,children:(0,Q.jsx)(hW,{placeholder:`https://openapi.alipay.com/gateway.do`,size:`large`,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_notify_url`,label:`回调地址`,children:(0,Q.jsx)(hW,{placeholder:`https://yourdomain.com/api/payments/alipay/callback`,size:`large`,disabled:!i})})]})]})})]}),(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,marginTop:24},children:(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(v3,{}),onClick:async()=>{try{let e=await u.validateFields();t(!0),await I8({payment_mock:String(o),payment_wechat_enabled:String(n),payment_wechat_appid:e.wechat_appid||``,payment_wechat_mch_id:e.wechat_mch_id||``,payment_wechat_private_key:e.wechat_private_key||``,payment_wechat_cert_serial_no:e.wechat_cert_serial_no||``,payment_wechat_api_v3_key:e.wechat_api_v3_key||``,payment_wechat_notify_url:e.wechat_notify_url||``,payment_wechat_public_key:e.wechat_public_key||``,payment_wechat_public_key_id:e.wechat_public_key_id||``,payment_alipay_enabled:String(i),payment_alipay_app_id:e.alipay_app_id||``,payment_alipay_private_key:e.alipay_private_key||``,payment_alipay_public_key:e.alipay_public_key||``,payment_alipay_notify_url:e.alipay_notify_url||``,payment_alipay_gateway:e.alipay_gateway||``,payment_order_timeout:String(e.order_timeout||180)}),LG.success(`支付配置已保存`),d()}catch{LG.error(`保存失败`)}finally{t(!1)}},loading:e,size:`large`,style:{borderRadius:8,minWidth:160,height:44,fontSize:15},children:`保存配置`})})]})},{Option:v7}=RC,{RangePicker:vne}=YB,yne=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)(1),[o,s]=(0,S.useState)(10),[c,l]=(0,S.useState)(0),[u,d]=(0,S.useState)({startDate:(0,YE.default)().format(`YYYY-MM-DD`),endDate:(0,YE.default)().format(`YYYY-MM-DD`)}),f=async()=>{try{t(!0);let[e,n]=await Promise.all([L8(u),R8({...u,page:i,pageSize:o})]);r({...e,recent:n.items||[]}),l(n.total)}catch{LG.error(`加载支付统计失败`)}finally{t(!1)}};(0,S.useEffect)(()=>{f()},[u,i,o]);let p=(e,t)=>{a(e),s(t)},m=()=>{d({startDate:(0,YE.default)().format(`YYYY-MM-DD`),endDate:(0,YE.default)().format(`YYYY-MM-DD`)})},h=async e=>{try{t(!0),await z8(e),LG.success(`退款成功`),await f()}catch(e){LG.error(e?.response?.data?.detail||`退款失败`)}finally{t(!1)}},g=e=>{e&&e.length===2&&d(t=>({...t,startDate:e[0].format(`YYYY-MM-DD`),endDate:e[1].format(`YYYY-MM-DD`)}))},_={paid:{color:`green`,label:`已支付`,icon:(0,Q.jsx)(N0,{})},pending:{color:`gold`,label:`待支付`,icon:(0,Q.jsx)(HB,{})},cancelled:{color:`default`,label:`已取消`,icon:(0,Q.jsx)(I0,{})},refunded:{color:`red`,label:`已退款`,icon:(0,Q.jsx)(x6,{})}},v={alipay:{color:`blue`,label:`支付宝`},wechat:{color:`green`,label:`微信`}},y=[{title:`订单号`,dataIndex:`orderNo`,key:`orderNo`,width:200},{title:`用户`,dataIndex:`username`,key:`username`,width:120},{title:`支付方式`,dataIndex:`paymentMethod`,key:`paymentMethod`,width:100,render:e=>{let t=v[e]||{color:`default`,label:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.label})}},{title:`金额`,dataIndex:`amount`,key:`amount`,width:100,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:`#10b981`},children:[`¥`,e.toFixed(2)]})},{title:`积分`,dataIndex:`credits`,key:`credits`,width:80},{title:`状态`,dataIndex:`status`,key:`status`,width:100,render:e=>{let t=_[e]||{color:`default`,label:e,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.label})}},{title:`支付宝交易号`,dataIndex:`tradeNo`,key:`tradeNo`,width:200,render:e=>e||`-`},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,Q.jsx)(`span`,{className:`date-display`,style:{color:`#94a3b8`},children:e?Z5(e):`-`})},{title:`支付时间`,dataIndex:`paidAt`,key:`paidAt`,width:160,render:e=>(0,Q.jsx)(`span`,{className:`date-display`,style:{color:`#94a3b8`},children:e?Z5(e):`-`})},{title:`操作`,key:`action`,width:120,render:(e,t)=>t.status===`paid`?(0,Q.jsx)(WG,{title:`确认要退款该订单吗?`,description:`退款后积分会扣除,金额会原路返回`,onConfirm:()=>h(t.orderNo),okText:`确认`,cancelText:`取消`,children:(0,Q.jsx)(qE,{type:`link`,danger:!0,size:`small`,icon:(0,Q.jsx)(x6,{}),children:`退款`})}):null}];if(!n)return(0,Q.jsx)(`div`,{style:{padding:24,color:`#94a3b8`},children:`加载中…`});let b=n.byStatus?.paid||{count:0,amount:0},x=n.byStatus?.pending||{count:0,amount:0},C=n.byStatus?.cancelled||{count:0,amount:0},w=n.byStatus?.refunded||{count:0,amount:0},T=b.count+x.count+C.count+w.count,E=n.month||{count:0,amount:0};return(0,Q.jsx)(am,{locale:U6.default,children:(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(DK,{gutter:[16,16],style:{marginBottom:24},children:[(0,Q.jsx)(pz,{xs:24,sm:12,lg:12,children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsx)(zK,{title:`今日收入`,value:n.today.paidAmount,precision:2,prefix:(0,Q.jsx)(l2,{style:{color:`#10b981`}}),suffix:`元`,valueStyle:{color:`#10b981`,fontWeight:700}}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[n.today.paidCount,` 笔订单`]})]})}),(0,Q.jsx)(pz,{xs:24,sm:12,lg:12,children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsx)(zK,{title:`本月累计`,value:E.paidAmount,precision:2,prefix:(0,Q.jsx)(l2,{style:{color:`#6366f1`}}),suffix:`元`,valueStyle:{color:`#6366f1`,fontWeight:700}}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[E.paidCount,` 笔订单`]})]})})]}),(0,Q.jsx)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,marginBottom:16},title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(l2,{}),`订单状态分布`]}),children:(0,Q.jsx)(DK,{gutter:16,children:[`paid`,`pending`,`cancelled`,`refunded`].map(e=>{let t=n.byStatus?.[e]||{count:0,amount:0},r=_[e],i=T>0?(t.count/T*100).toFixed(1):`0.0`;return(0,Q.jsx)(pz,{span:6,children:(0,Q.jsxs)(`div`,{style:{padding:16,borderRadius:10,background:`#fafbff`,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(NQ,{color:r.color,icon:r.icon,children:r.label}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[i,`%`]})]}),(0,Q.jsxs)(`div`,{style:{marginTop:8,fontSize:20,fontWeight:700},children:[t.count,` `,(0,Q.jsx)(`span`,{style:{fontSize:13,color:`#94a3b8`,fontWeight:400},children:`笔`})]}),(0,Q.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`,marginTop:4},children:[`¥`,t.amount.toFixed(2)]})]})},e)})})}),(0,Q.jsxs)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(l2,{}),`订单列表`]}),children:[(0,Q.jsxs)(DK,{gutter:[16,16],align:`middle`,style:{marginBottom:24},children:[(0,Q.jsxs)(pz,{xs:24,sm:12,md:6,children:[(0,Q.jsx)(`span`,{style:{marginRight:8},children:`支付方式:`}),(0,Q.jsxs)(RC,{placeholder:`全部`,allowClear:!0,style:{width:150},value:u.paymentMethod,onChange:e=>d(t=>({...t,paymentMethod:e})),children:[(0,Q.jsx)(v7,{value:`alipay`,children:`支付宝`}),(0,Q.jsx)(v7,{value:`wechat`,children:`微信`})]})]}),(0,Q.jsxs)(pz,{xs:24,sm:12,md:6,children:[(0,Q.jsx)(`span`,{style:{marginRight:8},children:`状态:`}),(0,Q.jsxs)(RC,{placeholder:`全部`,allowClear:!0,style:{width:150},value:u.status,onChange:e=>d(t=>({...t,status:e})),children:[(0,Q.jsx)(v7,{value:`paid`,children:`已支付`}),(0,Q.jsx)(v7,{value:`pending`,children:`待支付`}),(0,Q.jsx)(v7,{value:`cancelled`,children:`已取消`}),(0,Q.jsx)(v7,{value:`refunded`,children:`已退款`})]})]}),(0,Q.jsxs)(pz,{xs:24,sm:12,md:8,children:[(0,Q.jsx)(`span`,{style:{marginRight:8},children:`日期范围:`}),(0,Q.jsx)(vne,{value:[(0,YE.default)(u.startDate),(0,YE.default)(u.endDate)],onChange:g})]}),(0,Q.jsx)(pz,{xs:24,sm:12,md:4,children:(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:m,children:`重置`})})]}),(0,Q.jsx)(bQ,{columns:y,dataSource:n.recent||[],rowKey:`id`,loading:e,pagination:{current:i,pageSize:o,total:c,onChange:p,showSizeChanger:!0,showTotal:e=>`共 ${e} 条`},scroll:{x:1e3},size:`middle`})]})]})})},y7=[{name:`ShoppingCartOutlined`,label:`购物`,component:(0,Q.jsx)(A3,{})},{name:`BookOutlined`,label:`书籍`,component:(0,Q.jsx)(h0,{})},{name:`HomeOutlined`,label:`房产`,component:(0,Q.jsx)(Z2,{})},{name:`FireOutlined`,label:`火`,component:(0,Q.jsx)(D2,{})},{name:`RocketOutlined`,label:`科技`,component:(0,Q.jsx)(l3,{})},{name:`SkinOutlined`,label:`时尚`,component:(0,Q.jsx)(z3,{})},{name:`CompassOutlined`,label:`指南`,component:(0,Q.jsx)(Z0,{})},{name:`HeartOutlined`,label:`健康`,component:(0,Q.jsx)(H2,{})},{name:`CarOutlined`,label:`汽车`,component:(0,Q.jsx)(A0,{})},{name:`CameraOutlined`,label:`相机`,component:(0,Q.jsx)(D0,{})},{name:`CloudOutlined`,label:`云`,component:(0,Q.jsx)(z0,{})},{name:`StarOutlined`,label:`星`,component:(0,Q.jsx)(Z3,{})},{name:`TrophyOutlined`,label:`奖杯`,component:(0,Q.jsx)(h6,{})},{name:`ThunderboltOutlined`,label:`闪电`,component:(0,Q.jsx)(l6,{})},{name:`BulbOutlined`,label:`灯泡`,component:(0,Q.jsx)(x0,{})},{name:`CoffeeOutlined`,label:`咖啡`,component:(0,Q.jsx)(J0,{})},{name:`CrownOutlined`,label:`皇冠`,component:(0,Q.jsx)(e2,{})},{name:`DashboardOutlined`,label:`仪表`,component:(0,Q.jsx)(r2,{})},{name:`FlagOutlined`,label:`旗帜`,component:(0,Q.jsx)(A2,{})},{name:`GlobalOutlined`,label:`全球`,component:(0,Q.jsx)(z2,{})},{name:`GiftOutlined`,label:`礼物`,component:(0,Q.jsx)(I2,{})},{name:`LaptopOutlined`,label:`笔记本`,component:(0,Q.jsx)(r4,{})},{name:`MobileOutlined`,label:`手机`,component:(0,Q.jsx)(A4,{})},{name:`MonitorOutlined`,label:`显示器`,component:(0,Q.jsx)(N4,{})},{name:`PayCircleOutlined`,label:`支付`,component:(0,Q.jsx)(I4,{})},{name:`PictureOutlined`,label:`图片`,component:(0,Q.jsx)(H4,{})},{name:`PlayCircleOutlined`,label:`播放`,component:(0,Q.jsx)(J4,{})},{name:`SafetyOutlined`,label:`安全`,component:(0,Q.jsx)(h3,{})},{name:`ShoppingOutlined`,label:`商店`,component:(0,Q.jsx)(N3,{})},{name:`SmileOutlined`,label:`笑脸`,component:(0,Q.jsx)(H3,{})},{name:`SoundOutlined`,label:`声音`,component:(0,Q.jsx)(J3,{})},{name:`TagOutlined`,label:`标签`,component:(0,Q.jsx)(r6,{})},{name:`TeamOutlined`,label:`团队`,component:(0,Q.jsx)(o6,{})},{name:`ToolOutlined`,label:`工具`,component:(0,Q.jsx)(f6,{})},{name:`TruckOutlined`,label:`物流`,component:(0,Q.jsx)(v6,{})},{name:`VideoCameraOutlined`,label:`视频`,component:(0,Q.jsx)(A6,{})},{name:`WalletOutlined`,label:`钱包`,component:(0,Q.jsx)(N6,{})},{name:`BankOutlined`,label:`银行`,component:(0,Q.jsx)(o0,{})},{name:`BuildOutlined`,label:`建筑`,component:(0,Q.jsx)(v0,{})},{name:`ExperimentOutlined`,label:`实验`,component:(0,Q.jsx)(h2,{})},{name:`HighlightOutlined`,label:`高亮`,component:(0,Q.jsx)(G2,{})},{name:`IdcardOutlined`,label:`名片`,component:(0,Q.jsx)(e4,{})},{name:`MedicineBoxOutlined`,label:`医药`,component:(0,Q.jsx)(x4,{})},{name:`ReadOutlined`,label:`阅读`,component:(0,Q.jsx)(e3,{})},{name:`RestOutlined`,label:`休息`,component:(0,Q.jsx)(r3,{})},{name:`SketchOutlined`,label:`钻石`,component:(0,Q.jsx)(I3,{})},{name:`SolutionOutlined`,label:`方案`,component:(0,Q.jsx)(G3,{})}],bne=Object.fromEntries(y7.map(e=>[e.name,e.component]));function b7(e){return bne[e]||(0,Q.jsx)(G1,{})}function xne(e){try{let t=typeof e==`string`?JSON.parse(e):e;if(!Array.isArray(t))return{skillItems:[],optionGroups:[]};let n=[],r=[];for(let e of t)e&&e.type===`option_group`&&e.name&&Array.isArray(e.options)?r.push({name:e.name,options:e.options}):e&&e.key&&e.label&&n.push({key:e.key,label:e.label});return{skillItems:n,optionGroups:r}}catch{return{skillItems:[],optionGroups:[]}}}var Sne=({value:e,onChange:t})=>{let n=y7.find(t=>t.name===e);return(0,Q.jsx)(UV,{trigger:[`click`],dropdownRender:()=>(0,Q.jsx)(`div`,{style:{background:`#fff`,borderRadius:12,padding:12,width:360,boxShadow:`0 12px 40px rgba(0,0,0,0.15)`,border:`1px solid #f0f0f5`},children:(0,Q.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(8, 1fr)`,gap:4},children:y7.map(n=>(0,Q.jsx)(`div`,{onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),t?.(n.name)},title:n.label,style:{width:40,height:40,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,fontSize:18,transition:`all 0.15s`,background:e===n.name?`#6366f1`:`transparent`,color:e===n.name?`#fff`:`#64748b`,border:e===n.name?`none`:`1px solid transparent`},onMouseEnter:t=>{e!==n.name&&(t.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:t=>{e!==n.name&&(t.currentTarget.style.background=`transparent`)},children:n.component},n.name))})}),children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`8px 12px`,borderRadius:8,border:`1px solid #d9d9d9`,cursor:`pointer`,height:40},children:[e?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{style:{fontSize:18,color:`#6366f1`},children:b7(e)}),(0,Q.jsx)(`span`,{style:{color:`#64748b`,fontSize:13},children:n?.label||e})]}):(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`,fontSize:13},children:`选择图标`}),(0,Q.jsx)(AC,{style:{fontSize:10,color:`#bfbfbf`,marginLeft:`auto`}})]})})},Cne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)({open:!1,item:null}),[c]=X.useForm(),l=async()=>{r(!0);try{t((await C8()).map(e=>{let{skillItems:t,optionGroups:n}=xne(e.skills);return{id:e.id,key:e.key,label:e.label,icon:e.icon||``,description:e.description||``,skills:JSON.stringify(t),optionGroups:n,isActive:e.is_active??e.isActive??!0,sortOrder:e.sort_order??e.sortOrder??0}}))}catch{LG.error(`加载行业配置失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{l()},[]);let u=async()=>{try{let e=await c.validateFields();a(!0);let t=[];e.skills_wentutujie?.trim()&&t.push({type:`skill`,key:`文图理解生成视频提示词`,label:e.skills_wentutujie.trim()}),e.skills_wentutujie_image?.trim()&&t.push({type:`skill`,key:`文图理解生成图片提示词`,label:e.skills_wentutujie_image.trim()});let n=(e.optionGroups||[]).filter(e=>e?.name?.trim()).map(e=>({name:e.name.trim(),options:(e.options||[]).filter(e=>e?.trim())})).filter(e=>e.options.length>0);for(let e of n)t.push({type:`option_group`,name:e.name,options:e.options});let r={key:e.key,label:e.label,icon:e.icon||``,description:e.description||``,skills:t,is_active:e.is_active??!0,sort_order:e.sort_order??0};o.item?.id?(await w8({id:o.item.id,...r}),LG.success(`已更新`)):(await w8(r),LG.success(`已添加`)),s({open:!1,item:null}),c.resetFields(),l()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}finally{a(!1)}},d=async e=>{try{await T8(e),LG.success(`已删除`),l()}catch(e){LG.error(e?.message||`删除失败`)}},f=e=>{s({open:!0,item:e||null});let t=``,n=``,r=[];if(e){try{let r=JSON.parse(e.skills);if(Array.isArray(r))for(let e of r)(e.key===`文图理解生成视频提示词`||e.key===`文图理解`)&&(t=e.label||``),e.key===`文图理解生成图片提示词`&&(n=e.label||``)}catch{}r=e.optionGroups.length>0?e.optionGroups:[{name:``,options:[]}]}e?c.setFieldsValue({key:e.key,label:e.label,icon:e.icon||``,description:e.description,skills_wentutujie:t,skills_wentutujie_image:n,optionGroups:r,is_active:e.isActive,sort_order:e.sortOrder}):(c.resetFields(),c.setFieldsValue({is_active:!0,sort_order:0,optionGroups:[{name:``,options:[]}]}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(G1,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`行业与技能配置`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 个行业`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>f(),style:{borderRadius:8},children:`添加行业`})]}),(0,Q.jsx)(bQ,{columns:[{title:`行业`,key:`industry`,width:180,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsx)(`div`,{style:{width:36,height:36,borderRadius:10,background:`#f1f5f9`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:18,color:`#6366f1`,flexShrink:0},children:b7(t.icon)}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.label}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.key})]})]})},{title:`描述`,dataIndex:`description`,ellipsis:!0},{title:`选项配置`,key:`optionGroups`,width:260,render:(e,t)=>!t.optionGroups||t.optionGroups.length===0?(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#cbd5e1`},children:`未配置`}):(0,Q.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:t.optionGroups.map((e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,Q.jsx)(NQ,{color:`blue`,style:{margin:0,fontSize:11},children:e.name}),(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#64748b`},children:[e.options.slice(0,3).join(`、`),e.options.length>3?`...${e.options.length}项`:``]})]},t))})},{title:`文图理解生成视频提示词`,dataIndex:`skills`,ellipsis:!0,render:e=>{try{let t=JSON.parse(e);if(Array.isArray(t)){let e=t.find(e=>e.key===`文图理解生成视频提示词`||e.key===`文图理解`);if(e)return(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{fontSize:12},children:e.label})}}catch{}return(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`})}},{title:`文图理解生成图片提示词`,dataIndex:`skills`,ellipsis:!0,render:e=>{try{let t=JSON.parse(e);if(Array.isArray(t)){let e=t.find(e=>e.key===`文图理解生成图片提示词`);if(e)return(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{fontSize:12},children:e.label})}}catch{}return(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`})}},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>f(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除该行业?`,onConfirm:()=>d(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(G1,{}),o.item?`编辑行业`:`添加行业`]}),open:o.open,onOk:u,onCancel:()=>{s({open:!1,item:null}),c.resetFields()},okText:`保存`,cancelText:`取消`,width:640,confirmLoading:i,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`key`,label:`行业标识`,style:{flex:1},rules:[{required:!0,message:`请输入标识`}],children:(0,Q.jsx)(hW,{placeholder:`例如:ecommerce`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`label`,label:`行业名称`,style:{flex:1},rules:[{required:!0,message:`请输入名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:电商`,size:`large`})})]}),(0,Q.jsx)(X.Item,{name:`icon`,label:`行业图标`,children:(0,Q.jsx)(Sne,{})}),(0,Q.jsx)(X.Item,{name:`description`,label:`行业描述`,children:(0,Q.jsx)(hW.TextArea,{rows:2,placeholder:`行业描述`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`skills_wentutujie`,label:`文图理解生成视频提示词`,extra:`用于LLM优化视频提示词的系统指令,根据行业特点引导AI理解文案与画面的关系`,children:(0,Q.jsx)(hW.TextArea,{rows:3,placeholder:`请输入文图理解生成视频提示词,例如: + `,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_gateway`,label:`网关地址`,children:(0,Q.jsx)(hW,{placeholder:`https://openapi.alipay.com/gateway.do`,size:`large`,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_notify_url`,label:`回调地址`,children:(0,Q.jsx)(hW,{placeholder:`https://yourdomain.com/api/payments/alipay/callback`,size:`large`,disabled:!i})})]})]})})]}),(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,marginTop:24},children:(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(b3,{}),onClick:async()=>{try{let e=await u.validateFields();t(!0),await R8({payment_mock:String(o),payment_wechat_enabled:String(n),payment_wechat_appid:e.wechat_appid||``,payment_wechat_mch_id:e.wechat_mch_id||``,payment_wechat_private_key:e.wechat_private_key||``,payment_wechat_cert_serial_no:e.wechat_cert_serial_no||``,payment_wechat_api_v3_key:e.wechat_api_v3_key||``,payment_wechat_notify_url:e.wechat_notify_url||``,payment_wechat_public_key:e.wechat_public_key||``,payment_wechat_public_key_id:e.wechat_public_key_id||``,payment_alipay_enabled:String(i),payment_alipay_app_id:e.alipay_app_id||``,payment_alipay_private_key:e.alipay_private_key||``,payment_alipay_public_key:e.alipay_public_key||``,payment_alipay_notify_url:e.alipay_notify_url||``,payment_alipay_gateway:e.alipay_gateway||``,payment_order_timeout:String(e.order_timeout||180)}),LG.success(`支付配置已保存`),d()}catch{LG.error(`保存失败`)}finally{t(!1)}},loading:e,size:`large`,style:{borderRadius:8,minWidth:160,height:44,fontSize:15},children:`保存配置`})})]})},{Option:v7}=RC,{RangePicker:xne}=YB,Sne=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)(1),[o,s]=(0,S.useState)(10),[c,l]=(0,S.useState)(0),[u,d]=(0,S.useState)({startDate:(0,YE.default)().format(`YYYY-MM-DD`),endDate:(0,YE.default)().format(`YYYY-MM-DD`)}),f=async()=>{try{t(!0);let[e,n]=await Promise.all([z8(u),B8({...u,page:i,pageSize:o})]);r({...e,recent:n.items||[]}),l(n.total)}catch{LG.error(`加载支付统计失败`)}finally{t(!1)}};(0,S.useEffect)(()=>{f()},[u,i,o]);let p=(e,t)=>{a(e),s(t)},m=()=>{d({startDate:(0,YE.default)().format(`YYYY-MM-DD`),endDate:(0,YE.default)().format(`YYYY-MM-DD`)})},h=async e=>{try{t(!0),await V8(e),LG.success(`退款成功`),await f()}catch(e){LG.error(e?.response?.data?.detail||`退款失败`)}finally{t(!1)}},g=e=>{e&&e.length===2&&d(t=>({...t,startDate:e[0].format(`YYYY-MM-DD`),endDate:e[1].format(`YYYY-MM-DD`)}))},_={paid:{color:`green`,label:`已支付`,icon:(0,Q.jsx)(M0,{})},pending:{color:`gold`,label:`待支付`,icon:(0,Q.jsx)(HB,{})},cancelled:{color:`default`,label:`已取消`,icon:(0,Q.jsx)(F0,{})},refunded:{color:`red`,label:`已退款`,icon:(0,Q.jsx)(C6,{})}},v={alipay:{color:`blue`,label:`支付宝`},wechat:{color:`green`,label:`微信`}},y=[{title:`订单号`,dataIndex:`orderNo`,key:`orderNo`,width:200},{title:`用户`,dataIndex:`username`,key:`username`,width:120},{title:`支付方式`,dataIndex:`paymentMethod`,key:`paymentMethod`,width:100,render:e=>{let t=v[e]||{color:`default`,label:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.label})}},{title:`金额`,dataIndex:`amount`,key:`amount`,width:100,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:`#10b981`},children:[`¥`,e.toFixed(2)]})},{title:`积分`,dataIndex:`credits`,key:`credits`,width:80},{title:`状态`,dataIndex:`status`,key:`status`,width:100,render:e=>{let t=_[e]||{color:`default`,label:e,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.label})}},{title:`支付宝交易号`,dataIndex:`tradeNo`,key:`tradeNo`,width:200,render:e=>e||`-`},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,Q.jsx)(`span`,{className:`date-display`,style:{color:`#94a3b8`},children:e?$5(e):`-`})},{title:`支付时间`,dataIndex:`paidAt`,key:`paidAt`,width:160,render:e=>(0,Q.jsx)(`span`,{className:`date-display`,style:{color:`#94a3b8`},children:e?$5(e):`-`})},{title:`操作`,key:`action`,width:120,render:(e,t)=>t.status===`paid`?(0,Q.jsx)(WG,{title:`确认要退款该订单吗?`,description:`退款后积分会扣除,金额会原路返回`,onConfirm:()=>h(t.orderNo),okText:`确认`,cancelText:`取消`,children:(0,Q.jsx)(qE,{type:`link`,danger:!0,size:`small`,icon:(0,Q.jsx)(C6,{}),children:`退款`})}):null}];if(!n)return(0,Q.jsx)(`div`,{style:{padding:24,color:`#94a3b8`},children:`加载中…`});let b=n.byStatus?.paid||{count:0,amount:0},x=n.byStatus?.pending||{count:0,amount:0},C=n.byStatus?.cancelled||{count:0,amount:0},w=n.byStatus?.refunded||{count:0,amount:0},T=b.count+x.count+C.count+w.count,E=n.month||{count:0,amount:0};return(0,Q.jsx)(am,{locale:G6.default,children:(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(DK,{gutter:[16,16],style:{marginBottom:24},children:[(0,Q.jsx)(pz,{xs:24,sm:12,lg:12,children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsx)(zK,{title:`今日收入`,value:n.today.paidAmount,precision:2,prefix:(0,Q.jsx)(c2,{style:{color:`#10b981`}}),suffix:`元`,valueStyle:{color:`#10b981`,fontWeight:700}}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[n.today.paidCount,` 笔订单`]})]})}),(0,Q.jsx)(pz,{xs:24,sm:12,lg:12,children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsx)(zK,{title:`本月累计`,value:E.paidAmount,precision:2,prefix:(0,Q.jsx)(c2,{style:{color:`#6366f1`}}),suffix:`元`,valueStyle:{color:`#6366f1`,fontWeight:700}}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[E.paidCount,` 笔订单`]})]})})]}),(0,Q.jsx)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,marginBottom:16},title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(c2,{}),`订单状态分布`]}),children:(0,Q.jsx)(DK,{gutter:16,children:[`paid`,`pending`,`cancelled`,`refunded`].map(e=>{let t=n.byStatus?.[e]||{count:0,amount:0},r=_[e],i=T>0?(t.count/T*100).toFixed(1):`0.0`;return(0,Q.jsx)(pz,{span:6,children:(0,Q.jsxs)(`div`,{style:{padding:16,borderRadius:10,background:`#fafbff`,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(NQ,{color:r.color,icon:r.icon,children:r.label}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[i,`%`]})]}),(0,Q.jsxs)(`div`,{style:{marginTop:8,fontSize:20,fontWeight:700},children:[t.count,` `,(0,Q.jsx)(`span`,{style:{fontSize:13,color:`#94a3b8`,fontWeight:400},children:`笔`})]}),(0,Q.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`,marginTop:4},children:[`¥`,t.amount.toFixed(2)]})]})},e)})})}),(0,Q.jsxs)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(c2,{}),`订单列表`]}),children:[(0,Q.jsxs)(DK,{gutter:[16,16],align:`middle`,style:{marginBottom:24},children:[(0,Q.jsxs)(pz,{xs:24,sm:12,md:6,children:[(0,Q.jsx)(`span`,{style:{marginRight:8},children:`支付方式:`}),(0,Q.jsxs)(RC,{placeholder:`全部`,allowClear:!0,style:{width:150},value:u.paymentMethod,onChange:e=>d(t=>({...t,paymentMethod:e})),children:[(0,Q.jsx)(v7,{value:`alipay`,children:`支付宝`}),(0,Q.jsx)(v7,{value:`wechat`,children:`微信`})]})]}),(0,Q.jsxs)(pz,{xs:24,sm:12,md:6,children:[(0,Q.jsx)(`span`,{style:{marginRight:8},children:`状态:`}),(0,Q.jsxs)(RC,{placeholder:`全部`,allowClear:!0,style:{width:150},value:u.status,onChange:e=>d(t=>({...t,status:e})),children:[(0,Q.jsx)(v7,{value:`paid`,children:`已支付`}),(0,Q.jsx)(v7,{value:`pending`,children:`待支付`}),(0,Q.jsx)(v7,{value:`cancelled`,children:`已取消`}),(0,Q.jsx)(v7,{value:`refunded`,children:`已退款`})]})]}),(0,Q.jsxs)(pz,{xs:24,sm:12,md:8,children:[(0,Q.jsx)(`span`,{style:{marginRight:8},children:`日期范围:`}),(0,Q.jsx)(xne,{value:[(0,YE.default)(u.startDate),(0,YE.default)(u.endDate)],onChange:g})]}),(0,Q.jsx)(pz,{xs:24,sm:12,md:4,children:(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:m,children:`重置`})})]}),(0,Q.jsx)(bQ,{columns:y,dataSource:n.recent||[],rowKey:`id`,loading:e,pagination:{current:i,pageSize:o,total:c,onChange:p,showSizeChanger:!0,showTotal:e=>`共 ${e} 条`},scroll:{x:1e3},size:`middle`})]})]})})},y7=[{name:`ShoppingCartOutlined`,label:`购物`,component:(0,Q.jsx)(M3,{})},{name:`BookOutlined`,label:`书籍`,component:(0,Q.jsx)(m0,{})},{name:`HomeOutlined`,label:`房产`,component:(0,Q.jsx)(X2,{})},{name:`FireOutlined`,label:`火`,component:(0,Q.jsx)(E2,{})},{name:`RocketOutlined`,label:`科技`,component:(0,Q.jsx)(d3,{})},{name:`SkinOutlined`,label:`时尚`,component:(0,Q.jsx)(V3,{})},{name:`CompassOutlined`,label:`指南`,component:(0,Q.jsx)(X0,{})},{name:`HeartOutlined`,label:`健康`,component:(0,Q.jsx)(V2,{})},{name:`CarOutlined`,label:`汽车`,component:(0,Q.jsx)(k0,{})},{name:`CameraOutlined`,label:`相机`,component:(0,Q.jsx)(E0,{})},{name:`CloudOutlined`,label:`云`,component:(0,Q.jsx)(R0,{})},{name:`StarOutlined`,label:`星`,component:(0,Q.jsx)($3,{})},{name:`TrophyOutlined`,label:`奖杯`,component:(0,Q.jsx)(_6,{})},{name:`ThunderboltOutlined`,label:`闪电`,component:(0,Q.jsx)(d6,{})},{name:`BulbOutlined`,label:`灯泡`,component:(0,Q.jsx)(b0,{})},{name:`CoffeeOutlined`,label:`咖啡`,component:(0,Q.jsx)(q0,{})},{name:`CrownOutlined`,label:`皇冠`,component:(0,Q.jsx)($0,{})},{name:`DashboardOutlined`,label:`仪表`,component:(0,Q.jsx)(n2,{})},{name:`FlagOutlined`,label:`旗帜`,component:(0,Q.jsx)(k2,{})},{name:`GlobalOutlined`,label:`全球`,component:(0,Q.jsx)(R2,{})},{name:`GiftOutlined`,label:`礼物`,component:(0,Q.jsx)(F2,{})},{name:`LaptopOutlined`,label:`笔记本`,component:(0,Q.jsx)(n4,{})},{name:`MobileOutlined`,label:`手机`,component:(0,Q.jsx)(M4,{})},{name:`MonitorOutlined`,label:`显示器`,component:(0,Q.jsx)(F4,{})},{name:`PayCircleOutlined`,label:`支付`,component:(0,Q.jsx)(R4,{})},{name:`PictureOutlined`,label:`图片`,component:(0,Q.jsx)(W4,{})},{name:`PlayCircleOutlined`,label:`播放`,component:(0,Q.jsx)(X4,{})},{name:`SafetyOutlined`,label:`安全`,component:(0,Q.jsx)(_3,{})},{name:`ShoppingOutlined`,label:`商店`,component:(0,Q.jsx)(F3,{})},{name:`SmileOutlined`,label:`笑脸`,component:(0,Q.jsx)(W3,{})},{name:`SoundOutlined`,label:`声音`,component:(0,Q.jsx)(X3,{})},{name:`TagOutlined`,label:`标签`,component:(0,Q.jsx)(a6,{})},{name:`TeamOutlined`,label:`团队`,component:(0,Q.jsx)(c6,{})},{name:`ToolOutlined`,label:`工具`,component:(0,Q.jsx)(m6,{})},{name:`TruckOutlined`,label:`物流`,component:(0,Q.jsx)(b6,{})},{name:`VideoCameraOutlined`,label:`视频`,component:(0,Q.jsx)(M6,{})},{name:`WalletOutlined`,label:`钱包`,component:(0,Q.jsx)(F6,{})},{name:`BankOutlined`,label:`银行`,component:(0,Q.jsx)(a0,{})},{name:`BuildOutlined`,label:`建筑`,component:(0,Q.jsx)(_0,{})},{name:`ExperimentOutlined`,label:`实验`,component:(0,Q.jsx)(m2,{})},{name:`HighlightOutlined`,label:`高亮`,component:(0,Q.jsx)(W2,{})},{name:`IdcardOutlined`,label:`名片`,component:(0,Q.jsx)($2,{})},{name:`MedicineBoxOutlined`,label:`医药`,component:(0,Q.jsx)(b4,{})},{name:`ReadOutlined`,label:`阅读`,component:(0,Q.jsx)(n3,{})},{name:`RestOutlined`,label:`休息`,component:(0,Q.jsx)(a3,{})},{name:`SketchOutlined`,label:`钻石`,component:(0,Q.jsx)(R3,{})},{name:`SolutionOutlined`,label:`方案`,component:(0,Q.jsx)(q3,{})}],Cne=Object.fromEntries(y7.map(e=>[e.name,e.component]));function b7(e){return Cne[e]||(0,Q.jsx)(W1,{})}function wne(e){try{let t=typeof e==`string`?JSON.parse(e):e;if(!Array.isArray(t))return{skillItems:[],optionGroups:[]};let n=[],r=[];for(let e of t)e&&e.type===`option_group`&&e.name&&Array.isArray(e.options)?r.push({name:e.name,options:e.options}):e&&e.key&&e.label&&n.push({key:e.key,label:e.label});return{skillItems:n,optionGroups:r}}catch{return{skillItems:[],optionGroups:[]}}}var Tne=({value:e,onChange:t})=>{let n=y7.find(t=>t.name===e);return(0,Q.jsx)(UV,{trigger:[`click`],dropdownRender:()=>(0,Q.jsx)(`div`,{style:{background:`#fff`,borderRadius:12,padding:12,width:360,boxShadow:`0 12px 40px rgba(0,0,0,0.15)`,border:`1px solid #f0f0f5`},children:(0,Q.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(8, 1fr)`,gap:4},children:y7.map(n=>(0,Q.jsx)(`div`,{onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),t?.(n.name)},title:n.label,style:{width:40,height:40,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,fontSize:18,transition:`all 0.15s`,background:e===n.name?`#6366f1`:`transparent`,color:e===n.name?`#fff`:`#64748b`,border:e===n.name?`none`:`1px solid transparent`},onMouseEnter:t=>{e!==n.name&&(t.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:t=>{e!==n.name&&(t.currentTarget.style.background=`transparent`)},children:n.component},n.name))})}),children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`8px 12px`,borderRadius:8,border:`1px solid #d9d9d9`,cursor:`pointer`,height:40},children:[e?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{style:{fontSize:18,color:`#6366f1`},children:b7(e)}),(0,Q.jsx)(`span`,{style:{color:`#64748b`,fontSize:13},children:n?.label||e})]}):(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`,fontSize:13},children:`选择图标`}),(0,Q.jsx)(AC,{style:{fontSize:10,color:`#bfbfbf`,marginLeft:`auto`}})]})})},Ene=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)({open:!1,item:null}),[c]=X.useForm(),l=async()=>{r(!0);try{t((await T8()).map(e=>{let{skillItems:t,optionGroups:n}=wne(e.skills);return{id:e.id,key:e.key,label:e.label,icon:e.icon||``,description:e.description||``,skills:JSON.stringify(t),optionGroups:n,isActive:e.is_active??e.isActive??!0,sortOrder:e.sort_order??e.sortOrder??0}}))}catch{LG.error(`加载行业配置失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{l()},[]);let u=async()=>{try{let e=await c.validateFields();a(!0);let t=[];e.skills_wentutujie?.trim()&&t.push({type:`skill`,key:`文图理解生成视频提示词`,label:e.skills_wentutujie.trim()}),e.skills_wentutujie_image?.trim()&&t.push({type:`skill`,key:`文图理解生成图片提示词`,label:e.skills_wentutujie_image.trim()});let n=(e.optionGroups||[]).filter(e=>e?.name?.trim()).map(e=>({name:e.name.trim(),options:(e.options||[]).filter(e=>e?.trim())})).filter(e=>e.options.length>0);for(let e of n)t.push({type:`option_group`,name:e.name,options:e.options});let r={key:e.key,label:e.label,icon:e.icon||``,description:e.description||``,skills:t,is_active:e.is_active??!0,sort_order:e.sort_order??0};o.item?.id?(await E8({id:o.item.id,...r}),LG.success(`已更新`)):(await E8(r),LG.success(`已添加`)),s({open:!1,item:null}),c.resetFields(),l()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}finally{a(!1)}},d=async e=>{try{await D8(e),LG.success(`已删除`),l()}catch(e){LG.error(e?.message||`删除失败`)}},f=e=>{s({open:!0,item:e||null});let t=``,n=``,r=[];if(e){try{let r=JSON.parse(e.skills);if(Array.isArray(r))for(let e of r)(e.key===`文图理解生成视频提示词`||e.key===`文图理解`)&&(t=e.label||``),e.key===`文图理解生成图片提示词`&&(n=e.label||``)}catch{}r=e.optionGroups.length>0?e.optionGroups:[{name:``,options:[]}]}e?c.setFieldsValue({key:e.key,label:e.label,icon:e.icon||``,description:e.description,skills_wentutujie:t,skills_wentutujie_image:n,optionGroups:r,is_active:e.isActive,sort_order:e.sortOrder}):(c.resetFields(),c.setFieldsValue({is_active:!0,sort_order:0,optionGroups:[{name:``,options:[]}]}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(W1,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`行业与技能配置`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 个行业`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>f(),style:{borderRadius:8},children:`添加行业`})]}),(0,Q.jsx)(bQ,{columns:[{title:`行业`,key:`industry`,width:180,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsx)(`div`,{style:{width:36,height:36,borderRadius:10,background:`#f1f5f9`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:18,color:`#6366f1`,flexShrink:0},children:b7(t.icon)}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.label}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.key})]})]})},{title:`描述`,dataIndex:`description`,ellipsis:!0},{title:`选项配置`,key:`optionGroups`,width:260,render:(e,t)=>!t.optionGroups||t.optionGroups.length===0?(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#cbd5e1`},children:`未配置`}):(0,Q.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:t.optionGroups.map((e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,Q.jsx)(NQ,{color:`blue`,style:{margin:0,fontSize:11},children:e.name}),(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#64748b`},children:[e.options.slice(0,3).join(`、`),e.options.length>3?`...${e.options.length}项`:``]})]},t))})},{title:`文图理解生成视频提示词`,dataIndex:`skills`,ellipsis:!0,render:e=>{try{let t=JSON.parse(e);if(Array.isArray(t)){let e=t.find(e=>e.key===`文图理解生成视频提示词`||e.key===`文图理解`);if(e)return(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{fontSize:12},children:e.label})}}catch{}return(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`})}},{title:`文图理解生成图片提示词`,dataIndex:`skills`,ellipsis:!0,render:e=>{try{let t=JSON.parse(e);if(Array.isArray(t)){let e=t.find(e=>e.key===`文图理解生成图片提示词`);if(e)return(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{fontSize:12},children:e.label})}}catch{}return(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`})}},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>f(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除该行业?`,onConfirm:()=>d(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(W1,{}),o.item?`编辑行业`:`添加行业`]}),open:o.open,onOk:u,onCancel:()=>{s({open:!1,item:null}),c.resetFields()},okText:`保存`,cancelText:`取消`,width:640,confirmLoading:i,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`key`,label:`行业标识`,style:{flex:1},rules:[{required:!0,message:`请输入标识`}],children:(0,Q.jsx)(hW,{placeholder:`例如:ecommerce`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`label`,label:`行业名称`,style:{flex:1},rules:[{required:!0,message:`请输入名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:电商`,size:`large`})})]}),(0,Q.jsx)(X.Item,{name:`icon`,label:`行业图标`,children:(0,Q.jsx)(Tne,{})}),(0,Q.jsx)(X.Item,{name:`description`,label:`行业描述`,children:(0,Q.jsx)(hW.TextArea,{rows:2,placeholder:`行业描述`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`skills_wentutujie`,label:`文图理解生成视频提示词`,extra:`用于LLM优化视频提示词的系统指令,根据行业特点引导AI理解文案与画面的关系`,children:(0,Q.jsx)(hW.TextArea,{rows:3,placeholder:`请输入文图理解生成视频提示词,例如: 你是一位专业的电商视频文案专家,擅长将产品卖点转化为视觉语言`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`skills_wentutujie_image`,label:`文图理解生成图片提示词`,extra:`用于LLM优化图片提示词的系统指令,根据行业特点引导AI理解文案与画面的关系`,children:(0,Q.jsx)(hW.TextArea,{rows:3,placeholder:`请输入文图理解生成图片提示词,例如: -你是一位专业的电商图片文案专家,擅长将产品卖点转化为图片生成提示词`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{marginBottom:8},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:`行业选项配置`}),(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`添加选项组,每组包含名称和多个选项,前台将显示为下拉选择`})]}),(0,Q.jsx)(X.List,{name:`optionGroups`,children:(e,{add:t,remove:n})=>(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8,marginBottom:16},children:[e.map(({key:e,name:t,...r})=>(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`flex-start`,padding:`10px 12px`,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,gap:8},children:[(0,Q.jsx)(X.Item,{...r,name:[t,`name`],label:`选项名称`,style:{marginBottom:0},rules:[{required:!0,message:`请输入选项名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:视频风格`,size:`middle`,style:{borderRadius:8}})}),(0,Q.jsx)(X.Item,{...r,name:[t,`options`],label:`选项内容`,style:{marginBottom:0},children:(0,Q.jsx)(RC,{mode:`tags`,size:`middle`,placeholder:`输入选项后回车添加`,style:{borderRadius:8},tokenSeparators:[`,`,`,`,`、`]})})]}),(0,Q.jsx)(D4,{onClick:()=>n(t),style:{color:`#ef4444`,fontSize:16,marginTop:34,cursor:`pointer`,flexShrink:0}})]},e)),(0,Q.jsx)(qE,{type:`dashed`,onClick:()=>t(),block:!0,icon:(0,Q.jsx)(TL,{}),style:{borderRadius:8,height:36},children:`添加选项组`})]})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`is_active`,label:`启用状态`,valuePropName:`checked`,initialValue:!0,style:{flex:1},children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{name:`sort_order`,label:`排序`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(hW,{type:`number`,size:`large`})})]})]})})]})};function x7(e){if(Array.isArray(e))return e;if(typeof e==`string`)try{return JSON.parse(e)}catch{return[]}return[]}var wne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,engine:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await E8()).map(e=>({...e,supportedRatios:x7(e.supportedRatios),supportedResolutions:x7(e.supportedResolutions),supportedDurations:x7(e.supportedDurations)})))}catch{LG.error(`加载视频引擎失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={name:e.name,provider:e.provider,api_base:e.apiBase,api_key:e.apiKey,model_name:e.modelName,supported_ratios:JSON.stringify(e.supportedRatios||[]),supported_resolutions:JSON.stringify(e.supportedResolutions||[]),supported_durations:JSON.stringify(e.supportedDurations||[]),is_active:e.isActive??!0,priority:e.priority??0};i.engine?(await D8({id:i.engine.id,...t}),LG.success(`已更新`)):(await D8(t),LG.success(`已添加`)),a({open:!1,engine:null}),o.resetFields(),s()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},l=async e=>{try{await O8(e),LG.success(`已删除`),s()}catch{LG.error(`删除失败`)}},u=e=>{a({open:!0,engine:e||null}),e?o.setFieldsValue(e):(o.resetFields(),o.setFieldsValue({isActive:!0,priority:0,supportedRatios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],supportedResolutions:[`480p`,`720p`,`1080p`],supportedDurations:[4,5,6,7,8,9,10,11,12,13,14,15]}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`视频引擎配置`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 个引擎`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加引擎`})]}),(0,Q.jsx)(bQ,{columns:[{title:`引擎名称`,key:`name`,width:180,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsx)(`div`,{style:{width:36,height:36,borderRadius:8,background:t.isActive?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`linear-gradient(135deg, #94a3b8, #cbd5e1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:16},children:(0,Q.jsx)(J4,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.provider})]})]})},{title:`支持比例`,dataIndex:`supportedRatios`,width:200,render:e=>(0,Q.jsx)(VV,{size:2,wrap:!0,children:e.map(e=>(0,Q.jsx)(NQ,{children:e},e))})},{title:`支持分辨率`,dataIndex:`supportedResolutions`,width:150,render:e=>(0,Q.jsx)(VV,{size:2,wrap:!0,children:e.map(e=>(0,Q.jsx)(NQ,{color:`blue`,children:e},e))})},{title:`支持时长`,dataIndex:`supportedDurations`,width:120,render:e=>(0,Q.jsx)(NQ,{color:`orange`,children:e?.length?`${Math.min(...e)}-${Math.max(...e)}s`:`-`})},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J4,{}),i.engine?`编辑引擎`:`添加引擎`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,engine:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:620,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`引擎名称`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`Seedance 2.0`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`provider`,label:`提供商`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`ark`,label:`火山引擎 (Ark)`}]})})]}),(0,Q.jsx)(X.Item,{name:`apiBase`,label:`API基础地址`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`apiKey`,label:`API Key`,children:(0,Q.jsx)(hW.Password,{placeholder:`sk-****`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`modelName`,label:`模型名称`,children:(0,Q.jsx)(hW,{placeholder:`doubao-seedance-2-0-260128`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`supportedRatios`,label:`支持比例`,children:(0,Q.jsx)(RC,{mode:`multiple`,size:`large`,options:[{value:`16:9`,label:`16:9 (横屏)`},{value:`4:3`,label:`4:3 (标准)`},{value:`1:1`,label:`1:1 (方形)`},{value:`3:4`,label:`3:4 (竖版)`},{value:`9:16`,label:`9:16 (竖屏)`},{value:`21:9`,label:`21:9 (超宽)`}]})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`supportedResolutions`,label:`支持分辨率`,style:{flex:1},children:(0,Q.jsx)(RC,{mode:`multiple`,size:`large`,options:[{value:`480p`},{value:`720p`},{value:`1080p`}]})}),(0,Q.jsx)(X.Item,{name:`supportedDurations`,label:`支持时长(秒)`,style:{flex:1},children:(0,Q.jsx)(RC,{mode:`multiple`,size:`large`,options:Array.from({length:12},(e,t)=>({value:t+4,label:`${t+4}秒`}))})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`priority`,label:`优先级`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:0,label:`0 (默认)`},{value:1,label:`1`},{value:2,label:`2`},{value:3,label:`3`},{value:5,label:`5`},{value:10,label:`10 (最高)`}]})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,style:{paddingTop:30},children:(0,Q.jsx)(Mq,{})})]})]})})]})};function Tne(e){if(Array.isArray(e))return e;if(typeof e==`string`)try{return JSON.parse(e)}catch{return[]}return[]}function Ene(e){if(e&&typeof e==`object`&&!Array.isArray(e))return e;if(typeof e==`string`)try{let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:{}}catch{return{}}return{}}var S7={"2K":{"1:1":`2048×2048`,"4:3":`2304×1728`,"3:4":`1728×2304`,"16:9":`2560×1440`,"9:16":`1600×2848`,"3:2":`2496×1664`,"2:3":`1664×2496`,"21:9":`3024×1296`},"4K":{"1:1":`4096×4096`,"4:3":`4608×3456`,"3:4":`3520×4704`,"16:9":`5404×3040`,"9:16":`3040×5504`,"3:2":`4992×3328`,"2:3":`3328×4992`,"21:9":`6197×2656`}},C7=[`1:1`,`4:3`,`3:4`,`16:9`,`9:16`,`3:2`,`2:3`,`21:9`],Dne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,engine:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await k8()).map(e=>({...e,supportedModels:Tne(e.supportedModels),supportedSizes:Ene(e.supportedSizes)})))}catch{LG.error(`加载图片引擎失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={};for(let n of[`2K`,`4K`]){let r=e[`size_${n}`]||[];if(r.length>0){t[n]={};for(let e of r)t[n][e]=S7[n]?.[e]||e}}let n={name:e.name,provider:e.provider,api_base:e.apiBase,api_key:e.apiKey,model_name:e.modelName,supported_models:JSON.stringify(e.supportedModels||[]),supported_sizes:JSON.stringify(t),default_size:e.defaultSize||`2K`,generate_url:e.generateUrl||``,is_active:e.isActive??!0,priority:e.priority??0};i.engine?(await A8({id:i.engine.id,...n}),LG.success(`已更新`)):(await A8(n),LG.success(`已添加`)),a({open:!1,engine:null}),o.resetFields(),s()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},l=async e=>{try{await j8(e),LG.success(`已删除`),s()}catch{LG.error(`删除失败`)}},u=e=>{if(a({open:!0,engine:e||null}),e){let t={};for(let n of[`2K`,`4K`])t[`size_${n}`]=Object.keys(e.supportedSizes?.[n]||{});o.setFieldsValue({...e,...t})}else o.resetFields(),o.setFieldsValue({isActive:!0,priority:0,supportedModels:[`doubao-seedream-5-0-260128`],defaultSize:`2K`,size_2K:C7,size_4K:C7})};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(H4,{style:{fontSize:18,color:`#10b981`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`图片引擎配置`}),(0,Q.jsxs)(NQ,{color:`green`,children:[e.length,` 个引擎`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加引擎`})]}),(0,Q.jsx)(bQ,{columns:[{title:`引擎名称`,key:`name`,width:180,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsx)(`div`,{style:{width:36,height:36,borderRadius:8,background:t.isActive?`linear-gradient(135deg, #10b981, #059669)`:`linear-gradient(135deg, #94a3b8, #cbd5e1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:16},children:(0,Q.jsx)(H4,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.modelName})]})]})},{title:`2K 支持比例`,key:`sizes_2k`,width:260,render:(e,t)=>{let n=Object.keys(t.supportedSizes?.[`2K`]||{});return n.length===0?(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`}):(0,Q.jsx)(VV,{size:2,wrap:!0,children:n.map(e=>(0,Q.jsxs)(NQ,{color:`blue`,children:[e,` `,t.supportedSizes[`2K`][e]]},e))})}},{title:`4K 支持比例`,key:`sizes_4k`,width:260,render:(e,t)=>{let n=Object.keys(t.supportedSizes?.[`4K`]||{});return n.length===0?(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`}):(0,Q.jsx)(VV,{size:2,wrap:!0,children:n.map(e=>(0,Q.jsxs)(NQ,{color:`purple`,children:[e,` `,t.supportedSizes[`4K`][e]]},e))})}},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:1e3}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(H4,{}),i.engine?`编辑引擎`:`添加引擎`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,engine:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:680,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`引擎名称`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`豆包文生图`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`provider`,label:`提供商`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`ark`,label:`火山引擎 (Ark)`}]})})]}),(0,Q.jsx)(X.Item,{name:`apiBase`,label:`API基础地址`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`apiKey`,label:`API Key`,children:(0,Q.jsx)(hW.Password,{placeholder:`sk-****`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`modelName`,label:`默认模型`,children:(0,Q.jsx)(hW,{placeholder:`doubao-seedream-5-0-260128`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`supportedModels`,label:`支持模型列表`,children:(0,Q.jsx)(RC,{mode:`tags`,size:`large`,placeholder:`输入模型ID后回车添加`,tokenSeparators:[`,`,`,`],options:[{value:`doubao-seedream-5-0-260128`}]})}),(0,Q.jsxs)(`div`,{style:{background:`#f8f9fc`,borderRadius:10,padding:16,marginBottom:8},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`尺寸配置`}),(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`勾选每个档位支持的比例,前台选择后传对应像素值给SDK`})]}),[`2K`,`4K`].map(e=>(0,Q.jsxs)(`div`,{style:{background:`#fafbfc`,borderRadius:10,padding:`12px 16px`,marginBottom:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13,color:e===`2K`?`#3b82f6`:`#8b5cf6`},children:e}),(0,Q.jsx)(X.Item,{name:`size_${e}`,style:{marginTop:8,marginBottom:0},children:(0,Q.jsx)(oz.Group,{style:{width:`100%`},children:(0,Q.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, 1fr)`,gap:`6px 0`},children:C7.map(t=>(0,Q.jsxs)(oz,{value:t,style:{fontSize:12},children:[t,` `,(0,Q.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:11},children:S7[e]?.[t]})]},t))})})})]},e)),(0,Q.jsx)(X.Item,{name:`defaultSize`,label:`默认尺寸档位`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`2K`,label:`2K`},{value:`4K`,label:`4K`}]})}),(0,Q.jsx)(X.Item,{name:`generateUrl`,label:`生成接口地址`,children:(0,Q.jsx)(hW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3/images/generations`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`priority`,label:`优先级`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:0,label:`0 (默认)`},{value:1,label:`1`},{value:2,label:`2`},{value:3,label:`3`},{value:5,label:`5`},{value:10,label:`10 (最高)`}]})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,style:{paddingTop:30},children:(0,Q.jsx)(Mq,{})})]})]})})]})},One=[`2K`,`4K`],kne=[`480p`,`720p`,`1080p`],Ane=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)({open:!1,ratio:null}),[c]=X.useForm(),[l,u]=(0,S.useState)(10),[d,f]=(0,S.useState)(null),[p,m]=(0,S.useState)(!1),h=X.useWatch(`genType`,c)||`video`,g=X.useWatch(`modelConfigId`,c),_=async()=>{a(!0);try{let[e,n,i]=await Promise.all([M8(),_8(),h5()]),a=(i?.engine?.image||[]).map(e=>({...e,genType:`image`})),o=(i?.engine?.video||[]).map(e=>({...e,genType:`video`}));t(e),r([...o,...a]);let s=n.find(e=>e.key===`text_credits_per_1000_tokens`);s&&(u(Number(s.value)||10),f({id:s.id}))}catch{LG.error(`加载积分比例失败`)}finally{a(!1)}};(0,S.useEffect)(()=>{_()},[]);let v=(0,S.useMemo)(()=>n.filter(e=>e.genType===h).map(e=>({value:e.id,label:`${e.name}${e.modelName?`(${e.modelName})`:``}`})),[n,h]),y=(0,S.useMemo)(()=>n.find(e=>e.id===g&&e.genType===h),[n,h,g]),b=(0,S.useMemo)(()=>{if(h===`image`){let e=y?.supportedSizes?Object.keys(y.supportedSizes):[];return(e.length?e:One).map(e=>({value:e,label:e}))}let e=y?.supportedResolutions||[];return(e.length?e:kne).map(e=>({value:e,label:e}))},[h,y]),x=(e,t)=>n.find(n=>n.id===e&&(!t||n.genType===t))?.name||e,C=async()=>{try{let e=await c.validateFields(),t={model_config_id:e.modelConfigId,gen_type:e.genType,resolution:e.resolution,ratio:e.ratio,base_credits:e.baseCredits,per_second_credits:e.genType===`image`?0:e.perSecondCredits||0};o.ratio?(await N8({id:o.ratio.id,...t}),LG.success(`已更新`)):(await N8(t),LG.success(`已添加`)),s({open:!1,ratio:null}),c.resetFields(),_()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},w=async e=>{try{await P8(e),LG.success(`已删除`),_()}catch{LG.error(`删除失败`)}},T=async()=>{if(d){m(!0);try{await v8(d.id,String(l)),LG.success(`文字积分费率已更新`)}catch(e){LG.error(e?.message||`保存失败`)}finally{m(!1)}}},E=e=>{s({open:!0,ratio:e||null}),e?c.setFieldsValue({modelConfigId:e.modelConfigId,genType:e.genType===`image`?`image`:`video`,resolution:e.resolution,ratio:e.ratio,baseCredits:e.baseCredits,perSecondCredits:e.perSecondCredits}):(c.resetFields(),c.setFieldsValue({genType:`video`,ratio:1,baseCredits:60,perSecondCredits:2}))};return(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(N2,{style:{fontSize:18,color:`#f59e0b`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`文字积分费率`})]}),(0,Q.jsx)(qE,{type:`primary`,loading:p,onClick:T,style:{borderRadius:8},children:`保存`})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{display:`block`,marginBottom:16,fontSize:13},children:`文字积分计算公式:ceil(总token数 x 费率 / 1000),最低1积分`}),(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,Q.jsx)(Z.Text,{children:`每1000 token消耗积分:`}),(0,Q.jsxs)(VV.Compact,{style:{width:160},children:[(0,Q.jsx)(oB,{min:0,max:1e3,step:.01,value:l,onChange:e=>u(e||0),size:`large`,style:{width:`100%`}}),(0,Q.jsx)(Z.Text,{children:`积分`})]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[`示例:1000 token = `,l,` 积分,500 token = `,(500*l/1e3).toFixed(4),` 积分`]})]})]}),(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w0,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`积分比例配置`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 条规则`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>E(),style:{borderRadius:8},children:`添加比例`})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{display:`block`,marginBottom:16,fontSize:13},children:`视频积分公式:(基础积分 + 每秒积分 x 视频时长) x 模型倍率;图片积分公式:基础积分 x 模型倍率`}),(0,Q.jsx)(bQ,{columns:[{title:`类型`,dataIndex:`genType`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e===`image`?`cyan`:`orange`,children:e===`image`?`图片`:`视频`})},{title:`引擎`,dataIndex:`modelConfigId`,width:180,render:(e,t)=>(0,Q.jsx)(NQ,{color:t.genType===`image`?`cyan`:`purple`,children:x(e,t.genType)})},{title:`分辨率/尺寸`,dataIndex:`resolution`,width:110,render:e=>(0,Q.jsx)(NQ,{color:{"480p":`blue`,"720p":`blue`,"1080p":`blue`,"4K":`green`,"2K":`green`}[e]||`default`,children:e})},{title:`倍率`,dataIndex:`ratio`,width:100,sorter:(e,t)=>e.ratio-t.ratio,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:e>=2?`#ef4444`:e>=1.5?`#f59e0b`:`#10b981`},children:[`x`,e]})},{title:`基础积分`,dataIndex:`baseCredits`,width:100,render:e=>(0,Q.jsxs)(Z.Text,{children:[e,` 积分`]})},{title:`每秒积分`,dataIndex:`perSecondCredits`,width:100,render:(e,t)=>(0,Q.jsx)(Z.Text,{children:t.genType===`image`?`-`:`${e} 积分/秒`})},{title:`示例计算`,key:`example`,width:120,render:(e,t)=>{let n;return n=t.genType===`image`?Math.round(t.baseCredits*t.ratio):Math.round((t.baseCredits+t.perSecondCredits*15)*t.ratio),(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:[n,` 积分`]})}},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>E(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>w(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:!1,scroll:{x:860}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w0,{}),o.ratio?`编辑比例`:`添加比例`]}),open:o.open,onOk:C,onCancel:()=>{s({open:!1,ratio:null}),c.resetFields()},okText:`保存`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`genType`,label:`生成类型`,rules:[{required:!0,message:`请选择生成类型`}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`video`,label:`视频`},{value:`image`,label:`图片`}],onChange:()=>{c.setFieldsValue({modelConfigId:void 0,resolution:void 0})}})}),(0,Q.jsx)(X.Item,{name:`modelConfigId`,label:`引擎`,rules:[{required:!0,message:`请选择引擎`}],children:(0,Q.jsx)(RC,{size:`large`,placeholder:`请选择引擎`,options:v,showSearch:!0,optionFilterProp:`label`,onChange:()=>c.setFieldsValue({resolution:void 0})})}),(0,Q.jsx)(X.Item,{name:`resolution`,label:h===`image`?`图片尺寸`:`分辨率`,rules:[{required:!0,message:h===`image`?`请选择图片尺寸`:`请选择分辨率`}],children:(0,Q.jsx)(RC,{size:`large`,placeholder:h===`image`?`请选择图片尺寸`:`请选择分辨率`,options:b})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`ratio`,label:`倍率`,style:{flex:1},rules:[{required:!0,message:`请输入倍率`}],children:(0,Q.jsx)(oB,{min:.1,max:10,step:.1,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`baseCredits`,label:`基础积分`,style:{flex:1},rules:[{required:!0,message:`请输入基础积分`}],children:(0,Q.jsx)(oB,{min:0,max:1e3,style:{width:`100%`},size:`large`})}),h!==`image`&&(0,Q.jsx)(X.Item,{name:`perSecondCredits`,label:`每秒积分`,style:{flex:1},rules:[{required:!0,message:`请输入每秒积分`}],children:(0,Q.jsx)(oB,{min:0,max:100,style:{width:`100%`},size:`large`})})]})]})})]})},w7={HomeOutlined:(0,Q.jsx)(Z2,{}),PlayCircleOutlined:(0,Q.jsx)(J4,{}),WalletOutlined:(0,Q.jsx)(N6,{}),RobotOutlined:(0,Q.jsx)(o3,{}),SettingOutlined:(0,Q.jsx)(D3,{}),BellOutlined:(0,Q.jsx)(f0,{}),UserOutlined:(0,Q.jsx)(D6,{}),AppstoreOutlined:(0,Q.jsx)(G1,{}),FileTextOutlined:(0,Q.jsx)(KV,{}),StarOutlined:(0,Q.jsx)(Z3,{}),HeartOutlined:(0,Q.jsx)(H2,{}),CameraOutlined:(0,Q.jsx)(D0,{}),DashboardOutlined:(0,Q.jsx)(r2,{}),CalculatorOutlined:(0,Q.jsx)(w0,{}),DollarOutlined:(0,Q.jsx)(l2,{}),GiftOutlined:(0,Q.jsx)(I2,{}),ThunderboltOutlined:(0,Q.jsx)(l6,{}),FireOutlined:(0,Q.jsx)(D2,{}),CloudOutlined:(0,Q.jsx)(z0,{}),SmileOutlined:(0,Q.jsx)(H3,{}),TrophyOutlined:(0,Q.jsx)(h6,{}),RocketOutlined:(0,Q.jsx)(l3,{}),BulbOutlined:(0,Q.jsx)(x0,{}),CodeOutlined:(0,Q.jsx)(G0,{}),PictureOutlined:(0,Q.jsx)(H4,{}),VideoCameraOutlined:(0,Q.jsx)(A6,{}),AudioOutlined:(0,Q.jsx)(r0,{}),MailOutlined:(0,Q.jsx)(v4,{}),PhoneOutlined:(0,Q.jsx)(z4,{}),GlobalOutlined:(0,Q.jsx)(z2,{}),ShoppingCartOutlined:(0,Q.jsx)(A3,{}),TeamOutlined:(0,Q.jsx)(o6,{}),BarChartOutlined:(0,Q.jsx)(l0,{}),PieChartOutlined:(0,Q.jsx)(G4,{}),LineChartOutlined:(0,Q.jsx)(o4,{}),SecurityScanOutlined:(0,Q.jsx)(x3,{}),ApiOutlined:(0,Q.jsx)(H1,{}),DatabaseOutlined:(0,Q.jsx)(o2,{}),CloudServerOutlined:(0,Q.jsx)(H0,{}),MenuOutlined:(0,Q.jsx)(w4,{})},jne=Object.keys(w7).map(e=>({value:e,label:(0,Q.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[w7[e],` `,e.replace(`Outlined`,``)]})})),Mne={page:`blue`,group:`purple`},Nne={page:`页面`,group:`分组`},Pne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)(`frontend`),[o,s]=(0,S.useState)({open:!1,menu:null}),[c]=X.useForm(),l=async()=>{r(!0);try{t(await W8())}catch{}r(!1)};(0,S.useEffect)(()=>{l()},[]);let u=async()=>{try{let e=await c.validateFields(),t={label:e.label,path:e.path||``,icon:e.icon||``,sort_order:e.sortOrder??0,is_active:e.isActive??!0,parent_id:e.parentId||null,menu_type:e.menuType||`page`,menu_target:e.menuTarget||`frontend`,is_default:e.isDefault??!1};o.menu?.id?await G8({...t,id:o.menu.id}):await G8(t),LG.success(o.menu?.id?`菜单已更新`:`菜单已添加`),s({open:!1,menu:null}),c.resetFields(),l()}catch{}},d=async e=>{try{await K8(e),LG.success(`菜单已删除`),l()}catch(e){LG.error(e?.message||`删除失败`)}},f=t=>{s({open:!0,menu:t||null}),t?c.setFieldsValue({label:t.label,path:t.path,icon:t.icon,sortOrder:t.sortOrder??0,isActive:t.isActive??!0,parentId:t.parentId??``,menuType:t.menuType??`page`,menuTarget:t.menuTarget??`frontend`,isDefault:t.isDefault??!1}):(c.resetFields(),c.setFieldsValue({icon:`HomeOutlined`,sortOrder:e.length,isActive:!0,menuType:`page`,menuTarget:i,isDefault:!1}))},p=e.filter(e=>{let t=e.menuTarget??`frontend`;return t===i||t===`both`}),m=[{value:``,label:`顶级菜单`},...p.filter(e=>e.menuType===`group`).map(e=>({value:e.id,label:e.label}))],h=[],g=p.filter(e=>!e.parentId),_={};p.filter(e=>e.parentId).forEach(e=>{let t=e.parentId;_[t]||(_[t]=[]),_[t].push(e)}),g.sort((e,t)=>(e.sortOrder??0)-(t.sortOrder??0)).forEach(e=>{h.push({...e,_depth:0}),(_[e.id]||[]).sort((e,t)=>(e.sortOrder??0)-(t.sortOrder??0)).forEach(e=>{h.push({...e,_depth:1})})});let v=[{title:`排序`,dataIndex:`sortOrder`,width:60},{title:`菜单名称`,key:`label`,width:180,render:(e,t)=>(0,Q.jsxs)(`span`,{style:{paddingLeft:t._depth*20,fontWeight:t._depth===0?600:400},children:[t._depth===1&&(0,Q.jsx)(`span`,{style:{color:`#cbd5e1`,marginRight:4},children:`└`}),t.label]})},{title:`路由路径`,dataIndex:`path`,width:160,render:e=>e||(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})},{title:`图标`,dataIndex:`icon`,width:100,render:e=>e&&w7[e]?(0,Q.jsx)(`span`,{style:{fontSize:16,color:`#6366f1`},children:w7[e]}):`-`},{title:`类型`,dataIndex:`menuType`,width:80,render:e=>(0,Q.jsx)(NQ,{color:Mne[e]||`default`,children:Nne[e]||e})},{title:`状态`,dataIndex:`isActive`,width:70,render:e=>(0,Q.jsx)(`span`,{style:{color:e?`#22c55e`:`#94a3b8`},children:e?`启用`:`停用`})},...i===`frontend`?[{title:`默认显示`,dataIndex:`isDefault`,width:80,render:e=>e?(0,Q.jsx)(NQ,{color:`green`,children:`默认`}):(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})}]:[],{title:`操作`,key:`action`,width:150,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>f(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除该菜单?`,onConfirm:()=>d(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}];return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`菜单配置`})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>f(),style:{borderRadius:8},children:`添加菜单`})]}),(0,Q.jsx)(bR,{activeKey:i,onChange:a,items:[{key:`frontend`,label:`前台菜单`},{key:`admin`,label:`后台菜单`}]}),(0,Q.jsx)(bQ,{columns:v,dataSource:h,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w4,{}),o.menu?.id?`编辑菜单`:`添加菜单`]}),open:o.open,onOk:u,onCancel:()=>{s({open:!1,menu:null}),c.resetFields()},okText:`确认`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`label`,label:`菜单名称`,rules:[{required:!0,message:`请输入菜单名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:我的项目`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`path`,label:`路由路径`,tooltip:`分组类型可留空`,children:(0,Q.jsx)(hW,{placeholder:`例如:/projects(分组可留空)`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`menuType`,label:`菜单类型`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`page`,label:`页面`},{value:`group`,label:`分组`}]})}),(0,Q.jsx)(X.Item,{name:`menuTarget`,label:`适用端`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`frontend`,label:`前台`},{value:`admin`,label:`后台`},{value:`both`,label:`两者`}]})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`icon`,label:`图标`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:jne})}),(0,Q.jsx)(X.Item,{name:`sortOrder`,label:`排序`,style:{flex:1},children:(0,Q.jsx)(oB,{min:0,max:100,style:{width:`100%`},size:`large`,placeholder:`默认0`})})]}),(0,Q.jsx)(X.Item,{name:`parentId`,label:`上级菜单`,children:(0,Q.jsx)(RC,{size:`large`,options:m,allowClear:!0,placeholder:`顶级菜单`})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用`,valuePropName:`checked`,children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.menuTarget!==t.menuTarget,children:({getFieldValue:e})=>e(`menuTarget`)===`admin`?null:(0,Q.jsx)(X.Item,{name:`isDefault`,label:`新用户默认显示`,valuePropName:`checked`,tooltip:`开启后,新注册用户默认显示此菜单`,children:(0,Q.jsx)(Mq,{})})})]})})]})},Fne={normal:`blue`,gift:`green`,promo:`purple`},Ine={normal:`常规`,gift:`赠送`,promo:`促销`},Lne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,item:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await Q8()).map(e=>({id:e.id,name:e.name,credits:e.credits,price:e.price,bonusCredits:e.bonus_credits??e.bonusCredits??0,totalCredits:e.total_credits??e.totalCredits??e.credits,description:e.description,packageType:e.package_type??e.packageType??`normal`,isGift:e.is_gift??e.isGift??!1,isActive:e.is_active??e.isActive??!0,sortOrder:e.sort_order??e.sortOrder??0})))}catch{LG.error(`加载充值套餐失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={name:e.name,credits:e.credits,price:e.price,bonus_credits:e.bonusCredits||0,description:e.description||null,package_type:e.packageType||`normal`,is_gift:e.isGift||!1,is_active:e.isActive??!0,sort_order:e.sortOrder??0};i.item?.id?(await $8({id:i.item.id,...t}),LG.success(`已更新`)):(await $8(t),LG.success(`已添加`)),a({open:!1,item:null}),o.resetFields(),s()}catch{}},l=async e=>{try{await e5(e),LG.success(`已删除`),s()}catch(e){LG.error(e?.message||`删除失败`)}},u=e=>{a({open:!0,item:e||null}),e?o.setFieldsValue({name:e.name,credits:e.credits,price:e.price,bonusCredits:e.bonusCredits,description:e.description,packageType:e.packageType,isGift:e.isGift,isActive:e.isActive,sortOrder:e.sortOrder}):(o.resetFields(),o.setFieldsValue({isActive:!0,sortOrder:0,packageType:`normal`,bonusCredits:0,isGift:!1}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(I2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`充值套餐管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 个套餐`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加套餐`})]}),(0,Q.jsx)(bQ,{columns:[{title:`套餐名称`,key:`name`,width:160,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),t.description&&(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.description})]})},{title:`基础积分`,dataIndex:`credits`,width:100,render:e=>(0,Q.jsx)(Z.Text,{children:e.toLocaleString()})},{title:`赠送积分`,dataIndex:`bonusCredits`,width:100,render:e=>e>0?(0,Q.jsxs)(NQ,{color:`green`,children:[`+`,e.toLocaleString()]}):(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})},{title:`总积分`,key:`total`,width:100,render:(e,t)=>(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:(t.credits+t.bonusCredits).toLocaleString()})},{title:`价格(元)`,dataIndex:`price`,width:100,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,children:[`¥`,e]})},{title:`类型`,dataIndex:`packageType`,width:80,render:e=>(0,Q.jsx)(NQ,{color:Fne[e]||`default`,children:Ine[e]||e})},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(I2,{}),i.item?`编辑套餐`:`添加套餐`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,item:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`套餐名称`,rules:[{required:!0,message:`请输入套餐名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:进阶包`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`credits`,label:`基础积分`,rules:[{required:!0,message:`请输入积分`}],style:{flex:1},children:(0,Q.jsx)(oB,{min:1,placeholder:`2000`,size:`large`,style:{width:`100%`}})}),(0,Q.jsx)(X.Item,{name:`price`,label:`价格(元)`,rules:[{required:!0,message:`请输入价格`}],style:{flex:1},children:(0,Q.jsx)(oB,{min:.01,step:1,placeholder:`168`,size:`large`,style:{width:`100%`}})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`bonusCredits`,label:`赠送积分`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(oB,{min:0,placeholder:`0`,size:`large`,style:{width:`100%`}})}),(0,Q.jsx)(X.Item,{name:`packageType`,label:`套餐类型`,initialValue:`normal`,style:{flex:1},children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`normal`,label:`常规`},{value:`gift`,label:`赠送`},{value:`promo`,label:`促销`}]})})]}),(0,Q.jsx)(X.Item,{name:`description`,label:`描述`,children:(0,Q.jsx)(hW,{placeholder:`套餐描述(可选)`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,initialValue:!0,style:{flex:1},children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{name:`isGift`,label:`是否赠送`,valuePropName:`checked`,initialValue:!1,style:{flex:1},children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{name:`sortOrder`,label:`排序`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(oB,{size:`large`,style:{width:`100%`}})})]})]})})]})},Rne={POST:`green`,PUT:`blue`,DELETE:`red`},zne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),c=async e=>{a(!0);try{let n=await t5(e||o);t(n.items||[]),r(n.total||0)}catch{LG.error(`加载操作日志失败`)}finally{a(!1)}};return(0,S.useEffect)(()=>{c()},[]),(0,Q.jsx)(`div`,{children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`操作日志`})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>c(),children:`刷新`})]}),(0,Q.jsx)(bQ,{columns:[{title:`操作人`,dataIndex:`username`,width:120,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`操作`,dataIndex:`action`,width:160,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`方法`,dataIndex:`method`,width:80,render:e=>(0,Q.jsx)(NQ,{color:Rne[e]||`default`,children:e})},{title:`路径`,dataIndex:`path`,width:220,ellipsis:!0,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:e})},{title:`时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:20,total:n,showTotal:e=>`共 ${e} 条记录`,onChange:e=>{s(e),c(e)}},scroll:{x:800}})]})})},Bne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(null),[g]=X.useForm(),[_]=X.useForm(),v=async e=>{a(!0);try{let n=await n5(e||o);t(n.items||[]),r(n.total||0)}catch{LG.error(`加载应用管理列表失败`)}finally{a(!1)}},y=async()=>{try{let e=await g.validateFields();await r5({app_id:e.app_id,secret:e.secret,open_type:e.open_type,count:e.count,auth_url:e.auth_url,company:e.company}),LG.success(`创建成功`),l(!1),g.resetFields(),v()}catch(e){LG.error(e?.message||`创建失败`)}},b=async e=>{try{h(await i5(e)),d(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},x=async e=>{try{let t=await i5(e);h(t),_.setFieldsValue({app_id:t.appId,secret:t.secret,open_type:t.openType,count:t.count,auth_url:t.authUrl,company:t.company}),p(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},C=async()=>{if(m)try{let e=await _.validateFields();await a5(m.id,{app_id:e.app_id,secret:e.secret,open_type:e.open_type,count:e.count,auth_url:e.auth_url,company:e.company}),LG.success(`更新成功`),p(!1),_.resetFields(),v()}catch(e){LG.error(e?.message||`更新失败`)}},w=e=>{BG.confirm({title:`确认删除`,content:`确定要删除这个应用管理吗?`,okText:`删除`,okType:`danger`,cancelText:`取消`,onOk:async()=>{try{await o5(e),LG.success(`删除成功`),v()}catch(e){LG.error(e?.message||`删除失败`)}}})};return(0,S.useEffect)(()=>{v()},[]),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`应用管理列表`})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>v(),children:`刷新`}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>l(!0),children:`创建`})]})]}),(0,Q.jsx)(bQ,{columns:[{title:`ID`,dataIndex:`id`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`应用ID`,dataIndex:`appId`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`应用密钥`,dataIndex:`secret`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`开户方式`,dataIndex:`openType`,render:e=>(0,Q.jsx)(Z.Text,{children:{1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`}[e]||e})},{title:`归属公司`,dataIndex:`company`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`授权次数`,dataIndex:`count`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`状态`,dataIndex:`status`,render:e=>(0,Q.jsx)(NQ,{color:e===1?`green`:`red`,children:e===1?`正常`:`禁用`})},{title:`授权URL`,dataIndex:`authUrl`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`创建人`,dataIndex:`createBy`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`创建时间`,dataIndex:`createdAt`,render:e=>(0,Q.jsx)(Z.Text,{children:Z5(e)})},{title:`更新时间`,dataIndex:`updatedAt`,render:e=>(0,Q.jsx)(Z.Text,{children:Z5(e)})},{title:`操作`,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(qU,{}),size:`small`,onClick:()=>b(t.id),children:`详情`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(zQ,{}),size:`small`,onClick:()=>x(t.id),children:`更新`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(IQ,{}),size:`small`,danger:!0,onClick:()=>w(t.id),children:`删除`})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:20,total:n,showTotal:e=>`共 ${e} 条记录`,onChange:e=>{s(e),v(e)}},scroll:{x:800}})]}),(0,Q.jsx)(BG,{title:`创建应用管理`,open:c,onOk:y,onCancel:()=>{l(!1),g.resetFields()},okText:`创建`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:g,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`app_id`,label:`应用ID`,rules:[{required:!0,message:`请输入应用ID`},{max:64,message:`应用ID不能超过64个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用ID`})}),(0,Q.jsx)(X.Item,{name:`secret`,label:`应用密钥`,rules:[{required:!0,message:`请输入应用密钥`},{max:256,message:`应用密钥不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用密钥`})}),(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户方式`,rules:[{required:!0,message:`请选择开户方式`}],children:(0,Q.jsxs)(RC,{placeholder:`请选择开户方式`,children:[(0,Q.jsx)(RC.Option,{value:1,children:`千川`}),(0,Q.jsx)(RC.Option,{value:2,children:`广告`}),(0,Q.jsx)(RC.Option,{value:3,children:`本地推`}),(0,Q.jsx)(RC.Option,{value:4,children:`星图`}),(0,Q.jsx)(RC.Option,{value:5,children:`快手代理商`}),(0,Q.jsx)(RC.Option,{value:6,children:`巨量星图`}),(0,Q.jsx)(RC.Option,{value:7,children:`巨量服务单`}),(0,Q.jsx)(RC.Option,{value:8,children:`腾讯服务单`}),(0,Q.jsx)(RC.Option,{value:9,children:`腾讯营销K2`}),(0,Q.jsx)(RC.Option,{value:10,children:`腾讯营销K3`})]})}),(0,Q.jsx)(X.Item,{name:`count`,label:`最大授权用户数`,initialValue:100,children:(0,Q.jsx)(oB,{min:1,placeholder:`应用最大可以授权多少个用户`})}),(0,Q.jsx)(X.Item,{name:`auth_url`,label:`应用授权链接`,children:(0,Q.jsx)(hW,{placeholder:`请输入应用授权链接`})}),(0,Q.jsx)(X.Item,{name:`company`,label:`应用归属公司名称`,rules:[{max:256,message:`公司名称不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用归属公司名称`})})]})}),(0,Q.jsx)(BG,{title:`应用管理详情`,open:u,onCancel:()=>{d(!1),h(null)},okText:`关闭`,cancelText:`取消`,width:600,children:m&&(0,Q.jsxs)(`div`,{style:{lineHeight:`2`},children:[(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`ID:`}),` `,m.id]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`应用ID:`}),` `,m.appId]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`应用密钥:`}),` `,m.secret]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`开户方式:`}),` `,{1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`}[m.openType]||m.openType]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`归属公司:`}),` `,m.company||`-`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`授权次数:`}),` `,m.count]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`状态:`}),` `,m.status===1?`正常`:`禁用`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`授权URL:`}),` `,m.authUrl||`-`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`创建人:`}),` `,m.createBy]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`创建时间:`}),` `,Z5(m.createdAt)]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`更新时间:`}),` `,Z5(m.updatedAt)]})]})}),(0,Q.jsx)(BG,{title:`更新应用管理`,open:f,onOk:C,onCancel:()=>{p(!1),_.resetFields(),h(null)},okText:`更新`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:_,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`app_id`,label:`应用ID`,rules:[{required:!0,message:`请输入应用ID`},{max:64,message:`应用ID不能超过64个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用ID`})}),(0,Q.jsx)(X.Item,{name:`secret`,label:`应用密钥`,rules:[{required:!0,message:`请输入应用密钥`},{max:256,message:`应用密钥不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用密钥`})}),(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户方式`,rules:[{required:!0,message:`请选择开户方式`}],children:(0,Q.jsxs)(RC,{placeholder:`请选择开户方式`,children:[(0,Q.jsx)(RC.Option,{value:1,children:`千川`}),(0,Q.jsx)(RC.Option,{value:2,children:`广告`}),(0,Q.jsx)(RC.Option,{value:3,children:`本地推`}),(0,Q.jsx)(RC.Option,{value:4,children:`星图`}),(0,Q.jsx)(RC.Option,{value:5,children:`快手代理商`}),(0,Q.jsx)(RC.Option,{value:6,children:`巨量星图`}),(0,Q.jsx)(RC.Option,{value:7,children:`巨量服务单`}),(0,Q.jsx)(RC.Option,{value:8,children:`腾讯服务单`}),(0,Q.jsx)(RC.Option,{value:9,children:`腾讯营销K2`}),(0,Q.jsx)(RC.Option,{value:10,children:`腾讯营销K3`})]})}),(0,Q.jsx)(X.Item,{name:`count`,label:`最大授权用户数`,children:(0,Q.jsx)(oB,{min:1,placeholder:`应用最大可以授权多少个用户`})}),(0,Q.jsx)(X.Item,{name:`auth_url`,label:`应用授权链接`,children:(0,Q.jsx)(hW,{placeholder:`请输入应用授权链接`})}),(0,Q.jsx)(X.Item,{name:`company`,label:`应用归属公司名称`,rules:[{max:256,message:`公司名称不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用归属公司名称`})})]})})]})},T7=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),E7={image:`empty`,video:`empty`,videoCover:`empty`,references:{}},D7={optimizing:{color:`processing`,text:`优化中`,icon:(0,Q.jsx)(xm,{spin:!0})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,Q.jsx)(HB,{})},generating:{color:`warning`,text:`生成中`,icon:(0,Q.jsx)(xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,Q.jsx)(N0,{})},failed:{color:`error`,text:`失败`,icon:(0,Q.jsx)(I0,{})}},O7={image:{text:`图片`,color:`purple`,icon:(0,Q.jsx)(v2,{})},video:{text:`视频`,color:`geekblue`,icon:(0,Q.jsx)(A6,{})}},Vne=e=>/^(https?:)?\/\//i.test(e)||/^(blob|data):/i.test(e),k7=e=>!!e&&/^blob:/i.test(e.trim()),A7=e=>{if(!e)return``;let t=String(e).trim();return t?Vne(t)?t:T7?`${T7}${t.startsWith(`/`)?t:`/${t}`}`:t.startsWith(`/`)?t:`/${t}`:``},j7=e=>e?e.length>12?`${e.slice(0,8)}...`:e:`-`,M7=e=>e?Z5(e):`-`,Hne=e=>e==null||e===``,N7=e=>{if(!e||k7(e))return!1;try{let t=new URL(A7(e),window.location.origin),n=t.searchParams.get(`exp`)||t.searchParams.get(`expires`)||t.searchParams.get(`expire`)||t.searchParams.get(`expires_at`)||t.searchParams.get(`x-expires`);if(!n)return!1;let r=Number(n);if(!Number.isFinite(r))return!1;let i=r>1e10?r:r*1e3;return Date.now()>=i}catch{return!1}},P7=e=>e?k7(e)||N7(e)?`invalid`:`checking`:`empty`,F7=e=>{let t=e.url||e.mediaUrl||e.fileUrl;return typeof t==`string`&&t.trim()?t.trim():void 0},Une=e=>{let t=String(e.type||e.mediaType||e.mimeType||``).toLowerCase(),n=F7(e)?.toLowerCase()||``;return t.includes(`video`)||/\.(mp4|mov|webm|m4v)(\?|$)/i.test(n)?`video`:t.includes(`image`)||/\.(png|jpe?g|webp|gif|bmp|svg)(\?|$)/i.test(n)?`image`:t||`unknown`},I7=(e,t)=>`${t}-${F7(e)||`empty`}`,L7=(e,t=`资源`)=>k7(e)?`本地临时素材已失效`:N7(e)?`${t}链接已超时,请刷新列表或重新搜索后再查看`:`${t}加载失败,请刷新列表或重新搜索后再查看`,R7=({text:e,minHeight:t=240,compact:n=!1,action:r})=>(0,Q.jsxs)(`div`,{style:{width:`100%`,minHeight:n?void 0:t,height:n?`100%`:void 0,borderRadius:n?10:12,background:`#f8f9fc`,border:`1px dashed #cbd5e1`,color:`#64748b`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:n?4:10,textAlign:`center`},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`,fontSize:n?11:13},children:e}),r]}),z7=({label:e,value:t})=>(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:120},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:Hne(t)?`-`:t})]}),Wne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c]=(0,S.useState)(20),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(0),[h,g]=(0,S.useState)(null),[_,v]=(0,S.useState)(E7),[y,b]=(0,S.useState)(!1),x=(0,S.useRef)(null),[C,w]=(0,S.useState)(null),[T,E]=(0,S.useState)(null),D=(0,S.useCallback)(async()=>{a(!0);try{let e=await f5({userId:d.trim()||void 0,status:l||void 0,page:o,pageSize:c});t((e.items||[]).map(e=>({id:e.id,userId:e.userId,username:e.username,projectId:e.projectId,projectName:e.projectName,originalPrompt:e.originalPrompt,optimizedPrompt:e.optimizedPrompt,duration:e.duration,aspectRatio:e.aspectRatio,resolution:e.resolution,status:e.status,videoUrl:e.videoUrl,videoCoverUrl:e.videoCoverUrl,references:e.references,creditsCost:e.creditsCost||0,textCreditsCost:e.textCreditsCost||0,textTokensUsed:e.textTokensUsed||0,videoTokensUsed:e.videoTokensUsed||0,errorMessage:e.errorMessage,createdAt:e.createdAt,generatedAt:e.generatedAt,genType:e.genType,imageSize:e.imageSize,imageUrl:e.imageUrl,imageTokensUsed:e.imageTokensUsed||0,imageProportion:e.imageProportion,imagePx:e.imagePx}))),r(e.total||0)}catch{LG.error(`加载记录失败`)}finally{a(!1)}},[l,d,o,c]);(0,S.useEffect)(()=>{D()},[D,p]),(0,S.useEffect)(()=>{if(!h){v(E7);return}let e=(h.references||[]).reduce((e,t,n)=>{let r=F7(t);return e[I7(t,n)]=P7(r),e},{});x.current&&(x.current.pause(),x.current.currentTime=0),b(!1),v({image:P7(h.imageUrl),video:P7(h.videoUrl),videoCover:P7(h.videoCoverUrl),references:e})},[h]);let O=()=>{s(1),m(e=>e+1)},k=(0,S.useCallback)(e=>{g(e)},[]),A=()=>{x.current&&x.current.pause(),b(!1),g(null)},j=e=>{v(t=>({...t,...e}))},M=(e,t)=>{v(n=>({...n,references:{...n.references,[e]:t}}))},N=(e,t=`素材`)=>{if(!e){LG.warning(`${t}链接为空,暂无法查看`);return}if(k7(e)){LG.warning(`本地临时素材已失效,暂无法查看`);return}if(N7(e)){LG.warning(`${t}链接已超时,请刷新列表或重新搜索后再查看`);return}window.open(A7(e),`_blank`,`noopener,noreferrer`)},P=()=>{if(h?.videoUrl){if(N7(h.videoUrl)){j({video:`invalid`}),LG.warning(`视频链接已超时,请刷新列表或重新搜索后再查看`);return}b(!0),window.setTimeout(()=>{x.current?.play().catch(()=>{b(!1),j({video:`invalid`}),LG.warning(`视频播放失败,请确认资源链接是否仍然有效`)})},0)}},F=async(e,t,n)=>{w(e);try{await p5(e,t,n),LG.success(`状态已更新`),D()}catch(e){LG.error(e?.message||`更新失败`)}finally{w(null)}},I=async()=>{if(T){w(T.record.id);try{await m5(T.record.id,T.ratio,T.resolution,T.image_size),LG.success(`已提交${T.record.genType===`video`?`视频`:`图片`}生成`),E(null),D()}catch(e){LG.error(e?.message||`生成失败`)}finally{w(null)}}},L=(0,S.useMemo)(()=>[{title:`用户`,key:`user`,width:120,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:t.username||`未知用户`}),(0,Q.jsx)(`div`,{style:{fontSize:11,color:`#94a3b8`},children:j7(t.userId)})]})},{title:`项目`,dataIndex:`projectName`,width:120,ellipsis:!0,render:e=>(0,Q.jsx)(Z.Text,{style:{fontSize:13},children:e||`-`})},{title:`类型`,dataIndex:`genType`,width:90,ellipsis:!0,render:e=>{let t=O7[e]||{text:e||`-`,color:`default`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`提示词`,key:`prompt`,ellipsis:!0,render:(e,t)=>(0,Q.jsx)(Ow,{title:t.originalPrompt,placement:`topLeft`,children:(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#475569`},ellipsis:!0,children:t.originalPrompt||`-`})})},{title:`参数`,key:`params`,width:160,render:(e,t)=>t.genType===`video`?t.duration||t.aspectRatio||t.resolution?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.duration?(0,Q.jsxs)(NQ,{children:[t.duration,`s`]}):null,t.aspectRatio?(0,Q.jsx)(NQ,{children:t.aspectRatio}):null,t.resolution?(0,Q.jsx)(NQ,{children:t.resolution}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`待配置`}):t.imageSize||t.imageProportion||t.imagePx?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.imageSize?(0,Q.jsx)(NQ,{children:t.imageSize}):null,t.imageProportion?(0,Q.jsx)(NQ,{children:t.imageProportion}):null,t.imagePx?(0,Q.jsx)(NQ,{children:t.imagePx}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`待配置`})},{title:`积分`,key:`credits`,width:120,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12},children:[t.textCreditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#f59e0b`},children:[`文字: `,t.textCreditsCost]}):null,t.creditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#6366f1`},children:[t.genType===`video`?`视频`:`图片`,`: `,t.creditsCost]}):null,t.textCreditsCost===0&&t.creditsCost===0?(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`},children:`0`}):null]})},{title:`状态`,dataIndex:`status`,width:90,render:e=>{let t=D7[e]||{color:`default`,text:e||`-`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`时间`,key:`time`,width:150,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[(0,Q.jsx)(`div`,{children:M7(t.createdAt)}),t.generatedAt?(0,Q.jsxs)(`div`,{style:{color:`#10b981`},children:[`生成: `,M7(t.generatedAt)]}):null]})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>k(t),children:`详情`}),t.status===`generating`?(0,Q.jsx)(qE,{size:`small`,danger:!0,loading:C===t.id,onClick:()=>{BG.confirm({title:`确认操作`,icon:(0,Q.jsx)(f2,{}),content:`确定将此记录标记为失败?`,onOk:()=>F(t.id,`failed`)})},children:`标记失败`}):null,t.status===`failed`?(0,Q.jsx)(qE,{size:`small`,type:`primary`,danger:!0,loading:C===t.id,onClick:()=>E({record:t,ratio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`,image_size:t.imageSize||`2K`}),children:`重试生成`}):null,t.status===`prompt_optimized`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(qE,{size:`small`,type:`primary`,loading:C===t.id,onClick:()=>E({record:t,ratio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`,image_size:t.imageSize||`2K`}),style:{background:`#6366f1`,border:`none`},children:[`生成`,t.genType===`video`?`视频`:`图片`]}),(0,Q.jsx)(qE,{size:`small`,danger:!0,loading:C===t.id,onClick:()=>{BG.confirm({title:`确认操作`,icon:(0,Q.jsx)(f2,{}),content:`确定将此记录标记为失败?`,onOk:()=>F(t.id,`failed`)})},children:`标记失败`})]}):null]})}],[k,C]),R=h?O7[h.genType||``]||{text:h.genType||`-`,color:`default`,icon:null}:null,z=h?D7[h.status]||{color:`default`,text:h.status||`-`,icon:null}:null,B=()=>{if(!h||h.genType!==`image`||h.status!==`completed`)return null;if(!h.imageUrl)return(0,Q.jsx)(R7,{text:`此图片任务暂无结果图片`,minHeight:260});if(_.image===`invalid`)return(0,Q.jsx)(R7,{text:L7(h.imageUrl,`图片`),minHeight:260});let e=A7(h.imageUrl);return(0,Q.jsxs)(`div`,{title:`点击新页面查看图片`,onClick:()=>N(h.imageUrl,`生成图片`),style:{position:`relative`,width:`100%`,minHeight:260,borderRadius:12,background:`#f8f9fc`,border:`1px solid #e2e8f0`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[(0,Q.jsx)(`img`,{src:e,alt:`生成图片`,onLoad:()=>j({image:`valid`}),onError:()=>j({image:`invalid`}),style:{display:_.image===`valid`?`block`:`none`,width:`100%`,maxHeight:560,objectFit:`contain`,background:`#fff`}},`${h.id}-${e}`),_.image===`checking`?(0,Q.jsx)(R7,{text:`图片加载检测中...`,minHeight:260}):null]})},V=()=>{if(!h||y||_.video===`invalid`)return null;let e=h.videoUrl?(0,Q.jsx)(qE,{type:`primary`,shape:`circle`,size:`large`,icon:(0,Q.jsx)(J4,{}),onClick:P,style:{boxShadow:`0 8px 20px rgba(15,23,42,0.25)`}}):null;if(!h.videoCoverUrl)return(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,Q.jsx)(R7,{text:`此视频无封面`,minHeight:340,action:e})});if(_.videoCover===`invalid`)return(0,Q.jsx)(R7,{text:L7(h.videoCoverUrl,`视频封面`),minHeight:340,action:e});let t=A7(h.videoCoverUrl);return(0,Q.jsxs)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,border:`1px solid #e2e8f0`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:t,alt:`视频封面`,onLoad:()=>j({videoCover:`valid`}),onError:()=>j({videoCover:`invalid`}),style:{display:_.videoCover===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`}},`${h.id}-cover-${t}`),_.videoCover===`checking`?(0,Q.jsx)(R7,{text:`视频封面加载检测中...`,minHeight:340,action:e}):null,_.videoCover===`valid`?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(15,23,42,0.18)`},children:e}):null]})},H=()=>{if(!h||h.genType!==`video`||h.status!==`completed`)return null;if(!h.videoUrl)return(0,Q.jsx)(R7,{text:`此视频任务暂无结果视频`,minHeight:340});if(_.video===`invalid`)return(0,Q.jsx)(R7,{text:L7(h.videoUrl,`视频`),minHeight:340});let e=A7(h.videoUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:340,borderRadius:12,background:`#000`,overflow:`hidden`,border:`1px solid #e2e8f0`},children:[(0,Q.jsx)(`video`,{ref:x,src:e,preload:`metadata`,controls:y,onLoadedMetadata:()=>j({video:`valid`}),onCanPlay:()=>j({video:`valid`}),onPlaying:()=>{b(!0),j({video:`valid`})},onPause:()=>b(!1),onEnded:()=>b(!1),onError:()=>{b(!1),j({video:`invalid`})},style:{width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`,opacity:+!!y,pointerEvents:y?`auto`:`none`}},`${h.id}-${e}`),V()]})},U=(e,t)=>{let n=F7(e),r=Une(e),i=I7(e,t),a=_.references[i]||P7(n),o=r===`image`,s=r===`video`,c=typeof e.name==`string`&&e.name?e.name:`参考素材 ${t+1}`;if(!n)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(R7,{text:`无链接`,compact:!0})}),(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})]},i);if(a===`invalid`)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(R7,{text:k7(n)?`本地临时素材已失效`:`素材不可访问`,compact:!0})}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i);let l=A7(n);return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsxs)(`div`,{role:`button`,tabIndex:0,title:`点击新页面查看素材`,onClick:()=>N(n,s?`视频素材`:o?`图片素材`:`素材`),onKeyDown:e=>{e.key===`Enter`&&N(n,s?`视频素材`:o?`图片素材`:`素材`)},style:{width:94,height:94,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,background:`#f8f9fc`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[o?(0,Q.jsx)(`img`,{src:l,alt:c,onLoad:()=>M(i,`valid`),onError:()=>M(i,`invalid`),style:{display:a===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`cover`}}):null,s?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`video`,{src:l,preload:`metadata`,onLoadedMetadata:()=>M(i,`valid`),onError:()=>M(i,`invalid`),style:{display:`none`}}),(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[(0,Q.jsx)(J4,{style:{fontSize:18}}),(0,Q.jsx)(`div`,{children:`视频素材`}),(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]})]}):null,!o&&!s?(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[`文件素材`,(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]}):null,a===`checking`&&o?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8f9fc`},children:(0,Q.jsx)(xm,{style:{color:`#6366f1`}})}):null]}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i)};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(A6,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`生成记录管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[n,` 条记录`]})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(RC,{placeholder:`状态筛选`,allowClear:!0,style:{width:120},value:l||void 0,onChange:e=>{u(e||``),s(1)},options:[{value:`optimizing`,label:`优化中`},{value:`prompt_optimized`,label:`待生成`},{value:`generating`,label:`生成中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`}]}),(0,Q.jsx)(hW,{placeholder:`用户ID搜索`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),style:{width:200},value:d,onChange:e=>f(e.target.value),onPressEnter:O,allowClear:!0}),(0,Q.jsx)(qE,{type:`primary`,onClick:O,style:{borderRadius:8},children:`搜索`})]})]}),(0,Q.jsx)(bQ,{columns:L,dataSource:e,rowKey:`id`,loading:i,scroll:{x:1120},pagination:{current:o,pageSize:c,total:n,onChange:s,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[h?.genType===`video`?(0,Q.jsx)(A6,{}):(0,Q.jsx)(v2,{}),(0,Q.jsx)(`span`,{children:`生成记录详情`})]}),open:!!h,onCancel:A,footer:null,width:900,destroyOnClose:!0,children:h?(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,flexWrap:`wrap`},children:[(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`用户`}),(0,Q.jsx)(Z.Text,{strong:!0,children:h.username||`-`})]}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`项目`}),(0,Q.jsx)(Z.Text,{strong:!0,children:h.projectName||`-`})]}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`类型 / 状态`}),(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[R?(0,Q.jsx)(NQ,{color:R.color,icon:R.icon,children:R.text}):null,z?(0,Q.jsx)(NQ,{color:z.color,icon:z.icon,children:z.text}):null]})]})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,Q.jsx)(Z.Text,{style:{fontSize:13,color:`#475569`,lineHeight:1.7},children:h.originalPrompt||`-`})})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`优化后提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`},children:(0,Q.jsx)(Z.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:h.optimizedPrompt||`-`})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(z7,{label:`文字积分`,value:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#f59e0b`},children:h.textCreditsCost||0}),(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.textTokensUsed||0,` tokens)`]})]})}),(0,Q.jsx)(z7,{label:`${h.genType===`image`?`图片`:`视频`}积分`,value:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:h.creditsCost||0}),h.genType===`video`&&h.videoTokensUsed?(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.videoTokensUsed,` tokens)`]}):null,h.genType===`image`&&h.imageTokensUsed?(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.imageTokensUsed,` tokens)`]}):null]})}),(0,Q.jsx)(z7,{label:`总积分`,value:(h.textCreditsCost||0)+(h.creditsCost||0)})]}),h.genType===`video`?h.duration||h.aspectRatio||h.resolution?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(z7,{label:`时长`,value:h.duration?`${h.duration}秒`:`-`}),(0,Q.jsx)(z7,{label:`比例`,value:h.aspectRatio||`-`}),(0,Q.jsx)(z7,{label:`分辨率`,value:h.resolution||`-`})]}):(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,textAlign:`center`},children:(0,Q.jsx)(NQ,{color:`default`,children:`视频参数待用户配置`})}):null,h.genType===`image`?h.imageSize||h.imageProportion||h.imagePx?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(z7,{label:`尺寸`,value:h.imagePx||`-`}),(0,Q.jsx)(z7,{label:`比例`,value:h.imageProportion||`-`}),(0,Q.jsx)(z7,{label:`分辨率`,value:h.imageSize||`-`})]}):(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,textAlign:`center`},children:(0,Q.jsx)(NQ,{color:`default`,children:`图片参数待用户配置`})}):null,!h?.references||h.references.length===0?null:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`参考内容`}),(0,Q.jsx)(`div`,{style:{display:`flex`,gap:10,flexWrap:`wrap`},children:h.references.map((e,t)=>U(e,t))})]}),h.status===`completed`?(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:h.genType===`video`?`生成视频`:`生成图片`}),h.genType===`video`?H():B()]}):null,h.status===`failed`&&h.errorMessage?(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(239,68,68,0.04)`,border:`1px solid rgba(239,68,68,0.15)`},children:(0,Q.jsxs)(Z.Text,{style:{fontSize:12,color:`#ef4444`},children:[`错误信息: `,h.errorMessage]})}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,fontSize:12,color:`#94a3b8`,flexWrap:`wrap`},children:[(0,Q.jsxs)(`span`,{children:[`创建: `,M7(h.createdAt)]}),(0,Q.jsxs)(`span`,{children:[`生成: `,M7(h.generatedAt)]})]})]}):(0,Q.jsx)(pC,{description:`暂无详情`})}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[T&&(T.record.genType===`video`?(0,Q.jsx)(J4,{}):(0,Q.jsx)(v2,{})),T&&(T.record.genType===`video`?`生成视频`:`生成图片`)]}),open:!!T,onCancel:()=>E(null),onOk:I,okText:`提交生成`,cancelText:`取消`,confirmLoading:T?C===T.record.id:!1,width:420,children:T?(0,Q.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:T.record.genType===`video`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`时长`}),(0,Q.jsxs)(Z.Text,{strong:!0,children:[T.record.duration||5,`s`]})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`画面比例`}),(0,Q.jsx)(RC,{value:T.ratio,onChange:e=>E(t=>t?{...t,ratio:e}:null),style:{width:`100%`},options:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`].map(e=>({value:e,label:e}))})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`分辨率`}),(0,Q.jsx)(RC,{value:T.resolution,onChange:e=>E(t=>t?{...t,resolution:e}:null),style:{width:`100%`},options:[`480p`,`720p`,`1080p`].map(e=>({value:e,label:e}))})]})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`尺寸`}),(0,Q.jsx)(Z.Text,{strong:!0,children:T.record.imagePx||`-`})]}),(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`比例`}),(0,Q.jsx)(Z.Text,{strong:!0,children:T.record.imageProportion||`-`})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`分辨率`}),(0,Q.jsx)(RC,{value:T.image_size,onChange:e=>E(t=>t?{...t,image_size:e}:null),style:{width:`100%`},options:[`2K`,`4K`].map(e=>({value:e,label:e}))})]})]})}):null})]})},B7=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),V7=20,H7={image:`empty`,video:`empty`,videoCover:`empty`,references:{}},U7={pending:{color:`default`,text:`待处理`,icon:(0,Q.jsx)(HB,{})},generating:{color:`warning`,text:`生成中`,icon:(0,Q.jsx)(xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,Q.jsx)(N0,{})},failed:{color:`error`,text:`失败`,icon:(0,Q.jsx)(I0,{})}},W7={timeout:`任务超时`,queued:`已入队`,preparing:`准备中`,creating_provider_task:`创建任务中`,waiting_remote:`等待生成`,result_ready:`结果就绪`,downloading:`下载中`,done:`完成`,download_failed:`下载失败`,polling:`轮询中`,failed:`失败`},G7={image:{text:`图片`,color:`purple`,icon:(0,Q.jsx)(v2,{})},video:{text:`视频`,color:`geekblue`,icon:(0,Q.jsx)(A6,{})}},Gne=e=>/^(https?:)?\/\//i.test(e)||/^(blob|data):/i.test(e),K7=e=>!!e&&/^blob:/i.test(e.trim()),q7=e=>{if(!e)return``;let t=String(e).trim();return t?Gne(t)?t:B7?`${B7}${t.startsWith(`/`)?t:`/${t}`}`:t.startsWith(`/`)?t:`/${t}`:``},Kne=e=>e?e.length>12?`${e.slice(0,8)}...`:e:`-`,J7=e=>e?Z5(e):`-`,qne=e=>e==null||e===``,Y7=e=>{if(!e||K7(e))return!1;try{let t=new URL(q7(e),window.location.origin),n=t.searchParams.get(`exp`)||t.searchParams.get(`expires`)||t.searchParams.get(`expire`)||t.searchParams.get(`expires_at`)||t.searchParams.get(`x-expires`);if(!n)return!1;let r=Number(n);if(!Number.isFinite(r))return!1;let i=r>1e10?r:r*1e3;return Date.now()>=i}catch{return!1}},X7=e=>e?K7(e)||Y7(e)?`invalid`:`checking`:`empty`,Z7=e=>{let t=e.url||e.mediaUrl||e.fileUrl;return typeof t==`string`&&t.trim()?t.trim():void 0},Jne=e=>{let t=String(e.type||e.mediaType||e.mimeType||``).toLowerCase(),n=Z7(e)?.toLowerCase()||``;return t.includes(`video`)||/\.(mp4|mov|webm|m4v)(\?|$)/i.test(n)?`video`:t.includes(`image`)||/\.(png|jpe?g|webp|gif|bmp|svg)(\?|$)/i.test(n)?`image`:t||`unknown`},Q7=(e,t)=>`${t}-${Z7(e)||`empty`}`,$7=(e,t=`资源`)=>K7(e)?`本地临时素材已失效`:Y7(e)?`${t}链接已超时,请刷新列表或重新搜索后再查看`:`${t}加载失败,请刷新列表或重新搜索后再查看`,e9=({text:e,minHeight:t=240,compact:n=!1,action:r})=>(0,Q.jsxs)(`div`,{style:{width:`100%`,minHeight:n?void 0:t,height:n?`100%`:void 0,borderRadius:n?10:12,background:`#f8f9fc`,border:`1px dashed #cbd5e1`,color:`#64748b`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:n?4:10,textAlign:`center`},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`,fontSize:n?11:13},children:e}),r]}),t9=({label:e,value:t})=>(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:120},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:qne(t)?`-`:t})]}),Yne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(``),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)(``),[m,h]=(0,S.useState)(``),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(0),[C,w]=(0,S.useState)(null),[T,E]=(0,S.useState)(H7),[D,O]=(0,S.useState)(!1),k=(0,S.useRef)(null),A=(0,S.useCallback)(async()=>{a(!0);try{let e=await g5({genType:u||void 0,status:c||void 0,userId:g||void 0,userName:v||void 0,page:o,pageSize:V7});t(e.items||[]),r(e.total||0)}catch(e){LG.error(e?.message||`加载创作记录失败`)}finally{a(!1)}},[u,c,o,g,v]);(0,S.useEffect)(()=>{A()},[A,b]),(0,S.useEffect)(()=>{if(!C){E(H7);return}let e=(C.mediaReferences||[]).reduce((e,t,n)=>{let r=Z7(t);return e[Q7(t,n)]=X7(r),e},{});k.current&&(k.current.pause(),k.current.currentTime=0),O(!1),E({image:X7(C.imageUrl),video:X7(C.videoUrl),videoCover:X7(C.videoCoverUrl),references:e})},[C]);let j=()=>{s(1),_(f.trim()),y(m.trim()),x(e=>e+1)},M=(0,S.useCallback)(e=>{w(e)},[]),N=()=>{k.current&&k.current.pause(),O(!1),w(null)},P=e=>{E(t=>({...t,...e}))},F=(e,t)=>{E(n=>({...n,references:{...n.references,[e]:t}}))},I=()=>{if(C?.videoUrl){if(Y7(C.videoUrl)){P({video:`invalid`}),LG.warning(`视频链接已超时,请刷新列表或重新搜索后再查看`);return}O(!0),window.setTimeout(()=>{k.current?.play().catch(()=>{O(!1),P({video:`invalid`}),LG.warning(`视频播放失败,请确认资源链接是否仍然有效`)})},0)}},L=(e,t=`素材`)=>{if(!e){LG.warning(`${t}链接为空,暂无法查看`);return}if(K7(e)){LG.warning(`本地临时素材已失效,暂无法查看`);return}if(Y7(e)){LG.warning(`${t}链接已超时,请刷新列表或重新搜索后再查看`);return}window.open(q7(e),`_blank`,`noopener,noreferrer`)},R=(0,S.useMemo)(()=>[{title:`用户`,key:`user`,width:150,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:t.userName||`未知用户`}),(0,Q.jsx)(`div`,{style:{fontSize:11,color:`#94a3b8`},children:Kne(t.userId)})]})},{title:`类型`,dataIndex:`genType`,width:90,render:e=>{let t=G7[e]||{text:e||`-`,color:`default`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`提示词`,key:`prompt`,ellipsis:!0,render:(e,t)=>(0,Q.jsx)(Ow,{title:t.originalPrompt,placement:`topLeft`,children:(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#475569`},ellipsis:!0,children:t.originalPrompt||`-`})})},{title:`参数`,key:`params`,width:180,render:(e,t)=>t.genType===`video`?t.duration||t.aspectRatio||t.resolution?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.duration?(0,Q.jsxs)(NQ,{children:[t.duration,`s`]}):null,t.aspectRatio?(0,Q.jsx)(NQ,{children:t.aspectRatio}):null,t.resolution?(0,Q.jsx)(NQ,{children:t.resolution}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`无参数`}):t.imageSize||t.imageProportion||t.imagePx?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.imageSize?(0,Q.jsx)(NQ,{children:t.imageSize}):null,t.imageProportion?(0,Q.jsx)(NQ,{children:t.imageProportion}):null,t.imagePx?(0,Q.jsx)(NQ,{children:t.imagePx}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`无参数`})},{title:`积分`,key:`credits`,width:130,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12},children:[(0,Q.jsxs)(`div`,{style:{color:`#6366f1`},children:[`总: `,t.creditsCost||0]}),t.textCreditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#f59e0b`},children:[`文字: `,t.textCreditsCost]}):null]})},{title:`状态`,dataIndex:`status`,width:100,render:e=>{let t=U7[e]||{color:`default`,text:e||`-`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`阶段`,dataIndex:`pipelineStage`,width:120,render:e=>(0,Q.jsx)(NQ,{color:`blue`,children:W7[e]||e||`-`})},{title:`时间`,key:`time`,width:170,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[(0,Q.jsx)(`div`,{children:J7(t.createdAt)}),t.generatedAt?(0,Q.jsxs)(`div`,{style:{color:`#10b981`},children:[`生成: `,J7(t.generatedAt)]}):null]})},{title:`操作`,key:`action`,width:90,fixed:`right`,render:(e,t)=>(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>M(t),children:`详情`})}],[M]),z=C?G7[C.genType]||{text:C.genType||`-`,color:`default`,icon:null}:null,B=C?U7[C.status]||{color:`default`,text:C.status||`-`,icon:null}:null,V=()=>{if(!C||C.genType!==`image`||C.status!==`completed`)return null;if(!C.imageUrl)return(0,Q.jsx)(e9,{text:`此图片任务暂无结果图片`,minHeight:260});if(T.image===`invalid`)return(0,Q.jsx)(e9,{text:$7(C.imageUrl,`图片`),minHeight:260});let e=q7(C.imageUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,minHeight:260,borderRadius:12,background:`#f8f9fc`,border:`1px solid #e2e8f0`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:e,alt:`生成图片`,onLoad:()=>P({image:`valid`}),onError:()=>P({image:`invalid`}),style:{display:T.image===`valid`?`block`:`none`,width:`100%`,maxHeight:560,objectFit:`contain`,background:`#fff`}},`${C.id}-${e}`),T.image===`checking`?(0,Q.jsx)(e9,{text:`图片加载检测中...`,minHeight:260}):null]})},H=()=>{if(!C||D||T.video===`invalid`)return null;let e=C.videoUrl?(0,Q.jsx)(qE,{type:`primary`,shape:`circle`,size:`large`,icon:(0,Q.jsx)(J4,{}),onClick:I,style:{boxShadow:`0 8px 20px rgba(15,23,42,0.25)`}}):null;if(!C.videoCoverUrl)return(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,Q.jsx)(e9,{text:`此视频无封面`,minHeight:340,action:e})});if(T.videoCover===`invalid`)return(0,Q.jsx)(e9,{text:$7(C.videoCoverUrl,`视频封面`),minHeight:340,action:e});let t=q7(C.videoCoverUrl);return(0,Q.jsxs)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,border:`1px solid #e2e8f0`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:t,alt:`视频封面`,onLoad:()=>P({videoCover:`valid`}),onError:()=>P({videoCover:`invalid`}),style:{display:T.videoCover===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`}},`${C.id}-cover-${t}`),T.videoCover===`checking`?(0,Q.jsx)(e9,{text:`视频封面加载检测中...`,minHeight:340,action:e}):null,T.videoCover===`valid`?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(15,23,42,0.18)`},children:e}):null]})},U=()=>{if(!C||C.genType!==`video`||C.status!==`completed`)return null;if(!C.videoUrl)return(0,Q.jsx)(e9,{text:`此视频任务暂无结果视频`,minHeight:340});if(T.video===`invalid`)return(0,Q.jsx)(e9,{text:$7(C.videoUrl,`视频`),minHeight:340});let e=q7(C.videoUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:340,borderRadius:12,background:`#000`,overflow:`hidden`,border:`1px solid #e2e8f0`},children:[(0,Q.jsx)(`video`,{ref:k,src:e,preload:`metadata`,controls:D,onLoadedMetadata:()=>P({video:`valid`}),onCanPlay:()=>P({video:`valid`}),onPlaying:()=>{O(!0),P({video:`valid`})},onPause:()=>O(!1),onEnded:()=>O(!1),onError:()=>{O(!1),P({video:`invalid`})},style:{width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`,opacity:+!!D,pointerEvents:D?`auto`:`none`}},`${C.id}-${e}`),H()]})},W=(e,t)=>{let n=Z7(e),r=Jne(e),i=Q7(e,t),a=T.references[i]||X7(n),o=r===`image`,s=r===`video`,c=typeof e.name==`string`&&e.name?e.name:`参考素材 ${t+1}`;if(!n)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(e9,{text:`无链接`,compact:!0})}),(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})]},i);if(a===`invalid`)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(e9,{text:K7(n)?`本地临时素材已失效`:`素材不可访问`,compact:!0})}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i);let l=q7(n);return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsxs)(`div`,{role:`button`,tabIndex:0,title:`点击新页面查看素材`,onClick:()=>L(n,s?`视频素材`:o?`图片素材`:`素材`),onKeyDown:e=>{e.key===`Enter`&&L(n,s?`视频素材`:o?`图片素材`:`素材`)},style:{width:94,height:94,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,background:`#f8f9fc`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[o?(0,Q.jsx)(`img`,{src:l,alt:c,onLoad:()=>F(i,`valid`),onError:()=>F(i,`invalid`),style:{display:a===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`cover`}}):null,s?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`video`,{src:l,preload:`metadata`,onLoadedMetadata:()=>F(i,`valid`),onError:()=>F(i,`invalid`),style:{display:`none`}}),(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[(0,Q.jsx)(J4,{style:{fontSize:18}}),(0,Q.jsx)(`div`,{children:`视频素材`}),(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]})]}):null,!o&&!s?(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[`文件素材`,(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]}):null,a===`checking`&&o?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8f9fc`},children:(0,Q.jsx)(xm,{style:{color:`#6366f1`}})}):null]}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i)};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`创作记录管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[n,` 条记录`]})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`状态筛选`,value:c||void 0,style:{width:140},onChange:e=>{l(e||``),s(1)},options:[{value:`generating`,label:`生成中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`}]}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`类型筛选`,value:u||void 0,style:{width:120},onChange:e=>{d(e||``),s(1)},options:[{value:`image`,label:`图片`},{value:`video`,label:`视频`}]}),(0,Q.jsx)(hW,{placeholder:`用户ID搜索`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),style:{width:180},value:f,onChange:e=>p(e.target.value),onPressEnter:j,allowClear:!0}),(0,Q.jsx)(hW,{placeholder:`用户名搜索`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),style:{width:160},value:m,onChange:e=>h(e.target.value),onPressEnter:j,allowClear:!0}),(0,Q.jsx)(qE,{type:`primary`,onClick:j,style:{borderRadius:8},children:`搜索`})]})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:i,columns:R,dataSource:e,scroll:{x:1180},pagination:{current:o,pageSize:V7,total:n,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:e=>s(e)}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[C?.genType===`video`?(0,Q.jsx)(A6,{}):(0,Q.jsx)(v2,{}),(0,Q.jsx)(`span`,{children:`创作记录详情`})]}),open:!!C,onCancel:N,footer:null,width:900,destroyOnClose:!0,children:C?(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:12},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12,flexWrap:`wrap`},children:[z?(0,Q.jsx)(NQ,{color:z.color,icon:z.icon,children:z.text}):null,B?(0,Q.jsx)(NQ,{color:B.color,icon:B.icon,children:B.text}):null,C.pipelineStage?(0,Q.jsx)(NQ,{color:`blue`,children:W7[C.pipelineStage]||C.pipelineStage}):null]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`用户名称`,value:C.userName||`未知用户`}),(0,Q.jsx)(t9,{label:`用户ID`,value:C.userId||`-`}),(0,Q.jsx)(t9,{label:`任务ID`,value:C.id})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,lineHeight:1.6},children:C.originalPrompt||`-`})]}),C.genType===`video`?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`时长`,value:C.duration?`${C.duration}秒`:`-`}),(0,Q.jsx)(t9,{label:`画面比例`,value:C.aspectRatio||`-`}),(0,Q.jsx)(t9,{label:`分辨率`,value:C.resolution||`-`})]}):(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`图片档位`,value:C.imageSize||`-`}),(0,Q.jsx)(t9,{label:`图片比例`,value:C.imageProportion||`-`}),(0,Q.jsx)(t9,{label:`像素尺寸`,value:C.imagePx||`-`})]}),C.engineSnapshot?(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`引擎快照`}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`引擎名称`,value:C.engineSnapshot.name||`-`}),(0,Q.jsx)(t9,{label:`服务商`,value:C.engineSnapshot.provider||`-`}),(0,Q.jsx)(t9,{label:`模型`,value:C.engineSnapshot.modelName||`-`}),(0,Q.jsx)(t9,{label:`引擎ID`,value:C.engineSnapshot.id||C.engineId||`-`})]})]}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`总积分`,value:(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:C.creditsCost||0})}),(0,Q.jsx)(t9,{label:`文字积分`,value:`${C.textCreditsCost||0} (${C.textTokensUsed||0} tokens)`}),(0,Q.jsx)(t9,{label:`图片 tokens`,value:C.imageTokensUsed??0}),(0,Q.jsx)(t9,{label:`视频 tokens`,value:C.videoTokensUsed??0})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`第三方任务ID`,value:C.providerTaskId||C.seedanceTaskId||`-`}),(0,Q.jsx)(t9,{label:`轮询次数`,value:C.pollCount??0}),(0,Q.jsx)(t9,{label:`重试次数`,value:C.retryCount??0})]}),!C?.mediaReferences||C.mediaReferences.length===0?null:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`参考内容`}),(0,Q.jsx)(`div`,{style:{display:`flex`,gap:10,flexWrap:`wrap`},children:C.mediaReferences.map((e,t)=>W(e,t))})]}),C.status===`completed`?(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:C.genType===`video`?`生成视频`:`生成图片`}),C.genType===`video`?U():V()]}):null,C.status===`failed`&&C.errorMessage?(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(239,68,68,0.04)`,border:`1px solid rgba(239,68,68,0.15)`},children:(0,Q.jsxs)(Z.Text,{style:{fontSize:12,color:`#ef4444`},children:[`错误信息: `,C.errorMessage]})}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,fontSize:12,color:`#94a3b8`,flexWrap:`wrap`},children:[(0,Q.jsxs)(`span`,{children:[`创建: `,J7(C.createdAt)]}),(0,Q.jsxs)(`span`,{children:[`生成: `,J7(C.generatedAt)]})]})]}):(0,Q.jsx)(pC,{description:`暂无详情`})})]})},n9=20,Xne=[{value:`pending`,label:`已创建`},{value:`waiting_user`,label:`等待用户操作`},{value:`processing`,label:`处理中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`},{value:`cancelled`,label:`已取消`}],Zne={pending:{color:`default`,text:`已创建`},waiting_user:{color:`processing`,text:`等待用户操作`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`已完成`},failed:{color:`error`,text:`失败`},cancelled:{color:`default`,text:`已取消`}},Qne={material_input:`素材输入`,image_prompt_optimize:`图片 AI 提词`,image_generate:`图片生成`,video_prompt_optimize:`视频 AI 提词`,video_generate:`视频生成`},r9=e=>e?Z5(e):`-`,i9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,$ne=({status:e})=>{if(!e)return(0,Q.jsx)(NQ,{children:`-`});let t=Zne[e]||{color:`blue`,text:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.text})},ere=()=>{let e=Ye(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(1),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(``),[h,g]=(0,S.useState)(``),[_,v]=(0,S.useState)(null),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(``),[w,T]=(0,S.useState)(``),[E,D]=(0,S.useState)(null),[O,k]=(0,S.useState)(0),A=(0,S.useCallback)(async()=>{o(!0);try{let e=await v5({status:l||void 0,keyword:y||void 0,userId:x||void 0,userName:w||void 0,createdStart:E?.[0]?.toISOString?.(),createdEnd:E?.[1]?.toISOString?.(),page:s,pageSize:n9});n(e.items||[]),i(e.total||0)}catch(e){LG.error(e?.message||`加载爆款开头复刻任务失败`)}finally{o(!1)}},[s,E,y,x,w,l]);(0,S.useEffect)(()=>{A()},[A,O]);let j=()=>{b(d.trim()),C(p.trim()),T(h.trim()),D(_),c(1)};return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsx)(PR,{children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{align:`center`,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:3,style:{marginBottom:4},children:`爆款开头复刻`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`只读排查页面:查看任务列表、素材、步骤详情和生成结果。`})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>k(e=>e+1),children:`刷新`})]}),(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`任务状态`,style:{width:160},value:l||void 0,onChange:e=>{u(e||``),c(1)},options:Xne}),(0,Q.jsx)(hW,{allowClear:!0,prefix:(0,Q.jsx)(NC,{}),placeholder:`关键词:标题/项目名/核心点`,style:{width:260},value:d,onChange:e=>f(e.target.value),onPressEnter:j}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户ID(管理员)`,style:{width:190},value:p,onChange:e=>m(e.target.value),onPressEnter:j}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户名(管理员)`,style:{width:230},value:h,onChange:e=>g(e.target.value),onPressEnter:j}),(0,Q.jsx)(YB.RangePicker,{showTime:!0,value:_,onChange:v,placeholder:[`创建开始`,`创建结束`]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(NC,{}),onClick:j,children:`搜索`}),(0,Q.jsx)(qE,{onClick:()=>{u(``),f(``),m(``),g(``),v(null),b(``),C(``),T(``),D(null),c(1),k(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:a,dataSource:t,pagination:{current:s,pageSize:n9,total:r,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:c},scroll:{x:1380},columns:[{title:`项目ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Ow,{title:e,children:i9(e)})},{title:`用户`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(Z.Text,{children:t.userName||`-`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:i9(t.userId)})]})},{title:`项目信息`,width:260,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:2,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.title||t.targetProjectName||`-`}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:240},children:[`素材:`,t.sourceProjectName||`-`]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:240},children:[`核心:`,t.coreContentPoint||`-`]})]})},{title:`状态`,dataIndex:`status`,width:130,render:e=>(0,Q.jsx)($ne,{status:e})},{title:`当前步骤`,dataIndex:`currentStepCode`,width:140,render:e=>Qne[e]||e||`-`},{title:`图片结果`,dataIndex:`finalImageUrl`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`success`,children:`有`}):(0,Q.jsx)(NQ,{children:`无`})},{title:`视频结果`,dataIndex:`finalVideoUrl`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`success`,children:`有`}):(0,Q.jsx)(NQ,{children:`无`})},{title:`错误信息`,dataIndex:`errorMessage`,width:220,ellipsis:!0,render:e=>e||`-`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:r9},{title:`更新时间`,dataIndex:`updatedAt`,width:170,render:r9},{title:`操作`,fixed:`right`,width:110,render:(t,n)=>(0,Q.jsx)(qE,{type:`link`,icon:(0,Q.jsx)(qU,{}),onClick:()=>e(`/hot-opening-replications/${n.id}`),children:`详情`})}]})]})})})},a9=({value:e,maxHeight:t=420})=>e==null||e===``?(0,Q.jsx)(pC,{image:pC.PRESENTED_IMAGE_SIMPLE,description:`暂无 JSON 数据`}):(0,Q.jsx)(`pre`,{style:{margin:0,padding:12,maxHeight:t,overflow:`auto`,background:`#0f172a`,color:`#e2e8f0`,borderRadius:8,fontSize:12,lineHeight:1.6},children:JSON.stringify(e,null,2)}),tre=({input:e,output:t,raw:n,inputLabel:r=`查看 input_json`,outputLabel:i=`查看 output_json`,rawLabel:a=`查看原始 JSON`})=>{let o=[];return e!==void 0&&o.push({key:`input`,label:r,children:(0,Q.jsx)(a9,{value:e})}),t!==void 0&&o.push({key:`output`,label:i,children:(0,Q.jsx)(a9,{value:t})}),n!==void 0&&o.push({key:`raw`,label:a,children:(0,Q.jsx)(a9,{value:n})}),o.length?(0,Q.jsx)(Ng,{size:`small`,style:{marginTop:12},items:o}):null},nre=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``);function rre(e){if(!e)return``;let t=String(e).trim();return t?/^(https?:)?\/\//i.test(t)||/^(blob|data):/i.test(t)?t:`${nre}${t.startsWith(`/`)?t:`/${t}`}`:``}var o9=({url:e,type:t,height:n=260,emptyDescription:r=`暂无资源`,errorDescription:i=`资源加载失败,可能文件不存在、签名过期或访问权限受限。`})=>{let a=(0,S.useMemo)(()=>rre(e),[e]),[o,s]=(0,S.useState)(!1);(0,S.useEffect)(()=>{s(!1)},[a]);let c=a?(0,Q.jsxs)(VV,{wrap:!0,style:{marginTop:8},children:[(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(c$,{}),onClick:async()=>{if(a)try{await navigator.clipboard.writeText(a),LG.success(`资源地址已复制`)}catch{LG.error(`复制失败,请手动复制`)}},children:`复制地址`}),(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(l4,{}),onClick:()=>window.open(a,`_blank`,`noopener,noreferrer`),children:`新窗口打开`}),(0,Q.jsx)(Z.Text,{copyable:{text:a},type:`secondary`,style:{maxWidth:460},ellipsis:!0,children:a})]}):null;return a?(0,Q.jsxs)(`div`,{children:[o?(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`资源预览失败`,description:i,style:{marginBottom:8}}):null,t===`image`?(0,Q.jsx)(PU,{src:a,onError:()=>s(!0),style:{width:`100%`,maxHeight:n,objectFit:`contain`,borderRadius:12,background:`#f8fafc`,border:`1px solid #f1f5f9`},fallback:``,preview:!o}):(0,Q.jsx)(`video`,{src:a,controls:!0,preload:`metadata`,onError:()=>s(!0),style:{width:`100%`,maxHeight:n,borderRadius:12,background:`#0f172a`,border:`1px solid #f1f5f9`}}),c]}):(0,Q.jsx)(`div`,{children:(0,Q.jsx)(`div`,{style:{height:n,borderRadius:12,border:`1px dashed #cbd5e1`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8fafc`},children:(0,Q.jsx)(pC,{image:pC.PRESENTED_IMAGE_SIMPLE,description:r})})})},s9={pending:{text:`待处理`,color:`default`},waiting_user:{text:`等待用户操作`,color:`processing`},processing:{text:`处理中`,color:`warning`},completed:{text:`已完成`,color:`success`},failed:{text:`失败`,color:`error`},cancelled:{text:`已取消`,color:`default`},canceled:{text:`已取消`,color:`default`},timeout:{text:`已超时`,color:`error`},queued:{text:`已入队`,color:`processing`},preparing:{text:`准备中`,color:`processing`},creating_provider_task:{text:`创建远端任务`,color:`processing`},waiting_remote:{text:`等待远端结果`,color:`processing`},polling:{text:`轮询远端结果`,color:`processing`},result_ready:{text:`结果已就绪`,color:`success`},downloading:{text:`下载中`,color:`processing`},done:{text:`已完成`,color:`success`},download_failed:{text:`下载失败`,color:`error`},retry_waiting:{text:`等待重试`,color:`orange`},pending_analysis:{text:`等待分析`,color:`default`},analyzing:{text:`分析中`,color:`processing`},analysis_completed:{text:`分析完成`,color:`success`},analysis_failed:{text:`分析失败`,color:`error`},splitting:{text:`拆镜中`,color:`warning`},split_completed:{text:`拆镜完成`,color:`success`},partial_failed:{text:`部分失败`,color:`orange`},none:{text:`未拆镜`,color:`default`},not_required:{text:`无需处理`,color:`default`},not_started:{text:`未开始`,color:`default`},project_created:{text:`已创建项目`,color:`processing`},true:{text:`是`,color:`success`},false:{text:`否`,color:`default`}},c9={material_input:`素材输入`,image_prompt_optimize:`图片 AI 提词`,image_generate:`图片生成`,video_prompt_optimize:`视频 AI 提词`,video_generate:`视频生成`},l9={hot_opening_replicate:`爆款开头复刻`,shot_replicate:`拆镜复刻`},u9={ai_suggestion:{text:`AI 建议`,color:`purple`},custom:{text:`自定义`,color:`cyan`},original:{text:`原视频`,color:`blue`}};function d9(e){return e?l9[e]||e:`-`}function f9(e){return e?c9[e]||e:`-`}function ire(e){return e?s9[e]?.text||c9[e]||l9[e]||u9[e]?.text||e:`-`}function are(e){return e?s9[e]?.color||u9[e]?.color||`blue`:`default`}var p9=({status:e,tooltipRaw:t=!0})=>{if(e==null||e===``)return(0,Q.jsx)(NQ,{children:`-`});let n=String(e),r=ire(n),i=(0,Q.jsx)(NQ,{color:are(n),children:r});return!t||r===n?i:(0,Q.jsx)(Ow,{title:n,children:i})};function m9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function h9(e,...t){for(let n of t){let t=e[n];if(t!=null&&String(t).trim()!==``)return String(t)}return``}function g9(e,t,...n){for(let t of n){let n=e[t];if(n===!0||n===!1)return n;if(n===`true`)return!0;if(n===`false`)return!1}return t}function ore(e,...t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t)&&t>0)return t;if(typeof t==`string`&&t.trim()){let e=Number(t);if(Number.isFinite(e)&&e>0)return e}}}function _9(e){if(!m9(e))return null;let t=h9(e,`key`);return t?{key:t,label:h9(e,`label`)||t,type:h9(e,`type`)||void 0,enabled:g9(e,!0,`enabled`),editable:g9(e,!0,`editable`),maxLength:ore(e,`maxLength`,`max_length`)}:null}function v9(e){if(!m9(e))return null;let t=e.data;return m9(t)?t:Array.isArray(e.sections)?e:null}function sre(e){return!!v9(e)}function cre(e){let t=v9(e);return(Array.isArray(t?.sections)?t.sections:[]).map(e=>{let t=_9(e);if(!t||!m9(e))return null;let n=Array.isArray(e.children)?e.children.map(_9).filter(Boolean):[],r=Array.isArray(e.itemFields)?e.itemFields.map(_9).filter(Boolean):Array.isArray(e.item_fields)?e.item_fields.map(_9).filter(Boolean):[];return{...t,contentKey:h9(e,`contentKey`,`content_key`)||void 0,children:n,itemFields:r}}).filter(e=>!!e&&e.enabled)}function lre(e){return m9(e)?Object.entries(e).filter(([e])=>![`schemaVersion`,`schemaUsage`,`schema_version`,`schema_usage`].includes(e)).map(([e,t])=>Array.isArray(t)&&t.every(m9)?{key:e,label:e,type:`flow`,enabled:!0,editable:!1,itemFields:Array.from(new Set(t.flatMap(e=>Object.keys(e)))).filter(e=>e!==`时间段`).map(e=>({key:e,label:e,enabled:!0,editable:!1})),children:[]}:m9(t)?{key:e,label:e,type:`object`,enabled:!0,editable:!1,children:Object.keys(t).map(e=>({key:e,label:e,enabled:!0,editable:!1})),itemFields:[]}:{key:e,label:e,type:`text`,enabled:!0,editable:!1,children:[],itemFields:[]}):[]}var y9=e=>!!e&&typeof e==`object`&&!Array.isArray(e),b9=e=>typeof e==`string`&&e.length>80,x9=e=>e==null||e===``?(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`}):typeof e==`boolean`?e?`是`:`否`:typeof e==`number`?e:typeof e==`string`?(0,Q.jsx)(Z.Paragraph,{style:{marginBottom:0,whiteSpace:`pre-wrap`},children:e}):(0,Q.jsx)(a9,{value:e,maxHeight:220}),S9=e=>e?(0,Q.jsx)(NQ,{color:`processing`,children:`可编辑`}):(0,Q.jsx)(NQ,{color:`default`,children:`只读`}),C9=(e,t)=>e[t],ure=(e,t)=>{let n=C9(e,t.key);if(!y9(n))return(0,Q.jsx)(a9,{value:n??{},maxHeight:220});let r=t.children.filter(e=>e.enabled);return r.length?(0,Q.jsx)(lV,{size:`small`,column:2,bordered:!0,children:r.map(e=>(0,Q.jsx)(lV.Item,{label:(0,Q.jsxs)(VV,{size:4,children:[e.label,S9(e.editable)]}),span:b9(n[e.key])||y9(n[e.key])||Array.isArray(n[e.key])?2:1,children:x9(n[e.key])},e.key))}):(0,Q.jsx)(a9,{value:n,maxHeight:220})},dre=(e,t)=>{let n=e.itemFields.filter(e=>e.enabled);return n.length?[{key:`时间段`,label:`时间段`,enabled:!0,editable:!1},...n]:Array.from(new Set(t.flatMap(e=>Object.keys(e)))).map(e=>({key:e,label:e,enabled:!0,editable:!1}))},fre=(e,t)=>{let n=C9(e,t.key);if(!Array.isArray(n)||!n.every(y9))return(0,Q.jsx)(a9,{value:n??[],maxHeight:260});let r=n,i=dre(t,r);return(0,Q.jsx)(bQ,{size:`small`,rowKey:(e,n)=>`${t.key}-${n}`,columns:i.map(e=>({title:(0,Q.jsxs)(VV,{size:4,children:[e.label,S9(e.editable)]}),dataIndex:e.key,key:e.key,width:b9(r.find(t=>t[e.key])?.[e.key])?320:160,render:e=>x9(e)})),dataSource:r,pagination:!1,scroll:{x:Math.max(900,i.length*180)},tableLayout:`fixed`})},pre=(e,t)=>x9(C9(e,t.key)),mre=({schema:e,finalPrompt:t,schemaConfigSnapshot:n,schemaConfigSource:r,schemaConfigVersion:i,schemaConfigIsFallback:a})=>{let o=!!e&&Object.keys(e).length>0;if(!o&&!t)return(0,Q.jsx)(pC,{description:`暂无视频提词 schema`});let s=o?e:{},c=sre(n),l=(c?cre(n):lre(s)).filter(e=>e.key in s).map(e=>({key:e.key,label:(0,Q.jsxs)(VV,{size:8,wrap:!0,children:[(0,Q.jsx)(`span`,{children:e.label}),S9(e.editable),c?null:(0,Q.jsx)(NQ,{color:`warning`,children:`管理后台兜底展示`})]}),children:e.type===`object`?ure(s,e):e.type===`flow`?fre(s,e):pre(s,e)}));return(0,Q.jsxs)(VV,{direction:`vertical`,size:12,style:{width:`100%`},children:[(0,Q.jsx)(PR,{size:`small`,title:`Schema 配置来源`,children:(0,Q.jsxs)(lV,{size:`small`,column:3,bordered:!0,children:[(0,Q.jsx)(lV.Item,{label:`来源`,children:r||n?.source||(c?`-`:`viewer_fallback`)}),(0,Q.jsx)(lV.Item,{label:`版本`,children:i||n?.version||`-`}),(0,Q.jsx)(lV.Item,{label:`历史兜底`,children:a||!c?(0,Q.jsx)(NQ,{color:`warning`,children:`是`}):(0,Q.jsx)(NQ,{color:`success`,children:`否`})})]})}),t?(0,Q.jsx)(PR,{size:`small`,title:`最终视频提示词`,children:(0,Q.jsx)(Z.Paragraph,{style:{whiteSpace:`pre-wrap`,marginBottom:0},children:t})}):null,l.length?(0,Q.jsx)(Ng,{size:`small`,items:l}):o?(0,Q.jsx)(PR,{size:`small`,title:`视频提词 Schema`,children:(0,Q.jsx)(a9,{value:s,maxHeight:360})}):null,o?(0,Q.jsx)(Ng,{size:`small`,items:[{key:`raw_schema`,label:`原始 JSON / 历史脏字段排查`,children:(0,Q.jsx)(a9,{value:s,maxHeight:420})}]}):null]})},hre=[`material_input`,`image_prompt_optimize`,`image_generate`,`video_prompt_optimize`,`video_generate`],gre={material_input:`参考素材、项目名称和核心内容点`,image_prompt_optimize:`图片 AI 提词优化结果`,image_generate:`图片引擎、生成参数和结果图`,video_prompt_optimize:`视频 JSON schema、动作流程和最终提词`,video_generate:`视频引擎、生成参数、封面和结果视频`},w9=e=>e?Z5(e):`-`,T9=e=>e?e.length>18?`${e.slice(0,10)}...${e.slice(-4)}`:e:`-`,_re=({text:e=`-`})=>(0,Q.jsx)(Z.Text,{type:`secondary`,children:e}),E9=({step:e})=>e?(0,Q.jsx)(tre,{input:e.input,output:e.output}):null,D9=({index:e,stepCode:t,step:n,current:r})=>(0,Q.jsxs)(VV,{wrap:!0,size:8,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:`第${e}步:${f9(t)}`}),(0,Q.jsx)(p9,{status:n?.status||`not_started`}),r?(0,Q.jsx)(NQ,{color:`blue`,children:`当前步骤`}):null,(0,Q.jsx)(Z.Text,{type:`secondary`,children:gre[t]||t}),n?.updatedAt?(0,Q.jsxs)(Z.Text,{type:`secondary`,children:[`更新时间:`,w9(n.updatedAt)]}):null,n?.chatTaskId?(0,Q.jsx)(Ow,{title:n.chatTaskId,children:(0,Q.jsxs)(NQ,{children:[`Chat:`,T9(n.chatTaskId)]})}):null]}),vre=(e,t)=>{if(!e)return[];let n=new Set;return n.add(`material_input`),e.currentStepCode&&n.add(e.currentStepCode),Object.values(t).forEach(e=>{(e.status===`failed`||e.errorMessage)&&n.add(e.stepCode)}),e.errorMessage&&n.add(e.currentStepCode||`material_input`),Array.from(n)},O9=(e,t=`错误信息`)=>e?(0,Q.jsx)(sf,{type:`error`,showIcon:!0,message:t,description:e,style:{marginTop:12,marginBottom:12}}):null,yre=(e,t=`暂无提词`)=>e?(0,Q.jsx)(Z.Paragraph,{style:{whiteSpace:`pre-wrap`,marginBottom:0},children:e}):(0,Q.jsx)(_re,{text:t}),k9=({moduleType:e=`shot_replicate`})=>{let{projectId:t}=$e(),n=Ye(),[r,i]=(0,S.useState)(null),[a,o]=(0,S.useState)(!1),s=(0,S.useCallback)(async()=>{if(t){o(!0);try{i(e===`hot_opening_replicate`?await y5(t):await w5(t))}catch(e){LG.error(e?.message||`加载复刻项目详情失败`)}finally{o(!1)}}},[e,t]);(0,S.useEffect)(()=>{s()},[s]);let c=(0,S.useMemo)(()=>{let e={};return(r?.steps||[]).forEach(t=>{e[t.stepCode]=t}),e},[r]),l=r?.module||e,u=d9(l),d=(0,S.useMemo)(()=>hre.map(e=>{let t=c[e],n=`wait`;return t?.status===`completed`?n=`finish`:t?.status===`processing`?n=`process`:t?.status===`failed`&&(n=`error`),{title:f9(e),description:t?(0,Q.jsx)(p9,{status:t.status}):`未创建`,status:n}}),[c]),f=(0,S.useMemo)(()=>vre(r,c),[r,c]);if(a&&!r)return(0,Q.jsx)(`div`,{style:{padding:64,textAlign:`center`},children:(0,Q.jsx)(SG,{size:`large`})});if(!r)return(0,Q.jsx)(PR,{style:{margin:24},children:(0,Q.jsx)(pC,{description:`未找到复刻项目详情`})});let p=c.material_input,m=c.image_prompt_optimize,h=c.image_generate,g=c.video_prompt_optimize,_=c.video_generate,v=r.imageGeneration?.resultImageUrl||r.finalImageUrl,y=r.videoGeneration?.resultVideoCoverUrl||r.finalVideoCoverUrl,b=r.videoGeneration?.resultVideoUrl||r.finalVideoUrl,x=[{key:`material_input`,label:(0,Q.jsx)(D9,{index:1,stepCode:`material_input`,step:p,current:r.currentStepCode===`material_input`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`模块类型`,children:(0,Q.jsx)(p9,{status:l})}),(0,Q.jsx)(lV.Item,{label:`素材步骤ID`,children:r.material?.materialStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`参考素材项目名`,children:r.material?.sourceProjectName||`-`}),(0,Q.jsx)(lV.Item,{label:`生成项目名称`,children:r.material?.targetProjectName||`-`}),(0,Q.jsx)(lV.Item,{label:`核心内容点`,span:2,children:r.material?.coreContentPoint||`-`})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(320px, 1fr))`,gap:16},children:[(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J4,{}),`素材视频`]}),children:(0,Q.jsx)(o9,{type:`video`,url:r.material?.materialVideoUrl,emptyDescription:`暂无素材视频`})}),(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(v2,{}),`素材图片`]}),children:(0,Q.jsx)(o9,{type:`image`,url:r.material?.materialImageUrl,emptyDescription:`暂无素材图片`})})]}),O9(p?.errorMessage),(0,Q.jsx)(E9,{step:p})]})},{key:`image_prompt_optimize`,label:(0,Q.jsx)(D9,{index:2,stepCode:`image_prompt_optimize`,step:m,current:r.currentStepCode===`image_prompt_optimize`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`提词步骤ID`,children:r.imageGeneration?.promptStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`步骤状态`,children:(0,Q.jsx)(p9,{status:m?.status||r.imageGeneration?.status})}),(0,Q.jsx)(lV.Item,{label:`图片提示词`,span:2,children:yre(r.imageGeneration?.prompt,`暂无图片提示词`)})]}),O9(m?.errorMessage||r.imageGeneration?.errorMessage),(0,Q.jsx)(E9,{step:m})]})},{key:`image_generate`,label:(0,Q.jsx)(D9,{index:3,stepCode:`image_generate`,step:h,current:r.currentStepCode===`image_generate`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`生成步骤ID`,children:r.imageGeneration?.generateStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`Chat任务ID`,children:r.imageGeneration?.chatTaskId||`-`}),(0,Q.jsx)(lV.Item,{label:`状态`,children:(0,Q.jsx)(p9,{status:r.imageGeneration?.status||h?.status})}),(0,Q.jsx)(lV.Item,{label:`图片引擎ID`,children:r.imageGeneration?.engineId||`-`}),(0,Q.jsx)(lV.Item,{label:`图片引擎名称`,children:r.imageGeneration?.engineName||`-`}),(0,Q.jsx)(lV.Item,{label:`生成参数`,span:3,children:(0,Q.jsx)(a9,{value:r.imageGeneration?.params||{},maxHeight:160})})]}),O9(r.imageGeneration?.errorMessage||h?.errorMessage),(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(v2,{}),`图片结果`]}),children:(0,Q.jsx)(o9,{type:`image`,url:v,height:360,emptyDescription:h?.status===`failed`||r.imageGeneration?.errorMessage?`图片生成失败,未返回图片地址`:`暂无图片结果`,errorDescription:`图片资源加载失败,可能图片文件不存在、签名过期或访问权限受限。`})}),(0,Q.jsx)(E9,{step:h})]})},{key:`video_prompt_optimize`,label:(0,Q.jsx)(D9,{index:4,stepCode:`video_prompt_optimize`,step:g,current:r.currentStepCode===`video_prompt_optimize`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`提词步骤ID`,children:r.videoGeneration?.promptStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`步骤状态`,children:(0,Q.jsx)(p9,{status:g?.status})}),(0,Q.jsx)(lV.Item,{label:`提词参数`,span:3,children:(0,Q.jsx)(a9,{value:r.videoGeneration?.promptParams||{},maxHeight:160})})]}),O9(g?.errorMessage||r.videoGeneration?.errorMessage),(0,Q.jsx)(mre,{schema:r.videoGeneration?.promptSchema,finalPrompt:r.videoGeneration?.finalPrompt,schemaConfigSnapshot:r.videoGeneration?.schemaConfigSnapshot,schemaConfigSource:r.videoGeneration?.schemaConfigSource,schemaConfigVersion:r.videoGeneration?.schemaConfigVersion,schemaConfigIsFallback:r.videoGeneration?.schemaConfigIsFallback}),(0,Q.jsx)(E9,{step:g})]})},{key:`video_generate`,label:(0,Q.jsx)(D9,{index:5,stepCode:`video_generate`,step:_,current:r.currentStepCode===`video_generate`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`生成步骤ID`,children:r.videoGeneration?.generateStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`Chat任务ID`,children:r.videoGeneration?.chatTaskId||`-`}),(0,Q.jsx)(lV.Item,{label:`状态`,children:(0,Q.jsx)(p9,{status:r.videoGeneration?.status||_?.status})}),(0,Q.jsx)(lV.Item,{label:`视频引擎ID`,children:r.videoGeneration?.engineId||`-`}),(0,Q.jsx)(lV.Item,{label:`视频引擎名称`,children:r.videoGeneration?.engineName||`-`}),(0,Q.jsx)(lV.Item,{label:`生成参数`,span:3,children:(0,Q.jsx)(a9,{value:r.videoGeneration?.params||{},maxHeight:160})})]}),O9(r.videoGeneration?.errorMessage||_?.errorMessage),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(320px, 1fr))`,gap:16},children:[(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(v2,{}),`视频封面`]}),children:(0,Q.jsx)(o9,{type:`image`,url:y,emptyDescription:_?.status===`failed`||r.videoGeneration?.errorMessage?`视频生成失败,未返回封面`:`暂无视频封面`,errorDescription:`视频封面加载失败,可能文件不存在、签名过期或访问权限受限。`})}),(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(A6,{}),`最终视频`]}),children:(0,Q.jsx)(o9,{type:`video`,url:b,emptyDescription:_?.status===`failed`||r.videoGeneration?.errorMessage?`视频生成失败,未返回视频地址`:`暂无最终视频`,errorDescription:`视频资源加载失败,可能文件不存在、签名过期或访问权限受限。`})})]}),(0,Q.jsx)(E9,{step:_})]})}];return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{wrap:!0,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(Z1,{}),onClick:()=>n(-1),children:`返回`}),(0,Q.jsxs)(Z.Title,{level:3,style:{margin:0},children:[u,`项目详情`]}),(0,Q.jsx)(p9,{status:r.status}),r.module&&r.module!==e?(0,Q.jsxs)(NQ,{color:`gold`,children:[`接口模块:`,d9(r.module)]}):null]}),(0,Q.jsx)(qE,{onClick:s,loading:a,children:`刷新`})]}),(0,Q.jsx)(PR,{children:(0,Q.jsxs)(lV,{title:`基础信息`,column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`项目ID`,children:r.id}),(0,Q.jsx)(lV.Item,{label:`模块类型`,children:(0,Q.jsx)(p9,{status:l})}),(0,Q.jsx)(lV.Item,{label:`用户ID`,children:r.userId||`-`}),(0,Q.jsx)(lV.Item,{label:`用户名`,children:r.userName||`-`}),(0,Q.jsx)(lV.Item,{label:`标题`,children:r.title||`-`}),(0,Q.jsx)(lV.Item,{label:`当前步骤`,children:(0,Q.jsx)(Ow,{title:r.currentStepCode||``,children:f9(r.currentStepCode)})}),(0,Q.jsx)(lV.Item,{label:`状态`,children:(0,Q.jsx)(p9,{status:r.status})}),(0,Q.jsx)(lV.Item,{label:`创建时间`,children:w9(r.createdAt)}),(0,Q.jsx)(lV.Item,{label:`更新时间`,children:w9(r.updatedAt)}),(0,Q.jsx)(lV.Item,{label:`完成时间`,children:w9(r.completedAt)}),r.errorMessage?(0,Q.jsx)(lV.Item,{label:`错误信息`,span:3,children:(0,Q.jsx)(sf,{type:`error`,showIcon:!0,message:r.errorMessage})}):null]})}),(0,Q.jsx)(PR,{title:`步骤进度`,children:(0,Q.jsx)(Cq,{items:d})}),(0,Q.jsx)(PR,{title:`最终结果预览`,children:(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(280px, 1fr))`,gap:16},children:[(0,Q.jsx)(PR,{size:`small`,title:`最终图片`,children:(0,Q.jsx)(o9,{type:`image`,url:r.finalImageUrl||r.imageGeneration?.resultImageUrl,height:220,emptyDescription:`暂无最终图片`})}),(0,Q.jsx)(PR,{size:`small`,title:`最终视频封面`,children:(0,Q.jsx)(o9,{type:`image`,url:r.finalVideoCoverUrl||r.videoGeneration?.resultVideoCoverUrl,height:220,emptyDescription:`暂无最终视频封面`})}),(0,Q.jsx)(PR,{size:`small`,title:`最终视频`,children:(0,Q.jsx)(o9,{type:`video`,url:r.finalVideoUrl||r.videoGeneration?.resultVideoUrl,height:220,emptyDescription:`暂无最终视频`})})]})}),(0,Q.jsx)(Ng,{defaultActiveKey:f,items:x}),(0,Q.jsx)(Ng,{items:[{key:`steps-table`,label:`完整步骤列表`,children:(0,Q.jsx)(bQ,{rowKey:`id`,size:`small`,pagination:!1,dataSource:r.steps||[],scroll:{x:1100},columns:[{title:`序号`,dataIndex:`stepIndex`,width:70},{title:`步骤`,dataIndex:`stepCode`,width:160,render:e=>(0,Q.jsx)(Ow,{title:e,children:f9(e)})},{title:`状态`,dataIndex:`status`,width:120,render:e=>(0,Q.jsx)(p9,{status:e})},{title:`版本`,dataIndex:`version`,width:70},{title:`当前有效`,dataIndex:`isCurrent`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`success`,children:`是`}):(0,Q.jsx)(NQ,{children:`否`})},{title:`Chat任务`,dataIndex:`chatTaskId`,width:160,render:e=>(0,Q.jsx)(Ow,{title:e||``,children:T9(e)})},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:w9},{title:`完成时间`,dataIndex:`completedAt`,width:170,render:w9},{title:`错误`,dataIndex:`errorMessage`,ellipsis:!0,render:e=>e||`-`}]})},{key:`raw-detail`,label:`完整详情原始 JSON`,children:(0,Q.jsx)(a9,{value:r,maxHeight:520})}]})]})})},bre=()=>(0,Q.jsx)(k9,{moduleType:`hot_opening_replicate`}),A9=20,xre=[{value:`pending_analysis`,label:`等待分析`},{value:`analyzing`,label:`分析中`},{value:`analysis_completed`,label:`分析完成`},{value:`analysis_failed`,label:`分析失败`},{value:`splitting`,label:`拆镜中`},{value:`split_completed`,label:`拆镜完成`},{value:`partial_failed`,label:`部分失败`},{value:`failed`,label:`失败`}],Sre=[{value:`pending`,label:`待分析`},{value:`processing`,label:`分析中`},{value:`completed`,label:`分析完成`},{value:`failed`,label:`分析失败`}],Cre=[{value:`none`,label:`未拆镜`},{value:`pending`,label:`待拆镜`},{value:`processing`,label:`拆镜中`},{value:`completed`,label:`拆镜完成`},{value:`failed`,label:`拆镜失败`},{value:`retry_waiting`,label:`等待重试`}],wre={pending_analysis:{color:`default`,text:`等待分析`},analyzing:{color:`processing`,text:`分析中`},analysis_completed:{color:`success`,text:`分析完成`},analysis_failed:{color:`error`,text:`分析失败`},splitting:{color:`warning`,text:`拆镜中`},split_completed:{color:`success`,text:`拆镜完成`},partial_failed:{color:`orange`,text:`部分失败`},failed:{color:`error`,text:`失败`},none:{color:`default`,text:`未拆镜`},pending:{color:`default`,text:`待处理`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`完成`},retry_waiting:{color:`orange`,text:`等待重试`}},j9=e=>e?Z5(e):`-`,M9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,N9=({status:e})=>{if(!e)return(0,Q.jsx)(NQ,{children:`-`});let t=wre[e]||{color:`blue`,text:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.text})},Tre=()=>{let e=Ye(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(1),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(``),[h,g]=(0,S.useState)(``),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(null),[w,T]=(0,S.useState)(``),[E,D]=(0,S.useState)(``),[O,k]=(0,S.useState)(``),[A,j]=(0,S.useState)(null),[M,N]=(0,S.useState)(0),P=(0,S.useCallback)(async()=>{o(!0);try{let e=await b5({status:l||void 0,analysisStatus:d||void 0,splitStatus:p||void 0,keyword:w||void 0,userId:E||void 0,userName:O||void 0,createdStart:A?.[0]?.toISOString?.(),createdEnd:A?.[1]?.toISOString?.(),page:s,pageSize:A9});n(e.items||[]),i(e.total||0)}catch(e){LG.error(e?.message||`加载拆镜复刻任务失败`)}finally{o(!1)}},[d,s,A,w,E,O,p,l]);(0,S.useEffect)(()=>{P()},[P,M]);let F=()=>{T(h.trim()),D(_.trim()),k(y.trim()),j(x),c(1)};return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsx)(PR,{children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{align:`center`,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:3,style:{marginBottom:4},children:`拆镜复刻`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`只读排查页面:查看拆镜总任务、AI 分析结果、切片列表和关联复刻项目。`})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>N(e=>e+1),children:`刷新`})]}),(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`总任务状态`,style:{width:150},value:l||void 0,onChange:e=>{u(e||``),c(1)},options:xre}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`分析状态`,style:{width:140},value:d||void 0,onChange:e=>{f(e||``),c(1)},options:Sre}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`拆镜状态`,style:{width:140},value:p||void 0,onChange:e=>{m(e||``),c(1)},options:Cre}),(0,Q.jsx)(hW,{allowClear:!0,prefix:(0,Q.jsx)(NC,{}),placeholder:`关键词:标题/内容/分类/受众`,style:{width:260},value:h,onChange:e=>g(e.target.value),onPressEnter:F}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户ID(管理员)`,style:{width:190},value:_,onChange:e=>v(e.target.value),onPressEnter:F}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户名(管理员)`,style:{width:230},value:y,onChange:e=>b(e.target.value),onPressEnter:F}),(0,Q.jsx)(YB.RangePicker,{showTime:!0,value:x,onChange:C,placeholder:[`创建开始`,`创建结束`]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(NC,{}),onClick:F,children:`搜索`}),(0,Q.jsx)(qE,{onClick:()=>{u(``),f(``),m(``),g(``),v(``),b(``),C(null),T(``),D(``),k(``),j(null),c(1),N(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:a,dataSource:t,pagination:{current:s,pageSize:A9,total:r,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:c},scroll:{x:1500},columns:[{title:`任务集ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Ow,{title:e,children:M9(e)})},{title:`用户`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(Z.Text,{children:t.userName||`-`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:M9(t.userId)})]})},{title:`任务信息`,width:300,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:2,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.title||`-`}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:280},children:[`分类:`,t.originalVideoCategory||`-`]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:280},children:[`受众:`,t.originalVideoAudience||`-`]})]})},{title:`总状态`,dataIndex:`status`,width:120,render:e=>(0,Q.jsx)(N9,{status:e})},{title:`分析状态`,dataIndex:`analysisStatus`,width:110,render:e=>(0,Q.jsx)(N9,{status:e})},{title:`拆镜状态`,dataIndex:`splitStatus`,width:110,render:e=>(0,Q.jsx)(N9,{status:e})},{title:`切片进度`,width:180,render:(e,t)=>{let n=t.segmentCount||0,r=t.completedSegmentCount||0;return(0,Q.jsx)(CK,{size:`small`,percent:n?Math.round(r/n*100):0,format:()=>`${r}/${n}`})}},{title:`失败片段`,dataIndex:`failedSegmentCount`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`error`,children:e}):(0,Q.jsx)(NQ,{children:`0`})},{title:`视频时长`,dataIndex:`videoDurationSeconds`,width:100,render:e=>`${Number(e||0).toFixed(1)}s`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:j9},{title:`更新时间`,dataIndex:`updatedAt`,width:170,render:j9},{title:`操作`,fixed:`right`,width:120,render:(t,n)=>(0,Q.jsx)(qE,{type:`link`,icon:(0,Q.jsx)(qU,{}),onClick:()=>e(`/shot-replications/task-sets/${n.id}`),children:`查看切片`})}]})]})})})},Ere=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),P9=20,Dre=[{value:`ai_suggestion`,label:`AI 建议`},{value:`custom`,label:`自定义`}],Ore=[{value:`none`,label:`未拆镜`},{value:`pending`,label:`待拆镜`},{value:`processing`,label:`拆镜中`},{value:`completed`,label:`拆镜完成`},{value:`failed`,label:`拆镜失败`},{value:`retry_waiting`,label:`等待重试`}],kre=[{value:`not_required`,label:`无需分析`},{value:`pending`,label:`待分析`},{value:`processing`,label:`分析中`},{value:`completed`,label:`分析完成`},{value:`failed`,label:`分析失败`}],Are=[{value:`not_started`,label:`未复刻`},{value:`project_created`,label:`已创建项目`},{value:`processing`,label:`复刻中`},{value:`completed`,label:`复刻完成`},{value:`failed`,label:`复刻失败`}],jre={pending_analysis:{color:`default`,text:`等待分析`},analyzing:{color:`processing`,text:`分析中`},analysis_completed:{color:`success`,text:`分析完成`},analysis_failed:{color:`error`,text:`分析失败`},splitting:{color:`warning`,text:`拆镜中`},split_completed:{color:`success`,text:`拆镜完成`},partial_failed:{color:`orange`,text:`部分失败`},failed:{color:`error`,text:`失败`},none:{color:`default`,text:`未拆镜`},pending:{color:`default`,text:`待处理`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`完成`},retry_waiting:{color:`orange`,text:`等待重试`},not_required:{color:`default`,text:`无需分析`},not_started:{color:`default`,text:`未复刻`},project_created:{color:`processing`,text:`已创建项目`}},Mre=e=>{if(!e)return``;let t=String(e).trim();return t?/^(https?:)?\/\//i.test(t)||/^(blob|data):/i.test(t)?t:`${Ere}${t.startsWith(`/`)?t:`/${t}`}`:``},F9=e=>e?Z5(e):`-`,I9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,L9=({status:e})=>{if(!e)return(0,Q.jsx)(NQ,{children:`-`});let t=jre[e]||{color:`blue`,text:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.text})},R9=({value:e,maxHeight:t=420})=>(0,Q.jsx)(`pre`,{style:{margin:0,padding:12,maxHeight:t,overflow:`auto`,background:`#0f172a`,color:`#e2e8f0`,borderRadius:8,fontSize:12,lineHeight:1.6},children:JSON.stringify(e??{},null,2)}),z9=({url:e,height:t=280})=>e?(0,Q.jsx)(`video`,{src:Mre(e),controls:!0,preload:`metadata`,style:{width:`100%`,maxHeight:t,borderRadius:12,background:`#0f172a`}}):(0,Q.jsx)(pC,{description:`暂无视频`,image:pC.PRESENTED_IMAGE_SIMPLE}),Nre=({items:e=[]})=>(0,Q.jsx)(bQ,{rowKey:`index`,size:`small`,pagination:!1,dataSource:e,scroll:{x:!0},columns:[{title:`序号`,dataIndex:`index`,width:70},{title:`时间节点`,dataIndex:`timeNode`,width:120},{title:`开始`,dataIndex:`startSecond`,width:80,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`结束`,dataIndex:`endSecond`,width:80,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`内容`,dataIndex:`content`,ellipsis:!0},{title:`分类`,dataIndex:`category`,width:140},{title:`受众`,dataIndex:`audience`,ellipsis:!0}]}),Pre=()=>{let{taskSetId:e}=$e(),t=Ye(),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(0),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(null),k=(0,S.useCallback)(async()=>{if(e){d(!0);try{r(await x5(e))}catch(e){LG.error(e?.message||`加载拆镜任务详情失败`)}finally{d(!1)}}},[e]),A=(0,S.useCallback)(async()=>{if(e){p(!0);try{let t=await S5(e,{sourceMode:g||void 0,splitStatus:v||void 0,analysisStatus:b||void 0,replicateStatus:C||void 0,page:c,pageSize:P9});a(t.items||[]),s(t.total||0)}catch(e){LG.error(e?.message||`加载拆镜片段失败`)}finally{p(!1)}}},[b,c,C,g,v,e]);(0,S.useEffect)(()=>{k()},[k,m]),(0,S.useEffect)(()=>{A()},[A,m]);let j=async e=>{E(!0),O(null);try{O(await C5(e))}catch(e){LG.error(e?.message||`加载片段详情失败`)}};return u&&!n?(0,Q.jsx)(`div`,{style:{padding:64,textAlign:`center`},children:(0,Q.jsx)(SG,{size:`large`})}):n?(0,Q.jsxs)(`div`,{style:{padding:24},children:[(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(Z1,{}),onClick:()=>t(`/shot-replications`),children:`返回列表`}),(0,Q.jsx)(Z.Title,{level:3,style:{margin:0},children:`拆镜任务详情`}),(0,Q.jsx)(L9,{status:n.status})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>h(e=>e+1),children:`刷新`})]}),(0,Q.jsx)(PR,{children:(0,Q.jsxs)(lV,{title:`总任务信息`,column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`任务集ID`,children:n.id}),(0,Q.jsx)(lV.Item,{label:`用户ID`,children:n.userId||`-`}),(0,Q.jsx)(lV.Item,{label:`用户名`,children:n.userName||`-`}),(0,Q.jsx)(lV.Item,{label:`标题`,children:n.title||`-`}),(0,Q.jsxs)(lV.Item,{label:`视频时长`,children:[Number(n.videoDurationSeconds||0).toFixed(2),`s`]}),(0,Q.jsx)(lV.Item,{label:`总状态`,children:(0,Q.jsx)(L9,{status:n.status})}),(0,Q.jsx)(lV.Item,{label:`分析状态`,children:(0,Q.jsx)(L9,{status:n.analysisStatus})}),(0,Q.jsx)(lV.Item,{label:`拆镜状态`,children:(0,Q.jsx)(L9,{status:n.splitStatus})}),(0,Q.jsxs)(lV.Item,{label:`片段数量`,children:[n.completedSegmentCount,`/`,n.segmentCount,`,失败 `,n.failedSegmentCount]}),(0,Q.jsx)(lV.Item,{label:`原视频分类`,children:n.originalVideoCategory||`-`}),(0,Q.jsx)(lV.Item,{label:`创建时间`,children:F9(n.createdAt)}),(0,Q.jsx)(lV.Item,{label:`更新时间`,children:F9(n.updatedAt)}),(0,Q.jsx)(lV.Item,{label:`原视频内容`,span:3,children:n.originalVideoContent||`-`}),(0,Q.jsx)(lV.Item,{label:`原视频受众`,span:3,children:n.originalVideoAudience||`-`}),n.analysisErrorMessage?(0,Q.jsx)(lV.Item,{label:`分析错误`,span:3,children:(0,Q.jsx)(sf,{type:`error`,message:n.analysisErrorMessage})}):null,n.splitErrorMessage?(0,Q.jsx)(lV.Item,{label:`拆镜错误`,span:3,children:(0,Q.jsx)(sf,{type:`error`,message:n.splitErrorMessage})}):null]})}),(0,Q.jsx)(PR,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J4,{}),`原视频预览`]}),children:(0,Q.jsx)(z9,{url:n.videoUrl,height:360})}),(0,Q.jsxs)(PR,{title:`AI 建议拆镜列表`,children:[n.aiSuggestions?.length?(0,Q.jsx)(Nre,{items:n.aiSuggestions}):(0,Q.jsx)(pC,{description:`暂无 AI 建议拆镜`}),(0,Q.jsx)(Ng,{size:`small`,ghost:!0,style:{marginTop:12},items:[{key:`raw`,label:`查看原视频分析完整 JSON`,children:(0,Q.jsx)(R9,{value:n.analysisResultJson})}]})]}),(0,Q.jsxs)(PR,{title:`片段列表`,children:[(0,Q.jsxs)(VV,{wrap:!0,style:{marginBottom:16},children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`片段来源`,style:{width:140},value:g||void 0,options:Dre,onChange:e=>{_(e||``),l(1)}}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`切割状态`,style:{width:140},value:v||void 0,options:Ore,onChange:e=>{y(e||``),l(1)}}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`分析状态`,style:{width:140},value:b||void 0,options:kre,onChange:e=>{x(e||``),l(1)}}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`复刻状态`,style:{width:150},value:C||void 0,options:Are,onChange:e=>{w(e||``),l(1)}}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(NC,{}),onClick:()=>h(e=>e+1),children:`筛选`}),(0,Q.jsx)(qE,{onClick:()=>{_(``),y(``),x(``),w(``),l(1),h(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:f,dataSource:i,pagination:{current:c,pageSize:P9,total:o,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:l},scroll:{x:1550},columns:[{title:`片段ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Ow,{title:e,children:I9(e)})},{title:`序号`,dataIndex:`segmentIndex`,width:70},{title:`来源`,dataIndex:`sourceMode`,width:100,render:e=>e===`ai_suggestion`?(0,Q.jsx)(NQ,{color:`purple`,children:`AI建议`}):(0,Q.jsx)(NQ,{color:`cyan`,children:`自定义`})},{title:`时间节点`,dataIndex:`timeNode`,width:130},{title:`时长`,dataIndex:`durationSeconds`,width:90,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`切割`,dataIndex:`splitStatus`,width:100,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`分析`,dataIndex:`analysisStatus`,width:100,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`复刻`,dataIndex:`replicateStatus`,width:110,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`片段内容`,dataIndex:`segmentContent`,width:260,ellipsis:!0,render:e=>e||`-`},{title:`分类`,dataIndex:`segmentCategory`,width:120,render:e=>e||`-`},{title:`关联项目`,width:220,render:(e,n)=>n.moduleProjectId?(0,Q.jsxs)(VV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(qE,{type:`link`,style:{padding:0},onClick:()=>t(`/shot-replications/projects/${n.moduleProjectId}`),children:I9(n.moduleProjectId)}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:n.moduleProjectTitle||f9(n.moduleProjectCurrentStepCode)}),(0,Q.jsx)(L9,{status:n.moduleProjectStatus})]}):(0,Q.jsx)(NQ,{children:`未创建`})},{title:`错误`,dataIndex:`splitLastError`,width:220,ellipsis:!0,render:(e,t)=>e||t.analysisErrorMessage||`-`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:F9},{title:`操作`,fixed:`right`,width:100,render:(e,t)=>(0,Q.jsx)(qE,{type:`link`,icon:(0,Q.jsx)(qU,{}),onClick:()=>j(t.id),children:`详情`})}]})]})]}),(0,Q.jsx)(MV,{title:`片段详情`,width:720,open:T,onClose:()=>E(!1),destroyOnClose:!0,children:D?(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`片段ID`,span:2,children:D.id}),(0,Q.jsx)(lV.Item,{label:`时间节点`,children:D.timeNode}),(0,Q.jsxs)(lV.Item,{label:`时长`,children:[Number(D.durationSeconds||0).toFixed(2),`s`]}),(0,Q.jsx)(lV.Item,{label:`切割状态`,children:(0,Q.jsx)(L9,{status:D.splitStatus})}),(0,Q.jsx)(lV.Item,{label:`分析状态`,children:(0,Q.jsx)(L9,{status:D.analysisStatus})}),(0,Q.jsx)(lV.Item,{label:`复刻状态`,children:(0,Q.jsx)(L9,{status:D.replicateStatus})}),(0,Q.jsx)(lV.Item,{label:`关联项目`,children:D.moduleProjectId?(0,Q.jsx)(qE,{type:`link`,onClick:()=>t(`/shot-replications/projects/${D.moduleProjectId}`),children:D.moduleProjectId}):`-`}),(0,Q.jsx)(lV.Item,{label:`片段内容`,span:2,children:D.segmentContent||`-`}),(0,Q.jsx)(lV.Item,{label:`片段分类`,children:D.segmentCategory||`-`}),(0,Q.jsx)(lV.Item,{label:`片段受众`,children:D.segmentAudience||`-`})]}),(0,Q.jsx)(PR,{size:`small`,title:`片段视频`,children:(0,Q.jsx)(z9,{url:D.segmentVideoUrl,height:300})}),D.splitLastError?(0,Q.jsx)(sf,{type:`error`,message:`切割错误`,description:D.splitLastError}):null,D.analysisErrorMessage?(0,Q.jsx)(sf,{type:`error`,message:`分析错误`,description:D.analysisErrorMessage}):null,(0,Q.jsx)(Ng,{size:`small`,items:[{key:`analysis`,label:`片段分析 JSON`,children:(0,Q.jsx)(R9,{value:D.analysisJson})},{key:`suggestion`,label:`AI 建议原始 JSON`,children:(0,Q.jsx)(R9,{value:D.aiSuggestionJson})}]})]}):(0,Q.jsx)(SG,{})})]}):(0,Q.jsx)(PR,{style:{margin:24},children:(0,Q.jsx)(pC,{description:`未找到拆镜任务详情`})})},{Title:Fre,Text:B9,Paragraph:Ire}=Z,{TextArea:V9}=hW,H9=[{label:`对象`,value:`object`},{label:`数组`,value:`array`},{label:`字符串`,value:`string`},{label:`数字`,value:`number`},{label:`布尔`,value:`boolean`},{label:`流程数组`,value:`flow`}],U9=`画面属性`,Lre=new Set([`视频时长`,`视频比例`,`清晰度`,`帧率`,`推荐分辨率`]);function W9(e,t){return e===U9&&!!t&&Lre.has(t)}function G9(e){return e===U9}function Rre(e){return JSON.parse(JSON.stringify(e??null))}function K9(e,t,n,r){return!e||typeof e!=`object`?r:e[t]===void 0?e[n]===void 0?r:e[n]:e[t]}function zre(e){return{key:String(e?.key||e?.label||`新流程字段`),label:String(e?.label||e?.key||`新流程字段`),enabled:e?.enabled??!0,editable:e?.editable??!0,maxLength:Number(K9(e,`maxLength`,`max_length`,800)||800),value:e?.value??``}}function q9(e){let t=String(e?.type||`string`),n={key:String(e?.key||e?.label||`新字段`),label:String(e?.label||e?.key||`新字段`),type:t,enabled:e?.enabled??!0,editable:e?.editable??!0,maxLength:Number(K9(e,`maxLength`,`max_length`,t===`flow`?800:1e3)||(t===`flow`?800:1e3))};if(t===`object`)n.children=Array.isArray(e?.children)?e.children.map(q9):[];else if(t===`flow`){n.contentKey=String(K9(e,`contentKey`,`content_key`,e?.key===`镜头流程`?`镜头内容`:`动作内容`));let t=K9(e,`contentAliases`,`content_aliases`,[]);n.contentAliases=Array.isArray(t)?t.map(e=>String(e)).filter(Boolean):[];let r=K9(e,`itemFields`,`item_fields`,[]);n.itemFields=Array.isArray(r)&&r.length>0?r.map(zre):[{key:n.contentKey,label:n.contentKey,enabled:!0,editable:!0,maxLength:n.maxLength||800,value:``}]}else n.value=e?.value??(t===`array`?[]:t===`boolean`?!1:t===`number`?0:`无`);return n}function Bre(e){let t=Array.isArray(e?.segments)?e.segments:[],n=Array.isArray(e?.ratios)?e.ratios:[];return{minDuration:Number(K9(e,`minDuration`,`min_duration`,1)||1),maxDuration:Number(K9(e,`maxDuration`,`max_duration`,5)||5),ratios:n.map(e=>Number(e||0)),segments:t.map(e=>({stage:String(e?.stage||`新阶段`),description:String(e?.description||e?.desc||`阶段说明`)}))}}function J9(e){let t=Array.isArray(e?.sections)?e.sections:[],n=Array.isArray(e?.timePlanRules)?e.timePlanRules:Array.isArray(e?.time_plan_rules)?e.time_plan_rules:[];return{version:e?.version||`video_prompt_schema_config_v1`,enabled:e?.enabled??!0,sections:t.map(q9),timePlanRules:n.map(Bre)}}function Y9(e,t){let n=G9(e.key),r=W9(t,e.key),i={key:e.key,label:e.label,type:r?`string`:e.type,enabled:n||r?!0:!!e.enabled,editable:r?!1:!!e.editable,max_length:e.maxLength};return e.type===`object`?i.children=(e.children||[]).map(t=>Y9(t,e.key)):e.type===`flow`?(i.content_key=e.contentKey,i.content_aliases=e.contentAliases||[],i.item_fields=(e.itemFields||[]).map(e=>({key:e.key,label:e.label,enabled:!!e.enabled,editable:!!e.editable,max_length:e.maxLength,value:e.value??``}))):i.value=e.value,i}function X9(e,t){return{version:e.version,enabled:t,sections:(e.sections||[]).map(e=>Y9(e)),time_plan_rules:(e.timePlanRules||[]).map(e=>({min_duration:e.minDuration,max_duration:e.maxDuration,ratios:e.ratios||[],segments:(e.segments||[]).map(e=>({stage:e.stage,description:e.description}))}))}}function Z9(e){return e?.runtimeSchema||e?.runtime_schema||{}}function Q9(e){let t=e?.timePlan||e?.time_plan||Z9(e)?.动态时间规划||[];return Array.isArray(t)?t:[]}function Vre(e){return e?.schemaConfigSnapshot||e?.schema_config_snapshot||{}}function Hre(e,t){let n=new Blob([JSON.stringify(t,null,2)],{type:`application/json;charset=utf-8`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=e,i.click(),URL.revokeObjectURL(r)}var $9=(e=`string`)=>({key:`新字段`,label:`新字段`,type:e,enabled:!0,editable:!0,maxLength:e===`flow`?800:1e3,value:e===`array`?[]:e===`boolean`?!1:e===`number`?0:`无`,children:e===`object`?[]:void 0,contentKey:e===`flow`?`动作内容`:void 0,contentAliases:e===`flow`?[`动作内容`,`动作`,`动作说明`,`内容`,`说明`]:void 0,itemFields:e===`flow`?[{key:`动作内容`,label:`动作内容`,enabled:!0,editable:!0,maxLength:800,value:``}]:void 0}),Ure=()=>({minDuration:1,maxDuration:5,ratios:[.2,.4,.4],segments:[{stage:`开场吸引`,description:`快速吸引注意力`},{stage:`核心展示`,description:`展示主体动作、核心卖点或主要视觉内容`},{stage:`收尾引导`,description:`给出行动引导并稳定落版`}]}),Wre=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!0),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(null),[g]=X.useForm(),_=(0,S.useRef)(null),v=c?.sections||[],y=c?.timePlanRules||[],b=async()=>{t(!0);try{let e=await T5();a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),l(J9(e.data)),d(J9(e.defaultData??e.default_data))}catch(e){LG.error(e?.message||`加载失败`)}finally{t(!1)}};(0,S.useEffect)(()=>{b()},[]);let x=e=>{l(t=>{let n=J9(Rre(t));return e(n),n})},C=async()=>{if(c){r(!0);try{let e=await E5({is_enabled:i,data:X9(c,i)});l(J9(e.data)),a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),LG.success(`保存成功`)}catch(e){LG.error(e?.message||`保存失败`)}finally{r(!1)}}},w=async()=>{r(!0);try{let e=await D5();l(J9(e.data)),d(J9(e.defaultData??e.default_data)),a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),LG.success(`已恢复默认配置`)}catch(e){LG.error(e?.message||`恢复默认失败`)}finally{r(!1)}},T=async()=>{try{Hre(`video_prompt_schema_config.json`,await O5())}catch(e){LG.error(e?.message||`导出失败`)}},E=async e=>{let t=e.target.files?.[0];if(e.target.value=``,t)try{let e=await t.text(),n=JSON.parse(e),r=n.data||n,o=await k5({is_enabled:!!(n.isEnabled??n.is_enabled??i),data:r});l(J9(o.data)),a(!!(o.isEnabled??o.is_enabled??o.data?.enabled??!1)),s(!!(o.usingDefault??o.using_default??!1)),LG.success(`导入成功`)}catch(e){LG.error(e?.message||`导入失败,请检查 JSON 格式`)}},D=()=>{g.setFieldsValue({duration:8,aspectRatio:`9:16`,resolution:`1080p`,frameRate:`30fps`}),h(null),p(!0)},O=async()=>{if(!c)return;let e=await g.validateFields();try{h(await A5({is_enabled:i,data:X9(c,i),duration:Number(e.duration||8),aspect_ratio:e.aspectRatio,resolution:e.resolution,frame_rate:e.frameRate}))}catch(e){LG.error(e?.message||`预览失败`)}},k=()=>{x(e=>{e.sections.push($9(`object`))})},A=(e,t)=>{x(n=>{let r=n.sections[e];G9(r?.key)&&(delete t.key,delete t.type,delete t.enabled),n.sections[e]={...n.sections[e],...t},t.type===`object`&&(n.sections[e].children=n.sections[e].children||[]),t.type===`flow`&&(n.sections[e].contentKey=n.sections[e].contentKey||`动作内容`,n.sections[e].contentAliases=n.sections[e].contentAliases||[`动作内容`,`动作`,`动作说明`,`内容`,`说明`],n.sections[e].itemFields=n.sections[e].itemFields||[{key:`动作内容`,label:`动作内容`,enabled:!0,editable:!0,maxLength:800,value:``}])})},j=e=>{x(t=>{t.sections.splice(e,1)})},M=e=>{x(t=>{let n=t.sections[e];n.children=n.children||[],n.children.push($9(`string`))})},N=(e,t,n)=>{x(r=>{let i=r.sections[e],a=i.children||[],o=a[t];W9(i?.key,o?.key)&&(delete n.key,delete n.type,delete n.enabled,n.editable=!1),a[t]={...a[t],...n},r.sections[e].children=a})},P=(e,t)=>{x(n=>{n.sections[e].children?.splice(t,1)})},F=e=>{x(t=>{let n=t.sections[e];n.itemFields=n.itemFields||[],n.itemFields.push({key:`新流程字段`,label:`新流程字段`,enabled:!0,editable:!0,maxLength:800,value:``})})},I=(e,t,n)=>{x(r=>{let i=r.sections[e].itemFields||[];i[t]={...i[t],...n},r.sections[e].itemFields=i})},L=(e,t)=>{x(n=>{n.sections[e].itemFields?.splice(t,1)})},R=()=>{x(e=>{e.timePlanRules.push(Ure())})},z=(e,t)=>{x(n=>{n.timePlanRules[e]={...n.timePlanRules[e],...t}})},B=e=>{x(t=>{t.timePlanRules.splice(e,1)})},V=(e,t,n)=>{x(r=>{let i=r.timePlanRules[e];n.ratio!==void 0&&(i.ratios[t]=Number(n.ratio||0)),n.stage!==void 0&&(i.segments[t].stage=n.stage),n.description!==void 0&&(i.segments[t].description=n.description)})},H=e=>{x(t=>{let n=t.timePlanRules[e];n.ratios.push(1),n.segments.push({stage:`新阶段`,description:`阶段说明`})})},U=(e,t)=>{x(n=>{let r=n.timePlanRules[e];r.ratios.splice(t,1),r.segments.splice(t,1)})},W=(0,S.useMemo)(()=>v.map((e,t)=>({key:`section-${t}`,label:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(B9,{strong:!0,children:e.label||e.key||`未命名分组`}),e.key&&e.key!==e.label&&(0,Q.jsxs)(NQ,{color:`blue`,children:[`key: `,e.key]}),(0,Q.jsx)(NQ,{children:e.type}),G9(e.key)&&(0,Q.jsx)(NQ,{color:`red`,children:`系统锁定`}),!e.enabled&&!G9(e.key)&&(0,Q.jsx)(NQ,{color:`default`,children:`已禁用`})]}),children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsxs)(DK,{gutter:12,align:`middle`,children:[(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`key`,value:e.key,maxLength:64,placeholder:`传给 AI 的字段名`,disabled:G9(e.key),onChange:e=>A(t,{key:e.target.value})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`label`,value:e.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>A(t,{label:e.target.value})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(RC,{value:e.type,options:H9,style:{width:`100%`},disabled:G9(e.key),onChange:e=>A(t,{type:e})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`启用`,(0,Q.jsx)(Mq,{checked:G9(e.key)?!0:e.enabled,disabled:G9(e.key),onChange:e=>A(t,{enabled:e})})]})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`可编辑`,(0,Q.jsx)(Mq,{checked:e.editable,onChange:e=>A(t,{editable:e})})]})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,max:2e4,value:e.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>A(t,{maxLength:Number(e||1e3)})})}),(0,Q.jsx)(pz,{span:2,style:{textAlign:`right`},children:(0,Q.jsx)(WG,{title:`确认删除该分组?`,disabled:G9(e.key),onConfirm:()=>j(t),children:(0,Q.jsx)(qE,{danger:!0,icon:(0,Q.jsx)(IQ,{}),disabled:G9(e.key)})})})]}),e.type===`object`&&(0,Q.jsx)(PR,{size:`small`,title:`对象字段`,extra:(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(TL,{}),onClick:()=>M(t),children:`新增字段`}),children:(0,Q.jsx)(VV,{direction:`vertical`,style:{width:`100%`},children:(e.children||[]).map((n,r)=>(0,Q.jsxs)(DK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`key`,value:n.key,maxLength:64,placeholder:`传给 AI 的字段名`,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{key:e.target.value})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`label`,value:n.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>N(t,r,{label:e.target.value})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(RC,{value:n.type,options:H9.filter(e=>e.value!==`object`&&e.value!==`flow`),style:{width:`100%`},disabled:W9(e.key,n.key),onChange:e=>N(t,r,{type:e})})}),(0,Q.jsx)(pz,{span:2,children:(0,Q.jsxs)(VV,{children:[`启用`,(0,Q.jsx)(Mq,{checked:W9(e.key,n.key)?!0:n.enabled,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{enabled:e})})]})}),(0,Q.jsx)(pz,{span:2,children:(0,Q.jsxs)(VV,{children:[`编辑`,(0,Q.jsx)(Mq,{checked:W9(e.key,n.key)?!1:n.editable,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{editable:e})})]})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(oB,{min:1,max:2e4,value:n.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>N(t,r,{maxLength:Number(e||1e3)})})}),(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{value:Array.isArray(n.value)?n.value.join(`/`):String(n.value??``),maxLength:n.maxLength||1e3,placeholder:`默认值`,onChange:e=>N(t,r,{value:n.type===`array`?e.target.value.split(`/`).filter(Boolean):e.target.value})})}),(0,Q.jsx)(pz,{span:1,style:{textAlign:`right`},children:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),disabled:W9(e.key,n.key),onClick:()=>P(t,r)})})]},`child-${t}-${r}`))})}),e.type===`flow`&&(0,Q.jsxs)(PR,{size:`small`,title:`流程数组对象字段`,extra:(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(TL,{}),onClick:()=>F(t),children:`新增流程字段`}),children:[(0,Q.jsxs)(DK,{gutter:12,style:{marginBottom:12},children:[(0,Q.jsx)(pz,{span:6,children:(0,Q.jsx)(hW,{addonBefore:`内容字段`,value:e.contentKey,maxLength:64,onChange:e=>A(t,{contentKey:e.target.value})})}),(0,Q.jsx)(pz,{span:18,children:(0,Q.jsx)(hW,{addonBefore:`别名 / 分隔`,value:(e.contentAliases||[]).join(`/`),onChange:e=>A(t,{contentAliases:e.target.value.split(`/`).map(e=>e.trim()).filter(Boolean)})})})]}),(0,Q.jsx)(VV,{direction:`vertical`,style:{width:`100%`},children:(e.itemFields||[]).map((e,n)=>(0,Q.jsxs)(DK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{addonBefore:`key`,value:e.key,maxLength:64,placeholder:`流程对象字段名`,onChange:e=>I(t,n,{key:e.target.value})})}),(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{addonBefore:`label`,value:e.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>I(t,n,{label:e.target.value})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`启用`,(0,Q.jsx)(Mq,{checked:e.enabled,onChange:e=>I(t,n,{enabled:e})})]})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`编辑`,(0,Q.jsx)(Mq,{checked:e.editable,onChange:e=>I(t,n,{editable:e})})]})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,max:2e4,value:e.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>I(t,n,{maxLength:Number(e||800)})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(hW,{value:String(e.value??``),maxLength:e.maxLength||800,placeholder:`默认值`,onChange:e=>I(t,n,{value:e.target.value})})}),(0,Q.jsx)(pz,{span:1,style:{textAlign:`right`},children:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),onClick:()=>L(t,n)})})]},`flow-${t}-${n}`))})]}),e.type!==`object`&&e.type!==`flow`&&(0,Q.jsx)(PR,{size:`small`,title:`默认值`,children:(0,Q.jsx)(V9,{rows:3,value:Array.isArray(e.value)?e.value.join(` +你是一位专业的电商图片文案专家,擅长将产品卖点转化为图片生成提示词`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{marginBottom:8},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:`行业选项配置`}),(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`添加选项组,每组包含名称和多个选项,前台将显示为下拉选择`})]}),(0,Q.jsx)(X.List,{name:`optionGroups`,children:(e,{add:t,remove:n})=>(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8,marginBottom:16},children:[e.map(({key:e,name:t,...r})=>(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`flex-start`,padding:`10px 12px`,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,gap:8},children:[(0,Q.jsx)(X.Item,{...r,name:[t,`name`],label:`选项名称`,style:{marginBottom:0},rules:[{required:!0,message:`请输入选项名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:视频风格`,size:`middle`,style:{borderRadius:8}})}),(0,Q.jsx)(X.Item,{...r,name:[t,`options`],label:`选项内容`,style:{marginBottom:0},children:(0,Q.jsx)(RC,{mode:`tags`,size:`middle`,placeholder:`输入选项后回车添加`,style:{borderRadius:8},tokenSeparators:[`,`,`,`,`、`]})})]}),(0,Q.jsx)(k4,{onClick:()=>n(t),style:{color:`#ef4444`,fontSize:16,marginTop:34,cursor:`pointer`,flexShrink:0}})]},e)),(0,Q.jsx)(qE,{type:`dashed`,onClick:()=>t(),block:!0,icon:(0,Q.jsx)(TL,{}),style:{borderRadius:8,height:36},children:`添加选项组`})]})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`is_active`,label:`启用状态`,valuePropName:`checked`,initialValue:!0,style:{flex:1},children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{name:`sort_order`,label:`排序`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(hW,{type:`number`,size:`large`})})]})]})})]})};function x7(e){if(Array.isArray(e))return e;if(typeof e==`string`)try{return JSON.parse(e)}catch{return[]}return[]}var Dne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,engine:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await O8()).map(e=>({...e,supportedRatios:x7(e.supportedRatios),supportedResolutions:x7(e.supportedResolutions),supportedDurations:x7(e.supportedDurations)})))}catch{LG.error(`加载视频引擎失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={name:e.name,provider:e.provider,api_base:e.apiBase,api_key:e.apiKey,model_name:e.modelName,supported_ratios:JSON.stringify(e.supportedRatios||[]),supported_resolutions:JSON.stringify(e.supportedResolutions||[]),supported_durations:JSON.stringify(e.supportedDurations||[]),is_active:e.isActive??!0,priority:e.priority??0};i.engine?(await k8({id:i.engine.id,...t}),LG.success(`已更新`)):(await k8(t),LG.success(`已添加`)),a({open:!1,engine:null}),o.resetFields(),s()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},l=async e=>{try{await A8(e),LG.success(`已删除`),s()}catch{LG.error(`删除失败`)}},u=e=>{a({open:!0,engine:e||null}),e?o.setFieldsValue(e):(o.resetFields(),o.setFieldsValue({isActive:!0,priority:0,supportedRatios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],supportedResolutions:[`480p`,`720p`,`1080p`],supportedDurations:[4,5,6,7,8,9,10,11,12,13,14,15]}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(X4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`视频引擎配置`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 个引擎`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加引擎`})]}),(0,Q.jsx)(bQ,{columns:[{title:`引擎名称`,key:`name`,width:180,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsx)(`div`,{style:{width:36,height:36,borderRadius:8,background:t.isActive?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`linear-gradient(135deg, #94a3b8, #cbd5e1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:16},children:(0,Q.jsx)(X4,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.provider})]})]})},{title:`支持比例`,dataIndex:`supportedRatios`,width:200,render:e=>(0,Q.jsx)(VV,{size:2,wrap:!0,children:e.map(e=>(0,Q.jsx)(NQ,{children:e},e))})},{title:`支持分辨率`,dataIndex:`supportedResolutions`,width:150,render:e=>(0,Q.jsx)(VV,{size:2,wrap:!0,children:e.map(e=>(0,Q.jsx)(NQ,{color:`blue`,children:e},e))})},{title:`支持时长`,dataIndex:`supportedDurations`,width:120,render:e=>(0,Q.jsx)(NQ,{color:`orange`,children:e?.length?`${Math.min(...e)}-${Math.max(...e)}s`:`-`})},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(X4,{}),i.engine?`编辑引擎`:`添加引擎`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,engine:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:620,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`引擎名称`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`Seedance 2.0`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`provider`,label:`提供商`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`ark`,label:`火山引擎 (Ark)`}]})})]}),(0,Q.jsx)(X.Item,{name:`apiBase`,label:`API基础地址`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`apiKey`,label:`API Key`,children:(0,Q.jsx)(hW.Password,{placeholder:`sk-****`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`modelName`,label:`模型名称`,children:(0,Q.jsx)(hW,{placeholder:`doubao-seedance-2-0-260128`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`supportedRatios`,label:`支持比例`,children:(0,Q.jsx)(RC,{mode:`multiple`,size:`large`,options:[{value:`16:9`,label:`16:9 (横屏)`},{value:`4:3`,label:`4:3 (标准)`},{value:`1:1`,label:`1:1 (方形)`},{value:`3:4`,label:`3:4 (竖版)`},{value:`9:16`,label:`9:16 (竖屏)`},{value:`21:9`,label:`21:9 (超宽)`}]})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`supportedResolutions`,label:`支持分辨率`,style:{flex:1},children:(0,Q.jsx)(RC,{mode:`multiple`,size:`large`,options:[{value:`480p`},{value:`720p`},{value:`1080p`}]})}),(0,Q.jsx)(X.Item,{name:`supportedDurations`,label:`支持时长(秒)`,style:{flex:1},children:(0,Q.jsx)(RC,{mode:`multiple`,size:`large`,options:Array.from({length:12},(e,t)=>({value:t+4,label:`${t+4}秒`}))})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`priority`,label:`优先级`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:0,label:`0 (默认)`},{value:1,label:`1`},{value:2,label:`2`},{value:3,label:`3`},{value:5,label:`5`},{value:10,label:`10 (最高)`}]})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,style:{paddingTop:30},children:(0,Q.jsx)(Mq,{})})]})]})})]})};function One(e){if(Array.isArray(e))return e;if(typeof e==`string`)try{return JSON.parse(e)}catch{return[]}return[]}function kne(e){if(e&&typeof e==`object`&&!Array.isArray(e))return e;if(typeof e==`string`)try{let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:{}}catch{return{}}return{}}var S7={"2K":{"1:1":`2048×2048`,"4:3":`2304×1728`,"3:4":`1728×2304`,"16:9":`2560×1440`,"9:16":`1600×2848`,"3:2":`2496×1664`,"2:3":`1664×2496`,"21:9":`3024×1296`},"4K":{"1:1":`4096×4096`,"4:3":`4608×3456`,"3:4":`3520×4704`,"16:9":`5404×3040`,"9:16":`3040×5504`,"3:2":`4992×3328`,"2:3":`3328×4992`,"21:9":`6197×2656`}},C7=[`1:1`,`4:3`,`3:4`,`16:9`,`9:16`,`3:2`,`2:3`,`21:9`],Ane=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,engine:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await j8()).map(e=>({...e,supportedModels:One(e.supportedModels),supportedSizes:kne(e.supportedSizes)})))}catch{LG.error(`加载图片引擎失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={};for(let n of[`2K`,`4K`]){let r=e[`size_${n}`]||[];if(r.length>0){t[n]={};for(let e of r)t[n][e]=S7[n]?.[e]||e}}let n={name:e.name,provider:e.provider,api_base:e.apiBase,api_key:e.apiKey,model_name:e.modelName,supported_models:JSON.stringify(e.supportedModels||[]),supported_sizes:JSON.stringify(t),default_size:e.defaultSize||`2K`,generate_url:e.generateUrl||``,is_active:e.isActive??!0,priority:e.priority??0};i.engine?(await M8({id:i.engine.id,...n}),LG.success(`已更新`)):(await M8(n),LG.success(`已添加`)),a({open:!1,engine:null}),o.resetFields(),s()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},l=async e=>{try{await N8(e),LG.success(`已删除`),s()}catch{LG.error(`删除失败`)}},u=e=>{if(a({open:!0,engine:e||null}),e){let t={};for(let n of[`2K`,`4K`])t[`size_${n}`]=Object.keys(e.supportedSizes?.[n]||{});o.setFieldsValue({...e,...t})}else o.resetFields(),o.setFieldsValue({isActive:!0,priority:0,supportedModels:[`doubao-seedream-5-0-260128`],defaultSize:`2K`,size_2K:C7,size_4K:C7})};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(W4,{style:{fontSize:18,color:`#10b981`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`图片引擎配置`}),(0,Q.jsxs)(NQ,{color:`green`,children:[e.length,` 个引擎`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加引擎`})]}),(0,Q.jsx)(bQ,{columns:[{title:`引擎名称`,key:`name`,width:180,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsx)(`div`,{style:{width:36,height:36,borderRadius:8,background:t.isActive?`linear-gradient(135deg, #10b981, #059669)`:`linear-gradient(135deg, #94a3b8, #cbd5e1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:16},children:(0,Q.jsx)(W4,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.modelName})]})]})},{title:`2K 支持比例`,key:`sizes_2k`,width:260,render:(e,t)=>{let n=Object.keys(t.supportedSizes?.[`2K`]||{});return n.length===0?(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`}):(0,Q.jsx)(VV,{size:2,wrap:!0,children:n.map(e=>(0,Q.jsxs)(NQ,{color:`blue`,children:[e,` `,t.supportedSizes[`2K`][e]]},e))})}},{title:`4K 支持比例`,key:`sizes_4k`,width:260,render:(e,t)=>{let n=Object.keys(t.supportedSizes?.[`4K`]||{});return n.length===0?(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`}):(0,Q.jsx)(VV,{size:2,wrap:!0,children:n.map(e=>(0,Q.jsxs)(NQ,{color:`purple`,children:[e,` `,t.supportedSizes[`4K`][e]]},e))})}},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:1e3}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(W4,{}),i.engine?`编辑引擎`:`添加引擎`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,engine:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:680,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`引擎名称`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`豆包文生图`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`provider`,label:`提供商`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`ark`,label:`火山引擎 (Ark)`}]})})]}),(0,Q.jsx)(X.Item,{name:`apiBase`,label:`API基础地址`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`apiKey`,label:`API Key`,children:(0,Q.jsx)(hW.Password,{placeholder:`sk-****`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`modelName`,label:`默认模型`,children:(0,Q.jsx)(hW,{placeholder:`doubao-seedream-5-0-260128`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`supportedModels`,label:`支持模型列表`,children:(0,Q.jsx)(RC,{mode:`tags`,size:`large`,placeholder:`输入模型ID后回车添加`,tokenSeparators:[`,`,`,`],options:[{value:`doubao-seedream-5-0-260128`}]})}),(0,Q.jsxs)(`div`,{style:{background:`#f8f9fc`,borderRadius:10,padding:16,marginBottom:8},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`尺寸配置`}),(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`勾选每个档位支持的比例,前台选择后传对应像素值给SDK`})]}),[`2K`,`4K`].map(e=>(0,Q.jsxs)(`div`,{style:{background:`#fafbfc`,borderRadius:10,padding:`12px 16px`,marginBottom:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13,color:e===`2K`?`#3b82f6`:`#8b5cf6`},children:e}),(0,Q.jsx)(X.Item,{name:`size_${e}`,style:{marginTop:8,marginBottom:0},children:(0,Q.jsx)(oz.Group,{style:{width:`100%`},children:(0,Q.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, 1fr)`,gap:`6px 0`},children:C7.map(t=>(0,Q.jsxs)(oz,{value:t,style:{fontSize:12},children:[t,` `,(0,Q.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:11},children:S7[e]?.[t]})]},t))})})})]},e)),(0,Q.jsx)(X.Item,{name:`defaultSize`,label:`默认尺寸档位`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`2K`,label:`2K`},{value:`4K`,label:`4K`}]})}),(0,Q.jsx)(X.Item,{name:`generateUrl`,label:`生成接口地址`,children:(0,Q.jsx)(hW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3/images/generations`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`priority`,label:`优先级`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:0,label:`0 (默认)`},{value:1,label:`1`},{value:2,label:`2`},{value:3,label:`3`},{value:5,label:`5`},{value:10,label:`10 (最高)`}]})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,style:{paddingTop:30},children:(0,Q.jsx)(Mq,{})})]})]})})]})},jne=[`2K`,`4K`],Mne=[`480p`,`720p`,`1080p`],Nne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)({open:!1,ratio:null}),[c]=X.useForm(),[l,u]=(0,S.useState)(10),[d,f]=(0,S.useState)(null),[p,m]=(0,S.useState)(!1),h=X.useWatch(`genType`,c)||`video`,g=X.useWatch(`modelConfigId`,c),_=async()=>{a(!0);try{let[e,n,i]=await Promise.all([P8(),y8(),_5()]),a=(i?.engine?.image||[]).map(e=>({...e,genType:`image`})),o=(i?.engine?.video||[]).map(e=>({...e,genType:`video`}));t(e),r([...o,...a]);let s=n.find(e=>e.key===`text_credits_per_1000_tokens`);s&&(u(Number(s.value)||10),f({id:s.id}))}catch{LG.error(`加载积分比例失败`)}finally{a(!1)}};(0,S.useEffect)(()=>{_()},[]);let v=(0,S.useMemo)(()=>n.filter(e=>e.genType===h).map(e=>({value:e.id,label:`${e.name}${e.modelName?`(${e.modelName})`:``}`})),[n,h]),y=(0,S.useMemo)(()=>n.find(e=>e.id===g&&e.genType===h),[n,h,g]),b=(0,S.useMemo)(()=>{if(h===`image`){let e=y?.supportedSizes?Object.keys(y.supportedSizes):[];return(e.length?e:jne).map(e=>({value:e,label:e}))}let e=y?.supportedResolutions||[];return(e.length?e:Mne).map(e=>({value:e,label:e}))},[h,y]),x=(e,t)=>n.find(n=>n.id===e&&(!t||n.genType===t))?.name||e,C=async()=>{try{let e=await c.validateFields(),t={model_config_id:e.modelConfigId,gen_type:e.genType,resolution:e.resolution,ratio:e.ratio,base_credits:e.baseCredits,per_second_credits:e.genType===`image`?0:e.perSecondCredits||0};o.ratio?(await F8({id:o.ratio.id,...t}),LG.success(`已更新`)):(await F8(t),LG.success(`已添加`)),s({open:!1,ratio:null}),c.resetFields(),_()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},w=async e=>{try{await I8(e),LG.success(`已删除`),_()}catch{LG.error(`删除失败`)}},T=async()=>{if(d){m(!0);try{await b8(d.id,String(l)),LG.success(`文字积分费率已更新`)}catch(e){LG.error(e?.message||`保存失败`)}finally{m(!1)}}},E=e=>{s({open:!0,ratio:e||null}),e?c.setFieldsValue({modelConfigId:e.modelConfigId,genType:e.genType===`image`?`image`:`video`,resolution:e.resolution,ratio:e.ratio,baseCredits:e.baseCredits,perSecondCredits:e.perSecondCredits}):(c.resetFields(),c.setFieldsValue({genType:`video`,ratio:1,baseCredits:60,perSecondCredits:2}))};return(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(M2,{style:{fontSize:18,color:`#f59e0b`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`文字积分费率`})]}),(0,Q.jsx)(qE,{type:`primary`,loading:p,onClick:T,style:{borderRadius:8},children:`保存`})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{display:`block`,marginBottom:16,fontSize:13},children:`文字积分计算公式:ceil(总token数 x 费率 / 1000),最低1积分`}),(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,Q.jsx)(Z.Text,{children:`每1000 token消耗积分:`}),(0,Q.jsxs)(VV.Compact,{style:{width:160},children:[(0,Q.jsx)(oB,{min:0,max:1e3,step:.01,value:l,onChange:e=>u(e||0),size:`large`,style:{width:`100%`}}),(0,Q.jsx)(Z.Text,{children:`积分`})]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[`示例:1000 token = `,l,` 积分,500 token = `,(500*l/1e3).toFixed(4),` 积分`]})]})]}),(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(C0,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`积分比例配置`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 条规则`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>E(),style:{borderRadius:8},children:`添加比例`})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{display:`block`,marginBottom:16,fontSize:13},children:`视频积分公式:(基础积分 + 每秒积分 x 视频时长) x 模型倍率;图片积分公式:基础积分 x 模型倍率`}),(0,Q.jsx)(bQ,{columns:[{title:`类型`,dataIndex:`genType`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e===`image`?`cyan`:`orange`,children:e===`image`?`图片`:`视频`})},{title:`引擎`,dataIndex:`modelConfigId`,width:180,render:(e,t)=>(0,Q.jsx)(NQ,{color:t.genType===`image`?`cyan`:`purple`,children:x(e,t.genType)})},{title:`分辨率/尺寸`,dataIndex:`resolution`,width:110,render:e=>(0,Q.jsx)(NQ,{color:{"480p":`blue`,"720p":`blue`,"1080p":`blue`,"4K":`green`,"2K":`green`}[e]||`default`,children:e})},{title:`倍率`,dataIndex:`ratio`,width:100,sorter:(e,t)=>e.ratio-t.ratio,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:e>=2?`#ef4444`:e>=1.5?`#f59e0b`:`#10b981`},children:[`x`,e]})},{title:`基础积分`,dataIndex:`baseCredits`,width:100,render:e=>(0,Q.jsxs)(Z.Text,{children:[e,` 积分`]})},{title:`每秒积分`,dataIndex:`perSecondCredits`,width:100,render:(e,t)=>(0,Q.jsx)(Z.Text,{children:t.genType===`image`?`-`:`${e} 积分/秒`})},{title:`示例计算`,key:`example`,width:120,render:(e,t)=>{let n;return n=t.genType===`image`?Math.round(t.baseCredits*t.ratio):Math.round((t.baseCredits+t.perSecondCredits*15)*t.ratio),(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:[n,` 积分`]})}},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>E(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>w(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:!1,scroll:{x:860}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(C0,{}),o.ratio?`编辑比例`:`添加比例`]}),open:o.open,onOk:C,onCancel:()=>{s({open:!1,ratio:null}),c.resetFields()},okText:`保存`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`genType`,label:`生成类型`,rules:[{required:!0,message:`请选择生成类型`}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`video`,label:`视频`},{value:`image`,label:`图片`}],onChange:()=>{c.setFieldsValue({modelConfigId:void 0,resolution:void 0})}})}),(0,Q.jsx)(X.Item,{name:`modelConfigId`,label:`引擎`,rules:[{required:!0,message:`请选择引擎`}],children:(0,Q.jsx)(RC,{size:`large`,placeholder:`请选择引擎`,options:v,showSearch:!0,optionFilterProp:`label`,onChange:()=>c.setFieldsValue({resolution:void 0})})}),(0,Q.jsx)(X.Item,{name:`resolution`,label:h===`image`?`图片尺寸`:`分辨率`,rules:[{required:!0,message:h===`image`?`请选择图片尺寸`:`请选择分辨率`}],children:(0,Q.jsx)(RC,{size:`large`,placeholder:h===`image`?`请选择图片尺寸`:`请选择分辨率`,options:b})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`ratio`,label:`倍率`,style:{flex:1},rules:[{required:!0,message:`请输入倍率`}],children:(0,Q.jsx)(oB,{min:.1,max:10,step:.1,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`baseCredits`,label:`基础积分`,style:{flex:1},rules:[{required:!0,message:`请输入基础积分`}],children:(0,Q.jsx)(oB,{min:0,max:1e3,style:{width:`100%`},size:`large`})}),h!==`image`&&(0,Q.jsx)(X.Item,{name:`perSecondCredits`,label:`每秒积分`,style:{flex:1},rules:[{required:!0,message:`请输入每秒积分`}],children:(0,Q.jsx)(oB,{min:0,max:100,style:{width:`100%`},size:`large`})})]})]})})]})},w7={HomeOutlined:(0,Q.jsx)(X2,{}),PlayCircleOutlined:(0,Q.jsx)(X4,{}),WalletOutlined:(0,Q.jsx)(F6,{}),RobotOutlined:(0,Q.jsx)(c3,{}),SettingOutlined:(0,Q.jsx)(k3,{}),BellOutlined:(0,Q.jsx)(d0,{}),UserOutlined:(0,Q.jsx)(k6,{}),AppstoreOutlined:(0,Q.jsx)(W1,{}),FileTextOutlined:(0,Q.jsx)(KV,{}),StarOutlined:(0,Q.jsx)($3,{}),HeartOutlined:(0,Q.jsx)(V2,{}),CameraOutlined:(0,Q.jsx)(E0,{}),DashboardOutlined:(0,Q.jsx)(n2,{}),CalculatorOutlined:(0,Q.jsx)(C0,{}),DollarOutlined:(0,Q.jsx)(c2,{}),GiftOutlined:(0,Q.jsx)(F2,{}),ThunderboltOutlined:(0,Q.jsx)(d6,{}),FireOutlined:(0,Q.jsx)(E2,{}),CloudOutlined:(0,Q.jsx)(R0,{}),SmileOutlined:(0,Q.jsx)(W3,{}),TrophyOutlined:(0,Q.jsx)(_6,{}),RocketOutlined:(0,Q.jsx)(d3,{}),BulbOutlined:(0,Q.jsx)(b0,{}),CodeOutlined:(0,Q.jsx)(W0,{}),PictureOutlined:(0,Q.jsx)(W4,{}),VideoCameraOutlined:(0,Q.jsx)(M6,{}),AudioOutlined:(0,Q.jsx)(n0,{}),MailOutlined:(0,Q.jsx)(_4,{}),PhoneOutlined:(0,Q.jsx)(V4,{}),GlobalOutlined:(0,Q.jsx)(R2,{}),ShoppingCartOutlined:(0,Q.jsx)(M3,{}),TeamOutlined:(0,Q.jsx)(c6,{}),BarChartOutlined:(0,Q.jsx)(c0,{}),PieChartOutlined:(0,Q.jsx)(q4,{}),LineChartOutlined:(0,Q.jsx)(a4,{}),SecurityScanOutlined:(0,Q.jsx)(C3,{}),ApiOutlined:(0,Q.jsx)(V1,{}),DatabaseOutlined:(0,Q.jsx)(a2,{}),CloudServerOutlined:(0,Q.jsx)(V0,{}),MenuOutlined:(0,Q.jsx)(C4,{})},Pne=Object.keys(w7).map(e=>({value:e,label:(0,Q.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[w7[e],` `,e.replace(`Outlined`,``)]})})),Fne={page:`blue`,group:`purple`},T7={page:`页面`,group:`分组`},Ine=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)(`frontend`),[o,s]=(0,S.useState)({open:!1,menu:null}),[c]=X.useForm(),l=async()=>{r(!0);try{t(await K8())}catch{}r(!1)};(0,S.useEffect)(()=>{l()},[]);let u=async()=>{try{let e=await c.validateFields(),t={label:e.label,path:e.path||``,icon:e.icon||``,sort_order:e.sortOrder??0,is_active:e.isActive??!0,parent_id:e.parentId||null,menu_type:e.menuType||`page`,menu_target:e.menuTarget||`frontend`,is_default:e.isDefault??!1};o.menu?.id?await q8({...t,id:o.menu.id}):await q8(t),LG.success(o.menu?.id?`菜单已更新`:`菜单已添加`),s({open:!1,menu:null}),c.resetFields(),l()}catch{}},d=async e=>{try{await J8(e),LG.success(`菜单已删除`),l()}catch(e){LG.error(e?.message||`删除失败`)}},f=t=>{s({open:!0,menu:t||null}),t?c.setFieldsValue({label:t.label,path:t.path,icon:t.icon,sortOrder:t.sortOrder??0,isActive:t.isActive??!0,parentId:t.parentId??``,menuType:t.menuType??`page`,menuTarget:t.menuTarget??`frontend`,isDefault:t.isDefault??!1}):(c.resetFields(),c.setFieldsValue({icon:`HomeOutlined`,sortOrder:e.length,isActive:!0,menuType:`page`,menuTarget:i,isDefault:!1}))},p=e.filter(e=>{let t=e.menuTarget??`frontend`;return t===i||t===`both`}),m=[{value:``,label:`顶级菜单`},...p.filter(e=>e.menuType===`group`).map(e=>({value:e.id,label:e.label}))],h=[],g=p.filter(e=>!e.parentId),_={};p.filter(e=>e.parentId).forEach(e=>{let t=e.parentId;_[t]||(_[t]=[]),_[t].push(e)}),g.sort((e,t)=>(e.sortOrder??0)-(t.sortOrder??0)).forEach(e=>{h.push({...e,_depth:0}),(_[e.id]||[]).sort((e,t)=>(e.sortOrder??0)-(t.sortOrder??0)).forEach(e=>{h.push({...e,_depth:1})})});let v=[{title:`排序`,dataIndex:`sortOrder`,width:60},{title:`菜单名称`,key:`label`,width:180,render:(e,t)=>(0,Q.jsxs)(`span`,{style:{paddingLeft:t._depth*20,fontWeight:t._depth===0?600:400},children:[t._depth===1&&(0,Q.jsx)(`span`,{style:{color:`#cbd5e1`,marginRight:4},children:`└`}),t.label]})},{title:`路由路径`,dataIndex:`path`,width:160,render:e=>e||(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})},{title:`图标`,dataIndex:`icon`,width:100,render:e=>e&&w7[e]?(0,Q.jsx)(`span`,{style:{fontSize:16,color:`#6366f1`},children:w7[e]}):`-`},{title:`类型`,dataIndex:`menuType`,width:80,render:e=>(0,Q.jsx)(NQ,{color:Fne[e]||`default`,children:T7[e]||e})},{title:`状态`,dataIndex:`isActive`,width:70,render:e=>(0,Q.jsx)(`span`,{style:{color:e?`#22c55e`:`#94a3b8`},children:e?`启用`:`停用`})},...i===`frontend`?[{title:`默认显示`,dataIndex:`isDefault`,width:80,render:e=>e?(0,Q.jsx)(NQ,{color:`green`,children:`默认`}):(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})}]:[],{title:`操作`,key:`action`,width:150,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>f(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除该菜单?`,onConfirm:()=>d(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}];return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(C4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`菜单配置`})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>f(),style:{borderRadius:8},children:`添加菜单`})]}),(0,Q.jsx)(bR,{activeKey:i,onChange:a,items:[{key:`frontend`,label:`前台菜单`},{key:`admin`,label:`后台菜单`}]}),(0,Q.jsx)(bQ,{columns:v,dataSource:h,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(C4,{}),o.menu?.id?`编辑菜单`:`添加菜单`]}),open:o.open,onOk:u,onCancel:()=>{s({open:!1,menu:null}),c.resetFields()},okText:`确认`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`label`,label:`菜单名称`,rules:[{required:!0,message:`请输入菜单名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:我的项目`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`path`,label:`路由路径`,tooltip:`分组类型可留空`,children:(0,Q.jsx)(hW,{placeholder:`例如:/projects(分组可留空)`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`menuType`,label:`菜单类型`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`page`,label:`页面`},{value:`group`,label:`分组`}]})}),(0,Q.jsx)(X.Item,{name:`menuTarget`,label:`适用端`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`frontend`,label:`前台`},{value:`admin`,label:`后台`},{value:`both`,label:`两者`}]})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`icon`,label:`图标`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:Pne})}),(0,Q.jsx)(X.Item,{name:`sortOrder`,label:`排序`,style:{flex:1},children:(0,Q.jsx)(oB,{min:0,max:100,style:{width:`100%`},size:`large`,placeholder:`默认0`})})]}),(0,Q.jsx)(X.Item,{name:`parentId`,label:`上级菜单`,children:(0,Q.jsx)(RC,{size:`large`,options:m,allowClear:!0,placeholder:`顶级菜单`})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用`,valuePropName:`checked`,children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.menuTarget!==t.menuTarget,children:({getFieldValue:e})=>e(`menuTarget`)===`admin`?null:(0,Q.jsx)(X.Item,{name:`isDefault`,label:`新用户默认显示`,valuePropName:`checked`,tooltip:`开启后,新注册用户默认显示此菜单`,children:(0,Q.jsx)(Mq,{})})})]})})]})},Lne={normal:`blue`,gift:`green`,promo:`purple`},Rne={normal:`常规`,gift:`赠送`,promo:`促销`},zne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,item:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await e5()).map(e=>({id:e.id,name:e.name,credits:e.credits,price:e.price,bonusCredits:e.bonus_credits??e.bonusCredits??0,totalCredits:e.total_credits??e.totalCredits??e.credits,description:e.description,packageType:e.package_type??e.packageType??`normal`,isGift:e.is_gift??e.isGift??!1,isActive:e.is_active??e.isActive??!0,sortOrder:e.sort_order??e.sortOrder??0})))}catch{LG.error(`加载充值套餐失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={name:e.name,credits:e.credits,price:e.price,bonus_credits:e.bonusCredits||0,description:e.description||null,package_type:e.packageType||`normal`,is_gift:e.isGift||!1,is_active:e.isActive??!0,sort_order:e.sortOrder??0};i.item?.id?(await t5({id:i.item.id,...t}),LG.success(`已更新`)):(await t5(t),LG.success(`已添加`)),a({open:!1,item:null}),o.resetFields(),s()}catch{}},l=async e=>{try{await n5(e),LG.success(`已删除`),s()}catch(e){LG.error(e?.message||`删除失败`)}},u=e=>{a({open:!0,item:e||null}),e?o.setFieldsValue({name:e.name,credits:e.credits,price:e.price,bonusCredits:e.bonusCredits,description:e.description,packageType:e.packageType,isGift:e.isGift,isActive:e.isActive,sortOrder:e.sortOrder}):(o.resetFields(),o.setFieldsValue({isActive:!0,sortOrder:0,packageType:`normal`,bonusCredits:0,isGift:!1}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(F2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`充值套餐管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 个套餐`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加套餐`})]}),(0,Q.jsx)(bQ,{columns:[{title:`套餐名称`,key:`name`,width:160,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),t.description&&(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.description})]})},{title:`基础积分`,dataIndex:`credits`,width:100,render:e=>(0,Q.jsx)(Z.Text,{children:e.toLocaleString()})},{title:`赠送积分`,dataIndex:`bonusCredits`,width:100,render:e=>e>0?(0,Q.jsxs)(NQ,{color:`green`,children:[`+`,e.toLocaleString()]}):(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})},{title:`总积分`,key:`total`,width:100,render:(e,t)=>(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:(t.credits+t.bonusCredits).toLocaleString()})},{title:`价格(元)`,dataIndex:`price`,width:100,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,children:[`¥`,e]})},{title:`类型`,dataIndex:`packageType`,width:80,render:e=>(0,Q.jsx)(NQ,{color:Lne[e]||`default`,children:Rne[e]||e})},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(F2,{}),i.item?`编辑套餐`:`添加套餐`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,item:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`套餐名称`,rules:[{required:!0,message:`请输入套餐名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:进阶包`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`credits`,label:`基础积分`,rules:[{required:!0,message:`请输入积分`}],style:{flex:1},children:(0,Q.jsx)(oB,{min:1,placeholder:`2000`,size:`large`,style:{width:`100%`}})}),(0,Q.jsx)(X.Item,{name:`price`,label:`价格(元)`,rules:[{required:!0,message:`请输入价格`}],style:{flex:1},children:(0,Q.jsx)(oB,{min:.01,step:1,placeholder:`168`,size:`large`,style:{width:`100%`}})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`bonusCredits`,label:`赠送积分`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(oB,{min:0,placeholder:`0`,size:`large`,style:{width:`100%`}})}),(0,Q.jsx)(X.Item,{name:`packageType`,label:`套餐类型`,initialValue:`normal`,style:{flex:1},children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`normal`,label:`常规`},{value:`gift`,label:`赠送`},{value:`promo`,label:`促销`}]})})]}),(0,Q.jsx)(X.Item,{name:`description`,label:`描述`,children:(0,Q.jsx)(hW,{placeholder:`套餐描述(可选)`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,initialValue:!0,style:{flex:1},children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{name:`isGift`,label:`是否赠送`,valuePropName:`checked`,initialValue:!1,style:{flex:1},children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{name:`sortOrder`,label:`排序`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(oB,{size:`large`,style:{width:`100%`}})})]})]})})]})},Bne={POST:`green`,PUT:`blue`,DELETE:`red`},Vne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),c=async e=>{a(!0);try{let n=await r5(e||o);t(n.items||[]),r(n.total||0)}catch{LG.error(`加载操作日志失败`)}finally{a(!1)}};return(0,S.useEffect)(()=>{c()},[]),(0,Q.jsx)(`div`,{children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(q2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`操作日志`})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>c(),children:`刷新`})]}),(0,Q.jsx)(bQ,{columns:[{title:`操作人`,dataIndex:`username`,width:120,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`操作`,dataIndex:`action`,width:160,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`方法`,dataIndex:`method`,width:80,render:e=>(0,Q.jsx)(NQ,{color:Bne[e]||`default`,children:e})},{title:`路径`,dataIndex:`path`,width:220,ellipsis:!0,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:e})},{title:`时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:$5(e)})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:20,total:n,showTotal:e=>`共 ${e} 条记录`,onChange:e=>{s(e),c(e)}},scroll:{x:800}})]})})},Hne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(null),[g]=X.useForm(),[_]=X.useForm(),v=async e=>{a(!0);try{let n=await i5(e||o);t(n.items||[]),r(n.total||0)}catch{LG.error(`加载应用管理列表失败`)}finally{a(!1)}},y=async()=>{try{let e=await g.validateFields();await a5({app_id:e.app_id,secret:e.secret,open_type:e.open_type,count:e.count,auth_url:e.auth_url,company:e.company}),LG.success(`创建成功`),l(!1),g.resetFields(),v()}catch(e){LG.error(e?.message||`创建失败`)}},b=async e=>{try{h(await o5(e)),d(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},x=async e=>{try{let t=await o5(e);h(t),_.setFieldsValue({app_id:t.appId,secret:t.secret,open_type:t.openType,count:t.count,auth_url:t.authUrl,company:t.company}),p(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},C=async()=>{if(m)try{let e=await _.validateFields();await s5(m.id,{app_id:e.app_id,secret:e.secret,open_type:e.open_type,count:e.count,auth_url:e.auth_url,company:e.company}),LG.success(`更新成功`),p(!1),_.resetFields(),v()}catch(e){LG.error(e?.message||`更新失败`)}},w=e=>{BG.confirm({title:`确认删除`,content:`确定要删除这个应用管理吗?`,okText:`删除`,okType:`danger`,cancelText:`取消`,onOk:async()=>{try{await c5(e),LG.success(`删除成功`),v()}catch(e){LG.error(e?.message||`删除失败`)}}})};return(0,S.useEffect)(()=>{v()},[]),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(C4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`应用管理列表`})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>v(),children:`刷新`}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>l(!0),children:`创建`})]})]}),(0,Q.jsx)(bQ,{columns:[{title:`ID`,dataIndex:`id`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`应用ID`,dataIndex:`appId`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`应用密钥`,dataIndex:`secret`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`开户方式`,dataIndex:`openType`,render:e=>(0,Q.jsx)(Z.Text,{children:{1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`}[e]||e})},{title:`归属公司`,dataIndex:`company`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`授权次数`,dataIndex:`count`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`状态`,dataIndex:`status`,render:e=>(0,Q.jsx)(NQ,{color:e===1?`green`:`red`,children:e===1?`正常`:`禁用`})},{title:`授权URL`,dataIndex:`authUrl`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`创建人`,dataIndex:`createBy`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`创建时间`,dataIndex:`createdAt`,render:e=>(0,Q.jsx)(Z.Text,{children:$5(e)})},{title:`更新时间`,dataIndex:`updatedAt`,render:e=>(0,Q.jsx)(Z.Text,{children:$5(e)})},{title:`操作`,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(qU,{}),size:`small`,onClick:()=>b(t.id),children:`详情`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(zQ,{}),size:`small`,onClick:()=>x(t.id),children:`更新`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(IQ,{}),size:`small`,danger:!0,onClick:()=>w(t.id),children:`删除`})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:20,total:n,showTotal:e=>`共 ${e} 条记录`,onChange:e=>{s(e),v(e)}},scroll:{x:800}})]}),(0,Q.jsx)(BG,{title:`创建应用管理`,open:c,onOk:y,onCancel:()=>{l(!1),g.resetFields()},okText:`创建`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:g,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`app_id`,label:`应用ID`,rules:[{required:!0,message:`请输入应用ID`},{max:64,message:`应用ID不能超过64个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用ID`})}),(0,Q.jsx)(X.Item,{name:`secret`,label:`应用密钥`,rules:[{required:!0,message:`请输入应用密钥`},{max:256,message:`应用密钥不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用密钥`})}),(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户方式`,rules:[{required:!0,message:`请选择开户方式`}],children:(0,Q.jsxs)(RC,{placeholder:`请选择开户方式`,children:[(0,Q.jsx)(RC.Option,{value:1,children:`千川`}),(0,Q.jsx)(RC.Option,{value:2,children:`广告`}),(0,Q.jsx)(RC.Option,{value:3,children:`本地推`}),(0,Q.jsx)(RC.Option,{value:4,children:`星图`}),(0,Q.jsx)(RC.Option,{value:5,children:`快手代理商`}),(0,Q.jsx)(RC.Option,{value:6,children:`巨量星图`}),(0,Q.jsx)(RC.Option,{value:7,children:`巨量服务单`}),(0,Q.jsx)(RC.Option,{value:8,children:`腾讯服务单`}),(0,Q.jsx)(RC.Option,{value:9,children:`腾讯营销K2`}),(0,Q.jsx)(RC.Option,{value:10,children:`腾讯营销K3`})]})}),(0,Q.jsx)(X.Item,{name:`count`,label:`最大授权用户数`,initialValue:100,children:(0,Q.jsx)(oB,{min:1,placeholder:`应用最大可以授权多少个用户`})}),(0,Q.jsx)(X.Item,{name:`auth_url`,label:`应用授权链接`,children:(0,Q.jsx)(hW,{placeholder:`请输入应用授权链接`})}),(0,Q.jsx)(X.Item,{name:`company`,label:`应用归属公司名称`,rules:[{max:256,message:`公司名称不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用归属公司名称`})})]})}),(0,Q.jsx)(BG,{title:`应用管理详情`,open:u,onCancel:()=>{d(!1),h(null)},okText:`关闭`,cancelText:`取消`,width:600,children:m&&(0,Q.jsxs)(`div`,{style:{lineHeight:`2`},children:[(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`ID:`}),` `,m.id]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`应用ID:`}),` `,m.appId]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`应用密钥:`}),` `,m.secret]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`开户方式:`}),` `,{1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`}[m.openType]||m.openType]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`归属公司:`}),` `,m.company||`-`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`授权次数:`}),` `,m.count]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`状态:`}),` `,m.status===1?`正常`:`禁用`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`授权URL:`}),` `,m.authUrl||`-`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`创建人:`}),` `,m.createBy]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`创建时间:`}),` `,$5(m.createdAt)]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`更新时间:`}),` `,$5(m.updatedAt)]})]})}),(0,Q.jsx)(BG,{title:`更新应用管理`,open:f,onOk:C,onCancel:()=>{p(!1),_.resetFields(),h(null)},okText:`更新`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:_,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`app_id`,label:`应用ID`,rules:[{required:!0,message:`请输入应用ID`},{max:64,message:`应用ID不能超过64个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用ID`})}),(0,Q.jsx)(X.Item,{name:`secret`,label:`应用密钥`,rules:[{required:!0,message:`请输入应用密钥`},{max:256,message:`应用密钥不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用密钥`})}),(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户方式`,rules:[{required:!0,message:`请选择开户方式`}],children:(0,Q.jsxs)(RC,{placeholder:`请选择开户方式`,children:[(0,Q.jsx)(RC.Option,{value:1,children:`千川`}),(0,Q.jsx)(RC.Option,{value:2,children:`广告`}),(0,Q.jsx)(RC.Option,{value:3,children:`本地推`}),(0,Q.jsx)(RC.Option,{value:4,children:`星图`}),(0,Q.jsx)(RC.Option,{value:5,children:`快手代理商`}),(0,Q.jsx)(RC.Option,{value:6,children:`巨量星图`}),(0,Q.jsx)(RC.Option,{value:7,children:`巨量服务单`}),(0,Q.jsx)(RC.Option,{value:8,children:`腾讯服务单`}),(0,Q.jsx)(RC.Option,{value:9,children:`腾讯营销K2`}),(0,Q.jsx)(RC.Option,{value:10,children:`腾讯营销K3`})]})}),(0,Q.jsx)(X.Item,{name:`count`,label:`最大授权用户数`,children:(0,Q.jsx)(oB,{min:1,placeholder:`应用最大可以授权多少个用户`})}),(0,Q.jsx)(X.Item,{name:`auth_url`,label:`应用授权链接`,children:(0,Q.jsx)(hW,{placeholder:`请输入应用授权链接`})}),(0,Q.jsx)(X.Item,{name:`company`,label:`应用归属公司名称`,rules:[{max:256,message:`公司名称不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用归属公司名称`})})]})})]})},E7=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),D7={image:`empty`,video:`empty`,videoCover:`empty`,references:{}},O7={optimizing:{color:`processing`,text:`优化中`,icon:(0,Q.jsx)(xm,{spin:!0})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,Q.jsx)(HB,{})},generating:{color:`warning`,text:`生成中`,icon:(0,Q.jsx)(xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,Q.jsx)(M0,{})},failed:{color:`error`,text:`失败`,icon:(0,Q.jsx)(F0,{})}},k7={image:{text:`图片`,color:`purple`,icon:(0,Q.jsx)(_2,{})},video:{text:`视频`,color:`geekblue`,icon:(0,Q.jsx)(M6,{})}},Une=e=>/^(https?:)?\/\//i.test(e)||/^(blob|data):/i.test(e),A7=e=>!!e&&/^blob:/i.test(e.trim()),j7=e=>{if(!e)return``;let t=String(e).trim();return t?Une(t)?t:E7?`${E7}${t.startsWith(`/`)?t:`/${t}`}`:t.startsWith(`/`)?t:`/${t}`:``},Wne=e=>e?e.length>12?`${e.slice(0,8)}...`:e:`-`,M7=e=>e?$5(e):`-`,Gne=e=>e==null||e===``,N7=e=>{if(!e||A7(e))return!1;try{let t=new URL(j7(e),window.location.origin),n=t.searchParams.get(`exp`)||t.searchParams.get(`expires`)||t.searchParams.get(`expire`)||t.searchParams.get(`expires_at`)||t.searchParams.get(`x-expires`);if(!n)return!1;let r=Number(n);if(!Number.isFinite(r))return!1;let i=r>1e10?r:r*1e3;return Date.now()>=i}catch{return!1}},P7=e=>e?A7(e)||N7(e)?`invalid`:`checking`:`empty`,F7=e=>{let t=e.url||e.mediaUrl||e.fileUrl;return typeof t==`string`&&t.trim()?t.trim():void 0},Kne=e=>{let t=String(e.type||e.mediaType||e.mimeType||``).toLowerCase(),n=F7(e)?.toLowerCase()||``;return t.includes(`video`)||/\.(mp4|mov|webm|m4v)(\?|$)/i.test(n)?`video`:t.includes(`image`)||/\.(png|jpe?g|webp|gif|bmp|svg)(\?|$)/i.test(n)?`image`:t||`unknown`},I7=(e,t)=>`${t}-${F7(e)||`empty`}`,L7=(e,t=`资源`)=>A7(e)?`本地临时素材已失效`:N7(e)?`${t}链接已超时,请刷新列表或重新搜索后再查看`:`${t}加载失败,请刷新列表或重新搜索后再查看`,R7=({text:e,minHeight:t=240,compact:n=!1,action:r})=>(0,Q.jsxs)(`div`,{style:{width:`100%`,minHeight:n?void 0:t,height:n?`100%`:void 0,borderRadius:n?10:12,background:`#f8f9fc`,border:`1px dashed #cbd5e1`,color:`#64748b`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:n?4:10,textAlign:`center`},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`,fontSize:n?11:13},children:e}),r]}),z7=({label:e,value:t})=>(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:120},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:Gne(t)?`-`:t})]}),qne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c]=(0,S.useState)(20),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(0),[h,g]=(0,S.useState)(null),[_,v]=(0,S.useState)(D7),[y,b]=(0,S.useState)(!1),x=(0,S.useRef)(null),[C,w]=(0,S.useState)(null),[T,E]=(0,S.useState)(null),D=(0,S.useCallback)(async()=>{a(!0);try{let e=await m5({userId:d.trim()||void 0,status:l||void 0,page:o,pageSize:c});t((e.items||[]).map(e=>({id:e.id,userId:e.userId,username:e.username,projectId:e.projectId,projectName:e.projectName,originalPrompt:e.originalPrompt,optimizedPrompt:e.optimizedPrompt,duration:e.duration,aspectRatio:e.aspectRatio,resolution:e.resolution,status:e.status,videoUrl:e.videoUrl,videoCoverUrl:e.videoCoverUrl,references:e.references,creditsCost:e.creditsCost||0,textCreditsCost:e.textCreditsCost||0,textTokensUsed:e.textTokensUsed||0,videoTokensUsed:e.videoTokensUsed||0,errorMessage:e.errorMessage,createdAt:e.createdAt,generatedAt:e.generatedAt,genType:e.genType,imageSize:e.imageSize,imageUrl:e.imageUrl,imageTokensUsed:e.imageTokensUsed||0,imageProportion:e.imageProportion,imagePx:e.imagePx}))),r(e.total||0)}catch{LG.error(`加载记录失败`)}finally{a(!1)}},[l,d,o,c]);(0,S.useEffect)(()=>{D()},[D,p]),(0,S.useEffect)(()=>{if(!h){v(D7);return}let e=(h.references||[]).reduce((e,t,n)=>{let r=F7(t);return e[I7(t,n)]=P7(r),e},{});x.current&&(x.current.pause(),x.current.currentTime=0),b(!1),v({image:P7(h.imageUrl),video:P7(h.videoUrl),videoCover:P7(h.videoCoverUrl),references:e})},[h]);let O=()=>{s(1),m(e=>e+1)},k=(0,S.useCallback)(e=>{g(e)},[]),A=()=>{x.current&&x.current.pause(),b(!1),g(null)},j=e=>{v(t=>({...t,...e}))},M=(e,t)=>{v(n=>({...n,references:{...n.references,[e]:t}}))},N=(e,t=`素材`)=>{if(!e){LG.warning(`${t}链接为空,暂无法查看`);return}if(A7(e)){LG.warning(`本地临时素材已失效,暂无法查看`);return}if(N7(e)){LG.warning(`${t}链接已超时,请刷新列表或重新搜索后再查看`);return}window.open(j7(e),`_blank`,`noopener,noreferrer`)},P=()=>{if(h?.videoUrl){if(N7(h.videoUrl)){j({video:`invalid`}),LG.warning(`视频链接已超时,请刷新列表或重新搜索后再查看`);return}b(!0),window.setTimeout(()=>{x.current?.play().catch(()=>{b(!1),j({video:`invalid`}),LG.warning(`视频播放失败,请确认资源链接是否仍然有效`)})},0)}},F=async(e,t,n)=>{w(e);try{await h5(e,t,n),LG.success(`状态已更新`),D()}catch(e){LG.error(e?.message||`更新失败`)}finally{w(null)}},I=async()=>{if(T){w(T.record.id);try{await g5(T.record.id,T.ratio,T.resolution,T.image_size),LG.success(`已提交${T.record.genType===`video`?`视频`:`图片`}生成`),E(null),D()}catch(e){LG.error(e?.message||`生成失败`)}finally{w(null)}}},L=(0,S.useMemo)(()=>[{title:`用户`,key:`user`,width:120,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:t.username||`未知用户`}),(0,Q.jsx)(`div`,{style:{fontSize:11,color:`#94a3b8`},children:Wne(t.userId)})]})},{title:`项目`,dataIndex:`projectName`,width:120,ellipsis:!0,render:e=>(0,Q.jsx)(Z.Text,{style:{fontSize:13},children:e||`-`})},{title:`类型`,dataIndex:`genType`,width:90,ellipsis:!0,render:e=>{let t=k7[e]||{text:e||`-`,color:`default`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`提示词`,key:`prompt`,ellipsis:!0,render:(e,t)=>(0,Q.jsx)(Ow,{title:t.originalPrompt,placement:`topLeft`,children:(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#475569`},ellipsis:!0,children:t.originalPrompt||`-`})})},{title:`参数`,key:`params`,width:160,render:(e,t)=>t.genType===`video`?t.duration||t.aspectRatio||t.resolution?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.duration?(0,Q.jsxs)(NQ,{children:[t.duration,`s`]}):null,t.aspectRatio?(0,Q.jsx)(NQ,{children:t.aspectRatio}):null,t.resolution?(0,Q.jsx)(NQ,{children:t.resolution}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`待配置`}):t.imageSize||t.imageProportion||t.imagePx?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.imageSize?(0,Q.jsx)(NQ,{children:t.imageSize}):null,t.imageProportion?(0,Q.jsx)(NQ,{children:t.imageProportion}):null,t.imagePx?(0,Q.jsx)(NQ,{children:t.imagePx}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`待配置`})},{title:`积分`,key:`credits`,width:120,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12},children:[t.textCreditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#f59e0b`},children:[`文字: `,t.textCreditsCost]}):null,t.creditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#6366f1`},children:[t.genType===`video`?`视频`:`图片`,`: `,t.creditsCost]}):null,t.textCreditsCost===0&&t.creditsCost===0?(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`},children:`0`}):null]})},{title:`状态`,dataIndex:`status`,width:90,render:e=>{let t=O7[e]||{color:`default`,text:e||`-`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`时间`,key:`time`,width:150,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[(0,Q.jsx)(`div`,{children:M7(t.createdAt)}),t.generatedAt?(0,Q.jsxs)(`div`,{style:{color:`#10b981`},children:[`生成: `,M7(t.generatedAt)]}):null]})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>k(t),children:`详情`}),t.status===`generating`?(0,Q.jsx)(qE,{size:`small`,danger:!0,loading:C===t.id,onClick:()=>{BG.confirm({title:`确认操作`,icon:(0,Q.jsx)(d2,{}),content:`确定将此记录标记为失败?`,onOk:()=>F(t.id,`failed`)})},children:`标记失败`}):null,t.status===`failed`?(0,Q.jsx)(qE,{size:`small`,type:`primary`,danger:!0,loading:C===t.id,onClick:()=>E({record:t,ratio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`,image_size:t.imageSize||`2K`}),children:`重试生成`}):null,t.status===`prompt_optimized`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(qE,{size:`small`,type:`primary`,loading:C===t.id,onClick:()=>E({record:t,ratio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`,image_size:t.imageSize||`2K`}),style:{background:`#6366f1`,border:`none`},children:[`生成`,t.genType===`video`?`视频`:`图片`]}),(0,Q.jsx)(qE,{size:`small`,danger:!0,loading:C===t.id,onClick:()=>{BG.confirm({title:`确认操作`,icon:(0,Q.jsx)(d2,{}),content:`确定将此记录标记为失败?`,onOk:()=>F(t.id,`failed`)})},children:`标记失败`})]}):null]})}],[k,C]),R=h?k7[h.genType||``]||{text:h.genType||`-`,color:`default`,icon:null}:null,z=h?O7[h.status]||{color:`default`,text:h.status||`-`,icon:null}:null,B=()=>{if(!h||h.genType!==`image`||h.status!==`completed`)return null;if(!h.imageUrl)return(0,Q.jsx)(R7,{text:`此图片任务暂无结果图片`,minHeight:260});if(_.image===`invalid`)return(0,Q.jsx)(R7,{text:L7(h.imageUrl,`图片`),minHeight:260});let e=j7(h.imageUrl);return(0,Q.jsxs)(`div`,{title:`点击新页面查看图片`,onClick:()=>N(h.imageUrl,`生成图片`),style:{position:`relative`,width:`100%`,minHeight:260,borderRadius:12,background:`#f8f9fc`,border:`1px solid #e2e8f0`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[(0,Q.jsx)(`img`,{src:e,alt:`生成图片`,onLoad:()=>j({image:`valid`}),onError:()=>j({image:`invalid`}),style:{display:_.image===`valid`?`block`:`none`,width:`100%`,maxHeight:560,objectFit:`contain`,background:`#fff`}},`${h.id}-${e}`),_.image===`checking`?(0,Q.jsx)(R7,{text:`图片加载检测中...`,minHeight:260}):null]})},V=()=>{if(!h||y||_.video===`invalid`)return null;let e=h.videoUrl?(0,Q.jsx)(qE,{type:`primary`,shape:`circle`,size:`large`,icon:(0,Q.jsx)(X4,{}),onClick:P,style:{boxShadow:`0 8px 20px rgba(15,23,42,0.25)`}}):null;if(!h.videoCoverUrl)return(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,Q.jsx)(R7,{text:`此视频无封面`,minHeight:340,action:e})});if(_.videoCover===`invalid`)return(0,Q.jsx)(R7,{text:L7(h.videoCoverUrl,`视频封面`),minHeight:340,action:e});let t=j7(h.videoCoverUrl);return(0,Q.jsxs)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,border:`1px solid #e2e8f0`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:t,alt:`视频封面`,onLoad:()=>j({videoCover:`valid`}),onError:()=>j({videoCover:`invalid`}),style:{display:_.videoCover===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`}},`${h.id}-cover-${t}`),_.videoCover===`checking`?(0,Q.jsx)(R7,{text:`视频封面加载检测中...`,minHeight:340,action:e}):null,_.videoCover===`valid`?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(15,23,42,0.18)`},children:e}):null]})},H=()=>{if(!h||h.genType!==`video`||h.status!==`completed`)return null;if(!h.videoUrl)return(0,Q.jsx)(R7,{text:`此视频任务暂无结果视频`,minHeight:340});if(_.video===`invalid`)return(0,Q.jsx)(R7,{text:L7(h.videoUrl,`视频`),minHeight:340});let e=j7(h.videoUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:340,borderRadius:12,background:`#000`,overflow:`hidden`,border:`1px solid #e2e8f0`},children:[(0,Q.jsx)(`video`,{ref:x,src:e,preload:`metadata`,controls:y,onLoadedMetadata:()=>j({video:`valid`}),onCanPlay:()=>j({video:`valid`}),onPlaying:()=>{b(!0),j({video:`valid`})},onPause:()=>b(!1),onEnded:()=>b(!1),onError:()=>{b(!1),j({video:`invalid`})},style:{width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`,opacity:+!!y,pointerEvents:y?`auto`:`none`}},`${h.id}-${e}`),V()]})},U=(e,t)=>{let n=F7(e),r=Kne(e),i=I7(e,t),a=_.references[i]||P7(n),o=r===`image`,s=r===`video`,c=typeof e.name==`string`&&e.name?e.name:`参考素材 ${t+1}`;if(!n)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(R7,{text:`无链接`,compact:!0})}),(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})]},i);if(a===`invalid`)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(R7,{text:A7(n)?`本地临时素材已失效`:`素材不可访问`,compact:!0})}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i);let l=j7(n);return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsxs)(`div`,{role:`button`,tabIndex:0,title:`点击新页面查看素材`,onClick:()=>N(n,s?`视频素材`:o?`图片素材`:`素材`),onKeyDown:e=>{e.key===`Enter`&&N(n,s?`视频素材`:o?`图片素材`:`素材`)},style:{width:94,height:94,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,background:`#f8f9fc`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[o?(0,Q.jsx)(`img`,{src:l,alt:c,onLoad:()=>M(i,`valid`),onError:()=>M(i,`invalid`),style:{display:a===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`cover`}}):null,s?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`video`,{src:l,preload:`metadata`,onLoadedMetadata:()=>M(i,`valid`),onError:()=>M(i,`invalid`),style:{display:`none`}}),(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[(0,Q.jsx)(X4,{style:{fontSize:18}}),(0,Q.jsx)(`div`,{children:`视频素材`}),(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]})]}):null,!o&&!s?(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[`文件素材`,(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]}):null,a===`checking`&&o?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8f9fc`},children:(0,Q.jsx)(xm,{style:{color:`#6366f1`}})}):null]}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i)};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(M6,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`生成记录管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[n,` 条记录`]})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(RC,{placeholder:`状态筛选`,allowClear:!0,style:{width:120},value:l||void 0,onChange:e=>{u(e||``),s(1)},options:[{value:`optimizing`,label:`优化中`},{value:`prompt_optimized`,label:`待生成`},{value:`generating`,label:`生成中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`}]}),(0,Q.jsx)(hW,{placeholder:`用户ID搜索`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),style:{width:200},value:d,onChange:e=>f(e.target.value),onPressEnter:O,allowClear:!0}),(0,Q.jsx)(qE,{type:`primary`,onClick:O,style:{borderRadius:8},children:`搜索`})]})]}),(0,Q.jsx)(bQ,{columns:L,dataSource:e,rowKey:`id`,loading:i,scroll:{x:1120},pagination:{current:o,pageSize:c,total:n,onChange:s,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[h?.genType===`video`?(0,Q.jsx)(M6,{}):(0,Q.jsx)(_2,{}),(0,Q.jsx)(`span`,{children:`生成记录详情`})]}),open:!!h,onCancel:A,footer:null,width:900,destroyOnClose:!0,children:h?(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,flexWrap:`wrap`},children:[(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`用户`}),(0,Q.jsx)(Z.Text,{strong:!0,children:h.username||`-`})]}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`项目`}),(0,Q.jsx)(Z.Text,{strong:!0,children:h.projectName||`-`})]}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`类型 / 状态`}),(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[R?(0,Q.jsx)(NQ,{color:R.color,icon:R.icon,children:R.text}):null,z?(0,Q.jsx)(NQ,{color:z.color,icon:z.icon,children:z.text}):null]})]})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,Q.jsx)(Z.Text,{style:{fontSize:13,color:`#475569`,lineHeight:1.7},children:h.originalPrompt||`-`})})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`优化后提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`},children:(0,Q.jsx)(Z.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:h.optimizedPrompt||`-`})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(z7,{label:`文字积分`,value:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#f59e0b`},children:h.textCreditsCost||0}),(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.textTokensUsed||0,` tokens)`]})]})}),(0,Q.jsx)(z7,{label:`${h.genType===`image`?`图片`:`视频`}积分`,value:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:h.creditsCost||0}),h.genType===`video`&&h.videoTokensUsed?(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.videoTokensUsed,` tokens)`]}):null,h.genType===`image`&&h.imageTokensUsed?(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.imageTokensUsed,` tokens)`]}):null]})}),(0,Q.jsx)(z7,{label:`总积分`,value:(h.textCreditsCost||0)+(h.creditsCost||0)})]}),h.genType===`video`?h.duration||h.aspectRatio||h.resolution?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(z7,{label:`时长`,value:h.duration?`${h.duration}秒`:`-`}),(0,Q.jsx)(z7,{label:`比例`,value:h.aspectRatio||`-`}),(0,Q.jsx)(z7,{label:`分辨率`,value:h.resolution||`-`})]}):(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,textAlign:`center`},children:(0,Q.jsx)(NQ,{color:`default`,children:`视频参数待用户配置`})}):null,h.genType===`image`?h.imageSize||h.imageProportion||h.imagePx?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(z7,{label:`尺寸`,value:h.imagePx||`-`}),(0,Q.jsx)(z7,{label:`比例`,value:h.imageProportion||`-`}),(0,Q.jsx)(z7,{label:`分辨率`,value:h.imageSize||`-`})]}):(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,textAlign:`center`},children:(0,Q.jsx)(NQ,{color:`default`,children:`图片参数待用户配置`})}):null,!h?.references||h.references.length===0?null:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`参考内容`}),(0,Q.jsx)(`div`,{style:{display:`flex`,gap:10,flexWrap:`wrap`},children:h.references.map((e,t)=>U(e,t))})]}),h.status===`completed`?(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:h.genType===`video`?`生成视频`:`生成图片`}),h.genType===`video`?H():B()]}):null,h.status===`failed`&&h.errorMessage?(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(239,68,68,0.04)`,border:`1px solid rgba(239,68,68,0.15)`},children:(0,Q.jsxs)(Z.Text,{style:{fontSize:12,color:`#ef4444`},children:[`错误信息: `,h.errorMessage]})}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,fontSize:12,color:`#94a3b8`,flexWrap:`wrap`},children:[(0,Q.jsxs)(`span`,{children:[`创建: `,M7(h.createdAt)]}),(0,Q.jsxs)(`span`,{children:[`生成: `,M7(h.generatedAt)]})]})]}):(0,Q.jsx)(pC,{description:`暂无详情`})}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[T&&(T.record.genType===`video`?(0,Q.jsx)(X4,{}):(0,Q.jsx)(_2,{})),T&&(T.record.genType===`video`?`生成视频`:`生成图片`)]}),open:!!T,onCancel:()=>E(null),onOk:I,okText:`提交生成`,cancelText:`取消`,confirmLoading:T?C===T.record.id:!1,width:420,children:T?(0,Q.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:T.record.genType===`video`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`时长`}),(0,Q.jsxs)(Z.Text,{strong:!0,children:[T.record.duration||5,`s`]})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`画面比例`}),(0,Q.jsx)(RC,{value:T.ratio,onChange:e=>E(t=>t?{...t,ratio:e}:null),style:{width:`100%`},options:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`].map(e=>({value:e,label:e}))})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`分辨率`}),(0,Q.jsx)(RC,{value:T.resolution,onChange:e=>E(t=>t?{...t,resolution:e}:null),style:{width:`100%`},options:[`480p`,`720p`,`1080p`].map(e=>({value:e,label:e}))})]})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`尺寸`}),(0,Q.jsx)(Z.Text,{strong:!0,children:T.record.imagePx||`-`})]}),(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`比例`}),(0,Q.jsx)(Z.Text,{strong:!0,children:T.record.imageProportion||`-`})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`分辨率`}),(0,Q.jsx)(RC,{value:T.image_size,onChange:e=>E(t=>t?{...t,image_size:e}:null),style:{width:`100%`},options:[`2K`,`4K`].map(e=>({value:e,label:e}))})]})]})}):null})]})},B7=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),V7=20,H7={image:`empty`,video:`empty`,videoCover:`empty`,references:{}},U7={pending:{color:`default`,text:`待处理`,icon:(0,Q.jsx)(HB,{})},generating:{color:`warning`,text:`生成中`,icon:(0,Q.jsx)(xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,Q.jsx)(M0,{})},failed:{color:`error`,text:`失败`,icon:(0,Q.jsx)(F0,{})}},W7={timeout:`任务超时`,queued:`已入队`,preparing:`准备中`,creating_provider_task:`创建任务中`,waiting_remote:`等待生成`,result_ready:`结果就绪`,downloading:`下载中`,done:`完成`,download_failed:`下载失败`,polling:`轮询中`,failed:`失败`},G7={image:{text:`图片`,color:`purple`,icon:(0,Q.jsx)(_2,{})},video:{text:`视频`,color:`geekblue`,icon:(0,Q.jsx)(M6,{})}},Jne=e=>/^(https?:)?\/\//i.test(e)||/^(blob|data):/i.test(e),K7=e=>!!e&&/^blob:/i.test(e.trim()),q7=e=>{if(!e)return``;let t=String(e).trim();return t?Jne(t)?t:B7?`${B7}${t.startsWith(`/`)?t:`/${t}`}`:t.startsWith(`/`)?t:`/${t}`:``},Yne=e=>e?e.length>12?`${e.slice(0,8)}...`:e:`-`,J7=e=>e?$5(e):`-`,Xne=e=>e==null||e===``,Y7=e=>{if(!e||K7(e))return!1;try{let t=new URL(q7(e),window.location.origin),n=t.searchParams.get(`exp`)||t.searchParams.get(`expires`)||t.searchParams.get(`expire`)||t.searchParams.get(`expires_at`)||t.searchParams.get(`x-expires`);if(!n)return!1;let r=Number(n);if(!Number.isFinite(r))return!1;let i=r>1e10?r:r*1e3;return Date.now()>=i}catch{return!1}},X7=e=>e?K7(e)||Y7(e)?`invalid`:`checking`:`empty`,Z7=e=>{let t=e.url||e.mediaUrl||e.fileUrl;return typeof t==`string`&&t.trim()?t.trim():void 0},Zne=e=>{let t=String(e.type||e.mediaType||e.mimeType||``).toLowerCase(),n=Z7(e)?.toLowerCase()||``;return t.includes(`video`)||/\.(mp4|mov|webm|m4v)(\?|$)/i.test(n)?`video`:t.includes(`image`)||/\.(png|jpe?g|webp|gif|bmp|svg)(\?|$)/i.test(n)?`image`:t||`unknown`},Q7=(e,t)=>`${t}-${Z7(e)||`empty`}`,$7=(e,t=`资源`)=>K7(e)?`本地临时素材已失效`:Y7(e)?`${t}链接已超时,请刷新列表或重新搜索后再查看`:`${t}加载失败,请刷新列表或重新搜索后再查看`,e9=({text:e,minHeight:t=240,compact:n=!1,action:r})=>(0,Q.jsxs)(`div`,{style:{width:`100%`,minHeight:n?void 0:t,height:n?`100%`:void 0,borderRadius:n?10:12,background:`#f8f9fc`,border:`1px dashed #cbd5e1`,color:`#64748b`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:n?4:10,textAlign:`center`},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`,fontSize:n?11:13},children:e}),r]}),t9=({label:e,value:t})=>(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:120},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:Xne(t)?`-`:t})]}),Qne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(``),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)(``),[m,h]=(0,S.useState)(``),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(0),[C,w]=(0,S.useState)(null),[T,E]=(0,S.useState)(H7),[D,O]=(0,S.useState)(!1),k=(0,S.useRef)(null),A=(0,S.useCallback)(async()=>{a(!0);try{let e=await v5({genType:u||void 0,status:c||void 0,userId:g||void 0,userName:v||void 0,page:o,pageSize:V7});t(e.items||[]),r(e.total||0)}catch(e){LG.error(e?.message||`加载创作记录失败`)}finally{a(!1)}},[u,c,o,g,v]);(0,S.useEffect)(()=>{A()},[A,b]),(0,S.useEffect)(()=>{if(!C){E(H7);return}let e=(C.mediaReferences||[]).reduce((e,t,n)=>{let r=Z7(t);return e[Q7(t,n)]=X7(r),e},{});k.current&&(k.current.pause(),k.current.currentTime=0),O(!1),E({image:X7(C.imageUrl),video:X7(C.videoUrl),videoCover:X7(C.videoCoverUrl),references:e})},[C]);let j=()=>{s(1),_(f.trim()),y(m.trim()),x(e=>e+1)},M=(0,S.useCallback)(e=>{w(e)},[]),N=()=>{k.current&&k.current.pause(),O(!1),w(null)},P=e=>{E(t=>({...t,...e}))},F=(e,t)=>{E(n=>({...n,references:{...n.references,[e]:t}}))},I=()=>{if(C?.videoUrl){if(Y7(C.videoUrl)){P({video:`invalid`}),LG.warning(`视频链接已超时,请刷新列表或重新搜索后再查看`);return}O(!0),window.setTimeout(()=>{k.current?.play().catch(()=>{O(!1),P({video:`invalid`}),LG.warning(`视频播放失败,请确认资源链接是否仍然有效`)})},0)}},L=(e,t=`素材`)=>{if(!e){LG.warning(`${t}链接为空,暂无法查看`);return}if(K7(e)){LG.warning(`本地临时素材已失效,暂无法查看`);return}if(Y7(e)){LG.warning(`${t}链接已超时,请刷新列表或重新搜索后再查看`);return}window.open(q7(e),`_blank`,`noopener,noreferrer`)},R=(0,S.useMemo)(()=>[{title:`用户`,key:`user`,width:150,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:t.userName||`未知用户`}),(0,Q.jsx)(`div`,{style:{fontSize:11,color:`#94a3b8`},children:Yne(t.userId)})]})},{title:`类型`,dataIndex:`genType`,width:90,render:e=>{let t=G7[e]||{text:e||`-`,color:`default`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`提示词`,key:`prompt`,ellipsis:!0,render:(e,t)=>(0,Q.jsx)(Ow,{title:t.originalPrompt,placement:`topLeft`,children:(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#475569`},ellipsis:!0,children:t.originalPrompt||`-`})})},{title:`参数`,key:`params`,width:180,render:(e,t)=>t.genType===`video`?t.duration||t.aspectRatio||t.resolution?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.duration?(0,Q.jsxs)(NQ,{children:[t.duration,`s`]}):null,t.aspectRatio?(0,Q.jsx)(NQ,{children:t.aspectRatio}):null,t.resolution?(0,Q.jsx)(NQ,{children:t.resolution}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`无参数`}):t.imageSize||t.imageProportion||t.imagePx?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.imageSize?(0,Q.jsx)(NQ,{children:t.imageSize}):null,t.imageProportion?(0,Q.jsx)(NQ,{children:t.imageProportion}):null,t.imagePx?(0,Q.jsx)(NQ,{children:t.imagePx}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`无参数`})},{title:`积分`,key:`credits`,width:130,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12},children:[(0,Q.jsxs)(`div`,{style:{color:`#6366f1`},children:[`总: `,t.creditsCost||0]}),t.textCreditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#f59e0b`},children:[`文字: `,t.textCreditsCost]}):null]})},{title:`状态`,dataIndex:`status`,width:100,render:e=>{let t=U7[e]||{color:`default`,text:e||`-`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`阶段`,dataIndex:`pipelineStage`,width:120,render:e=>(0,Q.jsx)(NQ,{color:`blue`,children:W7[e]||e||`-`})},{title:`时间`,key:`time`,width:170,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[(0,Q.jsx)(`div`,{children:J7(t.createdAt)}),t.generatedAt?(0,Q.jsxs)(`div`,{style:{color:`#10b981`},children:[`生成: `,J7(t.generatedAt)]}):null]})},{title:`操作`,key:`action`,width:90,fixed:`right`,render:(e,t)=>(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>M(t),children:`详情`})}],[M]),z=C?G7[C.genType]||{text:C.genType||`-`,color:`default`,icon:null}:null,B=C?U7[C.status]||{color:`default`,text:C.status||`-`,icon:null}:null,V=()=>{if(!C||C.genType!==`image`||C.status!==`completed`)return null;if(!C.imageUrl)return(0,Q.jsx)(e9,{text:`此图片任务暂无结果图片`,minHeight:260});if(T.image===`invalid`)return(0,Q.jsx)(e9,{text:$7(C.imageUrl,`图片`),minHeight:260});let e=q7(C.imageUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,minHeight:260,borderRadius:12,background:`#f8f9fc`,border:`1px solid #e2e8f0`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:e,alt:`生成图片`,onLoad:()=>P({image:`valid`}),onError:()=>P({image:`invalid`}),style:{display:T.image===`valid`?`block`:`none`,width:`100%`,maxHeight:560,objectFit:`contain`,background:`#fff`}},`${C.id}-${e}`),T.image===`checking`?(0,Q.jsx)(e9,{text:`图片加载检测中...`,minHeight:260}):null]})},H=()=>{if(!C||D||T.video===`invalid`)return null;let e=C.videoUrl?(0,Q.jsx)(qE,{type:`primary`,shape:`circle`,size:`large`,icon:(0,Q.jsx)(X4,{}),onClick:I,style:{boxShadow:`0 8px 20px rgba(15,23,42,0.25)`}}):null;if(!C.videoCoverUrl)return(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,Q.jsx)(e9,{text:`此视频无封面`,minHeight:340,action:e})});if(T.videoCover===`invalid`)return(0,Q.jsx)(e9,{text:$7(C.videoCoverUrl,`视频封面`),minHeight:340,action:e});let t=q7(C.videoCoverUrl);return(0,Q.jsxs)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,border:`1px solid #e2e8f0`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:t,alt:`视频封面`,onLoad:()=>P({videoCover:`valid`}),onError:()=>P({videoCover:`invalid`}),style:{display:T.videoCover===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`}},`${C.id}-cover-${t}`),T.videoCover===`checking`?(0,Q.jsx)(e9,{text:`视频封面加载检测中...`,minHeight:340,action:e}):null,T.videoCover===`valid`?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(15,23,42,0.18)`},children:e}):null]})},U=()=>{if(!C||C.genType!==`video`||C.status!==`completed`)return null;if(!C.videoUrl)return(0,Q.jsx)(e9,{text:`此视频任务暂无结果视频`,minHeight:340});if(T.video===`invalid`)return(0,Q.jsx)(e9,{text:$7(C.videoUrl,`视频`),minHeight:340});let e=q7(C.videoUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:340,borderRadius:12,background:`#000`,overflow:`hidden`,border:`1px solid #e2e8f0`},children:[(0,Q.jsx)(`video`,{ref:k,src:e,preload:`metadata`,controls:D,onLoadedMetadata:()=>P({video:`valid`}),onCanPlay:()=>P({video:`valid`}),onPlaying:()=>{O(!0),P({video:`valid`})},onPause:()=>O(!1),onEnded:()=>O(!1),onError:()=>{O(!1),P({video:`invalid`})},style:{width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`,opacity:+!!D,pointerEvents:D?`auto`:`none`}},`${C.id}-${e}`),H()]})},W=(e,t)=>{let n=Z7(e),r=Zne(e),i=Q7(e,t),a=T.references[i]||X7(n),o=r===`image`,s=r===`video`,c=typeof e.name==`string`&&e.name?e.name:`参考素材 ${t+1}`;if(!n)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(e9,{text:`无链接`,compact:!0})}),(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})]},i);if(a===`invalid`)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(e9,{text:K7(n)?`本地临时素材已失效`:`素材不可访问`,compact:!0})}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i);let l=q7(n);return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsxs)(`div`,{role:`button`,tabIndex:0,title:`点击新页面查看素材`,onClick:()=>L(n,s?`视频素材`:o?`图片素材`:`素材`),onKeyDown:e=>{e.key===`Enter`&&L(n,s?`视频素材`:o?`图片素材`:`素材`)},style:{width:94,height:94,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,background:`#f8f9fc`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[o?(0,Q.jsx)(`img`,{src:l,alt:c,onLoad:()=>F(i,`valid`),onError:()=>F(i,`invalid`),style:{display:a===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`cover`}}):null,s?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`video`,{src:l,preload:`metadata`,onLoadedMetadata:()=>F(i,`valid`),onError:()=>F(i,`invalid`),style:{display:`none`}}),(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[(0,Q.jsx)(X4,{style:{fontSize:18}}),(0,Q.jsx)(`div`,{children:`视频素材`}),(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]})]}):null,!o&&!s?(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[`文件素材`,(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]}):null,a===`checking`&&o?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8f9fc`},children:(0,Q.jsx)(xm,{style:{color:`#6366f1`}})}):null]}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i)};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(X4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`创作记录管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[n,` 条记录`]})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`状态筛选`,value:c||void 0,style:{width:140},onChange:e=>{l(e||``),s(1)},options:[{value:`generating`,label:`生成中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`}]}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`类型筛选`,value:u||void 0,style:{width:120},onChange:e=>{d(e||``),s(1)},options:[{value:`image`,label:`图片`},{value:`video`,label:`视频`}]}),(0,Q.jsx)(hW,{placeholder:`用户ID搜索`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),style:{width:180},value:f,onChange:e=>p(e.target.value),onPressEnter:j,allowClear:!0}),(0,Q.jsx)(hW,{placeholder:`用户名搜索`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),style:{width:160},value:m,onChange:e=>h(e.target.value),onPressEnter:j,allowClear:!0}),(0,Q.jsx)(qE,{type:`primary`,onClick:j,style:{borderRadius:8},children:`搜索`})]})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:i,columns:R,dataSource:e,scroll:{x:1180},pagination:{current:o,pageSize:V7,total:n,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:e=>s(e)}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[C?.genType===`video`?(0,Q.jsx)(M6,{}):(0,Q.jsx)(_2,{}),(0,Q.jsx)(`span`,{children:`创作记录详情`})]}),open:!!C,onCancel:N,footer:null,width:900,destroyOnClose:!0,children:C?(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:12},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12,flexWrap:`wrap`},children:[z?(0,Q.jsx)(NQ,{color:z.color,icon:z.icon,children:z.text}):null,B?(0,Q.jsx)(NQ,{color:B.color,icon:B.icon,children:B.text}):null,C.pipelineStage?(0,Q.jsx)(NQ,{color:`blue`,children:W7[C.pipelineStage]||C.pipelineStage}):null]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`用户名称`,value:C.userName||`未知用户`}),(0,Q.jsx)(t9,{label:`用户ID`,value:C.userId||`-`}),(0,Q.jsx)(t9,{label:`任务ID`,value:C.id})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,lineHeight:1.6},children:C.originalPrompt||`-`})]}),C.genType===`video`?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`时长`,value:C.duration?`${C.duration}秒`:`-`}),(0,Q.jsx)(t9,{label:`画面比例`,value:C.aspectRatio||`-`}),(0,Q.jsx)(t9,{label:`分辨率`,value:C.resolution||`-`})]}):(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`图片档位`,value:C.imageSize||`-`}),(0,Q.jsx)(t9,{label:`图片比例`,value:C.imageProportion||`-`}),(0,Q.jsx)(t9,{label:`像素尺寸`,value:C.imagePx||`-`})]}),C.engineSnapshot?(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`引擎快照`}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`引擎名称`,value:C.engineSnapshot.name||`-`}),(0,Q.jsx)(t9,{label:`服务商`,value:C.engineSnapshot.provider||`-`}),(0,Q.jsx)(t9,{label:`模型`,value:C.engineSnapshot.modelName||`-`}),(0,Q.jsx)(t9,{label:`引擎ID`,value:C.engineSnapshot.id||C.engineId||`-`})]})]}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`总积分`,value:(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:C.creditsCost||0})}),(0,Q.jsx)(t9,{label:`文字积分`,value:`${C.textCreditsCost||0} (${C.textTokensUsed||0} tokens)`}),(0,Q.jsx)(t9,{label:`图片 tokens`,value:C.imageTokensUsed??0}),(0,Q.jsx)(t9,{label:`视频 tokens`,value:C.videoTokensUsed??0})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`第三方任务ID`,value:C.providerTaskId||C.seedanceTaskId||`-`}),(0,Q.jsx)(t9,{label:`轮询次数`,value:C.pollCount??0}),(0,Q.jsx)(t9,{label:`重试次数`,value:C.retryCount??0})]}),!C?.mediaReferences||C.mediaReferences.length===0?null:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`参考内容`}),(0,Q.jsx)(`div`,{style:{display:`flex`,gap:10,flexWrap:`wrap`},children:C.mediaReferences.map((e,t)=>W(e,t))})]}),C.status===`completed`?(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:C.genType===`video`?`生成视频`:`生成图片`}),C.genType===`video`?U():V()]}):null,C.status===`failed`&&C.errorMessage?(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(239,68,68,0.04)`,border:`1px solid rgba(239,68,68,0.15)`},children:(0,Q.jsxs)(Z.Text,{style:{fontSize:12,color:`#ef4444`},children:[`错误信息: `,C.errorMessage]})}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,fontSize:12,color:`#94a3b8`,flexWrap:`wrap`},children:[(0,Q.jsxs)(`span`,{children:[`创建: `,J7(C.createdAt)]}),(0,Q.jsxs)(`span`,{children:[`生成: `,J7(C.generatedAt)]})]})]}):(0,Q.jsx)(pC,{description:`暂无详情`})})]})},n9=20,$ne=[{value:`pending`,label:`已创建`},{value:`waiting_user`,label:`等待用户操作`},{value:`processing`,label:`处理中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`},{value:`cancelled`,label:`已取消`}],ere={pending:{color:`default`,text:`已创建`},waiting_user:{color:`processing`,text:`等待用户操作`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`已完成`},failed:{color:`error`,text:`失败`},cancelled:{color:`default`,text:`已取消`}},tre={material_input:`素材输入`,image_prompt_optimize:`图片 AI 提词`,image_generate:`图片生成`,video_prompt_optimize:`视频 AI 提词`,video_generate:`视频生成`},r9=e=>e?$5(e):`-`,i9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,nre=({status:e})=>{if(!e)return(0,Q.jsx)(NQ,{children:`-`});let t=ere[e]||{color:`blue`,text:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.text})},rre=()=>{let e=Ye(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(1),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(``),[h,g]=(0,S.useState)(``),[_,v]=(0,S.useState)(null),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(``),[w,T]=(0,S.useState)(``),[E,D]=(0,S.useState)(null),[O,k]=(0,S.useState)(0),A=(0,S.useCallback)(async()=>{o(!0);try{let e=await b5({status:l||void 0,keyword:y||void 0,userId:x||void 0,userName:w||void 0,createdStart:E?.[0]?.toISOString?.(),createdEnd:E?.[1]?.toISOString?.(),page:s,pageSize:n9});n(e.items||[]),i(e.total||0)}catch(e){LG.error(e?.message||`加载爆款开头复刻任务失败`)}finally{o(!1)}},[s,E,y,x,w,l]);(0,S.useEffect)(()=>{A()},[A,O]);let j=()=>{b(d.trim()),C(p.trim()),T(h.trim()),D(_),c(1)};return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsx)(PR,{children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{align:`center`,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:3,style:{marginBottom:4},children:`爆款开头复刻`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`只读排查页面:查看任务列表、素材、步骤详情和生成结果。`})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>k(e=>e+1),children:`刷新`})]}),(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`任务状态`,style:{width:160},value:l||void 0,onChange:e=>{u(e||``),c(1)},options:$ne}),(0,Q.jsx)(hW,{allowClear:!0,prefix:(0,Q.jsx)(NC,{}),placeholder:`关键词:标题/项目名/核心点`,style:{width:260},value:d,onChange:e=>f(e.target.value),onPressEnter:j}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户ID(管理员)`,style:{width:190},value:p,onChange:e=>m(e.target.value),onPressEnter:j}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户名(管理员)`,style:{width:230},value:h,onChange:e=>g(e.target.value),onPressEnter:j}),(0,Q.jsx)(YB.RangePicker,{showTime:!0,value:_,onChange:v,placeholder:[`创建开始`,`创建结束`]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(NC,{}),onClick:j,children:`搜索`}),(0,Q.jsx)(qE,{onClick:()=>{u(``),f(``),m(``),g(``),v(null),b(``),C(``),T(``),D(null),c(1),k(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:a,dataSource:t,pagination:{current:s,pageSize:n9,total:r,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:c},scroll:{x:1380},columns:[{title:`项目ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Ow,{title:e,children:i9(e)})},{title:`用户`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(Z.Text,{children:t.userName||`-`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:i9(t.userId)})]})},{title:`项目信息`,width:260,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:2,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.title||t.targetProjectName||`-`}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:240},children:[`素材:`,t.sourceProjectName||`-`]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:240},children:[`核心:`,t.coreContentPoint||`-`]})]})},{title:`状态`,dataIndex:`status`,width:130,render:e=>(0,Q.jsx)(nre,{status:e})},{title:`当前步骤`,dataIndex:`currentStepCode`,width:140,render:e=>tre[e]||e||`-`},{title:`图片结果`,dataIndex:`finalImageUrl`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`success`,children:`有`}):(0,Q.jsx)(NQ,{children:`无`})},{title:`视频结果`,dataIndex:`finalVideoUrl`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`success`,children:`有`}):(0,Q.jsx)(NQ,{children:`无`})},{title:`错误信息`,dataIndex:`errorMessage`,width:220,ellipsis:!0,render:e=>e||`-`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:r9},{title:`更新时间`,dataIndex:`updatedAt`,width:170,render:r9},{title:`操作`,fixed:`right`,width:110,render:(t,n)=>(0,Q.jsx)(qE,{type:`link`,icon:(0,Q.jsx)(qU,{}),onClick:()=>e(`/hot-opening-replications/${n.id}`),children:`详情`})}]})]})})})},a9=({value:e,maxHeight:t=420})=>e==null||e===``?(0,Q.jsx)(pC,{image:pC.PRESENTED_IMAGE_SIMPLE,description:`暂无 JSON 数据`}):(0,Q.jsx)(`pre`,{style:{margin:0,padding:12,maxHeight:t,overflow:`auto`,background:`#0f172a`,color:`#e2e8f0`,borderRadius:8,fontSize:12,lineHeight:1.6},children:JSON.stringify(e,null,2)}),ire=({input:e,output:t,raw:n,inputLabel:r=`查看 input_json`,outputLabel:i=`查看 output_json`,rawLabel:a=`查看原始 JSON`})=>{let o=[];return e!==void 0&&o.push({key:`input`,label:r,children:(0,Q.jsx)(a9,{value:e})}),t!==void 0&&o.push({key:`output`,label:i,children:(0,Q.jsx)(a9,{value:t})}),n!==void 0&&o.push({key:`raw`,label:a,children:(0,Q.jsx)(a9,{value:n})}),o.length?(0,Q.jsx)(Ng,{size:`small`,style:{marginTop:12},items:o}):null},are=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``);function ore(e){if(!e)return``;let t=String(e).trim();return t?/^(https?:)?\/\//i.test(t)||/^(blob|data):/i.test(t)?t:`${are}${t.startsWith(`/`)?t:`/${t}`}`:``}var o9=({url:e,type:t,height:n=260,emptyDescription:r=`暂无资源`,errorDescription:i=`资源加载失败,可能文件不存在、签名过期或访问权限受限。`})=>{let a=(0,S.useMemo)(()=>ore(e),[e]),[o,s]=(0,S.useState)(!1);(0,S.useEffect)(()=>{s(!1)},[a]);let c=a?(0,Q.jsxs)(VV,{wrap:!0,style:{marginTop:8},children:[(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(c$,{}),onClick:async()=>{if(a)try{await navigator.clipboard.writeText(a),LG.success(`资源地址已复制`)}catch{LG.error(`复制失败,请手动复制`)}},children:`复制地址`}),(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(c4,{}),onClick:()=>window.open(a,`_blank`,`noopener,noreferrer`),children:`新窗口打开`}),(0,Q.jsx)(Z.Text,{copyable:{text:a},type:`secondary`,style:{maxWidth:460},ellipsis:!0,children:a})]}):null;return a?(0,Q.jsxs)(`div`,{children:[o?(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`资源预览失败`,description:i,style:{marginBottom:8}}):null,t===`image`?(0,Q.jsx)(PU,{src:a,onError:()=>s(!0),style:{width:`100%`,maxHeight:n,objectFit:`contain`,borderRadius:12,background:`#f8fafc`,border:`1px solid #f1f5f9`},fallback:``,preview:!o}):(0,Q.jsx)(`video`,{src:a,controls:!0,preload:`metadata`,onError:()=>s(!0),style:{width:`100%`,maxHeight:n,borderRadius:12,background:`#0f172a`,border:`1px solid #f1f5f9`}}),c]}):(0,Q.jsx)(`div`,{children:(0,Q.jsx)(`div`,{style:{height:n,borderRadius:12,border:`1px dashed #cbd5e1`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8fafc`},children:(0,Q.jsx)(pC,{image:pC.PRESENTED_IMAGE_SIMPLE,description:r})})})},s9={pending:{text:`待处理`,color:`default`},waiting_user:{text:`等待用户操作`,color:`processing`},processing:{text:`处理中`,color:`warning`},completed:{text:`已完成`,color:`success`},failed:{text:`失败`,color:`error`},cancelled:{text:`已取消`,color:`default`},canceled:{text:`已取消`,color:`default`},timeout:{text:`已超时`,color:`error`},queued:{text:`已入队`,color:`processing`},preparing:{text:`准备中`,color:`processing`},creating_provider_task:{text:`创建远端任务`,color:`processing`},waiting_remote:{text:`等待远端结果`,color:`processing`},polling:{text:`轮询远端结果`,color:`processing`},result_ready:{text:`结果已就绪`,color:`success`},downloading:{text:`下载中`,color:`processing`},done:{text:`已完成`,color:`success`},download_failed:{text:`下载失败`,color:`error`},retry_waiting:{text:`等待重试`,color:`orange`},pending_analysis:{text:`等待分析`,color:`default`},analyzing:{text:`分析中`,color:`processing`},analysis_completed:{text:`分析完成`,color:`success`},analysis_failed:{text:`分析失败`,color:`error`},splitting:{text:`拆镜中`,color:`warning`},split_completed:{text:`拆镜完成`,color:`success`},partial_failed:{text:`部分失败`,color:`orange`},none:{text:`未拆镜`,color:`default`},not_required:{text:`无需处理`,color:`default`},not_started:{text:`未开始`,color:`default`},project_created:{text:`已创建项目`,color:`processing`},true:{text:`是`,color:`success`},false:{text:`否`,color:`default`}},c9={material_input:`素材输入`,image_prompt_optimize:`图片 AI 提词`,image_generate:`图片生成`,video_prompt_optimize:`视频 AI 提词`,video_generate:`视频生成`},l9={hot_opening_replicate:`爆款开头复刻`,shot_replicate:`拆镜复刻`},u9={ai_suggestion:{text:`AI 建议`,color:`purple`},custom:{text:`自定义`,color:`cyan`},original:{text:`原视频`,color:`blue`}};function d9(e){return e?l9[e]||e:`-`}function f9(e){return e?c9[e]||e:`-`}function sre(e){return e?s9[e]?.text||c9[e]||l9[e]||u9[e]?.text||e:`-`}function cre(e){return e?s9[e]?.color||u9[e]?.color||`blue`:`default`}var p9=({status:e,tooltipRaw:t=!0})=>{if(e==null||e===``)return(0,Q.jsx)(NQ,{children:`-`});let n=String(e),r=sre(n),i=(0,Q.jsx)(NQ,{color:cre(n),children:r});return!t||r===n?i:(0,Q.jsx)(Ow,{title:n,children:i})};function m9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function h9(e,...t){for(let n of t){let t=e[n];if(t!=null&&String(t).trim()!==``)return String(t)}return``}function g9(e,t,...n){for(let t of n){let n=e[t];if(n===!0||n===!1)return n;if(n===`true`)return!0;if(n===`false`)return!1}return t}function lre(e,...t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t)&&t>0)return t;if(typeof t==`string`&&t.trim()){let e=Number(t);if(Number.isFinite(e)&&e>0)return e}}}function _9(e){if(!m9(e))return null;let t=h9(e,`key`);return t?{key:t,label:h9(e,`label`)||t,type:h9(e,`type`)||void 0,enabled:g9(e,!0,`enabled`),editable:g9(e,!0,`editable`),maxLength:lre(e,`maxLength`,`max_length`)}:null}function v9(e){if(!m9(e))return null;let t=e.data;return m9(t)?t:Array.isArray(e.sections)?e:null}function ure(e){return!!v9(e)}function dre(e){let t=v9(e);return(Array.isArray(t?.sections)?t.sections:[]).map(e=>{let t=_9(e);if(!t||!m9(e))return null;let n=Array.isArray(e.children)?e.children.map(_9).filter(Boolean):[],r=Array.isArray(e.itemFields)?e.itemFields.map(_9).filter(Boolean):Array.isArray(e.item_fields)?e.item_fields.map(_9).filter(Boolean):[];return{...t,contentKey:h9(e,`contentKey`,`content_key`)||void 0,children:n,itemFields:r}}).filter(e=>!!e&&e.enabled)}function fre(e){return m9(e)?Object.entries(e).filter(([e])=>![`schemaVersion`,`schemaUsage`,`schema_version`,`schema_usage`].includes(e)).map(([e,t])=>Array.isArray(t)&&t.every(m9)?{key:e,label:e,type:`flow`,enabled:!0,editable:!1,itemFields:Array.from(new Set(t.flatMap(e=>Object.keys(e)))).filter(e=>e!==`时间段`).map(e=>({key:e,label:e,enabled:!0,editable:!1})),children:[]}:m9(t)?{key:e,label:e,type:`object`,enabled:!0,editable:!1,children:Object.keys(t).map(e=>({key:e,label:e,enabled:!0,editable:!1})),itemFields:[]}:{key:e,label:e,type:`text`,enabled:!0,editable:!1,children:[],itemFields:[]}):[]}var y9=e=>!!e&&typeof e==`object`&&!Array.isArray(e),b9=e=>typeof e==`string`&&e.length>80,x9=e=>e==null||e===``?(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`}):typeof e==`boolean`?e?`是`:`否`:typeof e==`number`?e:typeof e==`string`?(0,Q.jsx)(Z.Paragraph,{style:{marginBottom:0,whiteSpace:`pre-wrap`},children:e}):(0,Q.jsx)(a9,{value:e,maxHeight:220}),S9=e=>e?(0,Q.jsx)(NQ,{color:`processing`,children:`可编辑`}):(0,Q.jsx)(NQ,{color:`default`,children:`只读`}),C9=(e,t)=>e[t],pre=(e,t)=>{let n=C9(e,t.key);if(!y9(n))return(0,Q.jsx)(a9,{value:n??{},maxHeight:220});let r=t.children.filter(e=>e.enabled);return r.length?(0,Q.jsx)(lV,{size:`small`,column:2,bordered:!0,children:r.map(e=>(0,Q.jsx)(lV.Item,{label:(0,Q.jsxs)(VV,{size:4,children:[e.label,S9(e.editable)]}),span:b9(n[e.key])||y9(n[e.key])||Array.isArray(n[e.key])?2:1,children:x9(n[e.key])},e.key))}):(0,Q.jsx)(a9,{value:n,maxHeight:220})},mre=(e,t)=>{let n=e.itemFields.filter(e=>e.enabled);return n.length?[{key:`时间段`,label:`时间段`,enabled:!0,editable:!1},...n]:Array.from(new Set(t.flatMap(e=>Object.keys(e)))).map(e=>({key:e,label:e,enabled:!0,editable:!1}))},hre=(e,t)=>{let n=C9(e,t.key);if(!Array.isArray(n)||!n.every(y9))return(0,Q.jsx)(a9,{value:n??[],maxHeight:260});let r=n,i=mre(t,r);return(0,Q.jsx)(bQ,{size:`small`,rowKey:(e,n)=>`${t.key}-${n}`,columns:i.map(e=>({title:(0,Q.jsxs)(VV,{size:4,children:[e.label,S9(e.editable)]}),dataIndex:e.key,key:e.key,width:b9(r.find(t=>t[e.key])?.[e.key])?320:160,render:e=>x9(e)})),dataSource:r,pagination:!1,scroll:{x:Math.max(900,i.length*180)},tableLayout:`fixed`})},gre=(e,t)=>x9(C9(e,t.key)),_re=({schema:e,finalPrompt:t,schemaConfigSnapshot:n,schemaConfigSource:r,schemaConfigVersion:i,schemaConfigIsFallback:a})=>{let o=!!e&&Object.keys(e).length>0;if(!o&&!t)return(0,Q.jsx)(pC,{description:`暂无视频提词 schema`});let s=o?e:{},c=ure(n),l=(c?dre(n):fre(s)).filter(e=>e.key in s).map(e=>({key:e.key,label:(0,Q.jsxs)(VV,{size:8,wrap:!0,children:[(0,Q.jsx)(`span`,{children:e.label}),S9(e.editable),c?null:(0,Q.jsx)(NQ,{color:`warning`,children:`管理后台兜底展示`})]}),children:e.type===`object`?pre(s,e):e.type===`flow`?hre(s,e):gre(s,e)}));return(0,Q.jsxs)(VV,{direction:`vertical`,size:12,style:{width:`100%`},children:[(0,Q.jsx)(PR,{size:`small`,title:`Schema 配置来源`,children:(0,Q.jsxs)(lV,{size:`small`,column:3,bordered:!0,children:[(0,Q.jsx)(lV.Item,{label:`来源`,children:r||n?.source||(c?`-`:`viewer_fallback`)}),(0,Q.jsx)(lV.Item,{label:`版本`,children:i||n?.version||`-`}),(0,Q.jsx)(lV.Item,{label:`历史兜底`,children:a||!c?(0,Q.jsx)(NQ,{color:`warning`,children:`是`}):(0,Q.jsx)(NQ,{color:`success`,children:`否`})})]})}),t?(0,Q.jsx)(PR,{size:`small`,title:`最终视频提示词`,children:(0,Q.jsx)(Z.Paragraph,{style:{whiteSpace:`pre-wrap`,marginBottom:0},children:t})}):null,l.length?(0,Q.jsx)(Ng,{size:`small`,items:l}):o?(0,Q.jsx)(PR,{size:`small`,title:`视频提词 Schema`,children:(0,Q.jsx)(a9,{value:s,maxHeight:360})}):null,o?(0,Q.jsx)(Ng,{size:`small`,items:[{key:`raw_schema`,label:`原始 JSON / 历史脏字段排查`,children:(0,Q.jsx)(a9,{value:s,maxHeight:420})}]}):null]})},vre=[`material_input`,`image_prompt_optimize`,`image_generate`,`video_prompt_optimize`,`video_generate`],yre={material_input:`参考素材、项目名称和核心内容点`,image_prompt_optimize:`图片 AI 提词优化结果`,image_generate:`图片引擎、生成参数和结果图`,video_prompt_optimize:`视频 JSON schema、动作流程和最终提词`,video_generate:`视频引擎、生成参数、封面和结果视频`},w9=e=>e?$5(e):`-`,T9=e=>e?e.length>18?`${e.slice(0,10)}...${e.slice(-4)}`:e:`-`,bre=({text:e=`-`})=>(0,Q.jsx)(Z.Text,{type:`secondary`,children:e}),E9=({step:e})=>e?(0,Q.jsx)(ire,{input:e.input,output:e.output}):null,D9=({index:e,stepCode:t,step:n,current:r})=>(0,Q.jsxs)(VV,{wrap:!0,size:8,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:`第${e}步:${f9(t)}`}),(0,Q.jsx)(p9,{status:n?.status||`not_started`}),r?(0,Q.jsx)(NQ,{color:`blue`,children:`当前步骤`}):null,(0,Q.jsx)(Z.Text,{type:`secondary`,children:yre[t]||t}),n?.updatedAt?(0,Q.jsxs)(Z.Text,{type:`secondary`,children:[`更新时间:`,w9(n.updatedAt)]}):null,n?.chatTaskId?(0,Q.jsx)(Ow,{title:n.chatTaskId,children:(0,Q.jsxs)(NQ,{children:[`Chat:`,T9(n.chatTaskId)]})}):null]}),xre=(e,t)=>{if(!e)return[];let n=new Set;return n.add(`material_input`),e.currentStepCode&&n.add(e.currentStepCode),Object.values(t).forEach(e=>{(e.status===`failed`||e.errorMessage)&&n.add(e.stepCode)}),e.errorMessage&&n.add(e.currentStepCode||`material_input`),Array.from(n)},O9=(e,t=`错误信息`)=>e?(0,Q.jsx)(sf,{type:`error`,showIcon:!0,message:t,description:e,style:{marginTop:12,marginBottom:12}}):null,Sre=(e,t=`暂无提词`)=>e?(0,Q.jsx)(Z.Paragraph,{style:{whiteSpace:`pre-wrap`,marginBottom:0},children:e}):(0,Q.jsx)(bre,{text:t}),k9=({moduleType:e=`shot_replicate`})=>{let{projectId:t}=$e(),n=Ye(),[r,i]=(0,S.useState)(null),[a,o]=(0,S.useState)(!1),s=(0,S.useCallback)(async()=>{if(t){o(!0);try{i(e===`hot_opening_replicate`?await x5(t):await E5(t))}catch(e){LG.error(e?.message||`加载复刻项目详情失败`)}finally{o(!1)}}},[e,t]);(0,S.useEffect)(()=>{s()},[s]);let c=(0,S.useMemo)(()=>{let e={};return(r?.steps||[]).forEach(t=>{e[t.stepCode]=t}),e},[r]),l=r?.module||e,u=d9(l),d=(0,S.useMemo)(()=>vre.map(e=>{let t=c[e],n=`wait`;return t?.status===`completed`?n=`finish`:t?.status===`processing`?n=`process`:t?.status===`failed`&&(n=`error`),{title:f9(e),description:t?(0,Q.jsx)(p9,{status:t.status}):`未创建`,status:n}}),[c]),f=(0,S.useMemo)(()=>xre(r,c),[r,c]);if(a&&!r)return(0,Q.jsx)(`div`,{style:{padding:64,textAlign:`center`},children:(0,Q.jsx)(SG,{size:`large`})});if(!r)return(0,Q.jsx)(PR,{style:{margin:24},children:(0,Q.jsx)(pC,{description:`未找到复刻项目详情`})});let p=c.material_input,m=c.image_prompt_optimize,h=c.image_generate,g=c.video_prompt_optimize,_=c.video_generate,v=r.imageGeneration?.resultImageUrl||r.finalImageUrl,y=r.videoGeneration?.resultVideoCoverUrl||r.finalVideoCoverUrl,b=r.videoGeneration?.resultVideoUrl||r.finalVideoUrl,x=[{key:`material_input`,label:(0,Q.jsx)(D9,{index:1,stepCode:`material_input`,step:p,current:r.currentStepCode===`material_input`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`模块类型`,children:(0,Q.jsx)(p9,{status:l})}),(0,Q.jsx)(lV.Item,{label:`素材步骤ID`,children:r.material?.materialStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`参考素材项目名`,children:r.material?.sourceProjectName||`-`}),(0,Q.jsx)(lV.Item,{label:`生成项目名称`,children:r.material?.targetProjectName||`-`}),(0,Q.jsx)(lV.Item,{label:`核心内容点`,span:2,children:r.material?.coreContentPoint||`-`})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(320px, 1fr))`,gap:16},children:[(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(X4,{}),`素材视频`]}),children:(0,Q.jsx)(o9,{type:`video`,url:r.material?.materialVideoUrl,emptyDescription:`暂无素材视频`})}),(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(_2,{}),`素材图片`]}),children:(0,Q.jsx)(o9,{type:`image`,url:r.material?.materialImageUrl,emptyDescription:`暂无素材图片`})})]}),O9(p?.errorMessage),(0,Q.jsx)(E9,{step:p})]})},{key:`image_prompt_optimize`,label:(0,Q.jsx)(D9,{index:2,stepCode:`image_prompt_optimize`,step:m,current:r.currentStepCode===`image_prompt_optimize`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`提词步骤ID`,children:r.imageGeneration?.promptStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`步骤状态`,children:(0,Q.jsx)(p9,{status:m?.status||r.imageGeneration?.status})}),(0,Q.jsx)(lV.Item,{label:`图片提示词`,span:2,children:Sre(r.imageGeneration?.prompt,`暂无图片提示词`)})]}),O9(m?.errorMessage||r.imageGeneration?.errorMessage),(0,Q.jsx)(E9,{step:m})]})},{key:`image_generate`,label:(0,Q.jsx)(D9,{index:3,stepCode:`image_generate`,step:h,current:r.currentStepCode===`image_generate`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`生成步骤ID`,children:r.imageGeneration?.generateStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`Chat任务ID`,children:r.imageGeneration?.chatTaskId||`-`}),(0,Q.jsx)(lV.Item,{label:`状态`,children:(0,Q.jsx)(p9,{status:r.imageGeneration?.status||h?.status})}),(0,Q.jsx)(lV.Item,{label:`图片引擎ID`,children:r.imageGeneration?.engineId||`-`}),(0,Q.jsx)(lV.Item,{label:`图片引擎名称`,children:r.imageGeneration?.engineName||`-`}),(0,Q.jsx)(lV.Item,{label:`生成参数`,span:3,children:(0,Q.jsx)(a9,{value:r.imageGeneration?.params||{},maxHeight:160})})]}),O9(r.imageGeneration?.errorMessage||h?.errorMessage),(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(_2,{}),`图片结果`]}),children:(0,Q.jsx)(o9,{type:`image`,url:v,height:360,emptyDescription:h?.status===`failed`||r.imageGeneration?.errorMessage?`图片生成失败,未返回图片地址`:`暂无图片结果`,errorDescription:`图片资源加载失败,可能图片文件不存在、签名过期或访问权限受限。`})}),(0,Q.jsx)(E9,{step:h})]})},{key:`video_prompt_optimize`,label:(0,Q.jsx)(D9,{index:4,stepCode:`video_prompt_optimize`,step:g,current:r.currentStepCode===`video_prompt_optimize`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`提词步骤ID`,children:r.videoGeneration?.promptStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`步骤状态`,children:(0,Q.jsx)(p9,{status:g?.status})}),(0,Q.jsx)(lV.Item,{label:`提词参数`,span:3,children:(0,Q.jsx)(a9,{value:r.videoGeneration?.promptParams||{},maxHeight:160})})]}),O9(g?.errorMessage||r.videoGeneration?.errorMessage),(0,Q.jsx)(_re,{schema:r.videoGeneration?.promptSchema,finalPrompt:r.videoGeneration?.finalPrompt,schemaConfigSnapshot:r.videoGeneration?.schemaConfigSnapshot,schemaConfigSource:r.videoGeneration?.schemaConfigSource,schemaConfigVersion:r.videoGeneration?.schemaConfigVersion,schemaConfigIsFallback:r.videoGeneration?.schemaConfigIsFallback}),(0,Q.jsx)(E9,{step:g})]})},{key:`video_generate`,label:(0,Q.jsx)(D9,{index:5,stepCode:`video_generate`,step:_,current:r.currentStepCode===`video_generate`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`生成步骤ID`,children:r.videoGeneration?.generateStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`Chat任务ID`,children:r.videoGeneration?.chatTaskId||`-`}),(0,Q.jsx)(lV.Item,{label:`状态`,children:(0,Q.jsx)(p9,{status:r.videoGeneration?.status||_?.status})}),(0,Q.jsx)(lV.Item,{label:`视频引擎ID`,children:r.videoGeneration?.engineId||`-`}),(0,Q.jsx)(lV.Item,{label:`视频引擎名称`,children:r.videoGeneration?.engineName||`-`}),(0,Q.jsx)(lV.Item,{label:`生成参数`,span:3,children:(0,Q.jsx)(a9,{value:r.videoGeneration?.params||{},maxHeight:160})})]}),O9(r.videoGeneration?.errorMessage||_?.errorMessage),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(320px, 1fr))`,gap:16},children:[(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(_2,{}),`视频封面`]}),children:(0,Q.jsx)(o9,{type:`image`,url:y,emptyDescription:_?.status===`failed`||r.videoGeneration?.errorMessage?`视频生成失败,未返回封面`:`暂无视频封面`,errorDescription:`视频封面加载失败,可能文件不存在、签名过期或访问权限受限。`})}),(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(M6,{}),`最终视频`]}),children:(0,Q.jsx)(o9,{type:`video`,url:b,emptyDescription:_?.status===`failed`||r.videoGeneration?.errorMessage?`视频生成失败,未返回视频地址`:`暂无最终视频`,errorDescription:`视频资源加载失败,可能文件不存在、签名过期或访问权限受限。`})})]}),(0,Q.jsx)(E9,{step:_})]})}];return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{wrap:!0,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(X1,{}),onClick:()=>n(-1),children:`返回`}),(0,Q.jsxs)(Z.Title,{level:3,style:{margin:0},children:[u,`项目详情`]}),(0,Q.jsx)(p9,{status:r.status}),r.module&&r.module!==e?(0,Q.jsxs)(NQ,{color:`gold`,children:[`接口模块:`,d9(r.module)]}):null]}),(0,Q.jsx)(qE,{onClick:s,loading:a,children:`刷新`})]}),(0,Q.jsx)(PR,{children:(0,Q.jsxs)(lV,{title:`基础信息`,column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`项目ID`,children:r.id}),(0,Q.jsx)(lV.Item,{label:`模块类型`,children:(0,Q.jsx)(p9,{status:l})}),(0,Q.jsx)(lV.Item,{label:`用户ID`,children:r.userId||`-`}),(0,Q.jsx)(lV.Item,{label:`用户名`,children:r.userName||`-`}),(0,Q.jsx)(lV.Item,{label:`标题`,children:r.title||`-`}),(0,Q.jsx)(lV.Item,{label:`当前步骤`,children:(0,Q.jsx)(Ow,{title:r.currentStepCode||``,children:f9(r.currentStepCode)})}),(0,Q.jsx)(lV.Item,{label:`状态`,children:(0,Q.jsx)(p9,{status:r.status})}),(0,Q.jsx)(lV.Item,{label:`创建时间`,children:w9(r.createdAt)}),(0,Q.jsx)(lV.Item,{label:`更新时间`,children:w9(r.updatedAt)}),(0,Q.jsx)(lV.Item,{label:`完成时间`,children:w9(r.completedAt)}),r.errorMessage?(0,Q.jsx)(lV.Item,{label:`错误信息`,span:3,children:(0,Q.jsx)(sf,{type:`error`,showIcon:!0,message:r.errorMessage})}):null]})}),(0,Q.jsx)(PR,{title:`步骤进度`,children:(0,Q.jsx)(Cq,{items:d})}),(0,Q.jsx)(PR,{title:`最终结果预览`,children:(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(280px, 1fr))`,gap:16},children:[(0,Q.jsx)(PR,{size:`small`,title:`最终图片`,children:(0,Q.jsx)(o9,{type:`image`,url:r.finalImageUrl||r.imageGeneration?.resultImageUrl,height:220,emptyDescription:`暂无最终图片`})}),(0,Q.jsx)(PR,{size:`small`,title:`最终视频封面`,children:(0,Q.jsx)(o9,{type:`image`,url:r.finalVideoCoverUrl||r.videoGeneration?.resultVideoCoverUrl,height:220,emptyDescription:`暂无最终视频封面`})}),(0,Q.jsx)(PR,{size:`small`,title:`最终视频`,children:(0,Q.jsx)(o9,{type:`video`,url:r.finalVideoUrl||r.videoGeneration?.resultVideoUrl,height:220,emptyDescription:`暂无最终视频`})})]})}),(0,Q.jsx)(Ng,{defaultActiveKey:f,items:x}),(0,Q.jsx)(Ng,{items:[{key:`steps-table`,label:`完整步骤列表`,children:(0,Q.jsx)(bQ,{rowKey:`id`,size:`small`,pagination:!1,dataSource:r.steps||[],scroll:{x:1100},columns:[{title:`序号`,dataIndex:`stepIndex`,width:70},{title:`步骤`,dataIndex:`stepCode`,width:160,render:e=>(0,Q.jsx)(Ow,{title:e,children:f9(e)})},{title:`状态`,dataIndex:`status`,width:120,render:e=>(0,Q.jsx)(p9,{status:e})},{title:`版本`,dataIndex:`version`,width:70},{title:`当前有效`,dataIndex:`isCurrent`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`success`,children:`是`}):(0,Q.jsx)(NQ,{children:`否`})},{title:`Chat任务`,dataIndex:`chatTaskId`,width:160,render:e=>(0,Q.jsx)(Ow,{title:e||``,children:T9(e)})},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:w9},{title:`完成时间`,dataIndex:`completedAt`,width:170,render:w9},{title:`错误`,dataIndex:`errorMessage`,ellipsis:!0,render:e=>e||`-`}]})},{key:`raw-detail`,label:`完整详情原始 JSON`,children:(0,Q.jsx)(a9,{value:r,maxHeight:520})}]})]})})},Cre=()=>(0,Q.jsx)(k9,{moduleType:`hot_opening_replicate`}),A9=20,wre=[{value:`pending_analysis`,label:`等待分析`},{value:`analyzing`,label:`分析中`},{value:`analysis_completed`,label:`分析完成`},{value:`analysis_failed`,label:`分析失败`},{value:`splitting`,label:`拆镜中`},{value:`split_completed`,label:`拆镜完成`},{value:`partial_failed`,label:`部分失败`},{value:`failed`,label:`失败`}],Tre=[{value:`pending`,label:`待分析`},{value:`processing`,label:`分析中`},{value:`completed`,label:`分析完成`},{value:`failed`,label:`分析失败`}],Ere=[{value:`none`,label:`未拆镜`},{value:`pending`,label:`待拆镜`},{value:`processing`,label:`拆镜中`},{value:`completed`,label:`拆镜完成`},{value:`failed`,label:`拆镜失败`},{value:`retry_waiting`,label:`等待重试`}],Dre={pending_analysis:{color:`default`,text:`等待分析`},analyzing:{color:`processing`,text:`分析中`},analysis_completed:{color:`success`,text:`分析完成`},analysis_failed:{color:`error`,text:`分析失败`},splitting:{color:`warning`,text:`拆镜中`},split_completed:{color:`success`,text:`拆镜完成`},partial_failed:{color:`orange`,text:`部分失败`},failed:{color:`error`,text:`失败`},none:{color:`default`,text:`未拆镜`},pending:{color:`default`,text:`待处理`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`完成`},retry_waiting:{color:`orange`,text:`等待重试`}},j9=e=>e?$5(e):`-`,M9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,N9=({status:e})=>{if(!e)return(0,Q.jsx)(NQ,{children:`-`});let t=Dre[e]||{color:`blue`,text:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.text})},Ore=()=>{let e=Ye(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(1),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(``),[h,g]=(0,S.useState)(``),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(null),[w,T]=(0,S.useState)(``),[E,D]=(0,S.useState)(``),[O,k]=(0,S.useState)(``),[A,j]=(0,S.useState)(null),[M,N]=(0,S.useState)(0),P=(0,S.useCallback)(async()=>{o(!0);try{let e=await S5({status:l||void 0,analysisStatus:d||void 0,splitStatus:p||void 0,keyword:w||void 0,userId:E||void 0,userName:O||void 0,createdStart:A?.[0]?.toISOString?.(),createdEnd:A?.[1]?.toISOString?.(),page:s,pageSize:A9});n(e.items||[]),i(e.total||0)}catch(e){LG.error(e?.message||`加载拆镜复刻任务失败`)}finally{o(!1)}},[d,s,A,w,E,O,p,l]);(0,S.useEffect)(()=>{P()},[P,M]);let F=()=>{T(h.trim()),D(_.trim()),k(y.trim()),j(x),c(1)};return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsx)(PR,{children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{align:`center`,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:3,style:{marginBottom:4},children:`拆镜复刻`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`只读排查页面:查看拆镜总任务、AI 分析结果、切片列表和关联复刻项目。`})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>N(e=>e+1),children:`刷新`})]}),(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`总任务状态`,style:{width:150},value:l||void 0,onChange:e=>{u(e||``),c(1)},options:wre}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`分析状态`,style:{width:140},value:d||void 0,onChange:e=>{f(e||``),c(1)},options:Tre}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`拆镜状态`,style:{width:140},value:p||void 0,onChange:e=>{m(e||``),c(1)},options:Ere}),(0,Q.jsx)(hW,{allowClear:!0,prefix:(0,Q.jsx)(NC,{}),placeholder:`关键词:标题/内容/分类/受众`,style:{width:260},value:h,onChange:e=>g(e.target.value),onPressEnter:F}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户ID(管理员)`,style:{width:190},value:_,onChange:e=>v(e.target.value),onPressEnter:F}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户名(管理员)`,style:{width:230},value:y,onChange:e=>b(e.target.value),onPressEnter:F}),(0,Q.jsx)(YB.RangePicker,{showTime:!0,value:x,onChange:C,placeholder:[`创建开始`,`创建结束`]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(NC,{}),onClick:F,children:`搜索`}),(0,Q.jsx)(qE,{onClick:()=>{u(``),f(``),m(``),g(``),v(``),b(``),C(null),T(``),D(``),k(``),j(null),c(1),N(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:a,dataSource:t,pagination:{current:s,pageSize:A9,total:r,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:c},scroll:{x:1500},columns:[{title:`任务集ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Ow,{title:e,children:M9(e)})},{title:`用户`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(Z.Text,{children:t.userName||`-`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:M9(t.userId)})]})},{title:`任务信息`,width:300,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:2,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.title||`-`}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:280},children:[`分类:`,t.originalVideoCategory||`-`]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:280},children:[`受众:`,t.originalVideoAudience||`-`]})]})},{title:`总状态`,dataIndex:`status`,width:120,render:e=>(0,Q.jsx)(N9,{status:e})},{title:`分析状态`,dataIndex:`analysisStatus`,width:110,render:e=>(0,Q.jsx)(N9,{status:e})},{title:`拆镜状态`,dataIndex:`splitStatus`,width:110,render:e=>(0,Q.jsx)(N9,{status:e})},{title:`切片进度`,width:180,render:(e,t)=>{let n=t.segmentCount||0,r=t.completedSegmentCount||0;return(0,Q.jsx)(CK,{size:`small`,percent:n?Math.round(r/n*100):0,format:()=>`${r}/${n}`})}},{title:`失败片段`,dataIndex:`failedSegmentCount`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`error`,children:e}):(0,Q.jsx)(NQ,{children:`0`})},{title:`视频时长`,dataIndex:`videoDurationSeconds`,width:100,render:e=>`${Number(e||0).toFixed(1)}s`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:j9},{title:`更新时间`,dataIndex:`updatedAt`,width:170,render:j9},{title:`操作`,fixed:`right`,width:120,render:(t,n)=>(0,Q.jsx)(qE,{type:`link`,icon:(0,Q.jsx)(qU,{}),onClick:()=>e(`/shot-replications/task-sets/${n.id}`),children:`查看切片`})}]})]})})})},kre=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),P9=20,Are=[{value:`ai_suggestion`,label:`AI 建议`},{value:`custom`,label:`自定义`}],jre=[{value:`none`,label:`未拆镜`},{value:`pending`,label:`待拆镜`},{value:`processing`,label:`拆镜中`},{value:`completed`,label:`拆镜完成`},{value:`failed`,label:`拆镜失败`},{value:`retry_waiting`,label:`等待重试`}],Mre=[{value:`not_required`,label:`无需分析`},{value:`pending`,label:`待分析`},{value:`processing`,label:`分析中`},{value:`completed`,label:`分析完成`},{value:`failed`,label:`分析失败`}],Nre=[{value:`not_started`,label:`未复刻`},{value:`project_created`,label:`已创建项目`},{value:`processing`,label:`复刻中`},{value:`completed`,label:`复刻完成`},{value:`failed`,label:`复刻失败`}],Pre={pending_analysis:{color:`default`,text:`等待分析`},analyzing:{color:`processing`,text:`分析中`},analysis_completed:{color:`success`,text:`分析完成`},analysis_failed:{color:`error`,text:`分析失败`},splitting:{color:`warning`,text:`拆镜中`},split_completed:{color:`success`,text:`拆镜完成`},partial_failed:{color:`orange`,text:`部分失败`},failed:{color:`error`,text:`失败`},none:{color:`default`,text:`未拆镜`},pending:{color:`default`,text:`待处理`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`完成`},retry_waiting:{color:`orange`,text:`等待重试`},not_required:{color:`default`,text:`无需分析`},not_started:{color:`default`,text:`未复刻`},project_created:{color:`processing`,text:`已创建项目`}},Fre=e=>{if(!e)return``;let t=String(e).trim();return t?/^(https?:)?\/\//i.test(t)||/^(blob|data):/i.test(t)?t:`${kre}${t.startsWith(`/`)?t:`/${t}`}`:``},F9=e=>e?$5(e):`-`,I9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,L9=({status:e})=>{if(!e)return(0,Q.jsx)(NQ,{children:`-`});let t=Pre[e]||{color:`blue`,text:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.text})},R9=({value:e,maxHeight:t=420})=>(0,Q.jsx)(`pre`,{style:{margin:0,padding:12,maxHeight:t,overflow:`auto`,background:`#0f172a`,color:`#e2e8f0`,borderRadius:8,fontSize:12,lineHeight:1.6},children:JSON.stringify(e??{},null,2)}),z9=({url:e,height:t=280})=>e?(0,Q.jsx)(`video`,{src:Fre(e),controls:!0,preload:`metadata`,style:{width:`100%`,maxHeight:t,borderRadius:12,background:`#0f172a`}}):(0,Q.jsx)(pC,{description:`暂无视频`,image:pC.PRESENTED_IMAGE_SIMPLE}),Ire=({items:e=[]})=>(0,Q.jsx)(bQ,{rowKey:`index`,size:`small`,pagination:!1,dataSource:e,scroll:{x:!0},columns:[{title:`序号`,dataIndex:`index`,width:70},{title:`时间节点`,dataIndex:`timeNode`,width:120},{title:`开始`,dataIndex:`startSecond`,width:80,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`结束`,dataIndex:`endSecond`,width:80,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`内容`,dataIndex:`content`,ellipsis:!0},{title:`分类`,dataIndex:`category`,width:140},{title:`受众`,dataIndex:`audience`,ellipsis:!0}]}),Lre=()=>{let{taskSetId:e}=$e(),t=Ye(),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(0),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(null),k=(0,S.useCallback)(async()=>{if(e){d(!0);try{r(await C5(e))}catch(e){LG.error(e?.message||`加载拆镜任务详情失败`)}finally{d(!1)}}},[e]),A=(0,S.useCallback)(async()=>{if(e){p(!0);try{let t=await w5(e,{sourceMode:g||void 0,splitStatus:v||void 0,analysisStatus:b||void 0,replicateStatus:C||void 0,page:c,pageSize:P9});a(t.items||[]),s(t.total||0)}catch(e){LG.error(e?.message||`加载拆镜片段失败`)}finally{p(!1)}}},[b,c,C,g,v,e]);(0,S.useEffect)(()=>{k()},[k,m]),(0,S.useEffect)(()=>{A()},[A,m]);let j=async e=>{E(!0),O(null);try{O(await T5(e))}catch(e){LG.error(e?.message||`加载片段详情失败`)}};return u&&!n?(0,Q.jsx)(`div`,{style:{padding:64,textAlign:`center`},children:(0,Q.jsx)(SG,{size:`large`})}):n?(0,Q.jsxs)(`div`,{style:{padding:24},children:[(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(X1,{}),onClick:()=>t(`/shot-replications`),children:`返回列表`}),(0,Q.jsx)(Z.Title,{level:3,style:{margin:0},children:`拆镜任务详情`}),(0,Q.jsx)(L9,{status:n.status})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>h(e=>e+1),children:`刷新`})]}),(0,Q.jsx)(PR,{children:(0,Q.jsxs)(lV,{title:`总任务信息`,column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`任务集ID`,children:n.id}),(0,Q.jsx)(lV.Item,{label:`用户ID`,children:n.userId||`-`}),(0,Q.jsx)(lV.Item,{label:`用户名`,children:n.userName||`-`}),(0,Q.jsx)(lV.Item,{label:`标题`,children:n.title||`-`}),(0,Q.jsxs)(lV.Item,{label:`视频时长`,children:[Number(n.videoDurationSeconds||0).toFixed(2),`s`]}),(0,Q.jsx)(lV.Item,{label:`总状态`,children:(0,Q.jsx)(L9,{status:n.status})}),(0,Q.jsx)(lV.Item,{label:`分析状态`,children:(0,Q.jsx)(L9,{status:n.analysisStatus})}),(0,Q.jsx)(lV.Item,{label:`拆镜状态`,children:(0,Q.jsx)(L9,{status:n.splitStatus})}),(0,Q.jsxs)(lV.Item,{label:`片段数量`,children:[n.completedSegmentCount,`/`,n.segmentCount,`,失败 `,n.failedSegmentCount]}),(0,Q.jsx)(lV.Item,{label:`原视频分类`,children:n.originalVideoCategory||`-`}),(0,Q.jsx)(lV.Item,{label:`创建时间`,children:F9(n.createdAt)}),(0,Q.jsx)(lV.Item,{label:`更新时间`,children:F9(n.updatedAt)}),(0,Q.jsx)(lV.Item,{label:`原视频内容`,span:3,children:n.originalVideoContent||`-`}),(0,Q.jsx)(lV.Item,{label:`原视频受众`,span:3,children:n.originalVideoAudience||`-`}),n.analysisErrorMessage?(0,Q.jsx)(lV.Item,{label:`分析错误`,span:3,children:(0,Q.jsx)(sf,{type:`error`,message:n.analysisErrorMessage})}):null,n.splitErrorMessage?(0,Q.jsx)(lV.Item,{label:`拆镜错误`,span:3,children:(0,Q.jsx)(sf,{type:`error`,message:n.splitErrorMessage})}):null]})}),(0,Q.jsx)(PR,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(X4,{}),`原视频预览`]}),children:(0,Q.jsx)(z9,{url:n.videoUrl,height:360})}),(0,Q.jsxs)(PR,{title:`AI 建议拆镜列表`,children:[n.aiSuggestions?.length?(0,Q.jsx)(Ire,{items:n.aiSuggestions}):(0,Q.jsx)(pC,{description:`暂无 AI 建议拆镜`}),(0,Q.jsx)(Ng,{size:`small`,ghost:!0,style:{marginTop:12},items:[{key:`raw`,label:`查看原视频分析完整 JSON`,children:(0,Q.jsx)(R9,{value:n.analysisResultJson})}]})]}),(0,Q.jsxs)(PR,{title:`片段列表`,children:[(0,Q.jsxs)(VV,{wrap:!0,style:{marginBottom:16},children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`片段来源`,style:{width:140},value:g||void 0,options:Are,onChange:e=>{_(e||``),l(1)}}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`切割状态`,style:{width:140},value:v||void 0,options:jre,onChange:e=>{y(e||``),l(1)}}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`分析状态`,style:{width:140},value:b||void 0,options:Mre,onChange:e=>{x(e||``),l(1)}}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`复刻状态`,style:{width:150},value:C||void 0,options:Nre,onChange:e=>{w(e||``),l(1)}}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(NC,{}),onClick:()=>h(e=>e+1),children:`筛选`}),(0,Q.jsx)(qE,{onClick:()=>{_(``),y(``),x(``),w(``),l(1),h(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:f,dataSource:i,pagination:{current:c,pageSize:P9,total:o,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:l},scroll:{x:1550},columns:[{title:`片段ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Ow,{title:e,children:I9(e)})},{title:`序号`,dataIndex:`segmentIndex`,width:70},{title:`来源`,dataIndex:`sourceMode`,width:100,render:e=>e===`ai_suggestion`?(0,Q.jsx)(NQ,{color:`purple`,children:`AI建议`}):(0,Q.jsx)(NQ,{color:`cyan`,children:`自定义`})},{title:`时间节点`,dataIndex:`timeNode`,width:130},{title:`时长`,dataIndex:`durationSeconds`,width:90,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`切割`,dataIndex:`splitStatus`,width:100,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`分析`,dataIndex:`analysisStatus`,width:100,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`复刻`,dataIndex:`replicateStatus`,width:110,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`片段内容`,dataIndex:`segmentContent`,width:260,ellipsis:!0,render:e=>e||`-`},{title:`分类`,dataIndex:`segmentCategory`,width:120,render:e=>e||`-`},{title:`关联项目`,width:220,render:(e,n)=>n.moduleProjectId?(0,Q.jsxs)(VV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(qE,{type:`link`,style:{padding:0},onClick:()=>t(`/shot-replications/projects/${n.moduleProjectId}`),children:I9(n.moduleProjectId)}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:n.moduleProjectTitle||f9(n.moduleProjectCurrentStepCode)}),(0,Q.jsx)(L9,{status:n.moduleProjectStatus})]}):(0,Q.jsx)(NQ,{children:`未创建`})},{title:`错误`,dataIndex:`splitLastError`,width:220,ellipsis:!0,render:(e,t)=>e||t.analysisErrorMessage||`-`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:F9},{title:`操作`,fixed:`right`,width:100,render:(e,t)=>(0,Q.jsx)(qE,{type:`link`,icon:(0,Q.jsx)(qU,{}),onClick:()=>j(t.id),children:`详情`})}]})]})]}),(0,Q.jsx)(MV,{title:`片段详情`,width:720,open:T,onClose:()=>E(!1),destroyOnClose:!0,children:D?(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`片段ID`,span:2,children:D.id}),(0,Q.jsx)(lV.Item,{label:`时间节点`,children:D.timeNode}),(0,Q.jsxs)(lV.Item,{label:`时长`,children:[Number(D.durationSeconds||0).toFixed(2),`s`]}),(0,Q.jsx)(lV.Item,{label:`切割状态`,children:(0,Q.jsx)(L9,{status:D.splitStatus})}),(0,Q.jsx)(lV.Item,{label:`分析状态`,children:(0,Q.jsx)(L9,{status:D.analysisStatus})}),(0,Q.jsx)(lV.Item,{label:`复刻状态`,children:(0,Q.jsx)(L9,{status:D.replicateStatus})}),(0,Q.jsx)(lV.Item,{label:`关联项目`,children:D.moduleProjectId?(0,Q.jsx)(qE,{type:`link`,onClick:()=>t(`/shot-replications/projects/${D.moduleProjectId}`),children:D.moduleProjectId}):`-`}),(0,Q.jsx)(lV.Item,{label:`片段内容`,span:2,children:D.segmentContent||`-`}),(0,Q.jsx)(lV.Item,{label:`片段分类`,children:D.segmentCategory||`-`}),(0,Q.jsx)(lV.Item,{label:`片段受众`,children:D.segmentAudience||`-`})]}),(0,Q.jsx)(PR,{size:`small`,title:`片段视频`,children:(0,Q.jsx)(z9,{url:D.segmentVideoUrl,height:300})}),D.splitLastError?(0,Q.jsx)(sf,{type:`error`,message:`切割错误`,description:D.splitLastError}):null,D.analysisErrorMessage?(0,Q.jsx)(sf,{type:`error`,message:`分析错误`,description:D.analysisErrorMessage}):null,(0,Q.jsx)(Ng,{size:`small`,items:[{key:`analysis`,label:`片段分析 JSON`,children:(0,Q.jsx)(R9,{value:D.analysisJson})},{key:`suggestion`,label:`AI 建议原始 JSON`,children:(0,Q.jsx)(R9,{value:D.aiSuggestionJson})}]})]}):(0,Q.jsx)(SG,{})})]}):(0,Q.jsx)(PR,{style:{margin:24},children:(0,Q.jsx)(pC,{description:`未找到拆镜任务详情`})})},{Title:Rre,Text:B9,Paragraph:zre}=Z,{TextArea:V9}=hW,H9=[{label:`对象`,value:`object`},{label:`数组`,value:`array`},{label:`字符串`,value:`string`},{label:`数字`,value:`number`},{label:`布尔`,value:`boolean`},{label:`流程数组`,value:`flow`}],U9=`画面属性`,Bre=new Set([`视频时长`,`视频比例`,`清晰度`,`帧率`,`推荐分辨率`]);function W9(e,t){return e===U9&&!!t&&Bre.has(t)}function G9(e){return e===U9}function Vre(e){return JSON.parse(JSON.stringify(e??null))}function K9(e,t,n,r){return!e||typeof e!=`object`?r:e[t]===void 0?e[n]===void 0?r:e[n]:e[t]}function Hre(e){return{key:String(e?.key||e?.label||`新流程字段`),label:String(e?.label||e?.key||`新流程字段`),enabled:e?.enabled??!0,editable:e?.editable??!0,maxLength:Number(K9(e,`maxLength`,`max_length`,800)||800),value:e?.value??``}}function q9(e){let t=String(e?.type||`string`),n={key:String(e?.key||e?.label||`新字段`),label:String(e?.label||e?.key||`新字段`),type:t,enabled:e?.enabled??!0,editable:e?.editable??!0,maxLength:Number(K9(e,`maxLength`,`max_length`,t===`flow`?800:1e3)||(t===`flow`?800:1e3))};if(t===`object`)n.children=Array.isArray(e?.children)?e.children.map(q9):[];else if(t===`flow`){n.contentKey=String(K9(e,`contentKey`,`content_key`,e?.key===`镜头流程`?`镜头内容`:`动作内容`));let t=K9(e,`contentAliases`,`content_aliases`,[]);n.contentAliases=Array.isArray(t)?t.map(e=>String(e)).filter(Boolean):[];let r=K9(e,`itemFields`,`item_fields`,[]);n.itemFields=Array.isArray(r)&&r.length>0?r.map(Hre):[{key:n.contentKey,label:n.contentKey,enabled:!0,editable:!0,maxLength:n.maxLength||800,value:``}]}else n.value=e?.value??(t===`array`?[]:t===`boolean`?!1:t===`number`?0:`无`);return n}function Ure(e){let t=Array.isArray(e?.segments)?e.segments:[],n=Array.isArray(e?.ratios)?e.ratios:[];return{minDuration:Number(K9(e,`minDuration`,`min_duration`,1)||1),maxDuration:Number(K9(e,`maxDuration`,`max_duration`,5)||5),ratios:n.map(e=>Number(e||0)),segments:t.map(e=>({stage:String(e?.stage||`新阶段`),description:String(e?.description||e?.desc||`阶段说明`)}))}}function J9(e){let t=Array.isArray(e?.sections)?e.sections:[],n=Array.isArray(e?.timePlanRules)?e.timePlanRules:Array.isArray(e?.time_plan_rules)?e.time_plan_rules:[];return{version:e?.version||`video_prompt_schema_config_v1`,enabled:e?.enabled??!0,sections:t.map(q9),timePlanRules:n.map(Ure)}}function Y9(e,t){let n=G9(e.key),r=W9(t,e.key),i={key:e.key,label:e.label,type:r?`string`:e.type,enabled:n||r?!0:!!e.enabled,editable:r?!1:!!e.editable,max_length:e.maxLength};return e.type===`object`?i.children=(e.children||[]).map(t=>Y9(t,e.key)):e.type===`flow`?(i.content_key=e.contentKey,i.content_aliases=e.contentAliases||[],i.item_fields=(e.itemFields||[]).map(e=>({key:e.key,label:e.label,enabled:!!e.enabled,editable:!!e.editable,max_length:e.maxLength,value:e.value??``}))):i.value=e.value,i}function X9(e,t){return{version:e.version,enabled:t,sections:(e.sections||[]).map(e=>Y9(e)),time_plan_rules:(e.timePlanRules||[]).map(e=>({min_duration:e.minDuration,max_duration:e.maxDuration,ratios:e.ratios||[],segments:(e.segments||[]).map(e=>({stage:e.stage,description:e.description}))}))}}function Z9(e){return e?.runtimeSchema||e?.runtime_schema||{}}function Q9(e){let t=e?.timePlan||e?.time_plan||Z9(e)?.动态时间规划||[];return Array.isArray(t)?t:[]}function Wre(e){return e?.schemaConfigSnapshot||e?.schema_config_snapshot||{}}function Gre(e,t){let n=new Blob([JSON.stringify(t,null,2)],{type:`application/json;charset=utf-8`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=e,i.click(),URL.revokeObjectURL(r)}var $9=(e=`string`)=>({key:`新字段`,label:`新字段`,type:e,enabled:!0,editable:!0,maxLength:e===`flow`?800:1e3,value:e===`array`?[]:e===`boolean`?!1:e===`number`?0:`无`,children:e===`object`?[]:void 0,contentKey:e===`flow`?`动作内容`:void 0,contentAliases:e===`flow`?[`动作内容`,`动作`,`动作说明`,`内容`,`说明`]:void 0,itemFields:e===`flow`?[{key:`动作内容`,label:`动作内容`,enabled:!0,editable:!0,maxLength:800,value:``}]:void 0}),Kre=()=>({minDuration:1,maxDuration:5,ratios:[.2,.4,.4],segments:[{stage:`开场吸引`,description:`快速吸引注意力`},{stage:`核心展示`,description:`展示主体动作、核心卖点或主要视觉内容`},{stage:`收尾引导`,description:`给出行动引导并稳定落版`}]}),qre=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!0),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(null),[g]=X.useForm(),_=(0,S.useRef)(null),v=c?.sections||[],y=c?.timePlanRules||[],b=async()=>{t(!0);try{let e=await D5();a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),l(J9(e.data)),d(J9(e.defaultData??e.default_data))}catch(e){LG.error(e?.message||`加载失败`)}finally{t(!1)}};(0,S.useEffect)(()=>{b()},[]);let x=e=>{l(t=>{let n=J9(Vre(t));return e(n),n})},C=async()=>{if(c){r(!0);try{let e=await O5({is_enabled:i,data:X9(c,i)});l(J9(e.data)),a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),LG.success(`保存成功`)}catch(e){LG.error(e?.message||`保存失败`)}finally{r(!1)}}},w=async()=>{r(!0);try{let e=await k5();l(J9(e.data)),d(J9(e.defaultData??e.default_data)),a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),LG.success(`已恢复默认配置`)}catch(e){LG.error(e?.message||`恢复默认失败`)}finally{r(!1)}},T=async()=>{try{Gre(`video_prompt_schema_config.json`,await A5())}catch(e){LG.error(e?.message||`导出失败`)}},E=async e=>{let t=e.target.files?.[0];if(e.target.value=``,t)try{let e=await t.text(),n=JSON.parse(e),r=n.data||n,o=await j5({is_enabled:!!(n.isEnabled??n.is_enabled??i),data:r});l(J9(o.data)),a(!!(o.isEnabled??o.is_enabled??o.data?.enabled??!1)),s(!!(o.usingDefault??o.using_default??!1)),LG.success(`导入成功`)}catch(e){LG.error(e?.message||`导入失败,请检查 JSON 格式`)}},D=()=>{g.setFieldsValue({duration:8,aspectRatio:`9:16`,resolution:`1080p`,frameRate:`30fps`}),h(null),p(!0)},O=async()=>{if(!c)return;let e=await g.validateFields();try{h(await M5({is_enabled:i,data:X9(c,i),duration:Number(e.duration||8),aspect_ratio:e.aspectRatio,resolution:e.resolution,frame_rate:e.frameRate}))}catch(e){LG.error(e?.message||`预览失败`)}},k=()=>{x(e=>{e.sections.push($9(`object`))})},A=(e,t)=>{x(n=>{let r=n.sections[e];G9(r?.key)&&(delete t.key,delete t.type,delete t.enabled),n.sections[e]={...n.sections[e],...t},t.type===`object`&&(n.sections[e].children=n.sections[e].children||[]),t.type===`flow`&&(n.sections[e].contentKey=n.sections[e].contentKey||`动作内容`,n.sections[e].contentAliases=n.sections[e].contentAliases||[`动作内容`,`动作`,`动作说明`,`内容`,`说明`],n.sections[e].itemFields=n.sections[e].itemFields||[{key:`动作内容`,label:`动作内容`,enabled:!0,editable:!0,maxLength:800,value:``}])})},j=e=>{x(t=>{t.sections.splice(e,1)})},M=e=>{x(t=>{let n=t.sections[e];n.children=n.children||[],n.children.push($9(`string`))})},N=(e,t,n)=>{x(r=>{let i=r.sections[e],a=i.children||[],o=a[t];W9(i?.key,o?.key)&&(delete n.key,delete n.type,delete n.enabled,n.editable=!1),a[t]={...a[t],...n},r.sections[e].children=a})},P=(e,t)=>{x(n=>{n.sections[e].children?.splice(t,1)})},F=e=>{x(t=>{let n=t.sections[e];n.itemFields=n.itemFields||[],n.itemFields.push({key:`新流程字段`,label:`新流程字段`,enabled:!0,editable:!0,maxLength:800,value:``})})},I=(e,t,n)=>{x(r=>{let i=r.sections[e].itemFields||[];i[t]={...i[t],...n},r.sections[e].itemFields=i})},L=(e,t)=>{x(n=>{n.sections[e].itemFields?.splice(t,1)})},R=()=>{x(e=>{e.timePlanRules.push(Kre())})},z=(e,t)=>{x(n=>{n.timePlanRules[e]={...n.timePlanRules[e],...t}})},B=e=>{x(t=>{t.timePlanRules.splice(e,1)})},V=(e,t,n)=>{x(r=>{let i=r.timePlanRules[e];n.ratio!==void 0&&(i.ratios[t]=Number(n.ratio||0)),n.stage!==void 0&&(i.segments[t].stage=n.stage),n.description!==void 0&&(i.segments[t].description=n.description)})},H=e=>{x(t=>{let n=t.timePlanRules[e];n.ratios.push(1),n.segments.push({stage:`新阶段`,description:`阶段说明`})})},U=(e,t)=>{x(n=>{let r=n.timePlanRules[e];r.ratios.splice(t,1),r.segments.splice(t,1)})},W=(0,S.useMemo)(()=>v.map((e,t)=>({key:`section-${t}`,label:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(B9,{strong:!0,children:e.label||e.key||`未命名分组`}),e.key&&e.key!==e.label&&(0,Q.jsxs)(NQ,{color:`blue`,children:[`key: `,e.key]}),(0,Q.jsx)(NQ,{children:e.type}),G9(e.key)&&(0,Q.jsx)(NQ,{color:`red`,children:`系统锁定`}),!e.enabled&&!G9(e.key)&&(0,Q.jsx)(NQ,{color:`default`,children:`已禁用`})]}),children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsxs)(DK,{gutter:12,align:`middle`,children:[(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`key`,value:e.key,maxLength:64,placeholder:`传给 AI 的字段名`,disabled:G9(e.key),onChange:e=>A(t,{key:e.target.value})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`label`,value:e.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>A(t,{label:e.target.value})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(RC,{value:e.type,options:H9,style:{width:`100%`},disabled:G9(e.key),onChange:e=>A(t,{type:e})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`启用`,(0,Q.jsx)(Mq,{checked:G9(e.key)?!0:e.enabled,disabled:G9(e.key),onChange:e=>A(t,{enabled:e})})]})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`可编辑`,(0,Q.jsx)(Mq,{checked:e.editable,onChange:e=>A(t,{editable:e})})]})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,max:2e4,value:e.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>A(t,{maxLength:Number(e||1e3)})})}),(0,Q.jsx)(pz,{span:2,style:{textAlign:`right`},children:(0,Q.jsx)(WG,{title:`确认删除该分组?`,disabled:G9(e.key),onConfirm:()=>j(t),children:(0,Q.jsx)(qE,{danger:!0,icon:(0,Q.jsx)(IQ,{}),disabled:G9(e.key)})})})]}),e.type===`object`&&(0,Q.jsx)(PR,{size:`small`,title:`对象字段`,extra:(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(TL,{}),onClick:()=>M(t),children:`新增字段`}),children:(0,Q.jsx)(VV,{direction:`vertical`,style:{width:`100%`},children:(e.children||[]).map((n,r)=>(0,Q.jsxs)(DK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`key`,value:n.key,maxLength:64,placeholder:`传给 AI 的字段名`,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{key:e.target.value})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`label`,value:n.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>N(t,r,{label:e.target.value})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(RC,{value:n.type,options:H9.filter(e=>e.value!==`object`&&e.value!==`flow`),style:{width:`100%`},disabled:W9(e.key,n.key),onChange:e=>N(t,r,{type:e})})}),(0,Q.jsx)(pz,{span:2,children:(0,Q.jsxs)(VV,{children:[`启用`,(0,Q.jsx)(Mq,{checked:W9(e.key,n.key)?!0:n.enabled,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{enabled:e})})]})}),(0,Q.jsx)(pz,{span:2,children:(0,Q.jsxs)(VV,{children:[`编辑`,(0,Q.jsx)(Mq,{checked:W9(e.key,n.key)?!1:n.editable,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{editable:e})})]})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(oB,{min:1,max:2e4,value:n.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>N(t,r,{maxLength:Number(e||1e3)})})}),(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{value:Array.isArray(n.value)?n.value.join(`/`):String(n.value??``),maxLength:n.maxLength||1e3,placeholder:`默认值`,onChange:e=>N(t,r,{value:n.type===`array`?e.target.value.split(`/`).filter(Boolean):e.target.value})})}),(0,Q.jsx)(pz,{span:1,style:{textAlign:`right`},children:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),disabled:W9(e.key,n.key),onClick:()=>P(t,r)})})]},`child-${t}-${r}`))})}),e.type===`flow`&&(0,Q.jsxs)(PR,{size:`small`,title:`流程数组对象字段`,extra:(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(TL,{}),onClick:()=>F(t),children:`新增流程字段`}),children:[(0,Q.jsxs)(DK,{gutter:12,style:{marginBottom:12},children:[(0,Q.jsx)(pz,{span:6,children:(0,Q.jsx)(hW,{addonBefore:`内容字段`,value:e.contentKey,maxLength:64,onChange:e=>A(t,{contentKey:e.target.value})})}),(0,Q.jsx)(pz,{span:18,children:(0,Q.jsx)(hW,{addonBefore:`别名 / 分隔`,value:(e.contentAliases||[]).join(`/`),onChange:e=>A(t,{contentAliases:e.target.value.split(`/`).map(e=>e.trim()).filter(Boolean)})})})]}),(0,Q.jsx)(VV,{direction:`vertical`,style:{width:`100%`},children:(e.itemFields||[]).map((e,n)=>(0,Q.jsxs)(DK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{addonBefore:`key`,value:e.key,maxLength:64,placeholder:`流程对象字段名`,onChange:e=>I(t,n,{key:e.target.value})})}),(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{addonBefore:`label`,value:e.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>I(t,n,{label:e.target.value})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`启用`,(0,Q.jsx)(Mq,{checked:e.enabled,onChange:e=>I(t,n,{enabled:e})})]})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`编辑`,(0,Q.jsx)(Mq,{checked:e.editable,onChange:e=>I(t,n,{editable:e})})]})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,max:2e4,value:e.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>I(t,n,{maxLength:Number(e||800)})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(hW,{value:String(e.value??``),maxLength:e.maxLength||800,placeholder:`默认值`,onChange:e=>I(t,n,{value:e.target.value})})}),(0,Q.jsx)(pz,{span:1,style:{textAlign:`right`},children:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),onClick:()=>L(t,n)})})]},`flow-${t}-${n}`))})]}),e.type!==`object`&&e.type!==`flow`&&(0,Q.jsx)(PR,{size:`small`,title:`默认值`,children:(0,Q.jsx)(V9,{rows:3,value:Array.isArray(e.value)?e.value.join(` `):String(e.value??``),maxLength:e.maxLength||1e3,showCount:!0,onChange:n=>A(t,{value:e.type===`array`?n.target.value.split(` -`).filter(Boolean):n.target.value})})})]})})),[v]);return e||!c?(0,Q.jsx)(SG,{}):(0,Q.jsxs)(`div`,{style:{padding:24},children:[(0,Q.jsx)(PR,{children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`large`,children:[(0,Q.jsxs)(DK,{justify:`space-between`,align:`middle`,children:[(0,Q.jsxs)(pz,{children:[(0,Q.jsx)(Fre,{level:3,style:{margin:0},children:`视频提词 Schema 配置`}),(0,Q.jsx)(Ire,{type:`secondary`,style:{marginBottom:0},children:`配置会被爆款开头复刻和拆镜复刻第 4 步视频 AI 提词共同复用。传给 AI 时只保留纯键值 schema,不携带显示名、启用、可编辑等管理字段。`})]}),(0,Q.jsx)(pz,{children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(B9,{children:`启用自定义配置`}),(0,Q.jsx)(Mq,{checked:i,onChange:a}),o&&(0,Q.jsx)(NQ,{color:`orange`,children:`当前使用默认配置兜底`}),u&&(0,Q.jsxs)(NQ,{children:[`默认分组 `,u.sections.length]})]})})]}),(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`长度限制策略`,description:`只对管理后台字段和用户可编辑字段做长度校验,不会自动裁剪 AI 生成结果或第 5 步最终视频 prompt。若供应商因为 prompt 过长拒绝,会按真实失败进入现有日志/退款/重试流程。`}),(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`预览说明`,description:`预览会跟随右上角「启用自定义配置」开关。关闭时会按默认 CLIENT_SCHEMA_V1 兜底预览;打开后才会按当前页面编辑的 sections 和秒数切片规则预览。`}),(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(v3,{}),loading:n,onClick:C,children:`保存配置`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(qU,{}),onClick:D,children:`预览运行时 Schema`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(x1,{}),onClick:T,children:`导出 JSON`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(w6,{}),onClick:()=>_.current?.click(),children:`导入 JSON`}),(0,Q.jsx)(WG,{title:`确认恢复默认配置?`,description:`会用 CLIENT_SCHEMA_V1 生成的默认配置覆盖当前配置。`,onConfirm:w,children:(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),children:`恢复默认`})}),(0,Q.jsx)(`input`,{ref:_,type:`file`,accept:`application/json,.json`,style:{display:`none`},onChange:E})]}),(0,Q.jsx)(bR,{items:[{key:`fields`,label:`Schema 字段配置`,children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`字段说明`,description:`key 是最终传给 AI 和保存到 prompt_schema 的真实字段名,例如「素材理解」「动作流程」;label 只用于管理后台显示,帮助运营/管理员理解这个字段,不会传给 AI;启用关闭后该字段不会进入运行时 schema;可编辑关闭后用户在第 4 步修改时不能改这个字段。「画面属性」里的视频时长、视频比例、清晰度、帧率、推荐分辨率属于系统锁定参数,不能改 key、不能禁用、不能开放用户编辑。`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(TL,{}),onClick:k,children:`新增一级分组`}),(0,Q.jsx)(Ng,{items:W})]})},{key:`time`,label:`秒数切片规则`,children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`切片规则说明`,description:`这里决定指定视频时长会被拆成几段,以及每段的阶段名称和说明。运行时会同步生成「动态时间规划」「动作流程」「镜头流程」三个数组,三者时间段保持一致。`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(TL,{}),onClick:R,children:`新增秒数规则`}),y.map((e,t)=>(0,Q.jsxs)(PR,{size:`small`,title:`${e.minDuration}-${e.maxDuration} 秒:${e.segments.length} 段`,extra:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),onClick:()=>B(t),children:`删除规则`}),children:[(0,Q.jsxs)(DK,{gutter:12,style:{marginBottom:12},children:[(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,value:e.minDuration,addonBefore:`最小秒`,style:{width:`100%`},onChange:e=>z(t,{minDuration:Number(e||1)})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,value:e.maxDuration,addonBefore:`最大秒`,style:{width:`100%`},onChange:e=>z(t,{maxDuration:Number(e||1)})})}),(0,Q.jsx)(pz,{span:16,children:(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(TL,{}),onClick:()=>H(t),children:`新增片段`})})]}),(0,Q.jsx)(VV,{direction:`vertical`,style:{width:`100%`},children:e.segments.map((n,r)=>(0,Q.jsxs)(DK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(oB,{min:.01,step:.01,value:e.ratios[r],addonBefore:`比例`,style:{width:`100%`},onChange:e=>V(t,r,{ratio:Number(e||.01)})})}),(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{value:n.stage,maxLength:64,placeholder:`阶段`,onChange:e=>V(t,r,{stage:e.target.value})})}),(0,Q.jsx)(pz,{span:15,children:(0,Q.jsx)(hW,{value:n.description,maxLength:300,placeholder:`说明`,onChange:e=>V(t,r,{description:e.target.value})})}),(0,Q.jsx)(pz,{span:1,children:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),onClick:()=>U(t,r)})})]},r))})]},t))]})},{key:`json`,label:`JSON 高级查看`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(X9(c,i),null,2),readOnly:!0})}]})]})}),(0,Q.jsxs)(BG,{title:`预览运行时 Schema`,open:f,onCancel:()=>p(!1),width:980,footer:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{onClick:()=>p(!1),children:`关闭`}),(0,Q.jsx)(qE,{type:`primary`,onClick:O,children:`生成预览`})]}),children:[(0,Q.jsxs)(X,{form:g,layout:`inline`,style:{marginBottom:16},children:[(0,Q.jsx)(X.Item,{name:`duration`,label:`时长`,rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:1,max:3600})}),(0,Q.jsx)(X.Item,{name:`aspectRatio`,label:`比例`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})}),(0,Q.jsx)(X.Item,{name:`resolution`,label:`清晰度`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})}),(0,Q.jsx)(X.Item,{name:`frameRate`,label:`帧率`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})})]}),(0,Q.jsx)(vz,{}),m?(0,Q.jsx)(bR,{items:[{key:`runtime`,label:`运行时 Schema`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Z9(m),null,2),readOnly:!0})},{key:`timePlan`,label:`动态时间规划(${Q9(m).length} 段)`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Q9(m),null,2),readOnly:!0})},{key:`snapshot`,label:`配置快照`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Vre(m),null,2),readOnly:!0})}]}):(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`点击生成预览后,可以看到传给 AI 的纯 schema、动态时间规划和本次配置快照。`})]})]})},Gre=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(20),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(!1),{user:g}=I5(),_=async()=>{if(g?.isAdmin){a(!0);try{let e=new URLSearchParams;e.set(`page`,String(o)),e.set(`page_size`,String(c)),u!==null&&e.set(`is_handled`,String(u));let n=await a8.get(`/contact/requests?${e.toString()}`);t(n.items),r(n.total)}catch(e){LG.error(e?.message||`获取失败`)}finally{a(!1)}}};(0,S.useEffect)(()=>{_()},[o,c,u]);let v=async e=>{try{await a8.put(`/contact/requests/${e}/handle`),LG.success(`已标记为处理`),_()}catch(e){LG.error(e?.message||`操作失败`)}},y=async e=>{BG.confirm({title:`确认删除`,content:`确定要删除这条联系请求吗?`,onOk:async()=>{try{await a8.delete(`/contact/requests/${e}`),LG.success(`删除成功`),_()}catch(e){LG.error(e?.message||`删除失败`)}}})},b=e=>{p(e),h(!0)};return(0,Q.jsxs)(`div`,{style:{padding:24},children:[(0,Q.jsx)(Z.Title,{level:2,style:{marginBottom:24},children:`联系请求管理`}),(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,Q.jsx)(qE,{type:u===null?`primary`:`default`,onClick:()=>d(null),icon:(0,Q.jsx)(w2,{}),children:`全部`}),(0,Q.jsx)(qE,{type:u===!1?`primary`:`default`,onClick:()=>d(!1),children:`待处理`}),(0,Q.jsx)(qE,{type:u===!0?`primary`:`default`,onClick:()=>d(!0),children:`已处理`})]}),(0,Q.jsxs)(Z.Text,{style:{color:`#64748b`},children:[`共 `,n,` 条记录`]})]}),(0,Q.jsx)(bQ,{columns:[{title:`姓名`,dataIndex:`name`,key:`name`,width:100},{title:`手机号`,dataIndex:`phone`,key:`phone`,width:120},{title:`公司名称`,dataIndex:`company_name`,key:`company_name`,width:150,ellipsis:!0},{title:`行业`,dataIndex:`industry`,key:`industry`,width:120},{title:`状态`,dataIndex:`is_handled`,key:`is_handled`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`orange`,children:e?`已处理`:`待处理`})},{title:`提交时间`,dataIndex:`created_at`,key:`created_at`,width:160,render:e=>new Date(e).toLocaleString(`zh-CN`)},{title:`操作`,key:`actions`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{size:`middle`,children:[(0,Q.jsx)(qE,{type:`text`,icon:(0,Q.jsx)(qU,{}),onClick:()=>b(t),children:`查看`}),!t.is_handled&&(0,Q.jsx)(qE,{type:`text`,icon:(0,Q.jsx)(DC,{}),onClick:()=>v(t.id),children:`标记处理`}),(0,Q.jsx)(qE,{type:`text`,danger:!0,icon:(0,Q.jsx)(IQ,{}),onClick:()=>y(t.id),children:`删除`})]})}],dataSource:e,loading:i,pagination:{current:o,pageSize:c,total:n,onChange:(e,t)=>{s(e),l(t)}},rowKey:`id`,bordered:!1,style:{background:`#ffffff`,borderRadius:12}}),(0,Q.jsx)(BG,{title:`联系请求详情`,open:m,onCancel:()=>h(!1),footer:null,width:500,children:f&&(0,Q.jsxs)(`div`,{style:{padding:8},children:[(0,Q.jsxs)(`div`,{style:{marginBottom:16},children:[(0,Q.jsxs)(Z.Title,{level:4,style:{marginBottom:16},children:[f.name,(0,Q.jsx)(NQ,{color:f.is_handled?`green`:`orange`,style:{marginLeft:12},children:f.is_handled?`已处理`:`待处理`})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`120px 1fr`,gap:12},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`手机号:`}),(0,Q.jsx)(Z.Text,{children:f.phone}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`公司名称:`}),(0,Q.jsx)(Z.Text,{children:f.company_name}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`行业:`}),(0,Q.jsx)(Z.Text,{children:f.industry}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`提交时间:`}),(0,Q.jsx)(Z.Text,{children:new Date(f.created_at).toLocaleString(`zh-CN`)}),f.message&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`留言:`}),(0,Q.jsx)(Z.Text,{children:f.message})]})]})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[!f.is_handled&&(0,Q.jsx)(qE,{type:`primary`,onClick:()=>{v(f.id),h(!1)},icon:(0,Q.jsx)(DC,{}),children:`标记为已处理`}),(0,Q.jsx)(qE,{onClick:()=>h(!1),children:`关闭`})]})]})})]})},Kre=({children:e})=>{let{user:t,loading:n,checkAuth:r}=I5();return(0,S.useEffect)(()=>{!localStorage.getItem(`auth_token`)&&!n&&!t&&(window.location.href=`/login`)},[t,n]),n?(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,Q.jsx)(SG,{size:`large`})}):t?(0,Q.jsx)(Q.Fragment,{children:e}):(window.location.href=`/login`,null)};(0,_.createRoot)(document.getElementById(`root`)).render((0,Q.jsx)(()=>{let{checkAuth:e}=I5();return(0,S.useEffect)(()=>{e()},[]),(0,Q.jsx)(am,{locale:U6.default,theme:{token:{colorPrimary:`#6366f1`,borderRadius:8},components:{Button:{controlHeight:36,controlHeightLG:44},Card:{boxShadow:`0 1px 3px rgba(0,0,0,0.04)`},Table:{headerBg:`#fafbfc`}}},children:(0,Q.jsx)(ox,{children:(0,Q.jsx)(hn,{children:(0,Q.jsxs)(Dt,{children:[(0,Q.jsx)(Tt,{path:`/login`,element:(0,Q.jsx)(Y5,{})}),(0,Q.jsxs)(Tt,{path:`/`,element:(0,Q.jsx)(Kre,{children:(0,Q.jsx)(V5,{})}),children:[(0,Q.jsx)(Tt,{index:!0,element:(0,Q.jsx)(X5,{})}),(0,Q.jsx)(Tt,{path:`users`,element:(0,Q.jsx)(t7,{})}),(0,Q.jsx)(Tt,{path:`credit-records`,element:(0,Q.jsx)(gne,{})}),(0,Q.jsx)(Tt,{path:`models`,element:(0,Q.jsx)(n7,{})}),(0,Q.jsx)(Tt,{path:`credit-ratios`,element:(0,Q.jsx)(Ane,{})}),(0,Q.jsx)(Tt,{path:`video-engines`,element:(0,Q.jsx)(wne,{})}),(0,Q.jsx)(Tt,{path:`image-engines`,element:(0,Q.jsx)(Dne,{})}),(0,Q.jsx)(Tt,{path:`industries`,element:(0,Q.jsx)(Cne,{})}),(0,Q.jsx)(Tt,{path:`menu-configs`,element:(0,Q.jsx)(Pne,{})}),(0,Q.jsx)(Tt,{path:`recharge-packages`,element:(0,Q.jsx)(Lne,{})}),(0,Q.jsx)(Tt,{path:`payment`,element:(0,Q.jsx)(_ne,{})}),(0,Q.jsx)(Tt,{path:`payment-stats`,element:(0,Q.jsx)(yne,{})}),(0,Q.jsx)(Tt,{path:`settings`,element:(0,Q.jsx)(r7,{})}),(0,Q.jsx)(Tt,{path:`video-prompt-schema-config`,element:(0,Q.jsx)(Wre,{})}),(0,Q.jsx)(Tt,{path:`notifications`,element:(0,Q.jsx)(i7,{})}),(0,Q.jsx)(Tt,{path:`oauthapp-list`,element:(0,Q.jsx)(Bne,{})}),(0,Q.jsx)(Tt,{path:`operation-logs`,element:(0,Q.jsx)(zne,{})}),(0,Q.jsx)(Tt,{path:`generation-records`,element:(0,Q.jsx)(Wne,{})}),(0,Q.jsx)(Tt,{path:`generation-ai`,element:(0,Q.jsx)(Yne,{})}),(0,Q.jsx)(Tt,{path:`hot-opening-replications`,element:(0,Q.jsx)(ere,{})}),(0,Q.jsx)(Tt,{path:`hot-opening-replications/:projectId`,element:(0,Q.jsx)(bre,{})}),(0,Q.jsx)(Tt,{path:`shot-replications`,element:(0,Q.jsx)(Tre,{})}),(0,Q.jsx)(Tt,{path:`shot-replications/task-sets/:taskSetId`,element:(0,Q.jsx)(Pre,{})}),(0,Q.jsx)(Tt,{path:`shot-replications/projects/:projectId`,element:(0,Q.jsx)(k9,{moduleType:`shot_replicate`})}),(0,Q.jsx)(Tt,{path:`authoriza`,element:(0,Q.jsx)(G5,{})}),(0,Q.jsx)(Tt,{path:`consume`,element:(0,Q.jsx)(J5,{})}),(0,Q.jsx)(Tt,{path:`platform`,element:(0,Q.jsx)(e7,{})}),(0,Q.jsx)(Tt,{path:`contact-requests`,element:(0,Q.jsx)(Gre,{})})]}),(0,Q.jsx)(Tt,{path:`*`,element:(0,Q.jsx)(Ct,{to:`/`,replace:!0})})]})})})})},{})); \ No newline at end of file +`).filter(Boolean):n.target.value})})})]})})),[v]);return e||!c?(0,Q.jsx)(SG,{}):(0,Q.jsxs)(`div`,{style:{padding:24},children:[(0,Q.jsx)(PR,{children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`large`,children:[(0,Q.jsxs)(DK,{justify:`space-between`,align:`middle`,children:[(0,Q.jsxs)(pz,{children:[(0,Q.jsx)(Rre,{level:3,style:{margin:0},children:`视频提词 Schema 配置`}),(0,Q.jsx)(zre,{type:`secondary`,style:{marginBottom:0},children:`配置会被爆款开头复刻和拆镜复刻第 4 步视频 AI 提词共同复用。传给 AI 时只保留纯键值 schema,不携带显示名、启用、可编辑等管理字段。`})]}),(0,Q.jsx)(pz,{children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(B9,{children:`启用自定义配置`}),(0,Q.jsx)(Mq,{checked:i,onChange:a}),o&&(0,Q.jsx)(NQ,{color:`orange`,children:`当前使用默认配置兜底`}),u&&(0,Q.jsxs)(NQ,{children:[`默认分组 `,u.sections.length]})]})})]}),(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`长度限制策略`,description:`只对管理后台字段和用户可编辑字段做长度校验,不会自动裁剪 AI 生成结果或第 5 步最终视频 prompt。若供应商因为 prompt 过长拒绝,会按真实失败进入现有日志/退款/重试流程。`}),(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`预览说明`,description:`预览会跟随右上角「启用自定义配置」开关。关闭时会按默认 CLIENT_SCHEMA_V1 兜底预览;打开后才会按当前页面编辑的 sections 和秒数切片规则预览。`}),(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(b3,{}),loading:n,onClick:C,children:`保存配置`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(qU,{}),onClick:D,children:`预览运行时 Schema`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(b1,{}),onClick:T,children:`导出 JSON`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(E6,{}),onClick:()=>_.current?.click(),children:`导入 JSON`}),(0,Q.jsx)(WG,{title:`确认恢复默认配置?`,description:`会用 CLIENT_SCHEMA_V1 生成的默认配置覆盖当前配置。`,onConfirm:w,children:(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),children:`恢复默认`})}),(0,Q.jsx)(`input`,{ref:_,type:`file`,accept:`application/json,.json`,style:{display:`none`},onChange:E})]}),(0,Q.jsx)(bR,{items:[{key:`fields`,label:`Schema 字段配置`,children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`字段说明`,description:`key 是最终传给 AI 和保存到 prompt_schema 的真实字段名,例如「素材理解」「动作流程」;label 只用于管理后台显示,帮助运营/管理员理解这个字段,不会传给 AI;启用关闭后该字段不会进入运行时 schema;可编辑关闭后用户在第 4 步修改时不能改这个字段。「画面属性」里的视频时长、视频比例、清晰度、帧率、推荐分辨率属于系统锁定参数,不能改 key、不能禁用、不能开放用户编辑。`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(TL,{}),onClick:k,children:`新增一级分组`}),(0,Q.jsx)(Ng,{items:W})]})},{key:`time`,label:`秒数切片规则`,children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`切片规则说明`,description:`这里决定指定视频时长会被拆成几段,以及每段的阶段名称和说明。运行时会同步生成「动态时间规划」「动作流程」「镜头流程」三个数组,三者时间段保持一致。`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(TL,{}),onClick:R,children:`新增秒数规则`}),y.map((e,t)=>(0,Q.jsxs)(PR,{size:`small`,title:`${e.minDuration}-${e.maxDuration} 秒:${e.segments.length} 段`,extra:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),onClick:()=>B(t),children:`删除规则`}),children:[(0,Q.jsxs)(DK,{gutter:12,style:{marginBottom:12},children:[(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,value:e.minDuration,addonBefore:`最小秒`,style:{width:`100%`},onChange:e=>z(t,{minDuration:Number(e||1)})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,value:e.maxDuration,addonBefore:`最大秒`,style:{width:`100%`},onChange:e=>z(t,{maxDuration:Number(e||1)})})}),(0,Q.jsx)(pz,{span:16,children:(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(TL,{}),onClick:()=>H(t),children:`新增片段`})})]}),(0,Q.jsx)(VV,{direction:`vertical`,style:{width:`100%`},children:e.segments.map((n,r)=>(0,Q.jsxs)(DK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(oB,{min:.01,step:.01,value:e.ratios[r],addonBefore:`比例`,style:{width:`100%`},onChange:e=>V(t,r,{ratio:Number(e||.01)})})}),(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{value:n.stage,maxLength:64,placeholder:`阶段`,onChange:e=>V(t,r,{stage:e.target.value})})}),(0,Q.jsx)(pz,{span:15,children:(0,Q.jsx)(hW,{value:n.description,maxLength:300,placeholder:`说明`,onChange:e=>V(t,r,{description:e.target.value})})}),(0,Q.jsx)(pz,{span:1,children:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),onClick:()=>U(t,r)})})]},r))})]},t))]})},{key:`json`,label:`JSON 高级查看`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(X9(c,i),null,2),readOnly:!0})}]})]})}),(0,Q.jsxs)(BG,{title:`预览运行时 Schema`,open:f,onCancel:()=>p(!1),width:980,footer:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{onClick:()=>p(!1),children:`关闭`}),(0,Q.jsx)(qE,{type:`primary`,onClick:O,children:`生成预览`})]}),children:[(0,Q.jsxs)(X,{form:g,layout:`inline`,style:{marginBottom:16},children:[(0,Q.jsx)(X.Item,{name:`duration`,label:`时长`,rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:1,max:3600})}),(0,Q.jsx)(X.Item,{name:`aspectRatio`,label:`比例`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})}),(0,Q.jsx)(X.Item,{name:`resolution`,label:`清晰度`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})}),(0,Q.jsx)(X.Item,{name:`frameRate`,label:`帧率`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})})]}),(0,Q.jsx)(vz,{}),m?(0,Q.jsx)(bR,{items:[{key:`runtime`,label:`运行时 Schema`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Z9(m),null,2),readOnly:!0})},{key:`timePlan`,label:`动态时间规划(${Q9(m).length} 段)`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Q9(m),null,2),readOnly:!0})},{key:`snapshot`,label:`配置快照`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Wre(m),null,2),readOnly:!0})}]}):(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`点击生成预览后,可以看到传给 AI 的纯 schema、动态时间规划和本次配置快照。`})]})]})},Jre=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(10),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(!1),{user:g}=R5(),_=async()=>{if(g?.isAdmin){a(!0);try{let e=new URLSearchParams;e.set(`page`,String(o)),e.set(`page_size`,String(c)),u!==null&&e.set(`is_handled`,String(u));let n=await s8.get(`/contact/requests?${e.toString()}`);t(n.items),r(n.total)}catch(e){LG.error(e?.message||`获取失败`)}finally{a(!1)}}};(0,S.useEffect)(()=>{_()},[o,c,u]);let v=async e=>{try{await s8.put(`/contact/requests/${e}/handle`),LG.success(`已标记为处理`),_()}catch(e){LG.error(e?.message||`操作失败`)}},y=async e=>{try{await s8.delete(`/contact/requests/${e}`),LG.success(`已删除`),_()}catch(e){LG.error(e?.message||`删除失败`)}},b=e=>{p(e),h(!0)};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(E4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`联系请求管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[`共 `,n,` 条记录`]})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,Q.jsx)(qE,{type:u===null?`primary`:`default`,onClick:()=>d(null),icon:(0,Q.jsx)(C2,{}),size:`small`,children:`全部`}),(0,Q.jsx)(qE,{type:u===!1?`primary`:`default`,onClick:()=>d(!1),size:`small`,children:`待处理`}),(0,Q.jsx)(qE,{type:u===!0?`primary`:`default`,onClick:()=>d(!0),size:`small`,children:`已处理`})]})]}),i?(0,Q.jsx)(`div`,{style:{textAlign:`center`,padding:40},children:`加载中...`}):e.length===0?(0,Q.jsx)(pC,{description:`暂无联系请求`,style:{padding:`40px 0`}}):(0,Q.jsx)(bQ,{columns:[{title:`姓名`,dataIndex:`name`,key:`name`,width:100,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`手机号`,dataIndex:`phone`,key:`phone`,width:120},{title:`公司名称`,dataIndex:`company_name`,key:`company_name`,width:150,ellipsis:!0},{title:`行业`,dataIndex:`industry`,key:`industry`,width:120},{title:`状态`,dataIndex:`is_handled`,key:`is_handled`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`orange`,children:e?`已处理`:`待处理`})},{title:`提交时间`,dataIndex:`created_at`,key:`created_at`,width:160,render:e=>$5(e)},{title:`操作`,key:`actions`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>b(t),children:`查看`}),!t.is_handled&&(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(DC,{}),onClick:()=>v(t.id),children:`标记处理`}),(0,Q.jsx)(WG,{title:`确定删除该记录?`,onConfirm:()=>y(t.id),children:(0,Q.jsx)(qE,{type:`link`,danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:c,total:n,onChange:(e,t)=>{s(e),l(t)},showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`},scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qU,{}),`联系请求详情`]}),open:m,onCancel:()=>h(!1),footer:null,width:500,children:f&&(0,Q.jsxs)(`div`,{style:{padding:8},children:[(0,Q.jsxs)(`div`,{style:{marginBottom:16},children:[(0,Q.jsxs)(Z.Title,{level:4,style:{marginBottom:16},children:[f.name,(0,Q.jsx)(NQ,{color:f.is_handled?`green`:`orange`,style:{marginLeft:12},children:f.is_handled?`已处理`:`待处理`})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`120px 1fr`,gap:12},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`手机号:`}),(0,Q.jsx)(Z.Text,{children:f.phone}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`公司名称:`}),(0,Q.jsx)(Z.Text,{children:f.company_name}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`行业:`}),(0,Q.jsx)(Z.Text,{children:f.industry}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`提交时间:`}),(0,Q.jsx)(Z.Text,{children:$5(f.created_at)}),f.message&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`留言:`}),(0,Q.jsx)(Z.Text,{children:f.message})]})]})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[!f.is_handled&&(0,Q.jsx)(qE,{type:`primary`,onClick:()=>{v(f.id),h(!1)},icon:(0,Q.jsx)(DC,{}),children:`标记为已处理`}),(0,Q.jsx)(qE,{onClick:()=>h(!1),children:`关闭`})]})]})})]})},Yre=({children:e})=>{let{user:t,loading:n,checkAuth:r}=R5();return(0,S.useEffect)(()=>{!localStorage.getItem(`auth_token`)&&!n&&!t&&(window.location.href=`/login`)},[t,n]),n?(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,Q.jsx)(SG,{size:`large`})}):t?(0,Q.jsx)(Q.Fragment,{children:e}):(window.location.href=`/login`,null)};(0,_.createRoot)(document.getElementById(`root`)).render((0,Q.jsx)(()=>{let{checkAuth:e}=R5();return(0,S.useEffect)(()=>{e()},[]),(0,Q.jsx)(am,{locale:G6.default,theme:{token:{colorPrimary:`#6366f1`,borderRadius:8},components:{Button:{controlHeight:36,controlHeightLG:44},Card:{boxShadow:`0 1px 3px rgba(0,0,0,0.04)`},Table:{headerBg:`#fafbfc`}}},children:(0,Q.jsx)(ox,{children:(0,Q.jsx)(hn,{children:(0,Q.jsxs)(Dt,{children:[(0,Q.jsx)(Tt,{path:`/login`,element:(0,Q.jsx)(Z5,{})}),(0,Q.jsxs)(Tt,{path:`/`,element:(0,Q.jsx)(Yre,{children:(0,Q.jsx)(U5,{})}),children:[(0,Q.jsx)(Tt,{index:!0,element:(0,Q.jsx)(Q5,{})}),(0,Q.jsx)(Tt,{path:`users`,element:(0,Q.jsx)(r7,{})}),(0,Q.jsx)(Tt,{path:`credit-records`,element:(0,Q.jsx)(yne,{})}),(0,Q.jsx)(Tt,{path:`models`,element:(0,Q.jsx)(i7,{})}),(0,Q.jsx)(Tt,{path:`credit-ratios`,element:(0,Q.jsx)(Nne,{})}),(0,Q.jsx)(Tt,{path:`video-engines`,element:(0,Q.jsx)(Dne,{})}),(0,Q.jsx)(Tt,{path:`image-engines`,element:(0,Q.jsx)(Ane,{})}),(0,Q.jsx)(Tt,{path:`industries`,element:(0,Q.jsx)(Ene,{})}),(0,Q.jsx)(Tt,{path:`menu-configs`,element:(0,Q.jsx)(Ine,{})}),(0,Q.jsx)(Tt,{path:`recharge-packages`,element:(0,Q.jsx)(zne,{})}),(0,Q.jsx)(Tt,{path:`payment`,element:(0,Q.jsx)(bne,{})}),(0,Q.jsx)(Tt,{path:`payment-stats`,element:(0,Q.jsx)(Sne,{})}),(0,Q.jsx)(Tt,{path:`settings`,element:(0,Q.jsx)(a7,{})}),(0,Q.jsx)(Tt,{path:`video-prompt-schema-config`,element:(0,Q.jsx)(qre,{})}),(0,Q.jsx)(Tt,{path:`notifications`,element:(0,Q.jsx)($te,{})}),(0,Q.jsx)(Tt,{path:`oauthapp-list`,element:(0,Q.jsx)(Hne,{})}),(0,Q.jsx)(Tt,{path:`operation-logs`,element:(0,Q.jsx)(Vne,{})}),(0,Q.jsx)(Tt,{path:`generation-records`,element:(0,Q.jsx)(qne,{})}),(0,Q.jsx)(Tt,{path:`generation-ai`,element:(0,Q.jsx)(Qne,{})}),(0,Q.jsx)(Tt,{path:`hot-opening-replications`,element:(0,Q.jsx)(rre,{})}),(0,Q.jsx)(Tt,{path:`hot-opening-replications/:projectId`,element:(0,Q.jsx)(Cre,{})}),(0,Q.jsx)(Tt,{path:`shot-replications`,element:(0,Q.jsx)(Ore,{})}),(0,Q.jsx)(Tt,{path:`shot-replications/task-sets/:taskSetId`,element:(0,Q.jsx)(Lre,{})}),(0,Q.jsx)(Tt,{path:`shot-replications/projects/:projectId`,element:(0,Q.jsx)(k9,{moduleType:`shot_replicate`})}),(0,Q.jsx)(Tt,{path:`authoriza`,element:(0,Q.jsx)(q5,{})}),(0,Q.jsx)(Tt,{path:`consume`,element:(0,Q.jsx)(X5,{})}),(0,Q.jsx)(Tt,{path:`platform`,element:(0,Q.jsx)(n7,{})}),(0,Q.jsx)(Tt,{path:`contact-requests`,element:(0,Q.jsx)(Jre,{})})]}),(0,Q.jsx)(Tt,{path:`*`,element:(0,Q.jsx)(Ct,{to:`/`,replace:!0})})]})})})})},{})); \ No newline at end of file diff --git a/video-gen-admin/dist/index.html b/video-gen-admin/dist/index.html index 4ac1f6da..e79dac34 100644 --- a/video-gen-admin/dist/index.html +++ b/video-gen-admin/dist/index.html @@ -28,7 +28,7 @@ } })(); - + diff --git a/video-gen-admin/src/pages/AdminContactRequests.tsx b/video-gen-admin/src/pages/AdminContactRequests.tsx index 741b50f4..b70ffd0b 100644 --- a/video-gen-admin/src/pages/AdminContactRequests.tsx +++ b/video-gen-admin/src/pages/AdminContactRequests.tsx @@ -1,8 +1,9 @@ import React, { useState, useEffect } from 'react'; -import { Table, Button, Tag, Space, Typography, message, Modal } from 'antd'; -import { CheckOutlined, DeleteOutlined, EyeOutlined, FilterOutlined } from '@ant-design/icons'; +import { Table, Button, Tag, Space, Typography, message, Modal, Card, Popconfirm, Empty } from 'antd'; +import { CheckOutlined, DeleteOutlined, EyeOutlined, FilterOutlined, MessageOutlined } from '@ant-design/icons'; import { useAdminStore } from '../store'; import { api } from '../api/client'; +import { formatDate } from '../utils/formatDate'; interface ContactRequest { id: string; @@ -21,7 +22,7 @@ const AdminContactRequests: React.FC = () => { const [total, setTotal] = useState(0); const [loading, setLoading] = useState(false); const [page, setPage] = useState(1); - const [pageSize, setPageSize] = useState(20); + const [pageSize, setPageSize] = useState(10); const [isHandledFilter, setIsHandledFilter] = useState(null); const [selectedItem, setSelectedItem] = useState(null); const [detailModalOpen, setDetailModalOpen] = useState(false); @@ -63,19 +64,13 @@ const AdminContactRequests: React.FC = () => { }; const handleDelete = async (id: string) => { - Modal.confirm({ - title: '确认删除', - content: '确定要删除这条联系请求吗?', - onOk: async () => { - try { - await api.delete(`/contact/requests/${id}`); - message.success('删除成功'); - fetchData(); - } catch (err: any) { - message.error(err?.message || '删除失败'); - } - }, - }); + try { + await api.delete(`/contact/requests/${id}`); + message.success('已删除'); + fetchData(); + } catch (err: any) { + message.error(err?.message || '删除失败'); + } }; const handleViewDetail = (item: ContactRequest) => { @@ -83,12 +78,18 @@ const AdminContactRequests: React.FC = () => { setDetailModalOpen(true); }; + const handlePageChange = (p: number, ps: number) => { + setPage(p); + setPageSize(ps); + }; + const columns = [ { title: '姓名', dataIndex: 'name', key: 'name', width: 100, + render: (v: string) => {v}, }, { title: '手机号', @@ -125,95 +126,90 @@ const AdminContactRequests: React.FC = () => { dataIndex: 'created_at', key: 'created_at', width: 160, - render: (date: string) => { - return new Date(date).toLocaleString('zh-CN'); - }, + render: (date: string) => formatDate(date), }, { title: '操作', key: 'actions', width: 180, render: (_: unknown, record: ContactRequest) => ( - - {!record.is_handled && ( - )} - + handleDelete(record.id)}> + + ), }, ]; return ( -
- - 联系请求管理 - - -
-
- - - +
+ +
+ + + 联系请求管理 + 共 {total} 条记录 + +
+ + + +
- - 共 {total} 条记录 - -
- { setPage(p); setPageSize(s); }, - }} - rowKey="id" - bordered={false} - style={{ background: '#ffffff', borderRadius: 12 }} - /> + {loading ? ( +
加载中...
+ ) : data.length === 0 ? ( + + ) : ( +
`共 ${t} 条记录`, + }} + scroll={{ x: 900 }} + /> + )} + 联系请求详情} open={detailModalOpen} onCancel={() => setDetailModalOpen(false)} footer={null} @@ -236,7 +232,7 @@ const AdminContactRequests: React.FC = () => { 行业: {selectedItem.industry} 提交时间: - {new Date(selectedItem.created_at).toLocaleString('zh-CN')} + {formatDate(selectedItem.created_at)} {selectedItem.message && ( <> 留言: diff --git a/video-gen-app/dist/assets/index-Di-nQw13.js b/video-gen-app/dist/assets/index-B5mkO6qz.js similarity index 97% rename from video-gen-app/dist/assets/index-Di-nQw13.js rename to video-gen-app/dist/assets/index-B5mkO6qz.js index faa32749..b51c6319 100644 --- a/video-gen-app/dist/assets/index-Di-nQw13.js +++ b/video-gen-app/dist/assets/index-B5mkO6qz.js @@ -402,7 +402,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } } - `})]})},t9={HomeOutlined:(0,$.jsx)(y3,{}),DashboardOutlined:(0,$.jsx)(P4,{}),CodeOutlined:(0,$.jsx)(y4,{}),PlayCircleOutlined:(0,$.jsx)(S6,{}),WalletOutlined:(0,$.jsx)(Q8,{}),SettingOutlined:(0,$.jsx)(Y6,{}),BellOutlined:(0,$.jsx)(P2,{}),UserOutlined:(0,$.jsx)(K8,{}),AppstoreOutlined:(0,$.jsx)(u2,{}),FileTextOutlined:(0,$.jsx)(MU,{}),StarOutlined:(0,$.jsx)(y8,{}),HeartOutlined:(0,$.jsx)(u3,{}),CameraOutlined:(0,$.jsx)(Y2,{}),RobotOutlined:(0,$.jsx)(S6,{}),CalculatorOutlined:(0,$.jsx)(K2,{}),DollarOutlined:(0,$.jsx)(B4,{}),GiftOutlined:(0,$.jsx)(i3,{}),ThunderboltOutlined:(0,$.jsx)(j8,{}),FireOutlined:(0,$.jsx)(Q4,{}),CloudOutlined:(0,$.jsx)(u4,{}),SmileOutlined:(0,$.jsx)(u8,{}),TrophyOutlined:(0,$.jsx)(L8,{}),RocketOutlined:(0,$.jsx)(L6,{}),BulbOutlined:(0,$.jsx)(U2,{}),PictureOutlined:(0,$.jsx)(p6,{}),VideoCameraOutlined:(0,$.jsx)(Y8,{}),AudioOutlined:(0,$.jsx)(S2,{}),MailOutlined:(0,$.jsx)(U3,{}),PhoneOutlined:(0,$.jsx)(u6,{}),GlobalOutlined:(0,$.jsx)(s3,{}),ShoppingCartOutlined:(0,$.jsx)(Q6,{}),TeamOutlined:(0,$.jsx)(O8,{}),BarChartOutlined:(0,$.jsx)(j2,{}),PieChartOutlined:(0,$.jsx)(g6,{}),LineChartOutlined:(0,$.jsx)(P3,{}),SecurityScanOutlined:(0,$.jsx)(U6,{}),ApiOutlined:(0,$.jsx)(s2,{}),DatabaseOutlined:(0,$.jsx)(L4,{}),CloudServerOutlined:(0,$.jsx)(p4,{})},lte=240,n9=[{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(CJ,{})},{gradient:`linear-gradient(135deg, #4a5568, #2d3748)`,shadow:`rgba(74,85,104,0.25)`,icon:(0,$.jsx)(Y4,{})},{gradient:`linear-gradient(135deg, #718096, #4a5568)`,shadow:`rgba(113,128,150,0.25)`,icon:(0,$.jsx)(O4,{})},{gradient:`linear-gradient(135deg, #5a67d8, #434190)`,shadow:`rgba(90,103,216,0.25)`,icon:(0,$.jsx)(T2,{})}],ute=()=>{let e=Je(),t=Ge(),{user:n,logout:r}=$7(),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c]=xW.useForm(),[l,u]=(0,S.useState)(null),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)({}),[_,v]=(0,S.useState)(0),[y,b]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteName||``;return t&&(document.title=t),t}),[x,C]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteLogo||``;if(t){let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=t,e.type=`image/png`}return t}),[w,T]=(0,S.useState)(!localStorage.getItem(`siteInfo`)),[E,D]=(0,S.useState)(!1),[O,k]=(0,S.useState)(null),[A,j]=(0,S.useState)(`alipay`),[M,N]=(0,S.useState)(!1),[P,F]=(0,S.useState)(180),I=(0,S.useRef)(null),L=(0,S.useRef)(null),R=(0,S.useRef)(null),[z,B]=(0,S.useState)({alipay:!1,wechat:!1}),[V,H]=(0,S.useState)(!1),[U]=xW.useForm(),[ee,te]=(0,S.useState)(!0),[ne,W]=(0,S.useState)(!1),re=`pending_payment_order`;(0,S.useEffect)(()=>{q5().then(e=>{let t=e.siteName||`民众智创`,n=e.siteLogo||``;if(t!==y&&(b(t),document.title=t),n&&n!==x){C(n);let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=n,e.type=`image/png`}localStorage.setItem(`siteInfo`,JSON.stringify({siteName:t,siteLogo:n}))}).catch(()=>{})},[]);let G=()=>{Q5().then(e=>{v(e)}).catch(()=>{})};(0,S.useEffect)(()=>{(async()=>{let e=localStorage.getItem(re);if(e)try{let t=JSON.parse(e),n=await o7(t.orderNo);if(n.status===`pending`){k({price:t.price,credits:t.credits,qrCode:t.qrCode,method:t.method}),R.current=t.orderNo;let e=Date.now(),n=new Date(t.createdAt).getTime(),r=t.timeoutSeconds||180,i=Math.floor((e-n)/1e3),a=Math.max(0,r-i);a>0?(D(!0),ue(t.orderNo,a)):localStorage.removeItem(re)}else n.status===`paid`?(Z.success(`支付成功!积分已到账`),$7.getState().refreshUser(),localStorage.removeItem(re)):localStorage.removeItem(re)}catch{localStorage.removeItem(re)}})()},[]),(0,S.useEffect)(()=>{t7().then(e=>{f(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),n7().then(e=>{m(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),r7().then(e=>{B(e),e.alipay?j(`alipay`):e.wechat&&j(`wechat`)}).catch(()=>{}),G()},[n]);let K=t.pathname.startsWith(`/records`)?`/records`:t.pathname,q=lte,ie=[{key:`profile`,icon:(0,$.jsx)(K8,{}),label:`账号: ${n?.username}`,disabled:!0},{key:`credits`,icon:(0,$.jsx)(Q8,{style:{color:`#c9a96e`}}),label:`积分: ${n?.credits??0}`,disabled:!0},{type:`divider`},{key:`myCredits`,icon:(0,$.jsx)(Q8,{}),label:`积分明细`},{key:`orderRecords`,icon:(0,$.jsx)(MU,{}),label:`订单记录`},{key:`messages`,icon:(0,$.jsx)(P2,{}),label:`消息中心${_>0?`(${_})`:``}`},{type:`divider`},{key:`changePwd`,icon:(0,$.jsx)(L3,{}),label:`修改密码`},{type:`divider`},{key:`logout`,icon:(0,$.jsx)(B3,{}),label:`退出登录`,danger:!0}],J=({key:t})=>{t===`logout`?(r(),e(`/login`)):t===`changePwd`?a(!0):t===`messages`?e(`/messages`):t===`recharge`?s(!0):t===`myCredits`?e(`/user-center?tab=credits`):t===`orderRecords`&&e(`/user-center?tab=orders`)},ae=async()=>{try{await c.validateFields(),Z.success(`密码修改成功(演示)`),a(!1),c.resetFields()}catch{}},oe=()=>{r(),e(`/login`)},se=()=>{s(!0)},ce=async()=>{if(!n){Z.warning(`请先登录`);return}try{let e=await U.validateFields();W(!0),await Z7({phone:e.phone,company_name:e.companyName,industry:e.industry,name:e.name,message:e.message}),Z.success(`提交成功,我们会尽快与您联系`),H(!1),U.resetFields()}catch(e){Z.error(e?.message||`提交失败`)}finally{W(!1)}},le=(0,S.useCallback)(()=>{I.current&&=(clearInterval(I.current),null),L.current&&=(clearInterval(L.current),null)},[]),ue=(0,S.useCallback)((e,t=180)=>{le(),F(t),I.current=setInterval(async()=>{try{let t=await o7(e);t.status===`paid`?(le(),R.current=null,localStorage.removeItem(re),Z.success(`支付成功!积分已到账`),$7.getState().refreshUser(),D(!1),k(null),u(null)):t.status===`cancelled`&&(le(),R.current=null,localStorage.removeItem(re))}catch{}},2e3),L.current=setInterval(()=>{F(e=>e<=1?(le(),R.current&&=(s7(R.current).catch(()=>{}),null),localStorage.removeItem(re),Z.warning(`订单已超时,请重新充值`),D(!1),k(null),u(null),0):e-1)},1e3)},[le]);return(0,$.jsxs)(dK,{style:{minHeight:`100vh`},children:[(0,$.jsxs)(`div`,{className:`desktop-sidebar`,style:{width:q,position:`fixed`,left:16,top:16,bottom:16,zIndex:100,background:`linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,display:`flex`,flexDirection:`column`,transition:`width 0.25s ease, left 0.25s ease`,overflow:`hidden`,border:`1px solid rgba(0, 0, 0, 0.06)`},children:[(0,$.jsx)(`div`,{style:{height:80,display:`flex`,alignItems:`center`,justifyContent:`flex-start`,padding:`0 20px`,flexShrink:0,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14},children:[(0,$.jsx)(`div`,{style:{width:42,height:42,borderRadius:14,flexShrink:0,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,overflow:`hidden`},children:x?(0,$.jsx)(`img`,{src:x,alt:`logo`,style:{width:28,height:28,objectFit:`contain`}}):(0,$.jsx)(j8,{style:{fontSize:20,color:`#ffffff`}})}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:17,fontWeight:700,letterSpacing:-.02,whiteSpace:`nowrap`,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:y})]})}),(0,$.jsx)(`div`,{style:{flex:1,padding:`8px 8px`,overflow:`auto`},children:(()=>{let t={};d.forEach(e=>{let n=e.parent_id??e.parentId;n&&(t[n]||(t[n]=[]),t[n].push(e))});let n=d.filter(e=>!(e.parent_id??e.parentId));n.sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0));let r=[],i=(t,n=0)=>{let r=t.path===K,i=t9[t.icon]||(0,$.jsx)(y3,{});return(0,$.jsxs)(`div`,{onClick:()=>t.path&&e(t.path),style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:10,padding:n>0?`6px 12px 6px 32px`:`6px 14px`,borderRadius:12,margin:`1px 4px`,cursor:`pointer`,fontSize:n>0?13:14,fontWeight:r?600:400,color:r?`#4f46e5`:`#475569`,background:r?`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%)`:`transparent`,transition:`all 0.2s ease`},children:[(0,$.jsx)(`span`,{style:{fontSize:n>0?14:16,flexShrink:0,color:r?`#6366f1`:`#64748b`},children:i}),(0,$.jsx)(`span`,{style:{whiteSpace:`nowrap`},children:t.label})]},t.id)};return n.forEach(e=>{if((e.menu_type??e.menuType)===`group`){let n=(t[e.id]||[]).sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0));r.push((0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12,fontWeight:600,padding:`10px 14px 4px`,letterSpacing:.5,textTransform:`uppercase`},children:e.label}),n.map(e=>i(e,1))]},e.id))}else r.push(i(e))}),r})()}),(0,$.jsxs)(`div`,{onClick:()=>s(!0),style:{margin:`8px 12px`,padding:`12px 20px`,borderRadius:14,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8,color:`#ffffff`,fontSize:14,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%)`,e.currentTarget.style.transform=`translateY(-1px)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.5)`},onMouseLeave:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(99, 102, 241, 0.4)`},children:[(0,$.jsx)(gR,{style:{fontSize:16}}),(0,$.jsx)(`span`,{children:`充值积分`})]}),(0,$.jsx)(`div`,{style:{padding:`16px 16px`,flexShrink:0},children:(0,$.jsx)(kU,{menu:{items:ie,onClick:J},placement:`topRight`,arrow:!0,children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:12,padding:`10px 14px`,borderRadius:14,cursor:`pointer`,transition:`all 0.25s ease`,background:`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,boxShadow:`0 2px 12px rgba(0, 0, 0, 0.04)`},onMouseEnter:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #ffffff 0%, #f8fafc 100%)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0, 0, 0, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.background=`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,e.currentTarget.style.boxShadow=`0 2px 12px rgba(0, 0, 0, 0.04)`},children:[(0,$.jsx)(uT,{size:36,icon:(0,$.jsx)(K8,{}),style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,flexShrink:0,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`}}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsx)(`div`,{style:{color:`#1e293b`,fontSize:14,fontWeight:600,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,letterSpacing:-.01},children:n?.username}),(0,$.jsxs)(`div`,{style:{color:`#6366f1`,fontSize:12,fontWeight:500,letterSpacing:0,background:`rgba(99, 102, 241, 0.08)`,padding:`2px 8px`,borderRadius:6,display:`inline-block`},children:[`积分: `,n?.credits||0]})]})]})})})]}),(0,$.jsx)(`div`,{className:`desktop-content`,style:{marginLeft:q+28,marginRight:12,marginTop:16,marginBottom:16,flex:1,minHeight:`calc(100vh - 32px)`,background:`transparent`,padding:0,transition:`margin-left 0.25s ease`},children:(0,$.jsx)(`div`,{style:{boxSizing:`border-box`,height:`100%`,background:`#ffffffff`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,minHeight:`100%`,padding:`24px 32px 32px`,border:`1px solid rgba(0, 0, 0, 0.06)`},children:(0,$.jsx)(Ct,{})})}),(0,$.jsxs)(`div`,{className:`mobile-bottom-nav`,children:[d.filter(e=>(e.menu_type??e.menuType)!==`group`).map(t=>t.path?(0,$.jsxs)(`div`,{className:`nav-item ${t.path===K?`active`:``}`,onClick:()=>e(t.path),children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:t9[t.icon]||(0,$.jsx)(y3,{})}),(0,$.jsx)(`span`,{children:t.label})]},t.id):null),(0,$.jsxs)(`div`,{className:`nav-item`,onClick:se,children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:(0,$.jsx)(T6,{})}),(0,$.jsx)(`span`,{children:`充值`})]}),(0,$.jsxs)(`div`,{className:`nav-item`,onClick:oe,children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:(0,$.jsx)(B3,{})}),(0,$.jsx)(`span`,{children:`退出`})]})]}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(L3,{}),`修改密码`]}),open:i,onOk:ae,onCancel:()=>{a(!1),c.resetFields()},okText:`确认修改`,cancelText:`取消`,width:440,children:(0,$.jsxs)(xW,{form:c,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(xW.Item,{name:`oldPwd`,label:`原密码`,rules:[{required:!0,message:`请输入原密码`}],children:(0,$.jsx)(nK.Password,{placeholder:`请输入原密码`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(xW.Item,{name:`newPwd`,label:`新密码`,rules:[{required:!0,message:`请输入新密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(nK.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(xW.Item,{name:`confirmPwd`,label:`确认新密码`,rules:[{required:!0,message:`请再次输入新密码`},({getFieldValue:e})=>({validator(t,n){return!n||e(`newPwd`)===n?Promise.resolve():Promise.reject(Error(`两次密码不一致`))}})],children:(0,$.jsx)(nK.Password,{placeholder:`请再次输入新密码`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})})]})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(i3,{}),`积分充值`]}),open:o,onCancel:()=>{s(!1),u(null)},footer:null,width:680,children:(0,$.jsxs)(`div`,{style:{marginTop:16},children:[(0,$.jsxs)(DU,{style:{marginBottom:16},children:[(0,$.jsx)(Q8,{style:{color:`#6366f1`}}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,letterSpacing:0},children:`当前积分余额`}),(0,$.jsx)(Q.Text,{strong:!0,style:{color:`#6366f1`,fontSize:20,fontWeight:600},children:n?.credits??0})]}),(0,$.jsxs)(`div`,{style:{padding:`12px 16px`,background:`rgba(99, 102, 241, 0.06)`,borderRadius:10,marginBottom:16,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(T3,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13},children:`当前后台仅支持支付宝/微信扫码充值,如需转账支付请联系我们`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12,flexWrap:`wrap`},children:p.map((e,t)=>{let n=n9[t%n9.length],r=(e.credits||0)+(e.bonus_credits||e.bonusCredits||0);return(0,$.jsxs)(`div`,{onClick:()=>u(e.id),style:{flex:`1 1 45%`,minWidth:200,borderRadius:16,padding:`20px 16px`,background:l===e.id?`rgba(99,102,241,0.04)`:`#fafbff`,border:l===e.id?`2px solid #6366f1`:`1px solid #f0f0f5`,cursor:`pointer`,position:`relative`,transition:`all 0.2s`},children:[e.description&&(0,$.jsx)(T$,{color:`purple`,style:{position:`absolute`,top:-10,left:`50%`,transform:`translateX(-50%)`,borderRadius:8,fontSize:11},children:e.description}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:44,height:44,borderRadius:12,flexShrink:0,background:n.gradient,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:18,color:`#fff`,boxShadow:`0 6px 16px ${n.shadow}`},children:n.icon}),(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:6},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15},children:e.name}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[r.toLocaleString(),` 积分`]})]}),(0,$.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,marginTop:4,background:n.gradient,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:[`¥`,e.price]})]})]})]},e.id)})}),!z.alipay&&!z.wechat?(0,$.jsx)(`div`,{style:{marginTop:20,marginBottom:8,padding:16,background:`#fef2f2`,borderRadius:12,border:`1px solid #fecaca`},children:(0,$.jsx)(Q.Text,{style:{color:`#dc2626`,fontSize:13},children:`⚠️ 暂无可用的支付方式,请联系管理员开启支付功能`})}):(0,$.jsxs)(`div`,{style:{marginTop:20,marginBottom:8},children:[(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13,marginBottom:8,display:`block`},children:`选择支付方式`}),(0,$.jsxs)(LL.Group,{value:A,onChange:e=>j(e.target.value),style:{display:`flex`,gap:12},children:[z.alipay&&(0,$.jsxs)(LL.Button,{value:`alipay`,style:{flex:1,textAlign:`center`,borderRadius:10,height:44,lineHeight:`42px`,borderColor:A===`alipay`?`#1677ff`:void 0,color:A===`alipay`?`#1677ff`:void 0},children:[(0,$.jsx)(i2,{style:{fontSize:16,marginRight:6}}),`支付宝`]}),z.wechat&&(0,$.jsxs)(LL.Button,{value:`wechat`,style:{flex:1,textAlign:`center`,borderRadius:10,height:44,lineHeight:`42px`,borderColor:A===`wechat`?`#07c160`:void 0,color:A===`wechat`?`#07c160`:void 0},children:[(0,$.jsx)(i5,{style:{fontSize:16,marginRight:6}}),`微信支付`]})]})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:[(0,$.jsx)(vD,{size:`large`,onClick:()=>{s(!1),u(null)},style:{borderRadius:10,marginRight:12},children:`取消`}),(0,$.jsx)(vD,{type:`primary`,size:`large`,disabled:!l||!z.alipay&&!z.wechat,loading:M,onClick:async()=>{let e=p.find(e=>e.id===l);if(!e)return;let t=(e.credits||0)+(e.bonus_credits||e.bonusCredits||0);try{N(!0);let n=await i7(e.id,A),r=n.qrUrl||n.codeUrl||n.qr_code||n.code_url;(n.paymentMethod===`alipay`||n.paymentMethod===`wechat`)&&r?(k({price:e.price,credits:t,qrCode:r,method:n.paymentMethod}),s(!1),D(!0),R.current=n.orderNo,localStorage.setItem(re,JSON.stringify({orderNo:n.orderNo,price:e.price,credits:t,qrCode:r,method:n.paymentMethod,createdAt:n.createdAt||new Date().toISOString(),timeoutSeconds:180})),ue(n.orderNo)):(Z.success(`充值成功!积分已到账`),$7.getState().refreshUser(),s(!1),u(null))}catch(e){Z.error(e?.message||`创建订单失败,请重试`)}finally{N(!1)}},style:{borderRadius:10,fontWeight:600,background:l?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#d1d5db`,border:`none`,boxShadow:l?`0 8px 24px rgba(99,102,241,0.3)`:`none`},children:`确认充值`})]})]})}),(0,$.jsx)(Pq,{open:E,onCancel:async()=>{if(le(),R.current){try{await s7(R.current)}catch{}R.current=null}localStorage.removeItem(re),D(!1),k(null)},footer:null,width:400,closable:!1,styles:{body:{padding:0,borderRadius:16,overflow:`hidden`}},children:(0,$.jsxs)(`div`,{style:{padding:`24px`},children:[(0,$.jsxs)(`div`,{style:{textAlign:`center`,marginBottom:24},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,background:O?.method===`alipay`?`linear-gradient(135deg, #1677ff, #0958d9)`:`linear-gradient(135deg, #07c160, #06ae56)`,borderRadius:16,display:`flex`,alignItems:`center`,justifyContent:`center`,margin:`0 auto 12px`},children:O?.method===`alipay`?(0,$.jsx)(i2,{style:{fontSize:24,color:`#fff`}}):(0,$.jsx)(i5,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:O?.method===`alipay`?`支付宝支付`:`微信支付`}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:O?.method===`alipay`?`请使用支付宝扫描二维码完成支付`:`请使用微信扫描二维码完成支付`})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:16,padding:20,display:`flex`,flexDirection:`column`,alignItems:`center`,boxShadow:`0 4px 20px rgba(0,0,0,0.08)`},children:[(0,$.jsx)(`div`,{style:{width:180,height:180,borderRadius:12,overflow:`hidden`,background:`#fff`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:O&&(0,$.jsx)(t2,{value:O.qrCode,size:160,level:`M`,includeMargin:!1})}),(0,$.jsxs)(`div`,{style:{marginTop:16,textAlign:`center`},children:[(0,$.jsxs)(`div`,{style:{fontSize:28,fontWeight:700,color:`#1a1a2e`},children:[`¥`,O?.price||0]}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`,marginTop:4},children:[`购买 `,O?.credits||0,` 积分`]}),(0,$.jsx)(`div`,{style:{marginTop:12,padding:`8px 16px`,background:P<=30?`#fef2f2`:`#f0f9ff`,borderRadius:8,border:P<=30?`1px solid #fecaca`:`1px solid #bae6fd`,display:`inline-block`},children:(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:P<=30?`#dc2626`:`#0284c7`},children:[`订单将在 `,(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:800},children:P}),` 秒后关闭`]})})]})]}),(0,$.jsx)(`div`,{style:{marginTop:20,padding:16,background:`#fef3c7`,borderRadius:12},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:8},children:[(0,$.jsx)(`div`,{style:{fontSize:16,marginTop:-2},children:`💡`}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#92400e`},children:[(0,$.jsx)(`div`,{style:{fontWeight:500,marginBottom:4},children:`支付提示`}),(0,$.jsxs)(`ul`,{style:{margin:0,paddingLeft:16},children:[(0,$.jsx)(`li`,{style:{marginBottom:2},children:`请在支付后等待页面自动跳转`}),(0,$.jsx)(`li`,{children:`如支付成功但未到账,请联系客服`})]})]})]})}),(0,$.jsx)(`div`,{style:{marginTop:20},children:(0,$.jsx)(vD,{size:`large`,block:!0,onClick:async()=>{if(le(),R.current){try{await s7(R.current)}catch{}R.current=null}localStorage.removeItem(re),D(!1),k(null),u(null)},style:{borderRadius:10},children:`取消支付`})})]})}),(0,$.jsx)(cte,{}),(0,$.jsx)(`div`,{style:{position:`fixed`,right:24,bottom:ee?100:24,zIndex:1e3,transition:`bottom 0.3s ease`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`flex-end`,gap:12},children:[ee&&(0,$.jsxs)(`div`,{style:{padding:`16px 20px`,background:`#ffffff`,borderRadius:16,boxShadow:`0 8px 32px rgba(0,0,0,0.12)`,minWidth:280,animation:`slideUp 0.3s ease`},children:[(0,$.jsxs)(`div`,{style:{color:`#1e293b`,fontSize:16,fontWeight:600,marginBottom:12,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(Y3,{style:{color:`#6366f1`}}),`联系我们`]}),(0,$.jsxs)(`div`,{style:{padding:`12px 16px`,background:`rgba(99, 102, 241, 0.06)`,borderRadius:12,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{color:`#64748b`,fontSize:13,marginBottom:4},children:`商务咨询`}),(0,$.jsx)(`div`,{style:{color:`#1e293b`,fontSize:14,fontWeight:600},children:`400-888-8888`})]}),(0,$.jsx)(vD,{type:`primary`,block:!0,onClick:()=>H(!0),style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`在线咨询`})]}),(0,$.jsx)(`button`,{onClick:()=>te(!ee),style:{width:56,height:56,borderRadius:`50%`,border:`none`,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,color:`#ffffff`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.05)`,e.currentTarget.style.boxShadow=`0 6px 24px rgba(99, 102, 241, 0.5)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.4)`},children:ee?(0,$.jsx)(tw,{style:{fontSize:20}}):(0,$.jsx)(Y3,{style:{fontSize:20}})})]})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(Y3,{}),`联系我们`]}),open:V,onCancel:()=>{H(!1),U.resetFields()},footer:null,width:480,children:(0,$.jsxs)(`div`,{style:{marginTop:8},children:[(0,$.jsxs)(xW,{form:U,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`name`,label:`姓名`,rules:[{required:!0,message:`请输入姓名`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的姓名`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`phone`,label:`手机号`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1[3-9]\d{9}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的手机号`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`companyName`,label:`公司名称`,rules:[{required:!0,message:`请输入公司名称`}],children:(0,$.jsx)(nK,{placeholder:`请输入公司名称`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`industry`,label:`您的行业`,rules:[{required:!0,message:`请输入您的行业`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的行业`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`message`,label:`留言(选填)`,children:(0,$.jsx)(nK.TextArea,{placeholder:`请输入您的需求或问题`,rows:3,style:{borderRadius:10}})})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,display:`flex`,gap:12},children:[(0,$.jsx)(vD,{size:`large`,onClick:()=>{H(!1),U.resetFields()},style:{borderRadius:10,flex:1},children:`取消`}),(0,$.jsx)(vD,{type:`primary`,size:`large`,onClick:ce,loading:ne,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,flex:1},children:`提交`})]})]})})]})},dte=`http://localhost:8000/api`,fte=()=>{let{checkAuth:e}=$7(),[t,n]=(0,S.useState)(!1),[r,i]=(0,S.useState)(`password`),[a,o]=(0,S.useState)(`password`),[s,c]=(0,S.useState)(0),[l,u]=(0,S.useState)(0),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(!1),[_,v]=(0,S.useState)(!1),[y,b]=(0,S.useState)(0),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),E=(()=>{try{let e=localStorage.getItem(`siteInfo`);if(e){let t=JSON.parse(e);return{siteName:t.siteName||`VideoGen.AI`,siteLogo:t.siteLogo||``}}}catch{}return{siteName:`VideoGen.AI`,siteLogo:``}})(),[D,O]=(0,S.useState)(E.siteName),[k,A]=(0,S.useState)(E.siteLogo),[j,M]=(0,S.useState)(``),[N,P]=(0,S.useState)(``),F=Je(),{login:I}=$7(),[L]=xW.useForm(),[R]=xW.useForm(),[z]=xW.useForm();(0,S.useEffect)(()=>{q5().then(e=>{O(e.siteName),A(e.siteLogo),M(e.userAgreementUrl),P(e.privacyPolicyUrl)}).catch(()=>{})},[]);let B=()=>d?!0:(Z.warning(`请先阅读并同意用户协议和隐私政策`),!1),V=async()=>{if(B())try{let t=await L.validateFields();await I(t.phone,t.password,void 0,t.rememberMe),Z.success(`登录成功,欢迎回来`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}},H=async()=>{if(B())try{let t=R.getFieldsValue();if(!t.phone||!t.code){Z.error(`请填写手机号和验证码`);return}n(!0),await j5(t.phone,t.code),Z.success(`登录成功,欢迎回来`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}finally{n(!1)}},U=async()=>{if(B())try{let t=await z.validateFields();n(!0),await M5(t.phone,t.regCode,t.password),Z.success(`注册成功`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`注册失败`;Z.error(t)}finally{n(!1)}},ee=(e,t)=>{e(60);let n=setInterval(()=>{e(e=>e<=1?(clearInterval(n),m(!1),t?C(!0):T(!0),0):e-1)},1e3)};(0,S.useEffect)(()=>{s===0&&r===`phone`&&v(!1)},[s,r]);let te=async(e,t)=>{try{if(!e||!/^1\d{10}$/.test(e)){Z.error(`请输入正确的手机号`);return}if(t){m(!0),g(!1);return}if(!_){m(!0),v(!1);return}let n=``;n=r===`register`?`register`:`login`,await X5(e,n),ee(t?u:c),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(g(!1),u(0)):(v(!1),c(0)),b(e=>e+1)}},ne=async(e=!1)=>{let t=r===`register`?z.getFieldValue(`phone`):R.getFieldValue(`phone`);try{let e=``;e=r===`register`?`register`:`login`,await X5(t,e),r===`register`?(g(!0),ee(u,!0)):(v(!0),ee(c,!1)),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(g(!1),u(0),C(!0)):(v(!1),c(0),T(!0)),b(e=>e+1)}},W=e=>{o(e),i(e),c(0),u(0),v(!1),g(!1),m(!1),C(!1),T(!1),b(e=>e+1),e===`password`?L.resetFields():R.resetFields()},re=[{icon:(0,$.jsx)(U2,{}),title:`AI 智能优化`,desc:`输入原始提示词,AI 自动为您生成专业级视频、图片描述`},{icon:(0,$.jsx)(S6,{}),title:`一键生成视频、图片`,desc:`支持多种规格生成视频、图片`},{icon:(0,$.jsx)(g3,{}),title:`项目维度管理`,desc:`按项目行业分类视频、图片,支持多种行业`}],G={background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,height:48,borderRadius:10,fontSize:14},K=e=>{e&&window.open(`${dte.replace(/\/api$/,``)}${e}`,`_blank`)};return(0,$.jsxs)(`div`,{style:{minHeight:`100vh`,display:`flex`,backgroundImage:`url(/backimage.png)`,backgroundSize:`cover`,backgroundPosition:`center`,backgroundRepeat:`no-repeat`,backgroundAttachment:`fixed`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(135deg, rgba(240,244,255,0.9) 0%, rgba(232,236,248,0.85) 40%, rgba(240,240,255,0.9) 70%, rgba(248,249,255,0.95) 100%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,width:500,height:500,borderRadius:`50%`,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,top:-150,right:-100,filter:`blur(40px)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,width:400,height:400,borderRadius:`50%`,background:`radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%)`,bottom:-100,left:-80,filter:`blur(50px)`}}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`center`,padding:`0 80px`,zIndex:1},children:(0,$.jsxs)(DU,{direction:`vertical`,size:36,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:20},children:[k?(0,$.jsx)(`img`,{src:k,alt:`logo`,style:{width:52,height:52,borderRadius:14,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:(0,$.jsx)(j8,{style:{fontSize:26,color:`#fff`}})}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:28,fontWeight:800,letterSpacing:-.5},children:D})]}),(0,$.jsx)(`div`,{className:`shiny-text-container`,children:(0,$.jsx)(`span`,{className:`shiny-text`,children:`AI赋能创意,素材触手可及`})}),(0,$.jsxs)(Q.Paragraph,{style:{color:`#64748b`,fontSize:17,maxWidth:480,lineHeight:1.8},children:[`专业的 AI 素材生成平台,通过智能提示词优化,`,(0,$.jsx)(`br`,{}),`让您的创意快速转化为精美视频、图片`]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:20},children:re.map((e,t)=>(0,$.jsxs)(`div`,{className:`electric-border-card`,style:{position:`relative`,display:`flex`,gap:16,alignItems:`flex-start`,padding:`18px 22px`,borderRadius:14,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(12px)`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{className:`electric-border`}),(0,$.jsx)(`div`,{className:`electric-border-inner`}),(0,$.jsx)(`div`,{style:{position:`relative`,zIndex:1},children:(0,$.jsx)(`div`,{style:{width:44,height:44,borderRadius:12,flexShrink:0,background:`linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15))`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#6366f1`,fontSize:20},children:e.icon})}),(0,$.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,$.jsx)(Q.Text,{style:{color:`#1e293b`,fontSize:15,fontWeight:600,display:`block`,marginBottom:4},children:e.title}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13,lineHeight:1.6},children:e.desc})]})]},t))})]})}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1,padding:`40px 24px`},children:(0,$.jsxs)(Oz,{style:{width:440,maxWidth:`100%`,borderRadius:20,boxShadow:`0 20px 60px rgba(0,0,0,0.08)`,border:`1px solid #e2e8f0`,background:`#fff`},styles:{body:{padding:`36px 28px`}},children:[(0,$.jsx)(Q.Title,{level:3,style:{textAlign:`center`,marginBottom:6,color:`#1e293b`,fontWeight:700},children:r===`register`?`创建账号`:`欢迎回来`}),(0,$.jsx)(Q.Text,{style:{display:`block`,textAlign:`center`,marginBottom:28,color:`#94a3b8`,fontSize:14},children:r===`register`?`注册新账号,开始创作视频`:`登录您的账号,开始创作视频`}),r!==`register`&&(0,$.jsx)(`div`,{style:{display:`flex`,gap:0,marginBottom:24,background:`#f1f5f9`,borderRadius:10,padding:4,border:`1px solid #e2e8f0`},children:[`password`,`phone`].map(e=>(0,$.jsx)(`div`,{onClick:()=>W(e),style:{flex:1,textAlign:`center`,padding:`10px 0`,borderRadius:8,cursor:`pointer`,fontSize:14,fontWeight:a===e?600:400,color:a===e?`#6366f1`:`#64748b`,background:a===e?`#fff`:`transparent`,border:a===e?`1px solid rgba(99,102,241,0.2)`:`1px solid transparent`,boxShadow:a===e?`0 2px 8px rgba(99,102,241,0.1)`:`none`,transition:`all 0.3s ease`},children:e===`password`?`密码登录`:`验证码登录`},e))}),r===`password`&&(0,$.jsxs)(xW,{form:L,size:`large`,layout:`vertical`,onFinish:V,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,style:G})}),(0,$.jsx)(xW.Item,{name:`password`,rules:[{required:!0,message:`请输入密码`}],children:(0,$.jsx)(nK.Password,{prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入密码`,style:G})}),(0,$.jsx)(xW.Item,{name:`rememberMe`,valuePropName:`checked`,style:{marginBottom:12},children:(0,$.jsx)(aV,{children:`记住我的登录状态`})}),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,htmlType:`submit`,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登 录`})})]}),r===`phone`&&(0,$.jsxs)(xW,{form:R,size:`large`,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:G})}),(0,$.jsx)(xW.Item,{name:`code`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(DU.Compact,{style:{width:`100%`},children:[(0,$.jsx)(nK,{prefix:(0,$.jsx)(B6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!_,style:{...G,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(vD,{disabled:s>0,onClick:()=>{w?(v(!1),m(!0),b(e=>e+1)):te(R.getFieldValue(`phone`))},style:{height:48,borderRadius:`0 10px 10px 0`,background:s>0||_?`#f1f5f9`:`rgba(99,102,241,0.1)`,border:`1.5px solid #e2e8f0`,borderLeft:`none`,color:s>0?`#94a3b8`:`#6366f1`,fontWeight:600,minWidth:100},children:s>0?`${s}s`:w?`重新发送`:`获取验证码`})]})}),p&&(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(r9,{onSuccess:ne,isVerified:_})},y),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,onClick:H,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登 录`})})]}),r===`register`&&(0,$.jsxs)(xW,{form:z,size:`large`,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:G})}),(0,$.jsx)(xW.Item,{name:`regCode`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(DU.Compact,{style:{width:`100%`},children:[(0,$.jsx)(nK,{prefix:(0,$.jsx)(B6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!h,style:{...G,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(vD,{disabled:l>0,onClick:()=>{x?(g(!1),m(!0),b(e=>e+1)):te(z.getFieldValue(`phone`),!0)},style:{height:48,borderRadius:`0 10px 10px 0`,background:l>0||h?`#f1f5f9`:`rgba(99,102,241,0.1)`,border:`1.5px solid #e2e8f0`,borderLeft:`none`,color:l>0?`#94a3b8`:`#6366f1`,fontWeight:600,minWidth:100},children:l>0?`${l}s`:x?`重新发送`:`获取验证码`})]})}),p&&(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(r9,{onSuccess:ne,isVerified:h})},y),(0,$.jsx)(xW.Item,{name:`password`,rules:[{required:!0,message:`请设置密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(nK.Password,{prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请设置密码(至少6位)`,style:G})}),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,onClick:U,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`注 册`})})]}),(0,$.jsx)(`div`,{style:{marginBottom:16},children:(0,$.jsx)(aV,{checked:d,onChange:e=>f(e.target.checked),children:(0,$.jsxs)(`span`,{style:{fontSize:13,color:`#64748b`},children:[`我已阅读并同意`,(0,$.jsx)(`span`,{onClick:e=>{e.stopPropagation(),K(j)},style:{color:`#6366f1`,cursor:`pointer`},children:`《用户协议》`}),`和`,(0,$.jsx)(`span`,{onClick:e=>{e.stopPropagation(),K(N)},style:{color:`#6366f1`,cursor:`pointer`},children:`《隐私政策》`})]})})}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:r===`register`?(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#6366f1`,cursor:`pointer`},onClick:()=>{i(`password`),o(`password`),C(!1),T(!1),g(!1),m(!1),b(e=>e+1),z.resetFields()},children:`已有账号?去登录`}):(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#6366f1`,cursor:`pointer`},onClick:()=>{i(`register`),C(!1),T(!1),g(!1),m(!1),b(e=>e+1)},children:`没有账号?立即注册`})})]})})]})},r9=({onSuccess:e,isVerified:t})=>{let n=S.useRef(null),r=S.useRef(null),i=S.useRef(null),a=S.useRef(0),o=S.useRef(!1),[s,c]=S.useState(360),l=s-50;S.useEffect(()=>{let e=()=>{if(n.current){let e=n.current.offsetWidth;e>0&&c(e)}};e();let t=new ResizeObserver(e);return n.current&&t.observe(n.current),window.addEventListener(`resize`,e),()=>{t.disconnect(),window.removeEventListener(`resize`,e)}},[]);let u=n=>{if(o.current||t)return;let c=Math.max(0,Math.min(n,l));a.current=c,r.current&&(r.current.style.left=`${c}px`),i.current&&(i.current.style.width=`${c+50}px`),c>=l-5&&(o.current=!0,r.current&&(r.current.style.background=`#22c55e`,r.current.innerHTML=``),i.current&&(i.current.style.width=`${s}px`,i.current.style.background=`#dcfce7`),e())};return(0,$.jsxs)(`div`,{ref:n,onMouseDown:e=>{if(e.preventDefault(),o.current||t)return;let s=n.current;if(!s)return;let c=s.getBoundingClientRect(),d=e=>{u(e.clientX-c.left-50/2)},f=()=>{document.removeEventListener(`mousemove`,d),document.removeEventListener(`mouseup`,f),!o.current&&a.current({page:1,pageSize:10,total:0,items:[]}),i9=p5((e,t)=>({projects:[],records:pte(),loading:!1,mediaType:`image`,countType:`请选择`,selectedRatio:`1:1`,selectedResolution:`2K`,width:2048,height:2048,videoDuration:5,videoAspectRatio:`16:9`,videoResolution:`720p`,engineOptions:{ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]},enginesele:[],fetchProjects:async()=>{e({loading:!0});try{e({projects:await I5(),loading:!1})}catch{e({loading:!1})}},createProject:async(n,r)=>{let i=await L5(n,r);return e({projects:[i,...t().projects]}),i},deleteProject:async n=>{await R5(n),e({projects:t().projects.filter(e=>e.id!==n)})},fetchRecords:async(t={})=>{e({loading:!0});try{e({records:await z5(t),loading:!1})}catch{e({loading:!1})}},optimizePrompt:async(n,r)=>{let i=await B5(n,r);try{await $7.getState().checkAuth()}catch{}let a=t().records;return e({records:{...a,total:a.total+1,items:[i.record,...a.items]}}),i},generateVideo:async(n,r)=>{let i=await G5(n,r);try{await $7.getState().checkAuth()}catch{}let a=t().records;return e({records:{...a,items:a.items.map(e=>e.id===n?i:e)}}),i},updateRecordReferences:(n,r)=>{let i=t().records;e({records:{...i,items:i.items.map(e=>e.id===n?{...e,references:r}:e)}})},setMediaType:t=>e({mediaType:t}),setCountType:t=>e({countType:t}),setImageSettings:(t,n,r,i)=>e({selectedRatio:t,selectedResolution:n,width:r,height:i}),setVideoSettings:(t,n,r)=>e({videoDuration:t,videoAspectRatio:n,videoResolution:r}),setEngineOptions:t=>e({engineOptions:t}),setSelectedRatio:t=>e({selectedRatio:t}),setSelectedResolution:t=>e({selectedResolution:t}),setWidth:t=>e({width:t}),setHeight:t=>e({height:t}),setVideoDuration:t=>e({videoDuration:t}),setVideoAspectRatio:t=>e({videoAspectRatio:t}),setVideoResolution:t=>e({videoResolution:t}),setEnginesele:t=>e({enginesele:t}),resetGenerationConfig:()=>e({mediaType:`image`,countType:`请选择`,selectedRatio:`1:1`,selectedResolution:`2K`,width:2048,height:2048,videoDuration:5,videoAspectRatio:`16:9`,videoResolution:`720p`,engineOptions:{ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]},enginesele:[]})}));function a9(e){if(!e)return`-`;let t=e.trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);return n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``),t.replace(`T`,` `).slice(0,16)}var o9=[`#f97316`,`#3b82f6`,`#8b5cf6`,`#10b981`,`#eab308`,`#6366f1`,`#ef4444`,`#06b6d4`,`#64748b`,`#78716c`],s9={ShoppingCartOutlined:(0,$.jsx)(Q6,{}),BookOutlined:(0,$.jsx)(L2,{}),HomeOutlined:(0,$.jsx)(y3,{}),FireOutlined:(0,$.jsx)(Q4,{}),RocketOutlined:(0,$.jsx)(L6,{}),SkinOutlined:(0,$.jsx)(s8,{}),CompassOutlined:(0,$.jsx)(T4,{}),HeartOutlined:(0,$.jsx)(u3,{}),CarOutlined:(0,$.jsx)(Q2,{}),CameraOutlined:(0,$.jsx)(Y2,{}),CloudOutlined:(0,$.jsx)(u4,{}),StarOutlined:(0,$.jsx)(y8,{}),TrophyOutlined:(0,$.jsx)(L8,{}),ThunderboltOutlined:(0,$.jsx)(j8,{}),BulbOutlined:(0,$.jsx)(U2,{}),CoffeeOutlined:(0,$.jsx)(S4,{}),CrownOutlined:(0,$.jsx)(j4,{}),DashboardOutlined:(0,$.jsx)(P4,{}),FlagOutlined:(0,$.jsx)(t3,{}),GlobalOutlined:(0,$.jsx)(s3,{}),GiftOutlined:(0,$.jsx)(i3,{}),LaptopOutlined:(0,$.jsx)(O3,{}),MobileOutlined:(0,$.jsx)(Q3,{}),MonitorOutlined:(0,$.jsx)(t6,{}),PayCircleOutlined:(0,$.jsx)(s6,{}),PictureOutlined:(0,$.jsx)(p6,{}),PlayCircleOutlined:(0,$.jsx)(S6,{}),SafetyOutlined:(0,$.jsx)(B6,{}),ShoppingOutlined:(0,$.jsx)(t8,{}),SmileOutlined:(0,$.jsx)(u8,{}),SoundOutlined:(0,$.jsx)(g8,{}),TagOutlined:(0,$.jsx)(T8,{}),TeamOutlined:(0,$.jsx)(O8,{}),ToolOutlined:(0,$.jsx)(P8,{}),TruckOutlined:(0,$.jsx)(B8,{}),VideoCameraOutlined:(0,$.jsx)(Y8,{}),WalletOutlined:(0,$.jsx)(Q8,{}),BankOutlined:(0,$.jsx)(O2,{}),BuildOutlined:(0,$.jsx)(B2,{}),ExperimentOutlined:(0,$.jsx)(U4,{}),HighlightOutlined:(0,$.jsx)(p3,{}),IdcardOutlined:(0,$.jsx)(S3,{}),MedicineBoxOutlined:(0,$.jsx)(K3,{}),ReadOutlined:(0,$.jsx)(O6,{}),RestOutlined:(0,$.jsx)(j6,{}),SketchOutlined:(0,$.jsx)(i8,{}),SolutionOutlined:(0,$.jsx)(p8,{})},mte=()=>{let[e,t]=(0,S.useState)(!1),[n]=xW.useForm(),r=Je(),{projects:i,fetchProjects:a,createProject:o,deleteProject:s}=i9(),[c,l]=(0,S.useState)([]);(0,S.useEffect)(()=>{a(),e7().then(l).catch(()=>{})},[]);let u=Object.fromEntries(c.map((e,t)=>[e.key,{label:e.label,color:o9[t%o9.length],icon:e.icon||`AppstoreOutlined`}]));return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`22px 24px`,borderRadius:16,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-20,top:-20,width:200,height:200,borderRadius:`50%`,background:`rgba(255,255,255,0.08)`}}),(0,$.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,$.jsx)(Q.Title,{level:3,style:{margin:`0 0 4px`,color:`#fff`,fontWeight:700},children:`我的项目`}),(0,$.jsxs)(Q.Text,{style:{color:`rgba(255,255,255,0.7)`,fontSize:14},children:[`共 `,i.length,` 个项目 · 按行业分类管理`]})]}),(0,$.jsx)(vD,{icon:(0,$.jsx)(gR,{}),onClick:()=>t(!0),size:`large`,style:{background:`rgba(255,255,255,0.15)`,border:`1px solid rgba(255,255,255,0.3)`,color:`#fff`,fontWeight:600,backdropFilter:`blur(10px)`,borderRadius:10,height:42},children:`新建项目`})]}),i.length===0?(0,$.jsx)(NC,{image:NC.PRESENTED_IMAGE_SIMPLE,description:`还没有项目,创建您的第一个视频项目`,style:{padding:`60px 0`},children:(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(gR,{}),onClick:()=>t(!0),size:`large`,children:`创建第一个项目`})}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},className:`stagger-children`,children:i.map((e,t)=>(0,$.jsxs)(`div`,{className:`project-card project-item animate-slideInCard`,onClick:()=>r(`/projects/${e.id}/generate`),style:{display:`flex`,alignItems:`center`,padding:`18px 22px`,borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,animationDelay:`${t*.06}s`},children:[(0,$.jsx)(`div`,{style:{width:50,height:50,borderRadius:14,flexShrink:0,background:`${u[e.industry]?.color||`#64748b`}12`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:24,marginRight:16,color:u[e.industry]?.color||`#64748b`},children:s9[u[e.industry]?.icon]||(0,$.jsx)(u2,{})}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4,flexWrap:`wrap`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1a1a2e`},children:e.name}),(0,$.jsx)(T$,{color:u[e.industry]?.color||`#64748b`,style:{borderRadius:6,margin:0},children:u[e.industry]?.label||e.industry})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(TH,{style:{fontSize:12,color:`#94a3b8`}}),(0,$.jsxs)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:12,color:`#94a3b8`},children:[`创建于 `,a9(e.createdAt)]})]})]}),(0,$.jsxs)(`div`,{className:`project-actions`,style:{display:`flex`,alignItems:`center`,gap:8,marginLeft:16},children:[(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(S6,{}),onClick:t=>{t.stopPropagation(),r(`/projects/${e.id}/generate`)},style:{background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,borderRadius:10,fontWeight:600,height:36,boxShadow:`0 4px 12px rgba(99,102,241,0.25)`},children:`生成`}),(0,$.jsx)(Rq,{title:`确定删除该项目?`,description:`项目下的生成记录将一并删除`,onConfirm:async t=>{t?.stopPropagation(),await s(e.id),Z.success(`项目已删除`)},onCancel:e=>e?.stopPropagation(),children:(0,$.jsx)(vD,{danger:!0,icon:(0,$.jsx)(O$,{}),onClick:e=>e.stopPropagation(),style:{borderRadius:10,height:36,background:`rgba(239,68,68,0.06)`,border:`1px solid rgba(239,68,68,0.15)`,color:`#ef4444`}})}),(0,$.jsx)(Ug,{className:`mobile-hide`,style:{color:`#cbd5e1`,fontSize:12}})]})]},e.id))}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(u2,{}),`新建项目`]}),open:e,onOk:async()=>{try{let e=await n.validateFields(),i=await o(e.name,e.industry);Z.success(`项目创建成功`),t(!1),n.resetFields(),r(`/projects/${i.id}/generate`)}catch{}},onCancel:()=>{t(!1),n.resetFields()},okText:`创建`,cancelText:`取消`,width:480,children:(0,$.jsxs)(xW,{form:n,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(xW.Item,{name:`name`,label:`项目名称`,rules:[{required:!0,message:`请输入项目名称`}],children:(0,$.jsx)(nK,{placeholder:`例如:618电商大促宣传片`,prefix:(0,$.jsx)(xZ,{}),size:`large`})}),(0,$.jsx)(xW.Item,{name:`industry`,label:`所属行业`,rules:[{required:!0,message:`请选择行业`}],children:(0,$.jsx)(lw,{placeholder:`选择项目所属行业`,size:`large`,children:c.map((e,t)=>(0,$.jsx)(lw.Option,{value:e.key,children:(0,$.jsxs)(DU,{children:[s9[e.icon]||(0,$.jsx)(u2,{}),` `,e.label]})},e.key))})})]})})]})};function hte(){if(typeof crypto<`u`&&typeof crypto.randomUUID==`function`)return crypto.randomUUID();if(typeof crypto<`u`&&typeof crypto.getRandomValues==`function`){let e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}return`${Date.now().toString(16).padStart(12,`0`)}-${Math.random().toString(16).slice(2,10).padStart(8,`0`)}-4xxx-yxxx-${Math.random().toString(16).slice(2,12)}`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}var c9=({src:e,width:t=48,height:n=48})=>{let[r,i]=(0,S.useState)(null),[a,o]=(0,S.useState)(null);return(0,S.useEffect)(()=>{let r=document.createElement(`video`);r.muted=!0,r.preload=`metadata`,r.crossOrigin=`anonymous`;let a=()=>{o(r.duration),r.currentTime=Math.min(1,r.duration*.1)},s=()=>{try{let e=document.createElement(`canvas`);e.width=t*2,e.height=n*2;let a=e.getContext(`2d`);a&&(a.drawImage(r,0,0,e.width,e.height),i(e.toDataURL(`image/jpeg`,.7)))}catch{}};return r.addEventListener(`loadedmetadata`,a),r.addEventListener(`seeked`,s),r.src=e,()=>{r.removeEventListener(`loadedmetadata`,a),r.removeEventListener(`seeked`,s)}},[e,t,n]),(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`,background:`#1a1a2e`},children:[r?(0,$.jsx)(`img`,{src:r,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(S6,{style:{color:`#fff`,fontSize:18}})}),a!=null&&(0,$.jsx)(`span`,{style:{position:`absolute`,bottom:2,right:2,fontSize:9,color:`#fff`,background:`rgba(0,0,0,0.6)`,borderRadius:4,padding:`1px 4px`,lineHeight:1.3},children:(e=>`${Math.round(e)}s`)(a)})]})},gte=()=>{let{projectId:e}=Qe(),t=Je(),[n]=xW.useForm(),{projects:r,records:i,fetchProjects:a,fetchRecords:o,optimizePrompt:s,generateVideo:c}=i9(),l=i.items,{user:u}=$7(),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(null),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(!1),[x,C]=(0,S.useState)({}),[w,T]=(0,S.useState)({}),[E,D]=(0,S.useState)({}),[O,k]=(0,S.useState)(null),[A,j]=(0,S.useState)(null),[M,N]=(0,S.useState)([]),[P,F]=(0,S.useState)(!1),[I,L]=(0,S.useState)(``),[R,z]=(0,S.useState)(!1),[B,V]=(0,S.useState)(``),H=(0,S.useRef)(null),[U,ee]=(0,S.useState)({}),[te,ne]=(0,S.useState)({}),[W,re]=(0,S.useState)({}),[G,K]=(0,S.useState)(null),[q,ie]=(0,S.useState)({}),[J,ae]=(0,S.useState)(null),[oe,se]=(0,S.useState)(5),[ce,le]=(0,S.useState)(`16:9`),[ue,de]=(0,S.useState)(`720p`),[fe,pe]=(0,S.useState)(null),[me,he]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`720p`,`1080p`],durations:[5,8,10,12,15]}),[ge,_e]=(0,S.useState)(0),[ve,ye]=(0,S.useState)(0),[be,xe]=(0,S.useState)(`image`),[Se,Ce]=(0,S.useState)(`1:1`),[we,Te]=(0,S.useState)(`2K`),[Ee,De]=(0,S.useState)(2048),[Oe,ke]=(0,S.useState)(2048),[Ae,je]=(0,S.useState)(!1),[Me,Ne]=(0,S.useState)([]),[Pe,Fe]=(0,S.useState)([]);(0,S.useEffect)(()=>{if(c7().then(e=>{Ne(e.video),Fe(e.image)}),!Ae)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&je(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[Ae]);let Ie=(e,t)=>{for(let n=0;n{let t=e===`2k`?`2048`:e===`4k`?`4096`:e;for(let e=0;e{qe(e)},ze=e=>{Xe(parseInt(e))},[Be,Ve]=(0,S.useState)([]),[He,Ue]=(0,S.useState)([]),[We,Ge]=(0,S.useState)([]),[Ke,qe]=(0,S.useState)(0),[Ye,Xe]=(0,S.useState)(0);(0,S.useEffect)(()=>{We[Ye]&&We[Ye][Ke]!==void 0&&(De(We[Ye][Ke].substring(0,4)),ke(We[Ye][Ke].substring(5)))},[Ke]),(0,S.useEffect)(()=>{We[Ye]&&We[Ye][Ke]!==void 0&&(De(We[Ye][Ke].substring(0,4)),ke(We[Ye][Ke].substring(5)))},[Ye]);let Ze=()=>{De(Oe),ke(Ee)},$e=e=>{xe(e.target.value===`image`?`image`:`video`)};(0,S.useEffect)(()=>{e7().then(e=>{ee(Object.fromEntries(e.map(e=>[e.key,e.label]))),ne(Object.fromEntries(e.map(e=>[e.key,e.optionGroups||[]])))}).catch(()=>{}),Y5().then(e=>{let t=e.items?.[0]?.supportedSizes||{},n=[],r=[],i=[];for(let e in t[`2K`])n.push(e),r.push(t[`2K`][e]);n.forEach((e,t)=>{Ve(n=>[...n,{value:e,label:String(t)}])});for(let e in t[`4K`])i.push(t[`4K`][e]);Ge([r,i]);let a=[];for(let e in t)a.push(e);a.forEach((e,t)=>{Ue(n=>[...n,{value:e,label:String(t)}])})}).catch(()=>{}),J5().then(e=>{if(e.items?.length){let t=e.items[0];he({ratios:t.supportedRatios?.length?t.supportedRatios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions?.length?t.supportedResolutions:[`720p`,`1080p`],durations:t.supportedDurations?.length?t.supportedDurations:[5,8,10,12,15]})}}).catch(()=>{})},[]),(0,S.useEffect)(()=>{a(),o({projectId:e,page:1,pageSize:100})},[e,a,o]);let et=(0,S.useRef)(!1);(0,S.useEffect)(()=>{et.current||l.length===0||(et.current=!0,console.log(`aaaa`,l),l.forEach(t=>{t.projectId===e&&t.status===`generating`&&(T(e=>({...e,[t.id]:`generating`})),Dt(t.id)),t.projectId===e&&t.status===`optimizing`&&ct(t.id)}))},[l,e]);let tt=(0,S.useRef)(new Set),nt=(0,S.useRef)(null),rt=(0,S.useRef)(null),it=e=>{tt.current.add(e),st()},at=e=>{tt.current.delete(e),tt.current.size===0&&ot()},ot=()=>{nt.current&&=(clearInterval(nt.current),null),rt.current&&=(rt.current.abort(),null)},st=()=>{nt.current||=setInterval(async()=>{try{rt.current&&rt.current.abort();let t=new AbortController;rt.current=t;let n=await z5({projectId:e,page:1,pageSize:100,signal:t.signal});rt.current=null;let r=Array.from(tt.current),i=[];if(r.length>0){let e=i9.getState().records,t=e.items.map(e=>{if(r.includes(e.id)){let t=n.items.find(t=>t.id===e.id);if(t)return t.status!==`optimizing`&&i.push(e.id),t}return e});i9.setState({records:{...e,items:t}}),i.forEach(e=>{at(e)})}}catch(e){e.name!==`AbortError`&&console.error(`Optimizing polling error:`,e)}},3e3)},ct=e=>{it(e)},lt=(0,S.useRef)(!1),ut=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(lt.current||l.length===0)return;let t=localStorage.getItem(`pending_optimize`);if(t)try{let{key:n,projectId:r,prompt:i,duration:a,ts:o}=JSON.parse(t);if(Date.now()-o>300*1e3||r!==e){localStorage.removeItem(`pending_optimize`);return}if(ut.current===n)return;let s=l.find(e=>e.projectId===r&&e.originalPrompt===i&&e.duration===a&&e.status===`prompt_optimized`&&new Date(e.createdAt).getTime()>o-1e4);s?(lt.current=!0,localStorage.removeItem(`pending_optimize`),g(s),v(s.optimizedPrompt||``),_e(s.textCreditsCost),ye(s.textTokensUsed),m(!0),Z.success({content:`优化请求已恢复,消耗 ${s.textCreditsCost} 积分`,key:`recovery`})):Date.now()-o>3e4&&localStorage.removeItem(`pending_optimize`)}catch{localStorage.removeItem(`pending_optimize`)}},[l,e]);let dt=r.find(t=>t.id===e),ft=l.filter(t=>t.projectId===e),pt=dt?.name??`项目`,mt=dt&&te[dt.industry]||[],ht=u?.credits??0,gt=e=>{let t=e===`2k`?`2048`:e===`4k`?`4096`:e;for(let e=0;e=_t,yt=async()=>{try{if(!e){Z.error(`项目ID为空,请先选择项目`);return}let t=await n.validateFields();if(!t.prompt||!t.prompt.trim()){Z.error(`请输入视频/图片描述`);return}f(!0);let r=Object.entries(W).map(([e,t])=>`@${e}:${t}`),i=r.length>0?`${t.prompt}\n\n${r.join(`;`)}`:t.prompt,a=hte();localStorage.setItem(`pending_optimize`,JSON.stringify({key:a,projectId:e,prompt:i,duration:oe,ts:Date.now()})),ut.current=a;let o=await s(e,{prompt:i,duration:oe,genType:be,resolution:we,references:M.length>0?M:void 0,idempotencyKey:a,image_size:we,image_proportion:Se,image_px:Ee+`x`+Oe});localStorage.removeItem(`pending_optimize`),ut.current=null,g(o.record),v(o.record.optimizedPrompt||``),_e(o.textCreditsCost),ye(o.textTokensUsed),m(!0),Z.success({content:`「${pt}」提示词优化完成,消耗 ${o.textCreditsCost} 积分`,key:`optimize`})}catch(e){console.error(`优化提示词失败:`,e);let t=e?.response?.data?.message||e?.message||`操作失败,请稍后重试`;Z.error(t)}finally{f(!1),localStorage.removeItem(`pending_optimize`),ut.current=null}},bt=(0,S.useRef)(new Set),xt=(0,S.useRef)(null),St=(0,S.useRef)(null),Ct=e=>{bt.current.add(e),Et()},wt=e=>{bt.current.delete(e),bt.current.size===0&&Tt()},Tt=()=>{xt.current&&=(clearInterval(xt.current),null),St.current&&=(St.current.abort(),null)},Et=()=>{xt.current||=setInterval(async()=>{try{St.current&&St.current.abort();let t=new AbortController;St.current=t;let n=await z5({projectId:e,page:1,pageSize:100,signal:t.signal});St.current=null;let r=Array.from(bt.current),i=[];if(r.length>0){let e=i9.getState().records,t=e.items.map(e=>{if(r.includes(e.id)){let t=n.items.find(t=>t.id===e.id);if(t)return t.status!==`generating`&&i.push(e.id),t}return e});i9.setState({records:{...e,items:t}}),i.forEach(e=>{let t=n.items.find(t=>t.id===e);wt(e),t?.status===`completed`?(T(t=>({...t,[e]:`done`})),g(n=>n?.id===e?t:n),Z.success({content:`「${pt}」视频生成完成!`,key:e,duration:5})):t?.status===`failed`&&(T(t=>({...t,[e]:`failed`})),g(n=>n?.id===e?t:n),Z.error({content:`「${pt}」视频生成失败: ${t.errorMessage||`未知错误`}`,key:e,duration:5}))})}}catch(e){e.name!==`AbortError`&&console.error(`Global polling error:`,e)}},5e3)},Dt=e=>{Ct(e)};(0,S.useEffect)(()=>()=>{Tt(),ot()},[]);let Ot=async e=>{if(!vt){Z.error(`积分不足,请先充值`);return}C(t=>({...t,[e]:!0})),T(t=>({...t,[e]:`generating`})),Z.loading({content:`「${pt}」正在提交视频生成...`,duration:0,key:e});try{(await c(e,{aspectRatio:ce,resolution:ue})).status===`failed`?(T(t=>({...t,[e]:`failed`})),Z.error({content:`「${pt}」提交失败`,key:e,duration:3})):(Z.success({content:`「${pt}」已提交,正在生成中...`,key:e,duration:3}),Dt(e))}catch(t){T(t=>({...t,[e]:`failed`}));let n=`提交失败`;t?.response?.data?.detail?n=t.response.data.detail:t?.data?.detail?n=t.data.detail:t?.detail?n=t.detail:t?.message&&(n=t.message),Z.error({content:`${n}`,key:e,duration:3})}finally{C(t=>({...t,[e]:!1}))}},kt=async e=>{let t=ft.find(t=>t.id===e);if(t){C(t=>({...t,[e]:!0})),T(t=>({...t,[e]:`generating`})),Z.loading({content:`「${pt}」正在重新提交...`,duration:0,key:e});try{let n=E[e];n&&n!==t.optimizedPrompt&&await W5(e,n);let r=await c(e,{aspectRatio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`});console.log(`重新提交视频生成结果:`,r),r.status===`failed`?(T(t=>({...t,[e]:`failed`})),console.log(`12312`),Z.error({content:`「${pt}」提交失败`,key:e,duration:3})):(Z.success({content:`「${pt}」已提交,正在生成中...`,key:e,duration:3}),Dt(e))}catch(t){T(t=>({...t,[e]:`failed`})),console.log(`1231`,t);let n=`提交失败`;t?.response?.data?.detail?n=t.response.data.detail:t?.data?.detail?n=t.data.detail:t?.detail?n=t.detail:t?.message&&(n=t.message),Z.error({content:`${n}`,key:e,duration:3})}finally{C(t=>({...t,[e]:!1}))}}},At=e=>{let t=w[e.id];return t===`generating`?`generating`:t===`done`?`completed`:t===`failed`?`failed`:e.status},jt={optimizing:{color:`processing`,text:`优化中`,icon:(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,$.jsx)(OH,{})},generating:{color:`warning`,text:`生成中`,icon:(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}})},completed:{color:`success`,text:`已完成`,icon:(0,$.jsx)(i4,{})},failed:{color:`error`,text:`失败`,icon:(0,$.jsx)(s4,{})}},Mt=({label:e,value:t,options:n,suffix:r,expanded:i,onToggle:a,onSelect:o,onClose:s})=>{let c=(0,S.useRef)(null),l=(0,S.useRef)(null),u=(0,S.useRef)(i),[d,f]=(0,S.useState)(null);return u.current=i,(0,S.useEffect)(()=>{if(i&&c.current){let e=c.current.getBoundingClientRect();f({bottom:window.innerHeight-e.top+4,left:e.left,width:Math.max(e.width,100)})}else f(null)},[i]),(0,S.useEffect)(()=>{if(!i)return;let e=e=>{c.current?.contains(e.target)||l.current?.contains(e.target)||u.current&&s()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[i,s]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{ref:c,onClick:a,translate:`no`,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,cursor:`pointer`,userSelect:`none`,transition:`background 0.2s, border-color 0.2s`,background:i?`rgba(99,102,241,0.08)`:`#f8f9fc`,border:i?`1px solid #6366f1`:`1px solid #e2e8f0`,minWidth:70,whiteSpace:`nowrap`,flexShrink:0},children:[(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#6366f1`,fontWeight:500,lineHeight:`18px`},children:[t,r]}),(0,$.jsx)(wQ,{style:{fontSize:9,color:`#94a3b8`,transition:`transform 0.2s`,transform:i?`rotate(180deg)`:`rotate(0deg)`}})]}),d&&(0,zi.createPortal)((0,$.jsxs)(`div`,{ref:l,style:{position:`fixed`,bottom:d.bottom,left:d.left,minWidth:d.width,background:`#fff`,borderRadius:12,padding:6,zIndex:99999,boxShadow:`0 8px 30px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:10,color:`#94a3b8`,display:`block`,padding:`2px 6px 4px`},children:e}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:n.map((e,n)=>{let r=t===e;return(0,$.jsx)(`div`,{onClick:()=>{o(e),s()},style:{padding:`6px 10px`,borderRadius:8,fontSize:13,cursor:`pointer`,transition:`all 0.15s`,background:r?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`transparent`,color:r?`#fff`:`#1a1a2e`,fontWeight:r?600:400},onMouseEnter:e=>{r||(e.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:e},n)})})]}),document.body)]})},Nt=({group:e,selected:t,expanded:n,onToggle:r,onSelect:i,onClose:a})=>{let o=(0,S.useRef)(null),s=(0,S.useRef)(null),c=(0,S.useRef)(n),[l,u]=(0,S.useState)(null);return c.current=n,(0,S.useEffect)(()=>{if(n&&o.current){let e=o.current.getBoundingClientRect();u({bottom:window.innerHeight-e.top+4,left:e.left})}else u(null)},[n]),(0,S.useEffect)(()=>{if(!n)return;let e=e=>{o.current?.contains(e.target)||s.current?.contains(e.target)||c.current&&a()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[n,a]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{ref:o,onClick:r,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,cursor:`pointer`,userSelect:`none`,transition:`all 0.2s`,background:t?`rgba(99,102,241,0.08)`:`#f8f9fc`,border:n?`1px solid #6366f1`:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:t?`#6366f1`:`#64748b`,fontWeight:t?600:400},children:t||e.name}),(0,$.jsx)(wQ,{style:{fontSize:9,color:t?`#6366f1`:`#94a3b8`,transition:`transform 0.2s`,transform:n?`rotate(180deg)`:`rotate(0deg)`}})]}),l&&(0,zi.createPortal)((0,$.jsxs)(`div`,{ref:s,style:{position:`fixed`,bottom:l.bottom,left:l.left,background:`#fff`,borderRadius:12,padding:8,minWidth:160,zIndex:99999,boxShadow:`0 8px 30px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:10,color:`#94a3b8`,display:`block`,padding:`2px 6px 4px`},children:e.name}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:e.options.map((e,n)=>{let r=t===e;return(0,$.jsx)(`div`,{onClick:()=>{i(e),a()},style:{padding:`6px 10px`,borderRadius:8,fontSize:13,cursor:`pointer`,transition:`all 0.15s`,background:r?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`transparent`,color:r?`#fff`:`#1a1a2e`,fontWeight:r?600:400},onMouseEnter:e=>{r||(e.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:e},n)})})]}),document.body)]})};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`gen-header animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`20px 28px`,borderRadius:16,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 100%)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-30,bottom:-30,width:160,height:160,borderRadius:`50%`,background:`rgba(255,255,255,0.05)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,position:`relative`},children:[(0,$.jsx)(vD,{icon:(0,$.jsx)(g2,{}),onClick:()=>t(`/projects`),style:{background:`rgba(255,255,255,0.1)`,border:`1px solid rgba(255,255,255,0.2)`,color:`#fff`,borderRadius:10}}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0,color:`#fff`,fontWeight:700},children:pt}),dt&&(0,$.jsx)(T$,{style:{background:`rgba(255,255,255,0.12)`,border:`1px solid rgba(255,255,255,0.2)`,color:`rgba(255,255,255,0.8)`,borderRadius:6},children:U[dt.industry]||dt.industry})]}),(0,$.jsx)(Q.Text,{style:{color:`rgba(255,255,255,0.5)`,fontSize:13},children:`描述视频 → AI优化 → 生成视频`})]})]}),(0,$.jsxs)(T$,{style:{background:`rgba(255,255,255,0.1)`,border:`1px solid rgba(255,255,255,0.2)`,color:`#fff`,borderRadius:20,fontSize:13,padding:`4px 14px`},children:[`剩余 `,ht,` 积分`]})]}),!p&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{className:`animate-fadeInUp`,style:{marginBottom:24,padding:`16px 20px`,borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,boxShadow:`0 2px 12px rgba(0,0,0,0.03)`},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{marginRight:70,position:`relative`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,fontWeight:500,color:`#475569`,marginRight:16},children:`生成类型:`}),(0,$.jsxs)(LL.Group,{defaultValue:`image`,buttonStyle:`solid`,onChange:$e,children:[(0,$.jsxs)(LL.Button,{value:`image`,style:{zIndex:0},children:[(0,$.jsx)(p6,{style:{marginRight:6,fontSize:14}}),` `,`图片`]}),(0,$.jsxs)(LL.Button,{value:`video`,children:[(0,$.jsx)(Y8,{style:{marginRight:6,fontSize:14}}),` `,`视频`]})]})]}),be===`video`&&[{icon:(0,$.jsx)(j$,{}),label:`描述视频+时长`,color:`#6366f1`},{icon:(0,$.jsx)(j8,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(L6,{}),label:`选择参数生成`,color:`#10b981`}].map((e,t)=>(0,$.jsxs)(S.Fragment,{children:[t>0&&(0,$.jsx)(`div`,{style:{width:40,height:1,background:`linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0)`,margin:`0 12px`,flexShrink:0}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:10,background:`${e.color}12`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:e.color,fontSize:15},children:e.icon})}),(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:500,color:`#1a1a2e`},children:e.label})]})]},t)),be===`image`&&[{icon:(0,$.jsx)(j$,{}),label:`描述图片+尺寸`,color:`#6366f1`},{icon:(0,$.jsx)(j8,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(L6,{}),label:`图片生成`,color:`#10b981`}].map((e,t)=>(0,$.jsxs)(S.Fragment,{children:[t>0&&(0,$.jsx)(`div`,{style:{width:40,height:1,background:`linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0)`,margin:`0 12px`,flexShrink:0}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:10,background:`${e.color}12`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:e.color,fontSize:15},children:e.icon})}),(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:500,color:`#1a1a2e`},children:e.label})]})]},t))]})}),(0,$.jsxs)(xW,{form:n,initialValues:{},children:[(0,$.jsx)(xW.Item,{name:`prompt`,noStyle:!0,rules:[{required:!0,message:`请输入视频描述`}],style:{display:`none`}}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:20,background:`#fff`,border:`1px solid #f0f0f5`,boxShadow:`0 4px 24px rgba(0,0,0,0.04)`,overflow:`visible`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`12px 16px 0`,minHeight:60},children:[M.map((e,t)=>(0,$.jsxs)(`div`,{className:`ref-thumb`,style:{position:`relative`,width:48,height:48,borderRadius:12,overflow:`visible`,flexShrink:0},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,overflow:`hidden`,border:`1px solid #e2e8f0`,cursor:`pointer`},onClick:()=>{e.type===`video`&&ae(`http://ceshi.apiforeign.minzhong.cn${e.url}`)},children:e.type===`image`?(0,$.jsx)(xG,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(c9,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`})}),(0,$.jsx)(`div`,{className:`ref-delete`,onClick:n=>{n.stopPropagation(),U5(e.url).catch(()=>{}),N(e=>e.filter((e,n)=>n!==t))},style:{position:`absolute`,top:-4,right:-4,width:16,height:16,borderRadius:`50%`,background:`rgba(0,0,0,0.55)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,opacity:0,transition:`opacity 0.15s`,backdropFilter:`blur(4px)`},children:(0,$.jsx)(s4,{style:{color:`#fff`,fontSize:10}})})]},t)),(0,$.jsx)(y0,{accept:`image/*,video/*`,showUploadList:!1,multiple:!0,beforeUpload:e=>{let t=e.type.startsWith(`image/`),n=e.type.startsWith(`video/`);if(!t&&!n)return Z.error(`仅支持图片或视频文件`),!1;let r=n?100:10;if(e.size/1024/1024>r)return Z.error(`${n?`视频`:`图片`}大小不能超过${r}MB`),!1;let i=M.filter(e=>e.type===`image`).length,a=M.filter(e=>e.type===`video`).length;return t&&i>=10?(Z.error(`最多上传10张图片`),!1):n&&a>=3?(Z.error(`最多上传3个视频`),!1):(F(!0),(t?V5:H5)(e).then(e=>{let n=t?`图片`:`视频`,r=t?i+1:a+1;N(i=>[...i,{url:e.url,type:t?`image`:`video`,name:`${n}${r}`}]),Z.success(`${n}上传成功`)}).catch(()=>Z.error(`上传失败`)).finally(()=>F(!1)),!1)},children:(0,$.jsx)($w,{title:`参考内容(${M.length}/10)`,children:(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,border:`1.5px dashed #d9d9d9`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s`,flexShrink:0},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99,102,241,0.04)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#d9d9d9`,e.currentTarget.style.background=`transparent`},children:P?(0,$.jsx)(Xm,{style:{fontSize:18,color:`#6366f1`}}):(0,$.jsx)(gR,{style:{fontSize:18,color:`#94a3b8`}})})})})]}),(0,$.jsx)(`div`,{style:{padding:`8px 16px 4px`},children:(0,$.jsx)(nK.TextArea,{ref:H,value:I,onChange:e=>{let t=e.target.value;L(t),n.setFieldsValue({prompt:t});let r=t.lastIndexOf(`@`);if(r>=0){let e=t.slice(r+1);if(!e.includes(` `)&&!e.includes(` + `})]})},t9={HomeOutlined:(0,$.jsx)(y3,{}),DashboardOutlined:(0,$.jsx)(P4,{}),CodeOutlined:(0,$.jsx)(y4,{}),PlayCircleOutlined:(0,$.jsx)(S6,{}),WalletOutlined:(0,$.jsx)(Q8,{}),SettingOutlined:(0,$.jsx)(Y6,{}),BellOutlined:(0,$.jsx)(P2,{}),UserOutlined:(0,$.jsx)(K8,{}),AppstoreOutlined:(0,$.jsx)(u2,{}),FileTextOutlined:(0,$.jsx)(MU,{}),StarOutlined:(0,$.jsx)(y8,{}),HeartOutlined:(0,$.jsx)(u3,{}),CameraOutlined:(0,$.jsx)(Y2,{}),RobotOutlined:(0,$.jsx)(S6,{}),CalculatorOutlined:(0,$.jsx)(K2,{}),DollarOutlined:(0,$.jsx)(B4,{}),GiftOutlined:(0,$.jsx)(i3,{}),ThunderboltOutlined:(0,$.jsx)(j8,{}),FireOutlined:(0,$.jsx)(Q4,{}),CloudOutlined:(0,$.jsx)(u4,{}),SmileOutlined:(0,$.jsx)(u8,{}),TrophyOutlined:(0,$.jsx)(L8,{}),RocketOutlined:(0,$.jsx)(L6,{}),BulbOutlined:(0,$.jsx)(U2,{}),PictureOutlined:(0,$.jsx)(p6,{}),VideoCameraOutlined:(0,$.jsx)(Y8,{}),AudioOutlined:(0,$.jsx)(S2,{}),MailOutlined:(0,$.jsx)(U3,{}),PhoneOutlined:(0,$.jsx)(u6,{}),GlobalOutlined:(0,$.jsx)(s3,{}),ShoppingCartOutlined:(0,$.jsx)(Q6,{}),TeamOutlined:(0,$.jsx)(O8,{}),BarChartOutlined:(0,$.jsx)(j2,{}),PieChartOutlined:(0,$.jsx)(g6,{}),LineChartOutlined:(0,$.jsx)(P3,{}),SecurityScanOutlined:(0,$.jsx)(U6,{}),ApiOutlined:(0,$.jsx)(s2,{}),DatabaseOutlined:(0,$.jsx)(L4,{}),CloudServerOutlined:(0,$.jsx)(p4,{})},lte=240,n9=[{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(CJ,{})},{gradient:`linear-gradient(135deg, #4a5568, #2d3748)`,shadow:`rgba(74,85,104,0.25)`,icon:(0,$.jsx)(Y4,{})},{gradient:`linear-gradient(135deg, #718096, #4a5568)`,shadow:`rgba(113,128,150,0.25)`,icon:(0,$.jsx)(O4,{})},{gradient:`linear-gradient(135deg, #5a67d8, #434190)`,shadow:`rgba(90,103,216,0.25)`,icon:(0,$.jsx)(T2,{})}],ute=()=>{let e=Je(),t=Ge(),{user:n,logout:r}=$7(),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c]=xW.useForm(),[l,u]=(0,S.useState)(null),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)({}),[_,v]=(0,S.useState)(0),[y,b]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteName||``;return t&&(document.title=t),t}),[x,C]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteLogo||``;if(t){let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=t,e.type=`image/png`}return t}),[w,T]=(0,S.useState)(!localStorage.getItem(`siteInfo`)),[E,D]=(0,S.useState)(!1),[O,k]=(0,S.useState)(null),[A,j]=(0,S.useState)(`alipay`),[M,N]=(0,S.useState)(!1),[P,F]=(0,S.useState)(180),I=(0,S.useRef)(null),L=(0,S.useRef)(null),R=(0,S.useRef)(null),[z,B]=(0,S.useState)({alipay:!1,wechat:!1}),[V,H]=(0,S.useState)(!1),[U]=xW.useForm(),[ee,te]=(0,S.useState)(!1),[ne,W]=(0,S.useState)(!1),re=`pending_payment_order`;(0,S.useEffect)(()=>{q5().then(e=>{let t=e.siteName||`民众智创`,n=e.siteLogo||``;if(t!==y&&(b(t),document.title=t),n&&n!==x){C(n);let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=n,e.type=`image/png`}localStorage.setItem(`siteInfo`,JSON.stringify({siteName:t,siteLogo:n}))}).catch(()=>{})},[]);let G=()=>{Q5().then(e=>{v(e)}).catch(()=>{})};(0,S.useEffect)(()=>{(async()=>{let e=localStorage.getItem(re);if(e)try{let t=JSON.parse(e),n=await o7(t.orderNo);if(n.status===`pending`){k({price:t.price,credits:t.credits,qrCode:t.qrCode,method:t.method}),R.current=t.orderNo;let e=Date.now(),n=new Date(t.createdAt).getTime(),r=t.timeoutSeconds||180,i=Math.floor((e-n)/1e3),a=Math.max(0,r-i);a>0?(D(!0),ue(t.orderNo,a)):localStorage.removeItem(re)}else n.status===`paid`?(Z.success(`支付成功!积分已到账`),$7.getState().refreshUser(),localStorage.removeItem(re)):localStorage.removeItem(re)}catch{localStorage.removeItem(re)}})()},[]),(0,S.useEffect)(()=>{t7().then(e=>{f(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),n7().then(e=>{m(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),r7().then(e=>{B(e),e.alipay?j(`alipay`):e.wechat&&j(`wechat`)}).catch(()=>{}),G()},[n]);let K=t.pathname.startsWith(`/records`)?`/records`:t.pathname,q=lte,ie=[{key:`profile`,icon:(0,$.jsx)(K8,{}),label:`账号: ${n?.username}`,disabled:!0},{key:`credits`,icon:(0,$.jsx)(Q8,{style:{color:`#c9a96e`}}),label:`积分: ${n?.credits??0}`,disabled:!0},{type:`divider`},{key:`myCredits`,icon:(0,$.jsx)(Q8,{}),label:`积分明细`},{key:`orderRecords`,icon:(0,$.jsx)(MU,{}),label:`订单记录`},{key:`messages`,icon:(0,$.jsx)(P2,{}),label:`消息中心${_>0?`(${_})`:``}`},{type:`divider`},{key:`changePwd`,icon:(0,$.jsx)(L3,{}),label:`修改密码`},{type:`divider`},{key:`logout`,icon:(0,$.jsx)(B3,{}),label:`退出登录`,danger:!0}],J=({key:t})=>{t===`logout`?(r(),e(`/login`)):t===`changePwd`?a(!0):t===`messages`?e(`/messages`):t===`recharge`?s(!0):t===`myCredits`?e(`/user-center?tab=credits`):t===`orderRecords`&&e(`/user-center?tab=orders`)},ae=async()=>{try{await c.validateFields(),Z.success(`密码修改成功(演示)`),a(!1),c.resetFields()}catch{}},oe=()=>{r(),e(`/login`)},se=()=>{s(!0)},ce=async()=>{if(!n){Z.warning(`请先登录`);return}try{let e=await U.validateFields();W(!0),await Z7({phone:e.phone,company_name:e.companyName,industry:e.industry,name:e.name,message:e.message}),Z.success(`提交成功,我们会尽快与您联系`),H(!1),U.resetFields()}catch(e){Z.error(e?.message||`提交失败`)}finally{W(!1)}},le=(0,S.useCallback)(()=>{I.current&&=(clearInterval(I.current),null),L.current&&=(clearInterval(L.current),null)},[]),ue=(0,S.useCallback)((e,t=180)=>{le(),F(t),I.current=setInterval(async()=>{try{let t=await o7(e);t.status===`paid`?(le(),R.current=null,localStorage.removeItem(re),Z.success(`支付成功!积分已到账`),$7.getState().refreshUser(),D(!1),k(null),u(null)):t.status===`cancelled`&&(le(),R.current=null,localStorage.removeItem(re))}catch{}},2e3),L.current=setInterval(()=>{F(e=>e<=1?(le(),R.current&&=(s7(R.current).catch(()=>{}),null),localStorage.removeItem(re),Z.warning(`订单已超时,请重新充值`),D(!1),k(null),u(null),0):e-1)},1e3)},[le]);return(0,$.jsxs)(dK,{style:{minHeight:`100vh`},children:[(0,$.jsxs)(`div`,{className:`desktop-sidebar`,style:{width:q,position:`fixed`,left:16,top:16,bottom:16,zIndex:100,background:`linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,display:`flex`,flexDirection:`column`,transition:`width 0.25s ease, left 0.25s ease`,overflow:`hidden`,border:`1px solid rgba(0, 0, 0, 0.06)`},children:[(0,$.jsx)(`div`,{style:{height:80,display:`flex`,alignItems:`center`,justifyContent:`flex-start`,padding:`0 20px`,flexShrink:0,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14},children:[(0,$.jsx)(`div`,{style:{width:42,height:42,borderRadius:14,flexShrink:0,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,overflow:`hidden`},children:x?(0,$.jsx)(`img`,{src:x,alt:`logo`,style:{width:28,height:28,objectFit:`contain`}}):(0,$.jsx)(j8,{style:{fontSize:20,color:`#ffffff`}})}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:17,fontWeight:700,letterSpacing:-.02,whiteSpace:`nowrap`,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:y})]})}),(0,$.jsx)(`div`,{style:{flex:1,padding:`8px 8px`,overflow:`auto`},children:(()=>{let t={};d.forEach(e=>{let n=e.parent_id??e.parentId;n&&(t[n]||(t[n]=[]),t[n].push(e))});let n=d.filter(e=>!(e.parent_id??e.parentId));n.sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0));let r=[],i=(t,n=0)=>{let r=t.path===K,i=t9[t.icon]||(0,$.jsx)(y3,{});return(0,$.jsxs)(`div`,{onClick:()=>t.path&&e(t.path),style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:10,padding:n>0?`6px 12px 6px 32px`:`6px 14px`,borderRadius:12,margin:`1px 4px`,cursor:`pointer`,fontSize:n>0?13:14,fontWeight:r?600:400,color:r?`#4f46e5`:`#475569`,background:r?`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%)`:`transparent`,transition:`all 0.2s ease`},children:[(0,$.jsx)(`span`,{style:{fontSize:n>0?14:16,flexShrink:0,color:r?`#6366f1`:`#64748b`},children:i}),(0,$.jsx)(`span`,{style:{whiteSpace:`nowrap`},children:t.label})]},t.id)};return n.forEach(e=>{if((e.menu_type??e.menuType)===`group`){let n=(t[e.id]||[]).sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0));r.push((0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12,fontWeight:600,padding:`10px 14px 4px`,letterSpacing:.5,textTransform:`uppercase`},children:e.label}),n.map(e=>i(e,1))]},e.id))}else r.push(i(e))}),r})()}),(0,$.jsxs)(`div`,{onClick:()=>s(!0),style:{margin:`8px 12px`,padding:`12px 20px`,borderRadius:14,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8,color:`#ffffff`,fontSize:14,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%)`,e.currentTarget.style.transform=`translateY(-1px)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.5)`},onMouseLeave:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(99, 102, 241, 0.4)`},children:[(0,$.jsx)(gR,{style:{fontSize:16}}),(0,$.jsx)(`span`,{children:`充值积分`})]}),(0,$.jsx)(`div`,{style:{padding:`16px 16px`,flexShrink:0},children:(0,$.jsx)(kU,{menu:{items:ie,onClick:J},placement:`topRight`,arrow:!0,children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:12,padding:`10px 14px`,borderRadius:14,cursor:`pointer`,transition:`all 0.25s ease`,background:`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,boxShadow:`0 2px 12px rgba(0, 0, 0, 0.04)`},onMouseEnter:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #ffffff 0%, #f8fafc 100%)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0, 0, 0, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.background=`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,e.currentTarget.style.boxShadow=`0 2px 12px rgba(0, 0, 0, 0.04)`},children:[(0,$.jsx)(uT,{size:36,icon:(0,$.jsx)(K8,{}),style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,flexShrink:0,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`}}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsx)(`div`,{style:{color:`#1e293b`,fontSize:14,fontWeight:600,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,letterSpacing:-.01},children:n?.username}),(0,$.jsxs)(`div`,{style:{color:`#6366f1`,fontSize:12,fontWeight:500,letterSpacing:0,background:`rgba(99, 102, 241, 0.08)`,padding:`2px 8px`,borderRadius:6,display:`inline-block`},children:[`积分: `,n?.credits||0]})]})]})})})]}),(0,$.jsx)(`div`,{className:`desktop-content`,style:{marginLeft:q+28,marginRight:12,marginTop:16,marginBottom:16,flex:1,minHeight:`calc(100vh - 32px)`,background:`transparent`,padding:0,transition:`margin-left 0.25s ease`},children:(0,$.jsx)(`div`,{style:{boxSizing:`border-box`,height:`100%`,background:`#ffffffff`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,minHeight:`100%`,padding:`24px 32px 32px`,border:`1px solid rgba(0, 0, 0, 0.06)`},children:(0,$.jsx)(Ct,{})})}),(0,$.jsxs)(`div`,{className:`mobile-bottom-nav`,children:[d.filter(e=>(e.menu_type??e.menuType)!==`group`).map(t=>t.path?(0,$.jsxs)(`div`,{className:`nav-item ${t.path===K?`active`:``}`,onClick:()=>e(t.path),children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:t9[t.icon]||(0,$.jsx)(y3,{})}),(0,$.jsx)(`span`,{children:t.label})]},t.id):null),(0,$.jsxs)(`div`,{className:`nav-item`,onClick:se,children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:(0,$.jsx)(T6,{})}),(0,$.jsx)(`span`,{children:`充值`})]}),(0,$.jsxs)(`div`,{className:`nav-item`,onClick:oe,children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:(0,$.jsx)(B3,{})}),(0,$.jsx)(`span`,{children:`退出`})]})]}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(L3,{}),`修改密码`]}),open:i,onOk:ae,onCancel:()=>{a(!1),c.resetFields()},okText:`确认修改`,cancelText:`取消`,width:440,children:(0,$.jsxs)(xW,{form:c,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(xW.Item,{name:`oldPwd`,label:`原密码`,rules:[{required:!0,message:`请输入原密码`}],children:(0,$.jsx)(nK.Password,{placeholder:`请输入原密码`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(xW.Item,{name:`newPwd`,label:`新密码`,rules:[{required:!0,message:`请输入新密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(nK.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(xW.Item,{name:`confirmPwd`,label:`确认新密码`,rules:[{required:!0,message:`请再次输入新密码`},({getFieldValue:e})=>({validator(t,n){return!n||e(`newPwd`)===n?Promise.resolve():Promise.reject(Error(`两次密码不一致`))}})],children:(0,$.jsx)(nK.Password,{placeholder:`请再次输入新密码`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})})]})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(i3,{}),`积分充值`]}),open:o,onCancel:()=>{s(!1),u(null)},footer:null,width:680,children:(0,$.jsxs)(`div`,{style:{marginTop:16},children:[(0,$.jsxs)(DU,{style:{marginBottom:16},children:[(0,$.jsx)(Q8,{style:{color:`#6366f1`}}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,letterSpacing:0},children:`当前积分余额`}),(0,$.jsx)(Q.Text,{strong:!0,style:{color:`#6366f1`,fontSize:20,fontWeight:600},children:n?.credits??0})]}),(0,$.jsxs)(`div`,{style:{padding:`12px 16px`,background:`rgba(99, 102, 241, 0.06)`,borderRadius:10,marginBottom:16,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(T3,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13},children:`当前后台仅支持支付宝/微信扫码充值,如需转账支付请联系我们`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12,flexWrap:`wrap`},children:p.map((e,t)=>{let n=n9[t%n9.length],r=(e.credits||0)+(e.bonus_credits||e.bonusCredits||0);return(0,$.jsxs)(`div`,{onClick:()=>u(e.id),style:{flex:`1 1 45%`,minWidth:200,borderRadius:16,padding:`20px 16px`,background:l===e.id?`rgba(99,102,241,0.04)`:`#fafbff`,border:l===e.id?`2px solid #6366f1`:`1px solid #f0f0f5`,cursor:`pointer`,position:`relative`,transition:`all 0.2s`},children:[e.description&&(0,$.jsx)(T$,{color:`purple`,style:{position:`absolute`,top:-10,left:`50%`,transform:`translateX(-50%)`,borderRadius:8,fontSize:11},children:e.description}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:44,height:44,borderRadius:12,flexShrink:0,background:n.gradient,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:18,color:`#fff`,boxShadow:`0 6px 16px ${n.shadow}`},children:n.icon}),(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:6},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15},children:e.name}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[r.toLocaleString(),` 积分`]})]}),(0,$.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,marginTop:4,background:n.gradient,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:[`¥`,e.price]})]})]})]},e.id)})}),!z.alipay&&!z.wechat?(0,$.jsx)(`div`,{style:{marginTop:20,marginBottom:8,padding:16,background:`#fef2f2`,borderRadius:12,border:`1px solid #fecaca`},children:(0,$.jsx)(Q.Text,{style:{color:`#dc2626`,fontSize:13},children:`⚠️ 暂无可用的支付方式,请联系管理员开启支付功能`})}):(0,$.jsxs)(`div`,{style:{marginTop:20,marginBottom:8},children:[(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13,marginBottom:8,display:`block`},children:`选择支付方式`}),(0,$.jsxs)(LL.Group,{value:A,onChange:e=>j(e.target.value),style:{display:`flex`,gap:12},children:[z.alipay&&(0,$.jsxs)(LL.Button,{value:`alipay`,style:{flex:1,textAlign:`center`,borderRadius:10,height:44,lineHeight:`42px`,borderColor:A===`alipay`?`#1677ff`:void 0,color:A===`alipay`?`#1677ff`:void 0},children:[(0,$.jsx)(i2,{style:{fontSize:16,marginRight:6}}),`支付宝`]}),z.wechat&&(0,$.jsxs)(LL.Button,{value:`wechat`,style:{flex:1,textAlign:`center`,borderRadius:10,height:44,lineHeight:`42px`,borderColor:A===`wechat`?`#07c160`:void 0,color:A===`wechat`?`#07c160`:void 0},children:[(0,$.jsx)(i5,{style:{fontSize:16,marginRight:6}}),`微信支付`]})]})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:[(0,$.jsx)(vD,{size:`large`,onClick:()=>{s(!1),u(null)},style:{borderRadius:10,marginRight:12},children:`取消`}),(0,$.jsx)(vD,{type:`primary`,size:`large`,disabled:!l||!z.alipay&&!z.wechat,loading:M,onClick:async()=>{let e=p.find(e=>e.id===l);if(!e)return;let t=(e.credits||0)+(e.bonus_credits||e.bonusCredits||0);try{N(!0);let n=await i7(e.id,A),r=n.qrUrl||n.codeUrl||n.qr_code||n.code_url;(n.paymentMethod===`alipay`||n.paymentMethod===`wechat`)&&r?(k({price:e.price,credits:t,qrCode:r,method:n.paymentMethod}),s(!1),D(!0),R.current=n.orderNo,localStorage.setItem(re,JSON.stringify({orderNo:n.orderNo,price:e.price,credits:t,qrCode:r,method:n.paymentMethod,createdAt:n.createdAt||new Date().toISOString(),timeoutSeconds:180})),ue(n.orderNo)):(Z.success(`充值成功!积分已到账`),$7.getState().refreshUser(),s(!1),u(null))}catch(e){Z.error(e?.message||`创建订单失败,请重试`)}finally{N(!1)}},style:{borderRadius:10,fontWeight:600,background:l?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#d1d5db`,border:`none`,boxShadow:l?`0 8px 24px rgba(99,102,241,0.3)`:`none`},children:`确认充值`})]})]})}),(0,$.jsx)(Pq,{open:E,onCancel:async()=>{if(le(),R.current){try{await s7(R.current)}catch{}R.current=null}localStorage.removeItem(re),D(!1),k(null)},footer:null,width:400,closable:!1,styles:{body:{padding:0,borderRadius:16,overflow:`hidden`}},children:(0,$.jsxs)(`div`,{style:{padding:`24px`},children:[(0,$.jsxs)(`div`,{style:{textAlign:`center`,marginBottom:24},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,background:O?.method===`alipay`?`linear-gradient(135deg, #1677ff, #0958d9)`:`linear-gradient(135deg, #07c160, #06ae56)`,borderRadius:16,display:`flex`,alignItems:`center`,justifyContent:`center`,margin:`0 auto 12px`},children:O?.method===`alipay`?(0,$.jsx)(i2,{style:{fontSize:24,color:`#fff`}}):(0,$.jsx)(i5,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:O?.method===`alipay`?`支付宝支付`:`微信支付`}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:O?.method===`alipay`?`请使用支付宝扫描二维码完成支付`:`请使用微信扫描二维码完成支付`})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:16,padding:20,display:`flex`,flexDirection:`column`,alignItems:`center`,boxShadow:`0 4px 20px rgba(0,0,0,0.08)`},children:[(0,$.jsx)(`div`,{style:{width:180,height:180,borderRadius:12,overflow:`hidden`,background:`#fff`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:O&&(0,$.jsx)(t2,{value:O.qrCode,size:160,level:`M`,includeMargin:!1})}),(0,$.jsxs)(`div`,{style:{marginTop:16,textAlign:`center`},children:[(0,$.jsxs)(`div`,{style:{fontSize:28,fontWeight:700,color:`#1a1a2e`},children:[`¥`,O?.price||0]}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`,marginTop:4},children:[`购买 `,O?.credits||0,` 积分`]}),(0,$.jsx)(`div`,{style:{marginTop:12,padding:`8px 16px`,background:P<=30?`#fef2f2`:`#f0f9ff`,borderRadius:8,border:P<=30?`1px solid #fecaca`:`1px solid #bae6fd`,display:`inline-block`},children:(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:P<=30?`#dc2626`:`#0284c7`},children:[`订单将在 `,(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:800},children:P}),` 秒后关闭`]})})]})]}),(0,$.jsx)(`div`,{style:{marginTop:20,padding:16,background:`#fef3c7`,borderRadius:12},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:8},children:[(0,$.jsx)(`div`,{style:{fontSize:16,marginTop:-2},children:`💡`}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#92400e`},children:[(0,$.jsx)(`div`,{style:{fontWeight:500,marginBottom:4},children:`支付提示`}),(0,$.jsxs)(`ul`,{style:{margin:0,paddingLeft:16},children:[(0,$.jsx)(`li`,{style:{marginBottom:2},children:`请在支付后等待页面自动跳转`}),(0,$.jsx)(`li`,{children:`如支付成功但未到账,请联系客服`})]})]})]})}),(0,$.jsx)(`div`,{style:{marginTop:20},children:(0,$.jsx)(vD,{size:`large`,block:!0,onClick:async()=>{if(le(),R.current){try{await s7(R.current)}catch{}R.current=null}localStorage.removeItem(re),D(!1),k(null),u(null)},style:{borderRadius:10},children:`取消支付`})})]})}),(0,$.jsx)(cte,{}),(0,$.jsx)(`div`,{style:{position:`fixed`,right:24,bottom:24,zIndex:1e3},children:(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:64,bottom:8,padding:`8px 16px`,background:`#1e293b`,color:`#ffffff`,borderRadius:8,fontSize:13,whiteSpace:`nowrap`,opacity:+!!ee,transition:`opacity 0.2s ease`,pointerEvents:`none`},children:`联系我们`}),(0,$.jsx)(`button`,{onClick:()=>H(!0),style:{width:56,height:56,borderRadius:`50%`,border:`none`,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,color:`#ffffff`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.05)`,e.currentTarget.style.boxShadow=`0 6px 24px rgba(99, 102, 241, 0.5)`,te(!0)},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.4)`,te(!1)},children:(0,$.jsx)(Y3,{style:{fontSize:20}})})]})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(Y3,{}),`联系我们`]}),open:V,onCancel:()=>{H(!1),U.resetFields()},footer:null,width:480,children:(0,$.jsxs)(`div`,{style:{marginTop:8},children:[(0,$.jsxs)(xW,{form:U,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`name`,label:`姓名`,rules:[{required:!0,message:`请输入姓名`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的姓名`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`phone`,label:`手机号`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1[3-9]\d{9}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的手机号`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`companyName`,label:`公司名称`,rules:[{required:!0,message:`请输入公司名称`}],children:(0,$.jsx)(nK,{placeholder:`请输入公司名称`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`industry`,label:`您的行业`,rules:[{required:!0,message:`请输入您的行业`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的行业`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`message`,label:`留言(选填)`,children:(0,$.jsx)(nK.TextArea,{placeholder:`请输入您的需求或问题`,rows:3,style:{borderRadius:10}})})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,display:`flex`,gap:12},children:[(0,$.jsx)(vD,{size:`large`,onClick:()=>{H(!1),U.resetFields()},style:{borderRadius:10,flex:1},children:`取消`}),(0,$.jsx)(vD,{type:`primary`,size:`large`,onClick:ce,loading:ne,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,flex:1},children:`提交`})]})]})})]})},dte=`http://localhost:8000/api`,fte=()=>{let{checkAuth:e}=$7(),[t,n]=(0,S.useState)(!1),[r,i]=(0,S.useState)(`password`),[a,o]=(0,S.useState)(`password`),[s,c]=(0,S.useState)(0),[l,u]=(0,S.useState)(0),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(!1),[_,v]=(0,S.useState)(!1),[y,b]=(0,S.useState)(0),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),E=(()=>{try{let e=localStorage.getItem(`siteInfo`);if(e){let t=JSON.parse(e);return{siteName:t.siteName||`VideoGen.AI`,siteLogo:t.siteLogo||``}}}catch{}return{siteName:`VideoGen.AI`,siteLogo:``}})(),[D,O]=(0,S.useState)(E.siteName),[k,A]=(0,S.useState)(E.siteLogo),[j,M]=(0,S.useState)(``),[N,P]=(0,S.useState)(``),F=Je(),{login:I}=$7(),[L]=xW.useForm(),[R]=xW.useForm(),[z]=xW.useForm();(0,S.useEffect)(()=>{q5().then(e=>{O(e.siteName),A(e.siteLogo),M(e.userAgreementUrl),P(e.privacyPolicyUrl)}).catch(()=>{})},[]);let B=()=>d?!0:(Z.warning(`请先阅读并同意用户协议和隐私政策`),!1),V=async()=>{if(B())try{let t=await L.validateFields();await I(t.phone,t.password,void 0,t.rememberMe),Z.success(`登录成功,欢迎回来`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}},H=async()=>{if(B())try{let t=R.getFieldsValue();if(!t.phone||!t.code){Z.error(`请填写手机号和验证码`);return}n(!0),await j5(t.phone,t.code),Z.success(`登录成功,欢迎回来`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}finally{n(!1)}},U=async()=>{if(B())try{let t=await z.validateFields();n(!0),await M5(t.phone,t.regCode,t.password),Z.success(`注册成功`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`注册失败`;Z.error(t)}finally{n(!1)}},ee=(e,t)=>{e(60);let n=setInterval(()=>{e(e=>e<=1?(clearInterval(n),m(!1),t?C(!0):T(!0),0):e-1)},1e3)};(0,S.useEffect)(()=>{s===0&&r===`phone`&&v(!1)},[s,r]);let te=async(e,t)=>{try{if(!e||!/^1\d{10}$/.test(e)){Z.error(`请输入正确的手机号`);return}if(t){m(!0),g(!1);return}if(!_){m(!0),v(!1);return}let n=``;n=r===`register`?`register`:`login`,await X5(e,n),ee(t?u:c),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(g(!1),u(0)):(v(!1),c(0)),b(e=>e+1)}},ne=async(e=!1)=>{let t=r===`register`?z.getFieldValue(`phone`):R.getFieldValue(`phone`);try{let e=``;e=r===`register`?`register`:`login`,await X5(t,e),r===`register`?(g(!0),ee(u,!0)):(v(!0),ee(c,!1)),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(g(!1),u(0),C(!0)):(v(!1),c(0),T(!0)),b(e=>e+1)}},W=e=>{o(e),i(e),c(0),u(0),v(!1),g(!1),m(!1),C(!1),T(!1),b(e=>e+1),e===`password`?L.resetFields():R.resetFields()},re=[{icon:(0,$.jsx)(U2,{}),title:`AI 智能优化`,desc:`输入原始提示词,AI 自动为您生成专业级视频、图片描述`},{icon:(0,$.jsx)(S6,{}),title:`一键生成视频、图片`,desc:`支持多种规格生成视频、图片`},{icon:(0,$.jsx)(g3,{}),title:`项目维度管理`,desc:`按项目行业分类视频、图片,支持多种行业`}],G={background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,height:48,borderRadius:10,fontSize:14},K=e=>{e&&window.open(`${dte.replace(/\/api$/,``)}${e}`,`_blank`)};return(0,$.jsxs)(`div`,{style:{minHeight:`100vh`,display:`flex`,backgroundImage:`url(/backimage.png)`,backgroundSize:`cover`,backgroundPosition:`center`,backgroundRepeat:`no-repeat`,backgroundAttachment:`fixed`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(135deg, rgba(240,244,255,0.9) 0%, rgba(232,236,248,0.85) 40%, rgba(240,240,255,0.9) 70%, rgba(248,249,255,0.95) 100%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,width:500,height:500,borderRadius:`50%`,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,top:-150,right:-100,filter:`blur(40px)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,width:400,height:400,borderRadius:`50%`,background:`radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%)`,bottom:-100,left:-80,filter:`blur(50px)`}}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`center`,padding:`0 80px`,zIndex:1},children:(0,$.jsxs)(DU,{direction:`vertical`,size:36,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:20},children:[k?(0,$.jsx)(`img`,{src:k,alt:`logo`,style:{width:52,height:52,borderRadius:14,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:(0,$.jsx)(j8,{style:{fontSize:26,color:`#fff`}})}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:28,fontWeight:800,letterSpacing:-.5},children:D})]}),(0,$.jsx)(`div`,{className:`shiny-text-container`,children:(0,$.jsx)(`span`,{className:`shiny-text`,children:`AI赋能创意,素材触手可及`})}),(0,$.jsxs)(Q.Paragraph,{style:{color:`#64748b`,fontSize:17,maxWidth:480,lineHeight:1.8},children:[`专业的 AI 素材生成平台,通过智能提示词优化,`,(0,$.jsx)(`br`,{}),`让您的创意快速转化为精美视频、图片`]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:20},children:re.map((e,t)=>(0,$.jsxs)(`div`,{className:`electric-border-card`,style:{position:`relative`,display:`flex`,gap:16,alignItems:`flex-start`,padding:`18px 22px`,borderRadius:14,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(12px)`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{className:`electric-border`}),(0,$.jsx)(`div`,{className:`electric-border-inner`}),(0,$.jsx)(`div`,{style:{position:`relative`,zIndex:1},children:(0,$.jsx)(`div`,{style:{width:44,height:44,borderRadius:12,flexShrink:0,background:`linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15))`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#6366f1`,fontSize:20},children:e.icon})}),(0,$.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,$.jsx)(Q.Text,{style:{color:`#1e293b`,fontSize:15,fontWeight:600,display:`block`,marginBottom:4},children:e.title}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13,lineHeight:1.6},children:e.desc})]})]},t))})]})}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1,padding:`40px 24px`},children:(0,$.jsxs)(Oz,{style:{width:440,maxWidth:`100%`,borderRadius:20,boxShadow:`0 20px 60px rgba(0,0,0,0.08)`,border:`1px solid #e2e8f0`,background:`#fff`},styles:{body:{padding:`36px 28px`}},children:[(0,$.jsx)(Q.Title,{level:3,style:{textAlign:`center`,marginBottom:6,color:`#1e293b`,fontWeight:700},children:r===`register`?`创建账号`:`欢迎回来`}),(0,$.jsx)(Q.Text,{style:{display:`block`,textAlign:`center`,marginBottom:28,color:`#94a3b8`,fontSize:14},children:r===`register`?`注册新账号,开始创作视频`:`登录您的账号,开始创作视频`}),r!==`register`&&(0,$.jsx)(`div`,{style:{display:`flex`,gap:0,marginBottom:24,background:`#f1f5f9`,borderRadius:10,padding:4,border:`1px solid #e2e8f0`},children:[`password`,`phone`].map(e=>(0,$.jsx)(`div`,{onClick:()=>W(e),style:{flex:1,textAlign:`center`,padding:`10px 0`,borderRadius:8,cursor:`pointer`,fontSize:14,fontWeight:a===e?600:400,color:a===e?`#6366f1`:`#64748b`,background:a===e?`#fff`:`transparent`,border:a===e?`1px solid rgba(99,102,241,0.2)`:`1px solid transparent`,boxShadow:a===e?`0 2px 8px rgba(99,102,241,0.1)`:`none`,transition:`all 0.3s ease`},children:e===`password`?`密码登录`:`验证码登录`},e))}),r===`password`&&(0,$.jsxs)(xW,{form:L,size:`large`,layout:`vertical`,onFinish:V,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,style:G})}),(0,$.jsx)(xW.Item,{name:`password`,rules:[{required:!0,message:`请输入密码`}],children:(0,$.jsx)(nK.Password,{prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入密码`,style:G})}),(0,$.jsx)(xW.Item,{name:`rememberMe`,valuePropName:`checked`,style:{marginBottom:12},children:(0,$.jsx)(aV,{children:`记住我的登录状态`})}),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,htmlType:`submit`,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登 录`})})]}),r===`phone`&&(0,$.jsxs)(xW,{form:R,size:`large`,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:G})}),(0,$.jsx)(xW.Item,{name:`code`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(DU.Compact,{style:{width:`100%`},children:[(0,$.jsx)(nK,{prefix:(0,$.jsx)(B6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!_,style:{...G,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(vD,{disabled:s>0,onClick:()=>{w?(v(!1),m(!0),b(e=>e+1)):te(R.getFieldValue(`phone`))},style:{height:48,borderRadius:`0 10px 10px 0`,background:s>0||_?`#f1f5f9`:`rgba(99,102,241,0.1)`,border:`1.5px solid #e2e8f0`,borderLeft:`none`,color:s>0?`#94a3b8`:`#6366f1`,fontWeight:600,minWidth:100},children:s>0?`${s}s`:w?`重新发送`:`获取验证码`})]})}),p&&(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(r9,{onSuccess:ne,isVerified:_})},y),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,onClick:H,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登 录`})})]}),r===`register`&&(0,$.jsxs)(xW,{form:z,size:`large`,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:G})}),(0,$.jsx)(xW.Item,{name:`regCode`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(DU.Compact,{style:{width:`100%`},children:[(0,$.jsx)(nK,{prefix:(0,$.jsx)(B6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!h,style:{...G,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(vD,{disabled:l>0,onClick:()=>{x?(g(!1),m(!0),b(e=>e+1)):te(z.getFieldValue(`phone`),!0)},style:{height:48,borderRadius:`0 10px 10px 0`,background:l>0||h?`#f1f5f9`:`rgba(99,102,241,0.1)`,border:`1.5px solid #e2e8f0`,borderLeft:`none`,color:l>0?`#94a3b8`:`#6366f1`,fontWeight:600,minWidth:100},children:l>0?`${l}s`:x?`重新发送`:`获取验证码`})]})}),p&&(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(r9,{onSuccess:ne,isVerified:h})},y),(0,$.jsx)(xW.Item,{name:`password`,rules:[{required:!0,message:`请设置密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(nK.Password,{prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请设置密码(至少6位)`,style:G})}),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,onClick:U,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`注 册`})})]}),(0,$.jsx)(`div`,{style:{marginBottom:16},children:(0,$.jsx)(aV,{checked:d,onChange:e=>f(e.target.checked),children:(0,$.jsxs)(`span`,{style:{fontSize:13,color:`#64748b`},children:[`我已阅读并同意`,(0,$.jsx)(`span`,{onClick:e=>{e.stopPropagation(),K(j)},style:{color:`#6366f1`,cursor:`pointer`},children:`《用户协议》`}),`和`,(0,$.jsx)(`span`,{onClick:e=>{e.stopPropagation(),K(N)},style:{color:`#6366f1`,cursor:`pointer`},children:`《隐私政策》`})]})})}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:r===`register`?(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#6366f1`,cursor:`pointer`},onClick:()=>{i(`password`),o(`password`),C(!1),T(!1),g(!1),m(!1),b(e=>e+1),z.resetFields()},children:`已有账号?去登录`}):(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#6366f1`,cursor:`pointer`},onClick:()=>{i(`register`),C(!1),T(!1),g(!1),m(!1),b(e=>e+1)},children:`没有账号?立即注册`})})]})})]})},r9=({onSuccess:e,isVerified:t})=>{let n=S.useRef(null),r=S.useRef(null),i=S.useRef(null),a=S.useRef(0),o=S.useRef(!1),[s,c]=S.useState(360),l=s-50;S.useEffect(()=>{let e=()=>{if(n.current){let e=n.current.offsetWidth;e>0&&c(e)}};e();let t=new ResizeObserver(e);return n.current&&t.observe(n.current),window.addEventListener(`resize`,e),()=>{t.disconnect(),window.removeEventListener(`resize`,e)}},[]);let u=n=>{if(o.current||t)return;let c=Math.max(0,Math.min(n,l));a.current=c,r.current&&(r.current.style.left=`${c}px`),i.current&&(i.current.style.width=`${c+50}px`),c>=l-5&&(o.current=!0,r.current&&(r.current.style.background=`#22c55e`,r.current.innerHTML=``),i.current&&(i.current.style.width=`${s}px`,i.current.style.background=`#dcfce7`),e())};return(0,$.jsxs)(`div`,{ref:n,onMouseDown:e=>{if(e.preventDefault(),o.current||t)return;let s=n.current;if(!s)return;let c=s.getBoundingClientRect(),d=e=>{u(e.clientX-c.left-50/2)},f=()=>{document.removeEventListener(`mousemove`,d),document.removeEventListener(`mouseup`,f),!o.current&&a.current({page:1,pageSize:10,total:0,items:[]}),i9=p5((e,t)=>({projects:[],records:pte(),loading:!1,mediaType:`image`,countType:`请选择`,selectedRatio:`1:1`,selectedResolution:`2K`,width:2048,height:2048,videoDuration:5,videoAspectRatio:`16:9`,videoResolution:`720p`,engineOptions:{ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]},enginesele:[],fetchProjects:async()=>{e({loading:!0});try{e({projects:await I5(),loading:!1})}catch{e({loading:!1})}},createProject:async(n,r)=>{let i=await L5(n,r);return e({projects:[i,...t().projects]}),i},deleteProject:async n=>{await R5(n),e({projects:t().projects.filter(e=>e.id!==n)})},fetchRecords:async(t={})=>{e({loading:!0});try{e({records:await z5(t),loading:!1})}catch{e({loading:!1})}},optimizePrompt:async(n,r)=>{let i=await B5(n,r);try{await $7.getState().checkAuth()}catch{}let a=t().records;return e({records:{...a,total:a.total+1,items:[i.record,...a.items]}}),i},generateVideo:async(n,r)=>{let i=await G5(n,r);try{await $7.getState().checkAuth()}catch{}let a=t().records;return e({records:{...a,items:a.items.map(e=>e.id===n?i:e)}}),i},updateRecordReferences:(n,r)=>{let i=t().records;e({records:{...i,items:i.items.map(e=>e.id===n?{...e,references:r}:e)}})},setMediaType:t=>e({mediaType:t}),setCountType:t=>e({countType:t}),setImageSettings:(t,n,r,i)=>e({selectedRatio:t,selectedResolution:n,width:r,height:i}),setVideoSettings:(t,n,r)=>e({videoDuration:t,videoAspectRatio:n,videoResolution:r}),setEngineOptions:t=>e({engineOptions:t}),setSelectedRatio:t=>e({selectedRatio:t}),setSelectedResolution:t=>e({selectedResolution:t}),setWidth:t=>e({width:t}),setHeight:t=>e({height:t}),setVideoDuration:t=>e({videoDuration:t}),setVideoAspectRatio:t=>e({videoAspectRatio:t}),setVideoResolution:t=>e({videoResolution:t}),setEnginesele:t=>e({enginesele:t}),resetGenerationConfig:()=>e({mediaType:`image`,countType:`请选择`,selectedRatio:`1:1`,selectedResolution:`2K`,width:2048,height:2048,videoDuration:5,videoAspectRatio:`16:9`,videoResolution:`720p`,engineOptions:{ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]},enginesele:[]})}));function a9(e){if(!e)return`-`;let t=e.trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);return n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``),t.replace(`T`,` `).slice(0,16)}var o9=[`#f97316`,`#3b82f6`,`#8b5cf6`,`#10b981`,`#eab308`,`#6366f1`,`#ef4444`,`#06b6d4`,`#64748b`,`#78716c`],s9={ShoppingCartOutlined:(0,$.jsx)(Q6,{}),BookOutlined:(0,$.jsx)(L2,{}),HomeOutlined:(0,$.jsx)(y3,{}),FireOutlined:(0,$.jsx)(Q4,{}),RocketOutlined:(0,$.jsx)(L6,{}),SkinOutlined:(0,$.jsx)(s8,{}),CompassOutlined:(0,$.jsx)(T4,{}),HeartOutlined:(0,$.jsx)(u3,{}),CarOutlined:(0,$.jsx)(Q2,{}),CameraOutlined:(0,$.jsx)(Y2,{}),CloudOutlined:(0,$.jsx)(u4,{}),StarOutlined:(0,$.jsx)(y8,{}),TrophyOutlined:(0,$.jsx)(L8,{}),ThunderboltOutlined:(0,$.jsx)(j8,{}),BulbOutlined:(0,$.jsx)(U2,{}),CoffeeOutlined:(0,$.jsx)(S4,{}),CrownOutlined:(0,$.jsx)(j4,{}),DashboardOutlined:(0,$.jsx)(P4,{}),FlagOutlined:(0,$.jsx)(t3,{}),GlobalOutlined:(0,$.jsx)(s3,{}),GiftOutlined:(0,$.jsx)(i3,{}),LaptopOutlined:(0,$.jsx)(O3,{}),MobileOutlined:(0,$.jsx)(Q3,{}),MonitorOutlined:(0,$.jsx)(t6,{}),PayCircleOutlined:(0,$.jsx)(s6,{}),PictureOutlined:(0,$.jsx)(p6,{}),PlayCircleOutlined:(0,$.jsx)(S6,{}),SafetyOutlined:(0,$.jsx)(B6,{}),ShoppingOutlined:(0,$.jsx)(t8,{}),SmileOutlined:(0,$.jsx)(u8,{}),SoundOutlined:(0,$.jsx)(g8,{}),TagOutlined:(0,$.jsx)(T8,{}),TeamOutlined:(0,$.jsx)(O8,{}),ToolOutlined:(0,$.jsx)(P8,{}),TruckOutlined:(0,$.jsx)(B8,{}),VideoCameraOutlined:(0,$.jsx)(Y8,{}),WalletOutlined:(0,$.jsx)(Q8,{}),BankOutlined:(0,$.jsx)(O2,{}),BuildOutlined:(0,$.jsx)(B2,{}),ExperimentOutlined:(0,$.jsx)(U4,{}),HighlightOutlined:(0,$.jsx)(p3,{}),IdcardOutlined:(0,$.jsx)(S3,{}),MedicineBoxOutlined:(0,$.jsx)(K3,{}),ReadOutlined:(0,$.jsx)(O6,{}),RestOutlined:(0,$.jsx)(j6,{}),SketchOutlined:(0,$.jsx)(i8,{}),SolutionOutlined:(0,$.jsx)(p8,{})},mte=()=>{let[e,t]=(0,S.useState)(!1),[n]=xW.useForm(),r=Je(),{projects:i,fetchProjects:a,createProject:o,deleteProject:s}=i9(),[c,l]=(0,S.useState)([]);(0,S.useEffect)(()=>{a(),e7().then(l).catch(()=>{})},[]);let u=Object.fromEntries(c.map((e,t)=>[e.key,{label:e.label,color:o9[t%o9.length],icon:e.icon||`AppstoreOutlined`}]));return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`22px 24px`,borderRadius:16,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-20,top:-20,width:200,height:200,borderRadius:`50%`,background:`rgba(255,255,255,0.08)`}}),(0,$.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,$.jsx)(Q.Title,{level:3,style:{margin:`0 0 4px`,color:`#fff`,fontWeight:700},children:`我的项目`}),(0,$.jsxs)(Q.Text,{style:{color:`rgba(255,255,255,0.7)`,fontSize:14},children:[`共 `,i.length,` 个项目 · 按行业分类管理`]})]}),(0,$.jsx)(vD,{icon:(0,$.jsx)(gR,{}),onClick:()=>t(!0),size:`large`,style:{background:`rgba(255,255,255,0.15)`,border:`1px solid rgba(255,255,255,0.3)`,color:`#fff`,fontWeight:600,backdropFilter:`blur(10px)`,borderRadius:10,height:42},children:`新建项目`})]}),i.length===0?(0,$.jsx)(NC,{image:NC.PRESENTED_IMAGE_SIMPLE,description:`还没有项目,创建您的第一个视频项目`,style:{padding:`60px 0`},children:(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(gR,{}),onClick:()=>t(!0),size:`large`,children:`创建第一个项目`})}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},className:`stagger-children`,children:i.map((e,t)=>(0,$.jsxs)(`div`,{className:`project-card project-item animate-slideInCard`,onClick:()=>r(`/projects/${e.id}/generate`),style:{display:`flex`,alignItems:`center`,padding:`18px 22px`,borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,animationDelay:`${t*.06}s`},children:[(0,$.jsx)(`div`,{style:{width:50,height:50,borderRadius:14,flexShrink:0,background:`${u[e.industry]?.color||`#64748b`}12`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:24,marginRight:16,color:u[e.industry]?.color||`#64748b`},children:s9[u[e.industry]?.icon]||(0,$.jsx)(u2,{})}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4,flexWrap:`wrap`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1a1a2e`},children:e.name}),(0,$.jsx)(T$,{color:u[e.industry]?.color||`#64748b`,style:{borderRadius:6,margin:0},children:u[e.industry]?.label||e.industry})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(TH,{style:{fontSize:12,color:`#94a3b8`}}),(0,$.jsxs)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:12,color:`#94a3b8`},children:[`创建于 `,a9(e.createdAt)]})]})]}),(0,$.jsxs)(`div`,{className:`project-actions`,style:{display:`flex`,alignItems:`center`,gap:8,marginLeft:16},children:[(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(S6,{}),onClick:t=>{t.stopPropagation(),r(`/projects/${e.id}/generate`)},style:{background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,borderRadius:10,fontWeight:600,height:36,boxShadow:`0 4px 12px rgba(99,102,241,0.25)`},children:`生成`}),(0,$.jsx)(Rq,{title:`确定删除该项目?`,description:`项目下的生成记录将一并删除`,onConfirm:async t=>{t?.stopPropagation(),await s(e.id),Z.success(`项目已删除`)},onCancel:e=>e?.stopPropagation(),children:(0,$.jsx)(vD,{danger:!0,icon:(0,$.jsx)(O$,{}),onClick:e=>e.stopPropagation(),style:{borderRadius:10,height:36,background:`rgba(239,68,68,0.06)`,border:`1px solid rgba(239,68,68,0.15)`,color:`#ef4444`}})}),(0,$.jsx)(Ug,{className:`mobile-hide`,style:{color:`#cbd5e1`,fontSize:12}})]})]},e.id))}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(u2,{}),`新建项目`]}),open:e,onOk:async()=>{try{let e=await n.validateFields(),i=await o(e.name,e.industry);Z.success(`项目创建成功`),t(!1),n.resetFields(),r(`/projects/${i.id}/generate`)}catch{}},onCancel:()=>{t(!1),n.resetFields()},okText:`创建`,cancelText:`取消`,width:480,children:(0,$.jsxs)(xW,{form:n,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(xW.Item,{name:`name`,label:`项目名称`,rules:[{required:!0,message:`请输入项目名称`}],children:(0,$.jsx)(nK,{placeholder:`例如:618电商大促宣传片`,prefix:(0,$.jsx)(xZ,{}),size:`large`})}),(0,$.jsx)(xW.Item,{name:`industry`,label:`所属行业`,rules:[{required:!0,message:`请选择行业`}],children:(0,$.jsx)(lw,{placeholder:`选择项目所属行业`,size:`large`,children:c.map((e,t)=>(0,$.jsx)(lw.Option,{value:e.key,children:(0,$.jsxs)(DU,{children:[s9[e.icon]||(0,$.jsx)(u2,{}),` `,e.label]})},e.key))})})]})})]})};function hte(){if(typeof crypto<`u`&&typeof crypto.randomUUID==`function`)return crypto.randomUUID();if(typeof crypto<`u`&&typeof crypto.getRandomValues==`function`){let e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}return`${Date.now().toString(16).padStart(12,`0`)}-${Math.random().toString(16).slice(2,10).padStart(8,`0`)}-4xxx-yxxx-${Math.random().toString(16).slice(2,12)}`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}var c9=({src:e,width:t=48,height:n=48})=>{let[r,i]=(0,S.useState)(null),[a,o]=(0,S.useState)(null);return(0,S.useEffect)(()=>{let r=document.createElement(`video`);r.muted=!0,r.preload=`metadata`,r.crossOrigin=`anonymous`;let a=()=>{o(r.duration),r.currentTime=Math.min(1,r.duration*.1)},s=()=>{try{let e=document.createElement(`canvas`);e.width=t*2,e.height=n*2;let a=e.getContext(`2d`);a&&(a.drawImage(r,0,0,e.width,e.height),i(e.toDataURL(`image/jpeg`,.7)))}catch{}};return r.addEventListener(`loadedmetadata`,a),r.addEventListener(`seeked`,s),r.src=e,()=>{r.removeEventListener(`loadedmetadata`,a),r.removeEventListener(`seeked`,s)}},[e,t,n]),(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`,background:`#1a1a2e`},children:[r?(0,$.jsx)(`img`,{src:r,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(S6,{style:{color:`#fff`,fontSize:18}})}),a!=null&&(0,$.jsx)(`span`,{style:{position:`absolute`,bottom:2,right:2,fontSize:9,color:`#fff`,background:`rgba(0,0,0,0.6)`,borderRadius:4,padding:`1px 4px`,lineHeight:1.3},children:(e=>`${Math.round(e)}s`)(a)})]})},gte=()=>{let{projectId:e}=Qe(),t=Je(),[n]=xW.useForm(),{projects:r,records:i,fetchProjects:a,fetchRecords:o,optimizePrompt:s,generateVideo:c}=i9(),l=i.items,{user:u}=$7(),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(null),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(!1),[x,C]=(0,S.useState)({}),[w,T]=(0,S.useState)({}),[E,D]=(0,S.useState)({}),[O,k]=(0,S.useState)(null),[A,j]=(0,S.useState)(null),[M,N]=(0,S.useState)([]),[P,F]=(0,S.useState)(!1),[I,L]=(0,S.useState)(``),[R,z]=(0,S.useState)(!1),[B,V]=(0,S.useState)(``),H=(0,S.useRef)(null),[U,ee]=(0,S.useState)({}),[te,ne]=(0,S.useState)({}),[W,re]=(0,S.useState)({}),[G,K]=(0,S.useState)(null),[q,ie]=(0,S.useState)({}),[J,ae]=(0,S.useState)(null),[oe,se]=(0,S.useState)(5),[ce,le]=(0,S.useState)(`16:9`),[ue,de]=(0,S.useState)(`720p`),[fe,pe]=(0,S.useState)(null),[me,he]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`720p`,`1080p`],durations:[5,8,10,12,15]}),[ge,_e]=(0,S.useState)(0),[ve,ye]=(0,S.useState)(0),[be,xe]=(0,S.useState)(`image`),[Se,Ce]=(0,S.useState)(`1:1`),[we,Te]=(0,S.useState)(`2K`),[Ee,De]=(0,S.useState)(2048),[Oe,ke]=(0,S.useState)(2048),[Ae,je]=(0,S.useState)(!1),[Me,Ne]=(0,S.useState)([]),[Pe,Fe]=(0,S.useState)([]);(0,S.useEffect)(()=>{if(c7().then(e=>{Ne(e.video),Fe(e.image)}),!Ae)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&je(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[Ae]);let Ie=(e,t)=>{for(let n=0;n{let t=e===`2k`?`2048`:e===`4k`?`4096`:e;for(let e=0;e{qe(e)},ze=e=>{Xe(parseInt(e))},[Be,Ve]=(0,S.useState)([]),[He,Ue]=(0,S.useState)([]),[We,Ge]=(0,S.useState)([]),[Ke,qe]=(0,S.useState)(0),[Ye,Xe]=(0,S.useState)(0);(0,S.useEffect)(()=>{We[Ye]&&We[Ye][Ke]!==void 0&&(De(We[Ye][Ke].substring(0,4)),ke(We[Ye][Ke].substring(5)))},[Ke]),(0,S.useEffect)(()=>{We[Ye]&&We[Ye][Ke]!==void 0&&(De(We[Ye][Ke].substring(0,4)),ke(We[Ye][Ke].substring(5)))},[Ye]);let Ze=()=>{De(Oe),ke(Ee)},$e=e=>{xe(e.target.value===`image`?`image`:`video`)};(0,S.useEffect)(()=>{e7().then(e=>{ee(Object.fromEntries(e.map(e=>[e.key,e.label]))),ne(Object.fromEntries(e.map(e=>[e.key,e.optionGroups||[]])))}).catch(()=>{}),Y5().then(e=>{let t=e.items?.[0]?.supportedSizes||{},n=[],r=[],i=[];for(let e in t[`2K`])n.push(e),r.push(t[`2K`][e]);n.forEach((e,t)=>{Ve(n=>[...n,{value:e,label:String(t)}])});for(let e in t[`4K`])i.push(t[`4K`][e]);Ge([r,i]);let a=[];for(let e in t)a.push(e);a.forEach((e,t)=>{Ue(n=>[...n,{value:e,label:String(t)}])})}).catch(()=>{}),J5().then(e=>{if(e.items?.length){let t=e.items[0];he({ratios:t.supportedRatios?.length?t.supportedRatios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions?.length?t.supportedResolutions:[`720p`,`1080p`],durations:t.supportedDurations?.length?t.supportedDurations:[5,8,10,12,15]})}}).catch(()=>{})},[]),(0,S.useEffect)(()=>{a(),o({projectId:e,page:1,pageSize:100})},[e,a,o]);let et=(0,S.useRef)(!1);(0,S.useEffect)(()=>{et.current||l.length===0||(et.current=!0,console.log(`aaaa`,l),l.forEach(t=>{t.projectId===e&&t.status===`generating`&&(T(e=>({...e,[t.id]:`generating`})),Dt(t.id)),t.projectId===e&&t.status===`optimizing`&&ct(t.id)}))},[l,e]);let tt=(0,S.useRef)(new Set),nt=(0,S.useRef)(null),rt=(0,S.useRef)(null),it=e=>{tt.current.add(e),st()},at=e=>{tt.current.delete(e),tt.current.size===0&&ot()},ot=()=>{nt.current&&=(clearInterval(nt.current),null),rt.current&&=(rt.current.abort(),null)},st=()=>{nt.current||=setInterval(async()=>{try{rt.current&&rt.current.abort();let t=new AbortController;rt.current=t;let n=await z5({projectId:e,page:1,pageSize:100,signal:t.signal});rt.current=null;let r=Array.from(tt.current),i=[];if(r.length>0){let e=i9.getState().records,t=e.items.map(e=>{if(r.includes(e.id)){let t=n.items.find(t=>t.id===e.id);if(t)return t.status!==`optimizing`&&i.push(e.id),t}return e});i9.setState({records:{...e,items:t}}),i.forEach(e=>{at(e)})}}catch(e){e.name!==`AbortError`&&console.error(`Optimizing polling error:`,e)}},3e3)},ct=e=>{it(e)},lt=(0,S.useRef)(!1),ut=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(lt.current||l.length===0)return;let t=localStorage.getItem(`pending_optimize`);if(t)try{let{key:n,projectId:r,prompt:i,duration:a,ts:o}=JSON.parse(t);if(Date.now()-o>300*1e3||r!==e){localStorage.removeItem(`pending_optimize`);return}if(ut.current===n)return;let s=l.find(e=>e.projectId===r&&e.originalPrompt===i&&e.duration===a&&e.status===`prompt_optimized`&&new Date(e.createdAt).getTime()>o-1e4);s?(lt.current=!0,localStorage.removeItem(`pending_optimize`),g(s),v(s.optimizedPrompt||``),_e(s.textCreditsCost),ye(s.textTokensUsed),m(!0),Z.success({content:`优化请求已恢复,消耗 ${s.textCreditsCost} 积分`,key:`recovery`})):Date.now()-o>3e4&&localStorage.removeItem(`pending_optimize`)}catch{localStorage.removeItem(`pending_optimize`)}},[l,e]);let dt=r.find(t=>t.id===e),ft=l.filter(t=>t.projectId===e),pt=dt?.name??`项目`,mt=dt&&te[dt.industry]||[],ht=u?.credits??0,gt=e=>{let t=e===`2k`?`2048`:e===`4k`?`4096`:e;for(let e=0;e=_t,yt=async()=>{try{if(!e){Z.error(`项目ID为空,请先选择项目`);return}let t=await n.validateFields();if(!t.prompt||!t.prompt.trim()){Z.error(`请输入视频/图片描述`);return}f(!0);let r=Object.entries(W).map(([e,t])=>`@${e}:${t}`),i=r.length>0?`${t.prompt}\n\n${r.join(`;`)}`:t.prompt,a=hte();localStorage.setItem(`pending_optimize`,JSON.stringify({key:a,projectId:e,prompt:i,duration:oe,ts:Date.now()})),ut.current=a;let o=await s(e,{prompt:i,duration:oe,genType:be,resolution:we,references:M.length>0?M:void 0,idempotencyKey:a,image_size:we,image_proportion:Se,image_px:Ee+`x`+Oe});localStorage.removeItem(`pending_optimize`),ut.current=null,g(o.record),v(o.record.optimizedPrompt||``),_e(o.textCreditsCost),ye(o.textTokensUsed),m(!0),Z.success({content:`「${pt}」提示词优化完成,消耗 ${o.textCreditsCost} 积分`,key:`optimize`})}catch(e){console.error(`优化提示词失败:`,e);let t=e?.response?.data?.message||e?.message||`操作失败,请稍后重试`;Z.error(t)}finally{f(!1),localStorage.removeItem(`pending_optimize`),ut.current=null}},bt=(0,S.useRef)(new Set),xt=(0,S.useRef)(null),St=(0,S.useRef)(null),Ct=e=>{bt.current.add(e),Et()},wt=e=>{bt.current.delete(e),bt.current.size===0&&Tt()},Tt=()=>{xt.current&&=(clearInterval(xt.current),null),St.current&&=(St.current.abort(),null)},Et=()=>{xt.current||=setInterval(async()=>{try{St.current&&St.current.abort();let t=new AbortController;St.current=t;let n=await z5({projectId:e,page:1,pageSize:100,signal:t.signal});St.current=null;let r=Array.from(bt.current),i=[];if(r.length>0){let e=i9.getState().records,t=e.items.map(e=>{if(r.includes(e.id)){let t=n.items.find(t=>t.id===e.id);if(t)return t.status!==`generating`&&i.push(e.id),t}return e});i9.setState({records:{...e,items:t}}),i.forEach(e=>{let t=n.items.find(t=>t.id===e);wt(e),t?.status===`completed`?(T(t=>({...t,[e]:`done`})),g(n=>n?.id===e?t:n),Z.success({content:`「${pt}」视频生成完成!`,key:e,duration:5})):t?.status===`failed`&&(T(t=>({...t,[e]:`failed`})),g(n=>n?.id===e?t:n),Z.error({content:`「${pt}」视频生成失败: ${t.errorMessage||`未知错误`}`,key:e,duration:5}))})}}catch(e){e.name!==`AbortError`&&console.error(`Global polling error:`,e)}},5e3)},Dt=e=>{Ct(e)};(0,S.useEffect)(()=>()=>{Tt(),ot()},[]);let Ot=async e=>{if(!vt){Z.error(`积分不足,请先充值`);return}C(t=>({...t,[e]:!0})),T(t=>({...t,[e]:`generating`})),Z.loading({content:`「${pt}」正在提交视频生成...`,duration:0,key:e});try{(await c(e,{aspectRatio:ce,resolution:ue})).status===`failed`?(T(t=>({...t,[e]:`failed`})),Z.error({content:`「${pt}」提交失败`,key:e,duration:3})):(Z.success({content:`「${pt}」已提交,正在生成中...`,key:e,duration:3}),Dt(e))}catch(t){T(t=>({...t,[e]:`failed`}));let n=`提交失败`;t?.response?.data?.detail?n=t.response.data.detail:t?.data?.detail?n=t.data.detail:t?.detail?n=t.detail:t?.message&&(n=t.message),Z.error({content:`${n}`,key:e,duration:3})}finally{C(t=>({...t,[e]:!1}))}},kt=async e=>{let t=ft.find(t=>t.id===e);if(t){C(t=>({...t,[e]:!0})),T(t=>({...t,[e]:`generating`})),Z.loading({content:`「${pt}」正在重新提交...`,duration:0,key:e});try{let n=E[e];n&&n!==t.optimizedPrompt&&await W5(e,n);let r=await c(e,{aspectRatio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`});console.log(`重新提交视频生成结果:`,r),r.status===`failed`?(T(t=>({...t,[e]:`failed`})),console.log(`12312`),Z.error({content:`「${pt}」提交失败`,key:e,duration:3})):(Z.success({content:`「${pt}」已提交,正在生成中...`,key:e,duration:3}),Dt(e))}catch(t){T(t=>({...t,[e]:`failed`})),console.log(`1231`,t);let n=`提交失败`;t?.response?.data?.detail?n=t.response.data.detail:t?.data?.detail?n=t.data.detail:t?.detail?n=t.detail:t?.message&&(n=t.message),Z.error({content:`${n}`,key:e,duration:3})}finally{C(t=>({...t,[e]:!1}))}}},At=e=>{let t=w[e.id];return t===`generating`?`generating`:t===`done`?`completed`:t===`failed`?`failed`:e.status},jt={optimizing:{color:`processing`,text:`优化中`,icon:(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,$.jsx)(OH,{})},generating:{color:`warning`,text:`生成中`,icon:(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}})},completed:{color:`success`,text:`已完成`,icon:(0,$.jsx)(i4,{})},failed:{color:`error`,text:`失败`,icon:(0,$.jsx)(s4,{})}},Mt=({label:e,value:t,options:n,suffix:r,expanded:i,onToggle:a,onSelect:o,onClose:s})=>{let c=(0,S.useRef)(null),l=(0,S.useRef)(null),u=(0,S.useRef)(i),[d,f]=(0,S.useState)(null);return u.current=i,(0,S.useEffect)(()=>{if(i&&c.current){let e=c.current.getBoundingClientRect();f({bottom:window.innerHeight-e.top+4,left:e.left,width:Math.max(e.width,100)})}else f(null)},[i]),(0,S.useEffect)(()=>{if(!i)return;let e=e=>{c.current?.contains(e.target)||l.current?.contains(e.target)||u.current&&s()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[i,s]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{ref:c,onClick:a,translate:`no`,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,cursor:`pointer`,userSelect:`none`,transition:`background 0.2s, border-color 0.2s`,background:i?`rgba(99,102,241,0.08)`:`#f8f9fc`,border:i?`1px solid #6366f1`:`1px solid #e2e8f0`,minWidth:70,whiteSpace:`nowrap`,flexShrink:0},children:[(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#6366f1`,fontWeight:500,lineHeight:`18px`},children:[t,r]}),(0,$.jsx)(wQ,{style:{fontSize:9,color:`#94a3b8`,transition:`transform 0.2s`,transform:i?`rotate(180deg)`:`rotate(0deg)`}})]}),d&&(0,zi.createPortal)((0,$.jsxs)(`div`,{ref:l,style:{position:`fixed`,bottom:d.bottom,left:d.left,minWidth:d.width,background:`#fff`,borderRadius:12,padding:6,zIndex:99999,boxShadow:`0 8px 30px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:10,color:`#94a3b8`,display:`block`,padding:`2px 6px 4px`},children:e}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:n.map((e,n)=>{let r=t===e;return(0,$.jsx)(`div`,{onClick:()=>{o(e),s()},style:{padding:`6px 10px`,borderRadius:8,fontSize:13,cursor:`pointer`,transition:`all 0.15s`,background:r?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`transparent`,color:r?`#fff`:`#1a1a2e`,fontWeight:r?600:400},onMouseEnter:e=>{r||(e.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:e},n)})})]}),document.body)]})},Nt=({group:e,selected:t,expanded:n,onToggle:r,onSelect:i,onClose:a})=>{let o=(0,S.useRef)(null),s=(0,S.useRef)(null),c=(0,S.useRef)(n),[l,u]=(0,S.useState)(null);return c.current=n,(0,S.useEffect)(()=>{if(n&&o.current){let e=o.current.getBoundingClientRect();u({bottom:window.innerHeight-e.top+4,left:e.left})}else u(null)},[n]),(0,S.useEffect)(()=>{if(!n)return;let e=e=>{o.current?.contains(e.target)||s.current?.contains(e.target)||c.current&&a()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[n,a]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{ref:o,onClick:r,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,cursor:`pointer`,userSelect:`none`,transition:`all 0.2s`,background:t?`rgba(99,102,241,0.08)`:`#f8f9fc`,border:n?`1px solid #6366f1`:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:t?`#6366f1`:`#64748b`,fontWeight:t?600:400},children:t||e.name}),(0,$.jsx)(wQ,{style:{fontSize:9,color:t?`#6366f1`:`#94a3b8`,transition:`transform 0.2s`,transform:n?`rotate(180deg)`:`rotate(0deg)`}})]}),l&&(0,zi.createPortal)((0,$.jsxs)(`div`,{ref:s,style:{position:`fixed`,bottom:l.bottom,left:l.left,background:`#fff`,borderRadius:12,padding:8,minWidth:160,zIndex:99999,boxShadow:`0 8px 30px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:10,color:`#94a3b8`,display:`block`,padding:`2px 6px 4px`},children:e.name}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:e.options.map((e,n)=>{let r=t===e;return(0,$.jsx)(`div`,{onClick:()=>{i(e),a()},style:{padding:`6px 10px`,borderRadius:8,fontSize:13,cursor:`pointer`,transition:`all 0.15s`,background:r?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`transparent`,color:r?`#fff`:`#1a1a2e`,fontWeight:r?600:400},onMouseEnter:e=>{r||(e.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:e},n)})})]}),document.body)]})};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`gen-header animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`20px 28px`,borderRadius:16,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 100%)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-30,bottom:-30,width:160,height:160,borderRadius:`50%`,background:`rgba(255,255,255,0.05)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,position:`relative`},children:[(0,$.jsx)(vD,{icon:(0,$.jsx)(g2,{}),onClick:()=>t(`/projects`),style:{background:`rgba(255,255,255,0.1)`,border:`1px solid rgba(255,255,255,0.2)`,color:`#fff`,borderRadius:10}}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0,color:`#fff`,fontWeight:700},children:pt}),dt&&(0,$.jsx)(T$,{style:{background:`rgba(255,255,255,0.12)`,border:`1px solid rgba(255,255,255,0.2)`,color:`rgba(255,255,255,0.8)`,borderRadius:6},children:U[dt.industry]||dt.industry})]}),(0,$.jsx)(Q.Text,{style:{color:`rgba(255,255,255,0.5)`,fontSize:13},children:`描述视频 → AI优化 → 生成视频`})]})]}),(0,$.jsxs)(T$,{style:{background:`rgba(255,255,255,0.1)`,border:`1px solid rgba(255,255,255,0.2)`,color:`#fff`,borderRadius:20,fontSize:13,padding:`4px 14px`},children:[`剩余 `,ht,` 积分`]})]}),!p&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{className:`animate-fadeInUp`,style:{marginBottom:24,padding:`16px 20px`,borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,boxShadow:`0 2px 12px rgba(0,0,0,0.03)`},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{marginRight:70,position:`relative`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,fontWeight:500,color:`#475569`,marginRight:16},children:`生成类型:`}),(0,$.jsxs)(LL.Group,{defaultValue:`image`,buttonStyle:`solid`,onChange:$e,children:[(0,$.jsxs)(LL.Button,{value:`image`,style:{zIndex:0},children:[(0,$.jsx)(p6,{style:{marginRight:6,fontSize:14}}),` `,`图片`]}),(0,$.jsxs)(LL.Button,{value:`video`,children:[(0,$.jsx)(Y8,{style:{marginRight:6,fontSize:14}}),` `,`视频`]})]})]}),be===`video`&&[{icon:(0,$.jsx)(j$,{}),label:`描述视频+时长`,color:`#6366f1`},{icon:(0,$.jsx)(j8,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(L6,{}),label:`选择参数生成`,color:`#10b981`}].map((e,t)=>(0,$.jsxs)(S.Fragment,{children:[t>0&&(0,$.jsx)(`div`,{style:{width:40,height:1,background:`linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0)`,margin:`0 12px`,flexShrink:0}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:10,background:`${e.color}12`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:e.color,fontSize:15},children:e.icon})}),(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:500,color:`#1a1a2e`},children:e.label})]})]},t)),be===`image`&&[{icon:(0,$.jsx)(j$,{}),label:`描述图片+尺寸`,color:`#6366f1`},{icon:(0,$.jsx)(j8,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(L6,{}),label:`图片生成`,color:`#10b981`}].map((e,t)=>(0,$.jsxs)(S.Fragment,{children:[t>0&&(0,$.jsx)(`div`,{style:{width:40,height:1,background:`linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0)`,margin:`0 12px`,flexShrink:0}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:10,background:`${e.color}12`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:e.color,fontSize:15},children:e.icon})}),(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:500,color:`#1a1a2e`},children:e.label})]})]},t))]})}),(0,$.jsxs)(xW,{form:n,initialValues:{},children:[(0,$.jsx)(xW.Item,{name:`prompt`,noStyle:!0,rules:[{required:!0,message:`请输入视频描述`}],style:{display:`none`}}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:20,background:`#fff`,border:`1px solid #f0f0f5`,boxShadow:`0 4px 24px rgba(0,0,0,0.04)`,overflow:`visible`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`12px 16px 0`,minHeight:60},children:[M.map((e,t)=>(0,$.jsxs)(`div`,{className:`ref-thumb`,style:{position:`relative`,width:48,height:48,borderRadius:12,overflow:`visible`,flexShrink:0},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,overflow:`hidden`,border:`1px solid #e2e8f0`,cursor:`pointer`},onClick:()=>{e.type===`video`&&ae(`http://ceshi.apiforeign.minzhong.cn${e.url}`)},children:e.type===`image`?(0,$.jsx)(xG,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(c9,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`})}),(0,$.jsx)(`div`,{className:`ref-delete`,onClick:n=>{n.stopPropagation(),U5(e.url).catch(()=>{}),N(e=>e.filter((e,n)=>n!==t))},style:{position:`absolute`,top:-4,right:-4,width:16,height:16,borderRadius:`50%`,background:`rgba(0,0,0,0.55)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,opacity:0,transition:`opacity 0.15s`,backdropFilter:`blur(4px)`},children:(0,$.jsx)(s4,{style:{color:`#fff`,fontSize:10}})})]},t)),(0,$.jsx)(y0,{accept:`image/*,video/*`,showUploadList:!1,multiple:!0,beforeUpload:e=>{let t=e.type.startsWith(`image/`),n=e.type.startsWith(`video/`);if(!t&&!n)return Z.error(`仅支持图片或视频文件`),!1;let r=n?100:10;if(e.size/1024/1024>r)return Z.error(`${n?`视频`:`图片`}大小不能超过${r}MB`),!1;let i=M.filter(e=>e.type===`image`).length,a=M.filter(e=>e.type===`video`).length;return t&&i>=10?(Z.error(`最多上传10张图片`),!1):n&&a>=3?(Z.error(`最多上传3个视频`),!1):(F(!0),(t?V5:H5)(e).then(e=>{let n=t?`图片`:`视频`,r=t?i+1:a+1;N(i=>[...i,{url:e.url,type:t?`image`:`video`,name:`${n}${r}`}]),Z.success(`${n}上传成功`)}).catch(()=>Z.error(`上传失败`)).finally(()=>F(!1)),!1)},children:(0,$.jsx)($w,{title:`参考内容(${M.length}/10)`,children:(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,border:`1.5px dashed #d9d9d9`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s`,flexShrink:0},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99,102,241,0.04)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#d9d9d9`,e.currentTarget.style.background=`transparent`},children:P?(0,$.jsx)(Xm,{style:{fontSize:18,color:`#6366f1`}}):(0,$.jsx)(gR,{style:{fontSize:18,color:`#94a3b8`}})})})})]}),(0,$.jsx)(`div`,{style:{padding:`8px 16px 4px`},children:(0,$.jsx)(nK.TextArea,{ref:H,value:I,onChange:e=>{let t=e.target.value;L(t),n.setFieldsValue({prompt:t});let r=t.lastIndexOf(`@`);if(r>=0){let e=t.slice(r+1);if(!e.includes(` `)&&!e.includes(` `)){z(!0),V(e);return}}z(!1)},rows:3,placeholder:`上传参考素材、输入文字,自由组合图、文多元素。输入 @ 可引用参考内容...`,maxLength:500,bordered:!1,autoSize:{minRows:2,maxRows:6},style:{padding:`6px 2px`,fontSize:15,lineHeight:1.7,resize:`none`,caretColor:`#6366f1`}})}),R&&M.length>0&&(0,$.jsx)(`div`,{style:{margin:`0 16px 8px`,background:`#fff`,borderRadius:10,boxShadow:`0 6px 24px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`,padding:6,maxHeight:180,overflowY:`auto`},children:M.filter(e=>!B||e.name.includes(B)).map((e,t)=>(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,padding:`8px 10px`,borderRadius:8,cursor:`pointer`,transition:`background 0.15s`},onMouseEnter:e=>e.currentTarget.style.background=`#f1f5f9`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,onMouseDown:t=>{t.preventDefault();let r=H.current?.resizableTextArea?.textArea||H.current?.nativeElement?.querySelector(`textarea`)||H.current;if(!r||!r.value)return;let i=r.value,a=i.lastIndexOf(`@`),o=i.slice(0,a)+`@${e.name} `;L(o),n.setFieldValue(`prompt`,o),z(!1),setTimeout(()=>{r.focus(),r.selectionStart=o.length,r.selectionEnd=o.length},50)},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,overflow:`hidden`,background:e.type===`image`?`#f1f5f9`:`#1a1a2e`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:e.type===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(S6,{style:{color:`#fff`,fontSize:14}})}),(0,$.jsx)(Q.Text,{style:{fontSize:13},children:e.name}),(0,$.jsx)(T$,{style:{marginLeft:`auto`,fontSize:11},children:e.type===`image`?`图片`:`视频`})]},t))}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`8px 12px 12px`,gap:8,flexWrap:`wrap`,position:`relative`,zIndex:50,minHeight:48},children:[be!==`image`&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,flex:1,flexWrap:`wrap`},children:[(0,$.jsx)(Mt,{label:`时长`,value:`${oe}`,options:me.durations.map(e=>`${e}`),suffix:`秒`,expanded:fe===`duration`,onToggle:()=>pe(fe===`duration`?null:`duration`),onSelect:e=>se(parseInt(e)),onClose:()=>pe(null)}),mt.map((e,t)=>{let n=G===e.name,r=W[e.name];return(0,$.jsx)(Nt,{group:e,selected:r,expanded:n,onToggle:()=>K(n?null:e.name),onSelect:t=>{re(n=>{let r={...n};return r[e.name]===t?delete r[e.name]:r[e.name]=t,r})},onClose:()=>K(null)},`og-${t}`)})]}),be==`image`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>je(!Ae),className:`image-settings-trigger`,style:{minWidth:220,padding:`0px 16px`,height:30,borderRadius:10,border:`1px solid #e2e8f0`,backgroundColor:`#f8f9fc`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:12,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:(0,$.jsxs)(`div`,{style:{textAlign:`left`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:600,color:`#374151`,marginRight:10},children:Se===`auto`?`智能`:Se}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#9ca3af`},children:[we==`2K`?`高清 2K`:`超清 4K`,`| `,Ee,`×`,Oe]})]})}),(0,$.jsx)(wQ,{style:{fontSize:14,color:`#9ca3af`}})]}),Ae&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:520,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:20,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:10,fontSize:13,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:6},children:Be.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{Ce(e.value),Re(e.label)},style:{flex:`0 0 calc(11.11% - 5px)`,minWidth:48,height:56,borderRadius:8,border:Se===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:Se===e.value?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:e.value===`auto`?16:20,height:e.value===`auto`?16:20,border:`2px solid ${Se===e.value?`#6366f1`:`#9ca3af`}`,borderRadius:(e.value,3),marginBottom:3,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e.value===`auto`&&(0,$.jsx)(`span`,{style:{fontSize:8,color:Se===e.value?`#6366f1`:`#9ca3af`},children:`智`})}),(0,$.jsx)(`span`,{style:{fontSize:10,color:Se===e.value?`#6366f1`:`#6b7280`,fontWeight:Se===e.value?600:400},children:e.value})]},e.value))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:10,fontSize:13,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:8},children:He.map(e=>(0,$.jsx)(`button`,{onClick:()=>{Te(e.value),ze(e.label)},style:{flex:1,height:48,borderRadius:8,border:we===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:we===e.value?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsxs)(`span`,{style:{fontSize:13,fontWeight:600,color:we===e.value?`#fff`:`#4b5563`},children:[e.value,e.value===`4k`&&(0,$.jsx)(`span`,{style:{marginLeft:3},children:`✨`})]})},e.value))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:10,fontSize:13,fontWeight:500,color:`#666666`},children:`尺寸`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:140},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12,marginRight:6},children:`W`}),(0,$.jsx)(nK,{value:Ee,onChange:e=>De(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:6,height:40,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:14,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`button`,{onClick:Ze,style:{width:28,height:28,borderRadius:6,border:`1px solid #e5e7eb`,backgroundColor:`#fff`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:`#6366f1`},children:(0,$.jsx)(oG,{style:{fontSize:12}})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:140},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12,marginRight:6},children:`H`}),(0,$.jsx)(nK,{value:Oe,onChange:e=>ke(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:6,height:40,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:14,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12},children:`PX`})]})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,flexShrink:0},children:[be===`image`&&(0,$.jsx)(`span`,{style:{color:`#7c7c7c`,fontSize:14},children:`(请在左侧选择图片比例和尺寸)`}),(0,$.jsx)(vD,{type:`primary`,size:`large`,onClick:yt,loading:d,style:{borderRadius:10,fontWeight:600,minWidth:140,height:40,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 16px rgba(99,102,241,0.35)`},children:`AI优化提示词`})]})]})]})]})]}),p&&h&&(0,$.jsxs)(Oz,{className:`animate-fadeInUp`,style:{borderRadius:16},styles:{body:{padding:`24px 28px`}},children:[!w[h.id]||w[h.id]===`idle`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:24,padding:`14px 18px`,borderRadius:12,background:`linear-gradient(135deg, rgba(16,185,129,0.06), rgba(5,150,105,0.06))`,border:`1px solid rgba(16,185,129,0.15)`},children:[(0,$.jsx)(i4,{style:{color:`#10b981`,fontSize:22}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,display:`block`},children:`提示词优化完成`}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`文本优化消耗 `,ge,` 积分· 您可以编辑提示词后选择参数生成视频`]})]})]}):(0,$.jsxs)(`div`,{style:{marginBottom:24,padding:`16px 18px`,borderRadius:12,display:`flex`,alignItems:`center`,gap:12,background:w[h.id]===`failed`?`rgba(239,68,68,0.04)`:w[h.id]===`done`?`rgba(16,185,129,0.04)`:`rgba(99,102,241,0.04)`,border:`1px solid ${w[h.id]===`failed`?`rgba(239,68,68,0.12)`:w[h.id]===`done`?`rgba(16,185,129,0.12)`:`rgba(99,102,241,0.12)`}`},children:[w[h.id]===`generating`&&(0,$.jsx)(Xm,{style:{color:`#6366f1`,fontSize:18},spin:!0}),w[h.id]===`done`&&(0,$.jsx)(i4,{style:{color:`#10b981`,fontSize:18}}),w[h.id]===`failed`&&(0,$.jsx)(s4,{style:{color:`#ef4444`,fontSize:18}}),(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:w[h.id]===`failed`?`#ef4444`:w[h.id]===`done`?`#10b981`:`#6366f1`},children:[w[h.id]===`generating`&&`${be===`image`?`图片`:`视频`}生成中,请稍候...`,w[h.id]===`done`&&`${be===`image`?`图片`:`视频`}生成成功`,w[h.id]===`failed`&&`${be===`image`?`图片`:`视频`}生成失败,请重试`]})]}),!w[h.id]||w[h.id]===`idle`||w[h.id]===`failed`?(0,$.jsxs)(`div`,{className:`gen-prompt-row`,style:{display:`flex`,gap:20,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 45%`,minWidth:240},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`,minHeight:100},children:(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#64748b`,lineHeight:1.7},children:h.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 45%`,minWidth:240},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,!y&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!y&&(0,$.jsxs)(DU,{size:4,children:[(0,$.jsx)($w,{title:`复制`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(e1,{}),onClick:()=>{navigator.clipboard.writeText(_),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(0,$.jsx)($w,{title:`编辑`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(j$,{}),onClick:()=>b(!0),style:{color:`#6366f1`}})})]})]}),y?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(nK.TextArea,{value:_,onChange:e=>v(e.target.value),rows:5,style:{borderRadius:12,fontSize:14,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(vD,{size:`small`,onClick:()=>{v(h.optimizedPrompt||``),b(!1)},children:`取消`}),(0,$.jsx)(vD,{size:`small`,type:`primary`,onClick:()=>{b(!1),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`,minHeight:100},children:(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#1a1a2e`,lineHeight:1.7},children:_})})]})]}):(0,$.jsxs)(`div`,{className:`gen-prompt-row`,style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 55%`,minWidth:280},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`,minHeight:80},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.6},children:h.originalPrompt})})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,!y&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!y&&(0,$.jsxs)(DU,{size:4,children:[(0,$.jsx)($w,{title:`复制`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(e1,{}),onClick:()=>{navigator.clipboard.writeText(_),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(0,$.jsx)($w,{title:`编辑`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(j$,{}),onClick:()=>b(!0),style:{color:`#6366f1`}})})]})]}),y?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(nK.TextArea,{value:_,onChange:e=>v(e.target.value),rows:5,style:{borderRadius:12,fontSize:13,lineHeight:1.6,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(vD,{size:`small`,onClick:()=>{v(h.optimizedPrompt||``),b(!1)},children:`取消`}),(0,$.jsx)(vD,{size:`small`,type:`primary`,onClick:()=>{b(!1),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`,minHeight:120},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.6},children:_})})]})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 40%`,minWidth:280},children:[h.videoUrl&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`生成视频`}),(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`,border:`1px solid #f0f0f5`,background:`#000`},children:(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${h.videoUrl}`,controls:!0,style:{width:`100%`,maxHeight:350,display:`block`}})})]}),h.imageUrl&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`生成图片`}),(0,$.jsx)(xG,{src:`http://ceshi.apiforeign.minzhong.cn${h.imageUrl}`,style:{width:`100%`,maxHeight:350,objectFit:`contain`,borderRadius:12,border:`1px solid #f0f0f5`},preview:!0})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginTop:20,padding:`14px 18px`,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:[be!==`image`&&(0,$.jsxs)(`div`,{style:{marginTop:24,borderRadius:12,background:`#f8f9fc`,width:`25%`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,fontWeight:600,display:`block`,marginBottom:12},children:`选择视频参数`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`时长`}),(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:13,color:`#6366f1`},children:[oe,`s`]})]}),(0,$.jsx)(Mt,{label:`比例`,value:ce,options:me.ratios,expanded:fe===`ratio`,onToggle:()=>pe(fe===`ratio`?null:`ratio`),onSelect:e=>le(e),onClose:()=>pe(null)}),(0,$.jsx)(Mt,{label:`分辨率`,value:ue,options:me.resolutions,expanded:fe===`resolution`,onToggle:()=>pe(fe===`resolution`?null:`resolution`),onSelect:e=>de(e),onClose:()=>pe(null)})]})]}),be==`image`&&h&&(0,$.jsx)(`div`,{style:{marginTop:24,borderRadius:12,background:`#f8f9fc`,width:`25%`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-around`},children:[(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`分辨率`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:h.imageSize||`-`})]}),(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`画面比例`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:h.imageProportion||`-`})]}),(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`画面尺寸`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:h.imagePx||`-`})]})]})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`文字积分`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#6366f1`},children:ge})]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:18},children:`+`}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:[`预估`,be===`image`?`图片`:`视频`,`积分`]}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#10b981`},children:be===`image`&&h.imageSize?gt(h.imageSize)||_t:Ie(oe,ue)})]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:18},children:`=`}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`总计`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16,color:`#1a1a2e`},children:(ge+(be===`image`?gt(h.imageSize):Ie(oe,ue))).toFixed(2)})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsxs)(vD,{size:`large`,onClick:()=>{m(!1),g(null),v(``),L(``),N([]),re({}),K(null),pe(null),n.resetFields()},style:{borderRadius:12,minWidth:120,height:44,fontWeight:500},children:[`配置新`,be===`image`?`图片`:`视频`]}),(0,$.jsx)($w,{title:vt?``:`积分不足`,children:(0,$.jsx)(vD,{type:`primary`,size:`large`,icon:(0,$.jsx)(L6,{}),onClick:()=>Ot(h.id),loading:w[h.id]===`generating`,disabled:!vt||w[h.id]===`generating`||w[h.id]===`done`,style:{borderRadius:12,minWidth:180,height:44,fontWeight:600,background:w[h.id]===`done`?`#10b981`:vt?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`:`#d1d5db`,border:`none`,boxShadow:vt?`0 8px 24px rgba(99,102,241,0.3)`:`none`},children:w[h.id]===`done`?`生成完成`:w[h.id]===`generating`?`生成中...`:`生成${be===`image`?`图片`:`视频`} (${be===`image`?gt(h.imageSize):Ie(oe,ue)}积分)`})})]})]}),h.references&&h.references.length>0&&(0,$.jsxs)(`div`,{style:{marginTop:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`参考内容`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:h.references.map((e,t)=>(0,$.jsxs)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,position:`relative`,cursor:`pointer`},onClick:()=>{e.type===`video`&&ae(`http://ceshi.apiforeign.minzhong.cn${e.url}`)},children:[e.type===`image`?(0,$.jsx)(xG,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},preview:!0}):(0,$.jsx)(c9,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,width:64,height:64}),(0,$.jsx)(T$,{style:{position:`absolute`,bottom:0,left:0,right:0,margin:0,fontSize:9,textAlign:`center`,borderRadius:`0 0 8px 8px`,background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,padding:`0 2px`},children:e.name})]},t))})]})]}),ft.length>0&&(0,$.jsxs)(`div`,{style:{marginTop:24},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,display:`block`,marginBottom:12},children:`本项目生成记录`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},className:`stagger-children`,children:ft.map((e,t)=>{let n=At(e),r=E[e.id]??(e.optimizedPrompt||e.originalPrompt),i=A===e.id,a=e.genType||`image`;return(0,$.jsxs)(`div`,{className:`animate-slideInCard`,style:{animationDelay:`${t*.05}s`},children:[(0,$.jsxs)(`div`,{className:`record-item`,onClick:()=>j(i?null:e.id),style:{padding:`12px 16px`,borderRadius:i?`12px 12px 0 0`:12,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,transition:`all 0.2s`,display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,background:a===`image`?`#fef3c7`:`#dbeafe`},children:a===`image`?(0,$.jsx)(p6,{style:{color:`#d97706`,fontSize:12}}):(0,$.jsx)(Y8,{style:{color:`#2563eb`,fontSize:12}})}),i?(0,$.jsx)(wQ,{style:{color:`#6366f1`,fontSize:11,flexShrink:0}}):(0,$.jsx)(t4,{style:{color:`#cbd5e1`,fontSize:11,flexShrink:0}}),(0,$.jsx)(T$,{color:jt[n]?.color,icon:jt[n]?.icon,style:{margin:0},children:jt[n]?.text}),(0,$.jsx)(Q.Text,{style:{flex:1,fontSize:13,color:`#475569`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:r}),n===`prompt_optimized`&&(0,$.jsx)(T$,{color:`processing`,style:{padding:`3px 10px`,fontSize:12,margin:0,flexShrink:0},children:`待配置`}),a===`image`?(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.imageSize}`:`-`,` ·`,` `,e.imageProportion||`-`,` ·`,` `,e.imagePx||`-`,` ·`,` `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:a9(e.createdAt)})]}):(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.duration}秒`:`-`,` ·`,` `,e.aspectRatio||`-`,` · `,e.resolution||`-`,` `,`·`,` `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:a9(e.createdAt)})]}),(0,$.jsx)(`div`,{className:`record-actions`,onClick:e=>e.stopPropagation(),children:(0,$.jsx)(DU,{children:n===`failed`&&(0,$.jsx)(vD,{type:`primary`,danger:!0,size:`small`,icon:(0,$.jsx)(S6,{}),loading:x[e.id],onClick:()=>kt(e.id),style:{borderRadius:8},children:`重试`})})})]}),i&&(0,$.jsx)(`div`,{style:{background:`#fff`,border:`1px solid #f0f0f5`,borderTop:`none`,borderRadius:`0 0 12px 12px`,padding:`18px 20px`,animation:`fadeInUp 0.25s ease both`},children:(0,$.jsxs)(`div`,{className:`gen-detail-row`,style:{display:`flex`,gap:20,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 50%`,minWidth:260},children:[(0,$.jsxs)(`div`,{style:{marginBottom:14},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.7},children:e.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:14},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,(n===`prompt_optimized`||n===`failed`)&&O!==e.id&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),O!==e.id&&(0,$.jsxs)(DU,{size:4,children:[(0,$.jsx)($w,{title:`复制`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(e1,{}),onClick:()=>{navigator.clipboard.writeText(r),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(n===`prompt_optimized`||n===`failed`)&&(0,$.jsx)($w,{title:`编辑`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(j$,{}),onClick:()=>{k(e.id),D(t=>({...t,[e.id]:t[e.id]??e.optimizedPrompt??``}))},style:{color:`#6366f1`}})})]})]}),O===e.id?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(nK.TextArea,{value:r,onChange:t=>D(n=>({...n,[e.id]:t.target.value})),rows:4,style:{borderRadius:10,fontSize:13,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(vD,{size:`small`,onClick:()=>k(null),children:`取消`}),(0,$.jsx)(vD,{size:`small`,type:`primary`,onClick:()=>{D(t=>({...t,[e.id]:r})),k(null),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:n===`prompt_optimized`?`rgba(99,102,241,0.02)`:`#f8f9fc`,border:n===`prompt_optimized`?`1px solid rgba(99,102,241,0.1)`:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:r})})]}),a===`image`?(0,$.jsx)(`div`,{style:{display:`flex`,gap:14,padding:`10px 14px`,borderRadius:10,background:`#f8f9fc`},children:[{label:`文字积分`,value:`${e.textCreditsCost||0}`},{label:`图片积分`,value:`${e.creditsCost||0}`},{label:`分辨率`,value:e.imageSize?`${e.imageSize}`:`-`},{label:`比例`,value:e.imageProportion||`-`},{label:`尺寸`,value:e.imagePx||`-`}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:13,color:`#1a1a2e`},children:e.value})]},t))}):(0,$.jsx)(`div`,{style:{display:`flex`,gap:14,padding:`10px 14px`,borderRadius:10,background:`#f8f9fc`},children:[{label:`文字积分`,value:`${e.textCreditsCost||0}`},{label:`视频积分`,value:`${e.creditsCost||0}`},{label:`时长`,value:e.duration?`${e.duration}秒`:`-`},{label:`比例`,value:e.aspectRatio||`-`},{label:`分辨率`,value:e.resolution||`-`}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:13,color:`#1a1a2e`},children:e.value})]},t))}),(e.references&&e.references.length>0||n===`failed`)&&(0,$.jsxs)(`div`,{style:{marginTop:14},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:[`参考素材`,` `,n===`failed`&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可删除/添加后重试)`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:[e.references?.map((t,r)=>(0,$.jsxs)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`visible`,border:`1px solid #e2e8f0`,position:`relative`,cursor:`pointer`},onClick:()=>{t.type===`video`&&ae(`http://ceshi.apiforeign.minzhong.cn${t.url}`)},children:[(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`hidden`},children:t.type===`image`?(0,$.jsx)(xG,{src:`http://ceshi.apiforeign.minzhong.cn${t.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},preview:!0}):(0,$.jsx)(c9,{src:`http://ceshi.apiforeign.minzhong.cn${t.url}`,width:64,height:64})}),(0,$.jsx)(T$,{style:{position:`absolute`,bottom:0,left:0,right:0,margin:0,fontSize:9,textAlign:`center`,borderRadius:`0 0 8px 8px`,background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,padding:`0 2px`},children:t.name}),n===`failed`&&(0,$.jsx)(`div`,{className:`ref-delete`,onClick:n=>{n.stopPropagation(),U5(t.url).catch(()=>{});let i=e.references.filter((e,t)=>t!==r);i9.getState().updateRecordReferences(e.id,i)},style:{position:`absolute`,top:-4,right:-4,width:16,height:16,borderRadius:`50%`,background:`rgba(239,68,68,0.8)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,opacity:0,transition:`opacity 0.15s`},children:(0,$.jsx)(s4,{style:{color:`#fff`,fontSize:10}})})]},r)),n===`failed`&&(0,$.jsx)(y0,{accept:`image/*,video/*`,showUploadList:!1,multiple:!0,beforeUpload:t=>{let n=t.type.startsWith(`image/`),r=t.type.startsWith(`video/`);return!n&&!r?(Z.error(`仅支持图片或视频文件`),!1):((n?V5:H5)(t).then(r=>{let i={url:r.url,type:n?`image`:`video`,name:t.name||(n?`图片`:`视频`)},a=e.references||[];i9.getState().updateRecordReferences(e.id,[...a,i]),Z.success(`上传成功`)}).catch(()=>Z.error(`上传失败`)),!1)},children:(0,$.jsx)($w,{title:`添加参考素材`,children:(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:10,border:`1.5px dashed #d9d9d9`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#d9d9d9`},children:(0,$.jsx)(gR,{style:{fontSize:18,color:`#94a3b8`}})})})})]})]})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 40%`,minWidth:220,position:`relative`},children:[n===`prompt_optimized`&&(0,$.jsxs)(`div`,{style:{marginTop:16,position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,backgroundColor:`transparent`},children:[a===`video`&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,flexWrap:`wrap`,marginBottom:12},children:[(0,$.jsxs)(`div`,{translate:`no`,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,marginLeft:12},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`时长`}),(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:13,color:`#6366f1`},children:[e.duration,`秒`]})]}),(0,$.jsx)(Mt,{label:`比例`,value:q[e.id]?.aspectRatio||`选择比例`,options:me.ratios,expanded:fe===`ratio-${e.id}`,onToggle:()=>pe(fe===`ratio-${e.id}`?null:`ratio-${e.id}`),onSelect:t=>ie(n=>({...n,[e.id]:{...n[e.id],aspectRatio:t,resolution:n[e.id]?.resolution||``}})),onClose:()=>pe(null)}),(0,$.jsx)(Mt,{label:`分辨率`,value:q[e.id]?.resolution||`选择分辨率`,options:me.resolutions,expanded:fe===`res-${e.id}`,onToggle:()=>pe(fe===`res-${e.id}`?null:`res-${e.id}`),onSelect:t=>ie(n=>({...n,[e.id]:{...n[e.id],aspectRatio:n[e.id]?.aspectRatio||``,resolution:t}})),onClose:()=>pe(null)})]}),(0,$.jsxs)(vD,{type:`primary`,size:`large`,icon:(0,$.jsx)(L6,{}),block:!0,loading:x[e.id],disabled:a===`video`&&(!q[e.id]?.aspectRatio||!q[e.id]?.resolution),onClick:async()=>{let t=q[e.id];if(a===`video`){if(!t?.aspectRatio||!t?.resolution){Z.error(`请选择比例和分辨率`);return}if(ht({...t,[e.id]:!0})),T(t=>({...t,[e.id]:`generating`}));let n=a===`video`?`视频`:`图片`;Z.loading({content:`「${pt}」正在生成${n}...`,duration:0,key:e.id});try{await c(e.id,{aspectRatio:t?.aspectRatio,resolution:t?.resolution}),T(t=>({...t,[e.id]:`done`})),Z.success({content:`「${pt}」${n}生成成功!`,key:e.id,duration:3})}catch{T(t=>({...t,[e.id]:`failed`})),Z.error({content:`「${pt}」${n}生成失败`,key:e.id,duration:3})}finally{C(t=>({...t,[e.id]:!1}))}},style:{borderRadius:12,fontWeight:600,color:`#fff`,height:48,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,position:`absolute`,bottom:18,left:0},children:[`生成`,a===`video`?`视频`:`图片`,a===`video`?(0,$.jsx)(`span`,{style:{color:`#d2d2d2`,fontSize:`14px`,marginLeft:`6px`},children:`(请选择上方的比例分辨率)`}):``,` `,a===`video`&&q[e.id]?.resolution?`(${Ie(e.duration||5,q[e.id].resolution)}积分)`:``,a===`image`&&e.imageSize?`(${Le(e.imageSize)}积分)`:a===`image`?`(积分)`:``]})]}),n===`failed`&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:18,right:20},children:(0,$.jsxs)(vD,{type:`primary`,danger:!0,size:`large`,icon:(0,$.jsx)(S6,{}),block:!0,loading:x[e.id],onClick:()=>kt(e.id),style:{borderRadius:12,fontWeight:600,height:48},children:[`重新生成`,a===`video`?`视频`:`图片`]})}),n===`generating`?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`linear-gradient(135deg, rgba(99,102,241,0.04), rgba(139,92,246,0.04))`,border:`1px dashed rgba(99,102,241,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10},children:[(0,$.jsx)(Xm,{style:{color:`#6366f1`,fontSize:28},spin:!0}),(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:[a===`video`?`视频`:`图片`,`生成中...`]})]}):n===`completed`&&e.videoUrl||e.imageUrl?(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,border:`1px solid #f0f0f5`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:10,right:10,zIndex:10},children:(0,$.jsx)($w,{title:`下载${a===`video`?`视频`:`图片`}`,children:(0,$.jsx)(vD,{size:`small`,icon:(0,$.jsx)(p0,{}),onClick:()=>{let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${a===`video`?e.videoUrl:e.imageUrl}&download=1`,t.download=`${e.projectName}${a===`video`?`.mp4`:`.png`}`,t.click()},style:{background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,backdropFilter:`blur(4px)`,borderRadius:8},children:`下载`})})}),(0,$.jsx)(`div`,{style:{minHeight:180,overflow:`hidden`},children:a===`video`?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.videoUrl}`,controls:!0,preload:`metadata`,style:{width:`100%`,height:`400px`,borderRadius:0}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.imageUrl}`,alt:e.projectName,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`,borderRadius:0}})}),(0,$.jsxs)(`div`,{style:{padding:`8px 12px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:`#fafbff`},children:[(0,$.jsxs)(DU,{children:[a===`video`?(0,$.jsx)(Y8,{style:{color:`#6366f1`,fontSize:13}}):(0,$.jsx)(p6,{style:{color:`#6366f1`,fontSize:13}}),(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#475569`},children:e.projectName})]}),e.generatedAt&&(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:11,color:`#94a3b8`},children:a9(e.generatedAt)})]})]}):n===`failed`?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`rgba(239,68,68,0.03)`,border:`1px dashed rgba(239,68,68,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10,padding:16},children:[(0,$.jsx)(s4,{style:{color:`#ef4444`,fontSize:28}}),(0,$.jsxs)(Q.Text,{style:{color:`#ef4444`,fontSize:14,fontWeight:600},children:[a===`video`?`视频`:`图片`,`生成失败`]}),e.errorMessage&&(0,$.jsx)(Q.Text,{style:{color:`#ef4444`,fontSize:12,textAlign:`center`,lineHeight:1.6},children:e.errorMessage})]}):(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`#f8f9fc`,border:`1px dashed #e2e8f0`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10},children:[(0,$.jsx)(OH,{style:{color:`#94a3b8`,fontSize:28}}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:a===`image`?`待生成图片`:n===`prompt_optimized`?`待配置视频参数`:`待生成视频`})]})]})]})})]},e.id)})})]}),(0,$.jsx)(Pq,{open:!!J,onCancel:()=>ae(null),footer:null,width:480,centered:!0,destroyOnClose:!0,closable:!1,title:null,styles:{body:{padding:0,background:`#000`,position:`relative`}},children:J&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:J,controls:!0,autoPlay:!0,style:{width:`100%`,display:`block`,maxHeight:`70vh`}}),(0,$.jsx)(`div`,{onClick:()=>ae(null),style:{position:`absolute`,top:8,right:8,width:28,height:28,borderRadius:`50%`,background:`rgba(0,0,0,0.6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,transition:`background 0.15s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(0,0,0,0.85)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(0,0,0,0.6)`},children:(0,$.jsx)(s4,{style:{color:`#fff`,fontSize:16}})})]})})]})},l9={optimizing:{color:`processing`,text:`优化中`,icon:(0,$.jsx)(Xm,{spin:!0})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,$.jsx)(OH,{})},generating:{color:`warning`,text:`生成中`,icon:(0,$.jsx)(Xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,$.jsx)(i4,{})},failed:{color:`error`,text:`失败`,icon:(0,$.jsx)(s4,{})}},_te=()=>{let{records:e,projects:t,fetchRecords:n,fetchProjects:r,generateVideo:i}=i9(),a=e.items,[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(10),[u,d]=(0,S.useState)({}),[f,p]=(0,S.useState)(void 0),[m,h]=(0,S.useState)(void 0),[g,_]=(0,S.useState)({}),[v,y]=(0,S.useState)(null),[b,x]=(0,S.useState)(null),[C,w]=(0,S.useState)(null);(0,S.useEffect)(()=>{r()},[r]),(0,S.useEffect)(()=>{n({projectId:f,status:m,page:o,pageSize:c})},[n,f,m,o,c]);let T=async()=>{if(!C)return;let{recordId:e,projectName:t,ratio:n,resolution:r}=C;d(t=>({...t,[e]:!0})),w(null),Z.loading({content:`「${t}」正在生成视频...`,duration:0,key:e});try{await i(e,{aspectRatio:n,resolution:r}),Z.success({content:`「${t}」视频生成成功!`,key:e,duration:3})}catch{Z.error({content:`「${t}」视频生成失败`,key:e,duration:3})}finally{d(t=>({...t,[e]:!1}))}},E=e=>{if((e.genType||`image`)===`image`){d(t=>({...t,[e.id]:!0})),Z.loading({content:`「${e.projectName}」正在生成图片...`,duration:0,key:e.id}),i(e.id,{}).then(()=>{Z.success({content:`「${e.projectName}」图片生成成功!`,key:e.id,duration:3})}).catch(()=>{Z.error({content:`「${e.projectName}」图片生成失败`,key:e.id,duration:3})}).finally(()=>{d(t=>({...t,[e.id]:!1}))});return}w({recordId:e.id,projectName:e.projectName,ratio:e.aspectRatio||`16:9`,resolution:e.resolution||`720p`})},D=a;return(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#94a3b8`},children:`查看所有视频生成记录,点击记录查看完整内容和视频`})}),(0,$.jsxs)(`div`,{className:`record-filter-bar animate-fadeInUp`,style:{display:`flex`,gap:12,marginBottom:20,padding:`14px 20px`,borderRadius:14,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(DU,{children:[(0,$.jsx)(K4,{style:{color:`#94a3b8`}}),(0,$.jsx)(lw,{placeholder:`全部项目`,allowClear:!0,style:{width:200},onChange:e=>{p(e),s(1)},children:t.map(e=>(0,$.jsx)(lw.Option,{value:e.id,children:e.name},e.id))}),(0,$.jsxs)(lw,{placeholder:`全部状态`,allowClear:!0,style:{width:140},onChange:e=>{h(e),s(1)},children:[(0,$.jsx)(lw.Option,{value:`prompt_optimized`,children:`待生成`}),(0,$.jsx)(lw.Option,{value:`generating`,children:`生成中`}),(0,$.jsx)(lw.Option,{value:`completed`,children:`已完成`}),(0,$.jsx)(lw.Option,{value:`failed`,children:`失败`})]})]}),(0,$.jsxs)(Q.Text,{style:{marginLeft:`auto`,lineHeight:`32px`,color:`#94a3b8`,fontSize:13},children:[`共 `,e.total,` 条记录`]})]}),D.length===0?(0,$.jsx)(NC,{image:NC.PRESENTED_IMAGE_SIMPLE,description:`暂无生成记录`,style:{padding:60}}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},className:`stagger-children`,children:D.map((e,t)=>{let n=v===e.id,r=g[e.id]??e.optimizedPrompt,i=u[e.id],a=b===e.id,o=e.genType||`image`;return(0,$.jsxs)(`div`,{className:`animate-slideInCard`,style:{animationDelay:`${t*.04}s`},children:[(0,$.jsxs)(`div`,{className:`record-item`,onClick:()=>x(a?null:e.id),style:{padding:`14px 20px`,borderRadius:a?`14px 14px 0 0`:14,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,transition:`all 0.2s`,display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,background:o===`image`?`#fef3c7`:`#dbeafe`},children:o===`image`?(0,$.jsx)(p6,{style:{color:`#d97706`,fontSize:12}}):(0,$.jsx)(Y8,{style:{color:`#2563eb`,fontSize:12}})}),a?(0,$.jsx)(wQ,{style:{color:`#6366f1`,fontSize:12,flexShrink:0}}):(0,$.jsx)(t4,{style:{color:`#cbd5e1`,fontSize:12,flexShrink:0}}),(0,$.jsx)(T$,{color:l9[e.status].color,icon:l9[e.status].icon,style:{margin:0},children:l9[e.status].text}),(0,$.jsx)(T$,{style:{background:`#f0f0ff`,border:`none`,color:`#6366f1`,margin:0},children:e.projectName}),(0,$.jsx)(Q.Text,{style:{flex:1,fontSize:13,color:`#475569`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:r}),o===`image`?(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.imageSize}`:`-`,` · `,e.imageProportion||`-`,` · `,e.imagePx||`-`,` · `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:a9(e.createdAt)})]}):(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.duration}秒`:`-`,` · `,e.aspectRatio||`-`,` · `,e.resolution||`-`,` · `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:a9(e.createdAt)})]}),(0,$.jsx)(`div`,{className:`record-actions`,onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(DU,{children:[e.status===`prompt_optimized`&&(0,$.jsx)(vD,{type:`primary`,size:`small`,icon:(0,$.jsx)(S6,{}),loading:i,onClick:()=>E(e),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`生成`}),e.status===`generating`&&(0,$.jsx)(T$,{color:`processing`,icon:(0,$.jsx)(Xm,{spin:!0}),style:{padding:`4px 12px`,fontSize:12},children:`生成中...`}),e.status===`failed`&&(0,$.jsx)(vD,{type:`primary`,danger:!0,size:`small`,icon:(0,$.jsx)(S6,{}),loading:i,onClick:()=>E(e),style:{borderRadius:8},children:`重试`})]})})]}),a&&(0,$.jsx)(`div`,{style:{background:`#fff`,border:`1px solid #f0f0f5`,borderTop:`none`,borderRadius:`0 0 14px 14px`,padding:`20px 24px`,animation:`fadeInUp 0.25s ease both`},children:(0,$.jsxs)(`div`,{className:`gen-detail-row`,style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 50%`,minWidth:280},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.7},children:e.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词 `,e.status===`prompt_optimized`&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!n&&(0,$.jsxs)(DU,{size:4,children:[(0,$.jsx)($w,{title:`复制`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(e1,{}),onClick:()=>{navigator.clipboard.writeText(r),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),e.status===`prompt_optimized`&&(0,$.jsx)($w,{title:`编辑`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(j$,{}),onClick:()=>{y(e.id),_(t=>({...t,[e.id]:t[e.id]??e.optimizedPrompt}))},style:{color:`#6366f1`}})})]})]}),n?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(nK.TextArea,{value:r,onChange:t=>_(n=>({...n,[e.id]:t.target.value})),rows:4,style:{borderRadius:10,fontSize:13,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(vD,{size:`small`,onClick:()=>y(null),children:`取消`}),(0,$.jsx)(vD,{size:`small`,type:`primary`,onClick:()=>{_(t=>({...t,[e.id]:r})),y(null),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:r})})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:16,padding:`12px 16px`,borderRadius:10,background:`#f8f9fc`},children:o===`image`?[{label:`分辨率`,value:e.imageSize?`${e.imageSize} `:`-`},{label:`画面比例`,value:e.imageProportion?`${e.imageProportion} `:`-`},{label:`画面尺寸`,value:e.imageProportion?`${e.imageProportion} `:`-`},{label:`消耗积分`,value:e.creditsCost?`${e.creditsCost} `:`-`,highlight:!!e.creditsCost}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:e.highlight?`#6366f1`:`#1a1a2e`},children:e.value})]},t)):[{label:`时长`,value:e.duration?`${e.duration} 秒`:`-`},{label:`画面比例`,value:e.aspectRatio||(e.status===`prompt_optimized`?`待选择`:`-`)},{label:`分辨率`,value:e.resolution||(e.status===`prompt_optimized`?`待选择`:`-`)},{label:`消耗积分`,value:e.creditsCost?`${e.creditsCost}`:`-`,highlight:!!e.creditsCost}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:e.highlight?`#6366f1`:`#1a1a2e`},children:e.value})]},t))}),e.status===`prompt_optimized`&&(0,$.jsx)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:(0,$.jsx)(vD,{type:`primary`,size:`large`,icon:(0,$.jsx)(L6,{}),loading:i,onClick:()=>E(e),style:{borderRadius:12,fontWeight:600,height:44,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.3)`},children:o===`video`?`选择参数生成视频`:`生成图片`})}),e.status===`failed`&&(0,$.jsx)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:(0,$.jsxs)(vD,{type:`primary`,danger:!0,size:`large`,icon:(0,$.jsx)(S6,{}),loading:i,onClick:()=>E(e),style:{borderRadius:12,fontWeight:600,height:44},children:[`重新生成`,o===`video`?`视频`:`图片`]})})]}),(0,$.jsx)(`div`,{style:{flex:`1 1 40%`,minWidth:240},children:e.status===`generating`?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`linear-gradient(135deg, rgba(99,102,241,0.04), rgba(139,92,246,0.04))`,border:`1px dashed rgba(99,102,241,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(Xm,{style:{color:`#6366f1`,fontSize:32},spin:!0}),(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:[o===`video`?`视频`:`图片`,`生成中...`]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:12},children:`请耐心等待,生成完成后将自动展示`})]}):e.status===`completed`&&(e.videoUrl||e.imageUrl)?(0,$.jsxs)(`div`,{style:{borderRadius:14,overflow:`hidden`,border:`1px solid #f0f0f5`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:10,right:10,zIndex:10},children:(0,$.jsx)($w,{title:`下载${o===`video`?`视频`:`图片`}`,children:(0,$.jsx)(vD,{size:`small`,icon:(0,$.jsx)(p0,{}),onClick:()=>{let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${o===`video`?e.videoUrl:e.imageUrl}&download=1`,t.download=`${e.projectName}${o===`video`?`.mp4`:`.png`}`,t.click()},style:{background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,backdropFilter:`blur(4px)`,borderRadius:8},children:`下载`})})}),(0,$.jsx)(`div`,{style:{minHeight:280,overflow:`hidden`},children:o===`video`?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.videoUrl}`,controls:!0,preload:`metadata`,style:{width:`100%`,height:`400px`,display:`block`}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.imageUrl}`,alt:e.projectName,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`,display:`block`}})}),(0,$.jsxs)(`div`,{style:{padding:`10px 14px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:`#fafbff`},children:[(0,$.jsxs)(DU,{children:[o===`video`?(0,$.jsx)(Y8,{style:{color:`#6366f1`}}):(0,$.jsx)(p6,{style:{color:`#6366f1`}}),(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#475569`},children:e.projectName})]}),e.generatedAt&&(0,$.jsxs)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:12,color:`#94a3b8`},children:[`生成于 `,a9(e.generatedAt)]})]})]}):e.status===`failed`?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`rgba(239,68,68,0.03)`,border:`1px dashed rgba(239,68,68,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(s4,{style:{color:`#ef4444`,fontSize:32}}),(0,$.jsxs)(Q.Text,{style:{color:`#ef4444`,fontSize:14},children:[o===`video`?`视频`:`图片`,`生成失败`]}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:12},children:`请在左侧点击重新生成`})]}):(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`#f8f9fc`,border:`1px dashed #e2e8f0`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(OH,{style:{color:`#94a3b8`,fontSize:32}}),(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:[`待生成`,o===`video`?`视频`:`图片`]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:12},children:`点击左侧生成按钮开始生成`})]})})]})})]},e.id)})}),e.total>0&&(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:18},children:(0,$.jsx)(HK,{current:e.page||o,pageSize:e.pageSize||c,total:e.total,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{s(e),l(t)}})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(L6,{}),`生成视频`]}),open:!!C,onCancel:()=>w(null),onOk:T,okText:`提交生成`,cancelText:`取消`,width:420,children:C&&(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:(()=>{let e=a.find(e=>e.id===C.recordId);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`时长`}),(0,$.jsxs)(Q.Text,{strong:!0,children:[e?.duration||5,`秒`]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`画面比例`}),(0,$.jsx)(lw,{value:C.ratio,onChange:e=>w(t=>t?{...t,ratio:e}:null),style:{width:`100%`},options:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`].map(e=>({value:e,label:e}))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`分辨率`}),(0,$.jsx)(lw,{value:C.resolution,onChange:e=>w(t=>t?{...t,resolution:e}:null),style:{width:`100%`},options:[`480p`,`720p`,`1080p`].map(e=>({value:e,label:e}))})]})]})})()})})]})},u9=({value:e,duration:t=1200})=>{let[n,r]=(0,S.useState)(0),i=(0,S.useRef)(0);return(0,S.useEffect)(()=>{let a=n,o=e-a;if(o===0)return;let s=performance.now(),c=e=>{let n=e-s,l=Math.min(n/t,1);r(a+o*(1-(1-l)**3)),l<1&&(i.current=requestAnimationFrame(c))};return i.current=requestAnimationFrame(c),()=>cancelAnimationFrame(i.current)},[e]),(0,$.jsx)($.Fragment,{children:n.toLocaleString()})},vte=()=>{let{user:e}=$7(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(1),[s,c]=(0,S.useState)(10),[l,u]=(0,S.useState)(0);(0,S.useEffect)(()=>{(async()=>{i(!0);let e=await K5(a,s);n(e.records),u(e.total),i(!1)})()},[a,s]);let d=(e,t)=>{o(e),c(t)},f=t.filter(e=>e.type===`recharge`).reduce((e,t)=>e+t.amount,0),p=t.filter(e=>e.type===`consume`).reduce((e,t)=>e+Math.abs(t.amount),0);return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(wJ,{gutter:[16,16],style:{marginBottom:24},children:[(0,$.jsx)(fV,{xs:24,sm:8,children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:16,padding:24,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-20,top:-20,width:120,height:120,borderRadius:`50%`,background:`rgba(255,255,255,0.1)`}}),(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsxs)(DU,{style:{marginBottom:10},children:[(0,$.jsx)(Q8,{style:{color:`rgba(255,255,255,0.8)`,fontSize:16}}),(0,$.jsx)(`span`,{style:{color:`rgba(255,255,255,0.8)`,fontSize:14},children:`当前可用积分`})]}),(0,$.jsx)(`div`,{style:{color:`#fff`,fontSize:38,fontWeight:800,lineHeight:1},children:(0,$.jsx)(u9,{value:e?.credits??0})})]})]})}),(0,$.jsx)(fV,{xs:12,sm:8,children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:16,padding:24,background:`#fff`,border:`1px solid #f0f0f5`,animationDelay:`0.06s`},children:[(0,$.jsxs)(DU,{style:{marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:`rgba(16,185,129,0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(y2,{style:{color:`#10b981`,fontSize:14}})}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:14},children:`累计获得`})]}),(0,$.jsx)(`div`,{style:{color:`#10b981`,fontSize:28,fontWeight:800},children:(0,$.jsx)(u9,{value:f})})]})}),(0,$.jsx)(fV,{xs:12,sm:8,children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:16,padding:24,background:`#fff`,border:`1px solid #f0f0f5`,animationDelay:`0.12s`},children:[(0,$.jsxs)(DU,{style:{marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:`rgba(239,68,68,0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(p2,{style:{color:`#ef4444`,fontSize:14}})}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:14},children:`累计消耗`})]}),(0,$.jsx)(`div`,{style:{color:`#ef4444`,fontSize:28,fontWeight:800},children:(0,$.jsx)(u9,{value:p})})]})})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{animationDelay:`0.15s`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(j8,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`积分明细`})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(f$,{columns:[{title:`类型`,dataIndex:`type`,key:`type`,width:100,render:e=>(0,$.jsx)(T$,{color:e===`recharge`?`green`:`orange`,icon:e===`recharge`?(0,$.jsx)(y2,{}):(0,$.jsx)(p2,{}),children:e===`recharge`?`充值`:`消费`})},{title:`积分变动`,dataIndex:`amount`,key:`amount`,width:120,render:e=>(0,$.jsxs)(Q.Text,{strong:!0,style:{color:e>0?`#10b981`:`#ef4444`,fontSize:15},children:[e>0?`+`:``,e]})},{title:`说明`,dataIndex:`description`,key:`description`},{title:`时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,style:{color:`#94a3b8`},children:a9(e)})}],dataSource:t,rowKey:`id`,loading:r,pagination:{current:a,pageSize:s,total:l,onChange:d,showSizeChanger:!0,showTotal:e=>`共 ${e} 条`},scroll:{x:500}})})]})]})},yte=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(1),[u]=(0,S.useState)(10);(0,S.useEffect)(()=>{d()},[c]);let d=async()=>{t(!0);try{let e=await K5(c,u);r(e.records||[]),a(e.credits||0),s(e.total||0)}catch{r([])}t(!1)};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(wJ,{gutter:[16,16],style:{marginBottom:24},children:[(0,$.jsx)(fV,{xs:24,sm:8,children:(0,$.jsxs)(`div`,{style:{borderRadius:16,padding:24,background:`linear-gradient(135deg, #f59e0b 0%, #ea580c 100%)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-20,top:-20,width:120,height:120,borderRadius:`50%`,background:`rgba(255,255,255,0.1)`}}),(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:10},children:[(0,$.jsx)(Q8,{style:{color:`rgba(255,255,255,0.8)`,fontSize:16}}),(0,$.jsx)(`span`,{style:{color:`rgba(255,255,255,0.8)`,fontSize:14},children:`可用积分`})]}),(0,$.jsx)(`div`,{style:{color:`#fff`,fontSize:38,fontWeight:800,lineHeight:1},children:i.toLocaleString()})]})]})}),(0,$.jsx)(fV,{xs:12,sm:8,children:(0,$.jsxs)(`div`,{style:{borderRadius:16,padding:24,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:`rgba(16,185,129,0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(T6,{style:{color:`#10b981`,fontSize:14}})}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:14},children:`累计获得`})]}),(0,$.jsx)(`div`,{style:{color:`#10b981`,fontSize:28,fontWeight:800},children:n.filter(e=>e.amount>0).reduce((e,t)=>e+t.amount,0).toLocaleString()})]})}),(0,$.jsx)(fV,{xs:12,sm:8,children:(0,$.jsxs)(`div`,{style:{borderRadius:16,padding:24,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:`rgba(239,68,68,0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(j8,{style:{color:`#ef4444`,fontSize:14}})}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:14},children:`累计消耗`})]}),(0,$.jsx)(`div`,{style:{color:`#ef4444`,fontSize:28,fontWeight:800},children:n.filter(e=>e.amount<0).reduce((e,t)=>e+Math.abs(t.amount),0).toLocaleString()})]})})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(j8,{style:{color:`#f59e0b`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`积分明细`})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(lq,{spinning:e,children:n.length===0?(0,$.jsx)(NC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无积分变动记录`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(f$,{dataSource:n,columns:[{title:`变动类型`,dataIndex:`type`,key:`type`,width:120,render:e=>{let t={recharge:{color:`#10b981`,label:`充值`,bg:`rgba(16,185,129,0.1)`},consume:{color:`#ef4444`,label:`消费`,bg:`rgba(239,68,68,0.1)`},admin:{color:`#f59e0b`,label:`管理员调整`,bg:`rgba(245,158,11,0.1)`},refund:{color:`#8b5cf6`,label:`退款`,bg:`rgba(139,92,246,0.1)`}}[e]||{color:`#64748b`,label:e,bg:`rgba(100,116,139,0.1)`};return(0,$.jsx)(T$,{color:t.color,style:{background:t.bg,fontWeight:500,padding:`4px 12px`},children:t.label})}},{title:`描述`,dataIndex:`description`,key:`description`,ellipsis:!0},{title:`变动积分`,dataIndex:`amount`,key:`amount`,width:120,align:`right`,render:e=>(0,$.jsxs)(Q.Text,{strong:!0,style:{fontWeight:700,color:e>0?`#10b981`:`#ef4444`,fontSize:15},children:[e>0?`+`:``,e]})},{title:`创建时间`,key:`createdAt`,width:180,render:(e,t)=>{let n=t.created_at||t.createdAt||t.create_time||t.createTime;return n?new Date(n).toLocaleString(`zh-CN`):`-`}}],rowKey:`id`,pagination:!1,bordered:!1}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(HK,{current:c,pageSize:u,total:o,onChange:e=>{l(e)},size:`small`})})]})})})]})]})},bte=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(1),[c]=(0,S.useState)(10);(0,S.useEffect)(()=>{l()},[o]);let l=async()=>{t(!0);try{let e=await a7(o,c);r(e.items||[]),a(e.total||0)}catch{r([])}t(!1)};return(0,$.jsx)(`div`,{children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(MU,{style:{color:`#0ea5e9`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`订单记录`}),(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:[`共 `,n.length,` 条记录`]})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(lq,{spinning:e,children:n.length===0?(0,$.jsx)(NC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无订单记录`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(f$,{dataSource:n,columns:[{title:`订单号`,key:`orderNo`,width:200,render:(e,t)=>(0,$.jsx)(`span`,{style:{fontFamily:`monospace`,fontSize:13,color:`#64748b`},children:t.order_no||t.orderNo||t.id})},{title:`支付方式`,key:`paymentMethod`,width:100,render:(e,t)=>{let n=t.payment_method||t.paymentMethod||`wechat`,r={alipay:{icon:(0,$.jsx)(i2,{style:{fontSize:16}}),label:`支付宝`,color:`#1677ff`},wechat:{icon:(0,$.jsx)(i5,{style:{fontSize:16}}),label:`微信支付`,color:`#07c160`}},i=r[n]||r.wechat;return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{color:i.color},children:i.icon}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#374151`},children:i.label})]})}},{title:`金额`,key:`amount`,width:100,align:`right`,render:(e,t)=>{let n=t.amount||t.total_amount||0;return(0,$.jsxs)(Q.Text,{strong:!0,style:{fontWeight:700,fontSize:14,color:`#1e293b`},children:[`¥`,n]})}},{title:`获得积分`,key:`credits`,width:100,align:`center`,render:(e,t)=>{let n=t.credits||t.credit_amount||0;return(0,$.jsx)(Q.Text,{strong:!0,style:{fontWeight:600,fontSize:14,color:`#f59e0b`},children:n})}},{title:`状态`,key:`status`,width:100,render:(e,t)=>{let n=t.status||`pending`,r={pending:{color:`#f59e0b`,label:`待支付`,bg:`rgba(245,158,11,0.1)`},paid:{color:`#10b981`,label:`已支付`,bg:`rgba(16,185,129,0.1)`},refunded:{color:`#94a3b8`,label:`已退款`,bg:`rgba(148,163,184,0.1)`},failed:{color:`#ef4444`,label:`支付失败`,bg:`rgba(239,68,68,0.1)`},cancelled:{color:`#64748b`,label:`已取消`,bg:`rgba(100,116,139,0.1)`},processing:{color:`#0ea5e9`,label:`处理中`,bg:`rgba(14,165,233,0.1)`}}[n]||{color:`#64748b`,label:n,bg:`rgba(100,116,139,0.1)`};return(0,$.jsx)(T$,{color:r.color,style:{background:r.bg,fontWeight:500,padding:`4px 12px`},children:r.label})}},{title:`创建时间`,key:`createdAt`,width:180,render:(e,t)=>{let n=t.created_at||t.createdAt;return n?new Date(n).toLocaleString(`zh-CN`):`-`}},{title:`支付时间`,key:`paidAt`,width:180,render:(e,t)=>{let n=t.paid_at||t.paidAt;return n?new Date(n).toLocaleString(`zh-CN`):`-`}}],rowKey:`order_no`,pagination:!1,bordered:!1}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(HK,{current:o,pageSize:c,total:i,onChange:e=>{s(e)},size:`small`})})]})})})]})})},xte=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(1),[u]=(0,S.useState)(10);(0,S.useEffect)(()=>{d(),f()},[c]);let d=async()=>{t(!0);try{let e=await Z5(c,u);r(e.items||[]),s(e.total||0)}catch{r([])}t(!1)},f=async()=>{try{a(await Q5())}catch{a(0)}},p=async e=>{try{await $5(e),d(),f()}catch{}};return(0,$.jsx)(`div`,{children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(P2,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`消息中心`}),(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:[`未读 `,i,` 条`]})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(lq,{spinning:e,children:n.length===0?(0,$.jsx)(NC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无消息`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(f$,{dataSource:n,columns:[{title:`类型`,dataIndex:`type`,key:`type`,width:100,render:e=>{let t={system:{color:`#6366f1`,label:`系统`,bg:`rgba(99,102,241,0.1)`,icon:(0,$.jsx)(Y6,{style:{fontSize:14}})},credit:{color:`#f59e0b`,label:`积分`,bg:`rgba(245,158,11,0.1)`,icon:(0,$.jsx)(Q8,{style:{fontSize:14}})},promo:{color:`#8b5cf6`,label:`活动`,bg:`rgba(139,92,246,0.1)`,icon:(0,$.jsx)(i3,{style:{fontSize:14}})}},n=t[e]||t.system;return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{color:n.color},children:n.icon}),(0,$.jsx)(`span`,{style:{fontSize:13,color:n.color,fontWeight:500},children:n.label})]})}},{title:`标题`,dataIndex:`title`,key:`title`,ellipsis:!0},{title:`内容`,dataIndex:`content`,key:`content`,ellipsis:!0},{title:`状态`,dataIndex:`isRead`,key:`isRead`,width:80,render:(e,t)=>e??t.is_read?(0,$.jsx)(T$,{color:`gray`,style:{background:`rgba(148,163,184,0.1)`},children:`已读`}):(0,$.jsx)(T$,{color:`purple`,style:{background:`rgba(139,92,246,0.1)`},children:`未读`})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>{if(!e)return`-`;let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/(1e3*60*60));if(r<1)return`刚刚`;if(r<24)return`${r}小时前`;let i=Math.floor(r/24);return i<7?`${i}天前`:t.toLocaleDateString(`zh-CN`)}},{title:`操作`,key:`action`,width:100,render:(e,t)=>t.isRead??t.is_read?null:(0,$.jsx)(vD,{type:`text`,size:`small`,onClick:()=>p(t.id),style:{color:`#6366f1`},children:`标记已读`})}],rowKey:`id`,pagination:!1,bordered:!1}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(HK,{current:c,pageSize:u,total:o,onChange:e=>{l(e)},size:`small`})})]})})})]})})},d9=()=>{let[e]=Dn(),[t,n]=(0,S.useState)(`credits`);return(0,S.useEffect)(()=>{(e.get(`tab`)||`credits`)===`orders`?n(`orders`):n(`credits`)},[e]),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(mz,{activeKey:t,onChange:n,items:[{key:`credits`,label:`积分明细`},{key:`orders`,label:`订单记录`}],style:{marginBottom:24},size:`large`}),t===`credits`&&(0,$.jsx)(yte,{}),t===`orders`&&(0,$.jsx)(bte,{})]})},Ste=`/assets/bg1-CQh9PRPW.png`,Cte=`/assets/bg2-CNoKndHs.png`,{Header:wte,Sider:Tte,Content:Ete}=dK,{TextArea:Dte}=nK,{Option:f9}=lw,{Text:p9}=Q,Ote=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(`1`),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(``),{mediaType:c,countType:l,selectedRatio:u,selectedResolution:d,width:f,height:p,videoDuration:m,videoAspectRatio:h,videoResolution:g,engineOptions:_,enginesele:v,setMediaType:y,setCountType:b,setSelectedRatio:x,setSelectedResolution:C,setWidth:w,setHeight:T,setVideoDuration:E,setVideoAspectRatio:D,setVideoResolution:O,setEngineOptions:k,setEnginesele:A}=i9(),[j,M]=(0,S.useState)(!1),[N,P]=(0,S.useState)(!1),[F,I]=(0,S.useState)([]),[L,R]=(0,S.useState)(!1),[z,B]=(0,S.useState)(``),[V,H]=(0,S.useState)(`image`),U=(0,S.useRef)(null),[ee,te]=(0,S.useState)(new Set),ne=e=>{if(!e)return null;try{let t=new URL(e).searchParams.get(`exp`);return t?parseInt(t,10):null}catch{try{let t=e.indexOf(`?`);if(t!==-1){let n=e.substring(t+1),r=new URLSearchParams(n).get(`exp`);if(r)return parseInt(r,10)}return null}catch{return null}}},W=e=>{let t=ne(e);return t?Math.floor(Date.now()/1e3)>t:!1},[re,G]=(0,S.useState)(!1),[K,q]=(0,S.useState)(``),[ie,J]=(0,S.useState)(`image`),[ae,oe]=(0,S.useState)(``),[se,ce]=(0,S.useState)(!1),[le,ue]=(0,S.useState)(null),[de,fe]=(0,S.useState)({x:0,y:0}),[pe,me]=(0,S.useState)(!1),[he,ge]=(0,S.useState)(!1),[_e,ve]=(0,S.useState)([]),[ye,be]=(0,S.useState)([]),[xe,Se]=(0,S.useState)([]),[Ce,we]=(0,S.useState)(0),[Te,Ee]=(0,S.useState)(0),[De,Oe]=(0,S.useState)(!1),[ke,Ae]=(0,S.useState)([]),[je,Me]=(0,S.useState)([]),[Ne,Pe]=(0,S.useState)([]),Fe=()=>{let e={};return e=Ne.find(e=>e.modelConfigId===l&&e.genType===c&&e.resolution===(c===`video`?g:d)),e||(c===`video`?(e={perSecondCredits:2,baseCredits:60,ratio:1},g===`1080p`?e.ratio=2:g===`720p`?e.ratio=1.5:g===`480p`&&(e.ratio=1)):(e={perSecondCredits:.1,baseCredits:4,ratio:1},d===`2K`?e.ratio=1:d===`4K`&&(e.ratio=2))),c===`video`?Math.round((m*e.perSecondCredits+e.baseCredits)*e.ratio):e.baseCredits*e.ratio},Ie=(0,S.useRef)(null),Le=(0,S.useRef)(null),Re=(0,S.useRef)(null);(0,S.useRef)(!0),i.find(e=>e.id===n);let[ze,Be]=(0,S.useState)([]),[Ve,He]=(0,S.useState)({page:1,pageSize:20}),[Ue,We]=(0,S.useState)(0),[Ge,Ke]=(0,S.useState)(!1),qe=(0,S.useRef)(!1),Je=(0,S.useCallback)((e=`instant`)=>{let t=Le.current;t&&requestAnimationFrame(()=>{t.scrollTo({top:t.scrollHeight,behavior:e})})},[]);(0,S.useEffect)(()=>{if(ze.length>0&&!qe.current){let e=setTimeout(()=>{Je(`smooth`),qe.current=!0},300);return()=>clearTimeout(e)}},[ze.length,Je]),(0,S.useEffect)(()=>{let e=c===`image`?v.image:v.video;e&&e.length>0&&(e.some(e=>e.id===l)||b(e[0].id))},[c,v]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;De&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&Oe(!1),pe&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&me(!1),he&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&ge(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[De,pe,he]),(0,S.useEffect)(()=>{l7().then(e=>{if(A(e.engine),e.engine.video&&e.engine.video.length>0){let t=e.engine.video[0],n=e.engine.video.find(e=>e.id===l)||t;k({ratios:n.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:n.supportedResolutions||[`480p`,`720p`,`1080p`],durations:n.supportedDurations||[5,8,10,12,15]}),n.supportedRatios?.includes(h)||D(n.supportedRatios?.[0]||`16:9`),n.supportedResolutions?.includes(g)||O(n.supportedResolutions?.[0]||`720p`),n.supportedDurations?.includes(m)||E(n.supportedDurations?.[0]||5),l===`请选择`&&b(n.id)}}).catch(()=>{}),c7().then(e=>{Ae(e.video||[]),Me(e.image||[])}).catch(e=>{}),h7().then(e=>{Pe(e)}),d7(Ve).then(e=>{let t=e.items,n=e.total;Be(t),We(n)}),Y5().then(e=>{let t=e.items?.[0]?.supportedSizes||{},n=[],r=[],i=[];for(let e in t[`2K`])n.push(e),r.push(t[`2K`][e]);ve(n.map((e,t)=>({value:e,label:String(t)})));for(let e in t[`4K`])i.push(t[`4K`][e]);Se([r,i]),be([{value:`2K`,label:`高清 2K`},{value:`4K`,label:`超清 4K`}])}).catch(()=>{})},[]),(0,S.useEffect)(()=>{if(Re.current&&=(clearInterval(Re.current),null),ze.some(e=>e.status===`generating`))return Re.current=window.setInterval(()=>{d7(Ve).then(e=>{Be(t=>t.map(t=>t.status===`generating`&&e.items.find(e=>e.id===t.id)||t)),We(e.total)}).catch(e=>{})},1e4),()=>{Re.current&&=(clearInterval(Re.current),null)}},[ze,Ve]),(0,S.useEffect)(()=>{if(!pe)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&me(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[pe]),(0,S.useEffect)(()=>{if(!he)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&ge(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[he]),(0,S.useEffect)(()=>{xe[Te]&&xe[Te][Ce]!==void 0&&(w(Number(xe[Te][Ce].substring(0,4))),T(Number(xe[Te][Ce].substring(5))))},[Ce]),(0,S.useEffect)(()=>{xe[Te]&&xe[Te][Ce]!==void 0&&(w(Number(xe[Te][Ce].substring(0,4))),T(Number(xe[Te][Ce].substring(5))))},[Te]);let Ye=e=>{we(e)},Xe=e=>{Ee(parseInt(e===`2K`?`0`:`1`))},Ze=()=>{w(p),T(f)},Qe=async()=>{if(!o.trim()&&F.length===0){Z.warning(`请输入内容或上传图片/视频`);return}let e={id:``,gen_type:c,original_prompt:o.trim(),engine_id:l,idempotency_key:new Date().toLocaleString(`zh-CN`),media_references:F.length>0?[...F]:void 0,...c===`image`&&{image_size:d,image_proportion:u,image_px:f+`x`+p},...c===`video`&&{duration:m,aspect_ratio:h,resolution:g}};P(!0),u7(e).then(()=>{s(``),I([]);let e={...Ve,page:1};He(e),d7(e).then(e=>{Be(t=>[...t,e.items[e.items.length-1]]),We(e.total),setTimeout(()=>{Ie.current?.scrollIntoView({behavior:`smooth`})},100)}).catch(e=>{})}).catch(e=>{let t=`创建任务失败`;e?.response?.data?.detail?t=e.response.data.detail:e?.data?.detail?t=e.data.detail:e?.detail?t=e.detail:e?.message&&(t=e.message),Z.error({content:t,duration:3})}).finally(()=>{P(!1)}),setTimeout(()=>{P(!1)},3e3)},$e=async()=>{if(ze.length>=Ue)return;let e=Le.current;if(!e)return;let t=e.scrollTop,n=e.scrollHeight;Ke(!0);try{let r=Ve.page+1,i=await d7({...Ve,page:r}),a=Array.isArray(i)?{items:i,total:i.length}:i;a.total&&We(a.total),He(e=>({...e,page:r})),Be(e=>{let t=new Set(e.map(e=>e.id));return[...a.items.filter(e=>!e.id||t.has(e.id)?!1:(t.add(e.id),!0)),...e]}),setTimeout(()=>{e.scrollTop=t+(e.scrollHeight-n)},200)}catch{}finally{Ke(!1)}},et=async e=>{let t=e.type.startsWith(`image/`),n=e.type.startsWith(`video/`);if(!t&&!n)return Z.error(`仅支持图片或视频文件`),!1;let r=n?100:10;if(e.size/1024/1024>r)return Z.error(`${n?`视频`:`图片`}大小不能超过${r}MB`),!1;let i=F.filter(e=>e.type===`image`).length;if(t&&i>=4)return Z.error(`最多上传4张图片`),!1;let a=F.filter(e=>e.type===`video`).length;if(n&&a>=1)return Z.error(`最多上传1个视频`),!1;M(!0);try{let n=await(t?V5:H5)(e);I(r=>[...r,{name:e.name,type:t?`image`:`video`,url:n.url}]),Z.success(`${t?`图片`:`视频`}上传成功`)}catch{Z.error(`上传失败`)}finally{M(!1)}return!1},tt=e=>{I(t=>t.filter((t,n)=>n!==e))},nt=e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),Qe())},rt=()=>{R(!1),B(``),U.current&&U.current.pause()},it=e=>{if(e.preventDefault(),e.stopPropagation(),!z)return;let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${z}&download=1`,t.download=V===`image`?`image.png`:`video.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)};return(0,$.jsxs)(dK,{style:{margin:`-24px -32px -32px`,borderRadius:20,height:`calc(100vh - 34px)`,background:`linear-gradient(135deg, #f8fafc 0%, #f0f4ff 50%, #faf5ff 100%)`,backgroundImage:`url(${Cte})`,backgroundRepeat:`no-repeat`,backgroundSize:`100% 100%`,backgroundPosition:`center`},children:[!1,(0,$.jsxs)(dK,{style:{display:`flex`,flex:1,background:`transparent`},children:[(0,$.jsx)(wte,{style:{borderRadius:`20px 20px 0 0`,background:`rgba(255,255,255,0.1)`,backdropFilter:`blur(20px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`0 24px`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:36,height:36,borderRadius:12,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(P6,{style:{fontSize:18,color:`#fff`}})}),(0,$.jsx)(`div`,{children:(0,$.jsx)(p9,{strong:!0,style:{fontSize:16,background:`linear-gradient(90deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`开启创作`})})]})}),(0,$.jsxs)(Ete,{style:{flex:1,margin:0,padding:24,boxSizing:`border-box`,display:`flex`,flexDirection:`column`,overflow:`hidden`,minHeight:0},children:[ze.length===0&&(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,borderRadius:50,background:`linear-gradient(135deg, #6366f1 0%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,marginBottom:16},children:(0,$.jsx)(P6,{style:{fontSize:40,color:`#fff`}})}),(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:500,color:`#333`},children:`你好,想创作什么?`}),(0,$.jsx)(`p`,{style:{margin:8,fontSize:13,color:`#999`},children:`输入想法、剧本或上传参考,开始你的创作之旅`})]}),ze.length>0&&(0,$.jsxs)(`div`,{ref:Le,style:{flex:1,overflowY:`auto`,paddingRight:8},children:[(0,$.jsx)(`div`,{style:{padding:`8px 0`,textAlign:`center`,marginBottom:16},children:ze.length>=Ue?(0,$.jsx)(`span`,{style:{fontSize:12,color:`#999`},children:`消息全部加载`}):(0,$.jsx)(`button`,{onClick:$e,disabled:Ge,style:{fontSize:12,color:`#6366f1`,background:`none`,border:`none`,cursor:Ge?`not-allowed`:`pointer`},children:Ge?`加载中...`:`加载更多`})}),(()=>{let e=Z;return ze.map(t=>(0,$.jsx)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`flex-start`,marginBottom:16},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:36,height:36,borderRadius:12,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},children:(0,$.jsx)(P6,{style:{color:`#fff`,fontSize:16}})}),(0,$.jsx)(`div`,{style:{flex:1},children:(0,$.jsxs)(`div`,{style:{background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:`16px 16px 16px 4px`,padding:`12px 16px`,width:`70%`,minWidth:500,boxSizing:`border-box`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.08), 0 1px 3px rgba(0,0,0,0.04)`,position:`relative`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:[(0,$.jsxs)(`div`,{style:{margin:4,fontSize:11,color:`#999`,textAlign:`left`,display:`flex`,flexWrap:`wrap`,gap:8,alignItems:`center`},children:[(0,$.jsx)(`span`,{children:t.createdAt?.replace(`T`,` `).split(`.`)[0]}),(0,$.jsx)(`span`,{style:{background:t.genType===`image`?`rgba(34, 197, 94, 0.12)`:`rgba(249, 115, 22, 0.12)`,color:t.genType===`image`?`#22c55e`:`#f97316`,padding:`2px 8px`,borderRadius:12,fontWeight:500,fontSize:11,marginLeft:8},children:t.genType===`image`?`图片生成`:`视频生成`})]}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,zIndex:100},children:(0,$.jsx)(Rq,{title:`确定要删除吗?`,onConfirm:async()=>{try{await m7(t.id),e.success(`删除成功`),Be(e=>e.filter(e=>e.id!==t.id)),We(e=>e-1)}catch(t){let n=t?.response?.data?.message||t?.message||`删除失败`;e.error(n)}},okText:`确定`,cancelText:`取消`,children:(0,$.jsx)(`button`,{onClick:e=>e.stopPropagation(),style:{width:28,height:28,borderRadius:8,border:`none`,background:`rgba(99, 102, 241, 0.08)`,color:`#6366f1`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s ease`,padding:0},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`,e.currentTarget.style.color=`#ef4444`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.08)`,e.currentTarget.style.color=`#6366f1`},children:(0,$.jsx)(O$,{style:{fontSize:12}})})})}),(t.status===`generating`||t.status===`failed`||t.status===`completed`)&&(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:16,marginTop:16,width:`100%`,alignItems:`flex-start`},children:[(0,$.jsx)(`div`,{style:{width:`50%`,overflow:`hidden`,borderRadius:12,position:`relative`,height:220,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%)`},children:t.status===`generating`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:12,left:12,display:`flex`,alignItems:`center`,gap:8,zIndex:2}}),(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%)`,animation:`shimmer 2s infinite`}}),(0,$.jsxs)(`div`,{style:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,display:`flex`,flexDirection:`column`,alignItems:`center`,gap:16},children:[(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:`50%`,background:`rgba(99, 102, 241, 0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 0 30px rgba(99, 102, 241, 0.2)`},children:(0,$.jsx)(`div`,{style:{width:48,height:48,border:`3px solid #c7d2fe`,borderTopColor:`#6366f1`,borderRadius:`50%`,animation:`spin 1s linear infinite`}})}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`,fontWeight:500},children:`生成中...`})]})]}):t.status===`failed`?(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:`50%`,background:`rgba(254, 226, 226, 0.8)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(t5,{style:{color:`#ef4444`,fontSize:22}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#94a3b8`},children:`生成失败`})]}):(0,$.jsx)($.Fragment,{children:t.genType===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${t.imageUrl}&w=300&p=50`,alt:t.name,style:{width:`100%`,height:`100%`,borderRadius:12,objectFit:`contain`,cursor:`pointer`,transition:`transform 0.3s ease`},onClick:()=>{B(t.imageUrl),H(`image`),R(!0)},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.05)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${t.videoCoverUrl}&w=300&p=50`,alt:t.name,style:{width:`100%`,height:`100%`,borderRadius:12,objectFit:`contain`,cursor:`pointer`,transition:`transform 0.3s ease`},onClick:()=>{B(t.videoUrl),H(`video`),R(!0)},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.05)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,width:56,height:56,background:`rgba(99, 102, 241, 0.85)`,borderRadius:`50%`,display:`flex`,alignItems:`center`,justifyContent:`center`,pointerEvents:`none`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.4)`},children:(0,$.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`#fff`,children:(0,$.jsx)(`path`,{d:`M8 5v14l11-7z`})})})]})})}),(0,$.jsxs)(`div`,{style:{width:`50%`,display:`flex`,flexDirection:`column`,gap:12},children:[(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:12,padding:12,border:`1px solid rgba(99, 102, 241, 0.08)`,flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`p`,{style:{width:`100%`,height:150,overflow:`auto`,padding:0,marginTop:0,marginBottom:0,lineHeight:2,color:`#475569`,fontSize:13},children:t.originalPrompt})}),(0,$.jsxs)(`div`,{style:{fontSize:12,color:`#64748b`,textAlign:`left`,display:`flex`,flexWrap:`wrap`,gap:12,alignItems:`center`,justifyContent:`space-between`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{borderRadius:16,color:`#6366f1`,fontWeight:500},children:t.engineSnapshot.name}),(0,$.jsx)(`span`,{style:{borderRadius:16,color:`#64748b`},children:t.genType===`image`?`${t.imageProportion||``} · ${t.imagePx||``} · ${t.imageSize||``}`:`${t.duration||``}s · ${t.aspectRatio||``} · ${t.resolution||``}`}),(0,$.jsxs)(`span`,{style:{borderRadius:16,color:`#ef4444`,fontWeight:500},children:[`消耗积分:`,t.creditsCost]})]})]})]}),(0,$.jsx)(`div`,{style:{textAlign:`right`},children:t.mediaReferences&&t.mediaReferences.length>0&&(0,$.jsx)(`span`,{style:{padding:`4px 12px`,borderRadius:16,color:`#6366f1`,cursor:`pointer`,fontWeight:500,border:`1px solid rgba(99, 102, 241, 0.2)`,background:`rgba(99, 102, 241, 0.04)`},onClick:e=>{e.stopPropagation();let n=e.currentTarget.getBoundingClientRect();fe({x:n.left,y:n.top-10}),ue(t.id),ce(!0)},children:`附件详情`})})]})})]})},t.id))})(),(0,$.jsx)(`div`,{ref:Ie})]}),se&&le&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`transparent`,zIndex:9998},onClick:()=>{ce(!1),ue(null)}}),(0,$.jsxs)(`div`,{style:{position:`fixed`,top:de.y-100,left:de.x,background:`#fff`,borderRadius:12,boxShadow:`0 4px 20px rgba(0,0,0,0.15)`,padding:16,minWidth:200,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500},children:`附件列表`}),(0,$.jsx)(`button`,{onClick:()=>{ce(!1),ue(null)},style:{width:24,height:24,borderRadius:`50%`,border:`none`,background:`#ff4d4f`,cursor:`pointer`,fontSize:14,color:`#fff`,fontWeight:`bold`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s`},onMouseEnter:e=>{e.currentTarget.style.background=`#ff7875`,e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.background=`#ff4d4f`,e.currentTarget.style.transform=`scale(1)`},children:`×`})]}),ze.find(e=>e.id===le)?.mediaReferences?.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>{q(e.url),J(e.url.includes(`.mp4`)||e.url.includes(`.mov`)||e.url.includes(`.avi`)||e.url.includes(`.video`)?`video`:`image`),oe(e.name),G(!0),ce(!1),ue(null)},style:{display:`flex`,alignItems:`center`,gap:8,padding:`8px 12px`,borderRadius:6,cursor:`pointer`,fontSize:13,color:`#333`,transition:`background 0.2s`},onMouseEnter:e=>e.currentTarget.style.background=`#f5f5f5`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,children:[e.type===`image`?(0,$.jsx)(p6,{style:{color:`#3b82f6`,fontSize:14}}):(0,$.jsx)(Y8,{style:{color:`#f59e0b`,fontSize:14}}),e.name]},t))]})]}),(0,$.jsxs)(`div`,{style:{background:`rgba(255,255,255,0.1)`,backdropFilter:`blur(20px)`,borderRadius:24,padding:16,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.1), 0 2px 8px rgba(0,0,0,0.04)`,transition:`all 0.3s ease`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:[F.length>0&&(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,marginBottom:12,overflowX:`auto`},children:F.map((e,t)=>(0,$.jsxs)(`div`,{style:{position:`relative`,width:e.type===`video`?120:80,flexShrink:0},children:[e.type===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,alt:e.name,style:{width:`100%`,height:80,objectFit:`cover`,borderRadius:8}}):(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:80,objectFit:`cover`,borderRadius:8}}),(0,$.jsx)(`button`,{onClick:()=>tt(t),style:{position:`absolute`,top:0,right:0,width:20,height:20,border:`none`,background:`#ff4d4f`,borderRadius:50,cursor:`pointer`,color:`#fff`,fontSize:12,display:`flex`,alignItems:`center`,justifyContent:`center`},children:`×`})]},`media-${t}`))}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:`12px 16px`,backgroundColor:`rgba(248,250,252,0.6)`,borderRadius:16,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`,transition:`all 0.2s ease`},children:[(0,$.jsx)(y0,{accept:`image/*,video/*`,showUploadList:!1,beforeUpload:et,children:(0,$.jsx)($w,{title:`图片${F.filter(e=>e.type===`image`).length}/4,视频${F.filter(e=>e.type===`video`).length}/1`,children:(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:14,border:`2px dashed rgba(99, 102, 241, 0.2)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.25s ease`,flexShrink:0,backgroundColor:`rgba(255,255,255,0.7)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.backgroundColor=`rgba(99, 102, 241, 0.06)`,e.currentTarget.style.transform=`scale(1.05)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.2)`,e.currentTarget.style.backgroundColor=`rgba(255,255,255,0.7)`,e.currentTarget.style.transform=`scale(1)`},children:j?(0,$.jsx)(Xm,{style:{fontSize:18,color:`#6366f1`}}):(0,$.jsx)(gR,{style:{fontSize:18,color:`#64748b`}})})})}),(0,$.jsx)(Dte,{value:o,onChange:e=>s(e.target.value),onKeyPress:nt,placeholder:`上传最多4张参考图,输入提示词描述您想生成的画面...`,autoSize:{minRows:1,maxRows:4},style:{flex:1,height:`100%`,borderRadius:12,border:`none`,outline:`none`,boxShadow:`none`,fontSize:14,lineHeight:1.5,color:`#1e293b`},disabled:N}),(0,$.jsx)(vD,{type:`primary`,shape:`circle`,icon:(0,$.jsx)(K6,{}),onClick:Qe,disabled:!o.trim()&&F.length===0,loading:N,style:{flexShrink:0,width:48,height:48,borderRadius:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.4)`,transition:`all 0.2s ease`,border:`none`}})]}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginTop:12,paddingTop:12,borderTop:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsxs)(DU,{size:`middle`,children:[(0,$.jsxs)(lw,{value:c,onChange:e=>y(e),style:{width:100,height:34,outline:`none`,border:`none`,backgroundColor:`#f1f5f9`,borderRadius:10},size:`middle`,children:[(0,$.jsxs)(f9,{value:`image`,children:[(0,$.jsx)(p6,{style:{marginRight:6,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:`图片`})]}),(0,$.jsxs)(f9,{value:`video`,children:[(0,$.jsx)(Y8,{style:{marginRight:6,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:`视频`})]})]}),(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>Oe(!0),className:`image-settings-trigger`,style:{minWidth:200,padding:`6px 14px`,height:34,borderRadius:10,border:`none`,backgroundColor:`#f1f5f9`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.boxShadow=`0 4px 12px rgba(99, 102, 241, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.15)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(99, 102, 241, 0.04)`},children:[(0,$.jsx)(Y6,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(p9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:c===`image`?v.image?.find(e=>e.id===l)?.name:v.video?.find(e=>e.id===l)?.name||`选择引擎`})]}),De&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:360,backgroundColor:`rgba(255,255,255,0.95)`,backdropFilter:`blur(20px)`,borderRadius:14,boxShadow:`0 12px 48px rgba(99, 102, 241, 0.15)`,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475569`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:(c===`image`?v.image:v.video)?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{b(e.id),c===`video`&&(k({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(h)||D(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(g)||O(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(m)||E(e.supportedDurations?.[0]||5)),Oe(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:l===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:l===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:l===e.id?600:500,color:l===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),c===`image`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>me(!pe),className:`image-settings-trigger`,style:{minWidth:220,padding:`4px 12px`,height:34,borderRadius:8,border:`none`,backgroundColor:`#f1f5f9`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(j3,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsxs)(p9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[u===`auto`?`智能`:u,` · `,d==`2K`?`2K高清`:`4K超清`,` · `,f,`×`,p]})]}),pe&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:480,backgroundColor:`rgba(255,255,255,0.95)`,backdropFilter:`blur(20px)`,borderRadius:14,boxShadow:`0 12px 48px rgba(99, 102, 241, 0.15)`,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:_e.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{x(e.value),Ye(e.label)},style:{flex:`0 0 calc(11.11% - 4px)`,minWidth:44,height:52,borderRadius:6,border:u===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:u===e.value?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:e.value===`auto`?14:18,height:e.value===`auto`?14:18,border:`2px solid ${u===e.value?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e.value===`auto`&&(0,$.jsx)(`span`,{style:{fontSize:7,color:u===e.value?`#6366f1`:`#9ca3af`},children:`智`})}),(0,$.jsx)(`span`,{style:{fontSize:9,color:u===e.value?`#6366f1`:`#6b7280`,fontWeight:u===e.value?600:400},children:e.value})]},e.value))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:ye.map(e=>(0,$.jsx)(`button`,{onClick:()=>{C(e.value),Xe(e.value)},style:{flex:1,height:42,borderRadius:6,border:d===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:d===e.value?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsxs)(`span`,{style:{fontSize:12,fontWeight:600,color:d===e.value?`#fff`:`#4b5563`},children:[e.value,e.value===`4K`&&(0,$.jsx)(`span`,{style:{marginLeft:2},children:`✨`})]})},e.value))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`尺寸`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:120},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:11,marginRight:4},children:`W`}),(0,$.jsx)(nK,{value:f,onChange:e=>w(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:12,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`button`,{onClick:Ze,style:{width:24,height:24,borderRadius:4,border:`1px solid #e5e7eb`,backgroundColor:`#fff`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:`#6366f1`},children:(0,$.jsx)(oG,{style:{fontSize:10}})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:120},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:11,marginRight:4},children:`H`}),(0,$.jsx)(nK,{value:p,onChange:e=>T(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:12,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:11},children:`PX`})]})]})]})]}),c===`video`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>ge(!he),className:`image-settings-trigger`,style:{minWidth:220,padding:`4px 12px`,height:34,borderRadius:8,border:`none`,backgroundColor:`#f1f5f9`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(j3,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsxs)(p9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[h,` · `,m,`s · `,g]})]}),he&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:400,backgroundColor:`rgba(255,255,255,0.95)`,backdropFilter:`blur(20px)`,borderRadius:14,boxShadow:`0 12px 48px rgba(99, 102, 241, 0.15)`,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:_.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>D(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:h===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:h===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${h===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:h===e?`#6366f1`:`#6b7280`,fontWeight:h===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(m-Math.min(..._.durations))/(Math.max(..._.durations)-Math.min(..._.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(..._.durations),max:Math.max(..._.durations),value:m,onChange:e=>E(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:m}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:_.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>O(e),style:{flex:1,height:42,borderRadius:6,border:g===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:g===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:g===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`6px 14px`,backgroundColor:`rgba(99, 102, 241, 0.06)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsx)(p9,{style:{fontSize:13,color:`#6366f1`,fontWeight:500},children:`预估积分`}),(0,$.jsx)(p9,{style:{fontSize:14,color:`#6366f1`,fontWeight:600},children:Fe()})]})]})})]})]})]}),(0,$.jsx)(`style`,{children:` @keyframes blink { 0%, 50% { opacity: 1; } diff --git a/video-gen-app/dist/index.html b/video-gen-app/dist/index.html index 29166543..9422e821 100644 --- a/video-gen-app/dist/index.html +++ b/video-gen-app/dist/index.html @@ -28,7 +28,7 @@ } })(); - + diff --git a/video-gen-app/src/components/Layout/AppLayout.tsx b/video-gen-app/src/components/Layout/AppLayout.tsx index 19aaeb4b..e2c9166a 100644 --- a/video-gen-app/src/components/Layout/AppLayout.tsx +++ b/video-gen-app/src/components/Layout/AppLayout.tsx @@ -172,7 +172,7 @@ const AppLayout: React.FC = () => { const [enabledMethods, setEnabledMethods] = useState<{ alipay: boolean; wechat: boolean }>({ alipay: false, wechat: false }); const [contactModalOpen, setContactModalOpen] = useState(false); const [contactForm] = Form.useForm(); - const [contactExpanded, setContactExpanded] = useState(true); + const [contactHovered, setContactHovered] = useState(false); const [submittingContact, setSubmittingContact] = useState(false); // LocalStorage keys @@ -1009,61 +1009,32 @@ const AppLayout: React.FC = () => {
- {contactExpanded && ( -
-
- - 联系我们 -
-
-
商务咨询
-
400-888-8888
-
- -
- )} +
+ 联系我们 +
From af932cce332eb4d6d2d885b07235dcbf7a1e8228 Mon Sep 17 00:00:00 2001 From: wwwwwwwww <526125649@qq.com> Date: Fri, 26 Jun 2026 12:22:50 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=99=BB=E9=99=86?= =?UTF-8?q?=E7=A7=AF=E5=88=86=E5=92=8C=E6=AF=8F=E6=97=A5=E7=AD=BE=E5=88=B0?= =?UTF-8?q?=E7=A7=AF=E5=88=86=E8=AE=B0=E5=BD=95=E4=BF=9D=E5=AD=98=E5=92=8C?= =?UTF-8?q?=E8=81=94=E7=B3=BB=E6=88=91=E4=BB=AC=E6=95=B0=E6=8D=AE=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{index-DHcd1Fwz.js => index-BLuHlLoF.js} | 2 +- video-gen-admin/dist/index.html | 2 +- .../src/pages/AdminContactRequests.tsx | 32 +++++++++---------- video-gen-api/app/api/v1/auth.py | 26 +++++++++++++++ video-gen-api/app/api/v1/contact.py | 2 +- 5 files changed, 45 insertions(+), 19 deletions(-) rename video-gen-admin/dist/assets/{index-DHcd1Fwz.js => index-BLuHlLoF.js} (99%) diff --git a/video-gen-admin/dist/assets/index-DHcd1Fwz.js b/video-gen-admin/dist/assets/index-BLuHlLoF.js similarity index 99% rename from video-gen-admin/dist/assets/index-DHcd1Fwz.js rename to video-gen-admin/dist/assets/index-BLuHlLoF.js index 90d80743..ae31bd7e 100644 --- a/video-gen-admin/dist/assets/index-DHcd1Fwz.js +++ b/video-gen-admin/dist/assets/index-BLuHlLoF.js @@ -540,4 +540,4 @@ MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...\r 你是一位专业的电商视频文案专家,擅长将产品卖点转化为视觉语言`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`skills_wentutujie_image`,label:`文图理解生成图片提示词`,extra:`用于LLM优化图片提示词的系统指令,根据行业特点引导AI理解文案与画面的关系`,children:(0,Q.jsx)(hW.TextArea,{rows:3,placeholder:`请输入文图理解生成图片提示词,例如: 你是一位专业的电商图片文案专家,擅长将产品卖点转化为图片生成提示词`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{marginBottom:8},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:`行业选项配置`}),(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`添加选项组,每组包含名称和多个选项,前台将显示为下拉选择`})]}),(0,Q.jsx)(X.List,{name:`optionGroups`,children:(e,{add:t,remove:n})=>(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8,marginBottom:16},children:[e.map(({key:e,name:t,...r})=>(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`flex-start`,padding:`10px 12px`,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,gap:8},children:[(0,Q.jsx)(X.Item,{...r,name:[t,`name`],label:`选项名称`,style:{marginBottom:0},rules:[{required:!0,message:`请输入选项名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:视频风格`,size:`middle`,style:{borderRadius:8}})}),(0,Q.jsx)(X.Item,{...r,name:[t,`options`],label:`选项内容`,style:{marginBottom:0},children:(0,Q.jsx)(RC,{mode:`tags`,size:`middle`,placeholder:`输入选项后回车添加`,style:{borderRadius:8},tokenSeparators:[`,`,`,`,`、`]})})]}),(0,Q.jsx)(k4,{onClick:()=>n(t),style:{color:`#ef4444`,fontSize:16,marginTop:34,cursor:`pointer`,flexShrink:0}})]},e)),(0,Q.jsx)(qE,{type:`dashed`,onClick:()=>t(),block:!0,icon:(0,Q.jsx)(TL,{}),style:{borderRadius:8,height:36},children:`添加选项组`})]})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`is_active`,label:`启用状态`,valuePropName:`checked`,initialValue:!0,style:{flex:1},children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{name:`sort_order`,label:`排序`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(hW,{type:`number`,size:`large`})})]})]})})]})};function x7(e){if(Array.isArray(e))return e;if(typeof e==`string`)try{return JSON.parse(e)}catch{return[]}return[]}var Dne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,engine:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await O8()).map(e=>({...e,supportedRatios:x7(e.supportedRatios),supportedResolutions:x7(e.supportedResolutions),supportedDurations:x7(e.supportedDurations)})))}catch{LG.error(`加载视频引擎失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={name:e.name,provider:e.provider,api_base:e.apiBase,api_key:e.apiKey,model_name:e.modelName,supported_ratios:JSON.stringify(e.supportedRatios||[]),supported_resolutions:JSON.stringify(e.supportedResolutions||[]),supported_durations:JSON.stringify(e.supportedDurations||[]),is_active:e.isActive??!0,priority:e.priority??0};i.engine?(await k8({id:i.engine.id,...t}),LG.success(`已更新`)):(await k8(t),LG.success(`已添加`)),a({open:!1,engine:null}),o.resetFields(),s()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},l=async e=>{try{await A8(e),LG.success(`已删除`),s()}catch{LG.error(`删除失败`)}},u=e=>{a({open:!0,engine:e||null}),e?o.setFieldsValue(e):(o.resetFields(),o.setFieldsValue({isActive:!0,priority:0,supportedRatios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],supportedResolutions:[`480p`,`720p`,`1080p`],supportedDurations:[4,5,6,7,8,9,10,11,12,13,14,15]}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(X4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`视频引擎配置`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 个引擎`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加引擎`})]}),(0,Q.jsx)(bQ,{columns:[{title:`引擎名称`,key:`name`,width:180,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsx)(`div`,{style:{width:36,height:36,borderRadius:8,background:t.isActive?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`linear-gradient(135deg, #94a3b8, #cbd5e1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:16},children:(0,Q.jsx)(X4,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.provider})]})]})},{title:`支持比例`,dataIndex:`supportedRatios`,width:200,render:e=>(0,Q.jsx)(VV,{size:2,wrap:!0,children:e.map(e=>(0,Q.jsx)(NQ,{children:e},e))})},{title:`支持分辨率`,dataIndex:`supportedResolutions`,width:150,render:e=>(0,Q.jsx)(VV,{size:2,wrap:!0,children:e.map(e=>(0,Q.jsx)(NQ,{color:`blue`,children:e},e))})},{title:`支持时长`,dataIndex:`supportedDurations`,width:120,render:e=>(0,Q.jsx)(NQ,{color:`orange`,children:e?.length?`${Math.min(...e)}-${Math.max(...e)}s`:`-`})},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(X4,{}),i.engine?`编辑引擎`:`添加引擎`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,engine:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:620,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`引擎名称`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`Seedance 2.0`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`provider`,label:`提供商`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`ark`,label:`火山引擎 (Ark)`}]})})]}),(0,Q.jsx)(X.Item,{name:`apiBase`,label:`API基础地址`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`apiKey`,label:`API Key`,children:(0,Q.jsx)(hW.Password,{placeholder:`sk-****`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`modelName`,label:`模型名称`,children:(0,Q.jsx)(hW,{placeholder:`doubao-seedance-2-0-260128`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`supportedRatios`,label:`支持比例`,children:(0,Q.jsx)(RC,{mode:`multiple`,size:`large`,options:[{value:`16:9`,label:`16:9 (横屏)`},{value:`4:3`,label:`4:3 (标准)`},{value:`1:1`,label:`1:1 (方形)`},{value:`3:4`,label:`3:4 (竖版)`},{value:`9:16`,label:`9:16 (竖屏)`},{value:`21:9`,label:`21:9 (超宽)`}]})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`supportedResolutions`,label:`支持分辨率`,style:{flex:1},children:(0,Q.jsx)(RC,{mode:`multiple`,size:`large`,options:[{value:`480p`},{value:`720p`},{value:`1080p`}]})}),(0,Q.jsx)(X.Item,{name:`supportedDurations`,label:`支持时长(秒)`,style:{flex:1},children:(0,Q.jsx)(RC,{mode:`multiple`,size:`large`,options:Array.from({length:12},(e,t)=>({value:t+4,label:`${t+4}秒`}))})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`priority`,label:`优先级`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:0,label:`0 (默认)`},{value:1,label:`1`},{value:2,label:`2`},{value:3,label:`3`},{value:5,label:`5`},{value:10,label:`10 (最高)`}]})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,style:{paddingTop:30},children:(0,Q.jsx)(Mq,{})})]})]})})]})};function One(e){if(Array.isArray(e))return e;if(typeof e==`string`)try{return JSON.parse(e)}catch{return[]}return[]}function kne(e){if(e&&typeof e==`object`&&!Array.isArray(e))return e;if(typeof e==`string`)try{let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:{}}catch{return{}}return{}}var S7={"2K":{"1:1":`2048×2048`,"4:3":`2304×1728`,"3:4":`1728×2304`,"16:9":`2560×1440`,"9:16":`1600×2848`,"3:2":`2496×1664`,"2:3":`1664×2496`,"21:9":`3024×1296`},"4K":{"1:1":`4096×4096`,"4:3":`4608×3456`,"3:4":`3520×4704`,"16:9":`5404×3040`,"9:16":`3040×5504`,"3:2":`4992×3328`,"2:3":`3328×4992`,"21:9":`6197×2656`}},C7=[`1:1`,`4:3`,`3:4`,`16:9`,`9:16`,`3:2`,`2:3`,`21:9`],Ane=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,engine:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await j8()).map(e=>({...e,supportedModels:One(e.supportedModels),supportedSizes:kne(e.supportedSizes)})))}catch{LG.error(`加载图片引擎失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={};for(let n of[`2K`,`4K`]){let r=e[`size_${n}`]||[];if(r.length>0){t[n]={};for(let e of r)t[n][e]=S7[n]?.[e]||e}}let n={name:e.name,provider:e.provider,api_base:e.apiBase,api_key:e.apiKey,model_name:e.modelName,supported_models:JSON.stringify(e.supportedModels||[]),supported_sizes:JSON.stringify(t),default_size:e.defaultSize||`2K`,generate_url:e.generateUrl||``,is_active:e.isActive??!0,priority:e.priority??0};i.engine?(await M8({id:i.engine.id,...n}),LG.success(`已更新`)):(await M8(n),LG.success(`已添加`)),a({open:!1,engine:null}),o.resetFields(),s()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},l=async e=>{try{await N8(e),LG.success(`已删除`),s()}catch{LG.error(`删除失败`)}},u=e=>{if(a({open:!0,engine:e||null}),e){let t={};for(let n of[`2K`,`4K`])t[`size_${n}`]=Object.keys(e.supportedSizes?.[n]||{});o.setFieldsValue({...e,...t})}else o.resetFields(),o.setFieldsValue({isActive:!0,priority:0,supportedModels:[`doubao-seedream-5-0-260128`],defaultSize:`2K`,size_2K:C7,size_4K:C7})};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(W4,{style:{fontSize:18,color:`#10b981`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`图片引擎配置`}),(0,Q.jsxs)(NQ,{color:`green`,children:[e.length,` 个引擎`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加引擎`})]}),(0,Q.jsx)(bQ,{columns:[{title:`引擎名称`,key:`name`,width:180,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsx)(`div`,{style:{width:36,height:36,borderRadius:8,background:t.isActive?`linear-gradient(135deg, #10b981, #059669)`:`linear-gradient(135deg, #94a3b8, #cbd5e1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:16},children:(0,Q.jsx)(W4,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.modelName})]})]})},{title:`2K 支持比例`,key:`sizes_2k`,width:260,render:(e,t)=>{let n=Object.keys(t.supportedSizes?.[`2K`]||{});return n.length===0?(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`}):(0,Q.jsx)(VV,{size:2,wrap:!0,children:n.map(e=>(0,Q.jsxs)(NQ,{color:`blue`,children:[e,` `,t.supportedSizes[`2K`][e]]},e))})}},{title:`4K 支持比例`,key:`sizes_4k`,width:260,render:(e,t)=>{let n=Object.keys(t.supportedSizes?.[`4K`]||{});return n.length===0?(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`}):(0,Q.jsx)(VV,{size:2,wrap:!0,children:n.map(e=>(0,Q.jsxs)(NQ,{color:`purple`,children:[e,` `,t.supportedSizes[`4K`][e]]},e))})}},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:1e3}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(W4,{}),i.engine?`编辑引擎`:`添加引擎`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,engine:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:680,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`引擎名称`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`豆包文生图`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`provider`,label:`提供商`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`ark`,label:`火山引擎 (Ark)`}]})})]}),(0,Q.jsx)(X.Item,{name:`apiBase`,label:`API基础地址`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`apiKey`,label:`API Key`,children:(0,Q.jsx)(hW.Password,{placeholder:`sk-****`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`modelName`,label:`默认模型`,children:(0,Q.jsx)(hW,{placeholder:`doubao-seedream-5-0-260128`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`supportedModels`,label:`支持模型列表`,children:(0,Q.jsx)(RC,{mode:`tags`,size:`large`,placeholder:`输入模型ID后回车添加`,tokenSeparators:[`,`,`,`],options:[{value:`doubao-seedream-5-0-260128`}]})}),(0,Q.jsxs)(`div`,{style:{background:`#f8f9fc`,borderRadius:10,padding:16,marginBottom:8},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`尺寸配置`}),(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`勾选每个档位支持的比例,前台选择后传对应像素值给SDK`})]}),[`2K`,`4K`].map(e=>(0,Q.jsxs)(`div`,{style:{background:`#fafbfc`,borderRadius:10,padding:`12px 16px`,marginBottom:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13,color:e===`2K`?`#3b82f6`:`#8b5cf6`},children:e}),(0,Q.jsx)(X.Item,{name:`size_${e}`,style:{marginTop:8,marginBottom:0},children:(0,Q.jsx)(oz.Group,{style:{width:`100%`},children:(0,Q.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, 1fr)`,gap:`6px 0`},children:C7.map(t=>(0,Q.jsxs)(oz,{value:t,style:{fontSize:12},children:[t,` `,(0,Q.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:11},children:S7[e]?.[t]})]},t))})})})]},e)),(0,Q.jsx)(X.Item,{name:`defaultSize`,label:`默认尺寸档位`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`2K`,label:`2K`},{value:`4K`,label:`4K`}]})}),(0,Q.jsx)(X.Item,{name:`generateUrl`,label:`生成接口地址`,children:(0,Q.jsx)(hW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3/images/generations`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`priority`,label:`优先级`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:0,label:`0 (默认)`},{value:1,label:`1`},{value:2,label:`2`},{value:3,label:`3`},{value:5,label:`5`},{value:10,label:`10 (最高)`}]})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,style:{paddingTop:30},children:(0,Q.jsx)(Mq,{})})]})]})})]})},jne=[`2K`,`4K`],Mne=[`480p`,`720p`,`1080p`],Nne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)({open:!1,ratio:null}),[c]=X.useForm(),[l,u]=(0,S.useState)(10),[d,f]=(0,S.useState)(null),[p,m]=(0,S.useState)(!1),h=X.useWatch(`genType`,c)||`video`,g=X.useWatch(`modelConfigId`,c),_=async()=>{a(!0);try{let[e,n,i]=await Promise.all([P8(),y8(),_5()]),a=(i?.engine?.image||[]).map(e=>({...e,genType:`image`})),o=(i?.engine?.video||[]).map(e=>({...e,genType:`video`}));t(e),r([...o,...a]);let s=n.find(e=>e.key===`text_credits_per_1000_tokens`);s&&(u(Number(s.value)||10),f({id:s.id}))}catch{LG.error(`加载积分比例失败`)}finally{a(!1)}};(0,S.useEffect)(()=>{_()},[]);let v=(0,S.useMemo)(()=>n.filter(e=>e.genType===h).map(e=>({value:e.id,label:`${e.name}${e.modelName?`(${e.modelName})`:``}`})),[n,h]),y=(0,S.useMemo)(()=>n.find(e=>e.id===g&&e.genType===h),[n,h,g]),b=(0,S.useMemo)(()=>{if(h===`image`){let e=y?.supportedSizes?Object.keys(y.supportedSizes):[];return(e.length?e:jne).map(e=>({value:e,label:e}))}let e=y?.supportedResolutions||[];return(e.length?e:Mne).map(e=>({value:e,label:e}))},[h,y]),x=(e,t)=>n.find(n=>n.id===e&&(!t||n.genType===t))?.name||e,C=async()=>{try{let e=await c.validateFields(),t={model_config_id:e.modelConfigId,gen_type:e.genType,resolution:e.resolution,ratio:e.ratio,base_credits:e.baseCredits,per_second_credits:e.genType===`image`?0:e.perSecondCredits||0};o.ratio?(await F8({id:o.ratio.id,...t}),LG.success(`已更新`)):(await F8(t),LG.success(`已添加`)),s({open:!1,ratio:null}),c.resetFields(),_()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},w=async e=>{try{await I8(e),LG.success(`已删除`),_()}catch{LG.error(`删除失败`)}},T=async()=>{if(d){m(!0);try{await b8(d.id,String(l)),LG.success(`文字积分费率已更新`)}catch(e){LG.error(e?.message||`保存失败`)}finally{m(!1)}}},E=e=>{s({open:!0,ratio:e||null}),e?c.setFieldsValue({modelConfigId:e.modelConfigId,genType:e.genType===`image`?`image`:`video`,resolution:e.resolution,ratio:e.ratio,baseCredits:e.baseCredits,perSecondCredits:e.perSecondCredits}):(c.resetFields(),c.setFieldsValue({genType:`video`,ratio:1,baseCredits:60,perSecondCredits:2}))};return(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(M2,{style:{fontSize:18,color:`#f59e0b`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`文字积分费率`})]}),(0,Q.jsx)(qE,{type:`primary`,loading:p,onClick:T,style:{borderRadius:8},children:`保存`})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{display:`block`,marginBottom:16,fontSize:13},children:`文字积分计算公式:ceil(总token数 x 费率 / 1000),最低1积分`}),(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,Q.jsx)(Z.Text,{children:`每1000 token消耗积分:`}),(0,Q.jsxs)(VV.Compact,{style:{width:160},children:[(0,Q.jsx)(oB,{min:0,max:1e3,step:.01,value:l,onChange:e=>u(e||0),size:`large`,style:{width:`100%`}}),(0,Q.jsx)(Z.Text,{children:`积分`})]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[`示例:1000 token = `,l,` 积分,500 token = `,(500*l/1e3).toFixed(4),` 积分`]})]})]}),(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(C0,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`积分比例配置`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 条规则`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>E(),style:{borderRadius:8},children:`添加比例`})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{display:`block`,marginBottom:16,fontSize:13},children:`视频积分公式:(基础积分 + 每秒积分 x 视频时长) x 模型倍率;图片积分公式:基础积分 x 模型倍率`}),(0,Q.jsx)(bQ,{columns:[{title:`类型`,dataIndex:`genType`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e===`image`?`cyan`:`orange`,children:e===`image`?`图片`:`视频`})},{title:`引擎`,dataIndex:`modelConfigId`,width:180,render:(e,t)=>(0,Q.jsx)(NQ,{color:t.genType===`image`?`cyan`:`purple`,children:x(e,t.genType)})},{title:`分辨率/尺寸`,dataIndex:`resolution`,width:110,render:e=>(0,Q.jsx)(NQ,{color:{"480p":`blue`,"720p":`blue`,"1080p":`blue`,"4K":`green`,"2K":`green`}[e]||`default`,children:e})},{title:`倍率`,dataIndex:`ratio`,width:100,sorter:(e,t)=>e.ratio-t.ratio,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:e>=2?`#ef4444`:e>=1.5?`#f59e0b`:`#10b981`},children:[`x`,e]})},{title:`基础积分`,dataIndex:`baseCredits`,width:100,render:e=>(0,Q.jsxs)(Z.Text,{children:[e,` 积分`]})},{title:`每秒积分`,dataIndex:`perSecondCredits`,width:100,render:(e,t)=>(0,Q.jsx)(Z.Text,{children:t.genType===`image`?`-`:`${e} 积分/秒`})},{title:`示例计算`,key:`example`,width:120,render:(e,t)=>{let n;return n=t.genType===`image`?Math.round(t.baseCredits*t.ratio):Math.round((t.baseCredits+t.perSecondCredits*15)*t.ratio),(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:[n,` 积分`]})}},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>E(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>w(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:!1,scroll:{x:860}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(C0,{}),o.ratio?`编辑比例`:`添加比例`]}),open:o.open,onOk:C,onCancel:()=>{s({open:!1,ratio:null}),c.resetFields()},okText:`保存`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`genType`,label:`生成类型`,rules:[{required:!0,message:`请选择生成类型`}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`video`,label:`视频`},{value:`image`,label:`图片`}],onChange:()=>{c.setFieldsValue({modelConfigId:void 0,resolution:void 0})}})}),(0,Q.jsx)(X.Item,{name:`modelConfigId`,label:`引擎`,rules:[{required:!0,message:`请选择引擎`}],children:(0,Q.jsx)(RC,{size:`large`,placeholder:`请选择引擎`,options:v,showSearch:!0,optionFilterProp:`label`,onChange:()=>c.setFieldsValue({resolution:void 0})})}),(0,Q.jsx)(X.Item,{name:`resolution`,label:h===`image`?`图片尺寸`:`分辨率`,rules:[{required:!0,message:h===`image`?`请选择图片尺寸`:`请选择分辨率`}],children:(0,Q.jsx)(RC,{size:`large`,placeholder:h===`image`?`请选择图片尺寸`:`请选择分辨率`,options:b})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`ratio`,label:`倍率`,style:{flex:1},rules:[{required:!0,message:`请输入倍率`}],children:(0,Q.jsx)(oB,{min:.1,max:10,step:.1,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`baseCredits`,label:`基础积分`,style:{flex:1},rules:[{required:!0,message:`请输入基础积分`}],children:(0,Q.jsx)(oB,{min:0,max:1e3,style:{width:`100%`},size:`large`})}),h!==`image`&&(0,Q.jsx)(X.Item,{name:`perSecondCredits`,label:`每秒积分`,style:{flex:1},rules:[{required:!0,message:`请输入每秒积分`}],children:(0,Q.jsx)(oB,{min:0,max:100,style:{width:`100%`},size:`large`})})]})]})})]})},w7={HomeOutlined:(0,Q.jsx)(X2,{}),PlayCircleOutlined:(0,Q.jsx)(X4,{}),WalletOutlined:(0,Q.jsx)(F6,{}),RobotOutlined:(0,Q.jsx)(c3,{}),SettingOutlined:(0,Q.jsx)(k3,{}),BellOutlined:(0,Q.jsx)(d0,{}),UserOutlined:(0,Q.jsx)(k6,{}),AppstoreOutlined:(0,Q.jsx)(W1,{}),FileTextOutlined:(0,Q.jsx)(KV,{}),StarOutlined:(0,Q.jsx)($3,{}),HeartOutlined:(0,Q.jsx)(V2,{}),CameraOutlined:(0,Q.jsx)(E0,{}),DashboardOutlined:(0,Q.jsx)(n2,{}),CalculatorOutlined:(0,Q.jsx)(C0,{}),DollarOutlined:(0,Q.jsx)(c2,{}),GiftOutlined:(0,Q.jsx)(F2,{}),ThunderboltOutlined:(0,Q.jsx)(d6,{}),FireOutlined:(0,Q.jsx)(E2,{}),CloudOutlined:(0,Q.jsx)(R0,{}),SmileOutlined:(0,Q.jsx)(W3,{}),TrophyOutlined:(0,Q.jsx)(_6,{}),RocketOutlined:(0,Q.jsx)(d3,{}),BulbOutlined:(0,Q.jsx)(b0,{}),CodeOutlined:(0,Q.jsx)(W0,{}),PictureOutlined:(0,Q.jsx)(W4,{}),VideoCameraOutlined:(0,Q.jsx)(M6,{}),AudioOutlined:(0,Q.jsx)(n0,{}),MailOutlined:(0,Q.jsx)(_4,{}),PhoneOutlined:(0,Q.jsx)(V4,{}),GlobalOutlined:(0,Q.jsx)(R2,{}),ShoppingCartOutlined:(0,Q.jsx)(M3,{}),TeamOutlined:(0,Q.jsx)(c6,{}),BarChartOutlined:(0,Q.jsx)(c0,{}),PieChartOutlined:(0,Q.jsx)(q4,{}),LineChartOutlined:(0,Q.jsx)(a4,{}),SecurityScanOutlined:(0,Q.jsx)(C3,{}),ApiOutlined:(0,Q.jsx)(V1,{}),DatabaseOutlined:(0,Q.jsx)(a2,{}),CloudServerOutlined:(0,Q.jsx)(V0,{}),MenuOutlined:(0,Q.jsx)(C4,{})},Pne=Object.keys(w7).map(e=>({value:e,label:(0,Q.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[w7[e],` `,e.replace(`Outlined`,``)]})})),Fne={page:`blue`,group:`purple`},T7={page:`页面`,group:`分组`},Ine=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)(`frontend`),[o,s]=(0,S.useState)({open:!1,menu:null}),[c]=X.useForm(),l=async()=>{r(!0);try{t(await K8())}catch{}r(!1)};(0,S.useEffect)(()=>{l()},[]);let u=async()=>{try{let e=await c.validateFields(),t={label:e.label,path:e.path||``,icon:e.icon||``,sort_order:e.sortOrder??0,is_active:e.isActive??!0,parent_id:e.parentId||null,menu_type:e.menuType||`page`,menu_target:e.menuTarget||`frontend`,is_default:e.isDefault??!1};o.menu?.id?await q8({...t,id:o.menu.id}):await q8(t),LG.success(o.menu?.id?`菜单已更新`:`菜单已添加`),s({open:!1,menu:null}),c.resetFields(),l()}catch{}},d=async e=>{try{await J8(e),LG.success(`菜单已删除`),l()}catch(e){LG.error(e?.message||`删除失败`)}},f=t=>{s({open:!0,menu:t||null}),t?c.setFieldsValue({label:t.label,path:t.path,icon:t.icon,sortOrder:t.sortOrder??0,isActive:t.isActive??!0,parentId:t.parentId??``,menuType:t.menuType??`page`,menuTarget:t.menuTarget??`frontend`,isDefault:t.isDefault??!1}):(c.resetFields(),c.setFieldsValue({icon:`HomeOutlined`,sortOrder:e.length,isActive:!0,menuType:`page`,menuTarget:i,isDefault:!1}))},p=e.filter(e=>{let t=e.menuTarget??`frontend`;return t===i||t===`both`}),m=[{value:``,label:`顶级菜单`},...p.filter(e=>e.menuType===`group`).map(e=>({value:e.id,label:e.label}))],h=[],g=p.filter(e=>!e.parentId),_={};p.filter(e=>e.parentId).forEach(e=>{let t=e.parentId;_[t]||(_[t]=[]),_[t].push(e)}),g.sort((e,t)=>(e.sortOrder??0)-(t.sortOrder??0)).forEach(e=>{h.push({...e,_depth:0}),(_[e.id]||[]).sort((e,t)=>(e.sortOrder??0)-(t.sortOrder??0)).forEach(e=>{h.push({...e,_depth:1})})});let v=[{title:`排序`,dataIndex:`sortOrder`,width:60},{title:`菜单名称`,key:`label`,width:180,render:(e,t)=>(0,Q.jsxs)(`span`,{style:{paddingLeft:t._depth*20,fontWeight:t._depth===0?600:400},children:[t._depth===1&&(0,Q.jsx)(`span`,{style:{color:`#cbd5e1`,marginRight:4},children:`└`}),t.label]})},{title:`路由路径`,dataIndex:`path`,width:160,render:e=>e||(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})},{title:`图标`,dataIndex:`icon`,width:100,render:e=>e&&w7[e]?(0,Q.jsx)(`span`,{style:{fontSize:16,color:`#6366f1`},children:w7[e]}):`-`},{title:`类型`,dataIndex:`menuType`,width:80,render:e=>(0,Q.jsx)(NQ,{color:Fne[e]||`default`,children:T7[e]||e})},{title:`状态`,dataIndex:`isActive`,width:70,render:e=>(0,Q.jsx)(`span`,{style:{color:e?`#22c55e`:`#94a3b8`},children:e?`启用`:`停用`})},...i===`frontend`?[{title:`默认显示`,dataIndex:`isDefault`,width:80,render:e=>e?(0,Q.jsx)(NQ,{color:`green`,children:`默认`}):(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})}]:[],{title:`操作`,key:`action`,width:150,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>f(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除该菜单?`,onConfirm:()=>d(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}];return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(C4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`菜单配置`})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>f(),style:{borderRadius:8},children:`添加菜单`})]}),(0,Q.jsx)(bR,{activeKey:i,onChange:a,items:[{key:`frontend`,label:`前台菜单`},{key:`admin`,label:`后台菜单`}]}),(0,Q.jsx)(bQ,{columns:v,dataSource:h,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(C4,{}),o.menu?.id?`编辑菜单`:`添加菜单`]}),open:o.open,onOk:u,onCancel:()=>{s({open:!1,menu:null}),c.resetFields()},okText:`确认`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`label`,label:`菜单名称`,rules:[{required:!0,message:`请输入菜单名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:我的项目`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`path`,label:`路由路径`,tooltip:`分组类型可留空`,children:(0,Q.jsx)(hW,{placeholder:`例如:/projects(分组可留空)`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`menuType`,label:`菜单类型`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`page`,label:`页面`},{value:`group`,label:`分组`}]})}),(0,Q.jsx)(X.Item,{name:`menuTarget`,label:`适用端`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`frontend`,label:`前台`},{value:`admin`,label:`后台`},{value:`both`,label:`两者`}]})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`icon`,label:`图标`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:Pne})}),(0,Q.jsx)(X.Item,{name:`sortOrder`,label:`排序`,style:{flex:1},children:(0,Q.jsx)(oB,{min:0,max:100,style:{width:`100%`},size:`large`,placeholder:`默认0`})})]}),(0,Q.jsx)(X.Item,{name:`parentId`,label:`上级菜单`,children:(0,Q.jsx)(RC,{size:`large`,options:m,allowClear:!0,placeholder:`顶级菜单`})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用`,valuePropName:`checked`,children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.menuTarget!==t.menuTarget,children:({getFieldValue:e})=>e(`menuTarget`)===`admin`?null:(0,Q.jsx)(X.Item,{name:`isDefault`,label:`新用户默认显示`,valuePropName:`checked`,tooltip:`开启后,新注册用户默认显示此菜单`,children:(0,Q.jsx)(Mq,{})})})]})})]})},Lne={normal:`blue`,gift:`green`,promo:`purple`},Rne={normal:`常规`,gift:`赠送`,promo:`促销`},zne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,item:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await e5()).map(e=>({id:e.id,name:e.name,credits:e.credits,price:e.price,bonusCredits:e.bonus_credits??e.bonusCredits??0,totalCredits:e.total_credits??e.totalCredits??e.credits,description:e.description,packageType:e.package_type??e.packageType??`normal`,isGift:e.is_gift??e.isGift??!1,isActive:e.is_active??e.isActive??!0,sortOrder:e.sort_order??e.sortOrder??0})))}catch{LG.error(`加载充值套餐失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={name:e.name,credits:e.credits,price:e.price,bonus_credits:e.bonusCredits||0,description:e.description||null,package_type:e.packageType||`normal`,is_gift:e.isGift||!1,is_active:e.isActive??!0,sort_order:e.sortOrder??0};i.item?.id?(await t5({id:i.item.id,...t}),LG.success(`已更新`)):(await t5(t),LG.success(`已添加`)),a({open:!1,item:null}),o.resetFields(),s()}catch{}},l=async e=>{try{await n5(e),LG.success(`已删除`),s()}catch(e){LG.error(e?.message||`删除失败`)}},u=e=>{a({open:!0,item:e||null}),e?o.setFieldsValue({name:e.name,credits:e.credits,price:e.price,bonusCredits:e.bonusCredits,description:e.description,packageType:e.packageType,isGift:e.isGift,isActive:e.isActive,sortOrder:e.sortOrder}):(o.resetFields(),o.setFieldsValue({isActive:!0,sortOrder:0,packageType:`normal`,bonusCredits:0,isGift:!1}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(F2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`充值套餐管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 个套餐`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加套餐`})]}),(0,Q.jsx)(bQ,{columns:[{title:`套餐名称`,key:`name`,width:160,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),t.description&&(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.description})]})},{title:`基础积分`,dataIndex:`credits`,width:100,render:e=>(0,Q.jsx)(Z.Text,{children:e.toLocaleString()})},{title:`赠送积分`,dataIndex:`bonusCredits`,width:100,render:e=>e>0?(0,Q.jsxs)(NQ,{color:`green`,children:[`+`,e.toLocaleString()]}):(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})},{title:`总积分`,key:`total`,width:100,render:(e,t)=>(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:(t.credits+t.bonusCredits).toLocaleString()})},{title:`价格(元)`,dataIndex:`price`,width:100,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,children:[`¥`,e]})},{title:`类型`,dataIndex:`packageType`,width:80,render:e=>(0,Q.jsx)(NQ,{color:Lne[e]||`default`,children:Rne[e]||e})},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(F2,{}),i.item?`编辑套餐`:`添加套餐`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,item:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`套餐名称`,rules:[{required:!0,message:`请输入套餐名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:进阶包`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`credits`,label:`基础积分`,rules:[{required:!0,message:`请输入积分`}],style:{flex:1},children:(0,Q.jsx)(oB,{min:1,placeholder:`2000`,size:`large`,style:{width:`100%`}})}),(0,Q.jsx)(X.Item,{name:`price`,label:`价格(元)`,rules:[{required:!0,message:`请输入价格`}],style:{flex:1},children:(0,Q.jsx)(oB,{min:.01,step:1,placeholder:`168`,size:`large`,style:{width:`100%`}})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`bonusCredits`,label:`赠送积分`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(oB,{min:0,placeholder:`0`,size:`large`,style:{width:`100%`}})}),(0,Q.jsx)(X.Item,{name:`packageType`,label:`套餐类型`,initialValue:`normal`,style:{flex:1},children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`normal`,label:`常规`},{value:`gift`,label:`赠送`},{value:`promo`,label:`促销`}]})})]}),(0,Q.jsx)(X.Item,{name:`description`,label:`描述`,children:(0,Q.jsx)(hW,{placeholder:`套餐描述(可选)`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,initialValue:!0,style:{flex:1},children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{name:`isGift`,label:`是否赠送`,valuePropName:`checked`,initialValue:!1,style:{flex:1},children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{name:`sortOrder`,label:`排序`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(oB,{size:`large`,style:{width:`100%`}})})]})]})})]})},Bne={POST:`green`,PUT:`blue`,DELETE:`red`},Vne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),c=async e=>{a(!0);try{let n=await r5(e||o);t(n.items||[]),r(n.total||0)}catch{LG.error(`加载操作日志失败`)}finally{a(!1)}};return(0,S.useEffect)(()=>{c()},[]),(0,Q.jsx)(`div`,{children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(q2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`操作日志`})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>c(),children:`刷新`})]}),(0,Q.jsx)(bQ,{columns:[{title:`操作人`,dataIndex:`username`,width:120,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`操作`,dataIndex:`action`,width:160,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`方法`,dataIndex:`method`,width:80,render:e=>(0,Q.jsx)(NQ,{color:Bne[e]||`default`,children:e})},{title:`路径`,dataIndex:`path`,width:220,ellipsis:!0,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:e})},{title:`时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:$5(e)})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:20,total:n,showTotal:e=>`共 ${e} 条记录`,onChange:e=>{s(e),c(e)}},scroll:{x:800}})]})})},Hne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(null),[g]=X.useForm(),[_]=X.useForm(),v=async e=>{a(!0);try{let n=await i5(e||o);t(n.items||[]),r(n.total||0)}catch{LG.error(`加载应用管理列表失败`)}finally{a(!1)}},y=async()=>{try{let e=await g.validateFields();await a5({app_id:e.app_id,secret:e.secret,open_type:e.open_type,count:e.count,auth_url:e.auth_url,company:e.company}),LG.success(`创建成功`),l(!1),g.resetFields(),v()}catch(e){LG.error(e?.message||`创建失败`)}},b=async e=>{try{h(await o5(e)),d(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},x=async e=>{try{let t=await o5(e);h(t),_.setFieldsValue({app_id:t.appId,secret:t.secret,open_type:t.openType,count:t.count,auth_url:t.authUrl,company:t.company}),p(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},C=async()=>{if(m)try{let e=await _.validateFields();await s5(m.id,{app_id:e.app_id,secret:e.secret,open_type:e.open_type,count:e.count,auth_url:e.auth_url,company:e.company}),LG.success(`更新成功`),p(!1),_.resetFields(),v()}catch(e){LG.error(e?.message||`更新失败`)}},w=e=>{BG.confirm({title:`确认删除`,content:`确定要删除这个应用管理吗?`,okText:`删除`,okType:`danger`,cancelText:`取消`,onOk:async()=>{try{await c5(e),LG.success(`删除成功`),v()}catch(e){LG.error(e?.message||`删除失败`)}}})};return(0,S.useEffect)(()=>{v()},[]),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(C4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`应用管理列表`})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>v(),children:`刷新`}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>l(!0),children:`创建`})]})]}),(0,Q.jsx)(bQ,{columns:[{title:`ID`,dataIndex:`id`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`应用ID`,dataIndex:`appId`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`应用密钥`,dataIndex:`secret`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`开户方式`,dataIndex:`openType`,render:e=>(0,Q.jsx)(Z.Text,{children:{1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`}[e]||e})},{title:`归属公司`,dataIndex:`company`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`授权次数`,dataIndex:`count`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`状态`,dataIndex:`status`,render:e=>(0,Q.jsx)(NQ,{color:e===1?`green`:`red`,children:e===1?`正常`:`禁用`})},{title:`授权URL`,dataIndex:`authUrl`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`创建人`,dataIndex:`createBy`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`创建时间`,dataIndex:`createdAt`,render:e=>(0,Q.jsx)(Z.Text,{children:$5(e)})},{title:`更新时间`,dataIndex:`updatedAt`,render:e=>(0,Q.jsx)(Z.Text,{children:$5(e)})},{title:`操作`,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(qU,{}),size:`small`,onClick:()=>b(t.id),children:`详情`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(zQ,{}),size:`small`,onClick:()=>x(t.id),children:`更新`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(IQ,{}),size:`small`,danger:!0,onClick:()=>w(t.id),children:`删除`})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:20,total:n,showTotal:e=>`共 ${e} 条记录`,onChange:e=>{s(e),v(e)}},scroll:{x:800}})]}),(0,Q.jsx)(BG,{title:`创建应用管理`,open:c,onOk:y,onCancel:()=>{l(!1),g.resetFields()},okText:`创建`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:g,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`app_id`,label:`应用ID`,rules:[{required:!0,message:`请输入应用ID`},{max:64,message:`应用ID不能超过64个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用ID`})}),(0,Q.jsx)(X.Item,{name:`secret`,label:`应用密钥`,rules:[{required:!0,message:`请输入应用密钥`},{max:256,message:`应用密钥不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用密钥`})}),(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户方式`,rules:[{required:!0,message:`请选择开户方式`}],children:(0,Q.jsxs)(RC,{placeholder:`请选择开户方式`,children:[(0,Q.jsx)(RC.Option,{value:1,children:`千川`}),(0,Q.jsx)(RC.Option,{value:2,children:`广告`}),(0,Q.jsx)(RC.Option,{value:3,children:`本地推`}),(0,Q.jsx)(RC.Option,{value:4,children:`星图`}),(0,Q.jsx)(RC.Option,{value:5,children:`快手代理商`}),(0,Q.jsx)(RC.Option,{value:6,children:`巨量星图`}),(0,Q.jsx)(RC.Option,{value:7,children:`巨量服务单`}),(0,Q.jsx)(RC.Option,{value:8,children:`腾讯服务单`}),(0,Q.jsx)(RC.Option,{value:9,children:`腾讯营销K2`}),(0,Q.jsx)(RC.Option,{value:10,children:`腾讯营销K3`})]})}),(0,Q.jsx)(X.Item,{name:`count`,label:`最大授权用户数`,initialValue:100,children:(0,Q.jsx)(oB,{min:1,placeholder:`应用最大可以授权多少个用户`})}),(0,Q.jsx)(X.Item,{name:`auth_url`,label:`应用授权链接`,children:(0,Q.jsx)(hW,{placeholder:`请输入应用授权链接`})}),(0,Q.jsx)(X.Item,{name:`company`,label:`应用归属公司名称`,rules:[{max:256,message:`公司名称不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用归属公司名称`})})]})}),(0,Q.jsx)(BG,{title:`应用管理详情`,open:u,onCancel:()=>{d(!1),h(null)},okText:`关闭`,cancelText:`取消`,width:600,children:m&&(0,Q.jsxs)(`div`,{style:{lineHeight:`2`},children:[(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`ID:`}),` `,m.id]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`应用ID:`}),` `,m.appId]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`应用密钥:`}),` `,m.secret]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`开户方式:`}),` `,{1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`}[m.openType]||m.openType]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`归属公司:`}),` `,m.company||`-`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`授权次数:`}),` `,m.count]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`状态:`}),` `,m.status===1?`正常`:`禁用`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`授权URL:`}),` `,m.authUrl||`-`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`创建人:`}),` `,m.createBy]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`创建时间:`}),` `,$5(m.createdAt)]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`更新时间:`}),` `,$5(m.updatedAt)]})]})}),(0,Q.jsx)(BG,{title:`更新应用管理`,open:f,onOk:C,onCancel:()=>{p(!1),_.resetFields(),h(null)},okText:`更新`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:_,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`app_id`,label:`应用ID`,rules:[{required:!0,message:`请输入应用ID`},{max:64,message:`应用ID不能超过64个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用ID`})}),(0,Q.jsx)(X.Item,{name:`secret`,label:`应用密钥`,rules:[{required:!0,message:`请输入应用密钥`},{max:256,message:`应用密钥不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用密钥`})}),(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户方式`,rules:[{required:!0,message:`请选择开户方式`}],children:(0,Q.jsxs)(RC,{placeholder:`请选择开户方式`,children:[(0,Q.jsx)(RC.Option,{value:1,children:`千川`}),(0,Q.jsx)(RC.Option,{value:2,children:`广告`}),(0,Q.jsx)(RC.Option,{value:3,children:`本地推`}),(0,Q.jsx)(RC.Option,{value:4,children:`星图`}),(0,Q.jsx)(RC.Option,{value:5,children:`快手代理商`}),(0,Q.jsx)(RC.Option,{value:6,children:`巨量星图`}),(0,Q.jsx)(RC.Option,{value:7,children:`巨量服务单`}),(0,Q.jsx)(RC.Option,{value:8,children:`腾讯服务单`}),(0,Q.jsx)(RC.Option,{value:9,children:`腾讯营销K2`}),(0,Q.jsx)(RC.Option,{value:10,children:`腾讯营销K3`})]})}),(0,Q.jsx)(X.Item,{name:`count`,label:`最大授权用户数`,children:(0,Q.jsx)(oB,{min:1,placeholder:`应用最大可以授权多少个用户`})}),(0,Q.jsx)(X.Item,{name:`auth_url`,label:`应用授权链接`,children:(0,Q.jsx)(hW,{placeholder:`请输入应用授权链接`})}),(0,Q.jsx)(X.Item,{name:`company`,label:`应用归属公司名称`,rules:[{max:256,message:`公司名称不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用归属公司名称`})})]})})]})},E7=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),D7={image:`empty`,video:`empty`,videoCover:`empty`,references:{}},O7={optimizing:{color:`processing`,text:`优化中`,icon:(0,Q.jsx)(xm,{spin:!0})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,Q.jsx)(HB,{})},generating:{color:`warning`,text:`生成中`,icon:(0,Q.jsx)(xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,Q.jsx)(M0,{})},failed:{color:`error`,text:`失败`,icon:(0,Q.jsx)(F0,{})}},k7={image:{text:`图片`,color:`purple`,icon:(0,Q.jsx)(_2,{})},video:{text:`视频`,color:`geekblue`,icon:(0,Q.jsx)(M6,{})}},Une=e=>/^(https?:)?\/\//i.test(e)||/^(blob|data):/i.test(e),A7=e=>!!e&&/^blob:/i.test(e.trim()),j7=e=>{if(!e)return``;let t=String(e).trim();return t?Une(t)?t:E7?`${E7}${t.startsWith(`/`)?t:`/${t}`}`:t.startsWith(`/`)?t:`/${t}`:``},Wne=e=>e?e.length>12?`${e.slice(0,8)}...`:e:`-`,M7=e=>e?$5(e):`-`,Gne=e=>e==null||e===``,N7=e=>{if(!e||A7(e))return!1;try{let t=new URL(j7(e),window.location.origin),n=t.searchParams.get(`exp`)||t.searchParams.get(`expires`)||t.searchParams.get(`expire`)||t.searchParams.get(`expires_at`)||t.searchParams.get(`x-expires`);if(!n)return!1;let r=Number(n);if(!Number.isFinite(r))return!1;let i=r>1e10?r:r*1e3;return Date.now()>=i}catch{return!1}},P7=e=>e?A7(e)||N7(e)?`invalid`:`checking`:`empty`,F7=e=>{let t=e.url||e.mediaUrl||e.fileUrl;return typeof t==`string`&&t.trim()?t.trim():void 0},Kne=e=>{let t=String(e.type||e.mediaType||e.mimeType||``).toLowerCase(),n=F7(e)?.toLowerCase()||``;return t.includes(`video`)||/\.(mp4|mov|webm|m4v)(\?|$)/i.test(n)?`video`:t.includes(`image`)||/\.(png|jpe?g|webp|gif|bmp|svg)(\?|$)/i.test(n)?`image`:t||`unknown`},I7=(e,t)=>`${t}-${F7(e)||`empty`}`,L7=(e,t=`资源`)=>A7(e)?`本地临时素材已失效`:N7(e)?`${t}链接已超时,请刷新列表或重新搜索后再查看`:`${t}加载失败,请刷新列表或重新搜索后再查看`,R7=({text:e,minHeight:t=240,compact:n=!1,action:r})=>(0,Q.jsxs)(`div`,{style:{width:`100%`,minHeight:n?void 0:t,height:n?`100%`:void 0,borderRadius:n?10:12,background:`#f8f9fc`,border:`1px dashed #cbd5e1`,color:`#64748b`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:n?4:10,textAlign:`center`},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`,fontSize:n?11:13},children:e}),r]}),z7=({label:e,value:t})=>(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:120},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:Gne(t)?`-`:t})]}),qne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c]=(0,S.useState)(20),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(0),[h,g]=(0,S.useState)(null),[_,v]=(0,S.useState)(D7),[y,b]=(0,S.useState)(!1),x=(0,S.useRef)(null),[C,w]=(0,S.useState)(null),[T,E]=(0,S.useState)(null),D=(0,S.useCallback)(async()=>{a(!0);try{let e=await m5({userId:d.trim()||void 0,status:l||void 0,page:o,pageSize:c});t((e.items||[]).map(e=>({id:e.id,userId:e.userId,username:e.username,projectId:e.projectId,projectName:e.projectName,originalPrompt:e.originalPrompt,optimizedPrompt:e.optimizedPrompt,duration:e.duration,aspectRatio:e.aspectRatio,resolution:e.resolution,status:e.status,videoUrl:e.videoUrl,videoCoverUrl:e.videoCoverUrl,references:e.references,creditsCost:e.creditsCost||0,textCreditsCost:e.textCreditsCost||0,textTokensUsed:e.textTokensUsed||0,videoTokensUsed:e.videoTokensUsed||0,errorMessage:e.errorMessage,createdAt:e.createdAt,generatedAt:e.generatedAt,genType:e.genType,imageSize:e.imageSize,imageUrl:e.imageUrl,imageTokensUsed:e.imageTokensUsed||0,imageProportion:e.imageProportion,imagePx:e.imagePx}))),r(e.total||0)}catch{LG.error(`加载记录失败`)}finally{a(!1)}},[l,d,o,c]);(0,S.useEffect)(()=>{D()},[D,p]),(0,S.useEffect)(()=>{if(!h){v(D7);return}let e=(h.references||[]).reduce((e,t,n)=>{let r=F7(t);return e[I7(t,n)]=P7(r),e},{});x.current&&(x.current.pause(),x.current.currentTime=0),b(!1),v({image:P7(h.imageUrl),video:P7(h.videoUrl),videoCover:P7(h.videoCoverUrl),references:e})},[h]);let O=()=>{s(1),m(e=>e+1)},k=(0,S.useCallback)(e=>{g(e)},[]),A=()=>{x.current&&x.current.pause(),b(!1),g(null)},j=e=>{v(t=>({...t,...e}))},M=(e,t)=>{v(n=>({...n,references:{...n.references,[e]:t}}))},N=(e,t=`素材`)=>{if(!e){LG.warning(`${t}链接为空,暂无法查看`);return}if(A7(e)){LG.warning(`本地临时素材已失效,暂无法查看`);return}if(N7(e)){LG.warning(`${t}链接已超时,请刷新列表或重新搜索后再查看`);return}window.open(j7(e),`_blank`,`noopener,noreferrer`)},P=()=>{if(h?.videoUrl){if(N7(h.videoUrl)){j({video:`invalid`}),LG.warning(`视频链接已超时,请刷新列表或重新搜索后再查看`);return}b(!0),window.setTimeout(()=>{x.current?.play().catch(()=>{b(!1),j({video:`invalid`}),LG.warning(`视频播放失败,请确认资源链接是否仍然有效`)})},0)}},F=async(e,t,n)=>{w(e);try{await h5(e,t,n),LG.success(`状态已更新`),D()}catch(e){LG.error(e?.message||`更新失败`)}finally{w(null)}},I=async()=>{if(T){w(T.record.id);try{await g5(T.record.id,T.ratio,T.resolution,T.image_size),LG.success(`已提交${T.record.genType===`video`?`视频`:`图片`}生成`),E(null),D()}catch(e){LG.error(e?.message||`生成失败`)}finally{w(null)}}},L=(0,S.useMemo)(()=>[{title:`用户`,key:`user`,width:120,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:t.username||`未知用户`}),(0,Q.jsx)(`div`,{style:{fontSize:11,color:`#94a3b8`},children:Wne(t.userId)})]})},{title:`项目`,dataIndex:`projectName`,width:120,ellipsis:!0,render:e=>(0,Q.jsx)(Z.Text,{style:{fontSize:13},children:e||`-`})},{title:`类型`,dataIndex:`genType`,width:90,ellipsis:!0,render:e=>{let t=k7[e]||{text:e||`-`,color:`default`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`提示词`,key:`prompt`,ellipsis:!0,render:(e,t)=>(0,Q.jsx)(Ow,{title:t.originalPrompt,placement:`topLeft`,children:(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#475569`},ellipsis:!0,children:t.originalPrompt||`-`})})},{title:`参数`,key:`params`,width:160,render:(e,t)=>t.genType===`video`?t.duration||t.aspectRatio||t.resolution?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.duration?(0,Q.jsxs)(NQ,{children:[t.duration,`s`]}):null,t.aspectRatio?(0,Q.jsx)(NQ,{children:t.aspectRatio}):null,t.resolution?(0,Q.jsx)(NQ,{children:t.resolution}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`待配置`}):t.imageSize||t.imageProportion||t.imagePx?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.imageSize?(0,Q.jsx)(NQ,{children:t.imageSize}):null,t.imageProportion?(0,Q.jsx)(NQ,{children:t.imageProportion}):null,t.imagePx?(0,Q.jsx)(NQ,{children:t.imagePx}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`待配置`})},{title:`积分`,key:`credits`,width:120,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12},children:[t.textCreditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#f59e0b`},children:[`文字: `,t.textCreditsCost]}):null,t.creditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#6366f1`},children:[t.genType===`video`?`视频`:`图片`,`: `,t.creditsCost]}):null,t.textCreditsCost===0&&t.creditsCost===0?(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`},children:`0`}):null]})},{title:`状态`,dataIndex:`status`,width:90,render:e=>{let t=O7[e]||{color:`default`,text:e||`-`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`时间`,key:`time`,width:150,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[(0,Q.jsx)(`div`,{children:M7(t.createdAt)}),t.generatedAt?(0,Q.jsxs)(`div`,{style:{color:`#10b981`},children:[`生成: `,M7(t.generatedAt)]}):null]})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>k(t),children:`详情`}),t.status===`generating`?(0,Q.jsx)(qE,{size:`small`,danger:!0,loading:C===t.id,onClick:()=>{BG.confirm({title:`确认操作`,icon:(0,Q.jsx)(d2,{}),content:`确定将此记录标记为失败?`,onOk:()=>F(t.id,`failed`)})},children:`标记失败`}):null,t.status===`failed`?(0,Q.jsx)(qE,{size:`small`,type:`primary`,danger:!0,loading:C===t.id,onClick:()=>E({record:t,ratio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`,image_size:t.imageSize||`2K`}),children:`重试生成`}):null,t.status===`prompt_optimized`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(qE,{size:`small`,type:`primary`,loading:C===t.id,onClick:()=>E({record:t,ratio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`,image_size:t.imageSize||`2K`}),style:{background:`#6366f1`,border:`none`},children:[`生成`,t.genType===`video`?`视频`:`图片`]}),(0,Q.jsx)(qE,{size:`small`,danger:!0,loading:C===t.id,onClick:()=>{BG.confirm({title:`确认操作`,icon:(0,Q.jsx)(d2,{}),content:`确定将此记录标记为失败?`,onOk:()=>F(t.id,`failed`)})},children:`标记失败`})]}):null]})}],[k,C]),R=h?k7[h.genType||``]||{text:h.genType||`-`,color:`default`,icon:null}:null,z=h?O7[h.status]||{color:`default`,text:h.status||`-`,icon:null}:null,B=()=>{if(!h||h.genType!==`image`||h.status!==`completed`)return null;if(!h.imageUrl)return(0,Q.jsx)(R7,{text:`此图片任务暂无结果图片`,minHeight:260});if(_.image===`invalid`)return(0,Q.jsx)(R7,{text:L7(h.imageUrl,`图片`),minHeight:260});let e=j7(h.imageUrl);return(0,Q.jsxs)(`div`,{title:`点击新页面查看图片`,onClick:()=>N(h.imageUrl,`生成图片`),style:{position:`relative`,width:`100%`,minHeight:260,borderRadius:12,background:`#f8f9fc`,border:`1px solid #e2e8f0`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[(0,Q.jsx)(`img`,{src:e,alt:`生成图片`,onLoad:()=>j({image:`valid`}),onError:()=>j({image:`invalid`}),style:{display:_.image===`valid`?`block`:`none`,width:`100%`,maxHeight:560,objectFit:`contain`,background:`#fff`}},`${h.id}-${e}`),_.image===`checking`?(0,Q.jsx)(R7,{text:`图片加载检测中...`,minHeight:260}):null]})},V=()=>{if(!h||y||_.video===`invalid`)return null;let e=h.videoUrl?(0,Q.jsx)(qE,{type:`primary`,shape:`circle`,size:`large`,icon:(0,Q.jsx)(X4,{}),onClick:P,style:{boxShadow:`0 8px 20px rgba(15,23,42,0.25)`}}):null;if(!h.videoCoverUrl)return(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,Q.jsx)(R7,{text:`此视频无封面`,minHeight:340,action:e})});if(_.videoCover===`invalid`)return(0,Q.jsx)(R7,{text:L7(h.videoCoverUrl,`视频封面`),minHeight:340,action:e});let t=j7(h.videoCoverUrl);return(0,Q.jsxs)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,border:`1px solid #e2e8f0`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:t,alt:`视频封面`,onLoad:()=>j({videoCover:`valid`}),onError:()=>j({videoCover:`invalid`}),style:{display:_.videoCover===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`}},`${h.id}-cover-${t}`),_.videoCover===`checking`?(0,Q.jsx)(R7,{text:`视频封面加载检测中...`,minHeight:340,action:e}):null,_.videoCover===`valid`?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(15,23,42,0.18)`},children:e}):null]})},H=()=>{if(!h||h.genType!==`video`||h.status!==`completed`)return null;if(!h.videoUrl)return(0,Q.jsx)(R7,{text:`此视频任务暂无结果视频`,minHeight:340});if(_.video===`invalid`)return(0,Q.jsx)(R7,{text:L7(h.videoUrl,`视频`),minHeight:340});let e=j7(h.videoUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:340,borderRadius:12,background:`#000`,overflow:`hidden`,border:`1px solid #e2e8f0`},children:[(0,Q.jsx)(`video`,{ref:x,src:e,preload:`metadata`,controls:y,onLoadedMetadata:()=>j({video:`valid`}),onCanPlay:()=>j({video:`valid`}),onPlaying:()=>{b(!0),j({video:`valid`})},onPause:()=>b(!1),onEnded:()=>b(!1),onError:()=>{b(!1),j({video:`invalid`})},style:{width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`,opacity:+!!y,pointerEvents:y?`auto`:`none`}},`${h.id}-${e}`),V()]})},U=(e,t)=>{let n=F7(e),r=Kne(e),i=I7(e,t),a=_.references[i]||P7(n),o=r===`image`,s=r===`video`,c=typeof e.name==`string`&&e.name?e.name:`参考素材 ${t+1}`;if(!n)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(R7,{text:`无链接`,compact:!0})}),(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})]},i);if(a===`invalid`)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(R7,{text:A7(n)?`本地临时素材已失效`:`素材不可访问`,compact:!0})}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i);let l=j7(n);return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsxs)(`div`,{role:`button`,tabIndex:0,title:`点击新页面查看素材`,onClick:()=>N(n,s?`视频素材`:o?`图片素材`:`素材`),onKeyDown:e=>{e.key===`Enter`&&N(n,s?`视频素材`:o?`图片素材`:`素材`)},style:{width:94,height:94,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,background:`#f8f9fc`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[o?(0,Q.jsx)(`img`,{src:l,alt:c,onLoad:()=>M(i,`valid`),onError:()=>M(i,`invalid`),style:{display:a===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`cover`}}):null,s?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`video`,{src:l,preload:`metadata`,onLoadedMetadata:()=>M(i,`valid`),onError:()=>M(i,`invalid`),style:{display:`none`}}),(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[(0,Q.jsx)(X4,{style:{fontSize:18}}),(0,Q.jsx)(`div`,{children:`视频素材`}),(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]})]}):null,!o&&!s?(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[`文件素材`,(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]}):null,a===`checking`&&o?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8f9fc`},children:(0,Q.jsx)(xm,{style:{color:`#6366f1`}})}):null]}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i)};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(M6,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`生成记录管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[n,` 条记录`]})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(RC,{placeholder:`状态筛选`,allowClear:!0,style:{width:120},value:l||void 0,onChange:e=>{u(e||``),s(1)},options:[{value:`optimizing`,label:`优化中`},{value:`prompt_optimized`,label:`待生成`},{value:`generating`,label:`生成中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`}]}),(0,Q.jsx)(hW,{placeholder:`用户ID搜索`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),style:{width:200},value:d,onChange:e=>f(e.target.value),onPressEnter:O,allowClear:!0}),(0,Q.jsx)(qE,{type:`primary`,onClick:O,style:{borderRadius:8},children:`搜索`})]})]}),(0,Q.jsx)(bQ,{columns:L,dataSource:e,rowKey:`id`,loading:i,scroll:{x:1120},pagination:{current:o,pageSize:c,total:n,onChange:s,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[h?.genType===`video`?(0,Q.jsx)(M6,{}):(0,Q.jsx)(_2,{}),(0,Q.jsx)(`span`,{children:`生成记录详情`})]}),open:!!h,onCancel:A,footer:null,width:900,destroyOnClose:!0,children:h?(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,flexWrap:`wrap`},children:[(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`用户`}),(0,Q.jsx)(Z.Text,{strong:!0,children:h.username||`-`})]}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`项目`}),(0,Q.jsx)(Z.Text,{strong:!0,children:h.projectName||`-`})]}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`类型 / 状态`}),(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[R?(0,Q.jsx)(NQ,{color:R.color,icon:R.icon,children:R.text}):null,z?(0,Q.jsx)(NQ,{color:z.color,icon:z.icon,children:z.text}):null]})]})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,Q.jsx)(Z.Text,{style:{fontSize:13,color:`#475569`,lineHeight:1.7},children:h.originalPrompt||`-`})})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`优化后提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`},children:(0,Q.jsx)(Z.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:h.optimizedPrompt||`-`})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(z7,{label:`文字积分`,value:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#f59e0b`},children:h.textCreditsCost||0}),(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.textTokensUsed||0,` tokens)`]})]})}),(0,Q.jsx)(z7,{label:`${h.genType===`image`?`图片`:`视频`}积分`,value:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:h.creditsCost||0}),h.genType===`video`&&h.videoTokensUsed?(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.videoTokensUsed,` tokens)`]}):null,h.genType===`image`&&h.imageTokensUsed?(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.imageTokensUsed,` tokens)`]}):null]})}),(0,Q.jsx)(z7,{label:`总积分`,value:(h.textCreditsCost||0)+(h.creditsCost||0)})]}),h.genType===`video`?h.duration||h.aspectRatio||h.resolution?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(z7,{label:`时长`,value:h.duration?`${h.duration}秒`:`-`}),(0,Q.jsx)(z7,{label:`比例`,value:h.aspectRatio||`-`}),(0,Q.jsx)(z7,{label:`分辨率`,value:h.resolution||`-`})]}):(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,textAlign:`center`},children:(0,Q.jsx)(NQ,{color:`default`,children:`视频参数待用户配置`})}):null,h.genType===`image`?h.imageSize||h.imageProportion||h.imagePx?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(z7,{label:`尺寸`,value:h.imagePx||`-`}),(0,Q.jsx)(z7,{label:`比例`,value:h.imageProportion||`-`}),(0,Q.jsx)(z7,{label:`分辨率`,value:h.imageSize||`-`})]}):(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,textAlign:`center`},children:(0,Q.jsx)(NQ,{color:`default`,children:`图片参数待用户配置`})}):null,!h?.references||h.references.length===0?null:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`参考内容`}),(0,Q.jsx)(`div`,{style:{display:`flex`,gap:10,flexWrap:`wrap`},children:h.references.map((e,t)=>U(e,t))})]}),h.status===`completed`?(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:h.genType===`video`?`生成视频`:`生成图片`}),h.genType===`video`?H():B()]}):null,h.status===`failed`&&h.errorMessage?(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(239,68,68,0.04)`,border:`1px solid rgba(239,68,68,0.15)`},children:(0,Q.jsxs)(Z.Text,{style:{fontSize:12,color:`#ef4444`},children:[`错误信息: `,h.errorMessage]})}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,fontSize:12,color:`#94a3b8`,flexWrap:`wrap`},children:[(0,Q.jsxs)(`span`,{children:[`创建: `,M7(h.createdAt)]}),(0,Q.jsxs)(`span`,{children:[`生成: `,M7(h.generatedAt)]})]})]}):(0,Q.jsx)(pC,{description:`暂无详情`})}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[T&&(T.record.genType===`video`?(0,Q.jsx)(X4,{}):(0,Q.jsx)(_2,{})),T&&(T.record.genType===`video`?`生成视频`:`生成图片`)]}),open:!!T,onCancel:()=>E(null),onOk:I,okText:`提交生成`,cancelText:`取消`,confirmLoading:T?C===T.record.id:!1,width:420,children:T?(0,Q.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:T.record.genType===`video`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`时长`}),(0,Q.jsxs)(Z.Text,{strong:!0,children:[T.record.duration||5,`s`]})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`画面比例`}),(0,Q.jsx)(RC,{value:T.ratio,onChange:e=>E(t=>t?{...t,ratio:e}:null),style:{width:`100%`},options:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`].map(e=>({value:e,label:e}))})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`分辨率`}),(0,Q.jsx)(RC,{value:T.resolution,onChange:e=>E(t=>t?{...t,resolution:e}:null),style:{width:`100%`},options:[`480p`,`720p`,`1080p`].map(e=>({value:e,label:e}))})]})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`尺寸`}),(0,Q.jsx)(Z.Text,{strong:!0,children:T.record.imagePx||`-`})]}),(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`比例`}),(0,Q.jsx)(Z.Text,{strong:!0,children:T.record.imageProportion||`-`})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`分辨率`}),(0,Q.jsx)(RC,{value:T.image_size,onChange:e=>E(t=>t?{...t,image_size:e}:null),style:{width:`100%`},options:[`2K`,`4K`].map(e=>({value:e,label:e}))})]})]})}):null})]})},B7=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),V7=20,H7={image:`empty`,video:`empty`,videoCover:`empty`,references:{}},U7={pending:{color:`default`,text:`待处理`,icon:(0,Q.jsx)(HB,{})},generating:{color:`warning`,text:`生成中`,icon:(0,Q.jsx)(xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,Q.jsx)(M0,{})},failed:{color:`error`,text:`失败`,icon:(0,Q.jsx)(F0,{})}},W7={timeout:`任务超时`,queued:`已入队`,preparing:`准备中`,creating_provider_task:`创建任务中`,waiting_remote:`等待生成`,result_ready:`结果就绪`,downloading:`下载中`,done:`完成`,download_failed:`下载失败`,polling:`轮询中`,failed:`失败`},G7={image:{text:`图片`,color:`purple`,icon:(0,Q.jsx)(_2,{})},video:{text:`视频`,color:`geekblue`,icon:(0,Q.jsx)(M6,{})}},Jne=e=>/^(https?:)?\/\//i.test(e)||/^(blob|data):/i.test(e),K7=e=>!!e&&/^blob:/i.test(e.trim()),q7=e=>{if(!e)return``;let t=String(e).trim();return t?Jne(t)?t:B7?`${B7}${t.startsWith(`/`)?t:`/${t}`}`:t.startsWith(`/`)?t:`/${t}`:``},Yne=e=>e?e.length>12?`${e.slice(0,8)}...`:e:`-`,J7=e=>e?$5(e):`-`,Xne=e=>e==null||e===``,Y7=e=>{if(!e||K7(e))return!1;try{let t=new URL(q7(e),window.location.origin),n=t.searchParams.get(`exp`)||t.searchParams.get(`expires`)||t.searchParams.get(`expire`)||t.searchParams.get(`expires_at`)||t.searchParams.get(`x-expires`);if(!n)return!1;let r=Number(n);if(!Number.isFinite(r))return!1;let i=r>1e10?r:r*1e3;return Date.now()>=i}catch{return!1}},X7=e=>e?K7(e)||Y7(e)?`invalid`:`checking`:`empty`,Z7=e=>{let t=e.url||e.mediaUrl||e.fileUrl;return typeof t==`string`&&t.trim()?t.trim():void 0},Zne=e=>{let t=String(e.type||e.mediaType||e.mimeType||``).toLowerCase(),n=Z7(e)?.toLowerCase()||``;return t.includes(`video`)||/\.(mp4|mov|webm|m4v)(\?|$)/i.test(n)?`video`:t.includes(`image`)||/\.(png|jpe?g|webp|gif|bmp|svg)(\?|$)/i.test(n)?`image`:t||`unknown`},Q7=(e,t)=>`${t}-${Z7(e)||`empty`}`,$7=(e,t=`资源`)=>K7(e)?`本地临时素材已失效`:Y7(e)?`${t}链接已超时,请刷新列表或重新搜索后再查看`:`${t}加载失败,请刷新列表或重新搜索后再查看`,e9=({text:e,minHeight:t=240,compact:n=!1,action:r})=>(0,Q.jsxs)(`div`,{style:{width:`100%`,minHeight:n?void 0:t,height:n?`100%`:void 0,borderRadius:n?10:12,background:`#f8f9fc`,border:`1px dashed #cbd5e1`,color:`#64748b`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:n?4:10,textAlign:`center`},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`,fontSize:n?11:13},children:e}),r]}),t9=({label:e,value:t})=>(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:120},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:Xne(t)?`-`:t})]}),Qne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(``),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)(``),[m,h]=(0,S.useState)(``),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(0),[C,w]=(0,S.useState)(null),[T,E]=(0,S.useState)(H7),[D,O]=(0,S.useState)(!1),k=(0,S.useRef)(null),A=(0,S.useCallback)(async()=>{a(!0);try{let e=await v5({genType:u||void 0,status:c||void 0,userId:g||void 0,userName:v||void 0,page:o,pageSize:V7});t(e.items||[]),r(e.total||0)}catch(e){LG.error(e?.message||`加载创作记录失败`)}finally{a(!1)}},[u,c,o,g,v]);(0,S.useEffect)(()=>{A()},[A,b]),(0,S.useEffect)(()=>{if(!C){E(H7);return}let e=(C.mediaReferences||[]).reduce((e,t,n)=>{let r=Z7(t);return e[Q7(t,n)]=X7(r),e},{});k.current&&(k.current.pause(),k.current.currentTime=0),O(!1),E({image:X7(C.imageUrl),video:X7(C.videoUrl),videoCover:X7(C.videoCoverUrl),references:e})},[C]);let j=()=>{s(1),_(f.trim()),y(m.trim()),x(e=>e+1)},M=(0,S.useCallback)(e=>{w(e)},[]),N=()=>{k.current&&k.current.pause(),O(!1),w(null)},P=e=>{E(t=>({...t,...e}))},F=(e,t)=>{E(n=>({...n,references:{...n.references,[e]:t}}))},I=()=>{if(C?.videoUrl){if(Y7(C.videoUrl)){P({video:`invalid`}),LG.warning(`视频链接已超时,请刷新列表或重新搜索后再查看`);return}O(!0),window.setTimeout(()=>{k.current?.play().catch(()=>{O(!1),P({video:`invalid`}),LG.warning(`视频播放失败,请确认资源链接是否仍然有效`)})},0)}},L=(e,t=`素材`)=>{if(!e){LG.warning(`${t}链接为空,暂无法查看`);return}if(K7(e)){LG.warning(`本地临时素材已失效,暂无法查看`);return}if(Y7(e)){LG.warning(`${t}链接已超时,请刷新列表或重新搜索后再查看`);return}window.open(q7(e),`_blank`,`noopener,noreferrer`)},R=(0,S.useMemo)(()=>[{title:`用户`,key:`user`,width:150,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:t.userName||`未知用户`}),(0,Q.jsx)(`div`,{style:{fontSize:11,color:`#94a3b8`},children:Yne(t.userId)})]})},{title:`类型`,dataIndex:`genType`,width:90,render:e=>{let t=G7[e]||{text:e||`-`,color:`default`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`提示词`,key:`prompt`,ellipsis:!0,render:(e,t)=>(0,Q.jsx)(Ow,{title:t.originalPrompt,placement:`topLeft`,children:(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#475569`},ellipsis:!0,children:t.originalPrompt||`-`})})},{title:`参数`,key:`params`,width:180,render:(e,t)=>t.genType===`video`?t.duration||t.aspectRatio||t.resolution?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.duration?(0,Q.jsxs)(NQ,{children:[t.duration,`s`]}):null,t.aspectRatio?(0,Q.jsx)(NQ,{children:t.aspectRatio}):null,t.resolution?(0,Q.jsx)(NQ,{children:t.resolution}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`无参数`}):t.imageSize||t.imageProportion||t.imagePx?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.imageSize?(0,Q.jsx)(NQ,{children:t.imageSize}):null,t.imageProportion?(0,Q.jsx)(NQ,{children:t.imageProportion}):null,t.imagePx?(0,Q.jsx)(NQ,{children:t.imagePx}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`无参数`})},{title:`积分`,key:`credits`,width:130,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12},children:[(0,Q.jsxs)(`div`,{style:{color:`#6366f1`},children:[`总: `,t.creditsCost||0]}),t.textCreditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#f59e0b`},children:[`文字: `,t.textCreditsCost]}):null]})},{title:`状态`,dataIndex:`status`,width:100,render:e=>{let t=U7[e]||{color:`default`,text:e||`-`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`阶段`,dataIndex:`pipelineStage`,width:120,render:e=>(0,Q.jsx)(NQ,{color:`blue`,children:W7[e]||e||`-`})},{title:`时间`,key:`time`,width:170,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[(0,Q.jsx)(`div`,{children:J7(t.createdAt)}),t.generatedAt?(0,Q.jsxs)(`div`,{style:{color:`#10b981`},children:[`生成: `,J7(t.generatedAt)]}):null]})},{title:`操作`,key:`action`,width:90,fixed:`right`,render:(e,t)=>(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>M(t),children:`详情`})}],[M]),z=C?G7[C.genType]||{text:C.genType||`-`,color:`default`,icon:null}:null,B=C?U7[C.status]||{color:`default`,text:C.status||`-`,icon:null}:null,V=()=>{if(!C||C.genType!==`image`||C.status!==`completed`)return null;if(!C.imageUrl)return(0,Q.jsx)(e9,{text:`此图片任务暂无结果图片`,minHeight:260});if(T.image===`invalid`)return(0,Q.jsx)(e9,{text:$7(C.imageUrl,`图片`),minHeight:260});let e=q7(C.imageUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,minHeight:260,borderRadius:12,background:`#f8f9fc`,border:`1px solid #e2e8f0`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:e,alt:`生成图片`,onLoad:()=>P({image:`valid`}),onError:()=>P({image:`invalid`}),style:{display:T.image===`valid`?`block`:`none`,width:`100%`,maxHeight:560,objectFit:`contain`,background:`#fff`}},`${C.id}-${e}`),T.image===`checking`?(0,Q.jsx)(e9,{text:`图片加载检测中...`,minHeight:260}):null]})},H=()=>{if(!C||D||T.video===`invalid`)return null;let e=C.videoUrl?(0,Q.jsx)(qE,{type:`primary`,shape:`circle`,size:`large`,icon:(0,Q.jsx)(X4,{}),onClick:I,style:{boxShadow:`0 8px 20px rgba(15,23,42,0.25)`}}):null;if(!C.videoCoverUrl)return(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,Q.jsx)(e9,{text:`此视频无封面`,minHeight:340,action:e})});if(T.videoCover===`invalid`)return(0,Q.jsx)(e9,{text:$7(C.videoCoverUrl,`视频封面`),minHeight:340,action:e});let t=q7(C.videoCoverUrl);return(0,Q.jsxs)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,border:`1px solid #e2e8f0`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:t,alt:`视频封面`,onLoad:()=>P({videoCover:`valid`}),onError:()=>P({videoCover:`invalid`}),style:{display:T.videoCover===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`}},`${C.id}-cover-${t}`),T.videoCover===`checking`?(0,Q.jsx)(e9,{text:`视频封面加载检测中...`,minHeight:340,action:e}):null,T.videoCover===`valid`?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(15,23,42,0.18)`},children:e}):null]})},U=()=>{if(!C||C.genType!==`video`||C.status!==`completed`)return null;if(!C.videoUrl)return(0,Q.jsx)(e9,{text:`此视频任务暂无结果视频`,minHeight:340});if(T.video===`invalid`)return(0,Q.jsx)(e9,{text:$7(C.videoUrl,`视频`),minHeight:340});let e=q7(C.videoUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:340,borderRadius:12,background:`#000`,overflow:`hidden`,border:`1px solid #e2e8f0`},children:[(0,Q.jsx)(`video`,{ref:k,src:e,preload:`metadata`,controls:D,onLoadedMetadata:()=>P({video:`valid`}),onCanPlay:()=>P({video:`valid`}),onPlaying:()=>{O(!0),P({video:`valid`})},onPause:()=>O(!1),onEnded:()=>O(!1),onError:()=>{O(!1),P({video:`invalid`})},style:{width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`,opacity:+!!D,pointerEvents:D?`auto`:`none`}},`${C.id}-${e}`),H()]})},W=(e,t)=>{let n=Z7(e),r=Zne(e),i=Q7(e,t),a=T.references[i]||X7(n),o=r===`image`,s=r===`video`,c=typeof e.name==`string`&&e.name?e.name:`参考素材 ${t+1}`;if(!n)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(e9,{text:`无链接`,compact:!0})}),(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})]},i);if(a===`invalid`)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(e9,{text:K7(n)?`本地临时素材已失效`:`素材不可访问`,compact:!0})}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i);let l=q7(n);return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsxs)(`div`,{role:`button`,tabIndex:0,title:`点击新页面查看素材`,onClick:()=>L(n,s?`视频素材`:o?`图片素材`:`素材`),onKeyDown:e=>{e.key===`Enter`&&L(n,s?`视频素材`:o?`图片素材`:`素材`)},style:{width:94,height:94,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,background:`#f8f9fc`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[o?(0,Q.jsx)(`img`,{src:l,alt:c,onLoad:()=>F(i,`valid`),onError:()=>F(i,`invalid`),style:{display:a===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`cover`}}):null,s?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`video`,{src:l,preload:`metadata`,onLoadedMetadata:()=>F(i,`valid`),onError:()=>F(i,`invalid`),style:{display:`none`}}),(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[(0,Q.jsx)(X4,{style:{fontSize:18}}),(0,Q.jsx)(`div`,{children:`视频素材`}),(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]})]}):null,!o&&!s?(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[`文件素材`,(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]}):null,a===`checking`&&o?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8f9fc`},children:(0,Q.jsx)(xm,{style:{color:`#6366f1`}})}):null]}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i)};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(X4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`创作记录管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[n,` 条记录`]})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`状态筛选`,value:c||void 0,style:{width:140},onChange:e=>{l(e||``),s(1)},options:[{value:`generating`,label:`生成中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`}]}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`类型筛选`,value:u||void 0,style:{width:120},onChange:e=>{d(e||``),s(1)},options:[{value:`image`,label:`图片`},{value:`video`,label:`视频`}]}),(0,Q.jsx)(hW,{placeholder:`用户ID搜索`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),style:{width:180},value:f,onChange:e=>p(e.target.value),onPressEnter:j,allowClear:!0}),(0,Q.jsx)(hW,{placeholder:`用户名搜索`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),style:{width:160},value:m,onChange:e=>h(e.target.value),onPressEnter:j,allowClear:!0}),(0,Q.jsx)(qE,{type:`primary`,onClick:j,style:{borderRadius:8},children:`搜索`})]})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:i,columns:R,dataSource:e,scroll:{x:1180},pagination:{current:o,pageSize:V7,total:n,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:e=>s(e)}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[C?.genType===`video`?(0,Q.jsx)(M6,{}):(0,Q.jsx)(_2,{}),(0,Q.jsx)(`span`,{children:`创作记录详情`})]}),open:!!C,onCancel:N,footer:null,width:900,destroyOnClose:!0,children:C?(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:12},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12,flexWrap:`wrap`},children:[z?(0,Q.jsx)(NQ,{color:z.color,icon:z.icon,children:z.text}):null,B?(0,Q.jsx)(NQ,{color:B.color,icon:B.icon,children:B.text}):null,C.pipelineStage?(0,Q.jsx)(NQ,{color:`blue`,children:W7[C.pipelineStage]||C.pipelineStage}):null]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`用户名称`,value:C.userName||`未知用户`}),(0,Q.jsx)(t9,{label:`用户ID`,value:C.userId||`-`}),(0,Q.jsx)(t9,{label:`任务ID`,value:C.id})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,lineHeight:1.6},children:C.originalPrompt||`-`})]}),C.genType===`video`?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`时长`,value:C.duration?`${C.duration}秒`:`-`}),(0,Q.jsx)(t9,{label:`画面比例`,value:C.aspectRatio||`-`}),(0,Q.jsx)(t9,{label:`分辨率`,value:C.resolution||`-`})]}):(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`图片档位`,value:C.imageSize||`-`}),(0,Q.jsx)(t9,{label:`图片比例`,value:C.imageProportion||`-`}),(0,Q.jsx)(t9,{label:`像素尺寸`,value:C.imagePx||`-`})]}),C.engineSnapshot?(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`引擎快照`}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`引擎名称`,value:C.engineSnapshot.name||`-`}),(0,Q.jsx)(t9,{label:`服务商`,value:C.engineSnapshot.provider||`-`}),(0,Q.jsx)(t9,{label:`模型`,value:C.engineSnapshot.modelName||`-`}),(0,Q.jsx)(t9,{label:`引擎ID`,value:C.engineSnapshot.id||C.engineId||`-`})]})]}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`总积分`,value:(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:C.creditsCost||0})}),(0,Q.jsx)(t9,{label:`文字积分`,value:`${C.textCreditsCost||0} (${C.textTokensUsed||0} tokens)`}),(0,Q.jsx)(t9,{label:`图片 tokens`,value:C.imageTokensUsed??0}),(0,Q.jsx)(t9,{label:`视频 tokens`,value:C.videoTokensUsed??0})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`第三方任务ID`,value:C.providerTaskId||C.seedanceTaskId||`-`}),(0,Q.jsx)(t9,{label:`轮询次数`,value:C.pollCount??0}),(0,Q.jsx)(t9,{label:`重试次数`,value:C.retryCount??0})]}),!C?.mediaReferences||C.mediaReferences.length===0?null:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`参考内容`}),(0,Q.jsx)(`div`,{style:{display:`flex`,gap:10,flexWrap:`wrap`},children:C.mediaReferences.map((e,t)=>W(e,t))})]}),C.status===`completed`?(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:C.genType===`video`?`生成视频`:`生成图片`}),C.genType===`video`?U():V()]}):null,C.status===`failed`&&C.errorMessage?(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(239,68,68,0.04)`,border:`1px solid rgba(239,68,68,0.15)`},children:(0,Q.jsxs)(Z.Text,{style:{fontSize:12,color:`#ef4444`},children:[`错误信息: `,C.errorMessage]})}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,fontSize:12,color:`#94a3b8`,flexWrap:`wrap`},children:[(0,Q.jsxs)(`span`,{children:[`创建: `,J7(C.createdAt)]}),(0,Q.jsxs)(`span`,{children:[`生成: `,J7(C.generatedAt)]})]})]}):(0,Q.jsx)(pC,{description:`暂无详情`})})]})},n9=20,$ne=[{value:`pending`,label:`已创建`},{value:`waiting_user`,label:`等待用户操作`},{value:`processing`,label:`处理中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`},{value:`cancelled`,label:`已取消`}],ere={pending:{color:`default`,text:`已创建`},waiting_user:{color:`processing`,text:`等待用户操作`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`已完成`},failed:{color:`error`,text:`失败`},cancelled:{color:`default`,text:`已取消`}},tre={material_input:`素材输入`,image_prompt_optimize:`图片 AI 提词`,image_generate:`图片生成`,video_prompt_optimize:`视频 AI 提词`,video_generate:`视频生成`},r9=e=>e?$5(e):`-`,i9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,nre=({status:e})=>{if(!e)return(0,Q.jsx)(NQ,{children:`-`});let t=ere[e]||{color:`blue`,text:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.text})},rre=()=>{let e=Ye(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(1),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(``),[h,g]=(0,S.useState)(``),[_,v]=(0,S.useState)(null),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(``),[w,T]=(0,S.useState)(``),[E,D]=(0,S.useState)(null),[O,k]=(0,S.useState)(0),A=(0,S.useCallback)(async()=>{o(!0);try{let e=await b5({status:l||void 0,keyword:y||void 0,userId:x||void 0,userName:w||void 0,createdStart:E?.[0]?.toISOString?.(),createdEnd:E?.[1]?.toISOString?.(),page:s,pageSize:n9});n(e.items||[]),i(e.total||0)}catch(e){LG.error(e?.message||`加载爆款开头复刻任务失败`)}finally{o(!1)}},[s,E,y,x,w,l]);(0,S.useEffect)(()=>{A()},[A,O]);let j=()=>{b(d.trim()),C(p.trim()),T(h.trim()),D(_),c(1)};return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsx)(PR,{children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{align:`center`,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:3,style:{marginBottom:4},children:`爆款开头复刻`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`只读排查页面:查看任务列表、素材、步骤详情和生成结果。`})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>k(e=>e+1),children:`刷新`})]}),(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`任务状态`,style:{width:160},value:l||void 0,onChange:e=>{u(e||``),c(1)},options:$ne}),(0,Q.jsx)(hW,{allowClear:!0,prefix:(0,Q.jsx)(NC,{}),placeholder:`关键词:标题/项目名/核心点`,style:{width:260},value:d,onChange:e=>f(e.target.value),onPressEnter:j}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户ID(管理员)`,style:{width:190},value:p,onChange:e=>m(e.target.value),onPressEnter:j}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户名(管理员)`,style:{width:230},value:h,onChange:e=>g(e.target.value),onPressEnter:j}),(0,Q.jsx)(YB.RangePicker,{showTime:!0,value:_,onChange:v,placeholder:[`创建开始`,`创建结束`]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(NC,{}),onClick:j,children:`搜索`}),(0,Q.jsx)(qE,{onClick:()=>{u(``),f(``),m(``),g(``),v(null),b(``),C(``),T(``),D(null),c(1),k(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:a,dataSource:t,pagination:{current:s,pageSize:n9,total:r,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:c},scroll:{x:1380},columns:[{title:`项目ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Ow,{title:e,children:i9(e)})},{title:`用户`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(Z.Text,{children:t.userName||`-`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:i9(t.userId)})]})},{title:`项目信息`,width:260,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:2,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.title||t.targetProjectName||`-`}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:240},children:[`素材:`,t.sourceProjectName||`-`]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:240},children:[`核心:`,t.coreContentPoint||`-`]})]})},{title:`状态`,dataIndex:`status`,width:130,render:e=>(0,Q.jsx)(nre,{status:e})},{title:`当前步骤`,dataIndex:`currentStepCode`,width:140,render:e=>tre[e]||e||`-`},{title:`图片结果`,dataIndex:`finalImageUrl`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`success`,children:`有`}):(0,Q.jsx)(NQ,{children:`无`})},{title:`视频结果`,dataIndex:`finalVideoUrl`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`success`,children:`有`}):(0,Q.jsx)(NQ,{children:`无`})},{title:`错误信息`,dataIndex:`errorMessage`,width:220,ellipsis:!0,render:e=>e||`-`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:r9},{title:`更新时间`,dataIndex:`updatedAt`,width:170,render:r9},{title:`操作`,fixed:`right`,width:110,render:(t,n)=>(0,Q.jsx)(qE,{type:`link`,icon:(0,Q.jsx)(qU,{}),onClick:()=>e(`/hot-opening-replications/${n.id}`),children:`详情`})}]})]})})})},a9=({value:e,maxHeight:t=420})=>e==null||e===``?(0,Q.jsx)(pC,{image:pC.PRESENTED_IMAGE_SIMPLE,description:`暂无 JSON 数据`}):(0,Q.jsx)(`pre`,{style:{margin:0,padding:12,maxHeight:t,overflow:`auto`,background:`#0f172a`,color:`#e2e8f0`,borderRadius:8,fontSize:12,lineHeight:1.6},children:JSON.stringify(e,null,2)}),ire=({input:e,output:t,raw:n,inputLabel:r=`查看 input_json`,outputLabel:i=`查看 output_json`,rawLabel:a=`查看原始 JSON`})=>{let o=[];return e!==void 0&&o.push({key:`input`,label:r,children:(0,Q.jsx)(a9,{value:e})}),t!==void 0&&o.push({key:`output`,label:i,children:(0,Q.jsx)(a9,{value:t})}),n!==void 0&&o.push({key:`raw`,label:a,children:(0,Q.jsx)(a9,{value:n})}),o.length?(0,Q.jsx)(Ng,{size:`small`,style:{marginTop:12},items:o}):null},are=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``);function ore(e){if(!e)return``;let t=String(e).trim();return t?/^(https?:)?\/\//i.test(t)||/^(blob|data):/i.test(t)?t:`${are}${t.startsWith(`/`)?t:`/${t}`}`:``}var o9=({url:e,type:t,height:n=260,emptyDescription:r=`暂无资源`,errorDescription:i=`资源加载失败,可能文件不存在、签名过期或访问权限受限。`})=>{let a=(0,S.useMemo)(()=>ore(e),[e]),[o,s]=(0,S.useState)(!1);(0,S.useEffect)(()=>{s(!1)},[a]);let c=a?(0,Q.jsxs)(VV,{wrap:!0,style:{marginTop:8},children:[(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(c$,{}),onClick:async()=>{if(a)try{await navigator.clipboard.writeText(a),LG.success(`资源地址已复制`)}catch{LG.error(`复制失败,请手动复制`)}},children:`复制地址`}),(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(c4,{}),onClick:()=>window.open(a,`_blank`,`noopener,noreferrer`),children:`新窗口打开`}),(0,Q.jsx)(Z.Text,{copyable:{text:a},type:`secondary`,style:{maxWidth:460},ellipsis:!0,children:a})]}):null;return a?(0,Q.jsxs)(`div`,{children:[o?(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`资源预览失败`,description:i,style:{marginBottom:8}}):null,t===`image`?(0,Q.jsx)(PU,{src:a,onError:()=>s(!0),style:{width:`100%`,maxHeight:n,objectFit:`contain`,borderRadius:12,background:`#f8fafc`,border:`1px solid #f1f5f9`},fallback:``,preview:!o}):(0,Q.jsx)(`video`,{src:a,controls:!0,preload:`metadata`,onError:()=>s(!0),style:{width:`100%`,maxHeight:n,borderRadius:12,background:`#0f172a`,border:`1px solid #f1f5f9`}}),c]}):(0,Q.jsx)(`div`,{children:(0,Q.jsx)(`div`,{style:{height:n,borderRadius:12,border:`1px dashed #cbd5e1`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8fafc`},children:(0,Q.jsx)(pC,{image:pC.PRESENTED_IMAGE_SIMPLE,description:r})})})},s9={pending:{text:`待处理`,color:`default`},waiting_user:{text:`等待用户操作`,color:`processing`},processing:{text:`处理中`,color:`warning`},completed:{text:`已完成`,color:`success`},failed:{text:`失败`,color:`error`},cancelled:{text:`已取消`,color:`default`},canceled:{text:`已取消`,color:`default`},timeout:{text:`已超时`,color:`error`},queued:{text:`已入队`,color:`processing`},preparing:{text:`准备中`,color:`processing`},creating_provider_task:{text:`创建远端任务`,color:`processing`},waiting_remote:{text:`等待远端结果`,color:`processing`},polling:{text:`轮询远端结果`,color:`processing`},result_ready:{text:`结果已就绪`,color:`success`},downloading:{text:`下载中`,color:`processing`},done:{text:`已完成`,color:`success`},download_failed:{text:`下载失败`,color:`error`},retry_waiting:{text:`等待重试`,color:`orange`},pending_analysis:{text:`等待分析`,color:`default`},analyzing:{text:`分析中`,color:`processing`},analysis_completed:{text:`分析完成`,color:`success`},analysis_failed:{text:`分析失败`,color:`error`},splitting:{text:`拆镜中`,color:`warning`},split_completed:{text:`拆镜完成`,color:`success`},partial_failed:{text:`部分失败`,color:`orange`},none:{text:`未拆镜`,color:`default`},not_required:{text:`无需处理`,color:`default`},not_started:{text:`未开始`,color:`default`},project_created:{text:`已创建项目`,color:`processing`},true:{text:`是`,color:`success`},false:{text:`否`,color:`default`}},c9={material_input:`素材输入`,image_prompt_optimize:`图片 AI 提词`,image_generate:`图片生成`,video_prompt_optimize:`视频 AI 提词`,video_generate:`视频生成`},l9={hot_opening_replicate:`爆款开头复刻`,shot_replicate:`拆镜复刻`},u9={ai_suggestion:{text:`AI 建议`,color:`purple`},custom:{text:`自定义`,color:`cyan`},original:{text:`原视频`,color:`blue`}};function d9(e){return e?l9[e]||e:`-`}function f9(e){return e?c9[e]||e:`-`}function sre(e){return e?s9[e]?.text||c9[e]||l9[e]||u9[e]?.text||e:`-`}function cre(e){return e?s9[e]?.color||u9[e]?.color||`blue`:`default`}var p9=({status:e,tooltipRaw:t=!0})=>{if(e==null||e===``)return(0,Q.jsx)(NQ,{children:`-`});let n=String(e),r=sre(n),i=(0,Q.jsx)(NQ,{color:cre(n),children:r});return!t||r===n?i:(0,Q.jsx)(Ow,{title:n,children:i})};function m9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function h9(e,...t){for(let n of t){let t=e[n];if(t!=null&&String(t).trim()!==``)return String(t)}return``}function g9(e,t,...n){for(let t of n){let n=e[t];if(n===!0||n===!1)return n;if(n===`true`)return!0;if(n===`false`)return!1}return t}function lre(e,...t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t)&&t>0)return t;if(typeof t==`string`&&t.trim()){let e=Number(t);if(Number.isFinite(e)&&e>0)return e}}}function _9(e){if(!m9(e))return null;let t=h9(e,`key`);return t?{key:t,label:h9(e,`label`)||t,type:h9(e,`type`)||void 0,enabled:g9(e,!0,`enabled`),editable:g9(e,!0,`editable`),maxLength:lre(e,`maxLength`,`max_length`)}:null}function v9(e){if(!m9(e))return null;let t=e.data;return m9(t)?t:Array.isArray(e.sections)?e:null}function ure(e){return!!v9(e)}function dre(e){let t=v9(e);return(Array.isArray(t?.sections)?t.sections:[]).map(e=>{let t=_9(e);if(!t||!m9(e))return null;let n=Array.isArray(e.children)?e.children.map(_9).filter(Boolean):[],r=Array.isArray(e.itemFields)?e.itemFields.map(_9).filter(Boolean):Array.isArray(e.item_fields)?e.item_fields.map(_9).filter(Boolean):[];return{...t,contentKey:h9(e,`contentKey`,`content_key`)||void 0,children:n,itemFields:r}}).filter(e=>!!e&&e.enabled)}function fre(e){return m9(e)?Object.entries(e).filter(([e])=>![`schemaVersion`,`schemaUsage`,`schema_version`,`schema_usage`].includes(e)).map(([e,t])=>Array.isArray(t)&&t.every(m9)?{key:e,label:e,type:`flow`,enabled:!0,editable:!1,itemFields:Array.from(new Set(t.flatMap(e=>Object.keys(e)))).filter(e=>e!==`时间段`).map(e=>({key:e,label:e,enabled:!0,editable:!1})),children:[]}:m9(t)?{key:e,label:e,type:`object`,enabled:!0,editable:!1,children:Object.keys(t).map(e=>({key:e,label:e,enabled:!0,editable:!1})),itemFields:[]}:{key:e,label:e,type:`text`,enabled:!0,editable:!1,children:[],itemFields:[]}):[]}var y9=e=>!!e&&typeof e==`object`&&!Array.isArray(e),b9=e=>typeof e==`string`&&e.length>80,x9=e=>e==null||e===``?(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`}):typeof e==`boolean`?e?`是`:`否`:typeof e==`number`?e:typeof e==`string`?(0,Q.jsx)(Z.Paragraph,{style:{marginBottom:0,whiteSpace:`pre-wrap`},children:e}):(0,Q.jsx)(a9,{value:e,maxHeight:220}),S9=e=>e?(0,Q.jsx)(NQ,{color:`processing`,children:`可编辑`}):(0,Q.jsx)(NQ,{color:`default`,children:`只读`}),C9=(e,t)=>e[t],pre=(e,t)=>{let n=C9(e,t.key);if(!y9(n))return(0,Q.jsx)(a9,{value:n??{},maxHeight:220});let r=t.children.filter(e=>e.enabled);return r.length?(0,Q.jsx)(lV,{size:`small`,column:2,bordered:!0,children:r.map(e=>(0,Q.jsx)(lV.Item,{label:(0,Q.jsxs)(VV,{size:4,children:[e.label,S9(e.editable)]}),span:b9(n[e.key])||y9(n[e.key])||Array.isArray(n[e.key])?2:1,children:x9(n[e.key])},e.key))}):(0,Q.jsx)(a9,{value:n,maxHeight:220})},mre=(e,t)=>{let n=e.itemFields.filter(e=>e.enabled);return n.length?[{key:`时间段`,label:`时间段`,enabled:!0,editable:!1},...n]:Array.from(new Set(t.flatMap(e=>Object.keys(e)))).map(e=>({key:e,label:e,enabled:!0,editable:!1}))},hre=(e,t)=>{let n=C9(e,t.key);if(!Array.isArray(n)||!n.every(y9))return(0,Q.jsx)(a9,{value:n??[],maxHeight:260});let r=n,i=mre(t,r);return(0,Q.jsx)(bQ,{size:`small`,rowKey:(e,n)=>`${t.key}-${n}`,columns:i.map(e=>({title:(0,Q.jsxs)(VV,{size:4,children:[e.label,S9(e.editable)]}),dataIndex:e.key,key:e.key,width:b9(r.find(t=>t[e.key])?.[e.key])?320:160,render:e=>x9(e)})),dataSource:r,pagination:!1,scroll:{x:Math.max(900,i.length*180)},tableLayout:`fixed`})},gre=(e,t)=>x9(C9(e,t.key)),_re=({schema:e,finalPrompt:t,schemaConfigSnapshot:n,schemaConfigSource:r,schemaConfigVersion:i,schemaConfigIsFallback:a})=>{let o=!!e&&Object.keys(e).length>0;if(!o&&!t)return(0,Q.jsx)(pC,{description:`暂无视频提词 schema`});let s=o?e:{},c=ure(n),l=(c?dre(n):fre(s)).filter(e=>e.key in s).map(e=>({key:e.key,label:(0,Q.jsxs)(VV,{size:8,wrap:!0,children:[(0,Q.jsx)(`span`,{children:e.label}),S9(e.editable),c?null:(0,Q.jsx)(NQ,{color:`warning`,children:`管理后台兜底展示`})]}),children:e.type===`object`?pre(s,e):e.type===`flow`?hre(s,e):gre(s,e)}));return(0,Q.jsxs)(VV,{direction:`vertical`,size:12,style:{width:`100%`},children:[(0,Q.jsx)(PR,{size:`small`,title:`Schema 配置来源`,children:(0,Q.jsxs)(lV,{size:`small`,column:3,bordered:!0,children:[(0,Q.jsx)(lV.Item,{label:`来源`,children:r||n?.source||(c?`-`:`viewer_fallback`)}),(0,Q.jsx)(lV.Item,{label:`版本`,children:i||n?.version||`-`}),(0,Q.jsx)(lV.Item,{label:`历史兜底`,children:a||!c?(0,Q.jsx)(NQ,{color:`warning`,children:`是`}):(0,Q.jsx)(NQ,{color:`success`,children:`否`})})]})}),t?(0,Q.jsx)(PR,{size:`small`,title:`最终视频提示词`,children:(0,Q.jsx)(Z.Paragraph,{style:{whiteSpace:`pre-wrap`,marginBottom:0},children:t})}):null,l.length?(0,Q.jsx)(Ng,{size:`small`,items:l}):o?(0,Q.jsx)(PR,{size:`small`,title:`视频提词 Schema`,children:(0,Q.jsx)(a9,{value:s,maxHeight:360})}):null,o?(0,Q.jsx)(Ng,{size:`small`,items:[{key:`raw_schema`,label:`原始 JSON / 历史脏字段排查`,children:(0,Q.jsx)(a9,{value:s,maxHeight:420})}]}):null]})},vre=[`material_input`,`image_prompt_optimize`,`image_generate`,`video_prompt_optimize`,`video_generate`],yre={material_input:`参考素材、项目名称和核心内容点`,image_prompt_optimize:`图片 AI 提词优化结果`,image_generate:`图片引擎、生成参数和结果图`,video_prompt_optimize:`视频 JSON schema、动作流程和最终提词`,video_generate:`视频引擎、生成参数、封面和结果视频`},w9=e=>e?$5(e):`-`,T9=e=>e?e.length>18?`${e.slice(0,10)}...${e.slice(-4)}`:e:`-`,bre=({text:e=`-`})=>(0,Q.jsx)(Z.Text,{type:`secondary`,children:e}),E9=({step:e})=>e?(0,Q.jsx)(ire,{input:e.input,output:e.output}):null,D9=({index:e,stepCode:t,step:n,current:r})=>(0,Q.jsxs)(VV,{wrap:!0,size:8,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:`第${e}步:${f9(t)}`}),(0,Q.jsx)(p9,{status:n?.status||`not_started`}),r?(0,Q.jsx)(NQ,{color:`blue`,children:`当前步骤`}):null,(0,Q.jsx)(Z.Text,{type:`secondary`,children:yre[t]||t}),n?.updatedAt?(0,Q.jsxs)(Z.Text,{type:`secondary`,children:[`更新时间:`,w9(n.updatedAt)]}):null,n?.chatTaskId?(0,Q.jsx)(Ow,{title:n.chatTaskId,children:(0,Q.jsxs)(NQ,{children:[`Chat:`,T9(n.chatTaskId)]})}):null]}),xre=(e,t)=>{if(!e)return[];let n=new Set;return n.add(`material_input`),e.currentStepCode&&n.add(e.currentStepCode),Object.values(t).forEach(e=>{(e.status===`failed`||e.errorMessage)&&n.add(e.stepCode)}),e.errorMessage&&n.add(e.currentStepCode||`material_input`),Array.from(n)},O9=(e,t=`错误信息`)=>e?(0,Q.jsx)(sf,{type:`error`,showIcon:!0,message:t,description:e,style:{marginTop:12,marginBottom:12}}):null,Sre=(e,t=`暂无提词`)=>e?(0,Q.jsx)(Z.Paragraph,{style:{whiteSpace:`pre-wrap`,marginBottom:0},children:e}):(0,Q.jsx)(bre,{text:t}),k9=({moduleType:e=`shot_replicate`})=>{let{projectId:t}=$e(),n=Ye(),[r,i]=(0,S.useState)(null),[a,o]=(0,S.useState)(!1),s=(0,S.useCallback)(async()=>{if(t){o(!0);try{i(e===`hot_opening_replicate`?await x5(t):await E5(t))}catch(e){LG.error(e?.message||`加载复刻项目详情失败`)}finally{o(!1)}}},[e,t]);(0,S.useEffect)(()=>{s()},[s]);let c=(0,S.useMemo)(()=>{let e={};return(r?.steps||[]).forEach(t=>{e[t.stepCode]=t}),e},[r]),l=r?.module||e,u=d9(l),d=(0,S.useMemo)(()=>vre.map(e=>{let t=c[e],n=`wait`;return t?.status===`completed`?n=`finish`:t?.status===`processing`?n=`process`:t?.status===`failed`&&(n=`error`),{title:f9(e),description:t?(0,Q.jsx)(p9,{status:t.status}):`未创建`,status:n}}),[c]),f=(0,S.useMemo)(()=>xre(r,c),[r,c]);if(a&&!r)return(0,Q.jsx)(`div`,{style:{padding:64,textAlign:`center`},children:(0,Q.jsx)(SG,{size:`large`})});if(!r)return(0,Q.jsx)(PR,{style:{margin:24},children:(0,Q.jsx)(pC,{description:`未找到复刻项目详情`})});let p=c.material_input,m=c.image_prompt_optimize,h=c.image_generate,g=c.video_prompt_optimize,_=c.video_generate,v=r.imageGeneration?.resultImageUrl||r.finalImageUrl,y=r.videoGeneration?.resultVideoCoverUrl||r.finalVideoCoverUrl,b=r.videoGeneration?.resultVideoUrl||r.finalVideoUrl,x=[{key:`material_input`,label:(0,Q.jsx)(D9,{index:1,stepCode:`material_input`,step:p,current:r.currentStepCode===`material_input`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`模块类型`,children:(0,Q.jsx)(p9,{status:l})}),(0,Q.jsx)(lV.Item,{label:`素材步骤ID`,children:r.material?.materialStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`参考素材项目名`,children:r.material?.sourceProjectName||`-`}),(0,Q.jsx)(lV.Item,{label:`生成项目名称`,children:r.material?.targetProjectName||`-`}),(0,Q.jsx)(lV.Item,{label:`核心内容点`,span:2,children:r.material?.coreContentPoint||`-`})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(320px, 1fr))`,gap:16},children:[(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(X4,{}),`素材视频`]}),children:(0,Q.jsx)(o9,{type:`video`,url:r.material?.materialVideoUrl,emptyDescription:`暂无素材视频`})}),(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(_2,{}),`素材图片`]}),children:(0,Q.jsx)(o9,{type:`image`,url:r.material?.materialImageUrl,emptyDescription:`暂无素材图片`})})]}),O9(p?.errorMessage),(0,Q.jsx)(E9,{step:p})]})},{key:`image_prompt_optimize`,label:(0,Q.jsx)(D9,{index:2,stepCode:`image_prompt_optimize`,step:m,current:r.currentStepCode===`image_prompt_optimize`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`提词步骤ID`,children:r.imageGeneration?.promptStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`步骤状态`,children:(0,Q.jsx)(p9,{status:m?.status||r.imageGeneration?.status})}),(0,Q.jsx)(lV.Item,{label:`图片提示词`,span:2,children:Sre(r.imageGeneration?.prompt,`暂无图片提示词`)})]}),O9(m?.errorMessage||r.imageGeneration?.errorMessage),(0,Q.jsx)(E9,{step:m})]})},{key:`image_generate`,label:(0,Q.jsx)(D9,{index:3,stepCode:`image_generate`,step:h,current:r.currentStepCode===`image_generate`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`生成步骤ID`,children:r.imageGeneration?.generateStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`Chat任务ID`,children:r.imageGeneration?.chatTaskId||`-`}),(0,Q.jsx)(lV.Item,{label:`状态`,children:(0,Q.jsx)(p9,{status:r.imageGeneration?.status||h?.status})}),(0,Q.jsx)(lV.Item,{label:`图片引擎ID`,children:r.imageGeneration?.engineId||`-`}),(0,Q.jsx)(lV.Item,{label:`图片引擎名称`,children:r.imageGeneration?.engineName||`-`}),(0,Q.jsx)(lV.Item,{label:`生成参数`,span:3,children:(0,Q.jsx)(a9,{value:r.imageGeneration?.params||{},maxHeight:160})})]}),O9(r.imageGeneration?.errorMessage||h?.errorMessage),(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(_2,{}),`图片结果`]}),children:(0,Q.jsx)(o9,{type:`image`,url:v,height:360,emptyDescription:h?.status===`failed`||r.imageGeneration?.errorMessage?`图片生成失败,未返回图片地址`:`暂无图片结果`,errorDescription:`图片资源加载失败,可能图片文件不存在、签名过期或访问权限受限。`})}),(0,Q.jsx)(E9,{step:h})]})},{key:`video_prompt_optimize`,label:(0,Q.jsx)(D9,{index:4,stepCode:`video_prompt_optimize`,step:g,current:r.currentStepCode===`video_prompt_optimize`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`提词步骤ID`,children:r.videoGeneration?.promptStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`步骤状态`,children:(0,Q.jsx)(p9,{status:g?.status})}),(0,Q.jsx)(lV.Item,{label:`提词参数`,span:3,children:(0,Q.jsx)(a9,{value:r.videoGeneration?.promptParams||{},maxHeight:160})})]}),O9(g?.errorMessage||r.videoGeneration?.errorMessage),(0,Q.jsx)(_re,{schema:r.videoGeneration?.promptSchema,finalPrompt:r.videoGeneration?.finalPrompt,schemaConfigSnapshot:r.videoGeneration?.schemaConfigSnapshot,schemaConfigSource:r.videoGeneration?.schemaConfigSource,schemaConfigVersion:r.videoGeneration?.schemaConfigVersion,schemaConfigIsFallback:r.videoGeneration?.schemaConfigIsFallback}),(0,Q.jsx)(E9,{step:g})]})},{key:`video_generate`,label:(0,Q.jsx)(D9,{index:5,stepCode:`video_generate`,step:_,current:r.currentStepCode===`video_generate`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`生成步骤ID`,children:r.videoGeneration?.generateStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`Chat任务ID`,children:r.videoGeneration?.chatTaskId||`-`}),(0,Q.jsx)(lV.Item,{label:`状态`,children:(0,Q.jsx)(p9,{status:r.videoGeneration?.status||_?.status})}),(0,Q.jsx)(lV.Item,{label:`视频引擎ID`,children:r.videoGeneration?.engineId||`-`}),(0,Q.jsx)(lV.Item,{label:`视频引擎名称`,children:r.videoGeneration?.engineName||`-`}),(0,Q.jsx)(lV.Item,{label:`生成参数`,span:3,children:(0,Q.jsx)(a9,{value:r.videoGeneration?.params||{},maxHeight:160})})]}),O9(r.videoGeneration?.errorMessage||_?.errorMessage),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(320px, 1fr))`,gap:16},children:[(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(_2,{}),`视频封面`]}),children:(0,Q.jsx)(o9,{type:`image`,url:y,emptyDescription:_?.status===`failed`||r.videoGeneration?.errorMessage?`视频生成失败,未返回封面`:`暂无视频封面`,errorDescription:`视频封面加载失败,可能文件不存在、签名过期或访问权限受限。`})}),(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(M6,{}),`最终视频`]}),children:(0,Q.jsx)(o9,{type:`video`,url:b,emptyDescription:_?.status===`failed`||r.videoGeneration?.errorMessage?`视频生成失败,未返回视频地址`:`暂无最终视频`,errorDescription:`视频资源加载失败,可能文件不存在、签名过期或访问权限受限。`})})]}),(0,Q.jsx)(E9,{step:_})]})}];return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{wrap:!0,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(X1,{}),onClick:()=>n(-1),children:`返回`}),(0,Q.jsxs)(Z.Title,{level:3,style:{margin:0},children:[u,`项目详情`]}),(0,Q.jsx)(p9,{status:r.status}),r.module&&r.module!==e?(0,Q.jsxs)(NQ,{color:`gold`,children:[`接口模块:`,d9(r.module)]}):null]}),(0,Q.jsx)(qE,{onClick:s,loading:a,children:`刷新`})]}),(0,Q.jsx)(PR,{children:(0,Q.jsxs)(lV,{title:`基础信息`,column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`项目ID`,children:r.id}),(0,Q.jsx)(lV.Item,{label:`模块类型`,children:(0,Q.jsx)(p9,{status:l})}),(0,Q.jsx)(lV.Item,{label:`用户ID`,children:r.userId||`-`}),(0,Q.jsx)(lV.Item,{label:`用户名`,children:r.userName||`-`}),(0,Q.jsx)(lV.Item,{label:`标题`,children:r.title||`-`}),(0,Q.jsx)(lV.Item,{label:`当前步骤`,children:(0,Q.jsx)(Ow,{title:r.currentStepCode||``,children:f9(r.currentStepCode)})}),(0,Q.jsx)(lV.Item,{label:`状态`,children:(0,Q.jsx)(p9,{status:r.status})}),(0,Q.jsx)(lV.Item,{label:`创建时间`,children:w9(r.createdAt)}),(0,Q.jsx)(lV.Item,{label:`更新时间`,children:w9(r.updatedAt)}),(0,Q.jsx)(lV.Item,{label:`完成时间`,children:w9(r.completedAt)}),r.errorMessage?(0,Q.jsx)(lV.Item,{label:`错误信息`,span:3,children:(0,Q.jsx)(sf,{type:`error`,showIcon:!0,message:r.errorMessage})}):null]})}),(0,Q.jsx)(PR,{title:`步骤进度`,children:(0,Q.jsx)(Cq,{items:d})}),(0,Q.jsx)(PR,{title:`最终结果预览`,children:(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(280px, 1fr))`,gap:16},children:[(0,Q.jsx)(PR,{size:`small`,title:`最终图片`,children:(0,Q.jsx)(o9,{type:`image`,url:r.finalImageUrl||r.imageGeneration?.resultImageUrl,height:220,emptyDescription:`暂无最终图片`})}),(0,Q.jsx)(PR,{size:`small`,title:`最终视频封面`,children:(0,Q.jsx)(o9,{type:`image`,url:r.finalVideoCoverUrl||r.videoGeneration?.resultVideoCoverUrl,height:220,emptyDescription:`暂无最终视频封面`})}),(0,Q.jsx)(PR,{size:`small`,title:`最终视频`,children:(0,Q.jsx)(o9,{type:`video`,url:r.finalVideoUrl||r.videoGeneration?.resultVideoUrl,height:220,emptyDescription:`暂无最终视频`})})]})}),(0,Q.jsx)(Ng,{defaultActiveKey:f,items:x}),(0,Q.jsx)(Ng,{items:[{key:`steps-table`,label:`完整步骤列表`,children:(0,Q.jsx)(bQ,{rowKey:`id`,size:`small`,pagination:!1,dataSource:r.steps||[],scroll:{x:1100},columns:[{title:`序号`,dataIndex:`stepIndex`,width:70},{title:`步骤`,dataIndex:`stepCode`,width:160,render:e=>(0,Q.jsx)(Ow,{title:e,children:f9(e)})},{title:`状态`,dataIndex:`status`,width:120,render:e=>(0,Q.jsx)(p9,{status:e})},{title:`版本`,dataIndex:`version`,width:70},{title:`当前有效`,dataIndex:`isCurrent`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`success`,children:`是`}):(0,Q.jsx)(NQ,{children:`否`})},{title:`Chat任务`,dataIndex:`chatTaskId`,width:160,render:e=>(0,Q.jsx)(Ow,{title:e||``,children:T9(e)})},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:w9},{title:`完成时间`,dataIndex:`completedAt`,width:170,render:w9},{title:`错误`,dataIndex:`errorMessage`,ellipsis:!0,render:e=>e||`-`}]})},{key:`raw-detail`,label:`完整详情原始 JSON`,children:(0,Q.jsx)(a9,{value:r,maxHeight:520})}]})]})})},Cre=()=>(0,Q.jsx)(k9,{moduleType:`hot_opening_replicate`}),A9=20,wre=[{value:`pending_analysis`,label:`等待分析`},{value:`analyzing`,label:`分析中`},{value:`analysis_completed`,label:`分析完成`},{value:`analysis_failed`,label:`分析失败`},{value:`splitting`,label:`拆镜中`},{value:`split_completed`,label:`拆镜完成`},{value:`partial_failed`,label:`部分失败`},{value:`failed`,label:`失败`}],Tre=[{value:`pending`,label:`待分析`},{value:`processing`,label:`分析中`},{value:`completed`,label:`分析完成`},{value:`failed`,label:`分析失败`}],Ere=[{value:`none`,label:`未拆镜`},{value:`pending`,label:`待拆镜`},{value:`processing`,label:`拆镜中`},{value:`completed`,label:`拆镜完成`},{value:`failed`,label:`拆镜失败`},{value:`retry_waiting`,label:`等待重试`}],Dre={pending_analysis:{color:`default`,text:`等待分析`},analyzing:{color:`processing`,text:`分析中`},analysis_completed:{color:`success`,text:`分析完成`},analysis_failed:{color:`error`,text:`分析失败`},splitting:{color:`warning`,text:`拆镜中`},split_completed:{color:`success`,text:`拆镜完成`},partial_failed:{color:`orange`,text:`部分失败`},failed:{color:`error`,text:`失败`},none:{color:`default`,text:`未拆镜`},pending:{color:`default`,text:`待处理`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`完成`},retry_waiting:{color:`orange`,text:`等待重试`}},j9=e=>e?$5(e):`-`,M9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,N9=({status:e})=>{if(!e)return(0,Q.jsx)(NQ,{children:`-`});let t=Dre[e]||{color:`blue`,text:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.text})},Ore=()=>{let e=Ye(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(1),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(``),[h,g]=(0,S.useState)(``),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(null),[w,T]=(0,S.useState)(``),[E,D]=(0,S.useState)(``),[O,k]=(0,S.useState)(``),[A,j]=(0,S.useState)(null),[M,N]=(0,S.useState)(0),P=(0,S.useCallback)(async()=>{o(!0);try{let e=await S5({status:l||void 0,analysisStatus:d||void 0,splitStatus:p||void 0,keyword:w||void 0,userId:E||void 0,userName:O||void 0,createdStart:A?.[0]?.toISOString?.(),createdEnd:A?.[1]?.toISOString?.(),page:s,pageSize:A9});n(e.items||[]),i(e.total||0)}catch(e){LG.error(e?.message||`加载拆镜复刻任务失败`)}finally{o(!1)}},[d,s,A,w,E,O,p,l]);(0,S.useEffect)(()=>{P()},[P,M]);let F=()=>{T(h.trim()),D(_.trim()),k(y.trim()),j(x),c(1)};return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsx)(PR,{children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{align:`center`,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:3,style:{marginBottom:4},children:`拆镜复刻`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`只读排查页面:查看拆镜总任务、AI 分析结果、切片列表和关联复刻项目。`})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>N(e=>e+1),children:`刷新`})]}),(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`总任务状态`,style:{width:150},value:l||void 0,onChange:e=>{u(e||``),c(1)},options:wre}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`分析状态`,style:{width:140},value:d||void 0,onChange:e=>{f(e||``),c(1)},options:Tre}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`拆镜状态`,style:{width:140},value:p||void 0,onChange:e=>{m(e||``),c(1)},options:Ere}),(0,Q.jsx)(hW,{allowClear:!0,prefix:(0,Q.jsx)(NC,{}),placeholder:`关键词:标题/内容/分类/受众`,style:{width:260},value:h,onChange:e=>g(e.target.value),onPressEnter:F}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户ID(管理员)`,style:{width:190},value:_,onChange:e=>v(e.target.value),onPressEnter:F}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户名(管理员)`,style:{width:230},value:y,onChange:e=>b(e.target.value),onPressEnter:F}),(0,Q.jsx)(YB.RangePicker,{showTime:!0,value:x,onChange:C,placeholder:[`创建开始`,`创建结束`]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(NC,{}),onClick:F,children:`搜索`}),(0,Q.jsx)(qE,{onClick:()=>{u(``),f(``),m(``),g(``),v(``),b(``),C(null),T(``),D(``),k(``),j(null),c(1),N(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:a,dataSource:t,pagination:{current:s,pageSize:A9,total:r,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:c},scroll:{x:1500},columns:[{title:`任务集ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Ow,{title:e,children:M9(e)})},{title:`用户`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(Z.Text,{children:t.userName||`-`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:M9(t.userId)})]})},{title:`任务信息`,width:300,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:2,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.title||`-`}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:280},children:[`分类:`,t.originalVideoCategory||`-`]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:280},children:[`受众:`,t.originalVideoAudience||`-`]})]})},{title:`总状态`,dataIndex:`status`,width:120,render:e=>(0,Q.jsx)(N9,{status:e})},{title:`分析状态`,dataIndex:`analysisStatus`,width:110,render:e=>(0,Q.jsx)(N9,{status:e})},{title:`拆镜状态`,dataIndex:`splitStatus`,width:110,render:e=>(0,Q.jsx)(N9,{status:e})},{title:`切片进度`,width:180,render:(e,t)=>{let n=t.segmentCount||0,r=t.completedSegmentCount||0;return(0,Q.jsx)(CK,{size:`small`,percent:n?Math.round(r/n*100):0,format:()=>`${r}/${n}`})}},{title:`失败片段`,dataIndex:`failedSegmentCount`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`error`,children:e}):(0,Q.jsx)(NQ,{children:`0`})},{title:`视频时长`,dataIndex:`videoDurationSeconds`,width:100,render:e=>`${Number(e||0).toFixed(1)}s`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:j9},{title:`更新时间`,dataIndex:`updatedAt`,width:170,render:j9},{title:`操作`,fixed:`right`,width:120,render:(t,n)=>(0,Q.jsx)(qE,{type:`link`,icon:(0,Q.jsx)(qU,{}),onClick:()=>e(`/shot-replications/task-sets/${n.id}`),children:`查看切片`})}]})]})})})},kre=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),P9=20,Are=[{value:`ai_suggestion`,label:`AI 建议`},{value:`custom`,label:`自定义`}],jre=[{value:`none`,label:`未拆镜`},{value:`pending`,label:`待拆镜`},{value:`processing`,label:`拆镜中`},{value:`completed`,label:`拆镜完成`},{value:`failed`,label:`拆镜失败`},{value:`retry_waiting`,label:`等待重试`}],Mre=[{value:`not_required`,label:`无需分析`},{value:`pending`,label:`待分析`},{value:`processing`,label:`分析中`},{value:`completed`,label:`分析完成`},{value:`failed`,label:`分析失败`}],Nre=[{value:`not_started`,label:`未复刻`},{value:`project_created`,label:`已创建项目`},{value:`processing`,label:`复刻中`},{value:`completed`,label:`复刻完成`},{value:`failed`,label:`复刻失败`}],Pre={pending_analysis:{color:`default`,text:`等待分析`},analyzing:{color:`processing`,text:`分析中`},analysis_completed:{color:`success`,text:`分析完成`},analysis_failed:{color:`error`,text:`分析失败`},splitting:{color:`warning`,text:`拆镜中`},split_completed:{color:`success`,text:`拆镜完成`},partial_failed:{color:`orange`,text:`部分失败`},failed:{color:`error`,text:`失败`},none:{color:`default`,text:`未拆镜`},pending:{color:`default`,text:`待处理`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`完成`},retry_waiting:{color:`orange`,text:`等待重试`},not_required:{color:`default`,text:`无需分析`},not_started:{color:`default`,text:`未复刻`},project_created:{color:`processing`,text:`已创建项目`}},Fre=e=>{if(!e)return``;let t=String(e).trim();return t?/^(https?:)?\/\//i.test(t)||/^(blob|data):/i.test(t)?t:`${kre}${t.startsWith(`/`)?t:`/${t}`}`:``},F9=e=>e?$5(e):`-`,I9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,L9=({status:e})=>{if(!e)return(0,Q.jsx)(NQ,{children:`-`});let t=Pre[e]||{color:`blue`,text:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.text})},R9=({value:e,maxHeight:t=420})=>(0,Q.jsx)(`pre`,{style:{margin:0,padding:12,maxHeight:t,overflow:`auto`,background:`#0f172a`,color:`#e2e8f0`,borderRadius:8,fontSize:12,lineHeight:1.6},children:JSON.stringify(e??{},null,2)}),z9=({url:e,height:t=280})=>e?(0,Q.jsx)(`video`,{src:Fre(e),controls:!0,preload:`metadata`,style:{width:`100%`,maxHeight:t,borderRadius:12,background:`#0f172a`}}):(0,Q.jsx)(pC,{description:`暂无视频`,image:pC.PRESENTED_IMAGE_SIMPLE}),Ire=({items:e=[]})=>(0,Q.jsx)(bQ,{rowKey:`index`,size:`small`,pagination:!1,dataSource:e,scroll:{x:!0},columns:[{title:`序号`,dataIndex:`index`,width:70},{title:`时间节点`,dataIndex:`timeNode`,width:120},{title:`开始`,dataIndex:`startSecond`,width:80,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`结束`,dataIndex:`endSecond`,width:80,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`内容`,dataIndex:`content`,ellipsis:!0},{title:`分类`,dataIndex:`category`,width:140},{title:`受众`,dataIndex:`audience`,ellipsis:!0}]}),Lre=()=>{let{taskSetId:e}=$e(),t=Ye(),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(0),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(null),k=(0,S.useCallback)(async()=>{if(e){d(!0);try{r(await C5(e))}catch(e){LG.error(e?.message||`加载拆镜任务详情失败`)}finally{d(!1)}}},[e]),A=(0,S.useCallback)(async()=>{if(e){p(!0);try{let t=await w5(e,{sourceMode:g||void 0,splitStatus:v||void 0,analysisStatus:b||void 0,replicateStatus:C||void 0,page:c,pageSize:P9});a(t.items||[]),s(t.total||0)}catch(e){LG.error(e?.message||`加载拆镜片段失败`)}finally{p(!1)}}},[b,c,C,g,v,e]);(0,S.useEffect)(()=>{k()},[k,m]),(0,S.useEffect)(()=>{A()},[A,m]);let j=async e=>{E(!0),O(null);try{O(await T5(e))}catch(e){LG.error(e?.message||`加载片段详情失败`)}};return u&&!n?(0,Q.jsx)(`div`,{style:{padding:64,textAlign:`center`},children:(0,Q.jsx)(SG,{size:`large`})}):n?(0,Q.jsxs)(`div`,{style:{padding:24},children:[(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(X1,{}),onClick:()=>t(`/shot-replications`),children:`返回列表`}),(0,Q.jsx)(Z.Title,{level:3,style:{margin:0},children:`拆镜任务详情`}),(0,Q.jsx)(L9,{status:n.status})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>h(e=>e+1),children:`刷新`})]}),(0,Q.jsx)(PR,{children:(0,Q.jsxs)(lV,{title:`总任务信息`,column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`任务集ID`,children:n.id}),(0,Q.jsx)(lV.Item,{label:`用户ID`,children:n.userId||`-`}),(0,Q.jsx)(lV.Item,{label:`用户名`,children:n.userName||`-`}),(0,Q.jsx)(lV.Item,{label:`标题`,children:n.title||`-`}),(0,Q.jsxs)(lV.Item,{label:`视频时长`,children:[Number(n.videoDurationSeconds||0).toFixed(2),`s`]}),(0,Q.jsx)(lV.Item,{label:`总状态`,children:(0,Q.jsx)(L9,{status:n.status})}),(0,Q.jsx)(lV.Item,{label:`分析状态`,children:(0,Q.jsx)(L9,{status:n.analysisStatus})}),(0,Q.jsx)(lV.Item,{label:`拆镜状态`,children:(0,Q.jsx)(L9,{status:n.splitStatus})}),(0,Q.jsxs)(lV.Item,{label:`片段数量`,children:[n.completedSegmentCount,`/`,n.segmentCount,`,失败 `,n.failedSegmentCount]}),(0,Q.jsx)(lV.Item,{label:`原视频分类`,children:n.originalVideoCategory||`-`}),(0,Q.jsx)(lV.Item,{label:`创建时间`,children:F9(n.createdAt)}),(0,Q.jsx)(lV.Item,{label:`更新时间`,children:F9(n.updatedAt)}),(0,Q.jsx)(lV.Item,{label:`原视频内容`,span:3,children:n.originalVideoContent||`-`}),(0,Q.jsx)(lV.Item,{label:`原视频受众`,span:3,children:n.originalVideoAudience||`-`}),n.analysisErrorMessage?(0,Q.jsx)(lV.Item,{label:`分析错误`,span:3,children:(0,Q.jsx)(sf,{type:`error`,message:n.analysisErrorMessage})}):null,n.splitErrorMessage?(0,Q.jsx)(lV.Item,{label:`拆镜错误`,span:3,children:(0,Q.jsx)(sf,{type:`error`,message:n.splitErrorMessage})}):null]})}),(0,Q.jsx)(PR,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(X4,{}),`原视频预览`]}),children:(0,Q.jsx)(z9,{url:n.videoUrl,height:360})}),(0,Q.jsxs)(PR,{title:`AI 建议拆镜列表`,children:[n.aiSuggestions?.length?(0,Q.jsx)(Ire,{items:n.aiSuggestions}):(0,Q.jsx)(pC,{description:`暂无 AI 建议拆镜`}),(0,Q.jsx)(Ng,{size:`small`,ghost:!0,style:{marginTop:12},items:[{key:`raw`,label:`查看原视频分析完整 JSON`,children:(0,Q.jsx)(R9,{value:n.analysisResultJson})}]})]}),(0,Q.jsxs)(PR,{title:`片段列表`,children:[(0,Q.jsxs)(VV,{wrap:!0,style:{marginBottom:16},children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`片段来源`,style:{width:140},value:g||void 0,options:Are,onChange:e=>{_(e||``),l(1)}}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`切割状态`,style:{width:140},value:v||void 0,options:jre,onChange:e=>{y(e||``),l(1)}}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`分析状态`,style:{width:140},value:b||void 0,options:Mre,onChange:e=>{x(e||``),l(1)}}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`复刻状态`,style:{width:150},value:C||void 0,options:Nre,onChange:e=>{w(e||``),l(1)}}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(NC,{}),onClick:()=>h(e=>e+1),children:`筛选`}),(0,Q.jsx)(qE,{onClick:()=>{_(``),y(``),x(``),w(``),l(1),h(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:f,dataSource:i,pagination:{current:c,pageSize:P9,total:o,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:l},scroll:{x:1550},columns:[{title:`片段ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Ow,{title:e,children:I9(e)})},{title:`序号`,dataIndex:`segmentIndex`,width:70},{title:`来源`,dataIndex:`sourceMode`,width:100,render:e=>e===`ai_suggestion`?(0,Q.jsx)(NQ,{color:`purple`,children:`AI建议`}):(0,Q.jsx)(NQ,{color:`cyan`,children:`自定义`})},{title:`时间节点`,dataIndex:`timeNode`,width:130},{title:`时长`,dataIndex:`durationSeconds`,width:90,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`切割`,dataIndex:`splitStatus`,width:100,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`分析`,dataIndex:`analysisStatus`,width:100,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`复刻`,dataIndex:`replicateStatus`,width:110,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`片段内容`,dataIndex:`segmentContent`,width:260,ellipsis:!0,render:e=>e||`-`},{title:`分类`,dataIndex:`segmentCategory`,width:120,render:e=>e||`-`},{title:`关联项目`,width:220,render:(e,n)=>n.moduleProjectId?(0,Q.jsxs)(VV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(qE,{type:`link`,style:{padding:0},onClick:()=>t(`/shot-replications/projects/${n.moduleProjectId}`),children:I9(n.moduleProjectId)}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:n.moduleProjectTitle||f9(n.moduleProjectCurrentStepCode)}),(0,Q.jsx)(L9,{status:n.moduleProjectStatus})]}):(0,Q.jsx)(NQ,{children:`未创建`})},{title:`错误`,dataIndex:`splitLastError`,width:220,ellipsis:!0,render:(e,t)=>e||t.analysisErrorMessage||`-`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:F9},{title:`操作`,fixed:`right`,width:100,render:(e,t)=>(0,Q.jsx)(qE,{type:`link`,icon:(0,Q.jsx)(qU,{}),onClick:()=>j(t.id),children:`详情`})}]})]})]}),(0,Q.jsx)(MV,{title:`片段详情`,width:720,open:T,onClose:()=>E(!1),destroyOnClose:!0,children:D?(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`片段ID`,span:2,children:D.id}),(0,Q.jsx)(lV.Item,{label:`时间节点`,children:D.timeNode}),(0,Q.jsxs)(lV.Item,{label:`时长`,children:[Number(D.durationSeconds||0).toFixed(2),`s`]}),(0,Q.jsx)(lV.Item,{label:`切割状态`,children:(0,Q.jsx)(L9,{status:D.splitStatus})}),(0,Q.jsx)(lV.Item,{label:`分析状态`,children:(0,Q.jsx)(L9,{status:D.analysisStatus})}),(0,Q.jsx)(lV.Item,{label:`复刻状态`,children:(0,Q.jsx)(L9,{status:D.replicateStatus})}),(0,Q.jsx)(lV.Item,{label:`关联项目`,children:D.moduleProjectId?(0,Q.jsx)(qE,{type:`link`,onClick:()=>t(`/shot-replications/projects/${D.moduleProjectId}`),children:D.moduleProjectId}):`-`}),(0,Q.jsx)(lV.Item,{label:`片段内容`,span:2,children:D.segmentContent||`-`}),(0,Q.jsx)(lV.Item,{label:`片段分类`,children:D.segmentCategory||`-`}),(0,Q.jsx)(lV.Item,{label:`片段受众`,children:D.segmentAudience||`-`})]}),(0,Q.jsx)(PR,{size:`small`,title:`片段视频`,children:(0,Q.jsx)(z9,{url:D.segmentVideoUrl,height:300})}),D.splitLastError?(0,Q.jsx)(sf,{type:`error`,message:`切割错误`,description:D.splitLastError}):null,D.analysisErrorMessage?(0,Q.jsx)(sf,{type:`error`,message:`分析错误`,description:D.analysisErrorMessage}):null,(0,Q.jsx)(Ng,{size:`small`,items:[{key:`analysis`,label:`片段分析 JSON`,children:(0,Q.jsx)(R9,{value:D.analysisJson})},{key:`suggestion`,label:`AI 建议原始 JSON`,children:(0,Q.jsx)(R9,{value:D.aiSuggestionJson})}]})]}):(0,Q.jsx)(SG,{})})]}):(0,Q.jsx)(PR,{style:{margin:24},children:(0,Q.jsx)(pC,{description:`未找到拆镜任务详情`})})},{Title:Rre,Text:B9,Paragraph:zre}=Z,{TextArea:V9}=hW,H9=[{label:`对象`,value:`object`},{label:`数组`,value:`array`},{label:`字符串`,value:`string`},{label:`数字`,value:`number`},{label:`布尔`,value:`boolean`},{label:`流程数组`,value:`flow`}],U9=`画面属性`,Bre=new Set([`视频时长`,`视频比例`,`清晰度`,`帧率`,`推荐分辨率`]);function W9(e,t){return e===U9&&!!t&&Bre.has(t)}function G9(e){return e===U9}function Vre(e){return JSON.parse(JSON.stringify(e??null))}function K9(e,t,n,r){return!e||typeof e!=`object`?r:e[t]===void 0?e[n]===void 0?r:e[n]:e[t]}function Hre(e){return{key:String(e?.key||e?.label||`新流程字段`),label:String(e?.label||e?.key||`新流程字段`),enabled:e?.enabled??!0,editable:e?.editable??!0,maxLength:Number(K9(e,`maxLength`,`max_length`,800)||800),value:e?.value??``}}function q9(e){let t=String(e?.type||`string`),n={key:String(e?.key||e?.label||`新字段`),label:String(e?.label||e?.key||`新字段`),type:t,enabled:e?.enabled??!0,editable:e?.editable??!0,maxLength:Number(K9(e,`maxLength`,`max_length`,t===`flow`?800:1e3)||(t===`flow`?800:1e3))};if(t===`object`)n.children=Array.isArray(e?.children)?e.children.map(q9):[];else if(t===`flow`){n.contentKey=String(K9(e,`contentKey`,`content_key`,e?.key===`镜头流程`?`镜头内容`:`动作内容`));let t=K9(e,`contentAliases`,`content_aliases`,[]);n.contentAliases=Array.isArray(t)?t.map(e=>String(e)).filter(Boolean):[];let r=K9(e,`itemFields`,`item_fields`,[]);n.itemFields=Array.isArray(r)&&r.length>0?r.map(Hre):[{key:n.contentKey,label:n.contentKey,enabled:!0,editable:!0,maxLength:n.maxLength||800,value:``}]}else n.value=e?.value??(t===`array`?[]:t===`boolean`?!1:t===`number`?0:`无`);return n}function Ure(e){let t=Array.isArray(e?.segments)?e.segments:[],n=Array.isArray(e?.ratios)?e.ratios:[];return{minDuration:Number(K9(e,`minDuration`,`min_duration`,1)||1),maxDuration:Number(K9(e,`maxDuration`,`max_duration`,5)||5),ratios:n.map(e=>Number(e||0)),segments:t.map(e=>({stage:String(e?.stage||`新阶段`),description:String(e?.description||e?.desc||`阶段说明`)}))}}function J9(e){let t=Array.isArray(e?.sections)?e.sections:[],n=Array.isArray(e?.timePlanRules)?e.timePlanRules:Array.isArray(e?.time_plan_rules)?e.time_plan_rules:[];return{version:e?.version||`video_prompt_schema_config_v1`,enabled:e?.enabled??!0,sections:t.map(q9),timePlanRules:n.map(Ure)}}function Y9(e,t){let n=G9(e.key),r=W9(t,e.key),i={key:e.key,label:e.label,type:r?`string`:e.type,enabled:n||r?!0:!!e.enabled,editable:r?!1:!!e.editable,max_length:e.maxLength};return e.type===`object`?i.children=(e.children||[]).map(t=>Y9(t,e.key)):e.type===`flow`?(i.content_key=e.contentKey,i.content_aliases=e.contentAliases||[],i.item_fields=(e.itemFields||[]).map(e=>({key:e.key,label:e.label,enabled:!!e.enabled,editable:!!e.editable,max_length:e.maxLength,value:e.value??``}))):i.value=e.value,i}function X9(e,t){return{version:e.version,enabled:t,sections:(e.sections||[]).map(e=>Y9(e)),time_plan_rules:(e.timePlanRules||[]).map(e=>({min_duration:e.minDuration,max_duration:e.maxDuration,ratios:e.ratios||[],segments:(e.segments||[]).map(e=>({stage:e.stage,description:e.description}))}))}}function Z9(e){return e?.runtimeSchema||e?.runtime_schema||{}}function Q9(e){let t=e?.timePlan||e?.time_plan||Z9(e)?.动态时间规划||[];return Array.isArray(t)?t:[]}function Wre(e){return e?.schemaConfigSnapshot||e?.schema_config_snapshot||{}}function Gre(e,t){let n=new Blob([JSON.stringify(t,null,2)],{type:`application/json;charset=utf-8`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=e,i.click(),URL.revokeObjectURL(r)}var $9=(e=`string`)=>({key:`新字段`,label:`新字段`,type:e,enabled:!0,editable:!0,maxLength:e===`flow`?800:1e3,value:e===`array`?[]:e===`boolean`?!1:e===`number`?0:`无`,children:e===`object`?[]:void 0,contentKey:e===`flow`?`动作内容`:void 0,contentAliases:e===`flow`?[`动作内容`,`动作`,`动作说明`,`内容`,`说明`]:void 0,itemFields:e===`flow`?[{key:`动作内容`,label:`动作内容`,enabled:!0,editable:!0,maxLength:800,value:``}]:void 0}),Kre=()=>({minDuration:1,maxDuration:5,ratios:[.2,.4,.4],segments:[{stage:`开场吸引`,description:`快速吸引注意力`},{stage:`核心展示`,description:`展示主体动作、核心卖点或主要视觉内容`},{stage:`收尾引导`,description:`给出行动引导并稳定落版`}]}),qre=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!0),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(null),[g]=X.useForm(),_=(0,S.useRef)(null),v=c?.sections||[],y=c?.timePlanRules||[],b=async()=>{t(!0);try{let e=await D5();a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),l(J9(e.data)),d(J9(e.defaultData??e.default_data))}catch(e){LG.error(e?.message||`加载失败`)}finally{t(!1)}};(0,S.useEffect)(()=>{b()},[]);let x=e=>{l(t=>{let n=J9(Vre(t));return e(n),n})},C=async()=>{if(c){r(!0);try{let e=await O5({is_enabled:i,data:X9(c,i)});l(J9(e.data)),a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),LG.success(`保存成功`)}catch(e){LG.error(e?.message||`保存失败`)}finally{r(!1)}}},w=async()=>{r(!0);try{let e=await k5();l(J9(e.data)),d(J9(e.defaultData??e.default_data)),a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),LG.success(`已恢复默认配置`)}catch(e){LG.error(e?.message||`恢复默认失败`)}finally{r(!1)}},T=async()=>{try{Gre(`video_prompt_schema_config.json`,await A5())}catch(e){LG.error(e?.message||`导出失败`)}},E=async e=>{let t=e.target.files?.[0];if(e.target.value=``,t)try{let e=await t.text(),n=JSON.parse(e),r=n.data||n,o=await j5({is_enabled:!!(n.isEnabled??n.is_enabled??i),data:r});l(J9(o.data)),a(!!(o.isEnabled??o.is_enabled??o.data?.enabled??!1)),s(!!(o.usingDefault??o.using_default??!1)),LG.success(`导入成功`)}catch(e){LG.error(e?.message||`导入失败,请检查 JSON 格式`)}},D=()=>{g.setFieldsValue({duration:8,aspectRatio:`9:16`,resolution:`1080p`,frameRate:`30fps`}),h(null),p(!0)},O=async()=>{if(!c)return;let e=await g.validateFields();try{h(await M5({is_enabled:i,data:X9(c,i),duration:Number(e.duration||8),aspect_ratio:e.aspectRatio,resolution:e.resolution,frame_rate:e.frameRate}))}catch(e){LG.error(e?.message||`预览失败`)}},k=()=>{x(e=>{e.sections.push($9(`object`))})},A=(e,t)=>{x(n=>{let r=n.sections[e];G9(r?.key)&&(delete t.key,delete t.type,delete t.enabled),n.sections[e]={...n.sections[e],...t},t.type===`object`&&(n.sections[e].children=n.sections[e].children||[]),t.type===`flow`&&(n.sections[e].contentKey=n.sections[e].contentKey||`动作内容`,n.sections[e].contentAliases=n.sections[e].contentAliases||[`动作内容`,`动作`,`动作说明`,`内容`,`说明`],n.sections[e].itemFields=n.sections[e].itemFields||[{key:`动作内容`,label:`动作内容`,enabled:!0,editable:!0,maxLength:800,value:``}])})},j=e=>{x(t=>{t.sections.splice(e,1)})},M=e=>{x(t=>{let n=t.sections[e];n.children=n.children||[],n.children.push($9(`string`))})},N=(e,t,n)=>{x(r=>{let i=r.sections[e],a=i.children||[],o=a[t];W9(i?.key,o?.key)&&(delete n.key,delete n.type,delete n.enabled,n.editable=!1),a[t]={...a[t],...n},r.sections[e].children=a})},P=(e,t)=>{x(n=>{n.sections[e].children?.splice(t,1)})},F=e=>{x(t=>{let n=t.sections[e];n.itemFields=n.itemFields||[],n.itemFields.push({key:`新流程字段`,label:`新流程字段`,enabled:!0,editable:!0,maxLength:800,value:``})})},I=(e,t,n)=>{x(r=>{let i=r.sections[e].itemFields||[];i[t]={...i[t],...n},r.sections[e].itemFields=i})},L=(e,t)=>{x(n=>{n.sections[e].itemFields?.splice(t,1)})},R=()=>{x(e=>{e.timePlanRules.push(Kre())})},z=(e,t)=>{x(n=>{n.timePlanRules[e]={...n.timePlanRules[e],...t}})},B=e=>{x(t=>{t.timePlanRules.splice(e,1)})},V=(e,t,n)=>{x(r=>{let i=r.timePlanRules[e];n.ratio!==void 0&&(i.ratios[t]=Number(n.ratio||0)),n.stage!==void 0&&(i.segments[t].stage=n.stage),n.description!==void 0&&(i.segments[t].description=n.description)})},H=e=>{x(t=>{let n=t.timePlanRules[e];n.ratios.push(1),n.segments.push({stage:`新阶段`,description:`阶段说明`})})},U=(e,t)=>{x(n=>{let r=n.timePlanRules[e];r.ratios.splice(t,1),r.segments.splice(t,1)})},W=(0,S.useMemo)(()=>v.map((e,t)=>({key:`section-${t}`,label:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(B9,{strong:!0,children:e.label||e.key||`未命名分组`}),e.key&&e.key!==e.label&&(0,Q.jsxs)(NQ,{color:`blue`,children:[`key: `,e.key]}),(0,Q.jsx)(NQ,{children:e.type}),G9(e.key)&&(0,Q.jsx)(NQ,{color:`red`,children:`系统锁定`}),!e.enabled&&!G9(e.key)&&(0,Q.jsx)(NQ,{color:`default`,children:`已禁用`})]}),children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsxs)(DK,{gutter:12,align:`middle`,children:[(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`key`,value:e.key,maxLength:64,placeholder:`传给 AI 的字段名`,disabled:G9(e.key),onChange:e=>A(t,{key:e.target.value})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`label`,value:e.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>A(t,{label:e.target.value})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(RC,{value:e.type,options:H9,style:{width:`100%`},disabled:G9(e.key),onChange:e=>A(t,{type:e})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`启用`,(0,Q.jsx)(Mq,{checked:G9(e.key)?!0:e.enabled,disabled:G9(e.key),onChange:e=>A(t,{enabled:e})})]})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`可编辑`,(0,Q.jsx)(Mq,{checked:e.editable,onChange:e=>A(t,{editable:e})})]})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,max:2e4,value:e.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>A(t,{maxLength:Number(e||1e3)})})}),(0,Q.jsx)(pz,{span:2,style:{textAlign:`right`},children:(0,Q.jsx)(WG,{title:`确认删除该分组?`,disabled:G9(e.key),onConfirm:()=>j(t),children:(0,Q.jsx)(qE,{danger:!0,icon:(0,Q.jsx)(IQ,{}),disabled:G9(e.key)})})})]}),e.type===`object`&&(0,Q.jsx)(PR,{size:`small`,title:`对象字段`,extra:(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(TL,{}),onClick:()=>M(t),children:`新增字段`}),children:(0,Q.jsx)(VV,{direction:`vertical`,style:{width:`100%`},children:(e.children||[]).map((n,r)=>(0,Q.jsxs)(DK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`key`,value:n.key,maxLength:64,placeholder:`传给 AI 的字段名`,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{key:e.target.value})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`label`,value:n.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>N(t,r,{label:e.target.value})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(RC,{value:n.type,options:H9.filter(e=>e.value!==`object`&&e.value!==`flow`),style:{width:`100%`},disabled:W9(e.key,n.key),onChange:e=>N(t,r,{type:e})})}),(0,Q.jsx)(pz,{span:2,children:(0,Q.jsxs)(VV,{children:[`启用`,(0,Q.jsx)(Mq,{checked:W9(e.key,n.key)?!0:n.enabled,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{enabled:e})})]})}),(0,Q.jsx)(pz,{span:2,children:(0,Q.jsxs)(VV,{children:[`编辑`,(0,Q.jsx)(Mq,{checked:W9(e.key,n.key)?!1:n.editable,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{editable:e})})]})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(oB,{min:1,max:2e4,value:n.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>N(t,r,{maxLength:Number(e||1e3)})})}),(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{value:Array.isArray(n.value)?n.value.join(`/`):String(n.value??``),maxLength:n.maxLength||1e3,placeholder:`默认值`,onChange:e=>N(t,r,{value:n.type===`array`?e.target.value.split(`/`).filter(Boolean):e.target.value})})}),(0,Q.jsx)(pz,{span:1,style:{textAlign:`right`},children:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),disabled:W9(e.key,n.key),onClick:()=>P(t,r)})})]},`child-${t}-${r}`))})}),e.type===`flow`&&(0,Q.jsxs)(PR,{size:`small`,title:`流程数组对象字段`,extra:(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(TL,{}),onClick:()=>F(t),children:`新增流程字段`}),children:[(0,Q.jsxs)(DK,{gutter:12,style:{marginBottom:12},children:[(0,Q.jsx)(pz,{span:6,children:(0,Q.jsx)(hW,{addonBefore:`内容字段`,value:e.contentKey,maxLength:64,onChange:e=>A(t,{contentKey:e.target.value})})}),(0,Q.jsx)(pz,{span:18,children:(0,Q.jsx)(hW,{addonBefore:`别名 / 分隔`,value:(e.contentAliases||[]).join(`/`),onChange:e=>A(t,{contentAliases:e.target.value.split(`/`).map(e=>e.trim()).filter(Boolean)})})})]}),(0,Q.jsx)(VV,{direction:`vertical`,style:{width:`100%`},children:(e.itemFields||[]).map((e,n)=>(0,Q.jsxs)(DK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{addonBefore:`key`,value:e.key,maxLength:64,placeholder:`流程对象字段名`,onChange:e=>I(t,n,{key:e.target.value})})}),(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{addonBefore:`label`,value:e.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>I(t,n,{label:e.target.value})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`启用`,(0,Q.jsx)(Mq,{checked:e.enabled,onChange:e=>I(t,n,{enabled:e})})]})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`编辑`,(0,Q.jsx)(Mq,{checked:e.editable,onChange:e=>I(t,n,{editable:e})})]})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,max:2e4,value:e.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>I(t,n,{maxLength:Number(e||800)})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(hW,{value:String(e.value??``),maxLength:e.maxLength||800,placeholder:`默认值`,onChange:e=>I(t,n,{value:e.target.value})})}),(0,Q.jsx)(pz,{span:1,style:{textAlign:`right`},children:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),onClick:()=>L(t,n)})})]},`flow-${t}-${n}`))})]}),e.type!==`object`&&e.type!==`flow`&&(0,Q.jsx)(PR,{size:`small`,title:`默认值`,children:(0,Q.jsx)(V9,{rows:3,value:Array.isArray(e.value)?e.value.join(` `):String(e.value??``),maxLength:e.maxLength||1e3,showCount:!0,onChange:n=>A(t,{value:e.type===`array`?n.target.value.split(` -`).filter(Boolean):n.target.value})})})]})})),[v]);return e||!c?(0,Q.jsx)(SG,{}):(0,Q.jsxs)(`div`,{style:{padding:24},children:[(0,Q.jsx)(PR,{children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`large`,children:[(0,Q.jsxs)(DK,{justify:`space-between`,align:`middle`,children:[(0,Q.jsxs)(pz,{children:[(0,Q.jsx)(Rre,{level:3,style:{margin:0},children:`视频提词 Schema 配置`}),(0,Q.jsx)(zre,{type:`secondary`,style:{marginBottom:0},children:`配置会被爆款开头复刻和拆镜复刻第 4 步视频 AI 提词共同复用。传给 AI 时只保留纯键值 schema,不携带显示名、启用、可编辑等管理字段。`})]}),(0,Q.jsx)(pz,{children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(B9,{children:`启用自定义配置`}),(0,Q.jsx)(Mq,{checked:i,onChange:a}),o&&(0,Q.jsx)(NQ,{color:`orange`,children:`当前使用默认配置兜底`}),u&&(0,Q.jsxs)(NQ,{children:[`默认分组 `,u.sections.length]})]})})]}),(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`长度限制策略`,description:`只对管理后台字段和用户可编辑字段做长度校验,不会自动裁剪 AI 生成结果或第 5 步最终视频 prompt。若供应商因为 prompt 过长拒绝,会按真实失败进入现有日志/退款/重试流程。`}),(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`预览说明`,description:`预览会跟随右上角「启用自定义配置」开关。关闭时会按默认 CLIENT_SCHEMA_V1 兜底预览;打开后才会按当前页面编辑的 sections 和秒数切片规则预览。`}),(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(b3,{}),loading:n,onClick:C,children:`保存配置`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(qU,{}),onClick:D,children:`预览运行时 Schema`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(b1,{}),onClick:T,children:`导出 JSON`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(E6,{}),onClick:()=>_.current?.click(),children:`导入 JSON`}),(0,Q.jsx)(WG,{title:`确认恢复默认配置?`,description:`会用 CLIENT_SCHEMA_V1 生成的默认配置覆盖当前配置。`,onConfirm:w,children:(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),children:`恢复默认`})}),(0,Q.jsx)(`input`,{ref:_,type:`file`,accept:`application/json,.json`,style:{display:`none`},onChange:E})]}),(0,Q.jsx)(bR,{items:[{key:`fields`,label:`Schema 字段配置`,children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`字段说明`,description:`key 是最终传给 AI 和保存到 prompt_schema 的真实字段名,例如「素材理解」「动作流程」;label 只用于管理后台显示,帮助运营/管理员理解这个字段,不会传给 AI;启用关闭后该字段不会进入运行时 schema;可编辑关闭后用户在第 4 步修改时不能改这个字段。「画面属性」里的视频时长、视频比例、清晰度、帧率、推荐分辨率属于系统锁定参数,不能改 key、不能禁用、不能开放用户编辑。`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(TL,{}),onClick:k,children:`新增一级分组`}),(0,Q.jsx)(Ng,{items:W})]})},{key:`time`,label:`秒数切片规则`,children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`切片规则说明`,description:`这里决定指定视频时长会被拆成几段,以及每段的阶段名称和说明。运行时会同步生成「动态时间规划」「动作流程」「镜头流程」三个数组,三者时间段保持一致。`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(TL,{}),onClick:R,children:`新增秒数规则`}),y.map((e,t)=>(0,Q.jsxs)(PR,{size:`small`,title:`${e.minDuration}-${e.maxDuration} 秒:${e.segments.length} 段`,extra:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),onClick:()=>B(t),children:`删除规则`}),children:[(0,Q.jsxs)(DK,{gutter:12,style:{marginBottom:12},children:[(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,value:e.minDuration,addonBefore:`最小秒`,style:{width:`100%`},onChange:e=>z(t,{minDuration:Number(e||1)})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,value:e.maxDuration,addonBefore:`最大秒`,style:{width:`100%`},onChange:e=>z(t,{maxDuration:Number(e||1)})})}),(0,Q.jsx)(pz,{span:16,children:(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(TL,{}),onClick:()=>H(t),children:`新增片段`})})]}),(0,Q.jsx)(VV,{direction:`vertical`,style:{width:`100%`},children:e.segments.map((n,r)=>(0,Q.jsxs)(DK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(oB,{min:.01,step:.01,value:e.ratios[r],addonBefore:`比例`,style:{width:`100%`},onChange:e=>V(t,r,{ratio:Number(e||.01)})})}),(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{value:n.stage,maxLength:64,placeholder:`阶段`,onChange:e=>V(t,r,{stage:e.target.value})})}),(0,Q.jsx)(pz,{span:15,children:(0,Q.jsx)(hW,{value:n.description,maxLength:300,placeholder:`说明`,onChange:e=>V(t,r,{description:e.target.value})})}),(0,Q.jsx)(pz,{span:1,children:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),onClick:()=>U(t,r)})})]},r))})]},t))]})},{key:`json`,label:`JSON 高级查看`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(X9(c,i),null,2),readOnly:!0})}]})]})}),(0,Q.jsxs)(BG,{title:`预览运行时 Schema`,open:f,onCancel:()=>p(!1),width:980,footer:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{onClick:()=>p(!1),children:`关闭`}),(0,Q.jsx)(qE,{type:`primary`,onClick:O,children:`生成预览`})]}),children:[(0,Q.jsxs)(X,{form:g,layout:`inline`,style:{marginBottom:16},children:[(0,Q.jsx)(X.Item,{name:`duration`,label:`时长`,rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:1,max:3600})}),(0,Q.jsx)(X.Item,{name:`aspectRatio`,label:`比例`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})}),(0,Q.jsx)(X.Item,{name:`resolution`,label:`清晰度`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})}),(0,Q.jsx)(X.Item,{name:`frameRate`,label:`帧率`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})})]}),(0,Q.jsx)(vz,{}),m?(0,Q.jsx)(bR,{items:[{key:`runtime`,label:`运行时 Schema`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Z9(m),null,2),readOnly:!0})},{key:`timePlan`,label:`动态时间规划(${Q9(m).length} 段)`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Q9(m),null,2),readOnly:!0})},{key:`snapshot`,label:`配置快照`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Wre(m),null,2),readOnly:!0})}]}):(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`点击生成预览后,可以看到传给 AI 的纯 schema、动态时间规划和本次配置快照。`})]})]})},Jre=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(10),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(!1),{user:g}=R5(),_=async()=>{if(g?.isAdmin){a(!0);try{let e=new URLSearchParams;e.set(`page`,String(o)),e.set(`page_size`,String(c)),u!==null&&e.set(`is_handled`,String(u));let n=await s8.get(`/contact/requests?${e.toString()}`);t(n.items),r(n.total)}catch(e){LG.error(e?.message||`获取失败`)}finally{a(!1)}}};(0,S.useEffect)(()=>{_()},[o,c,u]);let v=async e=>{try{await s8.put(`/contact/requests/${e}/handle`),LG.success(`已标记为处理`),_()}catch(e){LG.error(e?.message||`操作失败`)}},y=async e=>{try{await s8.delete(`/contact/requests/${e}`),LG.success(`已删除`),_()}catch(e){LG.error(e?.message||`删除失败`)}},b=e=>{p(e),h(!0)};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(E4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`联系请求管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[`共 `,n,` 条记录`]})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,Q.jsx)(qE,{type:u===null?`primary`:`default`,onClick:()=>d(null),icon:(0,Q.jsx)(C2,{}),size:`small`,children:`全部`}),(0,Q.jsx)(qE,{type:u===!1?`primary`:`default`,onClick:()=>d(!1),size:`small`,children:`待处理`}),(0,Q.jsx)(qE,{type:u===!0?`primary`:`default`,onClick:()=>d(!0),size:`small`,children:`已处理`})]})]}),i?(0,Q.jsx)(`div`,{style:{textAlign:`center`,padding:40},children:`加载中...`}):e.length===0?(0,Q.jsx)(pC,{description:`暂无联系请求`,style:{padding:`40px 0`}}):(0,Q.jsx)(bQ,{columns:[{title:`姓名`,dataIndex:`name`,key:`name`,width:100,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`手机号`,dataIndex:`phone`,key:`phone`,width:120},{title:`公司名称`,dataIndex:`company_name`,key:`company_name`,width:150,ellipsis:!0},{title:`行业`,dataIndex:`industry`,key:`industry`,width:120},{title:`状态`,dataIndex:`is_handled`,key:`is_handled`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`orange`,children:e?`已处理`:`待处理`})},{title:`提交时间`,dataIndex:`created_at`,key:`created_at`,width:160,render:e=>$5(e)},{title:`操作`,key:`actions`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>b(t),children:`查看`}),!t.is_handled&&(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(DC,{}),onClick:()=>v(t.id),children:`标记处理`}),(0,Q.jsx)(WG,{title:`确定删除该记录?`,onConfirm:()=>y(t.id),children:(0,Q.jsx)(qE,{type:`link`,danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:c,total:n,onChange:(e,t)=>{s(e),l(t)},showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`},scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qU,{}),`联系请求详情`]}),open:m,onCancel:()=>h(!1),footer:null,width:500,children:f&&(0,Q.jsxs)(`div`,{style:{padding:8},children:[(0,Q.jsxs)(`div`,{style:{marginBottom:16},children:[(0,Q.jsxs)(Z.Title,{level:4,style:{marginBottom:16},children:[f.name,(0,Q.jsx)(NQ,{color:f.is_handled?`green`:`orange`,style:{marginLeft:12},children:f.is_handled?`已处理`:`待处理`})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`120px 1fr`,gap:12},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`手机号:`}),(0,Q.jsx)(Z.Text,{children:f.phone}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`公司名称:`}),(0,Q.jsx)(Z.Text,{children:f.company_name}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`行业:`}),(0,Q.jsx)(Z.Text,{children:f.industry}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`提交时间:`}),(0,Q.jsx)(Z.Text,{children:$5(f.created_at)}),f.message&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`留言:`}),(0,Q.jsx)(Z.Text,{children:f.message})]})]})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[!f.is_handled&&(0,Q.jsx)(qE,{type:`primary`,onClick:()=>{v(f.id),h(!1)},icon:(0,Q.jsx)(DC,{}),children:`标记为已处理`}),(0,Q.jsx)(qE,{onClick:()=>h(!1),children:`关闭`})]})]})})]})},Yre=({children:e})=>{let{user:t,loading:n,checkAuth:r}=R5();return(0,S.useEffect)(()=>{!localStorage.getItem(`auth_token`)&&!n&&!t&&(window.location.href=`/login`)},[t,n]),n?(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,Q.jsx)(SG,{size:`large`})}):t?(0,Q.jsx)(Q.Fragment,{children:e}):(window.location.href=`/login`,null)};(0,_.createRoot)(document.getElementById(`root`)).render((0,Q.jsx)(()=>{let{checkAuth:e}=R5();return(0,S.useEffect)(()=>{e()},[]),(0,Q.jsx)(am,{locale:G6.default,theme:{token:{colorPrimary:`#6366f1`,borderRadius:8},components:{Button:{controlHeight:36,controlHeightLG:44},Card:{boxShadow:`0 1px 3px rgba(0,0,0,0.04)`},Table:{headerBg:`#fafbfc`}}},children:(0,Q.jsx)(ox,{children:(0,Q.jsx)(hn,{children:(0,Q.jsxs)(Dt,{children:[(0,Q.jsx)(Tt,{path:`/login`,element:(0,Q.jsx)(Z5,{})}),(0,Q.jsxs)(Tt,{path:`/`,element:(0,Q.jsx)(Yre,{children:(0,Q.jsx)(U5,{})}),children:[(0,Q.jsx)(Tt,{index:!0,element:(0,Q.jsx)(Q5,{})}),(0,Q.jsx)(Tt,{path:`users`,element:(0,Q.jsx)(r7,{})}),(0,Q.jsx)(Tt,{path:`credit-records`,element:(0,Q.jsx)(yne,{})}),(0,Q.jsx)(Tt,{path:`models`,element:(0,Q.jsx)(i7,{})}),(0,Q.jsx)(Tt,{path:`credit-ratios`,element:(0,Q.jsx)(Nne,{})}),(0,Q.jsx)(Tt,{path:`video-engines`,element:(0,Q.jsx)(Dne,{})}),(0,Q.jsx)(Tt,{path:`image-engines`,element:(0,Q.jsx)(Ane,{})}),(0,Q.jsx)(Tt,{path:`industries`,element:(0,Q.jsx)(Ene,{})}),(0,Q.jsx)(Tt,{path:`menu-configs`,element:(0,Q.jsx)(Ine,{})}),(0,Q.jsx)(Tt,{path:`recharge-packages`,element:(0,Q.jsx)(zne,{})}),(0,Q.jsx)(Tt,{path:`payment`,element:(0,Q.jsx)(bne,{})}),(0,Q.jsx)(Tt,{path:`payment-stats`,element:(0,Q.jsx)(Sne,{})}),(0,Q.jsx)(Tt,{path:`settings`,element:(0,Q.jsx)(a7,{})}),(0,Q.jsx)(Tt,{path:`video-prompt-schema-config`,element:(0,Q.jsx)(qre,{})}),(0,Q.jsx)(Tt,{path:`notifications`,element:(0,Q.jsx)($te,{})}),(0,Q.jsx)(Tt,{path:`oauthapp-list`,element:(0,Q.jsx)(Hne,{})}),(0,Q.jsx)(Tt,{path:`operation-logs`,element:(0,Q.jsx)(Vne,{})}),(0,Q.jsx)(Tt,{path:`generation-records`,element:(0,Q.jsx)(qne,{})}),(0,Q.jsx)(Tt,{path:`generation-ai`,element:(0,Q.jsx)(Qne,{})}),(0,Q.jsx)(Tt,{path:`hot-opening-replications`,element:(0,Q.jsx)(rre,{})}),(0,Q.jsx)(Tt,{path:`hot-opening-replications/:projectId`,element:(0,Q.jsx)(Cre,{})}),(0,Q.jsx)(Tt,{path:`shot-replications`,element:(0,Q.jsx)(Ore,{})}),(0,Q.jsx)(Tt,{path:`shot-replications/task-sets/:taskSetId`,element:(0,Q.jsx)(Lre,{})}),(0,Q.jsx)(Tt,{path:`shot-replications/projects/:projectId`,element:(0,Q.jsx)(k9,{moduleType:`shot_replicate`})}),(0,Q.jsx)(Tt,{path:`authoriza`,element:(0,Q.jsx)(q5,{})}),(0,Q.jsx)(Tt,{path:`consume`,element:(0,Q.jsx)(X5,{})}),(0,Q.jsx)(Tt,{path:`platform`,element:(0,Q.jsx)(n7,{})}),(0,Q.jsx)(Tt,{path:`contact-requests`,element:(0,Q.jsx)(Jre,{})})]}),(0,Q.jsx)(Tt,{path:`*`,element:(0,Q.jsx)(Ct,{to:`/`,replace:!0})})]})})})})},{})); \ No newline at end of file +`).filter(Boolean):n.target.value})})})]})})),[v]);return e||!c?(0,Q.jsx)(SG,{}):(0,Q.jsxs)(`div`,{style:{padding:24},children:[(0,Q.jsx)(PR,{children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`large`,children:[(0,Q.jsxs)(DK,{justify:`space-between`,align:`middle`,children:[(0,Q.jsxs)(pz,{children:[(0,Q.jsx)(Rre,{level:3,style:{margin:0},children:`视频提词 Schema 配置`}),(0,Q.jsx)(zre,{type:`secondary`,style:{marginBottom:0},children:`配置会被爆款开头复刻和拆镜复刻第 4 步视频 AI 提词共同复用。传给 AI 时只保留纯键值 schema,不携带显示名、启用、可编辑等管理字段。`})]}),(0,Q.jsx)(pz,{children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(B9,{children:`启用自定义配置`}),(0,Q.jsx)(Mq,{checked:i,onChange:a}),o&&(0,Q.jsx)(NQ,{color:`orange`,children:`当前使用默认配置兜底`}),u&&(0,Q.jsxs)(NQ,{children:[`默认分组 `,u.sections.length]})]})})]}),(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`长度限制策略`,description:`只对管理后台字段和用户可编辑字段做长度校验,不会自动裁剪 AI 生成结果或第 5 步最终视频 prompt。若供应商因为 prompt 过长拒绝,会按真实失败进入现有日志/退款/重试流程。`}),(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`预览说明`,description:`预览会跟随右上角「启用自定义配置」开关。关闭时会按默认 CLIENT_SCHEMA_V1 兜底预览;打开后才会按当前页面编辑的 sections 和秒数切片规则预览。`}),(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(b3,{}),loading:n,onClick:C,children:`保存配置`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(qU,{}),onClick:D,children:`预览运行时 Schema`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(b1,{}),onClick:T,children:`导出 JSON`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(E6,{}),onClick:()=>_.current?.click(),children:`导入 JSON`}),(0,Q.jsx)(WG,{title:`确认恢复默认配置?`,description:`会用 CLIENT_SCHEMA_V1 生成的默认配置覆盖当前配置。`,onConfirm:w,children:(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),children:`恢复默认`})}),(0,Q.jsx)(`input`,{ref:_,type:`file`,accept:`application/json,.json`,style:{display:`none`},onChange:E})]}),(0,Q.jsx)(bR,{items:[{key:`fields`,label:`Schema 字段配置`,children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`字段说明`,description:`key 是最终传给 AI 和保存到 prompt_schema 的真实字段名,例如「素材理解」「动作流程」;label 只用于管理后台显示,帮助运营/管理员理解这个字段,不会传给 AI;启用关闭后该字段不会进入运行时 schema;可编辑关闭后用户在第 4 步修改时不能改这个字段。「画面属性」里的视频时长、视频比例、清晰度、帧率、推荐分辨率属于系统锁定参数,不能改 key、不能禁用、不能开放用户编辑。`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(TL,{}),onClick:k,children:`新增一级分组`}),(0,Q.jsx)(Ng,{items:W})]})},{key:`time`,label:`秒数切片规则`,children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`切片规则说明`,description:`这里决定指定视频时长会被拆成几段,以及每段的阶段名称和说明。运行时会同步生成「动态时间规划」「动作流程」「镜头流程」三个数组,三者时间段保持一致。`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(TL,{}),onClick:R,children:`新增秒数规则`}),y.map((e,t)=>(0,Q.jsxs)(PR,{size:`small`,title:`${e.minDuration}-${e.maxDuration} 秒:${e.segments.length} 段`,extra:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),onClick:()=>B(t),children:`删除规则`}),children:[(0,Q.jsxs)(DK,{gutter:12,style:{marginBottom:12},children:[(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,value:e.minDuration,addonBefore:`最小秒`,style:{width:`100%`},onChange:e=>z(t,{minDuration:Number(e||1)})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,value:e.maxDuration,addonBefore:`最大秒`,style:{width:`100%`},onChange:e=>z(t,{maxDuration:Number(e||1)})})}),(0,Q.jsx)(pz,{span:16,children:(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(TL,{}),onClick:()=>H(t),children:`新增片段`})})]}),(0,Q.jsx)(VV,{direction:`vertical`,style:{width:`100%`},children:e.segments.map((n,r)=>(0,Q.jsxs)(DK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(oB,{min:.01,step:.01,value:e.ratios[r],addonBefore:`比例`,style:{width:`100%`},onChange:e=>V(t,r,{ratio:Number(e||.01)})})}),(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{value:n.stage,maxLength:64,placeholder:`阶段`,onChange:e=>V(t,r,{stage:e.target.value})})}),(0,Q.jsx)(pz,{span:15,children:(0,Q.jsx)(hW,{value:n.description,maxLength:300,placeholder:`说明`,onChange:e=>V(t,r,{description:e.target.value})})}),(0,Q.jsx)(pz,{span:1,children:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),onClick:()=>U(t,r)})})]},r))})]},t))]})},{key:`json`,label:`JSON 高级查看`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(X9(c,i),null,2),readOnly:!0})}]})]})}),(0,Q.jsxs)(BG,{title:`预览运行时 Schema`,open:f,onCancel:()=>p(!1),width:980,footer:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{onClick:()=>p(!1),children:`关闭`}),(0,Q.jsx)(qE,{type:`primary`,onClick:O,children:`生成预览`})]}),children:[(0,Q.jsxs)(X,{form:g,layout:`inline`,style:{marginBottom:16},children:[(0,Q.jsx)(X.Item,{name:`duration`,label:`时长`,rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:1,max:3600})}),(0,Q.jsx)(X.Item,{name:`aspectRatio`,label:`比例`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})}),(0,Q.jsx)(X.Item,{name:`resolution`,label:`清晰度`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})}),(0,Q.jsx)(X.Item,{name:`frameRate`,label:`帧率`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})})]}),(0,Q.jsx)(vz,{}),m?(0,Q.jsx)(bR,{items:[{key:`runtime`,label:`运行时 Schema`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Z9(m),null,2),readOnly:!0})},{key:`timePlan`,label:`动态时间规划(${Q9(m).length} 段)`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Q9(m),null,2),readOnly:!0})},{key:`snapshot`,label:`配置快照`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Wre(m),null,2),readOnly:!0})}]}):(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`点击生成预览后,可以看到传给 AI 的纯 schema、动态时间规划和本次配置快照。`})]})]})},Jre=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(10),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(!1),{user:g}=R5(),_=async()=>{if(g?.isAdmin){a(!0);try{let e=new URLSearchParams;e.set(`page`,String(o)),e.set(`page_size`,String(c)),u!==null&&e.set(`is_handled`,String(u));let n=await s8.get(`/contact/requests?${e.toString()}`);t(n.items),r(n.total)}catch(e){LG.error(e?.message||`获取失败`)}finally{a(!1)}}};(0,S.useEffect)(()=>{_()},[o,c,u]);let v=async e=>{try{await s8.put(`/contact/requests/${e}/handle`),LG.success(`已标记为处理`),_()}catch(e){LG.error(e?.message||`操作失败`)}},y=async e=>{try{await s8.delete(`/contact/requests/${e}`),LG.success(`已删除`),_()}catch(e){LG.error(e?.message||`删除失败`)}},b=e=>{p(e),h(!0)};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(E4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`联系请求管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[`共 `,n,` 条记录`]})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,Q.jsx)(qE,{type:u===null?`primary`:`default`,onClick:()=>d(null),icon:(0,Q.jsx)(C2,{}),size:`small`,children:`全部`}),(0,Q.jsx)(qE,{type:u===!1?`primary`:`default`,onClick:()=>d(!1),size:`small`,children:`待处理`}),(0,Q.jsx)(qE,{type:u===!0?`primary`:`default`,onClick:()=>d(!0),size:`small`,children:`已处理`})]})]}),i?(0,Q.jsx)(`div`,{style:{textAlign:`center`,padding:40},children:`加载中...`}):e.length===0?(0,Q.jsx)(pC,{description:`暂无联系请求`,style:{padding:`40px 0`}}):(0,Q.jsx)(bQ,{columns:[{title:`姓名`,dataIndex:`name`,key:`name`,width:100,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`手机号`,dataIndex:`phone`,key:`phone`,width:120},{title:`公司名称`,dataIndex:`companyName`,key:`companyName`,width:150,ellipsis:!0},{title:`行业`,dataIndex:`industry`,key:`industry`,width:120},{title:`状态`,dataIndex:`isHandled`,key:`isHandled`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`orange`,children:e?`已处理`:`待处理`})},{title:`提交时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>$5(e)},{title:`操作`,key:`actions`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>b(t),children:`查看`}),!t.isHandled&&(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(DC,{}),onClick:()=>v(t.id),children:`标记处理`}),(0,Q.jsx)(WG,{title:`确定删除该记录?`,onConfirm:()=>y(t.id),children:(0,Q.jsx)(qE,{type:`link`,danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:c,total:n,onChange:(e,t)=>{s(e),l(t)},showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`},scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qU,{}),`联系请求详情`]}),open:m,onCancel:()=>h(!1),footer:null,width:500,children:f&&(0,Q.jsxs)(`div`,{style:{padding:8},children:[(0,Q.jsxs)(`div`,{style:{marginBottom:16},children:[(0,Q.jsxs)(Z.Title,{level:4,style:{marginBottom:16},children:[f.name,(0,Q.jsx)(NQ,{color:f.isHandled?`green`:`orange`,style:{marginLeft:12},children:f.isHandled?`已处理`:`待处理`})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`120px 1fr`,gap:12},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`手机号:`}),(0,Q.jsx)(Z.Text,{children:f.phone}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`公司名称:`}),(0,Q.jsx)(Z.Text,{children:f.companyName}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`行业:`}),(0,Q.jsx)(Z.Text,{children:f.industry}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`提交时间:`}),(0,Q.jsx)(Z.Text,{children:$5(f.createdAt)}),f.message&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`留言:`}),(0,Q.jsx)(Z.Text,{children:f.message})]})]})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[!f.isHandled&&(0,Q.jsx)(qE,{type:`primary`,onClick:()=>{v(f.id),h(!1)},icon:(0,Q.jsx)(DC,{}),children:`标记为已处理`}),(0,Q.jsx)(qE,{onClick:()=>h(!1),children:`关闭`})]})]})})]})},Yre=({children:e})=>{let{user:t,loading:n,checkAuth:r}=R5();return(0,S.useEffect)(()=>{!localStorage.getItem(`auth_token`)&&!n&&!t&&(window.location.href=`/login`)},[t,n]),n?(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,Q.jsx)(SG,{size:`large`})}):t?(0,Q.jsx)(Q.Fragment,{children:e}):(window.location.href=`/login`,null)};(0,_.createRoot)(document.getElementById(`root`)).render((0,Q.jsx)(()=>{let{checkAuth:e}=R5();return(0,S.useEffect)(()=>{e()},[]),(0,Q.jsx)(am,{locale:G6.default,theme:{token:{colorPrimary:`#6366f1`,borderRadius:8},components:{Button:{controlHeight:36,controlHeightLG:44},Card:{boxShadow:`0 1px 3px rgba(0,0,0,0.04)`},Table:{headerBg:`#fafbfc`}}},children:(0,Q.jsx)(ox,{children:(0,Q.jsx)(hn,{children:(0,Q.jsxs)(Dt,{children:[(0,Q.jsx)(Tt,{path:`/login`,element:(0,Q.jsx)(Z5,{})}),(0,Q.jsxs)(Tt,{path:`/`,element:(0,Q.jsx)(Yre,{children:(0,Q.jsx)(U5,{})}),children:[(0,Q.jsx)(Tt,{index:!0,element:(0,Q.jsx)(Q5,{})}),(0,Q.jsx)(Tt,{path:`users`,element:(0,Q.jsx)(r7,{})}),(0,Q.jsx)(Tt,{path:`credit-records`,element:(0,Q.jsx)(yne,{})}),(0,Q.jsx)(Tt,{path:`models`,element:(0,Q.jsx)(i7,{})}),(0,Q.jsx)(Tt,{path:`credit-ratios`,element:(0,Q.jsx)(Nne,{})}),(0,Q.jsx)(Tt,{path:`video-engines`,element:(0,Q.jsx)(Dne,{})}),(0,Q.jsx)(Tt,{path:`image-engines`,element:(0,Q.jsx)(Ane,{})}),(0,Q.jsx)(Tt,{path:`industries`,element:(0,Q.jsx)(Ene,{})}),(0,Q.jsx)(Tt,{path:`menu-configs`,element:(0,Q.jsx)(Ine,{})}),(0,Q.jsx)(Tt,{path:`recharge-packages`,element:(0,Q.jsx)(zne,{})}),(0,Q.jsx)(Tt,{path:`payment`,element:(0,Q.jsx)(bne,{})}),(0,Q.jsx)(Tt,{path:`payment-stats`,element:(0,Q.jsx)(Sne,{})}),(0,Q.jsx)(Tt,{path:`settings`,element:(0,Q.jsx)(a7,{})}),(0,Q.jsx)(Tt,{path:`video-prompt-schema-config`,element:(0,Q.jsx)(qre,{})}),(0,Q.jsx)(Tt,{path:`notifications`,element:(0,Q.jsx)($te,{})}),(0,Q.jsx)(Tt,{path:`oauthapp-list`,element:(0,Q.jsx)(Hne,{})}),(0,Q.jsx)(Tt,{path:`operation-logs`,element:(0,Q.jsx)(Vne,{})}),(0,Q.jsx)(Tt,{path:`generation-records`,element:(0,Q.jsx)(qne,{})}),(0,Q.jsx)(Tt,{path:`generation-ai`,element:(0,Q.jsx)(Qne,{})}),(0,Q.jsx)(Tt,{path:`hot-opening-replications`,element:(0,Q.jsx)(rre,{})}),(0,Q.jsx)(Tt,{path:`hot-opening-replications/:projectId`,element:(0,Q.jsx)(Cre,{})}),(0,Q.jsx)(Tt,{path:`shot-replications`,element:(0,Q.jsx)(Ore,{})}),(0,Q.jsx)(Tt,{path:`shot-replications/task-sets/:taskSetId`,element:(0,Q.jsx)(Lre,{})}),(0,Q.jsx)(Tt,{path:`shot-replications/projects/:projectId`,element:(0,Q.jsx)(k9,{moduleType:`shot_replicate`})}),(0,Q.jsx)(Tt,{path:`authoriza`,element:(0,Q.jsx)(q5,{})}),(0,Q.jsx)(Tt,{path:`consume`,element:(0,Q.jsx)(X5,{})}),(0,Q.jsx)(Tt,{path:`platform`,element:(0,Q.jsx)(n7,{})}),(0,Q.jsx)(Tt,{path:`contact-requests`,element:(0,Q.jsx)(Jre,{})})]}),(0,Q.jsx)(Tt,{path:`*`,element:(0,Q.jsx)(Ct,{to:`/`,replace:!0})})]})})})})},{})); \ No newline at end of file diff --git a/video-gen-admin/dist/index.html b/video-gen-admin/dist/index.html index e79dac34..1af7f1dd 100644 --- a/video-gen-admin/dist/index.html +++ b/video-gen-admin/dist/index.html @@ -28,7 +28,7 @@ } })(); - + diff --git a/video-gen-admin/src/pages/AdminContactRequests.tsx b/video-gen-admin/src/pages/AdminContactRequests.tsx index b70ffd0b..0b5fc80c 100644 --- a/video-gen-admin/src/pages/AdminContactRequests.tsx +++ b/video-gen-admin/src/pages/AdminContactRequests.tsx @@ -7,14 +7,14 @@ import { formatDate } from '../utils/formatDate'; interface ContactRequest { id: string; - user_id: string; + userId: string; phone: string; - company_name: string; + companyName: string; industry: string; name: string; message: string | null; - is_handled: boolean; - created_at: string; + isHandled: boolean; + createdAt: string; } const AdminContactRequests: React.FC = () => { @@ -99,8 +99,8 @@ const AdminContactRequests: React.FC = () => { }, { title: '公司名称', - dataIndex: 'company_name', - key: 'company_name', + dataIndex: 'companyName', + key: 'companyName', width: 150, ellipsis: true, }, @@ -112,8 +112,8 @@ const AdminContactRequests: React.FC = () => { }, { title: '状态', - dataIndex: 'is_handled', - key: 'is_handled', + dataIndex: 'isHandled', + key: 'isHandled', width: 80, render: (isHandled: boolean) => ( @@ -123,8 +123,8 @@ const AdminContactRequests: React.FC = () => { }, { title: '提交时间', - dataIndex: 'created_at', - key: 'created_at', + dataIndex: 'createdAt', + key: 'createdAt', width: 160, render: (date: string) => formatDate(date), }, @@ -137,7 +137,7 @@ const AdminContactRequests: React.FC = () => { - {!record.is_handled && ( + {!record.isHandled && ( @@ -220,19 +220,19 @@ const AdminContactRequests: React.FC = () => {
{selectedItem.name} - - {selectedItem.is_handled ? '已处理' : '待处理'} + + {selectedItem.isHandled ? '已处理' : '待处理'}
手机号: {selectedItem.phone} 公司名称: - {selectedItem.company_name} + {selectedItem.companyName} 行业: {selectedItem.industry} 提交时间: - {formatDate(selectedItem.created_at)} + {formatDate(selectedItem.createdAt)} {selectedItem.message && ( <> 留言: @@ -242,7 +242,7 @@ const AdminContactRequests: React.FC = () => {
- {!selectedItem.is_handled && ( + {!selectedItem.isHandled && (
From 7b37fcfc6180222a613c149efb51215aa73a6cbd Mon Sep 17 00:00:00 2001 From: Lrd <13001933075@sina.cn> Date: Fri, 26 Jun 2026 12:43:13 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E7=B4=A0=E6=9D=90=E4=BA=91=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- video-gen-admin/src/api/index.ts | 5 +- video-gen-admin/src/pages/Adminplatform.tsx | 163 ++++--- .../{index-Dm7vTAAt.js => index-CUOi61z4.js} | 4 +- video-gen-app/dist/index.html | 2 +- video-gen-app/src/pages/GeneratedRecord.tsx | 426 ++++++++++-------- 5 files changed, 353 insertions(+), 247 deletions(-) rename video-gen-app/dist/assets/{index-Dm7vTAAt.js => index-CUOi61z4.js} (98%) diff --git a/video-gen-admin/src/api/index.ts b/video-gen-admin/src/api/index.ts index 8929219a..8c6f1967 100644 --- a/video-gen-admin/src/api/index.ts +++ b/video-gen-admin/src/api/index.ts @@ -431,7 +431,10 @@ export async function getOpenTypeList(params?: { page_size?: number; type_name?: string; open_type?: number; -}): Promise<{ total: number; items: any[] }> { +}): Promise<{ + pagination: any; + data: never[]; +}> { const q = new URLSearchParams(); if (params?.page) q.set('page', String(params.page)); if (params?.page_size) q.set('page_size', String(params.page_size)); diff --git a/video-gen-admin/src/pages/Adminplatform.tsx b/video-gen-admin/src/pages/Adminplatform.tsx index ad9cf885..45a933e4 100644 --- a/video-gen-admin/src/pages/Adminplatform.tsx +++ b/video-gen-admin/src/pages/Adminplatform.tsx @@ -10,8 +10,8 @@ import { formatDate } from '../utils/formatDate'; interface OpenType { id: string; - open_type: number; - type_name: string; + openType: number; + typeName: string; description: string; thumb?: string; createdAt: string; @@ -49,6 +49,8 @@ const AdminPlatform: React.FC = () => { const [detailModalVisible, setDetailModalVisible] = useState(false); const [updateModalVisible, setUpdateModalVisible] = useState(false); const [currentOpenType, setCurrentOpenType] = useState(null); + const [createThumbUrl, setCreateThumbUrl] = useState(''); + const [updateThumbUrl, setUpdateThumbUrl] = useState(''); const [createForm] = Form.useForm(); const [updateForm] = Form.useForm(); @@ -60,8 +62,8 @@ const AdminPlatform: React.FC = () => { page: p || page, page_size: ps || pageSize, }); - setOpenTypes(res.items || []); - setTotal(res.total || 0); + setOpenTypes(res.data || []); + setTotal(res.pagination.total || 0); } catch { message.error('加载开户方式列表失败'); } finally { @@ -76,16 +78,16 @@ const AdminPlatform: React.FC = () => { const handleCreate = async () => { try { const values = await createForm.validateFields(); - console.log(values); await createOpenType({ open_type: values.open_type, type_name: values.type_name, description: values.description, - thumb: values.thumb, + thumb: createThumbUrl, }); message.success('创建成功'); setCreateModalVisible(false); createForm.resetFields(); + setCreateThumbUrl(''); load(); } catch (e: any) { message.error(e?.message || '创建失败'); @@ -95,7 +97,7 @@ const AdminPlatform: React.FC = () => { const handleDetail = async (id: string) => { try { const openType = await getOpenType(id); - setCurrentOpenType(openType); + setCurrentOpenType(openType.data || {}); setDetailModalVisible(true); } catch (e: any) { message.error(e?.message || '获取详情失败'); @@ -105,19 +107,14 @@ const AdminPlatform: React.FC = () => { const handleUpdate = async (id: string) => { try { const openType = await getOpenType(id); - setCurrentOpenType(openType); - updateForm.setFieldsValue({ - open_type: openType.open_type, - type_name: openType.type_name, - description: openType.description, - thumb: openType.thumb, - }); + setCurrentOpenType(openType.data || {}); + setUpdateThumbUrl(openType.thumb || ''); setUpdateModalVisible(true); } catch (e: any) { message.error(e?.message || '获取详情失败'); } }; - + const handleSaveUpdate = async () => { if (!currentOpenType) return; try { @@ -126,12 +123,13 @@ const AdminPlatform: React.FC = () => { open_type: values.open_type, type_name: values.type_name, description: values.description, - thumb: values.thumb, + thumb: updateThumbUrl, }); message.success('更新成功'); setUpdateModalVisible(false); updateForm.resetFields(); setCurrentOpenType(null); + setUpdateThumbUrl(''); load(); } catch (e: any) { message.error(e?.message || '更新失败'); @@ -166,13 +164,13 @@ const AdminPlatform: React.FC = () => { }, { title: '开户类型', - dataIndex: 'open_type', + dataIndex: 'openType', width: 100, render: (v: number) => {v}, }, { title: '类型名称', - dataIndex: 'type_name', + dataIndex: 'typeName', width: 150, render: (v: string) => {v}, }, @@ -191,9 +189,12 @@ const AdminPlatform: React.FC = () => { title: '缩略图', dataIndex: 'thumb', width: 120, - render: (v: string) => ( - v ? thumb : '-' - ), + render: (v: string) => { + if (!v) return '-'; + const baseUrl = import.meta.env.VITE_API_BASE || 'http://localhost:8000'; + const fullUrl = v.startsWith('http') ? v : `${baseUrl}${v}`; + return thumb; + }, }, { title: '创建时间', @@ -291,7 +292,9 @@ const AdminPlatform: React.FC = () => { onCancel={() => { setCreateModalVisible(false); createForm.resetFields(); + setCreateThumbUrl(''); }} + mask={{ closable: false }} okText="创建" cancelText="取消" width={600} @@ -326,28 +329,28 @@ const AdminPlatform: React.FC = () => { > - + { try { const uploadFile = assertUploadFile(file); const res = await uploadImage(uploadFile); - console.log(res); - createForm.setFieldsValue({ thumb: res.url }); + setCreateThumbUrl(res.url); onSuccess?.({ url: res.url }); } catch (e) { onError?.(normalizeUploadError(e)); } }} + onRemove={() => setCreateThumbUrl('')} > -
- -
上传图片
-
+ {!createThumbUrl && ( +
+ +
上传图片
+
+ )}
@@ -356,32 +359,68 @@ const AdminPlatform: React.FC = () => { setDetailModalVisible(false)} onCancel={() => { setDetailModalVisible(false); setCurrentOpenType(null); }} + mask={{ closable: false }} okText="关闭" cancelText="取消" - width={600} + width={520} > {currentOpenType && ( -
-

ID: {currentOpenType.id}

-

开户类型: {currentOpenType.open_type}

-

类型名称: {currentOpenType.type_name}

-

描述: {currentOpenType.description}

-

- 缩略图:{' '} - {currentOpenType.thumb ? ( - thumb - ) : '-'} -

-

创建时间: {formatDate(currentOpenType.createdAt)}

-

更新时间: {formatDate(currentOpenType.updatedAt)}

+
+
+
+ {currentOpenType.thumb ? ( + thumb + ) : ( + 暂无图片 + )} +
+
+
{currentOpenType.typeName}
+
开户类型: {currentOpenType.openType}
+
+
+ +
+
+ ID + {currentOpenType.id} +
+
+ 开户类型 + {currentOpenType.openType} +
+
+ 类型名称 + {currentOpenType.typeName} +
+
+ 描述 +
+ {currentOpenType.description || '-'} +
+
+
+ 创建时间 + {formatDate(currentOpenType.createdAt)} +
+
+ 更新时间 + {formatDate(currentOpenType.updatedAt)} +
+
)} @@ -395,6 +434,16 @@ const AdminPlatform: React.FC = () => { updateForm.resetFields(); setCurrentOpenType(null); }} + afterOpenChange={(open) => { + if (open && currentOpenType) { + updateForm.setFieldsValue({ + open_type: currentOpenType.openType, + type_name: currentOpenType.typeName, + description: currentOpenType.description, + }); + } + }} + mask={{ closable: false }} okText="更新" cancelText="取消" width={600} @@ -424,29 +473,23 @@ const AdminPlatform: React.FC = () => { > - + { try { const uploadFile = assertUploadFile(file); const res = await uploadImage(uploadFile); - updateForm.setFieldsValue({ thumb: res.url }); + setUpdateThumbUrl(res.url); onSuccess?.({ url: res.url }); } catch (e) { onError?.(normalizeUploadError(e)); } }} + onRemove={() => setUpdateThumbUrl('')} > - {!updateForm.getFieldValue('thumb') && ( + {!updateThumbUrl && (
上传图片
diff --git a/video-gen-app/dist/assets/index-Dm7vTAAt.js b/video-gen-app/dist/assets/index-CUOi61z4.js similarity index 98% rename from video-gen-app/dist/assets/index-Dm7vTAAt.js rename to video-gen-app/dist/assets/index-CUOi61z4.js index 582a14f7..7235ca93 100644 --- a/video-gen-app/dist/assets/index-Dm7vTAAt.js +++ b/video-gen-app/dist/assets/index-CUOi61z4.js @@ -416,9 +416,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } `})]}):e===`failed`?(0,$.jsx)(`span`,{style:{fontSize:11,color:`#ef4444`},children:`失败`}):e===`completed`&&t.finalVideoUrl?(0,$.jsx)(`span`,{style:{fontSize:11,color:`#10b981`},children:`任务完成`}):null})()]})]})]},t.id))}),(0,$.jsx)(`div`,{style:{paddingTop:20,paddingBottom:20,display:`flex`,justifyContent:`center`},children:(0,$.jsx)(KK,{current:p,pageSize:h,total:_,onChange:U,showSizeChanger:!1,showQuickJumper:!1,showTotal:e=>`共 ${e} 条`,itemRender:(e,t,n)=>t===`prev`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid #e5e7eb`,borderRadius:6,background:p===1?`#f9fafb`:`#fff`,cursor:p===1?`not-allowed`:`pointer`,color:p===1?`#d1d5db`:`#6b7280`,fontSize:14},disabled:p===1,children:`‹`}):t===`next`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid #e5e7eb`,borderRadius:6,background:p>=Math.ceil(_/h)?`#f9fafb`:`#fff`,cursor:p>=Math.ceil(_/h)?`not-allowed`:`pointer`,color:p>=Math.ceil(_/h)?`#d1d5db`:`#6b7280`,fontSize:14},disabled:p>=Math.ceil(_/h),children:`›`}):t===`page`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`none`,borderRadius:6,background:e===p?`#6366f1`:`#fff`,color:e===p?`#fff`:`#374151`,fontWeight:e===p?500:400,cursor:`pointer`,fontSize:14},children:e}):n})})]}):(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`40px`},children:[(0,$.jsxs)(`div`,{style:{width:120,height:120,display:`flex`,alignItems:`center`,justifyContent:`center`,marginBottom:24,position:`relative`},children:[(0,$.jsx)(`div`,{style:{width:60,height:60,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:20,position:`absolute`,bottom:0,right:10}}),(0,$.jsx)(`div`,{style:{width:50,height:50,border:`2px solid rgba(99, 102, 241, 0.2)`,borderRadius:16,position:`absolute`,top:0,left:10}}),(0,$.jsx)(`div`,{style:{width:56,height:56,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:18,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 24px rgba(99, 102, 241, 0.25)`},children:(0,$.jsx)(q8,{style:{fontSize:28,color:`#fff`}})})]}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:600,color:`#1e293b`,marginBottom:8},children:`暂无生成内容`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#64748b`,textAlign:`center`,padding:`0 40px`,lineHeight:1.6},children:`请完善素材与卖点,生成专属爆款开头复刻视频`})]})})]}),(0,$.jsx)(`div`,{className:`replication-form`,style:{flex:1,overflow:`auto`,width:`28%`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,position:`relative`,zIndex:10},children:(0,$.jsxs)(`div`,{className:`replication-form-content`,style:{width:`100%`,height:`100%`,background:`rgba(248, 250, 252, 0.5)`,padding:24,overflowY:`auto`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10},children:`上传复刻视频`}),O?(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`video`,{src:O,controls:!0,style:{width:`100%`,borderRadius:12,maxHeight:200,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`}}),(0,$.jsx)(`button`,{onClick:()=>{O&&URL.revokeObjectURL(O),D(null),k(``)},style:{position:`absolute`,top:8,right:8,width:28,height:28,border:`none`,background:`rgba(239, 68, 68, 0.9)`,borderRadius:`50%`,cursor:`pointer`,color:`#fff`,fontSize:16,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10,transition:`all 0.2s`},children:`×`}),(0,$.jsxs)(`div`,{style:{marginTop:10,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(q8,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#475569`},children:E?.name}),(0,$.jsxs)(`span`,{style:{fontSize:11,color:`#94a3b8`},children:[`(`,E?.size?(E.size/1024/1024).toFixed(2):0,`MB)`]})]})]}):(0,$.jsx)(C0,{beforeUpload:async e=>{if(!e.type.startsWith(`video/`))return Z.error(`只能上传视频文件`),!1;if(!(e.size/1024/1024<50))return Z.error(`视频大小不能超过50MB`),!1;let t=document.createElement(`video`);return t.preload=`metadata`,new Promise(n=>{t.onloadedmetadata=async()=>{if(t.duration<2){Z.error(`视频时长不能少于2秒`),URL.revokeObjectURL(t.src),n(!1);return}if(t.duration>=16){Z.error(`视频时长不能超过15秒`),URL.revokeObjectURL(t.src),n(!1);return}F(!0);try{let t=await B5(e);D(e),k(`http://ceshi.apiforeign.minzhong.cn${t.url}`),Z.success(`视频上传成功`),n(!1)}catch(e){let t=``;if(e instanceof Error)try{t=JSON.parse(e.message).detail||e.message}catch{t=e.message}Z.error(t||`视频上传失败`),n(!1)}finally{F(!1),URL.revokeObjectURL(t.src)}},t.onerror=()=>{Z.error(`视频文件无效`),URL.revokeObjectURL(t.src),n(!1)},t.src=URL.createObjectURL(e)})},showUploadList:!1,accept:`video/mp4,video/quicktime,.mp4,.mov`,children:(0,$.jsx)(`div`,{style:{border:`2px dashed rgba(99, 102, 241, 0.3)`,borderRadius:12,padding:24,textAlign:`center`,cursor:`pointer`,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`,background:`rgba(99, 102, 241, 0.02)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.02)`},children:P?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{width:40,height:40,margin:`0 auto 12px`,border:`3px solid rgba(99, 102, 241, 0.2)`,borderTopColor:`#6366f1`,borderRadius:`50%`,animation:`spin 1s linear infinite`}}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#6366f1`,fontWeight:500},children:`上传中...`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持的文件类型:MP4、MOV | 视频最大时长:15 秒 | 最大大小:50M`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:48,height:48,margin:`0 auto 12px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:16,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(q8,{style:{fontSize:24,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#475569`,fontWeight:500},children:`点击或拖拽上传视频`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持的文件类型:MP4、MOV | 视频最大时长:15 秒 | 最大大小:50M`})]})})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10},children:`上传产品图片`}),M?(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`img`,{src:M,alt:`产品图片`,style:{width:`100%`,borderRadius:12,maxHeight:200,objectFit:`contain`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`}}),(0,$.jsx)(`button`,{onClick:()=>{M&&URL.revokeObjectURL(M),j(null),N(``)},style:{position:`absolute`,top:8,right:8,width:28,height:28,border:`none`,background:`rgba(239, 68, 68, 0.9)`,borderRadius:`50%`,cursor:`pointer`,color:`#fff`,fontSize:16,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10,transition:`all 0.2s`},children:`×`}),(0,$.jsxs)(`div`,{style:{marginTop:10,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(d6,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#475569`},children:A?.name}),(0,$.jsxs)(`span`,{style:{fontSize:11,color:`#94a3b8`},children:[`(`,A?.size?(A.size/1024/1024).toFixed(2):0,`MB)`]})]})]}):(0,$.jsx)(C0,{beforeUpload:async e=>{if(!e.type.startsWith(`image/`))return Z.error(`只能上传图片文件`),!1;if(!(e.size/1024/1024<10))return Z.error(`图片大小不能超过10MB`),!1;let t=new Image;return new Promise(n=>{t.onload=async()=>{let r=t.width/t.height;Math.abs(r-.75)<.1||Math.abs(r-.5625),L(!0);try{let t=await z5(e);j(e),N(`http://ceshi.apiforeign.minzhong.cn${t.url}`),Z.success(`图片上传成功`),n(!1)}catch(e){let t=``;if(e instanceof Error)try{t=JSON.parse(e.message).detail||e.message}catch{t=e.message}Z.error(t||`图片上传失败`),n(!1)}finally{L(!1),URL.revokeObjectURL(t.src)}},t.onerror=()=>{Z.error(`图片文件无效`),URL.revokeObjectURL(t.src),n(!1)},t.src=URL.createObjectURL(e)})},showUploadList:!1,accept:`image/jpeg,image/jpg,image/png,.jpg,.jpeg,.png`,children:(0,$.jsx)(`div`,{style:{border:`2px dashed rgba(99, 102, 241, 0.3)`,borderRadius:12,padding:20,textAlign:`center`,cursor:`pointer`,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`,background:`rgba(99, 102, 241, 0.02)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.02)`},children:I?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{width:36,height:36,margin:`0 auto 10px`,border:`3px solid rgba(99, 102, 241, 0.2)`,borderTopColor:`#6366f1`,borderRadius:`50%`,animation:`spin 1s linear infinite`}}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#6366f1`,fontWeight:500},children:`上传中...`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持 JPG, JPEG, PNG 格式,图片比例为 3:4 或 9:16 效果最佳`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:44,height:44,margin:`0 auto 10px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:14,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(d6,{style:{fontSize:22,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#475569`,fontWeight:500},children:`+ 点击上传`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持 JPG, JPEG, PNG 格式,图片比例为 3:4 或 9:16 效果最佳`})]})})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:`原视频产品名称`}),(0,$.jsx)(oK,{value:y,onChange:e=>b(e.target.value),placeholder:`请输入原视频产品名称`,style:{borderRadius:10,height:40,fontSize:13,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},maxLength:10,suffix:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[y.length,`/10`]})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:`自有产品名称`}),(0,$.jsx)(oK,{value:x,onChange:e=>C(e.target.value),placeholder:`请输入自有产品名称`,style:{borderRadius:10,height:40,fontSize:13,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},maxLength:10,suffix:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[x.length,`/10`]})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:24},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:`产品卖点`}),(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(wte,{value:w,onChange:e=>T(e.target.value),placeholder:`请输入产品卖点`,style:{borderRadius:10,fontSize:13,height:80,resize:`none`,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},rows:3,maxLength:30}),(0,$.jsxs)(`span`,{style:{position:`absolute`,right:10,bottom:8,color:`#94a3b8`,fontSize:12},children:[w.length,`/30`]})]})]}),(0,$.jsx)(bD,{type:`primary`,block:!0,size:`large`,onClick:()=>{if(!O){Z.warning(`请上传复刻视频`);return}if(!M){Z.warning(`请上传产品图片`);return}if(!y.trim()){Z.warning(`请输入原视频产品名称`);return}if(!x.trim()){Z.warning(`请输入自有产品名称`);return}if(!w.trim()){Z.warning(`请输入产品卖点`);return}m7({material_video_url:O,material_image_url:M,source_project_name:y,target_project_name:x,core_content_point:w,idempotency_key:Date.now().toString()}).then(t=>{let r=``,i=``;k(``),N(``),b(``),C(``),T(``),H(1,8),h7(1,20).then(t=>{if(t.items){let a=t.items[0].id;n(t.items),g7(t.items[0].id).then(t=>{r=t.id,i=t.steps[0].id,_7(r,i).then(t=>{Z.loading(`创建中...`,3),setTimeout(()=>{e(`/initial/${a}/initialinfo`)},3e3)})}).catch(e=>{})}}).catch(e=>{})}).catch(e=>{Z.error(`视频开头复刻失败`)})},style:{borderRadius:12,height:44,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`,border:`none`,fontSize:15,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.3)`,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`},children:`立即生成+`})]})}),(0,$.jsxs)(Rq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`创作记录`})]}),open:R,onCancel:()=>z(!1),width:850,footer:null,style:{borderRadius:20},styles:{body:{height:580,display:`flex`,flexDirection:`column`,padding:0},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,margin:`16px 24px`,flexShrink:0},children:[(0,$.jsx)(oK,{placeholder:`搜索产品名称`,value:l,onChange:e=>u(e.target.value),onPressEnter:ne,style:{width:220,borderRadius:10,marginRight:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`}}),(0,$.jsx)(bD,{type:`primary`,onClick:ne,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflow:`auto`,padding:`0 24px 24px`},children:(0,$.jsx)(`div`,{style:{background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(10px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.06)`},children:(0,$.jsx)(g$,{columns:[{title:`产品名称`,dataIndex:`targetProjectName`,key:`targetProjectName`,align:`center`,width:200,render:e=>(0,$.jsx)(`span`,{style:{fontSize:13,color:`#1e293b`,fontWeight:500},children:e||`-`})},{title:`状态`,dataIndex:`status`,key:`status`,align:`center`,width:220,render:(e,t)=>{let n=e,r=t.current_step_code||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#64748b`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else return{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#64748b`}})();return(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,align:`center`,width:200,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:12,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,width:120,render:(t,n)=>(0,$.jsx)(`button`,{onClick:()=>e(`/initial/${n.id}/initialinfo`),style:{color:`#6366f1`,textDecoration:`none`,fontSize:13,border:`none`,background:`rgba(99, 102, 241, 0.08)`,padding:`4px 12px`,borderRadius:8,cursor:`pointer`,transition:`all 0.2s`},children:`查看详情`})}],dataSource:t,rowKey:`id`,pagination:{current:r,pageSize:a,total:s,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:te,itemRender:(e,t,n)=>t===`prev`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid rgba(99, 102, 241, 0.15)`,borderRadius:8,background:r===1?`rgba(243, 244, 246, 0.5)`:`#fff`,cursor:r===1?`not-allowed`:`pointer`,color:r===1?`#94a3b8`:`#6366f1`,fontSize:14},disabled:r===1,children:`‹`}):t===`next`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid rgba(99, 102, 241, 0.15)`,borderRadius:8,background:r>=Math.ceil(s/a)?`rgba(243, 244, 246, 0.5)`:`#fff`,cursor:r>=Math.ceil(s/a)?`not-allowed`:`pointer`,color:r>=Math.ceil(s/a)?`#94a3b8`:`#6366f1`,fontSize:14},disabled:r>=Math.ceil(s/a),children:`›`}):t===`page`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`none`,borderRadius:8,background:e===r?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`:`#fff`,color:e===r?`#fff`:`#475569`,fontWeight:e===r?600:400,cursor:`pointer`,fontSize:14},children:e}):n},style:{fontSize:13},scroll:{y:350}})})})]})]})};function m9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function h9(e,...t){for(let n of t){let t=e[n];if(t!=null&&String(t).trim()!==``)return String(t)}return``}function g9(e,t,...n){for(let t of n){let n=e[t];if(n===!0||n===!1)return n;if(n===`true`)return!0;if(n===`false`)return!1}return t}function Ete(e,...t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t)&&t>0)return t;if(typeof t==`string`&&t.trim()){let e=Number(t);if(Number.isFinite(e)&&e>0)return e}}}function _9(e){if(!m9(e))return null;let t=h9(e,`key`);return t?{key:t,label:h9(e,`label`)||t,type:h9(e,`type`)||void 0,enabled:g9(e,!0,`enabled`),editable:g9(e,!0,`editable`),maxLength:Ete(e,`maxLength`,`max_length`)}:null}function v9(e){if(!m9(e))return null;let t=e.data;return m9(t)?t:Array.isArray(e.sections)?e:null}function Dte(e){return!!v9(e)}function y9(e){let t=v9(e);return(Array.isArray(t?.sections)?t.sections:[]).map(e=>{let t=_9(e);if(!t||!m9(e))return null;let n=Array.isArray(e.children)?e.children.map(_9).filter(Boolean):[],r=Array.isArray(e.itemFields)?e.itemFields.map(_9).filter(Boolean):Array.isArray(e.item_fields)?e.item_fields.map(_9).filter(Boolean):[];return{...t,contentKey:h9(e,`contentKey`,`content_key`)||void 0,children:n,itemFields:r}}).filter(e=>!!e&&e.enabled)}function b9(e){if(e==null)return``;if(typeof e==`object`)try{return JSON.stringify(e,null,2)}catch{return String(e)}return String(e)}function x9(e){let t=b9(e);return t.length>40||t.includes(` `)||t.includes(`,`)||t.includes(`。`)||t.includes(`;`)||t.includes(`;`)}function S9(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function C9(e,t,n,r){let i=S9(e||{});return m9(i[t])||(i[t]={}),i[t][n]=r,i}function w9(e,t,n,r,i){let a=S9(e||{});return Array.isArray(a[t])||(a[t]=[]),m9(a[t][n])||(a[t][n]={}),a[t][n][r]=i,a}function T9(e,t){if(!m9(e))return`视频提示词不能为空`;let n=y9(t);if(!n.length)return`视频提词配置缺失,无法保存`;for(let t of n){if(!t.editable)continue;let n=e[t.key];if(t.type===`object`){if(!m9(n))continue;for(let e of t.children)if(!(!e.enabled||!e.editable||!e.maxLength)&&b9(n[e.key]).length>e.maxLength)return`字段【${t.label}.${e.label}】长度不能超过 ${e.maxLength} 个字符`;continue}if(t.type===`flow`){if(!Array.isArray(n))continue;for(let e=0;en.maxLength)return`字段【${t.label} 第 ${e+1} 项.${n.label}】长度不能超过 ${n.maxLength} 个字符`}}continue}if(t.editable&&t.maxLength&&b9(n).length>t.maxLength)return`字段【${t.label}】长度不能超过 ${t.maxLength} 个字符`}return null}var{Text:E9}=Q,{TextArea:D9}=oK;function O9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function k9({value:e}){let t=e===`true`?`是`:e===`false`?`否`:b9(e);return x9(e)?(0,$.jsx)(D9,{value:t,rows:Math.min(6,Math.max(2,Math.ceil(t.length/42))),disabled:!0,style:{borderRadius:8,color:`#64748b`}}):(0,$.jsx)(oK,{value:t,disabled:!0,style:{borderRadius:8,color:`#64748b`}})}function A9({value:e,maxLength:t,onChange:n}){let r=b9(e),i={value:r,maxLength:t,showCount:!!t,onChange:e=>n(e.target.value),style:{borderRadius:8}};return x9(e)?(0,$.jsx)(D9,{...i,rows:Math.min(8,Math.max(3,Math.ceil(r.length/42)))}):(0,$.jsx)(oK,{...i})}function j9({value:e,onChange:t}){let n=e===!0||e===`true`;return(0,$.jsxs)(RL.Group,{value:n,onChange:e=>t(e.target.value),style:{display:`flex`,gap:24},children:[(0,$.jsx)(RL,{value:!0,style:{fontSize:14,color:`#475569`},children:`是`}),(0,$.jsx)(RL,{value:!1,style:{fontSize:14,color:`#475569`},children:`否`})]})}var M9=({value:e,schemaConfigSnapshot:t,onChange:n})=>{let r=O9(e)?e:{},i=y9(t);if(!Dte(t))return(0,$.jsxs)(jU,{direction:`vertical`,size:12,style:{width:`100%`},children:[(0,$.jsx)(Kf,{type:`warning`,showIcon:!0,message:`视频提词配置缺失,暂不能编辑`,description:`请刷新详情后重试;如果仍然缺失,请联系管理员排查第4步 schema_config_snapshot 返回。`}),Object.keys(r).length?(0,$.jsx)(`pre`,{style:{margin:0,padding:12,borderRadius:10,background:`#f8fafc`,maxHeight:420,overflow:`auto`,color:`#475569`},children:JSON.stringify(r,null,2)}):null]});if(!i.length)return(0,$.jsx)(Kf,{type:`warning`,showIcon:!0,message:`视频提词配置为空`,description:`当前 Schema 配置没有可展示字段。`});let a=e=>{let t=O9(r[e.key])?r[e.key]:{},i=e.children.filter(e=>e.enabled);return i.length?(0,$.jsxs)(`div`,{style:{marginBottom:18},children:[(0,$.jsx)(jU,{style:{marginBottom:8},children:(0,$.jsx)(E9,{strong:!0,style:{color:`#334155`,fontSize:13},children:e.label})}),(0,$.jsx)(`div`,{style:{borderLeft:`3px solid #6366f1`,paddingLeft:12,marginLeft:4},children:i.map(i=>(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsx)(jU,{style:{marginBottom:4},children:(0,$.jsx)(E9,{style:{color:`#64748b`,fontSize:12},children:i.label})}),i.editable?i.type===`boolean`?(0,$.jsx)(j9,{value:t[i.key],onChange:t=>n(C9(r,e.key,i.key,t))}):(0,$.jsx)(A9,{value:t[i.key],maxLength:i.maxLength,onChange:t=>n(C9(r,e.key,i.key,t))}):(0,$.jsx)(k9,{value:t[i.key]})]},i.key))})]},e.key):null},o=e=>{let t=Array.isArray(r[e.key])?r[e.key]:[],i=[{key:`时间段`,label:`时间段`,enabled:!0,editable:!1},...e.itemFields.filter(e=>e.enabled)];return(0,$.jsxs)(`div`,{style:{marginBottom:18},children:[(0,$.jsxs)(jU,{style:{marginBottom:8},children:[(0,$.jsx)(E9,{strong:!0,style:{color:`#334155`,fontSize:13},children:e.label}),(0,$.jsx)(k$,{color:`default`,children:`锁定条目和时间段`})]}),(0,$.jsx)(`div`,{style:{border:`1px solid #e5e7eb`,borderRadius:10,padding:12,background:`#fff`},children:t.length===0?(0,$.jsx)(E9,{style:{color:`#94a3b8`,fontSize:12},children:`暂无内容`}):t.map((a,o)=>{let s=O9(a)?a:{};return(0,$.jsxs)(`div`,{style:{marginBottom:o===t.length-1?0:14,paddingBottom:o===t.length-1?0:14,borderBottom:o===t.length-1?`none`:`1px dashed #e2e8f0`},children:[(0,$.jsxs)(E9,{strong:!0,style:{display:`block`,marginBottom:8,color:`#475569`,fontSize:12},children:[`第 `,o+1,` 段`]}),i.map(t=>(0,$.jsxs)(`div`,{style:{marginBottom:10},children:[(0,$.jsx)(jU,{style:{marginBottom:4},children:(0,$.jsx)(E9,{style:{color:`#64748b`,fontSize:12},children:t.label})}),t.editable?t.type===`boolean`?(0,$.jsx)(j9,{value:s[t.key],onChange:i=>n(w9(r,e.key,o,t.key,i))}):(0,$.jsx)(A9,{value:s[t.key],maxLength:t.maxLength,onChange:i=>n(w9(r,e.key,o,t.key,i))}):(0,$.jsx)(k9,{value:s[t.key]})]},t.key))]},`${e.key}-${o}`)})})]},e.key)},s=e=>e.key in r?(0,$.jsxs)(`div`,{style:{marginBottom:18},children:[(0,$.jsx)(jU,{style:{marginBottom:8},children:(0,$.jsx)(E9,{strong:!0,style:{color:`#334155`,fontSize:13},children:e.label})}),e.editable?(0,$.jsx)(A9,{value:r[e.key],maxLength:e.maxLength,onChange:t=>{let i=S9(r);i[e.key]=t,n(i)}}):(0,$.jsx)(k9,{value:r[e.key]})]},e.key):null;return(0,$.jsx)(`div`,{children:i.map(e=>e.key in r?e.type===`object`?a(e):e.type===`flow`?o(e):s(e):null)})},{Title:Ote,Text:N9}=Q,{TextArea:kte}=oK;function Ate(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function jte(){let e=Je(),{creatID:t}=Qe(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(`image`),[u,d]=(0,S.useState)({}),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(``),[g,_]=(0,S.useState)(!1),[v,y]=(0,S.useState)(null),[b,x]=(0,S.useState)({}),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(5),[j,M]=(0,S.useState)(`16:9`),[N,P]=(0,S.useState)(`480p`),[F,I]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]}),[L,R]=(0,S.useState)([]),[z,B]=(0,S.useState)(1),[V,H]=(0,S.useState)(20),[U,ee]=(0,S.useState)(0),[te,ne]=(0,S.useState)(``),[W,re]=(0,S.useState)({}),[G,K]=(0,S.useState)([]),[q,ie]=(0,S.useState)([]),J=[{id:1,title:`原始素材`,description:`上传原始视频素材`,childId:1},{id:2,title:`生成提示词`,description:`根据素材生成描述词`,childId:2},{id:3,title:`生成产品融合图`,description:`生成产品与场景融合图`,childId:3},{id:4,title:`生成视频提示词`,description:`生成视频生成提示词`,childId:4},{id:5,title:`生成最终视频`,description:`合成最终视频`,childId:5}].map((e,t)=>({...e,status:G[t]?.status||``,id:G[t]?.id||t,output:G[t]?.output||``,engineId:G[t]?.input?.payload?.videoConfig?.engineId||``}));(0,S.useEffect)(()=>{let e=new Set;q.forEach(t=>{let n=J.find(e=>String(e.childId)===t);n&&(n.status===`completed`||n.status===`failed`)&&e.add(t)});for(let t=J.length-1;t>=0;t--)if(J[t].status===`completed`||J[t].status===`failed`){e.add(String(J[t].childId));break}e.size>0?ie(Array.from(e)):ie([])},[G]);let ae=(e,t,n)=>{h7(e,t,n).then(e=>{e.items&&R(e.items),e.total!==void 0&&ee(e.total)}).catch(e=>{})},oe=(e,t)=>{B(e),H(t),ae(e,t,te)},se=()=>{B(1),ae(1,V,te)};(0,S.useEffect)(()=>{ae(z,V)},[]),(0,S.useEffect)(()=>{s7().then(e=>{if(x(e.engine||{}),e.engine?.video&&e.engine.video.length>0){w(e.engine.video[0].id);let t=e.engine.video[0];I({ratios:t.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions||[`480p`,`720p`,`1080p`],durations:t.supportedDurations||[5,8,10,12,15]})}}).catch(e=>{})},[]),(0,S.useEffect)(()=>()=>{v&&(clearInterval(v),y(null))},[v]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;!t.closest(`.image-settings-trigger`)&&!t.closest(`.image-settings-popover`)&&(E(!1),O(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,S.useEffect)(()=>{t&&g7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},[t]),(0,S.useEffect)(()=>{let e=J[4];e&&e.status!==`completed`&&e.status!==`failed`?v||y(setInterval(ue,15e3)):e&&v&&(clearInterval(v),y(null))},[J]);let ce=(e,t,n,i)=>{l(t||`image`),h(n?String(n):``),t===`video`?(p(i||null),d(e&&typeof e==`object`?Ate(e):{}),a(``)):(p(null),a(e||``),d({})),r(!0)},le=async()=>{if(c===`image`){if(!W?.id||!m){Z.warning(`缺少任务或步骤 ID,无法保存图片提示词`);return}if(!i||!i.trim()){Z.warning(`图片提示词不能为空`);return}_(!0);try{await v7(W.id,m,{prompt:i.trim()}),Z.success(`图片提示词已保存`),de(),r(!1),h(``)}catch(e){Z.error(e?.message||`保存图片提示词失败`)}finally{_(!1)}return}if(!W?.id||!m){Z.warning(`缺少任务或步骤 ID,无法保存视频提示词`);return}if(!u||typeof u!=`object`||Object.keys(u).length===0){Z.warning(`视频提示词不能为空`);return}if(!f){Z.warning(`视频提词配置缺失,暂不能保存`);return}let e=T9(u,f);if(e){Z.warning(e);return}_(!0);try{await D7(W.id,m,{prompt_schema:u}),Z.success(`视频提示词已保存`),de(),r(!1),h(``)}catch(e){Z.error(e?.message||`保存视频提示词失败`)}finally{_(!1)}},ue=()=>{t&&g7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},de=()=>{t&&g7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},fe=e=>{y7(W.id,e.toString(),{engine_id:`0019e3dac0b795b925b`,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`}).then(e=>{de()}).catch(e=>{})},pe=()=>{y7(W.id,J[1].id.toString(),{engine_id:`0019e3dac0b795b925b`,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`}).then(e=>{de()}).catch(e=>{})},me=e=>{let t={engine_id:C,duration:k,aspect_ratio:j,resolution:N,target_platform:`抖音`};b7(W.id,e.toString(),t).then(e=>{de()}).catch(e=>{})},he=(e,t)=>{let n={engine_id:t};x7(W.id,e.toString(),n).then(e=>{de()}).catch(e=>{})},ge=()=>{let e={engine_id:J[3].engineId};x7(W.id,J[2].id.toString(),e).then(e=>{de()}).catch(e=>{})};return(0,$.jsxs)(S.Fragment,{children:[(0,$.jsx)(`div`,{className:`initialinfo-container`,style:{margin:`-24px -32px -32px`,height:`calc(100vh - 34px)`,position:`relative`,boxSizing:`border-box`,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:`2%`,position:`relative`,zIndex:1,minHeight:0},children:[(0,$.jsxs)(`div`,{className:`replication-preview`,style:{flex:4,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,boxSizing:`border-box`},children:[(0,$.jsx)(bD,{type:`text`,icon:(0,$.jsx)(b2,{}),onClick:()=>e(-1),style:{color:`#64748b`,borderRadius:10,fontSize:13,height:32,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`},children:`返回`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`爆款开头复刻 - 任务详情`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(bD,{type:`primary`,ghost:!0,style:{borderRadius:10,padding:`4px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},onClick:()=>s(!0),children:`创作记录`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`},children:(0,$.jsxs)(`div`,{className:`material_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,alignItems:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:W?.material?.materialVideoUrl?(0,$.jsx)(`video`,{controls:!0,src:W.material.materialVideoUrl,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无视频`})})]}),(0,$.jsxs)(`div`,{className:`product_img`,style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`产品图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:W?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:W.material.materialImageUrl,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无图片`})})]})]}),W?.finalImageUrl&&(0,$.jsx)(`div`,{style:{marginTop:16},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalImageUrl}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})}),W?.finalVideoUrl&&(0,$.jsx)(`div`,{style:{marginTop:16},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(`video`,{controls:!0,src:`http://ceshi.apiforeign.minzhong.cn${W.finalVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})})]})})]}),(0,$.jsxs)(`div`,{className:`replication-form`,style:{flex:1,minWidth:`450px`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,gap:10,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`生成步骤`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px 16px 16px`},children:(0,$.jsx)(r_,{activeKey:q,onChange:ie,ghost:!0,bordered:!1,style:{background:`transparent`},expandIconPlacement:`end`,items:J.map(e=>({key:String(e.childId),label:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,width:`100%`,justifyContent:`space-between`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:16,height:16},children:e.status===`completed`?(0,$.jsx)(c4,{style:{fontSize:16,color:`#22c55e`}}):e.status===`processing`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,background:`#ef4444`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:`#fff`,fontSize:10},children:`×`})}):(0,$.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:`#cbd5e1`}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:e.status===`processing`||e.status===`waiting_user`?`#6366f1`:`#1e293b`,fontWeight:500},children:e.title}),(e.status===`processing`||e.status===`waiting_user`)&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`,marginLeft:8},children:`生成中`}),e.status===`failed`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`,marginLeft:8},children:`失败`}),e.status===``&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#717d8b`,marginLeft:8},children:`待生成`})]})}),children:(0,$.jsxs)(`div`,{style:{padding:`16px`,background:`linear-gradient(135deg, rgba(248,250,252,0.6) 0%, rgba(238,242,255,0.4) 100%)`,borderRadius:12,marginTop:8,border:`1px solid rgba(99, 102, 241, 0.06)`},children:[e.childId===1&&(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,marginBottom:20,alignItems:`flex-start`,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(N9,{style:{color:`#475569`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`原视频`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},children:W?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:W.material.materialVideoUrl,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10},controls:!0}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,height:`16`,rx:`2`,ry:`2`}),(0,$.jsx)(`path`,{d:`M8 12l4 2 4-2`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无视频`})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(N9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`产品图片`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:10,background:`#f1f5f9`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:W?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:W.material.materialImageUrl,alt:`产品图片`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10}}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,$.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`,fill:`currentColor`}),(0,$.jsx)(`path`,{d:`M21 15l-5-5L5 21`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无图片`})]})})]})]})}),e.childId===2&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(N9,{style:{color:`#475569`,fontSize:13,lineHeight:1.8,whiteSpace:`pre-wrap`},children:e?.output?.payload?.prompt||`暂无提示词`})}),(0,$.jsxs)(jU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(bD,{type:`default`,icon:(0,$.jsx)(F$,{}),onClick:()=>ce(e?.output?.payload?.prompt,`image`,e.id),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`修改提示词`}),(0,$.jsx)(bD,{onClick:()=>{Z.info(`正在生成图片,请稍候...`),fe(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片`})]})]}),e.childId===3&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`,position:`relative`},children:[W.finalImageUrl?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalImageUrl}`,alt:`融合图`,style:{width:`100%`,height:180,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无融合图`}),(0,$.jsx)(bD,{type:`default`,icon:(0,$.jsx)(F$,{}),onClick:()=>pe(),disabled:e.status!==`completed`,style:{position:`absolute`,bottom:8,left:8,borderRadius:8,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:30,fontWeight:500,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(4px)`,padding:`0 12px`,fontSize:12},children:`重新生成`})]}),(0,$.jsx)(`p`,{style:{marginBottom:6,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`视频参数选择:`}),(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{E(!T),O(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(q6,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(N9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:b.video?.find(e=>e.id===C)?.name||`选择引擎`})]}),T&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-10,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(N9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:b.video?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{w(e.id),I({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(j)||M(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(N)||P(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(k)||A(e.supportedDurations?.[0]||5),E(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:C===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:C===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:C===e.id?600:500,color:C===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{O(!D),E(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(M3,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(N9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[j,` · `,k,`s · `,N]})]}),D&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(N9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:F.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>M(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:j===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:j===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${j===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:j===e?`#6366f1`:`#6b7280`,fontWeight:j===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(N9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(k-Math.min(...F.durations))/(Math.max(...F.durations)-Math.min(...F.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...F.durations),max:Math.max(...F.durations),value:k,onChange:e=>A(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:k}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(N9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:F.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>P(e),style:{flex:1,height:42,borderRadius:6,border:N===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:N===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:N===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(bD,{type:`primary`,style:{width:`100%`,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},onClick:()=>{Z.info(`正在生成视频提示词,请稍候...`),me(e.id)},disabled:e.status!==`completed`,children:`下一步:生成视频提示词`})]}),e.childId===4&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(N9,{style:{color:`#64748b`,fontSize:13,lineHeight:1.8},children:`视频提词已生成,可点击按钮查看/修改`})}),(0,$.jsxs)(jU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(bD,{type:`default`,icon:(0,$.jsx)(F$,{}),onClick:()=>ce(W?.videoGeneration?.promptSchema,`video`,e.id,W?.videoGeneration?.schemaConfigSnapshot),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`||!W?.videoGeneration?.promptSchema||!W?.videoGeneration?.schemaConfigSnapshot,children:`查看/修改视频提词`}),(0,$.jsx)(bD,{onClick:()=>{Z.info(`正在生成视频,请稍候...`),he(e.id,e.engineId)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成视频`})]})]}),e.childId===5&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,position:`relative`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},children:e.status===`completed`&&W?.finalVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalVideoUrl}`,style:{width:`100%`,height:180,objectFit:`cover`},controls:!0}):e.status===`processing`?(0,$.jsxs)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:20,height:20,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}),(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontSize:14},children:`视频生成中...`})]}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#ef4444`,fontSize:14},children:`视频生成失败`}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无视频`})}),(0,$.jsxs)(jU,{style:{width:`100%`,gap:12},children:[(0,$.jsx)(bD,{onClick:()=>ge(),type:`default`,icon:(0,$.jsx)(F$,{}),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`重新生成`}),(0,$.jsx)(bD,{type:`primary`,icon:(0,$.jsx)(_0,{}),style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,onClick:()=>{let e=`http://ceshi.apiforeign.minzhong.cn${W?.finalVideoUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=`video_${Date.now()}.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},children:`下载视频`})]})]})]})}))})})]})]})}),(0,$.jsx)(Rq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:c===`video`?`查看/编辑视频提词`:`修改提示词`})]}),open:n,onCancel:()=>{g||r(!1)},footer:[(0,$.jsx)(bD,{onClick:()=>r(!1),disabled:g,style:{borderRadius:8},children:`取消`},`cancel`),(0,$.jsx)(bD,{type:`primary`,onClick:le,loading:g,disabled:g,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`确认`},`confirm`)],width:800,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`},body:{background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,padding:`20px 24px`}},children:c===`image`?(0,$.jsx)(kte,{value:i,onChange:e=>a(e.target.value),rows:8,style:{width:`100%`,height:300,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},placeholder:`请输入提示词`}):(0,$.jsx)(`div`,{style:{maxHeight:500,overflowY:`auto`,paddingRight:10},children:(0,$.jsx)(M9,{value:u,schemaConfigSnapshot:f,onChange:d})})}),(0,$.jsxs)(Rq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`创作记录`})]}),open:o,onCancel:()=>s(!1),width:850,footer:null,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`},body:{background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginBottom:16},children:[(0,$.jsx)(oK,{placeholder:`搜索产品名称`,value:te,onChange:e=>ne(e.target.value),onPressEnter:se,style:{width:200,borderRadius:8,marginRight:8,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`}}),(0,$.jsx)(bD,{type:`primary`,onClick:se,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},children:`搜索`})]}),(0,$.jsx)(g$,{columns:[{title:`产品名称`,dataIndex:`targetProjectName`,key:`targetProjectName`,align:`center`},{title:`状态`,dataIndex:`status`,key:`status`,align:`center`,render:(e,t)=>{let n=e,r=t.current_step_code||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#666`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else return{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#666`}})();return typeof i==`string`?(0,$.jsx)(`span`,{style:{fontSize:12,color:`#666`,fontWeight:500},children:i}):(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,align:`center`,render:e=>{if(!e)return`-`;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`}},{title:`操作`,key:`action`,align:`center`,render:(t,n)=>(0,$.jsx)(`button`,{onClick:()=>e(`/initial/${n.id}/initialinfo`),style:{color:`#6366f1`,textDecoration:`none`,fontSize:12,border:`none`,background:`rgba(99, 102, 241, 0.08)`,padding:`4px 12px`,borderRadius:8,cursor:`pointer`,transition:`all 0.2s`,fontWeight:500},children:`查看详情`})}],dataSource:L,rowKey:`id`,pagination:{current:z,pageSize:V,total:U,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:oe},style:{fontSize:13},scroll:{y:350}})]})]})}function Mte(){let e=Je(),[t,n]=(0,S.useState)(``),[r,i]=(0,S.useState)(``),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(``),[l,u]=(0,S.useState)(0),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)(1),[_,v]=(0,S.useState)(10),[y,b]=(0,S.useState)(0),[x,C]=(0,S.useState)(``),w=(0,S.useRef)(null),T=(0,S.useRef)(null),E=(0,S.useCallback)(()=>{t&&URL.revokeObjectURL(t),n(``),i(``),u(0),c(``)},[t]),D=async e=>{if(!e.type.startsWith(`video/`))return i(`请选择视频文件`),!1;if(e.size>100*1024*1024)return i(`视频文件大小不能超过 100MB`),!1;if(await new Promise(t=>{let n=document.createElement(`video`);n.preload=`metadata`,n.onloadedmetadata=()=>{t(n.duration),URL.revokeObjectURL(n.src)},n.onerror=()=>{t(0)},n.src=URL.createObjectURL(e)})>60)return i(`视频时长不能超过 1分钟`),!1;E(),f(!0);try{n((await B5(e)).url),i(``),Z.success(`视频上传成功`)}catch{i(`视频上传失败,请重试`),Z.error(`视频上传失败`)}finally{f(!1)}return!1},O=(0,S.useCallback)(()=>{w.current&&u(w.current.duration)},[]),k=async()=>{if(!t||!s.trim()){Z.warning(`请先上传视频并输入产品名称`);return}f(!0);try{O7({video_url:t,video_duration_seconds:l,title:s.trim(),idempotency_key:`shot_${Date.now()}`}).then(t=>{k7(1,20,x).then(t=>{Z.loading(`创建中...`,3),setTimeout(()=>{e(`/removelens/${t.items[0].id}/removeinfo`)},3e3)})}),E()}catch{Z.error(`任务创建失败,请重试`)}finally{f(!1)}},A=async(e,t,n)=>{try{let r=await k7(e,t,n);m(r.items||[]),b(r.total||0),g(e),v(t)}catch{Z.error(`获取列表失败`)}},j=(e,t)=>{A(e,t,x)},M=()=>{A(1,10,x)};return(0,$.jsx)(`div`,{style:{margin:`-24px -32px -32px`,borderRadius:20,minHeight:`calc(100vh - 34px)`,overflow:`auto`,background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,position:`relative`,padding:`20px 32px`,backgroundImage:`url(${hte})`,backgroundRepeat:`no-repeat`,backgroundSize:`100% 100%`,backgroundPosition:`center`},children:(0,$.jsxs)(`div`,{style:{maxWidth:1200,margin:`50px auto`,position:`relative`,zIndex:10},children:[(0,$.jsxs)(`div`,{style:{marginBottom:50,height:160,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(`div`,{style:{width:40,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h1`,{style:{fontSize:24,fontWeight:700,margin:0,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`AI视频拆镜工作台`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`一键拆解画面分镜,助力仿拍或创作`})]}),(0,$.jsx)(`div`,{style:{width:40,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(bD,{type:`text`,icon:(0,$.jsx)(IU,{}),onClick:()=>{o(!0),A(1,10,x)},style:{fontSize:14,color:`#6366f1`,background:`rgba(99, 102, 241, 0.1)`,borderRadius:12,padding:`10px 20px`,display:`flex`,alignItems:`center`,gap:8,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`},children:`创作记录`})]}),(0,$.jsxs)(`div`,{style:{width:`100%`,maxWidth:720,margin:`0 auto`},children:[r&&(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(239, 68, 68, 0.2)`,borderRadius:12,padding:`14px 20px`,marginBottom:24,color:`#ef4444`,fontSize:14,textAlign:`center`,fontWeight:500},children:r}),!t&&(0,$.jsxs)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%)`,backdropFilter:`blur(20px)`,borderRadius:24,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(C0.Dragger,{accept:`video/*`,beforeUpload:D,showUploadList:!1,disabled:d,style:{background:d?`rgba(243, 244, 246, 0.3)`:`transparent`,border:`2px dashed ${d?`rgba(209, 213, 219, 0.5)`:`rgba(99, 102, 241, 0.3)`}`,borderRadius:24,padding:`56px 20px`,cursor:d?`not-allowed`:`pointer`,margin:0},children:d?(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:100,height:100,margin:`0 auto 20px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:24,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:40,height:40,border:`4px solid #6366f1`,borderTopColor:`transparent`,borderRadius:`50%`,animation:`spin 1s linear infinite`}})}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#6366f1`,margin:`0 0 8px 0`,fontWeight:600},children:`上传中...`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:0},children:`请稍候,视频正在上传`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:100,height:100,margin:`0 auto 20px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:24,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(b4,{style:{fontSize:40,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#1e293b`,margin:`0 0 8px 0`,fontWeight:600},children:`点击或拖拽到此上传视频文件`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:0},children:`支持 MP4、MOV 格式视频,最大支持 100MB 的文件,支持上传 1 分钟内的视频`})]})})]}),t&&(0,$.jsxs)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%)`,backdropFilter:`blur(20px)`,borderRadius:24,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,overflow:`hidden`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsxs)(`div`,{style:{borderRadius:22,background:`#ffffff`,padding:`24px`,position:`relative`,zIndex:1},children:[(0,$.jsx)(Hq,{title:`确定要删除吗?`,okText:`确定`,cancelText:`取消`,onConfirm:E,children:(0,$.jsx)(`button`,{style:{position:`absolute`,top:20,right:20,width:36,height:36,border:`1px solid rgba(99, 102, 241, 0.2)`,background:`rgba(99, 102, 241, 0.05)`,borderRadius:10,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:16,color:`#6366f1`,zIndex:10,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`,e.currentTarget.style.borderColor=`rgba(239, 68, 68, 0.3)`,e.currentTarget.style.color=`#ef4444`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`,e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.2)`,e.currentTarget.style.color=`#6366f1`},children:`🗑️`})}),(0,$.jsx)(`div`,{style:{textAlign:`center`,marginBottom:20},children:(0,$.jsx)(`video`,{ref:w,src:`http://ceshi.apiforeign.minzhong.cn${t}`,controls:!0,onLoadedMetadata:O,style:{maxWidth:`100%`,maxHeight:320,borderRadius:12,background:`#000`,boxShadow:`0 4px 16px rgba(0,0,0,0.1)`}})}),(0,$.jsxs)(`div`,{style:{marginBottom:24},children:[(0,$.jsxs)(`label`,{style:{display:`block`,fontSize:14,fontWeight:500,color:`#334155`,marginBottom:8},children:[`产品名称 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(oK,{placeholder:`请输入产品名称`,value:s,onChange:e=>c(e.target.value),style:{width:`100%`,height:44,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.4)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.2)`}})]}),(0,$.jsx)(`div`,{style:{textAlign:`center`,marginTop:16},children:(0,$.jsx)(`button`,{onClick:k,disabled:!t||!s.trim()||d,style:{padding:`14px 56px`,background:t&&s.trim()&&!d?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`:`#e2e8f0`,color:`white`,border:`none`,borderRadius:12,fontSize:15,fontWeight:600,cursor:t&&s.trim()&&!d?`pointer`:`not-allowed`,boxShadow:t&&s.trim()&&!d?`0 6px 20px rgba(99, 102, 241, 0.3)`:`none`,display:`inline-flex`,alignItems:`center`,gap:10,transition:`all 0.3s ease`},onMouseEnter:e=>{t&&s.trim()&&!d&&(e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 8px 25px rgba(99, 102, 241, 0.4)`)},onMouseLeave:e=>{t&&s.trim()&&!d&&(e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.3)`)},children:(0,$.jsx)(`span`,{children:d?`创建中...`:`创建`})})})]})]}),(0,$.jsx)(`canvas`,{ref:T,style:{display:`none`}}),(0,$.jsxs)(Rq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`创作记录`})]}),open:a,onCancel:()=>o(!1),width:800,footer:null,styles:{body:{background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginBottom:16,gap:8},children:[(0,$.jsx)(oK,{placeholder:`搜索产品名称`,value:x,onChange:e=>C(e.target.value),onPressEnter:M,style:{width:200,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,height:40}}),(0,$.jsx)(bD,{type:`primary`,onClick:M,style:{borderRadius:10,height:40,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%)`,backdropFilter:`blur(20px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(g$,{columns:[{title:`产品名称`,dataIndex:`title`,key:`title`,render:e=>(0,$.jsx)(`span`,{style:{fontSize:14,color:`#1e293b`,fontWeight:500},children:e})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:13,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,render:t=>(0,$.jsx)(bD,{type:`text`,onClick:()=>e(`/removelens/${t.id}/removeinfo`),style:{color:`#6366f1`,fontSize:13,padding:`4px 12px`,borderRadius:6,background:`rgba(99, 102, 241, 0.1)`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`},children:`查看详情`})}],dataSource:p,rowKey:`id`,pagination:{current:h,pageSize:_,total:y,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:j,style:{padding:`16px 24px`,borderTop:`1px solid rgba(99, 102, 241, 0.1)`}},style:{fontSize:13},scroll:{y:350},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(99, 102, 241, 0.03)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})})]})]})]})})}var Nte=c(o(((e,t)=>{(function(n){typeof e==`object`&&t!==void 0?t.exports=n():typeof define==`function`&&define.amd?define([],n):(typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this).JSZip=n()})(function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var c=typeof l==`function`&&l;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var u=Error(`Cannot find module '`+o+`'`);throw u.code=`MODULE_NOT_FOUND`,u}var d=n[o]={exports:{}};t[o][0].call(d.exports,function(e){var n=t[o][1][e];return i(n||e)},d,d.exports,e,t,n,r)}return n[o].exports}for(var a=typeof l==`function`&&l,o=0;o>2,s=(3&t)<<4|n>>4,c=1>6:64,l=2>4,n=(15&o)<<4|(s=a.indexOf(e.charAt(l++)))>>2,r=(3&s)<<6|(c=a.indexOf(e.charAt(l++))),f[u++]=t,s!==64&&(f[u++]=n),c!==64&&(f[u++]=r);return f}},{"./support":30,"./utils":32}],2:[function(e,t,n){var r=e(`./external`),i=e(`./stream/DataWorker`),a=e(`./stream/Crc32Probe`),o=e(`./stream/DataLengthProbe`);function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o(`data_length`)),t=this;return e.on(`end`,function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw Error(`Bug : uncompressed data size mismatch`)}),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo(`compressedSize`,this.compressedSize).withStreamInfo(`uncompressedSize`,this.uncompressedSize).withStreamInfo(`crc32`,this.crc32).withStreamInfo(`compression`,this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new a).pipe(new o(`uncompressedSize`)).pipe(t.compressWorker(n)).pipe(new o(`compressedSize`)).withStreamInfo(`compression`,t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){var r=e(`./stream/GenericWorker`);n.STORE={magic:`\0\0`,compressWorker:function(){return new r(`STORE compression`)},uncompressWorker:function(){return new r(`STORE decompression`)}},n.DEFLATE=e(`./flate`)},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){var r=e(`./utils`),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return e!==void 0&&e.length?r.getTypeOf(e)===`string`?function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){var r=null;r=typeof Promise<`u`?Promise:e(`lie`),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){var r=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Uint32Array<`u`,i=e(`pako`),a=e(`./utils`),o=e(`./stream/GenericWorker`),s=r?`uint8array`:`array`;function c(e,t){o.call(this,`FlateWorker/`+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic=`\b\0`,a.inherits(c,o),c.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(s,e.data),!1)},c.prototype.flush=function(){o.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new c(`Deflate`,e)},n.uncompressWorker=function(){return new c(`Inflate`,{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){function r(e,t){var n,r=``;for(n=0;n>>=8;return r}function i(e,t,n,i,o,u){var d,f,p=e.file,m=e.compression,h=u!==s.utf8encode,g=a.transformTo(`string`,u(p.name)),_=a.transformTo(`string`,s.utf8encode(p.name)),v=p.comment,y=a.transformTo(`string`,u(v)),b=a.transformTo(`string`,s.utf8encode(v)),x=_.length!==p.name.length,S=b.length!==v.length,C=``,w=``,T=``,E=p.dir,D=p.date,O={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(O.crc32=e.crc32,O.compressedSize=e.compressedSize,O.uncompressedSize=e.uncompressedSize);var k=0;t&&(k|=8),h||!x&&!S||(k|=2048);var A=0,j=0;E&&(A|=16),o===`UNIX`?(j=798,A|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,E)):(j=20,A|=function(e){return 63&(e||0)}(p.dosPermissions)),d=D.getUTCHours(),d<<=6,d|=D.getUTCMinutes(),d<<=5,d|=D.getUTCSeconds()/2,f=D.getUTCFullYear()-1980,f<<=4,f|=D.getUTCMonth()+1,f<<=5,f|=D.getUTCDate(),x&&(w=r(1,1)+r(c(g),4)+_,C+=`up`+r(w.length,2)+w),S&&(T=r(1,1)+r(c(y),4)+b,C+=`uc`+r(T.length,2)+T);var M=``;return M+=` -\0`,M+=r(k,2),M+=m.magic,M+=r(d,2),M+=r(f,2),M+=r(O.crc32,4),M+=r(O.compressedSize,4),M+=r(O.uncompressedSize,4),M+=r(g.length,2),M+=r(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+M+g+C,dirRecord:l.CENTRAL_FILE_HEADER+r(j,2)+M+r(y.length,2)+`\0\0\0\0`+r(A,4)+r(i,4)+g+C+y}}var a=e(`../utils`),o=e(`../stream/GenericWorker`),s=e(`../utf8`),c=e(`../crc32`),l=e(`../signature`);function u(e,t,n,r){o.call(this,`ZipFileWorker`),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo(`string`,this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){var r=e(`./Uint8ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){var r=e(`./DataReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){var r=e(`./ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array;var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){var r=e(`../utils`),i=e(`../support`),a=e(`./ArrayReader`),o=e(`./StringReader`),s=e(`./NodeBufferReader`),c=e(`./Uint8ArrayReader`);t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),t!==`string`||i.uint8array?t===`nodebuffer`?new s(e):i.uint8array?new c(r.transformTo(`uint8array`,e)):new a(r.transformTo(`array`,e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){n.LOCAL_FILE_HEADER=`PK`,n.CENTRAL_FILE_HEADER=`PK`,n.CENTRAL_DIRECTORY_END=`PK`,n.ZIP64_CENTRAL_DIRECTORY_LOCATOR=`PK\x07`,n.ZIP64_CENTRAL_DIRECTORY_END=`PK`,n.DATA_DESCRIPTOR=`PK\x07\b`},{}],24:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../utils`);function a(e){r.call(this,`ConvertWorker to `+e),this.destType=e}i.inherits(a,r),a.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../crc32`);function a(){r.call(this,`Crc32Probe`),this.withStreamInfo(`crc32`,0)}e(`../utils`).inherits(a,r),a.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataLengthProbe for `+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(a,i),a.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataWorker`);var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=``,this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}r.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case`string`:e=this.data.substring(this.index,t);break;case`uint8array`:e=this.data.subarray(this.index,t);break;case`array`:case`nodebuffer`:e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){function r(e){this.name=e||`default`,this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit(`data`,e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(`end`),this.cleanUp(),this.isFinished=!0}catch(e){this.emit(`error`,e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit(`error`,e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n `+e:e}},t.exports=r},{}],29:[function(e,t,n){var r=e(`../utils`),i=e(`./ConvertWorker`),a=e(`./GenericWorker`),o=e(`../base64`),s=e(`../support`),c=e(`../external`),l=null;if(s.nodestream)try{l=e(`../nodejs/NodejsStreamOutputAdapter`)}catch{}function u(e,t){return new c.Promise(function(n,i){var a=[],s=e._internalType,c=e._outputType,l=e._mimeType;e.on(`data`,function(e,n){a.push(e),t&&t(n)}).on(`error`,function(e){a=[],i(e)}).on(`end`,function(){try{n(function(e,t,n){switch(e){case`blob`:return r.newBlob(r.transformTo(`arraybuffer`,t),n);case`base64`:return o.encode(t);default:return r.transformTo(e,t)}}(c,function(e,t){var n,r=0,i=null,a=0;for(n=0;n`u`)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=new Blob([r],{type:`application/zip`}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),n.blob=i.getBlob(`application/zip`).size===0}catch{n.blob=!1}}}try{n.nodestream=!!e(`readable-stream`).Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){for(var r=e(`./utils`),i=e(`./support`),a=e(`./nodejsUtils`),o=e(`./stream/GenericWorker`),s=Array(256),c=0;c<256;c++)s[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;s[254]=s[254]=1;function l(){o.call(this,`utf-8 decode`),this.leftOver=null}function u(){o.call(this,`utf-8 encode`)}n.utf8encode=function(e){return i.nodebuffer?a.newBufferFrom(e,`utf-8`):function(e){var t,n,r,a,o,s=e.length,c=0;for(a=0;a>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo(`nodebuffer`,e).toString(`utf-8`):function(e){var t,n,i,a,o=e.length,c=Array(2*o);for(t=n=0;t>10&1023,c[n++]=56320|1023&i)}return c.length!==n&&(c.subarray?c=c.subarray(0,n):c.length=n),r.applyFromCharCode(c)}(e=r.transformTo(i.uint8array?`uint8array`:`array`,e))},r.inherits(l,o),l.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?`uint8array`:`array`,e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=t;(t=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),t.set(a,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+s[e[n]]>t?n:t}(t),c=t;o!==t.length&&(i.uint8array?(c=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(c=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:n.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=l,r.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){var r=e(`./support`),i=e(`./base64`),a=e(`./nodejsUtils`),o=e(`./external`);function s(e){return e}function c(e,t){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),e==0&&(this.dosPermissions=63&this.externalFileAttributes),e==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!==`/`||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||={};e.index+4>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},n.buf2binstring=function(e){return c(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n>10&1023,l[r++]=56320|1023&i)}return c(l,r)},n.utf8border=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+o[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){t.exports=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;n!==0;){for(n-=o=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s>>8^a[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){var r,i=e(`../utils/common`),a=e(`./trees`),o=e(`./adler32`),s=e(`./crc32`),c=e(`./messages`),l=0,u=4,d=0,f=-2,p=-1,m=4,h=2,g=8,_=9,v=286,y=30,b=19,x=2*v+1,S=15,C=3,w=258,T=w+C+1,E=42,D=113,O=1,k=2,A=3,j=4;function M(e,t){return e.msg=c[t],t}function N(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),n!==0&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function I(e,t){a._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function L(e,t){e.pending_buf[e.pending++]=t}function R(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function z(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-T?e.strstart-(e.w_size-T):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+w,p=l[a+o-1],m=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do if(l[(n=t)+o]===m&&l[n+o-1]===p&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do;while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&ac&&--i!=0);return o<=e.lookahead?o:e.lookahead}function B(e){var t,n,r,a,c,l,u,d,f,p,m=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-T)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);a+=m}if(e.strm.avail_in===0)break;if(l=e.strm,u=e.window,d=e.strstart+e.lookahead,f=a,p=void 0,p=l.avail_in,f=C)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C)if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-C,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(B(e),e.lookahead===0&&t===l)return O;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,I(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-T&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):(e.strstart>e.block_start&&(I(e,!1),e.strm.avail_out),O)}),new U(4,4,8,4,V),new U(4,5,16,8,V),new U(4,6,32,32,V),new U(4,4,16,16,H),new U(8,16,32,32,H),new U(8,16,128,128,H),new U(8,32,128,256,H),new U(32,128,258,1024,H),new U(32,258,258,4096,H)],n.deflateInit=function(e,t){return W(e,t,g,15,8,0)},n.deflateInit2=W,n.deflateReset=ne,n.deflateResetKeep=te,n.deflateSetHeader=function(e,t){return e&&e.state&&e.state.wrap===2?(e.state.gzhead=t,d):f},n.deflate=function(e,t){var n,i,o,c;if(!e||!e.state||5>8&255),L(i,i.gzhead.time>>16&255),L(i,i.gzhead.time>>24&255),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(L(i,255&i.gzhead.extra.length),L(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(L(i,0),L(i,0),L(i,0),L(i,0),L(i,0),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,3),i.status=D);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:i.level===6?2:3)<<6,i.strstart!==0&&(p|=32),p+=31-p%31,i.status=D,R(i,p),i.strstart!==0&&(R(i,e.adler>>>16),R(i,65535&e.adler)),e.adler=1}if(i.status===69)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending!==i.pending_buf_size));)L(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(i.status===73)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.gzindex=0,i.status=91)}else i.status=91;if(i.status===91)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.status=103)}else i.status=103;if(i.status===103&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&F(e),i.pending+2<=i.pending_buf_size&&(L(i,255&e.adler),L(i,e.adler>>8&255),e.adler=0,i.status=D)):i.status=D),i.pending!==0){if(F(e),e.avail_out===0)return i.last_flush=-1,d}else if(e.avail_in===0&&N(t)<=N(n)&&t!==u)return M(e,-5);if(i.status===666&&e.avail_in!==0)return M(e,-5);if(e.avail_in!==0||i.lookahead!==0||t!==l&&i.status!==666){var m=i.strategy===2?function(e,t){for(var n;;){if(e.lookahead===0&&(B(e),e.lookahead===0)){if(t===l)return O;break}if(e.match_length=0,n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):i.strategy===3?function(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=w){if(B(e),e.lookahead<=w&&t===l)return O;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=C&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(n=a._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):r[i.level].func(i,t);if(m!==A&&m!==j||(i.status=666),m===O||m===A)return e.avail_out===0&&(i.last_flush=-1),d;if(m===k&&(t===1?a._tr_align(i):t!==5&&(a._tr_stored_block(i,0,0,!1),t===3&&(P(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),F(e),e.avail_out===0))return i.last_flush=-1,d}return t===u?i.wrap<=0?1:(i.wrap===2?(L(i,255&e.adler),L(i,e.adler>>8&255),L(i,e.adler>>16&255),L(i,e.adler>>24&255),L(i,255&e.total_in),L(i,e.total_in>>8&255),L(i,e.total_in>>16&255),L(i,e.total_in>>24&255)):(R(i,e.adler>>>16),R(i,65535&e.adler)),F(e),0=n.w_size&&(s===0&&(P(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),c=e.avail_in,l=e.next_in,u=e.input,e.avail_in=m,e.next_in=0,e.input=t,B(n);n.lookahead>=C;){for(r=n.strstart,a=n.lookahead-(C-1);n.ins_h=(n.ins_h<>>=b=y>>>24,m-=b,(b=y>>>16&255)==0)E[a++]=65535&y;else{if(!(16&b)){if(!(64&b)){y=h[(65535&y)+(p&(1<>>=b,m-=b),m<15&&(p+=T[r++]<>>=b=y>>>24,m-=b,!(16&(b=y>>>16&255))){if(!(64&b)){y=g[(65535&y)+(p&(1<>>=b,m-=b,(b=a-o)>3,p&=(1<<(m-=x<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=1&t.wrap),t.mode=f,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(p),t.distcode=t.distdyn=new r.Buf32(m),t.sane=1,t.back=-1,u):d}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,_(e)):d}function y(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(a=o.wsize-o.wnext)&&(a=i),r.arraySet(o.window,t,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=a(n.check,B,2,0),x=b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg=`incorrect header check`,n.mode=30;break}if((15&b)!=8){e.msg=`unknown compression method`,n.mode=30;break}if(x-=4,F=8+(15&(b>>>=4)),n.wbits===0)n.wbits=F;else if(F>n.wbits){e.msg=`invalid window size`,n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=3;case 3:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>8&255,B[2]=b>>>16&255,B[3]=b>>>24&255,n.check=a(n.check,B,4,0)),x=b=0,n.mode=4;case 4:for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>8),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>>8&255,n.check=a(n.check,B,2,0)),x=b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(E=n.length)&&(E=v),E&&(n.head&&(F=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,E,F)),512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(v===0)break e;for(E=0;F=p[g+ E++],n.head&&F&&n.length<65536&&(n.head.name+=String.fromCharCode(F)),F&&E>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(v===0)break e;v--,b+=p[g++]<>>=1)){case 0:n.mode=14;break;case 1:if(w(n),n.mode=20,t!==6)break;b>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg=`invalid block type`,n.mode=30}b>>>=2,x-=2;break;case 14:for(b>>>=7&x,x-=7&x;x<32;){if(v===0)break e;v--,b+=p[g++]<>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=30;break}if(n.length=65535&b,x=b=0,n.mode=15,t===6)break e;case 15:n.mode=16;case 16:if(E=n.length){if(v>>=5,x-=5,n.ndist=1+(31&b),b>>>=5,x-=5,n.ncode=4+(15&b),b>>>=4,x-=4,286>>=3,x-=3}for(;n.have<19;)n.lens[V[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,L={bits:n.lenbits},I=s(0,n.lens,0,19,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid code lengths set`,n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=k,x-=k,n.lens[n.have++]=j;else{if(j===16){for(R=k+2;x>>=k,x-=k,n.have===0){e.msg=`invalid bit length repeat`,n.mode=30;break}F=n.lens[n.have-1],E=3+(3&b),b>>>=2,x-=2}else if(j===17){for(R=k+3;x>>=k)),b>>>=3,x-=3}else{for(R=k+7;x>>=k)),b>>>=7,x-=7}if(n.have+E>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=30;break}for(;E--;)n.lens[n.have++]=F}}if(n.mode===30)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=30;break}if(n.lenbits=9,L={bits:n.lenbits},I=s(c,n.lens,0,n.nlen,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid literal/lengths set`,n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,L={bits:n.distbits},I=s(l,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,L),n.distbits=L.bits,I){e.msg=`invalid distances set`,n.mode=30;break}if(n.mode=20,t===6)break e;case 20:n.mode=21;case 21:if(6<=v&&258<=y){e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,o(e,C),_=e.next_out,m=e.output,y=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,b=n.hold,x=n.bits,n.mode===12&&(n.back=-1);break}for(n.back=0;A=(z=n.lencode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,n.length=j,A===0){n.mode=26;break}if(32&A){n.back=-1,n.mode=12;break}if(64&A){e.msg=`invalid literal/length code`,n.mode=30;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(z=n.distcode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,64&A){e.msg=`invalid distance code`,n.mode=30;break}n.offset=j,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=30;break}n.mode=25;case 25:if(y===0)break e;if(E=C-y,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break}D=E>n.wnext?(E-=n.wnext,n.wsize-E):n.wnext-E,E>n.length&&(E=n.length),O=n.window}else O=m,D=_-n.offset,E=n.length;for(yv?(b=L[R+d[w]],N[P+d[w]]):(b=96,0),p=1<>k)+(m-=p)]=y<<24|b<<16|x|0,m!==0;);for(p=1<>=1;if(p===0?M=0:(M&=p-1,M+=p),w++,--F[C]==0){if(C===E)break;C=t[n+d[w]]}if(D>>7)]}function L(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function R(e,t,n){e.bi_valid>h-n?(e.bi_buf|=t<>h-e.bi_valid,e.bi_valid+=n-h):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function V(e,t,n){var r,i,a=Array(m+1),o=0;for(r=1;r<=m;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];s!==0&&(e[2*i]=B(a[s]++,s))}}function H(e){var t;for(t=0;t>1;1<=n;n--)te(e,a,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],te(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,te(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,o,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,g=t.stat_desc.max_length,_=0;for(a=0;a<=m;a++)e.bl_count[a]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n>=7;r>>=1)if(1&n&&e.dyn_ltree[2*t]!==0)return i;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return a;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=n+5,n+4<=o&&t!==-1?q(e,t,n,r):e.strategy===4||s===o?(R(e,2+ +!!r,3),ne(e,T,E)):(R(e,4+ +!!r,3),function(e,t,n,r){var i;for(R(e,t-257,5),R(e,n-1,5),R(e,r-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(O[n]+l+1)]++,e.dyn_dtree[2*I(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){R(e,2,3),z(e,_,T),function(e){e.bi_valid===16?(L(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){(function(e,t){if(!e.setImmediate){var n,r,i,a,o=1,s={},c=!1,l=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,n={}.toString.call(e.process)===`[object process]`?function(e){process.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage(``,`*`),e.onmessage=n,t}}()?(a=`setImmediate$`+Math.random()+`$`,e.addEventListener?e.addEventListener(`message`,p,!1):e.attachEvent(`onmessage`,p),function(t){e.postMessage(a+t,`*`)}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):l&&`onreadystatechange`in l.createElement(`script`)?(r=l.documentElement,function(e){var t=l.createElement(`script`);t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(f,0,e)},u.setImmediate=function(e){typeof e!=`function`&&(e=Function(``+e));for(var t=Array(arguments.length-1),r=0;r`u`?e===void 0?this:e:self)}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{}]},{},[10])(10)})}))(),1),{Search:Pte}=oK,{Text:Fte}=Q,Ite=()=>{let[e,t]=(0,S.useState)(`project`),[n,r]=(0,S.useState)(`video`),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)({page:1,pageSize:10}),[c,l]=(0,S.useState)(0),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(new Set),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(null),v=S.createRef(),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),[E,D]=(0,S.useState)([]),[O,k]=(0,S.useState)(``),[A,j]=(0,S.useState)([]),[M,N]=(0,S.useState)(!1),[P,F]=(0,S.useState)(0),[I,L]=(0,S.useState)(void 0),[R,z]=(0,S.useState)(new Map),[B,V]=(0,S.useState)(``),H=(0,S.useRef)(null),[U,ee]=(0,S.useState)(1),[te,ne]=(0,S.useState)(10),[W,re]=(0,S.useState)(!1),[G,K]=(0,S.useState)(!1),[q,ie]=(0,S.useState)([]),[J,ae]=(0,S.useState)(0),[oe,se]=(0,S.useState)(1),[ce,le]=(0,S.useState)(10),[ue,de]=(0,S.useState)(!1),[fe,pe]=(0,S.useState)(``),[me,he]=(0,S.useState)(!1),[ge,_e]=(0,S.useState)(new Set),ve=null,ye=new Map,be=[],xe=0,Se=0,Ce=(e,t,n)=>{if(n&&Se<8)Se++,xe++,e();else if(xe<15)xe++,e();else{let r={callback:e,priority:n?2:1,element:t};be.push(r),be.sort((e,t)=>t.priority-e.priority)}},we=()=>{if(xe--,Se>0&&Se--,be.length>0){let e=be.shift();e&&(xe++,e.priority===2&&Se++,e.callback())}},Te=()=>(ve||=new IntersectionObserver(e=>{e.forEach(e=>{let t=ye.get(e.target);if(e.isIntersecting&&t){ye.delete(e.target),ve?.unobserve(e.target);let n=e.intersectionRatio>=1;Ce(t,e.target,n)}})},{rootMargin:`400px`,threshold:[.01,.5,1]}),ve),Ee=e=>{if(!e)return null;try{let t=new URL(e).searchParams.get(`exp`);return t?parseInt(t,10):null}catch{try{let t=e.indexOf(`?`);if(t!==-1){let n=e.substring(t+1),r=new URLSearchParams(n).get(`exp`);if(r)return parseInt(r,10)}return null}catch{return null}}},De=e=>{let t=Ee(e);return t?Math.floor(Date.now()/1e3)>t:!1},Oe=({item:e,mediaType:t,onClick:n,isSelected:r=!1,onToggleSelect:i,isSelectionMode:a=!1})=>{let[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),m=(0,S.useRef)(null),h=(0,S.useRef)(null),g=(0,S.useRef)(null);(0,S.useEffect)(()=>{let n=t===`video`?e.videoUrl:e.imageUrl;n&&De(n)&&d(!0)},[e,t]),(0,S.useEffect)(()=>{if(u)return;let e=m.current;if(!e)return;let t=Te();return ye.set(e,()=>{p(!0)}),t.observe(e),()=>{ye.delete(e),t.unobserve(e)}},[u]);let _=(e,t=!1)=>{let n=`http://ceshi.apiforeign.minzhong.cn`,r=e.startsWith(`/`)?e.slice(1):e,i=n.endsWith(`/`)?n.slice(0,-1):n;return t?`${i}/static/${r}&w=300&q=50`:`${i}/${r}`},v=()=>{g.current&&clearTimeout(g.current),s(!0),p(!1),we()},y=()=>{g.current=setTimeout(()=>{_(t===`video`?e.videoUrl:e.imageUrl),l(!0),p(!1),we()},1e3)},b=t===`video`?_(e.videoUrl):_(e.imageUrl,!0),x=e.videoCoverUrl?_(e.videoCoverUrl,!0):void 0;return(0,$.jsxs)(`div`,{ref:m,style:{width:160,height:120,position:`relative`,borderRadius:4,cursor:`pointer`,overflow:`hidden`,boxShadow:`0 2px 8px rgba(0,0,0,0.1)`,transition:`transform 0.2s, box-shadow 0.2s`},onClick:a?void 0:n,onMouseEnter:e=>{a||(e.currentTarget.style.transform=`scale(1.05)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0,0,0,0.2)`)},onMouseLeave:e=>{a||(e.currentTarget.style.transform=`scale(1)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(0,0,0,0.1)`)},children:[(t===`video`&&e.videoCoverUrl||t===`image`)&&(f||o)&&!c&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`},children:[f&&!o&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,backgroundColor:`rgba(248, 250, 252, 0.9)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1},children:(0,$.jsx)(`div`,{style:{width:28,height:28,border:`3px solid #e2e8f0`,borderTopColor:`#3b82f6`,borderRadius:`50%`,animation:`spin 0.8s linear infinite`}})}),t===`video`&&e.videoCoverUrl&&(0,$.jsx)(`img`,{ref:h,src:x,style:{width:`100%`,height:`100%`,objectFit:`cover`,opacity:+!!o,transition:`opacity 0.3s ease-in-out`},loading:`lazy`,onLoad:v,onError:y}),t===`image`&&(0,$.jsx)(`img`,{ref:h,src:b,alt:`图片预览`,style:{width:`100%`,height:`100%`,objectFit:`cover`,opacity:+!!o,transition:`opacity 0.3s ease-in-out`},loading:`lazy`,onLoad:v,onError:y})]}),!f&&!o&&!c&&(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,backgroundColor:`#cbd5e1`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:t===`video`?(0,$.jsx)(q8,{style:{color:`#64748b`,fontSize:16}}):(0,$.jsx)(d6,{style:{color:`#64748b`,fontSize:16}})})}),t===`video`&&!e.videoCoverUrl&&!c&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#1e293b`},children:[(0,$.jsx)(q8,{style:{color:`#64748b`,fontSize:24}}),(0,$.jsx)(Fte,{style:{fontSize:12,color:`#94a3b8`,marginTop:4},children:`暂无封面`})]}),u&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#fef3c7`,color:`#d97706`,fontSize:12,flexDirection:`column`,gap:4},children:[(0,$.jsx)(MH,{style:{fontSize:24}}),`图片过期`]}),c&&(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#fef2f2`,color:`#dc2626`,fontSize:12},children:`加载失败`}),!u&&!a&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:0,left:0,right:0,background:`linear-gradient(transparent, rgba(0,0,0,0.5))`,padding:`8px`,color:`#fff`,fontSize:12,opacity:0,transition:`opacity 0.2s`},onMouseEnter:e=>{e.currentTarget.style.opacity=`1`},onMouseLeave:e=>{e.currentTarget.style.opacity=`0`},children:`点击预览`}),a&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,width:20,height:20,borderRadius:`50%`,backgroundColor:r?`#10b981`:`rgba(255,255,255,0.9)`,border:r?`2px solid #10b981`:`2px solid #d1d5db`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,transition:`all 0.2s`},onClick:t=>{t.stopPropagation(),i?.(e.generatedResourceId||e.id)},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`},children:r&&(0,$.jsx)(`svg`,{width:12,height:12,viewBox:`0 0 12 12`,fill:`none`,children:(0,$.jsx)(`path`,{d:`M10 3L4.5 8.5L2 6`,stroke:`white`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`})})}),a&&r&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,border:`3px solid #10b981`,borderRadius:4,pointerEvents:`none`,zIndex:5}})]})},ke=e=>{_(e),h(!0),window.dispatchEvent(new Event(`previewOpen`))},Ae=()=>{v.current&&(v.current.pause(),v.current.currentTime=0),document.querySelectorAll(`video`).forEach(e=>{e.pause(),e.currentTime=0}),h(!1)},je=e=>e.generatedResourceId||e.id,Me=e=>!!e.generatedResourceId,Ne=e=>{_e(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},Pe=()=>{let e=i.flatMap(e=>e.items.map(e=>je(e)));ge.size===e.length?_e(new Set):_e(new Set(e))},Fe=async()=>{if(ge.size===0){Z.warning(`请先选择要下载的媒体`);return}if(ge.size>10){Z.warning(`最多只能单次下载10个文件`);return}let e=[];i.forEach(t=>{t.items.forEach(t=>{ge.has(je(t))&&e.push(t)})});let t=new Nte.default,n=`http://ceshi.apiforeign.minzhong.cn`,r=t.folder(`downloads`),a=!1,o=0;Z.loading({content:`下载中,请稍候...`,key:`downloadProgress`});for(let t of e){let e=`${n}${t.videoUrl||t.imageUrl}`,i=((t.videoUrl||t.imageUrl).split(`/`).pop()||`file_${Date.now()}`).split(`?`)[0];try{let t=await fetch(e);if(!t.ok)throw Error(`Network response was not ok`);let n=await t.blob();r?.file(i,n),o++}catch{console.warn(`文件下载失败(CORS限制): ${i},将使用备用方式下载`),a=!0;break}}if(a){Z.destroy(`downloadProgress`),Z.info(`由于跨域限制,将逐个下载文件`),e.forEach((e,t)=>{setTimeout(()=>{let t=`${n}${e.videoUrl||e.imageUrl}&download=1`,r=document.createElement(`a`);r.href=t,r.download=``,document.body.appendChild(r),r.click(),document.body.removeChild(r)},t*500)});return}let s=await t.generateAsync({type:`blob`}),c=document.createElement(`a`);c.href=URL.createObjectURL(s),c.download=`downloads_${Date.now()}.zip`,c.click(),URL.revokeObjectURL(c.href),Z.destroy(`downloadProgress`),Z.success(`下载完成,共 ${o} 个文件`)},Ie=()=>{if(ge.size===0){Z.warning(`请先选择要上传的媒体`);return}D([]),k(``),T(!0)},Le=async(e,t)=>{N(!0);try{let n=await w7({page:e,page_size:t});j(n?.data||n||[]),F(n.pagination.total||0)}catch(e){console.error(`加载授权列表失败:`,e),j([]),F(0)}finally{N(!1)}},Re=async()=>{de(!0);try{let e=await W7({status:fe||void 0,page:oe,pageSize:ce});ie(e?.data||e||[]),ae(e.pagination?.total||e.total||0)}catch(e){console.error(`加载上传历史失败:`,e),ie([]),ae(0)}finally{de(!1)}},ze=()=>{K(!0),se(1),pe(``),Re()},Be=()=>{se(1),Re()},Ve=(e,t)=>{se(e),le(t),Re()},He=async()=>{if(!I){Z.warning(`请先选择授权账户`);return}if(ge.size===0){Z.warning(`请先选择要上传的媒体`);return}C(!0);try{let t=[],n=E.map(e=>e.accountId),r=new Map;i.forEach(e=>{e.items.forEach(e=>{let t=je(e);r.set(t,e)})});for(let i of ge){let a=r.get(i),o;o=a&&Me(a)?`generated_resources`:e===`project`?`generation_records`:`chat_generation_tasks`,t.push({advertiser_ids:n,resource_ids:[i],oauth_id:I.value,source_model:o})}await U7({tasks:t}),Z.success(`已提交 ${t.length} 个上传任务,后台异步处理中`),he(!1),_e(new Set),T(!1),D([]),k(``),L(void 0),z(new Map),V(``)}catch(e){console.error(`批量上传失败:`,e),Z.error(e.message||`批量上传失败`)}finally{C(!1)}},Ue=async(e,t)=>{if(t.trim())try{let n=(await G7({filenames:[{source_id:e,file_name:t}]}))?.results?.find(t=>t.source_id===e)?.new_file_name||t;a(t=>t.map(t=>({...t,items:t.items.map(t=>je(t)===e?{...t,fileName:n}:t)}))),Z.success(`文件名更新成功`)}catch(e){console.error(`文件名更新失败:`,e),Z.error(e.message||`文件名更新失败`)}},We=async(e,t)=>{if(!(!t.trim()||e.length===0))try{let n=await G7({filenames:e.map(e=>({source_id:e,file_name:t}))}),r=new Map;n?.results?.forEach(e=>{e.success&&e.newFileName&&r.set(e.sourceId,e.newFileName)}),a(n=>{let i=new Set(e);return n.map(e=>({...e,items:e.items.map(e=>{let n=je(e);if(i.has(n)){let i=r.get(n)||t;return{...e,fileName:i}}return e})}))}),console.log(n);let i=n?.successCount||0;Z.success(`已更新 ${i} 个文件名`)}catch(e){console.error(`文件名更新失败:`,e),Z.error(e.message||`文件名更新失败`)}},Ge=e=>{b(e)};(0,S.useEffect)(()=>{d(!0);let t=``;if(t=e===`project`?`?gen_type=${n}&history_source=generation_record&page=${o.page}&page_size=${o.pageSize}`:`?gen_type=${n}&page=${o.page}&page_size=${o.pageSize}`,y){let t=``;t=e===`project`?`${y}?gen_type=${n}&history_source=generation_record&page=${o.page}&page_size=${o.pageSize}`:`${y}?gen_type=${n}&page=${o.page}&page_size=${o.pageSize}`,d7(t).then(e=>{let t=Array.isArray(e)?e:e?.items||[],n=[{generatedDate:e.generatedDate,items:t,total:e.total,page:e.page}];n&&n[0].items.length>0?a(n):a([])}).catch(e=>{}).finally(()=>{d(!1)})}else u7(t).then(e=>{let t=Array.isArray(e)?e:e?.groups||[];t.forEach(e=>{e.page=1}),o.page===1?a(t):a(e=>[...e,...t]),l(e?.totalDays||0)}).catch(e=>{o.page===1&&a([])}).finally(()=>{d(!1)})},[e,n,o.page,y]);let Ke=()=>{u||s(e=>({...e,page:e.page+1}))},qe=async(t,r,i)=>{if(f.has(r))return;p(e=>new Set([...e,r]));let s=i+1,c=``;c=e===`project`?`${t}?gen_type=${n}&history_source=generation_record&page=${s}&page_size=${o.pageSize}`:`${t}?gen_type=${n}&page=${s}&page_size=${o.pageSize}`;try{let e=(await d7(c)).items||[];e&&e.length>0&&a(n=>n.map(n=>n.generatedDate===t?{...n,items:[...n.items,...e],page:s}:n))}catch{}finally{p(e=>{let t=new Set(e);return t.delete(r),t})}};return(0,S.useEffect)(()=>{s(e=>({...e,page:1}))},[e,n]),(0,$.jsxs)(`div`,{style:{minHeight:`calc(100vh - 90px)`,background:`#ffffffff`,overflowY:`auto`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:16,padding:`12px 20px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(X4,{style:{color:`#94a3b8`,fontSize:14}}),(0,$.jsxs)(jU,{children:[(0,$.jsx)(bD,{type:e===`project`?`primary`:`default`,onClick:()=>{t(`project`),he(!1),_e(new Set)},style:{borderRadius:8,background:e===`project`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:e===`project`?`none`:`1px solid #e2e8f0`,color:e===`project`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(TZ,{}),children:`项目记录`}),(0,$.jsx)(bD,{type:e===`creation`?`primary`:`default`,onClick:()=>{t(`creation`),he(!1),_e(new Set)},style:{borderRadius:8,background:e===`creation`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:e===`creation`?`none`:`1px solid #e2e8f0`,color:e===`creation`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(IU,{}),children:`创作记录`})]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:me?(0,$.jsxs)(jU,{children:[(0,$.jsx)(bD,{onClick:Pe,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#222222ff`,fontWeight:600},children:ge.size===i.reduce((e,t)=>e+t.items.length,0)?`取消全选`:`全选`}),(0,$.jsx)(bD,{onClick:()=>{he(!1),_e(new Set)},style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:600},children:`取消选择`}),(0,$.jsxs)(bD,{onClick:()=>Fe(),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,fontWeight:600},children:[`下载 (`,ge.size,`)`]}),(0,$.jsx)(bD,{type:`primary`,onClick:Ie,loading:x,disabled:x||ge.size===0,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,fontWeight:600},children:x?`上传中...`:`推送至账户 (${ge.size})`})]}):(0,$.jsx)(bD,{type:`primary`,icon:(0,$.jsx)(V8,{}),onClick:()=>he(!0),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600},children:`批量操作`})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:24,padding:`12px 20px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:`媒体类型:`}),(0,$.jsxs)(jU,{children:[(0,$.jsx)(bD,{type:n===`video`?`primary`:`default`,onClick:()=>{r(`video`),he(!1),_e(new Set)},style:{borderRadius:8,background:n===`video`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:n===`video`?`none`:`1px solid #e2e8f0`,color:n===`video`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(q8,{}),children:`视频`}),(0,$.jsx)(bD,{type:n===`image`?`primary`:`default`,onClick:()=>{r(`image`),he(!1),_e(new Set)},style:{borderRadius:8,background:n===`image`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:n===`image`?`none`:`1px solid #e2e8f0`,color:n===`image`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(d6,{}),children:`图片`}),(0,$.jsx)(zH,{picker:`date`,value:y?(0,OD.default)(y):void 0,onChange:(e,t)=>Ge(t||``),format:`YYYY-MM-DD`,style:{width:160,borderRadius:8,border:`1px solid #e2e8f0`},placeholder:`选择日期`}),y&&(0,$.jsx)(bD,{type:`text`,onClick:()=>Ge(``),style:{color:`#94a3b8`,fontSize:12},children:`清除`})]})]}),(0,$.jsx)(bD,{icon:(0,$.jsx)(MH,{}),onClick:ze,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,color:`#ffffff`,fontWeight:600,boxShadow:`0 4px 15px rgba(102, 126, 234, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(102, 126, 234, 0.6)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 15px rgba(102, 126, 234, 0.4)`},children:`查询上传任务历史`})]}),i.length===0?(0,$.jsx)(PC,{image:PC.PRESENTED_IMAGE_SIMPLE,description:`暂无生成记录`,style:{padding:`60px 0`}}):(0,$.jsxs)(`div`,{style:{padding:`0 4px`},children:[i.map((e,t)=>(0,$.jsxs)(`div`,{style:{marginBottom:32},children:[(0,$.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`#64748b`,marginBottom:12,paddingLeft:8},children:e.generatedDate}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8},children:e.items.map(e=>(0,$.jsx)(Oe,{item:e,mediaType:n,onClick:()=>me?Ne(je(e)):ke(e),isSelected:ge.has(je(e)),onToggleSelect:Ne,isSelectionMode:me},je(e)))}),e.total&&e.total>e.items.length&&(0,$.jsx)(`div`,{style:{padding:`12px 0`,textAlign:`left`},children:(0,$.jsx)(bD,{onClick:()=>qe(e.generatedDate,e.items,e.page),loading:f.has(e.generatedDate),disabled:f.has(e.generatedDate),size:`small`,style:{borderRadius:6,background:`transparent`,border:`1px dashed #cbd5e1`,color:`#64748b`,fontSize:12},children:f.has(e.date)?`加载中...`:`查看全部 (${e.total})`})})]},t)),i.length>0&&c>i.length&&(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:`20px 0`},children:(0,$.jsx)(bD,{onClick:Ke,loading:u,disabled:u,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:500},children:u?`加载中...`:`加载更多`})})]}),(0,$.jsx)(Rq,{title:`批量上传配置`,open:w,onCancel:()=>{T(!1),D([]),k(``),L(void 0),z(new Map),V(``)},footer:null,width:900,mask:{closable:!1},children:(0,$.jsxs)(`div`,{style:{padding:`16px 0`},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`},children:[`选中素材 (`,ge.size,`个)`]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:12,alignItems:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`},children:`统一修改名称:`}),(0,$.jsx)(oK,{value:B,onChange:e=>V(e.target.value),placeholder:`输入名称后点击应用`,style:{flex:1,borderRadius:8},size:`small`}),(0,$.jsx)(bD,{type:`primary`,size:`small`,onClick:()=>{B.trim()&&ge.size>0&&We(Array.from(ge),B)},disabled:!B.trim()||ge.size===0,style:{borderRadius:8},children:`应用`})]}),(0,$.jsx)(`div`,{style:{maxHeight:300,overflow:`auto`,border:`1px solid #f0f0f0`,borderRadius:8,padding:12},children:(()=>{let e=new Map;return i.forEach(t=>{t.items.forEach(t=>{let n=je(t);e.set(n,t)})}),Array.from(ge).map(t=>{let r=e.get(t);return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 0`,borderBottom:`1px solid #f5f5f5`},children:[(0,$.jsx)(`div`,{style:{width:60,height:40,borderRadius:4,backgroundColor:`#f5f5f5`,display:`flex`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,flexShrink:0},children:(()=>{let e=n===`video`?r?.videoCoverUrl:r?.imageUrl;if(!e)return(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`预览`});let t=`http://ceshi.apiforeign.minzhong.cn`,i=e.startsWith(`/`)?e.slice(1):e;return(0,$.jsx)(`img`,{src:`${t.endsWith(`/`)?t.slice(0,-1):t}/static/${i}&w=300&q=50`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})()}),(0,$.jsx)(`div`,{style:{flex:1,minWidth:0},children:(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#1e293b`},children:r?.fileName||`素材 ${r.id}`})}),(0,$.jsx)(oK,{value:R.has(t)?R.get(t):r?.fileName||``,onChange:e=>{let n=e.target.value,r=new Map(R);r.set(t,n),z(r),H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{Ue(t,n)},800)},placeholder:`输入新名称`,style:{width:200,borderRadius:4},size:`small`})]},t)})})()})]}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`},children:`选择授权账户`}),(0,$.jsx)(uw,{value:I,onChange:e=>{L(e)},placeholder:`点击选择授权账户`,style:{width:`100%`,marginBottom:16,borderRadius:8},popupRender:()=>(0,$.jsx)(`div`,{style:{padding:8,width:800,maxHeight:500,overflow:`auto`},children:(0,$.jsx)(g$,{dataSource:A,columns:[{title:`ID`,dataIndex:`id`,key:`id`,width:120},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`,width:120},{title:`授权应用ID`,dataIndex:`appid`,key:`appid`,width:120},{title:`授权用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,width:120},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,width:160,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权账户用户名`,dataIndex:`accountUsername`,key:`accountUsername`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})}],loading:M,pagination:{current:U,pageSize:te,total:P,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{ee(e),ne(t),Le(e,t)}},rowKey:`id`,size:`small`,scroll:{x:`max-content`},onRow:e=>({onClick:()=>{L({value:String(e.id),label:String(e.accountUserid)}),re(!1)},style:{cursor:`pointer`,backgroundColor:I?.value===String(e.id)?`#e6f7ff`:void 0}})})}),open:W,onOpenChange:e=>{re(e),e&&Le(1,te)},labelInValue:!0,fieldNames:{label:`accountUserid`,value:`id`}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`,marginTop:16},children:`粘贴账户ID(每行一个或用逗号分隔)`}),(0,$.jsx)(oK.TextArea,{value:O,onChange:e=>{let t=e.target.value;k(t);let n=t.split(/[\n,]/).map(e=>e.trim()).filter(e=>e.length>0),r=[...new Set(n)].map(e=>({accountId:e})),i=new Set;D(r.filter(e=>i.has(e.accountId)?!1:(i.add(e.accountId),!0)))},placeholder:`粘贴账户ID,每行一个或用逗号分隔,例如:\r +\0`,M+=r(k,2),M+=m.magic,M+=r(d,2),M+=r(f,2),M+=r(O.crc32,4),M+=r(O.compressedSize,4),M+=r(O.uncompressedSize,4),M+=r(g.length,2),M+=r(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+M+g+C,dirRecord:l.CENTRAL_FILE_HEADER+r(j,2)+M+r(y.length,2)+`\0\0\0\0`+r(A,4)+r(i,4)+g+C+y}}var a=e(`../utils`),o=e(`../stream/GenericWorker`),s=e(`../utf8`),c=e(`../crc32`),l=e(`../signature`);function u(e,t,n,r){o.call(this,`ZipFileWorker`),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo(`string`,this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){var r=e(`./Uint8ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){var r=e(`./DataReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){var r=e(`./ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array;var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){var r=e(`../utils`),i=e(`../support`),a=e(`./ArrayReader`),o=e(`./StringReader`),s=e(`./NodeBufferReader`),c=e(`./Uint8ArrayReader`);t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),t!==`string`||i.uint8array?t===`nodebuffer`?new s(e):i.uint8array?new c(r.transformTo(`uint8array`,e)):new a(r.transformTo(`array`,e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){n.LOCAL_FILE_HEADER=`PK`,n.CENTRAL_FILE_HEADER=`PK`,n.CENTRAL_DIRECTORY_END=`PK`,n.ZIP64_CENTRAL_DIRECTORY_LOCATOR=`PK\x07`,n.ZIP64_CENTRAL_DIRECTORY_END=`PK`,n.DATA_DESCRIPTOR=`PK\x07\b`},{}],24:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../utils`);function a(e){r.call(this,`ConvertWorker to `+e),this.destType=e}i.inherits(a,r),a.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../crc32`);function a(){r.call(this,`Crc32Probe`),this.withStreamInfo(`crc32`,0)}e(`../utils`).inherits(a,r),a.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataLengthProbe for `+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(a,i),a.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataWorker`);var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=``,this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}r.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case`string`:e=this.data.substring(this.index,t);break;case`uint8array`:e=this.data.subarray(this.index,t);break;case`array`:case`nodebuffer`:e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){function r(e){this.name=e||`default`,this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit(`data`,e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(`end`),this.cleanUp(),this.isFinished=!0}catch(e){this.emit(`error`,e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit(`error`,e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n `+e:e}},t.exports=r},{}],29:[function(e,t,n){var r=e(`../utils`),i=e(`./ConvertWorker`),a=e(`./GenericWorker`),o=e(`../base64`),s=e(`../support`),c=e(`../external`),l=null;if(s.nodestream)try{l=e(`../nodejs/NodejsStreamOutputAdapter`)}catch{}function u(e,t){return new c.Promise(function(n,i){var a=[],s=e._internalType,c=e._outputType,l=e._mimeType;e.on(`data`,function(e,n){a.push(e),t&&t(n)}).on(`error`,function(e){a=[],i(e)}).on(`end`,function(){try{n(function(e,t,n){switch(e){case`blob`:return r.newBlob(r.transformTo(`arraybuffer`,t),n);case`base64`:return o.encode(t);default:return r.transformTo(e,t)}}(c,function(e,t){var n,r=0,i=null,a=0;for(n=0;n`u`)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=new Blob([r],{type:`application/zip`}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),n.blob=i.getBlob(`application/zip`).size===0}catch{n.blob=!1}}}try{n.nodestream=!!e(`readable-stream`).Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){for(var r=e(`./utils`),i=e(`./support`),a=e(`./nodejsUtils`),o=e(`./stream/GenericWorker`),s=Array(256),c=0;c<256;c++)s[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;s[254]=s[254]=1;function l(){o.call(this,`utf-8 decode`),this.leftOver=null}function u(){o.call(this,`utf-8 encode`)}n.utf8encode=function(e){return i.nodebuffer?a.newBufferFrom(e,`utf-8`):function(e){var t,n,r,a,o,s=e.length,c=0;for(a=0;a>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo(`nodebuffer`,e).toString(`utf-8`):function(e){var t,n,i,a,o=e.length,c=Array(2*o);for(t=n=0;t>10&1023,c[n++]=56320|1023&i)}return c.length!==n&&(c.subarray?c=c.subarray(0,n):c.length=n),r.applyFromCharCode(c)}(e=r.transformTo(i.uint8array?`uint8array`:`array`,e))},r.inherits(l,o),l.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?`uint8array`:`array`,e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=t;(t=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),t.set(a,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+s[e[n]]>t?n:t}(t),c=t;o!==t.length&&(i.uint8array?(c=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(c=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:n.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=l,r.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){var r=e(`./support`),i=e(`./base64`),a=e(`./nodejsUtils`),o=e(`./external`);function s(e){return e}function c(e,t){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),e==0&&(this.dosPermissions=63&this.externalFileAttributes),e==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!==`/`||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||={};e.index+4>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},n.buf2binstring=function(e){return c(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n>10&1023,l[r++]=56320|1023&i)}return c(l,r)},n.utf8border=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+o[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){t.exports=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;n!==0;){for(n-=o=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s>>8^a[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){var r,i=e(`../utils/common`),a=e(`./trees`),o=e(`./adler32`),s=e(`./crc32`),c=e(`./messages`),l=0,u=4,d=0,f=-2,p=-1,m=4,h=2,g=8,_=9,v=286,y=30,b=19,x=2*v+1,S=15,C=3,w=258,T=w+C+1,E=42,D=113,O=1,k=2,A=3,j=4;function M(e,t){return e.msg=c[t],t}function N(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),n!==0&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function I(e,t){a._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function L(e,t){e.pending_buf[e.pending++]=t}function R(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function z(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-T?e.strstart-(e.w_size-T):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+w,p=l[a+o-1],m=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do if(l[(n=t)+o]===m&&l[n+o-1]===p&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do;while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&ac&&--i!=0);return o<=e.lookahead?o:e.lookahead}function B(e){var t,n,r,a,c,l,u,d,f,p,m=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-T)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);a+=m}if(e.strm.avail_in===0)break;if(l=e.strm,u=e.window,d=e.strstart+e.lookahead,f=a,p=void 0,p=l.avail_in,f=C)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C)if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-C,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(B(e),e.lookahead===0&&t===l)return O;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,I(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-T&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):(e.strstart>e.block_start&&(I(e,!1),e.strm.avail_out),O)}),new U(4,4,8,4,V),new U(4,5,16,8,V),new U(4,6,32,32,V),new U(4,4,16,16,H),new U(8,16,32,32,H),new U(8,16,128,128,H),new U(8,32,128,256,H),new U(32,128,258,1024,H),new U(32,258,258,4096,H)],n.deflateInit=function(e,t){return W(e,t,g,15,8,0)},n.deflateInit2=W,n.deflateReset=ne,n.deflateResetKeep=te,n.deflateSetHeader=function(e,t){return e&&e.state&&e.state.wrap===2?(e.state.gzhead=t,d):f},n.deflate=function(e,t){var n,i,o,c;if(!e||!e.state||5>8&255),L(i,i.gzhead.time>>16&255),L(i,i.gzhead.time>>24&255),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(L(i,255&i.gzhead.extra.length),L(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(L(i,0),L(i,0),L(i,0),L(i,0),L(i,0),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,3),i.status=D);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:i.level===6?2:3)<<6,i.strstart!==0&&(p|=32),p+=31-p%31,i.status=D,R(i,p),i.strstart!==0&&(R(i,e.adler>>>16),R(i,65535&e.adler)),e.adler=1}if(i.status===69)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending!==i.pending_buf_size));)L(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(i.status===73)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.gzindex=0,i.status=91)}else i.status=91;if(i.status===91)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.status=103)}else i.status=103;if(i.status===103&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&F(e),i.pending+2<=i.pending_buf_size&&(L(i,255&e.adler),L(i,e.adler>>8&255),e.adler=0,i.status=D)):i.status=D),i.pending!==0){if(F(e),e.avail_out===0)return i.last_flush=-1,d}else if(e.avail_in===0&&N(t)<=N(n)&&t!==u)return M(e,-5);if(i.status===666&&e.avail_in!==0)return M(e,-5);if(e.avail_in!==0||i.lookahead!==0||t!==l&&i.status!==666){var m=i.strategy===2?function(e,t){for(var n;;){if(e.lookahead===0&&(B(e),e.lookahead===0)){if(t===l)return O;break}if(e.match_length=0,n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):i.strategy===3?function(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=w){if(B(e),e.lookahead<=w&&t===l)return O;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=C&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(n=a._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):r[i.level].func(i,t);if(m!==A&&m!==j||(i.status=666),m===O||m===A)return e.avail_out===0&&(i.last_flush=-1),d;if(m===k&&(t===1?a._tr_align(i):t!==5&&(a._tr_stored_block(i,0,0,!1),t===3&&(P(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),F(e),e.avail_out===0))return i.last_flush=-1,d}return t===u?i.wrap<=0?1:(i.wrap===2?(L(i,255&e.adler),L(i,e.adler>>8&255),L(i,e.adler>>16&255),L(i,e.adler>>24&255),L(i,255&e.total_in),L(i,e.total_in>>8&255),L(i,e.total_in>>16&255),L(i,e.total_in>>24&255)):(R(i,e.adler>>>16),R(i,65535&e.adler)),F(e),0=n.w_size&&(s===0&&(P(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),c=e.avail_in,l=e.next_in,u=e.input,e.avail_in=m,e.next_in=0,e.input=t,B(n);n.lookahead>=C;){for(r=n.strstart,a=n.lookahead-(C-1);n.ins_h=(n.ins_h<>>=b=y>>>24,m-=b,(b=y>>>16&255)==0)E[a++]=65535&y;else{if(!(16&b)){if(!(64&b)){y=h[(65535&y)+(p&(1<>>=b,m-=b),m<15&&(p+=T[r++]<>>=b=y>>>24,m-=b,!(16&(b=y>>>16&255))){if(!(64&b)){y=g[(65535&y)+(p&(1<>>=b,m-=b,(b=a-o)>3,p&=(1<<(m-=x<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=1&t.wrap),t.mode=f,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(p),t.distcode=t.distdyn=new r.Buf32(m),t.sane=1,t.back=-1,u):d}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,_(e)):d}function y(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(a=o.wsize-o.wnext)&&(a=i),r.arraySet(o.window,t,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=a(n.check,B,2,0),x=b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg=`incorrect header check`,n.mode=30;break}if((15&b)!=8){e.msg=`unknown compression method`,n.mode=30;break}if(x-=4,F=8+(15&(b>>>=4)),n.wbits===0)n.wbits=F;else if(F>n.wbits){e.msg=`invalid window size`,n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=3;case 3:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>8&255,B[2]=b>>>16&255,B[3]=b>>>24&255,n.check=a(n.check,B,4,0)),x=b=0,n.mode=4;case 4:for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>8),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>>8&255,n.check=a(n.check,B,2,0)),x=b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(E=n.length)&&(E=v),E&&(n.head&&(F=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,E,F)),512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(v===0)break e;for(E=0;F=p[g+ E++],n.head&&F&&n.length<65536&&(n.head.name+=String.fromCharCode(F)),F&&E>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(v===0)break e;v--,b+=p[g++]<>>=1)){case 0:n.mode=14;break;case 1:if(w(n),n.mode=20,t!==6)break;b>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg=`invalid block type`,n.mode=30}b>>>=2,x-=2;break;case 14:for(b>>>=7&x,x-=7&x;x<32;){if(v===0)break e;v--,b+=p[g++]<>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=30;break}if(n.length=65535&b,x=b=0,n.mode=15,t===6)break e;case 15:n.mode=16;case 16:if(E=n.length){if(v>>=5,x-=5,n.ndist=1+(31&b),b>>>=5,x-=5,n.ncode=4+(15&b),b>>>=4,x-=4,286>>=3,x-=3}for(;n.have<19;)n.lens[V[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,L={bits:n.lenbits},I=s(0,n.lens,0,19,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid code lengths set`,n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=k,x-=k,n.lens[n.have++]=j;else{if(j===16){for(R=k+2;x>>=k,x-=k,n.have===0){e.msg=`invalid bit length repeat`,n.mode=30;break}F=n.lens[n.have-1],E=3+(3&b),b>>>=2,x-=2}else if(j===17){for(R=k+3;x>>=k)),b>>>=3,x-=3}else{for(R=k+7;x>>=k)),b>>>=7,x-=7}if(n.have+E>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=30;break}for(;E--;)n.lens[n.have++]=F}}if(n.mode===30)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=30;break}if(n.lenbits=9,L={bits:n.lenbits},I=s(c,n.lens,0,n.nlen,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid literal/lengths set`,n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,L={bits:n.distbits},I=s(l,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,L),n.distbits=L.bits,I){e.msg=`invalid distances set`,n.mode=30;break}if(n.mode=20,t===6)break e;case 20:n.mode=21;case 21:if(6<=v&&258<=y){e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,o(e,C),_=e.next_out,m=e.output,y=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,b=n.hold,x=n.bits,n.mode===12&&(n.back=-1);break}for(n.back=0;A=(z=n.lencode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,n.length=j,A===0){n.mode=26;break}if(32&A){n.back=-1,n.mode=12;break}if(64&A){e.msg=`invalid literal/length code`,n.mode=30;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(z=n.distcode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,64&A){e.msg=`invalid distance code`,n.mode=30;break}n.offset=j,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=30;break}n.mode=25;case 25:if(y===0)break e;if(E=C-y,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break}D=E>n.wnext?(E-=n.wnext,n.wsize-E):n.wnext-E,E>n.length&&(E=n.length),O=n.window}else O=m,D=_-n.offset,E=n.length;for(yv?(b=L[R+d[w]],N[P+d[w]]):(b=96,0),p=1<>k)+(m-=p)]=y<<24|b<<16|x|0,m!==0;);for(p=1<>=1;if(p===0?M=0:(M&=p-1,M+=p),w++,--F[C]==0){if(C===E)break;C=t[n+d[w]]}if(D>>7)]}function L(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function R(e,t,n){e.bi_valid>h-n?(e.bi_buf|=t<>h-e.bi_valid,e.bi_valid+=n-h):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function V(e,t,n){var r,i,a=Array(m+1),o=0;for(r=1;r<=m;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];s!==0&&(e[2*i]=B(a[s]++,s))}}function H(e){var t;for(t=0;t>1;1<=n;n--)te(e,a,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],te(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,te(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,o,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,g=t.stat_desc.max_length,_=0;for(a=0;a<=m;a++)e.bl_count[a]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n>=7;r>>=1)if(1&n&&e.dyn_ltree[2*t]!==0)return i;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return a;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=n+5,n+4<=o&&t!==-1?q(e,t,n,r):e.strategy===4||s===o?(R(e,2+ +!!r,3),ne(e,T,E)):(R(e,4+ +!!r,3),function(e,t,n,r){var i;for(R(e,t-257,5),R(e,n-1,5),R(e,r-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(O[n]+l+1)]++,e.dyn_dtree[2*I(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){R(e,2,3),z(e,_,T),function(e){e.bi_valid===16?(L(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){(function(e,t){if(!e.setImmediate){var n,r,i,a,o=1,s={},c=!1,l=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,n={}.toString.call(e.process)===`[object process]`?function(e){process.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage(``,`*`),e.onmessage=n,t}}()?(a=`setImmediate$`+Math.random()+`$`,e.addEventListener?e.addEventListener(`message`,p,!1):e.attachEvent(`onmessage`,p),function(t){e.postMessage(a+t,`*`)}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):l&&`onreadystatechange`in l.createElement(`script`)?(r=l.documentElement,function(e){var t=l.createElement(`script`);t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(f,0,e)},u.setImmediate=function(e){typeof e!=`function`&&(e=Function(``+e));for(var t=Array(arguments.length-1),r=0;r`u`?e===void 0?this:e:self)}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{}]},{},[10])(10)})}))(),1),{Search:Pte}=oK,{Text:Fte}=Q,Ite=()=>{let[e,t]=(0,S.useState)(`project`),[n,r]=(0,S.useState)(`video`),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)({page:1,pageSize:10}),[c,l]=(0,S.useState)(0),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(new Set),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(null),v=S.createRef(),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),[E,D]=(0,S.useState)([[]]),[O,k]=(0,S.useState)([``]),[A,j]=(0,S.useState)([]),[M,N]=(0,S.useState)(!1),[P,F]=(0,S.useState)(0),[I,L]=(0,S.useState)([void 0]),[R,z]=(0,S.useState)(new Map),[B,V]=(0,S.useState)(``),H=(0,S.useRef)(null),[U,ee]=(0,S.useState)(1),[te,ne]=(0,S.useState)(10),[W,re]=(0,S.useState)([!1]),[G,K]=(0,S.useState)(!1),[q,ie]=(0,S.useState)([]),[J,ae]=(0,S.useState)(0),[oe,se]=(0,S.useState)(1),[ce,le]=(0,S.useState)(10),[ue,de]=(0,S.useState)(!1),[fe,pe]=(0,S.useState)(``),[me,he]=(0,S.useState)(!1),[ge,_e]=(0,S.useState)(new Set),ve=null,ye=new Map,be=[],xe=0,Se=0,Ce=(e,t,n)=>{if(n&&Se<8)Se++,xe++,e();else if(xe<15)xe++,e();else{let r={callback:e,priority:n?2:1,element:t};be.push(r),be.sort((e,t)=>t.priority-e.priority)}},we=()=>{if(xe--,Se>0&&Se--,be.length>0){let e=be.shift();e&&(xe++,e.priority===2&&Se++,e.callback())}},Te=()=>(ve||=new IntersectionObserver(e=>{e.forEach(e=>{let t=ye.get(e.target);if(e.isIntersecting&&t){ye.delete(e.target),ve?.unobserve(e.target);let n=e.intersectionRatio>=1;Ce(t,e.target,n)}})},{rootMargin:`400px`,threshold:[.01,.5,1]}),ve),Ee=e=>{if(!e)return null;try{let t=new URL(e).searchParams.get(`exp`);return t?parseInt(t,10):null}catch{try{let t=e.indexOf(`?`);if(t!==-1){let n=e.substring(t+1),r=new URLSearchParams(n).get(`exp`);if(r)return parseInt(r,10)}return null}catch{return null}}},De=e=>{let t=Ee(e);return t?Math.floor(Date.now()/1e3)>t:!1},Oe=({item:e,mediaType:t,onClick:n,isSelected:r=!1,onToggleSelect:i,isSelectionMode:a=!1})=>{let[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),m=(0,S.useRef)(null),h=(0,S.useRef)(null),g=(0,S.useRef)(null);(0,S.useEffect)(()=>{let n=t===`video`?e.videoUrl:e.imageUrl;n&&De(n)&&d(!0)},[e,t]),(0,S.useEffect)(()=>{if(u)return;let e=m.current;if(!e)return;let t=Te();return ye.set(e,()=>{p(!0)}),t.observe(e),()=>{ye.delete(e),t.unobserve(e)}},[u]);let _=(e,t=!1)=>{let n=`http://ceshi.apiforeign.minzhong.cn`,r=e.startsWith(`/`)?e.slice(1):e,i=n.endsWith(`/`)?n.slice(0,-1):n;return t?`${i}/static/${r}&w=300&q=50`:`${i}/${r}`},v=()=>{g.current&&clearTimeout(g.current),s(!0),p(!1),we()},y=()=>{g.current=setTimeout(()=>{_(t===`video`?e.videoUrl:e.imageUrl),l(!0),p(!1),we()},1e3)},b=t===`video`?_(e.videoUrl):_(e.imageUrl,!0),x=e.videoCoverUrl?_(e.videoCoverUrl,!0):void 0;return(0,$.jsxs)(`div`,{ref:m,style:{width:160,height:120,position:`relative`,borderRadius:4,cursor:`pointer`,overflow:`hidden`,boxShadow:`0 2px 8px rgba(0,0,0,0.1)`,transition:`transform 0.2s, box-shadow 0.2s`},onClick:a?void 0:n,onMouseEnter:e=>{a||(e.currentTarget.style.transform=`scale(1.05)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0,0,0,0.2)`)},onMouseLeave:e=>{a||(e.currentTarget.style.transform=`scale(1)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(0,0,0,0.1)`)},children:[(t===`video`&&e.videoCoverUrl||t===`image`)&&(f||o)&&!c&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`},children:[f&&!o&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,backgroundColor:`rgba(248, 250, 252, 0.9)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1},children:(0,$.jsx)(`div`,{style:{width:28,height:28,border:`3px solid #e2e8f0`,borderTopColor:`#3b82f6`,borderRadius:`50%`,animation:`spin 0.8s linear infinite`}})}),t===`video`&&e.videoCoverUrl&&(0,$.jsx)(`img`,{ref:h,src:x,style:{width:`100%`,height:`100%`,objectFit:`cover`,opacity:+!!o,transition:`opacity 0.3s ease-in-out`},loading:`lazy`,onLoad:v,onError:y}),t===`image`&&(0,$.jsx)(`img`,{ref:h,src:b,alt:`图片预览`,style:{width:`100%`,height:`100%`,objectFit:`cover`,opacity:+!!o,transition:`opacity 0.3s ease-in-out`},loading:`lazy`,onLoad:v,onError:y})]}),!f&&!o&&!c&&(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,backgroundColor:`#cbd5e1`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:t===`video`?(0,$.jsx)(q8,{style:{color:`#64748b`,fontSize:16}}):(0,$.jsx)(d6,{style:{color:`#64748b`,fontSize:16}})})}),t===`video`&&!e.videoCoverUrl&&!c&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#1e293b`},children:[(0,$.jsx)(q8,{style:{color:`#64748b`,fontSize:24}}),(0,$.jsx)(Fte,{style:{fontSize:12,color:`#94a3b8`,marginTop:4},children:`暂无封面`})]}),u&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#fef3c7`,color:`#d97706`,fontSize:12,flexDirection:`column`,gap:4},children:[(0,$.jsx)(MH,{style:{fontSize:24}}),`图片过期`]}),c&&(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#fef2f2`,color:`#dc2626`,fontSize:12},children:`加载失败`}),!u&&!a&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:0,left:0,right:0,background:`linear-gradient(transparent, rgba(0,0,0,0.5))`,padding:`8px`,color:`#fff`,fontSize:12,opacity:0,transition:`opacity 0.2s`},onMouseEnter:e=>{e.currentTarget.style.opacity=`1`},onMouseLeave:e=>{e.currentTarget.style.opacity=`0`},children:`点击预览`}),a&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,width:20,height:20,borderRadius:`50%`,backgroundColor:r?`#10b981`:`rgba(255,255,255,0.9)`,border:r?`2px solid #10b981`:`2px solid #d1d5db`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,transition:`all 0.2s`},onClick:t=>{t.stopPropagation(),i?.(e.generatedResourceId||e.id)},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`},children:r&&(0,$.jsx)(`svg`,{width:12,height:12,viewBox:`0 0 12 12`,fill:`none`,children:(0,$.jsx)(`path`,{d:`M10 3L4.5 8.5L2 6`,stroke:`white`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`})})}),a&&r&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,border:`3px solid #10b981`,borderRadius:4,pointerEvents:`none`,zIndex:5}})]})},ke=e=>{_(e),h(!0),window.dispatchEvent(new Event(`previewOpen`))},Ae=()=>{v.current&&(v.current.pause(),v.current.currentTime=0),document.querySelectorAll(`video`).forEach(e=>{e.pause(),e.currentTime=0}),h(!1)},je=e=>e.generatedResourceId||e.id,Me=e=>{_e(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},Ne=()=>{let e=i.flatMap(e=>e.items.map(e=>je(e)));ge.size===e.length?_e(new Set):_e(new Set(e))},Pe=async()=>{if(ge.size===0){Z.warning(`请先选择要下载的媒体`);return}if(ge.size>10){Z.warning(`最多只能单次下载10个文件`);return}let e=[];i.forEach(t=>{t.items.forEach(t=>{ge.has(je(t))&&e.push(t)})});let t=new Nte.default,n=`http://ceshi.apiforeign.minzhong.cn`,r=t.folder(`downloads`),a=!1,o=0;Z.loading({content:`下载中,请稍候...`,key:`downloadProgress`});for(let t of e){let e=`${n}${t.videoUrl||t.imageUrl}`,i=((t.videoUrl||t.imageUrl).split(`/`).pop()||`file_${Date.now()}`).split(`?`)[0];try{let t=await fetch(e);if(!t.ok)throw Error(`Network response was not ok`);let n=await t.blob();r?.file(i,n),o++}catch{console.warn(`文件下载失败(CORS限制): ${i},将使用备用方式下载`),a=!0;break}}if(a){Z.destroy(`downloadProgress`),Z.info(`由于跨域限制,将逐个下载文件`),e.forEach((e,t)=>{setTimeout(()=>{let t=`${n}${e.videoUrl||e.imageUrl}&download=1`,r=document.createElement(`a`);r.href=t,r.download=``,document.body.appendChild(r),r.click(),document.body.removeChild(r)},t*500)});return}let s=await t.generateAsync({type:`blob`}),c=document.createElement(`a`);c.href=URL.createObjectURL(s),c.download=`downloads_${Date.now()}.zip`,c.click(),URL.revokeObjectURL(c.href),Z.destroy(`downloadProgress`),Z.success(`下载完成,共 ${o} 个文件`)},Fe=()=>{if(ge.size===0){Z.warning(`请先选择要上传的媒体`);return}D([[]]),k([``]),L([void 0]),T(!0)},Ie=()=>{if(!g)return;let e=je(g);_e(new Set([e])),D([[]]),k([``]),L([void 0]),z(new Map),V(``),T(!0)},Le=async(e,t)=>{N(!0);try{let n=await w7({page:e,page_size:t});j(n?.data||n||[]),F(n.pagination.total||0)}catch(e){console.error(`加载授权列表失败:`,e),j([]),F(0)}finally{N(!1)}},Re=async()=>{de(!0);try{let e=await W7({status:fe||void 0,page:oe,pageSize:ce});ie(e?.data||e||[]),ae(e.pagination?.total||e.total||0)}catch(e){console.error(`加载上传历史失败:`,e),ie([]),ae(0)}finally{de(!1)}},ze=()=>{K(!0),se(1),pe(``),Re()},Be=()=>{se(1),Re()},Ve=(e,t)=>{se(e),le(t),Re()},He=async()=>{let t=I.filter(e=>e!==void 0);if(t.length===0){Z.warning(`请先选择授权账户`);return}if(ge.size===0){Z.warning(`请先选择要上传的媒体`);return}C(!0);try{let n=[],r=Array.from(ge);for(let i=0;ie.accountId)||[];if(o.length===0){Z.warning(`第 ${i+1} 组授权账户未设置账户ID,已跳过`);continue}n.push({advertiser_ids:o,resource_ids:r,oauth_id:a.value,source_model:e===`project`?`generation_records`:`chat_generation_tasks`})}await U7({tasks:n}),Z.success(`已提交 ${n.length} 个上传任务,后台异步处理中`),he(!1),_e(new Set),T(!1),D([[]]),k([``]),L([void 0]),z(new Map),V(``)}catch(e){console.error(`批量上传失败:`,e),Z.error(e.message||`批量上传失败`)}finally{C(!1)}},Ue=async(e,t)=>{if(t.trim())try{let n=(await G7({filenames:[{source_id:e,file_name:t}]}))?.results?.find(t=>t.source_id===e)?.new_file_name||t;a(t=>t.map(t=>({...t,items:t.items.map(t=>je(t)===e?{...t,fileName:n}:t)}))),Z.success(`文件名更新成功`)}catch(e){console.error(`文件名更新失败:`,e),Z.error(e.message||`文件名更新失败`)}},We=async(e,t)=>{if(!(!t.trim()||e.length===0))try{let n=await G7({filenames:e.map(e=>({source_id:e,file_name:t}))}),r=new Map;n?.results?.forEach(e=>{e.success&&e.newFileName&&r.set(e.sourceId,e.newFileName)}),a(n=>{let i=new Set(e);return n.map(e=>({...e,items:e.items.map(e=>{let n=je(e);if(i.has(n)){let i=r.get(n)||t;return{...e,fileName:i}}return e})}))}),console.log(n);let i=n?.successCount||0;Z.success(`已更新 ${i} 个文件名`)}catch(e){console.error(`文件名更新失败:`,e),Z.error(e.message||`文件名更新失败`)}},Ge=e=>{b(e)};(0,S.useEffect)(()=>{d(!0);let t=``;if(t=e===`project`?`?gen_type=${n}&history_source=generation_record&page=${o.page}&page_size=${o.pageSize}`:`?gen_type=${n}&page=${o.page}&page_size=${o.pageSize}`,y){let t=``;t=e===`project`?`${y}?gen_type=${n}&history_source=generation_record&page=${o.page}&page_size=${o.pageSize}`:`${y}?gen_type=${n}&page=${o.page}&page_size=${o.pageSize}`,d7(t).then(e=>{let t=Array.isArray(e)?e:e?.items||[],n=[{generatedDate:e.generatedDate,items:t,total:e.total,page:e.page}];n&&n[0].items.length>0?a(n):a([])}).catch(e=>{}).finally(()=>{d(!1)})}else u7(t).then(e=>{let t=Array.isArray(e)?e:e?.groups||[];t.forEach(e=>{e.page=1}),o.page===1?a(t):a(e=>[...e,...t]),l(e?.totalDays||0)}).catch(e=>{o.page===1&&a([])}).finally(()=>{d(!1)})},[e,n,o.page,y]);let Ke=()=>{u||s(e=>({...e,page:e.page+1}))},qe=async(t,r,i)=>{if(f.has(r))return;p(e=>new Set([...e,r]));let s=i+1,c=``;c=e===`project`?`${t}?gen_type=${n}&history_source=generation_record&page=${s}&page_size=${o.pageSize}`:`${t}?gen_type=${n}&page=${s}&page_size=${o.pageSize}`;try{let e=(await d7(c)).items||[];e&&e.length>0&&a(n=>n.map(n=>n.generatedDate===t?{...n,items:[...n.items,...e],page:s}:n))}catch{}finally{p(e=>{let t=new Set(e);return t.delete(r),t})}};return(0,S.useEffect)(()=>{s(e=>({...e,page:1}))},[e,n]),(0,$.jsxs)(`div`,{style:{minHeight:`calc(100vh - 90px)`,background:`#ffffffff`,overflowY:`auto`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:16,padding:`12px 20px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(X4,{style:{color:`#94a3b8`,fontSize:14}}),(0,$.jsxs)(jU,{children:[(0,$.jsx)(bD,{type:e===`project`?`primary`:`default`,onClick:()=>{t(`project`),he(!1),_e(new Set)},style:{borderRadius:8,background:e===`project`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:e===`project`?`none`:`1px solid #e2e8f0`,color:e===`project`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(TZ,{}),children:`项目记录`}),(0,$.jsx)(bD,{type:e===`creation`?`primary`:`default`,onClick:()=>{t(`creation`),he(!1),_e(new Set)},style:{borderRadius:8,background:e===`creation`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:e===`creation`?`none`:`1px solid #e2e8f0`,color:e===`creation`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(IU,{}),children:`创作记录`})]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:me?(0,$.jsxs)(jU,{children:[(0,$.jsx)(bD,{onClick:Ne,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#222222ff`,fontWeight:600},children:ge.size===i.reduce((e,t)=>e+t.items.length,0)?`取消全选`:`全选`}),(0,$.jsx)(bD,{onClick:()=>{he(!1),_e(new Set)},style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:600},children:`取消选择`}),(0,$.jsxs)(bD,{onClick:()=>Pe(),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,fontWeight:600},children:[`下载 (`,ge.size,`)`]}),(0,$.jsx)(bD,{type:`primary`,onClick:Fe,loading:x,disabled:x||ge.size===0,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,fontWeight:600},children:x?`上传中...`:`推送至账户 (${ge.size})`})]}):(0,$.jsx)(bD,{type:`primary`,icon:(0,$.jsx)(V8,{}),onClick:()=>he(!0),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600},children:`批量操作`})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:24,padding:`12px 20px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:`媒体类型:`}),(0,$.jsxs)(jU,{children:[(0,$.jsx)(bD,{type:n===`video`?`primary`:`default`,onClick:()=>{r(`video`),he(!1),_e(new Set)},style:{borderRadius:8,background:n===`video`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:n===`video`?`none`:`1px solid #e2e8f0`,color:n===`video`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(q8,{}),children:`视频`}),(0,$.jsx)(bD,{type:n===`image`?`primary`:`default`,onClick:()=>{r(`image`),he(!1),_e(new Set)},style:{borderRadius:8,background:n===`image`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:n===`image`?`none`:`1px solid #e2e8f0`,color:n===`image`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(d6,{}),children:`图片`}),(0,$.jsx)(zH,{picker:`date`,value:y?(0,OD.default)(y):void 0,onChange:(e,t)=>Ge(t||``),format:`YYYY-MM-DD`,style:{width:160,borderRadius:8,border:`1px solid #e2e8f0`},placeholder:`选择日期`}),y&&(0,$.jsx)(bD,{type:`text`,onClick:()=>Ge(``),style:{color:`#94a3b8`,fontSize:12},children:`清除`})]})]}),(0,$.jsx)(bD,{icon:(0,$.jsx)(MH,{}),onClick:ze,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,color:`#ffffff`,fontWeight:600,boxShadow:`0 4px 15px rgba(102, 126, 234, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(102, 126, 234, 0.6)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 15px rgba(102, 126, 234, 0.4)`},children:`查询上传任务历史`})]}),i.length===0?(0,$.jsx)(PC,{image:PC.PRESENTED_IMAGE_SIMPLE,description:`暂无生成记录`,style:{padding:`60px 0`}}):(0,$.jsxs)(`div`,{style:{padding:`0 4px`},children:[i.map((e,t)=>(0,$.jsxs)(`div`,{style:{marginBottom:32},children:[(0,$.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`#64748b`,marginBottom:12,paddingLeft:8},children:e.generatedDate}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8},children:e.items.map(e=>(0,$.jsx)(Oe,{item:e,mediaType:n,onClick:()=>me?Me(je(e)):ke(e),isSelected:ge.has(je(e)),onToggleSelect:Me,isSelectionMode:me},je(e)))}),e.total&&e.total>e.items.length&&(0,$.jsx)(`div`,{style:{padding:`12px 0`,textAlign:`left`},children:(0,$.jsx)(bD,{onClick:()=>qe(e.generatedDate,e.items,e.page),loading:f.has(e.generatedDate),disabled:f.has(e.generatedDate),size:`small`,style:{borderRadius:6,background:`transparent`,border:`1px dashed #cbd5e1`,color:`#64748b`,fontSize:12},children:f.has(e.date)?`加载中...`:`查看全部 (${e.total})`})})]},t)),i.length>0&&c>i.length&&(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:`20px 0`},children:(0,$.jsx)(bD,{onClick:Ke,loading:u,disabled:u,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:500},children:u?`加载中...`:`加载更多`})})]}),(0,$.jsx)(Rq,{title:ge.size===1?`上传配置`:`批量上传配置`,open:w,onCancel:()=>{T(!1),D([[]]),k([``]),L([void 0]),z(new Map),V(``)},footer:null,width:900,mask:{closable:!1},children:(0,$.jsxs)(`div`,{style:{padding:`16px 0`},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`},children:[`选中素材 (`,ge.size,`个)`]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:12,alignItems:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`},children:`统一修改名称:`}),(0,$.jsx)(oK,{value:B,onChange:e=>V(e.target.value),placeholder:`输入名称后点击应用`,style:{flex:1,borderRadius:8},size:`small`}),(0,$.jsx)(bD,{type:`primary`,size:`small`,onClick:()=>{B.trim()&&ge.size>0&&We(Array.from(ge),B)},disabled:!B.trim()||ge.size===0,style:{borderRadius:8},children:`应用`})]}),(0,$.jsx)(`div`,{style:{maxHeight:300,overflow:`auto`,border:`1px solid #f0f0f0`,borderRadius:8,padding:12},children:(()=>{let e=new Map;return i.forEach(t=>{t.items.forEach(t=>{let n=je(t);e.set(n,t)})}),Array.from(ge).map(t=>{let r=e.get(t);return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 0`,borderBottom:`1px solid #f5f5f5`},children:[(0,$.jsx)(`div`,{style:{width:60,height:40,borderRadius:4,backgroundColor:`#f5f5f5`,display:`flex`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,flexShrink:0},children:(()=>{let e=n===`video`?r?.videoCoverUrl:r?.imageUrl;if(!e)return(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`预览`});let t=`http://ceshi.apiforeign.minzhong.cn`,i=e.startsWith(`/`)?e.slice(1):e;return(0,$.jsx)(`img`,{src:`${t.endsWith(`/`)?t.slice(0,-1):t}/static/${i}&w=300&q=50`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})()}),(0,$.jsx)(`div`,{style:{flex:1,minWidth:0},children:(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#1e293b`},children:r?.fileName||`素材 ${r.id}`})}),(0,$.jsx)(oK,{value:R.has(t)?R.get(t):r?.fileName||``,onChange:e=>{let n=e.target.value,r=new Map(R);r.set(t,n),z(r),H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{Ue(t,n)},800)},placeholder:`输入新名称`,style:{width:200,borderRadius:4},size:`small`})]},t)})})()})]}),I.map((e,t)=>(0,$.jsxs)(`div`,{style:{marginBottom:16,padding:12,border:`1px solid #e2e8f0`,borderRadius:8},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`},children:[`授权账户 `,t+1]}),I.length>1&&(0,$.jsx)(bD,{type:`text`,danger:!0,onClick:()=>{let e=[...I],n=[...O],r=[...E],i=[...W];e.splice(t,1),n.splice(t,1),r.splice(t,1),i.splice(t,1),L(e),k(n),D(r),re(i)},children:`删除`})]}),(0,$.jsx)(uw,{value:e,onChange:e=>{let n=[...I];n[t]=e,L(n)},placeholder:`点击选择授权账户`,style:{width:`100%`,marginBottom:12,borderRadius:8},popupRender:()=>(0,$.jsx)(`div`,{style:{padding:8,width:800,maxHeight:500,overflow:`auto`},children:(0,$.jsx)(g$,{dataSource:A,columns:[{title:`授权账户ID`,dataIndex:`accountId`,key:`accountId`,width:120},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`,width:120},{title:`授权应用ID`,dataIndex:`appid`,key:`appid`,width:120},{title:`授权用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,width:120},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,width:160,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权账户用户名`,dataIndex:`accountUsername`,key:`accountUsername`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})}],loading:M,pagination:{current:U,pageSize:te,total:P,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{ee(e),ne(t),Le(e,t)}},rowKey:`id`,size:`small`,scroll:{x:`max-content`},onRow:n=>({onClick:()=>{let e=String(n.id),r=[...I];r[t]={value:e,label:String(n.accountId)+`-`+(n.accountName||`-`)},L(r);let i=[...W];i[t]=!1,re(i)},style:{cursor:`pointer`,backgroundColor:e?.value===String(n.id)?`#e6f7ff`:void 0}})})}),open:W[t],onOpenChange:e=>{let n=[...W];n[t]=e,re(n),e&&Le(1,te)},labelInValue:!0,fieldNames:{label:`accountUserid`,value:`id`}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`},children:`粘贴账户ID(每行一个或用逗号分隔)`}),(0,$.jsx)(oK.TextArea,{value:O[t],onChange:e=>{let n=e.target.value,r=[...O];r[t]=n,k(r);let i=n.split(/[\n,]/).map(e=>e.trim()).filter(e=>e.length>0),a=[...new Set(i)].map(e=>({accountId:e})),o=new Set,s=a.filter(e=>o.has(e.accountId)?!1:(o.add(e.accountId),!0)),c=[...E];c[t]=s,D(c)},placeholder:`粘贴账户ID,每行一个或用逗号分隔,例如:\r 10001,10002,10003\r -10004`,rows:4,style:{borderRadius:8,marginBottom:16}}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,justifyContent:`flex-end`},children:[(0,$.jsx)(bD,{onClick:()=>{T(!1),D([]),k(``),L(void 0),z(new Map),V(``)},style:{borderRadius:8},children:`取消`}),(0,$.jsx)(bD,{type:`primary`,onClick:He,loading:x,disabled:x||E.length===0,style:{borderRadius:8},children:x?`上传中...`:`开始上传`})]})]})}),(0,$.jsxs)(Rq,{title:`上传任务历史`,open:G,onCancel:()=>K(!1),footer:null,width:800,style:{borderRadius:8},mask:{closable:!1},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(uw,{value:fe,onChange:e=>pe(e),placeholder:`选择状态`,style:{width:200,marginRight:12},options:[{value:`1`,label:`待上传`},{value:`2`,label:`上传中`},{value:`3`,label:`上传成功`},{value:`4`,label:`上传失败`}],allowClear:!0}),(0,$.jsx)(bD,{type:`primary`,onClick:Be,style:{borderRadius:8},children:`查询`})]}),(0,$.jsx)(g$,{dataSource:q,columns:[{title:`素材名称`,dataIndex:`fileName`,key:`fileName`,width:200},{title:`账户ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:180},{title:`状态`,dataIndex:`status`,key:`status`,width:100,render:e=>(0,$.jsx)(k$,{color:{1:`#f59e0b`,2:`#6366f1`,3:`#10b981`,4:`#ef4444`}[e]||`#64748b`,style:{borderRadius:4},children:{1:`待上传`,2:`上传中`,3:`上传成功`,4:`上传失败`}[e]||e})},{title:`备注`,dataIndex:`note`,key:`note`,width:250,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:e||`-`})},{title:`创建时间`,dataIndex:`created_at`,key:`created_at`,width:180,render:e=>(0,OD.default)(e).format(`YYYY-MM-DD HH:mm:ss`)}],loading:ue,scroll:{x:`max-content`},pagination:{current:oe,pageSize:ce,total:J,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:Ve},rowKey:(e,t)=>e.task_id||e.resource_id||t,size:`small`})]}),m&&g&&(0,$.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`rgba(0,0,0,0.85)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1e3,padding:16,boxSizing:`border-box`,overflow:`auto`},onClick:Ae,children:(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:16,padding:0,width:`100%`,maxWidth:`1200px`,maxHeight:`95vh`,minHeight:`300px`,overflow:`hidden`,position:`relative`,display:`flex`,flexDirection:`column`,boxShadow:`0 20px 60px rgba(0,0,0,0.3)`},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`12px 16px`,borderBottom:`1px solid #f0f0f0`,flexShrink:0},children:[(0,$.jsx)(Q.Title,{level:5,style:{margin:0,color:`#1a1a2e`,fontSize:16},children:g.title||`预览`}),(0,$.jsx)(bD,{icon:(0,$.jsx)(a5,{}),onClick:Ae,style:{background:`transparent`,border:`none`,color:`#94a3b8`,fontSize:16}})]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexWrap:`wrap`,height:`500px`,gap:20,padding:20,overflow:`auto`,justifyContent:`center`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{flex:1,minWidth:`280px`,maxWidth:`800px`,display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`200px`},children:De(g.videoUrl||g.imageUrl)?(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`40px`},children:[(0,$.jsx)(`div`,{style:{fontSize:48,marginBottom:16},children:`⚠️`}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#ff4d4f`,marginBottom:16},children:`图片/视频资源已过期,请刷新重新加载~`})]}):n===`video`?(0,$.jsx)(`video`,{ref:v,src:`http://ceshi.apiforeign.minzhong.cn${g.videoUrl}`,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:`55vh`,borderRadius:8,objectFit:`contain`}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${g.imageUrl}&w=300&q=50`,alt:`预览`,style:{maxWidth:`100%`,maxHeight:`55vh`,objectFit:`contain`,borderRadius:8}})}),(0,$.jsxs)(`div`,{style:{width:`100%`,minWidth:`280px`,maxWidth:`320px`,background:`#f8fafc`,borderRadius:12,padding:20,maxHeight:`55vh`,overflowY:`auto`,overflowX:`hidden`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,display:`block`,marginBottom:16},children:`文件信息`}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`类型`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:n===`video`?`视频`:`图片`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,flexShrink:0,width:40},children:`请求`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500,flex:1,wordBreak:`break-all`},children:g.originalPrompt})]}),n===`image`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imageProportion})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imageSize})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`尺寸`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imagePx})]})]}),n===`video`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.aspectRatio})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.resolution})]})]}),n===`video`&&(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`时长`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:`${g.duration}秒`||`-`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`创建时间`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:Lte(g.createdAt||g.generatedDate)})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`生成引擎`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.engine||g.engineName||`-`})]})]}),(0,$.jsx)(`div`,{style:{borderTop:`1px dashed #e2e8f0`,margin:`16px 0`}}),g.mediaReferences&&g.mediaReferences.length>0&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,display:`block`,marginBottom:12},children:`依靠附件`}),g.mediaReferences.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>{v.current&&v.current.pause();let t=`http://ceshi.apiforeign.minzhong.cn${e.url}`;window.open(t,`_blank`)},style:{display:`flex`,alignItems:`center`,gap:8,padding:8,borderRadius:6,cursor:`pointer`,backgroundColor:`#f1f5f9`,marginBottom:4,transition:`background-color 0.2s`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#e2e8f0`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#f1f5f9`},children:[e.type===`image`?(0,$.jsx)(d6,{style:{color:`#3b82f6`,fontSize:14}}):(0,$.jsx)(q8,{style:{color:`#f59e0b`,fontSize:14}}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13},children:e.name||`媒体${t+1}`})]},e.url))]}),(0,$.jsx)(`div`,{children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,marginTop:20},children:[(0,$.jsx)(bD,{type:`primary`,icon:(0,$.jsx)(_0,{}),onClick:()=>{v.current&&v.current.pause();let e=`http://ceshi.apiforeign.minzhong.cn${g.videoUrl||g.imageUrl}&download=1`;window.open(e,`_blank`)},style:{flex:1,borderRadius:8},disabled:De(g.videoUrl||g.imageUrl),children:De(g.videoUrl||g.imageUrl)?`资源已过期`:`下载`}),(0,$.jsx)(bD,{onClick:Ae,style:{flex:1,borderRadius:8},children:`关闭`})]})})]})]})]})})]})},P9=document.createElement(`style`);P9.textContent=` +10004`,rows:3,style:{borderRadius:8}})]},t)),(0,$.jsx)(bD,{type:`dashed`,block:!0,onClick:()=>{L([...I,void 0]),k([...O,``]),D([...E,[]]),re([...W,!1])},style:{borderRadius:8,marginBottom:16},children:`+ 新增授权账户组`}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,justifyContent:`flex-end`},children:[(0,$.jsx)(bD,{onClick:()=>{T(!1),D([[]]),k([``]),L([void 0]),z(new Map),V(``)},style:{borderRadius:8},children:`取消`}),(0,$.jsx)(bD,{type:`primary`,onClick:He,loading:x,disabled:x||E.every(e=>e.length===0),style:{borderRadius:8},children:x?`上传中...`:`开始上传`})]})]})}),(0,$.jsxs)(Rq,{title:`上传任务历史`,open:G,onCancel:()=>K(!1),footer:null,width:800,style:{borderRadius:8},mask:{closable:!1},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(uw,{value:fe,onChange:e=>pe(e),placeholder:`选择状态`,style:{width:200,marginRight:12},options:[{value:`1`,label:`待上传`},{value:`2`,label:`上传中`},{value:`3`,label:`上传成功`},{value:`4`,label:`上传失败`}],allowClear:!0}),(0,$.jsx)(bD,{type:`primary`,onClick:Be,style:{borderRadius:8},children:`查询`})]}),(0,$.jsx)(g$,{dataSource:q,columns:[{title:`素材名称`,dataIndex:`fileName`,key:`fileName`,width:200},{title:`账户ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:180},{title:`状态`,dataIndex:`status`,key:`status`,width:100,render:e=>(0,$.jsx)(k$,{color:{1:`#f59e0b`,2:`#6366f1`,3:`#10b981`,4:`#ef4444`}[e]||`#64748b`,style:{borderRadius:4},children:{1:`待上传`,2:`上传中`,3:`上传成功`,4:`上传失败`}[e]||e})},{title:`备注`,dataIndex:`note`,key:`note`,width:250,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:e||`-`})},{title:`创建时间`,dataIndex:`created_at`,key:`created_at`,width:180,render:e=>(0,OD.default)(e).format(`YYYY-MM-DD HH:mm:ss`)}],loading:ue,scroll:{x:`max-content`},pagination:{current:oe,pageSize:ce,total:J,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:Ve},rowKey:(e,t)=>e.task_id||e.resource_id||t,size:`small`})]}),m&&g&&(0,$.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`rgba(0,0,0,0.85)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1e3,padding:16,boxSizing:`border-box`,overflow:`auto`},onClick:Ae,children:(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:16,padding:0,width:`100%`,maxWidth:`1200px`,maxHeight:`95vh`,minHeight:`300px`,overflow:`hidden`,position:`relative`,display:`flex`,flexDirection:`column`,boxShadow:`0 20px 60px rgba(0,0,0,0.3)`},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`12px 16px`,borderBottom:`1px solid #f0f0f0`,flexShrink:0},children:[(0,$.jsx)(Q.Title,{level:5,style:{margin:0,color:`#1a1a2e`,fontSize:16},children:g.title||`预览`}),(0,$.jsx)(bD,{icon:(0,$.jsx)(a5,{}),onClick:Ae,style:{background:`transparent`,border:`none`,color:`#94a3b8`,fontSize:16}})]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexWrap:`wrap`,height:`500px`,gap:20,padding:20,overflow:`auto`,justifyContent:`center`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{flex:1,minWidth:`280px`,maxWidth:`800px`,display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`200px`},children:De(g.videoUrl||g.imageUrl)?(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`40px`},children:[(0,$.jsx)(`div`,{style:{fontSize:48,marginBottom:16},children:`⚠️`}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#ff4d4f`,marginBottom:16},children:`图片/视频资源已过期,请刷新重新加载~`})]}):n===`video`?(0,$.jsx)(`video`,{ref:v,src:`http://ceshi.apiforeign.minzhong.cn${g.videoUrl}`,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:`55vh`,borderRadius:8,objectFit:`contain`}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${g.imageUrl}&w=300&q=50`,alt:`预览`,style:{maxWidth:`100%`,maxHeight:`55vh`,objectFit:`contain`,borderRadius:8}})}),(0,$.jsxs)(`div`,{style:{width:`100%`,minWidth:`280px`,maxWidth:`320px`,background:`#f8fafc`,borderRadius:12,padding:20,maxHeight:`55vh`,overflowY:`auto`,overflowX:`hidden`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,display:`block`,marginBottom:16},children:`文件信息`}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`类型`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:n===`video`?`视频`:`图片`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,flexShrink:0,width:40},children:`请求`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500,flex:1,wordBreak:`break-all`},children:g.originalPrompt})]}),n===`image`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imageProportion})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imageSize})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`尺寸`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imagePx})]})]}),n===`video`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.aspectRatio})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.resolution})]})]}),n===`video`&&(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`时长`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:`${g.duration}秒`||`-`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`创建时间`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:Lte(g.createdAt||g.generatedDate)})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`生成引擎`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.engine||g.engineName||`-`})]})]}),(0,$.jsx)(`div`,{style:{borderTop:`1px dashed #e2e8f0`,margin:`16px 0`}}),g.mediaReferences&&g.mediaReferences.length>0&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,display:`block`,marginBottom:12},children:`依靠附件`}),g.mediaReferences.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>{v.current&&v.current.pause();let t=`http://ceshi.apiforeign.minzhong.cn${e.url}`;window.open(t,`_blank`)},style:{display:`flex`,alignItems:`center`,gap:8,padding:8,borderRadius:6,cursor:`pointer`,backgroundColor:`#f1f5f9`,marginBottom:4,transition:`background-color 0.2s`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#e2e8f0`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#f1f5f9`},children:[e.type===`image`?(0,$.jsx)(d6,{style:{color:`#3b82f6`,fontSize:14}}):(0,$.jsx)(q8,{style:{color:`#f59e0b`,fontSize:14}}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13},children:e.name||`媒体${t+1}`})]},e.url))]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,marginTop:20},children:[(0,$.jsx)(bD,{type:`primary`,icon:(0,$.jsx)(_0,{}),onClick:()=>{v.current&&v.current.pause();let e=`http://ceshi.apiforeign.minzhong.cn${g.videoUrl||g.imageUrl}&download=1`;window.open(e,`_blank`)},style:{flex:1,borderRadius:8},disabled:De(g.videoUrl||g.imageUrl),children:De(g.videoUrl||g.imageUrl)?`资源已过期`:`下载`}),(0,$.jsx)(bD,{onClick:Ae,style:{flex:1,borderRadius:8},children:`关闭`})]}),(0,$.jsx)(`div`,{children:(0,$.jsx)(bD,{type:`primary`,onClick:Ie,style:{width:`100%`,borderRadius:8,marginTop:20},disabled:De(g.videoUrl||g.imageUrl),children:`推送媒体后台`})})]})]})]})]})})]})},P9=document.createElement(`style`);P9.textContent=` @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } diff --git a/video-gen-app/dist/index.html b/video-gen-app/dist/index.html index 69ebb89d..273cd011 100644 --- a/video-gen-app/dist/index.html +++ b/video-gen-app/dist/index.html @@ -28,7 +28,7 @@ } })(); - + diff --git a/video-gen-app/src/pages/GeneratedRecord.tsx b/video-gen-app/src/pages/GeneratedRecord.tsx index 8d8094ee..6729dc71 100644 --- a/video-gen-app/src/pages/GeneratedRecord.tsx +++ b/video-gen-app/src/pages/GeneratedRecord.tsx @@ -39,21 +39,21 @@ const GeneratedRecord: React.FC = () => { // 上传配置弹窗相关状态 const [uploadConfigModalVisible, setUploadConfigModalVisible] = useState(false); - const [accountIdList, setAccountIdList] = useState<{ + const [accountIdLists, setAccountIdLists] = useState<{ accountId: string; - }[]>([]); - const [accountIdInput, setAccountIdInput] = useState(''); + }[][]>([[]]); + const [accountIdInputs, setAccountIdInputs] = useState(['']); const [oauthList, setOauthList] = useState([]); const [oauthLoading, setOauthLoading] = useState(false); const [oauthTotal, setOauthTotal] = useState(0); - const [selectedOauthItems, setSelectedOauthItems] = useState<{ value: string; label: string } | undefined>(undefined); + const [selectedOauthItems, setSelectedOauthItems] = useState<({ value: string; label: string } | undefined)[]>([undefined]); const [materialFileNames, setMaterialFileNames] = useState>(new Map()); const [unifiedFileName, setUnifiedFileName] = useState(''); const updateFilenameDebounceRef = useRef | null>(null); const [oauthPage, setOauthPage] = useState(1); const [oauthPageSize, setOauthPageSize] = useState(10); - const [oauthSelectOpen, setOauthSelectOpen] = useState(false); + const [oauthSelectOpens, setOauthSelectOpens] = useState([false]); // 上传任务历史弹窗相关状态 const [uploadHistoryModalVisible, setUploadHistoryModalVisible] = useState(false); @@ -682,8 +682,21 @@ const GeneratedRecord: React.FC = () => { message.warning('请先选择要上传的媒体'); return; } - setAccountIdList([]); - setAccountIdInput(''); + setAccountIdLists([[]]); + setAccountIdInputs(['']); + setSelectedOauthItems([undefined]); + setUploadConfigModalVisible(true); + }; + + const handleSinglePushToMedia = () => { + if (!previewItem) return; + const resourceId = getItemResourceId(previewItem); + setSelectedItems(new Set([resourceId])); + setAccountIdLists([[]]); + setAccountIdInputs(['']); + setSelectedOauthItems([undefined]); + setMaterialFileNames(new Map()); + setUnifiedFileName(''); setUploadConfigModalVisible(true); }; @@ -743,7 +756,8 @@ const GeneratedRecord: React.FC = () => { // 批量上传素材 const handleStartBatchUpload = async () => { - if (!selectedOauthItems) { + const validOauthItems = selectedOauthItems.filter(item => item !== undefined); + if (validOauthItems.length === 0) { message.warning('请先选择授权账户'); return; } @@ -759,42 +773,34 @@ const GeneratedRecord: React.FC = () => { oauth_id: string; source_model: string; }[] = []; - const advertiserIds = accountIdList.map(account => account.accountId); - // 创建itemId到item对象的映射 - const itemMap = new Map(); - recordlist.forEach((group: any) => { - group.items.forEach((item: any) => { - const resourceId = getItemResourceId(item); - itemMap.set(resourceId, item); - }); - }); + const resourceIds = Array.from(selectedItems); - for (const itemId of selectedItems) { - const item = itemMap.get(itemId); - // 根据item是否有generatedResourceId来决定source_model - let sourceModel: string; - if (item && hasGeneratedResourceId(item)) { - sourceModel = 'generated_resources'; - } else { - sourceModel = filterType === 'project' ? 'generation_records' : 'chat_generation_tasks'; + for (let i = 0; i < validOauthItems.length; i++) { + const oauthItem = validOauthItems[i]; + const advertiserIds = accountIdLists[i]?.map(account => account.accountId) || []; + + if (advertiserIds.length === 0) { + message.warning(`第 ${i + 1} 组授权账户未设置账户ID,已跳过`); + continue; } tasks.push({ advertiser_ids: advertiserIds, - resource_ids: [itemId], - oauth_id: selectedOauthItems.value, - source_model: sourceModel, + resource_ids: resourceIds, + oauth_id: oauthItem.value, + source_model: filterType === 'project' ? 'generation_records' : 'chat_generation_tasks', }); } + await asyncBatchUploadMaterial({ tasks }); message.success(`已提交 ${tasks.length} 个上传任务,后台异步处理中`); setIsSelectionMode(false); setSelectedItems(new Set()); // 关闭弹窗并清理状态 setUploadConfigModalVisible(false); - setAccountIdList([]); - setAccountIdInput(''); - setSelectedOauthItems(undefined); + setAccountIdLists([[]]); + setAccountIdInputs(['']); + setSelectedOauthItems([undefined]); setMaterialFileNames(new Map()); setUnifiedFileName(''); } catch (error: any) { @@ -1323,13 +1329,13 @@ const GeneratedRecord: React.FC = () => { {/* 上传配置弹窗 */} { setUploadConfigModalVisible(false); - setAccountIdList([]); - setAccountIdInput(''); - setSelectedOauthItems(undefined); + setAccountIdLists([[]]); + setAccountIdInputs(['']); + setSelectedOauthItems([undefined]); setMaterialFileNames(new Map()); setUnifiedFileName(''); }} @@ -1457,149 +1463,202 @@ const GeneratedRecord: React.FC = () => { })()}
- - 选择授权账户 - -
{ - const roleMap: Record = { - ADVERTISER: '客户', - CUSTOMER_ADMIN: '普通版工作台-管理员', - CUSTOMER_OPERATOR: '普通版工作台-协作者', - AGENT: '代理商', - CHILD_AGENT: '二级代理商', - PLATFORM_ROLE_STAR: '星图账户', - PLATFORM_ROLE_SHOP_ACCOUNT: '抖音店铺账户', - PLATFORM_ROLE_QIANCHUAN_AGENT: '千川代理商', - PLATFORM_ROLE_STAR_AGENT: '星图代理商', - PLATFORM_ROLE_AWEME: '抖音号', - PLATFORM_ROLE_STAR_MCN: '星图MCN机构', - PLATFORM_ROLE_STAR_ISV: '星图服务商', - AGENT_SYSTEM_ACCOUNT: '代理商系统账户', - PLATFORM_ROLE_LOCAL_AGENT: '本地推代理商', - PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN: '云图品牌服务商管理员', - PLATFORM_ROLE_LIFE: '抖音来客账户', - PLATFORM_ROLE_ENTERPRISE_BP_ADMIN: '升级版工作台管理员', - PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR: '升级版工作台协作者', - }; - return roleMap[role] || role; - }, - }, - { - title: '授权账户用户名', - dataIndex: 'accountUsername', - key: 'accountUsername', - width: 120, - render: (text: string) => {text || '-'}, - }, - ]} - loading={oauthLoading} - pagination={{ - current: oauthPage, - pageSize: oauthPageSize, - total: oauthTotal, - showSizeChanger: true, - showTotal: (total) => `共 ${total} 条记录`, - onChange: (page, size) => { - setOauthPage(page); - setOauthPageSize(size); - loadOAuthList(page, size); - }, - }} - rowKey="id" - size="small" - scroll={{ x: 'max-content' }} - onRow={(record) => ({ - onClick: () => { - const id = String(record.id); - setSelectedOauthItems({ value: id, label: String(record.accountUserid) }); - setOauthSelectOpen(false); - }, - style: { - cursor: 'pointer', - backgroundColor: selectedOauthItems?.value === String(record.id) ? '#e6f7ff' : undefined, - }, - })} - /> + {selectedOauthItems.map((oauthItem, index) => ( +
+
+ + 授权账户 {index + 1} + + {selectedOauthItems.length > 1 && ( + + )}
- )} - open={oauthSelectOpen} - onOpenChange={(open) => { - setOauthSelectOpen(open); - if (open) { - loadOAuthList(1, oauthPageSize); - } - }} - labelInValue - fieldNames={{ label: 'accountUserid', value: 'id' }} - /> - - 粘贴账户ID(每行一个或用逗号分隔) - - { - const value = e.target.value; - setAccountIdInput(value); - const ids = value.split(/[\n,]/) - .map(line => line.trim()) - .filter(line => line.length > 0); - const uniqueIds = [...new Set(ids)]; - const textAccounts = uniqueIds.map(id => ({ accountId: id })); - const seen = new Set(); - const finalAccounts = textAccounts.filter(a => { - if (seen.has(a.accountId)) return false; - seen.add(a.accountId); - return true; - }); - setAccountIdList(finalAccounts); - }} - placeholder="粘贴账户ID,每行一个或用逗号分隔,例如: +
{ + const roleMap: Record = { + ADVERTISER: '客户', + CUSTOMER_ADMIN: '普通版工作台-管理员', + CUSTOMER_OPERATOR: '普通版工作台-协作者', + AGENT: '代理商', + CHILD_AGENT: '二级代理商', + PLATFORM_ROLE_STAR: '星图账户', + PLATFORM_ROLE_SHOP_ACCOUNT: '抖音店铺账户', + PLATFORM_ROLE_QIANCHUAN_AGENT: '千川代理商', + PLATFORM_ROLE_STAR_AGENT: '星图代理商', + PLATFORM_ROLE_AWEME: '抖音号', + PLATFORM_ROLE_STAR_MCN: '星图MCN机构', + PLATFORM_ROLE_STAR_ISV: '星图服务商', + AGENT_SYSTEM_ACCOUNT: '代理商系统账户', + PLATFORM_ROLE_LOCAL_AGENT: '本地推代理商', + PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN: '云图品牌服务商管理员', + PLATFORM_ROLE_LIFE: '抖音来客账户', + PLATFORM_ROLE_ENTERPRISE_BP_ADMIN: '升级版工作台管理员', + PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR: '升级版工作台协作者', + }; + return roleMap[role] || role; + }, + }, + { + title: '授权账户用户名', + dataIndex: 'accountUsername', + key: 'accountUsername', + width: 120, + render: (text: string) => {text || '-'}, + }, + ]} + loading={oauthLoading} + pagination={{ + current: oauthPage, + pageSize: oauthPageSize, + total: oauthTotal, + showSizeChanger: true, + showTotal: (total) => `共 ${total} 条记录`, + onChange: (page, size) => { + setOauthPage(page); + setOauthPageSize(size); + loadOAuthList(page, size); + }, + }} + rowKey="id" + size="small" + scroll={{ x: 'max-content' }} + onRow={(record) => ({ + onClick: () => { + const id = String(record.id); + const newOauthItems = [...selectedOauthItems]; + newOauthItems[index] = { value: id, label: String(record.accountId)+'-'+(record.accountName || '-') }; + setSelectedOauthItems(newOauthItems); + const newOauthSelectOpens = [...oauthSelectOpens]; + newOauthSelectOpens[index] = false; + setOauthSelectOpens(newOauthSelectOpens); + }, + style: { + cursor: 'pointer', + backgroundColor: oauthItem?.value === String(record.id) ? '#e6f7ff' : undefined, + }, + })} + /> + + )} + open={oauthSelectOpens[index]} + onOpenChange={(open) => { + const newOauthSelectOpens = [...oauthSelectOpens]; + newOauthSelectOpens[index] = open; + setOauthSelectOpens(newOauthSelectOpens); + if (open) { + loadOAuthList(1, oauthPageSize); + } + }} + labelInValue + fieldNames={{ label: 'accountUserid', value: 'id' }} + /> + + 粘贴账户ID(每行一个或用逗号分隔) + + { + const value = e.target.value; + const newAccountIdInputs = [...accountIdInputs]; + newAccountIdInputs[index] = value; + setAccountIdInputs(newAccountIdInputs); + const ids = value.split(/[\n,]/) + .map(line => line.trim()) + .filter(line => line.length > 0); + const uniqueIds = [...new Set(ids)]; + const textAccounts = uniqueIds.map(id => ({ accountId: id })); + const seen = new Set(); + const finalAccounts = textAccounts.filter(a => { + if (seen.has(a.accountId)) return false; + seen.add(a.accountId); + return true; + }); + const newAccountIdLists = [...accountIdLists]; + newAccountIdLists[index] = finalAccounts; + setAccountIdLists(newAccountIdLists); + }} + placeholder="粘贴账户ID,每行一个或用逗号分隔,例如: 10001,10002,10003 10004" - rows={4} + rows={3} + style={{ borderRadius: 8 }} + /> + + ))} + {/* 操作按钮 */}
{
- {/*
+
-
*/} +
From 02c068e6936c4cf5b8a2cd94e481fa57dcd3ae4d Mon Sep 17 00:00:00 2001 From: Lrd <13001933075@sina.cn> Date: Fri, 26 Jun 2026 12:49:38 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E6=89=93=E5=8C=85build=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{index-B5mkO6qz.js => index-CB5fB-gc.js} | 14 +- video-gen-app/dist/assets/index-CUOi61z4.js | 450 ------------------ video-gen-app/dist/index.html | 72 +-- 3 files changed, 39 insertions(+), 497 deletions(-) rename video-gen-app/dist/assets/{index-B5mkO6qz.js => index-CB5fB-gc.js} (88%) delete mode 100644 video-gen-app/dist/assets/index-CUOi61z4.js diff --git a/video-gen-app/dist/assets/index-B5mkO6qz.js b/video-gen-app/dist/assets/index-CB5fB-gc.js similarity index 88% rename from video-gen-app/dist/assets/index-B5mkO6qz.js rename to video-gen-app/dist/assets/index-CB5fB-gc.js index bf0e60b2..74f29005 100644 --- a/video-gen-app/dist/assets/index-B5mkO6qz.js +++ b/video-gen-app/dist/assets/index-CB5fB-gc.js @@ -402,7 +402,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } } - `})]})},t9={HomeOutlined:(0,$.jsx)(y3,{}),DashboardOutlined:(0,$.jsx)(P4,{}),CodeOutlined:(0,$.jsx)(y4,{}),PlayCircleOutlined:(0,$.jsx)(S6,{}),WalletOutlined:(0,$.jsx)(Q8,{}),SettingOutlined:(0,$.jsx)(Y6,{}),BellOutlined:(0,$.jsx)(P2,{}),UserOutlined:(0,$.jsx)(K8,{}),AppstoreOutlined:(0,$.jsx)(u2,{}),FileTextOutlined:(0,$.jsx)(MU,{}),StarOutlined:(0,$.jsx)(y8,{}),HeartOutlined:(0,$.jsx)(u3,{}),CameraOutlined:(0,$.jsx)(Y2,{}),RobotOutlined:(0,$.jsx)(S6,{}),CalculatorOutlined:(0,$.jsx)(K2,{}),DollarOutlined:(0,$.jsx)(B4,{}),GiftOutlined:(0,$.jsx)(i3,{}),ThunderboltOutlined:(0,$.jsx)(j8,{}),FireOutlined:(0,$.jsx)(Q4,{}),CloudOutlined:(0,$.jsx)(u4,{}),SmileOutlined:(0,$.jsx)(u8,{}),TrophyOutlined:(0,$.jsx)(L8,{}),RocketOutlined:(0,$.jsx)(L6,{}),BulbOutlined:(0,$.jsx)(U2,{}),PictureOutlined:(0,$.jsx)(p6,{}),VideoCameraOutlined:(0,$.jsx)(Y8,{}),AudioOutlined:(0,$.jsx)(S2,{}),MailOutlined:(0,$.jsx)(U3,{}),PhoneOutlined:(0,$.jsx)(u6,{}),GlobalOutlined:(0,$.jsx)(s3,{}),ShoppingCartOutlined:(0,$.jsx)(Q6,{}),TeamOutlined:(0,$.jsx)(O8,{}),BarChartOutlined:(0,$.jsx)(j2,{}),PieChartOutlined:(0,$.jsx)(g6,{}),LineChartOutlined:(0,$.jsx)(P3,{}),SecurityScanOutlined:(0,$.jsx)(U6,{}),ApiOutlined:(0,$.jsx)(s2,{}),DatabaseOutlined:(0,$.jsx)(L4,{}),CloudServerOutlined:(0,$.jsx)(p4,{})},lte=240,n9=[{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(CJ,{})},{gradient:`linear-gradient(135deg, #4a5568, #2d3748)`,shadow:`rgba(74,85,104,0.25)`,icon:(0,$.jsx)(Y4,{})},{gradient:`linear-gradient(135deg, #718096, #4a5568)`,shadow:`rgba(113,128,150,0.25)`,icon:(0,$.jsx)(O4,{})},{gradient:`linear-gradient(135deg, #5a67d8, #434190)`,shadow:`rgba(90,103,216,0.25)`,icon:(0,$.jsx)(T2,{})}],ute=()=>{let e=Je(),t=Ge(),{user:n,logout:r}=$7(),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c]=xW.useForm(),[l,u]=(0,S.useState)(null),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)({}),[_,v]=(0,S.useState)(0),[y,b]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteName||``;return t&&(document.title=t),t}),[x,C]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteLogo||``;if(t){let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=t,e.type=`image/png`}return t}),[w,T]=(0,S.useState)(!localStorage.getItem(`siteInfo`)),[E,D]=(0,S.useState)(!1),[O,k]=(0,S.useState)(null),[A,j]=(0,S.useState)(`alipay`),[M,N]=(0,S.useState)(!1),[P,F]=(0,S.useState)(180),I=(0,S.useRef)(null),L=(0,S.useRef)(null),R=(0,S.useRef)(null),[z,B]=(0,S.useState)({alipay:!1,wechat:!1}),[V,H]=(0,S.useState)(!1),[U]=xW.useForm(),[ee,te]=(0,S.useState)(!1),[ne,W]=(0,S.useState)(!1),re=`pending_payment_order`;(0,S.useEffect)(()=>{q5().then(e=>{let t=e.siteName||`民众智创`,n=e.siteLogo||``;if(t!==y&&(b(t),document.title=t),n&&n!==x){C(n);let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=n,e.type=`image/png`}localStorage.setItem(`siteInfo`,JSON.stringify({siteName:t,siteLogo:n}))}).catch(()=>{})},[]);let G=()=>{Q5().then(e=>{v(e)}).catch(()=>{})};(0,S.useEffect)(()=>{(async()=>{let e=localStorage.getItem(re);if(e)try{let t=JSON.parse(e),n=await o7(t.orderNo);if(n.status===`pending`){k({price:t.price,credits:t.credits,qrCode:t.qrCode,method:t.method}),R.current=t.orderNo;let e=Date.now(),n=new Date(t.createdAt).getTime(),r=t.timeoutSeconds||180,i=Math.floor((e-n)/1e3),a=Math.max(0,r-i);a>0?(D(!0),ue(t.orderNo,a)):localStorage.removeItem(re)}else n.status===`paid`?(Z.success(`支付成功!积分已到账`),$7.getState().refreshUser(),localStorage.removeItem(re)):localStorage.removeItem(re)}catch{localStorage.removeItem(re)}})()},[]),(0,S.useEffect)(()=>{t7().then(e=>{f(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),n7().then(e=>{m(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),r7().then(e=>{B(e),e.alipay?j(`alipay`):e.wechat&&j(`wechat`)}).catch(()=>{}),G()},[n]);let K=t.pathname.startsWith(`/records`)?`/records`:t.pathname,q=lte,ie=[{key:`profile`,icon:(0,$.jsx)(K8,{}),label:`账号: ${n?.username}`,disabled:!0},{key:`credits`,icon:(0,$.jsx)(Q8,{style:{color:`#c9a96e`}}),label:`积分: ${n?.credits??0}`,disabled:!0},{type:`divider`},{key:`myCredits`,icon:(0,$.jsx)(Q8,{}),label:`积分明细`},{key:`orderRecords`,icon:(0,$.jsx)(MU,{}),label:`订单记录`},{key:`messages`,icon:(0,$.jsx)(P2,{}),label:`消息中心${_>0?`(${_})`:``}`},{type:`divider`},{key:`changePwd`,icon:(0,$.jsx)(L3,{}),label:`修改密码`},{type:`divider`},{key:`logout`,icon:(0,$.jsx)(B3,{}),label:`退出登录`,danger:!0}],J=({key:t})=>{t===`logout`?(r(),e(`/login`)):t===`changePwd`?a(!0):t===`messages`?e(`/messages`):t===`recharge`?s(!0):t===`myCredits`?e(`/user-center?tab=credits`):t===`orderRecords`&&e(`/user-center?tab=orders`)},ae=async()=>{try{await c.validateFields(),Z.success(`密码修改成功(演示)`),a(!1),c.resetFields()}catch{}},oe=()=>{r(),e(`/login`)},se=()=>{s(!0)},ce=async()=>{if(!n){Z.warning(`请先登录`);return}try{let e=await U.validateFields();W(!0),await Z7({phone:e.phone,company_name:e.companyName,industry:e.industry,name:e.name,message:e.message}),Z.success(`提交成功,我们会尽快与您联系`),H(!1),U.resetFields()}catch(e){Z.error(e?.message||`提交失败`)}finally{W(!1)}},le=(0,S.useCallback)(()=>{I.current&&=(clearInterval(I.current),null),L.current&&=(clearInterval(L.current),null)},[]),ue=(0,S.useCallback)((e,t=180)=>{le(),F(t),I.current=setInterval(async()=>{try{let t=await o7(e);t.status===`paid`?(le(),R.current=null,localStorage.removeItem(re),Z.success(`支付成功!积分已到账`),$7.getState().refreshUser(),D(!1),k(null),u(null)):t.status===`cancelled`&&(le(),R.current=null,localStorage.removeItem(re))}catch{}},2e3),L.current=setInterval(()=>{F(e=>e<=1?(le(),R.current&&=(s7(R.current).catch(()=>{}),null),localStorage.removeItem(re),Z.warning(`订单已超时,请重新充值`),D(!1),k(null),u(null),0):e-1)},1e3)},[le]);return(0,$.jsxs)(dK,{style:{minHeight:`100vh`},children:[(0,$.jsxs)(`div`,{className:`desktop-sidebar`,style:{width:q,position:`fixed`,left:16,top:16,bottom:16,zIndex:100,background:`linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,display:`flex`,flexDirection:`column`,transition:`width 0.25s ease, left 0.25s ease`,overflow:`hidden`,border:`1px solid rgba(0, 0, 0, 0.06)`},children:[(0,$.jsx)(`div`,{style:{height:80,display:`flex`,alignItems:`center`,justifyContent:`flex-start`,padding:`0 20px`,flexShrink:0,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14},children:[(0,$.jsx)(`div`,{style:{width:42,height:42,borderRadius:14,flexShrink:0,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,overflow:`hidden`},children:x?(0,$.jsx)(`img`,{src:x,alt:`logo`,style:{width:28,height:28,objectFit:`contain`}}):(0,$.jsx)(j8,{style:{fontSize:20,color:`#ffffff`}})}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:17,fontWeight:700,letterSpacing:-.02,whiteSpace:`nowrap`,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:y})]})}),(0,$.jsx)(`div`,{style:{flex:1,padding:`8px 8px`,overflow:`auto`},children:(()=>{let t={};d.forEach(e=>{let n=e.parent_id??e.parentId;n&&(t[n]||(t[n]=[]),t[n].push(e))});let n=d.filter(e=>!(e.parent_id??e.parentId));n.sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0));let r=[],i=(t,n=0)=>{let r=t.path===K,i=t9[t.icon]||(0,$.jsx)(y3,{});return(0,$.jsxs)(`div`,{onClick:()=>t.path&&e(t.path),style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:10,padding:n>0?`6px 12px 6px 32px`:`6px 14px`,borderRadius:12,margin:`1px 4px`,cursor:`pointer`,fontSize:n>0?13:14,fontWeight:r?600:400,color:r?`#4f46e5`:`#475569`,background:r?`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%)`:`transparent`,transition:`all 0.2s ease`},children:[(0,$.jsx)(`span`,{style:{fontSize:n>0?14:16,flexShrink:0,color:r?`#6366f1`:`#64748b`},children:i}),(0,$.jsx)(`span`,{style:{whiteSpace:`nowrap`},children:t.label})]},t.id)};return n.forEach(e=>{if((e.menu_type??e.menuType)===`group`){let n=(t[e.id]||[]).sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0));r.push((0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12,fontWeight:600,padding:`10px 14px 4px`,letterSpacing:.5,textTransform:`uppercase`},children:e.label}),n.map(e=>i(e,1))]},e.id))}else r.push(i(e))}),r})()}),(0,$.jsxs)(`div`,{onClick:()=>s(!0),style:{margin:`8px 12px`,padding:`12px 20px`,borderRadius:14,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8,color:`#ffffff`,fontSize:14,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%)`,e.currentTarget.style.transform=`translateY(-1px)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.5)`},onMouseLeave:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(99, 102, 241, 0.4)`},children:[(0,$.jsx)(gR,{style:{fontSize:16}}),(0,$.jsx)(`span`,{children:`充值积分`})]}),(0,$.jsx)(`div`,{style:{padding:`16px 16px`,flexShrink:0},children:(0,$.jsx)(kU,{menu:{items:ie,onClick:J},placement:`topRight`,arrow:!0,children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:12,padding:`10px 14px`,borderRadius:14,cursor:`pointer`,transition:`all 0.25s ease`,background:`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,boxShadow:`0 2px 12px rgba(0, 0, 0, 0.04)`},onMouseEnter:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #ffffff 0%, #f8fafc 100%)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0, 0, 0, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.background=`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,e.currentTarget.style.boxShadow=`0 2px 12px rgba(0, 0, 0, 0.04)`},children:[(0,$.jsx)(uT,{size:36,icon:(0,$.jsx)(K8,{}),style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,flexShrink:0,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`}}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsx)(`div`,{style:{color:`#1e293b`,fontSize:14,fontWeight:600,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,letterSpacing:-.01},children:n?.username}),(0,$.jsxs)(`div`,{style:{color:`#6366f1`,fontSize:12,fontWeight:500,letterSpacing:0,background:`rgba(99, 102, 241, 0.08)`,padding:`2px 8px`,borderRadius:6,display:`inline-block`},children:[`积分: `,n?.credits||0]})]})]})})})]}),(0,$.jsx)(`div`,{className:`desktop-content`,style:{marginLeft:q+28,marginRight:12,marginTop:16,marginBottom:16,flex:1,minHeight:`calc(100vh - 32px)`,background:`transparent`,padding:0,transition:`margin-left 0.25s ease`},children:(0,$.jsx)(`div`,{style:{boxSizing:`border-box`,height:`100%`,background:`#ffffffff`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,minHeight:`100%`,padding:`24px 32px 32px`,border:`1px solid rgba(0, 0, 0, 0.06)`},children:(0,$.jsx)(Ct,{})})}),(0,$.jsxs)(`div`,{className:`mobile-bottom-nav`,children:[d.filter(e=>(e.menu_type??e.menuType)!==`group`).map(t=>t.path?(0,$.jsxs)(`div`,{className:`nav-item ${t.path===K?`active`:``}`,onClick:()=>e(t.path),children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:t9[t.icon]||(0,$.jsx)(y3,{})}),(0,$.jsx)(`span`,{children:t.label})]},t.id):null),(0,$.jsxs)(`div`,{className:`nav-item`,onClick:se,children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:(0,$.jsx)(T6,{})}),(0,$.jsx)(`span`,{children:`充值`})]}),(0,$.jsxs)(`div`,{className:`nav-item`,onClick:oe,children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:(0,$.jsx)(B3,{})}),(0,$.jsx)(`span`,{children:`退出`})]})]}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(L3,{}),`修改密码`]}),open:i,onOk:ae,onCancel:()=>{a(!1),c.resetFields()},okText:`确认修改`,cancelText:`取消`,width:440,children:(0,$.jsxs)(xW,{form:c,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(xW.Item,{name:`oldPwd`,label:`原密码`,rules:[{required:!0,message:`请输入原密码`}],children:(0,$.jsx)(nK.Password,{placeholder:`请输入原密码`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(xW.Item,{name:`newPwd`,label:`新密码`,rules:[{required:!0,message:`请输入新密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(nK.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(xW.Item,{name:`confirmPwd`,label:`确认新密码`,rules:[{required:!0,message:`请再次输入新密码`},({getFieldValue:e})=>({validator(t,n){return!n||e(`newPwd`)===n?Promise.resolve():Promise.reject(Error(`两次密码不一致`))}})],children:(0,$.jsx)(nK.Password,{placeholder:`请再次输入新密码`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})})]})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(i3,{}),`积分充值`]}),open:o,onCancel:()=>{s(!1),u(null)},footer:null,width:680,children:(0,$.jsxs)(`div`,{style:{marginTop:16},children:[(0,$.jsxs)(DU,{style:{marginBottom:16},children:[(0,$.jsx)(Q8,{style:{color:`#6366f1`}}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,letterSpacing:0},children:`当前积分余额`}),(0,$.jsx)(Q.Text,{strong:!0,style:{color:`#6366f1`,fontSize:20,fontWeight:600},children:n?.credits??0})]}),(0,$.jsxs)(`div`,{style:{padding:`12px 16px`,background:`rgba(99, 102, 241, 0.06)`,borderRadius:10,marginBottom:16,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(T3,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13},children:`当前后台仅支持支付宝/微信扫码充值,如需转账支付请联系我们`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12,flexWrap:`wrap`},children:p.map((e,t)=>{let n=n9[t%n9.length],r=(e.credits||0)+(e.bonus_credits||e.bonusCredits||0);return(0,$.jsxs)(`div`,{onClick:()=>u(e.id),style:{flex:`1 1 45%`,minWidth:200,borderRadius:16,padding:`20px 16px`,background:l===e.id?`rgba(99,102,241,0.04)`:`#fafbff`,border:l===e.id?`2px solid #6366f1`:`1px solid #f0f0f5`,cursor:`pointer`,position:`relative`,transition:`all 0.2s`},children:[e.description&&(0,$.jsx)(T$,{color:`purple`,style:{position:`absolute`,top:-10,left:`50%`,transform:`translateX(-50%)`,borderRadius:8,fontSize:11},children:e.description}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:44,height:44,borderRadius:12,flexShrink:0,background:n.gradient,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:18,color:`#fff`,boxShadow:`0 6px 16px ${n.shadow}`},children:n.icon}),(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:6},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15},children:e.name}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[r.toLocaleString(),` 积分`]})]}),(0,$.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,marginTop:4,background:n.gradient,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:[`¥`,e.price]})]})]})]},e.id)})}),!z.alipay&&!z.wechat?(0,$.jsx)(`div`,{style:{marginTop:20,marginBottom:8,padding:16,background:`#fef2f2`,borderRadius:12,border:`1px solid #fecaca`},children:(0,$.jsx)(Q.Text,{style:{color:`#dc2626`,fontSize:13},children:`⚠️ 暂无可用的支付方式,请联系管理员开启支付功能`})}):(0,$.jsxs)(`div`,{style:{marginTop:20,marginBottom:8},children:[(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13,marginBottom:8,display:`block`},children:`选择支付方式`}),(0,$.jsxs)(LL.Group,{value:A,onChange:e=>j(e.target.value),style:{display:`flex`,gap:12},children:[z.alipay&&(0,$.jsxs)(LL.Button,{value:`alipay`,style:{flex:1,textAlign:`center`,borderRadius:10,height:44,lineHeight:`42px`,borderColor:A===`alipay`?`#1677ff`:void 0,color:A===`alipay`?`#1677ff`:void 0},children:[(0,$.jsx)(i2,{style:{fontSize:16,marginRight:6}}),`支付宝`]}),z.wechat&&(0,$.jsxs)(LL.Button,{value:`wechat`,style:{flex:1,textAlign:`center`,borderRadius:10,height:44,lineHeight:`42px`,borderColor:A===`wechat`?`#07c160`:void 0,color:A===`wechat`?`#07c160`:void 0},children:[(0,$.jsx)(i5,{style:{fontSize:16,marginRight:6}}),`微信支付`]})]})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:[(0,$.jsx)(vD,{size:`large`,onClick:()=>{s(!1),u(null)},style:{borderRadius:10,marginRight:12},children:`取消`}),(0,$.jsx)(vD,{type:`primary`,size:`large`,disabled:!l||!z.alipay&&!z.wechat,loading:M,onClick:async()=>{let e=p.find(e=>e.id===l);if(!e)return;let t=(e.credits||0)+(e.bonus_credits||e.bonusCredits||0);try{N(!0);let n=await i7(e.id,A),r=n.qrUrl||n.codeUrl||n.qr_code||n.code_url;(n.paymentMethod===`alipay`||n.paymentMethod===`wechat`)&&r?(k({price:e.price,credits:t,qrCode:r,method:n.paymentMethod}),s(!1),D(!0),R.current=n.orderNo,localStorage.setItem(re,JSON.stringify({orderNo:n.orderNo,price:e.price,credits:t,qrCode:r,method:n.paymentMethod,createdAt:n.createdAt||new Date().toISOString(),timeoutSeconds:180})),ue(n.orderNo)):(Z.success(`充值成功!积分已到账`),$7.getState().refreshUser(),s(!1),u(null))}catch(e){Z.error(e?.message||`创建订单失败,请重试`)}finally{N(!1)}},style:{borderRadius:10,fontWeight:600,background:l?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#d1d5db`,border:`none`,boxShadow:l?`0 8px 24px rgba(99,102,241,0.3)`:`none`},children:`确认充值`})]})]})}),(0,$.jsx)(Pq,{open:E,onCancel:async()=>{if(le(),R.current){try{await s7(R.current)}catch{}R.current=null}localStorage.removeItem(re),D(!1),k(null)},footer:null,width:400,closable:!1,styles:{body:{padding:0,borderRadius:16,overflow:`hidden`}},children:(0,$.jsxs)(`div`,{style:{padding:`24px`},children:[(0,$.jsxs)(`div`,{style:{textAlign:`center`,marginBottom:24},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,background:O?.method===`alipay`?`linear-gradient(135deg, #1677ff, #0958d9)`:`linear-gradient(135deg, #07c160, #06ae56)`,borderRadius:16,display:`flex`,alignItems:`center`,justifyContent:`center`,margin:`0 auto 12px`},children:O?.method===`alipay`?(0,$.jsx)(i2,{style:{fontSize:24,color:`#fff`}}):(0,$.jsx)(i5,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:O?.method===`alipay`?`支付宝支付`:`微信支付`}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:O?.method===`alipay`?`请使用支付宝扫描二维码完成支付`:`请使用微信扫描二维码完成支付`})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:16,padding:20,display:`flex`,flexDirection:`column`,alignItems:`center`,boxShadow:`0 4px 20px rgba(0,0,0,0.08)`},children:[(0,$.jsx)(`div`,{style:{width:180,height:180,borderRadius:12,overflow:`hidden`,background:`#fff`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:O&&(0,$.jsx)(t2,{value:O.qrCode,size:160,level:`M`,includeMargin:!1})}),(0,$.jsxs)(`div`,{style:{marginTop:16,textAlign:`center`},children:[(0,$.jsxs)(`div`,{style:{fontSize:28,fontWeight:700,color:`#1a1a2e`},children:[`¥`,O?.price||0]}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`,marginTop:4},children:[`购买 `,O?.credits||0,` 积分`]}),(0,$.jsx)(`div`,{style:{marginTop:12,padding:`8px 16px`,background:P<=30?`#fef2f2`:`#f0f9ff`,borderRadius:8,border:P<=30?`1px solid #fecaca`:`1px solid #bae6fd`,display:`inline-block`},children:(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:P<=30?`#dc2626`:`#0284c7`},children:[`订单将在 `,(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:800},children:P}),` 秒后关闭`]})})]})]}),(0,$.jsx)(`div`,{style:{marginTop:20,padding:16,background:`#fef3c7`,borderRadius:12},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:8},children:[(0,$.jsx)(`div`,{style:{fontSize:16,marginTop:-2},children:`💡`}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#92400e`},children:[(0,$.jsx)(`div`,{style:{fontWeight:500,marginBottom:4},children:`支付提示`}),(0,$.jsxs)(`ul`,{style:{margin:0,paddingLeft:16},children:[(0,$.jsx)(`li`,{style:{marginBottom:2},children:`请在支付后等待页面自动跳转`}),(0,$.jsx)(`li`,{children:`如支付成功但未到账,请联系客服`})]})]})]})}),(0,$.jsx)(`div`,{style:{marginTop:20},children:(0,$.jsx)(vD,{size:`large`,block:!0,onClick:async()=>{if(le(),R.current){try{await s7(R.current)}catch{}R.current=null}localStorage.removeItem(re),D(!1),k(null),u(null)},style:{borderRadius:10},children:`取消支付`})})]})}),(0,$.jsx)(cte,{}),(0,$.jsx)(`div`,{style:{position:`fixed`,right:24,bottom:24,zIndex:1e3},children:(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:64,bottom:8,padding:`8px 16px`,background:`#1e293b`,color:`#ffffff`,borderRadius:8,fontSize:13,whiteSpace:`nowrap`,opacity:+!!ee,transition:`opacity 0.2s ease`,pointerEvents:`none`},children:`联系我们`}),(0,$.jsx)(`button`,{onClick:()=>H(!0),style:{width:56,height:56,borderRadius:`50%`,border:`none`,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,color:`#ffffff`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.05)`,e.currentTarget.style.boxShadow=`0 6px 24px rgba(99, 102, 241, 0.5)`,te(!0)},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.4)`,te(!1)},children:(0,$.jsx)(Y3,{style:{fontSize:20}})})]})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(Y3,{}),`联系我们`]}),open:V,onCancel:()=>{H(!1),U.resetFields()},footer:null,width:480,children:(0,$.jsxs)(`div`,{style:{marginTop:8},children:[(0,$.jsxs)(xW,{form:U,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`name`,label:`姓名`,rules:[{required:!0,message:`请输入姓名`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的姓名`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`phone`,label:`手机号`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1[3-9]\d{9}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的手机号`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`companyName`,label:`公司名称`,rules:[{required:!0,message:`请输入公司名称`}],children:(0,$.jsx)(nK,{placeholder:`请输入公司名称`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`industry`,label:`您的行业`,rules:[{required:!0,message:`请输入您的行业`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的行业`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`message`,label:`留言(选填)`,children:(0,$.jsx)(nK.TextArea,{placeholder:`请输入您的需求或问题`,rows:3,style:{borderRadius:10}})})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,display:`flex`,gap:12},children:[(0,$.jsx)(vD,{size:`large`,onClick:()=>{H(!1),U.resetFields()},style:{borderRadius:10,flex:1},children:`取消`}),(0,$.jsx)(vD,{type:`primary`,size:`large`,onClick:ce,loading:ne,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,flex:1},children:`提交`})]})]})})]})},dte=`http://localhost:8000/api`,fte=()=>{let{checkAuth:e}=$7(),[t,n]=(0,S.useState)(!1),[r,i]=(0,S.useState)(`password`),[a,o]=(0,S.useState)(`password`),[s,c]=(0,S.useState)(0),[l,u]=(0,S.useState)(0),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(!1),[_,v]=(0,S.useState)(!1),[y,b]=(0,S.useState)(0),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),E=(()=>{try{let e=localStorage.getItem(`siteInfo`);if(e){let t=JSON.parse(e);return{siteName:t.siteName||`VideoGen.AI`,siteLogo:t.siteLogo||``}}}catch{}return{siteName:`VideoGen.AI`,siteLogo:``}})(),[D,O]=(0,S.useState)(E.siteName),[k,A]=(0,S.useState)(E.siteLogo),[j,M]=(0,S.useState)(``),[N,P]=(0,S.useState)(``),F=Je(),{login:I}=$7(),[L]=xW.useForm(),[R]=xW.useForm(),[z]=xW.useForm();(0,S.useEffect)(()=>{q5().then(e=>{O(e.siteName),A(e.siteLogo),M(e.userAgreementUrl),P(e.privacyPolicyUrl)}).catch(()=>{})},[]);let B=()=>d?!0:(Z.warning(`请先阅读并同意用户协议和隐私政策`),!1),V=async()=>{if(B())try{let t=await L.validateFields();await I(t.phone,t.password,void 0,t.rememberMe),Z.success(`登录成功,欢迎回来`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}},H=async()=>{if(B())try{let t=R.getFieldsValue();if(!t.phone||!t.code){Z.error(`请填写手机号和验证码`);return}n(!0),await j5(t.phone,t.code),Z.success(`登录成功,欢迎回来`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}finally{n(!1)}},U=async()=>{if(B())try{let t=await z.validateFields();n(!0),await M5(t.phone,t.regCode,t.password),Z.success(`注册成功`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`注册失败`;Z.error(t)}finally{n(!1)}},ee=(e,t)=>{e(60);let n=setInterval(()=>{e(e=>e<=1?(clearInterval(n),m(!1),t?C(!0):T(!0),0):e-1)},1e3)};(0,S.useEffect)(()=>{s===0&&r===`phone`&&v(!1)},[s,r]);let te=async(e,t)=>{try{if(!e||!/^1\d{10}$/.test(e)){Z.error(`请输入正确的手机号`);return}if(t){m(!0),g(!1);return}if(!_){m(!0),v(!1);return}let n=``;n=r===`register`?`register`:`login`,await X5(e,n),ee(t?u:c),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(g(!1),u(0)):(v(!1),c(0)),b(e=>e+1)}},ne=async(e=!1)=>{let t=r===`register`?z.getFieldValue(`phone`):R.getFieldValue(`phone`);try{let e=``;e=r===`register`?`register`:`login`,await X5(t,e),r===`register`?(g(!0),ee(u,!0)):(v(!0),ee(c,!1)),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(g(!1),u(0),C(!0)):(v(!1),c(0),T(!0)),b(e=>e+1)}},W=e=>{o(e),i(e),c(0),u(0),v(!1),g(!1),m(!1),C(!1),T(!1),b(e=>e+1),e===`password`?L.resetFields():R.resetFields()},re=[{icon:(0,$.jsx)(U2,{}),title:`AI 智能优化`,desc:`输入原始提示词,AI 自动为您生成专业级视频、图片描述`},{icon:(0,$.jsx)(S6,{}),title:`一键生成视频、图片`,desc:`支持多种规格生成视频、图片`},{icon:(0,$.jsx)(g3,{}),title:`项目维度管理`,desc:`按项目行业分类视频、图片,支持多种行业`}],G={background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,height:48,borderRadius:10,fontSize:14},K=e=>{e&&window.open(`${dte.replace(/\/api$/,``)}${e}`,`_blank`)};return(0,$.jsxs)(`div`,{style:{minHeight:`100vh`,display:`flex`,backgroundImage:`url(/backimage.png)`,backgroundSize:`cover`,backgroundPosition:`center`,backgroundRepeat:`no-repeat`,backgroundAttachment:`fixed`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(135deg, rgba(240,244,255,0.9) 0%, rgba(232,236,248,0.85) 40%, rgba(240,240,255,0.9) 70%, rgba(248,249,255,0.95) 100%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,width:500,height:500,borderRadius:`50%`,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,top:-150,right:-100,filter:`blur(40px)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,width:400,height:400,borderRadius:`50%`,background:`radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%)`,bottom:-100,left:-80,filter:`blur(50px)`}}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`center`,padding:`0 80px`,zIndex:1},children:(0,$.jsxs)(DU,{direction:`vertical`,size:36,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:20},children:[k?(0,$.jsx)(`img`,{src:k,alt:`logo`,style:{width:52,height:52,borderRadius:14,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:(0,$.jsx)(j8,{style:{fontSize:26,color:`#fff`}})}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:28,fontWeight:800,letterSpacing:-.5},children:D})]}),(0,$.jsx)(`div`,{className:`shiny-text-container`,children:(0,$.jsx)(`span`,{className:`shiny-text`,children:`AI赋能创意,素材触手可及`})}),(0,$.jsxs)(Q.Paragraph,{style:{color:`#64748b`,fontSize:17,maxWidth:480,lineHeight:1.8},children:[`专业的 AI 素材生成平台,通过智能提示词优化,`,(0,$.jsx)(`br`,{}),`让您的创意快速转化为精美视频、图片`]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:20},children:re.map((e,t)=>(0,$.jsxs)(`div`,{className:`electric-border-card`,style:{position:`relative`,display:`flex`,gap:16,alignItems:`flex-start`,padding:`18px 22px`,borderRadius:14,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(12px)`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{className:`electric-border`}),(0,$.jsx)(`div`,{className:`electric-border-inner`}),(0,$.jsx)(`div`,{style:{position:`relative`,zIndex:1},children:(0,$.jsx)(`div`,{style:{width:44,height:44,borderRadius:12,flexShrink:0,background:`linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15))`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#6366f1`,fontSize:20},children:e.icon})}),(0,$.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,$.jsx)(Q.Text,{style:{color:`#1e293b`,fontSize:15,fontWeight:600,display:`block`,marginBottom:4},children:e.title}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13,lineHeight:1.6},children:e.desc})]})]},t))})]})}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1,padding:`40px 24px`},children:(0,$.jsxs)(Oz,{style:{width:440,maxWidth:`100%`,borderRadius:20,boxShadow:`0 20px 60px rgba(0,0,0,0.08)`,border:`1px solid #e2e8f0`,background:`#fff`},styles:{body:{padding:`36px 28px`}},children:[(0,$.jsx)(Q.Title,{level:3,style:{textAlign:`center`,marginBottom:6,color:`#1e293b`,fontWeight:700},children:r===`register`?`创建账号`:`欢迎回来`}),(0,$.jsx)(Q.Text,{style:{display:`block`,textAlign:`center`,marginBottom:28,color:`#94a3b8`,fontSize:14},children:r===`register`?`注册新账号,开始创作视频`:`登录您的账号,开始创作视频`}),r!==`register`&&(0,$.jsx)(`div`,{style:{display:`flex`,gap:0,marginBottom:24,background:`#f1f5f9`,borderRadius:10,padding:4,border:`1px solid #e2e8f0`},children:[`password`,`phone`].map(e=>(0,$.jsx)(`div`,{onClick:()=>W(e),style:{flex:1,textAlign:`center`,padding:`10px 0`,borderRadius:8,cursor:`pointer`,fontSize:14,fontWeight:a===e?600:400,color:a===e?`#6366f1`:`#64748b`,background:a===e?`#fff`:`transparent`,border:a===e?`1px solid rgba(99,102,241,0.2)`:`1px solid transparent`,boxShadow:a===e?`0 2px 8px rgba(99,102,241,0.1)`:`none`,transition:`all 0.3s ease`},children:e===`password`?`密码登录`:`验证码登录`},e))}),r===`password`&&(0,$.jsxs)(xW,{form:L,size:`large`,layout:`vertical`,onFinish:V,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,style:G})}),(0,$.jsx)(xW.Item,{name:`password`,rules:[{required:!0,message:`请输入密码`}],children:(0,$.jsx)(nK.Password,{prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入密码`,style:G})}),(0,$.jsx)(xW.Item,{name:`rememberMe`,valuePropName:`checked`,style:{marginBottom:12},children:(0,$.jsx)(aV,{children:`记住我的登录状态`})}),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,htmlType:`submit`,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登 录`})})]}),r===`phone`&&(0,$.jsxs)(xW,{form:R,size:`large`,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:G})}),(0,$.jsx)(xW.Item,{name:`code`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(DU.Compact,{style:{width:`100%`},children:[(0,$.jsx)(nK,{prefix:(0,$.jsx)(B6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!_,style:{...G,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(vD,{disabled:s>0,onClick:()=>{w?(v(!1),m(!0),b(e=>e+1)):te(R.getFieldValue(`phone`))},style:{height:48,borderRadius:`0 10px 10px 0`,background:s>0||_?`#f1f5f9`:`rgba(99,102,241,0.1)`,border:`1.5px solid #e2e8f0`,borderLeft:`none`,color:s>0?`#94a3b8`:`#6366f1`,fontWeight:600,minWidth:100},children:s>0?`${s}s`:w?`重新发送`:`获取验证码`})]})}),p&&(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(r9,{onSuccess:ne,isVerified:_})},y),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,onClick:H,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登 录`})})]}),r===`register`&&(0,$.jsxs)(xW,{form:z,size:`large`,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:G})}),(0,$.jsx)(xW.Item,{name:`regCode`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(DU.Compact,{style:{width:`100%`},children:[(0,$.jsx)(nK,{prefix:(0,$.jsx)(B6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!h,style:{...G,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(vD,{disabled:l>0,onClick:()=>{x?(g(!1),m(!0),b(e=>e+1)):te(z.getFieldValue(`phone`),!0)},style:{height:48,borderRadius:`0 10px 10px 0`,background:l>0||h?`#f1f5f9`:`rgba(99,102,241,0.1)`,border:`1.5px solid #e2e8f0`,borderLeft:`none`,color:l>0?`#94a3b8`:`#6366f1`,fontWeight:600,minWidth:100},children:l>0?`${l}s`:x?`重新发送`:`获取验证码`})]})}),p&&(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(r9,{onSuccess:ne,isVerified:h})},y),(0,$.jsx)(xW.Item,{name:`password`,rules:[{required:!0,message:`请设置密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(nK.Password,{prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请设置密码(至少6位)`,style:G})}),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,onClick:U,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`注 册`})})]}),(0,$.jsx)(`div`,{style:{marginBottom:16},children:(0,$.jsx)(aV,{checked:d,onChange:e=>f(e.target.checked),children:(0,$.jsxs)(`span`,{style:{fontSize:13,color:`#64748b`},children:[`我已阅读并同意`,(0,$.jsx)(`span`,{onClick:e=>{e.stopPropagation(),K(j)},style:{color:`#6366f1`,cursor:`pointer`},children:`《用户协议》`}),`和`,(0,$.jsx)(`span`,{onClick:e=>{e.stopPropagation(),K(N)},style:{color:`#6366f1`,cursor:`pointer`},children:`《隐私政策》`})]})})}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:r===`register`?(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#6366f1`,cursor:`pointer`},onClick:()=>{i(`password`),o(`password`),C(!1),T(!1),g(!1),m(!1),b(e=>e+1),z.resetFields()},children:`已有账号?去登录`}):(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#6366f1`,cursor:`pointer`},onClick:()=>{i(`register`),C(!1),T(!1),g(!1),m(!1),b(e=>e+1)},children:`没有账号?立即注册`})})]})})]})},r9=({onSuccess:e,isVerified:t})=>{let n=S.useRef(null),r=S.useRef(null),i=S.useRef(null),a=S.useRef(0),o=S.useRef(!1),[s,c]=S.useState(360),l=s-50;S.useEffect(()=>{let e=()=>{if(n.current){let e=n.current.offsetWidth;e>0&&c(e)}};e();let t=new ResizeObserver(e);return n.current&&t.observe(n.current),window.addEventListener(`resize`,e),()=>{t.disconnect(),window.removeEventListener(`resize`,e)}},[]);let u=n=>{if(o.current||t)return;let c=Math.max(0,Math.min(n,l));a.current=c,r.current&&(r.current.style.left=`${c}px`),i.current&&(i.current.style.width=`${c+50}px`),c>=l-5&&(o.current=!0,r.current&&(r.current.style.background=`#22c55e`,r.current.innerHTML=``),i.current&&(i.current.style.width=`${s}px`,i.current.style.background=`#dcfce7`),e())};return(0,$.jsxs)(`div`,{ref:n,onMouseDown:e=>{if(e.preventDefault(),o.current||t)return;let s=n.current;if(!s)return;let c=s.getBoundingClientRect(),d=e=>{u(e.clientX-c.left-50/2)},f=()=>{document.removeEventListener(`mousemove`,d),document.removeEventListener(`mouseup`,f),!o.current&&a.current({page:1,pageSize:10,total:0,items:[]}),i9=p5((e,t)=>({projects:[],records:pte(),loading:!1,mediaType:`image`,countType:`请选择`,selectedRatio:`1:1`,selectedResolution:`2K`,width:2048,height:2048,videoDuration:5,videoAspectRatio:`16:9`,videoResolution:`720p`,engineOptions:{ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]},enginesele:[],fetchProjects:async()=>{e({loading:!0});try{e({projects:await I5(),loading:!1})}catch{e({loading:!1})}},createProject:async(n,r)=>{let i=await L5(n,r);return e({projects:[i,...t().projects]}),i},deleteProject:async n=>{await R5(n),e({projects:t().projects.filter(e=>e.id!==n)})},fetchRecords:async(t={})=>{e({loading:!0});try{e({records:await z5(t),loading:!1})}catch{e({loading:!1})}},optimizePrompt:async(n,r)=>{let i=await B5(n,r);try{await $7.getState().checkAuth()}catch{}let a=t().records;return e({records:{...a,total:a.total+1,items:[i.record,...a.items]}}),i},generateVideo:async(n,r)=>{let i=await G5(n,r);try{await $7.getState().checkAuth()}catch{}let a=t().records;return e({records:{...a,items:a.items.map(e=>e.id===n?i:e)}}),i},updateRecordReferences:(n,r)=>{let i=t().records;e({records:{...i,items:i.items.map(e=>e.id===n?{...e,references:r}:e)}})},setMediaType:t=>e({mediaType:t}),setCountType:t=>e({countType:t}),setImageSettings:(t,n,r,i)=>e({selectedRatio:t,selectedResolution:n,width:r,height:i}),setVideoSettings:(t,n,r)=>e({videoDuration:t,videoAspectRatio:n,videoResolution:r}),setEngineOptions:t=>e({engineOptions:t}),setSelectedRatio:t=>e({selectedRatio:t}),setSelectedResolution:t=>e({selectedResolution:t}),setWidth:t=>e({width:t}),setHeight:t=>e({height:t}),setVideoDuration:t=>e({videoDuration:t}),setVideoAspectRatio:t=>e({videoAspectRatio:t}),setVideoResolution:t=>e({videoResolution:t}),setEnginesele:t=>e({enginesele:t}),resetGenerationConfig:()=>e({mediaType:`image`,countType:`请选择`,selectedRatio:`1:1`,selectedResolution:`2K`,width:2048,height:2048,videoDuration:5,videoAspectRatio:`16:9`,videoResolution:`720p`,engineOptions:{ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]},enginesele:[]})}));function a9(e){if(!e)return`-`;let t=e.trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);return n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``),t.replace(`T`,` `).slice(0,16)}var o9=[`#f97316`,`#3b82f6`,`#8b5cf6`,`#10b981`,`#eab308`,`#6366f1`,`#ef4444`,`#06b6d4`,`#64748b`,`#78716c`],s9={ShoppingCartOutlined:(0,$.jsx)(Q6,{}),BookOutlined:(0,$.jsx)(L2,{}),HomeOutlined:(0,$.jsx)(y3,{}),FireOutlined:(0,$.jsx)(Q4,{}),RocketOutlined:(0,$.jsx)(L6,{}),SkinOutlined:(0,$.jsx)(s8,{}),CompassOutlined:(0,$.jsx)(T4,{}),HeartOutlined:(0,$.jsx)(u3,{}),CarOutlined:(0,$.jsx)(Q2,{}),CameraOutlined:(0,$.jsx)(Y2,{}),CloudOutlined:(0,$.jsx)(u4,{}),StarOutlined:(0,$.jsx)(y8,{}),TrophyOutlined:(0,$.jsx)(L8,{}),ThunderboltOutlined:(0,$.jsx)(j8,{}),BulbOutlined:(0,$.jsx)(U2,{}),CoffeeOutlined:(0,$.jsx)(S4,{}),CrownOutlined:(0,$.jsx)(j4,{}),DashboardOutlined:(0,$.jsx)(P4,{}),FlagOutlined:(0,$.jsx)(t3,{}),GlobalOutlined:(0,$.jsx)(s3,{}),GiftOutlined:(0,$.jsx)(i3,{}),LaptopOutlined:(0,$.jsx)(O3,{}),MobileOutlined:(0,$.jsx)(Q3,{}),MonitorOutlined:(0,$.jsx)(t6,{}),PayCircleOutlined:(0,$.jsx)(s6,{}),PictureOutlined:(0,$.jsx)(p6,{}),PlayCircleOutlined:(0,$.jsx)(S6,{}),SafetyOutlined:(0,$.jsx)(B6,{}),ShoppingOutlined:(0,$.jsx)(t8,{}),SmileOutlined:(0,$.jsx)(u8,{}),SoundOutlined:(0,$.jsx)(g8,{}),TagOutlined:(0,$.jsx)(T8,{}),TeamOutlined:(0,$.jsx)(O8,{}),ToolOutlined:(0,$.jsx)(P8,{}),TruckOutlined:(0,$.jsx)(B8,{}),VideoCameraOutlined:(0,$.jsx)(Y8,{}),WalletOutlined:(0,$.jsx)(Q8,{}),BankOutlined:(0,$.jsx)(O2,{}),BuildOutlined:(0,$.jsx)(B2,{}),ExperimentOutlined:(0,$.jsx)(U4,{}),HighlightOutlined:(0,$.jsx)(p3,{}),IdcardOutlined:(0,$.jsx)(S3,{}),MedicineBoxOutlined:(0,$.jsx)(K3,{}),ReadOutlined:(0,$.jsx)(O6,{}),RestOutlined:(0,$.jsx)(j6,{}),SketchOutlined:(0,$.jsx)(i8,{}),SolutionOutlined:(0,$.jsx)(p8,{})},mte=()=>{let[e,t]=(0,S.useState)(!1),[n]=xW.useForm(),r=Je(),{projects:i,fetchProjects:a,createProject:o,deleteProject:s}=i9(),[c,l]=(0,S.useState)([]);(0,S.useEffect)(()=>{a(),e7().then(l).catch(()=>{})},[]);let u=Object.fromEntries(c.map((e,t)=>[e.key,{label:e.label,color:o9[t%o9.length],icon:e.icon||`AppstoreOutlined`}]));return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`22px 24px`,borderRadius:16,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-20,top:-20,width:200,height:200,borderRadius:`50%`,background:`rgba(255,255,255,0.08)`}}),(0,$.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,$.jsx)(Q.Title,{level:3,style:{margin:`0 0 4px`,color:`#fff`,fontWeight:700},children:`我的项目`}),(0,$.jsxs)(Q.Text,{style:{color:`rgba(255,255,255,0.7)`,fontSize:14},children:[`共 `,i.length,` 个项目 · 按行业分类管理`]})]}),(0,$.jsx)(vD,{icon:(0,$.jsx)(gR,{}),onClick:()=>t(!0),size:`large`,style:{background:`rgba(255,255,255,0.15)`,border:`1px solid rgba(255,255,255,0.3)`,color:`#fff`,fontWeight:600,backdropFilter:`blur(10px)`,borderRadius:10,height:42},children:`新建项目`})]}),i.length===0?(0,$.jsx)(NC,{image:NC.PRESENTED_IMAGE_SIMPLE,description:`还没有项目,创建您的第一个视频项目`,style:{padding:`60px 0`},children:(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(gR,{}),onClick:()=>t(!0),size:`large`,children:`创建第一个项目`})}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},className:`stagger-children`,children:i.map((e,t)=>(0,$.jsxs)(`div`,{className:`project-card project-item animate-slideInCard`,onClick:()=>r(`/projects/${e.id}/generate`),style:{display:`flex`,alignItems:`center`,padding:`18px 22px`,borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,animationDelay:`${t*.06}s`},children:[(0,$.jsx)(`div`,{style:{width:50,height:50,borderRadius:14,flexShrink:0,background:`${u[e.industry]?.color||`#64748b`}12`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:24,marginRight:16,color:u[e.industry]?.color||`#64748b`},children:s9[u[e.industry]?.icon]||(0,$.jsx)(u2,{})}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4,flexWrap:`wrap`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1a1a2e`},children:e.name}),(0,$.jsx)(T$,{color:u[e.industry]?.color||`#64748b`,style:{borderRadius:6,margin:0},children:u[e.industry]?.label||e.industry})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(TH,{style:{fontSize:12,color:`#94a3b8`}}),(0,$.jsxs)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:12,color:`#94a3b8`},children:[`创建于 `,a9(e.createdAt)]})]})]}),(0,$.jsxs)(`div`,{className:`project-actions`,style:{display:`flex`,alignItems:`center`,gap:8,marginLeft:16},children:[(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(S6,{}),onClick:t=>{t.stopPropagation(),r(`/projects/${e.id}/generate`)},style:{background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,borderRadius:10,fontWeight:600,height:36,boxShadow:`0 4px 12px rgba(99,102,241,0.25)`},children:`生成`}),(0,$.jsx)(Rq,{title:`确定删除该项目?`,description:`项目下的生成记录将一并删除`,onConfirm:async t=>{t?.stopPropagation(),await s(e.id),Z.success(`项目已删除`)},onCancel:e=>e?.stopPropagation(),children:(0,$.jsx)(vD,{danger:!0,icon:(0,$.jsx)(O$,{}),onClick:e=>e.stopPropagation(),style:{borderRadius:10,height:36,background:`rgba(239,68,68,0.06)`,border:`1px solid rgba(239,68,68,0.15)`,color:`#ef4444`}})}),(0,$.jsx)(Ug,{className:`mobile-hide`,style:{color:`#cbd5e1`,fontSize:12}})]})]},e.id))}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(u2,{}),`新建项目`]}),open:e,onOk:async()=>{try{let e=await n.validateFields(),i=await o(e.name,e.industry);Z.success(`项目创建成功`),t(!1),n.resetFields(),r(`/projects/${i.id}/generate`)}catch{}},onCancel:()=>{t(!1),n.resetFields()},okText:`创建`,cancelText:`取消`,width:480,children:(0,$.jsxs)(xW,{form:n,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(xW.Item,{name:`name`,label:`项目名称`,rules:[{required:!0,message:`请输入项目名称`}],children:(0,$.jsx)(nK,{placeholder:`例如:618电商大促宣传片`,prefix:(0,$.jsx)(xZ,{}),size:`large`})}),(0,$.jsx)(xW.Item,{name:`industry`,label:`所属行业`,rules:[{required:!0,message:`请选择行业`}],children:(0,$.jsx)(lw,{placeholder:`选择项目所属行业`,size:`large`,children:c.map((e,t)=>(0,$.jsx)(lw.Option,{value:e.key,children:(0,$.jsxs)(DU,{children:[s9[e.icon]||(0,$.jsx)(u2,{}),` `,e.label]})},e.key))})})]})})]})};function hte(){if(typeof crypto<`u`&&typeof crypto.randomUUID==`function`)return crypto.randomUUID();if(typeof crypto<`u`&&typeof crypto.getRandomValues==`function`){let e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}return`${Date.now().toString(16).padStart(12,`0`)}-${Math.random().toString(16).slice(2,10).padStart(8,`0`)}-4xxx-yxxx-${Math.random().toString(16).slice(2,12)}`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}var c9=({src:e,width:t=48,height:n=48})=>{let[r,i]=(0,S.useState)(null),[a,o]=(0,S.useState)(null);return(0,S.useEffect)(()=>{let r=document.createElement(`video`);r.muted=!0,r.preload=`metadata`,r.crossOrigin=`anonymous`;let a=()=>{o(r.duration),r.currentTime=Math.min(1,r.duration*.1)},s=()=>{try{let e=document.createElement(`canvas`);e.width=t*2,e.height=n*2;let a=e.getContext(`2d`);a&&(a.drawImage(r,0,0,e.width,e.height),i(e.toDataURL(`image/jpeg`,.7)))}catch{}};return r.addEventListener(`loadedmetadata`,a),r.addEventListener(`seeked`,s),r.src=e,()=>{r.removeEventListener(`loadedmetadata`,a),r.removeEventListener(`seeked`,s)}},[e,t,n]),(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`,background:`#1a1a2e`},children:[r?(0,$.jsx)(`img`,{src:r,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(S6,{style:{color:`#fff`,fontSize:18}})}),a!=null&&(0,$.jsx)(`span`,{style:{position:`absolute`,bottom:2,right:2,fontSize:9,color:`#fff`,background:`rgba(0,0,0,0.6)`,borderRadius:4,padding:`1px 4px`,lineHeight:1.3},children:(e=>`${Math.round(e)}s`)(a)})]})},gte=()=>{let{projectId:e}=Qe(),t=Je(),[n]=xW.useForm(),{projects:r,records:i,fetchProjects:a,fetchRecords:o,optimizePrompt:s,generateVideo:c}=i9(),l=i.items,{user:u}=$7(),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(null),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(!1),[x,C]=(0,S.useState)({}),[w,T]=(0,S.useState)({}),[E,D]=(0,S.useState)({}),[O,k]=(0,S.useState)(null),[A,j]=(0,S.useState)(null),[M,N]=(0,S.useState)([]),[P,F]=(0,S.useState)(!1),[I,L]=(0,S.useState)(``),[R,z]=(0,S.useState)(!1),[B,V]=(0,S.useState)(``),H=(0,S.useRef)(null),[U,ee]=(0,S.useState)({}),[te,ne]=(0,S.useState)({}),[W,re]=(0,S.useState)({}),[G,K]=(0,S.useState)(null),[q,ie]=(0,S.useState)({}),[J,ae]=(0,S.useState)(null),[oe,se]=(0,S.useState)(5),[ce,le]=(0,S.useState)(`16:9`),[ue,de]=(0,S.useState)(`720p`),[fe,pe]=(0,S.useState)(null),[me,he]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`720p`,`1080p`],durations:[5,8,10,12,15]}),[ge,_e]=(0,S.useState)(0),[ve,ye]=(0,S.useState)(0),[be,xe]=(0,S.useState)(`image`),[Se,Ce]=(0,S.useState)(`1:1`),[we,Te]=(0,S.useState)(`2K`),[Ee,De]=(0,S.useState)(2048),[Oe,ke]=(0,S.useState)(2048),[Ae,je]=(0,S.useState)(!1),[Me,Ne]=(0,S.useState)([]),[Pe,Fe]=(0,S.useState)([]);(0,S.useEffect)(()=>{if(c7().then(e=>{Ne(e.video),Fe(e.image)}),!Ae)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&je(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[Ae]);let Ie=(e,t)=>{for(let n=0;n{let t=e===`2k`?`2048`:e===`4k`?`4096`:e;for(let e=0;e{qe(e)},ze=e=>{Xe(parseInt(e))},[Be,Ve]=(0,S.useState)([]),[He,Ue]=(0,S.useState)([]),[We,Ge]=(0,S.useState)([]),[Ke,qe]=(0,S.useState)(0),[Ye,Xe]=(0,S.useState)(0);(0,S.useEffect)(()=>{We[Ye]&&We[Ye][Ke]!==void 0&&(De(We[Ye][Ke].substring(0,4)),ke(We[Ye][Ke].substring(5)))},[Ke]),(0,S.useEffect)(()=>{We[Ye]&&We[Ye][Ke]!==void 0&&(De(We[Ye][Ke].substring(0,4)),ke(We[Ye][Ke].substring(5)))},[Ye]);let Ze=()=>{De(Oe),ke(Ee)},$e=e=>{xe(e.target.value===`image`?`image`:`video`)};(0,S.useEffect)(()=>{e7().then(e=>{ee(Object.fromEntries(e.map(e=>[e.key,e.label]))),ne(Object.fromEntries(e.map(e=>[e.key,e.optionGroups||[]])))}).catch(()=>{}),Y5().then(e=>{let t=e.items?.[0]?.supportedSizes||{},n=[],r=[],i=[];for(let e in t[`2K`])n.push(e),r.push(t[`2K`][e]);n.forEach((e,t)=>{Ve(n=>[...n,{value:e,label:String(t)}])});for(let e in t[`4K`])i.push(t[`4K`][e]);Ge([r,i]);let a=[];for(let e in t)a.push(e);a.forEach((e,t)=>{Ue(n=>[...n,{value:e,label:String(t)}])})}).catch(()=>{}),J5().then(e=>{if(e.items?.length){let t=e.items[0];he({ratios:t.supportedRatios?.length?t.supportedRatios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions?.length?t.supportedResolutions:[`720p`,`1080p`],durations:t.supportedDurations?.length?t.supportedDurations:[5,8,10,12,15]})}}).catch(()=>{})},[]),(0,S.useEffect)(()=>{a(),o({projectId:e,page:1,pageSize:100})},[e,a,o]);let et=(0,S.useRef)(!1);(0,S.useEffect)(()=>{et.current||l.length===0||(et.current=!0,console.log(`aaaa`,l),l.forEach(t=>{t.projectId===e&&t.status===`generating`&&(T(e=>({...e,[t.id]:`generating`})),Dt(t.id)),t.projectId===e&&t.status===`optimizing`&&ct(t.id)}))},[l,e]);let tt=(0,S.useRef)(new Set),nt=(0,S.useRef)(null),rt=(0,S.useRef)(null),it=e=>{tt.current.add(e),st()},at=e=>{tt.current.delete(e),tt.current.size===0&&ot()},ot=()=>{nt.current&&=(clearInterval(nt.current),null),rt.current&&=(rt.current.abort(),null)},st=()=>{nt.current||=setInterval(async()=>{try{rt.current&&rt.current.abort();let t=new AbortController;rt.current=t;let n=await z5({projectId:e,page:1,pageSize:100,signal:t.signal});rt.current=null;let r=Array.from(tt.current),i=[];if(r.length>0){let e=i9.getState().records,t=e.items.map(e=>{if(r.includes(e.id)){let t=n.items.find(t=>t.id===e.id);if(t)return t.status!==`optimizing`&&i.push(e.id),t}return e});i9.setState({records:{...e,items:t}}),i.forEach(e=>{at(e)})}}catch(e){e.name!==`AbortError`&&console.error(`Optimizing polling error:`,e)}},3e3)},ct=e=>{it(e)},lt=(0,S.useRef)(!1),ut=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(lt.current||l.length===0)return;let t=localStorage.getItem(`pending_optimize`);if(t)try{let{key:n,projectId:r,prompt:i,duration:a,ts:o}=JSON.parse(t);if(Date.now()-o>300*1e3||r!==e){localStorage.removeItem(`pending_optimize`);return}if(ut.current===n)return;let s=l.find(e=>e.projectId===r&&e.originalPrompt===i&&e.duration===a&&e.status===`prompt_optimized`&&new Date(e.createdAt).getTime()>o-1e4);s?(lt.current=!0,localStorage.removeItem(`pending_optimize`),g(s),v(s.optimizedPrompt||``),_e(s.textCreditsCost),ye(s.textTokensUsed),m(!0),Z.success({content:`优化请求已恢复,消耗 ${s.textCreditsCost} 积分`,key:`recovery`})):Date.now()-o>3e4&&localStorage.removeItem(`pending_optimize`)}catch{localStorage.removeItem(`pending_optimize`)}},[l,e]);let dt=r.find(t=>t.id===e),ft=l.filter(t=>t.projectId===e),pt=dt?.name??`项目`,mt=dt&&te[dt.industry]||[],ht=u?.credits??0,gt=e=>{let t=e===`2k`?`2048`:e===`4k`?`4096`:e;for(let e=0;e=_t,yt=async()=>{try{if(!e){Z.error(`项目ID为空,请先选择项目`);return}let t=await n.validateFields();if(!t.prompt||!t.prompt.trim()){Z.error(`请输入视频/图片描述`);return}f(!0);let r=Object.entries(W).map(([e,t])=>`@${e}:${t}`),i=r.length>0?`${t.prompt}\n\n${r.join(`;`)}`:t.prompt,a=hte();localStorage.setItem(`pending_optimize`,JSON.stringify({key:a,projectId:e,prompt:i,duration:oe,ts:Date.now()})),ut.current=a;let o=await s(e,{prompt:i,duration:oe,genType:be,resolution:we,references:M.length>0?M:void 0,idempotencyKey:a,image_size:we,image_proportion:Se,image_px:Ee+`x`+Oe});localStorage.removeItem(`pending_optimize`),ut.current=null,g(o.record),v(o.record.optimizedPrompt||``),_e(o.textCreditsCost),ye(o.textTokensUsed),m(!0),Z.success({content:`「${pt}」提示词优化完成,消耗 ${o.textCreditsCost} 积分`,key:`optimize`})}catch(e){console.error(`优化提示词失败:`,e);let t=e?.response?.data?.message||e?.message||`操作失败,请稍后重试`;Z.error(t)}finally{f(!1),localStorage.removeItem(`pending_optimize`),ut.current=null}},bt=(0,S.useRef)(new Set),xt=(0,S.useRef)(null),St=(0,S.useRef)(null),Ct=e=>{bt.current.add(e),Et()},wt=e=>{bt.current.delete(e),bt.current.size===0&&Tt()},Tt=()=>{xt.current&&=(clearInterval(xt.current),null),St.current&&=(St.current.abort(),null)},Et=()=>{xt.current||=setInterval(async()=>{try{St.current&&St.current.abort();let t=new AbortController;St.current=t;let n=await z5({projectId:e,page:1,pageSize:100,signal:t.signal});St.current=null;let r=Array.from(bt.current),i=[];if(r.length>0){let e=i9.getState().records,t=e.items.map(e=>{if(r.includes(e.id)){let t=n.items.find(t=>t.id===e.id);if(t)return t.status!==`generating`&&i.push(e.id),t}return e});i9.setState({records:{...e,items:t}}),i.forEach(e=>{let t=n.items.find(t=>t.id===e);wt(e),t?.status===`completed`?(T(t=>({...t,[e]:`done`})),g(n=>n?.id===e?t:n),Z.success({content:`「${pt}」视频生成完成!`,key:e,duration:5})):t?.status===`failed`&&(T(t=>({...t,[e]:`failed`})),g(n=>n?.id===e?t:n),Z.error({content:`「${pt}」视频生成失败: ${t.errorMessage||`未知错误`}`,key:e,duration:5}))})}}catch(e){e.name!==`AbortError`&&console.error(`Global polling error:`,e)}},5e3)},Dt=e=>{Ct(e)};(0,S.useEffect)(()=>()=>{Tt(),ot()},[]);let Ot=async e=>{if(!vt){Z.error(`积分不足,请先充值`);return}C(t=>({...t,[e]:!0})),T(t=>({...t,[e]:`generating`})),Z.loading({content:`「${pt}」正在提交视频生成...`,duration:0,key:e});try{(await c(e,{aspectRatio:ce,resolution:ue})).status===`failed`?(T(t=>({...t,[e]:`failed`})),Z.error({content:`「${pt}」提交失败`,key:e,duration:3})):(Z.success({content:`「${pt}」已提交,正在生成中...`,key:e,duration:3}),Dt(e))}catch(t){T(t=>({...t,[e]:`failed`}));let n=`提交失败`;t?.response?.data?.detail?n=t.response.data.detail:t?.data?.detail?n=t.data.detail:t?.detail?n=t.detail:t?.message&&(n=t.message),Z.error({content:`${n}`,key:e,duration:3})}finally{C(t=>({...t,[e]:!1}))}},kt=async e=>{let t=ft.find(t=>t.id===e);if(t){C(t=>({...t,[e]:!0})),T(t=>({...t,[e]:`generating`})),Z.loading({content:`「${pt}」正在重新提交...`,duration:0,key:e});try{let n=E[e];n&&n!==t.optimizedPrompt&&await W5(e,n);let r=await c(e,{aspectRatio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`});console.log(`重新提交视频生成结果:`,r),r.status===`failed`?(T(t=>({...t,[e]:`failed`})),console.log(`12312`),Z.error({content:`「${pt}」提交失败`,key:e,duration:3})):(Z.success({content:`「${pt}」已提交,正在生成中...`,key:e,duration:3}),Dt(e))}catch(t){T(t=>({...t,[e]:`failed`})),console.log(`1231`,t);let n=`提交失败`;t?.response?.data?.detail?n=t.response.data.detail:t?.data?.detail?n=t.data.detail:t?.detail?n=t.detail:t?.message&&(n=t.message),Z.error({content:`${n}`,key:e,duration:3})}finally{C(t=>({...t,[e]:!1}))}}},At=e=>{let t=w[e.id];return t===`generating`?`generating`:t===`done`?`completed`:t===`failed`?`failed`:e.status},jt={optimizing:{color:`processing`,text:`优化中`,icon:(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,$.jsx)(OH,{})},generating:{color:`warning`,text:`生成中`,icon:(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}})},completed:{color:`success`,text:`已完成`,icon:(0,$.jsx)(i4,{})},failed:{color:`error`,text:`失败`,icon:(0,$.jsx)(s4,{})}},Mt=({label:e,value:t,options:n,suffix:r,expanded:i,onToggle:a,onSelect:o,onClose:s})=>{let c=(0,S.useRef)(null),l=(0,S.useRef)(null),u=(0,S.useRef)(i),[d,f]=(0,S.useState)(null);return u.current=i,(0,S.useEffect)(()=>{if(i&&c.current){let e=c.current.getBoundingClientRect();f({bottom:window.innerHeight-e.top+4,left:e.left,width:Math.max(e.width,100)})}else f(null)},[i]),(0,S.useEffect)(()=>{if(!i)return;let e=e=>{c.current?.contains(e.target)||l.current?.contains(e.target)||u.current&&s()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[i,s]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{ref:c,onClick:a,translate:`no`,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,cursor:`pointer`,userSelect:`none`,transition:`background 0.2s, border-color 0.2s`,background:i?`rgba(99,102,241,0.08)`:`#f8f9fc`,border:i?`1px solid #6366f1`:`1px solid #e2e8f0`,minWidth:70,whiteSpace:`nowrap`,flexShrink:0},children:[(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#6366f1`,fontWeight:500,lineHeight:`18px`},children:[t,r]}),(0,$.jsx)(wQ,{style:{fontSize:9,color:`#94a3b8`,transition:`transform 0.2s`,transform:i?`rotate(180deg)`:`rotate(0deg)`}})]}),d&&(0,zi.createPortal)((0,$.jsxs)(`div`,{ref:l,style:{position:`fixed`,bottom:d.bottom,left:d.left,minWidth:d.width,background:`#fff`,borderRadius:12,padding:6,zIndex:99999,boxShadow:`0 8px 30px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:10,color:`#94a3b8`,display:`block`,padding:`2px 6px 4px`},children:e}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:n.map((e,n)=>{let r=t===e;return(0,$.jsx)(`div`,{onClick:()=>{o(e),s()},style:{padding:`6px 10px`,borderRadius:8,fontSize:13,cursor:`pointer`,transition:`all 0.15s`,background:r?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`transparent`,color:r?`#fff`:`#1a1a2e`,fontWeight:r?600:400},onMouseEnter:e=>{r||(e.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:e},n)})})]}),document.body)]})},Nt=({group:e,selected:t,expanded:n,onToggle:r,onSelect:i,onClose:a})=>{let o=(0,S.useRef)(null),s=(0,S.useRef)(null),c=(0,S.useRef)(n),[l,u]=(0,S.useState)(null);return c.current=n,(0,S.useEffect)(()=>{if(n&&o.current){let e=o.current.getBoundingClientRect();u({bottom:window.innerHeight-e.top+4,left:e.left})}else u(null)},[n]),(0,S.useEffect)(()=>{if(!n)return;let e=e=>{o.current?.contains(e.target)||s.current?.contains(e.target)||c.current&&a()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[n,a]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{ref:o,onClick:r,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,cursor:`pointer`,userSelect:`none`,transition:`all 0.2s`,background:t?`rgba(99,102,241,0.08)`:`#f8f9fc`,border:n?`1px solid #6366f1`:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:t?`#6366f1`:`#64748b`,fontWeight:t?600:400},children:t||e.name}),(0,$.jsx)(wQ,{style:{fontSize:9,color:t?`#6366f1`:`#94a3b8`,transition:`transform 0.2s`,transform:n?`rotate(180deg)`:`rotate(0deg)`}})]}),l&&(0,zi.createPortal)((0,$.jsxs)(`div`,{ref:s,style:{position:`fixed`,bottom:l.bottom,left:l.left,background:`#fff`,borderRadius:12,padding:8,minWidth:160,zIndex:99999,boxShadow:`0 8px 30px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:10,color:`#94a3b8`,display:`block`,padding:`2px 6px 4px`},children:e.name}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:e.options.map((e,n)=>{let r=t===e;return(0,$.jsx)(`div`,{onClick:()=>{i(e),a()},style:{padding:`6px 10px`,borderRadius:8,fontSize:13,cursor:`pointer`,transition:`all 0.15s`,background:r?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`transparent`,color:r?`#fff`:`#1a1a2e`,fontWeight:r?600:400},onMouseEnter:e=>{r||(e.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:e},n)})})]}),document.body)]})};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`gen-header animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`20px 28px`,borderRadius:16,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 100%)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-30,bottom:-30,width:160,height:160,borderRadius:`50%`,background:`rgba(255,255,255,0.05)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,position:`relative`},children:[(0,$.jsx)(vD,{icon:(0,$.jsx)(g2,{}),onClick:()=>t(`/projects`),style:{background:`rgba(255,255,255,0.1)`,border:`1px solid rgba(255,255,255,0.2)`,color:`#fff`,borderRadius:10}}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0,color:`#fff`,fontWeight:700},children:pt}),dt&&(0,$.jsx)(T$,{style:{background:`rgba(255,255,255,0.12)`,border:`1px solid rgba(255,255,255,0.2)`,color:`rgba(255,255,255,0.8)`,borderRadius:6},children:U[dt.industry]||dt.industry})]}),(0,$.jsx)(Q.Text,{style:{color:`rgba(255,255,255,0.5)`,fontSize:13},children:`描述视频 → AI优化 → 生成视频`})]})]}),(0,$.jsxs)(T$,{style:{background:`rgba(255,255,255,0.1)`,border:`1px solid rgba(255,255,255,0.2)`,color:`#fff`,borderRadius:20,fontSize:13,padding:`4px 14px`},children:[`剩余 `,ht,` 积分`]})]}),!p&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{className:`animate-fadeInUp`,style:{marginBottom:24,padding:`16px 20px`,borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,boxShadow:`0 2px 12px rgba(0,0,0,0.03)`},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{marginRight:70,position:`relative`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,fontWeight:500,color:`#475569`,marginRight:16},children:`生成类型:`}),(0,$.jsxs)(LL.Group,{defaultValue:`image`,buttonStyle:`solid`,onChange:$e,children:[(0,$.jsxs)(LL.Button,{value:`image`,style:{zIndex:0},children:[(0,$.jsx)(p6,{style:{marginRight:6,fontSize:14}}),` `,`图片`]}),(0,$.jsxs)(LL.Button,{value:`video`,children:[(0,$.jsx)(Y8,{style:{marginRight:6,fontSize:14}}),` `,`视频`]})]})]}),be===`video`&&[{icon:(0,$.jsx)(j$,{}),label:`描述视频+时长`,color:`#6366f1`},{icon:(0,$.jsx)(j8,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(L6,{}),label:`选择参数生成`,color:`#10b981`}].map((e,t)=>(0,$.jsxs)(S.Fragment,{children:[t>0&&(0,$.jsx)(`div`,{style:{width:40,height:1,background:`linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0)`,margin:`0 12px`,flexShrink:0}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:10,background:`${e.color}12`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:e.color,fontSize:15},children:e.icon})}),(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:500,color:`#1a1a2e`},children:e.label})]})]},t)),be===`image`&&[{icon:(0,$.jsx)(j$,{}),label:`描述图片+尺寸`,color:`#6366f1`},{icon:(0,$.jsx)(j8,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(L6,{}),label:`图片生成`,color:`#10b981`}].map((e,t)=>(0,$.jsxs)(S.Fragment,{children:[t>0&&(0,$.jsx)(`div`,{style:{width:40,height:1,background:`linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0)`,margin:`0 12px`,flexShrink:0}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:10,background:`${e.color}12`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:e.color,fontSize:15},children:e.icon})}),(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:500,color:`#1a1a2e`},children:e.label})]})]},t))]})}),(0,$.jsxs)(xW,{form:n,initialValues:{},children:[(0,$.jsx)(xW.Item,{name:`prompt`,noStyle:!0,rules:[{required:!0,message:`请输入视频描述`}],style:{display:`none`}}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:20,background:`#fff`,border:`1px solid #f0f0f5`,boxShadow:`0 4px 24px rgba(0,0,0,0.04)`,overflow:`visible`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`12px 16px 0`,minHeight:60},children:[M.map((e,t)=>(0,$.jsxs)(`div`,{className:`ref-thumb`,style:{position:`relative`,width:48,height:48,borderRadius:12,overflow:`visible`,flexShrink:0},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,overflow:`hidden`,border:`1px solid #e2e8f0`,cursor:`pointer`},onClick:()=>{e.type===`video`&&ae(`http://ceshi.apiforeign.minzhong.cn${e.url}`)},children:e.type===`image`?(0,$.jsx)(xG,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(c9,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`})}),(0,$.jsx)(`div`,{className:`ref-delete`,onClick:n=>{n.stopPropagation(),U5(e.url).catch(()=>{}),N(e=>e.filter((e,n)=>n!==t))},style:{position:`absolute`,top:-4,right:-4,width:16,height:16,borderRadius:`50%`,background:`rgba(0,0,0,0.55)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,opacity:0,transition:`opacity 0.15s`,backdropFilter:`blur(4px)`},children:(0,$.jsx)(s4,{style:{color:`#fff`,fontSize:10}})})]},t)),(0,$.jsx)(y0,{accept:`image/*,video/*`,showUploadList:!1,multiple:!0,beforeUpload:e=>{let t=e.type.startsWith(`image/`),n=e.type.startsWith(`video/`);if(!t&&!n)return Z.error(`仅支持图片或视频文件`),!1;let r=n?100:10;if(e.size/1024/1024>r)return Z.error(`${n?`视频`:`图片`}大小不能超过${r}MB`),!1;let i=M.filter(e=>e.type===`image`).length,a=M.filter(e=>e.type===`video`).length;return t&&i>=10?(Z.error(`最多上传10张图片`),!1):n&&a>=3?(Z.error(`最多上传3个视频`),!1):(F(!0),(t?V5:H5)(e).then(e=>{let n=t?`图片`:`视频`,r=t?i+1:a+1;N(i=>[...i,{url:e.url,type:t?`image`:`video`,name:`${n}${r}`}]),Z.success(`${n}上传成功`)}).catch(()=>Z.error(`上传失败`)).finally(()=>F(!1)),!1)},children:(0,$.jsx)($w,{title:`参考内容(${M.length}/10)`,children:(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,border:`1.5px dashed #d9d9d9`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s`,flexShrink:0},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99,102,241,0.04)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#d9d9d9`,e.currentTarget.style.background=`transparent`},children:P?(0,$.jsx)(Xm,{style:{fontSize:18,color:`#6366f1`}}):(0,$.jsx)(gR,{style:{fontSize:18,color:`#94a3b8`}})})})})]}),(0,$.jsx)(`div`,{style:{padding:`8px 16px 4px`},children:(0,$.jsx)(nK.TextArea,{ref:H,value:I,onChange:e=>{let t=e.target.value;L(t),n.setFieldsValue({prompt:t});let r=t.lastIndexOf(`@`);if(r>=0){let e=t.slice(r+1);if(!e.includes(` `)&&!e.includes(` + `})]})},t9={HomeOutlined:(0,$.jsx)(y3,{}),DashboardOutlined:(0,$.jsx)(P4,{}),CodeOutlined:(0,$.jsx)(y4,{}),PlayCircleOutlined:(0,$.jsx)(S6,{}),WalletOutlined:(0,$.jsx)(Q8,{}),SettingOutlined:(0,$.jsx)(Y6,{}),BellOutlined:(0,$.jsx)(P2,{}),UserOutlined:(0,$.jsx)(K8,{}),AppstoreOutlined:(0,$.jsx)(u2,{}),FileTextOutlined:(0,$.jsx)(MU,{}),StarOutlined:(0,$.jsx)(y8,{}),HeartOutlined:(0,$.jsx)(u3,{}),CameraOutlined:(0,$.jsx)(Y2,{}),RobotOutlined:(0,$.jsx)(S6,{}),CalculatorOutlined:(0,$.jsx)(K2,{}),DollarOutlined:(0,$.jsx)(B4,{}),GiftOutlined:(0,$.jsx)(i3,{}),ThunderboltOutlined:(0,$.jsx)(j8,{}),FireOutlined:(0,$.jsx)(Q4,{}),CloudOutlined:(0,$.jsx)(u4,{}),SmileOutlined:(0,$.jsx)(u8,{}),TrophyOutlined:(0,$.jsx)(L8,{}),RocketOutlined:(0,$.jsx)(L6,{}),BulbOutlined:(0,$.jsx)(U2,{}),PictureOutlined:(0,$.jsx)(p6,{}),VideoCameraOutlined:(0,$.jsx)(Y8,{}),AudioOutlined:(0,$.jsx)(S2,{}),MailOutlined:(0,$.jsx)(U3,{}),PhoneOutlined:(0,$.jsx)(u6,{}),GlobalOutlined:(0,$.jsx)(s3,{}),ShoppingCartOutlined:(0,$.jsx)(Q6,{}),TeamOutlined:(0,$.jsx)(O8,{}),BarChartOutlined:(0,$.jsx)(j2,{}),PieChartOutlined:(0,$.jsx)(g6,{}),LineChartOutlined:(0,$.jsx)(P3,{}),SecurityScanOutlined:(0,$.jsx)(U6,{}),ApiOutlined:(0,$.jsx)(s2,{}),DatabaseOutlined:(0,$.jsx)(L4,{}),CloudServerOutlined:(0,$.jsx)(p4,{})},lte=240,n9=[{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(CJ,{})},{gradient:`linear-gradient(135deg, #4a5568, #2d3748)`,shadow:`rgba(74,85,104,0.25)`,icon:(0,$.jsx)(Y4,{})},{gradient:`linear-gradient(135deg, #718096, #4a5568)`,shadow:`rgba(113,128,150,0.25)`,icon:(0,$.jsx)(O4,{})},{gradient:`linear-gradient(135deg, #5a67d8, #434190)`,shadow:`rgba(90,103,216,0.25)`,icon:(0,$.jsx)(T2,{})}],ute=()=>{let e=Je(),t=Ge(),{user:n,logout:r}=$7(),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c]=xW.useForm(),[l,u]=(0,S.useState)(null),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)({}),[_,v]=(0,S.useState)(0),[y,b]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteName||``;return t&&(document.title=t),t}),[x,C]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteLogo||``;if(t){let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=t,e.type=`image/png`}return t}),[w,T]=(0,S.useState)(!localStorage.getItem(`siteInfo`)),[E,D]=(0,S.useState)(!1),[O,k]=(0,S.useState)(null),[A,j]=(0,S.useState)(`alipay`),[M,N]=(0,S.useState)(!1),[P,F]=(0,S.useState)(180),I=(0,S.useRef)(null),L=(0,S.useRef)(null),R=(0,S.useRef)(null),[z,B]=(0,S.useState)({alipay:!1,wechat:!1}),[V,H]=(0,S.useState)(!1),[U]=xW.useForm(),[ee,te]=(0,S.useState)(!1),[ne,W]=(0,S.useState)(!1),re=`pending_payment_order`;(0,S.useEffect)(()=>{q5().then(e=>{let t=e.siteName||`民众智创`,n=e.siteLogo||``;if(t!==y&&(b(t),document.title=t),n&&n!==x){C(n);let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=n,e.type=`image/png`}localStorage.setItem(`siteInfo`,JSON.stringify({siteName:t,siteLogo:n}))}).catch(()=>{})},[]);let G=()=>{Q5().then(e=>{v(e)}).catch(()=>{})};(0,S.useEffect)(()=>{(async()=>{let e=localStorage.getItem(re);if(e)try{let t=JSON.parse(e),n=await o7(t.orderNo);if(n.status===`pending`){k({price:t.price,credits:t.credits,qrCode:t.qrCode,method:t.method}),R.current=t.orderNo;let e=Date.now(),n=new Date(t.createdAt).getTime(),r=t.timeoutSeconds||180,i=Math.floor((e-n)/1e3),a=Math.max(0,r-i);a>0?(D(!0),ue(t.orderNo,a)):localStorage.removeItem(re)}else n.status===`paid`?(Z.success(`支付成功!积分已到账`),$7.getState().refreshUser(),localStorage.removeItem(re)):localStorage.removeItem(re)}catch{localStorage.removeItem(re)}})()},[]),(0,S.useEffect)(()=>{t7().then(e=>{f(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),n7().then(e=>{m(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),r7().then(e=>{B(e),e.alipay?j(`alipay`):e.wechat&&j(`wechat`)}).catch(()=>{}),G()},[n]);let K=t.pathname.startsWith(`/records`)?`/records`:t.pathname,q=lte,ie=[{key:`profile`,icon:(0,$.jsx)(K8,{}),label:`账号: ${n?.username}`,disabled:!0},{key:`credits`,icon:(0,$.jsx)(Q8,{style:{color:`#c9a96e`}}),label:`积分: ${n?.credits??0}`,disabled:!0},{type:`divider`},{key:`myCredits`,icon:(0,$.jsx)(Q8,{}),label:`积分明细`},{key:`orderRecords`,icon:(0,$.jsx)(MU,{}),label:`订单记录`},{key:`messages`,icon:(0,$.jsx)(P2,{}),label:`消息中心${_>0?`(${_})`:``}`},{type:`divider`},{key:`changePwd`,icon:(0,$.jsx)(L3,{}),label:`修改密码`},{type:`divider`},{key:`logout`,icon:(0,$.jsx)(B3,{}),label:`退出登录`,danger:!0}],J=({key:t})=>{t===`logout`?(r(),e(`/login`)):t===`changePwd`?a(!0):t===`messages`?e(`/messages`):t===`recharge`?s(!0):t===`myCredits`?e(`/user-center?tab=credits`):t===`orderRecords`&&e(`/user-center?tab=orders`)},ae=async()=>{try{await c.validateFields(),Z.success(`密码修改成功(演示)`),a(!1),c.resetFields()}catch{}},oe=()=>{r(),e(`/login`)},se=()=>{s(!0)},ce=async()=>{if(!n){Z.warning(`请先登录`);return}try{let e=await U.validateFields();W(!0),await Z7({phone:e.phone,company_name:e.companyName,industry:e.industry,name:e.name,message:e.message}),Z.success(`提交成功,我们会尽快与您联系`),H(!1),U.resetFields()}catch(e){Z.error(e?.message||`提交失败`)}finally{W(!1)}},le=(0,S.useCallback)(()=>{I.current&&=(clearInterval(I.current),null),L.current&&=(clearInterval(L.current),null)},[]),ue=(0,S.useCallback)((e,t=180)=>{le(),F(t),I.current=setInterval(async()=>{try{let t=await o7(e);t.status===`paid`?(le(),R.current=null,localStorage.removeItem(re),Z.success(`支付成功!积分已到账`),$7.getState().refreshUser(),D(!1),k(null),u(null)):t.status===`cancelled`&&(le(),R.current=null,localStorage.removeItem(re))}catch{}},2e3),L.current=setInterval(()=>{F(e=>e<=1?(le(),R.current&&=(s7(R.current).catch(()=>{}),null),localStorage.removeItem(re),Z.warning(`订单已超时,请重新充值`),D(!1),k(null),u(null),0):e-1)},1e3)},[le]);return(0,$.jsxs)(dK,{style:{minHeight:`100vh`},children:[(0,$.jsxs)(`div`,{className:`desktop-sidebar`,style:{width:q,position:`fixed`,left:16,top:16,bottom:16,zIndex:100,background:`linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,display:`flex`,flexDirection:`column`,transition:`width 0.25s ease, left 0.25s ease`,overflow:`hidden`,border:`1px solid rgba(0, 0, 0, 0.06)`},children:[(0,$.jsx)(`div`,{style:{height:80,display:`flex`,alignItems:`center`,justifyContent:`flex-start`,padding:`0 20px`,flexShrink:0,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14},children:[(0,$.jsx)(`div`,{style:{width:42,height:42,borderRadius:14,flexShrink:0,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,overflow:`hidden`},children:x?(0,$.jsx)(`img`,{src:x,alt:`logo`,style:{width:28,height:28,objectFit:`contain`}}):(0,$.jsx)(j8,{style:{fontSize:20,color:`#ffffff`}})}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:17,fontWeight:700,letterSpacing:-.02,whiteSpace:`nowrap`,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:y})]})}),(0,$.jsx)(`div`,{style:{flex:1,padding:`8px 8px`,overflow:`auto`},children:(()=>{let t={};d.forEach(e=>{let n=e.parent_id??e.parentId;n&&(t[n]||(t[n]=[]),t[n].push(e))});let n=d.filter(e=>!(e.parent_id??e.parentId));n.sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0));let r=[],i=(t,n=0)=>{let r=t.path===K,i=t9[t.icon]||(0,$.jsx)(y3,{});return(0,$.jsxs)(`div`,{onClick:()=>t.path&&e(t.path),style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:10,padding:n>0?`6px 12px 6px 32px`:`6px 14px`,borderRadius:12,margin:`1px 4px`,cursor:`pointer`,fontSize:n>0?13:14,fontWeight:r?600:400,color:r?`#4f46e5`:`#475569`,background:r?`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%)`:`transparent`,transition:`all 0.2s ease`},children:[(0,$.jsx)(`span`,{style:{fontSize:n>0?14:16,flexShrink:0,color:r?`#6366f1`:`#64748b`},children:i}),(0,$.jsx)(`span`,{style:{whiteSpace:`nowrap`},children:t.label})]},t.id)};return n.forEach(e=>{if((e.menu_type??e.menuType)===`group`){let n=(t[e.id]||[]).sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0));r.push((0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12,fontWeight:600,padding:`10px 14px 4px`,letterSpacing:.5,textTransform:`uppercase`},children:e.label}),n.map(e=>i(e,1))]},e.id))}else r.push(i(e))}),r})()}),(0,$.jsxs)(`div`,{onClick:()=>s(!0),style:{margin:`8px 12px`,padding:`12px 20px`,borderRadius:14,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8,color:`#ffffff`,fontSize:14,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%)`,e.currentTarget.style.transform=`translateY(-1px)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.5)`},onMouseLeave:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(99, 102, 241, 0.4)`},children:[(0,$.jsx)(gR,{style:{fontSize:16}}),(0,$.jsx)(`span`,{children:`充值积分`})]}),(0,$.jsx)(`div`,{style:{padding:`16px 16px`,flexShrink:0},children:(0,$.jsx)(kU,{menu:{items:ie,onClick:J},placement:`topRight`,arrow:!0,children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:12,padding:`10px 14px`,borderRadius:14,cursor:`pointer`,transition:`all 0.25s ease`,background:`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,boxShadow:`0 2px 12px rgba(0, 0, 0, 0.04)`},onMouseEnter:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #ffffff 0%, #f8fafc 100%)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0, 0, 0, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.background=`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,e.currentTarget.style.boxShadow=`0 2px 12px rgba(0, 0, 0, 0.04)`},children:[(0,$.jsx)(uT,{size:36,icon:(0,$.jsx)(K8,{}),style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,flexShrink:0,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`}}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsx)(`div`,{style:{color:`#1e293b`,fontSize:14,fontWeight:600,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,letterSpacing:-.01},children:n?.username}),(0,$.jsxs)(`div`,{style:{color:`#6366f1`,fontSize:12,fontWeight:500,letterSpacing:0,background:`rgba(99, 102, 241, 0.08)`,padding:`2px 8px`,borderRadius:6,display:`inline-block`},children:[`积分: `,n?.credits||0]})]})]})})})]}),(0,$.jsx)(`div`,{className:`desktop-content`,style:{marginLeft:q+28,marginRight:12,marginTop:16,marginBottom:16,flex:1,minHeight:`calc(100vh - 32px)`,background:`transparent`,padding:0,transition:`margin-left 0.25s ease`},children:(0,$.jsx)(`div`,{style:{boxSizing:`border-box`,height:`100%`,background:`#ffffffff`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,minHeight:`100%`,padding:`24px 32px 32px`,border:`1px solid rgba(0, 0, 0, 0.06)`},children:(0,$.jsx)(Ct,{})})}),(0,$.jsxs)(`div`,{className:`mobile-bottom-nav`,children:[d.filter(e=>(e.menu_type??e.menuType)!==`group`).map(t=>t.path?(0,$.jsxs)(`div`,{className:`nav-item ${t.path===K?`active`:``}`,onClick:()=>e(t.path),children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:t9[t.icon]||(0,$.jsx)(y3,{})}),(0,$.jsx)(`span`,{children:t.label})]},t.id):null),(0,$.jsxs)(`div`,{className:`nav-item`,onClick:se,children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:(0,$.jsx)(T6,{})}),(0,$.jsx)(`span`,{children:`充值`})]}),(0,$.jsxs)(`div`,{className:`nav-item`,onClick:oe,children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:(0,$.jsx)(B3,{})}),(0,$.jsx)(`span`,{children:`退出`})]})]}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(L3,{}),`修改密码`]}),open:i,onOk:ae,onCancel:()=>{a(!1),c.resetFields()},okText:`确认修改`,cancelText:`取消`,width:440,children:(0,$.jsxs)(xW,{form:c,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(xW.Item,{name:`oldPwd`,label:`原密码`,rules:[{required:!0,message:`请输入原密码`}],children:(0,$.jsx)(nK.Password,{placeholder:`请输入原密码`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(xW.Item,{name:`newPwd`,label:`新密码`,rules:[{required:!0,message:`请输入新密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(nK.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(xW.Item,{name:`confirmPwd`,label:`确认新密码`,rules:[{required:!0,message:`请再次输入新密码`},({getFieldValue:e})=>({validator(t,n){return!n||e(`newPwd`)===n?Promise.resolve():Promise.reject(Error(`两次密码不一致`))}})],children:(0,$.jsx)(nK.Password,{placeholder:`请再次输入新密码`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})})]})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(i3,{}),`积分充值`]}),open:o,onCancel:()=>{s(!1),u(null)},footer:null,width:680,children:(0,$.jsxs)(`div`,{style:{marginTop:16},children:[(0,$.jsxs)(DU,{style:{marginBottom:16},children:[(0,$.jsx)(Q8,{style:{color:`#6366f1`}}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,letterSpacing:0},children:`当前积分余额`}),(0,$.jsx)(Q.Text,{strong:!0,style:{color:`#6366f1`,fontSize:20,fontWeight:600},children:n?.credits??0})]}),(0,$.jsxs)(`div`,{style:{padding:`12px 16px`,background:`rgba(99, 102, 241, 0.06)`,borderRadius:10,marginBottom:16,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(T3,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsx)(Q.Text,{style:{color:`#ff0000ff`,fontSize:13},children:`当前平台仅支持支付宝/微信扫码充值,如需转账支付请联系我们`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12,flexWrap:`wrap`},children:p.map((e,t)=>{let n=n9[t%n9.length],r=(e.credits||0)+(e.bonus_credits||e.bonusCredits||0);return(0,$.jsxs)(`div`,{onClick:()=>u(e.id),style:{flex:`1 1 45%`,minWidth:200,borderRadius:16,padding:`20px 16px`,background:l===e.id?`rgba(99,102,241,0.04)`:`#fafbff`,border:l===e.id?`2px solid #6366f1`:`1px solid #f0f0f5`,cursor:`pointer`,position:`relative`,transition:`all 0.2s`},children:[e.description&&(0,$.jsx)(T$,{color:`purple`,style:{position:`absolute`,top:-10,left:`50%`,transform:`translateX(-50%)`,borderRadius:8,fontSize:11},children:e.description}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:44,height:44,borderRadius:12,flexShrink:0,background:n.gradient,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:18,color:`#fff`,boxShadow:`0 6px 16px ${n.shadow}`},children:n.icon}),(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:6},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15},children:e.name}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[r.toLocaleString(),` 积分`]})]}),(0,$.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,marginTop:4,background:n.gradient,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:[`¥`,e.price]})]})]})]},e.id)})}),!z.alipay&&!z.wechat?(0,$.jsx)(`div`,{style:{marginTop:20,marginBottom:8,padding:16,background:`#fef2f2`,borderRadius:12,border:`1px solid #fecaca`},children:(0,$.jsx)(Q.Text,{style:{color:`#dc2626`,fontSize:13},children:`⚠️ 暂无可用的支付方式,请联系管理员开启支付功能`})}):(0,$.jsxs)(`div`,{style:{marginTop:20,marginBottom:8},children:[(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13,marginBottom:8,display:`block`},children:`选择支付方式`}),(0,$.jsxs)(LL.Group,{value:A,onChange:e=>j(e.target.value),style:{display:`flex`,gap:12},children:[z.alipay&&(0,$.jsxs)(LL.Button,{value:`alipay`,style:{flex:1,textAlign:`center`,borderRadius:10,height:44,lineHeight:`42px`,borderColor:A===`alipay`?`#1677ff`:void 0,color:A===`alipay`?`#1677ff`:void 0},children:[(0,$.jsx)(i2,{style:{fontSize:16,marginRight:6}}),`支付宝`]}),z.wechat&&(0,$.jsxs)(LL.Button,{value:`wechat`,style:{flex:1,textAlign:`center`,borderRadius:10,height:44,lineHeight:`42px`,borderColor:A===`wechat`?`#07c160`:void 0,color:A===`wechat`?`#07c160`:void 0},children:[(0,$.jsx)(i5,{style:{fontSize:16,marginRight:6}}),`微信支付`]})]})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:[(0,$.jsx)(vD,{size:`large`,onClick:()=>{s(!1),u(null)},style:{borderRadius:10,marginRight:12},children:`取消`}),(0,$.jsx)(vD,{type:`primary`,size:`large`,disabled:!l||!z.alipay&&!z.wechat,loading:M,onClick:async()=>{let e=p.find(e=>e.id===l);if(!e)return;let t=(e.credits||0)+(e.bonus_credits||e.bonusCredits||0);try{N(!0);let n=await i7(e.id,A),r=n.qrUrl||n.codeUrl||n.qr_code||n.code_url;(n.paymentMethod===`alipay`||n.paymentMethod===`wechat`)&&r?(k({price:e.price,credits:t,qrCode:r,method:n.paymentMethod}),s(!1),D(!0),R.current=n.orderNo,localStorage.setItem(re,JSON.stringify({orderNo:n.orderNo,price:e.price,credits:t,qrCode:r,method:n.paymentMethod,createdAt:n.createdAt||new Date().toISOString(),timeoutSeconds:180})),ue(n.orderNo)):(Z.success(`充值成功!积分已到账`),$7.getState().refreshUser(),s(!1),u(null))}catch(e){Z.error(e?.message||`创建订单失败,请重试`)}finally{N(!1)}},style:{borderRadius:10,fontWeight:600,background:l?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#d1d5db`,border:`none`,boxShadow:l?`0 8px 24px rgba(99,102,241,0.3)`:`none`},children:`确认充值`})]})]})}),(0,$.jsx)(Pq,{open:E,onCancel:async()=>{if(le(),R.current){try{await s7(R.current)}catch{}R.current=null}localStorage.removeItem(re),D(!1),k(null)},footer:null,width:400,closable:!1,styles:{body:{padding:0,borderRadius:16,overflow:`hidden`}},children:(0,$.jsxs)(`div`,{style:{padding:`24px`},children:[(0,$.jsxs)(`div`,{style:{textAlign:`center`,marginBottom:24},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,background:O?.method===`alipay`?`linear-gradient(135deg, #1677ff, #0958d9)`:`linear-gradient(135deg, #07c160, #06ae56)`,borderRadius:16,display:`flex`,alignItems:`center`,justifyContent:`center`,margin:`0 auto 12px`},children:O?.method===`alipay`?(0,$.jsx)(i2,{style:{fontSize:24,color:`#fff`}}):(0,$.jsx)(i5,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:O?.method===`alipay`?`支付宝支付`:`微信支付`}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:O?.method===`alipay`?`请使用支付宝扫描二维码完成支付`:`请使用微信扫描二维码完成支付`})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:16,padding:20,display:`flex`,flexDirection:`column`,alignItems:`center`,boxShadow:`0 4px 20px rgba(0,0,0,0.08)`},children:[(0,$.jsx)(`div`,{style:{width:180,height:180,borderRadius:12,overflow:`hidden`,background:`#fff`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:O&&(0,$.jsx)(t2,{value:O.qrCode,size:160,level:`M`,includeMargin:!1})}),(0,$.jsxs)(`div`,{style:{marginTop:16,textAlign:`center`},children:[(0,$.jsxs)(`div`,{style:{fontSize:28,fontWeight:700,color:`#1a1a2e`},children:[`¥`,O?.price||0]}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`,marginTop:4},children:[`购买 `,O?.credits||0,` 积分`]}),(0,$.jsx)(`div`,{style:{marginTop:12,padding:`8px 16px`,background:P<=30?`#fef2f2`:`#f0f9ff`,borderRadius:8,border:P<=30?`1px solid #fecaca`:`1px solid #bae6fd`,display:`inline-block`},children:(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:P<=30?`#dc2626`:`#0284c7`},children:[`订单将在 `,(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:800},children:P}),` 秒后关闭`]})})]})]}),(0,$.jsx)(`div`,{style:{marginTop:20,padding:16,background:`#fef3c7`,borderRadius:12},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:8},children:[(0,$.jsx)(`div`,{style:{fontSize:16,marginTop:-2},children:`💡`}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#92400e`},children:[(0,$.jsx)(`div`,{style:{fontWeight:500,marginBottom:4},children:`支付提示`}),(0,$.jsxs)(`ul`,{style:{margin:0,paddingLeft:16},children:[(0,$.jsx)(`li`,{style:{marginBottom:2},children:`请在支付后等待页面自动跳转`}),(0,$.jsx)(`li`,{children:`如支付成功但未到账,请联系客服`})]})]})]})}),(0,$.jsx)(`div`,{style:{marginTop:20},children:(0,$.jsx)(vD,{size:`large`,block:!0,onClick:async()=>{if(le(),R.current){try{await s7(R.current)}catch{}R.current=null}localStorage.removeItem(re),D(!1),k(null),u(null)},style:{borderRadius:10},children:`取消支付`})})]})}),(0,$.jsx)(cte,{}),(0,$.jsx)(`div`,{style:{position:`fixed`,right:24,bottom:24,zIndex:1e3},children:(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:64,bottom:8,padding:`8px 16px`,background:`#1e293b`,color:`#ffffff`,borderRadius:8,fontSize:13,whiteSpace:`nowrap`,opacity:+!!ee,transition:`opacity 0.2s ease`,pointerEvents:`none`},children:`联系我们`}),(0,$.jsx)(`button`,{onClick:()=>H(!0),style:{width:56,height:56,borderRadius:`50%`,border:`none`,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,color:`#ffffff`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.05)`,e.currentTarget.style.boxShadow=`0 6px 24px rgba(99, 102, 241, 0.5)`,te(!0)},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.4)`,te(!1)},children:(0,$.jsx)(Y3,{style:{fontSize:20}})})]})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(Y3,{}),`联系我们`]}),open:V,onCancel:()=>{H(!1),U.resetFields()},footer:null,width:480,children:(0,$.jsxs)(`div`,{style:{marginTop:8},children:[(0,$.jsxs)(xW,{form:U,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`name`,label:`姓名`,rules:[{required:!0,message:`请输入姓名`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的姓名`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`phone`,label:`手机号`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1[3-9]\d{9}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的手机号`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`companyName`,label:`公司名称`,rules:[{required:!0,message:`请输入公司名称`}],children:(0,$.jsx)(nK,{placeholder:`请输入公司名称`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`industry`,label:`您的行业`,rules:[{required:!0,message:`请输入您的行业`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的行业`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`message`,label:`留言(选填)`,children:(0,$.jsx)(nK.TextArea,{placeholder:`请输入您的需求或问题`,rows:3,style:{borderRadius:10}})})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,display:`flex`,gap:12},children:[(0,$.jsx)(vD,{size:`large`,onClick:()=>{H(!1),U.resetFields()},style:{borderRadius:10,flex:1},children:`取消`}),(0,$.jsx)(vD,{type:`primary`,size:`large`,onClick:ce,loading:ne,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,flex:1},children:`提交`})]})]})})]})},dte=`http://localhost:8000/api`,fte=()=>{let{checkAuth:e}=$7(),[t,n]=(0,S.useState)(!1),[r,i]=(0,S.useState)(`password`),[a,o]=(0,S.useState)(`password`),[s,c]=(0,S.useState)(0),[l,u]=(0,S.useState)(0),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(!1),[_,v]=(0,S.useState)(!1),[y,b]=(0,S.useState)(0),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),E=(()=>{try{let e=localStorage.getItem(`siteInfo`);if(e){let t=JSON.parse(e);return{siteName:t.siteName||`VideoGen.AI`,siteLogo:t.siteLogo||``}}}catch{}return{siteName:`VideoGen.AI`,siteLogo:``}})(),[D,O]=(0,S.useState)(E.siteName),[k,A]=(0,S.useState)(E.siteLogo),[j,M]=(0,S.useState)(``),[N,P]=(0,S.useState)(``),F=Je(),{login:I}=$7(),[L]=xW.useForm(),[R]=xW.useForm(),[z]=xW.useForm();(0,S.useEffect)(()=>{q5().then(e=>{O(e.siteName),A(e.siteLogo),M(e.userAgreementUrl),P(e.privacyPolicyUrl)}).catch(()=>{})},[]);let B=()=>d?!0:(Z.warning(`请先阅读并同意用户协议和隐私政策`),!1),V=async()=>{if(B())try{let t=await L.validateFields();await I(t.phone,t.password,void 0,t.rememberMe),Z.success(`登录成功,欢迎回来`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}},H=async()=>{if(B())try{let t=R.getFieldsValue();if(!t.phone||!t.code){Z.error(`请填写手机号和验证码`);return}n(!0),await j5(t.phone,t.code),Z.success(`登录成功,欢迎回来`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}finally{n(!1)}},U=async()=>{if(B())try{let t=await z.validateFields();n(!0),await M5(t.phone,t.regCode,t.password),Z.success(`注册成功`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`注册失败`;Z.error(t)}finally{n(!1)}},ee=(e,t)=>{e(60);let n=setInterval(()=>{e(e=>e<=1?(clearInterval(n),m(!1),t?C(!0):T(!0),0):e-1)},1e3)};(0,S.useEffect)(()=>{s===0&&r===`phone`&&v(!1)},[s,r]);let te=async(e,t)=>{try{if(!e||!/^1\d{10}$/.test(e)){Z.error(`请输入正确的手机号`);return}if(t){m(!0),g(!1);return}if(!_){m(!0),v(!1);return}let n=``;n=r===`register`?`register`:`login`,await X5(e,n),ee(t?u:c),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(g(!1),u(0)):(v(!1),c(0)),b(e=>e+1)}},ne=async(e=!1)=>{let t=r===`register`?z.getFieldValue(`phone`):R.getFieldValue(`phone`);try{let e=``;e=r===`register`?`register`:`login`,await X5(t,e),r===`register`?(g(!0),ee(u,!0)):(v(!0),ee(c,!1)),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(g(!1),u(0),C(!0)):(v(!1),c(0),T(!0)),b(e=>e+1)}},W=e=>{o(e),i(e),c(0),u(0),v(!1),g(!1),m(!1),C(!1),T(!1),b(e=>e+1),e===`password`?L.resetFields():R.resetFields()},re=[{icon:(0,$.jsx)(U2,{}),title:`AI 智能优化`,desc:`输入原始提示词,AI 自动为您生成专业级视频、图片描述`},{icon:(0,$.jsx)(S6,{}),title:`一键生成视频、图片`,desc:`支持多种规格生成视频、图片`},{icon:(0,$.jsx)(g3,{}),title:`项目维度管理`,desc:`按项目行业分类视频、图片,支持多种行业`}],G={background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,height:48,borderRadius:10,fontSize:14},K=e=>{e&&window.open(`${dte.replace(/\/api$/,``)}${e}`,`_blank`)};return(0,$.jsxs)(`div`,{style:{minHeight:`100vh`,display:`flex`,backgroundImage:`url(/backimage.png)`,backgroundSize:`cover`,backgroundPosition:`center`,backgroundRepeat:`no-repeat`,backgroundAttachment:`fixed`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(135deg, rgba(240,244,255,0.9) 0%, rgba(232,236,248,0.85) 40%, rgba(240,240,255,0.9) 70%, rgba(248,249,255,0.95) 100%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,width:500,height:500,borderRadius:`50%`,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,top:-150,right:-100,filter:`blur(40px)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,width:400,height:400,borderRadius:`50%`,background:`radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%)`,bottom:-100,left:-80,filter:`blur(50px)`}}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`center`,padding:`0 80px`,zIndex:1},children:(0,$.jsxs)(DU,{direction:`vertical`,size:36,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:20},children:[k?(0,$.jsx)(`img`,{src:k,alt:`logo`,style:{width:52,height:52,borderRadius:14,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:(0,$.jsx)(j8,{style:{fontSize:26,color:`#fff`}})}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:28,fontWeight:800,letterSpacing:-.5},children:D})]}),(0,$.jsx)(`div`,{className:`shiny-text-container`,children:(0,$.jsx)(`span`,{className:`shiny-text`,children:`AI赋能创意,素材触手可及`})}),(0,$.jsxs)(Q.Paragraph,{style:{color:`#64748b`,fontSize:17,maxWidth:480,lineHeight:1.8},children:[`专业的 AI 素材生成平台,通过智能提示词优化,`,(0,$.jsx)(`br`,{}),`让您的创意快速转化为精美视频、图片`]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:20},children:re.map((e,t)=>(0,$.jsxs)(`div`,{className:`electric-border-card`,style:{position:`relative`,display:`flex`,gap:16,alignItems:`flex-start`,padding:`18px 22px`,borderRadius:14,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(12px)`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{className:`electric-border`}),(0,$.jsx)(`div`,{className:`electric-border-inner`}),(0,$.jsx)(`div`,{style:{position:`relative`,zIndex:1},children:(0,$.jsx)(`div`,{style:{width:44,height:44,borderRadius:12,flexShrink:0,background:`linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15))`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#6366f1`,fontSize:20},children:e.icon})}),(0,$.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,$.jsx)(Q.Text,{style:{color:`#1e293b`,fontSize:15,fontWeight:600,display:`block`,marginBottom:4},children:e.title}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13,lineHeight:1.6},children:e.desc})]})]},t))})]})}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1,padding:`40px 24px`},children:(0,$.jsxs)(Oz,{style:{width:440,maxWidth:`100%`,borderRadius:20,boxShadow:`0 20px 60px rgba(0,0,0,0.08)`,border:`1px solid #e2e8f0`,background:`#fff`},styles:{body:{padding:`36px 28px`}},children:[(0,$.jsx)(Q.Title,{level:3,style:{textAlign:`center`,marginBottom:6,color:`#1e293b`,fontWeight:700},children:r===`register`?`创建账号`:`欢迎回来`}),(0,$.jsx)(Q.Text,{style:{display:`block`,textAlign:`center`,marginBottom:28,color:`#94a3b8`,fontSize:14},children:r===`register`?`注册新账号,开始创作视频`:`登录您的账号,开始创作视频`}),r!==`register`&&(0,$.jsx)(`div`,{style:{display:`flex`,gap:0,marginBottom:24,background:`#f1f5f9`,borderRadius:10,padding:4,border:`1px solid #e2e8f0`},children:[`password`,`phone`].map(e=>(0,$.jsx)(`div`,{onClick:()=>W(e),style:{flex:1,textAlign:`center`,padding:`10px 0`,borderRadius:8,cursor:`pointer`,fontSize:14,fontWeight:a===e?600:400,color:a===e?`#6366f1`:`#64748b`,background:a===e?`#fff`:`transparent`,border:a===e?`1px solid rgba(99,102,241,0.2)`:`1px solid transparent`,boxShadow:a===e?`0 2px 8px rgba(99,102,241,0.1)`:`none`,transition:`all 0.3s ease`},children:e===`password`?`密码登录`:`验证码登录`},e))}),r===`password`&&(0,$.jsxs)(xW,{form:L,size:`large`,layout:`vertical`,onFinish:V,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,style:G})}),(0,$.jsx)(xW.Item,{name:`password`,rules:[{required:!0,message:`请输入密码`}],children:(0,$.jsx)(nK.Password,{prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入密码`,style:G})}),(0,$.jsx)(xW.Item,{name:`rememberMe`,valuePropName:`checked`,style:{marginBottom:12},children:(0,$.jsx)(aV,{children:`记住我的登录状态`})}),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,htmlType:`submit`,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登 录`})})]}),r===`phone`&&(0,$.jsxs)(xW,{form:R,size:`large`,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:G})}),(0,$.jsx)(xW.Item,{name:`code`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(DU.Compact,{style:{width:`100%`},children:[(0,$.jsx)(nK,{prefix:(0,$.jsx)(B6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!_,style:{...G,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(vD,{disabled:s>0,onClick:()=>{w?(v(!1),m(!0),b(e=>e+1)):te(R.getFieldValue(`phone`))},style:{height:48,borderRadius:`0 10px 10px 0`,background:s>0||_?`#f1f5f9`:`rgba(99,102,241,0.1)`,border:`1.5px solid #e2e8f0`,borderLeft:`none`,color:s>0?`#94a3b8`:`#6366f1`,fontWeight:600,minWidth:100},children:s>0?`${s}s`:w?`重新发送`:`获取验证码`})]})}),p&&(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(r9,{onSuccess:ne,isVerified:_})},y),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,onClick:H,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登 录`})})]}),r===`register`&&(0,$.jsxs)(xW,{form:z,size:`large`,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:G})}),(0,$.jsx)(xW.Item,{name:`regCode`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(DU.Compact,{style:{width:`100%`},children:[(0,$.jsx)(nK,{prefix:(0,$.jsx)(B6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!h,style:{...G,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(vD,{disabled:l>0,onClick:()=>{x?(g(!1),m(!0),b(e=>e+1)):te(z.getFieldValue(`phone`),!0)},style:{height:48,borderRadius:`0 10px 10px 0`,background:l>0||h?`#f1f5f9`:`rgba(99,102,241,0.1)`,border:`1.5px solid #e2e8f0`,borderLeft:`none`,color:l>0?`#94a3b8`:`#6366f1`,fontWeight:600,minWidth:100},children:l>0?`${l}s`:x?`重新发送`:`获取验证码`})]})}),p&&(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(r9,{onSuccess:ne,isVerified:h})},y),(0,$.jsx)(xW.Item,{name:`password`,rules:[{required:!0,message:`请设置密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(nK.Password,{prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请设置密码(至少6位)`,style:G})}),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,onClick:U,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`注 册`})})]}),(0,$.jsx)(`div`,{style:{marginBottom:16},children:(0,$.jsx)(aV,{checked:d,onChange:e=>f(e.target.checked),children:(0,$.jsxs)(`span`,{style:{fontSize:13,color:`#64748b`},children:[`我已阅读并同意`,(0,$.jsx)(`span`,{onClick:e=>{e.stopPropagation(),K(j)},style:{color:`#6366f1`,cursor:`pointer`},children:`《用户协议》`}),`和`,(0,$.jsx)(`span`,{onClick:e=>{e.stopPropagation(),K(N)},style:{color:`#6366f1`,cursor:`pointer`},children:`《隐私政策》`})]})})}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:r===`register`?(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#6366f1`,cursor:`pointer`},onClick:()=>{i(`password`),o(`password`),C(!1),T(!1),g(!1),m(!1),b(e=>e+1),z.resetFields()},children:`已有账号?去登录`}):(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#6366f1`,cursor:`pointer`},onClick:()=>{i(`register`),C(!1),T(!1),g(!1),m(!1),b(e=>e+1)},children:`没有账号?立即注册`})})]})})]})},r9=({onSuccess:e,isVerified:t})=>{let n=S.useRef(null),r=S.useRef(null),i=S.useRef(null),a=S.useRef(0),o=S.useRef(!1),[s,c]=S.useState(360),l=s-50;S.useEffect(()=>{let e=()=>{if(n.current){let e=n.current.offsetWidth;e>0&&c(e)}};e();let t=new ResizeObserver(e);return n.current&&t.observe(n.current),window.addEventListener(`resize`,e),()=>{t.disconnect(),window.removeEventListener(`resize`,e)}},[]);let u=n=>{if(o.current||t)return;let c=Math.max(0,Math.min(n,l));a.current=c,r.current&&(r.current.style.left=`${c}px`),i.current&&(i.current.style.width=`${c+50}px`),c>=l-5&&(o.current=!0,r.current&&(r.current.style.background=`#22c55e`,r.current.innerHTML=``),i.current&&(i.current.style.width=`${s}px`,i.current.style.background=`#dcfce7`),e())};return(0,$.jsxs)(`div`,{ref:n,onMouseDown:e=>{if(e.preventDefault(),o.current||t)return;let s=n.current;if(!s)return;let c=s.getBoundingClientRect(),d=e=>{u(e.clientX-c.left-50/2)},f=()=>{document.removeEventListener(`mousemove`,d),document.removeEventListener(`mouseup`,f),!o.current&&a.current({page:1,pageSize:10,total:0,items:[]}),i9=p5((e,t)=>({projects:[],records:pte(),loading:!1,mediaType:`image`,countType:`请选择`,selectedRatio:`1:1`,selectedResolution:`2K`,width:2048,height:2048,videoDuration:5,videoAspectRatio:`16:9`,videoResolution:`720p`,engineOptions:{ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]},enginesele:[],fetchProjects:async()=>{e({loading:!0});try{e({projects:await I5(),loading:!1})}catch{e({loading:!1})}},createProject:async(n,r)=>{let i=await L5(n,r);return e({projects:[i,...t().projects]}),i},deleteProject:async n=>{await R5(n),e({projects:t().projects.filter(e=>e.id!==n)})},fetchRecords:async(t={})=>{e({loading:!0});try{e({records:await z5(t),loading:!1})}catch{e({loading:!1})}},optimizePrompt:async(n,r)=>{let i=await B5(n,r);try{await $7.getState().checkAuth()}catch{}let a=t().records;return e({records:{...a,total:a.total+1,items:[i.record,...a.items]}}),i},generateVideo:async(n,r)=>{let i=await G5(n,r);try{await $7.getState().checkAuth()}catch{}let a=t().records;return e({records:{...a,items:a.items.map(e=>e.id===n?i:e)}}),i},updateRecordReferences:(n,r)=>{let i=t().records;e({records:{...i,items:i.items.map(e=>e.id===n?{...e,references:r}:e)}})},setMediaType:t=>e({mediaType:t}),setCountType:t=>e({countType:t}),setImageSettings:(t,n,r,i)=>e({selectedRatio:t,selectedResolution:n,width:r,height:i}),setVideoSettings:(t,n,r)=>e({videoDuration:t,videoAspectRatio:n,videoResolution:r}),setEngineOptions:t=>e({engineOptions:t}),setSelectedRatio:t=>e({selectedRatio:t}),setSelectedResolution:t=>e({selectedResolution:t}),setWidth:t=>e({width:t}),setHeight:t=>e({height:t}),setVideoDuration:t=>e({videoDuration:t}),setVideoAspectRatio:t=>e({videoAspectRatio:t}),setVideoResolution:t=>e({videoResolution:t}),setEnginesele:t=>e({enginesele:t}),resetGenerationConfig:()=>e({mediaType:`image`,countType:`请选择`,selectedRatio:`1:1`,selectedResolution:`2K`,width:2048,height:2048,videoDuration:5,videoAspectRatio:`16:9`,videoResolution:`720p`,engineOptions:{ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]},enginesele:[]})}));function a9(e){if(!e)return`-`;let t=e.trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);return n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``),t.replace(`T`,` `).slice(0,16)}var o9=[`#f97316`,`#3b82f6`,`#8b5cf6`,`#10b981`,`#eab308`,`#6366f1`,`#ef4444`,`#06b6d4`,`#64748b`,`#78716c`],s9={ShoppingCartOutlined:(0,$.jsx)(Q6,{}),BookOutlined:(0,$.jsx)(L2,{}),HomeOutlined:(0,$.jsx)(y3,{}),FireOutlined:(0,$.jsx)(Q4,{}),RocketOutlined:(0,$.jsx)(L6,{}),SkinOutlined:(0,$.jsx)(s8,{}),CompassOutlined:(0,$.jsx)(T4,{}),HeartOutlined:(0,$.jsx)(u3,{}),CarOutlined:(0,$.jsx)(Q2,{}),CameraOutlined:(0,$.jsx)(Y2,{}),CloudOutlined:(0,$.jsx)(u4,{}),StarOutlined:(0,$.jsx)(y8,{}),TrophyOutlined:(0,$.jsx)(L8,{}),ThunderboltOutlined:(0,$.jsx)(j8,{}),BulbOutlined:(0,$.jsx)(U2,{}),CoffeeOutlined:(0,$.jsx)(S4,{}),CrownOutlined:(0,$.jsx)(j4,{}),DashboardOutlined:(0,$.jsx)(P4,{}),FlagOutlined:(0,$.jsx)(t3,{}),GlobalOutlined:(0,$.jsx)(s3,{}),GiftOutlined:(0,$.jsx)(i3,{}),LaptopOutlined:(0,$.jsx)(O3,{}),MobileOutlined:(0,$.jsx)(Q3,{}),MonitorOutlined:(0,$.jsx)(t6,{}),PayCircleOutlined:(0,$.jsx)(s6,{}),PictureOutlined:(0,$.jsx)(p6,{}),PlayCircleOutlined:(0,$.jsx)(S6,{}),SafetyOutlined:(0,$.jsx)(B6,{}),ShoppingOutlined:(0,$.jsx)(t8,{}),SmileOutlined:(0,$.jsx)(u8,{}),SoundOutlined:(0,$.jsx)(g8,{}),TagOutlined:(0,$.jsx)(T8,{}),TeamOutlined:(0,$.jsx)(O8,{}),ToolOutlined:(0,$.jsx)(P8,{}),TruckOutlined:(0,$.jsx)(B8,{}),VideoCameraOutlined:(0,$.jsx)(Y8,{}),WalletOutlined:(0,$.jsx)(Q8,{}),BankOutlined:(0,$.jsx)(O2,{}),BuildOutlined:(0,$.jsx)(B2,{}),ExperimentOutlined:(0,$.jsx)(U4,{}),HighlightOutlined:(0,$.jsx)(p3,{}),IdcardOutlined:(0,$.jsx)(S3,{}),MedicineBoxOutlined:(0,$.jsx)(K3,{}),ReadOutlined:(0,$.jsx)(O6,{}),RestOutlined:(0,$.jsx)(j6,{}),SketchOutlined:(0,$.jsx)(i8,{}),SolutionOutlined:(0,$.jsx)(p8,{})},mte=()=>{let[e,t]=(0,S.useState)(!1),[n]=xW.useForm(),r=Je(),{projects:i,fetchProjects:a,createProject:o,deleteProject:s}=i9(),[c,l]=(0,S.useState)([]);(0,S.useEffect)(()=>{a(),e7().then(l).catch(()=>{})},[]);let u=Object.fromEntries(c.map((e,t)=>[e.key,{label:e.label,color:o9[t%o9.length],icon:e.icon||`AppstoreOutlined`}]));return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`22px 24px`,borderRadius:16,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-20,top:-20,width:200,height:200,borderRadius:`50%`,background:`rgba(255,255,255,0.08)`}}),(0,$.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,$.jsx)(Q.Title,{level:3,style:{margin:`0 0 4px`,color:`#fff`,fontWeight:700},children:`我的项目`}),(0,$.jsxs)(Q.Text,{style:{color:`rgba(255,255,255,0.7)`,fontSize:14},children:[`共 `,i.length,` 个项目 · 按行业分类管理`]})]}),(0,$.jsx)(vD,{icon:(0,$.jsx)(gR,{}),onClick:()=>t(!0),size:`large`,style:{background:`rgba(255,255,255,0.15)`,border:`1px solid rgba(255,255,255,0.3)`,color:`#fff`,fontWeight:600,backdropFilter:`blur(10px)`,borderRadius:10,height:42},children:`新建项目`})]}),i.length===0?(0,$.jsx)(NC,{image:NC.PRESENTED_IMAGE_SIMPLE,description:`还没有项目,创建您的第一个视频项目`,style:{padding:`60px 0`},children:(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(gR,{}),onClick:()=>t(!0),size:`large`,children:`创建第一个项目`})}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},className:`stagger-children`,children:i.map((e,t)=>(0,$.jsxs)(`div`,{className:`project-card project-item animate-slideInCard`,onClick:()=>r(`/projects/${e.id}/generate`),style:{display:`flex`,alignItems:`center`,padding:`18px 22px`,borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,animationDelay:`${t*.06}s`},children:[(0,$.jsx)(`div`,{style:{width:50,height:50,borderRadius:14,flexShrink:0,background:`${u[e.industry]?.color||`#64748b`}12`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:24,marginRight:16,color:u[e.industry]?.color||`#64748b`},children:s9[u[e.industry]?.icon]||(0,$.jsx)(u2,{})}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4,flexWrap:`wrap`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1a1a2e`},children:e.name}),(0,$.jsx)(T$,{color:u[e.industry]?.color||`#64748b`,style:{borderRadius:6,margin:0},children:u[e.industry]?.label||e.industry})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(TH,{style:{fontSize:12,color:`#94a3b8`}}),(0,$.jsxs)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:12,color:`#94a3b8`},children:[`创建于 `,a9(e.createdAt)]})]})]}),(0,$.jsxs)(`div`,{className:`project-actions`,style:{display:`flex`,alignItems:`center`,gap:8,marginLeft:16},children:[(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(S6,{}),onClick:t=>{t.stopPropagation(),r(`/projects/${e.id}/generate`)},style:{background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,borderRadius:10,fontWeight:600,height:36,boxShadow:`0 4px 12px rgba(99,102,241,0.25)`},children:`生成`}),(0,$.jsx)(Rq,{title:`确定删除该项目?`,description:`项目下的生成记录将一并删除`,onConfirm:async t=>{t?.stopPropagation(),await s(e.id),Z.success(`项目已删除`)},onCancel:e=>e?.stopPropagation(),children:(0,$.jsx)(vD,{danger:!0,icon:(0,$.jsx)(O$,{}),onClick:e=>e.stopPropagation(),style:{borderRadius:10,height:36,background:`rgba(239,68,68,0.06)`,border:`1px solid rgba(239,68,68,0.15)`,color:`#ef4444`}})}),(0,$.jsx)(Ug,{className:`mobile-hide`,style:{color:`#cbd5e1`,fontSize:12}})]})]},e.id))}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(u2,{}),`新建项目`]}),open:e,onOk:async()=>{try{let e=await n.validateFields(),i=await o(e.name,e.industry);Z.success(`项目创建成功`),t(!1),n.resetFields(),r(`/projects/${i.id}/generate`)}catch{}},onCancel:()=>{t(!1),n.resetFields()},okText:`创建`,cancelText:`取消`,width:480,children:(0,$.jsxs)(xW,{form:n,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(xW.Item,{name:`name`,label:`项目名称`,rules:[{required:!0,message:`请输入项目名称`}],children:(0,$.jsx)(nK,{placeholder:`例如:618电商大促宣传片`,prefix:(0,$.jsx)(xZ,{}),size:`large`})}),(0,$.jsx)(xW.Item,{name:`industry`,label:`所属行业`,rules:[{required:!0,message:`请选择行业`}],children:(0,$.jsx)(lw,{placeholder:`选择项目所属行业`,size:`large`,children:c.map((e,t)=>(0,$.jsx)(lw.Option,{value:e.key,children:(0,$.jsxs)(DU,{children:[s9[e.icon]||(0,$.jsx)(u2,{}),` `,e.label]})},e.key))})})]})})]})};function hte(){if(typeof crypto<`u`&&typeof crypto.randomUUID==`function`)return crypto.randomUUID();if(typeof crypto<`u`&&typeof crypto.getRandomValues==`function`){let e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}return`${Date.now().toString(16).padStart(12,`0`)}-${Math.random().toString(16).slice(2,10).padStart(8,`0`)}-4xxx-yxxx-${Math.random().toString(16).slice(2,12)}`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}var c9=({src:e,width:t=48,height:n=48})=>{let[r,i]=(0,S.useState)(null),[a,o]=(0,S.useState)(null);return(0,S.useEffect)(()=>{let r=document.createElement(`video`);r.muted=!0,r.preload=`metadata`,r.crossOrigin=`anonymous`;let a=()=>{o(r.duration),r.currentTime=Math.min(1,r.duration*.1)},s=()=>{try{let e=document.createElement(`canvas`);e.width=t*2,e.height=n*2;let a=e.getContext(`2d`);a&&(a.drawImage(r,0,0,e.width,e.height),i(e.toDataURL(`image/jpeg`,.7)))}catch{}};return r.addEventListener(`loadedmetadata`,a),r.addEventListener(`seeked`,s),r.src=e,()=>{r.removeEventListener(`loadedmetadata`,a),r.removeEventListener(`seeked`,s)}},[e,t,n]),(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`,background:`#1a1a2e`},children:[r?(0,$.jsx)(`img`,{src:r,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(S6,{style:{color:`#fff`,fontSize:18}})}),a!=null&&(0,$.jsx)(`span`,{style:{position:`absolute`,bottom:2,right:2,fontSize:9,color:`#fff`,background:`rgba(0,0,0,0.6)`,borderRadius:4,padding:`1px 4px`,lineHeight:1.3},children:(e=>`${Math.round(e)}s`)(a)})]})},gte=()=>{let{projectId:e}=Qe(),t=Je(),[n]=xW.useForm(),{projects:r,records:i,fetchProjects:a,fetchRecords:o,optimizePrompt:s,generateVideo:c}=i9(),l=i.items,{user:u}=$7(),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(null),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(!1),[x,C]=(0,S.useState)({}),[w,T]=(0,S.useState)({}),[E,D]=(0,S.useState)({}),[O,k]=(0,S.useState)(null),[A,j]=(0,S.useState)(null),[M,N]=(0,S.useState)([]),[P,F]=(0,S.useState)(!1),[I,L]=(0,S.useState)(``),[R,z]=(0,S.useState)(!1),[B,V]=(0,S.useState)(``),H=(0,S.useRef)(null),[U,ee]=(0,S.useState)({}),[te,ne]=(0,S.useState)({}),[W,re]=(0,S.useState)({}),[G,K]=(0,S.useState)(null),[q,ie]=(0,S.useState)({}),[J,ae]=(0,S.useState)(null),[oe,se]=(0,S.useState)(5),[ce,le]=(0,S.useState)(`16:9`),[ue,de]=(0,S.useState)(`720p`),[fe,pe]=(0,S.useState)(null),[me,he]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`720p`,`1080p`],durations:[5,8,10,12,15]}),[ge,_e]=(0,S.useState)(0),[ve,ye]=(0,S.useState)(0),[be,xe]=(0,S.useState)(`image`),[Se,Ce]=(0,S.useState)(`1:1`),[we,Te]=(0,S.useState)(`2K`),[Ee,De]=(0,S.useState)(2048),[Oe,ke]=(0,S.useState)(2048),[Ae,je]=(0,S.useState)(!1),[Me,Ne]=(0,S.useState)([]),[Pe,Fe]=(0,S.useState)([]);(0,S.useEffect)(()=>{if(c7().then(e=>{Ne(e.video),Fe(e.image)}),!Ae)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&je(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[Ae]);let Ie=(e,t)=>{for(let n=0;n{let t=e===`2k`?`2048`:e===`4k`?`4096`:e;for(let e=0;e{qe(e)},ze=e=>{Xe(parseInt(e))},[Be,Ve]=(0,S.useState)([]),[He,Ue]=(0,S.useState)([]),[We,Ge]=(0,S.useState)([]),[Ke,qe]=(0,S.useState)(0),[Ye,Xe]=(0,S.useState)(0);(0,S.useEffect)(()=>{We[Ye]&&We[Ye][Ke]!==void 0&&(De(We[Ye][Ke].substring(0,4)),ke(We[Ye][Ke].substring(5)))},[Ke]),(0,S.useEffect)(()=>{We[Ye]&&We[Ye][Ke]!==void 0&&(De(We[Ye][Ke].substring(0,4)),ke(We[Ye][Ke].substring(5)))},[Ye]);let Ze=()=>{De(Oe),ke(Ee)},$e=e=>{xe(e.target.value===`image`?`image`:`video`)};(0,S.useEffect)(()=>{e7().then(e=>{ee(Object.fromEntries(e.map(e=>[e.key,e.label]))),ne(Object.fromEntries(e.map(e=>[e.key,e.optionGroups||[]])))}).catch(()=>{}),Y5().then(e=>{let t=e.items?.[0]?.supportedSizes||{},n=[],r=[],i=[];for(let e in t[`2K`])n.push(e),r.push(t[`2K`][e]);n.forEach((e,t)=>{Ve(n=>[...n,{value:e,label:String(t)}])});for(let e in t[`4K`])i.push(t[`4K`][e]);Ge([r,i]);let a=[];for(let e in t)a.push(e);a.forEach((e,t)=>{Ue(n=>[...n,{value:e,label:String(t)}])})}).catch(()=>{}),J5().then(e=>{if(e.items?.length){let t=e.items[0];he({ratios:t.supportedRatios?.length?t.supportedRatios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions?.length?t.supportedResolutions:[`720p`,`1080p`],durations:t.supportedDurations?.length?t.supportedDurations:[5,8,10,12,15]})}}).catch(()=>{})},[]),(0,S.useEffect)(()=>{a(),o({projectId:e,page:1,pageSize:100})},[e,a,o]);let et=(0,S.useRef)(!1);(0,S.useEffect)(()=>{et.current||l.length===0||(et.current=!0,console.log(`aaaa`,l),l.forEach(t=>{t.projectId===e&&t.status===`generating`&&(T(e=>({...e,[t.id]:`generating`})),Dt(t.id)),t.projectId===e&&t.status===`optimizing`&&ct(t.id)}))},[l,e]);let tt=(0,S.useRef)(new Set),nt=(0,S.useRef)(null),rt=(0,S.useRef)(null),it=e=>{tt.current.add(e),st()},at=e=>{tt.current.delete(e),tt.current.size===0&&ot()},ot=()=>{nt.current&&=(clearInterval(nt.current),null),rt.current&&=(rt.current.abort(),null)},st=()=>{nt.current||=setInterval(async()=>{try{rt.current&&rt.current.abort();let t=new AbortController;rt.current=t;let n=await z5({projectId:e,page:1,pageSize:100,signal:t.signal});rt.current=null;let r=Array.from(tt.current),i=[];if(r.length>0){let e=i9.getState().records,t=e.items.map(e=>{if(r.includes(e.id)){let t=n.items.find(t=>t.id===e.id);if(t)return t.status!==`optimizing`&&i.push(e.id),t}return e});i9.setState({records:{...e,items:t}}),i.forEach(e=>{at(e)})}}catch(e){e.name!==`AbortError`&&console.error(`Optimizing polling error:`,e)}},3e3)},ct=e=>{it(e)},lt=(0,S.useRef)(!1),ut=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(lt.current||l.length===0)return;let t=localStorage.getItem(`pending_optimize`);if(t)try{let{key:n,projectId:r,prompt:i,duration:a,ts:o}=JSON.parse(t);if(Date.now()-o>300*1e3||r!==e){localStorage.removeItem(`pending_optimize`);return}if(ut.current===n)return;let s=l.find(e=>e.projectId===r&&e.originalPrompt===i&&e.duration===a&&e.status===`prompt_optimized`&&new Date(e.createdAt).getTime()>o-1e4);s?(lt.current=!0,localStorage.removeItem(`pending_optimize`),g(s),v(s.optimizedPrompt||``),_e(s.textCreditsCost),ye(s.textTokensUsed),m(!0),Z.success({content:`优化请求已恢复,消耗 ${s.textCreditsCost} 积分`,key:`recovery`})):Date.now()-o>3e4&&localStorage.removeItem(`pending_optimize`)}catch{localStorage.removeItem(`pending_optimize`)}},[l,e]);let dt=r.find(t=>t.id===e),ft=l.filter(t=>t.projectId===e),pt=dt?.name??`项目`,mt=dt&&te[dt.industry]||[],ht=u?.credits??0,gt=e=>{let t=e===`2k`?`2048`:e===`4k`?`4096`:e;for(let e=0;e=_t,yt=async()=>{try{if(!e){Z.error(`项目ID为空,请先选择项目`);return}let t=await n.validateFields();if(!t.prompt||!t.prompt.trim()){Z.error(`请输入视频/图片描述`);return}f(!0);let r=Object.entries(W).map(([e,t])=>`@${e}:${t}`),i=r.length>0?`${t.prompt}\n\n${r.join(`;`)}`:t.prompt,a=hte();localStorage.setItem(`pending_optimize`,JSON.stringify({key:a,projectId:e,prompt:i,duration:oe,ts:Date.now()})),ut.current=a;let o=await s(e,{prompt:i,duration:oe,genType:be,resolution:we,references:M.length>0?M:void 0,idempotencyKey:a,image_size:we,image_proportion:Se,image_px:Ee+`x`+Oe});localStorage.removeItem(`pending_optimize`),ut.current=null,g(o.record),v(o.record.optimizedPrompt||``),_e(o.textCreditsCost),ye(o.textTokensUsed),m(!0),Z.success({content:`「${pt}」提示词优化完成,消耗 ${o.textCreditsCost} 积分`,key:`optimize`})}catch(e){console.error(`优化提示词失败:`,e);let t=e?.response?.data?.message||e?.message||`操作失败,请稍后重试`;Z.error(t)}finally{f(!1),localStorage.removeItem(`pending_optimize`),ut.current=null}},bt=(0,S.useRef)(new Set),xt=(0,S.useRef)(null),St=(0,S.useRef)(null),Ct=e=>{bt.current.add(e),Et()},wt=e=>{bt.current.delete(e),bt.current.size===0&&Tt()},Tt=()=>{xt.current&&=(clearInterval(xt.current),null),St.current&&=(St.current.abort(),null)},Et=()=>{xt.current||=setInterval(async()=>{try{St.current&&St.current.abort();let t=new AbortController;St.current=t;let n=await z5({projectId:e,page:1,pageSize:100,signal:t.signal});St.current=null;let r=Array.from(bt.current),i=[];if(r.length>0){let e=i9.getState().records,t=e.items.map(e=>{if(r.includes(e.id)){let t=n.items.find(t=>t.id===e.id);if(t)return t.status!==`generating`&&i.push(e.id),t}return e});i9.setState({records:{...e,items:t}}),i.forEach(e=>{let t=n.items.find(t=>t.id===e);wt(e),t?.status===`completed`?(T(t=>({...t,[e]:`done`})),g(n=>n?.id===e?t:n),Z.success({content:`「${pt}」视频生成完成!`,key:e,duration:5})):t?.status===`failed`&&(T(t=>({...t,[e]:`failed`})),g(n=>n?.id===e?t:n),Z.error({content:`「${pt}」视频生成失败: ${t.errorMessage||`未知错误`}`,key:e,duration:5}))})}}catch(e){e.name!==`AbortError`&&console.error(`Global polling error:`,e)}},5e3)},Dt=e=>{Ct(e)};(0,S.useEffect)(()=>()=>{Tt(),ot()},[]);let Ot=async e=>{if(!vt){Z.error(`积分不足,请先充值`);return}C(t=>({...t,[e]:!0})),T(t=>({...t,[e]:`generating`})),Z.loading({content:`「${pt}」正在提交视频生成...`,duration:0,key:e});try{(await c(e,{aspectRatio:ce,resolution:ue})).status===`failed`?(T(t=>({...t,[e]:`failed`})),Z.error({content:`「${pt}」提交失败`,key:e,duration:3})):(Z.success({content:`「${pt}」已提交,正在生成中...`,key:e,duration:3}),Dt(e))}catch(t){T(t=>({...t,[e]:`failed`}));let n=`提交失败`;t?.response?.data?.detail?n=t.response.data.detail:t?.data?.detail?n=t.data.detail:t?.detail?n=t.detail:t?.message&&(n=t.message),Z.error({content:`${n}`,key:e,duration:3})}finally{C(t=>({...t,[e]:!1}))}},kt=async e=>{let t=ft.find(t=>t.id===e);if(t){C(t=>({...t,[e]:!0})),T(t=>({...t,[e]:`generating`})),Z.loading({content:`「${pt}」正在重新提交...`,duration:0,key:e});try{let n=E[e];n&&n!==t.optimizedPrompt&&await W5(e,n);let r=await c(e,{aspectRatio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`});console.log(`重新提交视频生成结果:`,r),r.status===`failed`?(T(t=>({...t,[e]:`failed`})),console.log(`12312`),Z.error({content:`「${pt}」提交失败`,key:e,duration:3})):(Z.success({content:`「${pt}」已提交,正在生成中...`,key:e,duration:3}),Dt(e))}catch(t){T(t=>({...t,[e]:`failed`})),console.log(`1231`,t);let n=`提交失败`;t?.response?.data?.detail?n=t.response.data.detail:t?.data?.detail?n=t.data.detail:t?.detail?n=t.detail:t?.message&&(n=t.message),Z.error({content:`${n}`,key:e,duration:3})}finally{C(t=>({...t,[e]:!1}))}}},At=e=>{let t=w[e.id];return t===`generating`?`generating`:t===`done`?`completed`:t===`failed`?`failed`:e.status},jt={optimizing:{color:`processing`,text:`优化中`,icon:(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,$.jsx)(OH,{})},generating:{color:`warning`,text:`生成中`,icon:(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}})},completed:{color:`success`,text:`已完成`,icon:(0,$.jsx)(i4,{})},failed:{color:`error`,text:`失败`,icon:(0,$.jsx)(s4,{})}},Mt=({label:e,value:t,options:n,suffix:r,expanded:i,onToggle:a,onSelect:o,onClose:s})=>{let c=(0,S.useRef)(null),l=(0,S.useRef)(null),u=(0,S.useRef)(i),[d,f]=(0,S.useState)(null);return u.current=i,(0,S.useEffect)(()=>{if(i&&c.current){let e=c.current.getBoundingClientRect();f({bottom:window.innerHeight-e.top+4,left:e.left,width:Math.max(e.width,100)})}else f(null)},[i]),(0,S.useEffect)(()=>{if(!i)return;let e=e=>{c.current?.contains(e.target)||l.current?.contains(e.target)||u.current&&s()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[i,s]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{ref:c,onClick:a,translate:`no`,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,cursor:`pointer`,userSelect:`none`,transition:`background 0.2s, border-color 0.2s`,background:i?`rgba(99,102,241,0.08)`:`#f8f9fc`,border:i?`1px solid #6366f1`:`1px solid #e2e8f0`,minWidth:70,whiteSpace:`nowrap`,flexShrink:0},children:[(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#6366f1`,fontWeight:500,lineHeight:`18px`},children:[t,r]}),(0,$.jsx)(wQ,{style:{fontSize:9,color:`#94a3b8`,transition:`transform 0.2s`,transform:i?`rotate(180deg)`:`rotate(0deg)`}})]}),d&&(0,zi.createPortal)((0,$.jsxs)(`div`,{ref:l,style:{position:`fixed`,bottom:d.bottom,left:d.left,minWidth:d.width,background:`#fff`,borderRadius:12,padding:6,zIndex:99999,boxShadow:`0 8px 30px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:10,color:`#94a3b8`,display:`block`,padding:`2px 6px 4px`},children:e}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:n.map((e,n)=>{let r=t===e;return(0,$.jsx)(`div`,{onClick:()=>{o(e),s()},style:{padding:`6px 10px`,borderRadius:8,fontSize:13,cursor:`pointer`,transition:`all 0.15s`,background:r?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`transparent`,color:r?`#fff`:`#1a1a2e`,fontWeight:r?600:400},onMouseEnter:e=>{r||(e.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:e},n)})})]}),document.body)]})},Nt=({group:e,selected:t,expanded:n,onToggle:r,onSelect:i,onClose:a})=>{let o=(0,S.useRef)(null),s=(0,S.useRef)(null),c=(0,S.useRef)(n),[l,u]=(0,S.useState)(null);return c.current=n,(0,S.useEffect)(()=>{if(n&&o.current){let e=o.current.getBoundingClientRect();u({bottom:window.innerHeight-e.top+4,left:e.left})}else u(null)},[n]),(0,S.useEffect)(()=>{if(!n)return;let e=e=>{o.current?.contains(e.target)||s.current?.contains(e.target)||c.current&&a()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[n,a]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{ref:o,onClick:r,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,cursor:`pointer`,userSelect:`none`,transition:`all 0.2s`,background:t?`rgba(99,102,241,0.08)`:`#f8f9fc`,border:n?`1px solid #6366f1`:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:t?`#6366f1`:`#64748b`,fontWeight:t?600:400},children:t||e.name}),(0,$.jsx)(wQ,{style:{fontSize:9,color:t?`#6366f1`:`#94a3b8`,transition:`transform 0.2s`,transform:n?`rotate(180deg)`:`rotate(0deg)`}})]}),l&&(0,zi.createPortal)((0,$.jsxs)(`div`,{ref:s,style:{position:`fixed`,bottom:l.bottom,left:l.left,background:`#fff`,borderRadius:12,padding:8,minWidth:160,zIndex:99999,boxShadow:`0 8px 30px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:10,color:`#94a3b8`,display:`block`,padding:`2px 6px 4px`},children:e.name}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:e.options.map((e,n)=>{let r=t===e;return(0,$.jsx)(`div`,{onClick:()=>{i(e),a()},style:{padding:`6px 10px`,borderRadius:8,fontSize:13,cursor:`pointer`,transition:`all 0.15s`,background:r?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`transparent`,color:r?`#fff`:`#1a1a2e`,fontWeight:r?600:400},onMouseEnter:e=>{r||(e.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:e},n)})})]}),document.body)]})};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`gen-header animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`20px 28px`,borderRadius:16,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 100%)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-30,bottom:-30,width:160,height:160,borderRadius:`50%`,background:`rgba(255,255,255,0.05)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,position:`relative`},children:[(0,$.jsx)(vD,{icon:(0,$.jsx)(g2,{}),onClick:()=>t(`/projects`),style:{background:`rgba(255,255,255,0.1)`,border:`1px solid rgba(255,255,255,0.2)`,color:`#fff`,borderRadius:10}}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0,color:`#fff`,fontWeight:700},children:pt}),dt&&(0,$.jsx)(T$,{style:{background:`rgba(255,255,255,0.12)`,border:`1px solid rgba(255,255,255,0.2)`,color:`rgba(255,255,255,0.8)`,borderRadius:6},children:U[dt.industry]||dt.industry})]}),(0,$.jsx)(Q.Text,{style:{color:`rgba(255,255,255,0.5)`,fontSize:13},children:`描述视频 → AI优化 → 生成视频`})]})]}),(0,$.jsxs)(T$,{style:{background:`rgba(255,255,255,0.1)`,border:`1px solid rgba(255,255,255,0.2)`,color:`#fff`,borderRadius:20,fontSize:13,padding:`4px 14px`},children:[`剩余 `,ht,` 积分`]})]}),!p&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{className:`animate-fadeInUp`,style:{marginBottom:24,padding:`16px 20px`,borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,boxShadow:`0 2px 12px rgba(0,0,0,0.03)`},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{marginRight:70,position:`relative`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,fontWeight:500,color:`#475569`,marginRight:16},children:`生成类型:`}),(0,$.jsxs)(LL.Group,{defaultValue:`image`,buttonStyle:`solid`,onChange:$e,children:[(0,$.jsxs)(LL.Button,{value:`image`,style:{zIndex:0},children:[(0,$.jsx)(p6,{style:{marginRight:6,fontSize:14}}),` `,`图片`]}),(0,$.jsxs)(LL.Button,{value:`video`,children:[(0,$.jsx)(Y8,{style:{marginRight:6,fontSize:14}}),` `,`视频`]})]})]}),be===`video`&&[{icon:(0,$.jsx)(j$,{}),label:`描述视频+时长`,color:`#6366f1`},{icon:(0,$.jsx)(j8,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(L6,{}),label:`选择参数生成`,color:`#10b981`}].map((e,t)=>(0,$.jsxs)(S.Fragment,{children:[t>0&&(0,$.jsx)(`div`,{style:{width:40,height:1,background:`linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0)`,margin:`0 12px`,flexShrink:0}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:10,background:`${e.color}12`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:e.color,fontSize:15},children:e.icon})}),(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:500,color:`#1a1a2e`},children:e.label})]})]},t)),be===`image`&&[{icon:(0,$.jsx)(j$,{}),label:`描述图片+尺寸`,color:`#6366f1`},{icon:(0,$.jsx)(j8,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(L6,{}),label:`图片生成`,color:`#10b981`}].map((e,t)=>(0,$.jsxs)(S.Fragment,{children:[t>0&&(0,$.jsx)(`div`,{style:{width:40,height:1,background:`linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0)`,margin:`0 12px`,flexShrink:0}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:10,background:`${e.color}12`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:e.color,fontSize:15},children:e.icon})}),(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:500,color:`#1a1a2e`},children:e.label})]})]},t))]})}),(0,$.jsxs)(xW,{form:n,initialValues:{},children:[(0,$.jsx)(xW.Item,{name:`prompt`,noStyle:!0,rules:[{required:!0,message:`请输入视频描述`}],style:{display:`none`}}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:20,background:`#fff`,border:`1px solid #f0f0f5`,boxShadow:`0 4px 24px rgba(0,0,0,0.04)`,overflow:`visible`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`12px 16px 0`,minHeight:60},children:[M.map((e,t)=>(0,$.jsxs)(`div`,{className:`ref-thumb`,style:{position:`relative`,width:48,height:48,borderRadius:12,overflow:`visible`,flexShrink:0},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,overflow:`hidden`,border:`1px solid #e2e8f0`,cursor:`pointer`},onClick:()=>{e.type===`video`&&ae(`http://ceshi.apiforeign.minzhong.cn${e.url}`)},children:e.type===`image`?(0,$.jsx)(xG,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(c9,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`})}),(0,$.jsx)(`div`,{className:`ref-delete`,onClick:n=>{n.stopPropagation(),U5(e.url).catch(()=>{}),N(e=>e.filter((e,n)=>n!==t))},style:{position:`absolute`,top:-4,right:-4,width:16,height:16,borderRadius:`50%`,background:`rgba(0,0,0,0.55)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,opacity:0,transition:`opacity 0.15s`,backdropFilter:`blur(4px)`},children:(0,$.jsx)(s4,{style:{color:`#fff`,fontSize:10}})})]},t)),(0,$.jsx)(y0,{accept:`image/*,video/*`,showUploadList:!1,multiple:!0,beforeUpload:e=>{let t=e.type.startsWith(`image/`),n=e.type.startsWith(`video/`);if(!t&&!n)return Z.error(`仅支持图片或视频文件`),!1;let r=n?100:10;if(e.size/1024/1024>r)return Z.error(`${n?`视频`:`图片`}大小不能超过${r}MB`),!1;let i=M.filter(e=>e.type===`image`).length,a=M.filter(e=>e.type===`video`).length;return t&&i>=10?(Z.error(`最多上传10张图片`),!1):n&&a>=3?(Z.error(`最多上传3个视频`),!1):(F(!0),(t?V5:H5)(e).then(e=>{let n=t?`图片`:`视频`,r=t?i+1:a+1;N(i=>[...i,{url:e.url,type:t?`image`:`video`,name:`${n}${r}`}]),Z.success(`${n}上传成功`)}).catch(()=>Z.error(`上传失败`)).finally(()=>F(!1)),!1)},children:(0,$.jsx)($w,{title:`参考内容(${M.length}/10)`,children:(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,border:`1.5px dashed #d9d9d9`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s`,flexShrink:0},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99,102,241,0.04)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#d9d9d9`,e.currentTarget.style.background=`transparent`},children:P?(0,$.jsx)(Xm,{style:{fontSize:18,color:`#6366f1`}}):(0,$.jsx)(gR,{style:{fontSize:18,color:`#94a3b8`}})})})})]}),(0,$.jsx)(`div`,{style:{padding:`8px 16px 4px`},children:(0,$.jsx)(nK.TextArea,{ref:H,value:I,onChange:e=>{let t=e.target.value;L(t),n.setFieldsValue({prompt:t});let r=t.lastIndexOf(`@`);if(r>=0){let e=t.slice(r+1);if(!e.includes(` `)&&!e.includes(` `)){z(!0),V(e);return}}z(!1)},rows:3,placeholder:`上传参考素材、输入文字,自由组合图、文多元素。输入 @ 可引用参考内容...`,maxLength:500,bordered:!1,autoSize:{minRows:2,maxRows:6},style:{padding:`6px 2px`,fontSize:15,lineHeight:1.7,resize:`none`,caretColor:`#6366f1`}})}),R&&M.length>0&&(0,$.jsx)(`div`,{style:{margin:`0 16px 8px`,background:`#fff`,borderRadius:10,boxShadow:`0 6px 24px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`,padding:6,maxHeight:180,overflowY:`auto`},children:M.filter(e=>!B||e.name.includes(B)).map((e,t)=>(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,padding:`8px 10px`,borderRadius:8,cursor:`pointer`,transition:`background 0.15s`},onMouseEnter:e=>e.currentTarget.style.background=`#f1f5f9`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,onMouseDown:t=>{t.preventDefault();let r=H.current?.resizableTextArea?.textArea||H.current?.nativeElement?.querySelector(`textarea`)||H.current;if(!r||!r.value)return;let i=r.value,a=i.lastIndexOf(`@`),o=i.slice(0,a)+`@${e.name} `;L(o),n.setFieldValue(`prompt`,o),z(!1),setTimeout(()=>{r.focus(),r.selectionStart=o.length,r.selectionEnd=o.length},50)},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,overflow:`hidden`,background:e.type===`image`?`#f1f5f9`:`#1a1a2e`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:e.type===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(S6,{style:{color:`#fff`,fontSize:14}})}),(0,$.jsx)(Q.Text,{style:{fontSize:13},children:e.name}),(0,$.jsx)(T$,{style:{marginLeft:`auto`,fontSize:11},children:e.type===`image`?`图片`:`视频`})]},t))}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`8px 12px 12px`,gap:8,flexWrap:`wrap`,position:`relative`,zIndex:50,minHeight:48},children:[be!==`image`&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,flex:1,flexWrap:`wrap`},children:[(0,$.jsx)(Mt,{label:`时长`,value:`${oe}`,options:me.durations.map(e=>`${e}`),suffix:`秒`,expanded:fe===`duration`,onToggle:()=>pe(fe===`duration`?null:`duration`),onSelect:e=>se(parseInt(e)),onClose:()=>pe(null)}),mt.map((e,t)=>{let n=G===e.name,r=W[e.name];return(0,$.jsx)(Nt,{group:e,selected:r,expanded:n,onToggle:()=>K(n?null:e.name),onSelect:t=>{re(n=>{let r={...n};return r[e.name]===t?delete r[e.name]:r[e.name]=t,r})},onClose:()=>K(null)},`og-${t}`)})]}),be==`image`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>je(!Ae),className:`image-settings-trigger`,style:{minWidth:220,padding:`0px 16px`,height:30,borderRadius:10,border:`1px solid #e2e8f0`,backgroundColor:`#f8f9fc`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:12,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:(0,$.jsxs)(`div`,{style:{textAlign:`left`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:600,color:`#374151`,marginRight:10},children:Se===`auto`?`智能`:Se}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#9ca3af`},children:[we==`2K`?`高清 2K`:`超清 4K`,`| `,Ee,`×`,Oe]})]})}),(0,$.jsx)(wQ,{style:{fontSize:14,color:`#9ca3af`}})]}),Ae&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:520,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:20,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:10,fontSize:13,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:6},children:Be.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{Ce(e.value),Re(e.label)},style:{flex:`0 0 calc(11.11% - 5px)`,minWidth:48,height:56,borderRadius:8,border:Se===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:Se===e.value?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:e.value===`auto`?16:20,height:e.value===`auto`?16:20,border:`2px solid ${Se===e.value?`#6366f1`:`#9ca3af`}`,borderRadius:(e.value,3),marginBottom:3,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e.value===`auto`&&(0,$.jsx)(`span`,{style:{fontSize:8,color:Se===e.value?`#6366f1`:`#9ca3af`},children:`智`})}),(0,$.jsx)(`span`,{style:{fontSize:10,color:Se===e.value?`#6366f1`:`#6b7280`,fontWeight:Se===e.value?600:400},children:e.value})]},e.value))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:10,fontSize:13,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:8},children:He.map(e=>(0,$.jsx)(`button`,{onClick:()=>{Te(e.value),ze(e.label)},style:{flex:1,height:48,borderRadius:8,border:we===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:we===e.value?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsxs)(`span`,{style:{fontSize:13,fontWeight:600,color:we===e.value?`#fff`:`#4b5563`},children:[e.value,e.value===`4k`&&(0,$.jsx)(`span`,{style:{marginLeft:3},children:`✨`})]})},e.value))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:10,fontSize:13,fontWeight:500,color:`#666666`},children:`尺寸`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:140},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12,marginRight:6},children:`W`}),(0,$.jsx)(nK,{value:Ee,onChange:e=>De(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:6,height:40,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:14,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`button`,{onClick:Ze,style:{width:28,height:28,borderRadius:6,border:`1px solid #e5e7eb`,backgroundColor:`#fff`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:`#6366f1`},children:(0,$.jsx)(oG,{style:{fontSize:12}})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:140},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12,marginRight:6},children:`H`}),(0,$.jsx)(nK,{value:Oe,onChange:e=>ke(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:6,height:40,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:14,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12},children:`PX`})]})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,flexShrink:0},children:[be===`image`&&(0,$.jsx)(`span`,{style:{color:`#7c7c7c`,fontSize:14},children:`(请在左侧选择图片比例和尺寸)`}),(0,$.jsx)(vD,{type:`primary`,size:`large`,onClick:yt,loading:d,style:{borderRadius:10,fontWeight:600,minWidth:140,height:40,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 16px rgba(99,102,241,0.35)`},children:`AI优化提示词`})]})]})]})]})]}),p&&h&&(0,$.jsxs)(Oz,{className:`animate-fadeInUp`,style:{borderRadius:16},styles:{body:{padding:`24px 28px`}},children:[!w[h.id]||w[h.id]===`idle`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:24,padding:`14px 18px`,borderRadius:12,background:`linear-gradient(135deg, rgba(16,185,129,0.06), rgba(5,150,105,0.06))`,border:`1px solid rgba(16,185,129,0.15)`},children:[(0,$.jsx)(i4,{style:{color:`#10b981`,fontSize:22}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,display:`block`},children:`提示词优化完成`}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`文本优化消耗 `,ge,` 积分· 您可以编辑提示词后选择参数生成视频`]})]})]}):(0,$.jsxs)(`div`,{style:{marginBottom:24,padding:`16px 18px`,borderRadius:12,display:`flex`,alignItems:`center`,gap:12,background:w[h.id]===`failed`?`rgba(239,68,68,0.04)`:w[h.id]===`done`?`rgba(16,185,129,0.04)`:`rgba(99,102,241,0.04)`,border:`1px solid ${w[h.id]===`failed`?`rgba(239,68,68,0.12)`:w[h.id]===`done`?`rgba(16,185,129,0.12)`:`rgba(99,102,241,0.12)`}`},children:[w[h.id]===`generating`&&(0,$.jsx)(Xm,{style:{color:`#6366f1`,fontSize:18},spin:!0}),w[h.id]===`done`&&(0,$.jsx)(i4,{style:{color:`#10b981`,fontSize:18}}),w[h.id]===`failed`&&(0,$.jsx)(s4,{style:{color:`#ef4444`,fontSize:18}}),(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:w[h.id]===`failed`?`#ef4444`:w[h.id]===`done`?`#10b981`:`#6366f1`},children:[w[h.id]===`generating`&&`${be===`image`?`图片`:`视频`}生成中,请稍候...`,w[h.id]===`done`&&`${be===`image`?`图片`:`视频`}生成成功`,w[h.id]===`failed`&&`${be===`image`?`图片`:`视频`}生成失败,请重试`]})]}),!w[h.id]||w[h.id]===`idle`||w[h.id]===`failed`?(0,$.jsxs)(`div`,{className:`gen-prompt-row`,style:{display:`flex`,gap:20,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 45%`,minWidth:240},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`,minHeight:100},children:(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#64748b`,lineHeight:1.7},children:h.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 45%`,minWidth:240},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,!y&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!y&&(0,$.jsxs)(DU,{size:4,children:[(0,$.jsx)($w,{title:`复制`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(e1,{}),onClick:()=>{navigator.clipboard.writeText(_),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(0,$.jsx)($w,{title:`编辑`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(j$,{}),onClick:()=>b(!0),style:{color:`#6366f1`}})})]})]}),y?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(nK.TextArea,{value:_,onChange:e=>v(e.target.value),rows:5,style:{borderRadius:12,fontSize:14,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(vD,{size:`small`,onClick:()=>{v(h.optimizedPrompt||``),b(!1)},children:`取消`}),(0,$.jsx)(vD,{size:`small`,type:`primary`,onClick:()=>{b(!1),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`,minHeight:100},children:(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#1a1a2e`,lineHeight:1.7},children:_})})]})]}):(0,$.jsxs)(`div`,{className:`gen-prompt-row`,style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 55%`,minWidth:280},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`,minHeight:80},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.6},children:h.originalPrompt})})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,!y&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!y&&(0,$.jsxs)(DU,{size:4,children:[(0,$.jsx)($w,{title:`复制`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(e1,{}),onClick:()=>{navigator.clipboard.writeText(_),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(0,$.jsx)($w,{title:`编辑`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(j$,{}),onClick:()=>b(!0),style:{color:`#6366f1`}})})]})]}),y?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(nK.TextArea,{value:_,onChange:e=>v(e.target.value),rows:5,style:{borderRadius:12,fontSize:13,lineHeight:1.6,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(vD,{size:`small`,onClick:()=>{v(h.optimizedPrompt||``),b(!1)},children:`取消`}),(0,$.jsx)(vD,{size:`small`,type:`primary`,onClick:()=>{b(!1),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`,minHeight:120},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.6},children:_})})]})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 40%`,minWidth:280},children:[h.videoUrl&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`生成视频`}),(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`,border:`1px solid #f0f0f5`,background:`#000`},children:(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${h.videoUrl}`,controls:!0,style:{width:`100%`,maxHeight:350,display:`block`}})})]}),h.imageUrl&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`生成图片`}),(0,$.jsx)(xG,{src:`http://ceshi.apiforeign.minzhong.cn${h.imageUrl}`,style:{width:`100%`,maxHeight:350,objectFit:`contain`,borderRadius:12,border:`1px solid #f0f0f5`},preview:!0})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginTop:20,padding:`14px 18px`,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:[be!==`image`&&(0,$.jsxs)(`div`,{style:{marginTop:24,borderRadius:12,background:`#f8f9fc`,width:`25%`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,fontWeight:600,display:`block`,marginBottom:12},children:`选择视频参数`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`时长`}),(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:13,color:`#6366f1`},children:[oe,`s`]})]}),(0,$.jsx)(Mt,{label:`比例`,value:ce,options:me.ratios,expanded:fe===`ratio`,onToggle:()=>pe(fe===`ratio`?null:`ratio`),onSelect:e=>le(e),onClose:()=>pe(null)}),(0,$.jsx)(Mt,{label:`分辨率`,value:ue,options:me.resolutions,expanded:fe===`resolution`,onToggle:()=>pe(fe===`resolution`?null:`resolution`),onSelect:e=>de(e),onClose:()=>pe(null)})]})]}),be==`image`&&h&&(0,$.jsx)(`div`,{style:{marginTop:24,borderRadius:12,background:`#f8f9fc`,width:`25%`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-around`},children:[(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`分辨率`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:h.imageSize||`-`})]}),(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`画面比例`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:h.imageProportion||`-`})]}),(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`画面尺寸`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:h.imagePx||`-`})]})]})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`文字积分`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#6366f1`},children:ge})]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:18},children:`+`}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:[`预估`,be===`image`?`图片`:`视频`,`积分`]}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#10b981`},children:be===`image`&&h.imageSize?gt(h.imageSize)||_t:Ie(oe,ue)})]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:18},children:`=`}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`总计`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16,color:`#1a1a2e`},children:(ge+(be===`image`?gt(h.imageSize):Ie(oe,ue))).toFixed(2)})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsxs)(vD,{size:`large`,onClick:()=>{m(!1),g(null),v(``),L(``),N([]),re({}),K(null),pe(null),n.resetFields()},style:{borderRadius:12,minWidth:120,height:44,fontWeight:500},children:[`配置新`,be===`image`?`图片`:`视频`]}),(0,$.jsx)($w,{title:vt?``:`积分不足`,children:(0,$.jsx)(vD,{type:`primary`,size:`large`,icon:(0,$.jsx)(L6,{}),onClick:()=>Ot(h.id),loading:w[h.id]===`generating`,disabled:!vt||w[h.id]===`generating`||w[h.id]===`done`,style:{borderRadius:12,minWidth:180,height:44,fontWeight:600,background:w[h.id]===`done`?`#10b981`:vt?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`:`#d1d5db`,border:`none`,boxShadow:vt?`0 8px 24px rgba(99,102,241,0.3)`:`none`},children:w[h.id]===`done`?`生成完成`:w[h.id]===`generating`?`生成中...`:`生成${be===`image`?`图片`:`视频`} (${be===`image`?gt(h.imageSize):Ie(oe,ue)}积分)`})})]})]}),h.references&&h.references.length>0&&(0,$.jsxs)(`div`,{style:{marginTop:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`参考内容`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:h.references.map((e,t)=>(0,$.jsxs)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,position:`relative`,cursor:`pointer`},onClick:()=>{e.type===`video`&&ae(`http://ceshi.apiforeign.minzhong.cn${e.url}`)},children:[e.type===`image`?(0,$.jsx)(xG,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},preview:!0}):(0,$.jsx)(c9,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,width:64,height:64}),(0,$.jsx)(T$,{style:{position:`absolute`,bottom:0,left:0,right:0,margin:0,fontSize:9,textAlign:`center`,borderRadius:`0 0 8px 8px`,background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,padding:`0 2px`},children:e.name})]},t))})]})]}),ft.length>0&&(0,$.jsxs)(`div`,{style:{marginTop:24},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,display:`block`,marginBottom:12},children:`本项目生成记录`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},className:`stagger-children`,children:ft.map((e,t)=>{let n=At(e),r=E[e.id]??(e.optimizedPrompt||e.originalPrompt),i=A===e.id,a=e.genType||`image`;return(0,$.jsxs)(`div`,{className:`animate-slideInCard`,style:{animationDelay:`${t*.05}s`},children:[(0,$.jsxs)(`div`,{className:`record-item`,onClick:()=>j(i?null:e.id),style:{padding:`12px 16px`,borderRadius:i?`12px 12px 0 0`:12,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,transition:`all 0.2s`,display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,background:a===`image`?`#fef3c7`:`#dbeafe`},children:a===`image`?(0,$.jsx)(p6,{style:{color:`#d97706`,fontSize:12}}):(0,$.jsx)(Y8,{style:{color:`#2563eb`,fontSize:12}})}),i?(0,$.jsx)(wQ,{style:{color:`#6366f1`,fontSize:11,flexShrink:0}}):(0,$.jsx)(t4,{style:{color:`#cbd5e1`,fontSize:11,flexShrink:0}}),(0,$.jsx)(T$,{color:jt[n]?.color,icon:jt[n]?.icon,style:{margin:0},children:jt[n]?.text}),(0,$.jsx)(Q.Text,{style:{flex:1,fontSize:13,color:`#475569`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:r}),n===`prompt_optimized`&&(0,$.jsx)(T$,{color:`processing`,style:{padding:`3px 10px`,fontSize:12,margin:0,flexShrink:0},children:`待配置`}),a===`image`?(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.imageSize}`:`-`,` ·`,` `,e.imageProportion||`-`,` ·`,` `,e.imagePx||`-`,` ·`,` `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:a9(e.createdAt)})]}):(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.duration}秒`:`-`,` ·`,` `,e.aspectRatio||`-`,` · `,e.resolution||`-`,` `,`·`,` `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:a9(e.createdAt)})]}),(0,$.jsx)(`div`,{className:`record-actions`,onClick:e=>e.stopPropagation(),children:(0,$.jsx)(DU,{children:n===`failed`&&(0,$.jsx)(vD,{type:`primary`,danger:!0,size:`small`,icon:(0,$.jsx)(S6,{}),loading:x[e.id],onClick:()=>kt(e.id),style:{borderRadius:8},children:`重试`})})})]}),i&&(0,$.jsx)(`div`,{style:{background:`#fff`,border:`1px solid #f0f0f5`,borderTop:`none`,borderRadius:`0 0 12px 12px`,padding:`18px 20px`,animation:`fadeInUp 0.25s ease both`},children:(0,$.jsxs)(`div`,{className:`gen-detail-row`,style:{display:`flex`,gap:20,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 50%`,minWidth:260},children:[(0,$.jsxs)(`div`,{style:{marginBottom:14},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.7},children:e.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:14},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,(n===`prompt_optimized`||n===`failed`)&&O!==e.id&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),O!==e.id&&(0,$.jsxs)(DU,{size:4,children:[(0,$.jsx)($w,{title:`复制`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(e1,{}),onClick:()=>{navigator.clipboard.writeText(r),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(n===`prompt_optimized`||n===`failed`)&&(0,$.jsx)($w,{title:`编辑`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(j$,{}),onClick:()=>{k(e.id),D(t=>({...t,[e.id]:t[e.id]??e.optimizedPrompt??``}))},style:{color:`#6366f1`}})})]})]}),O===e.id?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(nK.TextArea,{value:r,onChange:t=>D(n=>({...n,[e.id]:t.target.value})),rows:4,style:{borderRadius:10,fontSize:13,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(vD,{size:`small`,onClick:()=>k(null),children:`取消`}),(0,$.jsx)(vD,{size:`small`,type:`primary`,onClick:()=>{D(t=>({...t,[e.id]:r})),k(null),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:n===`prompt_optimized`?`rgba(99,102,241,0.02)`:`#f8f9fc`,border:n===`prompt_optimized`?`1px solid rgba(99,102,241,0.1)`:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:r})})]}),a===`image`?(0,$.jsx)(`div`,{style:{display:`flex`,gap:14,padding:`10px 14px`,borderRadius:10,background:`#f8f9fc`},children:[{label:`文字积分`,value:`${e.textCreditsCost||0}`},{label:`图片积分`,value:`${e.creditsCost||0}`},{label:`分辨率`,value:e.imageSize?`${e.imageSize}`:`-`},{label:`比例`,value:e.imageProportion||`-`},{label:`尺寸`,value:e.imagePx||`-`}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:13,color:`#1a1a2e`},children:e.value})]},t))}):(0,$.jsx)(`div`,{style:{display:`flex`,gap:14,padding:`10px 14px`,borderRadius:10,background:`#f8f9fc`},children:[{label:`文字积分`,value:`${e.textCreditsCost||0}`},{label:`视频积分`,value:`${e.creditsCost||0}`},{label:`时长`,value:e.duration?`${e.duration}秒`:`-`},{label:`比例`,value:e.aspectRatio||`-`},{label:`分辨率`,value:e.resolution||`-`}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:13,color:`#1a1a2e`},children:e.value})]},t))}),(e.references&&e.references.length>0||n===`failed`)&&(0,$.jsxs)(`div`,{style:{marginTop:14},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:[`参考素材`,` `,n===`failed`&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可删除/添加后重试)`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:[e.references?.map((t,r)=>(0,$.jsxs)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`visible`,border:`1px solid #e2e8f0`,position:`relative`,cursor:`pointer`},onClick:()=>{t.type===`video`&&ae(`http://ceshi.apiforeign.minzhong.cn${t.url}`)},children:[(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`hidden`},children:t.type===`image`?(0,$.jsx)(xG,{src:`http://ceshi.apiforeign.minzhong.cn${t.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},preview:!0}):(0,$.jsx)(c9,{src:`http://ceshi.apiforeign.minzhong.cn${t.url}`,width:64,height:64})}),(0,$.jsx)(T$,{style:{position:`absolute`,bottom:0,left:0,right:0,margin:0,fontSize:9,textAlign:`center`,borderRadius:`0 0 8px 8px`,background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,padding:`0 2px`},children:t.name}),n===`failed`&&(0,$.jsx)(`div`,{className:`ref-delete`,onClick:n=>{n.stopPropagation(),U5(t.url).catch(()=>{});let i=e.references.filter((e,t)=>t!==r);i9.getState().updateRecordReferences(e.id,i)},style:{position:`absolute`,top:-4,right:-4,width:16,height:16,borderRadius:`50%`,background:`rgba(239,68,68,0.8)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,opacity:0,transition:`opacity 0.15s`},children:(0,$.jsx)(s4,{style:{color:`#fff`,fontSize:10}})})]},r)),n===`failed`&&(0,$.jsx)(y0,{accept:`image/*,video/*`,showUploadList:!1,multiple:!0,beforeUpload:t=>{let n=t.type.startsWith(`image/`),r=t.type.startsWith(`video/`);return!n&&!r?(Z.error(`仅支持图片或视频文件`),!1):((n?V5:H5)(t).then(r=>{let i={url:r.url,type:n?`image`:`video`,name:t.name||(n?`图片`:`视频`)},a=e.references||[];i9.getState().updateRecordReferences(e.id,[...a,i]),Z.success(`上传成功`)}).catch(()=>Z.error(`上传失败`)),!1)},children:(0,$.jsx)($w,{title:`添加参考素材`,children:(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:10,border:`1.5px dashed #d9d9d9`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#d9d9d9`},children:(0,$.jsx)(gR,{style:{fontSize:18,color:`#94a3b8`}})})})})]})]})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 40%`,minWidth:220,position:`relative`},children:[n===`prompt_optimized`&&(0,$.jsxs)(`div`,{style:{marginTop:16,position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,backgroundColor:`transparent`},children:[a===`video`&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,flexWrap:`wrap`,marginBottom:12},children:[(0,$.jsxs)(`div`,{translate:`no`,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,marginLeft:12},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`时长`}),(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:13,color:`#6366f1`},children:[e.duration,`秒`]})]}),(0,$.jsx)(Mt,{label:`比例`,value:q[e.id]?.aspectRatio||`选择比例`,options:me.ratios,expanded:fe===`ratio-${e.id}`,onToggle:()=>pe(fe===`ratio-${e.id}`?null:`ratio-${e.id}`),onSelect:t=>ie(n=>({...n,[e.id]:{...n[e.id],aspectRatio:t,resolution:n[e.id]?.resolution||``}})),onClose:()=>pe(null)}),(0,$.jsx)(Mt,{label:`分辨率`,value:q[e.id]?.resolution||`选择分辨率`,options:me.resolutions,expanded:fe===`res-${e.id}`,onToggle:()=>pe(fe===`res-${e.id}`?null:`res-${e.id}`),onSelect:t=>ie(n=>({...n,[e.id]:{...n[e.id],aspectRatio:n[e.id]?.aspectRatio||``,resolution:t}})),onClose:()=>pe(null)})]}),(0,$.jsxs)(vD,{type:`primary`,size:`large`,icon:(0,$.jsx)(L6,{}),block:!0,loading:x[e.id],disabled:a===`video`&&(!q[e.id]?.aspectRatio||!q[e.id]?.resolution),onClick:async()=>{let t=q[e.id];if(a===`video`){if(!t?.aspectRatio||!t?.resolution){Z.error(`请选择比例和分辨率`);return}if(ht({...t,[e.id]:!0})),T(t=>({...t,[e.id]:`generating`}));let n=a===`video`?`视频`:`图片`;Z.loading({content:`「${pt}」正在生成${n}...`,duration:0,key:e.id});try{await c(e.id,{aspectRatio:t?.aspectRatio,resolution:t?.resolution}),T(t=>({...t,[e.id]:`done`})),Z.success({content:`「${pt}」${n}生成成功!`,key:e.id,duration:3})}catch{T(t=>({...t,[e.id]:`failed`})),Z.error({content:`「${pt}」${n}生成失败`,key:e.id,duration:3})}finally{C(t=>({...t,[e.id]:!1}))}},style:{borderRadius:12,fontWeight:600,color:`#fff`,height:48,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,position:`absolute`,bottom:18,left:0},children:[`生成`,a===`video`?`视频`:`图片`,a===`video`?(0,$.jsx)(`span`,{style:{color:`#d2d2d2`,fontSize:`14px`,marginLeft:`6px`},children:`(请选择上方的比例分辨率)`}):``,` `,a===`video`&&q[e.id]?.resolution?`(${Ie(e.duration||5,q[e.id].resolution)}积分)`:``,a===`image`&&e.imageSize?`(${Le(e.imageSize)}积分)`:a===`image`?`(积分)`:``]})]}),n===`failed`&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:18,right:20},children:(0,$.jsxs)(vD,{type:`primary`,danger:!0,size:`large`,icon:(0,$.jsx)(S6,{}),block:!0,loading:x[e.id],onClick:()=>kt(e.id),style:{borderRadius:12,fontWeight:600,height:48},children:[`重新生成`,a===`video`?`视频`:`图片`]})}),n===`generating`?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`linear-gradient(135deg, rgba(99,102,241,0.04), rgba(139,92,246,0.04))`,border:`1px dashed rgba(99,102,241,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10},children:[(0,$.jsx)(Xm,{style:{color:`#6366f1`,fontSize:28},spin:!0}),(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:[a===`video`?`视频`:`图片`,`生成中...`]})]}):n===`completed`&&e.videoUrl||e.imageUrl?(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,border:`1px solid #f0f0f5`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:10,right:10,zIndex:10},children:(0,$.jsx)($w,{title:`下载${a===`video`?`视频`:`图片`}`,children:(0,$.jsx)(vD,{size:`small`,icon:(0,$.jsx)(p0,{}),onClick:()=>{let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${a===`video`?e.videoUrl:e.imageUrl}&download=1`,t.download=`${e.projectName}${a===`video`?`.mp4`:`.png`}`,t.click()},style:{background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,backdropFilter:`blur(4px)`,borderRadius:8},children:`下载`})})}),(0,$.jsx)(`div`,{style:{minHeight:180,overflow:`hidden`},children:a===`video`?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.videoUrl}`,controls:!0,preload:`metadata`,style:{width:`100%`,height:`400px`,borderRadius:0}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.imageUrl}`,alt:e.projectName,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`,borderRadius:0}})}),(0,$.jsxs)(`div`,{style:{padding:`8px 12px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:`#fafbff`},children:[(0,$.jsxs)(DU,{children:[a===`video`?(0,$.jsx)(Y8,{style:{color:`#6366f1`,fontSize:13}}):(0,$.jsx)(p6,{style:{color:`#6366f1`,fontSize:13}}),(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#475569`},children:e.projectName})]}),e.generatedAt&&(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:11,color:`#94a3b8`},children:a9(e.generatedAt)})]})]}):n===`failed`?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`rgba(239,68,68,0.03)`,border:`1px dashed rgba(239,68,68,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10,padding:16},children:[(0,$.jsx)(s4,{style:{color:`#ef4444`,fontSize:28}}),(0,$.jsxs)(Q.Text,{style:{color:`#ef4444`,fontSize:14,fontWeight:600},children:[a===`video`?`视频`:`图片`,`生成失败`]}),e.errorMessage&&(0,$.jsx)(Q.Text,{style:{color:`#ef4444`,fontSize:12,textAlign:`center`,lineHeight:1.6},children:e.errorMessage})]}):(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`#f8f9fc`,border:`1px dashed #e2e8f0`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10},children:[(0,$.jsx)(OH,{style:{color:`#94a3b8`,fontSize:28}}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:a===`image`?`待生成图片`:n===`prompt_optimized`?`待配置视频参数`:`待生成视频`})]})]})]})})]},e.id)})})]}),(0,$.jsx)(Pq,{open:!!J,onCancel:()=>ae(null),footer:null,width:480,centered:!0,destroyOnClose:!0,closable:!1,title:null,styles:{body:{padding:0,background:`#000`,position:`relative`}},children:J&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:J,controls:!0,autoPlay:!0,style:{width:`100%`,display:`block`,maxHeight:`70vh`}}),(0,$.jsx)(`div`,{onClick:()=>ae(null),style:{position:`absolute`,top:8,right:8,width:28,height:28,borderRadius:`50%`,background:`rgba(0,0,0,0.6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,transition:`background 0.15s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(0,0,0,0.85)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(0,0,0,0.6)`},children:(0,$.jsx)(s4,{style:{color:`#fff`,fontSize:16}})})]})})]})},l9={optimizing:{color:`processing`,text:`优化中`,icon:(0,$.jsx)(Xm,{spin:!0})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,$.jsx)(OH,{})},generating:{color:`warning`,text:`生成中`,icon:(0,$.jsx)(Xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,$.jsx)(i4,{})},failed:{color:`error`,text:`失败`,icon:(0,$.jsx)(s4,{})}},_te=()=>{let{records:e,projects:t,fetchRecords:n,fetchProjects:r,generateVideo:i}=i9(),a=e.items,[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(10),[u,d]=(0,S.useState)({}),[f,p]=(0,S.useState)(void 0),[m,h]=(0,S.useState)(void 0),[g,_]=(0,S.useState)({}),[v,y]=(0,S.useState)(null),[b,x]=(0,S.useState)(null),[C,w]=(0,S.useState)(null);(0,S.useEffect)(()=>{r()},[r]),(0,S.useEffect)(()=>{n({projectId:f,status:m,page:o,pageSize:c})},[n,f,m,o,c]);let T=async()=>{if(!C)return;let{recordId:e,projectName:t,ratio:n,resolution:r}=C;d(t=>({...t,[e]:!0})),w(null),Z.loading({content:`「${t}」正在生成视频...`,duration:0,key:e});try{await i(e,{aspectRatio:n,resolution:r}),Z.success({content:`「${t}」视频生成成功!`,key:e,duration:3})}catch{Z.error({content:`「${t}」视频生成失败`,key:e,duration:3})}finally{d(t=>({...t,[e]:!1}))}},E=e=>{if((e.genType||`image`)===`image`){d(t=>({...t,[e.id]:!0})),Z.loading({content:`「${e.projectName}」正在生成图片...`,duration:0,key:e.id}),i(e.id,{}).then(()=>{Z.success({content:`「${e.projectName}」图片生成成功!`,key:e.id,duration:3})}).catch(()=>{Z.error({content:`「${e.projectName}」图片生成失败`,key:e.id,duration:3})}).finally(()=>{d(t=>({...t,[e.id]:!1}))});return}w({recordId:e.id,projectName:e.projectName,ratio:e.aspectRatio||`16:9`,resolution:e.resolution||`720p`})},D=a;return(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#94a3b8`},children:`查看所有视频生成记录,点击记录查看完整内容和视频`})}),(0,$.jsxs)(`div`,{className:`record-filter-bar animate-fadeInUp`,style:{display:`flex`,gap:12,marginBottom:20,padding:`14px 20px`,borderRadius:14,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(DU,{children:[(0,$.jsx)(K4,{style:{color:`#94a3b8`}}),(0,$.jsx)(lw,{placeholder:`全部项目`,allowClear:!0,style:{width:200},onChange:e=>{p(e),s(1)},children:t.map(e=>(0,$.jsx)(lw.Option,{value:e.id,children:e.name},e.id))}),(0,$.jsxs)(lw,{placeholder:`全部状态`,allowClear:!0,style:{width:140},onChange:e=>{h(e),s(1)},children:[(0,$.jsx)(lw.Option,{value:`prompt_optimized`,children:`待生成`}),(0,$.jsx)(lw.Option,{value:`generating`,children:`生成中`}),(0,$.jsx)(lw.Option,{value:`completed`,children:`已完成`}),(0,$.jsx)(lw.Option,{value:`failed`,children:`失败`})]})]}),(0,$.jsxs)(Q.Text,{style:{marginLeft:`auto`,lineHeight:`32px`,color:`#94a3b8`,fontSize:13},children:[`共 `,e.total,` 条记录`]})]}),D.length===0?(0,$.jsx)(NC,{image:NC.PRESENTED_IMAGE_SIMPLE,description:`暂无生成记录`,style:{padding:60}}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},className:`stagger-children`,children:D.map((e,t)=>{let n=v===e.id,r=g[e.id]??e.optimizedPrompt,i=u[e.id],a=b===e.id,o=e.genType||`image`;return(0,$.jsxs)(`div`,{className:`animate-slideInCard`,style:{animationDelay:`${t*.04}s`},children:[(0,$.jsxs)(`div`,{className:`record-item`,onClick:()=>x(a?null:e.id),style:{padding:`14px 20px`,borderRadius:a?`14px 14px 0 0`:14,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,transition:`all 0.2s`,display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,background:o===`image`?`#fef3c7`:`#dbeafe`},children:o===`image`?(0,$.jsx)(p6,{style:{color:`#d97706`,fontSize:12}}):(0,$.jsx)(Y8,{style:{color:`#2563eb`,fontSize:12}})}),a?(0,$.jsx)(wQ,{style:{color:`#6366f1`,fontSize:12,flexShrink:0}}):(0,$.jsx)(t4,{style:{color:`#cbd5e1`,fontSize:12,flexShrink:0}}),(0,$.jsx)(T$,{color:l9[e.status].color,icon:l9[e.status].icon,style:{margin:0},children:l9[e.status].text}),(0,$.jsx)(T$,{style:{background:`#f0f0ff`,border:`none`,color:`#6366f1`,margin:0},children:e.projectName}),(0,$.jsx)(Q.Text,{style:{flex:1,fontSize:13,color:`#475569`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:r}),o===`image`?(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.imageSize}`:`-`,` · `,e.imageProportion||`-`,` · `,e.imagePx||`-`,` · `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:a9(e.createdAt)})]}):(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.duration}秒`:`-`,` · `,e.aspectRatio||`-`,` · `,e.resolution||`-`,` · `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:a9(e.createdAt)})]}),(0,$.jsx)(`div`,{className:`record-actions`,onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(DU,{children:[e.status===`prompt_optimized`&&(0,$.jsx)(vD,{type:`primary`,size:`small`,icon:(0,$.jsx)(S6,{}),loading:i,onClick:()=>E(e),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`生成`}),e.status===`generating`&&(0,$.jsx)(T$,{color:`processing`,icon:(0,$.jsx)(Xm,{spin:!0}),style:{padding:`4px 12px`,fontSize:12},children:`生成中...`}),e.status===`failed`&&(0,$.jsx)(vD,{type:`primary`,danger:!0,size:`small`,icon:(0,$.jsx)(S6,{}),loading:i,onClick:()=>E(e),style:{borderRadius:8},children:`重试`})]})})]}),a&&(0,$.jsx)(`div`,{style:{background:`#fff`,border:`1px solid #f0f0f5`,borderTop:`none`,borderRadius:`0 0 14px 14px`,padding:`20px 24px`,animation:`fadeInUp 0.25s ease both`},children:(0,$.jsxs)(`div`,{className:`gen-detail-row`,style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 50%`,minWidth:280},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.7},children:e.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词 `,e.status===`prompt_optimized`&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!n&&(0,$.jsxs)(DU,{size:4,children:[(0,$.jsx)($w,{title:`复制`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(e1,{}),onClick:()=>{navigator.clipboard.writeText(r),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),e.status===`prompt_optimized`&&(0,$.jsx)($w,{title:`编辑`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(j$,{}),onClick:()=>{y(e.id),_(t=>({...t,[e.id]:t[e.id]??e.optimizedPrompt}))},style:{color:`#6366f1`}})})]})]}),n?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(nK.TextArea,{value:r,onChange:t=>_(n=>({...n,[e.id]:t.target.value})),rows:4,style:{borderRadius:10,fontSize:13,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(vD,{size:`small`,onClick:()=>y(null),children:`取消`}),(0,$.jsx)(vD,{size:`small`,type:`primary`,onClick:()=>{_(t=>({...t,[e.id]:r})),y(null),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:r})})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:16,padding:`12px 16px`,borderRadius:10,background:`#f8f9fc`},children:o===`image`?[{label:`分辨率`,value:e.imageSize?`${e.imageSize} `:`-`},{label:`画面比例`,value:e.imageProportion?`${e.imageProportion} `:`-`},{label:`画面尺寸`,value:e.imageProportion?`${e.imageProportion} `:`-`},{label:`消耗积分`,value:e.creditsCost?`${e.creditsCost} `:`-`,highlight:!!e.creditsCost}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:e.highlight?`#6366f1`:`#1a1a2e`},children:e.value})]},t)):[{label:`时长`,value:e.duration?`${e.duration} 秒`:`-`},{label:`画面比例`,value:e.aspectRatio||(e.status===`prompt_optimized`?`待选择`:`-`)},{label:`分辨率`,value:e.resolution||(e.status===`prompt_optimized`?`待选择`:`-`)},{label:`消耗积分`,value:e.creditsCost?`${e.creditsCost}`:`-`,highlight:!!e.creditsCost}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:e.highlight?`#6366f1`:`#1a1a2e`},children:e.value})]},t))}),e.status===`prompt_optimized`&&(0,$.jsx)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:(0,$.jsx)(vD,{type:`primary`,size:`large`,icon:(0,$.jsx)(L6,{}),loading:i,onClick:()=>E(e),style:{borderRadius:12,fontWeight:600,height:44,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.3)`},children:o===`video`?`选择参数生成视频`:`生成图片`})}),e.status===`failed`&&(0,$.jsx)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:(0,$.jsxs)(vD,{type:`primary`,danger:!0,size:`large`,icon:(0,$.jsx)(S6,{}),loading:i,onClick:()=>E(e),style:{borderRadius:12,fontWeight:600,height:44},children:[`重新生成`,o===`video`?`视频`:`图片`]})})]}),(0,$.jsx)(`div`,{style:{flex:`1 1 40%`,minWidth:240},children:e.status===`generating`?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`linear-gradient(135deg, rgba(99,102,241,0.04), rgba(139,92,246,0.04))`,border:`1px dashed rgba(99,102,241,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(Xm,{style:{color:`#6366f1`,fontSize:32},spin:!0}),(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:[o===`video`?`视频`:`图片`,`生成中...`]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:12},children:`请耐心等待,生成完成后将自动展示`})]}):e.status===`completed`&&(e.videoUrl||e.imageUrl)?(0,$.jsxs)(`div`,{style:{borderRadius:14,overflow:`hidden`,border:`1px solid #f0f0f5`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:10,right:10,zIndex:10},children:(0,$.jsx)($w,{title:`下载${o===`video`?`视频`:`图片`}`,children:(0,$.jsx)(vD,{size:`small`,icon:(0,$.jsx)(p0,{}),onClick:()=>{let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${o===`video`?e.videoUrl:e.imageUrl}&download=1`,t.download=`${e.projectName}${o===`video`?`.mp4`:`.png`}`,t.click()},style:{background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,backdropFilter:`blur(4px)`,borderRadius:8},children:`下载`})})}),(0,$.jsx)(`div`,{style:{minHeight:280,overflow:`hidden`},children:o===`video`?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.videoUrl}`,controls:!0,preload:`metadata`,style:{width:`100%`,height:`400px`,display:`block`}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.imageUrl}`,alt:e.projectName,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`,display:`block`}})}),(0,$.jsxs)(`div`,{style:{padding:`10px 14px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:`#fafbff`},children:[(0,$.jsxs)(DU,{children:[o===`video`?(0,$.jsx)(Y8,{style:{color:`#6366f1`}}):(0,$.jsx)(p6,{style:{color:`#6366f1`}}),(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#475569`},children:e.projectName})]}),e.generatedAt&&(0,$.jsxs)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:12,color:`#94a3b8`},children:[`生成于 `,a9(e.generatedAt)]})]})]}):e.status===`failed`?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`rgba(239,68,68,0.03)`,border:`1px dashed rgba(239,68,68,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(s4,{style:{color:`#ef4444`,fontSize:32}}),(0,$.jsxs)(Q.Text,{style:{color:`#ef4444`,fontSize:14},children:[o===`video`?`视频`:`图片`,`生成失败`]}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:12},children:`请在左侧点击重新生成`})]}):(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`#f8f9fc`,border:`1px dashed #e2e8f0`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(OH,{style:{color:`#94a3b8`,fontSize:32}}),(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:[`待生成`,o===`video`?`视频`:`图片`]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:12},children:`点击左侧生成按钮开始生成`})]})})]})})]},e.id)})}),e.total>0&&(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:18},children:(0,$.jsx)(HK,{current:e.page||o,pageSize:e.pageSize||c,total:e.total,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{s(e),l(t)}})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(L6,{}),`生成视频`]}),open:!!C,onCancel:()=>w(null),onOk:T,okText:`提交生成`,cancelText:`取消`,width:420,children:C&&(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:(()=>{let e=a.find(e=>e.id===C.recordId);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`时长`}),(0,$.jsxs)(Q.Text,{strong:!0,children:[e?.duration||5,`秒`]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`画面比例`}),(0,$.jsx)(lw,{value:C.ratio,onChange:e=>w(t=>t?{...t,ratio:e}:null),style:{width:`100%`},options:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`].map(e=>({value:e,label:e}))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`分辨率`}),(0,$.jsx)(lw,{value:C.resolution,onChange:e=>w(t=>t?{...t,resolution:e}:null),style:{width:`100%`},options:[`480p`,`720p`,`1080p`].map(e=>({value:e,label:e}))})]})]})})()})})]})},u9=({value:e,duration:t=1200})=>{let[n,r]=(0,S.useState)(0),i=(0,S.useRef)(0);return(0,S.useEffect)(()=>{let a=n,o=e-a;if(o===0)return;let s=performance.now(),c=e=>{let n=e-s,l=Math.min(n/t,1);r(a+o*(1-(1-l)**3)),l<1&&(i.current=requestAnimationFrame(c))};return i.current=requestAnimationFrame(c),()=>cancelAnimationFrame(i.current)},[e]),(0,$.jsx)($.Fragment,{children:n.toLocaleString()})},vte=()=>{let{user:e}=$7(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(1),[s,c]=(0,S.useState)(10),[l,u]=(0,S.useState)(0);(0,S.useEffect)(()=>{(async()=>{i(!0);let e=await K5(a,s);n(e.records),u(e.total),i(!1)})()},[a,s]);let d=(e,t)=>{o(e),c(t)},f=t.filter(e=>e.type===`recharge`).reduce((e,t)=>e+t.amount,0),p=t.filter(e=>e.type===`consume`).reduce((e,t)=>e+Math.abs(t.amount),0);return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(wJ,{gutter:[16,16],style:{marginBottom:24},children:[(0,$.jsx)(fV,{xs:24,sm:8,children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:16,padding:24,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-20,top:-20,width:120,height:120,borderRadius:`50%`,background:`rgba(255,255,255,0.1)`}}),(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsxs)(DU,{style:{marginBottom:10},children:[(0,$.jsx)(Q8,{style:{color:`rgba(255,255,255,0.8)`,fontSize:16}}),(0,$.jsx)(`span`,{style:{color:`rgba(255,255,255,0.8)`,fontSize:14},children:`当前可用积分`})]}),(0,$.jsx)(`div`,{style:{color:`#fff`,fontSize:38,fontWeight:800,lineHeight:1},children:(0,$.jsx)(u9,{value:e?.credits??0})})]})]})}),(0,$.jsx)(fV,{xs:12,sm:8,children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:16,padding:24,background:`#fff`,border:`1px solid #f0f0f5`,animationDelay:`0.06s`},children:[(0,$.jsxs)(DU,{style:{marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:`rgba(16,185,129,0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(y2,{style:{color:`#10b981`,fontSize:14}})}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:14},children:`累计获得`})]}),(0,$.jsx)(`div`,{style:{color:`#10b981`,fontSize:28,fontWeight:800},children:(0,$.jsx)(u9,{value:f})})]})}),(0,$.jsx)(fV,{xs:12,sm:8,children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:16,padding:24,background:`#fff`,border:`1px solid #f0f0f5`,animationDelay:`0.12s`},children:[(0,$.jsxs)(DU,{style:{marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:`rgba(239,68,68,0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(p2,{style:{color:`#ef4444`,fontSize:14}})}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:14},children:`累计消耗`})]}),(0,$.jsx)(`div`,{style:{color:`#ef4444`,fontSize:28,fontWeight:800},children:(0,$.jsx)(u9,{value:p})})]})})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{animationDelay:`0.15s`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(j8,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`积分明细`})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(f$,{columns:[{title:`类型`,dataIndex:`type`,key:`type`,width:100,render:e=>(0,$.jsx)(T$,{color:e===`recharge`?`green`:`orange`,icon:e===`recharge`?(0,$.jsx)(y2,{}):(0,$.jsx)(p2,{}),children:e===`recharge`?`充值`:`消费`})},{title:`积分变动`,dataIndex:`amount`,key:`amount`,width:120,render:e=>(0,$.jsxs)(Q.Text,{strong:!0,style:{color:e>0?`#10b981`:`#ef4444`,fontSize:15},children:[e>0?`+`:``,e]})},{title:`说明`,dataIndex:`description`,key:`description`},{title:`时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,style:{color:`#94a3b8`},children:a9(e)})}],dataSource:t,rowKey:`id`,loading:r,pagination:{current:a,pageSize:s,total:l,onChange:d,showSizeChanger:!0,showTotal:e=>`共 ${e} 条`},scroll:{x:500}})})]})]})},yte=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(1),[u]=(0,S.useState)(10);(0,S.useEffect)(()=>{d()},[c]);let d=async()=>{t(!0);try{let e=await K5(c,u);r(e.records||[]),a(e.credits||0),s(e.total||0)}catch{r([])}t(!1)};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(wJ,{gutter:[16,16],style:{marginBottom:24},children:[(0,$.jsx)(fV,{xs:24,sm:8,children:(0,$.jsxs)(`div`,{style:{borderRadius:16,padding:24,background:`linear-gradient(135deg, #f59e0b 0%, #ea580c 100%)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-20,top:-20,width:120,height:120,borderRadius:`50%`,background:`rgba(255,255,255,0.1)`}}),(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:10},children:[(0,$.jsx)(Q8,{style:{color:`rgba(255,255,255,0.8)`,fontSize:16}}),(0,$.jsx)(`span`,{style:{color:`rgba(255,255,255,0.8)`,fontSize:14},children:`可用积分`})]}),(0,$.jsx)(`div`,{style:{color:`#fff`,fontSize:38,fontWeight:800,lineHeight:1},children:i.toLocaleString()})]})]})}),(0,$.jsx)(fV,{xs:12,sm:8,children:(0,$.jsxs)(`div`,{style:{borderRadius:16,padding:24,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:`rgba(16,185,129,0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(T6,{style:{color:`#10b981`,fontSize:14}})}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:14},children:`累计获得`})]}),(0,$.jsx)(`div`,{style:{color:`#10b981`,fontSize:28,fontWeight:800},children:n.filter(e=>e.amount>0).reduce((e,t)=>e+t.amount,0).toLocaleString()})]})}),(0,$.jsx)(fV,{xs:12,sm:8,children:(0,$.jsxs)(`div`,{style:{borderRadius:16,padding:24,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:`rgba(239,68,68,0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(j8,{style:{color:`#ef4444`,fontSize:14}})}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:14},children:`累计消耗`})]}),(0,$.jsx)(`div`,{style:{color:`#ef4444`,fontSize:28,fontWeight:800},children:n.filter(e=>e.amount<0).reduce((e,t)=>e+Math.abs(t.amount),0).toLocaleString()})]})})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(j8,{style:{color:`#f59e0b`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`积分明细`})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(lq,{spinning:e,children:n.length===0?(0,$.jsx)(NC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无积分变动记录`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(f$,{dataSource:n,columns:[{title:`变动类型`,dataIndex:`type`,key:`type`,width:120,render:e=>{let t={recharge:{color:`#10b981`,label:`充值`,bg:`rgba(16,185,129,0.1)`},consume:{color:`#ef4444`,label:`消费`,bg:`rgba(239,68,68,0.1)`},admin:{color:`#f59e0b`,label:`管理员调整`,bg:`rgba(245,158,11,0.1)`},refund:{color:`#8b5cf6`,label:`退款`,bg:`rgba(139,92,246,0.1)`}}[e]||{color:`#64748b`,label:e,bg:`rgba(100,116,139,0.1)`};return(0,$.jsx)(T$,{color:t.color,style:{background:t.bg,fontWeight:500,padding:`4px 12px`},children:t.label})}},{title:`描述`,dataIndex:`description`,key:`description`,ellipsis:!0},{title:`变动积分`,dataIndex:`amount`,key:`amount`,width:120,align:`right`,render:e=>(0,$.jsxs)(Q.Text,{strong:!0,style:{fontWeight:700,color:e>0?`#10b981`:`#ef4444`,fontSize:15},children:[e>0?`+`:``,e]})},{title:`创建时间`,key:`createdAt`,width:180,render:(e,t)=>{let n=t.created_at||t.createdAt||t.create_time||t.createTime;return n?new Date(n).toLocaleString(`zh-CN`):`-`}}],rowKey:`id`,pagination:!1,bordered:!1}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(HK,{current:c,pageSize:u,total:o,onChange:e=>{l(e)},size:`small`})})]})})})]})]})},bte=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(1),[c]=(0,S.useState)(10);(0,S.useEffect)(()=>{l()},[o]);let l=async()=>{t(!0);try{let e=await a7(o,c);r(e.items||[]),a(e.total||0)}catch{r([])}t(!1)};return(0,$.jsx)(`div`,{children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(MU,{style:{color:`#0ea5e9`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`订单记录`}),(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:[`共 `,n.length,` 条记录`]})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(lq,{spinning:e,children:n.length===0?(0,$.jsx)(NC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无订单记录`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(f$,{dataSource:n,columns:[{title:`订单号`,key:`orderNo`,width:200,render:(e,t)=>(0,$.jsx)(`span`,{style:{fontFamily:`monospace`,fontSize:13,color:`#64748b`},children:t.order_no||t.orderNo||t.id})},{title:`支付方式`,key:`paymentMethod`,width:100,render:(e,t)=>{let n=t.payment_method||t.paymentMethod||`wechat`,r={alipay:{icon:(0,$.jsx)(i2,{style:{fontSize:16}}),label:`支付宝`,color:`#1677ff`},wechat:{icon:(0,$.jsx)(i5,{style:{fontSize:16}}),label:`微信支付`,color:`#07c160`}},i=r[n]||r.wechat;return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{color:i.color},children:i.icon}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#374151`},children:i.label})]})}},{title:`金额`,key:`amount`,width:100,align:`right`,render:(e,t)=>{let n=t.amount||t.total_amount||0;return(0,$.jsxs)(Q.Text,{strong:!0,style:{fontWeight:700,fontSize:14,color:`#1e293b`},children:[`¥`,n]})}},{title:`获得积分`,key:`credits`,width:100,align:`center`,render:(e,t)=>{let n=t.credits||t.credit_amount||0;return(0,$.jsx)(Q.Text,{strong:!0,style:{fontWeight:600,fontSize:14,color:`#f59e0b`},children:n})}},{title:`状态`,key:`status`,width:100,render:(e,t)=>{let n=t.status||`pending`,r={pending:{color:`#f59e0b`,label:`待支付`,bg:`rgba(245,158,11,0.1)`},paid:{color:`#10b981`,label:`已支付`,bg:`rgba(16,185,129,0.1)`},refunded:{color:`#94a3b8`,label:`已退款`,bg:`rgba(148,163,184,0.1)`},failed:{color:`#ef4444`,label:`支付失败`,bg:`rgba(239,68,68,0.1)`},cancelled:{color:`#64748b`,label:`已取消`,bg:`rgba(100,116,139,0.1)`},processing:{color:`#0ea5e9`,label:`处理中`,bg:`rgba(14,165,233,0.1)`}}[n]||{color:`#64748b`,label:n,bg:`rgba(100,116,139,0.1)`};return(0,$.jsx)(T$,{color:r.color,style:{background:r.bg,fontWeight:500,padding:`4px 12px`},children:r.label})}},{title:`创建时间`,key:`createdAt`,width:180,render:(e,t)=>{let n=t.created_at||t.createdAt;return n?new Date(n).toLocaleString(`zh-CN`):`-`}},{title:`支付时间`,key:`paidAt`,width:180,render:(e,t)=>{let n=t.paid_at||t.paidAt;return n?new Date(n).toLocaleString(`zh-CN`):`-`}}],rowKey:`order_no`,pagination:!1,bordered:!1}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(HK,{current:o,pageSize:c,total:i,onChange:e=>{s(e)},size:`small`})})]})})})]})})},xte=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(1),[u]=(0,S.useState)(10);(0,S.useEffect)(()=>{d(),f()},[c]);let d=async()=>{t(!0);try{let e=await Z5(c,u);r(e.items||[]),s(e.total||0)}catch{r([])}t(!1)},f=async()=>{try{a(await Q5())}catch{a(0)}},p=async e=>{try{await $5(e),d(),f()}catch{}};return(0,$.jsx)(`div`,{children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(P2,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`消息中心`}),(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:[`未读 `,i,` 条`]})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(lq,{spinning:e,children:n.length===0?(0,$.jsx)(NC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无消息`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(f$,{dataSource:n,columns:[{title:`类型`,dataIndex:`type`,key:`type`,width:100,render:e=>{let t={system:{color:`#6366f1`,label:`系统`,bg:`rgba(99,102,241,0.1)`,icon:(0,$.jsx)(Y6,{style:{fontSize:14}})},credit:{color:`#f59e0b`,label:`积分`,bg:`rgba(245,158,11,0.1)`,icon:(0,$.jsx)(Q8,{style:{fontSize:14}})},promo:{color:`#8b5cf6`,label:`活动`,bg:`rgba(139,92,246,0.1)`,icon:(0,$.jsx)(i3,{style:{fontSize:14}})}},n=t[e]||t.system;return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{color:n.color},children:n.icon}),(0,$.jsx)(`span`,{style:{fontSize:13,color:n.color,fontWeight:500},children:n.label})]})}},{title:`标题`,dataIndex:`title`,key:`title`,ellipsis:!0},{title:`内容`,dataIndex:`content`,key:`content`,ellipsis:!0},{title:`状态`,dataIndex:`isRead`,key:`isRead`,width:80,render:(e,t)=>e??t.is_read?(0,$.jsx)(T$,{color:`gray`,style:{background:`rgba(148,163,184,0.1)`},children:`已读`}):(0,$.jsx)(T$,{color:`purple`,style:{background:`rgba(139,92,246,0.1)`},children:`未读`})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>{if(!e)return`-`;let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/(1e3*60*60));if(r<1)return`刚刚`;if(r<24)return`${r}小时前`;let i=Math.floor(r/24);return i<7?`${i}天前`:t.toLocaleDateString(`zh-CN`)}},{title:`操作`,key:`action`,width:100,render:(e,t)=>t.isRead??t.is_read?null:(0,$.jsx)(vD,{type:`text`,size:`small`,onClick:()=>p(t.id),style:{color:`#6366f1`},children:`标记已读`})}],rowKey:`id`,pagination:!1,bordered:!1}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(HK,{current:c,pageSize:u,total:o,onChange:e=>{l(e)},size:`small`})})]})})})]})})},d9=()=>{let[e]=Dn(),[t,n]=(0,S.useState)(`credits`);return(0,S.useEffect)(()=>{(e.get(`tab`)||`credits`)===`orders`?n(`orders`):n(`credits`)},[e]),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(mz,{activeKey:t,onChange:n,items:[{key:`credits`,label:`积分明细`},{key:`orders`,label:`订单记录`}],style:{marginBottom:24},size:`large`}),t===`credits`&&(0,$.jsx)(yte,{}),t===`orders`&&(0,$.jsx)(bte,{})]})},Ste=`/assets/bg1-CQh9PRPW.png`,Cte=`/assets/bg2-CNoKndHs.png`,{Header:wte,Sider:Tte,Content:Ete}=dK,{TextArea:Dte}=nK,{Option:f9}=lw,{Text:p9}=Q,Ote=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(`1`),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(``),{mediaType:c,countType:l,selectedRatio:u,selectedResolution:d,width:f,height:p,videoDuration:m,videoAspectRatio:h,videoResolution:g,engineOptions:_,enginesele:v,setMediaType:y,setCountType:b,setSelectedRatio:x,setSelectedResolution:C,setWidth:w,setHeight:T,setVideoDuration:E,setVideoAspectRatio:D,setVideoResolution:O,setEngineOptions:k,setEnginesele:A}=i9(),[j,M]=(0,S.useState)(!1),[N,P]=(0,S.useState)(!1),[F,I]=(0,S.useState)([]),[L,R]=(0,S.useState)(!1),[z,B]=(0,S.useState)(``),[V,H]=(0,S.useState)(`image`),U=(0,S.useRef)(null),[ee,te]=(0,S.useState)(new Set),ne=e=>{if(!e)return null;try{let t=new URL(e).searchParams.get(`exp`);return t?parseInt(t,10):null}catch{try{let t=e.indexOf(`?`);if(t!==-1){let n=e.substring(t+1),r=new URLSearchParams(n).get(`exp`);if(r)return parseInt(r,10)}return null}catch{return null}}},W=e=>{let t=ne(e);return t?Math.floor(Date.now()/1e3)>t:!1},[re,G]=(0,S.useState)(!1),[K,q]=(0,S.useState)(``),[ie,J]=(0,S.useState)(`image`),[ae,oe]=(0,S.useState)(``),[se,ce]=(0,S.useState)(!1),[le,ue]=(0,S.useState)(null),[de,fe]=(0,S.useState)({x:0,y:0}),[pe,me]=(0,S.useState)(!1),[he,ge]=(0,S.useState)(!1),[_e,ve]=(0,S.useState)([]),[ye,be]=(0,S.useState)([]),[xe,Se]=(0,S.useState)([]),[Ce,we]=(0,S.useState)(0),[Te,Ee]=(0,S.useState)(0),[De,Oe]=(0,S.useState)(!1),[ke,Ae]=(0,S.useState)([]),[je,Me]=(0,S.useState)([]),[Ne,Pe]=(0,S.useState)([]),Fe=()=>{let e={};return e=Ne.find(e=>e.modelConfigId===l&&e.genType===c&&e.resolution===(c===`video`?g:d)),e||(c===`video`?(e={perSecondCredits:2,baseCredits:60,ratio:1},g===`1080p`?e.ratio=2:g===`720p`?e.ratio=1.5:g===`480p`&&(e.ratio=1)):(e={perSecondCredits:.1,baseCredits:4,ratio:1},d===`2K`?e.ratio=1:d===`4K`&&(e.ratio=2))),c===`video`?Math.round((m*e.perSecondCredits+e.baseCredits)*e.ratio):e.baseCredits*e.ratio},Ie=(0,S.useRef)(null),Le=(0,S.useRef)(null),Re=(0,S.useRef)(null);(0,S.useRef)(!0),i.find(e=>e.id===n);let[ze,Be]=(0,S.useState)([]),[Ve,He]=(0,S.useState)({page:1,pageSize:20}),[Ue,We]=(0,S.useState)(0),[Ge,Ke]=(0,S.useState)(!1),qe=(0,S.useRef)(!1),Je=(0,S.useCallback)((e=`instant`)=>{let t=Le.current;t&&requestAnimationFrame(()=>{t.scrollTo({top:t.scrollHeight,behavior:e})})},[]);(0,S.useEffect)(()=>{if(ze.length>0&&!qe.current){let e=setTimeout(()=>{Je(`smooth`),qe.current=!0},300);return()=>clearTimeout(e)}},[ze.length,Je]),(0,S.useEffect)(()=>{let e=c===`image`?v.image:v.video;e&&e.length>0&&(e.some(e=>e.id===l)||b(e[0].id))},[c,v]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;De&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&Oe(!1),pe&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&me(!1),he&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&ge(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[De,pe,he]),(0,S.useEffect)(()=>{l7().then(e=>{if(A(e.engine),e.engine.video&&e.engine.video.length>0){let t=e.engine.video[0],n=e.engine.video.find(e=>e.id===l)||t;k({ratios:n.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:n.supportedResolutions||[`480p`,`720p`,`1080p`],durations:n.supportedDurations||[5,8,10,12,15]}),n.supportedRatios?.includes(h)||D(n.supportedRatios?.[0]||`16:9`),n.supportedResolutions?.includes(g)||O(n.supportedResolutions?.[0]||`720p`),n.supportedDurations?.includes(m)||E(n.supportedDurations?.[0]||5),l===`请选择`&&b(n.id)}}).catch(()=>{}),c7().then(e=>{Ae(e.video||[]),Me(e.image||[])}).catch(e=>{}),h7().then(e=>{Pe(e)}),d7(Ve).then(e=>{let t=e.items,n=e.total;Be(t),We(n)}),Y5().then(e=>{let t=e.items?.[0]?.supportedSizes||{},n=[],r=[],i=[];for(let e in t[`2K`])n.push(e),r.push(t[`2K`][e]);ve(n.map((e,t)=>({value:e,label:String(t)})));for(let e in t[`4K`])i.push(t[`4K`][e]);Se([r,i]),be([{value:`2K`,label:`高清 2K`},{value:`4K`,label:`超清 4K`}])}).catch(()=>{})},[]),(0,S.useEffect)(()=>{if(Re.current&&=(clearInterval(Re.current),null),ze.some(e=>e.status===`generating`))return Re.current=window.setInterval(()=>{d7(Ve).then(e=>{Be(t=>t.map(t=>t.status===`generating`&&e.items.find(e=>e.id===t.id)||t)),We(e.total)}).catch(e=>{})},1e4),()=>{Re.current&&=(clearInterval(Re.current),null)}},[ze,Ve]),(0,S.useEffect)(()=>{if(!pe)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&me(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[pe]),(0,S.useEffect)(()=>{if(!he)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&ge(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[he]),(0,S.useEffect)(()=>{xe[Te]&&xe[Te][Ce]!==void 0&&(w(Number(xe[Te][Ce].substring(0,4))),T(Number(xe[Te][Ce].substring(5))))},[Ce]),(0,S.useEffect)(()=>{xe[Te]&&xe[Te][Ce]!==void 0&&(w(Number(xe[Te][Ce].substring(0,4))),T(Number(xe[Te][Ce].substring(5))))},[Te]);let Ye=e=>{we(e)},Xe=e=>{Ee(parseInt(e===`2K`?`0`:`1`))},Ze=()=>{w(p),T(f)},Qe=async()=>{if(!o.trim()&&F.length===0){Z.warning(`请输入内容或上传图片/视频`);return}let e={id:``,gen_type:c,original_prompt:o.trim(),engine_id:l,idempotency_key:new Date().toLocaleString(`zh-CN`),media_references:F.length>0?[...F]:void 0,...c===`image`&&{image_size:d,image_proportion:u,image_px:f+`x`+p},...c===`video`&&{duration:m,aspect_ratio:h,resolution:g}};P(!0),u7(e).then(()=>{s(``),I([]);let e={...Ve,page:1};He(e),d7(e).then(e=>{Be(t=>[...t,e.items[e.items.length-1]]),We(e.total),setTimeout(()=>{Ie.current?.scrollIntoView({behavior:`smooth`})},100)}).catch(e=>{})}).catch(e=>{let t=`创建任务失败`;e?.response?.data?.detail?t=e.response.data.detail:e?.data?.detail?t=e.data.detail:e?.detail?t=e.detail:e?.message&&(t=e.message),Z.error({content:t,duration:3})}).finally(()=>{P(!1)}),setTimeout(()=>{P(!1)},3e3)},$e=async()=>{if(ze.length>=Ue)return;let e=Le.current;if(!e)return;let t=e.scrollTop,n=e.scrollHeight;Ke(!0);try{let r=Ve.page+1,i=await d7({...Ve,page:r}),a=Array.isArray(i)?{items:i,total:i.length}:i;a.total&&We(a.total),He(e=>({...e,page:r})),Be(e=>{let t=new Set(e.map(e=>e.id));return[...a.items.filter(e=>!e.id||t.has(e.id)?!1:(t.add(e.id),!0)),...e]}),setTimeout(()=>{e.scrollTop=t+(e.scrollHeight-n)},200)}catch{}finally{Ke(!1)}},et=async e=>{let t=e.type.startsWith(`image/`),n=e.type.startsWith(`video/`);if(!t&&!n)return Z.error(`仅支持图片或视频文件`),!1;let r=n?100:10;if(e.size/1024/1024>r)return Z.error(`${n?`视频`:`图片`}大小不能超过${r}MB`),!1;let i=F.filter(e=>e.type===`image`).length;if(t&&i>=4)return Z.error(`最多上传4张图片`),!1;let a=F.filter(e=>e.type===`video`).length;if(n&&a>=1)return Z.error(`最多上传1个视频`),!1;M(!0);try{let n=await(t?V5:H5)(e);I(r=>[...r,{name:e.name,type:t?`image`:`video`,url:n.url}]),Z.success(`${t?`图片`:`视频`}上传成功`)}catch{Z.error(`上传失败`)}finally{M(!1)}return!1},tt=e=>{I(t=>t.filter((t,n)=>n!==e))},nt=e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),Qe())},rt=()=>{R(!1),B(``),U.current&&U.current.pause()},it=e=>{if(e.preventDefault(),e.stopPropagation(),!z)return;let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${z}&download=1`,t.download=V===`image`?`image.png`:`video.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)};return(0,$.jsxs)(dK,{style:{margin:`-24px -32px -32px`,borderRadius:20,height:`calc(100vh - 34px)`,background:`linear-gradient(135deg, #f8fafc 0%, #f0f4ff 50%, #faf5ff 100%)`,backgroundImage:`url(${Cte})`,backgroundRepeat:`no-repeat`,backgroundSize:`100% 100%`,backgroundPosition:`center`},children:[!1,(0,$.jsxs)(dK,{style:{display:`flex`,flex:1,background:`transparent`},children:[(0,$.jsx)(wte,{style:{borderRadius:`20px 20px 0 0`,background:`rgba(255,255,255,0.1)`,backdropFilter:`blur(20px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`0 24px`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:36,height:36,borderRadius:12,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(P6,{style:{fontSize:18,color:`#fff`}})}),(0,$.jsx)(`div`,{children:(0,$.jsx)(p9,{strong:!0,style:{fontSize:16,background:`linear-gradient(90deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`开启创作`})})]})}),(0,$.jsxs)(Ete,{style:{flex:1,margin:0,padding:24,boxSizing:`border-box`,display:`flex`,flexDirection:`column`,overflow:`hidden`,minHeight:0},children:[ze.length===0&&(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,borderRadius:50,background:`linear-gradient(135deg, #6366f1 0%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,marginBottom:16},children:(0,$.jsx)(P6,{style:{fontSize:40,color:`#fff`}})}),(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:500,color:`#333`},children:`你好,想创作什么?`}),(0,$.jsx)(`p`,{style:{margin:8,fontSize:13,color:`#999`},children:`输入想法、剧本或上传参考,开始你的创作之旅`})]}),ze.length>0&&(0,$.jsxs)(`div`,{ref:Le,style:{flex:1,overflowY:`auto`,paddingRight:8},children:[(0,$.jsx)(`div`,{style:{padding:`8px 0`,textAlign:`center`,marginBottom:16},children:ze.length>=Ue?(0,$.jsx)(`span`,{style:{fontSize:12,color:`#999`},children:`消息全部加载`}):(0,$.jsx)(`button`,{onClick:$e,disabled:Ge,style:{fontSize:12,color:`#6366f1`,background:`none`,border:`none`,cursor:Ge?`not-allowed`:`pointer`},children:Ge?`加载中...`:`加载更多`})}),(()=>{let e=Z;return ze.map(t=>(0,$.jsx)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`flex-start`,marginBottom:16},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:36,height:36,borderRadius:12,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},children:(0,$.jsx)(P6,{style:{color:`#fff`,fontSize:16}})}),(0,$.jsx)(`div`,{style:{flex:1},children:(0,$.jsxs)(`div`,{style:{background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:`16px 16px 16px 4px`,padding:`12px 16px`,width:`70%`,minWidth:500,boxSizing:`border-box`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.08), 0 1px 3px rgba(0,0,0,0.04)`,position:`relative`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:[(0,$.jsxs)(`div`,{style:{margin:4,fontSize:11,color:`#999`,textAlign:`left`,display:`flex`,flexWrap:`wrap`,gap:8,alignItems:`center`},children:[(0,$.jsx)(`span`,{children:t.createdAt?.replace(`T`,` `).split(`.`)[0]}),(0,$.jsx)(`span`,{style:{background:t.genType===`image`?`rgba(34, 197, 94, 0.12)`:`rgba(249, 115, 22, 0.12)`,color:t.genType===`image`?`#22c55e`:`#f97316`,padding:`2px 8px`,borderRadius:12,fontWeight:500,fontSize:11,marginLeft:8},children:t.genType===`image`?`图片生成`:`视频生成`})]}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,zIndex:100},children:(0,$.jsx)(Rq,{title:`确定要删除吗?`,onConfirm:async()=>{try{await m7(t.id),e.success(`删除成功`),Be(e=>e.filter(e=>e.id!==t.id)),We(e=>e-1)}catch(t){let n=t?.response?.data?.message||t?.message||`删除失败`;e.error(n)}},okText:`确定`,cancelText:`取消`,children:(0,$.jsx)(`button`,{onClick:e=>e.stopPropagation(),style:{width:28,height:28,borderRadius:8,border:`none`,background:`rgba(99, 102, 241, 0.08)`,color:`#6366f1`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s ease`,padding:0},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`,e.currentTarget.style.color=`#ef4444`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.08)`,e.currentTarget.style.color=`#6366f1`},children:(0,$.jsx)(O$,{style:{fontSize:12}})})})}),(t.status===`generating`||t.status===`failed`||t.status===`completed`)&&(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:16,marginTop:16,width:`100%`,alignItems:`flex-start`},children:[(0,$.jsx)(`div`,{style:{width:`50%`,overflow:`hidden`,borderRadius:12,position:`relative`,height:220,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%)`},children:t.status===`generating`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:12,left:12,display:`flex`,alignItems:`center`,gap:8,zIndex:2}}),(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%)`,animation:`shimmer 2s infinite`}}),(0,$.jsxs)(`div`,{style:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,display:`flex`,flexDirection:`column`,alignItems:`center`,gap:16},children:[(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:`50%`,background:`rgba(99, 102, 241, 0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 0 30px rgba(99, 102, 241, 0.2)`},children:(0,$.jsx)(`div`,{style:{width:48,height:48,border:`3px solid #c7d2fe`,borderTopColor:`#6366f1`,borderRadius:`50%`,animation:`spin 1s linear infinite`}})}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`,fontWeight:500},children:`生成中...`})]})]}):t.status===`failed`?(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:`50%`,background:`rgba(254, 226, 226, 0.8)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(t5,{style:{color:`#ef4444`,fontSize:22}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#94a3b8`},children:`生成失败`})]}):(0,$.jsx)($.Fragment,{children:t.genType===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${t.imageUrl}&w=300&p=50`,alt:t.name,style:{width:`100%`,height:`100%`,borderRadius:12,objectFit:`contain`,cursor:`pointer`,transition:`transform 0.3s ease`},onClick:()=>{B(t.imageUrl),H(`image`),R(!0)},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.05)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${t.videoCoverUrl}&w=300&p=50`,alt:t.name,style:{width:`100%`,height:`100%`,borderRadius:12,objectFit:`contain`,cursor:`pointer`,transition:`transform 0.3s ease`},onClick:()=>{B(t.videoUrl),H(`video`),R(!0)},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.05)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,width:56,height:56,background:`rgba(99, 102, 241, 0.85)`,borderRadius:`50%`,display:`flex`,alignItems:`center`,justifyContent:`center`,pointerEvents:`none`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.4)`},children:(0,$.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`#fff`,children:(0,$.jsx)(`path`,{d:`M8 5v14l11-7z`})})})]})})}),(0,$.jsxs)(`div`,{style:{width:`50%`,display:`flex`,flexDirection:`column`,gap:12},children:[(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:12,padding:12,border:`1px solid rgba(99, 102, 241, 0.08)`,flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`p`,{style:{width:`100%`,height:150,overflow:`auto`,padding:0,marginTop:0,marginBottom:0,lineHeight:2,color:`#475569`,fontSize:13},children:t.originalPrompt})}),(0,$.jsxs)(`div`,{style:{fontSize:12,color:`#64748b`,textAlign:`left`,display:`flex`,flexWrap:`wrap`,gap:12,alignItems:`center`,justifyContent:`space-between`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{borderRadius:16,color:`#6366f1`,fontWeight:500},children:t.engineSnapshot.name}),(0,$.jsx)(`span`,{style:{borderRadius:16,color:`#64748b`},children:t.genType===`image`?`${t.imageProportion||``} · ${t.imagePx||``} · ${t.imageSize||``}`:`${t.duration||``}s · ${t.aspectRatio||``} · ${t.resolution||``}`}),(0,$.jsxs)(`span`,{style:{borderRadius:16,color:`#ef4444`,fontWeight:500},children:[`消耗积分:`,t.creditsCost]})]})]})]}),(0,$.jsx)(`div`,{style:{textAlign:`right`},children:t.mediaReferences&&t.mediaReferences.length>0&&(0,$.jsx)(`span`,{style:{padding:`4px 12px`,borderRadius:16,color:`#6366f1`,cursor:`pointer`,fontWeight:500,border:`1px solid rgba(99, 102, 241, 0.2)`,background:`rgba(99, 102, 241, 0.04)`},onClick:e=>{e.stopPropagation();let n=e.currentTarget.getBoundingClientRect();fe({x:n.left,y:n.top-10}),ue(t.id),ce(!0)},children:`附件详情`})})]})})]})},t.id))})(),(0,$.jsx)(`div`,{ref:Ie})]}),se&&le&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`transparent`,zIndex:9998},onClick:()=>{ce(!1),ue(null)}}),(0,$.jsxs)(`div`,{style:{position:`fixed`,top:de.y-100,left:de.x,background:`#fff`,borderRadius:12,boxShadow:`0 4px 20px rgba(0,0,0,0.15)`,padding:16,minWidth:200,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500},children:`附件列表`}),(0,$.jsx)(`button`,{onClick:()=>{ce(!1),ue(null)},style:{width:24,height:24,borderRadius:`50%`,border:`none`,background:`#ff4d4f`,cursor:`pointer`,fontSize:14,color:`#fff`,fontWeight:`bold`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s`},onMouseEnter:e=>{e.currentTarget.style.background=`#ff7875`,e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.background=`#ff4d4f`,e.currentTarget.style.transform=`scale(1)`},children:`×`})]}),ze.find(e=>e.id===le)?.mediaReferences?.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>{q(e.url),J(e.url.includes(`.mp4`)||e.url.includes(`.mov`)||e.url.includes(`.avi`)||e.url.includes(`.video`)?`video`:`image`),oe(e.name),G(!0),ce(!1),ue(null)},style:{display:`flex`,alignItems:`center`,gap:8,padding:`8px 12px`,borderRadius:6,cursor:`pointer`,fontSize:13,color:`#333`,transition:`background 0.2s`},onMouseEnter:e=>e.currentTarget.style.background=`#f5f5f5`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,children:[e.type===`image`?(0,$.jsx)(p6,{style:{color:`#3b82f6`,fontSize:14}}):(0,$.jsx)(Y8,{style:{color:`#f59e0b`,fontSize:14}}),e.name]},t))]})]}),(0,$.jsxs)(`div`,{style:{background:`rgba(255,255,255,0.1)`,backdropFilter:`blur(20px)`,borderRadius:24,padding:16,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.1), 0 2px 8px rgba(0,0,0,0.04)`,transition:`all 0.3s ease`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:[F.length>0&&(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,marginBottom:12,overflowX:`auto`},children:F.map((e,t)=>(0,$.jsxs)(`div`,{style:{position:`relative`,width:e.type===`video`?120:80,flexShrink:0},children:[e.type===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,alt:e.name,style:{width:`100%`,height:80,objectFit:`cover`,borderRadius:8}}):(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:80,objectFit:`cover`,borderRadius:8}}),(0,$.jsx)(`button`,{onClick:()=>tt(t),style:{position:`absolute`,top:0,right:0,width:20,height:20,border:`none`,background:`#ff4d4f`,borderRadius:50,cursor:`pointer`,color:`#fff`,fontSize:12,display:`flex`,alignItems:`center`,justifyContent:`center`},children:`×`})]},`media-${t}`))}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:`12px 16px`,backgroundColor:`rgba(248,250,252,0.6)`,borderRadius:16,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`,transition:`all 0.2s ease`},children:[(0,$.jsx)(y0,{accept:`image/*,video/*`,showUploadList:!1,beforeUpload:et,children:(0,$.jsx)($w,{title:`图片${F.filter(e=>e.type===`image`).length}/4,视频${F.filter(e=>e.type===`video`).length}/1`,children:(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:14,border:`2px dashed rgba(99, 102, 241, 0.2)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.25s ease`,flexShrink:0,backgroundColor:`rgba(255,255,255,0.7)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.backgroundColor=`rgba(99, 102, 241, 0.06)`,e.currentTarget.style.transform=`scale(1.05)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.2)`,e.currentTarget.style.backgroundColor=`rgba(255,255,255,0.7)`,e.currentTarget.style.transform=`scale(1)`},children:j?(0,$.jsx)(Xm,{style:{fontSize:18,color:`#6366f1`}}):(0,$.jsx)(gR,{style:{fontSize:18,color:`#64748b`}})})})}),(0,$.jsx)(Dte,{value:o,onChange:e=>s(e.target.value),onKeyPress:nt,placeholder:`上传最多4张参考图,输入提示词描述您想生成的画面...`,autoSize:{minRows:1,maxRows:4},style:{flex:1,height:`100%`,borderRadius:12,border:`none`,outline:`none`,boxShadow:`none`,fontSize:14,lineHeight:1.5,color:`#1e293b`},disabled:N}),(0,$.jsx)(vD,{type:`primary`,shape:`circle`,icon:(0,$.jsx)(K6,{}),onClick:Qe,disabled:!o.trim()&&F.length===0,loading:N,style:{flexShrink:0,width:48,height:48,borderRadius:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.4)`,transition:`all 0.2s ease`,border:`none`}})]}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginTop:12,paddingTop:12,borderTop:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsxs)(DU,{size:`middle`,children:[(0,$.jsxs)(lw,{value:c,onChange:e=>y(e),style:{width:100,height:34,outline:`none`,border:`none`,backgroundColor:`#f1f5f9`,borderRadius:10},size:`middle`,children:[(0,$.jsxs)(f9,{value:`image`,children:[(0,$.jsx)(p6,{style:{marginRight:6,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:`图片`})]}),(0,$.jsxs)(f9,{value:`video`,children:[(0,$.jsx)(Y8,{style:{marginRight:6,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:`视频`})]})]}),(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>Oe(!0),className:`image-settings-trigger`,style:{minWidth:200,padding:`6px 14px`,height:34,borderRadius:10,border:`none`,backgroundColor:`#f1f5f9`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.boxShadow=`0 4px 12px rgba(99, 102, 241, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.15)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(99, 102, 241, 0.04)`},children:[(0,$.jsx)(Y6,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(p9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:c===`image`?v.image?.find(e=>e.id===l)?.name:v.video?.find(e=>e.id===l)?.name||`选择引擎`})]}),De&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:360,backgroundColor:`rgba(255,255,255,0.95)`,backdropFilter:`blur(20px)`,borderRadius:14,boxShadow:`0 12px 48px rgba(99, 102, 241, 0.15)`,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475569`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:(c===`image`?v.image:v.video)?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{b(e.id),c===`video`&&(k({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(h)||D(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(g)||O(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(m)||E(e.supportedDurations?.[0]||5)),Oe(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:l===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:l===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:l===e.id?600:500,color:l===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),c===`image`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>me(!pe),className:`image-settings-trigger`,style:{minWidth:220,padding:`4px 12px`,height:34,borderRadius:8,border:`none`,backgroundColor:`#f1f5f9`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(j3,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsxs)(p9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[u===`auto`?`智能`:u,` · `,d==`2K`?`2K高清`:`4K超清`,` · `,f,`×`,p]})]}),pe&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:480,backgroundColor:`rgba(255,255,255,0.95)`,backdropFilter:`blur(20px)`,borderRadius:14,boxShadow:`0 12px 48px rgba(99, 102, 241, 0.15)`,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:_e.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{x(e.value),Ye(e.label)},style:{flex:`0 0 calc(11.11% - 4px)`,minWidth:44,height:52,borderRadius:6,border:u===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:u===e.value?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:e.value===`auto`?14:18,height:e.value===`auto`?14:18,border:`2px solid ${u===e.value?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e.value===`auto`&&(0,$.jsx)(`span`,{style:{fontSize:7,color:u===e.value?`#6366f1`:`#9ca3af`},children:`智`})}),(0,$.jsx)(`span`,{style:{fontSize:9,color:u===e.value?`#6366f1`:`#6b7280`,fontWeight:u===e.value?600:400},children:e.value})]},e.value))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:ye.map(e=>(0,$.jsx)(`button`,{onClick:()=>{C(e.value),Xe(e.value)},style:{flex:1,height:42,borderRadius:6,border:d===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:d===e.value?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsxs)(`span`,{style:{fontSize:12,fontWeight:600,color:d===e.value?`#fff`:`#4b5563`},children:[e.value,e.value===`4K`&&(0,$.jsx)(`span`,{style:{marginLeft:2},children:`✨`})]})},e.value))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`尺寸`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:120},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:11,marginRight:4},children:`W`}),(0,$.jsx)(nK,{value:f,onChange:e=>w(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:12,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`button`,{onClick:Ze,style:{width:24,height:24,borderRadius:4,border:`1px solid #e5e7eb`,backgroundColor:`#fff`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:`#6366f1`},children:(0,$.jsx)(oG,{style:{fontSize:10}})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:120},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:11,marginRight:4},children:`H`}),(0,$.jsx)(nK,{value:p,onChange:e=>T(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:12,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:11},children:`PX`})]})]})]})]}),c===`video`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>ge(!he),className:`image-settings-trigger`,style:{minWidth:220,padding:`4px 12px`,height:34,borderRadius:8,border:`none`,backgroundColor:`#f1f5f9`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(j3,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsxs)(p9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[h,` · `,m,`s · `,g]})]}),he&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:400,backgroundColor:`rgba(255,255,255,0.95)`,backdropFilter:`blur(20px)`,borderRadius:14,boxShadow:`0 12px 48px rgba(99, 102, 241, 0.15)`,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:_.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>D(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:h===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:h===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${h===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:h===e?`#6366f1`:`#6b7280`,fontWeight:h===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(m-Math.min(..._.durations))/(Math.max(..._.durations)-Math.min(..._.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(..._.durations),max:Math.max(..._.durations),value:m,onChange:e=>E(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:m}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:_.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>O(e),style:{flex:1,height:42,borderRadius:6,border:g===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:g===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:g===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`6px 14px`,backgroundColor:`rgba(99, 102, 241, 0.06)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsx)(p9,{style:{fontSize:13,color:`#6366f1`,fontWeight:500},children:`预估积分`}),(0,$.jsx)(p9,{style:{fontSize:14,color:`#6366f1`,fontWeight:600},children:Fe()})]})]})})]})]})]}),(0,$.jsx)(`style`,{children:` @keyframes blink { 0%, 50% { opacity: 1; } @@ -414,19 +414,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho 50% { opacity: 1; } 100% { opacity: 0; } } -<<<<<<<< HEAD:video-gen-app/dist/assets/index-CUOi61z4.js - `})]}):e===`failed`?(0,$.jsx)(`span`,{style:{fontSize:11,color:`#ef4444`},children:`失败`}):e===`completed`&&t.finalVideoUrl?(0,$.jsx)(`span`,{style:{fontSize:11,color:`#10b981`},children:`任务完成`}):null})()]})]})]},t.id))}),(0,$.jsx)(`div`,{style:{paddingTop:20,paddingBottom:20,display:`flex`,justifyContent:`center`},children:(0,$.jsx)(KK,{current:p,pageSize:h,total:_,onChange:U,showSizeChanger:!1,showQuickJumper:!1,showTotal:e=>`共 ${e} 条`,itemRender:(e,t,n)=>t===`prev`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid #e5e7eb`,borderRadius:6,background:p===1?`#f9fafb`:`#fff`,cursor:p===1?`not-allowed`:`pointer`,color:p===1?`#d1d5db`:`#6b7280`,fontSize:14},disabled:p===1,children:`‹`}):t===`next`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid #e5e7eb`,borderRadius:6,background:p>=Math.ceil(_/h)?`#f9fafb`:`#fff`,cursor:p>=Math.ceil(_/h)?`not-allowed`:`pointer`,color:p>=Math.ceil(_/h)?`#d1d5db`:`#6b7280`,fontSize:14},disabled:p>=Math.ceil(_/h),children:`›`}):t===`page`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`none`,borderRadius:6,background:e===p?`#6366f1`:`#fff`,color:e===p?`#fff`:`#374151`,fontWeight:e===p?500:400,cursor:`pointer`,fontSize:14},children:e}):n})})]}):(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`40px`},children:[(0,$.jsxs)(`div`,{style:{width:120,height:120,display:`flex`,alignItems:`center`,justifyContent:`center`,marginBottom:24,position:`relative`},children:[(0,$.jsx)(`div`,{style:{width:60,height:60,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:20,position:`absolute`,bottom:0,right:10}}),(0,$.jsx)(`div`,{style:{width:50,height:50,border:`2px solid rgba(99, 102, 241, 0.2)`,borderRadius:16,position:`absolute`,top:0,left:10}}),(0,$.jsx)(`div`,{style:{width:56,height:56,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:18,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 24px rgba(99, 102, 241, 0.25)`},children:(0,$.jsx)(q8,{style:{fontSize:28,color:`#fff`}})})]}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:600,color:`#1e293b`,marginBottom:8},children:`暂无生成内容`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#64748b`,textAlign:`center`,padding:`0 40px`,lineHeight:1.6},children:`请完善素材与卖点,生成专属爆款开头复刻视频`})]})})]}),(0,$.jsx)(`div`,{className:`replication-form`,style:{flex:1,overflow:`auto`,width:`28%`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,position:`relative`,zIndex:10},children:(0,$.jsxs)(`div`,{className:`replication-form-content`,style:{width:`100%`,height:`100%`,background:`rgba(248, 250, 252, 0.5)`,padding:24,overflowY:`auto`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10},children:`上传复刻视频`}),O?(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`video`,{src:O,controls:!0,style:{width:`100%`,borderRadius:12,maxHeight:200,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`}}),(0,$.jsx)(`button`,{onClick:()=>{O&&URL.revokeObjectURL(O),D(null),k(``)},style:{position:`absolute`,top:8,right:8,width:28,height:28,border:`none`,background:`rgba(239, 68, 68, 0.9)`,borderRadius:`50%`,cursor:`pointer`,color:`#fff`,fontSize:16,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10,transition:`all 0.2s`},children:`×`}),(0,$.jsxs)(`div`,{style:{marginTop:10,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(q8,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#475569`},children:E?.name}),(0,$.jsxs)(`span`,{style:{fontSize:11,color:`#94a3b8`},children:[`(`,E?.size?(E.size/1024/1024).toFixed(2):0,`MB)`]})]})]}):(0,$.jsx)(C0,{beforeUpload:async e=>{if(!e.type.startsWith(`video/`))return Z.error(`只能上传视频文件`),!1;if(!(e.size/1024/1024<50))return Z.error(`视频大小不能超过50MB`),!1;let t=document.createElement(`video`);return t.preload=`metadata`,new Promise(n=>{t.onloadedmetadata=async()=>{if(t.duration<2){Z.error(`视频时长不能少于2秒`),URL.revokeObjectURL(t.src),n(!1);return}if(t.duration>=16){Z.error(`视频时长不能超过15秒`),URL.revokeObjectURL(t.src),n(!1);return}F(!0);try{let t=await B5(e);D(e),k(`http://ceshi.apiforeign.minzhong.cn${t.url}`),Z.success(`视频上传成功`),n(!1)}catch(e){let t=``;if(e instanceof Error)try{t=JSON.parse(e.message).detail||e.message}catch{t=e.message}Z.error(t||`视频上传失败`),n(!1)}finally{F(!1),URL.revokeObjectURL(t.src)}},t.onerror=()=>{Z.error(`视频文件无效`),URL.revokeObjectURL(t.src),n(!1)},t.src=URL.createObjectURL(e)})},showUploadList:!1,accept:`video/mp4,video/quicktime,.mp4,.mov`,children:(0,$.jsx)(`div`,{style:{border:`2px dashed rgba(99, 102, 241, 0.3)`,borderRadius:12,padding:24,textAlign:`center`,cursor:`pointer`,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`,background:`rgba(99, 102, 241, 0.02)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.02)`},children:P?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{width:40,height:40,margin:`0 auto 12px`,border:`3px solid rgba(99, 102, 241, 0.2)`,borderTopColor:`#6366f1`,borderRadius:`50%`,animation:`spin 1s linear infinite`}}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#6366f1`,fontWeight:500},children:`上传中...`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持的文件类型:MP4、MOV | 视频最大时长:15 秒 | 最大大小:50M`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:48,height:48,margin:`0 auto 12px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:16,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(q8,{style:{fontSize:24,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#475569`,fontWeight:500},children:`点击或拖拽上传视频`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持的文件类型:MP4、MOV | 视频最大时长:15 秒 | 最大大小:50M`})]})})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10},children:`上传产品图片`}),M?(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`img`,{src:M,alt:`产品图片`,style:{width:`100%`,borderRadius:12,maxHeight:200,objectFit:`contain`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`}}),(0,$.jsx)(`button`,{onClick:()=>{M&&URL.revokeObjectURL(M),j(null),N(``)},style:{position:`absolute`,top:8,right:8,width:28,height:28,border:`none`,background:`rgba(239, 68, 68, 0.9)`,borderRadius:`50%`,cursor:`pointer`,color:`#fff`,fontSize:16,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10,transition:`all 0.2s`},children:`×`}),(0,$.jsxs)(`div`,{style:{marginTop:10,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(d6,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#475569`},children:A?.name}),(0,$.jsxs)(`span`,{style:{fontSize:11,color:`#94a3b8`},children:[`(`,A?.size?(A.size/1024/1024).toFixed(2):0,`MB)`]})]})]}):(0,$.jsx)(C0,{beforeUpload:async e=>{if(!e.type.startsWith(`image/`))return Z.error(`只能上传图片文件`),!1;if(!(e.size/1024/1024<10))return Z.error(`图片大小不能超过10MB`),!1;let t=new Image;return new Promise(n=>{t.onload=async()=>{let r=t.width/t.height;Math.abs(r-.75)<.1||Math.abs(r-.5625),L(!0);try{let t=await z5(e);j(e),N(`http://ceshi.apiforeign.minzhong.cn${t.url}`),Z.success(`图片上传成功`),n(!1)}catch(e){let t=``;if(e instanceof Error)try{t=JSON.parse(e.message).detail||e.message}catch{t=e.message}Z.error(t||`图片上传失败`),n(!1)}finally{L(!1),URL.revokeObjectURL(t.src)}},t.onerror=()=>{Z.error(`图片文件无效`),URL.revokeObjectURL(t.src),n(!1)},t.src=URL.createObjectURL(e)})},showUploadList:!1,accept:`image/jpeg,image/jpg,image/png,.jpg,.jpeg,.png`,children:(0,$.jsx)(`div`,{style:{border:`2px dashed rgba(99, 102, 241, 0.3)`,borderRadius:12,padding:20,textAlign:`center`,cursor:`pointer`,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`,background:`rgba(99, 102, 241, 0.02)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.02)`},children:I?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{width:36,height:36,margin:`0 auto 10px`,border:`3px solid rgba(99, 102, 241, 0.2)`,borderTopColor:`#6366f1`,borderRadius:`50%`,animation:`spin 1s linear infinite`}}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#6366f1`,fontWeight:500},children:`上传中...`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持 JPG, JPEG, PNG 格式,图片比例为 3:4 或 9:16 效果最佳`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:44,height:44,margin:`0 auto 10px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:14,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(d6,{style:{fontSize:22,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#475569`,fontWeight:500},children:`+ 点击上传`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持 JPG, JPEG, PNG 格式,图片比例为 3:4 或 9:16 效果最佳`})]})})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:`原视频产品名称`}),(0,$.jsx)(oK,{value:y,onChange:e=>b(e.target.value),placeholder:`请输入原视频产品名称`,style:{borderRadius:10,height:40,fontSize:13,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},maxLength:10,suffix:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[y.length,`/10`]})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:`自有产品名称`}),(0,$.jsx)(oK,{value:x,onChange:e=>C(e.target.value),placeholder:`请输入自有产品名称`,style:{borderRadius:10,height:40,fontSize:13,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},maxLength:10,suffix:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[x.length,`/10`]})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:24},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:`产品卖点`}),(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(wte,{value:w,onChange:e=>T(e.target.value),placeholder:`请输入产品卖点`,style:{borderRadius:10,fontSize:13,height:80,resize:`none`,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},rows:3,maxLength:30}),(0,$.jsxs)(`span`,{style:{position:`absolute`,right:10,bottom:8,color:`#94a3b8`,fontSize:12},children:[w.length,`/30`]})]})]}),(0,$.jsx)(bD,{type:`primary`,block:!0,size:`large`,onClick:()=>{if(!O){Z.warning(`请上传复刻视频`);return}if(!M){Z.warning(`请上传产品图片`);return}if(!y.trim()){Z.warning(`请输入原视频产品名称`);return}if(!x.trim()){Z.warning(`请输入自有产品名称`);return}if(!w.trim()){Z.warning(`请输入产品卖点`);return}m7({material_video_url:O,material_image_url:M,source_project_name:y,target_project_name:x,core_content_point:w,idempotency_key:Date.now().toString()}).then(t=>{let r=``,i=``;k(``),N(``),b(``),C(``),T(``),H(1,8),h7(1,20).then(t=>{if(t.items){let a=t.items[0].id;n(t.items),g7(t.items[0].id).then(t=>{r=t.id,i=t.steps[0].id,_7(r,i).then(t=>{Z.loading(`创建中...`,3),setTimeout(()=>{e(`/initial/${a}/initialinfo`)},3e3)})}).catch(e=>{})}}).catch(e=>{})}).catch(e=>{Z.error(`视频开头复刻失败`)})},style:{borderRadius:12,height:44,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`,border:`none`,fontSize:15,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.3)`,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`},children:`立即生成+`})]})}),(0,$.jsxs)(Rq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`创作记录`})]}),open:R,onCancel:()=>z(!1),width:850,footer:null,style:{borderRadius:20},styles:{body:{height:580,display:`flex`,flexDirection:`column`,padding:0},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,margin:`16px 24px`,flexShrink:0},children:[(0,$.jsx)(oK,{placeholder:`搜索产品名称`,value:l,onChange:e=>u(e.target.value),onPressEnter:ne,style:{width:220,borderRadius:10,marginRight:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`}}),(0,$.jsx)(bD,{type:`primary`,onClick:ne,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflow:`auto`,padding:`0 24px 24px`},children:(0,$.jsx)(`div`,{style:{background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(10px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.06)`},children:(0,$.jsx)(g$,{columns:[{title:`产品名称`,dataIndex:`targetProjectName`,key:`targetProjectName`,align:`center`,width:200,render:e=>(0,$.jsx)(`span`,{style:{fontSize:13,color:`#1e293b`,fontWeight:500},children:e||`-`})},{title:`状态`,dataIndex:`status`,key:`status`,align:`center`,width:220,render:(e,t)=>{let n=e,r=t.current_step_code||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#64748b`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else return{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#64748b`}})();return(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,align:`center`,width:200,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:12,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,width:120,render:(t,n)=>(0,$.jsx)(`button`,{onClick:()=>e(`/initial/${n.id}/initialinfo`),style:{color:`#6366f1`,textDecoration:`none`,fontSize:13,border:`none`,background:`rgba(99, 102, 241, 0.08)`,padding:`4px 12px`,borderRadius:8,cursor:`pointer`,transition:`all 0.2s`},children:`查看详情`})}],dataSource:t,rowKey:`id`,pagination:{current:r,pageSize:a,total:s,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:te,itemRender:(e,t,n)=>t===`prev`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid rgba(99, 102, 241, 0.15)`,borderRadius:8,background:r===1?`rgba(243, 244, 246, 0.5)`:`#fff`,cursor:r===1?`not-allowed`:`pointer`,color:r===1?`#94a3b8`:`#6366f1`,fontSize:14},disabled:r===1,children:`‹`}):t===`next`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid rgba(99, 102, 241, 0.15)`,borderRadius:8,background:r>=Math.ceil(s/a)?`rgba(243, 244, 246, 0.5)`:`#fff`,cursor:r>=Math.ceil(s/a)?`not-allowed`:`pointer`,color:r>=Math.ceil(s/a)?`#94a3b8`:`#6366f1`,fontSize:14},disabled:r>=Math.ceil(s/a),children:`›`}):t===`page`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`none`,borderRadius:8,background:e===r?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`:`#fff`,color:e===r?`#fff`:`#475569`,fontWeight:e===r?600:400,cursor:`pointer`,fontSize:14},children:e}):n},style:{fontSize:13},scroll:{y:350}})})})]})]})};function m9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function h9(e,...t){for(let n of t){let t=e[n];if(t!=null&&String(t).trim()!==``)return String(t)}return``}function g9(e,t,...n){for(let t of n){let n=e[t];if(n===!0||n===!1)return n;if(n===`true`)return!0;if(n===`false`)return!1}return t}function Ete(e,...t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t)&&t>0)return t;if(typeof t==`string`&&t.trim()){let e=Number(t);if(Number.isFinite(e)&&e>0)return e}}}function _9(e){if(!m9(e))return null;let t=h9(e,`key`);return t?{key:t,label:h9(e,`label`)||t,type:h9(e,`type`)||void 0,enabled:g9(e,!0,`enabled`),editable:g9(e,!0,`editable`),maxLength:Ete(e,`maxLength`,`max_length`)}:null}function v9(e){if(!m9(e))return null;let t=e.data;return m9(t)?t:Array.isArray(e.sections)?e:null}function Dte(e){return!!v9(e)}function y9(e){let t=v9(e);return(Array.isArray(t?.sections)?t.sections:[]).map(e=>{let t=_9(e);if(!t||!m9(e))return null;let n=Array.isArray(e.children)?e.children.map(_9).filter(Boolean):[],r=Array.isArray(e.itemFields)?e.itemFields.map(_9).filter(Boolean):Array.isArray(e.item_fields)?e.item_fields.map(_9).filter(Boolean):[];return{...t,contentKey:h9(e,`contentKey`,`content_key`)||void 0,children:n,itemFields:r}}).filter(e=>!!e&&e.enabled)}function b9(e){if(e==null)return``;if(typeof e==`object`)try{return JSON.stringify(e,null,2)}catch{return String(e)}return String(e)}function x9(e){let t=b9(e);return t.length>40||t.includes(` -`)||t.includes(`,`)||t.includes(`。`)||t.includes(`;`)||t.includes(`;`)}function S9(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function C9(e,t,n,r){let i=S9(e||{});return m9(i[t])||(i[t]={}),i[t][n]=r,i}function w9(e,t,n,r,i){let a=S9(e||{});return Array.isArray(a[t])||(a[t]=[]),m9(a[t][n])||(a[t][n]={}),a[t][n][r]=i,a}function T9(e,t){if(!m9(e))return`视频提示词不能为空`;let n=y9(t);if(!n.length)return`视频提词配置缺失,无法保存`;for(let t of n){if(!t.editable)continue;let n=e[t.key];if(t.type===`object`){if(!m9(n))continue;for(let e of t.children)if(!(!e.enabled||!e.editable||!e.maxLength)&&b9(n[e.key]).length>e.maxLength)return`字段【${t.label}.${e.label}】长度不能超过 ${e.maxLength} 个字符`;continue}if(t.type===`flow`){if(!Array.isArray(n))continue;for(let e=0;en.maxLength)return`字段【${t.label} 第 ${e+1} 项.${n.label}】长度不能超过 ${n.maxLength} 个字符`}}continue}if(t.editable&&t.maxLength&&b9(n).length>t.maxLength)return`字段【${t.label}】长度不能超过 ${t.maxLength} 个字符`}return null}var{Text:E9}=Q,{TextArea:D9}=oK;function O9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function k9({value:e}){let t=e===`true`?`是`:e===`false`?`否`:b9(e);return x9(e)?(0,$.jsx)(D9,{value:t,rows:Math.min(6,Math.max(2,Math.ceil(t.length/42))),disabled:!0,style:{borderRadius:8,color:`#64748b`}}):(0,$.jsx)(oK,{value:t,disabled:!0,style:{borderRadius:8,color:`#64748b`}})}function A9({value:e,maxLength:t,onChange:n}){let r=b9(e),i={value:r,maxLength:t,showCount:!!t,onChange:e=>n(e.target.value),style:{borderRadius:8}};return x9(e)?(0,$.jsx)(D9,{...i,rows:Math.min(8,Math.max(3,Math.ceil(r.length/42)))}):(0,$.jsx)(oK,{...i})}function j9({value:e,onChange:t}){let n=e===!0||e===`true`;return(0,$.jsxs)(RL.Group,{value:n,onChange:e=>t(e.target.value),style:{display:`flex`,gap:24},children:[(0,$.jsx)(RL,{value:!0,style:{fontSize:14,color:`#475569`},children:`是`}),(0,$.jsx)(RL,{value:!1,style:{fontSize:14,color:`#475569`},children:`否`})]})}var M9=({value:e,schemaConfigSnapshot:t,onChange:n})=>{let r=O9(e)?e:{},i=y9(t);if(!Dte(t))return(0,$.jsxs)(jU,{direction:`vertical`,size:12,style:{width:`100%`},children:[(0,$.jsx)(Kf,{type:`warning`,showIcon:!0,message:`视频提词配置缺失,暂不能编辑`,description:`请刷新详情后重试;如果仍然缺失,请联系管理员排查第4步 schema_config_snapshot 返回。`}),Object.keys(r).length?(0,$.jsx)(`pre`,{style:{margin:0,padding:12,borderRadius:10,background:`#f8fafc`,maxHeight:420,overflow:`auto`,color:`#475569`},children:JSON.stringify(r,null,2)}):null]});if(!i.length)return(0,$.jsx)(Kf,{type:`warning`,showIcon:!0,message:`视频提词配置为空`,description:`当前 Schema 配置没有可展示字段。`});let a=e=>{let t=O9(r[e.key])?r[e.key]:{},i=e.children.filter(e=>e.enabled);return i.length?(0,$.jsxs)(`div`,{style:{marginBottom:18},children:[(0,$.jsx)(jU,{style:{marginBottom:8},children:(0,$.jsx)(E9,{strong:!0,style:{color:`#334155`,fontSize:13},children:e.label})}),(0,$.jsx)(`div`,{style:{borderLeft:`3px solid #6366f1`,paddingLeft:12,marginLeft:4},children:i.map(i=>(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsx)(jU,{style:{marginBottom:4},children:(0,$.jsx)(E9,{style:{color:`#64748b`,fontSize:12},children:i.label})}),i.editable?i.type===`boolean`?(0,$.jsx)(j9,{value:t[i.key],onChange:t=>n(C9(r,e.key,i.key,t))}):(0,$.jsx)(A9,{value:t[i.key],maxLength:i.maxLength,onChange:t=>n(C9(r,e.key,i.key,t))}):(0,$.jsx)(k9,{value:t[i.key]})]},i.key))})]},e.key):null},o=e=>{let t=Array.isArray(r[e.key])?r[e.key]:[],i=[{key:`时间段`,label:`时间段`,enabled:!0,editable:!1},...e.itemFields.filter(e=>e.enabled)];return(0,$.jsxs)(`div`,{style:{marginBottom:18},children:[(0,$.jsxs)(jU,{style:{marginBottom:8},children:[(0,$.jsx)(E9,{strong:!0,style:{color:`#334155`,fontSize:13},children:e.label}),(0,$.jsx)(k$,{color:`default`,children:`锁定条目和时间段`})]}),(0,$.jsx)(`div`,{style:{border:`1px solid #e5e7eb`,borderRadius:10,padding:12,background:`#fff`},children:t.length===0?(0,$.jsx)(E9,{style:{color:`#94a3b8`,fontSize:12},children:`暂无内容`}):t.map((a,o)=>{let s=O9(a)?a:{};return(0,$.jsxs)(`div`,{style:{marginBottom:o===t.length-1?0:14,paddingBottom:o===t.length-1?0:14,borderBottom:o===t.length-1?`none`:`1px dashed #e2e8f0`},children:[(0,$.jsxs)(E9,{strong:!0,style:{display:`block`,marginBottom:8,color:`#475569`,fontSize:12},children:[`第 `,o+1,` 段`]}),i.map(t=>(0,$.jsxs)(`div`,{style:{marginBottom:10},children:[(0,$.jsx)(jU,{style:{marginBottom:4},children:(0,$.jsx)(E9,{style:{color:`#64748b`,fontSize:12},children:t.label})}),t.editable?t.type===`boolean`?(0,$.jsx)(j9,{value:s[t.key],onChange:i=>n(w9(r,e.key,o,t.key,i))}):(0,$.jsx)(A9,{value:s[t.key],maxLength:t.maxLength,onChange:i=>n(w9(r,e.key,o,t.key,i))}):(0,$.jsx)(k9,{value:s[t.key]})]},t.key))]},`${e.key}-${o}`)})})]},e.key)},s=e=>e.key in r?(0,$.jsxs)(`div`,{style:{marginBottom:18},children:[(0,$.jsx)(jU,{style:{marginBottom:8},children:(0,$.jsx)(E9,{strong:!0,style:{color:`#334155`,fontSize:13},children:e.label})}),e.editable?(0,$.jsx)(A9,{value:r[e.key],maxLength:e.maxLength,onChange:t=>{let i=S9(r);i[e.key]=t,n(i)}}):(0,$.jsx)(k9,{value:r[e.key]})]},e.key):null;return(0,$.jsx)(`div`,{children:i.map(e=>e.key in r?e.type===`object`?a(e):e.type===`flow`?o(e):s(e):null)})},{Title:Ote,Text:N9}=Q,{TextArea:kte}=oK;function Ate(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function jte(){let e=Je(),{creatID:t}=Qe(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(`image`),[u,d]=(0,S.useState)({}),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(``),[g,_]=(0,S.useState)(!1),[v,y]=(0,S.useState)(null),[b,x]=(0,S.useState)({}),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(5),[j,M]=(0,S.useState)(`16:9`),[N,P]=(0,S.useState)(`480p`),[F,I]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]}),[L,R]=(0,S.useState)([]),[z,B]=(0,S.useState)(1),[V,H]=(0,S.useState)(20),[U,ee]=(0,S.useState)(0),[te,ne]=(0,S.useState)(``),[W,re]=(0,S.useState)({}),[G,K]=(0,S.useState)([]),[q,ie]=(0,S.useState)([]),J=[{id:1,title:`原始素材`,description:`上传原始视频素材`,childId:1},{id:2,title:`生成提示词`,description:`根据素材生成描述词`,childId:2},{id:3,title:`生成产品融合图`,description:`生成产品与场景融合图`,childId:3},{id:4,title:`生成视频提示词`,description:`生成视频生成提示词`,childId:4},{id:5,title:`生成最终视频`,description:`合成最终视频`,childId:5}].map((e,t)=>({...e,status:G[t]?.status||``,id:G[t]?.id||t,output:G[t]?.output||``,engineId:G[t]?.input?.payload?.videoConfig?.engineId||``}));(0,S.useEffect)(()=>{let e=new Set;q.forEach(t=>{let n=J.find(e=>String(e.childId)===t);n&&(n.status===`completed`||n.status===`failed`)&&e.add(t)});for(let t=J.length-1;t>=0;t--)if(J[t].status===`completed`||J[t].status===`failed`){e.add(String(J[t].childId));break}e.size>0?ie(Array.from(e)):ie([])},[G]);let ae=(e,t,n)=>{h7(e,t,n).then(e=>{e.items&&R(e.items),e.total!==void 0&&ee(e.total)}).catch(e=>{})},oe=(e,t)=>{B(e),H(t),ae(e,t,te)},se=()=>{B(1),ae(1,V,te)};(0,S.useEffect)(()=>{ae(z,V)},[]),(0,S.useEffect)(()=>{s7().then(e=>{if(x(e.engine||{}),e.engine?.video&&e.engine.video.length>0){w(e.engine.video[0].id);let t=e.engine.video[0];I({ratios:t.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions||[`480p`,`720p`,`1080p`],durations:t.supportedDurations||[5,8,10,12,15]})}}).catch(e=>{})},[]),(0,S.useEffect)(()=>()=>{v&&(clearInterval(v),y(null))},[v]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;!t.closest(`.image-settings-trigger`)&&!t.closest(`.image-settings-popover`)&&(E(!1),O(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,S.useEffect)(()=>{t&&g7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},[t]),(0,S.useEffect)(()=>{let e=J[4];e&&e.status!==`completed`&&e.status!==`failed`?v||y(setInterval(ue,15e3)):e&&v&&(clearInterval(v),y(null))},[J]);let ce=(e,t,n,i)=>{l(t||`image`),h(n?String(n):``),t===`video`?(p(i||null),d(e&&typeof e==`object`?Ate(e):{}),a(``)):(p(null),a(e||``),d({})),r(!0)},le=async()=>{if(c===`image`){if(!W?.id||!m){Z.warning(`缺少任务或步骤 ID,无法保存图片提示词`);return}if(!i||!i.trim()){Z.warning(`图片提示词不能为空`);return}_(!0);try{await v7(W.id,m,{prompt:i.trim()}),Z.success(`图片提示词已保存`),de(),r(!1),h(``)}catch(e){Z.error(e?.message||`保存图片提示词失败`)}finally{_(!1)}return}if(!W?.id||!m){Z.warning(`缺少任务或步骤 ID,无法保存视频提示词`);return}if(!u||typeof u!=`object`||Object.keys(u).length===0){Z.warning(`视频提示词不能为空`);return}if(!f){Z.warning(`视频提词配置缺失,暂不能保存`);return}let e=T9(u,f);if(e){Z.warning(e);return}_(!0);try{await D7(W.id,m,{prompt_schema:u}),Z.success(`视频提示词已保存`),de(),r(!1),h(``)}catch(e){Z.error(e?.message||`保存视频提示词失败`)}finally{_(!1)}},ue=()=>{t&&g7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},de=()=>{t&&g7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},fe=e=>{y7(W.id,e.toString(),{engine_id:`0019e3dac0b795b925b`,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`}).then(e=>{de()}).catch(e=>{})},pe=()=>{y7(W.id,J[1].id.toString(),{engine_id:`0019e3dac0b795b925b`,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`}).then(e=>{de()}).catch(e=>{})},me=e=>{let t={engine_id:C,duration:k,aspect_ratio:j,resolution:N,target_platform:`抖音`};b7(W.id,e.toString(),t).then(e=>{de()}).catch(e=>{})},he=(e,t)=>{let n={engine_id:t};x7(W.id,e.toString(),n).then(e=>{de()}).catch(e=>{})},ge=()=>{let e={engine_id:J[3].engineId};x7(W.id,J[2].id.toString(),e).then(e=>{de()}).catch(e=>{})};return(0,$.jsxs)(S.Fragment,{children:[(0,$.jsx)(`div`,{className:`initialinfo-container`,style:{margin:`-24px -32px -32px`,height:`calc(100vh - 34px)`,position:`relative`,boxSizing:`border-box`,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:`2%`,position:`relative`,zIndex:1,minHeight:0},children:[(0,$.jsxs)(`div`,{className:`replication-preview`,style:{flex:4,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,boxSizing:`border-box`},children:[(0,$.jsx)(bD,{type:`text`,icon:(0,$.jsx)(b2,{}),onClick:()=>e(-1),style:{color:`#64748b`,borderRadius:10,fontSize:13,height:32,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`},children:`返回`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`爆款开头复刻 - 任务详情`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(bD,{type:`primary`,ghost:!0,style:{borderRadius:10,padding:`4px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},onClick:()=>s(!0),children:`创作记录`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`},children:(0,$.jsxs)(`div`,{className:`material_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,alignItems:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:W?.material?.materialVideoUrl?(0,$.jsx)(`video`,{controls:!0,src:W.material.materialVideoUrl,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无视频`})})]}),(0,$.jsxs)(`div`,{className:`product_img`,style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`产品图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:W?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:W.material.materialImageUrl,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无图片`})})]})]}),W?.finalImageUrl&&(0,$.jsx)(`div`,{style:{marginTop:16},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalImageUrl}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})}),W?.finalVideoUrl&&(0,$.jsx)(`div`,{style:{marginTop:16},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(`video`,{controls:!0,src:`http://ceshi.apiforeign.minzhong.cn${W.finalVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})})]})})]}),(0,$.jsxs)(`div`,{className:`replication-form`,style:{flex:1,minWidth:`450px`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,gap:10,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`生成步骤`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px 16px 16px`},children:(0,$.jsx)(r_,{activeKey:q,onChange:ie,ghost:!0,bordered:!1,style:{background:`transparent`},expandIconPlacement:`end`,items:J.map(e=>({key:String(e.childId),label:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,width:`100%`,justifyContent:`space-between`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:16,height:16},children:e.status===`completed`?(0,$.jsx)(c4,{style:{fontSize:16,color:`#22c55e`}}):e.status===`processing`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,background:`#ef4444`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:`#fff`,fontSize:10},children:`×`})}):(0,$.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:`#cbd5e1`}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:e.status===`processing`||e.status===`waiting_user`?`#6366f1`:`#1e293b`,fontWeight:500},children:e.title}),(e.status===`processing`||e.status===`waiting_user`)&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`,marginLeft:8},children:`生成中`}),e.status===`failed`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`,marginLeft:8},children:`失败`}),e.status===``&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#717d8b`,marginLeft:8},children:`待生成`})]})}),children:(0,$.jsxs)(`div`,{style:{padding:`16px`,background:`linear-gradient(135deg, rgba(248,250,252,0.6) 0%, rgba(238,242,255,0.4) 100%)`,borderRadius:12,marginTop:8,border:`1px solid rgba(99, 102, 241, 0.06)`},children:[e.childId===1&&(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,marginBottom:20,alignItems:`flex-start`,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(N9,{style:{color:`#475569`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`原视频`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},children:W?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:W.material.materialVideoUrl,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10},controls:!0}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,height:`16`,rx:`2`,ry:`2`}),(0,$.jsx)(`path`,{d:`M8 12l4 2 4-2`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无视频`})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(N9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`产品图片`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:10,background:`#f1f5f9`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:W?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:W.material.materialImageUrl,alt:`产品图片`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10}}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,$.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`,fill:`currentColor`}),(0,$.jsx)(`path`,{d:`M21 15l-5-5L5 21`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无图片`})]})})]})]})}),e.childId===2&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(N9,{style:{color:`#475569`,fontSize:13,lineHeight:1.8,whiteSpace:`pre-wrap`},children:e?.output?.payload?.prompt||`暂无提示词`})}),(0,$.jsxs)(jU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(bD,{type:`default`,icon:(0,$.jsx)(F$,{}),onClick:()=>ce(e?.output?.payload?.prompt,`image`,e.id),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`修改提示词`}),(0,$.jsx)(bD,{onClick:()=>{Z.info(`正在生成图片,请稍候...`),fe(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片`})]})]}),e.childId===3&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`,position:`relative`},children:[W.finalImageUrl?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalImageUrl}`,alt:`融合图`,style:{width:`100%`,height:180,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无融合图`}),(0,$.jsx)(bD,{type:`default`,icon:(0,$.jsx)(F$,{}),onClick:()=>pe(),disabled:e.status!==`completed`,style:{position:`absolute`,bottom:8,left:8,borderRadius:8,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:30,fontWeight:500,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(4px)`,padding:`0 12px`,fontSize:12},children:`重新生成`})]}),(0,$.jsx)(`p`,{style:{marginBottom:6,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`视频参数选择:`}),(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{E(!T),O(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(q6,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(N9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:b.video?.find(e=>e.id===C)?.name||`选择引擎`})]}),T&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-10,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(N9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:b.video?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{w(e.id),I({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(j)||M(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(N)||P(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(k)||A(e.supportedDurations?.[0]||5),E(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:C===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:C===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:C===e.id?600:500,color:C===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{O(!D),E(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(M3,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(N9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[j,` · `,k,`s · `,N]})]}),D&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(N9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:F.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>M(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:j===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:j===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${j===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:j===e?`#6366f1`:`#6b7280`,fontWeight:j===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(N9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(k-Math.min(...F.durations))/(Math.max(...F.durations)-Math.min(...F.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...F.durations),max:Math.max(...F.durations),value:k,onChange:e=>A(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:k}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(N9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:F.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>P(e),style:{flex:1,height:42,borderRadius:6,border:N===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:N===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:N===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(bD,{type:`primary`,style:{width:`100%`,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},onClick:()=>{Z.info(`正在生成视频提示词,请稍候...`),me(e.id)},disabled:e.status!==`completed`,children:`下一步:生成视频提示词`})]}),e.childId===4&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(N9,{style:{color:`#64748b`,fontSize:13,lineHeight:1.8},children:`视频提词已生成,可点击按钮查看/修改`})}),(0,$.jsxs)(jU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(bD,{type:`default`,icon:(0,$.jsx)(F$,{}),onClick:()=>ce(W?.videoGeneration?.promptSchema,`video`,e.id,W?.videoGeneration?.schemaConfigSnapshot),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`||!W?.videoGeneration?.promptSchema||!W?.videoGeneration?.schemaConfigSnapshot,children:`查看/修改视频提词`}),(0,$.jsx)(bD,{onClick:()=>{Z.info(`正在生成视频,请稍候...`),he(e.id,e.engineId)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成视频`})]})]}),e.childId===5&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,position:`relative`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},children:e.status===`completed`&&W?.finalVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalVideoUrl}`,style:{width:`100%`,height:180,objectFit:`cover`},controls:!0}):e.status===`processing`?(0,$.jsxs)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:20,height:20,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}),(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontSize:14},children:`视频生成中...`})]}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#ef4444`,fontSize:14},children:`视频生成失败`}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无视频`})}),(0,$.jsxs)(jU,{style:{width:`100%`,gap:12},children:[(0,$.jsx)(bD,{onClick:()=>ge(),type:`default`,icon:(0,$.jsx)(F$,{}),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`重新生成`}),(0,$.jsx)(bD,{type:`primary`,icon:(0,$.jsx)(_0,{}),style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,onClick:()=>{let e=`http://ceshi.apiforeign.minzhong.cn${W?.finalVideoUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=`video_${Date.now()}.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},children:`下载视频`})]})]})]})}))})})]})]})}),(0,$.jsx)(Rq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:c===`video`?`查看/编辑视频提词`:`修改提示词`})]}),open:n,onCancel:()=>{g||r(!1)},footer:[(0,$.jsx)(bD,{onClick:()=>r(!1),disabled:g,style:{borderRadius:8},children:`取消`},`cancel`),(0,$.jsx)(bD,{type:`primary`,onClick:le,loading:g,disabled:g,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`确认`},`confirm`)],width:800,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`},body:{background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,padding:`20px 24px`}},children:c===`image`?(0,$.jsx)(kte,{value:i,onChange:e=>a(e.target.value),rows:8,style:{width:`100%`,height:300,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},placeholder:`请输入提示词`}):(0,$.jsx)(`div`,{style:{maxHeight:500,overflowY:`auto`,paddingRight:10},children:(0,$.jsx)(M9,{value:u,schemaConfigSnapshot:f,onChange:d})})}),(0,$.jsxs)(Rq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`创作记录`})]}),open:o,onCancel:()=>s(!1),width:850,footer:null,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`},body:{background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginBottom:16},children:[(0,$.jsx)(oK,{placeholder:`搜索产品名称`,value:te,onChange:e=>ne(e.target.value),onPressEnter:se,style:{width:200,borderRadius:8,marginRight:8,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`}}),(0,$.jsx)(bD,{type:`primary`,onClick:se,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},children:`搜索`})]}),(0,$.jsx)(g$,{columns:[{title:`产品名称`,dataIndex:`targetProjectName`,key:`targetProjectName`,align:`center`},{title:`状态`,dataIndex:`status`,key:`status`,align:`center`,render:(e,t)=>{let n=e,r=t.current_step_code||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#666`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else return{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#666`}})();return typeof i==`string`?(0,$.jsx)(`span`,{style:{fontSize:12,color:`#666`,fontWeight:500},children:i}):(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,align:`center`,render:e=>{if(!e)return`-`;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`}},{title:`操作`,key:`action`,align:`center`,render:(t,n)=>(0,$.jsx)(`button`,{onClick:()=>e(`/initial/${n.id}/initialinfo`),style:{color:`#6366f1`,textDecoration:`none`,fontSize:12,border:`none`,background:`rgba(99, 102, 241, 0.08)`,padding:`4px 12px`,borderRadius:8,cursor:`pointer`,transition:`all 0.2s`,fontWeight:500},children:`查看详情`})}],dataSource:L,rowKey:`id`,pagination:{current:z,pageSize:V,total:U,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:oe},style:{fontSize:13},scroll:{y:350}})]})]})}function Mte(){let e=Je(),[t,n]=(0,S.useState)(``),[r,i]=(0,S.useState)(``),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(``),[l,u]=(0,S.useState)(0),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)(1),[_,v]=(0,S.useState)(10),[y,b]=(0,S.useState)(0),[x,C]=(0,S.useState)(``),w=(0,S.useRef)(null),T=(0,S.useRef)(null),E=(0,S.useCallback)(()=>{t&&URL.revokeObjectURL(t),n(``),i(``),u(0),c(``)},[t]),D=async e=>{if(!e.type.startsWith(`video/`))return i(`请选择视频文件`),!1;if(e.size>100*1024*1024)return i(`视频文件大小不能超过 100MB`),!1;if(await new Promise(t=>{let n=document.createElement(`video`);n.preload=`metadata`,n.onloadedmetadata=()=>{t(n.duration),URL.revokeObjectURL(n.src)},n.onerror=()=>{t(0)},n.src=URL.createObjectURL(e)})>60)return i(`视频时长不能超过 1分钟`),!1;E(),f(!0);try{n((await B5(e)).url),i(``),Z.success(`视频上传成功`)}catch{i(`视频上传失败,请重试`),Z.error(`视频上传失败`)}finally{f(!1)}return!1},O=(0,S.useCallback)(()=>{w.current&&u(w.current.duration)},[]),k=async()=>{if(!t||!s.trim()){Z.warning(`请先上传视频并输入产品名称`);return}f(!0);try{O7({video_url:t,video_duration_seconds:l,title:s.trim(),idempotency_key:`shot_${Date.now()}`}).then(t=>{k7(1,20,x).then(t=>{Z.loading(`创建中...`,3),setTimeout(()=>{e(`/removelens/${t.items[0].id}/removeinfo`)},3e3)})}),E()}catch{Z.error(`任务创建失败,请重试`)}finally{f(!1)}},A=async(e,t,n)=>{try{let r=await k7(e,t,n);m(r.items||[]),b(r.total||0),g(e),v(t)}catch{Z.error(`获取列表失败`)}},j=(e,t)=>{A(e,t,x)},M=()=>{A(1,10,x)};return(0,$.jsx)(`div`,{style:{margin:`-24px -32px -32px`,borderRadius:20,minHeight:`calc(100vh - 34px)`,overflow:`auto`,background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,position:`relative`,padding:`20px 32px`,backgroundImage:`url(${hte})`,backgroundRepeat:`no-repeat`,backgroundSize:`100% 100%`,backgroundPosition:`center`},children:(0,$.jsxs)(`div`,{style:{maxWidth:1200,margin:`50px auto`,position:`relative`,zIndex:10},children:[(0,$.jsxs)(`div`,{style:{marginBottom:50,height:160,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(`div`,{style:{width:40,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h1`,{style:{fontSize:24,fontWeight:700,margin:0,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`AI视频拆镜工作台`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`一键拆解画面分镜,助力仿拍或创作`})]}),(0,$.jsx)(`div`,{style:{width:40,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(bD,{type:`text`,icon:(0,$.jsx)(IU,{}),onClick:()=>{o(!0),A(1,10,x)},style:{fontSize:14,color:`#6366f1`,background:`rgba(99, 102, 241, 0.1)`,borderRadius:12,padding:`10px 20px`,display:`flex`,alignItems:`center`,gap:8,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`},children:`创作记录`})]}),(0,$.jsxs)(`div`,{style:{width:`100%`,maxWidth:720,margin:`0 auto`},children:[r&&(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(239, 68, 68, 0.2)`,borderRadius:12,padding:`14px 20px`,marginBottom:24,color:`#ef4444`,fontSize:14,textAlign:`center`,fontWeight:500},children:r}),!t&&(0,$.jsxs)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%)`,backdropFilter:`blur(20px)`,borderRadius:24,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(C0.Dragger,{accept:`video/*`,beforeUpload:D,showUploadList:!1,disabled:d,style:{background:d?`rgba(243, 244, 246, 0.3)`:`transparent`,border:`2px dashed ${d?`rgba(209, 213, 219, 0.5)`:`rgba(99, 102, 241, 0.3)`}`,borderRadius:24,padding:`56px 20px`,cursor:d?`not-allowed`:`pointer`,margin:0},children:d?(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:100,height:100,margin:`0 auto 20px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:24,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:40,height:40,border:`4px solid #6366f1`,borderTopColor:`transparent`,borderRadius:`50%`,animation:`spin 1s linear infinite`}})}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#6366f1`,margin:`0 0 8px 0`,fontWeight:600},children:`上传中...`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:0},children:`请稍候,视频正在上传`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:100,height:100,margin:`0 auto 20px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:24,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(b4,{style:{fontSize:40,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#1e293b`,margin:`0 0 8px 0`,fontWeight:600},children:`点击或拖拽到此上传视频文件`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:0},children:`支持 MP4、MOV 格式视频,最大支持 100MB 的文件,支持上传 1 分钟内的视频`})]})})]}),t&&(0,$.jsxs)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%)`,backdropFilter:`blur(20px)`,borderRadius:24,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,overflow:`hidden`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsxs)(`div`,{style:{borderRadius:22,background:`#ffffff`,padding:`24px`,position:`relative`,zIndex:1},children:[(0,$.jsx)(Hq,{title:`确定要删除吗?`,okText:`确定`,cancelText:`取消`,onConfirm:E,children:(0,$.jsx)(`button`,{style:{position:`absolute`,top:20,right:20,width:36,height:36,border:`1px solid rgba(99, 102, 241, 0.2)`,background:`rgba(99, 102, 241, 0.05)`,borderRadius:10,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:16,color:`#6366f1`,zIndex:10,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`,e.currentTarget.style.borderColor=`rgba(239, 68, 68, 0.3)`,e.currentTarget.style.color=`#ef4444`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`,e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.2)`,e.currentTarget.style.color=`#6366f1`},children:`🗑️`})}),(0,$.jsx)(`div`,{style:{textAlign:`center`,marginBottom:20},children:(0,$.jsx)(`video`,{ref:w,src:`http://ceshi.apiforeign.minzhong.cn${t}`,controls:!0,onLoadedMetadata:O,style:{maxWidth:`100%`,maxHeight:320,borderRadius:12,background:`#000`,boxShadow:`0 4px 16px rgba(0,0,0,0.1)`}})}),(0,$.jsxs)(`div`,{style:{marginBottom:24},children:[(0,$.jsxs)(`label`,{style:{display:`block`,fontSize:14,fontWeight:500,color:`#334155`,marginBottom:8},children:[`产品名称 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(oK,{placeholder:`请输入产品名称`,value:s,onChange:e=>c(e.target.value),style:{width:`100%`,height:44,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.4)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.2)`}})]}),(0,$.jsx)(`div`,{style:{textAlign:`center`,marginTop:16},children:(0,$.jsx)(`button`,{onClick:k,disabled:!t||!s.trim()||d,style:{padding:`14px 56px`,background:t&&s.trim()&&!d?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`:`#e2e8f0`,color:`white`,border:`none`,borderRadius:12,fontSize:15,fontWeight:600,cursor:t&&s.trim()&&!d?`pointer`:`not-allowed`,boxShadow:t&&s.trim()&&!d?`0 6px 20px rgba(99, 102, 241, 0.3)`:`none`,display:`inline-flex`,alignItems:`center`,gap:10,transition:`all 0.3s ease`},onMouseEnter:e=>{t&&s.trim()&&!d&&(e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 8px 25px rgba(99, 102, 241, 0.4)`)},onMouseLeave:e=>{t&&s.trim()&&!d&&(e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.3)`)},children:(0,$.jsx)(`span`,{children:d?`创建中...`:`创建`})})})]})]}),(0,$.jsx)(`canvas`,{ref:T,style:{display:`none`}}),(0,$.jsxs)(Rq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`创作记录`})]}),open:a,onCancel:()=>o(!1),width:800,footer:null,styles:{body:{background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginBottom:16,gap:8},children:[(0,$.jsx)(oK,{placeholder:`搜索产品名称`,value:x,onChange:e=>C(e.target.value),onPressEnter:M,style:{width:200,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,height:40}}),(0,$.jsx)(bD,{type:`primary`,onClick:M,style:{borderRadius:10,height:40,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%)`,backdropFilter:`blur(20px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(g$,{columns:[{title:`产品名称`,dataIndex:`title`,key:`title`,render:e=>(0,$.jsx)(`span`,{style:{fontSize:14,color:`#1e293b`,fontWeight:500},children:e})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:13,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,render:t=>(0,$.jsx)(bD,{type:`text`,onClick:()=>e(`/removelens/${t.id}/removeinfo`),style:{color:`#6366f1`,fontSize:13,padding:`4px 12px`,borderRadius:6,background:`rgba(99, 102, 241, 0.1)`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`},children:`查看详情`})}],dataSource:p,rowKey:`id`,pagination:{current:h,pageSize:_,total:y,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:j,style:{padding:`16px 24px`,borderTop:`1px solid rgba(99, 102, 241, 0.1)`}},style:{fontSize:13},scroll:{y:350},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(99, 102, 241, 0.03)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})})]})]})]})})}var Nte=c(o(((e,t)=>{(function(n){typeof e==`object`&&t!==void 0?t.exports=n():typeof define==`function`&&define.amd?define([],n):(typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this).JSZip=n()})(function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var c=typeof l==`function`&&l;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var u=Error(`Cannot find module '`+o+`'`);throw u.code=`MODULE_NOT_FOUND`,u}var d=n[o]={exports:{}};t[o][0].call(d.exports,function(e){var n=t[o][1][e];return i(n||e)},d,d.exports,e,t,n,r)}return n[o].exports}for(var a=typeof l==`function`&&l,o=0;o>2,s=(3&t)<<4|n>>4,c=1>6:64,l=2>4,n=(15&o)<<4|(s=a.indexOf(e.charAt(l++)))>>2,r=(3&s)<<6|(c=a.indexOf(e.charAt(l++))),f[u++]=t,s!==64&&(f[u++]=n),c!==64&&(f[u++]=r);return f}},{"./support":30,"./utils":32}],2:[function(e,t,n){var r=e(`./external`),i=e(`./stream/DataWorker`),a=e(`./stream/Crc32Probe`),o=e(`./stream/DataLengthProbe`);function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o(`data_length`)),t=this;return e.on(`end`,function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw Error(`Bug : uncompressed data size mismatch`)}),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo(`compressedSize`,this.compressedSize).withStreamInfo(`uncompressedSize`,this.uncompressedSize).withStreamInfo(`crc32`,this.crc32).withStreamInfo(`compression`,this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new a).pipe(new o(`uncompressedSize`)).pipe(t.compressWorker(n)).pipe(new o(`compressedSize`)).withStreamInfo(`compression`,t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){var r=e(`./stream/GenericWorker`);n.STORE={magic:`\0\0`,compressWorker:function(){return new r(`STORE compression`)},uncompressWorker:function(){return new r(`STORE decompression`)}},n.DEFLATE=e(`./flate`)},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){var r=e(`./utils`),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return e!==void 0&&e.length?r.getTypeOf(e)===`string`?function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){var r=null;r=typeof Promise<`u`?Promise:e(`lie`),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){var r=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Uint32Array<`u`,i=e(`pako`),a=e(`./utils`),o=e(`./stream/GenericWorker`),s=r?`uint8array`:`array`;function c(e,t){o.call(this,`FlateWorker/`+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic=`\b\0`,a.inherits(c,o),c.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(s,e.data),!1)},c.prototype.flush=function(){o.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new c(`Deflate`,e)},n.uncompressWorker=function(){return new c(`Inflate`,{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){function r(e,t){var n,r=``;for(n=0;n>>=8;return r}function i(e,t,n,i,o,u){var d,f,p=e.file,m=e.compression,h=u!==s.utf8encode,g=a.transformTo(`string`,u(p.name)),_=a.transformTo(`string`,s.utf8encode(p.name)),v=p.comment,y=a.transformTo(`string`,u(v)),b=a.transformTo(`string`,s.utf8encode(v)),x=_.length!==p.name.length,S=b.length!==v.length,C=``,w=``,T=``,E=p.dir,D=p.date,O={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(O.crc32=e.crc32,O.compressedSize=e.compressedSize,O.uncompressedSize=e.uncompressedSize);var k=0;t&&(k|=8),h||!x&&!S||(k|=2048);var A=0,j=0;E&&(A|=16),o===`UNIX`?(j=798,A|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,E)):(j=20,A|=function(e){return 63&(e||0)}(p.dosPermissions)),d=D.getUTCHours(),d<<=6,d|=D.getUTCMinutes(),d<<=5,d|=D.getUTCSeconds()/2,f=D.getUTCFullYear()-1980,f<<=4,f|=D.getUTCMonth()+1,f<<=5,f|=D.getUTCDate(),x&&(w=r(1,1)+r(c(g),4)+_,C+=`up`+r(w.length,2)+w),S&&(T=r(1,1)+r(c(y),4)+b,C+=`uc`+r(T.length,2)+T);var M=``;return M+=` -\0`,M+=r(k,2),M+=m.magic,M+=r(d,2),M+=r(f,2),M+=r(O.crc32,4),M+=r(O.compressedSize,4),M+=r(O.uncompressedSize,4),M+=r(g.length,2),M+=r(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+M+g+C,dirRecord:l.CENTRAL_FILE_HEADER+r(j,2)+M+r(y.length,2)+`\0\0\0\0`+r(A,4)+r(i,4)+g+C+y}}var a=e(`../utils`),o=e(`../stream/GenericWorker`),s=e(`../utf8`),c=e(`../crc32`),l=e(`../signature`);function u(e,t,n,r){o.call(this,`ZipFileWorker`),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo(`string`,this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){var r=e(`./Uint8ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){var r=e(`./DataReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){var r=e(`./ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array;var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){var r=e(`../utils`),i=e(`../support`),a=e(`./ArrayReader`),o=e(`./StringReader`),s=e(`./NodeBufferReader`),c=e(`./Uint8ArrayReader`);t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),t!==`string`||i.uint8array?t===`nodebuffer`?new s(e):i.uint8array?new c(r.transformTo(`uint8array`,e)):new a(r.transformTo(`array`,e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){n.LOCAL_FILE_HEADER=`PK`,n.CENTRAL_FILE_HEADER=`PK`,n.CENTRAL_DIRECTORY_END=`PK`,n.ZIP64_CENTRAL_DIRECTORY_LOCATOR=`PK\x07`,n.ZIP64_CENTRAL_DIRECTORY_END=`PK`,n.DATA_DESCRIPTOR=`PK\x07\b`},{}],24:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../utils`);function a(e){r.call(this,`ConvertWorker to `+e),this.destType=e}i.inherits(a,r),a.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../crc32`);function a(){r.call(this,`Crc32Probe`),this.withStreamInfo(`crc32`,0)}e(`../utils`).inherits(a,r),a.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataLengthProbe for `+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(a,i),a.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataWorker`);var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=``,this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}r.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case`string`:e=this.data.substring(this.index,t);break;case`uint8array`:e=this.data.subarray(this.index,t);break;case`array`:case`nodebuffer`:e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){function r(e){this.name=e||`default`,this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit(`data`,e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(`end`),this.cleanUp(),this.isFinished=!0}catch(e){this.emit(`error`,e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit(`error`,e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n `+e:e}},t.exports=r},{}],29:[function(e,t,n){var r=e(`../utils`),i=e(`./ConvertWorker`),a=e(`./GenericWorker`),o=e(`../base64`),s=e(`../support`),c=e(`../external`),l=null;if(s.nodestream)try{l=e(`../nodejs/NodejsStreamOutputAdapter`)}catch{}function u(e,t){return new c.Promise(function(n,i){var a=[],s=e._internalType,c=e._outputType,l=e._mimeType;e.on(`data`,function(e,n){a.push(e),t&&t(n)}).on(`error`,function(e){a=[],i(e)}).on(`end`,function(){try{n(function(e,t,n){switch(e){case`blob`:return r.newBlob(r.transformTo(`arraybuffer`,t),n);case`base64`:return o.encode(t);default:return r.transformTo(e,t)}}(c,function(e,t){var n,r=0,i=null,a=0;for(n=0;n`u`)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=new Blob([r],{type:`application/zip`}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),n.blob=i.getBlob(`application/zip`).size===0}catch{n.blob=!1}}}try{n.nodestream=!!e(`readable-stream`).Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){for(var r=e(`./utils`),i=e(`./support`),a=e(`./nodejsUtils`),o=e(`./stream/GenericWorker`),s=Array(256),c=0;c<256;c++)s[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;s[254]=s[254]=1;function l(){o.call(this,`utf-8 decode`),this.leftOver=null}function u(){o.call(this,`utf-8 encode`)}n.utf8encode=function(e){return i.nodebuffer?a.newBufferFrom(e,`utf-8`):function(e){var t,n,r,a,o,s=e.length,c=0;for(a=0;a>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo(`nodebuffer`,e).toString(`utf-8`):function(e){var t,n,i,a,o=e.length,c=Array(2*o);for(t=n=0;t>10&1023,c[n++]=56320|1023&i)}return c.length!==n&&(c.subarray?c=c.subarray(0,n):c.length=n),r.applyFromCharCode(c)}(e=r.transformTo(i.uint8array?`uint8array`:`array`,e))},r.inherits(l,o),l.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?`uint8array`:`array`,e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=t;(t=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),t.set(a,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+s[e[n]]>t?n:t}(t),c=t;o!==t.length&&(i.uint8array?(c=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(c=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:n.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=l,r.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){var r=e(`./support`),i=e(`./base64`),a=e(`./nodejsUtils`),o=e(`./external`);function s(e){return e}function c(e,t){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),e==0&&(this.dosPermissions=63&this.externalFileAttributes),e==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!==`/`||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||={};e.index+4>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},n.buf2binstring=function(e){return c(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n>10&1023,l[r++]=56320|1023&i)}return c(l,r)},n.utf8border=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+o[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){t.exports=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;n!==0;){for(n-=o=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s>>8^a[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){var r,i=e(`../utils/common`),a=e(`./trees`),o=e(`./adler32`),s=e(`./crc32`),c=e(`./messages`),l=0,u=4,d=0,f=-2,p=-1,m=4,h=2,g=8,_=9,v=286,y=30,b=19,x=2*v+1,S=15,C=3,w=258,T=w+C+1,E=42,D=113,O=1,k=2,A=3,j=4;function M(e,t){return e.msg=c[t],t}function N(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),n!==0&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function I(e,t){a._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function L(e,t){e.pending_buf[e.pending++]=t}function R(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function z(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-T?e.strstart-(e.w_size-T):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+w,p=l[a+o-1],m=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do if(l[(n=t)+o]===m&&l[n+o-1]===p&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do;while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&ac&&--i!=0);return o<=e.lookahead?o:e.lookahead}function B(e){var t,n,r,a,c,l,u,d,f,p,m=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-T)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);a+=m}if(e.strm.avail_in===0)break;if(l=e.strm,u=e.window,d=e.strstart+e.lookahead,f=a,p=void 0,p=l.avail_in,f=C)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C)if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-C,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(B(e),e.lookahead===0&&t===l)return O;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,I(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-T&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):(e.strstart>e.block_start&&(I(e,!1),e.strm.avail_out),O)}),new U(4,4,8,4,V),new U(4,5,16,8,V),new U(4,6,32,32,V),new U(4,4,16,16,H),new U(8,16,32,32,H),new U(8,16,128,128,H),new U(8,32,128,256,H),new U(32,128,258,1024,H),new U(32,258,258,4096,H)],n.deflateInit=function(e,t){return W(e,t,g,15,8,0)},n.deflateInit2=W,n.deflateReset=ne,n.deflateResetKeep=te,n.deflateSetHeader=function(e,t){return e&&e.state&&e.state.wrap===2?(e.state.gzhead=t,d):f},n.deflate=function(e,t){var n,i,o,c;if(!e||!e.state||5>8&255),L(i,i.gzhead.time>>16&255),L(i,i.gzhead.time>>24&255),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(L(i,255&i.gzhead.extra.length),L(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(L(i,0),L(i,0),L(i,0),L(i,0),L(i,0),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,3),i.status=D);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:i.level===6?2:3)<<6,i.strstart!==0&&(p|=32),p+=31-p%31,i.status=D,R(i,p),i.strstart!==0&&(R(i,e.adler>>>16),R(i,65535&e.adler)),e.adler=1}if(i.status===69)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending!==i.pending_buf_size));)L(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(i.status===73)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.gzindex=0,i.status=91)}else i.status=91;if(i.status===91)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.status=103)}else i.status=103;if(i.status===103&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&F(e),i.pending+2<=i.pending_buf_size&&(L(i,255&e.adler),L(i,e.adler>>8&255),e.adler=0,i.status=D)):i.status=D),i.pending!==0){if(F(e),e.avail_out===0)return i.last_flush=-1,d}else if(e.avail_in===0&&N(t)<=N(n)&&t!==u)return M(e,-5);if(i.status===666&&e.avail_in!==0)return M(e,-5);if(e.avail_in!==0||i.lookahead!==0||t!==l&&i.status!==666){var m=i.strategy===2?function(e,t){for(var n;;){if(e.lookahead===0&&(B(e),e.lookahead===0)){if(t===l)return O;break}if(e.match_length=0,n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):i.strategy===3?function(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=w){if(B(e),e.lookahead<=w&&t===l)return O;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=C&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(n=a._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):r[i.level].func(i,t);if(m!==A&&m!==j||(i.status=666),m===O||m===A)return e.avail_out===0&&(i.last_flush=-1),d;if(m===k&&(t===1?a._tr_align(i):t!==5&&(a._tr_stored_block(i,0,0,!1),t===3&&(P(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),F(e),e.avail_out===0))return i.last_flush=-1,d}return t===u?i.wrap<=0?1:(i.wrap===2?(L(i,255&e.adler),L(i,e.adler>>8&255),L(i,e.adler>>16&255),L(i,e.adler>>24&255),L(i,255&e.total_in),L(i,e.total_in>>8&255),L(i,e.total_in>>16&255),L(i,e.total_in>>24&255)):(R(i,e.adler>>>16),R(i,65535&e.adler)),F(e),0=n.w_size&&(s===0&&(P(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),c=e.avail_in,l=e.next_in,u=e.input,e.avail_in=m,e.next_in=0,e.input=t,B(n);n.lookahead>=C;){for(r=n.strstart,a=n.lookahead-(C-1);n.ins_h=(n.ins_h<>>=b=y>>>24,m-=b,(b=y>>>16&255)==0)E[a++]=65535&y;else{if(!(16&b)){if(!(64&b)){y=h[(65535&y)+(p&(1<>>=b,m-=b),m<15&&(p+=T[r++]<>>=b=y>>>24,m-=b,!(16&(b=y>>>16&255))){if(!(64&b)){y=g[(65535&y)+(p&(1<>>=b,m-=b,(b=a-o)>3,p&=(1<<(m-=x<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=1&t.wrap),t.mode=f,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(p),t.distcode=t.distdyn=new r.Buf32(m),t.sane=1,t.back=-1,u):d}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,_(e)):d}function y(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(a=o.wsize-o.wnext)&&(a=i),r.arraySet(o.window,t,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=a(n.check,B,2,0),x=b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg=`incorrect header check`,n.mode=30;break}if((15&b)!=8){e.msg=`unknown compression method`,n.mode=30;break}if(x-=4,F=8+(15&(b>>>=4)),n.wbits===0)n.wbits=F;else if(F>n.wbits){e.msg=`invalid window size`,n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=3;case 3:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>8&255,B[2]=b>>>16&255,B[3]=b>>>24&255,n.check=a(n.check,B,4,0)),x=b=0,n.mode=4;case 4:for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>8),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>>8&255,n.check=a(n.check,B,2,0)),x=b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(E=n.length)&&(E=v),E&&(n.head&&(F=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,E,F)),512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(v===0)break e;for(E=0;F=p[g+ E++],n.head&&F&&n.length<65536&&(n.head.name+=String.fromCharCode(F)),F&&E>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(v===0)break e;v--,b+=p[g++]<>>=1)){case 0:n.mode=14;break;case 1:if(w(n),n.mode=20,t!==6)break;b>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg=`invalid block type`,n.mode=30}b>>>=2,x-=2;break;case 14:for(b>>>=7&x,x-=7&x;x<32;){if(v===0)break e;v--,b+=p[g++]<>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=30;break}if(n.length=65535&b,x=b=0,n.mode=15,t===6)break e;case 15:n.mode=16;case 16:if(E=n.length){if(v>>=5,x-=5,n.ndist=1+(31&b),b>>>=5,x-=5,n.ncode=4+(15&b),b>>>=4,x-=4,286>>=3,x-=3}for(;n.have<19;)n.lens[V[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,L={bits:n.lenbits},I=s(0,n.lens,0,19,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid code lengths set`,n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=k,x-=k,n.lens[n.have++]=j;else{if(j===16){for(R=k+2;x>>=k,x-=k,n.have===0){e.msg=`invalid bit length repeat`,n.mode=30;break}F=n.lens[n.have-1],E=3+(3&b),b>>>=2,x-=2}else if(j===17){for(R=k+3;x>>=k)),b>>>=3,x-=3}else{for(R=k+7;x>>=k)),b>>>=7,x-=7}if(n.have+E>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=30;break}for(;E--;)n.lens[n.have++]=F}}if(n.mode===30)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=30;break}if(n.lenbits=9,L={bits:n.lenbits},I=s(c,n.lens,0,n.nlen,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid literal/lengths set`,n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,L={bits:n.distbits},I=s(l,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,L),n.distbits=L.bits,I){e.msg=`invalid distances set`,n.mode=30;break}if(n.mode=20,t===6)break e;case 20:n.mode=21;case 21:if(6<=v&&258<=y){e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,o(e,C),_=e.next_out,m=e.output,y=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,b=n.hold,x=n.bits,n.mode===12&&(n.back=-1);break}for(n.back=0;A=(z=n.lencode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,n.length=j,A===0){n.mode=26;break}if(32&A){n.back=-1,n.mode=12;break}if(64&A){e.msg=`invalid literal/length code`,n.mode=30;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(z=n.distcode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,64&A){e.msg=`invalid distance code`,n.mode=30;break}n.offset=j,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=30;break}n.mode=25;case 25:if(y===0)break e;if(E=C-y,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break}D=E>n.wnext?(E-=n.wnext,n.wsize-E):n.wnext-E,E>n.length&&(E=n.length),O=n.window}else O=m,D=_-n.offset,E=n.length;for(yv?(b=L[R+d[w]],N[P+d[w]]):(b=96,0),p=1<>k)+(m-=p)]=y<<24|b<<16|x|0,m!==0;);for(p=1<>=1;if(p===0?M=0:(M&=p-1,M+=p),w++,--F[C]==0){if(C===E)break;C=t[n+d[w]]}if(D>>7)]}function L(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function R(e,t,n){e.bi_valid>h-n?(e.bi_buf|=t<>h-e.bi_valid,e.bi_valid+=n-h):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function V(e,t,n){var r,i,a=Array(m+1),o=0;for(r=1;r<=m;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];s!==0&&(e[2*i]=B(a[s]++,s))}}function H(e){var t;for(t=0;t>1;1<=n;n--)te(e,a,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],te(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,te(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,o,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,g=t.stat_desc.max_length,_=0;for(a=0;a<=m;a++)e.bl_count[a]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n>=7;r>>=1)if(1&n&&e.dyn_ltree[2*t]!==0)return i;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return a;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=n+5,n+4<=o&&t!==-1?q(e,t,n,r):e.strategy===4||s===o?(R(e,2+ +!!r,3),ne(e,T,E)):(R(e,4+ +!!r,3),function(e,t,n,r){var i;for(R(e,t-257,5),R(e,n-1,5),R(e,r-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(O[n]+l+1)]++,e.dyn_dtree[2*I(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){R(e,2,3),z(e,_,T),function(e){e.bi_valid===16?(L(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){(function(e,t){if(!e.setImmediate){var n,r,i,a,o=1,s={},c=!1,l=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,n={}.toString.call(e.process)===`[object process]`?function(e){process.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage(``,`*`),e.onmessage=n,t}}()?(a=`setImmediate$`+Math.random()+`$`,e.addEventListener?e.addEventListener(`message`,p,!1):e.attachEvent(`onmessage`,p),function(t){e.postMessage(a+t,`*`)}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):l&&`onreadystatechange`in l.createElement(`script`)?(r=l.documentElement,function(e){var t=l.createElement(`script`);t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(f,0,e)},u.setImmediate=function(e){typeof e!=`function`&&(e=Function(``+e));for(var t=Array(arguments.length-1),r=0;r`u`?e===void 0?this:e:self)}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{}]},{},[10])(10)})}))(),1),{Search:Pte}=oK,{Text:Fte}=Q,Ite=()=>{let[e,t]=(0,S.useState)(`project`),[n,r]=(0,S.useState)(`video`),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)({page:1,pageSize:10}),[c,l]=(0,S.useState)(0),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(new Set),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(null),v=S.createRef(),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),[E,D]=(0,S.useState)([[]]),[O,k]=(0,S.useState)([``]),[A,j]=(0,S.useState)([]),[M,N]=(0,S.useState)(!1),[P,F]=(0,S.useState)(0),[I,L]=(0,S.useState)([void 0]),[R,z]=(0,S.useState)(new Map),[B,V]=(0,S.useState)(``),H=(0,S.useRef)(null),[U,ee]=(0,S.useState)(1),[te,ne]=(0,S.useState)(10),[W,re]=(0,S.useState)([!1]),[G,K]=(0,S.useState)(!1),[q,ie]=(0,S.useState)([]),[J,ae]=(0,S.useState)(0),[oe,se]=(0,S.useState)(1),[ce,le]=(0,S.useState)(10),[ue,de]=(0,S.useState)(!1),[fe,pe]=(0,S.useState)(``),[me,he]=(0,S.useState)(!1),[ge,_e]=(0,S.useState)(new Set),ve=null,ye=new Map,be=[],xe=0,Se=0,Ce=(e,t,n)=>{if(n&&Se<8)Se++,xe++,e();else if(xe<15)xe++,e();else{let r={callback:e,priority:n?2:1,element:t};be.push(r),be.sort((e,t)=>t.priority-e.priority)}},we=()=>{if(xe--,Se>0&&Se--,be.length>0){let e=be.shift();e&&(xe++,e.priority===2&&Se++,e.callback())}},Te=()=>(ve||=new IntersectionObserver(e=>{e.forEach(e=>{let t=ye.get(e.target);if(e.isIntersecting&&t){ye.delete(e.target),ve?.unobserve(e.target);let n=e.intersectionRatio>=1;Ce(t,e.target,n)}})},{rootMargin:`400px`,threshold:[.01,.5,1]}),ve),Ee=e=>{if(!e)return null;try{let t=new URL(e).searchParams.get(`exp`);return t?parseInt(t,10):null}catch{try{let t=e.indexOf(`?`);if(t!==-1){let n=e.substring(t+1),r=new URLSearchParams(n).get(`exp`);if(r)return parseInt(r,10)}return null}catch{return null}}},De=e=>{let t=Ee(e);return t?Math.floor(Date.now()/1e3)>t:!1},Oe=({item:e,mediaType:t,onClick:n,isSelected:r=!1,onToggleSelect:i,isSelectionMode:a=!1})=>{let[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),m=(0,S.useRef)(null),h=(0,S.useRef)(null),g=(0,S.useRef)(null);(0,S.useEffect)(()=>{let n=t===`video`?e.videoUrl:e.imageUrl;n&&De(n)&&d(!0)},[e,t]),(0,S.useEffect)(()=>{if(u)return;let e=m.current;if(!e)return;let t=Te();return ye.set(e,()=>{p(!0)}),t.observe(e),()=>{ye.delete(e),t.unobserve(e)}},[u]);let _=(e,t=!1)=>{let n=`http://ceshi.apiforeign.minzhong.cn`,r=e.startsWith(`/`)?e.slice(1):e,i=n.endsWith(`/`)?n.slice(0,-1):n;return t?`${i}/static/${r}&w=300&q=50`:`${i}/${r}`},v=()=>{g.current&&clearTimeout(g.current),s(!0),p(!1),we()},y=()=>{g.current=setTimeout(()=>{_(t===`video`?e.videoUrl:e.imageUrl),l(!0),p(!1),we()},1e3)},b=t===`video`?_(e.videoUrl):_(e.imageUrl,!0),x=e.videoCoverUrl?_(e.videoCoverUrl,!0):void 0;return(0,$.jsxs)(`div`,{ref:m,style:{width:160,height:120,position:`relative`,borderRadius:4,cursor:`pointer`,overflow:`hidden`,boxShadow:`0 2px 8px rgba(0,0,0,0.1)`,transition:`transform 0.2s, box-shadow 0.2s`},onClick:a?void 0:n,onMouseEnter:e=>{a||(e.currentTarget.style.transform=`scale(1.05)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0,0,0,0.2)`)},onMouseLeave:e=>{a||(e.currentTarget.style.transform=`scale(1)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(0,0,0,0.1)`)},children:[(t===`video`&&e.videoCoverUrl||t===`image`)&&(f||o)&&!c&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`},children:[f&&!o&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,backgroundColor:`rgba(248, 250, 252, 0.9)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1},children:(0,$.jsx)(`div`,{style:{width:28,height:28,border:`3px solid #e2e8f0`,borderTopColor:`#3b82f6`,borderRadius:`50%`,animation:`spin 0.8s linear infinite`}})}),t===`video`&&e.videoCoverUrl&&(0,$.jsx)(`img`,{ref:h,src:x,style:{width:`100%`,height:`100%`,objectFit:`cover`,opacity:+!!o,transition:`opacity 0.3s ease-in-out`},loading:`lazy`,onLoad:v,onError:y}),t===`image`&&(0,$.jsx)(`img`,{ref:h,src:b,alt:`图片预览`,style:{width:`100%`,height:`100%`,objectFit:`cover`,opacity:+!!o,transition:`opacity 0.3s ease-in-out`},loading:`lazy`,onLoad:v,onError:y})]}),!f&&!o&&!c&&(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,backgroundColor:`#cbd5e1`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:t===`video`?(0,$.jsx)(q8,{style:{color:`#64748b`,fontSize:16}}):(0,$.jsx)(d6,{style:{color:`#64748b`,fontSize:16}})})}),t===`video`&&!e.videoCoverUrl&&!c&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#1e293b`},children:[(0,$.jsx)(q8,{style:{color:`#64748b`,fontSize:24}}),(0,$.jsx)(Fte,{style:{fontSize:12,color:`#94a3b8`,marginTop:4},children:`暂无封面`})]}),u&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#fef3c7`,color:`#d97706`,fontSize:12,flexDirection:`column`,gap:4},children:[(0,$.jsx)(MH,{style:{fontSize:24}}),`图片过期`]}),c&&(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#fef2f2`,color:`#dc2626`,fontSize:12},children:`加载失败`}),!u&&!a&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:0,left:0,right:0,background:`linear-gradient(transparent, rgba(0,0,0,0.5))`,padding:`8px`,color:`#fff`,fontSize:12,opacity:0,transition:`opacity 0.2s`},onMouseEnter:e=>{e.currentTarget.style.opacity=`1`},onMouseLeave:e=>{e.currentTarget.style.opacity=`0`},children:`点击预览`}),a&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,width:20,height:20,borderRadius:`50%`,backgroundColor:r?`#10b981`:`rgba(255,255,255,0.9)`,border:r?`2px solid #10b981`:`2px solid #d1d5db`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,transition:`all 0.2s`},onClick:t=>{t.stopPropagation(),i?.(e.generatedResourceId||e.id)},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`},children:r&&(0,$.jsx)(`svg`,{width:12,height:12,viewBox:`0 0 12 12`,fill:`none`,children:(0,$.jsx)(`path`,{d:`M10 3L4.5 8.5L2 6`,stroke:`white`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`})})}),a&&r&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,border:`3px solid #10b981`,borderRadius:4,pointerEvents:`none`,zIndex:5}})]})},ke=e=>{_(e),h(!0),window.dispatchEvent(new Event(`previewOpen`))},Ae=()=>{v.current&&(v.current.pause(),v.current.currentTime=0),document.querySelectorAll(`video`).forEach(e=>{e.pause(),e.currentTime=0}),h(!1)},je=e=>e.generatedResourceId||e.id,Me=e=>{_e(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},Ne=()=>{let e=i.flatMap(e=>e.items.map(e=>je(e)));ge.size===e.length?_e(new Set):_e(new Set(e))},Pe=async()=>{if(ge.size===0){Z.warning(`请先选择要下载的媒体`);return}if(ge.size>10){Z.warning(`最多只能单次下载10个文件`);return}let e=[];i.forEach(t=>{t.items.forEach(t=>{ge.has(je(t))&&e.push(t)})});let t=new Nte.default,n=`http://ceshi.apiforeign.minzhong.cn`,r=t.folder(`downloads`),a=!1,o=0;Z.loading({content:`下载中,请稍候...`,key:`downloadProgress`});for(let t of e){let e=`${n}${t.videoUrl||t.imageUrl}`,i=((t.videoUrl||t.imageUrl).split(`/`).pop()||`file_${Date.now()}`).split(`?`)[0];try{let t=await fetch(e);if(!t.ok)throw Error(`Network response was not ok`);let n=await t.blob();r?.file(i,n),o++}catch{console.warn(`文件下载失败(CORS限制): ${i},将使用备用方式下载`),a=!0;break}}if(a){Z.destroy(`downloadProgress`),Z.info(`由于跨域限制,将逐个下载文件`),e.forEach((e,t)=>{setTimeout(()=>{let t=`${n}${e.videoUrl||e.imageUrl}&download=1`,r=document.createElement(`a`);r.href=t,r.download=``,document.body.appendChild(r),r.click(),document.body.removeChild(r)},t*500)});return}let s=await t.generateAsync({type:`blob`}),c=document.createElement(`a`);c.href=URL.createObjectURL(s),c.download=`downloads_${Date.now()}.zip`,c.click(),URL.revokeObjectURL(c.href),Z.destroy(`downloadProgress`),Z.success(`下载完成,共 ${o} 个文件`)},Fe=()=>{if(ge.size===0){Z.warning(`请先选择要上传的媒体`);return}D([[]]),k([``]),L([void 0]),T(!0)},Ie=()=>{if(!g)return;let e=je(g);_e(new Set([e])),D([[]]),k([``]),L([void 0]),z(new Map),V(``),T(!0)},Le=async(e,t)=>{N(!0);try{let n=await w7({page:e,page_size:t});j(n?.data||n||[]),F(n.pagination.total||0)}catch(e){console.error(`加载授权列表失败:`,e),j([]),F(0)}finally{N(!1)}},Re=async()=>{de(!0);try{let e=await W7({status:fe||void 0,page:oe,pageSize:ce});ie(e?.data||e||[]),ae(e.pagination?.total||e.total||0)}catch(e){console.error(`加载上传历史失败:`,e),ie([]),ae(0)}finally{de(!1)}},ze=()=>{K(!0),se(1),pe(``),Re()},Be=()=>{se(1),Re()},Ve=(e,t)=>{se(e),le(t),Re()},He=async()=>{let t=I.filter(e=>e!==void 0);if(t.length===0){Z.warning(`请先选择授权账户`);return}if(ge.size===0){Z.warning(`请先选择要上传的媒体`);return}C(!0);try{let n=[],r=Array.from(ge);for(let i=0;ie.accountId)||[];if(o.length===0){Z.warning(`第 ${i+1} 组授权账户未设置账户ID,已跳过`);continue}n.push({advertiser_ids:o,resource_ids:r,oauth_id:a.value,source_model:e===`project`?`generation_records`:`chat_generation_tasks`})}await U7({tasks:n}),Z.success(`已提交 ${n.length} 个上传任务,后台异步处理中`),he(!1),_e(new Set),T(!1),D([[]]),k([``]),L([void 0]),z(new Map),V(``)}catch(e){console.error(`批量上传失败:`,e),Z.error(e.message||`批量上传失败`)}finally{C(!1)}},Ue=async(e,t)=>{if(t.trim())try{let n=(await G7({filenames:[{source_id:e,file_name:t}]}))?.results?.find(t=>t.source_id===e)?.new_file_name||t;a(t=>t.map(t=>({...t,items:t.items.map(t=>je(t)===e?{...t,fileName:n}:t)}))),Z.success(`文件名更新成功`)}catch(e){console.error(`文件名更新失败:`,e),Z.error(e.message||`文件名更新失败`)}},We=async(e,t)=>{if(!(!t.trim()||e.length===0))try{let n=await G7({filenames:e.map(e=>({source_id:e,file_name:t}))}),r=new Map;n?.results?.forEach(e=>{e.success&&e.newFileName&&r.set(e.sourceId,e.newFileName)}),a(n=>{let i=new Set(e);return n.map(e=>({...e,items:e.items.map(e=>{let n=je(e);if(i.has(n)){let i=r.get(n)||t;return{...e,fileName:i}}return e})}))}),console.log(n);let i=n?.successCount||0;Z.success(`已更新 ${i} 个文件名`)}catch(e){console.error(`文件名更新失败:`,e),Z.error(e.message||`文件名更新失败`)}},Ge=e=>{b(e)};(0,S.useEffect)(()=>{d(!0);let t=``;if(t=e===`project`?`?gen_type=${n}&history_source=generation_record&page=${o.page}&page_size=${o.pageSize}`:`?gen_type=${n}&page=${o.page}&page_size=${o.pageSize}`,y){let t=``;t=e===`project`?`${y}?gen_type=${n}&history_source=generation_record&page=${o.page}&page_size=${o.pageSize}`:`${y}?gen_type=${n}&page=${o.page}&page_size=${o.pageSize}`,d7(t).then(e=>{let t=Array.isArray(e)?e:e?.items||[],n=[{generatedDate:e.generatedDate,items:t,total:e.total,page:e.page}];n&&n[0].items.length>0?a(n):a([])}).catch(e=>{}).finally(()=>{d(!1)})}else u7(t).then(e=>{let t=Array.isArray(e)?e:e?.groups||[];t.forEach(e=>{e.page=1}),o.page===1?a(t):a(e=>[...e,...t]),l(e?.totalDays||0)}).catch(e=>{o.page===1&&a([])}).finally(()=>{d(!1)})},[e,n,o.page,y]);let Ke=()=>{u||s(e=>({...e,page:e.page+1}))},qe=async(t,r,i)=>{if(f.has(r))return;p(e=>new Set([...e,r]));let s=i+1,c=``;c=e===`project`?`${t}?gen_type=${n}&history_source=generation_record&page=${s}&page_size=${o.pageSize}`:`${t}?gen_type=${n}&page=${s}&page_size=${o.pageSize}`;try{let e=(await d7(c)).items||[];e&&e.length>0&&a(n=>n.map(n=>n.generatedDate===t?{...n,items:[...n.items,...e],page:s}:n))}catch{}finally{p(e=>{let t=new Set(e);return t.delete(r),t})}};return(0,S.useEffect)(()=>{s(e=>({...e,page:1}))},[e,n]),(0,$.jsxs)(`div`,{style:{minHeight:`calc(100vh - 90px)`,background:`#ffffffff`,overflowY:`auto`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:16,padding:`12px 20px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(X4,{style:{color:`#94a3b8`,fontSize:14}}),(0,$.jsxs)(jU,{children:[(0,$.jsx)(bD,{type:e===`project`?`primary`:`default`,onClick:()=>{t(`project`),he(!1),_e(new Set)},style:{borderRadius:8,background:e===`project`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:e===`project`?`none`:`1px solid #e2e8f0`,color:e===`project`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(TZ,{}),children:`项目记录`}),(0,$.jsx)(bD,{type:e===`creation`?`primary`:`default`,onClick:()=>{t(`creation`),he(!1),_e(new Set)},style:{borderRadius:8,background:e===`creation`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:e===`creation`?`none`:`1px solid #e2e8f0`,color:e===`creation`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(IU,{}),children:`创作记录`})]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:me?(0,$.jsxs)(jU,{children:[(0,$.jsx)(bD,{onClick:Ne,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#222222ff`,fontWeight:600},children:ge.size===i.reduce((e,t)=>e+t.items.length,0)?`取消全选`:`全选`}),(0,$.jsx)(bD,{onClick:()=>{he(!1),_e(new Set)},style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:600},children:`取消选择`}),(0,$.jsxs)(bD,{onClick:()=>Pe(),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,fontWeight:600},children:[`下载 (`,ge.size,`)`]}),(0,$.jsx)(bD,{type:`primary`,onClick:Fe,loading:x,disabled:x||ge.size===0,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,fontWeight:600},children:x?`上传中...`:`推送至账户 (${ge.size})`})]}):(0,$.jsx)(bD,{type:`primary`,icon:(0,$.jsx)(V8,{}),onClick:()=>he(!0),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600},children:`批量操作`})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:24,padding:`12px 20px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:`媒体类型:`}),(0,$.jsxs)(jU,{children:[(0,$.jsx)(bD,{type:n===`video`?`primary`:`default`,onClick:()=>{r(`video`),he(!1),_e(new Set)},style:{borderRadius:8,background:n===`video`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:n===`video`?`none`:`1px solid #e2e8f0`,color:n===`video`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(q8,{}),children:`视频`}),(0,$.jsx)(bD,{type:n===`image`?`primary`:`default`,onClick:()=>{r(`image`),he(!1),_e(new Set)},style:{borderRadius:8,background:n===`image`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:n===`image`?`none`:`1px solid #e2e8f0`,color:n===`image`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(d6,{}),children:`图片`}),(0,$.jsx)(zH,{picker:`date`,value:y?(0,OD.default)(y):void 0,onChange:(e,t)=>Ge(t||``),format:`YYYY-MM-DD`,style:{width:160,borderRadius:8,border:`1px solid #e2e8f0`},placeholder:`选择日期`}),y&&(0,$.jsx)(bD,{type:`text`,onClick:()=>Ge(``),style:{color:`#94a3b8`,fontSize:12},children:`清除`})]})]}),(0,$.jsx)(bD,{icon:(0,$.jsx)(MH,{}),onClick:ze,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,color:`#ffffff`,fontWeight:600,boxShadow:`0 4px 15px rgba(102, 126, 234, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(102, 126, 234, 0.6)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 15px rgba(102, 126, 234, 0.4)`},children:`查询上传任务历史`})]}),i.length===0?(0,$.jsx)(PC,{image:PC.PRESENTED_IMAGE_SIMPLE,description:`暂无生成记录`,style:{padding:`60px 0`}}):(0,$.jsxs)(`div`,{style:{padding:`0 4px`},children:[i.map((e,t)=>(0,$.jsxs)(`div`,{style:{marginBottom:32},children:[(0,$.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`#64748b`,marginBottom:12,paddingLeft:8},children:e.generatedDate}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8},children:e.items.map(e=>(0,$.jsx)(Oe,{item:e,mediaType:n,onClick:()=>me?Me(je(e)):ke(e),isSelected:ge.has(je(e)),onToggleSelect:Me,isSelectionMode:me},je(e)))}),e.total&&e.total>e.items.length&&(0,$.jsx)(`div`,{style:{padding:`12px 0`,textAlign:`left`},children:(0,$.jsx)(bD,{onClick:()=>qe(e.generatedDate,e.items,e.page),loading:f.has(e.generatedDate),disabled:f.has(e.generatedDate),size:`small`,style:{borderRadius:6,background:`transparent`,border:`1px dashed #cbd5e1`,color:`#64748b`,fontSize:12},children:f.has(e.date)?`加载中...`:`查看全部 (${e.total})`})})]},t)),i.length>0&&c>i.length&&(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:`20px 0`},children:(0,$.jsx)(bD,{onClick:Ke,loading:u,disabled:u,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:500},children:u?`加载中...`:`加载更多`})})]}),(0,$.jsx)(Rq,{title:ge.size===1?`上传配置`:`批量上传配置`,open:w,onCancel:()=>{T(!1),D([[]]),k([``]),L([void 0]),z(new Map),V(``)},footer:null,width:900,mask:{closable:!1},children:(0,$.jsxs)(`div`,{style:{padding:`16px 0`},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`},children:[`选中素材 (`,ge.size,`个)`]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:12,alignItems:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`},children:`统一修改名称:`}),(0,$.jsx)(oK,{value:B,onChange:e=>V(e.target.value),placeholder:`输入名称后点击应用`,style:{flex:1,borderRadius:8},size:`small`}),(0,$.jsx)(bD,{type:`primary`,size:`small`,onClick:()=>{B.trim()&&ge.size>0&&We(Array.from(ge),B)},disabled:!B.trim()||ge.size===0,style:{borderRadius:8},children:`应用`})]}),(0,$.jsx)(`div`,{style:{maxHeight:300,overflow:`auto`,border:`1px solid #f0f0f0`,borderRadius:8,padding:12},children:(()=>{let e=new Map;return i.forEach(t=>{t.items.forEach(t=>{let n=je(t);e.set(n,t)})}),Array.from(ge).map(t=>{let r=e.get(t);return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 0`,borderBottom:`1px solid #f5f5f5`},children:[(0,$.jsx)(`div`,{style:{width:60,height:40,borderRadius:4,backgroundColor:`#f5f5f5`,display:`flex`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,flexShrink:0},children:(()=>{let e=n===`video`?r?.videoCoverUrl:r?.imageUrl;if(!e)return(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`预览`});let t=`http://ceshi.apiforeign.minzhong.cn`,i=e.startsWith(`/`)?e.slice(1):e;return(0,$.jsx)(`img`,{src:`${t.endsWith(`/`)?t.slice(0,-1):t}/static/${i}&w=300&q=50`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})()}),(0,$.jsx)(`div`,{style:{flex:1,minWidth:0},children:(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#1e293b`},children:r?.fileName||`素材 ${r.id}`})}),(0,$.jsx)(oK,{value:R.has(t)?R.get(t):r?.fileName||``,onChange:e=>{let n=e.target.value,r=new Map(R);r.set(t,n),z(r),H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{Ue(t,n)},800)},placeholder:`输入新名称`,style:{width:200,borderRadius:4},size:`small`})]},t)})})()})]}),I.map((e,t)=>(0,$.jsxs)(`div`,{style:{marginBottom:16,padding:12,border:`1px solid #e2e8f0`,borderRadius:8},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`},children:[`授权账户 `,t+1]}),I.length>1&&(0,$.jsx)(bD,{type:`text`,danger:!0,onClick:()=>{let e=[...I],n=[...O],r=[...E],i=[...W];e.splice(t,1),n.splice(t,1),r.splice(t,1),i.splice(t,1),L(e),k(n),D(r),re(i)},children:`删除`})]}),(0,$.jsx)(uw,{value:e,onChange:e=>{let n=[...I];n[t]=e,L(n)},placeholder:`点击选择授权账户`,style:{width:`100%`,marginBottom:12,borderRadius:8},popupRender:()=>(0,$.jsx)(`div`,{style:{padding:8,width:800,maxHeight:500,overflow:`auto`},children:(0,$.jsx)(g$,{dataSource:A,columns:[{title:`授权账户ID`,dataIndex:`accountId`,key:`accountId`,width:120},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`,width:120},{title:`授权应用ID`,dataIndex:`appid`,key:`appid`,width:120},{title:`授权用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,width:120},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,width:160,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权账户用户名`,dataIndex:`accountUsername`,key:`accountUsername`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})}],loading:M,pagination:{current:U,pageSize:te,total:P,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{ee(e),ne(t),Le(e,t)}},rowKey:`id`,size:`small`,scroll:{x:`max-content`},onRow:n=>({onClick:()=>{let e=String(n.id),r=[...I];r[t]={value:e,label:String(n.accountId)+`-`+(n.accountName||`-`)},L(r);let i=[...W];i[t]=!1,re(i)},style:{cursor:`pointer`,backgroundColor:e?.value===String(n.id)?`#e6f7ff`:void 0}})})}),open:W[t],onOpenChange:e=>{let n=[...W];n[t]=e,re(n),e&&Le(1,te)},labelInValue:!0,fieldNames:{label:`accountUserid`,value:`id`}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`},children:`粘贴账户ID(每行一个或用逗号分隔)`}),(0,$.jsx)(oK.TextArea,{value:O[t],onChange:e=>{let n=e.target.value,r=[...O];r[t]=n,k(r);let i=n.split(/[\n,]/).map(e=>e.trim()).filter(e=>e.length>0),a=[...new Set(i)].map(e=>({accountId:e})),o=new Set,s=a.filter(e=>o.has(e.accountId)?!1:(o.add(e.accountId),!0)),c=[...E];c[t]=s,D(c)},placeholder:`粘贴账户ID,每行一个或用逗号分隔,例如:\r -10001,10002,10003\r -10004`,rows:3,style:{borderRadius:8}})]},t)),(0,$.jsx)(bD,{type:`dashed`,block:!0,onClick:()=>{L([...I,void 0]),k([...O,``]),D([...E,[]]),re([...W,!1])},style:{borderRadius:8,marginBottom:16},children:`+ 新增授权账户组`}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,justifyContent:`flex-end`},children:[(0,$.jsx)(bD,{onClick:()=>{T(!1),D([[]]),k([``]),L([void 0]),z(new Map),V(``)},style:{borderRadius:8},children:`取消`}),(0,$.jsx)(bD,{type:`primary`,onClick:He,loading:x,disabled:x||E.every(e=>e.length===0),style:{borderRadius:8},children:x?`上传中...`:`开始上传`})]})]})}),(0,$.jsxs)(Rq,{title:`上传任务历史`,open:G,onCancel:()=>K(!1),footer:null,width:800,style:{borderRadius:8},mask:{closable:!1},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(uw,{value:fe,onChange:e=>pe(e),placeholder:`选择状态`,style:{width:200,marginRight:12},options:[{value:`1`,label:`待上传`},{value:`2`,label:`上传中`},{value:`3`,label:`上传成功`},{value:`4`,label:`上传失败`}],allowClear:!0}),(0,$.jsx)(bD,{type:`primary`,onClick:Be,style:{borderRadius:8},children:`查询`})]}),(0,$.jsx)(g$,{dataSource:q,columns:[{title:`素材名称`,dataIndex:`fileName`,key:`fileName`,width:200},{title:`账户ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:180},{title:`状态`,dataIndex:`status`,key:`status`,width:100,render:e=>(0,$.jsx)(k$,{color:{1:`#f59e0b`,2:`#6366f1`,3:`#10b981`,4:`#ef4444`}[e]||`#64748b`,style:{borderRadius:4},children:{1:`待上传`,2:`上传中`,3:`上传成功`,4:`上传失败`}[e]||e})},{title:`备注`,dataIndex:`note`,key:`note`,width:250,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:e||`-`})},{title:`创建时间`,dataIndex:`created_at`,key:`created_at`,width:180,render:e=>(0,OD.default)(e).format(`YYYY-MM-DD HH:mm:ss`)}],loading:ue,scroll:{x:`max-content`},pagination:{current:oe,pageSize:ce,total:J,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:Ve},rowKey:(e,t)=>e.task_id||e.resource_id||t,size:`small`})]}),m&&g&&(0,$.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`rgba(0,0,0,0.85)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1e3,padding:16,boxSizing:`border-box`,overflow:`auto`},onClick:Ae,children:(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:16,padding:0,width:`100%`,maxWidth:`1200px`,maxHeight:`95vh`,minHeight:`300px`,overflow:`hidden`,position:`relative`,display:`flex`,flexDirection:`column`,boxShadow:`0 20px 60px rgba(0,0,0,0.3)`},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`12px 16px`,borderBottom:`1px solid #f0f0f0`,flexShrink:0},children:[(0,$.jsx)(Q.Title,{level:5,style:{margin:0,color:`#1a1a2e`,fontSize:16},children:g.title||`预览`}),(0,$.jsx)(bD,{icon:(0,$.jsx)(a5,{}),onClick:Ae,style:{background:`transparent`,border:`none`,color:`#94a3b8`,fontSize:16}})]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexWrap:`wrap`,height:`500px`,gap:20,padding:20,overflow:`auto`,justifyContent:`center`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{flex:1,minWidth:`280px`,maxWidth:`800px`,display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`200px`},children:De(g.videoUrl||g.imageUrl)?(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`40px`},children:[(0,$.jsx)(`div`,{style:{fontSize:48,marginBottom:16},children:`⚠️`}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#ff4d4f`,marginBottom:16},children:`图片/视频资源已过期,请刷新重新加载~`})]}):n===`video`?(0,$.jsx)(`video`,{ref:v,src:`http://ceshi.apiforeign.minzhong.cn${g.videoUrl}`,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:`55vh`,borderRadius:8,objectFit:`contain`}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${g.imageUrl}&w=300&q=50`,alt:`预览`,style:{maxWidth:`100%`,maxHeight:`55vh`,objectFit:`contain`,borderRadius:8}})}),(0,$.jsxs)(`div`,{style:{width:`100%`,minWidth:`280px`,maxWidth:`320px`,background:`#f8fafc`,borderRadius:12,padding:20,maxHeight:`55vh`,overflowY:`auto`,overflowX:`hidden`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,display:`block`,marginBottom:16},children:`文件信息`}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`类型`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:n===`video`?`视频`:`图片`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,flexShrink:0,width:40},children:`请求`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500,flex:1,wordBreak:`break-all`},children:g.originalPrompt})]}),n===`image`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imageProportion})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imageSize})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`尺寸`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imagePx})]})]}),n===`video`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.aspectRatio})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.resolution})]})]}),n===`video`&&(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`时长`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:`${g.duration}秒`||`-`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`创建时间`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:Lte(g.createdAt||g.generatedDate)})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`生成引擎`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.engine||g.engineName||`-`})]})]}),(0,$.jsx)(`div`,{style:{borderTop:`1px dashed #e2e8f0`,margin:`16px 0`}}),g.mediaReferences&&g.mediaReferences.length>0&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,display:`block`,marginBottom:12},children:`依靠附件`}),g.mediaReferences.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>{v.current&&v.current.pause();let t=`http://ceshi.apiforeign.minzhong.cn${e.url}`;window.open(t,`_blank`)},style:{display:`flex`,alignItems:`center`,gap:8,padding:8,borderRadius:6,cursor:`pointer`,backgroundColor:`#f1f5f9`,marginBottom:4,transition:`background-color 0.2s`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#e2e8f0`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#f1f5f9`},children:[e.type===`image`?(0,$.jsx)(d6,{style:{color:`#3b82f6`,fontSize:14}}):(0,$.jsx)(q8,{style:{color:`#f59e0b`,fontSize:14}}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13},children:e.name||`媒体${t+1}`})]},e.url))]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,marginTop:20},children:[(0,$.jsx)(bD,{type:`primary`,icon:(0,$.jsx)(_0,{}),onClick:()=>{v.current&&v.current.pause();let e=`http://ceshi.apiforeign.minzhong.cn${g.videoUrl||g.imageUrl}&download=1`;window.open(e,`_blank`)},style:{flex:1,borderRadius:8},disabled:De(g.videoUrl||g.imageUrl),children:De(g.videoUrl||g.imageUrl)?`资源已过期`:`下载`}),(0,$.jsx)(bD,{onClick:Ae,style:{flex:1,borderRadius:8},children:`关闭`})]}),(0,$.jsx)(`div`,{children:(0,$.jsx)(bD,{type:`primary`,onClick:Ie,style:{width:`100%`,borderRadius:8,marginTop:20},disabled:De(g.videoUrl||g.imageUrl),children:`推送媒体后台`})})]})]})]})]})})]})},P9=document.createElement(`style`);P9.textContent=` -======== `})]}):e===`failed`?(0,$.jsx)(`span`,{style:{fontSize:11,color:`#ef4444`},children:`失败`}):e===`completed`&&t.finalVideoUrl?(0,$.jsx)(`span`,{style:{fontSize:11,color:`#10b981`},children:`任务完成`}):null})()]})]})]},t.id))}),(0,$.jsx)(`div`,{style:{paddingTop:20,paddingBottom:20,display:`flex`,justifyContent:`center`},children:(0,$.jsx)(HK,{current:p,pageSize:h,total:_,onChange:U,showSizeChanger:!1,showQuickJumper:!1,showTotal:e=>`共 ${e} 条`,itemRender:(e,t,n)=>t===`prev`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid #e5e7eb`,borderRadius:6,background:p===1?`#f9fafb`:`#fff`,cursor:p===1?`not-allowed`:`pointer`,color:p===1?`#d1d5db`:`#6b7280`,fontSize:14},disabled:p===1,children:`‹`}):t===`next`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid #e5e7eb`,borderRadius:6,background:p>=Math.ceil(_/h)?`#f9fafb`:`#fff`,cursor:p>=Math.ceil(_/h)?`not-allowed`:`pointer`,color:p>=Math.ceil(_/h)?`#d1d5db`:`#6b7280`,fontSize:14},disabled:p>=Math.ceil(_/h),children:`›`}):t===`page`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`none`,borderRadius:6,background:e===p?`#6366f1`:`#fff`,color:e===p?`#fff`:`#374151`,fontWeight:e===p?500:400,cursor:`pointer`,fontSize:14},children:e}):n})})]}):(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`40px`},children:[(0,$.jsxs)(`div`,{style:{width:120,height:120,display:`flex`,alignItems:`center`,justifyContent:`center`,marginBottom:24,position:`relative`},children:[(0,$.jsx)(`div`,{style:{width:60,height:60,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:20,position:`absolute`,bottom:0,right:10}}),(0,$.jsx)(`div`,{style:{width:50,height:50,border:`2px solid rgba(99, 102, 241, 0.2)`,borderRadius:16,position:`absolute`,top:0,left:10}}),(0,$.jsx)(`div`,{style:{width:56,height:56,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:18,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 24px rgba(99, 102, 241, 0.25)`},children:(0,$.jsx)(Y8,{style:{fontSize:28,color:`#fff`}})})]}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:600,color:`#1e293b`,marginBottom:8},children:`暂无生成内容`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#64748b`,textAlign:`center`,padding:`0 40px`,lineHeight:1.6},children:`请完善素材与卖点,生成专属爆款开头复刻视频`})]})})]}),(0,$.jsx)(`div`,{className:`replication-form`,style:{flex:1,overflow:`auto`,width:`28%`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,position:`relative`,zIndex:10},children:(0,$.jsxs)(`div`,{className:`replication-form-content`,style:{width:`100%`,height:`100%`,background:`rgba(248, 250, 252, 0.5)`,padding:24,overflowY:`auto`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10},children:`上传复刻视频`}),O?(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`video`,{src:O,controls:!0,style:{width:`100%`,borderRadius:12,maxHeight:200,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`}}),(0,$.jsx)(`button`,{onClick:()=>{O&&URL.revokeObjectURL(O),D(null),k(``)},style:{position:`absolute`,top:8,right:8,width:28,height:28,border:`none`,background:`rgba(239, 68, 68, 0.9)`,borderRadius:`50%`,cursor:`pointer`,color:`#fff`,fontSize:16,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10,transition:`all 0.2s`},children:`×`}),(0,$.jsxs)(`div`,{style:{marginTop:10,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(Y8,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#475569`},children:E?.name}),(0,$.jsxs)(`span`,{style:{fontSize:11,color:`#94a3b8`},children:[`(`,E?.size?(E.size/1024/1024).toFixed(2):0,`MB)`]})]})]}):(0,$.jsx)(y0,{beforeUpload:async e=>{if(!e.type.startsWith(`video/`))return Z.error(`只能上传视频文件`),!1;if(!(e.size/1024/1024<50))return Z.error(`视频大小不能超过50MB`),!1;let t=document.createElement(`video`);return t.preload=`metadata`,new Promise(n=>{t.onloadedmetadata=async()=>{if(t.duration<2){Z.error(`视频时长不能少于2秒`),URL.revokeObjectURL(t.src),n(!1);return}if(t.duration>=16){Z.error(`视频时长不能超过15秒`),URL.revokeObjectURL(t.src),n(!1);return}F(!0);try{let t=await H5(e);D(e),k(`http://ceshi.apiforeign.minzhong.cn${t.url}`),Z.success(`视频上传成功`),n(!1)}catch(e){let t=``;if(e instanceof Error)try{t=JSON.parse(e.message).detail||e.message}catch{t=e.message}Z.error(t||`视频上传失败`),n(!1)}finally{F(!1),URL.revokeObjectURL(t.src)}},t.onerror=()=>{Z.error(`视频文件无效`),URL.revokeObjectURL(t.src),n(!1)},t.src=URL.createObjectURL(e)})},showUploadList:!1,accept:`video/mp4,video/quicktime,.mp4,.mov`,children:(0,$.jsx)(`div`,{style:{border:`2px dashed rgba(99, 102, 241, 0.3)`,borderRadius:12,padding:24,textAlign:`center`,cursor:`pointer`,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`,background:`rgba(99, 102, 241, 0.02)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.02)`},children:P?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{width:40,height:40,margin:`0 auto 12px`,border:`3px solid rgba(99, 102, 241, 0.2)`,borderTopColor:`#6366f1`,borderRadius:`50%`,animation:`spin 1s linear infinite`}}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#6366f1`,fontWeight:500},children:`上传中...`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持的文件类型:MP4、MOV | 视频最大时长:15 秒 | 最大大小:50M`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:48,height:48,margin:`0 auto 12px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:16,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(Y8,{style:{fontSize:24,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#475569`,fontWeight:500},children:`点击或拖拽上传视频`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持的文件类型:MP4、MOV | 视频最大时长:15 秒 | 最大大小:50M`})]})})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10},children:`上传产品图片`}),M?(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`img`,{src:M,alt:`产品图片`,style:{width:`100%`,borderRadius:12,maxHeight:200,objectFit:`contain`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`}}),(0,$.jsx)(`button`,{onClick:()=>{M&&URL.revokeObjectURL(M),j(null),N(``)},style:{position:`absolute`,top:8,right:8,width:28,height:28,border:`none`,background:`rgba(239, 68, 68, 0.9)`,borderRadius:`50%`,cursor:`pointer`,color:`#fff`,fontSize:16,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10,transition:`all 0.2s`},children:`×`}),(0,$.jsxs)(`div`,{style:{marginTop:10,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(p6,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#475569`},children:A?.name}),(0,$.jsxs)(`span`,{style:{fontSize:11,color:`#94a3b8`},children:[`(`,A?.size?(A.size/1024/1024).toFixed(2):0,`MB)`]})]})]}):(0,$.jsx)(y0,{beforeUpload:async e=>{if(!e.type.startsWith(`image/`))return Z.error(`只能上传图片文件`),!1;if(!(e.size/1024/1024<10))return Z.error(`图片大小不能超过10MB`),!1;let t=new Image;return new Promise(n=>{t.onload=async()=>{let r=t.width/t.height;Math.abs(r-.75)<.1||Math.abs(r-.5625),L(!0);try{let t=await V5(e);j(e),N(`http://ceshi.apiforeign.minzhong.cn${t.url}`),Z.success(`图片上传成功`),n(!1)}catch(e){let t=``;if(e instanceof Error)try{t=JSON.parse(e.message).detail||e.message}catch{t=e.message}Z.error(t||`图片上传失败`),n(!1)}finally{L(!1),URL.revokeObjectURL(t.src)}},t.onerror=()=>{Z.error(`图片文件无效`),URL.revokeObjectURL(t.src),n(!1)},t.src=URL.createObjectURL(e)})},showUploadList:!1,accept:`image/jpeg,image/jpg,image/png,.jpg,.jpeg,.png`,children:(0,$.jsx)(`div`,{style:{border:`2px dashed rgba(99, 102, 241, 0.3)`,borderRadius:12,padding:20,textAlign:`center`,cursor:`pointer`,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`,background:`rgba(99, 102, 241, 0.02)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.02)`},children:I?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{width:36,height:36,margin:`0 auto 10px`,border:`3px solid rgba(99, 102, 241, 0.2)`,borderTopColor:`#6366f1`,borderRadius:`50%`,animation:`spin 1s linear infinite`}}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#6366f1`,fontWeight:500},children:`上传中...`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持 JPG, JPEG, PNG 格式,图片比例为 3:4 或 9:16 效果最佳`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:44,height:44,margin:`0 auto 10px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:14,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(p6,{style:{fontSize:22,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#475569`,fontWeight:500},children:`+ 点击上传`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持 JPG, JPEG, PNG 格式,图片比例为 3:4 或 9:16 效果最佳`})]})})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:`原视频产品名称`}),(0,$.jsx)(nK,{value:y,onChange:e=>b(e.target.value),placeholder:`请输入原视频产品名称`,style:{borderRadius:10,height:40,fontSize:13,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},maxLength:10,suffix:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[y.length,`/10`]})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:`自有产品名称`}),(0,$.jsx)(nK,{value:x,onChange:e=>C(e.target.value),placeholder:`请输入自有产品名称`,style:{borderRadius:10,height:40,fontSize:13,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},maxLength:10,suffix:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[x.length,`/10`]})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:24},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:`产品卖点`}),(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(jte,{value:w,onChange:e=>T(e.target.value),placeholder:`请输入产品卖点`,style:{borderRadius:10,fontSize:13,height:80,resize:`none`,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},rows:3,maxLength:30}),(0,$.jsxs)(`span`,{style:{position:`absolute`,right:10,bottom:8,color:`#94a3b8`,fontSize:12},children:[w.length,`/30`]})]})]}),(0,$.jsx)(vD,{type:`primary`,block:!0,size:`large`,onClick:()=>{if(!O){Z.warning(`请上传复刻视频`);return}if(!M){Z.warning(`请上传产品图片`);return}if(!y.trim()){Z.warning(`请输入原视频产品名称`);return}if(!x.trim()){Z.warning(`请输入自有产品名称`);return}if(!w.trim()){Z.warning(`请输入产品卖点`);return}g7({material_video_url:O,material_image_url:M,source_project_name:y,target_project_name:x,core_content_point:w,idempotency_key:Date.now().toString()}).then(t=>{let r=``,i=``;k(``),N(``),b(``),C(``),T(``),H(1,8),_7(1,20).then(t=>{if(t.items){let a=t.items[0].id;n(t.items),v7(t.items[0].id).then(t=>{r=t.id,i=t.steps[0].id,y7(r,i).then(t=>{Z.loading(`创建中...`,3),setTimeout(()=>{e(`/initial/${a}/initialinfo`)},3e3)})}).catch(e=>{})}}).catch(e=>{})}).catch(e=>{Z.error(`视频开头复刻失败`)})},style:{borderRadius:12,height:44,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`,border:`none`,fontSize:15,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.3)`,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`},children:`立即生成+`})]})}),(0,$.jsxs)(Pq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`创作记录`})]}),open:R,onCancel:()=>z(!1),width:850,footer:null,style:{borderRadius:20},styles:{body:{height:580,display:`flex`,flexDirection:`column`,padding:0},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,margin:`16px 24px`,flexShrink:0},children:[(0,$.jsx)(nK,{placeholder:`搜索产品名称`,value:l,onChange:e=>u(e.target.value),onPressEnter:ne,style:{width:220,borderRadius:10,marginRight:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`}}),(0,$.jsx)(vD,{type:`primary`,onClick:ne,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflow:`auto`,padding:`0 24px 24px`},children:(0,$.jsx)(`div`,{style:{background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(10px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.06)`},children:(0,$.jsx)(f$,{columns:[{title:`产品名称`,dataIndex:`targetProjectName`,key:`targetProjectName`,align:`center`,width:200,render:e=>(0,$.jsx)(`span`,{style:{fontSize:13,color:`#1e293b`,fontWeight:500},children:e||`-`})},{title:`状态`,dataIndex:`status`,key:`status`,align:`center`,width:220,render:(e,t)=>{let n=e,r=t.current_step_code||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#64748b`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else return{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#64748b`}})();return(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,align:`center`,width:200,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:12,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,width:120,render:(t,n)=>(0,$.jsx)(`button`,{onClick:()=>e(`/initial/${n.id}/initialinfo`),style:{color:`#6366f1`,textDecoration:`none`,fontSize:13,border:`none`,background:`rgba(99, 102, 241, 0.08)`,padding:`4px 12px`,borderRadius:8,cursor:`pointer`,transition:`all 0.2s`},children:`查看详情`})}],dataSource:t,rowKey:`id`,pagination:{current:r,pageSize:a,total:s,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:te,itemRender:(e,t,n)=>t===`prev`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid rgba(99, 102, 241, 0.15)`,borderRadius:8,background:r===1?`rgba(243, 244, 246, 0.5)`:`#fff`,cursor:r===1?`not-allowed`:`pointer`,color:r===1?`#94a3b8`:`#6366f1`,fontSize:14},disabled:r===1,children:`‹`}):t===`next`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid rgba(99, 102, 241, 0.15)`,borderRadius:8,background:r>=Math.ceil(s/a)?`rgba(243, 244, 246, 0.5)`:`#fff`,cursor:r>=Math.ceil(s/a)?`not-allowed`:`pointer`,color:r>=Math.ceil(s/a)?`#94a3b8`:`#6366f1`,fontSize:14},disabled:r>=Math.ceil(s/a),children:`›`}):t===`page`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`none`,borderRadius:8,background:e===r?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`:`#fff`,color:e===r?`#fff`:`#475569`,fontWeight:e===r?600:400,cursor:`pointer`,fontSize:14},children:e}):n},style:{fontSize:13},scroll:{y:350}})})})]})]})};function m9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function h9(e,...t){for(let n of t){let t=e[n];if(t!=null&&String(t).trim()!==``)return String(t)}return``}function g9(e,t,...n){for(let t of n){let n=e[t];if(n===!0||n===!1)return n;if(n===`true`)return!0;if(n===`false`)return!1}return t}function Nte(e,...t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t)&&t>0)return t;if(typeof t==`string`&&t.trim()){let e=Number(t);if(Number.isFinite(e)&&e>0)return e}}}function _9(e){if(!m9(e))return null;let t=h9(e,`key`);return t?{key:t,label:h9(e,`label`)||t,type:h9(e,`type`)||void 0,enabled:g9(e,!0,`enabled`),editable:g9(e,!0,`editable`),maxLength:Nte(e,`maxLength`,`max_length`)}:null}function v9(e){if(!m9(e))return null;let t=e.data;return m9(t)?t:Array.isArray(e.sections)?e:null}function Pte(e){return!!v9(e)}function y9(e){let t=v9(e);return(Array.isArray(t?.sections)?t.sections:[]).map(e=>{let t=_9(e);if(!t||!m9(e))return null;let n=Array.isArray(e.children)?e.children.map(_9).filter(Boolean):[],r=Array.isArray(e.itemFields)?e.itemFields.map(_9).filter(Boolean):Array.isArray(e.item_fields)?e.item_fields.map(_9).filter(Boolean):[];return{...t,contentKey:h9(e,`contentKey`,`content_key`)||void 0,children:n,itemFields:r}}).filter(e=>!!e&&e.enabled)}function b9(e){if(e==null)return``;if(typeof e==`object`)try{return JSON.stringify(e,null,2)}catch{return String(e)}return String(e)}function x9(e){let t=b9(e);return t.length>40||t.includes(` `)||t.includes(`,`)||t.includes(`。`)||t.includes(`;`)||t.includes(`;`)}function S9(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function C9(e,t,n,r){let i=S9(e||{});return m9(i[t])||(i[t]={}),i[t][n]=r,i}function w9(e,t,n,r,i){let a=S9(e||{});return Array.isArray(a[t])||(a[t]=[]),m9(a[t][n])||(a[t][n]={}),a[t][n][r]=i,a}function T9(e,t){if(!m9(e))return`视频提示词不能为空`;let n=y9(t);if(!n.length)return`视频提词配置缺失,无法保存`;for(let t of n){if(!t.editable)continue;let n=e[t.key];if(t.type===`object`){if(!m9(n))continue;for(let e of t.children)if(!(!e.enabled||!e.editable||!e.maxLength)&&b9(n[e.key]).length>e.maxLength)return`字段【${t.label}.${e.label}】长度不能超过 ${e.maxLength} 个字符`;continue}if(t.type===`flow`){if(!Array.isArray(n))continue;for(let e=0;en.maxLength)return`字段【${t.label} 第 ${e+1} 项.${n.label}】长度不能超过 ${n.maxLength} 个字符`}}continue}if(t.editable&&t.maxLength&&b9(n).length>t.maxLength)return`字段【${t.label}】长度不能超过 ${t.maxLength} 个字符`}return null}var{Text:E9}=Q,{TextArea:D9}=nK;function O9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function k9({value:e}){let t=e===`true`?`是`:e===`false`?`否`:b9(e);return x9(e)?(0,$.jsx)(D9,{value:t,rows:Math.min(6,Math.max(2,Math.ceil(t.length/42))),disabled:!0,style:{borderRadius:8,color:`#64748b`}}):(0,$.jsx)(nK,{value:t,disabled:!0,style:{borderRadius:8,color:`#64748b`}})}function A9({value:e,maxLength:t,onChange:n}){let r=b9(e),i={value:r,maxLength:t,showCount:!!t,onChange:e=>n(e.target.value),style:{borderRadius:8}};return x9(e)?(0,$.jsx)(D9,{...i,rows:Math.min(8,Math.max(3,Math.ceil(r.length/42)))}):(0,$.jsx)(nK,{...i})}function j9({value:e,onChange:t}){let n=e===!0||e===`true`;return(0,$.jsxs)(LL.Group,{value:n,onChange:e=>t(e.target.value),style:{display:`flex`,gap:24},children:[(0,$.jsx)(LL,{value:!0,style:{fontSize:14,color:`#475569`},children:`是`}),(0,$.jsx)(LL,{value:!1,style:{fontSize:14,color:`#475569`},children:`否`})]})}var M9=({value:e,schemaConfigSnapshot:t,onChange:n})=>{let r=O9(e)?e:{},i=y9(t);if(!Pte(t))return(0,$.jsxs)(DU,{direction:`vertical`,size:12,style:{width:`100%`},children:[(0,$.jsx)(Kf,{type:`warning`,showIcon:!0,message:`视频提词配置缺失,暂不能编辑`,description:`请刷新详情后重试;如果仍然缺失,请联系管理员排查第4步 schema_config_snapshot 返回。`}),Object.keys(r).length?(0,$.jsx)(`pre`,{style:{margin:0,padding:12,borderRadius:10,background:`#f8fafc`,maxHeight:420,overflow:`auto`,color:`#475569`},children:JSON.stringify(r,null,2)}):null]});if(!i.length)return(0,$.jsx)(Kf,{type:`warning`,showIcon:!0,message:`视频提词配置为空`,description:`当前 Schema 配置没有可展示字段。`});let a=e=>{let t=O9(r[e.key])?r[e.key]:{},i=e.children.filter(e=>e.enabled);return i.length?(0,$.jsxs)(`div`,{style:{marginBottom:18},children:[(0,$.jsx)(DU,{style:{marginBottom:8},children:(0,$.jsx)(E9,{strong:!0,style:{color:`#334155`,fontSize:13},children:e.label})}),(0,$.jsx)(`div`,{style:{borderLeft:`3px solid #6366f1`,paddingLeft:12,marginLeft:4},children:i.map(i=>(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsx)(DU,{style:{marginBottom:4},children:(0,$.jsx)(E9,{style:{color:`#64748b`,fontSize:12},children:i.label})}),i.editable?i.type===`boolean`?(0,$.jsx)(j9,{value:t[i.key],onChange:t=>n(C9(r,e.key,i.key,t))}):(0,$.jsx)(A9,{value:t[i.key],maxLength:i.maxLength,onChange:t=>n(C9(r,e.key,i.key,t))}):(0,$.jsx)(k9,{value:t[i.key]})]},i.key))})]},e.key):null},o=e=>{let t=Array.isArray(r[e.key])?r[e.key]:[],i=[{key:`时间段`,label:`时间段`,enabled:!0,editable:!1},...e.itemFields.filter(e=>e.enabled)];return(0,$.jsxs)(`div`,{style:{marginBottom:18},children:[(0,$.jsxs)(DU,{style:{marginBottom:8},children:[(0,$.jsx)(E9,{strong:!0,style:{color:`#334155`,fontSize:13},children:e.label}),(0,$.jsx)(T$,{color:`default`,children:`锁定条目和时间段`})]}),(0,$.jsx)(`div`,{style:{border:`1px solid #e5e7eb`,borderRadius:10,padding:12,background:`#fff`},children:t.length===0?(0,$.jsx)(E9,{style:{color:`#94a3b8`,fontSize:12},children:`暂无内容`}):t.map((a,o)=>{let s=O9(a)?a:{};return(0,$.jsxs)(`div`,{style:{marginBottom:o===t.length-1?0:14,paddingBottom:o===t.length-1?0:14,borderBottom:o===t.length-1?`none`:`1px dashed #e2e8f0`},children:[(0,$.jsxs)(E9,{strong:!0,style:{display:`block`,marginBottom:8,color:`#475569`,fontSize:12},children:[`第 `,o+1,` 段`]}),i.map(t=>(0,$.jsxs)(`div`,{style:{marginBottom:10},children:[(0,$.jsx)(DU,{style:{marginBottom:4},children:(0,$.jsx)(E9,{style:{color:`#64748b`,fontSize:12},children:t.label})}),t.editable?t.type===`boolean`?(0,$.jsx)(j9,{value:s[t.key],onChange:i=>n(w9(r,e.key,o,t.key,i))}):(0,$.jsx)(A9,{value:s[t.key],maxLength:t.maxLength,onChange:i=>n(w9(r,e.key,o,t.key,i))}):(0,$.jsx)(k9,{value:s[t.key]})]},t.key))]},`${e.key}-${o}`)})})]},e.key)},s=e=>e.key in r?(0,$.jsxs)(`div`,{style:{marginBottom:18},children:[(0,$.jsx)(DU,{style:{marginBottom:8},children:(0,$.jsx)(E9,{strong:!0,style:{color:`#334155`,fontSize:13},children:e.label})}),e.editable?(0,$.jsx)(A9,{value:r[e.key],maxLength:e.maxLength,onChange:t=>{let i=S9(r);i[e.key]=t,n(i)}}):(0,$.jsx)(k9,{value:r[e.key]})]},e.key):null;return(0,$.jsx)(`div`,{children:i.map(e=>e.key in r?e.type===`object`?a(e):e.type===`flow`?o(e):s(e):null)})},{Title:Fte,Text:N9}=Q,{TextArea:Ite}=nK;function Lte(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function Rte(){let e=Je(),{creatID:t}=Qe(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(`image`),[u,d]=(0,S.useState)({}),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(``),[g,_]=(0,S.useState)(!1),[v,y]=(0,S.useState)(null),[b,x]=(0,S.useState)({}),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(5),[j,M]=(0,S.useState)(`16:9`),[N,P]=(0,S.useState)(`480p`),[F,I]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]}),[L,R]=(0,S.useState)([]),[z,B]=(0,S.useState)(1),[V,H]=(0,S.useState)(20),[U,ee]=(0,S.useState)(0),[te,ne]=(0,S.useState)(``),[W,re]=(0,S.useState)({}),[G,K]=(0,S.useState)([]),[q,ie]=(0,S.useState)([]),J=[{id:1,title:`原始素材`,description:`上传原始视频素材`,childId:1},{id:2,title:`生成提示词`,description:`根据素材生成描述词`,childId:2},{id:3,title:`生成产品融合图`,description:`生成产品与场景融合图`,childId:3},{id:4,title:`生成视频提示词`,description:`生成视频生成提示词`,childId:4},{id:5,title:`生成最终视频`,description:`合成最终视频`,childId:5}].map((e,t)=>({...e,status:G[t]?.status||``,id:G[t]?.id||t,output:G[t]?.output||``,engineId:G[t]?.input?.payload?.videoConfig?.engineId||``}));(0,S.useEffect)(()=>{let e=new Set;q.forEach(t=>{let n=J.find(e=>String(e.childId)===t);n&&(n.status===`completed`||n.status===`failed`)&&e.add(t)});for(let t=J.length-1;t>=0;t--)if(J[t].status===`completed`||J[t].status===`failed`){e.add(String(J[t].childId));break}e.size>0?ie(Array.from(e)):ie([])},[G]);let ae=(e,t,n)=>{_7(e,t,n).then(e=>{e.items&&R(e.items),e.total!==void 0&&ee(e.total)}).catch(e=>{})},oe=(e,t)=>{B(e),H(t),ae(e,t,te)},se=()=>{B(1),ae(1,V,te)};(0,S.useEffect)(()=>{ae(z,V)},[]),(0,S.useEffect)(()=>{l7().then(e=>{if(x(e.engine||{}),e.engine?.video&&e.engine.video.length>0){w(e.engine.video[0].id);let t=e.engine.video[0];I({ratios:t.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions||[`480p`,`720p`,`1080p`],durations:t.supportedDurations||[5,8,10,12,15]})}}).catch(e=>{})},[]),(0,S.useEffect)(()=>()=>{v&&(clearInterval(v),y(null))},[v]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;!t.closest(`.image-settings-trigger`)&&!t.closest(`.image-settings-popover`)&&(E(!1),O(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,S.useEffect)(()=>{t&&v7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},[t]),(0,S.useEffect)(()=>{let e=J[4];e&&e.status!==`completed`&&e.status!==`failed`?v||y(setInterval(ue,15e3)):e&&v&&(clearInterval(v),y(null))},[J]);let ce=(e,t,n,i)=>{l(t||`image`),h(n?String(n):``),t===`video`?(p(i||null),d(e&&typeof e==`object`?Lte(e):{}),a(``)):(p(null),a(e||``),d({})),r(!0)},le=async()=>{if(c===`image`){if(!W?.id||!m){Z.warning(`缺少任务或步骤 ID,无法保存图片提示词`);return}if(!i||!i.trim()){Z.warning(`图片提示词不能为空`);return}_(!0);try{await b7(W.id,m,{prompt:i.trim()}),Z.success(`图片提示词已保存`),de(),r(!1),h(``)}catch(e){Z.error(e?.message||`保存图片提示词失败`)}finally{_(!1)}return}if(!W?.id||!m){Z.warning(`缺少任务或步骤 ID,无法保存视频提示词`);return}if(!u||typeof u!=`object`||Object.keys(u).length===0){Z.warning(`视频提示词不能为空`);return}if(!f){Z.warning(`视频提词配置缺失,暂不能保存`);return}let e=T9(u,f);if(e){Z.warning(e);return}_(!0);try{await k7(W.id,m,{prompt_schema:u}),Z.success(`视频提示词已保存`),de(),r(!1),h(``)}catch(e){Z.error(e?.message||`保存视频提示词失败`)}finally{_(!1)}},ue=()=>{t&&v7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},de=()=>{t&&v7(t).then(e=>{re(e),e.steps&&K(e.steps)}).catch(e=>{})},fe=e=>{x7(W.id,e.toString(),{engine_id:`0019e3dac0b795b925b`,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`}).then(e=>{de()}).catch(e=>{})},pe=()=>{x7(W.id,J[1].id.toString(),{engine_id:`0019e3dac0b795b925b`,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`}).then(e=>{de()}).catch(e=>{})},me=e=>{let t={engine_id:C,duration:k,aspect_ratio:j,resolution:N,target_platform:`抖音`};S7(W.id,e.toString(),t).then(e=>{de()}).catch(e=>{})},he=(e,t)=>{let n={engine_id:t};C7(W.id,e.toString(),n).then(e=>{de()}).catch(e=>{})},ge=()=>{let e={engine_id:J[3].engineId};C7(W.id,J[2].id.toString(),e).then(e=>{de()}).catch(e=>{})};return(0,$.jsxs)(S.Fragment,{children:[(0,$.jsx)(`div`,{className:`initialinfo-container`,style:{margin:`-24px -32px -32px`,height:`calc(100vh - 34px)`,position:`relative`,boxSizing:`border-box`,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:`2%`,position:`relative`,zIndex:1,minHeight:0},children:[(0,$.jsxs)(`div`,{className:`replication-preview`,style:{flex:4,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,boxSizing:`border-box`},children:[(0,$.jsx)(vD,{type:`text`,icon:(0,$.jsx)(g2,{}),onClick:()=>e(-1),style:{color:`#64748b`,borderRadius:10,fontSize:13,height:32,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`},children:`返回`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`爆款开头复刻 - 任务详情`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(vD,{type:`primary`,ghost:!0,style:{borderRadius:10,padding:`4px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},onClick:()=>s(!0),children:`创作记录`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`},children:(0,$.jsxs)(`div`,{className:`material_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,alignItems:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:W?.material?.materialVideoUrl?(0,$.jsx)(`video`,{controls:!0,src:W.material.materialVideoUrl,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无视频`})})]}),(0,$.jsxs)(`div`,{className:`product_img`,style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`产品图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:W?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:W.material.materialImageUrl,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无图片`})})]})]}),W?.finalImageUrl&&(0,$.jsx)(`div`,{style:{marginTop:16},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalImageUrl}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})}),W?.finalVideoUrl&&(0,$.jsx)(`div`,{style:{marginTop:16},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(`video`,{controls:!0,src:`http://ceshi.apiforeign.minzhong.cn${W.finalVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})})]})})]}),(0,$.jsxs)(`div`,{className:`replication-form`,style:{flex:1,minWidth:`450px`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,gap:10,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`生成步骤`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px 16px 16px`},children:(0,$.jsx)(r_,{activeKey:q,onChange:ie,ghost:!0,bordered:!1,style:{background:`transparent`},expandIconPlacement:`end`,items:J.map(e=>({key:String(e.childId),label:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,width:`100%`,justifyContent:`space-between`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:16,height:16},children:e.status===`completed`?(0,$.jsx)(i4,{style:{fontSize:16,color:`#22c55e`}}):e.status===`processing`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,background:`#ef4444`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:`#fff`,fontSize:10},children:`×`})}):(0,$.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:`#cbd5e1`}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:e.status===`processing`||e.status===`waiting_user`?`#6366f1`:`#1e293b`,fontWeight:500},children:e.title}),(e.status===`processing`||e.status===`waiting_user`)&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`,marginLeft:8},children:`生成中`}),e.status===`failed`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`,marginLeft:8},children:`失败`}),e.status===``&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#717d8b`,marginLeft:8},children:`待生成`})]})}),children:(0,$.jsxs)(`div`,{style:{padding:`16px`,background:`linear-gradient(135deg, rgba(248,250,252,0.6) 0%, rgba(238,242,255,0.4) 100%)`,borderRadius:12,marginTop:8,border:`1px solid rgba(99, 102, 241, 0.06)`},children:[e.childId===1&&(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,marginBottom:20,alignItems:`flex-start`,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(N9,{style:{color:`#475569`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`原视频`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},children:W?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:W.material.materialVideoUrl,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10},controls:!0}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,height:`16`,rx:`2`,ry:`2`}),(0,$.jsx)(`path`,{d:`M8 12l4 2 4-2`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无视频`})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(N9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`产品图片`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:10,background:`#f1f5f9`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:W?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:W.material.materialImageUrl,alt:`产品图片`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10}}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,$.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`,fill:`currentColor`}),(0,$.jsx)(`path`,{d:`M21 15l-5-5L5 21`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无图片`})]})})]})]})}),e.childId===2&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(N9,{style:{color:`#475569`,fontSize:13,lineHeight:1.8,whiteSpace:`pre-wrap`},children:e?.output?.payload?.prompt||`暂无提示词`})}),(0,$.jsxs)(DU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(vD,{type:`default`,icon:(0,$.jsx)(j$,{}),onClick:()=>ce(e?.output?.payload?.prompt,`image`,e.id),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`修改提示词`}),(0,$.jsx)(vD,{onClick:()=>{Z.info(`正在生成图片,请稍候...`),fe(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片`})]})]}),e.childId===3&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`,position:`relative`},children:[W.finalImageUrl?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalImageUrl}`,alt:`融合图`,style:{width:`100%`,height:180,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无融合图`}),(0,$.jsx)(vD,{type:`default`,icon:(0,$.jsx)(j$,{}),onClick:()=>pe(),disabled:e.status!==`completed`,style:{position:`absolute`,bottom:8,left:8,borderRadius:8,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:30,fontWeight:500,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(4px)`,padding:`0 12px`,fontSize:12},children:`重新生成`})]}),(0,$.jsx)(`p`,{style:{marginBottom:6,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`视频参数选择:`}),(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{E(!T),O(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(Y6,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(N9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:b.video?.find(e=>e.id===C)?.name||`选择引擎`})]}),T&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-10,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(N9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:b.video?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{w(e.id),I({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(j)||M(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(N)||P(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(k)||A(e.supportedDurations?.[0]||5),E(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:C===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:C===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:C===e.id?600:500,color:C===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{O(!D),E(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(j3,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(N9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[j,` · `,k,`s · `,N]})]}),D&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(N9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:F.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>M(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:j===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:j===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${j===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:j===e?`#6366f1`:`#6b7280`,fontWeight:j===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(N9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(k-Math.min(...F.durations))/(Math.max(...F.durations)-Math.min(...F.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...F.durations),max:Math.max(...F.durations),value:k,onChange:e=>A(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:k}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(N9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:F.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>P(e),style:{flex:1,height:42,borderRadius:6,border:N===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:N===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:N===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(vD,{type:`primary`,style:{width:`100%`,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},onClick:()=>{Z.info(`正在生成视频提示词,请稍候...`),me(e.id)},disabled:e.status!==`completed`,children:`下一步:生成视频提示词`})]}),e.childId===4&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(N9,{style:{color:`#64748b`,fontSize:13,lineHeight:1.8},children:`视频提词已生成,可点击按钮查看/修改`})}),(0,$.jsxs)(DU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(vD,{type:`default`,icon:(0,$.jsx)(j$,{}),onClick:()=>ce(W?.videoGeneration?.promptSchema,`video`,e.id,W?.videoGeneration?.schemaConfigSnapshot),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`||!W?.videoGeneration?.promptSchema||!W?.videoGeneration?.schemaConfigSnapshot,children:`查看/修改视频提词`}),(0,$.jsx)(vD,{onClick:()=>{Z.info(`正在生成视频,请稍候...`),he(e.id,e.engineId)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成视频`})]})]}),e.childId===5&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,position:`relative`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},children:e.status===`completed`&&W?.finalVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${W.finalVideoUrl}`,style:{width:`100%`,height:180,objectFit:`cover`},controls:!0}):e.status===`processing`?(0,$.jsxs)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:20,height:20,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}),(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontSize:14},children:`视频生成中...`})]}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#ef4444`,fontSize:14},children:`视频生成失败`}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无视频`})}),(0,$.jsxs)(DU,{style:{width:`100%`,gap:12},children:[(0,$.jsx)(vD,{onClick:()=>ge(),type:`default`,icon:(0,$.jsx)(j$,{}),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`重新生成`}),(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(p0,{}),style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,onClick:()=>{let e=`http://ceshi.apiforeign.minzhong.cn${W?.finalVideoUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=`video_${Date.now()}.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},children:`下载视频`})]})]})]})}))})})]})]})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:c===`video`?`查看/编辑视频提词`:`修改提示词`})]}),open:n,onCancel:()=>{g||r(!1)},footer:[(0,$.jsx)(vD,{onClick:()=>r(!1),disabled:g,style:{borderRadius:8},children:`取消`},`cancel`),(0,$.jsx)(vD,{type:`primary`,onClick:le,loading:g,disabled:g,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`确认`},`confirm`)],width:800,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`},body:{background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,padding:`20px 24px`}},children:c===`image`?(0,$.jsx)(Ite,{value:i,onChange:e=>a(e.target.value),rows:8,style:{width:`100%`,height:300,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},placeholder:`请输入提示词`}):(0,$.jsx)(`div`,{style:{maxHeight:500,overflowY:`auto`,paddingRight:10},children:(0,$.jsx)(M9,{value:u,schemaConfigSnapshot:f,onChange:d})})}),(0,$.jsxs)(Pq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`创作记录`})]}),open:o,onCancel:()=>s(!1),width:850,footer:null,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`},body:{background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginBottom:16},children:[(0,$.jsx)(nK,{placeholder:`搜索产品名称`,value:te,onChange:e=>ne(e.target.value),onPressEnter:se,style:{width:200,borderRadius:8,marginRight:8,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`}}),(0,$.jsx)(vD,{type:`primary`,onClick:se,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},children:`搜索`})]}),(0,$.jsx)(f$,{columns:[{title:`产品名称`,dataIndex:`targetProjectName`,key:`targetProjectName`,align:`center`},{title:`状态`,dataIndex:`status`,key:`status`,align:`center`,render:(e,t)=>{let n=e,r=t.current_step_code||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#666`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else return{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#666`}})();return typeof i==`string`?(0,$.jsx)(`span`,{style:{fontSize:12,color:`#666`,fontWeight:500},children:i}):(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,align:`center`,render:e=>{if(!e)return`-`;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`}},{title:`操作`,key:`action`,align:`center`,render:(t,n)=>(0,$.jsx)(`button`,{onClick:()=>e(`/initial/${n.id}/initialinfo`),style:{color:`#6366f1`,textDecoration:`none`,fontSize:12,border:`none`,background:`rgba(99, 102, 241, 0.08)`,padding:`4px 12px`,borderRadius:8,cursor:`pointer`,transition:`all 0.2s`,fontWeight:500},children:`查看详情`})}],dataSource:L,rowKey:`id`,pagination:{current:z,pageSize:V,total:U,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:oe},style:{fontSize:13},scroll:{y:350}})]})]})}function zte(){let e=Je(),[t,n]=(0,S.useState)(``),[r,i]=(0,S.useState)(``),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(``),[l,u]=(0,S.useState)(0),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)(1),[_,v]=(0,S.useState)(10),[y,b]=(0,S.useState)(0),[x,C]=(0,S.useState)(``),w=(0,S.useRef)(null),T=(0,S.useRef)(null),E=(0,S.useCallback)(()=>{t&&URL.revokeObjectURL(t),n(``),i(``),u(0),c(``)},[t]),D=async e=>{if(!e.type.startsWith(`video/`))return i(`请选择视频文件`),!1;if(e.size>100*1024*1024)return i(`视频文件大小不能超过 100MB`),!1;if(await new Promise(t=>{let n=document.createElement(`video`);n.preload=`metadata`,n.onloadedmetadata=()=>{t(n.duration),URL.revokeObjectURL(n.src)},n.onerror=()=>{t(0)},n.src=URL.createObjectURL(e)})>60)return i(`视频时长不能超过 1分钟`),!1;E(),f(!0);try{n((await H5(e)).url),i(``),Z.success(`视频上传成功`)}catch{i(`视频上传失败,请重试`),Z.error(`视频上传失败`)}finally{f(!1)}return!1},O=(0,S.useCallback)(()=>{w.current&&u(w.current.duration)},[]),k=async()=>{if(!t||!s.trim()){Z.warning(`请先上传视频并输入产品名称`);return}f(!0);try{A7({video_url:t,video_duration_seconds:l,title:s.trim(),idempotency_key:`shot_${Date.now()}`}).then(t=>{j7(1,20,x).then(t=>{Z.loading(`创建中...`,3),setTimeout(()=>{e(`/removelens/${t.items[0].id}/removeinfo`)},3e3)})}),E()}catch{Z.error(`任务创建失败,请重试`)}finally{f(!1)}},A=async(e,t,n)=>{try{let r=await j7(e,t,n);m(r.items||[]),b(r.total||0),g(e),v(t)}catch{Z.error(`获取列表失败`)}},j=(e,t)=>{A(e,t,x)},M=()=>{A(1,10,x)};return(0,$.jsx)(`div`,{style:{margin:`-24px -32px -32px`,borderRadius:20,minHeight:`calc(100vh - 34px)`,overflow:`auto`,background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,position:`relative`,padding:`20px 32px`,backgroundImage:`url(${Ste})`,backgroundRepeat:`no-repeat`,backgroundSize:`100% 100%`,backgroundPosition:`center`},children:(0,$.jsxs)(`div`,{style:{maxWidth:1200,margin:`50px auto`,position:`relative`,zIndex:10},children:[(0,$.jsxs)(`div`,{style:{marginBottom:50,height:160,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(`div`,{style:{width:40,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h1`,{style:{fontSize:24,fontWeight:700,margin:0,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`AI视频拆镜工作台`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`一键拆解画面分镜,助力仿拍或创作`})]}),(0,$.jsx)(`div`,{style:{width:40,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(vD,{type:`text`,icon:(0,$.jsx)(MU,{}),onClick:()=>{o(!0),A(1,10,x)},style:{fontSize:14,color:`#6366f1`,background:`rgba(99, 102, 241, 0.1)`,borderRadius:12,padding:`10px 20px`,display:`flex`,alignItems:`center`,gap:8,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`},children:`创作记录`})]}),(0,$.jsxs)(`div`,{style:{width:`100%`,maxWidth:720,margin:`0 auto`},children:[r&&(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(239, 68, 68, 0.2)`,borderRadius:12,padding:`14px 20px`,marginBottom:24,color:`#ef4444`,fontSize:14,textAlign:`center`,fontWeight:500},children:r}),!t&&(0,$.jsxs)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%)`,backdropFilter:`blur(20px)`,borderRadius:24,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(y0.Dragger,{accept:`video/*`,beforeUpload:D,showUploadList:!1,disabled:d,style:{background:d?`rgba(243, 244, 246, 0.3)`:`transparent`,border:`2px dashed ${d?`rgba(209, 213, 219, 0.5)`:`rgba(99, 102, 241, 0.3)`}`,borderRadius:24,padding:`56px 20px`,cursor:d?`not-allowed`:`pointer`,margin:0},children:d?(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:100,height:100,margin:`0 auto 20px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:24,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:40,height:40,border:`4px solid #6366f1`,borderTopColor:`transparent`,borderRadius:`50%`,animation:`spin 1s linear infinite`}})}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#6366f1`,margin:`0 0 8px 0`,fontWeight:600},children:`上传中...`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:0},children:`请稍候,视频正在上传`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:100,height:100,margin:`0 auto 20px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:24,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(g4,{style:{fontSize:40,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#1e293b`,margin:`0 0 8px 0`,fontWeight:600},children:`点击或拖拽到此上传视频文件`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:0},children:`支持 MP4、MOV 格式视频,最大支持 100MB 的文件,支持上传 1 分钟内的视频`})]})})]}),t&&(0,$.jsxs)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%)`,backdropFilter:`blur(20px)`,borderRadius:24,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,overflow:`hidden`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsxs)(`div`,{style:{borderRadius:22,background:`#ffffff`,padding:`24px`,position:`relative`,zIndex:1},children:[(0,$.jsx)(Rq,{title:`确定要删除吗?`,okText:`确定`,cancelText:`取消`,onConfirm:E,children:(0,$.jsx)(`button`,{style:{position:`absolute`,top:20,right:20,width:36,height:36,border:`1px solid rgba(99, 102, 241, 0.2)`,background:`rgba(99, 102, 241, 0.05)`,borderRadius:10,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:16,color:`#6366f1`,zIndex:10,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`,e.currentTarget.style.borderColor=`rgba(239, 68, 68, 0.3)`,e.currentTarget.style.color=`#ef4444`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`,e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.2)`,e.currentTarget.style.color=`#6366f1`},children:`🗑️`})}),(0,$.jsx)(`div`,{style:{textAlign:`center`,marginBottom:20},children:(0,$.jsx)(`video`,{ref:w,src:`http://ceshi.apiforeign.minzhong.cn${t}`,controls:!0,onLoadedMetadata:O,style:{maxWidth:`100%`,maxHeight:320,borderRadius:12,background:`#000`,boxShadow:`0 4px 16px rgba(0,0,0,0.1)`}})}),(0,$.jsxs)(`div`,{style:{marginBottom:24},children:[(0,$.jsxs)(`label`,{style:{display:`block`,fontSize:14,fontWeight:500,color:`#334155`,marginBottom:8},children:[`产品名称 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(nK,{placeholder:`请输入产品名称`,value:s,onChange:e=>c(e.target.value),style:{width:`100%`,height:44,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.4)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.2)`}})]}),(0,$.jsx)(`div`,{style:{textAlign:`center`,marginTop:16},children:(0,$.jsx)(`button`,{onClick:k,disabled:!t||!s.trim()||d,style:{padding:`14px 56px`,background:t&&s.trim()&&!d?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`:`#e2e8f0`,color:`white`,border:`none`,borderRadius:12,fontSize:15,fontWeight:600,cursor:t&&s.trim()&&!d?`pointer`:`not-allowed`,boxShadow:t&&s.trim()&&!d?`0 6px 20px rgba(99, 102, 241, 0.3)`:`none`,display:`inline-flex`,alignItems:`center`,gap:10,transition:`all 0.3s ease`},onMouseEnter:e=>{t&&s.trim()&&!d&&(e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 8px 25px rgba(99, 102, 241, 0.4)`)},onMouseLeave:e=>{t&&s.trim()&&!d&&(e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.3)`)},children:(0,$.jsx)(`span`,{children:d?`创建中...`:`创建`})})})]})]}),(0,$.jsx)(`canvas`,{ref:T,style:{display:`none`}}),(0,$.jsxs)(Pq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`创作记录`})]}),open:a,onCancel:()=>o(!1),width:800,footer:null,styles:{body:{background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginBottom:16,gap:8},children:[(0,$.jsx)(nK,{placeholder:`搜索产品名称`,value:x,onChange:e=>C(e.target.value),onPressEnter:M,style:{width:200,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,height:40}}),(0,$.jsx)(vD,{type:`primary`,onClick:M,style:{borderRadius:10,height:40,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%)`,backdropFilter:`blur(20px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(f$,{columns:[{title:`产品名称`,dataIndex:`title`,key:`title`,render:e=>(0,$.jsx)(`span`,{style:{fontSize:14,color:`#1e293b`,fontWeight:500},children:e})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:13,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,render:t=>(0,$.jsx)(vD,{type:`text`,onClick:()=>e(`/removelens/${t.id}/removeinfo`),style:{color:`#6366f1`,fontSize:13,padding:`4px 12px`,borderRadius:6,background:`rgba(99, 102, 241, 0.1)`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`},children:`查看详情`})}],dataSource:p,rowKey:`id`,pagination:{current:h,pageSize:_,total:y,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:j,style:{padding:`16px 24px`,borderTop:`1px solid rgba(99, 102, 241, 0.1)`}},style:{fontSize:13},scroll:{y:350},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(99, 102, 241, 0.03)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})})]})]})]})})}var Bte=c(o(((e,t)=>{(function(n){typeof e==`object`&&t!==void 0?t.exports=n():typeof define==`function`&&define.amd?define([],n):(typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this).JSZip=n()})(function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var c=typeof l==`function`&&l;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var u=Error(`Cannot find module '`+o+`'`);throw u.code=`MODULE_NOT_FOUND`,u}var d=n[o]={exports:{}};t[o][0].call(d.exports,function(e){var n=t[o][1][e];return i(n||e)},d,d.exports,e,t,n,r)}return n[o].exports}for(var a=typeof l==`function`&&l,o=0;o>2,s=(3&t)<<4|n>>4,c=1>6:64,l=2>4,n=(15&o)<<4|(s=a.indexOf(e.charAt(l++)))>>2,r=(3&s)<<6|(c=a.indexOf(e.charAt(l++))),f[u++]=t,s!==64&&(f[u++]=n),c!==64&&(f[u++]=r);return f}},{"./support":30,"./utils":32}],2:[function(e,t,n){var r=e(`./external`),i=e(`./stream/DataWorker`),a=e(`./stream/Crc32Probe`),o=e(`./stream/DataLengthProbe`);function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o(`data_length`)),t=this;return e.on(`end`,function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw Error(`Bug : uncompressed data size mismatch`)}),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo(`compressedSize`,this.compressedSize).withStreamInfo(`uncompressedSize`,this.uncompressedSize).withStreamInfo(`crc32`,this.crc32).withStreamInfo(`compression`,this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new a).pipe(new o(`uncompressedSize`)).pipe(t.compressWorker(n)).pipe(new o(`compressedSize`)).withStreamInfo(`compression`,t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){var r=e(`./stream/GenericWorker`);n.STORE={magic:`\0\0`,compressWorker:function(){return new r(`STORE compression`)},uncompressWorker:function(){return new r(`STORE decompression`)}},n.DEFLATE=e(`./flate`)},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){var r=e(`./utils`),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return e!==void 0&&e.length?r.getTypeOf(e)===`string`?function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){var r=null;r=typeof Promise<`u`?Promise:e(`lie`),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){var r=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Uint32Array<`u`,i=e(`pako`),a=e(`./utils`),o=e(`./stream/GenericWorker`),s=r?`uint8array`:`array`;function c(e,t){o.call(this,`FlateWorker/`+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic=`\b\0`,a.inherits(c,o),c.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(s,e.data),!1)},c.prototype.flush=function(){o.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new c(`Deflate`,e)},n.uncompressWorker=function(){return new c(`Inflate`,{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){function r(e,t){var n,r=``;for(n=0;n>>=8;return r}function i(e,t,n,i,o,u){var d,f,p=e.file,m=e.compression,h=u!==s.utf8encode,g=a.transformTo(`string`,u(p.name)),_=a.transformTo(`string`,s.utf8encode(p.name)),v=p.comment,y=a.transformTo(`string`,u(v)),b=a.transformTo(`string`,s.utf8encode(v)),x=_.length!==p.name.length,S=b.length!==v.length,C=``,w=``,T=``,E=p.dir,D=p.date,O={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(O.crc32=e.crc32,O.compressedSize=e.compressedSize,O.uncompressedSize=e.uncompressedSize);var k=0;t&&(k|=8),h||!x&&!S||(k|=2048);var A=0,j=0;E&&(A|=16),o===`UNIX`?(j=798,A|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,E)):(j=20,A|=function(e){return 63&(e||0)}(p.dosPermissions)),d=D.getUTCHours(),d<<=6,d|=D.getUTCMinutes(),d<<=5,d|=D.getUTCSeconds()/2,f=D.getUTCFullYear()-1980,f<<=4,f|=D.getUTCMonth()+1,f<<=5,f|=D.getUTCDate(),x&&(w=r(1,1)+r(c(g),4)+_,C+=`up`+r(w.length,2)+w),S&&(T=r(1,1)+r(c(y),4)+b,C+=`uc`+r(T.length,2)+T);var M=``;return M+=` -\0`,M+=r(k,2),M+=m.magic,M+=r(d,2),M+=r(f,2),M+=r(O.crc32,4),M+=r(O.compressedSize,4),M+=r(O.uncompressedSize,4),M+=r(g.length,2),M+=r(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+M+g+C,dirRecord:l.CENTRAL_FILE_HEADER+r(j,2)+M+r(y.length,2)+`\0\0\0\0`+r(A,4)+r(i,4)+g+C+y}}var a=e(`../utils`),o=e(`../stream/GenericWorker`),s=e(`../utf8`),c=e(`../crc32`),l=e(`../signature`);function u(e,t,n,r){o.call(this,`ZipFileWorker`),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo(`string`,this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){var r=e(`./Uint8ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){var r=e(`./DataReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){var r=e(`./ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array;var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){var r=e(`../utils`),i=e(`../support`),a=e(`./ArrayReader`),o=e(`./StringReader`),s=e(`./NodeBufferReader`),c=e(`./Uint8ArrayReader`);t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),t!==`string`||i.uint8array?t===`nodebuffer`?new s(e):i.uint8array?new c(r.transformTo(`uint8array`,e)):new a(r.transformTo(`array`,e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){n.LOCAL_FILE_HEADER=`PK`,n.CENTRAL_FILE_HEADER=`PK`,n.CENTRAL_DIRECTORY_END=`PK`,n.ZIP64_CENTRAL_DIRECTORY_LOCATOR=`PK\x07`,n.ZIP64_CENTRAL_DIRECTORY_END=`PK`,n.DATA_DESCRIPTOR=`PK\x07\b`},{}],24:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../utils`);function a(e){r.call(this,`ConvertWorker to `+e),this.destType=e}i.inherits(a,r),a.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../crc32`);function a(){r.call(this,`Crc32Probe`),this.withStreamInfo(`crc32`,0)}e(`../utils`).inherits(a,r),a.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataLengthProbe for `+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(a,i),a.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataWorker`);var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=``,this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}r.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case`string`:e=this.data.substring(this.index,t);break;case`uint8array`:e=this.data.subarray(this.index,t);break;case`array`:case`nodebuffer`:e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){function r(e){this.name=e||`default`,this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit(`data`,e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(`end`),this.cleanUp(),this.isFinished=!0}catch(e){this.emit(`error`,e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit(`error`,e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n `+e:e}},t.exports=r},{}],29:[function(e,t,n){var r=e(`../utils`),i=e(`./ConvertWorker`),a=e(`./GenericWorker`),o=e(`../base64`),s=e(`../support`),c=e(`../external`),l=null;if(s.nodestream)try{l=e(`../nodejs/NodejsStreamOutputAdapter`)}catch{}function u(e,t){return new c.Promise(function(n,i){var a=[],s=e._internalType,c=e._outputType,l=e._mimeType;e.on(`data`,function(e,n){a.push(e),t&&t(n)}).on(`error`,function(e){a=[],i(e)}).on(`end`,function(){try{n(function(e,t,n){switch(e){case`blob`:return r.newBlob(r.transformTo(`arraybuffer`,t),n);case`base64`:return o.encode(t);default:return r.transformTo(e,t)}}(c,function(e,t){var n,r=0,i=null,a=0;for(n=0;n`u`)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=new Blob([r],{type:`application/zip`}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),n.blob=i.getBlob(`application/zip`).size===0}catch{n.blob=!1}}}try{n.nodestream=!!e(`readable-stream`).Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){for(var r=e(`./utils`),i=e(`./support`),a=e(`./nodejsUtils`),o=e(`./stream/GenericWorker`),s=Array(256),c=0;c<256;c++)s[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;s[254]=s[254]=1;function l(){o.call(this,`utf-8 decode`),this.leftOver=null}function u(){o.call(this,`utf-8 encode`)}n.utf8encode=function(e){return i.nodebuffer?a.newBufferFrom(e,`utf-8`):function(e){var t,n,r,a,o,s=e.length,c=0;for(a=0;a>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo(`nodebuffer`,e).toString(`utf-8`):function(e){var t,n,i,a,o=e.length,c=Array(2*o);for(t=n=0;t>10&1023,c[n++]=56320|1023&i)}return c.length!==n&&(c.subarray?c=c.subarray(0,n):c.length=n),r.applyFromCharCode(c)}(e=r.transformTo(i.uint8array?`uint8array`:`array`,e))},r.inherits(l,o),l.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?`uint8array`:`array`,e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=t;(t=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),t.set(a,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+s[e[n]]>t?n:t}(t),c=t;o!==t.length&&(i.uint8array?(c=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(c=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:n.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=l,r.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){var r=e(`./support`),i=e(`./base64`),a=e(`./nodejsUtils`),o=e(`./external`);function s(e){return e}function c(e,t){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),e==0&&(this.dosPermissions=63&this.externalFileAttributes),e==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!==`/`||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||={};e.index+4>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},n.buf2binstring=function(e){return c(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n>10&1023,l[r++]=56320|1023&i)}return c(l,r)},n.utf8border=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+o[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){t.exports=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;n!==0;){for(n-=o=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s>>8^a[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){var r,i=e(`../utils/common`),a=e(`./trees`),o=e(`./adler32`),s=e(`./crc32`),c=e(`./messages`),l=0,u=4,d=0,f=-2,p=-1,m=4,h=2,g=8,_=9,v=286,y=30,b=19,x=2*v+1,S=15,C=3,w=258,T=w+C+1,E=42,D=113,O=1,k=2,A=3,j=4;function M(e,t){return e.msg=c[t],t}function N(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),n!==0&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function I(e,t){a._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function L(e,t){e.pending_buf[e.pending++]=t}function R(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function z(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-T?e.strstart-(e.w_size-T):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+w,p=l[a+o-1],m=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do if(l[(n=t)+o]===m&&l[n+o-1]===p&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do;while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&ac&&--i!=0);return o<=e.lookahead?o:e.lookahead}function B(e){var t,n,r,a,c,l,u,d,f,p,m=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-T)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);a+=m}if(e.strm.avail_in===0)break;if(l=e.strm,u=e.window,d=e.strstart+e.lookahead,f=a,p=void 0,p=l.avail_in,f=C)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C)if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-C,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(B(e),e.lookahead===0&&t===l)return O;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,I(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-T&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):(e.strstart>e.block_start&&(I(e,!1),e.strm.avail_out),O)}),new U(4,4,8,4,V),new U(4,5,16,8,V),new U(4,6,32,32,V),new U(4,4,16,16,H),new U(8,16,32,32,H),new U(8,16,128,128,H),new U(8,32,128,256,H),new U(32,128,258,1024,H),new U(32,258,258,4096,H)],n.deflateInit=function(e,t){return W(e,t,g,15,8,0)},n.deflateInit2=W,n.deflateReset=ne,n.deflateResetKeep=te,n.deflateSetHeader=function(e,t){return e&&e.state&&e.state.wrap===2?(e.state.gzhead=t,d):f},n.deflate=function(e,t){var n,i,o,c;if(!e||!e.state||5>8&255),L(i,i.gzhead.time>>16&255),L(i,i.gzhead.time>>24&255),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(L(i,255&i.gzhead.extra.length),L(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(L(i,0),L(i,0),L(i,0),L(i,0),L(i,0),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,3),i.status=D);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:i.level===6?2:3)<<6,i.strstart!==0&&(p|=32),p+=31-p%31,i.status=D,R(i,p),i.strstart!==0&&(R(i,e.adler>>>16),R(i,65535&e.adler)),e.adler=1}if(i.status===69)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending!==i.pending_buf_size));)L(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(i.status===73)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.gzindex=0,i.status=91)}else i.status=91;if(i.status===91)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.status=103)}else i.status=103;if(i.status===103&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&F(e),i.pending+2<=i.pending_buf_size&&(L(i,255&e.adler),L(i,e.adler>>8&255),e.adler=0,i.status=D)):i.status=D),i.pending!==0){if(F(e),e.avail_out===0)return i.last_flush=-1,d}else if(e.avail_in===0&&N(t)<=N(n)&&t!==u)return M(e,-5);if(i.status===666&&e.avail_in!==0)return M(e,-5);if(e.avail_in!==0||i.lookahead!==0||t!==l&&i.status!==666){var m=i.strategy===2?function(e,t){for(var n;;){if(e.lookahead===0&&(B(e),e.lookahead===0)){if(t===l)return O;break}if(e.match_length=0,n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):i.strategy===3?function(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=w){if(B(e),e.lookahead<=w&&t===l)return O;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=C&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(n=a._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):r[i.level].func(i,t);if(m!==A&&m!==j||(i.status=666),m===O||m===A)return e.avail_out===0&&(i.last_flush=-1),d;if(m===k&&(t===1?a._tr_align(i):t!==5&&(a._tr_stored_block(i,0,0,!1),t===3&&(P(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),F(e),e.avail_out===0))return i.last_flush=-1,d}return t===u?i.wrap<=0?1:(i.wrap===2?(L(i,255&e.adler),L(i,e.adler>>8&255),L(i,e.adler>>16&255),L(i,e.adler>>24&255),L(i,255&e.total_in),L(i,e.total_in>>8&255),L(i,e.total_in>>16&255),L(i,e.total_in>>24&255)):(R(i,e.adler>>>16),R(i,65535&e.adler)),F(e),0=n.w_size&&(s===0&&(P(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),c=e.avail_in,l=e.next_in,u=e.input,e.avail_in=m,e.next_in=0,e.input=t,B(n);n.lookahead>=C;){for(r=n.strstart,a=n.lookahead-(C-1);n.ins_h=(n.ins_h<>>=b=y>>>24,m-=b,(b=y>>>16&255)==0)E[a++]=65535&y;else{if(!(16&b)){if(!(64&b)){y=h[(65535&y)+(p&(1<>>=b,m-=b),m<15&&(p+=T[r++]<>>=b=y>>>24,m-=b,!(16&(b=y>>>16&255))){if(!(64&b)){y=g[(65535&y)+(p&(1<>>=b,m-=b,(b=a-o)>3,p&=(1<<(m-=x<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=1&t.wrap),t.mode=f,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(p),t.distcode=t.distdyn=new r.Buf32(m),t.sane=1,t.back=-1,u):d}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,_(e)):d}function y(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(a=o.wsize-o.wnext)&&(a=i),r.arraySet(o.window,t,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=a(n.check,B,2,0),x=b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg=`incorrect header check`,n.mode=30;break}if((15&b)!=8){e.msg=`unknown compression method`,n.mode=30;break}if(x-=4,F=8+(15&(b>>>=4)),n.wbits===0)n.wbits=F;else if(F>n.wbits){e.msg=`invalid window size`,n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=3;case 3:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>8&255,B[2]=b>>>16&255,B[3]=b>>>24&255,n.check=a(n.check,B,4,0)),x=b=0,n.mode=4;case 4:for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>8),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>>8&255,n.check=a(n.check,B,2,0)),x=b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(E=n.length)&&(E=v),E&&(n.head&&(F=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,E,F)),512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(v===0)break e;for(E=0;F=p[g+ E++],n.head&&F&&n.length<65536&&(n.head.name+=String.fromCharCode(F)),F&&E>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(v===0)break e;v--,b+=p[g++]<>>=1)){case 0:n.mode=14;break;case 1:if(w(n),n.mode=20,t!==6)break;b>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg=`invalid block type`,n.mode=30}b>>>=2,x-=2;break;case 14:for(b>>>=7&x,x-=7&x;x<32;){if(v===0)break e;v--,b+=p[g++]<>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=30;break}if(n.length=65535&b,x=b=0,n.mode=15,t===6)break e;case 15:n.mode=16;case 16:if(E=n.length){if(v>>=5,x-=5,n.ndist=1+(31&b),b>>>=5,x-=5,n.ncode=4+(15&b),b>>>=4,x-=4,286>>=3,x-=3}for(;n.have<19;)n.lens[V[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,L={bits:n.lenbits},I=s(0,n.lens,0,19,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid code lengths set`,n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=k,x-=k,n.lens[n.have++]=j;else{if(j===16){for(R=k+2;x>>=k,x-=k,n.have===0){e.msg=`invalid bit length repeat`,n.mode=30;break}F=n.lens[n.have-1],E=3+(3&b),b>>>=2,x-=2}else if(j===17){for(R=k+3;x>>=k)),b>>>=3,x-=3}else{for(R=k+7;x>>=k)),b>>>=7,x-=7}if(n.have+E>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=30;break}for(;E--;)n.lens[n.have++]=F}}if(n.mode===30)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=30;break}if(n.lenbits=9,L={bits:n.lenbits},I=s(c,n.lens,0,n.nlen,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid literal/lengths set`,n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,L={bits:n.distbits},I=s(l,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,L),n.distbits=L.bits,I){e.msg=`invalid distances set`,n.mode=30;break}if(n.mode=20,t===6)break e;case 20:n.mode=21;case 21:if(6<=v&&258<=y){e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,o(e,C),_=e.next_out,m=e.output,y=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,b=n.hold,x=n.bits,n.mode===12&&(n.back=-1);break}for(n.back=0;A=(z=n.lencode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,n.length=j,A===0){n.mode=26;break}if(32&A){n.back=-1,n.mode=12;break}if(64&A){e.msg=`invalid literal/length code`,n.mode=30;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(z=n.distcode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,64&A){e.msg=`invalid distance code`,n.mode=30;break}n.offset=j,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=30;break}n.mode=25;case 25:if(y===0)break e;if(E=C-y,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break}D=E>n.wnext?(E-=n.wnext,n.wsize-E):n.wnext-E,E>n.length&&(E=n.length),O=n.window}else O=m,D=_-n.offset,E=n.length;for(yv?(b=L[R+d[w]],N[P+d[w]]):(b=96,0),p=1<>k)+(m-=p)]=y<<24|b<<16|x|0,m!==0;);for(p=1<>=1;if(p===0?M=0:(M&=p-1,M+=p),w++,--F[C]==0){if(C===E)break;C=t[n+d[w]]}if(D>>7)]}function L(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function R(e,t,n){e.bi_valid>h-n?(e.bi_buf|=t<>h-e.bi_valid,e.bi_valid+=n-h):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function V(e,t,n){var r,i,a=Array(m+1),o=0;for(r=1;r<=m;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];s!==0&&(e[2*i]=B(a[s]++,s))}}function H(e){var t;for(t=0;t>1;1<=n;n--)te(e,a,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],te(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,te(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,o,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,g=t.stat_desc.max_length,_=0;for(a=0;a<=m;a++)e.bl_count[a]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n>=7;r>>=1)if(1&n&&e.dyn_ltree[2*t]!==0)return i;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return a;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=n+5,n+4<=o&&t!==-1?q(e,t,n,r):e.strategy===4||s===o?(R(e,2+ +!!r,3),ne(e,T,E)):(R(e,4+ +!!r,3),function(e,t,n,r){var i;for(R(e,t-257,5),R(e,n-1,5),R(e,r-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(O[n]+l+1)]++,e.dyn_dtree[2*I(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){R(e,2,3),z(e,_,T),function(e){e.bi_valid===16?(L(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){(function(e,t){if(!e.setImmediate){var n,r,i,a,o=1,s={},c=!1,l=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,n={}.toString.call(e.process)===`[object process]`?function(e){process.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage(``,`*`),e.onmessage=n,t}}()?(a=`setImmediate$`+Math.random()+`$`,e.addEventListener?e.addEventListener(`message`,p,!1):e.attachEvent(`onmessage`,p),function(t){e.postMessage(a+t,`*`)}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):l&&`onreadystatechange`in l.createElement(`script`)?(r=l.documentElement,function(e){var t=l.createElement(`script`);t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(f,0,e)},u.setImmediate=function(e){typeof e!=`function`&&(e=Function(``+e));for(var t=Array(arguments.length-1),r=0;r`u`?e===void 0?this:e:self)}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{}]},{},[10])(10)})}))(),1),{Search:Vte}=nK,{Text:Hte}=Q,Ute=()=>{let[e,t]=(0,S.useState)(`project`),[n,r]=(0,S.useState)(`video`),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)({page:1,pageSize:10}),[c,l]=(0,S.useState)(0),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(new Set),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(null),v=S.createRef(),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),[E,D]=(0,S.useState)([]),[O,k]=(0,S.useState)(``),[A,j]=(0,S.useState)([]),[M,N]=(0,S.useState)(!1),[P,F]=(0,S.useState)(0),[I,L]=(0,S.useState)(void 0),[R,z]=(0,S.useState)(new Map),[B,V]=(0,S.useState)(``),H=(0,S.useRef)(null),[U,ee]=(0,S.useState)(1),[te,ne]=(0,S.useState)(10),[W,re]=(0,S.useState)(!1),[G,K]=(0,S.useState)(!1),[q,ie]=(0,S.useState)([]),[J,ae]=(0,S.useState)(0),[oe,se]=(0,S.useState)(1),[ce,le]=(0,S.useState)(10),[ue,de]=(0,S.useState)(!1),[fe,pe]=(0,S.useState)(``),[me,he]=(0,S.useState)(!1),[ge,_e]=(0,S.useState)(new Set),ve=null,ye=new Map,be=[],xe=0,Se=0,Ce=(e,t,n)=>{if(n&&Se<8)Se++,xe++,e();else if(xe<15)xe++,e();else{let r={callback:e,priority:n?2:1,element:t};be.push(r),be.sort((e,t)=>t.priority-e.priority)}},we=()=>{if(xe--,Se>0&&Se--,be.length>0){let e=be.shift();e&&(xe++,e.priority===2&&Se++,e.callback())}},Te=()=>(ve||=new IntersectionObserver(e=>{e.forEach(e=>{let t=ye.get(e.target);if(e.isIntersecting&&t){ye.delete(e.target),ve?.unobserve(e.target);let n=e.intersectionRatio>=1;Ce(t,e.target,n)}})},{rootMargin:`400px`,threshold:[.01,.5,1]}),ve),Ee=e=>{if(!e)return null;try{let t=new URL(e).searchParams.get(`exp`);return t?parseInt(t,10):null}catch{try{let t=e.indexOf(`?`);if(t!==-1){let n=e.substring(t+1),r=new URLSearchParams(n).get(`exp`);if(r)return parseInt(r,10)}return null}catch{return null}}},De=e=>{let t=Ee(e);return t?Math.floor(Date.now()/1e3)>t:!1},Oe=({item:e,mediaType:t,onClick:n,isSelected:r=!1,onToggleSelect:i,isSelectionMode:a=!1})=>{let[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),m=(0,S.useRef)(null),h=(0,S.useRef)(null),g=(0,S.useRef)(null);(0,S.useEffect)(()=>{let n=t===`video`?e.videoUrl:e.imageUrl;n&&De(n)&&d(!0)},[e,t]),(0,S.useEffect)(()=>{if(u)return;let e=m.current;if(!e)return;let t=Te();return ye.set(e,()=>{p(!0)}),t.observe(e),()=>{ye.delete(e),t.unobserve(e)}},[u]);let _=(e,t=!1)=>{let n=`http://ceshi.apiforeign.minzhong.cn`,r=e.startsWith(`/`)?e.slice(1):e,i=n.endsWith(`/`)?n.slice(0,-1):n;return t?`${i}/static/${r}&w=300&q=50`:`${i}/${r}`},v=()=>{g.current&&clearTimeout(g.current),s(!0),p(!1),we()},y=()=>{g.current=setTimeout(()=>{_(t===`video`?e.videoUrl:e.imageUrl),l(!0),p(!1),we()},1e3)},b=t===`video`?_(e.videoUrl):_(e.imageUrl,!0),x=e.videoCoverUrl?_(e.videoCoverUrl,!0):void 0;return(0,$.jsxs)(`div`,{ref:m,style:{width:160,height:120,position:`relative`,borderRadius:4,cursor:`pointer`,overflow:`hidden`,boxShadow:`0 2px 8px rgba(0,0,0,0.1)`,transition:`transform 0.2s, box-shadow 0.2s`},onClick:a?void 0:n,onMouseEnter:e=>{a||(e.currentTarget.style.transform=`scale(1.05)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0,0,0,0.2)`)},onMouseLeave:e=>{a||(e.currentTarget.style.transform=`scale(1)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(0,0,0,0.1)`)},children:[(t===`video`&&e.videoCoverUrl||t===`image`)&&(f||o)&&!c&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`},children:[f&&!o&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,backgroundColor:`rgba(248, 250, 252, 0.9)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1},children:(0,$.jsx)(`div`,{style:{width:28,height:28,border:`3px solid #e2e8f0`,borderTopColor:`#3b82f6`,borderRadius:`50%`,animation:`spin 0.8s linear infinite`}})}),t===`video`&&e.videoCoverUrl&&(0,$.jsx)(`img`,{ref:h,src:x,style:{width:`100%`,height:`100%`,objectFit:`cover`,opacity:+!!o,transition:`opacity 0.3s ease-in-out`},loading:`lazy`,onLoad:v,onError:y}),t===`image`&&(0,$.jsx)(`img`,{ref:h,src:b,alt:`图片预览`,style:{width:`100%`,height:`100%`,objectFit:`cover`,opacity:+!!o,transition:`opacity 0.3s ease-in-out`},loading:`lazy`,onLoad:v,onError:y})]}),!f&&!o&&!c&&(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,backgroundColor:`#cbd5e1`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:t===`video`?(0,$.jsx)(Y8,{style:{color:`#64748b`,fontSize:16}}):(0,$.jsx)(p6,{style:{color:`#64748b`,fontSize:16}})})}),t===`video`&&!e.videoCoverUrl&&!c&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#1e293b`},children:[(0,$.jsx)(Y8,{style:{color:`#64748b`,fontSize:24}}),(0,$.jsx)(Hte,{style:{fontSize:12,color:`#94a3b8`,marginTop:4},children:`暂无封面`})]}),u&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#fef3c7`,color:`#d97706`,fontSize:12,flexDirection:`column`,gap:4},children:[(0,$.jsx)(OH,{style:{fontSize:24}}),`图片过期`]}),c&&(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#fef2f2`,color:`#dc2626`,fontSize:12},children:`加载失败`}),!u&&!a&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:0,left:0,right:0,background:`linear-gradient(transparent, rgba(0,0,0,0.5))`,padding:`8px`,color:`#fff`,fontSize:12,opacity:0,transition:`opacity 0.2s`},onMouseEnter:e=>{e.currentTarget.style.opacity=`1`},onMouseLeave:e=>{e.currentTarget.style.opacity=`0`},children:`点击预览`}),a&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,width:20,height:20,borderRadius:`50%`,backgroundColor:r?`#10b981`:`rgba(255,255,255,0.9)`,border:r?`2px solid #10b981`:`2px solid #d1d5db`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,transition:`all 0.2s`},onClick:t=>{t.stopPropagation(),i?.(e.generatedResourceId||e.id)},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`},children:r&&(0,$.jsx)(`svg`,{width:12,height:12,viewBox:`0 0 12 12`,fill:`none`,children:(0,$.jsx)(`path`,{d:`M10 3L4.5 8.5L2 6`,stroke:`white`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`})})}),a&&r&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,border:`3px solid #10b981`,borderRadius:4,pointerEvents:`none`,zIndex:5}})]})},ke=e=>{_(e),h(!0),window.dispatchEvent(new Event(`previewOpen`))},Ae=()=>{v.current&&(v.current.pause(),v.current.currentTime=0),document.querySelectorAll(`video`).forEach(e=>{e.pause(),e.currentTime=0}),h(!1)},je=e=>e.generatedResourceId||e.id,Me=e=>!!e.generatedResourceId,Ne=e=>{_e(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},Pe=()=>{let e=i.flatMap(e=>e.items.map(e=>je(e)));ge.size===e.length?_e(new Set):_e(new Set(e))},Fe=async()=>{if(ge.size===0){Z.warning(`请先选择要下载的媒体`);return}if(ge.size>10){Z.warning(`最多只能单次下载10个文件`);return}let e=[];i.forEach(t=>{t.items.forEach(t=>{ge.has(je(t))&&e.push(t)})});let t=new Bte.default,n=`http://ceshi.apiforeign.minzhong.cn`,r=t.folder(`downloads`),a=!1,o=0;Z.loading({content:`下载中,请稍候...`,key:`downloadProgress`});for(let t of e){let e=`${n}${t.videoUrl||t.imageUrl}`,i=((t.videoUrl||t.imageUrl).split(`/`).pop()||`file_${Date.now()}`).split(`?`)[0];try{let t=await fetch(e);if(!t.ok)throw Error(`Network response was not ok`);let n=await t.blob();r?.file(i,n),o++}catch{console.warn(`文件下载失败(CORS限制): ${i},将使用备用方式下载`),a=!0;break}}if(a){Z.destroy(`downloadProgress`),Z.info(`由于跨域限制,将逐个下载文件`),e.forEach((e,t)=>{setTimeout(()=>{let t=`${n}${e.videoUrl||e.imageUrl}&download=1`,r=document.createElement(`a`);r.href=t,r.download=``,document.body.appendChild(r),r.click(),document.body.removeChild(r)},t*500)});return}let s=await t.generateAsync({type:`blob`}),c=document.createElement(`a`);c.href=URL.createObjectURL(s),c.download=`downloads_${Date.now()}.zip`,c.click(),URL.revokeObjectURL(c.href),Z.destroy(`downloadProgress`),Z.success(`下载完成,共 ${o} 个文件`)},Ie=()=>{if(ge.size===0){Z.warning(`请先选择要上传的媒体`);return}D([]),k(``),T(!0)},Le=async(e,t)=>{N(!0);try{let n=await E7({page:e,page_size:t});j(n?.data||n||[]),F(n.pagination.total||0)}catch(e){console.error(`加载授权列表失败:`,e),j([]),F(0)}finally{N(!1)}},Re=async()=>{de(!0);try{let e=await K7({status:fe||void 0,page:oe,pageSize:ce});ie(e?.data||e||[]),ae(e.pagination?.total||e.total||0)}catch(e){console.error(`加载上传历史失败:`,e),ie([]),ae(0)}finally{de(!1)}},ze=()=>{K(!0),se(1),pe(``),Re()},Be=()=>{se(1),Re()},Ve=(e,t)=>{se(e),le(t),Re()},He=async()=>{if(!I){Z.warning(`请先选择授权账户`);return}if(ge.size===0){Z.warning(`请先选择要上传的媒体`);return}C(!0);try{let t=[],n=E.map(e=>e.accountId),r=new Map;i.forEach(e=>{e.items.forEach(e=>{let t=je(e);r.set(t,e)})});for(let i of ge){let a=r.get(i),o;o=a&&Me(a)?`generated_resources`:e===`project`?`generation_records`:`chat_generation_tasks`,t.push({advertiser_ids:n,resource_ids:[i],oauth_id:I.value,source_model:o})}await G7({tasks:t}),Z.success(`已提交 ${t.length} 个上传任务,后台异步处理中`),he(!1),_e(new Set),T(!1),D([]),k(``),L(void 0),z(new Map),V(``)}catch(e){console.error(`批量上传失败:`,e),Z.error(e.message||`批量上传失败`)}finally{C(!1)}},Ue=async(e,t)=>{if(t.trim())try{let n=(await q7({filenames:[{source_id:e,file_name:t}]}))?.results?.find(t=>t.source_id===e)?.new_file_name||t;a(t=>t.map(t=>({...t,items:t.items.map(t=>je(t)===e?{...t,fileName:n}:t)}))),Z.success(`文件名更新成功`)}catch(e){console.error(`文件名更新失败:`,e),Z.error(e.message||`文件名更新失败`)}},We=async(e,t)=>{if(!(!t.trim()||e.length===0))try{let n=await q7({filenames:e.map(e=>({source_id:e,file_name:t}))}),r=new Map;n?.results?.forEach(e=>{e.success&&e.newFileName&&r.set(e.sourceId,e.newFileName)}),a(n=>{let i=new Set(e);return n.map(e=>({...e,items:e.items.map(e=>{let n=je(e);if(i.has(n)){let i=r.get(n)||t;return{...e,fileName:i}}return e})}))}),console.log(n);let i=n?.successCount||0;Z.success(`已更新 ${i} 个文件名`)}catch(e){console.error(`文件名更新失败:`,e),Z.error(e.message||`文件名更新失败`)}},Ge=e=>{b(e)};(0,S.useEffect)(()=>{d(!0);let t=``;if(t=e===`project`?`?gen_type=${n}&history_source=generation_record&page=${o.page}&page_size=${o.pageSize}`:`?gen_type=${n}&page=${o.page}&page_size=${o.pageSize}`,y){let t=``;t=e===`project`?`${y}?gen_type=${n}&history_source=generation_record&page=${o.page}&page_size=${o.pageSize}`:`${y}?gen_type=${n}&page=${o.page}&page_size=${o.pageSize}`,p7(t).then(e=>{let t=Array.isArray(e)?e:e?.items||[],n=[{generatedDate:e.generatedDate,items:t,total:e.total,page:e.page}];n&&n[0].items.length>0?a(n):a([])}).catch(e=>{}).finally(()=>{d(!1)})}else f7(t).then(e=>{let t=Array.isArray(e)?e:e?.groups||[];t.forEach(e=>{e.page=1}),o.page===1?a(t):a(e=>[...e,...t]),l(e?.totalDays||0)}).catch(e=>{o.page===1&&a([])}).finally(()=>{d(!1)})},[e,n,o.page,y]);let Ke=()=>{u||s(e=>({...e,page:e.page+1}))},qe=async(t,r,i)=>{if(f.has(r))return;p(e=>new Set([...e,r]));let s=i+1,c=``;c=e===`project`?`${t}?gen_type=${n}&history_source=generation_record&page=${s}&page_size=${o.pageSize}`:`${t}?gen_type=${n}&page=${s}&page_size=${o.pageSize}`;try{let e=(await p7(c)).items||[];e&&e.length>0&&a(n=>n.map(n=>n.generatedDate===t?{...n,items:[...n.items,...e],page:s}:n))}catch{}finally{p(e=>{let t=new Set(e);return t.delete(r),t})}};return(0,S.useEffect)(()=>{s(e=>({...e,page:1}))},[e,n]),(0,$.jsxs)(`div`,{style:{minHeight:`calc(100vh - 90px)`,background:`#ffffffff`,overflowY:`auto`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:16,padding:`12px 20px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(K4,{style:{color:`#94a3b8`,fontSize:14}}),(0,$.jsxs)(DU,{children:[(0,$.jsx)(vD,{type:e===`project`?`primary`:`default`,onClick:()=>{t(`project`),he(!1),_e(new Set)},style:{borderRadius:8,background:e===`project`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:e===`project`?`none`:`1px solid #e2e8f0`,color:e===`project`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(xZ,{}),children:`项目记录`}),(0,$.jsx)(vD,{type:e===`creation`?`primary`:`default`,onClick:()=>{t(`creation`),he(!1),_e(new Set)},style:{borderRadius:8,background:e===`creation`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:e===`creation`?`none`:`1px solid #e2e8f0`,color:e===`creation`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(MU,{}),children:`创作记录`})]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:me?(0,$.jsxs)(DU,{children:[(0,$.jsx)(vD,{onClick:Pe,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#222222ff`,fontWeight:600},children:ge.size===i.reduce((e,t)=>e+t.items.length,0)?`取消全选`:`全选`}),(0,$.jsx)(vD,{onClick:()=>{he(!1),_e(new Set)},style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:600},children:`取消选择`}),(0,$.jsxs)(vD,{onClick:()=>Fe(),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,fontWeight:600},children:[`下载 (`,ge.size,`)`]}),(0,$.jsx)(vD,{type:`primary`,onClick:Ie,loading:x,disabled:x||ge.size===0,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,fontWeight:600},children:x?`上传中...`:`推送至账户 (${ge.size})`})]}):(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(U8,{}),onClick:()=>he(!0),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600},children:`批量操作`})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:24,padding:`12px 20px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:`媒体类型:`}),(0,$.jsxs)(DU,{children:[(0,$.jsx)(vD,{type:n===`video`?`primary`:`default`,onClick:()=>{r(`video`),he(!1),_e(new Set)},style:{borderRadius:8,background:n===`video`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:n===`video`?`none`:`1px solid #e2e8f0`,color:n===`video`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(Y8,{}),children:`视频`}),(0,$.jsx)(vD,{type:n===`image`?`primary`:`default`,onClick:()=>{r(`image`),he(!1),_e(new Set)},style:{borderRadius:8,background:n===`image`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:n===`image`?`none`:`1px solid #e2e8f0`,color:n===`image`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(p6,{}),children:`图片`}),(0,$.jsx)(FH,{picker:`date`,value:y?(0,ED.default)(y):void 0,onChange:(e,t)=>Ge(t||``),format:`YYYY-MM-DD`,style:{width:160,borderRadius:8,border:`1px solid #e2e8f0`},placeholder:`选择日期`}),y&&(0,$.jsx)(vD,{type:`text`,onClick:()=>Ge(``),style:{color:`#94a3b8`,fontSize:12},children:`清除`})]})]}),(0,$.jsx)(vD,{icon:(0,$.jsx)(OH,{}),onClick:ze,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,color:`#ffffff`,fontWeight:600,boxShadow:`0 4px 15px rgba(102, 126, 234, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(102, 126, 234, 0.6)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 15px rgba(102, 126, 234, 0.4)`},children:`查询上传任务历史`})]}),i.length===0?(0,$.jsx)(NC,{image:NC.PRESENTED_IMAGE_SIMPLE,description:`暂无生成记录`,style:{padding:`60px 0`}}):(0,$.jsxs)(`div`,{style:{padding:`0 4px`},children:[i.map((e,t)=>(0,$.jsxs)(`div`,{style:{marginBottom:32},children:[(0,$.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`#64748b`,marginBottom:12,paddingLeft:8},children:e.generatedDate}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8},children:e.items.map(e=>(0,$.jsx)(Oe,{item:e,mediaType:n,onClick:()=>me?Ne(je(e)):ke(e),isSelected:ge.has(je(e)),onToggleSelect:Ne,isSelectionMode:me},je(e)))}),e.total&&e.total>e.items.length&&(0,$.jsx)(`div`,{style:{padding:`12px 0`,textAlign:`left`},children:(0,$.jsx)(vD,{onClick:()=>qe(e.generatedDate,e.items,e.page),loading:f.has(e.generatedDate),disabled:f.has(e.generatedDate),size:`small`,style:{borderRadius:6,background:`transparent`,border:`1px dashed #cbd5e1`,color:`#64748b`,fontSize:12},children:f.has(e.date)?`加载中...`:`查看全部 (${e.total})`})})]},t)),i.length>0&&c>i.length&&(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:`20px 0`},children:(0,$.jsx)(vD,{onClick:Ke,loading:u,disabled:u,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:500},children:u?`加载中...`:`加载更多`})})]}),(0,$.jsx)(Pq,{title:`批量上传配置`,open:w,onCancel:()=>{T(!1),D([]),k(``),L(void 0),z(new Map),V(``)},footer:null,width:900,mask:{closable:!1},children:(0,$.jsxs)(`div`,{style:{padding:`16px 0`},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`},children:[`选中素材 (`,ge.size,`个)`]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:12,alignItems:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`},children:`统一修改名称:`}),(0,$.jsx)(nK,{value:B,onChange:e=>V(e.target.value),placeholder:`输入名称后点击应用`,style:{flex:1,borderRadius:8},size:`small`}),(0,$.jsx)(vD,{type:`primary`,size:`small`,onClick:()=>{B.trim()&&ge.size>0&&We(Array.from(ge),B)},disabled:!B.trim()||ge.size===0,style:{borderRadius:8},children:`应用`})]}),(0,$.jsx)(`div`,{style:{maxHeight:300,overflow:`auto`,border:`1px solid #f0f0f0`,borderRadius:8,padding:12},children:(()=>{let e=new Map;return i.forEach(t=>{t.items.forEach(t=>{let n=je(t);e.set(n,t)})}),Array.from(ge).map(t=>{let r=e.get(t);return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 0`,borderBottom:`1px solid #f5f5f5`},children:[(0,$.jsx)(`div`,{style:{width:60,height:40,borderRadius:4,backgroundColor:`#f5f5f5`,display:`flex`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,flexShrink:0},children:(()=>{let e=n===`video`?r?.videoCoverUrl:r?.imageUrl;if(!e)return(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`预览`});let t=`http://ceshi.apiforeign.minzhong.cn`,i=e.startsWith(`/`)?e.slice(1):e;return(0,$.jsx)(`img`,{src:`${t.endsWith(`/`)?t.slice(0,-1):t}/static/${i}&w=300&q=50`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})()}),(0,$.jsx)(`div`,{style:{flex:1,minWidth:0},children:(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#1e293b`},children:r?.fileName||`素材 ${r.id}`})}),(0,$.jsx)(nK,{value:R.has(t)?R.get(t):r?.fileName||``,onChange:e=>{let n=e.target.value,r=new Map(R);r.set(t,n),z(r),H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{Ue(t,n)},800)},placeholder:`输入新名称`,style:{width:200,borderRadius:4},size:`small`})]},t)})})()})]}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`},children:`选择授权账户`}),(0,$.jsx)(lw,{value:I,onChange:e=>{L(e)},placeholder:`点击选择授权账户`,style:{width:`100%`,marginBottom:16,borderRadius:8},popupRender:()=>(0,$.jsx)(`div`,{style:{padding:8,width:800,maxHeight:500,overflow:`auto`},children:(0,$.jsx)(f$,{dataSource:A,columns:[{title:`ID`,dataIndex:`id`,key:`id`,width:120},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`,width:120},{title:`授权应用ID`,dataIndex:`appid`,key:`appid`,width:120},{title:`授权用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,width:120},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,width:160,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权账户用户名`,dataIndex:`accountUsername`,key:`accountUsername`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})}],loading:M,pagination:{current:U,pageSize:te,total:P,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{ee(e),ne(t),Le(e,t)}},rowKey:`id`,size:`small`,scroll:{x:`max-content`},onRow:e=>({onClick:()=>{L({value:String(e.id),label:String(e.accountUserid)}),re(!1)},style:{cursor:`pointer`,backgroundColor:I?.value===String(e.id)?`#e6f7ff`:void 0}})})}),open:W,onOpenChange:e=>{re(e),e&&Le(1,te)},labelInValue:!0,fieldNames:{label:`accountUserid`,value:`id`}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`,marginTop:16},children:`粘贴账户ID(每行一个或用逗号分隔)`}),(0,$.jsx)(nK.TextArea,{value:O,onChange:e=>{let t=e.target.value;k(t);let n=t.split(/[\n,]/).map(e=>e.trim()).filter(e=>e.length>0),r=[...new Set(n)].map(e=>({accountId:e})),i=new Set;D(r.filter(e=>i.has(e.accountId)?!1:(i.add(e.accountId),!0)))},placeholder:`粘贴账户ID,每行一个或用逗号分隔,例如:\r +\0`,M+=r(k,2),M+=m.magic,M+=r(d,2),M+=r(f,2),M+=r(O.crc32,4),M+=r(O.compressedSize,4),M+=r(O.uncompressedSize,4),M+=r(g.length,2),M+=r(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+M+g+C,dirRecord:l.CENTRAL_FILE_HEADER+r(j,2)+M+r(y.length,2)+`\0\0\0\0`+r(A,4)+r(i,4)+g+C+y}}var a=e(`../utils`),o=e(`../stream/GenericWorker`),s=e(`../utf8`),c=e(`../crc32`),l=e(`../signature`);function u(e,t,n,r){o.call(this,`ZipFileWorker`),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo(`string`,this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){var r=e(`./Uint8ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){var r=e(`./DataReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){var r=e(`./ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array;var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){var r=e(`../utils`),i=e(`../support`),a=e(`./ArrayReader`),o=e(`./StringReader`),s=e(`./NodeBufferReader`),c=e(`./Uint8ArrayReader`);t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),t!==`string`||i.uint8array?t===`nodebuffer`?new s(e):i.uint8array?new c(r.transformTo(`uint8array`,e)):new a(r.transformTo(`array`,e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){n.LOCAL_FILE_HEADER=`PK`,n.CENTRAL_FILE_HEADER=`PK`,n.CENTRAL_DIRECTORY_END=`PK`,n.ZIP64_CENTRAL_DIRECTORY_LOCATOR=`PK\x07`,n.ZIP64_CENTRAL_DIRECTORY_END=`PK`,n.DATA_DESCRIPTOR=`PK\x07\b`},{}],24:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../utils`);function a(e){r.call(this,`ConvertWorker to `+e),this.destType=e}i.inherits(a,r),a.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../crc32`);function a(){r.call(this,`Crc32Probe`),this.withStreamInfo(`crc32`,0)}e(`../utils`).inherits(a,r),a.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataLengthProbe for `+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(a,i),a.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataWorker`);var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=``,this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}r.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case`string`:e=this.data.substring(this.index,t);break;case`uint8array`:e=this.data.subarray(this.index,t);break;case`array`:case`nodebuffer`:e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){function r(e){this.name=e||`default`,this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit(`data`,e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(`end`),this.cleanUp(),this.isFinished=!0}catch(e){this.emit(`error`,e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit(`error`,e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n `+e:e}},t.exports=r},{}],29:[function(e,t,n){var r=e(`../utils`),i=e(`./ConvertWorker`),a=e(`./GenericWorker`),o=e(`../base64`),s=e(`../support`),c=e(`../external`),l=null;if(s.nodestream)try{l=e(`../nodejs/NodejsStreamOutputAdapter`)}catch{}function u(e,t){return new c.Promise(function(n,i){var a=[],s=e._internalType,c=e._outputType,l=e._mimeType;e.on(`data`,function(e,n){a.push(e),t&&t(n)}).on(`error`,function(e){a=[],i(e)}).on(`end`,function(){try{n(function(e,t,n){switch(e){case`blob`:return r.newBlob(r.transformTo(`arraybuffer`,t),n);case`base64`:return o.encode(t);default:return r.transformTo(e,t)}}(c,function(e,t){var n,r=0,i=null,a=0;for(n=0;n`u`)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=new Blob([r],{type:`application/zip`}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),n.blob=i.getBlob(`application/zip`).size===0}catch{n.blob=!1}}}try{n.nodestream=!!e(`readable-stream`).Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){for(var r=e(`./utils`),i=e(`./support`),a=e(`./nodejsUtils`),o=e(`./stream/GenericWorker`),s=Array(256),c=0;c<256;c++)s[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;s[254]=s[254]=1;function l(){o.call(this,`utf-8 decode`),this.leftOver=null}function u(){o.call(this,`utf-8 encode`)}n.utf8encode=function(e){return i.nodebuffer?a.newBufferFrom(e,`utf-8`):function(e){var t,n,r,a,o,s=e.length,c=0;for(a=0;a>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo(`nodebuffer`,e).toString(`utf-8`):function(e){var t,n,i,a,o=e.length,c=Array(2*o);for(t=n=0;t>10&1023,c[n++]=56320|1023&i)}return c.length!==n&&(c.subarray?c=c.subarray(0,n):c.length=n),r.applyFromCharCode(c)}(e=r.transformTo(i.uint8array?`uint8array`:`array`,e))},r.inherits(l,o),l.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?`uint8array`:`array`,e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=t;(t=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),t.set(a,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+s[e[n]]>t?n:t}(t),c=t;o!==t.length&&(i.uint8array?(c=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(c=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:n.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=l,r.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){var r=e(`./support`),i=e(`./base64`),a=e(`./nodejsUtils`),o=e(`./external`);function s(e){return e}function c(e,t){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),e==0&&(this.dosPermissions=63&this.externalFileAttributes),e==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!==`/`||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||={};e.index+4>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},n.buf2binstring=function(e){return c(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n>10&1023,l[r++]=56320|1023&i)}return c(l,r)},n.utf8border=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+o[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){t.exports=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;n!==0;){for(n-=o=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s>>8^a[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){var r,i=e(`../utils/common`),a=e(`./trees`),o=e(`./adler32`),s=e(`./crc32`),c=e(`./messages`),l=0,u=4,d=0,f=-2,p=-1,m=4,h=2,g=8,_=9,v=286,y=30,b=19,x=2*v+1,S=15,C=3,w=258,T=w+C+1,E=42,D=113,O=1,k=2,A=3,j=4;function M(e,t){return e.msg=c[t],t}function N(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),n!==0&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function I(e,t){a._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function L(e,t){e.pending_buf[e.pending++]=t}function R(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function z(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-T?e.strstart-(e.w_size-T):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+w,p=l[a+o-1],m=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do if(l[(n=t)+o]===m&&l[n+o-1]===p&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do;while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&ac&&--i!=0);return o<=e.lookahead?o:e.lookahead}function B(e){var t,n,r,a,c,l,u,d,f,p,m=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-T)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);a+=m}if(e.strm.avail_in===0)break;if(l=e.strm,u=e.window,d=e.strstart+e.lookahead,f=a,p=void 0,p=l.avail_in,f=C)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C)if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-C,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(B(e),e.lookahead===0&&t===l)return O;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,I(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-T&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):(e.strstart>e.block_start&&(I(e,!1),e.strm.avail_out),O)}),new U(4,4,8,4,V),new U(4,5,16,8,V),new U(4,6,32,32,V),new U(4,4,16,16,H),new U(8,16,32,32,H),new U(8,16,128,128,H),new U(8,32,128,256,H),new U(32,128,258,1024,H),new U(32,258,258,4096,H)],n.deflateInit=function(e,t){return W(e,t,g,15,8,0)},n.deflateInit2=W,n.deflateReset=ne,n.deflateResetKeep=te,n.deflateSetHeader=function(e,t){return e&&e.state&&e.state.wrap===2?(e.state.gzhead=t,d):f},n.deflate=function(e,t){var n,i,o,c;if(!e||!e.state||5>8&255),L(i,i.gzhead.time>>16&255),L(i,i.gzhead.time>>24&255),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(L(i,255&i.gzhead.extra.length),L(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(L(i,0),L(i,0),L(i,0),L(i,0),L(i,0),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,3),i.status=D);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:i.level===6?2:3)<<6,i.strstart!==0&&(p|=32),p+=31-p%31,i.status=D,R(i,p),i.strstart!==0&&(R(i,e.adler>>>16),R(i,65535&e.adler)),e.adler=1}if(i.status===69)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending!==i.pending_buf_size));)L(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(i.status===73)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.gzindex=0,i.status=91)}else i.status=91;if(i.status===91)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.status=103)}else i.status=103;if(i.status===103&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&F(e),i.pending+2<=i.pending_buf_size&&(L(i,255&e.adler),L(i,e.adler>>8&255),e.adler=0,i.status=D)):i.status=D),i.pending!==0){if(F(e),e.avail_out===0)return i.last_flush=-1,d}else if(e.avail_in===0&&N(t)<=N(n)&&t!==u)return M(e,-5);if(i.status===666&&e.avail_in!==0)return M(e,-5);if(e.avail_in!==0||i.lookahead!==0||t!==l&&i.status!==666){var m=i.strategy===2?function(e,t){for(var n;;){if(e.lookahead===0&&(B(e),e.lookahead===0)){if(t===l)return O;break}if(e.match_length=0,n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):i.strategy===3?function(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=w){if(B(e),e.lookahead<=w&&t===l)return O;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=C&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(n=a._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):r[i.level].func(i,t);if(m!==A&&m!==j||(i.status=666),m===O||m===A)return e.avail_out===0&&(i.last_flush=-1),d;if(m===k&&(t===1?a._tr_align(i):t!==5&&(a._tr_stored_block(i,0,0,!1),t===3&&(P(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),F(e),e.avail_out===0))return i.last_flush=-1,d}return t===u?i.wrap<=0?1:(i.wrap===2?(L(i,255&e.adler),L(i,e.adler>>8&255),L(i,e.adler>>16&255),L(i,e.adler>>24&255),L(i,255&e.total_in),L(i,e.total_in>>8&255),L(i,e.total_in>>16&255),L(i,e.total_in>>24&255)):(R(i,e.adler>>>16),R(i,65535&e.adler)),F(e),0=n.w_size&&(s===0&&(P(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),c=e.avail_in,l=e.next_in,u=e.input,e.avail_in=m,e.next_in=0,e.input=t,B(n);n.lookahead>=C;){for(r=n.strstart,a=n.lookahead-(C-1);n.ins_h=(n.ins_h<>>=b=y>>>24,m-=b,(b=y>>>16&255)==0)E[a++]=65535&y;else{if(!(16&b)){if(!(64&b)){y=h[(65535&y)+(p&(1<>>=b,m-=b),m<15&&(p+=T[r++]<>>=b=y>>>24,m-=b,!(16&(b=y>>>16&255))){if(!(64&b)){y=g[(65535&y)+(p&(1<>>=b,m-=b,(b=a-o)>3,p&=(1<<(m-=x<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=1&t.wrap),t.mode=f,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(p),t.distcode=t.distdyn=new r.Buf32(m),t.sane=1,t.back=-1,u):d}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,_(e)):d}function y(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(a=o.wsize-o.wnext)&&(a=i),r.arraySet(o.window,t,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=a(n.check,B,2,0),x=b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg=`incorrect header check`,n.mode=30;break}if((15&b)!=8){e.msg=`unknown compression method`,n.mode=30;break}if(x-=4,F=8+(15&(b>>>=4)),n.wbits===0)n.wbits=F;else if(F>n.wbits){e.msg=`invalid window size`,n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=3;case 3:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>8&255,B[2]=b>>>16&255,B[3]=b>>>24&255,n.check=a(n.check,B,4,0)),x=b=0,n.mode=4;case 4:for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>8),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>>8&255,n.check=a(n.check,B,2,0)),x=b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(E=n.length)&&(E=v),E&&(n.head&&(F=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,E,F)),512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(v===0)break e;for(E=0;F=p[g+ E++],n.head&&F&&n.length<65536&&(n.head.name+=String.fromCharCode(F)),F&&E>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(v===0)break e;v--,b+=p[g++]<>>=1)){case 0:n.mode=14;break;case 1:if(w(n),n.mode=20,t!==6)break;b>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg=`invalid block type`,n.mode=30}b>>>=2,x-=2;break;case 14:for(b>>>=7&x,x-=7&x;x<32;){if(v===0)break e;v--,b+=p[g++]<>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=30;break}if(n.length=65535&b,x=b=0,n.mode=15,t===6)break e;case 15:n.mode=16;case 16:if(E=n.length){if(v>>=5,x-=5,n.ndist=1+(31&b),b>>>=5,x-=5,n.ncode=4+(15&b),b>>>=4,x-=4,286>>=3,x-=3}for(;n.have<19;)n.lens[V[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,L={bits:n.lenbits},I=s(0,n.lens,0,19,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid code lengths set`,n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=k,x-=k,n.lens[n.have++]=j;else{if(j===16){for(R=k+2;x>>=k,x-=k,n.have===0){e.msg=`invalid bit length repeat`,n.mode=30;break}F=n.lens[n.have-1],E=3+(3&b),b>>>=2,x-=2}else if(j===17){for(R=k+3;x>>=k)),b>>>=3,x-=3}else{for(R=k+7;x>>=k)),b>>>=7,x-=7}if(n.have+E>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=30;break}for(;E--;)n.lens[n.have++]=F}}if(n.mode===30)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=30;break}if(n.lenbits=9,L={bits:n.lenbits},I=s(c,n.lens,0,n.nlen,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid literal/lengths set`,n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,L={bits:n.distbits},I=s(l,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,L),n.distbits=L.bits,I){e.msg=`invalid distances set`,n.mode=30;break}if(n.mode=20,t===6)break e;case 20:n.mode=21;case 21:if(6<=v&&258<=y){e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,o(e,C),_=e.next_out,m=e.output,y=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,b=n.hold,x=n.bits,n.mode===12&&(n.back=-1);break}for(n.back=0;A=(z=n.lencode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,n.length=j,A===0){n.mode=26;break}if(32&A){n.back=-1,n.mode=12;break}if(64&A){e.msg=`invalid literal/length code`,n.mode=30;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(z=n.distcode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,64&A){e.msg=`invalid distance code`,n.mode=30;break}n.offset=j,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=30;break}n.mode=25;case 25:if(y===0)break e;if(E=C-y,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break}D=E>n.wnext?(E-=n.wnext,n.wsize-E):n.wnext-E,E>n.length&&(E=n.length),O=n.window}else O=m,D=_-n.offset,E=n.length;for(yv?(b=L[R+d[w]],N[P+d[w]]):(b=96,0),p=1<>k)+(m-=p)]=y<<24|b<<16|x|0,m!==0;);for(p=1<>=1;if(p===0?M=0:(M&=p-1,M+=p),w++,--F[C]==0){if(C===E)break;C=t[n+d[w]]}if(D>>7)]}function L(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function R(e,t,n){e.bi_valid>h-n?(e.bi_buf|=t<>h-e.bi_valid,e.bi_valid+=n-h):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function V(e,t,n){var r,i,a=Array(m+1),o=0;for(r=1;r<=m;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];s!==0&&(e[2*i]=B(a[s]++,s))}}function H(e){var t;for(t=0;t>1;1<=n;n--)te(e,a,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],te(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,te(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,o,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,g=t.stat_desc.max_length,_=0;for(a=0;a<=m;a++)e.bl_count[a]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n>=7;r>>=1)if(1&n&&e.dyn_ltree[2*t]!==0)return i;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return a;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=n+5,n+4<=o&&t!==-1?q(e,t,n,r):e.strategy===4||s===o?(R(e,2+ +!!r,3),ne(e,T,E)):(R(e,4+ +!!r,3),function(e,t,n,r){var i;for(R(e,t-257,5),R(e,n-1,5),R(e,r-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(O[n]+l+1)]++,e.dyn_dtree[2*I(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){R(e,2,3),z(e,_,T),function(e){e.bi_valid===16?(L(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){(function(e,t){if(!e.setImmediate){var n,r,i,a,o=1,s={},c=!1,l=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,n={}.toString.call(e.process)===`[object process]`?function(e){process.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage(``,`*`),e.onmessage=n,t}}()?(a=`setImmediate$`+Math.random()+`$`,e.addEventListener?e.addEventListener(`message`,p,!1):e.attachEvent(`onmessage`,p),function(t){e.postMessage(a+t,`*`)}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):l&&`onreadystatechange`in l.createElement(`script`)?(r=l.documentElement,function(e){var t=l.createElement(`script`);t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(f,0,e)},u.setImmediate=function(e){typeof e!=`function`&&(e=Function(``+e));for(var t=Array(arguments.length-1),r=0;r`u`?e===void 0?this:e:self)}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{}]},{},[10])(10)})}))(),1),{Search:Vte}=nK,{Text:Hte}=Q,Ute=()=>{let[e,t]=(0,S.useState)(`project`),[n,r]=(0,S.useState)(`video`),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)({page:1,pageSize:10}),[c,l]=(0,S.useState)(0),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(new Set),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(null),v=S.createRef(),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),[E,D]=(0,S.useState)([[]]),[O,k]=(0,S.useState)([``]),[A,j]=(0,S.useState)([]),[M,N]=(0,S.useState)(!1),[P,F]=(0,S.useState)(0),[I,L]=(0,S.useState)([void 0]),[R,z]=(0,S.useState)(new Map),[B,V]=(0,S.useState)(``),H=(0,S.useRef)(null),[U,ee]=(0,S.useState)(1),[te,ne]=(0,S.useState)(10),[W,re]=(0,S.useState)([!1]),[G,K]=(0,S.useState)(!1),[q,ie]=(0,S.useState)([]),[J,ae]=(0,S.useState)(0),[oe,se]=(0,S.useState)(1),[ce,le]=(0,S.useState)(10),[ue,de]=(0,S.useState)(!1),[fe,pe]=(0,S.useState)(``),[me,he]=(0,S.useState)(!1),[ge,_e]=(0,S.useState)(new Set),ve=null,ye=new Map,be=[],xe=0,Se=0,Ce=(e,t,n)=>{if(n&&Se<8)Se++,xe++,e();else if(xe<15)xe++,e();else{let r={callback:e,priority:n?2:1,element:t};be.push(r),be.sort((e,t)=>t.priority-e.priority)}},we=()=>{if(xe--,Se>0&&Se--,be.length>0){let e=be.shift();e&&(xe++,e.priority===2&&Se++,e.callback())}},Te=()=>(ve||=new IntersectionObserver(e=>{e.forEach(e=>{let t=ye.get(e.target);if(e.isIntersecting&&t){ye.delete(e.target),ve?.unobserve(e.target);let n=e.intersectionRatio>=1;Ce(t,e.target,n)}})},{rootMargin:`400px`,threshold:[.01,.5,1]}),ve),Ee=e=>{if(!e)return null;try{let t=new URL(e).searchParams.get(`exp`);return t?parseInt(t,10):null}catch{try{let t=e.indexOf(`?`);if(t!==-1){let n=e.substring(t+1),r=new URLSearchParams(n).get(`exp`);if(r)return parseInt(r,10)}return null}catch{return null}}},De=e=>{let t=Ee(e);return t?Math.floor(Date.now()/1e3)>t:!1},Oe=({item:e,mediaType:t,onClick:n,isSelected:r=!1,onToggleSelect:i,isSelectionMode:a=!1})=>{let[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),m=(0,S.useRef)(null),h=(0,S.useRef)(null),g=(0,S.useRef)(null);(0,S.useEffect)(()=>{let n=t===`video`?e.videoUrl:e.imageUrl;n&&De(n)&&d(!0)},[e,t]),(0,S.useEffect)(()=>{if(u)return;let e=m.current;if(!e)return;let t=Te();return ye.set(e,()=>{p(!0)}),t.observe(e),()=>{ye.delete(e),t.unobserve(e)}},[u]);let _=(e,t=!1)=>{let n=`http://ceshi.apiforeign.minzhong.cn`,r=e.startsWith(`/`)?e.slice(1):e,i=n.endsWith(`/`)?n.slice(0,-1):n;return t?`${i}/static/${r}&w=300&q=50`:`${i}/${r}`},v=()=>{g.current&&clearTimeout(g.current),s(!0),p(!1),we()},y=()=>{g.current=setTimeout(()=>{_(t===`video`?e.videoUrl:e.imageUrl),l(!0),p(!1),we()},1e3)},b=t===`video`?_(e.videoUrl):_(e.imageUrl,!0),x=e.videoCoverUrl?_(e.videoCoverUrl,!0):void 0;return(0,$.jsxs)(`div`,{ref:m,style:{width:160,height:120,position:`relative`,borderRadius:4,cursor:`pointer`,overflow:`hidden`,boxShadow:`0 2px 8px rgba(0,0,0,0.1)`,transition:`transform 0.2s, box-shadow 0.2s`},onClick:a?void 0:n,onMouseEnter:e=>{a||(e.currentTarget.style.transform=`scale(1.05)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0,0,0,0.2)`)},onMouseLeave:e=>{a||(e.currentTarget.style.transform=`scale(1)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(0,0,0,0.1)`)},children:[(t===`video`&&e.videoCoverUrl||t===`image`)&&(f||o)&&!c&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`},children:[f&&!o&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,backgroundColor:`rgba(248, 250, 252, 0.9)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1},children:(0,$.jsx)(`div`,{style:{width:28,height:28,border:`3px solid #e2e8f0`,borderTopColor:`#3b82f6`,borderRadius:`50%`,animation:`spin 0.8s linear infinite`}})}),t===`video`&&e.videoCoverUrl&&(0,$.jsx)(`img`,{ref:h,src:x,style:{width:`100%`,height:`100%`,objectFit:`cover`,opacity:+!!o,transition:`opacity 0.3s ease-in-out`},loading:`lazy`,onLoad:v,onError:y}),t===`image`&&(0,$.jsx)(`img`,{ref:h,src:b,alt:`图片预览`,style:{width:`100%`,height:`100%`,objectFit:`cover`,opacity:+!!o,transition:`opacity 0.3s ease-in-out`},loading:`lazy`,onLoad:v,onError:y})]}),!f&&!o&&!c&&(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,backgroundColor:`#cbd5e1`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:t===`video`?(0,$.jsx)(Y8,{style:{color:`#64748b`,fontSize:16}}):(0,$.jsx)(p6,{style:{color:`#64748b`,fontSize:16}})})}),t===`video`&&!e.videoCoverUrl&&!c&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#1e293b`},children:[(0,$.jsx)(Y8,{style:{color:`#64748b`,fontSize:24}}),(0,$.jsx)(Hte,{style:{fontSize:12,color:`#94a3b8`,marginTop:4},children:`暂无封面`})]}),u&&(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#fef3c7`,color:`#d97706`,fontSize:12,flexDirection:`column`,gap:4},children:[(0,$.jsx)(OH,{style:{fontSize:24}}),`图片过期`]}),c&&(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#fef2f2`,color:`#dc2626`,fontSize:12},children:`加载失败`}),!u&&!a&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:0,left:0,right:0,background:`linear-gradient(transparent, rgba(0,0,0,0.5))`,padding:`8px`,color:`#fff`,fontSize:12,opacity:0,transition:`opacity 0.2s`},onMouseEnter:e=>{e.currentTarget.style.opacity=`1`},onMouseLeave:e=>{e.currentTarget.style.opacity=`0`},children:`点击预览`}),a&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,width:20,height:20,borderRadius:`50%`,backgroundColor:r?`#10b981`:`rgba(255,255,255,0.9)`,border:r?`2px solid #10b981`:`2px solid #d1d5db`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,transition:`all 0.2s`},onClick:t=>{t.stopPropagation(),i?.(e.generatedResourceId||e.id)},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`},children:r&&(0,$.jsx)(`svg`,{width:12,height:12,viewBox:`0 0 12 12`,fill:`none`,children:(0,$.jsx)(`path`,{d:`M10 3L4.5 8.5L2 6`,stroke:`white`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`})})}),a&&r&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,border:`3px solid #10b981`,borderRadius:4,pointerEvents:`none`,zIndex:5}})]})},ke=e=>{_(e),h(!0),window.dispatchEvent(new Event(`previewOpen`))},Ae=()=>{v.current&&(v.current.pause(),v.current.currentTime=0),document.querySelectorAll(`video`).forEach(e=>{e.pause(),e.currentTime=0}),h(!1)},je=e=>e.generatedResourceId||e.id,Me=e=>{_e(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},Ne=()=>{let e=i.flatMap(e=>e.items.map(e=>je(e)));ge.size===e.length?_e(new Set):_e(new Set(e))},Pe=async()=>{if(ge.size===0){Z.warning(`请先选择要下载的媒体`);return}if(ge.size>10){Z.warning(`最多只能单次下载10个文件`);return}let e=[];i.forEach(t=>{t.items.forEach(t=>{ge.has(je(t))&&e.push(t)})});let t=new Bte.default,n=`http://ceshi.apiforeign.minzhong.cn`,r=t.folder(`downloads`),a=!1,o=0;Z.loading({content:`下载中,请稍候...`,key:`downloadProgress`});for(let t of e){let e=`${n}${t.videoUrl||t.imageUrl}`,i=((t.videoUrl||t.imageUrl).split(`/`).pop()||`file_${Date.now()}`).split(`?`)[0];try{let t=await fetch(e);if(!t.ok)throw Error(`Network response was not ok`);let n=await t.blob();r?.file(i,n),o++}catch{console.warn(`文件下载失败(CORS限制): ${i},将使用备用方式下载`),a=!0;break}}if(a){Z.destroy(`downloadProgress`),Z.info(`由于跨域限制,将逐个下载文件`),e.forEach((e,t)=>{setTimeout(()=>{let t=`${n}${e.videoUrl||e.imageUrl}&download=1`,r=document.createElement(`a`);r.href=t,r.download=``,document.body.appendChild(r),r.click(),document.body.removeChild(r)},t*500)});return}let s=await t.generateAsync({type:`blob`}),c=document.createElement(`a`);c.href=URL.createObjectURL(s),c.download=`downloads_${Date.now()}.zip`,c.click(),URL.revokeObjectURL(c.href),Z.destroy(`downloadProgress`),Z.success(`下载完成,共 ${o} 个文件`)},Fe=()=>{if(ge.size===0){Z.warning(`请先选择要上传的媒体`);return}D([[]]),k([``]),L([void 0]),T(!0)},Ie=()=>{if(!g)return;let e=je(g);_e(new Set([e])),D([[]]),k([``]),L([void 0]),z(new Map),V(``),T(!0)},Le=async(e,t)=>{N(!0);try{let n=await E7({page:e,page_size:t});j(n?.data||n||[]),F(n.pagination.total||0)}catch(e){console.error(`加载授权列表失败:`,e),j([]),F(0)}finally{N(!1)}},Re=async()=>{de(!0);try{let e=await K7({status:fe||void 0,page:oe,pageSize:ce});ie(e?.data||e||[]),ae(e.pagination?.total||e.total||0)}catch(e){console.error(`加载上传历史失败:`,e),ie([]),ae(0)}finally{de(!1)}},ze=()=>{K(!0),se(1),pe(``),Re()},Be=()=>{se(1),Re()},Ve=(e,t)=>{se(e),le(t),Re()},He=async()=>{let t=I.filter(e=>e!==void 0);if(t.length===0){Z.warning(`请先选择授权账户`);return}if(ge.size===0){Z.warning(`请先选择要上传的媒体`);return}C(!0);try{let n=[],r=Array.from(ge);for(let i=0;ie.accountId)||[];if(o.length===0){Z.warning(`第 ${i+1} 组授权账户未设置账户ID,已跳过`);continue}n.push({advertiser_ids:o,resource_ids:r,oauth_id:a.value,source_model:e===`project`?`generation_records`:`chat_generation_tasks`})}await G7({tasks:n}),Z.success(`已提交 ${n.length} 个上传任务,后台异步处理中`),he(!1),_e(new Set),T(!1),D([[]]),k([``]),L([void 0]),z(new Map),V(``)}catch(e){console.error(`批量上传失败:`,e),Z.error(e.message||`批量上传失败`)}finally{C(!1)}},Ue=async(e,t)=>{if(t.trim())try{let n=(await q7({filenames:[{source_id:e,file_name:t}]}))?.results?.find(t=>t.source_id===e)?.new_file_name||t;a(t=>t.map(t=>({...t,items:t.items.map(t=>je(t)===e?{...t,fileName:n}:t)}))),Z.success(`文件名更新成功`)}catch(e){console.error(`文件名更新失败:`,e),Z.error(e.message||`文件名更新失败`)}},We=async(e,t)=>{if(!(!t.trim()||e.length===0))try{let n=await q7({filenames:e.map(e=>({source_id:e,file_name:t}))}),r=new Map;n?.results?.forEach(e=>{e.success&&e.newFileName&&r.set(e.sourceId,e.newFileName)}),a(n=>{let i=new Set(e);return n.map(e=>({...e,items:e.items.map(e=>{let n=je(e);if(i.has(n)){let i=r.get(n)||t;return{...e,fileName:i}}return e})}))}),console.log(n);let i=n?.successCount||0;Z.success(`已更新 ${i} 个文件名`)}catch(e){console.error(`文件名更新失败:`,e),Z.error(e.message||`文件名更新失败`)}},Ge=e=>{b(e)};(0,S.useEffect)(()=>{d(!0);let t=``;if(t=e===`project`?`?gen_type=${n}&history_source=generation_record&page=${o.page}&page_size=${o.pageSize}`:`?gen_type=${n}&page=${o.page}&page_size=${o.pageSize}`,y){let t=``;t=e===`project`?`${y}?gen_type=${n}&history_source=generation_record&page=${o.page}&page_size=${o.pageSize}`:`${y}?gen_type=${n}&page=${o.page}&page_size=${o.pageSize}`,p7(t).then(e=>{let t=Array.isArray(e)?e:e?.items||[],n=[{generatedDate:e.generatedDate,items:t,total:e.total,page:e.page}];n&&n[0].items.length>0?a(n):a([])}).catch(e=>{}).finally(()=>{d(!1)})}else f7(t).then(e=>{let t=Array.isArray(e)?e:e?.groups||[];t.forEach(e=>{e.page=1}),o.page===1?a(t):a(e=>[...e,...t]),l(e?.totalDays||0)}).catch(e=>{o.page===1&&a([])}).finally(()=>{d(!1)})},[e,n,o.page,y]);let Ke=()=>{u||s(e=>({...e,page:e.page+1}))},qe=async(t,r,i)=>{if(f.has(r))return;p(e=>new Set([...e,r]));let s=i+1,c=``;c=e===`project`?`${t}?gen_type=${n}&history_source=generation_record&page=${s}&page_size=${o.pageSize}`:`${t}?gen_type=${n}&page=${s}&page_size=${o.pageSize}`;try{let e=(await p7(c)).items||[];e&&e.length>0&&a(n=>n.map(n=>n.generatedDate===t?{...n,items:[...n.items,...e],page:s}:n))}catch{}finally{p(e=>{let t=new Set(e);return t.delete(r),t})}};return(0,S.useEffect)(()=>{s(e=>({...e,page:1}))},[e,n]),(0,$.jsxs)(`div`,{style:{minHeight:`calc(100vh - 90px)`,background:`#ffffffff`,overflowY:`auto`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:16,padding:`12px 20px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(K4,{style:{color:`#94a3b8`,fontSize:14}}),(0,$.jsxs)(DU,{children:[(0,$.jsx)(vD,{type:e===`project`?`primary`:`default`,onClick:()=>{t(`project`),he(!1),_e(new Set)},style:{borderRadius:8,background:e===`project`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:e===`project`?`none`:`1px solid #e2e8f0`,color:e===`project`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(xZ,{}),children:`项目记录`}),(0,$.jsx)(vD,{type:e===`creation`?`primary`:`default`,onClick:()=>{t(`creation`),he(!1),_e(new Set)},style:{borderRadius:8,background:e===`creation`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:e===`creation`?`none`:`1px solid #e2e8f0`,color:e===`creation`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(MU,{}),children:`创作记录`})]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:me?(0,$.jsxs)(DU,{children:[(0,$.jsx)(vD,{onClick:Ne,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#222222ff`,fontWeight:600},children:ge.size===i.reduce((e,t)=>e+t.items.length,0)?`取消全选`:`全选`}),(0,$.jsx)(vD,{onClick:()=>{he(!1),_e(new Set)},style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:600},children:`取消选择`}),(0,$.jsxs)(vD,{onClick:()=>Pe(),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,fontWeight:600},children:[`下载 (`,ge.size,`)`]}),(0,$.jsx)(vD,{type:`primary`,onClick:Fe,loading:x,disabled:x||ge.size===0,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,fontWeight:600},children:x?`上传中...`:`推送至账户 (${ge.size})`})]}):(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(U8,{}),onClick:()=>he(!0),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600},children:`批量操作`})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:24,padding:`12px 20px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:`媒体类型:`}),(0,$.jsxs)(DU,{children:[(0,$.jsx)(vD,{type:n===`video`?`primary`:`default`,onClick:()=>{r(`video`),he(!1),_e(new Set)},style:{borderRadius:8,background:n===`video`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:n===`video`?`none`:`1px solid #e2e8f0`,color:n===`video`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(Y8,{}),children:`视频`}),(0,$.jsx)(vD,{type:n===`image`?`primary`:`default`,onClick:()=>{r(`image`),he(!1),_e(new Set)},style:{borderRadius:8,background:n===`image`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:n===`image`?`none`:`1px solid #e2e8f0`,color:n===`image`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(p6,{}),children:`图片`}),(0,$.jsx)(FH,{picker:`date`,value:y?(0,ED.default)(y):void 0,onChange:(e,t)=>Ge(t||``),format:`YYYY-MM-DD`,style:{width:160,borderRadius:8,border:`1px solid #e2e8f0`},placeholder:`选择日期`}),y&&(0,$.jsx)(vD,{type:`text`,onClick:()=>Ge(``),style:{color:`#94a3b8`,fontSize:12},children:`清除`})]})]}),(0,$.jsx)(vD,{icon:(0,$.jsx)(OH,{}),onClick:ze,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,color:`#ffffff`,fontWeight:600,boxShadow:`0 4px 15px rgba(102, 126, 234, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(102, 126, 234, 0.6)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 15px rgba(102, 126, 234, 0.4)`},children:`查询上传任务历史`})]}),i.length===0?(0,$.jsx)(NC,{image:NC.PRESENTED_IMAGE_SIMPLE,description:`暂无生成记录`,style:{padding:`60px 0`}}):(0,$.jsxs)(`div`,{style:{padding:`0 4px`},children:[i.map((e,t)=>(0,$.jsxs)(`div`,{style:{marginBottom:32},children:[(0,$.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`#64748b`,marginBottom:12,paddingLeft:8},children:e.generatedDate}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8},children:e.items.map(e=>(0,$.jsx)(Oe,{item:e,mediaType:n,onClick:()=>me?Me(je(e)):ke(e),isSelected:ge.has(je(e)),onToggleSelect:Me,isSelectionMode:me},je(e)))}),e.total&&e.total>e.items.length&&(0,$.jsx)(`div`,{style:{padding:`12px 0`,textAlign:`left`},children:(0,$.jsx)(vD,{onClick:()=>qe(e.generatedDate,e.items,e.page),loading:f.has(e.generatedDate),disabled:f.has(e.generatedDate),size:`small`,style:{borderRadius:6,background:`transparent`,border:`1px dashed #cbd5e1`,color:`#64748b`,fontSize:12},children:f.has(e.date)?`加载中...`:`查看全部 (${e.total})`})})]},t)),i.length>0&&c>i.length&&(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:`20px 0`},children:(0,$.jsx)(vD,{onClick:Ke,loading:u,disabled:u,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:500},children:u?`加载中...`:`加载更多`})})]}),(0,$.jsx)(Pq,{title:ge.size===1?`上传配置`:`批量上传配置`,open:w,onCancel:()=>{T(!1),D([[]]),k([``]),L([void 0]),z(new Map),V(``)},footer:null,width:900,mask:{closable:!1},children:(0,$.jsxs)(`div`,{style:{padding:`16px 0`},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`},children:[`选中素材 (`,ge.size,`个)`]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:12,alignItems:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`},children:`统一修改名称:`}),(0,$.jsx)(nK,{value:B,onChange:e=>V(e.target.value),placeholder:`输入名称后点击应用`,style:{flex:1,borderRadius:8},size:`small`}),(0,$.jsx)(vD,{type:`primary`,size:`small`,onClick:()=>{B.trim()&&ge.size>0&&We(Array.from(ge),B)},disabled:!B.trim()||ge.size===0,style:{borderRadius:8},children:`应用`})]}),(0,$.jsx)(`div`,{style:{maxHeight:300,overflow:`auto`,border:`1px solid #f0f0f0`,borderRadius:8,padding:12},children:(()=>{let e=new Map;return i.forEach(t=>{t.items.forEach(t=>{let n=je(t);e.set(n,t)})}),Array.from(ge).map(t=>{let r=e.get(t);return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 0`,borderBottom:`1px solid #f5f5f5`},children:[(0,$.jsx)(`div`,{style:{width:60,height:40,borderRadius:4,backgroundColor:`#f5f5f5`,display:`flex`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,flexShrink:0},children:(()=>{let e=n===`video`?r?.videoCoverUrl:r?.imageUrl;if(!e)return(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`预览`});let t=`http://ceshi.apiforeign.minzhong.cn`,i=e.startsWith(`/`)?e.slice(1):e;return(0,$.jsx)(`img`,{src:`${t.endsWith(`/`)?t.slice(0,-1):t}/static/${i}&w=300&q=50`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})()}),(0,$.jsx)(`div`,{style:{flex:1,minWidth:0},children:(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#1e293b`},children:r?.fileName||`素材 ${r.id}`})}),(0,$.jsx)(nK,{value:R.has(t)?R.get(t):r?.fileName||``,onChange:e=>{let n=e.target.value,r=new Map(R);r.set(t,n),z(r),H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{Ue(t,n)},800)},placeholder:`输入新名称`,style:{width:200,borderRadius:4},size:`small`})]},t)})})()})]}),I.map((e,t)=>(0,$.jsxs)(`div`,{style:{marginBottom:16,padding:12,border:`1px solid #e2e8f0`,borderRadius:8},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`},children:[`授权账户 `,t+1]}),I.length>1&&(0,$.jsx)(vD,{type:`text`,danger:!0,onClick:()=>{let e=[...I],n=[...O],r=[...E],i=[...W];e.splice(t,1),n.splice(t,1),r.splice(t,1),i.splice(t,1),L(e),k(n),D(r),re(i)},children:`删除`})]}),(0,$.jsx)(lw,{value:e,onChange:e=>{let n=[...I];n[t]=e,L(n)},placeholder:`点击选择授权账户`,style:{width:`100%`,marginBottom:12,borderRadius:8},popupRender:()=>(0,$.jsx)(`div`,{style:{padding:8,width:800,maxHeight:500,overflow:`auto`},children:(0,$.jsx)(f$,{dataSource:A,columns:[{title:`授权账户ID`,dataIndex:`accountId`,key:`accountId`,width:120},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`,width:120},{title:`授权应用ID`,dataIndex:`appid`,key:`appid`,width:120},{title:`授权用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,width:120},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,width:160,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权账户用户名`,dataIndex:`accountUsername`,key:`accountUsername`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})}],loading:M,pagination:{current:U,pageSize:te,total:P,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{ee(e),ne(t),Le(e,t)}},rowKey:`id`,size:`small`,scroll:{x:`max-content`},onRow:n=>({onClick:()=>{let e=String(n.id),r=[...I];r[t]={value:e,label:String(n.accountId)+`-`+(n.accountName||`-`)},L(r);let i=[...W];i[t]=!1,re(i)},style:{cursor:`pointer`,backgroundColor:e?.value===String(n.id)?`#e6f7ff`:void 0}})})}),open:W[t],onOpenChange:e=>{let n=[...W];n[t]=e,re(n),e&&Le(1,te)},labelInValue:!0,fieldNames:{label:`accountUserid`,value:`id`}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`},children:`粘贴账户ID(每行一个或用逗号分隔)`}),(0,$.jsx)(nK.TextArea,{value:O[t],onChange:e=>{let n=e.target.value,r=[...O];r[t]=n,k(r);let i=n.split(/[\n,]/).map(e=>e.trim()).filter(e=>e.length>0),a=[...new Set(i)].map(e=>({accountId:e})),o=new Set,s=a.filter(e=>o.has(e.accountId)?!1:(o.add(e.accountId),!0)),c=[...E];c[t]=s,D(c)},placeholder:`粘贴账户ID,每行一个或用逗号分隔,例如:\r 10001,10002,10003\r -10004`,rows:4,style:{borderRadius:8,marginBottom:16}}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,justifyContent:`flex-end`},children:[(0,$.jsx)(vD,{onClick:()=>{T(!1),D([]),k(``),L(void 0),z(new Map),V(``)},style:{borderRadius:8},children:`取消`}),(0,$.jsx)(vD,{type:`primary`,onClick:He,loading:x,disabled:x||E.length===0,style:{borderRadius:8},children:x?`上传中...`:`开始上传`})]})]})}),(0,$.jsxs)(Pq,{title:`上传任务历史`,open:G,onCancel:()=>K(!1),footer:null,width:800,style:{borderRadius:8},mask:{closable:!1},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(lw,{value:fe,onChange:e=>pe(e),placeholder:`选择状态`,style:{width:200,marginRight:12},options:[{value:`1`,label:`待上传`},{value:`2`,label:`上传中`},{value:`3`,label:`上传成功`},{value:`4`,label:`上传失败`}],allowClear:!0}),(0,$.jsx)(vD,{type:`primary`,onClick:Be,style:{borderRadius:8},children:`查询`})]}),(0,$.jsx)(f$,{dataSource:q,columns:[{title:`素材名称`,dataIndex:`fileName`,key:`fileName`,width:200},{title:`账户ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:180},{title:`状态`,dataIndex:`status`,key:`status`,width:100,render:e=>(0,$.jsx)(T$,{color:{1:`#f59e0b`,2:`#6366f1`,3:`#10b981`,4:`#ef4444`}[e]||`#64748b`,style:{borderRadius:4},children:{1:`待上传`,2:`上传中`,3:`上传成功`,4:`上传失败`}[e]||e})},{title:`备注`,dataIndex:`note`,key:`note`,width:250,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:e||`-`})},{title:`创建时间`,dataIndex:`created_at`,key:`created_at`,width:180,render:e=>(0,ED.default)(e).format(`YYYY-MM-DD HH:mm:ss`)}],loading:ue,scroll:{x:`max-content`},pagination:{current:oe,pageSize:ce,total:J,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:Ve},rowKey:(e,t)=>e.task_id||e.resource_id||t,size:`small`})]}),m&&g&&(0,$.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`rgba(0,0,0,0.85)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1e3,padding:16,boxSizing:`border-box`,overflow:`auto`},onClick:Ae,children:(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:16,padding:0,width:`100%`,maxWidth:`1200px`,maxHeight:`95vh`,minHeight:`300px`,overflow:`hidden`,position:`relative`,display:`flex`,flexDirection:`column`,boxShadow:`0 20px 60px rgba(0,0,0,0.3)`},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`12px 16px`,borderBottom:`1px solid #f0f0f0`,flexShrink:0},children:[(0,$.jsx)(Q.Title,{level:5,style:{margin:0,color:`#1a1a2e`,fontSize:16},children:g.title||`预览`}),(0,$.jsx)(vD,{icon:(0,$.jsx)(s5,{}),onClick:Ae,style:{background:`transparent`,border:`none`,color:`#94a3b8`,fontSize:16}})]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexWrap:`wrap`,height:`500px`,gap:20,padding:20,overflow:`auto`,justifyContent:`center`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{flex:1,minWidth:`280px`,maxWidth:`800px`,display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`200px`},children:De(g.videoUrl||g.imageUrl)?(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`40px`},children:[(0,$.jsx)(`div`,{style:{fontSize:48,marginBottom:16},children:`⚠️`}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#ff4d4f`,marginBottom:16},children:`图片/视频资源已过期,请刷新重新加载~`})]}):n===`video`?(0,$.jsx)(`video`,{ref:v,src:`http://ceshi.apiforeign.minzhong.cn${g.videoUrl}`,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:`55vh`,borderRadius:8,objectFit:`contain`}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${g.imageUrl}&w=300&q=50`,alt:`预览`,style:{maxWidth:`100%`,maxHeight:`55vh`,objectFit:`contain`,borderRadius:8}})}),(0,$.jsxs)(`div`,{style:{width:`100%`,minWidth:`280px`,maxWidth:`320px`,background:`#f8fafc`,borderRadius:12,padding:20,maxHeight:`55vh`,overflowY:`auto`,overflowX:`hidden`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,display:`block`,marginBottom:16},children:`文件信息`}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`类型`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:n===`video`?`视频`:`图片`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,flexShrink:0,width:40},children:`请求`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500,flex:1,wordBreak:`break-all`},children:g.originalPrompt})]}),n===`image`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imageProportion})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imageSize})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`尺寸`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imagePx})]})]}),n===`video`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.aspectRatio})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.resolution})]})]}),n===`video`&&(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`时长`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:`${g.duration}秒`||`-`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`创建时间`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:Wte(g.createdAt||g.generatedDate)})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`生成引擎`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.engine||g.engineName||`-`})]})]}),(0,$.jsx)(`div`,{style:{borderTop:`1px dashed #e2e8f0`,margin:`16px 0`}}),g.mediaReferences&&g.mediaReferences.length>0&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,display:`block`,marginBottom:12},children:`依靠附件`}),g.mediaReferences.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>{v.current&&v.current.pause();let t=`http://ceshi.apiforeign.minzhong.cn${e.url}`;window.open(t,`_blank`)},style:{display:`flex`,alignItems:`center`,gap:8,padding:8,borderRadius:6,cursor:`pointer`,backgroundColor:`#f1f5f9`,marginBottom:4,transition:`background-color 0.2s`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#e2e8f0`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#f1f5f9`},children:[e.type===`image`?(0,$.jsx)(p6,{style:{color:`#3b82f6`,fontSize:14}}):(0,$.jsx)(Y8,{style:{color:`#f59e0b`,fontSize:14}}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13},children:e.name||`媒体${t+1}`})]},e.url))]}),(0,$.jsx)(`div`,{children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,marginTop:20},children:[(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(p0,{}),onClick:()=>{v.current&&v.current.pause();let e=`http://ceshi.apiforeign.minzhong.cn${g.videoUrl||g.imageUrl}&download=1`;window.open(e,`_blank`)},style:{flex:1,borderRadius:8},disabled:De(g.videoUrl||g.imageUrl),children:De(g.videoUrl||g.imageUrl)?`资源已过期`:`下载`}),(0,$.jsx)(vD,{onClick:Ae,style:{flex:1,borderRadius:8},children:`关闭`})]})})]})]})]})})]})},P9=document.createElement(`style`);P9.textContent=` ->>>>>>>> 8fa5dc430829c734e59e55bac555c89b0e6280a3:video-gen-app/dist/assets/index-B5mkO6qz.js +10004`,rows:3,style:{borderRadius:8}})]},t)),(0,$.jsx)(vD,{type:`dashed`,block:!0,onClick:()=>{L([...I,void 0]),k([...O,``]),D([...E,[]]),re([...W,!1])},style:{borderRadius:8,marginBottom:16},children:`+ 新增授权账户组`}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,justifyContent:`flex-end`},children:[(0,$.jsx)(vD,{onClick:()=>{T(!1),D([[]]),k([``]),L([void 0]),z(new Map),V(``)},style:{borderRadius:8},children:`取消`}),(0,$.jsx)(vD,{type:`primary`,onClick:He,loading:x,disabled:x||E.every(e=>e.length===0),style:{borderRadius:8},children:x?`上传中...`:`开始上传`})]})]})}),(0,$.jsxs)(Pq,{title:`上传任务历史`,open:G,onCancel:()=>K(!1),footer:null,width:800,style:{borderRadius:8},mask:{closable:!1},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(lw,{value:fe,onChange:e=>pe(e),placeholder:`选择状态`,style:{width:200,marginRight:12},options:[{value:`1`,label:`待上传`},{value:`2`,label:`上传中`},{value:`3`,label:`上传成功`},{value:`4`,label:`上传失败`}],allowClear:!0}),(0,$.jsx)(vD,{type:`primary`,onClick:Be,style:{borderRadius:8},children:`查询`})]}),(0,$.jsx)(f$,{dataSource:q,columns:[{title:`素材名称`,dataIndex:`fileName`,key:`fileName`,width:200},{title:`账户ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:180},{title:`状态`,dataIndex:`status`,key:`status`,width:100,render:e=>(0,$.jsx)(T$,{color:{1:`#f59e0b`,2:`#6366f1`,3:`#10b981`,4:`#ef4444`}[e]||`#64748b`,style:{borderRadius:4},children:{1:`待上传`,2:`上传中`,3:`上传成功`,4:`上传失败`}[e]||e})},{title:`备注`,dataIndex:`note`,key:`note`,width:250,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:e||`-`})},{title:`创建时间`,dataIndex:`created_at`,key:`created_at`,width:180,render:e=>(0,ED.default)(e).format(`YYYY-MM-DD HH:mm:ss`)}],loading:ue,scroll:{x:`max-content`},pagination:{current:oe,pageSize:ce,total:J,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:Ve},rowKey:(e,t)=>e.task_id||e.resource_id||t,size:`small`})]}),m&&g&&(0,$.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`rgba(0,0,0,0.85)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1e3,padding:16,boxSizing:`border-box`,overflow:`auto`},onClick:Ae,children:(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:16,padding:0,width:`100%`,maxWidth:`1200px`,maxHeight:`95vh`,minHeight:`300px`,overflow:`hidden`,position:`relative`,display:`flex`,flexDirection:`column`,boxShadow:`0 20px 60px rgba(0,0,0,0.3)`},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`12px 16px`,borderBottom:`1px solid #f0f0f0`,flexShrink:0},children:[(0,$.jsx)(Q.Title,{level:5,style:{margin:0,color:`#1a1a2e`,fontSize:16},children:g.title||`预览`}),(0,$.jsx)(vD,{icon:(0,$.jsx)(s5,{}),onClick:Ae,style:{background:`transparent`,border:`none`,color:`#94a3b8`,fontSize:16}})]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexWrap:`wrap`,height:`500px`,gap:20,padding:20,overflow:`auto`,justifyContent:`center`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{flex:1,minWidth:`280px`,maxWidth:`800px`,display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`200px`},children:De(g.videoUrl||g.imageUrl)?(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`40px`},children:[(0,$.jsx)(`div`,{style:{fontSize:48,marginBottom:16},children:`⚠️`}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#ff4d4f`,marginBottom:16},children:`图片/视频资源已过期,请刷新重新加载~`})]}):n===`video`?(0,$.jsx)(`video`,{ref:v,src:`http://ceshi.apiforeign.minzhong.cn${g.videoUrl}`,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:`55vh`,borderRadius:8,objectFit:`contain`}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${g.imageUrl}&w=300&q=50`,alt:`预览`,style:{maxWidth:`100%`,maxHeight:`55vh`,objectFit:`contain`,borderRadius:8}})}),(0,$.jsxs)(`div`,{style:{width:`100%`,minWidth:`280px`,maxWidth:`320px`,background:`#f8fafc`,borderRadius:12,padding:20,maxHeight:`55vh`,overflowY:`auto`,overflowX:`hidden`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,display:`block`,marginBottom:16},children:`文件信息`}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`类型`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:n===`video`?`视频`:`图片`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,flexShrink:0,width:40},children:`请求`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500,flex:1,wordBreak:`break-all`},children:g.originalPrompt})]}),n===`image`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imageProportion})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imageSize})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`尺寸`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.imagePx})]})]}),n===`video`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.aspectRatio})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.resolution})]})]}),n===`video`&&(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`时长`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:`${g.duration}秒`||`-`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`创建时间`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:Wte(g.createdAt||g.generatedDate)})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`生成引擎`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:g.engine||g.engineName||`-`})]})]}),(0,$.jsx)(`div`,{style:{borderTop:`1px dashed #e2e8f0`,margin:`16px 0`}}),g.mediaReferences&&g.mediaReferences.length>0&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,display:`block`,marginBottom:12},children:`依靠附件`}),g.mediaReferences.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>{v.current&&v.current.pause();let t=`http://ceshi.apiforeign.minzhong.cn${e.url}`;window.open(t,`_blank`)},style:{display:`flex`,alignItems:`center`,gap:8,padding:8,borderRadius:6,cursor:`pointer`,backgroundColor:`#f1f5f9`,marginBottom:4,transition:`background-color 0.2s`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#e2e8f0`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#f1f5f9`},children:[e.type===`image`?(0,$.jsx)(p6,{style:{color:`#3b82f6`,fontSize:14}}):(0,$.jsx)(Y8,{style:{color:`#f59e0b`,fontSize:14}}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13},children:e.name||`媒体${t+1}`})]},e.url))]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,marginTop:20},children:[(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(p0,{}),onClick:()=>{v.current&&v.current.pause();let e=`http://ceshi.apiforeign.minzhong.cn${g.videoUrl||g.imageUrl}&download=1`;window.open(e,`_blank`)},style:{flex:1,borderRadius:8},disabled:De(g.videoUrl||g.imageUrl),children:De(g.videoUrl||g.imageUrl)?`资源已过期`:`下载`}),(0,$.jsx)(vD,{onClick:Ae,style:{flex:1,borderRadius:8},children:`关闭`})]}),(0,$.jsx)(`div`,{children:(0,$.jsx)(vD,{type:`primary`,onClick:Ie,style:{width:`100%`,borderRadius:8,marginTop:20},disabled:De(g.videoUrl||g.imageUrl),children:`推送媒体后台`})})]})]})]})]})})]})},P9=document.createElement(`style`);P9.textContent=` @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } diff --git a/video-gen-app/dist/assets/index-CUOi61z4.js b/video-gen-app/dist/assets/index-CUOi61z4.js deleted file mode 100644 index bf0e60b2..00000000 --- a/video-gen-app/dist/assets/index-CUOi61z4.js +++ /dev/null @@ -1,450 +0,0 @@ -var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),l=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=f()})),m=o((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=d(),n=p(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1B||(e.current=z[B],z[B]=null,B--)}function U(e,t){B++,z[B]=e.current,e.current=t}var ee=V(null),te=V(null),ne=V(null),W=V(null);function re(e,t){switch(U(ne,t),U(te,e),U(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Wd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Wd(t),e=Gd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}H(ee),U(ee,e)}function G(){H(ee),H(te),H(ne)}function K(e){e.memoizedState!==null&&U(W,e);var t=ee.current,n=Gd(t,e.type);t!==n&&(U(te,e),U(ee,n))}function q(e){te.current===e&&(H(ee),H(te)),W.current===e&&(H(W),tp._currentValue=R)}var ie,J;function ae(e){if(ie===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ie=t&&t[1]||``,J=-1)`:-1i||c[r]!==l[i]){var u=` -`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{oe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ae(n):``}function ce(e,t){switch(e.tag){case 26:case 27:case 5:return ae(e.type);case 16:return ae(`Lazy`);case 13:return e.child!==t&&t!==null?ae(`Suspense Fallback`):ae(`Suspense`);case 19:return ae(`SuspenseList`);case 0:case 15:return se(e.type,!1);case 11:return se(e.type.render,!1);case 1:return se(e.type,!0);case 31:return ae(`Activity`);default:return``}}function le(e){try{var t=``,n=null;do t+=ce(e,n),n=e,e=e.return;while(e);return t}catch(e){return` -Error generating stack: `+e.message+` -`+e.stack}}var ue=Object.prototype.hasOwnProperty,de=t.unstable_scheduleCallback,fe=t.unstable_cancelCallback,pe=t.unstable_shouldYield,me=t.unstable_requestPaint,he=t.unstable_now,ge=t.unstable_getCurrentPriorityLevel,_e=t.unstable_ImmediatePriority,ve=t.unstable_UserBlockingPriority,ye=t.unstable_NormalPriority,be=t.unstable_LowPriority,xe=t.unstable_IdlePriority,Se=t.log,Ce=t.unstable_setDisableYieldValue,we=null,Te=null;function Ee(e){if(typeof Se==`function`&&Ce(e),Te&&typeof Te.setStrictMode==`function`)try{Te.setStrictMode(we,e)}catch{}}var De=Math.clz32?Math.clz32:Ae,Oe=Math.log,ke=Math.LN2;function Ae(e){return e>>>=0,e===0?32:31-(Oe(e)/ke|0)|0}var je=256,Me=262144,Ne=4194304;function Pe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Fe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Pe(n))):i=Pe(o):i=Pe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Pe(n))):i=Pe(o)):i=Pe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ie(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Le(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Re(){var e=Ne;return Ne<<=1,!(Ne&62914560)&&(Ne=4194304),e}function ze(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Be(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ve(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),$t=!1;if(Qt)try{var en={};Object.defineProperty(en,`passive`,{get:function(){$t=!0}}),window.addEventListener(`test`,en,en),window.removeEventListener(`test`,en,en)}catch{$t=!1}var tn=null,nn=null,rn=null;function an(){if(rn)return rn;var e,t=nn,n=t.length,r,i=`value`in tn?tn.value:tn.textContent,a=i.length;for(e=0;e=Ln),Bn=` `,Vn=!1;function Hn(e,t){switch(e){case`keyup`:return Fn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Un(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Wn=!1;function Gn(e,t){switch(e){case`compositionend`:return Un(t);case`keypress`:return t.which===32?(Vn=!0,Bn):null;case`textInput`:return e=t.data,e===Bn&&Vn?null:e;default:return null}}function Kn(e,t){if(Wn)return e===`compositionend`||!In&&Hn(e,t)?(e=an(),rn=nn=tn=null,Wn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=mr(n)}}function gr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _r(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Et(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Et(e.document)}return t}function vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var yr=Qt&&`documentMode`in document&&11>=document.documentMode,br=null,xr=null,Sr=null,Cr=!1;function wr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Cr||br==null||br!==Et(r)||(r=br,`selectionStart`in r&&vr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Sr&&pr(Sr,r)||(Sr=r,r=Od(xr,`onSelect`),0>=o,i-=o,gi=1<<32-De(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ti&&vi(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ti&&vi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ti&&vi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ti&&vi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&va(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ta(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=ri(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ni(o.type,o.key,o.props,null,e.mode,c),Ta(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=oi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=va(o),b(e,r,o,c)}if(F(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,wa(o),c);if(o.$$typeof===C)return b(e,r,qi(e,o),c);Ea(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ii(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ca=0;var i=b(e,t,n,r);return Sa=null,i}catch(t){if(t===fa||t===ma)throw t;var a=Qr(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Oa=Da(!0),ka=Da(!1),Aa=!1;function ja(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ma(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Na(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Pa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Pl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Yr(e),Jr(e,null,n),t}return Gr(e,r,t,n),Yr(e)}function Fa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ue(e,n)}}function Ia(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var La=!1;function Ra(){if(La){var e=ia;if(e!==null)throw e}}function za(e,t,n,r){La=!1;var i=e.updateQueue;Aa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Ll&f)===f:(r&f)===f){f!==0&&f===ra&&(La=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:Aa=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function Ba(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function X(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=I.T,s={};I.T=s,Ds(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Es(e,t,oa(c,r),pu(e)):Es(e,t,r,pu(e))}catch(n){Es(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function gs(){}function _s(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=vs(e).queue;hs(e,a,t,R,n===null?gs:function(){return ys(e),n(r)})}function vs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:R,baseState:R,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:R},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ys(e){var t=vs(e);t.next===null&&(t=e.alternate.memoizedState),Es(e,t.next.queue,{},pu())}function bs(){return Ki(tp)}function xs(){return Co().memoizedState}function Ss(){return Co().memoizedState}function Cs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Na(n);var r=Pa(t,e,n);r!==null&&(hu(r,t,n),Fa(r,t,n)),t={cache:$i()},e.payload=t;return}t=t.return}}function ws(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Os(e)?ks(t,n):(n=Kr(e,t,n,r),n!==null&&(hu(n,e,r),As(n,t,r)))}function Ts(e,t,n){Es(e,t,n,pu())}function Es(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Os(e))ks(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,fr(s,o))return Gr(e,t,i,0),Fl===null&&Wr(),!1}catch{}if(n=Kr(e,t,i,r),n!==null)return hu(n,e,r),As(n,t,r),!0}return!1}function Ds(e,t,n,r){if(r={lane:2,revertLane:fd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Os(e)){if(t)throw Error(i(479))}else t=Kr(e,n,r,2),t!==null&&hu(t,e,2)}function Os(e){var t=e.alternate;return e===no||t!==null&&t===no}function ks(e,t){oo=ao=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function As(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ue(e,n)}}var js={readContext:Ki,use:Eo,useCallback:po,useContext:po,useEffect:po,useImperativeHandle:po,useLayoutEffect:po,useInsertionEffect:po,useMemo:po,useReducer:po,useRef:po,useState:po,useDebugValue:po,useDeferredValue:po,useTransition:po,useSyncExternalStore:po,useId:po,useHostTransitionStatus:po,useFormState:po,useActionState:po,useOptimistic:po,useMemoCache:po,useCacheRefresh:po};js.useEffectEvent=po;var Ms={readContext:Ki,use:Eo,useCallback:function(e,t){return So().memoizedState=[e,t===void 0?null:t],e},useContext:Ki,useEffect:ns,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),es(4194308,4,cs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return es(4194308,4,e,t)},useInsertionEffect:function(e,t){es(4,2,e,t)},useMemo:function(e,t){var n=So();t=t===void 0?null:t;var r=e();if(so){Ee(!0);try{e()}finally{Ee(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=So();if(n!==void 0){var i=n(t);if(so){Ee(!0);try{n(t)}finally{Ee(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ws.bind(null,no,e),[r.memoizedState,e]},useRef:function(e){var t=So();return e={current:e},t.memoizedState=e},useState:function(e){e=Ro(e);var t=e.queue,n=Ts.bind(null,no,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:us,useDeferredValue:function(e,t){return ps(So(),e,t)},useTransition:function(){var e=Ro(!1);return e=hs.bind(null,no,e.queue,!0,!1),So().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=no,a=So();if(Ti){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Fl===null)throw Error(i(349));Ll&127||No(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ns(Fo.bind(null,r,o,e),[e]),r.flags|=2048,Qo(9,{destroy:void 0},Po.bind(null,r,o,n,t),null),n},useId:function(){var e=So(),t=Fl.identifierPrefix;if(Ti){var n=_i,r=gi;n=(r&~(1<<32-De(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=co++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Xe]=t,o[Ze]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Ld(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Ec(t)}}return jc(t),Dc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ec(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ne.current,Mi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ci,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Xe]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Pd(e.nodeValue,n)),e||ki(t,!0)}else e=Ud(e).createTextNode(r),e[Xe]=t,t.stateNode=e}return jc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Mi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Xe]=t}else Ni(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;jc(t),e=!1}else n=Pi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Qa(t),t):(Qa(t),null);if(t.flags&128)throw Error(i(558))}return jc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Mi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Xe]=t}else Ni(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;jc(t),a=!1}else a=Pi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Qa(t),t):(Qa(t),null)}return Qa(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),kc(t,t.updateQueue),jc(t),null);case 4:return G(),e===null&&wd(t.stateNode.containerInfo),jc(t),null;case 10:return Bi(t.type),jc(t),null;case 19:if(H($a),r=t.memoizedState,r===null)return jc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Ac(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=eo(e),o!==null){for(t.flags|=128,Ac(r,!1),e=o.updateQueue,t.updateQueue=e,kc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ti(n,e),n=n.sibling;return U($a,$a.current&1|2),Ti&&vi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&he()>tu&&(t.flags|=128,a=!0,Ac(r,!1),t.lanes=4194304)}else{if(!a)if(e=eo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,kc(t,e),Ac(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ti)return jc(t),null}else 2*he()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,Ac(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(jc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=he(),e.sibling=null,n=$a.current,U($a,a?n&1|2:n&1),Ti&&vi(t,r.treeForkCount),e);case 22:case 23:return Qa(t),Ga(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(jc(t),t.subtreeFlags&6&&(t.flags|=8192)):jc(t),n=t.updateQueue,n!==null&&kc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&H(ca),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Bi(Qi),jc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Nc(e,t){switch(xi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Bi(Qi),G(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return q(t),null;case 31:if(t.memoizedState!==null){if(Qa(t),t.alternate===null)throw Error(i(340));Ni()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Qa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ni()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H($a),null;case 4:return G(),null;case 10:return Bi(t.type),null;case 22:case 23:return Qa(t),Ga(),e!==null&&H(ca),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Bi(Qi),null;case 25:return null;default:return null}}function Pc(e,t){switch(xi(t),t.tag){case 3:Bi(Qi),G();break;case 26:case 27:case 5:q(t);break;case 4:G();break;case 31:t.memoizedState!==null&&Qa(t);break;case 13:Qa(t);break;case 19:H($a);break;case 10:Bi(t.type);break;case 22:case 23:Qa(t),Ga(),e!==null&&H(ca);break;case 24:Bi(Qi)}}function Fc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Gu(t,t.return,e)}}function Ic(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Gu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Gu(t,t.return,e)}}function Lc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{X(t,n)}catch(t){Gu(e,e.return,t)}}}function Rc(e,t,n){n.props=zs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Gu(e,t,n)}}function zc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Gu(e,t,n)}}function Bc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Gu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Gu(e,t,n)}else n.current=null}function Vc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Gu(e,e.return,t)}}function Hc(e,t,n){try{var r=e.stateNode;Rd(r,e.type,n,t),r[Ze]=t}catch(t){Gu(e,e.return,t)}}function Uc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ef(e.type)||e.tag===4}function Wc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Uc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ef(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Gc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ut));else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Gc(e,t,n),e=e.sibling;e!==null;)Gc(e,t,n),e=e.sibling}function Kc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Kc(e,t,n),e=e.sibling;e!==null;)Kc(e,t,n),e=e.sibling}function qc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ld(t,r,n),t[Xe]=e,t[Ze]=n}catch(t){Gu(e,e.return,t)}}var Jc=!1,Yc=!1,Xc=!1,Zc=typeof WeakSet==`function`?WeakSet:Set,Qc=null;function $c(e,t){if(e=e.containerInfo,Vd=up,e=_r(e),vr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Hd={focusedElem:e,selectionRange:n},up=!1,Qc=t;Qc!==null;)if(t=Qc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Qc=e;else for(;Qc!==null;){switch(t=Qc,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Ld(o,r,n),o[Xe]=e,lt(o),r=o;break a;case`link`:var s=Wf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=hr(s,h),v=hr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,I.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,Pl&6)throw Error(i(331));var c=Pl;if(Pl|=4,kl(o.current),xl(o,o.current,s,n),Pl=c,ad(0,!1),Te&&typeof Te.onPostCommitFiberRoot==`function`)try{Te.onPostCommitFiberRoot(we,o)}catch{}return!0}finally{L.p=a,I.T=r,Vu(e,t)}}function Wu(e,t,n){t=ci(n,t),t=Gs(e.stateNode,t,2),e=Pa(e,t,2),e!==null&&(Be(e,2),id(e))}function Gu(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=ci(n,e),n=Ks(2),r=Pa(t,n,2),r!==null&&(qs(n,r,t,e),Be(r,2),id(r));break}}t=t.return}}function Ku(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Nl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Hl=!0,i.add(n),e=qu.bind(null,e,t,n),t.then(e,e))}function qu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Fl===e&&(Ll&n)===n&&(Wl===4||Wl===3&&(Ll&62914560)===Ll&&300>he()-$l?!(Pl&2)&&Su(e,0):ql|=n,Yl===Ll&&(Yl=0)),id(e)}function Ju(e,t){t===0&&(t=Re()),e=qr(e,t),e!==null&&(Be(e,t),id(e))}function Yu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ju(e,n)}function Xu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Ju(e,n)}function Zu(e,t){return de(e,t)}var Qu=null,$u=null,ed=!1,td=!1,nd=!1,rd=0;function id(e){e!==$u&&e.next===null&&($u===null?Qu=$u=e:$u=$u.next=e),td=!0,ed||(ed=!0,dd())}function ad(e,t){if(!nd&&td){nd=!0;do for(var n=!1,r=Qu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-De(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ud(r,a))}else a=Ll,a=Fe(r,r===Fl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ie(r,a)||(n=!0,ud(r,a));r=r.next}while(n);nd=!1}}function od(){sd()}function sd(){td=ed=!1;var e=0;rd!==0&&Jd()&&(e=rd);for(var t=he(),n=null,r=Qu;r!==null;){var i=r.next,a=cd(r,t);a===0?(r.next=null,n===null?Qu=i:n.next=i,i===null&&($u=n)):(n=r,(e!==0||a&3)&&(td=!0)),r=i}iu!==0&&iu!==5||ad(e,!1),rd!==0&&(rd=0)}function cd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&zd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function wf(e,t,n){var r=Cf;if(r&&typeof t==`string`&&t){var i=Ot(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),vf.has(i)||(vf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ld(t,`link`,e),lt(t),r.head.appendChild(t)))}}function Tf(e){bf.D(e),wf(`dns-prefetch`,e,null)}function Ef(e,t){bf.C(e,t),wf(`preconnect`,e,t)}function Df(e,t,n){bf.L(e,t,n);var r=Cf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ot(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ot(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ot(n.imageSizes)+`"]`)):i+=`[href="`+Ot(e)+`"]`;var a=i;switch(t){case`style`:a=Nf(e);break;case`script`:a=Lf(e)}_f.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),_f.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Pf(a))||t===`script`&&r.querySelector(Rf(a))||(t=r.createElement(`link`),Ld(t,`link`,e),lt(t),r.head.appendChild(t)))}}function Of(e,t){bf.m(e,t);var n=Cf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ot(r)+`"][href="`+Ot(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Lf(e)}if(!_f.has(a)&&(e=m({rel:`modulepreload`,href:e},t),_f.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Rf(a)))return}r=n.createElement(`link`),Ld(r,`link`,e),lt(r),n.head.appendChild(r)}}}function kf(e,t,n){bf.S(e,t,n);var r=Cf;if(r&&e){var i=ct(r).hoistableStyles,a=Nf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Pf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=_f.get(a))&&Vf(e,n);var c=o=r.createElement(`link`);lt(c),Ld(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Bf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Af(e,t){bf.X(e,t);var n=Cf;if(n&&e){var r=ct(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=m({src:e,async:!0},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),lt(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t){bf.M(e,t);var n=Cf;if(n&&e){var r=ct(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),lt(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t,n,r){var a=(a=ne.current)?yf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Nf(n.href),n=ct(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Nf(n.href);var o=ct(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Pf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),_f.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},_f.set(e,n),o||If(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Lf(n),n=ct(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Nf(e){return`href="`+Ot(e)+`"`}function Pf(e){return`link[rel="stylesheet"][`+e+`]`}function Ff(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function If(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Ld(t,`link`,n),lt(t),e.head.appendChild(t))}function Lf(e){return`[src="`+Ot(e)+`"]`}function Rf(e){return`script[async]`+e}function zf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ot(n.href)+`"]`);if(r)return t.instance=r,lt(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),lt(r),Ld(r,`style`,a),Bf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Nf(n.href);var o=e.querySelector(Pf(a));if(o)return t.state.loading|=4,t.instance=o,lt(o),o;r=Ff(n),(a=_f.get(a))&&Vf(r,a),o=(e.ownerDocument||e).createElement(`link`),lt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ld(o,`link`,r),t.state.loading|=4,Bf(o,n.precedence,e),t.instance=o;case`script`:return o=Lf(n.src),(a=e.querySelector(Rf(o)))?(t.instance=a,lt(a),a):(r=n,(a=_f.get(o))&&(r=m({},n),Hf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),lt(a),Ld(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Bf(r,n.precedence,e));return t.instance}function Bf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Kf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function qf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Jf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Nf(r.href),a=t.querySelector(Pf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Zf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,lt(a);return}a=t.ownerDocument||t,r=Ff(r),(i=_f.get(i))&&Vf(r,i),a=a.createElement(`link`),lt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ld(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Zf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Yf=0;function Xf(e,t){return e.stylesheets&&e.count===0&&$f(e,e.stylesheets),0Yf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Zf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$f(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qf=null;function $f(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qf=new Map,t.forEach(ep,e),Qf=null,Zf.call(e))}function ep(e,t){if(!(t.state.loading&4)){var n=Qf.get(e);if(n)var r=n.get(null);else{n=new Map,Qf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()}))(),v=`modulepreload`,y=function(e){return`/`+e},b={},x=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=y(t,n),t in b)return;b[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:v,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},S=c(p(),1),C=`popstate`;function w(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function T(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return A(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:j(t)}return N(t,n,null,e)}function E(e,t){if(e===!1||e==null)throw Error(t)}function D(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function O(){return Math.random().toString(36).substring(2,10)}function k(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function A(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?M(t):t,state:n,key:t&&t.key||r||O(),mask:i}}function j({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function M(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function N(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=w(e)?e:A(h.location,e,t);n&&n(r,e),l=u()+1;let d=k(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=w(e)?e:A(h.location,e,t);n&&n(r,e),l=u();let i=k(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return P(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(C,d),c=e,()=>{i.removeEventListener(C,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function P(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),E(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:j(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function F(e,t,n=`/`){return I(e,t,n,!1)}function I(e,t,n,r,i){let a=oe((typeof t==`string`?M(t):t).pathname||`/`,n);if(a==null)return null;let o=i??R(e),s=null,c=ae(a);for(let e=0;s==null&&e{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;E(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=he([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(E(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),z(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:G(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of B(e.path))a(e,t,!0,n)}),t}function B(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=B(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function V(e){e.sort((e,t)=>e.score===t.score?K(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var H=/^:[\w-]+$/,U=3,ee=2,te=1,ne=10,W=-2,re=e=>e===`*`;function G(e,t){let n=e.split(`/`),r=n.length;return n.some(re)&&(r+=W),t&&(r+=ee),n.filter(e=>!re(e)).reduce((e,t)=>e+(H.test(t)?U:t===``?te:ne),r)}function K(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function q(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function J(e,t=!1,n=!0){D(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function ae(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return D(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function oe(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var se=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ce(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?M(e):e,a;return n?(n=me(n),a=n.startsWith(`/`)?le(n.substring(1),`/`):le(n,t)):a=t,{pathname:a,search:ve(r),hash:ye(i)}}function le(e,t){let n=ge(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function ue(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function de(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function fe(e){let t=de(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function pe(e,t,n,r=!1){let i;typeof e==`string`?i=M(e):(i={...e},E(!i.pathname||!i.pathname.includes(`?`),ue(`?`,`pathname`,`search`,i)),E(!i.pathname||!i.pathname.includes(`#`),ue(`#`,`pathname`,`hash`,i)),E(!i.search||!i.search.includes(`#`),ue(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=ce(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var me=e=>e.replace(/\/\/+/g,`/`),he=e=>me(e.join(`/`)),ge=e=>e.replace(/\/+$/,``),_e=e=>ge(e).replace(/^\/*/,`/`),ve=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,ye=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,be=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function xe(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Se(e){return he(e.map(e=>e.route.path).filter(Boolean))||`/`}var Ce=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function we(e,t){let n=e;if(typeof n!=`string`||!se.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ce)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=oe(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{D(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Te=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Te);var Ee=[`GET`,...Te];new Set(Ee);var De=S.createContext(null);De.displayName=`DataRouter`;var Oe=S.createContext(null);Oe.displayName=`DataRouterState`;var ke=S.createContext(!1);function Ae(){return S.useContext(ke)}var je=S.createContext({isTransitioning:!1});je.displayName=`ViewTransition`;var Me=S.createContext(new Map);Me.displayName=`Fetchers`;var Ne=S.createContext(null);Ne.displayName=`Await`;var Pe=S.createContext(null);Pe.displayName=`Navigation`;var Fe=S.createContext(null);Fe.displayName=`Location`;var Ie=S.createContext({outlet:null,matches:[],isDataRoute:!1});Ie.displayName=`Route`;var Le=S.createContext(null);Le.displayName=`RouteError`;var Re=`REACT_ROUTER_ERROR`,ze=`REDIRECT`,Be=`ROUTE_ERROR_RESPONSE`;function Ve(e){if(e.startsWith(`${Re}:${ze}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function He(e){if(e.startsWith(`${Re}:${Be}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new be(t.status,t.statusText,t.data)}catch{}}function Ue(e,{relative:t}={}){E(We(),`useHref() may be used only in the context of a component.`);let{basename:n,navigator:r}=S.useContext(Pe),{hash:i,pathname:a,search:o}=$e(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:he([n,a])),r.createHref({pathname:s,search:o,hash:i})}function We(){return S.useContext(Fe)!=null}function Ge(){return E(We(),`useLocation() may be used only in the context of a component.`),S.useContext(Fe).location}var Ke=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function qe(e){S.useContext(Pe).static||S.useLayoutEffect(e)}function Je(){let{isDataRoute:e}=S.useContext(Ie);return e?vt():Ye()}function Ye(){E(We(),`useNavigate() may be used only in the context of a component.`);let e=S.useContext(De),{basename:t,navigator:n}=S.useContext(Pe),{matches:r}=S.useContext(Ie),{pathname:i}=Ge(),a=JSON.stringify(fe(r)),o=S.useRef(!1);return qe(()=>{o.current=!0}),S.useCallback((r,s={})=>{if(D(o.current,Ke),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=pe(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:he([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Xe=S.createContext(null);function Ze(e){let t=S.useContext(Ie).outlet;return S.useMemo(()=>t&&S.createElement(Xe.Provider,{value:e},t),[t,e])}function Qe(){let{matches:e}=S.useContext(Ie);return e[e.length-1]?.params??{}}function $e(e,{relative:t}={}){let{matches:n}=S.useContext(Ie),{pathname:r}=Ge(),i=JSON.stringify(fe(n));return S.useMemo(()=>pe(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function et(e,t){return tt(e,t)}function tt(e,t,n){E(We(),`useRoutes() may be used only in the context of a component.`);let{navigator:r}=S.useContext(Pe),{matches:i}=S.useContext(Ie),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;bt(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant (or called \`useRoutes()\`) at "${s}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. - -Please change the parent to .`)}let u=Ge(),d;if(t){let e=typeof t==`string`?M(t):t;E(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):F(e,{pathname:p});D(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),D(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let h=ct(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:he([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:he([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?S.createElement(Fe.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function nt(){let e=_t(),t=xe(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=S.createElement(S.Fragment,null,S.createElement(`p`,null,`💿 Hey developer 👋`),S.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,S.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,S.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),S.createElement(S.Fragment,null,S.createElement(`h2`,null,`Unexpected Application Error!`),S.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?S.createElement(`pre`,{style:i},n):null,o)}var rt=S.createElement(nt,null),it=class extends S.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=He(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:S.createElement(Ie.Provider,{value:this.props.routeContext},S.createElement(Le.Provider,{value:e,children:this.props.component}));return this.context?S.createElement(ot,{error:e},t):t}};it.contextType=ke;var at=new WeakMap;function ot({children:e,error:t}){let{basename:n}=S.useContext(Pe);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Ve(t.digest);if(e){let r=at.get(t);if(r)throw r;let i=we(e.location,n);if(Ce&&!at.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw at.set(t,n),n}return S.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function st({routeContext:e,match:t,children:n}){let r=S.useContext(De);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(Ie.Provider,{value:e},n)}function ct(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);E(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Se(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||rt,o&&(s<0&&c===0?(bt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?S.createElement(n.route.Component,null):n.route.element?n.route.element:e,S.createElement(st,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?S.createElement(it,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function lt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ut(e){let t=S.useContext(De);return E(t,lt(e)),t}function dt(e){let t=S.useContext(Oe);return E(t,lt(e)),t}function ft(e){let t=S.useContext(Ie);return E(t,lt(e)),t}function pt(e){let t=ft(e),n=t.matches[t.matches.length-1];return E(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function mt(){return pt(`useRouteId`)}function ht(){return dt(`useNavigation`).navigation}function gt(){let{matches:e,loaderData:t}=dt(`useMatches`);return S.useMemo(()=>e.map(e=>L(e,t)),[e,t])}function _t(){let e=S.useContext(Le),t=dt(`useRouteError`),n=pt(`useRouteError`);return e===void 0?t.errors?.[n]:e}function vt(){let{router:e}=ut(`useNavigate`),t=pt(`useNavigate`),n=S.useRef(!1);return qe(()=>{n.current=!0}),S.useCallback(async(r,i={})=>{D(n.current,Ke),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var yt={};function bt(e,t,n){!t&&!yt[e]&&(yt[e]=!0,D(!1,n))}S.memo(xt);function xt({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return tt(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function St({to:e,replace:t,state:n,relative:r}){E(We(),` may be used only in the context of a component.`);let{static:i}=S.useContext(Pe);D(!i,` must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.`);let{matches:a}=S.useContext(Ie),{pathname:o}=Ge(),s=Je(),c=pe(e,fe(a),o,r===`path`),l=JSON.stringify(c);return S.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function Ct(e){return Ze(e.context)}function wt(e){E(!1,`A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .`)}function Tt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){E(!We(),`You cannot render a inside another . You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=S.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=M(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=S.useMemo(()=>{let e=oe(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return D(h!=null,` is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the won't render anything.`),h==null?null:S.createElement(Pe.Provider,{value:c},S.createElement(Fe.Provider,{children:t,value:h}))}function Et({children:e,location:t}){return et(Dt(e),t)}S.Component;function Dt(e,t=[]){let n=[];return S.Children.forEach(e,(e,r)=>{if(!S.isValidElement(e))return;let i=[...t,r];if(e.type===S.Fragment){n.push.apply(n,Dt(e.props.children,i));return}E(e.type===wt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a component. All component children of must be a or `),E(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Dt(e.props.children,i)),n.push(a)}),n}var Ot=`get`,kt=`application/x-www-form-urlencoded`;function At(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function jt(e){return At(e)&&e.tagName.toLowerCase()===`button`}function Mt(e){return At(e)&&e.tagName.toLowerCase()===`form`}function Nt(e){return At(e)&&e.tagName.toLowerCase()===`input`}function Pt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ft(e,t){return e.button===0&&(!t||t===`_self`)&&!Pt(e)}function It(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Lt(e,t){let n=It(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Rt=null;function zt(){if(Rt===null)try{new FormData(document.createElement(`form`),0),Rt=!1}catch{Rt=!0}return Rt}var Bt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Vt(e){return e!=null&&!Bt.has(e)?(D(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${kt}"`),null):e}function Ht(e,t){let n,r,i,a,o;if(Mt(e)){let o=e.getAttribute(`action`);r=o?oe(o,t):null,n=e.getAttribute(`method`)||Ot,i=Vt(e.getAttribute(`enctype`))||kt,a=new FormData(e)}else if(jt(e)||Nt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a