From d99062ca98e8aa21cda8d56b45375b386f8c791d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E4=BD=B3=E8=89=BA?= <13935794190@163.com> Date: Fri, 10 Jul 2026 10:20:59 +0800 Subject: [PATCH] =?UTF-8?q?=E2=80=9C=E9=A6=96=E9=A1=B5=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{index-epOb7vts.js => index-I0gVfD2c.js} | 26 +- video-gen-app/dist/index.html | 2 +- .../privatePortrait/picker/AssetPicker.tsx | 4 +- video-gen-app/src/pages/HomePage.tsx | 258 +++++++++++------- video-gen-app/src/pages/RemoveInfo.tsx | 59 +++- 5 files changed, 230 insertions(+), 119 deletions(-) rename video-gen-app/dist/assets/{index-epOb7vts.js => index-I0gVfD2c.js} (91%) diff --git a/video-gen-app/dist/assets/index-epOb7vts.js b/video-gen-app/dist/assets/index-I0gVfD2c.js similarity index 91% rename from video-gen-app/dist/assets/index-epOb7vts.js rename to video-gen-app/dist/assets/index-I0gVfD2c.js index 6c992361..4a9b5b56 100644 --- a/video-gen-app/dist/assets/index-epOb7vts.js +++ b/video-gen-app/dist/assets/index-I0gVfD2c.js @@ -398,17 +398,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${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%`}}}},u0=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:`rtl`}}},d0=e=>{let{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:{...Ul(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`}}}},f0=Ql(`Upload`,e=>{let{fontSizeHeading3:t,marginXS:n,lineWidth:r,pictureCardSize:i,calc:a}=e,o=dc(e,{uploadThumbnailSize:a(t).mul(2).equal(),uploadProgressOffset:a(a(n).div(2)).add(r).equal(),uploadPicCardSize:i});return[d0(o),a0(o),c0(o),l0(o),o0(o),s0(o),u0(o),Gh(o)]},e=>({actionsColor:e.colorIcon,pictureCardSize:e.controlHeightLG*2.55})),p0=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 m0(){return m0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,m0({},e,{ref:t,icon:p0.default}))),g0=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 _0(){return _0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,_0({},e,{ref:t,icon:g0.default}))),v0=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 y0(){return y0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,y0({},e,{ref:t,icon:v0.default})));function x0(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=pa(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 w0(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 T0=(e=``)=>{let t=e.split(`/`),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[``])[0]},E0=e=>e.indexOf(`image/`)===0,D0=e=>{if(e.type&&!e.thumbUrl)return E0(e.type);let t=e.thumbUrl||e.url||``,n=T0(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)},O0=200;function k0(e){return new Promise(t=>{if(!e.type||!E0(e.type)){t(``);return}let n=document.createElement(`canvas`);n.width=O0,n.height=O0,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${O0}px; height: ${O0}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=O0,s=O0,c=0,l=0;e>a?(s=O0/e*a,l=-(s-o)/2):(o=O0/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 A0=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 j0(){return j0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,j0({},e,{ref:t,icon:A0.default}))),N0=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(k$,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(M0,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(NW,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(ga),ee=W(),G=S.createElement(`div`,{className:N,style:i?.item},M,V,L,U,k&&S.createElement(Od,{motionName:`${ee}-fade`,visible:D===`uploading`,motionDeadline:2e3},({className:t})=>{let n=`percent`in s?S.createElement(gq,{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)})),te=s.response&&typeof s.response==`string`?s.response:s.error?.statusText||s.error?.message||a.uploadError,ne=D===`error`?S.createElement(Cw,{title:te,getPopupContainer:e=>e.parentNode},G):G;return S.createElement(`div`,{className:J(`${e}-list-item-container`,t),style:n,ref:T},f?f(ne,s,c,{download:C.bind(null,s),preview:x.bind(null,s),remove:w.bind(null,s)}):ne)}),P0=S.forwardRef((e,t)=>{let{listType:n=`text`,previewFile:r=k0,onPreview:i,onDownload:a,onRemove:o,locale:s,iconRender:c,isImageUrl:l=D0,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]=mf(),[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(b0,null):S.createElement(h0,null);return t?r:i}return t?S.createElement(Xm,null):S.createElement(lre,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(u_,{...a,icon:um(e,{...e.props,onClick:()=>{}})}):S.createElement(u_,{...a},S.createElement(`span`,null,e))};S.useImperativeHandle(t,()=>({handlePreview:j,handleDownload:M}));let{getPrefixCls:I}=S.useContext(ga),L=I(`upload`,u),R=I(),z=J(`${L}-list`,`${L}-list-${n}`,T?.list),B=S.useMemo(()=>gi(_h(R),[`onAppearEnd`,`onEnterEnd`,`onLeaveEnd`]),[R]),V={...A?{}:B,motionDeadline:2e3,motionName:`${L}-${A?`animate-inline`:`animate`}`,keys:pa(d.map(e=>({key:e.uid,file:e}))),motionAppear:O};return S.createElement(`div`,{className:z,style:E?.list},S.createElement(Dd,{...V,component:!1},({key:e,file:t,className:r,style:i})=>S.createElement(N0,{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(Od,{...V,visible:x,forceRender:!0},({className:e,style:t})=>um(b,n=>({className:J(n.className,e),style:{...t,pointerEvents:e?`none`:void 0,...n.style}}))))}),F0=`__LIST_IGNORE_${Date.now()}__`,I0=S.forwardRef((e,t)=>{let n=ya(`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(hm),I=p??F,L=e.customRequest||n.customRequest,[R,z]=Gn(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=pa(t),i=!1;T===1?r=r.slice(-1):T&&(i=r.length>T,r=r.slice(0,T)),(0,Vi.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,Vi.flushSync)(()=>{u?.(a)})},G=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[F0],e===F0)return Object.defineProperty(t,F0,{value:!0,configurable:!0}),!1;nf(e)&&(i=e)}return i},te=e=>{let t=e.filter(e=>!e.file[F0]);if(!t.length)return;let n=t.map(e=>x0(e.file)),r=pa(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}ee(i,r)})},ne=(e,t,n)=>{try{typeof e==`string`&&(e=JSON.parse(e))}catch{}if(!C0(t,B))return;let r=x0(t);r.status=`done`,r.percent=100,r.response=e,r.xhr=n,ee(r,S0(r,B))},K=(e,t)=>{if(!C0(t,B))return;let n=x0(t);n.status=`uploading`,n.percent=e.percent,ee(n,S0(n,B),e)},re=(e,t,n)=>{if(!C0(n,B))return;let r=x0(n);r.error=e,r.response=t,r.status=`error`,ee(r,S0(r,B))},ie=e=>{let t;Promise.resolve(typeof a==`function`?a(e):a).then(n=>{if(n===!1)return;let r=w0(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))})},ae=e=>{H(e.type),e.type===`drop`&&d?.(e)};S.useImperativeHandle(t,()=>({onBatchStart:te,onSuccess:ne,onProgress:K,onError:re,fileList:B,upload:U.current,nativeElement:W.current}));let{getPrefixCls:q,direction:oe,className:se,style:ce,classNames:le,styles:ue}=ya(`upload`),de=q(`upload`,v),fe={...e,listType:s,showUploadList:o,type:b,multiple:D,hasControlInside:O,supportServerRender:j,disabled:I},[pe,me]=Cf([le,P],[ue,N],{props:fe}),he={onBatchStart:te,onError:re,onProgress:K,onSuccess:ne,...e,customRequest:L,data:E,multiple:D,action:k,accept:A,supportServerRender:j,prefixCls:de,disabled:I,beforeUpload:G,onChange:void 0,hasControlInside:O};delete he.className,delete he.style,(!x||I)&&delete he.id;let ge=`${de}-wrapper`,[_e,ve]=f0(de,ge),[ye]=Yd(`Upload`,Hd.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(P0,{classNames:pe,styles:me,prefixCls:de,listType:s,items:B,previewFile:f,onPreview:c,onDownload:l,onRemove:ie,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,se,pe.root,{[`${de}-rtl`]:oe===`rtl`,[`${de}-picture-card-wrapper`]:s===`picture-card`,[`${de}-picture-circle-wrapper`]:s===`picture-circle`}),Ae={...me.root},je={...ce,...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`]:oe===`rtl`},pe.trigger);return S.createElement(`span`,{className:ke,ref:W,style:Ae},S.createElement(`div`,{className:e,style:{...je,...me.trigger},onDrop:ae,onDragOver:ae,onDragLeave:ae},S.createElement(i0,{...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(i0,{...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())}),L0=S.forwardRef((e,t)=>{let{style:n,height:r,hasControlInside:i=!1,children:a,...o}=e,s={...n,height:r};return S.createElement(I0,{ref:t,hasControlInside:i,...o,style:s,type:`drag`},a)}),R0=I0;R0.Dragger=L0,R0.LIST_IGNORE=F0;var z0=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})),B0=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:`页码`}})),V0=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.commonLocale=void 0,e.commonLocale={yearFormat:`YYYY`,dayFormat:`D`,cellMeridiemFormat:`A`,monthBeforeYear:!0}})),H0=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=V0();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:[`开始时间`,`结束时间`]}})),W0=o((e=>{var t=z0().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(H0()),r=t(U0()),i={lang:{placeholder:`请选择日期`,yearPlaceholder:`请选择年份`,quarterPlaceholder:`请选择季度`,monthPlaceholder:`请选择月份`,weekPlaceholder:`请选择周`,rangePlaceholder:[`开始日期`,`结束日期`],rangeYearPlaceholder:[`开始年份`,`结束年份`],rangeMonthPlaceholder:[`开始月份`,`结束月份`],rangeQuarterPlaceholder:[`开始季度`,`结束季度`],rangeWeekPlaceholder:[`开始周`,`结束周`],...n.default},timePickerLocale:{...r.default}};i.lang.ok=`确定`,e.default=i})),G0=o((e=>{var t=z0().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=t(W0()).default})),K0=o((e=>{var t=z0().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(B0()),r=t(G0()),i=t(W0()),a=t(U0()),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:`渐变色`}}})),q0=o(((e,t)=>{t.exports=K0()})),J0=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(wE()):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}))})),Y0=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})),X0=o(((e,t)=>{t.exports=Y0()})),Z0=c(q0(),1);J0();var $=X0(),Q0=Object.defineProperty,$0=Object.getOwnPropertySymbols,e2=Object.prototype.hasOwnProperty,t2=Object.prototype.propertyIsEnumerable,n2=(e,t,n)=>t in e?Q0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,r2=(e,t)=>{for(var n in t||={})e2.call(t,n)&&n2(e,n,t[n]);if($0)for(var n of $0(t))t2.call(t,n)&&n2(e,n,t[n]);return e},i2=(e,t)=>{var n={};for(var r in e)e2.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&$0)for(var r of $0(e))t.indexOf(r)<0&&t2.call(e,r)&&(n[r]=e[r]);return n},a2;(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||={})})(a2||={}),(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||={})})(a2||={});var o2=a2,s2={L:o2.QrCode.Ecc.LOW,M:o2.QrCode.Ecc.MEDIUM,Q:o2.QrCode.Ecc.QUARTILE,H:o2.QrCode.Ecc.HIGH},c2=128,l2=`L`,u2=`#FFFFFF`,d2=`#000000`,f2=!1,p2=1,m2=4,h2=0,g2=.1;function _2(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 v2(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 y2(e,t,n,r){if(r==null)return null;let i=e.length+n*2,a=Math.floor(t*g2),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 b2(e,t){return t==null?e?m2:h2:Math.max(Math.floor(t),0)}function x2({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(...o2.QrSegment.makeSegments(t)),e),[]);return o2.QrCode.encodeSegments(r,s2[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=b2(r,i);return{cells:e,margin:t,numCells:e.length+t*2,calculatedImageSettings:y2(e,o,t,a)}},[c,o,a,r,i]);return{qrcode:c,margin:u,cells:l,numCells:d,calculatedImageSettings:f}}var S2=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),C2=S.forwardRef(function(e,t){let n=e,{value:r,size:i=c2,level:a=l2,bgColor:o=u2,fgColor:s=d2,includeMargin:c=f2,minVersion:l=p2,boostLevel:u,marginSize:d,imageSettings:f}=n,p=i2(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`marginSize`,`imageSettings`]),{style:m}=p,h=i2(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}=x2({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=v2(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,S2?t.fill(new Path2D(_2(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=r2({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`,r2({style:D,height:i,width:i,ref:y,role:`img`},h)),O)});C2.displayName=`QRCodeCanvas`;var w2=S.forwardRef(function(e,t){let n=e,{value:r,size:i=c2,level:a=l2,bgColor:o=u2,fgColor:s=d2,includeMargin:c=f2,minVersion:l=p2,boostLevel:u,title:d,marginSize:f,imageSettings:p}=n,m=i2(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`title`,`marginSize`,`imageSettings`]),{margin:h,cells:g,numCells:_,calculatedImageSettings:v}=x2({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=v2(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=_2(y,h);return S.createElement(`svg`,r2({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)});w2.displayName=`QRCodeSVG`;var T2=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 E2(){return E2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,E2({},e,{ref:t,icon:T2.default}))),O2=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 k2(){return k2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,k2({},e,{ref:t,icon:O2.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:`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 M2(){return M2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,M2({},e,{ref:t,icon:j2.default}))),P2=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(Su,F2({},e,{ref:t,icon:P2.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:`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 R2(){return R2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,R2({},e,{ref:t,icon:L2.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:`M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z`}}]},name:`arrow-right`,theme:`outlined`}}))());function V2(){return V2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,V2({},e,{ref:t,icon:B2.default}))),U2=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 W2(){return W2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,W2({},e,{ref:t,icon:U2.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:`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 q2(){return q2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,q2({},e,{ref:t,icon:K2.default}))),Y2=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 X2(){return X2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,X2({},e,{ref:t,icon:Y2.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:`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 $2(){return $2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,$2({},e,{ref:t,icon:Q2.default}))),t4=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 n4(){return n4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,n4({},e,{ref:t,icon:t4.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:`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 a4(){return a4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,a4({},e,{ref:t,icon:i4.default}))),s4=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 c4(){return c4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,c4({},e,{ref:t,icon:s4.default}))),u4=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 d4(){return d4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,d4({},e,{ref:t,icon:u4.default}))),p4=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 m4(){return m4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,m4({},e,{ref:t,icon:p4.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:`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 _4(){return _4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,_4({},e,{ref:t,icon:g4.default}))),y4=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 b4(){return b4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,b4({},e,{ref:t,icon:y4.default}))),S4=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 C4(){return C4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,C4({},e,{ref:t,icon:S4.default}))),T4=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(Su,E4({},e,{ref:t,icon:T4.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 k4(){return k4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,k4({},e,{ref:t,icon:O4.default}))),j4=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 M4(){return M4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,M4({},e,{ref:t,icon:j4.default}))),P4=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 F4(){return F4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,F4({},e,{ref:t,icon:P4.default}))),L4=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 R4(){return R4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,R4({},e,{ref:t,icon:L4.default}))),B4=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 V4(){return V4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,V4({},e,{ref:t,icon:B4.default}))),U4=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 W4(){return W4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,W4({},e,{ref:t,icon:U4.default}))),K4=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 q4(){return q4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,q4({},e,{ref:t,icon:K4.default}))),Y4=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:`M573 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40zm-280 0c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z`}},{tag:`path`,attrs:{d:`M894 345a343.92 343.92 0 00-189-130v.1c-17.1-19-36.4-36.5-58-52.1-163.7-119-393.5-82.7-513 81-96.3 133-92.2 311.9 6 439l.8 132.6c0 3.2.5 6.4 1.5 9.4a31.95 31.95 0 0040.1 20.9L309 806c33.5 11.9 68.1 18.7 102.5 20.6l-.5.4c89.1 64.9 205.9 84.4 313 49l127.1 41.4c3.2 1 6.5 1.6 9.9 1.6 17.7 0 32-14.3 32-32V753c88.1-119.6 90.4-284.9 1-408zM323 735l-12-5-99 31-1-104-8-9c-84.6-103.2-90.2-251.9-11-361 96.4-132.2 281.2-161.4 413-66 132.2 96.1 161.5 280.6 66 412-80.1 109.9-223.5 150.5-348 102zm505-17l-8 10 1 104-98-33-12 5c-56 20.8-115.7 22.5-171 7l-.2-.1A367.31 367.31 0 00729 676c76.4-105.3 88.8-237.6 44.4-350.4l.6.4c23 16.5 44.1 37.1 62 62 72.6 99.6 68.5 235.2-8 330z`}},{tag:`path`,attrs:{d:`M433 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z`}}]},name:`comment`,theme:`outlined`}}))());function X4(){return X4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,X4({},e,{ref:t,icon:Y4.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:`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 $4(){return $4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,$4({},e,{ref:t,icon:Q4.default}))),t3=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 n3(){return n3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,n3({},e,{ref:t,icon:t3.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:`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 a3(){return a3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,a3({},e,{ref:t,icon:i3.default}))),s3=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 c3(){return c3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,c3({},e,{ref:t,icon:s3.default}))),u3=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 d3(){return d3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,d3({},e,{ref:t,icon:u3.default}))),p3=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 m3(){return m3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,m3({},e,{ref:t,icon:p3.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:`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 _3(){return _3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,_3({},e,{ref:t,icon:g3.default}))),y3=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 b3(){return b3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,b3({},e,{ref:t,icon:y3.default}))),S3=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 C3(){return C3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,C3({},e,{ref:t,icon:S3.default}))),T3=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 E3(){return E3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,E3({},e,{ref:t,icon:T3.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 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 k3(){return k3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,k3({},e,{ref:t,icon:O3.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:`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 M3(){return M3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,M3({},e,{ref:t,icon:j3.default}))),P3=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 F3(){return F3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,F3({},e,{ref:t,icon:P3.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:`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 R3(){return R3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,R3({},e,{ref:t,icon:L3.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:`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 V3(){return V3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,V3({},e,{ref:t,icon:B3.default}))),U3=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 W3(){return W3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,W3({},e,{ref:t,icon:U3.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:`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 q3(){return q3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,q3({},e,{ref:t,icon:K3.default}))),Y3=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(Su,X3({},e,{ref:t,icon:Y3.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:`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 $3(){return $3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,$3({},e,{ref:t,icon:Q3.default}))),t6=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 n6(){return n6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,n6({},e,{ref:t,icon:t6.default}))),i6=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 a6(){return a6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,a6({},e,{ref:t,icon:i6.default}))),s6=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:`M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81zm636.4-353l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5a44.1 44.1 0 0142.2-32.3c7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z`}}]},name:`like`,theme:`outlined`}}))());function c6(){return c6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,c6({},e,{ref:t,icon:s6.default}))),u6=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 d6(){return d6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,d6({},e,{ref:t,icon:u6.default}))),p6=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 m6(){return m6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,m6({},e,{ref:t,icon:p6.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:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M521.7 82c-152.5-.4-286.7 78.5-363.4 197.7-3.4 5.3.4 12.3 6.7 12.3h70.3c4.8 0 9.3-2.1 12.3-5.8 7-8.5 14.5-16.7 22.4-24.5 32.6-32.5 70.5-58.1 112.7-75.9 43.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 32.6 32.5 58.1 70.4 76 112.5C865.7 417.8 875 464.1 875 512c0 47.9-9.4 94.2-27.8 137.8-17.8 42.1-43.4 80-76 112.5s-70.5 58.1-112.7 75.9A352.8 352.8 0 01520.6 866c-47.9 0-94.3-9.4-137.9-27.8A353.84 353.84 0 01270 762.3c-7.9-7.9-15.3-16.1-22.4-24.5-3-3.7-7.6-5.8-12.3-5.8H165c-6.3 0-10.2 7-6.7 12.3C234.9 863.2 368.5 942 520.6 942c236.2 0 428-190.1 430.4-425.6C953.4 277.1 761.3 82.6 521.7 82zM395.02 624v-76h-314c-4.4 0-8-3.6-8-8v-56c0-4.4 3.6-8 8-8h314v-76c0-6.7 7.8-10.5 13-6.3l141.9 112a8 8 0 010 12.6l-141.9 112c-5.2 4.1-13 .4-13-6.3z`}}]},name:`login`,theme:`outlined`}}))());function _6(){return _6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,_6({},e,{ref:t,icon:g6.default}))),y6=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 b6(){return b6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,b6({},e,{ref:t,icon:y6.default}))),S6=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 C6(){return C6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,C6({},e,{ref:t,icon:S6.default}))),T6=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 E6(){return E6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,E6({},e,{ref:t,icon:T6.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:`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 k6(){return k6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,k6({},e,{ref:t,icon:O6.default}))),j6=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 M6(){return M6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,M6({},e,{ref:t,icon:j6.default}))),P6=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 F6(){return F6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,F6({},e,{ref:t,icon:P6.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:`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 R6(){return R6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,R6({},e,{ref:t,icon:L6.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 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 V6(){return V6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,V6({},e,{ref:t,icon:B6.default}))),U6=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:`M304 176h80v672h-80zm408 0h-64c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8z`}}]},name:`pause`,theme:`outlined`}}))());function W6(){return W6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,W6({},e,{ref:t,icon:U6.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:`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 q6(){return q6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,q6({},e,{ref:t,icon:K6.default}))),Y6=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 X6(){return X6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,X6({},e,{ref:t,icon:Y6.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:`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 $6(){return $6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,$6({},e,{ref:t,icon:Q6.default}))),t8=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 n8(){return n8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,n8({},e,{ref:t,icon:t8.default}))),i8=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 a8(){return a8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,a8({},e,{ref:t,icon:i8.default}))),s8=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 c8(){return c8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,c8({},e,{ref:t,icon:s8.default}))),u8=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 d8(){return d8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,d8({},e,{ref:t,icon:u8.default}))),p8=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 m8(){return m8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,m8({},e,{ref:t,icon:p8.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:`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 _8(){return _8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,_8({},e,{ref:t,icon:g8.default}))),y8=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 211.1l-199.2 24c-6.6.8-9.4 8.9-4.7 13.6l59.3 59.3-226 226-101.8-101.7c-6.3-6.3-16.4-6.2-22.6 0L100.3 754.1a8.03 8.03 0 000 11.3l45 45.2c3.1 3.1 8.2 3.1 11.3 0L433.3 534 535 635.7c6.3 6.2 16.4 6.2 22.6 0L829 364.5l59.3 59.3a8.01 8.01 0 0013.6-4.7l24-199.2c.7-5.1-3.7-9.5-8.9-8.8z`}}]},name:`rise`,theme:`outlined`}}))());function b8(){return b8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,b8({},e,{ref:t,icon:y8.default}))),S8=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 C8(){return C8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,C8({},e,{ref:t,icon:S8.default}))),T8=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 E8(){return E8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,E8({},e,{ref:t,icon:T8.default}))),O8=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 k8(){return k8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,k8({},e,{ref:t,icon:O8.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:`M567.1 512l318.5-319.3c5-5 1.5-13.7-5.6-13.7h-90.5c-2.1 0-4.2.8-5.6 2.3l-273.3 274-90.2-90.5c12.5-22.1 19.7-47.6 19.7-74.8 0-83.9-68.1-152-152-152s-152 68.1-152 152 68.1 152 152 152c27.7 0 53.6-7.4 75.9-20.3l90 90.3-90.1 90.3A151.04 151.04 0 00288 582c-83.9 0-152 68.1-152 152s68.1 152 152 152 152-68.1 152-152c0-27.2-7.2-52.7-19.7-74.8l90.2-90.5 273.3 274c1.5 1.5 3.5 2.3 5.6 2.3H880c7.1 0 10.7-8.6 5.6-13.7L567.1 512zM288 370c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80zm0 444c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z`}}]},name:`scissor`,theme:`outlined`}}))());function M8(){return M8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,M8({},e,{ref:t,icon:j8.default}))),P8=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 F8(){return F8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,F8({},e,{ref:t,icon:P8.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:`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 R8(){return R8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,R8({},e,{ref:t,icon:L8.default}))),B8=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 V8(){return V8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,V8({},e,{ref:t,icon:B8.default}))),U8=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 W8(){return W8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,W8({},e,{ref:t,icon:U8.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:`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 q8(){return q8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,q8({},e,{ref:t,icon:K8.default}))),ure=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 Y8(){return Y8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,Y8({},e,{ref:t,icon:ure.default}))),fre=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 X8(){return X8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,X8({},e,{ref:t,icon:fre.default}))),pre=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 Q8(){return Q8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,Q8({},e,{ref:t,icon:pre.default}))),hre=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 $8(){return $8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,$8({},e,{ref:t,icon:hre.default}))),_re=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 e5(){return e5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,e5({},e,{ref:t,icon:_re.default}))),vre=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 n5(){return n5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,n5({},e,{ref:t,icon:vre.default}))),bre=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 r5(){return r5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,r5({},e,{ref:t,icon:bre.default}))),Sre=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 i5(){return i5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,i5({},e,{ref:t,icon:Sre.default}))),Cre=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 o5(){return o5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,o5({},e,{ref:t,icon:Cre.default}))),wre=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 c5(){return c5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,c5({},e,{ref:t,icon:wre.default}))),Ere=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 l5(){return l5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,l5({},e,{ref:t,icon:Ere.default}))),Dre=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 d5(){return d5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,d5({},e,{ref:t,icon:Dre.default}))),kre=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 f5(){return f5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,f5({},e,{ref:t,icon:kre.default}))),Are=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:`M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h.1c3 0 4.4-3.6 2.2-5.6a371.67 371.67 0 00-103.7-65.8c-.4-.2-.8-.3-1.2-.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-.4.2-.8.3-1.2.5-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00137 888.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1a8.1 8.1 0 008.1.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4A171.2 171.2 0 01340.5 349c0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4A171.2 171.2 0 01683.9 349c0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z`}}]},name:`user-add`,theme:`outlined`}}))());function m5(){return m5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,m5({},e,{ref:t,icon:Are.default}))),Mre=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 h5(){return h5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,h5({},e,{ref:t,icon:Mre.default}))),Nre=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 _5(){return _5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,_5({},e,{ref:t,icon:Nre.default}))),Pre=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 y5(){return y5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,y5({},e,{ref:t,icon:Pre.default}))),Fre=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 x5(){return x5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,x5({},e,{ref:t,icon:Fre.default}))),Lre=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 S5(){return S5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,S5({},e,{ref:t,icon:Lre.default}))),Rre=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 w5(){return w5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,w5({},e,{ref:t,icon:Rre.default}))),E5=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},zre=(e=>e?E5(e):E5),Bre=e=>e;function Vre(e,t=Bre){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 D5=e=>{let t=zre(e),n=e=>Vre(t,e);return Object.assign(n,t),n},O5=(e=>e?D5(e):D5),k5=`AES-GCM`,A5=12,j5=128;function M5(){return typeof window<`u`&&typeof crypto<`u`&&crypto.subtle!==void 0}async function N5(){throw Error(`VITE_ENCRYPTION_KEY not configured`)}async function Hre(e){if(!M5())throw Error(`Encryption not available in non-secure context`);let t=await N5(),n=crypto.getRandomValues(new Uint8Array(A5)),r=new TextEncoder().encode(e),i=await crypto.subtle.encrypt({name:k5,iv:n,tagLength:j5},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 Ure(e){if(!M5())throw Error(`Decryption not available in non-secure context`);let t=await N5(),n=Uint8Array.from(atob(e),e=>e.charCodeAt(0)),r=n.slice(0,A5),i=n.slice(A5),a=await crypto.subtle.decrypt({name:k5,iv:r,tagLength:j5},t,i);return new TextDecoder().decode(a)}var Wre=`http://ceshi.apiforeign.minzhong.cn`,Gre=!1;function Kre(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}function P5(e){return Array.isArray(e)?e.map(P5):typeof e==`object`&&e?Object.fromEntries(Object.entries(e).map(([e,t])=>[Kre(e),P5(t)])):e}function qre(){return localStorage.getItem(`auth_token`)}function F5(e){localStorage.setItem(`auth_token`,e)}function I5(){localStorage.removeItem(`auth_token`)}async function Jre(e){try{return await Ure(e)}catch{return null}}async function L5(e,t={}){let{method:n=`GET`,body:r,auth:i=!0,encryptBody:a=Gre,signal:o,skipAuthRedirect:s}=t,c={"Content-Type":`application/json`};if(i){let e=qre();e&&(c.Authorization=`Bearer ${e}`)}let l;if(r!==void 0){let e=JSON.stringify(r);a?(c[`X-Encrypted`]=`true`,l=JSON.stringify({data:await Hre(e)})):l=e}let u=await fetch(`${Wre}/api${e}`,{method:n,headers:c,body:l,signal:o});if(u.status===204)return;let d=await u.text();if(!d)return;let f;try{f=JSON.parse(d)}catch{throw Error(`响应解析失败 (${u.status})`)}if(f&&typeof f.data==`string`&&a){let e=await Jre(f.data);e!==null&&(f=JSON.parse(e))}if(!u.ok){let e=f?.detail?.message||f?.message||`请求失败 (${u.status})`;throw typeof f?.detail==`string`&&(e=f.detail),u.status===401&&!t.skipAuthRedirect&&(I5(),window.location.href=`/login`),Error(e)}return P5(f)}var R5={get:(e,t=!0)=>L5(e,typeof t==`boolean`?{auth:t}:t),post:(e,t,n=!0,r=!1)=>L5(e,{method:`POST`,body:t,auth:n,skipAuthRedirect:r}),put:(e,t,n=!0)=>L5(e,{method:`PUT`,body:t,auth:n}),delete:(e,t,n=!0)=>L5(e,{method:`DELETE`,body:t,auth:n})};async function Yre(e,t,n,r){let i=await R5.post(`/auth/login`,{username:e,password:t,captcha_token:n,remember_me:r||!1},!1,!0);return F5(i.accessToken),i.user}async function Xre(e,t){let n=await R5.post(`/auth/sms-login`,{phone:e,code:t},!1,!0);return F5(n.accessToken),n.user}async function Zre(e,t,n){let r=await R5.post(`/auth/register`,{phone:e,code:t,password:n},!1);return F5(r.accessToken),r.user}async function Qre(){await R5.post(`/auth/logout`),I5()}async function z5(){try{return await R5.get(`/auth/me`)}catch{return null}}async function B5(e,t){await R5.post(`/auth/change-password`,{old_password:e,new_password:t})}async function $re(){return R5.get(`/projects`)}async function eie(e,t){return R5.post(`/projects`,{name:e,industry:t})}async function tie(e){await R5.delete(`/projects/${e}`)}async function V5(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)),R5.get(`/generation-records?${r.toString()}`,{signal:e.signal})}async function nie(e,t){return R5.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 H5(e,t){let n=new FormData;n.append(`file`,e);let r=localStorage.getItem(`auth_token`),i=typeof t==`number`&&t>0?`?duration_seconds=${encodeURIComponent(String(t))}`:``,a=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/generation-records/upload-audio${i}`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!a.ok)throw Error(`音频上传失败`);return await a.json()}async function U5(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(`图片上传失败`);return await r.json()}async function W5(e,t){let n=new FormData;n.append(`file`,e);let r=localStorage.getItem(`auth_token`),i=typeof t==`number`&&t>0?`?duration_seconds=${encodeURIComponent(String(t))}`:``,a=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/generation-records/upload-video${i}`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!a.ok)throw Error(`视频上传失败`);return await a.json()}function rie(e,t){return`${`http://ceshi.apiforeign.minzhong.cn/api${e}`}${typeof t==`number`&&t>0?`?duration_seconds=${encodeURIComponent(String(t))}`:``}`}async function G5(e,t,n,r=`素材上传失败`){let i=new FormData;i.append(`file`,t);let a=localStorage.getItem(`auth_token`),o=await fetch(rie(e,n),{method:`POST`,headers:a?{Authorization:`Bearer ${a}`}:{},body:i});if(!o.ok)throw Error(r);return await o.json()}async function iie(e){return G5(`/private-portrait/uploads/image`,e,void 0,`真人图片素材上传失败`)}async function aie(e,t){return G5(`/private-portrait/uploads/video`,e,t,`真人视频素材上传失败`)}async function oie(e){return G5(`/private-portrait/virtual/uploads/image`,e,void 0,`虚拟图片素材上传失败`)}async function sie(e,t){return G5(`/private-portrait/virtual/uploads/video`,e,t,`虚拟视频素材上传失败`)}async function cie(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/hot-opening-replications/upload-image`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok)throw Error(`图片上传失败`);return await r.json()}async function lie(e,t){let n=new FormData;n.append(`file`,e);let r=localStorage.getItem(`auth_token`),i=typeof t==`number`&&t>0?`?duration_seconds=${encodeURIComponent(String(t))}`:``,a=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/hot-opening-replications/upload-video${i}`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!a.ok)throw Error(`视频上传失败`);return await a.json()}async function uie(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/shot-replications/upload-image`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok)throw Error(`图片上传失败`);return await r.json()}async function die(e,t){let n=new FormData;n.append(`file`,e);let r=localStorage.getItem(`auth_token`),i=typeof t==`number`&&t>0?`?duration_seconds=${encodeURIComponent(String(t))}`:``,a=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/shot-replications/upload-video${i}`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!a.ok)throw Error(`视频上传失败`);return await a.json()}async function K5(e){await R5.post(`/generation-records/delete-file?url=${encodeURIComponent(e)}`)}async function fie(e,t){await R5.put(`/generation-records/${e}/prompt`,{optimized_prompt:t})}async function pie(e,t){return R5.post(`/generation-records/${e}/generate`,{aspect_ratio:t.aspectRatio,resolution:t.resolution})}async function q5(e=1,t=20){let n=new URLSearchParams;return n.set(`page`,String(e)),n.set(`page_size`,String(t)),R5.get(`/credits?${n.toString()}`)}async function J5(){return R5.get(`/auth/site-info`,!1)}async function mie(){return R5.get(`/video-engines`)}async function hie(){return R5.get(`/image-engines`)}async function Y5(e,t){await R5.post(`/sms/send`,{phone:e,scene:t},!1)}async function X5(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)),R5.get(`/notifications?${r.toString()}`)}async function Z5(){return(await R5.get(`/notifications/unread-count`)).count}async function Q5(e){await R5.put(`/notifications/${e}/read`)}async function $5(){return(await R5.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 gie(){return R5.get(`/menu-configs`)}async function _ie(){return R5.get(`/recharge-packages`)}async function vie(){return R5.get(`/payments/methods`)}async function yie(e,t=`wechat`){return R5.post(`/payments/recharge`,{plan:e,method:t})}async function bie(e=1,t=20){let n=new URLSearchParams;return n.set(`page`,String(e)),n.set(`page_size`,String(t)),R5.get(`/payments/orders?${n.toString()}`)}async function e7(e){return R5.get(`/payments/orders/${e}`)}async function t7(e){return R5.post(`/payments/orders/${e}/cancel`)}async function xie(){return R5.get(`/credits/ratios`)}async function n7(){return R5.get(`/generation-ai/engines`)}async function Sie(e){return R5.post(`/generation-ai/tasks`,e)}async function r7(e){return R5.get(`/generation-ai/tasks?page=`+e.page+`&page_size=`+e.pageSize)}async function Cie(e){return R5.get(`/generation-ai/history`+e)}async function i7(e){return R5.get(`/generation-ai/history/`+e)}async function wie(e){await R5.delete(`/generation-ai/tasks/${e}`)}async function Tie(){return R5.get(`/credits/credit-ratios`)}async function Eie(e){return R5.post(`/hot-opening-replications/tasks`,e)}async function a7(e,t,n){let r=`/hot-opening-replications/tasks?page=${e}&page_size=${t}`;return n&&(r+=`&keyword=${encodeURIComponent(n)}`),R5.get(r)}async function o7(e){return R5.get(`/hot-opening-replications/tasks/${e}`)}async function Die(e,t){return R5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-image-prompt`)}async function Oie(e,t,n){return R5.put(`/hot-opening-replications/tasks/${e}/steps/${t}/image-prompt`,n)}async function s7(e,t,n){return R5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-image`,n)}async function kie(e,t,n){return R5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-video-prompt`,n)}async function c7(e,t,n){return R5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-video`,n)}async function l7(e){return R5.post(`/user-oauth/request_oauth`,e)}async function Aie(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),R5.get(`/user-oauth/juliang_callback?${t.toString()}`)}async function u7(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)),R5.get(`/user-oauth/oauth_list?${t.toString()}`)}async function d7(e){let t=new URLSearchParams;return e.platform&&t.set(`platform`,e.platform),e.page!==void 0&&t.set(`page`,String(e.page)),e.pageSize!==void 0&&t.set(`page_size`,String(e.pageSize)),R5.get(`/pre-test-template/list?${t.toString()}`)}async function jie(e){return R5.post(`/pre-test-template/create`,e)}async function f7(e){return R5.get(`/pre-test-template/select/${e}`)}async function Mie(e,t){return R5.post(`/pre-test-template/update/${e}`,t)}async function Nie(e){return R5.get(`/pre-test-template/delete/${e}`)}async function p7(){return R5.get(`/pre-test-template/default`)}async function Pie(e,t,n){return R5.put(`/hot-opening-replications/tasks/${e}/steps/${t}/video-prompt-schema`,n)}async function Fie(e){return R5.post(`/shot-replications/task-sets`,e)}async function m7(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 R5.get(r)}async function h7(e){return R5.get(`/shot-replications/task-sets/${e}`)}async function Iie(e,t){return R5.post(`/shot-replications/task-sets/${e}/split-by-ai`,t)}async function Lie(e,t){return R5.post(`/shot-replications/task-sets/${e}/split-custom`,t)}async function g7(e){return R5.get(`/shot-replications/task-sets/${e}/segments`)}async function Rie(e,t){return R5.post(`/shot-replications/segments/${e}/replication-projects`,t)}async function _7(e){return R5.get(`/shot-replications/projects/${e}`)}async function zie(e,t){return R5.post(`/shot-replications/projects/${e}/steps/${t}/generate-image-prompt`)}async function Bie(e,t,n){return R5.put(`/shot-replications/projects/${e}/steps/${t}/image-prompt`,n)}async function Vie(e,t,n){return R5.put(`/shot-replications/projects/${e}/steps/${t}/video-prompt-schema`,n)}async function v7(e,t,n){return R5.post(`/shot-replications/projects/${e}/steps/${t}/generate-image`,n)}async function Hie(e,t,n){return R5.post(`/shot-replications/projects/${e}/steps/${t}/generate-video-prompt`,n)}async function y7(e,t,n){return R5.post(`/shot-replications/projects/${e}/steps/${t}/generate-video`,n)}async function Uie(e){return R5.post(`/shot-replications/task-sets/${e}/reanalyze`)}async function Wie(e){await R5.delete(`/shot-replications/segments/${e}`)}async function Gie(e){return R5.post(`/shot-replications/segments/${e}/reanalyze`)}async function Kie(e){return R5.post(`/shot-replications/segments/${e}/retry-split`)}async function qie(e){await R5.delete(`/shot-replications/task-sets/${e}`)}async function Jie(e){await R5.delete(`/hot-opening-replications/tasks/${e}`)}async function b7(e){let t=new URLSearchParams;return e?.level&&t.set(`level`,e.level),e?.parent_code&&t.set(`parent_code`,e.parent_code),R5.get(`/pre-test-template/getArea?${t.toString()}`)}async function Yie(e){return R5.post(`/upload-material/async-batch-upload`,e)}async function Xie(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 R5.get(`/upload-material/upload-history${n?`?${n}`:``}`)}async function x7(e){return R5.post(`/upload-material/batch-update-filename`,e)}async function Zie(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)),R5.get(`/material-consumption/list?${t.toString()}`)}async function Qie(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.date&&t.set(`date`,e.date),R5.get(`/material-consumption/sync?${t.toString()}`)}async function S7(){return R5.get(`/material-consumption/fields`)}async function $ie(e){return R5.post(`/contact/request`,e)}async function eae(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)),R5.get(`/resources-material/list?${t.toString()}`)}async function tae(e){return R5.get(`/recent-generations?limit=${e}&modules=project&modules=chat_ai&modules=hot_opening_replicate&modules=shot_replicate`)}async function C7(){return R5.get(`/open-type/open_type_all`)}async function nae(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.oauth_id&&t.set(`oauth_id`,e.oauth_id),e.advertiser_name&&t.set(`advertiser_name`,e.advertiser_name),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),R5.get(`/oauth-account/list?${t.toString()}`)}async function rae(e){let t=new URLSearchParams;return e.id&&t.set(`id`,e.id),R5.get(`/oauth-account/delete?${t.toString()}`)}async function iae(){return R5.post(`/upload-material/oauth_account_list`)}async function aae(e){return R5.post(`/resources-material/pre-commit`,e)}async function oae(){return R5.get(`/home-materials/categories`)}async function w7(e,t=10){return R5.get(`/home-materials?category_id=${e}&limit_per_category=${t}&include_empty_categories=false&response_mode=grouped&page=1&page_size=20`)}async function T7(e){return R5.delete(`/generation-ai/history/batch`,e)}function E7(e={}){let t=new URLSearchParams;e.resourceType&&t.set(`resource_type`,e.resourceType),e.page&&t.set(`page`,String(e.page)),e.pageSize&&t.set(`page_size`,String(e.pageSize)),e.keyword&&t.set(`keyword`,e.keyword),e.scene&&t.set(`scene`,e.scene);let n=t.toString();return n?`?${n}`:``}async function D7(e={}){return R5.get(`/upload-resources/history${E7(e)}`)}async function O7(e,t={}){return R5.get(`/upload-resources/history/${e}${E7(t)}`)}async function sae(e){return R5.delete(`/upload-resources/history/batch`,{resource_ids:e})}async function cae(){return R5.get(`/private-portrait/config`)}async function k7(e={}){let t=new URLSearchParams;return t.set(`page`,String(e.page||1)),t.set(`page_size`,String(e.pageSize||20)),e.keyword&&t.set(`keyword`,e.keyword),e.status&&t.set(`status`,e.status),R5.get(`/private-portrait/projects?${t.toString()}`)}async function lae(e){return R5.post(`/private-portrait/projects`,{name:e.name,description:e.description||null,callback_redirect_url:e.callbackRedirectUrl||null})}async function uae(e){await R5.delete(`/private-portrait/projects/${e}`)}async function dae(e){return R5.get(`/private-portrait/validate-sessions/${e}`)}async function fae(e,t){return R5.post(`/private-portrait/projects/${e}/assets`,{url:t.url,asset_type:t.assetType||`Image`,name:t.name||null,video_duration:t.videoDuration??null,video_cover_url:t.videoCoverUrl||null,file_size:t.fileSize??null,mime_type:t.mimeType||null,upload_resource_id:t.uploadResourceId||null})}async function pae(e,t={}){let n=new URLSearchParams;return n.set(`page`,String(t.page||1)),n.set(`page_size`,String(t.pageSize||20)),t.status&&n.set(`status`,t.status),t.keyword&&n.set(`keyword`,t.keyword),t.assetType&&n.set(`asset_type`,t.assetType),R5.get(`/private-portrait/projects/${e}/assets?${n.toString()}`)}async function mae(e){await R5.delete(`/private-portrait/assets/${e}`)}async function hae(e={}){let t=new URLSearchParams;return t.set(`page`,String(e.page||1)),t.set(`page_size`,String(e.pageSize||20)),e.projectId&&t.set(`project_id`,e.projectId),e.keyword&&t.set(`keyword`,e.keyword),e.assetType&&t.set(`asset_type`,e.assetType),R5.get(`/private-portrait/selectable-assets?${t.toString()}`)}async function gae(){return R5.get(`/private-portrait/virtual/config`)}async function A7(e={}){let t=new URLSearchParams;return t.set(`page`,String(e.page||1)),t.set(`page_size`,String(e.pageSize||20)),e.keyword&&t.set(`keyword`,e.keyword),e.status&&t.set(`status`,e.status),R5.get(`/private-portrait/virtual-projects?${t.toString()}`)}async function _ae(e){return R5.post(`/private-portrait/virtual-projects`,{name:e.name,description:e.description||null})}async function vae(e){await R5.delete(`/private-portrait/virtual-projects/${e}`)}async function yae(e,t){return R5.post(`/private-portrait/virtual-projects/${e}/assets`,{url:t.url,asset_type:t.assetType||`Image`,name:t.name||null,video_duration:t.videoDuration??null,video_cover_url:t.videoCoverUrl||null,file_size:t.fileSize??null,mime_type:t.mimeType||null,upload_resource_id:t.uploadResourceId||null})}async function bae(e,t={}){let n=new URLSearchParams;return n.set(`page`,String(t.page||1)),n.set(`page_size`,String(t.pageSize||20)),t.status&&n.set(`status`,t.status),t.keyword&&n.set(`keyword`,t.keyword),t.assetType&&n.set(`asset_type`,t.assetType),R5.get(`/private-portrait/virtual-projects/${e}/assets?${n.toString()}`)}async function xae(e){await R5.delete(`/private-portrait/virtual-assets/${e}`)}async function Sae(e={}){let t=new URLSearchParams;return t.set(`page`,String(e.page||1)),t.set(`page_size`,String(e.pageSize||20)),e.projectId&&t.set(`project_id`,e.projectId),e.keyword&&t.set(`keyword`,e.keyword),e.assetType&&t.set(`asset_type`,e.assetType),R5.get(`/private-portrait/virtual-selectable-assets?${t.toString()}`)}async function j7(){return R5.get(`/team/managed`)}async function Cae(e=1,t=20){let n=new URLSearchParams;return n.set(`page`,String(e)),n.set(`page_size`,String(t)),R5.get(`/team/members?${n.toString()}`)}async function wae(e,t,n=`increase`,r){await R5.post(`/team/members/${e}/credits`,{target_user_id:e,amount:t,direction:n,description:r||null})}async function Tae(){return R5.get(`/team/invitations`)}async function Eae(e,t){return R5.post(`/team/invitations`,{max_uses:e||null,expires_at:t||null})}async function Dae(e){await R5.delete(`/team/invitations/${e}`)}async function Oae(e){let t=e?`/team/join-requests?status=${e}`:`/team/join-requests`;return R5.get(t)}async function kae(e,t,n){await R5.post(`/team/join-requests/${e}`,{action:t,note:n||null})}async function Aae(e){return R5.get(`/team/join-info?code=${encodeURIComponent(e)}`,{auth:!0,skipAuthRedirect:!0})}async function jae(e){return R5.get(`/team/join-info/public?code=${encodeURIComponent(e)}`,!1)}async function Mae(e){await R5.post(`/team/join`,{invitation_code:e})}async function Nae(e){let t=new URLSearchParams;return 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.phone&&t.set(`phone`,e.phone),e.recordType&&t.set(`record_type`,e.recordType),e.startDate&&t.set(`start_date`,e.startDate),e.endDate&&t.set(`end_date`,e.endDate),R5.get(`/team/credit-records?${t.toString()}`)}function Pae(e){let t=new URLSearchParams;return e.phone&&t.set(`phone`,e.phone),e.recordType&&t.set(`record_type`,e.recordType),e.startDate&&t.set(`start_date`,e.startDate),e.endDate&&t.set(`end_date`,e.endDate),`http://ceshi.apiforeign.minzhong.cn/api/team/credit-records/export?${t.toString()}`}var M7=O5(e=>({user:null,loading:!0,login:async(t,n,r,i)=>{e({user:await Yre(t,n,r,i)})},logout:async()=>{await Qre(),e({user:null})},checkAuth:async()=>{try{if(!localStorage.getItem(`auth_token`)){e({user:null,loading:!1});return}e({user:await z5(),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 B5(e,t)},refreshUser:async()=>{try{e({user:await z5()})}catch(e){console.error(`Failed to refresh user:`,e)}},setUserCredits:t=>{e(e=>e.user?{user:{...e.user,credits:t}}:{})}})),N7={system:{gradient:`linear-gradient(135deg, #6366f1, #818cf8)`,icon:(0,$.jsx)(s5,{}),label:`系统通知`},credit:{gradient:`linear-gradient(135deg, #f59e0b, #fbbf24)`,icon:(0,$.jsx)(t5,{}),label:`积分通知`},promo:{gradient:`linear-gradient(135deg, #8b5cf6, #a78bfa)`,icon:(0,$.jsx)(N3,{}),label:`活动通知`}},Fae=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),o=M7(e=>e.refreshUser),s=M7(e=>e.setUserCredits),c=(0,S.useCallback)(async()=>{try{let n=await X5(1,20,!1),i=n.items||[],o=n?.credits?.balance;if(typeof o==`number`){let e=M7.getState().user;e&&e.credits!==o&&s(o)}r(i),i.length>0&&!e&&(t(!0),a(0))}catch{}},[e,s]);(0,S.useEffect)(()=>{c();let e=setInterval(c,3e4);return()=>clearInterval(e)},[]);let l=async()=>{let e=n[i];if(e)try{await Q5(e.id)}catch{}if(i{let e=n[i];if(e)try{await Q5(e.id)}catch{}t(!1),r([]),a(0)};if(!e||n.length===0)return null;let d=n[i],f=N7[d.type]||N7.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:u,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:f.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:f.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:d.title})]})]}),(0,$.jsx)(`div`,{onClick:u,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)(ju,{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:d.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)(h$,{color:f.gradient.includes(`#6366f1`)?`#6366f1`:f.gradient.includes(`#f59e0b`)?`#f59e0b`:`#8b5cf6`,style:{borderRadius:6,border:`none`,padding:`2px 10px`,fontSize:12},children:f.label}),n.length>1&&(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#94a3b8`},children:[i+1,` / `,n.length]})]}),(0,$.jsx)(X,{type:`primary`,onClick:l,style:{borderRadius:10,fontWeight:600,height:38,background:f.gradient,border:`none`,paddingLeft:28,paddingRight:28,boxShadow:`0 6px 16px ${f.gradient.includes(`#6366f1`)?`rgba(99,102,241,0.3)`:f.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?f.gradient.includes(`#6366f1`)?`#6366f1`:f.gradient.includes(`#f59e0b`)?`#f59e0b`:`#8b5cf6`:`#e2e8f0`,transition:`all 0.3s ease`}},t))})]})]}),(0,$.jsx)(`style`,{children:` + `]:{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%`}}}},u0=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:`rtl`}}},d0=e=>{let{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:{...Ul(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`}}}},f0=Ql(`Upload`,e=>{let{fontSizeHeading3:t,marginXS:n,lineWidth:r,pictureCardSize:i,calc:a}=e,o=dc(e,{uploadThumbnailSize:a(t).mul(2).equal(),uploadProgressOffset:a(a(n).div(2)).add(r).equal(),uploadPicCardSize:i});return[d0(o),a0(o),c0(o),l0(o),o0(o),s0(o),u0(o),Gh(o)]},e=>({actionsColor:e.colorIcon,pictureCardSize:e.controlHeightLG*2.55})),p0=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 m0(){return m0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,m0({},e,{ref:t,icon:p0.default}))),g0=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 _0(){return _0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,_0({},e,{ref:t,icon:g0.default}))),v0=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 y0(){return y0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,y0({},e,{ref:t,icon:v0.default})));function x0(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=pa(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 w0(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 T0=(e=``)=>{let t=e.split(`/`),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[``])[0]},E0=e=>e.indexOf(`image/`)===0,D0=e=>{if(e.type&&!e.thumbUrl)return E0(e.type);let t=e.thumbUrl||e.url||``,n=T0(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)},O0=200;function k0(e){return new Promise(t=>{if(!e.type||!E0(e.type)){t(``);return}let n=document.createElement(`canvas`);n.width=O0,n.height=O0,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${O0}px; height: ${O0}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=O0,s=O0,c=0,l=0;e>a?(s=O0/e*a,l=-(s-o)/2):(o=O0/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 A0=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 j0(){return j0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,j0({},e,{ref:t,icon:A0.default}))),N0=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(k$,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(M0,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(NW,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(ga),ee=W(),G=S.createElement(`div`,{className:N,style:i?.item},M,V,L,U,k&&S.createElement(Od,{motionName:`${ee}-fade`,visible:D===`uploading`,motionDeadline:2e3},({className:t})=>{let n=`percent`in s?S.createElement(gq,{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)})),te=s.response&&typeof s.response==`string`?s.response:s.error?.statusText||s.error?.message||a.uploadError,ne=D===`error`?S.createElement(Cw,{title:te,getPopupContainer:e=>e.parentNode},G):G;return S.createElement(`div`,{className:J(`${e}-list-item-container`,t),style:n,ref:T},f?f(ne,s,c,{download:C.bind(null,s),preview:x.bind(null,s),remove:w.bind(null,s)}):ne)}),P0=S.forwardRef((e,t)=>{let{listType:n=`text`,previewFile:r=k0,onPreview:i,onDownload:a,onRemove:o,locale:s,iconRender:c,isImageUrl:l=D0,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]=mf(),[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(b0,null):S.createElement(h0,null);return t?r:i}return t?S.createElement(Xm,null):S.createElement(lre,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(u_,{...a,icon:um(e,{...e.props,onClick:()=>{}})}):S.createElement(u_,{...a},S.createElement(`span`,null,e))};S.useImperativeHandle(t,()=>({handlePreview:j,handleDownload:M}));let{getPrefixCls:I}=S.useContext(ga),L=I(`upload`,u),R=I(),z=J(`${L}-list`,`${L}-list-${n}`,T?.list),B=S.useMemo(()=>gi(_h(R),[`onAppearEnd`,`onEnterEnd`,`onLeaveEnd`]),[R]),V={...A?{}:B,motionDeadline:2e3,motionName:`${L}-${A?`animate-inline`:`animate`}`,keys:pa(d.map(e=>({key:e.uid,file:e}))),motionAppear:O};return S.createElement(`div`,{className:z,style:E?.list},S.createElement(Dd,{...V,component:!1},({key:e,file:t,className:r,style:i})=>S.createElement(N0,{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(Od,{...V,visible:x,forceRender:!0},({className:e,style:t})=>um(b,n=>({className:J(n.className,e),style:{...t,pointerEvents:e?`none`:void 0,...n.style}}))))}),F0=`__LIST_IGNORE_${Date.now()}__`,I0=S.forwardRef((e,t)=>{let n=ya(`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(hm),I=p??F,L=e.customRequest||n.customRequest,[R,z]=Gn(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=pa(t),i=!1;T===1?r=r.slice(-1):T&&(i=r.length>T,r=r.slice(0,T)),(0,Vi.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,Vi.flushSync)(()=>{u?.(a)})},G=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[F0],e===F0)return Object.defineProperty(t,F0,{value:!0,configurable:!0}),!1;nf(e)&&(i=e)}return i},te=e=>{let t=e.filter(e=>!e.file[F0]);if(!t.length)return;let n=t.map(e=>x0(e.file)),r=pa(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}ee(i,r)})},ne=(e,t,n)=>{try{typeof e==`string`&&(e=JSON.parse(e))}catch{}if(!C0(t,B))return;let r=x0(t);r.status=`done`,r.percent=100,r.response=e,r.xhr=n,ee(r,S0(r,B))},K=(e,t)=>{if(!C0(t,B))return;let n=x0(t);n.status=`uploading`,n.percent=e.percent,ee(n,S0(n,B),e)},re=(e,t,n)=>{if(!C0(n,B))return;let r=x0(n);r.error=e,r.response=t,r.status=`error`,ee(r,S0(r,B))},ie=e=>{let t;Promise.resolve(typeof a==`function`?a(e):a).then(n=>{if(n===!1)return;let r=w0(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))})},ae=e=>{H(e.type),e.type===`drop`&&d?.(e)};S.useImperativeHandle(t,()=>({onBatchStart:te,onSuccess:ne,onProgress:K,onError:re,fileList:B,upload:U.current,nativeElement:W.current}));let{getPrefixCls:q,direction:oe,className:se,style:ce,classNames:le,styles:ue}=ya(`upload`),de=q(`upload`,v),fe={...e,listType:s,showUploadList:o,type:b,multiple:D,hasControlInside:O,supportServerRender:j,disabled:I},[pe,me]=Cf([le,P],[ue,N],{props:fe}),he={onBatchStart:te,onError:re,onProgress:K,onSuccess:ne,...e,customRequest:L,data:E,multiple:D,action:k,accept:A,supportServerRender:j,prefixCls:de,disabled:I,beforeUpload:G,onChange:void 0,hasControlInside:O};delete he.className,delete he.style,(!x||I)&&delete he.id;let ge=`${de}-wrapper`,[_e,ve]=f0(de,ge),[ye]=Yd(`Upload`,Hd.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(P0,{classNames:pe,styles:me,prefixCls:de,listType:s,items:B,previewFile:f,onPreview:c,onDownload:l,onRemove:ie,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,se,pe.root,{[`${de}-rtl`]:oe===`rtl`,[`${de}-picture-card-wrapper`]:s===`picture-card`,[`${de}-picture-circle-wrapper`]:s===`picture-circle`}),Ae={...me.root},je={...ce,...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`]:oe===`rtl`},pe.trigger);return S.createElement(`span`,{className:ke,ref:W,style:Ae},S.createElement(`div`,{className:e,style:{...je,...me.trigger},onDrop:ae,onDragOver:ae,onDragLeave:ae},S.createElement(i0,{...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(i0,{...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())}),L0=S.forwardRef((e,t)=>{let{style:n,height:r,hasControlInside:i=!1,children:a,...o}=e,s={...n,height:r};return S.createElement(I0,{ref:t,hasControlInside:i,...o,style:s,type:`drag`},a)}),R0=I0;R0.Dragger=L0,R0.LIST_IGNORE=F0;var z0=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})),B0=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:`页码`}})),V0=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.commonLocale=void 0,e.commonLocale={yearFormat:`YYYY`,dayFormat:`D`,cellMeridiemFormat:`A`,monthBeforeYear:!0}})),H0=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=V0();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:[`开始时间`,`结束时间`]}})),W0=o((e=>{var t=z0().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(H0()),r=t(U0()),i={lang:{placeholder:`请选择日期`,yearPlaceholder:`请选择年份`,quarterPlaceholder:`请选择季度`,monthPlaceholder:`请选择月份`,weekPlaceholder:`请选择周`,rangePlaceholder:[`开始日期`,`结束日期`],rangeYearPlaceholder:[`开始年份`,`结束年份`],rangeMonthPlaceholder:[`开始月份`,`结束月份`],rangeQuarterPlaceholder:[`开始季度`,`结束季度`],rangeWeekPlaceholder:[`开始周`,`结束周`],...n.default},timePickerLocale:{...r.default}};i.lang.ok=`确定`,e.default=i})),G0=o((e=>{var t=z0().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=t(W0()).default})),K0=o((e=>{var t=z0().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(B0()),r=t(G0()),i=t(W0()),a=t(U0()),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:`渐变色`}}})),q0=o(((e,t)=>{t.exports=K0()})),J0=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(wE()):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}))})),Y0=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})),X0=o(((e,t)=>{t.exports=Y0()})),Z0=c(q0(),1);J0();var $=X0(),Q0=Object.defineProperty,$0=Object.getOwnPropertySymbols,e2=Object.prototype.hasOwnProperty,t2=Object.prototype.propertyIsEnumerable,n2=(e,t,n)=>t in e?Q0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,r2=(e,t)=>{for(var n in t||={})e2.call(t,n)&&n2(e,n,t[n]);if($0)for(var n of $0(t))t2.call(t,n)&&n2(e,n,t[n]);return e},i2=(e,t)=>{var n={};for(var r in e)e2.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&$0)for(var r of $0(e))t.indexOf(r)<0&&t2.call(e,r)&&(n[r]=e[r]);return n},a2;(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||={})})(a2||={}),(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||={})})(a2||={});var o2=a2,s2={L:o2.QrCode.Ecc.LOW,M:o2.QrCode.Ecc.MEDIUM,Q:o2.QrCode.Ecc.QUARTILE,H:o2.QrCode.Ecc.HIGH},c2=128,l2=`L`,u2=`#FFFFFF`,d2=`#000000`,f2=!1,p2=1,m2=4,h2=0,g2=.1;function _2(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 v2(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 y2(e,t,n,r){if(r==null)return null;let i=e.length+n*2,a=Math.floor(t*g2),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 b2(e,t){return t==null?e?m2:h2:Math.max(Math.floor(t),0)}function x2({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(...o2.QrSegment.makeSegments(t)),e),[]);return o2.QrCode.encodeSegments(r,s2[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=b2(r,i);return{cells:e,margin:t,numCells:e.length+t*2,calculatedImageSettings:y2(e,o,t,a)}},[c,o,a,r,i]);return{qrcode:c,margin:u,cells:l,numCells:d,calculatedImageSettings:f}}var S2=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),C2=S.forwardRef(function(e,t){let n=e,{value:r,size:i=c2,level:a=l2,bgColor:o=u2,fgColor:s=d2,includeMargin:c=f2,minVersion:l=p2,boostLevel:u,marginSize:d,imageSettings:f}=n,p=i2(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`marginSize`,`imageSettings`]),{style:m}=p,h=i2(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}=x2({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=v2(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,S2?t.fill(new Path2D(_2(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=r2({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`,r2({style:D,height:i,width:i,ref:y,role:`img`},h)),O)});C2.displayName=`QRCodeCanvas`;var w2=S.forwardRef(function(e,t){let n=e,{value:r,size:i=c2,level:a=l2,bgColor:o=u2,fgColor:s=d2,includeMargin:c=f2,minVersion:l=p2,boostLevel:u,title:d,marginSize:f,imageSettings:p}=n,m=i2(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`title`,`marginSize`,`imageSettings`]),{margin:h,cells:g,numCells:_,calculatedImageSettings:v}=x2({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=v2(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=_2(y,h);return S.createElement(`svg`,r2({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)});w2.displayName=`QRCodeSVG`;var T2=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 E2(){return E2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,E2({},e,{ref:t,icon:T2.default}))),O2=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 k2(){return k2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,k2({},e,{ref:t,icon:O2.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:`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 M2(){return M2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,M2({},e,{ref:t,icon:j2.default}))),P2=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(Su,F2({},e,{ref:t,icon:P2.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:`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 R2(){return R2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,R2({},e,{ref:t,icon:L2.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:`M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z`}}]},name:`arrow-right`,theme:`outlined`}}))());function V2(){return V2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,V2({},e,{ref:t,icon:B2.default}))),U2=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 W2(){return W2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,W2({},e,{ref:t,icon:U2.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:`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 q2(){return q2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,q2({},e,{ref:t,icon:K2.default}))),Y2=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 X2(){return X2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,X2({},e,{ref:t,icon:Y2.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:`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 $2(){return $2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,$2({},e,{ref:t,icon:Q2.default}))),t4=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 n4(){return n4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,n4({},e,{ref:t,icon:t4.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:`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 a4(){return a4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,a4({},e,{ref:t,icon:i4.default}))),s4=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 c4(){return c4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,c4({},e,{ref:t,icon:s4.default}))),u4=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 d4(){return d4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,d4({},e,{ref:t,icon:u4.default}))),p4=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 m4(){return m4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,m4({},e,{ref:t,icon:p4.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:`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 _4(){return _4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,_4({},e,{ref:t,icon:g4.default}))),y4=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 b4(){return b4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,b4({},e,{ref:t,icon:y4.default}))),S4=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 C4(){return C4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,C4({},e,{ref:t,icon:S4.default}))),T4=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(Su,E4({},e,{ref:t,icon:T4.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 k4(){return k4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,k4({},e,{ref:t,icon:O4.default}))),j4=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 M4(){return M4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,M4({},e,{ref:t,icon:j4.default}))),P4=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 F4(){return F4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,F4({},e,{ref:t,icon:P4.default}))),L4=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 R4(){return R4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,R4({},e,{ref:t,icon:L4.default}))),B4=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 V4(){return V4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,V4({},e,{ref:t,icon:B4.default}))),U4=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 W4(){return W4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,W4({},e,{ref:t,icon:U4.default}))),K4=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 q4(){return q4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,q4({},e,{ref:t,icon:K4.default}))),Y4=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:`M573 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40zm-280 0c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z`}},{tag:`path`,attrs:{d:`M894 345a343.92 343.92 0 00-189-130v.1c-17.1-19-36.4-36.5-58-52.1-163.7-119-393.5-82.7-513 81-96.3 133-92.2 311.9 6 439l.8 132.6c0 3.2.5 6.4 1.5 9.4a31.95 31.95 0 0040.1 20.9L309 806c33.5 11.9 68.1 18.7 102.5 20.6l-.5.4c89.1 64.9 205.9 84.4 313 49l127.1 41.4c3.2 1 6.5 1.6 9.9 1.6 17.7 0 32-14.3 32-32V753c88.1-119.6 90.4-284.9 1-408zM323 735l-12-5-99 31-1-104-8-9c-84.6-103.2-90.2-251.9-11-361 96.4-132.2 281.2-161.4 413-66 132.2 96.1 161.5 280.6 66 412-80.1 109.9-223.5 150.5-348 102zm505-17l-8 10 1 104-98-33-12 5c-56 20.8-115.7 22.5-171 7l-.2-.1A367.31 367.31 0 00729 676c76.4-105.3 88.8-237.6 44.4-350.4l.6.4c23 16.5 44.1 37.1 62 62 72.6 99.6 68.5 235.2-8 330z`}},{tag:`path`,attrs:{d:`M433 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z`}}]},name:`comment`,theme:`outlined`}}))());function X4(){return X4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,X4({},e,{ref:t,icon:Y4.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:`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 $4(){return $4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,$4({},e,{ref:t,icon:Q4.default}))),t3=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 n3(){return n3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,n3({},e,{ref:t,icon:t3.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:`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 a3(){return a3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,a3({},e,{ref:t,icon:i3.default}))),s3=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 c3(){return c3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,c3({},e,{ref:t,icon:s3.default}))),u3=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 d3(){return d3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,d3({},e,{ref:t,icon:u3.default}))),p3=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 m3(){return m3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,m3({},e,{ref:t,icon:p3.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:`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 _3(){return _3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,_3({},e,{ref:t,icon:g3.default}))),y3=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 b3(){return b3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,b3({},e,{ref:t,icon:y3.default}))),S3=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 C3(){return C3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,C3({},e,{ref:t,icon:S3.default}))),T3=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 E3(){return E3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,E3({},e,{ref:t,icon:T3.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 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 k3(){return k3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,k3({},e,{ref:t,icon:O3.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:`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 M3(){return M3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,M3({},e,{ref:t,icon:j3.default}))),P3=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 F3(){return F3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,F3({},e,{ref:t,icon:P3.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:`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 R3(){return R3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,R3({},e,{ref:t,icon:L3.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:`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 V3(){return V3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,V3({},e,{ref:t,icon:B3.default}))),U3=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 W3(){return W3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,W3({},e,{ref:t,icon:U3.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:`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 q3(){return q3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,q3({},e,{ref:t,icon:K3.default}))),Y3=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(Su,X3({},e,{ref:t,icon:Y3.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:`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 $3(){return $3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,$3({},e,{ref:t,icon:Q3.default}))),t6=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 n6(){return n6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,n6({},e,{ref:t,icon:t6.default}))),i6=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 a6(){return a6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,a6({},e,{ref:t,icon:i6.default}))),s6=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:`M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81zm636.4-353l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5a44.1 44.1 0 0142.2-32.3c7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z`}}]},name:`like`,theme:`outlined`}}))());function c6(){return c6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,c6({},e,{ref:t,icon:s6.default}))),u6=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 d6(){return d6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,d6({},e,{ref:t,icon:u6.default}))),p6=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 m6(){return m6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,m6({},e,{ref:t,icon:p6.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:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M521.7 82c-152.5-.4-286.7 78.5-363.4 197.7-3.4 5.3.4 12.3 6.7 12.3h70.3c4.8 0 9.3-2.1 12.3-5.8 7-8.5 14.5-16.7 22.4-24.5 32.6-32.5 70.5-58.1 112.7-75.9 43.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 32.6 32.5 58.1 70.4 76 112.5C865.7 417.8 875 464.1 875 512c0 47.9-9.4 94.2-27.8 137.8-17.8 42.1-43.4 80-76 112.5s-70.5 58.1-112.7 75.9A352.8 352.8 0 01520.6 866c-47.9 0-94.3-9.4-137.9-27.8A353.84 353.84 0 01270 762.3c-7.9-7.9-15.3-16.1-22.4-24.5-3-3.7-7.6-5.8-12.3-5.8H165c-6.3 0-10.2 7-6.7 12.3C234.9 863.2 368.5 942 520.6 942c236.2 0 428-190.1 430.4-425.6C953.4 277.1 761.3 82.6 521.7 82zM395.02 624v-76h-314c-4.4 0-8-3.6-8-8v-56c0-4.4 3.6-8 8-8h314v-76c0-6.7 7.8-10.5 13-6.3l141.9 112a8 8 0 010 12.6l-141.9 112c-5.2 4.1-13 .4-13-6.3z`}}]},name:`login`,theme:`outlined`}}))());function _6(){return _6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,_6({},e,{ref:t,icon:g6.default}))),y6=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 b6(){return b6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,b6({},e,{ref:t,icon:y6.default}))),S6=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 C6(){return C6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,C6({},e,{ref:t,icon:S6.default}))),T6=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 E6(){return E6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,E6({},e,{ref:t,icon:T6.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:`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 k6(){return k6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,k6({},e,{ref:t,icon:O6.default}))),j6=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 M6(){return M6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,M6({},e,{ref:t,icon:j6.default}))),P6=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 F6(){return F6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,F6({},e,{ref:t,icon:P6.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:`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 R6(){return R6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,R6({},e,{ref:t,icon:L6.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 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 V6(){return V6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,V6({},e,{ref:t,icon:B6.default}))),U6=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:`M304 176h80v672h-80zm408 0h-64c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8z`}}]},name:`pause`,theme:`outlined`}}))());function W6(){return W6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,W6({},e,{ref:t,icon:U6.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:`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 q6(){return q6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,q6({},e,{ref:t,icon:K6.default}))),Y6=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 X6(){return X6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,X6({},e,{ref:t,icon:Y6.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:`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 $6(){return $6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,$6({},e,{ref:t,icon:Q6.default}))),t8=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 n8(){return n8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,n8({},e,{ref:t,icon:t8.default}))),i8=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 a8(){return a8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,a8({},e,{ref:t,icon:i8.default}))),s8=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 c8(){return c8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,c8({},e,{ref:t,icon:s8.default}))),u8=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 d8(){return d8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,d8({},e,{ref:t,icon:u8.default}))),p8=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 m8(){return m8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,m8({},e,{ref:t,icon:p8.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:`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 _8(){return _8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,_8({},e,{ref:t,icon:g8.default}))),y8=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 211.1l-199.2 24c-6.6.8-9.4 8.9-4.7 13.6l59.3 59.3-226 226-101.8-101.7c-6.3-6.3-16.4-6.2-22.6 0L100.3 754.1a8.03 8.03 0 000 11.3l45 45.2c3.1 3.1 8.2 3.1 11.3 0L433.3 534 535 635.7c6.3 6.2 16.4 6.2 22.6 0L829 364.5l59.3 59.3a8.01 8.01 0 0013.6-4.7l24-199.2c.7-5.1-3.7-9.5-8.9-8.8z`}}]},name:`rise`,theme:`outlined`}}))());function b8(){return b8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,b8({},e,{ref:t,icon:y8.default}))),S8=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 C8(){return C8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,C8({},e,{ref:t,icon:S8.default}))),T8=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 E8(){return E8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,E8({},e,{ref:t,icon:T8.default}))),O8=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 k8(){return k8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,k8({},e,{ref:t,icon:O8.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:`M567.1 512l318.5-319.3c5-5 1.5-13.7-5.6-13.7h-90.5c-2.1 0-4.2.8-5.6 2.3l-273.3 274-90.2-90.5c12.5-22.1 19.7-47.6 19.7-74.8 0-83.9-68.1-152-152-152s-152 68.1-152 152 68.1 152 152 152c27.7 0 53.6-7.4 75.9-20.3l90 90.3-90.1 90.3A151.04 151.04 0 00288 582c-83.9 0-152 68.1-152 152s68.1 152 152 152 152-68.1 152-152c0-27.2-7.2-52.7-19.7-74.8l90.2-90.5 273.3 274c1.5 1.5 3.5 2.3 5.6 2.3H880c7.1 0 10.7-8.6 5.6-13.7L567.1 512zM288 370c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80zm0 444c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z`}}]},name:`scissor`,theme:`outlined`}}))());function M8(){return M8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,M8({},e,{ref:t,icon:j8.default}))),P8=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 F8(){return F8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,F8({},e,{ref:t,icon:P8.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:`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 R8(){return R8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,R8({},e,{ref:t,icon:L8.default}))),B8=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 V8(){return V8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,V8({},e,{ref:t,icon:B8.default}))),U8=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 W8(){return W8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,W8({},e,{ref:t,icon:U8.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:`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 q8(){return q8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,q8({},e,{ref:t,icon:K8.default}))),ure=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 Y8(){return Y8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,Y8({},e,{ref:t,icon:ure.default}))),fre=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 X8(){return X8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,X8({},e,{ref:t,icon:fre.default}))),pre=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 Q8(){return Q8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,Q8({},e,{ref:t,icon:pre.default}))),hre=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 $8(){return $8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,$8({},e,{ref:t,icon:hre.default}))),_re=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 e5(){return e5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,e5({},e,{ref:t,icon:_re.default}))),vre=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 n5(){return n5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,n5({},e,{ref:t,icon:vre.default}))),bre=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 r5(){return r5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,r5({},e,{ref:t,icon:bre.default}))),Sre=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 i5(){return i5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,i5({},e,{ref:t,icon:Sre.default}))),Cre=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 o5(){return o5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,o5({},e,{ref:t,icon:Cre.default}))),wre=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 c5(){return c5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,c5({},e,{ref:t,icon:wre.default}))),Ere=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 l5(){return l5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,l5({},e,{ref:t,icon:Ere.default}))),Dre=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 d5(){return d5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,d5({},e,{ref:t,icon:Dre.default}))),kre=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 f5(){return f5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,f5({},e,{ref:t,icon:kre.default}))),Are=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:`M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h.1c3 0 4.4-3.6 2.2-5.6a371.67 371.67 0 00-103.7-65.8c-.4-.2-.8-.3-1.2-.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-.4.2-.8.3-1.2.5-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00137 888.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1a8.1 8.1 0 008.1.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4A171.2 171.2 0 01340.5 349c0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4A171.2 171.2 0 01683.9 349c0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z`}}]},name:`user-add`,theme:`outlined`}}))());function m5(){return m5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,m5({},e,{ref:t,icon:Are.default}))),Mre=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 h5(){return h5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,h5({},e,{ref:t,icon:Mre.default}))),Nre=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 _5(){return _5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,_5({},e,{ref:t,icon:Nre.default}))),Pre=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 y5(){return y5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,y5({},e,{ref:t,icon:Pre.default}))),Fre=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 x5(){return x5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,x5({},e,{ref:t,icon:Fre.default}))),Lre=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 S5(){return S5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,S5({},e,{ref:t,icon:Lre.default}))),Rre=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 w5(){return w5=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,w5({},e,{ref:t,icon:Rre.default}))),E5=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},zre=(e=>e?E5(e):E5),Bre=e=>e;function Vre(e,t=Bre){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 D5=e=>{let t=zre(e),n=e=>Vre(t,e);return Object.assign(n,t),n},O5=(e=>e?D5(e):D5),k5=`AES-GCM`,A5=12,j5=128;function M5(){return typeof window<`u`&&typeof crypto<`u`&&crypto.subtle!==void 0}async function N5(){throw Error(`VITE_ENCRYPTION_KEY not configured`)}async function Hre(e){if(!M5())throw Error(`Encryption not available in non-secure context`);let t=await N5(),n=crypto.getRandomValues(new Uint8Array(A5)),r=new TextEncoder().encode(e),i=await crypto.subtle.encrypt({name:k5,iv:n,tagLength:j5},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 Ure(e){if(!M5())throw Error(`Decryption not available in non-secure context`);let t=await N5(),n=Uint8Array.from(atob(e),e=>e.charCodeAt(0)),r=n.slice(0,A5),i=n.slice(A5),a=await crypto.subtle.decrypt({name:k5,iv:r,tagLength:j5},t,i);return new TextDecoder().decode(a)}var Wre=`http://ceshi.apiforeign.minzhong.cn`,Gre=!1;function Kre(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}function P5(e){return Array.isArray(e)?e.map(P5):typeof e==`object`&&e?Object.fromEntries(Object.entries(e).map(([e,t])=>[Kre(e),P5(t)])):e}function qre(){return localStorage.getItem(`auth_token`)}function F5(e){localStorage.setItem(`auth_token`,e)}function I5(){localStorage.removeItem(`auth_token`)}async function Jre(e){try{return await Ure(e)}catch{return null}}async function L5(e,t={}){let{method:n=`GET`,body:r,auth:i=!0,encryptBody:a=Gre,signal:o,skipAuthRedirect:s}=t,c={"Content-Type":`application/json`};if(i){let e=qre();e&&(c.Authorization=`Bearer ${e}`)}let l;if(r!==void 0){let e=JSON.stringify(r);a?(c[`X-Encrypted`]=`true`,l=JSON.stringify({data:await Hre(e)})):l=e}let u=await fetch(`${Wre}/api${e}`,{method:n,headers:c,body:l,signal:o});if(u.status===204)return;let d=await u.text();if(!d)return;let f;try{f=JSON.parse(d)}catch{throw Error(`响应解析失败 (${u.status})`)}if(f&&typeof f.data==`string`&&a){let e=await Jre(f.data);e!==null&&(f=JSON.parse(e))}if(!u.ok){let e=f?.detail?.message||f?.message||`请求失败 (${u.status})`;throw typeof f?.detail==`string`&&(e=f.detail),u.status===401&&!t.skipAuthRedirect&&(I5(),window.location.href=`/login`),Error(e)}return P5(f)}var R5={get:(e,t=!0)=>L5(e,typeof t==`boolean`?{auth:t}:t),post:(e,t,n=!0,r=!1)=>L5(e,{method:`POST`,body:t,auth:n,skipAuthRedirect:r}),put:(e,t,n=!0)=>L5(e,{method:`PUT`,body:t,auth:n}),delete:(e,t,n=!0)=>L5(e,{method:`DELETE`,body:t,auth:n})};async function Yre(e,t,n,r){let i=await R5.post(`/auth/login`,{username:e,password:t,captcha_token:n,remember_me:r||!1},!1,!0);return F5(i.accessToken),i.user}async function Xre(e,t){let n=await R5.post(`/auth/sms-login`,{phone:e,code:t},!1,!0);return F5(n.accessToken),n.user}async function Zre(e,t,n){let r=await R5.post(`/auth/register`,{phone:e,code:t,password:n},!1);return F5(r.accessToken),r.user}async function Qre(){await R5.post(`/auth/logout`),I5()}async function z5(){try{return await R5.get(`/auth/me`)}catch{return null}}async function B5(e,t){await R5.post(`/auth/change-password`,{old_password:e,new_password:t})}async function $re(){return R5.get(`/projects`)}async function eie(e,t){return R5.post(`/projects`,{name:e,industry:t})}async function tie(e){await R5.delete(`/projects/${e}`)}async function V5(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)),R5.get(`/generation-records?${r.toString()}`,{signal:e.signal})}async function nie(e,t){return R5.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 H5(e,t){let n=new FormData;n.append(`file`,e);let r=localStorage.getItem(`auth_token`),i=typeof t==`number`&&t>0?`?duration_seconds=${encodeURIComponent(String(t))}`:``,a=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/generation-records/upload-audio${i}`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!a.ok)throw Error(`音频上传失败`);return await a.json()}async function U5(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(`图片上传失败`);return await r.json()}async function W5(e,t){let n=new FormData;n.append(`file`,e);let r=localStorage.getItem(`auth_token`),i=typeof t==`number`&&t>0?`?duration_seconds=${encodeURIComponent(String(t))}`:``,a=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/generation-records/upload-video${i}`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!a.ok)throw Error(`视频上传失败`);return await a.json()}function rie(e,t){return`${`http://ceshi.apiforeign.minzhong.cn/api${e}`}${typeof t==`number`&&t>0?`?duration_seconds=${encodeURIComponent(String(t))}`:``}`}async function G5(e,t,n,r=`素材上传失败`){let i=new FormData;i.append(`file`,t);let a=localStorage.getItem(`auth_token`),o=await fetch(rie(e,n),{method:`POST`,headers:a?{Authorization:`Bearer ${a}`}:{},body:i});if(!o.ok)throw Error(r);return await o.json()}async function iie(e){return G5(`/private-portrait/uploads/image`,e,void 0,`真人图片素材上传失败`)}async function aie(e,t){return G5(`/private-portrait/uploads/video`,e,t,`真人视频素材上传失败`)}async function oie(e){return G5(`/private-portrait/virtual/uploads/image`,e,void 0,`虚拟图片素材上传失败`)}async function sie(e,t){return G5(`/private-portrait/virtual/uploads/video`,e,t,`虚拟视频素材上传失败`)}async function cie(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/hot-opening-replications/upload-image`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok)throw Error(`图片上传失败`);return await r.json()}async function lie(e,t){let n=new FormData;n.append(`file`,e);let r=localStorage.getItem(`auth_token`),i=typeof t==`number`&&t>0?`?duration_seconds=${encodeURIComponent(String(t))}`:``,a=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/hot-opening-replications/upload-video${i}`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!a.ok)throw Error(`视频上传失败`);return await a.json()}async function uie(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/shot-replications/upload-image`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok)throw Error(`图片上传失败`);return await r.json()}async function die(e,t){let n=new FormData;n.append(`file`,e);let r=localStorage.getItem(`auth_token`),i=typeof t==`number`&&t>0?`?duration_seconds=${encodeURIComponent(String(t))}`:``,a=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/shot-replications/upload-video${i}`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!a.ok)throw Error(`视频上传失败`);return await a.json()}async function K5(e){await R5.post(`/generation-records/delete-file?url=${encodeURIComponent(e)}`)}async function fie(e,t){await R5.put(`/generation-records/${e}/prompt`,{optimized_prompt:t})}async function pie(e,t){return R5.post(`/generation-records/${e}/generate`,{aspect_ratio:t.aspectRatio,resolution:t.resolution})}async function q5(e=1,t=20){let n=new URLSearchParams;return n.set(`page`,String(e)),n.set(`page_size`,String(t)),R5.get(`/credits?${n.toString()}`)}async function J5(){return R5.get(`/auth/site-info`,!1)}async function mie(){return R5.get(`/video-engines`)}async function hie(){return R5.get(`/image-engines`)}async function Y5(e,t){await R5.post(`/sms/send`,{phone:e,scene:t},!1)}async function X5(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)),R5.get(`/notifications?${r.toString()}`)}async function Z5(){return(await R5.get(`/notifications/unread-count`)).count}async function Q5(e){await R5.put(`/notifications/${e}/read`)}async function $5(){return(await R5.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 gie(){return R5.get(`/menu-configs`)}async function _ie(){return R5.get(`/recharge-packages`)}async function vie(){return R5.get(`/payments/methods`)}async function yie(e,t=`wechat`){return R5.post(`/payments/recharge`,{plan:e,method:t})}async function bie(e=1,t=20){let n=new URLSearchParams;return n.set(`page`,String(e)),n.set(`page_size`,String(t)),R5.get(`/payments/orders?${n.toString()}`)}async function e7(e){return R5.get(`/payments/orders/${e}`)}async function t7(e){return R5.post(`/payments/orders/${e}/cancel`)}async function xie(){return R5.get(`/credits/ratios`)}async function n7(){return R5.get(`/generation-ai/engines`)}async function Sie(e){return R5.post(`/generation-ai/tasks`,e)}async function r7(e){return R5.get(`/generation-ai/tasks?page=`+e.page+`&page_size=`+e.pageSize)}async function Cie(e){return R5.get(`/generation-ai/history`+e)}async function i7(e){return R5.get(`/generation-ai/history/`+e)}async function wie(e){await R5.delete(`/generation-ai/tasks/${e}`)}async function Tie(){return R5.get(`/credits/credit-ratios`)}async function Eie(e){return R5.post(`/hot-opening-replications/tasks`,e)}async function a7(e,t,n){let r=`/hot-opening-replications/tasks?page=${e}&page_size=${t}`;return n&&(r+=`&keyword=${encodeURIComponent(n)}`),R5.get(r)}async function o7(e){return R5.get(`/hot-opening-replications/tasks/${e}`)}async function Die(e,t){return R5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-image-prompt`)}async function Oie(e,t,n){return R5.put(`/hot-opening-replications/tasks/${e}/steps/${t}/image-prompt`,n)}async function s7(e,t,n){return R5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-image`,n)}async function kie(e,t,n){return R5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-video-prompt`,n)}async function c7(e,t,n){return R5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-video`,n)}async function l7(e){return R5.post(`/user-oauth/request_oauth`,e)}async function Aie(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),R5.get(`/user-oauth/juliang_callback?${t.toString()}`)}async function u7(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)),R5.get(`/user-oauth/oauth_list?${t.toString()}`)}async function d7(e){let t=new URLSearchParams;return e.platform&&t.set(`platform`,e.platform),e.page!==void 0&&t.set(`page`,String(e.page)),e.pageSize!==void 0&&t.set(`page_size`,String(e.pageSize)),R5.get(`/pre-test-template/list?${t.toString()}`)}async function jie(e){return R5.post(`/pre-test-template/create`,e)}async function f7(e){return R5.get(`/pre-test-template/select/${e}`)}async function Mie(e,t){return R5.post(`/pre-test-template/update/${e}`,t)}async function Nie(e){return R5.get(`/pre-test-template/delete/${e}`)}async function p7(){return R5.get(`/pre-test-template/default`)}async function Pie(e,t,n){return R5.put(`/hot-opening-replications/tasks/${e}/steps/${t}/video-prompt-schema`,n)}async function Fie(e){return R5.post(`/shot-replications/task-sets`,e)}async function m7(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 R5.get(r)}async function h7(e){return R5.get(`/shot-replications/task-sets/${e}`)}async function Iie(e,t){return R5.post(`/shot-replications/task-sets/${e}/split-by-ai`,t)}async function Lie(e,t){return R5.post(`/shot-replications/task-sets/${e}/split-custom`,t)}async function g7(e){return R5.get(`/shot-replications/task-sets/${e}/segments`)}async function Rie(e,t){return R5.post(`/shot-replications/segments/${e}/replication-projects`,t)}async function _7(e){return R5.get(`/shot-replications/projects/${e}`)}async function zie(e,t){return R5.post(`/shot-replications/projects/${e}/steps/${t}/generate-image-prompt`)}async function Bie(e,t,n){return R5.put(`/shot-replications/projects/${e}/steps/${t}/image-prompt`,n)}async function Vie(e,t,n){return R5.put(`/shot-replications/projects/${e}/steps/${t}/video-prompt-schema`,n)}async function v7(e,t,n){return R5.post(`/shot-replications/projects/${e}/steps/${t}/generate-image`,n)}async function Hie(e,t,n){return R5.post(`/shot-replications/projects/${e}/steps/${t}/generate-video-prompt`,n)}async function y7(e,t,n){return R5.post(`/shot-replications/projects/${e}/steps/${t}/generate-video`,n)}async function Uie(e){return R5.post(`/shot-replications/task-sets/${e}/reanalyze`)}async function Wie(e){await R5.delete(`/shot-replications/segments/${e}`)}async function Gie(e){return R5.post(`/shot-replications/segments/${e}/reanalyze`)}async function Kie(e){return R5.post(`/shot-replications/segments/${e}/retry-split`)}async function qie(e){await R5.delete(`/shot-replications/task-sets/${e}`)}async function Jie(e){await R5.delete(`/hot-opening-replications/tasks/${e}`)}async function b7(e){let t=new URLSearchParams;return e?.level&&t.set(`level`,e.level),e?.parent_code&&t.set(`parent_code`,e.parent_code),R5.get(`/pre-test-template/getArea?${t.toString()}`)}async function Yie(e){return R5.post(`/upload-material/async-batch-upload`,e)}async function Xie(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 R5.get(`/upload-material/upload-history${n?`?${n}`:``}`)}async function x7(e){return R5.post(`/upload-material/batch-update-filename`,e)}async function Zie(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)),R5.get(`/material-consumption/list?${t.toString()}`)}async function Qie(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.date&&t.set(`date`,e.date),R5.get(`/material-consumption/sync?${t.toString()}`)}async function S7(){return R5.get(`/material-consumption/fields`)}async function $ie(e){return R5.post(`/contact/request`,e)}async function eae(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)),R5.get(`/resources-material/list?${t.toString()}`)}async function tae(e){return R5.get(`/recent-generations?limit=${e}&modules=project&modules=chat_ai&modules=hot_opening_replicate&modules=shot_replicate`)}async function C7(){return R5.get(`/open-type/open_type_all`)}async function nae(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.oauth_id&&t.set(`oauth_id`,e.oauth_id),e.advertiser_name&&t.set(`advertiser_name`,e.advertiser_name),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),R5.get(`/oauth-account/list?${t.toString()}`)}async function rae(e){let t=new URLSearchParams;return e.id&&t.set(`id`,e.id),R5.get(`/oauth-account/delete?${t.toString()}`)}async function iae(){return R5.post(`/upload-material/oauth_account_list`)}async function aae(e){return R5.post(`/resources-material/pre-commit`,e)}async function oae(){return R5.get(`/home-materials/categories`)}async function w7(e,t=10){return R5.get(`/home-materials?category_id=${e}&limit_per_category=${t}&include_empty_categories=false&response_mode=grouped&page=1&page_size=20`)}async function T7(e){return R5.delete(`/generation-ai/history/batch`,e)}function E7(e={}){let t=new URLSearchParams;e.resourceType&&t.set(`resource_type`,e.resourceType),e.page&&t.set(`page`,String(e.page)),e.pageSize&&t.set(`page_size`,String(e.pageSize)),e.keyword&&t.set(`keyword`,e.keyword),e.scene&&t.set(`scene`,e.scene);let n=t.toString();return n?`?${n}`:``}async function D7(e={}){return R5.get(`/upload-resources/history${E7(e)}`)}async function O7(e,t={}){return R5.get(`/upload-resources/history/${e}${E7(t)}`)}async function sae(e){return R5.delete(`/upload-resources/history/batch`,{resource_ids:e})}async function cae(){return R5.get(`/private-portrait/config`)}async function k7(e={}){let t=new URLSearchParams;return t.set(`page`,String(e.page||1)),t.set(`page_size`,String(e.pageSize||20)),e.keyword&&t.set(`keyword`,e.keyword),e.status&&t.set(`status`,e.status),R5.get(`/private-portrait/projects?${t.toString()}`)}async function lae(e){return R5.post(`/private-portrait/projects`,{name:e.name,description:e.description||null,callback_redirect_url:e.callbackRedirectUrl||null})}async function uae(e){await R5.delete(`/private-portrait/projects/${e}`)}async function dae(e){return R5.get(`/private-portrait/validate-sessions/${e}`)}async function fae(e,t){return R5.post(`/private-portrait/projects/${e}/assets`,{url:t.url,asset_type:t.assetType||`Image`,name:t.name||null,video_duration:t.videoDuration??null,video_cover_url:t.videoCoverUrl||null,file_size:t.fileSize??null,mime_type:t.mimeType||null,upload_resource_id:t.uploadResourceId||null})}async function pae(e,t={}){let n=new URLSearchParams;return n.set(`page`,String(t.page||1)),n.set(`page_size`,String(t.pageSize||20)),t.status&&n.set(`status`,t.status),t.keyword&&n.set(`keyword`,t.keyword),t.assetType&&n.set(`asset_type`,t.assetType),R5.get(`/private-portrait/projects/${e}/assets?${n.toString()}`)}async function mae(e){await R5.delete(`/private-portrait/assets/${e}`)}async function hae(e={}){let t=new URLSearchParams;return t.set(`page`,String(e.page||1)),t.set(`page_size`,String(e.pageSize||20)),e.projectId&&t.set(`project_id`,e.projectId),e.keyword&&t.set(`keyword`,e.keyword),e.assetType&&t.set(`asset_type`,e.assetType),R5.get(`/private-portrait/selectable-assets?${t.toString()}`)}async function gae(){return R5.get(`/private-portrait/virtual/config`)}async function A7(e={}){let t=new URLSearchParams;return t.set(`page`,String(e.page||1)),t.set(`page_size`,String(e.pageSize||20)),e.keyword&&t.set(`keyword`,e.keyword),e.status&&t.set(`status`,e.status),R5.get(`/private-portrait/virtual-projects?${t.toString()}`)}async function _ae(e){return R5.post(`/private-portrait/virtual-projects`,{name:e.name,description:e.description||null})}async function vae(e){await R5.delete(`/private-portrait/virtual-projects/${e}`)}async function yae(e,t){return R5.post(`/private-portrait/virtual-projects/${e}/assets`,{url:t.url,asset_type:t.assetType||`Image`,name:t.name||null,video_duration:t.videoDuration??null,video_cover_url:t.videoCoverUrl||null,file_size:t.fileSize??null,mime_type:t.mimeType||null,upload_resource_id:t.uploadResourceId||null})}async function bae(e,t={}){let n=new URLSearchParams;return n.set(`page`,String(t.page||1)),n.set(`page_size`,String(t.pageSize||20)),t.status&&n.set(`status`,t.status),t.keyword&&n.set(`keyword`,t.keyword),t.assetType&&n.set(`asset_type`,t.assetType),R5.get(`/private-portrait/virtual-projects/${e}/assets?${n.toString()}`)}async function xae(e){await R5.delete(`/private-portrait/virtual-assets/${e}`)}async function Sae(e={}){let t=new URLSearchParams;return t.set(`page`,String(e.page||1)),t.set(`page_size`,String(e.pageSize||20)),e.projectId&&t.set(`project_id`,e.projectId),e.keyword&&t.set(`keyword`,e.keyword),e.assetType&&t.set(`asset_type`,e.assetType),R5.get(`/private-portrait/virtual-selectable-assets?${t.toString()}`)}async function Cae(){return R5.get(`/team/managed`)}async function wae(e=1,t=20){let n=new URLSearchParams;return n.set(`page`,String(e)),n.set(`page_size`,String(t)),R5.get(`/team/members?${n.toString()}`)}async function Tae(e,t,n=`increase`,r){await R5.post(`/team/members/${e}/credits`,{target_user_id:e,amount:t,direction:n,description:r||null})}async function Eae(){return R5.get(`/team/invitations`)}async function Dae(e,t){return R5.post(`/team/invitations`,{max_uses:e||null,expires_at:t||null})}async function Oae(e){await R5.delete(`/team/invitations/${e}`)}async function kae(e){let t=e?`/team/join-requests?status=${e}`:`/team/join-requests`;return R5.get(t)}async function Aae(e,t,n){await R5.post(`/team/join-requests/${e}`,{action:t,note:n||null})}async function jae(e){return R5.get(`/team/join-info?code=${encodeURIComponent(e)}`,{auth:!0,skipAuthRedirect:!0})}async function Mae(e){return R5.get(`/team/join-info/public?code=${encodeURIComponent(e)}`,!1)}async function Nae(e){await R5.post(`/team/join`,{invitation_code:e})}async function Pae(e){let t=new URLSearchParams;return 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.phone&&t.set(`phone`,e.phone),e.recordType&&t.set(`record_type`,e.recordType),e.startDate&&t.set(`start_date`,e.startDate),e.endDate&&t.set(`end_date`,e.endDate),R5.get(`/team/credit-records?${t.toString()}`)}function Fae(e){let t=new URLSearchParams;return e.phone&&t.set(`phone`,e.phone),e.recordType&&t.set(`record_type`,e.recordType),e.startDate&&t.set(`start_date`,e.startDate),e.endDate&&t.set(`end_date`,e.endDate),`http://ceshi.apiforeign.minzhong.cn/api/team/credit-records/export?${t.toString()}`}var j7=O5(e=>({user:null,loading:!0,login:async(t,n,r,i)=>{e({user:await Yre(t,n,r,i)})},logout:async()=>{await Qre(),e({user:null})},checkAuth:async()=>{try{if(!localStorage.getItem(`auth_token`)){e({user:null,loading:!1});return}e({user:await z5(),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 B5(e,t)},refreshUser:async()=>{try{e({user:await z5()})}catch(e){console.error(`Failed to refresh user:`,e)}},setUserCredits:t=>{e(e=>e.user?{user:{...e.user,credits:t}}:{})}})),M7={system:{gradient:`linear-gradient(135deg, #6366f1, #818cf8)`,icon:(0,$.jsx)(s5,{}),label:`系统通知`},credit:{gradient:`linear-gradient(135deg, #f59e0b, #fbbf24)`,icon:(0,$.jsx)(t5,{}),label:`积分通知`},promo:{gradient:`linear-gradient(135deg, #8b5cf6, #a78bfa)`,icon:(0,$.jsx)(N3,{}),label:`活动通知`}},Iae=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),o=j7(e=>e.refreshUser),s=j7(e=>e.setUserCredits),c=(0,S.useCallback)(async()=>{try{let n=await X5(1,20,!1),i=n.items||[],o=n?.credits?.balance;if(typeof o==`number`){let e=j7.getState().user;e&&e.credits!==o&&s(o)}r(i),i.length>0&&!e&&(t(!0),a(0))}catch{}},[e,s]);(0,S.useEffect)(()=>{c();let e=setInterval(c,3e4);return()=>clearInterval(e)},[]);let l=async()=>{let e=n[i];if(e)try{await Q5(e.id)}catch{}if(i{let e=n[i];if(e)try{await Q5(e.id)}catch{}t(!1),r([]),a(0)};if(!e||n.length===0)return null;let d=n[i],f=M7[d.type]||M7.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:u,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:f.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:f.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:d.title})]})]}),(0,$.jsx)(`div`,{onClick:u,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)(ju,{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:d.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)(h$,{color:f.gradient.includes(`#6366f1`)?`#6366f1`:f.gradient.includes(`#f59e0b`)?`#f59e0b`:`#8b5cf6`,style:{borderRadius:6,border:`none`,padding:`2px 10px`,fontSize:12},children:f.label}),n.length>1&&(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#94a3b8`},children:[i+1,` / `,n.length]})]}),(0,$.jsx)(X,{type:`primary`,onClick:l,style:{borderRadius:10,fontWeight:600,height:38,background:f.gradient,border:`none`,paddingLeft:28,paddingRight:28,boxShadow:`0 6px 16px ${f.gradient.includes(`#6366f1`)?`rgba(99,102,241,0.3)`:f.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?f.gradient.includes(`#6366f1`)?`#6366f1`:f.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); } } - `})]})},P7=({data:e})=>{if(!e)return null;let t=(e.limitUnit||`GB`).toUpperCase(),n=t===`GB`?1024**3:t===`MB`?1024**2:1024,r=Number(e.usagePercent)||0,i=Math.min(100,Math.max(0,r)),a=e.limitValue?parseFloat(e.limitValue):e.totalBytes/n,o=a*r/100;a-o;let s=e.exceeded||r>=100,c=1024**2,l=1024**3,u=1024**4,d=(e=>{let t=Number(e)||0;return t>=u?{val:(t/u).toFixed(2),unit:`TB`}:t>=l?{val:(t/l).toFixed(2),unit:`GB`}:t>=c?{val:(t/c).toFixed(2),unit:`MB`}:{val:(t/1024).toFixed(2),unit:`KB`}})(e.usedBytes);return(0,$.jsxs)(`div`,{style:{padding:`0 12px`,paddingTop:6,borderRadius:10,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)`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:6,fontSize:12,color:`#475569`},children:e.enabled?(0,$.jsx)($.Fragment,{}):(0,$.jsxs)(`span`,{style:{fontWeight:500,color:`#1e293b`},children:[(0,$.jsx)(f3,{style:{fontSize:12,color:s?`#ef4444`:`#6366f1`,marginRight:4}}),`当前使用 `,d.val,` `,d.unit]})}),e.enabled&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{marginTop:4,display:`flex`,justifyContent:`space-between`,fontSize:11,color:s?`#ef4444`:`#94a3b8`},children:(0,$.jsxs)(`div`,{style:{height:`100%`,width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:6,fontSize:12,color:`#000000ff`,padding:`0 8px`},children:[(0,$.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(f3,{style:{fontSize:12,color:`#000000ff`}}),r.toFixed(1),`%`]}),e.enabled?(0,$.jsxs)(`span`,{style:{fontWeight:500,color:`#000000ff`},children:[o.toFixed(2),` / `,a.toFixed(2),` `,t]}):(0,$.jsxs)(`span`,{style:{fontWeight:500,color:`#1e293b`},children:[`当前使用 `,d.val,` `,d.unit]})]})}),(0,$.jsx)(`div`,{style:{width:`100%`,height:6,background:`#e2e8f0`,borderRadius:50,overflow:`hidden`,position:`relative`},children:(0,$.jsx)(`div`,{style:{width:`${i}%`,height:`100%`,background:r<50?`linear-gradient(90deg, #279951, #b7fad0)`:r<85?`linear-gradient(90deg, #ffd759, #fff6d4)`:`linear-gradient(90deg, #ef4444, #dc2626)`,borderRadius:2,transition:`width 0.4s ease`}})})]})]})},F7={HomeOutlined:(0,$.jsx)(J3,{}),DashboardOutlined:(0,$.jsx)(l3,{}),CodeOutlined:(0,$.jsx)(G4,{}),PlayCircleOutlined:(0,$.jsx)(l8,{}),WalletOutlined:(0,$.jsx)(b5,{}),SettingOutlined:(0,$.jsx)(z8,{}),BellOutlined:(0,$.jsx)(o4,{}),UserOutlined:(0,$.jsx)(g5,{}),AppstoreOutlined:(0,$.jsx)(N2,{}),FileTextOutlined:(0,$.jsx)(jH,{}),StarOutlined:(0,$.jsx)(t5,{}),HeartOutlined:(0,$.jsx)(z3,{}),CameraOutlined:(0,$.jsx)(x4,{}),RobotOutlined:(0,$.jsx)(w8,{}),CalculatorOutlined:(0,$.jsx)(v4,{}),DollarOutlined:(0,$.jsx)(h3,{}),GiftOutlined:(0,$.jsx)(N3,{}),ThunderboltOutlined:(0,$.jsx)(s5,{}),FireOutlined:(0,$.jsx)(D3,{}),CloudOutlined:(0,$.jsx)(I4,{}),SmileOutlined:(0,$.jsx)(Z8,{}),TrophyOutlined:(0,$.jsx)(u5,{}),RocketOutlined:(0,$.jsx)(D8,{}),BulbOutlined:(0,$.jsx)(h4,{}),PictureOutlined:(0,$.jsx)(e8,{}),VideoCameraOutlined:(0,$.jsx)(v5,{}),AudioOutlined:(0,$.jsx)(J2,{}),MailOutlined:(0,$.jsx)(w6,{}),PhoneOutlined:(0,$.jsx)(Z6,{}),GlobalOutlined:(0,$.jsx)(I3,{}),ShoppingCartOutlined:(0,$.jsx)(H8,{}),TeamOutlined:(0,$.jsx)(a5,{}),BarChartOutlined:(0,$.jsx)(r4,{}),PieChartOutlined:(0,$.jsx)(r8,{}),LineChartOutlined:(0,$.jsx)(f6,{}),SecurityScanOutlined:(0,$.jsx)(I8,{}),ApiOutlined:(0,$.jsx)(A2,{}),DatabaseOutlined:(0,$.jsx)(f3,{}),CloudServerOutlined:(0,$.jsx)(z4,{})},Iae=240,I7=[{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(Zq,{})},{gradient:`linear-gradient(135deg, #4a5568, #2d3748)`,shadow:`rgba(74,85,104,0.25)`,icon:(0,$.jsx)(w3,{})},{gradient:`linear-gradient(135deg, #718096, #4a5568)`,shadow:`rgba(113,128,150,0.25)`,icon:(0,$.jsx)(r3,{})},{gradient:`linear-gradient(135deg, #5a67d8, #434190)`,shadow:`rgba(90,103,216,0.25)`,icon:(0,$.jsx)(Z2,{})}],Lae=()=>{let e=Ye(),t=Ke(),{user:n,logout:r}=M7(),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u]=bU.useForm(),[d,f]=(0,S.useState)(null),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)([]),[_,v]=(0,S.useState)(0),[y,b]=(0,S.useState)(!1),[x,C]=(0,S.useState)(!1),[w]=bU.useForm(),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(()=>({x:24,y:window.innerHeight*.75})),[k,A]=(0,S.useState)(!1),j=(0,S.useRef)(!1),M=(0,S.useRef)({x:0,y:0}),[N,P]=(0,S.useState)({}),[F,I]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteName||``;return t&&(document.title=t),t}),[L,R]=(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}),[z,B]=(0,S.useState)(!localStorage.getItem(`siteInfo`)),[V,H]=(0,S.useState)(!1),[U,W]=(0,S.useState)(null),[ee,G]=(0,S.useState)(`alipay`),[te,ne]=(0,S.useState)(!1),[K,re]=(0,S.useState)(180),ie=(0,S.useRef)(null),ae=(0,S.useRef)(null),q=(0,S.useRef)(null),[oe,se]=(0,S.useState)({alipay:!1,wechat:!1}),[ce,le]=(0,S.useState)(null),[ue,de]=(0,S.useState)(!1),[fe,pe]=(0,S.useState)(``),me=`pending_payment_order`;(0,S.useEffect)(()=>{J5().then(e=>{let t=e.siteName||`民众智创`,n=e.siteLogo||``;if(t!==F&&(I(t),document.title=t),n&&n!==L){R(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`}e.operationManual&&pe(e.operationManual),localStorage.setItem(`siteInfo`,JSON.stringify({siteName:t,siteLogo:n}))}).catch(()=>{}),z5().then(e=>{let t=e?.resourceCapacity;t&&le({enabled:!!t.enabled,usedBytes:Number(t.usedBytes)||0,totalBytes:Number(t.totalBytes)||0,availableBytes:Number(t.availableBytes)||0,usagePercent:Number(t.usagePercent)||0,exceeded:!!t.exceeded,limitValue:t.limitValue??``,limitUnit:t.limitUnit||`GB`})}).catch(e=>{})},[]),(0,S.useEffect)(()=>{let e=()=>de(window.innerWidth<=767);return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let he=e=>{e.button===0&&(A(!0),j.current=!1,M.current={x:e.clientX,y:e.clientY})},ge=e=>{if(!k)return;let t=Math.abs(e.clientX-M.current.x),n=Math.abs(e.clientY-M.current.y);(t>5||n>5)&&(j.current=!0);let r=Math.max(60,Math.min(window.innerHeight-60,e.clientY-(M.current.y-D.y)));O(e=>({x:e.x,y:r}))},_e=()=>{let e=j.current;A(!1),j.current=!1,e||l(!0)};(0,S.useEffect)(()=>{if(k)return document.addEventListener(`mousemove`,ge),document.addEventListener(`mouseup`,_e),()=>{document.removeEventListener(`mousemove`,ge),document.removeEventListener(`mouseup`,_e)}},[k]);let ve=()=>{Z5().then(e=>{v(e)}).catch(()=>{})};(0,S.useEffect)(()=>{(async()=>{let e=localStorage.getItem(me);if(e)try{let t=JSON.parse(e),n=await e7(t.orderNo);if(n.status===`pending`){W({price:t.price,credits:t.credits,qrCode:t.qrCode,method:t.method}),q.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?(H(!0),Ae(t.orderNo,a)):localStorage.removeItem(me)}else n.status===`paid`?(Z.success(`支付成功!积分已到账`),M7.getState().refreshUser(),localStorage.removeItem(me)):localStorage.removeItem(me)}catch{localStorage.removeItem(me)}})()},[]),(0,S.useEffect)(()=>{gie().then(e=>{m(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),_ie().then(e=>{g(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),vie().then(e=>{se(e),e.alipay?G(`alipay`):e.wechat&&G(`wechat`)}).catch(()=>{}),ve()},[n]);let ye=t.pathname.startsWith(`/records`)?`/records`:t.pathname,be=Iae,xe={};p.forEach(e=>{let t=e.parent_id??e.parentId;t&&(xe[t]||(xe[t]=[]),xe[t].push(e))});let Se=p.filter(e=>!(e.parent_id??e.parentId));Se.sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0)),Object.keys(xe).forEach(e=>{xe[e].sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0))});let Ce=t=>{let n=t.menu_type??t.menuType,r=xe[t.id]&&xe[t.id].length>0;n===`group`||r?P(e=>({...e,[t.id]:!e[t.id]})):t.path&&(e(t.path),b(!1))},we=[{key:`profile`,icon:(0,$.jsx)(g5,{}),label:`账号: ${n?.username}`,disabled:!0},{key:`credits`,icon:(0,$.jsx)(b5,{style:{color:`#c9a96e`}}),label:`积分: ${n?.credits??0}`,disabled:!0},{type:`divider`},...n?.isTeamManager?[{key:`teamManagement`,icon:(0,$.jsx)(a5,{style:{color:`#6366f1`}}),label:`团队管理`}]:[],{key:`myCredits`,icon:(0,$.jsx)(b5,{}),label:`积分明细`},{key:`orderRecords`,icon:(0,$.jsx)(jH,{}),label:`订单记录`},{key:`messages`,icon:(0,$.jsx)(o4,{}),label:`消息中心${_>0?`(${_})`:``}`},...fe?[{key:`manual`,icon:(0,$.jsx)(jH,{}),label:`操作手册`}]:[],{type:`divider`},{key:`changePwd`,icon:(0,$.jsx)(h6,{}),label:`修改密码`},{type:`divider`},{key:`logout`,icon:(0,$.jsx)(x6,{}),label:`退出登录`,danger:!0}],Te=({key:t})=>{t===`logout`?(r(),e(`/login`)):t===`changePwd`?a(!0):t===`messages`?e(`/messages`):t===`recharge`?s(!0):t===`teamManagement`?e(`/team-management`):t===`myCredits`?e(`/user-center?tab=credits`):t===`orderRecords`?e(`/user-center?tab=orders`):t===`manual`&&window.open(fe,`_blank`)},Ee=async()=>{try{let e=await u.validateFields();await B5(e.oldPwd,e.newPwd),Z.success(`密码修改成功`),a(!1),u.resetFields()}catch(e){e?.response?.data?.detail?Z.error(e.response.data.detail):e?.message&&Z.error(e.message)}},De=()=>{r(),e(`/login`)},Oe=async()=>{if(!n){Z.warning(`请先登录`);return}try{let e=await w.validateFields();E(!0),await $ie({phone:e.phone,company_name:e.companyName,industry:e.industry,name:e.name,message:e.message}),Z.success(`提交成功,我们会尽快与您联系`),l(!1),w.resetFields()}catch(e){Z.error(e?.message||`提交失败`)}finally{E(!1)}},ke=(0,S.useCallback)(()=>{ie.current&&=(clearInterval(ie.current),null),ae.current&&=(clearInterval(ae.current),null)},[]),Ae=(0,S.useCallback)((e,t=180)=>{ke(),re(t),ie.current=setInterval(async()=>{try{let t=await e7(e);t.status===`paid`?(ke(),q.current=null,localStorage.removeItem(me),Z.success(`支付成功!积分已到账`),M7.getState().refreshUser(),H(!1),W(null),f(null)):t.status===`cancelled`&&(ke(),q.current=null,localStorage.removeItem(me))}catch{}},2e3),ae.current=setInterval(()=>{re(e=>e<=1?(ke(),q.current&&=(t7(q.current).catch(()=>{}),null),localStorage.removeItem(me),Z.warning(`订单已超时,请重新充值`),H(!1),W(null),f(null),0):e-1)},1e3)},[ke]),je=(t,n=0)=>{let r=t.path===ye,i=F7[t.icon]||(0,$.jsx)(J3,{}),a=xe[t.id]&&xe[t.id].length>0,o=(t.menu_type??t.menuType)===`group`;return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{onClick:()=>{!(o||a)&&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:o||a?`default`:`pointer`,fontSize:n>0?13:14,fontWeight:r?600:400,color:r?`#4f46e5`:o?`#94a3b8`:`#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`},onMouseEnter:e=>{!o&&!r&&!(o||a)&&(e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:[!o&&(0,$.jsx)(`span`,{style:{fontSize:n>0?14:16,flexShrink:0,color:r?`#6366f1`:`#64748b`},children:i}),(0,$.jsx)(`span`,{style:{whiteSpace:`nowrap`,flex:1,textAlign:`left`,fontWeight:o||r?600:400,fontSize:o?12:n>0?13:14,textTransform:o?`uppercase`:`none`,letterSpacing:o?.5:0},children:t.label})]}),(o||a)&&(0,$.jsx)(`div`,{style:{overflow:`hidden`},children:(xe[t.id]||[]).map(e=>je(e,n+1))})]},t.id)};return(0,$.jsxs)(uG,{style:{minHeight:`100vh`},children:[(0,$.jsxs)(`div`,{className:`desktop-sidebar`,style:{width:be,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,cursor:`pointer`},onClick:()=>{e(`/home`)},children:[(0,$.jsx)(`div`,{style:{width:42,height:42,borderRadius:14,flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,overflow:`hidden`},children:L?(0,$.jsx)(`img`,{src:L,alt:`logo`,style:{width:28,height:28,objectFit:`contain`}}):(0,$.jsx)(s5,{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:F})]})}),(0,$.jsx)(`div`,{style:{flex:1,padding:`8px 8px`,overflow:`auto`},children:Se.map(e=>je(e))}),(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)(mL,{style:{fontSize:16}}),(0,$.jsx)(`span`,{children:`充值积分`})]}),(0,$.jsx)(P7,{data:ce}),(0,$.jsx)(`div`,{style:{padding:`16px 16px`,flexShrink:0,paddingTop:0},children:(0,$.jsx)(OH,{menu:{items:we,onClick:Te},placement:`topRight`,arrow:!0,children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:12,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)(Pw,{size:36,icon:(0,$.jsx)(g5,{}),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:16,fontWeight:600,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,letterSpacing:-.01},children:n?.username}),(0,$.jsxs)(`div`,{style:{color:`#6366f1`,fontSize:16,fontWeight:500,letterSpacing:0,borderRadius:6,display:`inline-block`},children:[`积分: `,n?.credits||0]})]})]})})})]}),(0,$.jsx)(`div`,{className:`desktop-content`,style:{marginLeft:be+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:!ue&&(0,$.jsx)(wt,{})})}),(0,$.jsx)(`div`,{className:`mobile-header`,children:(0,$.jsxs)(`div`,{className:`mobile-header-content`,children:[(0,$.jsx)(`div`,{className:`mobile-menu-btn`,onClick:()=>b(!0),children:(0,$.jsx)(A6,{style:{fontSize:20}})}),(0,$.jsx)(`div`,{className:`mobile-header-title`,children:F}),(0,$.jsx)(`div`,{className:`mobile-header-right`,children:(0,$.jsxs)(`div`,{className:`mobile-credits-badge`,onClick:()=>s(!0),children:[(0,$.jsx)(b5,{}),(0,$.jsx)(`span`,{children:n?.credits||0})]})})]})}),(0,$.jsx)(`div`,{className:`mobile-content`,children:ue&&(0,$.jsx)(wt,{})}),(0,$.jsxs)(_H,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:36,height:36,borderRadius:10,flexShrink:0,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.35)`},children:L?(0,$.jsx)(`img`,{src:L,alt:`logo`,style:{width:24,height:24,objectFit:`contain`}}):(0,$.jsx)(s5,{style:{fontSize:18,color:`#ffffff`}})}),(0,$.jsx)(`span`,{style:{fontWeight:700,fontSize:16,color:`#1e293b`},children:F})]}),placement:`left`,onClose:()=>b(!1),open:y,size:280,closable:!0,className:`mobile-menu-drawer`,styles:{header:{borderBottom:`1px solid #f1f5f9`,padding:`16px 20px`},body:{padding:`12px 8px`,display:`flex`,flexDirection:`column`}},children:[(0,$.jsxs)(`div`,{style:{flex:1,overflow:`auto`,paddingBottom:12},children:[(0,$.jsx)(`div`,{style:{padding:`12px 8px 16px`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:16},children:[(0,$.jsx)(Pw,{size:44,style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,flexShrink:0},children:(0,$.jsx)(g5,{})}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsx)(`div`,{style:{fontSize:15,fontWeight:600,color:`#1e293b`,marginBottom:2},children:n?.username||`用户`}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`},children:[(0,$.jsx)(b5,{style:{color:`#f59e0b`,marginRight:4}}),`积分: `,(0,$.jsx)(`span`,{style:{color:`#f59e0b`,fontWeight:600},children:n?.credits??0})]})]})]})}),(0,$.jsx)(P7,{data:ce}),Se.map(e=>{let t=e.menu_type??e.menuType,n=xe[e.id]&&xe[e.id].length>0,r=e.path===ye,i=N[e.id],a=F7[e.icon]||(0,$.jsx)(J3,{});return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`mobile-menu-item ${r&&!n?`mobile-menu-item-active`:``} ${t===`group`?`mobile-menu-group`:``}`,onClick:()=>Ce(e),children:[t!==`group`&&(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:r?`#6366f1`:`#64748b`},children:a}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{paddingLeft:0,color:t===`group`?`#94a3b8`:r?`#4f46e5`:`#475569`,fontWeight:t===`group`||r?600:400,fontSize:t===`group`?12:15,textTransform:t===`group`?`uppercase`:`none`,letterSpacing:t===`group`?.5:0},children:e.label}),(t===`group`||n)&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#cbd5e1`,transition:`transform 0.2s ease`,transform:i?`rotate(90deg)`:`rotate(0deg)`},children:(0,$.jsx)(Bg,{})})]}),(t===`group`||n)&&i&&(0,$.jsx)(`div`,{className:`mobile-submenu`,children:(xe[e.id]||[]).map(e=>{let t=e.path===ye,n=F7[e.icon]||(0,$.jsx)(J3,{});return(0,$.jsxs)(`div`,{className:`mobile-menu-item mobile-submenu-item ${t?`mobile-menu-item-active`:``}`,onClick:()=>Ce(e),children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:t?`#6366f1`:`#94a3b8`},children:n}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:t?`#4f46e5`:`#64748b`,fontWeight:t?600:400,fontSize:14},children:e.label})]},e.id)})})]},e.id)})]}),(0,$.jsxs)(`div`,{style:{padding:`8px 0`,borderTop:`1px solid #f1f5f9`},children:[(0,$.jsxs)(`div`,{className:`mobile-menu-item`,onClick:()=>{e(`/user-center?tab=credits`),b(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#f59e0b`},children:(0,$.jsx)(b5,{})}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:`#475569`},children:`积分明细`})]}),(0,$.jsxs)(`div`,{className:`mobile-menu-item`,onClick:()=>{e(`/user-center?tab=orders`),b(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#6366f1`},children:(0,$.jsx)(jH,{})}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:`#475569`},children:`订单记录`})]}),(0,$.jsxs)(`div`,{className:`mobile-menu-item`,onClick:()=>{e(`/messages`),b(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#8b5cf6`},children:(0,$.jsx)(o4,{})}),(0,$.jsxs)(`span`,{className:`mobile-menu-label`,style:{color:`#475569`},children:[`消息中心`,_>0&&(0,$.jsx)(h$,{color:`red`,style:{marginLeft:8,fontSize:11},children:_})]})]}),(0,$.jsxs)(`div`,{className:`mobile-menu-item`,onClick:()=>{a(!0),b(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#0ea5e9`},children:(0,$.jsx)(h6,{})}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:`#475569`},children:`修改密码`})]}),(0,$.jsx)(`div`,{style:{height:8}}),(0,$.jsxs)(`div`,{className:`mobile-menu-item mobile-recharge-item`,onClick:()=>{s(!0),b(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#fff`},children:(0,$.jsx)(mL,{})}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:`#fff`,fontWeight:600},children:`充值积分`})]}),(0,$.jsxs)(`div`,{className:`mobile-menu-item`,onClick:()=>{De(),b(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#ef4444`},children:(0,$.jsx)(x6,{})}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:`#ef4444`},children:`退出登录`})]})]})]}),(0,$.jsx)(NK,{title:(0,$.jsxs)(EH,{children:[(0,$.jsx)(h6,{}),`修改密码`]}),open:i,onOk:Ee,onCancel:()=>{a(!1),u.resetFields()},okText:`确认修改`,cancelText:`取消`,width:440,children:(0,$.jsxs)(bU,{form:u,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(bU.Item,{name:`oldPwd`,label:`原密码`,rules:[{required:!0,message:`请输入原密码`}],children:(0,$.jsx)(tG.Password,{placeholder:`请输入原密码`,size:`large`,prefix:(0,$.jsx)(h6,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(bU.Item,{name:`newPwd`,label:`新密码`,rules:[{required:!0,message:`请输入新密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(tG.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`,prefix:(0,$.jsx)(h6,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(bU.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)(tG.Password,{placeholder:`请再次输入新密码`,size:`large`,prefix:(0,$.jsx)(h6,{style:{color:`#94a3b8`,marginRight:8}})})})]})}),(0,$.jsx)(NK,{title:(0,$.jsxs)(EH,{children:[(0,$.jsx)(N3,{}),`积分充值`]}),open:o,onCancel:()=>{s(!1),f(null)},width:680,className:`recharge-modal`,footer:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,padding:`12px 0 0`,borderTop:`1px solid #f0f0f0`},children:[(0,$.jsx)(X,{size:`large`,onClick:()=>{s(!1),f(null)},style:{borderRadius:10,marginRight:12},children:`取消`}),(0,$.jsx)(X,{type:`primary`,size:`large`,disabled:!d||!oe.alipay&&!oe.wechat,loading:te,onClick:async()=>{let e=h.find(e=>e.id===d);if(!e)return;let t=(e.credits||0)+(e.bonus_credits||e.bonusCredits||0);try{ne(!0);let n=await yie(e.id,ee),r=n.qrUrl||n.codeUrl||n.qr_code||n.code_url;(n.paymentMethod===`alipay`||n.paymentMethod===`wechat`)&&r?(W({price:e.price,credits:t,qrCode:r,method:n.paymentMethod}),s(!1),H(!0),q.current=n.orderNo,localStorage.setItem(me,JSON.stringify({orderNo:n.orderNo,price:e.price,credits:t,qrCode:r,method:n.paymentMethod,createdAt:n.createdAt||new Date().toISOString(),timeoutSeconds:180})),Ae(n.orderNo)):(Z.success(`充值成功!积分已到账`),M7.getState().refreshUser(),s(!1),f(null))}catch(e){Z.error(e?.message||`创建订单失败,请重试`)}finally{ne(!1)}},style:{borderRadius:10,fontWeight:600,background:d?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#d1d5db`,border:`none`,boxShadow:d?`0 8px 24px rgba(99,102,241,0.3)`:`none`},children:`确认充值`})]}),children:(0,$.jsxs)(`div`,{style:{marginTop:16},children:[(0,$.jsxs)(EH,{style:{marginBottom:16},children:[(0,$.jsx)(b5,{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})]}),!oe.alipay&&!oe.wechat?(0,$.jsx)(`div`,{style:{marginBottom:16,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:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13,marginBottom:8,display:`block`},children:`选择支付方式`}),(0,$.jsxs)(HI.Group,{value:ee,onChange:e=>G(e.target.value),style:{display:`flex`,gap:12},children:[oe.alipay&&(0,$.jsxs)(HI.Button,{value:`alipay`,style:{flex:1,textAlign:`center`,borderRadius:10,height:44,lineHeight:`42px`,borderColor:ee===`alipay`?`#1677ff`:void 0,color:ee===`alipay`?`#1677ff`:void 0},children:[(0,$.jsx)(D2,{style:{fontSize:16,marginRight:6}}),`支付宝`]}),oe.wechat&&(0,$.jsxs)(HI.Button,{value:`wechat`,style:{flex:1,textAlign:`center`,borderRadius:10,height:44,lineHeight:`42px`,borderColor:ee===`wechat`?`#07c160`:void 0,color:ee===`wechat`?`#07c160`:void 0},children:[(0,$.jsx)(C5,{style:{fontSize:16,marginRight:6}}),`微信支付`]})]})]}),(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)(e6,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsxs)(Q.Text,{style:{color:`#64748b`,fontSize:13},children:[`当前平台仅支持支付宝/微信扫码充值,如需转账支付请`,(0,$.jsx)(Q.Text,{style:{color:`#ff0000ff`,cursor:`pointer`,textDecoration:`underline`},onClick:()=>{s(!1),l(!0)},children:`联系我们`})]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12,flexWrap:`wrap`},children:h.map((e,t)=>{let n=I7[t%I7.length],r=(e.credits||0)+(e.bonus_credits||e.bonusCredits||0);return(0,$.jsxs)(`div`,{onClick:()=>f(e.id),style:{flex:`1 1 45%`,minWidth:200,borderRadius:16,padding:`20px 16px`,background:d===e.id?`rgba(99,102,241,0.04)`:`#fafbff`,border:d===e.id?`2px solid #6366f1`:`1px solid #f0f0f5`,cursor:`pointer`,position:`relative`,transition:`all 0.2s`},children:[e.description&&(0,$.jsx)(h$,{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:14,fontWeight:600,color:`#6366f1`},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)})})]})}),(0,$.jsx)(NK,{open:V,onCancel:async()=>{if(ke(),q.current){try{await t7(q.current)}catch{}q.current=null}localStorage.removeItem(me),H(!1),W(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:U?.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:U?.method===`alipay`?(0,$.jsx)(D2,{style:{fontSize:24,color:`#fff`}}):(0,$.jsx)(C5,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:U?.method===`alipay`?`支付宝支付`:`微信支付`}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:U?.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:U&&(0,$.jsx)(w2,{value:U.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:[`¥`,U?.price||0]}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`,marginTop:4},children:[`购买 `,U?.credits||0,` 积分`]}),(0,$.jsx)(`div`,{style:{marginTop:12,padding:`8px 16px`,background:K<=30?`#fef2f2`:`#f0f9ff`,borderRadius:8,border:K<=30?`1px solid #fecaca`:`1px solid #bae6fd`,display:`inline-block`},children:(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:K<=30?`#dc2626`:`#0284c7`},children:[`订单将在 `,(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:800},children:K}),` 秒后关闭`]})})]})]}),(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)(X,{size:`large`,block:!0,onClick:async()=>{if(ke(),q.current){try{await t7(q.current)}catch{}q.current=null}localStorage.removeItem(me),H(!1),W(null),f(null)},style:{borderRadius:10},children:`取消支付`})})]})}),(0,$.jsx)(Fae,{}),(0,$.jsx)(`div`,{className:`contact-button-wrapper`,style:{right:`${D.x}px`,bottom:`${window.innerHeight-D.y}px`},children:(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`div`,{className:`contact-tooltip`,style:{opacity:+!!x},children:`联系我们`}),(0,$.jsx)(`button`,{className:`contact-button ${k?`dragging`:``}`,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),onMouseDown:he,onMouseUp:_e,children:(0,$.jsx)(N6,{style:{fontSize:20}})})]})}),(0,$.jsx)(NK,{title:(0,$.jsxs)(EH,{children:[(0,$.jsx)(N6,{}),`联系我们`]}),open:c,onCancel:()=>{l(!1),w.resetFields()},footer:null,width:480,className:`contact-modal`,children:(0,$.jsxs)(`div`,{style:{marginTop:8},children:[(0,$.jsxs)(bU,{form:w,layout:`vertical`,children:[(0,$.jsx)(bU.Item,{name:`name`,label:`姓名`,rules:[{required:!0,message:`请输入姓名`}],children:(0,$.jsx)(tG,{placeholder:`请输入您的姓名`,size:`large`})}),(0,$.jsx)(bU.Item,{name:`phone`,label:`手机号`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1[3-9]\d{9}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(tG,{placeholder:`请输入您的手机号`,size:`large`})}),(0,$.jsx)(bU.Item,{name:`companyName`,label:`公司名称`,rules:[{required:!0,message:`请输入公司名称`}],children:(0,$.jsx)(tG,{placeholder:`请输入公司名称`,size:`large`})}),(0,$.jsx)(bU.Item,{name:`industry`,label:`您的行业`,rules:[{required:!0,message:`请输入您的行业`}],children:(0,$.jsx)(tG,{placeholder:`请输入您的行业`,size:`large`})}),(0,$.jsx)(bU.Item,{name:`message`,label:`留言(选填)`,children:(0,$.jsx)(tG.TextArea,{placeholder:`请输入您的需求或问题`,rows:3,style:{borderRadius:10}})})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,display:`flex`,gap:12},children:[(0,$.jsx)(X,{size:`large`,onClick:()=>{l(!1),w.resetFields()},style:{borderRadius:10,flex:1},children:`取消`}),(0,$.jsx)(X,{type:`primary`,size:`large`,onClick:Oe,loading:T,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,flex:1},children:`提交`})]})]})})]})},Rae=`http://localhost:8000/api`,zae=()=>{let{checkAuth:e}=M7(),[t,n]=(0,S.useState)(!1),[r,i]=(0,S.useState)(`password`),[a,o]=(0,S.useState)(`password`),[s]=On(),c=s.get(`redirect`),l=s.get(`tab`),[u,d]=(0,S.useState)(0),[f,p]=(0,S.useState)(0),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(!1),[v,y]=(0,S.useState)(!1),[b,x]=(0,S.useState)(!1),[C,w]=(0,S.useState)(0),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(!1),k=(()=>{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,j]=(0,S.useState)(k.siteName),[M,N]=(0,S.useState)(k.siteLogo),[P,F]=(0,S.useState)(``),[I,L]=(0,S.useState)(``),R=Ye(),{login:z}=M7(),[B]=bU.useForm(),[V]=bU.useForm(),[H]=bU.useForm();(0,S.useEffect)(()=>{J5().then(e=>{j(e.siteName),N(e.siteLogo),F(e.userAgreementPrivacyUrl),L(e.siteCopyright)}).catch(()=>{})},[]),(0,S.useEffect)(()=>{l===`register`&&i(`register`)},[l]);let U=()=>{if(c)try{R(decodeURIComponent(c));return}catch{}R(`/home`)},W=()=>m?!0:(Z.warning(`请先阅读并同意用户协议及隐私政策`),!1),ee=async()=>{if(W())try{let t=await B.validateFields();await z(t.phone,t.password,void 0,t.rememberMe),Z.success(`登录成功,欢迎回来`),await e(),U()}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}},G=async()=>{if(W())try{let t=V.getFieldsValue();if(!t.phone||!t.code){Z.error(`请填写手机号和验证码`);return}n(!0),await Xre(t.phone,t.code),Z.success(`登录成功,欢迎回来`),await e(),U()}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}finally{n(!1)}},te=async()=>{if(W())try{let t=await H.validateFields();n(!0),await Zre(t.phone,t.regCode,t.password),Z.success(`注册成功`),await e(),U()}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`注册失败`;Z.error(t)}finally{n(!1)}},ne=(e,t)=>{e(60);let n=setInterval(()=>{e(e=>e<=1?(clearInterval(n),_(!1),t?E(!0):O(!0),0):e-1)},1e3)};(0,S.useEffect)(()=>{u===0&&r===`phone`&&x(!1)},[u,r]);let K=async(e,t)=>{try{if(!e||!/^1\d{10}$/.test(e)){Z.error(`请输入正确的手机号`);return}if(t){_(!0),y(!1);return}if(!b){_(!0),x(!1);return}let n=``;n=r===`register`?`register`:`login`,await Y5(e,n),ne(t?p:d),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(y(!1),p(0)):(x(!1),d(0)),w(e=>e+1)}},re=async(e=!1)=>{let t=r===`register`?H.getFieldValue(`phone`):V.getFieldValue(`phone`);try{let e=``;e=r===`register`?`register`:`login`,await Y5(t,e),r===`register`?(y(!0),ne(p,!0)):(x(!0),ne(d,!1)),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(y(!1),p(0),E(!0)):(x(!1),d(0),O(!0)),w(e=>e+1)}},ie=e=>{o(e),i(e),d(0),p(0),x(!1),y(!1),_(!1),E(!1),O(!1),w(e=>e+1),e===`password`?B.resetFields():V.resetFields()},ae=[{icon:(0,$.jsx)(h4,{}),title:`AI 智能优化`,desc:`输入原始提示词,AI 自动为您生成专业级视频、图片描述`},{icon:(0,$.jsx)(l8,{}),title:`一键生成视频、图片`,desc:`支持多种规格生成视频、图片`},{icon:(0,$.jsx)(G3,{}),title:`项目维度管理`,desc:`按项目行业分类视频、图片,支持多种行业`}],q={background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,borderRadius:10,fontSize:14},oe=e=>{if(!e){Z.warning(`暂未上传协议文件`);return}e.startsWith(`http://`)||e.startsWith(`https://`)?window.open(e,`_blank`):window.open(`${Rae.replace(/\/api$/,``)}${e}`,`_blank`)};return(0,$.jsxs)(`div`,{className:`login-page`,children:[(0,$.jsx)(`div`,{className:`login-bg-overlay`}),(0,$.jsx)(`div`,{className:`login-decoration login-decoration-1`}),(0,$.jsx)(`div`,{className:`login-decoration login-decoration-2`}),(0,$.jsx)(`div`,{className:`login-left-section`,children:(0,$.jsxs)(EH,{direction:`vertical`,size:36,className:`login-left-content`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`login-logo-row`,children:[M?(0,$.jsx)(`img`,{src:M,alt:`logo`,className:`login-logo-img`}):(0,$.jsx)(`div`,{className:`login-logo-placeholder`,children:(0,$.jsx)(s5,{style:{fontSize:26,color:`#fff`}})}),(0,$.jsx)(`span`,{className:`login-site-name`,children:A})]}),(0,$.jsx)(`div`,{className:`shiny-text-container`,children:(0,$.jsx)(`span`,{className:`shiny-text`,children:`AI赋能创意,素材触手可及`})}),(0,$.jsxs)(Q.Paragraph,{className:`login-desc`,children:[`专业的 AI 素材生成平台,通过智能提示词优化,`,(0,$.jsx)(`br`,{}),`让您的创意快速转化为精美视频、图片`]})]}),(0,$.jsx)(`div`,{className:`login-features-list`,children:ae.map((e,t)=>(0,$.jsxs)(`div`,{className:`electric-border-card login-feature-card`,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`,{className:`login-feature-icon`,children:e.icon})}),(0,$.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,$.jsx)(Q.Text,{className:`login-feature-title`,children:e.title}),(0,$.jsx)(Q.Text,{className:`login-feature-desc`,children:e.desc})]})]},t))})]})}),(0,$.jsxs)(`div`,{className:`login-right-section`,children:[(0,$.jsx)(`div`,{className:`login-right-section-inner`,children:(0,$.jsxs)(RL,{className:`login-card`,styles:{body:{padding:`36px 28px`}},children:[(0,$.jsx)(Q.Title,{level:3,className:`login-card-title`,children:r===`register`?`创建账号`:`欢迎回来`}),(0,$.jsx)(Q.Text,{className:`login-card-subtitle`,children:r===`register`?`注册新账号,开始创作视频`:`登录您的账号,开始创作视频`}),r!==`register`&&(0,$.jsx)(`div`,{className:`login-tabs`,children:[`password`,`phone`].map(e=>(0,$.jsx)(`div`,{onClick:()=>ie(e),className:`login-tab ${a===e?`login-tab-active`:``}`,children:e===`password`?`密码登录`:`验证码登录`},e))}),r===`password`&&(0,$.jsxs)(bU,{form:B,size:`large`,layout:`vertical`,onFinish:ee,children:[(0,$.jsx)(bU.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(tG,{prefix:(0,$.jsx)(I6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,style:q})}),(0,$.jsx)(bU.Item,{name:`password`,rules:[{required:!0,message:`请输入密码`}],children:(0,$.jsx)(tG.Password,{prefix:(0,$.jsx)(h6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入密码`,style:q})}),(0,$.jsx)(bU.Item,{name:`rememberMe`,valuePropName:`checked`,style:{marginBottom:12},children:(0,$.jsx)(oz,{children:`记住我的登录状态`})}),(0,$.jsx)(bU.Item,{style:{marginBottom:12},children:(0,$.jsx)(X,{type:`primary`,htmlType:`submit`,loading:t,block:!0,className:`login-submit-btn`,children:`登 录`})})]}),r===`phone`&&(0,$.jsxs)(bU,{form:V,size:`large`,layout:`vertical`,children:[(0,$.jsx)(bU.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(tG,{prefix:(0,$.jsx)(I6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:q})}),(0,$.jsx)(bU.Item,{name:`code`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(EH.Compact,{style:{width:`100%`},children:[(0,$.jsx)(tG,{prefix:(0,$.jsx)(A8,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!b,style:{...q,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(X,{disabled:u>0,onClick:()=>{D?(x(!1),_(!0),w(e=>e+1)):K(V.getFieldValue(`phone`))},className:`login-code-btn`,children:u>0?`${u}s`:D?`重新发送`:`获取验证码`})]})}),g&&(0,$.jsx)(bU.Item,{style:{marginBottom:12},children:(0,$.jsx)(L7,{onSuccess:re,isVerified:b})},C),(0,$.jsx)(bU.Item,{style:{marginBottom:12},children:(0,$.jsx)(X,{type:`primary`,onClick:G,loading:t,block:!0,className:`login-submit-btn`,children:`登 录`})})]}),r===`register`&&(0,$.jsxs)(bU,{form:H,size:`large`,layout:`vertical`,children:[(0,$.jsx)(bU.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(tG,{prefix:(0,$.jsx)(I6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:q})}),(0,$.jsx)(bU.Item,{name:`regCode`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(EH.Compact,{style:{width:`100%`},children:[(0,$.jsx)(tG,{prefix:(0,$.jsx)(A8,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!v,style:{...q,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(X,{disabled:f>0,onClick:()=>{T?(y(!1),_(!0),w(e=>e+1)):K(H.getFieldValue(`phone`),!0)},className:`login-code-btn`,children:f>0?`${f}s`:T?`重新发送`:`获取验证码`})]})}),g&&(0,$.jsx)(bU.Item,{style:{marginBottom:12},children:(0,$.jsx)(L7,{onSuccess:re,isVerified:v})},C),(0,$.jsx)(bU.Item,{name:`password`,rules:[{required:!0,message:`请设置密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(tG.Password,{prefix:(0,$.jsx)(h6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请设置密码(至少6位)`,style:q})}),(0,$.jsx)(bU.Item,{style:{marginBottom:12},children:(0,$.jsx)(X,{type:`primary`,onClick:te,loading:t,block:!0,className:`login-submit-btn`,children:`注 册`})})]}),(0,$.jsx)(`div`,{className:`login-agreement`,children:(0,$.jsx)(oz,{checked:m,onChange:e=>h(e.target.checked),children:(0,$.jsxs)(`span`,{className:`login-agreement-text`,children:[`我已阅读并同意`,(0,$.jsx)(`span`,{onClick:e=>{e.stopPropagation(),oe(P)},className:`login-link`,children:`《用户协议及隐私政策》`})]})})}),(0,$.jsx)(`div`,{className:`login-footer`,children:r===`register`?(0,$.jsx)(Q.Text,{className:`login-switch-btn`,onClick:()=>{i(`password`),o(`password`),E(!1),O(!1),y(!1),_(!1),w(e=>e+1),H.resetFields()},children:`已有账号?去登录`}):(0,$.jsx)(Q.Text,{className:`login-switch-btn`,onClick:()=>{i(`register`),E(!1),O(!1),y(!1),_(!1),w(e=>e+1)},children:`没有账号?立即注册`})})]})}),I&&(0,$.jsx)(`div`,{className:`login-copyright-wrapper`,children:(0,$.jsx)(`div`,{className:`login-copyright`,children:I})})]})]})},L7=({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{if(o.current||t)return;e.preventDefault();let s=n.current;if(!s)return;let c=s.getBoundingClientRect();u(e.touches[0].clientX-c.left-50/2);let d=e=>{u(e.touches[0].clientX-c.left-50/2)},f=()=>{document.removeEventListener(`touchmove`,d),document.removeEventListener(`touchend`,f),!o.current&&a.current({page:1,pageSize:10,total:0,items:[]}),R7=O5((e,t)=>({projects:[],records:Bae(),loading:!1,mediaType:`video`,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:[],inputValue:``,currentMedia:[],fetchProjects:async()=>{e({loading:!0});try{e({projects:await $re(),loading:!1})}catch{e({loading:!1})}},createProject:async(n,r)=>{let i=await eie(n,r);return e({projects:[i,...t().projects]}),i},deleteProject:async n=>{await tie(n),e({projects:t().projects.filter(e=>e.id!==n)})},fetchRecords:async(t={})=>{e({loading:!0});try{e({records:await V5(t),loading:!1})}catch{e({loading:!1})}},optimizePrompt:async(n,r)=>{let i=await nie(n,r);try{await M7.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 pie(n,r);try{await M7.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}),setInputValue:t=>e({inputValue:t}),setCurrentMedia:t=>e({currentMedia: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:[],inputValue:``,currentMedia:[]})}));function z7(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 B7=[`#f97316`,`#3b82f6`,`#8b5cf6`,`#10b981`,`#eab308`,`#6366f1`,`#ef4444`,`#06b6d4`,`#64748b`,`#78716c`],V7={ShoppingCartOutlined:(0,$.jsx)(H8,{}),BookOutlined:(0,$.jsx)(l4,{}),HomeOutlined:(0,$.jsx)(J3,{}),FireOutlined:(0,$.jsx)(D3,{}),RocketOutlined:(0,$.jsx)(D8,{}),SkinOutlined:(0,$.jsx)(dre,{}),CompassOutlined:(0,$.jsx)(e3,{}),HeartOutlined:(0,$.jsx)(z3,{}),CarOutlined:(0,$.jsx)(w4,{}),CameraOutlined:(0,$.jsx)(x4,{}),CloudOutlined:(0,$.jsx)(I4,{}),StarOutlined:(0,$.jsx)(t5,{}),TrophyOutlined:(0,$.jsx)(u5,{}),ThunderboltOutlined:(0,$.jsx)(s5,{}),BulbOutlined:(0,$.jsx)(h4,{}),CoffeeOutlined:(0,$.jsx)(J4,{}),CrownOutlined:(0,$.jsx)(o3,{}),DashboardOutlined:(0,$.jsx)(l3,{}),FlagOutlined:(0,$.jsx)(A3,{}),GlobalOutlined:(0,$.jsx)(I3,{}),GiftOutlined:(0,$.jsx)(N3,{}),LaptopOutlined:(0,$.jsx)(r6,{}),MobileOutlined:(0,$.jsx)(I6,{}),MonitorOutlined:(0,$.jsx)(z6,{}),PayCircleOutlined:(0,$.jsx)(J6,{}),PictureOutlined:(0,$.jsx)(e8,{}),PlayCircleOutlined:(0,$.jsx)(l8,{}),SafetyOutlined:(0,$.jsx)(A8,{}),ShoppingOutlined:(0,$.jsx)(G8,{}),SmileOutlined:(0,$.jsx)(Z8,{}),SoundOutlined:(0,$.jsx)(gre,{}),TagOutlined:(0,$.jsx)(xre,{}),TeamOutlined:(0,$.jsx)(a5,{}),ToolOutlined:(0,$.jsx)(Tre,{}),TruckOutlined:(0,$.jsx)(Ore,{}),VideoCameraOutlined:(0,$.jsx)(v5,{}),WalletOutlined:(0,$.jsx)(b5,{}),BankOutlined:(0,$.jsx)(e4,{}),BuildOutlined:(0,$.jsx)(f4,{}),ExperimentOutlined:(0,$.jsx)(v3,{}),HighlightOutlined:(0,$.jsx)(H3,{}),IdcardOutlined:(0,$.jsx)(Z3,{}),MedicineBoxOutlined:(0,$.jsx)(D6,{}),ReadOutlined:(0,$.jsx)(h8,{}),RestOutlined:(0,$.jsx)(v8,{}),SketchOutlined:(0,$.jsx)(J8,{}),SolutionOutlined:(0,$.jsx)(mre,{})},Vae=()=>{let[e,t]=(0,S.useState)(!1),[n]=bU.useForm(),r=Ye(),{projects:i,fetchProjects:a,createProject:o,deleteProject:s}=R7(),[c,l]=(0,S.useState)([]);(0,S.useEffect)(()=>{a(),$5().then(l).catch(()=>{})},[]);let u=Object.fromEntries(c.map((e,t)=>[e.key,{label:e.label,color:B7[t%B7.length],icon:e.icon||`AppstoreOutlined`}]));return(0,$.jsxs)(`div`,{style:{margin:`-24px -32px -32px`,borderRadius:20,height:`calc(100vh - 34px)`,padding:`24px`},children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`16px 24px`,borderRadius:16,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:(0,$.jsxs)(`div`,{children:[(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,$.jsxs)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:[`共 `,i.length,` 个项目 · 按行业分类管理`]})]})}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(jH,{}),onClick:()=>r(`/records`),size:`large`,style:{background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`,fontWeight:600,borderRadius:10,height:42},children:`项目记录`}),(0,$.jsx)(X,{icon:(0,$.jsx)(mL,{}),onClick:()=>t(!0),size:`large`,style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,color:`#fff`,fontWeight:600,borderRadius:10,height:42,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`},children:`新建项目`})]})]}),i.length===0?(0,$.jsx)(rC,{image:rC.PRESENTED_IMAGE_SIMPLE,description:`还没有项目,创建您的第一个视频项目`,style:{padding:`60px 0`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(mL,{}),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:V7[u[e.industry]?.icon]||(0,$.jsx)(N2,{})}),(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)(h$,{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)(wV,{style:{fontSize:12,color:`#94a3b8`}}),(0,$.jsxs)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:12,color:`#94a3b8`},children:[`创建于 `,z7(e.createdAt)]})]})]}),(0,$.jsxs)(`div`,{className:`project-actions`,style:{display:`flex`,alignItems:`center`,gap:8,marginLeft:16},children:[(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(l8,{}),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)(LK,{title:`确定删除该项目?`,description:`项目下的生成记录将一并删除`,onConfirm:async t=>{t?.stopPropagation(),await s(e.id),Z.success(`项目已删除`)},onCancel:e=>e?.stopPropagation(),children:(0,$.jsx)(X,{danger:!0,icon:(0,$.jsx)(k$,{}),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)(Bg,{className:`mobile-hide`,style:{color:`#cbd5e1`,fontSize:12}})]})]},e.id))}),(0,$.jsx)(NK,{title:(0,$.jsxs)(EH,{children:[(0,$.jsx)(N2,{}),`新建项目`]}),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)(bU,{form:n,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(bU.Item,{name:`name`,label:`项目名称`,rules:[{required:!0,message:`请输入项目名称`}],children:(0,$.jsx)(tG,{placeholder:`例如:618电商大促宣传片`,prefix:(0,$.jsx)(dZ,{}),size:`large`})}),(0,$.jsx)(bU.Item,{name:`industry`,label:`所属行业`,rules:[{required:!0,message:`请选择行业`}],children:(0,$.jsx)(NC,{placeholder:`选择项目所属行业`,size:`large`,children:c.map((e,t)=>(0,$.jsx)(NC.Option,{value:e.key,children:(0,$.jsxs)(EH,{children:[V7[e.icon]||(0,$.jsx)(N2,{}),` `,e.label]})},e.key))})})]})})]})},{Text:H7}=Q,Hae={real_person:{title:`选择真人素材库`,empty:`暂无可选 Active 真人素材`,projectError:`加载真人素材项目失败`,assetError:`加载真人素材失败`,fallbackName:`真人素材`},aigc_virtual:{title:`选择虚拟素材库`,empty:`暂无可选 Active 虚拟素材`,projectError:`加载虚拟素材项目失败`,assetError:`加载虚拟素材失败`,fallbackName:`虚拟素材`}},U7=e=>e?e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`)||e.startsWith(`blob:`)?e:`${`http://ceshi.apiforeign.minzhong.cn`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,Uae=e=>e.assetType===`Video`?U7(e.videoCoverUrl||e.previewUrl||e.displayUrl||e.providerUrl):U7(e.previewUrl||e.displayUrl||e.videoCoverUrl||e.providerUrl),Wae=e=>{let t=Number(e||0);return!Number.isFinite(t)||t<=0?`-`:`${t.toFixed(t>=10?0:1)}s`},W7=({open:e,libraryType:t=`real_person`,selectedIds:n=[],maxCount:r=20,onClose:i,onSelect:a,maxImageCount:o,maxVideoCount:s,usedImageCount:c,usedVideoCount:l,usedVideoDuration:u,maxVideoDuration:d,accept:f})=>{let p=Hae[t],[m,h]=(0,S.useState)([]),[g,_]=(0,S.useState)(),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(f===`image/*`?`Image`:void 0),[C,w]=(0,S.useState)([]),[T,E]=(0,S.useState)(new Map),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),j=(0,S.useMemo)(()=>new Set(T.keys()),[T]),M=async()=>{O(!0);try{let e=(await(t===`aigc_virtual`?A7:k7)({page:1,pageSize:100,status:`active`})).items||[];h(e),_(t=>t&&e.some(e=>e.id===t)?t:e[0]?.id)}catch(e){Z.error(e?.message||p.projectError)}finally{O(!1)}},N=async()=>{A(!0);try{w((await(t===`aigc_virtual`?Sae:hae)({projectId:g,keyword:v.trim()||void 0,assetType:b,page:1,pageSize:100})).items||[])}catch(e){Z.error(e?.message||p.assetError)}finally{A(!1)}};(0,S.useEffect)(()=>{e&&setTimeout(()=>{E(new Map),y(``),x(void 0),_(void 0),w([]),M()},0)},[e,t]),(0,S.useEffect)(()=>{e&&setTimeout(()=>{N()},0)},[e,g,b,t]);let P=e=>{if(n.includes(e.id)){Z.info(`该素材已添加`);return}if(f===`image/*`&&e.assetType===`Video`){Z.warning(`当前仅支持选择图片素材`);return}E(t=>{let n=new Map(t);return n.has(e.id)?(n.delete(e.id),n):n.size>=r?(Z.warning(`最多选择 ${r} 个参考素材`),t):(n.set(e.id,e),n)})},F=(0,S.useMemo)(()=>{let e=Array.from(T.values()).filter(e=>e.assetType===`Image`).length,t=Array.from(T.values()).filter(e=>e.assetType===`Video`).length,n=Array.from(T.values()).filter(e=>e.assetType===`Video`).reduce((e,t)=>e+(t.videoDuration||0),0),r=o!==void 0&&c!==void 0?o-c:1/0,i=s!==void 0&&l!==void 0?s-l:1/0,a=d!==void 0&&u!==void 0?d-u:1/0;return e>r||t>i||n>a},[T,o,c,s,l,d,u]);return(0,$.jsxs)(NK,{title:`${p.title}`,open:e,onCancel:i,width:920,destroyOnHidden:!0,footer:[(0,$.jsx)(X,{onClick:i,children:`取消`},`cancel`),(0,$.jsxs)(X,{type:`primary`,onClick:()=>{let e=Array.from(T.values()).filter(e=>!n.includes(e.id));if(!e.length){Z.warning(`请选择至少一个${t===`aigc_virtual`?`虚拟`:`真人`}素材`);return}a(e),i()},disabled:F,style:{background:F?`#94a3b8`:`#8b5cf6`,opacity:F?.6:1,cursor:F?`not-allowed`:`pointer`},children:[`添加选中素材(`,T.size,`)`]},`ok`)],children:[f!==`image/*`&&(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:20,marginBottom:16,padding:`12px 16px`,background:`#fafafa`,borderRadius:8},children:(()=>{let e=Array.from(T.values()).filter(e=>e.assetType===`Image`).length,t=Array.from(T.values()).filter(e=>e.assetType===`Video`).length,n=Array.from(T.values()).filter(e=>e.assetType===`Video`).reduce((e,t)=>e+(t.videoDuration||0),0),r=o!==void 0&&c!==void 0?o-c:1/0,i=s!==void 0&&l!==void 0?s-l:1/0,a=d!==void 0&&u!==void 0?d-u:1/0,f=e>r,p=t>i,m=n>a;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`span`,{style:{fontSize:13,color:f?`#ef4444`:`#64748b`,fontWeight:f?600:400},children:[`还可选取图片 `,e,`/`,o!==void 0&&c!==void 0?o-c:`-`,` 张`]}),(0,$.jsxs)(`span`,{style:{fontSize:13,color:p||m?`#ef4444`:`#64748b`,fontWeight:p||m?600:400},children:[`视频还可选取 `,t,`/`,s!==void 0&&l!==void 0?s-l:`-`,` 个(`,n.toFixed(1),`/`,d!==void 0&&u!==void 0?(d-u).toFixed(1):`-`,`秒)`]})]})})()}),(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`240px 1fr`,gap:16,height:500},children:[(0,$.jsxs)(`div`,{style:{border:`1px solid #eef0f4`,borderRadius:12,padding:12,background:`#fafafa`,overflowY:`auto`,height:`100%`},children:[(0,$.jsxs)(EH,{style:{width:`100%`,justifyContent:`space-between`,marginBottom:12},children:[(0,$.jsx)(H7,{strong:!0,children:`项目组`}),(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(Uq,{}),onClick:M,loading:D})]}),(0,$.jsx)(cK,{spinning:D,children:(0,$.jsx)(gK,{dataSource:m,locale:{emptyText:(0,$.jsx)(rC,{image:rC.PRESENTED_IMAGE_SIMPLE,description:`暂无项目组`})},renderItem:e=>(0,$.jsx)(gK.Item,{onClick:()=>_(e.id),style:{cursor:`pointer`,padding:`10px 12px`,borderRadius:10,marginBottom:6,border:g===e.id?`1px solid #8b5cf6`:`1px solid transparent`,background:g===e.id?`#f5f3ff`:`#fff`},children:(0,$.jsxs)(`div`,{style:{width:`100%`},children:[(0,$.jsx)(H7,{strong:!0,ellipsis:!0,style:{display:`block`},children:e.name}),(0,$.jsx)(H7,{type:`secondary`,style:{fontSize:12},children:typeof e.activeImageAssetCount==`number`||typeof e.activeVideoAssetCount==`number`?` 图 ${e.activeImageAssetCount||0} / 视 ${e.activeVideoAssetCount||0}`:``})]})})})})]}),(0,$.jsxs)(`div`,{style:{overflowY:`auto`,height:`100%`},children:[(0,$.jsxs)(EH,{style:{width:`100%`,marginBottom:12},children:[(0,$.jsx)(tG,{allowClear:!0,prefix:(0,$.jsx)(OC,{}),placeholder:`搜索素材名称`,value:v,onChange:e=>y(e.target.value),onPressEnter:N}),(0,$.jsx)(NC,{allowClear:f!==`image/*`,placeholder:`素材类型`,value:b,onChange:x,style:{width:116},options:f===`image/*`?[{value:`Image`,label:`图片`}]:[{value:`Image`,label:`图片`},{value:`Video`,label:`视频`}]}),(0,$.jsx)(X,{icon:(0,$.jsx)(Uq,{}),onClick:N,loading:k,children:`刷新`})]}),(0,$.jsx)(cK,{spinning:k,children:C.length===0?(0,$.jsx)(rC,{image:rC.PRESENTED_IMAGE_SIMPLE,description:p.empty,style:{marginTop:120}}):(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(140px, 1fr))`,gap:12,maxHeight:420,overflowY:`auto`,paddingRight:4},children:C.filter(e=>f!==`image/*`||e.assetType===`Image`).map(e=>{let t=j.has(e.id)||n.includes(e.id),r=n.includes(e.id),i=Uae(e),a=e.assetType===`Video`;return(0,$.jsxs)(`div`,{onClick:()=>P(e),style:{cursor:r?`not-allowed`:`pointer`,border:t?`2px solid #8b5cf6`:`1px solid #edf0f5`,borderRadius:12,overflow:`hidden`,background:`#fff`,boxShadow:t?`0 8px 20px rgba(139,92,246,0.18)`:`0 4px 12px rgba(15,23,42,0.04)`,opacity:r?.62:1,position:`relative`},children:[(0,$.jsxs)(`div`,{style:{aspectRatio:`1 / 1`,background:`#f8fafc`,display:`flex`,alignItems:`center`,justifyContent:`center`,position:`relative`},children:[i?a?(0,$.jsx)(`video`,{src:i,muted:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`img`,{src:i,alt:e.name||p.fallbackName,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):a?(0,$.jsx)(v5,{style:{fontSize:32,color:`#94a3b8`}}):(0,$.jsx)(e8,{style:{fontSize:32,color:`#94a3b8`}}),a&&(0,$.jsx)(`div`,{style:{position:`absolute`,left:8,bottom:8,padding:`2px 6px`,borderRadius:8,background:`rgba(15,23,42,0.72)`,color:`#fff`,fontSize:12},children:Wae(e.videoDuration)})]}),t&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,width:24,height:24,borderRadius:12,background:`#8b5cf6`,color:`#fff`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(SC,{})}),(0,$.jsxs)(`div`,{style:{padding:10},children:[(0,$.jsx)(H7,{strong:!0,ellipsis:!0,style:{display:`block`},children:e.name||`未命名素材`}),(0,$.jsxs)(EH,{wrap:!0,size:4,style:{marginTop:6},children:[(0,$.jsx)(h$,{color:a?`blue`:`default`,children:a?`视频`:`图片`}),(0,$.jsx)(h$,{children:e.projectName})]})]})]},e.id)})})})]})]})]})},{Text:G7}=Q,Gae=e=>e?/^(https?:|data:|blob:)/i.test(e)?e:`${`http://ceshi.apiforeign.minzhong.cn`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,Kae=e=>e===`video`?(0,$.jsx)(v5,{}):e===`audio`?(0,$.jsx)(J2,{}):(0,$.jsx)(e8,{}),qae=e=>e===`video`?`视频`:e===`audio`?`音频`:`图片`,Jae=({open:e,onClose:t,onSelect:n,allowedTypes:r,selectedIds:i=[],title:a=`选择历史上传素材`,maxImageCount:o,maxVideoCount:s,usedImageCount:c,usedVideoCount:l,maxVideoDuration:u,usedVideoDuration:d,maxAudioCount:f,usedAudioCount:p,maxAudioDuration:m,usedAudioDuration:h})=>{let[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(1),[C,w]=(0,S.useState)(10),[T,E]=(0,S.useState)(1),[D,O]=(0,S.useState)(10),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)(!1),[N,P]=(0,S.useState)([]),[F,I]=(0,S.useState)(0),[L,R]=(0,S.useState)(``),[z,B]=(0,S.useState)([]),[V,H]=(0,S.useState)(0),[U,W]=(0,S.useState)(new Map),ee=(0,S.useMemo)(()=>new Set(i),[i]),G=(0,S.useMemo)(()=>new Set(r||[`image`,`video`,`audio`]),[JSON.stringify(r)]),te=(0,S.useMemo)(()=>Array.from(U.values()).filter(e=>e.resourceType===`image`).length,[U]),ne=(0,S.useMemo)(()=>Array.from(U.values()).filter(e=>e.resourceType===`video`).length,[U]),K=(0,S.useMemo)(()=>Array.from(U.values()).filter(e=>e.resourceType===`video`).reduce((e,t)=>e+(t.durationSeconds||0),0),[U]),re=(0,S.useMemo)(()=>Array.from(U.values()).filter(e=>e.resourceType===`audio`).length,[U]),ie=(0,S.useMemo)(()=>Array.from(U.values()).filter(e=>e.resourceType===`audio`).reduce((e,t)=>e+(t.durationSeconds||0),0),[U]),ae=(0,S.useMemo)(()=>o!==void 0&&c!==void 0?o-c:1/0,[o,c]),q=(0,S.useMemo)(()=>s!==void 0&&l!==void 0?s-l:1/0,[s,l]),oe=(0,S.useMemo)(()=>u!==void 0&&d!==void 0?u-d:1/0,[u,d]),se=(0,S.useMemo)(()=>f!==void 0&&p!==void 0?f-p:1/0,[f,p]),ce=(0,S.useMemo)(()=>m!==void 0&&h!==void 0?m-h:1/0,[m,h]),le=(0,S.useMemo)(()=>te>ae,[te,ae]),ue=(0,S.useMemo)(()=>ne>q,[ne,q]),de=(0,S.useMemo)(()=>K>oe,[K,oe]),fe=(0,S.useMemo)(()=>re>se,[re,se]),pe=(0,S.useMemo)(()=>ie>ce,[ie,ce]),me=(0,S.useCallback)(async()=>{if(e){M(!0);try{let e=await D7({resourceType:g||void 0,keyword:v||void 0,page:b,pageSize:C,scene:`picker`});P(b===1?e.groups||[]:t=>[...t,...e.groups||[]]),I(e.totalDays||0)}catch(e){Z.error(e?.message||`加载历史上传素材失败`),b===1&&P([]),I(0)}finally{M(!1)}}},[G,v,e,b,C,g]),he=(0,S.useCallback)(async e=>{A(!0);try{let t=await O7(e,{resourceType:g||void 0,keyword:v||void 0,page:T,pageSize:8,scene:`picker`});B((t.items||[]).filter(e=>G.has(e.resourceType))),H(t.total||0)}catch(e){Z.error(e?.message||`加载历史上传素材失败`),B([]),H(0)}finally{A(!1)}},[G,v,T,D,g]);(0,S.useEffect)(()=>{e&&me()},[e,b,me]),(0,S.useEffect)(()=>{L&&E(1)},[L]),(0,S.useEffect)(()=>{L&&he(L)},[L,T,he]),(0,S.useEffect)(()=>{e&&W(new Map)},[e]);let ge=e=>{if(ee.has(e.id)){Z.warning(`该素材已经在参考内容中`);return}W(t=>{let n=new Map(t);return n.has(e.id)?n.delete(e.id):n.set(e.id,e),n})},_e=()=>{let e=Array.from(U.values());if(e.length===0){Z.warning(`请先选择历史素材`);return}n(e),W(new Map),t()},ve=(0,S.useMemo)(()=>[{label:`全部`,value:``},{label:`图片`,value:`image`},{label:`视频`,value:`video`},{label:`音频`,value:`audio`}].filter(e=>!e.value||G.has(e.value)),[G]);return(0,$.jsxs)(NK,{title:a,open:e,onCancel:t,width:1e3,centered:!0,destroyOnHidden:!0,footer:[(0,$.jsx)(X,{onClick:t,children:`取消`},`cancel`),(0,$.jsxs)(X,{type:`primary`,onClick:_e,style:{background:`#8b5cf6`},disabled:le||ue||de||fe||pe,children:[`应用选择 (`,U.size,`)`]},`ok`)],children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(EH,{wrap:!0,children:[(0,$.jsx)(NC,{value:g,options:ve,style:{width:120},onChange:e=>{_(e),x(1)}}),(0,$.jsx)(tG,{allowClear:!0,value:v,prefix:(0,$.jsx)(OC,{}),placeholder:`搜索文件名`,style:{width:220},onChange:e=>y(e.target.value),onPressEnter:()=>{x(1),me()}}),(0,$.jsx)(X,{icon:(0,$.jsx)(Uq,{}),onClick:me,children:`刷新`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginTop:12,flexWrap:`wrap`},children:[(0,$.jsxs)(`span`,{style:{fontSize:13,color:le?`#ef4444`:`#64748b`,fontWeight:le?600:400},children:[`还可选取图片 `,te,`/`,o!==void 0&&c!==void 0?o-c:`-`,` 张`]}),(0,$.jsxs)(`span`,{style:{fontSize:13,color:ue||de?`#ef4444`:`#64748b`,fontWeight:ue||de?600:400},children:[`视频还可选取 `,ne,`/`,s!==void 0&&l!==void 0?s-l:`-`,` 个(`,K.toFixed(1),`/`,u!==void 0&&d!==void 0?(u-d).toFixed(1):`-`,`秒)`]}),f!==void 0&&(0,$.jsxs)(`span`,{style:{fontSize:13,color:fe||pe?`#ef4444`:`#64748b`,fontWeight:fe||pe?600:400},children:[`音频还可选取 `,re,`/`,f!==void 0&&p!==void 0?f-p:`-`,` 个(`,ie.toFixed(1),`/`,m!==void 0&&h!==void 0?(m-h).toFixed(1):`-`,`秒)`]})]})]}),(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`240px 1fr`,gap:16,height:500},children:[(0,$.jsxs)(`div`,{style:{border:`1px solid #eef0f4`,borderRadius:12,padding:12,background:`#fafafa`,overflowY:`auto`},children:[(0,$.jsx)(G7,{strong:!0,style:{fontSize:14},children:`日期列表`}),(0,$.jsx)(cK,{spinning:j,children:N.length===0?(0,$.jsx)(rC,{image:rC.PRESENTED_IMAGE_SIMPLE,description:`暂无日期`,style:{padding:`40px 0`}}):(0,$.jsxs)(`div`,{style:{marginTop:12},children:[N.map(e=>(0,$.jsxs)(`div`,{onClick:()=>R(e.generatedDate),style:{padding:`10px 12px`,borderRadius:10,marginBottom:6,cursor:`pointer`,border:L===e.generatedDate?`1px solid #8b5cf6`:`1px solid transparent`,background:L===e.generatedDate?`#f5f3ff`:`#fff`},children:[(0,$.jsx)(`div`,{style:{fontSize:13,fontWeight:500,color:`#334155`},children:e.generatedDate}),(0,$.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginTop:4},children:[`共 `,e.total,` 个素材`]})]},e.generatedDate)),F>N.length&&(0,$.jsx)(`div`,{style:{marginTop:12,textAlign:`center`},children:(0,$.jsx)(X,{size:`small`,onClick:()=>x(b+1),children:`加载更多`})})]})})]}),(0,$.jsx)(`div`,{style:{border:`1px solid #eef0f4`,borderRadius:12,padding:12,overflowY:`auto`},children:(0,$.jsx)(cK,{spinning:k,children:L?z.length===0?(0,$.jsx)(rC,{description:`该日期暂无可复用的历史上传素材`,style:{padding:`48px 0`}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(150px, 1fr))`,gap:14},children:z.map(e=>{let t=U.has(e.id),n=ee.has(e.id),r=Gae(e.previewUrl||e.displayUrl||e.resourceUrl);return(0,$.jsxs)(`div`,{onClick:()=>!n&&ge(e),style:{position:`relative`,borderRadius:14,border:t?`2px solid #8b5cf6`:`1px solid #e2e8f0`,background:n?`#f8fafc`:`#fff`,opacity:n?.55:1,cursor:n?`not-allowed`:`pointer`,overflow:`hidden`,boxShadow:t?`0 10px 24px rgba(139, 92, 246, 0.18)`:`0 6px 18px rgba(15,23,42,0.06)`},children:[(0,$.jsx)(`div`,{style:{height:112,background:`#f1f5f9`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e.resourceType===`image`?(0,$.jsx)(`img`,{src:r,alt:e.fileName||e.id,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):e.resourceType===`video`?(0,$.jsx)(`video`,{src:r,muted:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:58,height:58,borderRadius:18,background:`linear-gradient(135deg, #8b5cf6, #a78bfa)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:24},children:(0,$.jsx)(J2,{})})}),(0,$.jsxs)(`div`,{style:{padding:10},children:[(0,$.jsxs)(EH,{size:6,style:{marginBottom:6},children:[(0,$.jsx)(h$,{color:`purple`,icon:Kae(e.resourceType),style:{margin:0},children:qae(e.resourceType)}),e.durationSeconds?(0,$.jsxs)(h$,{style:{margin:0},children:[Number(e.durationSeconds).toFixed(1),`s`]}):null]}),(0,$.jsx)(G7,{ellipsis:!0,style:{display:`block`,fontSize:13,color:`#334155`},title:e.fileName||e.id,children:e.fileName||e.id}),(0,$.jsx)(G7,{type:`secondary`,style:{fontSize:12},children:e.moduleLabel||`普通上传`})]}),t&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,width:24,height:24,borderRadius:12,background:`#8b5cf6`,color:`#fff`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(SC,{})}),n&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8},children:(0,$.jsx)(h$,{children:`已选`})})]},e.id)})}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:16,paddingBottom:8},children:(0,$.jsx)(VG,{current:T,pageSize:D,total:V,showSizeChanger:!0,pageSizeOptions:[10,20,50,100],onChange:(e,t)=>{E(e),O(t)}})})]}):(0,$.jsx)(rC,{image:rC.PRESENTED_IMAGE_SIMPLE,description:`请选择日期`,style:{padding:`80px 0`}})})})]})]})},K7=({children:e,accept:t=`image/*,video/*`,multiple:n=!0,onLocalSelect:r,onHistorySelect:i,onPortraitSelect:a,onPortraitLibrarySelect:o,uploading:s,tooltipTitle:c,maxImageCount:l,maxVideoCount:u,usedImageCount:d,usedVideoCount:f,usedVideoDuration:p,maxVideoDuration:m,maxAudioCount:h,usedAudioCount:g,maxAudioDuration:_,usedAudioDuration:v})=>{let y=(0,S.useRef)(null),[b,x]=(0,S.useState)(!1),[C,w]=(0,S.useState)(`real_person`),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),j=()=>{O(!1),y.current?.click()},M=e=>{let t=e.target.files;t&&r&&r(Array.from(t)),y.current&&(y.current.value=``)},N=e=>{if(O(!1),a){w(e),x(!0);return}if(o){o(e);return}w(e),x(!0)},P=(0,$.jsxs)(`div`,{style:{padding:`4px 0`,minWidth:180},children:[(0,$.jsxs)(`div`,{onClick:()=>{j()},style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 16px`,cursor:`pointer`,transition:`background 0.15s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#f1f5f9`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,$.jsx)(dZ,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#334155`},children:`本地上传`})]}),(0,$.jsxs)(`div`,{onClick:()=>{O(!1),E(!0)},style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 16px`,cursor:`pointer`,transition:`background 0.15s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#f1f5f9`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,$.jsx)(f3,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#334155`},children:`从资产中选择`})]}),(0,$.jsxs)(`div`,{onClick:()=>N(`real_person`),style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 16px`,cursor:`pointer`,transition:`background 0.15s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#f1f5f9`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,$.jsx)(g5,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#334155`},children:`真人素材库`})]}),(0,$.jsxs)(`div`,{onClick:()=>N(`aigc_virtual`),style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 16px`,cursor:`pointer`,transition:`background 0.15s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#f1f5f9`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,$.jsx)(a5,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#334155`},children:`虚拟素材库`})]})]});return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`input`,{ref:y,type:`file`,accept:t,multiple:n,onChange:M,style:{display:`none`}}),c?(0,$.jsx)(Cw,{title:c,children:(0,$.jsx)(jw,{content:P,open:D,onOpenChange:O,trigger:`click`,placement:`bottomLeft`,children:(0,$.jsx)(`div`,{style:{cursor:s?`not-allowed`:`pointer`},children:e})})}):(0,$.jsx)(jw,{content:P,open:D,onOpenChange:O,trigger:`click`,placement:`bottomLeft`,children:(0,$.jsx)(`div`,{style:{cursor:s?`not-allowed`:`pointer`},children:e})}),(0,$.jsx)(Jae,{open:T,onClose:()=>E(!1),onSelect:e=>{i?.(e),E(!1)},allowedTypes:t.includes(`audio`)?[`image`,`video`,`audio`]:t.includes(`video`)?[`image`,`video`]:[`image`],maxImageCount:l,maxVideoCount:u,usedImageCount:d,usedVideoCount:f,maxVideoDuration:m,usedVideoDuration:p,maxAudioCount:h,usedAudioCount:g,maxAudioDuration:_,usedAudioDuration:v}),(0,$.jsx)(W7,{open:b,libraryType:C,onClose:()=>x(!1),onSelect:e=>{a?.(e),x(!1)},accept:t,maxCount:t===`image/*`&&!n?1:void 0,maxImageCount:l,maxVideoCount:u,usedImageCount:d,usedVideoCount:f,usedVideoDuration:p,maxVideoDuration:m})]})};function Yae(){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 q7=({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)(l8,{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)})]})},Xae=()=>{let{projectId:e}=$e(),t=Ye(),[n]=bU.useForm(),{projects:r,records:i,fetchProjects:a,fetchRecords:o,optimizePrompt:s,generateVideo:c}=R7(),l=i.items,{user:u}=M7(),[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,W]=(0,S.useState)({}),[ee,G]=(0,S.useState)({}),[te,ne]=(0,S.useState)({}),[K,re]=(0,S.useState)(null),[ie,ae]=(0,S.useState)({}),[q,oe]=(0,S.useState)(null),[se,ce]=(0,S.useState)(5),[le,ue]=(0,S.useState)(`16:9`),[de,fe]=(0,S.useState)(`720p`),[pe,me]=(0,S.useState)(null),[he,ge]=(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]}),[_e,ve]=(0,S.useState)(0),[ye,be]=(0,S.useState)(0),[xe,Se]=(0,S.useState)(`video`),[Ce,we]=(0,S.useState)(`1:1`),[Te,Ee]=(0,S.useState)(`2K`),[De,Oe]=(0,S.useState)(2048),[ke,Ae]=(0,S.useState)(2048),[je,Me]=(0,S.useState)(!1),[Ne,Pe]=(0,S.useState)([]),[Fe,Ie]=(0,S.useState)([]),Le=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=M.filter(e=>e.type===`image`).length,a=M.filter(e=>e.type===`video`).length,o=M.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0);if(t&&i>=5)return Z.error(`最多上传5张图片`),!1;if(n&&a>=2)return Z.error(`最多上传2个视频`),!1;let s=0;if(n&&(s=await new Promise(t=>{let n=document.createElement(`video`);n.preload=`metadata`,n.onloadedmetadata=()=>{t(n.duration||0),n.remove()},n.onerror=()=>{t(0),n.remove()},n.src=URL.createObjectURL(e)}),o+s>15))return Z.error(`视频总时长不能超过15秒`),!1;F(!0);try{let r;r=t?await U5(e):await W5(e,s);let o=t?`图片`:`视频`,c=t?i+1:a+1;N(e=>[...e,{url:r.url,type:t?`image`:`video`,name:`${o}${c}`,duration:n?s:void 0}]),Z.success(`${o}上传成功`)}catch{Z.error(`上传失败`)}finally{F(!1)}return!1};(0,S.useEffect)(()=>{if(xie().then(e=>{Pe(e.video),Ie(e.image)}),!je)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)},[je]);let Re=(e,t)=>{for(let n=0;n{let t=e===`2k`?`2048`:e===`4k`?`4096`:e;for(let e=0;e{Xe(e)},Ve=e=>{Qe(parseInt(e))},[He,Ue]=(0,S.useState)([]),[We,Ge]=(0,S.useState)([]),[Ke,qe]=(0,S.useState)([]),[Je,Xe]=(0,S.useState)(0),[Ze,Qe]=(0,S.useState)(0);(0,S.useEffect)(()=>{Ke[Ze]&&Ke[Ze][Je]!==void 0&&(Oe(Ke[Ze][Je].substring(0,4)),Ae(Ke[Ze][Je].substring(5)))},[Je]),(0,S.useEffect)(()=>{Ke[Ze]&&Ke[Ze][Je]!==void 0&&(Oe(Ke[Ze][Je].substring(0,4)),Ae(Ke[Ze][Je].substring(5)))},[Ze]);let et=()=>{Oe(ke),Ae(De)},tt=e=>{Se(e.target.value===`image`?`image`:`video`)};(0,S.useEffect)(()=>{$5().then(e=>{W(Object.fromEntries(e.map(e=>[e.key,e.label]))),G(Object.fromEntries(e.map(e=>[e.key,e.optionGroups||[]])))}).catch(()=>{}),hie().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)=>{Ue(n=>[...n,{value:e,label:String(t)}])});for(let e in t[`4K`])i.push(t[`4K`][e]);qe([r,i]);let a=[];for(let e in t)a.push(e);a.forEach((e,t)=>{Ge(n=>[...n,{value:e,label:String(t)}])})}).catch(()=>{}),mie().then(e=>{if(e.items?.length){let t=e.items[0];ge({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 nt=(0,S.useRef)(!1);(0,S.useEffect)(()=>{nt.current||l.length===0||(nt.current=!0,l.forEach(t=>{t.projectId===e&&t.status===`generating`&&(T(e=>({...e,[t.id]:`generating`})),kt(t.id)),t.projectId===e&&t.status===`optimizing`&&ut(t.id)}))},[l,e]);let rt=(0,S.useRef)(new Set),it=(0,S.useRef)(null),at=(0,S.useRef)(null),ot=e=>{rt.current.add(e),lt()},st=e=>{rt.current.delete(e),rt.current.size===0&&ct()},ct=()=>{it.current&&=(clearInterval(it.current),null),at.current&&=(at.current.abort(),null)},lt=()=>{it.current||=setInterval(async()=>{try{at.current&&at.current.abort();let t=new AbortController;at.current=t;let n=await V5({projectId:e,page:1,pageSize:100,signal:t.signal});at.current=null;let r=Array.from(rt.current),i=[];if(r.length>0){let e=R7.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});R7.setState({records:{...e,items:t}}),i.forEach(e=>{st(e)})}}catch(e){e.name}},3e3)},ut=e=>{ot(e)},dt=(0,S.useRef)(!1),ft=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(dt.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(ft.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?(dt.current=!0,localStorage.removeItem(`pending_optimize`),g(s),v(s.optimizedPrompt||``),ve(s.textCreditsCost),be(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 pt=r.find(t=>t.id===e),mt=l.filter(t=>t.projectId===e),ht=pt?.name??`项目`,gt=pt&&ee[pt.industry]||[],_t=u?.credits??0,vt=e=>{let t=e===`2k`?`2048`:e===`4k`?`4096`:e;for(let e=0;e=yt,xt=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(te).map(([e,t])=>`@${e}:${t}`),i=r.length>0?`${t.prompt}\n\n${r.join(`;`)}`:t.prompt,a=Yae();localStorage.setItem(`pending_optimize`,JSON.stringify({key:a,projectId:e,prompt:i,duration:se,ts:Date.now()})),ft.current=a;let o=await s(e,{prompt:i,duration:se,genType:xe,resolution:Te,references:M.length>0?M:void 0,idempotencyKey:a,image_size:Te,image_proportion:Ce,image_px:De+`x`+ke});localStorage.removeItem(`pending_optimize`),ft.current=null,g(o.record),v(o.record.optimizedPrompt||``),ve(o.textCreditsCost),be(o.textTokensUsed),m(!0),Z.success({content:`「${ht}」提示词优化完成,消耗 ${o.textCreditsCost} 积分`,key:`optimize`})}catch(e){let t=e?.response?.data?.message||e?.message||`操作失败,请稍后重试`;Z.error(t)}finally{f(!1),localStorage.removeItem(`pending_optimize`),ft.current=null}},St=(0,S.useRef)(new Set),Ct=(0,S.useRef)(null),wt=(0,S.useRef)(null),Tt=e=>{St.current.add(e),Ot()},Et=e=>{St.current.delete(e),St.current.size===0&&Dt()},Dt=()=>{Ct.current&&=(clearInterval(Ct.current),null),wt.current&&=(wt.current.abort(),null)},Ot=()=>{Ct.current||=setInterval(async()=>{try{wt.current&&wt.current.abort();let t=new AbortController;wt.current=t;let n=await V5({projectId:e,page:1,pageSize:100,signal:t.signal});wt.current=null;let r=Array.from(St.current),i=[];if(r.length>0){let e=R7.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});R7.setState({records:{...e,items:t}}),i.forEach(e=>{let t=n.items.find(t=>t.id===e);Et(e),t?.status===`completed`?(T(t=>({...t,[e]:`done`})),g(n=>n?.id===e?t:n),Z.success({content:`「${ht}」视频生成完成!`,key:e,duration:5})):t?.status===`failed`&&(T(t=>({...t,[e]:`failed`})),g(n=>n?.id===e?t:n),Z.error({content:`「${ht}」视频生成失败: ${t.errorMessage||`未知错误`}`,key:e,duration:5}))})}}catch(e){e.name}},5e3)},kt=e=>{Tt(e)};(0,S.useEffect)(()=>()=>{Dt(),ct()},[]);let At=async e=>{if(!bt){Z.error(`积分不足,请先充值`);return}C(t=>({...t,[e]:!0})),T(t=>({...t,[e]:`generating`})),Z.loading({content:`「${ht}」正在提交视频生成...`,duration:0,key:e});try{(await c(e,{aspectRatio:le,resolution:de})).status===`failed`?(T(t=>({...t,[e]:`failed`})),Z.error({content:`「${ht}」提交失败`,key:e,duration:3})):(Z.success({content:`「${ht}」已提交,正在生成中...`,key:e,duration:3}),kt(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}))}},jt=async e=>{let t=mt.find(t=>t.id===e);if(t){C(t=>({...t,[e]:!0})),T(t=>({...t,[e]:`generating`})),Z.loading({content:`「${ht}」正在重新提交...`,duration:0,key:e});try{let n=E[e];n&&n!==t.optimizedPrompt&&await fie(e,n),(await c(e,{aspectRatio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`})).status===`failed`?(T(t=>({...t,[e]:`failed`})),Z.error({content:`「${ht}」提交失败`,key:e,duration:3})):(Z.success({content:`「${ht}」已提交,正在生成中...`,key:e,duration:3}),kt(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}))}}},Mt=e=>{let t=w[e.id];return t===`generating`?`generating`:t===`done`?`completed`:t===`failed`?`failed`:e.status},Nt={optimizing:{color:`processing`,text:`优化中`,icon:(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,$.jsx)(DV,{})},generating:{color:`warning`,text:`生成中`,icon:(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}})},completed:{color:`success`,text:`已完成`,icon:(0,$.jsx)(A4,{})},failed:{color:`error`,text:`失败`,icon:(0,$.jsx)(N4,{})}},Pt=({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)(mQ,{style:{fontSize:9,color:`#94a3b8`,transition:`transform 0.2s`,transform:i?`rotate(180deg)`:`rotate(0deg)`}})]}),d&&(0,Vi.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)]})},Ft=({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)(mQ,{style:{fontSize:9,color:t?`#6366f1`:`#94a3b8`,transition:`transform 0.2s`,transform:n?`rotate(180deg)`:`rotate(0deg)`}})]}),l&&(0,Vi.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`,{style:{margin:`-24px -32px -32px`,borderRadius:20,height:`calc(100vh - 34px)`,padding:`24px`,background:`#fff`,overflowY:`auto`},children:[(0,$.jsxs)(`div`,{className:`gen-header animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`16px 24px`,borderRadius:16,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(z2,{}),onClick:()=>t(`/projects`),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:ht}),pt&&(0,$.jsx)(h$,{style:{background:`rgba(99, 102, 241, 0.08)`,border:`1px solid rgba(99, 102, 241, 0.15)`,color:`#6366f1`,borderRadius:6},children:U[pt.industry]||pt.industry})]}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13},children:`描述视频 → AI优化 → 生成视频`})]}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsxs)(h$,{style:{background:`rgba(99, 102, 241, 0.08)`,border:`1px solid rgba(99, 102, 241, 0.15)`,color:`#6366f1`,borderRadius:20,fontSize:13,padding:`4px 14px`},children:[`剩余 `,_t,` 积分`]})]}),!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)(HI.Group,{defaultValue:`video`,buttonStyle:`solid`,onChange:tt,children:[(0,$.jsxs)(HI.Button,{value:`video`,children:[(0,$.jsx)(v5,{style:{marginRight:6,fontSize:14}}),` `,`视频`]}),(0,$.jsxs)(HI.Button,{value:`image`,style:{zIndex:0},children:[(0,$.jsx)(e8,{style:{marginRight:6,fontSize:14}}),` `,`图片`]})]})]}),xe===`video`&&[{icon:(0,$.jsx)(Z$,{}),label:`描述视频+时长`,color:`#6366f1`},{icon:(0,$.jsx)(s5,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(D8,{}),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)),xe===`image`&&[{icon:(0,$.jsx)(Z$,{}),label:`描述图片+尺寸`,color:`#6366f1`},{icon:(0,$.jsx)(s5,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(D8,{}),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)(bU,{form:n,initialValues:{},children:[(0,$.jsx)(bU.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`&&oe(`http://ceshi.apiforeign.minzhong.cn${e.url}`)},children:e.type===`image`?(0,$.jsx)(bW,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(q7,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`})}),(0,$.jsx)(`div`,{className:`ref-delete`,onClick:n=>{n.stopPropagation(),K5(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)(N4,{style:{color:`#fff`,fontSize:10}})})]},t)),(0,$.jsx)(K7,{accept:`image/*,video/*`,onLocalSelect:e=>{e.forEach(async e=>{await Le(e)})},onHistorySelect:e=>{e.forEach(e=>{N(t=>[...t,{url:e.resourceUrl||e.previewUrl||e.displayUrl||``,type:e.resourceType,name:e.fileName||``}])}),Z.success(`成功添加${e.length}个历史记录`)},onPortraitSelect:e=>{e.forEach(e=>{N(t=>[...t,{url:e.previewUrl||``,type:e.assetType===`Video`?`video`:`image`,name:e.name||`真人素材`,source:`private_portrait_asset`,private_asset_id:e.id,label:``,duration:e.assetType===`Video`?e.videoDuration||0:void 0}])}),Z.success(`已添加 ${e.length} 个真人素材参考`)},uploading:P,tooltipTitle:`图片${M.filter(e=>e.type===`image`).length}/5,视频${M.filter(e=>e.type===`video`).length}/2`,maxImageCount:5,maxVideoCount:2,usedImageCount:M.filter(e=>e.type===`image`).length,usedVideoCount:M.filter(e=>e.type===`video`).length,usedVideoDuration:M.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0),maxVideoDuration:15,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)(mL,{style:{fontSize:18,color:`#94a3b8`}})})})]}),(0,$.jsx)(`div`,{style:{padding:`8px 16px 4px`},children:(0,$.jsx)(tG.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)},onPaste:e=>{let t=e.clipboardData?.items;if(!t)return;let n=[];for(let e=0;e0&&(e.preventDefault(),n.forEach(async e=>{await Le(e)}))},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)(l8,{style:{color:`#fff`,fontSize:14}})}),(0,$.jsx)(Q.Text,{style:{fontSize:13},children:e.name}),(0,$.jsx)(h$,{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:[xe!==`image`&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,flex:1,flexWrap:`wrap`},children:[(0,$.jsx)(Pt,{label:`时长`,value:`${se}`,options:he.durations.map(e=>`${e}`),suffix:`秒`,expanded:pe===`duration`,onToggle:()=>me(pe===`duration`?null:`duration`),onSelect:e=>ce(parseInt(e)),onClose:()=>me(null)}),gt.map((e,t)=>{let n=K===e.name,r=te[e.name];return(0,$.jsx)(Ft,{group:e,selected:r,expanded:n,onToggle:()=>re(n?null:e.name),onSelect:t=>{ne(n=>{let r={...n};return r[e.name]===t?delete r[e.name]:r[e.name]=t,r})},onClose:()=>re(null)},`og-${t}`)})]}),xe==`image`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>Me(!je),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:Ce===`auto`?`智能`:Ce}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#9ca3af`},children:[Te==`2K`?`高清 2K`:`超清 4K`,`| `,De,`×`,ke]})]})}),(0,$.jsx)(mQ,{style:{fontSize:14,color:`#9ca3af`}})]}),je&&(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:He.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{we(e.value),Be(e.label)},style:{flex:`0 0 calc(11.11% - 5px)`,minWidth:48,height:56,borderRadius:8,border:Ce===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:Ce===e.value?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:(()=>{let[t,n]=e.value===`auto`?[1,1]:e.value.split(`:`).map(Number);return t>=n?20:Math.round(t/n*20)})(),height:(()=>{let[t,n]=e.value===`auto`?[1,1]:e.value.split(`:`).map(Number);return n>=t?20:Math.round(n/t*20)})(),border:`2px solid ${Ce===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:Ce===e.value?`#6366f1`:`#9ca3af`},children:`智`})}),(0,$.jsx)(`span`,{style:{fontSize:10,color:Ce===e.value?`#6366f1`:`#6b7280`,fontWeight:Ce===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:We.map(e=>(0,$.jsx)(`button`,{onClick:()=>{Ee(e.value),Ve(e.label)},style:{flex:1,height:48,borderRadius:8,border:Te===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:Te===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:Te===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)(tG,{value:De,onChange:e=>Oe(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:et,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)(aW,{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)(tG,{value:ke,onChange:e=>Ae(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:[xe===`image`&&(0,$.jsx)(`span`,{style:{color:`#7c7c7c`,fontSize:14},children:`(请在左侧选择图片比例和尺寸)`}),(0,$.jsx)(X,{type:`primary`,size:`large`,onClick:xt,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)(RL,{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)(A4,{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:[`文本优化消耗 `,_e,` 积分· 您可以编辑提示词后选择参数生成视频`]})]})]}):(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)(A4,{style:{color:`#10b981`,fontSize:18}}),w[h.id]===`failed`&&(0,$.jsx)(N4,{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`&&`${xe===`image`?`图片`:`视频`}生成中,请稍候...`,w[h.id]===`done`&&`${xe===`image`?`图片`:`视频`}生成成功`,w[h.id]===`failed`&&`${xe===`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)(EH,{size:4,children:[(0,$.jsx)(Cw,{title:`复制`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(b1,{}),onClick:()=>{navigator.clipboard.writeText(_),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(0,$.jsx)(Cw,{title:`编辑`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(Z$,{}),onClick:()=>b(!0),style:{color:`#6366f1`}})})]})]}),y?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(tG.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)(X,{size:`small`,onClick:()=>{v(h.optimizedPrompt||``),b(!1)},children:`取消`}),(0,$.jsx)(X,{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)(EH,{size:4,children:[(0,$.jsx)(Cw,{title:`复制`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(b1,{}),onClick:()=>{navigator.clipboard.writeText(_),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(0,$.jsx)(Cw,{title:`编辑`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(Z$,{}),onClick:()=>b(!0),style:{color:`#6366f1`}})})]})]}),y?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(tG.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)(X,{size:`small`,onClick:()=>{v(h.optimizedPrompt||``),b(!1)},children:`取消`}),(0,$.jsx)(X,{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)(bW,{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:[xe!==`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:[se,`s`]})]}),(0,$.jsx)(Pt,{label:`比例`,value:le,options:he.ratios,expanded:pe===`ratio`,onToggle:()=>me(pe===`ratio`?null:`ratio`),onSelect:e=>ue(e),onClose:()=>me(null)}),(0,$.jsx)(Pt,{label:`分辨率`,value:de,options:he.resolutions,expanded:pe===`resolution`,onToggle:()=>me(pe===`resolution`?null:`resolution`),onSelect:e=>fe(e),onClose:()=>me(null)})]})]}),xe==`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:_e})]}),(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:[`预估`,xe===`image`?`图片`:`视频`,`积分`]}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#10b981`},children:xe===`image`&&h.imageSize?vt(h.imageSize)||yt:Re(se,de)})]}),(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:(_e+(xe===`image`?vt(h.imageSize):Re(se,de))).toFixed(2)})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsxs)(X,{size:`large`,onClick:()=>{m(!1),g(null),v(``),L(``),N([]),ne({}),re(null),me(null),n.resetFields()},style:{borderRadius:12,minWidth:120,height:44,fontWeight:500},children:[`配置新`,xe===`image`?`图片`:`视频`]}),(0,$.jsx)(Cw,{title:bt?``:`积分不足`,children:(0,$.jsx)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(D8,{}),onClick:()=>At(h.id),loading:w[h.id]===`generating`,disabled:!bt||w[h.id]===`generating`||w[h.id]===`done`,style:{borderRadius:12,minWidth:180,height:44,fontWeight:600,background:w[h.id]===`done`?`#10b981`:bt?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`:`#d1d5db`,border:`none`,boxShadow:bt?`0 8px 24px rgba(99,102,241,0.3)`:`none`},children:w[h.id]===`done`?`生成完成`:w[h.id]===`generating`?`生成中...`:`生成${xe===`image`?`图片`:`视频`} (${xe===`image`?vt(h.imageSize):Re(se,de)}积分)`})})]})]}),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`&&oe(`http://ceshi.apiforeign.minzhong.cn${e.url}`)},children:[e.type===`image`?(0,$.jsx)(bW,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},preview:!0}):(0,$.jsx)(q7,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,width:64,height:64}),(0,$.jsx)(h$,{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))})]})]}),mt.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,background:`#fff`,borderRadius:12,padding:8,border:`1px solid #f0f0f5`},className:`stagger-children`,children:mt.map((e,t)=>{let n=Mt(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?`8px 8px 0 0`:8,background:`#fafafa`,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)(e8,{style:{color:`#d97706`,fontSize:12}}):(0,$.jsx)(v5,{style:{color:`#2563eb`,fontSize:12}})}),i?(0,$.jsx)(mQ,{style:{color:`#6366f1`,fontSize:11,flexShrink:0}}):(0,$.jsx)(D4,{style:{color:`#cbd5e1`,fontSize:11,flexShrink:0}}),(0,$.jsx)(h$,{color:Nt[n]?.color,icon:Nt[n]?.icon,style:{margin:0},children:Nt[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)(h$,{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:z7(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:z7(e.createdAt)})]}),(0,$.jsx)(`div`,{className:`record-actions`,onClick:e=>e.stopPropagation(),children:(0,$.jsx)(EH,{children:n===`failed`&&(0,$.jsx)(X,{type:`primary`,danger:!0,size:`small`,icon:(0,$.jsx)(l8,{}),loading:x[e.id],onClick:()=>jt(e.id),style:{borderRadius:8},children:`重试`})})})]}),i&&(0,$.jsx)(`div`,{style:{background:`#fff`,borderRadius:`0 0 8px 8px`,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)(EH,{size:4,children:[(0,$.jsx)(Cw,{title:`复制`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(b1,{}),onClick:()=>{navigator.clipboard.writeText(r),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(n===`prompt_optimized`||n===`failed`)&&(0,$.jsx)(Cw,{title:`编辑`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(Z$,{}),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)(tG.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)(X,{size:`small`,onClick:()=>k(null),children:`取消`}),(0,$.jsx)(X,{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`&&oe(`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)(bW,{src:`http://ceshi.apiforeign.minzhong.cn${t.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},preview:!0}):(0,$.jsx)(q7,{src:`http://ceshi.apiforeign.minzhong.cn${t.url}`,width:64,height:64})}),(0,$.jsx)(h$,{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(),K5(t.url).catch(()=>{});let i=e.references.filter((e,t)=>t!==r);R7.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)(N4,{style:{color:`#fff`,fontSize:10}})})]},r)),n===`failed`&&(0,$.jsx)(R0,{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?U5(t).then(n=>{let r={url:n.url,type:`image`,name:t.name||`图片`},i=e.references||[];R7.getState().updateRecordReferences(e.id,[...i,r]),Z.success(`上传成功`)}).catch(()=>Z.error(`上传失败`)):new Promise(e=>{let n=document.createElement(`video`);n.preload=`metadata`,n.onloadedmetadata=()=>{e(n.duration||0),n.remove()},n.onerror=()=>{e(0),n.remove()},n.src=URL.createObjectURL(t)}).then(n=>{W5(t,n).then(r=>{let i={url:r.url,type:`video`,name:t.name||`视频`,duration:n||void 0},a=e.references||[];R7.getState().updateRecordReferences(e.id,[...a,i]),Z.success(`上传成功`)}).catch(()=>Z.error(`上传失败`))}),!1)},children:(0,$.jsx)(Cw,{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)(mL,{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)(Pt,{label:`比例`,value:ie[e.id]?.aspectRatio||`选择比例`,options:he.ratios,expanded:pe===`ratio-${e.id}`,onToggle:()=>me(pe===`ratio-${e.id}`?null:`ratio-${e.id}`),onSelect:t=>ae(n=>({...n,[e.id]:{...n[e.id],aspectRatio:t,resolution:n[e.id]?.resolution||``}})),onClose:()=>me(null)}),(0,$.jsx)(Pt,{label:`分辨率`,value:ie[e.id]?.resolution||`选择分辨率`,options:he.resolutions,expanded:pe===`res-${e.id}`,onToggle:()=>me(pe===`res-${e.id}`?null:`res-${e.id}`),onSelect:t=>ae(n=>({...n,[e.id]:{...n[e.id],aspectRatio:n[e.id]?.aspectRatio||``,resolution:t}})),onClose:()=>me(null)})]}),(0,$.jsxs)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(D8,{}),block:!0,loading:x[e.id],disabled:a===`video`&&(!ie[e.id]?.aspectRatio||!ie[e.id]?.resolution),onClick:async()=>{let t=ie[e.id];if(a===`video`){if(!t?.aspectRatio||!t?.resolution){Z.error(`请选择比例和分辨率`);return}if(_t({...t,[e.id]:!0})),T(t=>({...t,[e.id]:`generating`}));let n=a===`video`?`视频`:`图片`;Z.loading({content:`「${ht}」正在生成${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:`「${ht}」${n}生成成功!`,key:e.id,duration:3})}catch{T(t=>({...t,[e.id]:`failed`})),Z.error({content:`「${ht}」${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`&&ie[e.id]?.resolution?`(${Re(e.duration||5,ie[e.id].resolution)}积分)`:``,a===`image`&&e.imageSize?`(${ze(e.imageSize)}积分)`:a===`image`?`(积分)`:``]})]}),n===`failed`&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:18,right:20},children:(0,$.jsxs)(X,{type:`primary`,danger:!0,size:`large`,icon:(0,$.jsx)(l8,{}),block:!0,loading:x[e.id],onClick:()=>jt(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)(Cw,{title:`下载${a===`video`?`视频`:`图片`}`,children:(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(M0,{}),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)(EH,{children:[a===`video`?(0,$.jsx)(v5,{style:{color:`#6366f1`,fontSize:13}}):(0,$.jsx)(e8,{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:z7(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)(N4,{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)(DV,{style:{color:`#94a3b8`,fontSize:28}}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:a===`image`?`待生成图片`:n===`prompt_optimized`?`待配置视频参数`:`待生成视频`})]})]})]})})]},e.id)})})]}),(0,$.jsx)(NK,{open:!!q,onCancel:()=>oe(null),footer:null,width:480,centered:!0,destroyOnHidden:!0,closable:!1,title:null,styles:{body:{padding:0,background:`#000`,position:`relative`}},children:q&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:q,controls:!0,autoPlay:!0,style:{width:`100%`,display:`block`,maxHeight:`70vh`}}),(0,$.jsx)(`div`,{onClick:()=>oe(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)(T5,{style:{color:`#fff`,fontSize:16}})})]})})]})},J7={optimizing:{color:`processing`,text:`优化中`,icon:(0,$.jsx)(Xm,{spin:!0})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,$.jsx)(DV,{})},generating:{color:`warning`,text:`生成中`,icon:(0,$.jsx)(Xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,$.jsx)(A4,{})},failed:{color:`error`,text:`失败`,icon:(0,$.jsx)(N4,{})}},Zae=()=>{let e=Ye(),{records:t,projects:n,fetchRecords:r,fetchProjects:i,generateVideo:a}=R7(),o=t.items,[s,c]=(0,S.useState)(1),[l,u]=(0,S.useState)(10),[d,f]=(0,S.useState)({}),[p,m]=(0,S.useState)(void 0),[h,g]=(0,S.useState)(void 0),[_,v]=(0,S.useState)({}),[y,b]=(0,S.useState)(null),[x,C]=(0,S.useState)(null),[w,T]=(0,S.useState)(null);(0,S.useEffect)(()=>{i()},[i]),(0,S.useEffect)(()=>{r({projectId:p,status:h,page:s,pageSize:l})},[r,p,h,s,l]);let E=async()=>{if(!w)return;let{recordId:e,projectName:t,ratio:n,resolution:r}=w;f(t=>({...t,[e]:!0})),T(null),Z.loading({content:`「${t}」正在生成视频...`,duration:0,key:e});try{await a(e,{aspectRatio:n,resolution:r}),Z.success({content:`「${t}」视频生成成功!`,key:e,duration:3})}catch{Z.error({content:`「${t}」视频生成失败`,key:e,duration:3})}finally{f(t=>({...t,[e]:!1}))}},D=e=>{if((e.genType||`image`)===`image`){f(t=>({...t,[e.id]:!0})),Z.loading({content:`「${e.projectName}」正在生成图片...`,duration:0,key:e.id}),a(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(()=>{f(t=>({...t,[e.id]:!1}))});return}T({recordId:e.id,projectName:e.projectName,ratio:e.aspectRatio||`16:9`,resolution:e.resolution||`720p`})},O=o;return(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20,padding:`16px 24px`,borderRadius:16,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(z2,{}),onClick:()=>e(`/projects`),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Title,{level:2,style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`项目记录`}),(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`},children:`查看所有视频生成记录,点击记录查看完整内容和视频`})]}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]})}),(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)(EH,{children:[(0,$.jsx)(x3,{style:{color:`#94a3b8`}}),(0,$.jsx)(NC,{placeholder:`全部项目`,allowClear:!0,style:{width:200},onChange:e=>{m(e),c(1)},children:n.map(e=>(0,$.jsx)(NC.Option,{value:e.id,children:e.name},e.id))}),(0,$.jsxs)(NC,{placeholder:`全部状态`,allowClear:!0,style:{width:140},onChange:e=>{g(e),c(1)},children:[(0,$.jsx)(NC.Option,{value:`prompt_optimized`,children:`待生成`}),(0,$.jsx)(NC.Option,{value:`generating`,children:`生成中`}),(0,$.jsx)(NC.Option,{value:`completed`,children:`已完成`}),(0,$.jsx)(NC.Option,{value:`failed`,children:`失败`})]})]}),(0,$.jsxs)(Q.Text,{style:{marginLeft:`auto`,lineHeight:`32px`,color:`#94a3b8`,fontSize:13},children:[`共 `,t.total,` 条记录`]})]}),O.length===0?(0,$.jsx)(rC,{image:rC.PRESENTED_IMAGE_SIMPLE,description:`暂无生成记录`,style:{padding:60}}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},className:`stagger-children`,children:O.map((e,t)=>{let n=y===e.id,r=_[e.id]??e.optimizedPrompt,i=d[e.id],a=x===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:()=>C(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)(e8,{style:{color:`#d97706`,fontSize:12}}):(0,$.jsx)(v5,{style:{color:`#2563eb`,fontSize:12}})}),a?(0,$.jsx)(mQ,{style:{color:`#6366f1`,fontSize:12,flexShrink:0}}):(0,$.jsx)(D4,{style:{color:`#cbd5e1`,fontSize:12,flexShrink:0}}),(0,$.jsx)(h$,{color:J7[e.status].color,icon:J7[e.status].icon,style:{margin:0},children:J7[e.status].text}),(0,$.jsx)(h$,{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:z7(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:z7(e.createdAt)})]}),(0,$.jsx)(`div`,{className:`record-actions`,onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(EH,{children:[e.status===`prompt_optimized`&&(0,$.jsx)(X,{type:`primary`,size:`small`,icon:(0,$.jsx)(l8,{}),loading:i,onClick:()=>D(e),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`生成`}),e.status===`generating`&&(0,$.jsx)(h$,{color:`processing`,icon:(0,$.jsx)(Xm,{spin:!0}),style:{padding:`4px 12px`,fontSize:12},children:`生成中...`}),e.status===`failed`&&(0,$.jsx)(X,{type:`primary`,danger:!0,size:`small`,icon:(0,$.jsx)(l8,{}),loading:i,onClick:()=>D(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)(EH,{size:4,children:[(0,$.jsx)(Cw,{title:`复制`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(b1,{}),onClick:()=>{navigator.clipboard.writeText(r),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),e.status===`prompt_optimized`&&(0,$.jsx)(Cw,{title:`编辑`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(Z$,{}),onClick:()=>{b(e.id),v(t=>({...t,[e.id]:t[e.id]??e.optimizedPrompt}))},style:{color:`#6366f1`}})})]})]}),n?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(tG.TextArea,{value:r,onChange:t=>v(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)(X,{size:`small`,onClick:()=>b(null),children:`取消`}),(0,$.jsx)(X,{size:`small`,type:`primary`,onClick:()=>{v(t=>({...t,[e.id]:r})),b(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)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(D8,{}),loading:i,onClick:()=>D(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)(X,{type:`primary`,danger:!0,size:`large`,icon:(0,$.jsx)(l8,{}),loading:i,onClick:()=>D(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)(Cw,{title:`下载${o===`video`?`视频`:`图片`}`,children:(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(M0,{}),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)(EH,{children:[o===`video`?(0,$.jsx)(v5,{style:{color:`#6366f1`}}):(0,$.jsx)(e8,{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:[`生成于 `,z7(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)(N4,{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)(DV,{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)})}),t.total>0&&(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:18},children:(0,$.jsx)(VG,{current:t.page||s,pageSize:t.pageSize||l,total:t.total,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{c(e),u(t)}})}),(0,$.jsx)(NK,{title:(0,$.jsxs)(EH,{children:[(0,$.jsx)(D8,{}),`生成视频`]}),open:!!w,onCancel:()=>T(null),onOk:E,okText:`提交生成`,cancelText:`取消`,width:420,children:w&&(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:(()=>{let e=o.find(e=>e.id===w.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)(NC,{value:w.ratio,onChange:e=>T(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)(NC,{value:w.resolution,onChange:e=>T(t=>t?{...t,resolution:e}:null),style:{width:`100%`},options:[`480p`,`720p`,`1080p`].map(e=>({value:e,label:e}))})]})]})})()})})]})},Y7=({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()})},Qae=()=>{let{user:e}=M7(),[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 q5(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)(mJ,{gutter:[16,16],style:{marginBottom:24},children:[(0,$.jsx)(pz,{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)(EH,{style:{marginBottom:10},children:[(0,$.jsx)(b5,{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)(Y7,{value:e?.credits??0})})]})]})}),(0,$.jsx)(pz,{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)(EH,{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)(G2,{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)(Y7,{value:f})})]})}),(0,$.jsx)(pz,{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)(EH,{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)(I2,{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)(Y7,{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)(s5,{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)(n$,{columns:[{title:`类型`,dataIndex:`type`,key:`type`,width:100,render:e=>(0,$.jsx)(h$,{color:e===`recharge`?`green`:`orange`,icon:e===`recharge`?(0,$.jsx)(G2,{}):(0,$.jsx)(I2,{}),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:z7(e)})}],dataSource:t,rowKey:`id`,loading:r,pagination:{current:a,pageSize:s,total:l,onChange:d,showSizeChanger:!0,showTotal:e=>`共 ${e} 条`},scroll:{x:500}})})]})]})},$ae=()=>{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 q5(c,u);r(e.records||[]),a(e.credits||0),s(e.total||0)}catch{r([])}t(!1)};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(mJ,{gutter:[16,16],style:{marginBottom:24},children:[(0,$.jsx)(pz,{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)(b5,{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)(pz,{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)(f8,{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)(pz,{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)(s5,{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)(s5,{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)(cK,{spinning:e,children:n.length===0?(0,$.jsx)(rC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无积分变动记录`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(n$,{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)(h$,{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)(VG,{current:c,pageSize:u,total:o,onChange:e=>{l(e)},size:`small`})})]})})})]})]})},eoe=()=>{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 bie(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)(jH,{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)(cK,{spinning:e,children:n.length===0?(0,$.jsx)(rC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无订单记录`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(n$,{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)(D2,{style:{fontSize:16}}),label:`支付宝`,color:`#1677ff`},wechat:{icon:(0,$.jsx)(C5,{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)(h$,{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)(VG,{current:o,pageSize:c,total:i,onChange:e=>{s(e)},size:`small`})})]})})})]})})},toe=()=>{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 X5(c,u);r(e.items||[]),s(e.total||0)}catch{r([])}t(!1)},f=async()=>{try{a(await Z5())}catch{a(0)}},p=async e=>{try{await Q5(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)(o4,{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)(cK,{spinning:e,children:n.length===0?(0,$.jsx)(rC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无消息`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(n$,{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)(z8,{style:{fontSize:14}})},credit:{color:`#f59e0b`,label:`积分`,bg:`rgba(245,158,11,0.1)`,icon:(0,$.jsx)(b5,{style:{fontSize:14}})},promo:{color:`#8b5cf6`,label:`活动`,bg:`rgba(139,92,246,0.1)`,icon:(0,$.jsx)(N3,{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)(h$,{color:`gray`,style:{background:`rgba(148,163,184,0.1)`},children:`已读`}):(0,$.jsx)(h$,{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)(X,{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)(VG,{current:c,pageSize:u,total:o,onChange:e=>{l(e)},size:`small`})})]})})})]})})},X7=()=>{let[e]=On(),[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)(IL,{activeKey:t,onChange:n,items:[{key:`credits`,label:`积分明细`},{key:`orders`,label:`订单记录`}],style:{marginBottom:24},size:`large`}),t===`credits`&&(0,$.jsx)($ae,{}),t===`orders`&&(0,$.jsx)(eoe,{})]})},noe=`/assets/bg1-CQh9PRPW.png`,{Text:Z7}=Q,roe=({items:e,selectedId:t,onSelect:n})=>e.length?(0,$.jsx)(EH,{direction:`vertical`,style:{width:`100%`},size:10,children:e.map(e=>{let r=t===e.id;return(0,$.jsxs)(`div`,{onClick:()=>n(e),style:{padding:14,borderRadius:14,cursor:`pointer`,border:r?`1px solid #8b5cf6`:`1px solid #e2e8f0`,background:r?`#f5f3ff`:`#fff`},children:[(0,$.jsx)(EH,{style:{width:`100%`,justifyContent:`space-between`},align:`start`,children:(0,$.jsxs)(`div`,{style:{minWidth:0},children:[(0,$.jsx)(Z7,{strong:!0,ellipsis:!0,style:{display:`block`},children:e.name}),e.description&&(0,$.jsx)(Z7,{type:`secondary`,ellipsis:!0,style:{display:`block`,fontSize:12},children:e.description})]})}),(0,$.jsxs)(EH,{wrap:!0,size:4,style:{marginTop:10},children:[(0,$.jsxs)(h$,{children:[`总 `,e.assetCount||0]}),(0,$.jsxs)(h$,{color:`green`,children:[`图 `,e.imageAssetCount||0]}),(0,$.jsxs)(h$,{color:`blue`,children:[`视频 `,e.videoAssetCount||0]})]})]},e.id)})}):(0,$.jsx)(rC,{description:`暂无项目组`}),ioe={Active:`green`,Processing:`processing`,Failed:`red`,local_deleted:`default`,remote_deleted:`default`,delete_failed:`red`},aoe={Active:`入库成功`,Processing:`入库处理中`,Failed:`入库失败`,local_deleted:`本地已删除`,remote_deleted:`远程已删除`,delete_failed:`删除失败`},Q7=e=>e?e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`)||e.startsWith(`blob:`)?e:`${`http://ceshi.apiforeign.minzhong.cn`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,$7=e=>e.assetType===`Video`?Q7(e.videoCoverUrl||e.previewUrl||e.displayUrl||e.remoteUrl||e.sourceUrl):Q7(e.previewUrl||e.displayUrl||e.videoCoverUrl||e.remoteUrl||e.sourceUrl),ooe=e=>{let t=Number(e||0);return!Number.isFinite(t)||t<=0?`-`:`${t.toFixed(t>=10?0:1)}s`},soe=({items:e,onDelete:t,onRefresh:n})=>{let r=(0,S.useRef)(null),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(``),[c,l]=(0,S.useState)(`Image`);(0,S.useEffect)(()=>(e.some(e=>e.status!==`Failed`&&e.status!==`Active`)&&n?r.current||=window.setInterval(()=>{n()},3e3):r.current&&=(clearInterval(r.current),null),()=>{r.current&&=(clearInterval(r.current),null)}),[e,n]);let u=e=>{let t=$7(e);t&&(s(t),l(e.assetType===`Video`?`Video`:`Image`),a(!0))};return e.length?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(220px, 1fr))`,gap:14},children:e.map(e=>{let n=e.assetType===`Video`,r=$7(e);return(0,$.jsx)(RL,{hoverable:!0,bodyStyle:{padding:12},style:{borderRadius:16,overflow:`hidden`,borderColor:`#eef2f7`},cover:(0,$.jsxs)(`div`,{style:{height:170,background:`#f8fafc`,display:`flex`,alignItems:`center`,justifyContent:`center`,position:`relative`},children:[r?n&&e.videoCoverUrl?(0,$.jsx)(`img`,{src:r,alt:e.name||`视频封面`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):n?(0,$.jsx)(`video`,{src:r,muted:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`img`,{src:r,alt:e.name||``,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):n?(0,$.jsx)(v5,{style:{fontSize:42,color:`#64748b`}}):(0,$.jsx)(e8,{style:{fontSize:42,color:`#64748b`}}),n&&(0,$.jsx)(h$,{color:`blue`,style:{position:`absolute`,left:10,top:10},children:`视频`}),r&&(0,$.jsx)(X,{size:`small`,shape:`circle`,icon:(0,$.jsx)(NW,{}),style:{position:`absolute`,right:10,top:10},onClick:()=>u(e)}),n&&(0,$.jsx)(`div`,{style:{position:`absolute`,left:10,bottom:10,padding:`2px 6px`,borderRadius:8,background:`rgba(15,23,42,0.72)`,color:`#fff`,fontSize:12},children:ooe(e.videoDuration)})]}),children:(0,$.jsxs)(EH,{direction:`vertical`,size:8,style:{width:`100%`},children:[(0,$.jsx)(Cw,{title:e.name||e.remoteAssetId||e.id,children:(0,$.jsx)(`div`,{style:{fontWeight:600,color:`#1e293b`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.name||e.remoteAssetId||`未命名素材`})}),(0,$.jsxs)(EH,{wrap:!0,size:4,children:[(0,$.jsx)(h$,{color:ioe[e.status]||`default`,children:aoe[e.status]||e.status}),(0,$.jsx)(h$,{color:n?`blue`:`default`,children:n?`视频`:`图片`})]}),(0,$.jsx)(EH,{size:6,wrap:!0,children:(0,$.jsx)(LK,{title:`确认删除这个素材吗?`,onConfirm:()=>t(e.id),children:(0,$.jsx)(X,{size:`small`,danger:!0,icon:(0,$.jsx)(k$,{}),children:`删除`})})})]})},e.id)})}),(0,$.jsx)(NK,{title:`素材预览`,open:i,onCancel:()=>a(!1),footer:null,width:760,destroyOnClose:!0,children:(0,$.jsx)(`div`,{style:{minHeight:420,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#0f172a`,borderRadius:12,overflow:`hidden`},children:c===`Video`?(0,$.jsx)(`video`,{src:o,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:520}}):(0,$.jsx)(`img`,{src:o,alt:`素材预览`,style:{maxWidth:`100%`,maxHeight:520,objectFit:`contain`}})})})]}):(0,$.jsx)(rC,{description:`暂无素材`})},e9=2,t9=15,coe=e=>{if(!e)return`Image`;if(e.type.startsWith(`video/`))return`Video`;let t=e.name.toLowerCase();return/\.(mp4|mov|webm|m4v|avi|mkv)$/.test(t)?`Video`:`Image`},loe=e=>new Promise(t=>{if(!e.type.startsWith(`video/`)){t(null);return}let n=URL.createObjectURL(e),r=document.createElement(`video`);r.preload=`metadata`,r.onloadedmetadata=()=>{let e=Number.isFinite(r.duration)?r.duration:null;URL.revokeObjectURL(n),t(e)},r.onerror=()=>{URL.revokeObjectURL(n),t(null)},r.src=n}),uoe=e=>e==null||!Number.isFinite(e)||e<=0?(Z.error(`无法读取视频秒数,请检查视频文件是否损坏`),!1):et9?(Z.error(`视频素材最长不能超过 ${t9} 秒`),!1):!0,doe=({projectId:e,open:t,onClose:n,onSuccess:r})=>{let[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(``),[c,l]=(0,S.useState)(!1),u=()=>{a([]),s(``)};return(0,$.jsx)(NK,{title:`上传真人素材`,open:t,onCancel:n,onOk:async()=>{let t=i[0]?.originFileObj;if(!t){Z.warning(`请先选择图片或视频素材`);return}let a=coe(t);if(a===`Image`&&!t.type.startsWith(`image/`)){Z.error(`仅支持图片或视频素材`);return}l(!0);try{let i=a===`Video`?await loe(t):null;if(a===`Video`&&!uoe(i))return;let s=a===`Video`?await aie(t,i||void 0):await iie(t);await fae(e,{url:s.url,assetType:a,name:o.trim()||t.name,videoDuration:s.duration_seconds??i,fileSize:s.file_size_bytes??t.size,mimeType:t.type||null,uploadResourceId:s.resource_id||null}),Z.success(a===`Video`?`视频素材已提交入库,处理中`:`图片素材已提交入库,处理中`),u(),r(),n()}catch(e){Z.error(e?.message||`上传素材失败`)}finally{l(!1)}},confirmLoading:c,okText:`提交入库`,destroyOnHidden:!0,children:(0,$.jsxs)(EH,{direction:`vertical`,style:{width:`100%`},size:12,children:[(0,$.jsx)(tG,{value:o,onChange:e=>s(e.target.value),placeholder:`素材名称,默认使用文件名`,maxLength:256}),(0,$.jsx)(R0,{accept:`image/*,video/*`,maxCount:1,fileList:i,beforeUpload:()=>!1,onChange:({fileList:e})=>a(e),listType:`picture`,children:(0,$.jsx)(X,{icon:(0,$.jsx)(p5,{}),children:`选择图片或视频`})}),(0,$.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12},children:[`当前开放图片和视频,音频暂不接入。视频素材必须在 `,e9,`~`,t9,` 秒内;入库后会经过火山真人一致性校验,Active 后才可用于 AI 创作。`]})]})})},foe=({project:e,onDeleted:t,onChanged:n})=>{let[r,i]=(0,S.useState)([]),[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)(1),[_,v]=(0,S.useState)(20),[y,b]=(0,S.useState)(0),x=async(t=h,n=_)=>{o(!0);try{let r=await pae(e.id,{page:t,pageSize:n,keyword:l,status:d,assetType:p});i(r.items),b(r.total||0),g(t),v(n)}catch(e){Z.error(e?.message||`加载素材失败`)}finally{o(!1)}};(0,S.useEffect)(()=>{x(1,_)},[e.id,l,d,p]);let C=async e=>{try{await mae(e),await x(h,_),n(),Z.success(`素材已删除`)}catch(e){Z.error(e?.message||`删除素材失败`)}},w=async()=>{try{await uae(e.id),Z.success(`项目组已删除`),t()}catch(e){Z.error(e?.message||`删除项目组失败`)}},T=e.status===`active`;return(0,$.jsxs)(RL,{title:(0,$.jsx)(EH,{children:(0,$.jsx)(`span`,{children:e.name})}),extra:(0,$.jsxs)(EH,{children:[(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(p5,{}),disabled:!T,onClick:()=>c(!0),children:`上传素材`}),(0,$.jsx)(LK,{title:`确认删除这个真人素材项目组吗?`,onConfirm:w,children:(0,$.jsx)(X,{danger:!0,icon:(0,$.jsx)(k$,{}),children:`删除项目组`})})]}),style:{borderRadius:16},children:[!T&&(0,$.jsx)(Q.Paragraph,{style:{color:`#f97316`},children:`项目组未完成真人认证,暂不能上传素材。请重新创建项目组并完成手机扫码认证。`}),(0,$.jsxs)(EH,{style:{width:`100%`,marginBottom:16},wrap:!0,children:[(0,$.jsx)(tG.Search,{allowClear:!0,placeholder:`搜索素材名称`,value:l,onChange:e=>u(e.target.value),onSearch:()=>x(1,_),style:{width:240}}),(0,$.jsx)(NC,{allowClear:!0,placeholder:`素材状态`,value:d,onChange:e=>f(e),style:{width:150},options:[{value:`Processing`,label:`处理中`},{value:`Active`,label:`可用`},{value:`Failed`,label:`失败`}]}),(0,$.jsx)(NC,{allowClear:!0,placeholder:`素材类型`,value:p,onChange:e=>m(e),style:{width:130},options:[{value:`Image`,label:`图片`},{value:`Video`,label:`视频`}]}),(0,$.jsx)(X,{onClick:()=>x(1,_),children:`筛选`})]}),(0,$.jsx)(cK,{spinning:a,children:r.length===0?(0,$.jsx)(rC,{description:`暂无素材,上传图片/视频后会异步入库`,style:{marginTop:80}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(soe,{items:r,loading:a,onDelete:C,onRefresh:()=>x(h,_)}),(0,$.jsx)(`div`,{style:{textAlign:`right`,marginTop:16},children:(0,$.jsx)(VG,{current:h,pageSize:_,total:y,showSizeChanger:!0,showTotal:e=>`共 ${e} 个素材`,onChange:(e,t)=>x(e,t)})})]})}),(0,$.jsx)(doe,{projectId:e.id,open:s,onClose:()=>c(!1),onSuccess:()=>{x(1,_),n()}})]})},n9=`group_active`,r9=2e3,poe=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(!1),[g]=bU.useForm(),_=(0,S.useRef)(null),v=()=>{_.current&&=(window.clearInterval(_.current),null)},y=()=>{v(),s(!1),l(!1),h(!1),d(null),p(null),g.resetFields()},b=async()=>{a(!0);try{let e=await k7({pageSize:100,status:`active`});t(e.items),r(t=>t?e.items.find(e=>e.id===t.id)||e.items[0]||null:e.items[0]||null)}catch(e){Z.error(e?.message||`加载真人素材项目组失败`)}finally{a(!1)}};(0,S.useEffect)(()=>{b()},[]),(0,S.useEffect)(()=>()=>v(),[]);let x=async e=>{v(),h(!1),Z.success(`真人认证完成,项目组已创建成功`),s(!1),p(null),d(null),g.resetFields();let n=await k7({pageSize:100,status:`active`});t(n.items),r(n.items.find(t=>t.id===e)||n.items[0]||null)},C=(e,t,n)=>{v(),h(!0);let r=async()=>{try{let n=await dae(e);if(p(n),n.status===n9){await x(t);return}[`callback_failed`,`failed`,`expired`].includes(n.status)&&(v(),h(!1),Z.error(n.errorMessage||`真人认证未完成,请重新创建项目组`))}catch(e){v(),h(!1),Z.error(e?.message||`轮询真人认证状态失败`)}};_.current=window.setInterval(r,Math.max(1e3,n||r9)),r()},w=async()=>{let e=await g.validateFields();l(!0);try{let t=`${window.location.origin}/private-portrait-authorized`,n=await lae({...e,callbackRedirectUrl:t});d(n.project),p(n.validateSession),Z.success(`请使用手机扫码完成人脸认证`),n.validateSession?.id&&C(n.validateSession.id,n.project.id,n.pollIntervalMs||r9)}catch(e){Z.error(e?.message||`创建项目组认证二维码失败`)}finally{l(!1)}},T=f?.h5Link||``,E=f?.status===n9;return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:16,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:`真人素材库`}),(0,$.jsx)(Q.Text,{type:`secondary`,children:`创建项目组时先完成真人认证,认证成功后项目组才会正式创建并可上传素材。`})]}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(mL,{}),onClick:()=>s(!0),children:`创建项目组`})]}),(0,$.jsxs)(mJ,{gutter:16,children:[(0,$.jsx)(pz,{xs:24,lg:5,children:(0,$.jsx)(RL,{style:{borderRadius:16,minHeight:520},children:(0,$.jsx)(cK,{spinning:i,children:e.length===0?(0,$.jsx)(rC,{description:`暂无真人项目组`}):(0,$.jsx)(roe,{items:e,selectedId:n?.id,onSelect:r})})})}),(0,$.jsx)(pz,{xs:24,lg:19,children:n?(0,$.jsx)(foe,{project:n,onDeleted:()=>{r(null),b()},onChanged:b}):(0,$.jsx)(RL,{style:{borderRadius:16,minHeight:520,textAlign:`center`,color:`#94a3b8`},children:`请先创建或选择一个真人素材项目组`})})]}),(0,$.jsx)(NK,{title:`新建真人素材项目组`,open:o,onCancel:y,footer:f?[(0,$.jsx)(X,{onClick:y,children:`关闭`},`close`)]:void 0,onOk:f?void 0:w,okText:`开始认证并创建`,confirmLoading:c,maskClosable:!m,children:f?(0,$.jsxs)(EH,{direction:`vertical`,align:`center`,size:16,style:{width:`100%`},children:[E?(0,$.jsx)(A4,{style:{fontSize:54,color:`#22c55e`}}):T?(0,$.jsx)(Jq,{value:T,size:220}):(0,$.jsx)(cK,{}),(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Title,{level:5,style:{marginBottom:8},children:u?.name||`真人素材项目组`}),(0,$.jsx)(Q.Text,{type:E?`success`:`secondary`,children:E?`认证成功,项目组正在刷新`:`请使用手机扫码完成人脸认证,成功后回到电脑端查看项目组。`})]})]}):(0,$.jsxs)(bU,{form:g,layout:`vertical`,children:[(0,$.jsx)(bU.Item,{label:`项目组名称`,name:`name`,rules:[{required:!0,message:`请输入项目组名称`}],children:(0,$.jsx)(tG,{placeholder:`例如:达人A、客户B、张三人像`})}),(0,$.jsx)(bU.Item,{label:`描述`,name:`description`,children:(0,$.jsx)(tG.TextArea,{rows:3,placeholder:`可选`})}),(0,$.jsx)(Q.Paragraph,{type:`secondary`,style:{marginBottom:0},children:`点击后会生成真人认证二维码。手机扫码认证成功后,项目组才会出现在项目列表中。`})]})})]})},{Text:i9}=Q,a9=2,o9=15,moe={creating:{label:`本地创建中`,color:`processing`},Processing:{label:`入库处理中`,color:`processing`},Active:{label:`入库成功`,color:`success`},Failed:{label:`入库失败`,color:`error`},local_deleted:{label:`本地已删`,color:`default`},remote_deleted:{label:`远端已删`,color:`default`},delete_failed:{label:`远端删除失败`,color:`error`}},hoe=e=>{let t=Number(e||0);return!Number.isFinite(t)||t<=0?`-`:`${t.toFixed(t>=10?0:1)}s`},s9=e=>e?e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`)||e.startsWith(`blob:`)?e:`${`http://ceshi.apiforeign.minzhong.cn`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,c9=e=>e.assetType===`Video`?s9(e.videoCoverUrl||e.previewUrl||e.displayUrl||e.remoteUrl||e.sourceUrl):s9(e.previewUrl||e.displayUrl||e.videoCoverUrl||e.remoteUrl||e.sourceUrl),goe=e=>{if(!e)return`Image`;if(e.type.startsWith(`video/`))return`Video`;let t=e.name.toLowerCase();return/\.(mp4|mov|webm|m4v|avi|mkv)$/.test(t)?`Video`:`Image`},_oe=e=>new Promise(t=>{if(!e.type.startsWith(`video/`)){t(null);return}let n=URL.createObjectURL(e),r=document.createElement(`video`);r.preload=`metadata`,r.onloadedmetadata=()=>{let e=Number.isFinite(r.duration)?r.duration:null;URL.revokeObjectURL(n),t(e)},r.onerror=()=>{URL.revokeObjectURL(n),t(null)},r.src=n}),voe=(e,t)=>e==null||!Number.isFinite(e)||e<=0?(t(`无法读取视频秒数,请检查视频文件是否损坏`),!1):eo9?(t(`视频素材最长不能超过 ${o9} 秒`),!1):!0,yoe=({status:e})=>{let t=e||`-`,n=moe[t];return(0,$.jsx)(h$,{color:n?.color||`default`,children:n?.label||t})},boe=()=>{let{message:e}=Jb.useApp(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(!1),[d,f]=(0,S.useState)(1),[p,m]=(0,S.useState)(20),[h,g]=(0,S.useState)(0),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(),[x,C]=(0,S.useState)(),[w,T]=(0,S.useState)(!1),[E,D]=(0,S.useState)(!1),[O,k]=(0,S.useState)(!1),[A,j]=(0,S.useState)(!1),[M,N]=(0,S.useState)([]),[P,F]=(0,S.useState)(``),[I,L]=(0,S.useState)(!1),[R,z]=(0,S.useState)(``),[B,V]=(0,S.useState)(`Image`),[H]=bU.useForm(),U=(0,S.useRef)(null),W=(0,S.useMemo)(()=>t.find(e=>e.id===r)||null,[t,r]),ee=async()=>{c(!0);try{let e=(await A7({page:1,pageSize:100,status:`active`})).items||[];n(e),i(t=>t&&e.some(e=>e.id===t)?t:e[0]?.id)}catch(t){e.error(t?.message||`加载虚拟人像项目组失败`)}finally{c(!1)}},G=async(t=d,n=p)=>{if(!r){o([]),g(0);return}u(!0);try{let e=await bae(r,{page:t,pageSize:n,keyword:_.trim()||void 0,status:y,assetType:x});o(e.items||[]),g(e.total||0),f(t),m(n)}catch(t){e.error(t?.message||`加载虚拟人像素材失败`)}finally{u(!1)}},te=async()=>{await ee()};(0,S.useEffect)(()=>{te()},[]),(0,S.useEffect)(()=>{r&&G(1,p)},[r]),(0,S.useEffect)(()=>(a.some(e=>e.status!==`Failed`&&e.status!==`Active`)&&r?U.current||=window.setInterval(()=>{G(d,p)},3e3):U.current&&=(clearInterval(U.current),null),()=>{U.current&&=(clearInterval(U.current),null)}),[a,r,d,p]);let ne=async()=>{let t=await H.validateFields();D(!0);try{let n=await _ae(t);e.success(`虚拟人像项目组已创建`),T(!1),H.resetFields(),await ee(),i(n.id)}catch(t){e.error(t?.message||`创建项目组失败`)}finally{D(!1)}},K=async()=>{if(!r){e.warning(`请先创建或选择项目组`);return}let t=M[0]?.originFileObj;if(!t){e.warning(`请先选择图片或视频素材`);return}let n=goe(t);if(n===`Image`&&!t.type.startsWith(`image/`)){e.error(`仅支持图片或视频素材`);return}j(!0);try{let i=n===`Video`?await _oe(t):null;if(n===`Video`&&!voe(i,e.error))return;let a=n===`Video`?await sie(t,i||void 0):await oie(t);await yae(r,{url:a.url,assetType:n,name:P.trim()||t.name,videoDuration:a.duration_seconds??i,fileSize:a.file_size_bytes??t.size,mimeType:t.type||null,uploadResourceId:a.resource_id||null}),e.success(n===`Video`?`视频素材已提交入库,处理中`:`图片素材已提交入库,处理中`),k(!1),N([]),F(``),await Promise.all([ee(),G(1,p)])}catch(t){e.error(t?.message||`上传素材失败`)}finally{j(!1)}},re=async t=>{try{await xae(t),e.success(`素材已删除,远端删除将异步执行`),await Promise.all([ee(),G(d,p)])}catch(t){e.error(t?.message||`删除素材失败`)}},ie=async()=>{if(r)try{await vae(r),e.success(`项目组已删除,远端资产组将异步删除`),i(void 0),await te()}catch(t){e.error(t?.message||`删除项目组失败`)}},ae=t=>{let n=c9(t);if(!n){e.warning(`暂无可预览地址`);return}z(n),V(t.assetType===`Video`?`Video`:`Image`),L(!0)};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:16,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:`虚拟素材库`}),(0,$.jsx)(Q.Text,{type:`secondary`,children:`可提前上传虚拟人像素材,后续生成视频时可直接使用。`})]}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(mL,{}),onClick:()=>T(!0),children:`创建项目组`})]}),(0,$.jsxs)(mJ,{gutter:[10,10],children:[(0,$.jsx)(pz,{xs:24,lg:5,children:(0,$.jsx)(RL,{style:{borderRadius:16,minHeight:520,margin:`0 auto`,maxWidth:1200},children:(0,$.jsx)(cK,{spinning:s,children:t.length===0?(0,$.jsx)(rC,{description:`暂无虚拟人像项目组`}):(0,$.jsx)(EH,{direction:`vertical`,style:{width:`100%`},size:10,children:t.map(e=>{let t=r===e.id;return(0,$.jsxs)(`div`,{onClick:()=>i(e.id),style:{padding:14,borderRadius:14,cursor:`pointer`,border:t?`1px solid #8b5cf6`:`1px solid #e2e8f0`,background:t?`#f5f3ff`:`#fff`},children:[(0,$.jsx)(EH,{style:{width:`100%`,justifyContent:`space-between`},align:`start`,children:(0,$.jsxs)(`div`,{style:{minWidth:0},children:[(0,$.jsx)(i9,{strong:!0,ellipsis:!0,style:{display:`block`},children:e.name}),e.description&&(0,$.jsx)(i9,{type:`secondary`,ellipsis:!0,style:{display:`block`,fontSize:12},children:e.description})]})}),(0,$.jsxs)(EH,{wrap:!0,size:4,style:{marginTop:10},children:[(0,$.jsxs)(h$,{children:[`总 `,e.assetCount||0]}),(0,$.jsxs)(h$,{color:`green`,children:[`图 `,e.imageAssetCount||0]}),(0,$.jsxs)(h$,{color:`blue`,children:[`视频 `,e.videoAssetCount||0]})]})]},e.id)})})})})}),(0,$.jsx)(pz,{xs:24,lg:19,children:(0,$.jsxs)(RL,{title:W?W.name:`素材资产`,extra:(0,$.jsxs)(EH,{wrap:!0,children:[(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(p5,{}),disabled:!r,onClick:()=>k(!0),children:`上传图片/视频`}),r&&(0,$.jsx)(LK,{title:`确认删除当前虚拟人像项目组吗?`,onConfirm:ie,children:(0,$.jsx)(X,{danger:!0,icon:(0,$.jsx)(k$,{}),children:`删除项目组`})})]}),style:{borderRadius:16,minHeight:520},children:[(0,$.jsxs)(EH,{style:{width:`100%`,marginBottom:16},wrap:!0,children:[(0,$.jsx)(tG.Search,{allowClear:!0,placeholder:`搜索素材名称`,value:_,onChange:e=>v(e.target.value),onSearch:()=>G(1,p),style:{width:240}}),(0,$.jsx)(NC,{allowClear:!0,placeholder:`素材状态`,value:y,onChange:e=>b(e),style:{width:150},options:[{value:`Processing`,label:`处理中`},{value:`Active`,label:`可用`},{value:`Failed`,label:`失败`}]}),(0,$.jsx)(NC,{allowClear:!0,placeholder:`素材类型`,value:x,onChange:e=>C(e),style:{width:130},options:[{value:`Image`,label:`图片`},{value:`Video`,label:`视频`}]}),(0,$.jsx)(X,{onClick:()=>G(1,p),children:`筛选`})]}),(0,$.jsx)(cK,{spinning:l,children:r?a.length===0?(0,$.jsx)(rC,{description:`暂无素材,上传图片/视频后会异步入库`,style:{marginTop:80}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(220px, 1fr))`,gap:14},children:a.map(e=>{let t=c9(e),n=e.assetType===`Video`;return(0,$.jsx)(RL,{hoverable:!0,bodyStyle:{padding:12},style:{borderRadius:16,overflow:`hidden`,borderColor:`#eef2f7`},cover:(0,$.jsxs)(`div`,{style:{height:170,background:`#f8fafc`,display:`flex`,alignItems:`center`,justifyContent:`center`,position:`relative`},children:[t?n&&e.videoCoverUrl?(0,$.jsx)(`img`,{src:t,alt:e.name||`视频封面`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):n?(0,$.jsx)(`video`,{src:t,muted:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`img`,{src:t,alt:e.name||`虚拟人像素材`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):n?(0,$.jsx)(v5,{style:{fontSize:42,color:`#64748b`}}):(0,$.jsx)(e8,{style:{fontSize:42,color:`#64748b`}}),n&&(0,$.jsx)(h$,{color:`blue`,style:{position:`absolute`,left:10,top:10},children:`视频`}),t&&(0,$.jsx)(X,{size:`small`,shape:`circle`,icon:(0,$.jsx)(NW,{}),style:{position:`absolute`,right:10,top:10},onClick:()=>ae(e)}),n&&(0,$.jsx)(`div`,{style:{position:`absolute`,left:10,bottom:10,padding:`2px 6px`,borderRadius:8,background:`rgba(15,23,42,0.72)`,color:`#fff`,fontSize:12},children:hoe(e.videoDuration)})]}),children:(0,$.jsxs)(EH,{direction:`vertical`,size:8,style:{width:`100%`},children:[(0,$.jsx)(Cw,{title:e.name||e.remoteAssetId||e.id,children:(0,$.jsx)(`div`,{style:{fontWeight:600,color:`#1e293b`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.name||e.remoteAssetId||`未命名素材`})}),(0,$.jsxs)(EH,{wrap:!0,size:4,children:[(0,$.jsx)(yoe,{status:e.status}),(0,$.jsx)(h$,{color:n?`blue`:`default`,children:n?`视频`:`图片`})]}),(0,$.jsx)(EH,{size:6,wrap:!0,children:(0,$.jsx)(LK,{title:`确认删除这个虚拟人像素材吗?`,onConfirm:()=>re(e.id),children:(0,$.jsx)(X,{size:`small`,danger:!0,icon:(0,$.jsx)(k$,{}),children:`删除`})})})]})},e.id)})}),(0,$.jsx)(`div`,{style:{textAlign:`right`,marginTop:16},children:(0,$.jsx)(VG,{current:d,pageSize:p,total:h,showSizeChanger:!0,showTotal:e=>`共 ${e} 个素材`,onChange:(e,t)=>G(e,t)})})]}):(0,$.jsx)(rC,{description:`请先创建或选择项目组`,style:{marginTop:80}})})]})})]}),(0,$.jsx)(NK,{title:`创建虚拟人像项目组`,open:w,onCancel:()=>T(!1),onOk:ne,confirmLoading:E,okText:`创建项目组`,children:(0,$.jsxs)(bU,{form:H,layout:`vertical`,children:[(0,$.jsx)(bU.Item,{name:`name`,label:`项目组名称`,rules:[{required:!0,message:`请输入项目组名称`}],children:(0,$.jsx)(tG,{placeholder:`例如:虚拟主播A / 品牌代言人B`,maxLength:128})}),(0,$.jsx)(bU.Item,{name:`description`,label:`描述`,children:(0,$.jsx)(tG.TextArea,{placeholder:`可填写人物设定、服装风格、素材要求等`,maxLength:2e3,rows:4})})]})}),(0,$.jsx)(NK,{title:`上传虚拟人像素材`,open:O,onCancel:()=>k(!1),onOk:K,confirmLoading:A,okText:`提交入库`,children:(0,$.jsxs)(EH,{direction:`vertical`,style:{width:`100%`},size:14,children:[(0,$.jsx)(tG,{value:P,onChange:e=>F(e.target.value),placeholder:`素材名称,默认使用文件名`,maxLength:256}),(0,$.jsx)(R0,{accept:`image/*,video/*`,maxCount:1,fileList:M,beforeUpload:()=>!1,onChange:({fileList:e})=>N(e),listType:`picture`,children:(0,$.jsx)(X,{icon:(0,$.jsx)(p5,{}),children:`选择图片或视频`})}),(0,$.jsxs)(`div`,{style:{padding:12,background:`#f8fafc`,borderRadius:12,color:`#64748b`,fontSize:13},children:[`当前开放图片和视频,音频暂不接入。视频素材必须在 `,a9,`~`,o9,` 秒内;提交后会调用火山 CreateAsset 异步处理,状态变为 Active 后才可用于 AI 创作。`]})]})}),(0,$.jsx)(NK,{title:`素材预览`,open:I,onCancel:()=>L(!1),footer:null,width:760,destroyOnClose:!0,children:(0,$.jsx)(`div`,{style:{minHeight:420,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#0f172a`,borderRadius:12,overflow:`hidden`},children:B===`Video`?(0,$.jsx)(`video`,{src:R,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:520}}):(0,$.jsx)(`img`,{src:R,alt:`素材预览`,style:{maxWidth:`100%`,maxHeight:520,objectFit:`contain`}})})})]})},{Title:xoe,Text:Soe,Paragraph:Coe}=Q,l9=e=>e===`aigc_virtual`?`aigc_virtual`:`real_person`,woe=()=>{let[e,t]=On(),[n,r]=(0,S.useState)(()=>l9(e.get(`portraitTab`))),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)([]),[c,l]=(0,S.useState)();(0,S.useEffect)(()=>{(async()=>{try{if(n===`aigc_virtual`){let[e,t]=await Promise.all([gae(),A7({page:1,pageSize:100,status:`active`})]);a(e);let n=t.items||[];s(n),l(e=>e&&n.some(t=>t.id===e)?e:n[0]?.id)}else{let[e,t]=await Promise.all([cae(),k7({pageSize:100,status:`active`})]);a(e);let n=t.items||[];s(n),l(e=>e&&n.some(t=>t.id===e)?e:n[0]?.id)}}catch(e){Z.error(e?.message||`加载数据失败`)}})()},[n]),(0,S.useMemo)(()=>o.find(e=>e.id===c)||null,[o,c]);let u=(0,S.useMemo)(()=>i?`已用 ${i.usedAssetCount||0} / ${i.assetLimit||0} 个素材,剩余 ${i.remainingAssetCount||0}`:`额度加载中`,[i]),d=(0,S.useMemo)(()=>[{key:`real_person`,label:`真人素材库`,children:(0,$.jsx)(poe,{})},{key:`aigc_virtual`,label:`虚拟素材库`,children:(0,$.jsx)(boe,{})}],[]);return(0,$.jsx)(`div`,{children:(0,$.jsx)(IL,{activeKey:n,onChange:n=>{let i=l9(n);r(i);let a=new URLSearchParams(e);a.set(`filterType`,`private_portrait`),a.set(`portraitTab`,i),t(a,{replace:!0})},items:d,destroyInactiveTabPane:!1,tabBarExtraContent:(0,$.jsxs)(`div`,{style:{fontSize:14,fontWeight:700,color:`#4f46e5`,marginTop:8},children:[u,`。真人/虚拟共用,图片/视频共用;音频暂不开放。`]})})})},{Header:Toe,Sider:Eoe,Content:Doe}=uG,{TextArea:Ooe}=tG,{Option:koe}=NC,{Text:u9}=Q,Aoe=()=>{let{message:e}=Jb.useApp(),t=Ke(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(`1`),[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,inputValue:y,setMediaType:b,setCountType:x,setSelectedRatio:C,setSelectedResolution:w,setWidth:T,setHeight:E,setVideoDuration:D,setVideoAspectRatio:O,setVideoResolution:k,setEngineOptions:A,setEnginesele:j,setInputValue:M,currentMedia:N,setCurrentMedia:P}=R7(),F=(c===`image`?v?.image:v?.video)?.find(e=>e.id===l),I=F?.maxImageCount??4,L=F?.maxVideoCount??1,[R,z]=(0,S.useState)(!1),[B,V]=(0,S.useState)(!1),[H,U]=(0,S.useState)(`universal`),[W,ee]=(0,S.useState)(null),[G,te]=(0,S.useState)(null),[ne,K]=(0,S.useState)(null),[re,ie]=(0,S.useState)(!1),[ae,q]=(0,S.useState)(!1),[oe,se]=(0,S.useState)(`real_person`),[ce,le]=(0,S.useState)(!1),ue=(0,S.useRef)(null),de=(0,S.useCallback)(()=>{ue.current&&=(window.clearTimeout(ue.current),null),le(!0)},[]),fe=(0,S.useCallback)(()=>{ue.current&&window.clearTimeout(ue.current),ue.current=window.setTimeout(()=>{le(!1),ue.current=null},260)},[]),[pe,me]=(0,S.useState)(!1),he=(0,S.useRef)(null),[ge,_e]=(0,S.useState)({top:0,left:0}),ve=e=>{let t=0,n=0,r=0;return e.map(e=>e.type===`image`?(t++,`图片${t}`):e.type===`video`?(n++,`视频${n}`):(r++,`音频${r}`))},[ye,be]=(0,S.useState)(!1),[xe,Se]=(0,S.useState)(``),[Ce,we]=(0,S.useState)(`image`),Te=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(ye&&Ce===`video`){let e=()=>{Te.current&&Te.current.play().catch(()=>{})};Te.current&&(Te.current.readyState>=2?e():Te.current.addEventListener(`loadedmetadata`,e));let t=setTimeout(e,300);return()=>{clearTimeout(t),Te.current&&(Te.current.removeEventListener(`loadedmetadata`,e),Te.current.pause())}}else Te.current&&Te.current.pause()},[ye,Ce]);let[Ee,De]=(0,S.useState)(new Set),Oe=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}}},ke=e=>{let t=Oe(e);return t?Math.floor(Date.now()/1e3)>t:!1},[Ae,je]=(0,S.useState)(!1),[Me,Ne]=(0,S.useState)(``),[Pe,Fe]=(0,S.useState)(`image`),[Ie,Le]=(0,S.useState)(``),Re=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(Ae&&Pe===`video`&&Re.current){let e=Re.current;e.currentTime=0,e.muted=!1;let t=e.play();t&&typeof t.catch==`function`&&t.catch(()=>{e.muted=!0,e.play().catch(()=>{})})}else if(!Ae&&Re.current){let e=Re.current;e.pause(),e.muted=!0,e.currentTime=0}},[Ae,Pe,Me]);let[ze,Be]=(0,S.useState)(null),[Ve,He]=(0,S.useState)(0),[Ue,We]=(0,S.useState)(!1),[Ge,qe]=(0,S.useState)(null),[Je,Ye]=(0,S.useState)({x:0,y:0}),[Xe,Ze]=(0,S.useState)(!1),[Qe,$e]=(0,S.useState)(!1),[et,tt]=(0,S.useState)([]),[nt,rt]=(0,S.useState)([]),[it,at]=(0,S.useState)({}),[ot,st]=(0,S.useState)(!1),[ct,lt]=(0,S.useState)(!1),[ut,dt]=(0,S.useState)([]),[ft,pt]=(0,S.useState)([]),[mt,ht]=(0,S.useState)([]),gt=()=>{let e={};if(e=mt.find(e=>e.modelConfigId===l&&e.genType===c&&e.resolution===(c===`video`?g:d)),e||(c===`video`?(e={perSecondCredits:2,baseCredits:60,ratio:1.3,inputVideoRatio:1.3,inputVideoBaseCredits:0,inputVideoPerSecondCredits:15,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0},(g===`1080p`||g===`720p`||g===`480p`)&&(e.ratio=1.3)):(e={perSecondCredits:.1,baseCredits:2,ratio:3,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0},(d===`2K`||d===`4K`||d===`1K`)&&(e.ratio=3))),c===`video`){let t=(m*e.perSecondCredits+e.baseCredits)*e.ratio,n=N.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0);if(n>0){let r=((e.inputVideoBaseCredits||0)+(e.inputVideoPerSecondCredits||0)*n)*(e.inputVideoRatio||1);t+=r}let r=N.filter(e=>e.type===`image`).length;if(r>0){let n=((e.inputImageBaseCredits||0)+(e.inputImagePerImageCredits||0)*r)*(e.inputImageRatio||1);t+=n}return Number(t.toFixed(2))}else{let t=e.baseCredits*e.ratio,n=N.filter(e=>e.type===`image`).length;if(n>0){let r=((e.inputImageBaseCredits||0)+(e.inputImagePerImageCredits||0)*n)*(e.inputImageRatio||1);t+=r}return Number(t.toFixed(2))}},_t=(0,S.useRef)(null),vt=(0,S.useRef)(null),yt=(0,S.useRef)(null);(0,S.useRef)(!0);let bt=(0,S.useRef)(!1),xt=(0,S.useRef)(0);o.find(e=>e.id===i);let[St,Ct]=(0,S.useState)([]),[wt,Tt]=(0,S.useState)({page:1,pageSize:20}),[Et,Dt]=(0,S.useState)(0),[Ot,kt]=(0,S.useState)(!1);(0,S.useEffect)(()=>{let e=t.state;e&&(e.generationPrompt&&M(e.generationPrompt),e.mediaReferences&&Array.isArray(e.mediaReferences)&&e.mediaReferences.length>0&&P(e.mediaReferences.map(e=>{let t=e.url||e.resourceUrl||e.previewUrl||``,n=t.startsWith(`http`)?t:`http://ceshi.apiforeign.minzhong.cn${t}`;return{...e,name:e.name||`参考${e.type}`,type:e.type===`video`?`video`:e.type===`audio`?`audio`:`image`,url:n,duration:e.duration||0,label:e.label||``}})),window.history.replaceState({},``,window.location.pathname))},[t.state]),(0,S.useEffect)(()=>()=>{ue.current&&window.clearTimeout(ue.current)},[]);let At=(0,S.useCallback)((e=`instant`)=>{let t=vt.current;t&&(xt.current=Date.now(),requestAnimationFrame(()=>{t.scrollTo({top:t.scrollHeight,behavior:e})}))},[]);(0,S.useEffect)(()=>{if(St.length>0&&!bt.current){let e=setTimeout(()=>{At(`smooth`),bt.current=!0},300);return()=>clearTimeout(e)}},[St.length,At]),(0,S.useEffect)(()=>{let e=c===`image`?v.image:v.video;e&&e.length>0&&(e.some(e=>e.id===l)||x(e[0].id))},[c,v]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;ct&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&<(!1),ot&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&st(!1),Xe&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&Ze(!1),Qe&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&$e(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[ct,ot,Xe,Qe]),(0,S.useEffect)(()=>{if(c!==`video`)return;let e=v?.video?.find(e=>e.id===l);if(!e)return;let t=e.supportsFirstLastFrame??!1,n=e.supportsUniversalReference??!0;U(e=>n?`universal`:e===`universal`&&!n&&t?`first_last_frame`:e)},[l,c,v]),(0,S.useEffect)(()=>{n7().then(e=>{if(j(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;A({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)||O(n.supportedRatios?.[0]||`16:9`),n.supportedResolutions?.includes(g)||k(n.supportedResolutions?.[0]||`720p`),n.supportedDurations?.includes(m)||D(n.supportedDurations?.[0]||5),l===`请选择`&&x(n.id)}if(e.engine.image&&e.engine.image.length>0){let t=e.engine.image.find(e=>e.id===l)||e.engine.image[0],n=t.supportedSizes||{},r=Object.keys(n).sort((e,t)=>{let n={"1K":0,"2K":1,"4K":2};return(n[e]||0)-(n[t]||0)}),i=r[0]||`2K`,a=Object.keys(n[i]||{});if(tt(a.map(e=>({value:e,label:e}))),at(n),rt(r.map(e=>{let t=e.match(/(\d+)K/);return{value:e,label:`${{1:`标清`,2:`高清`,4:`超清`}[t?parseInt(t[1]):1]||`高清`} ${e}`}})),n[i]&&n[i][a[0]]){let[e,t]=n[i][a[0]].split(/[×x]/);T(Number(e)),E(Number(t)),C(a[0]),w(i)}l===`请选择`&&x(t.id)}}).catch(()=>{}),Tie().then(e=>{ht(e)}),r7(wt).then(e=>{let t=e.items,n=e.total;Ct(t),Dt(n)})},[]),(0,S.useEffect)(()=>{if(yt.current&&=(clearInterval(yt.current),null),St.some(e=>e.status===`generating`))return yt.current=window.setInterval(()=>{r7(wt).then(e=>{Ct(t=>t.map(t=>t.status===`generating`&&e.items.find(e=>e.id===t.id)||t)),Dt(e.total)}).catch(e=>{})},1e4),()=>{yt.current&&=(clearInterval(yt.current),null)}},[St,wt]),(0,S.useEffect)(()=>{if(!Xe)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&Ze(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[Xe]),(0,S.useEffect)(()=>{if(!Qe)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&$e(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[Qe]);let jt=e=>{let t=Object.keys(it).sort((e,t)=>{let n={"1K":0,"2K":1,"4K":2};return(n[e]||0)-(n[t]||0)}),n=it[d]&&it[d][e]?d:t.find(t=>it[t]&&it[t][e])||t[0];if(n&&it[n]&&it[n][e]){let[t,r]=it[n][e].split(/[×x]/);T(Number(t)),E(Number(r)),C(e),w(n)}},Mt=e=>{it[e]||(e=Object.keys(it).sort((e,t)=>{let n={"1K":0,"2K":1,"4K":2};return(n[e]||0)-(n[t]||0)})[0]||e);let t=it[e]?Object.keys(it[e]):[];tt(t.map(e=>({value:e,label:e})));let n=t.includes(u)?u:t[0]||``;if(n&&it[e]&&it[e][n]){let[t,r]=it[e][n].split(/[×x]/);T(Number(t)),E(Number(r)),C(n),w(e)}},Nt=()=>{T(p),E(f)},Pt=v?.video?.find(e=>e.id===l),Ft=Pt?.supportsFirstLastFrame??!1,It=Pt?.supportsUniversalReference??!0,Lt=e=>{e===`first_last_frame`&&!Ft||e===`universal`&&!It||(U(e),ie(!1),P([]),M(``))},Rt=()=>{let e=W;ee(G),te(e)},zt=()=>{ee(null),te(null)},Bt=()=>{te(null)},Vt=async()=>{let t=c===`video`&&H===`first_last_frame`;if(t){if(!y.trim()){e.warning(`请输入内容`);return}}else if(!y.trim()&&N.length===0){e.warning(`请输入内容或上传图片/视频`);return}let n;t?(n=[],W&&n.push({...W,role:`first_frame`}),G&&n.push({...G,role:`last_frame`}),n.length===0&&(n=void 0)):n=N.length>0?N.map(e=>{if(e.type===`image`){let{duration:t,...n}=e;return n}return e}):void 0,console.log(n);let r={id:``,gen_type:c,original_prompt:y.trim(),engine_id:l,idempotency_key:new Date().toLocaleString(`zh-CN`),media_references:n,...c===`image`&&{image_size:d,image_proportion:u,image_px:f+`x`+p},...c===`video`&&{duration:m,aspect_ratio:h,resolution:g}};V(!0),Sie(r).then(()=>{M(``),P([]),ee(null),te(null);let e={...wt,page:1};Tt(e),r7(e).then(e=>{Ct(t=>[...t,e.items[e.items.length-1]]),Dt(e.total),setTimeout(()=>{_t.current?.scrollIntoView({behavior:`smooth`})},100)}).catch(e=>{})}).catch(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),e.error({content:n,duration:3})}).finally(()=>{V(!1)}),setTimeout(()=>{V(!1)},3e3)},Ht=async()=>{if(St.length>=Et)return;let e=vt.current;if(!e)return;let t=e.scrollTop,n=e.scrollHeight;kt(!0);try{let r=wt.page+1,i=await r7({...wt,page:r}),a=Array.isArray(i)?{items:i,total:i.length}:i;a.total&&Dt(a.total),Tt(e=>({...e,page:r})),Ct(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{kt(!1)}},Ut=e=>new Promise((t,n)=>{let r=document.createElement(`video`);r.preload=`metadata`,r.onloadedmetadata=()=>{window.URL.revokeObjectURL(r.src),t(r.duration)},r.onerror=()=>{window.URL.revokeObjectURL(r.src),n(Error(`无法获取视频时长`))},r.src=URL.createObjectURL(e)}),Wt=e=>new Promise((t,n)=>{let r=document.createElement(`audio`);r.preload=`metadata`,r.onloadedmetadata=()=>{URL.revokeObjectURL(r.src),t(r.duration)},r.onerror=()=>{URL.revokeObjectURL(r.src),n(Error(`无法获取音频时长`))},r.src=URL.createObjectURL(e)}),Gt=e=>{let t=e.startsWith(`http`)?e:`http://ceshi.apiforeign.minzhong.cn${e}`;if(ze===t){let e=document.getElementById(`audio-player`);e&&e.pause(),Be(null)}else Be(t)},Kt=e=>new Promise((t,n)=>{let r=new Image;r.onload=()=>{window.URL.revokeObjectURL(r.src),t({width:r.naturalWidth,height:r.naturalHeight})},r.onerror=()=>{window.URL.revokeObjectURL(r.src),n(Error(`无法读取图片尺寸`))},r.src=URL.createObjectURL(e)}),qt=e=>new Promise((t,n)=>{let r=document.createElement(`video`);r.preload=`metadata`,r.onloadedmetadata=()=>{window.URL.revokeObjectURL(r.src),t({width:r.videoWidth,height:r.videoHeight,duration:r.duration})},r.onerror=()=>{window.URL.revokeObjectURL(r.src),n(Error(`无法读取视频尺寸`))},r.src=URL.createObjectURL(e)}),Jt=(e,t)=>{if(e<300||e>6e3)return`视频宽度需在 300~6000px 之间,当前为 ${e}px`;if(t<300||t>6e3)return`视频高度需在 300~6000px 之间,当前为 ${t}px`;let n=e/t;if(n<.4||n>2.5)return`视频宽高比需在 0.4~2.5 之间,当前为 ${n.toFixed(2)}`;let r=e*t;return r<409600?`视频总像素数过小(${e}×${t}=${r}),需 ≥ 640×640=409600`:r>8295044?`视频总像素数过大(${e}×${t}=${r}),需 ≤ 3326×2494=8295044`:null},Yt=async(t,n)=>{let r=t.type.startsWith(`image/`),i=t.type.startsWith(`video/`);if(c===`video`&&H===`first_last_frame`){if(!r)return e.error(`首尾帧模式仅支持上传图片`),!1;if(t.size/1024/1024>10)return e.error(`图片大小不能超过10MB`),!1;try{let{width:n,height:r}=await Kt(t),i=Jt(n,r);if(i)return e.error(i),!1}catch{return e.error(`无法读取图片尺寸,请检查文件是否损坏`),!1}let i=n||ne;if(!i)return e.error(`请选择首帧或尾帧上传位置`),!1;z(!0);try{let n=await U5(t),r={name:t.name,type:`image`,url:n.url,role:i===`first`?`first_frame`:`last_frame`};i===`first`?ee(r):te(r),e.success(`图片上传成功`)}catch{e.error(`上传失败`)}finally{z(!1),K(null)}return!1}let a=t.type.startsWith(`audio/`);if(!r&&!i&&!a)return e.error(`仅支持图片、视频或音频文件`),!1;if(a){let n=t.name.split(`.`).pop()?.toLowerCase();if(![`wav`,`mp3`].includes(n||``))return e.error(`音频仅支持wav和mp3格式`),!1}if(c===`image`&&(i||a))return e.error(`图片模式仅支持上传图片`),!1;if(a&&c!==`video`)return e.error(`仅视频模式支持上传音频`),!1;let o=i?100:a?50:10,s=i?`视频`:a?`音频`:`图片`;if(t.size/1024/1024>o)return e.error(`${s}大小不能超过${o}MB`),!1;if(r)try{let{width:n,height:r}=await Kt(t),i=Jt(n,r);if(i)return e.error(i),!1}catch{return e.error(`无法读取图片尺寸,请检查文件是否损坏`),!1}let l=N.filter(e=>e.type===`image`).length;if(r&&l>=bn)return e.error(`该引擎最多上传${bn}张图片`),!1;let u=N.filter(e=>e.type===`video`).length;if(i&&u>=xn)return e.error(`该引擎最多上传${xn}个视频`),!1;let d=N.filter(e=>e.type===`audio`).length;if(a&&d>=Sn)return e.error(`该引擎最多上传${Sn}个音频`),!1;let f=0,p=0;if(i)try{if(f=await Ut(t),f<2)return e.error(`视频素材最短不能少于 2 秒`),!1;let n=N.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0);if(n+f>15)return e.error(`所有视频素材总时长不能超过 15 秒,当前 ${(n+f).toFixed(1)} 秒`),!1;let{width:r,height:i}=await qt(t),a=Jt(r,i);if(a)return e.error(a),!1}catch{return e.error(`无法获取视频信息,请检查文件是否损坏`),!1}if(a)try{if(p=await Wt(t),p<2)return e.error(`音频素材最短不能少于 2 秒`),!1;let n=N.filter(e=>e.type===`audio`).reduce((e,t)=>e+(t.duration||0),0);if(n+p>15)return e.error(`所有音频素材总时长不能超过 15 秒,当前 ${(n+p).toFixed(1)} 秒`),!1}catch{return e.error(`无法获取音频信息,请检查文件是否损坏`),!1}z(!0);try{let e;e=r?await U5(t):a?await H5(t,p):await W5(t,f);let n=r?`image`:a?`audio`:`video`,o=[...N,{name:t.name,type:n,url:e.url,label:``,...i&&{duration:f},...a&&{duration:p}}],s=ve(o);P(o.map((e,t)=>({...e,label:s[t]})))}catch{e.error(`上传失败`)}finally{z(!1)}return!1},Xt=async t=>{let n=t.type.startsWith(`image/`),r=t.type.startsWith(`video/`),i=t.type.startsWith(`audio/`);if(!n&&!r&&!i)return e.error(`仅支持图片、视频或音频文件`),!1;let a=r?100:i?50:10;if(t.size/1024/1024>a)return e.error(`${r?`视频`:i?`音频`:`图片`}大小不能超过${a}MB`),!1;if(i){let n=t.name.split(`.`).pop()?.toLowerCase();if(![`wav`,`mp3`].includes(n||``))return e.error(`音频仅支持wav和mp3格式`),!1}if(n)try{let{width:n,height:r}=await Kt(t),i=Jt(n,r);if(i)return e.error(i),!1}catch{return e.error(`无法读取图片尺寸,请检查文件是否损坏`),!1}let o=0,s=0;if(r)try{if(o=await Ut(t),o<2)return e.error(`视频素材最短不能少于 2 秒`),!1;let n=R7.getState().currentMedia.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0);if(n+o>15)return e.error(`所有视频素材总时长不能超过 15 秒,当前 ${(n+o).toFixed(1)} 秒`),!1}catch{return e.error(`无法获取视频信息,请检查文件是否损坏`),!1}if(i)try{if(s=await Wt(t),s<2)return e.error(`音频素材最短不能少于 2 秒`),!1;let n=R7.getState().currentMedia.filter(e=>e.type===`audio`).reduce((e,t)=>e+(t.duration||0),0);if(n+s>15)return e.error(`所有音频素材总时长不能超过 15 秒,当前 ${(n+s).toFixed(1)} 秒`),!1}catch{return e.error(`无法获取音频信息,请检查文件是否损坏`),!1}let c=n?`image`:i?`audio`:`video`,l={name:t.name,type:c,url:``,label:``,...r&&{duration:o},...i&&{duration:s}},u=R7.getState().currentMedia;if(!$t(u,[l]))return!1;try{let e;return e=n?await U5(t):i?await H5(t,s):await W5(t,o),{name:l.name,type:l.type,url:e.url,label:l.label||``,...l.duration!==void 0&&{duration:l.duration}}}catch{return e.error(`上传失败`),!1}},Zt=async t=>{let n=0,r=0;z(!0);for(let e of t){let t=await Xt(e);if(t){let e=[...R7.getState().currentMedia,t],r=ve(e);P(e.map((e,t)=>({...e,label:r[t]}))),n++}else r++}z(!1),n>0&&e.success(`成功上传${n}个文件${r>0?`,${r}个文件上传失败`:``}`)},Qt=(e,t)=>e.filter(e=>e.type===t).reduce((e,t)=>e+(Number(t.duration)||0),0),$t=(t,n)=>{if(!n.length)return!1;if(c===`image`&&n.some(e=>e.type!==`image`))return e.error(`图片模式仅支持添加图片素材`),!1;if(n.some(e=>e.type===`audio`)&&c!==`video`)return e.error(`仅视频模式支持添加音频素材`),!1;let r=t.filter(e=>e.type===`image`).length,i=t.filter(e=>e.type===`video`).length,a=t.filter(e=>e.type===`audio`).length,o=n.filter(e=>e.type===`image`).length,s=n.filter(e=>e.type===`video`).length,l=n.filter(e=>e.type===`audio`).length;if(r+o>bn)return e.error(`该引擎最多上传${bn}张图片,当前还能添加 ${Math.max(0,bn-r)} 张`),!1;if(i+s>xn)return e.error(`该引擎最多上传${xn}个视频,当前还能添加 ${Math.max(0,xn-i)} 个`),!1;if(a+l>Sn)return e.error(`该引擎最多上传${Sn}个音频,当前还能添加 ${Math.max(0,Sn-a)} 个`),!1;for(let t of n){if(t.type!==`video`)continue;let n=Number(t.duration);if(!Number.isFinite(n)||n<=0)return e.error(`${t.name||`视频素材`}缺少视频秒数,不能用于 AI 创作`),!1;if(n<2)return e.error(`${t.name||`视频素材`}最短不能少于 2 秒`),!1;if(n>15)return e.error(`${t.name||`视频素材`}最长不能超过 15 秒`),!1}let u=Qt(t,`video`)+Qt(n,`video`);if(u>15)return e.error(`所有视频素材总时长不能超过 15 秒,当前 ${u.toFixed(1)} 秒`),!1;let d=Qt(t,`audio`)+Qt(n,`audio`);return d>15?(e.error(`所有音频素材总时长不能超过 15 秒,当前 ${d.toFixed(1)} 秒`),!1):!0},en=t=>{let n=t.mediaReference,r=n?.type||t.resourceType,i=n?.url||t.resourceUrl||t.displayUrl||t.previewUrl||``;if(!i)return e.error(`${t.fileName||t.id} 缺少素材地址,不能用于 AI 创作`),null;if(r===`audio`&&c!==`video`)return e.error(`仅视频模式支持添加音频素材`),null;let a=Number(n?.duration??t.durationSeconds);return{name:n?.name||t.fileName||t.id,type:r,url:i,source:`upload_resource`,upload_resource_id:t.id,label:``,...(r===`video`||r===`audio`)&&Number.isFinite(a)&&a>0?{duration:a}:{}}},tn=t=>{let n=t.map(en).filter(Boolean);if(!n.length)return;let r=R7.getState().currentMedia;if(!$t(r,n))return;let i=[...r,...n],a=ve(i);P(i.map((e,t)=>({...e,label:a[t]}))),e.success(`已添加 ${n.length} 个历史上传素材参考`)},nn=t=>{if(t.assetType===`Audio`)return e.error(`音频私域素材暂不支持用于 AI 创作`),null;let n=t.assetType===`Video`?`video`:`image`,r=oe===`aigc_virtual`?`虚拟素材`:`真人素材`,i=n===`video`?t.videoCoverUrl||t.previewUrl||t.displayUrl||t.providerUrl||``:t.previewUrl||t.displayUrl||t.videoCoverUrl||t.providerUrl||``;return{name:t.name||r,type:n,url:i,source:`private_portrait_asset`,private_asset_id:t.id,label:``,...n===`video`&&{duration:Number(t.videoDuration)||void 0}}},rn=e=>{se(e),q(!0)},an=t=>{let n=t.map(nn).filter(Boolean),r=R7.getState().currentMedia;if(!$t(r,n))return;let i=[...r,...n],a=ve(i);P(i.map((e,t)=>({...e,label:a[t]}))),e.success(`已添加 ${n.length} 个${oe===`aigc_virtual`?`虚拟`:`真人`}素材参考`)},on=e=>e?e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`)||e.startsWith(`blob:`)?e:`${`http://ceshi.apiforeign.minzhong.cn`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,sn=e=>{let t=N.filter((t,n)=>n!==e),n=ve(t);P(t.map((e,t)=>({...e,label:n[t]})))},cn=(e,t)=>{let n=e.selectionStart;return t.slice(0,n).match(/@([^@\s]*)$/)&&N.length>0?(me(!0),!0):(me(!1),!1)},ln=e=>{let t=e.target.value;M(t);let n=e.target;cn(n,t)},un=e=>{pe&&e.key===`Escape`&&me(!1)},dn=e=>{let t=he.current?.resizableTextArea?.textArea;if(!t)return;let n=t.selectionStart,r=y.slice(0,n),i=y.slice(n),a=r.lastIndexOf(`@`);if(a===-1){me(!1);return}M(r.slice(0,a)+`@${e} `+i),me(!1),setTimeout(()=>{let n=a+e.length+2;t.focus(),t.setSelectionRange(n,n)},0)},fn=()=>{be(!1),Se(``),Te.current&&Te.current.pause()},pn=e=>{if(e.preventDefault(),e.stopPropagation(),!xe)return;let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${xe}&download=1`,t.download=Ce===`image`?`image.png`:`video.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},mn=e=>{let t=String(e?.type||``).toLowerCase(),n=String(e?.url||e?.name||``).toLowerCase();return t.includes(`video`)||/\.(mp4|mov|avi|webm|m4v)(\?|$)/.test(n)?`video`:t.includes(`audio`)||/\.(mp3|wav|ogg|aac|m4a)(\?|$)/.test(n)?`audio`:`image`},hn=e=>e?/^https?:\/\//i.test(e)?e:`http://ceshi.apiforeign.minzhong.cn${e}`:``,gn=e=>{e?.url&&(Ne(e.url),Fe(mn(e)),Le(e.name||`附件`),je(!0))},_n=c===`video`&&H===`first_last_frame`,vn=!R&&(_n?!!(y.trim()||W):!!(y.trim()||N.length>0)),yn=c===`image`?`输入画面描述,或上传图片参考风格、构图、主体与光影。例:@图片1 参考色调,生成一张简洁高级的产品海报。`:_n?`首帧尾帧可以不传,如需传入建议描述首帧到尾帧的主体动作、镜头运动、节奏与转场。例:从首帧自然推进到尾帧,产品居中突出,动作平滑连贯。`:`上传最多12个参考素材,输入文字或 @ 引用参考内容,自由组合图、文、视频。例:@图片1 模仿 @视频1 的动作。`,bn=I,xn=L,Sn=F?.maxAudioCount??1;return(0,$.jsxs)(uG,{className:`ai-create-page`,style:{margin:`-24px -32px -32px`,borderRadius:22,height:`calc(100vh - 34px)`,background:`#fff`,overflow:`hidden`},children:[(0,$.jsx)(`audio`,{id:`audio-player`,src:ze||null,autoPlay:!0,onEnded:()=>Be(null),style:{display:`none`}}),!1,(0,$.jsxs)(uG,{style:{display:`flex`,flex:1,background:`#fff`},children:[(0,$.jsx)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`16px 24px`,borderRadius:22,background:`rgb(255, 255, 255)`,backdropFilter:`blur(22px)`,border:`1px solid rgba(231, 234, 240, 0.82)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(`div`,{style:{width:`15%`,height:1,background:`linear-gradient(90deg, transparent, rgba(117,106,136,0.18), rgba(232,227,236,0.48), transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0,textAlign:`center`},children:[(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`AI创作`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#667085`,margin:`4px 0 0 0`},children:`输入想法、剧本或上传参考,智能生成视频/图片`})]}),(0,$.jsx)(`div`,{style:{width:`15%`,height:1,background:`linear-gradient(90deg, transparent, rgba(232,227,236,0.48), rgba(117,106,136,0.18), transparent)`,borderRadius:1}})]})}),(0,$.jsxs)(Doe,{style:{flex:1,margin:0,padding:`20px 24px 22px`,boxSizing:`border-box`,display:`flex`,flexDirection:`column`,overflow:`hidden`,minHeight:0},children:[St.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, #8b5cf6 0%, #ddd6fe 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,marginBottom:16},children:(0,$.jsx)(w8,{style:{fontSize:40,color:`#fff`}})}),(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:500,color:`#2f3440`},children:`你好,想创作什么?`}),(0,$.jsx)(`p`,{style:{margin:8,fontSize:13,color:`#98a2b3`},children:`输入想法、剧本或上传参考,开始你的创作之旅`})]}),St.length>0&&(0,$.jsxs)(`div`,{ref:vt,className:`ai-create-scroll`,style:{flex:1,overflowY:`auto`,paddingRight:10,paddingBottom:18,background:`#fff`},onScroll:e=>{let t=e.currentTarget;!(Date.now()-xt.current<500)&&bt.current&&t.scrollTop<=50&&!Ot&&St.length{let e=Z;return St.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, #8b5cf6 0%, #ddd6fe 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:(0,$.jsx)(w8,{style:{color:`#fff`,fontSize:16}})}),(0,$.jsx)(`div`,{style:{flex:1},children:(0,$.jsxs)(`div`,{style:{background:`rgba(255, 255, 255, 0.92)`,backdropFilter:`blur(18px)`,borderRadius:`22px`,padding:`14px 16px`,width:`70%`,minWidth:500,boxSizing:`border-box`,boxShadow:`0 18px 50px rgba(47, 52, 64, 0.075)`,position:`relative`,border:`1px solid rgba(231, 234, 240, 0.9)`},children:[(0,$.jsxs)(`div`,{style:{margin:4,fontSize:11,color:`#98a2b3`,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,`rgba(139, 92, 246, 0.10)`),color:(t.genType,`#8b5cf6`),padding:`2px 8px`,borderRadius:12,fontWeight:500,fontSize:11,marginLeft:8},children:t.genType===`image`?`图片生成`:`视频生成`})]}),t.mediaReferences&&t.mediaReferences.length>0&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,zIndex:100},children:(0,$.jsx)(`span`,{style:{padding:`4px 12px`,borderRadius:16,color:`#8b5cf6`,cursor:`pointer`,fontWeight:500,border:`1px solid rgba(139, 92, 246, 0.2)`,background:`rgba(139, 92, 246, 0.04)`},onClick:e=>{e.stopPropagation();let n=e.currentTarget.getBoundingClientRect();Ye({x:n.left,y:n.top-10}),qe(t.id),We(!0)},children:`附件详情`})}),(0,$.jsxs)(`div`,{style:{position:`absolute`,bottom:8,right:8,zIndex:100,display:`flex`,gap:6},children:[(0,$.jsxs)(`button`,{onClick:n=>{if(n.stopPropagation(),M(t.originalPrompt||``),t.mediaReferences&&t.mediaReferences.length>0)if(t.mediaReferences.some(e=>e.role===`first_frame`||e.role===`last_frame`)&&t.genType===`video`){let e=t.mediaReferences.find(e=>e.role===`first_frame`),n=t.mediaReferences.find(e=>e.role===`last_frame`);ee(e?{...e,label:e.label||``}:null),te(n?{...n,label:n.label||``}:null),P([]),U(`first_last_frame`)}else P(t.mediaReferences.map(e=>({name:e.name,type:e.type,url:e.url,label:e.label||``,role:e.role}))),ee(null),te(null),U(`universal`);else P([]),ee(null),te(null);e.success(`已加载到编辑区`)},style:{height:28,padding:`0 10px`,borderRadius:10,border:`none`,background:`rgba(139, 92, 246, 0.08)`,color:`#8b5cf6`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s ease`,gap:4,fontSize:12},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.08)`},children:[(0,$.jsx)(Uq,{style:{fontSize:12}}),`重新编辑`]}),(0,$.jsx)(LK,{title:`确定要删除吗?`,onConfirm:async()=>{try{await wie(t.id),e.success(`删除成功`),Ct(e=>e.filter(e=>e.id!==t.id)),Dt(e=>e-1)}catch(t){let n=t?.response?.data?.message||t?.message||`删除失败`;e.error(n)}},okText:`确定`,cancelText:`取消`,children:(0,$.jsxs)(`button`,{onClick:e=>e.stopPropagation(),style:{height:28,padding:`0 10px`,borderRadius:10,border:`none`,background:`rgba(139, 92, 246, 0.08)`,color:`#8b5cf6`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s ease`,gap:4,fontSize:12},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(164, 91, 91, 0.1)`,e.currentTarget.style.color=`#A45B5B`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.08)`,e.currentTarget.style.color=`#8b5cf6`},children:[(0,$.jsx)(k$,{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 #E7EAF0`,boxShadow:`0 4px 12px rgba(139, 92, 246, 0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`linear-gradient(135deg, #ffffff 0%, #FAFBFC 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(139, 92, 246, 0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 0 30px rgba(139, 92, 246, 0.2)`},children:(0,$.jsx)(`div`,{style:{width:48,height:48,border:`3px solid #ddd6fe`,borderTopColor:`#8b5cf6`,borderRadius:`50%`,animation:`spin 1s linear infinite`}})}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#8b5cf6`,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(168, 90, 106, 0.10)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(Ire,{style:{color:`#A45B5B`,fontSize:22}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#A45B5B`,fontWeight:620},children:`生成失败(积分已退)`}),t.errorMessage&&(0,$.jsx)(`span`,{style:{fontSize:13,color:`#A45B5B`,textAlign:`center`,padding:`0 8px`,lineHeight:1.5},children:t.errorMessage})]}):(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:()=>{Se(t.imageUrl),we(`image`),be(!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:()=>{Se(t.videoUrl),we(`video`),be(!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(47, 52, 64, 0.72)`,borderRadius:`50%`,display:`flex`,alignItems:`center`,justifyContent:`center`,pointerEvents:`none`,boxShadow:`0 10px 24px rgba(47, 52, 64, 0.22)`},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:`#FFFFFF`,borderRadius:12,padding:12,border:`1px solid #E7EAF0`,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:`#475467`,fontSize:13},children:t.originalPrompt})}),(0,$.jsxs)(`div`,{style:{fontSize:12,color:`#667085`,textAlign:`left`,display:`flex`,flexWrap:`wrap`,gap:12,alignItems:`center`,justifyContent:`space-between`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{borderRadius:16,color:`#8b5cf6`,fontWeight:500},children:t.engineSnapshot.name}),(0,$.jsx)(`span`,{style:{borderRadius:16,color:`#667085`},children:t.genType===`image`?`${t.imageProportion||``} · ${t.imagePx||``} · ${t.imageSize||``}`:`${t.duration||``}秒 · ${t.aspectRatio||``} · ${t.resolution||``}`}),(0,$.jsxs)(`span`,{style:{fontSize:14,borderRadius:16,color:`#8b5cf6`},children:[`消耗积分:`,t.creditsCost]})]})]})]})]})})]})},t.id))})(),(0,$.jsx)(`div`,{ref:_t})]}),Ue&&Ge&&(()=>{let e=St.find(e=>e.id===Ge)?.mediaReferences||[];return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`transparent`,zIndex:9998},onClick:()=>{We(!1),qe(null)}}),(0,$.jsxs)(`div`,{className:`ai-reference-expanded-tray ai-attachment-popover`,style:{position:`fixed`,top:`max(84px, ${Je.y-96}px)`,left:`max(24px, min(${Je.x-250}px, calc(100vw - 456px)))`,width:424,padding:`12px 12px 10px`,borderRadius:18,background:`rgba(255,255,255,0.98)`,border:`1px solid #E7EAF0`,boxShadow:`0 24px 60px rgba(31, 41, 55, 0.12)`,backdropFilter:`blur(18px)`,zIndex:9999,pointerEvents:`auto`},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:10},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:[(0,$.jsx)(`span`,{style:{fontSize:13,color:`#344054`,fontWeight:800},children:`参考附件`}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#98A2B3`,fontWeight:600},children:`点击素材查看,或直接下载原文件`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:(0,$.jsx)(`button`,{onClick:()=>{We(!1),qe(null)},style:{width:26,height:26,borderRadius:`50%`,border:`1px solid transparent`,background:`#F6F7FA`,cursor:`pointer`,color:`#98a2b3`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#EEF1F6`,e.currentTarget.style.color=`#2f3440`},onMouseLeave:e=>{e.currentTarget.style.background=`#F6F7FA`,e.currentTarget.style.color=`#98a2b3`},children:(0,$.jsx)(ju,{style:{fontSize:12}})})})]}),(0,$.jsx)(`div`,{className:`ai-reference-tray-scroll`,style:{display:`flex`,gap:10,overflowX:`auto`,padding:`2px 2px 4px`},children:e.map((e,t)=>{let n=mn(e),r=e.label||(e.role===`first_frame`?`首帧`:e.role===`last_frame`?`尾帧`:`${n===`image`?`图片`:n===`video`?`视频`:`音频`}${t+1}`);return(0,$.jsxs)(`div`,{style:{flex:`0 0 92px`,width:92,borderRadius:16,background:`#FFFFFF`,border:`1px solid #E7EAF0`,boxShadow:`0 8px 18px rgba(31, 41, 55, 0.06)`,padding:7,boxSizing:`border-box`},children:[(0,$.jsx)(`div`,{onClick:t=>{n===`audio`?(t.stopPropagation(),Gt(e.url)):(gn(e),We(!1),qe(null))},style:{position:`relative`,width:`100%`,height:70,borderRadius:12,overflow:`hidden`,cursor:`pointer`,background:`#F7F8FA`,border:`1px solid rgba(231, 234, 240, 0.9)`},children:n===`image`?(0,$.jsx)(`img`,{src:hn(e.url),alt:e.name||r,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):n===`video`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:hn(e.url),muted:!0,playsInline:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(31, 41, 55, 0.08)`},children:(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:`50%`,background:`rgba(47, 52, 64, 0.72)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 18px rgba(31, 41, 55, 0.22)`},children:(0,$.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`#fff`,children:(0,$.jsx)(`path`,{d:`M8 5v14l11-7z`})})})})]}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`},children:ze===(e.url.startsWith(`http`)?e.url:`http://ceshi.apiforeign.minzhong.cn${e.url}`)?(0,$.jsx)(G6,{style:{fontSize:24,color:`#fff`}}):(0,$.jsx)(J2,{style:{fontSize:24,color:`#fff`}})})}),(0,$.jsx)(`div`,{title:e.name||r,style:{marginTop:6,color:`#667085`,fontSize:10,fontWeight:700,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,textAlign:`center`},children:e.name||r}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:5,marginTop:7},children:(0,$.jsx)(`button`,{onClick:()=>{gn(e),We(!1),qe(null)},style:{flex:1,height:24,borderRadius:9,border:`1px solid #E7EAF0`,background:`#F8FAFC`,color:`#8b5cf6`,fontSize:11,fontWeight:700,cursor:`pointer`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#EEF1F6`},onMouseLeave:e=>{e.currentTarget.style.background=`#F8FAFC`},children:`查看`})})]},`${e.url||e.name||t}-${t}`)})})]})]})})(),(0,$.jsxs)(`div`,{style:{position:`relative`,background:`#ffffff`,borderRadius:24,padding:`18px 72px 16px 20px`,boxShadow:`0 22px 64px rgba(31, 41, 55, 0.08), 0 1px 0 rgba(255,255,255,0.98) inset`,transition:`all 0.25s ease`,border:`1px solid rgba(231, 234, 240, 0.78)`,backdropFilter:`blur(24px)`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:18,alignItems:`flex-end`,marginBottom:14},children:[(0,$.jsx)(`div`,{style:{width:_n?220:70,minWidth:_n?220:70,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`flex-start`,paddingTop:2,gap:8},children:c===`video`&&H===`first_last_frame`?(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`row`,alignItems:`stretch`,gap:12,width:`100%`,height:100},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,flex:1,minWidth:0,height:100,borderRadius:12,border:`1px solid #E7EAF0`,background:`#ffffff`,boxShadow:`0 6px 16px rgba(47, 52, 64, 0.04)`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,left:10,right:10,display:`flex`,alignItems:`center`,justifyContent:`space-between`,zIndex:2},children:(0,$.jsx)(`span`,{style:{fontSize:11,fontWeight:600,color:`#8b5cf6`,lineHeight:1},children:`首帧(可选)`})}),W?(0,$.jsxs)(`div`,{style:{position:`absolute`,left:10,right:10,bottom:10,height:64},children:[(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${W.url}`,alt:W.name,onClick:()=>{Ne(W.url),Fe(`image`),Le(W.name),je(!0)},style:{width:`100%`,height:`100%`,objectFit:`cover`,borderRadius:8,cursor:`pointer`,border:`1px solid rgba(139, 92, 246, 0.2)`,boxShadow:`0 3px 10px rgba(47, 52, 64, 0.06)`}}),(0,$.jsx)(`button`,{onClick:zt,style:{position:`absolute`,top:-6,right:-6,width:18,height:18,border:`none`,background:`#A45B5B`,borderRadius:50,cursor:`pointer`,color:`#fff`,fontSize:9,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 2px 4px rgba(164, 91, 91, 0.3)`,zIndex:10},children:(0,$.jsx)(k$,{style:{fontSize:9}})})]}):(0,$.jsx)(K7,{accept:`image/*`,multiple:!1,onLocalSelect:e=>{e.length>0&&Yt(e[0],`first`)},onHistorySelect:t=>{if(t.length>0){let n=t[0];ee({name:n.fileName||``,type:`image`,url:n.resourceUrl||n.previewUrl||n.displayUrl||``,role:`first_frame`,label:``}),e.success(`成功添加首帧`)}},onPortraitSelect:t=>{if(t.length>0){let n=t[0],r=n.previewUrl||n.displayUrl||n.videoCoverUrl||n.providerUrl||``;ee({name:n.name||`首帧图片`,type:`image`,url:r,role:`first_frame`,label:``}),e.success(`成功添加首帧`)}},uploading:R,children:(0,$.jsxs)(`div`,{style:{position:`absolute`,left:10,right:10,bottom:10,height:64,borderRadius:8,border:`1px dashed rgba(139, 92, 246, 0.28)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.25s ease`,backgroundColor:`rgba(139, 92, 246, 0.04)`,flexDirection:`column`,gap:4},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#a78bfa`,e.currentTarget.style.backgroundColor=`rgba(139, 92, 246, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(139, 92, 246, 0.28)`,e.currentTarget.style.backgroundColor=`rgba(139, 92, 246, 0.04)`},children:[(0,$.jsx)(mL,{style:{fontSize:18,color:`#8b5cf6`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#8b5cf6`,fontWeight:500},children:`上传首帧`})]})})]}),(0,$.jsx)(`button`,{onClick:Rt,disabled:!W||!G,title:`调换首尾帧`,style:{width:32,height:32,alignSelf:`center`,borderRadius:50,border:`1px solid rgba(231, 234, 240, 0.95)`,background:W&&G?`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`:`#F3F5F8`,cursor:W&&G?`pointer`:`not-allowed`,color:W&&G?`#fff`:`#98A2B3`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:W&&G?`0 6px 14px rgba(139, 92, 246, 0.24)`:`none`,transition:`all 0.2s ease`,flexShrink:0},onMouseEnter:e=>{W&&G&&(e.currentTarget.style.transform=`scale(1.06)`)},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`},children:(0,$.jsx)(aW,{style:{fontSize:14}})}),(0,$.jsxs)(`div`,{style:{position:`relative`,flex:1,minWidth:0,height:100,borderRadius:12,border:`1px solid #E7EAF0`,background:`#ffffff`,boxShadow:`0 6px 16px rgba(47, 52, 64, 0.04)`,overflow:`hidden`,opacity:W?1:.5},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,left:10,right:10,display:`flex`,alignItems:`center`,justifyContent:`space-between`,zIndex:2},children:(0,$.jsx)(`span`,{style:{fontSize:11,fontWeight:600,color:`#8b5cf6`,lineHeight:1},children:`尾帧`})}),G?(0,$.jsxs)(`div`,{style:{position:`absolute`,left:10,right:10,bottom:10,height:64},children:[(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${G.url}`,alt:G.name,onClick:()=>{Ne(G.url),Fe(`image`),Le(G.name),je(!0)},style:{width:`100%`,height:`100%`,objectFit:`cover`,borderRadius:8,cursor:`pointer`,border:`1px solid rgba(139, 92, 246, 0.2)`,boxShadow:`0 3px 10px rgba(47, 52, 64, 0.06)`}}),(0,$.jsx)(`button`,{onClick:Bt,style:{position:`absolute`,top:-6,right:-6,width:18,height:18,border:`none`,background:`#A45B5B`,borderRadius:50,cursor:`pointer`,color:`#fff`,fontSize:9,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 2px 4px rgba(164, 91, 91, 0.3)`,zIndex:10},children:(0,$.jsx)(k$,{style:{fontSize:9}})})]}):W?(0,$.jsx)(K7,{accept:`image/*`,multiple:!1,onLocalSelect:e=>{e.length>0&&Yt(e[0],`last`)},onHistorySelect:t=>{if(t.length>0){let n=t[0];te({name:n.fileName||``,type:`image`,url:n.resourceUrl||n.previewUrl||n.displayUrl||``,role:`last_frame`,label:``}),e.success(`成功添加尾帧`)}},onPortraitSelect:t=>{if(t.length>0){let n=t[0],r=n.previewUrl||n.displayUrl||n.videoCoverUrl||n.providerUrl||``;te({name:n.name||`尾帧图片`,type:`image`,url:r,role:`last_frame`,label:``}),e.success(`成功添加尾帧`)}},uploading:R,children:(0,$.jsxs)(`div`,{style:{position:`absolute`,left:10,right:10,bottom:10,height:64,borderRadius:8,border:`1px dashed rgba(139, 92, 246, 0.24)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.25s ease`,backgroundColor:`rgba(139, 92, 246, 0.04)`,flexDirection:`column`,gap:4},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#a78bfa`,e.currentTarget.style.backgroundColor=`rgba(139, 92, 246, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(139, 92, 246, 0.24)`,e.currentTarget.style.backgroundColor=`rgba(139, 92, 246, 0.04)`},children:[(0,$.jsx)(mL,{style:{fontSize:18,color:`#8b5cf6`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#8b5cf6`,fontWeight:500},children:`上传尾帧`})]})}):(0,$.jsxs)(`div`,{style:{position:`absolute`,left:10,right:10,bottom:10,height:64,borderRadius:8,border:`1px dashed rgba(226, 232, 240, 0.4)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`not-allowed`,backgroundColor:`rgba(241, 245, 249, 0.5)`,flexDirection:`column`,gap:4},children:[(0,$.jsx)(mL,{style:{fontSize:18,color:`#cbd5e1`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#94a3b8`,fontWeight:500},children:`请先上传首帧`})]})]})]}):(0,$.jsx)($.Fragment,{children:!(c===`video`&&H===`first_last_frame`)&&(0,$.jsxs)(`div`,{style:{position:`relative`,width:64,height:72,marginTop:`-10`},onMouseEnter:de,onMouseLeave:fe,children:[N.length===0&&(0,$.jsx)(K7,{accept:c===`image`?`image/*`:`image/*,video/*,audio/*`,onLocalSelect:Zt,onHistorySelect:tn,onPortraitLibrarySelect:e=>{rn(e)},uploading:R,tooltipTitle:c===`image`?`图片${N.filter(e=>e.type===`image`).length}/${I}`:`图片${N.filter(e=>e.type===`image`).length}/${I}, + `})]})},N7=({data:e})=>{if(!e)return null;let t=(e.limitUnit||`GB`).toUpperCase(),n=t===`GB`?1024**3:t===`MB`?1024**2:1024,r=Number(e.usagePercent)||0,i=Math.min(100,Math.max(0,r)),a=e.limitValue?parseFloat(e.limitValue):e.totalBytes/n,o=a*r/100;a-o;let s=e.exceeded||r>=100,c=1024**2,l=1024**3,u=1024**4,d=(e=>{let t=Number(e)||0;return t>=u?{val:(t/u).toFixed(2),unit:`TB`}:t>=l?{val:(t/l).toFixed(2),unit:`GB`}:t>=c?{val:(t/c).toFixed(2),unit:`MB`}:{val:(t/1024).toFixed(2),unit:`KB`}})(e.usedBytes);return(0,$.jsxs)(`div`,{style:{padding:`0 12px`,paddingTop:6,borderRadius:10,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)`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:6,fontSize:12,color:`#475569`},children:e.enabled?(0,$.jsx)($.Fragment,{}):(0,$.jsxs)(`span`,{style:{fontWeight:500,color:`#1e293b`},children:[(0,$.jsx)(f3,{style:{fontSize:12,color:s?`#ef4444`:`#6366f1`,marginRight:4}}),`当前使用 `,d.val,` `,d.unit]})}),e.enabled&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{marginTop:4,display:`flex`,justifyContent:`space-between`,fontSize:11,color:s?`#ef4444`:`#94a3b8`},children:(0,$.jsxs)(`div`,{style:{height:`100%`,width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:6,fontSize:12,color:`#000000ff`,padding:`0 8px`},children:[(0,$.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(f3,{style:{fontSize:12,color:`#000000ff`}}),r.toFixed(1),`%`]}),e.enabled?(0,$.jsxs)(`span`,{style:{fontWeight:500,color:`#000000ff`},children:[o.toFixed(2),` / `,a.toFixed(2),` `,t]}):(0,$.jsxs)(`span`,{style:{fontWeight:500,color:`#1e293b`},children:[`当前使用 `,d.val,` `,d.unit]})]})}),(0,$.jsx)(`div`,{style:{width:`100%`,height:6,background:`#e2e8f0`,borderRadius:50,overflow:`hidden`,position:`relative`},children:(0,$.jsx)(`div`,{style:{width:`${i}%`,height:`100%`,background:r<50?`linear-gradient(90deg, #279951, #b7fad0)`:r<85?`linear-gradient(90deg, #ffd759, #fff6d4)`:`linear-gradient(90deg, #ef4444, #dc2626)`,borderRadius:2,transition:`width 0.4s ease`}})})]})]})},P7={HomeOutlined:(0,$.jsx)(J3,{}),DashboardOutlined:(0,$.jsx)(l3,{}),CodeOutlined:(0,$.jsx)(G4,{}),PlayCircleOutlined:(0,$.jsx)(l8,{}),WalletOutlined:(0,$.jsx)(b5,{}),SettingOutlined:(0,$.jsx)(z8,{}),BellOutlined:(0,$.jsx)(o4,{}),UserOutlined:(0,$.jsx)(g5,{}),AppstoreOutlined:(0,$.jsx)(N2,{}),FileTextOutlined:(0,$.jsx)(jH,{}),StarOutlined:(0,$.jsx)(t5,{}),HeartOutlined:(0,$.jsx)(z3,{}),CameraOutlined:(0,$.jsx)(x4,{}),RobotOutlined:(0,$.jsx)(w8,{}),CalculatorOutlined:(0,$.jsx)(v4,{}),DollarOutlined:(0,$.jsx)(h3,{}),GiftOutlined:(0,$.jsx)(N3,{}),ThunderboltOutlined:(0,$.jsx)(s5,{}),FireOutlined:(0,$.jsx)(D3,{}),CloudOutlined:(0,$.jsx)(I4,{}),SmileOutlined:(0,$.jsx)(Z8,{}),TrophyOutlined:(0,$.jsx)(u5,{}),RocketOutlined:(0,$.jsx)(D8,{}),BulbOutlined:(0,$.jsx)(h4,{}),PictureOutlined:(0,$.jsx)(e8,{}),VideoCameraOutlined:(0,$.jsx)(v5,{}),AudioOutlined:(0,$.jsx)(J2,{}),MailOutlined:(0,$.jsx)(w6,{}),PhoneOutlined:(0,$.jsx)(Z6,{}),GlobalOutlined:(0,$.jsx)(I3,{}),ShoppingCartOutlined:(0,$.jsx)(H8,{}),TeamOutlined:(0,$.jsx)(a5,{}),BarChartOutlined:(0,$.jsx)(r4,{}),PieChartOutlined:(0,$.jsx)(r8,{}),LineChartOutlined:(0,$.jsx)(f6,{}),SecurityScanOutlined:(0,$.jsx)(I8,{}),ApiOutlined:(0,$.jsx)(A2,{}),DatabaseOutlined:(0,$.jsx)(f3,{}),CloudServerOutlined:(0,$.jsx)(z4,{})},Lae=240,F7=[{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(Zq,{})},{gradient:`linear-gradient(135deg, #4a5568, #2d3748)`,shadow:`rgba(74,85,104,0.25)`,icon:(0,$.jsx)(w3,{})},{gradient:`linear-gradient(135deg, #718096, #4a5568)`,shadow:`rgba(113,128,150,0.25)`,icon:(0,$.jsx)(r3,{})},{gradient:`linear-gradient(135deg, #5a67d8, #434190)`,shadow:`rgba(90,103,216,0.25)`,icon:(0,$.jsx)(Z2,{})}],Rae=()=>{let e=Ye(),t=Ke(),{user:n,logout:r}=j7(),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u]=bU.useForm(),[d,f]=(0,S.useState)(null),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)([]),[_,v]=(0,S.useState)(0),[y,b]=(0,S.useState)(!1),[x,C]=(0,S.useState)(!1),[w]=bU.useForm(),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(()=>({x:24,y:window.innerHeight*.75})),[k,A]=(0,S.useState)(!1),j=(0,S.useRef)(!1),M=(0,S.useRef)({x:0,y:0}),[N,P]=(0,S.useState)({}),[F,I]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteName||``;return t&&(document.title=t),t}),[L,R]=(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}),[z,B]=(0,S.useState)(!localStorage.getItem(`siteInfo`)),[V,H]=(0,S.useState)(!1),[U,W]=(0,S.useState)(null),[ee,G]=(0,S.useState)(`alipay`),[te,ne]=(0,S.useState)(!1),[K,re]=(0,S.useState)(180),ie=(0,S.useRef)(null),ae=(0,S.useRef)(null),q=(0,S.useRef)(null),[oe,se]=(0,S.useState)({alipay:!1,wechat:!1}),[ce,le]=(0,S.useState)(null),[ue,de]=(0,S.useState)(!1),[fe,pe]=(0,S.useState)(``),me=`pending_payment_order`;(0,S.useEffect)(()=>{J5().then(e=>{let t=e.siteName||`民众智创`,n=e.siteLogo||``;if(t!==F&&(I(t),document.title=t),n&&n!==L){R(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`}e.operationManual&&pe(e.operationManual),localStorage.setItem(`siteInfo`,JSON.stringify({siteName:t,siteLogo:n}))}).catch(()=>{}),z5().then(e=>{let t=e?.resourceCapacity;t&&le({enabled:!!t.enabled,usedBytes:Number(t.usedBytes)||0,totalBytes:Number(t.totalBytes)||0,availableBytes:Number(t.availableBytes)||0,usagePercent:Number(t.usagePercent)||0,exceeded:!!t.exceeded,limitValue:t.limitValue??``,limitUnit:t.limitUnit||`GB`})}).catch(e=>{})},[]),(0,S.useEffect)(()=>{let e=()=>de(window.innerWidth<=767);return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let he=e=>{e.button===0&&(A(!0),j.current=!1,M.current={x:e.clientX,y:e.clientY})},ge=e=>{if(!k)return;let t=Math.abs(e.clientX-M.current.x),n=Math.abs(e.clientY-M.current.y);(t>5||n>5)&&(j.current=!0);let r=Math.max(60,Math.min(window.innerHeight-60,e.clientY-(M.current.y-D.y)));O(e=>({x:e.x,y:r}))},_e=()=>{let e=j.current;A(!1),j.current=!1,e||l(!0)};(0,S.useEffect)(()=>{if(k)return document.addEventListener(`mousemove`,ge),document.addEventListener(`mouseup`,_e),()=>{document.removeEventListener(`mousemove`,ge),document.removeEventListener(`mouseup`,_e)}},[k]);let ve=()=>{Z5().then(e=>{v(e)}).catch(()=>{})};(0,S.useEffect)(()=>{(async()=>{let e=localStorage.getItem(me);if(e)try{let t=JSON.parse(e),n=await e7(t.orderNo);if(n.status===`pending`){W({price:t.price,credits:t.credits,qrCode:t.qrCode,method:t.method}),q.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?(H(!0),Ae(t.orderNo,a)):localStorage.removeItem(me)}else n.status===`paid`?(Z.success(`支付成功!积分已到账`),j7.getState().refreshUser(),localStorage.removeItem(me)):localStorage.removeItem(me)}catch{localStorage.removeItem(me)}})()},[]),(0,S.useEffect)(()=>{gie().then(e=>{m(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),_ie().then(e=>{g(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),vie().then(e=>{se(e),e.alipay?G(`alipay`):e.wechat&&G(`wechat`)}).catch(()=>{}),ve()},[n]);let ye=t.pathname.startsWith(`/records`)?`/records`:t.pathname,be=Lae,xe={};p.forEach(e=>{let t=e.parent_id??e.parentId;t&&(xe[t]||(xe[t]=[]),xe[t].push(e))});let Se=p.filter(e=>!(e.parent_id??e.parentId));Se.sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0)),Object.keys(xe).forEach(e=>{xe[e].sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0))});let Ce=t=>{let n=t.menu_type??t.menuType,r=xe[t.id]&&xe[t.id].length>0;n===`group`||r?P(e=>({...e,[t.id]:!e[t.id]})):t.path&&(e(t.path),b(!1))},we=[{key:`profile`,icon:(0,$.jsx)(g5,{}),label:`账号: ${n?.username}`,disabled:!0},{key:`credits`,icon:(0,$.jsx)(b5,{style:{color:`#c9a96e`}}),label:`积分: ${n?.credits??0}`,disabled:!0},{type:`divider`},...n?.isTeamManager?[{key:`teamManagement`,icon:(0,$.jsx)(a5,{style:{color:`#6366f1`}}),label:`团队管理`}]:[],{key:`myCredits`,icon:(0,$.jsx)(b5,{}),label:`积分明细`},{key:`orderRecords`,icon:(0,$.jsx)(jH,{}),label:`订单记录`},{key:`messages`,icon:(0,$.jsx)(o4,{}),label:`消息中心${_>0?`(${_})`:``}`},...fe?[{key:`manual`,icon:(0,$.jsx)(jH,{}),label:`操作手册`}]:[],{type:`divider`},{key:`changePwd`,icon:(0,$.jsx)(h6,{}),label:`修改密码`},{type:`divider`},{key:`logout`,icon:(0,$.jsx)(x6,{}),label:`退出登录`,danger:!0}],Te=({key:t})=>{t===`logout`?(r(),e(`/login`)):t===`changePwd`?a(!0):t===`messages`?e(`/messages`):t===`recharge`?s(!0):t===`teamManagement`?e(`/team-management`):t===`myCredits`?e(`/user-center?tab=credits`):t===`orderRecords`?e(`/user-center?tab=orders`):t===`manual`&&window.open(fe,`_blank`)},Ee=async()=>{try{let e=await u.validateFields();await B5(e.oldPwd,e.newPwd),Z.success(`密码修改成功`),a(!1),u.resetFields()}catch(e){e?.response?.data?.detail?Z.error(e.response.data.detail):e?.message&&Z.error(e.message)}},De=()=>{r(),e(`/login`)},Oe=async()=>{if(!n){Z.warning(`请先登录`);return}try{let e=await w.validateFields();E(!0),await $ie({phone:e.phone,company_name:e.companyName,industry:e.industry,name:e.name,message:e.message}),Z.success(`提交成功,我们会尽快与您联系`),l(!1),w.resetFields()}catch(e){Z.error(e?.message||`提交失败`)}finally{E(!1)}},ke=(0,S.useCallback)(()=>{ie.current&&=(clearInterval(ie.current),null),ae.current&&=(clearInterval(ae.current),null)},[]),Ae=(0,S.useCallback)((e,t=180)=>{ke(),re(t),ie.current=setInterval(async()=>{try{let t=await e7(e);t.status===`paid`?(ke(),q.current=null,localStorage.removeItem(me),Z.success(`支付成功!积分已到账`),j7.getState().refreshUser(),H(!1),W(null),f(null)):t.status===`cancelled`&&(ke(),q.current=null,localStorage.removeItem(me))}catch{}},2e3),ae.current=setInterval(()=>{re(e=>e<=1?(ke(),q.current&&=(t7(q.current).catch(()=>{}),null),localStorage.removeItem(me),Z.warning(`订单已超时,请重新充值`),H(!1),W(null),f(null),0):e-1)},1e3)},[ke]),je=(t,n=0)=>{let r=t.path===ye,i=P7[t.icon]||(0,$.jsx)(J3,{}),a=xe[t.id]&&xe[t.id].length>0,o=(t.menu_type??t.menuType)===`group`;return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{onClick:()=>{!(o||a)&&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:o||a?`default`:`pointer`,fontSize:n>0?13:14,fontWeight:r?600:400,color:r?`#4f46e5`:o?`#94a3b8`:`#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`},onMouseEnter:e=>{!o&&!r&&!(o||a)&&(e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:[!o&&(0,$.jsx)(`span`,{style:{fontSize:n>0?14:16,flexShrink:0,color:r?`#6366f1`:`#64748b`},children:i}),(0,$.jsx)(`span`,{style:{whiteSpace:`nowrap`,flex:1,textAlign:`left`,fontWeight:o||r?600:400,fontSize:o?12:n>0?13:14,textTransform:o?`uppercase`:`none`,letterSpacing:o?.5:0},children:t.label})]}),(o||a)&&(0,$.jsx)(`div`,{style:{overflow:`hidden`},children:(xe[t.id]||[]).map(e=>je(e,n+1))})]},t.id)};return(0,$.jsxs)(uG,{style:{minHeight:`100vh`},children:[(0,$.jsxs)(`div`,{className:`desktop-sidebar`,style:{width:be,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,cursor:`pointer`},onClick:()=>{e(`/home`)},children:[(0,$.jsx)(`div`,{style:{width:42,height:42,borderRadius:14,flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,overflow:`hidden`},children:L?(0,$.jsx)(`img`,{src:L,alt:`logo`,style:{width:28,height:28,objectFit:`contain`}}):(0,$.jsx)(s5,{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:F})]})}),(0,$.jsx)(`div`,{style:{flex:1,padding:`8px 8px`,overflow:`auto`},children:Se.map(e=>je(e))}),(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)(mL,{style:{fontSize:16}}),(0,$.jsx)(`span`,{children:`充值积分`})]}),(0,$.jsx)(N7,{data:ce}),(0,$.jsx)(`div`,{style:{padding:`16px 16px`,flexShrink:0,paddingTop:0},children:(0,$.jsx)(OH,{menu:{items:we,onClick:Te},placement:`topRight`,arrow:!0,children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:12,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)(Pw,{size:36,icon:(0,$.jsx)(g5,{}),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:16,fontWeight:600,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,letterSpacing:-.01},children:n?.username}),(0,$.jsxs)(`div`,{style:{color:`#6366f1`,fontSize:16,fontWeight:500,letterSpacing:0,borderRadius:6,display:`inline-block`},children:[`积分: `,n?.credits||0]})]})]})})})]}),(0,$.jsx)(`div`,{className:`desktop-content`,style:{marginLeft:be+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:!ue&&(0,$.jsx)(wt,{})})}),(0,$.jsx)(`div`,{className:`mobile-header`,children:(0,$.jsxs)(`div`,{className:`mobile-header-content`,children:[(0,$.jsx)(`div`,{className:`mobile-menu-btn`,onClick:()=>b(!0),children:(0,$.jsx)(A6,{style:{fontSize:20}})}),(0,$.jsx)(`div`,{className:`mobile-header-title`,children:F}),(0,$.jsx)(`div`,{className:`mobile-header-right`,children:(0,$.jsxs)(`div`,{className:`mobile-credits-badge`,onClick:()=>s(!0),children:[(0,$.jsx)(b5,{}),(0,$.jsx)(`span`,{children:n?.credits||0})]})})]})}),(0,$.jsx)(`div`,{className:`mobile-content`,children:ue&&(0,$.jsx)(wt,{})}),(0,$.jsxs)(_H,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:36,height:36,borderRadius:10,flexShrink:0,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.35)`},children:L?(0,$.jsx)(`img`,{src:L,alt:`logo`,style:{width:24,height:24,objectFit:`contain`}}):(0,$.jsx)(s5,{style:{fontSize:18,color:`#ffffff`}})}),(0,$.jsx)(`span`,{style:{fontWeight:700,fontSize:16,color:`#1e293b`},children:F})]}),placement:`left`,onClose:()=>b(!1),open:y,size:280,closable:!0,className:`mobile-menu-drawer`,styles:{header:{borderBottom:`1px solid #f1f5f9`,padding:`16px 20px`},body:{padding:`12px 8px`,display:`flex`,flexDirection:`column`}},children:[(0,$.jsxs)(`div`,{style:{flex:1,overflow:`auto`,paddingBottom:12},children:[(0,$.jsx)(`div`,{style:{padding:`12px 8px 16px`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:16},children:[(0,$.jsx)(Pw,{size:44,style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,flexShrink:0},children:(0,$.jsx)(g5,{})}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsx)(`div`,{style:{fontSize:15,fontWeight:600,color:`#1e293b`,marginBottom:2},children:n?.username||`用户`}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`},children:[(0,$.jsx)(b5,{style:{color:`#f59e0b`,marginRight:4}}),`积分: `,(0,$.jsx)(`span`,{style:{color:`#f59e0b`,fontWeight:600},children:n?.credits??0})]})]})]})}),(0,$.jsx)(N7,{data:ce}),Se.map(e=>{let t=e.menu_type??e.menuType,n=xe[e.id]&&xe[e.id].length>0,r=e.path===ye,i=N[e.id],a=P7[e.icon]||(0,$.jsx)(J3,{});return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`mobile-menu-item ${r&&!n?`mobile-menu-item-active`:``} ${t===`group`?`mobile-menu-group`:``}`,onClick:()=>Ce(e),children:[t!==`group`&&(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:r?`#6366f1`:`#64748b`},children:a}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{paddingLeft:0,color:t===`group`?`#94a3b8`:r?`#4f46e5`:`#475569`,fontWeight:t===`group`||r?600:400,fontSize:t===`group`?12:15,textTransform:t===`group`?`uppercase`:`none`,letterSpacing:t===`group`?.5:0},children:e.label}),(t===`group`||n)&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#cbd5e1`,transition:`transform 0.2s ease`,transform:i?`rotate(90deg)`:`rotate(0deg)`},children:(0,$.jsx)(Bg,{})})]}),(t===`group`||n)&&i&&(0,$.jsx)(`div`,{className:`mobile-submenu`,children:(xe[e.id]||[]).map(e=>{let t=e.path===ye,n=P7[e.icon]||(0,$.jsx)(J3,{});return(0,$.jsxs)(`div`,{className:`mobile-menu-item mobile-submenu-item ${t?`mobile-menu-item-active`:``}`,onClick:()=>Ce(e),children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:t?`#6366f1`:`#94a3b8`},children:n}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:t?`#4f46e5`:`#64748b`,fontWeight:t?600:400,fontSize:14},children:e.label})]},e.id)})})]},e.id)})]}),(0,$.jsxs)(`div`,{style:{padding:`8px 0`,borderTop:`1px solid #f1f5f9`},children:[(0,$.jsxs)(`div`,{className:`mobile-menu-item`,onClick:()=>{e(`/user-center?tab=credits`),b(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#f59e0b`},children:(0,$.jsx)(b5,{})}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:`#475569`},children:`积分明细`})]}),(0,$.jsxs)(`div`,{className:`mobile-menu-item`,onClick:()=>{e(`/user-center?tab=orders`),b(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#6366f1`},children:(0,$.jsx)(jH,{})}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:`#475569`},children:`订单记录`})]}),(0,$.jsxs)(`div`,{className:`mobile-menu-item`,onClick:()=>{e(`/messages`),b(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#8b5cf6`},children:(0,$.jsx)(o4,{})}),(0,$.jsxs)(`span`,{className:`mobile-menu-label`,style:{color:`#475569`},children:[`消息中心`,_>0&&(0,$.jsx)(h$,{color:`red`,style:{marginLeft:8,fontSize:11},children:_})]})]}),(0,$.jsxs)(`div`,{className:`mobile-menu-item`,onClick:()=>{a(!0),b(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#0ea5e9`},children:(0,$.jsx)(h6,{})}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:`#475569`},children:`修改密码`})]}),(0,$.jsx)(`div`,{style:{height:8}}),(0,$.jsxs)(`div`,{className:`mobile-menu-item mobile-recharge-item`,onClick:()=>{s(!0),b(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#fff`},children:(0,$.jsx)(mL,{})}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:`#fff`,fontWeight:600},children:`充值积分`})]}),(0,$.jsxs)(`div`,{className:`mobile-menu-item`,onClick:()=>{De(),b(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#ef4444`},children:(0,$.jsx)(x6,{})}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:`#ef4444`},children:`退出登录`})]})]})]}),(0,$.jsx)(NK,{title:(0,$.jsxs)(EH,{children:[(0,$.jsx)(h6,{}),`修改密码`]}),open:i,onOk:Ee,onCancel:()=>{a(!1),u.resetFields()},okText:`确认修改`,cancelText:`取消`,width:440,children:(0,$.jsxs)(bU,{form:u,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(bU.Item,{name:`oldPwd`,label:`原密码`,rules:[{required:!0,message:`请输入原密码`}],children:(0,$.jsx)(tG.Password,{placeholder:`请输入原密码`,size:`large`,prefix:(0,$.jsx)(h6,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(bU.Item,{name:`newPwd`,label:`新密码`,rules:[{required:!0,message:`请输入新密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(tG.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`,prefix:(0,$.jsx)(h6,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(bU.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)(tG.Password,{placeholder:`请再次输入新密码`,size:`large`,prefix:(0,$.jsx)(h6,{style:{color:`#94a3b8`,marginRight:8}})})})]})}),(0,$.jsx)(NK,{title:(0,$.jsxs)(EH,{children:[(0,$.jsx)(N3,{}),`积分充值`]}),open:o,onCancel:()=>{s(!1),f(null)},width:680,className:`recharge-modal`,footer:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,padding:`12px 0 0`,borderTop:`1px solid #f0f0f0`},children:[(0,$.jsx)(X,{size:`large`,onClick:()=>{s(!1),f(null)},style:{borderRadius:10,marginRight:12},children:`取消`}),(0,$.jsx)(X,{type:`primary`,size:`large`,disabled:!d||!oe.alipay&&!oe.wechat,loading:te,onClick:async()=>{let e=h.find(e=>e.id===d);if(!e)return;let t=(e.credits||0)+(e.bonus_credits||e.bonusCredits||0);try{ne(!0);let n=await yie(e.id,ee),r=n.qrUrl||n.codeUrl||n.qr_code||n.code_url;(n.paymentMethod===`alipay`||n.paymentMethod===`wechat`)&&r?(W({price:e.price,credits:t,qrCode:r,method:n.paymentMethod}),s(!1),H(!0),q.current=n.orderNo,localStorage.setItem(me,JSON.stringify({orderNo:n.orderNo,price:e.price,credits:t,qrCode:r,method:n.paymentMethod,createdAt:n.createdAt||new Date().toISOString(),timeoutSeconds:180})),Ae(n.orderNo)):(Z.success(`充值成功!积分已到账`),j7.getState().refreshUser(),s(!1),f(null))}catch(e){Z.error(e?.message||`创建订单失败,请重试`)}finally{ne(!1)}},style:{borderRadius:10,fontWeight:600,background:d?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#d1d5db`,border:`none`,boxShadow:d?`0 8px 24px rgba(99,102,241,0.3)`:`none`},children:`确认充值`})]}),children:(0,$.jsxs)(`div`,{style:{marginTop:16},children:[(0,$.jsxs)(EH,{style:{marginBottom:16},children:[(0,$.jsx)(b5,{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})]}),!oe.alipay&&!oe.wechat?(0,$.jsx)(`div`,{style:{marginBottom:16,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:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13,marginBottom:8,display:`block`},children:`选择支付方式`}),(0,$.jsxs)(HI.Group,{value:ee,onChange:e=>G(e.target.value),style:{display:`flex`,gap:12},children:[oe.alipay&&(0,$.jsxs)(HI.Button,{value:`alipay`,style:{flex:1,textAlign:`center`,borderRadius:10,height:44,lineHeight:`42px`,borderColor:ee===`alipay`?`#1677ff`:void 0,color:ee===`alipay`?`#1677ff`:void 0},children:[(0,$.jsx)(D2,{style:{fontSize:16,marginRight:6}}),`支付宝`]}),oe.wechat&&(0,$.jsxs)(HI.Button,{value:`wechat`,style:{flex:1,textAlign:`center`,borderRadius:10,height:44,lineHeight:`42px`,borderColor:ee===`wechat`?`#07c160`:void 0,color:ee===`wechat`?`#07c160`:void 0},children:[(0,$.jsx)(C5,{style:{fontSize:16,marginRight:6}}),`微信支付`]})]})]}),(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)(e6,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsxs)(Q.Text,{style:{color:`#64748b`,fontSize:13},children:[`当前平台仅支持支付宝/微信扫码充值,如需转账支付请`,(0,$.jsx)(Q.Text,{style:{color:`#ff0000ff`,cursor:`pointer`,textDecoration:`underline`},onClick:()=>{s(!1),l(!0)},children:`联系我们`})]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12,flexWrap:`wrap`},children:h.map((e,t)=>{let n=F7[t%F7.length],r=(e.credits||0)+(e.bonus_credits||e.bonusCredits||0);return(0,$.jsxs)(`div`,{onClick:()=>f(e.id),style:{flex:`1 1 45%`,minWidth:200,borderRadius:16,padding:`20px 16px`,background:d===e.id?`rgba(99,102,241,0.04)`:`#fafbff`,border:d===e.id?`2px solid #6366f1`:`1px solid #f0f0f5`,cursor:`pointer`,position:`relative`,transition:`all 0.2s`},children:[e.description&&(0,$.jsx)(h$,{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:14,fontWeight:600,color:`#6366f1`},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)})})]})}),(0,$.jsx)(NK,{open:V,onCancel:async()=>{if(ke(),q.current){try{await t7(q.current)}catch{}q.current=null}localStorage.removeItem(me),H(!1),W(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:U?.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:U?.method===`alipay`?(0,$.jsx)(D2,{style:{fontSize:24,color:`#fff`}}):(0,$.jsx)(C5,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:U?.method===`alipay`?`支付宝支付`:`微信支付`}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:U?.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:U&&(0,$.jsx)(w2,{value:U.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:[`¥`,U?.price||0]}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`,marginTop:4},children:[`购买 `,U?.credits||0,` 积分`]}),(0,$.jsx)(`div`,{style:{marginTop:12,padding:`8px 16px`,background:K<=30?`#fef2f2`:`#f0f9ff`,borderRadius:8,border:K<=30?`1px solid #fecaca`:`1px solid #bae6fd`,display:`inline-block`},children:(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:K<=30?`#dc2626`:`#0284c7`},children:[`订单将在 `,(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:800},children:K}),` 秒后关闭`]})})]})]}),(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)(X,{size:`large`,block:!0,onClick:async()=>{if(ke(),q.current){try{await t7(q.current)}catch{}q.current=null}localStorage.removeItem(me),H(!1),W(null),f(null)},style:{borderRadius:10},children:`取消支付`})})]})}),(0,$.jsx)(Iae,{}),(0,$.jsx)(`div`,{className:`contact-button-wrapper`,style:{right:`${D.x}px`,bottom:`${window.innerHeight-D.y}px`},children:(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`div`,{className:`contact-tooltip`,style:{opacity:+!!x},children:`联系我们`}),(0,$.jsx)(`button`,{className:`contact-button ${k?`dragging`:``}`,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),onMouseDown:he,onMouseUp:_e,children:(0,$.jsx)(N6,{style:{fontSize:20}})})]})}),(0,$.jsx)(NK,{title:(0,$.jsxs)(EH,{children:[(0,$.jsx)(N6,{}),`联系我们`]}),open:c,onCancel:()=>{l(!1),w.resetFields()},footer:null,width:480,className:`contact-modal`,children:(0,$.jsxs)(`div`,{style:{marginTop:8},children:[(0,$.jsxs)(bU,{form:w,layout:`vertical`,children:[(0,$.jsx)(bU.Item,{name:`name`,label:`姓名`,rules:[{required:!0,message:`请输入姓名`}],children:(0,$.jsx)(tG,{placeholder:`请输入您的姓名`,size:`large`})}),(0,$.jsx)(bU.Item,{name:`phone`,label:`手机号`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1[3-9]\d{9}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(tG,{placeholder:`请输入您的手机号`,size:`large`})}),(0,$.jsx)(bU.Item,{name:`companyName`,label:`公司名称`,rules:[{required:!0,message:`请输入公司名称`}],children:(0,$.jsx)(tG,{placeholder:`请输入公司名称`,size:`large`})}),(0,$.jsx)(bU.Item,{name:`industry`,label:`您的行业`,rules:[{required:!0,message:`请输入您的行业`}],children:(0,$.jsx)(tG,{placeholder:`请输入您的行业`,size:`large`})}),(0,$.jsx)(bU.Item,{name:`message`,label:`留言(选填)`,children:(0,$.jsx)(tG.TextArea,{placeholder:`请输入您的需求或问题`,rows:3,style:{borderRadius:10}})})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,display:`flex`,gap:12},children:[(0,$.jsx)(X,{size:`large`,onClick:()=>{l(!1),w.resetFields()},style:{borderRadius:10,flex:1},children:`取消`}),(0,$.jsx)(X,{type:`primary`,size:`large`,onClick:Oe,loading:T,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,flex:1},children:`提交`})]})]})})]})},zae=`http://localhost:8000/api`,Bae=()=>{let{checkAuth:e}=j7(),[t,n]=(0,S.useState)(!1),[r,i]=(0,S.useState)(`password`),[a,o]=(0,S.useState)(`password`),[s]=On(),c=s.get(`redirect`),l=s.get(`tab`),[u,d]=(0,S.useState)(0),[f,p]=(0,S.useState)(0),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(!1),[v,y]=(0,S.useState)(!1),[b,x]=(0,S.useState)(!1),[C,w]=(0,S.useState)(0),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(!1),k=(()=>{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,j]=(0,S.useState)(k.siteName),[M,N]=(0,S.useState)(k.siteLogo),[P,F]=(0,S.useState)(``),[I,L]=(0,S.useState)(``),R=Ye(),{login:z}=j7(),[B]=bU.useForm(),[V]=bU.useForm(),[H]=bU.useForm();(0,S.useEffect)(()=>{J5().then(e=>{j(e.siteName),N(e.siteLogo),F(e.userAgreementPrivacyUrl),L(e.siteCopyright)}).catch(()=>{})},[]),(0,S.useEffect)(()=>{l===`register`&&i(`register`)},[l]);let U=()=>{if(c)try{R(decodeURIComponent(c));return}catch{}R(`/home`)},W=()=>m?!0:(Z.warning(`请先阅读并同意用户协议及隐私政策`),!1),ee=async()=>{if(W())try{let t=await B.validateFields();await z(t.phone,t.password,void 0,t.rememberMe),Z.success(`登录成功,欢迎回来`),await e(),U()}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}},G=async()=>{if(W())try{let t=V.getFieldsValue();if(!t.phone||!t.code){Z.error(`请填写手机号和验证码`);return}n(!0),await Xre(t.phone,t.code),Z.success(`登录成功,欢迎回来`),await e(),U()}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}finally{n(!1)}},te=async()=>{if(W())try{let t=await H.validateFields();n(!0),await Zre(t.phone,t.regCode,t.password),Z.success(`注册成功`),await e(),U()}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`注册失败`;Z.error(t)}finally{n(!1)}},ne=(e,t)=>{e(60);let n=setInterval(()=>{e(e=>e<=1?(clearInterval(n),_(!1),t?E(!0):O(!0),0):e-1)},1e3)};(0,S.useEffect)(()=>{u===0&&r===`phone`&&x(!1)},[u,r]);let K=async(e,t)=>{try{if(!e||!/^1\d{10}$/.test(e)){Z.error(`请输入正确的手机号`);return}if(t){_(!0),y(!1);return}if(!b){_(!0),x(!1);return}let n=``;n=r===`register`?`register`:`login`,await Y5(e,n),ne(t?p:d),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(y(!1),p(0)):(x(!1),d(0)),w(e=>e+1)}},re=async(e=!1)=>{let t=r===`register`?H.getFieldValue(`phone`):V.getFieldValue(`phone`);try{let e=``;e=r===`register`?`register`:`login`,await Y5(t,e),r===`register`?(y(!0),ne(p,!0)):(x(!0),ne(d,!1)),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(y(!1),p(0),E(!0)):(x(!1),d(0),O(!0)),w(e=>e+1)}},ie=e=>{o(e),i(e),d(0),p(0),x(!1),y(!1),_(!1),E(!1),O(!1),w(e=>e+1),e===`password`?B.resetFields():V.resetFields()},ae=[{icon:(0,$.jsx)(h4,{}),title:`AI 智能优化`,desc:`输入原始提示词,AI 自动为您生成专业级视频、图片描述`},{icon:(0,$.jsx)(l8,{}),title:`一键生成视频、图片`,desc:`支持多种规格生成视频、图片`},{icon:(0,$.jsx)(G3,{}),title:`项目维度管理`,desc:`按项目行业分类视频、图片,支持多种行业`}],q={background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,borderRadius:10,fontSize:14},oe=e=>{if(!e){Z.warning(`暂未上传协议文件`);return}e.startsWith(`http://`)||e.startsWith(`https://`)?window.open(e,`_blank`):window.open(`${zae.replace(/\/api$/,``)}${e}`,`_blank`)};return(0,$.jsxs)(`div`,{className:`login-page`,children:[(0,$.jsx)(`div`,{className:`login-bg-overlay`}),(0,$.jsx)(`div`,{className:`login-decoration login-decoration-1`}),(0,$.jsx)(`div`,{className:`login-decoration login-decoration-2`}),(0,$.jsx)(`div`,{className:`login-left-section`,children:(0,$.jsxs)(EH,{direction:`vertical`,size:36,className:`login-left-content`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`login-logo-row`,children:[M?(0,$.jsx)(`img`,{src:M,alt:`logo`,className:`login-logo-img`}):(0,$.jsx)(`div`,{className:`login-logo-placeholder`,children:(0,$.jsx)(s5,{style:{fontSize:26,color:`#fff`}})}),(0,$.jsx)(`span`,{className:`login-site-name`,children:A})]}),(0,$.jsx)(`div`,{className:`shiny-text-container`,children:(0,$.jsx)(`span`,{className:`shiny-text`,children:`AI赋能创意,素材触手可及`})}),(0,$.jsxs)(Q.Paragraph,{className:`login-desc`,children:[`专业的 AI 素材生成平台,通过智能提示词优化,`,(0,$.jsx)(`br`,{}),`让您的创意快速转化为精美视频、图片`]})]}),(0,$.jsx)(`div`,{className:`login-features-list`,children:ae.map((e,t)=>(0,$.jsxs)(`div`,{className:`electric-border-card login-feature-card`,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`,{className:`login-feature-icon`,children:e.icon})}),(0,$.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,$.jsx)(Q.Text,{className:`login-feature-title`,children:e.title}),(0,$.jsx)(Q.Text,{className:`login-feature-desc`,children:e.desc})]})]},t))})]})}),(0,$.jsxs)(`div`,{className:`login-right-section`,children:[(0,$.jsx)(`div`,{className:`login-right-section-inner`,children:(0,$.jsxs)(RL,{className:`login-card`,styles:{body:{padding:`36px 28px`}},children:[(0,$.jsx)(Q.Title,{level:3,className:`login-card-title`,children:r===`register`?`创建账号`:`欢迎回来`}),(0,$.jsx)(Q.Text,{className:`login-card-subtitle`,children:r===`register`?`注册新账号,开始创作视频`:`登录您的账号,开始创作视频`}),r!==`register`&&(0,$.jsx)(`div`,{className:`login-tabs`,children:[`password`,`phone`].map(e=>(0,$.jsx)(`div`,{onClick:()=>ie(e),className:`login-tab ${a===e?`login-tab-active`:``}`,children:e===`password`?`密码登录`:`验证码登录`},e))}),r===`password`&&(0,$.jsxs)(bU,{form:B,size:`large`,layout:`vertical`,onFinish:ee,children:[(0,$.jsx)(bU.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(tG,{prefix:(0,$.jsx)(I6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,style:q})}),(0,$.jsx)(bU.Item,{name:`password`,rules:[{required:!0,message:`请输入密码`}],children:(0,$.jsx)(tG.Password,{prefix:(0,$.jsx)(h6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入密码`,style:q})}),(0,$.jsx)(bU.Item,{name:`rememberMe`,valuePropName:`checked`,style:{marginBottom:12},children:(0,$.jsx)(oz,{children:`记住我的登录状态`})}),(0,$.jsx)(bU.Item,{style:{marginBottom:12},children:(0,$.jsx)(X,{type:`primary`,htmlType:`submit`,loading:t,block:!0,className:`login-submit-btn`,children:`登 录`})})]}),r===`phone`&&(0,$.jsxs)(bU,{form:V,size:`large`,layout:`vertical`,children:[(0,$.jsx)(bU.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(tG,{prefix:(0,$.jsx)(I6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:q})}),(0,$.jsx)(bU.Item,{name:`code`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(EH.Compact,{style:{width:`100%`},children:[(0,$.jsx)(tG,{prefix:(0,$.jsx)(A8,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!b,style:{...q,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(X,{disabled:u>0,onClick:()=>{D?(x(!1),_(!0),w(e=>e+1)):K(V.getFieldValue(`phone`))},className:`login-code-btn`,children:u>0?`${u}s`:D?`重新发送`:`获取验证码`})]})}),g&&(0,$.jsx)(bU.Item,{style:{marginBottom:12},children:(0,$.jsx)(I7,{onSuccess:re,isVerified:b})},C),(0,$.jsx)(bU.Item,{style:{marginBottom:12},children:(0,$.jsx)(X,{type:`primary`,onClick:G,loading:t,block:!0,className:`login-submit-btn`,children:`登 录`})})]}),r===`register`&&(0,$.jsxs)(bU,{form:H,size:`large`,layout:`vertical`,children:[(0,$.jsx)(bU.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(tG,{prefix:(0,$.jsx)(I6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:q})}),(0,$.jsx)(bU.Item,{name:`regCode`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(EH.Compact,{style:{width:`100%`},children:[(0,$.jsx)(tG,{prefix:(0,$.jsx)(A8,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!v,style:{...q,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(X,{disabled:f>0,onClick:()=>{T?(y(!1),_(!0),w(e=>e+1)):K(H.getFieldValue(`phone`),!0)},className:`login-code-btn`,children:f>0?`${f}s`:T?`重新发送`:`获取验证码`})]})}),g&&(0,$.jsx)(bU.Item,{style:{marginBottom:12},children:(0,$.jsx)(I7,{onSuccess:re,isVerified:v})},C),(0,$.jsx)(bU.Item,{name:`password`,rules:[{required:!0,message:`请设置密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(tG.Password,{prefix:(0,$.jsx)(h6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请设置密码(至少6位)`,style:q})}),(0,$.jsx)(bU.Item,{style:{marginBottom:12},children:(0,$.jsx)(X,{type:`primary`,onClick:te,loading:t,block:!0,className:`login-submit-btn`,children:`注 册`})})]}),(0,$.jsx)(`div`,{className:`login-agreement`,children:(0,$.jsx)(oz,{checked:m,onChange:e=>h(e.target.checked),children:(0,$.jsxs)(`span`,{className:`login-agreement-text`,children:[`我已阅读并同意`,(0,$.jsx)(`span`,{onClick:e=>{e.stopPropagation(),oe(P)},className:`login-link`,children:`《用户协议及隐私政策》`})]})})}),(0,$.jsx)(`div`,{className:`login-footer`,children:r===`register`?(0,$.jsx)(Q.Text,{className:`login-switch-btn`,onClick:()=>{i(`password`),o(`password`),E(!1),O(!1),y(!1),_(!1),w(e=>e+1),H.resetFields()},children:`已有账号?去登录`}):(0,$.jsx)(Q.Text,{className:`login-switch-btn`,onClick:()=>{i(`register`),E(!1),O(!1),y(!1),_(!1),w(e=>e+1)},children:`没有账号?立即注册`})})]})}),I&&(0,$.jsx)(`div`,{className:`login-copyright-wrapper`,children:(0,$.jsx)(`div`,{className:`login-copyright`,children:I})})]})]})},I7=({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{if(o.current||t)return;e.preventDefault();let s=n.current;if(!s)return;let c=s.getBoundingClientRect();u(e.touches[0].clientX-c.left-50/2);let d=e=>{u(e.touches[0].clientX-c.left-50/2)},f=()=>{document.removeEventListener(`touchmove`,d),document.removeEventListener(`touchend`,f),!o.current&&a.current({page:1,pageSize:10,total:0,items:[]}),L7=O5((e,t)=>({projects:[],records:Vae(),loading:!1,mediaType:`video`,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:[],inputValue:``,currentMedia:[],fetchProjects:async()=>{e({loading:!0});try{e({projects:await $re(),loading:!1})}catch{e({loading:!1})}},createProject:async(n,r)=>{let i=await eie(n,r);return e({projects:[i,...t().projects]}),i},deleteProject:async n=>{await tie(n),e({projects:t().projects.filter(e=>e.id!==n)})},fetchRecords:async(t={})=>{e({loading:!0});try{e({records:await V5(t),loading:!1})}catch{e({loading:!1})}},optimizePrompt:async(n,r)=>{let i=await nie(n,r);try{await j7.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 pie(n,r);try{await j7.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}),setInputValue:t=>e({inputValue:t}),setCurrentMedia:t=>e({currentMedia: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:[],inputValue:``,currentMedia:[]})}));function R7(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 z7=[`#f97316`,`#3b82f6`,`#8b5cf6`,`#10b981`,`#eab308`,`#6366f1`,`#ef4444`,`#06b6d4`,`#64748b`,`#78716c`],B7={ShoppingCartOutlined:(0,$.jsx)(H8,{}),BookOutlined:(0,$.jsx)(l4,{}),HomeOutlined:(0,$.jsx)(J3,{}),FireOutlined:(0,$.jsx)(D3,{}),RocketOutlined:(0,$.jsx)(D8,{}),SkinOutlined:(0,$.jsx)(dre,{}),CompassOutlined:(0,$.jsx)(e3,{}),HeartOutlined:(0,$.jsx)(z3,{}),CarOutlined:(0,$.jsx)(w4,{}),CameraOutlined:(0,$.jsx)(x4,{}),CloudOutlined:(0,$.jsx)(I4,{}),StarOutlined:(0,$.jsx)(t5,{}),TrophyOutlined:(0,$.jsx)(u5,{}),ThunderboltOutlined:(0,$.jsx)(s5,{}),BulbOutlined:(0,$.jsx)(h4,{}),CoffeeOutlined:(0,$.jsx)(J4,{}),CrownOutlined:(0,$.jsx)(o3,{}),DashboardOutlined:(0,$.jsx)(l3,{}),FlagOutlined:(0,$.jsx)(A3,{}),GlobalOutlined:(0,$.jsx)(I3,{}),GiftOutlined:(0,$.jsx)(N3,{}),LaptopOutlined:(0,$.jsx)(r6,{}),MobileOutlined:(0,$.jsx)(I6,{}),MonitorOutlined:(0,$.jsx)(z6,{}),PayCircleOutlined:(0,$.jsx)(J6,{}),PictureOutlined:(0,$.jsx)(e8,{}),PlayCircleOutlined:(0,$.jsx)(l8,{}),SafetyOutlined:(0,$.jsx)(A8,{}),ShoppingOutlined:(0,$.jsx)(G8,{}),SmileOutlined:(0,$.jsx)(Z8,{}),SoundOutlined:(0,$.jsx)(gre,{}),TagOutlined:(0,$.jsx)(xre,{}),TeamOutlined:(0,$.jsx)(a5,{}),ToolOutlined:(0,$.jsx)(Tre,{}),TruckOutlined:(0,$.jsx)(Ore,{}),VideoCameraOutlined:(0,$.jsx)(v5,{}),WalletOutlined:(0,$.jsx)(b5,{}),BankOutlined:(0,$.jsx)(e4,{}),BuildOutlined:(0,$.jsx)(f4,{}),ExperimentOutlined:(0,$.jsx)(v3,{}),HighlightOutlined:(0,$.jsx)(H3,{}),IdcardOutlined:(0,$.jsx)(Z3,{}),MedicineBoxOutlined:(0,$.jsx)(D6,{}),ReadOutlined:(0,$.jsx)(h8,{}),RestOutlined:(0,$.jsx)(v8,{}),SketchOutlined:(0,$.jsx)(J8,{}),SolutionOutlined:(0,$.jsx)(mre,{})},Hae=()=>{let[e,t]=(0,S.useState)(!1),[n]=bU.useForm(),r=Ye(),{projects:i,fetchProjects:a,createProject:o,deleteProject:s}=L7(),[c,l]=(0,S.useState)([]);(0,S.useEffect)(()=>{a(),$5().then(l).catch(()=>{})},[]);let u=Object.fromEntries(c.map((e,t)=>[e.key,{label:e.label,color:z7[t%z7.length],icon:e.icon||`AppstoreOutlined`}]));return(0,$.jsxs)(`div`,{style:{margin:`-24px -32px -32px`,borderRadius:20,height:`calc(100vh - 34px)`,padding:`24px`},children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`16px 24px`,borderRadius:16,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:(0,$.jsxs)(`div`,{children:[(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,$.jsxs)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:[`共 `,i.length,` 个项目 · 按行业分类管理`]})]})}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(jH,{}),onClick:()=>r(`/records`),size:`large`,style:{background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`,fontWeight:600,borderRadius:10,height:42},children:`项目记录`}),(0,$.jsx)(X,{icon:(0,$.jsx)(mL,{}),onClick:()=>t(!0),size:`large`,style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,color:`#fff`,fontWeight:600,borderRadius:10,height:42,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`},children:`新建项目`})]})]}),i.length===0?(0,$.jsx)(rC,{image:rC.PRESENTED_IMAGE_SIMPLE,description:`还没有项目,创建您的第一个视频项目`,style:{padding:`60px 0`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(mL,{}),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:B7[u[e.industry]?.icon]||(0,$.jsx)(N2,{})}),(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)(h$,{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)(wV,{style:{fontSize:12,color:`#94a3b8`}}),(0,$.jsxs)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:12,color:`#94a3b8`},children:[`创建于 `,R7(e.createdAt)]})]})]}),(0,$.jsxs)(`div`,{className:`project-actions`,style:{display:`flex`,alignItems:`center`,gap:8,marginLeft:16},children:[(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(l8,{}),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)(LK,{title:`确定删除该项目?`,description:`项目下的生成记录将一并删除`,onConfirm:async t=>{t?.stopPropagation(),await s(e.id),Z.success(`项目已删除`)},onCancel:e=>e?.stopPropagation(),children:(0,$.jsx)(X,{danger:!0,icon:(0,$.jsx)(k$,{}),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)(Bg,{className:`mobile-hide`,style:{color:`#cbd5e1`,fontSize:12}})]})]},e.id))}),(0,$.jsx)(NK,{title:(0,$.jsxs)(EH,{children:[(0,$.jsx)(N2,{}),`新建项目`]}),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)(bU,{form:n,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(bU.Item,{name:`name`,label:`项目名称`,rules:[{required:!0,message:`请输入项目名称`}],children:(0,$.jsx)(tG,{placeholder:`例如:618电商大促宣传片`,prefix:(0,$.jsx)(dZ,{}),size:`large`})}),(0,$.jsx)(bU.Item,{name:`industry`,label:`所属行业`,rules:[{required:!0,message:`请选择行业`}],children:(0,$.jsx)(NC,{placeholder:`选择项目所属行业`,size:`large`,children:c.map((e,t)=>(0,$.jsx)(NC.Option,{value:e.key,children:(0,$.jsxs)(EH,{children:[B7[e.icon]||(0,$.jsx)(N2,{}),` `,e.label]})},e.key))})})]})})]})},{Text:V7}=Q,Uae={real_person:{title:`选择真人素材库`,empty:`暂无可选 Active 真人素材`,projectError:`加载真人素材项目失败`,assetError:`加载真人素材失败`,fallbackName:`真人素材`},aigc_virtual:{title:`选择虚拟素材库`,empty:`暂无可选 Active 虚拟素材`,projectError:`加载虚拟素材项目失败`,assetError:`加载虚拟素材失败`,fallbackName:`虚拟素材`}},H7=e=>e?e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`)||e.startsWith(`blob:`)?e:`${`http://ceshi.apiforeign.minzhong.cn`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,Wae=e=>e.assetType===`Video`?H7(e.videoCoverUrl||e.previewUrl||e.displayUrl||e.providerUrl):H7(e.previewUrl||e.displayUrl||e.videoCoverUrl||e.providerUrl),Gae=e=>{let t=Number(e||0);return!Number.isFinite(t)||t<=0?`-`:`${t.toFixed(t>=10?0:1)}s`},U7=({open:e,libraryType:t=`real_person`,selectedIds:n=[],maxCount:r=20,onClose:i,onSelect:a,maxImageCount:o,maxVideoCount:s,usedImageCount:c,usedVideoCount:l,usedVideoDuration:u,maxVideoDuration:d,accept:f})=>{let p=Uae[t],[m,h]=(0,S.useState)([]),[g,_]=(0,S.useState)(),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(f===`image/*`?`Image`:void 0),[C,w]=(0,S.useState)([]),[T,E]=(0,S.useState)(new Map),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),j=(0,S.useMemo)(()=>new Set(T.keys()),[T]),M=async()=>{O(!0);try{let e=(await(t===`aigc_virtual`?A7:k7)({page:1,pageSize:100,status:`active`})).items||[];h(e),_(t=>t&&e.some(e=>e.id===t)?t:e[0]?.id)}catch(e){Z.error(e?.message||p.projectError)}finally{O(!1)}},N=async()=>{A(!0);try{w((await(t===`aigc_virtual`?Sae:hae)({projectId:g,keyword:v.trim()||void 0,assetType:b,page:1,pageSize:100})).items||[])}catch(e){Z.error(e?.message||p.assetError)}finally{A(!1)}};(0,S.useEffect)(()=>{e&&setTimeout(()=>{E(new Map),y(``),x(void 0),_(void 0),w([]),M()},0)},[e,t]),(0,S.useEffect)(()=>{g&&setTimeout(()=>{N()},0)},[g,b]);let P=e=>{if(n.includes(e.id)){Z.info(`该素材已添加`);return}if(f===`image/*`&&e.assetType===`Video`){Z.warning(`当前仅支持选择图片素材`);return}E(t=>{let n=new Map(t);return n.has(e.id)?(n.delete(e.id),n):n.size>=r?(Z.warning(`最多选择 ${r} 个参考素材`),t):(n.set(e.id,e),n)})},F=(0,S.useMemo)(()=>{let e=Array.from(T.values()).filter(e=>e.assetType===`Image`).length,t=Array.from(T.values()).filter(e=>e.assetType===`Video`).length,n=Array.from(T.values()).filter(e=>e.assetType===`Video`).reduce((e,t)=>e+(t.videoDuration||0),0),r=o!==void 0&&c!==void 0?o-c:1/0,i=s!==void 0&&l!==void 0?s-l:1/0,a=d!==void 0&&u!==void 0?d-u:1/0;return e>r||t>i||n>a},[T,o,c,s,l,d,u]);return(0,$.jsxs)(NK,{title:`${p.title}`,open:e,onCancel:i,width:920,destroyOnHidden:!0,footer:[(0,$.jsx)(X,{onClick:i,children:`取消`},`cancel`),(0,$.jsxs)(X,{type:`primary`,onClick:()=>{let e=Array.from(T.values()).filter(e=>!n.includes(e.id));if(!e.length){Z.warning(`请选择至少一个${t===`aigc_virtual`?`虚拟`:`真人`}素材`);return}a(e),i()},disabled:F,style:{background:F?`#94a3b8`:`#8b5cf6`,opacity:F?.6:1,cursor:F?`not-allowed`:`pointer`},children:[`添加选中素材(`,T.size,`)`]},`ok`)],children:[f!==`image/*`&&(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:20,marginBottom:16,padding:`12px 16px`,background:`#fafafa`,borderRadius:8},children:(()=>{let e=Array.from(T.values()).filter(e=>e.assetType===`Image`).length,t=Array.from(T.values()).filter(e=>e.assetType===`Video`).length,n=Array.from(T.values()).filter(e=>e.assetType===`Video`).reduce((e,t)=>e+(t.videoDuration||0),0),r=o!==void 0&&c!==void 0?o-c:1/0,i=s!==void 0&&l!==void 0?s-l:1/0,a=d!==void 0&&u!==void 0?d-u:1/0,f=e>r,p=t>i,m=n>a;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`span`,{style:{fontSize:13,color:f?`#ef4444`:`#64748b`,fontWeight:f?600:400},children:[`还可选取图片 `,e,`/`,o!==void 0&&c!==void 0?o-c:`-`,` 张`]}),(0,$.jsxs)(`span`,{style:{fontSize:13,color:p||m?`#ef4444`:`#64748b`,fontWeight:p||m?600:400},children:[`视频还可选取 `,t,`/`,s!==void 0&&l!==void 0?s-l:`-`,` 个(`,n.toFixed(1),`/`,d!==void 0&&u!==void 0?(d-u).toFixed(1):`-`,`秒)`]})]})})()}),(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`240px 1fr`,gap:16,height:500},children:[(0,$.jsxs)(`div`,{style:{border:`1px solid #eef0f4`,borderRadius:12,padding:12,background:`#fafafa`,overflowY:`auto`,height:`100%`},children:[(0,$.jsxs)(EH,{style:{width:`100%`,justifyContent:`space-between`,marginBottom:12},children:[(0,$.jsx)(V7,{strong:!0,children:`项目组`}),(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(Uq,{}),onClick:M,loading:D})]}),(0,$.jsx)(cK,{spinning:D,children:(0,$.jsx)(gK,{dataSource:m,locale:{emptyText:(0,$.jsx)(rC,{image:rC.PRESENTED_IMAGE_SIMPLE,description:`暂无项目组`})},renderItem:e=>(0,$.jsx)(gK.Item,{onClick:()=>_(e.id),style:{cursor:`pointer`,padding:`10px 12px`,borderRadius:10,marginBottom:6,border:g===e.id?`1px solid #8b5cf6`:`1px solid transparent`,background:g===e.id?`#f5f3ff`:`#fff`},children:(0,$.jsxs)(`div`,{style:{width:`100%`},children:[(0,$.jsx)(V7,{strong:!0,ellipsis:!0,style:{display:`block`},children:e.name}),(0,$.jsx)(V7,{type:`secondary`,style:{fontSize:12},children:typeof e.activeImageAssetCount==`number`||typeof e.activeVideoAssetCount==`number`?` 图 ${e.activeImageAssetCount||0} / 视 ${e.activeVideoAssetCount||0}`:``})]})})})})]}),(0,$.jsxs)(`div`,{style:{overflowY:`auto`,height:`100%`},children:[(0,$.jsxs)(EH,{style:{width:`100%`,marginBottom:12},children:[(0,$.jsx)(tG,{allowClear:!0,prefix:(0,$.jsx)(OC,{}),placeholder:`搜索素材名称`,value:v,onChange:e=>y(e.target.value),onPressEnter:N}),(0,$.jsx)(NC,{allowClear:f!==`image/*`,placeholder:`素材类型`,value:b,onChange:x,style:{width:116},options:f===`image/*`?[{value:`Image`,label:`图片`}]:[{value:`Image`,label:`图片`},{value:`Video`,label:`视频`}]}),(0,$.jsx)(X,{icon:(0,$.jsx)(Uq,{}),onClick:N,loading:k,children:`刷新`})]}),(0,$.jsx)(cK,{spinning:k,children:C.length===0?(0,$.jsx)(rC,{image:rC.PRESENTED_IMAGE_SIMPLE,description:p.empty,style:{marginTop:120}}):(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(140px, 1fr))`,gap:12,maxHeight:420,overflowY:`auto`,paddingRight:4},children:C.filter(e=>f!==`image/*`||e.assetType===`Image`).map(e=>{let t=j.has(e.id)||n.includes(e.id),r=n.includes(e.id),i=Wae(e),a=e.assetType===`Video`;return(0,$.jsxs)(`div`,{onClick:()=>P(e),style:{cursor:r?`not-allowed`:`pointer`,border:t?`2px solid #8b5cf6`:`1px solid #edf0f5`,borderRadius:12,overflow:`hidden`,background:`#fff`,boxShadow:t?`0 8px 20px rgba(139,92,246,0.18)`:`0 4px 12px rgba(15,23,42,0.04)`,opacity:r?.62:1,position:`relative`},children:[(0,$.jsxs)(`div`,{style:{aspectRatio:`1 / 1`,background:`#f8fafc`,display:`flex`,alignItems:`center`,justifyContent:`center`,position:`relative`},children:[i?a?(0,$.jsx)(`video`,{src:i,muted:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`img`,{src:i,alt:e.name||p.fallbackName,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):a?(0,$.jsx)(v5,{style:{fontSize:32,color:`#94a3b8`}}):(0,$.jsx)(e8,{style:{fontSize:32,color:`#94a3b8`}}),a&&(0,$.jsx)(`div`,{style:{position:`absolute`,left:8,bottom:8,padding:`2px 6px`,borderRadius:8,background:`rgba(15,23,42,0.72)`,color:`#fff`,fontSize:12},children:Gae(e.videoDuration)})]}),t&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,width:24,height:24,borderRadius:12,background:`#8b5cf6`,color:`#fff`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(SC,{})}),(0,$.jsxs)(`div`,{style:{padding:10},children:[(0,$.jsx)(V7,{strong:!0,ellipsis:!0,style:{display:`block`},children:e.name||`未命名素材`}),(0,$.jsxs)(EH,{wrap:!0,size:4,style:{marginTop:6},children:[(0,$.jsx)(h$,{color:a?`blue`:`default`,children:a?`视频`:`图片`}),(0,$.jsx)(h$,{children:e.projectName})]})]})]},e.id)})})})]})]})]})},{Text:W7}=Q,Kae=e=>e?/^(https?:|data:|blob:)/i.test(e)?e:`${`http://ceshi.apiforeign.minzhong.cn`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,qae=e=>e===`video`?(0,$.jsx)(v5,{}):e===`audio`?(0,$.jsx)(J2,{}):(0,$.jsx)(e8,{}),Jae=e=>e===`video`?`视频`:e===`audio`?`音频`:`图片`,Yae=({open:e,onClose:t,onSelect:n,allowedTypes:r,selectedIds:i=[],title:a=`选择历史上传素材`,maxImageCount:o,maxVideoCount:s,usedImageCount:c,usedVideoCount:l,maxVideoDuration:u,usedVideoDuration:d,maxAudioCount:f,usedAudioCount:p,maxAudioDuration:m,usedAudioDuration:h})=>{let[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(1),[C,w]=(0,S.useState)(10),[T,E]=(0,S.useState)(1),[D,O]=(0,S.useState)(10),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)(!1),[N,P]=(0,S.useState)([]),[F,I]=(0,S.useState)(0),[L,R]=(0,S.useState)(``),[z,B]=(0,S.useState)([]),[V,H]=(0,S.useState)(0),[U,W]=(0,S.useState)(new Map),ee=(0,S.useMemo)(()=>new Set(i),[i]),G=(0,S.useMemo)(()=>new Set(r||[`image`,`video`,`audio`]),[JSON.stringify(r)]),te=(0,S.useMemo)(()=>Array.from(U.values()).filter(e=>e.resourceType===`image`).length,[U]),ne=(0,S.useMemo)(()=>Array.from(U.values()).filter(e=>e.resourceType===`video`).length,[U]),K=(0,S.useMemo)(()=>Array.from(U.values()).filter(e=>e.resourceType===`video`).reduce((e,t)=>e+(t.durationSeconds||0),0),[U]),re=(0,S.useMemo)(()=>Array.from(U.values()).filter(e=>e.resourceType===`audio`).length,[U]),ie=(0,S.useMemo)(()=>Array.from(U.values()).filter(e=>e.resourceType===`audio`).reduce((e,t)=>e+(t.durationSeconds||0),0),[U]),ae=(0,S.useMemo)(()=>o!==void 0&&c!==void 0?o-c:1/0,[o,c]),q=(0,S.useMemo)(()=>s!==void 0&&l!==void 0?s-l:1/0,[s,l]),oe=(0,S.useMemo)(()=>u!==void 0&&d!==void 0?u-d:1/0,[u,d]),se=(0,S.useMemo)(()=>f!==void 0&&p!==void 0?f-p:1/0,[f,p]),ce=(0,S.useMemo)(()=>m!==void 0&&h!==void 0?m-h:1/0,[m,h]),le=(0,S.useMemo)(()=>te>ae,[te,ae]),ue=(0,S.useMemo)(()=>ne>q,[ne,q]),de=(0,S.useMemo)(()=>K>oe,[K,oe]),fe=(0,S.useMemo)(()=>re>se,[re,se]),pe=(0,S.useMemo)(()=>ie>ce,[ie,ce]),me=(0,S.useCallback)(async()=>{if(e){M(!0);try{let e=await D7({resourceType:g||void 0,keyword:v||void 0,page:b,pageSize:C,scene:`picker`});P(b===1?e.groups||[]:t=>[...t,...e.groups||[]]),I(e.totalDays||0)}catch(e){Z.error(e?.message||`加载历史上传素材失败`),b===1&&P([]),I(0)}finally{M(!1)}}},[G,v,e,b,C,g]),he=(0,S.useCallback)(async e=>{A(!0);try{let t=await O7(e,{resourceType:g||void 0,keyword:v||void 0,page:T,pageSize:8,scene:`picker`});B((t.items||[]).filter(e=>G.has(e.resourceType))),H(t.total||0)}catch(e){Z.error(e?.message||`加载历史上传素材失败`),B([]),H(0)}finally{A(!1)}},[G,v,T,D,g]);(0,S.useEffect)(()=>{e&&me()},[e,b,me]),(0,S.useEffect)(()=>{L&&E(1)},[L]),(0,S.useEffect)(()=>{L&&he(L)},[L,T,he]),(0,S.useEffect)(()=>{e&&W(new Map)},[e]);let ge=e=>{if(ee.has(e.id)){Z.warning(`该素材已经在参考内容中`);return}W(t=>{let n=new Map(t);return n.has(e.id)?n.delete(e.id):n.set(e.id,e),n})},_e=()=>{let e=Array.from(U.values());if(e.length===0){Z.warning(`请先选择历史素材`);return}n(e),W(new Map),t()},ve=(0,S.useMemo)(()=>[{label:`全部`,value:``},{label:`图片`,value:`image`},{label:`视频`,value:`video`},{label:`音频`,value:`audio`}].filter(e=>!e.value||G.has(e.value)),[G]);return(0,$.jsxs)(NK,{title:a,open:e,onCancel:t,width:1e3,centered:!0,destroyOnHidden:!0,footer:[(0,$.jsx)(X,{onClick:t,children:`取消`},`cancel`),(0,$.jsxs)(X,{type:`primary`,onClick:_e,style:{background:`#8b5cf6`},disabled:le||ue||de||fe||pe,children:[`应用选择 (`,U.size,`)`]},`ok`)],children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(EH,{wrap:!0,children:[(0,$.jsx)(NC,{value:g,options:ve,style:{width:120},onChange:e=>{_(e),x(1)}}),(0,$.jsx)(tG,{allowClear:!0,value:v,prefix:(0,$.jsx)(OC,{}),placeholder:`搜索文件名`,style:{width:220},onChange:e=>y(e.target.value),onPressEnter:()=>{x(1),me()}}),(0,$.jsx)(X,{icon:(0,$.jsx)(Uq,{}),onClick:me,children:`刷新`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginTop:12,flexWrap:`wrap`},children:[(0,$.jsxs)(`span`,{style:{fontSize:13,color:le?`#ef4444`:`#64748b`,fontWeight:le?600:400},children:[`还可选取图片 `,te,`/`,o!==void 0&&c!==void 0?o-c:`-`,` 张`]}),(0,$.jsxs)(`span`,{style:{fontSize:13,color:ue||de?`#ef4444`:`#64748b`,fontWeight:ue||de?600:400},children:[`视频还可选取 `,ne,`/`,s!==void 0&&l!==void 0?s-l:`-`,` 个(`,K.toFixed(1),`/`,u!==void 0&&d!==void 0?(u-d).toFixed(1):`-`,`秒)`]}),f!==void 0&&(0,$.jsxs)(`span`,{style:{fontSize:13,color:fe||pe?`#ef4444`:`#64748b`,fontWeight:fe||pe?600:400},children:[`音频还可选取 `,re,`/`,f!==void 0&&p!==void 0?f-p:`-`,` 个(`,ie.toFixed(1),`/`,m!==void 0&&h!==void 0?(m-h).toFixed(1):`-`,`秒)`]})]})]}),(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`240px 1fr`,gap:16,height:500},children:[(0,$.jsxs)(`div`,{style:{border:`1px solid #eef0f4`,borderRadius:12,padding:12,background:`#fafafa`,overflowY:`auto`},children:[(0,$.jsx)(W7,{strong:!0,style:{fontSize:14},children:`日期列表`}),(0,$.jsx)(cK,{spinning:j,children:N.length===0?(0,$.jsx)(rC,{image:rC.PRESENTED_IMAGE_SIMPLE,description:`暂无日期`,style:{padding:`40px 0`}}):(0,$.jsxs)(`div`,{style:{marginTop:12},children:[N.map(e=>(0,$.jsxs)(`div`,{onClick:()=>R(e.generatedDate),style:{padding:`10px 12px`,borderRadius:10,marginBottom:6,cursor:`pointer`,border:L===e.generatedDate?`1px solid #8b5cf6`:`1px solid transparent`,background:L===e.generatedDate?`#f5f3ff`:`#fff`},children:[(0,$.jsx)(`div`,{style:{fontSize:13,fontWeight:500,color:`#334155`},children:e.generatedDate}),(0,$.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginTop:4},children:[`共 `,e.total,` 个素材`]})]},e.generatedDate)),F>N.length&&(0,$.jsx)(`div`,{style:{marginTop:12,textAlign:`center`},children:(0,$.jsx)(X,{size:`small`,onClick:()=>x(b+1),children:`加载更多`})})]})})]}),(0,$.jsx)(`div`,{style:{border:`1px solid #eef0f4`,borderRadius:12,padding:12,overflowY:`auto`},children:(0,$.jsx)(cK,{spinning:k,children:L?z.length===0?(0,$.jsx)(rC,{description:`该日期暂无可复用的历史上传素材`,style:{padding:`48px 0`}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(150px, 1fr))`,gap:14},children:z.map(e=>{let t=U.has(e.id),n=ee.has(e.id),r=Kae(e.previewUrl||e.displayUrl||e.resourceUrl);return(0,$.jsxs)(`div`,{onClick:()=>!n&&ge(e),style:{position:`relative`,borderRadius:14,border:t?`2px solid #8b5cf6`:`1px solid #e2e8f0`,background:n?`#f8fafc`:`#fff`,opacity:n?.55:1,cursor:n?`not-allowed`:`pointer`,overflow:`hidden`,boxShadow:t?`0 10px 24px rgba(139, 92, 246, 0.18)`:`0 6px 18px rgba(15,23,42,0.06)`},children:[(0,$.jsx)(`div`,{style:{height:112,background:`#f1f5f9`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e.resourceType===`image`?(0,$.jsx)(`img`,{src:r,alt:e.fileName||e.id,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):e.resourceType===`video`?(0,$.jsx)(`video`,{src:r,muted:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:58,height:58,borderRadius:18,background:`linear-gradient(135deg, #8b5cf6, #a78bfa)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:24},children:(0,$.jsx)(J2,{})})}),(0,$.jsxs)(`div`,{style:{padding:10},children:[(0,$.jsxs)(EH,{size:6,style:{marginBottom:6},children:[(0,$.jsx)(h$,{color:`purple`,icon:qae(e.resourceType),style:{margin:0},children:Jae(e.resourceType)}),e.durationSeconds?(0,$.jsxs)(h$,{style:{margin:0},children:[Number(e.durationSeconds).toFixed(1),`s`]}):null]}),(0,$.jsx)(W7,{ellipsis:!0,style:{display:`block`,fontSize:13,color:`#334155`},title:e.fileName||e.id,children:e.fileName||e.id}),(0,$.jsx)(W7,{type:`secondary`,style:{fontSize:12},children:e.moduleLabel||`普通上传`})]}),t&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,width:24,height:24,borderRadius:12,background:`#8b5cf6`,color:`#fff`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(SC,{})}),n&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8},children:(0,$.jsx)(h$,{children:`已选`})})]},e.id)})}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:16,paddingBottom:8},children:(0,$.jsx)(VG,{current:T,pageSize:D,total:V,showSizeChanger:!0,pageSizeOptions:[10,20,50,100],onChange:(e,t)=>{E(e),O(t)}})})]}):(0,$.jsx)(rC,{image:rC.PRESENTED_IMAGE_SIMPLE,description:`请选择日期`,style:{padding:`80px 0`}})})})]})]})},G7=({children:e,accept:t=`image/*,video/*`,multiple:n=!0,onLocalSelect:r,onHistorySelect:i,onPortraitSelect:a,onPortraitLibrarySelect:o,uploading:s,tooltipTitle:c,maxImageCount:l,maxVideoCount:u,usedImageCount:d,usedVideoCount:f,usedVideoDuration:p,maxVideoDuration:m,maxAudioCount:h,usedAudioCount:g,maxAudioDuration:_,usedAudioDuration:v})=>{let y=(0,S.useRef)(null),[b,x]=(0,S.useState)(!1),[C,w]=(0,S.useState)(`real_person`),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),j=()=>{O(!1),y.current?.click()},M=e=>{let t=e.target.files;t&&r&&r(Array.from(t)),y.current&&(y.current.value=``)},N=e=>{if(O(!1),a){w(e),x(!0);return}if(o){o(e);return}w(e),x(!0)},P=(0,$.jsxs)(`div`,{style:{padding:`4px 0`,minWidth:180},children:[(0,$.jsxs)(`div`,{onClick:()=>{j()},style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 16px`,cursor:`pointer`,transition:`background 0.15s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#f1f5f9`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,$.jsx)(dZ,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#334155`},children:`本地上传`})]}),(0,$.jsxs)(`div`,{onClick:()=>{O(!1),E(!0)},style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 16px`,cursor:`pointer`,transition:`background 0.15s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#f1f5f9`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,$.jsx)(f3,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#334155`},children:`从资产中选择`})]}),(0,$.jsxs)(`div`,{onClick:()=>N(`real_person`),style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 16px`,cursor:`pointer`,transition:`background 0.15s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#f1f5f9`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,$.jsx)(g5,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#334155`},children:`真人素材库`})]}),(0,$.jsxs)(`div`,{onClick:()=>N(`aigc_virtual`),style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 16px`,cursor:`pointer`,transition:`background 0.15s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#f1f5f9`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,$.jsx)(a5,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#334155`},children:`虚拟素材库`})]})]});return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`input`,{ref:y,type:`file`,accept:t,multiple:n,onChange:M,style:{display:`none`}}),c?(0,$.jsx)(Cw,{title:c,children:(0,$.jsx)(jw,{content:P,open:D,onOpenChange:O,trigger:`click`,placement:`bottomLeft`,children:(0,$.jsx)(`div`,{style:{cursor:s?`not-allowed`:`pointer`},children:e})})}):(0,$.jsx)(jw,{content:P,open:D,onOpenChange:O,trigger:`click`,placement:`bottomLeft`,children:(0,$.jsx)(`div`,{style:{cursor:s?`not-allowed`:`pointer`},children:e})}),(0,$.jsx)(Yae,{open:T,onClose:()=>E(!1),onSelect:e=>{i?.(e),E(!1)},allowedTypes:t.includes(`audio`)?[`image`,`video`,`audio`]:t.includes(`video`)?[`image`,`video`]:[`image`],maxImageCount:l,maxVideoCount:u,usedImageCount:d,usedVideoCount:f,maxVideoDuration:m,usedVideoDuration:p,maxAudioCount:h,usedAudioCount:g,maxAudioDuration:_,usedAudioDuration:v}),(0,$.jsx)(U7,{open:b,libraryType:C,onClose:()=>x(!1),onSelect:e=>{a?.(e),x(!1)},accept:t,maxCount:t===`image/*`&&!n?1:void 0,maxImageCount:l,maxVideoCount:u,usedImageCount:d,usedVideoCount:f,usedVideoDuration:p,maxVideoDuration:m})]})};function Xae(){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 K7=({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)(l8,{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)})]})},Zae=()=>{let{projectId:e}=$e(),t=Ye(),[n]=bU.useForm(),{projects:r,records:i,fetchProjects:a,fetchRecords:o,optimizePrompt:s,generateVideo:c}=L7(),l=i.items,{user:u}=j7(),[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,W]=(0,S.useState)({}),[ee,G]=(0,S.useState)({}),[te,ne]=(0,S.useState)({}),[K,re]=(0,S.useState)(null),[ie,ae]=(0,S.useState)({}),[q,oe]=(0,S.useState)(null),[se,ce]=(0,S.useState)(5),[le,ue]=(0,S.useState)(`16:9`),[de,fe]=(0,S.useState)(`720p`),[pe,me]=(0,S.useState)(null),[he,ge]=(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]}),[_e,ve]=(0,S.useState)(0),[ye,be]=(0,S.useState)(0),[xe,Se]=(0,S.useState)(`video`),[Ce,we]=(0,S.useState)(`1:1`),[Te,Ee]=(0,S.useState)(`2K`),[De,Oe]=(0,S.useState)(2048),[ke,Ae]=(0,S.useState)(2048),[je,Me]=(0,S.useState)(!1),[Ne,Pe]=(0,S.useState)([]),[Fe,Ie]=(0,S.useState)([]),Le=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=M.filter(e=>e.type===`image`).length,a=M.filter(e=>e.type===`video`).length,o=M.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0);if(t&&i>=5)return Z.error(`最多上传5张图片`),!1;if(n&&a>=2)return Z.error(`最多上传2个视频`),!1;let s=0;if(n&&(s=await new Promise(t=>{let n=document.createElement(`video`);n.preload=`metadata`,n.onloadedmetadata=()=>{t(n.duration||0),n.remove()},n.onerror=()=>{t(0),n.remove()},n.src=URL.createObjectURL(e)}),o+s>15))return Z.error(`视频总时长不能超过15秒`),!1;F(!0);try{let r;r=t?await U5(e):await W5(e,s);let o=t?`图片`:`视频`,c=t?i+1:a+1;N(e=>[...e,{url:r.url,type:t?`image`:`video`,name:`${o}${c}`,duration:n?s:void 0}]),Z.success(`${o}上传成功`)}catch{Z.error(`上传失败`)}finally{F(!1)}return!1};(0,S.useEffect)(()=>{if(xie().then(e=>{Pe(e.video),Ie(e.image)}),!je)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)},[je]);let Re=(e,t)=>{for(let n=0;n{let t=e===`2k`?`2048`:e===`4k`?`4096`:e;for(let e=0;e{Xe(e)},Ve=e=>{Qe(parseInt(e))},[He,Ue]=(0,S.useState)([]),[We,Ge]=(0,S.useState)([]),[Ke,qe]=(0,S.useState)([]),[Je,Xe]=(0,S.useState)(0),[Ze,Qe]=(0,S.useState)(0);(0,S.useEffect)(()=>{Ke[Ze]&&Ke[Ze][Je]!==void 0&&(Oe(Ke[Ze][Je].substring(0,4)),Ae(Ke[Ze][Je].substring(5)))},[Je]),(0,S.useEffect)(()=>{Ke[Ze]&&Ke[Ze][Je]!==void 0&&(Oe(Ke[Ze][Je].substring(0,4)),Ae(Ke[Ze][Je].substring(5)))},[Ze]);let et=()=>{Oe(ke),Ae(De)},tt=e=>{Se(e.target.value===`image`?`image`:`video`)};(0,S.useEffect)(()=>{$5().then(e=>{W(Object.fromEntries(e.map(e=>[e.key,e.label]))),G(Object.fromEntries(e.map(e=>[e.key,e.optionGroups||[]])))}).catch(()=>{}),hie().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)=>{Ue(n=>[...n,{value:e,label:String(t)}])});for(let e in t[`4K`])i.push(t[`4K`][e]);qe([r,i]);let a=[];for(let e in t)a.push(e);a.forEach((e,t)=>{Ge(n=>[...n,{value:e,label:String(t)}])})}).catch(()=>{}),mie().then(e=>{if(e.items?.length){let t=e.items[0];ge({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 nt=(0,S.useRef)(!1);(0,S.useEffect)(()=>{nt.current||l.length===0||(nt.current=!0,l.forEach(t=>{t.projectId===e&&t.status===`generating`&&(T(e=>({...e,[t.id]:`generating`})),kt(t.id)),t.projectId===e&&t.status===`optimizing`&&ut(t.id)}))},[l,e]);let rt=(0,S.useRef)(new Set),it=(0,S.useRef)(null),at=(0,S.useRef)(null),ot=e=>{rt.current.add(e),lt()},st=e=>{rt.current.delete(e),rt.current.size===0&&ct()},ct=()=>{it.current&&=(clearInterval(it.current),null),at.current&&=(at.current.abort(),null)},lt=()=>{it.current||=setInterval(async()=>{try{at.current&&at.current.abort();let t=new AbortController;at.current=t;let n=await V5({projectId:e,page:1,pageSize:100,signal:t.signal});at.current=null;let r=Array.from(rt.current),i=[];if(r.length>0){let e=L7.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});L7.setState({records:{...e,items:t}}),i.forEach(e=>{st(e)})}}catch(e){e.name}},3e3)},ut=e=>{ot(e)},dt=(0,S.useRef)(!1),ft=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(dt.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(ft.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?(dt.current=!0,localStorage.removeItem(`pending_optimize`),g(s),v(s.optimizedPrompt||``),ve(s.textCreditsCost),be(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 pt=r.find(t=>t.id===e),mt=l.filter(t=>t.projectId===e),ht=pt?.name??`项目`,gt=pt&&ee[pt.industry]||[],_t=u?.credits??0,vt=e=>{let t=e===`2k`?`2048`:e===`4k`?`4096`:e;for(let e=0;e=yt,xt=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(te).map(([e,t])=>`@${e}:${t}`),i=r.length>0?`${t.prompt}\n\n${r.join(`;`)}`:t.prompt,a=Xae();localStorage.setItem(`pending_optimize`,JSON.stringify({key:a,projectId:e,prompt:i,duration:se,ts:Date.now()})),ft.current=a;let o=await s(e,{prompt:i,duration:se,genType:xe,resolution:Te,references:M.length>0?M:void 0,idempotencyKey:a,image_size:Te,image_proportion:Ce,image_px:De+`x`+ke});localStorage.removeItem(`pending_optimize`),ft.current=null,g(o.record),v(o.record.optimizedPrompt||``),ve(o.textCreditsCost),be(o.textTokensUsed),m(!0),Z.success({content:`「${ht}」提示词优化完成,消耗 ${o.textCreditsCost} 积分`,key:`optimize`})}catch(e){let t=e?.response?.data?.message||e?.message||`操作失败,请稍后重试`;Z.error(t)}finally{f(!1),localStorage.removeItem(`pending_optimize`),ft.current=null}},St=(0,S.useRef)(new Set),Ct=(0,S.useRef)(null),wt=(0,S.useRef)(null),Tt=e=>{St.current.add(e),Ot()},Et=e=>{St.current.delete(e),St.current.size===0&&Dt()},Dt=()=>{Ct.current&&=(clearInterval(Ct.current),null),wt.current&&=(wt.current.abort(),null)},Ot=()=>{Ct.current||=setInterval(async()=>{try{wt.current&&wt.current.abort();let t=new AbortController;wt.current=t;let n=await V5({projectId:e,page:1,pageSize:100,signal:t.signal});wt.current=null;let r=Array.from(St.current),i=[];if(r.length>0){let e=L7.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});L7.setState({records:{...e,items:t}}),i.forEach(e=>{let t=n.items.find(t=>t.id===e);Et(e),t?.status===`completed`?(T(t=>({...t,[e]:`done`})),g(n=>n?.id===e?t:n),Z.success({content:`「${ht}」视频生成完成!`,key:e,duration:5})):t?.status===`failed`&&(T(t=>({...t,[e]:`failed`})),g(n=>n?.id===e?t:n),Z.error({content:`「${ht}」视频生成失败: ${t.errorMessage||`未知错误`}`,key:e,duration:5}))})}}catch(e){e.name}},5e3)},kt=e=>{Tt(e)};(0,S.useEffect)(()=>()=>{Dt(),ct()},[]);let At=async e=>{if(!bt){Z.error(`积分不足,请先充值`);return}C(t=>({...t,[e]:!0})),T(t=>({...t,[e]:`generating`})),Z.loading({content:`「${ht}」正在提交视频生成...`,duration:0,key:e});try{(await c(e,{aspectRatio:le,resolution:de})).status===`failed`?(T(t=>({...t,[e]:`failed`})),Z.error({content:`「${ht}」提交失败`,key:e,duration:3})):(Z.success({content:`「${ht}」已提交,正在生成中...`,key:e,duration:3}),kt(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}))}},jt=async e=>{let t=mt.find(t=>t.id===e);if(t){C(t=>({...t,[e]:!0})),T(t=>({...t,[e]:`generating`})),Z.loading({content:`「${ht}」正在重新提交...`,duration:0,key:e});try{let n=E[e];n&&n!==t.optimizedPrompt&&await fie(e,n),(await c(e,{aspectRatio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`})).status===`failed`?(T(t=>({...t,[e]:`failed`})),Z.error({content:`「${ht}」提交失败`,key:e,duration:3})):(Z.success({content:`「${ht}」已提交,正在生成中...`,key:e,duration:3}),kt(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}))}}},Mt=e=>{let t=w[e.id];return t===`generating`?`generating`:t===`done`?`completed`:t===`failed`?`failed`:e.status},Nt={optimizing:{color:`processing`,text:`优化中`,icon:(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,$.jsx)(DV,{})},generating:{color:`warning`,text:`生成中`,icon:(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}})},completed:{color:`success`,text:`已完成`,icon:(0,$.jsx)(A4,{})},failed:{color:`error`,text:`失败`,icon:(0,$.jsx)(N4,{})}},Pt=({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)(mQ,{style:{fontSize:9,color:`#94a3b8`,transition:`transform 0.2s`,transform:i?`rotate(180deg)`:`rotate(0deg)`}})]}),d&&(0,Vi.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)]})},Ft=({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)(mQ,{style:{fontSize:9,color:t?`#6366f1`:`#94a3b8`,transition:`transform 0.2s`,transform:n?`rotate(180deg)`:`rotate(0deg)`}})]}),l&&(0,Vi.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`,{style:{margin:`-24px -32px -32px`,borderRadius:20,height:`calc(100vh - 34px)`,padding:`24px`,background:`#fff`,overflowY:`auto`},children:[(0,$.jsxs)(`div`,{className:`gen-header animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`16px 24px`,borderRadius:16,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(z2,{}),onClick:()=>t(`/projects`),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:ht}),pt&&(0,$.jsx)(h$,{style:{background:`rgba(99, 102, 241, 0.08)`,border:`1px solid rgba(99, 102, 241, 0.15)`,color:`#6366f1`,borderRadius:6},children:U[pt.industry]||pt.industry})]}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13},children:`描述视频 → AI优化 → 生成视频`})]}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsxs)(h$,{style:{background:`rgba(99, 102, 241, 0.08)`,border:`1px solid rgba(99, 102, 241, 0.15)`,color:`#6366f1`,borderRadius:20,fontSize:13,padding:`4px 14px`},children:[`剩余 `,_t,` 积分`]})]}),!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)(HI.Group,{defaultValue:`video`,buttonStyle:`solid`,onChange:tt,children:[(0,$.jsxs)(HI.Button,{value:`video`,children:[(0,$.jsx)(v5,{style:{marginRight:6,fontSize:14}}),` `,`视频`]}),(0,$.jsxs)(HI.Button,{value:`image`,style:{zIndex:0},children:[(0,$.jsx)(e8,{style:{marginRight:6,fontSize:14}}),` `,`图片`]})]})]}),xe===`video`&&[{icon:(0,$.jsx)(Z$,{}),label:`描述视频+时长`,color:`#6366f1`},{icon:(0,$.jsx)(s5,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(D8,{}),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)),xe===`image`&&[{icon:(0,$.jsx)(Z$,{}),label:`描述图片+尺寸`,color:`#6366f1`},{icon:(0,$.jsx)(s5,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(D8,{}),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)(bU,{form:n,initialValues:{},children:[(0,$.jsx)(bU.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`&&oe(`http://ceshi.apiforeign.minzhong.cn${e.url}`)},children:e.type===`image`?(0,$.jsx)(bW,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(K7,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`})}),(0,$.jsx)(`div`,{className:`ref-delete`,onClick:n=>{n.stopPropagation(),K5(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)(N4,{style:{color:`#fff`,fontSize:10}})})]},t)),(0,$.jsx)(G7,{accept:`image/*,video/*`,onLocalSelect:e=>{e.forEach(async e=>{await Le(e)})},onHistorySelect:e=>{e.forEach(e=>{N(t=>[...t,{url:e.resourceUrl||e.previewUrl||e.displayUrl||``,type:e.resourceType,name:e.fileName||``}])}),Z.success(`成功添加${e.length}个历史记录`)},onPortraitSelect:e=>{e.forEach(e=>{N(t=>[...t,{url:e.previewUrl||``,type:e.assetType===`Video`?`video`:`image`,name:e.name||`真人素材`,source:`private_portrait_asset`,private_asset_id:e.id,label:``,duration:e.assetType===`Video`?e.videoDuration||0:void 0}])}),Z.success(`已添加 ${e.length} 个真人素材参考`)},uploading:P,tooltipTitle:`图片${M.filter(e=>e.type===`image`).length}/5,视频${M.filter(e=>e.type===`video`).length}/2`,maxImageCount:5,maxVideoCount:2,usedImageCount:M.filter(e=>e.type===`image`).length,usedVideoCount:M.filter(e=>e.type===`video`).length,usedVideoDuration:M.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0),maxVideoDuration:15,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)(mL,{style:{fontSize:18,color:`#94a3b8`}})})})]}),(0,$.jsx)(`div`,{style:{padding:`8px 16px 4px`},children:(0,$.jsx)(tG.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)},onPaste:e=>{let t=e.clipboardData?.items;if(!t)return;let n=[];for(let e=0;e0&&(e.preventDefault(),n.forEach(async e=>{await Le(e)}))},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)(l8,{style:{color:`#fff`,fontSize:14}})}),(0,$.jsx)(Q.Text,{style:{fontSize:13},children:e.name}),(0,$.jsx)(h$,{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:[xe!==`image`&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,flex:1,flexWrap:`wrap`},children:[(0,$.jsx)(Pt,{label:`时长`,value:`${se}`,options:he.durations.map(e=>`${e}`),suffix:`秒`,expanded:pe===`duration`,onToggle:()=>me(pe===`duration`?null:`duration`),onSelect:e=>ce(parseInt(e)),onClose:()=>me(null)}),gt.map((e,t)=>{let n=K===e.name,r=te[e.name];return(0,$.jsx)(Ft,{group:e,selected:r,expanded:n,onToggle:()=>re(n?null:e.name),onSelect:t=>{ne(n=>{let r={...n};return r[e.name]===t?delete r[e.name]:r[e.name]=t,r})},onClose:()=>re(null)},`og-${t}`)})]}),xe==`image`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>Me(!je),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:Ce===`auto`?`智能`:Ce}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#9ca3af`},children:[Te==`2K`?`高清 2K`:`超清 4K`,`| `,De,`×`,ke]})]})}),(0,$.jsx)(mQ,{style:{fontSize:14,color:`#9ca3af`}})]}),je&&(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:He.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{we(e.value),Be(e.label)},style:{flex:`0 0 calc(11.11% - 5px)`,minWidth:48,height:56,borderRadius:8,border:Ce===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:Ce===e.value?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:(()=>{let[t,n]=e.value===`auto`?[1,1]:e.value.split(`:`).map(Number);return t>=n?20:Math.round(t/n*20)})(),height:(()=>{let[t,n]=e.value===`auto`?[1,1]:e.value.split(`:`).map(Number);return n>=t?20:Math.round(n/t*20)})(),border:`2px solid ${Ce===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:Ce===e.value?`#6366f1`:`#9ca3af`},children:`智`})}),(0,$.jsx)(`span`,{style:{fontSize:10,color:Ce===e.value?`#6366f1`:`#6b7280`,fontWeight:Ce===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:We.map(e=>(0,$.jsx)(`button`,{onClick:()=>{Ee(e.value),Ve(e.label)},style:{flex:1,height:48,borderRadius:8,border:Te===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:Te===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:Te===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)(tG,{value:De,onChange:e=>Oe(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:et,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)(aW,{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)(tG,{value:ke,onChange:e=>Ae(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:[xe===`image`&&(0,$.jsx)(`span`,{style:{color:`#7c7c7c`,fontSize:14},children:`(请在左侧选择图片比例和尺寸)`}),(0,$.jsx)(X,{type:`primary`,size:`large`,onClick:xt,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)(RL,{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)(A4,{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:[`文本优化消耗 `,_e,` 积分· 您可以编辑提示词后选择参数生成视频`]})]})]}):(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)(A4,{style:{color:`#10b981`,fontSize:18}}),w[h.id]===`failed`&&(0,$.jsx)(N4,{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`&&`${xe===`image`?`图片`:`视频`}生成中,请稍候...`,w[h.id]===`done`&&`${xe===`image`?`图片`:`视频`}生成成功`,w[h.id]===`failed`&&`${xe===`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)(EH,{size:4,children:[(0,$.jsx)(Cw,{title:`复制`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(b1,{}),onClick:()=>{navigator.clipboard.writeText(_),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(0,$.jsx)(Cw,{title:`编辑`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(Z$,{}),onClick:()=>b(!0),style:{color:`#6366f1`}})})]})]}),y?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(tG.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)(X,{size:`small`,onClick:()=>{v(h.optimizedPrompt||``),b(!1)},children:`取消`}),(0,$.jsx)(X,{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)(EH,{size:4,children:[(0,$.jsx)(Cw,{title:`复制`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(b1,{}),onClick:()=>{navigator.clipboard.writeText(_),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(0,$.jsx)(Cw,{title:`编辑`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(Z$,{}),onClick:()=>b(!0),style:{color:`#6366f1`}})})]})]}),y?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(tG.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)(X,{size:`small`,onClick:()=>{v(h.optimizedPrompt||``),b(!1)},children:`取消`}),(0,$.jsx)(X,{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)(bW,{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:[xe!==`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:[se,`s`]})]}),(0,$.jsx)(Pt,{label:`比例`,value:le,options:he.ratios,expanded:pe===`ratio`,onToggle:()=>me(pe===`ratio`?null:`ratio`),onSelect:e=>ue(e),onClose:()=>me(null)}),(0,$.jsx)(Pt,{label:`分辨率`,value:de,options:he.resolutions,expanded:pe===`resolution`,onToggle:()=>me(pe===`resolution`?null:`resolution`),onSelect:e=>fe(e),onClose:()=>me(null)})]})]}),xe==`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:_e})]}),(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:[`预估`,xe===`image`?`图片`:`视频`,`积分`]}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#10b981`},children:xe===`image`&&h.imageSize?vt(h.imageSize)||yt:Re(se,de)})]}),(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:(_e+(xe===`image`?vt(h.imageSize):Re(se,de))).toFixed(2)})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsxs)(X,{size:`large`,onClick:()=>{m(!1),g(null),v(``),L(``),N([]),ne({}),re(null),me(null),n.resetFields()},style:{borderRadius:12,minWidth:120,height:44,fontWeight:500},children:[`配置新`,xe===`image`?`图片`:`视频`]}),(0,$.jsx)(Cw,{title:bt?``:`积分不足`,children:(0,$.jsx)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(D8,{}),onClick:()=>At(h.id),loading:w[h.id]===`generating`,disabled:!bt||w[h.id]===`generating`||w[h.id]===`done`,style:{borderRadius:12,minWidth:180,height:44,fontWeight:600,background:w[h.id]===`done`?`#10b981`:bt?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`:`#d1d5db`,border:`none`,boxShadow:bt?`0 8px 24px rgba(99,102,241,0.3)`:`none`},children:w[h.id]===`done`?`生成完成`:w[h.id]===`generating`?`生成中...`:`生成${xe===`image`?`图片`:`视频`} (${xe===`image`?vt(h.imageSize):Re(se,de)}积分)`})})]})]}),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`&&oe(`http://ceshi.apiforeign.minzhong.cn${e.url}`)},children:[e.type===`image`?(0,$.jsx)(bW,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},preview:!0}):(0,$.jsx)(K7,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,width:64,height:64}),(0,$.jsx)(h$,{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))})]})]}),mt.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,background:`#fff`,borderRadius:12,padding:8,border:`1px solid #f0f0f5`},className:`stagger-children`,children:mt.map((e,t)=>{let n=Mt(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?`8px 8px 0 0`:8,background:`#fafafa`,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)(e8,{style:{color:`#d97706`,fontSize:12}}):(0,$.jsx)(v5,{style:{color:`#2563eb`,fontSize:12}})}),i?(0,$.jsx)(mQ,{style:{color:`#6366f1`,fontSize:11,flexShrink:0}}):(0,$.jsx)(D4,{style:{color:`#cbd5e1`,fontSize:11,flexShrink:0}}),(0,$.jsx)(h$,{color:Nt[n]?.color,icon:Nt[n]?.icon,style:{margin:0},children:Nt[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)(h$,{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:R7(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:R7(e.createdAt)})]}),(0,$.jsx)(`div`,{className:`record-actions`,onClick:e=>e.stopPropagation(),children:(0,$.jsx)(EH,{children:n===`failed`&&(0,$.jsx)(X,{type:`primary`,danger:!0,size:`small`,icon:(0,$.jsx)(l8,{}),loading:x[e.id],onClick:()=>jt(e.id),style:{borderRadius:8},children:`重试`})})})]}),i&&(0,$.jsx)(`div`,{style:{background:`#fff`,borderRadius:`0 0 8px 8px`,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)(EH,{size:4,children:[(0,$.jsx)(Cw,{title:`复制`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(b1,{}),onClick:()=>{navigator.clipboard.writeText(r),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(n===`prompt_optimized`||n===`failed`)&&(0,$.jsx)(Cw,{title:`编辑`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(Z$,{}),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)(tG.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)(X,{size:`small`,onClick:()=>k(null),children:`取消`}),(0,$.jsx)(X,{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`&&oe(`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)(bW,{src:`http://ceshi.apiforeign.minzhong.cn${t.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},preview:!0}):(0,$.jsx)(K7,{src:`http://ceshi.apiforeign.minzhong.cn${t.url}`,width:64,height:64})}),(0,$.jsx)(h$,{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(),K5(t.url).catch(()=>{});let i=e.references.filter((e,t)=>t!==r);L7.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)(N4,{style:{color:`#fff`,fontSize:10}})})]},r)),n===`failed`&&(0,$.jsx)(R0,{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?U5(t).then(n=>{let r={url:n.url,type:`image`,name:t.name||`图片`},i=e.references||[];L7.getState().updateRecordReferences(e.id,[...i,r]),Z.success(`上传成功`)}).catch(()=>Z.error(`上传失败`)):new Promise(e=>{let n=document.createElement(`video`);n.preload=`metadata`,n.onloadedmetadata=()=>{e(n.duration||0),n.remove()},n.onerror=()=>{e(0),n.remove()},n.src=URL.createObjectURL(t)}).then(n=>{W5(t,n).then(r=>{let i={url:r.url,type:`video`,name:t.name||`视频`,duration:n||void 0},a=e.references||[];L7.getState().updateRecordReferences(e.id,[...a,i]),Z.success(`上传成功`)}).catch(()=>Z.error(`上传失败`))}),!1)},children:(0,$.jsx)(Cw,{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)(mL,{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)(Pt,{label:`比例`,value:ie[e.id]?.aspectRatio||`选择比例`,options:he.ratios,expanded:pe===`ratio-${e.id}`,onToggle:()=>me(pe===`ratio-${e.id}`?null:`ratio-${e.id}`),onSelect:t=>ae(n=>({...n,[e.id]:{...n[e.id],aspectRatio:t,resolution:n[e.id]?.resolution||``}})),onClose:()=>me(null)}),(0,$.jsx)(Pt,{label:`分辨率`,value:ie[e.id]?.resolution||`选择分辨率`,options:he.resolutions,expanded:pe===`res-${e.id}`,onToggle:()=>me(pe===`res-${e.id}`?null:`res-${e.id}`),onSelect:t=>ae(n=>({...n,[e.id]:{...n[e.id],aspectRatio:n[e.id]?.aspectRatio||``,resolution:t}})),onClose:()=>me(null)})]}),(0,$.jsxs)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(D8,{}),block:!0,loading:x[e.id],disabled:a===`video`&&(!ie[e.id]?.aspectRatio||!ie[e.id]?.resolution),onClick:async()=>{let t=ie[e.id];if(a===`video`){if(!t?.aspectRatio||!t?.resolution){Z.error(`请选择比例和分辨率`);return}if(_t({...t,[e.id]:!0})),T(t=>({...t,[e.id]:`generating`}));let n=a===`video`?`视频`:`图片`;Z.loading({content:`「${ht}」正在生成${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:`「${ht}」${n}生成成功!`,key:e.id,duration:3})}catch{T(t=>({...t,[e.id]:`failed`})),Z.error({content:`「${ht}」${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`&&ie[e.id]?.resolution?`(${Re(e.duration||5,ie[e.id].resolution)}积分)`:``,a===`image`&&e.imageSize?`(${ze(e.imageSize)}积分)`:a===`image`?`(积分)`:``]})]}),n===`failed`&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:18,right:20},children:(0,$.jsxs)(X,{type:`primary`,danger:!0,size:`large`,icon:(0,$.jsx)(l8,{}),block:!0,loading:x[e.id],onClick:()=>jt(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)(Cw,{title:`下载${a===`video`?`视频`:`图片`}`,children:(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(M0,{}),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)(EH,{children:[a===`video`?(0,$.jsx)(v5,{style:{color:`#6366f1`,fontSize:13}}):(0,$.jsx)(e8,{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:R7(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)(N4,{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)(DV,{style:{color:`#94a3b8`,fontSize:28}}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:a===`image`?`待生成图片`:n===`prompt_optimized`?`待配置视频参数`:`待生成视频`})]})]})]})})]},e.id)})})]}),(0,$.jsx)(NK,{open:!!q,onCancel:()=>oe(null),footer:null,width:480,centered:!0,destroyOnHidden:!0,closable:!1,title:null,styles:{body:{padding:0,background:`#000`,position:`relative`}},children:q&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:q,controls:!0,autoPlay:!0,style:{width:`100%`,display:`block`,maxHeight:`70vh`}}),(0,$.jsx)(`div`,{onClick:()=>oe(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)(T5,{style:{color:`#fff`,fontSize:16}})})]})})]})},q7={optimizing:{color:`processing`,text:`优化中`,icon:(0,$.jsx)(Xm,{spin:!0})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,$.jsx)(DV,{})},generating:{color:`warning`,text:`生成中`,icon:(0,$.jsx)(Xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,$.jsx)(A4,{})},failed:{color:`error`,text:`失败`,icon:(0,$.jsx)(N4,{})}},Qae=()=>{let e=Ye(),{records:t,projects:n,fetchRecords:r,fetchProjects:i,generateVideo:a}=L7(),o=t.items,[s,c]=(0,S.useState)(1),[l,u]=(0,S.useState)(10),[d,f]=(0,S.useState)({}),[p,m]=(0,S.useState)(void 0),[h,g]=(0,S.useState)(void 0),[_,v]=(0,S.useState)({}),[y,b]=(0,S.useState)(null),[x,C]=(0,S.useState)(null),[w,T]=(0,S.useState)(null);(0,S.useEffect)(()=>{i()},[i]),(0,S.useEffect)(()=>{r({projectId:p,status:h,page:s,pageSize:l})},[r,p,h,s,l]);let E=async()=>{if(!w)return;let{recordId:e,projectName:t,ratio:n,resolution:r}=w;f(t=>({...t,[e]:!0})),T(null),Z.loading({content:`「${t}」正在生成视频...`,duration:0,key:e});try{await a(e,{aspectRatio:n,resolution:r}),Z.success({content:`「${t}」视频生成成功!`,key:e,duration:3})}catch{Z.error({content:`「${t}」视频生成失败`,key:e,duration:3})}finally{f(t=>({...t,[e]:!1}))}},D=e=>{if((e.genType||`image`)===`image`){f(t=>({...t,[e.id]:!0})),Z.loading({content:`「${e.projectName}」正在生成图片...`,duration:0,key:e.id}),a(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(()=>{f(t=>({...t,[e.id]:!1}))});return}T({recordId:e.id,projectName:e.projectName,ratio:e.aspectRatio||`16:9`,resolution:e.resolution||`720p`})},O=o;return(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20,padding:`16px 24px`,borderRadius:16,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(z2,{}),onClick:()=>e(`/projects`),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Title,{level:2,style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`项目记录`}),(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`},children:`查看所有视频生成记录,点击记录查看完整内容和视频`})]}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]})}),(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)(EH,{children:[(0,$.jsx)(x3,{style:{color:`#94a3b8`}}),(0,$.jsx)(NC,{placeholder:`全部项目`,allowClear:!0,style:{width:200},onChange:e=>{m(e),c(1)},children:n.map(e=>(0,$.jsx)(NC.Option,{value:e.id,children:e.name},e.id))}),(0,$.jsxs)(NC,{placeholder:`全部状态`,allowClear:!0,style:{width:140},onChange:e=>{g(e),c(1)},children:[(0,$.jsx)(NC.Option,{value:`prompt_optimized`,children:`待生成`}),(0,$.jsx)(NC.Option,{value:`generating`,children:`生成中`}),(0,$.jsx)(NC.Option,{value:`completed`,children:`已完成`}),(0,$.jsx)(NC.Option,{value:`failed`,children:`失败`})]})]}),(0,$.jsxs)(Q.Text,{style:{marginLeft:`auto`,lineHeight:`32px`,color:`#94a3b8`,fontSize:13},children:[`共 `,t.total,` 条记录`]})]}),O.length===0?(0,$.jsx)(rC,{image:rC.PRESENTED_IMAGE_SIMPLE,description:`暂无生成记录`,style:{padding:60}}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},className:`stagger-children`,children:O.map((e,t)=>{let n=y===e.id,r=_[e.id]??e.optimizedPrompt,i=d[e.id],a=x===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:()=>C(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)(e8,{style:{color:`#d97706`,fontSize:12}}):(0,$.jsx)(v5,{style:{color:`#2563eb`,fontSize:12}})}),a?(0,$.jsx)(mQ,{style:{color:`#6366f1`,fontSize:12,flexShrink:0}}):(0,$.jsx)(D4,{style:{color:`#cbd5e1`,fontSize:12,flexShrink:0}}),(0,$.jsx)(h$,{color:q7[e.status].color,icon:q7[e.status].icon,style:{margin:0},children:q7[e.status].text}),(0,$.jsx)(h$,{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:R7(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:R7(e.createdAt)})]}),(0,$.jsx)(`div`,{className:`record-actions`,onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(EH,{children:[e.status===`prompt_optimized`&&(0,$.jsx)(X,{type:`primary`,size:`small`,icon:(0,$.jsx)(l8,{}),loading:i,onClick:()=>D(e),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`生成`}),e.status===`generating`&&(0,$.jsx)(h$,{color:`processing`,icon:(0,$.jsx)(Xm,{spin:!0}),style:{padding:`4px 12px`,fontSize:12},children:`生成中...`}),e.status===`failed`&&(0,$.jsx)(X,{type:`primary`,danger:!0,size:`small`,icon:(0,$.jsx)(l8,{}),loading:i,onClick:()=>D(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)(EH,{size:4,children:[(0,$.jsx)(Cw,{title:`复制`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(b1,{}),onClick:()=>{navigator.clipboard.writeText(r),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),e.status===`prompt_optimized`&&(0,$.jsx)(Cw,{title:`编辑`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(Z$,{}),onClick:()=>{b(e.id),v(t=>({...t,[e.id]:t[e.id]??e.optimizedPrompt}))},style:{color:`#6366f1`}})})]})]}),n?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(tG.TextArea,{value:r,onChange:t=>v(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)(X,{size:`small`,onClick:()=>b(null),children:`取消`}),(0,$.jsx)(X,{size:`small`,type:`primary`,onClick:()=>{v(t=>({...t,[e.id]:r})),b(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)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(D8,{}),loading:i,onClick:()=>D(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)(X,{type:`primary`,danger:!0,size:`large`,icon:(0,$.jsx)(l8,{}),loading:i,onClick:()=>D(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)(Cw,{title:`下载${o===`video`?`视频`:`图片`}`,children:(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(M0,{}),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)(EH,{children:[o===`video`?(0,$.jsx)(v5,{style:{color:`#6366f1`}}):(0,$.jsx)(e8,{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:[`生成于 `,R7(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)(N4,{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)(DV,{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)})}),t.total>0&&(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:18},children:(0,$.jsx)(VG,{current:t.page||s,pageSize:t.pageSize||l,total:t.total,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{c(e),u(t)}})}),(0,$.jsx)(NK,{title:(0,$.jsxs)(EH,{children:[(0,$.jsx)(D8,{}),`生成视频`]}),open:!!w,onCancel:()=>T(null),onOk:E,okText:`提交生成`,cancelText:`取消`,width:420,children:w&&(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:(()=>{let e=o.find(e=>e.id===w.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)(NC,{value:w.ratio,onChange:e=>T(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)(NC,{value:w.resolution,onChange:e=>T(t=>t?{...t,resolution:e}:null),style:{width:`100%`},options:[`480p`,`720p`,`1080p`].map(e=>({value:e,label:e}))})]})]})})()})})]})},J7=({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()})},$ae=()=>{let{user:e}=j7(),[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 q5(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)(mJ,{gutter:[16,16],style:{marginBottom:24},children:[(0,$.jsx)(pz,{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)(EH,{style:{marginBottom:10},children:[(0,$.jsx)(b5,{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)(J7,{value:e?.credits??0})})]})]})}),(0,$.jsx)(pz,{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)(EH,{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)(G2,{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)(J7,{value:f})})]})}),(0,$.jsx)(pz,{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)(EH,{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)(I2,{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)(J7,{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)(s5,{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)(n$,{columns:[{title:`类型`,dataIndex:`type`,key:`type`,width:100,render:e=>(0,$.jsx)(h$,{color:e===`recharge`?`green`:`orange`,icon:e===`recharge`?(0,$.jsx)(G2,{}):(0,$.jsx)(I2,{}),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:R7(e)})}],dataSource:t,rowKey:`id`,loading:r,pagination:{current:a,pageSize:s,total:l,onChange:d,showSizeChanger:!0,showTotal:e=>`共 ${e} 条`},scroll:{x:500}})})]})]})},eoe=()=>{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 q5(c,u);r(e.records||[]),a(e.credits||0),s(e.total||0)}catch{r([])}t(!1)};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(mJ,{gutter:[16,16],style:{marginBottom:24},children:[(0,$.jsx)(pz,{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)(b5,{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)(pz,{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)(f8,{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)(pz,{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)(s5,{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)(s5,{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)(cK,{spinning:e,children:n.length===0?(0,$.jsx)(rC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无积分变动记录`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(n$,{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)(h$,{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)(VG,{current:c,pageSize:u,total:o,onChange:e=>{l(e)},size:`small`})})]})})})]})]})},toe=()=>{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 bie(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)(jH,{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)(cK,{spinning:e,children:n.length===0?(0,$.jsx)(rC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无订单记录`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(n$,{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)(D2,{style:{fontSize:16}}),label:`支付宝`,color:`#1677ff`},wechat:{icon:(0,$.jsx)(C5,{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)(h$,{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)(VG,{current:o,pageSize:c,total:i,onChange:e=>{s(e)},size:`small`})})]})})})]})})},noe=()=>{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 X5(c,u);r(e.items||[]),s(e.total||0)}catch{r([])}t(!1)},f=async()=>{try{a(await Z5())}catch{a(0)}},p=async e=>{try{await Q5(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)(o4,{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)(cK,{spinning:e,children:n.length===0?(0,$.jsx)(rC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无消息`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(n$,{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)(z8,{style:{fontSize:14}})},credit:{color:`#f59e0b`,label:`积分`,bg:`rgba(245,158,11,0.1)`,icon:(0,$.jsx)(b5,{style:{fontSize:14}})},promo:{color:`#8b5cf6`,label:`活动`,bg:`rgba(139,92,246,0.1)`,icon:(0,$.jsx)(N3,{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)(h$,{color:`gray`,style:{background:`rgba(148,163,184,0.1)`},children:`已读`}):(0,$.jsx)(h$,{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)(X,{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)(VG,{current:c,pageSize:u,total:o,onChange:e=>{l(e)},size:`small`})})]})})})]})})},Y7=()=>{let[e]=On(),[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)(IL,{activeKey:t,onChange:n,items:[{key:`credits`,label:`积分明细`},{key:`orders`,label:`订单记录`}],style:{marginBottom:24},size:`large`}),t===`credits`&&(0,$.jsx)(eoe,{}),t===`orders`&&(0,$.jsx)(toe,{})]})},roe=`/assets/bg1-CQh9PRPW.png`,{Text:X7}=Q,ioe=({items:e,selectedId:t,onSelect:n})=>e.length?(0,$.jsx)(EH,{direction:`vertical`,style:{width:`100%`},size:10,children:e.map(e=>{let r=t===e.id;return(0,$.jsxs)(`div`,{onClick:()=>n(e),style:{padding:14,borderRadius:14,cursor:`pointer`,border:r?`1px solid #8b5cf6`:`1px solid #e2e8f0`,background:r?`#f5f3ff`:`#fff`},children:[(0,$.jsx)(EH,{style:{width:`100%`,justifyContent:`space-between`},align:`start`,children:(0,$.jsxs)(`div`,{style:{minWidth:0},children:[(0,$.jsx)(X7,{strong:!0,ellipsis:!0,style:{display:`block`},children:e.name}),e.description&&(0,$.jsx)(X7,{type:`secondary`,ellipsis:!0,style:{display:`block`,fontSize:12},children:e.description})]})}),(0,$.jsxs)(EH,{wrap:!0,size:4,style:{marginTop:10},children:[(0,$.jsxs)(h$,{children:[`总 `,e.assetCount||0]}),(0,$.jsxs)(h$,{color:`green`,children:[`图 `,e.imageAssetCount||0]}),(0,$.jsxs)(h$,{color:`blue`,children:[`视频 `,e.videoAssetCount||0]})]})]},e.id)})}):(0,$.jsx)(rC,{description:`暂无项目组`}),aoe={Active:`green`,Processing:`processing`,Failed:`red`,local_deleted:`default`,remote_deleted:`default`,delete_failed:`red`},ooe={Active:`入库成功`,Processing:`入库处理中`,Failed:`入库失败`,local_deleted:`本地已删除`,remote_deleted:`远程已删除`,delete_failed:`删除失败`},Z7=e=>e?e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`)||e.startsWith(`blob:`)?e:`${`http://ceshi.apiforeign.minzhong.cn`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,Q7=e=>e.assetType===`Video`?Z7(e.videoCoverUrl||e.previewUrl||e.displayUrl||e.remoteUrl||e.sourceUrl):Z7(e.previewUrl||e.displayUrl||e.videoCoverUrl||e.remoteUrl||e.sourceUrl),soe=e=>{let t=Number(e||0);return!Number.isFinite(t)||t<=0?`-`:`${t.toFixed(t>=10?0:1)}s`},coe=({items:e,onDelete:t,onRefresh:n})=>{let r=(0,S.useRef)(null),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(``),[c,l]=(0,S.useState)(`Image`);(0,S.useEffect)(()=>(e.some(e=>e.status!==`Failed`&&e.status!==`Active`)&&n?r.current||=window.setInterval(()=>{n()},3e3):r.current&&=(clearInterval(r.current),null),()=>{r.current&&=(clearInterval(r.current),null)}),[e,n]);let u=e=>{let t=Q7(e);t&&(s(t),l(e.assetType===`Video`?`Video`:`Image`),a(!0))};return e.length?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(220px, 1fr))`,gap:14},children:e.map(e=>{let n=e.assetType===`Video`,r=Q7(e);return(0,$.jsx)(RL,{hoverable:!0,bodyStyle:{padding:12},style:{borderRadius:16,overflow:`hidden`,borderColor:`#eef2f7`},cover:(0,$.jsxs)(`div`,{style:{height:170,background:`#f8fafc`,display:`flex`,alignItems:`center`,justifyContent:`center`,position:`relative`},children:[r?n&&e.videoCoverUrl?(0,$.jsx)(`img`,{src:r,alt:e.name||`视频封面`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):n?(0,$.jsx)(`video`,{src:r,muted:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`img`,{src:r,alt:e.name||``,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):n?(0,$.jsx)(v5,{style:{fontSize:42,color:`#64748b`}}):(0,$.jsx)(e8,{style:{fontSize:42,color:`#64748b`}}),n&&(0,$.jsx)(h$,{color:`blue`,style:{position:`absolute`,left:10,top:10},children:`视频`}),r&&(0,$.jsx)(X,{size:`small`,shape:`circle`,icon:(0,$.jsx)(NW,{}),style:{position:`absolute`,right:10,top:10},onClick:()=>u(e)}),n&&(0,$.jsx)(`div`,{style:{position:`absolute`,left:10,bottom:10,padding:`2px 6px`,borderRadius:8,background:`rgba(15,23,42,0.72)`,color:`#fff`,fontSize:12},children:soe(e.videoDuration)})]}),children:(0,$.jsxs)(EH,{direction:`vertical`,size:8,style:{width:`100%`},children:[(0,$.jsx)(Cw,{title:e.name||e.remoteAssetId||e.id,children:(0,$.jsx)(`div`,{style:{fontWeight:600,color:`#1e293b`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.name||e.remoteAssetId||`未命名素材`})}),(0,$.jsxs)(EH,{wrap:!0,size:4,children:[(0,$.jsx)(h$,{color:aoe[e.status]||`default`,children:ooe[e.status]||e.status}),(0,$.jsx)(h$,{color:n?`blue`:`default`,children:n?`视频`:`图片`})]}),(0,$.jsx)(EH,{size:6,wrap:!0,children:(0,$.jsx)(LK,{title:`确认删除这个素材吗?`,onConfirm:()=>t(e.id),children:(0,$.jsx)(X,{size:`small`,danger:!0,icon:(0,$.jsx)(k$,{}),children:`删除`})})})]})},e.id)})}),(0,$.jsx)(NK,{title:`素材预览`,open:i,onCancel:()=>a(!1),footer:null,width:760,destroyOnClose:!0,children:(0,$.jsx)(`div`,{style:{minHeight:420,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#0f172a`,borderRadius:12,overflow:`hidden`},children:c===`Video`?(0,$.jsx)(`video`,{src:o,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:520}}):(0,$.jsx)(`img`,{src:o,alt:`素材预览`,style:{maxWidth:`100%`,maxHeight:520,objectFit:`contain`}})})})]}):(0,$.jsx)(rC,{description:`暂无素材`})},$7=2,e9=15,loe=e=>{if(!e)return`Image`;if(e.type.startsWith(`video/`))return`Video`;let t=e.name.toLowerCase();return/\.(mp4|mov|webm|m4v|avi|mkv)$/.test(t)?`Video`:`Image`},uoe=e=>new Promise(t=>{if(!e.type.startsWith(`video/`)){t(null);return}let n=URL.createObjectURL(e),r=document.createElement(`video`);r.preload=`metadata`,r.onloadedmetadata=()=>{let e=Number.isFinite(r.duration)?r.duration:null;URL.revokeObjectURL(n),t(e)},r.onerror=()=>{URL.revokeObjectURL(n),t(null)},r.src=n}),doe=e=>e==null||!Number.isFinite(e)||e<=0?(Z.error(`无法读取视频秒数,请检查视频文件是否损坏`),!1):e<$7?(Z.error(`视频素材最短不能少于 ${$7} 秒`),!1):e>e9?(Z.error(`视频素材最长不能超过 ${e9} 秒`),!1):!0,foe=({projectId:e,open:t,onClose:n,onSuccess:r})=>{let[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(``),[c,l]=(0,S.useState)(!1),u=()=>{a([]),s(``)};return(0,$.jsx)(NK,{title:`上传真人素材`,open:t,onCancel:n,onOk:async()=>{let t=i[0]?.originFileObj;if(!t){Z.warning(`请先选择图片或视频素材`);return}let a=loe(t);if(a===`Image`&&!t.type.startsWith(`image/`)){Z.error(`仅支持图片或视频素材`);return}l(!0);try{let i=a===`Video`?await uoe(t):null;if(a===`Video`&&!doe(i))return;let s=a===`Video`?await aie(t,i||void 0):await iie(t);await fae(e,{url:s.url,assetType:a,name:o.trim()||t.name,videoDuration:s.duration_seconds??i,fileSize:s.file_size_bytes??t.size,mimeType:t.type||null,uploadResourceId:s.resource_id||null}),Z.success(a===`Video`?`视频素材已提交入库,处理中`:`图片素材已提交入库,处理中`),u(),r(),n()}catch(e){Z.error(e?.message||`上传素材失败`)}finally{l(!1)}},confirmLoading:c,okText:`提交入库`,destroyOnHidden:!0,children:(0,$.jsxs)(EH,{direction:`vertical`,style:{width:`100%`},size:12,children:[(0,$.jsx)(tG,{value:o,onChange:e=>s(e.target.value),placeholder:`素材名称,默认使用文件名`,maxLength:256}),(0,$.jsx)(R0,{accept:`image/*,video/*`,maxCount:1,fileList:i,beforeUpload:()=>!1,onChange:({fileList:e})=>a(e),listType:`picture`,children:(0,$.jsx)(X,{icon:(0,$.jsx)(p5,{}),children:`选择图片或视频`})}),(0,$.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12},children:[`当前开放图片和视频,音频暂不接入。视频素材必须在 `,$7,`~`,e9,` 秒内;入库后会经过火山真人一致性校验,Active 后才可用于 AI 创作。`]})]})})},poe=({project:e,onDeleted:t,onChanged:n})=>{let[r,i]=(0,S.useState)([]),[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)(1),[_,v]=(0,S.useState)(20),[y,b]=(0,S.useState)(0),x=async(t=h,n=_)=>{o(!0);try{let r=await pae(e.id,{page:t,pageSize:n,keyword:l,status:d,assetType:p});i(r.items),b(r.total||0),g(t),v(n)}catch(e){Z.error(e?.message||`加载素材失败`)}finally{o(!1)}};(0,S.useEffect)(()=>{x(1,_)},[e.id,l,d,p]);let C=async e=>{try{await mae(e),await x(h,_),n(),Z.success(`素材已删除`)}catch(e){Z.error(e?.message||`删除素材失败`)}},w=async()=>{try{await uae(e.id),Z.success(`项目组已删除`),t()}catch(e){Z.error(e?.message||`删除项目组失败`)}},T=e.status===`active`;return(0,$.jsxs)(RL,{title:(0,$.jsx)(EH,{children:(0,$.jsx)(`span`,{children:e.name})}),extra:(0,$.jsxs)(EH,{children:[(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(p5,{}),disabled:!T,onClick:()=>c(!0),children:`上传素材`}),(0,$.jsx)(LK,{title:`确认删除这个真人素材项目组吗?`,onConfirm:w,children:(0,$.jsx)(X,{danger:!0,icon:(0,$.jsx)(k$,{}),children:`删除项目组`})})]}),style:{borderRadius:16},children:[!T&&(0,$.jsx)(Q.Paragraph,{style:{color:`#f97316`},children:`项目组未完成真人认证,暂不能上传素材。请重新创建项目组并完成手机扫码认证。`}),(0,$.jsxs)(EH,{style:{width:`100%`,marginBottom:16},wrap:!0,children:[(0,$.jsx)(tG.Search,{allowClear:!0,placeholder:`搜索素材名称`,value:l,onChange:e=>u(e.target.value),onSearch:()=>x(1,_),style:{width:240}}),(0,$.jsx)(NC,{allowClear:!0,placeholder:`素材状态`,value:d,onChange:e=>f(e),style:{width:150},options:[{value:`Processing`,label:`处理中`},{value:`Active`,label:`可用`},{value:`Failed`,label:`失败`}]}),(0,$.jsx)(NC,{allowClear:!0,placeholder:`素材类型`,value:p,onChange:e=>m(e),style:{width:130},options:[{value:`Image`,label:`图片`},{value:`Video`,label:`视频`}]}),(0,$.jsx)(X,{onClick:()=>x(1,_),children:`筛选`})]}),(0,$.jsx)(cK,{spinning:a,children:r.length===0?(0,$.jsx)(rC,{description:`暂无素材,上传图片/视频后会异步入库`,style:{marginTop:80}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(coe,{items:r,loading:a,onDelete:C,onRefresh:()=>x(h,_)}),(0,$.jsx)(`div`,{style:{textAlign:`right`,marginTop:16},children:(0,$.jsx)(VG,{current:h,pageSize:_,total:y,showSizeChanger:!0,showTotal:e=>`共 ${e} 个素材`,onChange:(e,t)=>x(e,t)})})]})}),(0,$.jsx)(foe,{projectId:e.id,open:s,onClose:()=>c(!1),onSuccess:()=>{x(1,_),n()}})]})},t9=`group_active`,n9=2e3,moe=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(!1),[g]=bU.useForm(),_=(0,S.useRef)(null),v=()=>{_.current&&=(window.clearInterval(_.current),null)},y=()=>{v(),s(!1),l(!1),h(!1),d(null),p(null),g.resetFields()},b=async()=>{a(!0);try{let e=await k7({pageSize:100,status:`active`});t(e.items),r(t=>t?e.items.find(e=>e.id===t.id)||e.items[0]||null:e.items[0]||null)}catch(e){Z.error(e?.message||`加载真人素材项目组失败`)}finally{a(!1)}};(0,S.useEffect)(()=>{b()},[]),(0,S.useEffect)(()=>()=>v(),[]);let x=async e=>{v(),h(!1),Z.success(`真人认证完成,项目组已创建成功`),s(!1),p(null),d(null),g.resetFields();let n=await k7({pageSize:100,status:`active`});t(n.items),r(n.items.find(t=>t.id===e)||n.items[0]||null)},C=(e,t,n)=>{v(),h(!0);let r=async()=>{try{let n=await dae(e);if(p(n),n.status===t9){await x(t);return}[`callback_failed`,`failed`,`expired`].includes(n.status)&&(v(),h(!1),Z.error(n.errorMessage||`真人认证未完成,请重新创建项目组`))}catch(e){v(),h(!1),Z.error(e?.message||`轮询真人认证状态失败`)}};_.current=window.setInterval(r,Math.max(1e3,n||n9)),r()},w=async()=>{let e=await g.validateFields();l(!0);try{let t=`${window.location.origin}/private-portrait-authorized`,n=await lae({...e,callbackRedirectUrl:t});d(n.project),p(n.validateSession),Z.success(`请使用手机扫码完成人脸认证`),n.validateSession?.id&&C(n.validateSession.id,n.project.id,n.pollIntervalMs||n9)}catch(e){Z.error(e?.message||`创建项目组认证二维码失败`)}finally{l(!1)}},T=f?.h5Link||``,E=f?.status===t9;return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:16,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:`真人素材库`}),(0,$.jsx)(Q.Text,{type:`secondary`,children:`创建项目组时先完成真人认证,认证成功后项目组才会正式创建并可上传素材。`})]}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(mL,{}),onClick:()=>s(!0),children:`创建项目组`})]}),(0,$.jsxs)(mJ,{gutter:16,children:[(0,$.jsx)(pz,{xs:24,lg:5,children:(0,$.jsx)(RL,{style:{borderRadius:16,minHeight:520},children:(0,$.jsx)(cK,{spinning:i,children:e.length===0?(0,$.jsx)(rC,{description:`暂无真人项目组`}):(0,$.jsx)(ioe,{items:e,selectedId:n?.id,onSelect:r})})})}),(0,$.jsx)(pz,{xs:24,lg:19,children:n?(0,$.jsx)(poe,{project:n,onDeleted:()=>{r(null),b()},onChanged:b}):(0,$.jsx)(RL,{style:{borderRadius:16,minHeight:520,textAlign:`center`,color:`#94a3b8`},children:`请先创建或选择一个真人素材项目组`})})]}),(0,$.jsx)(NK,{title:`新建真人素材项目组`,open:o,onCancel:y,footer:f?[(0,$.jsx)(X,{onClick:y,children:`关闭`},`close`)]:void 0,onOk:f?void 0:w,okText:`开始认证并创建`,confirmLoading:c,maskClosable:!m,children:f?(0,$.jsxs)(EH,{direction:`vertical`,align:`center`,size:16,style:{width:`100%`},children:[E?(0,$.jsx)(A4,{style:{fontSize:54,color:`#22c55e`}}):T?(0,$.jsx)(Jq,{value:T,size:220}):(0,$.jsx)(cK,{}),(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Title,{level:5,style:{marginBottom:8},children:u?.name||`真人素材项目组`}),(0,$.jsx)(Q.Text,{type:E?`success`:`secondary`,children:E?`认证成功,项目组正在刷新`:`请使用手机扫码完成人脸认证,成功后回到电脑端查看项目组。`})]})]}):(0,$.jsxs)(bU,{form:g,layout:`vertical`,children:[(0,$.jsx)(bU.Item,{label:`项目组名称`,name:`name`,rules:[{required:!0,message:`请输入项目组名称`}],children:(0,$.jsx)(tG,{placeholder:`例如:达人A、客户B、张三人像`})}),(0,$.jsx)(bU.Item,{label:`描述`,name:`description`,children:(0,$.jsx)(tG.TextArea,{rows:3,placeholder:`可选`})}),(0,$.jsx)(Q.Paragraph,{type:`secondary`,style:{marginBottom:0},children:`点击后会生成真人认证二维码。手机扫码认证成功后,项目组才会出现在项目列表中。`})]})})]})},{Text:r9}=Q,i9=2,a9=15,hoe={creating:{label:`本地创建中`,color:`processing`},Processing:{label:`入库处理中`,color:`processing`},Active:{label:`入库成功`,color:`success`},Failed:{label:`入库失败`,color:`error`},local_deleted:{label:`本地已删`,color:`default`},remote_deleted:{label:`远端已删`,color:`default`},delete_failed:{label:`远端删除失败`,color:`error`}},goe=e=>{let t=Number(e||0);return!Number.isFinite(t)||t<=0?`-`:`${t.toFixed(t>=10?0:1)}s`},o9=e=>e?e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`)||e.startsWith(`blob:`)?e:`${`http://ceshi.apiforeign.minzhong.cn`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,s9=e=>e.assetType===`Video`?o9(e.videoCoverUrl||e.previewUrl||e.displayUrl||e.remoteUrl||e.sourceUrl):o9(e.previewUrl||e.displayUrl||e.videoCoverUrl||e.remoteUrl||e.sourceUrl),_oe=e=>{if(!e)return`Image`;if(e.type.startsWith(`video/`))return`Video`;let t=e.name.toLowerCase();return/\.(mp4|mov|webm|m4v|avi|mkv)$/.test(t)?`Video`:`Image`},voe=e=>new Promise(t=>{if(!e.type.startsWith(`video/`)){t(null);return}let n=URL.createObjectURL(e),r=document.createElement(`video`);r.preload=`metadata`,r.onloadedmetadata=()=>{let e=Number.isFinite(r.duration)?r.duration:null;URL.revokeObjectURL(n),t(e)},r.onerror=()=>{URL.revokeObjectURL(n),t(null)},r.src=n}),yoe=(e,t)=>e==null||!Number.isFinite(e)||e<=0?(t(`无法读取视频秒数,请检查视频文件是否损坏`),!1):ea9?(t(`视频素材最长不能超过 ${a9} 秒`),!1):!0,boe=({status:e})=>{let t=e||`-`,n=hoe[t];return(0,$.jsx)(h$,{color:n?.color||`default`,children:n?.label||t})},xoe=()=>{let{message:e}=Jb.useApp(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(!1),[d,f]=(0,S.useState)(1),[p,m]=(0,S.useState)(20),[h,g]=(0,S.useState)(0),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(),[x,C]=(0,S.useState)(),[w,T]=(0,S.useState)(!1),[E,D]=(0,S.useState)(!1),[O,k]=(0,S.useState)(!1),[A,j]=(0,S.useState)(!1),[M,N]=(0,S.useState)([]),[P,F]=(0,S.useState)(``),[I,L]=(0,S.useState)(!1),[R,z]=(0,S.useState)(``),[B,V]=(0,S.useState)(`Image`),[H]=bU.useForm(),U=(0,S.useRef)(null),W=(0,S.useMemo)(()=>t.find(e=>e.id===r)||null,[t,r]),ee=async()=>{c(!0);try{let e=(await A7({page:1,pageSize:100,status:`active`})).items||[];n(e),i(t=>t&&e.some(e=>e.id===t)?t:e[0]?.id)}catch(t){e.error(t?.message||`加载虚拟人像项目组失败`)}finally{c(!1)}},G=async(t=d,n=p)=>{if(!r){o([]),g(0);return}u(!0);try{let e=await bae(r,{page:t,pageSize:n,keyword:_.trim()||void 0,status:y,assetType:x});o(e.items||[]),g(e.total||0),f(t),m(n)}catch(t){e.error(t?.message||`加载虚拟人像素材失败`)}finally{u(!1)}},te=async()=>{await ee()};(0,S.useEffect)(()=>{te()},[]),(0,S.useEffect)(()=>{r&&G(1,p)},[r]),(0,S.useEffect)(()=>(a.some(e=>e.status!==`Failed`&&e.status!==`Active`)&&r?U.current||=window.setInterval(()=>{G(d,p)},3e3):U.current&&=(clearInterval(U.current),null),()=>{U.current&&=(clearInterval(U.current),null)}),[a,r,d,p]);let ne=async()=>{let t=await H.validateFields();D(!0);try{let n=await _ae(t);e.success(`虚拟人像项目组已创建`),T(!1),H.resetFields(),await ee(),i(n.id)}catch(t){e.error(t?.message||`创建项目组失败`)}finally{D(!1)}},K=async()=>{if(!r){e.warning(`请先创建或选择项目组`);return}let t=M[0]?.originFileObj;if(!t){e.warning(`请先选择图片或视频素材`);return}let n=_oe(t);if(n===`Image`&&!t.type.startsWith(`image/`)){e.error(`仅支持图片或视频素材`);return}j(!0);try{let i=n===`Video`?await voe(t):null;if(n===`Video`&&!yoe(i,e.error))return;let a=n===`Video`?await sie(t,i||void 0):await oie(t);await yae(r,{url:a.url,assetType:n,name:P.trim()||t.name,videoDuration:a.duration_seconds??i,fileSize:a.file_size_bytes??t.size,mimeType:t.type||null,uploadResourceId:a.resource_id||null}),e.success(n===`Video`?`视频素材已提交入库,处理中`:`图片素材已提交入库,处理中`),k(!1),N([]),F(``),await Promise.all([ee(),G(1,p)])}catch(t){e.error(t?.message||`上传素材失败`)}finally{j(!1)}},re=async t=>{try{await xae(t),e.success(`素材已删除,远端删除将异步执行`),await Promise.all([ee(),G(d,p)])}catch(t){e.error(t?.message||`删除素材失败`)}},ie=async()=>{if(r)try{await vae(r),e.success(`项目组已删除,远端资产组将异步删除`),i(void 0),await te()}catch(t){e.error(t?.message||`删除项目组失败`)}},ae=t=>{let n=s9(t);if(!n){e.warning(`暂无可预览地址`);return}z(n),V(t.assetType===`Video`?`Video`:`Image`),L(!0)};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:16,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:`虚拟素材库`}),(0,$.jsx)(Q.Text,{type:`secondary`,children:`可提前上传虚拟人像素材,后续生成视频时可直接使用。`})]}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(mL,{}),onClick:()=>T(!0),children:`创建项目组`})]}),(0,$.jsxs)(mJ,{gutter:[10,10],children:[(0,$.jsx)(pz,{xs:24,lg:5,children:(0,$.jsx)(RL,{style:{borderRadius:16,minHeight:520,margin:`0 auto`,maxWidth:1200},children:(0,$.jsx)(cK,{spinning:s,children:t.length===0?(0,$.jsx)(rC,{description:`暂无虚拟人像项目组`}):(0,$.jsx)(EH,{direction:`vertical`,style:{width:`100%`},size:10,children:t.map(e=>{let t=r===e.id;return(0,$.jsxs)(`div`,{onClick:()=>i(e.id),style:{padding:14,borderRadius:14,cursor:`pointer`,border:t?`1px solid #8b5cf6`:`1px solid #e2e8f0`,background:t?`#f5f3ff`:`#fff`},children:[(0,$.jsx)(EH,{style:{width:`100%`,justifyContent:`space-between`},align:`start`,children:(0,$.jsxs)(`div`,{style:{minWidth:0},children:[(0,$.jsx)(r9,{strong:!0,ellipsis:!0,style:{display:`block`},children:e.name}),e.description&&(0,$.jsx)(r9,{type:`secondary`,ellipsis:!0,style:{display:`block`,fontSize:12},children:e.description})]})}),(0,$.jsxs)(EH,{wrap:!0,size:4,style:{marginTop:10},children:[(0,$.jsxs)(h$,{children:[`总 `,e.assetCount||0]}),(0,$.jsxs)(h$,{color:`green`,children:[`图 `,e.imageAssetCount||0]}),(0,$.jsxs)(h$,{color:`blue`,children:[`视频 `,e.videoAssetCount||0]})]})]},e.id)})})})})}),(0,$.jsx)(pz,{xs:24,lg:19,children:(0,$.jsxs)(RL,{title:W?W.name:`素材资产`,extra:(0,$.jsxs)(EH,{wrap:!0,children:[(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(p5,{}),disabled:!r,onClick:()=>k(!0),children:`上传图片/视频`}),r&&(0,$.jsx)(LK,{title:`确认删除当前虚拟人像项目组吗?`,onConfirm:ie,children:(0,$.jsx)(X,{danger:!0,icon:(0,$.jsx)(k$,{}),children:`删除项目组`})})]}),style:{borderRadius:16,minHeight:520},children:[(0,$.jsxs)(EH,{style:{width:`100%`,marginBottom:16},wrap:!0,children:[(0,$.jsx)(tG.Search,{allowClear:!0,placeholder:`搜索素材名称`,value:_,onChange:e=>v(e.target.value),onSearch:()=>G(1,p),style:{width:240}}),(0,$.jsx)(NC,{allowClear:!0,placeholder:`素材状态`,value:y,onChange:e=>b(e),style:{width:150},options:[{value:`Processing`,label:`处理中`},{value:`Active`,label:`可用`},{value:`Failed`,label:`失败`}]}),(0,$.jsx)(NC,{allowClear:!0,placeholder:`素材类型`,value:x,onChange:e=>C(e),style:{width:130},options:[{value:`Image`,label:`图片`},{value:`Video`,label:`视频`}]}),(0,$.jsx)(X,{onClick:()=>G(1,p),children:`筛选`})]}),(0,$.jsx)(cK,{spinning:l,children:r?a.length===0?(0,$.jsx)(rC,{description:`暂无素材,上传图片/视频后会异步入库`,style:{marginTop:80}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(220px, 1fr))`,gap:14},children:a.map(e=>{let t=s9(e),n=e.assetType===`Video`;return(0,$.jsx)(RL,{hoverable:!0,bodyStyle:{padding:12},style:{borderRadius:16,overflow:`hidden`,borderColor:`#eef2f7`},cover:(0,$.jsxs)(`div`,{style:{height:170,background:`#f8fafc`,display:`flex`,alignItems:`center`,justifyContent:`center`,position:`relative`},children:[t?n&&e.videoCoverUrl?(0,$.jsx)(`img`,{src:t,alt:e.name||`视频封面`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):n?(0,$.jsx)(`video`,{src:t,muted:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`img`,{src:t,alt:e.name||`虚拟人像素材`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):n?(0,$.jsx)(v5,{style:{fontSize:42,color:`#64748b`}}):(0,$.jsx)(e8,{style:{fontSize:42,color:`#64748b`}}),n&&(0,$.jsx)(h$,{color:`blue`,style:{position:`absolute`,left:10,top:10},children:`视频`}),t&&(0,$.jsx)(X,{size:`small`,shape:`circle`,icon:(0,$.jsx)(NW,{}),style:{position:`absolute`,right:10,top:10},onClick:()=>ae(e)}),n&&(0,$.jsx)(`div`,{style:{position:`absolute`,left:10,bottom:10,padding:`2px 6px`,borderRadius:8,background:`rgba(15,23,42,0.72)`,color:`#fff`,fontSize:12},children:goe(e.videoDuration)})]}),children:(0,$.jsxs)(EH,{direction:`vertical`,size:8,style:{width:`100%`},children:[(0,$.jsx)(Cw,{title:e.name||e.remoteAssetId||e.id,children:(0,$.jsx)(`div`,{style:{fontWeight:600,color:`#1e293b`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.name||e.remoteAssetId||`未命名素材`})}),(0,$.jsxs)(EH,{wrap:!0,size:4,children:[(0,$.jsx)(boe,{status:e.status}),(0,$.jsx)(h$,{color:n?`blue`:`default`,children:n?`视频`:`图片`})]}),(0,$.jsx)(EH,{size:6,wrap:!0,children:(0,$.jsx)(LK,{title:`确认删除这个虚拟人像素材吗?`,onConfirm:()=>re(e.id),children:(0,$.jsx)(X,{size:`small`,danger:!0,icon:(0,$.jsx)(k$,{}),children:`删除`})})})]})},e.id)})}),(0,$.jsx)(`div`,{style:{textAlign:`right`,marginTop:16},children:(0,$.jsx)(VG,{current:d,pageSize:p,total:h,showSizeChanger:!0,showTotal:e=>`共 ${e} 个素材`,onChange:(e,t)=>G(e,t)})})]}):(0,$.jsx)(rC,{description:`请先创建或选择项目组`,style:{marginTop:80}})})]})})]}),(0,$.jsx)(NK,{title:`创建虚拟人像项目组`,open:w,onCancel:()=>T(!1),onOk:ne,confirmLoading:E,okText:`创建项目组`,children:(0,$.jsxs)(bU,{form:H,layout:`vertical`,children:[(0,$.jsx)(bU.Item,{name:`name`,label:`项目组名称`,rules:[{required:!0,message:`请输入项目组名称`}],children:(0,$.jsx)(tG,{placeholder:`例如:虚拟主播A / 品牌代言人B`,maxLength:128})}),(0,$.jsx)(bU.Item,{name:`description`,label:`描述`,children:(0,$.jsx)(tG.TextArea,{placeholder:`可填写人物设定、服装风格、素材要求等`,maxLength:2e3,rows:4})})]})}),(0,$.jsx)(NK,{title:`上传虚拟人像素材`,open:O,onCancel:()=>k(!1),onOk:K,confirmLoading:A,okText:`提交入库`,children:(0,$.jsxs)(EH,{direction:`vertical`,style:{width:`100%`},size:14,children:[(0,$.jsx)(tG,{value:P,onChange:e=>F(e.target.value),placeholder:`素材名称,默认使用文件名`,maxLength:256}),(0,$.jsx)(R0,{accept:`image/*,video/*`,maxCount:1,fileList:M,beforeUpload:()=>!1,onChange:({fileList:e})=>N(e),listType:`picture`,children:(0,$.jsx)(X,{icon:(0,$.jsx)(p5,{}),children:`选择图片或视频`})}),(0,$.jsxs)(`div`,{style:{padding:12,background:`#f8fafc`,borderRadius:12,color:`#64748b`,fontSize:13},children:[`当前开放图片和视频,音频暂不接入。视频素材必须在 `,i9,`~`,a9,` 秒内;提交后会调用火山 CreateAsset 异步处理,状态变为 Active 后才可用于 AI 创作。`]})]})}),(0,$.jsx)(NK,{title:`素材预览`,open:I,onCancel:()=>L(!1),footer:null,width:760,destroyOnClose:!0,children:(0,$.jsx)(`div`,{style:{minHeight:420,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#0f172a`,borderRadius:12,overflow:`hidden`},children:B===`Video`?(0,$.jsx)(`video`,{src:R,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:520}}):(0,$.jsx)(`img`,{src:R,alt:`素材预览`,style:{maxWidth:`100%`,maxHeight:520,objectFit:`contain`}})})})]})},{Title:Soe,Text:Coe,Paragraph:woe}=Q,c9=e=>e===`aigc_virtual`?`aigc_virtual`:`real_person`,Toe=()=>{let[e,t]=On(),[n,r]=(0,S.useState)(()=>c9(e.get(`portraitTab`))),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)([]),[c,l]=(0,S.useState)();(0,S.useEffect)(()=>{(async()=>{try{if(n===`aigc_virtual`){let[e,t]=await Promise.all([gae(),A7({page:1,pageSize:100,status:`active`})]);a(e);let n=t.items||[];s(n),l(e=>e&&n.some(t=>t.id===e)?e:n[0]?.id)}else{let[e,t]=await Promise.all([cae(),k7({pageSize:100,status:`active`})]);a(e);let n=t.items||[];s(n),l(e=>e&&n.some(t=>t.id===e)?e:n[0]?.id)}}catch(e){Z.error(e?.message||`加载数据失败`)}})()},[n]),(0,S.useMemo)(()=>o.find(e=>e.id===c)||null,[o,c]);let u=(0,S.useMemo)(()=>i?`已用 ${i.usedAssetCount||0} / ${i.assetLimit||0} 个素材,剩余 ${i.remainingAssetCount||0}`:`额度加载中`,[i]),d=(0,S.useMemo)(()=>[{key:`real_person`,label:`真人素材库`,children:(0,$.jsx)(moe,{})},{key:`aigc_virtual`,label:`虚拟素材库`,children:(0,$.jsx)(xoe,{})}],[]);return(0,$.jsx)(`div`,{children:(0,$.jsx)(IL,{activeKey:n,onChange:n=>{let i=c9(n);r(i);let a=new URLSearchParams(e);a.set(`filterType`,`private_portrait`),a.set(`portraitTab`,i),t(a,{replace:!0})},items:d,destroyInactiveTabPane:!1,tabBarExtraContent:(0,$.jsxs)(`div`,{style:{fontSize:14,fontWeight:700,color:`#4f46e5`,marginTop:8},children:[u,`。真人/虚拟共用,图片/视频共用;音频暂不开放。`]})})})},{Header:Eoe,Sider:Doe,Content:Ooe}=uG,{TextArea:koe}=tG,{Option:Aoe}=NC,{Text:l9}=Q,joe=()=>{let{message:e}=Jb.useApp(),t=Ke(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(`1`),[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,inputValue:y,setMediaType:b,setCountType:x,setSelectedRatio:C,setSelectedResolution:w,setWidth:T,setHeight:E,setVideoDuration:D,setVideoAspectRatio:O,setVideoResolution:k,setEngineOptions:A,setEnginesele:j,setInputValue:M,currentMedia:N,setCurrentMedia:P}=L7(),F=(c===`image`?v?.image:v?.video)?.find(e=>e.id===l),I=F?.maxImageCount??4,L=F?.maxVideoCount??1,[R,z]=(0,S.useState)(!1),[B,V]=(0,S.useState)(!1),[H,U]=(0,S.useState)(`universal`),[W,ee]=(0,S.useState)(null),[G,te]=(0,S.useState)(null),[ne,K]=(0,S.useState)(null),[re,ie]=(0,S.useState)(!1),[ae,q]=(0,S.useState)(!1),[oe,se]=(0,S.useState)(`real_person`),[ce,le]=(0,S.useState)(!1),ue=(0,S.useRef)(null),de=(0,S.useCallback)(()=>{ue.current&&=(window.clearTimeout(ue.current),null),le(!0)},[]),fe=(0,S.useCallback)(()=>{ue.current&&window.clearTimeout(ue.current),ue.current=window.setTimeout(()=>{le(!1),ue.current=null},260)},[]),[pe,me]=(0,S.useState)(!1),he=(0,S.useRef)(null),[ge,_e]=(0,S.useState)({top:0,left:0}),ve=e=>{let t=0,n=0,r=0;return e.map(e=>e.type===`image`?(t++,`图片${t}`):e.type===`video`?(n++,`视频${n}`):(r++,`音频${r}`))},[ye,be]=(0,S.useState)(!1),[xe,Se]=(0,S.useState)(``),[Ce,we]=(0,S.useState)(`image`),Te=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(ye&&Ce===`video`){let e=()=>{Te.current&&Te.current.play().catch(()=>{})};Te.current&&(Te.current.readyState>=2?e():Te.current.addEventListener(`loadedmetadata`,e));let t=setTimeout(e,300);return()=>{clearTimeout(t),Te.current&&(Te.current.removeEventListener(`loadedmetadata`,e),Te.current.pause())}}else Te.current&&Te.current.pause()},[ye,Ce]);let[Ee,De]=(0,S.useState)(new Set),Oe=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}}},ke=e=>{let t=Oe(e);return t?Math.floor(Date.now()/1e3)>t:!1},[Ae,je]=(0,S.useState)(!1),[Me,Ne]=(0,S.useState)(``),[Pe,Fe]=(0,S.useState)(`image`),[Ie,Le]=(0,S.useState)(``),Re=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(Ae&&Pe===`video`&&Re.current){let e=Re.current;e.currentTime=0,e.muted=!1;let t=e.play();t&&typeof t.catch==`function`&&t.catch(()=>{e.muted=!0,e.play().catch(()=>{})})}else if(!Ae&&Re.current){let e=Re.current;e.pause(),e.muted=!0,e.currentTime=0}},[Ae,Pe,Me]);let[ze,Be]=(0,S.useState)(null),[Ve,He]=(0,S.useState)(0),[Ue,We]=(0,S.useState)(!1),[Ge,qe]=(0,S.useState)(null),[Je,Ye]=(0,S.useState)({x:0,y:0}),[Xe,Ze]=(0,S.useState)(!1),[Qe,$e]=(0,S.useState)(!1),[et,tt]=(0,S.useState)([]),[nt,rt]=(0,S.useState)([]),[it,at]=(0,S.useState)({}),[ot,st]=(0,S.useState)(!1),[ct,lt]=(0,S.useState)(!1),[ut,dt]=(0,S.useState)([]),[ft,pt]=(0,S.useState)([]),[mt,ht]=(0,S.useState)([]),gt=()=>{let e={};if(e=mt.find(e=>e.modelConfigId===l&&e.genType===c&&e.resolution===(c===`video`?g:d)),e||(c===`video`?(e={perSecondCredits:2,baseCredits:60,ratio:1.3,inputVideoRatio:1.3,inputVideoBaseCredits:0,inputVideoPerSecondCredits:15,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0},(g===`1080p`||g===`720p`||g===`480p`)&&(e.ratio=1.3)):(e={perSecondCredits:.1,baseCredits:2,ratio:3,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0},(d===`2K`||d===`4K`||d===`1K`)&&(e.ratio=3))),c===`video`){let t=(m*e.perSecondCredits+e.baseCredits)*e.ratio,n=N.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0);if(n>0){let r=((e.inputVideoBaseCredits||0)+(e.inputVideoPerSecondCredits||0)*n)*(e.inputVideoRatio||1);t+=r}let r=N.filter(e=>e.type===`image`).length;if(r>0){let n=((e.inputImageBaseCredits||0)+(e.inputImagePerImageCredits||0)*r)*(e.inputImageRatio||1);t+=n}return Number(t.toFixed(2))}else{let t=e.baseCredits*e.ratio,n=N.filter(e=>e.type===`image`).length;if(n>0){let r=((e.inputImageBaseCredits||0)+(e.inputImagePerImageCredits||0)*n)*(e.inputImageRatio||1);t+=r}return Number(t.toFixed(2))}},_t=(0,S.useRef)(null),vt=(0,S.useRef)(null),yt=(0,S.useRef)(null);(0,S.useRef)(!0);let bt=(0,S.useRef)(!1),xt=(0,S.useRef)(0);o.find(e=>e.id===i);let[St,Ct]=(0,S.useState)([]),[wt,Tt]=(0,S.useState)({page:1,pageSize:20}),[Et,Dt]=(0,S.useState)(0),[Ot,kt]=(0,S.useState)(!1);(0,S.useEffect)(()=>{let e=t.state;e&&(e.generationPrompt&&M(e.generationPrompt),e.mediaReferences&&Array.isArray(e.mediaReferences)&&e.mediaReferences.length>0&&P(e.mediaReferences.map(e=>{let t=e.url||e.resourceUrl||e.previewUrl||``,n=t.startsWith(`http`)?t:`http://ceshi.apiforeign.minzhong.cn${t}`;return{...e,name:e.name||`参考${e.type}`,type:e.type===`video`?`video`:e.type===`audio`?`audio`:`image`,url:n,duration:e.duration||0,label:e.label||``}})),window.history.replaceState({},``,window.location.pathname))},[t.state]),(0,S.useEffect)(()=>()=>{ue.current&&window.clearTimeout(ue.current)},[]);let At=(0,S.useCallback)((e=`instant`)=>{let t=vt.current;t&&(xt.current=Date.now(),requestAnimationFrame(()=>{t.scrollTo({top:t.scrollHeight,behavior:e})}))},[]);(0,S.useEffect)(()=>{if(St.length>0&&!bt.current){let e=setTimeout(()=>{At(`smooth`),bt.current=!0},300);return()=>clearTimeout(e)}},[St.length,At]),(0,S.useEffect)(()=>{let e=c===`image`?v.image:v.video;e&&e.length>0&&(e.some(e=>e.id===l)||x(e[0].id))},[c,v]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;ct&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&<(!1),ot&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&st(!1),Xe&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&Ze(!1),Qe&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&$e(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[ct,ot,Xe,Qe]),(0,S.useEffect)(()=>{if(c!==`video`)return;let e=v?.video?.find(e=>e.id===l);if(!e)return;let t=e.supportsFirstLastFrame??!1,n=e.supportsUniversalReference??!0;U(e=>n?`universal`:e===`universal`&&!n&&t?`first_last_frame`:e)},[l,c,v]),(0,S.useEffect)(()=>{n7().then(e=>{if(j(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;A({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)||O(n.supportedRatios?.[0]||`16:9`),n.supportedResolutions?.includes(g)||k(n.supportedResolutions?.[0]||`720p`),n.supportedDurations?.includes(m)||D(n.supportedDurations?.[0]||5),l===`请选择`&&x(n.id)}if(e.engine.image&&e.engine.image.length>0){let t=e.engine.image.find(e=>e.id===l)||e.engine.image[0],n=t.supportedSizes||{},r=Object.keys(n).sort((e,t)=>{let n={"1K":0,"2K":1,"4K":2};return(n[e]||0)-(n[t]||0)}),i=r[0]||`2K`,a=Object.keys(n[i]||{});if(tt(a.map(e=>({value:e,label:e}))),at(n),rt(r.map(e=>{let t=e.match(/(\d+)K/);return{value:e,label:`${{1:`标清`,2:`高清`,4:`超清`}[t?parseInt(t[1]):1]||`高清`} ${e}`}})),n[i]&&n[i][a[0]]){let[e,t]=n[i][a[0]].split(/[×x]/);T(Number(e)),E(Number(t)),C(a[0]),w(i)}l===`请选择`&&x(t.id)}}).catch(()=>{}),Tie().then(e=>{ht(e)}),r7(wt).then(e=>{let t=e.items,n=e.total;Ct(t),Dt(n)})},[]),(0,S.useEffect)(()=>{if(yt.current&&=(clearInterval(yt.current),null),St.some(e=>e.status===`generating`))return yt.current=window.setInterval(()=>{r7(wt).then(e=>{Ct(t=>t.map(t=>t.status===`generating`&&e.items.find(e=>e.id===t.id)||t)),Dt(e.total)}).catch(e=>{})},1e4),()=>{yt.current&&=(clearInterval(yt.current),null)}},[St,wt]),(0,S.useEffect)(()=>{if(!Xe)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&Ze(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[Xe]),(0,S.useEffect)(()=>{if(!Qe)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&$e(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[Qe]);let jt=e=>{let t=Object.keys(it).sort((e,t)=>{let n={"1K":0,"2K":1,"4K":2};return(n[e]||0)-(n[t]||0)}),n=it[d]&&it[d][e]?d:t.find(t=>it[t]&&it[t][e])||t[0];if(n&&it[n]&&it[n][e]){let[t,r]=it[n][e].split(/[×x]/);T(Number(t)),E(Number(r)),C(e),w(n)}},Mt=e=>{it[e]||(e=Object.keys(it).sort((e,t)=>{let n={"1K":0,"2K":1,"4K":2};return(n[e]||0)-(n[t]||0)})[0]||e);let t=it[e]?Object.keys(it[e]):[];tt(t.map(e=>({value:e,label:e})));let n=t.includes(u)?u:t[0]||``;if(n&&it[e]&&it[e][n]){let[t,r]=it[e][n].split(/[×x]/);T(Number(t)),E(Number(r)),C(n),w(e)}},Nt=()=>{T(p),E(f)},Pt=v?.video?.find(e=>e.id===l),Ft=Pt?.supportsFirstLastFrame??!1,It=Pt?.supportsUniversalReference??!0,Lt=e=>{e===`first_last_frame`&&!Ft||e===`universal`&&!It||(U(e),ie(!1),P([]),M(``))},Rt=()=>{let e=W;ee(G),te(e)},zt=()=>{ee(null),te(null)},Bt=()=>{te(null)},Vt=async()=>{let t=c===`video`&&H===`first_last_frame`;if(t){if(!y.trim()){e.warning(`请输入内容`);return}}else if(!y.trim()&&N.length===0){e.warning(`请输入内容或上传图片/视频`);return}let n;t?(n=[],W&&n.push({...W,role:`first_frame`}),G&&n.push({...G,role:`last_frame`}),n.length===0&&(n=void 0)):n=N.length>0?N.map(e=>{if(e.type===`image`){let{duration:t,...n}=e;return n}return e}):void 0,console.log(n);let r={id:``,gen_type:c,original_prompt:y.trim(),engine_id:l,idempotency_key:new Date().toLocaleString(`zh-CN`),media_references:n,...c===`image`&&{image_size:d,image_proportion:u,image_px:f+`x`+p},...c===`video`&&{duration:m,aspect_ratio:h,resolution:g}};V(!0),Sie(r).then(()=>{M(``),P([]),ee(null),te(null);let e={...wt,page:1};Tt(e),r7(e).then(e=>{Ct(t=>[...t,e.items[e.items.length-1]]),Dt(e.total),setTimeout(()=>{_t.current?.scrollIntoView({behavior:`smooth`})},100)}).catch(e=>{})}).catch(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),e.error({content:n,duration:3})}).finally(()=>{V(!1)}),setTimeout(()=>{V(!1)},3e3)},Ht=async()=>{if(St.length>=Et)return;let e=vt.current;if(!e)return;let t=e.scrollTop,n=e.scrollHeight;kt(!0);try{let r=wt.page+1,i=await r7({...wt,page:r}),a=Array.isArray(i)?{items:i,total:i.length}:i;a.total&&Dt(a.total),Tt(e=>({...e,page:r})),Ct(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{kt(!1)}},Ut=e=>new Promise((t,n)=>{let r=document.createElement(`video`);r.preload=`metadata`,r.onloadedmetadata=()=>{window.URL.revokeObjectURL(r.src),t(r.duration)},r.onerror=()=>{window.URL.revokeObjectURL(r.src),n(Error(`无法获取视频时长`))},r.src=URL.createObjectURL(e)}),Wt=e=>new Promise((t,n)=>{let r=document.createElement(`audio`);r.preload=`metadata`,r.onloadedmetadata=()=>{URL.revokeObjectURL(r.src),t(r.duration)},r.onerror=()=>{URL.revokeObjectURL(r.src),n(Error(`无法获取音频时长`))},r.src=URL.createObjectURL(e)}),Gt=e=>{let t=e.startsWith(`http`)?e:`http://ceshi.apiforeign.minzhong.cn${e}`;if(ze===t){let e=document.getElementById(`audio-player`);e&&e.pause(),Be(null)}else Be(t)},Kt=e=>new Promise((t,n)=>{let r=new Image;r.onload=()=>{window.URL.revokeObjectURL(r.src),t({width:r.naturalWidth,height:r.naturalHeight})},r.onerror=()=>{window.URL.revokeObjectURL(r.src),n(Error(`无法读取图片尺寸`))},r.src=URL.createObjectURL(e)}),qt=e=>new Promise((t,n)=>{let r=document.createElement(`video`);r.preload=`metadata`,r.onloadedmetadata=()=>{window.URL.revokeObjectURL(r.src),t({width:r.videoWidth,height:r.videoHeight,duration:r.duration})},r.onerror=()=>{window.URL.revokeObjectURL(r.src),n(Error(`无法读取视频尺寸`))},r.src=URL.createObjectURL(e)}),Jt=(e,t)=>{if(e<300||e>6e3)return`视频宽度需在 300~6000px 之间,当前为 ${e}px`;if(t<300||t>6e3)return`视频高度需在 300~6000px 之间,当前为 ${t}px`;let n=e/t;if(n<.4||n>2.5)return`视频宽高比需在 0.4~2.5 之间,当前为 ${n.toFixed(2)}`;let r=e*t;return r<409600?`视频总像素数过小(${e}×${t}=${r}),需 ≥ 640×640=409600`:r>8295044?`视频总像素数过大(${e}×${t}=${r}),需 ≤ 3326×2494=8295044`:null},Yt=async(t,n)=>{let r=t.type.startsWith(`image/`),i=t.type.startsWith(`video/`);if(c===`video`&&H===`first_last_frame`){if(!r)return e.error(`首尾帧模式仅支持上传图片`),!1;if(t.size/1024/1024>10)return e.error(`图片大小不能超过10MB`),!1;try{let{width:n,height:r}=await Kt(t),i=Jt(n,r);if(i)return e.error(i),!1}catch{return e.error(`无法读取图片尺寸,请检查文件是否损坏`),!1}let i=n||ne;if(!i)return e.error(`请选择首帧或尾帧上传位置`),!1;z(!0);try{let n=await U5(t),r={name:t.name,type:`image`,url:n.url,role:i===`first`?`first_frame`:`last_frame`};i===`first`?ee(r):te(r),e.success(`图片上传成功`)}catch{e.error(`上传失败`)}finally{z(!1),K(null)}return!1}let a=t.type.startsWith(`audio/`);if(!r&&!i&&!a)return e.error(`仅支持图片、视频或音频文件`),!1;if(a){let n=t.name.split(`.`).pop()?.toLowerCase();if(![`wav`,`mp3`].includes(n||``))return e.error(`音频仅支持wav和mp3格式`),!1}if(c===`image`&&(i||a))return e.error(`图片模式仅支持上传图片`),!1;if(a&&c!==`video`)return e.error(`仅视频模式支持上传音频`),!1;let o=i?100:a?50:10,s=i?`视频`:a?`音频`:`图片`;if(t.size/1024/1024>o)return e.error(`${s}大小不能超过${o}MB`),!1;if(r)try{let{width:n,height:r}=await Kt(t),i=Jt(n,r);if(i)return e.error(i),!1}catch{return e.error(`无法读取图片尺寸,请检查文件是否损坏`),!1}let l=N.filter(e=>e.type===`image`).length;if(r&&l>=bn)return e.error(`该引擎最多上传${bn}张图片`),!1;let u=N.filter(e=>e.type===`video`).length;if(i&&u>=xn)return e.error(`该引擎最多上传${xn}个视频`),!1;let d=N.filter(e=>e.type===`audio`).length;if(a&&d>=Sn)return e.error(`该引擎最多上传${Sn}个音频`),!1;let f=0,p=0;if(i)try{if(f=await Ut(t),f<2)return e.error(`视频素材最短不能少于 2 秒`),!1;let n=N.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0);if(n+f>15)return e.error(`所有视频素材总时长不能超过 15 秒,当前 ${(n+f).toFixed(1)} 秒`),!1;let{width:r,height:i}=await qt(t),a=Jt(r,i);if(a)return e.error(a),!1}catch{return e.error(`无法获取视频信息,请检查文件是否损坏`),!1}if(a)try{if(p=await Wt(t),p<2)return e.error(`音频素材最短不能少于 2 秒`),!1;let n=N.filter(e=>e.type===`audio`).reduce((e,t)=>e+(t.duration||0),0);if(n+p>15)return e.error(`所有音频素材总时长不能超过 15 秒,当前 ${(n+p).toFixed(1)} 秒`),!1}catch{return e.error(`无法获取音频信息,请检查文件是否损坏`),!1}z(!0);try{let e;e=r?await U5(t):a?await H5(t,p):await W5(t,f);let n=r?`image`:a?`audio`:`video`,o=[...N,{name:t.name,type:n,url:e.url,label:``,...i&&{duration:f},...a&&{duration:p}}],s=ve(o);P(o.map((e,t)=>({...e,label:s[t]})))}catch{e.error(`上传失败`)}finally{z(!1)}return!1},Xt=async t=>{let n=t.type.startsWith(`image/`),r=t.type.startsWith(`video/`),i=t.type.startsWith(`audio/`);if(!n&&!r&&!i)return e.error(`仅支持图片、视频或音频文件`),!1;let a=r?100:i?50:10;if(t.size/1024/1024>a)return e.error(`${r?`视频`:i?`音频`:`图片`}大小不能超过${a}MB`),!1;if(i){let n=t.name.split(`.`).pop()?.toLowerCase();if(![`wav`,`mp3`].includes(n||``))return e.error(`音频仅支持wav和mp3格式`),!1}if(n)try{let{width:n,height:r}=await Kt(t),i=Jt(n,r);if(i)return e.error(i),!1}catch{return e.error(`无法读取图片尺寸,请检查文件是否损坏`),!1}let o=0,s=0;if(r)try{if(o=await Ut(t),o<2)return e.error(`视频素材最短不能少于 2 秒`),!1;let n=L7.getState().currentMedia.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0);if(n+o>15)return e.error(`所有视频素材总时长不能超过 15 秒,当前 ${(n+o).toFixed(1)} 秒`),!1}catch{return e.error(`无法获取视频信息,请检查文件是否损坏`),!1}if(i)try{if(s=await Wt(t),s<2)return e.error(`音频素材最短不能少于 2 秒`),!1;let n=L7.getState().currentMedia.filter(e=>e.type===`audio`).reduce((e,t)=>e+(t.duration||0),0);if(n+s>15)return e.error(`所有音频素材总时长不能超过 15 秒,当前 ${(n+s).toFixed(1)} 秒`),!1}catch{return e.error(`无法获取音频信息,请检查文件是否损坏`),!1}let c=n?`image`:i?`audio`:`video`,l={name:t.name,type:c,url:``,label:``,...r&&{duration:o},...i&&{duration:s}},u=L7.getState().currentMedia;if(!$t(u,[l]))return!1;try{let e;return e=n?await U5(t):i?await H5(t,s):await W5(t,o),{name:l.name,type:l.type,url:e.url,label:l.label||``,...l.duration!==void 0&&{duration:l.duration}}}catch{return e.error(`上传失败`),!1}},Zt=async t=>{let n=0,r=0;z(!0);for(let e of t){let t=await Xt(e);if(t){let e=[...L7.getState().currentMedia,t],r=ve(e);P(e.map((e,t)=>({...e,label:r[t]}))),n++}else r++}z(!1),n>0&&e.success(`成功上传${n}个文件${r>0?`,${r}个文件上传失败`:``}`)},Qt=(e,t)=>e.filter(e=>e.type===t).reduce((e,t)=>e+(Number(t.duration)||0),0),$t=(t,n)=>{if(!n.length)return!1;if(c===`image`&&n.some(e=>e.type!==`image`))return e.error(`图片模式仅支持添加图片素材`),!1;if(n.some(e=>e.type===`audio`)&&c!==`video`)return e.error(`仅视频模式支持添加音频素材`),!1;let r=t.filter(e=>e.type===`image`).length,i=t.filter(e=>e.type===`video`).length,a=t.filter(e=>e.type===`audio`).length,o=n.filter(e=>e.type===`image`).length,s=n.filter(e=>e.type===`video`).length,l=n.filter(e=>e.type===`audio`).length;if(r+o>bn)return e.error(`该引擎最多上传${bn}张图片,当前还能添加 ${Math.max(0,bn-r)} 张`),!1;if(i+s>xn)return e.error(`该引擎最多上传${xn}个视频,当前还能添加 ${Math.max(0,xn-i)} 个`),!1;if(a+l>Sn)return e.error(`该引擎最多上传${Sn}个音频,当前还能添加 ${Math.max(0,Sn-a)} 个`),!1;for(let t of n){if(t.type!==`video`)continue;let n=Number(t.duration);if(!Number.isFinite(n)||n<=0)return e.error(`${t.name||`视频素材`}缺少视频秒数,不能用于 AI 创作`),!1;if(n<2)return e.error(`${t.name||`视频素材`}最短不能少于 2 秒`),!1;if(n>15)return e.error(`${t.name||`视频素材`}最长不能超过 15 秒`),!1}let u=Qt(t,`video`)+Qt(n,`video`);if(u>15)return e.error(`所有视频素材总时长不能超过 15 秒,当前 ${u.toFixed(1)} 秒`),!1;let d=Qt(t,`audio`)+Qt(n,`audio`);return d>15?(e.error(`所有音频素材总时长不能超过 15 秒,当前 ${d.toFixed(1)} 秒`),!1):!0},en=t=>{let n=t.mediaReference,r=n?.type||t.resourceType,i=n?.url||t.resourceUrl||t.displayUrl||t.previewUrl||``;if(!i)return e.error(`${t.fileName||t.id} 缺少素材地址,不能用于 AI 创作`),null;if(r===`audio`&&c!==`video`)return e.error(`仅视频模式支持添加音频素材`),null;let a=Number(n?.duration??t.durationSeconds);return{name:n?.name||t.fileName||t.id,type:r,url:i,source:`upload_resource`,upload_resource_id:t.id,label:``,...(r===`video`||r===`audio`)&&Number.isFinite(a)&&a>0?{duration:a}:{}}},tn=t=>{let n=t.map(en).filter(Boolean);if(!n.length)return;let r=L7.getState().currentMedia;if(!$t(r,n))return;let i=[...r,...n],a=ve(i);P(i.map((e,t)=>({...e,label:a[t]}))),e.success(`已添加 ${n.length} 个历史上传素材参考`)},nn=t=>{if(t.assetType===`Audio`)return e.error(`音频私域素材暂不支持用于 AI 创作`),null;let n=t.assetType===`Video`?`video`:`image`,r=oe===`aigc_virtual`?`虚拟素材`:`真人素材`,i=n===`video`?t.videoCoverUrl||t.previewUrl||t.displayUrl||t.providerUrl||``:t.previewUrl||t.displayUrl||t.videoCoverUrl||t.providerUrl||``;return{name:t.name||r,type:n,url:i,source:`private_portrait_asset`,private_asset_id:t.id,label:``,...n===`video`&&{duration:Number(t.videoDuration)||void 0}}},rn=e=>{se(e),q(!0)},an=t=>{let n=t.map(nn).filter(Boolean),r=L7.getState().currentMedia;if(!$t(r,n))return;let i=[...r,...n],a=ve(i);P(i.map((e,t)=>({...e,label:a[t]}))),e.success(`已添加 ${n.length} 个${oe===`aigc_virtual`?`虚拟`:`真人`}素材参考`)},on=e=>e?e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`)||e.startsWith(`blob:`)?e:`${`http://ceshi.apiforeign.minzhong.cn`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,sn=e=>{let t=N.filter((t,n)=>n!==e),n=ve(t);P(t.map((e,t)=>({...e,label:n[t]})))},cn=(e,t)=>{let n=e.selectionStart;return t.slice(0,n).match(/@([^@\s]*)$/)&&N.length>0?(me(!0),!0):(me(!1),!1)},ln=e=>{let t=e.target.value;M(t);let n=e.target;cn(n,t)},un=e=>{pe&&e.key===`Escape`&&me(!1)},dn=e=>{let t=he.current?.resizableTextArea?.textArea;if(!t)return;let n=t.selectionStart,r=y.slice(0,n),i=y.slice(n),a=r.lastIndexOf(`@`);if(a===-1){me(!1);return}M(r.slice(0,a)+`@${e} `+i),me(!1),setTimeout(()=>{let n=a+e.length+2;t.focus(),t.setSelectionRange(n,n)},0)},fn=()=>{be(!1),Se(``),Te.current&&Te.current.pause()},pn=e=>{if(e.preventDefault(),e.stopPropagation(),!xe)return;let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${xe}&download=1`,t.download=Ce===`image`?`image.png`:`video.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},mn=e=>{let t=String(e?.type||``).toLowerCase(),n=String(e?.url||e?.name||``).toLowerCase();return t.includes(`video`)||/\.(mp4|mov|avi|webm|m4v)(\?|$)/.test(n)?`video`:t.includes(`audio`)||/\.(mp3|wav|ogg|aac|m4a)(\?|$)/.test(n)?`audio`:`image`},hn=e=>e?/^https?:\/\//i.test(e)?e:`http://ceshi.apiforeign.minzhong.cn${e}`:``,gn=e=>{e?.url&&(Ne(e.url),Fe(mn(e)),Le(e.name||`附件`),je(!0))},_n=c===`video`&&H===`first_last_frame`,vn=!R&&(_n?!!(y.trim()||W):!!(y.trim()||N.length>0)),yn=c===`image`?`输入画面描述,或上传图片参考风格、构图、主体与光影。例:@图片1 参考色调,生成一张简洁高级的产品海报。`:_n?`首帧尾帧可以不传,如需传入建议描述首帧到尾帧的主体动作、镜头运动、节奏与转场。例:从首帧自然推进到尾帧,产品居中突出,动作平滑连贯。`:`上传最多12个参考素材,输入文字或 @ 引用参考内容,自由组合图、文、视频。例:@图片1 模仿 @视频1 的动作。`,bn=I,xn=L,Sn=F?.maxAudioCount??1;return(0,$.jsxs)(uG,{className:`ai-create-page`,style:{margin:`-24px -32px -32px`,borderRadius:22,height:`calc(100vh - 34px)`,background:`#fff`,overflow:`hidden`},children:[(0,$.jsx)(`audio`,{id:`audio-player`,src:ze||null,autoPlay:!0,onEnded:()=>Be(null),style:{display:`none`}}),!1,(0,$.jsxs)(uG,{style:{display:`flex`,flex:1,background:`#fff`},children:[(0,$.jsx)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`16px 24px`,borderRadius:22,background:`rgb(255, 255, 255)`,backdropFilter:`blur(22px)`,border:`1px solid rgba(231, 234, 240, 0.82)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(`div`,{style:{width:`15%`,height:1,background:`linear-gradient(90deg, transparent, rgba(117,106,136,0.18), rgba(232,227,236,0.48), transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0,textAlign:`center`},children:[(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`AI创作`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#667085`,margin:`4px 0 0 0`},children:`输入想法、剧本或上传参考,智能生成视频/图片`})]}),(0,$.jsx)(`div`,{style:{width:`15%`,height:1,background:`linear-gradient(90deg, transparent, rgba(232,227,236,0.48), rgba(117,106,136,0.18), transparent)`,borderRadius:1}})]})}),(0,$.jsxs)(Ooe,{style:{flex:1,margin:0,padding:`20px 24px 22px`,boxSizing:`border-box`,display:`flex`,flexDirection:`column`,overflow:`hidden`,minHeight:0},children:[St.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, #8b5cf6 0%, #ddd6fe 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,marginBottom:16},children:(0,$.jsx)(w8,{style:{fontSize:40,color:`#fff`}})}),(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:500,color:`#2f3440`},children:`你好,想创作什么?`}),(0,$.jsx)(`p`,{style:{margin:8,fontSize:13,color:`#98a2b3`},children:`输入想法、剧本或上传参考,开始你的创作之旅`})]}),St.length>0&&(0,$.jsxs)(`div`,{ref:vt,className:`ai-create-scroll`,style:{flex:1,overflowY:`auto`,paddingRight:10,paddingBottom:18,background:`#fff`},onScroll:e=>{let t=e.currentTarget;!(Date.now()-xt.current<500)&&bt.current&&t.scrollTop<=50&&!Ot&&St.length{let e=Z;return St.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, #8b5cf6 0%, #ddd6fe 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:(0,$.jsx)(w8,{style:{color:`#fff`,fontSize:16}})}),(0,$.jsx)(`div`,{style:{flex:1},children:(0,$.jsxs)(`div`,{style:{background:`rgba(255, 255, 255, 0.92)`,backdropFilter:`blur(18px)`,borderRadius:`22px`,padding:`14px 16px`,width:`70%`,minWidth:500,boxSizing:`border-box`,boxShadow:`0 18px 50px rgba(47, 52, 64, 0.075)`,position:`relative`,border:`1px solid rgba(231, 234, 240, 0.9)`},children:[(0,$.jsxs)(`div`,{style:{margin:4,fontSize:11,color:`#98a2b3`,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,`rgba(139, 92, 246, 0.10)`),color:(t.genType,`#8b5cf6`),padding:`2px 8px`,borderRadius:12,fontWeight:500,fontSize:11,marginLeft:8},children:t.genType===`image`?`图片生成`:`视频生成`})]}),t.mediaReferences&&t.mediaReferences.length>0&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,zIndex:100},children:(0,$.jsx)(`span`,{style:{padding:`4px 12px`,borderRadius:16,color:`#8b5cf6`,cursor:`pointer`,fontWeight:500,border:`1px solid rgba(139, 92, 246, 0.2)`,background:`rgba(139, 92, 246, 0.04)`},onClick:e=>{e.stopPropagation();let n=e.currentTarget.getBoundingClientRect();Ye({x:n.left,y:n.top-10}),qe(t.id),We(!0)},children:`附件详情`})}),(0,$.jsxs)(`div`,{style:{position:`absolute`,bottom:8,right:8,zIndex:100,display:`flex`,gap:6},children:[(0,$.jsxs)(`button`,{onClick:n=>{if(n.stopPropagation(),M(t.originalPrompt||``),t.mediaReferences&&t.mediaReferences.length>0)if(t.mediaReferences.some(e=>e.role===`first_frame`||e.role===`last_frame`)&&t.genType===`video`){let e=t.mediaReferences.find(e=>e.role===`first_frame`),n=t.mediaReferences.find(e=>e.role===`last_frame`);ee(e?{...e,label:e.label||``}:null),te(n?{...n,label:n.label||``}:null),P([]),U(`first_last_frame`)}else P(t.mediaReferences.map(e=>({name:e.name,type:e.type,url:e.url,label:e.label||``,role:e.role}))),ee(null),te(null),U(`universal`);else P([]),ee(null),te(null);e.success(`已加载到编辑区`)},style:{height:28,padding:`0 10px`,borderRadius:10,border:`none`,background:`rgba(139, 92, 246, 0.08)`,color:`#8b5cf6`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s ease`,gap:4,fontSize:12},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.08)`},children:[(0,$.jsx)(Uq,{style:{fontSize:12}}),`重新编辑`]}),(0,$.jsx)(LK,{title:`确定要删除吗?`,onConfirm:async()=>{try{await wie(t.id),e.success(`删除成功`),Ct(e=>e.filter(e=>e.id!==t.id)),Dt(e=>e-1)}catch(t){let n=t?.response?.data?.message||t?.message||`删除失败`;e.error(n)}},okText:`确定`,cancelText:`取消`,children:(0,$.jsxs)(`button`,{onClick:e=>e.stopPropagation(),style:{height:28,padding:`0 10px`,borderRadius:10,border:`none`,background:`rgba(139, 92, 246, 0.08)`,color:`#8b5cf6`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s ease`,gap:4,fontSize:12},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(164, 91, 91, 0.1)`,e.currentTarget.style.color=`#A45B5B`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.08)`,e.currentTarget.style.color=`#8b5cf6`},children:[(0,$.jsx)(k$,{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 #E7EAF0`,boxShadow:`0 4px 12px rgba(139, 92, 246, 0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`linear-gradient(135deg, #ffffff 0%, #FAFBFC 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(139, 92, 246, 0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 0 30px rgba(139, 92, 246, 0.2)`},children:(0,$.jsx)(`div`,{style:{width:48,height:48,border:`3px solid #ddd6fe`,borderTopColor:`#8b5cf6`,borderRadius:`50%`,animation:`spin 1s linear infinite`}})}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#8b5cf6`,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(168, 90, 106, 0.10)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(Ire,{style:{color:`#A45B5B`,fontSize:22}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#A45B5B`,fontWeight:620},children:`生成失败(积分已退)`}),t.errorMessage&&(0,$.jsx)(`span`,{style:{fontSize:13,color:`#A45B5B`,textAlign:`center`,padding:`0 8px`,lineHeight:1.5},children:t.errorMessage})]}):(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:()=>{Se(t.imageUrl),we(`image`),be(!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:()=>{Se(t.videoUrl),we(`video`),be(!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(47, 52, 64, 0.72)`,borderRadius:`50%`,display:`flex`,alignItems:`center`,justifyContent:`center`,pointerEvents:`none`,boxShadow:`0 10px 24px rgba(47, 52, 64, 0.22)`},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:`#FFFFFF`,borderRadius:12,padding:12,border:`1px solid #E7EAF0`,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:`#475467`,fontSize:13},children:t.originalPrompt})}),(0,$.jsxs)(`div`,{style:{fontSize:12,color:`#667085`,textAlign:`left`,display:`flex`,flexWrap:`wrap`,gap:12,alignItems:`center`,justifyContent:`space-between`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{borderRadius:16,color:`#8b5cf6`,fontWeight:500},children:t.engineSnapshot.name}),(0,$.jsx)(`span`,{style:{borderRadius:16,color:`#667085`},children:t.genType===`image`?`${t.imageProportion||``} · ${t.imagePx||``} · ${t.imageSize||``}`:`${t.duration||``}秒 · ${t.aspectRatio||``} · ${t.resolution||``}`}),(0,$.jsxs)(`span`,{style:{fontSize:14,borderRadius:16,color:`#8b5cf6`},children:[`消耗积分:`,t.creditsCost]})]})]})]})]})})]})},t.id))})(),(0,$.jsx)(`div`,{ref:_t})]}),Ue&&Ge&&(()=>{let e=St.find(e=>e.id===Ge)?.mediaReferences||[];return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`transparent`,zIndex:9998},onClick:()=>{We(!1),qe(null)}}),(0,$.jsxs)(`div`,{className:`ai-reference-expanded-tray ai-attachment-popover`,style:{position:`fixed`,top:`max(84px, ${Je.y-96}px)`,left:`max(24px, min(${Je.x-250}px, calc(100vw - 456px)))`,width:424,padding:`12px 12px 10px`,borderRadius:18,background:`rgba(255,255,255,0.98)`,border:`1px solid #E7EAF0`,boxShadow:`0 24px 60px rgba(31, 41, 55, 0.12)`,backdropFilter:`blur(18px)`,zIndex:9999,pointerEvents:`auto`},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:10},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:[(0,$.jsx)(`span`,{style:{fontSize:13,color:`#344054`,fontWeight:800},children:`参考附件`}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#98A2B3`,fontWeight:600},children:`点击素材查看,或直接下载原文件`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:(0,$.jsx)(`button`,{onClick:()=>{We(!1),qe(null)},style:{width:26,height:26,borderRadius:`50%`,border:`1px solid transparent`,background:`#F6F7FA`,cursor:`pointer`,color:`#98a2b3`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#EEF1F6`,e.currentTarget.style.color=`#2f3440`},onMouseLeave:e=>{e.currentTarget.style.background=`#F6F7FA`,e.currentTarget.style.color=`#98a2b3`},children:(0,$.jsx)(ju,{style:{fontSize:12}})})})]}),(0,$.jsx)(`div`,{className:`ai-reference-tray-scroll`,style:{display:`flex`,gap:10,overflowX:`auto`,padding:`2px 2px 4px`},children:e.map((e,t)=>{let n=mn(e),r=e.label||(e.role===`first_frame`?`首帧`:e.role===`last_frame`?`尾帧`:`${n===`image`?`图片`:n===`video`?`视频`:`音频`}${t+1}`);return(0,$.jsxs)(`div`,{style:{flex:`0 0 92px`,width:92,borderRadius:16,background:`#FFFFFF`,border:`1px solid #E7EAF0`,boxShadow:`0 8px 18px rgba(31, 41, 55, 0.06)`,padding:7,boxSizing:`border-box`},children:[(0,$.jsx)(`div`,{onClick:t=>{n===`audio`?(t.stopPropagation(),Gt(e.url)):(gn(e),We(!1),qe(null))},style:{position:`relative`,width:`100%`,height:70,borderRadius:12,overflow:`hidden`,cursor:`pointer`,background:`#F7F8FA`,border:`1px solid rgba(231, 234, 240, 0.9)`},children:n===`image`?(0,$.jsx)(`img`,{src:hn(e.url),alt:e.name||r,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):n===`video`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:hn(e.url),muted:!0,playsInline:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(31, 41, 55, 0.08)`},children:(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:`50%`,background:`rgba(47, 52, 64, 0.72)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 18px rgba(31, 41, 55, 0.22)`},children:(0,$.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`#fff`,children:(0,$.jsx)(`path`,{d:`M8 5v14l11-7z`})})})})]}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`},children:ze===(e.url.startsWith(`http`)?e.url:`http://ceshi.apiforeign.minzhong.cn${e.url}`)?(0,$.jsx)(G6,{style:{fontSize:24,color:`#fff`}}):(0,$.jsx)(J2,{style:{fontSize:24,color:`#fff`}})})}),(0,$.jsx)(`div`,{title:e.name||r,style:{marginTop:6,color:`#667085`,fontSize:10,fontWeight:700,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,textAlign:`center`},children:e.name||r}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:5,marginTop:7},children:(0,$.jsx)(`button`,{onClick:()=>{gn(e),We(!1),qe(null)},style:{flex:1,height:24,borderRadius:9,border:`1px solid #E7EAF0`,background:`#F8FAFC`,color:`#8b5cf6`,fontSize:11,fontWeight:700,cursor:`pointer`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#EEF1F6`},onMouseLeave:e=>{e.currentTarget.style.background=`#F8FAFC`},children:`查看`})})]},`${e.url||e.name||t}-${t}`)})})]})]})})(),(0,$.jsxs)(`div`,{style:{position:`relative`,background:`#ffffff`,borderRadius:24,padding:`18px 72px 16px 20px`,boxShadow:`0 22px 64px rgba(31, 41, 55, 0.08), 0 1px 0 rgba(255,255,255,0.98) inset`,transition:`all 0.25s ease`,border:`1px solid rgba(231, 234, 240, 0.78)`,backdropFilter:`blur(24px)`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:18,alignItems:`flex-end`,marginBottom:14},children:[(0,$.jsx)(`div`,{style:{width:_n?220:70,minWidth:_n?220:70,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`flex-start`,paddingTop:2,gap:8},children:c===`video`&&H===`first_last_frame`?(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`row`,alignItems:`stretch`,gap:12,width:`100%`,height:100},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,flex:1,minWidth:0,height:100,borderRadius:12,border:`1px solid #E7EAF0`,background:`#ffffff`,boxShadow:`0 6px 16px rgba(47, 52, 64, 0.04)`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,left:10,right:10,display:`flex`,alignItems:`center`,justifyContent:`space-between`,zIndex:2},children:(0,$.jsx)(`span`,{style:{fontSize:11,fontWeight:600,color:`#8b5cf6`,lineHeight:1},children:`首帧(可选)`})}),W?(0,$.jsxs)(`div`,{style:{position:`absolute`,left:10,right:10,bottom:10,height:64},children:[(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${W.url}`,alt:W.name,onClick:()=>{Ne(W.url),Fe(`image`),Le(W.name),je(!0)},style:{width:`100%`,height:`100%`,objectFit:`cover`,borderRadius:8,cursor:`pointer`,border:`1px solid rgba(139, 92, 246, 0.2)`,boxShadow:`0 3px 10px rgba(47, 52, 64, 0.06)`}}),(0,$.jsx)(`button`,{onClick:zt,style:{position:`absolute`,top:-6,right:-6,width:18,height:18,border:`none`,background:`#A45B5B`,borderRadius:50,cursor:`pointer`,color:`#fff`,fontSize:9,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 2px 4px rgba(164, 91, 91, 0.3)`,zIndex:10},children:(0,$.jsx)(k$,{style:{fontSize:9}})})]}):(0,$.jsx)(G7,{accept:`image/*`,multiple:!1,onLocalSelect:e=>{e.length>0&&Yt(e[0],`first`)},onHistorySelect:t=>{if(t.length>0){let n=t[0];ee({name:n.fileName||``,type:`image`,url:n.resourceUrl||n.previewUrl||n.displayUrl||``,role:`first_frame`,label:``}),e.success(`成功添加首帧`)}},onPortraitSelect:t=>{if(t.length>0){let n=t[0],r=n.previewUrl||n.displayUrl||n.videoCoverUrl||n.providerUrl||``;ee({name:n.name||`首帧图片`,type:`image`,url:r,role:`first_frame`,label:``}),e.success(`成功添加首帧`)}},uploading:R,children:(0,$.jsxs)(`div`,{style:{position:`absolute`,left:10,right:10,bottom:10,height:64,borderRadius:8,border:`1px dashed rgba(139, 92, 246, 0.28)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.25s ease`,backgroundColor:`rgba(139, 92, 246, 0.04)`,flexDirection:`column`,gap:4},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#a78bfa`,e.currentTarget.style.backgroundColor=`rgba(139, 92, 246, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(139, 92, 246, 0.28)`,e.currentTarget.style.backgroundColor=`rgba(139, 92, 246, 0.04)`},children:[(0,$.jsx)(mL,{style:{fontSize:18,color:`#8b5cf6`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#8b5cf6`,fontWeight:500},children:`上传首帧`})]})})]}),(0,$.jsx)(`button`,{onClick:Rt,disabled:!W||!G,title:`调换首尾帧`,style:{width:32,height:32,alignSelf:`center`,borderRadius:50,border:`1px solid rgba(231, 234, 240, 0.95)`,background:W&&G?`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`:`#F3F5F8`,cursor:W&&G?`pointer`:`not-allowed`,color:W&&G?`#fff`:`#98A2B3`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:W&&G?`0 6px 14px rgba(139, 92, 246, 0.24)`:`none`,transition:`all 0.2s ease`,flexShrink:0},onMouseEnter:e=>{W&&G&&(e.currentTarget.style.transform=`scale(1.06)`)},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`},children:(0,$.jsx)(aW,{style:{fontSize:14}})}),(0,$.jsxs)(`div`,{style:{position:`relative`,flex:1,minWidth:0,height:100,borderRadius:12,border:`1px solid #E7EAF0`,background:`#ffffff`,boxShadow:`0 6px 16px rgba(47, 52, 64, 0.04)`,overflow:`hidden`,opacity:W?1:.5},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,left:10,right:10,display:`flex`,alignItems:`center`,justifyContent:`space-between`,zIndex:2},children:(0,$.jsx)(`span`,{style:{fontSize:11,fontWeight:600,color:`#8b5cf6`,lineHeight:1},children:`尾帧`})}),G?(0,$.jsxs)(`div`,{style:{position:`absolute`,left:10,right:10,bottom:10,height:64},children:[(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${G.url}`,alt:G.name,onClick:()=>{Ne(G.url),Fe(`image`),Le(G.name),je(!0)},style:{width:`100%`,height:`100%`,objectFit:`cover`,borderRadius:8,cursor:`pointer`,border:`1px solid rgba(139, 92, 246, 0.2)`,boxShadow:`0 3px 10px rgba(47, 52, 64, 0.06)`}}),(0,$.jsx)(`button`,{onClick:Bt,style:{position:`absolute`,top:-6,right:-6,width:18,height:18,border:`none`,background:`#A45B5B`,borderRadius:50,cursor:`pointer`,color:`#fff`,fontSize:9,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 2px 4px rgba(164, 91, 91, 0.3)`,zIndex:10},children:(0,$.jsx)(k$,{style:{fontSize:9}})})]}):W?(0,$.jsx)(G7,{accept:`image/*`,multiple:!1,onLocalSelect:e=>{e.length>0&&Yt(e[0],`last`)},onHistorySelect:t=>{if(t.length>0){let n=t[0];te({name:n.fileName||``,type:`image`,url:n.resourceUrl||n.previewUrl||n.displayUrl||``,role:`last_frame`,label:``}),e.success(`成功添加尾帧`)}},onPortraitSelect:t=>{if(t.length>0){let n=t[0],r=n.previewUrl||n.displayUrl||n.videoCoverUrl||n.providerUrl||``;te({name:n.name||`尾帧图片`,type:`image`,url:r,role:`last_frame`,label:``}),e.success(`成功添加尾帧`)}},uploading:R,children:(0,$.jsxs)(`div`,{style:{position:`absolute`,left:10,right:10,bottom:10,height:64,borderRadius:8,border:`1px dashed rgba(139, 92, 246, 0.24)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.25s ease`,backgroundColor:`rgba(139, 92, 246, 0.04)`,flexDirection:`column`,gap:4},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#a78bfa`,e.currentTarget.style.backgroundColor=`rgba(139, 92, 246, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(139, 92, 246, 0.24)`,e.currentTarget.style.backgroundColor=`rgba(139, 92, 246, 0.04)`},children:[(0,$.jsx)(mL,{style:{fontSize:18,color:`#8b5cf6`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#8b5cf6`,fontWeight:500},children:`上传尾帧`})]})}):(0,$.jsxs)(`div`,{style:{position:`absolute`,left:10,right:10,bottom:10,height:64,borderRadius:8,border:`1px dashed rgba(226, 232, 240, 0.4)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`not-allowed`,backgroundColor:`rgba(241, 245, 249, 0.5)`,flexDirection:`column`,gap:4},children:[(0,$.jsx)(mL,{style:{fontSize:18,color:`#cbd5e1`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#94a3b8`,fontWeight:500},children:`请先上传首帧`})]})]})]}):(0,$.jsx)($.Fragment,{children:!(c===`video`&&H===`first_last_frame`)&&(0,$.jsxs)(`div`,{style:{position:`relative`,width:64,height:72,marginTop:`-10`},onMouseEnter:de,onMouseLeave:fe,children:[N.length===0&&(0,$.jsx)(G7,{accept:c===`image`?`image/*`:`image/*,video/*,audio/*`,onLocalSelect:Zt,onHistorySelect:tn,onPortraitLibrarySelect:e=>{rn(e)},uploading:R,tooltipTitle:c===`image`?`图片${N.filter(e=>e.type===`image`).length}/${I}`:`图片${N.filter(e=>e.type===`image`).length}/${I}, 视频${N.filter(e=>e.type===`video`).length}/${L}${Sn>0?`, - 音频${N.filter(e=>e.type===`audio`).length}/${Sn}`:``}`,maxImageCount:I,maxVideoCount:L,usedImageCount:N.filter(e=>e.type===`image`).length,usedVideoCount:N.filter(e=>e.type===`video`).length,usedVideoDuration:N.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0),maxVideoDuration:15,maxAudioCount:Sn>0?Sn:void 0,usedAudioCount:N.filter(e=>e.type===`audio`).length,maxAudioDuration:15,usedAudioDuration:N.filter(e=>e.type===`audio`).reduce((e,t)=>e+(t.duration||0),0),children:(0,$.jsx)(`div`,{style:{width:54,height:74,borderRadius:7,border:`1px solid rgba(231, 234, 240, 0.95)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.25s ease`,background:`#f4f4f4`,flexDirection:`column`,gap:5,transform:`rotate(-7deg)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.background=`#f4f4f4`,e.currentTarget.style.transform=`rotate(0deg) translateY(-2px)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(231, 234, 240, 0.95)`,e.currentTarget.style.background=`#f4f4f4`,e.currentTarget.style.transform=`rotate(-7deg)`},children:R?(0,$.jsx)(Xm,{style:{fontSize:17,color:`#667085`}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(mL,{style:{fontSize:18,color:`#667085`,lineHeight:1}}),(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(2, 14px)`,columnGap:2,justifyContent:`center`,color:`#344054`,fontSize:12,fontWeight:700,lineHeight:1.05,letterSpacing:0},children:[(0,$.jsxs)(`span`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:1},children:[(0,$.jsx)(`span`,{children:`参`}),(0,$.jsx)(`span`,{children:`考`})]}),(0,$.jsxs)(`span`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:1},children:[(0,$.jsx)(`span`,{children:`内`}),(0,$.jsx)(`span`,{children:`容`})]})]})]})})}),N.length>0&&(0,$.jsx)($.Fragment,{children:N.map((e,t)=>{let n=Math.min(N.length,3)-1-t,r=ce?t*58:t<3?t*6:18,i=ce?!0:t<3;return(0,$.jsx)(`div`,{style:{position:`absolute`,left:r,bottom:0,zIndex:t+1,transition:`all 0.28s cubic-bezier(0.4, 0, 0.2, 1)`,transform:ce?`scale(1) rotate(0deg)`:`scale(${t<3?1-n*.08:0}) rotate(${t<3?-3+t*1.5:0}deg)`,opacity:i?ce?1:1-n*.15:0,pointerEvents:i?`auto`:`none`},children:(0,$.jsxs)(`div`,{style:{position:`relative`,width:52,height:60},children:[e.type===`image`?(0,$.jsx)(`img`,{src:on(e.url),alt:e.name,onClick:()=>{Ne(e.url),Fe(`image`),Le(e.name),je(!0)},style:{width:52,height:60,objectFit:`cover`,borderRadius:10,cursor:`pointer`,border:`1px solid rgba(255,255,255,0.98)`,boxShadow:`0 4px 12px rgba(31,41,55,0.15)`}}):e.type===`video`?(0,$.jsx)(`video`,{src:on(e.url),muted:!0,onClick:()=>{Ne(e.url),Fe(`video`),Le(e.name),je(!0)},style:{width:52,height:60,objectFit:`cover`,borderRadius:10,cursor:`pointer`,border:`1px solid rgba(255,255,255,0.98)`,boxShadow:`0 4px 12px rgba(31,41,55,0.15)`}}):(0,$.jsx)(`div`,{onClick:t=>{t.stopPropagation(),Gt(e.url)},style:{width:52,height:60,objectFit:`cover`,borderRadius:10,cursor:`pointer`,border:`1px solid rgba(255,255,255,0.98)`,boxShadow:`0 4px 12px rgba(31,41,55,0.15)`,background:`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:ze===on(e.url)?(0,$.jsx)(G6,{style:{fontSize:20,color:`#fff`}}):(0,$.jsx)(J2,{style:{fontSize:20,color:`#fff`}})}),(0,$.jsx)(`button`,{onClick:()=>sn(t),style:{position:`absolute`,top:-6,right:-6,width:20,height:20,borderRadius:50,background:`#1f2937`,border:`none`,color:`#fff`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 2px 6px rgba(0,0,0,0.2)`,zIndex:10,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#dc2626`,e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.background=`#1f2937`,e.currentTarget.style.transform=`scale(1)`},children:(0,$.jsx)(k$,{style:{fontSize:10}})})]})},`stack-${t}`)})}),N.length>0&&(0,$.jsx)(K7,{accept:c===`image`?`image/*`:`image/*,video/*,audio/*`,onLocalSelect:Zt,onHistorySelect:tn,onPortraitLibrarySelect:e=>{rn(e)},uploading:R,tooltipTitle:c===`image`?`图片${N.filter(e=>e.type===`image`).length}/${I}`:`图片${N.filter(e=>e.type===`image`).length}/${I}, + 音频${N.filter(e=>e.type===`audio`).length}/${Sn}`:``}`,maxImageCount:I,maxVideoCount:L,usedImageCount:N.filter(e=>e.type===`image`).length,usedVideoCount:N.filter(e=>e.type===`video`).length,usedVideoDuration:N.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0),maxVideoDuration:15,maxAudioCount:Sn>0?Sn:void 0,usedAudioCount:N.filter(e=>e.type===`audio`).length,maxAudioDuration:15,usedAudioDuration:N.filter(e=>e.type===`audio`).reduce((e,t)=>e+(t.duration||0),0),children:(0,$.jsx)(`div`,{style:{width:54,height:74,borderRadius:7,border:`1px solid rgba(231, 234, 240, 0.95)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.25s ease`,background:`#f4f4f4`,flexDirection:`column`,gap:5,transform:`rotate(-7deg)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.background=`#f4f4f4`,e.currentTarget.style.transform=`rotate(0deg) translateY(-2px)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(231, 234, 240, 0.95)`,e.currentTarget.style.background=`#f4f4f4`,e.currentTarget.style.transform=`rotate(-7deg)`},children:R?(0,$.jsx)(Xm,{style:{fontSize:17,color:`#667085`}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(mL,{style:{fontSize:18,color:`#667085`,lineHeight:1}}),(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(2, 14px)`,columnGap:2,justifyContent:`center`,color:`#344054`,fontSize:12,fontWeight:700,lineHeight:1.05,letterSpacing:0},children:[(0,$.jsxs)(`span`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:1},children:[(0,$.jsx)(`span`,{children:`参`}),(0,$.jsx)(`span`,{children:`考`})]}),(0,$.jsxs)(`span`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:1},children:[(0,$.jsx)(`span`,{children:`内`}),(0,$.jsx)(`span`,{children:`容`})]})]})]})})}),N.length>0&&(0,$.jsx)($.Fragment,{children:N.map((e,t)=>{let n=Math.min(N.length,3)-1-t,r=ce?t*58:t<3?t*6:18,i=ce?!0:t<3;return(0,$.jsx)(`div`,{style:{position:`absolute`,left:r,bottom:0,zIndex:t+1,transition:`all 0.28s cubic-bezier(0.4, 0, 0.2, 1)`,transform:ce?`scale(1) rotate(0deg)`:`scale(${t<3?1-n*.08:0}) rotate(${t<3?-3+t*1.5:0}deg)`,opacity:i?ce?1:1-n*.15:0,pointerEvents:i?`auto`:`none`},children:(0,$.jsxs)(`div`,{style:{position:`relative`,width:52,height:60},children:[e.type===`image`?(0,$.jsx)(`img`,{src:on(e.url),alt:e.name,onClick:()=>{Ne(e.url),Fe(`image`),Le(e.name),je(!0)},style:{width:52,height:60,objectFit:`cover`,borderRadius:10,cursor:`pointer`,border:`1px solid rgba(255,255,255,0.98)`,boxShadow:`0 4px 12px rgba(31,41,55,0.15)`}}):e.type===`video`?(0,$.jsx)(`video`,{src:on(e.url),muted:!0,onClick:()=>{Ne(e.url),Fe(`video`),Le(e.name),je(!0)},style:{width:52,height:60,objectFit:`cover`,borderRadius:10,cursor:`pointer`,border:`1px solid rgba(255,255,255,0.98)`,boxShadow:`0 4px 12px rgba(31,41,55,0.15)`}}):(0,$.jsx)(`div`,{onClick:t=>{t.stopPropagation(),Gt(e.url)},style:{width:52,height:60,objectFit:`cover`,borderRadius:10,cursor:`pointer`,border:`1px solid rgba(255,255,255,0.98)`,boxShadow:`0 4px 12px rgba(31,41,55,0.15)`,background:`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:ze===on(e.url)?(0,$.jsx)(G6,{style:{fontSize:20,color:`#fff`}}):(0,$.jsx)(J2,{style:{fontSize:20,color:`#fff`}})}),(0,$.jsx)(`button`,{onClick:()=>sn(t),style:{position:`absolute`,top:-6,right:-6,width:20,height:20,borderRadius:50,background:`#1f2937`,border:`none`,color:`#fff`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 2px 6px rgba(0,0,0,0.2)`,zIndex:10,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#dc2626`,e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.background=`#1f2937`,e.currentTarget.style.transform=`scale(1)`},children:(0,$.jsx)(k$,{style:{fontSize:10}})})]})},`stack-${t}`)})}),N.length>0&&(0,$.jsx)(G7,{accept:c===`image`?`image/*`:`image/*,video/*,audio/*`,onLocalSelect:Zt,onHistorySelect:tn,onPortraitLibrarySelect:e=>{rn(e)},uploading:R,tooltipTitle:c===`image`?`图片${N.filter(e=>e.type===`image`).length}/${I}`:`图片${N.filter(e=>e.type===`image`).length}/${I}, 视频${N.filter(e=>e.type===`video`).length}/${L}${Sn>0?`, - 音频${N.filter(e=>e.type===`audio`).length}/${Sn}`:``}`,maxImageCount:I,maxVideoCount:L,usedImageCount:N.filter(e=>e.type===`image`).length,usedVideoCount:N.filter(e=>e.type===`video`).length,usedVideoDuration:N.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0),maxVideoDuration:15,maxAudioCount:Sn>0?Sn:void 0,usedAudioCount:N.filter(e=>e.type===`audio`).length,maxAudioDuration:15,usedAudioDuration:N.filter(e=>e.type===`audio`).reduce((e,t)=>e+(t.duration||0),0),children:(0,$.jsx)(`div`,{style:{position:`absolute`,right:0,bottom:0,width:28,height:28,borderRadius:50,background:`#ffffff`,border:`1px solid rgba(231, 234, 240, 0.95)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s ease`,boxShadow:`0 2px 8px rgba(47, 52, 64, 0.08)`,zIndex:100},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#8b5cf6`,e.currentTarget.style.boxShadow=`0 4px 12px rgba(139, 92, 246, 0.2)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(231, 234, 240, 0.95)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.08)`},children:(0,$.jsx)(mL,{style:{fontSize:14,color:`#8b5cf6`,lineHeight:1}})})})]})})}),(0,$.jsx)(`div`,{style:{flex:1,minWidth:0},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6,padding:`0`,backgroundColor:`transparent`,borderRadius:0,border:`none`,boxShadow:`none`,transition:`all 0.2s ease`,position:`relative`,minHeight:_n?92:74},children:[(0,$.jsx)(Ooe,{ref:he,value:y,onChange:ln,onKeyDown:un,onPaste:e=>{let t=e.clipboardData?.items;if(!t)return;let n=[];for(let e=0;e0&&(e.preventDefault(),n.forEach(async e=>{await Yt(e)}))},placeholder:yn,autoSize:{minRows:3,maxRows:6},style:{width:`100%`,borderRadius:0,border:`none`,outline:`none`,boxShadow:`none`,fontSize:14,lineHeight:1.72,color:`#2f3440`,fontWeight:500,resize:`none`,backgroundColor:`transparent`,padding:10},disabled:B}),pe&&N.length>0&&H===`universal`&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:`100%`,left:10,marginBottom:8,zIndex:1e3,background:`#fff`,borderRadius:16,boxShadow:`0 18px 42px rgba(47, 52, 64, 0.12)`,border:`1px solid #E7EAF0`,padding:8,minWidth:160,maxHeight:260,overflowY:`auto`},children:N.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>dn(e.label),style:{padding:`8px 12px`,borderRadius:6,cursor:`pointer`,display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#2f3440`,transition:`all 0.15s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.08)`,e.currentTarget.style.color=`#8b5cf6`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`,e.currentTarget.style.color=`#2f3440`},children:[e.type===`image`?(0,$.jsx)(e8,{style:{fontSize:14,color:`#8b5cf6`}}):(0,$.jsx)(v5,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(`span`,{children:e.label})]},t))})]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:14,marginTop:10,paddingTop:13,borderTop:`1px solid rgba(231, 234, 240, 0.76)`},children:[(0,$.jsxs)(EH,{size:8,wrap:!0,style:{flex:1,minWidth:0},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{st(!1),Ze(!1),$e(!1),ie(!1),lt(e=>!e)},className:`image-settings-trigger`,style:{minWidth:118,padding:`5px 12px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[c===`video`?(0,$.jsx)(v5,{style:{fontSize:14,color:`#8b5cf6`}}):(0,$.jsx)(e8,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(u9,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:c===`video`?`视频生成`:`图片生成`}),(0,$.jsx)(mQ,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),ct&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:300,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:16,boxShadow:`0 20px 48px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(u9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475467`},children:`创作类型`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:[{value:`video`,label:`视频生成`,icon:v5},{value:`image`,label:`图片生成`,icon:e8}].map(e=>(0,$.jsxs)(`button`,{onClick:()=>{b(e.value),lt(!1),P([]),M(``)},style:{flex:1,minHeight:48,borderRadius:10,border:c===e.value?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:c===e.value?`#f5f3ff`:`#ffffff`,cursor:`pointer`,display:`flex`,alignItems:`center`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`,gap:8},children:[(0,$.jsx)(e.icon,{style:{fontSize:14,color:c===e.value?`#8b5cf6`:`#98a2b3`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:c===e.value?600:500,color:c===e.value?`#8b5cf6`:`#475467`},children:e.label})]},e.value))})]})})]}),(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{lt(!1),Ze(!1),$e(!1),ie(!1),st(e=>!e)},className:`image-settings-trigger`,style:{minWidth:174,padding:`5px 12px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(z8,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(u9,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:c===`image`?v.image?.find(e=>e.id===l)?.name:v.video?.find(e=>e.id===l)?.name||`选择引擎`}),(0,$.jsx)(mQ,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),ot&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:360,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:16,boxShadow:`0 20px 48px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(u9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475467`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:(c===`image`?v.image:v.video)?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{if(x(e.id),c===`video`&&(A({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)||O(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(g)||k(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(m)||D(e.supportedDurations?.[0]||5)),c===`image`){let t=e.supportedSizes||{},n=Object.keys(t).sort((e,t)=>{let n={"1K":0,"2K":1,"4K":2};return(n[e]||0)-(n[t]||0)}),r=n[0]||`2K`,i=Object.keys(t[r]||{});if(tt(i.map(e=>({value:e,label:e}))),at(t),rt(n.map(e=>{let t=e.match(/(\d+)K/);return{value:e,label:`${{1:`标清`,2:`高清`,4:`超清`}[t?parseInt(t[1]):1]||`高清`} ${e}`}})),t[r]&&t[r][i[0]]){let[e,n]=t[r][i[0]].split(/[×x]/);T(Number(e)),E(Number(n)),C(i[0]),w(r)}}st(!1)},style:{flex:1,minHeight:48,borderRadius:10,border:l===e.id?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:l===e.id?`#f5f3ff`:`#ffffff`,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:14,fontWeight:l===e.id?600:500,color:l===e.id?`#8b5cf6`:`#475467`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#98a2b3`}})]},e.id))})]})})]}),c===`video`&&(Ft||It)&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{lt(!1),st(!1),Ze(!1),$e(!1),ie(!re)},className:`image-settings-trigger`,style:{minWidth:118,padding:`6px 14px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(e8,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(u9,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:H===`universal`?`全能参考`:`首尾帧`}),(0,$.jsx)(mQ,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),re&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:300,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:16,boxShadow:`0 20px 48px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(u9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475467`},children:`参考模式`}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:[(0,$.jsxs)(`button`,{onClick:()=>{Lt(`universal`),ie(!1)},disabled:!It,style:{flex:1,minHeight:48,borderRadius:10,border:H===`universal`?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:H===`universal`?`#f5f3ff`:`#ffffff`,cursor:It?`pointer`:`not-allowed`,display:`flex`,alignItems:`center`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`,gap:8,opacity:It?1:.4},children:[(0,$.jsx)(e8,{style:{fontSize:14,color:H===`universal`?`#8b5cf6`:`#98a2b3`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:H===`universal`?600:500,color:H===`universal`?`#8b5cf6`:`#475467`},children:`全能参考`}),!It&&(0,$.jsx)(`span`,{style:{fontSize:10,color:`#98a2b3`,marginLeft:`auto`},children:`不支持`})]}),(0,$.jsxs)(`button`,{onClick:()=>{Lt(`first_last_frame`),ie(!1)},disabled:!Ft,style:{flex:1,minHeight:48,borderRadius:10,border:H===`first_last_frame`?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:H===`first_last_frame`?`#f5f3ff`:`#ffffff`,cursor:Ft?`pointer`:`not-allowed`,display:`flex`,alignItems:`center`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`,gap:8,opacity:Ft?1:.4},children:[(0,$.jsx)(aW,{style:{fontSize:14,color:H===`first_last_frame`?`#8b5cf6`:`#98a2b3`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:H===`first_last_frame`?600:500,color:H===`first_last_frame`?`#8b5cf6`:`#475467`},children:`首尾帧`}),!Ft&&(0,$.jsx)(`span`,{style:{fontSize:10,color:`#98a2b3`,marginLeft:`auto`},children:`不支持`})]})]})]})})]}),c===`image`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{lt(!1),st(!1),$e(!1),ie(!1),Ze(!Xe)},className:`image-settings-trigger`,style:{minWidth:156,padding:`6px 14px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(o6,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsxs)(u9,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:[u===`auto`?`智能`:u,` · `,d==`2K`?`2K高清`:`4K超清`,` · `,f,`×`,p]}),(0,$.jsx)(mQ,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),Xe&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:480,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:14,boxShadow:`0 18px 44px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(u9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:et.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{C(e.value),jt(e.label)},style:{flex:`0 0 calc(11.11% - 4px)`,minWidth:44,height:52,borderRadius:6,border:u===e.value?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:u===e.value?`#f5f3ff`:`#FFFFFF`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:(()=>{let[t,n]=e.value===`auto`?[1,1]:e.value.split(`:`).map(Number);return t>=n?18:Math.round(t/n*18)})(),height:(()=>{let[t,n]=e.value===`auto`?[1,1]:e.value.split(`:`).map(Number);return n>=t?18:Math.round(n/t*18)})(),border:`2px solid ${u===e.value?`#8b5cf6`:`#98a2b3`}`,borderRadius:2,marginBottom:2,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e.value===`auto`&&(0,$.jsx)(`span`,{style:{fontSize:7,color:u===e.value?`#8b5cf6`:`#98a2b3`},children:`智`})}),(0,$.jsx)(`span`,{style:{fontSize:9,color:u===e.value?`#8b5cf6`:`#667085`,fontWeight:u===e.value?600:400},children:e.value})]},e.value))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(u9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:nt.map(e=>(0,$.jsx)(`button`,{onClick:()=>{w(e.value),Mt(e.value)},style:{flex:1,height:42,borderRadius:6,border:d===e.value?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:d===e.value?`#8b5cf6`:`#FFFFFF`,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`:`#475467`},children:[e.value,e.value===`4K`&&(0,$.jsx)(`span`,{style:{marginLeft:2},children:`✨`})]})},e.value))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(u9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},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:`#98a2b3`,fontSize:11,marginRight:4},children:`W`}),(0,$.jsx)(tG,{value:f,onChange:e=>T(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #E7EAF0`,backgroundColor:`#FFFFFF`,fontSize:12,fontWeight:600,color:`#2f3440`}})]}),(0,$.jsx)(`button`,{onClick:Nt,style:{width:24,height:24,borderRadius:4,border:`1px solid #E7EAF0`,backgroundColor:`#fff`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:`#8b5cf6`},children:(0,$.jsx)(aW,{style:{fontSize:10}})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:120},children:[(0,$.jsx)(`span`,{style:{color:`#98a2b3`,fontSize:11,marginRight:4},children:`H`}),(0,$.jsx)(tG,{value:p,onChange:e=>E(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #E7EAF0`,backgroundColor:`#FFFFFF`,fontSize:12,fontWeight:600,color:`#2f3440`}})]}),(0,$.jsx)(`span`,{style:{color:`#98a2b3`,fontSize:11},children:`PX`})]})]})]})]}),c===`video`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{lt(!1),st(!1),Ze(!1),ie(!1),$e(!Qe)},className:`image-settings-trigger`,style:{minWidth:156,padding:`6px 14px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(o6,{style:{fontSize:14,color:`#2f3440`}}),(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:600,color:`#2f3440`},children:h}),(0,$.jsx)(`span`,{style:{width:1,height:14,background:`#E7EAF0`}}),(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:600,color:`#2f3440`},children:g?.toUpperCase?.()||g}),(0,$.jsx)(`span`,{style:{width:1,height:14,background:`#E7EAF0`}}),(0,$.jsxs)(`span`,{style:{fontSize:13,fontWeight:600,color:`#2f3440`},children:[m,`秒`]}),(0,$.jsx)(mQ,{style:{fontSize:10,color:`#667085`,marginLeft:`auto`}})]}),Qe&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:400,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:14,boxShadow:`0 18px 44px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(u9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:_.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>O(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:h===e?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:h===e?`#f5f3ff`:`#FFFFFF`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:(()=>{let[t,n]=e.split(`:`).map(Number);return t>=n?18:Math.round(t/n*18)})(),height:(()=>{let[t,n]=e.split(`:`).map(Number);return n>=t?18:Math.round(n/t*18)})(),border:`2px solid ${h===e?`#8b5cf6`:`#98a2b3`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:h===e?`#8b5cf6`:`#667085`,fontWeight:h===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(u9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},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:`#E7EAF0`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#8b5cf6`,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=>D(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:`#F6F7FA`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#667085`},children:m}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#98a2b3`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(u9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:_.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>k(e),style:{flex:1,height:42,borderRadius:6,border:g===e?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:g===e?`#8b5cf6`:`#FFFFFF`,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`:`#475467`},children:e})},e))})]})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,flexShrink:0},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,color:`#667085`,whiteSpace:`nowrap`,height:34,padding:`0 12px`,borderRadius:11,background:`rgba(255, 255, 255, 0.92)`,border:`1px solid rgba(231, 234, 240, 0.92)`,boxShadow:`0 4px 12px rgba(47, 52, 64, 0.04)`},children:[(0,$.jsx)(u9,{style:{fontSize:13,color:`#667085`,fontWeight:600},children:`预估积分:`}),(0,$.jsx)(u9,{style:{fontSize:13,color:`#2f3440`,fontWeight:800},children:gt()})]}),(0,$.jsx)(X,{type:`primary`,shape:`circle`,icon:(0,$.jsx)(G2,{}),onClick:Vt,disabled:!vn,loading:B,style:{flexShrink:0,width:36,height:36,borderRadius:`50%`,background:vn?`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`:`#E7EAF0`,color:`#ffffff`,opacity:vn?1:.86,boxShadow:vn?`0 10px 24px rgba(139, 92, 246, 0.28)`:`inset 0 0 0 1px rgba(139, 92, 246, 0.18)`,cursor:vn?`pointer`:`not-allowed`,transition:`all 0.2s ease`,border:`none`}})]})]})]})]})]}),(0,$.jsx)(`style`,{children:` + 音频${N.filter(e=>e.type===`audio`).length}/${Sn}`:``}`,maxImageCount:I,maxVideoCount:L,usedImageCount:N.filter(e=>e.type===`image`).length,usedVideoCount:N.filter(e=>e.type===`video`).length,usedVideoDuration:N.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0),maxVideoDuration:15,maxAudioCount:Sn>0?Sn:void 0,usedAudioCount:N.filter(e=>e.type===`audio`).length,maxAudioDuration:15,usedAudioDuration:N.filter(e=>e.type===`audio`).reduce((e,t)=>e+(t.duration||0),0),children:(0,$.jsx)(`div`,{style:{position:`absolute`,right:0,bottom:0,width:28,height:28,borderRadius:50,background:`#ffffff`,border:`1px solid rgba(231, 234, 240, 0.95)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s ease`,boxShadow:`0 2px 8px rgba(47, 52, 64, 0.08)`,zIndex:100},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#8b5cf6`,e.currentTarget.style.boxShadow=`0 4px 12px rgba(139, 92, 246, 0.2)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(231, 234, 240, 0.95)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.08)`},children:(0,$.jsx)(mL,{style:{fontSize:14,color:`#8b5cf6`,lineHeight:1}})})})]})})}),(0,$.jsx)(`div`,{style:{flex:1,minWidth:0},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6,padding:`0`,backgroundColor:`transparent`,borderRadius:0,border:`none`,boxShadow:`none`,transition:`all 0.2s ease`,position:`relative`,minHeight:_n?92:74},children:[(0,$.jsx)(koe,{ref:he,value:y,onChange:ln,onKeyDown:un,onPaste:e=>{let t=e.clipboardData?.items;if(!t)return;let n=[];for(let e=0;e0&&(e.preventDefault(),n.forEach(async e=>{await Yt(e)}))},placeholder:yn,autoSize:{minRows:3,maxRows:6},style:{width:`100%`,borderRadius:0,border:`none`,outline:`none`,boxShadow:`none`,fontSize:14,lineHeight:1.72,color:`#2f3440`,fontWeight:500,resize:`none`,backgroundColor:`transparent`,padding:10},disabled:B}),pe&&N.length>0&&H===`universal`&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:`100%`,left:10,marginBottom:8,zIndex:1e3,background:`#fff`,borderRadius:16,boxShadow:`0 18px 42px rgba(47, 52, 64, 0.12)`,border:`1px solid #E7EAF0`,padding:8,minWidth:160,maxHeight:260,overflowY:`auto`},children:N.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>dn(e.label),style:{padding:`8px 12px`,borderRadius:6,cursor:`pointer`,display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#2f3440`,transition:`all 0.15s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.08)`,e.currentTarget.style.color=`#8b5cf6`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`,e.currentTarget.style.color=`#2f3440`},children:[e.type===`image`?(0,$.jsx)(e8,{style:{fontSize:14,color:`#8b5cf6`}}):(0,$.jsx)(v5,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(`span`,{children:e.label})]},t))})]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:14,marginTop:10,paddingTop:13,borderTop:`1px solid rgba(231, 234, 240, 0.76)`},children:[(0,$.jsxs)(EH,{size:8,wrap:!0,style:{flex:1,minWidth:0},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{st(!1),Ze(!1),$e(!1),ie(!1),lt(e=>!e)},className:`image-settings-trigger`,style:{minWidth:118,padding:`5px 12px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[c===`video`?(0,$.jsx)(v5,{style:{fontSize:14,color:`#8b5cf6`}}):(0,$.jsx)(e8,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(l9,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:c===`video`?`视频生成`:`图片生成`}),(0,$.jsx)(mQ,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),ct&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:300,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:16,boxShadow:`0 20px 48px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(l9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475467`},children:`创作类型`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:[{value:`video`,label:`视频生成`,icon:v5},{value:`image`,label:`图片生成`,icon:e8}].map(e=>(0,$.jsxs)(`button`,{onClick:()=>{b(e.value),lt(!1),P([]),M(``)},style:{flex:1,minHeight:48,borderRadius:10,border:c===e.value?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:c===e.value?`#f5f3ff`:`#ffffff`,cursor:`pointer`,display:`flex`,alignItems:`center`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`,gap:8},children:[(0,$.jsx)(e.icon,{style:{fontSize:14,color:c===e.value?`#8b5cf6`:`#98a2b3`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:c===e.value?600:500,color:c===e.value?`#8b5cf6`:`#475467`},children:e.label})]},e.value))})]})})]}),(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{lt(!1),Ze(!1),$e(!1),ie(!1),st(e=>!e)},className:`image-settings-trigger`,style:{minWidth:174,padding:`5px 12px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(z8,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(l9,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:c===`image`?v.image?.find(e=>e.id===l)?.name:v.video?.find(e=>e.id===l)?.name||`选择引擎`}),(0,$.jsx)(mQ,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),ot&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:360,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:16,boxShadow:`0 20px 48px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(l9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475467`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:(c===`image`?v.image:v.video)?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{if(x(e.id),c===`video`&&(A({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)||O(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(g)||k(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(m)||D(e.supportedDurations?.[0]||5)),c===`image`){let t=e.supportedSizes||{},n=Object.keys(t).sort((e,t)=>{let n={"1K":0,"2K":1,"4K":2};return(n[e]||0)-(n[t]||0)}),r=n[0]||`2K`,i=Object.keys(t[r]||{});if(tt(i.map(e=>({value:e,label:e}))),at(t),rt(n.map(e=>{let t=e.match(/(\d+)K/);return{value:e,label:`${{1:`标清`,2:`高清`,4:`超清`}[t?parseInt(t[1]):1]||`高清`} ${e}`}})),t[r]&&t[r][i[0]]){let[e,n]=t[r][i[0]].split(/[×x]/);T(Number(e)),E(Number(n)),C(i[0]),w(r)}}st(!1)},style:{flex:1,minHeight:48,borderRadius:10,border:l===e.id?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:l===e.id?`#f5f3ff`:`#ffffff`,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:14,fontWeight:l===e.id?600:500,color:l===e.id?`#8b5cf6`:`#475467`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#98a2b3`}})]},e.id))})]})})]}),c===`video`&&(Ft||It)&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{lt(!1),st(!1),Ze(!1),$e(!1),ie(!re)},className:`image-settings-trigger`,style:{minWidth:118,padding:`6px 14px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(e8,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(l9,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:H===`universal`?`全能参考`:`首尾帧`}),(0,$.jsx)(mQ,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),re&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:300,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:16,boxShadow:`0 20px 48px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(l9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475467`},children:`参考模式`}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:[(0,$.jsxs)(`button`,{onClick:()=>{Lt(`universal`),ie(!1)},disabled:!It,style:{flex:1,minHeight:48,borderRadius:10,border:H===`universal`?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:H===`universal`?`#f5f3ff`:`#ffffff`,cursor:It?`pointer`:`not-allowed`,display:`flex`,alignItems:`center`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`,gap:8,opacity:It?1:.4},children:[(0,$.jsx)(e8,{style:{fontSize:14,color:H===`universal`?`#8b5cf6`:`#98a2b3`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:H===`universal`?600:500,color:H===`universal`?`#8b5cf6`:`#475467`},children:`全能参考`}),!It&&(0,$.jsx)(`span`,{style:{fontSize:10,color:`#98a2b3`,marginLeft:`auto`},children:`不支持`})]}),(0,$.jsxs)(`button`,{onClick:()=>{Lt(`first_last_frame`),ie(!1)},disabled:!Ft,style:{flex:1,minHeight:48,borderRadius:10,border:H===`first_last_frame`?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:H===`first_last_frame`?`#f5f3ff`:`#ffffff`,cursor:Ft?`pointer`:`not-allowed`,display:`flex`,alignItems:`center`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`,gap:8,opacity:Ft?1:.4},children:[(0,$.jsx)(aW,{style:{fontSize:14,color:H===`first_last_frame`?`#8b5cf6`:`#98a2b3`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:H===`first_last_frame`?600:500,color:H===`first_last_frame`?`#8b5cf6`:`#475467`},children:`首尾帧`}),!Ft&&(0,$.jsx)(`span`,{style:{fontSize:10,color:`#98a2b3`,marginLeft:`auto`},children:`不支持`})]})]})]})})]}),c===`image`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{lt(!1),st(!1),$e(!1),ie(!1),Ze(!Xe)},className:`image-settings-trigger`,style:{minWidth:156,padding:`6px 14px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(o6,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsxs)(l9,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:[u===`auto`?`智能`:u,` · `,d==`2K`?`2K高清`:`4K超清`,` · `,f,`×`,p]}),(0,$.jsx)(mQ,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),Xe&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:480,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:14,boxShadow:`0 18px 44px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(l9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:et.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{C(e.value),jt(e.label)},style:{flex:`0 0 calc(11.11% - 4px)`,minWidth:44,height:52,borderRadius:6,border:u===e.value?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:u===e.value?`#f5f3ff`:`#FFFFFF`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:(()=>{let[t,n]=e.value===`auto`?[1,1]:e.value.split(`:`).map(Number);return t>=n?18:Math.round(t/n*18)})(),height:(()=>{let[t,n]=e.value===`auto`?[1,1]:e.value.split(`:`).map(Number);return n>=t?18:Math.round(n/t*18)})(),border:`2px solid ${u===e.value?`#8b5cf6`:`#98a2b3`}`,borderRadius:2,marginBottom:2,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e.value===`auto`&&(0,$.jsx)(`span`,{style:{fontSize:7,color:u===e.value?`#8b5cf6`:`#98a2b3`},children:`智`})}),(0,$.jsx)(`span`,{style:{fontSize:9,color:u===e.value?`#8b5cf6`:`#667085`,fontWeight:u===e.value?600:400},children:e.value})]},e.value))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(l9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:nt.map(e=>(0,$.jsx)(`button`,{onClick:()=>{w(e.value),Mt(e.value)},style:{flex:1,height:42,borderRadius:6,border:d===e.value?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:d===e.value?`#8b5cf6`:`#FFFFFF`,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`:`#475467`},children:[e.value,e.value===`4K`&&(0,$.jsx)(`span`,{style:{marginLeft:2},children:`✨`})]})},e.value))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(l9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},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:`#98a2b3`,fontSize:11,marginRight:4},children:`W`}),(0,$.jsx)(tG,{value:f,onChange:e=>T(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #E7EAF0`,backgroundColor:`#FFFFFF`,fontSize:12,fontWeight:600,color:`#2f3440`}})]}),(0,$.jsx)(`button`,{onClick:Nt,style:{width:24,height:24,borderRadius:4,border:`1px solid #E7EAF0`,backgroundColor:`#fff`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:`#8b5cf6`},children:(0,$.jsx)(aW,{style:{fontSize:10}})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:120},children:[(0,$.jsx)(`span`,{style:{color:`#98a2b3`,fontSize:11,marginRight:4},children:`H`}),(0,$.jsx)(tG,{value:p,onChange:e=>E(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #E7EAF0`,backgroundColor:`#FFFFFF`,fontSize:12,fontWeight:600,color:`#2f3440`}})]}),(0,$.jsx)(`span`,{style:{color:`#98a2b3`,fontSize:11},children:`PX`})]})]})]})]}),c===`video`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{lt(!1),st(!1),Ze(!1),ie(!1),$e(!Qe)},className:`image-settings-trigger`,style:{minWidth:156,padding:`6px 14px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(o6,{style:{fontSize:14,color:`#2f3440`}}),(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:600,color:`#2f3440`},children:h}),(0,$.jsx)(`span`,{style:{width:1,height:14,background:`#E7EAF0`}}),(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:600,color:`#2f3440`},children:g?.toUpperCase?.()||g}),(0,$.jsx)(`span`,{style:{width:1,height:14,background:`#E7EAF0`}}),(0,$.jsxs)(`span`,{style:{fontSize:13,fontWeight:600,color:`#2f3440`},children:[m,`秒`]}),(0,$.jsx)(mQ,{style:{fontSize:10,color:`#667085`,marginLeft:`auto`}})]}),Qe&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:400,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:14,boxShadow:`0 18px 44px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(l9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:_.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>O(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:h===e?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:h===e?`#f5f3ff`:`#FFFFFF`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:(()=>{let[t,n]=e.split(`:`).map(Number);return t>=n?18:Math.round(t/n*18)})(),height:(()=>{let[t,n]=e.split(`:`).map(Number);return n>=t?18:Math.round(n/t*18)})(),border:`2px solid ${h===e?`#8b5cf6`:`#98a2b3`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:h===e?`#8b5cf6`:`#667085`,fontWeight:h===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(l9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},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:`#E7EAF0`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#8b5cf6`,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=>D(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:`#F6F7FA`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#667085`},children:m}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#98a2b3`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(l9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:_.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>k(e),style:{flex:1,height:42,borderRadius:6,border:g===e?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:g===e?`#8b5cf6`:`#FFFFFF`,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`:`#475467`},children:e})},e))})]})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,flexShrink:0},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,color:`#667085`,whiteSpace:`nowrap`,height:34,padding:`0 12px`,borderRadius:11,background:`rgba(255, 255, 255, 0.92)`,border:`1px solid rgba(231, 234, 240, 0.92)`,boxShadow:`0 4px 12px rgba(47, 52, 64, 0.04)`},children:[(0,$.jsx)(l9,{style:{fontSize:13,color:`#667085`,fontWeight:600},children:`预估积分:`}),(0,$.jsx)(l9,{style:{fontSize:13,color:`#2f3440`,fontWeight:800},children:gt()})]}),(0,$.jsx)(X,{type:`primary`,shape:`circle`,icon:(0,$.jsx)(G2,{}),onClick:Vt,disabled:!vn,loading:B,style:{flexShrink:0,width:36,height:36,borderRadius:`50%`,background:vn?`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`:`#E7EAF0`,color:`#ffffff`,opacity:vn?1:.86,boxShadow:vn?`0 10px 24px rgba(139, 92, 246, 0.28)`:`inset 0 0 0 1px rgba(139, 92, 246, 0.18)`,cursor:vn?`pointer`:`not-allowed`,transition:`all 0.2s ease`,border:`none`}})]})]})]})]})]}),(0,$.jsx)(`style`,{children:` .ai-create-page { --ai-accent: #8b5cf6; @@ -472,22 +472,22 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } } - `}),(0,$.jsx)(NK,{open:ye,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #8b5cf6 0%, #ddd6fe 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`预览`})]}),onCancel:fn,width:800,footer:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,borderTop:`1px solid rgba(139, 92, 246, 0.08)`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(M0,{}),onClick:pn,style:{borderRadius:10,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,border:`none`,boxShadow:`0 8px 18px rgba(47, 52, 64, 0.15)`},disabled:ke(xe),children:ke(xe)?`资源已过期`:`下载`})}),centered:!0,style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(139, 92, 246, 0.08)`,padding:`16px 24px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:ke(xe)?(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:`40px`},children:(0,$.jsx)(`p`,{style:{fontSize:16,color:`#A45B5B`,marginBottom:16},children:`图片/视频资源已过期,请刷新重新加载~`})}):Ce===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${xe}&w=300&q=50`,alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:Te,src:`http://ceshi.apiforeign.minzhong.cn${xe}`,controls:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})}),(0,$.jsx)(NK,{open:Ae,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #8b5cf6 0%, #ddd6fe 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`附件预览`})]}),onCancel:()=>{if(Re.current){let e=Re.current;e.pause(),e.muted=!0,e.currentTime=0}je(!1)},afterClose:()=>{if(Re.current){let e=Re.current;e.pause(),e.muted=!0}},width:800,footer:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,borderTop:`1px solid rgba(139, 92, 246, 0.08)`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(M0,{}),onClick:()=>{if(!Me)return;let e=document.createElement(`a`);e.href=`http://ceshi.apiforeign.minzhong.cn${Me}&download=1`,e.download=Ie||(Pe===`image`?`image.png`:`video.mp4`),document.body.appendChild(e),e.click(),document.body.removeChild(e)},style:{borderRadius:10,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,border:`none`,boxShadow:`0 8px 18px rgba(47, 52, 64, 0.15)`},children:`下载`})}),centered:!0,style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(139, 92, 246, 0.08)`,padding:`16px 24px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:Pe===`image`?(0,$.jsx)(`img`,{src:on(Me),alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:Re,src:on(Me),controls:!0,playsInline:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})}),(0,$.jsx)(W7,{open:ae,libraryType:oe,onClose:()=>q(!1),onSelect:an,selectedIds:N.map(e=>e.private_asset_id).filter(Boolean),maxCount:Math.max(1,bn+xn),maxImageCount:I,maxVideoCount:L,usedImageCount:N.filter(e=>e.type===`image`).length,usedVideoCount:N.filter(e=>e.type===`video`).length,usedVideoDuration:N.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0),maxVideoDuration:15,accept:c===`image`?`image/*`:`image/*,video/*`})]})},{Header:joe,Content:Moe}=uG,{TextArea:Noe}=tG,Poe=`http://ceshi.apiforeign.minzhong.cn`,d9=e=>e?/^https?:\/\//i.test(e)||e.startsWith(`blob:`)?e:`${Poe}${e}`:``,Foe=()=>{let e=Ye(),[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)(``),[M,N]=(0,S.useState)(null),[P,F]=(0,S.useState)(null),[I,L]=(0,S.useState)(``),[R,z]=(0,S.useState)(``),[B,V]=(0,S.useState)(!1),[H,U]=(0,S.useState)(!1),[W,ee]=(0,S.useState)(!1),G=(0,S.useRef)(null),te=(0,S.useRef)(null),ne=(e,t,n=!1)=>{a7(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&&!G.current?G.current=setInterval(()=>{ne(p,h,!0)},5e3):!t&&G.current&&(clearInterval(G.current),G.current=null)}e.total!==void 0&&v(e.total)}).catch(e=>{})},K=e=>{m(e),ne(e,h)},re=(e,t,i=!1,o)=>{a7(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&&!te.current?te.current=setInterval(()=>{re(r,a,!0,l)},5e3):!t&&te.current&&(clearInterval(te.current),te.current=null)}e.total!==void 0&&c(e.total)}).catch(e=>{})};(0,S.useEffect)(()=>(re(r,a),ne(p,h),()=>{G.current&&=(clearInterval(G.current),null),te.current&&=(clearInterval(te.current),null)}),[]);let ie=(e,t)=>{i(e),o(t),re(e,t,!1,l)},ae=()=>{i(1),re(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)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`16px 24px`,borderRadius:16,paddingBottom:0,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16,paddingBottom:12},children:(0,$.jsxs)(`div`,{children:[(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)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`上传参考视频与产品图片,一键复刻爆款视频开头`})]})}),(0,$.jsx)(X,{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:()=>ee(!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)(v5,{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)(NK,{open:ye,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #8b5cf6 0%, #ddd6fe 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`预览`})]}),onCancel:fn,width:800,footer:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,borderTop:`1px solid rgba(139, 92, 246, 0.08)`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(M0,{}),onClick:pn,style:{borderRadius:10,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,border:`none`,boxShadow:`0 8px 18px rgba(47, 52, 64, 0.15)`},disabled:ke(xe),children:ke(xe)?`资源已过期`:`下载`})}),centered:!0,style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(139, 92, 246, 0.08)`,padding:`16px 24px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:ke(xe)?(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:`40px`},children:(0,$.jsx)(`p`,{style:{fontSize:16,color:`#A45B5B`,marginBottom:16},children:`图片/视频资源已过期,请刷新重新加载~`})}):Ce===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${xe}&w=300&q=50`,alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:Te,src:`http://ceshi.apiforeign.minzhong.cn${xe}`,controls:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})}),(0,$.jsx)(NK,{open:Ae,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #8b5cf6 0%, #ddd6fe 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`附件预览`})]}),onCancel:()=>{if(Re.current){let e=Re.current;e.pause(),e.muted=!0,e.currentTime=0}je(!1)},afterClose:()=>{if(Re.current){let e=Re.current;e.pause(),e.muted=!0}},width:800,footer:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,borderTop:`1px solid rgba(139, 92, 246, 0.08)`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(M0,{}),onClick:()=>{if(!Me)return;let e=document.createElement(`a`);e.href=`http://ceshi.apiforeign.minzhong.cn${Me}&download=1`,e.download=Ie||(Pe===`image`?`image.png`:`video.mp4`),document.body.appendChild(e),e.click(),document.body.removeChild(e)},style:{borderRadius:10,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,border:`none`,boxShadow:`0 8px 18px rgba(47, 52, 64, 0.15)`},children:`下载`})}),centered:!0,style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(139, 92, 246, 0.08)`,padding:`16px 24px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:Pe===`image`?(0,$.jsx)(`img`,{src:on(Me),alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:Re,src:on(Me),controls:!0,playsInline:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})}),(0,$.jsx)(U7,{open:ae,libraryType:oe,onClose:()=>q(!1),onSelect:an,selectedIds:N.map(e=>e.private_asset_id).filter(Boolean),maxCount:Math.max(1,bn+xn),maxImageCount:I,maxVideoCount:L,usedImageCount:N.filter(e=>e.type===`image`).length,usedVideoCount:N.filter(e=>e.type===`video`).length,usedVideoDuration:N.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0),maxVideoDuration:15,accept:c===`image`?`image/*`:`image/*,video/*`})]})},{Header:Moe,Content:Noe}=uG,{TextArea:Poe}=tG,Foe=`http://ceshi.apiforeign.minzhong.cn`,u9=e=>e?/^https?:\/\//i.test(e)||e.startsWith(`blob:`)?e:`${Foe}${e}`:``,Ioe=()=>{let e=Ye(),[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)(``),[M,N]=(0,S.useState)(null),[P,F]=(0,S.useState)(null),[I,L]=(0,S.useState)(``),[R,z]=(0,S.useState)(``),[B,V]=(0,S.useState)(!1),[H,U]=(0,S.useState)(!1),[W,ee]=(0,S.useState)(!1),G=(0,S.useRef)(null),te=(0,S.useRef)(null),ne=(e,t,n=!1)=>{a7(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&&!G.current?G.current=setInterval(()=>{ne(p,h,!0)},5e3):!t&&G.current&&(clearInterval(G.current),G.current=null)}e.total!==void 0&&v(e.total)}).catch(e=>{})},K=e=>{m(e),ne(e,h)},re=(e,t,i=!1,o)=>{a7(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&&!te.current?te.current=setInterval(()=>{re(r,a,!0,l)},5e3):!t&&te.current&&(clearInterval(te.current),te.current=null)}e.total!==void 0&&c(e.total)}).catch(e=>{})};(0,S.useEffect)(()=>(re(r,a),ne(p,h),()=>{G.current&&=(clearInterval(G.current),null),te.current&&=(clearInterval(te.current),null)}),[]);let ie=(e,t)=>{i(e),o(t),re(e,t,!1,l)},ae=()=>{i(1),re(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)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`16px 24px`,borderRadius:16,paddingBottom:0,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16,paddingBottom:12},children:(0,$.jsxs)(`div`,{children:[(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)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`上传参考视频与产品图片,一键复刻爆款视频开头`})]})}),(0,$.jsx)(X,{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:()=>ee(!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)(v5,{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)(VG,{current:p,pageSize:h,total:_,onChange:K,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)(v5,{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:d9(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)(v5,{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)(R0,{style:{width:`100%`},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}V(!0);try{let r=await lie(e,t.duration);D(e),k(r.url),j(r.resource_id||``),N(t.duration),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{V(!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:B?(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)(v5,{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:`上传产品图片`}),I?(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`img`,{src:d9(I),alt:`产品图片`,style:{width:`100%`,borderRadius:12,maxHeight:200,objectFit:`contain`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`}}),(0,$.jsx)(`button`,{onClick:()=>{I&&URL.revokeObjectURL(I),F(null),L(``)},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)(e8,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#475569`},children:P?.name}),(0,$.jsxs)(`span`,{style:{fontSize:11,color:`#94a3b8`},children:[`(`,P?.size?(P.size/1024/1024).toFixed(2):0,`MB)`]})]})]}):(0,$.jsx)(R0,{style:{width:`100%`},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),U(!0);try{let t=await cie(e);F(e),L(t.url),z(t.resource_id||``),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{U(!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:H?(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)(e8,{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)(tG,{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)(tG,{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)(Noe,{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)(X,{type:`primary`,block:!0,size:`large`,onClick:()=>{if(!O){Z.warning(`请上传复刻视频`);return}if(!I){Z.warning(`请上传产品图片`);return}if(!y.trim()){Z.warning(`请输入原视频产品名称`);return}if(!x.trim()){Z.warning(`请输入自有产品名称`);return}if(!w.trim()){Z.warning(`请输入产品卖点`);return}Eie({material_video_url:O,material_image_url:I,material_video_resource_id:A||void 0,material_image_resource_id:R||void 0,material_video_duration_seconds:M||void 0,source_project_name:y,target_project_name:x,core_content_point:w,idempotency_key:Date.now().toString()}).then(t=>{let r=``,i=``;k(``),j(``),N(null),L(``),z(``),b(``),C(``),T(``),ne(1,8),a7(1,20).then(t=>{if(t.items){let a=t.items[0].id;n(t.items),o7(t.items[0].id).then(t=>{r=t.id,i=t.steps[0].id,Die(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)(NK,{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:W,onCancel:()=>ee(!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)(tG,{placeholder:`搜索产品名称`,value:l,onChange:e=>u(e.target.value),onPressEnter:ae,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)(X,{type:`primary`,onClick:ae,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)(n$,{columns:[{title:`产品名称`,dataIndex:`targetProjectName`,key:`targetProjectName`,align:`center`,width:100,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:220,render:(t,n)=>(0,$.jsxs)(EH,{children:[(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:`查看详情`}),(0,$.jsx)(LK,{title:`确认删除这个爆款开头复刻任务吗?`,onConfirm:async()=>{try{await Jie(n.id),Z.success(`删除成功`),re(1,a,!1,l)}catch{Z.error(`删除失败`)}},children:(0,$.jsx)(`button`,{style:{color:`#ef4444`,textDecoration:`none`,fontSize:13,border:`none`,background:`rgba(239, 68, 68, 0.08)`,padding:`4px 12px`,borderRadius:8,cursor:`pointer`,transition:`all 0.2s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.12)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.08)`},children:`删除`})})]})}],dataSource:t,rowKey:`id`,pagination:{current:r,pageSize:a,total:s,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:ie,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 f9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function p9(e,...t){for(let n of t){let t=e[n];if(t!=null&&String(t).trim()!==``)return String(t)}return``}function m9(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 Ioe(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 h9(e){if(!f9(e))return null;let t=p9(e,`key`);return t?{key:t,label:p9(e,`label`)||t,type:p9(e,`type`)||void 0,enabled:m9(e,!0,`enabled`),editable:m9(e,!0,`editable`),maxLength:Ioe(e,`maxLength`,`max_length`)}:null}function g9(e){if(!f9(e))return null;let t=e.data;return f9(t)?t:Array.isArray(e.sections)?e:null}function Loe(e){return!!g9(e)}function _9(e){let t=g9(e);return(Array.isArray(t?.sections)?t.sections:[]).map(e=>{let t=h9(e);if(!t||!f9(e))return null;let n=Array.isArray(e.children)?e.children.map(h9).filter(Boolean):[],r=Array.isArray(e.itemFields)?e.itemFields.map(h9).filter(Boolean):Array.isArray(e.item_fields)?e.item_fields.map(h9).filter(Boolean):[];return{...t,contentKey:p9(e,`contentKey`,`content_key`)||void 0,children:n,itemFields:r}}).filter(e=>!!e&&e.enabled)}function v9(e){if(e==null)return``;if(typeof e==`object`)try{return JSON.stringify(e,null,2)}catch{return String(e)}return String(e)}function y9(e){let t=v9(e);return t.length>40||t.includes(` -`)||t.includes(`,`)||t.includes(`。`)||t.includes(`;`)||t.includes(`;`)}function b9(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function x9(e,t,n,r){let i=b9(e||{});return f9(i[t])||(i[t]={}),i[t][n]=r,i}function S9(e,t,n,r,i){let a=b9(e||{});return Array.isArray(a[t])||(a[t]=[]),f9(a[t][n])||(a[t][n]={}),a[t][n][r]=i,a}function C9(e,t){if(!f9(e))return`视频提示词不能为空`;let n=_9(t);if(!n.length)return`视频提词配置缺失,无法保存`;for(let t of n){if(!t.editable)continue;let n=e[t.key];if(t.type===`object`){if(!f9(n))continue;for(let e of t.children)if(!(!e.enabled||!e.editable||!e.maxLength)&&v9(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&&v9(n).length>t.maxLength)return`字段【${t.label}】长度不能超过 ${t.maxLength} 个字符`}return null}var{Text:w9}=Q,{TextArea:T9}=tG;function E9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function D9({value:e}){let t=e===`true`?`是`:e===`false`?`否`:v9(e);return y9(e)?(0,$.jsx)(T9,{value:t,rows:Math.min(6,Math.max(2,Math.ceil(t.length/42))),disabled:!0,style:{borderRadius:8,color:`#64748b`}}):(0,$.jsx)(tG,{value:t,disabled:!0,style:{borderRadius:8,color:`#64748b`}})}function O9({value:e,maxLength:t,onChange:n}){let r=v9(e),i={value:r,maxLength:t,showCount:!!t,onChange:e=>n(e.target.value),style:{borderRadius:8}};return y9(e)?(0,$.jsx)(T9,{...i,rows:Math.min(8,Math.max(3,Math.ceil(r.length/42)))}):(0,$.jsx)(tG,{...i})}function k9({value:e,onChange:t}){let n=e===!0||e===`true`;return(0,$.jsxs)(HI.Group,{value:n,onChange:e=>t(e.target.value),style:{display:`flex`,gap:24},children:[(0,$.jsx)(HI,{value:!0,style:{fontSize:14,color:`#475569`},children:`是`}),(0,$.jsx)(HI,{value:!1,style:{fontSize:14,color:`#475569`},children:`否`})]})}var A9=({value:e,schemaConfigSnapshot:t,onChange:n})=>{let r=E9(e)?e:{},i=_9(t);if(!Loe(t))return(0,$.jsxs)(EH,{direction:`vertical`,size:12,style:{width:`100%`},children:[(0,$.jsx)(Jf,{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)(Jf,{type:`warning`,showIcon:!0,message:`视频提词配置为空`,description:`当前 Schema 配置没有可展示字段。`});let a=e=>{let t=E9(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)(EH,{style:{marginBottom:8},children:(0,$.jsx)(w9,{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)(EH,{style:{marginBottom:4},children:(0,$.jsx)(w9,{style:{color:`#64748b`,fontSize:12},children:i.label})}),i.editable?i.type===`boolean`?(0,$.jsx)(k9,{value:t[i.key],onChange:t=>n(x9(r,e.key,i.key,t))}):(0,$.jsx)(O9,{value:t[i.key],maxLength:i.maxLength,onChange:t=>n(x9(r,e.key,i.key,t))}):(0,$.jsx)(D9,{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)(EH,{style:{marginBottom:8},children:[(0,$.jsx)(w9,{strong:!0,style:{color:`#334155`,fontSize:13},children:e.label}),(0,$.jsx)(h$,{color:`default`,children:`锁定条目和时间段`})]}),(0,$.jsx)(`div`,{style:{border:`1px solid #e5e7eb`,borderRadius:10,padding:12,background:`#fff`},children:t.length===0?(0,$.jsx)(w9,{style:{color:`#94a3b8`,fontSize:12},children:`暂无内容`}):t.map((a,o)=>{let s=E9(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)(w9,{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)(EH,{style:{marginBottom:4},children:(0,$.jsx)(w9,{style:{color:`#64748b`,fontSize:12},children:t.label})}),t.editable?t.type===`boolean`?(0,$.jsx)(k9,{value:s[t.key],onChange:i=>n(S9(r,e.key,o,t.key,i))}):(0,$.jsx)(O9,{value:s[t.key],maxLength:t.maxLength,onChange:i=>n(S9(r,e.key,o,t.key,i))}):(0,$.jsx)(D9,{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)(EH,{style:{marginBottom:8},children:(0,$.jsx)(w9,{strong:!0,style:{color:`#334155`,fontSize:13},children:e.label})}),e.editable?(0,$.jsx)(O9,{value:r[e.key],maxLength:e.maxLength,onChange:t=>{let i=b9(r);i[e.key]=t,n(i)}}):(0,$.jsx)(D9,{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:Roe,Text:j9}=Q,{TextArea:zoe}=tG;function Boe(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function Voe(){let e=Ye(),{creatID:t}=$e(),[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)(``),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)(5),[N,P]=(0,S.useState)(`16:9`),[F,I]=(0,S.useState)(`480p`),[L,R]=(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]}),[z,B]=(0,S.useState)([]),[V,H]=(0,S.useState)(1),[U,W]=(0,S.useState)(20),[ee,G]=(0,S.useState)(0),[te,ne]=(0,S.useState)(``),[K,re]=(0,S.useState)({}),[ie,ae]=(0,S.useState)([]),[q,oe]=(0,S.useState)([]),[se,ce]=(0,S.useState)(!1),[le,ue]=(0,S.useState)(``),[de,fe]=(0,S.useState)(`image`),pe=S.useRef(null);(0,S.useEffect)(()=>{if(se&&de===`video`){let e=()=>{pe.current&&pe.current.play().catch(()=>{})};pe.current&&(pe.current.readyState>=2?e():pe.current.addEventListener(`loadedmetadata`,e));let t=setTimeout(e,300);return()=>{clearTimeout(t),pe.current&&(pe.current.removeEventListener(`loadedmetadata`,e),pe.current.pause())}}else pe.current&&pe.current.pause()},[se,de]);let me=(e,t)=>{console.log(e,t),ue(e),fe(t),ce(!0)},he=()=>{ce(!1),ue(``),pe.current&&pe.current.pause()},ge=e=>{if(e.preventDefault(),e.stopPropagation(),!le)return;let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${le}&download=1`,t.download=de===`image`?`image.png`:`video.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},_e=[{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:ie[t]?.status||``,id:ie[t]?.id||t,output:ie[t]?.output||``,engineId:ie[t]?.input?.payload?.videoConfig?.engineId||``}));(0,S.useEffect)(()=>{let e=new Set;q.forEach(t=>{let n=_e.find(e=>String(e.childId)===t);n&&(n.status===`completed`||n.status===`failed`)&&e.add(t)});for(let t=_e.length-1;t>=0;t--)if(_e[t].status===`completed`||_e[t].status===`failed`){e.add(String(_e[t].childId));break}e.size>0?oe(Array.from(e)):oe([])},[ie]);let ve=(e,t,n)=>{a7(e,t,n).then(e=>{e.items&&B(e.items),e.total!==void 0&&G(e.total)}).catch(e=>{})},ye=(e,t)=>{H(e),W(t),ve(e,t,te)},be=()=>{H(1),ve(1,U,te)};(0,S.useEffect)(()=>{ve(V,U)},[]),(0,S.useEffect)(()=>{n7().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];R({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]})}e.engine?.image&&e.engine.image.length>0&&E(e.engine.image[0].id)}).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`)&&(O(!1),A(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,S.useEffect)(()=>{t&&o7(t).then(e=>{re(e),e.steps&&ae(e.steps)}).catch(e=>{})},[t]),(0,S.useEffect)(()=>{let e=_e[4];e&&e.status!==`completed`&&e.status!==`failed`?v||y(setInterval(Ce,15e3)):e&&v&&(clearInterval(v),y(null))},[_e]);let xe=(e,t,n,i)=>{l(t||`image`),h(n?String(n):``),t===`video`?(p(i||null),d(e&&typeof e==`object`?Boe(e):{}),a(``)):(p(null),a(e||``),d({})),r(!0)},Se=async()=>{if(c===`image`){if(!K?.id||!m){Z.warning(`缺少任务或步骤 ID,无法保存图片提示词`);return}if(!i||!i.trim()){Z.warning(`图片提示词不能为空`);return}_(!0);try{await Oie(K.id,m,{prompt:i.trim()}),Z.success(`图片提示词已保存`),we(),r(!1),h(``)}catch(e){Z.error(e?.message||`保存图片提示词失败`)}finally{_(!1)}return}if(!K?.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=C9(u,f);if(e){Z.warning(e);return}_(!0);try{await Pie(K.id,m,{prompt_schema:u}),Z.success(`视频提示词已保存`),we(),r(!1),h(``)}catch(e){Z.error(e?.message||`保存视频提示词失败`)}finally{_(!1)}},Ce=()=>{t&&o7(t).then(e=>{re(e),e.steps&&ae(e.steps)}).catch(e=>{})},we=()=>{t&&o7(t).then(e=>{re(e),e.steps&&ae(e.steps)}).catch(e=>{})},Te=e=>{let t={engine_id:T,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};s7(K.id,e.toString(),t).then(e=>{Z.info(`正在生成图片,请稍候...`),we()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Ee=()=>{let e={engine_id:T,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};s7(K.id,_e[1].id.toString(),e).then(e=>{Z.info(`正在生成图片,请稍候...`),we()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},De=e=>{let t={engine_id:C,duration:j,aspect_ratio:N,resolution:F,target_platform:`抖音`};kie(K.id,e.toString(),t).then(e=>{we(),Z.info(`正在生成视频提示词,请稍候...`)}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Oe=(e,t)=>{c7(K.id,e.toString(),{engine_id:``}).then(e=>{Z.info(`正在生成视频,请稍候...`),we()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},ke=()=>{c7(K.id,_e[3].id.toString(),{engine_id:``}).then(e=>{Z.info(`正在生成视频,请稍候...`),we()}).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)(X,{icon:(0,$.jsx)(z2,{}),onClick:()=>e(-1),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},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)(X,{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)`,cursor:K?.material?.materialVideoUrl?`pointer`:`default`},onClick:()=>K?.material?.materialVideoUrl&&me(K.material.materialVideoUrl,`video`),children:K?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:K.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)`,cursor:K?.material?.materialImageUrl?`pointer`:`default`},onClick:()=>K?.material?.materialImageUrl&&me(K.material.materialImageUrl,`image`),children:K?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:K.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:`暂无图片`})})]})]}),(0,$.jsx)(`div`,{style:{margin:`20px 0`,height:1,background:`linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.15), transparent)`,borderRadius:.5}}),K?.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)`,cursor:`pointer`},onClick:()=>me(K.finalImageUrl,`image`),children:(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${K.finalImageUrl}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})}),K?.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)`,cursor:`pointer`},onClick:()=>me(K.finalVideoUrl,`video`),children:(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${K.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)($g,{activeKey:q,onChange:oe,ghost:!0,bordered:!1,style:{background:`transparent`},expandIconPlacement:`end`,items:_e.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)(A4,{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)(j9,{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:K?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:K.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)(j9,{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:K?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:K.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)(j9,{style:{color:`#475569`,fontSize:13,lineHeight:1.8,whiteSpace:`pre-wrap`},children:e?.output?.payload?.prompt||`暂无提示词`})}),(0,$.jsxs)(EH,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(Z$,{}),onClick:()=>xe(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)(X,{onClick:()=>{Te(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:[K.finalImageUrl?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${K.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)(X,{type:`default`,icon:(0,$.jsx)(Z$,{}),onClick:()=>Ee(),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:()=>{O(!D),A(!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)(z8,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(j9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:b.video?.find(e=>e.id===C)?.name||`选择引擎`})]}),D&&(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)(j9,{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),R({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(N)||P(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(F)||I(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(j)||M(e.supportedDurations?.[0]||5),O(!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:()=>{A(!k),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)(o6,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(j9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[N,` · `,j,`s · `,F]})]}),k&&(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)(j9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:L.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>P(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:N===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:N===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 ${N===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:N===e?`#6366f1`:`#6b7280`,fontWeight:N===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(j9,{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:`${(j-Math.min(...L.durations))/(Math.max(...L.durations)-Math.min(...L.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...L.durations),max:Math.max(...L.durations),value:j,onChange:e=>M(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:j}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(j9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:L.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>I(e),style:{flex:1,height:42,borderRadius:6,border:F===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:F===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:F===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(X,{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:()=>{De(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)(j9,{style:{color:`#64748b`,fontSize:13,lineHeight:1.8},children:`视频提词已生成,可点击按钮查看/修改`})}),(0,$.jsxs)(EH,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(Z$,{}),onClick:()=>xe(K?.videoGeneration?.promptSchema,`video`,e.id,K?.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`||!K?.videoGeneration?.promptSchema||!K?.videoGeneration?.schemaConfigSnapshot,children:`查看/修改视频提词`}),(0,$.jsx)(X,{onClick:()=>{Oe(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`&&K?.finalVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${K.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)(EH,{style:{width:`100%`,gap:12},children:[(0,$.jsx)(X,{onClick:()=>ke(),type:`default`,icon:(0,$.jsx)(Z$,{}),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)(X,{type:`primary`,icon:(0,$.jsx)(M0,{}),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${K?.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)(NK,{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)(X,{onClick:()=>r(!1),disabled:g,style:{borderRadius:8},children:`取消`},`cancel`),(0,$.jsx)(X,{type:`primary`,onClick:Se,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)(zoe,{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)(A9,{value:u,schemaConfigSnapshot:f,onChange:d})})}),(0,$.jsxs)(NK,{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:o,onCancel:()=>s(!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)(tG,{placeholder:`搜索产品名称`,value:te,onChange:e=>ne(e.target.value),onPressEnter:be,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)(X,{type:`primary`,onClick:be,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(n$,{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:z,rowKey:`id`,pagination:{current:V,pageSize:U,total:ee,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:ye},style:{fontSize:13},scroll:{y:350}})]}),(0,$.jsx)(NK,{open:se,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #8b5cf6 0%, #ddd6fe 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`预览`})]}),onCancel:he,width:800,footer:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,borderTop:`1px solid rgba(139, 92, 246, 0.08)`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(M0,{}),onClick:ge,style:{borderRadius:10,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,border:`none`,boxShadow:`0 8px 18px rgba(47, 52, 64, 0.15)`},children:`下载`})}),centered:!0,style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(139, 92, 246, 0.08)`,padding:`16px 24px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:de===`image`?(0,$.jsx)(`img`,{src:le.startsWith(`http`)?le:`http://ceshi.apiforeign.minzhong.cn${le}`,alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:pe,src:le.startsWith(`http`)?le:`http://ceshi.apiforeign.minzhong.cn${le}`,controls:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})})]})}var Hoe={pending_analysis:{label:`等待分析`,color:`default`},analyzing:{label:`分析中`,color:`processing`},analysis_completed:{label:`分析完成`,color:`blue`},analysis_failed:{label:`分析失败`,color:`red`},splitting:{label:`拆镜中`,color:`processing`},split_completed:{label:`拆镜完成`,color:`green`},partial_failed:{label:`部分失败`,color:`orange`},failed:{label:`失败`,color:`red`},deleted:{label:`已软删`,color:`default`}},Uoe=e=>{let t=Hoe[e]||{label:e,color:`default`};return(0,$.jsx)(h$,{color:t.color,children:t.label})};function Woe(){let e=Ye(),[t,n]=(0,S.useState)(``),[r,i]=(0,S.useState)(``),[a,o]=(0,S.useState)(``),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(0),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)([]),[_,v]=(0,S.useState)(1),[y,b]=(0,S.useState)(10),[x,C]=(0,S.useState)(0),[w,T]=(0,S.useState)(``),E=(0,S.useRef)(null),D=(0,S.useRef)(null),O=(0,S.useCallback)(()=>{t&&URL.revokeObjectURL(t),n(``),i(``),o(``),f(0),u(``)},[t]),k=async e=>{if(!e.type.startsWith(`video/`))return o(`请选择视频文件`),!1;if(e.size>100*1024*1024)return o(`视频文件大小不能超过 100MB`),!1;let t=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)});if(t>60)return o(`视频时长不能超过 1分钟`),!1;O(),m(!0);try{let r=await die(e,t);n(r.url),i(r.resource_id||``),o(``),Z.success(`视频上传成功`)}catch{o(`视频上传失败,请重试`),Z.error(`视频上传失败`)}finally{m(!1)}return!1},A=(0,S.useCallback)(()=>{E.current&&f(E.current.duration)},[]),j=async()=>{if(!t||!l.trim()){Z.warning(`请先上传视频并输入产品名称`);return}m(!0);try{Fie({video_url:t,video_duration_seconds:d,video_resource_id:r||void 0,title:l.trim(),idempotency_key:`shot_${Date.now()}`}).then(t=>{m7(1,20,w).then(t=>{Z.loading(`创建中...`,3),setTimeout(()=>{e(`/removelens/${t.items[0].id}/removeinfo`)},3e3)})}),O()}catch{Z.error(`任务创建失败,请重试`)}finally{m(!1)}},M=async(e,t,n)=>{try{let r=await m7(e,t,n);g(r.items||[]),C(r.total||0),v(e),b(t)}catch{Z.error(`获取列表失败`)}},N=(e,t)=>{M(e,t,w)},P=()=>{M(1,10,w)};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(${noe})`,backgroundRepeat:`no-repeat`,backgroundSize:`100% 100%`,backgroundPosition:`center`},children:(0,$.jsxs)(`div`,{style:{maxWidth:1200,margin:`0 auto`,position:`relative`,zIndex:10},children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`16px 24px`,borderRadius:16,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:(0,$.jsxs)(`div`,{children:[(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:`AI视频拆镜工作台`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`精细化镜头复刻工具,拆分参考视频单镜头独立复刻,提升素材原创度,规避素材同质化`})]})}),(0,$.jsx)(X,{type:`primary`,ghost:!0,icon:(0,$.jsx)(jH,{}),onClick:()=>{c(!0),M(1,10,w)},style:{borderRadius:10,padding:`6px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`创作记录`})]}),(0,$.jsxs)(`div`,{style:{width:`100%`,maxWidth:720,margin:`0 auto`},children:[a&&(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:a}),!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)(R0.Dragger,{accept:`video/*`,beforeUpload:k,showUploadList:!1,disabled:p,style:{background:p?`rgba(243, 244, 246, 0.3)`:`transparent`,border:`2px dashed ${p?`rgba(209, 213, 219, 0.5)`:`rgba(99, 102, 241, 0.3)`}`,borderRadius:24,padding:`56px 20px`,cursor:p?`not-allowed`:`pointer`,margin:0},children:p?(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)(H4,{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)(LK,{title:`确定要删除吗?`,okText:`确定`,cancelText:`取消`,onConfirm:O,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:E,src:`http://ceshi.apiforeign.minzhong.cn${t}`,controls:!0,onLoadedMetadata:A,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)(tG,{placeholder:`请输入产品名称`,value:l,onChange:e=>u(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:j,disabled:!t||!l.trim()||p,style:{padding:`14px 56px`,background:t&&l.trim()&&!p?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`:`#e2e8f0`,color:`white`,border:`none`,borderRadius:12,fontSize:15,fontWeight:600,cursor:t&&l.trim()&&!p?`pointer`:`not-allowed`,boxShadow:t&&l.trim()&&!p?`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&&l.trim()&&!p&&(e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 8px 25px rgba(99, 102, 241, 0.4)`)},onMouseLeave:e=>{t&&l.trim()&&!p&&(e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.3)`)},children:(0,$.jsx)(`span`,{children:p?`创建中...`:`创建`})})})]})]}),(0,$.jsx)(`canvas`,{ref:D,style:{display:`none`}}),(0,$.jsxs)(NK,{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:s,onCancel:()=>c(!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)(tG,{placeholder:`搜索产品名称`,value:w,onChange:e=>T(e.target.value),onPressEnter:P,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)(X,{type:`primary`,onClick:P,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)(n$,{columns:[{title:`产品名称`,dataIndex:`title`,key:`title`,render:e=>(0,$.jsx)(`span`,{style:{fontSize:14,color:`#1e293b`,fontWeight:500},children:e})},{title:`状态`,dataIndex:`status`,key:`status`,render:e=>Uoe(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,$.jsxs)(EH,{children:[(0,$.jsx)(X,{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:`查看详情`}),(0,$.jsx)(LK,{title:`确认删除这个拆镜项目吗?`,onConfirm:async()=>{try{await qie(t.id),Z.success(`删除成功`),M(_,y,w)}catch{Z.error(`删除失败`)}},children:(0,$.jsx)(X,{type:`text`,danger:!0,style:{color:`#ef4444`,fontSize:13,padding:`4px 12px`,borderRadius:6,background:`rgba(239, 68, 68, 0.1)`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`},children:`删除`})})]})}],dataSource:h,rowKey:`id`,pagination:{current:_,pageSize:y,total:x,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:N,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 Goe=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 te(e,t,g,15,8,0)},n.deflateInit2=te,n.deflateReset=G,n.deflateResetKeep=ee,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--)ee(e,a,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ee(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++,ee(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?ie(e,t,n,r):e.strategy===4||s===o?(R(e,2+ +!!r,3),G(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),{Text:Koe}=Q,M9=e=>e?/^(https?:|data:|blob:)/i.test(e)?e:`${`http://ceshi.apiforeign.minzhong.cn`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,qoe=e=>e===`video`?(0,$.jsx)(v5,{}):e===`audio`?(0,$.jsx)(J2,{}):(0,$.jsx)(e8,{}),Joe=e=>e===`video`?`视频`:e===`audio`?`音频`:`图片`,N9=e=>{let t=Number(e||0);return t>=1024*1024?`${(t/1024/1024).toFixed(1)} MB`:t>=1024?`${(t/1024).toFixed(1)} KB`:`${t} B`},Yoe=()=>{let[e,t]=(0,S.useState)(``),[n,r]=(0,S.useState)(``),[i,a]=(0,S.useState)(1),[o,s]=(0,S.useState)(10),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)([]),[f,p]=(0,S.useState)(0),[m,h]=(0,S.useState)(new Set),[g,_]=(0,S.useState)(null),[v,y]=(0,S.useState)(!1),b=(0,S.useMemo)(()=>u.flatMap(e=>e.items||[]),[u]),x=(0,S.useCallback)(async()=>{l(!0);try{let t=await D7({resourceType:e||void 0,keyword:n||void 0,page:i,pageSize:o,scene:`record`});d(t.groups||[]),p(t.totalDays||0),h(new Set)}catch(e){Z.error(e?.message||`加载历史上传素材失败`),d([]),p(0)}finally{l(!1)}},[n,i,o,e]);(0,S.useEffect)(()=>{x()},[x]);let C=e=>{h(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},w=()=>{let e=b.map(e=>e.id);h(t=>t.size===e.length?new Set:new Set(e))},T=async t=>{let r=(t.page||1)+1;try{let i=await O7(t.generatedDate,{resourceType:e||void 0,keyword:n||void 0,page:r,pageSize:10,scene:`record`});d(e=>e.map(e=>e.generatedDate===t.generatedDate?{...e,page:r,items:[...e.items,...i.items||[]]}:e))}catch(e){Z.error(e?.message||`加载更多失败`)}},E=e=>{NK.confirm({title:`确认删除历史上传素材`,content:`确定删除 ${e.fileName||e.id} 吗?删除后会释放上传容量,并在提交成功后清理真实文件。`,okText:`删除`,okButtonProps:{danger:!0},cancelText:`取消`,onOk:async()=>{try{await K5(e.resourceUrl),Z.success(`删除成功`),x()}catch(e){Z.error(e?.message||`删除失败`)}}})},D=()=>{if(m.size===0){Z.warning(`请先选择要删除的上传素材`);return}if(m.size>30){Z.warning(`一次最多删除 30 条上传素材`);return}let e=Array.from(m);NK.confirm({title:`确认批量删除历史上传素材`,content:`确定删除选中的 ${e.length} 条上传素材吗?删除后会释放上传容量,并在提交成功后清理真实文件。`,okText:`删除`,okButtonProps:{danger:!0},cancelText:`取消`,onOk:async()=>{try{let t=await sae(e);Z.success(`删除成功,释放 ${N9(t?.releasedSizeBytes||0)}`),x()}catch(e){Z.error(e?.message||`批量删除失败`)}}})},O=e=>{let t=document.createElement(`a`);t.href=M9(e.resourceUrl),t.download=e.fileName||e.id,document.body.appendChild(t),t.click(),document.body.removeChild(t)},k=(e,t=`card`)=>{let n=M9(e.previewUrl||e.displayUrl||e.resourceUrl),r=t===`card`?{width:`100%`,height:130,objectFit:`cover`}:{width:`100%`,maxHeight:620,objectFit:`contain`};return e.resourceType===`image`?(0,$.jsx)(`img`,{src:n,alt:e.fileName||e.id,style:r}):e.resourceType===`video`?(0,$.jsx)(`video`,{src:n,controls:t===`preview`,muted:t===`card`,style:r}):(0,$.jsx)(`audio`,{src:n,controls:!0,style:{width:`100%`}})};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:12,alignItems:`center`,marginBottom:16,flexWrap:`wrap`},children:[(0,$.jsxs)(EH,{wrap:!0,children:[(0,$.jsx)(NC,{value:e,style:{width:120},options:[{label:`全部`,value:``},{label:`图片`,value:`image`},{label:`视频`,value:`video`},{label:`音频`,value:`audio`}],onChange:e=>{t(e),a(1)}}),(0,$.jsx)(tG,{allowClear:!0,value:n,prefix:(0,$.jsx)(OC,{}),placeholder:`搜索文件名或URL`,style:{width:240},onChange:e=>r(e.target.value),onPressEnter:()=>{a(1),x()}})]}),(0,$.jsx)(EH,{children:v?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(X,{onClick:w,children:m.size&&m.size===b.length?`取消全选`:`全选`}),(0,$.jsxs)(X,{danger:!0,icon:(0,$.jsx)(k$,{}),onClick:D,children:[`批量删除 (`,m.size,`)`]}),(0,$.jsx)(X,{onClick:()=>{y(!1),h(new Set)},children:`取消批量操作`})]}):(0,$.jsx)(X,{onClick:()=>y(!0),children:`批量操作`})})]}),(0,$.jsx)(cK,{spinning:c,children:u.length===0?(0,$.jsx)(rC,{description:`暂无可展示的历史上传素材`,style:{padding:`60px 0`}}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:28},children:u.map(e=>(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{fontSize:18,fontWeight:700,color:`#1e293b`},children:e.generatedDate}),(0,$.jsxs)(Koe,{type:`secondary`,children:[`共 `,e.total,` 个素材`]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,justifyContent:`flex-start`},children:e.items.map(e=>{let t=m.has(e.id);return(0,$.jsxs)(`div`,{style:{width:`17%`,minWidth:240,margin:16,border:t?`2px solid #8b5cf6`:`1px solid #e2e8f0`,borderRadius:16,overflow:`hidden`,background:`#fff`,boxShadow:`0 10px 24px rgba(15,23,42,0.06)`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,background:`#f1f5f9`},children:[k(e),v&&(0,$.jsx)(oz,{checked:t,onChange:()=>C(e.id),style:{position:`absolute`,top:10,left:10,background:`#fff`,borderRadius:6,padding:4}}),(0,$.jsx)(h$,{color:`purple`,icon:qoe(e.resourceType),style:{position:`absolute`,top:10,right:10,margin:0},children:Joe(e.resourceType)})]}),(0,$.jsxs)(`div`,{style:{padding:12,paddingTop:0},children:[(0,$.jsxs)(EH,{size:4,wrap:!0,style:{marginTop:8},children:[(0,$.jsx)(h$,{style:{margin:0},children:e.moduleLabel}),(0,$.jsx)(h$,{style:{margin:0},children:N9(e.fileSizeBytes)}),e.durationSeconds?(0,$.jsxs)(h$,{style:{margin:0},children:[Number(e.durationSeconds).toFixed(1),`s`]}):null]}),(0,$.jsxs)(EH,{style:{marginTop:12},children:[(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(NW,{}),onClick:()=>_(e),children:`预览`}),(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(M0,{}),onClick:()=>O(e),children:`下载`}),(0,$.jsx)(X,{size:`small`,danger:!0,icon:(0,$.jsx)(k$,{}),onClick:()=>E(e),children:`删除`})]})]})]},e.id)})}),e.items.lengthT(e),children:`加载更多`})})]},e.generatedDate))})}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:24},children:(0,$.jsx)(VG,{current:i,pageSize:o,total:f,showSizeChanger:!0,pageSizeOptions:[5,10],onChange:(e,t)=>{a(e),s(t)}})}),(0,$.jsx)(NK,{open:!!g,title:`预览`,footer:null,width:900,centered:!0,destroyOnHidden:!0,onCancel:()=>_(null),children:g?k(g,`preview`):null})]})},{Search:Xoe}=tG,{Text:Zoe}=Q,Qoe=e=>{let t=S.useRef(!1);(0,S.useEffect)(()=>{if(t.current)return;let n=()=>{t.current||(t.current=!0,e?.())};return document.readyState===`complete`?n():window.addEventListener(`load`,n),()=>{window.removeEventListener(`load`,n)}},[e])},$oe=()=>{let[e,t]=(0,S.useState)(!1);Qoe(()=>{t(!0)});let[n]=On(),[r,i]=(0,S.useState)(n.get(`filterType`)===`private_portrait`?`private_portrait`:n.get(`filterType`)===`upload_resource`?`upload_resource`:`project`),[a,o]=(0,S.useState)(`video`),[s,c]=(0,S.useState)([]),[l,u]=(0,S.useState)({page:1,pageSize:10}),[d,f]=(0,S.useState)(0),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(new Set),[_,v]=(0,S.useState)(!1),[y,b]=(0,S.useState)(null),x=S.createRef(),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(``),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)([[]]),[N,P]=(0,S.useState)([``]),[F,I]=(0,S.useState)([]),[L,R]=(0,S.useState)(!1),[z,B]=(0,S.useState)(0),[V,H]=(0,S.useState)([void 0]),[U,W]=(0,S.useState)(new Map),[ee,G]=(0,S.useState)(``),[te,ne]=(0,S.useState)(new Map),K=(0,S.useRef)(new Map);(0,S.useEffect)(()=>()=>{K.current.forEach(e=>clearTimeout(e)),K.current.clear()},[]);let[re,ie]=(0,S.useState)(1),[ae,q]=(0,S.useState)(10),[oe,se]=(0,S.useState)([!1]),[ce,le]=(0,S.useState)(`new`),[ue,de]=(0,S.useState)([]),[fe,pe]=(0,S.useState)(!1),[me,he]=(0,S.useState)([]),[ge,_e]=(0,S.useState)({}),[ve,ye]=(0,S.useState)(`2`),[be,xe]=(0,S.useState)(``),[Se,Ce]=(0,S.useState)([]),[we,Te]=(0,S.useState)(!1),[Ee,De]=(0,S.useState)(!1),[Oe,ke]=(0,S.useState)([]),[Ae,je]=(0,S.useState)(0),[Me,Ne]=(0,S.useState)(1),[Pe,Fe]=(0,S.useState)(10),[Ie,Le]=(0,S.useState)(!1),[Re,ze]=(0,S.useState)(``),[Be,Ve]=(0,S.useState)(!1),[He,Ue]=(0,S.useState)(new Set),We=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}}},Ge=e=>{let t=We(e);return t?Math.floor(Date.now()/1e3)>t:!1},Ke=(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}`},qe=async e=>{if(b(e),v(!0),window.dispatchEvent(new Event(`previewOpen`)),e.videoUrl&&e.videoUrl.trim()&&!e.imagePx)try{let t=await ht(e.videoUrl);t&&b(e=>e&&{...e,imagePx:t})}catch{}},Je=()=>{x.current&&(x.current.pause(),x.current.currentTime=0),document.querySelectorAll(`video`).forEach(e=>{e.pause(),e.currentTime=0}),v(!1)},Ye=e=>e.generatedResourceId||e.id,Xe=e=>!!e.generatedResourceId,Ze=e=>{if(!e)return!0;let t=e.match(/^(\d+)x(\d+)$/);if(!t)return!0;let n=parseInt(t[1],10),r=parseInt(t[2],10),i=n/r;return n>=r?n>=480&&n<=2560&&r>=270&&r<=1440&&i>=1.775&&i<=1.784:n>=270&&n<=1440&&r>=480&&r<=2560&&i>=.555&&i<=.564},Qe=e=>{Ue(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},$e=()=>{let e=s.flatMap(e=>e.items.map(e=>Ye(e)));He.size===e.length?Ue(new Set):Ue(new Set(e))},et=async()=>{if(He.size===0){Z.warning(`请先选择要下载的媒体`);return}if(He.size>30){Z.warning(`最多只能单次下载30个文件`);return}let e=[];s.forEach(t=>{t.items.forEach(t=>{He.has(Ye(t))&&e.push(t)})});let t=new Goe.default,n=`http://ceshi.apiforeign.minzhong.cn`,r=t.folder(`downloads`),i=!1,a=0;Z.loading({content:`下载中,请稍候...`,key:`downloadProgress`});for(let t of e){let e=`${n}${t.videoUrl||t.imageUrl}`,o=((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(o,n),a++}catch{console.warn(`文件下载失败(CORS限制): ${o},将使用备用方式下载`),i=!0;break}}if(i){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 o=await t.generateAsync({type:`blob`}),c=document.createElement(`a`);c.href=URL.createObjectURL(o),c.download=`downloads_${Date.now()}.zip`,c.click(),URL.revokeObjectURL(c.href),Z.destroy(`downloadProgress`),Z.success(`下载完成,共 ${a} 个文件`),Ve(!1),Ue(new Set)},tt=async()=>{if(He.size===0){Z.warning(`请先选择要删除的媒体`);return}if(He.size>30){Z.warning(`最多只能单次删除30个文件`);return}let e=s.flatMap(e=>e.items.filter(e=>He.has(Ye(e)))),t=``;t=r===`shot_replicate`?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:8},children:`以下内容所连带的图片和视频都将被删除:`}),(0,$.jsx)(`ul`,{style:{margin:0,paddingLeft:20},children:e.map((e,t)=>(0,$.jsxs)(`li`,{style:{marginBottom:4,color:`#334155`},children:[e.shotReplicateProjectTitle,`— —`,e.shotSegmentLabel]},t))}),(0,$.jsx)(`div`,{style:{marginTop:12},children:`确定删除吗?`})]}):r===`hot_opening_replicate`?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:8},children:`爆款开头复刻中以下内容所连带的图片和视频都将被删除:`}),(0,$.jsx)(`ul`,{style:{margin:0,paddingLeft:20},children:e.map((e,t)=>(0,$.jsx)(`li`,{style:{marginBottom:4,color:`#334155`},children:e.moduleProjectTitle},t))}),(0,$.jsx)(`div`,{style:{marginTop:12},children:`确定删除吗?`})]}):`确定删除选中的 ${He.size} 条记录吗?`,NK.confirm({title:`确认删除`,content:t,okText:`确定删除`,cancelText:`取消`,okButtonProps:{danger:!0},onOk:async()=>{let e=``;r===`project`?e=`generation_record`:r===`creation`?e=`chat_task`:r===`hot_opening_replicate`?e=`hot_opening_replicate`:r===`shot_replicate`&&(e=`shot_replicate`);let t=[];s.forEach(e=>{e.items.forEach(e=>{He.has(Ye(e))&&t.push(e)})});let n=[];e===`generation_record`||e===`chat_task`?n=t.map(e=>e.id):e===`hot_opening_replicate`?n=t.map(e=>e.moduleProjectId):e===`shot_replicate`&&(n=t.map(e=>e.shotSegmentId));let i={history_source:e,ids:n};try{await T7(i),Z.success(`删除成功`),Ve(!1),Ue(new Set),u(e=>({...e,page:1})),gt()}catch{Z.error(`删除失败,请重试`)}}})},nt=async()=>{Te(!0);try{let e=await d7({page:1,pageSize:100});Ce(e.data?.data||e.data||[])}catch(e){console.error(`加载前测模板失败:`,e)}finally{Te(!1)}},rt=()=>{if(He.size===0){Z.warning(`请先选择要推送的媒体`);return}M([[]]),P([``]),H([void 0]),ye(`2`),xe(``),nt(),A(!0)},it=()=>{if(!y)return;let e=Ye(y);Ue(new Set([e])),M([[]]),P([``]),H([void 0]),W(new Map),G(``),ye(`2`),xe(``),nt(),A(!0)},at=async(e,t)=>{R(!0);try{let n=await u7({page:e,page_size:t});I(n?.data||n||[]),B(n.pagination.total||0)}catch(e){console.error(`加载授权列表失败:`,e),I([]),B(0)}finally{R(!1)}},ot=async()=>{pe(!0);try{let[e,t]=await Promise.all([iae(),C7()]);de(e?.data||[]);let n=t?.data||[],r={};n.forEach(e=>{r[e.openType]=e.typeName}),_e(r)}catch(e){console.error(`加载历史授权账户列表失败:`,e),de([]),_e({})}finally{pe(!1)}},st=async()=>{Le(!0);try{let e=await Xie({status:Re||void 0,page:Me,pageSize:Pe});ke(e?.data||e||[]),je(e.pagination?.total||e.total||0)}catch(e){console.error(`加载推送历史失败:`,e),ke([]),je(0)}finally{Le(!1)}},ct=()=>{De(!0),Ne(1),ze(``),st()},lt=()=>{Ne(1),st()},ut=(e,t)=>{Ne(e),Fe(t),st()},dt=async()=>{if(He.size===0){Z.warning(`请先选择要推送的媒体`);return}let e=new Map;s.forEach(t=>{t.items.forEach(t=>{let n=Ye(t);e.set(n,t)})});let t=[];if(ce===`new`){let n=V.filter(e=>e!==void 0);if(n.length===0){Z.warning(`请先选择授权账户`);return}for(let r=0;re.accountId)||[];if(a.length===0){Z.warning(`第 ${r+1} 组授权账户未设置账户ID,已跳过`);continue}let o=new Map;for(let t of He){let n=e.get(t),r;n&&Xe(n)&&(r=`generated_resources`),o.has(r)||o.set(r,[]),o.get(r).push(t)}o.forEach((e,n)=>{t.push({advertiser_ids:a,resource_ids:e,oauth_id:i.value,source_model:n,is_pre_test:ve,pre_test_template:be})})}}else{if(me.length===0){Z.warning(`请先选择历史账户`);return}for(let n of me){let i=new Map;for(let t of He){let n=e.get(t),a;a=n&&Xe(n)?`generated_resources`:r===`project`?`generation_records`:`chat_generation_tasks`,i.has(a)||i.set(a,[]),i.get(a).push(t)}i.forEach((e,r)=>{t.push({advertiser_ids:[n.advertiserId],resource_ids:e,oauth_id:String(n.oauthId),source_model:r,is_pre_test:ve,pre_test_template:be})})}}O(!0);try{let e=await Yie({tasks:t});e.errors?.length>0?Z.warning(e.message):e.code===0?Z.success(e.message):Z.error(e.message),Ve(!1),Ue(new Set),A(!1),M([[]]),P([``]),H([void 0]),he([]),W(new Map),G(``),ye(`2`),xe(``)}catch(e){console.error(`批量推送失败:`,e),Z.error(e.message||`批量推送失败`)}finally{O(!1)}},ft=async(e,t)=>{if(t.trim())try{let n=(await x7({filenames:[{source_id:e,file_name:t}]}))?.results?.find(t=>t.source_id===e)?.new_file_name||t;c(t=>t.map(t=>({...t,items:t.items.map(t=>Ye(t)===e?{...t,fileName:n}:t)}))),Z.success(`文件名更新成功`)}catch(e){console.error(`文件名更新失败:`,e),Z.error(e.message||`文件名更新失败`)}},pt=async(e,t)=>{if(!(!t.trim()||e.length===0))try{let n=await x7({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)}),c(n=>{let i=new Set(e);return n.map(e=>({...e,items:e.items.map(e=>{let n=Ye(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||`文件名更新失败`)}},mt=e=>{w(e)},ht=e=>new Promise(t=>{let n=document.createElement(`video`),r=`http://ceshi.apiforeign.minzhong.cn`,i=e.startsWith(`/`)?e.slice(1):e;n.src=`${r.endsWith(`/`)?r.slice(0,-1):r}/${i}`,n.crossOrigin=`anonymous`,n.onloadedmetadata=()=>{let e=n.videoWidth,r=n.videoHeight;n.remove(),t(`${e}x${r}`)},n.onerror=()=>{n.remove(),t(``)},n.onabort=()=>{n.remove(),t(``)},setTimeout(()=>{n.remove(),t(``)},5e3)}),gt=()=>{if(r===`private_portrait`||r===`upload_resource`){m(!1),c([]);return}m(!0);let e=``;r===`project`?e=`generation_record`:r===`hot_opening_replicate`?e=`hot_opening_replicate`:r===`shot_replicate`&&(e=`shot_replicate`);let t=`?gen_type=${a}&page=${l.page}&page_size=${l.pageSize}`;if(e&&(t=`?gen_type=${a}&history_source=${e}&page=${l.page}&page_size=${l.pageSize}`),T&&T.trim()&&(t+=`&keyword=${encodeURIComponent(T.trim())}`),C){let t=`${C}?gen_type=${a}&page=${l.page}&page_size=${l.pageSize}`;e&&(t=`${C}?gen_type=${a}&history_source=${e}&page=${l.page}&page_size=${l.pageSize}`),T&&T.trim()&&(t+=`&keyword=${encodeURIComponent(T.trim())}`),i7(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?c(n):c([])}).catch(e=>{}).finally(()=>{m(!1)})}else Cie(t).then(e=>{let t=Array.isArray(e)?e:e?.groups||[];t.forEach(e=>{e.page=1}),l.page===1?c(t):c(e=>[...e,...t]),f(e?.totalDays||0)}).catch(e=>{l.page===1&&c([])}).finally(()=>{m(!1)})};(0,S.useEffect)(()=>{gt()},[r,a,l.page,C]);let _t=()=>{p||u(e=>({...e,page:e.page+1}))},vt=async(e,t,n)=>{if(h.has(t))return;g(e=>new Set([...e,t]));let i=n+1,o=``;r===`project`?o=`generation_record`:r===`hot_opening_replicate`?o=`hot_opening_replicate`:r===`shot_replicate`&&(o=`shot_replicate`);let s=`${e}?gen_type=${a}&page=${i}&page_size=${l.pageSize}`;o&&(s=`${e}?gen_type=${a}&history_source=${o}&page=${i}&page_size=${l.pageSize}`),T&&T.trim()&&(s+=`&keyword=${encodeURIComponent(T.trim())}`);try{let t=(await i7(s)).items||[];t&&t.length>0&&c(n=>n.map(n=>n.generatedDate===e?{...n,items:[...n.items,...t],page:i}:n))}catch{}finally{g(e=>{let n=new Set(e);return n.delete(t),n})}};return(0,S.useEffect)(()=>{u(e=>({...e,page:1})),E(``)},[r,a]),(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:12,marginBottom:16,padding:`12px 16px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexWrap:`wrap`},children:[(0,$.jsx)(x3,{style:{color:`#090a0cff`,fontSize:14}}),(0,$.jsxs)(EH,{size:8,wrap:!0,children:[(0,$.jsx)(X,{type:r===`project`?`primary`:`default`,onClick:()=>{i(`project`),Ve(!1),Ue(new Set)},style:{borderRadius:8,background:r===`project`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:r===`project`?`none`:`1px solid #e2e8f0`,color:r===`project`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(dZ,{}),children:`项目记录`}),(0,$.jsx)(X,{type:r===`creation`?`primary`:`default`,onClick:()=>{i(`creation`),Ve(!1),Ue(new Set)},style:{borderRadius:8,background:r===`creation`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:r===`creation`?`none`:`1px solid #e2e8f0`,color:r===`creation`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(jH,{}),children:`创作记录`}),(0,$.jsx)(X,{type:r===`hot_opening_replicate`?`primary`:`default`,onClick:()=>{i(`hot_opening_replicate`),Ve(!1),Ue(new Set)},style:{borderRadius:8,background:r===`hot_opening_replicate`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:r===`hot_opening_replicate`?`none`:`1px solid #e2e8f0`,color:r===`hot_opening_replicate`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(t5,{}),children:`爆款复刻`}),(0,$.jsx)(X,{type:r===`shot_replicate`?`primary`:`default`,onClick:()=>{i(`shot_replicate`),Ve(!1),Ue(new Set)},style:{borderRadius:8,background:r===`shot_replicate`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:r===`shot_replicate`?`none`:`1px solid #e2e8f0`,color:r===`shot_replicate`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(l8,{}),children:`拆镜复刻`}),(0,$.jsx)(X,{type:r===`private_portrait`?`primary`:`default`,onClick:()=>{i(`private_portrait`),Ve(!1),Ue(new Set)},style:{borderRadius:8,background:r===`private_portrait`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:r===`private_portrait`?`none`:`1px solid #e2e8f0`,color:r===`private_portrait`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(g5,{}),children:`私域素材库`}),(0,$.jsx)(X,{type:r===`upload_resource`?`primary`:`default`,onClick:()=>{i(`upload_resource`),Ve(!1),Ue(new Set)},style:{borderRadius:8,background:r===`upload_resource`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:r===`upload_resource`?`none`:`1px solid #e2e8f0`,color:r===`upload_resource`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(p5,{}),children:`历史素材`})]})]}),r!==`private_portrait`&&r!==`upload_resource`&&(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexWrap:`wrap`},children:Be?(0,$.jsxs)(EH,{size:8,wrap:!0,children:[(0,$.jsx)(X,{onClick:$e,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#222222ff`,fontWeight:600},children:He.size===s.reduce((e,t)=>e+t.items.length,0)?`取消全选`:`全选`}),(0,$.jsx)(X,{onClick:()=>{Ve(!1),Ue(new Set)},style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:600},children:`取消选择`}),(0,$.jsxs)(X,{onClick:()=>tt(),style:{borderRadius:8,background:`linear-gradient(135deg, #bf0b0a 0%, #ff8165 100%)`,fontWeight:600,padding:`8px 24px`,color:`#fff`},children:[`删除 (`,He.size,`)`]}),(0,$.jsxs)(X,{onClick:()=>et(),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,fontWeight:600},children:[`下载 (`,He.size,`)`]}),(0,$.jsx)(X,{type:`primary`,onClick:rt,loading:D,disabled:D||He.size===0,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,fontWeight:600},children:D?`推送中...`:`推送至账户 (${He.size})`})]}):(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(p5,{}),onClick:()=>Ve(!0),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600},children:`批量操作`})})]}),r===`private_portrait`?(0,$.jsx)(woe,{}):r===`upload_resource`?(0,$.jsx)(Yoe,{}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:24,padding:`12px 16px`,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)(EH,{size:8,wrap:!0,children:[(0,$.jsx)(X,{type:a===`video`?`primary`:`default`,onClick:()=>{o(`video`),Ve(!1),Ue(new Set)},style:{borderRadius:8,background:a===`video`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:a===`video`?`none`:`1px solid #e2e8f0`,color:a===`video`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(v5,{}),children:`视频`}),(0,$.jsx)(X,{type:a===`image`?`primary`:`default`,onClick:()=>{o(`image`),Ve(!1),Ue(new Set)},style:{borderRadius:8,background:a===`image`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:a===`image`?`none`:`1px solid #e2e8f0`,color:a===`image`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(e8,{}),children:`图片`}),(0,$.jsx)(PV,{picker:`date`,value:C?(0,jE.default)(C):void 0,onChange:(e,t)=>mt(t||``),format:`YYYY-MM-DD`,style:{width:160,borderRadius:8,border:`1px solid #e2e8f0`},placeholder:`选择日期`}),C&&(0,$.jsx)(X,{type:`text`,onClick:()=>mt(``),style:{color:`#94a3b8`,fontSize:12},children:`清除`}),(0,$.jsx)(tG.Search,{placeholder:`搜索提示词`,allowClear:!0,value:T,onChange:e=>{let t=e.target.value;E(t),t||(u(e=>({...e,page:1})),gt())},onSearch:()=>{u(e=>({...e,page:1})),gt()},style:{width:240,borderRadius:8}})]})]}),(0,$.jsx)(X,{icon:(0,$.jsx)(DV,{}),onClick:ct,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:`查询推送任务历史`})]}),p?(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},children:(0,$.jsx)(cK,{indicator:(0,$.jsx)(Xm,{style:{fontSize:24,color:`#64748b`},spin:!0}),tip:`加载中...`,size:`large`})}):s.length===0?(0,$.jsx)(rC,{image:rC.PRESENTED_IMAGE_SIMPLE,description:`暂无生成记录`,style:{padding:`60px 0`}}):(0,$.jsxs)(`div`,{style:{padding:`0 4px`},children:[s.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=>{let t=a===`video`&&e.videoCoverUrl?Ke(e.videoCoverUrl,!0):Ke(a===`video`?e.videoUrl:e.imageUrl,!0),n=a===`video`&&e.videoCoverUrl||a===`image`,r=He.has(Ye(e));return(0,$.jsxs)(`div`,{className:`media-card`,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:()=>Be?Qe(Ye(e)):qe(e),onMouseEnter:e=>{Be||(e.currentTarget.style.transform=`scale(1.05)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0,0,0,0.2)`)},onMouseLeave:e=>{Be||(e.currentTarget.style.transform=`scale(1)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(0,0,0,0.1)`)},children:[n?(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`},children:[(0,$.jsx)(`img`,{src:t,alt:`预览`,loading:`lazy`,style:{width:`100%`,height:`100%`,objectFit:`cover`,opacity:+(te.get(Ye(e))===`loaded`),transition:`opacity 0.3s`},onLoad:()=>{ne(t=>{let n=new Map(t);return n.set(Ye(e),`loaded`),n})},onError:()=>{ne(t=>{let n=new Map(t);return n.set(Ye(e),`error`),n})}}),te.get(Ye(e))!==`loaded`&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,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`,animation:te.get(Ye(e))===`loading`?`pulse 1.5s infinite`:`none`},children:e.mediaType===`video`?(0,$.jsx)(v5,{style:{color:`#64748b`,fontSize:16}}):(0,$.jsx)(e8,{style:{color:`#64748b`,fontSize:16}})})})]}):(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#1e293b`},children:[(0,$.jsx)(v5,{style:{color:`#64748b`,fontSize:24}}),(0,$.jsx)(Zoe,{style:{fontSize:12,color:`#94a3b8`,marginTop:4},children:`暂无封面`})]}),Be&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,left: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},onClick:t=>{t.stopPropagation(),Qe(Ye(e))},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`})})}),r&&a===`video`&&e.imagePx&&!Ze(e.imagePx)&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:36,left:8,right:8,padding:`4px 8px`,backgroundColor:`rgba(239, 68, 68, 0.9)`,color:`#fff`,fontSize:12,borderRadius:4,zIndex:10},children:`视频实际尺寸可能不符合平台推送要求`})]}),!Be&&(0,$.jsxs)($.Fragment,{children:[(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:`点击预览`}),(0,$.jsx)(`div`,{className:`media-download-btn`,children:(0,$.jsx)(Cw,{title:`下载`,children:(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:`50%`,background:`rgba(0,0,0,0.5)`,backdropFilter:`blur(4px)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`background 0.15s`},onClick:t=>{t.stopPropagation();let n=`http://ceshi.apiforeign.minzhong.cn${e.videoUrl||e.imageUrl}&download=1`,r=document.createElement(`a`);r.href=n,r.download=``,document.body.appendChild(r),r.click(),document.body.removeChild(r)},children:(0,$.jsx)(M0,{style:{color:`#fff`,fontSize:14}})})})})]}),Be&&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}})]},Ye(e))})}),e.total&&e.total>e.items.length&&(0,$.jsx)(`div`,{style:{padding:`12px 0`,textAlign:`left`},children:(0,$.jsx)(X,{onClick:()=>vt(e.generatedDate,e.items,e.page),loading:h.has(e.generatedDate),disabled:h.has(e.generatedDate),size:`small`,style:{borderRadius:6,background:`transparent`,border:`1px dashed #cbd5e1`,color:`#64748b`,fontSize:12},children:h.has(e.date)?`加载中...`:`查看全部 (${e.total})`})})]},t)),s.length>0&&d>s.length&&(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:`20px 0`},children:(0,$.jsx)(X,{onClick:_t,loading:p,disabled:p,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:500},children:p?`加载中...`:`加载更多`})})]})]}),(0,$.jsxs)(NK,{title:`推送任务历史`,open:Ee,onCancel:()=>De(!1),footer:null,width:800,style:{borderRadius:8},mask:{closable:!1},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16,display:`flex`,gap:4},children:[(0,$.jsx)(NC,{value:Re,onChange:e=>ze(e),placeholder:`选择状态`,style:{width:200,marginRight:12},options:[{value:`1`,label:`待推送`},{value:`2`,label:`推送中`},{value:`3`,label:`推送成功`},{value:`4`,label:`推送失败`}],allowClear:!0}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:4},children:[(0,$.jsx)(X,{type:`primary`,onClick:lt,style:{borderRadius:8},children:`查询`}),(0,$.jsx)(X,{icon:(0,$.jsx)(Uq,{}),onClick:lt,style:{borderRadius:8},children:`刷新`})]})]}),(0,$.jsx)(n$,{dataSource:Oe,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)(h$,{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:160,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:e||`-`})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:180,render:e=>F9(e)},{title:`更新时间`,dataIndex:`updatedAt`,key:`updatedAt`,width:180,render:e=>F9(e)}],loading:Ie,scroll:{x:`max-content`},pagination:{current:Me,pageSize:Pe,total:Ae,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:ut},rowKey:(e,t)=>e.task_id||e.resource_id||t,size:`small`})]}),_&&y&&(0,$.jsx)(NK,{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:y.title||`预览`})]}),open:_,onCancel:Je,width:1200,footer:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`#fff`,borderTop:`1px solid #f1f5f9`},children:[(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(M0,{}),onClick:()=>{x.current&&x.current.pause();let e=`http://ceshi.apiforeign.minzhong.cn${y.videoUrl||y.imageUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=``,document.body.appendChild(t),t.click(),document.body.removeChild(t)},style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,fontWeight:600,padding:`8px 24px`},disabled:Ge(y.videoUrl||y.imageUrl),children:Ge(y.videoUrl||y.imageUrl)?`资源已过期`:`下载`}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(k$,{}),onClick:()=>{let e=``,t=``;if(r===`shot_replicate`?(e=y.shotSegmentId,t=(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:8},children:`以下内容所连带的图片和视频都将被删除:`}),(0,$.jsx)(`ul`,{style:{margin:0,paddingLeft:20},children:(0,$.jsxs)(`li`,{style:{marginBottom:4,color:`#334155`},children:[y.shotReplicateProjectTitle,`— —`,y.shotSegmentLabel]})}),(0,$.jsx)(`div`,{style:{marginTop:12},children:`确定删除吗?`})]})):r===`hot_opening_replicate`?(e=y.moduleProjectId,t=(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:8},children:`爆款开头复刻中以下内容所连带的图片和视频都将被删除:`}),(0,$.jsx)(`ul`,{style:{margin:0,paddingLeft:20},children:(0,$.jsx)(`li`,{style:{marginBottom:4,color:`#334155`},children:y.moduleProjectTitle})}),(0,$.jsx)(`div`,{style:{marginTop:12},children:`确定删除吗?`})]})):(e=y.id,t=`确定删除该记录吗?`),!e){Z.warning(`无法获取删除ID`);return}NK.confirm({title:`确认删除`,content:t,okText:`确定删除`,cancelText:`取消`,okButtonProps:{danger:!0},onOk:async()=>{let t=``;r===`project`?t=`generation_record`:r===`creation`?t=`chat_task`:r===`hot_opening_replicate`?t=`hot_opening_replicate`:r===`shot_replicate`&&(t=`shot_replicate`);let n={history_source:t,ids:[e]};try{await T7(n),Z.success(`删除成功`),Je(),u(e=>({...e,page:1})),gt()}catch{Z.error(`删除失败,请重试`)}}})},style:{borderRadius:8,background:`linear-gradient(135deg, #bf0b0a 0%, #ff8165 100%)`,fontWeight:600,padding:`8px 24px`},disabled:Ge(y.videoUrl||y.imageUrl),children:`删除`}),(0,$.jsx)(X,{onClick:it,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:600,padding:`8px 24px`},disabled:Ge(y.videoUrl||y.imageUrl),children:`推送媒体后台`})]}),style:{borderRadius:16,overflow:`hidden`},styles:{body:{height:500,display:`flex`,flexDirection:`column`,padding:0},header:{background:`#fff`,borderBottom:`1px solid #f1f5f9`,padding:`16px 24px`},mask:{backgroundColor:`rgba(0, 0, 0, 0.5)`}},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,height:`100%`,background:`#f8fafc`},children:[(0,$.jsx)(`div`,{style:{width:`70%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,padding:20},children:Ge(y.videoUrl||y.imageUrl)?(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`40px`,backgroundColor:`#fff`,borderRadius:12},children:[(0,$.jsx)(`div`,{style:{fontSize:48,marginBottom:16},children:`⚠️`}),(0,$.jsx)(`p`,{style:{fontSize:15,color:`#ef4444`,fontWeight:500,marginBottom:8},children:`资源已过期`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#94a3b8`},children:`请刷新页面重新加载`})]}):a===`video`?(0,$.jsx)(`video`,{ref:x,src:`http://ceshi.apiforeign.minzhong.cn${y.videoUrl}`,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:`100%`,borderRadius:12,objectFit:`contain`}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${y.imageUrl}&w=300&q=50`,alt:`预览`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:12}})}),(0,$.jsxs)(`div`,{style:{width:`30%`,height:`100%`,overflowY:`auto`,scrollbarWidth:`none`,backgroundColor:`#fff`,padding:24,borderLeft:`1px solid #f1f5f9`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:20},children:[(0,$.jsx)(`div`,{style:{width:2,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:1}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1e293b`,fontWeight:600},children:`文件信息`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:14},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`类型`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:a===`video`?`视频`:`图片`})]}),r===`hot_opening_replicate`&&(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:4},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`类属`}),(0,$.jsxs)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500,wordBreak:`break-all`,lineHeight:`1.5`},children:[`爆款复刻——`,y.moduleProjectTitle]})]}),r===`shot_replicate`&&(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:4},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`类属`}),(0,$.jsxs)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500,wordBreak:`break-all`,lineHeight:`1.5`},children:[y.shotReplicateProjectTitle,`— —`,y.shotSegmentLabel]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`请求`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500,wordBreak:`break-all`,lineHeight:`1.5`},children:y.originalPrompt})]}),a===`image`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:y.imageProportion})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:y.imageSize})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`尺寸`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:y.imagePx})]})]}),a===`video`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:y.aspectRatio})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:y.resolution})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`时长`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:`${y.duration}秒`||`-`})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`创建时间`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:F9(y.createdAt||y.generatedDate)})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`生成引擎`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:y.engine||y.engineName||`-`})]})]}),(0,$.jsx)(`div`,{style:{borderTop:`1px solid #f1f5f9`,margin:`20px 0`}}),y.mediaReferences&&y.mediaReferences.length>0&&![`hot_opening_replicate`,`shot_replicate`].includes(r)&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:16},children:[(0,$.jsx)(`div`,{style:{width:2,height:18,background:`linear-gradient(180deg, #3b82f6 0%, #60a5fa 100%)`,borderRadius:1}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1e293b`,fontWeight:600},children:`依靠附件`})]}),y.mediaReferences.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>{x.current&&x.current.pause();let t=`http://ceshi.apiforeign.minzhong.cn${e.url}`;window.open(t,`_blank`)},style:{display:`flex`,alignItems:`center`,gap:10,padding:`10px 12px`,borderRadius:8,cursor:`pointer`,backgroundColor:`#f8fafc`,marginBottom:8,transition:`all 0.25s ease`,border:`1px solid transparent`},onMouseEnter:e=>{let t=e.currentTarget;t.style.backgroundColor=`#e0f2fe`,t.style.borderColor=`#bae6fd`},onMouseLeave:e=>{let t=e.currentTarget;t.style.backgroundColor=`#f8fafc`,t.style.borderColor=`transparent`},children:[e.type===`image`?(0,$.jsx)(e8,{style:{color:`#3b82f6`,fontSize:16}}):(0,$.jsx)(v5,{style:{color:`#f59e0b`,fontSize:16}}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:e.name||`媒体${t+1}`})]},e.url))]})]})]})}),(0,$.jsx)(NK,{title:He.size===1?`推送配置`:`批量推送配置`,open:k,onCancel:()=>{A(!1),M([[]]),P([``]),H([void 0]),W(new Map),G(``)},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:[`选中素材 (`,He.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)(tG,{value:ee,onChange:e=>G(e.target.value),placeholder:`输入名称后点击应用`,style:{flex:1,borderRadius:8},size:`small`}),(0,$.jsx)(X,{type:`primary`,size:`small`,onClick:()=>{ee.trim()&&He.size>0&&pt(Array.from(He),ee)},disabled:!ee.trim()||He.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 s.forEach(t=>{t.items.forEach(t=>{let n=Ye(t);e.set(n,t)})}),Array.from(He).map(t=>{let n=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=a===`video`?n?.videoCoverUrl:n?.imageUrl;if(!e)return(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`预览`});let t=`http://ceshi.apiforeign.minzhong.cn`,r=e.startsWith(`/`)?e.slice(1):e;return(0,$.jsx)(`img`,{src:`${t.endsWith(`/`)?t.slice(0,-1):t}/static/${r}&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:n?.fileName||`素材 ${n.id}`})}),(0,$.jsx)(tG,{value:U.has(t)?U.get(t):n?.fileName||``,onChange:e=>{let n=e.target.value,r=new Map(U);r.set(t,n),W(r)},onBlur:()=>{let e=U.get(t)||n?.fileName||``;e.trim()&&ft(t,e)},onKeyDown:e=>{if(e.key===`Enter`){let e=U.get(t)||n?.fileName||``;e.trim()&&ft(t,e)}},placeholder:`输入新名称`,style:{width:200,borderRadius:4},size:`small`})]},t)})})()})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#475569`},children:`是否开启前测:`}),(0,$.jsx)(NC,{value:ve,onChange:e=>{ye(e),e===`1`?p7().then(e=>{xe(e?.data?.id||``)}).catch(()=>{}):xe(``)},style:{width:120},options:[{value:`1`,label:`是`},{value:`2`,label:`否`}]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#475569`},children:`前测模板:`}),(0,$.jsx)(NC,{value:be,onChange:e=>xe(e),style:{width:200},disabled:ve!==`1`,loading:we,placeholder:ve===`1`?`选择前测模板`:`请先开启前测`,options:Se.map(e=>({value:e.id,label:e.name}))})]})]}),(0,$.jsx)(IL,{size:`small`,activeKey:ce,onChange:e=>{le(e),e===`history`&&ot()},items:[{key:`new`,label:`新增账户`},{key:`history`,label:`历史账户`}]}),ce===`new`&&(0,$.jsxs)(`div`,{children:[V.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]}),V.length>1&&(0,$.jsx)(X,{type:`text`,danger:!0,onClick:()=>{let e=[...V],n=[...N],r=[...j],i=[...oe];e.splice(t,1),n.splice(t,1),r.splice(t,1),i.splice(t,1),H(e),P(n),M(r),se(i)},children:`删除`})]}),(0,$.jsx)(NC,{value:e,onChange:e=>{let n=[...V];n[t]=e,H(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)(n$,{dataSource:F,columns:[{title:`授权账户ID`,dataIndex:`accountId`,key:`accountId`,width:120},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`,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||`-`})},{title:`授权用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,width:120}],loading:L,pagination:{current:re,pageSize:ae,total:z,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{ie(e),q(t),at(e,t)}},rowKey:`id`,size:`small`,scroll:{x:`max-content`},onRow:n=>({onClick:()=>{let e=String(n.id),r=[...V];r[t]={value:e,label:String(n.accountId)+`-`+(n.accountName||`-`)},H(r);let i=[...oe];i[t]=!1,se(i)},style:{cursor:`pointer`,backgroundColor:e?.value===String(n.id)?`#e6f7ff`:void 0}})})}),open:oe[t],onOpenChange:e=>{let n=[...oe];n[t]=e,se(n),e&&at(1,ae)},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)(tG.TextArea,{value:N[t],onChange:e=>{let n=e.target.value,r=[...N];r[t]=n,P(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=[...j];c[t]=s,M(c)},placeholder:`粘贴账户ID,每行一个或用逗号分隔,例如: + `})]}):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)(VG,{current:p,pageSize:h,total:_,onChange:K,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)(v5,{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:u9(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)(v5,{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)(R0,{style:{width:`100%`},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}V(!0);try{let r=await lie(e,t.duration);D(e),k(r.url),j(r.resource_id||``),N(t.duration),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{V(!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:B?(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)(v5,{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:`上传产品图片`}),I?(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`img`,{src:u9(I),alt:`产品图片`,style:{width:`100%`,borderRadius:12,maxHeight:200,objectFit:`contain`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`}}),(0,$.jsx)(`button`,{onClick:()=>{I&&URL.revokeObjectURL(I),F(null),L(``)},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)(e8,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#475569`},children:P?.name}),(0,$.jsxs)(`span`,{style:{fontSize:11,color:`#94a3b8`},children:[`(`,P?.size?(P.size/1024/1024).toFixed(2):0,`MB)`]})]})]}):(0,$.jsx)(R0,{style:{width:`100%`},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),U(!0);try{let t=await cie(e);F(e),L(t.url),z(t.resource_id||``),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{U(!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:H?(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)(e8,{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)(tG,{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)(tG,{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)(Poe,{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)(X,{type:`primary`,block:!0,size:`large`,onClick:()=>{if(!O){Z.warning(`请上传复刻视频`);return}if(!I){Z.warning(`请上传产品图片`);return}if(!y.trim()){Z.warning(`请输入原视频产品名称`);return}if(!x.trim()){Z.warning(`请输入自有产品名称`);return}if(!w.trim()){Z.warning(`请输入产品卖点`);return}Eie({material_video_url:O,material_image_url:I,material_video_resource_id:A||void 0,material_image_resource_id:R||void 0,material_video_duration_seconds:M||void 0,source_project_name:y,target_project_name:x,core_content_point:w,idempotency_key:Date.now().toString()}).then(t=>{let r=``,i=``;k(``),j(``),N(null),L(``),z(``),b(``),C(``),T(``),ne(1,8),a7(1,20).then(t=>{if(t.items){let a=t.items[0].id;n(t.items),o7(t.items[0].id).then(t=>{r=t.id,i=t.steps[0].id,Die(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)(NK,{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:W,onCancel:()=>ee(!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)(tG,{placeholder:`搜索产品名称`,value:l,onChange:e=>u(e.target.value),onPressEnter:ae,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)(X,{type:`primary`,onClick:ae,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)(n$,{columns:[{title:`产品名称`,dataIndex:`targetProjectName`,key:`targetProjectName`,align:`center`,width:100,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:220,render:(t,n)=>(0,$.jsxs)(EH,{children:[(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:`查看详情`}),(0,$.jsx)(LK,{title:`确认删除这个爆款开头复刻任务吗?`,onConfirm:async()=>{try{await Jie(n.id),Z.success(`删除成功`),re(1,a,!1,l)}catch{Z.error(`删除失败`)}},children:(0,$.jsx)(`button`,{style:{color:`#ef4444`,textDecoration:`none`,fontSize:13,border:`none`,background:`rgba(239, 68, 68, 0.08)`,padding:`4px 12px`,borderRadius:8,cursor:`pointer`,transition:`all 0.2s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.12)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.08)`},children:`删除`})})]})}],dataSource:t,rowKey:`id`,pagination:{current:r,pageSize:a,total:s,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:ie,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 d9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function f9(e,...t){for(let n of t){let t=e[n];if(t!=null&&String(t).trim()!==``)return String(t)}return``}function p9(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 Loe(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 m9(e){if(!d9(e))return null;let t=f9(e,`key`);return t?{key:t,label:f9(e,`label`)||t,type:f9(e,`type`)||void 0,enabled:p9(e,!0,`enabled`),editable:p9(e,!0,`editable`),maxLength:Loe(e,`maxLength`,`max_length`)}:null}function h9(e){if(!d9(e))return null;let t=e.data;return d9(t)?t:Array.isArray(e.sections)?e:null}function Roe(e){return!!h9(e)}function g9(e){let t=h9(e);return(Array.isArray(t?.sections)?t.sections:[]).map(e=>{let t=m9(e);if(!t||!d9(e))return null;let n=Array.isArray(e.children)?e.children.map(m9).filter(Boolean):[],r=Array.isArray(e.itemFields)?e.itemFields.map(m9).filter(Boolean):Array.isArray(e.item_fields)?e.item_fields.map(m9).filter(Boolean):[];return{...t,contentKey:f9(e,`contentKey`,`content_key`)||void 0,children:n,itemFields:r}}).filter(e=>!!e&&e.enabled)}function _9(e){if(e==null)return``;if(typeof e==`object`)try{return JSON.stringify(e,null,2)}catch{return String(e)}return String(e)}function v9(e){let t=_9(e);return t.length>40||t.includes(` +`)||t.includes(`,`)||t.includes(`。`)||t.includes(`;`)||t.includes(`;`)}function y9(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function b9(e,t,n,r){let i=y9(e||{});return d9(i[t])||(i[t]={}),i[t][n]=r,i}function x9(e,t,n,r,i){let a=y9(e||{});return Array.isArray(a[t])||(a[t]=[]),d9(a[t][n])||(a[t][n]={}),a[t][n][r]=i,a}function S9(e,t){if(!d9(e))return`视频提示词不能为空`;let n=g9(t);if(!n.length)return`视频提词配置缺失,无法保存`;for(let t of n){if(!t.editable)continue;let n=e[t.key];if(t.type===`object`){if(!d9(n))continue;for(let e of t.children)if(!(!e.enabled||!e.editable||!e.maxLength)&&_9(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&&_9(n).length>t.maxLength)return`字段【${t.label}】长度不能超过 ${t.maxLength} 个字符`}return null}var{Text:C9}=Q,{TextArea:w9}=tG;function T9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function E9({value:e}){let t=e===`true`?`是`:e===`false`?`否`:_9(e);return v9(e)?(0,$.jsx)(w9,{value:t,rows:Math.min(6,Math.max(2,Math.ceil(t.length/42))),disabled:!0,style:{borderRadius:8,color:`#64748b`}}):(0,$.jsx)(tG,{value:t,disabled:!0,style:{borderRadius:8,color:`#64748b`}})}function D9({value:e,maxLength:t,onChange:n}){let r=_9(e),i={value:r,maxLength:t,showCount:!!t,onChange:e=>n(e.target.value),style:{borderRadius:8}};return v9(e)?(0,$.jsx)(w9,{...i,rows:Math.min(8,Math.max(3,Math.ceil(r.length/42)))}):(0,$.jsx)(tG,{...i})}function O9({value:e,onChange:t}){let n=e===!0||e===`true`;return(0,$.jsxs)(HI.Group,{value:n,onChange:e=>t(e.target.value),style:{display:`flex`,gap:24},children:[(0,$.jsx)(HI,{value:!0,style:{fontSize:14,color:`#475569`},children:`是`}),(0,$.jsx)(HI,{value:!1,style:{fontSize:14,color:`#475569`},children:`否`})]})}var k9=({value:e,schemaConfigSnapshot:t,onChange:n})=>{let r=T9(e)?e:{},i=g9(t);if(!Roe(t))return(0,$.jsxs)(EH,{direction:`vertical`,size:12,style:{width:`100%`},children:[(0,$.jsx)(Jf,{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)(Jf,{type:`warning`,showIcon:!0,message:`视频提词配置为空`,description:`当前 Schema 配置没有可展示字段。`});let a=e=>{let t=T9(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)(EH,{style:{marginBottom:8},children:(0,$.jsx)(C9,{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)(EH,{style:{marginBottom:4},children:(0,$.jsx)(C9,{style:{color:`#64748b`,fontSize:12},children:i.label})}),i.editable?i.type===`boolean`?(0,$.jsx)(O9,{value:t[i.key],onChange:t=>n(b9(r,e.key,i.key,t))}):(0,$.jsx)(D9,{value:t[i.key],maxLength:i.maxLength,onChange:t=>n(b9(r,e.key,i.key,t))}):(0,$.jsx)(E9,{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)(EH,{style:{marginBottom:8},children:[(0,$.jsx)(C9,{strong:!0,style:{color:`#334155`,fontSize:13},children:e.label}),(0,$.jsx)(h$,{color:`default`,children:`锁定条目和时间段`})]}),(0,$.jsx)(`div`,{style:{border:`1px solid #e5e7eb`,borderRadius:10,padding:12,background:`#fff`},children:t.length===0?(0,$.jsx)(C9,{style:{color:`#94a3b8`,fontSize:12},children:`暂无内容`}):t.map((a,o)=>{let s=T9(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)(C9,{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)(EH,{style:{marginBottom:4},children:(0,$.jsx)(C9,{style:{color:`#64748b`,fontSize:12},children:t.label})}),t.editable?t.type===`boolean`?(0,$.jsx)(O9,{value:s[t.key],onChange:i=>n(x9(r,e.key,o,t.key,i))}):(0,$.jsx)(D9,{value:s[t.key],maxLength:t.maxLength,onChange:i=>n(x9(r,e.key,o,t.key,i))}):(0,$.jsx)(E9,{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)(EH,{style:{marginBottom:8},children:(0,$.jsx)(C9,{strong:!0,style:{color:`#334155`,fontSize:13},children:e.label})}),e.editable?(0,$.jsx)(D9,{value:r[e.key],maxLength:e.maxLength,onChange:t=>{let i=y9(r);i[e.key]=t,n(i)}}):(0,$.jsx)(E9,{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:zoe,Text:A9}=Q,{TextArea:Boe}=tG;function Voe(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function Hoe(){let e=Ye(),{creatID:t}=$e(),[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)(``),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)(5),[N,P]=(0,S.useState)(`16:9`),[F,I]=(0,S.useState)(`480p`),[L,R]=(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]}),[z,B]=(0,S.useState)([]),[V,H]=(0,S.useState)(1),[U,W]=(0,S.useState)(20),[ee,G]=(0,S.useState)(0),[te,ne]=(0,S.useState)(``),[K,re]=(0,S.useState)({}),[ie,ae]=(0,S.useState)([]),[q,oe]=(0,S.useState)([]),[se,ce]=(0,S.useState)(!1),[le,ue]=(0,S.useState)(``),[de,fe]=(0,S.useState)(`image`),pe=S.useRef(null);(0,S.useEffect)(()=>{if(se&&de===`video`){let e=()=>{pe.current&&pe.current.play().catch(()=>{})};pe.current&&(pe.current.readyState>=2?e():pe.current.addEventListener(`loadedmetadata`,e));let t=setTimeout(e,300);return()=>{clearTimeout(t),pe.current&&(pe.current.removeEventListener(`loadedmetadata`,e),pe.current.pause())}}else pe.current&&pe.current.pause()},[se,de]);let me=(e,t)=>{console.log(e,t),ue(e),fe(t),ce(!0)},he=()=>{ce(!1),ue(``),pe.current&&pe.current.pause()},ge=e=>{if(e.preventDefault(),e.stopPropagation(),!le)return;let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${le}&download=1`,t.download=de===`image`?`image.png`:`video.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},_e=[{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:ie[t]?.status||``,id:ie[t]?.id||t,output:ie[t]?.output||``,engineId:ie[t]?.input?.payload?.videoConfig?.engineId||``}));(0,S.useEffect)(()=>{let e=new Set;q.forEach(t=>{let n=_e.find(e=>String(e.childId)===t);n&&(n.status===`completed`||n.status===`failed`)&&e.add(t)});for(let t=_e.length-1;t>=0;t--)if(_e[t].status===`completed`||_e[t].status===`failed`){e.add(String(_e[t].childId));break}e.size>0?oe(Array.from(e)):oe([])},[ie]);let ve=(e,t,n)=>{a7(e,t,n).then(e=>{e.items&&B(e.items),e.total!==void 0&&G(e.total)}).catch(e=>{})},ye=(e,t)=>{H(e),W(t),ve(e,t,te)},be=()=>{H(1),ve(1,U,te)};(0,S.useEffect)(()=>{ve(V,U)},[]),(0,S.useEffect)(()=>{n7().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];R({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]})}e.engine?.image&&e.engine.image.length>0&&E(e.engine.image[0].id)}).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`)&&(O(!1),A(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,S.useEffect)(()=>{t&&o7(t).then(e=>{re(e),e.steps&&ae(e.steps)}).catch(e=>{})},[t]),(0,S.useEffect)(()=>{let e=_e[4];e&&e.status!==`completed`&&e.status!==`failed`?v||y(setInterval(Ce,15e3)):e&&v&&(clearInterval(v),y(null))},[_e]);let xe=(e,t,n,i)=>{l(t||`image`),h(n?String(n):``),t===`video`?(p(i||null),d(e&&typeof e==`object`?Voe(e):{}),a(``)):(p(null),a(e||``),d({})),r(!0)},Se=async()=>{if(c===`image`){if(!K?.id||!m){Z.warning(`缺少任务或步骤 ID,无法保存图片提示词`);return}if(!i||!i.trim()){Z.warning(`图片提示词不能为空`);return}_(!0);try{await Oie(K.id,m,{prompt:i.trim()}),Z.success(`图片提示词已保存`),we(),r(!1),h(``)}catch(e){Z.error(e?.message||`保存图片提示词失败`)}finally{_(!1)}return}if(!K?.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=S9(u,f);if(e){Z.warning(e);return}_(!0);try{await Pie(K.id,m,{prompt_schema:u}),Z.success(`视频提示词已保存`),we(),r(!1),h(``)}catch(e){Z.error(e?.message||`保存视频提示词失败`)}finally{_(!1)}},Ce=()=>{t&&o7(t).then(e=>{re(e),e.steps&&ae(e.steps)}).catch(e=>{})},we=()=>{t&&o7(t).then(e=>{re(e),e.steps&&ae(e.steps)}).catch(e=>{})},Te=e=>{let t={engine_id:T,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};s7(K.id,e.toString(),t).then(e=>{Z.info(`正在生成图片,请稍候...`),we()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Ee=()=>{let e={engine_id:T,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};s7(K.id,_e[1].id.toString(),e).then(e=>{Z.info(`正在生成图片,请稍候...`),we()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},De=e=>{let t={engine_id:C,duration:j,aspect_ratio:N,resolution:F,target_platform:`抖音`};kie(K.id,e.toString(),t).then(e=>{we(),Z.info(`正在生成视频提示词,请稍候...`)}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Oe=(e,t)=>{c7(K.id,e.toString(),{engine_id:``}).then(e=>{Z.info(`正在生成视频,请稍候...`),we()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},ke=()=>{c7(K.id,_e[3].id.toString(),{engine_id:``}).then(e=>{Z.info(`正在生成视频,请稍候...`),we()}).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)(X,{icon:(0,$.jsx)(z2,{}),onClick:()=>e(-1),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},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)(X,{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)`,cursor:K?.material?.materialVideoUrl?`pointer`:`default`},onClick:()=>K?.material?.materialVideoUrl&&me(K.material.materialVideoUrl,`video`),children:K?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:K.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)`,cursor:K?.material?.materialImageUrl?`pointer`:`default`},onClick:()=>K?.material?.materialImageUrl&&me(K.material.materialImageUrl,`image`),children:K?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:K.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:`暂无图片`})})]})]}),(0,$.jsx)(`div`,{style:{margin:`20px 0`,height:1,background:`linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.15), transparent)`,borderRadius:.5}}),K?.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)`,cursor:`pointer`},onClick:()=>me(K.finalImageUrl,`image`),children:(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${K.finalImageUrl}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})}),K?.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)`,cursor:`pointer`},onClick:()=>me(K.finalVideoUrl,`video`),children:(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${K.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)($g,{activeKey:q,onChange:oe,ghost:!0,bordered:!1,style:{background:`transparent`},expandIconPlacement:`end`,items:_e.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)(A4,{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)(A9,{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:K?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:K.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)(A9,{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:K?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:K.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)(A9,{style:{color:`#475569`,fontSize:13,lineHeight:1.8,whiteSpace:`pre-wrap`},children:e?.output?.payload?.prompt||`暂无提示词`})}),(0,$.jsxs)(EH,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(Z$,{}),onClick:()=>xe(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)(X,{onClick:()=>{Te(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:[K.finalImageUrl?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${K.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)(X,{type:`default`,icon:(0,$.jsx)(Z$,{}),onClick:()=>Ee(),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:()=>{O(!D),A(!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)(z8,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(A9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:b.video?.find(e=>e.id===C)?.name||`选择引擎`})]}),D&&(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)(A9,{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),R({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(N)||P(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(F)||I(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(j)||M(e.supportedDurations?.[0]||5),O(!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:()=>{A(!k),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)(o6,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(A9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[N,` · `,j,`s · `,F]})]}),k&&(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)(A9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:L.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>P(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:N===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:N===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 ${N===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:N===e?`#6366f1`:`#6b7280`,fontWeight:N===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(A9,{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:`${(j-Math.min(...L.durations))/(Math.max(...L.durations)-Math.min(...L.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...L.durations),max:Math.max(...L.durations),value:j,onChange:e=>M(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:j}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(A9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:L.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>I(e),style:{flex:1,height:42,borderRadius:6,border:F===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:F===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:F===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(X,{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:()=>{De(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)(A9,{style:{color:`#64748b`,fontSize:13,lineHeight:1.8},children:`视频提词已生成,可点击按钮查看/修改`})}),(0,$.jsxs)(EH,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(Z$,{}),onClick:()=>xe(K?.videoGeneration?.promptSchema,`video`,e.id,K?.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`||!K?.videoGeneration?.promptSchema||!K?.videoGeneration?.schemaConfigSnapshot,children:`查看/修改视频提词`}),(0,$.jsx)(X,{onClick:()=>{Oe(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`&&K?.finalVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${K.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)(EH,{style:{width:`100%`,gap:12},children:[(0,$.jsx)(X,{onClick:()=>ke(),type:`default`,icon:(0,$.jsx)(Z$,{}),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)(X,{type:`primary`,icon:(0,$.jsx)(M0,{}),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${K?.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)(NK,{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)(X,{onClick:()=>r(!1),disabled:g,style:{borderRadius:8},children:`取消`},`cancel`),(0,$.jsx)(X,{type:`primary`,onClick:Se,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)(Boe,{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)(k9,{value:u,schemaConfigSnapshot:f,onChange:d})})}),(0,$.jsxs)(NK,{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:o,onCancel:()=>s(!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)(tG,{placeholder:`搜索产品名称`,value:te,onChange:e=>ne(e.target.value),onPressEnter:be,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)(X,{type:`primary`,onClick:be,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(n$,{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:z,rowKey:`id`,pagination:{current:V,pageSize:U,total:ee,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:ye},style:{fontSize:13},scroll:{y:350}})]}),(0,$.jsx)(NK,{open:se,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #8b5cf6 0%, #ddd6fe 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`预览`})]}),onCancel:he,width:800,footer:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,borderTop:`1px solid rgba(139, 92, 246, 0.08)`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(M0,{}),onClick:ge,style:{borderRadius:10,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,border:`none`,boxShadow:`0 8px 18px rgba(47, 52, 64, 0.15)`},children:`下载`})}),centered:!0,style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(139, 92, 246, 0.08)`,padding:`16px 24px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:de===`image`?(0,$.jsx)(`img`,{src:le.startsWith(`http`)?le:`http://ceshi.apiforeign.minzhong.cn${le}`,alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:pe,src:le.startsWith(`http`)?le:`http://ceshi.apiforeign.minzhong.cn${le}`,controls:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})})]})}var Uoe={pending_analysis:{label:`等待分析`,color:`default`},analyzing:{label:`分析中`,color:`processing`},analysis_completed:{label:`分析完成`,color:`blue`},analysis_failed:{label:`分析失败`,color:`red`},splitting:{label:`拆镜中`,color:`processing`},split_completed:{label:`拆镜完成`,color:`green`},partial_failed:{label:`部分失败`,color:`orange`},failed:{label:`失败`,color:`red`},deleted:{label:`已软删`,color:`default`}},Woe=e=>{let t=Uoe[e]||{label:e,color:`default`};return(0,$.jsx)(h$,{color:t.color,children:t.label})};function Goe(){let e=Ye(),[t,n]=(0,S.useState)(``),[r,i]=(0,S.useState)(``),[a,o]=(0,S.useState)(``),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(0),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)([]),[_,v]=(0,S.useState)(1),[y,b]=(0,S.useState)(10),[x,C]=(0,S.useState)(0),[w,T]=(0,S.useState)(``),E=(0,S.useRef)(null),D=(0,S.useRef)(null),O=(0,S.useCallback)(()=>{t&&URL.revokeObjectURL(t),n(``),i(``),o(``),f(0),u(``)},[t]),k=async e=>{if(!e.type.startsWith(`video/`))return o(`请选择视频文件`),!1;if(e.size>100*1024*1024)return o(`视频文件大小不能超过 100MB`),!1;let t=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)});if(t>60)return o(`视频时长不能超过 1分钟`),!1;O(),m(!0);try{let r=await die(e,t);n(r.url),i(r.resource_id||``),o(``),Z.success(`视频上传成功`)}catch{o(`视频上传失败,请重试`),Z.error(`视频上传失败`)}finally{m(!1)}return!1},A=(0,S.useCallback)(()=>{E.current&&f(E.current.duration)},[]),j=async()=>{if(!t||!l.trim()){Z.warning(`请先上传视频并输入产品名称`);return}m(!0);try{Fie({video_url:t,video_duration_seconds:d,video_resource_id:r||void 0,title:l.trim(),idempotency_key:`shot_${Date.now()}`}).then(t=>{m7(1,20,w).then(t=>{Z.loading(`创建中...`,3),setTimeout(()=>{e(`/removelens/${t.items[0].id}/removeinfo`)},3e3)})}),O()}catch{Z.error(`任务创建失败,请重试`)}finally{m(!1)}},M=async(e,t,n)=>{try{let r=await m7(e,t,n);g(r.items||[]),C(r.total||0),v(e),b(t)}catch{Z.error(`获取列表失败`)}},N=(e,t)=>{M(e,t,w)},P=()=>{M(1,10,w)};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(${roe})`,backgroundRepeat:`no-repeat`,backgroundSize:`100% 100%`,backgroundPosition:`center`},children:(0,$.jsxs)(`div`,{style:{maxWidth:1200,margin:`0 auto`,position:`relative`,zIndex:10},children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`16px 24px`,borderRadius:16,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:(0,$.jsxs)(`div`,{children:[(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:`AI视频拆镜工作台`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`精细化镜头复刻工具,拆分参考视频单镜头独立复刻,提升素材原创度,规避素材同质化`})]})}),(0,$.jsx)(X,{type:`primary`,ghost:!0,icon:(0,$.jsx)(jH,{}),onClick:()=>{c(!0),M(1,10,w)},style:{borderRadius:10,padding:`6px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`创作记录`})]}),(0,$.jsxs)(`div`,{style:{width:`100%`,maxWidth:720,margin:`0 auto`},children:[a&&(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:a}),!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)(R0.Dragger,{accept:`video/*`,beforeUpload:k,showUploadList:!1,disabled:p,style:{background:p?`rgba(243, 244, 246, 0.3)`:`transparent`,border:`2px dashed ${p?`rgba(209, 213, 219, 0.5)`:`rgba(99, 102, 241, 0.3)`}`,borderRadius:24,padding:`56px 20px`,cursor:p?`not-allowed`:`pointer`,margin:0},children:p?(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)(H4,{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)(LK,{title:`确定要删除吗?`,okText:`确定`,cancelText:`取消`,onConfirm:O,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:E,src:`http://ceshi.apiforeign.minzhong.cn${t}`,controls:!0,onLoadedMetadata:A,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)(tG,{placeholder:`请输入产品名称`,value:l,onChange:e=>u(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:j,disabled:!t||!l.trim()||p,style:{padding:`14px 56px`,background:t&&l.trim()&&!p?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`:`#e2e8f0`,color:`white`,border:`none`,borderRadius:12,fontSize:15,fontWeight:600,cursor:t&&l.trim()&&!p?`pointer`:`not-allowed`,boxShadow:t&&l.trim()&&!p?`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&&l.trim()&&!p&&(e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 8px 25px rgba(99, 102, 241, 0.4)`)},onMouseLeave:e=>{t&&l.trim()&&!p&&(e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.3)`)},children:(0,$.jsx)(`span`,{children:p?`创建中...`:`创建`})})})]})]}),(0,$.jsx)(`canvas`,{ref:D,style:{display:`none`}}),(0,$.jsxs)(NK,{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:s,onCancel:()=>c(!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)(tG,{placeholder:`搜索产品名称`,value:w,onChange:e=>T(e.target.value),onPressEnter:P,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)(X,{type:`primary`,onClick:P,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)(n$,{columns:[{title:`产品名称`,dataIndex:`title`,key:`title`,render:e=>(0,$.jsx)(`span`,{style:{fontSize:14,color:`#1e293b`,fontWeight:500},children:e})},{title:`状态`,dataIndex:`status`,key:`status`,render:e=>Woe(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,$.jsxs)(EH,{children:[(0,$.jsx)(X,{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:`查看详情`}),(0,$.jsx)(LK,{title:`确认删除这个拆镜项目吗?`,onConfirm:async()=>{try{await qie(t.id),Z.success(`删除成功`),M(_,y,w)}catch{Z.error(`删除失败`)}},children:(0,$.jsx)(X,{type:`text`,danger:!0,style:{color:`#ef4444`,fontSize:13,padding:`4px 12px`,borderRadius:6,background:`rgba(239, 68, 68, 0.1)`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`},children:`删除`})})]})}],dataSource:h,rowKey:`id`,pagination:{current:_,pageSize:y,total:x,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:N,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 Koe=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 te(e,t,g,15,8,0)},n.deflateInit2=te,n.deflateReset=G,n.deflateResetKeep=ee,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--)ee(e,a,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ee(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++,ee(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?ie(e,t,n,r):e.strategy===4||s===o?(R(e,2+ +!!r,3),G(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),{Text:qoe}=Q,j9=e=>e?/^(https?:|data:|blob:)/i.test(e)?e:`${`http://ceshi.apiforeign.minzhong.cn`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,Joe=e=>e===`video`?(0,$.jsx)(v5,{}):e===`audio`?(0,$.jsx)(J2,{}):(0,$.jsx)(e8,{}),Yoe=e=>e===`video`?`视频`:e===`audio`?`音频`:`图片`,M9=e=>{let t=Number(e||0);return t>=1024*1024?`${(t/1024/1024).toFixed(1)} MB`:t>=1024?`${(t/1024).toFixed(1)} KB`:`${t} B`},Xoe=()=>{let[e,t]=(0,S.useState)(``),[n,r]=(0,S.useState)(``),[i,a]=(0,S.useState)(1),[o,s]=(0,S.useState)(10),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)([]),[f,p]=(0,S.useState)(0),[m,h]=(0,S.useState)(new Set),[g,_]=(0,S.useState)(null),[v,y]=(0,S.useState)(!1),b=(0,S.useMemo)(()=>u.flatMap(e=>e.items||[]),[u]),x=(0,S.useCallback)(async()=>{l(!0);try{let t=await D7({resourceType:e||void 0,keyword:n||void 0,page:i,pageSize:o,scene:`record`});d(t.groups||[]),p(t.totalDays||0),h(new Set)}catch(e){Z.error(e?.message||`加载历史上传素材失败`),d([]),p(0)}finally{l(!1)}},[n,i,o,e]);(0,S.useEffect)(()=>{x()},[x]);let C=e=>{h(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},w=()=>{let e=b.map(e=>e.id);h(t=>t.size===e.length?new Set:new Set(e))},T=async t=>{let r=(t.page||1)+1;try{let i=await O7(t.generatedDate,{resourceType:e||void 0,keyword:n||void 0,page:r,pageSize:10,scene:`record`});d(e=>e.map(e=>e.generatedDate===t.generatedDate?{...e,page:r,items:[...e.items,...i.items||[]]}:e))}catch(e){Z.error(e?.message||`加载更多失败`)}},E=e=>{NK.confirm({title:`确认删除历史上传素材`,content:`确定删除 ${e.fileName||e.id} 吗?删除后会释放上传容量,并在提交成功后清理真实文件。`,okText:`删除`,okButtonProps:{danger:!0},cancelText:`取消`,onOk:async()=>{try{await K5(e.resourceUrl),Z.success(`删除成功`),x()}catch(e){Z.error(e?.message||`删除失败`)}}})},D=()=>{if(m.size===0){Z.warning(`请先选择要删除的上传素材`);return}if(m.size>30){Z.warning(`一次最多删除 30 条上传素材`);return}let e=Array.from(m);NK.confirm({title:`确认批量删除历史上传素材`,content:`确定删除选中的 ${e.length} 条上传素材吗?删除后会释放上传容量,并在提交成功后清理真实文件。`,okText:`删除`,okButtonProps:{danger:!0},cancelText:`取消`,onOk:async()=>{try{let t=await sae(e);Z.success(`删除成功,释放 ${M9(t?.releasedSizeBytes||0)}`),x()}catch(e){Z.error(e?.message||`批量删除失败`)}}})},O=e=>{let t=document.createElement(`a`);t.href=j9(e.resourceUrl),t.download=e.fileName||e.id,document.body.appendChild(t),t.click(),document.body.removeChild(t)},k=(e,t=`card`)=>{let n=j9(e.previewUrl||e.displayUrl||e.resourceUrl),r=t===`card`?{width:`100%`,height:130,objectFit:`cover`}:{width:`100%`,maxHeight:620,objectFit:`contain`};return e.resourceType===`image`?(0,$.jsx)(`img`,{src:n,alt:e.fileName||e.id,style:r}):e.resourceType===`video`?(0,$.jsx)(`video`,{src:n,controls:t===`preview`,muted:t===`card`,style:r}):(0,$.jsx)(`audio`,{src:n,controls:!0,style:{width:`100%`}})};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:12,alignItems:`center`,marginBottom:16,flexWrap:`wrap`},children:[(0,$.jsxs)(EH,{wrap:!0,children:[(0,$.jsx)(NC,{value:e,style:{width:120},options:[{label:`全部`,value:``},{label:`图片`,value:`image`},{label:`视频`,value:`video`},{label:`音频`,value:`audio`}],onChange:e=>{t(e),a(1)}}),(0,$.jsx)(tG,{allowClear:!0,value:n,prefix:(0,$.jsx)(OC,{}),placeholder:`搜索文件名或URL`,style:{width:240},onChange:e=>r(e.target.value),onPressEnter:()=>{a(1),x()}})]}),(0,$.jsx)(EH,{children:v?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(X,{onClick:w,children:m.size&&m.size===b.length?`取消全选`:`全选`}),(0,$.jsxs)(X,{danger:!0,icon:(0,$.jsx)(k$,{}),onClick:D,children:[`批量删除 (`,m.size,`)`]}),(0,$.jsx)(X,{onClick:()=>{y(!1),h(new Set)},children:`取消批量操作`})]}):(0,$.jsx)(X,{onClick:()=>y(!0),children:`批量操作`})})]}),(0,$.jsx)(cK,{spinning:c,children:u.length===0?(0,$.jsx)(rC,{description:`暂无可展示的历史上传素材`,style:{padding:`60px 0`}}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:28},children:u.map(e=>(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{fontSize:18,fontWeight:700,color:`#1e293b`},children:e.generatedDate}),(0,$.jsxs)(qoe,{type:`secondary`,children:[`共 `,e.total,` 个素材`]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,justifyContent:`flex-start`},children:e.items.map(e=>{let t=m.has(e.id);return(0,$.jsxs)(`div`,{style:{width:`17%`,minWidth:240,margin:16,border:t?`2px solid #8b5cf6`:`1px solid #e2e8f0`,borderRadius:16,overflow:`hidden`,background:`#fff`,boxShadow:`0 10px 24px rgba(15,23,42,0.06)`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,background:`#f1f5f9`},children:[k(e),v&&(0,$.jsx)(oz,{checked:t,onChange:()=>C(e.id),style:{position:`absolute`,top:10,left:10,background:`#fff`,borderRadius:6,padding:4}}),(0,$.jsx)(h$,{color:`purple`,icon:Joe(e.resourceType),style:{position:`absolute`,top:10,right:10,margin:0},children:Yoe(e.resourceType)})]}),(0,$.jsxs)(`div`,{style:{padding:12,paddingTop:0},children:[(0,$.jsxs)(EH,{size:4,wrap:!0,style:{marginTop:8},children:[(0,$.jsx)(h$,{style:{margin:0},children:e.moduleLabel}),(0,$.jsx)(h$,{style:{margin:0},children:M9(e.fileSizeBytes)}),e.durationSeconds?(0,$.jsxs)(h$,{style:{margin:0},children:[Number(e.durationSeconds).toFixed(1),`s`]}):null]}),(0,$.jsxs)(EH,{style:{marginTop:12},children:[(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(NW,{}),onClick:()=>_(e),children:`预览`}),(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(M0,{}),onClick:()=>O(e),children:`下载`}),(0,$.jsx)(X,{size:`small`,danger:!0,icon:(0,$.jsx)(k$,{}),onClick:()=>E(e),children:`删除`})]})]})]},e.id)})}),e.items.lengthT(e),children:`加载更多`})})]},e.generatedDate))})}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:24},children:(0,$.jsx)(VG,{current:i,pageSize:o,total:f,showSizeChanger:!0,pageSizeOptions:[5,10],onChange:(e,t)=>{a(e),s(t)}})}),(0,$.jsx)(NK,{open:!!g,title:`预览`,footer:null,width:900,centered:!0,destroyOnHidden:!0,onCancel:()=>_(null),children:g?k(g,`preview`):null})]})},{Search:Zoe}=tG,{Text:Qoe}=Q,$oe=e=>{let t=S.useRef(!1);(0,S.useEffect)(()=>{if(t.current)return;let n=()=>{t.current||(t.current=!0,e?.())};return document.readyState===`complete`?n():window.addEventListener(`load`,n),()=>{window.removeEventListener(`load`,n)}},[e])},ese=()=>{let[e,t]=(0,S.useState)(!1);$oe(()=>{t(!0)});let[n]=On(),[r,i]=(0,S.useState)(n.get(`filterType`)===`private_portrait`?`private_portrait`:n.get(`filterType`)===`upload_resource`?`upload_resource`:`project`),[a,o]=(0,S.useState)(`video`),[s,c]=(0,S.useState)([]),[l,u]=(0,S.useState)({page:1,pageSize:10}),[d,f]=(0,S.useState)(0),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(new Set),[_,v]=(0,S.useState)(!1),[y,b]=(0,S.useState)(null),x=S.createRef(),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(``),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)([[]]),[N,P]=(0,S.useState)([``]),[F,I]=(0,S.useState)([]),[L,R]=(0,S.useState)(!1),[z,B]=(0,S.useState)(0),[V,H]=(0,S.useState)([void 0]),[U,W]=(0,S.useState)(new Map),[ee,G]=(0,S.useState)(``),[te,ne]=(0,S.useState)(new Map),K=(0,S.useRef)(new Map);(0,S.useEffect)(()=>()=>{K.current.forEach(e=>clearTimeout(e)),K.current.clear()},[]);let[re,ie]=(0,S.useState)(1),[ae,q]=(0,S.useState)(10),[oe,se]=(0,S.useState)([!1]),[ce,le]=(0,S.useState)(`new`),[ue,de]=(0,S.useState)([]),[fe,pe]=(0,S.useState)(!1),[me,he]=(0,S.useState)([]),[ge,_e]=(0,S.useState)({}),[ve,ye]=(0,S.useState)(`2`),[be,xe]=(0,S.useState)(``),[Se,Ce]=(0,S.useState)([]),[we,Te]=(0,S.useState)(!1),[Ee,De]=(0,S.useState)(!1),[Oe,ke]=(0,S.useState)([]),[Ae,je]=(0,S.useState)(0),[Me,Ne]=(0,S.useState)(1),[Pe,Fe]=(0,S.useState)(10),[Ie,Le]=(0,S.useState)(!1),[Re,ze]=(0,S.useState)(``),[Be,Ve]=(0,S.useState)(!1),[He,Ue]=(0,S.useState)(new Set),We=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}}},Ge=e=>{let t=We(e);return t?Math.floor(Date.now()/1e3)>t:!1},Ke=(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}`},qe=async e=>{if(b(e),v(!0),window.dispatchEvent(new Event(`previewOpen`)),e.videoUrl&&e.videoUrl.trim()&&!e.imagePx)try{let t=await ht(e.videoUrl);t&&b(e=>e&&{...e,imagePx:t})}catch{}},Je=()=>{x.current&&(x.current.pause(),x.current.currentTime=0),document.querySelectorAll(`video`).forEach(e=>{e.pause(),e.currentTime=0}),v(!1)},Ye=e=>e.generatedResourceId||e.id,Xe=e=>!!e.generatedResourceId,Ze=e=>{if(!e)return!0;let t=e.match(/^(\d+)x(\d+)$/);if(!t)return!0;let n=parseInt(t[1],10),r=parseInt(t[2],10),i=n/r;return n>=r?n>=480&&n<=2560&&r>=270&&r<=1440&&i>=1.775&&i<=1.784:n>=270&&n<=1440&&r>=480&&r<=2560&&i>=.555&&i<=.564},Qe=e=>{Ue(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},$e=()=>{let e=s.flatMap(e=>e.items.map(e=>Ye(e)));He.size===e.length?Ue(new Set):Ue(new Set(e))},et=async()=>{if(He.size===0){Z.warning(`请先选择要下载的媒体`);return}if(He.size>30){Z.warning(`最多只能单次下载30个文件`);return}let e=[];s.forEach(t=>{t.items.forEach(t=>{He.has(Ye(t))&&e.push(t)})});let t=new Koe.default,n=`http://ceshi.apiforeign.minzhong.cn`,r=t.folder(`downloads`),i=!1,a=0;Z.loading({content:`下载中,请稍候...`,key:`downloadProgress`});for(let t of e){let e=`${n}${t.videoUrl||t.imageUrl}`,o=((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(o,n),a++}catch{console.warn(`文件下载失败(CORS限制): ${o},将使用备用方式下载`),i=!0;break}}if(i){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 o=await t.generateAsync({type:`blob`}),c=document.createElement(`a`);c.href=URL.createObjectURL(o),c.download=`downloads_${Date.now()}.zip`,c.click(),URL.revokeObjectURL(c.href),Z.destroy(`downloadProgress`),Z.success(`下载完成,共 ${a} 个文件`),Ve(!1),Ue(new Set)},tt=async()=>{if(He.size===0){Z.warning(`请先选择要删除的媒体`);return}if(He.size>30){Z.warning(`最多只能单次删除30个文件`);return}let e=s.flatMap(e=>e.items.filter(e=>He.has(Ye(e)))),t=``;t=r===`shot_replicate`?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:8},children:`以下内容所连带的图片和视频都将被删除:`}),(0,$.jsx)(`ul`,{style:{margin:0,paddingLeft:20},children:e.map((e,t)=>(0,$.jsxs)(`li`,{style:{marginBottom:4,color:`#334155`},children:[e.shotReplicateProjectTitle,`— —`,e.shotSegmentLabel]},t))}),(0,$.jsx)(`div`,{style:{marginTop:12},children:`确定删除吗?`})]}):r===`hot_opening_replicate`?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:8},children:`爆款开头复刻中以下内容所连带的图片和视频都将被删除:`}),(0,$.jsx)(`ul`,{style:{margin:0,paddingLeft:20},children:e.map((e,t)=>(0,$.jsx)(`li`,{style:{marginBottom:4,color:`#334155`},children:e.moduleProjectTitle},t))}),(0,$.jsx)(`div`,{style:{marginTop:12},children:`确定删除吗?`})]}):`确定删除选中的 ${He.size} 条记录吗?`,NK.confirm({title:`确认删除`,content:t,okText:`确定删除`,cancelText:`取消`,okButtonProps:{danger:!0},onOk:async()=>{let e=``;r===`project`?e=`generation_record`:r===`creation`?e=`chat_task`:r===`hot_opening_replicate`?e=`hot_opening_replicate`:r===`shot_replicate`&&(e=`shot_replicate`);let t=[];s.forEach(e=>{e.items.forEach(e=>{He.has(Ye(e))&&t.push(e)})});let n=[];e===`generation_record`||e===`chat_task`?n=t.map(e=>e.id):e===`hot_opening_replicate`?n=t.map(e=>e.moduleProjectId):e===`shot_replicate`&&(n=t.map(e=>e.shotSegmentId));let i={history_source:e,ids:n};try{await T7(i),Z.success(`删除成功`),Ve(!1),Ue(new Set),u(e=>({...e,page:1})),gt()}catch{Z.error(`删除失败,请重试`)}}})},nt=async()=>{Te(!0);try{let e=await d7({page:1,pageSize:100});Ce(e.data?.data||e.data||[])}catch(e){console.error(`加载前测模板失败:`,e)}finally{Te(!1)}},rt=()=>{if(He.size===0){Z.warning(`请先选择要推送的媒体`);return}M([[]]),P([``]),H([void 0]),ye(`2`),xe(``),nt(),A(!0)},it=()=>{if(!y)return;let e=Ye(y);Ue(new Set([e])),M([[]]),P([``]),H([void 0]),W(new Map),G(``),ye(`2`),xe(``),nt(),A(!0)},at=async(e,t)=>{R(!0);try{let n=await u7({page:e,page_size:t});I(n?.data||n||[]),B(n.pagination.total||0)}catch(e){console.error(`加载授权列表失败:`,e),I([]),B(0)}finally{R(!1)}},ot=async()=>{pe(!0);try{let[e,t]=await Promise.all([iae(),C7()]);de(e?.data||[]);let n=t?.data||[],r={};n.forEach(e=>{r[e.openType]=e.typeName}),_e(r)}catch(e){console.error(`加载历史授权账户列表失败:`,e),de([]),_e({})}finally{pe(!1)}},st=async()=>{Le(!0);try{let e=await Xie({status:Re||void 0,page:Me,pageSize:Pe});ke(e?.data||e||[]),je(e.pagination?.total||e.total||0)}catch(e){console.error(`加载推送历史失败:`,e),ke([]),je(0)}finally{Le(!1)}},ct=()=>{De(!0),Ne(1),ze(``),st()},lt=()=>{Ne(1),st()},ut=(e,t)=>{Ne(e),Fe(t),st()},dt=async()=>{if(He.size===0){Z.warning(`请先选择要推送的媒体`);return}let e=new Map;s.forEach(t=>{t.items.forEach(t=>{let n=Ye(t);e.set(n,t)})});let t=[];if(ce===`new`){let n=V.filter(e=>e!==void 0);if(n.length===0){Z.warning(`请先选择授权账户`);return}for(let r=0;re.accountId)||[];if(a.length===0){Z.warning(`第 ${r+1} 组授权账户未设置账户ID,已跳过`);continue}let o=new Map;for(let t of He){let n=e.get(t),r;n&&Xe(n)&&(r=`generated_resources`),o.has(r)||o.set(r,[]),o.get(r).push(t)}o.forEach((e,n)=>{t.push({advertiser_ids:a,resource_ids:e,oauth_id:i.value,source_model:n,is_pre_test:ve,pre_test_template:be})})}}else{if(me.length===0){Z.warning(`请先选择历史账户`);return}for(let n of me){let i=new Map;for(let t of He){let n=e.get(t),a;a=n&&Xe(n)?`generated_resources`:r===`project`?`generation_records`:`chat_generation_tasks`,i.has(a)||i.set(a,[]),i.get(a).push(t)}i.forEach((e,r)=>{t.push({advertiser_ids:[n.advertiserId],resource_ids:e,oauth_id:String(n.oauthId),source_model:r,is_pre_test:ve,pre_test_template:be})})}}O(!0);try{let e=await Yie({tasks:t});e.errors?.length>0?Z.warning(e.message):e.code===0?Z.success(e.message):Z.error(e.message),Ve(!1),Ue(new Set),A(!1),M([[]]),P([``]),H([void 0]),he([]),W(new Map),G(``),ye(`2`),xe(``)}catch(e){console.error(`批量推送失败:`,e),Z.error(e.message||`批量推送失败`)}finally{O(!1)}},ft=async(e,t)=>{if(t.trim())try{let n=(await x7({filenames:[{source_id:e,file_name:t}]}))?.results?.find(t=>t.source_id===e)?.new_file_name||t;c(t=>t.map(t=>({...t,items:t.items.map(t=>Ye(t)===e?{...t,fileName:n}:t)}))),Z.success(`文件名更新成功`)}catch(e){console.error(`文件名更新失败:`,e),Z.error(e.message||`文件名更新失败`)}},pt=async(e,t)=>{if(!(!t.trim()||e.length===0))try{let n=await x7({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)}),c(n=>{let i=new Set(e);return n.map(e=>({...e,items:e.items.map(e=>{let n=Ye(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||`文件名更新失败`)}},mt=e=>{w(e)},ht=e=>new Promise(t=>{let n=document.createElement(`video`),r=`http://ceshi.apiforeign.minzhong.cn`,i=e.startsWith(`/`)?e.slice(1):e;n.src=`${r.endsWith(`/`)?r.slice(0,-1):r}/${i}`,n.crossOrigin=`anonymous`,n.onloadedmetadata=()=>{let e=n.videoWidth,r=n.videoHeight;n.remove(),t(`${e}x${r}`)},n.onerror=()=>{n.remove(),t(``)},n.onabort=()=>{n.remove(),t(``)},setTimeout(()=>{n.remove(),t(``)},5e3)}),gt=()=>{if(r===`private_portrait`||r===`upload_resource`){m(!1),c([]);return}m(!0);let e=``;r===`project`?e=`generation_record`:r===`hot_opening_replicate`?e=`hot_opening_replicate`:r===`shot_replicate`&&(e=`shot_replicate`);let t=`?gen_type=${a}&page=${l.page}&page_size=${l.pageSize}`;if(e&&(t=`?gen_type=${a}&history_source=${e}&page=${l.page}&page_size=${l.pageSize}`),T&&T.trim()&&(t+=`&keyword=${encodeURIComponent(T.trim())}`),C){let t=`${C}?gen_type=${a}&page=${l.page}&page_size=${l.pageSize}`;e&&(t=`${C}?gen_type=${a}&history_source=${e}&page=${l.page}&page_size=${l.pageSize}`),T&&T.trim()&&(t+=`&keyword=${encodeURIComponent(T.trim())}`),i7(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?c(n):c([])}).catch(e=>{}).finally(()=>{m(!1)})}else Cie(t).then(e=>{let t=Array.isArray(e)?e:e?.groups||[];t.forEach(e=>{e.page=1}),l.page===1?c(t):c(e=>[...e,...t]),f(e?.totalDays||0)}).catch(e=>{l.page===1&&c([])}).finally(()=>{m(!1)})};(0,S.useEffect)(()=>{gt()},[r,a,l.page,C]);let _t=()=>{p||u(e=>({...e,page:e.page+1}))},vt=async(e,t,n)=>{if(h.has(t))return;g(e=>new Set([...e,t]));let i=n+1,o=``;r===`project`?o=`generation_record`:r===`hot_opening_replicate`?o=`hot_opening_replicate`:r===`shot_replicate`&&(o=`shot_replicate`);let s=`${e}?gen_type=${a}&page=${i}&page_size=${l.pageSize}`;o&&(s=`${e}?gen_type=${a}&history_source=${o}&page=${i}&page_size=${l.pageSize}`),T&&T.trim()&&(s+=`&keyword=${encodeURIComponent(T.trim())}`);try{let t=(await i7(s)).items||[];t&&t.length>0&&c(n=>n.map(n=>n.generatedDate===e?{...n,items:[...n.items,...t],page:i}:n))}catch{}finally{g(e=>{let n=new Set(e);return n.delete(t),n})}};return(0,S.useEffect)(()=>{u(e=>({...e,page:1})),E(``)},[r,a]),(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:12,marginBottom:16,padding:`12px 16px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexWrap:`wrap`},children:[(0,$.jsx)(x3,{style:{color:`#090a0cff`,fontSize:14}}),(0,$.jsxs)(EH,{size:8,wrap:!0,children:[(0,$.jsx)(X,{type:r===`project`?`primary`:`default`,onClick:()=>{i(`project`),Ve(!1),Ue(new Set)},style:{borderRadius:8,background:r===`project`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:r===`project`?`none`:`1px solid #e2e8f0`,color:r===`project`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(dZ,{}),children:`项目记录`}),(0,$.jsx)(X,{type:r===`creation`?`primary`:`default`,onClick:()=>{i(`creation`),Ve(!1),Ue(new Set)},style:{borderRadius:8,background:r===`creation`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:r===`creation`?`none`:`1px solid #e2e8f0`,color:r===`creation`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(jH,{}),children:`创作记录`}),(0,$.jsx)(X,{type:r===`hot_opening_replicate`?`primary`:`default`,onClick:()=>{i(`hot_opening_replicate`),Ve(!1),Ue(new Set)},style:{borderRadius:8,background:r===`hot_opening_replicate`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:r===`hot_opening_replicate`?`none`:`1px solid #e2e8f0`,color:r===`hot_opening_replicate`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(t5,{}),children:`爆款复刻`}),(0,$.jsx)(X,{type:r===`shot_replicate`?`primary`:`default`,onClick:()=>{i(`shot_replicate`),Ve(!1),Ue(new Set)},style:{borderRadius:8,background:r===`shot_replicate`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:r===`shot_replicate`?`none`:`1px solid #e2e8f0`,color:r===`shot_replicate`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(l8,{}),children:`拆镜复刻`}),(0,$.jsx)(X,{type:r===`private_portrait`?`primary`:`default`,onClick:()=>{i(`private_portrait`),Ve(!1),Ue(new Set)},style:{borderRadius:8,background:r===`private_portrait`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:r===`private_portrait`?`none`:`1px solid #e2e8f0`,color:r===`private_portrait`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(g5,{}),children:`私域素材库`}),(0,$.jsx)(X,{type:r===`upload_resource`?`primary`:`default`,onClick:()=>{i(`upload_resource`),Ve(!1),Ue(new Set)},style:{borderRadius:8,background:r===`upload_resource`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:r===`upload_resource`?`none`:`1px solid #e2e8f0`,color:r===`upload_resource`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(p5,{}),children:`历史素材`})]})]}),r!==`private_portrait`&&r!==`upload_resource`&&(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexWrap:`wrap`},children:Be?(0,$.jsxs)(EH,{size:8,wrap:!0,children:[(0,$.jsx)(X,{onClick:$e,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#222222ff`,fontWeight:600},children:He.size===s.reduce((e,t)=>e+t.items.length,0)?`取消全选`:`全选`}),(0,$.jsx)(X,{onClick:()=>{Ve(!1),Ue(new Set)},style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:600},children:`取消选择`}),(0,$.jsxs)(X,{onClick:()=>tt(),style:{borderRadius:8,background:`linear-gradient(135deg, #bf0b0a 0%, #ff8165 100%)`,fontWeight:600,padding:`8px 24px`,color:`#fff`},children:[`删除 (`,He.size,`)`]}),(0,$.jsxs)(X,{onClick:()=>et(),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,fontWeight:600},children:[`下载 (`,He.size,`)`]}),(0,$.jsx)(X,{type:`primary`,onClick:rt,loading:D,disabled:D||He.size===0,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,fontWeight:600},children:D?`推送中...`:`推送至账户 (${He.size})`})]}):(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(p5,{}),onClick:()=>Ve(!0),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600},children:`批量操作`})})]}),r===`private_portrait`?(0,$.jsx)(Toe,{}):r===`upload_resource`?(0,$.jsx)(Xoe,{}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:24,padding:`12px 16px`,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)(EH,{size:8,wrap:!0,children:[(0,$.jsx)(X,{type:a===`video`?`primary`:`default`,onClick:()=>{o(`video`),Ve(!1),Ue(new Set)},style:{borderRadius:8,background:a===`video`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:a===`video`?`none`:`1px solid #e2e8f0`,color:a===`video`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(v5,{}),children:`视频`}),(0,$.jsx)(X,{type:a===`image`?`primary`:`default`,onClick:()=>{o(`image`),Ve(!1),Ue(new Set)},style:{borderRadius:8,background:a===`image`?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f8f9fc`,border:a===`image`?`none`:`1px solid #e2e8f0`,color:a===`image`?`#fff`:`#64748b`,fontWeight:600},icon:(0,$.jsx)(e8,{}),children:`图片`}),(0,$.jsx)(PV,{picker:`date`,value:C?(0,jE.default)(C):void 0,onChange:(e,t)=>mt(t||``),format:`YYYY-MM-DD`,style:{width:160,borderRadius:8,border:`1px solid #e2e8f0`},placeholder:`选择日期`}),C&&(0,$.jsx)(X,{type:`text`,onClick:()=>mt(``),style:{color:`#94a3b8`,fontSize:12},children:`清除`}),(0,$.jsx)(tG.Search,{placeholder:`搜索提示词`,allowClear:!0,value:T,onChange:e=>{let t=e.target.value;E(t),t||(u(e=>({...e,page:1})),gt())},onSearch:()=>{u(e=>({...e,page:1})),gt()},style:{width:240,borderRadius:8}})]})]}),(0,$.jsx)(X,{icon:(0,$.jsx)(DV,{}),onClick:ct,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:`查询推送任务历史`})]}),p?(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},children:(0,$.jsx)(cK,{indicator:(0,$.jsx)(Xm,{style:{fontSize:24,color:`#64748b`},spin:!0}),tip:`加载中...`,size:`large`})}):s.length===0?(0,$.jsx)(rC,{image:rC.PRESENTED_IMAGE_SIMPLE,description:`暂无生成记录`,style:{padding:`60px 0`}}):(0,$.jsxs)(`div`,{style:{padding:`0 4px`},children:[s.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=>{let t=a===`video`&&e.videoCoverUrl?Ke(e.videoCoverUrl,!0):Ke(a===`video`?e.videoUrl:e.imageUrl,!0),n=a===`video`&&e.videoCoverUrl||a===`image`,r=He.has(Ye(e));return(0,$.jsxs)(`div`,{className:`media-card`,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:()=>Be?Qe(Ye(e)):qe(e),onMouseEnter:e=>{Be||(e.currentTarget.style.transform=`scale(1.05)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0,0,0,0.2)`)},onMouseLeave:e=>{Be||(e.currentTarget.style.transform=`scale(1)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(0,0,0,0.1)`)},children:[n?(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`},children:[(0,$.jsx)(`img`,{src:t,alt:`预览`,loading:`lazy`,style:{width:`100%`,height:`100%`,objectFit:`cover`,opacity:+(te.get(Ye(e))===`loaded`),transition:`opacity 0.3s`},onLoad:()=>{ne(t=>{let n=new Map(t);return n.set(Ye(e),`loaded`),n})},onError:()=>{ne(t=>{let n=new Map(t);return n.set(Ye(e),`error`),n})}}),te.get(Ye(e))!==`loaded`&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,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`,animation:te.get(Ye(e))===`loading`?`pulse 1.5s infinite`:`none`},children:e.mediaType===`video`?(0,$.jsx)(v5,{style:{color:`#64748b`,fontSize:16}}):(0,$.jsx)(e8,{style:{color:`#64748b`,fontSize:16}})})})]}):(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#1e293b`},children:[(0,$.jsx)(v5,{style:{color:`#64748b`,fontSize:24}}),(0,$.jsx)(Qoe,{style:{fontSize:12,color:`#94a3b8`,marginTop:4},children:`暂无封面`})]}),Be&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,left: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},onClick:t=>{t.stopPropagation(),Qe(Ye(e))},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`})})}),r&&a===`video`&&e.imagePx&&!Ze(e.imagePx)&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:36,left:8,right:8,padding:`4px 8px`,backgroundColor:`rgba(239, 68, 68, 0.9)`,color:`#fff`,fontSize:12,borderRadius:4,zIndex:10},children:`视频实际尺寸可能不符合平台推送要求`})]}),!Be&&(0,$.jsxs)($.Fragment,{children:[(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:`点击预览`}),(0,$.jsx)(`div`,{className:`media-download-btn`,children:(0,$.jsx)(Cw,{title:`下载`,children:(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:`50%`,background:`rgba(0,0,0,0.5)`,backdropFilter:`blur(4px)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`background 0.15s`},onClick:t=>{t.stopPropagation();let n=`http://ceshi.apiforeign.minzhong.cn${e.videoUrl||e.imageUrl}&download=1`,r=document.createElement(`a`);r.href=n,r.download=``,document.body.appendChild(r),r.click(),document.body.removeChild(r)},children:(0,$.jsx)(M0,{style:{color:`#fff`,fontSize:14}})})})})]}),Be&&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}})]},Ye(e))})}),e.total&&e.total>e.items.length&&(0,$.jsx)(`div`,{style:{padding:`12px 0`,textAlign:`left`},children:(0,$.jsx)(X,{onClick:()=>vt(e.generatedDate,e.items,e.page),loading:h.has(e.generatedDate),disabled:h.has(e.generatedDate),size:`small`,style:{borderRadius:6,background:`transparent`,border:`1px dashed #cbd5e1`,color:`#64748b`,fontSize:12},children:h.has(e.date)?`加载中...`:`查看全部 (${e.total})`})})]},t)),s.length>0&&d>s.length&&(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:`20px 0`},children:(0,$.jsx)(X,{onClick:_t,loading:p,disabled:p,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:500},children:p?`加载中...`:`加载更多`})})]})]}),(0,$.jsxs)(NK,{title:`推送任务历史`,open:Ee,onCancel:()=>De(!1),footer:null,width:800,style:{borderRadius:8},mask:{closable:!1},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16,display:`flex`,gap:4},children:[(0,$.jsx)(NC,{value:Re,onChange:e=>ze(e),placeholder:`选择状态`,style:{width:200,marginRight:12},options:[{value:`1`,label:`待推送`},{value:`2`,label:`推送中`},{value:`3`,label:`推送成功`},{value:`4`,label:`推送失败`}],allowClear:!0}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:4},children:[(0,$.jsx)(X,{type:`primary`,onClick:lt,style:{borderRadius:8},children:`查询`}),(0,$.jsx)(X,{icon:(0,$.jsx)(Uq,{}),onClick:lt,style:{borderRadius:8},children:`刷新`})]})]}),(0,$.jsx)(n$,{dataSource:Oe,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)(h$,{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:160,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:e||`-`})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:180,render:e=>P9(e)},{title:`更新时间`,dataIndex:`updatedAt`,key:`updatedAt`,width:180,render:e=>P9(e)}],loading:Ie,scroll:{x:`max-content`},pagination:{current:Me,pageSize:Pe,total:Ae,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:ut},rowKey:(e,t)=>e.task_id||e.resource_id||t,size:`small`})]}),_&&y&&(0,$.jsx)(NK,{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:y.title||`预览`})]}),open:_,onCancel:Je,width:1200,footer:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`#fff`,borderTop:`1px solid #f1f5f9`},children:[(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(M0,{}),onClick:()=>{x.current&&x.current.pause();let e=`http://ceshi.apiforeign.minzhong.cn${y.videoUrl||y.imageUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=``,document.body.appendChild(t),t.click(),document.body.removeChild(t)},style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,fontWeight:600,padding:`8px 24px`},disabled:Ge(y.videoUrl||y.imageUrl),children:Ge(y.videoUrl||y.imageUrl)?`资源已过期`:`下载`}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(k$,{}),onClick:()=>{let e=``,t=``;if(r===`shot_replicate`?(e=y.shotSegmentId,t=(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:8},children:`以下内容所连带的图片和视频都将被删除:`}),(0,$.jsx)(`ul`,{style:{margin:0,paddingLeft:20},children:(0,$.jsxs)(`li`,{style:{marginBottom:4,color:`#334155`},children:[y.shotReplicateProjectTitle,`— —`,y.shotSegmentLabel]})}),(0,$.jsx)(`div`,{style:{marginTop:12},children:`确定删除吗?`})]})):r===`hot_opening_replicate`?(e=y.moduleProjectId,t=(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:8},children:`爆款开头复刻中以下内容所连带的图片和视频都将被删除:`}),(0,$.jsx)(`ul`,{style:{margin:0,paddingLeft:20},children:(0,$.jsx)(`li`,{style:{marginBottom:4,color:`#334155`},children:y.moduleProjectTitle})}),(0,$.jsx)(`div`,{style:{marginTop:12},children:`确定删除吗?`})]})):(e=y.id,t=`确定删除该记录吗?`),!e){Z.warning(`无法获取删除ID`);return}NK.confirm({title:`确认删除`,content:t,okText:`确定删除`,cancelText:`取消`,okButtonProps:{danger:!0},onOk:async()=>{let t=``;r===`project`?t=`generation_record`:r===`creation`?t=`chat_task`:r===`hot_opening_replicate`?t=`hot_opening_replicate`:r===`shot_replicate`&&(t=`shot_replicate`);let n={history_source:t,ids:[e]};try{await T7(n),Z.success(`删除成功`),Je(),u(e=>({...e,page:1})),gt()}catch{Z.error(`删除失败,请重试`)}}})},style:{borderRadius:8,background:`linear-gradient(135deg, #bf0b0a 0%, #ff8165 100%)`,fontWeight:600,padding:`8px 24px`},disabled:Ge(y.videoUrl||y.imageUrl),children:`删除`}),(0,$.jsx)(X,{onClick:it,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:600,padding:`8px 24px`},disabled:Ge(y.videoUrl||y.imageUrl),children:`推送媒体后台`})]}),style:{borderRadius:16,overflow:`hidden`},styles:{body:{height:500,display:`flex`,flexDirection:`column`,padding:0},header:{background:`#fff`,borderBottom:`1px solid #f1f5f9`,padding:`16px 24px`},mask:{backgroundColor:`rgba(0, 0, 0, 0.5)`}},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,height:`100%`,background:`#f8fafc`},children:[(0,$.jsx)(`div`,{style:{width:`70%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,padding:20},children:Ge(y.videoUrl||y.imageUrl)?(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`40px`,backgroundColor:`#fff`,borderRadius:12},children:[(0,$.jsx)(`div`,{style:{fontSize:48,marginBottom:16},children:`⚠️`}),(0,$.jsx)(`p`,{style:{fontSize:15,color:`#ef4444`,fontWeight:500,marginBottom:8},children:`资源已过期`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#94a3b8`},children:`请刷新页面重新加载`})]}):a===`video`?(0,$.jsx)(`video`,{ref:x,src:`http://ceshi.apiforeign.minzhong.cn${y.videoUrl}`,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:`100%`,borderRadius:12,objectFit:`contain`}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${y.imageUrl}&w=300&q=50`,alt:`预览`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:12}})}),(0,$.jsxs)(`div`,{style:{width:`30%`,height:`100%`,overflowY:`auto`,scrollbarWidth:`none`,backgroundColor:`#fff`,padding:24,borderLeft:`1px solid #f1f5f9`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:20},children:[(0,$.jsx)(`div`,{style:{width:2,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:1}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1e293b`,fontWeight:600},children:`文件信息`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:14},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`类型`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:a===`video`?`视频`:`图片`})]}),r===`hot_opening_replicate`&&(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:4},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`类属`}),(0,$.jsxs)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500,wordBreak:`break-all`,lineHeight:`1.5`},children:[`爆款复刻——`,y.moduleProjectTitle]})]}),r===`shot_replicate`&&(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:4},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`类属`}),(0,$.jsxs)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500,wordBreak:`break-all`,lineHeight:`1.5`},children:[y.shotReplicateProjectTitle,`— —`,y.shotSegmentLabel]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`请求`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500,wordBreak:`break-all`,lineHeight:`1.5`},children:y.originalPrompt})]}),a===`image`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:y.imageProportion})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:y.imageSize})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`尺寸`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:y.imagePx})]})]}),a===`video`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:y.aspectRatio})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:y.resolution})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`时长`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:`${y.duration}秒`||`-`})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`创建时间`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:P9(y.createdAt||y.generatedDate)})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`生成引擎`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:y.engine||y.engineName||`-`})]})]}),(0,$.jsx)(`div`,{style:{borderTop:`1px solid #f1f5f9`,margin:`20px 0`}}),y.mediaReferences&&y.mediaReferences.length>0&&![`hot_opening_replicate`,`shot_replicate`].includes(r)&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:16},children:[(0,$.jsx)(`div`,{style:{width:2,height:18,background:`linear-gradient(180deg, #3b82f6 0%, #60a5fa 100%)`,borderRadius:1}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1e293b`,fontWeight:600},children:`依靠附件`})]}),y.mediaReferences.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>{x.current&&x.current.pause();let t=`http://ceshi.apiforeign.minzhong.cn${e.url}`;window.open(t,`_blank`)},style:{display:`flex`,alignItems:`center`,gap:10,padding:`10px 12px`,borderRadius:8,cursor:`pointer`,backgroundColor:`#f8fafc`,marginBottom:8,transition:`all 0.25s ease`,border:`1px solid transparent`},onMouseEnter:e=>{let t=e.currentTarget;t.style.backgroundColor=`#e0f2fe`,t.style.borderColor=`#bae6fd`},onMouseLeave:e=>{let t=e.currentTarget;t.style.backgroundColor=`#f8fafc`,t.style.borderColor=`transparent`},children:[e.type===`image`?(0,$.jsx)(e8,{style:{color:`#3b82f6`,fontSize:16}}):(0,$.jsx)(v5,{style:{color:`#f59e0b`,fontSize:16}}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:e.name||`媒体${t+1}`})]},e.url))]})]})]})}),(0,$.jsx)(NK,{title:He.size===1?`推送配置`:`批量推送配置`,open:k,onCancel:()=>{A(!1),M([[]]),P([``]),H([void 0]),W(new Map),G(``)},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:[`选中素材 (`,He.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)(tG,{value:ee,onChange:e=>G(e.target.value),placeholder:`输入名称后点击应用`,style:{flex:1,borderRadius:8},size:`small`}),(0,$.jsx)(X,{type:`primary`,size:`small`,onClick:()=>{ee.trim()&&He.size>0&&pt(Array.from(He),ee)},disabled:!ee.trim()||He.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 s.forEach(t=>{t.items.forEach(t=>{let n=Ye(t);e.set(n,t)})}),Array.from(He).map(t=>{let n=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=a===`video`?n?.videoCoverUrl:n?.imageUrl;if(!e)return(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`预览`});let t=`http://ceshi.apiforeign.minzhong.cn`,r=e.startsWith(`/`)?e.slice(1):e;return(0,$.jsx)(`img`,{src:`${t.endsWith(`/`)?t.slice(0,-1):t}/static/${r}&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:n?.fileName||`素材 ${n.id}`})}),(0,$.jsx)(tG,{value:U.has(t)?U.get(t):n?.fileName||``,onChange:e=>{let n=e.target.value,r=new Map(U);r.set(t,n),W(r)},onBlur:()=>{let e=U.get(t)||n?.fileName||``;e.trim()&&ft(t,e)},onKeyDown:e=>{if(e.key===`Enter`){let e=U.get(t)||n?.fileName||``;e.trim()&&ft(t,e)}},placeholder:`输入新名称`,style:{width:200,borderRadius:4},size:`small`})]},t)})})()})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#475569`},children:`是否开启前测:`}),(0,$.jsx)(NC,{value:ve,onChange:e=>{ye(e),e===`1`?p7().then(e=>{xe(e?.data?.id||``)}).catch(()=>{}):xe(``)},style:{width:120},options:[{value:`1`,label:`是`},{value:`2`,label:`否`}]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#475569`},children:`前测模板:`}),(0,$.jsx)(NC,{value:be,onChange:e=>xe(e),style:{width:200},disabled:ve!==`1`,loading:we,placeholder:ve===`1`?`选择前测模板`:`请先开启前测`,options:Se.map(e=>({value:e.id,label:e.name}))})]})]}),(0,$.jsx)(IL,{size:`small`,activeKey:ce,onChange:e=>{le(e),e===`history`&&ot()},items:[{key:`new`,label:`新增账户`},{key:`history`,label:`历史账户`}]}),ce===`new`&&(0,$.jsxs)(`div`,{children:[V.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]}),V.length>1&&(0,$.jsx)(X,{type:`text`,danger:!0,onClick:()=>{let e=[...V],n=[...N],r=[...j],i=[...oe];e.splice(t,1),n.splice(t,1),r.splice(t,1),i.splice(t,1),H(e),P(n),M(r),se(i)},children:`删除`})]}),(0,$.jsx)(NC,{value:e,onChange:e=>{let n=[...V];n[t]=e,H(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)(n$,{dataSource:F,columns:[{title:`授权账户ID`,dataIndex:`accountId`,key:`accountId`,width:120},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`,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||`-`})},{title:`授权用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,width:120}],loading:L,pagination:{current:re,pageSize:ae,total:z,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{ie(e),q(t),at(e,t)}},rowKey:`id`,size:`small`,scroll:{x:`max-content`},onRow:n=>({onClick:()=>{let e=String(n.id),r=[...V];r[t]={value:e,label:String(n.accountId)+`-`+(n.accountName||`-`)},H(r);let i=[...oe];i[t]=!1,se(i)},style:{cursor:`pointer`,backgroundColor:e?.value===String(n.id)?`#e6f7ff`:void 0}})})}),open:oe[t],onOpenChange:e=>{let n=[...oe];n[t]=e,se(n),e&&at(1,ae)},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)(tG.TextArea,{value:N[t],onChange:e=>{let n=e.target.value,r=[...N];r[t]=n,P(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=[...j];c[t]=s,M(c)},placeholder:`粘贴账户ID,每行一个或用逗号分隔,例如: 10001,10002,10003 - 10004`,rows:3,style:{borderRadius:8}})]},t)),(0,$.jsx)(X,{type:`dashed`,block:!0,onClick:()=>{H([...V,void 0]),P([...N,``]),M([...j,[]]),se([...oe,!1])},style:{borderRadius:8,marginBottom:16},children:`+ 新增授权账户组`})]}),ce===`history`&&(0,$.jsx)(`div`,{style:{padding:8},children:fe?(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:40},children:`加载中...`}):ue.length===0?(0,$.jsx)(rC,{description:`暂无可选账户`}):(0,$.jsx)(J$,{style:{width:`100%`},dataSource:ue.filter(e=>e.advertiserId).map((e,t)=>({key:String(e.advertiserId)||`item-${t}`,title:String(e.advertiserId),description:e.advertiserName||``,...e})),targetKeys:me.filter(e=>e.advertiserId).map(e=>String(e.advertiserId)),onChange:e=>{he(ue.filter(t=>t.advertiserId&&e.includes(String(t.advertiserId))))},titles:[`可选账户列表`,`已选账户列表`],showSearch:!0,filterOption:(e,t)=>String(t.advertiserId).toLowerCase().includes(e.toLowerCase())||t.advertiserName&&t.advertiserName.toLowerCase().includes(e.toLowerCase()),children:({direction:e,filteredItems:t,onItemSelect:n,onItemSelectAll:r,selectedKeys:i,disabled:a})=>(0,$.jsx)(n$,{rowSelection:{getCheckboxProps:()=>({disabled:a}),onChange:e=>{r(e,`replace`)},selectedRowKeys:i,selections:[n$.SELECTION_ALL,n$.SELECTION_INVERT,n$.SELECTION_NONE]},columns:[{title:`账户ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:120},{title:`账户名称`,dataIndex:`advertiserName`,key:`advertiserName`,width:150}],dataSource:t,size:`small`,style:{pointerEvents:a?`none`:void 0},pagination:!1,scroll:{x:`max-content`,y:400},onRow:({key:e,disabled:t})=>({onClick:()=>{t||a||n(e,!i.includes(e))}})})})}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,justifyContent:`flex-end`},children:[(0,$.jsx)(X,{onClick:()=>{A(!1),M([[]]),P([``]),H([void 0]),W(new Map),G(``)},style:{borderRadius:8},children:`取消`}),(0,$.jsx)(X,{type:`primary`,onClick:dt,loading:D,disabled:D||(ce===`new`?j.every(e=>e.length===0):me.length===0),style:{borderRadius:8},children:D?`推送中...`:`开始推送`})]})]})})]})},P9=document.createElement(`style`);P9.textContent=` + 10004`,rows:3,style:{borderRadius:8}})]},t)),(0,$.jsx)(X,{type:`dashed`,block:!0,onClick:()=>{H([...V,void 0]),P([...N,``]),M([...j,[]]),se([...oe,!1])},style:{borderRadius:8,marginBottom:16},children:`+ 新增授权账户组`})]}),ce===`history`&&(0,$.jsx)(`div`,{style:{padding:8},children:fe?(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:40},children:`加载中...`}):ue.length===0?(0,$.jsx)(rC,{description:`暂无可选账户`}):(0,$.jsx)(J$,{style:{width:`100%`},dataSource:ue.filter(e=>e.advertiserId).map((e,t)=>({key:String(e.advertiserId)||`item-${t}`,title:String(e.advertiserId),description:e.advertiserName||``,...e})),targetKeys:me.filter(e=>e.advertiserId).map(e=>String(e.advertiserId)),onChange:e=>{he(ue.filter(t=>t.advertiserId&&e.includes(String(t.advertiserId))))},titles:[`可选账户列表`,`已选账户列表`],showSearch:!0,filterOption:(e,t)=>String(t.advertiserId).toLowerCase().includes(e.toLowerCase())||t.advertiserName&&t.advertiserName.toLowerCase().includes(e.toLowerCase()),children:({direction:e,filteredItems:t,onItemSelect:n,onItemSelectAll:r,selectedKeys:i,disabled:a})=>(0,$.jsx)(n$,{rowSelection:{getCheckboxProps:()=>({disabled:a}),onChange:e=>{r(e,`replace`)},selectedRowKeys:i,selections:[n$.SELECTION_ALL,n$.SELECTION_INVERT,n$.SELECTION_NONE]},columns:[{title:`账户ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:120},{title:`账户名称`,dataIndex:`advertiserName`,key:`advertiserName`,width:150}],dataSource:t,size:`small`,style:{pointerEvents:a?`none`:void 0},pagination:!1,scroll:{x:`max-content`,y:400},onRow:({key:e,disabled:t})=>({onClick:()=>{t||a||n(e,!i.includes(e))}})})})}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,justifyContent:`flex-end`},children:[(0,$.jsx)(X,{onClick:()=>{A(!1),M([[]]),P([``]),H([void 0]),W(new Map),G(``)},style:{borderRadius:8},children:`取消`}),(0,$.jsx)(X,{type:`primary`,onClick:dt,loading:D,disabled:D||(ce===`new`?j.every(e=>e.length===0):me.length===0),style:{borderRadius:8},children:D?`推送中...`:`开始推送`})]})]})})]})},N9=document.createElement(`style`);N9.textContent=` @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } -`,document.head.appendChild(P9);function F9(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 I9=[{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`}],ese=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`)}`},tse=()=>{let{message:e}=Jb.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,u]=(0,S.useState)(`create`),[d,f]=(0,S.useState)(null),[p]=bU.useForm(),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(!1),[v,y]=(0,S.useState)(1),[b,x]=(0,S.useState)(10),[C,w]=(0,S.useState)(`AD`),[T,E]=(0,S.useState)(void 0),[D,O]=(0,S.useState)([]),[k,A]=(0,S.useState)({}),[j,M]=(0,S.useState)({});(0,S.useEffect)(()=>{N()},[v,b]),(0,S.useEffect)(()=>{P()},[]);let N=async t=>{o(!0);try{let e=await d7({page:t?.page??v,pageSize:t?.pageSize??b,platform:t?.platform??T});n(e.data||[]),i(e.pagination?.total||0),y(e.pagination?.page||1),x(e.pagination?.pageSize||10)}catch{e.error(`获取前测列表失败`)}finally{o(!1)}},P=async()=>{try{let e=localStorage.getItem(`preTestAreaData`);if(e){let t=JSON.parse(e);O(t.areaOptions),A(t.cityCodeMap),M(t.provinceCityMap);return}let t=(await b7({level:`ONE_LEVEL`})).data||[],n={},r={},i=await Promise.all(t.map(async e=>{let t=[];try{t=((await b7({level:`TWO_LEVEL`,parent_code:e.code})).data||[]).map(e=>({value:e.code,label:e.name,isLeaf:!0}));let i=t.map(e=>e.value);r[e.code]=i,t.forEach(e=>{n[e.value]=e.label})}catch(t){console.error(`获取省份 ${e.name} 的城市失败`,t),r[e.code]=[]}return{value:e.code,label:e.name,isLeaf:!1,children:t}})),a={areaOptions:i,cityCodeMap:n,provinceCityMap:r};localStorage.setItem(`preTestAreaData`,JSON.stringify(a)),O(i),A(n),M(r)}catch{e.error(`获取省份信息失败`)}},F=async t=>{let n=t[t.length-1];n.loading=!0;try{n.children=((await b7({level:`TWO_LEVEL`,parent_code:n.value})).data||[]).map(e=>({value:e.code,label:e.name,isLeaf:!0})),n.loading=!1,O([...D])}catch{e.error(`获取城市信息失败`),n.loading=!1,O([...D])}},I=t.map((e,t)=>({...e,index:(v-1)*b+t+1,key:e.id})),L=[{title:`前测模板编号`,dataIndex:`id`,key:`id`,width:120,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)(h$,{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=>{if(!e)return(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`-`});let t=I9.find(t=>t.name===e.trim());return(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:t?t.label:e})}},{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:`audienceRegion`,key:`audienceRegion`,ellipsis:!0,width:300,render:e=>{if(!Array.isArray(e)||e.length===0)return(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`-`});let t=e.map(e=>k[String(e)]||String(e));return(0,$.jsx)(tG.TextArea,{value:t.join(`, `)||`-`,readOnly:!0,autoSize:{minRows:1,maxRows:4},style:{resize:`none`,border:`none`,background:`transparent`,padding:0},placeholder:`-`})}},{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)(h$,{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:ese(e)})},{title:`操作`,dataIndex:`operation`,fixed:`right`,key:`operation`,render:(e,t)=>(0,$.jsxs)(EH,{size:4,children:[(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(NW,{}),style:{color:`#6366f1`,fontSize:12},onClick:()=>B(t),children:`详情`}),(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(Z$,{}),style:{color:`#6366f1`,fontSize:12},onClick:()=>V(t),children:`编辑`}),(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(k$,{}),style:{color:`#ef4444`,fontSize:12},onClick:()=>H(t),children:`删除`})]})}],R=()=>{p.resetFields(),w(`AD`),u(`create`),f(null),c(!0)},z=async e=>{f(e),w(e.platform||`AD`);let t=e.audienceRegion||[],n=[];for(let e of t){let t=String(e);if(t.length>=6){let e=t.slice(0,2);F(e),n.push([e,t])}}p.setFieldsValue({name:e.name,note:e.note,platform:e.platform,external_action:e.externalAction,cpa_bid:e.cpaBid,audience_gender:e.audienceGender,audience_age:e.audienceAge||[],audience_region:n,audience_network:e.audienceNetwork||[],cus_name:e.cusName,pricing_type:e.pricingType,cost_cap:e.costCap===void 0?!1:e.costCap,target_cost:e.targetCost===void 0?!1:e.targetCost,nobid:e.nobid===void 0?!1:e.nobid,cpc_bid:e.cpcBid,budget:e.budget,is_default:e.isDefault===void 0?!1:e.isDefault})},B=async t=>{try{let e=(await f7(t.id)).data;u(`detail`),z(e),c(!0)}catch{e.error(`获取详情失败`)}},V=async t=>{try{let e=(await f7(t.id)).data;u(`edit`),z(e),c(!0)}catch{e.error(`获取详情失败`)}},H=t=>{NK.confirm({title:`确认删除`,content:`确定要删除该前测模板吗?`,okText:`确定`,cancelText:`取消`,onOk:async()=>{try{await Nie(t.id),e.success(`删除成功`),N()}catch{e.error(`删除失败`)}}})};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)(jH,{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`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,alignItems:`center`},children:[(0,$.jsx)(NC,{placeholder:`投放平台`,value:T,onChange:e=>E(e),style:{width:140},allowClear:!0,options:[{value:`AD`,label:`AD`},{value:`QIANCHUAN`,label:`千川`},{value:`LOCAL`,label:`本地推`}]}),(0,$.jsx)(X,{type:`primary`,onClick:()=>{y(1),N()},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12},children:(0,$.jsx)(X,{type:`primary`,size:`medium`,icon:(0,$.jsx)(mL,{}),loading:a,onClick:R,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)(n$,{dataSource:I,columns:L,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)(VG,{current:v,pageSize:b,total:r,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,pageSizeOptions:[`10`,`20`,`50`,`100`],onChange:(e,t)=>{y(e),x(t)},size:`small`})})]}),(0,$.jsx)(NK,{title:(0,$.jsx)(EH,{children:l===`create`?`新增前测模板(选填项如填写需准确填写)`:l===`edit`?`编辑前测模板(选填项如填写需准确填写)`:`前测模板详情`}),open:s,onCancel:()=>{c(!1),p.resetFields(),w(`AD`)},onOk:async()=>{try{let t=await p.validateFields();_(!0);let n=[];(t.audience_region||[]).forEach(e=>{if(e.length===1){let t=j[e[0]]||[];n.push(...t)}else e.length>=2&&n.push(e[e.length-1])});let r={name:t.name,note:t.note,platform:t.platform,external_action:t.external_action,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};l===`edit`&&d?(await Mie(d.id,r),e.success(`前测模板更新成功`)):(await jie(r),e.success(`前测模板创建成功`)),c(!1),p.resetFields(),N()}catch(t){t?.message?e.error(t.message):t?.response?.data?.message?e.error(t.response.data.message):e.error(l===`edit`?`更新失败,请重试`:`创建失败,请重试`)}finally{_(!1)}},okText:l===`detail`?``:`提交`,cancelText:`取消`,width:720,height:600,confirmLoading:g,style:{borderRadius:16},footer:l===`detail`?null:void 0,children:(0,$.jsxs)(bU,{form:p,layout:`vertical`,style:{marginTop:16},disabled:l===`detail`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(bU.Item,{style:{flex:1},name:`name`,label:`模板名称`,rules:[{required:!0,message:`请输入模板名称`}],children:(0,$.jsx)(tG,{placeholder:`请输入模板名称`,style:{borderRadius:8,height:40}})}),(0,$.jsx)(bU.Item,{style:{flex:1},name:`platform`,label:`平台`,initialValue:`AD`,rules:[{required:!0,message:`请选择平台`}],children:(0,$.jsx)(NC,{placeholder:`请选择平台`,style:{borderRadius:8,height:40},onChange:e=>{w(e)},options:[{value:`AD`,label:`AD`},{value:`QIANCHUAN`,label:`千川`},{value:`LOCAL`,label:`本地推`}]})})]}),(0,$.jsx)($g,{defaultActiveKey:[],activeKey:m?[`optional`]:[],onChange:()=>h(!m),children:(0,$.jsxs)($g.Panel,{header:`选填项`,children:[C!==`LOCAL`&&(0,$.jsx)(bU.Item,{name:`external_action`,label:`转化目标`,children:(0,$.jsx)(NC,{placeholder:`请选择转化目标`,style:{borderRadius:8,height:40},options:I9.filter(e=>C===`AD`?e.name.startsWith(`AD_`):C===`QIANCHUAN`?e.name.startsWith(`QC_`):C===`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,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(bU.Item,{style:{flex:1},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)(tG,{type:`number`,placeholder:`取值范围: 1-10000,精确到小数点后2位`,style:{borderRadius:8,height:40},min:1,max:1e4,step:.01})}),(0,$.jsx)(bU.Item,{style:{flex:1},name:`audience_gender`,label:`受众性别`,children:(0,$.jsx)(NC,{placeholder:`请选择受众性别`,style:{borderRadius:8,height:40},options:[{value:`ALL`,label:`不限`},{value:`MALE`,label:`男`},{value:`FEMALE`,label:`女`}]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(bU.Item,{style:{flex:1},name:`audience_age`,label:`受众年龄`,children:(0,$.jsx)(NC,{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)(bU.Item,{style:{flex:1},name:`audience_network`,label:`网络类型`,children:(0,$.jsx)(NC,{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)(bU.Item,{name:`audience_region`,label:`受众地区`,children:(0,$.jsx)(tz,{multiple:!0,placeholder:`请选择受众地区(可多选)`,style:{borderRadius:8,minHeight:40},options:D,maxTagCount:`responsive`})}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(bU.Item,{style:{flex:1},name:`cus_name`,label:`客户主体名称`,children:(0,$.jsx)(tG,{placeholder:`请输入客户主体名称`,style:{borderRadius:8,height:40}})}),(0,$.jsx)(bU.Item,{style:{flex:1},name:`pricing_type`,label:`出价类型`,children:(0,$.jsx)(NC,{placeholder:`请选择出价类型`,style:{borderRadius:8,height:40},options:[{value:`OCPC`,label:`OCPC`},{value:`CPA`,label:`CPA`},{value:`OCPM`,label:`OCPM`}]})})]}),C==`AD`&&(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(bU.Item,{style:{flex:1},name:`cost_cap`,label:`是否最优成本出价`,initialValue:!1,children:(0,$.jsx)(NC,{placeholder:`是否最优成本出价`,style:{borderRadius:8,height:40},options:[{value:!0,label:`开启`},{value:!1,label:`关闭`}]})}),(0,$.jsx)(bU.Item,{style:{flex:1},name:`target_cost`,label:`是否稳定成本出价`,initialValue:!1,children:(0,$.jsx)(NC,{placeholder:`是否稳定成本出价`,style:{borderRadius:8,height:40},options:[{value:!0,label:`开启`},{value:!1,label:`关闭`}]})}),(0,$.jsx)(bU.Item,{style:{flex:1},name:`nobid`,label:`是否最大转化出价`,initialValue:!1,children:(0,$.jsx)(NC,{placeholder:`是否最大转化出价`,style:{borderRadius:8,height:40},options:[{value:!0,label:`开启`},{value:!1,label:`关闭`}]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(bU.Item,{style:{flex:1},name:`cpc_bid`,label:`目标点击成本`,getValueFromEvent:e=>parseFloat(e.target.value)||void 0,children:(0,$.jsx)(tG,{type:`number`,placeholder:`请输入目标点击成本`,style:{borderRadius:8,height:40}})}),(0,$.jsx)(bU.Item,{style:{flex:1},name:`budget`,label:`预算金额`,getValueFromEvent:e=>parseFloat(e.target.value)||void 0,children:(0,$.jsx)(tG,{type:`number`,placeholder:`请输入预算金额`,style:{borderRadius:8,height:40}})})]}),(0,$.jsx)(bU.Item,{name:`note`,label:`备注`,children:(0,$.jsx)(tG.TextArea,{placeholder:`请输入备注`,rows:2,style:{borderRadius:8}})}),(0,$.jsx)(bU.Item,{name:`is_default`,label:`默认模板`,initialValue:!1,children:(0,$.jsx)(NC,{placeholder:`请选择默认模板`,style:{borderRadius:8,height:40},options:[{value:!0,label:`是`},{value:!1,label:`否`}]})})]},`optional`)})]})})]})},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`)}`},nse=e=>{let t=`http://ceshi.apiforeign.minzhong.cn`;if(e.startsWith(`http://`)||e.startsWith(`https://`))return e;let n=e.startsWith(`/`)?e.slice(1):e;return`${t.endsWith(`/`)?t.slice(0,-1):t}/${n}`},rse=()=>{let{message:e}=Jb.useApp(),t=Ye(),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(void 0),[f,p]=(0,S.useState)(1),[m,h]=(0,S.useState)(10),[g,_]=(0,S.useState)(0),[v,y]=(0,S.useState)({account_userid:``,open_type:void 0,account_id:``}),[b,x]=(0,S.useState)({}),[C,w]=(0,S.useState)([]),[T,E]=(0,S.useState)([]);(0,S.useEffect)(()=>{k(),O(),D()},[]);let D=async()=>{try{await p7()}catch{}},O=async()=>{try{let e=(await C7()).data||[],t={},n=[];e.forEach(e=>{t[e.openType]=e.typeName,n.push({value:e.openType,label:e.typeName})}),x(t),w(n),E(e)}catch(e){console.error(`加载开户方式列表失败:`,e)}},k=async(t=1,n=10,i=v)=>{s(!0);try{let e=await u7({page:t,page_size:n,account_userid:i.account_userid||void 0,open_type:i.open_type,account_id:i.account_id||void 0});e?(e.data&&r(e.data.data||e.data),e.pagination&&(_(e.pagination.total||0),p(e.pagination.page||1),h(e.pagination.pageSize||10))):r(e||[])}catch{e.error(`获取授权列表失败`)}finally{s(!1)}},A=()=>{l(!0)},j=async()=>{if(!u){e.warning(`请选择开户方式`);return}a(!0);try{let t=await l7({open_type:u});t.authUrl?window.open(t.authUrl,`_blank`):e.error(`获取授权链接失败`)}catch{e.error(`请求授权失败`)}finally{a(!1),l(!1),d(void 0)}},M=async t=>{try{let n=await l7({open_type:t.openType});n.authUrl?window.open(n.authUrl,`_blank`):e.error(`获取授权链接失败`)}catch{e.error(`重新授权失败`)}},N=[{title:`ID`,dataIndex:`id`,key:`id`},{title:`授权绑定账户ID`,dataIndex:`accountId`,key:`accountId`},{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:`开户方式`,dataIndex:`openType`,key:`openType`,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:b[e]||e})},{title:`是否敏感物料授权`,dataIndex:`materialAuthStatus`,key:`materialAuthStatus`,width:100,render:e=>(0,$.jsx)(h$,{color:e?`green`:`default`,children:e?`是`:`否`})},{title:`授权有效时间`,dataIndex:`refreshTokenExpired`,key:`refreshTokenExpired`,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)})},{title:`操作`,dataIndex:`action`,fixed:`right`,key:`action`,width:190,render:(e,n)=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(X,{type:`link`,onClick:()=>t(`/authacc?oauth_id=${n.id}`),style:{color:`#6366f1`,padding:0},children:`查看授权账户`}),(0,$.jsx)(X,{type:`link`,onClick:()=>M(n),style:{color:`#00c49f`,padding:0,marginLeft:8},children:`重新授权`})]})}],P=n.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)(h6,{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)(tG,{placeholder:`授权绑定账户ID`,value:v.account_id,onChange:e=>y(t=>({...t,account_id:e.target.value})),style:{width:180},allowClear:!0,onPressEnter:()=>{p(1),k(1,m)}}),(0,$.jsx)(tG,{placeholder:`授权登录账户用户ID`,value:v.account_userid,onChange:e=>y(t=>({...t,account_userid:e.target.value})),style:{width:180},allowClear:!0,onPressEnter:()=>{p(1),k(1,m)}}),(0,$.jsx)(NC,{placeholder:`开户方式`,value:v.open_type,onChange:e=>y(t=>({...t,open_type:e})),style:{width:140},allowClear:!0,options:C}),(0,$.jsx)(X,{type:`primary`,size:`medium`,onClick:()=>{p(1),k(1,m)},children:`搜索`})]}),(0,$.jsx)(X,{type:`primary`,size:`medium`,icon:(0,$.jsx)(mL,{}),onClick:A,loading:i,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)(n$,{dataSource:P,columns:N,loading:o,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(VG,{current:f,pageSize:m,total:g,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{p(e),h(t),k(e,t)},size:`small`})})]}),(0,$.jsx)(NK,{title:`选择开户方式`,open:c,onOk:j,onCancel:()=>{l(!1),d(void 0)},okText:`确认授权`,cancelText:`取消`,confirmLoading:i,width:700,children:(0,$.jsx)(`div`,{style:{display:`flex`,gap:16,flexWrap:`wrap`,maxHeight:420,overflowY:`auto`},children:T.map(e=>(0,$.jsxs)(`div`,{onClick:()=>d(e.openType),style:{width:`calc(33.33% - 12px)`,cursor:`pointer`,borderRadius:12,border:`2px solid ${u===e.openType?`#6366f1`:`#e2e8f0`}`,padding:16,transition:`all 0.3s ease`,background:u===e.openType?`#f0f1ff`:`#fff`},children:[(0,$.jsx)(`div`,{style:{width:`100%`,height:48,marginBottom:12,borderRadius:8,overflow:`hidden`},children:e.thumb?(0,$.jsx)(`img`,{src:nse(e.thumb),alt:e.typeName,style:{width:`100%`,height:`100%`,display:`block`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,background:`#f1f5f9`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(Q.Text,{type:`secondary`,children:`暂无图片`})})}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:e.typeName}),(0,$.jsx)(`p`,{style:{fontSize:12,color:`#64748b`,marginTop:8,marginBottom:0,lineHeight:1.5},children:e.description})]},e.id))})})]})},ise=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`)}`},ase=()=>{let e=Ye(),[t]=On(),{message:n}=Jb.useApp(),[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(1),[l,u]=(0,S.useState)(10),[d,f]=(0,S.useState)(0),[p,m]=(0,S.useState)({advertiser_id:``,oauth_id:``,advertiser_name:``}),[h,g]=(0,S.useState)({});(0,S.useEffect)(()=>{let e=t.get(`oauth_id`);e?(m(t=>({...t,oauth_id:e})),v(1,10,{...p,oauth_id:e})):v(),_()},[]);let _=async()=>{try{let e=(await C7()).data||[],t={},n=[];e.forEach(e=>{t[e.openType]=e.typeName,n.push({value:e.openType,label:e.typeName})}),g(t)}catch(e){console.error(`加载开户方式列表失败:`,e)}},v=async(e=1,t=10,r=p)=>{o(!0);try{let n=await nae({advertiser_id:r.advertiser_id||``,oauth_id:r.oauth_id||``,advertiser_name:r.advertiser_name||``,page:e,page_size:t});n?(n.data&&i(n.data.data||n.data),n.pagination&&(f(n.pagination.total||0),c(n.pagination.page||1),u(n.pagination.pageSize||10))):i(n||[])}catch{n.error(`获取授权列表失败`)}finally{o(!1)}},y=[{title:`ID`,dataIndex:`id`,key:`id`},{title:`广告主账户ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:160},{title:`广告主账户名称`,dataIndex:`advertiserName`,key:`advertiserName`},{title:`广告主账户角色`,dataIndex:`advertiserRole`,key:`advertiserRole`},{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`},{title:`授权账户登录账号名称`,dataIndex:`accountUsername`,key:`accountUsername`},{title:`授权ID`,dataIndex:`oauthId`,key:`oauthId`},{title:`开户方式`,dataIndex:`openType`,key:`openType`,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:h[e]||e})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:ise(e)})},{title:`操作`,fixed:`right`,dataIndex:`action`,key:`action`,render:(e,t)=>(0,$.jsx)(EH,{children:(0,$.jsx)(X,{size:`small`,danger:!0,onClick:()=>{NK.confirm({title:`确认删除`,content:`确定要删除该授权账户吗?`,okText:`确定`,cancelText:`取消`,onOk:async()=>{try{await rae({id:t.id}),n.success(`删除成功`),v(s,l)}catch{n.error(`删除失败`)}}})},children:`删除`})})}],b=()=>{document.referrer.includes(window.location.origin)?e(-1):e(`/authorization`)},x=r.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)(X,{type:`text`,icon:(0,$.jsx)(z2,{}),onClick:b}),(0,$.jsx)(h6,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`授权管理`})]}),(0,$.jsx)(`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)(tG,{placeholder:`广告主账户ID`,value:p.advertiser_id,onChange:e=>m(t=>({...t,advertiser_id:e.target.value})),style:{width:180},allowClear:!0,onPressEnter:()=>{c(1),v(1,l)}}),(0,$.jsx)(tG,{placeholder:`授权ID`,value:p.oauth_id,onChange:e=>m(t=>({...t,oauth_id:e.target.value})),style:{width:180},allowClear:!0,onPressEnter:()=>{c(1),v(1,l)}}),(0,$.jsx)(tG,{placeholder:`广告主账户名称`,value:p.advertiser_name,onChange:e=>m(t=>({...t,advertiser_name:e.target.value})),style:{width:180},allowClear:!0,onPressEnter:()=>{c(1),v(1,l)}}),(0,$.jsx)(X,{type:`primary`,size:`medium`,onClick:()=>{c(1),v(1,l)},children:`搜索`})]})}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(n$,{dataSource:x,columns:y,loading:a,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(VG,{current:s,pageSize:l,total:d,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{c(e),u(t),v(e,t)},size:`small`})})]})]})},R9=[{key:`is_ad_high_quality_material`,label:`AD优质`,noLabel:`AD非优质素材`,unknownLabel:`AD未知`,yesColor:`green`,noColor:`red`,unknownColor:`default`},{key:`is_ecp_high_quality_material`,label:`千川优质`,noLabel:`千川非优质素材`,unknownLabel:`千川未知`,yesColor:`green`,noColor:`red`,unknownColor:`default`},{key:`is_local_high_quality_material`,label:`本地推优质`,noLabel:`本地推非优质`,unknownLabel:`本地推未知`,yesColor:`green`,noColor:`red`,unknownColor:`default`},{key:`is_inefficient_material`,label:`低效`,noLabel:`非低效`,unknownLabel:`是否低效未知`,yesColor:`red`,noColor:`green`,unknownColor:`default`},{key:`is_first_publish_material`,label:`首发`,noLabel:`非首发`,unknownLabel:`是否首发未知`,yesColor:`blue`,noColor:`default`,unknownColor:`default`}],ose=({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=e=>{let n=R9.find(t=>t.key===e);if(!n)return null;let r=t[e],i=r===`YES`,a=r===`NO`;if(r===`UNKNOWN`)return null;let o,s;return i?(o=n.label,s=n.yesColor):a&&(o=n.noLabel,s=n.noColor),{tag:(0,$.jsx)(h$,{color:s,style:{marginRight:6,fontSize:12,borderRadius:4},children:o},e),detail:{label:n.label.replace(`优质`,`优质素材`),value:o,color:s}}};return(0,$.jsx)(jw,{content:(0,$.jsxs)(`div`,{style:{maxWidth:500,padding:`8px 0`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,display:`block`,marginBottom:12,color:`#1e293b`},children:`前测结果详情`}),(0,$.jsxs)(JV,{column:1,size:`small`,style:{marginBottom:12},children:[(0,$.jsx)(JV.Item,{label:`视频ID`,labelStyle:{fontWeight:500,color:`#64748b`},contentStyle:{color:`#1e293b`},children:t.video_id}),(0,$.jsx)(JV.Item,{label:`广告主ID`,labelStyle:{fontWeight:500,color:`#64748b`},contentStyle:{color:`#1e293b`},children:t.advertiser_id}),(0,$.jsx)(JV.Item,{label:`素材ID`,labelStyle:{fontWeight:500,color:`#64748b`},contentStyle:{color:`#1e293b`},children:t.material_id})]}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:8},children:`质量评估`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8,marginBottom:12},children:R9.map(e=>{let n=t[e.key],r=n===`YES`,i=n===`NO`;if(n===`UNKNOWN`)return null;let a,o;return r?(a=e.label,o=e.yesColor):i&&(a=e.noLabel,o=e.noColor),(0,$.jsx)(h$,{color:o,style:{fontSize:12,borderRadius:4},children:a},e.key)})}),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)(gK,{dataSource:t.not_ad_high_quality_reason,renderItem:(e,t)=>(0,$.jsxs)(gK.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)(gK,{dataSource:t.not_ecp_high_quality_reason,renderItem:(e,t)=>(0,$.jsxs)(gK.Item,{style:{padding:`4px 0`,fontSize:12,color:`#64748b`},children:[t+1,`. `,e]},t),size:`small`})]})]}),title:null,trigger:`hover`,placement:`topLeft`,overlayStyle:{borderRadius:12,boxShadow:`0 8px 24px rgba(0,0,0,0.12)`},children:(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:4},children:R9.map(e=>a(e.key)?.tag)})})},sse=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`)}`},cse=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}`},lse={image:{label:`图片`,color:`green`},video:{label:`视频`,color:`blue`}},use={FAILED:{label:`失败`,color:`error`},PENDING:{label:`处理中`,color:`processing`},SUCCESS:{label:`成功`,color:`success`}},dse=()=>{let{message:e}=Jb.useApp(),t=Ye(),n=S.createRef(),[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(1),[d,f]=(0,S.useState)(10),[p,m]=(0,S.useState)(0),[h,g]=(0,S.useState)(new Set),[_,v]=(0,S.useState)(!1),[y,b]=(0,S.useState)(!1),[x,C]=(0,S.useState)(``),[w,T]=(0,S.useState)(`image`),E=()=>{n.current&&(n.current.pause(),n.current.currentTime=0),document.querySelectorAll(`video`).forEach(e=>{e.pause(),e.currentTime=0}),b(!1)},[D,O]=(0,S.useState)(``),[k,A]=(0,S.useState)([]),[j,M]=(0,S.useState)(!1),[N,P]=(0,S.useState)({advertiser_id:``,material_id:``,upload_id:``,file_name:``,resource_type:void 0});(0,S.useEffect)(()=>{F()},[]);let F=async(t=1,n=10,r=N)=>{c(!0);try{let e=await eae({advertiser_id:r.advertiser_id||void 0,material_id:r.material_id||void 0,upload_id:r.upload_id||void 0,file_name:r.file_name||void 0,resource_type:r.resource_type,page:t,page_size:n});e?.code===0?(o(e.data||[]),i(e.data||[]),m(e.total||0)):(o([]),m(0))}catch(t){e.error(`获取素材列表失败`),console.error(`获取素材列表失败:`,t)}finally{c(!1)}},I=[{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=lse[e];return(0,$.jsx)(h$,{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)(X,{type:`link`,icon:(0,$.jsx)(NW,{}),onClick:()=>{C(cse(n)),T(t.resourceType===`video`?`video`:`image`),b(!0)},size:`small`,children:`查看`}):(0,$.jsx)(h$,{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=use[e];return(0,$.jsx)(h$,{color:t?.color,children:t?.label||e||`-`})}},{title:`前测结果`,dataIndex:`preResult`,key:`preResult`,width:120,render:e=>(0,$.jsx)(ose,{preResult:e})},{title:`备注`,dataIndex:`note`,key:`note`,width:150,render:e=>(0,$.jsx)(tG.TextArea,{value:e||``,readOnly:!0,autoSize:{minRows:1,maxRows:4},style:{color:`#94a3b8`,resize:`none`,border:`none`,background:`transparent`,padding:0},placeholder:`-`})},{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:sse(e)})},{title:`操作`,fixed:`right`,key:`action`,render:(e,n)=>(0,$.jsx)(X,{type:`link`,onClick:()=>t(`/consume?advertiserId=${n.advertiserId}`),style:{color:`#6366f1`,padding:0},children:`查看消耗`})}],L=a.map((e,t)=>({...e,index:t+1,key:e.id})),R=async()=>{if(h.size===0){e.warning(`请先选择要推送的前测模板`);return}M(!0);try{let[e,t]=await Promise.all([d7({page:1,pageSize:100}),p7()]);A(e.data||[]),O(t.data?.id||``)}catch{e.error(`获取前测模板列表失败`)}finally{M(!1)}v(!0)},z=async()=>{if(h.size===0){e.warning(`请先选择要推送的素材`);return}if(!D){e.warning(`请选择前测模板`);return}try{await aae({resources_material_ids:Array.from(h),pre_test_template_id:D}),e.success(`推送素材成功`),v(!1),g(new Set)}catch(t){e.error(t.message||`推送素材失败`)}},B=r.filter(e=>h.has(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)(dZ,{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:`top`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,alignItems:`center`,flexWrap:`wrap`},children:[(0,$.jsx)(tG,{placeholder:`广告主ID`,value:N.advertiser_id,onChange:e=>P(t=>({...t,advertiser_id:e.target.value})),style:{width:160},allowClear:!0,onPressEnter:()=>{u(1),F(1,d)}}),(0,$.jsx)(tG,{placeholder:`素材ID`,value:N.material_id,onChange:e=>P(t=>({...t,material_id:e.target.value})),style:{width:160},allowClear:!0,onPressEnter:()=>{u(1),F(1,d)}}),(0,$.jsx)(tG,{placeholder:`上传ID`,value:N.upload_id,onChange:e=>P(t=>({...t,upload_id:e.target.value})),style:{width:160},allowClear:!0,onPressEnter:()=>{u(1),F(1,d)}}),(0,$.jsx)(tG,{placeholder:`文件名`,value:N.file_name,onChange:e=>P(t=>({...t,file_name:e.target.value})),style:{width:140},allowClear:!0,onPressEnter:()=>{u(1),F(1,d)}}),(0,$.jsx)(NC,{placeholder:`资源类型`,value:N.resource_type,onChange:e=>P(t=>({...t,resource_type:e})),style:{width:120},allowClear:!0,options:[{value:`image`,label:`图片`},{value:`video`,label:`视频`}]}),(0,$.jsx)(X,{type:`primary`,onClick:()=>{u(1),F(1,d)},children:`搜索`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(w8,{}),onClick:()=>t(`/generated?filterType=private_portrait&portraitTab=aigc_virtual`),style:{borderRadius:12,fontSize:14,borderColor:`#8b5cf6`,color:`#7c3aed`,background:`#f5f3ff`},children:`私域虚拟人像库`}),(0,$.jsxs)(X,{type:`primary`,loading:j,onClick:R,disabled:h.size===0,style:{borderRadius:12,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,color:`#fff`,boxShadow:`0 4px 14px rgba(99,102,241,0.3)`},children:[`推送前测 (`,h.size,`)`]})]})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(n$,{dataSource:L,columns:I,loading:s,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`},rowSelection:{type:`checkbox`,selectedRowKeys:Array.from(h),onChange:e=>{g(new Set(e))}}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(VG,{current:l,pageSize:d,total:p,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{u(e),f(t),F(e,t)},size:`small`})})]}),(0,$.jsxs)(NK,{title:`推送前测`,open:_,onCancel:()=>{v(!1),g(new Set)},onOk:z,okText:`推送`,cancelText:`取消`,width:600,style:{borderRadius:16},children:[(0,$.jsx)(`div`,{style:{display:`flex`,gap:16,marginBottom:24},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#475569`},children:`前测模板:`}),(0,$.jsx)(NC,{value:D,onChange:e=>O(e),style:{width:200},loading:j,placeholder:`选择前测模板`,options:k.map(e=>({value:e.id,label:e.name}))})]})}),(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`,display:`block`,marginBottom:12},children:[`已选素材 (`,h.size,`)`]}),(0,$.jsx)(`div`,{style:{maxHeight:200,overflowY:`auto`},children:B.length>0?(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:B.map(e=>(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:12,background:`#f8fafc`,borderRadius:8},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:e.resource.fileName}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`ID: `,e.id]})]})},e.id))}):(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`},children:`暂无选中的前测模板`})})]})]}),(0,$.jsx)(NK,{title:`预览`,open:y,onCancel:E,footer:null,width:600,style:{borderRadius:16},children:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:400},children:w===`video`?(0,$.jsx)(`video`,{ref:n,src:x,controls:!0,style:{maxWidth:`100%`,maxHeight:400,borderRadius:8},autoPlay:!0}):(0,$.jsx)(`img`,{src:x,alt:`预览`,style:{maxWidth:`100%`,maxHeight:400,borderRadius:8}})})})]})},{Text:fse}=Q,pse=2,mse=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 hse(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 gse(){return new Promise(e=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>e())})})}async function _se(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 gse()}function vse(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 yse(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 _se(e,i),t.clearRect(0,0,B9,V9),t.drawImage(e,0,0,B9,V9),vse(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 bse=({open:e,videoUrl:t,title:n=`手动拆镜`,loading:r=!1,minDuration:i=pse,maxDuration:a=mse,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 hse(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)(NK,{title:n,open:e,onCancel:o,width:Math.min(window.innerWidth-40,1400),destroyOnHidden:!0,footer:[(0,$.jsx)(X,{onClick:o,disabled:r,style:{borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`取消`},`cancel`),(0,$.jsx)(X,{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(N9);function P9(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`}],tse=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`)}`},nse=()=>{let{message:e}=Jb.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,u]=(0,S.useState)(`create`),[d,f]=(0,S.useState)(null),[p]=bU.useForm(),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(!1),[v,y]=(0,S.useState)(1),[b,x]=(0,S.useState)(10),[C,w]=(0,S.useState)(`AD`),[T,E]=(0,S.useState)(void 0),[D,O]=(0,S.useState)([]),[k,A]=(0,S.useState)({}),[j,M]=(0,S.useState)({});(0,S.useEffect)(()=>{N()},[v,b]),(0,S.useEffect)(()=>{P()},[]);let N=async t=>{o(!0);try{let e=await d7({page:t?.page??v,pageSize:t?.pageSize??b,platform:t?.platform??T});n(e.data||[]),i(e.pagination?.total||0),y(e.pagination?.page||1),x(e.pagination?.pageSize||10)}catch{e.error(`获取前测列表失败`)}finally{o(!1)}},P=async()=>{try{let e=localStorage.getItem(`preTestAreaData`);if(e){let t=JSON.parse(e);O(t.areaOptions),A(t.cityCodeMap),M(t.provinceCityMap);return}let t=(await b7({level:`ONE_LEVEL`})).data||[],n={},r={},i=await Promise.all(t.map(async e=>{let t=[];try{t=((await b7({level:`TWO_LEVEL`,parent_code:e.code})).data||[]).map(e=>({value:e.code,label:e.name,isLeaf:!0}));let i=t.map(e=>e.value);r[e.code]=i,t.forEach(e=>{n[e.value]=e.label})}catch(t){console.error(`获取省份 ${e.name} 的城市失败`,t),r[e.code]=[]}return{value:e.code,label:e.name,isLeaf:!1,children:t}})),a={areaOptions:i,cityCodeMap:n,provinceCityMap:r};localStorage.setItem(`preTestAreaData`,JSON.stringify(a)),O(i),A(n),M(r)}catch{e.error(`获取省份信息失败`)}},F=async t=>{let n=t[t.length-1];n.loading=!0;try{n.children=((await b7({level:`TWO_LEVEL`,parent_code:n.value})).data||[]).map(e=>({value:e.code,label:e.name,isLeaf:!0})),n.loading=!1,O([...D])}catch{e.error(`获取城市信息失败`),n.loading=!1,O([...D])}},I=t.map((e,t)=>({...e,index:(v-1)*b+t+1,key:e.id})),L=[{title:`前测模板编号`,dataIndex:`id`,key:`id`,width:120,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)(h$,{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=>{if(!e)return(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`-`});let t=F9.find(t=>t.name===e.trim());return(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:t?t.label:e})}},{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:`audienceRegion`,key:`audienceRegion`,ellipsis:!0,width:300,render:e=>{if(!Array.isArray(e)||e.length===0)return(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`-`});let t=e.map(e=>k[String(e)]||String(e));return(0,$.jsx)(tG.TextArea,{value:t.join(`, `)||`-`,readOnly:!0,autoSize:{minRows:1,maxRows:4},style:{resize:`none`,border:`none`,background:`transparent`,padding:0},placeholder:`-`})}},{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)(h$,{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:tse(e)})},{title:`操作`,dataIndex:`operation`,fixed:`right`,key:`operation`,render:(e,t)=>(0,$.jsxs)(EH,{size:4,children:[(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(NW,{}),style:{color:`#6366f1`,fontSize:12},onClick:()=>B(t),children:`详情`}),(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(Z$,{}),style:{color:`#6366f1`,fontSize:12},onClick:()=>V(t),children:`编辑`}),(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(k$,{}),style:{color:`#ef4444`,fontSize:12},onClick:()=>H(t),children:`删除`})]})}],R=()=>{p.resetFields(),w(`AD`),u(`create`),f(null),c(!0)},z=async e=>{f(e),w(e.platform||`AD`);let t=e.audienceRegion||[],n=[];for(let e of t){let t=String(e);if(t.length>=6){let e=t.slice(0,2);F(e),n.push([e,t])}}p.setFieldsValue({name:e.name,note:e.note,platform:e.platform,external_action:e.externalAction,cpa_bid:e.cpaBid,audience_gender:e.audienceGender,audience_age:e.audienceAge||[],audience_region:n,audience_network:e.audienceNetwork||[],cus_name:e.cusName,pricing_type:e.pricingType,cost_cap:e.costCap===void 0?!1:e.costCap,target_cost:e.targetCost===void 0?!1:e.targetCost,nobid:e.nobid===void 0?!1:e.nobid,cpc_bid:e.cpcBid,budget:e.budget,is_default:e.isDefault===void 0?!1:e.isDefault})},B=async t=>{try{let e=(await f7(t.id)).data;u(`detail`),z(e),c(!0)}catch{e.error(`获取详情失败`)}},V=async t=>{try{let e=(await f7(t.id)).data;u(`edit`),z(e),c(!0)}catch{e.error(`获取详情失败`)}},H=t=>{NK.confirm({title:`确认删除`,content:`确定要删除该前测模板吗?`,okText:`确定`,cancelText:`取消`,onOk:async()=>{try{await Nie(t.id),e.success(`删除成功`),N()}catch{e.error(`删除失败`)}}})};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)(jH,{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`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,alignItems:`center`},children:[(0,$.jsx)(NC,{placeholder:`投放平台`,value:T,onChange:e=>E(e),style:{width:140},allowClear:!0,options:[{value:`AD`,label:`AD`},{value:`QIANCHUAN`,label:`千川`},{value:`LOCAL`,label:`本地推`}]}),(0,$.jsx)(X,{type:`primary`,onClick:()=>{y(1),N()},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12},children:(0,$.jsx)(X,{type:`primary`,size:`medium`,icon:(0,$.jsx)(mL,{}),loading:a,onClick:R,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)(n$,{dataSource:I,columns:L,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)(VG,{current:v,pageSize:b,total:r,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,pageSizeOptions:[`10`,`20`,`50`,`100`],onChange:(e,t)=>{y(e),x(t)},size:`small`})})]}),(0,$.jsx)(NK,{title:(0,$.jsx)(EH,{children:l===`create`?`新增前测模板(选填项如填写需准确填写)`:l===`edit`?`编辑前测模板(选填项如填写需准确填写)`:`前测模板详情`}),open:s,onCancel:()=>{c(!1),p.resetFields(),w(`AD`)},onOk:async()=>{try{let t=await p.validateFields();_(!0);let n=[];(t.audience_region||[]).forEach(e=>{if(e.length===1){let t=j[e[0]]||[];n.push(...t)}else e.length>=2&&n.push(e[e.length-1])});let r={name:t.name,note:t.note,platform:t.platform,external_action:t.external_action,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};l===`edit`&&d?(await Mie(d.id,r),e.success(`前测模板更新成功`)):(await jie(r),e.success(`前测模板创建成功`)),c(!1),p.resetFields(),N()}catch(t){t?.message?e.error(t.message):t?.response?.data?.message?e.error(t.response.data.message):e.error(l===`edit`?`更新失败,请重试`:`创建失败,请重试`)}finally{_(!1)}},okText:l===`detail`?``:`提交`,cancelText:`取消`,width:720,height:600,confirmLoading:g,style:{borderRadius:16},footer:l===`detail`?null:void 0,children:(0,$.jsxs)(bU,{form:p,layout:`vertical`,style:{marginTop:16},disabled:l===`detail`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(bU.Item,{style:{flex:1},name:`name`,label:`模板名称`,rules:[{required:!0,message:`请输入模板名称`}],children:(0,$.jsx)(tG,{placeholder:`请输入模板名称`,style:{borderRadius:8,height:40}})}),(0,$.jsx)(bU.Item,{style:{flex:1},name:`platform`,label:`平台`,initialValue:`AD`,rules:[{required:!0,message:`请选择平台`}],children:(0,$.jsx)(NC,{placeholder:`请选择平台`,style:{borderRadius:8,height:40},onChange:e=>{w(e)},options:[{value:`AD`,label:`AD`},{value:`QIANCHUAN`,label:`千川`},{value:`LOCAL`,label:`本地推`}]})})]}),(0,$.jsx)($g,{defaultActiveKey:[],activeKey:m?[`optional`]:[],onChange:()=>h(!m),children:(0,$.jsxs)($g.Panel,{header:`选填项`,children:[C!==`LOCAL`&&(0,$.jsx)(bU.Item,{name:`external_action`,label:`转化目标`,children:(0,$.jsx)(NC,{placeholder:`请选择转化目标`,style:{borderRadius:8,height:40},options:F9.filter(e=>C===`AD`?e.name.startsWith(`AD_`):C===`QIANCHUAN`?e.name.startsWith(`QC_`):C===`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,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(bU.Item,{style:{flex:1},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)(tG,{type:`number`,placeholder:`取值范围: 1-10000,精确到小数点后2位`,style:{borderRadius:8,height:40},min:1,max:1e4,step:.01})}),(0,$.jsx)(bU.Item,{style:{flex:1},name:`audience_gender`,label:`受众性别`,children:(0,$.jsx)(NC,{placeholder:`请选择受众性别`,style:{borderRadius:8,height:40},options:[{value:`ALL`,label:`不限`},{value:`MALE`,label:`男`},{value:`FEMALE`,label:`女`}]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(bU.Item,{style:{flex:1},name:`audience_age`,label:`受众年龄`,children:(0,$.jsx)(NC,{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)(bU.Item,{style:{flex:1},name:`audience_network`,label:`网络类型`,children:(0,$.jsx)(NC,{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)(bU.Item,{name:`audience_region`,label:`受众地区`,children:(0,$.jsx)(tz,{multiple:!0,placeholder:`请选择受众地区(可多选)`,style:{borderRadius:8,minHeight:40},options:D,maxTagCount:`responsive`})}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(bU.Item,{style:{flex:1},name:`cus_name`,label:`客户主体名称`,children:(0,$.jsx)(tG,{placeholder:`请输入客户主体名称`,style:{borderRadius:8,height:40}})}),(0,$.jsx)(bU.Item,{style:{flex:1},name:`pricing_type`,label:`出价类型`,children:(0,$.jsx)(NC,{placeholder:`请选择出价类型`,style:{borderRadius:8,height:40},options:[{value:`OCPC`,label:`OCPC`},{value:`CPA`,label:`CPA`},{value:`OCPM`,label:`OCPM`}]})})]}),C==`AD`&&(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(bU.Item,{style:{flex:1},name:`cost_cap`,label:`是否最优成本出价`,initialValue:!1,children:(0,$.jsx)(NC,{placeholder:`是否最优成本出价`,style:{borderRadius:8,height:40},options:[{value:!0,label:`开启`},{value:!1,label:`关闭`}]})}),(0,$.jsx)(bU.Item,{style:{flex:1},name:`target_cost`,label:`是否稳定成本出价`,initialValue:!1,children:(0,$.jsx)(NC,{placeholder:`是否稳定成本出价`,style:{borderRadius:8,height:40},options:[{value:!0,label:`开启`},{value:!1,label:`关闭`}]})}),(0,$.jsx)(bU.Item,{style:{flex:1},name:`nobid`,label:`是否最大转化出价`,initialValue:!1,children:(0,$.jsx)(NC,{placeholder:`是否最大转化出价`,style:{borderRadius:8,height:40},options:[{value:!0,label:`开启`},{value:!1,label:`关闭`}]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(bU.Item,{style:{flex:1},name:`cpc_bid`,label:`目标点击成本`,getValueFromEvent:e=>parseFloat(e.target.value)||void 0,children:(0,$.jsx)(tG,{type:`number`,placeholder:`请输入目标点击成本`,style:{borderRadius:8,height:40}})}),(0,$.jsx)(bU.Item,{style:{flex:1},name:`budget`,label:`预算金额`,getValueFromEvent:e=>parseFloat(e.target.value)||void 0,children:(0,$.jsx)(tG,{type:`number`,placeholder:`请输入预算金额`,style:{borderRadius:8,height:40}})})]}),(0,$.jsx)(bU.Item,{name:`note`,label:`备注`,children:(0,$.jsx)(tG.TextArea,{placeholder:`请输入备注`,rows:2,style:{borderRadius:8}})}),(0,$.jsx)(bU.Item,{name:`is_default`,label:`默认模板`,initialValue:!1,children:(0,$.jsx)(NC,{placeholder:`请选择默认模板`,style:{borderRadius:8,height:40},options:[{value:!0,label:`是`},{value:!1,label:`否`}]})})]},`optional`)})]})})]})},I9=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`)}`},rse=e=>{let t=`http://ceshi.apiforeign.minzhong.cn`;if(e.startsWith(`http://`)||e.startsWith(`https://`))return e;let n=e.startsWith(`/`)?e.slice(1):e;return`${t.endsWith(`/`)?t.slice(0,-1):t}/${n}`},ise=()=>{let{message:e}=Jb.useApp(),t=Ye(),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(void 0),[f,p]=(0,S.useState)(1),[m,h]=(0,S.useState)(10),[g,_]=(0,S.useState)(0),[v,y]=(0,S.useState)({account_userid:``,open_type:void 0,account_id:``}),[b,x]=(0,S.useState)({}),[C,w]=(0,S.useState)([]),[T,E]=(0,S.useState)([]);(0,S.useEffect)(()=>{k(),O(),D()},[]);let D=async()=>{try{await p7()}catch{}},O=async()=>{try{let e=(await C7()).data||[],t={},n=[];e.forEach(e=>{t[e.openType]=e.typeName,n.push({value:e.openType,label:e.typeName})}),x(t),w(n),E(e)}catch(e){console.error(`加载开户方式列表失败:`,e)}},k=async(t=1,n=10,i=v)=>{s(!0);try{let e=await u7({page:t,page_size:n,account_userid:i.account_userid||void 0,open_type:i.open_type,account_id:i.account_id||void 0});e?(e.data&&r(e.data.data||e.data),e.pagination&&(_(e.pagination.total||0),p(e.pagination.page||1),h(e.pagination.pageSize||10))):r(e||[])}catch{e.error(`获取授权列表失败`)}finally{s(!1)}},A=()=>{l(!0)},j=async()=>{if(!u){e.warning(`请选择开户方式`);return}a(!0);try{let t=await l7({open_type:u});t.authUrl?window.open(t.authUrl,`_blank`):e.error(`获取授权链接失败`)}catch{e.error(`请求授权失败`)}finally{a(!1),l(!1),d(void 0)}},M=async t=>{try{let n=await l7({open_type:t.openType});n.authUrl?window.open(n.authUrl,`_blank`):e.error(`获取授权链接失败`)}catch{e.error(`重新授权失败`)}},N=[{title:`ID`,dataIndex:`id`,key:`id`},{title:`授权绑定账户ID`,dataIndex:`accountId`,key:`accountId`},{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:`开户方式`,dataIndex:`openType`,key:`openType`,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:b[e]||e})},{title:`是否敏感物料授权`,dataIndex:`materialAuthStatus`,key:`materialAuthStatus`,width:100,render:e=>(0,$.jsx)(h$,{color:e?`green`:`default`,children:e?`是`:`否`})},{title:`授权有效时间`,dataIndex:`refreshTokenExpired`,key:`refreshTokenExpired`,width:160,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:I9(e)})},{title:`更新时间`,dataIndex:`updatedAt`,key:`updatedAt`,width:160,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:I9(e)})},{title:`操作`,dataIndex:`action`,fixed:`right`,key:`action`,width:190,render:(e,n)=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(X,{type:`link`,onClick:()=>t(`/authacc?oauth_id=${n.id}`),style:{color:`#6366f1`,padding:0},children:`查看授权账户`}),(0,$.jsx)(X,{type:`link`,onClick:()=>M(n),style:{color:`#00c49f`,padding:0,marginLeft:8},children:`重新授权`})]})}],P=n.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)(h6,{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)(tG,{placeholder:`授权绑定账户ID`,value:v.account_id,onChange:e=>y(t=>({...t,account_id:e.target.value})),style:{width:180},allowClear:!0,onPressEnter:()=>{p(1),k(1,m)}}),(0,$.jsx)(tG,{placeholder:`授权登录账户用户ID`,value:v.account_userid,onChange:e=>y(t=>({...t,account_userid:e.target.value})),style:{width:180},allowClear:!0,onPressEnter:()=>{p(1),k(1,m)}}),(0,$.jsx)(NC,{placeholder:`开户方式`,value:v.open_type,onChange:e=>y(t=>({...t,open_type:e})),style:{width:140},allowClear:!0,options:C}),(0,$.jsx)(X,{type:`primary`,size:`medium`,onClick:()=>{p(1),k(1,m)},children:`搜索`})]}),(0,$.jsx)(X,{type:`primary`,size:`medium`,icon:(0,$.jsx)(mL,{}),onClick:A,loading:i,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)(n$,{dataSource:P,columns:N,loading:o,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(VG,{current:f,pageSize:m,total:g,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{p(e),h(t),k(e,t)},size:`small`})})]}),(0,$.jsx)(NK,{title:`选择开户方式`,open:c,onOk:j,onCancel:()=>{l(!1),d(void 0)},okText:`确认授权`,cancelText:`取消`,confirmLoading:i,width:700,children:(0,$.jsx)(`div`,{style:{display:`flex`,gap:16,flexWrap:`wrap`,maxHeight:420,overflowY:`auto`},children:T.map(e=>(0,$.jsxs)(`div`,{onClick:()=>d(e.openType),style:{width:`calc(33.33% - 12px)`,cursor:`pointer`,borderRadius:12,border:`2px solid ${u===e.openType?`#6366f1`:`#e2e8f0`}`,padding:16,transition:`all 0.3s ease`,background:u===e.openType?`#f0f1ff`:`#fff`},children:[(0,$.jsx)(`div`,{style:{width:`100%`,height:48,marginBottom:12,borderRadius:8,overflow:`hidden`},children:e.thumb?(0,$.jsx)(`img`,{src:rse(e.thumb),alt:e.typeName,style:{width:`100%`,height:`100%`,display:`block`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,background:`#f1f5f9`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(Q.Text,{type:`secondary`,children:`暂无图片`})})}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:e.typeName}),(0,$.jsx)(`p`,{style:{fontSize:12,color:`#64748b`,marginTop:8,marginBottom:0,lineHeight:1.5},children:e.description})]},e.id))})})]})},ase=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`)}`},ose=()=>{let e=Ye(),[t]=On(),{message:n}=Jb.useApp(),[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(1),[l,u]=(0,S.useState)(10),[d,f]=(0,S.useState)(0),[p,m]=(0,S.useState)({advertiser_id:``,oauth_id:``,advertiser_name:``}),[h,g]=(0,S.useState)({});(0,S.useEffect)(()=>{let e=t.get(`oauth_id`);e?(m(t=>({...t,oauth_id:e})),v(1,10,{...p,oauth_id:e})):v(),_()},[]);let _=async()=>{try{let e=(await C7()).data||[],t={},n=[];e.forEach(e=>{t[e.openType]=e.typeName,n.push({value:e.openType,label:e.typeName})}),g(t)}catch(e){console.error(`加载开户方式列表失败:`,e)}},v=async(e=1,t=10,r=p)=>{o(!0);try{let n=await nae({advertiser_id:r.advertiser_id||``,oauth_id:r.oauth_id||``,advertiser_name:r.advertiser_name||``,page:e,page_size:t});n?(n.data&&i(n.data.data||n.data),n.pagination&&(f(n.pagination.total||0),c(n.pagination.page||1),u(n.pagination.pageSize||10))):i(n||[])}catch{n.error(`获取授权列表失败`)}finally{o(!1)}},y=[{title:`ID`,dataIndex:`id`,key:`id`},{title:`广告主账户ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:160},{title:`广告主账户名称`,dataIndex:`advertiserName`,key:`advertiserName`},{title:`广告主账户角色`,dataIndex:`advertiserRole`,key:`advertiserRole`},{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`},{title:`授权账户登录账号名称`,dataIndex:`accountUsername`,key:`accountUsername`},{title:`授权ID`,dataIndex:`oauthId`,key:`oauthId`},{title:`开户方式`,dataIndex:`openType`,key:`openType`,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:h[e]||e})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:ase(e)})},{title:`操作`,fixed:`right`,dataIndex:`action`,key:`action`,render:(e,t)=>(0,$.jsx)(EH,{children:(0,$.jsx)(X,{size:`small`,danger:!0,onClick:()=>{NK.confirm({title:`确认删除`,content:`确定要删除该授权账户吗?`,okText:`确定`,cancelText:`取消`,onOk:async()=>{try{await rae({id:t.id}),n.success(`删除成功`),v(s,l)}catch{n.error(`删除失败`)}}})},children:`删除`})})}],b=()=>{document.referrer.includes(window.location.origin)?e(-1):e(`/authorization`)},x=r.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)(X,{type:`text`,icon:(0,$.jsx)(z2,{}),onClick:b}),(0,$.jsx)(h6,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`授权管理`})]}),(0,$.jsx)(`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)(tG,{placeholder:`广告主账户ID`,value:p.advertiser_id,onChange:e=>m(t=>({...t,advertiser_id:e.target.value})),style:{width:180},allowClear:!0,onPressEnter:()=>{c(1),v(1,l)}}),(0,$.jsx)(tG,{placeholder:`授权ID`,value:p.oauth_id,onChange:e=>m(t=>({...t,oauth_id:e.target.value})),style:{width:180},allowClear:!0,onPressEnter:()=>{c(1),v(1,l)}}),(0,$.jsx)(tG,{placeholder:`广告主账户名称`,value:p.advertiser_name,onChange:e=>m(t=>({...t,advertiser_name:e.target.value})),style:{width:180},allowClear:!0,onPressEnter:()=>{c(1),v(1,l)}}),(0,$.jsx)(X,{type:`primary`,size:`medium`,onClick:()=>{c(1),v(1,l)},children:`搜索`})]})}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(n$,{dataSource:x,columns:y,loading:a,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(VG,{current:s,pageSize:l,total:d,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{c(e),u(t),v(e,t)},size:`small`})})]})]})},L9=[{key:`is_ad_high_quality_material`,label:`AD优质`,noLabel:`AD非优质素材`,unknownLabel:`AD未知`,yesColor:`green`,noColor:`red`,unknownColor:`default`},{key:`is_ecp_high_quality_material`,label:`千川优质`,noLabel:`千川非优质素材`,unknownLabel:`千川未知`,yesColor:`green`,noColor:`red`,unknownColor:`default`},{key:`is_local_high_quality_material`,label:`本地推优质`,noLabel:`本地推非优质`,unknownLabel:`本地推未知`,yesColor:`green`,noColor:`red`,unknownColor:`default`},{key:`is_inefficient_material`,label:`低效`,noLabel:`非低效`,unknownLabel:`是否低效未知`,yesColor:`red`,noColor:`green`,unknownColor:`default`},{key:`is_first_publish_material`,label:`首发`,noLabel:`非首发`,unknownLabel:`是否首发未知`,yesColor:`blue`,noColor:`default`,unknownColor:`default`}],sse=({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=e=>{let n=L9.find(t=>t.key===e);if(!n)return null;let r=t[e],i=r===`YES`,a=r===`NO`;if(r===`UNKNOWN`)return null;let o,s;return i?(o=n.label,s=n.yesColor):a&&(o=n.noLabel,s=n.noColor),{tag:(0,$.jsx)(h$,{color:s,style:{marginRight:6,fontSize:12,borderRadius:4},children:o},e),detail:{label:n.label.replace(`优质`,`优质素材`),value:o,color:s}}};return(0,$.jsx)(jw,{content:(0,$.jsxs)(`div`,{style:{maxWidth:500,padding:`8px 0`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,display:`block`,marginBottom:12,color:`#1e293b`},children:`前测结果详情`}),(0,$.jsxs)(JV,{column:1,size:`small`,style:{marginBottom:12},children:[(0,$.jsx)(JV.Item,{label:`视频ID`,labelStyle:{fontWeight:500,color:`#64748b`},contentStyle:{color:`#1e293b`},children:t.video_id}),(0,$.jsx)(JV.Item,{label:`广告主ID`,labelStyle:{fontWeight:500,color:`#64748b`},contentStyle:{color:`#1e293b`},children:t.advertiser_id}),(0,$.jsx)(JV.Item,{label:`素材ID`,labelStyle:{fontWeight:500,color:`#64748b`},contentStyle:{color:`#1e293b`},children:t.material_id})]}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:8},children:`质量评估`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8,marginBottom:12},children:L9.map(e=>{let n=t[e.key],r=n===`YES`,i=n===`NO`;if(n===`UNKNOWN`)return null;let a,o;return r?(a=e.label,o=e.yesColor):i&&(a=e.noLabel,o=e.noColor),(0,$.jsx)(h$,{color:o,style:{fontSize:12,borderRadius:4},children:a},e.key)})}),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)(gK,{dataSource:t.not_ad_high_quality_reason,renderItem:(e,t)=>(0,$.jsxs)(gK.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)(gK,{dataSource:t.not_ecp_high_quality_reason,renderItem:(e,t)=>(0,$.jsxs)(gK.Item,{style:{padding:`4px 0`,fontSize:12,color:`#64748b`},children:[t+1,`. `,e]},t),size:`small`})]})]}),title:null,trigger:`hover`,placement:`topLeft`,overlayStyle:{borderRadius:12,boxShadow:`0 8px 24px rgba(0,0,0,0.12)`},children:(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:4},children:L9.map(e=>a(e.key)?.tag)})})},cse=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`)}`},lse=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}`},use={image:{label:`图片`,color:`green`},video:{label:`视频`,color:`blue`}},dse={FAILED:{label:`失败`,color:`error`},PENDING:{label:`处理中`,color:`processing`},SUCCESS:{label:`成功`,color:`success`}},fse=()=>{let{message:e}=Jb.useApp(),t=Ye(),n=S.createRef(),[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(1),[d,f]=(0,S.useState)(10),[p,m]=(0,S.useState)(0),[h,g]=(0,S.useState)(new Set),[_,v]=(0,S.useState)(!1),[y,b]=(0,S.useState)(!1),[x,C]=(0,S.useState)(``),[w,T]=(0,S.useState)(`image`),E=()=>{n.current&&(n.current.pause(),n.current.currentTime=0),document.querySelectorAll(`video`).forEach(e=>{e.pause(),e.currentTime=0}),b(!1)},[D,O]=(0,S.useState)(``),[k,A]=(0,S.useState)([]),[j,M]=(0,S.useState)(!1),[N,P]=(0,S.useState)({advertiser_id:``,material_id:``,upload_id:``,file_name:``,resource_type:void 0});(0,S.useEffect)(()=>{F()},[]);let F=async(t=1,n=10,r=N)=>{c(!0);try{let e=await eae({advertiser_id:r.advertiser_id||void 0,material_id:r.material_id||void 0,upload_id:r.upload_id||void 0,file_name:r.file_name||void 0,resource_type:r.resource_type,page:t,page_size:n});e?.code===0?(o(e.data||[]),i(e.data||[]),m(e.total||0)):(o([]),m(0))}catch(t){e.error(`获取素材列表失败`),console.error(`获取素材列表失败:`,t)}finally{c(!1)}},I=[{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=use[e];return(0,$.jsx)(h$,{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)(X,{type:`link`,icon:(0,$.jsx)(NW,{}),onClick:()=>{C(lse(n)),T(t.resourceType===`video`?`video`:`image`),b(!0)},size:`small`,children:`查看`}):(0,$.jsx)(h$,{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=dse[e];return(0,$.jsx)(h$,{color:t?.color,children:t?.label||e||`-`})}},{title:`前测结果`,dataIndex:`preResult`,key:`preResult`,width:120,render:e=>(0,$.jsx)(sse,{preResult:e})},{title:`备注`,dataIndex:`note`,key:`note`,width:150,render:e=>(0,$.jsx)(tG.TextArea,{value:e||``,readOnly:!0,autoSize:{minRows:1,maxRows:4},style:{color:`#94a3b8`,resize:`none`,border:`none`,background:`transparent`,padding:0},placeholder:`-`})},{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:cse(e)})},{title:`操作`,fixed:`right`,key:`action`,render:(e,n)=>(0,$.jsx)(X,{type:`link`,onClick:()=>t(`/consume?advertiserId=${n.advertiserId}`),style:{color:`#6366f1`,padding:0},children:`查看消耗`})}],L=a.map((e,t)=>({...e,index:t+1,key:e.id})),R=async()=>{if(h.size===0){e.warning(`请先选择要推送的前测模板`);return}M(!0);try{let[e,t]=await Promise.all([d7({page:1,pageSize:100}),p7()]);A(e.data||[]),O(t.data?.id||``)}catch{e.error(`获取前测模板列表失败`)}finally{M(!1)}v(!0)},z=async()=>{if(h.size===0){e.warning(`请先选择要推送的素材`);return}if(!D){e.warning(`请选择前测模板`);return}try{await aae({resources_material_ids:Array.from(h),pre_test_template_id:D}),e.success(`推送素材成功`),v(!1),g(new Set)}catch(t){e.error(t.message||`推送素材失败`)}},B=r.filter(e=>h.has(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)(dZ,{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:`top`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,alignItems:`center`,flexWrap:`wrap`},children:[(0,$.jsx)(tG,{placeholder:`广告主ID`,value:N.advertiser_id,onChange:e=>P(t=>({...t,advertiser_id:e.target.value})),style:{width:160},allowClear:!0,onPressEnter:()=>{u(1),F(1,d)}}),(0,$.jsx)(tG,{placeholder:`素材ID`,value:N.material_id,onChange:e=>P(t=>({...t,material_id:e.target.value})),style:{width:160},allowClear:!0,onPressEnter:()=>{u(1),F(1,d)}}),(0,$.jsx)(tG,{placeholder:`上传ID`,value:N.upload_id,onChange:e=>P(t=>({...t,upload_id:e.target.value})),style:{width:160},allowClear:!0,onPressEnter:()=>{u(1),F(1,d)}}),(0,$.jsx)(tG,{placeholder:`文件名`,value:N.file_name,onChange:e=>P(t=>({...t,file_name:e.target.value})),style:{width:140},allowClear:!0,onPressEnter:()=>{u(1),F(1,d)}}),(0,$.jsx)(NC,{placeholder:`资源类型`,value:N.resource_type,onChange:e=>P(t=>({...t,resource_type:e})),style:{width:120},allowClear:!0,options:[{value:`image`,label:`图片`},{value:`video`,label:`视频`}]}),(0,$.jsx)(X,{type:`primary`,onClick:()=>{u(1),F(1,d)},children:`搜索`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(w8,{}),onClick:()=>t(`/generated?filterType=private_portrait&portraitTab=aigc_virtual`),style:{borderRadius:12,fontSize:14,borderColor:`#8b5cf6`,color:`#7c3aed`,background:`#f5f3ff`},children:`私域虚拟人像库`}),(0,$.jsxs)(X,{type:`primary`,loading:j,onClick:R,disabled:h.size===0,style:{borderRadius:12,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,color:`#fff`,boxShadow:`0 4px 14px rgba(99,102,241,0.3)`},children:[`推送前测 (`,h.size,`)`]})]})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(n$,{dataSource:L,columns:I,loading:s,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`},rowSelection:{type:`checkbox`,selectedRowKeys:Array.from(h),onChange:e=>{g(new Set(e))}}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(VG,{current:l,pageSize:d,total:p,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{u(e),f(t),F(e,t)},size:`small`})})]}),(0,$.jsxs)(NK,{title:`推送前测`,open:_,onCancel:()=>{v(!1),g(new Set)},onOk:z,okText:`推送`,cancelText:`取消`,width:600,style:{borderRadius:16},children:[(0,$.jsx)(`div`,{style:{display:`flex`,gap:16,marginBottom:24},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#475569`},children:`前测模板:`}),(0,$.jsx)(NC,{value:D,onChange:e=>O(e),style:{width:200},loading:j,placeholder:`选择前测模板`,options:k.map(e=>({value:e.id,label:e.name}))})]})}),(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`,display:`block`,marginBottom:12},children:[`已选素材 (`,h.size,`)`]}),(0,$.jsx)(`div`,{style:{maxHeight:200,overflowY:`auto`},children:B.length>0?(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:B.map(e=>(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:12,background:`#f8fafc`,borderRadius:8},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:e.resource.fileName}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`ID: `,e.id]})]})},e.id))}):(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`},children:`暂无选中的前测模板`})})]})]}),(0,$.jsx)(NK,{title:`预览`,open:y,onCancel:E,footer:null,width:600,style:{borderRadius:16},children:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:400},children:w===`video`?(0,$.jsx)(`video`,{ref:n,src:x,controls:!0,style:{maxWidth:`100%`,maxHeight:400,borderRadius:8},autoPlay:!0}):(0,$.jsx)(`img`,{src:x,alt:`预览`,style:{maxWidth:`100%`,maxHeight:400,borderRadius:8}})})})]})},{Text:pse}=Q,mse=2,hse=15,R9=7,z9=160,B9=90;function V9(e){return String(e).padStart(2,`0`)}function H9(e){return Number.isFinite(e)?Math.max(0,Math.round(e)):0}function U9(e){let t=H9(e),n=Math.floor(t/60),r=t%60;return`${V9(n)}:${V9(r)}`}function W9(e,t,n){return Math.min(Math.max(e,t),n)}function G9(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 gse(){return new Promise(e=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>e())})})}async function _se(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 gse()}function vse(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 yse(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 _se(e,i),t.clearRect(0,0,z9,B9),t.drawImage(e,0,0,z9,B9),vse(t,z9,B9))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(R9,n)))]}var bse=({open:e,videoUrl:t,title:n=`手动拆镜`,loading:r=!1,minDuration:i=mse,maxDuration:a=hse,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 G9(t,n)?t:(u.current=n,n)})},[]),M=(0,S.useCallback)(e=>{let t=H9(e);d.current!==t&&(d.current=t,g(t))},[]),N=(0,S.useCallback)(e=>{let t=c.current;if(!t||!O)return;let n=H9(W9(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=z9,r.height=B9;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=W9(k||Math.min(R9,a),i,Math.min(a,O)),n=W9(e,0,Math.max(0,O-t));n=H9(n);let r=[n,n+t];j(r),N(r[0])},[A,O,a,i,N,k,j]);return(0,$.jsx)(NK,{title:n,open:e,onCancel:o,width:Math.min(window.innerWidth-40,1400),destroyOnHidden:!0,footer:[(0,$.jsx)(X,{onClick:o,disabled:r,style:{borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`取消`},`cancel`),(0,$.jsx)(X,{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; @@ -499,8 +499,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)(X,{type:`text`,icon:w?(0,$.jsx)(H6,{}):(0,$.jsx)(o8,{}),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(H9(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)(X,{type:`text`,icon:w?(0,$.jsx)(H6,{}):(0,$.jsx)(o8,{}),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:[U9(h),` / `,U9(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)(cK,{size:`small`}),(0,$.jsx)(fse,{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)(cK,{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)(iV,{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:xse}=tG,Sse=`http://ceshi.apiforeign.minzhong.cn`,J9=2,Y9=15;function X9(e){return e?/^https?:\/\//i.test(e)?e:`${Sse}${e}`:``}function Cse(){let{creatID:e}=$e(),t=Ye(),[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)(``),[w,T]=(0,S.useState)(null),[E,D]=(0,S.useState)([]),[O,k]=(0,S.useState)(!1),[A,j]=(0,S.useState)(!1),[M,N]=(0,S.useState)(!1),P=(0,S.useRef)(null),F=(0,S.useRef)(null),I=(0,S.useMemo)(()=>X9(w?.videoUrl),[w?.videoUrl]),L=(0,S.useMemo)(()=>E.length===0?`AI自动拆分`:E.some(e=>e.sourceMode===`ai_suggestion`)?`AI重拆`:`AI自动拆分`,[E]),R=(0,S.useCallback)(async()=>{if(e)try{T(await h7(e))}catch{Z.error(`获取任务详情失败`)}},[e]),z=(0,S.useCallback)(async()=>{if(e)try{let t=(await g7(e)).items||[];D(t),t.some(e=>e.moduleProjectCurrentStepCode!==`video_generate`&&e.moduleProjectStatus!==`completed`&&e.moduleProjectStatus!==`failed`)?P.current||=window.setInterval(async()=>{try{let t=(await g7(e)).items||[];D(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`)&&(P.current&&=(clearInterval(P.current),null))}catch{}},3e4):P.current&&=(clearInterval(P.current),null)}catch{Z.error(`获取拆镜列表失败`)}},[e]),B=(0,S.useCallback)(async()=>{if(e)try{await Uie(e),Z.success(`重新分析已提交`),R(),F.current||=window.setInterval(async()=>{try{let t=await h7(e);T(t),(t.analysisStatus===`completed`||t.analysisStatus===`failed`)&&(F.current&&=(clearInterval(F.current),null))}catch{}},3e3)}catch(e){Z.error(e?.message||`重新分析失败`)}},[e,R]),V=(0,S.useCallback)(async e=>{try{await Gie(e),Z.success(`重新分析已提交`),z()}catch(e){Z.error(e?.message||`重新分析失败`)}},[z]),H=(0,S.useCallback)(async e=>{try{await Kie(e),Z.success(`重新切割已提交`),z()}catch(e){Z.error(e?.message||`重新切割失败`)}},[z]),U=(0,S.useCallback)(async e=>{try{await Wie(e),Z.success(`删除成功`),z()}catch(e){Z.error(e?.message||`删除失败`)}},[z]),W=(0,S.useCallback)(async()=>{await Promise.all([R(),z()])},[R,z]);(0,S.useEffect)(()=>(W(),()=>{P.current&&=(clearInterval(P.current),null),F.current&&=(clearInterval(F.current),null)}),[W]),(0,S.useEffect)(()=>{if(w)return w.analysisStatus===`processing`?F.current=window.setInterval(async()=>{try{T(await h7(e))}catch{}},3e3):F.current&&=(clearInterval(F.current),null),()=>{F.current&&=(clearInterval(F.current),null)}},[w?.analysisStatus,e]);let ee=(e,t)=>{s(e),l(t),r(!0)},G=()=>{r(!1),s(null),g(``),l(``),v(``),b(``),C(``)},te=e=>{e.fileList.length===0&&(b(``),C(``))},ne=async e=>{try{let t=await uie(e);b(t.url),C(t.resource_id||``),Z.success(`图片上传成功`)}catch{Z.error(`图片上传失败,请重试`)}return!1},K=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:y,material_image_resource_id:x||void 0,idempotency_key:`replication_${Date.now()}`};k(!0);try{await Rie(o,n),Z.success(`视频生成任务创建成功`),G(),g7(e).then(e=>{let n=e.items.find(e=>e.id===o);Z.loading(`创建中...`,3),setTimeout(()=>{t(`/removelens/${n.moduleProjectId}/removefenbu`)},3e3)})}catch(e){Z.error(e?.message||`创建失败,请重试`)}finally{k(!1)}},re=async()=>{if(e){N(!0);try{let t=E.some(e=>e.sourceMode===`ai_suggestion`);await Iie(e,{selected_indices:[],replace_existing:t}),Z.success(t?`AI 重拆任务已提交`:`AI 拆镜任务已提交`),await W()}catch(e){Z.error(e?.message||`拆镜失败`)}finally{N(!1)}}},ie=()=>{if(!I){Z.warning(`原视频地址不存在`);return}a(!0)},ae=async t=>{if(e){if(t.durationSecondY9){Z.warning(`拆镜片段不能超过 ${Y9} 秒`);return}j(!0);try{await Lie(e,{start_second:t.startSecond,end_second:t.endSecond}),Z.success(`手动拆镜任务已提交`),a(!1),await W()}catch(e){Z.error(e?.message||`手动拆镜失败`)}finally{j(!1)}}},q=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,$.jsx)(`div`,{style:{padding:`16px 24px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,borderRadius:16,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`,position:`relative`,zIndex:10},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(z2,{}),onClick:()=>t(-1),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h1`,{style:{fontSize:18,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,margin:0},children:`AI视频拆镜工作台`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`一键拆解画面分镜,助力仿拍或创作`})]}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]})}),w?(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,overflow:`hidden`},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)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{position:`relative`,width:280,height:160,borderRadius:12,overflow:`hidden`,flexShrink:0,boxShadow:`0 4px 16px rgba(0,0,0,0.1)`,cursor:`pointer`},onClick:()=>{d(I),p(!0)},onMouseEnter:e=>{let t=e.currentTarget.querySelector(`div:last-child`);t&&(t.style.opacity=`1`)},onMouseLeave:e=>{let t=e.currentTarget.querySelector(`div:last-child`);t&&(t.style.opacity=`0`)},children:[(0,$.jsx)(`video`,{src:I,style:{width:`100%`,height:`100%`,objectFit:`cover`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,background:`rgba(0,0,0,0.2)`,display:`flex`,alignItems:`center`,justifyContent:`center`,opacity:0,transition:`opacity 0.2s`},children:(0,$.jsx)(`div`,{style:{width:40,height:40,borderRadius:`50%`,background:`rgba(255,255,255,0.9)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`#6366f1`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,$.jsx)(`polygon`,{points:`5 3 19 12 5 21 5 3`})})})})]}),w.analysisStatus===`failed`&&(0,$.jsx)(`div`,{style:{marginTop:12,textAlign:`center`},children:(0,$.jsx)(X,{onClick:B,style:{width:`100%`,padding:`6px 16px`,borderRadius:8,fontSize:12,border:`1px solid #ef4444`,color:`#ef4444`,background:`rgba(239, 68, 68, 0.05)`,cursor:w.analysisStatus===`processing`?`not-allowed`:`pointer`,transition:`all 0.2s`},onMouseEnter:e=>{w.analysisStatus!==`processing`&&(e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`)},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.05)`},children:w.analysisStatus===`processing`?`分析中...`:`重新分析`})})]}),(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:[`上传时间: `,w.createdAt?new Date(w.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:w.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:`受众群体:`}),w.analysisStatus===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(cK,{size:`small`,style:{color:`#f59e0b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):w.analysisStatus===`completed`?(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:(w.originalVideoAudience?.split(`、`)||[]).map((e,t)=>(0,$.jsx)(h$,{style:{fontSize:12,background:`rgba(99, 102, 241, 0.1)`,color:`#6366f1`,border:`none`,borderRadius:20},children:e},t))}):w.analysisStatus===`failed`?(0,$.jsx)(`span`,{style:{color:`#ef4444`,fontSize:14},children:`分析失败`}):null]}),(0,$.jsxs)(`div`,{style:{display:`flex`},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`视频内容:`}),w.analysisStatus===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(cK,{size:`small`,style:{color:`#f59e0b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):w.analysisStatus===`completed`?(0,$.jsx)(`span`,{style:{color:`#475569`,lineHeight:1.6,height:100,overflowY:`auto`},children:w.originalVideoContent}):w.analysisStatus===`failed`?(0,$.jsx)(`span`,{style:{color:`#ef4444`,fontSize:14},children:`分析失败`}):null]})]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:20,marginTop:20},children:[(0,$.jsx)(X,{type:`default`,onClick:ie,disabled:!I||A,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)(LK,{title:L===`AI重拆`?`确定要AI重拆吗?`:`确定要AI拆分吗?`,okText:`确定`,cancelText:`取消`,onConfirm:re,children:(0,$.jsxs)(X,{type:`primary`,loading:M,disabled:M,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:L}),(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%`}}),w?.aiSuggestions&&w.aiSuggestions.length>0&&(0,$.jsx)(Cw,{title:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontWeight:600,marginBottom:8,color:`#6366f1`},children:`AI拆分方案`}),(w?.ai_suggestions||w?.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:[`共 `,E.length,` 个片段`]})]}),(0,$.jsx)(n$,{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)(h$,{color:`blue`,style:{marginTop:6},children:`手动`}),t.sourceMode===`ai_suggestion`&&(0,$.jsx)(h$,{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:()=>{t.segmentVideoUrl&&(d(X9(t.segmentVideoUrl)),p(!0))},children:t.segmentVideoUrl?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:X9(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)(cK,{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:200,fixed:`right`,align:`center`,render:(e,n)=>(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[n.moduleProjectId?(0,$.jsx)(X,{type:`text`,onClick:()=>t(`/removelens/${n.moduleProjectId}/removefenbu`),style:{color:`#10b981`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`详情任务`}):(0,$.jsx)(X,{type:`text`,onClick:()=>ee(String(n.id),n.segmentName),disabled:!q(n),style:{color:q(n)?`#f59e0b`:`#94a3b8`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:q(n)?`视频生成`:`待切割完成`}),n.analysisStatus===`failed`&&(0,$.jsx)(X,{type:`text`,onClick:()=>V(String(n.id)),style:{color:`#f89411ff`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`重新分析`}),n.splitStatus===`failed`&&(0,$.jsx)(X,{type:`text`,onClick:()=>H(String(n.id)),style:{color:`#f89411ff`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`重新切割`}),(0,$.jsx)(LK,{title:`确定删除此片段?`,onConfirm:()=>U(String(n.id)),okText:`确定`,cancelText:`取消`,children:(0,$.jsx)(X,{type:`text`,style:{color:`#ef4444`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`删除`})})]})}],dataSource:E,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)(bse,{open:i,videoUrl:I,title:`手动视频切片`,loading:A,minDuration:J9,maxDuration:Y9,onCancel:()=>a(!1),onConfirm:ae}),(0,$.jsx)(_H,{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)(X,{type:`text`,icon:(0,$.jsx)(T5,{}),onClick:G,style:{padding:0,color:`#64748b`,fontSize:14}})]}),placement:`right`,closable:!1,onClose:G,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)(R0,{listType:`picture-card`,onChange:te,beforeUpload:ne,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)(mL,{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)(tG,{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)(xse,{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)(X,{type:`primary`,onClick:K,loading:O,disabled:O,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:O?`生成中...`:`手动生成`})})]})}),(0,$.jsx)(NK,{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":`true`,autoPlay:!0})})})]})}var{Title:wse,Text:Z9}=Q,{TextArea:Tse}=tG;function Ese(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function Dse(){let e=Ye(),{creatID:t}=$e(),[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)(``),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)(5),[N,P]=(0,S.useState)(`16:9`),[F,I]=(0,S.useState)(`480p`),[L,R]=(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]}),[z,B]=(0,S.useState)([]),[V,H]=(0,S.useState)(1),[U,W]=(0,S.useState)(20),[ee,G]=(0,S.useState)(0),[te,ne]=(0,S.useState)(``),[K,re]=(0,S.useState)({}),[ie,ae]=(0,S.useState)([]),[q,oe]=(0,S.useState)([]),[se,ce]=(0,S.useState)(!1),[le,ue]=(0,S.useState)(``),[de,fe]=(0,S.useState)(`image`),pe=S.useRef(null);(0,S.useEffect)(()=>{if(se&&de===`video`){let e=()=>{pe.current&&pe.current.play().catch(()=>{})};pe.current&&(pe.current.readyState>=2?e():pe.current.addEventListener(`loadedmetadata`,e));let t=setTimeout(e,300);return()=>{clearTimeout(t),pe.current&&(pe.current.removeEventListener(`loadedmetadata`,e),pe.current.pause())}}else pe.current&&pe.current.pause()},[se,de]);let me=[{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:ie[t]?.status||``,id:ie[t]?.id||t,output:ie[t]?.output||``,engineId:ie[t]?.input?.payload?.videoConfig?.engineId||``}));(0,S.useEffect)(()=>{let e=new Set;q.forEach(t=>{let n=me.find(e=>String(e.childId)===t);n&&(n.status===`completed`||n.status===`failed`)&&e.add(t)});for(let t=me.length-1;t>=0;t--)if(me[t].status===`completed`||me[t].status===`failed`){e.add(String(me[t].childId));break}e.size>0?oe(Array.from(e)):oe([])},[ie]);let he=(e,t,n)=>{m7(e,t,n).then(e=>{e.items&&B(e.items),e.total!==void 0&&G(e.total)}).catch(e=>{})},ge=(e,t)=>{H(e),W(t),he(e,t,te)},_e=()=>{he(1,20,te)};(0,S.useEffect)(()=>{he(V,U,te)},[]),(0,S.useEffect)(()=>{n7().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];R({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]})}e.engine?.image&&e.engine.image.length>0&&E(e.engine.image[0].id)}).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`)&&(O(!1),A(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,S.useEffect)(()=>{t&&_7(t).then(e=>{re(e),e.steps&&ae(e.steps)}).catch(e=>{})},[t]),(0,S.useEffect)(()=>{let e=me[4];e&&e.status!==`completed`&&e.status!==`failed`?m||h(setInterval(be,3e4)):e&&m&&(clearInterval(m),h(null))},[me]);let ve=(e,t,n,i)=>{l(t||`image`),_(n?String(n):``),t===`video`?(p(i||null),d(e&&typeof e==`object`?Ese(e):{}),a(``)):(p(null),a(e||``),d({})),r(!0)},ye=async()=>{if(c===`image`){if(!K?.id||!g){Z.warning(`缺少任务或步骤 ID,无法保存图片提示词`);return}if(!i||!i.trim()){Z.warning(`图片提示词不能为空`);return}y(!0);try{await Bie(K.id,g,{prompt:i.trim()}),Z.success(`图片提示词已保存`),xe(),r(!1),_(``)}catch(e){Z.error(e?.message||`保存图片提示词失败`)}finally{y(!1)}return}if(!K?.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=C9(u,f);if(e){Z.warning(e);return}y(!0);try{await Vie(K.id,g,{prompt_schema:u}),Z.success(`视频提示词已保存`),xe(),r(!1),_(``)}catch(e){Z.error(e?.message||`保存视频提示词失败`)}finally{y(!1)}},be=()=>{t&&_7(t).then(e=>{re(e),e.steps&&ae(e.steps)}).catch(e=>{})},xe=()=>{t&&_7(t).then(e=>{re(e),e.steps&&ae(e.steps)}).catch(e=>{})},Se=(e,t)=>{ue(e),fe(t),ce(!0)},Ce=()=>{ce(!1),ue(``),pe.current&&pe.current.pause()},we=e=>{if(e.preventDefault(),e.stopPropagation(),!le)return;let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${le}&download=1`,t.download=de===`image`?`image.png`:`video.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},Te=e=>{zie(K.id,e.toString()).then(e=>{Z.info(`正在生成图片提示词,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Ee=e=>{let t={engine_id:T,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};v7(K.id,e.toString(),t).then(e=>{Z.info(`正在生成图片,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},De=()=>{let e={engine_id:T,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};v7(K.id,me[1].id.toString(),e).then(e=>{Z.info(`正在生成图片,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Oe=e=>{let t={engine_id:C,duration:j,aspect_ratio:N,resolution:F,target_platform:`抖音`};Hie(K.id,e.toString(),t).then(e=>{Z.info(`正在生成视频提示词,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},ke=(e,t)=>{y7(K.id,e.toString(),{engine_id:``}).then(e=>{Z.info(`正在生成视频,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Ae=()=>{y7(K.id,me[3].id.toString(),{engine_id:``}).then(e=>{xe()}).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)(X,{icon:(0,$.jsx)(z2,{}),onClick:()=>window.history.back(),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},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)(X,{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)`,cursor:K?.material?.materialVideoUrl?`pointer`:`default`},onClick:()=>K?.material?.materialVideoUrl&&Se(K.material.materialVideoUrl,`video`),children:K?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${K.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)`,cursor:K?.material?.materialImageUrl?`pointer`:`default`},onClick:()=>K?.material?.materialImageUrl&&Se(K.material.materialImageUrl,`image`),children:K?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:K.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:`暂无图片`})})]})]}),K?.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)`,cursor:`pointer`},onClick:()=>Se(K.finalImageUrl,`image`),children:(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${K.finalImageUrl}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})}),K?.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)`,cursor:`pointer`},onClick:()=>Se(K.finalVideoUrl,`video`),children:(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${K.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)($g,{activeKey:q,onChange:oe,ghost:!0,bordered:!1,style:{background:`transparent`},expandIconPlacement:`end`,items:me.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)(A4,{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)(Z9,{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:K?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${K.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)(Z9,{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:K?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:K.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)(X,{onClick:()=>{Te(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)(Z9,{style:{color:`#475569`,fontSize:13,lineHeight:1.8,whiteSpace:`pre-wrap`},children:e?.output?.payload?.prompt||`暂无提示词`})}),(0,$.jsxs)(EH,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(Z$,{}),onClick:()=>ve(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)(X,{onClick:()=>{Ee(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:[K.finalImageUrl?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${K.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)(X,{type:`default`,icon:(0,$.jsx)(Z$,{}),onClick:()=>De(),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:()=>{O(!D),A(!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)(z8,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(Z9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:b.video?.find(e=>e.id===C)?.name||`选择引擎`})]}),D&&(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)(Z9,{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),R({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(N)||P(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(F)||I(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(j)||M(e.supportedDurations?.[0]||5),O(!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:()=>{A(!k),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)(o6,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(Z9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[N,` · `,j,`s · `,F]})]}),k&&(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)(Z9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:L.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>P(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:N===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:N===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 ${N===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:N===e?`#6366f1`:`#6b7280`,fontWeight:N===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Z9,{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:`${(j-Math.min(...L.durations))/(Math.max(...L.durations)-Math.min(...L.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...L.durations),max:Math.max(...L.durations),value:j,onChange:e=>M(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:j}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Z9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:L.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>I(e),style:{flex:1,height:42,borderRadius:6,border:F===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:F===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:F===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(X,{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:()=>{Oe(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)(Z9,{style:{color:`#64748b`,fontSize:13,lineHeight:1.8},children:`视频提词已生成,可点击按钮查看/修改`})}),(0,$.jsxs)(EH,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(Z$,{}),onClick:()=>ve(K?.videoGeneration?.promptSchema,`video`,e.id,K?.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`||!K?.videoGeneration?.promptSchema||!K?.videoGeneration?.schemaConfigSnapshot,children:`查看/修改视频提词`}),(0,$.jsx)(X,{onClick:()=>{ke(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`&&K?.finalVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${K.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)(EH,{style:{width:`100%`,gap:12},children:[(0,$.jsx)(X,{onClick:()=>Ae(),type:`default`,icon:(0,$.jsx)(Z$,{}),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)(X,{type:`primary`,icon:(0,$.jsx)(M0,{}),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${K?.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)(NK,{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)(X,{onClick:()=>r(!1),disabled:v,style:{borderRadius:8},children:`取消`},`cancel`),(0,$.jsx)(X,{type:`primary`,onClick:ye,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)(Tse,{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)(A9,{value:u,schemaConfigSnapshot:f,onChange:d})})}),(0,$.jsxs)(NK,{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)(tG,{placeholder:`搜索产品名称`,value:te,onChange:e=>ne(e.target.value),onPressEnter:_e,style:{width:200,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,height:40}}),(0,$.jsx)(X,{type:`primary`,onClick:_e,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)(n$,{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)(X,{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:z,rowKey:`id`,pagination:{current:V,pageSize:U,total:ee,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:ge,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`}})}}})})]}),(0,$.jsx)(NK,{open:se,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #8b5cf6 0%, #ddd6fe 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`预览`})]}),onCancel:Ce,width:800,footer:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,borderTop:`1px solid rgba(139, 92, 246, 0.08)`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(M0,{}),onClick:we,style:{borderRadius:10,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,border:`none`,boxShadow:`0 8px 18px rgba(47, 52, 64, 0.15)`},children:`下载`})}),centered:!0,style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(139, 92, 246, 0.08)`,padding:`16px 24px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:de===`image`?(0,$.jsx)(`img`,{src:le.startsWith(`http`)?le:`http://ceshi.apiforeign.minzhong.cn${le}`,alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:pe,src:le.startsWith(`http`)?le:`http://ceshi.apiforeign.minzhong.cn${le}`,controls:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})})]})}function Ose(e){if(!e)return`-`;let t=String(e).trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``);let[r=``,i=``]=t.split(`T`),[,a=``,o=``]=r.split(`-`),s=i.slice(0,5);return!a||!o?`-`:`${a}-${o} ${s}`}var kse=()=>{let e=Ye(),[t,n]=(0,S.useState)(`project`),[r,i]=(0,S.useState)(``),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)([]),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)(null),h=(0,S.useRef)(null),[g,_]=(0,S.useState)(`cases`),[v,y]=(0,S.useState)(null),[b,x]=(0,S.useState)(null),C=(0,S.useRef)(null);(0,S.useEffect)(()=>{oae().then(e=>{if(e?.items?.length>0){c(e.items);let t=e.items[0].id;u(t),w7(t).then(e=>{console.log(`caseButton:`,e),e?.categories?.[0]?.assets&&f(e.categories[0].assets)})}})},[]),(0,S.useEffect)(()=>()=>{C.current&&=(C.current.pause(),null),x(null),y(null),document.querySelectorAll(`.preview-video-item`).forEach(e=>{e.pause()})},[]),(0,S.useEffect)(()=>{p||(C.current&&=(C.current.pause(),null),x(null),y(null),document.querySelectorAll(`.preview-video-item`).forEach(e=>{e.pause()}))},[p]),(0,S.useEffect)(()=>{(async()=>{try{tae(10).then(e=>{for(let t in e)e[t].forEach(e=>{e.type=t,o(t=>[...t,e])});o(e=>e)})}catch{}})()},[]);let w=e=>{n(e)},T=[{icon:(0,$.jsx)(jH,{style:{fontSize:24}}),title:`项目创建`,description:`新建项目、设置图文视频参数、核对信息并生成素材`,action:`立即创作`,path:`/projects`},{icon:(0,$.jsx)(jH,{style:{fontSize:24}}),title:`爆款复刻`,description:`上传参考视频与产品图片,一键复刻爆款视频开头`,action:`立即创作`,path:`/initial`},{icon:(0,$.jsx)(N8,{style:{fontSize:24}}),title:`拆镜复刻`,description:`精细化镜头复刻工具,拆分参考视频单镜头独立复刻,提升素材原创度,规避素材同质化`,action:`开始拆镜`,path:`/removelens`},{icon:(0,$.jsx)(w8,{style:{fontSize:24}}),title:`AI成片`,description:`输入想法、剧本或上传参考,智能生成视频/图片`,action:`立即生成`,path:`/conversation`}],E=[{key:`all`,label:`全部`},{key:`project`,label:`项目媒体`},{key:`chatAi`,label:`AI成片`},{key:`hotOpeningReplicate`,label:`爆款复刻`},{key:`shotReplicate`,label:`拆镜复刻`}],D=t===`all`?a:a.filter(e=>e.type===t);return(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsx)(`h3`,{children:`首页工作台 `}),(0,$.jsxs)(`p`,{style:{cursor:`pointer`,fontSize:12,letterSpacing:.3,padding:`10px 16px`,backgroundColor:`#ffffffff`,borderRadius:30,boxShadow:`0px 4px 12px 0px rgba(0, 0, 0, 0.1)`},children:[`如需进行账户素材推送:`,(0,$.jsxs)(`span`,{style:{color:`#1a50bbff`},onClick:()=>{e(`/authorization`)},children:[`一键推送`,(0,$.jsx)(H2,{style:{marginLeft:8,transform:`rotate(0deg)`}})]})]})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`20px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`,marginBottom:20},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:16},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,borderRadius:2,background:`linear-gradient(180deg, #6366f1, #a855f7)`}}),(0,$.jsx)(`div`,{style:{fontSize:17,fontWeight:700,color:`#1f2937`,letterSpacing:.3},children:`AI 创作入口`}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`一键开启智能创作`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:12},children:T.map((t,n)=>{let r=[{color:`#3b82f6`,light:`rgba(59,130,246,0.12)`,tag:`项目`},{color:`#6366f1`,light:`rgba(99,102,241,0.12)`,tag:`复刻`},{color:`#f97316`,light:`rgba(249,115,22,0.12)`,tag:`拆镜`},{color:`#10b981`,light:`rgba(16,185,129,0.12)`,tag:`云创`}],i=r[n]||r[0];return(0,$.jsxs)(`div`,{onClick:()=>e(t.path),className:`project-card`,style:{flex:`1 1 280px`,minWidth:280,padding:`16px 20px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`,cursor:`pointer`,transition:`all 0.3s cubic-bezier(0.4,0,0.2,1)`,position:`relative`,display:`flex`,alignItems:`center`,gap:14,minHeight:96},onMouseEnter:e=>{e.currentTarget.style.borderColor=i.color,e.currentTarget.style.boxShadow=`0 8px 24px ${i.light}`,e.currentTarget.style.background=i.light,e.currentTarget.style.transform=`translateY(-2px)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#e2e8f0`,e.currentTarget.style.boxShadow=`none`,e.currentTarget.style.background=`#fff`,e.currentTarget.style.transform=`translateY(0)`},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,background:i.light,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,transition:`all 0.3s ease`,color:i.color},onMouseEnter:e=>{e.currentTarget.style.background=i.color,e.currentTarget.style.color=`#fff`},onMouseLeave:e=>{e.currentTarget.style.background=i.light,e.currentTarget.style.color=i.color},children:(0,$.jsx)(`span`,{style:{fontSize:20,display:`flex`,transition:`all 0.3s ease`},children:t.icon})}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0,display:`flex`,flexDirection:`column`,gap:4},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:600,color:`#1e293b`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,flex:1,minWidth:0},children:t.title}),(0,$.jsx)(`span`,{style:{fontSize:10,color:i.color,padding:`2px 7px`,borderRadius:4,background:i.light,fontWeight:600,flexShrink:0},children:i.tag})]}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#64748b`,lineHeight:1.5,display:`-webkit-box`,WebkitLineClamp:2,WebkitBoxOrient:`vertical`,overflow:`hidden`},children:t.description})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,color:i.color,fontSize:13,fontWeight:600,flexShrink:0},children:[t.action,(0,$.jsx)(H2,{style:{fontSize:12}})]})]},n)})})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:16},children:(0,$.jsx)(`div`,{style:{display:`flex`,gap:8},children:[{key:`cases`,label:`素材案例`},{key:`works`,label:`近期作品`}].map(e=>(0,$.jsx)(`button`,{onClick:()=>_(e.key),style:{padding:`6px 16px`,borderRadius:8,fontSize:13,fontWeight:500,border:`none`,cursor:`pointer`,transition:`all 0.25s ease`,background:g===e.key?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f1f5f9`,color:g===e.key?`#fff`:`#64748b`},children:e.label},e.key))})}),g===`works`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(IL,{activeKey:t,onChange:w,items:E.map(e=>({key:e.key,label:e.label})),className:`homepage-tabs`})}),(0,$.jsx)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(5, 1fr)`,gap:16},children:D.length===0?(0,$.jsxs)(`div`,{style:{gridColumn:`1 / -1`,padding:`60px 0`,textAlign:`center`,color:`#94a3b8`,fontSize:14},children:[(0,$.jsx)(e8,{style:{fontSize:36,color:`#cbd5e1`,marginBottom:8}}),(0,$.jsx)(`div`,{children:`暂无作品`})]}):D.map(t=>(0,$.jsxs)(`div`,{className:`project-card`,onClick:()=>{let n=t.moduleProjectId;t.type===`hotOpeningReplicate`&&n!=null?e(`/initial/${n}/initialinfo`):t.type===`shotReplicate`&&n!=null?e(`/removelens/${n}/removefenbu`):t.type===`chatAi`?e(`/conversation`):t.type===`project`&&e(`/project`)},style:{borderRadius:12,overflow:`hidden`,cursor:`pointer`,background:`#fff`,border:`1px solid #e2e8f0`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,aspectRatio:`16/9`},children:[(()=>{let e=t.type!==`hotOpeningReplicate`&&(String(t.resourceType??``).toLowerCase()===`image`||t.resourceType===1||String(t.resourceType??``)===`1`),n=``;return n=e?`/static`+t.resultUrl+`&w=300&p=50`||``:(t.type,t.coverUrl||t.resultUrl||t.resultUrl||``),(0,$.jsx)(`img`,{src:n?n.startsWith(`http`)?n:`http://ceshi.apiforeign.minzhong.cn`+n:``,alt:t.title||t.name||`作品`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})(),String(t.resourceType??``).toLowerCase()===`image`?null:(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.2)`},children:(0,$.jsx)(v5,{style:{fontSize:28,color:`#fff`}})})]}),(0,$.jsx)(`div`,{style:{padding:`10px 12px`,background:`#f8fafc`,paddingTop:0},children:(0,$.jsxs)(`div`,{style:{marginTop:6,display:`flex`,alignItems:`center`,gap:6,fontSize:12,color:`#64748b`},children:[(0,$.jsx)(`span`,{style:{display:`inline-block`,padding:`1px 6px`,border:`1px solid #3b82f6`,borderRadius:4,color:`#3b82f6`,fontSize:11,fontWeight:500,background:`#fff`,lineHeight:1.4,whiteSpace:`nowrap`},children:{project:`项目媒体`,chatAi:`AI成片`,hotOpeningReplicate:`爆款复刻`,shotReplicate:`拆镜复刻`}[t.type]||`其他`}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`·`}),(0,$.jsx)(`span`,{style:{whiteSpace:`nowrap`},children:Ose(t.generatedTime)})]})})]},t.id||`${t.type}-${Math.random()}`))})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(IL,{activeKey:l,onChange:e=>{u(e),w7(e).then(e=>{e?.categories?.[0]?.assets?f(e.categories[0].assets):f([])})},items:s.map(e=>({key:e.id,label:e.name})),className:`homepage-tabs`})}),(0,$.jsx)(`div`,{className:`stagger-children`,style:{display:`flex`,flexWrap:`wrap`,gap:16,justifyContent:`space-between`,overflowX:`auto`,paddingBottom:8},children:d.length===0?(0,$.jsxs)(`div`,{style:{flex:1,padding:`60px 0`,textAlign:`center`,color:`#94a3b8`,fontSize:14},children:[(0,$.jsx)(e8,{style:{fontSize:36,color:`#cbd5e1`,marginBottom:8}}),(0,$.jsx)(`div`,{children:`暂无素材`})]}):d.map((e,t)=>(0,$.jsx)(`div`,{className:`project-card`,onClick:()=>m(e),style:{borderRadius:12,overflow:`hidden`,cursor:`pointer`,flexShrink:0,width:`18%`},children:(0,$.jsx)(`div`,{style:{position:`relative`,aspectRatio:`9/16`},children:e.mediaType===`video`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},muted:!0,playsInline:!0}),(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:40,height:40,borderRadius:`50%`,background:`rgba(0,0,0,0.5)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(l8,{style:{fontSize:24,color:`#fff`}})})})]}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,alt:e.title||`素材 ${t+1}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})},e.id||t))})]})]}),(0,$.jsxs)(NK,{open:!!p,onCancel:()=>{h.current?.pause(),m(null)},footer:null,width:900,centered:!0,className:`preview-modal`,style:{borderRadius:16,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,height:580},children:[(0,$.jsx)(`div`,{style:{flex:1,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:24},children:(0,$.jsxs)(`div`,{style:{width:280,aspectRatio:`9/16`,borderRadius:12,overflow:`hidden`,background:`#0f172a`},children:[p?.mediaType===`video`?(0,$.jsx)(`video`,{ref:h,src:`http://ceshi.apiforeign.minzhong.cn${p.url}`,controls:!0,autoPlay:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`},"webkit-playsinline":`true`}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${p?.url}`,alt:p?.title,style:{width:`100%`,height:`100%`,objectFit:`cover`}}),p?.mediaType===`video`&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:32,right:32,fontSize:11,color:`#fff`,background:`rgba(0,0,0,0.6)`,padding:`3px 8px`,borderRadius:4},children:`AI生成`})]})}),(0,$.jsxs)(`div`,{style:{flex:1,padding:24,overflowY:`auto`},children:[(0,$.jsx)(`div`,{style:{fontSize:16,fontWeight:600,color:`#fff`,marginBottom:16},children:`创意详情`}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`div`,{style:{fontSize:12,color:`#000000ff`,marginBottom:8},children:`视频提示词`}),(0,$.jsx)(`div`,{style:{fontSize:13,color:`#000000ff`,lineHeight:1.6},children:p?.generationPrompt})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginBottom:8},children:`视频参考图`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:p?.mediaReferences&&p.mediaReferences.length>0?p.mediaReferences.map((e,t)=>{let n=e.url||e.resourceUrl||e.previewUrl||``,r=n.startsWith(`http`)?n:`http://ceshi.apiforeign.minzhong.cn${n}`;return e.type===`video`?(0,$.jsxs)(`div`,{style:{width:80,height:80,borderRadius:8,overflow:`hidden`,cursor:`pointer`,position:`relative`},children:[(0,$.jsx)(`video`,{src:r,muted:!0,onClick:e=>{e.stopPropagation();let n=e.currentTarget;v===t?(n.pause(),y(null)):(document.querySelectorAll(`.preview-video-item`).forEach(e=>{e.pause()}),n.play(),y(t))},className:`preview-video-item`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}),v!==t&&(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.3)`},children:(0,$.jsx)(v5,{style:{fontSize:18,color:`#fff`}})})]},t):e.type===`audio`?(0,$.jsx)(`div`,{onClick:e=>{if(e.stopPropagation(),b===r)C.current&&C.current.pause(),x(null);else{C.current&&C.current.pause();let e=new Audio(r);C.current=e,e.onended=()=>{x(null)},e.play(),x(r)}},style:{width:80,height:80,borderRadius:8,overflow:`hidden`,cursor:`pointer`,background:`linear-gradient(135deg, #8b5cf6, #a78bfa)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:b===r?(0,$.jsx)(G6,{style:{fontSize:24,color:`#fff`}}):(0,$.jsx)(J2,{style:{fontSize:24,color:`#fff`}})},t):(0,$.jsx)(`div`,{style:{width:80,height:80,borderRadius:8,overflow:`hidden`,cursor:`pointer`},children:(0,$.jsx)(`img`,{src:r,alt:`参考图 ${t+1}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})},t)}):(0,$.jsx)($.Fragment,{})})]})]})]}),(0,$.jsx)(`div`,{style:{padding:`16px 24px`,borderTop:`1px solid #334155`,display:`flex`,alignItems:`center`,justifyContent:`flex-end`},children:(0,$.jsx)(`div`,{style:{display:`flex`,gap:12},children:(0,$.jsx)(X,{onClick:()=>{e(`/conversation`,{state:{generationPrompt:p?.generationPrompt,mediaReferences:p?.mediaReferences}})},style:{padding:`8px 24px`,borderRadius:8,background:`#3b82f6`,border:`none`,color:`#fff`,fontSize:13,fontWeight:500},children:`去AI创作`})})})]})]})},{RangePicker:Ase}=PV,Q9=e=>e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),jse=()=>{let e=Ye(),[t]=On(),{message:n}=Jb.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(`advertiserId`)||``),[E,D]=(0,S.useState)(),[O,k]=(0,S.useState)((0,jE.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 Zie({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 S7()).data||[]).map(e=>({name:Q9(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=()=>{document.referrer.includes(window.location.origin)?e(-1):e(`/materials`)},I=()=>{b(1),M(1,x)},L=()=>{NK.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)(PV,{value:(0,jE.default)(O),onChange:e=>k(e?e.format(`YYYY-MM-DD`):(0,jE.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)(tG,{placeholder:`不指定则同步所有授权的广告主`,value:A,onChange:e=>j(e.target.value)})]})]}),onOk:async()=>{u(!0);try{await Qie({date:O,advertiser_id:A||void 0}),n.success(`拉取消耗数据成功`),M(y,x)}catch{n.error(`拉取消耗数据失败`)}finally{u(!1)}},okText:`开始拉取`,cancelText:`取消`})},R=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:[t.get(`advertiserId`)&&(0,$.jsx)(X,{type:`text`,icon:(0,$.jsx)(z2,{}),onClick:F}),(0,$.jsx)(h3,{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)(tG,{placeholder:`广告主ID`,value:w,onChange:e=>T(e.target.value),style:{width:180},allowClear:!0,onPressEnter:()=>{b(1),M(1,x)}}),(0,$.jsx)(Ase,{value:E?[(0,jE.default)(E[0]),(0,jE.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)(X,{type:`primary`,size:`medium`,onClick:I,children:`搜索`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(yre,{}),onClick:L,loading:l,style:{borderRadius:8},children:`拉取消耗`}),(0,$.jsx)(X,{icon:(0,$.jsx)(z8,{}),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)(n$,{dataSource:P,columns:R,loading:s,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(VG,{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)(NK,{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)(tG,{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)(oz,{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)(oz,{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)(X,{size:`small`,onClick:()=>g([]),disabled:h.length===0,children:`清空`}),(0,$.jsx)(X,{size:`small`,onClick:async()=>{try{let e=((await S7()).data||[]).map(e=>({name:Q9(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)})})})]})]})})]})},Mse=()=>{let e=Ye(),[t]=On(),{message:n}=Jb.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 Aie(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)(cK,{size:`large`,description:`加载中`,style:{color:`#fff`}}):(0,$.jsx)(DV,{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)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(Uq,{}),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)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(Uq,{}),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)(DV,{style:{color:`#6366f1`}}),(0,$.jsxs)(Q.Text,{style:{color:`#6366f1`,fontWeight:500,fontSize:16},children:[r,`s`]})]})]})]})})},Nse=()=>(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`28px 32px`,borderRadius:16,background:`linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fed7aa 100%)`,border:`1px solid rgba(245, 158, 11, 0.18)`,marginBottom:24,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #f59e0b 0%, #d97706 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 6px 20px rgba(245, 158, 11, 0.3)`},children:(0,$.jsx)(r4,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`shiny-text-container`,style:{marginBottom:4},children:(0,$.jsx)(`span`,{className:`shiny-text`,style:{fontSize:26,fontWeight:700,backgroundImage:`linear-gradient(90deg, #f59e0b 0%, #d97706 30%, #ea580c 50%, #d97706 70%, #f59e0b 100%)`},children:`行业爆款大盘`})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#b45309`},children:[(0,$.jsx)(x8,{style:{fontSize:12}}),(0,$.jsx)(`span`,{children:`实时追踪全网热门素材趋势`})]})]})]}),(0,$.jsx)(Q.Text,{style:{color:`#78716c`,fontSize:14,lineHeight:1.7},children:`实时追踪各行业爆款素材,把握创作风向,打造热门内容`})]}),(0,$.jsx)(`div`,{style:{position:`relative`},children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,marginRight:10}}),(0,$.jsx)(u5,{style:{marginRight:8,color:`#6366f1`,fontSize:16}}),(0,$.jsx)(`span`,{style:{fontSize:17,fontWeight:600,color:`#1f2937`},children:`爆款素材榜单`}),(0,$.jsx)(`span`,{style:{marginLeft:10,fontSize:12,fontWeight:400,color:`#94a3b8`}})]})}),(0,$.jsxs)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(2, 1fr)`,gap:16,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,zIndex:1,inset:0,background:`rgb(255,255,255)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:2,color:`#fff`,borderRadius:6},children:(0,$.jsxs)(X,{type:`primary`,size:`middle`,onClick:()=>{Z.info(`请联系客服开通会员`)},style:{borderRadius:10,fontWeight:500,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 14px rgba(99, 102, 241, 0.28)`},children:[(0,$.jsx)(h6,{style:{marginRight:6}}),`立即解锁全部`,(0,$.jsx)(H2,{style:{marginLeft:4,fontSize:12}})]})}),[{rank:1,title:`夏日美妆教程:3 步打造奶油肌`,author:`美妆博主·小雅`,views:`128.4w`,likes:`12.6w`,comments:`8,234`,tag:`NO.1`,tagColor:`#f59e0b`},{rank:2,title:`平价穿搭 | 学生党一周不重样`,author:`穿搭达人·Miki`,views:`96.2w`,likes:`9.8w`,comments:`6,128`,tag:`NO.2`,tagColor:`#a78bfa`},{rank:3,title:`探店 vlog | 网红咖啡馆测评`,author:`美食探店·阿伦`,views:`78.5w`,likes:`7.4w`,comments:`4,892`,tag:`NO.3`,tagColor:`#6366f1`},{rank:4,title:`iPhone 16 Pro 一周深度体验`,author:`数码评测·老王`,views:`65.7w`,likes:`6.1w`,comments:`3,847`,tag:`NO.4`,tagColor:`#94a3b8`}].map(e=>(0,$.jsxs)(`div`,{className:`project-card animate-fadeInUp`,style:{display:`flex`,gap:14,padding:14,borderRadius:14,background:`#fff`,border:`1px solid #e2e8f0`,cursor:`pointer`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,width:140,height:80,flexShrink:0,borderRadius:10,overflow:`hidden`,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(l8,{style:{fontSize:28,color:`rgba(255,255,255,0.6)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:6,left:6,padding:`2px 8px`,borderRadius:6,background:e.tagColor,color:`#fff`,fontSize:11,fontWeight:600},children:e.tag})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:4,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.title}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginBottom:8},children:e.author}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,fontSize:12,color:`#64748b`},children:[(0,$.jsxs)(`span`,{children:[(0,$.jsx)(NW,{style:{marginRight:3}}),e.views]}),(0,$.jsxs)(`span`,{children:[(0,$.jsx)(l6,{style:{marginRight:3}}),e.likes]}),(0,$.jsxs)(`span`,{children:[(0,$.jsx)(Z4,{style:{marginRight:3}}),e.comments]})]})]})]},e.rank))]})]})})]}),Pse=()=>(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`28px 32px`,borderRadius:16,background:`linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #fce7f3 100%)`,border:`1px solid rgba(139, 92, 246, 0.12)`,marginBottom:24,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 6px 20px rgba(139, 92, 246, 0.3)`},children:(0,$.jsx)(N3,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`shiny-text-container`,style:{marginBottom:4},children:(0,$.jsx)(`span`,{className:`shiny-text`,style:{fontSize:26,fontWeight:700},children:`创意素材案例`})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#7c3aed`},children:[(0,$.jsx)(o3,{style:{fontSize:12}}),(0,$.jsx)(`span`,{children:`探索 AI 创作无限可能`})]})]})]}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:14,lineHeight:1.7},children:`精选 AI 生成的优秀素材案例,展示 AI 创作的无限潜力与创意灵感`})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,marginRight:10}}),(0,$.jsx)(t5,{style:{marginRight:8,color:`#f59e0b`,fontSize:16}}),(0,$.jsx)(`span`,{style:{fontSize:17,fontWeight:600,color:`#1f2937`},children:`精选案例展示`})]})}),(0,$.jsxs)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(3, 1fr)`,gap:16,marginBottom:16,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,zIndex:1,background:`rgb(255,255,255)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,borderRadius:14,gap:4,color:`#fff`},children:(0,$.jsxs)(X,{type:`primary`,size:`middle`,onClick:()=>{Z.info(`请联系客服开通会员`)},style:{borderRadius:10,fontWeight:500,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 14px rgba(99, 102, 241, 0.28)`},children:[(0,$.jsx)(h6,{style:{marginRight:6}}),`解锁全部案例`,(0,$.jsx)(H2,{style:{marginLeft:4,fontSize:12}})]})}),[{title:`美妆直播切片`,tag:`热门`,tagColor:`#ef4444`},{title:`3C 数码测评`,tag:`推荐`,tagColor:`#6366f1`},{title:`美食探店 vlog`,tag:`推荐`,tagColor:`#6366f1`},{title:`服饰穿搭合集`,tag:`热门`,tagColor:`#ef4444`},{title:`家居场景展示`,tag:`推荐`,tagColor:`#6366f1`},{title:`母婴亲子内容`,tag:`热门`,tagColor:`#ef4444`}].map((e,t)=>(0,$.jsxs)(`div`,{className:`project-card animate-fadeInUp`,style:{position:`relative`,borderRadius:14,overflow:`hidden`,cursor:`pointer`,border:`1px solid #e2e8f0`,background:`#fff`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,aspectRatio:`16/9`,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(l8,{style:{fontSize:36,color:`rgba(255,255,255,0.6)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:10,left:10,padding:`2px 8px`,borderRadius:6,background:e.tagColor,color:`#fff`,fontSize:11,fontWeight:500},children:e.tag})]}),(0,$.jsxs)(`div`,{style:{padding:`10px 14px`,background:`#f8fafc`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,color:`#334155`,fontWeight:500,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.title}),(0,$.jsx)(NW,{style:{fontSize:13,color:`#94a3b8`}})]})]},t))]})]})]}),{RangePicker:Fse}=PV;function $9(e){if(!e)return`-`;try{return new Date(e).toLocaleString(`zh-CN`,{hour12:!1})}catch{return`-`}}var Ise={recharge:{color:`green`,label:`充值`},consume:{color:`red`,label:`消费`},refund:{color:`orange`,label:`退款`},team_internal:{color:`blue`,label:`团队内部`}},Lse=()=>{let[e,t]=(0,S.useState)(null),[n,r]=(0,S.useState)(!1),i=(0,S.useCallback)(async()=>{r(!0);try{t(await j7())}catch(e){Z.error(e?.message||`获取团队信息失败`)}finally{r(!1)}},[]);(0,S.useEffect)(()=>{i()},[i]);let[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)(0),[l,u]=(0,S.useState)(!1),[d,f]=(0,S.useState)(1),p=(0,S.useCallback)(async()=>{if(e){u(!0);try{let e=await Cae(d);o(e.items||[]),c(e.total||0)}catch(e){Z.error(e?.message||`加载成员失败`)}finally{u(!1)}}},[e,d]);(0,S.useEffect)(()=>{p()},[p]);let[m,h]=(0,S.useState)({open:!1,member:null}),[g]=bU.useForm(),[_,v]=(0,S.useState)(!1),y=async()=>{if(m.member)try{let e=await g.validateFields(),t=Number(e.amount);if(!t||t<=0||t>9999999){Z.error(`请输入有效的正数积分数量`);return}v(!0),await wae(m.member.id,t,e.direction||`increase`,e.description),Z.success(e.direction===`decrease`?`积分扣减成功`:`积分增加成功`),h({open:!1,member:null}),g.resetFields(),p(),he()}catch(e){if(e?.errorFields)return;Z.error(e?.message||`操作失败`)}finally{v(!1)}},[b,x]=(0,S.useState)([]),[C,w]=(0,S.useState)(!1),[T,E]=(0,S.useState)(!1),[D]=bU.useForm(),[O,k]=(0,S.useState)(!1),A=(0,S.useCallback)(async()=>{w(!0);try{x(await Tae()||[])}catch(e){Z.error(e?.message||`加载邀请码失败`)}finally{w(!1)}},[]);(0,S.useEffect)(()=>{A()},[A]);let j=async()=>{try{let e=await D.validateFields();k(!0),await Eae(e.maxUses||null,null),Z.success(`邀请码已生成`),E(!1),D.resetFields(),A()}catch(e){if(e?.errorFields)return;Z.error(e?.message||`创建失败`)}finally{k(!1)}},M=async e=>{try{await Dae(e),Z.success(`已撤销`),A()}catch(e){Z.error(e?.message||`撤销失败`)}},N=e=>{navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(e).then(()=>{Z.success(`邀请链接已复制`)}).catch(()=>{P(e)}):P(e)},P=e=>{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-9999px`,t.style.top=`-9999px`,document.body.appendChild(t),t.focus(),t.select();try{document.execCommand(`copy`),Z.success(`邀请链接已复制`)}catch{Z.warning(`复制失败,请手动复制`)}document.body.removeChild(t)},[F,I]=(0,S.useState)([]),[L,R]=(0,S.useState)(!1),[z,B]=(0,S.useState)(`pending`),[V,H]=(0,S.useState)(`members`),U=(0,S.useRef)(!1),W=(0,S.useRef)(0),ee=(0,S.useCallback)(async(e,t=!1)=>{R(!0);try{let n=await Oae(e),r=n?.length||0;I(n||[]),e===`pending`&&r>0&&(t&&!U.current?(U.current=!0,NK.confirm({title:(0,$.jsxs)(EH,{children:[(0,$.jsx)(o4,{style:{color:`#f59e0b`}}),`待处理的加入申请`]}),content:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`p`,{children:[`您有 `,(0,$.jsx)(`strong`,{style:{color:`#ef4444`},children:r}),` 条待处理的团队加入申请。`]}),(0,$.jsx)(`p`,{style:{color:`#64748b`,fontSize:13,marginBottom:0},children:`请及时处理新成员的加入申请。`})]}),okText:`立即处理`,cancelText:`稍后处理`,onOk:()=>{H(`requests`)}})):!t&&r>W.current&&Z.info({content:`有 ${r-W.current} 条新的加入申请待处理`,duration:5})),e===`pending`&&(W.current=r)}catch(e){Z.error(e?.message||`加载申请失败`)}finally{R(!1)}},[]);(0,S.useEffect)(()=>{ee(`pending`,!0)},[ee]),(0,S.useEffect)(()=>{if(!e)return;let t=setInterval(()=>{ee(`pending`,!1)},6e4);return()=>clearInterval(t)},[e,ee]);let G=async(e,t,n)=>{try{await kae(e,t,n),Z.success(t===`approve`?`已通过`:`已拒绝`),ee(z),p()}catch(e){Z.error(e?.message||`操作失败`)}},[te,ne]=(0,S.useState)([]),[K,re]=(0,S.useState)(0),[ie,ae]=(0,S.useState)(null),[q,oe]=(0,S.useState)(!1),[se,ce]=(0,S.useState)(1),[le,ue]=(0,S.useState)(``),[de,fe]=(0,S.useState)(``),[pe,me]=(0,S.useState)(()=>{let e=(0,jE.default)().format(`YYYY-MM-DD`);return[e,e]}),he=(0,S.useCallback)(async()=>{oe(!0);try{let e=await Nae({page:se,pageSize:10,phone:de||void 0,recordType:le||void 0,startDate:pe?.[0]||void 0,endDate:pe?.[1]||void 0});ne(e.items||[]),re(e.total||0),ae(e.summary||null)}catch(e){Z.error(e?.message||`加载积分记录失败`)}finally{oe(!1)}},[se,le,de,pe]);(0,S.useEffect)(()=>{he()},[he]);let ge=()=>{ue(``),fe(``);let e=(0,jE.default)().format(`YYYY-MM-DD`);me([e,e]),ce(1)},_e=()=>{let e=Pae({phone:de||void 0,recordType:le||void 0,startDate:pe?.[0]||void 0,endDate:pe?.[1]||void 0}),t=localStorage.getItem(`auth_token`),n=t?{Authorization:`Bearer ${t}`}:{};fetch(e,{headers:n}).then(e=>e.blob()).then(e=>{let t=document.createElement(`a`);t.href=URL.createObjectURL(e),t.download=`团队积分_${(0,jE.default)().format(`YYYYMMDD_HHmmss`)}.csv`,t.click(),URL.revokeObjectURL(t.href)}).catch(()=>Z.error(`导出失败`))},ve=[{title:`用户名`,dataIndex:`username`,width:140,render:e=>(0,$.jsx)(Q.Text,{strong:!0,children:e})},{title:`手机号`,dataIndex:`phone`,width:130,render:e=>e||`-`},{title:`积分`,dataIndex:`credits`,width:100,render:e=>(0,$.jsx)(Q.Text,{style:{color:`#6366f1`},children:(e??0).toFixed(2)})},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,$.jsx)(h$,{color:e?`green`:`red`,children:e?`启用`:`禁用`})},{title:`加入时间`,dataIndex:`joinedAt`,width:170,render:e=>$9(e)},{title:`操作`,key:`action`,width:100,render:(e,t)=>{let n=M7.getState().user?.id;return t.id===n?(0,$.jsx)(Cw,{title:`不能给自己调整积分`,children:(0,$.jsx)(X,{size:`small`,type:`link`,style:{padding:0,color:`#999`,cursor:`not-allowed`},disabled:!0,children:`调整积分`})}):(0,$.jsx)(X,{size:`small`,type:`link`,style:{padding:0},onClick:()=>{h({open:!0,member:t}),g.resetFields()},children:`调整积分`})}}],ye=e=>`${window.location.origin}/join-team?code=${e}`,be=[{title:`邀请码`,dataIndex:`code`,width:200,render:e=>(0,$.jsx)(Q.Text,{copyable:!0,style:{fontFamily:`monospace`},children:e})},{title:`邀请链接`,dataIndex:`code`,render:e=>{let t=ye(e);return(0,$.jsxs)(EH,{style:{width:`100%`},children:[(0,$.jsx)(Q.Text,{style:{flex:1,fontSize:12,wordBreak:`break-all`,fontFamily:`monospace`,color:`#64748b`},children:t}),(0,$.jsx)(Cw,{title:`复制链接`,children:(0,$.jsx)(X,{size:`small`,type:`text`,icon:(0,$.jsx)(b1,{}),onClick:()=>N(t)})})]})}},{title:`状态`,dataIndex:`status`,width:80,render:e=>(0,$.jsx)(h$,{color:e===`active`?`green`:`default`,children:e===`active`?`有效`:`已撤销`})},{title:`使用次数`,key:`uses`,width:100,render:(e,t)=>`${t.useCount}${t.maxUses?`/${t.maxUses}`:``}`},{title:`过期时间`,dataIndex:`expiresAt`,width:170,render:e=>e?$9(e):`永不过期`},{title:`操作`,key:`action`,width:80,render:(e,t)=>t.status===`active`?(0,$.jsx)(X,{size:`small`,type:`link`,danger:!0,onClick:()=>M(t.id),children:`撤销`}):null}],xe=e=>{let t={pending:{color:`orange`,text:`待处理`},approved:{color:`green`,text:`已通过`},rejected:{color:`red`,text:`已拒绝`}}[e]||{color:`default`,text:e};return(0,$.jsx)(h$,{color:t.color,children:t.text})},Se=[{title:`申请人`,dataIndex:`username`,width:140,render:e=>(0,$.jsx)(Q.Text,{strong:!0,children:e})},{title:`手机号`,dataIndex:`phone`,width:130,render:e=>e||`-`},{title:`状态`,dataIndex:`status`,width:100,render:e=>xe(e)},{title:`申请时间`,dataIndex:`createdAt`,width:170,render:e=>$9(e)},{title:`处理时间`,dataIndex:`handledAt`,width:170,render:e=>e?$9(e):`-`},{title:`备注`,dataIndex:`note`,width:180,ellipsis:!0,render:e=>e||`-`},{title:`操作`,key:`action`,width:160,render:(e,t)=>t.status===`pending`?(0,$.jsxs)(EH,{size:4,children:[(0,$.jsx)(X,{size:`small`,type:`link`,icon:(0,$.jsx)(SC,{}),style:{color:`#16a34a`,padding:0},onClick:()=>G(t.id,`approve`),children:`通过`}),(0,$.jsx)(X,{size:`small`,type:`link`,icon:(0,$.jsx)(ju,{}),danger:!0,style:{padding:0},onClick:()=>{NK.confirm({title:`拒绝申请`,content:(0,$.jsx)(bU,{layout:`vertical`,style:{marginTop:12},children:(0,$.jsx)(bU.Item,{name:`note`,label:`拒绝原因(可选)`,children:(0,$.jsx)(tG.TextArea,{rows:2,placeholder:`选填`,id:`reject-note-input`})})}),onOk:()=>{let e=document.getElementById(`reject-note-input`)?.value||void 0;G(t.id,`reject`,e)}})},children:`拒绝`})]}):(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:`已处理`})}],Ce=[{title:`用户名`,dataIndex:`username`,width:120,render:e=>(0,$.jsx)(Q.Text,{strong:!0,children:e||`-`})},{title:`手机号`,dataIndex:`phone`,width:120,render:e=>e||`-`},{title:`类型`,dataIndex:`type`,width:100,render:(e,t)=>{let n=Ise[t.type]||{color:`default`,label:t.type||`-`};return(0,$.jsx)(h$,{color:n.color,children:n.label})}},{title:`变动积分`,dataIndex:`amount`,width:110,align:`right`,render:(e,t)=>(0,$.jsxs)(Q.Text,{strong:!0,style:{color:t.amount>=0?`#10b981`:`#ef4444`,fontSize:14},children:[t.amount>=0?`+`:``,(t.amount??0).toFixed(2)]})},{title:`余额`,dataIndex:`balanceAfter`,width:100,align:`right`,render:e=>(e??0).toFixed(2)},{title:`说明`,dataIndex:`description`,ellipsis:!0,minWidth:160,render:e=>e||`-`},{title:`时间`,dataIndex:`createdAt`,width:170,render:e=>$9(e)}],we={borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},Te={padding:`16px`,textAlign:`right`},Ee=[{key:`members`,label:(0,$.jsxs)(EH,{children:[(0,$.jsx)(g5,{}),`成员列表`,s>0&&(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[`(`,s,`)`]})]}),children:(0,$.jsxs)(`div`,{style:we,children:[(0,$.jsx)(n$,{columns:ve,dataSource:a,rowKey:`id`,loading:l,pagination:!1,bordered:!1,scroll:{x:800},locale:{emptyText:(0,$.jsx)(rC,{description:`暂无成员`})}}),s>0&&(0,$.jsx)(`div`,{style:Te,children:(0,$.jsx)(VG,{current:d,pageSize:20,total:s,onChange:e=>f(e),size:`small`})})]})},{key:`credits`,label:(0,$.jsxs)(EH,{children:[(0,$.jsx)(b5,{}),`团队积分变动`]}),children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:12,display:`flex`,gap:8,flexWrap:`wrap`,alignItems:`center`},children:[(0,$.jsx)(NC,{value:le||void 0,onChange:e=>{ue(e||``),ce(1)},allowClear:!0,placeholder:`交易类型`,style:{width:130},options:[{value:`recharge`,label:`充值`},{value:`consume`,label:`消费`},{value:`team_internal`,label:`团队内部`},{value:`refund`,label:`退款`}]}),(0,$.jsx)(tG,{placeholder:`搜索手机号`,value:de,onChange:e=>{fe(e.target.value),ce(1)},style:{width:160},allowClear:!0}),(0,$.jsx)(Fse,{value:pe?[(0,jE.default)(pe[0]),(0,jE.default)(pe[1])]:void 0,onChange:e=>{e&&e[0]&&e[1]?me([e[0].format(`YYYY-MM-DD`),e[1].format(`YYYY-MM-DD`)]):me(null),ce(1)}}),(0,$.jsx)(X,{onClick:ge,children:`重置`}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(M0,{}),onClick:_e,children:`导出 Excel`})]}),(0,$.jsx)(`div`,{style:{marginBottom:12,padding:`8px 16px`,background:`#f8f9fc`,borderRadius:8,display:`flex`,gap:24,flexWrap:`wrap`,fontSize:13},children:(0,$.jsxs)(`span`,{children:[`总消耗积分:`,(0,$.jsx)(`strong`,{style:{color:`#ef4444`,fontSize:15},children:ie?.totalConsume??0})]})}),(0,$.jsxs)(`div`,{style:we,children:[(0,$.jsx)(n$,{rowKey:`id`,loading:q,dataSource:te,pagination:!1,bordered:!1,scroll:{x:950},columns:Ce,locale:{emptyText:(0,$.jsx)(rC,{description:`暂无积分记录`})}}),K>0&&(0,$.jsx)(`div`,{style:Te,children:(0,$.jsx)(VG,{current:se,pageSize:10,total:K,onChange:e=>ce(e),size:`small`,showTotal:e=>`共 ${e} 条`})})]})]})},{key:`invitations`,label:(0,$.jsxs)(EH,{children:[(0,$.jsx)(b1,{}),`邀请管理`]}),children:(0,$.jsxs)(`div`,{style:we,children:[(0,$.jsx)(`div`,{style:{padding:16,paddingBottom:0},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(mL,{}),onClick:()=>E(!0),children:`生成邀请码`})}),(0,$.jsx)(n$,{columns:be,dataSource:b,rowKey:`id`,loading:C,pagination:!1,bordered:!1,scroll:{x:900},locale:{emptyText:(0,$.jsx)(rC,{description:`暂无邀请码`})}})]})},{key:`requests`,label:(0,$.jsxs)(EH,{children:[(0,$.jsx)(G3,{}),`加入申请`,F.length>0&&z===`pending`&&(0,$.jsx)(h$,{color:`red`,children:F.length})]}),children:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{marginBottom:16,display:`flex`,alignItems:`center`},children:(0,$.jsx)(Dz,{value:z,onChange:e=>{B(e),ee(e)},options:[{label:`待处理`,value:`pending`},{label:`已通过`,value:`approved`},{label:`已拒绝`,value:`rejected`},{label:`全部`,value:``}],style:{borderRadius:12,border:`1px solid #e2e8f0`,padding:3,background:`#f8fafc`,boxShadow:`0 2px 8px rgba(0,0,0,0.06)`,"--ant-segmented-item-selected-bg":`#6366f1`,"--ant-segmented-item-selected-color":`#ffffff`},size:`middle`})}),(0,$.jsx)(`div`,{style:we,children:(0,$.jsx)(n$,{columns:Se,dataSource:F,rowKey:`id`,loading:L,pagination:!1,bordered:!1,scroll:{x:1e3},locale:{emptyText:(0,$.jsx)(rC,{description:z===`pending`?`暂无待审批申请`:`暂无记录`})}})})]})}];return(0,$.jsxs)(`div`,{style:{padding:24},children:[(0,$.jsx)(`div`,{style:{marginBottom:24},children:n?(0,$.jsx)(Q.Text,{type:`secondary`,children:`加载中...`}):e?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,flexWrap:`wrap`,gap:12},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:e.name}),(0,$.jsxs)(Q.Text,{type:`secondary`,children:[`代码: `,e.code||`-`,` 成员: `,e.memberCount,` 人`]})]}),(0,$.jsx)(X,{icon:(0,$.jsx)(Uq,{}),onClick:()=>{i(),p(),A(),ee(z),he()},children:`刷新`})]}):(0,$.jsx)(Q.Text,{type:`secondary`,children:`无法获取团队信息`})}),(0,$.jsx)(IL,{items:Ee,activeKey:V,onChange:H,size:`large`}),(0,$.jsx)(NK,{title:(0,$.jsxs)(EH,{children:[(0,$.jsx)(g5,{}),`调整成员积分 - `,m.member?.username]}),open:m.open,confirmLoading:_,onOk:y,onCancel:()=>h({open:!1,member:null}),okText:`确认`,width:480,children:(0,$.jsxs)(bU,{form:g,layout:`vertical`,style:{marginTop:16},initialValues:{direction:`increase`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16,padding:`10px 16px`,background:`#f0f4ff`,borderRadius:8,display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(Q.Text,{type:`secondary`,children:`我的当前积分`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:20,color:`#6366f1`},children:M7.getState().user?.credits?.toFixed(2)??`0.00`})]}),(0,$.jsx)(bU.Item,{name:`direction`,label:`操作类型`,rules:[{required:!0,message:`请选择操作类型`}],children:(0,$.jsxs)(HI.Group,{buttonStyle:`solid`,size:`large`,style:{width:`100%`},children:[(0,$.jsx)(HI.Button,{value:`increase`,style:{width:`50%`,textAlign:`center`},children:`增加成员积分`}),(0,$.jsx)(HI.Button,{value:`decrease`,style:{width:`50%`,textAlign:`center`},children:`扣减成员积分`})]})}),(0,$.jsx)(bU.Item,{name:`amount`,label:`积分数量`,required:!0,rules:[{required:!0,message:`请输入积分数量`},{type:`number`,min:.01,message:`必须大于 0`},{type:`number`,max:9999999,message:`单次不能超过 9999999`}],validateTrigger:[`onChange`,`onBlur`],children:(0,$.jsx)(mB,{style:{width:`100%`},step:1,min:.01,max:9999999,precision:2,placeholder:`请输入正数积分数量`,size:`large`,formatter:e=>{if(!e)return``;let t=`${e}`.replace(/[^0-9.]/g,``);return t=t.replace(/^0+(?=\d)/,``),t},parser:e=>{if(!e||e===`.`)return``;let t=parseFloat(e);return isNaN(t)||t<=0?``:Math.min(t,9999999)},onKeyDown:e=>{(e.key===`-`||e.key===`e`||e.key===`E`)&&e.preventDefault()},onChange:e=>{e??g.validateFields([`amount`])}})}),(0,$.jsx)(bU.Item,{name:`description`,label:`备注`,children:(0,$.jsx)(tG.TextArea,{rows:2,maxLength:256,placeholder:`选填,例如:活动奖励`})})]})}),(0,$.jsx)(NK,{title:(0,$.jsxs)(EH,{children:[(0,$.jsx)(b1,{}),`生成邀请码`]}),open:T,confirmLoading:O,onOk:j,onCancel:()=>{E(!1),D.resetFields()},okText:`生成`,width:480,children:(0,$.jsxs)(bU,{form:D,layout:`vertical`,style:{marginTop:16},children:[(0,$.jsx)(bU.Item,{name:`maxUses`,label:`最大使用次数`,children:(0,$.jsx)(mB,{style:{width:`100%`},min:1,placeholder:`留空表示不限`,size:`large`})}),(0,$.jsxs)(`div`,{style:{padding:`12px 16px`,background:`#eef2ff`,borderRadius:8,fontSize:13,color:`#4f46e5`,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(DV,{}),(0,$.jsxs)(`span`,{children:[`邀请码自生成起 `,(0,$.jsx)(`strong`,{children:`24 小时`}),` 内有效,过期自动失效。`]})]})]})})]})},Rse=()=>{let[e]=On(),t=Ye(),n=e.get(`code`)||``,{user:r,loading:i,checkAuth:a}=M7(),[o,s]=(0,S.useState)(!0),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(`VideoGen.AI`),[v,y]=(0,S.useState)(``);return(0,S.useEffect)(()=>{a(),J5().then(e=>{_(e.siteName),y(e.siteLogo)}).catch(()=>{})},[a]),(0,S.useEffect)(()=>{if(!n){s(!1);return}i||(s(!0),(r?Aae(n):jae(n)).then(e=>{l(e),e?.valid&&r&&!e.alreadyInTeam&&!e.hasPendingRequest&&h(!0)}).catch(()=>l(null)).finally(()=>s(!1)))},[n,r,i]),i||o?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:`60vh`},children:(0,$.jsx)(cK,{size:`large`})}):f?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(pJ,{status:`success`,icon:(0,$.jsx)(A4,{style:{color:`#6366f1`}}),title:`申请已提交`,subTitle:`您的加入申请已提交,请等待团队管理人审批。审批通过后将自动加入团队。`,extra:(0,$.jsx)(EH,{children:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})})}):!n||!c?.valid?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(pJ,{status:`error`,title:`邀请链接无效`,subTitle:`该邀请链接可能已过期或不存在,请联系团队管理人重新获取。`,extra:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})}):c.alreadyInTeam?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(pJ,{status:`info`,title:`您已在此团队中`,subTitle:`您已经是「${c.teamName}」的成员了,无需再次加入。`,extra:(0,$.jsx)(EH,{children:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})})}):c.hasPendingRequest?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(pJ,{status:`info`,title:`申请待审批`,subTitle:`您已提交加入「${c.teamName}」的申请,请等待团队管理人审批。`,extra:(0,$.jsx)(EH,{children:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:`40px 20px`},children:(0,$.jsxs)(`div`,{style:{width:`100%`,maxWidth:480},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:12,marginBottom:32},children:[v?(0,$.jsx)(`img`,{src:v,alt:`logo`,style:{width:40,height:40,borderRadius:10}}):(0,$.jsx)(`div`,{style:{width:40,height:40,borderRadius:10,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(s5,{style:{fontSize:20,color:`#fff`}})}),(0,$.jsx)(`span`,{style:{fontSize:22,fontWeight:700,color:`#1e293b`,letterSpacing:.5},children:g})]}),(0,$.jsxs)(RL,{variant:`outlined`,style:{borderRadius:16,width:`100%`,textAlign:`center`},children:[(0,$.jsx)(a5,{style:{fontSize:48,color:`#6366f1`,marginBottom:16}}),(0,$.jsx)(Q.Title,{level:3,children:`加入团队`}),(0,$.jsx)(Q.Text,{style:{fontSize:16,color:`#475569`,display:`block`,marginBottom:8},children:`您被邀请加入团队`}),(0,$.jsxs)(Q.Title,{level:4,style:{color:`#6366f1`,margin:`16px 0 24px`},children:[`「`,c.teamName,`」`]}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{display:`block`,marginBottom:24},children:`加入后团队管理人可以为您分配积分、查看您的积分使用情况。`}),r?(0,$.jsx)(X,{type:`primary`,size:`large`,block:!0,loading:u,onClick:()=>h(!0),children:`申请加入`}):(0,$.jsxs)(EH,{direction:`vertical`,style:{width:`100%`},size:12,children:[(0,$.jsx)(X,{type:`primary`,size:`large`,block:!0,icon:(0,$.jsx)(v6,{}),onClick:()=>{t(`/login?redirect=${encodeURIComponent(window.location.pathname+window.location.search)}`)},children:`登录后申请加入`}),(0,$.jsx)(X,{size:`large`,block:!0,icon:(0,$.jsx)(jre,{}),onClick:()=>{t(`/login?tab=register&redirect=${encodeURIComponent(window.location.pathname+window.location.search)}`)},children:`注册新账号`}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:12},children:`登录或注册后将自动提交加入申请`})]})]})]})}),(0,$.jsxs)(NK,{title:(0,$.jsxs)(EH,{children:[(0,$.jsx)(a5,{style:{color:`#6366f1`}}),`确认加入团队`]}),open:m,onOk:async()=>{if(n)try{d(!0),await Mae(n),p(!0),h(!1),Z.success(`申请已提交`)}catch(e){Z.error(e?.message||`申请失败`)}finally{d(!1)}},onCancel:()=>h(!1),okText:`确认加入`,cancelText:`取消`,confirmLoading:u,width:420,children:[(0,$.jsxs)(`p`,{style:{marginBottom:0},children:[`您确定要加入团队 `,(0,$.jsxs)(`strong`,{style:{color:`#6366f1`},children:[`「`,c.teamName,`」`]}),` 吗?`]}),(0,$.jsx)(`p`,{style:{marginTop:8,color:`#64748b`,fontSize:13},children:`提交后需等待团队管理人审批,审批通过后将自动加入团队。`})]})]})},zse=new Set([`group_active`,`callback_success`]),Bse=()=>{let e=(0,S.useMemo)(()=>new URLSearchParams(window.location.search),[]),t=e.get(`status`)||``,n=e.get(`resultCode`)||``,r=zse.has(t)||n===`10000`;return(0,$.jsx)(`div`,{style:{minHeight:`100vh`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8fafc`,padding:20},children:(0,$.jsxs)(RL,{style:{width:`100%`,maxWidth:520,borderRadius:18},children:[(0,$.jsx)(pJ,{status:r?`success`:`error`,title:r?`真人认证已完成`:`真人认证未完成`,subTitle:r?`请回到电脑端查看,项目组已创建成功。`:`请回到电脑端重新发起创建项目组。`,extra:[(0,$.jsx)(X,{type:`primary`,onClick:()=>window.close(),children:`关闭页面`},`close`)]}),(0,$.jsxs)(Q.Paragraph,{type:`secondary`,style:{textAlign:`center`,marginBottom:0},children:[`当前状态:`,t||`-`,`,结果码:`,n||`-`]})]})})};jE.default.locale(`zh-cn`);var Vse=({children:e})=>{let{user:t,loading:n,checkAuth:r}=M7();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)(cK,{size:`large`})}):t?(0,$.jsx)($.Fragment,{children:e}):(window.location.href=`/login`,null)};(0,_.createRoot)(document.getElementById(`root`)).render((0,$.jsx)(()=>{let{checkAuth:e}=M7();return(0,S.useEffect)(()=>{e()},[]),(0,$.jsx)(Fm,{locale:Z0.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)(Jb,{children:(0,$.jsx)(_n,{children:(0,$.jsxs)(Dt,{children:[(0,$.jsx)(Tt,{path:`/login`,element:(0,$.jsx)(zae,{})}),(0,$.jsx)(Tt,{path:`/join-team`,element:(0,$.jsx)(Rse,{})}),(0,$.jsx)(Tt,{path:`/private-portrait-authorized`,element:(0,$.jsx)(Bse,{})}),(0,$.jsxs)(Tt,{path:`/`,element:(0,$.jsx)(Vse,{children:(0,$.jsx)(Lae,{})}),children:[(0,$.jsx)(Tt,{index:!0,element:(0,$.jsx)(Ct,{to:`/projects`,replace:!0})}),(0,$.jsx)(Tt,{path:`projects`,element:(0,$.jsx)(Vae,{})}),(0,$.jsx)(Tt,{path:`projects/:projectId/generate`,element:(0,$.jsx)(Xae,{})}),(0,$.jsx)(Tt,{path:`records`,element:(0,$.jsx)(Zae,{})}),(0,$.jsx)(Tt,{path:`credits`,element:(0,$.jsx)(Qae,{})}),(0,$.jsx)(Tt,{path:`credit-records`,element:(0,$.jsx)(X7,{})}),(0,$.jsx)(Tt,{path:`order-records`,element:(0,$.jsx)(X7,{})}),(0,$.jsx)(Tt,{path:`user-center`,element:(0,$.jsx)(X7,{})}),(0,$.jsx)(Tt,{path:`messages`,element:(0,$.jsx)(toe,{})}),(0,$.jsx)(Tt,{path:`home`,element:(0,$.jsx)(kse,{})}),(0,$.jsx)(Tt,{path:`conversation`,element:(0,$.jsx)(Aoe,{})}),(0,$.jsx)(Tt,{path:`initial`,element:(0,$.jsx)(Foe,{})}),(0,$.jsx)(Tt,{path:`initial/:creatID/initialinfo`,element:(0,$.jsx)(Voe,{})}),(0,$.jsx)(Tt,{path:`removelens`,element:(0,$.jsx)(Woe,{})}),(0,$.jsx)(Tt,{path:`removelens/:creatID/removeinfo`,element:(0,$.jsx)(Cse,{})}),(0,$.jsx)(Tt,{path:`removelens/:creatID/removefenbu`,element:(0,$.jsx)(Dse,{})}),(0,$.jsx)(Tt,{path:`generated`,element:(0,$.jsx)($oe,{})}),(0,$.jsx)(Tt,{path:`pretest`,element:(0,$.jsx)(tse,{})}),(0,$.jsx)(Tt,{path:`authorization`,element:(0,$.jsx)(rse,{})}),(0,$.jsx)(Tt,{path:`authoriza-waiting`,element:(0,$.jsx)(Mse,{})}),(0,$.jsx)(Tt,{path:`materials`,element:(0,$.jsx)(dse,{})}),(0,$.jsx)(Tt,{path:`materials/private-portrait-virtual`,element:(0,$.jsx)(Ct,{to:`/generated?filterType=private_portrait&portraitTab=aigc_virtual`,replace:!0})}),(0,$.jsx)(Tt,{path:`consume`,element:(0,$.jsx)(jse,{})}),(0,$.jsx)(Tt,{path:`popular`,element:(0,$.jsx)(Nse,{})}),(0,$.jsx)(Tt,{path:`authacc`,element:(0,$.jsx)(ase,{})}),(0,$.jsx)(Tt,{path:`creativeplaza`,element:(0,$.jsx)(Pse,{})}),(0,$.jsx)(Tt,{path:`team-management`,element:(0,$.jsx)(Lse,{})})]}),(0,$.jsx)(Tt,{path:`*`,element:(0,$.jsx)(Ct,{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)(cK,{size:`small`}),(0,$.jsx)(pse,{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)(cK,{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)(iV,{range:!0,min:0,max:O||a,step:1,value:_,onChange:P,onChangeComplete:F,tooltip:{formatter:e=>`${H9(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:xse}=tG,Sse=`http://ceshi.apiforeign.minzhong.cn`,J9=2,Y9=15;function X9(e){return e?/^https?:\/\//i.test(e)?e:`${Sse}${e}`:``}function Cse(){let{creatID:e}=$e(),t=Ye(),[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)(``),[w,T]=(0,S.useState)(null),[E,D]=(0,S.useState)([]),[O,k]=(0,S.useState)(!1),[A,j]=(0,S.useState)(!1),[M,N]=(0,S.useState)(!1),P=(0,S.useRef)(null),F=(0,S.useRef)(null),I=(0,S.useMemo)(()=>X9(w?.videoUrl),[w?.videoUrl]),L=(0,S.useMemo)(()=>E.length===0?`AI自动拆分`:E.some(e=>e.sourceMode===`ai_suggestion`)?`AI重拆`:`AI自动拆分`,[E]),R=(0,S.useCallback)(async()=>{if(e)try{T(await h7(e))}catch{Z.error(`获取任务详情失败`)}},[e]),z=(0,S.useCallback)(async()=>{if(e)try{let t=(await g7(e)).items||[];D(t),t.some(e=>e.moduleProjectCurrentStepCode!==`video_generate`&&e.moduleProjectStatus!==`completed`&&e.moduleProjectStatus!==`failed`)?P.current||=window.setInterval(async()=>{try{let t=(await g7(e)).items||[];D(e=>e.map(e=>{let n=t.find(t=>t.id===e.id);return n&&(e.split_status||e.splitStatus,n.split_status||n.splitStatus,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`)&&(P.current&&=(clearInterval(P.current),null))}catch{}},3e4):P.current&&=(clearInterval(P.current),null)}catch{Z.error(`获取拆镜列表失败`)}},[e]),B=(0,S.useCallback)(async()=>{if(e)try{await Uie(e),Z.success(`重新分析已提交`),R(),F.current||=window.setInterval(async()=>{try{let t=await h7(e);T(t),(t.analysisStatus===`completed`||t.analysisStatus===`failed`)&&(F.current&&=(clearInterval(F.current),null))}catch{}},3e3)}catch(e){Z.error(e?.message||`重新分析失败`)}},[e,R]),V=(0,S.useCallback)(async e=>{try{await Gie(e),Z.success(`重新分析已提交`),z()}catch(e){Z.error(e?.message||`重新分析失败`)}},[z]),H=(0,S.useCallback)(async t=>{try{await Kie(t),Z.success(`重新切割已提交`),await z(),!P.current&&e&&(P.current=window.setInterval(async()=>{try{let t=(await g7(e)).items||[];D(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`)&&(P.current&&=(clearInterval(P.current),null))}catch{P.current&&=(clearInterval(P.current),null)}},3e3))}catch(e){Z.error(e?.message||`重新切割失败`)}},[e,z]),U=(0,S.useCallback)(async e=>{try{await Wie(e),Z.success(`删除成功`),z()}catch(e){Z.error(e?.message||`删除失败`)}},[z]),W=(0,S.useCallback)(async()=>{await Promise.all([R(),z()])},[R,z]);(0,S.useEffect)(()=>(W(),()=>{P.current&&=(clearInterval(P.current),null),F.current&&=(clearInterval(F.current),null)}),[W]),(0,S.useEffect)(()=>{if(w)return w.analysisStatus===`processing`?F.current=window.setInterval(async()=>{try{T(await h7(e))}catch{}},3e3):F.current&&=(clearInterval(F.current),null),()=>{F.current&&=(clearInterval(F.current),null)}},[w?.analysisStatus,e]);let ee=(e,t)=>{s(e),l(t),r(!0)},G=()=>{r(!1),s(null),g(``),l(``),v(``),b(``),C(``)},te=e=>{e.fileList.length===0&&(b(``),C(``))},ne=async e=>{try{let t=await uie(e);b(t.url),C(t.resource_id||``),Z.success(`图片上传成功`)}catch{Z.error(`图片上传失败,请重试`)}return!1},K=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:y,material_image_resource_id:x||void 0,idempotency_key:`replication_${Date.now()}`};k(!0);try{await Rie(o,n),Z.success(`视频生成任务创建成功`),G(),g7(e).then(e=>{let n=e.items.find(e=>e.id===o);Z.loading(`创建中...`,3),setTimeout(()=>{t(`/removelens/${n.moduleProjectId}/removefenbu`)},3e3)})}catch(e){Z.error(e?.message||`创建失败,请重试`)}finally{k(!1)}},re=async()=>{if(e){N(!0);try{let t=E.some(e=>e.sourceMode===`ai_suggestion`);await Iie(e,{selected_indices:[],replace_existing:t}),Z.success(t?`AI 重拆任务已提交`:`AI 拆镜任务已提交`),await W()}catch(e){Z.error(e?.message||`拆镜失败`)}finally{N(!1)}}},ie=()=>{if(!I){Z.warning(`原视频地址不存在`);return}a(!0)},ae=async t=>{if(e){if(t.durationSecondY9){Z.warning(`拆镜片段不能超过 ${Y9} 秒`);return}j(!0);try{await Lie(e,{start_second:t.startSecond,end_second:t.endSecond}),Z.success(`手动拆镜任务已提交`),a(!1),await W()}catch(e){Z.error(e?.message||`手动拆镜失败`)}finally{j(!1)}}},q=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,$.jsx)(`div`,{style:{padding:`16px 24px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,borderRadius:16,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`,position:`relative`,zIndex:10},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(z2,{}),onClick:()=>t(-1),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h1`,{style:{fontSize:18,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,margin:0},children:`AI视频拆镜工作台`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`一键拆解画面分镜,助力仿拍或创作`})]}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]})}),w?(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,overflow:`hidden`},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)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{position:`relative`,width:280,height:160,borderRadius:12,overflow:`hidden`,flexShrink:0,boxShadow:`0 4px 16px rgba(0,0,0,0.1)`,cursor:`pointer`},onClick:()=>{d(I),p(!0)},onMouseEnter:e=>{let t=e.currentTarget.querySelector(`div:last-child`);t&&(t.style.opacity=`1`)},onMouseLeave:e=>{let t=e.currentTarget.querySelector(`div:last-child`);t&&(t.style.opacity=`0`)},children:[(0,$.jsx)(`video`,{src:I,style:{width:`100%`,height:`100%`,objectFit:`cover`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,background:`rgba(0,0,0,0.2)`,display:`flex`,alignItems:`center`,justifyContent:`center`,opacity:0,transition:`opacity 0.2s`},children:(0,$.jsx)(`div`,{style:{width:40,height:40,borderRadius:`50%`,background:`rgba(255,255,255,0.9)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`#6366f1`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,$.jsx)(`polygon`,{points:`5 3 19 12 5 21 5 3`})})})})]}),w.analysisStatus===`failed`&&(0,$.jsx)(`div`,{style:{marginTop:12,textAlign:`center`},children:(0,$.jsx)(X,{onClick:B,style:{width:`100%`,padding:`6px 16px`,borderRadius:8,fontSize:12,border:`1px solid #ef4444`,color:`#ef4444`,background:`rgba(239, 68, 68, 0.05)`,cursor:w.analysisStatus===`processing`?`not-allowed`:`pointer`,transition:`all 0.2s`},onMouseEnter:e=>{w.analysisStatus!==`processing`&&(e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`)},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.05)`},children:w.analysisStatus===`processing`?`分析中...`:`重新分析`})})]}),(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:[`上传时间: `,w.createdAt?new Date(w.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:w.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:`受众群体:`}),w.analysisStatus===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(cK,{size:`small`,style:{color:`#f59e0b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):w.analysisStatus===`completed`?(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:(w.originalVideoAudience?.split(`、`)||[]).map((e,t)=>(0,$.jsx)(h$,{style:{fontSize:12,background:`rgba(99, 102, 241, 0.1)`,color:`#6366f1`,border:`none`,borderRadius:20},children:e},t))}):w.analysisStatus===`failed`?(0,$.jsx)(`span`,{style:{color:`#ef4444`,fontSize:14},children:`分析失败`}):null]}),(0,$.jsxs)(`div`,{style:{display:`flex`},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`视频内容:`}),w.analysisStatus===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(cK,{size:`small`,style:{color:`#f59e0b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):w.analysisStatus===`completed`?(0,$.jsx)(`span`,{style:{color:`#475569`,lineHeight:1.6,height:100,overflowY:`auto`},children:w.originalVideoContent}):w.analysisStatus===`failed`?(0,$.jsx)(`span`,{style:{color:`#ef4444`,fontSize:14},children:`分析失败`}):null]})]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:20,marginTop:20},children:[(0,$.jsx)(X,{type:`default`,onClick:ie,disabled:!I||A,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)(LK,{title:L===`AI重拆`?`确定要AI重拆吗?`:`确定要AI拆分吗?`,okText:`确定`,cancelText:`取消`,onConfirm:re,children:(0,$.jsxs)(X,{type:`primary`,loading:M,disabled:M,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:L}),(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%`}}),w?.aiSuggestions&&w.aiSuggestions.length>0&&(0,$.jsx)(Cw,{title:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontWeight:600,marginBottom:8,color:`#6366f1`},children:`AI拆分方案`}),(w?.ai_suggestions||w?.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:[`共 `,E.length,` 个片段`]})]}),(0,$.jsx)(n$,{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)(h$,{color:`blue`,style:{marginTop:6},children:`手动`}),t.sourceMode===`ai_suggestion`&&(0,$.jsx)(h$,{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:()=>{t.segmentVideoUrl&&(d(X9(t.segmentVideoUrl)),p(!0))},children:t.segmentVideoUrl?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:X9(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.split_status||t.splitStatus)===`processing`)return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(cK,{size:`small`}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`切割中`})]});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)(cK,{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:200,fixed:`right`,align:`center`,render:(e,n)=>(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[n.moduleProjectId?(0,$.jsx)(X,{type:`text`,onClick:()=>t(`/removelens/${n.moduleProjectId}/removefenbu`),style:{color:`#10b981`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`详情任务`}):(0,$.jsx)(X,{type:`text`,onClick:()=>ee(String(n.id),n.segmentName),disabled:!q(n),style:{color:q(n)?`#f59e0b`:`#94a3b8`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:q(n)?`视频生成`:`待切割完成`}),n.analysisStatus===`failed`&&(0,$.jsx)(X,{type:`text`,onClick:()=>V(String(n.id)),style:{color:`#f89411ff`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`重新分析`}),n.splitStatus===`failed`&&(0,$.jsx)(X,{type:`text`,onClick:()=>H(String(n.id)),style:{color:`#f89411ff`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`重新切割`}),(0,$.jsx)(LK,{title:`确定删除此片段?`,onConfirm:()=>U(String(n.id)),okText:`确定`,cancelText:`取消`,children:(0,$.jsx)(X,{type:`text`,style:{color:`#ef4444`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`删除`})})]})}],dataSource:E,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)(bse,{open:i,videoUrl:I,title:`手动视频切片`,loading:A,minDuration:J9,maxDuration:Y9,onCancel:()=>a(!1),onConfirm:ae}),(0,$.jsx)(_H,{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)(X,{type:`text`,icon:(0,$.jsx)(T5,{}),onClick:G,style:{padding:0,color:`#64748b`,fontSize:14}})]}),placement:`right`,closable:!1,onClose:G,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)(R0,{listType:`picture-card`,onChange:te,beforeUpload:ne,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)(mL,{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)(tG,{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)(xse,{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)(X,{type:`primary`,onClick:K,loading:O,disabled:O,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:O?`生成中...`:`手动生成`})})]})}),(0,$.jsx)(NK,{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":`true`,autoPlay:!0})})})]})}var{Title:wse,Text:Z9}=Q,{TextArea:Tse}=tG;function Ese(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function Dse(){let e=Ye(),{creatID:t}=$e(),[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)(``),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)(5),[N,P]=(0,S.useState)(`16:9`),[F,I]=(0,S.useState)(`480p`),[L,R]=(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]}),[z,B]=(0,S.useState)([]),[V,H]=(0,S.useState)(1),[U,W]=(0,S.useState)(20),[ee,G]=(0,S.useState)(0),[te,ne]=(0,S.useState)(``),[K,re]=(0,S.useState)({}),[ie,ae]=(0,S.useState)([]),[q,oe]=(0,S.useState)([]),[se,ce]=(0,S.useState)(!1),[le,ue]=(0,S.useState)(``),[de,fe]=(0,S.useState)(`image`),pe=S.useRef(null);(0,S.useEffect)(()=>{if(se&&de===`video`){let e=()=>{pe.current&&pe.current.play().catch(()=>{})};pe.current&&(pe.current.readyState>=2?e():pe.current.addEventListener(`loadedmetadata`,e));let t=setTimeout(e,300);return()=>{clearTimeout(t),pe.current&&(pe.current.removeEventListener(`loadedmetadata`,e),pe.current.pause())}}else pe.current&&pe.current.pause()},[se,de]);let me=[{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:ie[t]?.status||``,id:ie[t]?.id||t,output:ie[t]?.output||``,engineId:ie[t]?.input?.payload?.videoConfig?.engineId||``}));(0,S.useEffect)(()=>{let e=new Set;q.forEach(t=>{let n=me.find(e=>String(e.childId)===t);n&&(n.status===`completed`||n.status===`failed`)&&e.add(t)});for(let t=me.length-1;t>=0;t--)if(me[t].status===`completed`||me[t].status===`failed`){e.add(String(me[t].childId));break}e.size>0?oe(Array.from(e)):oe([])},[ie]);let he=(e,t,n)=>{m7(e,t,n).then(e=>{e.items&&B(e.items),e.total!==void 0&&G(e.total)}).catch(e=>{})},ge=(e,t)=>{H(e),W(t),he(e,t,te)},_e=()=>{he(1,20,te)};(0,S.useEffect)(()=>{he(V,U,te)},[]),(0,S.useEffect)(()=>{n7().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];R({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]})}e.engine?.image&&e.engine.image.length>0&&E(e.engine.image[0].id)}).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`)&&(O(!1),A(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,S.useEffect)(()=>{t&&_7(t).then(e=>{re(e),e.steps&&ae(e.steps)}).catch(e=>{})},[t]),(0,S.useEffect)(()=>{let e=me[4];e&&e.status!==`completed`&&e.status!==`failed`?m||h(setInterval(be,3e4)):e&&m&&(clearInterval(m),h(null))},[me]);let ve=(e,t,n,i)=>{l(t||`image`),_(n?String(n):``),t===`video`?(p(i||null),d(e&&typeof e==`object`?Ese(e):{}),a(``)):(p(null),a(e||``),d({})),r(!0)},ye=async()=>{if(c===`image`){if(!K?.id||!g){Z.warning(`缺少任务或步骤 ID,无法保存图片提示词`);return}if(!i||!i.trim()){Z.warning(`图片提示词不能为空`);return}y(!0);try{await Bie(K.id,g,{prompt:i.trim()}),Z.success(`图片提示词已保存`),xe(),r(!1),_(``)}catch(e){Z.error(e?.message||`保存图片提示词失败`)}finally{y(!1)}return}if(!K?.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=S9(u,f);if(e){Z.warning(e);return}y(!0);try{await Vie(K.id,g,{prompt_schema:u}),Z.success(`视频提示词已保存`),xe(),r(!1),_(``)}catch(e){Z.error(e?.message||`保存视频提示词失败`)}finally{y(!1)}},be=()=>{t&&_7(t).then(e=>{re(e),e.steps&&ae(e.steps)}).catch(e=>{})},xe=()=>{t&&_7(t).then(e=>{re(e),e.steps&&ae(e.steps)}).catch(e=>{})},Se=(e,t)=>{ue(e),fe(t),ce(!0)},Ce=()=>{ce(!1),ue(``),pe.current&&pe.current.pause()},we=e=>{if(e.preventDefault(),e.stopPropagation(),!le)return;let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${le}&download=1`,t.download=de===`image`?`image.png`:`video.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},Te=e=>{zie(K.id,e.toString()).then(e=>{Z.info(`正在生成图片提示词,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Ee=e=>{let t={engine_id:T,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};v7(K.id,e.toString(),t).then(e=>{Z.info(`正在生成图片,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},De=()=>{let e={engine_id:T,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};v7(K.id,me[1].id.toString(),e).then(e=>{Z.info(`正在生成图片,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Oe=e=>{let t={engine_id:C,duration:j,aspect_ratio:N,resolution:F,target_platform:`抖音`};Hie(K.id,e.toString(),t).then(e=>{Z.info(`正在生成视频提示词,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},ke=(e,t)=>{y7(K.id,e.toString(),{engine_id:``}).then(e=>{Z.info(`正在生成视频,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Ae=()=>{y7(K.id,me[3].id.toString(),{engine_id:``}).then(e=>{xe()}).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)(X,{icon:(0,$.jsx)(z2,{}),onClick:()=>window.history.back(),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},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)(X,{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)`,cursor:K?.material?.materialVideoUrl?`pointer`:`default`},onClick:()=>K?.material?.materialVideoUrl&&Se(K.material.materialVideoUrl,`video`),children:K?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${K.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)`,cursor:K?.material?.materialImageUrl?`pointer`:`default`},onClick:()=>K?.material?.materialImageUrl&&Se(K.material.materialImageUrl,`image`),children:K?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:K.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:`暂无图片`})})]})]}),K?.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)`,cursor:`pointer`},onClick:()=>Se(K.finalImageUrl,`image`),children:(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${K.finalImageUrl}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})}),K?.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)`,cursor:`pointer`},onClick:()=>Se(K.finalVideoUrl,`video`),children:(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${K.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)($g,{activeKey:q,onChange:oe,ghost:!0,bordered:!1,style:{background:`transparent`},expandIconPlacement:`end`,items:me.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)(A4,{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)(Z9,{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:K?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${K.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)(Z9,{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:K?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:K.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)(X,{onClick:()=>{Te(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)(Z9,{style:{color:`#475569`,fontSize:13,lineHeight:1.8,whiteSpace:`pre-wrap`},children:e?.output?.payload?.prompt||`暂无提示词`})}),(0,$.jsxs)(EH,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(Z$,{}),onClick:()=>ve(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)(X,{onClick:()=>{Ee(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:[K.finalImageUrl?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${K.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)(X,{type:`default`,icon:(0,$.jsx)(Z$,{}),onClick:()=>De(),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:()=>{O(!D),A(!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)(z8,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(Z9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:b.video?.find(e=>e.id===C)?.name||`选择引擎`})]}),D&&(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)(Z9,{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),R({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(N)||P(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(F)||I(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(j)||M(e.supportedDurations?.[0]||5),O(!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:()=>{A(!k),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)(o6,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(Z9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[N,` · `,j,`s · `,F]})]}),k&&(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)(Z9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:L.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>P(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:N===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:N===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 ${N===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:N===e?`#6366f1`:`#6b7280`,fontWeight:N===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Z9,{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:`${(j-Math.min(...L.durations))/(Math.max(...L.durations)-Math.min(...L.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...L.durations),max:Math.max(...L.durations),value:j,onChange:e=>M(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:j}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Z9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:L.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>I(e),style:{flex:1,height:42,borderRadius:6,border:F===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:F===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:F===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(X,{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:()=>{Oe(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)(Z9,{style:{color:`#64748b`,fontSize:13,lineHeight:1.8},children:`视频提词已生成,可点击按钮查看/修改`})}),(0,$.jsxs)(EH,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(Z$,{}),onClick:()=>ve(K?.videoGeneration?.promptSchema,`video`,e.id,K?.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`||!K?.videoGeneration?.promptSchema||!K?.videoGeneration?.schemaConfigSnapshot,children:`查看/修改视频提词`}),(0,$.jsx)(X,{onClick:()=>{ke(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`&&K?.finalVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${K.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)(EH,{style:{width:`100%`,gap:12},children:[(0,$.jsx)(X,{onClick:()=>Ae(),type:`default`,icon:(0,$.jsx)(Z$,{}),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)(X,{type:`primary`,icon:(0,$.jsx)(M0,{}),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${K?.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)(NK,{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)(X,{onClick:()=>r(!1),disabled:v,style:{borderRadius:8},children:`取消`},`cancel`),(0,$.jsx)(X,{type:`primary`,onClick:ye,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)(Tse,{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)(k9,{value:u,schemaConfigSnapshot:f,onChange:d})})}),(0,$.jsxs)(NK,{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)(tG,{placeholder:`搜索产品名称`,value:te,onChange:e=>ne(e.target.value),onPressEnter:_e,style:{width:200,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,height:40}}),(0,$.jsx)(X,{type:`primary`,onClick:_e,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)(n$,{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)(X,{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:z,rowKey:`id`,pagination:{current:V,pageSize:U,total:ee,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:ge,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`}})}}})})]}),(0,$.jsx)(NK,{open:se,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #8b5cf6 0%, #ddd6fe 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`预览`})]}),onCancel:Ce,width:800,footer:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,borderTop:`1px solid rgba(139, 92, 246, 0.08)`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(M0,{}),onClick:we,style:{borderRadius:10,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,border:`none`,boxShadow:`0 8px 18px rgba(47, 52, 64, 0.15)`},children:`下载`})}),centered:!0,style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(139, 92, 246, 0.08)`,padding:`16px 24px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:de===`image`?(0,$.jsx)(`img`,{src:le.startsWith(`http`)?le:`http://ceshi.apiforeign.minzhong.cn${le}`,alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:pe,src:le.startsWith(`http`)?le:`http://ceshi.apiforeign.minzhong.cn${le}`,controls:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})})]})}var Ose=({asset:e,index:t,onPreview:n})=>{let[r,i]=(0,S.useState)(!1);return(0,$.jsx)(`div`,{className:`project-card`,onClick:()=>n(e),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{borderRadius:12,overflow:`hidden`,cursor:`pointer`,flexShrink:0,width:`18%`,position:`relative`},children:(0,$.jsx)(`div`,{style:{position:`relative`,aspectRatio:`9/16`},children:e.mediaType===`video`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},muted:!0,playsInline:!0}),(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:40,height:40,borderRadius:`50%`,background:`rgba(0,0,0,0.5)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(l8,{style:{fontSize:24,color:`#fff`}})})})]}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,alt:e.title||`素材 ${t+1}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})})};function kse(e){if(!e)return`-`;let t=String(e).trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``);let[r=``,i=``]=t.split(`T`),[,a=``,o=``]=r.split(`-`),s=i.slice(0,5);return!a||!o?`-`:`${a}-${o} ${s}`}var Ase=()=>{let e=Ye(),[t,n]=(0,S.useState)(`project`),[r,i]=(0,S.useState)(``),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)([]),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)(null),h=(0,S.useRef)(null),[g,_]=(0,S.useState)(`cases`),[v,y]=(0,S.useState)(null),[b,x]=(0,S.useState)(null),C=(0,S.useRef)(null);(0,S.useEffect)(()=>{oae().then(e=>{if(e?.items?.length>0){c(e.items);let t=e.items[0].id;u(t),w7(t).then(e=>{console.log(`caseButton:`,e),e?.categories?.[0]?.assets&&f(e.categories[0].assets)})}})},[]),(0,S.useEffect)(()=>()=>{C.current&&=(C.current.pause(),null),x(null),y(null),document.querySelectorAll(`.preview-video-item`).forEach(e=>{e.pause()})},[]),(0,S.useEffect)(()=>{p||(C.current&&=(C.current.pause(),null),x(null),y(null),document.querySelectorAll(`.preview-video-item`).forEach(e=>{e.pause()}))},[p]),(0,S.useEffect)(()=>{(async()=>{try{tae(10).then(e=>{for(let t in e)e[t].forEach(e=>{e.type=t,o(t=>[...t,e])});o(e=>e)})}catch{}})()},[]);let w=e=>{n(e)},T=[{icon:(0,$.jsx)(jH,{style:{fontSize:24}}),title:`行业智造`,description:`新建项目、设置图文视频参数、核对信息并生成素材`,action:`立即创作`,path:`/projects`},{icon:(0,$.jsx)(w8,{style:{fontSize:24}}),title:`AI成片`,description:`输入想法、剧本或上传参考,智能生成视频/图片`,action:`立即生成`,path:`/conversation`},{icon:(0,$.jsx)(jH,{style:{fontSize:24}}),title:`爆款复刻`,description:`上传参考视频与产品图片,一键复刻爆款视频开头`,action:`立即创作`,path:`/initial`},{icon:(0,$.jsx)(N8,{style:{fontSize:24}}),title:`拆镜复刻`,description:`精细化镜头复刻工具,拆分参考视频单镜头独立复刻,提升素材原创度,规避素材同质化`,action:`开始拆镜`,path:`/removelens`}],E=[{key:`all`,label:`全部`},{key:`project`,label:`项目媒体`},{key:`chatAi`,label:`AI成片`},{key:`hotOpeningReplicate`,label:`爆款复刻`},{key:`shotReplicate`,label:`拆镜复刻`}],D=t===`all`?a:a.filter(e=>e.type===t);return(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsx)(`h3`,{children:`首页工作台 `}),(0,$.jsxs)(`p`,{style:{cursor:`pointer`,fontSize:12,letterSpacing:.3,padding:`10px 16px`,backgroundColor:`#ffffffff`,borderRadius:30,boxShadow:`0px 4px 12px 0px rgba(0, 0, 0, 0.1)`},children:[`如需进行账户素材推送:`,(0,$.jsxs)(`span`,{style:{color:`#1a50bbff`},onClick:()=>{e(`/authorization`)},children:[`一键推送`,(0,$.jsx)(H2,{style:{marginLeft:8,transform:`rotate(0deg)`}})]})]})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`20px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`,marginBottom:20},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:16},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,borderRadius:2,background:`linear-gradient(180deg, #6366f1, #a855f7)`}}),(0,$.jsx)(`div`,{style:{fontSize:17,fontWeight:700,color:`#1f2937`,letterSpacing:.3},children:`AI 创作入口`}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`一键开启智能创作`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:12},children:T.map((t,n)=>{let r=[{color:`#3b82f6`,light:`rgba(59,130,246,0.12)`,tag:`项目`},{color:`#6366f1`,light:`rgba(99,102,241,0.12)`,tag:`复刻`},{color:`#f97316`,light:`rgba(249,115,22,0.12)`,tag:`拆镜`},{color:`#10b981`,light:`rgba(16,185,129,0.12)`,tag:`云创`}],i=r[n]||r[0];return(0,$.jsxs)(`div`,{onClick:()=>e(t.path),className:`project-card`,style:{flex:`1 1 280px`,minWidth:280,padding:`16px 20px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`,cursor:`pointer`,transition:`all 0.3s cubic-bezier(0.4,0,0.2,1)`,position:`relative`,display:`flex`,alignItems:`center`,gap:14,minHeight:96},onMouseEnter:e=>{e.currentTarget.style.borderColor=i.color,e.currentTarget.style.boxShadow=`0 8px 24px ${i.light}`,e.currentTarget.style.background=i.light,e.currentTarget.style.transform=`translateY(-2px)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#e2e8f0`,e.currentTarget.style.boxShadow=`none`,e.currentTarget.style.background=`#fff`,e.currentTarget.style.transform=`translateY(0)`},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,background:i.light,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,transition:`all 0.3s ease`,color:i.color},onMouseEnter:e=>{e.currentTarget.style.background=i.color,e.currentTarget.style.color=`#fff`},onMouseLeave:e=>{e.currentTarget.style.background=i.light,e.currentTarget.style.color=i.color},children:(0,$.jsx)(`span`,{style:{fontSize:20,display:`flex`,transition:`all 0.3s ease`},children:t.icon})}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0,display:`flex`,flexDirection:`column`,gap:4},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:600,color:`#1e293b`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,flex:1,minWidth:0},children:t.title}),(0,$.jsx)(`span`,{style:{fontSize:10,color:i.color,padding:`2px 7px`,borderRadius:4,background:i.light,fontWeight:600,flexShrink:0},children:i.tag})]}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#64748b`,lineHeight:1.5,display:`-webkit-box`,WebkitLineClamp:2,WebkitBoxOrient:`vertical`,overflow:`hidden`},children:t.description})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,color:i.color,fontSize:13,fontWeight:600,flexShrink:0},children:[t.action,(0,$.jsx)(H2,{style:{fontSize:12}})]})]},n)})})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:16},children:(0,$.jsx)(`div`,{style:{display:`flex`,gap:8},children:[{key:`cases`,label:`素材案例`},{key:`works`,label:`近期作品`}].map(e=>(0,$.jsx)(`button`,{onClick:()=>_(e.key),style:{padding:`6px 16px`,borderRadius:8,fontSize:13,fontWeight:500,border:`none`,cursor:`pointer`,transition:`all 0.25s ease`,background:g===e.key?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f1f5f9`,color:g===e.key?`#fff`:`#64748b`},children:e.label},e.key))})}),g===`works`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(IL,{activeKey:t,onChange:w,items:E.map(e=>({key:e.key,label:e.label})),className:`homepage-tabs`})}),(0,$.jsx)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(5, 1fr)`,gap:16},children:D.length===0?(0,$.jsxs)(`div`,{style:{gridColumn:`1 / -1`,padding:`60px 0`,textAlign:`center`,color:`#94a3b8`,fontSize:14},children:[(0,$.jsx)(e8,{style:{fontSize:36,color:`#cbd5e1`,marginBottom:8}}),(0,$.jsx)(`div`,{children:`暂无作品`})]}):D.map(t=>(0,$.jsxs)(`div`,{className:`project-card`,onClick:()=>{let n=t.moduleProjectId;t.type===`hotOpeningReplicate`&&n!=null?e(`/initial/${n}/initialinfo`):t.type===`shotReplicate`&&n!=null?e(`/removelens/${n}/removefenbu`):t.type===`chatAi`?e(`/conversation`):t.type===`project`&&e(`/project`)},style:{borderRadius:12,overflow:`hidden`,cursor:`pointer`,background:`#fff`,border:`1px solid #e2e8f0`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,aspectRatio:`16/9`},children:[(()=>{let e=t.type!==`hotOpeningReplicate`&&(String(t.resourceType??``).toLowerCase()===`image`||t.resourceType===1||String(t.resourceType??``)===`1`),n=``;return n=e?`/static`+t.resultUrl+`&w=300&p=50`||``:(t.type,t.coverUrl||t.resultUrl||t.resultUrl||``),(0,$.jsx)(`img`,{src:n?n.startsWith(`http`)?n:`http://ceshi.apiforeign.minzhong.cn`+n:``,alt:t.title||t.name||`作品`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})(),String(t.resourceType??``).toLowerCase()===`image`?null:(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.2)`},children:(0,$.jsx)(v5,{style:{fontSize:28,color:`#fff`}})})]}),(0,$.jsx)(`div`,{style:{padding:`10px 12px`,background:`#f8fafc`,paddingTop:0},children:(0,$.jsxs)(`div`,{style:{marginTop:6,display:`flex`,alignItems:`center`,gap:6,fontSize:12,color:`#64748b`},children:[(0,$.jsx)(`span`,{style:{display:`inline-block`,padding:`1px 6px`,border:`1px solid #3b82f6`,borderRadius:4,color:`#3b82f6`,fontSize:11,fontWeight:500,background:`#fff`,lineHeight:1.4,whiteSpace:`nowrap`},children:{project:`项目媒体`,chatAi:`AI成片`,hotOpeningReplicate:`爆款复刻`,shotReplicate:`拆镜复刻`}[t.type]||`其他`}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`·`}),(0,$.jsx)(`span`,{style:{whiteSpace:`nowrap`},children:kse(t.generatedTime)})]})})]},t.id||`${t.type}-${Math.random()}`))})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(IL,{activeKey:l,onChange:e=>{u(e),w7(e).then(e=>{e?.categories?.[0]?.assets?f(e.categories[0].assets):f([])})},items:s.map(e=>({key:e.id,label:e.name})),className:`homepage-tabs`})}),(0,$.jsx)(`div`,{className:`stagger-children`,style:{display:`flex`,flexWrap:`wrap`,gap:16,justifyContent:`space-between`,overflowX:`auto`,paddingBottom:8},children:d.length===0?(0,$.jsxs)(`div`,{style:{flex:1,padding:`60px 0`,textAlign:`center`,color:`#94a3b8`,fontSize:14},children:[(0,$.jsx)(e8,{style:{fontSize:36,color:`#cbd5e1`,marginBottom:8}}),(0,$.jsx)(`div`,{children:`暂无素材`})]}):d.map((e,t)=>(0,$.jsx)(Ose,{asset:e,index:t,onPreview:m},e.id||t))})]})]}),(0,$.jsxs)(NK,{open:!!p,onCancel:()=>{h.current?.pause(),m(null)},footer:null,width:900,centered:!0,className:`preview-modal`,style:{borderRadius:16,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,height:580,paddingTop:30},children:[(0,$.jsx)(`div`,{style:{flex:1,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:24},children:(0,$.jsxs)(`div`,{style:{maxWidth:`100%`,maxHeight:500,borderRadius:12,overflow:`hidden`,background:`#0f172a`},children:[p?.mediaType===`video`?(0,$.jsx)(`video`,{ref:h,src:`http://ceshi.apiforeign.minzhong.cn${p.url}`,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:500,objectFit:`contain`},"webkit-playsinline":`true`}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${p?.url}`,alt:p?.title,style:{maxWidth:`100%`,maxHeight:500,objectFit:`contain`}}),p?.mediaType===`video`&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:32,right:32,fontSize:11,color:`#fff`,background:`rgba(0,0,0,0.6)`,padding:`3px 8px`,borderRadius:4},children:`AI生成`})]})}),(0,$.jsxs)(`div`,{style:{flex:1,padding:24,overflowY:`auto`},children:[(0,$.jsx)(`div`,{style:{fontSize:16,fontWeight:600,color:`#fff`,marginBottom:16},children:`创意详情`}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`div`,{style:{fontSize:12,color:`#000000ff`,marginBottom:8},children:`视频提示词`}),(0,$.jsx)(`div`,{style:{fontSize:13,color:`#000000ff`,lineHeight:1.6},children:p?.generationPrompt})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginBottom:8},children:`视频参考图`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:p?.mediaReferences&&p.mediaReferences.length>0?p.mediaReferences.map((e,t)=>{let n=e.url||e.resourceUrl||e.previewUrl||``,r=n.startsWith(`http`)?n:`http://ceshi.apiforeign.minzhong.cn${n}`;return e.type===`video`?(0,$.jsxs)(`div`,{style:{width:80,height:80,borderRadius:8,overflow:`hidden`,cursor:`pointer`,position:`relative`},children:[(0,$.jsx)(`video`,{src:r,muted:!0,onClick:e=>{e.stopPropagation();let n=e.currentTarget;v===t?(n.pause(),y(null)):(document.querySelectorAll(`.preview-video-item`).forEach(e=>{e.pause()}),n.play(),y(t))},className:`preview-video-item`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}),v!==t&&(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.3)`},children:(0,$.jsx)(v5,{style:{fontSize:18,color:`#fff`}})})]},t):e.type===`audio`?(0,$.jsx)(`div`,{onClick:e=>{if(e.stopPropagation(),b===r)C.current&&C.current.pause(),x(null);else{C.current&&C.current.pause();let e=new Audio(r);C.current=e,e.onended=()=>{x(null)},e.play(),x(r)}},style:{width:80,height:80,borderRadius:8,overflow:`hidden`,cursor:`pointer`,background:`linear-gradient(135deg, #8b5cf6, #a78bfa)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:b===r?(0,$.jsx)(G6,{style:{fontSize:24,color:`#fff`}}):(0,$.jsx)(J2,{style:{fontSize:24,color:`#fff`}})},t):(0,$.jsx)(`div`,{style:{width:80,height:80,borderRadius:8,overflow:`hidden`,cursor:`pointer`},children:(0,$.jsx)(`img`,{src:r,alt:`参考图 ${t+1}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})},t)}):(0,$.jsx)($.Fragment,{})})]})]})]}),(0,$.jsx)(`div`,{style:{padding:`16px 24px`,borderTop:`1px solid #334155`,display:`flex`,alignItems:`center`,justifyContent:`flex-end`},children:(0,$.jsx)(`div`,{style:{display:`flex`,gap:12},children:(0,$.jsx)(X,{onClick:()=>{e(`/conversation`,{state:{generationPrompt:p?.generationPrompt,mediaReferences:p?.mediaReferences}})},style:{padding:`8px 24px`,borderRadius:8,background:`#3b82f6`,border:`none`,color:`#fff`,fontSize:13,fontWeight:500},children:`去AI创作`})})})]})]})},{RangePicker:jse}=PV,Q9=e=>e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),Mse=()=>{let e=Ye(),[t]=On(),{message:n}=Jb.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(`advertiserId`)||``),[E,D]=(0,S.useState)(),[O,k]=(0,S.useState)((0,jE.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 Zie({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 S7()).data||[]).map(e=>({name:Q9(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=()=>{document.referrer.includes(window.location.origin)?e(-1):e(`/materials`)},I=()=>{b(1),M(1,x)},L=()=>{NK.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)(PV,{value:(0,jE.default)(O),onChange:e=>k(e?e.format(`YYYY-MM-DD`):(0,jE.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)(tG,{placeholder:`不指定则同步所有授权的广告主`,value:A,onChange:e=>j(e.target.value)})]})]}),onOk:async()=>{u(!0);try{await Qie({date:O,advertiser_id:A||void 0}),n.success(`拉取消耗数据成功`),M(y,x)}catch{n.error(`拉取消耗数据失败`)}finally{u(!1)}},okText:`开始拉取`,cancelText:`取消`})},R=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:[t.get(`advertiserId`)&&(0,$.jsx)(X,{type:`text`,icon:(0,$.jsx)(z2,{}),onClick:F}),(0,$.jsx)(h3,{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)(tG,{placeholder:`广告主ID`,value:w,onChange:e=>T(e.target.value),style:{width:180},allowClear:!0,onPressEnter:()=>{b(1),M(1,x)}}),(0,$.jsx)(jse,{value:E?[(0,jE.default)(E[0]),(0,jE.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)(X,{type:`primary`,size:`medium`,onClick:I,children:`搜索`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(yre,{}),onClick:L,loading:l,style:{borderRadius:8},children:`拉取消耗`}),(0,$.jsx)(X,{icon:(0,$.jsx)(z8,{}),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)(n$,{dataSource:P,columns:R,loading:s,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(VG,{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)(NK,{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)(tG,{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)(oz,{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)(oz,{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)(X,{size:`small`,onClick:()=>g([]),disabled:h.length===0,children:`清空`}),(0,$.jsx)(X,{size:`small`,onClick:async()=>{try{let e=((await S7()).data||[]).map(e=>({name:Q9(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)})})})]})]})})]})},Nse=()=>{let e=Ye(),[t]=On(),{message:n}=Jb.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 Aie(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)(cK,{size:`large`,description:`加载中`,style:{color:`#fff`}}):(0,$.jsx)(DV,{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)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(Uq,{}),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)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(Uq,{}),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)(DV,{style:{color:`#6366f1`}}),(0,$.jsxs)(Q.Text,{style:{color:`#6366f1`,fontWeight:500,fontSize:16},children:[r,`s`]})]})]})]})})},Pse=()=>(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`28px 32px`,borderRadius:16,background:`linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fed7aa 100%)`,border:`1px solid rgba(245, 158, 11, 0.18)`,marginBottom:24,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #f59e0b 0%, #d97706 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 6px 20px rgba(245, 158, 11, 0.3)`},children:(0,$.jsx)(r4,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`shiny-text-container`,style:{marginBottom:4},children:(0,$.jsx)(`span`,{className:`shiny-text`,style:{fontSize:26,fontWeight:700,backgroundImage:`linear-gradient(90deg, #f59e0b 0%, #d97706 30%, #ea580c 50%, #d97706 70%, #f59e0b 100%)`},children:`行业爆款大盘`})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#b45309`},children:[(0,$.jsx)(x8,{style:{fontSize:12}}),(0,$.jsx)(`span`,{children:`实时追踪全网热门素材趋势`})]})]})]}),(0,$.jsx)(Q.Text,{style:{color:`#78716c`,fontSize:14,lineHeight:1.7},children:`实时追踪各行业爆款素材,把握创作风向,打造热门内容`})]}),(0,$.jsx)(`div`,{style:{position:`relative`},children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,marginRight:10}}),(0,$.jsx)(u5,{style:{marginRight:8,color:`#6366f1`,fontSize:16}}),(0,$.jsx)(`span`,{style:{fontSize:17,fontWeight:600,color:`#1f2937`},children:`爆款素材榜单`}),(0,$.jsx)(`span`,{style:{marginLeft:10,fontSize:12,fontWeight:400,color:`#94a3b8`}})]})}),(0,$.jsxs)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(2, 1fr)`,gap:16,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,zIndex:1,inset:0,background:`rgb(255,255,255)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:2,color:`#fff`,borderRadius:6},children:(0,$.jsxs)(X,{type:`primary`,size:`middle`,onClick:()=>{Z.info(`请联系客服开通会员`)},style:{borderRadius:10,fontWeight:500,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 14px rgba(99, 102, 241, 0.28)`},children:[(0,$.jsx)(h6,{style:{marginRight:6}}),`立即解锁全部`,(0,$.jsx)(H2,{style:{marginLeft:4,fontSize:12}})]})}),[{rank:1,title:`夏日美妆教程:3 步打造奶油肌`,author:`美妆博主·小雅`,views:`128.4w`,likes:`12.6w`,comments:`8,234`,tag:`NO.1`,tagColor:`#f59e0b`},{rank:2,title:`平价穿搭 | 学生党一周不重样`,author:`穿搭达人·Miki`,views:`96.2w`,likes:`9.8w`,comments:`6,128`,tag:`NO.2`,tagColor:`#a78bfa`},{rank:3,title:`探店 vlog | 网红咖啡馆测评`,author:`美食探店·阿伦`,views:`78.5w`,likes:`7.4w`,comments:`4,892`,tag:`NO.3`,tagColor:`#6366f1`},{rank:4,title:`iPhone 16 Pro 一周深度体验`,author:`数码评测·老王`,views:`65.7w`,likes:`6.1w`,comments:`3,847`,tag:`NO.4`,tagColor:`#94a3b8`}].map(e=>(0,$.jsxs)(`div`,{className:`project-card animate-fadeInUp`,style:{display:`flex`,gap:14,padding:14,borderRadius:14,background:`#fff`,border:`1px solid #e2e8f0`,cursor:`pointer`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,width:140,height:80,flexShrink:0,borderRadius:10,overflow:`hidden`,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(l8,{style:{fontSize:28,color:`rgba(255,255,255,0.6)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:6,left:6,padding:`2px 8px`,borderRadius:6,background:e.tagColor,color:`#fff`,fontSize:11,fontWeight:600},children:e.tag})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:4,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.title}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginBottom:8},children:e.author}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,fontSize:12,color:`#64748b`},children:[(0,$.jsxs)(`span`,{children:[(0,$.jsx)(NW,{style:{marginRight:3}}),e.views]}),(0,$.jsxs)(`span`,{children:[(0,$.jsx)(l6,{style:{marginRight:3}}),e.likes]}),(0,$.jsxs)(`span`,{children:[(0,$.jsx)(Z4,{style:{marginRight:3}}),e.comments]})]})]})]},e.rank))]})]})})]}),Fse=()=>(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`28px 32px`,borderRadius:16,background:`linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #fce7f3 100%)`,border:`1px solid rgba(139, 92, 246, 0.12)`,marginBottom:24,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 6px 20px rgba(139, 92, 246, 0.3)`},children:(0,$.jsx)(N3,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`shiny-text-container`,style:{marginBottom:4},children:(0,$.jsx)(`span`,{className:`shiny-text`,style:{fontSize:26,fontWeight:700},children:`创意素材案例`})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#7c3aed`},children:[(0,$.jsx)(o3,{style:{fontSize:12}}),(0,$.jsx)(`span`,{children:`探索 AI 创作无限可能`})]})]})]}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:14,lineHeight:1.7},children:`精选 AI 生成的优秀素材案例,展示 AI 创作的无限潜力与创意灵感`})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,marginRight:10}}),(0,$.jsx)(t5,{style:{marginRight:8,color:`#f59e0b`,fontSize:16}}),(0,$.jsx)(`span`,{style:{fontSize:17,fontWeight:600,color:`#1f2937`},children:`精选案例展示`})]})}),(0,$.jsxs)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(3, 1fr)`,gap:16,marginBottom:16,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,zIndex:1,background:`rgb(255,255,255)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,borderRadius:14,gap:4,color:`#fff`},children:(0,$.jsxs)(X,{type:`primary`,size:`middle`,onClick:()=>{Z.info(`请联系客服开通会员`)},style:{borderRadius:10,fontWeight:500,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 14px rgba(99, 102, 241, 0.28)`},children:[(0,$.jsx)(h6,{style:{marginRight:6}}),`解锁全部案例`,(0,$.jsx)(H2,{style:{marginLeft:4,fontSize:12}})]})}),[{title:`美妆直播切片`,tag:`热门`,tagColor:`#ef4444`},{title:`3C 数码测评`,tag:`推荐`,tagColor:`#6366f1`},{title:`美食探店 vlog`,tag:`推荐`,tagColor:`#6366f1`},{title:`服饰穿搭合集`,tag:`热门`,tagColor:`#ef4444`},{title:`家居场景展示`,tag:`推荐`,tagColor:`#6366f1`},{title:`母婴亲子内容`,tag:`热门`,tagColor:`#ef4444`}].map((e,t)=>(0,$.jsxs)(`div`,{className:`project-card animate-fadeInUp`,style:{position:`relative`,borderRadius:14,overflow:`hidden`,cursor:`pointer`,border:`1px solid #e2e8f0`,background:`#fff`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,aspectRatio:`16/9`,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(l8,{style:{fontSize:36,color:`rgba(255,255,255,0.6)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:10,left:10,padding:`2px 8px`,borderRadius:6,background:e.tagColor,color:`#fff`,fontSize:11,fontWeight:500},children:e.tag})]}),(0,$.jsxs)(`div`,{style:{padding:`10px 14px`,background:`#f8fafc`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,color:`#334155`,fontWeight:500,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.title}),(0,$.jsx)(NW,{style:{fontSize:13,color:`#94a3b8`}})]})]},t))]})]})]}),{RangePicker:Ise}=PV;function $9(e){if(!e)return`-`;try{return new Date(e).toLocaleString(`zh-CN`,{hour12:!1})}catch{return`-`}}var Lse={recharge:{color:`green`,label:`充值`},consume:{color:`red`,label:`消费`},refund:{color:`orange`,label:`退款`},team_internal:{color:`blue`,label:`团队内部`}},Rse=()=>{let[e,t]=(0,S.useState)(null),[n,r]=(0,S.useState)(!1),i=(0,S.useCallback)(async()=>{r(!0);try{t(await Cae())}catch(e){Z.error(e?.message||`获取团队信息失败`)}finally{r(!1)}},[]);(0,S.useEffect)(()=>{i()},[i]);let[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)(0),[l,u]=(0,S.useState)(!1),[d,f]=(0,S.useState)(1),p=(0,S.useCallback)(async()=>{if(e){u(!0);try{let e=await wae(d);o(e.items||[]),c(e.total||0)}catch(e){Z.error(e?.message||`加载成员失败`)}finally{u(!1)}}},[e,d]);(0,S.useEffect)(()=>{p()},[p]);let[m,h]=(0,S.useState)({open:!1,member:null}),[g]=bU.useForm(),[_,v]=(0,S.useState)(!1),y=async()=>{if(m.member)try{let e=await g.validateFields(),t=Number(e.amount);if(!t||t<=0||t>9999999){Z.error(`请输入有效的正数积分数量`);return}v(!0),await Tae(m.member.id,t,e.direction||`increase`,e.description),Z.success(e.direction===`decrease`?`积分扣减成功`:`积分增加成功`),h({open:!1,member:null}),g.resetFields(),p(),he()}catch(e){if(e?.errorFields)return;Z.error(e?.message||`操作失败`)}finally{v(!1)}},[b,x]=(0,S.useState)([]),[C,w]=(0,S.useState)(!1),[T,E]=(0,S.useState)(!1),[D]=bU.useForm(),[O,k]=(0,S.useState)(!1),A=(0,S.useCallback)(async()=>{w(!0);try{x(await Eae()||[])}catch(e){Z.error(e?.message||`加载邀请码失败`)}finally{w(!1)}},[]);(0,S.useEffect)(()=>{A()},[A]);let j=async()=>{try{let e=await D.validateFields();k(!0),await Dae(e.maxUses||null,null),Z.success(`邀请码已生成`),E(!1),D.resetFields(),A()}catch(e){if(e?.errorFields)return;Z.error(e?.message||`创建失败`)}finally{k(!1)}},M=async e=>{try{await Oae(e),Z.success(`已撤销`),A()}catch(e){Z.error(e?.message||`撤销失败`)}},N=e=>{navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(e).then(()=>{Z.success(`邀请链接已复制`)}).catch(()=>{P(e)}):P(e)},P=e=>{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-9999px`,t.style.top=`-9999px`,document.body.appendChild(t),t.focus(),t.select();try{document.execCommand(`copy`),Z.success(`邀请链接已复制`)}catch{Z.warning(`复制失败,请手动复制`)}document.body.removeChild(t)},[F,I]=(0,S.useState)([]),[L,R]=(0,S.useState)(!1),[z,B]=(0,S.useState)(`pending`),[V,H]=(0,S.useState)(`members`),U=(0,S.useRef)(!1),W=(0,S.useRef)(0),ee=(0,S.useCallback)(async(e,t=!1)=>{R(!0);try{let n=await kae(e),r=n?.length||0;I(n||[]),e===`pending`&&r>0&&(t&&!U.current?(U.current=!0,NK.confirm({title:(0,$.jsxs)(EH,{children:[(0,$.jsx)(o4,{style:{color:`#f59e0b`}}),`待处理的加入申请`]}),content:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`p`,{children:[`您有 `,(0,$.jsx)(`strong`,{style:{color:`#ef4444`},children:r}),` 条待处理的团队加入申请。`]}),(0,$.jsx)(`p`,{style:{color:`#64748b`,fontSize:13,marginBottom:0},children:`请及时处理新成员的加入申请。`})]}),okText:`立即处理`,cancelText:`稍后处理`,onOk:()=>{H(`requests`)}})):!t&&r>W.current&&Z.info({content:`有 ${r-W.current} 条新的加入申请待处理`,duration:5})),e===`pending`&&(W.current=r)}catch(e){Z.error(e?.message||`加载申请失败`)}finally{R(!1)}},[]);(0,S.useEffect)(()=>{ee(`pending`,!0)},[ee]),(0,S.useEffect)(()=>{if(!e)return;let t=setInterval(()=>{ee(`pending`,!1)},6e4);return()=>clearInterval(t)},[e,ee]);let G=async(e,t,n)=>{try{await Aae(e,t,n),Z.success(t===`approve`?`已通过`:`已拒绝`),ee(z),p()}catch(e){Z.error(e?.message||`操作失败`)}},[te,ne]=(0,S.useState)([]),[K,re]=(0,S.useState)(0),[ie,ae]=(0,S.useState)(null),[q,oe]=(0,S.useState)(!1),[se,ce]=(0,S.useState)(1),[le,ue]=(0,S.useState)(``),[de,fe]=(0,S.useState)(``),[pe,me]=(0,S.useState)(()=>{let e=(0,jE.default)().format(`YYYY-MM-DD`);return[e,e]}),he=(0,S.useCallback)(async()=>{oe(!0);try{let e=await Pae({page:se,pageSize:10,phone:de||void 0,recordType:le||void 0,startDate:pe?.[0]||void 0,endDate:pe?.[1]||void 0});ne(e.items||[]),re(e.total||0),ae(e.summary||null)}catch(e){Z.error(e?.message||`加载积分记录失败`)}finally{oe(!1)}},[se,le,de,pe]);(0,S.useEffect)(()=>{he()},[he]);let ge=()=>{ue(``),fe(``);let e=(0,jE.default)().format(`YYYY-MM-DD`);me([e,e]),ce(1)},_e=()=>{let e=Fae({phone:de||void 0,recordType:le||void 0,startDate:pe?.[0]||void 0,endDate:pe?.[1]||void 0}),t=localStorage.getItem(`auth_token`),n=t?{Authorization:`Bearer ${t}`}:{};fetch(e,{headers:n}).then(e=>e.blob()).then(e=>{let t=document.createElement(`a`);t.href=URL.createObjectURL(e),t.download=`团队积分_${(0,jE.default)().format(`YYYYMMDD_HHmmss`)}.csv`,t.click(),URL.revokeObjectURL(t.href)}).catch(()=>Z.error(`导出失败`))},ve=[{title:`用户名`,dataIndex:`username`,width:140,render:e=>(0,$.jsx)(Q.Text,{strong:!0,children:e})},{title:`手机号`,dataIndex:`phone`,width:130,render:e=>e||`-`},{title:`积分`,dataIndex:`credits`,width:100,render:e=>(0,$.jsx)(Q.Text,{style:{color:`#6366f1`},children:(e??0).toFixed(2)})},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,$.jsx)(h$,{color:e?`green`:`red`,children:e?`启用`:`禁用`})},{title:`加入时间`,dataIndex:`joinedAt`,width:170,render:e=>$9(e)},{title:`操作`,key:`action`,width:100,render:(e,t)=>{let n=j7.getState().user?.id;return t.id===n?(0,$.jsx)(Cw,{title:`不能给自己调整积分`,children:(0,$.jsx)(X,{size:`small`,type:`link`,style:{padding:0,color:`#999`,cursor:`not-allowed`},disabled:!0,children:`调整积分`})}):(0,$.jsx)(X,{size:`small`,type:`link`,style:{padding:0},onClick:()=>{h({open:!0,member:t}),g.resetFields()},children:`调整积分`})}}],ye=e=>`${window.location.origin}/join-team?code=${e}`,be=[{title:`邀请码`,dataIndex:`code`,width:200,render:e=>(0,$.jsx)(Q.Text,{copyable:!0,style:{fontFamily:`monospace`},children:e})},{title:`邀请链接`,dataIndex:`code`,render:e=>{let t=ye(e);return(0,$.jsxs)(EH,{style:{width:`100%`},children:[(0,$.jsx)(Q.Text,{style:{flex:1,fontSize:12,wordBreak:`break-all`,fontFamily:`monospace`,color:`#64748b`},children:t}),(0,$.jsx)(Cw,{title:`复制链接`,children:(0,$.jsx)(X,{size:`small`,type:`text`,icon:(0,$.jsx)(b1,{}),onClick:()=>N(t)})})]})}},{title:`状态`,dataIndex:`status`,width:80,render:e=>(0,$.jsx)(h$,{color:e===`active`?`green`:`default`,children:e===`active`?`有效`:`已撤销`})},{title:`使用次数`,key:`uses`,width:100,render:(e,t)=>`${t.useCount}${t.maxUses?`/${t.maxUses}`:``}`},{title:`过期时间`,dataIndex:`expiresAt`,width:170,render:e=>e?$9(e):`永不过期`},{title:`操作`,key:`action`,width:80,render:(e,t)=>t.status===`active`?(0,$.jsx)(X,{size:`small`,type:`link`,danger:!0,onClick:()=>M(t.id),children:`撤销`}):null}],xe=e=>{let t={pending:{color:`orange`,text:`待处理`},approved:{color:`green`,text:`已通过`},rejected:{color:`red`,text:`已拒绝`}}[e]||{color:`default`,text:e};return(0,$.jsx)(h$,{color:t.color,children:t.text})},Se=[{title:`申请人`,dataIndex:`username`,width:140,render:e=>(0,$.jsx)(Q.Text,{strong:!0,children:e})},{title:`手机号`,dataIndex:`phone`,width:130,render:e=>e||`-`},{title:`状态`,dataIndex:`status`,width:100,render:e=>xe(e)},{title:`申请时间`,dataIndex:`createdAt`,width:170,render:e=>$9(e)},{title:`处理时间`,dataIndex:`handledAt`,width:170,render:e=>e?$9(e):`-`},{title:`备注`,dataIndex:`note`,width:180,ellipsis:!0,render:e=>e||`-`},{title:`操作`,key:`action`,width:160,render:(e,t)=>t.status===`pending`?(0,$.jsxs)(EH,{size:4,children:[(0,$.jsx)(X,{size:`small`,type:`link`,icon:(0,$.jsx)(SC,{}),style:{color:`#16a34a`,padding:0},onClick:()=>G(t.id,`approve`),children:`通过`}),(0,$.jsx)(X,{size:`small`,type:`link`,icon:(0,$.jsx)(ju,{}),danger:!0,style:{padding:0},onClick:()=>{NK.confirm({title:`拒绝申请`,content:(0,$.jsx)(bU,{layout:`vertical`,style:{marginTop:12},children:(0,$.jsx)(bU.Item,{name:`note`,label:`拒绝原因(可选)`,children:(0,$.jsx)(tG.TextArea,{rows:2,placeholder:`选填`,id:`reject-note-input`})})}),onOk:()=>{let e=document.getElementById(`reject-note-input`)?.value||void 0;G(t.id,`reject`,e)}})},children:`拒绝`})]}):(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:`已处理`})}],Ce=[{title:`用户名`,dataIndex:`username`,width:120,render:e=>(0,$.jsx)(Q.Text,{strong:!0,children:e||`-`})},{title:`手机号`,dataIndex:`phone`,width:120,render:e=>e||`-`},{title:`类型`,dataIndex:`type`,width:100,render:(e,t)=>{let n=Lse[t.type]||{color:`default`,label:t.type||`-`};return(0,$.jsx)(h$,{color:n.color,children:n.label})}},{title:`变动积分`,dataIndex:`amount`,width:110,align:`right`,render:(e,t)=>(0,$.jsxs)(Q.Text,{strong:!0,style:{color:t.amount>=0?`#10b981`:`#ef4444`,fontSize:14},children:[t.amount>=0?`+`:``,(t.amount??0).toFixed(2)]})},{title:`余额`,dataIndex:`balanceAfter`,width:100,align:`right`,render:e=>(e??0).toFixed(2)},{title:`说明`,dataIndex:`description`,ellipsis:!0,minWidth:160,render:e=>e||`-`},{title:`时间`,dataIndex:`createdAt`,width:170,render:e=>$9(e)}],we={borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},Te={padding:`16px`,textAlign:`right`},Ee=[{key:`members`,label:(0,$.jsxs)(EH,{children:[(0,$.jsx)(g5,{}),`成员列表`,s>0&&(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[`(`,s,`)`]})]}),children:(0,$.jsxs)(`div`,{style:we,children:[(0,$.jsx)(n$,{columns:ve,dataSource:a,rowKey:`id`,loading:l,pagination:!1,bordered:!1,scroll:{x:800},locale:{emptyText:(0,$.jsx)(rC,{description:`暂无成员`})}}),s>0&&(0,$.jsx)(`div`,{style:Te,children:(0,$.jsx)(VG,{current:d,pageSize:20,total:s,onChange:e=>f(e),size:`small`})})]})},{key:`credits`,label:(0,$.jsxs)(EH,{children:[(0,$.jsx)(b5,{}),`团队积分变动`]}),children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:12,display:`flex`,gap:8,flexWrap:`wrap`,alignItems:`center`},children:[(0,$.jsx)(NC,{value:le||void 0,onChange:e=>{ue(e||``),ce(1)},allowClear:!0,placeholder:`交易类型`,style:{width:130},options:[{value:`recharge`,label:`充值`},{value:`consume`,label:`消费`},{value:`team_internal`,label:`团队内部`},{value:`refund`,label:`退款`}]}),(0,$.jsx)(tG,{placeholder:`搜索手机号`,value:de,onChange:e=>{fe(e.target.value),ce(1)},style:{width:160},allowClear:!0}),(0,$.jsx)(Ise,{value:pe?[(0,jE.default)(pe[0]),(0,jE.default)(pe[1])]:void 0,onChange:e=>{e&&e[0]&&e[1]?me([e[0].format(`YYYY-MM-DD`),e[1].format(`YYYY-MM-DD`)]):me(null),ce(1)}}),(0,$.jsx)(X,{onClick:ge,children:`重置`}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(M0,{}),onClick:_e,children:`导出 Excel`})]}),(0,$.jsx)(`div`,{style:{marginBottom:12,padding:`8px 16px`,background:`#f8f9fc`,borderRadius:8,display:`flex`,gap:24,flexWrap:`wrap`,fontSize:13},children:(0,$.jsxs)(`span`,{children:[`总消耗积分:`,(0,$.jsx)(`strong`,{style:{color:`#ef4444`,fontSize:15},children:ie?.totalConsume??0})]})}),(0,$.jsxs)(`div`,{style:we,children:[(0,$.jsx)(n$,{rowKey:`id`,loading:q,dataSource:te,pagination:!1,bordered:!1,scroll:{x:950},columns:Ce,locale:{emptyText:(0,$.jsx)(rC,{description:`暂无积分记录`})}}),K>0&&(0,$.jsx)(`div`,{style:Te,children:(0,$.jsx)(VG,{current:se,pageSize:10,total:K,onChange:e=>ce(e),size:`small`,showTotal:e=>`共 ${e} 条`})})]})]})},{key:`invitations`,label:(0,$.jsxs)(EH,{children:[(0,$.jsx)(b1,{}),`邀请管理`]}),children:(0,$.jsxs)(`div`,{style:we,children:[(0,$.jsx)(`div`,{style:{padding:16,paddingBottom:0},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(mL,{}),onClick:()=>E(!0),children:`生成邀请码`})}),(0,$.jsx)(n$,{columns:be,dataSource:b,rowKey:`id`,loading:C,pagination:!1,bordered:!1,scroll:{x:900},locale:{emptyText:(0,$.jsx)(rC,{description:`暂无邀请码`})}})]})},{key:`requests`,label:(0,$.jsxs)(EH,{children:[(0,$.jsx)(G3,{}),`加入申请`,F.length>0&&z===`pending`&&(0,$.jsx)(h$,{color:`red`,children:F.length})]}),children:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{marginBottom:16,display:`flex`,alignItems:`center`},children:(0,$.jsx)(Dz,{value:z,onChange:e=>{B(e),ee(e)},options:[{label:`待处理`,value:`pending`},{label:`已通过`,value:`approved`},{label:`已拒绝`,value:`rejected`},{label:`全部`,value:``}],style:{borderRadius:12,border:`1px solid #e2e8f0`,padding:3,background:`#f8fafc`,boxShadow:`0 2px 8px rgba(0,0,0,0.06)`,"--ant-segmented-item-selected-bg":`#6366f1`,"--ant-segmented-item-selected-color":`#ffffff`},size:`middle`})}),(0,$.jsx)(`div`,{style:we,children:(0,$.jsx)(n$,{columns:Se,dataSource:F,rowKey:`id`,loading:L,pagination:!1,bordered:!1,scroll:{x:1e3},locale:{emptyText:(0,$.jsx)(rC,{description:z===`pending`?`暂无待审批申请`:`暂无记录`})}})})]})}];return(0,$.jsxs)(`div`,{style:{padding:24},children:[(0,$.jsx)(`div`,{style:{marginBottom:24},children:n?(0,$.jsx)(Q.Text,{type:`secondary`,children:`加载中...`}):e?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,flexWrap:`wrap`,gap:12},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:e.name}),(0,$.jsxs)(Q.Text,{type:`secondary`,children:[`代码: `,e.code||`-`,` 成员: `,e.memberCount,` 人`]})]}),(0,$.jsx)(X,{icon:(0,$.jsx)(Uq,{}),onClick:()=>{i(),p(),A(),ee(z),he()},children:`刷新`})]}):(0,$.jsx)(Q.Text,{type:`secondary`,children:`无法获取团队信息`})}),(0,$.jsx)(IL,{items:Ee,activeKey:V,onChange:H,size:`large`}),(0,$.jsx)(NK,{title:(0,$.jsxs)(EH,{children:[(0,$.jsx)(g5,{}),`调整成员积分 - `,m.member?.username]}),open:m.open,confirmLoading:_,onOk:y,onCancel:()=>h({open:!1,member:null}),okText:`确认`,width:480,children:(0,$.jsxs)(bU,{form:g,layout:`vertical`,style:{marginTop:16},initialValues:{direction:`increase`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16,padding:`10px 16px`,background:`#f0f4ff`,borderRadius:8,display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(Q.Text,{type:`secondary`,children:`我的当前积分`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:20,color:`#6366f1`},children:j7.getState().user?.credits?.toFixed(2)??`0.00`})]}),(0,$.jsx)(bU.Item,{name:`direction`,label:`操作类型`,rules:[{required:!0,message:`请选择操作类型`}],children:(0,$.jsxs)(HI.Group,{buttonStyle:`solid`,size:`large`,style:{width:`100%`},children:[(0,$.jsx)(HI.Button,{value:`increase`,style:{width:`50%`,textAlign:`center`},children:`增加成员积分`}),(0,$.jsx)(HI.Button,{value:`decrease`,style:{width:`50%`,textAlign:`center`},children:`扣减成员积分`})]})}),(0,$.jsx)(bU.Item,{name:`amount`,label:`积分数量`,required:!0,rules:[{required:!0,message:`请输入积分数量`},{type:`number`,min:.01,message:`必须大于 0`},{type:`number`,max:9999999,message:`单次不能超过 9999999`}],validateTrigger:[`onChange`,`onBlur`],children:(0,$.jsx)(mB,{style:{width:`100%`},step:1,min:.01,max:9999999,precision:2,placeholder:`请输入正数积分数量`,size:`large`,formatter:e=>{if(!e)return``;let t=`${e}`.replace(/[^0-9.]/g,``);return t=t.replace(/^0+(?=\d)/,``),t},parser:e=>{if(!e||e===`.`)return``;let t=parseFloat(e);return isNaN(t)||t<=0?``:Math.min(t,9999999)},onKeyDown:e=>{(e.key===`-`||e.key===`e`||e.key===`E`)&&e.preventDefault()},onChange:e=>{e??g.validateFields([`amount`])}})}),(0,$.jsx)(bU.Item,{name:`description`,label:`备注`,children:(0,$.jsx)(tG.TextArea,{rows:2,maxLength:256,placeholder:`选填,例如:活动奖励`})})]})}),(0,$.jsx)(NK,{title:(0,$.jsxs)(EH,{children:[(0,$.jsx)(b1,{}),`生成邀请码`]}),open:T,confirmLoading:O,onOk:j,onCancel:()=>{E(!1),D.resetFields()},okText:`生成`,width:480,children:(0,$.jsxs)(bU,{form:D,layout:`vertical`,style:{marginTop:16},children:[(0,$.jsx)(bU.Item,{name:`maxUses`,label:`最大使用次数`,children:(0,$.jsx)(mB,{style:{width:`100%`},min:1,placeholder:`留空表示不限`,size:`large`})}),(0,$.jsxs)(`div`,{style:{padding:`12px 16px`,background:`#eef2ff`,borderRadius:8,fontSize:13,color:`#4f46e5`,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(DV,{}),(0,$.jsxs)(`span`,{children:[`邀请码自生成起 `,(0,$.jsx)(`strong`,{children:`24 小时`}),` 内有效,过期自动失效。`]})]})]})})]})},zse=()=>{let[e]=On(),t=Ye(),n=e.get(`code`)||``,{user:r,loading:i,checkAuth:a}=j7(),[o,s]=(0,S.useState)(!0),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(`VideoGen.AI`),[v,y]=(0,S.useState)(``);return(0,S.useEffect)(()=>{a(),J5().then(e=>{_(e.siteName),y(e.siteLogo)}).catch(()=>{})},[a]),(0,S.useEffect)(()=>{if(!n){s(!1);return}i||(s(!0),(r?jae(n):Mae(n)).then(e=>{l(e),e?.valid&&r&&!e.alreadyInTeam&&!e.hasPendingRequest&&h(!0)}).catch(()=>l(null)).finally(()=>s(!1)))},[n,r,i]),i||o?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:`60vh`},children:(0,$.jsx)(cK,{size:`large`})}):f?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(pJ,{status:`success`,icon:(0,$.jsx)(A4,{style:{color:`#6366f1`}}),title:`申请已提交`,subTitle:`您的加入申请已提交,请等待团队管理人审批。审批通过后将自动加入团队。`,extra:(0,$.jsx)(EH,{children:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})})}):!n||!c?.valid?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(pJ,{status:`error`,title:`邀请链接无效`,subTitle:`该邀请链接可能已过期或不存在,请联系团队管理人重新获取。`,extra:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})}):c.alreadyInTeam?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(pJ,{status:`info`,title:`您已在此团队中`,subTitle:`您已经是「${c.teamName}」的成员了,无需再次加入。`,extra:(0,$.jsx)(EH,{children:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})})}):c.hasPendingRequest?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(pJ,{status:`info`,title:`申请待审批`,subTitle:`您已提交加入「${c.teamName}」的申请,请等待团队管理人审批。`,extra:(0,$.jsx)(EH,{children:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:`40px 20px`},children:(0,$.jsxs)(`div`,{style:{width:`100%`,maxWidth:480},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:12,marginBottom:32},children:[v?(0,$.jsx)(`img`,{src:v,alt:`logo`,style:{width:40,height:40,borderRadius:10}}):(0,$.jsx)(`div`,{style:{width:40,height:40,borderRadius:10,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(s5,{style:{fontSize:20,color:`#fff`}})}),(0,$.jsx)(`span`,{style:{fontSize:22,fontWeight:700,color:`#1e293b`,letterSpacing:.5},children:g})]}),(0,$.jsxs)(RL,{variant:`outlined`,style:{borderRadius:16,width:`100%`,textAlign:`center`},children:[(0,$.jsx)(a5,{style:{fontSize:48,color:`#6366f1`,marginBottom:16}}),(0,$.jsx)(Q.Title,{level:3,children:`加入团队`}),(0,$.jsx)(Q.Text,{style:{fontSize:16,color:`#475569`,display:`block`,marginBottom:8},children:`您被邀请加入团队`}),(0,$.jsxs)(Q.Title,{level:4,style:{color:`#6366f1`,margin:`16px 0 24px`},children:[`「`,c.teamName,`」`]}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{display:`block`,marginBottom:24},children:`加入后团队管理人可以为您分配积分、查看您的积分使用情况。`}),r?(0,$.jsx)(X,{type:`primary`,size:`large`,block:!0,loading:u,onClick:()=>h(!0),children:`申请加入`}):(0,$.jsxs)(EH,{direction:`vertical`,style:{width:`100%`},size:12,children:[(0,$.jsx)(X,{type:`primary`,size:`large`,block:!0,icon:(0,$.jsx)(v6,{}),onClick:()=>{t(`/login?redirect=${encodeURIComponent(window.location.pathname+window.location.search)}`)},children:`登录后申请加入`}),(0,$.jsx)(X,{size:`large`,block:!0,icon:(0,$.jsx)(jre,{}),onClick:()=>{t(`/login?tab=register&redirect=${encodeURIComponent(window.location.pathname+window.location.search)}`)},children:`注册新账号`}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:12},children:`登录或注册后将自动提交加入申请`})]})]})]})}),(0,$.jsxs)(NK,{title:(0,$.jsxs)(EH,{children:[(0,$.jsx)(a5,{style:{color:`#6366f1`}}),`确认加入团队`]}),open:m,onOk:async()=>{if(n)try{d(!0),await Nae(n),p(!0),h(!1),Z.success(`申请已提交`)}catch(e){Z.error(e?.message||`申请失败`)}finally{d(!1)}},onCancel:()=>h(!1),okText:`确认加入`,cancelText:`取消`,confirmLoading:u,width:420,children:[(0,$.jsxs)(`p`,{style:{marginBottom:0},children:[`您确定要加入团队 `,(0,$.jsxs)(`strong`,{style:{color:`#6366f1`},children:[`「`,c.teamName,`」`]}),` 吗?`]}),(0,$.jsx)(`p`,{style:{marginTop:8,color:`#64748b`,fontSize:13},children:`提交后需等待团队管理人审批,审批通过后将自动加入团队。`})]})]})},Bse=new Set([`group_active`,`callback_success`]),Vse=()=>{let e=(0,S.useMemo)(()=>new URLSearchParams(window.location.search),[]),t=e.get(`status`)||``,n=e.get(`resultCode`)||``,r=Bse.has(t)||n===`10000`;return(0,$.jsx)(`div`,{style:{minHeight:`100vh`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8fafc`,padding:20},children:(0,$.jsxs)(RL,{style:{width:`100%`,maxWidth:520,borderRadius:18},children:[(0,$.jsx)(pJ,{status:r?`success`:`error`,title:r?`真人认证已完成`:`真人认证未完成`,subTitle:r?`请回到电脑端查看,项目组已创建成功。`:`请回到电脑端重新发起创建项目组。`,extra:[(0,$.jsx)(X,{type:`primary`,onClick:()=>window.close(),children:`关闭页面`},`close`)]}),(0,$.jsxs)(Q.Paragraph,{type:`secondary`,style:{textAlign:`center`,marginBottom:0},children:[`当前状态:`,t||`-`,`,结果码:`,n||`-`]})]})})};jE.default.locale(`zh-cn`);var Hse=({children:e})=>{let{user:t,loading:n,checkAuth:r}=j7();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)(cK,{size:`large`})}):t?(0,$.jsx)($.Fragment,{children:e}):(window.location.href=`/login`,null)};(0,_.createRoot)(document.getElementById(`root`)).render((0,$.jsx)(()=>{let{checkAuth:e}=j7();return(0,S.useEffect)(()=>{e()},[]),(0,$.jsx)(Fm,{locale:Z0.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)(Jb,{children:(0,$.jsx)(_n,{children:(0,$.jsxs)(Dt,{children:[(0,$.jsx)(Tt,{path:`/login`,element:(0,$.jsx)(Bae,{})}),(0,$.jsx)(Tt,{path:`/join-team`,element:(0,$.jsx)(zse,{})}),(0,$.jsx)(Tt,{path:`/private-portrait-authorized`,element:(0,$.jsx)(Vse,{})}),(0,$.jsxs)(Tt,{path:`/`,element:(0,$.jsx)(Hse,{children:(0,$.jsx)(Rae,{})}),children:[(0,$.jsx)(Tt,{index:!0,element:(0,$.jsx)(Ct,{to:`/projects`,replace:!0})}),(0,$.jsx)(Tt,{path:`projects`,element:(0,$.jsx)(Hae,{})}),(0,$.jsx)(Tt,{path:`projects/:projectId/generate`,element:(0,$.jsx)(Zae,{})}),(0,$.jsx)(Tt,{path:`records`,element:(0,$.jsx)(Qae,{})}),(0,$.jsx)(Tt,{path:`credits`,element:(0,$.jsx)($ae,{})}),(0,$.jsx)(Tt,{path:`credit-records`,element:(0,$.jsx)(Y7,{})}),(0,$.jsx)(Tt,{path:`order-records`,element:(0,$.jsx)(Y7,{})}),(0,$.jsx)(Tt,{path:`user-center`,element:(0,$.jsx)(Y7,{})}),(0,$.jsx)(Tt,{path:`messages`,element:(0,$.jsx)(noe,{})}),(0,$.jsx)(Tt,{path:`home`,element:(0,$.jsx)(Ase,{})}),(0,$.jsx)(Tt,{path:`conversation`,element:(0,$.jsx)(joe,{})}),(0,$.jsx)(Tt,{path:`initial`,element:(0,$.jsx)(Ioe,{})}),(0,$.jsx)(Tt,{path:`initial/:creatID/initialinfo`,element:(0,$.jsx)(Hoe,{})}),(0,$.jsx)(Tt,{path:`removelens`,element:(0,$.jsx)(Goe,{})}),(0,$.jsx)(Tt,{path:`removelens/:creatID/removeinfo`,element:(0,$.jsx)(Cse,{})}),(0,$.jsx)(Tt,{path:`removelens/:creatID/removefenbu`,element:(0,$.jsx)(Dse,{})}),(0,$.jsx)(Tt,{path:`generated`,element:(0,$.jsx)(ese,{})}),(0,$.jsx)(Tt,{path:`pretest`,element:(0,$.jsx)(nse,{})}),(0,$.jsx)(Tt,{path:`authorization`,element:(0,$.jsx)(ise,{})}),(0,$.jsx)(Tt,{path:`authoriza-waiting`,element:(0,$.jsx)(Nse,{})}),(0,$.jsx)(Tt,{path:`materials`,element:(0,$.jsx)(fse,{})}),(0,$.jsx)(Tt,{path:`materials/private-portrait-virtual`,element:(0,$.jsx)(Ct,{to:`/generated?filterType=private_portrait&portraitTab=aigc_virtual`,replace:!0})}),(0,$.jsx)(Tt,{path:`consume`,element:(0,$.jsx)(Mse,{})}),(0,$.jsx)(Tt,{path:`popular`,element:(0,$.jsx)(Pse,{})}),(0,$.jsx)(Tt,{path:`authacc`,element:(0,$.jsx)(ose,{})}),(0,$.jsx)(Tt,{path:`creativeplaza`,element:(0,$.jsx)(Fse,{})}),(0,$.jsx)(Tt,{path:`team-management`,element:(0,$.jsx)(Rse,{})})]}),(0,$.jsx)(Tt,{path:`*`,element:(0,$.jsx)(Ct,{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 06744ce8..73eaad85 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/privatePortrait/picker/AssetPicker.tsx b/video-gen-app/src/components/privatePortrait/picker/AssetPicker.tsx index 5687df3f..aeabe33d 100644 --- a/video-gen-app/src/components/privatePortrait/picker/AssetPicker.tsx +++ b/video-gen-app/src/components/privatePortrait/picker/AssetPicker.tsx @@ -142,11 +142,11 @@ const PrivatePortraitAssetPicker: React.FC = ({ }, [open, libraryType]); useEffect(() => { - if (!open) return; + if (!projectId) return; setTimeout(() => { loadAssets(); }, 0); - }, [open, projectId, assetType, libraryType]); + }, [projectId, assetType]); const toggle = (asset: PrivatePortraitSelectableAsset) => { if (selectedIds.includes(asset.id)) { diff --git a/video-gen-app/src/pages/HomePage.tsx b/video-gen-app/src/pages/HomePage.tsx index f9fa2e9e..d8d8dc94 100644 --- a/video-gen-app/src/pages/HomePage.tsx +++ b/video-gen-app/src/pages/HomePage.tsx @@ -15,6 +15,7 @@ import { HeartOutlined, ShareAltOutlined, StarOutlined, + CopyOutlined, } from '@ant-design/icons'; import { useNavigate } from 'react-router-dom'; import { getmedit ,getHomeCaseHeader,getHomeCaseButton} from '../api'; @@ -22,6 +23,147 @@ import { getmedit ,getHomeCaseHeader,getHomeCaseButton} from '../api'; +interface CaseAssetCardProps { + asset: any; + index: number; + onPreview: (asset: any) => void; +} + +const CaseAssetCard: React.FC = ({ asset, index, onPreview }) => { + const [isHovered, setIsHovered] = useState(false); + + return ( +
onPreview(asset)} + onMouseEnter={() => setIsHovered(true)} + onMouseLeave={() => setIsHovered(false)} + style={{ + borderRadius: 12, + overflow: 'hidden', + cursor: 'pointer', + flexShrink: 0, + width: "18%", + position: 'relative', + }} + > +
+ {asset.mediaType === 'video' ? ( + <> +
+ ); +}; + // 把 ISO 时间格式化成 MM-DD HH:mm(与图片一致) function formatShortDate(iso?: string | null): string { if (!iso) return '-'; @@ -135,10 +277,17 @@ const HomePage: React.FC = () => { const aiEntries = [ { icon: , - title: '项目创建', + title: '行业智造', description: '新建项目、设置图文视频参数、核对信息并生成素材', action: '立即创作', path: '/projects', + }, + { + icon: , + title: 'AI成片', + description: '输入想法、剧本或上传参考,智能生成视频/图片', + action: '立即生成', + path: '/conversation', }, { icon: , @@ -154,13 +303,7 @@ const HomePage: React.FC = () => { action: '开始拆镜', path: '/removelens', }, - { - icon: , - title: 'AI成片', - description: '输入想法、剧本或上传参考,智能生成视频/图片', - action: '立即生成', - path: '/conversation', - }, + ]; @@ -842,93 +985,12 @@ const HomePage: React.FC = () => {
暂无素材
) : caseAssets.map((asset: any, index: number) => ( -
setPreviewAsset(asset)} - style={{ - borderRadius: 12, - overflow: 'hidden', - cursor: 'pointer', - // background: '#0f172a', - flexShrink: 0, - width: "18%", - }} - > -
- {asset.mediaType === 'video' ? ( - <> -
- {/*
-
- {asset.title || `素材 ${index + 1}`} -
-
- - {asset.likes || Math.floor(Math.random() * 1000)} -
-
*/} -
+ asset={asset} + index={index} + onPreview={setPreviewAsset} + /> ))} @@ -948,24 +1010,24 @@ const HomePage: React.FC = () => { className="preview-modal" style={{ borderRadius: 16, overflow: 'hidden' }} > -
+
{/* 左侧:素材预览 */}
-
+
{previewAsset?.mediaType === 'video' ? (