diff --git a/video-gen-admin/dist/assets/index-C1APw6hP.js b/video-gen-admin/dist/assets/index-DHcd1Fwz.js similarity index 88% rename from video-gen-admin/dist/assets/index-C1APw6hP.js rename to video-gen-admin/dist/assets/index-DHcd1Fwz.js index afcdfcae..90d80743 100644 --- a/video-gen-admin/dist/assets/index-C1APw6hP.js +++ b/video-gen-admin/dist/assets/index-DHcd1Fwz.js @@ -207,46 +207,46 @@ html body { &${o}-slide-down-leave${o}-slide-down-leave-active${t}-placement-bottom, &${o}-slide-down-leave${o}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:Ph},[`&${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-topLeft, &${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-top, - &${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-topRight`]:{animationName:Ih}}},uw(e,h,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${n}`]:{position:`relative`,margin:0},[`${n}-submenu-popup`]:{position:`absolute`,zIndex:r,background:`transparent`,boxShadow:`none`,transformOrigin:`0 0`,"ul, li":{listStyle:`none`,margin:0}},[`${t}, ${t}-menu-submenu`]:{...Jc(e),[n]:{padding:d,listStyleType:`none`,backgroundColor:h,backgroundClip:`padding-box`,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,...Qc(e),"&:empty":{padding:0,boxShadow:`none`},[`${n}-item-group-title`]:{padding:`${Y(l)} ${Y(m)}`,color:e.colorTextDescription,transition:`all ${c}`},[`${n}-item`]:{position:`relative`,display:`flex`,alignItems:`center`},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:`auto`,"&-with-extra":{display:`inline-flex`,alignItems:`center`,width:`100%`},"> a":{color:`inherit`,transition:`all ${c}`,"&:hover":{color:`inherit`},"&::after":{position:`absolute`,inset:0,content:`""`}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:`auto`,fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:{display:`flex`,margin:0,padding:`${Y(l)} ${Y(m)}`,color:e.colorText,fontWeight:`normal`,fontSize:u,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${c}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...Qc(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:`not-allowed`,"&:hover":{color:f,backgroundColor:h,cursor:`not-allowed`},a:{pointerEvents:`none`}},"&-divider":{height:1,margin:`${Y(e.marginXXS)} 0`,overflow:`hidden`,lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:`absolute`,insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:`0 !important`,color:e.colorIcon,fontSize:p,fontStyle:`normal`}}},[`${n}-item-group-list`]:{margin:`0 ${Y(e.marginXS)}`,padding:0,listStyle:`none`},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(m).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:`relative`},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:h,cursor:`not-allowed`}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[Hh(e,`slide-up`),Hh(e,`slide-down`),Mh(e,`move-up`),Mh(e,`move-down`),rg(e,`zoom-big`)]]},Qee=rl(`Dropdown`,e=>{let{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:i}=e,a=gs(e,{menuCls:`${i}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[Zee(a),Xee(a)]},e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...cw({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...ow(e)}),{resetStyle:!1}),KE=e=>{let{menu:t,arrow:n,prefixCls:r,children:i,trigger:a,disabled:o,dropdownRender:s,popupRender:c,getPopupContainer:l,overlayClassName:u,rootClassName:d,overlayStyle:f,open:p,onOpenChange:m,mouseEnterDelay:h=.15,mouseLeaveDelay:g=.1,autoAdjustOverflow:_=!0,placement:v=``,transitionName:y,classNames:b,styles:x,destroyPopupOnHide:C,destroyOnHidden:w}=e,{getPrefixCls:T,direction:E,getPopupContainer:D,className:O,style:k,classNames:A,styles:j}=li(`dropdown`),M={...e,mouseEnterDelay:h,mouseLeaveDelay:g,autoAdjustOverflow:_},[N,P]=Fd([A,b],[j,x],{props:M}),F={...k,...f,...P.root},I=c||s;Dr(`Dropdown`);let L=S.useMemo(()=>{let e=T();return y===void 0?v.includes(`top`)?`${e}-slide-down`:`${e}-slide-up`:y},[T,v,y]),R=S.useMemo(()=>v?v.includes(`Center`)?v.slice(0,v.indexOf(`Center`)):v:E===`rtl`?`bottomRight`:`bottomLeft`,[v,E]),z=T(`dropdown`,r),B=bf(z),[V,H]=Qee(z,B),[,U]=Kc(),W=S.Children.only(vd(i)?S.createElement(`span`,null,i):i),ee=Pp(W,{className:J(`${z}-trigger`,{[`${z}-rtl`]:E===`rtl`},W.props.className),disabled:W.props.disabled??o}),te=o?[]:a,ne=!!te?.includes(`contextMenu`),[re,ie]=Hn(!1,p),ae=In(e=>{m?.(e,{source:`trigger`}),ie(e)}),G=J(u,d,V,H,B,O,N.root,{[`${z}-rtl`]:E===`rtl`}),oe=hw({arrowPointAtCenter:hd(n)&&n.pointAtCenter,autoAdjustOverflow:_,offset:U.marginXXS,arrowWidth:n?U.sizePopupArrow:0,borderRadius:U.borderRadius}),K=In(()=>{t?.selectable&&t?.multiple||(m?.(!1,{source:`menu`}),ie(!1))}),se=()=>{let e=Sr(N,[`root`]),n=Sr(P,[`root`]),r;return t?.items&&(r=S.createElement(GE,{...t,classNames:{...e,subMenu:{...e}},styles:{...n,subMenu:{...n}}})),I&&(r=I(r)),r=S.Children.only(typeof r==`string`?S.createElement(`span`,null,r):r),S.createElement(PE,{prefixCls:`${z}-menu`,rootClassName:J(H,B),expandIcon:S.createElement(`span`,{className:`${z}-menu-submenu-arrow`},E===`rtl`?S.createElement(Hw,{className:`${z}-menu-submenu-arrow-icon`}):S.createElement(mg,{className:`${z}-menu-submenu-arrow-icon`})),mode:`vertical`,selectable:!1,onClick:K,validator:({mode:e})=>{}},r)},[ce,q]=Yd(`Dropdown`,F.zIndex),le=S.createElement(Zw,{alignPoint:ne,...Sr(e,[`rootClassName`,`onOpenChange`]),mouseEnterDelay:h,mouseLeaveDelay:g,visible:re,builtinPlacements:oe,arrow:!!n,overlayClassName:G,prefixCls:z,getPopupContainer:l||D,transitionName:L,trigger:te,overlay:se,placement:R,onVisibleChange:ae,overlayStyle:{...F,zIndex:ce},autoDestroy:w??C},ee);return ce&&(le=S.createElement(Ud.Provider,{value:q},le)),le},$ee=cx(KE,`align`,void 0,`dropdown`,e=>e);KE._InternalPanelDoNotUseOrYouWillBeFired=e=>S.createElement($ee,{...e},S.createElement(`span`,null));var qE=Zg,JE=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e){(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekday=r()})(e,(function(){return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,n=this.$W,r=(n{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_localeData=r()})(e,(function(){return function(e,t,n){var r=t.prototype,i=function(e){return e&&(e.indexOf?e:e.s)},a=function(e,t,n,r,a){var o=e.name?e:e.$locale(),s=i(o[t]),c=i(o[n]),l=s||c.map((function(e){return e.slice(0,r)}));if(!a)return l;var u=o.weekStart;return l.map((function(e,t){return l[(t+(u||0))%7]}))},o=function(){return n.Ls[n.locale()]},s=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}(e.formats[t.toUpperCase()])},c=function(){var e=this;return{months:function(t){return t?t.format(`MMMM`):a(e,`months`)},monthsShort:function(t){return t?t.format(`MMM`):a(e,`monthsShort`,`months`,3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format(`dddd`):a(e,`weekdays`)},weekdaysMin:function(t){return t?t.format(`dd`):a(e,`weekdaysMin`,`weekdays`,2)},weekdaysShort:function(t){return t?t.format(`ddd`):a(e,`weekdaysShort`,`weekdays`,3)},longDateFormat:function(t){return s(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return c.bind(this)()},n.localeData=function(){var e=o();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(t){return s(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return a(o(),`months`)},n.monthsShort=function(){return a(o(),`monthsShort`,`months`,3)},n.weekdays=function(e){return a(o(),`weekdays`,null,null,e)},n.weekdaysShort=function(e){return a(o(),`weekdaysShort`,`weekdays`,3,e)},n.weekdaysMin=function(e){return a(o(),`weekdaysMin`,`weekdays`,2,e)}}}))})),nte=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekOfYear=r()})(e,(function(){var e=`week`,t=`year`;return function(n,r,i){var a=r.prototype;a.week=function(n){if(n===void 0&&(n=null),n!==null)return this.add(7*(n-this.week()),`day`);var r=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var a=i(this).startOf(t).add(1,t).date(r),o=i(this).endOf(e);if(a.isBefore(o))return 1}var s=i(this).startOf(t).date(r).startOf(e).subtract(1,`millisecond`),c=this.diff(s,e,!0);return c<0?i(this).startOf(`week`).week():Math.ceil(c)},a.weeks=function(e){return e===void 0&&(e=null),this.week(e)}}}))})),rte=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekYear=r()})(e,(function(){return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return t===1&&e===11?n+1:e===0&&t>=52?n-1:n}}}))})),ite=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),ate=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),YE=c(JE()),ote=c(ete()),ste=c(tte()),cte=c(nte()),lte=c(rte()),ute=c(ite()),dte=c(ate());YE.default.extend(dte.default),YE.default.extend(ute.default),YE.default.extend(ote.default),YE.default.extend(ste.default),YE.default.extend(cte.default),YE.default.extend(lte.default),YE.default.extend(function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=(e||``).replace(`Wo`,`wo`);return r.bind(this)(t)}});var fte={bn_BD:`bn-bd`,by_BY:`be`,en_GB:`en-gb`,en_US:`en`,fr_BE:`fr`,fr_CA:`fr-ca`,hy_AM:`hy-am`,kmr_IQ:`ku`,nl_BE:`nl-be`,pt_BR:`pt-br`,zh_CN:`zh-cn`,zh_HK:`zh-hk`,zh_TW:`zh-tw`},XE=function(e){return fte[e]||e.split(`_`)[0]},ZE=function(e){return!YE.default.isDayjs(e)||e instanceof YE.default?e:(0,YE.default)(e.valueOf())},QE={getNow:function(){var e=(0,YE.default)();return typeof e.tz==`function`?e.tz():e},getFixedDate:function(e){return(0,YE.default)(e,[`YYYY-M-DD`,`YYYY-MM-DD`])},getEndDate:function(e){return ZE(e).endOf(`month`)},getWeekDay:function(e){var t=ZE(e).locale(`en`);return t.weekday()+t.localeData().firstDayOfWeek()},getYear:function(e){return ZE(e).year()},getMonth:function(e){return ZE(e).month()},getDate:function(e){return ZE(e).date()},getHour:function(e){return ZE(e).hour()},getMinute:function(e){return ZE(e).minute()},getSecond:function(e){return ZE(e).second()},getMillisecond:function(e){return ZE(e).millisecond()},addYear:function(e,t){return ZE(e).add(t,`year`)},addMonth:function(e,t){return ZE(e).add(t,`month`)},addDate:function(e,t){return ZE(e).add(t,`day`)},setYear:function(e,t){return ZE(e).year(t)},setMonth:function(e,t){return ZE(e).month(t)},setDate:function(e,t){return ZE(e).date(t)},setHour:function(e,t){return ZE(e).hour(t)},setMinute:function(e,t){return ZE(e).minute(t)},setSecond:function(e,t){return ZE(e).second(t)},setMillisecond:function(e,t){return ZE(e).millisecond(t)},isAfter:function(e,t){return ZE(e).isAfter(ZE(t))},isValidate:function(e){return ZE(e).isValid()},locale:{getWeekFirstDay:function(e){return(0,YE.default)().locale(XE(e)).localeData().firstDayOfWeek()},getWeekFirstDate:function(e,t){return ZE(t).locale(XE(e)).weekday(0)},getWeek:function(e,t){return ZE(t).locale(XE(e)).week()},getShortWeekDays:function(e){return(0,YE.default)().locale(XE(e)).localeData().weekdaysMin()},getShortMonths:function(e){return(0,YE.default)().locale(XE(e)).localeData().monthsShort()},format:function(e,t,n){return ZE(t).locale(XE(e)).format(n)},parse:function(e,t,n){for(var r=XE(e),i=0;ie.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:`0`,r=String(e);r.lengthe.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=DD(S.useState([!1,!1]),2),i=r[0],a=r[1];return[S.useMemo(function(){return i.map(function(r,i){if(r)return!0;var a=e[i];return a?!!(!n[i]&&!a||a&&t(a,{activeIndex:i})):!1})},[e,i,t,n]),function(e,t){a(function(n){return hD(n,t,e)})}]}function PD(e){"@babel/helpers - typeof";return PD=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},PD(e)}function FD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ID(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&(o=t.addDate(o,-7)),o}function TO(e,t){var n=t.generateConfig,r=t.locale,i=t.format;return e?typeof i==`function`?i(e):n.locale.format(r.locale,e,i):``}function EO(e,t,n){var r=t,i=[`getHour`,`getMinute`,`getSecond`,`getMillisecond`];return[`setHour`,`setMinute`,`setSecond`,`setMillisecond`].forEach(function(t,a){r=n?e[t](r,e[i[a]](n)):e[t](r,0)}),r}function DO(e,t,n,r,i){return In(function(a,o){return!!(n&&n(a,o)||r&&e.isAfter(r,a)&&!xO(e,t,r,a,o.type)||i&&e.isAfter(a,i)&&!xO(e,t,i,a,o.type))})}function OO(e){"@babel/helpers - typeof";return OO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},OO(e)}function kO(e,t,n){return S.useMemo(function(){var r=mD(_D(e,t,n)),i=r[0],a=OO(i)===`object`&&i.type===`mask`?i.format:null;return[r.map(function(e){return typeof e==`string`||typeof e==`function`?e:e.format}),a]},[e,t,n])}function AO(e,t,n){return typeof e[0]==`function`||n?!0:t}function jO(e){"@babel/helpers - typeof";return jO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},jO(e)}function MO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function NO(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;return S.useMemo(function(){var n=e&&mD(e);return t&&n&&(n[1]=n[1]||n[0]),n},[e,t])}function ZO(e,t){var n=e.generateConfig,r=e.locale,i=e.picker,a=i===void 0?`date`:i,o=e.prefixCls,s=o===void 0?`rc-picker`:o,c=e.previewValue,l=c===void 0?`hover`:c,u=e.styles,d=u===void 0?{}:u,f=e.classNames,p=f===void 0?{}:f,m=e.order,h=m===void 0?!0:m,g=e.components,_=g===void 0?{}:g,v=e.inputRender,y=e.allowClear,b=e.clearIcon,x=e.needConfirm,C=e.multiple,w=e.format,T=e.inputReadOnly,E=e.disabledDate,D=e.minDate,O=e.maxDate,k=e.showTime,A=e.value,j=e.defaultValue,M=e.pickerValue,N=e.defaultPickerValue,P=XO(A),F=XO(j),I=XO(M),L=XO(N),R=a===`date`&&k?`datetime`:a,z=R===`time`||R===`datetime`,B=z||C,V=x??z,H=WO(sO(e),4),U=H[0],W=H[1],ee=H[2],te=H[3],ne=HD(r,W),re=S.useMemo(function(){return cO(R,ee,te,U,ne)},[R,ee,te,U,ne]),ie=S.useMemo(function(){return BO(BO({},e),{},{previewValue:l,prefixCls:s,locale:ne,picker:a,styles:d,classNames:p,order:h,components:BO({input:v},_),clearIcon:uO(s,y,b),showTime:re,value:P,defaultValue:F,pickerValue:I,defaultPickerValue:L},t?.())},[e]),ae=WO(kO(R,ne,w),2),G=ae[0],oe=ae[1],K=AO(G,T,C),se=DO(n,r,E,D,O),ce=LO(n,a,se,re);return[S.useMemo(function(){return BO(BO({},ie),{},{needConfirm:V,inputReadOnly:K,disabledDate:se})},[ie,V,K,se]),R,B,G,oe,ce]}function QO(e,t){return rk(e)||nk(e,t)||ek(e,t)||$O()}function $O(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ek(e,t){if(e){if(typeof e==`string`)return tk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tk(e,t)}}function tk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,i=ak(ik(n.every(function(e){return e})?!1:e,t||!1,r),2),a=i[0],o=i[1];function s(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!t.inherit||a)&&o(e,t.force)}return[a,s]}function fk(e){var t=S.useRef();return S.useImperativeHandle(e,function(){return{nativeElement:t.current?.nativeElement,focus:function(e){var n;(n=t.current)==null||n.focus(e)},blur:function(){var e;(e=t.current)==null||e.blur()}}}),t}function pk(e,t){return vk(e)||_k(e,t)||hk(e,t)||mk()}function mk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hk(e,t){if(e){if(typeof e==`string`)return gk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gk(e,t)}}function gk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=S.useRef(t);r.current=t,Bn(function(){if(e)r.current(e);else{var t=ri(function(){r.current(e)},n);return function(){ri.cancel(t)}}},[e])}function xk(e,t){return Ek(e)||Tk(e,t)||Ck(e,t)||Sk()}function Sk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ck(e,t){if(e){if(typeof e==`string`)return wk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wk(e,t)}}function wk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=xk(S.useState(0),2),i=r[0],a=r[1],o=xk(S.useState(!1),2),s=o[0],c=o[1],l=S.useRef([]),u=S.useRef(null),d=S.useRef(null),f=function(e){u.current=e};return bk(s||n,function(){s||(l.current=[],f(null))}),S.useEffect(function(){s&&l.current.push(i)},[s,i]),[s,function(e){c(e)},function(e){return e&&(d.current=e),d.current},i,a,function(n){var r=l.current,i=new Set(r.filter(function(e){return n[e]||t[e]})),a=+(r[r.length-1]===0);return i.size>=2||e[a]?null:a},l.current,f,function(e){return u.current===e}]}function Ok(e){"@babel/helpers - typeof";return Ok=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ok(e)}function kk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ak(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n8&&arguments[8]!==void 0?arguments[8]:Jk,l=arguments.length>9&&arguments[9]!==void 0?arguments[9]:Jk,u=arguments.length>10&&arguments[10]!==void 0?arguments[10]:Jk,d=arguments.length>11?arguments[11]:void 0,f=arguments.length>12?arguments[12]:void 0,p=arguments.length>13?arguments[13]:void 0,m=o===`time`,h=a||0,g=function(t){var r=e.getNow();return m&&(r=EO(e,r)),c[t]||n[t]||r},_=Vk(l,2),v=_[0],y=_[1],b=Vk(Hn(function(){return g(0)},v),2),x=b[0],C=b[1],w=Vk(Hn(function(){return g(1)},y),2),T=w[0],E=w[1],D=S.useMemo(function(){var t=[x,T][h];return m?t:EO(e,t,u[h])},[m,x,T,h,e,u]),O=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`panel`,a=[C,E][h];a(n);var s=[x,T];s[h]=n,d&&(!xO(e,t,x,s[0],o)||!xO(e,t,T,s[1],o))&&d(s,{source:i,range:h===1?`end`:`start`,mode:r})},k=function(n,r){if(s){var i={date:`month`,week:`month`,month:`year`,quarter:`year`}[o];if(i&&!xO(e,t,n,r,i)||o===`year`&&n&&Math.floor(e.getYear(n)/10)!==Math.floor(e.getYear(r)/10))return qk(e,o,r,-1)}return r},A=S.useRef(null);return zn(function(){if(i&&!c[h]){var t=m?null:e.getNow();if(A.current!==null&&A.current!==h?t=[x,T][h^1]:n[h]?t=h===0?n[0]:k(n[0],n[1]):n[h^1]&&(t=n[h^1]),t){f&&e.isAfter(f,t)&&(t=f);var r=s?qk(e,o,t,1):t;p&&e.isAfter(r,p)&&(t=s?qk(e,o,p,-1):p),O(t,`reset`)}}},[i,h,n[h]]),S.useEffect(function(){i?A.current=h:A.current=null},[i,h]),zn(function(){i&&c&&c[h]&&O(c[h],`reset`)},[i,h]),[D,O]}function Xk(e,t){return tA(e)||eA(e,t)||Qk(e,t)||Zk()}function Zk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qk(e,t){if(e){if(typeof e==`string`)return $k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $k(e,t)}}function $k(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:2,o=[],s=n>=1?n|0:1,c=e;c<=t;c+=s){var l=i.includes(c);(!l||!r)&&o.push({label:pD(c,a),value:c,disabled:l})}return o}function VA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t||{},i=r.use12Hours,a=r.hourStep,o=a===void 0?1:a,s=r.minuteStep,c=s===void 0?1:s,l=r.secondStep,u=l===void 0?1:l,d=r.millisecondStep,f=d===void 0?100:d,p=r.hideDisabledOptions,m=r.disabledTime,h=r.disabledHours,g=r.disabledMinutes,_=r.disabledSeconds,v=S.useMemo(function(){return n||e.getNow()},[n,e]),y=S.useCallback(function(e){var t=m?.(e)||{};return[t.disabledHours||h||zA,t.disabledMinutes||g||zA,t.disabledSeconds||_||zA,t.disabledMilliseconds||zA]},[m,h,g,_]),b=NA(S.useMemo(function(){return y(v)},[v,y]),4),x=b[0],C=b[1],w=b[2],T=b[3],E=S.useCallback(function(e,t,n,r){var a=BA(0,23,o,p,e());return[i?a.map(function(e){return kA(kA({},e),{},{label:pD(e.value%12||12,2)})}):a,function(e){return BA(0,59,c,p,t(e))},function(e,t){return BA(0,59,u,p,n(e,t))},function(e,t,n){return BA(0,999,f,p,r(e,t,n),3)}]},[p,o,i,f,c,u]),D=NA(S.useMemo(function(){return E(x,C,w,T)},[E,x,C,w,T]),4),O=D[0],k=D[1],A=D[2],j=D[3];return[function(t,n){var r=function(){return O},i=k,a=A,o=j;if(n){var s=NA(y(n),4),c=s[0],l=s[1],u=s[2],d=s[3],f=NA(E(c,l,u,d),4),p=f[0],m=f[1],h=f[2],g=f[3];r=function(){return p},i=m,a=h,o=g}return EA(t,r,i,a,o,e)},O,k,A,j]}function HA(e,t){return qA(e)||KA(e,t)||WA(e,t)||UA()}function UA(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WA(e,t){if(e){if(typeof e==`string`)return GA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GA(e,t)}}function GA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n a":{color:`inherit`,transition:`all ${c}`,"&:hover":{color:`inherit`},"&::after":{position:`absolute`,inset:0,content:`""`}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:`auto`,fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:{display:`flex`,margin:0,padding:`${Y(l)} ${Y(m)}`,color:e.colorText,fontWeight:`normal`,fontSize:u,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${c}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...Qc(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:`not-allowed`,"&:hover":{color:f,backgroundColor:h,cursor:`not-allowed`},a:{pointerEvents:`none`}},"&-divider":{height:1,margin:`${Y(e.marginXXS)} 0`,overflow:`hidden`,lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:`absolute`,insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:`0 !important`,color:e.colorIcon,fontSize:p,fontStyle:`normal`}}},[`${n}-item-group-list`]:{margin:`0 ${Y(e.marginXS)}`,padding:0,listStyle:`none`},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(m).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:`relative`},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:h,cursor:`not-allowed`}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[Hh(e,`slide-up`),Hh(e,`slide-down`),Mh(e,`move-up`),Mh(e,`move-down`),rg(e,`zoom-big`)]]},Qee=rl(`Dropdown`,e=>{let{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:i}=e,a=gs(e,{menuCls:`${i}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[Zee(a),Xee(a)]},e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...cw({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...ow(e)}),{resetStyle:!1}),KE=e=>{let{menu:t,arrow:n,prefixCls:r,children:i,trigger:a,disabled:o,dropdownRender:s,popupRender:c,getPopupContainer:l,overlayClassName:u,rootClassName:d,overlayStyle:f,open:p,onOpenChange:m,mouseEnterDelay:h=.15,mouseLeaveDelay:g=.1,autoAdjustOverflow:_=!0,placement:v=``,transitionName:y,classNames:b,styles:x,destroyPopupOnHide:C,destroyOnHidden:w}=e,{getPrefixCls:T,direction:E,getPopupContainer:D,className:O,style:k,classNames:A,styles:j}=li(`dropdown`),M={...e,mouseEnterDelay:h,mouseLeaveDelay:g,autoAdjustOverflow:_},[N,P]=Fd([A,b],[j,x],{props:M}),F={...k,...f,...P.root},I=c||s;Dr(`Dropdown`);let L=S.useMemo(()=>{let e=T();return y===void 0?v.includes(`top`)?`${e}-slide-down`:`${e}-slide-up`:y},[T,v,y]),R=S.useMemo(()=>v?v.includes(`Center`)?v.slice(0,v.indexOf(`Center`)):v:E===`rtl`?`bottomRight`:`bottomLeft`,[v,E]),z=T(`dropdown`,r),B=bf(z),[V,H]=Qee(z,B),[,U]=Kc(),W=S.Children.only(vd(i)?S.createElement(`span`,null,i):i),ee=Pp(W,{className:J(`${z}-trigger`,{[`${z}-rtl`]:E===`rtl`},W.props.className),disabled:W.props.disabled??o}),te=o?[]:a,ne=!!te?.includes(`contextMenu`),[re,ie]=Hn(!1,p),ae=In(e=>{m?.(e,{source:`trigger`}),ie(e)}),G=J(u,d,V,H,B,O,N.root,{[`${z}-rtl`]:E===`rtl`}),oe=hw({arrowPointAtCenter:hd(n)&&n.pointAtCenter,autoAdjustOverflow:_,offset:U.marginXXS,arrowWidth:n?U.sizePopupArrow:0,borderRadius:U.borderRadius}),K=In(()=>{t?.selectable&&t?.multiple||(m?.(!1,{source:`menu`}),ie(!1))}),se=()=>{let e=Sr(N,[`root`]),n=Sr(P,[`root`]),r;return t?.items&&(r=S.createElement(GE,{...t,classNames:{...e,subMenu:{...e}},styles:{...n,subMenu:{...n}}})),I&&(r=I(r)),r=S.Children.only(typeof r==`string`?S.createElement(`span`,null,r):r),S.createElement(PE,{prefixCls:`${z}-menu`,rootClassName:J(H,B),expandIcon:S.createElement(`span`,{className:`${z}-menu-submenu-arrow`},E===`rtl`?S.createElement(Hw,{className:`${z}-menu-submenu-arrow-icon`}):S.createElement(mg,{className:`${z}-menu-submenu-arrow-icon`})),mode:`vertical`,selectable:!1,onClick:K,validator:({mode:e})=>{}},r)},[ce,q]=Yd(`Dropdown`,F.zIndex),le=S.createElement(Zw,{alignPoint:ne,...Sr(e,[`rootClassName`,`onOpenChange`]),mouseEnterDelay:h,mouseLeaveDelay:g,visible:re,builtinPlacements:oe,arrow:!!n,overlayClassName:G,prefixCls:z,getPopupContainer:l||D,transitionName:L,trigger:te,overlay:se,placement:R,onVisibleChange:ae,overlayStyle:{...F,zIndex:ce},autoDestroy:w??C},ee);return ce&&(le=S.createElement(Ud.Provider,{value:q},le)),le},$ee=cx(KE,`align`,void 0,`dropdown`,e=>e);KE._InternalPanelDoNotUseOrYouWillBeFired=e=>S.createElement($ee,{...e},S.createElement(`span`,null));var qE=Zg,JE=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e){(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekday=r()})(e,(function(){return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,n=this.$W,r=(n{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_localeData=r()})(e,(function(){return function(e,t,n){var r=t.prototype,i=function(e){return e&&(e.indexOf?e:e.s)},a=function(e,t,n,r,a){var o=e.name?e:e.$locale(),s=i(o[t]),c=i(o[n]),l=s||c.map((function(e){return e.slice(0,r)}));if(!a)return l;var u=o.weekStart;return l.map((function(e,t){return l[(t+(u||0))%7]}))},o=function(){return n.Ls[n.locale()]},s=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}(e.formats[t.toUpperCase()])},c=function(){var e=this;return{months:function(t){return t?t.format(`MMMM`):a(e,`months`)},monthsShort:function(t){return t?t.format(`MMM`):a(e,`monthsShort`,`months`,3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format(`dddd`):a(e,`weekdays`)},weekdaysMin:function(t){return t?t.format(`dd`):a(e,`weekdaysMin`,`weekdays`,2)},weekdaysShort:function(t){return t?t.format(`ddd`):a(e,`weekdaysShort`,`weekdays`,3)},longDateFormat:function(t){return s(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return c.bind(this)()},n.localeData=function(){var e=o();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(t){return s(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return a(o(),`months`)},n.monthsShort=function(){return a(o(),`monthsShort`,`months`,3)},n.weekdays=function(e){return a(o(),`weekdays`,null,null,e)},n.weekdaysShort=function(e){return a(o(),`weekdaysShort`,`weekdays`,3,e)},n.weekdaysMin=function(e){return a(o(),`weekdaysMin`,`weekdays`,2,e)}}}))})),nte=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekOfYear=r()})(e,(function(){var e=`week`,t=`year`;return function(n,r,i){var a=r.prototype;a.week=function(n){if(n===void 0&&(n=null),n!==null)return this.add(7*(n-this.week()),`day`);var r=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var a=i(this).startOf(t).add(1,t).date(r),o=i(this).endOf(e);if(a.isBefore(o))return 1}var s=i(this).startOf(t).date(r).startOf(e).subtract(1,`millisecond`),c=this.diff(s,e,!0);return c<0?i(this).startOf(`week`).week():Math.ceil(c)},a.weeks=function(e){return e===void 0&&(e=null),this.week(e)}}}))})),rte=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekYear=r()})(e,(function(){return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return t===1&&e===11?n+1:e===0&&t>=52?n-1:n}}}))})),ite=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),ate=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),YE=c(JE()),ote=c(ete()),ste=c(tte()),cte=c(nte()),lte=c(rte()),ute=c(ite()),dte=c(ate());YE.default.extend(dte.default),YE.default.extend(ute.default),YE.default.extend(ote.default),YE.default.extend(ste.default),YE.default.extend(cte.default),YE.default.extend(lte.default),YE.default.extend(function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=(e||``).replace(`Wo`,`wo`);return r.bind(this)(t)}});var fte={bn_BD:`bn-bd`,by_BY:`be`,en_GB:`en-gb`,en_US:`en`,fr_BE:`fr`,fr_CA:`fr-ca`,hy_AM:`hy-am`,kmr_IQ:`ku`,nl_BE:`nl-be`,pt_BR:`pt-br`,zh_CN:`zh-cn`,zh_HK:`zh-hk`,zh_TW:`zh-tw`},XE=function(e){return fte[e]||e.split(`_`)[0]},ZE=function(e){return!YE.default.isDayjs(e)||e instanceof YE.default?e:(0,YE.default)(e.valueOf())},pte={getNow:function(){var e=(0,YE.default)();return typeof e.tz==`function`?e.tz():e},getFixedDate:function(e){return(0,YE.default)(e,[`YYYY-M-DD`,`YYYY-MM-DD`])},getEndDate:function(e){return ZE(e).endOf(`month`)},getWeekDay:function(e){var t=ZE(e).locale(`en`);return t.weekday()+t.localeData().firstDayOfWeek()},getYear:function(e){return ZE(e).year()},getMonth:function(e){return ZE(e).month()},getDate:function(e){return ZE(e).date()},getHour:function(e){return ZE(e).hour()},getMinute:function(e){return ZE(e).minute()},getSecond:function(e){return ZE(e).second()},getMillisecond:function(e){return ZE(e).millisecond()},addYear:function(e,t){return ZE(e).add(t,`year`)},addMonth:function(e,t){return ZE(e).add(t,`month`)},addDate:function(e,t){return ZE(e).add(t,`day`)},setYear:function(e,t){return ZE(e).year(t)},setMonth:function(e,t){return ZE(e).month(t)},setDate:function(e,t){return ZE(e).date(t)},setHour:function(e,t){return ZE(e).hour(t)},setMinute:function(e,t){return ZE(e).minute(t)},setSecond:function(e,t){return ZE(e).second(t)},setMillisecond:function(e,t){return ZE(e).millisecond(t)},isAfter:function(e,t){return ZE(e).isAfter(ZE(t))},isValidate:function(e){return ZE(e).isValid()},locale:{getWeekFirstDay:function(e){return(0,YE.default)().locale(XE(e)).localeData().firstDayOfWeek()},getWeekFirstDate:function(e,t){return ZE(t).locale(XE(e)).weekday(0)},getWeek:function(e,t){return ZE(t).locale(XE(e)).week()},getShortWeekDays:function(e){return(0,YE.default)().locale(XE(e)).localeData().weekdaysMin()},getShortMonths:function(e){return(0,YE.default)().locale(XE(e)).localeData().monthsShort()},format:function(e,t,n){return ZE(t).locale(XE(e)).format(n)},parse:function(e,t,n){for(var r=XE(e),i=0;ie.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:`0`,r=String(e);r.lengthe.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=ED(S.useState([!1,!1]),2),i=r[0],a=r[1];return[S.useMemo(function(){return i.map(function(r,i){if(r)return!0;var a=e[i];return a?!!(!n[i]&&!a||a&&t(a,{activeIndex:i})):!1})},[e,i,t,n]),function(e,t){a(function(n){return mD(n,t,e)})}]}function ND(e){"@babel/helpers - typeof";return ND=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ND(e)}function PD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function FD(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&(o=t.addDate(o,-7)),o}function wO(e,t){var n=t.generateConfig,r=t.locale,i=t.format;return e?typeof i==`function`?i(e):n.locale.format(r.locale,e,i):``}function TO(e,t,n){var r=t,i=[`getHour`,`getMinute`,`getSecond`,`getMillisecond`];return[`setHour`,`setMinute`,`setSecond`,`setMillisecond`].forEach(function(t,a){r=n?e[t](r,e[i[a]](n)):e[t](r,0)}),r}function EO(e,t,n,r,i){return In(function(a,o){return!!(n&&n(a,o)||r&&e.isAfter(r,a)&&!bO(e,t,r,a,o.type)||i&&e.isAfter(a,i)&&!bO(e,t,i,a,o.type))})}function DO(e){"@babel/helpers - typeof";return DO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},DO(e)}function OO(e,t,n){return S.useMemo(function(){var r=pD(gD(e,t,n)),i=r[0],a=DO(i)===`object`&&i.type===`mask`?i.format:null;return[r.map(function(e){return typeof e==`string`||typeof e==`function`?e:e.format}),a]},[e,t,n])}function kO(e,t,n){return typeof e[0]==`function`||n?!0:t}function AO(e){"@babel/helpers - typeof";return AO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},AO(e)}function jO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function MO(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;return S.useMemo(function(){var n=e&&pD(e);return t&&n&&(n[1]=n[1]||n[0]),n},[e,t])}function XO(e,t){var n=e.generateConfig,r=e.locale,i=e.picker,a=i===void 0?`date`:i,o=e.prefixCls,s=o===void 0?`rc-picker`:o,c=e.previewValue,l=c===void 0?`hover`:c,u=e.styles,d=u===void 0?{}:u,f=e.classNames,p=f===void 0?{}:f,m=e.order,h=m===void 0?!0:m,g=e.components,_=g===void 0?{}:g,v=e.inputRender,y=e.allowClear,b=e.clearIcon,x=e.needConfirm,C=e.multiple,w=e.format,T=e.inputReadOnly,E=e.disabledDate,D=e.minDate,O=e.maxDate,k=e.showTime,A=e.value,j=e.defaultValue,M=e.pickerValue,N=e.defaultPickerValue,P=YO(A),F=YO(j),I=YO(M),L=YO(N),R=a===`date`&&k?`datetime`:a,z=R===`time`||R===`datetime`,B=z||C,V=x??z,H=UO(oO(e),4),U=H[0],W=H[1],ee=H[2],te=H[3],ne=VD(r,W),re=S.useMemo(function(){return sO(R,ee,te,U,ne)},[R,ee,te,U,ne]),ie=S.useMemo(function(){return zO(zO({},e),{},{previewValue:l,prefixCls:s,locale:ne,picker:a,styles:d,classNames:p,order:h,components:zO({input:v},_),clearIcon:lO(s,y,b),showTime:re,value:P,defaultValue:F,pickerValue:I,defaultPickerValue:L},t?.())},[e]),ae=UO(OO(R,ne,w),2),G=ae[0],oe=ae[1],K=kO(G,T,C),se=EO(n,r,E,D,O),ce=IO(n,a,se,re);return[S.useMemo(function(){return zO(zO({},ie),{},{needConfirm:V,inputReadOnly:K,disabledDate:se})},[ie,V,K,se]),R,B,G,oe,ce]}function ZO(e,t){return nk(e)||tk(e,t)||$O(e,t)||QO()}function QO(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $O(e,t){if(e){if(typeof e==`string`)return ek(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ek(e,t)}}function ek(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,i=ik(rk(n.every(function(e){return e})?!1:e,t||!1,r),2),a=i[0],o=i[1];function s(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!t.inherit||a)&&o(e,t.force)}return[a,s]}function dk(e){var t=S.useRef();return S.useImperativeHandle(e,function(){return{nativeElement:t.current?.nativeElement,focus:function(e){var n;(n=t.current)==null||n.focus(e)},blur:function(){var e;(e=t.current)==null||e.blur()}}}),t}function fk(e,t){return _k(e)||gk(e,t)||mk(e,t)||pk()}function pk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mk(e,t){if(e){if(typeof e==`string`)return hk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hk(e,t)}}function hk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=S.useRef(t);r.current=t,Bn(function(){if(e)r.current(e);else{var t=ri(function(){r.current(e)},n);return function(){ri.cancel(t)}}},[e])}function bk(e,t){return Tk(e)||wk(e,t)||Sk(e,t)||xk()}function xk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sk(e,t){if(e){if(typeof e==`string`)return Ck(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ck(e,t)}}function Ck(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=bk(S.useState(0),2),i=r[0],a=r[1],o=bk(S.useState(!1),2),s=o[0],c=o[1],l=S.useRef([]),u=S.useRef(null),d=S.useRef(null),f=function(e){u.current=e};return yk(s||n,function(){s||(l.current=[],f(null))}),S.useEffect(function(){s&&l.current.push(i)},[s,i]),[s,function(e){c(e)},function(e){return e&&(d.current=e),d.current},i,a,function(n){var r=l.current,i=new Set(r.filter(function(e){return n[e]||t[e]})),a=+(r[r.length-1]===0);return i.size>=2||e[a]?null:a},l.current,f,function(e){return u.current===e}]}function Dk(e){"@babel/helpers - typeof";return Dk=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Dk(e)}function Ok(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kk(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n8&&arguments[8]!==void 0?arguments[8]:qk,l=arguments.length>9&&arguments[9]!==void 0?arguments[9]:qk,u=arguments.length>10&&arguments[10]!==void 0?arguments[10]:qk,d=arguments.length>11?arguments[11]:void 0,f=arguments.length>12?arguments[12]:void 0,p=arguments.length>13?arguments[13]:void 0,m=o===`time`,h=a||0,g=function(t){var r=e.getNow();return m&&(r=TO(e,r)),c[t]||n[t]||r},_=Bk(l,2),v=_[0],y=_[1],b=Bk(Hn(function(){return g(0)},v),2),x=b[0],C=b[1],w=Bk(Hn(function(){return g(1)},y),2),T=w[0],E=w[1],D=S.useMemo(function(){var t=[x,T][h];return m?t:TO(e,t,u[h])},[m,x,T,h,e,u]),O=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`panel`,a=[C,E][h];a(n);var s=[x,T];s[h]=n,d&&(!bO(e,t,x,s[0],o)||!bO(e,t,T,s[1],o))&&d(s,{source:i,range:h===1?`end`:`start`,mode:r})},k=function(n,r){if(s){var i={date:`month`,week:`month`,month:`year`,quarter:`year`}[o];if(i&&!bO(e,t,n,r,i)||o===`year`&&n&&Math.floor(e.getYear(n)/10)!==Math.floor(e.getYear(r)/10))return Kk(e,o,r,-1)}return r},A=S.useRef(null);return zn(function(){if(i&&!c[h]){var t=m?null:e.getNow();if(A.current!==null&&A.current!==h?t=[x,T][h^1]:n[h]?t=h===0?n[0]:k(n[0],n[1]):n[h^1]&&(t=n[h^1]),t){f&&e.isAfter(f,t)&&(t=f);var r=s?Kk(e,o,t,1):t;p&&e.isAfter(r,p)&&(t=s?Kk(e,o,p,-1):p),O(t,`reset`)}}},[i,h,n[h]]),S.useEffect(function(){i?A.current=h:A.current=null},[i,h]),zn(function(){i&&c&&c[h]&&O(c[h],`reset`)},[i,h]),[D,O]}function Yk(e,t){return eA(e)||$k(e,t)||Zk(e,t)||Xk()}function Xk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zk(e,t){if(e){if(typeof e==`string`)return Qk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qk(e,t)}}function Qk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:2,o=[],s=n>=1?n|0:1,c=e;c<=t;c+=s){var l=i.includes(c);(!l||!r)&&o.push({label:fD(c,a),value:c,disabled:l})}return o}function BA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t||{},i=r.use12Hours,a=r.hourStep,o=a===void 0?1:a,s=r.minuteStep,c=s===void 0?1:s,l=r.secondStep,u=l===void 0?1:l,d=r.millisecondStep,f=d===void 0?100:d,p=r.hideDisabledOptions,m=r.disabledTime,h=r.disabledHours,g=r.disabledMinutes,_=r.disabledSeconds,v=S.useMemo(function(){return n||e.getNow()},[n,e]),y=S.useCallback(function(e){var t=m?.(e)||{};return[t.disabledHours||h||RA,t.disabledMinutes||g||RA,t.disabledSeconds||_||RA,t.disabledMilliseconds||RA]},[m,h,g,_]),b=MA(S.useMemo(function(){return y(v)},[v,y]),4),x=b[0],C=b[1],w=b[2],T=b[3],E=S.useCallback(function(e,t,n,r){var a=zA(0,23,o,p,e());return[i?a.map(function(e){return OA(OA({},e),{},{label:fD(e.value%12||12,2)})}):a,function(e){return zA(0,59,c,p,t(e))},function(e,t){return zA(0,59,u,p,n(e,t))},function(e,t,n){return zA(0,999,f,p,r(e,t,n),3)}]},[p,o,i,f,c,u]),D=MA(S.useMemo(function(){return E(x,C,w,T)},[E,x,C,w,T]),4),O=D[0],k=D[1],A=D[2],j=D[3];return[function(t,n){var r=function(){return O},i=k,a=A,o=j;if(n){var s=MA(y(n),4),c=s[0],l=s[1],u=s[2],d=s[3],f=MA(E(c,l,u,d),4),p=f[0],m=f[1],h=f[2],g=f[3];r=function(){return p},i=m,a=h,o=g}return TA(t,r,i,a,o,e)},O,k,A,j]}function VA(e,t){return KA(e)||GA(e,t)||UA(e,t)||HA()}function HA(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UA(e,t){if(e){if(typeof e==`string`)return WA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WA(e,t)}}function WA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;fe(e),_?.(e),t&&pe(e)},he=function(e,t){ie(e),t&&me(t),pe(t,e)},ge=function(e){if(le(e),me(e),re!==x){var t=[`decade`,`year`],n=[].concat(t,[`month`]),r={quarter:[].concat(t,[`quarter`]),week:[].concat(FN(n),[`week`]),date:[].concat(FN(n),[`date`])}[x]||n,i=r[r.indexOf(re)+1];i&&he(i,e)}},_e=S.useMemo(function(){var e,t;if(Array.isArray(T)){var n=zN(T,2);e=n[0],t=n[1]}else e=T;return!e&&!t?null:(e||=t,t||=e,a.isAfter(e,t)?[t,e]:[e,t])},[T,a]),ve=ED(E,D,O),ye=A[ae]||GN[ae]||Nj,be=S.useMemo(function(){return{classNames:P?.popup??n??{},styles:F?.popup??r??{}}},[P,n,F,r]),xe=S.useContext(oj),Se=S.useMemo(function(){return jN(jN({},xe),{},{hideHeader:j})},[xe,j]),Ce=`${I}-panel`,we=gD(e,[`showWeek`,`prevIcon`,`nextIcon`,`superPrevIcon`,`superNextIcon`,`disabledDate`,`minDate`,`maxDate`,`onHover`]);return S.createElement(nj.Provider,{value:be},S.createElement(oj.Provider,{value:Se},S.createElement(`div`,{ref:L,tabIndex:l,className:J(Ce,MN({},`${Ce}-rtl`,o===`rtl`))},S.createElement(ye,kN({},we,{showTime:ee,prefixCls:I,locale:U,generateConfig:a,onModeChange:he,pickerValue:de,onPickerValueChange:function(e){me(e,!0)},value:ce[0],onSelect:ge,values:ce,cellRender:ve,hoverRangeValue:_e,hoverValue:w})))))}var qN=S.memo(S.forwardRef(KN));function JN(e){"@babel/helpers - typeof";return JN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},JN(e)}function YN(){return YN=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jP(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function MP(e){var t=e.icon,n=e.type,r=AP(e,DP),i=S.useContext(eD),a=i.prefixCls,o=i.classNames,s=i.styles;return t?S.createElement(`span`,kP({className:J(`${a}-${n}`,o.suffix),style:s.suffix},r),t):null}function NP(e){var t=e.onClear,n=AP(e,OP);return S.createElement(MP,kP({},n,{type:`clear`,role:`button`,onMouseDown:function(e){e.preventDefault()},onClick:function(e){e.stopPropagation(),t()}}))}function PP(e){"@babel/helpers - typeof";return PP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},PP(e)}function FP(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function IP(e,t){for(var n=0;n=a&&e<=o)return r;var s=Math.min(Math.abs(e-a),Math.abs(e-o));se.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var aF=S.forwardRef(function(e,t){var n=e.className,r=e.active,i=e.showActiveCls,a=i===void 0?!0:i,o=e.suffixIcon,s=e.format,c=e.validateFormat,l=e.onChange;e.onInput;var u=e.helped,d=e.onHelp,f=e.onSubmit,p=e.onKeyDown,m=e.preserveInvalidOnBlur,h=m===void 0?!1:m,g=e.invalid,_=e.clearIcon,v=rF(e,KP),y=e.value,b=e.onFocus,x=e.onBlur,C=e.onMouseUp,w=S.useContext(eD),T=w.prefixCls,E=w.input,D=E===void 0?`input`:E,O=w.classNames,k=w.styles,A=`${T}-input`,j=ZP(S.useState(!1),2),M=j[0],N=j[1],P=ZP(S.useState(y),2),F=P[0],I=P[1],L=ZP(S.useState(``),2),R=L[0],z=L[1],B=ZP(S.useState(null),2),V=B[0],H=B[1],U=ZP(S.useState(null),2),W=U[0],ee=U[1],te=F||``;S.useEffect(function(){I(y)},[y]);var ne=S.useRef(null),re=S.useRef(null),ie=S.useRef(!1);S.useImperativeHandle(t,function(){return{nativeElement:ne.current,inputElement:re.current,focus:function(e){re.current.focus(e)},blur:function(){re.current.blur()}}});var ae=S.useMemo(function(){return new UP(s||``)},[s]),G=ZP(S.useMemo(function(){return u?[0,0]:ae.getSelection(V)},[ae,V,u]),2),oe=G[0],K=G[1],se=function(e){e&&e!==s&&e!==y&&d()},ce=In(function(e){c(e)&&l(e),I(e),se(e)}),q=function(e){if(!s){var t=e.target.value;se(t),I(t),l(t)}},le=function(e){if(ie.current){e.preventDefault();return}var t=e.clipboardData.getData(`text`);c(t)&&ce(t)},ue=function(){ie.current=!0},de=function(e){var t=e.target.selectionStart;H(ae.getMaskCellIndex(t)),ee({}),C?.(e),ie.current=!1},fe=function(e){N(!0),H(0),z(``),b(e)},pe=function(e){x(e)},me=function(e){N(!1),pe(e)};bk(r,function(){!r&&!h&&I(y)});var he=function(e){e.key===`Enter`&&c(te)&&f(),p?.(e)},ge=function(e){if(ie.current){e.preventDefault();return}he(e);var t=e.key,n=null,r=null,i=K-oe,a=s.slice(oe,K),o=function(e){H(function(t){var n=t+e;return n=Math.max(n,0),n=Math.min(n,ae.size()-1),n})},c=function(e){var t=ZP(WP(a),3),n=t[0],r=t[1],i=t[2],o=te.slice(oe,K),s=Number(o);if(isNaN(s))return String(i||(e>0?n:r));var c=s+e,l=r-n+1;return String(n+(l+c-n)%l)};switch(t){case`Backspace`:case`Delete`:n=``,r=a;break;case`ArrowLeft`:n=``,o(-1);break;case`ArrowRight`:n=``,o(1);break;case`ArrowUp`:n=``,r=c(1);break;case`ArrowDown`:n=``,r=c(-1);break;default:isNaN(Number(t))||(n=R+t,r=n);break}n!==null&&(z(n),n.length>=i&&(o(1),z(``))),r!==null&&ce((te.slice(0,oe)+pD(r,i)+te.slice(K)).slice(0,s.length)),ee({})},_e=S.useRef();zn(function(){if(!(!M||!s||ie.current)){if(!ae.match(te)){ce(s);return}return re.current.setSelectionRange(oe,K),_e.current=ri(function(){re.current.setSelectionRange(oe,K)}),function(){ri.cancel(_e.current)}}},[ae,s,M,te,V,oe,K,W,ce]);var ve=s?{onFocus:fe,onBlur:me,onKeyDown:ge,onMouseDown:ue,onMouseUp:de,onPaste:le}:{};return S.createElement(`div`,{ref:ne,className:J(A,JP(JP({},`${A}-active`,r&&a),`${A}-placeholder`,u),n)},S.createElement(D,qP({ref:re,"aria-invalid":g,autoComplete:`off`},v,{onKeyDown:he,onBlur:pe},ve,{value:te,onChange:q,className:O.input,style:k.input})),S.createElement(MP,{type:`suffix`,icon:o}),_)}),oF=`id.prefix.clearIcon.suffixIcon.separator.activeIndex.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.value.onChange.onSubmit.onInputChange.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onActiveInfo.placement.onMouseDown.required.aria-required.autoFocus.tabIndex`.split(`.`),sF=[`index`];function cF(){return cF=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function CF(e,t){var n=e.id,r=e.prefix,i=e.clearIcon,a=e.suffixIcon,o=e.separator,s=o===void 0?`~`:o,c=e.activeIndex;e.activeHelp,e.allHelp;var l=e.focused;e.onFocus,e.onBlur,e.onKeyDown,e.locale,e.generateConfig;var u=e.placeholder,d=e.className,f=e.style,p=e.onClick,m=e.onClear,h=e.value;e.onChange,e.onSubmit,e.onInputChange,e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var g=e.disabled,_=e.invalid;e.inputReadOnly;var v=e.direction;e.onOpenChange;var y=e.onActiveInfo;e.placement;var b=e.onMouseDown;e.required,e[`aria-required`];var x=e.autoFocus,C=e.tabIndex,w=xF(e,oF),T=v===`rtl`,E=S.useContext(eD),D=E.prefixCls,O=E.classNames,k=E.styles,A=S.useMemo(function(){if(typeof n==`string`)return[n];var e=n||{};return[e.start,e.end]},[n]),j=S.useRef(),M=S.useRef(),N=S.useRef(),P=function(e){return[M,N][e]?.current};S.useImperativeHandle(t,function(){return{nativeElement:j.current,focus:function(e){if(bF(e)===`object`){var t,n=e||{},r=n.index,i=r===void 0?0:r,a=xF(n,sF);(t=P(i))==null||t.focus(a)}else{var o;(o=P(e??0))==null||o.focus()}},blur:function(){var e,t;(e=P(0))==null||e.blur(),(t=P(1))==null||t.blur()}}});var F=EP(w),I=S.useMemo(function(){return Array.isArray(u)?u:[u,u]},[u]),L=mF(wP(uF(uF({},e),{},{id:A,placeholder:I})),1)[0],R=mF(S.useState({position:`absolute`,width:0}),2),z=R[0],B=R[1],V=In(function(){var e=P(c);if(e){var t=e.nativeElement.getBoundingClientRect(),n=j.current.getBoundingClientRect(),r=t.left-n.left;B(function(e){return uF(uF({},e),{},{width:t.width,left:r})}),y([t.left,t.right,n.width])}});S.useEffect(function(){V()},[c]);var H=i&&(h[0]&&!g[0]||h[1]&&!g[1]),U=x&&!g[0],W=x&&!U&&!g[1];return S.createElement(Wr,{onResize:V},S.createElement(`div`,cF({},F,{className:J(D,`${D}-range`,dF(dF(dF(dF({},`${D}-focused`,l),`${D}-disabled`,g.every(function(e){return e})),`${D}-invalid`,_.some(function(e){return e})),`${D}-rtl`,T),d),style:f,ref:j,onClick:p,onMouseDown:function(e){var t=e.target;t!==M.current.inputElement&&t!==N.current.inputElement&&e.preventDefault(),b?.(e)}}),r&&S.createElement(`div`,{className:J(`${D}-prefix`,O.prefix),style:k.prefix},r),S.createElement(aF,cF({ref:M},L(0),{className:`${D}-input-start`,autoFocus:U,tabIndex:C,"date-range":`start`})),S.createElement(`div`,{className:`${D}-range-separator`},s),S.createElement(aF,cF({ref:N},L(1),{className:`${D}-input-end`,autoFocus:W,tabIndex:C,"date-range":`end`})),S.createElement(`div`,{className:`${D}-active-bar`,style:z}),S.createElement(MP,{type:`suffix`,icon:a}),H&&S.createElement(NP,{icon:i,onClear:m})))}var wF=S.forwardRef(CF);function TF(e){"@babel/helpers - typeof";return TF=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},TF(e)}function EF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function DF(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;fe(e),_?.(e),t&&pe(e)},he=function(e,t){ie(e),t&&me(t),pe(t,e)},ge=function(e){if(le(e),me(e),re!==x){var t=[`decade`,`year`],n=[].concat(t,[`month`]),r={quarter:[].concat(t,[`quarter`]),week:[].concat(FN(n),[`week`]),date:[].concat(FN(n),[`date`])}[x]||n,i=r[r.indexOf(re)+1];i&&he(i,e)}},_e=S.useMemo(function(){var e,t;if(Array.isArray(T)){var n=zN(T,2);e=n[0],t=n[1]}else e=T;return!e&&!t?null:(e||=t,t||=e,a.isAfter(e,t)?[t,e]:[e,t])},[T,a]),ve=TD(E,D,O),ye=A[ae]||GN[ae]||Mj,be=S.useMemo(function(){return{classNames:P?.popup??n??{},styles:F?.popup??r??{}}},[P,n,F,r]),xe=S.useContext(aj),Se=S.useMemo(function(){return jN(jN({},xe),{},{hideHeader:j})},[xe,j]),Ce=`${I}-panel`,we=hD(e,[`showWeek`,`prevIcon`,`nextIcon`,`superPrevIcon`,`superNextIcon`,`disabledDate`,`minDate`,`maxDate`,`onHover`]);return S.createElement(tj.Provider,{value:be},S.createElement(aj.Provider,{value:Se},S.createElement(`div`,{ref:L,tabIndex:l,className:J(Ce,MN({},`${Ce}-rtl`,o===`rtl`))},S.createElement(ye,kN({},we,{showTime:ee,prefixCls:I,locale:U,generateConfig:a,onModeChange:he,pickerValue:de,onPickerValueChange:function(e){me(e,!0)},value:ce[0],onSelect:ge,values:ce,cellRender:ve,hoverRangeValue:_e,hoverValue:w})))))}var qN=S.memo(S.forwardRef(KN));function JN(e){"@babel/helpers - typeof";return JN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},JN(e)}function YN(){return YN=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jP(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function MP(e){var t=e.icon,n=e.type,r=AP(e,DP),i=S.useContext($E),a=i.prefixCls,o=i.classNames,s=i.styles;return t?S.createElement(`span`,kP({className:J(`${a}-${n}`,o.suffix),style:s.suffix},r),t):null}function NP(e){var t=e.onClear,n=AP(e,OP);return S.createElement(MP,kP({},n,{type:`clear`,role:`button`,onMouseDown:function(e){e.preventDefault()},onClick:function(e){e.stopPropagation(),t()}}))}function PP(e){"@babel/helpers - typeof";return PP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},PP(e)}function FP(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function IP(e,t){for(var n=0;n=a&&e<=o)return r;var s=Math.min(Math.abs(e-a),Math.abs(e-o));se.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var aF=S.forwardRef(function(e,t){var n=e.className,r=e.active,i=e.showActiveCls,a=i===void 0?!0:i,o=e.suffixIcon,s=e.format,c=e.validateFormat,l=e.onChange;e.onInput;var u=e.helped,d=e.onHelp,f=e.onSubmit,p=e.onKeyDown,m=e.preserveInvalidOnBlur,h=m===void 0?!1:m,g=e.invalid,_=e.clearIcon,v=rF(e,KP),y=e.value,b=e.onFocus,x=e.onBlur,C=e.onMouseUp,w=S.useContext($E),T=w.prefixCls,E=w.input,D=E===void 0?`input`:E,O=w.classNames,k=w.styles,A=`${T}-input`,j=ZP(S.useState(!1),2),M=j[0],N=j[1],P=ZP(S.useState(y),2),F=P[0],I=P[1],L=ZP(S.useState(``),2),R=L[0],z=L[1],B=ZP(S.useState(null),2),V=B[0],H=B[1],U=ZP(S.useState(null),2),W=U[0],ee=U[1],te=F||``;S.useEffect(function(){I(y)},[y]);var ne=S.useRef(null),re=S.useRef(null),ie=S.useRef(!1);S.useImperativeHandle(t,function(){return{nativeElement:ne.current,inputElement:re.current,focus:function(e){re.current.focus(e)},blur:function(){re.current.blur()}}});var ae=S.useMemo(function(){return new UP(s||``)},[s]),G=ZP(S.useMemo(function(){return u?[0,0]:ae.getSelection(V)},[ae,V,u]),2),oe=G[0],K=G[1],se=function(e){e&&e!==s&&e!==y&&d()},ce=In(function(e){c(e)&&l(e),I(e),se(e)}),q=function(e){if(!s){var t=e.target.value;se(t),I(t),l(t)}},le=function(e){if(ie.current){e.preventDefault();return}var t=e.clipboardData.getData(`text`);c(t)&&ce(t)},ue=function(){ie.current=!0},de=function(e){var t=e.target.selectionStart;H(ae.getMaskCellIndex(t)),ee({}),C?.(e),ie.current=!1},fe=function(e){N(!0),H(0),z(``),b(e)},pe=function(e){x(e)},me=function(e){N(!1),pe(e)};yk(r,function(){!r&&!h&&I(y)});var he=function(e){e.key===`Enter`&&c(te)&&f(),p?.(e)},ge=function(e){if(ie.current){e.preventDefault();return}he(e);var t=e.key,n=null,r=null,i=K-oe,a=s.slice(oe,K),o=function(e){H(function(t){var n=t+e;return n=Math.max(n,0),n=Math.min(n,ae.size()-1),n})},c=function(e){var t=ZP(WP(a),3),n=t[0],r=t[1],i=t[2],o=te.slice(oe,K),s=Number(o);if(isNaN(s))return String(i||(e>0?n:r));var c=s+e,l=r-n+1;return String(n+(l+c-n)%l)};switch(t){case`Backspace`:case`Delete`:n=``,r=a;break;case`ArrowLeft`:n=``,o(-1);break;case`ArrowRight`:n=``,o(1);break;case`ArrowUp`:n=``,r=c(1);break;case`ArrowDown`:n=``,r=c(-1);break;default:isNaN(Number(t))||(n=R+t,r=n);break}n!==null&&(z(n),n.length>=i&&(o(1),z(``))),r!==null&&ce((te.slice(0,oe)+fD(r,i)+te.slice(K)).slice(0,s.length)),ee({})},_e=S.useRef();zn(function(){if(!(!M||!s||ie.current)){if(!ae.match(te)){ce(s);return}return re.current.setSelectionRange(oe,K),_e.current=ri(function(){re.current.setSelectionRange(oe,K)}),function(){ri.cancel(_e.current)}}},[ae,s,M,te,V,oe,K,W,ce]);var ve=s?{onFocus:fe,onBlur:me,onKeyDown:ge,onMouseDown:ue,onMouseUp:de,onPaste:le}:{};return S.createElement(`div`,{ref:ne,className:J(A,JP(JP({},`${A}-active`,r&&a),`${A}-placeholder`,u),n)},S.createElement(D,qP({ref:re,"aria-invalid":g,autoComplete:`off`},v,{onKeyDown:he,onBlur:pe},ve,{value:te,onChange:q,className:O.input,style:k.input})),S.createElement(MP,{type:`suffix`,icon:o}),_)}),oF=`id.prefix.clearIcon.suffixIcon.separator.activeIndex.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.value.onChange.onSubmit.onInputChange.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onActiveInfo.placement.onMouseDown.required.aria-required.autoFocus.tabIndex`.split(`.`),sF=[`index`];function cF(){return cF=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function CF(e,t){var n=e.id,r=e.prefix,i=e.clearIcon,a=e.suffixIcon,o=e.separator,s=o===void 0?`~`:o,c=e.activeIndex;e.activeHelp,e.allHelp;var l=e.focused;e.onFocus,e.onBlur,e.onKeyDown,e.locale,e.generateConfig;var u=e.placeholder,d=e.className,f=e.style,p=e.onClick,m=e.onClear,h=e.value;e.onChange,e.onSubmit,e.onInputChange,e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var g=e.disabled,_=e.invalid;e.inputReadOnly;var v=e.direction;e.onOpenChange;var y=e.onActiveInfo;e.placement;var b=e.onMouseDown;e.required,e[`aria-required`];var x=e.autoFocus,C=e.tabIndex,w=xF(e,oF),T=v===`rtl`,E=S.useContext($E),D=E.prefixCls,O=E.classNames,k=E.styles,A=S.useMemo(function(){if(typeof n==`string`)return[n];var e=n||{};return[e.start,e.end]},[n]),j=S.useRef(),M=S.useRef(),N=S.useRef(),P=function(e){return[M,N][e]?.current};S.useImperativeHandle(t,function(){return{nativeElement:j.current,focus:function(e){if(bF(e)===`object`){var t,n=e||{},r=n.index,i=r===void 0?0:r,a=xF(n,sF);(t=P(i))==null||t.focus(a)}else{var o;(o=P(e??0))==null||o.focus()}},blur:function(){var e,t;(e=P(0))==null||e.blur(),(t=P(1))==null||t.blur()}}});var F=EP(w),I=S.useMemo(function(){return Array.isArray(u)?u:[u,u]},[u]),L=mF(wP(uF(uF({},e),{},{id:A,placeholder:I})),1)[0],R=mF(S.useState({position:`absolute`,width:0}),2),z=R[0],B=R[1],V=In(function(){var e=P(c);if(e){var t=e.nativeElement.getBoundingClientRect(),n=j.current.getBoundingClientRect(),r=t.left-n.left;B(function(e){return uF(uF({},e),{},{width:t.width,left:r})}),y([t.left,t.right,n.width])}});S.useEffect(function(){V()},[c]);var H=i&&(h[0]&&!g[0]||h[1]&&!g[1]),U=x&&!g[0],W=x&&!U&&!g[1];return S.createElement(Wr,{onResize:V},S.createElement(`div`,cF({},F,{className:J(D,`${D}-range`,dF(dF(dF(dF({},`${D}-focused`,l),`${D}-disabled`,g.every(function(e){return e})),`${D}-invalid`,_.some(function(e){return e})),`${D}-rtl`,T),d),style:f,ref:j,onClick:p,onMouseDown:function(e){var t=e.target;t!==M.current.inputElement&&t!==N.current.inputElement&&e.preventDefault(),b?.(e)}}),r&&S.createElement(`div`,{className:J(`${D}-prefix`,O.prefix),style:k.prefix},r),S.createElement(aF,cF({ref:M},L(0),{className:`${D}-input-start`,autoFocus:U,tabIndex:C,"date-range":`start`})),S.createElement(`div`,{className:`${D}-range-separator`},s),S.createElement(aF,cF({ref:N},L(1),{className:`${D}-input-end`,autoFocus:W,tabIndex:C,"date-range":`end`})),S.createElement(`div`,{className:`${D}-active-bar`,style:z}),S.createElement(MP,{type:`suffix`,icon:a}),H&&S.createElement(NP,{icon:i,onClear:m})))}var wF=S.forwardRef(CF);function TF(e){"@babel/helpers - typeof";return TF=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},TF(e)}function EF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function DF(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0&&G.current.focus({index:n})}ue(!0),ae?.(e)},Qe=function(){Be(null),ue(!1,{force:!0})},$e=UF(S.useState(null),2),et=$e[0],tt=$e[1],nt=UF(S.useState(null),2),rt=nt[0],it=nt[1],at=S.useMemo(function(){return rt||_e},[_e,rt]);S.useEffect(function(){q||it(null)},[q]);var ot=UF(S.useState([0,0,0]),2),st=ot[0],ct=ot[1],lt=function(e,t){p===`hover`&&(it(e),tt(t))},ut=yk(W,ee),dt=function(e){lt(e,`preset`)},ft=function(e){Be(e)&&(xe(`preset-click`),ue(!1,{force:!0}))},pt=function(e){Xe(e)},mt=function(e){lt(e?Ye(e,Se):null,`cell`)},ht=function(e){ue(!0),Oe(e)},gt=function(){xe(`panel`)},_t=function(e){he(hD(_e,Se,e)),!g&&!a&&i===Fe&&Xe(e)},vt=function(){ue(!1)},yt=ED(ne,re,ie,XF(Se)),bt=_e[Se]||null,xt=In(function(e){return c(e,{activeIndex:Se})}),St=S.useMemo(function(){var e=Vu(r,!1);return Sr(r,[].concat(PF(Object.keys(e)),[`onChange`,`onCalendarChange`,`style`,`className`,`onPanelChange`,`disabledTime`,`classNames`,`styles`]))},[r]),Ct=S.createElement(_P,NF({},St,{showNow:Le,showTime:Ae,range:!0,multiplePanel:Ie,activeInfo:st,disabledDate:Ve,onFocus:ht,onBlur:ke,onPanelMouseDown:gt,picker:k,mode:Pe,internalMode:Fe,onPanelChange:Je,format:s,value:bt,isInvalid:xt,onChange:null,onSelect:_t,pickerValue:Ke,defaultOpenValue:mD(M?.defaultOpenValue)[Se],onPickerValueChange:qe,hoverValue:at,onHover:mt,needConfirm:g,onSubmit:Xe,onOk:ge,presets:ut,onPresetHover:dt,onPresetSubmit:ft,onNow:pt,cellRender:yt,classNames:K,styles:se})),wt=function(e,t){he(Ye(e,t))},Tt=function(){xe(`input`)},Et=function(e,t){var n=Te.length,r=Te[n-1];if(n&&r!==t&&g&&!y[r]&&!De(r)&&_e[r]){G.current.focus({index:r});return}xe(`input`),ue(!0,{inherit:!0}),Se!==t&&q&&!g&&a&&Xe(null,!0),Ce(t),Oe(e,t)},Dt=function(e,t){ue(!1),!g&&xe()===`input`&&ze(Se,we(_e)===null),ke(e,t)},Ot=function(e,t){e.key===`Tab`&&Xe(null,!0),_?.(e,t)},kt=S.useMemo(function(){return{prefixCls:l,locale:D,generateConfig:O,button:te.button,input:te.input,classNames:K,styles:se}},[l,D,O,te.button,te.input,K,se]);return zn(function(){q&&Se!==void 0&&Je(null,k,!1)},[q,Se,k]),zn(function(){var e=xe();!q&&e===`input`&&(ue(!1),Xe(null,!0)),!q&&a&&!g&&e===`panel`&&(ue(!0),Xe())},[q]),S.createElement(eD.Provider,{value:kt},S.createElement(oD,NF({},yD(r),{popupElement:Ct,popupStyle:se.popup.root,popupClassName:J(u,K.popup.root),visible:q,onClose:vt,range:!0}),S.createElement(wF,NF({},r,{ref:G,className:J(r.className,u,K.root),style:zF(zF({},se.root),r.style),suffixIcon:V,activeIndex:ye||q?Se:null,activeHelp:!!rt,allHelp:!!rt&&et===`preset`,focused:ye,onFocus:Et,onBlur:Dt,onKeyDown:Ot,onSubmit:Xe,value:at,maskFormat:s,onChange:wt,onInputChange:Tt,format:o,inputReadOnly:B,disabled:v,open:q,onOpenChange:ue,onClick:Ze,onClear:Qe,invalid:Ue,onInvalid:We,onActiveInfo:ct}))))}var QF=S.forwardRef(ZF);function $F(e){var t=e.prefixCls,n=e.value,r=e.onRemove,i=e.removeIcon,a=i===void 0?`×`:i,o=e.formatDate,s=e.disabled,c=e.maxTagCount,l=e.placeholder,u=`${t}-selector`,d=`${t}-selection`,f=`${d}-overflow`;function p(e,t){return S.createElement(`span`,{className:J(`${d}-item`),title:typeof e==`string`?e:null},S.createElement(`span`,{className:`${d}-item-content`},e),!s&&t&&S.createElement(`span`,{onMouseDown:function(e){e.preventDefault()},onClick:t,className:`${d}-item-remove`},a))}function m(e){return p(o(e),function(t){t&&t.stopPropagation(),r(e)})}function h(e){return p(`+ ${e.length} ...`)}return S.createElement(`div`,{className:u},S.createElement(Qx,{prefixCls:f,data:n,renderItem:m,renderRest:h,itemKey:function(e){return o(e)},maxCount:c}),!n.length&&S.createElement(`span`,{className:`${t}-selection-placeholder`},l))}function eI(e){"@babel/helpers - typeof";return eI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},eI(e)}var tI=`id.open.prefix.clearIcon.suffixIcon.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.internalPicker.value.onChange.onSubmit.onInputChange.multiple.maxTagCount.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onMouseDown.required.aria-required.autoFocus.tabIndex.removeIcon`.split(`.`);function nI(){return nI=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hI(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function gI(e,t){e.id;var n=e.open,r=e.prefix,i=e.clearIcon,a=e.suffixIcon;e.activeHelp,e.allHelp;var o=e.focused;e.onFocus,e.onBlur,e.onKeyDown;var s=e.locale,c=e.generateConfig,l=e.placeholder,u=e.className,d=e.style,f=e.onClick,p=e.onClear,m=e.internalPicker,h=e.value,g=e.onChange,_=e.onSubmit;e.onInputChange;var v=e.multiple,y=e.maxTagCount;e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var b=e.disabled,x=e.invalid;e.inputReadOnly;var C=e.direction;e.onOpenChange;var w=e.onMouseDown;e.required,e[`aria-required`];var T=e.autoFocus,E=e.tabIndex,D=e.removeIcon,O=mI(e,tI),k=C===`rtl`,A=S.useContext(eD),j=A.prefixCls,M=A.classNames,N=A.styles,P=S.useRef(),F=S.useRef();S.useImperativeHandle(t,function(){return{nativeElement:P.current,focus:function(e){var t;(t=F.current)==null||t.focus(e)},blur:function(){var e;(e=F.current)==null||e.blur()}}});var I=EP(O),L=function(e){g([e])},R=function(e){g(h.filter(function(t){return t&&!xO(c,s,t,e,m)})),n||_()},z=cI(wP(iI(iI({},e),{},{onChange:L}),function(e){return{value:e.valueTexts[0]||``,active:o}}),2),B=z[0],V=z[1],H=!!(i&&h.length&&!b),U=v?S.createElement(S.Fragment,null,S.createElement($F,{prefixCls:j,value:h,onRemove:R,formatDate:V,maxTagCount:y,disabled:b,removeIcon:D,placeholder:l}),S.createElement(`input`,{className:`${j}-multiple-input`,value:h.map(V).join(`,`),ref:F,readOnly:!0,autoFocus:T,tabIndex:E}),S.createElement(MP,{type:`suffix`,icon:a}),H&&S.createElement(NP,{icon:i,onClear:p})):S.createElement(aF,nI({ref:F},B(),{autoFocus:T,tabIndex:E,suffixIcon:a,clearIcon:H&&S.createElement(NP,{icon:i,onClear:p}),showActiveCls:!1}));return S.createElement(`div`,nI({},I,{className:J(j,aI(aI(aI(aI(aI({},`${j}-multiple`,v),`${j}-focused`,o),`${j}-disabled`,b),`${j}-invalid`,x),`${j}-rtl`,k),u),style:d,ref:P,onClick:f,onMouseDown:function(e){e.target!==F.current?.inputElement&&e.preventDefault(),w?.(e)}}),r&&S.createElement(`div`,{className:J(`${j}-prefix`,M.prefix),style:N.prefix},r),U)}var _I=S.forwardRef(gI);function vI(e){"@babel/helpers - typeof";return vI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},vI(e)}function yI(){return yI=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0&&G.current.focus({index:n})}ue(!0),ae?.(e)},Qe=function(){Be(null),ue(!1,{force:!0})},$e=UF(S.useState(null),2),et=$e[0],tt=$e[1],nt=UF(S.useState(null),2),rt=nt[0],it=nt[1],at=S.useMemo(function(){return rt||_e},[_e,rt]);S.useEffect(function(){q||it(null)},[q]);var ot=UF(S.useState([0,0,0]),2),st=ot[0],ct=ot[1],lt=function(e,t){p===`hover`&&(it(e),tt(t))},ut=vk(W,ee),dt=function(e){lt(e,`preset`)},ft=function(e){Be(e)&&(xe(`preset-click`),ue(!1,{force:!0}))},pt=function(e){Xe(e)},mt=function(e){lt(e?Ye(e,Se):null,`cell`)},ht=function(e){ue(!0),Oe(e)},gt=function(){xe(`panel`)},_t=function(e){he(mD(_e,Se,e)),!g&&!a&&i===Fe&&Xe(e)},vt=function(){ue(!1)},yt=TD(ne,re,ie,XF(Se)),bt=_e[Se]||null,xt=In(function(e){return c(e,{activeIndex:Se})}),St=S.useMemo(function(){var e=Vu(r,!1);return Sr(r,[].concat(PF(Object.keys(e)),[`onChange`,`onCalendarChange`,`style`,`className`,`onPanelChange`,`disabledTime`,`classNames`,`styles`]))},[r]),Ct=S.createElement(_P,NF({},St,{showNow:Le,showTime:Ae,range:!0,multiplePanel:Ie,activeInfo:st,disabledDate:Ve,onFocus:ht,onBlur:ke,onPanelMouseDown:gt,picker:k,mode:Pe,internalMode:Fe,onPanelChange:Je,format:s,value:bt,isInvalid:xt,onChange:null,onSelect:_t,pickerValue:Ke,defaultOpenValue:pD(M?.defaultOpenValue)[Se],onPickerValueChange:qe,hoverValue:at,onHover:mt,needConfirm:g,onSubmit:Xe,onOk:ge,presets:ut,onPresetHover:dt,onPresetSubmit:ft,onNow:pt,cellRender:yt,classNames:K,styles:se})),wt=function(e,t){he(Ye(e,t))},Tt=function(){xe(`input`)},Et=function(e,t){var n=Te.length,r=Te[n-1];if(n&&r!==t&&g&&!y[r]&&!De(r)&&_e[r]){G.current.focus({index:r});return}xe(`input`),ue(!0,{inherit:!0}),Se!==t&&q&&!g&&a&&Xe(null,!0),Ce(t),Oe(e,t)},Dt=function(e,t){ue(!1),!g&&xe()===`input`&&ze(Se,we(_e)===null),ke(e,t)},Ot=function(e,t){e.key===`Tab`&&Xe(null,!0),_?.(e,t)},kt=S.useMemo(function(){return{prefixCls:l,locale:D,generateConfig:O,button:te.button,input:te.input,classNames:K,styles:se}},[l,D,O,te.button,te.input,K,se]);return zn(function(){q&&Se!==void 0&&Je(null,k,!1)},[q,Se,k]),zn(function(){var e=xe();!q&&e===`input`&&(ue(!1),Xe(null,!0)),!q&&a&&!g&&e===`panel`&&(ue(!0),Xe())},[q]),S.createElement($E.Provider,{value:kt},S.createElement(aD,NF({},vD(r),{popupElement:Ct,popupStyle:se.popup.root,popupClassName:J(u,K.popup.root),visible:q,onClose:vt,range:!0}),S.createElement(wF,NF({},r,{ref:G,className:J(r.className,u,K.root),style:zF(zF({},se.root),r.style),suffixIcon:V,activeIndex:ye||q?Se:null,activeHelp:!!rt,allHelp:!!rt&&et===`preset`,focused:ye,onFocus:Et,onBlur:Dt,onKeyDown:Ot,onSubmit:Xe,value:at,maskFormat:s,onChange:wt,onInputChange:Tt,format:o,inputReadOnly:B,disabled:v,open:q,onOpenChange:ue,onClick:Ze,onClear:Qe,invalid:Ue,onInvalid:We,onActiveInfo:ct}))))}var QF=S.forwardRef(ZF);function $F(e){var t=e.prefixCls,n=e.value,r=e.onRemove,i=e.removeIcon,a=i===void 0?`×`:i,o=e.formatDate,s=e.disabled,c=e.maxTagCount,l=e.placeholder,u=`${t}-selector`,d=`${t}-selection`,f=`${d}-overflow`;function p(e,t){return S.createElement(`span`,{className:J(`${d}-item`),title:typeof e==`string`?e:null},S.createElement(`span`,{className:`${d}-item-content`},e),!s&&t&&S.createElement(`span`,{onMouseDown:function(e){e.preventDefault()},onClick:t,className:`${d}-item-remove`},a))}function m(e){return p(o(e),function(t){t&&t.stopPropagation(),r(e)})}function h(e){return p(`+ ${e.length} ...`)}return S.createElement(`div`,{className:u},S.createElement(Qx,{prefixCls:f,data:n,renderItem:m,renderRest:h,itemKey:function(e){return o(e)},maxCount:c}),!n.length&&S.createElement(`span`,{className:`${t}-selection-placeholder`},l))}function eI(e){"@babel/helpers - typeof";return eI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},eI(e)}var tI=`id.open.prefix.clearIcon.suffixIcon.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.internalPicker.value.onChange.onSubmit.onInputChange.multiple.maxTagCount.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onMouseDown.required.aria-required.autoFocus.tabIndex.removeIcon`.split(`.`);function nI(){return nI=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hI(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function gI(e,t){e.id;var n=e.open,r=e.prefix,i=e.clearIcon,a=e.suffixIcon;e.activeHelp,e.allHelp;var o=e.focused;e.onFocus,e.onBlur,e.onKeyDown;var s=e.locale,c=e.generateConfig,l=e.placeholder,u=e.className,d=e.style,f=e.onClick,p=e.onClear,m=e.internalPicker,h=e.value,g=e.onChange,_=e.onSubmit;e.onInputChange;var v=e.multiple,y=e.maxTagCount;e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var b=e.disabled,x=e.invalid;e.inputReadOnly;var C=e.direction;e.onOpenChange;var w=e.onMouseDown;e.required,e[`aria-required`];var T=e.autoFocus,E=e.tabIndex,D=e.removeIcon,O=mI(e,tI),k=C===`rtl`,A=S.useContext($E),j=A.prefixCls,M=A.classNames,N=A.styles,P=S.useRef(),F=S.useRef();S.useImperativeHandle(t,function(){return{nativeElement:P.current,focus:function(e){var t;(t=F.current)==null||t.focus(e)},blur:function(){var e;(e=F.current)==null||e.blur()}}});var I=EP(O),L=function(e){g([e])},R=function(e){g(h.filter(function(t){return t&&!bO(c,s,t,e,m)})),n||_()},z=cI(wP(iI(iI({},e),{},{onChange:L}),function(e){return{value:e.valueTexts[0]||``,active:o}}),2),B=z[0],V=z[1],H=!!(i&&h.length&&!b),U=v?S.createElement(S.Fragment,null,S.createElement($F,{prefixCls:j,value:h,onRemove:R,formatDate:V,maxTagCount:y,disabled:b,removeIcon:D,placeholder:l}),S.createElement(`input`,{className:`${j}-multiple-input`,value:h.map(V).join(`,`),ref:F,readOnly:!0,autoFocus:T,tabIndex:E}),S.createElement(MP,{type:`suffix`,icon:a}),H&&S.createElement(NP,{icon:i,onClear:p})):S.createElement(aF,nI({ref:F},B(),{autoFocus:T,tabIndex:E,suffixIcon:a,clearIcon:H&&S.createElement(NP,{icon:i,onClear:p}),showActiveCls:!1}));return S.createElement(`div`,nI({},I,{className:J(j,aI(aI(aI(aI(aI({},`${j}-multiple`,v),`${j}-focused`,o),`${j}-disabled`,b),`${j}-invalid`,x),`${j}-rtl`,k),u),style:d,ref:P,onClick:f,onMouseDown:function(e){e.target!==F.current?.inputElement&&e.preventDefault(),w?.(e)}}),r&&S.createElement(`div`,{className:J(`${j}-prefix`,M.prefix),style:N.prefix},r),U)}var _I=S.forwardRef(gI);function vI(e){"@babel/helpers - typeof";return vI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},vI(e)}function yI(){return yI=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne??{...t,__INTERNAL__:{itemRef:e=>t=>{let r=HI(e);t?n.current[r]=t:delete n.current[r]}},scrollToField:(e,t={})=>{let{focus:n,...i}=t,a=UI(e,r);a&&(hf(a,{scrollMode:`if-needed`,block:`nearest`,...i}),n&&r.focusField(e))},focusField:e=>{let t=r.getFieldInstance(e);typeof t?.focus==`function`?t.focus():UI(e,r)?.focus?.()},getFieldInstance:e=>{let t=HI(e);return n.current[t]}},[e,t]);return[r]}var GI=S.createContext(void 0),KI=GI.Provider,qI=S.createContext(void 0),mte=qI.Provider;function JI(){return JI=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n=`rc-checkbox`,className:r,style:i,checked:a,disabled:o,defaultChecked:s=!1,type:c=`checkbox`,title:l,onChange:u,...d}=e,f=(0,S.useRef)(null),p=(0,S.useRef)(null),[m,h]=Hn(s,a);(0,S.useImperativeHandle)(t,()=>({focus:e=>{f.current?.focus(e)},blur:()=>{f.current?.blur()},input:f.current,nativeElement:p.current}));let g=J(n,r,{[`${n}-checked`]:m,[`${n}-disabled`]:o});return S.createElement(`span`,{className:g,title:l,style:i,ref:p},S.createElement(`input`,JI({},d,{className:`${n}-input`,ref:f,onChange:t=>{o||(`checked`in e||h(t.target.checked),u?.({target:{...e,type:c,checked:t.target.checked},stopPropagation(){t.stopPropagation()},preventDefault(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:o,checked:!!m,type:c})))});function XI(e){let t=S.useRef(null),n=()=>{ri.cancel(t.current),t.current=null};return[()=>{n(),t.current=ri(()=>{t.current=null})},r=>{t.current&&(r.stopPropagation(),n()),e?.(r)}]}var hte=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:{...Jc(e),display:`inline-block`,fontSize:0,[`&${r}-rtl`]:{direction:`rtl`},[`&${r}-block`]:{display:`flex`},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:`none`},"&-vertical":{display:`flex`,flexDirection:`column`,rowGap:e.marginXS,[`${t}-wrapper`]:{marginInlineEnd:0}}}}},gte=e=>{let{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,colorPrimaryHover:i,radioSize:a,motionDurationSlow:o,motionDurationMid:s,motionEaseInOutCirc:c,colorBgContainer:l,colorBorder:u,lineWidth:d,colorBgContainerDisabled:f,colorTextDisabled:p,paddingXS:m,dotColorDisabled:h,dotSize:g,lineType:_,radioColor:v,radioBgColor:y}=e;return{[`${t}-wrapper`]:{...Jc(e),display:`inline-flex`,alignItems:`baseline`,marginInlineStart:0,marginInlineEnd:n,cursor:`pointer`,"&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:`rtl`},"&-disabled":{cursor:`not-allowed`,color:e.colorTextDisabled},"&::after":{display:`inline-block`,width:0,overflow:`hidden`,content:`"\\a0"`},"&-block":{flex:1,justifyContent:`center`},[t]:{...Jc(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:`calc(${a} * 1px)`,height:`calc(${a} * 1px)`,backgroundColor:l,border:`${Y(d)} ${_} ${u}`,borderRadius:`50%`,transition:`all ${s}`,flex:`none`,"&:after":{content:`""`,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%) scale(0)`,width:`calc(${g} * 1px)`,height:`calc(${g} * 1px)`,backgroundColor:v,borderRadius:`50%`,transformOrigin:`50% 50%`,opacity:0,transition:`all ${o} ${c}`},[`${t}-input`]:{position:`absolute`,inset:0,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:Zc(e)},[`&:hover:not(${t}-wrapper-disabled) ${t}`]:{borderColor:r},[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:i,borderColor:`transparent`},[`${t}-checked`]:{backgroundColor:y,borderColor:r,"&::after":{transform:`translate(-50%, -50%)`,opacity:1}},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:f,borderColor:u,"&::after":{backgroundColor:h}},[`${t}-disabled + span`]:{color:p,cursor:`not-allowed`},[`span${t} + *`]:{paddingInlineStart:m,paddingInlineEnd:m}}}},_te=e=>{let{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:i,lineType:a,colorBorder:o,motionDurationMid:s,buttonPaddingInline:c,fontSize:l,buttonBg:u,fontSizeLG:d,controlHeightLG:f,controlHeightSM:p,paddingXS:m,borderRadius:h,borderRadiusSM:g,borderRadiusLG:_,buttonCheckedBg:v,buttonSolidCheckedColor:y,colorTextDisabled:b,colorBgContainerDisabled:x,buttonCheckedBgDisabled:S,buttonCheckedColorDisabled:C,colorPrimary:w,colorPrimaryHover:T,colorPrimaryActive:E,buttonSolidCheckedBg:D,buttonSolidCheckedHoverBg:O,buttonSolidCheckedActiveBg:k,calc:A}=e;return{[`${r}-button-wrapper`]:{position:`relative`,display:`inline-block`,height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:l,lineHeight:Y(A(n).sub(A(i).mul(2)).equal()),background:u,border:`${Y(i)} ${a} ${o}`,borderBlockStartWidth:A(i).add(.02).equal(),borderInlineEndWidth:i,cursor:`pointer`,transition:[`color`,`background-color`,`box-shadow`].map(e=>`${e} ${s}`).join(`,`),a:{color:t},[`> ${r}-button`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:`100%`,height:`100%`},"&:not(:last-child)":{marginInlineEnd:A(i).mul(-1).equal()},"&:first-child":{borderInlineStart:`${Y(i)} ${a} ${o}`,borderStartStartRadius:h,borderEndStartRadius:h},"&:last-child":{borderStartEndRadius:h,borderEndEndRadius:h},"&:first-child:last-child":{borderRadius:h},[`${r}-group-large &`]:{height:f,fontSize:d,lineHeight:Y(A(f).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:_,borderEndStartRadius:_},"&:last-child":{borderStartEndRadius:_,borderEndEndRadius:_}},[`${r}-group-small &`]:{height:p,paddingInline:A(m).sub(i).equal(),paddingBlock:0,lineHeight:Y(A(p).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g}},"&:hover":{position:`relative`,color:w},"&:has(:focus-visible)":Zc(e),[`${r}, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:`none`},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:w,background:v,borderColor:w,"&::before":{backgroundColor:w},"&:first-child":{borderColor:w},"&:hover":{color:T,borderColor:T,"&::before":{backgroundColor:T}},"&:active":{color:E,borderColor:E,"&::before":{backgroundColor:E}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:y,background:D,borderColor:D,"&:hover":{color:y,background:O,borderColor:O},"&:active":{color:y,background:k,borderColor:k}},"&-disabled":{color:b,backgroundColor:x,borderColor:o,cursor:`not-allowed`,"&:first-child, &:hover":{color:b,backgroundColor:x,borderColor:o}},[`&-disabled${r}-button-wrapper-checked`]:{color:C,backgroundColor:S,borderColor:o,boxShadow:`none`},"&-block":{flex:1,textAlign:`center`}}}},ZI=rl(`Radio`,e=>{let{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${Y(n)} ${t}`,i=gs(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[hte(i),gte(i),_te(i)]},e=>{let{wireframe:t,padding:n,marginXS:r,lineWidth:i,fontSizeLG:a,colorText:o,colorBgContainer:s,colorTextDisabled:c,controlItemBgActiveDisabled:l,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:f,colorPrimaryActive:p,colorWhite:m}=e,h=a;return{radioSize:h,dotSize:t?h-8:h-(4+i)*2,dotColorDisabled:c,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:p,buttonBg:s,buttonCheckedBg:s,buttonColor:o,buttonCheckedBgDisabled:l,buttonCheckedColorDisabled:c,buttonPaddingInline:n-i,wrapperMarginInlineEnd:r,radioColor:t?d:m,radioBgColor:t?s:d}},{unitless:{radioSize:!0,dotSize:!0}}),QI=S.forwardRef((e,t)=>{let n=S.useContext(GI),r=S.useContext(qI),{getPrefixCls:i,direction:a,className:o,style:s,classNames:c,styles:l}=li(`radio`),u=$n(t,S.useRef(null)),{isFormItemInput:d}=S.useContext(Sy),f=t=>{e.onChange?.(t),n?.onChange?.(t)},{prefixCls:p,className:m,rootClassName:h,children:g,style:_,title:v,classNames:y,styles:b,...x}=e,C=i(`radio`,p),w=(n?.optionType||r)===`button`,T=w?`${C}-button`:C,E=bf(C),[D,O]=ZI(C,E),k={...x},A=S.useContext(zp),j=k.checked;n&&(k.name=n.name,k.onChange=f,j=e.value===n.value,k.disabled=k.disabled??n.disabled),k.disabled=k.disabled??A;let M={...e,...k,checked:j},[N,P]=Fd([c,y],[l,b],{props:M}),F=J(`${T}-wrapper`,{[`${T}-wrapper-checked`]:j,[`${T}-wrapper-disabled`]:k.disabled,[`${T}-wrapper-rtl`]:a===`rtl`,[`${T}-wrapper-in-form-item`]:d,[`${T}-wrapper-block`]:!!n?.block},o,m,h,N.root,D,O,E),[I,L]=XI(k.onClick);return S.createElement(eh,{component:`Radio`,disabled:k.disabled},S.createElement(`label`,{className:F,style:{...P.root,...s,..._},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:v,onClick:I},S.createElement(YI,{...k,checked:j,className:J(N.icon,{[qm]:!w}),style:P.icon,type:`radio`,prefixCls:T,ref:u,onClick:L}),g===void 0?null:S.createElement(`span`,{className:J(`${T}-label`,N.label),style:P.label},g)))}),vte=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=S.useContext(oi),{name:i}=S.useContext(Sy),a=zf(HI(i)),{prefixCls:o,className:s,rootClassName:c,options:l,buttonStyle:u=`outline`,disabled:d,children:f,size:p,style:m,id:h,optionType:g,name:_=a,defaultValue:v,value:y,block:b=!1,onChange:x,onMouseEnter:C,onMouseLeave:w,onFocus:T,onBlur:E,orientation:D,vertical:O,role:k=`radiogroup`}=e,[A,j]=Hn(v,y),M=S.useCallback(t=>{let n=A,r=t.target.value;`value`in e||j(r),r!==n&&x?.(t)},[A,j,x]),N=n(`radio`,o),P=`${N}-group`,F=bf(N),[I,L]=ZI(N,F),R=f;l&&l.length>0&&(R=l.map(e=>typeof e==`string`||pd(e)?S.createElement(QI,{key:e.toString(),prefixCls:N,disabled:d,value:e,checked:A===e},e):S.createElement(QI,{key:`radio-group-value-options-${e.value}`,prefixCls:N,disabled:e.disabled||d,value:e.value,checked:A===e.value,title:e.title,style:e.style,className:e.className,id:e.id,required:e.required},e.label)));let z=th(p),[,B]=Rd(D,O),V=J(P,`${P}-${u}`,{[`${P}-large`]:z===`large`,[`${P}-small`]:z===`small`,[`${P}-rtl`]:r===`rtl`,[`${P}-block`]:b},s,c,I,L,F),H=S.useMemo(()=>({onChange:M,value:A,disabled:d,name:_,optionType:g,block:b}),[M,A,d,_,g,b]);return S.createElement(`div`,{...Vu(e,{aria:!0,data:!0}),role:k,className:J(V,{[`${N}-group-vertical`]:B}),style:m,onMouseEnter:C,onMouseLeave:w,onFocus:T,onBlur:E,id:h,ref:t},S.createElement(KI,{value:H},R))}),yte=S.memo(vte),bte=S.forwardRef((e,t)=>{let{getPrefixCls:n}=S.useContext(oi),{prefixCls:r,...i}=e,a=n(`radio`,r);return S.createElement(mte,{value:`button`},S.createElement(QI,{prefixCls:a,...i,type:`radio`,ref:t}))}),$I=QI;$I.Button=bte,$I.Group=yte,$I.__ANT_RADIO=!0;function eL(e){return gs(e,{inputAffixPadding:e.paddingXXS})}var tL=e=>{let{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:a,controlHeightLG:o,fontSizeLG:s,lineHeightLG:c,paddingSM:l,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:p,colorPrimary:m,controlOutlineWidth:h,controlOutline:g,colorErrorOutline:_,colorWarningOutline:v,colorBgContainer:y,inputFontSize:b,inputFontSizeLG:x,inputFontSizeSM:S}=e,C=b||n,w=S||C,T=x||s,E=Math.round((t-C*r)/2*10)/10-i,D=Math.round((a-w*r)/2*10)/10-i,O=Math.ceil((o-T*c)/2*10)/10-i;return{paddingBlock:Math.max(E,0),paddingBlockSM:Math.max(D,0),paddingBlockLG:Math.max(O,0),paddingInline:l-i,paddingInlineSM:u-i,paddingInlineLG:d-i,addonBg:f,activeBorderColor:m,hoverBorderColor:p,activeShadow:`0 0 0 ${h}px ${g}`,errorActiveShadow:`0 0 0 ${h}px ${_}`,warningActiveShadow:`0 0 0 ${h}px ${v}`,hoverBg:y,activeBg:y,inputFontSize:C,inputFontSizeLG:T,inputFontSizeSM:w}},xte=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),nL=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorderDisabled,boxShadow:`none`,cursor:`not-allowed`,opacity:1,"input[disabled], textarea[disabled]":{cursor:`not-allowed`},"&:hover:not([disabled])":{...xte(gs(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),rL=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),iL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...rL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),aL=(e,t)=>({"&-outlined":{...rL(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...nL(e)},...iL(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...iL(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),oL=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),Ste=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...oL(e,{status:`error`,addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...oL(e,{status:`warning`,addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...nL(e)}}}}),sL=(e,t)=>{let{componentCls:n}=e;return{"&-borderless":{background:`transparent`,border:`none`,paddingBlock:e.calc(e.paddingBlock).add(e.lineWidth).equal(),[`&${n}-sm, &${n}-affix-wrapper-sm`]:{paddingBlock:e.calc(e.paddingBlockSM).add(e.lineWidth).equal()},[`&${n}-lg, &${n}-affix-wrapper-lg`]:{paddingBlock:e.calc(e.paddingBlockLG).add(e.lineWidth).equal()},"&:focus, &:focus-within":{outline:`none`},[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:`not-allowed`},[`&${n}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}},...t}}},cL=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:`transparent`,"input&, & input, textarea&, & textarea":{color:t?.inputColor??`unset`},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),lL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...cL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),uL=(e,t)=>({"&-filled":{...cL(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...nL(e)},...lL(e,{status:`error`,bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError}),...lL(e,{status:`warning`,bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning}),...t}}),dL=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),Cte=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:`static`}},...dL(e,{status:`error`,addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...dL(e,{status:`warning`,addonBg:e.colorWarningBg,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),fL=(e,t)=>({background:e.colorBgContainer,borderWidth:`${Y(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),pL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...fL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),mL=(e,t)=>({"&-underlined":{...fL(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:`none`,cursor:`not-allowed`,"&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:`not-allowed`},...pL(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...pL(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),hL=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:`none`},"&:placeholder-shown":{textOverflow:`ellipsis`}}),gL=e=>{let{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=e;return{padding:`${Y(t)} ${Y(i)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},_L=e=>({padding:`${Y(e.paddingBlockSM)} ${Y(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),vL=(e,t={})=>({position:`relative`,display:`inline-block`,width:`100%`,minWidth:0,padding:`${Y(e.paddingBlock)} ${Y(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...hL(e.colorTextPlaceholder),"&-lg":{...gL(e),...t.largeStyle},"&-sm":{..._L(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:`rtl`}}),wte=e=>{let{componentCls:t,antCls:n}=e;return{position:`relative`,display:`table`,width:`100%`,borderCollapse:`separate`,borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:{...gL(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{..._L(e)},[`&-lg ${n}-select-single`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single`]:{height:e.controlHeightSM},[`> ${t}`]:{display:`table-cell`,"&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:`table-cell`,width:1,whiteSpace:`nowrap`,verticalAlign:`middle`,"&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:`block !important`},"&-addon":{position:`relative`,padding:`0 ${Y(e.paddingInline)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.inputFontSize,textAlign:`center`,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${Y(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${Y(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{backgroundColor:`inherit`,border:`${Y(e.lineWidth)} ${e.lineType} transparent`,boxShadow:`none`}},[`${n}-cascader-picker`]:{margin:`-9px ${Y(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:`transparent`,[`${n}-cascader-input`]:{textAlign:`start`,border:0,boxShadow:`none`}}}},[t]:{width:`100%`,marginBottom:0,textAlign:`inherit`,"&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:`block`,...Xc(),[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:`inline-flex`,float:`none`,verticalAlign:`top`,borderRadius:0},[` +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jI(e,t){if(e){if(typeof e==`string`)return MI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return MI(e,t)}}function MI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne??{...t,__INTERNAL__:{itemRef:e=>t=>{let r=HI(e);t?n.current[r]=t:delete n.current[r]}},scrollToField:(e,t={})=>{let{focus:n,...i}=t,a=UI(e,r);a&&(hf(a,{scrollMode:`if-needed`,block:`nearest`,...i}),n&&r.focusField(e))},focusField:e=>{let t=r.getFieldInstance(e);typeof t?.focus==`function`?t.focus():UI(e,r)?.focus?.()},getFieldInstance:e=>{let t=HI(e);return n.current[t]}},[e,t]);return[r]}var GI=S.createContext(void 0),KI=GI.Provider,qI=S.createContext(void 0),mte=qI.Provider;function JI(){return JI=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n=`rc-checkbox`,className:r,style:i,checked:a,disabled:o,defaultChecked:s=!1,type:c=`checkbox`,title:l,onChange:u,...d}=e,f=(0,S.useRef)(null),p=(0,S.useRef)(null),[m,h]=Hn(s,a);(0,S.useImperativeHandle)(t,()=>({focus:e=>{f.current?.focus(e)},blur:()=>{f.current?.blur()},input:f.current,nativeElement:p.current}));let g=J(n,r,{[`${n}-checked`]:m,[`${n}-disabled`]:o});return S.createElement(`span`,{className:g,title:l,style:i,ref:p},S.createElement(`input`,JI({},d,{className:`${n}-input`,ref:f,onChange:t=>{o||(`checked`in e||h(t.target.checked),u?.({target:{...e,type:c,checked:t.target.checked},stopPropagation(){t.stopPropagation()},preventDefault(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:o,checked:!!m,type:c})))});function XI(e){let t=S.useRef(null),n=()=>{ri.cancel(t.current),t.current=null};return[()=>{n(),t.current=ri(()=>{t.current=null})},r=>{t.current&&(r.stopPropagation(),n()),e?.(r)}]}var hte=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:{...Jc(e),display:`inline-block`,fontSize:0,[`&${r}-rtl`]:{direction:`rtl`},[`&${r}-block`]:{display:`flex`},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:`none`},"&-vertical":{display:`flex`,flexDirection:`column`,rowGap:e.marginXS,[`${t}-wrapper`]:{marginInlineEnd:0}}}}},gte=e=>{let{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,colorPrimaryHover:i,radioSize:a,motionDurationSlow:o,motionDurationMid:s,motionEaseInOutCirc:c,colorBgContainer:l,colorBorder:u,lineWidth:d,colorBgContainerDisabled:f,colorTextDisabled:p,paddingXS:m,dotColorDisabled:h,dotSize:g,lineType:_,radioColor:v,radioBgColor:y}=e;return{[`${t}-wrapper`]:{...Jc(e),display:`inline-flex`,alignItems:`baseline`,marginInlineStart:0,marginInlineEnd:n,cursor:`pointer`,"&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:`rtl`},"&-disabled":{cursor:`not-allowed`,color:e.colorTextDisabled},"&::after":{display:`inline-block`,width:0,overflow:`hidden`,content:`"\\a0"`},"&-block":{flex:1,justifyContent:`center`},[t]:{...Jc(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:`calc(${a} * 1px)`,height:`calc(${a} * 1px)`,backgroundColor:l,border:`${Y(d)} ${_} ${u}`,borderRadius:`50%`,transition:`all ${s}`,flex:`none`,"&:after":{content:`""`,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%) scale(0)`,width:`calc(${g} * 1px)`,height:`calc(${g} * 1px)`,backgroundColor:v,borderRadius:`50%`,transformOrigin:`50% 50%`,opacity:0,transition:`all ${o} ${c}`},[`${t}-input`]:{position:`absolute`,inset:0,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:Zc(e)},[`&:hover:not(${t}-wrapper-disabled) ${t}`]:{borderColor:r},[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:i,borderColor:`transparent`},[`${t}-checked`]:{backgroundColor:y,borderColor:r,"&::after":{transform:`translate(-50%, -50%)`,opacity:1}},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:f,borderColor:u,"&::after":{backgroundColor:h}},[`${t}-disabled + span`]:{color:p,cursor:`not-allowed`},[`span${t} + *`]:{paddingInlineStart:m,paddingInlineEnd:m}}}},_te=e=>{let{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:i,lineType:a,colorBorder:o,motionDurationMid:s,buttonPaddingInline:c,fontSize:l,buttonBg:u,fontSizeLG:d,controlHeightLG:f,controlHeightSM:p,paddingXS:m,borderRadius:h,borderRadiusSM:g,borderRadiusLG:_,buttonCheckedBg:v,buttonSolidCheckedColor:y,colorTextDisabled:b,colorBgContainerDisabled:x,buttonCheckedBgDisabled:S,buttonCheckedColorDisabled:C,colorPrimary:w,colorPrimaryHover:T,colorPrimaryActive:E,buttonSolidCheckedBg:D,buttonSolidCheckedHoverBg:O,buttonSolidCheckedActiveBg:k,calc:A}=e;return{[`${r}-button-wrapper`]:{position:`relative`,display:`inline-block`,height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:l,lineHeight:Y(A(n).sub(A(i).mul(2)).equal()),background:u,border:`${Y(i)} ${a} ${o}`,borderBlockStartWidth:A(i).add(.02).equal(),borderInlineEndWidth:i,cursor:`pointer`,transition:[`color`,`background-color`,`box-shadow`].map(e=>`${e} ${s}`).join(`,`),a:{color:t},[`> ${r}-button`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:`100%`,height:`100%`},"&:not(:last-child)":{marginInlineEnd:A(i).mul(-1).equal()},"&:first-child":{borderInlineStart:`${Y(i)} ${a} ${o}`,borderStartStartRadius:h,borderEndStartRadius:h},"&:last-child":{borderStartEndRadius:h,borderEndEndRadius:h},"&:first-child:last-child":{borderRadius:h},[`${r}-group-large &`]:{height:f,fontSize:d,lineHeight:Y(A(f).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:_,borderEndStartRadius:_},"&:last-child":{borderStartEndRadius:_,borderEndEndRadius:_}},[`${r}-group-small &`]:{height:p,paddingInline:A(m).sub(i).equal(),paddingBlock:0,lineHeight:Y(A(p).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g}},"&:hover":{position:`relative`,color:w},"&:has(:focus-visible)":Zc(e),[`${r}, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:`none`},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:w,background:v,borderColor:w,"&::before":{backgroundColor:w},"&:first-child":{borderColor:w},"&:hover":{color:T,borderColor:T,"&::before":{backgroundColor:T}},"&:active":{color:E,borderColor:E,"&::before":{backgroundColor:E}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:y,background:D,borderColor:D,"&:hover":{color:y,background:O,borderColor:O},"&:active":{color:y,background:k,borderColor:k}},"&-disabled":{color:b,backgroundColor:x,borderColor:o,cursor:`not-allowed`,"&:first-child, &:hover":{color:b,backgroundColor:x,borderColor:o}},[`&-disabled${r}-button-wrapper-checked`]:{color:C,backgroundColor:S,borderColor:o,boxShadow:`none`},"&-block":{flex:1,textAlign:`center`}}}},ZI=rl(`Radio`,e=>{let{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${Y(n)} ${t}`,i=gs(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[hte(i),gte(i),_te(i)]},e=>{let{wireframe:t,padding:n,marginXS:r,lineWidth:i,fontSizeLG:a,colorText:o,colorBgContainer:s,colorTextDisabled:c,controlItemBgActiveDisabled:l,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:f,colorPrimaryActive:p,colorWhite:m}=e,h=a;return{radioSize:h,dotSize:t?h-8:h-(4+i)*2,dotColorDisabled:c,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:p,buttonBg:s,buttonCheckedBg:s,buttonColor:o,buttonCheckedBgDisabled:l,buttonCheckedColorDisabled:c,buttonPaddingInline:n-i,wrapperMarginInlineEnd:r,radioColor:t?d:m,radioBgColor:t?s:d}},{unitless:{radioSize:!0,dotSize:!0}}),QI=S.forwardRef((e,t)=>{let n=S.useContext(GI),r=S.useContext(qI),{getPrefixCls:i,direction:a,className:o,style:s,classNames:c,styles:l}=li(`radio`),u=$n(t,S.useRef(null)),{isFormItemInput:d}=S.useContext(Sy),f=t=>{e.onChange?.(t),n?.onChange?.(t)},{prefixCls:p,className:m,rootClassName:h,children:g,style:_,title:v,classNames:y,styles:b,...x}=e,C=i(`radio`,p),w=(n?.optionType||r)===`button`,T=w?`${C}-button`:C,E=bf(C),[D,O]=ZI(C,E),k={...x},A=S.useContext(zp),j=k.checked;n&&(k.name=n.name,k.onChange=f,j=e.value===n.value,k.disabled=k.disabled??n.disabled),k.disabled=k.disabled??A;let M={...e,...k,checked:j},[N,P]=Fd([c,y],[l,b],{props:M}),F=J(`${T}-wrapper`,{[`${T}-wrapper-checked`]:j,[`${T}-wrapper-disabled`]:k.disabled,[`${T}-wrapper-rtl`]:a===`rtl`,[`${T}-wrapper-in-form-item`]:d,[`${T}-wrapper-block`]:!!n?.block},o,m,h,N.root,D,O,E),[I,L]=XI(k.onClick);return S.createElement(eh,{component:`Radio`,disabled:k.disabled},S.createElement(`label`,{className:F,style:{...P.root,...s,..._},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:v,onClick:I},S.createElement(YI,{...k,checked:j,className:J(N.icon,{[qm]:!w}),style:P.icon,type:`radio`,prefixCls:T,ref:u,onClick:L}),g===void 0?null:S.createElement(`span`,{className:J(`${T}-label`,N.label),style:P.label},g)))}),vte=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=S.useContext(oi),{name:i}=S.useContext(Sy),a=zf(HI(i)),{prefixCls:o,className:s,rootClassName:c,options:l,buttonStyle:u=`outline`,disabled:d,children:f,size:p,style:m,id:h,optionType:g,name:_=a,defaultValue:v,value:y,block:b=!1,onChange:x,onMouseEnter:C,onMouseLeave:w,onFocus:T,onBlur:E,orientation:D,vertical:O,role:k=`radiogroup`}=e,[A,j]=Hn(v,y),M=S.useCallback(t=>{let n=A,r=t.target.value;`value`in e||j(r),r!==n&&x?.(t)},[A,j,x]),N=n(`radio`,o),P=`${N}-group`,F=bf(N),[I,L]=ZI(N,F),R=f;l&&l.length>0&&(R=l.map(e=>typeof e==`string`||pd(e)?S.createElement(QI,{key:e.toString(),prefixCls:N,disabled:d,value:e,checked:A===e},e):S.createElement(QI,{key:`radio-group-value-options-${e.value}`,prefixCls:N,disabled:e.disabled||d,value:e.value,checked:A===e.value,title:e.title,style:e.style,className:e.className,id:e.id,required:e.required},e.label)));let z=th(p),[,B]=Rd(D,O),V=J(P,`${P}-${u}`,{[`${P}-large`]:z===`large`,[`${P}-small`]:z===`small`,[`${P}-rtl`]:r===`rtl`,[`${P}-block`]:b},s,c,I,L,F),H=S.useMemo(()=>({onChange:M,value:A,disabled:d,name:_,optionType:g,block:b}),[M,A,d,_,g,b]);return S.createElement(`div`,{...Vu(e,{aria:!0,data:!0}),role:k,className:J(V,{[`${N}-group-vertical`]:B}),style:m,onMouseEnter:C,onMouseLeave:w,onFocus:T,onBlur:E,id:h,ref:t},S.createElement(KI,{value:H},R))}),yte=S.memo(vte),bte=S.forwardRef((e,t)=>{let{getPrefixCls:n}=S.useContext(oi),{prefixCls:r,...i}=e,a=n(`radio`,r);return S.createElement(mte,{value:`button`},S.createElement(QI,{prefixCls:a,...i,type:`radio`,ref:t}))}),$I=QI;$I.Button=bte,$I.Group=yte,$I.__ANT_RADIO=!0;function eL(e){return gs(e,{inputAffixPadding:e.paddingXXS})}var tL=e=>{let{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:a,controlHeightLG:o,fontSizeLG:s,lineHeightLG:c,paddingSM:l,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:p,colorPrimary:m,controlOutlineWidth:h,controlOutline:g,colorErrorOutline:_,colorWarningOutline:v,colorBgContainer:y,inputFontSize:b,inputFontSizeLG:x,inputFontSizeSM:S}=e,C=b||n,w=S||C,T=x||s,E=Math.round((t-C*r)/2*10)/10-i,D=Math.round((a-w*r)/2*10)/10-i,O=Math.ceil((o-T*c)/2*10)/10-i;return{paddingBlock:Math.max(E,0),paddingBlockSM:Math.max(D,0),paddingBlockLG:Math.max(O,0),paddingInline:l-i,paddingInlineSM:u-i,paddingInlineLG:d-i,addonBg:f,activeBorderColor:m,hoverBorderColor:p,activeShadow:`0 0 0 ${h}px ${g}`,errorActiveShadow:`0 0 0 ${h}px ${_}`,warningActiveShadow:`0 0 0 ${h}px ${v}`,hoverBg:y,activeBg:y,inputFontSize:C,inputFontSizeLG:T,inputFontSizeSM:w}},xte=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),nL=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorderDisabled,boxShadow:`none`,cursor:`not-allowed`,opacity:1,"input[disabled], textarea[disabled]":{cursor:`not-allowed`},"&:hover:not([disabled])":{...xte(gs(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),rL=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),iL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...rL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),aL=(e,t)=>({"&-outlined":{...rL(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...nL(e)},...iL(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...iL(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),oL=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),Ste=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...oL(e,{status:`error`,addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...oL(e,{status:`warning`,addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...nL(e)}}}}),sL=(e,t)=>{let{componentCls:n}=e;return{"&-borderless":{background:`transparent`,border:`none`,paddingBlock:e.calc(e.paddingBlock).add(e.lineWidth).equal(),[`&${n}-sm, &${n}-affix-wrapper-sm`]:{paddingBlock:e.calc(e.paddingBlockSM).add(e.lineWidth).equal()},[`&${n}-lg, &${n}-affix-wrapper-lg`]:{paddingBlock:e.calc(e.paddingBlockLG).add(e.lineWidth).equal()},"&:focus, &:focus-within":{outline:`none`},[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:`not-allowed`},[`&${n}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}},...t}}},cL=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:`transparent`,"input&, & input, textarea&, & textarea":{color:t?.inputColor??`unset`},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),lL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...cL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),uL=(e,t)=>({"&-filled":{...cL(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...nL(e)},...lL(e,{status:`error`,bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError}),...lL(e,{status:`warning`,bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning}),...t}}),dL=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),Cte=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:`static`}},...dL(e,{status:`error`,addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...dL(e,{status:`warning`,addonBg:e.colorWarningBg,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),fL=(e,t)=>({background:e.colorBgContainer,borderWidth:`${Y(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),pL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...fL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),mL=(e,t)=>({"&-underlined":{...fL(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:`none`,cursor:`not-allowed`,"&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:`not-allowed`},...pL(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...pL(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),hL=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:`none`},"&:placeholder-shown":{textOverflow:`ellipsis`}}),gL=e=>{let{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=e;return{padding:`${Y(t)} ${Y(i)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},_L=e=>({padding:`${Y(e.paddingBlockSM)} ${Y(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),vL=(e,t={})=>({position:`relative`,display:`inline-block`,width:`100%`,minWidth:0,padding:`${Y(e.paddingBlock)} ${Y(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...hL(e.colorTextPlaceholder),"&-lg":{...gL(e),...t.largeStyle},"&-sm":{..._L(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:`rtl`}}),wte=e=>{let{componentCls:t,antCls:n}=e;return{position:`relative`,display:`table`,width:`100%`,borderCollapse:`separate`,borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:{...gL(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{..._L(e)},[`&-lg ${n}-select-single`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single`]:{height:e.controlHeightSM},[`> ${t}`]:{display:`table-cell`,"&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:`table-cell`,width:1,whiteSpace:`nowrap`,verticalAlign:`middle`,"&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:`block !important`},"&-addon":{position:`relative`,padding:`0 ${Y(e.paddingInline)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.inputFontSize,textAlign:`center`,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${Y(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${Y(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{backgroundColor:`inherit`,border:`${Y(e.lineWidth)} ${e.lineType} transparent`,boxShadow:`none`}},[`${n}-cascader-picker`]:{margin:`-9px ${Y(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:`transparent`,[`${n}-cascader-input`]:{textAlign:`start`,border:0,boxShadow:`none`}}}},[t]:{width:`100%`,marginBottom:0,textAlign:`inherit`,"&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:`block`,...Xc(),[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:`inline-flex`,float:`none`,verticalAlign:`top`,borderRadius:0},[` & > ${t}-affix-wrapper, & > ${t}-number-affix-wrapper, & > ${n}-picker-range @@ -291,7 +291,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:`relative`,zIndex:1,boxShadow:r}}},wR=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:a,actionsBg:o}=e;return{margin:0,padding:0,listStyle:`none`,background:o,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${a}`,display:`flex`,borderRadius:`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`,...Xc(),"& > li":{margin:r,color:e.colorTextDescription,textAlign:`center`,"> span":{position:`relative`,display:`block`,minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,"&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:`inline-block`,width:`100%`,color:e.colorIcon,lineHeight:Y(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:Y(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${a}`}}}},TR=e=>({margin:`${Y(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:`flex`,...Xc(),"&-avatar":{paddingInlineEnd:e.padding},"&-section":{overflow:`hidden`,flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,...qc},"&-description":{color:e.colorTextDescription}}),ER=e=>{let{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${Y(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${Y(e.padding)} ${Y(i)}`}}},DR=e=>{let{componentCls:t}=e;return{overflow:`hidden`,[`${t}-body`]:{userSelect:`none`}}},OR=e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:a,bodyPadding:o,extraColor:s,motionDurationMid:c}=e;return{[t]:{...Jc(e),position:`relative`,background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:a},[`${t}-head`]:SR(e),[`${t}-extra`]:{marginInlineStart:`auto`,color:s,fontWeight:`normal`,fontSize:e.fontSize},[`${t}-body`]:{padding:o,borderRadius:`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`,"&:first-child":{borderStartStartRadius:e.borderRadiusLG,borderStartEndRadius:e.borderRadiusLG},"&:not(:last-child)":{borderEndStartRadius:0,borderEndEndRadius:0}},[`${t}-grid`]:CR(e),[`${t}-cover`]:{"> *":{display:`block`,width:`100%`,borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:wR(e),[`${t}-meta`]:TR(e)},[`${t}-bordered`]:{border:`${Y(e.lineWidth)} ${e.lineType} ${i}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:`pointer`,transition:[`box-shadow`,`border-color`].map(e=>`${e} ${c}`).join(`, `),"&:hover":{borderColor:`transparent`,boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0 `,[`&:not(:has(> ${t}-head))`]:{borderRadius:0},[`${t}-body`]:{display:`flex`,flexWrap:`wrap`},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:r}}},[`${t}-type-inner`]:ER(e),[`${t}-loading`]:DR(e),[`${t}-rtl`]:{direction:`rtl`}}},kR=e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:a}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${Y(r)}`,fontSize:a,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:`flex`,alignItems:`center`}}}}},AR=rl(`Card`,e=>{let t=gs(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[OR(t),kR(t)]},e=>({headerBg:`transparent`,headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:e.bodyPadding??e.paddingLG,headerPadding:e.headerPadding??e.paddingLG})),jR=e=>{let{actionClasses:t,actions:n=[],actionStyle:r}=e;return S.createElement(`ul`,{className:t,style:r},n.map((e,t)=>{let r=`action-${t}`;return S.createElement(`li`,{style:{width:`${100/n.length}%`},key:r},S.createElement(`span`,null,e))}))},MR=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,extra:o,headStyle:s={},bodyStyle:c={},title:l,loading:u,bordered:d,variant:f,size:p,type:m,cover:h,actions:g,tabList:_,children:v,activeTabKey:y,defaultActiveTabKey:b,tabBarExtraContent:x,hoverable:C,tabProps:w={},classNames:T,styles:E,...D}=e,{getPrefixCls:O,direction:k,className:A,style:j,classNames:M,styles:N}=li(`card`),[P]=hC(`card`,f,d),F=th(p),I={...e,size:F,variant:P},[L,R]=Fd([M,T],[N,E],{props:I}),z=t=>{e.onTabChange?.(t)},B=S.useMemo(()=>Cr(v),[v]),V=S.useMemo(()=>B.some(e=>S.isValidElement(e)&&e.type===xR),[B]),H=O(`card`,n),[U,W]=AR(H),ee=S.createElement(Wy,{loading:!0,active:!0,paragraph:{rows:4},title:!1},v),te=y!==void 0,ne={...w,[te?`activeKey`:`defaultActiveKey`]:te?y:b,tabBarExtraContent:x},re,ie=F===`small`?F:`large`,ae=_?S.createElement(bR,{size:ie,...ne,className:`${H}-head-tabs`,onChange:z,items:_.map(({tab:e,...t})=>({label:e,...t}))}):null;if(l||o||ae){let e=J(`${H}-head`,L.header),t=J(`${H}-head-title`,L.title),n=J(`${H}-extra`,L.extra),r={...s,...R.header};re=S.createElement(`div`,{className:e,style:r},S.createElement(`div`,{className:`${H}-head-wrapper`},l&&S.createElement(`div`,{className:t,style:R.title},l),o&&S.createElement(`div`,{className:n,style:R.extra},o)),ae)}let G=J(`${H}-cover`,L.cover),oe=h?S.createElement(`div`,{className:G,style:R.cover},h):null,K=J(`${H}-body`,L.body),se={...c,...R.body},ce=u||B.length?S.createElement(`div`,{className:K,style:se},u?ee:v):null,q=J(`${H}-actions`,L.actions),le=g?.length?S.createElement(jR,{actionClasses:q,actionStyle:R.actions,actions:g}):null,ue=Sr(D,[`onTabChange`]),de=J(H,A,{[`${H}-loading`]:u,[`${H}-bordered`]:P!==`borderless`,[`${H}-hoverable`]:C,[`${H}-contain-grid`]:V,[`${H}-contain-tabs`]:_?.length,[`${H}-small`]:F===`small`,[`${H}-type-${m}`]:!!m,[`${H}-rtl`]:k===`rtl`},r,i,U,W,L.root),fe={...R.root,...j,...a};return S.createElement(`div`,{ref:t,...ue,className:de,style:fe},re,oe,ce,le)}),NR=e=>{let{prefixCls:t,className:n,avatar:r,title:i,description:a,style:o,classNames:s,styles:c,...l}=e,{getPrefixCls:u,className:d,style:f,classNames:p,styles:m}=li(`cardMeta`),h=`${u(`card`,t)}-meta`,[g,_]=Fd([p,s],[m,c],{props:e}),v=J(h,n,d,g.root),y={...f,..._.root,...o},b=J(`${h}-avatar`,g.avatar),x=J(`${h}-title`,g.title),C=J(`${h}-description`,g.description),w=J(`${h}-section`,g.section),T=r?S.createElement(`div`,{className:b,style:_.avatar},r):null,E=i?S.createElement(`div`,{className:x,style:_.title},i):null,D=a?S.createElement(`div`,{className:C,style:_.description},a):null,O=E||D?S.createElement(`div`,{className:w,style:_.section},E,D):null;return S.createElement(`div`,{...l,className:v,style:y},T,O)},PR=MR;PR.Grid=xR,PR.Meta=NR;function FR(e,t,n){var r=n||{},i=r.noTrailing,a=i===void 0?!1:i,o=r.noLeading,s=o===void 0?!1:o,c=r.debounceMode,l=c===void 0?void 0:c,u,d=!1,f=0;function p(){u&&clearTimeout(u)}function m(e){var t=(e||{}).upcomingOnly,n=t===void 0?!1:t;p(),d=!n}function h(){var n=[...arguments],r=this,i=Date.now()-f;if(d)return;function o(){f=Date.now(),t.apply(r,n)}function c(){u=void 0}!s&&l&&!u&&o(),p(),l===void 0&&i>e?s?(f=Date.now(),a||(u=setTimeout(l?c:o,e))):o():a!==!0&&(u=setTimeout(l?c:o,l===void 0?e-i:e))}return h.cancel=m,h}function IR(e,t,n){var r=(n||{}).atBegin;return FR(e,t,{debounceMode:(r===void 0?!1:r)!==!1})}function LR(e,t){return e[t]}function RR(e,t){return`${e}-${t}`}function zR(e){return e&&e.type&&e.type.isTreeNode}function BR(e,t){return e??t}function VR(e){let{title:t,_title:n,key:r,children:i}=e||{},a=t||`title`;return{title:a,_title:n||[a],key:r||`key`,children:i||`children`}}function HR(e){function t(e){return Cr(e).map(e=>{if(!zR(e))return br(!e,`Tree/TreeNode can only accept TreeNode as children.`),null;let{key:n}=e,{children:r,...i}=e.props,a={key:n,...i},o=t(r);return o.length&&(a.children=o),a}).filter(e=>e)}return t(e)}function UR(e,t,n){let{_title:r,key:i,children:a}=VR(n),o=new Set(t===!0?[]:t),s=[];function c(e,n=null){return e.map((l,u)=>{let d=RR(n?n.pos:`0`,u),f=BR(l[i],d),p;for(let e=0;ee[a]:typeof a==`function`&&(u=e=>a(e)):u=(e,t)=>BR(e[s],t);function d(n,r,i,a){let o=n?n[l]:e,s=n?RR(i.pos,r):`0`,c=n?[...a,n]:[];n&&t({node:n,index:r,pos:s,key:u(n,s),parentPos:i.node?i.pos:null,level:i.level+1,nodes:c}),o&&o.forEach((e,t)=>{d(e,t,{node:n,pos:s,level:i?i.level+1:-1},c)})}d(null)}function GR(e,{initWrapper:t,processEntity:n,onProcessFinished:r,externalGetKey:i,childrenPropName:a,fieldNames:o}={},s){let c=i||s,l={},u={},d={posEntities:l,keyEntities:u};return t&&(d=t(d)||d),WR(e,e=>{let{node:t,index:r,pos:i,key:a,parentPos:o,level:s,nodes:c}=e,f={node:t,nodes:c,index:r,key:a,pos:i,level:s},p=BR(a,i);l[i]=f,u[p]=f,f.parent=l[o],f.parent&&(f.parent.children=f.parent.children||[],f.parent.children.push(f)),n&&n(f,d)},{externalGetKey:c,childrenPropName:a,fieldNames:o}),r&&r(d),d}function KR(e,t,n,r){return e===!1?!1:e||!t&&!n||t&&r&&!n}function qR(e,{expandedKeys:t,selectedKeys:n,loadedKeys:r,loadingKeys:i,checkedKeys:a,halfCheckedKeys:o,dragOverNodeKey:s,dropPosition:c,keyEntities:l}){let u=LR(l,e);return{eventKey:e,expanded:t.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:r.indexOf(e)!==-1,loading:i.indexOf(e)!==-1,checked:a.indexOf(e)!==-1,halfChecked:o.indexOf(e)!==-1,pos:String(u?u.pos:``),dragOver:s===e&&c===0,dragOverGapTop:s===e&&c===-1,dragOverGapBottom:s===e&&c===1}}function JR(e){let{data:t,expanded:n,selected:r,checked:i,loaded:a,loading:o,halfChecked:s,dragOver:c,dragOverGapTop:l,dragOverGapBottom:u,pos:d,active:f,eventKey:p}=e,m={...t,expanded:n,selected:r,checked:i,loaded:a,loading:o,halfChecked:s,dragOver:c,dragOverGapTop:l,dragOverGapBottom:u,pos:d,active:f,key:p};return`props`in m||Object.defineProperty(m,`props`,{get(){return br(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}function YR(e,t){let n=new Set;return e.forEach(e=>{t.has(e)||n.add(e)}),n}function XR(e){let{disabled:t,disableCheckbox:n,checkable:r}=e||{};return!!(t||n)||r===!1}function ZR(e,t,n,r){let i=new Set(e),a=new Set;for(let e=0;e<=n;e+=1)(t.get(e)||new Set).forEach(e=>{let{key:t,node:n,children:a=[]}=e;i.has(t)&&!r(n)&&a.filter(e=>!r(e.node)).forEach(e=>{i.add(e.key)})});let o=new Set;for(let e=n;e>=0;--e)(t.get(e)||new Set).forEach(e=>{let{parent:t,node:n}=e;if(r(n)||!e.parent||o.has(e.parent.key))return;if(r(e.parent.node)){o.add(t.key);return}let s=!0,c=!1;(t.children||[]).filter(e=>!r(e.node)).forEach(({key:e})=>{let t=i.has(e);s&&!t&&(s=!1),!c&&(t||a.has(e))&&(c=!0)}),s&&i.add(t.key),c&&a.add(t.key),o.add(t.key)});return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(YR(a,i))}}function QR(e,t,n,r,i){let a=new Set(e),o=new Set(t);for(let e=0;e<=r;e+=1)(n.get(e)||new Set).forEach(e=>{let{key:t,node:n,children:r=[]}=e;!a.has(t)&&!o.has(t)&&!i(n)&&r.filter(e=>!i(e.node)).forEach(e=>{a.delete(e.key)})});o=new Set;let s=new Set;for(let e=r;e>=0;--e)(n.get(e)||new Set).forEach(e=>{let{parent:t,node:n}=e;if(i(n)||!e.parent||s.has(e.parent.key))return;if(i(e.parent.node)){s.add(t.key);return}let r=!0,c=!1;(t.children||[]).filter(e=>!i(e.node)).forEach(({key:e})=>{let t=a.has(e);r&&!t&&(r=!1),!c&&(t||o.has(e))&&(c=!0)}),r||a.delete(t.key),c&&o.add(t.key),s.add(t.key)});return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(YR(o,a))}}function $R(e,t,n,r){let i=[],a;a=r||XR;let o=new Set(e.filter(e=>{let t=!!LR(n,e);return t||i.push(e),t})),s=new Map,c=0;Object.keys(n).forEach(e=>{let t=n[e],{level:r}=t,i=s.get(r);i||(i=new Set,s.set(r,i)),i.add(t),c=Math.max(c,r)}),br(!i.length,`Tree missing follow keys: ${i.slice(0,100).map(e=>`'${e}'`).join(`, `)}`);let l;return l=t===!0?ZR(o,s,c,a):QR(o,t.halfCheckedKeys,s,c,a),l}var ez=e=>{let{checkboxCls:t,checkboxSize:n,lineWidth:r}=e,i=`${t}-wrapper`;return[{[`${t}-group`]:{...Jc(e),display:`inline-flex`,flexWrap:`wrap`,columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[i]:{...Jc(e),display:`inline-flex`,alignItems:`baseline`,cursor:`pointer`,"&:after":{display:`inline-block`,width:0,overflow:`hidden`,content:`'\\a0'`},[`& + ${i}`]:{marginInlineStart:0},[`&${i}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}},[t]:{...Jc(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:n,height:n,direction:`ltr`,backgroundColor:e.colorBgContainer,border:`${Y(r)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:`separate`,transition:`all ${e.motionDurationSlow}`,flex:`none`,...Uh(),"&:after":{boxSizing:`border-box`,position:`absolute`,top:`calc(${n} / 2 - ${r})`,insetInlineStart:`calc(${n} / 4 - ${r})`,display:`table`,width:e.calc(n).div(14).mul(5).equal(),height:e.calc(n).div(14).mul(8).equal(),border:`${Y(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:`rotate(45deg) scale(0) translate(-50%,-50%)`,opacity:0,content:`""`,transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`,...Uh()},[`${t}-input`]:{position:`absolute`,inset:`calc(-1 * (${r}))`,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:Zc(e),"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[` ${i}:not(${i}-disabled), ${t}:not(${t}-disabled) - `]:{[`&:hover ${t}`]:{borderColor:e.colorPrimary}},[`${i}:not(${i}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[`${t}-checked`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:`rotate(45deg) scale(1) translate(-50%,-50%)`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`,...Uh()},[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[t]:{"&-indeterminate":{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:`50%`,insetInlineStart:`50%`,width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:`translate(-50%, -50%) scale(1)`,opacity:1,content:`""`},"&:hover":{backgroundColor:e.colorBgContainer,borderColor:e.colorPrimary}}}},{[`${i}-disabled`]:{cursor:`not-allowed`},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate::after`]:{background:e.colorTextDisabled}}}]};function tz(e,t){return ez(gs(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}var nz=rl(`Checkbox`,(e,{prefixCls:t})=>[tz(t,e)]),rz=S.createContext(null),iz=S.forwardRef((e,t)=>{let{prefixCls:n,children:r,indeterminate:i=!1,onMouseEnter:a,onMouseLeave:o,skipGroup:s=!1,disabled:c,rootClassName:l,className:u,style:d,classNames:f,styles:p,name:m,value:h,checked:g,defaultChecked:_,onChange:v,...y}=e,{getPrefixCls:b,direction:x,className:C,style:w,classNames:T,styles:E}=li(`checkbox`),D=S.useContext(rz),{isFormItemInput:O}=S.useContext(Sy),k=S.useContext(zp),A=(D?.disabled||c)??k,[j,M]=Hn(_,g),N=j,P=In(e=>{M(e.target.checked),v?.(e),!s&&D?.toggleOption&&D.toggleOption({label:r,value:h})});D&&!s&&(N=D.value.includes(h));let F=S.useRef(null),I=er(t,F);S.useEffect(()=>{if(!(s||!D))return D.registerValue(h),()=>{D.cancelValue(h)}},[h,s]),S.useEffect(()=>{F.current?.input&&(F.current.input.indeterminate=i)},[i]);let L=b(`checkbox`,n),R=bf(L),[z,B]=nz(L,R),V={...y},H={...e,indeterminate:i,disabled:A,checked:N},[U,W]=Fd([T,f],[E,p],{props:H}),ee=J(`${L}-wrapper`,{[`${L}-rtl`]:x===`rtl`,[`${L}-wrapper-checked`]:N,[`${L}-wrapper-disabled`]:A,[`${L}-wrapper-in-form-item`]:O},C,u,U.root,l,B,R,z),te=J(U.icon,{[`${L}-indeterminate`]:i},qm,z),[ne,re]=XI(V.onClick);return S.createElement(eh,{component:`Checkbox`,disabled:A},S.createElement(`label`,{className:ee,style:{...W.root,...w,...d},onMouseEnter:a,onMouseLeave:o,onClick:ne},S.createElement(YI,{...V,name:!s&&D?D.name:m,checked:N,onClick:re,onChange:P,prefixCls:L,className:te,style:W.icon,disabled:A,ref:I,value:h}),fd(r)&&S.createElement(`span`,{className:J(`${L}-label`,U.label),style:W.label},r)))}),az=S.forwardRef((e,t)=>{let{defaultValue:n,children:r,options:i=[],prefixCls:a,className:o,rootClassName:s,style:c,onChange:l,role:u=`group`,...d}=e,{getPrefixCls:f,direction:p}=S.useContext(oi),[m,h]=S.useState(d.value||n||[]),[g,_]=S.useState([]);S.useEffect(()=>{`value`in d&&h(d.value||[])},[d.value]);let v=S.useMemo(()=>i.map(e=>typeof e==`string`||pd(e)?{label:e,value:e}:e),[i]),y=e=>{_(t=>t.filter(t=>t!==e))},b=e=>{_(t=>[].concat(Zr(t),[e]))},x=e=>{let t=m.indexOf(e.value),n=Zr(m);t===-1?n.push(e.value):n.splice(t,1),`value`in d||h(n),l?.(n.filter(e=>g.includes(e)).sort((e,t)=>v.findIndex(t=>t.value===e)-v.findIndex(e=>e.value===t)))},C=f(`checkbox`,a),w=`${C}-group`,T=bf(C),[E,D]=nz(C,T),O=Sr(d,[`value`,`disabled`]),k=i.length?v.map(e=>S.createElement(iz,{prefixCls:C,key:e.value.toString(),disabled:`disabled`in e?e.disabled:d.disabled,value:e.value,checked:m.includes(e.value),onChange:e.onChange,className:J(`${w}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):r,A=S.useMemo(()=>({toggleOption:x,value:m,disabled:d.disabled,name:d.name,registerValue:b,cancelValue:y}),[x,m,d.disabled,d.name,b,y]),j=J(w,{[`${w}-rtl`]:p===`rtl`},o,s,D,T,E);return S.createElement(`div`,{className:j,style:c,role:u,...O,ref:t},S.createElement(rz.Provider,{value:A},k))}),oz=iz;oz.Group=az,oz.__ANT_CHECKBOX=!0;var sz=(0,S.createContext)({});function cz(e){return e===`auto`?`1 1 auto`:pd(e)?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}var lz=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=S.useContext(oi),{gutter:i,wrap:a}=S.useContext(sz),{prefixCls:o,span:s,order:c,offset:l,push:u,pull:d,className:f,children:p,flex:m,style:h,...g}=e,_=n(`col`,o),v=n(),[y,b]=$y(_),[x]=ol(v,`col`),C={},w={};VC.forEach(t=>{let n={},i=e[t];pd(i)?n.span=i:hd(i)&&(n=i||{}),delete g[t],w={...w,[`${_}-${t}-${n.span}`]:fd(n.span),[`${_}-${t}-order-${n.order}`]:n.order||n.order===0,[`${_}-${t}-offset-${n.offset}`]:n.offset||n.offset===0,[`${_}-${t}-push-${n.push}`]:n.push||n.push===0,[`${_}-${t}-pull-${n.pull}`]:n.pull||n.pull===0,[`${_}-rtl`]:r===`rtl`},n.flex&&(w[`${_}-${t}-flex`]=!0,C[x(`${t}-flex`)]=cz(n.flex))});let T=J(_,{[`${_}-${s}`]:s!==void 0,[`${_}-order-${c}`]:c,[`${_}-offset-${l}`]:l,[`${_}-push-${u}`]:u,[`${_}-pull-${d}`]:d},f,w,y,b),E={};return i?.[0]&&(E.paddingInline=pd(i[0])?`${i[0]/2}px`:`calc(${i[0]} / 2)`),m&&(E.flex=cz(m),a===!1&&!E.minWidth&&(E.minWidth=0)),S.createElement(`div`,{...g,style:{...E,...h,...C},className:T,ref:t},p)});function uz(e,t){let n=[void 0,void 0],r=Array.isArray(e)?e:[e,void 0],i=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0};return r.forEach((e,t)=>{if(hd(e))for(let r=0;r{let[n,r]=S.useState(()=>md(e)?e:``),i=()=>{if(md(e)&&r(e),hd(e))for(let n=0;n{i()},[JSON.stringify(e),t]),n},fz=S.forwardRef((e,t)=>{let{prefixCls:n,justify:r,align:i,className:a,style:o,children:s,gutter:c=0,wrap:l,...u}=e,{getPrefixCls:d,direction:f}=S.useContext(oi),p=KC(!0,null),m=dz(i,p),h=dz(r,p),g=d(`row`,n),[_,v]=Iee(g),y=uz(c,p),b=J(g,{[`${g}-no-wrap`]:l===!1,[`${g}-${h}`]:h,[`${g}-${m}`]:m,[`${g}-rtl`]:f===`rtl`},a,_,v),x={};y?.[0]&&(x.marginInline=pd(y[0])?`${y[0]/-2}px`:`calc(${y[0]} / -2)`);let[C,w]=y;x.rowGap=w;let T=S.useMemo(()=>({gutter:[C,w],wrap:l}),[C,w,l]);return S.createElement(sz.Provider,{value:T},S.createElement(`div`,{...u,className:b,style:{...x,...o},ref:t},s))}),pz=lz,mz=e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},hz=e=>{let{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:a,orientationMargin:o,verticalMarginInline:s}=e,c=`${t}-rail`;return{[t]:{...Jc(e),borderBlockStart:`${Y(i)} solid ${r}`,[c]:{borderBlockStart:`${Y(i)} solid ${r}`},"&-vertical":{position:`relative`,top:`-0.06em`,display:`inline-block`,height:`0.9em`,marginInline:s,marginBlock:0,verticalAlign:`middle`,borderTop:0,borderInlineStart:`${Y(i)} solid ${r}`},"&-horizontal":{display:`flex`,clear:`both`,width:`100%`,minWidth:`100%`,margin:`${Y(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:`flex`,alignItems:`center`,margin:`${Y(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:`nowrap`,textAlign:`center`,borderBlockStart:`0 ${r}`,[`${c}-start, ${c}-end`]:{width:`50%`,borderBlockStartColor:`inherit`,borderBlockEnd:0,content:`''`}},[`&-horizontal${t}-with-text-start`]:{[`${c}-start`]:{width:`calc(${o} * 100%)`},[`${c}-end`]:{width:`calc(100% - ${o} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{[`${c}-start`]:{width:`calc(100% - ${o} * 100%)`},[`${c}-end`]:{width:`calc(${o} * 100%)`}},[`${t}-inner-text`]:{display:`inline-block`,paddingBlock:0,paddingInline:a},"&-dashed":{background:`none`,borderColor:r,borderStyle:`dashed`,borderWidth:`${Y(i)} 0 0`,[c]:{borderBlockStart:`${Y(i)} dashed ${r}`}},[`&-horizontal${t}-with-text${t}-dashed`]:{[`${c}-start, ${c}-end`]:{borderStyle:`dashed none none`}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:`none`,borderColor:r,borderStyle:`dotted`,borderWidth:`${Y(i)} 0 0`,[c]:{borderBlockStart:`${Y(i)} dotted ${r}`}},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:`dotted none none`}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{[`${c}-start`]:{width:0},[`${c}-end`]:{width:`100%`},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{[`${c}-start`]:{width:`100%`},[`${c}-end`]:{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}}}},gz=rl(`Divider`,e=>{let t=gs(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[hz(t),mz(t)]},e=>({textPaddingInline:`1em`,orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}}),_z=[`left`,`right`,`center`,`start`,`end`],vz=e=>{let{getPrefixCls:t,direction:n,className:r,style:i,classNames:a,styles:o}=li(`divider`),{prefixCls:s,type:c,orientation:l,vertical:u,titlePlacement:d,orientationMargin:f,className:p,rootClassName:m,children:h,dashed:g,variant:_=`solid`,plain:v,style:y,size:b,classNames:x,styles:C,...w}=e,T=t(`divider`,s),E=`${T}-rail`,[D,O]=gz(T),k=th(b),A=!!h,j=_z.includes(l||``),M=S.useMemo(()=>{let e=d??(j?l:`center`);return e===`left`?n===`rtl`?`end`:`start`:e===`right`?n===`rtl`?`start`:`end`:e},[n,l,d,j]),N=M===`start`&&f!=null,P=M===`end`&&f!=null,[F,I]=Rd(l,u,c),L={...e,orientation:F,titlePlacement:M,size:k},[R,z]=Fd([a,x],[o,C],{props:L}),B=J(T,r,D,O,`${T}-${F}`,{[`${T}-with-text`]:A,[`${T}-with-text-${M}`]:A,[`${T}-dashed`]:!!g,[`${T}-${_}`]:_!==`solid`,[`${T}-plain`]:!!v,[`${T}-rtl`]:n===`rtl`,[`${T}-no-default-orientation-margin-start`]:N,[`${T}-no-default-orientation-margin-end`]:P,[`${T}-md`]:k===`medium`||k===`middle`,[`${T}-sm`]:k===`small`,[E]:!h,[R.rail]:R.rail&&!h},p,m,R.root),V=S.useMemo(()=>pd(f)?f:/^\d+$/.test(f)?Number(f):f,[f]),H={marginInlineStart:N?V:void 0,marginInlineEnd:P?V:void 0};return S.createElement(`div`,{className:B,style:{...i,...z.root,...h?{}:z.rail,...y},...w,role:`separator`},h&&!I&&S.createElement(S.Fragment,null,S.createElement(`div`,{className:J(E,`${E}-start`,R.rail),style:z.rail}),S.createElement(`span`,{className:J(`${T}-inner-text`,R.content),style:{...H,...z.content}},h),S.createElement(`div`,{className:J(E,`${E}-end`,R.rail),style:z.rail})))},yz={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`minus`,theme:`outlined`};function bz(){return bz=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,bz({},e,{ref:t,icon:yz}))),Sz={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z`}}]},name:`up`,theme:`outlined`};function Cz(){return Cz=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Cz({},e,{ref:t,icon:Sz})));function Tz(){return typeof BigInt==`function`}function Ez(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function Dz(e){var t=e.trim(),n=t.startsWith(`-`);n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,`$1`).replace(/\.0*$/,``).replace(/^0+/,``),t.startsWith(`.`)&&(t=`0${t}`);var r=t||`0`,i=r.split(`.`),a=i[0]||`0`,o=i[1]||`0`;a===`0`&&o===`0`&&(n=!1);var s=n?`-`:``;return{negative:n,negativeStr:s,trimStr:r,integerStr:a,decimalStr:o,fullStr:`${s}${r}`}}function Oz(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes(`e`)}function kz(e){var t=Uo(e.toLowerCase().split(`e`),2),n=t[0],r=t[1],i=r===void 0?`0`:r,a=n.startsWith(`-`),o=Uo((a?n.slice(1):n).split(`.`),2),s=o[0],c=s===void 0?`0`:s,l=o[1],u=l===void 0?``:l;return{decimal:u,digits:`${c}${u}`.replace(/^0+/,``)||`0`,exponent:Number(i),integer:c,negative:a}}function Az(e){var t=e.decimal,n=e.digits,r=e.exponent,i=e.integer,a=e.negative;if(n===`0`)return`0`;var o=i.replace(/^0+/,``).length,s=(t.match(/^0*/)||[``])[0].length,c=(o||-s)+r,l=``;return l=c<=0?`0.${`0`.repeat(-c)}${n}`:c>=n.length?`${n}${`0`.repeat(c-n.length)}`:`${n.slice(0,c)}.${n.slice(c)}`,`${a?`-`:``}${l}`}function jz(e){return e.exponent>=0?Math.max(0,e.decimal.length-e.exponent):Math.abs(e.exponent)+e.decimal.length}function Mz(e){var t=String(e);return Oz(e)?jz(kz(t)):t.includes(`.`)&&Pz(t)?t.length-t.indexOf(`.`)-1:0}function Nz(e){var t=String(e);if(Oz(e)){if(e>2**53-1)return String(Tz()?BigInt(e).toString():2**53-1);if(e<-(2**53-1))return String(Tz()?BigInt(e).toString():-(2**53-1));var n=kz(t),r=jz(n);t=r>100?Az(n):e.toFixed(r)}return Dz(t).fullStr}function Pz(e){return typeof e==`number`?!Number.isNaN(e):e?/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e):!1}var Fz=function(){function e(t){if(Yo(this,e),Ko(this,`origin`,``),Ko(this,`negative`,void 0),Ko(this,`integer`,void 0),Ko(this,`decimal`,void 0),Ko(this,`decimalLen`,void 0),Ko(this,`empty`,void 0),Ko(this,`nan`,void 0),Ez(t)){this.empty=!0;return}if(this.origin=String(t),t===`-`||Number.isNaN(t)){this.nan=!0;return}var n=t;if(Oz(n)&&(n=Number(n)),n=typeof n==`string`?n:Nz(n),Pz(n)){var r=Dz(n);this.negative=r.negative;var i=r.trimStr.split(`.`);this.integer=BigInt(i[0]);var a=i[1]||`0`;this.decimal=BigInt(a),this.decimalLen=a.length}else this.nan=!0}return Zo(e,[{key:`getMark`,value:function(){return this.negative?`-`:``}},{key:`getIntegerStr`,value:function(){return this.integer.toString()}},{key:`getDecimalStr`,value:function(){return this.decimal.toString().padStart(this.decimalLen,`0`)}},{key:`alignDecimal`,value:function(e){var t=`${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(e,`0`)}`;return BigInt(t)}},{key:`negate`,value:function(){var t=new e(this.toString());return t.negative=!t.negative,t}},{key:`cal`,value:function(t,n,r){var i=Math.max(this.getDecimalStr().length,t.getDecimalStr().length),a=n(this.alignDecimal(i),t.alignDecimal(i)).toString(),o=r(i),s=Dz(a),c=`${s.negativeStr}${s.trimStr.padStart(o+1,`0`)}`;return new e(`${c.slice(0,-o)}.${c.slice(-o)}`)}},{key:`add`,value:function(t){if(this.isInvalidate())return new e(t);var n=new e(t);return n.isInvalidate()?this:this.cal(n,function(e,t){return e+t},function(e){return e})}},{key:`multi`,value:function(t){var n=new e(t);return this.isInvalidate()||n.isInvalidate()?new e(NaN):this.cal(n,function(e,t){return e*t},function(e){return e*2})}},{key:`isEmpty`,value:function(){return this.empty}},{key:`isNaN`,value:function(){return this.nan}},{key:`isInvalidate`,value:function(){return this.isEmpty()||this.isNaN()}},{key:`equals`,value:function(e){return this.toString()===e?.toString()}},{key:`lessEquals`,value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:`toNumber`,value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:`toString`,value:function(){return!(arguments.length>0&&arguments[0]!==void 0)||arguments[0]?this.isInvalidate()?``:Dz(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr:this.origin}}]),e}(),Iz=function(){function e(t){if(Yo(this,e),Ko(this,`origin`,``),Ko(this,`number`,void 0),Ko(this,`empty`,void 0),Ez(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return Zo(e,[{key:`negate`,value:function(){return new e(-this.toNumber())}},{key:`add`,value:function(t){if(this.isInvalidate())return new e(t);var n=Number(t);if(Number.isNaN(n))return this;var r=this.number+n;if(r>2**53-1)return new e(2**53-1);if(r<-(2**53-1))return new e(-(2**53-1));var i=Math.max(Mz(this.number),Mz(n));return new e(r.toFixed(i))}},{key:`multi`,value:function(t){var n=Number(t);if(this.isInvalidate()||Number.isNaN(n))return new e(NaN);var r=this.number*n;if(r>2**53-1)return new e(2**53-1);if(r<-(2**53-1))return new e(-(2**53-1));var i=Math.max(Mz(this.number),Mz(n));return new e(r.toFixed(i))}},{key:`isEmpty`,value:function(){return this.empty}},{key:`isNaN`,value:function(){return Number.isNaN(this.number)}},{key:`isInvalidate`,value:function(){return this.isEmpty()||this.isNaN()}},{key:`equals`,value:function(e){return this.toNumber()===e?.toNumber()}},{key:`lessEquals`,value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:`toNumber`,value:function(){return this.number}},{key:`toString`,value:function(){return!(arguments.length>0&&arguments[0]!==void 0)||arguments[0]?this.isInvalidate()?``:Oz(this.number)&&Mz(this.number)>100?String(this.number):Nz(this.number):this.origin}}]),e}();function Lz(e){return Tz()?new Fz(e):new Iz(e)}function Rz(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===``)return``;var i=Dz(e),a=i.negativeStr,o=i.integerStr,s=i.decimalStr,c=`${t}${s}`,l=`${a}${o}`;if(n>=0){var u=Number(s[n]);return u>=5&&!r?Rz(Lz(e).add(`${a}0.${`0`.repeat(n)}${10-u}`).toString(),t,n,r):n===0?l:`${l}${t}${s.padEnd(n,`0`).slice(0,n)}`}return c===`.0`?l:`${l}${c}`}var zz=Lz;function Bz(e,t){return typeof Proxy<`u`&&e?new Proxy(e,{get(e,n){if(t[n])return t[n];let r=e[n];return typeof r==`function`?r.bind(e):r}}):e}function Vz(e,t){let n=(0,S.useRef)(null);function r(){try{let{selectionStart:t,selectionEnd:r,value:i}=e;n.current={start:t,end:r,value:i,beforeTxt:i.substring(0,t),afterTxt:i.substring(r)}}catch{}}function i(){if(e&&n.current&&t)try{let{value:t}=e,{beforeTxt:r,afterTxt:i,start:a}=n.current,o=t.length;if(t.startsWith(r))o=r.length;else if(t.endsWith(i))o=t.length-n.current.afterTxt.length;else{let e=r[a-1],n=t.indexOf(e,a-1);n!==-1&&(o=n+1)}e.setSelectionRange(o,o)}catch(e){br(!1,`Something warning of cursor restore. Please fire issue about this: ${e.message}`)}}return[r,i]}var Hz=200,Uz=600;function Wz({prefixCls:e,action:t,children:n,disabled:r,className:i,style:a,onStep:o}){let s=t===`up`,c=S.useRef(),l=S.useRef([]),u=()=>{clearTimeout(c.current)},d=e=>{e.preventDefault(),u(),o(s,`handler`);function t(){o(s,`handler`),c.current=setTimeout(t,Hz)}c.current=setTimeout(t,Uz)};S.useEffect(()=>()=>{u(),l.current.forEach(e=>{ri.cancel(e)})},[]);let f=`${e}-action`,p=J(f,`${f}-${t}`,{[`${f}-${t}-disabled`]:r},i),m=()=>l.current.push(ri(u));return S.createElement(`span`,{unselectable:`on`,role:`button`,onMouseUp:m,onMouseLeave:m,onMouseDown:e=>{d(e)},"aria-label":s?`Increase Value`:`Decrease Value`,"aria-disabled":r,className:p,style:a},n||S.createElement(`span`,{unselectable:`on`,className:`${e}-action-${t}-inner`}))}function Gz(e){let t=typeof e==`number`?Nz(e):Dz(e).fullStr;return t.includes(`.`)?Dz(t.replace(/(\d)\.(\d)/g,`$1$2.`)).fullStr:e+`0`}var Kz=(()=>{let e=(0,S.useRef)(0),t=()=>{ri.cancel(e.current)};return(0,S.useEffect)(()=>t,[]),n=>{t(),e.current=ri(()=>{n()})}});function qz(){return qz=Object.assign?Object.assign.bind():function(e){for(var t=1;te||t.isEmpty()?t.toString():t.toNumber(),Yz=e=>{let t=zz(e);return t.isInvalidate()?null:t},Xz=S.forwardRef((e,t)=>{let{mode:n=`input`,prefixCls:r=`rc-input-number`,className:i,style:a,classNames:o,styles:s,min:c,max:l,step:u=1,defaultValue:d,value:f,disabled:p,readOnly:m,upHandler:h,downHandler:g,keyboard:_,changeOnWheel:v=!1,controls:y=!0,prefix:b,suffix:x,stringMode:C,parser:w,formatter:T,precision:E,decimalSeparator:D,onChange:O,onInput:k,onPressEnter:A,onStep:j,onMouseDown:M,onClick:N,onMouseUp:P,onMouseLeave:F,onMouseMove:I,onMouseEnter:L,onMouseOut:R,changeOnBlur:z=!0,...B}=e,[V,H]=S.useState(!1),U=S.useRef(!1),W=S.useRef(!1),ee=S.useRef(!1),te=S.useRef(null),ne=S.useRef(null);S.useImperativeHandle(t,()=>Bz(ne.current,{focus:e=>{l_(ne.current,e)},blur:()=>{ne.current?.blur()},nativeElement:te.current}));let[re,ie]=S.useState(()=>zz(f??d));function ae(e){f===void 0&&ie(e)}let G=S.useCallback((e,t)=>{if(!t)return E>=0?E:Math.max(Mz(e),Mz(u))},[E,u]),oe=S.useCallback(e=>{let t=String(e);if(w)return w(t);let n=t;return D&&(n=n.replace(D,`.`)),n.replace(/[^\w.-]+/g,``)},[w,D]),K=S.useRef(``),se=S.useCallback((e,t)=>{if(T)return T(e,{userTyping:t,input:String(K.current)});let n=typeof e==`number`?Nz(e):e;if(!t){let e=G(n,t);Pz(n)&&(D||e>=0)&&(n=Rz(n,D||`.`,e))}return n},[T,G,D]),[ce,q]=S.useState(()=>{let e=d??f;return re.isInvalidate()&&[`string`,`number`].includes(typeof e)?Number.isNaN(e)?``:e:se(re.toString(),!1)});K.current=ce;function le(e,t){q(se(e.isInvalidate()?e.toString(!1):e.toString(!t),t))}let ue=S.useMemo(()=>Yz(l),[l,E]),de=S.useMemo(()=>Yz(c),[c,E]),fe=S.useMemo(()=>!ue||!re||re.isInvalidate()?!1:ue.lessEquals(re),[ue,re]),pe=S.useMemo(()=>!de||!re||re.isInvalidate()?!1:re.lessEquals(de),[de,re]),[me,he]=Vz(ne.current,V),ge=e=>ue&&!e.lessEquals(ue)?ue:de&&!de.lessEquals(e)?de:null,_e=e=>!ge(e),ve=(e,t)=>{let n=e,r=_e(n)||n.isEmpty();if(!n.isEmpty()&&!t&&(n=ge(n)||n,r=!0),!m&&!p&&r){let e=n.toString(),r=G(e,t);return r>=0&&(n=zz(Rz(e,`.`,r)),_e(n)||(n=zz(Rz(e,`.`,r,!0)))),n.equals(re)||(ae(n),O?.(n.isEmpty()?null:Jz(C,n)),f===void 0&&le(n,t)),n}return re},ye=Kz(),be=e=>{if(me(),K.current=e,q(e),!W.current){let t=zz(oe(e));t.isNaN()||ve(t,!0)}k?.(e),ye(()=>{let t=e;w||(t=e.replace(/。/g,`.`)),t!==e&&be(t)})},xe=()=>{W.current=!0},Se=()=>{W.current=!1,be(ne.current.value)},Ce=e=>{be(e.target.value)},we=In((e,t)=>{if(e&&fe||!e&&pe)return;U.current=!1;let n=zz(ee.current?Gz(u):u);e||(n=n.negate());let r=ve((re||zz(0)).add(n.toString()),!1);j?.(Jz(C,r),{offset:ee.current?Gz(u):u,type:e?`up`:`down`,emitter:t}),ne.current?.focus()}),Te=e=>{let t=zz(oe(ce)),n;n=t.isNaN()?ve(re,e):ve(t,e),f===void 0?n.isNaN()||le(n,!1):le(re,!1)},Ee=()=>{U.current=!0},De=e=>{let{key:t,shiftKey:n}=e;U.current=!0,ee.current=n,t===`Enter`&&(W.current||(U.current=!1),Te(!1),A?.(e)),_!==!1&&!W.current&&[`Up`,`ArrowUp`,`Down`,`ArrowDown`].includes(t)&&(we(t===`Up`||t===`ArrowUp`,`keyboard`),e.preventDefault())},Oe=()=>{U.current=!1,ee.current=!1};S.useEffect(()=>{if(v&&V){let e=e=>{we(e.deltaY<0,`wheel`),e.preventDefault()},t=ne.current;if(t)return t.addEventListener(`wheel`,e,{passive:!1}),()=>t.removeEventListener(`wheel`,e)}});let ke=()=>{z&&Te(!1),H(!1),U.current=!1},Ae=e=>{ne.current&&e.target!==ne.current&&(ne.current.focus(),e.preventDefault()),M?.(e)};Bn(()=>{re.isInvalidate()||le(re,!1)},[E,T]),Bn(()=>{let e=zz(f);ie(e);let t=zz(oe(ce));(!e.equals(t)||!U.current||T)&&le(e,U.current)},[f]),Bn(()=>{T&&he()},[ce]);let je={prefixCls:r,onStep:we,className:o?.action,style:s?.action},Me=S.createElement(Wz,qz({},je,{action:`up`,disabled:fe}),h),Ne=S.createElement(Wz,qz({},je,{action:`down`,disabled:pe}),g);return S.createElement(`div`,{ref:te,className:J(r,`${r}-mode-${n}`,i,o?.root,{[`${r}-focused`]:V,[`${r}-disabled`]:p,[`${r}-readonly`]:m,[`${r}-not-a-number`]:re.isNaN(),[`${r}-out-of-range`]:!re.isInvalidate()&&!_e(re)}),style:{...s?.root,...a},onMouseDown:Ae,onMouseUp:P,onMouseLeave:F,onMouseMove:I,onMouseEnter:L,onMouseOut:R,onClick:N,onFocus:()=>{H(!0)},onBlur:ke,onKeyDown:De,onKeyUp:Oe,onCompositionStart:xe,onCompositionEnd:Se,onBeforeInput:Ee},n===`spinner`&&y&&Ne,b!==void 0&&S.createElement(`div`,{className:J(`${r}-prefix`,o?.prefix),style:s?.prefix},b),S.createElement(`input`,qz({autoComplete:`off`,role:`spinbutton`,"aria-valuemin":c,"aria-valuemax":l,"aria-valuenow":re.isInvalidate()?null:re.toString(),step:u,ref:ne,className:J(`${r}-input`,o?.input),style:s?.input,value:ce,onChange:Ce,disabled:p,readOnly:m},B)),x!==void 0&&S.createElement(`div`,{className:J(`${r}-suffix`,o?.suffix),style:s?.suffix},x),n===`spinner`&&y&&Me,n===`input`&&y&&S.createElement(`div`,{className:J(`${r}-actions`,o?.actions),style:s?.actions},Me,Ne))}),Zz=e=>{let{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:a,fontSizeLG:o,fontSizeSM:s,borderRadiusLG:c,borderRadiusSM:l,colorBgContainerDisabled:u,lineWidth:d,antCls:f}=e,[p,m]=ol(f,`space`);return{[t]:[{display:`inline-flex`,alignItems:`center`,gap:0,whiteSpace:`nowrap`,paddingInline:r,margin:0,borderWidth:d,borderStyle:`solid`,borderRadius:n,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:o,borderRadius:c},"&-small":{paddingInline:a,borderRadius:l,fontSize:s},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[p(`addon-border-color`)]:i,[p(`addon-background`)]:u,[p(`addon-border-color-outlined`)]:i,[p(`addon-background-filled`)]:u,borderColor:m(`addon-border-color`),background:m(`addon-background`),"&-variant-outlined":{[p(`addon-border-color`)]:m(`addon-border-color-outlined`)},"&-variant-filled":{[p(`addon-border-color`)]:`transparent`,[p(`addon-background`)]:m(`addon-background-filled`),[`&${t}-disabled`]:{[p(`addon-border-color`)]:i,[p(`addon-background`)]:u}},"&-variant-borderless":{border:`none`,background:`transparent`},"&-variant-underlined":{border:`none`,background:`transparent`}},{"&-status-error":{[p(`addon-border-color-outlined`)]:e.colorError,[p(`addon-background-filled`)]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[p(`addon-border-color-outlined`)]:e.colorWarning,[p(`addon-background-filled`)]:e.colorWarningBg,color:e.colorWarning}}]}},Qz=rl([`Space`,`Addon`],e=>[Zz(e),Yg(e,{focus:!1})]),$z=S.forwardRef((e,t)=>{let{className:n,children:r,style:i,prefixCls:a,variant:o=`outlined`,disabled:s,status:c,...l}=e,{getPrefixCls:u,direction:d}=S.useContext(oi),f=u(`space-addon`,a),[p,m]=Qz(f),{compactItemClassnames:h,compactSize:g}=ih(f,d),_=aC(f,c),v=J(f,p,h,m,`${f}-variant-${o}`,_,{[`${f}-${g}`]:g,[`${f}-disabled`]:s},n);return S.createElement(`div`,{ref:t,className:v,style:i,...l},r)}),eB=e=>{let t=e.handleVisible??`auto`,n=e.controlHeightSM-e.lineWidth*2;return{...tL(e),controlWidth:90,handleWidth:n,handleFontSize:e.fontSize/2,handleVisible:t,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new Rs(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:+(t===!0),handleVisibleWidth:t===!0?n:0}},tB=e=>{let{componentCls:t,lineWidth:n,lineType:r,borderRadius:i,inputFontSizeSM:a,inputFontSizeLG:o,colorError:s,paddingInlineSM:c,paddingBlockSM:l,paddingBlockLG:u,paddingInlineLG:d,colorIcon:f,colorTextDisabled:p,motionDurationMid:m,handleHoverColor:h,handleOpacity:g,paddingInline:_,paddingBlock:v,handleBg:y,handleActiveBg:b,inputAffixPadding:x,borderRadiusSM:S,controlWidth:C,handleBorderColor:w,filledHandleBg:T,lineHeightLG:E,antCls:D}=e,O=`${Y(n)} ${r} ${w}`,[k,A]=ol(D,`input-number`);return[{[t]:{...Jc(e),...vL(e),[k(`input-padding-block`)]:Y(v),[k(`input-padding-inline`)]:Y(_),display:`inline-flex`,width:C,margin:0,paddingBlock:0,borderRadius:i,...aL(e,{[`${t}-actions`]:{background:y,[`${t}-action-down`]:{borderBlockStart:O}}}),...uL(e,{[`${t}-actions`]:{background:T,[`${t}-action-down`]:{borderBlockStart:O}},"&:focus-within":{[`${t}-actions`]:{background:y}}}),...mL(e,{[`${t}-actions`]:{background:y,[`${t}-action-down`]:{borderBlockStart:O}}}),...sL(e),[`&${t}-borderless`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(v).add(n).equal())},[`&${t}-borderless${t}-sm`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(l).add(n).equal())},[`&${t}-borderless${t}-lg`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(u).add(n).equal())},"&-rtl":{direction:`rtl`,[`${t}-input`]:{direction:`rtl`}},[`&${t}-out-of-range`]:{[`${t}-input`]:{color:s}},[`${t}-input`]:{...Jc(e),width:`100%`,paddingBlock:A(`input-padding-block`),textAlign:`start`,backgroundColor:`transparent`,border:0,borderRadius:0,outline:0,transition:`all ${m} linear`,appearance:`textfield`,fontSize:`inherit`,lineHeight:`inherit`,...hL(e.colorTextPlaceholder),'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:`none`}},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1},[`&-disabled ${t}-input`]:{cursor:`not-allowed`,color:e.colorTextDisabled}}},{[t]:{[`${t}-action`]:{...Yc(),userSelect:`none`,overflow:`hidden`,fontWeight:`bold`,lineHeight:0,textAlign:`center`,cursor:`pointer`,transition:`all ${m} linear`,[`&:active:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{background:b},[`&:hover:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{color:h},[`&${t}-action-up-disabled, &${t}-action-down-disabled`]:{cursor:`not-allowed`,color:p}},"&-mode-input":{overflow:`hidden`,[`${t}-actions`]:{position:`absolute`,insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:g,height:`100%`,borderRadius:0,display:`flex`,flexDirection:`column`,alignItems:`stretch`,transition:`all ${m}`,overflow:`hidden`,[`${t}-action`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,flex:`auto`,height:`40%`,marginInlineEnd:0,fontSize:e.handleFontSize}},[`&:hover ${t}-actions, &-focused ${t}-actions`]:{width:e.handleWidth,opacity:1},[`${t}-action`]:{color:f,height:`50%`,borderInlineStart:O,[`&:hover:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{height:`60%`}},[`&${t}-disabled, &${t}-readonly`]:{[`${t}-actions`]:{display:`none`}}},[`&${t}-mode-spinner`]:{padding:0,width:`auto`,[`${t}-action`]:{flex:`none`,paddingInline:A(`input-padding-inline`),"&-up":{borderInlineStart:O},"&-down":{borderInlineEnd:O}},[`${t}-input`]:{textAlign:`center`,paddingInline:A(`input-padding-inline`)}}}},{[t]:{"&-lg":{[k(`input-padding-block`)]:Y(u),[k(`input-padding-inline`)]:Y(d),paddingBlock:0,fontSize:o,lineHeight:E},"&-sm":{[k(`input-padding-block`)]:Y(l),[k(`input-padding-inline`)]:Y(c),paddingBlock:0,fontSize:a,borderRadius:S}}},{[t]:{[`${t}-prefix, ${t}-suffix`]:{display:`flex`,flex:`none`,alignItems:`center`,alignSelf:`center`,pointerEvents:`none`},[`${t}-prefix`]:{marginInlineEnd:x},[`${t}-suffix`]:{height:`100%`,marginInlineStart:x,transition:`margin ${m}`},[`&:hover:not(${t}-without-controls)`]:{[`${t}-suffix`]:{marginInlineEnd:e.handleWidth}}}}]},nB=e=>{let{componentCls:t,antCls:n}=e;return{[`${t}-addon`]:{[`&:has(${n}-select)`]:{border:0,padding:0}}}},rB=rl(`InputNumber`,e=>{let t=gs(e,eL(e));return[tB(t),nB(t),Yg(t)]},eB,{unitless:{handleOpacity:!0},resetFont:!1}),iB=S.forwardRef((e,t)=>{let n=S.useRef(null);S.useImperativeHandle(t,()=>n.current);let{rootClassName:r,size:i,disabled:a,prefixCls:o,addonBefore:s,addonAfter:c,prefix:l,suffix:u,bordered:d,readOnly:f,status:p,controls:m=!0,variant:h,className:g,style:_,classNames:v,styles:y,mode:b,...x}=e,{direction:C,className:w,style:T,styles:E,classNames:D}=li(`inputNumber`),O=S.useContext(zp),k=a??O,A=S.useMemo(()=>!m||k||f?!1:m,[m,k,f]),{compactSize:j,compactItemClassnames:M}=ih(o,C),N=b===`spinner`?S.createElement(TL,null):S.createElement(wz,null),P=b===`spinner`?S.createElement(xz,null):S.createElement(AC,null),F=typeof A==`boolean`?A:void 0;hd(A)&&(N=A.upIcon||N,P=A.downIcon||P);let{hasFeedback:I,isFormItemInput:L,feedbackIcon:R}=S.useContext(Sy),z=th(e=>i??j??e),[B,V]=hC(`inputNumber`,h,d),H=I&&S.createElement(S.Fragment,null,R),U={...e,size:z,disabled:k,controls:A},[W,ee]=Fd([D,v],[E,y],{props:U});return S.createElement(Xz,{ref:n,mode:b,disabled:k,className:J(g,r,W.root,w,M,aC(o,p,I),{[`${o}-${B}`]:V,[`${o}-lg`]:z===`large`,[`${o}-sm`]:z===`small`,[`${o}-rtl`]:C===`rtl`,[`${o}-in-form-item`]:L,[`${o}-without-controls`]:!A}),style:{...ee.root,...T,..._},upHandler:N,downHandler:P,prefixCls:o,readOnly:f,controls:F,prefix:l,suffix:H||u,classNames:W,styles:ee,...x})}),aB=S.forwardRef((e,t)=>{let{addonBefore:n,addonAfter:r,prefixCls:i,className:a,status:o,rootClassName:s,...c}=e,{getPrefixCls:l}=li(`inputNumber`),u=l(`input-number`,i),{status:d}=S.useContext(Sy),f=oC(d,o),p=bf(u),[m,h]=rB(u,p),g=n||r,_=S.createElement(iB,{ref:t,...c,prefixCls:u,status:f,className:J(h,p,m,a),rootClassName:g?void 0:s});if(g){let t=t=>t?S.createElement($z,{className:J(`${u}-addon`,h,m),variant:e.variant,disabled:e.disabled,status:f},S.createElement(Ty,{form:!0},t)):null,i=t(n),a=t(r);return S.createElement(sh,{rootClassName:s},i,_,a)}return _}),oB=aB;oB._InternalPanelDoNotUseOrYouWillBeFired=e=>S.createElement(am,{theme:{components:{InputNumber:{handleVisible:!0}}}},S.createElement(aB,{...e}));function sB(e){return!!(e.addonBefore||e.addonAfter)}function cB(e){return!!(e.prefix||e.suffix||e.allowClear)}function lB(e,t,n){let r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart==`number`&&typeof t.selectionEnd==`number`&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=(...e)=>{t.setSelectionRange(...e)},i}function uB(e,t,n,r){if(!n)return;let i=t;if(t.type===`click`){i=lB(t,e,``),n(i);return}if(e.type!==`file`&&r!==void 0){i=lB(t,e,r),n(i);return}n(i)}function dB(){return dB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{inputElement:n,children:r,prefixCls:i,prefix:a,suffix:o,addonBefore:s,addonAfter:c,className:l,style:u,disabled:d,readOnly:f,focused:p,triggerFocus:m,allowClear:h,value:g,handleReset:_,hidden:v,classes:y,classNames:b,dataAttrs:x,styles:C,components:w,onClear:T}=e,E=r??n,D=w?.affixWrapper||`span`,O=w?.groupWrapper||`span`,k=w?.wrapper||`span`,A=w?.groupAddon||`span`,j=(0,S.useRef)(null),M=e=>{j.current?.contains(e.target)&&m?.()},N=cB(e),P=(0,S.cloneElement)(E,{value:g,className:J(E.props?.className,!N&&b?.variant)||null}),F=(0,S.useRef)(null);if(S.useImperativeHandle(t,()=>({nativeElement:F.current||j.current})),N){let e=null;if(h){let t=!d&&!f&&g,n=`${i}-clear-icon`,r=typeof h==`object`&&h?.clearIcon?h.clearIcon:`✖`;e=S.createElement(`button`,{type:`button`,tabIndex:-1,onClick:e=>{_?.(e),T?.()},onMouseDown:e=>e.preventDefault(),className:J(n,{[`${n}-hidden`]:!t,[`${n}-has-suffix`]:!!o})},r)}let t=`${i}-affix-wrapper`,n=J(t,{[`${i}-disabled`]:d,[`${t}-disabled`]:d,[`${t}-focused`]:p,[`${t}-readonly`]:f,[`${t}-input-with-clear-btn`]:o&&h&&g},y?.affixWrapper,b?.affixWrapper,b?.variant),r=(o||h)&&S.createElement(`span`,{className:J(`${i}-suffix`,b?.suffix),style:C?.suffix},e,o);P=S.createElement(D,dB({className:n,style:C?.affixWrapper,onClick:M},x?.affixWrapper,{ref:j}),a&&S.createElement(`span`,{className:J(`${i}-prefix`,b?.prefix),style:C?.prefix},a),P,r)}if(sB(e)){let e=`${i}-group`,t=`${e}-addon`,n=`${e}-wrapper`,r=J(`${i}-wrapper`,e,y?.wrapper,b?.wrapper),a=J(n,{[`${n}-disabled`]:d},y?.group,b?.groupWrapper);P=S.createElement(O,{className:a,ref:F},S.createElement(k,{className:r},s&&S.createElement(A,{className:t},s),P,c&&S.createElement(A,{className:t},c)))}return S.cloneElement(P,{className:J(P.props?.className,l)||null,style:{...P.props?.style,...u},hidden:v})});function pB(e,t){return S.useMemo(()=>{let n={};t&&(n.show=typeof t==`object`&&t.formatter?t.formatter:!!t),n={...n,...e};let{show:r,...i}=n;return{...i,show:!!r,showFormatter:typeof r==`function`?r:void 0,strategy:i.strategy||(e=>e.length)}},[e,t])}function mB(){return mB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{autoComplete:n,onChange:r,onFocus:i,onBlur:a,onPressEnter:o,onKeyDown:s,onKeyUp:c,prefixCls:l=`rc-input`,disabled:u,htmlSize:d,className:f,maxLength:p,suffix:m,showCount:h,count:g,type:_=`text`,classes:v,classNames:y,styles:b,onCompositionStart:x,onCompositionEnd:C,...w}=e,[T,E]=(0,S.useState)(!1),D=(0,S.useRef)(!1),O=(0,S.useRef)(!1),k=(0,S.useRef)(null),A=(0,S.useRef)(null),j=e=>{k.current&&l_(k.current,e)},[M,N]=Hn(e.defaultValue,e.value),P=M==null?``:String(M),[F,I]=(0,S.useState)(null),L=pB(g,h),R=L.max||p,z=L.strategy(P),B=!!R&&z>R;(0,S.useImperativeHandle)(t,()=>({focus:j,blur:()=>{k.current?.blur()},setSelectionRange:(e,t,n)=>{k.current?.setSelectionRange(e,t,n)},select:()=>{k.current?.select()},input:k.current,nativeElement:A.current?.nativeElement||k.current})),(0,S.useEffect)(()=>{O.current&&=!1,E(e=>e&&u?!1:e)},[u]);let V=(e,t,n)=>{let i=t;if(!D.current&&L.exceedFormatter&&L.max&&L.strategy(t)>L.max)i=L.exceedFormatter(t,{max:L.max}),t!==i&&I([k.current?.selectionStart||0,k.current?.selectionEnd||0]);else if(n.source===`compositionEnd`)return;N(i),k.current&&uB(k.current,e,r,i)};(0,S.useEffect)(()=>{F&&k.current?.setSelectionRange(...F)},[F]);let H=e=>{V(e,e.target.value,{source:`change`})},U=e=>{D.current=!1,V(e,e.currentTarget.value,{source:`compositionEnd`}),C?.(e)},W=e=>{o&&e.key===`Enter`&&!O.current&&!e.nativeEvent.isComposing&&(O.current=!0,o(e)),s?.(e)},ee=e=>{e.key===`Enter`&&(O.current=!1),c?.(e)},te=e=>{E(!0),i?.(e)},ne=e=>{O.current&&=!1,E(!1),a?.(e)},re=e=>{N(``),j(),k.current&&uB(k.current,e,r)},ie=B&&`${l}-out-of-range`;return S.createElement(fB,mB({},w,{prefixCls:l,className:J(f,ie),handleReset:re,value:P,focused:T,triggerFocus:j,suffix:(()=>{let e=Number(R)>0;if(m||L.show){let t=L.showFormatter?L.showFormatter({value:P,count:z,maxLength:R}):`${z}${e?` / ${R}`:``}`;return S.createElement(S.Fragment,null,L.show&&S.createElement(`span`,{className:J(`${l}-show-count-suffix`,{[`${l}-show-count-has-suffix`]:!!m},y?.count),style:{...b?.count}},t),m)}return null})(),disabled:u,classes:v,classNames:y,styles:b,ref:A}),(()=>{let t=Sr(e,[`prefixCls`,`onPressEnter`,`addonBefore`,`addonAfter`,`prefix`,`suffix`,`allowClear`,`defaultValue`,`showCount`,`count`,`classes`,`htmlSize`,`styles`,`classNames`,`onClear`]);return S.createElement(`input`,mB({autoComplete:n},t,{onChange:H,onFocus:te,onBlur:ne,onKeyDown:W,onKeyUp:ee,className:J(l,{[`${l}-disabled`]:u},y?.input),style:b?.input,ref:k,size:d,type:_,onCompositionStart:e=>{D.current=!0,x?.(e)},onCompositionEnd:U}))})())}),gB=e=>{let t;return hd(e)&&e?.clearIcon?t=e:e&&(t={clearIcon:S.createElement(Fl,null)}),t};function _B(e,t){let n=(0,S.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute(`type`)===`password`&&e.current?.input.hasAttribute(`value`)&&e.current?.input.removeAttribute(`value`)}))};return(0,S.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[]),r}function vB(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var yB=(0,S.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,status:i,size:a,disabled:o,onBlur:s,onFocus:c,suffix:l,allowClear:u,addonAfter:d,addonBefore:f,className:p,style:m,styles:h,rootClassName:g,onChange:_,classNames:v,variant:y,...b}=e,{getPrefixCls:x,direction:C,allowClear:w,autoComplete:T,className:E,style:D,classNames:O,styles:k}=li(`input`),A=x(`input`,n),j=(0,S.useRef)(null),M=bf(A),[N,P]=yL(A,g);bL(A,M);let{compactSize:F,compactItemClassnames:I}=ih(A,C),L=th(e=>a??F??e),R=S.useContext(zp),z=o??R,B={...e,size:L,disabled:z},[V,H]=Fd([O,v],[k,h],{props:B}),{status:U,hasFeedback:W,feedbackIcon:ee}=(0,S.useContext)(Sy),te=oC(U,i);(0,S.useRef)(vB(e)||!!W);let ne=_B(j,!0),re=e=>{ne(),s?.(e)},ie=e=>{ne(),c?.(e)},ae=e=>{ne(),_?.(e)},G=(W||l)&&S.createElement(S.Fragment,null,l,W&&ee),oe=gB(u??w),[K,se]=hC(`input`,y,r);return S.createElement(hB,{ref:$n(t,j),prefixCls:A,autoComplete:T,...b,disabled:z,onBlur:re,onFocus:ie,style:{...H.root,...D,...m},styles:H,suffix:G,allowClear:oe,className:J(p,g,P,M,I,E,V.root),onChange:ae,addonBefore:f&&S.createElement(Ty,{form:!0,space:!0},f),addonAfter:d&&S.createElement(Ty,{form:!0,space:!0},d),classNames:{...V,input:J({[`${A}-sm`]:L===`small`,[`${A}-lg`]:L===`large`,[`${A}-rtl`]:C===`rtl`},V.input,N),variant:J({[`${A}-${K}`]:se},aC(A,te)),affixWrapper:J({[`${A}-affix-wrapper-sm`]:L===`small`,[`${A}-affix-wrapper-lg`]:L===`large`,[`${A}-affix-wrapper-rtl`]:C===`rtl`},N),wrapper:J({[`${A}-group-rtl`]:C===`rtl`},N),groupWrapper:J({[`${A}-group-wrapper-sm`]:L===`small`,[`${A}-group-wrapper-lg`]:L===`large`,[`${A}-group-wrapper-rtl`]:C===`rtl`,[`${A}-group-wrapper-${K}`]:se},aC(`${A}-group-wrapper`,te,W),N)}})}),bB={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z`}}]},name:`swap-right`,theme:`outlined`};function xB(){return xB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,xB({},e,{ref:t,icon:bB}))),CB=(e,t,n,r,i,a)=>{let{classNames:o,styles:s}=li(e),[c,l]=Fd([o,t],[s,n],{props:a},{popup:{_default:`root`}});return S.useMemo(()=>[{...c,popup:{...c.popup,root:J(c.popup?.root,r)}},{...l,popup:{...l.popup,root:{...l.popup?.root,...i}}}],[c,l,r,i])};function wB(e,t,n){return n===void 0?t===`year`&&e.lang.yearPlaceholder?e.lang.yearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.quarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.monthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.weekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.placeholder:e.lang.placeholder:n}function TB(e,t,n){return n===void 0?t===`year`&&e.lang.yearPlaceholder?e.lang.rangeYearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.rangeQuarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.rangeMonthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.rangeWeekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.rangePlaceholder:e.lang.rangePlaceholder:n}function EB(e,t){let{allowClear:n=!0}=e,{clearIcon:r,removeIcon:i}=PC({...e,prefixCls:t,componentName:`DatePicker`});return[S.useMemo(()=>n===!1?!1:{clearIcon:r,...n===!0?{}:n},[n,r]),i]}var[DB,OB]=[`week`,`WeekPicker`],[kB,AB]=[`month`,`MonthPicker`],[jB,MB]=[`year`,`YearPicker`],[NB,PB]=[`quarter`,`QuarterPicker`],[FB,IB]=[`time`,`TimePicker`],LB={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z`}}]},name:`calendar`,theme:`outlined`};function RB(){return RB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,RB({},e,{ref:t,icon:LB}))),BB={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}},{tag:`path`,attrs:{d:`M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z`}}]},name:`clock-circle`,theme:`outlined`};function VB(){return VB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,VB({},e,{ref:t,icon:BB}))),UB=({picker:e,hasFeedback:t,feedbackIcon:n,suffixIcon:r})=>r===null||r===!1?null:r===!0||r===void 0?S.createElement(S.Fragment,null,e===FB?S.createElement(HB,null):S.createElement(zB,null),t&&n):r,WB=e=>S.createElement(Zg,{size:`small`,type:`primary`,...e});function GB(e){return(0,S.useMemo)(()=>({button:WB,...e}),[e])}var KB=e=>(0,S.forwardRef)((t,n)=>{let{prefixCls:r,getPopupContainer:i,components:a,className:o,style:s,classNames:c,styles:l,placement:u,size:d,disabled:f,bordered:p=!0,placeholder:m,status:h,variant:g,picker:_,dropdownClassName:v,popupClassName:y,popupStyle:b,rootClassName:x,suffixIcon:C,separator:w,...T}=t,[E,D]=CB(_===FB?`timePicker`:`datePicker`,c,l,y||v,b),O=S.useRef(null),{getPrefixCls:k,direction:A,getPopupContainer:j,rangePicker:M}=(0,S.useContext)(oi),N=k(`picker`,r),{compactSize:P,compactItemClassnames:F}=ih(N,A),I=k(),L=w??M?.separator,[R,z]=hC(`rangePicker`,g,p),B=bf(N),[V,H]=CL(N,B),U=J(V,H,B,x),[W]=EB(t,N),ee=GB(a),te=th(e=>d??P??e),ne=S.useContext(zp),re=f??ne,{hasFeedback:ie,status:ae,feedbackIcon:G}=(0,S.useContext)(Sy),oe=UB({picker:_,hasFeedback:ie,feedbackIcon:G,suffixIcon:C});(0,S.useImperativeHandle)(n,()=>O.current);let[K]=cd(`Calendar`,Qu),se=fr(K,t.locale||{}),[ce]=Yd(`DatePicker`,D?.popup?.root?.zIndex);return S.createElement(Ty,{space:!0},S.createElement(QF,{separator:S.createElement(`span`,{"aria-label":`to`,className:`${N}-separator`},L??S.createElement(SB,null)),disabled:re,ref:O,placement:u,placeholder:TB(se,_,m),suffixIcon:oe,prevIcon:S.createElement(`span`,{className:`${N}-prev-icon`}),nextIcon:S.createElement(`span`,{className:`${N}-next-icon`}),superPrevIcon:S.createElement(`span`,{className:`${N}-super-prev-icon`}),superNextIcon:S.createElement(`span`,{className:`${N}-super-next-icon`}),transitionName:`${I}-slide-up`,picker:_,...T,locale:se.lang,getPopupContainer:i||j,generateConfig:e,components:ee,direction:A,prefixCls:N,rootClassName:U,className:J({[`${N}-large`]:te===`large`,[`${N}-small`]:te===`small`,[`${N}-${R}`]:z},aC(N,oC(ae,h),ie),F,o,M?.className),style:{...M?.style,...s},classNames:E,styles:{...D,popup:{...D.popup,root:{...D.popup.root,zIndex:ce}}},allowClear:W}))}),qB=e=>{let t=(t,n)=>{let r=n===IB?`timePicker`:`datePicker`;return(0,S.forwardRef)((i,a)=>{let{prefixCls:o,getPopupContainer:s,components:c,style:l,className:u,size:d,bordered:f,placement:p,placeholder:m,disabled:h,status:g,variant:_,onCalendarChange:v,classNames:y,styles:b,dropdownClassName:x,popupClassName:C,popupStyle:w,rootClassName:T,suffixIcon:E,...D}=i,{suffixIcon:O}=li(n===IB?`timePicker`:`datePicker`),{getPrefixCls:k,direction:A,getPopupContainer:j,[r]:M}=(0,S.useContext)(oi),N=k(`picker`,o),{compactSize:P,compactItemClassnames:F}=ih(N,A),I=th(e=>d??P??e),L=S.useContext(zp),R=h??L,z={...i,size:I,disabled:R,status:g,variant:_},[B,V]=CB(r,y,b,C||x,w,z),H=S.useRef(null),[U,W]=hC(`datePicker`,_,f),ee=bf(N),[te,ne]=CL(N,ee),re=J(te,ne,ee,T);(0,S.useImperativeHandle)(a,()=>H.current);let ie={showToday:!0},ae=t||i.picker,G=k(),{onSelect:oe,multiple:K}=D,se=oe&&t===`time`&&!K,ce=(e,t,n)=>{v?.(e,t,n),se&&oe(e)},[q,le]=EB(i,N),ue=GB(c),{hasFeedback:de,status:fe,feedbackIcon:pe}=(0,S.useContext)(Sy),me=UB({picker:ae,hasFeedback:de,feedbackIcon:pe,suffixIcon:E===void 0?O:E}),[he]=cd(`DatePicker`,Qu),ge=fr(he,i.locale||{}),[_e]=Yd(`DatePicker`,V?.popup?.root?.zIndex);return S.createElement(Ty,{space:!0},S.createElement(II,{ref:H,placeholder:wB(ge,ae,m),suffixIcon:me,placement:p,prevIcon:S.createElement(`span`,{className:`${N}-prev-icon`}),nextIcon:S.createElement(`span`,{className:`${N}-next-icon`}),superPrevIcon:S.createElement(`span`,{className:`${N}-super-prev-icon`}),superNextIcon:S.createElement(`span`,{className:`${N}-super-next-icon`}),transitionName:`${G}-slide-up`,picker:t,onCalendarChange:ce,...ie,...D,locale:ge.lang,getPopupContainer:s||j,generateConfig:e,components:ue,direction:A,disabled:R,prefixCls:N,rootClassName:re,className:J({[`${N}-large`]:I===`large`,[`${N}-small`]:I===`small`,[`${N}-${U}`]:W},aC(N,oC(fe,g),de),F,M?.className,u),style:{...M?.style,...l},classNames:B,styles:{...V,popup:{...V.popup,root:{...V.popup.root,zIndex:_e}}},allowClear:q,removeIcon:le}))})},n=t(),r=t(DB,OB),i=t(kB,AB),a=t(jB,MB),o=t(NB,PB);return{DatePicker:n,WeekPicker:r,MonthPicker:i,YearPicker:a,TimePicker:t(FB,IB),QuarterPicker:o}},JB=e=>{let{DatePicker:t,WeekPicker:n,MonthPicker:r,YearPicker:i,TimePicker:a,QuarterPicker:o}=qB(e),s=KB(e),c=t;return c.WeekPicker=n,c.MonthPicker=r,c.YearPicker=i,c.RangePicker=s,c.TimePicker=a,c.QuarterPicker=o,c},YB=JB(QE);YB._InternalPanelDoNotUseOrYouWillBeFired=cx(YB,`popupAlign`,void 0,`picker`),YB._InternalRangePanelDoNotUseOrYouWillBeFired=cx(YB.RangePicker,`popupAlign`,void 0,`picker`),YB.generatePicker=JB;var XB={xxxl:4,xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},ZB=S.createContext(null),QB=e=>Cr(e).map(e=>({...e?.props,key:e.key}));function $B(e,t,n){let r=S.useMemo(()=>t||QB(n),[t,n]);return S.useMemo(()=>r.map(({span:t,...n})=>t===`filled`?{...n,filled:!0}:{...n,span:pd(t)?t:WC(e,t)}),[r,e])}function eV(e,t){let n=[],r=[],i=!1,a=0;return e.filter(e=>e).forEach(e=>{let{filled:o,...s}=e;if(o){r.push(s),n.push(r),r=[],a=0;return}let c=t-a;a+=e.span||1,a>=t?(a>t?(i=!0,r.push({...s,span:c})):r.push(s),n.push(r),r=[],a=0):r.push(s)}),r.length>0&&n.push(r),n=n.map(e=>{let n=e.reduce((e,t)=>e+(t.span||1),0);if(n{let[n,r]=(0,S.useMemo)(()=>eV(t,e),[t,e]);return n},nV=e=>e.children,rV=e=>{let{itemPrefixCls:t,component:n,span:r,className:i,style:a,labelStyle:o,contentStyle:s,bordered:c,label:l,content:u,colon:d,type:f,styles:p,classNames:m}=e,h=n,{classNames:g,styles:_}=S.useContext(ZB),[v,y]=Fd([g,m],[_,p],{props:e}),b={...o,...y.label},x={...s,...y.content};return c?S.createElement(h,{colSpan:r,style:a,className:J(i,{[`${t}-item-${f}`]:f===`label`||f===`content`,[v.label]:v.label&&f===`label`,[v.content]:v.content&&f===`content`})},fd(l)&&S.createElement(`span`,{style:b},l),fd(u)&&S.createElement(`span`,{style:x},u)):S.createElement(h,{className:J(`${t}-item`,i),style:a,colSpan:r},S.createElement(`div`,{className:`${t}-item-container`},fd(l)&&S.createElement(`span`,{style:b,className:J(`${t}-item-label`,v.label,{[`${t}-item-no-colon`]:!d})},l),fd(u)&&S.createElement(`span`,{style:x,className:J(`${t}-item-content`,v.content)},u)))};function iV(e,{colon:t,prefixCls:n,bordered:r},{component:i,type:a,showLabel:o,showContent:s,labelStyle:c,contentStyle:l,styles:u}){return e.map(({label:e,children:d,prefixCls:f=n,className:p,style:m,labelStyle:h,contentStyle:g,span:_=1,key:v,styles:y,classNames:b},x)=>typeof i==`string`?S.createElement(rV,{key:`${a}-${v||x}`,className:p,style:m,classNames:b,styles:{label:{...c,...u?.label,...h,...y?.label},content:{...l,...u?.content,...g,...y?.content}},span:_,colon:t,component:i,itemPrefixCls:f,bordered:r,label:o?e:null,content:s?d:null,type:a}):[S.createElement(rV,{key:`label-${v||x}`,className:p,style:{...c,...u?.label,...m,...h,...y?.label},span:1,colon:t,component:i[0],itemPrefixCls:f,bordered:r,label:e,type:`label`}),S.createElement(rV,{key:`content-${v||x}`,className:p,style:{...l,...u?.content,...m,...g,...y?.content},span:_*2-1,component:i[1],itemPrefixCls:f,bordered:r,content:d,type:`content`})])}var aV=e=>{let t=S.useContext(ZB),{prefixCls:n,vertical:r,row:i,index:a,bordered:o}=e;return r?S.createElement(S.Fragment,null,S.createElement(`tr`,{key:`label-${a}`,className:`${n}-row`},iV(i,e,{component:`th`,type:`label`,showLabel:!0,...t})),S.createElement(`tr`,{key:`content-${a}`,className:`${n}-row`},iV(i,e,{component:`td`,type:`content`,showContent:!0,...t}))):S.createElement(`tr`,{key:a,className:`${n}-row`},iV(i,e,{component:o?[`th`,`td`]:`td`,type:`item`,showLabel:!0,showContent:!0,...t}))},oV=e=>{let{componentCls:t,labelBg:n}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:`auto`},[`${t}-row`]:{borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:`none`,"> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.padding)} ${Y(e.paddingLG)}`,borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:`none`}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:n,"&::after":{display:`none`}}}},[`&${t}-medium`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.paddingSM)} ${Y(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.paddingXS)} ${Y(e.padding)}`}}}}}},sV=e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:r,itemPaddingEnd:i,colonMarginRight:a,colonMarginLeft:o,titleMarginBottom:s}=e;return{[t]:{...Jc(e),...oV(e),"&-rtl":{direction:`rtl`},[`${t}-header`]:{display:`flex`,alignItems:`center`,marginBottom:s},[`${t}-title`]:{...qc,flex:`auto`,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG},[`${t}-extra`]:{marginInlineStart:`auto`,color:n,fontSize:e.fontSize},[`${t}-view`]:{width:`100%`,borderRadius:e.borderRadiusLG,table:{width:`100%`,tableLayout:`fixed`,borderCollapse:`collapse`}},[`${t}-row`]:{"> th, > td":{paddingBottom:r,paddingInlineEnd:i},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:`none`,"> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:`normal`,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:`start`,"&::after":{content:`":"`,position:`relative`,top:-.5,marginInline:`${Y(o)} ${Y(a)}`},[`&${t}-item-no-colon::after`]:{content:`""`}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:`""`}},[`${t}-item-content`]:{display:`table-cell`,flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:`break-word`,overflowWrap:`break-word`},[`${t}-item`]:{paddingBottom:0,verticalAlign:`top`,"&-container":{display:`flex`,[`${t}-item-label`]:{display:`inline-flex`,alignItems:`baseline`},[`${t}-item-content`]:{display:`inline-flex`,alignItems:`baseline`,minWidth:`1em`}}},"&-medium":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}}}},cV=rl(`Descriptions`,e=>sV(gs(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText})),lV=e=>{let{prefixCls:t,title:n,extra:r,column:i,colon:a=!0,bordered:o,layout:s,children:c,className:l,rootClassName:u,style:d,size:f,labelStyle:p,contentStyle:m,styles:h,items:g,classNames:_,...v}=e,{getPrefixCls:y,direction:b,className:x,style:C,classNames:w,styles:T}=li(`descriptions`),E=y(`descriptions`,t),D=KC(),O=S.useMemo(()=>pd(i)?i:WC(D,{...XB,...i})??3,[D,i]),k=$B(D,g,c),A=th(f),j=tV(O,k),[M,N]=cV(E),P={...e,column:O,items:k,size:A},[F,I]=Fd([w,_],[T,h],{props:P}),L=S.useMemo(()=>({labelStyle:p,contentStyle:m,styles:{label:I.label,content:I.content},classNames:{label:F.label,content:F.content}}),[p,m,I.label,I.content,F.label,F.content]);return S.createElement(ZB.Provider,{value:L},S.createElement(`div`,{className:J(E,x,F.root,{[`${E}-medium`]:A===`medium`||A===`middle`,[`${E}-small`]:A===`small`,[`${E}-bordered`]:!!o,[`${E}-rtl`]:b===`rtl`},l,u,M,N),style:{...C,...I.root,...d},...v},(n||r)&&S.createElement(`div`,{className:J(`${E}-header`,F.header),style:I.header},n&&S.createElement(`div`,{className:J(`${E}-title`,F.title),style:I.title},n),r&&S.createElement(`div`,{className:J(`${E}-extra`,F.extra),style:I.extra},r)),S.createElement(`div`,{className:`${E}-view`},S.createElement(`table`,null,S.createElement(`tbody`,null,j.map((e,t)=>S.createElement(aV,{key:t,index:t,colon:a,prefixCls:E,vertical:s===`vertical`,bordered:o,row:e})))))))};lV.Item=nV;var uV=S.createContext(null),dV=S.createContext({});function fV(){return fV=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t,className:n,containerRef:r,...i}=e,{panel:a}=S.useContext(dV),o=er(a,r);return S.createElement(`div`,fV({className:J(`${t}-section`,n),role:`dialog`,ref:o},Vu(e,{aria:!0}),{"aria-modal":`true`},i))};function mV(e){let{prefixCls:t,direction:n,className:r,style:i,maxSize:a,containerRef:o,currentSize:s,onResize:c,onResizeEnd:l,onResizeStart:u}=e,[d,f]=S.useState(!1),[p,m]=S.useState(0),[h,g]=S.useState(0),_=n===`left`||n===`right`,v=In(e=>{e.preventDefault(),e.stopPropagation(),f(!0),m(_?e.clientX:e.clientY);let t;if(typeof s==`number`)t=s;else if(o?.current){let e=o.current.getBoundingClientRect();t=_?e.width:e.height}g(t),u?.(t)}),y=In(e=>{if(!d)return;let t=(_?e.clientX:e.clientY)-p;(n===`right`||n===`bottom`)&&(t=-t);let r=h+t;r<0&&(r=0),a&&r>a&&(r=a),c?.(r)}),b=S.useCallback(()=>{if(d&&(f(!1),o?.current)){let e=o.current.getBoundingClientRect(),t=_?e.width:e.height;l?.(t)}},[d,o,l,_]);return S.useEffect(()=>{if(d)return document.addEventListener(`mousemove`,y),document.addEventListener(`mouseup`,b),()=>{document.removeEventListener(`mousemove`,y),document.removeEventListener(`mouseup`,b)}},[d,y,b]),{dragElementProps:{className:J(`${t}-dragger`,`${t}-dragger-${n}`,{[`${t}-dragger-dragging`]:d,[`${t}-dragger-horizontal`]:_,[`${t}-dragger-vertical`]:!_},r),style:i,onMouseDown:v},isDragging:d}}function hV(e){if(typeof e==`string`){let t=Number(e.replace(/px$/i,``));if(parseFloat(e)===t&&br(!1,"Invalid value type of `width` or `height` which should be number type instead."),!Number.isNaN(t))return t}return e}function gV(e,t,n,r,i){let[a]=x_(t&&(r??i!==!1),e);return S.useEffect(()=>{t&&n===!0&&e()?.focus({preventScroll:!0})},[t]),a}function _V(){return _V=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,open:r,placement:i,inline:a,push:o,forceRender:s,autoFocus:c,focusTrap:l,classNames:u,rootClassName:d,rootStyle:f,zIndex:p,className:m,id:h,style:g,motion:_,width:v,height:y,size:b,maxSize:x,children:C,mask:w,maskClosable:T,maskMotion:E,maskClassName:D,maskStyle:O,afterOpenChange:k,onClose:A,onMouseEnter:j,onMouseOver:M,onMouseLeave:N,onClick:P,onKeyDown:F,onKeyUp:I,styles:L,drawerRender:R,resizable:z,defaultSize:B}=e,V=S.useRef(null);S.useImperativeHandle(t,()=>V.current);let H=gV(()=>V.current,r,c,l,w),[U,W]=S.useState(!1),ee=S.useContext(uV),te;te=typeof o==`boolean`?o?{}:{distance:0}:o||{};let ne=te?.distance??ee?.pushDistance??180,re=S.useMemo(()=>({pushDistance:ne,push:()=>{W(!0)},pull:()=>{W(!1)}}),[ne]);S.useEffect(()=>{r?ee?.push?.():ee?.pull?.()},[r]),S.useEffect(()=>()=>{ee?.pull?.()},[]);let ie=S.createElement(Iu,_V({key:`mask`},E,{visible:w&&r}),({className:e,style:t},i)=>S.createElement(`div`,{className:J(`${n}-mask`,e,u?.mask,D),style:{...t,...O,...L?.mask},onClick:T&&r?A:void 0,ref:i})),ae=typeof _==`function`?_(i):_,[G,oe]=S.useState(),K=i===`left`||i===`right`,se=S.useMemo(()=>hV(b??(K?v:y)??G??B??(K?378:void 0)),[b,v,y,B,K,G]),ce=S.useMemo(()=>{let e={};if(U&&ne)switch(i){case`top`:e.transform=`translateY(${ne}px)`;break;case`bottom`:e.transform=`translateY(${-ne}px)`;break;case`left`:e.transform=`translateX(${ne}px)`;break;default:e.transform=`translateX(${-ne}px)`;break}return K?e.width=hV(se):e.height=hV(se),e},[U,ne,i,K,se]),q=S.useRef(null),le=!!z,ue=typeof z==`object`&&z||{},de=In(e=>{oe(e),ue.onResize?.(e)}),{dragElementProps:fe,isDragging:pe}=mV({prefixCls:`${n}-resizable`,direction:i,className:u?.dragger,style:L?.dragger,maxSize:x,containerRef:q,currentSize:se,onResize:de,onResizeStart:ue.onResizeStart,onResizeEnd:ue.onResizeEnd}),me={onMouseEnter:j,onMouseOver:M,onMouseLeave:N,onClick:P,onKeyDown:F,onKeyUp:I,onFocus:e=>{H(e.target)}},he=S.createElement(Iu,_V({key:`panel`},ae,{visible:r,forceRender:s,onVisibleChanged:k,removeOnLeave:!1,leavedClassName:`${n}-content-wrapper-hidden`}),({className:t,style:r},i)=>{let a=S.createElement(pV,_V({id:h,containerRef:i,prefixCls:n,className:J(m,u?.section),style:{...g,...L?.section}},Vu(e,{aria:!0}),me),C);return S.createElement(`div`,_V({ref:q,className:J(`${n}-content-wrapper`,pe&&`${n}-content-wrapper-dragging`,u?.wrapper,!pe&&t),style:{...r,...ce,...L?.wrapper}},Vu(e,{data:!0})),le&&S.createElement(`div`,fe),R?R(a):a)}),ge={...f};return p&&(ge.zIndex=p),S.createElement(uV.Provider,{value:re},S.createElement(`div`,{className:J(n,`${n}-${i}`,d,{[`${n}-open`]:r,[`${n}-inline`]:a}),style:ge,tabIndex:-1,ref:V},ie,he))}),yV=e=>{let{open:t=!1,prefixCls:n=`rc-drawer`,placement:r=`right`,autoFocus:i=!0,keyboard:a=!0,width:o,height:s,size:c,maxSize:l,mask:u=!0,maskClosable:d=!0,getContainer:f,forceRender:p,afterOpenChange:m,destroyOnHidden:h,onMouseEnter:g,onMouseOver:_,onMouseLeave:v,onClick:y,onKeyDown:b,onKeyUp:x,onClose:C,resizable:w,defaultSize:T,focusTriggerAfterClose:E,panelRef:D}=e,[O,k]=S.useState(!1),[A,j]=S.useState(!1);zn(()=>{j(!0)},[]);let M=A?t:!1,N=S.useRef(null),P=S.useRef(null);zn(()=>{M&&(P.current=document.activeElement)},[M]);let F=e=>{k(e),m?.(e),!e&&E!==!1&&P.current&&!N.current?.contains(P.current)&&P.current?.focus({preventScroll:!0})},I=S.useMemo(()=>({panel:D}),[D]);if(!p&&!O&&!M&&h)return null;let L={onMouseEnter:g,onMouseOver:_,onMouseLeave:v,onClick:y,onKeyDown:b,onKeyUp:x},R={...e,open:M,prefixCls:n,placement:r,autoFocus:i,keyboard:a,width:o,height:s,size:c,maxSize:l,defaultSize:T,mask:u,maskClosable:d,inline:f===!1,afterOpenChange:F,ref:N,resizable:w,...L};return S.createElement(dV.Provider,{value:I},S.createElement(Xf,{open:M||p||O,autoDestroy:!1,getContainer:f,autoLock:u&&(M||O),onEsc:({top:e,event:t})=>{e&&a&&(t.stopPropagation(),C?.(t))}},S.createElement(vV,R)))},bV=e=>{let{prefixCls:t,ariaId:n,title:r,footer:i,extra:a,closable:o,loading:s,onClose:c,headerStyle:l,bodyStyle:u,footerStyle:d,children:f,classNames:p,styles:m}=e,h=li(`drawer`),{classNames:g,styles:_,closable:v}=h,[y,b]=Fd([g,p],[_,m],{props:{...e,closable:o??v}}),x=S.useMemo(()=>{let e=o??v;if(e!==!1)return hd(e)&&e?.placement===`end`?`end`:`start`},[o,v]),C=S.useCallback(e=>S.createElement(`button`,{type:`button`,onClick:c,className:J(`${t}-close`,{[`${t}-close-${x}`]:x===`end`},y.close),style:b.close},e),[c,t,x,y.close,b.close]),[w,T]=Td(yd(e),yd(h),{closable:!0,closeIconRender:C}),E=()=>!r&&!w?null:S.createElement(`div`,{style:{...b.header,...l},className:J(`${t}-header`,y.header,{[`${t}-header-close-only`]:w&&!r&&!a})},S.createElement(`div`,{className:`${t}-header-title`},x===`start`&&T,r&&S.createElement(`div`,{className:J(`${t}-title`,y.title),style:b.title,id:n},r)),a&&S.createElement(`div`,{className:J(`${t}-extra`,y.extra),style:b.extra},a),x===`end`&&T),D=()=>i?S.createElement(`div`,{className:J(`${t}-footer`,y.footer),style:{...b.footer,...d}},i):null;return S.createElement(S.Fragment,null,E(),S.createElement(`div`,{className:J(`${t}-body`,y.body),style:{...b.body,...u}},s?S.createElement(Wy,{active:!0,title:!1,paragraph:{rows:5},className:`${t}-body-skeleton`}):f),D())},xV=e=>{let t=`100%`;return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},SV=(e,t)=>({"&-enter, &-appear":{...e,"&-active":t},"&-leave":{...t,"&-active":e}}),CV=(e,t)=>({"&-enter, &-appear, &-leave":{"&-start":{transition:`none`},"&-active":{transition:`all ${t}`}},...SV({opacity:e},{opacity:1})}),wV=(e,t)=>[CV(.7,t),SV({transform:xV(e)},{transform:`none`})],TV=e=>{let{componentCls:t,motionDurationSlow:n}=e;return{[t]:{[`${t}-mask-motion`]:CV(0,n),[`${t}-panel-motion`]:[`left`,`right`,`top`,`bottom`].reduce((e,t)=>({...e,[`&-${t}`]:wV(t,n)}),{})}}},EV=e=>{let{borderRadiusSM:t,componentCls:n,zIndexPopup:r,colorBgMask:i,colorBgElevated:a,motionDurationSlow:o,motionDurationMid:s,paddingXS:c,padding:l,paddingLG:u,fontSizeLG:d,lineHeightLG:f,lineWidth:p,lineType:m,colorSplit:h,marginXS:g,colorIcon:_,colorIconHover:v,colorBgTextHover:y,colorBgTextActive:b,colorText:x,fontWeightStrong:S,footerPaddingBlock:C,footerPaddingInline:w,draggerSize:T,calc:E}=e,D=`${n}-content-wrapper`,O=`${n}-resizable-dragger`;return{[n]:{position:`fixed`,inset:0,zIndex:r,pointerEvents:`none`,color:x,"&-pure":{position:`relative`,background:a,display:`flex`,flexDirection:`column`,pointerEvents:`auto`,[`&${n}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${n}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${n}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${n}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:`absolute`},[`${n}-mask`]:{position:`absolute`,inset:0,zIndex:r,background:i,pointerEvents:`auto`,[`&${n}-mask-blur`]:{backdropFilter:`blur(4px)`}},[D]:{position:`absolute`,zIndex:r,maxWidth:`100vw`,transition:`all ${o}`,"&-hidden":{display:`none`}},[`&-left > ${D}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${D}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${D}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${D}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${n}-section`]:{display:`flex`,flexDirection:`column`,width:`100%`,height:`100%`,overflow:`auto`,background:a,pointerEvents:`auto`},[`${n}-header`]:{display:`flex`,flex:0,alignItems:`center`,padding:`${Y(l)} ${Y(u)}`,fontSize:d,lineHeight:f,borderBottom:`${Y(p)} ${m} ${h}`,"&-title":{display:`flex`,flex:1,alignItems:`center`,minWidth:0,minHeight:0}},[`${n}-extra`]:{flex:`none`},[`${n}-close`]:{display:`inline-flex`,width:E(d).add(c).equal(),height:E(d).add(c).equal(),borderRadius:t,justifyContent:`center`,alignItems:`center`,color:_,fontWeight:S,fontSize:d,fontStyle:`normal`,lineHeight:1,textAlign:`center`,textTransform:`none`,textDecoration:`none`,background:`transparent`,border:0,cursor:`pointer`,transition:`all ${s}`,textRendering:`auto`,[`&${n}-close-end`]:{marginInlineStart:g},[`&:not(${n}-close-end)`]:{marginInlineEnd:g},"&:hover":{color:v,backgroundColor:y,textDecoration:`none`},"&:active":{backgroundColor:b},...Qc(e)},[`${n}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:d,lineHeight:f},[`${n}-body`]:{flex:1,minWidth:0,minHeight:0,padding:u,overflow:`auto`,[`${n}-body-skeleton`]:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`}},[`${n}-footer`]:{flexShrink:0,padding:`${Y(C)} ${Y(w)}`,borderTop:`${Y(p)} ${m} ${h}`},[O]:{position:`absolute`,zIndex:1,backgroundColor:`transparent`,userSelect:`none`,pointerEvents:`auto`,"&:hover":{backgroundColor:e.colorPrimary,opacity:.2},"&-dragging":{backgroundColor:e.colorPrimary,opacity:.3}},[`${O}-left`]:{top:0,bottom:0,right:{_skip_check_:!0,value:0},width:T,cursor:`col-resize`},[`${O}-right`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},width:T,cursor:`col-resize`},[`${O}-top`]:{insetInline:0,bottom:0,height:T,cursor:`row-resize`},[`${O}-bottom`]:{insetInline:0,top:0,height:T,cursor:`row-resize`},[`${D}-dragging`]:{userSelect:`none`,transition:`none`,willChange:`width, height`,[`${n}-content`]:{pointerEvents:`none`},[`${n}-section`]:{pointerEvents:`none`}},"&-rtl":{direction:`rtl`}}}},DV=rl(`Drawer`,e=>{let t=gs(e,{});return[EV(t),TV(t)]},e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding,draggerSize:4})),OV={distance:180},kV=378,AV={motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},jV=e=>{let{rootClassName:t,size:n,defaultSize:r=kV,height:i,width:a,mask:o,push:s=OV,open:c,afterOpenChange:l,onClose:u,prefixCls:d,getContainer:f,panelRef:p=null,style:m,className:h,resizable:g,"aria-labelledby":_,focusable:v,maskClosable:y,maskStyle:b,drawerStyle:x,contentWrapperStyle:C,destroyOnClose:w,destroyOnHidden:T,...E}=e,{placement:D}=E,O=zf(),k=E.title?O:void 0,{getPopupContainer:A,getPrefixCls:j,direction:M,className:N,style:P,classNames:F,styles:I,mask:L}=li(`drawer`),R=j(`drawer`,d),[z,B]=DV(R),V=f===void 0&&A?()=>A(document.body):f,H=S.useMemo(()=>pd(n)?n:n===`large`?736:n===`default`?kV:typeof n==`string`?/^\d+(\.\d+)?$/.test(n)?Number(n):n:!D||D===`left`||D===`right`?a:i,[n,D,a,i]),U={motionName:Gm(R,`mask-motion`),...AV},W=e=>({motionName:Gm(R,`panel-motion-${e}`),...AV}),ee=$n(p,Ky()),[te,ne]=Yd(`Drawer`,E.zIndex),[re,ie,ae]=Od(o,L,R,y),G=Ay(v,V!==!1&&re),{classNames:oe,styles:K,rootStyle:se}=E,ce={...e,zIndex:te,panelRef:p,mask:re,maskClosable:ae,defaultSize:r,push:s,focusable:G},[q,le]=Fd([F,oe],[I,K],{props:ce}),ue=J({"no-mask":!re,[`${R}-rtl`]:M===`rtl`},t,z,B,q.root);return S.createElement(Ty,{form:!0,space:!0},S.createElement(Ud.Provider,{value:ne},S.createElement(yV,{prefixCls:R,onClose:u,maskMotion:U,motion:W,...E,classNames:{mask:J(q.mask,ie.mask),section:q.section,wrapper:q.wrapper,dragger:q.dragger},styles:{mask:{...le.mask,...b},section:{...le.section,...x},wrapper:{...le.wrapper,...C},dragger:le.dragger},open:c,mask:re,maskClosable:ae,push:s,size:H,defaultSize:r,style:{...P,...m},rootStyle:{...se,...le.root},className:J(N,h),rootClassName:ue,getContainer:V,afterOpenChange:l,panelRef:ee,zIndex:te,...g?{resizable:g}:{},"aria-labelledby":_??k,destroyOnHidden:T??w,focusTriggerAfterClose:G.focusTriggerAfterClose,focusTrap:G.trap},S.createElement(bV,{prefixCls:R,size:n,...E,ariaId:k,onClose:u}))))};jV._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,style:n,className:r,placement:i=`right`,...a}=e,{getPrefixCls:o}=S.useContext(oi),s=o(`drawer`,t),[c,l]=DV(s),u=J(s,`${s}-pure`,`${s}-${i}`,c,l,r);return S.createElement(`div`,{className:u,style:n},S.createElement(bV,{prefixCls:s,...a}))};var MV=jV;function NV(e){return[`small`,`middle`,`medium`,`large`].includes(e)}function PV(e){return e?pd(e):!1}var FV=S.createContext({latestIndex:0}),IV=FV.Provider,LV=e=>{let{className:t,prefix:n,index:r,children:i,separator:a,style:o,classNames:s,styles:c}=e,{latestIndex:l}=S.useContext(FV);return fd(i)?S.createElement(S.Fragment,null,S.createElement(`div`,{className:t,style:o},i),r{let{componentCls:t,antCls:n}=e;return{[t]:{display:`inline-flex`,"&-rtl":{direction:`rtl`},"&-vertical":{flexDirection:`column`},"&-align":{flexDirection:`column`,"&-center":{alignItems:`center`},"&-start":{alignItems:`flex-start`},"&-end":{alignItems:`flex-end`},"&-baseline":{alignItems:`baseline`}},[`${t}-item:empty`]:{display:`none`},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:`block`}}}},zV=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},BV=rl(`Space`,e=>{let t=gs(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[RV(t),zV(t)]},()=>({}),{resetStyle:!1}),VV=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,size:i,className:a,style:o,classNames:s,styles:c}=li(`space`),{size:l=i??`small`,align:u,className:d,rootClassName:f,children:p,direction:m,orientation:h,prefixCls:g,split:_,separator:v,style:y,vertical:b,wrap:x=!1,classNames:C,styles:w,...T}=e,[E,D]=Array.isArray(l)?l:[l,l],O=NV(D),k=NV(E),A=PV(D),j=PV(E),M=Cr(p,{keepEmpty:!0}),[N,P]=Rd(h,b,m),F=u===void 0&&!P?`center`:u,I=v??_,L=n(`space`,g),[R,z]=BV(L),B={...e,size:l,orientation:N,align:F},[V,H]=Fd([s,C],[c,w],{props:B}),U=J(L,a,R,`${L}-${N}`,{[`${L}-rtl`]:r===`rtl`,[`${L}-align-${F}`]:F,[`${L}-gap-row-${D}`]:O,[`${L}-gap-col-${E}`]:k},d,f,z,V.root),W=J(`${L}-item`,V.item),ee=M.map((e,t)=>{let n=e?.key||`${W}-${t}`;return S.createElement(LV,{prefix:L,classNames:V,styles:H,className:W,key:n,index:t,separator:I,style:H.item},e)}),te=S.useMemo(()=>({latestIndex:M.reduce((e,t,n)=>fd(t)?n:e,0)}),[M]);if(M.length===0)return null;let ne={};return x&&(ne.flexWrap=`wrap`),!k&&j&&(ne.columnGap=E),!O&&A&&(ne.rowGap=D),S.createElement(`div`,{ref:t,className:U,style:{...ne,...H.root,...o,...y},...T},S.createElement(IV,{value:te},ee))});VV.Compact=sh,VV.Addon=$z;var HV=e=>{let{getPopupContainer:t,getPrefixCls:n,direction:r}=S.useContext(oi),{prefixCls:i,type:a=`default`,danger:o,disabled:s,loading:c,onClick:l,htmlType:u,children:d,className:f,menu:p,arrow:m,autoFocus:h,trigger:g,align:_,open:v,onOpenChange:y,placement:b,getPopupContainer:x,href:C,icon:w=S.createElement(kE,null),title:T,buttonsRender:E=e=>e,mouseEnterDelay:D,mouseLeaveDelay:O,overlayClassName:k,overlayStyle:A,destroyOnHidden:j,destroyPopupOnHide:M,dropdownRender:N,popupRender:P,...F}=e,I=n(`dropdown`,i),L=`${I}-button`,R={menu:p,arrow:m,autoFocus:h,align:_,disabled:s,trigger:s?[]:g,onOpenChange:y,getPopupContainer:x||t,mouseEnterDelay:D,mouseLeaveDelay:O,classNames:{root:k},styles:{root:A},destroyOnHidden:j,popupRender:P||N},{compactSize:z,compactItemClassnames:B}=ih(I,r),V=J(L,B,f);`destroyPopupOnHide`in e&&(R.destroyPopupOnHide=M),`open`in e&&(R.open=v),`placement`in e?R.placement=b:R.placement=r===`rtl`?`bottomLeft`:`bottomRight`;let[H,U]=E([S.createElement(qE,{type:a,danger:o,disabled:s,loading:c,onClick:l,htmlType:u,href:C,title:T},d),S.createElement(qE,{type:a,danger:o,icon:w})]);return S.createElement(VV.Compact,{className:V,size:z,block:!0,...F},H,S.createElement(KE,{...R},U))};HV.__ANT_BUTTON=!0;var UV=KE;UV.Button=HV;var WV={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z`}}]},name:`file-text`,theme:`outlined`};function GV(){return GV=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,GV({},e,{ref:t,icon:WV}))),qV=(e,t)=>fd(e)?hd(e)&&!(0,S.isValidElement)(e)?{...t,...e}:{...t,title:e}:null;function JV(e){let[t,n]=S.useState(e);return S.useEffect(()=>{let t=setTimeout(()=>{n(e)},e.length?0:10);return()=>{clearTimeout(t)}},[e]),t}var YV=e=>{let{componentCls:t,motionDurationFast:n,motionEaseInOut:r}=e,i=`${t}-show-help`,a=`${t}-show-help-item`;return{[i]:{transition:`opacity ${n} ${r}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[a]:{overflow:`hidden`,transition:`${[`height`,`opacity`,`transform`].map(e=>`${e} ${n} ${r}`).join(`, `)} !important`,[`&${a}-appear, &${a}-enter`]:{transform:`translateY(-5px)`,opacity:0,"&-active":{transform:`translateY(0)`,opacity:1}},[`&${a}-leave-active`]:{transform:`translateY(-5px)`}}}}},XV=e=>({legend:{display:`block`,width:`100%`,marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:`inherit`,border:0,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},'input[type="search"]':{boxSizing:`border-box`},'input[type="radio"], input[type="checkbox"]':{lineHeight:`normal`},'input[type="file"]':{display:`block`},'input[type="range"]':{display:`block`,width:`100%`},"select[multiple], select[size]":{height:`auto`},"input[type='file']:focus, input[type='radio']:focus, input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${Y(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:`block`,paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),ZV=(e,t)=>{let{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},QV=e=>{let{componentCls:t}=e;return{[t]:{...Jc(e),...XV(e),[`${t}-text`]:{display:`inline-block`,paddingInlineEnd:e.paddingSM},"&-small":{...ZV(e,e.controlHeightSM)},"&-large":{...ZV(e,e.controlHeightLG)}}}},$V=e=>{let{formItemCls:t,iconCls:n,rootPrefixCls:r,antCls:i,labelRequiredMarkColor:a,labelColor:o,labelFontSize:s,labelHeight:c,labelColonMarginInlineStart:l,labelColonMarginInlineEnd:u,itemMarginBottom:d}=e,[f]=ol(i,`grid`);return{[t]:{...Jc(e),marginBottom:d,verticalAlign:`top`,"&-with-help":{transition:`none`},[`&-hidden, + `]:{[`&:hover ${t}`]:{borderColor:e.colorPrimary}},[`${i}:not(${i}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[`${t}-checked`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:`rotate(45deg) scale(1) translate(-50%,-50%)`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`,...Uh()},[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[t]:{"&-indeterminate":{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:`50%`,insetInlineStart:`50%`,width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:`translate(-50%, -50%) scale(1)`,opacity:1,content:`""`},"&:hover":{backgroundColor:e.colorBgContainer,borderColor:e.colorPrimary}}}},{[`${i}-disabled`]:{cursor:`not-allowed`},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate::after`]:{background:e.colorTextDisabled}}}]};function tz(e,t){return ez(gs(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}var nz=rl(`Checkbox`,(e,{prefixCls:t})=>[tz(t,e)]),rz=S.createContext(null),iz=S.forwardRef((e,t)=>{let{prefixCls:n,children:r,indeterminate:i=!1,onMouseEnter:a,onMouseLeave:o,skipGroup:s=!1,disabled:c,rootClassName:l,className:u,style:d,classNames:f,styles:p,name:m,value:h,checked:g,defaultChecked:_,onChange:v,...y}=e,{getPrefixCls:b,direction:x,className:C,style:w,classNames:T,styles:E}=li(`checkbox`),D=S.useContext(rz),{isFormItemInput:O}=S.useContext(Sy),k=S.useContext(zp),A=(D?.disabled||c)??k,[j,M]=Hn(_,g),N=j,P=In(e=>{M(e.target.checked),v?.(e),!s&&D?.toggleOption&&D.toggleOption({label:r,value:h})});D&&!s&&(N=D.value.includes(h));let F=S.useRef(null),I=er(t,F);S.useEffect(()=>{if(!(s||!D))return D.registerValue(h),()=>{D.cancelValue(h)}},[h,s]),S.useEffect(()=>{F.current?.input&&(F.current.input.indeterminate=i)},[i]);let L=b(`checkbox`,n),R=bf(L),[z,B]=nz(L,R),V={...y},H={...e,indeterminate:i,disabled:A,checked:N},[U,W]=Fd([T,f],[E,p],{props:H}),ee=J(`${L}-wrapper`,{[`${L}-rtl`]:x===`rtl`,[`${L}-wrapper-checked`]:N,[`${L}-wrapper-disabled`]:A,[`${L}-wrapper-in-form-item`]:O},C,u,U.root,l,B,R,z),te=J(U.icon,{[`${L}-indeterminate`]:i},qm,z),[ne,re]=XI(V.onClick);return S.createElement(eh,{component:`Checkbox`,disabled:A},S.createElement(`label`,{className:ee,style:{...W.root,...w,...d},onMouseEnter:a,onMouseLeave:o,onClick:ne},S.createElement(YI,{...V,name:!s&&D?D.name:m,checked:N,onClick:re,onChange:P,prefixCls:L,className:te,style:W.icon,disabled:A,ref:I,value:h}),fd(r)&&S.createElement(`span`,{className:J(`${L}-label`,U.label),style:W.label},r)))}),az=S.forwardRef((e,t)=>{let{defaultValue:n,children:r,options:i=[],prefixCls:a,className:o,rootClassName:s,style:c,onChange:l,role:u=`group`,...d}=e,{getPrefixCls:f,direction:p}=S.useContext(oi),[m,h]=S.useState(d.value||n||[]),[g,_]=S.useState([]);S.useEffect(()=>{`value`in d&&h(d.value||[])},[d.value]);let v=S.useMemo(()=>i.map(e=>typeof e==`string`||pd(e)?{label:e,value:e}:e),[i]),y=e=>{_(t=>t.filter(t=>t!==e))},b=e=>{_(t=>[].concat(Zr(t),[e]))},x=e=>{let t=m.indexOf(e.value),n=Zr(m);t===-1?n.push(e.value):n.splice(t,1),`value`in d||h(n),l?.(n.filter(e=>g.includes(e)).sort((e,t)=>v.findIndex(t=>t.value===e)-v.findIndex(e=>e.value===t)))},C=f(`checkbox`,a),w=`${C}-group`,T=bf(C),[E,D]=nz(C,T),O=Sr(d,[`value`,`disabled`]),k=i.length?v.map(e=>S.createElement(iz,{prefixCls:C,key:e.value.toString(),disabled:`disabled`in e?e.disabled:d.disabled,value:e.value,checked:m.includes(e.value),onChange:e.onChange,className:J(`${w}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):r,A=S.useMemo(()=>({toggleOption:x,value:m,disabled:d.disabled,name:d.name,registerValue:b,cancelValue:y}),[x,m,d.disabled,d.name,b,y]),j=J(w,{[`${w}-rtl`]:p===`rtl`},o,s,D,T,E);return S.createElement(`div`,{className:j,style:c,role:u,...O,ref:t},S.createElement(rz.Provider,{value:A},k))}),oz=iz;oz.Group=az,oz.__ANT_CHECKBOX=!0;var sz=(0,S.createContext)({});function cz(e){return e===`auto`?`1 1 auto`:pd(e)?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}var lz=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=S.useContext(oi),{gutter:i,wrap:a}=S.useContext(sz),{prefixCls:o,span:s,order:c,offset:l,push:u,pull:d,className:f,children:p,flex:m,style:h,...g}=e,_=n(`col`,o),v=n(),[y,b]=$y(_),[x]=ol(v,`col`),C={},w={};VC.forEach(t=>{let n={},i=e[t];pd(i)?n.span=i:hd(i)&&(n=i||{}),delete g[t],w={...w,[`${_}-${t}-${n.span}`]:fd(n.span),[`${_}-${t}-order-${n.order}`]:n.order||n.order===0,[`${_}-${t}-offset-${n.offset}`]:n.offset||n.offset===0,[`${_}-${t}-push-${n.push}`]:n.push||n.push===0,[`${_}-${t}-pull-${n.pull}`]:n.pull||n.pull===0,[`${_}-rtl`]:r===`rtl`},n.flex&&(w[`${_}-${t}-flex`]=!0,C[x(`${t}-flex`)]=cz(n.flex))});let T=J(_,{[`${_}-${s}`]:s!==void 0,[`${_}-order-${c}`]:c,[`${_}-offset-${l}`]:l,[`${_}-push-${u}`]:u,[`${_}-pull-${d}`]:d},f,w,y,b),E={};return i?.[0]&&(E.paddingInline=pd(i[0])?`${i[0]/2}px`:`calc(${i[0]} / 2)`),m&&(E.flex=cz(m),a===!1&&!E.minWidth&&(E.minWidth=0)),S.createElement(`div`,{...g,style:{...E,...h,...C},className:T,ref:t},p)});function uz(e,t){let n=[void 0,void 0],r=Array.isArray(e)?e:[e,void 0],i=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0};return r.forEach((e,t)=>{if(hd(e))for(let r=0;r{let[n,r]=S.useState(()=>md(e)?e:``),i=()=>{if(md(e)&&r(e),hd(e))for(let n=0;n{i()},[JSON.stringify(e),t]),n},fz=S.forwardRef((e,t)=>{let{prefixCls:n,justify:r,align:i,className:a,style:o,children:s,gutter:c=0,wrap:l,...u}=e,{getPrefixCls:d,direction:f}=S.useContext(oi),p=KC(!0,null),m=dz(i,p),h=dz(r,p),g=d(`row`,n),[_,v]=Iee(g),y=uz(c,p),b=J(g,{[`${g}-no-wrap`]:l===!1,[`${g}-${h}`]:h,[`${g}-${m}`]:m,[`${g}-rtl`]:f===`rtl`},a,_,v),x={};y?.[0]&&(x.marginInline=pd(y[0])?`${y[0]/-2}px`:`calc(${y[0]} / -2)`);let[C,w]=y;x.rowGap=w;let T=S.useMemo(()=>({gutter:[C,w],wrap:l}),[C,w,l]);return S.createElement(sz.Provider,{value:T},S.createElement(`div`,{...u,className:b,style:{...x,...o},ref:t},s))}),pz=lz,mz=e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},hz=e=>{let{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:a,orientationMargin:o,verticalMarginInline:s}=e,c=`${t}-rail`;return{[t]:{...Jc(e),borderBlockStart:`${Y(i)} solid ${r}`,[c]:{borderBlockStart:`${Y(i)} solid ${r}`},"&-vertical":{position:`relative`,top:`-0.06em`,display:`inline-block`,height:`0.9em`,marginInline:s,marginBlock:0,verticalAlign:`middle`,borderTop:0,borderInlineStart:`${Y(i)} solid ${r}`},"&-horizontal":{display:`flex`,clear:`both`,width:`100%`,minWidth:`100%`,margin:`${Y(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:`flex`,alignItems:`center`,margin:`${Y(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:`nowrap`,textAlign:`center`,borderBlockStart:`0 ${r}`,[`${c}-start, ${c}-end`]:{width:`50%`,borderBlockStartColor:`inherit`,borderBlockEnd:0,content:`''`}},[`&-horizontal${t}-with-text-start`]:{[`${c}-start`]:{width:`calc(${o} * 100%)`},[`${c}-end`]:{width:`calc(100% - ${o} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{[`${c}-start`]:{width:`calc(100% - ${o} * 100%)`},[`${c}-end`]:{width:`calc(${o} * 100%)`}},[`${t}-inner-text`]:{display:`inline-block`,paddingBlock:0,paddingInline:a},"&-dashed":{background:`none`,borderColor:r,borderStyle:`dashed`,borderWidth:`${Y(i)} 0 0`,[c]:{borderBlockStart:`${Y(i)} dashed ${r}`}},[`&-horizontal${t}-with-text${t}-dashed`]:{[`${c}-start, ${c}-end`]:{borderStyle:`dashed none none`}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:`none`,borderColor:r,borderStyle:`dotted`,borderWidth:`${Y(i)} 0 0`,[c]:{borderBlockStart:`${Y(i)} dotted ${r}`}},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:`dotted none none`}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{[`${c}-start`]:{width:0},[`${c}-end`]:{width:`100%`},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{[`${c}-start`]:{width:`100%`},[`${c}-end`]:{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}}}},gz=rl(`Divider`,e=>{let t=gs(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[hz(t),mz(t)]},e=>({textPaddingInline:`1em`,orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}}),_z=[`left`,`right`,`center`,`start`,`end`],vz=e=>{let{getPrefixCls:t,direction:n,className:r,style:i,classNames:a,styles:o}=li(`divider`),{prefixCls:s,type:c,orientation:l,vertical:u,titlePlacement:d,orientationMargin:f,className:p,rootClassName:m,children:h,dashed:g,variant:_=`solid`,plain:v,style:y,size:b,classNames:x,styles:C,...w}=e,T=t(`divider`,s),E=`${T}-rail`,[D,O]=gz(T),k=th(b),A=!!h,j=_z.includes(l||``),M=S.useMemo(()=>{let e=d??(j?l:`center`);return e===`left`?n===`rtl`?`end`:`start`:e===`right`?n===`rtl`?`start`:`end`:e},[n,l,d,j]),N=M===`start`&&f!=null,P=M===`end`&&f!=null,[F,I]=Rd(l,u,c),L={...e,orientation:F,titlePlacement:M,size:k},[R,z]=Fd([a,x],[o,C],{props:L}),B=J(T,r,D,O,`${T}-${F}`,{[`${T}-with-text`]:A,[`${T}-with-text-${M}`]:A,[`${T}-dashed`]:!!g,[`${T}-${_}`]:_!==`solid`,[`${T}-plain`]:!!v,[`${T}-rtl`]:n===`rtl`,[`${T}-no-default-orientation-margin-start`]:N,[`${T}-no-default-orientation-margin-end`]:P,[`${T}-md`]:k===`medium`||k===`middle`,[`${T}-sm`]:k===`small`,[E]:!h,[R.rail]:R.rail&&!h},p,m,R.root),V=S.useMemo(()=>pd(f)?f:/^\d+$/.test(f)?Number(f):f,[f]),H={marginInlineStart:N?V:void 0,marginInlineEnd:P?V:void 0};return S.createElement(`div`,{className:B,style:{...i,...z.root,...h?{}:z.rail,...y},...w,role:`separator`},h&&!I&&S.createElement(S.Fragment,null,S.createElement(`div`,{className:J(E,`${E}-start`,R.rail),style:z.rail}),S.createElement(`span`,{className:J(`${T}-inner-text`,R.content),style:{...H,...z.content}},h),S.createElement(`div`,{className:J(E,`${E}-end`,R.rail),style:z.rail})))},yz={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`minus`,theme:`outlined`};function bz(){return bz=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,bz({},e,{ref:t,icon:yz}))),Sz={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z`}}]},name:`up`,theme:`outlined`};function Cz(){return Cz=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Cz({},e,{ref:t,icon:Sz})));function Tz(){return typeof BigInt==`function`}function Ez(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function Dz(e){var t=e.trim(),n=t.startsWith(`-`);n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,`$1`).replace(/\.0*$/,``).replace(/^0+/,``),t.startsWith(`.`)&&(t=`0${t}`);var r=t||`0`,i=r.split(`.`),a=i[0]||`0`,o=i[1]||`0`;a===`0`&&o===`0`&&(n=!1);var s=n?`-`:``;return{negative:n,negativeStr:s,trimStr:r,integerStr:a,decimalStr:o,fullStr:`${s}${r}`}}function Oz(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes(`e`)}function kz(e){var t=Uo(e.toLowerCase().split(`e`),2),n=t[0],r=t[1],i=r===void 0?`0`:r,a=n.startsWith(`-`),o=Uo((a?n.slice(1):n).split(`.`),2),s=o[0],c=s===void 0?`0`:s,l=o[1],u=l===void 0?``:l;return{decimal:u,digits:`${c}${u}`.replace(/^0+/,``)||`0`,exponent:Number(i),integer:c,negative:a}}function Az(e){var t=e.decimal,n=e.digits,r=e.exponent,i=e.integer,a=e.negative;if(n===`0`)return`0`;var o=i.replace(/^0+/,``).length,s=(t.match(/^0*/)||[``])[0].length,c=(o||-s)+r,l=``;return l=c<=0?`0.${`0`.repeat(-c)}${n}`:c>=n.length?`${n}${`0`.repeat(c-n.length)}`:`${n.slice(0,c)}.${n.slice(c)}`,`${a?`-`:``}${l}`}function jz(e){return e.exponent>=0?Math.max(0,e.decimal.length-e.exponent):Math.abs(e.exponent)+e.decimal.length}function Mz(e){var t=String(e);return Oz(e)?jz(kz(t)):t.includes(`.`)&&Pz(t)?t.length-t.indexOf(`.`)-1:0}function Nz(e){var t=String(e);if(Oz(e)){if(e>2**53-1)return String(Tz()?BigInt(e).toString():2**53-1);if(e<-(2**53-1))return String(Tz()?BigInt(e).toString():-(2**53-1));var n=kz(t),r=jz(n);t=r>100?Az(n):e.toFixed(r)}return Dz(t).fullStr}function Pz(e){return typeof e==`number`?!Number.isNaN(e):e?/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e):!1}var Fz=function(){function e(t){if(Yo(this,e),Ko(this,`origin`,``),Ko(this,`negative`,void 0),Ko(this,`integer`,void 0),Ko(this,`decimal`,void 0),Ko(this,`decimalLen`,void 0),Ko(this,`empty`,void 0),Ko(this,`nan`,void 0),Ez(t)){this.empty=!0;return}if(this.origin=String(t),t===`-`||Number.isNaN(t)){this.nan=!0;return}var n=t;if(Oz(n)&&(n=Number(n)),n=typeof n==`string`?n:Nz(n),Pz(n)){var r=Dz(n);this.negative=r.negative;var i=r.trimStr.split(`.`);this.integer=BigInt(i[0]);var a=i[1]||`0`;this.decimal=BigInt(a),this.decimalLen=a.length}else this.nan=!0}return Zo(e,[{key:`getMark`,value:function(){return this.negative?`-`:``}},{key:`getIntegerStr`,value:function(){return this.integer.toString()}},{key:`getDecimalStr`,value:function(){return this.decimal.toString().padStart(this.decimalLen,`0`)}},{key:`alignDecimal`,value:function(e){var t=`${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(e,`0`)}`;return BigInt(t)}},{key:`negate`,value:function(){var t=new e(this.toString());return t.negative=!t.negative,t}},{key:`cal`,value:function(t,n,r){var i=Math.max(this.getDecimalStr().length,t.getDecimalStr().length),a=n(this.alignDecimal(i),t.alignDecimal(i)).toString(),o=r(i),s=Dz(a),c=`${s.negativeStr}${s.trimStr.padStart(o+1,`0`)}`;return new e(`${c.slice(0,-o)}.${c.slice(-o)}`)}},{key:`add`,value:function(t){if(this.isInvalidate())return new e(t);var n=new e(t);return n.isInvalidate()?this:this.cal(n,function(e,t){return e+t},function(e){return e})}},{key:`multi`,value:function(t){var n=new e(t);return this.isInvalidate()||n.isInvalidate()?new e(NaN):this.cal(n,function(e,t){return e*t},function(e){return e*2})}},{key:`isEmpty`,value:function(){return this.empty}},{key:`isNaN`,value:function(){return this.nan}},{key:`isInvalidate`,value:function(){return this.isEmpty()||this.isNaN()}},{key:`equals`,value:function(e){return this.toString()===e?.toString()}},{key:`lessEquals`,value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:`toNumber`,value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:`toString`,value:function(){return!(arguments.length>0&&arguments[0]!==void 0)||arguments[0]?this.isInvalidate()?``:Dz(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr:this.origin}}]),e}(),Iz=function(){function e(t){if(Yo(this,e),Ko(this,`origin`,``),Ko(this,`number`,void 0),Ko(this,`empty`,void 0),Ez(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return Zo(e,[{key:`negate`,value:function(){return new e(-this.toNumber())}},{key:`add`,value:function(t){if(this.isInvalidate())return new e(t);var n=Number(t);if(Number.isNaN(n))return this;var r=this.number+n;if(r>2**53-1)return new e(2**53-1);if(r<-(2**53-1))return new e(-(2**53-1));var i=Math.max(Mz(this.number),Mz(n));return new e(r.toFixed(i))}},{key:`multi`,value:function(t){var n=Number(t);if(this.isInvalidate()||Number.isNaN(n))return new e(NaN);var r=this.number*n;if(r>2**53-1)return new e(2**53-1);if(r<-(2**53-1))return new e(-(2**53-1));var i=Math.max(Mz(this.number),Mz(n));return new e(r.toFixed(i))}},{key:`isEmpty`,value:function(){return this.empty}},{key:`isNaN`,value:function(){return Number.isNaN(this.number)}},{key:`isInvalidate`,value:function(){return this.isEmpty()||this.isNaN()}},{key:`equals`,value:function(e){return this.toNumber()===e?.toNumber()}},{key:`lessEquals`,value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:`toNumber`,value:function(){return this.number}},{key:`toString`,value:function(){return!(arguments.length>0&&arguments[0]!==void 0)||arguments[0]?this.isInvalidate()?``:Oz(this.number)&&Mz(this.number)>100?String(this.number):Nz(this.number):this.origin}}]),e}();function Lz(e){return Tz()?new Fz(e):new Iz(e)}function Rz(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===``)return``;var i=Dz(e),a=i.negativeStr,o=i.integerStr,s=i.decimalStr,c=`${t}${s}`,l=`${a}${o}`;if(n>=0){var u=Number(s[n]);return u>=5&&!r?Rz(Lz(e).add(`${a}0.${`0`.repeat(n)}${10-u}`).toString(),t,n,r):n===0?l:`${l}${t}${s.padEnd(n,`0`).slice(0,n)}`}return c===`.0`?l:`${l}${c}`}var zz=Lz;function Bz(e,t){return typeof Proxy<`u`&&e?new Proxy(e,{get(e,n){if(t[n])return t[n];let r=e[n];return typeof r==`function`?r.bind(e):r}}):e}function Vz(e,t){let n=(0,S.useRef)(null);function r(){try{let{selectionStart:t,selectionEnd:r,value:i}=e;n.current={start:t,end:r,value:i,beforeTxt:i.substring(0,t),afterTxt:i.substring(r)}}catch{}}function i(){if(e&&n.current&&t)try{let{value:t}=e,{beforeTxt:r,afterTxt:i,start:a}=n.current,o=t.length;if(t.startsWith(r))o=r.length;else if(t.endsWith(i))o=t.length-n.current.afterTxt.length;else{let e=r[a-1],n=t.indexOf(e,a-1);n!==-1&&(o=n+1)}e.setSelectionRange(o,o)}catch(e){br(!1,`Something warning of cursor restore. Please fire issue about this: ${e.message}`)}}return[r,i]}var Hz=200,Uz=600;function Wz({prefixCls:e,action:t,children:n,disabled:r,className:i,style:a,onStep:o}){let s=t===`up`,c=S.useRef(),l=S.useRef([]),u=()=>{clearTimeout(c.current)},d=e=>{e.preventDefault(),u(),o(s,`handler`);function t(){o(s,`handler`),c.current=setTimeout(t,Hz)}c.current=setTimeout(t,Uz)};S.useEffect(()=>()=>{u(),l.current.forEach(e=>{ri.cancel(e)})},[]);let f=`${e}-action`,p=J(f,`${f}-${t}`,{[`${f}-${t}-disabled`]:r},i),m=()=>l.current.push(ri(u));return S.createElement(`span`,{unselectable:`on`,role:`button`,onMouseUp:m,onMouseLeave:m,onMouseDown:e=>{d(e)},"aria-label":s?`Increase Value`:`Decrease Value`,"aria-disabled":r,className:p,style:a},n||S.createElement(`span`,{unselectable:`on`,className:`${e}-action-${t}-inner`}))}function Gz(e){let t=typeof e==`number`?Nz(e):Dz(e).fullStr;return t.includes(`.`)?Dz(t.replace(/(\d)\.(\d)/g,`$1$2.`)).fullStr:e+`0`}var Kz=(()=>{let e=(0,S.useRef)(0),t=()=>{ri.cancel(e.current)};return(0,S.useEffect)(()=>t,[]),n=>{t(),e.current=ri(()=>{n()})}});function qz(){return qz=Object.assign?Object.assign.bind():function(e){for(var t=1;te||t.isEmpty()?t.toString():t.toNumber(),Yz=e=>{let t=zz(e);return t.isInvalidate()?null:t},Xz=S.forwardRef((e,t)=>{let{mode:n=`input`,prefixCls:r=`rc-input-number`,className:i,style:a,classNames:o,styles:s,min:c,max:l,step:u=1,defaultValue:d,value:f,disabled:p,readOnly:m,upHandler:h,downHandler:g,keyboard:_,changeOnWheel:v=!1,controls:y=!0,prefix:b,suffix:x,stringMode:C,parser:w,formatter:T,precision:E,decimalSeparator:D,onChange:O,onInput:k,onPressEnter:A,onStep:j,onMouseDown:M,onClick:N,onMouseUp:P,onMouseLeave:F,onMouseMove:I,onMouseEnter:L,onMouseOut:R,changeOnBlur:z=!0,...B}=e,[V,H]=S.useState(!1),U=S.useRef(!1),W=S.useRef(!1),ee=S.useRef(!1),te=S.useRef(null),ne=S.useRef(null);S.useImperativeHandle(t,()=>Bz(ne.current,{focus:e=>{l_(ne.current,e)},blur:()=>{ne.current?.blur()},nativeElement:te.current}));let[re,ie]=S.useState(()=>zz(f??d));function ae(e){f===void 0&&ie(e)}let G=S.useCallback((e,t)=>{if(!t)return E>=0?E:Math.max(Mz(e),Mz(u))},[E,u]),oe=S.useCallback(e=>{let t=String(e);if(w)return w(t);let n=t;return D&&(n=n.replace(D,`.`)),n.replace(/[^\w.-]+/g,``)},[w,D]),K=S.useRef(``),se=S.useCallback((e,t)=>{if(T)return T(e,{userTyping:t,input:String(K.current)});let n=typeof e==`number`?Nz(e):e;if(!t){let e=G(n,t);Pz(n)&&(D||e>=0)&&(n=Rz(n,D||`.`,e))}return n},[T,G,D]),[ce,q]=S.useState(()=>{let e=d??f;return re.isInvalidate()&&[`string`,`number`].includes(typeof e)?Number.isNaN(e)?``:e:se(re.toString(),!1)});K.current=ce;function le(e,t){q(se(e.isInvalidate()?e.toString(!1):e.toString(!t),t))}let ue=S.useMemo(()=>Yz(l),[l,E]),de=S.useMemo(()=>Yz(c),[c,E]),fe=S.useMemo(()=>!ue||!re||re.isInvalidate()?!1:ue.lessEquals(re),[ue,re]),pe=S.useMemo(()=>!de||!re||re.isInvalidate()?!1:re.lessEquals(de),[de,re]),[me,he]=Vz(ne.current,V),ge=e=>ue&&!e.lessEquals(ue)?ue:de&&!de.lessEquals(e)?de:null,_e=e=>!ge(e),ve=(e,t)=>{let n=e,r=_e(n)||n.isEmpty();if(!n.isEmpty()&&!t&&(n=ge(n)||n,r=!0),!m&&!p&&r){let e=n.toString(),r=G(e,t);return r>=0&&(n=zz(Rz(e,`.`,r)),_e(n)||(n=zz(Rz(e,`.`,r,!0)))),n.equals(re)||(ae(n),O?.(n.isEmpty()?null:Jz(C,n)),f===void 0&&le(n,t)),n}return re},ye=Kz(),be=e=>{if(me(),K.current=e,q(e),!W.current){let t=zz(oe(e));t.isNaN()||ve(t,!0)}k?.(e),ye(()=>{let t=e;w||(t=e.replace(/。/g,`.`)),t!==e&&be(t)})},xe=()=>{W.current=!0},Se=()=>{W.current=!1,be(ne.current.value)},Ce=e=>{be(e.target.value)},we=In((e,t)=>{if(e&&fe||!e&&pe)return;U.current=!1;let n=zz(ee.current?Gz(u):u);e||(n=n.negate());let r=ve((re||zz(0)).add(n.toString()),!1);j?.(Jz(C,r),{offset:ee.current?Gz(u):u,type:e?`up`:`down`,emitter:t}),ne.current?.focus()}),Te=e=>{let t=zz(oe(ce)),n;n=t.isNaN()?ve(re,e):ve(t,e),f===void 0?n.isNaN()||le(n,!1):le(re,!1)},Ee=()=>{U.current=!0},De=e=>{let{key:t,shiftKey:n}=e;U.current=!0,ee.current=n,t===`Enter`&&(W.current||(U.current=!1),Te(!1),A?.(e)),_!==!1&&!W.current&&[`Up`,`ArrowUp`,`Down`,`ArrowDown`].includes(t)&&(we(t===`Up`||t===`ArrowUp`,`keyboard`),e.preventDefault())},Oe=()=>{U.current=!1,ee.current=!1};S.useEffect(()=>{if(v&&V){let e=e=>{we(e.deltaY<0,`wheel`),e.preventDefault()},t=ne.current;if(t)return t.addEventListener(`wheel`,e,{passive:!1}),()=>t.removeEventListener(`wheel`,e)}});let ke=()=>{z&&Te(!1),H(!1),U.current=!1},Ae=e=>{ne.current&&e.target!==ne.current&&(ne.current.focus(),e.preventDefault()),M?.(e)};Bn(()=>{re.isInvalidate()||le(re,!1)},[E,T]),Bn(()=>{let e=zz(f);ie(e);let t=zz(oe(ce));(!e.equals(t)||!U.current||T)&&le(e,U.current)},[f]),Bn(()=>{T&&he()},[ce]);let je={prefixCls:r,onStep:we,className:o?.action,style:s?.action},Me=S.createElement(Wz,qz({},je,{action:`up`,disabled:fe}),h),Ne=S.createElement(Wz,qz({},je,{action:`down`,disabled:pe}),g);return S.createElement(`div`,{ref:te,className:J(r,`${r}-mode-${n}`,i,o?.root,{[`${r}-focused`]:V,[`${r}-disabled`]:p,[`${r}-readonly`]:m,[`${r}-not-a-number`]:re.isNaN(),[`${r}-out-of-range`]:!re.isInvalidate()&&!_e(re)}),style:{...s?.root,...a},onMouseDown:Ae,onMouseUp:P,onMouseLeave:F,onMouseMove:I,onMouseEnter:L,onMouseOut:R,onClick:N,onFocus:()=>{H(!0)},onBlur:ke,onKeyDown:De,onKeyUp:Oe,onCompositionStart:xe,onCompositionEnd:Se,onBeforeInput:Ee},n===`spinner`&&y&&Ne,b!==void 0&&S.createElement(`div`,{className:J(`${r}-prefix`,o?.prefix),style:s?.prefix},b),S.createElement(`input`,qz({autoComplete:`off`,role:`spinbutton`,"aria-valuemin":c,"aria-valuemax":l,"aria-valuenow":re.isInvalidate()?null:re.toString(),step:u,ref:ne,className:J(`${r}-input`,o?.input),style:s?.input,value:ce,onChange:Ce,disabled:p,readOnly:m},B)),x!==void 0&&S.createElement(`div`,{className:J(`${r}-suffix`,o?.suffix),style:s?.suffix},x),n===`spinner`&&y&&Me,n===`input`&&y&&S.createElement(`div`,{className:J(`${r}-actions`,o?.actions),style:s?.actions},Me,Ne))}),Zz=e=>{let{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:a,fontSizeLG:o,fontSizeSM:s,borderRadiusLG:c,borderRadiusSM:l,colorBgContainerDisabled:u,lineWidth:d,antCls:f}=e,[p,m]=ol(f,`space`);return{[t]:[{display:`inline-flex`,alignItems:`center`,gap:0,whiteSpace:`nowrap`,paddingInline:r,margin:0,borderWidth:d,borderStyle:`solid`,borderRadius:n,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:o,borderRadius:c},"&-small":{paddingInline:a,borderRadius:l,fontSize:s},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[p(`addon-border-color`)]:i,[p(`addon-background`)]:u,[p(`addon-border-color-outlined`)]:i,[p(`addon-background-filled`)]:u,borderColor:m(`addon-border-color`),background:m(`addon-background`),"&-variant-outlined":{[p(`addon-border-color`)]:m(`addon-border-color-outlined`)},"&-variant-filled":{[p(`addon-border-color`)]:`transparent`,[p(`addon-background`)]:m(`addon-background-filled`),[`&${t}-disabled`]:{[p(`addon-border-color`)]:i,[p(`addon-background`)]:u}},"&-variant-borderless":{border:`none`,background:`transparent`},"&-variant-underlined":{border:`none`,background:`transparent`}},{"&-status-error":{[p(`addon-border-color-outlined`)]:e.colorError,[p(`addon-background-filled`)]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[p(`addon-border-color-outlined`)]:e.colorWarning,[p(`addon-background-filled`)]:e.colorWarningBg,color:e.colorWarning}}]}},Qz=rl([`Space`,`Addon`],e=>[Zz(e),Yg(e,{focus:!1})]),$z=S.forwardRef((e,t)=>{let{className:n,children:r,style:i,prefixCls:a,variant:o=`outlined`,disabled:s,status:c,...l}=e,{getPrefixCls:u,direction:d}=S.useContext(oi),f=u(`space-addon`,a),[p,m]=Qz(f),{compactItemClassnames:h,compactSize:g}=ih(f,d),_=aC(f,c),v=J(f,p,h,m,`${f}-variant-${o}`,_,{[`${f}-${g}`]:g,[`${f}-disabled`]:s},n);return S.createElement(`div`,{ref:t,className:v,style:i,...l},r)}),eB=e=>{let t=e.handleVisible??`auto`,n=e.controlHeightSM-e.lineWidth*2;return{...tL(e),controlWidth:90,handleWidth:n,handleFontSize:e.fontSize/2,handleVisible:t,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new Rs(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:+(t===!0),handleVisibleWidth:t===!0?n:0}},tB=e=>{let{componentCls:t,lineWidth:n,lineType:r,borderRadius:i,inputFontSizeSM:a,inputFontSizeLG:o,colorError:s,paddingInlineSM:c,paddingBlockSM:l,paddingBlockLG:u,paddingInlineLG:d,colorIcon:f,colorTextDisabled:p,motionDurationMid:m,handleHoverColor:h,handleOpacity:g,paddingInline:_,paddingBlock:v,handleBg:y,handleActiveBg:b,inputAffixPadding:x,borderRadiusSM:S,controlWidth:C,handleBorderColor:w,filledHandleBg:T,lineHeightLG:E,antCls:D}=e,O=`${Y(n)} ${r} ${w}`,[k,A]=ol(D,`input-number`);return[{[t]:{...Jc(e),...vL(e),[k(`input-padding-block`)]:Y(v),[k(`input-padding-inline`)]:Y(_),display:`inline-flex`,width:C,margin:0,paddingBlock:0,borderRadius:i,...aL(e,{[`${t}-actions`]:{background:y,[`${t}-action-down`]:{borderBlockStart:O}}}),...uL(e,{[`${t}-actions`]:{background:T,[`${t}-action-down`]:{borderBlockStart:O}},"&:focus-within":{[`${t}-actions`]:{background:y}}}),...mL(e,{[`${t}-actions`]:{background:y,[`${t}-action-down`]:{borderBlockStart:O}}}),...sL(e),[`&${t}-borderless`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(v).add(n).equal())},[`&${t}-borderless${t}-sm`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(l).add(n).equal())},[`&${t}-borderless${t}-lg`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(u).add(n).equal())},"&-rtl":{direction:`rtl`,[`${t}-input`]:{direction:`rtl`}},[`&${t}-out-of-range`]:{[`${t}-input`]:{color:s}},[`${t}-input`]:{...Jc(e),width:`100%`,paddingBlock:A(`input-padding-block`),textAlign:`start`,backgroundColor:`transparent`,border:0,borderRadius:0,outline:0,transition:`all ${m} linear`,appearance:`textfield`,fontSize:`inherit`,lineHeight:`inherit`,...hL(e.colorTextPlaceholder),'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:`none`}},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1},[`&-disabled ${t}-input`]:{cursor:`not-allowed`,color:e.colorTextDisabled}}},{[t]:{[`${t}-action`]:{...Yc(),userSelect:`none`,overflow:`hidden`,fontWeight:`bold`,lineHeight:0,textAlign:`center`,cursor:`pointer`,transition:`all ${m} linear`,[`&:active:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{background:b},[`&:hover:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{color:h},[`&${t}-action-up-disabled, &${t}-action-down-disabled`]:{cursor:`not-allowed`,color:p}},"&-mode-input":{overflow:`hidden`,[`${t}-actions`]:{position:`absolute`,insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:g,height:`100%`,borderRadius:0,display:`flex`,flexDirection:`column`,alignItems:`stretch`,transition:`all ${m}`,overflow:`hidden`,[`${t}-action`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,flex:`auto`,height:`40%`,marginInlineEnd:0,fontSize:e.handleFontSize}},[`&:hover ${t}-actions, &-focused ${t}-actions`]:{width:e.handleWidth,opacity:1},[`${t}-action`]:{color:f,height:`50%`,borderInlineStart:O,[`&:hover:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{height:`60%`}},[`&${t}-disabled, &${t}-readonly`]:{[`${t}-actions`]:{display:`none`}}},[`&${t}-mode-spinner`]:{padding:0,width:`auto`,[`${t}-action`]:{flex:`none`,paddingInline:A(`input-padding-inline`),"&-up":{borderInlineStart:O},"&-down":{borderInlineEnd:O}},[`${t}-input`]:{textAlign:`center`,paddingInline:A(`input-padding-inline`)}}}},{[t]:{"&-lg":{[k(`input-padding-block`)]:Y(u),[k(`input-padding-inline`)]:Y(d),paddingBlock:0,fontSize:o,lineHeight:E},"&-sm":{[k(`input-padding-block`)]:Y(l),[k(`input-padding-inline`)]:Y(c),paddingBlock:0,fontSize:a,borderRadius:S}}},{[t]:{[`${t}-prefix, ${t}-suffix`]:{display:`flex`,flex:`none`,alignItems:`center`,alignSelf:`center`,pointerEvents:`none`},[`${t}-prefix`]:{marginInlineEnd:x},[`${t}-suffix`]:{height:`100%`,marginInlineStart:x,transition:`margin ${m}`},[`&:hover:not(${t}-without-controls)`]:{[`${t}-suffix`]:{marginInlineEnd:e.handleWidth}}}}]},nB=e=>{let{componentCls:t,antCls:n}=e;return{[`${t}-addon`]:{[`&:has(${n}-select)`]:{border:0,padding:0}}}},rB=rl(`InputNumber`,e=>{let t=gs(e,eL(e));return[tB(t),nB(t),Yg(t)]},eB,{unitless:{handleOpacity:!0},resetFont:!1}),iB=S.forwardRef((e,t)=>{let n=S.useRef(null);S.useImperativeHandle(t,()=>n.current);let{rootClassName:r,size:i,disabled:a,prefixCls:o,addonBefore:s,addonAfter:c,prefix:l,suffix:u,bordered:d,readOnly:f,status:p,controls:m=!0,variant:h,className:g,style:_,classNames:v,styles:y,mode:b,...x}=e,{direction:C,className:w,style:T,styles:E,classNames:D}=li(`inputNumber`),O=S.useContext(zp),k=a??O,A=S.useMemo(()=>!m||k||f?!1:m,[m,k,f]),{compactSize:j,compactItemClassnames:M}=ih(o,C),N=b===`spinner`?S.createElement(TL,null):S.createElement(wz,null),P=b===`spinner`?S.createElement(xz,null):S.createElement(AC,null),F=typeof A==`boolean`?A:void 0;hd(A)&&(N=A.upIcon||N,P=A.downIcon||P);let{hasFeedback:I,isFormItemInput:L,feedbackIcon:R}=S.useContext(Sy),z=th(e=>i??j??e),[B,V]=hC(`inputNumber`,h,d),H=I&&S.createElement(S.Fragment,null,R),U={...e,size:z,disabled:k,controls:A},[W,ee]=Fd([D,v],[E,y],{props:U});return S.createElement(Xz,{ref:n,mode:b,disabled:k,className:J(g,r,W.root,w,M,aC(o,p,I),{[`${o}-${B}`]:V,[`${o}-lg`]:z===`large`,[`${o}-sm`]:z===`small`,[`${o}-rtl`]:C===`rtl`,[`${o}-in-form-item`]:L,[`${o}-without-controls`]:!A}),style:{...ee.root,...T,..._},upHandler:N,downHandler:P,prefixCls:o,readOnly:f,controls:F,prefix:l,suffix:H||u,classNames:W,styles:ee,...x})}),aB=S.forwardRef((e,t)=>{let{addonBefore:n,addonAfter:r,prefixCls:i,className:a,status:o,rootClassName:s,...c}=e,{getPrefixCls:l}=li(`inputNumber`),u=l(`input-number`,i),{status:d}=S.useContext(Sy),f=oC(d,o),p=bf(u),[m,h]=rB(u,p),g=n||r,_=S.createElement(iB,{ref:t,...c,prefixCls:u,status:f,className:J(h,p,m,a),rootClassName:g?void 0:s});if(g){let t=t=>t?S.createElement($z,{className:J(`${u}-addon`,h,m),variant:e.variant,disabled:e.disabled,status:f},S.createElement(Ty,{form:!0},t)):null,i=t(n),a=t(r);return S.createElement(sh,{rootClassName:s},i,_,a)}return _}),oB=aB;oB._InternalPanelDoNotUseOrYouWillBeFired=e=>S.createElement(am,{theme:{components:{InputNumber:{handleVisible:!0}}}},S.createElement(aB,{...e}));function sB(e){return!!(e.addonBefore||e.addonAfter)}function cB(e){return!!(e.prefix||e.suffix||e.allowClear)}function lB(e,t,n){let r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart==`number`&&typeof t.selectionEnd==`number`&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=(...e)=>{t.setSelectionRange(...e)},i}function uB(e,t,n,r){if(!n)return;let i=t;if(t.type===`click`){i=lB(t,e,``),n(i);return}if(e.type!==`file`&&r!==void 0){i=lB(t,e,r),n(i);return}n(i)}function dB(){return dB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{inputElement:n,children:r,prefixCls:i,prefix:a,suffix:o,addonBefore:s,addonAfter:c,className:l,style:u,disabled:d,readOnly:f,focused:p,triggerFocus:m,allowClear:h,value:g,handleReset:_,hidden:v,classes:y,classNames:b,dataAttrs:x,styles:C,components:w,onClear:T}=e,E=r??n,D=w?.affixWrapper||`span`,O=w?.groupWrapper||`span`,k=w?.wrapper||`span`,A=w?.groupAddon||`span`,j=(0,S.useRef)(null),M=e=>{j.current?.contains(e.target)&&m?.()},N=cB(e),P=(0,S.cloneElement)(E,{value:g,className:J(E.props?.className,!N&&b?.variant)||null}),F=(0,S.useRef)(null);if(S.useImperativeHandle(t,()=>({nativeElement:F.current||j.current})),N){let e=null;if(h){let t=!d&&!f&&g,n=`${i}-clear-icon`,r=typeof h==`object`&&h?.clearIcon?h.clearIcon:`✖`;e=S.createElement(`button`,{type:`button`,tabIndex:-1,onClick:e=>{_?.(e),T?.()},onMouseDown:e=>e.preventDefault(),className:J(n,{[`${n}-hidden`]:!t,[`${n}-has-suffix`]:!!o})},r)}let t=`${i}-affix-wrapper`,n=J(t,{[`${i}-disabled`]:d,[`${t}-disabled`]:d,[`${t}-focused`]:p,[`${t}-readonly`]:f,[`${t}-input-with-clear-btn`]:o&&h&&g},y?.affixWrapper,b?.affixWrapper,b?.variant),r=(o||h)&&S.createElement(`span`,{className:J(`${i}-suffix`,b?.suffix),style:C?.suffix},e,o);P=S.createElement(D,dB({className:n,style:C?.affixWrapper,onClick:M},x?.affixWrapper,{ref:j}),a&&S.createElement(`span`,{className:J(`${i}-prefix`,b?.prefix),style:C?.prefix},a),P,r)}if(sB(e)){let e=`${i}-group`,t=`${e}-addon`,n=`${e}-wrapper`,r=J(`${i}-wrapper`,e,y?.wrapper,b?.wrapper),a=J(n,{[`${n}-disabled`]:d},y?.group,b?.groupWrapper);P=S.createElement(O,{className:a,ref:F},S.createElement(k,{className:r},s&&S.createElement(A,{className:t},s),P,c&&S.createElement(A,{className:t},c)))}return S.cloneElement(P,{className:J(P.props?.className,l)||null,style:{...P.props?.style,...u},hidden:v})});function pB(e,t){return S.useMemo(()=>{let n={};t&&(n.show=typeof t==`object`&&t.formatter?t.formatter:!!t),n={...n,...e};let{show:r,...i}=n;return{...i,show:!!r,showFormatter:typeof r==`function`?r:void 0,strategy:i.strategy||(e=>e.length)}},[e,t])}function mB(){return mB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{autoComplete:n,onChange:r,onFocus:i,onBlur:a,onPressEnter:o,onKeyDown:s,onKeyUp:c,prefixCls:l=`rc-input`,disabled:u,htmlSize:d,className:f,maxLength:p,suffix:m,showCount:h,count:g,type:_=`text`,classes:v,classNames:y,styles:b,onCompositionStart:x,onCompositionEnd:C,...w}=e,[T,E]=(0,S.useState)(!1),D=(0,S.useRef)(!1),O=(0,S.useRef)(!1),k=(0,S.useRef)(null),A=(0,S.useRef)(null),j=e=>{k.current&&l_(k.current,e)},[M,N]=Hn(e.defaultValue,e.value),P=M==null?``:String(M),[F,I]=(0,S.useState)(null),L=pB(g,h),R=L.max||p,z=L.strategy(P),B=!!R&&z>R;(0,S.useImperativeHandle)(t,()=>({focus:j,blur:()=>{k.current?.blur()},setSelectionRange:(e,t,n)=>{k.current?.setSelectionRange(e,t,n)},select:()=>{k.current?.select()},input:k.current,nativeElement:A.current?.nativeElement||k.current})),(0,S.useEffect)(()=>{O.current&&=!1,E(e=>e&&u?!1:e)},[u]);let V=(e,t,n)=>{let i=t;if(!D.current&&L.exceedFormatter&&L.max&&L.strategy(t)>L.max)i=L.exceedFormatter(t,{max:L.max}),t!==i&&I([k.current?.selectionStart||0,k.current?.selectionEnd||0]);else if(n.source===`compositionEnd`)return;N(i),k.current&&uB(k.current,e,r,i)};(0,S.useEffect)(()=>{F&&k.current?.setSelectionRange(...F)},[F]);let H=e=>{V(e,e.target.value,{source:`change`})},U=e=>{D.current=!1,V(e,e.currentTarget.value,{source:`compositionEnd`}),C?.(e)},W=e=>{o&&e.key===`Enter`&&!O.current&&!e.nativeEvent.isComposing&&(O.current=!0,o(e)),s?.(e)},ee=e=>{e.key===`Enter`&&(O.current=!1),c?.(e)},te=e=>{E(!0),i?.(e)},ne=e=>{O.current&&=!1,E(!1),a?.(e)},re=e=>{N(``),j(),k.current&&uB(k.current,e,r)},ie=B&&`${l}-out-of-range`;return S.createElement(fB,mB({},w,{prefixCls:l,className:J(f,ie),handleReset:re,value:P,focused:T,triggerFocus:j,suffix:(()=>{let e=Number(R)>0;if(m||L.show){let t=L.showFormatter?L.showFormatter({value:P,count:z,maxLength:R}):`${z}${e?` / ${R}`:``}`;return S.createElement(S.Fragment,null,L.show&&S.createElement(`span`,{className:J(`${l}-show-count-suffix`,{[`${l}-show-count-has-suffix`]:!!m},y?.count),style:{...b?.count}},t),m)}return null})(),disabled:u,classes:v,classNames:y,styles:b,ref:A}),(()=>{let t=Sr(e,[`prefixCls`,`onPressEnter`,`addonBefore`,`addonAfter`,`prefix`,`suffix`,`allowClear`,`defaultValue`,`showCount`,`count`,`classes`,`htmlSize`,`styles`,`classNames`,`onClear`]);return S.createElement(`input`,mB({autoComplete:n},t,{onChange:H,onFocus:te,onBlur:ne,onKeyDown:W,onKeyUp:ee,className:J(l,{[`${l}-disabled`]:u},y?.input),style:b?.input,ref:k,size:d,type:_,onCompositionStart:e=>{D.current=!0,x?.(e)},onCompositionEnd:U}))})())}),gB=e=>{let t;return hd(e)&&e?.clearIcon?t=e:e&&(t={clearIcon:S.createElement(Fl,null)}),t};function _B(e,t){let n=(0,S.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute(`type`)===`password`&&e.current?.input.hasAttribute(`value`)&&e.current?.input.removeAttribute(`value`)}))};return(0,S.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[]),r}function vB(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var yB=(0,S.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,status:i,size:a,disabled:o,onBlur:s,onFocus:c,suffix:l,allowClear:u,addonAfter:d,addonBefore:f,className:p,style:m,styles:h,rootClassName:g,onChange:_,classNames:v,variant:y,...b}=e,{getPrefixCls:x,direction:C,allowClear:w,autoComplete:T,className:E,style:D,classNames:O,styles:k}=li(`input`),A=x(`input`,n),j=(0,S.useRef)(null),M=bf(A),[N,P]=yL(A,g);bL(A,M);let{compactSize:F,compactItemClassnames:I}=ih(A,C),L=th(e=>a??F??e),R=S.useContext(zp),z=o??R,B={...e,size:L,disabled:z},[V,H]=Fd([O,v],[k,h],{props:B}),{status:U,hasFeedback:W,feedbackIcon:ee}=(0,S.useContext)(Sy),te=oC(U,i);(0,S.useRef)(vB(e)||!!W);let ne=_B(j,!0),re=e=>{ne(),s?.(e)},ie=e=>{ne(),c?.(e)},ae=e=>{ne(),_?.(e)},G=(W||l)&&S.createElement(S.Fragment,null,l,W&&ee),oe=gB(u??w),[K,se]=hC(`input`,y,r);return S.createElement(hB,{ref:$n(t,j),prefixCls:A,autoComplete:T,...b,disabled:z,onBlur:re,onFocus:ie,style:{...H.root,...D,...m},styles:H,suffix:G,allowClear:oe,className:J(p,g,P,M,I,E,V.root),onChange:ae,addonBefore:f&&S.createElement(Ty,{form:!0,space:!0},f),addonAfter:d&&S.createElement(Ty,{form:!0,space:!0},d),classNames:{...V,input:J({[`${A}-sm`]:L===`small`,[`${A}-lg`]:L===`large`,[`${A}-rtl`]:C===`rtl`},V.input,N),variant:J({[`${A}-${K}`]:se},aC(A,te)),affixWrapper:J({[`${A}-affix-wrapper-sm`]:L===`small`,[`${A}-affix-wrapper-lg`]:L===`large`,[`${A}-affix-wrapper-rtl`]:C===`rtl`},N),wrapper:J({[`${A}-group-rtl`]:C===`rtl`},N),groupWrapper:J({[`${A}-group-wrapper-sm`]:L===`small`,[`${A}-group-wrapper-lg`]:L===`large`,[`${A}-group-wrapper-rtl`]:C===`rtl`,[`${A}-group-wrapper-${K}`]:se},aC(`${A}-group-wrapper`,te,W),N)}})}),bB={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z`}}]},name:`swap-right`,theme:`outlined`};function xB(){return xB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,xB({},e,{ref:t,icon:bB}))),CB=(e,t,n,r,i,a)=>{let{classNames:o,styles:s}=li(e),[c,l]=Fd([o,t],[s,n],{props:a},{popup:{_default:`root`}});return S.useMemo(()=>[{...c,popup:{...c.popup,root:J(c.popup?.root,r)}},{...l,popup:{...l.popup,root:{...l.popup?.root,...i}}}],[c,l,r,i])};function wB(e,t,n){return n===void 0?t===`year`&&e.lang.yearPlaceholder?e.lang.yearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.quarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.monthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.weekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.placeholder:e.lang.placeholder:n}function TB(e,t,n){return n===void 0?t===`year`&&e.lang.yearPlaceholder?e.lang.rangeYearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.rangeQuarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.rangeMonthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.rangeWeekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.rangePlaceholder:e.lang.rangePlaceholder:n}function EB(e,t){let{allowClear:n=!0}=e,{clearIcon:r,removeIcon:i}=PC({...e,prefixCls:t,componentName:`DatePicker`});return[S.useMemo(()=>n===!1?!1:{clearIcon:r,...n===!0?{}:n},[n,r]),i]}var[DB,OB]=[`week`,`WeekPicker`],[kB,AB]=[`month`,`MonthPicker`],[jB,MB]=[`year`,`YearPicker`],[NB,PB]=[`quarter`,`QuarterPicker`],[FB,IB]=[`time`,`TimePicker`],LB={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z`}}]},name:`calendar`,theme:`outlined`};function RB(){return RB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,RB({},e,{ref:t,icon:LB}))),BB={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}},{tag:`path`,attrs:{d:`M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z`}}]},name:`clock-circle`,theme:`outlined`};function VB(){return VB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,VB({},e,{ref:t,icon:BB}))),UB=({picker:e,hasFeedback:t,feedbackIcon:n,suffixIcon:r})=>r===null||r===!1?null:r===!0||r===void 0?S.createElement(S.Fragment,null,e===FB?S.createElement(HB,null):S.createElement(zB,null),t&&n):r,WB=e=>S.createElement(Zg,{size:`small`,type:`primary`,...e});function GB(e){return(0,S.useMemo)(()=>({button:WB,...e}),[e])}var KB=e=>(0,S.forwardRef)((t,n)=>{let{prefixCls:r,getPopupContainer:i,components:a,className:o,style:s,classNames:c,styles:l,placement:u,size:d,disabled:f,bordered:p=!0,placeholder:m,status:h,variant:g,picker:_,dropdownClassName:v,popupClassName:y,popupStyle:b,rootClassName:x,suffixIcon:C,separator:w,...T}=t,[E,D]=CB(_===FB?`timePicker`:`datePicker`,c,l,y||v,b),O=S.useRef(null),{getPrefixCls:k,direction:A,getPopupContainer:j,rangePicker:M}=(0,S.useContext)(oi),N=k(`picker`,r),{compactSize:P,compactItemClassnames:F}=ih(N,A),I=k(),L=w??M?.separator,[R,z]=hC(`rangePicker`,g,p),B=bf(N),[V,H]=CL(N,B),U=J(V,H,B,x),[W]=EB(t,N),ee=GB(a),te=th(e=>d??P??e),ne=S.useContext(zp),re=f??ne,{hasFeedback:ie,status:ae,feedbackIcon:G}=(0,S.useContext)(Sy),oe=UB({picker:_,hasFeedback:ie,feedbackIcon:G,suffixIcon:C});(0,S.useImperativeHandle)(n,()=>O.current);let[K]=cd(`Calendar`,Qu),se=fr(K,t.locale||{}),[ce]=Yd(`DatePicker`,D?.popup?.root?.zIndex);return S.createElement(Ty,{space:!0},S.createElement(QF,{separator:S.createElement(`span`,{"aria-label":`to`,className:`${N}-separator`},L??S.createElement(SB,null)),disabled:re,ref:O,placement:u,placeholder:TB(se,_,m),suffixIcon:oe,prevIcon:S.createElement(`span`,{className:`${N}-prev-icon`}),nextIcon:S.createElement(`span`,{className:`${N}-next-icon`}),superPrevIcon:S.createElement(`span`,{className:`${N}-super-prev-icon`}),superNextIcon:S.createElement(`span`,{className:`${N}-super-next-icon`}),transitionName:`${I}-slide-up`,picker:_,...T,locale:se.lang,getPopupContainer:i||j,generateConfig:e,components:ee,direction:A,prefixCls:N,rootClassName:U,className:J({[`${N}-large`]:te===`large`,[`${N}-small`]:te===`small`,[`${N}-${R}`]:z},aC(N,oC(ae,h),ie),F,o,M?.className),style:{...M?.style,...s},classNames:E,styles:{...D,popup:{...D.popup,root:{...D.popup.root,zIndex:ce}}},allowClear:W}))}),qB=e=>{let t=(t,n)=>{let r=n===IB?`timePicker`:`datePicker`;return(0,S.forwardRef)((i,a)=>{let{prefixCls:o,getPopupContainer:s,components:c,style:l,className:u,size:d,bordered:f,placement:p,placeholder:m,disabled:h,status:g,variant:_,onCalendarChange:v,classNames:y,styles:b,dropdownClassName:x,popupClassName:C,popupStyle:w,rootClassName:T,suffixIcon:E,...D}=i,{suffixIcon:O}=li(n===IB?`timePicker`:`datePicker`),{getPrefixCls:k,direction:A,getPopupContainer:j,[r]:M}=(0,S.useContext)(oi),N=k(`picker`,o),{compactSize:P,compactItemClassnames:F}=ih(N,A),I=th(e=>d??P??e),L=S.useContext(zp),R=h??L,z={...i,size:I,disabled:R,status:g,variant:_},[B,V]=CB(r,y,b,C||x,w,z),H=S.useRef(null),[U,W]=hC(`datePicker`,_,f),ee=bf(N),[te,ne]=CL(N,ee),re=J(te,ne,ee,T);(0,S.useImperativeHandle)(a,()=>H.current);let ie={showToday:!0},ae=t||i.picker,G=k(),{onSelect:oe,multiple:K}=D,se=oe&&t===`time`&&!K,ce=(e,t,n)=>{v?.(e,t,n),se&&oe(e)},[q,le]=EB(i,N),ue=GB(c),{hasFeedback:de,status:fe,feedbackIcon:pe}=(0,S.useContext)(Sy),me=UB({picker:ae,hasFeedback:de,feedbackIcon:pe,suffixIcon:E===void 0?O:E}),[he]=cd(`DatePicker`,Qu),ge=fr(he,i.locale||{}),[_e]=Yd(`DatePicker`,V?.popup?.root?.zIndex);return S.createElement(Ty,{space:!0},S.createElement(II,{ref:H,placeholder:wB(ge,ae,m),suffixIcon:me,placement:p,prevIcon:S.createElement(`span`,{className:`${N}-prev-icon`}),nextIcon:S.createElement(`span`,{className:`${N}-next-icon`}),superPrevIcon:S.createElement(`span`,{className:`${N}-super-prev-icon`}),superNextIcon:S.createElement(`span`,{className:`${N}-super-next-icon`}),transitionName:`${G}-slide-up`,picker:t,onCalendarChange:ce,...ie,...D,locale:ge.lang,getPopupContainer:s||j,generateConfig:e,components:ue,direction:A,disabled:R,prefixCls:N,rootClassName:re,className:J({[`${N}-large`]:I===`large`,[`${N}-small`]:I===`small`,[`${N}-${U}`]:W},aC(N,oC(fe,g),de),F,M?.className,u),style:{...M?.style,...l},classNames:B,styles:{...V,popup:{...V.popup,root:{...V.popup.root,zIndex:_e}}},allowClear:q,removeIcon:le}))})},n=t(),r=t(DB,OB),i=t(kB,AB),a=t(jB,MB),o=t(NB,PB);return{DatePicker:n,WeekPicker:r,MonthPicker:i,YearPicker:a,TimePicker:t(FB,IB),QuarterPicker:o}},JB=e=>{let{DatePicker:t,WeekPicker:n,MonthPicker:r,YearPicker:i,TimePicker:a,QuarterPicker:o}=qB(e),s=KB(e),c=t;return c.WeekPicker=n,c.MonthPicker=r,c.YearPicker=i,c.RangePicker=s,c.TimePicker=a,c.QuarterPicker=o,c},YB=JB(pte);YB._InternalPanelDoNotUseOrYouWillBeFired=cx(YB,`popupAlign`,void 0,`picker`),YB._InternalRangePanelDoNotUseOrYouWillBeFired=cx(YB.RangePicker,`popupAlign`,void 0,`picker`),YB.generatePicker=JB;var XB={xxxl:4,xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},ZB=S.createContext(null),QB=e=>Cr(e).map(e=>({...e?.props,key:e.key}));function $B(e,t,n){let r=S.useMemo(()=>t||QB(n),[t,n]);return S.useMemo(()=>r.map(({span:t,...n})=>t===`filled`?{...n,filled:!0}:{...n,span:pd(t)?t:WC(e,t)}),[r,e])}function eV(e,t){let n=[],r=[],i=!1,a=0;return e.filter(e=>e).forEach(e=>{let{filled:o,...s}=e;if(o){r.push(s),n.push(r),r=[],a=0;return}let c=t-a;a+=e.span||1,a>=t?(a>t?(i=!0,r.push({...s,span:c})):r.push(s),n.push(r),r=[],a=0):r.push(s)}),r.length>0&&n.push(r),n=n.map(e=>{let n=e.reduce((e,t)=>e+(t.span||1),0);if(n{let[n,r]=(0,S.useMemo)(()=>eV(t,e),[t,e]);return n},nV=e=>e.children,rV=e=>{let{itemPrefixCls:t,component:n,span:r,className:i,style:a,labelStyle:o,contentStyle:s,bordered:c,label:l,content:u,colon:d,type:f,styles:p,classNames:m}=e,h=n,{classNames:g,styles:_}=S.useContext(ZB),[v,y]=Fd([g,m],[_,p],{props:e}),b={...o,...y.label},x={...s,...y.content};return c?S.createElement(h,{colSpan:r,style:a,className:J(i,{[`${t}-item-${f}`]:f===`label`||f===`content`,[v.label]:v.label&&f===`label`,[v.content]:v.content&&f===`content`})},fd(l)&&S.createElement(`span`,{style:b},l),fd(u)&&S.createElement(`span`,{style:x},u)):S.createElement(h,{className:J(`${t}-item`,i),style:a,colSpan:r},S.createElement(`div`,{className:`${t}-item-container`},fd(l)&&S.createElement(`span`,{style:b,className:J(`${t}-item-label`,v.label,{[`${t}-item-no-colon`]:!d})},l),fd(u)&&S.createElement(`span`,{style:x,className:J(`${t}-item-content`,v.content)},u)))};function iV(e,{colon:t,prefixCls:n,bordered:r},{component:i,type:a,showLabel:o,showContent:s,labelStyle:c,contentStyle:l,styles:u}){return e.map(({label:e,children:d,prefixCls:f=n,className:p,style:m,labelStyle:h,contentStyle:g,span:_=1,key:v,styles:y,classNames:b},x)=>typeof i==`string`?S.createElement(rV,{key:`${a}-${v||x}`,className:p,style:m,classNames:b,styles:{label:{...c,...u?.label,...h,...y?.label},content:{...l,...u?.content,...g,...y?.content}},span:_,colon:t,component:i,itemPrefixCls:f,bordered:r,label:o?e:null,content:s?d:null,type:a}):[S.createElement(rV,{key:`label-${v||x}`,className:p,style:{...c,...u?.label,...m,...h,...y?.label},span:1,colon:t,component:i[0],itemPrefixCls:f,bordered:r,label:e,type:`label`}),S.createElement(rV,{key:`content-${v||x}`,className:p,style:{...l,...u?.content,...m,...g,...y?.content},span:_*2-1,component:i[1],itemPrefixCls:f,bordered:r,content:d,type:`content`})])}var aV=e=>{let t=S.useContext(ZB),{prefixCls:n,vertical:r,row:i,index:a,bordered:o}=e;return r?S.createElement(S.Fragment,null,S.createElement(`tr`,{key:`label-${a}`,className:`${n}-row`},iV(i,e,{component:`th`,type:`label`,showLabel:!0,...t})),S.createElement(`tr`,{key:`content-${a}`,className:`${n}-row`},iV(i,e,{component:`td`,type:`content`,showContent:!0,...t}))):S.createElement(`tr`,{key:a,className:`${n}-row`},iV(i,e,{component:o?[`th`,`td`]:`td`,type:`item`,showLabel:!0,showContent:!0,...t}))},oV=e=>{let{componentCls:t,labelBg:n}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:`auto`},[`${t}-row`]:{borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:`none`,"> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.padding)} ${Y(e.paddingLG)}`,borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:`none`}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:n,"&::after":{display:`none`}}}},[`&${t}-medium`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.paddingSM)} ${Y(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.paddingXS)} ${Y(e.padding)}`}}}}}},sV=e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:r,itemPaddingEnd:i,colonMarginRight:a,colonMarginLeft:o,titleMarginBottom:s}=e;return{[t]:{...Jc(e),...oV(e),"&-rtl":{direction:`rtl`},[`${t}-header`]:{display:`flex`,alignItems:`center`,marginBottom:s},[`${t}-title`]:{...qc,flex:`auto`,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG},[`${t}-extra`]:{marginInlineStart:`auto`,color:n,fontSize:e.fontSize},[`${t}-view`]:{width:`100%`,borderRadius:e.borderRadiusLG,table:{width:`100%`,tableLayout:`fixed`,borderCollapse:`collapse`}},[`${t}-row`]:{"> th, > td":{paddingBottom:r,paddingInlineEnd:i},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:`none`,"> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:`normal`,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:`start`,"&::after":{content:`":"`,position:`relative`,top:-.5,marginInline:`${Y(o)} ${Y(a)}`},[`&${t}-item-no-colon::after`]:{content:`""`}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:`""`}},[`${t}-item-content`]:{display:`table-cell`,flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:`break-word`,overflowWrap:`break-word`},[`${t}-item`]:{paddingBottom:0,verticalAlign:`top`,"&-container":{display:`flex`,[`${t}-item-label`]:{display:`inline-flex`,alignItems:`baseline`},[`${t}-item-content`]:{display:`inline-flex`,alignItems:`baseline`,minWidth:`1em`}}},"&-medium":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}}}},cV=rl(`Descriptions`,e=>sV(gs(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText})),lV=e=>{let{prefixCls:t,title:n,extra:r,column:i,colon:a=!0,bordered:o,layout:s,children:c,className:l,rootClassName:u,style:d,size:f,labelStyle:p,contentStyle:m,styles:h,items:g,classNames:_,...v}=e,{getPrefixCls:y,direction:b,className:x,style:C,classNames:w,styles:T}=li(`descriptions`),E=y(`descriptions`,t),D=KC(),O=S.useMemo(()=>pd(i)?i:WC(D,{...XB,...i})??3,[D,i]),k=$B(D,g,c),A=th(f),j=tV(O,k),[M,N]=cV(E),P={...e,column:O,items:k,size:A},[F,I]=Fd([w,_],[T,h],{props:P}),L=S.useMemo(()=>({labelStyle:p,contentStyle:m,styles:{label:I.label,content:I.content},classNames:{label:F.label,content:F.content}}),[p,m,I.label,I.content,F.label,F.content]);return S.createElement(ZB.Provider,{value:L},S.createElement(`div`,{className:J(E,x,F.root,{[`${E}-medium`]:A===`medium`||A===`middle`,[`${E}-small`]:A===`small`,[`${E}-bordered`]:!!o,[`${E}-rtl`]:b===`rtl`},l,u,M,N),style:{...C,...I.root,...d},...v},(n||r)&&S.createElement(`div`,{className:J(`${E}-header`,F.header),style:I.header},n&&S.createElement(`div`,{className:J(`${E}-title`,F.title),style:I.title},n),r&&S.createElement(`div`,{className:J(`${E}-extra`,F.extra),style:I.extra},r)),S.createElement(`div`,{className:`${E}-view`},S.createElement(`table`,null,S.createElement(`tbody`,null,j.map((e,t)=>S.createElement(aV,{key:t,index:t,colon:a,prefixCls:E,vertical:s===`vertical`,bordered:o,row:e})))))))};lV.Item=nV;var uV=S.createContext(null),dV=S.createContext({});function fV(){return fV=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t,className:n,containerRef:r,...i}=e,{panel:a}=S.useContext(dV),o=er(a,r);return S.createElement(`div`,fV({className:J(`${t}-section`,n),role:`dialog`,ref:o},Vu(e,{aria:!0}),{"aria-modal":`true`},i))};function mV(e){let{prefixCls:t,direction:n,className:r,style:i,maxSize:a,containerRef:o,currentSize:s,onResize:c,onResizeEnd:l,onResizeStart:u}=e,[d,f]=S.useState(!1),[p,m]=S.useState(0),[h,g]=S.useState(0),_=n===`left`||n===`right`,v=In(e=>{e.preventDefault(),e.stopPropagation(),f(!0),m(_?e.clientX:e.clientY);let t;if(typeof s==`number`)t=s;else if(o?.current){let e=o.current.getBoundingClientRect();t=_?e.width:e.height}g(t),u?.(t)}),y=In(e=>{if(!d)return;let t=(_?e.clientX:e.clientY)-p;(n===`right`||n===`bottom`)&&(t=-t);let r=h+t;r<0&&(r=0),a&&r>a&&(r=a),c?.(r)}),b=S.useCallback(()=>{if(d&&(f(!1),o?.current)){let e=o.current.getBoundingClientRect(),t=_?e.width:e.height;l?.(t)}},[d,o,l,_]);return S.useEffect(()=>{if(d)return document.addEventListener(`mousemove`,y),document.addEventListener(`mouseup`,b),()=>{document.removeEventListener(`mousemove`,y),document.removeEventListener(`mouseup`,b)}},[d,y,b]),{dragElementProps:{className:J(`${t}-dragger`,`${t}-dragger-${n}`,{[`${t}-dragger-dragging`]:d,[`${t}-dragger-horizontal`]:_,[`${t}-dragger-vertical`]:!_},r),style:i,onMouseDown:v},isDragging:d}}function hV(e){if(typeof e==`string`){let t=Number(e.replace(/px$/i,``));if(parseFloat(e)===t&&br(!1,"Invalid value type of `width` or `height` which should be number type instead."),!Number.isNaN(t))return t}return e}function gV(e,t,n,r,i){let[a]=x_(t&&(r??i!==!1),e);return S.useEffect(()=>{t&&n===!0&&e()?.focus({preventScroll:!0})},[t]),a}function _V(){return _V=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,open:r,placement:i,inline:a,push:o,forceRender:s,autoFocus:c,focusTrap:l,classNames:u,rootClassName:d,rootStyle:f,zIndex:p,className:m,id:h,style:g,motion:_,width:v,height:y,size:b,maxSize:x,children:C,mask:w,maskClosable:T,maskMotion:E,maskClassName:D,maskStyle:O,afterOpenChange:k,onClose:A,onMouseEnter:j,onMouseOver:M,onMouseLeave:N,onClick:P,onKeyDown:F,onKeyUp:I,styles:L,drawerRender:R,resizable:z,defaultSize:B}=e,V=S.useRef(null);S.useImperativeHandle(t,()=>V.current);let H=gV(()=>V.current,r,c,l,w),[U,W]=S.useState(!1),ee=S.useContext(uV),te;te=typeof o==`boolean`?o?{}:{distance:0}:o||{};let ne=te?.distance??ee?.pushDistance??180,re=S.useMemo(()=>({pushDistance:ne,push:()=>{W(!0)},pull:()=>{W(!1)}}),[ne]);S.useEffect(()=>{r?ee?.push?.():ee?.pull?.()},[r]),S.useEffect(()=>()=>{ee?.pull?.()},[]);let ie=S.createElement(Iu,_V({key:`mask`},E,{visible:w&&r}),({className:e,style:t},i)=>S.createElement(`div`,{className:J(`${n}-mask`,e,u?.mask,D),style:{...t,...O,...L?.mask},onClick:T&&r?A:void 0,ref:i})),ae=typeof _==`function`?_(i):_,[G,oe]=S.useState(),K=i===`left`||i===`right`,se=S.useMemo(()=>hV(b??(K?v:y)??G??B??(K?378:void 0)),[b,v,y,B,K,G]),ce=S.useMemo(()=>{let e={};if(U&&ne)switch(i){case`top`:e.transform=`translateY(${ne}px)`;break;case`bottom`:e.transform=`translateY(${-ne}px)`;break;case`left`:e.transform=`translateX(${ne}px)`;break;default:e.transform=`translateX(${-ne}px)`;break}return K?e.width=hV(se):e.height=hV(se),e},[U,ne,i,K,se]),q=S.useRef(null),le=!!z,ue=typeof z==`object`&&z||{},de=In(e=>{oe(e),ue.onResize?.(e)}),{dragElementProps:fe,isDragging:pe}=mV({prefixCls:`${n}-resizable`,direction:i,className:u?.dragger,style:L?.dragger,maxSize:x,containerRef:q,currentSize:se,onResize:de,onResizeStart:ue.onResizeStart,onResizeEnd:ue.onResizeEnd}),me={onMouseEnter:j,onMouseOver:M,onMouseLeave:N,onClick:P,onKeyDown:F,onKeyUp:I,onFocus:e=>{H(e.target)}},he=S.createElement(Iu,_V({key:`panel`},ae,{visible:r,forceRender:s,onVisibleChanged:k,removeOnLeave:!1,leavedClassName:`${n}-content-wrapper-hidden`}),({className:t,style:r},i)=>{let a=S.createElement(pV,_V({id:h,containerRef:i,prefixCls:n,className:J(m,u?.section),style:{...g,...L?.section}},Vu(e,{aria:!0}),me),C);return S.createElement(`div`,_V({ref:q,className:J(`${n}-content-wrapper`,pe&&`${n}-content-wrapper-dragging`,u?.wrapper,!pe&&t),style:{...r,...ce,...L?.wrapper}},Vu(e,{data:!0})),le&&S.createElement(`div`,fe),R?R(a):a)}),ge={...f};return p&&(ge.zIndex=p),S.createElement(uV.Provider,{value:re},S.createElement(`div`,{className:J(n,`${n}-${i}`,d,{[`${n}-open`]:r,[`${n}-inline`]:a}),style:ge,tabIndex:-1,ref:V},ie,he))}),yV=e=>{let{open:t=!1,prefixCls:n=`rc-drawer`,placement:r=`right`,autoFocus:i=!0,keyboard:a=!0,width:o,height:s,size:c,maxSize:l,mask:u=!0,maskClosable:d=!0,getContainer:f,forceRender:p,afterOpenChange:m,destroyOnHidden:h,onMouseEnter:g,onMouseOver:_,onMouseLeave:v,onClick:y,onKeyDown:b,onKeyUp:x,onClose:C,resizable:w,defaultSize:T,focusTriggerAfterClose:E,panelRef:D}=e,[O,k]=S.useState(!1),[A,j]=S.useState(!1);zn(()=>{j(!0)},[]);let M=A?t:!1,N=S.useRef(null),P=S.useRef(null);zn(()=>{M&&(P.current=document.activeElement)},[M]);let F=e=>{k(e),m?.(e),!e&&E!==!1&&P.current&&!N.current?.contains(P.current)&&P.current?.focus({preventScroll:!0})},I=S.useMemo(()=>({panel:D}),[D]);if(!p&&!O&&!M&&h)return null;let L={onMouseEnter:g,onMouseOver:_,onMouseLeave:v,onClick:y,onKeyDown:b,onKeyUp:x},R={...e,open:M,prefixCls:n,placement:r,autoFocus:i,keyboard:a,width:o,height:s,size:c,maxSize:l,defaultSize:T,mask:u,maskClosable:d,inline:f===!1,afterOpenChange:F,ref:N,resizable:w,...L};return S.createElement(dV.Provider,{value:I},S.createElement(Xf,{open:M||p||O,autoDestroy:!1,getContainer:f,autoLock:u&&(M||O),onEsc:({top:e,event:t})=>{e&&a&&(t.stopPropagation(),C?.(t))}},S.createElement(vV,R)))},bV=e=>{let{prefixCls:t,ariaId:n,title:r,footer:i,extra:a,closable:o,loading:s,onClose:c,headerStyle:l,bodyStyle:u,footerStyle:d,children:f,classNames:p,styles:m}=e,h=li(`drawer`),{classNames:g,styles:_,closable:v}=h,[y,b]=Fd([g,p],[_,m],{props:{...e,closable:o??v}}),x=S.useMemo(()=>{let e=o??v;if(e!==!1)return hd(e)&&e?.placement===`end`?`end`:`start`},[o,v]),C=S.useCallback(e=>S.createElement(`button`,{type:`button`,onClick:c,className:J(`${t}-close`,{[`${t}-close-${x}`]:x===`end`},y.close),style:b.close},e),[c,t,x,y.close,b.close]),[w,T]=Td(yd(e),yd(h),{closable:!0,closeIconRender:C}),E=()=>!r&&!w?null:S.createElement(`div`,{style:{...b.header,...l},className:J(`${t}-header`,y.header,{[`${t}-header-close-only`]:w&&!r&&!a})},S.createElement(`div`,{className:`${t}-header-title`},x===`start`&&T,r&&S.createElement(`div`,{className:J(`${t}-title`,y.title),style:b.title,id:n},r)),a&&S.createElement(`div`,{className:J(`${t}-extra`,y.extra),style:b.extra},a),x===`end`&&T),D=()=>i?S.createElement(`div`,{className:J(`${t}-footer`,y.footer),style:{...b.footer,...d}},i):null;return S.createElement(S.Fragment,null,E(),S.createElement(`div`,{className:J(`${t}-body`,y.body),style:{...b.body,...u}},s?S.createElement(Wy,{active:!0,title:!1,paragraph:{rows:5},className:`${t}-body-skeleton`}):f),D())},xV=e=>{let t=`100%`;return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},SV=(e,t)=>({"&-enter, &-appear":{...e,"&-active":t},"&-leave":{...t,"&-active":e}}),CV=(e,t)=>({"&-enter, &-appear, &-leave":{"&-start":{transition:`none`},"&-active":{transition:`all ${t}`}},...SV({opacity:e},{opacity:1})}),wV=(e,t)=>[CV(.7,t),SV({transform:xV(e)},{transform:`none`})],TV=e=>{let{componentCls:t,motionDurationSlow:n}=e;return{[t]:{[`${t}-mask-motion`]:CV(0,n),[`${t}-panel-motion`]:[`left`,`right`,`top`,`bottom`].reduce((e,t)=>({...e,[`&-${t}`]:wV(t,n)}),{})}}},EV=e=>{let{borderRadiusSM:t,componentCls:n,zIndexPopup:r,colorBgMask:i,colorBgElevated:a,motionDurationSlow:o,motionDurationMid:s,paddingXS:c,padding:l,paddingLG:u,fontSizeLG:d,lineHeightLG:f,lineWidth:p,lineType:m,colorSplit:h,marginXS:g,colorIcon:_,colorIconHover:v,colorBgTextHover:y,colorBgTextActive:b,colorText:x,fontWeightStrong:S,footerPaddingBlock:C,footerPaddingInline:w,draggerSize:T,calc:E}=e,D=`${n}-content-wrapper`,O=`${n}-resizable-dragger`;return{[n]:{position:`fixed`,inset:0,zIndex:r,pointerEvents:`none`,color:x,"&-pure":{position:`relative`,background:a,display:`flex`,flexDirection:`column`,pointerEvents:`auto`,[`&${n}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${n}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${n}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${n}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:`absolute`},[`${n}-mask`]:{position:`absolute`,inset:0,zIndex:r,background:i,pointerEvents:`auto`,[`&${n}-mask-blur`]:{backdropFilter:`blur(4px)`}},[D]:{position:`absolute`,zIndex:r,maxWidth:`100vw`,transition:`all ${o}`,"&-hidden":{display:`none`}},[`&-left > ${D}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${D}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${D}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${D}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${n}-section`]:{display:`flex`,flexDirection:`column`,width:`100%`,height:`100%`,overflow:`auto`,background:a,pointerEvents:`auto`},[`${n}-header`]:{display:`flex`,flex:0,alignItems:`center`,padding:`${Y(l)} ${Y(u)}`,fontSize:d,lineHeight:f,borderBottom:`${Y(p)} ${m} ${h}`,"&-title":{display:`flex`,flex:1,alignItems:`center`,minWidth:0,minHeight:0}},[`${n}-extra`]:{flex:`none`},[`${n}-close`]:{display:`inline-flex`,width:E(d).add(c).equal(),height:E(d).add(c).equal(),borderRadius:t,justifyContent:`center`,alignItems:`center`,color:_,fontWeight:S,fontSize:d,fontStyle:`normal`,lineHeight:1,textAlign:`center`,textTransform:`none`,textDecoration:`none`,background:`transparent`,border:0,cursor:`pointer`,transition:`all ${s}`,textRendering:`auto`,[`&${n}-close-end`]:{marginInlineStart:g},[`&:not(${n}-close-end)`]:{marginInlineEnd:g},"&:hover":{color:v,backgroundColor:y,textDecoration:`none`},"&:active":{backgroundColor:b},...Qc(e)},[`${n}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:d,lineHeight:f},[`${n}-body`]:{flex:1,minWidth:0,minHeight:0,padding:u,overflow:`auto`,[`${n}-body-skeleton`]:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`}},[`${n}-footer`]:{flexShrink:0,padding:`${Y(C)} ${Y(w)}`,borderTop:`${Y(p)} ${m} ${h}`},[O]:{position:`absolute`,zIndex:1,backgroundColor:`transparent`,userSelect:`none`,pointerEvents:`auto`,"&:hover":{backgroundColor:e.colorPrimary,opacity:.2},"&-dragging":{backgroundColor:e.colorPrimary,opacity:.3}},[`${O}-left`]:{top:0,bottom:0,right:{_skip_check_:!0,value:0},width:T,cursor:`col-resize`},[`${O}-right`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},width:T,cursor:`col-resize`},[`${O}-top`]:{insetInline:0,bottom:0,height:T,cursor:`row-resize`},[`${O}-bottom`]:{insetInline:0,top:0,height:T,cursor:`row-resize`},[`${D}-dragging`]:{userSelect:`none`,transition:`none`,willChange:`width, height`,[`${n}-content`]:{pointerEvents:`none`},[`${n}-section`]:{pointerEvents:`none`}},"&-rtl":{direction:`rtl`}}}},DV=rl(`Drawer`,e=>{let t=gs(e,{});return[EV(t),TV(t)]},e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding,draggerSize:4})),OV={distance:180},kV=378,AV={motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},jV=e=>{let{rootClassName:t,size:n,defaultSize:r=kV,height:i,width:a,mask:o,push:s=OV,open:c,afterOpenChange:l,onClose:u,prefixCls:d,getContainer:f,panelRef:p=null,style:m,className:h,resizable:g,"aria-labelledby":_,focusable:v,maskClosable:y,maskStyle:b,drawerStyle:x,contentWrapperStyle:C,destroyOnClose:w,destroyOnHidden:T,...E}=e,{placement:D}=E,O=zf(),k=E.title?O:void 0,{getPopupContainer:A,getPrefixCls:j,direction:M,className:N,style:P,classNames:F,styles:I,mask:L}=li(`drawer`),R=j(`drawer`,d),[z,B]=DV(R),V=f===void 0&&A?()=>A(document.body):f,H=S.useMemo(()=>pd(n)?n:n===`large`?736:n===`default`?kV:typeof n==`string`?/^\d+(\.\d+)?$/.test(n)?Number(n):n:!D||D===`left`||D===`right`?a:i,[n,D,a,i]),U={motionName:Gm(R,`mask-motion`),...AV},W=e=>({motionName:Gm(R,`panel-motion-${e}`),...AV}),ee=$n(p,Ky()),[te,ne]=Yd(`Drawer`,E.zIndex),[re,ie,ae]=Od(o,L,R,y),G=Ay(v,V!==!1&&re),{classNames:oe,styles:K,rootStyle:se}=E,ce={...e,zIndex:te,panelRef:p,mask:re,maskClosable:ae,defaultSize:r,push:s,focusable:G},[q,le]=Fd([F,oe],[I,K],{props:ce}),ue=J({"no-mask":!re,[`${R}-rtl`]:M===`rtl`},t,z,B,q.root);return S.createElement(Ty,{form:!0,space:!0},S.createElement(Ud.Provider,{value:ne},S.createElement(yV,{prefixCls:R,onClose:u,maskMotion:U,motion:W,...E,classNames:{mask:J(q.mask,ie.mask),section:q.section,wrapper:q.wrapper,dragger:q.dragger},styles:{mask:{...le.mask,...b},section:{...le.section,...x},wrapper:{...le.wrapper,...C},dragger:le.dragger},open:c,mask:re,maskClosable:ae,push:s,size:H,defaultSize:r,style:{...P,...m},rootStyle:{...se,...le.root},className:J(N,h),rootClassName:ue,getContainer:V,afterOpenChange:l,panelRef:ee,zIndex:te,...g?{resizable:g}:{},"aria-labelledby":_??k,destroyOnHidden:T??w,focusTriggerAfterClose:G.focusTriggerAfterClose,focusTrap:G.trap},S.createElement(bV,{prefixCls:R,size:n,...E,ariaId:k,onClose:u}))))};jV._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,style:n,className:r,placement:i=`right`,...a}=e,{getPrefixCls:o}=S.useContext(oi),s=o(`drawer`,t),[c,l]=DV(s),u=J(s,`${s}-pure`,`${s}-${i}`,c,l,r);return S.createElement(`div`,{className:u,style:n},S.createElement(bV,{prefixCls:s,...a}))};var MV=jV;function NV(e){return[`small`,`middle`,`medium`,`large`].includes(e)}function PV(e){return e?pd(e):!1}var FV=S.createContext({latestIndex:0}),IV=FV.Provider,LV=e=>{let{className:t,prefix:n,index:r,children:i,separator:a,style:o,classNames:s,styles:c}=e,{latestIndex:l}=S.useContext(FV);return fd(i)?S.createElement(S.Fragment,null,S.createElement(`div`,{className:t,style:o},i),r{let{componentCls:t,antCls:n}=e;return{[t]:{display:`inline-flex`,"&-rtl":{direction:`rtl`},"&-vertical":{flexDirection:`column`},"&-align":{flexDirection:`column`,"&-center":{alignItems:`center`},"&-start":{alignItems:`flex-start`},"&-end":{alignItems:`flex-end`},"&-baseline":{alignItems:`baseline`}},[`${t}-item:empty`]:{display:`none`},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:`block`}}}},zV=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},BV=rl(`Space`,e=>{let t=gs(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[RV(t),zV(t)]},()=>({}),{resetStyle:!1}),VV=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,size:i,className:a,style:o,classNames:s,styles:c}=li(`space`),{size:l=i??`small`,align:u,className:d,rootClassName:f,children:p,direction:m,orientation:h,prefixCls:g,split:_,separator:v,style:y,vertical:b,wrap:x=!1,classNames:C,styles:w,...T}=e,[E,D]=Array.isArray(l)?l:[l,l],O=NV(D),k=NV(E),A=PV(D),j=PV(E),M=Cr(p,{keepEmpty:!0}),[N,P]=Rd(h,b,m),F=u===void 0&&!P?`center`:u,I=v??_,L=n(`space`,g),[R,z]=BV(L),B={...e,size:l,orientation:N,align:F},[V,H]=Fd([s,C],[c,w],{props:B}),U=J(L,a,R,`${L}-${N}`,{[`${L}-rtl`]:r===`rtl`,[`${L}-align-${F}`]:F,[`${L}-gap-row-${D}`]:O,[`${L}-gap-col-${E}`]:k},d,f,z,V.root),W=J(`${L}-item`,V.item),ee=M.map((e,t)=>{let n=e?.key||`${W}-${t}`;return S.createElement(LV,{prefix:L,classNames:V,styles:H,className:W,key:n,index:t,separator:I,style:H.item},e)}),te=S.useMemo(()=>({latestIndex:M.reduce((e,t,n)=>fd(t)?n:e,0)}),[M]);if(M.length===0)return null;let ne={};return x&&(ne.flexWrap=`wrap`),!k&&j&&(ne.columnGap=E),!O&&A&&(ne.rowGap=D),S.createElement(`div`,{ref:t,className:U,style:{...ne,...H.root,...o,...y},...T},S.createElement(IV,{value:te},ee))});VV.Compact=sh,VV.Addon=$z;var HV=e=>{let{getPopupContainer:t,getPrefixCls:n,direction:r}=S.useContext(oi),{prefixCls:i,type:a=`default`,danger:o,disabled:s,loading:c,onClick:l,htmlType:u,children:d,className:f,menu:p,arrow:m,autoFocus:h,trigger:g,align:_,open:v,onOpenChange:y,placement:b,getPopupContainer:x,href:C,icon:w=S.createElement(kE,null),title:T,buttonsRender:E=e=>e,mouseEnterDelay:D,mouseLeaveDelay:O,overlayClassName:k,overlayStyle:A,destroyOnHidden:j,destroyPopupOnHide:M,dropdownRender:N,popupRender:P,...F}=e,I=n(`dropdown`,i),L=`${I}-button`,R={menu:p,arrow:m,autoFocus:h,align:_,disabled:s,trigger:s?[]:g,onOpenChange:y,getPopupContainer:x||t,mouseEnterDelay:D,mouseLeaveDelay:O,classNames:{root:k},styles:{root:A},destroyOnHidden:j,popupRender:P||N},{compactSize:z,compactItemClassnames:B}=ih(I,r),V=J(L,B,f);`destroyPopupOnHide`in e&&(R.destroyPopupOnHide=M),`open`in e&&(R.open=v),`placement`in e?R.placement=b:R.placement=r===`rtl`?`bottomLeft`:`bottomRight`;let[H,U]=E([S.createElement(qE,{type:a,danger:o,disabled:s,loading:c,onClick:l,htmlType:u,href:C,title:T},d),S.createElement(qE,{type:a,danger:o,icon:w})]);return S.createElement(VV.Compact,{className:V,size:z,block:!0,...F},H,S.createElement(KE,{...R},U))};HV.__ANT_BUTTON=!0;var UV=KE;UV.Button=HV;var WV={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z`}}]},name:`file-text`,theme:`outlined`};function GV(){return GV=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,GV({},e,{ref:t,icon:WV}))),qV=(e,t)=>fd(e)?hd(e)&&!(0,S.isValidElement)(e)?{...t,...e}:{...t,title:e}:null;function JV(e){let[t,n]=S.useState(e);return S.useEffect(()=>{let t=setTimeout(()=>{n(e)},e.length?0:10);return()=>{clearTimeout(t)}},[e]),t}var YV=e=>{let{componentCls:t,motionDurationFast:n,motionEaseInOut:r}=e,i=`${t}-show-help`,a=`${t}-show-help-item`;return{[i]:{transition:`opacity ${n} ${r}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[a]:{overflow:`hidden`,transition:`${[`height`,`opacity`,`transform`].map(e=>`${e} ${n} ${r}`).join(`, `)} !important`,[`&${a}-appear, &${a}-enter`]:{transform:`translateY(-5px)`,opacity:0,"&-active":{transform:`translateY(0)`,opacity:1}},[`&${a}-leave-active`]:{transform:`translateY(-5px)`}}}}},XV=e=>({legend:{display:`block`,width:`100%`,marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:`inherit`,border:0,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},'input[type="search"]':{boxSizing:`border-box`},'input[type="radio"], input[type="checkbox"]':{lineHeight:`normal`},'input[type="file"]':{display:`block`},'input[type="range"]':{display:`block`,width:`100%`},"select[multiple], select[size]":{height:`auto`},"input[type='file']:focus, input[type='radio']:focus, input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${Y(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:`block`,paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),ZV=(e,t)=>{let{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},QV=e=>{let{componentCls:t}=e;return{[t]:{...Jc(e),...XV(e),[`${t}-text`]:{display:`inline-block`,paddingInlineEnd:e.paddingSM},"&-small":{...ZV(e,e.controlHeightSM)},"&-large":{...ZV(e,e.controlHeightLG)}}}},$V=e=>{let{formItemCls:t,iconCls:n,rootPrefixCls:r,antCls:i,labelRequiredMarkColor:a,labelColor:o,labelFontSize:s,labelHeight:c,labelColonMarginInlineStart:l,labelColonMarginInlineEnd:u,itemMarginBottom:d}=e,[f]=ol(i,`grid`);return{[t]:{...Jc(e),marginBottom:d,verticalAlign:`top`,"&-with-help":{transition:`none`},[`&-hidden, &-hidden${i}-row`]:{display:`none`},"&-has-warning":{[`${t}-split`]:{color:e.colorError}},"&-has-error":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{flexGrow:0,overflow:`hidden`,whiteSpace:`nowrap`,textAlign:`end`,verticalAlign:`middle`,"&-left":{textAlign:`start`},"&-wrap":{overflow:`unset`,lineHeight:e.lineHeight,whiteSpace:`unset`,"> label":{verticalAlign:`middle`,textWrap:`balance`}},"> label":{position:`relative`,display:`inline-flex`,alignItems:`center`,maxWidth:`100%`,height:c,color:o,fontSize:s,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:`top`},[`&${t}-required`]:{"&::before":{display:`inline-block`,marginInlineEnd:e.marginXXS,color:a,fontSize:e.fontSize,fontFamily:`sans-serif`,lineHeight:1,content:`"*"`},[`&${t}-required-mark-hidden, &${t}-required-mark-optional`]:{"&::before":{display:`none`}}},[`${t}-optional`]:{display:`inline-block`,marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`&${t}-required-mark-hidden`]:{display:`none`}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:`help`,writingMode:`horizontal-tb`,marginInlineStart:e.marginXXS},"&::after":{content:`":"`,position:`relative`,marginBlock:0,marginInlineStart:l,marginInlineEnd:u},[`&${t}-no-colon::after`]:{content:`"\\a0"`}}},[`${t}-control`]:{[f(`display`)]:`flex`,flexDirection:`column`,flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:`100%`},"&-input":{position:`relative`,display:`flex`,alignItems:`center`,minHeight:e.controlHeight,"&-content":{flex:`auto`,maxWidth:`100%`,[`&:has(> ${i}-switch:only-child, > ${i}-rate:only-child)`]:{display:`flex`,alignItems:`center`}}}},[t]:{"&-additional":{display:`flex`,flexDirection:`column`},"&-explain, &-extra":{clear:`both`,color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:`100%`},"&-extra":{minHeight:e.controlHeightSM,transition:`color ${e.motionDurationMid} ${e.motionEaseOut}`},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},[`&-with-help ${t}-explain`]:{height:`auto`,opacity:1},[`${t}-feedback-icon`]:{fontSize:e.fontSize,textAlign:`center`,visibility:`visible`,animationName:Wh,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:`none`,"&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}}}},eH=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:`initial`,textAlign:`start`,"> label":{margin:0,"&::after":{visibility:`hidden`}}}),tH=e=>{let{antCls:t,formItemCls:n}=e;return{[`${n}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:`1 1 0`,minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:`unset`}},[`${t}-col-24${n}-label, ${t}-col-xl-24${n}-label`]:eH(e)}}},nH=e=>{let{componentCls:t,formItemCls:n,inlineItemMarginBottom:r}=e;return{[`${t}-inline`]:{display:`flex`,flexWrap:`wrap`,[`${n}-inline`]:{flex:`none`,marginInlineEnd:e.margin,marginBottom:r,"&-row":{flexWrap:`nowrap`},[`> ${n}-label, > ${n}-control`]:{display:`inline-block`,verticalAlign:`top`},[`> ${n}-label`]:{flex:`none`},[`${t}-text`]:{display:`inline-block`},[`${n}-has-feedback`]:{display:`inline-block`}}}}},rH=e=>{let{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${n} ${n}-label`]:eH(e),[`${t}:not(${t}-inline)`]:{[n]:{flexWrap:`wrap`,[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:`0 0 100%`,maxWidth:`100%`}}}}}},iH=e=>{let{componentCls:t,formItemCls:n,antCls:r}=e;return{[`${n}-vertical`]:{[`${n}-row`]:{flexDirection:`column`},[`${n}-label > label`]:{height:`auto`},[`${n}-control`]:{width:`100%`},[`${n}-label, @@ -369,27 +369,27 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${t}-collapse, ${t}-edit, ${t}-copy - `]:{...nl(e),marginInlineStart:e.marginXXS},...qQ(e),...JQ(e),...YQ(),"&-rtl":{direction:`rtl`}}}},()=>({titleMarginTop:`1.2em`,titleMarginBottom:`0.5em`})),ZQ=e=>{let{prefixCls:t,"aria-label":n,className:r,style:i,direction:a,maxLength:o,autoSize:s=!0,value:c,onSave:l,onCancel:u,onEnd:d,component:f,enterIcon:p=S.createElement(HQ,null)}=e,m=S.useRef(null),h=S.useRef(!1),g=S.useRef(null),[_,v]=S.useState(c);S.useEffect(()=>{v(c)},[c]),S.useEffect(()=>{if(m.current?.resizableTextArea){let{textArea:e}=m.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let y=({target:e})=>{v(e.value.replace(/[\n\r]/g,``))},b=()=>{h.current=!0},x=()=>{h.current=!1},C=({keyCode:e})=>{h.current||(g.current=e)},w=()=>{l(_.trim())},T=({keyCode:e,ctrlKey:t,altKey:n,metaKey:r,shiftKey:i})=>{g.current!==e||h.current||t||n||r||i||(e===om.ENTER?(w(),d?.()):e===om.ESC&&u())},E=()=>{w()},[D,O]=XQ(t),k=J(t,`${t}-edit-content`,{[`${t}-rtl`]:a===`rtl`,[`${t}-${f}`]:!!f},r,D,O);return S.createElement(`div`,{className:k,style:i},S.createElement(mW,{ref:m,maxLength:o,value:_,onChange:y,onKeyDown:C,onKeyUp:T,onCompositionStart:b,onCompositionEnd:x,onBlur:E,"aria-label":n,rows:1,autoSize:s}),p===null?null:Pp(p,{className:`${t}-edit-content-confirm`}))},QQ=(e,t)=>{let n=!1,r=r=>{r.stopPropagation(),r.preventDefault(),r.clipboardData?.clearData(),r.clipboardData?.setData(`text/plain`,e),t&&r.clipboardData?.setData(`text/html`,e),n=!0};try{return document.addEventListener(`copy`,r,{capture:!0}),document.execCommand(`copy`),n}catch{return!1}finally{document.removeEventListener(`copy`,r,{capture:!0})}},$Q=async(e,t)=>{try{return t?await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:`text/html`}),"text/plain":new Blob([e],{type:`text/plain`})})]):await navigator.clipboard.writeText(e),!0}catch{return!1}};async function e$(e,t){if(typeof e!=`string`)return!1;let n=t?.format===`text/html`;return!!(await $Q(e,n)||QQ(e,n))}var t$=({copyConfig:e,children:t})=>{let[n,r]=S.useState(!1),[i,a]=S.useState(!1),o=S.useRef(null),s=()=>{o.current&&clearTimeout(o.current)},c={};return e.format&&(c.format=e.format),S.useEffect(()=>s,[]),{copied:n,copyLoading:i,onClick:In(async n=>{n?.preventDefault(),n?.stopPropagation(),a(!0);try{await e$((typeof e.text==`function`?await e.text():e.text)||CG(t,{skipEmpty:!0}).join(``)||``,c),a(!1),r(!0),s(),o.current=setTimeout(()=>{r(!1)},3e3),e.onCopy?.(n)}catch(e){throw a(!1),e}})}};function n$(e,t){return S.useMemo(()=>{let n=!!e;return[n,{...t,...n&&typeof e==`object`?e:null}]},[e])}var r$=e=>{let t=(0,S.useRef)(void 0);return(0,S.useEffect)(()=>{t.current=e}),t.current},i$=(e,t,n)=>(0,S.useMemo)(()=>e===!0?{title:t??n}:(0,S.isValidElement)(e)?{title:e}:hd(e)?{title:t??n,...e}:{title:e},[e,t,n]),a$=S.forwardRef((e,t)=>{let{prefixCls:n,component:r=`article`,className:i,rootClassName:a,children:o,direction:s,style:c,...l}=e,{getPrefixCls:u,direction:d,className:f,style:p}=li(`typography`),m=s??d,h=u(`typography`,n),[g,_]=XQ(h),v=J(h,f,{[`${h}-rtl`]:m===`rtl`},i,a,g,_),y={...p,...c};return S.createElement(r,{className:v,style:y,ref:t,...l},o)}),o$={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z`}}]},name:`copy`,theme:`outlined`};function s$(){return s$=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,s$({},e,{ref:t,icon:o$}))),l$=e=>e===!1?[!1,!1]:CG(e);function u$(e,t,n){return e===!0||e===void 0?t:e||n&&t}function d$(e){let t=document.createElement(`em`);e.appendChild(t);let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}var f$=e=>[`string`,`number`].includes(typeof e),p$=e=>{let{prefixCls:t,copied:n,locale:r,iconOnly:i,tooltips:a,icon:o,tabIndex:s,onCopy:c,loading:l}=e,u=l$(a),d=l$(o),{copied:f,copy:p}=r??{},m=n?f:p,h=u$(u[+!!n],m),g=typeof h==`string`?h:m;return S.createElement(Ow,{title:h},S.createElement(`button`,{type:`button`,className:J(`${t}-copy`,{[`${t}-copy-success`]:n,[`${t}-copy-icon-only`]:i}),onClick:c,"aria-label":g,tabIndex:s},n?u$(d[1],S.createElement(DC,null),!0):u$(d[0],l?S.createElement(xm,null):S.createElement(c$,null),!0)))},m$=S.forwardRef(({style:e,children:t},n)=>{let r=S.useRef(null);return S.useImperativeHandle(n,()=>({isExceed:()=>{let e=r.current;return e.scrollHeight>e.clientHeight},getHeight:()=>r.current.clientHeight})),S.createElement(`span`,{"aria-hidden":!0,ref:r,style:{position:`fixed`,display:`block`,left:0,top:0,pointerEvents:`none`,backgroundColor:`rgba(255, 0, 0, 0.65)`,...e}},t)}),h$=e=>e.reduce((e,t)=>e+(f$(t)?String(t).length:1),0);function g$(e,t){let n=0,r=[];for(let i=0;it){let e=t-n;return r.push(String(a).slice(0,e)),r}r.push(a),n=s}return e}var _$=0,v$=1,y$=2,b$=3,x$=4,S$={display:`-webkit-box`,overflow:`hidden`,WebkitBoxOrient:`vertical`};function C$(e){let{enableMeasure:t,width:n,text:r,children:i,rows:a,expanded:o,miscDeps:s,onEllipsis:c}=e,l=S.useMemo(()=>Cr(r),[r]),u=S.useMemo(()=>h$(l),[r]),d=S.useMemo(()=>i(l,!1),[r]),[f,p]=S.useState(null),m=S.useRef(null),h=S.useRef(null),g=S.useRef(null),_=S.useRef(null),v=S.useRef(null),[y,b]=S.useState(!1),[x,C]=S.useState(_$),[w,T]=S.useState(0),[E,D]=S.useState(null);zn(()=>{C(t&&n&&u?v$:_$)},[n,r,a,t,l]),zn(()=>{if(x===v$)C(y$),D(h.current&&getComputedStyle(h.current).whiteSpace);else if(x===y$){let e=!!g.current?.isExceed();C(e?b$:x$),p(e?[0,u]:null),b(e);let t=g.current?.getHeight()||0,n=a===1?0:_.current?.getHeight()||0,r=v.current?.getHeight()||0;T(Math.max(t,n+r)+1),c(e)}},[x]);let O=f?Math.ceil((f[0]+f[1])/2):0;zn(()=>{let[e,t]=f||[0,0];if(e!==t){let n=(m.current?.getHeight()||0)>w,r=O;t-e===1&&(r=n?e:t),p(n?[e,r]:[r,t])}},[f,O]);let k=S.useMemo(()=>{if(!t)return i(l,!1);if(x!==b$||!f||f[0]!==f[1]){let e=i(l,!1);return[x$,_$].includes(x)?e:S.createElement(`span`,{style:{...S$,WebkitLineClamp:a}},e)}return i(o?l:g$(l,f[0]),y)},[o,x,f,l].concat(Zr(s))),A={width:n,margin:0,padding:0,whiteSpace:E===`nowrap`?`normal`:`inherit`};return S.createElement(S.Fragment,null,k,x===y$&&S.createElement(S.Fragment,null,S.createElement(m$,{style:{...A,...S$,WebkitLineClamp:a},ref:g},d),S.createElement(m$,{style:{...A,...S$,WebkitLineClamp:a-1},ref:_},d),S.createElement(m$,{style:{...A,...S$,WebkitLineClamp:1},ref:v},i([],!0))),x===b$&&f&&f[0]!==f[1]&&S.createElement(m$,{style:{...A,top:400},ref:m},i(g$(l,O),!0)),x===v$&&S.createElement(`span`,{style:{whiteSpace:`inherit`},ref:h}))}var w$=({enableEllipsis:e,isEllipsis:t,open:n,children:r,tooltipProps:i})=>{if(!i?.title||!e)return r;let a=n&&t;return S.createElement(Ow,{open:a,...i},r)};function T$({mark:e,code:t,underline:n,delete:r,strong:i,keyboard:a,italic:o},s){let c=s;function l(e,t){t&&(c=S.createElement(e,{},c))}return l(`strong`,i),l(`u`,n),l(`del`,r),l(`code`,t),l(`mark`,e),l(`kbd`,a),l(`i`,o),c}var E$=`...`,D$=[`delete`,`mark`,`code`,`underline`,`strong`,`keyboard`,`italic`],O$=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,type:a,disabled:o,children:s,ellipsis:c,editable:l,copyable:u,component:d,title:f,onMouseEnter:p,onMouseLeave:m,...h}=e,{getPrefixCls:g,direction:_}=S.useContext(oi),[v]=cd(`Text`),y=S.useRef(null),b=S.useRef(null),x=g(`typography`,n),C=Sr(h,D$),[w,T]=n$(l),[E,D]=Hn(!1,T.editing),{triggerType:O=[`icon`]}=T,k=e=>{e&&T.onStart?.(),D(e)},A=r$(E);zn(()=>{!E&&A&&b.current?.focus()},[E]);let j=e=>{e?.preventDefault(),k(!0)},M=e=>{T.onChange?.(e),k(!1)},N=()=>{T.onCancel?.(),k(!1)},[P,F]=n$(u),{copied:I,copyLoading:L,onClick:R}=t$({copyConfig:F,children:s}),[z,B]=S.useState(!1),[V,H]=S.useState(!1),[U,W]=S.useState(!1),[ee,te]=S.useState(!1),[ne,re]=S.useState(!0),[ie,ae]=n$(c,{expandable:!1,symbol:e=>e?v?.collapse:v?.expand}),[G,oe]=Hn(ae.defaultExpanded||!1,ae.expanded),K=ie&&(!G||ae.expandable===`collapsible`),{rows:se=1}=ae,ce=S.useMemo(()=>K&&(ae.suffix!==void 0||ae.onEllipsis||ae.expandable||w||P),[K,ae,w,P]);zn(()=>{ie&&!ce&&(B(Oy(`webkitLineClamp`)),H(Oy(`textOverflow`)))},[ce,ie]);let[q,le]=S.useState(K),ue=S.useMemo(()=>ce?!1:se===1?V:z,[ce,V,z]);zn(()=>{le(ue&&K)},[ue,K]);let de=i$(ae.tooltip,T.text,s),fe=q&&!!de.title,pe=K&&(q?fe&&ee:U),me=K&&se===1&&q,he=K&&se>1&&q,ge=(e,t)=>{oe(t.expanded),ae.onExpand?.(e,t)},[_e,ve]=S.useState(0),[ye,be]=S.useState(!1),[xe,Se]=S.useState(!1),Ce=({offsetWidth:e})=>{ve(e)},we=e=>{W(e),U!==e&&ae.onEllipsis?.(e)};S.useEffect(()=>{let e=y.current;if(ie&&fe&&e){let t=d$(e);ee!==t&&te(t)}},[ie,fe,s,he,ne,_e]),S.useEffect(()=>{let e=y.current;if(typeof IntersectionObserver>`u`||!e||!fe||!K)return;let t=new IntersectionObserver(()=>{re(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[fe,K]);let Te=S.useMemo(()=>{if(!(!ie||q))return[T.text,s,f,de.title].find(f$)},[ie,q,f,de.title,pe]);if(E)return S.createElement(ZQ,{value:T.text??(typeof s==`string`?s:``),onSave:M,onCancel:N,onEnd:T.onEnd,prefixCls:x,className:r,style:i,direction:_,component:d,maxLength:T.maxLength,autoSize:T.autoSize,enterIcon:T.enterIcon});let Ee=()=>{let{expandable:e,symbol:t}=ae;return e?S.createElement(`button`,{type:`button`,key:`expand`,className:`${x}-${G?`collapse`:`expand`}`,onClick:e=>ge(e,{expanded:!G}),"aria-label":G?v.collapse:v?.expand},typeof t==`function`?t(G):t):null},De=()=>{if(!w)return;let{icon:e,tooltip:t,tabIndex:n}=T,r=Cr(t)[0]||v?.edit,i=typeof r==`string`?r:``;return O.includes(`icon`)?S.createElement(Ow,{key:`edit`,title:t===!1?``:r},S.createElement(`button`,{type:`button`,ref:b,className:`${x}-edit`,onClick:j,"aria-label":i,tabIndex:n},e||S.createElement(zQ,{role:`button`}))):null},Oe=()=>P?S.createElement(p$,{key:`copy`,...F,prefixCls:x,copied:I,locale:v,onCopy:R,loading:L,iconOnly:!fd(s)}):null,ke=e=>{let t=e&&Ee(),n=De(),r=Oe();return!t&&!n&&!r?null:S.createElement(`span`,{key:`operations`,className:`${x}-actions`,onMouseEnter:()=>be(!0),onMouseLeave:()=>be(!1)},t,n,r)},Ae=e=>[e&&!G&&S.createElement(`span`,{"aria-hidden":!0,key:`ellipsis`},E$),ae.suffix,ke(e)];return S.createElement(Wr,{onResize:Ce,disabled:!K},c=>S.createElement(w$,{tooltipProps:de,enableEllipsis:K,isEllipsis:pe,open:xe&&!ye},S.createElement(a$,{onMouseEnter:e=>{Se(!0),p?.(e)},onMouseLeave:e=>{Se(!1),m?.(e)},className:J({[`${x}-${a}`]:a,[`${x}-disabled`]:o,[`${x}-ellipsis`]:ie,[`${x}-ellipsis-single-line`]:me,[`${x}-ellipsis-multiple-line`]:he,[`${x}-link`]:d===`a`},r),prefixCls:n,style:{...i,WebkitLineClamp:he?se:void 0},component:d,ref:$n(c,y,t),direction:_,onClick:O.includes(`text`)?j:void 0,"aria-label":Te?.toString(),title:f,...C},S.createElement(C$,{enableMeasure:K&&!q,text:s,rows:se,width:_e,onEllipsis:we,expanded:G,miscDeps:[I,G,L,w,P,v].concat(Zr(D$.map(t=>e[t])))},(t,n)=>T$(e,S.createElement(S.Fragment,null,t.length>0&&n&&!G&&Te?S.createElement(`span`,{key:`show-content`,"aria-hidden":!0},t):t,Ae(n)))))))}),k$=S.forwardRef((e,t)=>{let{ellipsis:n,rel:r,children:i,navigate:a,...o}=e,s={...o,rel:r===void 0&&o.target===`_blank`?`noopener noreferrer`:r};return S.createElement(O$,{...s,ref:t,ellipsis:!!n,component:`a`},i)}),A$=S.forwardRef((e,t)=>{let{children:n,...r}=e;return S.createElement(O$,{ref:t,...r,component:`div`},n)}),j$=S.forwardRef((e,t)=>{let{ellipsis:n,children:r,...i}=e,a=S.useMemo(()=>hd(n)?Sr(n,[`expandable`,`rows`]):n,[n]);return S.createElement(O$,{ref:t,...i,ellipsis:a,component:`span`},r)}),M$=[1,2,3,4,5],N$=S.forwardRef((e,t)=>{let{level:n=1,children:r,...i}=e,a=M$.includes(n)?`h${n}`:`h1`;return S.createElement(O$,{ref:t,...i,component:a},r)}),Z=a$;Z.Text=j$,Z.Link=k$,Z.Title=N$,Z.Paragraph=A$;var P$=((e,t)=>{if(e&&t){let n=Array.isArray(t)?t:t.split(`,`),r=e.name||``,i=e.type||``,a=i.replace(/\/.*$/,``);return n.some(e=>{let t=e.trim();if(/^\*(\/\*)?$/.test(e))return!0;if(t.charAt(0)===`.`){let e=r.toLowerCase(),n=t.toLowerCase(),i=[n];return(n===`.jpg`||n===`.jpeg`)&&(i=[`.jpg`,`.jpeg`]),i.some(t=>e.endsWith(t))}return/\/\*$/.test(t)?a===t.replace(/\/.*$/,``):i===t?!0:/^\w+$/.test(t)?(br(!1,`Upload takes an invalidate 'accept' type '${t}'.Skip for check.`),!0):!1})}return!0});function F$(e,t){let n=`cannot ${e.method} ${e.action} ${t.status}'`,r=Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}function I$(e){let t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function L$(e){let t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});let n=new FormData;e.data&&Object.keys(e.data).forEach(t=>{let r=e.data[t];if(Array.isArray(r)){r.forEach(e=>{n.append(`${t}[]`,e)});return}n.append(t,r)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(F$(e,t),I$(t)):e.onSuccess(I$(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&`withCredentials`in t&&(t.withCredentials=!0);let r=e.headers||{};return r[`X-Requested-With`]!==null&&t.setRequestHeader(`X-Requested-With`,`XMLHttpRequest`),Object.keys(r).forEach(e=>{r[e]!==null&&t.setRequestHeader(e,r[e])}),t.send(n),{abort(){t.abort()}}}var R$=async(e,t)=>{let n=[],r=[];e.forEach(e=>r.push(e.webkitGetAsEntry()));async function i(e){let t=e.createReader(),n=[];for(;;){let e=await new Promise(e=>{t.readEntries(e,()=>e([]))}),r=e.length;if(!r)break;for(let t=0;t{e.file(r=>{t(r)?(e.fullPath&&!r.webkitRelativePath&&(Object.defineProperties(r,{webkitRelativePath:{writable:!0}}),r.webkitRelativePath=e.fullPath.replace(/^\//,``),Object.defineProperties(r,{webkitRelativePath:{writable:!1}})),n(r)):n(null)})})}let o=async(e,t)=>{if(e){if(e.path=t||``,e.isFile){let t=await a(e);t&&n.push(t)}else if(e.isDirectory){let t=await i(e);r.push(...t)}}},s=0;for(;s{let{accept:n,directory:r}=this.props,i,a;if(typeof n==`string`)a=n;else{let{filter:e,format:t}=n||{};a=t,i=e===`native`?()=>!0:e}return(i||(r||t?e=>P$(e,a):()=>!0))(e)};onChange=e=>{let{files:t}=e.target,n=[...t].filter(e=>this.filterFile(e));this.uploadFiles(n),this.reset()};onClick=e=>{let t=this.fileInput;if(!t)return;let n=e.target,{onClick:r}=this.props;n&&n.tagName===`BUTTON`&&(t.parentNode.focus(),n.blur()),t.click(),r&&r(e)};onKeyDown=e=>{e.key===`Enter`&&this.onClick(e)};onDataTransferFiles=async(e,t)=>{let{multiple:n,directory:r}=this.props,i=[...e.items||[]],a=[...e.files||[]];if((a.length>0||i.some(e=>e.kind===`file`))&&t?.(),r)a=await R$(Array.prototype.slice.call(i),this.filterFile),this.uploadFiles(a);else{let e=[...a].filter(e=>this.filterFile(e,!0));n===!1&&(e=a.slice(0,1)),this.uploadFiles(e)}};onFilePaste=async e=>{let{pastable:t}=this.props;if(t&&e.type===`paste`){let t=e.clipboardData;return this.onDataTransferFiles(t,()=>{e.preventDefault()})}};onFileDragOver=e=>{e.preventDefault()};onFileDrop=async e=>{if(e.preventDefault(),e.type===`drop`){let t=e.dataTransfer;return this.onDataTransferFiles(t)}};componentDidMount(){this._isMounted=!0;let{pastable:e}=this.props;e&&document.addEventListener(`paste`,this.onFilePaste)}componentWillUnmount(){this._isMounted=!1,this.abort(),document.removeEventListener(`paste`,this.onFilePaste)}componentDidUpdate(e){let{pastable:t}=this.props;t&&!e.pastable?document.addEventListener(`paste`,this.onFilePaste):!t&&e.pastable&&document.removeEventListener(`paste`,this.onFilePaste)}uploadFiles=e=>{let t=[...e],n=t.map(e=>(e.uid=V$(),this.processFile(e,t)));Promise.all(n).then(e=>{let{onBatchStart:t}=this.props;t?.(e.map(({origin:e,parsedFile:t})=>({file:e,parsedFile:t}))),e.filter(e=>e.parsedFile!==null).forEach(e=>{this.post(e)})})};processFile=async(e,t)=>{let{beforeUpload:n}=this.props,r=e;if(n){try{r=await n(e,t)}catch{r=!1}if(r===!1)return{origin:e,parsedFile:null,action:null,data:null}}let{action:i}=this.props,a;a=typeof i==`function`?await i(e):i;let{data:o}=this.props,s;s=typeof o==`function`?await o(e):o;let c=(typeof r==`object`||typeof r==`string`)&&r?r:e,l;l=c instanceof File?c:new File([c],e.name,{type:e.type});let u=l;return u.uid=e.uid,{origin:e,data:s,parsedFile:u,action:a}};post({data:e,origin:t,action:n,parsedFile:r}){if(!this._isMounted)return;let{onStart:i,customRequest:a,name:o,headers:s,withCredentials:c,method:l}=this.props,{uid:u}=t,d=a||L$,f={action:n,filename:o,data:e,file:r,headers:s,withCredentials:c,method:l||`post`,onProgress:e=>{let{onProgress:t}=this.props;t?.(e,r)},onSuccess:(e,t)=>{let{onSuccess:n}=this.props;n?.(e,r,t),delete this.reqs[u]},onError:(e,t)=>{let{onError:n}=this.props;n?.(e,t,r),delete this.reqs[u]}};i(t),this.reqs[u]=d(f,{defaultRequest:L$})}reset(){this.setState({uid:V$()})}abort(e){let{reqs:t}=this;if(e){let n=e.uid?e.uid:e;t[n]&&t[n].abort&&t[n].abort(),delete t[n]}else Object.keys(t).forEach(e=>{t[e]&&t[e].abort&&t[e].abort(),delete t[e]})}saveFileInput=e=>{this.fileInput=e};render(){let{component:e,prefixCls:t,className:n,classNames:r={},disabled:i,id:a,name:o,style:s,styles:c={},multiple:l,accept:u,capture:d,children:f,directory:p,openFileDialogOnClick:m,onMouseEnter:h,onMouseLeave:g,hasControlInside:_,...v}=this.props,y=typeof u==`string`?u:u?.format,b=J(t,{[`${t}-disabled`]:i,[n]:n}),x=p?{directory:`directory`,webkitdirectory:`webkitdirectory`}:{},C=i?{}:{onClick:m?this.onClick:()=>{},onKeyDown:m?this.onKeyDown:()=>{},onMouseEnter:h,onMouseLeave:g,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:_?void 0:`0`};return S.createElement(e,H$({},C,{className:b,role:_?void 0:`button`,style:s}),S.createElement(`input`,H$({},Vu(v,{aria:!0,data:!0}),{id:a,name:o,disabled:i,type:`file`,ref:this.saveFileInput,onClick:e=>e.stopPropagation(),key:this.state.uid,style:{display:`none`,...c.input},className:r.input,accept:y},x,{multiple:l,onChange:this.onChange},d==null?{}:{capture:d})),f)}};function W$(){return W$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.uploader=e};render(){return S.createElement(U$,W$({},this.props,{ref:this.saveUploader}))}},q$=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:`relative`,width:`100%`,height:`100%`,textAlign:`center`,background:e.colorFillAlter,border:`${Y(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:e.padding},[`${t}-btn`]:{display:`table`,width:`100%`,height:`100%`,outline:`none`,borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:`${Y(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`}},[`${t}-drag-container`]:{display:`table-cell`,verticalAlign:`middle`},[` + `]:{...nl(e),marginInlineStart:e.marginXXS},...qQ(e),...JQ(e),...YQ(),"&-rtl":{direction:`rtl`}}}},()=>({titleMarginTop:`1.2em`,titleMarginBottom:`0.5em`})),ZQ=e=>{let{prefixCls:t,"aria-label":n,className:r,style:i,direction:a,maxLength:o,autoSize:s=!0,value:c,onSave:l,onCancel:u,onEnd:d,component:f,enterIcon:p=S.createElement(HQ,null)}=e,m=S.useRef(null),h=S.useRef(!1),g=S.useRef(null),[_,v]=S.useState(c);S.useEffect(()=>{v(c)},[c]),S.useEffect(()=>{if(m.current?.resizableTextArea){let{textArea:e}=m.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let y=({target:e})=>{v(e.value.replace(/[\n\r]/g,``))},b=()=>{h.current=!0},x=()=>{h.current=!1},C=({keyCode:e})=>{h.current||(g.current=e)},w=()=>{l(_.trim())},T=({keyCode:e,ctrlKey:t,altKey:n,metaKey:r,shiftKey:i})=>{g.current!==e||h.current||t||n||r||i||(e===om.ENTER?(w(),d?.()):e===om.ESC&&u())},E=()=>{w()},[D,O]=XQ(t),k=J(t,`${t}-edit-content`,{[`${t}-rtl`]:a===`rtl`,[`${t}-${f}`]:!!f},r,D,O);return S.createElement(`div`,{className:k,style:i},S.createElement(mW,{ref:m,maxLength:o,value:_,onChange:y,onKeyDown:C,onKeyUp:T,onCompositionStart:b,onCompositionEnd:x,onBlur:E,"aria-label":n,rows:1,autoSize:s}),p===null?null:Pp(p,{className:`${t}-edit-content-confirm`}))},QQ=(e,t)=>{let n=!1,r=r=>{r.stopPropagation(),r.preventDefault(),r.clipboardData?.clearData(),r.clipboardData?.setData(`text/plain`,e),t&&r.clipboardData?.setData(`text/html`,e),n=!0};try{return document.addEventListener(`copy`,r,{capture:!0}),document.execCommand(`copy`),n}catch{return!1}finally{document.removeEventListener(`copy`,r,{capture:!0})}},$Q=async(e,t)=>{try{return t?await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:`text/html`}),"text/plain":new Blob([e],{type:`text/plain`})})]):await navigator.clipboard.writeText(e),!0}catch{return!1}};async function e$(e,t){if(typeof e!=`string`)return!1;let n=t?.format===`text/html`;return!!(await $Q(e,n)||QQ(e,n))}var t$=({copyConfig:e,children:t})=>{let[n,r]=S.useState(!1),[i,a]=S.useState(!1),o=S.useRef(null),s=()=>{o.current&&clearTimeout(o.current)},c={};return e.format&&(c.format=e.format),S.useEffect(()=>s,[]),{copied:n,copyLoading:i,onClick:In(async n=>{n?.preventDefault(),n?.stopPropagation(),a(!0);try{await e$((typeof e.text==`function`?await e.text():e.text)||CG(t,{skipEmpty:!0}).join(``)||``,c),a(!1),r(!0),s(),o.current=setTimeout(()=>{r(!1)},3e3),e.onCopy?.(n)}catch(e){throw a(!1),e}})}};function n$(e,t){return S.useMemo(()=>{let n=!!e;return[n,{...t,...n&&typeof e==`object`?e:null}]},[e])}var r$=e=>{let t=(0,S.useRef)(void 0);return(0,S.useEffect)(()=>{t.current=e}),t.current},i$=(e,t,n)=>(0,S.useMemo)(()=>e===!0?{title:t??n}:(0,S.isValidElement)(e)?{title:e}:hd(e)?{title:t??n,...e}:{title:e},[e,t,n]),a$=S.forwardRef((e,t)=>{let{prefixCls:n,component:r=`article`,className:i,rootClassName:a,children:o,direction:s,style:c,...l}=e,{getPrefixCls:u,direction:d,className:f,style:p}=li(`typography`),m=s??d,h=u(`typography`,n),[g,_]=XQ(h),v=J(h,f,{[`${h}-rtl`]:m===`rtl`},i,a,g,_),y={...p,...c};return S.createElement(r,{className:v,style:y,ref:t,...l},o)}),o$={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z`}}]},name:`copy`,theme:`outlined`};function s$(){return s$=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,s$({},e,{ref:t,icon:o$}))),l$=e=>e===!1?[!1,!1]:CG(e);function u$(e,t,n){return e===!0||e===void 0?t:e||n&&t}function d$(e){let t=document.createElement(`em`);e.appendChild(t);let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}var f$=e=>[`string`,`number`].includes(typeof e),p$=e=>{let{prefixCls:t,copied:n,locale:r,iconOnly:i,tooltips:a,icon:o,tabIndex:s,onCopy:c,loading:l}=e,u=l$(a),d=l$(o),{copied:f,copy:p}=r??{},m=n?f:p,h=u$(u[+!!n],m),g=typeof h==`string`?h:m;return S.createElement(Ow,{title:h},S.createElement(`button`,{type:`button`,className:J(`${t}-copy`,{[`${t}-copy-success`]:n,[`${t}-copy-icon-only`]:i}),onClick:c,"aria-label":g,tabIndex:s},n?u$(d[1],S.createElement(DC,null),!0):u$(d[0],l?S.createElement(xm,null):S.createElement(c$,null),!0)))},m$=S.forwardRef(({style:e,children:t},n)=>{let r=S.useRef(null);return S.useImperativeHandle(n,()=>({isExceed:()=>{let e=r.current;return e.scrollHeight>e.clientHeight},getHeight:()=>r.current.clientHeight})),S.createElement(`span`,{"aria-hidden":!0,ref:r,style:{position:`fixed`,display:`block`,left:0,top:0,pointerEvents:`none`,backgroundColor:`rgba(255, 0, 0, 0.65)`,...e}},t)}),h$=e=>e.reduce((e,t)=>e+(f$(t)?String(t).length:1),0);function g$(e,t){let n=0,r=[];for(let i=0;it){let e=t-n;return r.push(String(a).slice(0,e)),r}r.push(a),n=s}return e}var _$=0,v$=1,y$=2,b$=3,x$=4,S$={display:`-webkit-box`,overflow:`hidden`,WebkitBoxOrient:`vertical`};function C$(e){let{enableMeasure:t,width:n,text:r,children:i,rows:a,expanded:o,miscDeps:s,onEllipsis:c}=e,l=S.useMemo(()=>Cr(r),[r]),u=S.useMemo(()=>h$(l),[r]),d=S.useMemo(()=>i(l,!1),[r]),[f,p]=S.useState(null),m=S.useRef(null),h=S.useRef(null),g=S.useRef(null),_=S.useRef(null),v=S.useRef(null),[y,b]=S.useState(!1),[x,C]=S.useState(_$),[w,T]=S.useState(0),[E,D]=S.useState(null);zn(()=>{C(t&&n&&u?v$:_$)},[n,r,a,t,l]),zn(()=>{if(x===v$)C(y$),D(h.current&&getComputedStyle(h.current).whiteSpace);else if(x===y$){let e=!!g.current?.isExceed();C(e?b$:x$),p(e?[0,u]:null),b(e);let t=g.current?.getHeight()||0,n=a===1?0:_.current?.getHeight()||0,r=v.current?.getHeight()||0;T(Math.max(t,n+r)+1),c(e)}},[x]);let O=f?Math.ceil((f[0]+f[1])/2):0;zn(()=>{let[e,t]=f||[0,0];if(e!==t){let n=(m.current?.getHeight()||0)>w,r=O;t-e===1&&(r=n?e:t),p(n?[e,r]:[r,t])}},[f,O]);let k=S.useMemo(()=>{if(!t)return i(l,!1);if(x!==b$||!f||f[0]!==f[1]){let e=i(l,!1);return[x$,_$].includes(x)?e:S.createElement(`span`,{style:{...S$,WebkitLineClamp:a}},e)}return i(o?l:g$(l,f[0]),y)},[o,x,f,l].concat(Zr(s))),A={width:n,margin:0,padding:0,whiteSpace:E===`nowrap`?`normal`:`inherit`};return S.createElement(S.Fragment,null,k,x===y$&&S.createElement(S.Fragment,null,S.createElement(m$,{style:{...A,...S$,WebkitLineClamp:a},ref:g},d),S.createElement(m$,{style:{...A,...S$,WebkitLineClamp:a-1},ref:_},d),S.createElement(m$,{style:{...A,...S$,WebkitLineClamp:1},ref:v},i([],!0))),x===b$&&f&&f[0]!==f[1]&&S.createElement(m$,{style:{...A,top:400},ref:m},i(g$(l,O),!0)),x===v$&&S.createElement(`span`,{style:{whiteSpace:`inherit`},ref:h}))}var w$=({enableEllipsis:e,isEllipsis:t,open:n,children:r,tooltipProps:i})=>{if(!i?.title||!e)return r;let a=n&&t;return S.createElement(Ow,{open:a,...i},r)};function T$({mark:e,code:t,underline:n,delete:r,strong:i,keyboard:a,italic:o},s){let c=s;function l(e,t){t&&(c=S.createElement(e,{},c))}return l(`strong`,i),l(`u`,n),l(`del`,r),l(`code`,t),l(`mark`,e),l(`kbd`,a),l(`i`,o),c}var E$=`...`,D$=[`delete`,`mark`,`code`,`underline`,`strong`,`keyboard`,`italic`],O$=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,type:a,disabled:o,children:s,ellipsis:c,editable:l,copyable:u,component:d,title:f,onMouseEnter:p,onMouseLeave:m,...h}=e,{getPrefixCls:g,direction:_}=S.useContext(oi),[v]=cd(`Text`),y=S.useRef(null),b=S.useRef(null),x=g(`typography`,n),C=Sr(h,D$),[w,T]=n$(l),[E,D]=Hn(!1,T.editing),{triggerType:O=[`icon`]}=T,k=e=>{e&&T.onStart?.(),D(e)},A=r$(E);zn(()=>{!E&&A&&b.current?.focus()},[E]);let j=e=>{e?.preventDefault(),k(!0)},M=e=>{T.onChange?.(e),k(!1)},N=()=>{T.onCancel?.(),k(!1)},[P,F]=n$(u),{copied:I,copyLoading:L,onClick:R}=t$({copyConfig:F,children:s}),[z,B]=S.useState(!1),[V,H]=S.useState(!1),[U,W]=S.useState(!1),[ee,te]=S.useState(!1),[ne,re]=S.useState(!0),[ie,ae]=n$(c,{expandable:!1,symbol:e=>e?v?.collapse:v?.expand}),[G,oe]=Hn(ae.defaultExpanded||!1,ae.expanded),K=ie&&(!G||ae.expandable===`collapsible`),{rows:se=1}=ae,ce=S.useMemo(()=>K&&(ae.suffix!==void 0||ae.onEllipsis||ae.expandable||w||P),[K,ae,w,P]);zn(()=>{ie&&!ce&&(B(Oy(`webkitLineClamp`)),H(Oy(`textOverflow`)))},[ce,ie]);let[q,le]=S.useState(K),ue=S.useMemo(()=>ce?!1:se===1?V:z,[ce,V,z]);zn(()=>{le(ue&&K)},[ue,K]);let de=i$(ae.tooltip,T.text,s),fe=q&&!!de.title,pe=K&&(q?fe&&ee:U),me=K&&se===1&&q,he=K&&se>1&&q,ge=(e,t)=>{oe(t.expanded),ae.onExpand?.(e,t)},[_e,ve]=S.useState(0),[ye,be]=S.useState(!1),[xe,Se]=S.useState(!1),Ce=({offsetWidth:e})=>{ve(e)},we=e=>{W(e),U!==e&&ae.onEllipsis?.(e)};S.useEffect(()=>{let e=y.current;if(ie&&fe&&e){let t=d$(e);ee!==t&&te(t)}},[ie,fe,s,he,ne,_e]),S.useEffect(()=>{let e=y.current;if(typeof IntersectionObserver>`u`||!e||!fe||!K)return;let t=new IntersectionObserver(()=>{re(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[fe,K]);let Te=S.useMemo(()=>{if(!(!ie||q))return[T.text,s,f,de.title].find(f$)},[ie,q,f,de.title,pe]);if(E)return S.createElement(ZQ,{value:T.text??(typeof s==`string`?s:``),onSave:M,onCancel:N,onEnd:T.onEnd,prefixCls:x,className:r,style:i,direction:_,component:d,maxLength:T.maxLength,autoSize:T.autoSize,enterIcon:T.enterIcon});let Ee=()=>{let{expandable:e,symbol:t}=ae;return e?S.createElement(`button`,{type:`button`,key:`expand`,className:`${x}-${G?`collapse`:`expand`}`,onClick:e=>ge(e,{expanded:!G}),"aria-label":G?v.collapse:v?.expand},typeof t==`function`?t(G):t):null},De=()=>{if(!w)return;let{icon:e,tooltip:t,tabIndex:n}=T,r=Cr(t)[0]||v?.edit,i=typeof r==`string`?r:``;return O.includes(`icon`)?S.createElement(Ow,{key:`edit`,title:t===!1?``:r},S.createElement(`button`,{type:`button`,ref:b,className:`${x}-edit`,onClick:j,"aria-label":i,tabIndex:n},e||S.createElement(zQ,{role:`button`}))):null},Oe=()=>P?S.createElement(p$,{key:`copy`,...F,prefixCls:x,copied:I,locale:v,onCopy:R,loading:L,iconOnly:!fd(s)}):null,ke=e=>{let t=e&&Ee(),n=De(),r=Oe();return!t&&!n&&!r?null:S.createElement(`span`,{key:`operations`,className:`${x}-actions`,onMouseEnter:()=>be(!0),onMouseLeave:()=>be(!1)},t,n,r)},Ae=e=>[e&&!G&&S.createElement(`span`,{"aria-hidden":!0,key:`ellipsis`},E$),ae.suffix,ke(e)];return S.createElement(Wr,{onResize:Ce,disabled:!K},c=>S.createElement(w$,{tooltipProps:de,enableEllipsis:K,isEllipsis:pe,open:xe&&!ye},S.createElement(a$,{onMouseEnter:e=>{Se(!0),p?.(e)},onMouseLeave:e=>{Se(!1),m?.(e)},className:J({[`${x}-${a}`]:a,[`${x}-disabled`]:o,[`${x}-ellipsis`]:ie,[`${x}-ellipsis-single-line`]:me,[`${x}-ellipsis-multiple-line`]:he,[`${x}-link`]:d===`a`},r),prefixCls:n,style:{...i,WebkitLineClamp:he?se:void 0},component:d,ref:$n(c,y,t),direction:_,onClick:O.includes(`text`)?j:void 0,"aria-label":Te?.toString(),title:f,...C},S.createElement(C$,{enableMeasure:K&&!q,text:s,rows:se,width:_e,onEllipsis:we,expanded:G,miscDeps:[I,G,L,w,P,v].concat(Zr(D$.map(t=>e[t])))},(t,n)=>T$(e,S.createElement(S.Fragment,null,t.length>0&&n&&!G&&Te?S.createElement(`span`,{key:`show-content`,"aria-hidden":!0},t):t,Ae(n)))))))}),k$=S.forwardRef((e,t)=>{let{ellipsis:n,rel:r,children:i,navigate:a,...o}=e,s={...o,rel:r===void 0&&o.target===`_blank`?`noopener noreferrer`:r};return S.createElement(O$,{...s,ref:t,ellipsis:!!n,component:`a`},i)}),A$=S.forwardRef((e,t)=>{let{children:n,...r}=e;return S.createElement(O$,{ref:t,...r,component:`div`},n)}),j$=S.forwardRef((e,t)=>{let{ellipsis:n,children:r,...i}=e,a=S.useMemo(()=>hd(n)?Sr(n,[`expandable`,`rows`]):n,[n]);return S.createElement(O$,{ref:t,...i,ellipsis:a,component:`span`},r)}),M$=[1,2,3,4,5],N$=S.forwardRef((e,t)=>{let{level:n=1,children:r,...i}=e,a=M$.includes(n)?`h${n}`:`h1`;return S.createElement(O$,{ref:t,...i,component:a},r)}),Z=a$;Z.Text=j$,Z.Link=k$,Z.Title=N$,Z.Paragraph=A$;var P$=((e,t)=>{if(e&&t){let n=Array.isArray(t)?t:t.split(`,`),r=e.name||``,i=e.type||``,a=i.replace(/\/.*$/,``);return n.some(e=>{let t=e.trim();if(/^\*(\/\*)?$/.test(e))return!0;if(t.charAt(0)===`.`){let e=r.toLowerCase(),n=t.toLowerCase(),i=[n];return(n===`.jpg`||n===`.jpeg`)&&(i=[`.jpg`,`.jpeg`]),i.some(t=>e.endsWith(t))}return/\/\*$/.test(t)?a===t.replace(/\/.*$/,``):i===t?!0:/^\w+$/.test(t)?(br(!1,`Upload takes an invalidate 'accept' type '${t}'.Skip for check.`),!0):!1})}return!0});function F$(e,t){let n=`cannot ${e.method} ${e.action} ${t.status}'`,r=Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}function I$(e){let t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function L$(e){let t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});let n=new FormData;e.data&&Object.keys(e.data).forEach(t=>{let r=e.data[t];if(Array.isArray(r)){r.forEach(e=>{n.append(`${t}[]`,e)});return}n.append(t,r)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(F$(e,t),I$(t)):e.onSuccess(I$(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&`withCredentials`in t&&(t.withCredentials=!0);let r=e.headers||{};return r[`X-Requested-With`]!==null&&t.setRequestHeader(`X-Requested-With`,`XMLHttpRequest`),Object.keys(r).forEach(e=>{r[e]!==null&&t.setRequestHeader(e,r[e])}),t.send(n),{abort(){t.abort()}}}var R$=async(e,t)=>{let n=[],r=[];e.forEach(e=>r.push(e.webkitGetAsEntry()));async function i(e){let t=e.createReader(),n=[];for(;;){let e=await new Promise(e=>{t.readEntries(e,()=>e([]))}),r=e.length;if(!r)break;for(let t=0;t{e.file(r=>{t(r)?(e.fullPath&&!r.webkitRelativePath&&(Object.defineProperties(r,{webkitRelativePath:{writable:!0}}),r.webkitRelativePath=e.fullPath.replace(/^\//,``),Object.defineProperties(r,{webkitRelativePath:{writable:!1}})),n(r)):n(null)})})}let o=async(e,t)=>{if(e){if(e.path=t||``,e.isFile){let t=await a(e);t&&n.push(t)}else if(e.isDirectory){let t=await i(e);r.push(...t)}}},s=0;for(;s{let{accept:n,directory:r}=this.props,i,a;if(typeof n==`string`)a=n;else{let{filter:e,format:t}=n||{};a=t,i=e===`native`?()=>!0:e}return(i||(r||t?e=>P$(e,a):()=>!0))(e)};onChange=e=>{let{files:t}=e.target,n=[...t].filter(e=>this.filterFile(e));this.uploadFiles(n),this.reset()};onClick=e=>{let t=this.fileInput;if(!t)return;let n=e.target,{onClick:r}=this.props;n&&n.tagName===`BUTTON`&&(t.parentNode.focus(),n.blur()),t.click(),r&&r(e)};onKeyDown=e=>{e.key===`Enter`&&this.onClick(e)};onDataTransferFiles=async(e,t)=>{let{multiple:n,directory:r}=this.props,i=[...e.items||[]],a=[...e.files||[]];if((a.length>0||i.some(e=>e.kind===`file`))&&t?.(),r)a=await R$(Array.prototype.slice.call(i),this.filterFile),this.uploadFiles(a);else{let e=[...a].filter(e=>this.filterFile(e,!0));n===!1&&(e=a.slice(0,1)),this.uploadFiles(e)}};onFilePaste=async e=>{let{pastable:t}=this.props;if(t&&e.type===`paste`){let t=e.clipboardData;return this.onDataTransferFiles(t,()=>{e.preventDefault()})}};onFileDragOver=e=>{e.preventDefault()};onFileDrop=async e=>{if(e.preventDefault(),e.type===`drop`){let t=e.dataTransfer;return this.onDataTransferFiles(t)}};componentDidMount(){this._isMounted=!0;let{pastable:e}=this.props;e&&document.addEventListener(`paste`,this.onFilePaste)}componentWillUnmount(){this._isMounted=!1,this.abort(),document.removeEventListener(`paste`,this.onFilePaste)}componentDidUpdate(e){let{pastable:t}=this.props;t&&!e.pastable?document.addEventListener(`paste`,this.onFilePaste):!t&&e.pastable&&document.removeEventListener(`paste`,this.onFilePaste)}uploadFiles=e=>{let t=[...e],n=t.map(e=>(e.uid=B$(),this.processFile(e,t)));Promise.all(n).then(e=>{let{onBatchStart:t}=this.props;t?.(e.map(({origin:e,parsedFile:t})=>({file:e,parsedFile:t}))),e.filter(e=>e.parsedFile!==null).forEach(e=>{this.post(e)})})};processFile=async(e,t)=>{let{beforeUpload:n}=this.props,r=e;if(n){try{r=await n(e,t)}catch{r=!1}if(r===!1)return{origin:e,parsedFile:null,action:null,data:null}}let{action:i}=this.props,a;a=typeof i==`function`?await i(e):i;let{data:o}=this.props,s;s=typeof o==`function`?await o(e):o;let c=(typeof r==`object`||typeof r==`string`)&&r?r:e,l;l=c instanceof File?c:new File([c],e.name,{type:e.type});let u=l;return u.uid=e.uid,{origin:e,data:s,parsedFile:u,action:a}};post({data:e,origin:t,action:n,parsedFile:r}){if(!this._isMounted)return;let{onStart:i,customRequest:a,name:o,headers:s,withCredentials:c,method:l}=this.props,{uid:u}=t,d=a||L$,f={action:n,filename:o,data:e,file:r,headers:s,withCredentials:c,method:l||`post`,onProgress:e=>{let{onProgress:t}=this.props;t?.(e,r)},onSuccess:(e,t)=>{let{onSuccess:n}=this.props;n?.(e,r,t),delete this.reqs[u]},onError:(e,t)=>{let{onError:n}=this.props;n?.(e,t,r),delete this.reqs[u]}};i(t),this.reqs[u]=d(f,{defaultRequest:L$})}reset(){this.setState({uid:B$()})}abort(e){let{reqs:t}=this;if(e){let n=e.uid?e.uid:e;t[n]&&t[n].abort&&t[n].abort(),delete t[n]}else Object.keys(t).forEach(e=>{t[e]&&t[e].abort&&t[e].abort(),delete t[e]})}saveFileInput=e=>{this.fileInput=e};render(){let{component:e,prefixCls:t,className:n,classNames:r={},disabled:i,id:a,name:o,style:s,styles:c={},multiple:l,accept:u,capture:d,children:f,directory:p,openFileDialogOnClick:m,onMouseEnter:h,onMouseLeave:g,hasControlInside:_,...v}=this.props,y=typeof u==`string`?u:u?.format,b=J(t,{[`${t}-disabled`]:i,[n]:n}),x=p?{directory:`directory`,webkitdirectory:`webkitdirectory`}:{},C=i?{}:{onClick:m?this.onClick:()=>{},onKeyDown:m?this.onKeyDown:()=>{},onMouseEnter:h,onMouseLeave:g,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:_?void 0:`0`};return S.createElement(e,V$({},C,{className:b,role:_?void 0:`button`,style:s}),S.createElement(`input`,V$({},Vu(v,{aria:!0,data:!0}),{id:a,name:o,disabled:i,type:`file`,ref:this.saveFileInput,onClick:e=>e.stopPropagation(),key:this.state.uid,style:{display:`none`,...c.input},className:r.input,accept:y},x,{multiple:l,onChange:this.onChange},d==null?{}:{capture:d})),f)}};function U$(){return U$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.uploader=e};render(){return S.createElement(H$,U$({},this.props,{ref:this.saveUploader}))}},K$=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:`relative`,width:`100%`,height:`100%`,textAlign:`center`,background:e.colorFillAlter,border:`${Y(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:e.padding},[`${t}-btn`]:{display:`table`,width:`100%`,height:`100%`,outline:`none`,borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:`${Y(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`}},[`${t}-drag-container`]:{display:`table-cell`,verticalAlign:`middle`},[` &:not(${t}-disabled):hover, &-hover:not(${t}-disabled) `]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[n]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${Y(e.marginXXS)}`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{[`p${t}-drag-icon ${n}, p${t}-text, p${t}-hint - `]:{color:e.colorTextDisabled}}}}}},J$=e=>{let{componentCls:t,iconCls:n,fontSize:r,lineHeight:i,motionDurationSlow:a,calc:o}=e,s=`${t}-list-item`,c=`${s}-actions`,l=`${s}-action`;return{[`${t}-wrapper`]:{[`${t}-list`]:{...Xc(),lineHeight:e.lineHeight,[s]:{position:`relative`,height:o(e.lineHeight).mul(r).equal(),marginTop:e.marginXS,fontSize:r,display:`flex`,alignItems:`center`,transition:`background-color ${a}`,borderRadius:e.borderRadiusSM,"&:hover":{backgroundColor:e.controlItemBgHover},[`${s}-name`]:{...qc,padding:`0 ${Y(e.paddingXS)}`,lineHeight:i,flex:`auto`,transition:`all ${a}`},[c]:{whiteSpace:`nowrap`,[l]:{opacity:0},"@media (hover: none), (pointer: coarse)":{[l]:{opacity:1}},[n]:{color:e.actionsColor,transition:`all ${a}`},[` + `]:{color:e.colorTextDisabled}}}}}},q$=e=>{let{componentCls:t,iconCls:n,fontSize:r,lineHeight:i,motionDurationSlow:a,calc:o}=e,s=`${t}-list-item`,c=`${s}-actions`,l=`${s}-action`;return{[`${t}-wrapper`]:{[`${t}-list`]:{...Xc(),lineHeight:e.lineHeight,[s]:{position:`relative`,height:o(e.lineHeight).mul(r).equal(),marginTop:e.marginXS,fontSize:r,display:`flex`,alignItems:`center`,transition:`background-color ${a}`,borderRadius:e.borderRadiusSM,"&:hover":{backgroundColor:e.controlItemBgHover},[`${s}-name`]:{...qc,padding:`0 ${Y(e.paddingXS)}`,lineHeight:i,flex:`auto`,transition:`all ${a}`},[c]:{whiteSpace:`nowrap`,[l]:{opacity:0},"@media (hover: none), (pointer: coarse)":{[l]:{opacity:1}},[n]:{color:e.actionsColor,transition:`all ${a}`},[` ${l}:focus-visible, &.picture ${l} - `]:{opacity:1}},[`${t}-icon ${n}`]:{color:e.colorIcon,fontSize:r},[`${s}-progress`]:{position:`absolute`,bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:`100%`,paddingInlineStart:o(r).add(e.paddingXS).equal(),fontSize:r,lineHeight:0,pointerEvents:`none`,"> div":{margin:0}}},[`${s}:hover ${l}`]:{opacity:1},[`${s}-error`]:{color:e.colorError,[`${s}-name, ${t}-icon ${n}`]:{color:e.colorError},[c]:{[`${n}, ${n}:hover`]:{color:e.colorError},[l]:{opacity:1}}},[`${t}-list-item-container`]:{transition:[`opacity`,`height`].map(e=>`${e} ${a}`).join(`, `),"&::before":{display:`table`,width:0,height:0,content:`""`}}}}}},Y$=e=>{let{componentCls:t}=e,n=new Lo(`uploadAnimateInlineIn`,{from:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),r=new Lo(`uploadAnimateInlineOut`,{to:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),i=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${i}-appear, ${i}-enter, ${i}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:`forwards`},[`${i}-appear, ${i}-enter`]:{animationName:n},[`${i}-leave`]:{animationName:r}}},{[`${t}-wrapper`]:wh(e)},n,r]},X$=e=>{let{componentCls:t,iconCls:n,uploadThumbnailSize:r,uploadProgressOffset:i,calc:a}=e,o=`${t}-list`,s=`${o}-item`;return{[`${t}-wrapper`]:{[` + `]:{opacity:1}},[`${t}-icon ${n}`]:{color:e.colorIcon,fontSize:r},[`${s}-progress`]:{position:`absolute`,bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:`100%`,paddingInlineStart:o(r).add(e.paddingXS).equal(),fontSize:r,lineHeight:0,pointerEvents:`none`,"> div":{margin:0}}},[`${s}:hover ${l}`]:{opacity:1},[`${s}-error`]:{color:e.colorError,[`${s}-name, ${t}-icon ${n}`]:{color:e.colorError},[c]:{[`${n}, ${n}:hover`]:{color:e.colorError},[l]:{opacity:1}}},[`${t}-list-item-container`]:{transition:[`opacity`,`height`].map(e=>`${e} ${a}`).join(`, `),"&::before":{display:`table`,width:0,height:0,content:`""`}}}}}},J$=e=>{let{componentCls:t}=e,n=new Lo(`uploadAnimateInlineIn`,{from:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),r=new Lo(`uploadAnimateInlineOut`,{to:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),i=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${i}-appear, ${i}-enter, ${i}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:`forwards`},[`${i}-appear, ${i}-enter`]:{animationName:n},[`${i}-leave`]:{animationName:r}}},{[`${t}-wrapper`]:wh(e)},n,r]},Y$=e=>{let{componentCls:t,iconCls:n,uploadThumbnailSize:r,uploadProgressOffset:i,calc:a}=e,o=`${t}-list`,s=`${o}-item`;return{[`${t}-wrapper`]:{[` ${o}${o}-picture, ${o}${o}-picture-card, ${o}${o}-picture-circle - `]:{[s]:{position:`relative`,height:a(r).add(a(e.lineWidth).mul(2)).add(a(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:`transparent`},[`${s}-thumbnail`]:{...qc,width:r,height:r,lineHeight:Y(a(r).add(e.paddingSM).equal()),textAlign:`center`,flex:`none`,[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:`block`,width:`100%`,height:`100%`,overflow:`hidden`}},[`${s}-progress`]:{bottom:a(e.fontSize).mul(e.lineHeight).div(2).add(i).equal(),width:`calc(100% - ${Y(a(e.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:a(r).add(e.paddingXS).equal()}},[`${s}-error`]:{borderColor:e.colorError,[`${s}-thumbnail ${n}`]:{[`svg path[fill='${oc[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${oc.primary}']`]:{fill:e.colorError}}},[`${s}-uploading`]:{borderStyle:`dashed`,[`${s}-name`]:{marginBottom:i}}},[`${o}${o}-picture-circle ${s}`]:{[`&, &::before, ${s}-thumbnail`]:{borderRadius:`50%`}}}}},Z$=e=>{let{componentCls:t,iconCls:n,fontSizeLG:r,colorTextLightSolid:i,calc:a}=e,o=`${t}-list`,s=`${o}-item`,c=e.uploadPicCardSize;return{[` + `]:{[s]:{position:`relative`,height:a(r).add(a(e.lineWidth).mul(2)).add(a(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:`transparent`},[`${s}-thumbnail`]:{...qc,width:r,height:r,lineHeight:Y(a(r).add(e.paddingSM).equal()),textAlign:`center`,flex:`none`,[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:`block`,width:`100%`,height:`100%`,overflow:`hidden`}},[`${s}-progress`]:{bottom:a(e.fontSize).mul(e.lineHeight).div(2).add(i).equal(),width:`calc(100% - ${Y(a(e.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:a(r).add(e.paddingXS).equal()}},[`${s}-error`]:{borderColor:e.colorError,[`${s}-thumbnail ${n}`]:{[`svg path[fill='${oc[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${oc.primary}']`]:{fill:e.colorError}}},[`${s}-uploading`]:{borderStyle:`dashed`,[`${s}-name`]:{marginBottom:i}}},[`${o}${o}-picture-circle ${s}`]:{[`&, &::before, ${s}-thumbnail`]:{borderRadius:`50%`}}}}},X$=e=>{let{componentCls:t,iconCls:n,fontSizeLG:r,colorTextLightSolid:i,calc:a}=e,o=`${t}-list`,s=`${o}-item`,c=e.uploadPicCardSize;return{[` ${t}-wrapper${t}-picture-card-wrapper, ${t}-wrapper${t}-picture-circle-wrapper `]:{...Xc(),display:`block`,[`${t}${t}-select`]:{width:c,height:c,textAlign:`center`,verticalAlign:`top`,backgroundColor:e.colorFillAlter,border:`${Y(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`,textAlign:`center`},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${o}${o}-picture-card, ${o}${o}-picture-circle`]:{display:`flex`,flexWrap:`wrap`,"&:not(:empty)":{minHeight:c},"@supports not (gap: 1px)":{"& > *":{marginBlockEnd:e.marginXS,marginInlineEnd:e.marginXS}},"@supports (gap: 1px)":{gap:e.marginXS},[`${o}-item-container`]:{display:`inline-block`,width:c,height:c,verticalAlign:`top`},"&::after":{display:`none`},"&::before":{display:`none`},[s]:{height:`100%`,margin:0,"&::before":{position:`absolute`,zIndex:1,width:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`,height:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:`" "`}},[`${s}:hover`]:{[`&::before, ${s}-actions`]:{opacity:1}},[`${s}-actions`]:{position:`absolute`,insetInlineStart:0,zIndex:10,width:`100%`,whiteSpace:`nowrap`,textAlign:`center`,opacity:0,transition:`all ${e.motionDurationSlow}`,[` ${n}-eye, ${n}-download, ${n}-delete - `]:{zIndex:10,width:r,margin:`0 ${Y(e.marginXXS)}`,fontSize:r,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,color:i,"&:hover":{color:i},svg:{verticalAlign:`baseline`}}},[`${s}-thumbnail, ${s}-thumbnail img`]:{position:`static`,display:`block`,width:`100%`,height:`100%`,objectFit:`contain`},[`${s}-name`]:{display:`none`,textAlign:`center`},[`${s}-file + ${s}-name`]:{position:`absolute`,bottom:e.margin,display:`block`,width:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`},[`${s}-uploading`]:{[`&${s}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:`none`}},[`${s}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}},[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:`50%`}}}},Q$=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:`rtl`}}},$$=e=>{let{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:{...Jc(e),[t]:{outline:0,"input[type='file']":{cursor:`pointer`}},[`${t}-select`]:{display:`inline-block`},[`${t}-hidden`]:{display:`none`},[`${t}-disabled`]:{color:n,cursor:`not-allowed`}}}},e1=rl(`Upload`,e=>{let{fontSizeHeading3:t,marginXS:n,lineWidth:r,pictureCardSize:i,calc:a}=e,o=gs(e,{uploadThumbnailSize:a(t).mul(2).equal(),uploadProgressOffset:a(a(n).div(2)).add(r).equal(),uploadPicCardSize:i});return[$$(o),q$(o),X$(o),Z$(o),J$(o),Y$(o),Q$(o),bh(o)]},e=>({actionsColor:e.colorIcon,pictureCardSize:e.controlHeightLG*2.55})),t1={icon:function(e,t){return{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M534 352V136H232v752h560V394H576a42 42 0 01-42-42z`,fill:t}},{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z`,fill:e}}]}},name:`file`,theme:`twotone`};function n1(){return n1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n1({},e,{ref:t,icon:t1}))),i1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z`}}]},name:`paper-clip`,theme:`outlined`};function a1(){return a1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a1({},e,{ref:t,icon:i1}))),s1={icon:function(e,t){return{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z`,fill:e}},{tag:`path`,attrs:{d:`M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z`,fill:t}},{tag:`path`,attrs:{d:`M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z`,fill:t}},{tag:`path`,attrs:{d:`M276 368a28 28 0 1056 0 28 28 0 10-56 0z`,fill:t}},{tag:`path`,attrs:{d:`M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`,fill:e}}]}},name:`picture`,theme:`twotone`};function c1(){return c1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c1({},e,{ref:t,icon:s1})));function u1(e){return{...e,lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e}}function d1(e,t){let n=Zr(t),r=n.findIndex(({uid:t})=>t===e.uid);return r===-1?n.push(e):n[r]=e,n}function f1(e,t){let n=e.uid===void 0?`name`:`uid`;return t.filter(t=>t[n]===e[n])[0]}function p1(e,t){let n=e.uid===void 0?`name`:`uid`,r=t.filter(t=>t[n]!==e[n]);return r.length===t.length?null:r}var m1=(e=``)=>{let t=e.split(`/`),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[``])[0]},h1=e=>e.indexOf(`image/`)===0,g1=e=>{if(e.type&&!e.thumbUrl)return h1(e.type);let t=e.thumbUrl||e.url||``,n=m1(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n)?!0:!(/^data:/.test(t)||n)},_1=200;function v1(e){return new Promise(t=>{if(!e.type||!h1(e.type)){t(``);return}let n=document.createElement(`canvas`);n.width=_1,n.height=_1,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${_1}px; height: ${_1}px; z-index: 9999; display: none;`,document.body.appendChild(n);let r=n.getContext(`2d`),i=new Image;if(i.onload=()=>{let{width:e,height:a}=i,o=_1,s=_1,c=0,l=0;e>a?(s=_1/e*a,l=-(s-o)/2):(o=_1/a*e,c=-(o-s)/2),r.drawImage(i,c,l,o,s);let u=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(i.src),t(u)},i.crossOrigin=`anonymous`,e.type.startsWith(`image/svg+xml`)){let t=new FileReader;t.onload=()=>{t.result&&typeof t.result==`string`&&(i.src=t.result)},t.readAsDataURL(e)}else if(e.type.startsWith(`image/gif`)){let n=new FileReader;n.onload=()=>{n.result&&t(n.result)},n.readAsDataURL(e)}else i.src=window.URL.createObjectURL(e)})}var y1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`download`,theme:`outlined`};function b1(){return b1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b1({},e,{ref:t,icon:y1}))),S1=S.forwardRef(({prefixCls:e,className:t,style:n,classNames:r,styles:i,locale:a,listType:o,file:s,items:c,progress:l,iconRender:u,actionIconRender:d,itemRender:f,isImgUrl:p,showPreviewIcon:m,showRemoveIcon:h,showDownloadIcon:g,previewIcon:_,removeIcon:v,downloadIcon:y,extra:b,onPreview:x,onDownload:C,onClose:w},T)=>{let{status:E}=s,[D,O]=S.useState(E);S.useEffect(()=>{E!==`removed`&&O(E)},[E]);let[k,A]=S.useState(!1);S.useEffect(()=>{let e=setTimeout(()=>{A(!0)},300);return()=>{clearTimeout(e)}},[]);let j=u(s),M=S.createElement(`div`,{className:`${e}-icon`},j);if(o===`picture`||o===`picture-card`||o===`picture-circle`)if(D===`uploading`||!s.thumbUrl&&!s.url){let t=J(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:D!==`uploading`});M=S.createElement(`div`,{className:t},j)}else{let t=p?.(s)?S.createElement(`img`,{src:s.thumbUrl||s.url,alt:s.name,className:`${e}-list-item-image`,crossOrigin:s.crossOrigin}):j,n=J(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:p&&!p(s)});M=S.createElement(`a`,{className:n,onClick:e=>x(s,e),href:s.url||s.thumbUrl,target:`_blank`,rel:`noopener noreferrer`},t)}let N=J(`${e}-list-item`,`${e}-list-item-${D}`,r?.item),P=typeof s.linkProps==`string`?JSON.parse(s.linkProps):s.linkProps,F=(typeof h==`function`?h(s):h)?d((typeof v==`function`?v(s):v)||S.createElement(IQ,null),()=>w(s),e,a.removeFile,!0):null,I=(typeof g==`function`?g(s):g)&&D===`done`?d((typeof y==`function`?y(s):y)||S.createElement(x1,null),()=>C(s),e,a.downloadFile):null,L=o!==`picture-card`&&o!==`picture-circle`&&S.createElement(`span`,{key:`download-delete`,className:J(`${e}-list-item-actions`,{picture:o===`picture`})},I,F),R=typeof b==`function`?b(s):b,z=R&&S.createElement(`span`,{className:`${e}-list-item-extra`},R),B=J(`${e}-list-item-name`),V=s.url?S.createElement(`a`,{key:`view`,target:`_blank`,rel:`noopener noreferrer`,className:B,title:s.name,...P,href:s.url,onClick:e=>x(s,e)},s.name,z):S.createElement(`span`,{key:`view`,className:B,onClick:e=>x(s,e),title:s.name},s.name,z),H=(typeof m==`function`?m(s):m)&&(s.url||s.thumbUrl)?S.createElement(`a`,{href:s.url||s.thumbUrl,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>x(s,e),title:a.previewFile},typeof _==`function`?_(s):_||S.createElement(qU,null)):null,U=(o===`picture-card`||o===`picture-circle`)&&D!==`uploading`&&S.createElement(`span`,{className:`${e}-list-item-actions`},H,D===`done`&&I,F),{getPrefixCls:W}=S.useContext(oi),ee=W(),te=S.createElement(`div`,{className:N,style:i?.item},M,V,L,U,k&&S.createElement(Iu,{motionName:`${ee}-fade`,visible:D===`uploading`,motionDeadline:2e3},({className:t})=>{let n=`percent`in s?S.createElement(CK,{type:`line`,percent:s.percent,"aria-label":s[`aria-label`],"aria-labelledby":s[`aria-labelledby`],...l}):null;return S.createElement(`div`,{className:J(`${e}-list-item-progress`,t)},n)})),ne=s.response&&typeof s.response==`string`?s.response:s.error?.statusText||s.error?.message||a.uploadError,re=D===`error`?S.createElement(Ow,{title:ne,getPopupContainer:e=>e.parentNode},te):te;return S.createElement(`div`,{className:J(`${e}-list-item-container`,t),style:n,ref:T},f?f(re,s,c,{download:C.bind(null,s),preview:x.bind(null,s),remove:w.bind(null,s)}):re)}),C1=S.forwardRef((e,t)=>{let{listType:n=`text`,previewFile:r=v1,onPreview:i,onDownload:a,onRemove:o,locale:s,iconRender:c,isImageUrl:l=g1,prefixCls:u,items:d=[],showPreviewIcon:f=!0,showRemoveIcon:p=!0,showDownloadIcon:m=!1,removeIcon:h,previewIcon:g,downloadIcon:_,extra:v,progress:y={size:[-1,2],showInfo:!1},appendAction:b,appendActionVisible:x=!0,itemRender:C,disabled:w,classNames:T,styles:E}=e,[,D]=Ed(),[O,k]=S.useState(!1),A=[`picture-card`,`picture-circle`].includes(n);S.useEffect(()=>{n.startsWith(`picture`)&&(d||[]).forEach(e=>{!(e.originFileObj instanceof File||e.originFileObj instanceof Blob)||e.thumbUrl!==void 0||(e.thumbUrl=``,r?.(e.originFileObj).then(t=>{e.thumbUrl=t||``,D()}))})},[n,d,r]),S.useEffect(()=>{k(!0)},[]);let j=(e,t)=>{if(i)return t?.preventDefault(),i(e)},M=e=>{typeof a==`function`?a(e):e.url&&window.open(e.url)},N=e=>{o?.(e)},P=e=>{if(c)return c(e,n);let t=e.status===`uploading`;if(n.startsWith(`picture`)){let r=n===`picture`?S.createElement(xm,null):s.uploading,i=l?.(e)?S.createElement(l1,null):S.createElement(r1,null);return t?r:i}return t?S.createElement(xm,null):S.createElement(o1,null)},F=(e,t,n,r,i)=>{let a={type:`text`,size:`small`,title:r,onClick:n=>{t(),S.isValidElement(e)&&e.props.onClick?.(n)},className:`${n}-list-item-action`,disabled:i?w:!1};return S.isValidElement(e)?S.createElement(Zg,{...a,icon:Pp(e,{...e.props,onClick:()=>{}})}):S.createElement(Zg,{...a},S.createElement(`span`,null,e))};S.useImperativeHandle(t,()=>({handlePreview:j,handleDownload:M}));let{getPrefixCls:I}=S.useContext(oi),L=I(`upload`,u),R=I(),z=J(`${L}-list`,`${L}-list-${n}`,T?.list),B=S.useMemo(()=>Sr(Wm(R),[`onAppearEnd`,`onEnterEnd`,`onLeaveEnd`]),[R]),V={...A?{}:B,motionDeadline:2e3,motionName:`${L}-${A?`animate-inline`:`animate`}`,keys:Zr(d.map(e=>({key:e.uid,file:e}))),motionAppear:O};return S.createElement(`div`,{className:z,style:E?.list},S.createElement(Fu,{...V,component:!1},({key:e,file:t,className:r,style:i})=>S.createElement(S1,{key:e,locale:s,prefixCls:L,className:r,style:i,classNames:T,styles:E,file:t,items:d,progress:y,listType:n,isImgUrl:l,showPreviewIcon:f,showRemoveIcon:p,showDownloadIcon:m,removeIcon:h,previewIcon:g,downloadIcon:_,extra:v,iconRender:P,actionIconRender:F,itemRender:C,onPreview:j,onDownload:M,onClose:N})),b&&S.createElement(Iu,{...V,visible:x,forceRender:!0},({className:e,style:t})=>Pp(b,n=>({className:J(n.className,e),style:{...t,pointerEvents:e?`none`:void 0,...n.style}}))))}),w1=`__LIST_IGNORE_${Date.now()}__`,T1=S.forwardRef((e,t)=>{let n=li(`upload`),{fileList:r,defaultFileList:i,onRemove:a,showUploadList:o=!0,listType:s=`text`,onPreview:c,onDownload:l,onChange:u,onDrop:d,previewFile:f,disabled:p,locale:m,iconRender:h,isImageUrl:g,progress:_,prefixCls:v,className:y,type:b=`select`,children:x,style:C,itemRender:w,maxCount:T,data:E={},multiple:D=!1,hasControlInside:O=!0,action:k=``,accept:A=``,supportServerRender:j=!0,rootClassName:M,styles:N,classNames:P}=e,F=S.useContext(zp),I=p??F,L=e.customRequest||n.customRequest,[R,z]=Hn(i,r),B=R||[],[V,H]=S.useState(`drop`),U=S.useRef(null),W=S.useRef(null);S.useMemo(()=>{let e=Date.now();(r||[]).forEach((t,n)=>{!t.uid&&!Object.isFrozen(t)&&(t.uid=`__AUTO__${e}_${n}__`)})},[r]);let ee=(e,t,n)=>{let r=Zr(t),i=!1;T===1?r=r.slice(-1):T&&(i=r.length>T,r=r.slice(0,T)),(0,Jf.flushSync)(()=>{z(r)});let a={file:e,fileList:r};n&&(a.event=n),(!i||e.status===`removed`||r.some(t=>t.uid===e.uid))&&(0,Jf.flushSync)(()=>{u?.(a)})},te=async(t,n)=>{let{beforeUpload:r}=e,i=t;if(r){let e=await r(t,n);if(e===!1)return!1;if(delete t[w1],e===w1)return Object.defineProperty(t,w1,{value:!0,configurable:!0}),!1;hd(e)&&(i=e)}return i},ne=e=>{let t=e.filter(e=>!e.file[w1]);if(!t.length)return;let n=t.map(e=>u1(e.file)),r=Zr(B);n.forEach(e=>{r=d1(e,r)}),n.forEach((e,n)=>{let i=e;if(t[n].parsedFile)e.status=`uploading`;else{let{originFileObj:t}=e,n;try{n=new File([t],t.name,{type:t.type})}catch{n=new Blob([t],{type:t.type}),n.name=t.name,n.lastModifiedDate=new Date,n.lastModified=new Date().getTime()}n.uid=e.uid,i=n}ee(i,r)})},re=(e,t,n)=>{try{typeof e==`string`&&(e=JSON.parse(e))}catch{}if(!f1(t,B))return;let r=u1(t);r.status=`done`,r.percent=100,r.response=e,r.xhr=n,ee(r,d1(r,B))},ie=(e,t)=>{if(!f1(t,B))return;let n=u1(t);n.status=`uploading`,n.percent=e.percent,ee(n,d1(n,B),e)},ae=(e,t,n)=>{if(!f1(n,B))return;let r=u1(n);r.error=e,r.response=t,r.status=`error`,ee(r,d1(r,B))},G=e=>{let t;Promise.resolve(typeof a==`function`?a(e):a).then(n=>{if(n===!1)return;let r=p1(e,B);r&&(t={...e,status:`removed`},B?.forEach(e=>{let n=t.uid===void 0?`name`:`uid`;e[n]===t[n]&&!Object.isFrozen(e)&&(e.status=`removed`)}),U.current?.abort(t),ee(t,r))})},oe=e=>{H(e.type),e.type===`drop`&&d?.(e)};S.useImperativeHandle(t,()=>({onBatchStart:ne,onSuccess:re,onProgress:ie,onError:ae,fileList:B,upload:U.current,nativeElement:W.current}));let{getPrefixCls:K,direction:se,className:ce,style:q,classNames:le,styles:ue}=li(`upload`),de=K(`upload`,v),fe={...e,listType:s,showUploadList:o,type:b,multiple:D,hasControlInside:O,supportServerRender:j,disabled:I},[pe,me]=Fd([le,P],[ue,N],{props:fe}),he={onBatchStart:ne,onError:ae,onProgress:ie,onSuccess:re,...e,customRequest:L,data:E,multiple:D,action:k,accept:A,supportServerRender:j,prefixCls:de,disabled:I,beforeUpload:te,onChange:void 0,hasControlInside:O};delete he.className,delete he.style,(!x||I)&&delete he.id;let ge=`${de}-wrapper`,[_e,ve]=e1(de,ge),[ye]=cd(`Upload`,td.Upload),{showRemoveIcon:be,showPreviewIcon:xe,showDownloadIcon:Se,removeIcon:Ce,previewIcon:we,downloadIcon:Te,extra:Ee}=typeof o==`boolean`?{}:o,De=be===void 0?!I:be,Oe=(e,t)=>o?S.createElement(C1,{classNames:pe,styles:me,prefixCls:de,listType:s,items:B,previewFile:f,onPreview:c,onDownload:l,onRemove:G,showRemoveIcon:De,showPreviewIcon:xe,showDownloadIcon:Se,removeIcon:Ce,previewIcon:we,downloadIcon:Te,iconRender:h,extra:Ee,locale:{...ye,...m},isImageUrl:g,progress:_,appendAction:e,appendActionVisible:t,itemRender:w,disabled:I}):e,ke=J(ge,y,M,_e,ve,ce,pe.root,{[`${de}-rtl`]:se===`rtl`,[`${de}-picture-card-wrapper`]:s===`picture-card`,[`${de}-picture-circle-wrapper`]:s===`picture-circle`}),Ae={...me.root},je={...q,...C};if(b===`drag`){let e=J(_e,de,`${de}-drag`,{[`${de}-drag-uploading`]:B.some(e=>e.status===`uploading`),[`${de}-drag-hover`]:V===`dragover`,[`${de}-disabled`]:I,[`${de}-rtl`]:se===`rtl`},pe.trigger);return S.createElement(`span`,{className:ke,ref:W,style:Ae},S.createElement(`div`,{className:e,style:{...je,...me.trigger},onDrop:oe,onDragOver:oe,onDragLeave:oe},S.createElement(K$,{...he,ref:U,className:`${de}-btn`},S.createElement(`div`,{className:`${de}-drag-container`},x))),Oe())}let Me=J(de,`${de}-select`,{[`${de}-disabled`]:I,[`${de}-hidden`]:!x},pe.trigger),Ne=S.createElement(`div`,{className:Me,style:{...je,...me.trigger}},S.createElement(K$,{...he,ref:U}));return s===`picture-card`||s===`picture-circle`?S.createElement(`span`,{className:ke,ref:W,style:Ae},Oe(Ne,!!x)):S.createElement(`span`,{className:ke,ref:W,style:Ae},Ne,Oe())}),E1=S.forwardRef((e,t)=>{let{style:n,height:r,hasControlInside:i=!1,children:a,...o}=e,s={...n,height:r};return S.createElement(T1,{ref:t,hasControlInside:i,...o,style:s,type:`drag`},a)}),D1=T1;D1.Dragger=E1,D1.LIST_IGNORE=w1;var O1=o(((e,t)=>{function n(e){return e&&e.__esModule?e:{default:e}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),k1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default={items_per_page:`条/页`,jump_to:`跳至`,jump_to_confirm:`确定`,page:`页`,prev_page:`上一页`,next_page:`下一页`,prev_5:`向前 5 页`,next_5:`向后 5 页`,prev_3:`向前 3 页`,next_3:`向后 3 页`,page_size:`页码`}})),A1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.commonLocale=void 0,e.commonLocale={yearFormat:`YYYY`,dayFormat:`D`,cellMeridiemFormat:`A`,monthBeforeYear:!0}})),j1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=A1();function n(e){"@babel/helpers - typeof";return n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n(e)}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default={placeholder:`请选择时间`,rangePlaceholder:[`开始时间`,`结束时间`]}})),N1=o((e=>{var t=O1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(j1()),r=t(M1()),i={lang:{placeholder:`请选择日期`,yearPlaceholder:`请选择年份`,quarterPlaceholder:`请选择季度`,monthPlaceholder:`请选择月份`,weekPlaceholder:`请选择周`,rangePlaceholder:[`开始日期`,`结束日期`],rangeYearPlaceholder:[`开始年份`,`结束年份`],rangeMonthPlaceholder:[`开始月份`,`结束月份`],rangeQuarterPlaceholder:[`开始季度`,`结束季度`],rangeWeekPlaceholder:[`开始周`,`结束周`],...n.default},timePickerLocale:{...r.default}};i.lang.ok=`确定`,e.default=i})),P1=o((e=>{var t=O1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=t(N1()).default})),F1=o((e=>{var t=O1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(k1()),r=t(P1()),i=t(N1()),a=t(M1()),o="${label}不是一个有效的${type}";e.default={locale:`zh-cn`,Pagination:n.default,DatePicker:i.default,TimePicker:a.default,Calendar:r.default,global:{placeholder:`请选择`,close:`关闭`,sortable:`可排序`},Table:{filterTitle:`筛选`,filterConfirm:`确定`,filterReset:`重置`,filterEmptyText:`无筛选项`,filterCheckAll:`全选`,filterSearchPlaceholder:`在筛选项中搜索`,emptyText:`暂无数据`,selectAll:`全选当页`,selectInvert:`反选当页`,selectNone:`清空所有`,selectionAll:`全选所有`,sortTitle:`排序`,expand:`展开行`,collapse:`关闭行`,triggerDesc:`点击降序`,triggerAsc:`点击升序`,cancelSort:`取消排序`},Modal:{okText:`确定`,cancelText:`取消`,justOkText:`知道了`},Tour:{Next:`下一步`,Previous:`上一步`,Finish:`结束导览`},Popconfirm:{cancelText:`取消`,okText:`确定`},Transfer:{titles:[``,``],searchPlaceholder:`请输入搜索内容`,itemUnit:`项`,itemsUnit:`项`,remove:`删除`,selectCurrent:`全选当页`,removeCurrent:`删除当页`,selectAll:`全选所有`,deselectAll:`取消全选`,removeAll:`删除全部`,selectInvert:`反选当页`},Upload:{uploading:`文件上传中`,removeFile:`删除文件`,uploadError:`上传错误`,previewFile:`预览文件`,downloadFile:`下载文件`},Empty:{description:`暂无数据`},Icon:{icon:`图标`},Text:{edit:`编辑`,copy:`复制`,copied:`复制成功`,expand:`展开`,collapse:`收起`},Form:{optional:`(可选)`,defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:o,method:o,array:o,object:o,number:o,date:o,boolean:o,integer:o,float:o,regexp:o,email:o,url:o,hex:o},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},QRCode:{expired:`二维码过期`,refresh:`点击刷新`,scanned:`已扫描`},ColorPicker:{presetEmpty:`暂无`,transparent:`无色`,singleColor:`单色`,gradientColor:`渐变色`}}})),I1=o(((e,t)=>{t.exports=F1()})),L1={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.42 0 448 200.58 448 448S759.42 960 512 960 64 759.42 64 512 264.58 64 512 64m32.5 168c-69.67 0-86.06 16.84-86.72 39.08l-.02 1.43v46.62H291.45c-9.92 0-14.28 23.05-14.27 39.3 0 2.7 2.08 4.93 4.77 4.93h175.81v58.3h-116.5c-9.96 0-14.3 23.76-14.27 39.47a4.77 4.77 0 004.77 4.76h233.45c-4.53 41.06-15.43 77.59-30.72 109.32l-1.22 2.5-.32-.28c-60.24-28.47-120.43-52.57-194.4-52.57l-2.62.01c-84.98 1.11-144.71 56.5-145.91 127.04l-.02 1.22.02 2.13c1.24 70.4 63.56 126.45 148.52 126.45 61.25 0 116.38-16.85 163.46-45.02a138.58 138.58 0 0014.07-7.96 345.6 345.6 0 0050.3-41.16l9.45 6.35 12.46 8.32c57.53 38.26 113.76 72.62 169.86 79.27a142.62 142.62 0 0018.31 1.16c43.02 0 55-52.68 57.39-95.51l.14-2.84c.4-8.46-6.2-15.6-14.65-15.86-75.46-2.37-136.45-22.05-192-46.11l-6.27-2.75c35.15-56.8 56.66-121.81 57.15-186.66l.09-1.08c.4-5.51-4-10.2-9.52-10.2H549.33v-58.3h165.73c9.92 0 14.28-22.12 14.27-39.31a4.85 4.85 0 00-4.78-4.92H549.32v-82.35a4.8 4.8 0 00-4.83-4.78M328 583.85c54.63 0 107.08 22.41 158.1 52.19l5.76 3.4c-103.57 119.84-247.17 95.9-261.72 26.37a66.89 66.89 0 01-1.14-9.83l-.06-2.34.02-.9c.97-40.12 45.33-68.9 99.04-68.9`}}]},name:`alipay-circle`,theme:`outlined`};function R1(){return R1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,R1({},e,{ref:t,icon:L1}))),B1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z`}}]},name:`api`,theme:`outlined`};function V1(){return V1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,V1({},e,{ref:t,icon:B1}))),U1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z`}}]},name:`appstore`,theme:`outlined`};function W1(){return W1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,W1({},e,{ref:t,icon:U1}))),K1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z`}}]},name:`arrow-down`,theme:`outlined`};function q1(){return q1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,q1({},e,{ref:t,icon:K1}))),Y1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`arrow-left`,theme:`outlined`};function X1(){return X1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,X1({},e,{ref:t,icon:Y1}))),Q1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z`}}]},name:`arrow-up`,theme:`outlined`};function $1(){return $1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,$1({},e,{ref:t,icon:Q1}))),t0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z`}}]},name:`audio`,theme:`outlined`};function n0(){return n0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n0({},e,{ref:t,icon:t0}))),i0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z`}}]},name:`bank`,theme:`outlined`};function a0(){return a0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a0({},e,{ref:t,icon:i0}))),s0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z`}}]},name:`bar-chart`,theme:`outlined`};function c0(){return c0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c0({},e,{ref:t,icon:s0}))),u0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M816 768h-24V428c0-141.1-104.3-257.7-240-277.1V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.9c-135.7 19.4-240 136-240 277.1v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48zM304 768V428c0-55.6 21.6-107.8 60.9-147.1S456.4 220 512 220c55.6 0 107.8 21.6 147.1 60.9S720 372.4 720 428v340H304z`}}]},name:`bell`,theme:`outlined`};function d0(){return d0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d0({},e,{ref:t,icon:u0}))),p0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z`}}]},name:`book`,theme:`outlined`};function m0(){return m0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,m0({},e,{ref:t,icon:p0}))),g0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M916 210H376c-17.7 0-32 14.3-32 32v236H108c-17.7 0-32 14.3-32 32v272c0 17.7 14.3 32 32 32h540c17.7 0 32-14.3 32-32V546h236c17.7 0 32-14.3 32-32V242c0-17.7-14.3-32-32-32zm-504 68h200v200H412V278zm-68 468H144V546h200v200zm268 0H412V546h200v200zm268-268H680V278h200v200z`}}]},name:`build`,theme:`outlined`};function _0(){return _0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,_0({},e,{ref:t,icon:g0}))),y0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z`}}]},name:`bulb`,theme:`outlined`};function b0(){return b0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b0({},e,{ref:t,icon:y0}))),S0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M251.2 387H320v68.8c0 1.8 1.8 3.2 4 3.2h48c2.2 0 4-1.4 4-3.3V387h68.8c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H376v-68.8c0-1.8-1.8-3.2-4-3.2h-48c-2.2 0-4 1.4-4 3.2V331h-68.8c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm328 0h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm0 265h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm0 104h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm-195.7-81l61.2-74.9c4.3-5.2.7-13.1-5.9-13.1H388c-2.3 0-4.5 1-5.9 2.9l-34 41.6-34-41.6a7.85 7.85 0 00-5.9-2.9h-50.9c-6.6 0-10.2 7.9-5.9 13.1l61.2 74.9-62.7 76.8c-4.4 5.2-.8 13.1 5.8 13.1h50.8c2.3 0 4.5-1 5.9-2.9l35.5-43.5 35.5 43.5c1.5 1.8 3.7 2.9 5.9 2.9h50.8c6.6 0 10.2-7.9 5.9-13.1L383.5 675zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-36 732H180V180h664v664z`}}]},name:`calculator`,theme:`outlined`};function C0(){return C0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C0({},e,{ref:t,icon:S0}))),T0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 248H728l-32.4-90.8a32.07 32.07 0 00-30.2-21.2H358.6c-13.5 0-25.6 8.5-30.1 21.2L296 248H160c-44.2 0-80 35.8-80 80v456c0 44.2 35.8 80 80 80h704c44.2 0 80-35.8 80-80V328c0-44.2-35.8-80-80-80zm8 536c0 4.4-3.6 8-8 8H160c-4.4 0-8-3.6-8-8V328c0-4.4 3.6-8 8-8h186.7l17.1-47.8 22.9-64.2h250.5l22.9 64.2 17.1 47.8H864c4.4 0 8 3.6 8 8v456zM512 384c-88.4 0-160 71.6-160 160s71.6 160 160 160 160-71.6 160-160-71.6-160-160-160zm0 256c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z`}}]},name:`camera`,theme:`outlined`};function E0(){return E0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,E0({},e,{ref:t,icon:T0}))),O0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M380 704h264c4.4 0 8-3.6 8-8v-84c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v36H428v-36c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v84c0 4.4 3.6 8 8 8zm340-123a40 40 0 1080 0 40 40 0 10-80 0zm239-167.6L935.3 372a8 8 0 00-10.9-2.9l-50.7 29.6-78.3-216.2a63.9 63.9 0 00-60.9-44.4H301.2c-34.7 0-65.5 22.4-76.2 55.5l-74.6 205.2-50.8-29.6a8 8 0 00-10.9 2.9L65 413.4c-2.2 3.8-.9 8.6 2.9 10.8l60.4 35.2-14.5 40c-1.2 3.2-1.8 6.6-1.8 10v348.2c0 15.7 11.8 28.4 26.3 28.4h67.6c12.3 0 23-9.3 25.6-22.3l7.7-37.7h545.6l7.7 37.7c2.7 13 13.3 22.3 25.6 22.3h67.6c14.5 0 26.3-12.7 26.3-28.4V509.4c0-3.4-.6-6.8-1.8-10l-14.5-40 60.3-35.2a8 8 0 003-10.8zM840 517v237H184V517l15.6-43h624.8l15.6 43zM292.7 218.1l.5-1.3.4-1.3c1.1-3.3 4.1-5.5 7.6-5.5h427.6l75.4 208H220l72.7-199.9zM224 581a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`car`,theme:`outlined`};function k0(){return k0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,k0({},e,{ref:t,icon:O0}))),j0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z`}},{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}}]},name:`check-circle`,theme:`outlined`};function M0(){return M0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,M0({},e,{ref:t,icon:j0}))),P0={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z`}}]},name:`close-circle`,theme:`outlined`};function F0(){return F0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,F0({},e,{ref:t,icon:P0}))),L0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M811.4 418.7C765.6 297.9 648.9 212 512.2 212S258.8 297.8 213 418.6C127.3 441.1 64 519.1 64 612c0 110.5 89.5 200 199.9 200h496.2C870.5 812 960 722.5 960 612c0-92.7-63.1-170.7-148.6-193.3zm36.3 281a123.07 123.07 0 01-87.6 36.3H263.9c-33.1 0-64.2-12.9-87.6-36.3A123.3 123.3 0 01140 612c0-28 9.1-54.3 26.2-76.3a125.7 125.7 0 0166.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10c54.3 14.5 92.1 63.8 92.1 120 0 33.1-12.9 64.3-36.3 87.7z`}}]},name:`cloud`,theme:`outlined`};function R0(){return R0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,R0({},e,{ref:t,icon:L0}))),B0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z`}},{tag:`path`,attrs:{d:`M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z`}},{tag:`path`,attrs:{d:`M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z`}}]},name:`cloud-server`,theme:`outlined`};function V0(){return V0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,V0({},e,{ref:t,icon:B0}))),U0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`code`,theme:`outlined`};function W0(){return W0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,W0({},e,{ref:t,icon:U0}))),K0={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M275 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm613 144H768c0-39.8-32.2-72-72-72H200c-39.8 0-72 32.2-72 72v248c0 3.4.2 6.7.7 9.9-.5 7-.7 14-.7 21.1 0 176.7 143.3 320 320 320 160.1 0 292.7-117.5 316.3-271H888c39.8 0 72-32.2 72-72V497c0-39.8-32.2-72-72-72zM696 681h-1.1c.7 7.6 1.1 15.2 1.1 23 0 137-111 248-248 248S200 841 200 704c0-7.8.4-15.4 1.1-23H200V425h496v256zm192-8H776V497h112v176zM613 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm-170 0c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36z`}}]},name:`coffee`,theme:`outlined`};function q0(){return q0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,q0({},e,{ref:t,icon:K0}))),Y0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm198.4-588.1a32 32 0 00-24.5.5L414.9 415 296.4 686c-3.6 8.2-3.6 17.5 0 25.7 3.4 7.8 9.7 13.9 17.7 17 3.8 1.5 7.7 2.2 11.7 2.2 4.4 0 8.7-.9 12.8-2.7l271-118.6 118.5-271a32.06 32.06 0 00-17.7-42.7zM576.8 534.4l26.2 26.2-42.4 42.4-26.2-26.2L380 644.4 447.5 490 422 464.4l42.4-42.4 25.5 25.5L644.4 380l-67.6 154.4zM464.4 422L422 464.4l25.5 25.6 86.9 86.8 26.2 26.2 42.4-42.4-26.2-26.2-86.8-86.9z`}}]},name:`compass`,theme:`outlined`};function X0(){return X0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,X0({},e,{ref:t,icon:Y0}))),Q0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z`}}]},name:`crown`,theme:`outlined`};function $0(){return $0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,$0({},e,{ref:t,icon:Q0}))),t2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z`}}]},name:`dashboard`,theme:`outlined`};function n2(){return n2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n2({},e,{ref:t,icon:t2}))),i2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`database`,theme:`outlined`};function a2(){return a2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a2({},e,{ref:t,icon:i2}))),s2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm47.7-395.2l-25.4-5.9V348.6c38 5.2 61.5 29 65.5 58.2.5 4 3.9 6.9 7.9 6.9h44.9c4.7 0 8.4-4.1 8-8.8-6.1-62.3-57.4-102.3-125.9-109.2V263c0-4.4-3.6-8-8-8h-28.1c-4.4 0-8 3.6-8 8v33c-70.8 6.9-126.2 46-126.2 119 0 67.6 49.8 100.2 102.1 112.7l24.7 6.3v142.7c-44.2-5.9-69-29.5-74.1-61.3-.6-3.8-4-6.6-7.9-6.6H363c-4.7 0-8.4 4-8 8.7 4.5 55 46.2 105.6 135.2 112.1V761c0 4.4 3.6 8 8 8h28.4c4.4 0 8-3.6 8-8.1l-.2-31.7c78.3-6.9 134.3-48.8 134.3-124-.1-69.4-44.2-100.4-109-116.4zm-68.6-16.2c-5.6-1.6-10.3-3.1-15-5-33.8-12.2-49.5-31.9-49.5-57.3 0-36.3 27.5-57 64.5-61.7v124zM534.3 677V543.3c3.1.9 5.9 1.6 8.8 2.2 47.3 14.4 63.2 34.4 63.2 65.1 0 39.1-29.4 62.6-72 66.4z`}}]},name:`dollar`,theme:`outlined`};function c2(){return c2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c2({},e,{ref:t,icon:s2}))),u2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}},{tag:`path`,attrs:{d:`M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z`}}]},name:`exclamation-circle`,theme:`outlined`};function d2(){return d2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d2({},e,{ref:t,icon:u2}))),p2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 472a40 40 0 1080 0 40 40 0 10-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 01-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z`}}]},name:`experiment`,theme:`outlined`};function m2(){return m2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,m2({},e,{ref:t,icon:p2}))),g2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z`}}]},name:`file-image`,theme:`outlined`};function _2(){return _2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,_2({},e,{ref:t,icon:g2}))),y2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z`}}]},name:`file-pdf`,theme:`outlined`};function b2(){return b2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b2({},e,{ref:t,icon:y2}))),S2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z`}}]},name:`filter`,theme:`outlined`};function C2(){return C2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C2({},e,{ref:t,icon:S2}))),T2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9zM713 808.5c-53.7 53.2-125 82.4-201 82.4s-147.3-29.2-201-82.4c-53.5-53.1-83-123.5-83-198.4 0-43.5 9.8-85.2 29.1-124 18.8-37.9 46.8-71.8 80.8-97.9a349.6 349.6 0 0058.6-56.8c25-30.5 44.6-64.5 58.2-101a240 240 0 0012.1-46.5c24.1 22.2 44.3 49 61.2 80.4 33.4 62.6 48.8 118.3 45.8 165.7a74.01 74.01 0 0024.4 59.8 73.36 73.36 0 0053.4 18.8c19.7-1 37.8-9.7 51-24.4 13.3-14.9 24.8-30.1 34.4-45.6 14 17.9 25.7 37.4 35 58.4 15.9 35.8 24 73.9 24 113.1 0 74.9-29.5 145.4-83 198.4z`}}]},name:`fire`,theme:`outlined`};function E2(){return E2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,E2({},e,{ref:t,icon:T2}))),O2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 305H624V192c0-17.7-14.3-32-32-32H184v-40c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v784c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V640h248v113c0 17.7 14.3 32 32 32h416c17.7 0 32-14.3 32-32V337c0-17.7-14.3-32-32-32zM184 568V232h368v336H184zm656 145H504v-73h112c4.4 0 8-3.6 8-8V377h216v336z`}}]},name:`flag`,theme:`outlined`};function k2(){return k2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,k2({},e,{ref:t,icon:O2}))),j2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M920 416H616c-4.4 0-8 3.6-8 8v112c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-56h60v320h-46c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h164c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8h-46V480h60v56c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V424c0-4.4-3.6-8-8-8zM656 296V168c0-4.4-3.6-8-8-8H104c-4.4 0-8 3.6-8 8v128c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-64h168v560h-92c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-92V232h168v64c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8z`}}]},name:`font-size`,theme:`outlined`};function M2(){return M2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,M2({},e,{ref:t,icon:j2}))),P2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 310H732.4c13.6-21.4 21.6-46.8 21.6-74 0-76.1-61.9-138-138-138-41.4 0-78.7 18.4-104 47.4-25.3-29-62.6-47.4-104-47.4-76.1 0-138 61.9-138 138 0 27.2 7.9 52.6 21.6 74H144c-17.7 0-32 14.3-32 32v200c0 4.4 3.6 8 8 8h40v344c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V550h40c4.4 0 8-3.6 8-8V342c0-17.7-14.3-32-32-32zm-334-74c0-38.6 31.4-70 70-70s70 31.4 70 70-31.4 70-70 70h-70v-70zm-138-70c38.6 0 70 31.4 70 70v70h-70c-38.6 0-70-31.4-70-70s31.4-70 70-70zM180 482V378h298v104H180zm48 68h250v308H228V550zm568 308H546V550h250v308zm48-376H546V378h298v104z`}}]},name:`gift`,theme:`outlined`};function F2(){return F2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,F2({},e,{ref:t,icon:P2}))),L2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z`}}]},name:`global`,theme:`outlined`};function R2(){return R2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,R2({},e,{ref:t,icon:L2}))),B2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z`}}]},name:`heart`,theme:`outlined`};function V2(){return V2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,V2({},e,{ref:t,icon:B2}))),U2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M957.6 507.4L603.2 158.2a7.9 7.9 0 00-11.2 0L353.3 393.4a8.03 8.03 0 00-.1 11.3l.1.1 40 39.4-117.2 115.3a8.03 8.03 0 00-.1 11.3l.1.1 39.5 38.9-189.1 187H72.1c-4.4 0-8.1 3.6-8.1 8V860c0 4.4 3.6 8 8 8h344.9c2.1 0 4.1-.8 5.6-2.3l76.1-75.6 40.4 39.8a7.9 7.9 0 0011.2 0l117.1-115.6 40.1 39.5a7.9 7.9 0 0011.2 0l238.7-235.2c3.4-3 3.4-8 .3-11.2zM389.8 796.2H229.6l134.4-133 80.1 78.9-54.3 54.1zm154.8-62.1L373.2 565.2l68.6-67.6 171.4 168.9-68.6 67.6zM713.1 658L450.3 399.1 597.6 254l262.8 259-147.3 145z`}}]},name:`highlight`,theme:`outlined`};function W2(){return W2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,W2({},e,{ref:t,icon:U2}))),K2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z`}}]},name:`history`,theme:`outlined`};function q2(){return q2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,q2({},e,{ref:t,icon:K2}))),Y2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z`}}]},name:`home`,theme:`outlined`};function X2(){return X2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,X2({},e,{ref:t,icon:Y2}))),Q2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136V232h752v560zM610.3 476h123.4c1.3 0 2.3-3.6 2.3-8v-48c0-4.4-1-8-2.3-8H610.3c-1.3 0-2.3 3.6-2.3 8v48c0 4.4 1 8 2.3 8zm4.8 144h185.7c3.9 0 7.1-3.6 7.1-8v-48c0-4.4-3.2-8-7.1-8H615.1c-3.9 0-7.1 3.6-7.1 8v48c0 4.4 3.2 8 7.1 8zM224 673h43.9c4.2 0 7.6-3.3 7.9-7.5 3.8-50.5 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H522a8 8 0 008-8.4c-2.8-53.3-32-99.7-74.6-126.1a111.8 111.8 0 0029.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 00-74.6 126.1c-.4 4.6 3.2 8.4 7.8 8.4zm149-262c28.5 0 51.7 23.3 51.7 52s-23.2 52-51.7 52-51.7-23.3-51.7-52 23.2-52 51.7-52z`}}]},name:`idcard`,theme:`outlined`};function $2(){return $2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,$2({},e,{ref:t,icon:Q2}))),t4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M956.9 845.1L896.4 632V168c0-17.7-14.3-32-32-32h-704c-17.7 0-32 14.3-32 32v464L67.9 845.1C60.4 866 75.8 888 98 888h828.8c22.2 0 37.6-22 30.1-42.9zM200.4 208h624v395h-624V208zm228.3 608l8.1-37h150.3l8.1 37H428.7zm224 0l-19.1-86.7c-.8-3.7-4.1-6.3-7.8-6.3H398.2c-3.8 0-7 2.6-7.8 6.3L371.3 816H151l42.3-149h638.2l42.3 149H652.7z`}}]},name:`laptop`,theme:`outlined`};function n4(){return n4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n4({},e,{ref:t,icon:t4}))),i4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z`}}]},name:`line-chart`,theme:`outlined`};function a4(){return a4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a4({},e,{ref:t,icon:i4}))),s4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z`}}]},name:`link`,theme:`outlined`};function c4(){return c4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c4({},e,{ref:t,icon:s4}))),u4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z`}}]},name:`lock`,theme:`outlined`};function d4(){return d4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d4({},e,{ref:t,icon:u4}))),p4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z`}}]},name:`logout`,theme:`outlined`};function m4(){return m4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,m4({},e,{ref:t,icon:p4}))),g4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z`}}]},name:`mail`,theme:`outlined`};function _4(){return _4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,_4({},e,{ref:t,icon:g4}))),y4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M839.2 278.1a32 32 0 00-30.4-22.1H736V144c0-17.7-14.3-32-32-32H320c-17.7 0-32 14.3-32 32v112h-72.8a31.9 31.9 0 00-30.4 22.1L112 502v378c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V502l-72.8-223.9zM360 184h304v72H360v-72zm480 656H184V513.4L244.3 328h535.4L840 513.4V840zM652 572H544V464c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v108H372c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h108v108c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V636h108c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z`}}]},name:`medicine-box`,theme:`outlined`};function b4(){return b4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b4({},e,{ref:t,icon:y4}))),S4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z`}}]},name:`menu`,theme:`outlined`};function C4(){return C4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C4({},e,{ref:t,icon:S4}))),T4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z`}},{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}}]},name:`minus-circle`,theme:`outlined`};function E4(){return E4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,E4({},e,{ref:t,icon:T4}))),O4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`mobile`,theme:`outlined`};function k4(){return k4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,k4({},e,{ref:t,icon:O4}))),j4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M692.8 412.7l.2-.2-34.6-44.3a7.97 7.97 0 00-11.2-1.4l-50.4 39.3-70.5-90.1a7.97 7.97 0 00-11.2-1.4l-37.9 29.7a7.97 7.97 0 00-1.4 11.2l70.5 90.2-.2.1 34.6 44.3c2.7 3.5 7.7 4.1 11.2 1.4l50.4-39.3 64.1 82c2.7 3.5 7.7 4.1 11.2 1.4l37.9-29.6c3.5-2.7 4.1-7.7 1.4-11.2l-64.1-82.1zM608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5L114.3 856.1a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6C473 696.1 537.7 720 608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644s-118.2-23.7-161.2-66.8C403.7 534.2 380 476.9 380 416s23.7-118.2 66.8-161.2c43-43.1 100.3-66.8 161.2-66.8s118.2 23.7 161.2 66.8c43.1 43 66.8 100.3 66.8 161.2s-23.7 118.2-66.8 161.2z`}}]},name:`monitor`,theme:`outlined`};function M4(){return M4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,M4({},e,{ref:t,icon:j4}))),P4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm159.6-585h-59.5c-3 0-5.8 1.7-7.1 4.4l-90.6 180H511l-90.6-180a8 8 0 00-7.1-4.4h-60.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.9L457 515.7h-61.4c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V603h-81.7c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V717c0 4.4 3.6 8 8 8h54.3c4.4 0 8-3.6 8-8v-68.1h82c4.4 0 8-3.6 8-8V611c0-4.4-3.6-8-8-8h-82v-41.5h82c4.4 0 8-3.6 8-8v-29.9c0-4.4-3.6-8-8-8h-62l111.1-204.8c.6-1.2 1-2.5 1-3.8-.1-4.4-3.7-8-8.1-8z`}}]},name:`pay-circle`,theme:`outlined`};function F4(){return F4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,F4({},e,{ref:t,icon:P4}))),L4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M877.1 238.7L770.6 132.3c-13-13-30.4-20.3-48.8-20.3s-35.8 7.2-48.8 20.3L558.3 246.8c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l89.6 89.7a405.46 405.46 0 01-86.4 127.3c-36.7 36.9-79.6 66-127.2 86.6l-89.6-89.7c-13-13-30.4-20.3-48.8-20.3a68.2 68.2 0 00-48.8 20.3L132.3 673c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l106.4 106.4c22.2 22.2 52.8 34.9 84.2 34.9 6.5 0 12.8-.5 19.2-1.6 132.4-21.8 263.8-92.3 369.9-198.3C818 606 888.4 474.6 910.4 342.1c6.3-37.6-6.3-76.3-33.3-103.4zm-37.6 91.5c-19.5 117.9-82.9 235.5-178.4 331s-213 158.9-330.9 178.4c-14.8 2.5-30-2.5-40.8-13.2L184.9 721.9 295.7 611l119.8 120 .9.9 21.6-8a481.29 481.29 0 00285.7-285.8l8-21.6-120.8-120.7 110.8-110.9 104.5 104.5c10.8 10.8 15.8 26 13.3 40.8z`}}]},name:`phone`,theme:`outlined`};function R4(){return R4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,R4({},e,{ref:t,icon:L4}))),B4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`}}]},name:`picture`,theme:`outlined`};function V4(){return V4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,V4({},e,{ref:t,icon:B4}))),U4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 518H506V160c0-4.4-3.6-8-8-8h-26a398.46 398.46 0 00-282.8 117.1 398.19 398.19 0 00-85.7 127.1A397.61 397.61 0 0072 552a398.46 398.46 0 00117.1 282.8c36.7 36.7 79.5 65.6 127.1 85.7A397.61 397.61 0 00472 952a398.46 398.46 0 00282.8-117.1c36.7-36.7 65.6-79.5 85.7-127.1A397.61 397.61 0 00872 552v-26c0-4.4-3.6-8-8-8zM705.7 787.8A331.59 331.59 0 01470.4 884c-88.1-.4-170.9-34.9-233.2-97.2C174.5 724.1 140 640.7 140 552c0-88.7 34.5-172.1 97.2-234.8 54.6-54.6 124.9-87.9 200.8-95.5V586h364.3c-7.7 76.3-41.3 147-96.6 201.8zM952 462.4l-2.6-28.2c-8.5-92.1-49.4-179-115.2-244.6A399.4 399.4 0 00589 74.6L560.7 72c-4.7-.4-8.7 3.2-8.7 7.9V464c0 4.4 3.6 8 8 8l384-1c4.7 0 8.4-4 8-8.6zm-332.2-58.2V147.6a332.24 332.24 0 01166.4 89.8c45.7 45.6 77 103.6 90 166.1l-256.4.7z`}}]},name:`pie-chart`,theme:`outlined`};function W4(){return W4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,W4({},e,{ref:t,icon:U4}))),K4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}},{tag:`path`,attrs:{d:`M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z`}}]},name:`play-circle`,theme:`outlined`};function q4(){return q4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,q4({},e,{ref:t,icon:K4}))),Y4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M280 752h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8zm192-280h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v184c0 4.4 3.6 8 8 8zm192 72h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v256c0 4.4 3.6 8 8 8zm216-432H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`project`,theme:`outlined`};function X4(){return X4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,X4({},e,{ref:t,icon:Y4}))),Q4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 161H699.2c-49.1 0-97.1 14.1-138.4 40.7L512 233l-48.8-31.3A255.2 255.2 0 00324.8 161H96c-17.7 0-32 14.3-32 32v568c0 17.7 14.3 32 32 32h228.8c49.1 0 97.1 14.1 138.4 40.7l44.4 28.6c1.3.8 2.8 1.3 4.3 1.3s3-.4 4.3-1.3l44.4-28.6C602 807.1 650.1 793 699.2 793H928c17.7 0 32-14.3 32-32V193c0-17.7-14.3-32-32-32zM324.8 721H136V233h188.8c35.4 0 69.8 10.1 99.5 29.2l48.8 31.3 6.9 4.5v462c-47.6-25.6-100.8-39-155.2-39zm563.2 0H699.2c-54.4 0-107.6 13.4-155.2 39V298l6.9-4.5 48.8-31.3c29.7-19.1 64.1-29.2 99.5-29.2H888v488zM396.9 361H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm223.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c0-4.1-3.2-7.5-7.1-7.5H627.1c-3.9 0-7.1 3.4-7.1 7.5zM396.9 501H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm416 0H627.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5z`}}]},name:`read`,theme:`outlined`};function $4(){return $4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,$4({},e,{ref:t,icon:Q4}))),t3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M508 704c79.5 0 144-64.5 144-144s-64.5-144-144-144-144 64.5-144 144 64.5 144 144 144zm0-224c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z`}},{tag:`path`,attrs:{d:`M832 256h-28.1l-35.7-120.9c-4-13.7-16.5-23.1-30.7-23.1h-451c-14.3 0-26.8 9.4-30.7 23.1L220.1 256H192c-17.7 0-32 14.3-32 32v28c0 4.4 3.6 8 8 8h45.8l47.7 558.7a32 32 0 0031.9 29.3h429.2a32 32 0 0031.9-29.3L802.2 324H856c4.4 0 8-3.6 8-8v-28c0-17.7-14.3-32-32-32zm-518.6-76h397.2l22.4 76H291l22.4-76zm376.2 664H326.4L282 324h451.9l-44.3 520z`}}]},name:`rest`,theme:`outlined`};function n3(){return n3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n3({},e,{ref:t,icon:t3}))),i3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`robot`,theme:`outlined`};function a3(){return a3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a3({},e,{ref:t,icon:i3}))),s3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 00-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0043.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0043.1-30.5 97.52 97.52 0 0021.4-60.8c0-8.4-1.1-16.4-3.1-23.8H864zM762.3 621.4c9.4 14.6 17 30.3 22.5 46.6H700V558.7a211.6 211.6 0 0162.3 62.7zM388 483.1V318.8l124-147 124 147V668H388V483.1zM239.2 668c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668h-84.8zm388.9 116.2c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5-38.3 0-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 01-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM464 400a48 48 0 1096 0 48 48 0 10-96 0z`}}]},name:`rocket`,theme:`outlined`};function c3(){return c3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c3({},e,{ref:t,icon:s3}))),u3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M793 242H366v-74c0-6.7-7.7-10.4-12.9-6.3l-142 112a8 8 0 000 12.6l142 112c5.2 4.1 12.9.4 12.9-6.3v-74h415v470H175c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h618c35.3 0 64-28.7 64-64V306c0-35.3-28.7-64-64-64z`}}]},name:`rollback`,theme:`outlined`};function d3(){return d3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d3({},e,{ref:t,icon:u3}))),p3={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z`}},{tag:`path`,attrs:{d:`M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z`}}]},name:`safety`,theme:`outlined`};function m3(){return m3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,m3({},e,{ref:t,icon:p3}))),g3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z`}}]},name:`save`,theme:`outlined`};function _3(){return _3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,_3({},e,{ref:t,icon:g3}))),y3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zM402.9 528.8l-77.5 77.5a8.03 8.03 0 000 11.3l34 34c3.1 3.1 8.2 3.1 11.3 0l77.5-77.5c55.7 35.1 130.1 28.4 178.6-20.1 56.3-56.3 56.3-147.5 0-203.8-56.3-56.3-147.5-56.3-203.8 0-48.5 48.5-55.2 123-20.1 178.6zm65.4-133.3c31.3-31.3 82-31.3 113.2 0 31.3 31.3 31.3 82 0 113.2-31.3 31.3-82 31.3-113.2 0s-31.3-81.9 0-113.2z`}}]},name:`security-scan`,theme:`outlined`};function b3(){return b3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b3({},e,{ref:t,icon:y3}))),S3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z`}}]},name:`send`,theme:`outlined`};function C3(){return C3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C3({},e,{ref:t,icon:S3}))),T3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z`}}]},name:`setting`,theme:`outlined`};function E3(){return E3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,E3({},e,{ref:t,icon:T3}))),O3={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z`}}]},name:`shopping-cart`,theme:`outlined`};function k3(){return k3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,k3({},e,{ref:t,icon:O3}))),j3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 312H696v-16c0-101.6-82.4-184-184-184s-184 82.4-184 184v16H192c-17.7 0-32 14.3-32 32v536c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V344c0-17.7-14.3-32-32-32zm-432-16c0-61.9 50.1-112 112-112s112 50.1 112 112v16H400v-16zm392 544H232V384h96v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h224v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h96v456z`}}]},name:`shopping`,theme:`outlined`};function M3(){return M3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,M3({},e,{ref:t,icon:j3}))),P3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M925.6 405.1l-203-253.7a6.5 6.5 0 00-5-2.4H306.4c-1.9 0-3.8.9-5 2.4l-203 253.7a6.5 6.5 0 00.2 8.3l408.6 459.5c1.2 1.4 3 2.1 4.8 2.1 1.8 0 3.5-.8 4.8-2.1l408.6-459.5a6.5 6.5 0 00.2-8.3zM645.2 206.4l34.4 133.9-132.5-133.9h98.1zm8.2 178.5H370.6L512 242l141.4 142.9zM378.8 206.4h98.1L344.3 340.3l34.5-133.9zm-53.4 7l-44.1 171.5h-93.1l137.2-171.5zM194.6 434.9H289l125.8 247.7-220.2-247.7zM512 763.4L345.1 434.9h333.7L512 763.4zm97.1-80.8L735 434.9h94.4L609.1 682.6zm133.6-297.7l-44.1-171.5 137.2 171.5h-93.1z`}}]},name:`sketch`,theme:`outlined`};function F3(){return F3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,F3({},e,{ref:t,icon:P3}))),L3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M870 126H663.8c-17.4 0-32.9 11.9-37 29.3C614.3 208.1 567 246 512 246s-102.3-37.9-114.8-90.7a37.93 37.93 0 00-37-29.3H154a44 44 0 00-44 44v252a44 44 0 0044 44h75v388a44 44 0 0044 44h478a44 44 0 0044-44V466h75a44 44 0 0044-44V170a44 44 0 00-44-44zm-28 268H723v432H301V394H182V198h153.3c28.2 71.2 97.5 120 176.7 120s148.5-48.8 176.7-120H842v196z`}}]},name:`skin`,theme:`outlined`};function R3(){return R3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,R3({},e,{ref:t,icon:L3}))),B3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z`}}]},name:`smile`,theme:`outlined`};function V3(){return V3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,V3({},e,{ref:t,icon:B3}))),U3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M688 264c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48zm-8 136H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM480 544H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 308H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm356.8-74.4c29-26.3 47.2-64.3 47.2-106.6 0-79.5-64.5-144-144-144s-144 64.5-144 144c0 42.3 18.2 80.3 47.2 106.6-57 32.5-96.2 92.7-99.2 162.1-.2 4.5 3.5 8.3 8 8.3h48.1c4.2 0 7.7-3.3 8-7.6C564 871.2 621.7 816 692 816s128 55.2 131.9 124.4c.2 4.2 3.7 7.6 8 7.6H880c4.6 0 8.2-3.8 8-8.3-2.9-69.5-42.2-129.6-99.2-162.1zM692 591c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z`}}]},name:`solution`,theme:`outlined`};function W3(){return W3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,W3({},e,{ref:t,icon:U3}))),K3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1zM586 803L293.4 611.7l-18-11.7H146V424h129.4l17.9-11.7L586 221v582zm348-327H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zm-41.9 261.8l-110.3-63.7a15.9 15.9 0 00-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0021.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM760 344a15.9 15.9 0 0021.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 00-21.7-5.9L746 287.8a15.99 15.99 0 00-5.8 21.8L760 344z`}}]},name:`sound`,theme:`outlined`};function q3(){return q3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,q3({},e,{ref:t,icon:K3}))),Y3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z`}}]},name:`star`,theme:`outlined`};function X3(){return X3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,X3({},e,{ref:t,icon:Y3}))),Q3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z`}}]},name:`stop`,theme:`outlined`};function $3(){return $3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,$3({},e,{ref:t,icon:Q3}))),t6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M938 458.8l-29.6-312.6c-1.5-16.2-14.4-29-30.6-30.6L565.2 86h-.4c-3.2 0-5.7 1-7.6 2.9L88.9 557.2a9.96 9.96 0 000 14.1l363.8 363.8c1.9 1.9 4.4 2.9 7.1 2.9s5.2-1 7.1-2.9l468.3-468.3c2-2.1 3-5 2.8-8zM459.7 834.7L189.3 564.3 589 164.6 836 188l23.4 247-399.7 399.7zM680 256c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm0 120c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z`}}]},name:`tag`,theme:`outlined`};function n6(){return n6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,n6({},e,{ref:t,icon:t6}))),i6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z`}}]},name:`team`,theme:`outlined`};function a6(){return a6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,a6({},e,{ref:t,icon:i6}))),s6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z`}}]},name:`thunderbolt`,theme:`outlined`};function c6(){return c6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,c6({},e,{ref:t,icon:s6}))),u6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z`}}]},name:`tool`,theme:`outlined`};function d6(){return d6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,d6({},e,{ref:t,icon:u6}))),p6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 160h-92v-40c0-4.4-3.6-8-8-8H256c-4.4 0-8 3.6-8 8v40h-92a44 44 0 00-44 44v148c0 81.7 60 149.6 138.2 162C265.7 630.2 359 721.7 476 734.5v105.2H280c-17.7 0-32 14.3-32 32V904c0 4.4 3.6 8 8 8h512c4.4 0 8-3.6 8-8v-32.3c0-17.7-14.3-32-32-32H548V734.5C665 721.7 758.3 630.2 773.8 514 852 501.6 912 433.7 912 352V204a44 44 0 00-44-44zM184 352V232h64v207.6a91.99 91.99 0 01-64-87.6zm520 128c0 49.1-19.1 95.4-53.9 130.1-34.8 34.8-81 53.9-130.1 53.9h-16c-49.1 0-95.4-19.1-130.1-53.9-34.8-34.8-53.9-81-53.9-130.1V184h384v296zm136-128c0 41-26.9 75.8-64 87.6V232h64v120z`}}]},name:`trophy`,theme:`outlined`};function m6(){return m6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,m6({},e,{ref:t,icon:p6}))),g6={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M608 192a32 32 0 0132 32v160h174.81a32 32 0 0126.68 14.33l113.19 170.84a32 32 0 015.32 17.68V672a32 32 0 01-32 32h-96c0 70.7-57.3 128-128 128s-128-57.3-128-128H384c0 70.7-57.3 128-128 128s-128-57.3-128-128H96a32 32 0 01-32-32V224a32 32 0 0132-32zM256 640a64 64 0 000 128h1.06A64 64 0 00256 640m448 0a64 64 0 000 128h1.06A64 64 0 00704 640M576 256H128v384h17.12c22.13-38.26 63.5-64 110.88-64 47.38 0 88.75 25.74 110.88 64H576zm221.63 192H640v145.12A127.43 127.43 0 01704 576c47.38 0 88.75 25.74 110.88 64H896v-43.52zM500 448a12 12 0 0112 12v40a12 12 0 01-12 12H332a12 12 0 01-12-12v-40a12 12 0 0112-12zM308 320a12 12 0 0112 12v40a12 12 0 01-12 12H204a12 12 0 01-12-12v-40a12 12 0 0112-12z`}}]},name:`truck`,theme:`outlined`};function _6(){return _6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,_6({},e,{ref:t,icon:g6}))),y6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M511.4 124C290.5 124.3 112 303 112 523.9c0 128 60.2 242 153.8 315.2l-37.5 48c-4.1 5.3-.3 13 6.3 12.9l167-.8c5.2 0 9-4.9 7.7-9.9L369.8 727a8 8 0 00-14.1-3L315 776.1c-10.2-8-20-16.7-29.3-26a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-7.5 7.5-15.3 14.5-23.4 21.2a7.93 7.93 0 00-1.2 11.1l39.4 50.5c2.8 3.5 7.9 4.1 11.4 1.3C854.5 760.8 912 649.1 912 523.9c0-221.1-179.4-400.2-400.6-399.9z`}}]},name:`undo`,theme:`outlined`};function b6(){return b6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,b6({},e,{ref:t,icon:y6}))),S6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`upload`,theme:`outlined`};function C6(){return C6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,C6({},e,{ref:t,icon:S6}))),T6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z`}}]},name:`user`,theme:`outlined`};function E6(){return E6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,E6({},e,{ref:t,icon:T6}))),O6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v576c0 35.3 28.7 64 64 64h592c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM712 792H136V232h576v560zm176-167l-104-59.8V458.9L888 399v226zM208 360h112c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H208c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}}]},name:`video-camera`,theme:`outlined`};function k6(){return k6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,k6({},e,{ref:t,icon:O6}))),j6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 464H528V448h312v128zm0 264H184V184h656v200H496c-17.7 0-32 14.3-32 32v192c0 17.7 14.3 32 32 32h344v200zM580 512a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`wallet`,theme:`outlined`};function M6(){return M6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,M6({},e,{ref:t,icon:j6}))),P6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M690.1 377.4c5.9 0 11.8.2 17.6.5-24.4-128.7-158.3-227.1-319.9-227.1C209 150.8 64 271.4 64 420.2c0 81.1 43.6 154.2 111.9 203.6a21.5 21.5 0 019.1 17.6c0 2.4-.5 4.6-1.1 6.9-5.5 20.3-14.2 52.8-14.6 54.3-.7 2.6-1.7 5.2-1.7 7.9 0 5.9 4.8 10.8 10.8 10.8 2.3 0 4.2-.9 6.2-2l70.9-40.9c5.3-3.1 11-5 17.2-5 3.2 0 6.4.5 9.5 1.4 33.1 9.5 68.8 14.8 105.7 14.8 6 0 11.9-.1 17.8-.4-7.1-21-10.9-43.1-10.9-66 0-135.8 132.2-245.8 295.3-245.8zm-194.3-86.5c23.8 0 43.2 19.3 43.2 43.1s-19.3 43.1-43.2 43.1c-23.8 0-43.2-19.3-43.2-43.1s19.4-43.1 43.2-43.1zm-215.9 86.2c-23.8 0-43.2-19.3-43.2-43.1s19.3-43.1 43.2-43.1 43.2 19.3 43.2 43.1-19.4 43.1-43.2 43.1zm586.8 415.6c56.9-41.2 93.2-102 93.2-169.7 0-124-120.8-224.5-269.9-224.5-149 0-269.9 100.5-269.9 224.5S540.9 847.5 690 847.5c30.8 0 60.6-4.4 88.1-12.3 2.6-.8 5.2-1.2 7.9-1.2 5.2 0 9.9 1.6 14.3 4.1l59.1 34c1.7 1 3.3 1.7 5.2 1.7a9 9 0 006.4-2.6 9 9 0 002.6-6.4c0-2.2-.9-4.4-1.4-6.6-.3-1.2-7.6-28.3-12.2-45.3-.5-1.9-.9-3.8-.9-5.7.1-5.9 3.1-11.2 7.6-14.5zM600.2 587.2c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9c0 19.8-16.2 35.9-36 35.9zm179.9 0c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9a36.08 36.08 0 01-36 35.9z`}}]},name:`wechat`,theme:`outlined`};function F6(){return F6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,F6({},e,{ref:t,icon:P6}))),L6=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},R6=(e=>e?L6(e):L6),z6=e=>e;function B6(e,t=z6){let n=S.useSyncExternalStore(e.subscribe,S.useCallback(()=>t(e.getState()),[e,t]),S.useCallback(()=>t(e.getInitialState()),[e,t]));return S.useDebugValue(n),n}var V6=e=>{let t=R6(e),n=e=>B6(t,e);return Object.assign(n,t),n},H6=(e=>e?V6(e):V6),U6=c(I1(),1),W6=`AES-GCM`,G6=12,K6=128;async function q6(){throw Error(`VITE_ENCRYPTION_KEY not configured`)}async function J6(e){let t=await q6(),n=crypto.getRandomValues(new Uint8Array(G6)),r=new TextEncoder().encode(e),i=await crypto.subtle.encrypt({name:W6,iv:n,tagLength:K6},t,r),a=new Uint8Array(i),o=new Uint8Array(n.length+a.length);return o.set(n),o.set(a,n.length),btoa(String.fromCharCode(...o))}async function Y6(e){let t=await q6(),n=Uint8Array.from(atob(e),e=>e.charCodeAt(0)),r=n.slice(0,G6),i=n.slice(G6),a=await crypto.subtle.decrypt({name:W6,iv:r,tagLength:K6},t,i);return new TextDecoder().decode(a)}var X6=`http://ceshi.apiforeign.minzhong.cn`,Z6=!1;function Q6(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}function $6(e){return Array.isArray(e)?e.map($6):typeof e==`object`&&e?Object.fromEntries(Object.entries(e).map(([e,t])=>[Q6(e),$6(t)])):e}function e8(){return localStorage.getItem(`auth_token`)}function t8(e){localStorage.setItem(`auth_token`,e)}function n8(){localStorage.removeItem(`auth_token`)}async function r8(e){try{return await Y6(e)}catch{return null}}async function i8(e,t={}){let{method:n=`GET`,body:r,auth:i=!0,encryptBody:a=Z6}=t,o={"Content-Type":`application/json`};if(i){let e=e8();e&&(o.Authorization=`Bearer ${e}`)}let s;if(r!==void 0){let e=JSON.stringify(r);a?(o[`X-Encrypted`]=`true`,s=JSON.stringify({data:await J6(e)})):s=e}let c=await fetch(`${X6}/api${e}`,{method:n,headers:o,body:s});if(c.status===204)return;let l=await c.text();if(!l)return;let u;try{u=JSON.parse(l)}catch{throw Error(`响应解析失败 (${c.status})`)}if(u&&typeof u.data==`string`&&a){let e=await r8(u.data);e!==null&&(u=JSON.parse(e))}if(!c.ok){let e=u?.detail||`请求失败 (${c.status})`;throw c.status===401&&(n8(),window.location.pathname!==`/login`&&(window.location.href=`/login`)),Error(e)}return $6(u)}var a8={get:(e,t=!0)=>i8(e,{auth:t}),post:(e,t,n=!0)=>i8(e,{method:`POST`,body:t,auth:n}),put:(e,t,n=!0)=>i8(e,{method:`PUT`,body:t,auth:n}),delete:(e,t=!0)=>i8(e,{method:`DELETE`,auth:t})};async function o8(e,t,n,r){let i=await a8.post(`/auth/admin-login`,{username:e,password:t,captcha_token:n,remember_me:r||!1},!1);return t8(i.accessToken),i.user}async function s8(){await a8.post(`/auth/logout`),n8()}async function c8(){try{return await a8.get(`/auth/me`)}catch{return null}}async function l8(e,t){let n={};e&&(n.start_date=e),t&&(n.end_date=t);let r=new URLSearchParams(n).toString();return a8.get(`/admin/stats${r?`?${r}`:``}`)}async function u8(e=1,t=20,n,r,i){let a=new URLSearchParams;return a.set(`page`,String(e)),a.set(`page_size`,String(t)),n&&a.set(`search`,n),r&&a.set(`user_type`,r),i&&a.set(`frontend_user_kind`,i),a8.get(`/admin/users?${a.toString()}`)}async function d8(e,t){return a8.put(`/admin/users/${e}/frontend-kind`,{frontend_user_kind:t})}async function f8(e,t,n){await a8.post(`/admin/users/${e}/credits`,{amount:t,description:n})}async function p8(e,t){await a8.put(`/admin/users/${e}/status`,{is_active:t})}async function m8(){return a8.get(`/admin/model-configs`)}async function h8(e){return e.id?a8.put(`/admin/model-configs/${e.id}`,e):a8.post(`/admin/model-configs`,e)}async function g8(e){await a8.delete(`/admin/model-configs/${e}`)}async function _8(){return a8.get(`/admin/system-configs`)}async function v8(e,t){await a8.put(`/admin/system-configs/${e}`,{value:t})}async function y8(e,t){let n=new FormData;n.append(`file`,e),n.append(`config_key`,t);let r=localStorage.getItem(`auth_token`),i=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/admin/upload-pdf`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!i.ok){let e=await i.text();throw Error(e||`上传失败`)}return i.json()}async function b8(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/admin/upload-logo`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok){let e=await r.text();throw Error(e||`上传失败`)}return r.json()}function x8(e,t,n){n!=null&&String(n)!==``&&e.set(t,String(n))}async function S8(e){let t=new URLSearchParams;x8(t,`page`,e?.page),x8(t,`page_size`,e?.pageSize),x8(t,`user_id`,e?.userId),x8(t,`user_name`,e?.userName),x8(t,`user_type`,e?.userType),x8(t,`frontend_user_kind`,e?.frontendUserKind),x8(t,`record_type`,e?.recordType||e?.type),x8(t,`credit_subject`,e?.creditSubject),x8(t,`media_type`,e?.mediaType),x8(t,`charge_kind`,e?.chargeKind),x8(t,`source_module`,e?.sourceModule),x8(t,`source_step_code`,e?.sourceStepCode),x8(t,`billing_scene`,e?.billingScene),x8(t,`start_date`,e?.startDate),x8(t,`end_date`,e?.endDate);let n=t.toString()?`?${t}`:``;return a8.get(`/admin/credit-records${n}`)}async function C8(){return a8.get(`/admin/industry-configs`)}async function w8(e){return e.id?a8.put(`/admin/industry-configs/${e.id}`,e):a8.post(`/admin/industry-configs`,e)}async function T8(e){await a8.delete(`/admin/industry-configs/${e}`)}async function E8(){return a8.get(`/admin/video-engines`)}async function D8(e){return e.id?a8.put(`/admin/video-engines/${e.id}`,e):a8.post(`/admin/video-engines`,e)}async function O8(e){await a8.delete(`/admin/video-engines/${e}`)}async function k8(){return a8.get(`/admin/image-engines`)}async function A8(e){return e.id?a8.put(`/admin/image-engines/${e.id}`,e):a8.post(`/admin/image-engines`,e)}async function j8(e){await a8.delete(`/admin/image-engines/${e}`)}async function M8(){return a8.get(`/admin/credit-ratios`)}async function N8(e){return e.id?a8.put(`/admin/credit-ratios/${e.id}`,e):a8.post(`/admin/credit-ratios`,e)}async function P8(e){await a8.delete(`/admin/credit-ratios/${e}`)}async function F8(){return a8.get(`/admin/payment-configs`)}async function I8(e){await a8.put(`/admin/payment-configs/batch`,e)}async function L8(e){let t=new URLSearchParams;e?.paymentMethod&&t.set(`payment_method`,e.paymentMethod),e?.status&&t.set(`status`,e.status),e?.startDate&&t.set(`start_date`,e.startDate),e?.endDate&&t.set(`end_date`,e.endDate);let n=t.toString(),r=n?`/admin/payment-stats?${n}`:`/admin/payment-stats`;return a8.get(r)}async function R8(e){let t=new URLSearchParams;return e?.method&&t.set(`payment_method`,e.method),e?.status&&t.set(`status`,e.status),e?.startDate&&t.set(`start_date`,e.startDate),e?.endDate&&t.set(`end_date`,e.endDate),e?.page&&t.set(`page`,String(e.page)),e?.pageSize&&t.set(`page_size`,String(e.pageSize)),a8.get(`/admin/payment-orders?${t.toString()}`)}async function z8(e){await a8.post(`/admin/payment-orders/${e}/refund`)}async function B8(e=1,t=20){let n=new URLSearchParams;return n.set(`page`,String(e)),n.set(`page_size`,String(t)),a8.get(`/admin/notifications?${n.toString()}`)}async function V8(e){await a8.post(`/admin/notifications`,e)}async function H8(e){await a8.delete(`/admin/notifications/${e}`)}async function U8(e){return a8.get(`/admin/notifications/${e}/read-users`)}async function W8(){return a8.get(`/admin/menu-configs`)}async function G8(e){return e.id?a8.put(`/admin/menu-configs/${e.id}`,e):a8.post(`/admin/menu-configs`,e)}async function K8(e){await a8.delete(`/admin/menu-configs/${e}`)}async function q8(e){return a8.post(`/admin/users`,e)}async function J8(e,t){await a8.put(`/admin/users/${e}/menus`,{allowed_menus:t})}async function Y8(e,t){await a8.put(`/admin/users/${e}/reset-password`,{new_password:t})}async function X8(e,t){await a8.post(`/admin/change-password`,{old_password:e,new_password:t})}async function Z8(){return a8.get(`/auth/site-info`,!1)}async function Q8(){return a8.get(`/admin/recharge-packages`)}async function $8(e){return e.id?a8.put(`/admin/recharge-packages/${e.id}`,e):a8.post(`/admin/recharge-packages`,e)}async function e5(e){await a8.delete(`/admin/recharge-packages/${e}`)}async function t5(e){let t=e?`?page=${e}`:``;return a8.get(`/admin/operation-logs${t}`)}async function n5(e){let t=e?`?page=${e}`:``;return a8.get(`/admin/user-oauth-apps/list${t}`)}async function r5(e){return a8.post(`/admin/user-oauth-apps/create`,e)}async function i5(e){return a8.get(`/admin/user-oauth-apps/read/${e}`)}async function a5(e,t){return a8.post(`/admin/user-oauth-apps/update/${e}`,t)}async function o5(e){await a8.get(`/admin/user-oauth-apps/delete/${e}`)}async function s5(e){let t=new URLSearchParams;e?.page&&t.set(`page`,String(e.page)),e?.page_size&&t.set(`page_size`,String(e.page_size)),e?.type_name&&t.set(`type_name`,e.type_name),e?.open_type&&t.set(`open_type`,String(e.open_type));let n=t.toString();return a8.get(`/open-type/list${n?`?${n}`:``}`)}async function c5(e){return a8.get(`/open-type/select/${e}`)}async function l5(e){return a8.post(`/open-type/create`,e)}async function u5(e,t){return a8.put(`/open-type/update/${e}`,t)}async function d5(e){await a8.delete(`/open-type/delete/${e}`)}async function f5(e){let t=new URLSearchParams;e?.userId&&t.set(`user_id`,e.userId),e?.status&&t.set(`status`,e.status),e?.page&&t.set(`page`,String(e.page)),e?.pageSize&&t.set(`page_size`,String(e.pageSize));let n=t.toString();return a8.get(`/admin/generation-records${n?`?${n}`:``}`)}async function p5(e,t,n){await a8.put(`/admin/generation-records/${e}/status`,{status:t,video_url:n})}async function m5(e,t,n,r){await a8.post(`/admin/generation-records/${e}/generate`,{aspect_ratio:t,resolution:n,image_size:r})}async function h5(){return a8.get(`/generation-ai/engines`)}async function g5(e){let t=new URLSearchParams;e?.genType&&t.set(`gen_type`,e.genType),e?.status&&t.set(`status`,e.status),e?.page&&t.set(`page`,String(e.page)),e?.pageSize&&t.set(`page_size`,String(e.pageSize)),e?.userId&&t.set(`user_id`,e.userId),e?.userName&&t.set(`user_name`,e.userName);let n=t.toString();return a8.get(`/generation-ai/tasks${n?`?${n}`:``}`)}function _5(e,t,n){n==null||String(n).trim()===``||e.set(t,String(n))}async function v5(e){let t=new URLSearchParams;_5(t,`status`,e?.status),_5(t,`keyword`,e?.keyword),_5(t,`user_id`,e?.userId),_5(t,`user_name`,e?.userName),_5(t,`created_start`,e?.createdStart),_5(t,`created_end`,e?.createdEnd),_5(t,`page`,e?.page),_5(t,`page_size`,e?.pageSize);let n=t.toString();return a8.get(`/hot-opening-replications/tasks${n?`?${n}`:``}`)}async function y5(e){return a8.get(`/hot-opening-replications/tasks/${e}`)}async function b5(e){let t=new URLSearchParams;_5(t,`status`,e?.status),_5(t,`analysis_status`,e?.analysisStatus),_5(t,`split_status`,e?.splitStatus),_5(t,`keyword`,e?.keyword),_5(t,`user_id`,e?.userId),_5(t,`user_name`,e?.userName),_5(t,`created_start`,e?.createdStart),_5(t,`created_end`,e?.createdEnd),_5(t,`page`,e?.page),_5(t,`page_size`,e?.pageSize);let n=t.toString();return a8.get(`/shot-replications/task-sets${n?`?${n}`:``}`)}async function x5(e){return a8.get(`/shot-replications/task-sets/${e}`)}async function S5(e,t){let n=new URLSearchParams;_5(n,`source_mode`,t?.sourceMode),_5(n,`split_status`,t?.splitStatus),_5(n,`analysis_status`,t?.analysisStatus),_5(n,`replicate_status`,t?.replicateStatus),_5(n,`page`,t?.page),_5(n,`page_size`,t?.pageSize);let r=n.toString();return a8.get(`/shot-replications/task-sets/${e}/segments${r?`?${r}`:``}`)}async function C5(e){return a8.get(`/shot-replications/segments/${e}`)}async function w5(e){return a8.get(`/shot-replications/projects/${e}`)}async function T5(){return a8.get(`/admin/video-prompt-schema-config`)}async function E5(e){return a8.put(`/admin/video-prompt-schema-config`,e)}async function D5(){return a8.post(`/admin/video-prompt-schema-config/reset-default`)}async function O5(){return a8.get(`/admin/video-prompt-schema-config/export`)}async function k5(e){return a8.post(`/admin/video-prompt-schema-config/import`,e)}async function A5(e){return a8.post(`/admin/video-prompt-schema-config/preview`,e)}async function j5(e){return a8.post(`/user-oauth/request_oauth`,e)}async function M5(e){let t=new URLSearchParams;return e.account_userid&&t.set(`account_userid`,e.account_userid),e.open_type!==void 0&&t.set(`open_type`,String(e.open_type)),e.account_id&&t.set(`account_id`,e.account_id),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),a8.get(`/user-oauth/oauth_list?${t.toString()}`)}async function N5(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/generation-records/upload-image`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok)throw Error(`图片上传失败`);let i=await r.json();return{url:i.url,filename:i.filename}}async function P5(){return a8.get(`/material-consumption/fields`)}async function F5(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.user_id&&t.set(`user_id`,e.user_id),e.consume_date!==void 0&&t.set(`consume_date`,e.consume_date[0]+`,`+e.consume_date[1]),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),a8.get(`/material-consumption/admin/list?${t.toString()}`)}var I5=H6(e=>({user:null,loading:!0,login:async(t,n,r)=>{e({user:await o8(t,n,void 0,r)})},logout:async()=>{await s8(),e({user:null})},checkAuth:async()=>{try{if(!localStorage.getItem(`auth_token`)){e({user:null,loading:!1});return}e({user:await c8(),loading:!1})}catch(t){(t?.message?.includes(`401`)||t?.message?.includes(`Unauthorized`))&&localStorage.removeItem(`auth_token`),e({user:null,loading:!1})}}})),L5=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Q=o(((e,t)=>{t.exports=L5()}))(),{Sider:R5,Content:z5}=wW,B5={HomeOutlined:(0,Q.jsx)(Z2,{}),PlayCircleOutlined:(0,Q.jsx)(J4,{}),WalletOutlined:(0,Q.jsx)(N6,{}),RobotOutlined:(0,Q.jsx)(o3,{}),SettingOutlined:(0,Q.jsx)(D3,{}),BellOutlined:(0,Q.jsx)(f0,{}),UserOutlined:(0,Q.jsx)(D6,{}),AppstoreOutlined:(0,Q.jsx)(G1,{}),FileTextOutlined:(0,Q.jsx)(KV,{}),StarOutlined:(0,Q.jsx)(Z3,{}),HeartOutlined:(0,Q.jsx)(H2,{}),CameraOutlined:(0,Q.jsx)(D0,{}),DashboardOutlined:(0,Q.jsx)(r2,{}),CalculatorOutlined:(0,Q.jsx)(w0,{}),DollarOutlined:(0,Q.jsx)(l2,{}),GiftOutlined:(0,Q.jsx)(I2,{}),ThunderboltOutlined:(0,Q.jsx)(l6,{}),FireOutlined:(0,Q.jsx)(D2,{}),CloudOutlined:(0,Q.jsx)(z0,{}),SmileOutlined:(0,Q.jsx)(H3,{}),TrophyOutlined:(0,Q.jsx)(h6,{}),RocketOutlined:(0,Q.jsx)(l3,{}),BulbOutlined:(0,Q.jsx)(x0,{}),CodeOutlined:(0,Q.jsx)(G0,{}),PictureOutlined:(0,Q.jsx)(H4,{}),VideoCameraOutlined:(0,Q.jsx)(A6,{}),AudioOutlined:(0,Q.jsx)(r0,{}),MailOutlined:(0,Q.jsx)(v4,{}),PhoneOutlined:(0,Q.jsx)(z4,{}),GlobalOutlined:(0,Q.jsx)(z2,{}),ShoppingCartOutlined:(0,Q.jsx)(A3,{}),TeamOutlined:(0,Q.jsx)(o6,{}),BarChartOutlined:(0,Q.jsx)(l0,{}),PieChartOutlined:(0,Q.jsx)(G4,{}),LineChartOutlined:(0,Q.jsx)(o4,{}),SecurityScanOutlined:(0,Q.jsx)(x3,{}),ApiOutlined:(0,Q.jsx)(H1,{}),DatabaseOutlined:(0,Q.jsx)(o2,{}),CloudServerOutlined:(0,Q.jsx)(H0,{}),MenuOutlined:(0,Q.jsx)(w4,{}),PlusOutlined:(0,Q.jsx)(TL,{}),EditOutlined:(0,Q.jsx)(zQ,{}),DeleteOutlined:(0,Q.jsx)(IQ,{}),LockOutlined:(0,Q.jsx)(f4,{}),LogoutOutlined:(0,Q.jsx)(h4,{})},V5=()=>{let e=Ye(),t=Ke(),{user:n,loading:r,logout:i}=I5(),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)(!1),[l]=X.useForm(),[u,d]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`);return e&&JSON.parse(e).siteName||`管理后台`}),[f,p]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`);return e&&JSON.parse(e).siteLogo||``});if((0,S.useEffect)(()=>{Z8().then(e=>{let t=e.siteName||`管理后台`,n=e.siteLogo||``;if(d(t),p(n),document.title=t,localStorage.setItem(`siteInfo`,JSON.stringify({siteName:t,siteLogo:n})),n){let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=n,e.type=`image/png`}}).catch(()=>{})},[]),(0,S.useEffect)(()=>{W8().then(e=>{let t=e.filter(e=>{let t=e.menu_target??e.menuTarget??`admin`;return(e.is_active??e.isActive??!0)&&(t===`admin`||t===`both`)}),r=!!(n?.isAdmin??n?.is_admin);if(n&&!r){let e=n.allowedMenus??n?.allowed_menus;if(e&&Array.isArray(e)&&e.length>0){let n=new Set(e);t=t.filter(e=>(e.menu_type??e.menuType)===`group`?t.some(t=>(t.parent_id??t.parentId)===e.id&&n.has(t.path)):n.has(e.path))}else t=[]}o(t)}).catch(()=>{})},[n]),r)return(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,Q.jsx)(SG,{size:`large`})});if(!n)return(0,Q.jsx)(Ct,{to:`/admin/login`,replace:!0});let m={};a.filter(e=>(e.menu_type??e.menuType)!==`group`&&(e.parent_id??e.parentId)).forEach(e=>{let t=e.parent_id??e.parentId;m[t]||(m[t]=[]),m[t].push(e)});let h=[...a].sort((e,t)=>(e.sort_order??e.sortOrder??0)-(t.sort_order??t.sortOrder??0)),g=[];h.forEach(e=>{let t=e.menu_type??e.menuType,n=e.parent_id??e.parentId;if(t===`group`){let t=(m[e.id]||[]).sort((e,t)=>(e.sort_order??e.sortOrder??0)-(t.sort_order??t.sortOrder??0)).map(e=>({key:e.path,icon:B5[e.icon]||void 0,label:e.label}));t.length>0&&g.push({key:`group-${e.id}`,icon:B5[e.icon]||void 0,label:e.label,children:t})}else n||g.push({key:e.path,icon:B5[e.icon]||void 0,label:e.label})});let _=!!(n?.isAdmin??n?.is_admin);g.length===0&&_&&g.push({key:`/`,icon:(0,Q.jsx)(r2,{}),label:`数据概览`},{key:`/users`,icon:(0,Q.jsx)(D6,{}),label:`用户管理`});let v=t.pathname,y=[];g.forEach(e=>{e.children?e.children.forEach(e=>y.push(e.key)):y.push(e.key)}),y.includes(v)||(v=y.find(e=>v.startsWith(e))||`/`);let b=[];return g.forEach(e=>{e.children&&e.children.some(e=>e.key===v)&&b.push(e.key)}),(0,Q.jsxs)(wW,{style:{minHeight:`100vh`,background:`#f1f5f9`},children:[(0,Q.jsxs)(R5,{width:240,theme:`light`,style:{position:`fixed`,left:16,top:16,bottom:16,width:240,background:`linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,border:`1px solid rgba(0, 0, 0, 0.06)`,zIndex:100},children:[(0,Q.jsxs)(`div`,{style:{height:80,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:12,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`},children:[(0,Q.jsx)(`div`,{style:{width:42,height:42,borderRadius:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,overflow:`hidden`},children:f?(0,Q.jsx)(`img`,{src:f,alt:`logo`,style:{width:28,height:28,objectFit:`contain`}}):(0,Q.jsx)(l6,{style:{fontSize:20,color:`#ffffff`}})}),(0,Q.jsx)(`span`,{style:{color:`#1e293b`,fontSize:17,fontWeight:700,letterSpacing:-.02,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:u})]}),(0,Q.jsx)(`div`,{style:{overflowY:`auto`,maxHeight:`calc(100vh - 200px)`,paddingRight:8},children:(0,Q.jsx)(GE,{mode:`inline`,selectedKeys:[v],defaultOpenKeys:b,items:g,style:{background:`transparent`,border:`none`,paddingTop:8,marginTop:8},onClick:({key:t})=>{t.startsWith(`group-`)||e(t)},theme:`light`})}),(0,Q.jsx)(`div`,{style:{position:`absolute`,bottom:16,left:16,right:16,padding:12,background:`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,borderRadius:12,border:`1px solid rgba(0, 0, 0, 0.06)`},children:(0,Q.jsx)(UV,{menu:{items:[{key:`user`,icon:(0,Q.jsx)(D6,{}),label:n?.username,disabled:!0},{type:`divider`},{key:`changePwd`,icon:(0,Q.jsx)(f4,{}),label:`修改密码`},{key:`logout`,icon:(0,Q.jsx)(h4,{}),label:`退出登录`,danger:!0}],onClick:({key:t})=>{t===`logout`&&(i(),e(`/login`)),t===`changePwd`&&(c(!0),l.resetFields())}},placement:`topRight`,arrow:!0,children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,cursor:`pointer`,padding:`8px 12px`,borderRadius:12,transition:`all 0.25s ease`,background:`transparent`},onMouseEnter:e=>{e.currentTarget.style.background=`#ffffff`,e.currentTarget.style.boxShadow=`0 4px 12px rgba(0, 0, 0, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`,e.currentTarget.style.boxShadow=`none`},children:[(0,Q.jsx)(zw,{size:32,icon:(0,Q.jsx)(D6,{}),style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`}}),(0,Q.jsxs)(`div`,{style:{flex:1,overflow:`hidden`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:13,fontWeight:600,color:`#1e293b`,display:`block`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:n?.username}),(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:_?`管理员`:`普通用户`})]})]})})})]}),(0,Q.jsxs)(wW,{style:{marginLeft:272,marginTop:16,marginRight:16,marginBottom:16,background:`transparent`},children:[(0,Q.jsx)(`div`,{style:{height:72,background:`#ffffff`,borderRadius:`16px 16px 0 0`,boxShadow:`0 2px 12px rgba(0, 0, 0, 0.04)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`0 32px`,fontFamily:`var(--font-sans)`,border:`1px solid rgba(0, 0, 0, 0.06)`,borderBottom:`none`},children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:18,color:`#1e293b`,fontWeight:600},children:g.find(e=>e.key===v)?.label||g.flatMap(e=>e.children||[]).find(e=>e.key===v)?.label||`管理后台`})}),(0,Q.jsx)(z5,{style:{padding:32,background:`#ffffff`,borderRadius:`0 0 16px 16px`,boxShadow:`0 4px 24px rgba(0, 0, 0, 0.06)`,overflow:`auto`,border:`1px solid rgba(0, 0, 0, 0.06)`,borderTop:`none`},children:g.length===0&&!_?(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`60vh`,color:`#94a3b8`},children:[(0,Q.jsx)(f4,{style:{fontSize:48,marginBottom:16,color:`#cbd5e1`}}),(0,Q.jsx)(`div`,{style:{fontSize:16,fontWeight:600,color:`#64748b`},children:`暂无任何权限`}),(0,Q.jsx)(`div`,{style:{fontSize:13,marginTop:8},children:`请联系管理员配置菜单权限`})]}):(0,Q.jsx)(wt,{})})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(f4,{}),`修改密码`]}),open:s,onOk:async()=>{try{let e=await l.validateFields();if(e.newPassword!==e.confirmPassword){LG.error(`两次输入的密码不一致`);return}await X8(e.oldPassword,e.newPassword),LG.success(`密码修改成功`),c(!1),l.resetFields()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`修改失败`)}},onCancel:()=>{c(!1),l.resetFields()},okText:`确认修改`,cancelText:`取消`,width:420,children:(0,Q.jsxs)(X,{form:l,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`oldPassword`,label:`原密码`,rules:[{required:!0,message:`请输入原密码`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请输入原密码`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`newPassword`,label:`新密码`,rules:[{required:!0,min:6,message:`密码至少6位`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`confirmPassword`,label:`确认新密码`,rules:[{required:!0,message:`请再次输入新密码`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请再次输入新密码`,size:`large`})})]})})]})},H5={1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`},U5={1:`巨量`,2:`磁力`,3:`巨量星图`,4:`服务单`,5:`腾讯`},W5=e=>{if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`},G5=()=>{let{message:e}=ox.useApp(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(void 0),[d,f]=(0,S.useState)(1),[p,m]=(0,S.useState)(10),[h,g]=(0,S.useState)(0),[_,v]=(0,S.useState)({account_userid:``,open_type:void 0,account_id:``});(0,S.useEffect)(()=>{y()},[]);let y=async(t=1,r=10,i=_)=>{o(!0);try{let e=await M5({page:t,page_size:r,account_userid:i.account_userid||void 0,open_type:i.open_type,account_id:i.account_id||void 0});e?(e.data&&n(e.data.data||e.data),e.pagination&&(g(e.pagination.total||0),f(e.pagination.page||1),m(e.pagination.pageSize||10))):n(e||[])}catch{e.error(`获取授权列表失败`)}finally{o(!1)}},b=()=>{c(!0)},x=async()=>{if(!l){e.warning(`请选择开户方式`);return}i(!0);try{let t=await j5({open_type:l});t.authUrl?window.open(t.authUrl,`_blank`):e.error(`获取授权链接失败`)}catch{e.error(`请求授权失败`)}finally{i(!1),c(!1),u(void 0)}},C=[{title:`ID`,dataIndex:`id`,key:`id`},{title:`授权账户ID`,dataIndex:`accountId`,key:`accountId`,width:160},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权账户用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,render:e=>(0,Q.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})},{title:`授权账户用户名`,dataIndex:`accountUsername`,key:`accountUsername`},{title:`授权应用ID`,dataIndex:`appid`,key:`appid`},{title:`是否敏感物料授权`,dataIndex:`materialAuthStatus`,key:`materialAuthStatus`,width:100,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`是`:`否`})},{title:`开户方式`,dataIndex:`openType`,key:`openType`,render:e=>(0,Q.jsx)(`span`,{style:{color:`#1e293b`},children:H5[e]||e})},{title:`平台端口`,dataIndex:`portType`,key:`portType`,ellipsis:!0,render:e=>(0,Q.jsx)(`span`,{style:{color:`#1e293b`},children:U5[e]||e})},{title:`用户id`,dataIndex:`userId`,key:`userId`},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,Q.jsx)(`span`,{style:{color:`#64748b`},children:W5(e)})},{title:`更新时间`,dataIndex:`updatedAt`,key:`updatedAt`,width:160,render:e=>(0,Q.jsx)(`span`,{style:{color:`#64748b`},children:W5(e)})},{title:`操作`,key:`action`,width:120,render:(e,t)=>(0,Q.jsx)(vn,{to:`/consume?accountId=${t.id}`,style:{color:`#6366f1`},children:`查看消耗`})}],w=t.map((e,t)=>({...e,index:t+1,key:e.id}));return(0,Q.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(f4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`授权管理`})]}),(0,Q.jsx)(qE,{type:`primary`,size:`medium`,icon:(0,Q.jsx)(TL,{}),onClick:b,loading:r,style:{borderRadius:8,fontSize:14,fontWeight:500},children:`点击授权`})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12,marginBottom:16},children:[(0,Q.jsx)(hW,{placeholder:`账号用户ID`,value:_.account_userid,onChange:e=>v(t=>({...t,account_userid:e.target.value})),style:{width:180},onPressEnter:()=>{f(1),y(1,p)}}),(0,Q.jsx)(RC,{placeholder:`开户方式`,value:_.open_type,onChange:e=>v(t=>({...t,open_type:e})),style:{width:140},options:Object.entries(H5).map(([e,t])=>({value:Number(e),label:t}))}),(0,Q.jsx)(hW,{placeholder:`账号ID`,value:_.account_id,onChange:e=>v(t=>({...t,account_id:e.target.value})),style:{width:180},onPressEnter:()=>{f(1),y(1,p)}}),(0,Q.jsx)(qE,{type:`primary`,size:`medium`,onClick:()=>{f(1),y(1,p)},children:`搜索`}),(0,Q.jsx)(qE,{size:`medium`,onClick:()=>{v({account_userid:``,open_type:void 0,account_id:``}),f(1),y(1,p)},children:`重置`})]}),(0,Q.jsx)(bQ,{dataSource:w,columns:C,loading:a,rowKey:`id`,bordered:!1,scroll:{x:`max-content`},pagination:{current:d,pageSize:p,total:h,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{f(e),m(t),y(e,t)},size:`small`}})]}),(0,Q.jsx)(BG,{title:`选择开户方式`,open:s,onOk:x,onCancel:()=>{c(!1),u(void 0)},okText:`确认授权`,cancelText:`取消`,confirmLoading:r,children:(0,Q.jsx)(RC,{placeholder:`请选择开户方式`,value:l,onChange:e=>u(e),style:{width:`100%`},options:Object.entries(H5).map(([e,t])=>({value:Number(e),label:t}))})})]})},{RangePicker:K5}=YB,q5=e=>e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),J5=()=>{Ye();let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)([]),[u,d]=(0,S.useState)([]),[f,p]=(0,S.useState)(``),[m,h]=(0,S.useState)(1),[g,_]=(0,S.useState)(10),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)();(0,S.useEffect)(()=>{E(),T()},[m,g,C]);let T=async()=>{a(!0);try{let e=await F5({advertiser_id:v||void 0,user_id:b||void 0,consume_date:C,page:m,page_size:g});t(e.data||[]),r(e.pagination?.total||0)}catch{LG.error(`加载数据失败`)}finally{a(!1)}},E=async()=>{try{let e=((await P5()).data||[]).map(e=>({name:q5(e.field),description:e.description}));l(e);let t=localStorage.getItem(`consumeColumns`);d(t?JSON.parse(t):e.map(e=>e.name))}catch{LG.error(`加载表头字段失败`)}},D=e.map((e,t)=>({...e,index:t+1,key:e.id})),O=()=>{h(1),T()},k=()=>{y(``),x(``),w(void 0),h(1),T()},A=u.map(e=>c.find(t=>t.name===e)).filter(e=>!!e).map(e=>({title:e.description,dataIndex:e.name,key:e.name,ellipsis:!0}));return(0,Q.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(l2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`消耗记录`})]}),(0,Q.jsx)(VV,{children:(0,Q.jsx)(qE,{icon:(0,Q.jsx)(D3,{}),onClick:()=>s(!0),children:`自定义表头`})})]}),(0,Q.jsx)(`div`,{style:{marginBottom:16},children:(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(hW,{placeholder:`广告主ID`,value:v,onChange:e=>y(e.target.value),style:{width:200}}),(0,Q.jsx)(hW,{placeholder:`用户ID`,value:b,onChange:e=>x(e.target.value),style:{width:200}}),(0,Q.jsx)(K5,{value:C?[(0,YE.default)(C[0]),(0,YE.default)(C[1])]:void 0,onChange:e=>{e&&e[0]&&e[1]?w([e[0].format(`YYYY-MM-DD`),e[1].format(`YYYY-MM-DD`)]):w(void 0)}}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(NC,{}),onClick:O,children:`搜索`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:k,children:`重置`})]})}),(0,Q.jsx)(bQ,{dataSource:D,columns:A,loading:i,rowKey:`id`,bordered:!1,scroll:{x:`max-content`},pagination:{current:m,pageSize:g,total:n,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,size:`small`,onChange:(e,t)=>{h(e),_(t)}}})]}),(0,Q.jsx)(BG,{title:`自定义表头`,open:o,onOk:()=>{localStorage.setItem(`consumeColumns`,JSON.stringify(u)),LG.success(`表头设置已保存`),s(!1)},onCancel:()=>{s(!1),p(``)},okText:`确定`,cancelText:`取消`,width:800,children:(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:20,height:400},children:[(0,Q.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,Q.jsx)(hW,{placeholder:`搜索指标...`,value:f,allowClear:!0,onChange:e=>p(e.target.value),style:{marginBottom:8}}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,marginBottom:12,display:`block`},children:`输入指标名称进行搜索`}),(0,Q.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:[(0,Q.jsx)(`div`,{style:{marginBottom:16},children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:`任务详情指标`})}),(0,Q.jsx)(oz,{checked:u.length===c.length&&c.length>0,indeterminate:u.length>0&&u.length{e.target.checked?d(c.map(e=>e.name)):d([])},style:{marginBottom:12},children:`全选`}),(0,Q.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:8},children:c.filter(e=>e.description.toLowerCase().includes(f.toLowerCase())||e.name.toLowerCase().includes(f.toLowerCase())).map(e=>(0,Q.jsx)(oz,{checked:u.includes(e.name),onChange:t=>{t.target.checked?d(t=>[...t,e.name]):d(t=>t.filter(t=>t!==e.name))},children:e.description},e.name))})]})]}),(0,Q.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,Q.jsxs)(Z.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:[`已添加(`,u.length,`)`]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{size:`small`,onClick:()=>d([]),disabled:u.length===0,children:`清空`}),(0,Q.jsx)(qE,{size:`small`,onClick:async()=>{try{let e=((await P5()).data||[]).map(e=>({name:q5(e.field),description:e.description}));l(e),d(e.map(e=>e.name)),localStorage.removeItem(`consumeColumns`),LG.success(`表头字段已更新`)}catch{LG.error(`更新表头字段失败`)}},children:`更新表头字段`})]})]}),(0,Q.jsx)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:u.length===0?(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:14,textAlign:`center`,display:`block`,padding:`40px 0`},children:`暂无已选指标`}):(0,Q.jsx)(`div`,{children:u.map((e,t)=>{let n=c.find(t=>t.name===e);return(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`8px 12px`,borderBottom:`1px solid #f0f0f5`,cursor:`move`,userSelect:`none`},draggable:!0,onDragStart:e=>{e.dataTransfer.setData(`index`,String(t))},onDragOver:e=>{e.preventDefault()},onDrop:e=>{let n=parseInt(e.dataTransfer.getData(`index`)),r=t;if(n!==r){let e=[...u],[t]=e.splice(n,1);e.splice(r,0,t),d(e)}},children:[(0,Q.jsx)(Z.Text,{children:n?.description||e}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:t+1})]},e)})})})]})]})})]})},Y5=()=>{let e=Ye(),{login:t}=I5(),[n,r]=(0,S.useState)(!1),i=(()=>{try{let e=localStorage.getItem(`siteInfo`);if(e){let t=JSON.parse(e);return{siteName:t.siteName||`VideoGen.AI`,siteLogo:t.siteLogo||``}}}catch{}return{siteName:`VideoGen.AI`,siteLogo:``}})(),[a,o]=(0,S.useState)(i.siteName),[s,c]=(0,S.useState)(i.siteLogo);return(0,S.useEffect)(()=>{Z8().then(e=>{o(e.siteName),c(e.siteLogo)}).catch(()=>{})},[]),(0,Q.jsxs)(`div`,{style:{minHeight:`100vh`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundImage:`url(/backimage.png)`,backgroundSize:`cover`,backgroundPosition:`center`,backgroundRepeat:`no-repeat`,backgroundAttachment:`fixed`,position:`relative`,overflow:`hidden`},children:[(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(135deg, rgba(240,244,255,0.9) 0%, rgba(232,236,248,0.85) 40%, rgba(240,240,255,0.9) 70%, rgba(248,249,255,0.95) 100%)`}}),(0,Q.jsx)(`div`,{style:{position:`absolute`,width:500,height:500,borderRadius:`50%`,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,top:-150,right:-100,filter:`blur(40px)`}}),(0,Q.jsx)(`div`,{style:{position:`absolute`,width:400,height:400,borderRadius:`50%`,background:`radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%)`,bottom:-100,left:-80,filter:`blur(50px)`}}),(0,Q.jsxs)(PR,{variant:`outlined`,style:{width:440,borderRadius:20,boxShadow:`0 20px 60px rgba(0,0,0,0.08)`,border:`1px solid #e2e8f0`,background:`#fff`,zIndex:1},styles:{body:{padding:`36px 28px`}},children:[(0,Q.jsxs)(`div`,{style:{textAlign:`center`,marginBottom:28},children:[(0,Q.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,margin:`0 auto 16px`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:s?`transparent`:`linear-gradient(135deg, #6366f1, #8b5cf6)`,boxShadow:s?`none`:`0 8px 24px rgba(99,102,241,0.25)`},children:s?(0,Q.jsx)(`img`,{src:s,alt:`logo`,style:{width:`100%`,height:`100%`,borderRadius:14,objectFit:`contain`}}):(0,Q.jsx)(l6,{style:{fontSize:26,color:`#fff`}})}),(0,Q.jsxs)(Z.Title,{level:3,style:{margin:0,color:`#1e293b`,fontWeight:700},children:[a,(0,Q.jsx)(`span`,{style:{color:`#6366f1`},children:`.AI`})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:14,color:`#94a3b8`},children:`管理后台`})]}),(0,Q.jsxs)(X,{onFinish:async n=>{r(!0);try{await t(n.username,n.password,n.rememberMe),LG.success(`登录成功`),e(`/`)}catch(e){let t=e?.message||`登录失败`;LG.error(t)}finally{r(!1)}},layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`username`,rules:[{required:!0,message:`请输入用户名`}],children:(0,Q.jsx)(hW,{placeholder:`用户名`,size:`large`,prefix:(0,Q.jsx)(D6,{style:{color:`#94a3b8`,marginRight:8}}),style:{background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,height:48,borderRadius:10,fontSize:14}})}),(0,Q.jsx)(X.Item,{name:`password`,rules:[{required:!0,message:`请输入密码`}],children:(0,Q.jsx)(hW.Password,{placeholder:`密码`,size:`large`,prefix:(0,Q.jsx)(f4,{style:{color:`#94a3b8`,marginRight:8}}),style:{background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,height:48,borderRadius:10,fontSize:14}})}),(0,Q.jsx)(X.Item,{name:`rememberMe`,valuePropName:`checked`,style:{marginBottom:12},children:(0,Q.jsx)(oz,{children:`记住我的登录状态`})}),(0,Q.jsx)(X.Item,{style:{marginBottom:8},children:(0,Q.jsx)(qE,{type:`primary`,htmlType:`submit`,loading:n,block:!0,size:`large`,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登录管理后台`})})]})]})]})};o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(JE()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_zh_cn=r(n.dayjs)})(e,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`zh-cn`,weekdays:`星期日_星期一_星期二_星期三_星期四_星期五_星期六`.split(`_`),weekdaysShort:`周日_周一_周二_周三_周四_周五_周六`.split(`_`),weekdaysMin:`日_一_二_三_四_五_六`.split(`_`),months:`一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月`.split(`_`),monthsShort:`1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月`.split(`_`),ordinal:function(e,t){return t===`W`?e+`周`:e+`日`},weekStart:1,yearStart:4,formats:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`YYYY/MM/DD`,LL:`YYYY年M月D日`,LLL:`YYYY年M月D日Ah点mm分`,LLLL:`YYYY年M月D日ddddAh点mm分`,l:`YYYY/M/D`,ll:`YYYY年M月D日`,lll:`YYYY年M月D日 HH:mm`,llll:`YYYY年M月D日dddd HH:mm`},relativeTime:{future:`%s内`,past:`%s前`,s:`几秒`,m:`1 分钟`,mm:`%d 分钟`,h:`1 小时`,hh:`%d 小时`,d:`1 天`,dd:`%d 天`,M:`1 个月`,MM:`%d 个月`,y:`1 年`,yy:`%d 年`},meridiem:function(e,t){var n=100*e+t;return n<600?`凌晨`:n<900?`早上`:n<1100?`上午`:n<1300?`中午`:n<1800?`下午`:`晚上`}};return n.default.locale(r,null,!0),r}))}))(),YE.default.locale(`zh-cn`);var X5=()=>{let[e,t]=(0,S.useState)(null),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)([(0,YE.default)().startOf(`day`),(0,YE.default)()]),[o,s]=(0,S.useState)(`数据概览`),c=async()=>{r(!0);try{t(await l8(i[0]?.format(`YYYY-MM-DD`)||void 0,i[1]?.format(`YYYY-MM-DD`)||void 0))}catch{}r(!1)},l=async()=>{try{let e=(await _8()).find(e=>e.key===`site_name`);if(e){let t=`${e.value} 管理后台`;s(t),document.title=t}}catch{s(`数据概览`),document.title=`数据概览`}};(0,S.useEffect)(()=>{c(),l()},[]);let u=()=>{let e=[(0,YE.default)().startOf(`day`),(0,YE.default)()];a(e),m(e)},d=()=>{let e=(0,YE.default)().subtract(1,`day`),t=[e.startOf(`day`),e.endOf(`day`)];a(t),m(t)},f=()=>{let e=[(0,YE.default)().startOf(`week`),(0,YE.default)()];a(e),m(e)},p=()=>{let e=[(0,YE.default)().startOf(`month`),(0,YE.default)()];a(e),m(e)},m=e=>{let n=e[0]?.format(`YYYY-MM-DD`)||void 0,i=e[1]?.format(`YYYY-MM-DD`)||void 0;r(!0),l8(n,i).then(e=>{t(e),r(!1)}).catch(()=>{r(!1)})},h=e=>{e&&(a([e[0],e[1]]),m([e[0],e[1]]))},g=e?[{title:`用户数量`,value:e.totalUsers,lastPeriodValue:e.lastPeriodUsers,icon:(0,Q.jsx)(D6,{}),gradient:`linear-gradient(135deg, #667eea 0%, #764ba2 100%)`,prefix:``,suffix:`位用户`,description:`平台注册用户总数`},{title:`总项目数`,value:e.totalProjects,lastPeriodValue:e.lastPeriodProjects,icon:(0,Q.jsx)(Z4,{}),gradient:`linear-gradient(135deg, #00d4ff 0%, #0099cc 100%)`,prefix:``,suffix:`个项目`,description:`创建的项目总数`},{title:`项目记录`,value:e.totalRecords,lastPeriodValue:e.lastPeriodRecords,icon:(0,Q.jsx)(KV,{}),gradient:`linear-gradient(135deg, #10b981 0%, #059669 100%)`,prefix:``,suffix:`条记录`,description:`项目记录总数`},{title:`创作记录`,value:e.totalGenerations,lastPeriodValue:e.lastPeriodGenerations,icon:(0,Q.jsx)(J4,{}),gradient:`linear-gradient(135deg, #f59e0b 0%, #d97706 100%)`,prefix:``,suffix:`次创作`,description:`AI创作记录总数`}]:[],_=e?[{title:`支付宝收入`,value:e.todayAlipayRevenue,icon:(0,Q.jsx)(N6,{}),gradient:`linear-gradient(135deg, #22c55e 0%, #16a34a 100%)`,prefix:`¥`,suffix:``,description:`支付宝收款`,tag:`支付宝`},{title:`微信收入`,value:e.todayWechatRevenue,icon:(0,Q.jsx)(l2,{}),gradient:`linear-gradient(135deg, #3b82f6 0%, #2563eb 100%)`,prefix:`¥`,suffix:``,description:`微信收款`,tag:`微信支付`},{title:`总收入`,value:e.totalRevenue,lastPeriodValue:e.lastPeriodRevenue,icon:(0,Q.jsx)(e0,{}),gradient:`linear-gradient(135deg, #ec4899 0%, #be185d 100%)`,prefix:`¥`,suffix:``,description:`平台总收入`,tag:`总收入`},{title:`消耗积分`,value:e.creditsConsumedToday,lastPeriodValue:e.lastPeriodCreditsConsumed,icon:(0,Q.jsx)(l2,{}),gradient:`linear-gradient(135deg, #ef4444 0%, #dc2626 100%)`,prefix:``,suffix:`积分`,description:`用户消耗积分`,tag:`积分消耗`}]:[],v=({title:e,value:t,lastPeriodValue:r,icon:i,gradient:a,prefix:o=``,suffix:s=``,description:c,tag:l})=>{let u=r!==void 0&&r>0?((t-r)/r*100).toFixed(1):null,d=u!==null&&parseFloat(u)>=0;return(0,Q.jsx)(PR,{bordered:!1,loading:n,hoverable:!0,style:{borderRadius:16,border:`1px solid rgba(0,0,0,0.04)`,background:`#ffffff`,boxShadow:`0 4px 20px rgba(0,0,0,0.05)`,transition:`all 0.3s ease`,overflow:`hidden`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16,padding:`16px 0`},children:[(0,Q.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:a,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:24,color:`#fff`,flexShrink:0,boxShadow:`0 8px 24px rgba(0,0,0,0.1)`},children:i}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`,fontSize:13},children:e}),l&&(0,Q.jsx)(`span`,{style:{fontSize:10,padding:`2px 8px`,borderRadius:10,background:`rgba(99,102,241,0.1)`,color:`#6366f1`,fontWeight:500},children:l})]}),(0,Q.jsxs)(`div`,{style:{fontSize:28,fontWeight:800,color:`#1e293b`,letterSpacing:-.5,marginBottom:2},children:[o,typeof t==`number`?t.toLocaleString():t,s]}),c&&(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`,fontSize:11},children:c}),u!==null&&r!==void 0&&(0,Q.jsxs)(`div`,{style:{marginTop:8,paddingTop:8,borderTop:`1px solid #f1f5f9`,display:`flex`,alignItems:`center`,gap:8},children:[(0,Q.jsxs)(Z.Text,{style:{color:`#94a3b8`,fontSize:11},children:[`上一周期: `,o,r.toLocaleString(),s]}),(0,Q.jsxs)(`span`,{style:{fontSize:11,fontWeight:500,color:d?`#10b981`:`#ef4444`,display:`flex`,alignItems:`center`,gap:2},children:[d?`↑`:`↓`,` `,Math.abs(parseFloat(u)),`%`]})]})]})]})})};return(0,Q.jsxs)(`div`,{style:{padding:0},children:[(0,Q.jsxs)(`div`,{style:{background:`linear-gradient(135deg, #667eea 0%, #764ba2 100%)`,padding:`24px 24px 32px`,borderRadius:0,marginBottom:-24,position:`relative`,overflow:`hidden`},children:[(0,Q.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`rgba(255,255,255,0.1)`,borderRadius:`50%`}}),(0,Q.jsx)(`div`,{style:{position:`absolute`,bottom:-30,left:-30,width:150,height:150,background:`rgba(255,255,255,0.08)`,borderRadius:`50%`}}),(0,Q.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,Q.jsx)(Z.Title,{level:2,style:{color:`#fff`,marginBottom:4,fontWeight:700},children:o}),(0,Q.jsx)(Z.Text,{style:{color:`rgba(255,255,255,0.8)`,fontSize:14},children:`欢迎回来,查看平台运营数据统计`})]})]}),(0,Q.jsxs)(`div`,{style:{marginTop:40},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,alignItems:`center`,gap:12,flexWrap:`wrap`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{type:!i[0]||!i[1]||i[0]?.isSame((0,YE.default)().startOf(`day`))&&i[1]?.isSame((0,YE.default)(),`day`)?`primary`:`default`,size:`small`,onClick:u,children:`今日`}),(0,Q.jsx)(qE,{type:`default`,size:`small`,onClick:d,children:`昨日`}),(0,Q.jsx)(qE,{type:`default`,size:`small`,onClick:f,children:`本周`}),(0,Q.jsx)(qE,{type:`default`,size:`small`,onClick:p,children:`本月`})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,background:`#fff`,border:`1px solid #e2e8f0`,padding:`6px 12px`,borderRadius:8,boxShadow:`0 1px 2px rgba(0,0,0,0.05)`},children:[(0,Q.jsx)(zB,{style:{color:`#64748b`,fontSize:14}}),(0,Q.jsx)(YB.RangePicker,{value:i,onChange:h,placeholder:[`开始日期`,`结束日期`],size:`small`})]})]}),(0,Q.jsxs)(`div`,{style:{marginBottom:16,paddingLeft:4},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#1e293b`,fontSize:15},children:`核心数据`}),(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`,fontSize:12,marginLeft:8},children:`平台基础运营指标`})]}),(0,Q.jsx)(DK,{gutter:[16,16],children:g.map(e=>(0,Q.jsx)(pz,{xs:12,sm:8,lg:6,children:(0,Q.jsx)(v,{...e})},e.title))})]}),(0,Q.jsxs)(`div`,{style:{marginTop:24},children:[(0,Q.jsxs)(`div`,{style:{marginBottom:16,paddingLeft:4},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#1e293b`,fontSize:15},children:`财务统计`}),(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`,fontSize:12,marginLeft:8},children:`收入与消耗数据`})]}),(0,Q.jsx)(DK,{gutter:[16,16],children:_.map(e=>(0,Q.jsx)(pz,{xs:12,sm:8,lg:6,children:(0,Q.jsx)(v,{...e})},e.title))})]})]})};function Z5(e){if(!e)return`-`;let t=e.trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);return n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``),t.replace(`T`,` `).slice(0,16)}var Q5=e=>e instanceof Error?e:Error(typeof e==`string`?e:`上传失败`),$5=e=>{if(e instanceof File)return e;throw Error(`请选择有效图片文件`)},e7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(20),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(null),[v]=X.useForm(),[y]=X.useForm(),b=async(e,n)=>{a(!0);try{let i=await s5({page:e||o,page_size:n||c});t(i.items||[]),r(i.total||0)}catch{LG.error(`加载开户方式列表失败`)}finally{a(!1)}};(0,S.useEffect)(()=>{b()},[]);let x=async()=>{try{let e=await v.validateFields();console.log(e),await l5({open_type:e.open_type,type_name:e.type_name,description:e.description,thumb:e.thumb}),LG.success(`创建成功`),d(!1),v.resetFields(),b()}catch(e){LG.error(e?.message||`创建失败`)}},C=async e=>{try{_(await c5(e)),p(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},w=async e=>{try{let t=await c5(e);_(t),y.setFieldsValue({open_type:t.open_type,type_name:t.type_name,description:t.description,thumb:t.thumb}),h(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},T=async()=>{if(g)try{let e=await y.validateFields();await u5(g.id,{open_type:e.open_type,type_name:e.type_name,description:e.description,thumb:e.thumb}),LG.success(`更新成功`),h(!1),y.resetFields(),_(null),b()}catch(e){LG.error(e?.message||`更新失败`)}},E=e=>{BG.confirm({title:`确认删除`,content:`确定要删除这个开户方式吗?`,okText:`删除`,okType:`danger`,cancelText:`取消`,onOk:async()=>{try{await d5(e),LG.success(`删除成功`),b()}catch(e){LG.error(e?.message||`删除失败`)}}})};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`平台开户方式管理`})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>d(!0),children:`新增`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>b(),children:`刷新`})]})]}),(0,Q.jsx)(bQ,{columns:[{title:`ID`,dataIndex:`id`,width:100,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`开户类型`,dataIndex:`open_type`,width:100,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`类型名称`,dataIndex:`type_name`,width:150,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`描述`,dataIndex:`description`,width:250,ellipsis:!0,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:e})},{title:`缩略图`,dataIndex:`thumb`,width:120,render:e=>e?(0,Q.jsx)(`img`,{src:e,alt:`thumb`,style:{width:80,height:60,objectFit:`cover`}}):`-`},{title:`创建时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})},{title:`更新时间`,dataIndex:`updatedAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})},{title:`操作`,width:200,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(qU,{}),size:`small`,onClick:()=>C(t.id),children:`详情`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(zQ,{}),size:`small`,onClick:()=>w(t.id),children:`更新`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(IQ,{}),size:`small`,danger:!0,onClick:()=>E(t.id),children:`删除`})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:c,total:n,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{s(e),l(t),b(e,t)}},scroll:{x:1e3}})]}),(0,Q.jsx)(BG,{title:`新增开户方式`,open:u,onOk:x,onCancel:()=>{d(!1),v.resetFields()},okText:`创建`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:v,layout:`vertical`,children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户方式Id`,style:{flex:1},rules:[{required:!0,message:`请输入开户方式Id`}],children:(0,Q.jsx)(oB,{style:{width:`100%`},min:1,placeholder:`请输入开户方式Id`})}),(0,Q.jsx)(X.Item,{name:`type_name`,label:`类型名称`,style:{flex:1},rules:[{required:!0,message:`请输入类型名称`},{max:100,message:`类型名称不能超过100个字符`}],children:(0,Q.jsx)(hW,{style:{width:`100%`},placeholder:`请输入类型名称`})})]}),(0,Q.jsx)(X.Item,{name:`description`,label:`描述`,rules:[{required:!0,message:`请输入描述`}],children:(0,Q.jsx)(hW.TextArea,{placeholder:`请输入描述`,rows:4})}),(0,Q.jsx)(X.Item,{name:`thumb`,label:`缩略图`,children:(0,Q.jsx)(D1,{listType:`picture-card`,customRequest:async({file:e,onSuccess:t,onError:n})=>{try{let n=await N5($5(e));console.log(n),v.setFieldsValue({thumb:n.url}),t?.({url:n.url})}catch(e){n?.(Q5(e))}},children:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(w6,{style:{fontSize:24,color:`#999`}}),(0,Q.jsx)(`div`,{style:{marginTop:8},children:`上传图片`})]})})})]})}),(0,Q.jsx)(BG,{title:`开户方式详情`,open:f,onCancel:()=>{p(!1),_(null)},okText:`关闭`,cancelText:`取消`,width:600,children:g&&(0,Q.jsxs)(`div`,{style:{lineHeight:`2`},children:[(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`ID:`}),` `,g.id]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`开户类型:`}),` `,g.open_type]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`类型名称:`}),` `,g.type_name]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`描述:`}),` `,g.description]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`缩略图:`}),` `,g.thumb?(0,Q.jsx)(`img`,{src:g.thumb,alt:`thumb`,style:{width:120,height:80,objectFit:`cover`}}):`-`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`创建时间:`}),` `,Z5(g.createdAt)]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`更新时间:`}),` `,Z5(g.updatedAt)]})]})}),(0,Q.jsx)(BG,{title:`更新开户方式`,open:m,onOk:T,onCancel:()=>{h(!1),y.resetFields(),_(null)},okText:`更新`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:y,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户类型`,rules:[{required:!0,message:`请输入开户类型`}],children:(0,Q.jsx)(oB,{min:1,placeholder:`请输入开户类型编号`})}),(0,Q.jsx)(X.Item,{name:`type_name`,label:`类型名称`,rules:[{required:!0,message:`请输入类型名称`},{max:100,message:`类型名称不能超过100个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入类型名称`})}),(0,Q.jsx)(X.Item,{name:`description`,label:`描述`,rules:[{required:!0,message:`请输入描述`}],children:(0,Q.jsx)(hW.TextArea,{placeholder:`请输入描述`,rows:4})}),(0,Q.jsx)(X.Item,{name:`thumb`,label:`缩略图`,children:(0,Q.jsx)(D1,{listType:`picture-card`,defaultFileList:g?.thumb?[{uid:`1`,name:`thumb`,status:`done`,url:g.thumb}]:[],customRequest:async({file:e,onSuccess:t,onError:n})=>{try{let n=await N5($5(e));y.setFieldsValue({thumb:n.url}),t?.({url:n.url})}catch(e){n?.(Q5(e))}},children:!y.getFieldValue(`thumb`)&&(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(w6,{style:{fontSize:24,color:`#999`}}),(0,Q.jsx)(`div`,{style:{marginTop:8},children:`上传图片`})]})})})]})})]})},t7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(`frontend`),[c,l]=(0,S.useState)(``),[u,d]=(0,S.useState)({open:!1,user:null}),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(`frontend`),[g,_]=(0,S.useState)({open:!1,user:null}),[v,y]=(0,S.useState)([]),[b,x]=(0,S.useState)([]),[C,w]=(0,S.useState)({open:!1,user:null}),[T]=X.useForm(),[E]=X.useForm(),[D]=X.useForm(),[O,k]=(0,S.useState)(1),[A,j]=(0,S.useState)(20),[M,N]=(0,S.useState)(0),[P,F]=(0,S.useState)([]),[I]=X.useForm(),[L,R]=(0,S.useState)(!1),z=async()=>{r(!0);try{let e=await u8(O,A,i||void 0,o,o===`frontend`&&c||void 0);t(e.items||[]),N(e.total||0)}catch{}r(!1)};(0,S.useEffect)(()=>{z()},[O,A,i,o,c]),(0,S.useEffect)(()=>{(async()=>{try{let e=(await _8()).filter(e=>e.key.startsWith(`user_`)&&e.key.includes(`credits`));F(e);let t={};e.forEach(e=>{t[e.key]=e.value}),I.setFieldsValue(t)}catch{}})()},[]);let B=async()=>{try{let e=await I.validateFields();R(!0);for(let t of P){let n=e[t.key];n!==void 0&&n!==t.value&&await v8(t.id,n??``)}LG.success(`积分配置已保存`),F((await _8()).filter(e=>e.key.startsWith(`user_`)&&e.key.includes(`credits`))),R(!1)}catch(e){R(!1),LG.error(e?.message||`保存失败`)}},V=(e,t)=>{k(e),j(t)},H=()=>z(),U=async()=>{try{let e=await T.validateFields(),{user:t}=u;if(!t)return;await f8(t.id,e.amount,e.description),LG.success(`已${e.amount>0?`增加`:`扣除`} ${Math.abs(e.amount)} 积分`),d({open:!1,user:null}),T.resetFields(),z()}catch{}},W=async e=>{await p8(e.id,!e.isActive),LG.success(e.isActive?`已禁用该用户`:`已启用该用户`),z()},ee=async()=>{try{let e=await E.validateFields(),t=e.user_type||`frontend`;await q8({username:t===`admin`?e.username:void 0,password:e.password,email:e.email||void 0,phone:t===`frontend`?e.phone:e.phone||void 0,credits:e.credits||0,user_type:t,frontend_user_kind:e.frontend_user_kind||`external`}),LG.success(`用户创建成功`),p(!1),E.resetFields(),h(`frontend`),z()}catch{}},te=async e=>{try{let t=await W8(),n=e.userType===`admin`;y(t.filter(e=>{let t=e.menu_target??e.menuTarget??`frontend`;return n?t===`admin`||t===`both`:t===`frontend`||t===`both`})),x(e.allowedMenus||[]),_({open:!0,user:e})}catch{LG.error(`加载菜单失败`)}},ne=v.filter(e=>(e.menu_type??e.menuType)===`group`),re=v.filter(e=>(e.menu_type??e.menuType)!==`group`),ie={};re.filter(e=>e.parent_id??e.parentId).forEach(e=>{let t=e.parent_id??e.parentId;ie[t]||(ie[t]=[]),ie[t].push(e)});let ae=re.filter(e=>!(e.parent_id??e.parentId)),G=async()=>{let{user:e}=g;if(e)try{await J8(e.id,b.length>0?b:null),LG.success(`菜单权限已更新`),_({open:!1,user:null}),z()}catch(e){LG.error(e?.message||`保存失败`)}},oe=async()=>{try{let e=await D.validateFields(),{user:t}=C;if(!t)return;await Y8(t.id,e.newPassword),LG.success(`已重置 ${t.username} 的密码`),w({open:!1,user:null}),D.resetFields()}catch{}},K=async(e,t)=>{try{await d8(e.id,t),LG.success(t===`internal`?`已设为前台内部用户`:`已设为前台外部用户`),z()}catch(e){LG.error(e?.message||`设置失败`)}},se=o===`admin`,ce=[{title:`用户`,key:`user`,width:200,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:t.isAdmin?`linear-gradient(135deg, #f59e0b, #f97316)`:`linear-gradient(135deg, #6366f1, #8b5cf6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:13,fontWeight:700},children:t.username.charAt(0).toUpperCase()}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{fontWeight:600},children:[t.username,t.isAdmin&&(0,Q.jsx)(NQ,{color:`orange`,style:{marginLeft:6,fontSize:10},children:`管理员`})]}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.email})]})]})},...se?[]:[{title:`积分余额`,dataIndex:`credits`,width:120,sorter:(e,t)=>e.credits-t.credits,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,style:{color:e>0?`#10b981`:`#ef4444`,fontSize:15},children:e.toLocaleString()})}],{title:`手机号`,dataIndex:`phone`,width:130,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,children:e||`-`})},...se?[]:[{title:`前台归类`,dataIndex:`frontendUserKind`,width:110,render:e=>(0,Q.jsx)(NQ,{color:e===`internal`?`geekblue`:`default`,children:e===`internal`?`内部用户`:`外部用户`})}],{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`red`,children:e?`正常`:`禁用`})},{title:`注册时间`,dataIndex:`createdAt`,width:120,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})},{title:`最后登录`,dataIndex:`lastLoginAt`,width:140,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})},{title:`操作`,key:`action`,width:320,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[!se&&(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(N6,{}),onClick:()=>{d({open:!0,user:t}),T.resetFields()},children:`调整积分`}),!se&&t.frontendUserKind!==`internal`&&(0,Q.jsx)(qE,{type:`link`,size:`small`,onClick:()=>K(t,`internal`),children:`设为内部`}),!se&&t.frontendUserKind===`internal`&&(0,Q.jsx)(qE,{type:`link`,size:`small`,onClick:()=>K(t,`external`),children:`取消内部`}),(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(w4,{}),onClick:()=>te(t),children:`菜单权限`}),(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(f4,{}),onClick:()=>{w({open:!0,user:t}),D.resetFields()},children:`重置密码`}),(0,Q.jsx)(WG,{title:t.isActive?`确定禁用该用户?`:`确定启用该用户?`,onConfirm:()=>W(t),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:t.isActive,icon:t.isActive?(0,Q.jsx)(e6,{}):(0,Q.jsx)(N0,{}),children:t.isActive?`禁用`:`启用`})})]})}];return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:20},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:`#6366f1`},children:(0,Q.jsx)(D3,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:4,style:{margin:0},children:`积分配置`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`设置用户注册和登录赠送的积分`})]})]}),(0,Q.jsxs)(X,{form:I,layout:`vertical`,children:[(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr 1fr`,gap:20},children:[(0,Q.jsx)(X.Item,{name:`user_register_credits`,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:`注册赠送积分`}),extra:`用户注册时赠送的初始积分`,children:(0,Q.jsx)(oB,{min:0,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`user_login_credits`,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:`每日登录赠送积分`}),extra:`用户每日首次登录赠送的积分`,children:(0,Q.jsx)(oB,{min:0,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`user_login_credits_enabled`,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:`启用每日登录积分`}),extra:`是否开启每日登录赠送积分功能`,children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(Mq,{defaultChecked:P.find(e=>e.key===`user_login_credits_enabled`)?.value===`true`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:13},children:P.find(e=>e.key===`user_login_credits_enabled`)?.value===`true`?`已启用`:`已禁用`})]})})]}),(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:16},children:(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(v3,{}),onClick:B,loading:L,size:`large`,style:{borderRadius:8},children:`保存配置`})})]})]}),(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,Q.jsx)(hW,{placeholder:`搜索用户名或手机号`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),value:i,onChange:e=>a(e.target.value),onPressEnter:H,style:{width:280,borderRadius:8},allowClear:!0}),!se&&(0,Q.jsx)(RC,{value:c,onChange:e=>{k(1),l(e)},style:{width:140},options:[{value:``,label:`全部前台用户`},{value:`internal`,label:`内部用户`},{value:`external`,label:`外部用户`}]}),(0,Q.jsx)(qE,{type:`primary`,onClick:H,style:{borderRadius:8},children:`搜索`})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>{h(o),E.setFieldsValue({user_type:o}),p(!0)},style:{borderRadius:8},children:`创建用户`})]}),(0,Q.jsx)(bR,{activeKey:o,onChange:e=>{s(e),l(``),k(1)},items:[{key:`frontend`,label:`前台用户`},{key:`admin`,label:`后台用户`}]}),(0,Q.jsx)(bQ,{columns:ce,dataSource:e,rowKey:`id`,loading:n,pagination:{current:O,pageSize:A,total:M,onChange:V,showSizeChanger:!0,showTotal:e=>`共 ${e} 个用户`},scroll:{x:1e3}})]}),(0,Q.jsxs)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(N6,{}),`调整积分 - `,u.user?.username]}),open:u.open,onOk:U,onCancel:()=>{d({open:!1,user:null}),T.resetFields()},okText:`确认`,cancelText:`取消`,width:440,children:[(0,Q.jsxs)(`div`,{style:{marginBottom:16,padding:`12px 16px`,background:`#f8fafc`,borderRadius:8},children:[(0,Q.jsx)(`span`,{style:{color:`#64748b`},children:`当前积分:`}),(0,Q.jsx)(`span`,{style:{fontWeight:800,fontSize:18,color:`#6366f1`},children:u.user?.credits.toLocaleString()})]}),(0,Q.jsxs)(X,{form:T,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`amount`,label:`积分变动`,rules:[{required:!0,message:`请输入积分数量`}],children:(0,Q.jsx)(oB,{style:{width:`100%`},size:`large`,placeholder:`正数增加,负数扣除`,formatter:e=>`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,`,`)})}),(0,Q.jsx)(X.Item,{name:`description`,label:`原因`,rules:[{required:!0,message:`请输入调整原因`}],children:(0,Q.jsx)(hW.TextArea,{rows:2,placeholder:`请输入调整原因`,size:`large`})})]})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(D6,{}),`创建用户`]}),open:f,onOk:ee,onCancel:()=>{p(!1),E.resetFields(),h(`frontend`)},okText:`创建`,cancelText:`取消`,width:480,children:(0,Q.jsxs)(X,{form:E,layout:`vertical`,style:{marginTop:16},onValuesChange:e=>{e.user_type&&h(e.user_type)},children:[(0,Q.jsx)(X.Item,{name:`user_type`,label:`用户类型`,initialValue:`frontend`,rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`frontend`,label:`前端用户`},{value:`admin`,label:`后台管理员`}]})}),m===`frontend`&&(0,Q.jsx)(X.Item,{name:`frontend_user_kind`,label:`前台归类`,initialValue:`external`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`external`,label:`外部用户`},{value:`internal`,label:`内部用户`}]})}),m===`frontend`?(0,Q.jsx)(X.Item,{name:`phone`,label:`手机号`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,Q.jsx)(hW,{placeholder:`请输入手机号`,maxLength:11,size:`large`})}):(0,Q.jsx)(X.Item,{name:`username`,label:`用户名`,rules:[{required:!0,message:`请输入用户名`}],children:(0,Q.jsx)(hW,{placeholder:`请输入用户名`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`password`,label:`密码`,rules:[{required:!0,min:6,message:`密码至少6位`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请输入密码(至少6位)`,size:`large`})}),m===`frontend`&&(0,Q.jsx)(X.Item,{name:`credits`,label:`初始积分`,initialValue:0,children:(0,Q.jsx)(oB,{min:0,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`email`,label:`邮箱`,children:(0,Q.jsx)(hW,{placeholder:`选填`,size:`large`})})]})}),(0,Q.jsxs)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w4,{}),`菜单权限 - `,g.user?.username,` (`,g.user?.userType===`admin`?`后台菜单`:`前台菜单`,`)`]}),open:g.open,onOk:G,onCancel:()=>{_({open:!1,user:null})},okText:`保存`,cancelText:`取消`,width:520,children:[(0,Q.jsx)(`div`,{style:{marginBottom:12},children:(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:13},children:`勾选该用户可访问的菜单,不勾选则显示全部菜单`})}),(0,Q.jsx)(`div`,{style:{padding:`12px 16px`,background:`#f8fafc`,borderRadius:8,maxHeight:400,overflow:`auto`},children:(0,Q.jsx)(oz.Group,{value:b,onChange:e=>x(e),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:8,style:{width:`100%`},children:[ae.map(e=>(0,Q.jsxs)(oz,{value:e.path,style:{width:`100%`},children:[e.label,(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,marginLeft:8},children:e.path})]},e.path)),ne.map(e=>{let t=ie[e.id]||[];return t.length===0?null:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{fontWeight:600,fontSize:13,color:`#6366f1`,marginBottom:4,marginTop:4},children:e.label}),(0,Q.jsx)(VV,{direction:`vertical`,size:4,style:{paddingLeft:12,width:`100%`},children:t.map(e=>(0,Q.jsxs)(oz,{value:e.path,style:{width:`100%`},children:[e.label,(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,marginLeft:8},children:e.path})]},e.path))})]},e.id)})]})})})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(f4,{}),`重置密码 - `,C.user?.username]}),open:C.open,onOk:oe,onCancel:()=>{w({open:!1,user:null}),D.resetFields()},okText:`确认重置`,cancelText:`取消`,width:420,children:(0,Q.jsx)(X,{form:D,layout:`vertical`,style:{marginTop:16},children:(0,Q.jsx)(X.Item,{name:`newPassword`,label:`新密码`,rules:[{required:!0,min:6,message:`密码至少6位`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`})})})})]})},n7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)({open:!1,model:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t(await m8())}catch{}r(!1)};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={name:e.name,provider:e.provider,model_name:e.modelName,api_base:e.apiBase,api_key:e.apiKey,weight:e.weight,max_tokens:e.maxTokens,temperature:e.temperature,is_active:e.isActive??!0,priority:e.priority??0};i.model?.id?await h8({id:i.model.id,...t}):await h8(t),LG.success(i.model?.id?`模型配置已更新`:`模型配置已添加`),a({open:!1,model:null}),o.resetFields(),s()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},l=async e=>{try{await g8(e),LG.success(`模型配置已删除`),s()}catch(e){LG.error(e?.message||`删除失败`)}},u=e=>{a({open:!0,model:e||null}),e?o.setFieldsValue(e):(o.resetFields(),o.setFieldsValue({provider:`sdk`,weight:1,maxTokens:4096,temperature:.7,isActive:!0,priority:0}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(Z.Text,{type:`secondary`,children:[`共 `,e.length,` 个模型配置,按权重进行加权随机调度`]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加模型`})]}),(0,Q.jsx)(bQ,{columns:[{title:`模型名称`,dataIndex:`name`,width:150,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:t.isActive?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`linear-gradient(135deg, #94a3b8, #cbd5e1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:14},children:(0,Q.jsx)(o3,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{fontWeight:600},children:e}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.modelName})]})]})},{title:`提供商`,dataIndex:`provider`,width:140,render:e=>(0,Q.jsx)(NQ,{color:e===`mock`?`default`:`blue`,children:{sdk:`SDK模式`,openai_compatible:`OpenAI兼容`,mock:`Mock模式`}[e]||e})},{title:`API地址`,dataIndex:`apiBase`,width:200,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},ellipsis:!0,children:e||`-`})},{title:`权重`,dataIndex:`weight`,width:80,sorter:(e,t)=>e.weight-t.weight},{title:`Max Tokens`,dataIndex:`maxTokens`,width:100},{title:`Temperature`,dataIndex:`temperature`,width:100,render:e=>e.toFixed(1)},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除该模型配置?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(o3,{}),i.model?.id?`编辑模型`:`添加模型`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,model:null}),o.resetFields()},okText:`确认`,cancelText:`取消`,width:560,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`name`,label:`显示名称`,rules:[{required:!0,message:`请输入模型名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:GPT-4o`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`provider`,label:`提供商`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`sdk`,label:`SDK模式`},{value:`openai_compatible`,label:`OpenAI兼容`},{value:`mock`,label:`Mock模式`}]})}),(0,Q.jsx)(X.Item,{name:`modelName`,label:`模型标识`,style:{flex:1},rules:[{required:!0,message:`请输入模型标识`}],children:(0,Q.jsx)(hW,{placeholder:`例如:gpt-4o`,size:`large`})})]}),(0,Q.jsx)(X.Item,{name:`apiBase`,label:`API地址`,children:(0,Q.jsx)(hW,{placeholder:`https://api.openai.com/v1`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`apiKey`,label:`API Key`,children:(0,Q.jsx)(hW.Password,{placeholder:`sk-****`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`weight`,label:`权重`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:0,max:10,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`maxTokens`,label:`Max Tokens`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:256,max:128e3,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`temperature`,label:`Temperature`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:0,max:2,step:.1,style:{width:`100%`},size:`large`})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`priority`,label:`优先级`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:0,max:10,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用`,valuePropName:`checked`,style:{flex:1,paddingTop:30},children:(0,Q.jsx)(Mq,{})})]})]})})]})},r7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(``),[c]=X.useForm(),[l,u]=(0,S.useState)(``);(0,S.useEffect)(()=>{d()},[]);let d=async()=>{r(!0);let e=await _8();t(e);let n={};e.forEach(e=>{n[e.key]=e.value}),c.setFieldsValue(n),r(!1)},f=async()=>{try{let n=await c.validateFields();a(!0);for(let t of e){let e=n[t.key];e!==void 0&&e!==t.value&&await v8(t.id,e??``)}LG.success(`系统配置已保存`),t(await _8()),a(!1)}catch(e){a(!1),LG.error(e?.message||`保存失败`)}},p=async(e,n)=>{s(n);try{let r=await y8(e,n);t(e=>e.map(e=>e.key===n?{...e,value:r.url}:e)),c.setFieldsValue({[n]:r.url}),LG.success(`PDF上传成功`)}catch{LG.error(`上传失败`)}finally{s(``)}return!1},m=async e=>{s(`site_logo`);try{let n=await b8(e);t(e=>e.map(e=>e.key===`site_logo`?{...e,value:n.url}:e)),c.setFieldsValue({site_logo:n.url}),u(n.url),LG.success(`Logo上传成功`)}catch{LG.error(`上传失败`)}finally{s(``)}return!1},h={站点信息:e.filter(e=>e.key.startsWith(`site_`)),协议配置:e.filter(e=>e.key===`user_agreement_url`||e.key===`privacy_policy_url`),"SEO 设置":e.filter(e=>e.key.startsWith(`seo_`)),用户积分配置:e.filter(e=>e.key.startsWith(`user_`)&&e.key.includes(`credits`))},g=e=>({site_name:`平台显示名称,将展示在页面标题和导航栏`,site_logo:`平台Logo图片URL,建议尺寸 200x40px`,user_agreement_url:`用户注册/登录时需同意的用户协议PDF文件`,privacy_policy_url:`用户注册/登录时需同意的隐私政策PDF文件`,seo_title:`搜索引擎结果中显示的标题`,seo_description:`搜索引擎结果中显示的描述文字,建议150字以内`,seo_keywords:`用逗号分隔的关键词列表`,user_register_credits:`用户注册时赠送的初始积分,默认100`,user_login_credits:`用户每日登录赠送的积分数量`,user_login_credits_enabled:`是否启用每日登录赠送积分功能`})[e.key]||e.description||``,_=e=>e.key===`site_logo`?(0,Q.jsx)(v,{config:e}):e.key===`seo_description`?(0,Q.jsx)(hW.TextArea,{rows:3,placeholder:e.description,size:`large`}):e.key===`seo_keywords`?(0,Q.jsx)(hW,{placeholder:`关键词1, 关键词2, 关键词3`,size:`large`}):e.key===`user_login_credits_enabled`?(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(Mq,{defaultChecked:e.value===`true`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:13},children:e.value===`true`?`已启用`:`已禁用`})]}):e.key===`user_register_credits`||e.key===`user_login_credits`?(0,Q.jsx)(hW,{type:`number`,min:0,placeholder:e.description,size:`large`}):(0,Q.jsx)(hW,{placeholder:e.description,size:`large`}),v=({config:e})=>{let n=e.value&&e.value.startsWith(`/uploads/`),r=n?`http://ceshi.apiforeign.minzhong.cn${e.value}`:``;return(0,Q.jsxs)(`div`,{style:{padding:`16px`,borderRadius:10,border:`1px solid #f0f0f5`,background:`#fafbfc`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w6,{style:{color:`#6366f1`,fontSize:18}}),(0,Q.jsx)(Z.Text,{strong:!0,children:`网站Logo`})]}),(0,Q.jsxs)(VV,{children:[n&&(0,Q.jsx)(qE,{size:`small`,danger:!0,onClick:()=>{t(e=>e.map(e=>e.key===`site_logo`?{...e,value:``}:e)),c.setFieldsValue({site_logo:``}),LG.success(`Logo已移除`)},children:`移除`}),(0,Q.jsx)(D1,{accept:`image/*`,showUploadList:!1,beforeUpload:m,children:(0,Q.jsx)(qE,{size:`small`,type:`primary`,icon:(0,Q.jsx)(w6,{}),loading:o===`site_logo`,children:n?`重新上传`:`上传Logo`})})]})]}),n?(0,Q.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,Q.jsx)(`img`,{src:r,alt:`Logo预览`,style:{maxWidth:200,maxHeight:80,objectFit:`contain`,border:`1px solid #e2e8f0`,borderRadius:8,padding:8}}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,display:`block`,marginTop:8},children:`建议尺寸:200x40px,支持 PNG、JPG 格式`})]}):(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:`尚未上传Logo,将使用系统默认Logo`})]})},y=({config:e})=>{let t=e.key===`user_agreement_url`?`用户协议`:`隐私政策`,n=e.value&&e.value.startsWith(`/uploads/`);return(0,Q.jsxs)(`div`,{style:{padding:`16px`,borderRadius:10,border:`1px solid #f0f0f5`,background:`#fafbfc`,marginBottom:12},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(x2,{style:{color:`#ef4444`,fontSize:18}}),(0,Q.jsx)(Z.Text,{strong:!0,children:t})]}),(0,Q.jsxs)(VV,{children:[n&&(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>window.open(`http://localhost:8000${e.value}`,`_blank`),children:`预览`}),(0,Q.jsx)(D1,{accept:`.pdf`,showUploadList:!1,beforeUpload:t=>p(t,e.key),children:(0,Q.jsx)(qE,{size:`small`,type:`primary`,icon:(0,Q.jsx)(w6,{}),loading:o===e.key,children:n?`重新上传`:`上传PDF`})})]})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:n?`已上传: ${e.value}`:`尚未上传,前台将不显示对应链接`})]})};return n?(0,Q.jsx)(PR,{loading:!0,variant:`outlined`,style:{borderRadius:12}}):(0,Q.jsxs)(`div`,{style:{maxWidth:720},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:24},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:`#6366f1`},children:(0,Q.jsx)(D3,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:4,style:{margin:0},children:`系统设置`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`管理站点基础信息、协议文件和SEO配置`})]})]}),(0,Q.jsx)(X,{form:c,layout:`vertical`,children:Object.entries(h).map(([e,t])=>(0,Q.jsxs)(`div`,{style:{marginBottom:24},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14,display:`block`,marginBottom:12,paddingBottom:8,borderBottom:`1px solid #f0f0f5`},children:e}),e===`协议配置`?t.map(e=>(0,Q.jsx)(y,{config:e},e.id)):t.map(e=>(0,Q.jsx)(X.Item,{name:e.key,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:e.description}),extra:g(e),children:_(e)},e.id))]},e))})]}),(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`},children:(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(v3,{}),onClick:f,loading:i,size:`large`,style:{borderRadius:8,minWidth:140},children:`保存配置`})})]})},i7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(!1),[c]=X.useForm(),[l,u]=(0,S.useState)({open:!1,notifId:``,title:``}),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(1),[_,v]=(0,S.useState)(10),[y,b]=(0,S.useState)(0),x=async()=>{r(!0);try{let e=await B8(h,_),n=(await u8(1,1e3)).items||[],r={};n.forEach(e=>{r[e.id]=e.username}),t((e.items||[]).map(e=>({id:e.id,title:e.title,content:e.content,type:e.type,targetUserId:e.userId||null,target:e.userId?r[e.userId]||e.userId:`全部用户`,createdAt:e.createdAt}))),b(e.total||0),a(n.map(e=>({id:e.id,username:e.username})))}catch{LG.error(`加载通知列表失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{x()},[h,_]);let C=(e,t)=>{g(e),v(t)},w=async()=>{try{let e=await c.validateFields();await V8({title:e.title,content:e.content,type:e.type||`system`,target_user_id:e.target_user_id||void 0}),LG.success(`消息已发送`),s(!1),c.resetFields(),x()}catch{}},T=async e=>{try{await H8(e),LG.success(`已删除`),x()}catch(e){LG.error(e?.message||`删除失败`)}},E=async(e,t)=>{u({open:!0,notifId:e,title:t}),m(!0);try{f((await U8(e)).items||[])}catch{LG.error(`加载已读列表失败`)}finally{m(!1)}},D=e=>{switch(e){case`system`:return`blue`;case`credit`:return`orange`;case`promo`:return`purple`;default:return`default`}};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(f0,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`消息推送管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[`共 `,y,` 条消息`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>s(!0),style:{borderRadius:8},children:`发送新消息`})]}),(0,Q.jsx)(bQ,{columns:[{title:`标题`,dataIndex:`title`,width:200,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`内容`,dataIndex:`content`,ellipsis:!0},{title:`类型`,dataIndex:`type`,width:80,render:e=>(0,Q.jsx)(NQ,{color:D(e),children:{system:`系统`,credit:`积分`,promo:`活动`}[e]||e})},{title:`发送目标`,dataIndex:`target`,width:120,render:e=>(0,Q.jsx)(NQ,{color:e===`全部用户`?`green`:`blue`,children:e})},{title:`发送时间`,dataIndex:`createdAt`,width:160,render:e=>Z5(e)},{title:`操作`,key:`action`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>E(t.id,t.title),children:`已读`}),(0,Q.jsx)(WG,{title:`确定删除该消息?`,onConfirm:()=>T(t.id),children:(0,Q.jsx)(qE,{type:`link`,danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:{current:h,pageSize:_,total:y,onChange:C,showSizeChanger:!0,showTotal:e=>`共 ${e} 条消息`},scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w3,{}),`发送消息`]}),open:o,onOk:w,onCancel:()=>{s(!1),c.resetFields()},okText:`发送`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`title`,label:`消息标题`,rules:[{required:!0,message:`请输入标题`}],children:(0,Q.jsx)(hW,{placeholder:`请输入消息标题`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`content`,label:`消息内容`,rules:[{required:!0,message:`请输入内容`}],children:(0,Q.jsx)(hW.TextArea,{rows:4,placeholder:`请输入消息内容`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`type`,label:`消息类型`,style:{flex:1},initialValue:`system`,rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`system`,label:`系统通知`},{value:`credit`,label:`积分通知`},{value:`promo`,label:`活动通知`}]})}),(0,Q.jsx)(X.Item,{name:`target_user_id`,label:`发送目标`,style:{flex:1},extra:`留空则发送给全部用户`,children:(0,Q.jsx)(RC,{size:`large`,allowClear:!0,placeholder:`全部用户`,options:i.map(e=>({value:e.id,label:e.username}))})})]})]})}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(o6,{}),`已读用户 — `,l.title]}),open:l.open,onCancel:()=>{u({open:!1,notifId:``,title:``}),f([])},footer:null,width:480,children:p?(0,Q.jsx)(`div`,{style:{textAlign:`center`,padding:40},children:`加载中...`}):d.length===0?(0,Q.jsx)(pC,{description:`暂无用户已读`,style:{padding:`40px 0`}}):(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{marginBottom:12,color:`#64748b`,fontSize:13},children:[`共 `,d.length,` 人已读`]}),(0,Q.jsx)(bQ,{dataSource:d,rowKey:`userId`,pagination:!1,size:`small`,columns:[{title:`用户名`,dataIndex:`username`,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`已读时间`,dataIndex:`readAt`,width:180,render:e=>Z5(e)}]})]})})]})},a7=o(((e,t)=>{var n={version:`1.15.0`};n[437]=(function(){for(var e=`\0\x07\b + `]:{zIndex:10,width:r,margin:`0 ${Y(e.marginXXS)}`,fontSize:r,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,color:i,"&:hover":{color:i},svg:{verticalAlign:`baseline`}}},[`${s}-thumbnail, ${s}-thumbnail img`]:{position:`static`,display:`block`,width:`100%`,height:`100%`,objectFit:`contain`},[`${s}-name`]:{display:`none`,textAlign:`center`},[`${s}-file + ${s}-name`]:{position:`absolute`,bottom:e.margin,display:`block`,width:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`},[`${s}-uploading`]:{[`&${s}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:`none`}},[`${s}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}},[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:`50%`}}}},Z$=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:`rtl`}}},Q$=e=>{let{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:{...Jc(e),[t]:{outline:0,"input[type='file']":{cursor:`pointer`}},[`${t}-select`]:{display:`inline-block`},[`${t}-hidden`]:{display:`none`},[`${t}-disabled`]:{color:n,cursor:`not-allowed`}}}},$$=rl(`Upload`,e=>{let{fontSizeHeading3:t,marginXS:n,lineWidth:r,pictureCardSize:i,calc:a}=e,o=gs(e,{uploadThumbnailSize:a(t).mul(2).equal(),uploadProgressOffset:a(a(n).div(2)).add(r).equal(),uploadPicCardSize:i});return[Q$(o),K$(o),Y$(o),X$(o),q$(o),J$(o),Z$(o),bh(o)]},e=>({actionsColor:e.colorIcon,pictureCardSize:e.controlHeightLG*2.55})),e1={icon:function(e,t){return{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M534 352V136H232v752h560V394H576a42 42 0 01-42-42z`,fill:t}},{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z`,fill:e}}]}},name:`file`,theme:`twotone`};function t1(){return t1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,t1({},e,{ref:t,icon:e1}))),r1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z`}}]},name:`paper-clip`,theme:`outlined`};function i1(){return i1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,i1({},e,{ref:t,icon:r1}))),o1={icon:function(e,t){return{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z`,fill:e}},{tag:`path`,attrs:{d:`M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z`,fill:t}},{tag:`path`,attrs:{d:`M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z`,fill:t}},{tag:`path`,attrs:{d:`M276 368a28 28 0 1056 0 28 28 0 10-56 0z`,fill:t}},{tag:`path`,attrs:{d:`M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`,fill:e}}]}},name:`picture`,theme:`twotone`};function s1(){return s1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,s1({},e,{ref:t,icon:o1})));function l1(e){return{...e,lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e}}function u1(e,t){let n=Zr(t),r=n.findIndex(({uid:t})=>t===e.uid);return r===-1?n.push(e):n[r]=e,n}function d1(e,t){let n=e.uid===void 0?`name`:`uid`;return t.filter(t=>t[n]===e[n])[0]}function f1(e,t){let n=e.uid===void 0?`name`:`uid`,r=t.filter(t=>t[n]!==e[n]);return r.length===t.length?null:r}var p1=(e=``)=>{let t=e.split(`/`),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[``])[0]},m1=e=>e.indexOf(`image/`)===0,h1=e=>{if(e.type&&!e.thumbUrl)return m1(e.type);let t=e.thumbUrl||e.url||``,n=p1(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n)?!0:!(/^data:/.test(t)||n)},g1=200;function _1(e){return new Promise(t=>{if(!e.type||!m1(e.type)){t(``);return}let n=document.createElement(`canvas`);n.width=g1,n.height=g1,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${g1}px; height: ${g1}px; z-index: 9999; display: none;`,document.body.appendChild(n);let r=n.getContext(`2d`),i=new Image;if(i.onload=()=>{let{width:e,height:a}=i,o=g1,s=g1,c=0,l=0;e>a?(s=g1/e*a,l=-(s-o)/2):(o=g1/a*e,c=-(o-s)/2),r.drawImage(i,c,l,o,s);let u=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(i.src),t(u)},i.crossOrigin=`anonymous`,e.type.startsWith(`image/svg+xml`)){let t=new FileReader;t.onload=()=>{t.result&&typeof t.result==`string`&&(i.src=t.result)},t.readAsDataURL(e)}else if(e.type.startsWith(`image/gif`)){let n=new FileReader;n.onload=()=>{n.result&&t(n.result)},n.readAsDataURL(e)}else i.src=window.URL.createObjectURL(e)})}var v1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`download`,theme:`outlined`};function y1(){return y1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,y1({},e,{ref:t,icon:v1}))),x1=S.forwardRef(({prefixCls:e,className:t,style:n,classNames:r,styles:i,locale:a,listType:o,file:s,items:c,progress:l,iconRender:u,actionIconRender:d,itemRender:f,isImgUrl:p,showPreviewIcon:m,showRemoveIcon:h,showDownloadIcon:g,previewIcon:_,removeIcon:v,downloadIcon:y,extra:b,onPreview:x,onDownload:C,onClose:w},T)=>{let{status:E}=s,[D,O]=S.useState(E);S.useEffect(()=>{E!==`removed`&&O(E)},[E]);let[k,A]=S.useState(!1);S.useEffect(()=>{let e=setTimeout(()=>{A(!0)},300);return()=>{clearTimeout(e)}},[]);let j=u(s),M=S.createElement(`div`,{className:`${e}-icon`},j);if(o===`picture`||o===`picture-card`||o===`picture-circle`)if(D===`uploading`||!s.thumbUrl&&!s.url){let t=J(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:D!==`uploading`});M=S.createElement(`div`,{className:t},j)}else{let t=p?.(s)?S.createElement(`img`,{src:s.thumbUrl||s.url,alt:s.name,className:`${e}-list-item-image`,crossOrigin:s.crossOrigin}):j,n=J(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:p&&!p(s)});M=S.createElement(`a`,{className:n,onClick:e=>x(s,e),href:s.url||s.thumbUrl,target:`_blank`,rel:`noopener noreferrer`},t)}let N=J(`${e}-list-item`,`${e}-list-item-${D}`,r?.item),P=typeof s.linkProps==`string`?JSON.parse(s.linkProps):s.linkProps,F=(typeof h==`function`?h(s):h)?d((typeof v==`function`?v(s):v)||S.createElement(IQ,null),()=>w(s),e,a.removeFile,!0):null,I=(typeof g==`function`?g(s):g)&&D===`done`?d((typeof y==`function`?y(s):y)||S.createElement(b1,null),()=>C(s),e,a.downloadFile):null,L=o!==`picture-card`&&o!==`picture-circle`&&S.createElement(`span`,{key:`download-delete`,className:J(`${e}-list-item-actions`,{picture:o===`picture`})},I,F),R=typeof b==`function`?b(s):b,z=R&&S.createElement(`span`,{className:`${e}-list-item-extra`},R),B=J(`${e}-list-item-name`),V=s.url?S.createElement(`a`,{key:`view`,target:`_blank`,rel:`noopener noreferrer`,className:B,title:s.name,...P,href:s.url,onClick:e=>x(s,e)},s.name,z):S.createElement(`span`,{key:`view`,className:B,onClick:e=>x(s,e),title:s.name},s.name,z),H=(typeof m==`function`?m(s):m)&&(s.url||s.thumbUrl)?S.createElement(`a`,{href:s.url||s.thumbUrl,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>x(s,e),title:a.previewFile},typeof _==`function`?_(s):_||S.createElement(qU,null)):null,U=(o===`picture-card`||o===`picture-circle`)&&D!==`uploading`&&S.createElement(`span`,{className:`${e}-list-item-actions`},H,D===`done`&&I,F),{getPrefixCls:W}=S.useContext(oi),ee=W(),te=S.createElement(`div`,{className:N,style:i?.item},M,V,L,U,k&&S.createElement(Iu,{motionName:`${ee}-fade`,visible:D===`uploading`,motionDeadline:2e3},({className:t})=>{let n=`percent`in s?S.createElement(CK,{type:`line`,percent:s.percent,"aria-label":s[`aria-label`],"aria-labelledby":s[`aria-labelledby`],...l}):null;return S.createElement(`div`,{className:J(`${e}-list-item-progress`,t)},n)})),ne=s.response&&typeof s.response==`string`?s.response:s.error?.statusText||s.error?.message||a.uploadError,re=D===`error`?S.createElement(Ow,{title:ne,getPopupContainer:e=>e.parentNode},te):te;return S.createElement(`div`,{className:J(`${e}-list-item-container`,t),style:n,ref:T},f?f(re,s,c,{download:C.bind(null,s),preview:x.bind(null,s),remove:w.bind(null,s)}):re)}),S1=S.forwardRef((e,t)=>{let{listType:n=`text`,previewFile:r=_1,onPreview:i,onDownload:a,onRemove:o,locale:s,iconRender:c,isImageUrl:l=h1,prefixCls:u,items:d=[],showPreviewIcon:f=!0,showRemoveIcon:p=!0,showDownloadIcon:m=!1,removeIcon:h,previewIcon:g,downloadIcon:_,extra:v,progress:y={size:[-1,2],showInfo:!1},appendAction:b,appendActionVisible:x=!0,itemRender:C,disabled:w,classNames:T,styles:E}=e,[,D]=Ed(),[O,k]=S.useState(!1),A=[`picture-card`,`picture-circle`].includes(n);S.useEffect(()=>{n.startsWith(`picture`)&&(d||[]).forEach(e=>{!(e.originFileObj instanceof File||e.originFileObj instanceof Blob)||e.thumbUrl!==void 0||(e.thumbUrl=``,r?.(e.originFileObj).then(t=>{e.thumbUrl=t||``,D()}))})},[n,d,r]),S.useEffect(()=>{k(!0)},[]);let j=(e,t)=>{if(i)return t?.preventDefault(),i(e)},M=e=>{typeof a==`function`?a(e):e.url&&window.open(e.url)},N=e=>{o?.(e)},P=e=>{if(c)return c(e,n);let t=e.status===`uploading`;if(n.startsWith(`picture`)){let r=n===`picture`?S.createElement(xm,null):s.uploading,i=l?.(e)?S.createElement(c1,null):S.createElement(n1,null);return t?r:i}return t?S.createElement(xm,null):S.createElement(a1,null)},F=(e,t,n,r,i)=>{let a={type:`text`,size:`small`,title:r,onClick:n=>{t(),S.isValidElement(e)&&e.props.onClick?.(n)},className:`${n}-list-item-action`,disabled:i?w:!1};return S.isValidElement(e)?S.createElement(Zg,{...a,icon:Pp(e,{...e.props,onClick:()=>{}})}):S.createElement(Zg,{...a},S.createElement(`span`,null,e))};S.useImperativeHandle(t,()=>({handlePreview:j,handleDownload:M}));let{getPrefixCls:I}=S.useContext(oi),L=I(`upload`,u),R=I(),z=J(`${L}-list`,`${L}-list-${n}`,T?.list),B=S.useMemo(()=>Sr(Wm(R),[`onAppearEnd`,`onEnterEnd`,`onLeaveEnd`]),[R]),V={...A?{}:B,motionDeadline:2e3,motionName:`${L}-${A?`animate-inline`:`animate`}`,keys:Zr(d.map(e=>({key:e.uid,file:e}))),motionAppear:O};return S.createElement(`div`,{className:z,style:E?.list},S.createElement(Fu,{...V,component:!1},({key:e,file:t,className:r,style:i})=>S.createElement(x1,{key:e,locale:s,prefixCls:L,className:r,style:i,classNames:T,styles:E,file:t,items:d,progress:y,listType:n,isImgUrl:l,showPreviewIcon:f,showRemoveIcon:p,showDownloadIcon:m,removeIcon:h,previewIcon:g,downloadIcon:_,extra:v,iconRender:P,actionIconRender:F,itemRender:C,onPreview:j,onDownload:M,onClose:N})),b&&S.createElement(Iu,{...V,visible:x,forceRender:!0},({className:e,style:t})=>Pp(b,n=>({className:J(n.className,e),style:{...t,pointerEvents:e?`none`:void 0,...n.style}}))))}),C1=`__LIST_IGNORE_${Date.now()}__`,w1=S.forwardRef((e,t)=>{let n=li(`upload`),{fileList:r,defaultFileList:i,onRemove:a,showUploadList:o=!0,listType:s=`text`,onPreview:c,onDownload:l,onChange:u,onDrop:d,previewFile:f,disabled:p,locale:m,iconRender:h,isImageUrl:g,progress:_,prefixCls:v,className:y,type:b=`select`,children:x,style:C,itemRender:w,maxCount:T,data:E={},multiple:D=!1,hasControlInside:O=!0,action:k=``,accept:A=``,supportServerRender:j=!0,rootClassName:M,styles:N,classNames:P}=e,F=S.useContext(zp),I=p??F,L=e.customRequest||n.customRequest,[R,z]=Hn(i,r),B=R||[],[V,H]=S.useState(`drop`),U=S.useRef(null),W=S.useRef(null);S.useMemo(()=>{let e=Date.now();(r||[]).forEach((t,n)=>{!t.uid&&!Object.isFrozen(t)&&(t.uid=`__AUTO__${e}_${n}__`)})},[r]);let ee=(e,t,n)=>{let r=Zr(t),i=!1;T===1?r=r.slice(-1):T&&(i=r.length>T,r=r.slice(0,T)),(0,Jf.flushSync)(()=>{z(r)});let a={file:e,fileList:r};n&&(a.event=n),(!i||e.status===`removed`||r.some(t=>t.uid===e.uid))&&(0,Jf.flushSync)(()=>{u?.(a)})},te=async(t,n)=>{let{beforeUpload:r}=e,i=t;if(r){let e=await r(t,n);if(e===!1)return!1;if(delete t[C1],e===C1)return Object.defineProperty(t,C1,{value:!0,configurable:!0}),!1;hd(e)&&(i=e)}return i},ne=e=>{let t=e.filter(e=>!e.file[C1]);if(!t.length)return;let n=t.map(e=>l1(e.file)),r=Zr(B);n.forEach(e=>{r=u1(e,r)}),n.forEach((e,n)=>{let i=e;if(t[n].parsedFile)e.status=`uploading`;else{let{originFileObj:t}=e,n;try{n=new File([t],t.name,{type:t.type})}catch{n=new Blob([t],{type:t.type}),n.name=t.name,n.lastModifiedDate=new Date,n.lastModified=new Date().getTime()}n.uid=e.uid,i=n}ee(i,r)})},re=(e,t,n)=>{try{typeof e==`string`&&(e=JSON.parse(e))}catch{}if(!d1(t,B))return;let r=l1(t);r.status=`done`,r.percent=100,r.response=e,r.xhr=n,ee(r,u1(r,B))},ie=(e,t)=>{if(!d1(t,B))return;let n=l1(t);n.status=`uploading`,n.percent=e.percent,ee(n,u1(n,B),e)},ae=(e,t,n)=>{if(!d1(n,B))return;let r=l1(n);r.error=e,r.response=t,r.status=`error`,ee(r,u1(r,B))},G=e=>{let t;Promise.resolve(typeof a==`function`?a(e):a).then(n=>{if(n===!1)return;let r=f1(e,B);r&&(t={...e,status:`removed`},B?.forEach(e=>{let n=t.uid===void 0?`name`:`uid`;e[n]===t[n]&&!Object.isFrozen(e)&&(e.status=`removed`)}),U.current?.abort(t),ee(t,r))})},oe=e=>{H(e.type),e.type===`drop`&&d?.(e)};S.useImperativeHandle(t,()=>({onBatchStart:ne,onSuccess:re,onProgress:ie,onError:ae,fileList:B,upload:U.current,nativeElement:W.current}));let{getPrefixCls:K,direction:se,className:ce,style:q,classNames:le,styles:ue}=li(`upload`),de=K(`upload`,v),fe={...e,listType:s,showUploadList:o,type:b,multiple:D,hasControlInside:O,supportServerRender:j,disabled:I},[pe,me]=Fd([le,P],[ue,N],{props:fe}),he={onBatchStart:ne,onError:ae,onProgress:ie,onSuccess:re,...e,customRequest:L,data:E,multiple:D,action:k,accept:A,supportServerRender:j,prefixCls:de,disabled:I,beforeUpload:te,onChange:void 0,hasControlInside:O};delete he.className,delete he.style,(!x||I)&&delete he.id;let ge=`${de}-wrapper`,[_e,ve]=$$(de,ge),[ye]=cd(`Upload`,td.Upload),{showRemoveIcon:be,showPreviewIcon:xe,showDownloadIcon:Se,removeIcon:Ce,previewIcon:we,downloadIcon:Te,extra:Ee}=typeof o==`boolean`?{}:o,De=be===void 0?!I:be,Oe=(e,t)=>o?S.createElement(S1,{classNames:pe,styles:me,prefixCls:de,listType:s,items:B,previewFile:f,onPreview:c,onDownload:l,onRemove:G,showRemoveIcon:De,showPreviewIcon:xe,showDownloadIcon:Se,removeIcon:Ce,previewIcon:we,downloadIcon:Te,iconRender:h,extra:Ee,locale:{...ye,...m},isImageUrl:g,progress:_,appendAction:e,appendActionVisible:t,itemRender:w,disabled:I}):e,ke=J(ge,y,M,_e,ve,ce,pe.root,{[`${de}-rtl`]:se===`rtl`,[`${de}-picture-card-wrapper`]:s===`picture-card`,[`${de}-picture-circle-wrapper`]:s===`picture-circle`}),Ae={...me.root},je={...q,...C};if(b===`drag`){let e=J(_e,de,`${de}-drag`,{[`${de}-drag-uploading`]:B.some(e=>e.status===`uploading`),[`${de}-drag-hover`]:V===`dragover`,[`${de}-disabled`]:I,[`${de}-rtl`]:se===`rtl`},pe.trigger);return S.createElement(`span`,{className:ke,ref:W,style:Ae},S.createElement(`div`,{className:e,style:{...je,...me.trigger},onDrop:oe,onDragOver:oe,onDragLeave:oe},S.createElement(G$,{...he,ref:U,className:`${de}-btn`},S.createElement(`div`,{className:`${de}-drag-container`},x))),Oe())}let Me=J(de,`${de}-select`,{[`${de}-disabled`]:I,[`${de}-hidden`]:!x},pe.trigger),Ne=S.createElement(`div`,{className:Me,style:{...je,...me.trigger}},S.createElement(G$,{...he,ref:U}));return s===`picture-card`||s===`picture-circle`?S.createElement(`span`,{className:ke,ref:W,style:Ae},Oe(Ne,!!x)):S.createElement(`span`,{className:ke,ref:W,style:Ae},Ne,Oe())}),T1=S.forwardRef((e,t)=>{let{style:n,height:r,hasControlInside:i=!1,children:a,...o}=e,s={...n,height:r};return S.createElement(w1,{ref:t,hasControlInside:i,...o,style:s,type:`drag`},a)}),E1=w1;E1.Dragger=T1,E1.LIST_IGNORE=C1;var D1=o(((e,t)=>{function n(e){return e&&e.__esModule?e:{default:e}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),O1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default={items_per_page:`条/页`,jump_to:`跳至`,jump_to_confirm:`确定`,page:`页`,prev_page:`上一页`,next_page:`下一页`,prev_5:`向前 5 页`,next_5:`向后 5 页`,prev_3:`向前 3 页`,next_3:`向后 3 页`,page_size:`页码`}})),k1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.commonLocale=void 0,e.commonLocale={yearFormat:`YYYY`,dayFormat:`D`,cellMeridiemFormat:`A`,monthBeforeYear:!0}})),A1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=k1();function n(e){"@babel/helpers - typeof";return n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n(e)}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default={placeholder:`请选择时间`,rangePlaceholder:[`开始时间`,`结束时间`]}})),M1=o((e=>{var t=D1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(A1()),r=t(j1()),i={lang:{placeholder:`请选择日期`,yearPlaceholder:`请选择年份`,quarterPlaceholder:`请选择季度`,monthPlaceholder:`请选择月份`,weekPlaceholder:`请选择周`,rangePlaceholder:[`开始日期`,`结束日期`],rangeYearPlaceholder:[`开始年份`,`结束年份`],rangeMonthPlaceholder:[`开始月份`,`结束月份`],rangeQuarterPlaceholder:[`开始季度`,`结束季度`],rangeWeekPlaceholder:[`开始周`,`结束周`],...n.default},timePickerLocale:{...r.default}};i.lang.ok=`确定`,e.default=i})),N1=o((e=>{var t=D1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=t(M1()).default})),P1=o((e=>{var t=D1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(O1()),r=t(N1()),i=t(M1()),a=t(j1()),o="${label}不是一个有效的${type}";e.default={locale:`zh-cn`,Pagination:n.default,DatePicker:i.default,TimePicker:a.default,Calendar:r.default,global:{placeholder:`请选择`,close:`关闭`,sortable:`可排序`},Table:{filterTitle:`筛选`,filterConfirm:`确定`,filterReset:`重置`,filterEmptyText:`无筛选项`,filterCheckAll:`全选`,filterSearchPlaceholder:`在筛选项中搜索`,emptyText:`暂无数据`,selectAll:`全选当页`,selectInvert:`反选当页`,selectNone:`清空所有`,selectionAll:`全选所有`,sortTitle:`排序`,expand:`展开行`,collapse:`关闭行`,triggerDesc:`点击降序`,triggerAsc:`点击升序`,cancelSort:`取消排序`},Modal:{okText:`确定`,cancelText:`取消`,justOkText:`知道了`},Tour:{Next:`下一步`,Previous:`上一步`,Finish:`结束导览`},Popconfirm:{cancelText:`取消`,okText:`确定`},Transfer:{titles:[``,``],searchPlaceholder:`请输入搜索内容`,itemUnit:`项`,itemsUnit:`项`,remove:`删除`,selectCurrent:`全选当页`,removeCurrent:`删除当页`,selectAll:`全选所有`,deselectAll:`取消全选`,removeAll:`删除全部`,selectInvert:`反选当页`},Upload:{uploading:`文件上传中`,removeFile:`删除文件`,uploadError:`上传错误`,previewFile:`预览文件`,downloadFile:`下载文件`},Empty:{description:`暂无数据`},Icon:{icon:`图标`},Text:{edit:`编辑`,copy:`复制`,copied:`复制成功`,expand:`展开`,collapse:`收起`},Form:{optional:`(可选)`,defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:o,method:o,array:o,object:o,number:o,date:o,boolean:o,integer:o,float:o,regexp:o,email:o,url:o,hex:o},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},QRCode:{expired:`二维码过期`,refresh:`点击刷新`,scanned:`已扫描`},ColorPicker:{presetEmpty:`暂无`,transparent:`无色`,singleColor:`单色`,gradientColor:`渐变色`}}})),F1=o(((e,t)=>{t.exports=P1()})),I1={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.42 0 448 200.58 448 448S759.42 960 512 960 64 759.42 64 512 264.58 64 512 64m32.5 168c-69.67 0-86.06 16.84-86.72 39.08l-.02 1.43v46.62H291.45c-9.92 0-14.28 23.05-14.27 39.3 0 2.7 2.08 4.93 4.77 4.93h175.81v58.3h-116.5c-9.96 0-14.3 23.76-14.27 39.47a4.77 4.77 0 004.77 4.76h233.45c-4.53 41.06-15.43 77.59-30.72 109.32l-1.22 2.5-.32-.28c-60.24-28.47-120.43-52.57-194.4-52.57l-2.62.01c-84.98 1.11-144.71 56.5-145.91 127.04l-.02 1.22.02 2.13c1.24 70.4 63.56 126.45 148.52 126.45 61.25 0 116.38-16.85 163.46-45.02a138.58 138.58 0 0014.07-7.96 345.6 345.6 0 0050.3-41.16l9.45 6.35 12.46 8.32c57.53 38.26 113.76 72.62 169.86 79.27a142.62 142.62 0 0018.31 1.16c43.02 0 55-52.68 57.39-95.51l.14-2.84c.4-8.46-6.2-15.6-14.65-15.86-75.46-2.37-136.45-22.05-192-46.11l-6.27-2.75c35.15-56.8 56.66-121.81 57.15-186.66l.09-1.08c.4-5.51-4-10.2-9.52-10.2H549.33v-58.3h165.73c9.92 0 14.28-22.12 14.27-39.31a4.85 4.85 0 00-4.78-4.92H549.32v-82.35a4.8 4.8 0 00-4.83-4.78M328 583.85c54.63 0 107.08 22.41 158.1 52.19l5.76 3.4c-103.57 119.84-247.17 95.9-261.72 26.37a66.89 66.89 0 01-1.14-9.83l-.06-2.34.02-.9c.97-40.12 45.33-68.9 99.04-68.9`}}]},name:`alipay-circle`,theme:`outlined`};function L1(){return L1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,L1({},e,{ref:t,icon:I1}))),z1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z`}}]},name:`api`,theme:`outlined`};function B1(){return B1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,B1({},e,{ref:t,icon:z1}))),H1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z`}}]},name:`appstore`,theme:`outlined`};function U1(){return U1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,U1({},e,{ref:t,icon:H1}))),G1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z`}}]},name:`arrow-down`,theme:`outlined`};function K1(){return K1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,K1({},e,{ref:t,icon:G1}))),J1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`arrow-left`,theme:`outlined`};function Y1(){return Y1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Y1({},e,{ref:t,icon:J1}))),Z1={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z`}}]},name:`arrow-up`,theme:`outlined`};function Q1(){return Q1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Q1({},e,{ref:t,icon:Z1}))),e0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z`}}]},name:`audio`,theme:`outlined`};function t0(){return t0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,t0({},e,{ref:t,icon:e0}))),r0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z`}}]},name:`bank`,theme:`outlined`};function i0(){return i0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,i0({},e,{ref:t,icon:r0}))),o0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z`}}]},name:`bar-chart`,theme:`outlined`};function s0(){return s0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,s0({},e,{ref:t,icon:o0}))),l0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M816 768h-24V428c0-141.1-104.3-257.7-240-277.1V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.9c-135.7 19.4-240 136-240 277.1v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48zM304 768V428c0-55.6 21.6-107.8 60.9-147.1S456.4 220 512 220c55.6 0 107.8 21.6 147.1 60.9S720 372.4 720 428v340H304z`}}]},name:`bell`,theme:`outlined`};function u0(){return u0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,u0({},e,{ref:t,icon:l0}))),f0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z`}}]},name:`book`,theme:`outlined`};function p0(){return p0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,p0({},e,{ref:t,icon:f0}))),h0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M916 210H376c-17.7 0-32 14.3-32 32v236H108c-17.7 0-32 14.3-32 32v272c0 17.7 14.3 32 32 32h540c17.7 0 32-14.3 32-32V546h236c17.7 0 32-14.3 32-32V242c0-17.7-14.3-32-32-32zm-504 68h200v200H412V278zm-68 468H144V546h200v200zm268 0H412V546h200v200zm268-268H680V278h200v200z`}}]},name:`build`,theme:`outlined`};function g0(){return g0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,g0({},e,{ref:t,icon:h0}))),v0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z`}}]},name:`bulb`,theme:`outlined`};function y0(){return y0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,y0({},e,{ref:t,icon:v0}))),x0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M251.2 387H320v68.8c0 1.8 1.8 3.2 4 3.2h48c2.2 0 4-1.4 4-3.3V387h68.8c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H376v-68.8c0-1.8-1.8-3.2-4-3.2h-48c-2.2 0-4 1.4-4 3.2V331h-68.8c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm328 0h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm0 265h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm0 104h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm-195.7-81l61.2-74.9c4.3-5.2.7-13.1-5.9-13.1H388c-2.3 0-4.5 1-5.9 2.9l-34 41.6-34-41.6a7.85 7.85 0 00-5.9-2.9h-50.9c-6.6 0-10.2 7.9-5.9 13.1l61.2 74.9-62.7 76.8c-4.4 5.2-.8 13.1 5.8 13.1h50.8c2.3 0 4.5-1 5.9-2.9l35.5-43.5 35.5 43.5c1.5 1.8 3.7 2.9 5.9 2.9h50.8c6.6 0 10.2-7.9 5.9-13.1L383.5 675zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-36 732H180V180h664v664z`}}]},name:`calculator`,theme:`outlined`};function S0(){return S0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,S0({},e,{ref:t,icon:x0}))),w0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 248H728l-32.4-90.8a32.07 32.07 0 00-30.2-21.2H358.6c-13.5 0-25.6 8.5-30.1 21.2L296 248H160c-44.2 0-80 35.8-80 80v456c0 44.2 35.8 80 80 80h704c44.2 0 80-35.8 80-80V328c0-44.2-35.8-80-80-80zm8 536c0 4.4-3.6 8-8 8H160c-4.4 0-8-3.6-8-8V328c0-4.4 3.6-8 8-8h186.7l17.1-47.8 22.9-64.2h250.5l22.9 64.2 17.1 47.8H864c4.4 0 8 3.6 8 8v456zM512 384c-88.4 0-160 71.6-160 160s71.6 160 160 160 160-71.6 160-160-71.6-160-160-160zm0 256c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z`}}]},name:`camera`,theme:`outlined`};function T0(){return T0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,T0({},e,{ref:t,icon:w0}))),D0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M380 704h264c4.4 0 8-3.6 8-8v-84c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v36H428v-36c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v84c0 4.4 3.6 8 8 8zm340-123a40 40 0 1080 0 40 40 0 10-80 0zm239-167.6L935.3 372a8 8 0 00-10.9-2.9l-50.7 29.6-78.3-216.2a63.9 63.9 0 00-60.9-44.4H301.2c-34.7 0-65.5 22.4-76.2 55.5l-74.6 205.2-50.8-29.6a8 8 0 00-10.9 2.9L65 413.4c-2.2 3.8-.9 8.6 2.9 10.8l60.4 35.2-14.5 40c-1.2 3.2-1.8 6.6-1.8 10v348.2c0 15.7 11.8 28.4 26.3 28.4h67.6c12.3 0 23-9.3 25.6-22.3l7.7-37.7h545.6l7.7 37.7c2.7 13 13.3 22.3 25.6 22.3h67.6c14.5 0 26.3-12.7 26.3-28.4V509.4c0-3.4-.6-6.8-1.8-10l-14.5-40 60.3-35.2a8 8 0 003-10.8zM840 517v237H184V517l15.6-43h624.8l15.6 43zM292.7 218.1l.5-1.3.4-1.3c1.1-3.3 4.1-5.5 7.6-5.5h427.6l75.4 208H220l72.7-199.9zM224 581a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`car`,theme:`outlined`};function O0(){return O0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,O0({},e,{ref:t,icon:D0}))),A0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z`}},{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}}]},name:`check-circle`,theme:`outlined`};function j0(){return j0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,j0({},e,{ref:t,icon:A0}))),N0={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z`}}]},name:`close-circle`,theme:`outlined`};function P0(){return P0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,P0({},e,{ref:t,icon:N0}))),I0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M811.4 418.7C765.6 297.9 648.9 212 512.2 212S258.8 297.8 213 418.6C127.3 441.1 64 519.1 64 612c0 110.5 89.5 200 199.9 200h496.2C870.5 812 960 722.5 960 612c0-92.7-63.1-170.7-148.6-193.3zm36.3 281a123.07 123.07 0 01-87.6 36.3H263.9c-33.1 0-64.2-12.9-87.6-36.3A123.3 123.3 0 01140 612c0-28 9.1-54.3 26.2-76.3a125.7 125.7 0 0166.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10c54.3 14.5 92.1 63.8 92.1 120 0 33.1-12.9 64.3-36.3 87.7z`}}]},name:`cloud`,theme:`outlined`};function L0(){return L0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,L0({},e,{ref:t,icon:I0}))),z0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z`}},{tag:`path`,attrs:{d:`M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z`}},{tag:`path`,attrs:{d:`M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z`}}]},name:`cloud-server`,theme:`outlined`};function B0(){return B0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,B0({},e,{ref:t,icon:z0}))),H0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`code`,theme:`outlined`};function U0(){return U0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,U0({},e,{ref:t,icon:H0}))),G0={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M275 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm613 144H768c0-39.8-32.2-72-72-72H200c-39.8 0-72 32.2-72 72v248c0 3.4.2 6.7.7 9.9-.5 7-.7 14-.7 21.1 0 176.7 143.3 320 320 320 160.1 0 292.7-117.5 316.3-271H888c39.8 0 72-32.2 72-72V497c0-39.8-32.2-72-72-72zM696 681h-1.1c.7 7.6 1.1 15.2 1.1 23 0 137-111 248-248 248S200 841 200 704c0-7.8.4-15.4 1.1-23H200V425h496v256zm192-8H776V497h112v176zM613 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm-170 0c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36z`}}]},name:`coffee`,theme:`outlined`};function K0(){return K0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,K0({},e,{ref:t,icon:G0}))),J0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm198.4-588.1a32 32 0 00-24.5.5L414.9 415 296.4 686c-3.6 8.2-3.6 17.5 0 25.7 3.4 7.8 9.7 13.9 17.7 17 3.8 1.5 7.7 2.2 11.7 2.2 4.4 0 8.7-.9 12.8-2.7l271-118.6 118.5-271a32.06 32.06 0 00-17.7-42.7zM576.8 534.4l26.2 26.2-42.4 42.4-26.2-26.2L380 644.4 447.5 490 422 464.4l42.4-42.4 25.5 25.5L644.4 380l-67.6 154.4zM464.4 422L422 464.4l25.5 25.6 86.9 86.8 26.2 26.2 42.4-42.4-26.2-26.2-86.8-86.9z`}}]},name:`compass`,theme:`outlined`};function Y0(){return Y0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Y0({},e,{ref:t,icon:J0}))),Z0={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z`}}]},name:`crown`,theme:`outlined`};function Q0(){return Q0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Q0({},e,{ref:t,icon:Z0}))),e2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z`}}]},name:`dashboard`,theme:`outlined`};function t2(){return t2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,t2({},e,{ref:t,icon:e2}))),r2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`database`,theme:`outlined`};function i2(){return i2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,i2({},e,{ref:t,icon:r2}))),o2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm47.7-395.2l-25.4-5.9V348.6c38 5.2 61.5 29 65.5 58.2.5 4 3.9 6.9 7.9 6.9h44.9c4.7 0 8.4-4.1 8-8.8-6.1-62.3-57.4-102.3-125.9-109.2V263c0-4.4-3.6-8-8-8h-28.1c-4.4 0-8 3.6-8 8v33c-70.8 6.9-126.2 46-126.2 119 0 67.6 49.8 100.2 102.1 112.7l24.7 6.3v142.7c-44.2-5.9-69-29.5-74.1-61.3-.6-3.8-4-6.6-7.9-6.6H363c-4.7 0-8.4 4-8 8.7 4.5 55 46.2 105.6 135.2 112.1V761c0 4.4 3.6 8 8 8h28.4c4.4 0 8-3.6 8-8.1l-.2-31.7c78.3-6.9 134.3-48.8 134.3-124-.1-69.4-44.2-100.4-109-116.4zm-68.6-16.2c-5.6-1.6-10.3-3.1-15-5-33.8-12.2-49.5-31.9-49.5-57.3 0-36.3 27.5-57 64.5-61.7v124zM534.3 677V543.3c3.1.9 5.9 1.6 8.8 2.2 47.3 14.4 63.2 34.4 63.2 65.1 0 39.1-29.4 62.6-72 66.4z`}}]},name:`dollar`,theme:`outlined`};function s2(){return s2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,s2({},e,{ref:t,icon:o2}))),l2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}},{tag:`path`,attrs:{d:`M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z`}}]},name:`exclamation-circle`,theme:`outlined`};function u2(){return u2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,u2({},e,{ref:t,icon:l2}))),f2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 472a40 40 0 1080 0 40 40 0 10-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 01-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z`}}]},name:`experiment`,theme:`outlined`};function p2(){return p2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,p2({},e,{ref:t,icon:f2}))),h2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z`}}]},name:`file-image`,theme:`outlined`};function g2(){return g2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,g2({},e,{ref:t,icon:h2}))),v2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z`}}]},name:`file-pdf`,theme:`outlined`};function y2(){return y2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,y2({},e,{ref:t,icon:v2}))),x2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z`}}]},name:`filter`,theme:`outlined`};function S2(){return S2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,S2({},e,{ref:t,icon:x2}))),w2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9zM713 808.5c-53.7 53.2-125 82.4-201 82.4s-147.3-29.2-201-82.4c-53.5-53.1-83-123.5-83-198.4 0-43.5 9.8-85.2 29.1-124 18.8-37.9 46.8-71.8 80.8-97.9a349.6 349.6 0 0058.6-56.8c25-30.5 44.6-64.5 58.2-101a240 240 0 0012.1-46.5c24.1 22.2 44.3 49 61.2 80.4 33.4 62.6 48.8 118.3 45.8 165.7a74.01 74.01 0 0024.4 59.8 73.36 73.36 0 0053.4 18.8c19.7-1 37.8-9.7 51-24.4 13.3-14.9 24.8-30.1 34.4-45.6 14 17.9 25.7 37.4 35 58.4 15.9 35.8 24 73.9 24 113.1 0 74.9-29.5 145.4-83 198.4z`}}]},name:`fire`,theme:`outlined`};function T2(){return T2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,T2({},e,{ref:t,icon:w2}))),D2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 305H624V192c0-17.7-14.3-32-32-32H184v-40c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v784c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V640h248v113c0 17.7 14.3 32 32 32h416c17.7 0 32-14.3 32-32V337c0-17.7-14.3-32-32-32zM184 568V232h368v336H184zm656 145H504v-73h112c4.4 0 8-3.6 8-8V377h216v336z`}}]},name:`flag`,theme:`outlined`};function O2(){return O2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,O2({},e,{ref:t,icon:D2}))),A2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M920 416H616c-4.4 0-8 3.6-8 8v112c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-56h60v320h-46c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h164c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8h-46V480h60v56c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V424c0-4.4-3.6-8-8-8zM656 296V168c0-4.4-3.6-8-8-8H104c-4.4 0-8 3.6-8 8v128c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-64h168v560h-92c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-92V232h168v64c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8z`}}]},name:`font-size`,theme:`outlined`};function j2(){return j2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,j2({},e,{ref:t,icon:A2}))),N2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 310H732.4c13.6-21.4 21.6-46.8 21.6-74 0-76.1-61.9-138-138-138-41.4 0-78.7 18.4-104 47.4-25.3-29-62.6-47.4-104-47.4-76.1 0-138 61.9-138 138 0 27.2 7.9 52.6 21.6 74H144c-17.7 0-32 14.3-32 32v200c0 4.4 3.6 8 8 8h40v344c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V550h40c4.4 0 8-3.6 8-8V342c0-17.7-14.3-32-32-32zm-334-74c0-38.6 31.4-70 70-70s70 31.4 70 70-31.4 70-70 70h-70v-70zm-138-70c38.6 0 70 31.4 70 70v70h-70c-38.6 0-70-31.4-70-70s31.4-70 70-70zM180 482V378h298v104H180zm48 68h250v308H228V550zm568 308H546V550h250v308zm48-376H546V378h298v104z`}}]},name:`gift`,theme:`outlined`};function P2(){return P2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,P2({},e,{ref:t,icon:N2}))),I2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z`}}]},name:`global`,theme:`outlined`};function L2(){return L2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,L2({},e,{ref:t,icon:I2}))),z2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z`}}]},name:`heart`,theme:`outlined`};function B2(){return B2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,B2({},e,{ref:t,icon:z2}))),H2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M957.6 507.4L603.2 158.2a7.9 7.9 0 00-11.2 0L353.3 393.4a8.03 8.03 0 00-.1 11.3l.1.1 40 39.4-117.2 115.3a8.03 8.03 0 00-.1 11.3l.1.1 39.5 38.9-189.1 187H72.1c-4.4 0-8.1 3.6-8.1 8V860c0 4.4 3.6 8 8 8h344.9c2.1 0 4.1-.8 5.6-2.3l76.1-75.6 40.4 39.8a7.9 7.9 0 0011.2 0l117.1-115.6 40.1 39.5a7.9 7.9 0 0011.2 0l238.7-235.2c3.4-3 3.4-8 .3-11.2zM389.8 796.2H229.6l134.4-133 80.1 78.9-54.3 54.1zm154.8-62.1L373.2 565.2l68.6-67.6 171.4 168.9-68.6 67.6zM713.1 658L450.3 399.1 597.6 254l262.8 259-147.3 145z`}}]},name:`highlight`,theme:`outlined`};function U2(){return U2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,U2({},e,{ref:t,icon:H2}))),G2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z`}}]},name:`history`,theme:`outlined`};function K2(){return K2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,K2({},e,{ref:t,icon:G2}))),J2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z`}}]},name:`home`,theme:`outlined`};function Y2(){return Y2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Y2({},e,{ref:t,icon:J2}))),Z2={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136V232h752v560zM610.3 476h123.4c1.3 0 2.3-3.6 2.3-8v-48c0-4.4-1-8-2.3-8H610.3c-1.3 0-2.3 3.6-2.3 8v48c0 4.4 1 8 2.3 8zm4.8 144h185.7c3.9 0 7.1-3.6 7.1-8v-48c0-4.4-3.2-8-7.1-8H615.1c-3.9 0-7.1 3.6-7.1 8v48c0 4.4 3.2 8 7.1 8zM224 673h43.9c4.2 0 7.6-3.3 7.9-7.5 3.8-50.5 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H522a8 8 0 008-8.4c-2.8-53.3-32-99.7-74.6-126.1a111.8 111.8 0 0029.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 00-74.6 126.1c-.4 4.6 3.2 8.4 7.8 8.4zm149-262c28.5 0 51.7 23.3 51.7 52s-23.2 52-51.7 52-51.7-23.3-51.7-52 23.2-52 51.7-52z`}}]},name:`idcard`,theme:`outlined`};function Q2(){return Q2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Q2({},e,{ref:t,icon:Z2}))),e4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M956.9 845.1L896.4 632V168c0-17.7-14.3-32-32-32h-704c-17.7 0-32 14.3-32 32v464L67.9 845.1C60.4 866 75.8 888 98 888h828.8c22.2 0 37.6-22 30.1-42.9zM200.4 208h624v395h-624V208zm228.3 608l8.1-37h150.3l8.1 37H428.7zm224 0l-19.1-86.7c-.8-3.7-4.1-6.3-7.8-6.3H398.2c-3.8 0-7 2.6-7.8 6.3L371.3 816H151l42.3-149h638.2l42.3 149H652.7z`}}]},name:`laptop`,theme:`outlined`};function t4(){return t4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,t4({},e,{ref:t,icon:e4}))),r4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z`}}]},name:`line-chart`,theme:`outlined`};function i4(){return i4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,i4({},e,{ref:t,icon:r4}))),o4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z`}}]},name:`link`,theme:`outlined`};function s4(){return s4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,s4({},e,{ref:t,icon:o4}))),l4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z`}}]},name:`lock`,theme:`outlined`};function u4(){return u4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,u4({},e,{ref:t,icon:l4}))),f4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z`}}]},name:`logout`,theme:`outlined`};function p4(){return p4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,p4({},e,{ref:t,icon:f4}))),h4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z`}}]},name:`mail`,theme:`outlined`};function g4(){return g4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,g4({},e,{ref:t,icon:h4}))),v4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M839.2 278.1a32 32 0 00-30.4-22.1H736V144c0-17.7-14.3-32-32-32H320c-17.7 0-32 14.3-32 32v112h-72.8a31.9 31.9 0 00-30.4 22.1L112 502v378c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V502l-72.8-223.9zM360 184h304v72H360v-72zm480 656H184V513.4L244.3 328h535.4L840 513.4V840zM652 572H544V464c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v108H372c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h108v108c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V636h108c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z`}}]},name:`medicine-box`,theme:`outlined`};function y4(){return y4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,y4({},e,{ref:t,icon:v4}))),x4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z`}}]},name:`menu`,theme:`outlined`};function S4(){return S4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,S4({},e,{ref:t,icon:x4}))),w4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z`}}]},name:`message`,theme:`outlined`};function T4(){return T4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,T4({},e,{ref:t,icon:w4}))),D4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z`}},{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}}]},name:`minus-circle`,theme:`outlined`};function O4(){return O4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,O4({},e,{ref:t,icon:D4}))),A4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`mobile`,theme:`outlined`};function j4(){return j4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,j4({},e,{ref:t,icon:A4}))),N4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M692.8 412.7l.2-.2-34.6-44.3a7.97 7.97 0 00-11.2-1.4l-50.4 39.3-70.5-90.1a7.97 7.97 0 00-11.2-1.4l-37.9 29.7a7.97 7.97 0 00-1.4 11.2l70.5 90.2-.2.1 34.6 44.3c2.7 3.5 7.7 4.1 11.2 1.4l50.4-39.3 64.1 82c2.7 3.5 7.7 4.1 11.2 1.4l37.9-29.6c3.5-2.7 4.1-7.7 1.4-11.2l-64.1-82.1zM608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5L114.3 856.1a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6C473 696.1 537.7 720 608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644s-118.2-23.7-161.2-66.8C403.7 534.2 380 476.9 380 416s23.7-118.2 66.8-161.2c43-43.1 100.3-66.8 161.2-66.8s118.2 23.7 161.2 66.8c43.1 43 66.8 100.3 66.8 161.2s-23.7 118.2-66.8 161.2z`}}]},name:`monitor`,theme:`outlined`};function P4(){return P4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,P4({},e,{ref:t,icon:N4}))),I4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm159.6-585h-59.5c-3 0-5.8 1.7-7.1 4.4l-90.6 180H511l-90.6-180a8 8 0 00-7.1-4.4h-60.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.9L457 515.7h-61.4c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V603h-81.7c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V717c0 4.4 3.6 8 8 8h54.3c4.4 0 8-3.6 8-8v-68.1h82c4.4 0 8-3.6 8-8V611c0-4.4-3.6-8-8-8h-82v-41.5h82c4.4 0 8-3.6 8-8v-29.9c0-4.4-3.6-8-8-8h-62l111.1-204.8c.6-1.2 1-2.5 1-3.8-.1-4.4-3.7-8-8.1-8z`}}]},name:`pay-circle`,theme:`outlined`};function L4(){return L4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,L4({},e,{ref:t,icon:I4}))),z4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M877.1 238.7L770.6 132.3c-13-13-30.4-20.3-48.8-20.3s-35.8 7.2-48.8 20.3L558.3 246.8c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l89.6 89.7a405.46 405.46 0 01-86.4 127.3c-36.7 36.9-79.6 66-127.2 86.6l-89.6-89.7c-13-13-30.4-20.3-48.8-20.3a68.2 68.2 0 00-48.8 20.3L132.3 673c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l106.4 106.4c22.2 22.2 52.8 34.9 84.2 34.9 6.5 0 12.8-.5 19.2-1.6 132.4-21.8 263.8-92.3 369.9-198.3C818 606 888.4 474.6 910.4 342.1c6.3-37.6-6.3-76.3-33.3-103.4zm-37.6 91.5c-19.5 117.9-82.9 235.5-178.4 331s-213 158.9-330.9 178.4c-14.8 2.5-30-2.5-40.8-13.2L184.9 721.9 295.7 611l119.8 120 .9.9 21.6-8a481.29 481.29 0 00285.7-285.8l8-21.6-120.8-120.7 110.8-110.9 104.5 104.5c10.8 10.8 15.8 26 13.3 40.8z`}}]},name:`phone`,theme:`outlined`};function B4(){return B4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,B4({},e,{ref:t,icon:z4}))),H4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`}}]},name:`picture`,theme:`outlined`};function U4(){return U4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,U4({},e,{ref:t,icon:H4}))),G4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 518H506V160c0-4.4-3.6-8-8-8h-26a398.46 398.46 0 00-282.8 117.1 398.19 398.19 0 00-85.7 127.1A397.61 397.61 0 0072 552a398.46 398.46 0 00117.1 282.8c36.7 36.7 79.5 65.6 127.1 85.7A397.61 397.61 0 00472 952a398.46 398.46 0 00282.8-117.1c36.7-36.7 65.6-79.5 85.7-127.1A397.61 397.61 0 00872 552v-26c0-4.4-3.6-8-8-8zM705.7 787.8A331.59 331.59 0 01470.4 884c-88.1-.4-170.9-34.9-233.2-97.2C174.5 724.1 140 640.7 140 552c0-88.7 34.5-172.1 97.2-234.8 54.6-54.6 124.9-87.9 200.8-95.5V586h364.3c-7.7 76.3-41.3 147-96.6 201.8zM952 462.4l-2.6-28.2c-8.5-92.1-49.4-179-115.2-244.6A399.4 399.4 0 00589 74.6L560.7 72c-4.7-.4-8.7 3.2-8.7 7.9V464c0 4.4 3.6 8 8 8l384-1c4.7 0 8.4-4 8-8.6zm-332.2-58.2V147.6a332.24 332.24 0 01166.4 89.8c45.7 45.6 77 103.6 90 166.1l-256.4.7z`}}]},name:`pie-chart`,theme:`outlined`};function K4(){return K4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,K4({},e,{ref:t,icon:G4}))),J4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}},{tag:`path`,attrs:{d:`M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z`}}]},name:`play-circle`,theme:`outlined`};function Y4(){return Y4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Y4({},e,{ref:t,icon:J4}))),Z4={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M280 752h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8zm192-280h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v184c0 4.4 3.6 8 8 8zm192 72h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v256c0 4.4 3.6 8 8 8zm216-432H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`project`,theme:`outlined`};function Q4(){return Q4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Q4({},e,{ref:t,icon:Z4}))),e3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 161H699.2c-49.1 0-97.1 14.1-138.4 40.7L512 233l-48.8-31.3A255.2 255.2 0 00324.8 161H96c-17.7 0-32 14.3-32 32v568c0 17.7 14.3 32 32 32h228.8c49.1 0 97.1 14.1 138.4 40.7l44.4 28.6c1.3.8 2.8 1.3 4.3 1.3s3-.4 4.3-1.3l44.4-28.6C602 807.1 650.1 793 699.2 793H928c17.7 0 32-14.3 32-32V193c0-17.7-14.3-32-32-32zM324.8 721H136V233h188.8c35.4 0 69.8 10.1 99.5 29.2l48.8 31.3 6.9 4.5v462c-47.6-25.6-100.8-39-155.2-39zm563.2 0H699.2c-54.4 0-107.6 13.4-155.2 39V298l6.9-4.5 48.8-31.3c29.7-19.1 64.1-29.2 99.5-29.2H888v488zM396.9 361H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm223.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c0-4.1-3.2-7.5-7.1-7.5H627.1c-3.9 0-7.1 3.4-7.1 7.5zM396.9 501H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm416 0H627.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5z`}}]},name:`read`,theme:`outlined`};function t3(){return t3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,t3({},e,{ref:t,icon:e3}))),r3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M508 704c79.5 0 144-64.5 144-144s-64.5-144-144-144-144 64.5-144 144 64.5 144 144 144zm0-224c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z`}},{tag:`path`,attrs:{d:`M832 256h-28.1l-35.7-120.9c-4-13.7-16.5-23.1-30.7-23.1h-451c-14.3 0-26.8 9.4-30.7 23.1L220.1 256H192c-17.7 0-32 14.3-32 32v28c0 4.4 3.6 8 8 8h45.8l47.7 558.7a32 32 0 0031.9 29.3h429.2a32 32 0 0031.9-29.3L802.2 324H856c4.4 0 8-3.6 8-8v-28c0-17.7-14.3-32-32-32zm-518.6-76h397.2l22.4 76H291l22.4-76zm376.2 664H326.4L282 324h451.9l-44.3 520z`}}]},name:`rest`,theme:`outlined`};function i3(){return i3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,i3({},e,{ref:t,icon:r3}))),o3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`robot`,theme:`outlined`};function s3(){return s3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,s3({},e,{ref:t,icon:o3}))),l3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 00-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0043.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0043.1-30.5 97.52 97.52 0 0021.4-60.8c0-8.4-1.1-16.4-3.1-23.8H864zM762.3 621.4c9.4 14.6 17 30.3 22.5 46.6H700V558.7a211.6 211.6 0 0162.3 62.7zM388 483.1V318.8l124-147 124 147V668H388V483.1zM239.2 668c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668h-84.8zm388.9 116.2c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5-38.3 0-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 01-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM464 400a48 48 0 1096 0 48 48 0 10-96 0z`}}]},name:`rocket`,theme:`outlined`};function u3(){return u3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,u3({},e,{ref:t,icon:l3}))),f3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M793 242H366v-74c0-6.7-7.7-10.4-12.9-6.3l-142 112a8 8 0 000 12.6l142 112c5.2 4.1 12.9.4 12.9-6.3v-74h415v470H175c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h618c35.3 0 64-28.7 64-64V306c0-35.3-28.7-64-64-64z`}}]},name:`rollback`,theme:`outlined`};function p3(){return p3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,p3({},e,{ref:t,icon:f3}))),h3={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z`}},{tag:`path`,attrs:{d:`M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z`}}]},name:`safety`,theme:`outlined`};function g3(){return g3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,g3({},e,{ref:t,icon:h3}))),v3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z`}}]},name:`save`,theme:`outlined`};function y3(){return y3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,y3({},e,{ref:t,icon:v3}))),x3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zM402.9 528.8l-77.5 77.5a8.03 8.03 0 000 11.3l34 34c3.1 3.1 8.2 3.1 11.3 0l77.5-77.5c55.7 35.1 130.1 28.4 178.6-20.1 56.3-56.3 56.3-147.5 0-203.8-56.3-56.3-147.5-56.3-203.8 0-48.5 48.5-55.2 123-20.1 178.6zm65.4-133.3c31.3-31.3 82-31.3 113.2 0 31.3 31.3 31.3 82 0 113.2-31.3 31.3-82 31.3-113.2 0s-31.3-81.9 0-113.2z`}}]},name:`security-scan`,theme:`outlined`};function S3(){return S3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,S3({},e,{ref:t,icon:x3}))),w3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z`}}]},name:`send`,theme:`outlined`};function T3(){return T3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,T3({},e,{ref:t,icon:w3}))),D3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z`}}]},name:`setting`,theme:`outlined`};function O3(){return O3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,O3({},e,{ref:t,icon:D3}))),A3={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z`}}]},name:`shopping-cart`,theme:`outlined`};function j3(){return j3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,j3({},e,{ref:t,icon:A3}))),N3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 312H696v-16c0-101.6-82.4-184-184-184s-184 82.4-184 184v16H192c-17.7 0-32 14.3-32 32v536c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V344c0-17.7-14.3-32-32-32zm-432-16c0-61.9 50.1-112 112-112s112 50.1 112 112v16H400v-16zm392 544H232V384h96v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h224v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h96v456z`}}]},name:`shopping`,theme:`outlined`};function P3(){return P3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,P3({},e,{ref:t,icon:N3}))),I3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M925.6 405.1l-203-253.7a6.5 6.5 0 00-5-2.4H306.4c-1.9 0-3.8.9-5 2.4l-203 253.7a6.5 6.5 0 00.2 8.3l408.6 459.5c1.2 1.4 3 2.1 4.8 2.1 1.8 0 3.5-.8 4.8-2.1l408.6-459.5a6.5 6.5 0 00.2-8.3zM645.2 206.4l34.4 133.9-132.5-133.9h98.1zm8.2 178.5H370.6L512 242l141.4 142.9zM378.8 206.4h98.1L344.3 340.3l34.5-133.9zm-53.4 7l-44.1 171.5h-93.1l137.2-171.5zM194.6 434.9H289l125.8 247.7-220.2-247.7zM512 763.4L345.1 434.9h333.7L512 763.4zm97.1-80.8L735 434.9h94.4L609.1 682.6zm133.6-297.7l-44.1-171.5 137.2 171.5h-93.1z`}}]},name:`sketch`,theme:`outlined`};function L3(){return L3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,L3({},e,{ref:t,icon:I3}))),z3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M870 126H663.8c-17.4 0-32.9 11.9-37 29.3C614.3 208.1 567 246 512 246s-102.3-37.9-114.8-90.7a37.93 37.93 0 00-37-29.3H154a44 44 0 00-44 44v252a44 44 0 0044 44h75v388a44 44 0 0044 44h478a44 44 0 0044-44V466h75a44 44 0 0044-44V170a44 44 0 00-44-44zm-28 268H723v432H301V394H182V198h153.3c28.2 71.2 97.5 120 176.7 120s148.5-48.8 176.7-120H842v196z`}}]},name:`skin`,theme:`outlined`};function B3(){return B3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,B3({},e,{ref:t,icon:z3}))),H3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z`}}]},name:`smile`,theme:`outlined`};function U3(){return U3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,U3({},e,{ref:t,icon:H3}))),G3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M688 264c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48zm-8 136H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM480 544H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 308H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm356.8-74.4c29-26.3 47.2-64.3 47.2-106.6 0-79.5-64.5-144-144-144s-144 64.5-144 144c0 42.3 18.2 80.3 47.2 106.6-57 32.5-96.2 92.7-99.2 162.1-.2 4.5 3.5 8.3 8 8.3h48.1c4.2 0 7.7-3.3 8-7.6C564 871.2 621.7 816 692 816s128 55.2 131.9 124.4c.2 4.2 3.7 7.6 8 7.6H880c4.6 0 8.2-3.8 8-8.3-2.9-69.5-42.2-129.6-99.2-162.1zM692 591c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z`}}]},name:`solution`,theme:`outlined`};function K3(){return K3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,K3({},e,{ref:t,icon:G3}))),J3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1zM586 803L293.4 611.7l-18-11.7H146V424h129.4l17.9-11.7L586 221v582zm348-327H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zm-41.9 261.8l-110.3-63.7a15.9 15.9 0 00-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0021.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM760 344a15.9 15.9 0 0021.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 00-21.7-5.9L746 287.8a15.99 15.99 0 00-5.8 21.8L760 344z`}}]},name:`sound`,theme:`outlined`};function Y3(){return Y3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Y3({},e,{ref:t,icon:J3}))),Z3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z`}}]},name:`star`,theme:`outlined`};function Q3(){return Q3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,Q3({},e,{ref:t,icon:Z3}))),e6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z`}}]},name:`stop`,theme:`outlined`};function t6(){return t6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,t6({},e,{ref:t,icon:e6}))),r6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M938 458.8l-29.6-312.6c-1.5-16.2-14.4-29-30.6-30.6L565.2 86h-.4c-3.2 0-5.7 1-7.6 2.9L88.9 557.2a9.96 9.96 0 000 14.1l363.8 363.8c1.9 1.9 4.4 2.9 7.1 2.9s5.2-1 7.1-2.9l468.3-468.3c2-2.1 3-5 2.8-8zM459.7 834.7L189.3 564.3 589 164.6 836 188l23.4 247-399.7 399.7zM680 256c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm0 120c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z`}}]},name:`tag`,theme:`outlined`};function i6(){return i6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,i6({},e,{ref:t,icon:r6}))),o6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z`}}]},name:`team`,theme:`outlined`};function s6(){return s6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,s6({},e,{ref:t,icon:o6}))),l6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z`}}]},name:`thunderbolt`,theme:`outlined`};function u6(){return u6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,u6({},e,{ref:t,icon:l6}))),f6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z`}}]},name:`tool`,theme:`outlined`};function p6(){return p6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,p6({},e,{ref:t,icon:f6}))),h6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 160h-92v-40c0-4.4-3.6-8-8-8H256c-4.4 0-8 3.6-8 8v40h-92a44 44 0 00-44 44v148c0 81.7 60 149.6 138.2 162C265.7 630.2 359 721.7 476 734.5v105.2H280c-17.7 0-32 14.3-32 32V904c0 4.4 3.6 8 8 8h512c4.4 0 8-3.6 8-8v-32.3c0-17.7-14.3-32-32-32H548V734.5C665 721.7 758.3 630.2 773.8 514 852 501.6 912 433.7 912 352V204a44 44 0 00-44-44zM184 352V232h64v207.6a91.99 91.99 0 01-64-87.6zm520 128c0 49.1-19.1 95.4-53.9 130.1-34.8 34.8-81 53.9-130.1 53.9h-16c-49.1 0-95.4-19.1-130.1-53.9-34.8-34.8-53.9-81-53.9-130.1V184h384v296zm136-128c0 41-26.9 75.8-64 87.6V232h64v120z`}}]},name:`trophy`,theme:`outlined`};function g6(){return g6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,g6({},e,{ref:t,icon:h6}))),v6={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M608 192a32 32 0 0132 32v160h174.81a32 32 0 0126.68 14.33l113.19 170.84a32 32 0 015.32 17.68V672a32 32 0 01-32 32h-96c0 70.7-57.3 128-128 128s-128-57.3-128-128H384c0 70.7-57.3 128-128 128s-128-57.3-128-128H96a32 32 0 01-32-32V224a32 32 0 0132-32zM256 640a64 64 0 000 128h1.06A64 64 0 00256 640m448 0a64 64 0 000 128h1.06A64 64 0 00704 640M576 256H128v384h17.12c22.13-38.26 63.5-64 110.88-64 47.38 0 88.75 25.74 110.88 64H576zm221.63 192H640v145.12A127.43 127.43 0 01704 576c47.38 0 88.75 25.74 110.88 64H896v-43.52zM500 448a12 12 0 0112 12v40a12 12 0 01-12 12H332a12 12 0 01-12-12v-40a12 12 0 0112-12zM308 320a12 12 0 0112 12v40a12 12 0 01-12 12H204a12 12 0 01-12-12v-40a12 12 0 0112-12z`}}]},name:`truck`,theme:`outlined`};function y6(){return y6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,y6({},e,{ref:t,icon:v6}))),x6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M511.4 124C290.5 124.3 112 303 112 523.9c0 128 60.2 242 153.8 315.2l-37.5 48c-4.1 5.3-.3 13 6.3 12.9l167-.8c5.2 0 9-4.9 7.7-9.9L369.8 727a8 8 0 00-14.1-3L315 776.1c-10.2-8-20-16.7-29.3-26a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-7.5 7.5-15.3 14.5-23.4 21.2a7.93 7.93 0 00-1.2 11.1l39.4 50.5c2.8 3.5 7.9 4.1 11.4 1.3C854.5 760.8 912 649.1 912 523.9c0-221.1-179.4-400.2-400.6-399.9z`}}]},name:`undo`,theme:`outlined`};function S6(){return S6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,S6({},e,{ref:t,icon:x6}))),w6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`upload`,theme:`outlined`};function T6(){return T6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,T6({},e,{ref:t,icon:w6}))),D6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z`}}]},name:`user`,theme:`outlined`};function O6(){return O6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,O6({},e,{ref:t,icon:D6}))),A6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v576c0 35.3 28.7 64 64 64h592c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM712 792H136V232h576v560zm176-167l-104-59.8V458.9L888 399v226zM208 360h112c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H208c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}}]},name:`video-camera`,theme:`outlined`};function j6(){return j6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,j6({},e,{ref:t,icon:A6}))),N6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 464H528V448h312v128zm0 264H184V184h656v200H496c-17.7 0-32 14.3-32 32v192c0 17.7 14.3 32 32 32h344v200zM580 512a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`wallet`,theme:`outlined`};function P6(){return P6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,P6({},e,{ref:t,icon:N6}))),I6={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M690.1 377.4c5.9 0 11.8.2 17.6.5-24.4-128.7-158.3-227.1-319.9-227.1C209 150.8 64 271.4 64 420.2c0 81.1 43.6 154.2 111.9 203.6a21.5 21.5 0 019.1 17.6c0 2.4-.5 4.6-1.1 6.9-5.5 20.3-14.2 52.8-14.6 54.3-.7 2.6-1.7 5.2-1.7 7.9 0 5.9 4.8 10.8 10.8 10.8 2.3 0 4.2-.9 6.2-2l70.9-40.9c5.3-3.1 11-5 17.2-5 3.2 0 6.4.5 9.5 1.4 33.1 9.5 68.8 14.8 105.7 14.8 6 0 11.9-.1 17.8-.4-7.1-21-10.9-43.1-10.9-66 0-135.8 132.2-245.8 295.3-245.8zm-194.3-86.5c23.8 0 43.2 19.3 43.2 43.1s-19.3 43.1-43.2 43.1c-23.8 0-43.2-19.3-43.2-43.1s19.4-43.1 43.2-43.1zm-215.9 86.2c-23.8 0-43.2-19.3-43.2-43.1s19.3-43.1 43.2-43.1 43.2 19.3 43.2 43.1-19.4 43.1-43.2 43.1zm586.8 415.6c56.9-41.2 93.2-102 93.2-169.7 0-124-120.8-224.5-269.9-224.5-149 0-269.9 100.5-269.9 224.5S540.9 847.5 690 847.5c30.8 0 60.6-4.4 88.1-12.3 2.6-.8 5.2-1.2 7.9-1.2 5.2 0 9.9 1.6 14.3 4.1l59.1 34c1.7 1 3.3 1.7 5.2 1.7a9 9 0 006.4-2.6 9 9 0 002.6-6.4c0-2.2-.9-4.4-1.4-6.6-.3-1.2-7.6-28.3-12.2-45.3-.5-1.9-.9-3.8-.9-5.7.1-5.9 3.1-11.2 7.6-14.5zM600.2 587.2c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9c0 19.8-16.2 35.9-36 35.9zm179.9 0c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9a36.08 36.08 0 01-36 35.9z`}}]},name:`wechat`,theme:`outlined`};function L6(){return L6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Al,L6({},e,{ref:t,icon:I6}))),z6=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},B6=(e=>e?z6(e):z6),V6=e=>e;function H6(e,t=V6){let n=S.useSyncExternalStore(e.subscribe,S.useCallback(()=>t(e.getState()),[e,t]),S.useCallback(()=>t(e.getInitialState()),[e,t]));return S.useDebugValue(n),n}var U6=e=>{let t=B6(e),n=e=>H6(t,e);return Object.assign(n,t),n},W6=(e=>e?U6(e):U6),G6=c(F1(),1),K6=`AES-GCM`,q6=12,J6=128;async function Y6(){throw Error(`VITE_ENCRYPTION_KEY not configured`)}async function X6(e){let t=await Y6(),n=crypto.getRandomValues(new Uint8Array(q6)),r=new TextEncoder().encode(e),i=await crypto.subtle.encrypt({name:K6,iv:n,tagLength:J6},t,r),a=new Uint8Array(i),o=new Uint8Array(n.length+a.length);return o.set(n),o.set(a,n.length),btoa(String.fromCharCode(...o))}async function Z6(e){let t=await Y6(),n=Uint8Array.from(atob(e),e=>e.charCodeAt(0)),r=n.slice(0,q6),i=n.slice(q6),a=await crypto.subtle.decrypt({name:K6,iv:r,tagLength:J6},t,i);return new TextDecoder().decode(a)}var Q6=`http://ceshi.apiforeign.minzhong.cn`,$6=!1;function e8(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}function t8(e){return Array.isArray(e)?e.map(t8):typeof e==`object`&&e?Object.fromEntries(Object.entries(e).map(([e,t])=>[e8(e),t8(t)])):e}function n8(){return localStorage.getItem(`auth_token`)}function r8(e){localStorage.setItem(`auth_token`,e)}function i8(){localStorage.removeItem(`auth_token`)}async function a8(e){try{return await Z6(e)}catch{return null}}async function o8(e,t={}){let{method:n=`GET`,body:r,auth:i=!0,encryptBody:a=$6}=t,o={"Content-Type":`application/json`};if(i){let e=n8();e&&(o.Authorization=`Bearer ${e}`)}let s;if(r!==void 0){let e=JSON.stringify(r);a?(o[`X-Encrypted`]=`true`,s=JSON.stringify({data:await X6(e)})):s=e}let c=await fetch(`${Q6}/api${e}`,{method:n,headers:o,body:s});if(c.status===204)return;let l=await c.text();if(!l)return;let u;try{u=JSON.parse(l)}catch{throw Error(`响应解析失败 (${c.status})`)}if(u&&typeof u.data==`string`&&a){let e=await a8(u.data);e!==null&&(u=JSON.parse(e))}if(!c.ok){let e=u?.detail||`请求失败 (${c.status})`;throw c.status===401&&(i8(),window.location.pathname!==`/login`&&(window.location.href=`/login`)),Error(e)}return t8(u)}var s8={get:(e,t=!0)=>o8(e,{auth:t}),post:(e,t,n=!0)=>o8(e,{method:`POST`,body:t,auth:n}),put:(e,t,n=!0)=>o8(e,{method:`PUT`,body:t,auth:n}),delete:(e,t=!0)=>o8(e,{method:`DELETE`,auth:t})};async function c8(e,t,n,r){let i=await s8.post(`/auth/admin-login`,{username:e,password:t,captcha_token:n,remember_me:r||!1},!1);return r8(i.accessToken),i.user}async function l8(){await s8.post(`/auth/logout`),i8()}async function u8(){try{return await s8.get(`/auth/me`)}catch{return null}}async function d8(e,t){let n={};e&&(n.start_date=e),t&&(n.end_date=t);let r=new URLSearchParams(n).toString();return s8.get(`/admin/stats${r?`?${r}`:``}`)}async function f8(e=1,t=20,n,r,i){let a=new URLSearchParams;return a.set(`page`,String(e)),a.set(`page_size`,String(t)),n&&a.set(`search`,n),r&&a.set(`user_type`,r),i&&a.set(`frontend_user_kind`,i),s8.get(`/admin/users?${a.toString()}`)}async function p8(e,t){return s8.put(`/admin/users/${e}/frontend-kind`,{frontend_user_kind:t})}async function m8(e,t,n){await s8.post(`/admin/users/${e}/credits`,{amount:t,description:n})}async function h8(e,t){await s8.put(`/admin/users/${e}/status`,{is_active:t})}async function g8(){return s8.get(`/admin/model-configs`)}async function _8(e){return e.id?s8.put(`/admin/model-configs/${e.id}`,e):s8.post(`/admin/model-configs`,e)}async function v8(e){await s8.delete(`/admin/model-configs/${e}`)}async function y8(){return s8.get(`/admin/system-configs`)}async function b8(e,t){await s8.put(`/admin/system-configs/${e}`,{value:t})}async function x8(e,t){let n=new FormData;n.append(`file`,e),n.append(`config_key`,t);let r=localStorage.getItem(`auth_token`),i=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/admin/upload-pdf`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!i.ok){let e=await i.text();throw Error(e||`上传失败`)}return i.json()}async function S8(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/admin/upload-logo`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok){let e=await r.text();throw Error(e||`上传失败`)}return r.json()}function C8(e,t,n){n!=null&&String(n)!==``&&e.set(t,String(n))}async function w8(e){let t=new URLSearchParams;C8(t,`page`,e?.page),C8(t,`page_size`,e?.pageSize),C8(t,`user_id`,e?.userId),C8(t,`user_name`,e?.userName),C8(t,`user_type`,e?.userType),C8(t,`frontend_user_kind`,e?.frontendUserKind),C8(t,`record_type`,e?.recordType||e?.type),C8(t,`credit_subject`,e?.creditSubject),C8(t,`media_type`,e?.mediaType),C8(t,`charge_kind`,e?.chargeKind),C8(t,`source_module`,e?.sourceModule),C8(t,`source_step_code`,e?.sourceStepCode),C8(t,`billing_scene`,e?.billingScene),C8(t,`start_date`,e?.startDate),C8(t,`end_date`,e?.endDate);let n=t.toString()?`?${t}`:``;return s8.get(`/admin/credit-records${n}`)}async function T8(){return s8.get(`/admin/industry-configs`)}async function E8(e){return e.id?s8.put(`/admin/industry-configs/${e.id}`,e):s8.post(`/admin/industry-configs`,e)}async function D8(e){await s8.delete(`/admin/industry-configs/${e}`)}async function O8(){return s8.get(`/admin/video-engines`)}async function k8(e){return e.id?s8.put(`/admin/video-engines/${e.id}`,e):s8.post(`/admin/video-engines`,e)}async function A8(e){await s8.delete(`/admin/video-engines/${e}`)}async function j8(){return s8.get(`/admin/image-engines`)}async function M8(e){return e.id?s8.put(`/admin/image-engines/${e.id}`,e):s8.post(`/admin/image-engines`,e)}async function N8(e){await s8.delete(`/admin/image-engines/${e}`)}async function P8(){return s8.get(`/admin/credit-ratios`)}async function F8(e){return e.id?s8.put(`/admin/credit-ratios/${e.id}`,e):s8.post(`/admin/credit-ratios`,e)}async function I8(e){await s8.delete(`/admin/credit-ratios/${e}`)}async function L8(){return s8.get(`/admin/payment-configs`)}async function R8(e){await s8.put(`/admin/payment-configs/batch`,e)}async function z8(e){let t=new URLSearchParams;e?.paymentMethod&&t.set(`payment_method`,e.paymentMethod),e?.status&&t.set(`status`,e.status),e?.startDate&&t.set(`start_date`,e.startDate),e?.endDate&&t.set(`end_date`,e.endDate);let n=t.toString(),r=n?`/admin/payment-stats?${n}`:`/admin/payment-stats`;return s8.get(r)}async function B8(e){let t=new URLSearchParams;return e?.method&&t.set(`payment_method`,e.method),e?.status&&t.set(`status`,e.status),e?.startDate&&t.set(`start_date`,e.startDate),e?.endDate&&t.set(`end_date`,e.endDate),e?.page&&t.set(`page`,String(e.page)),e?.pageSize&&t.set(`page_size`,String(e.pageSize)),s8.get(`/admin/payment-orders?${t.toString()}`)}async function V8(e){await s8.post(`/admin/payment-orders/${e}/refund`)}async function H8(e=1,t=20){let n=new URLSearchParams;return n.set(`page`,String(e)),n.set(`page_size`,String(t)),s8.get(`/admin/notifications?${n.toString()}`)}async function U8(e){await s8.post(`/admin/notifications`,e)}async function W8(e){await s8.delete(`/admin/notifications/${e}`)}async function G8(e){return s8.get(`/admin/notifications/${e}/read-users`)}async function K8(){return s8.get(`/admin/menu-configs`)}async function q8(e){return e.id?s8.put(`/admin/menu-configs/${e.id}`,e):s8.post(`/admin/menu-configs`,e)}async function J8(e){await s8.delete(`/admin/menu-configs/${e}`)}async function Y8(e){return s8.post(`/admin/users`,e)}async function X8(e,t){await s8.put(`/admin/users/${e}/menus`,{allowed_menus:t})}async function Z8(e,t){await s8.put(`/admin/users/${e}/reset-password`,{new_password:t})}async function Q8(e,t){await s8.post(`/admin/change-password`,{old_password:e,new_password:t})}async function $8(){return s8.get(`/auth/site-info`,!1)}async function e5(){return s8.get(`/admin/recharge-packages`)}async function t5(e){return e.id?s8.put(`/admin/recharge-packages/${e.id}`,e):s8.post(`/admin/recharge-packages`,e)}async function n5(e){await s8.delete(`/admin/recharge-packages/${e}`)}async function r5(e){let t=e?`?page=${e}`:``;return s8.get(`/admin/operation-logs${t}`)}async function i5(e){let t=e?`?page=${e}`:``;return s8.get(`/admin/user-oauth-apps/list${t}`)}async function a5(e){return s8.post(`/admin/user-oauth-apps/create`,e)}async function o5(e){return s8.get(`/admin/user-oauth-apps/read/${e}`)}async function s5(e,t){return s8.post(`/admin/user-oauth-apps/update/${e}`,t)}async function c5(e){await s8.get(`/admin/user-oauth-apps/delete/${e}`)}async function l5(e){let t=new URLSearchParams;e?.page&&t.set(`page`,String(e.page)),e?.page_size&&t.set(`page_size`,String(e.page_size)),e?.type_name&&t.set(`type_name`,e.type_name),e?.open_type&&t.set(`open_type`,String(e.open_type));let n=t.toString();return s8.get(`/open-type/list${n?`?${n}`:``}`)}async function u5(e){return s8.get(`/open-type/select/${e}`)}async function d5(e){return s8.post(`/open-type/create`,e)}async function f5(e,t){return s8.put(`/open-type/update/${e}`,t)}async function p5(e){await s8.delete(`/open-type/delete/${e}`)}async function m5(e){let t=new URLSearchParams;e?.userId&&t.set(`user_id`,e.userId),e?.status&&t.set(`status`,e.status),e?.page&&t.set(`page`,String(e.page)),e?.pageSize&&t.set(`page_size`,String(e.pageSize));let n=t.toString();return s8.get(`/admin/generation-records${n?`?${n}`:``}`)}async function h5(e,t,n){await s8.put(`/admin/generation-records/${e}/status`,{status:t,video_url:n})}async function g5(e,t,n,r){await s8.post(`/admin/generation-records/${e}/generate`,{aspect_ratio:t,resolution:n,image_size:r})}async function _5(){return s8.get(`/generation-ai/engines`)}async function v5(e){let t=new URLSearchParams;e?.genType&&t.set(`gen_type`,e.genType),e?.status&&t.set(`status`,e.status),e?.page&&t.set(`page`,String(e.page)),e?.pageSize&&t.set(`page_size`,String(e.pageSize)),e?.userId&&t.set(`user_id`,e.userId),e?.userName&&t.set(`user_name`,e.userName);let n=t.toString();return s8.get(`/generation-ai/tasks${n?`?${n}`:``}`)}function y5(e,t,n){n==null||String(n).trim()===``||e.set(t,String(n))}async function b5(e){let t=new URLSearchParams;y5(t,`status`,e?.status),y5(t,`keyword`,e?.keyword),y5(t,`user_id`,e?.userId),y5(t,`user_name`,e?.userName),y5(t,`created_start`,e?.createdStart),y5(t,`created_end`,e?.createdEnd),y5(t,`page`,e?.page),y5(t,`page_size`,e?.pageSize);let n=t.toString();return s8.get(`/hot-opening-replications/tasks${n?`?${n}`:``}`)}async function x5(e){return s8.get(`/hot-opening-replications/tasks/${e}`)}async function S5(e){let t=new URLSearchParams;y5(t,`status`,e?.status),y5(t,`analysis_status`,e?.analysisStatus),y5(t,`split_status`,e?.splitStatus),y5(t,`keyword`,e?.keyword),y5(t,`user_id`,e?.userId),y5(t,`user_name`,e?.userName),y5(t,`created_start`,e?.createdStart),y5(t,`created_end`,e?.createdEnd),y5(t,`page`,e?.page),y5(t,`page_size`,e?.pageSize);let n=t.toString();return s8.get(`/shot-replications/task-sets${n?`?${n}`:``}`)}async function C5(e){return s8.get(`/shot-replications/task-sets/${e}`)}async function w5(e,t){let n=new URLSearchParams;y5(n,`source_mode`,t?.sourceMode),y5(n,`split_status`,t?.splitStatus),y5(n,`analysis_status`,t?.analysisStatus),y5(n,`replicate_status`,t?.replicateStatus),y5(n,`page`,t?.page),y5(n,`page_size`,t?.pageSize);let r=n.toString();return s8.get(`/shot-replications/task-sets/${e}/segments${r?`?${r}`:``}`)}async function T5(e){return s8.get(`/shot-replications/segments/${e}`)}async function E5(e){return s8.get(`/shot-replications/projects/${e}`)}async function D5(){return s8.get(`/admin/video-prompt-schema-config`)}async function O5(e){return s8.put(`/admin/video-prompt-schema-config`,e)}async function k5(){return s8.post(`/admin/video-prompt-schema-config/reset-default`)}async function A5(){return s8.get(`/admin/video-prompt-schema-config/export`)}async function j5(e){return s8.post(`/admin/video-prompt-schema-config/import`,e)}async function M5(e){return s8.post(`/admin/video-prompt-schema-config/preview`,e)}async function N5(e){return s8.post(`/user-oauth/request_oauth`,e)}async function P5(e){let t=new URLSearchParams;return e.account_userid&&t.set(`account_userid`,e.account_userid),e.open_type!==void 0&&t.set(`open_type`,String(e.open_type)),e.account_id&&t.set(`account_id`,e.account_id),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),s8.get(`/user-oauth/oauth_list?${t.toString()}`)}async function F5(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`http://ceshi.apiforeign.minzhong.cn/api/generation-records/upload-image`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok)throw Error(`图片上传失败`);let i=await r.json();return{url:i.url,filename:i.filename}}async function I5(){return s8.get(`/material-consumption/fields`)}async function L5(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.user_id&&t.set(`user_id`,e.user_id),e.consume_date!==void 0&&t.set(`consume_date`,e.consume_date[0]+`,`+e.consume_date[1]),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),s8.get(`/material-consumption/admin/list?${t.toString()}`)}var R5=W6(e=>({user:null,loading:!0,login:async(t,n,r)=>{e({user:await c8(t,n,void 0,r)})},logout:async()=>{await l8(),e({user:null})},checkAuth:async()=>{try{if(!localStorage.getItem(`auth_token`)){e({user:null,loading:!1});return}e({user:await u8(),loading:!1})}catch(t){(t?.message?.includes(`401`)||t?.message?.includes(`Unauthorized`))&&localStorage.removeItem(`auth_token`),e({user:null,loading:!1})}}})),z5=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Q=o(((e,t)=>{t.exports=z5()}))(),{Sider:B5,Content:V5}=wW,H5={HomeOutlined:(0,Q.jsx)(X2,{}),PlayCircleOutlined:(0,Q.jsx)(X4,{}),WalletOutlined:(0,Q.jsx)(F6,{}),RobotOutlined:(0,Q.jsx)(c3,{}),SettingOutlined:(0,Q.jsx)(k3,{}),BellOutlined:(0,Q.jsx)(d0,{}),UserOutlined:(0,Q.jsx)(k6,{}),AppstoreOutlined:(0,Q.jsx)(W1,{}),FileTextOutlined:(0,Q.jsx)(KV,{}),StarOutlined:(0,Q.jsx)($3,{}),HeartOutlined:(0,Q.jsx)(V2,{}),CameraOutlined:(0,Q.jsx)(E0,{}),DashboardOutlined:(0,Q.jsx)(n2,{}),CalculatorOutlined:(0,Q.jsx)(C0,{}),DollarOutlined:(0,Q.jsx)(c2,{}),GiftOutlined:(0,Q.jsx)(F2,{}),ThunderboltOutlined:(0,Q.jsx)(d6,{}),FireOutlined:(0,Q.jsx)(E2,{}),CloudOutlined:(0,Q.jsx)(R0,{}),SmileOutlined:(0,Q.jsx)(W3,{}),TrophyOutlined:(0,Q.jsx)(_6,{}),RocketOutlined:(0,Q.jsx)(d3,{}),BulbOutlined:(0,Q.jsx)(b0,{}),CodeOutlined:(0,Q.jsx)(W0,{}),PictureOutlined:(0,Q.jsx)(W4,{}),VideoCameraOutlined:(0,Q.jsx)(M6,{}),AudioOutlined:(0,Q.jsx)(n0,{}),MailOutlined:(0,Q.jsx)(_4,{}),PhoneOutlined:(0,Q.jsx)(V4,{}),GlobalOutlined:(0,Q.jsx)(R2,{}),ShoppingCartOutlined:(0,Q.jsx)(M3,{}),TeamOutlined:(0,Q.jsx)(c6,{}),BarChartOutlined:(0,Q.jsx)(c0,{}),PieChartOutlined:(0,Q.jsx)(q4,{}),LineChartOutlined:(0,Q.jsx)(a4,{}),SecurityScanOutlined:(0,Q.jsx)(C3,{}),ApiOutlined:(0,Q.jsx)(V1,{}),DatabaseOutlined:(0,Q.jsx)(a2,{}),CloudServerOutlined:(0,Q.jsx)(V0,{}),MenuOutlined:(0,Q.jsx)(C4,{}),PlusOutlined:(0,Q.jsx)(TL,{}),EditOutlined:(0,Q.jsx)(zQ,{}),DeleteOutlined:(0,Q.jsx)(IQ,{}),LockOutlined:(0,Q.jsx)(d4,{}),LogoutOutlined:(0,Q.jsx)(m4,{})},U5=()=>{let e=Ye(),t=Ke(),{user:n,loading:r,logout:i}=R5(),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)(!1),[l]=X.useForm(),[u,d]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`);return e&&JSON.parse(e).siteName||`管理后台`}),[f,p]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`);return e&&JSON.parse(e).siteLogo||``});if((0,S.useEffect)(()=>{$8().then(e=>{let t=e.siteName||`管理后台`,n=e.siteLogo||``;if(d(t),p(n),document.title=t,localStorage.setItem(`siteInfo`,JSON.stringify({siteName:t,siteLogo:n})),n){let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=n,e.type=`image/png`}}).catch(()=>{})},[]),(0,S.useEffect)(()=>{K8().then(e=>{let t=e.filter(e=>{let t=e.menu_target??e.menuTarget??`admin`;return(e.is_active??e.isActive??!0)&&(t===`admin`||t===`both`)}),r=!!(n?.isAdmin??n?.is_admin);if(n&&!r){let e=n.allowedMenus??n?.allowed_menus;if(e&&Array.isArray(e)&&e.length>0){let n=new Set(e);t=t.filter(e=>(e.menu_type??e.menuType)===`group`?t.some(t=>(t.parent_id??t.parentId)===e.id&&n.has(t.path)):n.has(e.path))}else t=[]}o(t)}).catch(()=>{})},[n]),r)return(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,Q.jsx)(SG,{size:`large`})});if(!n)return(0,Q.jsx)(Ct,{to:`/admin/login`,replace:!0});let m={};a.filter(e=>(e.menu_type??e.menuType)!==`group`&&(e.parent_id??e.parentId)).forEach(e=>{let t=e.parent_id??e.parentId;m[t]||(m[t]=[]),m[t].push(e)});let h=[...a].sort((e,t)=>(e.sort_order??e.sortOrder??0)-(t.sort_order??t.sortOrder??0)),g=[];h.forEach(e=>{let t=e.menu_type??e.menuType,n=e.parent_id??e.parentId;if(t===`group`){let t=(m[e.id]||[]).sort((e,t)=>(e.sort_order??e.sortOrder??0)-(t.sort_order??t.sortOrder??0)).map(e=>({key:e.path,icon:H5[e.icon]||void 0,label:e.label}));t.length>0&&g.push({key:`group-${e.id}`,icon:H5[e.icon]||void 0,label:e.label,children:t})}else n||g.push({key:e.path,icon:H5[e.icon]||void 0,label:e.label})});let _=!!(n?.isAdmin??n?.is_admin);g.length===0&&_&&g.push({key:`/`,icon:(0,Q.jsx)(n2,{}),label:`数据概览`},{key:`/users`,icon:(0,Q.jsx)(k6,{}),label:`用户管理`});let v=t.pathname,y=[];g.forEach(e=>{e.children?e.children.forEach(e=>y.push(e.key)):y.push(e.key)}),y.includes(v)||(v=y.find(e=>v.startsWith(e))||`/`);let b=[];return g.forEach(e=>{e.children&&e.children.some(e=>e.key===v)&&b.push(e.key)}),(0,Q.jsxs)(wW,{style:{minHeight:`100vh`,background:`#f1f5f9`},children:[(0,Q.jsxs)(B5,{width:240,theme:`light`,style:{position:`fixed`,left:16,top:16,bottom:16,width:240,background:`linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,border:`1px solid rgba(0, 0, 0, 0.06)`,zIndex:100},children:[(0,Q.jsxs)(`div`,{style:{height:80,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:12,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`},children:[(0,Q.jsx)(`div`,{style:{width:42,height:42,borderRadius:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,overflow:`hidden`},children:f?(0,Q.jsx)(`img`,{src:f,alt:`logo`,style:{width:28,height:28,objectFit:`contain`}}):(0,Q.jsx)(d6,{style:{fontSize:20,color:`#ffffff`}})}),(0,Q.jsx)(`span`,{style:{color:`#1e293b`,fontSize:17,fontWeight:700,letterSpacing:-.02,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:u})]}),(0,Q.jsx)(`div`,{style:{overflowY:`auto`,maxHeight:`calc(100vh - 200px)`,paddingRight:8},children:(0,Q.jsx)(GE,{mode:`inline`,selectedKeys:[v],defaultOpenKeys:b,items:g,style:{background:`transparent`,border:`none`,paddingTop:8,marginTop:8},onClick:({key:t})=>{t.startsWith(`group-`)||e(t)},theme:`light`})}),(0,Q.jsx)(`div`,{style:{position:`absolute`,bottom:16,left:16,right:16,padding:12,background:`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,borderRadius:12,border:`1px solid rgba(0, 0, 0, 0.06)`},children:(0,Q.jsx)(UV,{menu:{items:[{key:`user`,icon:(0,Q.jsx)(k6,{}),label:n?.username,disabled:!0},{type:`divider`},{key:`changePwd`,icon:(0,Q.jsx)(d4,{}),label:`修改密码`},{key:`logout`,icon:(0,Q.jsx)(m4,{}),label:`退出登录`,danger:!0}],onClick:({key:t})=>{t===`logout`&&(i(),e(`/login`)),t===`changePwd`&&(c(!0),l.resetFields())}},placement:`topRight`,arrow:!0,children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,cursor:`pointer`,padding:`8px 12px`,borderRadius:12,transition:`all 0.25s ease`,background:`transparent`},onMouseEnter:e=>{e.currentTarget.style.background=`#ffffff`,e.currentTarget.style.boxShadow=`0 4px 12px rgba(0, 0, 0, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`,e.currentTarget.style.boxShadow=`none`},children:[(0,Q.jsx)(zw,{size:32,icon:(0,Q.jsx)(k6,{}),style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`}}),(0,Q.jsxs)(`div`,{style:{flex:1,overflow:`hidden`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:13,fontWeight:600,color:`#1e293b`,display:`block`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:n?.username}),(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:_?`管理员`:`普通用户`})]})]})})})]}),(0,Q.jsxs)(wW,{style:{marginLeft:272,marginTop:16,marginRight:16,marginBottom:16,background:`transparent`},children:[(0,Q.jsx)(`div`,{style:{height:72,background:`#ffffff`,borderRadius:`16px 16px 0 0`,boxShadow:`0 2px 12px rgba(0, 0, 0, 0.04)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`0 32px`,fontFamily:`var(--font-sans)`,border:`1px solid rgba(0, 0, 0, 0.06)`,borderBottom:`none`},children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:18,color:`#1e293b`,fontWeight:600},children:g.find(e=>e.key===v)?.label||g.flatMap(e=>e.children||[]).find(e=>e.key===v)?.label||`管理后台`})}),(0,Q.jsx)(V5,{style:{padding:32,background:`#ffffff`,borderRadius:`0 0 16px 16px`,boxShadow:`0 4px 24px rgba(0, 0, 0, 0.06)`,overflow:`auto`,border:`1px solid rgba(0, 0, 0, 0.06)`,borderTop:`none`},children:g.length===0&&!_?(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`60vh`,color:`#94a3b8`},children:[(0,Q.jsx)(d4,{style:{fontSize:48,marginBottom:16,color:`#cbd5e1`}}),(0,Q.jsx)(`div`,{style:{fontSize:16,fontWeight:600,color:`#64748b`},children:`暂无任何权限`}),(0,Q.jsx)(`div`,{style:{fontSize:13,marginTop:8},children:`请联系管理员配置菜单权限`})]}):(0,Q.jsx)(wt,{})})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(d4,{}),`修改密码`]}),open:s,onOk:async()=>{try{let e=await l.validateFields();if(e.newPassword!==e.confirmPassword){LG.error(`两次输入的密码不一致`);return}await Q8(e.oldPassword,e.newPassword),LG.success(`密码修改成功`),c(!1),l.resetFields()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`修改失败`)}},onCancel:()=>{c(!1),l.resetFields()},okText:`确认修改`,cancelText:`取消`,width:420,children:(0,Q.jsxs)(X,{form:l,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`oldPassword`,label:`原密码`,rules:[{required:!0,message:`请输入原密码`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请输入原密码`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`newPassword`,label:`新密码`,rules:[{required:!0,min:6,message:`密码至少6位`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`confirmPassword`,label:`确认新密码`,rules:[{required:!0,message:`请再次输入新密码`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请再次输入新密码`,size:`large`})})]})})]})},W5={1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`},G5={1:`巨量`,2:`磁力`,3:`巨量星图`,4:`服务单`,5:`腾讯`},K5=e=>{if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`},q5=()=>{let{message:e}=ox.useApp(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(void 0),[d,f]=(0,S.useState)(1),[p,m]=(0,S.useState)(10),[h,g]=(0,S.useState)(0),[_,v]=(0,S.useState)({account_userid:``,open_type:void 0,account_id:``});(0,S.useEffect)(()=>{y()},[]);let y=async(t=1,r=10,i=_)=>{o(!0);try{let e=await P5({page:t,page_size:r,account_userid:i.account_userid||void 0,open_type:i.open_type,account_id:i.account_id||void 0});e?(e.data&&n(e.data.data||e.data),e.pagination&&(g(e.pagination.total||0),f(e.pagination.page||1),m(e.pagination.pageSize||10))):n(e||[])}catch{e.error(`获取授权列表失败`)}finally{o(!1)}},b=()=>{c(!0)},x=async()=>{if(!l){e.warning(`请选择开户方式`);return}i(!0);try{let t=await N5({open_type:l});t.authUrl?window.open(t.authUrl,`_blank`):e.error(`获取授权链接失败`)}catch{e.error(`请求授权失败`)}finally{i(!1),c(!1),u(void 0)}},C=[{title:`ID`,dataIndex:`id`,key:`id`},{title:`授权账户ID`,dataIndex:`accountId`,key:`accountId`,width:160},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权账户用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,render:e=>(0,Q.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})},{title:`授权账户用户名`,dataIndex:`accountUsername`,key:`accountUsername`},{title:`授权应用ID`,dataIndex:`appid`,key:`appid`},{title:`是否敏感物料授权`,dataIndex:`materialAuthStatus`,key:`materialAuthStatus`,width:100,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`是`:`否`})},{title:`开户方式`,dataIndex:`openType`,key:`openType`,render:e=>(0,Q.jsx)(`span`,{style:{color:`#1e293b`},children:W5[e]||e})},{title:`平台端口`,dataIndex:`portType`,key:`portType`,ellipsis:!0,render:e=>(0,Q.jsx)(`span`,{style:{color:`#1e293b`},children:G5[e]||e})},{title:`用户id`,dataIndex:`userId`,key:`userId`},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,Q.jsx)(`span`,{style:{color:`#64748b`},children:K5(e)})},{title:`更新时间`,dataIndex:`updatedAt`,key:`updatedAt`,width:160,render:e=>(0,Q.jsx)(`span`,{style:{color:`#64748b`},children:K5(e)})},{title:`操作`,key:`action`,width:120,render:(e,t)=>(0,Q.jsx)(vn,{to:`/consume?accountId=${t.id}`,style:{color:`#6366f1`},children:`查看消耗`})}],w=t.map((e,t)=>({...e,index:t+1,key:e.id}));return(0,Q.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(d4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`授权管理`})]}),(0,Q.jsx)(qE,{type:`primary`,size:`medium`,icon:(0,Q.jsx)(TL,{}),onClick:b,loading:r,style:{borderRadius:8,fontSize:14,fontWeight:500},children:`点击授权`})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12,marginBottom:16},children:[(0,Q.jsx)(hW,{placeholder:`账号用户ID`,value:_.account_userid,onChange:e=>v(t=>({...t,account_userid:e.target.value})),style:{width:180},onPressEnter:()=>{f(1),y(1,p)}}),(0,Q.jsx)(RC,{placeholder:`开户方式`,value:_.open_type,onChange:e=>v(t=>({...t,open_type:e})),style:{width:140},options:Object.entries(W5).map(([e,t])=>({value:Number(e),label:t}))}),(0,Q.jsx)(hW,{placeholder:`账号ID`,value:_.account_id,onChange:e=>v(t=>({...t,account_id:e.target.value})),style:{width:180},onPressEnter:()=>{f(1),y(1,p)}}),(0,Q.jsx)(qE,{type:`primary`,size:`medium`,onClick:()=>{f(1),y(1,p)},children:`搜索`}),(0,Q.jsx)(qE,{size:`medium`,onClick:()=>{v({account_userid:``,open_type:void 0,account_id:``}),f(1),y(1,p)},children:`重置`})]}),(0,Q.jsx)(bQ,{dataSource:w,columns:C,loading:a,rowKey:`id`,bordered:!1,scroll:{x:`max-content`},pagination:{current:d,pageSize:p,total:h,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{f(e),m(t),y(e,t)},size:`small`}})]}),(0,Q.jsx)(BG,{title:`选择开户方式`,open:s,onOk:x,onCancel:()=>{c(!1),u(void 0)},okText:`确认授权`,cancelText:`取消`,confirmLoading:r,children:(0,Q.jsx)(RC,{placeholder:`请选择开户方式`,value:l,onChange:e=>u(e),style:{width:`100%`},options:Object.entries(W5).map(([e,t])=>({value:Number(e),label:t}))})})]})},{RangePicker:J5}=YB,Y5=e=>e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),X5=()=>{Ye();let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)([]),[u,d]=(0,S.useState)([]),[f,p]=(0,S.useState)(``),[m,h]=(0,S.useState)(1),[g,_]=(0,S.useState)(10),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)();(0,S.useEffect)(()=>{E(),T()},[m,g,C]);let T=async()=>{a(!0);try{let e=await L5({advertiser_id:v||void 0,user_id:b||void 0,consume_date:C,page:m,page_size:g});t(e.data||[]),r(e.pagination?.total||0)}catch{LG.error(`加载数据失败`)}finally{a(!1)}},E=async()=>{try{let e=((await I5()).data||[]).map(e=>({name:Y5(e.field),description:e.description}));l(e);let t=localStorage.getItem(`consumeColumns`);d(t?JSON.parse(t):e.map(e=>e.name))}catch{LG.error(`加载表头字段失败`)}},D=e.map((e,t)=>({...e,index:t+1,key:e.id})),O=()=>{h(1),T()},k=()=>{y(``),x(``),w(void 0),h(1),T()},A=u.map(e=>c.find(t=>t.name===e)).filter(e=>!!e).map(e=>({title:e.description,dataIndex:e.name,key:e.name,ellipsis:!0}));return(0,Q.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(c2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`消耗记录`})]}),(0,Q.jsx)(VV,{children:(0,Q.jsx)(qE,{icon:(0,Q.jsx)(k3,{}),onClick:()=>s(!0),children:`自定义表头`})})]}),(0,Q.jsx)(`div`,{style:{marginBottom:16},children:(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(hW,{placeholder:`广告主ID`,value:v,onChange:e=>y(e.target.value),style:{width:200}}),(0,Q.jsx)(hW,{placeholder:`用户ID`,value:b,onChange:e=>x(e.target.value),style:{width:200}}),(0,Q.jsx)(J5,{value:C?[(0,YE.default)(C[0]),(0,YE.default)(C[1])]:void 0,onChange:e=>{e&&e[0]&&e[1]?w([e[0].format(`YYYY-MM-DD`),e[1].format(`YYYY-MM-DD`)]):w(void 0)}}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(NC,{}),onClick:O,children:`搜索`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:k,children:`重置`})]})}),(0,Q.jsx)(bQ,{dataSource:D,columns:A,loading:i,rowKey:`id`,bordered:!1,scroll:{x:`max-content`},pagination:{current:m,pageSize:g,total:n,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,size:`small`,onChange:(e,t)=>{h(e),_(t)}}})]}),(0,Q.jsx)(BG,{title:`自定义表头`,open:o,onOk:()=>{localStorage.setItem(`consumeColumns`,JSON.stringify(u)),LG.success(`表头设置已保存`),s(!1)},onCancel:()=>{s(!1),p(``)},okText:`确定`,cancelText:`取消`,width:800,children:(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:20,height:400},children:[(0,Q.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,Q.jsx)(hW,{placeholder:`搜索指标...`,value:f,allowClear:!0,onChange:e=>p(e.target.value),style:{marginBottom:8}}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,marginBottom:12,display:`block`},children:`输入指标名称进行搜索`}),(0,Q.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:[(0,Q.jsx)(`div`,{style:{marginBottom:16},children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:`任务详情指标`})}),(0,Q.jsx)(oz,{checked:u.length===c.length&&c.length>0,indeterminate:u.length>0&&u.length{e.target.checked?d(c.map(e=>e.name)):d([])},style:{marginBottom:12},children:`全选`}),(0,Q.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:8},children:c.filter(e=>e.description.toLowerCase().includes(f.toLowerCase())||e.name.toLowerCase().includes(f.toLowerCase())).map(e=>(0,Q.jsx)(oz,{checked:u.includes(e.name),onChange:t=>{t.target.checked?d(t=>[...t,e.name]):d(t=>t.filter(t=>t!==e.name))},children:e.description},e.name))})]})]}),(0,Q.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,Q.jsxs)(Z.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:[`已添加(`,u.length,`)`]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{size:`small`,onClick:()=>d([]),disabled:u.length===0,children:`清空`}),(0,Q.jsx)(qE,{size:`small`,onClick:async()=>{try{let e=((await I5()).data||[]).map(e=>({name:Y5(e.field),description:e.description}));l(e),d(e.map(e=>e.name)),localStorage.removeItem(`consumeColumns`),LG.success(`表头字段已更新`)}catch{LG.error(`更新表头字段失败`)}},children:`更新表头字段`})]})]}),(0,Q.jsx)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:u.length===0?(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:14,textAlign:`center`,display:`block`,padding:`40px 0`},children:`暂无已选指标`}):(0,Q.jsx)(`div`,{children:u.map((e,t)=>{let n=c.find(t=>t.name===e);return(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`8px 12px`,borderBottom:`1px solid #f0f0f5`,cursor:`move`,userSelect:`none`},draggable:!0,onDragStart:e=>{e.dataTransfer.setData(`index`,String(t))},onDragOver:e=>{e.preventDefault()},onDrop:e=>{let n=parseInt(e.dataTransfer.getData(`index`)),r=t;if(n!==r){let e=[...u],[t]=e.splice(n,1);e.splice(r,0,t),d(e)}},children:[(0,Q.jsx)(Z.Text,{children:n?.description||e}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:t+1})]},e)})})})]})]})})]})},Z5=()=>{let e=Ye(),{login:t}=R5(),[n,r]=(0,S.useState)(!1),i=(()=>{try{let e=localStorage.getItem(`siteInfo`);if(e){let t=JSON.parse(e);return{siteName:t.siteName||`VideoGen.AI`,siteLogo:t.siteLogo||``}}}catch{}return{siteName:`VideoGen.AI`,siteLogo:``}})(),[a,o]=(0,S.useState)(i.siteName),[s,c]=(0,S.useState)(i.siteLogo);return(0,S.useEffect)(()=>{$8().then(e=>{o(e.siteName),c(e.siteLogo)}).catch(()=>{})},[]),(0,Q.jsxs)(`div`,{style:{minHeight:`100vh`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundImage:`url(/backimage.png)`,backgroundSize:`cover`,backgroundPosition:`center`,backgroundRepeat:`no-repeat`,backgroundAttachment:`fixed`,position:`relative`,overflow:`hidden`},children:[(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(135deg, rgba(240,244,255,0.9) 0%, rgba(232,236,248,0.85) 40%, rgba(240,240,255,0.9) 70%, rgba(248,249,255,0.95) 100%)`}}),(0,Q.jsx)(`div`,{style:{position:`absolute`,width:500,height:500,borderRadius:`50%`,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,top:-150,right:-100,filter:`blur(40px)`}}),(0,Q.jsx)(`div`,{style:{position:`absolute`,width:400,height:400,borderRadius:`50%`,background:`radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%)`,bottom:-100,left:-80,filter:`blur(50px)`}}),(0,Q.jsxs)(PR,{variant:`outlined`,style:{width:440,borderRadius:20,boxShadow:`0 20px 60px rgba(0,0,0,0.08)`,border:`1px solid #e2e8f0`,background:`#fff`,zIndex:1},styles:{body:{padding:`36px 28px`}},children:[(0,Q.jsxs)(`div`,{style:{textAlign:`center`,marginBottom:28},children:[(0,Q.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,margin:`0 auto 16px`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:s?`transparent`:`linear-gradient(135deg, #6366f1, #8b5cf6)`,boxShadow:s?`none`:`0 8px 24px rgba(99,102,241,0.25)`},children:s?(0,Q.jsx)(`img`,{src:s,alt:`logo`,style:{width:`100%`,height:`100%`,borderRadius:14,objectFit:`contain`}}):(0,Q.jsx)(d6,{style:{fontSize:26,color:`#fff`}})}),(0,Q.jsxs)(Z.Title,{level:3,style:{margin:0,color:`#1e293b`,fontWeight:700},children:[a,(0,Q.jsx)(`span`,{style:{color:`#6366f1`},children:`.AI`})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:14,color:`#94a3b8`},children:`管理后台`})]}),(0,Q.jsxs)(X,{onFinish:async n=>{r(!0);try{await t(n.username,n.password,n.rememberMe),LG.success(`登录成功`),e(`/`)}catch(e){let t=e?.message||`登录失败`;LG.error(t)}finally{r(!1)}},layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`username`,rules:[{required:!0,message:`请输入用户名`}],children:(0,Q.jsx)(hW,{placeholder:`用户名`,size:`large`,prefix:(0,Q.jsx)(k6,{style:{color:`#94a3b8`,marginRight:8}}),style:{background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,height:48,borderRadius:10,fontSize:14}})}),(0,Q.jsx)(X.Item,{name:`password`,rules:[{required:!0,message:`请输入密码`}],children:(0,Q.jsx)(hW.Password,{placeholder:`密码`,size:`large`,prefix:(0,Q.jsx)(d4,{style:{color:`#94a3b8`,marginRight:8}}),style:{background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,height:48,borderRadius:10,fontSize:14}})}),(0,Q.jsx)(X.Item,{name:`rememberMe`,valuePropName:`checked`,style:{marginBottom:12},children:(0,Q.jsx)(oz,{children:`记住我的登录状态`})}),(0,Q.jsx)(X.Item,{style:{marginBottom:8},children:(0,Q.jsx)(qE,{type:`primary`,htmlType:`submit`,loading:n,block:!0,size:`large`,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登录管理后台`})})]})]})]})};o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(JE()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_zh_cn=r(n.dayjs)})(e,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`zh-cn`,weekdays:`星期日_星期一_星期二_星期三_星期四_星期五_星期六`.split(`_`),weekdaysShort:`周日_周一_周二_周三_周四_周五_周六`.split(`_`),weekdaysMin:`日_一_二_三_四_五_六`.split(`_`),months:`一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月`.split(`_`),monthsShort:`1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月`.split(`_`),ordinal:function(e,t){return t===`W`?e+`周`:e+`日`},weekStart:1,yearStart:4,formats:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`YYYY/MM/DD`,LL:`YYYY年M月D日`,LLL:`YYYY年M月D日Ah点mm分`,LLLL:`YYYY年M月D日ddddAh点mm分`,l:`YYYY/M/D`,ll:`YYYY年M月D日`,lll:`YYYY年M月D日 HH:mm`,llll:`YYYY年M月D日dddd HH:mm`},relativeTime:{future:`%s内`,past:`%s前`,s:`几秒`,m:`1 分钟`,mm:`%d 分钟`,h:`1 小时`,hh:`%d 小时`,d:`1 天`,dd:`%d 天`,M:`1 个月`,MM:`%d 个月`,y:`1 年`,yy:`%d 年`},meridiem:function(e,t){var n=100*e+t;return n<600?`凌晨`:n<900?`早上`:n<1100?`上午`:n<1300?`中午`:n<1800?`下午`:`晚上`}};return n.default.locale(r,null,!0),r}))}))(),YE.default.locale(`zh-cn`);var Q5=()=>{let[e,t]=(0,S.useState)(null),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)([(0,YE.default)().startOf(`day`),(0,YE.default)()]),[o,s]=(0,S.useState)(`数据概览`),c=async()=>{r(!0);try{t(await d8(i[0]?.format(`YYYY-MM-DD`)||void 0,i[1]?.format(`YYYY-MM-DD`)||void 0))}catch{}r(!1)},l=async()=>{try{let e=(await y8()).find(e=>e.key===`site_name`);if(e){let t=`${e.value} 管理后台`;s(t),document.title=t}}catch{s(`数据概览`),document.title=`数据概览`}};(0,S.useEffect)(()=>{c(),l()},[]);let u=()=>{let e=[(0,YE.default)().startOf(`day`),(0,YE.default)()];a(e),m(e)},d=()=>{let e=(0,YE.default)().subtract(1,`day`),t=[e.startOf(`day`),e.endOf(`day`)];a(t),m(t)},f=()=>{let e=[(0,YE.default)().startOf(`week`),(0,YE.default)()];a(e),m(e)},p=()=>{let e=[(0,YE.default)().startOf(`month`),(0,YE.default)()];a(e),m(e)},m=e=>{let n=e[0]?.format(`YYYY-MM-DD`)||void 0,i=e[1]?.format(`YYYY-MM-DD`)||void 0;r(!0),d8(n,i).then(e=>{t(e),r(!1)}).catch(()=>{r(!1)})},h=e=>{e&&(a([e[0],e[1]]),m([e[0],e[1]]))},g=e?[{title:`用户数量`,value:e.totalUsers,lastPeriodValue:e.lastPeriodUsers,icon:(0,Q.jsx)(k6,{}),gradient:`linear-gradient(135deg, #667eea 0%, #764ba2 100%)`,prefix:``,suffix:`位用户`,description:`平台注册用户总数`},{title:`总项目数`,value:e.totalProjects,lastPeriodValue:e.lastPeriodProjects,icon:(0,Q.jsx)($4,{}),gradient:`linear-gradient(135deg, #00d4ff 0%, #0099cc 100%)`,prefix:``,suffix:`个项目`,description:`创建的项目总数`},{title:`项目记录`,value:e.totalRecords,lastPeriodValue:e.lastPeriodRecords,icon:(0,Q.jsx)(KV,{}),gradient:`linear-gradient(135deg, #10b981 0%, #059669 100%)`,prefix:``,suffix:`条记录`,description:`项目记录总数`},{title:`创作记录`,value:e.totalGenerations,lastPeriodValue:e.lastPeriodGenerations,icon:(0,Q.jsx)(X4,{}),gradient:`linear-gradient(135deg, #f59e0b 0%, #d97706 100%)`,prefix:``,suffix:`次创作`,description:`AI创作记录总数`}]:[],_=e?[{title:`支付宝收入`,value:e.todayAlipayRevenue,icon:(0,Q.jsx)(F6,{}),gradient:`linear-gradient(135deg, #22c55e 0%, #16a34a 100%)`,prefix:`¥`,suffix:``,description:`支付宝收款`,tag:`支付宝`},{title:`微信收入`,value:e.todayWechatRevenue,icon:(0,Q.jsx)(c2,{}),gradient:`linear-gradient(135deg, #3b82f6 0%, #2563eb 100%)`,prefix:`¥`,suffix:``,description:`微信收款`,tag:`微信支付`},{title:`总收入`,value:e.totalRevenue,lastPeriodValue:e.lastPeriodRevenue,icon:(0,Q.jsx)($1,{}),gradient:`linear-gradient(135deg, #ec4899 0%, #be185d 100%)`,prefix:`¥`,suffix:``,description:`平台总收入`,tag:`总收入`},{title:`消耗积分`,value:e.creditsConsumedToday,lastPeriodValue:e.lastPeriodCreditsConsumed,icon:(0,Q.jsx)(c2,{}),gradient:`linear-gradient(135deg, #ef4444 0%, #dc2626 100%)`,prefix:``,suffix:`积分`,description:`用户消耗积分`,tag:`积分消耗`}]:[],v=({title:e,value:t,lastPeriodValue:r,icon:i,gradient:a,prefix:o=``,suffix:s=``,description:c,tag:l})=>{let u=r!==void 0&&r>0?((t-r)/r*100).toFixed(1):null,d=u!==null&&parseFloat(u)>=0;return(0,Q.jsx)(PR,{bordered:!1,loading:n,hoverable:!0,style:{borderRadius:16,border:`1px solid rgba(0,0,0,0.04)`,background:`#ffffff`,boxShadow:`0 4px 20px rgba(0,0,0,0.05)`,transition:`all 0.3s ease`,overflow:`hidden`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16,padding:`16px 0`},children:[(0,Q.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:a,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:24,color:`#fff`,flexShrink:0,boxShadow:`0 8px 24px rgba(0,0,0,0.1)`},children:i}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`,fontSize:13},children:e}),l&&(0,Q.jsx)(`span`,{style:{fontSize:10,padding:`2px 8px`,borderRadius:10,background:`rgba(99,102,241,0.1)`,color:`#6366f1`,fontWeight:500},children:l})]}),(0,Q.jsxs)(`div`,{style:{fontSize:28,fontWeight:800,color:`#1e293b`,letterSpacing:-.5,marginBottom:2},children:[o,typeof t==`number`?t.toLocaleString():t,s]}),c&&(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`,fontSize:11},children:c}),u!==null&&r!==void 0&&(0,Q.jsxs)(`div`,{style:{marginTop:8,paddingTop:8,borderTop:`1px solid #f1f5f9`,display:`flex`,alignItems:`center`,gap:8},children:[(0,Q.jsxs)(Z.Text,{style:{color:`#94a3b8`,fontSize:11},children:[`上一周期: `,o,r.toLocaleString(),s]}),(0,Q.jsxs)(`span`,{style:{fontSize:11,fontWeight:500,color:d?`#10b981`:`#ef4444`,display:`flex`,alignItems:`center`,gap:2},children:[d?`↑`:`↓`,` `,Math.abs(parseFloat(u)),`%`]})]})]})]})})};return(0,Q.jsxs)(`div`,{style:{padding:0},children:[(0,Q.jsxs)(`div`,{style:{background:`linear-gradient(135deg, #667eea 0%, #764ba2 100%)`,padding:`24px 24px 32px`,borderRadius:0,marginBottom:-24,position:`relative`,overflow:`hidden`},children:[(0,Q.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`rgba(255,255,255,0.1)`,borderRadius:`50%`}}),(0,Q.jsx)(`div`,{style:{position:`absolute`,bottom:-30,left:-30,width:150,height:150,background:`rgba(255,255,255,0.08)`,borderRadius:`50%`}}),(0,Q.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,Q.jsx)(Z.Title,{level:2,style:{color:`#fff`,marginBottom:4,fontWeight:700},children:o}),(0,Q.jsx)(Z.Text,{style:{color:`rgba(255,255,255,0.8)`,fontSize:14},children:`欢迎回来,查看平台运营数据统计`})]})]}),(0,Q.jsxs)(`div`,{style:{marginTop:40},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,alignItems:`center`,gap:12,flexWrap:`wrap`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{type:!i[0]||!i[1]||i[0]?.isSame((0,YE.default)().startOf(`day`))&&i[1]?.isSame((0,YE.default)(),`day`)?`primary`:`default`,size:`small`,onClick:u,children:`今日`}),(0,Q.jsx)(qE,{type:`default`,size:`small`,onClick:d,children:`昨日`}),(0,Q.jsx)(qE,{type:`default`,size:`small`,onClick:f,children:`本周`}),(0,Q.jsx)(qE,{type:`default`,size:`small`,onClick:p,children:`本月`})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,background:`#fff`,border:`1px solid #e2e8f0`,padding:`6px 12px`,borderRadius:8,boxShadow:`0 1px 2px rgba(0,0,0,0.05)`},children:[(0,Q.jsx)(zB,{style:{color:`#64748b`,fontSize:14}}),(0,Q.jsx)(YB.RangePicker,{value:i,onChange:h,placeholder:[`开始日期`,`结束日期`],size:`small`})]})]}),(0,Q.jsxs)(`div`,{style:{marginBottom:16,paddingLeft:4},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#1e293b`,fontSize:15},children:`核心数据`}),(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`,fontSize:12,marginLeft:8},children:`平台基础运营指标`})]}),(0,Q.jsx)(DK,{gutter:[16,16],children:g.map(e=>(0,Q.jsx)(pz,{xs:12,sm:8,lg:6,children:(0,Q.jsx)(v,{...e})},e.title))})]}),(0,Q.jsxs)(`div`,{style:{marginTop:24},children:[(0,Q.jsxs)(`div`,{style:{marginBottom:16,paddingLeft:4},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#1e293b`,fontSize:15},children:`财务统计`}),(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`,fontSize:12,marginLeft:8},children:`收入与消耗数据`})]}),(0,Q.jsx)(DK,{gutter:[16,16],children:_.map(e=>(0,Q.jsx)(pz,{xs:12,sm:8,lg:6,children:(0,Q.jsx)(v,{...e})},e.title))})]})]})};function $5(e){if(!e)return`-`;let t=e.trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);return n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``),t.replace(`T`,` `).slice(0,16)}var e7=e=>e instanceof Error?e:Error(typeof e==`string`?e:`上传失败`),t7=e=>{if(e instanceof File)return e;throw Error(`请选择有效图片文件`)},n7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(20),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(null),[v]=X.useForm(),[y]=X.useForm(),b=async(e,n)=>{a(!0);try{let i=await l5({page:e||o,page_size:n||c});t(i.items||[]),r(i.total||0)}catch{LG.error(`加载开户方式列表失败`)}finally{a(!1)}};(0,S.useEffect)(()=>{b()},[]);let x=async()=>{try{let e=await v.validateFields();console.log(e),await d5({open_type:e.open_type,type_name:e.type_name,description:e.description,thumb:e.thumb}),LG.success(`创建成功`),d(!1),v.resetFields(),b()}catch(e){LG.error(e?.message||`创建失败`)}},C=async e=>{try{_(await u5(e)),p(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},w=async e=>{try{let t=await u5(e);_(t),y.setFieldsValue({open_type:t.open_type,type_name:t.type_name,description:t.description,thumb:t.thumb}),h(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},T=async()=>{if(g)try{let e=await y.validateFields();await f5(g.id,{open_type:e.open_type,type_name:e.type_name,description:e.description,thumb:e.thumb}),LG.success(`更新成功`),h(!1),y.resetFields(),_(null),b()}catch(e){LG.error(e?.message||`更新失败`)}},E=e=>{BG.confirm({title:`确认删除`,content:`确定要删除这个开户方式吗?`,okText:`删除`,okType:`danger`,cancelText:`取消`,onOk:async()=>{try{await p5(e),LG.success(`删除成功`),b()}catch(e){LG.error(e?.message||`删除失败`)}}})};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(q2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`平台开户方式管理`})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>d(!0),children:`新增`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>b(),children:`刷新`})]})]}),(0,Q.jsx)(bQ,{columns:[{title:`ID`,dataIndex:`id`,width:100,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`开户类型`,dataIndex:`open_type`,width:100,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`类型名称`,dataIndex:`type_name`,width:150,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`描述`,dataIndex:`description`,width:250,ellipsis:!0,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:e})},{title:`缩略图`,dataIndex:`thumb`,width:120,render:e=>e?(0,Q.jsx)(`img`,{src:e,alt:`thumb`,style:{width:80,height:60,objectFit:`cover`}}):`-`},{title:`创建时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:$5(e)})},{title:`更新时间`,dataIndex:`updatedAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:$5(e)})},{title:`操作`,width:200,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(qU,{}),size:`small`,onClick:()=>C(t.id),children:`详情`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(zQ,{}),size:`small`,onClick:()=>w(t.id),children:`更新`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(IQ,{}),size:`small`,danger:!0,onClick:()=>E(t.id),children:`删除`})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:c,total:n,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{s(e),l(t),b(e,t)}},scroll:{x:1e3}})]}),(0,Q.jsx)(BG,{title:`新增开户方式`,open:u,onOk:x,onCancel:()=>{d(!1),v.resetFields()},okText:`创建`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:v,layout:`vertical`,children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户方式Id`,style:{flex:1},rules:[{required:!0,message:`请输入开户方式Id`}],children:(0,Q.jsx)(oB,{style:{width:`100%`},min:1,placeholder:`请输入开户方式Id`})}),(0,Q.jsx)(X.Item,{name:`type_name`,label:`类型名称`,style:{flex:1},rules:[{required:!0,message:`请输入类型名称`},{max:100,message:`类型名称不能超过100个字符`}],children:(0,Q.jsx)(hW,{style:{width:`100%`},placeholder:`请输入类型名称`})})]}),(0,Q.jsx)(X.Item,{name:`description`,label:`描述`,rules:[{required:!0,message:`请输入描述`}],children:(0,Q.jsx)(hW.TextArea,{placeholder:`请输入描述`,rows:4})}),(0,Q.jsx)(X.Item,{name:`thumb`,label:`缩略图`,children:(0,Q.jsx)(E1,{listType:`picture-card`,customRequest:async({file:e,onSuccess:t,onError:n})=>{try{let n=await F5(t7(e));console.log(n),v.setFieldsValue({thumb:n.url}),t?.({url:n.url})}catch(e){n?.(e7(e))}},children:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(E6,{style:{fontSize:24,color:`#999`}}),(0,Q.jsx)(`div`,{style:{marginTop:8},children:`上传图片`})]})})})]})}),(0,Q.jsx)(BG,{title:`开户方式详情`,open:f,onCancel:()=>{p(!1),_(null)},okText:`关闭`,cancelText:`取消`,width:600,children:g&&(0,Q.jsxs)(`div`,{style:{lineHeight:`2`},children:[(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`ID:`}),` `,g.id]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`开户类型:`}),` `,g.open_type]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`类型名称:`}),` `,g.type_name]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`描述:`}),` `,g.description]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`缩略图:`}),` `,g.thumb?(0,Q.jsx)(`img`,{src:g.thumb,alt:`thumb`,style:{width:120,height:80,objectFit:`cover`}}):`-`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`创建时间:`}),` `,$5(g.createdAt)]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`更新时间:`}),` `,$5(g.updatedAt)]})]})}),(0,Q.jsx)(BG,{title:`更新开户方式`,open:m,onOk:T,onCancel:()=>{h(!1),y.resetFields(),_(null)},okText:`更新`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:y,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户类型`,rules:[{required:!0,message:`请输入开户类型`}],children:(0,Q.jsx)(oB,{min:1,placeholder:`请输入开户类型编号`})}),(0,Q.jsx)(X.Item,{name:`type_name`,label:`类型名称`,rules:[{required:!0,message:`请输入类型名称`},{max:100,message:`类型名称不能超过100个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入类型名称`})}),(0,Q.jsx)(X.Item,{name:`description`,label:`描述`,rules:[{required:!0,message:`请输入描述`}],children:(0,Q.jsx)(hW.TextArea,{placeholder:`请输入描述`,rows:4})}),(0,Q.jsx)(X.Item,{name:`thumb`,label:`缩略图`,children:(0,Q.jsx)(E1,{listType:`picture-card`,defaultFileList:g?.thumb?[{uid:`1`,name:`thumb`,status:`done`,url:g.thumb}]:[],customRequest:async({file:e,onSuccess:t,onError:n})=>{try{let n=await F5(t7(e));y.setFieldsValue({thumb:n.url}),t?.({url:n.url})}catch(e){n?.(e7(e))}},children:!y.getFieldValue(`thumb`)&&(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(E6,{style:{fontSize:24,color:`#999`}}),(0,Q.jsx)(`div`,{style:{marginTop:8},children:`上传图片`})]})})})]})})]})},r7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(`frontend`),[c,l]=(0,S.useState)(``),[u,d]=(0,S.useState)({open:!1,user:null}),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(`frontend`),[g,_]=(0,S.useState)({open:!1,user:null}),[v,y]=(0,S.useState)([]),[b,x]=(0,S.useState)([]),[C,w]=(0,S.useState)({open:!1,user:null}),[T]=X.useForm(),[E]=X.useForm(),[D]=X.useForm(),[O,k]=(0,S.useState)(1),[A,j]=(0,S.useState)(20),[M,N]=(0,S.useState)(0),[P,F]=(0,S.useState)([]),[I]=X.useForm(),[L,R]=(0,S.useState)(!1),z=async()=>{r(!0);try{let e=await f8(O,A,i||void 0,o,o===`frontend`&&c||void 0);t(e.items||[]),N(e.total||0)}catch{}r(!1)};(0,S.useEffect)(()=>{z()},[O,A,i,o,c]),(0,S.useEffect)(()=>{(async()=>{try{let e=(await y8()).filter(e=>e.key.startsWith(`user_`)&&e.key.includes(`credits`));F(e);let t={};e.forEach(e=>{t[e.key]=e.value}),I.setFieldsValue(t)}catch{}})()},[]);let B=async()=>{try{let e=await I.validateFields();R(!0);for(let t of P){let n=e[t.key];n!==void 0&&n!==t.value&&await b8(t.id,n??``)}LG.success(`积分配置已保存`),F((await y8()).filter(e=>e.key.startsWith(`user_`)&&e.key.includes(`credits`))),R(!1)}catch(e){R(!1),LG.error(e?.message||`保存失败`)}},V=(e,t)=>{k(e),j(t)},H=()=>z(),U=async()=>{try{let e=await T.validateFields(),{user:t}=u;if(!t)return;await m8(t.id,e.amount,e.description),LG.success(`已${e.amount>0?`增加`:`扣除`} ${Math.abs(e.amount)} 积分`),d({open:!1,user:null}),T.resetFields(),z()}catch{}},W=async e=>{await h8(e.id,!e.isActive),LG.success(e.isActive?`已禁用该用户`:`已启用该用户`),z()},ee=async()=>{try{let e=await E.validateFields(),t=e.user_type||`frontend`;await Y8({username:t===`admin`?e.username:void 0,password:e.password,email:e.email||void 0,phone:t===`frontend`?e.phone:e.phone||void 0,credits:e.credits||0,user_type:t,frontend_user_kind:e.frontend_user_kind||`external`}),LG.success(`用户创建成功`),p(!1),E.resetFields(),h(`frontend`),z()}catch{}},te=async e=>{try{let t=await K8(),n=e.userType===`admin`;y(t.filter(e=>{let t=e.menu_target??e.menuTarget??`frontend`;return n?t===`admin`||t===`both`:t===`frontend`||t===`both`})),x(e.allowedMenus||[]),_({open:!0,user:e})}catch{LG.error(`加载菜单失败`)}},ne=v.filter(e=>(e.menu_type??e.menuType)===`group`),re=v.filter(e=>(e.menu_type??e.menuType)!==`group`),ie={};re.filter(e=>e.parent_id??e.parentId).forEach(e=>{let t=e.parent_id??e.parentId;ie[t]||(ie[t]=[]),ie[t].push(e)});let ae=re.filter(e=>!(e.parent_id??e.parentId)),G=async()=>{let{user:e}=g;if(e)try{await X8(e.id,b.length>0?b:null),LG.success(`菜单权限已更新`),_({open:!1,user:null}),z()}catch(e){LG.error(e?.message||`保存失败`)}},oe=async()=>{try{let e=await D.validateFields(),{user:t}=C;if(!t)return;await Z8(t.id,e.newPassword),LG.success(`已重置 ${t.username} 的密码`),w({open:!1,user:null}),D.resetFields()}catch{}},K=async(e,t)=>{try{await p8(e.id,t),LG.success(t===`internal`?`已设为前台内部用户`:`已设为前台外部用户`),z()}catch(e){LG.error(e?.message||`设置失败`)}},se=o===`admin`,ce=[{title:`用户`,key:`user`,width:200,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:t.isAdmin?`linear-gradient(135deg, #f59e0b, #f97316)`:`linear-gradient(135deg, #6366f1, #8b5cf6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:13,fontWeight:700},children:t.username.charAt(0).toUpperCase()}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{fontWeight:600},children:[t.username,t.isAdmin&&(0,Q.jsx)(NQ,{color:`orange`,style:{marginLeft:6,fontSize:10},children:`管理员`})]}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.email})]})]})},...se?[]:[{title:`积分余额`,dataIndex:`credits`,width:120,sorter:(e,t)=>e.credits-t.credits,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,style:{color:e>0?`#10b981`:`#ef4444`,fontSize:15},children:e.toLocaleString()})}],{title:`手机号`,dataIndex:`phone`,width:130,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,children:e||`-`})},...se?[]:[{title:`前台归类`,dataIndex:`frontendUserKind`,width:110,render:e=>(0,Q.jsx)(NQ,{color:e===`internal`?`geekblue`:`default`,children:e===`internal`?`内部用户`:`外部用户`})}],{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`red`,children:e?`正常`:`禁用`})},{title:`注册时间`,dataIndex:`createdAt`,width:120,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:$5(e)})},{title:`最后登录`,dataIndex:`lastLoginAt`,width:140,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:$5(e)})},{title:`操作`,key:`action`,width:320,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[!se&&(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(F6,{}),onClick:()=>{d({open:!0,user:t}),T.resetFields()},children:`调整积分`}),!se&&t.frontendUserKind!==`internal`&&(0,Q.jsx)(qE,{type:`link`,size:`small`,onClick:()=>K(t,`internal`),children:`设为内部`}),!se&&t.frontendUserKind===`internal`&&(0,Q.jsx)(qE,{type:`link`,size:`small`,onClick:()=>K(t,`external`),children:`取消内部`}),(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(C4,{}),onClick:()=>te(t),children:`菜单权限`}),(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(d4,{}),onClick:()=>{w({open:!0,user:t}),D.resetFields()},children:`重置密码`}),(0,Q.jsx)(WG,{title:t.isActive?`确定禁用该用户?`:`确定启用该用户?`,onConfirm:()=>W(t),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:t.isActive,icon:t.isActive?(0,Q.jsx)(n6,{}):(0,Q.jsx)(M0,{}),children:t.isActive?`禁用`:`启用`})})]})}];return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:20},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:`#6366f1`},children:(0,Q.jsx)(k3,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:4,style:{margin:0},children:`积分配置`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`设置用户注册和登录赠送的积分`})]})]}),(0,Q.jsxs)(X,{form:I,layout:`vertical`,children:[(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr 1fr`,gap:20},children:[(0,Q.jsx)(X.Item,{name:`user_register_credits`,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:`注册赠送积分`}),extra:`用户注册时赠送的初始积分`,children:(0,Q.jsx)(oB,{min:0,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`user_login_credits`,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:`每日登录赠送积分`}),extra:`用户每日首次登录赠送的积分`,children:(0,Q.jsx)(oB,{min:0,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`user_login_credits_enabled`,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:`启用每日登录积分`}),extra:`是否开启每日登录赠送积分功能`,children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(Mq,{defaultChecked:P.find(e=>e.key===`user_login_credits_enabled`)?.value===`true`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:13},children:P.find(e=>e.key===`user_login_credits_enabled`)?.value===`true`?`已启用`:`已禁用`})]})})]}),(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:16},children:(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(b3,{}),onClick:B,loading:L,size:`large`,style:{borderRadius:8},children:`保存配置`})})]})]}),(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,Q.jsx)(hW,{placeholder:`搜索用户名或手机号`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),value:i,onChange:e=>a(e.target.value),onPressEnter:H,style:{width:280,borderRadius:8},allowClear:!0}),!se&&(0,Q.jsx)(RC,{value:c,onChange:e=>{k(1),l(e)},style:{width:140},options:[{value:``,label:`全部前台用户`},{value:`internal`,label:`内部用户`},{value:`external`,label:`外部用户`}]}),(0,Q.jsx)(qE,{type:`primary`,onClick:H,style:{borderRadius:8},children:`搜索`})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>{h(o),E.setFieldsValue({user_type:o}),p(!0)},style:{borderRadius:8},children:`创建用户`})]}),(0,Q.jsx)(bR,{activeKey:o,onChange:e=>{s(e),l(``),k(1)},items:[{key:`frontend`,label:`前台用户`},{key:`admin`,label:`后台用户`}]}),(0,Q.jsx)(bQ,{columns:ce,dataSource:e,rowKey:`id`,loading:n,pagination:{current:O,pageSize:A,total:M,onChange:V,showSizeChanger:!0,showTotal:e=>`共 ${e} 个用户`},scroll:{x:1e3}})]}),(0,Q.jsxs)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(F6,{}),`调整积分 - `,u.user?.username]}),open:u.open,onOk:U,onCancel:()=>{d({open:!1,user:null}),T.resetFields()},okText:`确认`,cancelText:`取消`,width:440,children:[(0,Q.jsxs)(`div`,{style:{marginBottom:16,padding:`12px 16px`,background:`#f8fafc`,borderRadius:8},children:[(0,Q.jsx)(`span`,{style:{color:`#64748b`},children:`当前积分:`}),(0,Q.jsx)(`span`,{style:{fontWeight:800,fontSize:18,color:`#6366f1`},children:u.user?.credits.toLocaleString()})]}),(0,Q.jsxs)(X,{form:T,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`amount`,label:`积分变动`,rules:[{required:!0,message:`请输入积分数量`}],children:(0,Q.jsx)(oB,{style:{width:`100%`},size:`large`,placeholder:`正数增加,负数扣除`,formatter:e=>`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,`,`)})}),(0,Q.jsx)(X.Item,{name:`description`,label:`原因`,rules:[{required:!0,message:`请输入调整原因`}],children:(0,Q.jsx)(hW.TextArea,{rows:2,placeholder:`请输入调整原因`,size:`large`})})]})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(k6,{}),`创建用户`]}),open:f,onOk:ee,onCancel:()=>{p(!1),E.resetFields(),h(`frontend`)},okText:`创建`,cancelText:`取消`,width:480,children:(0,Q.jsxs)(X,{form:E,layout:`vertical`,style:{marginTop:16},onValuesChange:e=>{e.user_type&&h(e.user_type)},children:[(0,Q.jsx)(X.Item,{name:`user_type`,label:`用户类型`,initialValue:`frontend`,rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`frontend`,label:`前端用户`},{value:`admin`,label:`后台管理员`}]})}),m===`frontend`&&(0,Q.jsx)(X.Item,{name:`frontend_user_kind`,label:`前台归类`,initialValue:`external`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`external`,label:`外部用户`},{value:`internal`,label:`内部用户`}]})}),m===`frontend`?(0,Q.jsx)(X.Item,{name:`phone`,label:`手机号`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,Q.jsx)(hW,{placeholder:`请输入手机号`,maxLength:11,size:`large`})}):(0,Q.jsx)(X.Item,{name:`username`,label:`用户名`,rules:[{required:!0,message:`请输入用户名`}],children:(0,Q.jsx)(hW,{placeholder:`请输入用户名`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`password`,label:`密码`,rules:[{required:!0,min:6,message:`密码至少6位`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请输入密码(至少6位)`,size:`large`})}),m===`frontend`&&(0,Q.jsx)(X.Item,{name:`credits`,label:`初始积分`,initialValue:0,children:(0,Q.jsx)(oB,{min:0,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`email`,label:`邮箱`,children:(0,Q.jsx)(hW,{placeholder:`选填`,size:`large`})})]})}),(0,Q.jsxs)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(C4,{}),`菜单权限 - `,g.user?.username,` (`,g.user?.userType===`admin`?`后台菜单`:`前台菜单`,`)`]}),open:g.open,onOk:G,onCancel:()=>{_({open:!1,user:null})},okText:`保存`,cancelText:`取消`,width:520,children:[(0,Q.jsx)(`div`,{style:{marginBottom:12},children:(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:13},children:`勾选该用户可访问的菜单,不勾选则显示全部菜单`})}),(0,Q.jsx)(`div`,{style:{padding:`12px 16px`,background:`#f8fafc`,borderRadius:8,maxHeight:400,overflow:`auto`},children:(0,Q.jsx)(oz.Group,{value:b,onChange:e=>x(e),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:8,style:{width:`100%`},children:[ae.map(e=>(0,Q.jsxs)(oz,{value:e.path,style:{width:`100%`},children:[e.label,(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,marginLeft:8},children:e.path})]},e.path)),ne.map(e=>{let t=ie[e.id]||[];return t.length===0?null:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{fontWeight:600,fontSize:13,color:`#6366f1`,marginBottom:4,marginTop:4},children:e.label}),(0,Q.jsx)(VV,{direction:`vertical`,size:4,style:{paddingLeft:12,width:`100%`},children:t.map(e=>(0,Q.jsxs)(oz,{value:e.path,style:{width:`100%`},children:[e.label,(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,marginLeft:8},children:e.path})]},e.path))})]},e.id)})]})})})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(d4,{}),`重置密码 - `,C.user?.username]}),open:C.open,onOk:oe,onCancel:()=>{w({open:!1,user:null}),D.resetFields()},okText:`确认重置`,cancelText:`取消`,width:420,children:(0,Q.jsx)(X,{form:D,layout:`vertical`,style:{marginTop:16},children:(0,Q.jsx)(X.Item,{name:`newPassword`,label:`新密码`,rules:[{required:!0,min:6,message:`密码至少6位`}],children:(0,Q.jsx)(hW.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`})})})})]})},i7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)({open:!1,model:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t(await g8())}catch{}r(!1)};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={name:e.name,provider:e.provider,model_name:e.modelName,api_base:e.apiBase,api_key:e.apiKey,weight:e.weight,max_tokens:e.maxTokens,temperature:e.temperature,is_active:e.isActive??!0,priority:e.priority??0};i.model?.id?await _8({id:i.model.id,...t}):await _8(t),LG.success(i.model?.id?`模型配置已更新`:`模型配置已添加`),a({open:!1,model:null}),o.resetFields(),s()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},l=async e=>{try{await v8(e),LG.success(`模型配置已删除`),s()}catch(e){LG.error(e?.message||`删除失败`)}},u=e=>{a({open:!0,model:e||null}),e?o.setFieldsValue(e):(o.resetFields(),o.setFieldsValue({provider:`sdk`,weight:1,maxTokens:4096,temperature:.7,isActive:!0,priority:0}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(Z.Text,{type:`secondary`,children:[`共 `,e.length,` 个模型配置,按权重进行加权随机调度`]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加模型`})]}),(0,Q.jsx)(bQ,{columns:[{title:`模型名称`,dataIndex:`name`,width:150,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:t.isActive?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`linear-gradient(135deg, #94a3b8, #cbd5e1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:14},children:(0,Q.jsx)(c3,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{fontWeight:600},children:e}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.modelName})]})]})},{title:`提供商`,dataIndex:`provider`,width:140,render:e=>(0,Q.jsx)(NQ,{color:e===`mock`?`default`:`blue`,children:{sdk:`SDK模式`,openai_compatible:`OpenAI兼容`,mock:`Mock模式`}[e]||e})},{title:`API地址`,dataIndex:`apiBase`,width:200,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},ellipsis:!0,children:e||`-`})},{title:`权重`,dataIndex:`weight`,width:80,sorter:(e,t)=>e.weight-t.weight},{title:`Max Tokens`,dataIndex:`maxTokens`,width:100},{title:`Temperature`,dataIndex:`temperature`,width:100,render:e=>e.toFixed(1)},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除该模型配置?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(c3,{}),i.model?.id?`编辑模型`:`添加模型`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,model:null}),o.resetFields()},okText:`确认`,cancelText:`取消`,width:560,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`name`,label:`显示名称`,rules:[{required:!0,message:`请输入模型名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:GPT-4o`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`provider`,label:`提供商`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`sdk`,label:`SDK模式`},{value:`openai_compatible`,label:`OpenAI兼容`},{value:`mock`,label:`Mock模式`}]})}),(0,Q.jsx)(X.Item,{name:`modelName`,label:`模型标识`,style:{flex:1},rules:[{required:!0,message:`请输入模型标识`}],children:(0,Q.jsx)(hW,{placeholder:`例如:gpt-4o`,size:`large`})})]}),(0,Q.jsx)(X.Item,{name:`apiBase`,label:`API地址`,children:(0,Q.jsx)(hW,{placeholder:`https://api.openai.com/v1`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`apiKey`,label:`API Key`,children:(0,Q.jsx)(hW.Password,{placeholder:`sk-****`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`weight`,label:`权重`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:0,max:10,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`maxTokens`,label:`Max Tokens`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:256,max:128e3,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`temperature`,label:`Temperature`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:0,max:2,step:.1,style:{width:`100%`},size:`large`})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`priority`,label:`优先级`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:0,max:10,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用`,valuePropName:`checked`,style:{flex:1,paddingTop:30},children:(0,Q.jsx)(Mq,{})})]})]})})]})},a7=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(``),[c]=X.useForm(),[l,u]=(0,S.useState)(``);(0,S.useEffect)(()=>{d()},[]);let d=async()=>{r(!0);let e=await y8();t(e);let n={};e.forEach(e=>{n[e.key]=e.value}),c.setFieldsValue(n),r(!1)},f=async()=>{try{let n=await c.validateFields();a(!0);for(let t of e){let e=n[t.key];e!==void 0&&e!==t.value&&await b8(t.id,e??``)}LG.success(`系统配置已保存`),t(await y8()),a(!1)}catch(e){a(!1),LG.error(e?.message||`保存失败`)}},p=async(e,n)=>{s(n);try{let r=await x8(e,n);t(e=>e.map(e=>e.key===n?{...e,value:r.url}:e)),c.setFieldsValue({[n]:r.url}),LG.success(`PDF上传成功`)}catch{LG.error(`上传失败`)}finally{s(``)}return!1},m=async e=>{s(`site_logo`);try{let n=await S8(e);t(e=>e.map(e=>e.key===`site_logo`?{...e,value:n.url}:e)),c.setFieldsValue({site_logo:n.url}),u(n.url),LG.success(`Logo上传成功`)}catch{LG.error(`上传失败`)}finally{s(``)}return!1},h={站点信息:e.filter(e=>e.key.startsWith(`site_`)),协议配置:e.filter(e=>e.key===`user_agreement_url`||e.key===`privacy_policy_url`),"SEO 设置":e.filter(e=>e.key.startsWith(`seo_`)),用户积分配置:e.filter(e=>e.key.startsWith(`user_`)&&e.key.includes(`credits`))},g=e=>({site_name:`平台显示名称,将展示在页面标题和导航栏`,site_logo:`平台Logo图片URL,建议尺寸 200x40px`,user_agreement_url:`用户注册/登录时需同意的用户协议PDF文件`,privacy_policy_url:`用户注册/登录时需同意的隐私政策PDF文件`,seo_title:`搜索引擎结果中显示的标题`,seo_description:`搜索引擎结果中显示的描述文字,建议150字以内`,seo_keywords:`用逗号分隔的关键词列表`,user_register_credits:`用户注册时赠送的初始积分,默认100`,user_login_credits:`用户每日登录赠送的积分数量`,user_login_credits_enabled:`是否启用每日登录赠送积分功能`})[e.key]||e.description||``,_=e=>e.key===`site_logo`?(0,Q.jsx)(v,{config:e}):e.key===`seo_description`?(0,Q.jsx)(hW.TextArea,{rows:3,placeholder:e.description,size:`large`}):e.key===`seo_keywords`?(0,Q.jsx)(hW,{placeholder:`关键词1, 关键词2, 关键词3`,size:`large`}):e.key===`user_login_credits_enabled`?(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(Mq,{defaultChecked:e.value===`true`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:13},children:e.value===`true`?`已启用`:`已禁用`})]}):e.key===`user_register_credits`||e.key===`user_login_credits`?(0,Q.jsx)(hW,{type:`number`,min:0,placeholder:e.description,size:`large`}):(0,Q.jsx)(hW,{placeholder:e.description,size:`large`}),v=({config:e})=>{let n=e.value&&e.value.startsWith(`/uploads/`),r=n?`http://ceshi.apiforeign.minzhong.cn${e.value}`:``;return(0,Q.jsxs)(`div`,{style:{padding:`16px`,borderRadius:10,border:`1px solid #f0f0f5`,background:`#fafbfc`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(E6,{style:{color:`#6366f1`,fontSize:18}}),(0,Q.jsx)(Z.Text,{strong:!0,children:`网站Logo`})]}),(0,Q.jsxs)(VV,{children:[n&&(0,Q.jsx)(qE,{size:`small`,danger:!0,onClick:()=>{t(e=>e.map(e=>e.key===`site_logo`?{...e,value:``}:e)),c.setFieldsValue({site_logo:``}),LG.success(`Logo已移除`)},children:`移除`}),(0,Q.jsx)(E1,{accept:`image/*`,showUploadList:!1,beforeUpload:m,children:(0,Q.jsx)(qE,{size:`small`,type:`primary`,icon:(0,Q.jsx)(E6,{}),loading:o===`site_logo`,children:n?`重新上传`:`上传Logo`})})]})]}),n?(0,Q.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,Q.jsx)(`img`,{src:r,alt:`Logo预览`,style:{maxWidth:200,maxHeight:80,objectFit:`contain`,border:`1px solid #e2e8f0`,borderRadius:8,padding:8}}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12,display:`block`,marginTop:8},children:`建议尺寸:200x40px,支持 PNG、JPG 格式`})]}):(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:`尚未上传Logo,将使用系统默认Logo`})]})},y=({config:e})=>{let t=e.key===`user_agreement_url`?`用户协议`:`隐私政策`,n=e.value&&e.value.startsWith(`/uploads/`);return(0,Q.jsxs)(`div`,{style:{padding:`16px`,borderRadius:10,border:`1px solid #f0f0f5`,background:`#fafbfc`,marginBottom:12},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(b2,{style:{color:`#ef4444`,fontSize:18}}),(0,Q.jsx)(Z.Text,{strong:!0,children:t})]}),(0,Q.jsxs)(VV,{children:[n&&(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>window.open(`http://localhost:8000${e.value}`,`_blank`),children:`预览`}),(0,Q.jsx)(E1,{accept:`.pdf`,showUploadList:!1,beforeUpload:t=>p(t,e.key),children:(0,Q.jsx)(qE,{size:`small`,type:`primary`,icon:(0,Q.jsx)(E6,{}),loading:o===e.key,children:n?`重新上传`:`上传PDF`})})]})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:n?`已上传: ${e.value}`:`尚未上传,前台将不显示对应链接`})]})};return n?(0,Q.jsx)(PR,{loading:!0,variant:`outlined`,style:{borderRadius:12}}):(0,Q.jsxs)(`div`,{style:{maxWidth:720},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:24},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:`#6366f1`},children:(0,Q.jsx)(k3,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:4,style:{margin:0},children:`系统设置`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`管理站点基础信息、协议文件和SEO配置`})]})]}),(0,Q.jsx)(X,{form:c,layout:`vertical`,children:Object.entries(h).map(([e,t])=>(0,Q.jsxs)(`div`,{style:{marginBottom:24},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14,display:`block`,marginBottom:12,paddingBottom:8,borderBottom:`1px solid #f0f0f5`},children:e}),e===`协议配置`?t.map(e=>(0,Q.jsx)(y,{config:e},e.id)):t.map(e=>(0,Q.jsx)(X.Item,{name:e.key,label:(0,Q.jsx)(`span`,{style:{fontWeight:500},children:e.description}),extra:g(e),children:_(e)},e.id))]},e))})]}),(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`},children:(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(b3,{}),onClick:f,loading:i,size:`large`,style:{borderRadius:8,minWidth:140},children:`保存配置`})})]})},$te=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(!1),[c]=X.useForm(),[l,u]=(0,S.useState)({open:!1,notifId:``,title:``}),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(1),[_,v]=(0,S.useState)(10),[y,b]=(0,S.useState)(0),x=async()=>{r(!0);try{let e=await H8(h,_),n=(await f8(1,1e3)).items||[],r={};n.forEach(e=>{r[e.id]=e.username}),t((e.items||[]).map(e=>({id:e.id,title:e.title,content:e.content,type:e.type,targetUserId:e.userId||null,target:e.userId?r[e.userId]||e.userId:`全部用户`,createdAt:e.createdAt}))),b(e.total||0),a(n.map(e=>({id:e.id,username:e.username})))}catch{LG.error(`加载通知列表失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{x()},[h,_]);let C=(e,t)=>{g(e),v(t)},w=async()=>{try{let e=await c.validateFields();await U8({title:e.title,content:e.content,type:e.type||`system`,target_user_id:e.target_user_id||void 0}),LG.success(`消息已发送`),s(!1),c.resetFields(),x()}catch{}},T=async e=>{try{await W8(e),LG.success(`已删除`),x()}catch(e){LG.error(e?.message||`删除失败`)}},E=async(e,t)=>{u({open:!0,notifId:e,title:t}),m(!0);try{f((await G8(e)).items||[])}catch{LG.error(`加载已读列表失败`)}finally{m(!1)}},D=e=>{switch(e){case`system`:return`blue`;case`credit`:return`orange`;case`promo`:return`purple`;default:return`default`}};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(d0,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`消息推送管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[`共 `,y,` 条消息`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>s(!0),style:{borderRadius:8},children:`发送新消息`})]}),(0,Q.jsx)(bQ,{columns:[{title:`标题`,dataIndex:`title`,width:200,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`内容`,dataIndex:`content`,ellipsis:!0},{title:`类型`,dataIndex:`type`,width:80,render:e=>(0,Q.jsx)(NQ,{color:D(e),children:{system:`系统`,credit:`积分`,promo:`活动`}[e]||e})},{title:`发送目标`,dataIndex:`target`,width:120,render:e=>(0,Q.jsx)(NQ,{color:e===`全部用户`?`green`:`blue`,children:e})},{title:`发送时间`,dataIndex:`createdAt`,width:160,render:e=>$5(e)},{title:`操作`,key:`action`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>E(t.id,t.title),children:`已读`}),(0,Q.jsx)(WG,{title:`确定删除该消息?`,onConfirm:()=>T(t.id),children:(0,Q.jsx)(qE,{type:`link`,danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:{current:h,pageSize:_,total:y,onChange:C,showSizeChanger:!0,showTotal:e=>`共 ${e} 条消息`},scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(E3,{}),`发送消息`]}),open:o,onOk:w,onCancel:()=>{s(!1),c.resetFields()},okText:`发送`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`title`,label:`消息标题`,rules:[{required:!0,message:`请输入标题`}],children:(0,Q.jsx)(hW,{placeholder:`请输入消息标题`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`content`,label:`消息内容`,rules:[{required:!0,message:`请输入内容`}],children:(0,Q.jsx)(hW.TextArea,{rows:4,placeholder:`请输入消息内容`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`type`,label:`消息类型`,style:{flex:1},initialValue:`system`,rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`system`,label:`系统通知`},{value:`credit`,label:`积分通知`},{value:`promo`,label:`活动通知`}]})}),(0,Q.jsx)(X.Item,{name:`target_user_id`,label:`发送目标`,style:{flex:1},extra:`留空则发送给全部用户`,children:(0,Q.jsx)(RC,{size:`large`,allowClear:!0,placeholder:`全部用户`,options:i.map(e=>({value:e.id,label:e.username}))})})]})]})}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(c6,{}),`已读用户 — `,l.title]}),open:l.open,onCancel:()=>{u({open:!1,notifId:``,title:``}),f([])},footer:null,width:480,children:p?(0,Q.jsx)(`div`,{style:{textAlign:`center`,padding:40},children:`加载中...`}):d.length===0?(0,Q.jsx)(pC,{description:`暂无用户已读`,style:{padding:`40px 0`}}):(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{marginBottom:12,color:`#64748b`,fontSize:13},children:[`共 `,d.length,` 人已读`]}),(0,Q.jsx)(bQ,{dataSource:d,rowKey:`userId`,pagination:!1,size:`small`,columns:[{title:`用户名`,dataIndex:`username`,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`已读时间`,dataIndex:`readAt`,width:180,render:e=>$5(e)}]})]})})]})},ene=o(((e,t)=>{var n={version:`1.15.0`};n[437]=(function(){for(var e=`\0\x07\b \v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■\xA0`,t=[],n={},r=0;r!=e.length;++r)e.charCodeAt(r)!==65533&&(n[e.charAt(r)]=r),t[r]=e.charAt(r);return{enc:n,dec:t}})(),n[620]=(function(){for(var e=`\0\x07\b \v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ÇüéâäàąçêëèïîćÄĄĘęłôöĆûùŚÖܢ٥śƒŹŻóÓńŃźż¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■\xA0`,t=[],n={},r=0;r!=e.length;++r)e.charCodeAt(r)!==65533&&(n[e.charAt(r)]=r),t[r]=e.charAt(r);return{enc:n,dec:t}})(),n[737]=(function(){for(var e=`\0\x07\b \v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■\xA0`,t=[],n={},r=0;r!=e.length;++r)e.charCodeAt(r)!==65533&&(n[e.charAt(r)]=r),t[r]=e.charAt(r);return{enc:n,dec:t}})(),n[850]=(function(){for(var e=`\0\x07\b @@ -421,7 +421,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho \v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»…\xA0ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ`,t=[],n={},r=0;r!=e.length;++r)e.charCodeAt(r)!==65533&&(n[e.charAt(r)]=r),t[r]=e.charAt(r);return{enc:n,dec:t}})(),n[10079]=(function(){for(var e=`\0\x07\b \v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»…\xA0ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ`,t=[],n={},r=0;r!=e.length;++r)e.charCodeAt(r)!==65533&&(n[e.charAt(r)]=r),t[r]=e.charAt(r);return{enc:n,dec:t}})(),n[10081]=(function(){for(var e=`\0\x07\b \v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»…\xA0ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ`,t=[],n={},r=0;r!=e.length;++r)e.charCodeAt(r)!==65533&&(n[e.charAt(r)]=r),t[r]=e.charAt(r);return{enc:n,dec:t}})(),n[28591]=(function(){for(var e=`\0\x07\b -\v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ\xA0¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ`,t=[],n={},r=0;r!=e.length;++r)e.charCodeAt(r)!==65533&&(n[e.charAt(r)]=r),t[r]=e.charAt(r);return{enc:n,dec:t}})(),t!==void 0&&t.exports&&typeof DO_NOT_EXPORT_CODEPAGE>`u`&&(t.exports=n),(function(e,r){if(n===void 0)if(l!==void 0){var i=n;t!==void 0&&t.exports&&typeof DO_NOT_EXPORT_CODEPAGE>`u`?t.exports=r(i):e.cptable=r(i)}else throw Error(`cptable not found`);else n=r(n)})(e,function(e){var t={1200:`utf16le`,1201:`utf16be`,12e3:`utf32le`,12001:`utf32be`,16969:`utf64le`,20127:`ascii`,65e3:`utf7`,65001:`utf8`},n=[874,1250,1251,1252,1253,1254,1255,1256,1e4],r=[932,936,949,950],i=[65001],a={},o={},s={},c={},l=function(e){return String.fromCharCode(e)},u=function(e){return e.charCodeAt(0)},d=typeof Buffer<`u`,f=function(){};if(d){var p=!Buffer.from;if(!p)try{Buffer.from(`foo`,`utf8`)}catch{p=!0}f=p?function(e,t){return t?new Buffer(e,t):new Buffer(e)}:Buffer.from.bind(Buffer),Buffer.allocUnsafe||(Buffer.allocUnsafe=function(e){return new Buffer(e)});var m=1024,h=Buffer.allocUnsafe(m),g=function(e){for(var t=Buffer.allocUnsafe(65536),n=0;n<65536;++n)t[n]=0;for(var r=Object.keys(e),i=r.length,a=0,o=r[a];a>10&1023)],i[o++]=n[56320+(c&1023)]));i=i.slice(0,o)}else for(i=Buffer.allocUnsafe(r),a=0;a>8}return function(e){var t=e.length,n=0,i=0;if(2*t>m&&(m=2*t,h=Buffer.allocUnsafe(m)),Buffer.isBuffer(e))for(n=0;n>8}return function(e,t){var n=e.length,i=Buffer.allocUnsafe(2*n),a=0,o=0,s=0,c=0,l=0;if(typeof e==`string`){for(a=c=0;a0&&(i[c++]=r[o]);i=i.slice(0,c)}else if(Buffer.isBuffer(e)){for(a=c=0;a0&&(i[c++]=r[o])):(s=o-65536,o=2*(55296+(s>>10&1023)),i[c++]=r[o+1]||r[o],r[o+1]>0&&(i[c++]=r[o]),o=2*(56320+(s&1023)),i[c++]=r[o+1]||r[o],r[o+1]>0&&(i[c++]=r[o]));i=i.slice(0,c)}else for(a=c=0;a0&&(i[c++]=r[o]);return!t||t===`buf`?i:t===`arr`?[].slice.call(i):i.toString(`binary`)}},b=function(t){var n=e[t].dec,r=Buffer.allocUnsafe(131072),i=0,a,o=0,s=0,c=0;for(c=0;c<65536;++c)r[2*c]=255,r[2*c+1]=253;for(i=0;i>8);return function(e){var t=e.length,n=Buffer.allocUnsafe(2*t),i=0,a=0,o=0;if(Buffer.isBuffer(e))for(i=0;im&&(m=4*n,h=Buffer.allocUnsafe(m));var a=0;n>=3&&t[0]==239&&t[1]==187&&t[2]==191&&(a=3);for(var o=1,s=0,c=0;a>8):(r-=65536,i=55296+(r>>10&1023),r=56320+(r&1023),h[s++]=i&255,h[s++]=i>>>8,h[s++]=r&255,h[s++]=r>>>8&255);return h.slice(0,s).toString(`ucs2`)},o[65001]=function(e,t){if(d&&Buffer.isBuffer(e))return!t||t===`buf`?e:t===`arr`?[].slice.call(e):e.toString(`binary`);var n=e.length,r=0,i=0,a=0,o=typeof e==`string`;4*n>m&&(m=4*n,h=Buffer.allocUnsafe(m));for(var s=0;s>6),h[a++]=128+(r&63)):r>=55296&&r<=57343?(r-=55296,++s,i=(o?e.charCodeAt(s):e[s].charCodeAt(0))-56320+(r<<10),h[a++]=240+(i>>>18&7),h[a++]=144+(i>>>12&63),h[a++]=128+(i>>>6&63),h[a++]=128+(i&63)):(h[a++]=224+(r>>12),h[a++]=128+(r>>6&63),h[a++]=128+(r&63));return!t||t===`buf`?h.slice(0,a):t===`arr`?[].slice.call(h,0,a):h.slice(0,a).toString(`binary`)}}var x=function(){if(d){if(s[n[0]])return;var t=0,l=0;for(t=0;t=3&&i[0]==239&&i[1]==187&&i[2]==191&&(p=3);p>10&1023),f=56320+(f&1023),c[h++]=String.fromCharCode(g),c[h++]=String.fromCharCode(f));break;case`ascii`:if(d&&Buffer.isBuffer(i))return i.toString(y);for(p=0;p=2&&i[0]==255&&i[1]==254&&(p=2),d&&Buffer.isBuffer(i))return i.toString(y);for(m=2;p+1=2&&i[0]==254&&i[1]==255&&(p=2),m=2;p+1=4&&i[0]==255&&i[1]==254&&i[2]===0&&i[3]===0&&(p=4),m=4;p65535?(f-=65536,c[h++]=String.fromCharCode(55296+(f>>10&1023)),c[h++]=String.fromCharCode(56320+(f&1023))):c[h++]=String.fromCharCode(f);break;case`utf32be`:for(o>=4&&i[3]==255&&i[2]==254&&i[1]===0&&i[0]===0&&(p=4),m=4;p65535?(f-=65536,c[h++]=String.fromCharCode(55296+(f>>10&1023)),c[h++]=String.fromCharCode(56320+(f&1023))):c[h++]=String.fromCharCode(f);break;case`utf7`:for(o>=4&&i[0]==43&&i[1]==47&&i[2]==118&&(o>=5&&i[3]==56&&i[4]==45?p=5:(i[3]==56||i[3]==57||i[3]==43||i[3]==47)&&(p=4));p>4,x.push(C),k=T.indexOf(String.fromCharCode(i[p+ j++])),!(k===-1||(w=(O&15)<<4|k>>2,x.push(w),A=T.indexOf(String.fromCharCode(i[p+ j++])),A===-1)));)E=(k&3)<<6|A,A<64&&x.push(E);for(S=n(1201,x),j=0;j255?(s[m]=u>>8,s[++m]=u&255):s[m]=u&255;else if(v=t[r])switch(v){case`utf8`:if(d&&y){s=f(i,v),m=s.length;break}for(p=0;p>6),s[++m]=128+(u&63)):u>=55296&&u<=57343?(u-=55296,h=(y?i.charCodeAt(++p):i[++p].charCodeAt(0))-56320+(u<<10),s[m]=240+(h>>>18&7),s[++m]=144+(h>>>12&63),s[++m]=128+(h>>>6&63),s[++m]=128+(h&63)):(s[m]=224+(u>>12),s[++m]=128+(u>>6&63),s[++m]=128+(u&63));break;case`ascii`:if(d&&typeof i==`string`){s=f(i,v),m=s.length;break}for(p=0;p>8;break;case`utf16be`:for(p=0;p>8,s[m++]=u&255;break;case`utf32le`:for(p=0;p=55296&&u<=57343&&(u=65536+(u-55296<<10)+(i[++p].charCodeAt(0)-56320)),s[m++]=u&255,u>>=8,s[m++]=u&255,u>>=8,s[m++]=u&255,u>>=8,s[m++]=u&255;break;case`utf32be`:for(p=0;p=55296&&u<=57343&&(u=65536+(u-55296<<10)+(i[++p].charCodeAt(0)-56320)),s[m+3]=u&255,u>>=8,s[m+2]=u&255,u>>=8,s[m+1]=u&255,u>>=8,s[m]=u&255,m+=4;break;case`utf7`:for(p=0;p-1){s[m++]=b.charCodeAt(0);continue}var x=n(1201,b);s[m++]=43,s[m++]=T.charCodeAt(x[0]>>2),s[m++]=T.charCodeAt(((x[0]&3)<<4)+((x[1]||0)>>4)),s[m++]=T.charCodeAt(((x[1]&15)<<2)+((x[2]||0)>>6)),s[m++]=45}break;default:throw Error(`Unsupported magic: `+r+` `+t[r])}else throw Error(`Unrecognized CP: `+r);return s=s.slice(0,m),d?!a||a===`buf`?s:a===`arr`?[].slice.call(s):s.toString(`binary`):a==`str`?s.map(l).join(``):s},hascp:function(n){return!!(e[n]||t[n])},magic:t,cache:w},e})})),o7=o(((e,t)=>{t.exports={}})),s7=c(o(((e,t)=>{var n={};function r(e){e.version=`0.18.5`,e.style_version=`1.2.0`;var n,r=1200,i=1252;typeof cptable<`u`?n=cptable:t!==void 0&&l!==void 0&&(n=a7());var a=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],o={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},s=function(e){a.indexOf(e)!=-1&&(i=o[0]=e)},c=function(e){s(r=e)};function u(){c(1200),s(1252)}function d(e){for(var t=[],n=0,r=e.length;n>1;++n)t[n]=String.fromCharCode(e.charCodeAt(2*n+1)+(e.charCodeAt(2*n)<<8));return t.join(``)}var p=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return t==255&&n==254?function(e){for(var t=[],n=0;n>1;++n)t[n]=String.fromCharCode(e.charCodeAt(2*n)+(e.charCodeAt(2*n+1)<<8));return t.join(``)}(e.slice(2)):t==254&&n==255?f(e.slice(2)):t==65279?e.slice(1):e},m=function(e){return String.fromCharCode(e)},h=function(e){return String.fromCharCode(e)};n!==void 0&&(c=function(e){s(r=e)},p=function(e){return e.charCodeAt(0)===255&&e.charCodeAt(1)===254?n.utils.decode(1200,d(e.slice(2))):e},m=function(e){return r===1200?String.fromCharCode(e):n.utils.decode(r,[255&e,e>>8])[0]},h=function(e){return n.utils.decode(i,[e])[0]});var g=null,_=!0,v=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`;function y(e){for(var t,n,r,i,a,o=``,s=0,c=0,l=0;l>2,a=(3&t)<<4|(n=e.charCodeAt(l++))>>4,s=(15&n)<<2|(r=e.charCodeAt(l++))>>6,c=63&r,isNaN(n)?s=c=64:isNaN(r)&&(c=64),o+=v.charAt(i)+v.charAt(a)+v.charAt(s)+v.charAt(c);return o}function b(e){var t,n,r,i,a,o,s=``;e=e.replace(/[^\w\+\/\=]/g,``);for(var c=0;c>4,s+=String.fromCharCode(t),n=(15&i)<<4|(a=v.indexOf(e.charAt(c++)))>>2,a!==64&&(s+=String.fromCharCode(n)),r=(3&a)<<6|(o=v.indexOf(e.charAt(c++))),o!==64&&(s+=String.fromCharCode(r));return s}var x=typeof Buffer<`u`&&typeof process<`u`&&process.versions!==void 0&&!!process.versions.node,S=function(){if(typeof Buffer>`u`)return function(){};var e=!Buffer.from;if(!e)try{Buffer.from(`foo`,`utf8`)}catch{e=!0}return e?function(e,t){return t?new Buffer(e,t):new Buffer(e)}:Buffer.from.bind(Buffer)}();function C(e){return x?Buffer.alloc?Buffer.alloc(e):new Buffer(e):new(typeof Uint8Array<`u`?Uint8Array:Array)(e)}function w(e){return x?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):new(typeof Uint8Array<`u`?Uint8Array:Array)(e)}var T=function(e){return x?S(e,`binary`):e.split(``).map(function(e){return 255&e.charCodeAt(0)})};function E(e){if(typeof ArrayBuffer>`u`)return T(e);for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r!=e.length;++r)n[r]=255&e.charCodeAt(r);return t}function D(e){if(Array.isArray(e))return e.map(function(e){return String.fromCharCode(e)}).join(``);for(var t=[],n=0;n`u`)throw Error(`Unsupported`);if(e instanceof ArrayBuffer)return O(new Uint8Array(e));for(var t=Array(e.length),n=0;n`u`)return[].concat.apply([],e.map(function(e){return Array.isArray(e)?e:[].slice.call(e)}));for(var t=0,n=0,t=0;t=7+t&&(32|e.charCodeAt(t))==103&&(32|e.charCodeAt(t+1))==101&&(32|e.charCodeAt(t+2))==110&&(32|e.charCodeAt(t+3))==101&&(32|e.charCodeAt(t+4))==114&&(32|e.charCodeAt(t+5))==97&&(32|e.charCodeAt(t+6))==108}var z=[[`Sun`,`Sunday`],[`Mon`,`Monday`],[`Tue`,`Tuesday`],[`Wed`,`Wednesday`],[`Thu`,`Thursday`],[`Fri`,`Friday`],[`Sat`,`Saturday`]],B=[[`J`,`Jan`,`January`],[`F`,`Feb`,`February`],[`M`,`Mar`,`March`],[`A`,`Apr`,`April`],[`M`,`May`,`May`],[`J`,`Jun`,`June`],[`J`,`Jul`,`July`],[`A`,`Aug`,`August`],[`S`,`Sep`,`September`],[`O`,`Oct`,`October`],[`N`,`Nov`,`November`],[`D`,`Dec`,`December`]],V={0:`General`,1:`0`,2:`0.00`,3:`#,##0`,4:`#,##0.00`,9:`0%`,10:`0.00%`,11:`0.00E+00`,12:`# ?/?`,13:`# ??/??`,14:`m/d/yy`,15:`d-mmm-yy`,16:`d-mmm`,17:`mmm-yy`,18:`h:mm AM/PM`,19:`h:mm:ss AM/PM`,20:`h:mm`,21:`h:mm:ss`,22:`m/d/yy h:mm`,37:`#,##0 ;(#,##0)`,38:`#,##0 ;[Red](#,##0)`,39:`#,##0.00;(#,##0.00)`,40:`#,##0.00;[Red](#,##0.00)`,45:`mm:ss`,46:`[h]:mm:ss`,47:`mmss.0`,48:`##0.0E+0`,49:`@`,56:`"上午/下午 "hh"時"mm"分"ss"秒 "`},H={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},U={5:`"$"#,##0_);\\("$"#,##0\\)`,63:`"$"#,##0_);\\("$"#,##0\\)`,6:`"$"#,##0_);[Red]\\("$"#,##0\\)`,64:`"$"#,##0_);[Red]\\("$"#,##0\\)`,7:`"$"#,##0.00_);\\("$"#,##0.00\\)`,65:`"$"#,##0.00_);\\("$"#,##0.00\\)`,8:`"$"#,##0.00_);[Red]\\("$"#,##0.00\\)`,66:`"$"#,##0.00_);[Red]\\("$"#,##0.00\\)`,41:`_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)`,42:`_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)`,43:`_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)`,44:`_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)`};function W(e,t,n){for(var r=e<0?-1:1,i=e*r,a=0,o=1,s=0,c=1,l=0,u=0,d=Math.floor(i);l(e<0?12:11)||a===`0`||a===`-0`?e.toPrecision(6):a;return ae((a=a.toUpperCase()).indexOf(`E`)==-1?a:a.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,`$1E`).replace(/(E[+-])(\d)$/,`$10$2`))}function oe(e,t){switch(typeof e){case`string`:return e;case`boolean`:return e?`TRUE`:`FALSE`;case`number`:return(0|e)===e?e.toString(10):G(e);case`undefined`:return``;case`object`:if(e==null)return``;if(e instanceof Date)return Ce(14,ie(e,t&&t.date1904),t)}throw Error(`unsupported value in General format: `+e)}function K(e){if(e.length<=3)return e;for(var t=e.length%3,n=e.substr(0,t);t!=e.length;t+=3)n+=(0t.length?i:de(t.substr(0,t.length-i.length))+i;if(a=t.match(ce))return d=a,s=f,c=p,l=parseInt(d[4],10),u=Math.round(s*l),s=Math.floor(u/l),c+(s===0?``:``+s)+` `+((u-=s*l)==0?Ze(` `,d[1].length+1+d[4].length):P(u,d[1].length)+d[2]+`/`+d[3]+N(l,d[4].length));if(t.match(/^#+0+$/))return p+L(f,t.length-t.indexOf(`0`));if(a=t.match(q))return i=fe(n,a[1].length).replace(/^([^\.]+)$/,`$1.`+de(a[1])).replace(/\.$/,`.`+de(a[1])).replace(/\.(\d*)$/,function(e,t){return`.`+t+Ze(`0`,de(a[1]).length-t.length)}),t.indexOf(`0.`)===-1?i.replace(/^0\./,`.`):i;if(t=t.replace(/^#+([0.])/,`$1`),a=t.match(/^(0*)\.(#*)$/))return p+fe(f,a[2].length).replace(/\.(\d*[1-9])0*$/,`.$1`).replace(/^(-?\d*)$/,`$1.`).replace(/^0\./,a[1].length?`0.`:`.`);if(a=t.match(/^#{1,3},##0(\.?)$/))return p+K(L(f,0));if(a=t.match(/^#,##0\.([#0]*0)$/))return n<0?`-`+me(e,t,-n):K(``+(Math.floor(n)+(d=n,+((m=a[1].length)<(``+Math.round((d-Math.floor(d))*10**m)).length))))+`.`+N(pe(n,a[1].length),a[1].length);if(a=t.match(/^#,#*,#0/))return me(e,t.replace(/^#,#*,/,``),n);if(a=t.match(/^([0#]+)(\\?-([0#]+))+$/))return i=M(me(e,t.replace(/[\\-]/g,``),n)),o=0,M(M(t.replace(/\\/g,``)).replace(/[0#]/g,function(e){return ot.length?s:de(t.substr(0,t.length-s.length))+s;if(c=t.match(ce))return d+((f=u)===0?``:``+f)+Ze(` `,(f=c)[1].length+2+f[4].length);if(t.match(/^#+0+$/))return d+N(u,t.length-t.indexOf(`0`));if(c=t.match(q))return s=(s=(``+n).replace(/^([^\.]+)$/,`$1.`+de(c[1])).replace(/\.$/,`.`+de(c[1]))).replace(/\.(\d*)$/,function(e,t){return`.`+t+Ze(`0`,de(c[1]).length-t.length)}),t.indexOf(`0.`)===-1?s.replace(/^0\./,`.`):s;if(t=t.replace(/^#+([0.])/,`$1`),c=t.match(/^(0*)\.(#*)$/))return d+(``+u).replace(/\.(\d*[1-9])0*$/,`.$1`).replace(/^(-?\d*)$/,`$1.`).replace(/^0\./,c[1].length?`0.`:`.`);if(c=t.match(/^#{1,3},##0(\.?)$/))return d+K(``+u);if(c=t.match(/^#,##0\.([#0]*0)$/))return n<0?`-`+he(e,t,-n):K(``+n)+`.`+Ze(`0`,c[1].length);if(c=t.match(/^#,#*,#0/))return he(e,t.replace(/^#,#*,/,``),n);if(c=t.match(/^([0#]+)(\\?-([0#]+))+$/))return s=M(he(e,t.replace(/[\\-]/g,``),n)),l=0,M(M(t.replace(/\\/g,``)).replace(/[0#]/g,function(e){return l=€acfijklopqrtuvwxzP`.indexOf(u)===-1)throw Error(`unrecognized character `+u+` in `+e);s[s.length]={t:`t`,v:u},++l}var h,g=0,_=0;for(l=s.length-1,d=`t`;0<=l;--l)switch(s[l].t){case`h`:case`H`:s[l].t=f,d=`h`,g<1&&(g=1);break;case`s`:(h=s[l].v.match(/\.0+$/))&&(_=Math.max(_,h[0].length-1)),g<3&&(g=3);case`d`:case`y`:case`M`:case`e`:d=s[l].t;break;case`m`:d===`s`&&(s[l].t=`M`,g<2&&(g=2));break;case`X`:break;case`Z`:(g=(g=g<1&&s[l].v.match(/[Hh]/)?1:g)<2&&s[l].v.match(/[Mm]/)?2:g)<3&&s[l].v.match(/[Ss]/)&&(g=3)}switch(g){case 0:break;case 1:.5<=i.u&&(i.u=0,++i.S),60<=i.S&&(i.S=0,++i.M),60<=i.M&&(i.M=0,++i.H);break;case 2:.5<=i.u&&(i.u=0,++i.S),60<=i.S&&(i.S=0,++i.M)}var v,y=``;for(l=0;l=s[l].v.length-1?(v-=s[l].v.length,s[l].v=x.substr(v+1,s[l].v.length)):v<0?s[l].v=``:(s[l].v=x.substr(0,v+1),v=-1),s[l].t=`t`,w=l);0<=v&&w[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function xe(e,t){if(t!=null){var n=parseFloat(t[2]);switch(t[1]){case`=`:if(e==n)return 1;break;case`>`:if(n`:if(e!=n)return 1;break;case`>=`:if(n<=e)return 1;break;case`<=`:if(e<=n)return 1}}}function Se(e,t){var n=function(e){for(var t=[],n=!1,r=0,i=0;r]/)==null&&n[1].match(/\[[=<>]/)==null?[r,a]:(e=n[0].match(be),a=n[1].match(be),xe(t,e)?[r,n[0]]:xe(t,a)?[r,n[1]]:[r,n[e!=null&&a!=null?2:1]])}function Ce(e,t,n){n??={};var r=``;switch(typeof e){case`string`:r=e==`m/d/yy`&&n.dateNF?n.dateNF:e;break;case`number`:(r=(r=e==14&&n.dateNF?n.dateNF:(n.table==null?V:n.table)[e])??(n.table&&n.table[H[e]]||V[H[e]]))??(r=U[e]||`General`)}if(R(r,0))return oe(t,n);var i=Se(r,t=t instanceof Date?ie(t,n.date1904):t);if(R(i[1]))return oe(t,n);if(!0===t)t=`TRUE`;else if(!1===t)t=`FALSE`;else if(t===``||t==null)return``;return ye(i[1],t,n,i[0])}function we(e,t){if(typeof t!=`number`){t=+t||-1;for(var n=0;n<392;++n)if(V[n]!=null){if(V[n]==e){t=n;break}}else t<0&&(t=n);t<0&&(t=391)}return V[t]=e,t}function Te(e){for(var t=0;t!=392;++t)e[t]!==void 0&&we(e[t],t)}function Ee(){var e;(e||={})[0]=`General`,e[1]=`0`,e[2]=`0.00`,e[3]=`#,##0`,e[4]=`#,##0.00`,e[9]=`0%`,e[10]=`0.00%`,e[11]=`0.00E+00`,e[12]=`# ?/?`,e[13]=`# ??/??`,e[14]=`m/d/yy`,e[15]=`d-mmm-yy`,e[16]=`d-mmm`,e[17]=`mmm-yy`,e[18]=`h:mm AM/PM`,e[19]=`h:mm:ss AM/PM`,e[20]=`h:mm`,e[21]=`h:mm:ss`,e[22]=`m/d/yy h:mm`,e[37]=`#,##0 ;(#,##0)`,e[38]=`#,##0 ;[Red](#,##0)`,e[39]=`#,##0.00;(#,##0.00)`,e[40]=`#,##0.00;[Red](#,##0.00)`,e[45]=`mm:ss`,e[46]=`[h]:mm:ss`,e[47]=`mmss.0`,e[48]=`##0.0E+0`,e[49]=`@`,e[56]=`"上午/下午 "hh"時"mm"分"ss"秒 "`,V=e}var De={format:Ce,load:we,_table:V,load_table:Te,parse_date_code:ee,is_date:ve,get_table:function(){return De._table=V}},Oe={5:`"$"#,##0_);\\("$"#,##0\\)`,6:`"$"#,##0_);[Red]\\("$"#,##0\\)`,7:`"$"#,##0.00_);\\("$"#,##0.00\\)`,8:`"$"#,##0.00_);[Red]\\("$"#,##0.00\\)`,23:`General`,24:`General`,25:`General`,26:`General`,27:`m/d/yy`,28:`m/d/yy`,29:`m/d/yy`,30:`m/d/yy`,31:`m/d/yy`,32:`h:mm:ss`,33:`h:mm:ss`,34:`h:mm:ss`,35:`h:mm:ss`,36:`m/d/yy`,41:`_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)`,42:`_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)`,43:`_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)`,44:`_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)`,50:`m/d/yy`,51:`m/d/yy`,52:`m/d/yy`,53:`m/d/yy`,54:`m/d/yy`,55:`m/d/yy`,56:`m/d/yy`,57:`m/d/yy`,58:`m/d/yy`,59:`0`,60:`0.00`,61:`#,##0`,62:`#,##0.00`,63:`"$"#,##0_);\\("$"#,##0\\)`,64:`"$"#,##0_);[Red]\\("$"#,##0\\)`,65:`"$"#,##0.00_);\\("$"#,##0.00\\)`,66:`"$"#,##0.00_);[Red]\\("$"#,##0.00\\)`,67:`0%`,68:`0.00%`,69:`# ?/?`,70:`# ??/??`,71:`m/d/yy`,72:`m/d/yy`,73:`d-mmm-yy`,74:`d-mmm`,75:`mmm-yy`,76:`h:mm`,77:`h:mm:ss`,78:`m/d/yy h:mm`,79:`mm:ss`,80:`[h]:mm:ss`,81:`mmss.0`},ke=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g,Ae,je=function(){var e={};e.version=`1.2.0`;var t=function(){for(var e=0,t=Array(256),n=0;n!=256;++n)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=n)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[n]=e;return typeof Int32Array<`u`?new Int32Array(t):t}(),n=function(e){for(var t=0,n=0,r=0,i=new(typeof Int32Array<`u`?Int32Array:Array)(4096),r=0;r!=256;++r)i[r]=e[r];for(r=0;r!=256;++r)for(n=e[r],t=256+r;t<4096;t+=256)n=i[t]=n>>>8^e[255&n];var a=[];for(r=1;r!=16;++r)a[r-1]=typeof Int32Array<`u`?i.subarray(256*r,256*r+256):i.slice(256*r,256*r+256);return a}(t),r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7],d=n[8],f=n[9],p=n[10],m=n[11],h=n[12],g=n[13],_=n[14];return e.table=t,e.bstr=function(e,n){for(var r=-1^n,i=0,a=e.length;i>>8^t[255&(r^e.charCodeAt(i++))];return~r},e.buf=function(e,n){for(var v=-1^n,y=e.length-15,b=0;b>8&255]^h[e[b++]^v>>16&255]^m[e[b++]^v>>>24]^p[e[b++]]^f[e[b++]]^d[e[b++]]^u[e[b++]]^l[e[b++]]^c[e[b++]]^s[e[b++]]^o[e[b++]]^a[e[b++]]^i[e[b++]]^r[e[b++]]^t[e[b++]];for(y+=15;b>>8^t[255&(v^e[b++])];return~v},e.str=function(e,n){for(var r,i=-1^n,a=0,o=e.length,s=0;a>>8^t[255&(i^s)]:s<2048?(i=i>>>8^t[255&(i^(192|s>>6&31))])>>>8^t[255&(i^(128|63&s))]:55296<=s&&s<57344?(s=64+(1023&s),r=1023&e.charCodeAt(a++),(i=(i=(i=i>>>8^t[255&(i^(240|s>>8&7))])>>>8^t[255&(i^(128|s>>2&63))])>>>8^t[255&(i^(128|r>>6&15|(3&s)<<4))])>>>8^t[255&(i^(128|63&r))]):(i=(i=i>>>8^t[255&(i^(224|s>>12&15))])>>>8^t[255&(i^(128|s>>6&63))])>>>8^t[255&(i^(128|63&s))];return~i},e}(),Me=function(){var e,t={};function n(e){if(e.charAt(e.length-1)==`/`)return e.slice(0,-1).indexOf(`/`)===-1?e:n(e.slice(0,-1));var t=e.lastIndexOf(`/`);return t===-1?e:e.slice(0,t+1)}function r(e){if(e.charAt(e.length-1)==`/`)return r(e.slice(0,-1));var t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function i(e){Hn(e,0);for(var t,n={};e.l<=e.length-4;){var r=e.read_shift(2),i=e.read_shift(2),a=e.l+i,o={};r===21589&&(1&(t=e.read_shift(1))&&(o.mtime=e.read_shift(4)),5?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ\xA0¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ`,t=[],n={},r=0;r!=e.length;++r)e.charCodeAt(r)!==65533&&(n[e.charAt(r)]=r),t[r]=e.charAt(r);return{enc:n,dec:t}})(),t!==void 0&&t.exports&&typeof DO_NOT_EXPORT_CODEPAGE>`u`&&(t.exports=n),(function(e,r){if(n===void 0)if(l!==void 0){var i=n;t!==void 0&&t.exports&&typeof DO_NOT_EXPORT_CODEPAGE>`u`?t.exports=r(i):e.cptable=r(i)}else throw Error(`cptable not found`);else n=r(n)})(e,function(e){var t={1200:`utf16le`,1201:`utf16be`,12e3:`utf32le`,12001:`utf32be`,16969:`utf64le`,20127:`ascii`,65e3:`utf7`,65001:`utf8`},n=[874,1250,1251,1252,1253,1254,1255,1256,1e4],r=[932,936,949,950],i=[65001],a={},o={},s={},c={},l=function(e){return String.fromCharCode(e)},u=function(e){return e.charCodeAt(0)},d=typeof Buffer<`u`,f=function(){};if(d){var p=!Buffer.from;if(!p)try{Buffer.from(`foo`,`utf8`)}catch{p=!0}f=p?function(e,t){return t?new Buffer(e,t):new Buffer(e)}:Buffer.from.bind(Buffer),Buffer.allocUnsafe||(Buffer.allocUnsafe=function(e){return new Buffer(e)});var m=1024,h=Buffer.allocUnsafe(m),g=function(e){for(var t=Buffer.allocUnsafe(65536),n=0;n<65536;++n)t[n]=0;for(var r=Object.keys(e),i=r.length,a=0,o=r[a];a>10&1023)],i[o++]=n[56320+(c&1023)]));i=i.slice(0,o)}else for(i=Buffer.allocUnsafe(r),a=0;a>8}return function(e){var t=e.length,n=0,i=0;if(2*t>m&&(m=2*t,h=Buffer.allocUnsafe(m)),Buffer.isBuffer(e))for(n=0;n>8}return function(e,t){var n=e.length,i=Buffer.allocUnsafe(2*n),a=0,o=0,s=0,c=0,l=0;if(typeof e==`string`){for(a=c=0;a0&&(i[c++]=r[o]);i=i.slice(0,c)}else if(Buffer.isBuffer(e)){for(a=c=0;a0&&(i[c++]=r[o])):(s=o-65536,o=2*(55296+(s>>10&1023)),i[c++]=r[o+1]||r[o],r[o+1]>0&&(i[c++]=r[o]),o=2*(56320+(s&1023)),i[c++]=r[o+1]||r[o],r[o+1]>0&&(i[c++]=r[o]));i=i.slice(0,c)}else for(a=c=0;a0&&(i[c++]=r[o]);return!t||t===`buf`?i:t===`arr`?[].slice.call(i):i.toString(`binary`)}},b=function(t){var n=e[t].dec,r=Buffer.allocUnsafe(131072),i=0,a,o=0,s=0,c=0;for(c=0;c<65536;++c)r[2*c]=255,r[2*c+1]=253;for(i=0;i>8);return function(e){var t=e.length,n=Buffer.allocUnsafe(2*t),i=0,a=0,o=0;if(Buffer.isBuffer(e))for(i=0;im&&(m=4*n,h=Buffer.allocUnsafe(m));var a=0;n>=3&&t[0]==239&&t[1]==187&&t[2]==191&&(a=3);for(var o=1,s=0,c=0;a>8):(r-=65536,i=55296+(r>>10&1023),r=56320+(r&1023),h[s++]=i&255,h[s++]=i>>>8,h[s++]=r&255,h[s++]=r>>>8&255);return h.slice(0,s).toString(`ucs2`)},o[65001]=function(e,t){if(d&&Buffer.isBuffer(e))return!t||t===`buf`?e:t===`arr`?[].slice.call(e):e.toString(`binary`);var n=e.length,r=0,i=0,a=0,o=typeof e==`string`;4*n>m&&(m=4*n,h=Buffer.allocUnsafe(m));for(var s=0;s>6),h[a++]=128+(r&63)):r>=55296&&r<=57343?(r-=55296,++s,i=(o?e.charCodeAt(s):e[s].charCodeAt(0))-56320+(r<<10),h[a++]=240+(i>>>18&7),h[a++]=144+(i>>>12&63),h[a++]=128+(i>>>6&63),h[a++]=128+(i&63)):(h[a++]=224+(r>>12),h[a++]=128+(r>>6&63),h[a++]=128+(r&63));return!t||t===`buf`?h.slice(0,a):t===`arr`?[].slice.call(h,0,a):h.slice(0,a).toString(`binary`)}}var x=function(){if(d){if(s[n[0]])return;var t=0,l=0;for(t=0;t=3&&i[0]==239&&i[1]==187&&i[2]==191&&(p=3);p>10&1023),f=56320+(f&1023),c[h++]=String.fromCharCode(g),c[h++]=String.fromCharCode(f));break;case`ascii`:if(d&&Buffer.isBuffer(i))return i.toString(y);for(p=0;p=2&&i[0]==255&&i[1]==254&&(p=2),d&&Buffer.isBuffer(i))return i.toString(y);for(m=2;p+1=2&&i[0]==254&&i[1]==255&&(p=2),m=2;p+1=4&&i[0]==255&&i[1]==254&&i[2]===0&&i[3]===0&&(p=4),m=4;p65535?(f-=65536,c[h++]=String.fromCharCode(55296+(f>>10&1023)),c[h++]=String.fromCharCode(56320+(f&1023))):c[h++]=String.fromCharCode(f);break;case`utf32be`:for(o>=4&&i[3]==255&&i[2]==254&&i[1]===0&&i[0]===0&&(p=4),m=4;p65535?(f-=65536,c[h++]=String.fromCharCode(55296+(f>>10&1023)),c[h++]=String.fromCharCode(56320+(f&1023))):c[h++]=String.fromCharCode(f);break;case`utf7`:for(o>=4&&i[0]==43&&i[1]==47&&i[2]==118&&(o>=5&&i[3]==56&&i[4]==45?p=5:(i[3]==56||i[3]==57||i[3]==43||i[3]==47)&&(p=4));p>4,x.push(C),k=T.indexOf(String.fromCharCode(i[p+ j++])),!(k===-1||(w=(O&15)<<4|k>>2,x.push(w),A=T.indexOf(String.fromCharCode(i[p+ j++])),A===-1)));)E=(k&3)<<6|A,A<64&&x.push(E);for(S=n(1201,x),j=0;j255?(s[m]=u>>8,s[++m]=u&255):s[m]=u&255;else if(v=t[r])switch(v){case`utf8`:if(d&&y){s=f(i,v),m=s.length;break}for(p=0;p>6),s[++m]=128+(u&63)):u>=55296&&u<=57343?(u-=55296,h=(y?i.charCodeAt(++p):i[++p].charCodeAt(0))-56320+(u<<10),s[m]=240+(h>>>18&7),s[++m]=144+(h>>>12&63),s[++m]=128+(h>>>6&63),s[++m]=128+(h&63)):(s[m]=224+(u>>12),s[++m]=128+(u>>6&63),s[++m]=128+(u&63));break;case`ascii`:if(d&&typeof i==`string`){s=f(i,v),m=s.length;break}for(p=0;p>8;break;case`utf16be`:for(p=0;p>8,s[m++]=u&255;break;case`utf32le`:for(p=0;p=55296&&u<=57343&&(u=65536+(u-55296<<10)+(i[++p].charCodeAt(0)-56320)),s[m++]=u&255,u>>=8,s[m++]=u&255,u>>=8,s[m++]=u&255,u>>=8,s[m++]=u&255;break;case`utf32be`:for(p=0;p=55296&&u<=57343&&(u=65536+(u-55296<<10)+(i[++p].charCodeAt(0)-56320)),s[m+3]=u&255,u>>=8,s[m+2]=u&255,u>>=8,s[m+1]=u&255,u>>=8,s[m]=u&255,m+=4;break;case`utf7`:for(p=0;p-1){s[m++]=b.charCodeAt(0);continue}var x=n(1201,b);s[m++]=43,s[m++]=T.charCodeAt(x[0]>>2),s[m++]=T.charCodeAt(((x[0]&3)<<4)+((x[1]||0)>>4)),s[m++]=T.charCodeAt(((x[1]&15)<<2)+((x[2]||0)>>6)),s[m++]=45}break;default:throw Error(`Unsupported magic: `+r+` `+t[r])}else throw Error(`Unrecognized CP: `+r);return s=s.slice(0,m),d?!a||a===`buf`?s:a===`arr`?[].slice.call(s):s.toString(`binary`):a==`str`?s.map(l).join(``):s},hascp:function(n){return!!(e[n]||t[n])},magic:t,cache:w},e})})),o7=o(((e,t)=>{t.exports={}})),s7=c(o(((e,t)=>{var n={};function r(e){e.version=`0.18.5`,e.style_version=`1.2.0`;var n,r=1200,i=1252;typeof cptable<`u`?n=cptable:t!==void 0&&l!==void 0&&(n=ene());var a=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],o={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},s=function(e){a.indexOf(e)!=-1&&(i=o[0]=e)},c=function(e){s(r=e)};function u(){c(1200),s(1252)}function d(e){for(var t=[],n=0,r=e.length;n>1;++n)t[n]=String.fromCharCode(e.charCodeAt(2*n+1)+(e.charCodeAt(2*n)<<8));return t.join(``)}var p=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return t==255&&n==254?function(e){for(var t=[],n=0;n>1;++n)t[n]=String.fromCharCode(e.charCodeAt(2*n)+(e.charCodeAt(2*n+1)<<8));return t.join(``)}(e.slice(2)):t==254&&n==255?f(e.slice(2)):t==65279?e.slice(1):e},m=function(e){return String.fromCharCode(e)},h=function(e){return String.fromCharCode(e)};n!==void 0&&(c=function(e){s(r=e)},p=function(e){return e.charCodeAt(0)===255&&e.charCodeAt(1)===254?n.utils.decode(1200,d(e.slice(2))):e},m=function(e){return r===1200?String.fromCharCode(e):n.utils.decode(r,[255&e,e>>8])[0]},h=function(e){return n.utils.decode(i,[e])[0]});var g=null,_=!0,v=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`;function y(e){for(var t,n,r,i,a,o=``,s=0,c=0,l=0;l>2,a=(3&t)<<4|(n=e.charCodeAt(l++))>>4,s=(15&n)<<2|(r=e.charCodeAt(l++))>>6,c=63&r,isNaN(n)?s=c=64:isNaN(r)&&(c=64),o+=v.charAt(i)+v.charAt(a)+v.charAt(s)+v.charAt(c);return o}function b(e){var t,n,r,i,a,o,s=``;e=e.replace(/[^\w\+\/\=]/g,``);for(var c=0;c>4,s+=String.fromCharCode(t),n=(15&i)<<4|(a=v.indexOf(e.charAt(c++)))>>2,a!==64&&(s+=String.fromCharCode(n)),r=(3&a)<<6|(o=v.indexOf(e.charAt(c++))),o!==64&&(s+=String.fromCharCode(r));return s}var x=typeof Buffer<`u`&&typeof process<`u`&&process.versions!==void 0&&!!process.versions.node,S=function(){if(typeof Buffer>`u`)return function(){};var e=!Buffer.from;if(!e)try{Buffer.from(`foo`,`utf8`)}catch{e=!0}return e?function(e,t){return t?new Buffer(e,t):new Buffer(e)}:Buffer.from.bind(Buffer)}();function C(e){return x?Buffer.alloc?Buffer.alloc(e):new Buffer(e):new(typeof Uint8Array<`u`?Uint8Array:Array)(e)}function w(e){return x?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):new(typeof Uint8Array<`u`?Uint8Array:Array)(e)}var T=function(e){return x?S(e,`binary`):e.split(``).map(function(e){return 255&e.charCodeAt(0)})};function E(e){if(typeof ArrayBuffer>`u`)return T(e);for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r!=e.length;++r)n[r]=255&e.charCodeAt(r);return t}function D(e){if(Array.isArray(e))return e.map(function(e){return String.fromCharCode(e)}).join(``);for(var t=[],n=0;n`u`)throw Error(`Unsupported`);if(e instanceof ArrayBuffer)return O(new Uint8Array(e));for(var t=Array(e.length),n=0;n`u`)return[].concat.apply([],e.map(function(e){return Array.isArray(e)?e:[].slice.call(e)}));for(var t=0,n=0,t=0;t=7+t&&(32|e.charCodeAt(t))==103&&(32|e.charCodeAt(t+1))==101&&(32|e.charCodeAt(t+2))==110&&(32|e.charCodeAt(t+3))==101&&(32|e.charCodeAt(t+4))==114&&(32|e.charCodeAt(t+5))==97&&(32|e.charCodeAt(t+6))==108}var z=[[`Sun`,`Sunday`],[`Mon`,`Monday`],[`Tue`,`Tuesday`],[`Wed`,`Wednesday`],[`Thu`,`Thursday`],[`Fri`,`Friday`],[`Sat`,`Saturday`]],B=[[`J`,`Jan`,`January`],[`F`,`Feb`,`February`],[`M`,`Mar`,`March`],[`A`,`Apr`,`April`],[`M`,`May`,`May`],[`J`,`Jun`,`June`],[`J`,`Jul`,`July`],[`A`,`Aug`,`August`],[`S`,`Sep`,`September`],[`O`,`Oct`,`October`],[`N`,`Nov`,`November`],[`D`,`Dec`,`December`]],V={0:`General`,1:`0`,2:`0.00`,3:`#,##0`,4:`#,##0.00`,9:`0%`,10:`0.00%`,11:`0.00E+00`,12:`# ?/?`,13:`# ??/??`,14:`m/d/yy`,15:`d-mmm-yy`,16:`d-mmm`,17:`mmm-yy`,18:`h:mm AM/PM`,19:`h:mm:ss AM/PM`,20:`h:mm`,21:`h:mm:ss`,22:`m/d/yy h:mm`,37:`#,##0 ;(#,##0)`,38:`#,##0 ;[Red](#,##0)`,39:`#,##0.00;(#,##0.00)`,40:`#,##0.00;[Red](#,##0.00)`,45:`mm:ss`,46:`[h]:mm:ss`,47:`mmss.0`,48:`##0.0E+0`,49:`@`,56:`"上午/下午 "hh"時"mm"分"ss"秒 "`},H={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},U={5:`"$"#,##0_);\\("$"#,##0\\)`,63:`"$"#,##0_);\\("$"#,##0\\)`,6:`"$"#,##0_);[Red]\\("$"#,##0\\)`,64:`"$"#,##0_);[Red]\\("$"#,##0\\)`,7:`"$"#,##0.00_);\\("$"#,##0.00\\)`,65:`"$"#,##0.00_);\\("$"#,##0.00\\)`,8:`"$"#,##0.00_);[Red]\\("$"#,##0.00\\)`,66:`"$"#,##0.00_);[Red]\\("$"#,##0.00\\)`,41:`_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)`,42:`_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)`,43:`_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)`,44:`_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)`};function W(e,t,n){for(var r=e<0?-1:1,i=e*r,a=0,o=1,s=0,c=1,l=0,u=0,d=Math.floor(i);l(e<0?12:11)||a===`0`||a===`-0`?e.toPrecision(6):a;return ae((a=a.toUpperCase()).indexOf(`E`)==-1?a:a.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,`$1E`).replace(/(E[+-])(\d)$/,`$10$2`))}function oe(e,t){switch(typeof e){case`string`:return e;case`boolean`:return e?`TRUE`:`FALSE`;case`number`:return(0|e)===e?e.toString(10):G(e);case`undefined`:return``;case`object`:if(e==null)return``;if(e instanceof Date)return Ce(14,ie(e,t&&t.date1904),t)}throw Error(`unsupported value in General format: `+e)}function K(e){if(e.length<=3)return e;for(var t=e.length%3,n=e.substr(0,t);t!=e.length;t+=3)n+=(0t.length?i:de(t.substr(0,t.length-i.length))+i;if(a=t.match(ce))return d=a,s=f,c=p,l=parseInt(d[4],10),u=Math.round(s*l),s=Math.floor(u/l),c+(s===0?``:``+s)+` `+((u-=s*l)==0?Ze(` `,d[1].length+1+d[4].length):P(u,d[1].length)+d[2]+`/`+d[3]+N(l,d[4].length));if(t.match(/^#+0+$/))return p+L(f,t.length-t.indexOf(`0`));if(a=t.match(q))return i=fe(n,a[1].length).replace(/^([^\.]+)$/,`$1.`+de(a[1])).replace(/\.$/,`.`+de(a[1])).replace(/\.(\d*)$/,function(e,t){return`.`+t+Ze(`0`,de(a[1]).length-t.length)}),t.indexOf(`0.`)===-1?i.replace(/^0\./,`.`):i;if(t=t.replace(/^#+([0.])/,`$1`),a=t.match(/^(0*)\.(#*)$/))return p+fe(f,a[2].length).replace(/\.(\d*[1-9])0*$/,`.$1`).replace(/^(-?\d*)$/,`$1.`).replace(/^0\./,a[1].length?`0.`:`.`);if(a=t.match(/^#{1,3},##0(\.?)$/))return p+K(L(f,0));if(a=t.match(/^#,##0\.([#0]*0)$/))return n<0?`-`+me(e,t,-n):K(``+(Math.floor(n)+(d=n,+((m=a[1].length)<(``+Math.round((d-Math.floor(d))*10**m)).length))))+`.`+N(pe(n,a[1].length),a[1].length);if(a=t.match(/^#,#*,#0/))return me(e,t.replace(/^#,#*,/,``),n);if(a=t.match(/^([0#]+)(\\?-([0#]+))+$/))return i=M(me(e,t.replace(/[\\-]/g,``),n)),o=0,M(M(t.replace(/\\/g,``)).replace(/[0#]/g,function(e){return ot.length?s:de(t.substr(0,t.length-s.length))+s;if(c=t.match(ce))return d+((f=u)===0?``:``+f)+Ze(` `,(f=c)[1].length+2+f[4].length);if(t.match(/^#+0+$/))return d+N(u,t.length-t.indexOf(`0`));if(c=t.match(q))return s=(s=(``+n).replace(/^([^\.]+)$/,`$1.`+de(c[1])).replace(/\.$/,`.`+de(c[1]))).replace(/\.(\d*)$/,function(e,t){return`.`+t+Ze(`0`,de(c[1]).length-t.length)}),t.indexOf(`0.`)===-1?s.replace(/^0\./,`.`):s;if(t=t.replace(/^#+([0.])/,`$1`),c=t.match(/^(0*)\.(#*)$/))return d+(``+u).replace(/\.(\d*[1-9])0*$/,`.$1`).replace(/^(-?\d*)$/,`$1.`).replace(/^0\./,c[1].length?`0.`:`.`);if(c=t.match(/^#{1,3},##0(\.?)$/))return d+K(``+u);if(c=t.match(/^#,##0\.([#0]*0)$/))return n<0?`-`+he(e,t,-n):K(``+n)+`.`+Ze(`0`,c[1].length);if(c=t.match(/^#,#*,#0/))return he(e,t.replace(/^#,#*,/,``),n);if(c=t.match(/^([0#]+)(\\?-([0#]+))+$/))return s=M(he(e,t.replace(/[\\-]/g,``),n)),l=0,M(M(t.replace(/\\/g,``)).replace(/[0#]/g,function(e){return l=€acfijklopqrtuvwxzP`.indexOf(u)===-1)throw Error(`unrecognized character `+u+` in `+e);s[s.length]={t:`t`,v:u},++l}var h,g=0,_=0;for(l=s.length-1,d=`t`;0<=l;--l)switch(s[l].t){case`h`:case`H`:s[l].t=f,d=`h`,g<1&&(g=1);break;case`s`:(h=s[l].v.match(/\.0+$/))&&(_=Math.max(_,h[0].length-1)),g<3&&(g=3);case`d`:case`y`:case`M`:case`e`:d=s[l].t;break;case`m`:d===`s`&&(s[l].t=`M`,g<2&&(g=2));break;case`X`:break;case`Z`:(g=(g=g<1&&s[l].v.match(/[Hh]/)?1:g)<2&&s[l].v.match(/[Mm]/)?2:g)<3&&s[l].v.match(/[Ss]/)&&(g=3)}switch(g){case 0:break;case 1:.5<=i.u&&(i.u=0,++i.S),60<=i.S&&(i.S=0,++i.M),60<=i.M&&(i.M=0,++i.H);break;case 2:.5<=i.u&&(i.u=0,++i.S),60<=i.S&&(i.S=0,++i.M)}var v,y=``;for(l=0;l=s[l].v.length-1?(v-=s[l].v.length,s[l].v=x.substr(v+1,s[l].v.length)):v<0?s[l].v=``:(s[l].v=x.substr(0,v+1),v=-1),s[l].t=`t`,w=l);0<=v&&w[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function xe(e,t){if(t!=null){var n=parseFloat(t[2]);switch(t[1]){case`=`:if(e==n)return 1;break;case`>`:if(n`:if(e!=n)return 1;break;case`>=`:if(n<=e)return 1;break;case`<=`:if(e<=n)return 1}}}function Se(e,t){var n=function(e){for(var t=[],n=!1,r=0,i=0;r]/)==null&&n[1].match(/\[[=<>]/)==null?[r,a]:(e=n[0].match(be),a=n[1].match(be),xe(t,e)?[r,n[0]]:xe(t,a)?[r,n[1]]:[r,n[e!=null&&a!=null?2:1]])}function Ce(e,t,n){n??={};var r=``;switch(typeof e){case`string`:r=e==`m/d/yy`&&n.dateNF?n.dateNF:e;break;case`number`:(r=(r=e==14&&n.dateNF?n.dateNF:(n.table==null?V:n.table)[e])??(n.table&&n.table[H[e]]||V[H[e]]))??(r=U[e]||`General`)}if(R(r,0))return oe(t,n);var i=Se(r,t=t instanceof Date?ie(t,n.date1904):t);if(R(i[1]))return oe(t,n);if(!0===t)t=`TRUE`;else if(!1===t)t=`FALSE`;else if(t===``||t==null)return``;return ye(i[1],t,n,i[0])}function we(e,t){if(typeof t!=`number`){t=+t||-1;for(var n=0;n<392;++n)if(V[n]!=null){if(V[n]==e){t=n;break}}else t<0&&(t=n);t<0&&(t=391)}return V[t]=e,t}function Te(e){for(var t=0;t!=392;++t)e[t]!==void 0&&we(e[t],t)}function Ee(){var e;(e||={})[0]=`General`,e[1]=`0`,e[2]=`0.00`,e[3]=`#,##0`,e[4]=`#,##0.00`,e[9]=`0%`,e[10]=`0.00%`,e[11]=`0.00E+00`,e[12]=`# ?/?`,e[13]=`# ??/??`,e[14]=`m/d/yy`,e[15]=`d-mmm-yy`,e[16]=`d-mmm`,e[17]=`mmm-yy`,e[18]=`h:mm AM/PM`,e[19]=`h:mm:ss AM/PM`,e[20]=`h:mm`,e[21]=`h:mm:ss`,e[22]=`m/d/yy h:mm`,e[37]=`#,##0 ;(#,##0)`,e[38]=`#,##0 ;[Red](#,##0)`,e[39]=`#,##0.00;(#,##0.00)`,e[40]=`#,##0.00;[Red](#,##0.00)`,e[45]=`mm:ss`,e[46]=`[h]:mm:ss`,e[47]=`mmss.0`,e[48]=`##0.0E+0`,e[49]=`@`,e[56]=`"上午/下午 "hh"時"mm"分"ss"秒 "`,V=e}var De={format:Ce,load:we,_table:V,load_table:Te,parse_date_code:ee,is_date:ve,get_table:function(){return De._table=V}},Oe={5:`"$"#,##0_);\\("$"#,##0\\)`,6:`"$"#,##0_);[Red]\\("$"#,##0\\)`,7:`"$"#,##0.00_);\\("$"#,##0.00\\)`,8:`"$"#,##0.00_);[Red]\\("$"#,##0.00\\)`,23:`General`,24:`General`,25:`General`,26:`General`,27:`m/d/yy`,28:`m/d/yy`,29:`m/d/yy`,30:`m/d/yy`,31:`m/d/yy`,32:`h:mm:ss`,33:`h:mm:ss`,34:`h:mm:ss`,35:`h:mm:ss`,36:`m/d/yy`,41:`_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)`,42:`_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)`,43:`_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)`,44:`_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)`,50:`m/d/yy`,51:`m/d/yy`,52:`m/d/yy`,53:`m/d/yy`,54:`m/d/yy`,55:`m/d/yy`,56:`m/d/yy`,57:`m/d/yy`,58:`m/d/yy`,59:`0`,60:`0.00`,61:`#,##0`,62:`#,##0.00`,63:`"$"#,##0_);\\("$"#,##0\\)`,64:`"$"#,##0_);[Red]\\("$"#,##0\\)`,65:`"$"#,##0.00_);\\("$"#,##0.00\\)`,66:`"$"#,##0.00_);[Red]\\("$"#,##0.00\\)`,67:`0%`,68:`0.00%`,69:`# ?/?`,70:`# ??/??`,71:`m/d/yy`,72:`m/d/yy`,73:`d-mmm-yy`,74:`d-mmm`,75:`mmm-yy`,76:`h:mm`,77:`h:mm:ss`,78:`m/d/yy h:mm`,79:`mm:ss`,80:`[h]:mm:ss`,81:`mmss.0`},ke=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g,Ae,je=function(){var e={};e.version=`1.2.0`;var t=function(){for(var e=0,t=Array(256),n=0;n!=256;++n)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=n)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[n]=e;return typeof Int32Array<`u`?new Int32Array(t):t}(),n=function(e){for(var t=0,n=0,r=0,i=new(typeof Int32Array<`u`?Int32Array:Array)(4096),r=0;r!=256;++r)i[r]=e[r];for(r=0;r!=256;++r)for(n=e[r],t=256+r;t<4096;t+=256)n=i[t]=n>>>8^e[255&n];var a=[];for(r=1;r!=16;++r)a[r-1]=typeof Int32Array<`u`?i.subarray(256*r,256*r+256):i.slice(256*r,256*r+256);return a}(t),r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7],d=n[8],f=n[9],p=n[10],m=n[11],h=n[12],g=n[13],_=n[14];return e.table=t,e.bstr=function(e,n){for(var r=-1^n,i=0,a=e.length;i>>8^t[255&(r^e.charCodeAt(i++))];return~r},e.buf=function(e,n){for(var v=-1^n,y=e.length-15,b=0;b>8&255]^h[e[b++]^v>>16&255]^m[e[b++]^v>>>24]^p[e[b++]]^f[e[b++]]^d[e[b++]]^u[e[b++]]^l[e[b++]]^c[e[b++]]^s[e[b++]]^o[e[b++]]^a[e[b++]]^i[e[b++]]^r[e[b++]]^t[e[b++]];for(y+=15;b>>8^t[255&(v^e[b++])];return~v},e.str=function(e,n){for(var r,i=-1^n,a=0,o=e.length,s=0;a>>8^t[255&(i^s)]:s<2048?(i=i>>>8^t[255&(i^(192|s>>6&31))])>>>8^t[255&(i^(128|63&s))]:55296<=s&&s<57344?(s=64+(1023&s),r=1023&e.charCodeAt(a++),(i=(i=(i=i>>>8^t[255&(i^(240|s>>8&7))])>>>8^t[255&(i^(128|s>>2&63))])>>>8^t[255&(i^(128|r>>6&15|(3&s)<<4))])>>>8^t[255&(i^(128|63&r))]):(i=(i=i>>>8^t[255&(i^(224|s>>12&15))])>>>8^t[255&(i^(128|s>>6&63))])>>>8^t[255&(i^(128|63&s))];return~i},e}(),Me=function(){var e,t={};function n(e){if(e.charAt(e.length-1)==`/`)return e.slice(0,-1).indexOf(`/`)===-1?e:n(e.slice(0,-1));var t=e.lastIndexOf(`/`);return t===-1?e:e.slice(0,t+1)}function r(e){if(e.charAt(e.length-1)==`/`)return r(e.slice(0,-1));var t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function i(e){Hn(e,0);for(var t,n={};e.l<=e.length-4;){var r=e.read_shift(2),i=e.read_shift(2),a=e.l+i,o={};r===21589&&(1&(t=e.read_shift(1))&&(o.mtime=e.read_shift(4)),5>>2)-1;if(s){for(var l=0;l=f.length?-1:u,u=o+1;u=f.length?-1:u,m.type=1}else n(e.FullPaths[o+1]||``)==n(h)&&(m.R=o+1),m.type=2}}}function u(e,t){var n=t||{};if(n.fileType==`mad`)return function(e,t){for(var n=t||{},r=n.boundary||`SheetJS`,i=[`MIME-Version: 1.0`,`Content-Type: multipart/related; boundary="`+(r=`------=`+r).slice(2)+`"`,``,``,``],a=e.FullPaths[0],o=a,s=e.FileIndex[0],c=1;c`:l=!0;break;case``:l=!1;break;case``:case``:case``:break;case``:l=!1;break;default:if(!l&&o.WTF)throw Error(`unrecognized `+n[0]+` in threaded comments`)}return e}),s)))}),_&&_.length&&ac(g,_,!0,c.people||[])}catch(e){if(c.WTF)throw e}var v,h}function Gd(e){return e.charAt(0)==`/`?e.slice(1):e}function Kd(e,t){if(Ee(),Vd(t||={}),at(e,`META-INF/manifest.xml`)||at(e,`objectdata.xml`))return ld(e,t);if(at(e,`Index/Document.iwa`)){if(typeof Uint8Array>`u`)throw Error(`NUMBERS file parsing requires Uint8Array support`);if(e.FileIndex)return Rd(e);var n=Me.utils.cfb_new();return lt(e).forEach(function(t){ut(n,t,function e(t,n,r){if(!r)return it(ot(t,n));if(!n)return null;try{return e(t,n)}catch{return null}}(e,t))}),Rd(n)}if(!at(e,`[Content_Types].xml`))throw at(e,`index.xml.gz`)?Error(`Unsupported NUMBERS 08 file`):at(e,`index.xml`)?Error(`Unsupported NUMBERS 09 file`):Error(`Unsupported ZIP file`);var r,i,a=lt(e),o=function(e){var t=Zr();if(!e||!e.match)return t;var n={};if((e.match(_t)||[]).forEach(function(e){var r=bt(e);switch(r[0].replace(vt,`<`)){case`]*>([\\s\\S]*?)`));n&&0`:r=null;break;default:if(o.indexOf(``),l=c[0].slice(4),u=c[1];switch(l){case`lpstr`:case`bstr`:case`lpwstr`:n[r]=Et(u);break;case`bool`:n[r]=It(u);break;case`i1`:case`i2`:case`i4`:case`i8`:case`int`:case`uint`:n[r]=parseInt(u,10);break;case`r4`:case`r8`:case`decimal`:n[r]=parseFloat(u);break;case`filetime`:case`date`:n[r]=Je(u);break;case`cy`:case`error`:n[r]=Et(u);break;default:if(l.slice(-1)==`/`)break;t.WTF&&typeof console<`u`&&console.warn(`Unexpected`,o,l,c)}}else if(o.slice(0,2)!==``:break;case``:break;case``:case``:case``:break;case``:O=!1;break;default:if(!O&&E.WTF)throw Error(`unrecognized `+t[0]+` in threaded comments`)}return e}),D)),k&&=Ud(k,p.Sheets);var A=+!!st(e,`xl/worksheets/sheet.xml`,!0);e:for(b=0;b!=m.Worksheets;++b){var j=`sheet`;if(k&&k[b]?(v=`xl/`+k[b][1].replace(/[\/]?xl\//,``),at(e,v)||(v=k[b][1]),at(e,v)||(v=T.replace(/_rels\/.*$/,``)+k[b][1]),j=k[b][2]):v=(v=`xl/worksheets/sheet`+(b+1-A)+`.`+w).replace(/sheet0\./,`sheet.`),y=v.replace(/^(.*)(\/)([^\/]*)$/,`$1/_rels/$3.rels`),t&&t.sheets!=null)switch(typeof t.sheets){case`number`:if(b!=t.sheets)continue e;break;case`string`:if(m.SheetNames[b].toLowerCase()!=t.sheets.toLowerCase())continue e;break;default:if(Array.isArray&&Array.isArray(t.sheets)){for(var M=!1,N=0;N!=t.sheets.length;++N)typeof t.sheets[N]==`number`&&t.sheets[N]==b&&(M=1),typeof t.sheets[N]==`string`&&t.sheets[N].toLowerCase()==m.SheetNames[b].toLowerCase()&&(M=1);if(!M)continue e}}Wd(e,v,y,m.SheetNames[b],b,x,r,j,t,p,c,l)}return _={Directory:o,Workbook:p,Props:m,Custprops:g,Deps:h,Sheets:r,SheetNames:m.SheetNames,Strings:$c,Styles:l,Themes:c,SSF:Xe(V)},t&&t.bookFiles&&(e.files?(_.keys=a,_.files=e.files):(_.keys=[],_.files={},e.FullPaths.forEach(function(t,n){t=t.replace(/^Root Entry[\/]/,``),_.keys.push(t),_.files[t]=e.FileIndex[n]}))),t&&t.bookVBA&&(0/,`>`)];return e.forEach(function(e){var i=``;(e[1]||[]).forEach(function(a,o){var s;a.T?(a.a&&t.indexOf(a.a)==-1&&t.push(a.a),s={ref:e[0],id:`{54EE7951-7262-4200-6969-`+(`000000000000`+ n.tcid++).slice(-12)+`}`},o==0?i=s.id:s.parentId=i,a.ID=s.id,a.a&&(s.personId=`{54EE7950-7262-4200-6969-`+(`000000000000`+t.indexOf(a.a)).slice(-12)+`}`),r.push(tn(`threadedComment`,$t(`text`,a.t||``),s))):delete a.ID})}),r.push(``),r.join(``)}(f,d,t)),i.threadedcomments.push(m),ri(g,-1,`../threadedComments/threadedComment`+s+`.`+n,$r.TCMNT)),ut(a,m=`xl/comments`+s+`.`+n,oc(f)),i.comments.push(m),ri(g,-1,`../comments`+s+`.`+n,$r.CMNT),p=!0),_[`!legacy`]&&p&&ut(a,`xl/drawings/vmlDrawing`+s+`.vml`,ic(s,_[`!comments`])),delete _[`!comments`],delete _[`!legacy`]),g[`!id`].rId1&&ut(a,ei(o),ni(g))}return t.Strings!=null&&0/,`>`)],r.forEach(function(e,t){u.push(tn(`person`,null,{displayName:e,id:`{54EE7950-7262-4200-6969-`+(`000000000000`+t).slice(-12)+`}`,userId:e,providerId:`None`}))}),u.push(``),u.join(``))),i.people.push(o),ri(t.wbrels,-1,`persons/person.xml`,$r.PEOPLE)),ut(a,`[Content_Types].xml`,Qr(i,t)),ut(a,`_rels/.rels`,ni(t.rels)),ut(a,`xl/_rels/workbook.xml.rels`,ni(t.wbrels)),delete t.revssf,delete t.ssf,a}function Xd(e,t){var n=``;switch((t||{}).type||`base64`){case`buffer`:return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case`base64`:n=b(e.slice(0,12));break;case`binary`:n=e;break;case`array`:return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];default:throw Error(`Unrecognized type `+(t&&t.type||`undefined`))}return[n.charCodeAt(0),n.charCodeAt(1),n.charCodeAt(2),n.charCodeAt(3),n.charCodeAt(4),n.charCodeAt(5),n.charCodeAt(6),n.charCodeAt(7)]}function Zd(e,t){var n=0;e:for(;n`u`||x||(r.type=`array`)),r.type==`string`&&(d=!0,r.type=`binary`,r.codepage=65001,l=(f=e).match(/[^\x00-\x7F]/)?Gt(f):f),r.type==`array`&&typeof Uint8Array<`u`&&e instanceof Uint8Array&&typeof ArrayBuffer<`u`){var f=new ArrayBuffer(3),f=new Uint8Array(f);if(f.foo=`bar`,!f.foo)return(r=Xe(r)).type=`array`,$d(O(l),r)}switch((i=Xd(l,r))[0]){case 208:if(i[1]===207&&i[2]===17&&i[3]===224&&i[4]===161&&i[5]===177&&i[6]===26&&i[7]===225)return s=Me.read(l,r),c=r,(Me.find(s,`EncryptedPackage`)?qd:Iu)(s,c);break;case 9:if(i[1]<=8)return Iu(l,r);break;case 60:return Cu(l,r);case 73:if(i[1]===73&&i[2]===42&&i[3]===0)throw Error(`TIFF Image File is not a spreadsheet`);if(i[1]===68)return function(e,t){var n=t||{},r=!!n.WTF;n.WTF=!0;try{var i=La.to_workbook(e,n);return n.WTF=r,i}catch(i){if(n.WTF=r,!i.message.match(/SYLK bad record ID/)&&r)throw i;return eo.to_workbook(e,t)}}(l,r);break;case 84:if(i[1]===65&&i[2]===66&&i[3]===76)return Ba.to_workbook(l,r);break;case 80:return i[1]===75&&i[2]<9&&i[3]<9?(o=c=l,(a=(a=r)||{}).type||(a.type=x&&Buffer.isBuffer(c)?`buffer`:`base64`),Kd(ft(o,a),a)):Qd(e,l,r,d);case 239:return i[3]===60?Cu(l,r):Qd(e,l,r,d);case 255:if(i[1]===254)return o=l,(a=r).type==`base64`&&(o=b(o)),o=n.utils.decode(1200,o.slice(2),`str`),a.type=`binary`,Zd(o,a);if(i[1]===0&&i[2]===2&&i[3]===0)return uo.to_workbook(l,r);break;case 0:if(i[1]===0&&(2<=i[2]&&i[3]===0||i[2]===0&&(i[3]===8||i[3]===9)))return uo.to_workbook(l,r);break;case 3:case 131:case 139:case 140:return ja.to_workbook(l,r);case 123:if(i[1]===92&&i[2]===114&&i[3]===116)return ns.to_workbook(l,r);break;case 10:case 13:case 32:return function(e,t){var n=``,r=Xd(e,t);switch(t.type){case`base64`:n=b(e);break;case`binary`:n=e;break;case`buffer`:n=e.toString(`binary`);break;case`array`:n=Ye(e);break;default:throw Error(`Unrecognized type `+t.type)}return r[0]==239&&r[1]==187&&r[2]==191&&(n=Wt(n)),t.type=`binary`,Zd(n,t)}(l,r);case 137:if(i[1]===80&&i[2]===78&&i[3]===71)throw Error(`PNG Image File is not a spreadsheet`)}return-1t)return t;throw Error(`Cannot find sheet # `+t)}if(typeof t!=`string`)throw Error(`Cannot find sheet |`+t+`|`);if(-1<(e=e.SheetNames.indexOf(t)))return e;throw Error(`Cannot find sheet name |`+t+`|`)}(e,t),e.Workbook.Sheets[t]||(e.Workbook.Sheets[t]={}),n){case 0:case 1:case 2:break;default:throw Error(`Bad sheet visibility setting `+n)}e.Workbook.Sheets[t].Hidden=n},cell_set_number_format:function(e,t){return e.z=t,e},cell_set_hyperlink:bf,cell_set_internal_link:function(e,t,n){return bf(e,`#`+t,n)},cell_add_comment:function(e,t,n){e.c||=[],e.c.push({t,a:n||`SheetJS`})},sheet_set_array_formula:function(e,t,n,r){for(var i=typeof t==`string`?or(t):t,a=typeof t==`string`?t:ar(t),o=i.s.r;o<=i.e.r;++o)for(var s=i.s.c;s<=i.e.c;++s){var c=_f(e,o,s);c.t=`n`,c.F=a,delete c.v,o==i.s.r&&s==i.s.c&&(c.f=n,r&&(c.D=!0))}return e},consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};function Sf(e){xf=e}var da={to_json:function(e,t){var n=xf({objectMode:!0});if(e==null||e[`!ref`]==null)return n.push(null),n;var r,i={t:`n`,v:0},a=0,o=1,s=[],c=``,l={s:{r:0,c:0},e:{r:0,c:0}},u=t||{},d=u.range==null?e[`!ref`]:u.range;switch(u.header===1?a=1:u.header===`A`?a=2:Array.isArray(u.header)&&(a=3),typeof d){case`string`:l=or(d);break;case`number`:(l=or(e[`!ref`])).s.r=d;break;default:l=d}0a.e.r)return s||(s=!0,n.push(``+i)),n.push(null);for(;o<=a.e.r;){n.push($u(e,a,o,r)),++o;break}},n},to_csv:function(e,t){var n=xf(),r=t??{};if(e==null||e[`!ref`]==null)return n.push(null),n;var i=or(e[`!ref`]),a=r.FS===void 0?`,`:r.FS,o=a.charCodeAt(0),s=r.RS===void 0?` -`:r.RS,c=s.charCodeAt(0),l=RegExp((a==`|`?`\\|`:a)+`+$`),u=``,d=[];r.dense=Array.isArray(e);for(var f=r.skipHidden&&e[`!cols`]||[],p=r.skipHidden&&e[`!rows`]||[],m=i.s.c;m<=i.e.c;++m)(f[m]||{}).hidden||(d[m]=tr(m));var h=i.s.r,g=!1,_=0;return n._read=function(){if(!g)return g=!0,n.push(``);for(;h<=i.e.r;)if(++h,!(p[h-1]||{}).hidden&&(u=pf(e,i,h-1,d,o,c,a,r),u!=null&&((u=r.strip?u.replace(l,``):u)||!1!==r.blankrows)))return n.push((_++?s:``)+u);return n.push(null)},n},set_readable:Sf},Cf=function(){function e(t,n,r){return this instanceof e?(this.tagName=t,this._attributes=n||{},this._children=r||[],this._prefix=``,this):new e(t,n,r)}return e.prototype.createElement=function(){return new e(arguments)},e.prototype.children=function(){return this._children},e.prototype.append=function(e){return this._children.push(e),this},e.prototype.prefix=function(e){return arguments.length==0?this._prefix:(this._prefix=e,this)},e.prototype.attr=function(e,t){if(t==null)return delete this._attributes[e],this;if(arguments.length==0)return this._attributes;if(typeof e==`string`&&arguments.length==1)return this._attributes.attr[e];if(typeof e==`object`&&arguments.length==1)for(var n in e)this._attributes[n]=e[n];else arguments.length==2&&typeof e==`string`&&(this._attributes[e]=t);return this},e.prototype.escapeAttributeValue=function(e){return`"`+e.replace(/\"/g,`"`)+`"`},e.prototype.toXml=function(e){var t=(e||=this)._prefix;if(t+=`<`+e.tagName,e._attributes)for(var n in e._attributes)t+=` `+n+`=`+this.escapeAttributeValue(``+e._attributes[n]);if(e._children&&0`;for(var r=0;r`}else t+=`/>`;return t},e}(),wf=function(e){var t,n=164,r={0:`General`,1:`0`,2:`0.00`,3:`#,##0`,4:`#,##0.00`,9:`0%`,10:`0.00%`,11:`0.00E+00`,12:`# ?/?`,13:`# ??/??`,14:`m/d/yy`,15:`d-mmm-yy`,16:`d-mmm`,17:`mmm-yy`,18:`h:mm AM/PM`,19:`h:mm:ss AM/PM`,20:`h:mm`,21:`h:mm:ss`,22:`m/d/yy h:mm`,37:`#,##0 ;(#,##0)`,38:`#,##0 ;[Red](#,##0)`,39:`#,##0.00;(#,##0.00)`,40:`#,##0.00;[Red](#,##0.00)`,45:`mm:ss`,46:`[h]:mm:ss`,47:`mmss.0`,48:`##0.0E+0`,49:`@`,56:`"上午/下午 "hh"時"mm"分"ss"秒 "`},i={};for(t in r)i[r[t]]=t;var a={};return{initialize:function(e){this.$fonts=Cf(`fonts`).attr(`count`,0).attr(`x14ac:knownFonts`,`1`),this.$fills=Cf(`fills`).attr(`count`,0),this.$borders=Cf(`borders`).attr(`count`,0),this.$numFmts=Cf(`numFmts`).attr(`count`,0),this.$cellStyleXfs=Cf(`cellStyleXfs`),this.$xf=Cf(`xf`).attr(`numFmtId`,0).attr(`fontId`,0).attr(`fillId`,0).attr(`borderId`,0),this.$cellXfs=Cf(`cellXfs`).attr(`count`,0),this.$cellStyles=Cf(`cellStyles`).append(Cf(`cellStyle`).attr(`name`,`Normal`).attr(`xfId`,0).attr(`builtinId`,0)),this.$dxfs=Cf(`dxfs`).attr(`count`,`0`),this.$tableStyles=Cf(`tableStyles`).attr(`count`,`0`).attr(`defaultTableStyle`,`TableStyleMedium9`).attr(`defaultPivotStyle`,`PivotStyleMedium4`),this.$styles=Cf(`styleSheet`).attr(`xmlns:mc`,`http://schemas.openxmlformats.org/markup-compatibility/2006`).attr(`xmlns:x14ac`,`http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac`).attr(`xmlns`,`http://schemas.openxmlformats.org/spreadsheetml/2006/main`).attr(`mc:Ignorable`,`x14ac`).prefix(``).append(this.$numFmts).append(this.$fonts).append(this.$fills).append(this.$borders).append(this.$cellStyleXfs.append(this.$xf)).append(this.$cellXfs).append(this.$cellStyles).append(this.$dxfs).append(this.$tableStyles);var t=e.defaultCellStyle||{};return t.font||={name:`Calibri`,sz:`11`},t.font.name||(t.font.name=`Calibri`),t.font.sz||(t.font.sz=11),t.fill||={patternType:`none`,fgColor:{}},t.border||={},t.numFmt||=0,this.defaultStyle=t,e=JSON.parse(JSON.stringify(t)),e.fill={patternType:`gray125`,fgColor:{}},this.addStyles([t,e]),this},addStyle:function(e){var t=JSON.stringify(e),n=a[t];return n==null?(n=this._addXf(e),a[t]=n):n=a[t],n},addStyles:function(e){var t=this;return e.map(function(e){return t.addStyle(e)})},_duckTypeStyle:function(e){return typeof e==`object`&&(e.patternFill||e.fgColor)?{fill:e}:e.font||e.numFmt||e.border||e.fill?e:this._getStyleCSS(e)},_getStyleCSS:function(e){return e},_addXf:function(e){var t=this._addFont(e.font),n=this._addFill(e.fill),r=this._addBorder(e.border),i=this._addNumFmt(e.numFmt),a=Cf(`xf`).attr(`numFmtId`,i).attr(`fontId`,t).attr(`fillId`,n).attr(`borderId`,r).attr(`xfId`,`0`);return 0/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`),e=Cf(`numFmt`).attr(`numFmtId`,++n).attr(`formatCode`,e),this.$numFmts.append(e),e=this.$numFmts.children().length,this.$numFmts.attr(`count`,e),n)},_addFill:function(e){if(!e)return 0;var t,n=Cf(`patternFill`).attr(`patternType`,e.patternType||`solid`);return e.fgColor&&(t=Cf(`fgColor`),e.fgColor.rgb?(e.fgColor.rgb.length==6&&(e.fgColor.rgb=`FF`+e.fgColor.rgb),t.attr(`rgb`,e.fgColor.rgb),n.append(t)):e.fgColor.theme&&(t.attr(`theme`,e.fgColor.theme),e.fgColor.tint&&t.attr(`tint`,e.fgColor.tint),n.append(t)),e.bgColor||={indexed:`64`}),e.bgColor&&(e=Cf(`bgColor`).attr(e.bgColor),n.append(e)),n=Cf(`fill`).append(n),this.$fills.append(n),n=this.$fills.children().length,this.$fills.attr(`count`,n),n-1},_getSubBorder:function(e,t){var n=Cf(e);return t&&(n.attr(`style`,t.style||`medium`),t.color&&(e=Cf(`color`),t.color.auto?e.attr(`auto`,t.color.auto):t.color.rgb?e.attr(`rgb`,t.color.rgb):(t.color.theme||t.color.tint)&&(e.attr(`theme`,t.color.theme||`1`),e.attr(`tint`,t.color.tint||`0`)),n.append(e))),n},_addBorder:function(e){if(!e)return 0;var t=this,n=Cf(`border`).attr(`diagonalUp`,e.diagonalUp).attr(`diagonalDown`,e.diagonalDown);[`left`,`right`,`top`,`bottom`,`diagonal`].forEach(function(r){n.append(t._getSubBorder(r,e[r]))}),this.$borders.append(n);var r=this.$borders.children().length;return this.$borders.attr(`count`,r),r-1},toXml:function(){return this.$styles.toXml()}}.initialize(e||{})};Iu!==void 0&&(e.parse_xlscfb=Iu),e.parse_zip=Kd,e.read=$d,e.readFile=ef,e.readFileSync=ef,e.write=sf,e.writeFile=lf,e.writeFileSync=lf,e.writeFileAsync=function(e,t,n,r){var i=n||{};return i.type=`file`,i.file=e,cf(i),i.type=`buffer`,r instanceof Function||(r=n),Ae.writeFile(e,sf(t,i),r)},e.utils=Ea,e.writeXLSX=of,e.writeFileXLSX=function(e,t,n){return(n||={}).type=`file`,n.file=t,cf(n),of(e,n)},e.SSF=De,da!==void 0&&(e.stream=da),Me!==void 0&&(e.CFB=Me),l===void 0||((da=o7())||{}).Readable&&Sf(da.Readable)}if(e===void 0?t!==void 0&&t.exports?r(t.exports):typeof define==`function`&&define.amd?define(`xlsx`,function(){return n.version||r(n),n}):r(n):r(e),typeof window<`u`&&!window.XLSX)try{window.XLSX=n}catch{}}))(),1),c7={top:{style:`thin`,color:{rgb:`000000`}},right:{style:`thin`,color:{rgb:`000000`}},bottom:{style:`thin`,color:{rgb:`000000`}},left:{style:`thin`,color:{rgb:`000000`}}},l7={vertical:`center`,wrapText:!0},Qte={font:{bold:!0,sz:16,color:{rgb:`FFFFFF`}},fill:{fgColor:{rgb:`111827`}},alignment:{...l7,horizontal:`center`},border:c7},$te={font:{bold:!0,color:{rgb:`111827`}},fill:{fgColor:{rgb:`F3F4F6`}},alignment:{...l7,horizontal:`center`},border:c7},ene={font:{color:{rgb:`111827`}},fill:{fgColor:{rgb:`FFFFFF`}},alignment:{...l7,horizontal:`left`},border:c7},tne={font:{bold:!0,color:{rgb:`FFFFFF`}},fill:{fgColor:{rgb:`374151`}},alignment:{...l7,horizontal:`center`},border:c7},nne={font:{color:{rgb:`111827`}},fill:{fgColor:{rgb:`FFFFFF`}},alignment:{...l7,horizontal:`left`},border:c7};function u7(e){return e??``}function d7(e){if(e==null)return 0;let t=(e instanceof Date?e.toISOString():String(e)).split(/\r?\n/);return Math.max(...t.map(e=>Array.from(e).reduce((e,t)=>e+(t.charCodeAt(0)>255?2:1),0)),0)}function f7(e,t,n){return Math.min(n,Math.max(t,e))}function rne(e,t){let n=Math.max(t.length,...e.map(e=>e.length));return Array.from({length:n},(n,r)=>{let i=t[r];if(i?.width)return{wch:i.width};let a=e.reduce((e,t)=>Math.max(e,d7(t[r])),d7(i?.title)),o=i?.minWidth??10,s=i?.maxWidth??42;return{wch:f7(Math.ceil(a*1.15)+2,o,s)}})}function ine(e,t,n=20){return f7(n+(e.reduce((e,n,r)=>{let i=Math.max(8,t[r]?.wch||12),a=(n==null?``:String(n)).split(/\r?\n/).reduce((e,t)=>e+Math.max(1,Math.ceil(d7(t)/Math.max(8,i-2))),0);return Math.max(e,a)},1)-1)*16,n,120)}function p7(e,t,n){e.s={...t,alignment:{...t.alignment},border:c7},n&&(e.z=n)}function m7(e){return typeof e==`number`&&Number.isFinite(e)}function ane(e){let{filename:t,sheetName:n,title:r,metadataRows:i=[],summaryRows:a=[],columns:o,rows:s}=e,c=Math.max(1,o.length),l=[],u=-1,d=-1;r&&(u=l.length,l.push([r,...Array.from({length:c-1},()=>``)])),i.forEach(e=>l.push(e.map(u7))),a.forEach(e=>l.push(e.map(u7))),(i.length||a.length)&&l.push(Array.from({length:c},()=>``)),d=l.length,l.push(o.map(e=>e.title)),s.forEach((e,t)=>{l.push(o.map(n=>u7(n.render(e,t))))});let f=s7.utils.aoa_to_sheet(l),p=s7.utils.decode_range(f[`!ref`]||`A1:A1`),m=rne(l,o);f[`!cols`]=m,f[`!rows`]=l.map((e,t)=>t===u?{hpt:34}:t===d?{hpt:28}:e.every(e=>e===``)?{hpt:10}:{hpt:ine(e,m)}),u>=0&&c>1&&(f[`!merges`]=f[`!merges`]||[],f[`!merges`].push({s:{r:u,c:0},e:{r:u,c:c-1}})),f[`!autofilter`]={ref:s7.utils.encode_range({s:{r:d,c:0},e:{r:Math.max(d,l.length-1),c:c-1}})};for(let e=p.s.r;e<=p.e.r;e+=1)for(let t=p.s.c;t<=p.e.c;t+=1){let n=s7.utils.encode_cell({r:e,c:t}),r=f[n]||{t:`s`,v:``};if(f[n]=r,e===u){p7(r,Qte);continue}if(e===d){p7(r,tne);continue}if(e{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(h7),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)(1),[m,h]=(0,S.useState)(10),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(``),[D,O]=(0,S.useState)(``),[k,A]=(0,S.useState)(``),[j,M]=(0,S.useState)(``),[N,P]=(0,S.useState)(``),[F,I]=(0,S.useState)([null,null]),L=(0,S.useMemo)(()=>({page:f,pageSize:m,userName:N||void 0,recordType:v||void 0,creditSubject:b||void 0,mediaType:C||void 0,chargeKind:T||void 0,sourceModule:D||void 0,sourceStepCode:k||void 0,billingScene:j||void 0,startDate:F[0]?.format(`YYYY-MM-DD`),endDate:F[1]?.format(`YYYY-MM-DD`),...hne(g)}),[f,m,N,v,b,C,T,D,k,j,F,g]),R=async()=>{s(!0);try{let e=await S8(L);t(e.items||[]),a(e.total||0),r(e.summary||h7)}catch(e){LG.error(e?.message||`加载积分记录失败`)}finally{s(!1)}};return(0,S.useEffect)(()=>{R()},[L]),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, minmax(0, 1fr))`,gap:16,marginBottom:16},children:[(0,Q.jsx)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(e0,{style:{color:`#10b981`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总充值`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#10b981`},children:[`+`,g7(n.totalRecharge)]})]})]})}),(0,Q.jsx)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J1,{style:{color:`#ef4444`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总消费`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#ef4444`},children:[`-`,g7(n.totalConsume)]})]})]})}),(0,Q.jsx)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(f3,{style:{color:`#3b82f6`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总回退`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#3b82f6`},children:[`+`,g7(n.totalRefund)]})]})]})}),(0,Q.jsx)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(N6,{style:{color:`#6366f1`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`交易 / 生成`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800},children:[g7(n.transactionCount),` / `,g7(n.generationCount)]})]})]})})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, minmax(0, 1fr))`,gap:16,marginBottom:16},children:[(0,Q.jsxs)(PR,{size:`small`,bordered:!1,children:[`图片生成:`,g7(n.imageGenerationCount),` 条 / `,g7(n.imageConsume),` 积分`]}),(0,Q.jsxs)(PR,{size:`small`,bordered:!1,children:[`视频生成:`,g7(n.videoGenerationCount),` 条 / `,g7(n.videoConsume),` 积分`]}),(0,Q.jsxs)(PR,{size:`small`,bordered:!1,children:[`提词消费:`,g7(n.textConsume),` 积分`]}),(0,Q.jsxs)(PR,{size:`small`,bordered:!1,children:[`视频分析:`,g7(n.analysisConsume),` 积分`]})]}),(0,Q.jsxs)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(RC,{value:g,onChange:e=>{p(1),_(e)},style:{width:150},options:sne}),(0,Q.jsx)(RC,{value:v,onChange:e=>{p(1),y(e)},style:{width:130},options:cne}),(0,Q.jsx)(RC,{value:b,onChange:e=>{p(1),x(e)},style:{width:180},options:lne}),(0,Q.jsx)(RC,{value:C,onChange:e=>{p(1),w(e)},style:{width:110},options:une}),(0,Q.jsx)(RC,{value:T,onChange:e=>{p(1),E(e)},style:{width:150},options:dne}),(0,Q.jsx)(RC,{value:D,onChange:e=>{p(1),O(e)},style:{width:150},options:fne}),(0,Q.jsx)(RC,{value:k,onChange:e=>{p(1),A(e)},style:{width:150},options:pne}),(0,Q.jsx)(RC,{value:j,onChange:e=>{p(1),M(e)},style:{width:220},options:mne}),(0,Q.jsx)(hW,{placeholder:`用户名/手机号/邮箱`,value:N,onChange:e=>{p(1),P(e.target.value)},style:{width:180},allowClear:!0}),(0,Q.jsx)(YB.RangePicker,{value:F,onChange:e=>{p(1),I(e?[e[0],e[1]]:[null,null])},placeholder:[`开始日期`,`结束日期`],style:{width:250}})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{onClick:()=>{_(``),y(``),x(``),w(``),E(``),O(``),A(``),M(``),P(``),I([null,null]),p(1)},children:`重置`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:R,children:`刷新`}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(x1,{}),loading:c,onClick:async()=>{l(!0),d(`准备导出...`);try{let e={...L,page:1,pageSize:500},t=await S8(e),n=[...t.items||[]],r=t.summary||h7,i=t.total||0,a=Math.max(1,Math.ceil(i/500));d(`正在获取 ${n.length} / ${i}`);for(let t=2;t<=a;t+=1){let r=await S8({...e,page:t});n.push(...r.items||[]),d(`正在获取 ${Math.min(n.length,i)} / ${i}`)}ane({filename:`积分流水_${(0,YE.default)().format(`YYYYMMDD_HHmmss`)}.xlsx`,sheetName:`积分流水`,title:`积分流水汇总`,metadataRows:[[`筛选时间`,`${F[0]?.format(`YYYY-MM-DD`)||`不限`} 至 ${F[1]?.format(`YYYY-MM-DD`)||`不限`}`],[`导出时间`,(0,YE.default)().format(`YYYY-MM-DD HH:mm:ss`)],[`导出条数`,i]],summaryRows:[[`总充值`,r.totalRecharge],[`总消费`,r.totalConsume],[`总回退`,r.totalRefund],[`交易笔数`,r.transactionCount],[`生成条数`,r.generationCount],[`生成尝试次数`,r.generationAttemptCount],[`图片生成条数`,r.imageGenerationCount],[`视频生成条数`,r.videoGenerationCount],[`图片消费积分`,r.imageConsume],[`视频消费积分`,r.videoConsume],[`提词消费积分`,r.textConsume],[`视频分析积分`,r.analysisConsume],[`总 Token`,r.totalTokens],[`输入 Token`,r.inputTokens],[`输出 Token`,r.outputTokens]],columns:[{title:`时间`,maxWidth:22,render:e=>Z5(e.createdAt||``)},{title:`用户`,minWidth:12,maxWidth:20,render:e=>e.username||`-`},{title:`手机号`,minWidth:13,maxWidth:18,render:e=>e.phone||`-`},{title:`用户类型`,maxWidth:16,render:e=>e.userTypeLabel||`-`},{title:`前台归类`,maxWidth:18,render:e=>e.frontendUserKindLabel||`-`},{title:`流水类型`,maxWidth:14,align:`center`,render:e=>e.recordTypeLabel||e.type||`-`},{title:`积分类型`,maxWidth:20,render:e=>e.creditSubjectLabel||`-`},{title:`扣费子类`,maxWidth:22,render:e=>e.chargeKindLabel||`-`},{title:`模块`,maxWidth:20,render:e=>e.sourceModuleLabel||`-`},{title:`模块步骤`,maxWidth:22,render:e=>e.sourceStepCodeLabel||`-`},{title:`计费场景`,maxWidth:32,render:e=>e.billingSceneLabel||`-`},{title:`媒体类型`,maxWidth:12,align:`center`,render:e=>e.mediaTypeLabel||`-`},{title:`变动积分`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0.00`,render:e=>e.amount},{title:`变动后余额`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0.00`,render:e=>e.balanceAfter},{title:`实际 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.totalTokens||0},{title:`输入 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.inputTokens||0},{title:`输出 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.outputTokens||0},{title:`执行类型`,maxWidth:18,render:e=>_7(e.engineType)},{title:`执行配置`,maxWidth:28,render:e=>e.engineName||`-`},{title:`供应商`,maxWidth:18,render:e=>e.engineProvider||`-`},{title:`模型版本`,maxWidth:26,render:e=>e.engineModelName||`-`},{title:`关联状态`,maxWidth:14,align:`center`,render:e=>e.ownerDeleted?`关联已删除`:`正常`},{title:`说明`,minWidth:18,maxWidth:42,render:e=>e.description||``},{title:`业务归属类型`,maxWidth:18,render:e=>e.ownerType||``},{title:`业务归属ID`,maxWidth:28,render:e=>e.ownerId||``},{title:`BizKey`,maxWidth:36,render:e=>e.bizKey||``}],rows:n}),LG.success(`Excel 已导出`)}catch(e){LG.error(e?.message||`导出失败`)}finally{l(!1),d(``)}},children:`下载 Excel`})]})]}),u&&(0,Q.jsx)(`div`,{style:{marginBottom:12,color:`#6366f1`},children:u}),(0,Q.jsx)(bQ,{columns:[{title:`用户`,dataIndex:`username`,width:130,fixed:`left`,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:e||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:t.phone||`-`})]})},{title:`用户类型`,dataIndex:`userTypeLabel`,width:120,render:(e,t)=>(0,Q.jsx)(NQ,{color:t.userType===`admin`?`orange`:`blue`,children:t.userTypeLabel||`-`})},{title:`流水类型`,dataIndex:`recordType`,width:100,render:(e,t)=>{let n=one[e]||{text:t.recordTypeLabel||e||`-`,color:`default`,icon:null};return(0,Q.jsx)(NQ,{color:n.color,icon:n.icon,children:n.text})}},{title:`积分类型`,dataIndex:`creditSubjectLabel`,width:150,render:e=>(0,Q.jsx)(NQ,{children:e||`-`})},{title:`模块`,dataIndex:`sourceModuleLabel`,width:130,render:e=>e||`-`},{title:`步骤/场景`,key:`scene`,width:210,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{children:t.billingSceneLabel||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:t.sourceStepCodeLabel||`-`})]})},{title:`媒体`,dataIndex:`mediaTypeLabel`,width:80,render:e=>e?(0,Q.jsx)(NQ,{color:`purple`,children:e}):`-`},{title:`变动积分`,dataIndex:`amount`,width:120,sorter:(e,t)=>e.amount-t.amount,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:e>0?`#10b981`:`#ef4444`},children:[e>0?`+`:``,g7(e)]})},{title:`余额`,dataIndex:`balanceAfter`,width:110,render:e=>g7(e)},{title:`Token`,key:`tokens`,width:140,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`b`,{children:g7(t.totalTokens)}),(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[`入 `,g7(t.inputTokens),` / 出 `,g7(t.outputTokens)]})]})},{title:`执行配置`,key:`engine`,width:230,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(NQ,{color:t.engineType===`model`?`geekblue`:t.engineType===`image`?`purple`:t.engineType===`video`?`cyan`:`default`,children:_7(t.engineType)}),(0,Q.jsx)(`div`,{children:t.engineName||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[t.engineProvider,t.engineModelName].filter(Boolean).join(` / `)||`-`})]})},{title:`关联状态`,dataIndex:`ownerDeleted`,width:100,render:e=>(0,Q.jsx)(NQ,{color:e?`red`:`green`,children:e?`已删除`:`正常`})},{title:`说明`,dataIndex:`description`,width:240,ellipsis:!0},{title:`时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})}],dataSource:e,rowKey:`id`,loading:o,pagination:{current:f,pageSize:m,total:i,onChange:(e,t)=>{p(e),h(t)},showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`},scroll:{x:1900}})]})]})},_ne=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(180),[u]=X.useForm(),d=async()=>{try{let e=await F8(),t={};e.forEach(e=>{t[e.key]=e.value}),u.setFieldsValue({wechat_appid:t.payment_wechat_appid||``,wechat_mch_id:t.payment_wechat_mch_id||``,wechat_private_key:t.payment_wechat_private_key||``,wechat_cert_serial_no:t.payment_wechat_cert_serial_no||``,wechat_api_v3_key:t.payment_wechat_api_v3_key||``,wechat_notify_url:t.payment_wechat_notify_url||``,wechat_public_key:t.payment_wechat_public_key||``,wechat_public_key_id:t.payment_wechat_public_key_id||``,alipay_app_id:t.payment_alipay_app_id||``,alipay_private_key:t.payment_alipay_private_key||``,alipay_public_key:t.payment_alipay_public_key||``,alipay_notify_url:t.payment_alipay_notify_url||``,alipay_gateway:t.payment_alipay_gateway||``,order_timeout:t.payment_order_timeout||`180`}),r(t.payment_wechat_enabled===`true`),a(t.payment_alipay_enabled===`true`),s(t.payment_mock===`true`),l(parseInt(t.payment_order_timeout||`180`,10))}catch{LG.error(`加载支付配置失败`)}};return(0,S.useEffect)(()=>{d()},[]),(0,Q.jsxs)(`div`,{style:{maxWidth:`100%`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,marginBottom:24},children:[(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsx)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:40,height:40,borderRadius:10,background:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:`#6366f1`},children:(0,Q.jsx)(HB,{})}),(0,Q.jsx)(`div`,{children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`订单超时时间`})})]}),(0,Q.jsx)(X,{form:u,layout:`inline`,children:(0,Q.jsx)(X.Item,{name:`order_timeout`,style:{margin:0},children:(0,Q.jsxs)(VV.Compact,{style:{width:140},children:[(0,Q.jsx)(oB,{min:30,max:86400,placeholder:`180`,style:{width:`100%`},size:`middle`}),(0,Q.jsx)(Z.Text,{children:`秒`})]})})})]})})}),(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsx)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,background:o?`#fff7e6`:`#fafbff`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:40,height:40,borderRadius:10,background:o?`rgba(245,158,11,0.15)`:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:o?`#f59e0b`:`#6366f1`},children:(0,Q.jsx)(l2,{})}),(0,Q.jsx)(`div`,{children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`模拟支付模式`})})]}),(0,Q.jsx)(Mq,{checked:o,onChange:s,checkedChildren:`已开启`,unCheckedChildren:`已关闭`})]})})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(7,193,96,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:22,color:`#07c160`},children:(0,Q.jsx)(I6,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:5,style:{margin:0},children:`微信支付`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:`微信商户号支付配置`})]})]}),(0,Q.jsx)(Mq,{checked:n,onChange:r,checkedChildren:`已启用`,unCheckedChildren:`未启用`})]}),(0,Q.jsxs)(X,{form:u,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`wechat_appid`,label:`AppID`,children:(0,Q.jsx)(hW,{placeholder:`微信支付 AppID`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_mch_id`,label:`商户号 (MchID)`,children:(0,Q.jsx)(hW,{placeholder:`微信支付商户号`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_private_key`,label:`商户私钥`,extra:` +`:r.RS,c=s.charCodeAt(0),l=RegExp((a==`|`?`\\|`:a)+`+$`),u=``,d=[];r.dense=Array.isArray(e);for(var f=r.skipHidden&&e[`!cols`]||[],p=r.skipHidden&&e[`!rows`]||[],m=i.s.c;m<=i.e.c;++m)(f[m]||{}).hidden||(d[m]=tr(m));var h=i.s.r,g=!1,_=0;return n._read=function(){if(!g)return g=!0,n.push(``);for(;h<=i.e.r;)if(++h,!(p[h-1]||{}).hidden&&(u=pf(e,i,h-1,d,o,c,a,r),u!=null&&((u=r.strip?u.replace(l,``):u)||!1!==r.blankrows)))return n.push((_++?s:``)+u);return n.push(null)},n},set_readable:Sf},Cf=function(){function e(t,n,r){return this instanceof e?(this.tagName=t,this._attributes=n||{},this._children=r||[],this._prefix=``,this):new e(t,n,r)}return e.prototype.createElement=function(){return new e(arguments)},e.prototype.children=function(){return this._children},e.prototype.append=function(e){return this._children.push(e),this},e.prototype.prefix=function(e){return arguments.length==0?this._prefix:(this._prefix=e,this)},e.prototype.attr=function(e,t){if(t==null)return delete this._attributes[e],this;if(arguments.length==0)return this._attributes;if(typeof e==`string`&&arguments.length==1)return this._attributes.attr[e];if(typeof e==`object`&&arguments.length==1)for(var n in e)this._attributes[n]=e[n];else arguments.length==2&&typeof e==`string`&&(this._attributes[e]=t);return this},e.prototype.escapeAttributeValue=function(e){return`"`+e.replace(/\"/g,`"`)+`"`},e.prototype.toXml=function(e){var t=(e||=this)._prefix;if(t+=`<`+e.tagName,e._attributes)for(var n in e._attributes)t+=` `+n+`=`+this.escapeAttributeValue(``+e._attributes[n]);if(e._children&&0`;for(var r=0;r`}else t+=`/>`;return t},e}(),wf=function(e){var t,n=164,r={0:`General`,1:`0`,2:`0.00`,3:`#,##0`,4:`#,##0.00`,9:`0%`,10:`0.00%`,11:`0.00E+00`,12:`# ?/?`,13:`# ??/??`,14:`m/d/yy`,15:`d-mmm-yy`,16:`d-mmm`,17:`mmm-yy`,18:`h:mm AM/PM`,19:`h:mm:ss AM/PM`,20:`h:mm`,21:`h:mm:ss`,22:`m/d/yy h:mm`,37:`#,##0 ;(#,##0)`,38:`#,##0 ;[Red](#,##0)`,39:`#,##0.00;(#,##0.00)`,40:`#,##0.00;[Red](#,##0.00)`,45:`mm:ss`,46:`[h]:mm:ss`,47:`mmss.0`,48:`##0.0E+0`,49:`@`,56:`"上午/下午 "hh"時"mm"分"ss"秒 "`},i={};for(t in r)i[r[t]]=t;var a={};return{initialize:function(e){this.$fonts=Cf(`fonts`).attr(`count`,0).attr(`x14ac:knownFonts`,`1`),this.$fills=Cf(`fills`).attr(`count`,0),this.$borders=Cf(`borders`).attr(`count`,0),this.$numFmts=Cf(`numFmts`).attr(`count`,0),this.$cellStyleXfs=Cf(`cellStyleXfs`),this.$xf=Cf(`xf`).attr(`numFmtId`,0).attr(`fontId`,0).attr(`fillId`,0).attr(`borderId`,0),this.$cellXfs=Cf(`cellXfs`).attr(`count`,0),this.$cellStyles=Cf(`cellStyles`).append(Cf(`cellStyle`).attr(`name`,`Normal`).attr(`xfId`,0).attr(`builtinId`,0)),this.$dxfs=Cf(`dxfs`).attr(`count`,`0`),this.$tableStyles=Cf(`tableStyles`).attr(`count`,`0`).attr(`defaultTableStyle`,`TableStyleMedium9`).attr(`defaultPivotStyle`,`PivotStyleMedium4`),this.$styles=Cf(`styleSheet`).attr(`xmlns:mc`,`http://schemas.openxmlformats.org/markup-compatibility/2006`).attr(`xmlns:x14ac`,`http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac`).attr(`xmlns`,`http://schemas.openxmlformats.org/spreadsheetml/2006/main`).attr(`mc:Ignorable`,`x14ac`).prefix(``).append(this.$numFmts).append(this.$fonts).append(this.$fills).append(this.$borders).append(this.$cellStyleXfs.append(this.$xf)).append(this.$cellXfs).append(this.$cellStyles).append(this.$dxfs).append(this.$tableStyles);var t=e.defaultCellStyle||{};return t.font||={name:`Calibri`,sz:`11`},t.font.name||(t.font.name=`Calibri`),t.font.sz||(t.font.sz=11),t.fill||={patternType:`none`,fgColor:{}},t.border||={},t.numFmt||=0,this.defaultStyle=t,e=JSON.parse(JSON.stringify(t)),e.fill={patternType:`gray125`,fgColor:{}},this.addStyles([t,e]),this},addStyle:function(e){var t=JSON.stringify(e),n=a[t];return n==null?(n=this._addXf(e),a[t]=n):n=a[t],n},addStyles:function(e){var t=this;return e.map(function(e){return t.addStyle(e)})},_duckTypeStyle:function(e){return typeof e==`object`&&(e.patternFill||e.fgColor)?{fill:e}:e.font||e.numFmt||e.border||e.fill?e:this._getStyleCSS(e)},_getStyleCSS:function(e){return e},_addXf:function(e){var t=this._addFont(e.font),n=this._addFill(e.fill),r=this._addBorder(e.border),i=this._addNumFmt(e.numFmt),a=Cf(`xf`).attr(`numFmtId`,i).attr(`fontId`,t).attr(`fillId`,n).attr(`borderId`,r).attr(`xfId`,`0`);return 0/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`),e=Cf(`numFmt`).attr(`numFmtId`,++n).attr(`formatCode`,e),this.$numFmts.append(e),e=this.$numFmts.children().length,this.$numFmts.attr(`count`,e),n)},_addFill:function(e){if(!e)return 0;var t,n=Cf(`patternFill`).attr(`patternType`,e.patternType||`solid`);return e.fgColor&&(t=Cf(`fgColor`),e.fgColor.rgb?(e.fgColor.rgb.length==6&&(e.fgColor.rgb=`FF`+e.fgColor.rgb),t.attr(`rgb`,e.fgColor.rgb),n.append(t)):e.fgColor.theme&&(t.attr(`theme`,e.fgColor.theme),e.fgColor.tint&&t.attr(`tint`,e.fgColor.tint),n.append(t)),e.bgColor||={indexed:`64`}),e.bgColor&&(e=Cf(`bgColor`).attr(e.bgColor),n.append(e)),n=Cf(`fill`).append(n),this.$fills.append(n),n=this.$fills.children().length,this.$fills.attr(`count`,n),n-1},_getSubBorder:function(e,t){var n=Cf(e);return t&&(n.attr(`style`,t.style||`medium`),t.color&&(e=Cf(`color`),t.color.auto?e.attr(`auto`,t.color.auto):t.color.rgb?e.attr(`rgb`,t.color.rgb):(t.color.theme||t.color.tint)&&(e.attr(`theme`,t.color.theme||`1`),e.attr(`tint`,t.color.tint||`0`)),n.append(e))),n},_addBorder:function(e){if(!e)return 0;var t=this,n=Cf(`border`).attr(`diagonalUp`,e.diagonalUp).attr(`diagonalDown`,e.diagonalDown);[`left`,`right`,`top`,`bottom`,`diagonal`].forEach(function(r){n.append(t._getSubBorder(r,e[r]))}),this.$borders.append(n);var r=this.$borders.children().length;return this.$borders.attr(`count`,r),r-1},toXml:function(){return this.$styles.toXml()}}.initialize(e||{})};Iu!==void 0&&(e.parse_xlscfb=Iu),e.parse_zip=Kd,e.read=$d,e.readFile=ef,e.readFileSync=ef,e.write=sf,e.writeFile=lf,e.writeFileSync=lf,e.writeFileAsync=function(e,t,n,r){var i=n||{};return i.type=`file`,i.file=e,cf(i),i.type=`buffer`,r instanceof Function||(r=n),Ae.writeFile(e,sf(t,i),r)},e.utils=Ea,e.writeXLSX=of,e.writeFileXLSX=function(e,t,n){return(n||={}).type=`file`,n.file=t,cf(n),of(e,n)},e.SSF=De,da!==void 0&&(e.stream=da),Me!==void 0&&(e.CFB=Me),l===void 0||((da=o7())||{}).Readable&&Sf(da.Readable)}if(e===void 0?t!==void 0&&t.exports?r(t.exports):typeof define==`function`&&define.amd?define(`xlsx`,function(){return n.version||r(n),n}):r(n):r(e),typeof window<`u`&&!window.XLSX)try{window.XLSX=n}catch{}}))(),1),c7={top:{style:`thin`,color:{rgb:`000000`}},right:{style:`thin`,color:{rgb:`000000`}},bottom:{style:`thin`,color:{rgb:`000000`}},left:{style:`thin`,color:{rgb:`000000`}}},l7={vertical:`center`,wrapText:!0},tne={font:{bold:!0,sz:16,color:{rgb:`FFFFFF`}},fill:{fgColor:{rgb:`111827`}},alignment:{...l7,horizontal:`center`},border:c7},nne={font:{bold:!0,color:{rgb:`111827`}},fill:{fgColor:{rgb:`F3F4F6`}},alignment:{...l7,horizontal:`center`},border:c7},rne={font:{color:{rgb:`111827`}},fill:{fgColor:{rgb:`FFFFFF`}},alignment:{...l7,horizontal:`left`},border:c7},ine={font:{bold:!0,color:{rgb:`FFFFFF`}},fill:{fgColor:{rgb:`374151`}},alignment:{...l7,horizontal:`center`},border:c7},ane={font:{color:{rgb:`111827`}},fill:{fgColor:{rgb:`FFFFFF`}},alignment:{...l7,horizontal:`left`},border:c7};function u7(e){return e??``}function d7(e){if(e==null)return 0;let t=(e instanceof Date?e.toISOString():String(e)).split(/\r?\n/);return Math.max(...t.map(e=>Array.from(e).reduce((e,t)=>e+(t.charCodeAt(0)>255?2:1),0)),0)}function f7(e,t,n){return Math.min(n,Math.max(t,e))}function one(e,t){let n=Math.max(t.length,...e.map(e=>e.length));return Array.from({length:n},(n,r)=>{let i=t[r];if(i?.width)return{wch:i.width};let a=e.reduce((e,t)=>Math.max(e,d7(t[r])),d7(i?.title)),o=i?.minWidth??10,s=i?.maxWidth??42;return{wch:f7(Math.ceil(a*1.15)+2,o,s)}})}function sne(e,t,n=20){return f7(n+(e.reduce((e,n,r)=>{let i=Math.max(8,t[r]?.wch||12),a=(n==null?``:String(n)).split(/\r?\n/).reduce((e,t)=>e+Math.max(1,Math.ceil(d7(t)/Math.max(8,i-2))),0);return Math.max(e,a)},1)-1)*16,n,120)}function p7(e,t,n){e.s={...t,alignment:{...t.alignment},border:c7},n&&(e.z=n)}function m7(e){return typeof e==`number`&&Number.isFinite(e)}function cne(e){let{filename:t,sheetName:n,title:r,metadataRows:i=[],summaryRows:a=[],columns:o,rows:s}=e,c=Math.max(1,o.length),l=[],u=-1,d=-1;r&&(u=l.length,l.push([r,...Array.from({length:c-1},()=>``)])),i.forEach(e=>l.push(e.map(u7))),a.forEach(e=>l.push(e.map(u7))),(i.length||a.length)&&l.push(Array.from({length:c},()=>``)),d=l.length,l.push(o.map(e=>e.title)),s.forEach((e,t)=>{l.push(o.map(n=>u7(n.render(e,t))))});let f=s7.utils.aoa_to_sheet(l),p=s7.utils.decode_range(f[`!ref`]||`A1:A1`),m=one(l,o);f[`!cols`]=m,f[`!rows`]=l.map((e,t)=>t===u?{hpt:34}:t===d?{hpt:28}:e.every(e=>e===``)?{hpt:10}:{hpt:sne(e,m)}),u>=0&&c>1&&(f[`!merges`]=f[`!merges`]||[],f[`!merges`].push({s:{r:u,c:0},e:{r:u,c:c-1}})),f[`!autofilter`]={ref:s7.utils.encode_range({s:{r:d,c:0},e:{r:Math.max(d,l.length-1),c:c-1}})};for(let e=p.s.r;e<=p.e.r;e+=1)for(let t=p.s.c;t<=p.e.c;t+=1){let n=s7.utils.encode_cell({r:e,c:t}),r=f[n]||{t:`s`,v:``};if(f[n]=r,e===u){p7(r,tne);continue}if(e===d){p7(r,ine);continue}if(e{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(h7),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)(1),[m,h]=(0,S.useState)(10),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(``),[D,O]=(0,S.useState)(``),[k,A]=(0,S.useState)(``),[j,M]=(0,S.useState)(``),[N,P]=(0,S.useState)(``),[F,I]=(0,S.useState)([null,null]),L=(0,S.useMemo)(()=>({page:f,pageSize:m,userName:N||void 0,recordType:v||void 0,creditSubject:b||void 0,mediaType:C||void 0,chargeKind:T||void 0,sourceModule:D||void 0,sourceStepCode:k||void 0,billingScene:j||void 0,startDate:F[0]?.format(`YYYY-MM-DD`),endDate:F[1]?.format(`YYYY-MM-DD`),...vne(g)}),[f,m,N,v,b,C,T,D,k,j,F,g]),R=async()=>{s(!0);try{let e=await w8(L);t(e.items||[]),a(e.total||0),r(e.summary||h7)}catch(e){LG.error(e?.message||`加载积分记录失败`)}finally{s(!1)}};return(0,S.useEffect)(()=>{R()},[L]),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, minmax(0, 1fr))`,gap:16,marginBottom:16},children:[(0,Q.jsx)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)($1,{style:{color:`#10b981`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总充值`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#10b981`},children:[`+`,g7(n.totalRecharge)]})]})]})}),(0,Q.jsx)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(q1,{style:{color:`#ef4444`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总消费`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#ef4444`},children:[`-`,g7(n.totalConsume)]})]})]})}),(0,Q.jsx)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(m3,{style:{color:`#3b82f6`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总回退`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#3b82f6`},children:[`+`,g7(n.totalRefund)]})]})]})}),(0,Q.jsx)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(F6,{style:{color:`#6366f1`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`交易 / 生成`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800},children:[g7(n.transactionCount),` / `,g7(n.generationCount)]})]})]})})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, minmax(0, 1fr))`,gap:16,marginBottom:16},children:[(0,Q.jsxs)(PR,{size:`small`,bordered:!1,children:[`图片生成:`,g7(n.imageGenerationCount),` 条 / `,g7(n.imageConsume),` 积分`]}),(0,Q.jsxs)(PR,{size:`small`,bordered:!1,children:[`视频生成:`,g7(n.videoGenerationCount),` 条 / `,g7(n.videoConsume),` 积分`]}),(0,Q.jsxs)(PR,{size:`small`,bordered:!1,children:[`提词消费:`,g7(n.textConsume),` 积分`]}),(0,Q.jsxs)(PR,{size:`small`,bordered:!1,children:[`视频分析:`,g7(n.analysisConsume),` 积分`]})]}),(0,Q.jsxs)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(RC,{value:g,onChange:e=>{p(1),_(e)},style:{width:150},options:une}),(0,Q.jsx)(RC,{value:v,onChange:e=>{p(1),y(e)},style:{width:130},options:dne}),(0,Q.jsx)(RC,{value:b,onChange:e=>{p(1),x(e)},style:{width:180},options:fne}),(0,Q.jsx)(RC,{value:C,onChange:e=>{p(1),w(e)},style:{width:110},options:pne}),(0,Q.jsx)(RC,{value:T,onChange:e=>{p(1),E(e)},style:{width:150},options:mne}),(0,Q.jsx)(RC,{value:D,onChange:e=>{p(1),O(e)},style:{width:150},options:hne}),(0,Q.jsx)(RC,{value:k,onChange:e=>{p(1),A(e)},style:{width:150},options:gne}),(0,Q.jsx)(RC,{value:j,onChange:e=>{p(1),M(e)},style:{width:220},options:_ne}),(0,Q.jsx)(hW,{placeholder:`用户名/手机号/邮箱`,value:N,onChange:e=>{p(1),P(e.target.value)},style:{width:180},allowClear:!0}),(0,Q.jsx)(YB.RangePicker,{value:F,onChange:e=>{p(1),I(e?[e[0],e[1]]:[null,null])},placeholder:[`开始日期`,`结束日期`],style:{width:250}})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{onClick:()=>{_(``),y(``),x(``),w(``),E(``),O(``),A(``),M(``),P(``),I([null,null]),p(1)},children:`重置`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:R,children:`刷新`}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(b1,{}),loading:c,onClick:async()=>{l(!0),d(`准备导出...`);try{let e={...L,page:1,pageSize:500},t=await w8(e),n=[...t.items||[]],r=t.summary||h7,i=t.total||0,a=Math.max(1,Math.ceil(i/500));d(`正在获取 ${n.length} / ${i}`);for(let t=2;t<=a;t+=1){let r=await w8({...e,page:t});n.push(...r.items||[]),d(`正在获取 ${Math.min(n.length,i)} / ${i}`)}cne({filename:`积分流水_${(0,YE.default)().format(`YYYYMMDD_HHmmss`)}.xlsx`,sheetName:`积分流水`,title:`积分流水汇总`,metadataRows:[[`筛选时间`,`${F[0]?.format(`YYYY-MM-DD`)||`不限`} 至 ${F[1]?.format(`YYYY-MM-DD`)||`不限`}`],[`导出时间`,(0,YE.default)().format(`YYYY-MM-DD HH:mm:ss`)],[`导出条数`,i]],summaryRows:[[`总充值`,r.totalRecharge],[`总消费`,r.totalConsume],[`总回退`,r.totalRefund],[`交易笔数`,r.transactionCount],[`生成条数`,r.generationCount],[`生成尝试次数`,r.generationAttemptCount],[`图片生成条数`,r.imageGenerationCount],[`视频生成条数`,r.videoGenerationCount],[`图片消费积分`,r.imageConsume],[`视频消费积分`,r.videoConsume],[`提词消费积分`,r.textConsume],[`视频分析积分`,r.analysisConsume],[`总 Token`,r.totalTokens],[`输入 Token`,r.inputTokens],[`输出 Token`,r.outputTokens]],columns:[{title:`时间`,maxWidth:22,render:e=>$5(e.createdAt||``)},{title:`用户`,minWidth:12,maxWidth:20,render:e=>e.username||`-`},{title:`手机号`,minWidth:13,maxWidth:18,render:e=>e.phone||`-`},{title:`用户类型`,maxWidth:16,render:e=>e.userTypeLabel||`-`},{title:`前台归类`,maxWidth:18,render:e=>e.frontendUserKindLabel||`-`},{title:`流水类型`,maxWidth:14,align:`center`,render:e=>e.recordTypeLabel||e.type||`-`},{title:`积分类型`,maxWidth:20,render:e=>e.creditSubjectLabel||`-`},{title:`扣费子类`,maxWidth:22,render:e=>e.chargeKindLabel||`-`},{title:`模块`,maxWidth:20,render:e=>e.sourceModuleLabel||`-`},{title:`模块步骤`,maxWidth:22,render:e=>e.sourceStepCodeLabel||`-`},{title:`计费场景`,maxWidth:32,render:e=>e.billingSceneLabel||`-`},{title:`媒体类型`,maxWidth:12,align:`center`,render:e=>e.mediaTypeLabel||`-`},{title:`变动积分`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0.00`,render:e=>e.amount},{title:`变动后余额`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0.00`,render:e=>e.balanceAfter},{title:`实际 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.totalTokens||0},{title:`输入 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.inputTokens||0},{title:`输出 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.outputTokens||0},{title:`执行类型`,maxWidth:18,render:e=>_7(e.engineType)},{title:`执行配置`,maxWidth:28,render:e=>e.engineName||`-`},{title:`供应商`,maxWidth:18,render:e=>e.engineProvider||`-`},{title:`模型版本`,maxWidth:26,render:e=>e.engineModelName||`-`},{title:`关联状态`,maxWidth:14,align:`center`,render:e=>e.ownerDeleted?`关联已删除`:`正常`},{title:`说明`,minWidth:18,maxWidth:42,render:e=>e.description||``},{title:`业务归属类型`,maxWidth:18,render:e=>e.ownerType||``},{title:`业务归属ID`,maxWidth:28,render:e=>e.ownerId||``},{title:`BizKey`,maxWidth:36,render:e=>e.bizKey||``}],rows:n}),LG.success(`Excel 已导出`)}catch(e){LG.error(e?.message||`导出失败`)}finally{l(!1),d(``)}},children:`下载 Excel`})]})]}),u&&(0,Q.jsx)(`div`,{style:{marginBottom:12,color:`#6366f1`},children:u}),(0,Q.jsx)(bQ,{columns:[{title:`用户`,dataIndex:`username`,width:130,fixed:`left`,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:e||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:t.phone||`-`})]})},{title:`用户类型`,dataIndex:`userTypeLabel`,width:120,render:(e,t)=>(0,Q.jsx)(NQ,{color:t.userType===`admin`?`orange`:`blue`,children:t.userTypeLabel||`-`})},{title:`流水类型`,dataIndex:`recordType`,width:100,render:(e,t)=>{let n=lne[e]||{text:t.recordTypeLabel||e||`-`,color:`default`,icon:null};return(0,Q.jsx)(NQ,{color:n.color,icon:n.icon,children:n.text})}},{title:`积分类型`,dataIndex:`creditSubjectLabel`,width:150,render:e=>(0,Q.jsx)(NQ,{children:e||`-`})},{title:`模块`,dataIndex:`sourceModuleLabel`,width:130,render:e=>e||`-`},{title:`步骤/场景`,key:`scene`,width:210,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{children:t.billingSceneLabel||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:t.sourceStepCodeLabel||`-`})]})},{title:`媒体`,dataIndex:`mediaTypeLabel`,width:80,render:e=>e?(0,Q.jsx)(NQ,{color:`purple`,children:e}):`-`},{title:`变动积分`,dataIndex:`amount`,width:120,sorter:(e,t)=>e.amount-t.amount,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:e>0?`#10b981`:`#ef4444`},children:[e>0?`+`:``,g7(e)]})},{title:`余额`,dataIndex:`balanceAfter`,width:110,render:e=>g7(e)},{title:`Token`,key:`tokens`,width:140,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`b`,{children:g7(t.totalTokens)}),(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[`入 `,g7(t.inputTokens),` / 出 `,g7(t.outputTokens)]})]})},{title:`执行配置`,key:`engine`,width:230,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(NQ,{color:t.engineType===`model`?`geekblue`:t.engineType===`image`?`purple`:t.engineType===`video`?`cyan`:`default`,children:_7(t.engineType)}),(0,Q.jsx)(`div`,{children:t.engineName||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[t.engineProvider,t.engineModelName].filter(Boolean).join(` / `)||`-`})]})},{title:`关联状态`,dataIndex:`ownerDeleted`,width:100,render:e=>(0,Q.jsx)(NQ,{color:e?`red`:`green`,children:e?`已删除`:`正常`})},{title:`说明`,dataIndex:`description`,width:240,ellipsis:!0},{title:`时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:$5(e)})}],dataSource:e,rowKey:`id`,loading:o,pagination:{current:f,pageSize:m,total:i,onChange:(e,t)=>{p(e),h(t)},showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`},scroll:{x:1900}})]})]})},bne=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(180),[u]=X.useForm(),d=async()=>{try{let e=await L8(),t={};e.forEach(e=>{t[e.key]=e.value}),u.setFieldsValue({wechat_appid:t.payment_wechat_appid||``,wechat_mch_id:t.payment_wechat_mch_id||``,wechat_private_key:t.payment_wechat_private_key||``,wechat_cert_serial_no:t.payment_wechat_cert_serial_no||``,wechat_api_v3_key:t.payment_wechat_api_v3_key||``,wechat_notify_url:t.payment_wechat_notify_url||``,wechat_public_key:t.payment_wechat_public_key||``,wechat_public_key_id:t.payment_wechat_public_key_id||``,alipay_app_id:t.payment_alipay_app_id||``,alipay_private_key:t.payment_alipay_private_key||``,alipay_public_key:t.payment_alipay_public_key||``,alipay_notify_url:t.payment_alipay_notify_url||``,alipay_gateway:t.payment_alipay_gateway||``,order_timeout:t.payment_order_timeout||`180`}),r(t.payment_wechat_enabled===`true`),a(t.payment_alipay_enabled===`true`),s(t.payment_mock===`true`),l(parseInt(t.payment_order_timeout||`180`,10))}catch{LG.error(`加载支付配置失败`)}};return(0,S.useEffect)(()=>{d()},[]),(0,Q.jsxs)(`div`,{style:{maxWidth:`100%`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,marginBottom:24},children:[(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsx)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:40,height:40,borderRadius:10,background:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:`#6366f1`},children:(0,Q.jsx)(HB,{})}),(0,Q.jsx)(`div`,{children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`订单超时时间`})})]}),(0,Q.jsx)(X,{form:u,layout:`inline`,children:(0,Q.jsx)(X.Item,{name:`order_timeout`,style:{margin:0},children:(0,Q.jsxs)(VV.Compact,{style:{width:140},children:[(0,Q.jsx)(oB,{min:30,max:86400,placeholder:`180`,style:{width:`100%`},size:`middle`}),(0,Q.jsx)(Z.Text,{children:`秒`})]})})})]})})}),(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsx)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,background:o?`#fff7e6`:`#fafbff`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:40,height:40,borderRadius:10,background:o?`rgba(245,158,11,0.15)`:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:o?`#f59e0b`:`#6366f1`},children:(0,Q.jsx)(c2,{})}),(0,Q.jsx)(`div`,{children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`模拟支付模式`})})]}),(0,Q.jsx)(Mq,{checked:o,onChange:s,checkedChildren:`已开启`,unCheckedChildren:`已关闭`})]})})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(7,193,96,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:22,color:`#07c160`},children:(0,Q.jsx)(R6,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:5,style:{margin:0},children:`微信支付`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:`微信商户号支付配置`})]})]}),(0,Q.jsx)(Mq,{checked:n,onChange:r,checkedChildren:`已启用`,unCheckedChildren:`未启用`})]}),(0,Q.jsxs)(X,{form:u,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`wechat_appid`,label:`AppID`,children:(0,Q.jsx)(hW,{placeholder:`微信支付 AppID`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_mch_id`,label:`商户号 (MchID)`,children:(0,Q.jsx)(hW,{placeholder:`微信支付商户号`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_private_key`,label:`商户私钥`,extra:` ⚠️ 重要:请填写 apiclient_key.pem 的内容,不是 apiclient_cert.pem! 内容应该以 -----BEGIN PRIVATE KEY----- 或 -----BEGIN RSA PRIVATE KEY----- 开头 `,children:(0,Q.jsx)(hW.TextArea,{rows:4,placeholder:`\r -----BEGIN PRIVATE KEY-----\r ...这里是私钥内容...\r -----END PRIVATE KEY-----\r - `,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_cert_serial_no`,label:`商户证书序列号`,extra:`从 apiclient_cert.pem 中提取的证书序列号`,children:(0,Q.jsx)(hW,{placeholder:`商户证书序列号`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_api_v3_key`,label:`API v3 密钥`,children:(0,Q.jsx)(hW.Password,{placeholder:`API v3 密钥`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_notify_url`,label:`回调地址`,children:(0,Q.jsx)(hW,{placeholder:`https://yourdomain.com/api/payments/wechat/callback`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_public_key`,label:`微信平台公钥(可选)`,children:(0,Q.jsx)(hW.TextArea,{rows:3,placeholder:`微信支付平台公钥内容`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_public_key_id`,label:`微信平台公钥ID(可选)`,children:(0,Q.jsx)(hW,{placeholder:`平台公钥ID`,size:`large`,disabled:!n})})]})]})}),(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(0,122,255,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:22,color:`#007aff`},children:(0,Q.jsx)(z1,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:5,style:{margin:0},children:`支付宝`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:`支付宝应用支付配置`})]})]}),(0,Q.jsx)(Mq,{checked:i,onChange:a,checkedChildren:`已启用`,unCheckedChildren:`未启用`})]}),(0,Q.jsxs)(X,{form:u,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`alipay_app_id`,label:`AppID`,children:(0,Q.jsx)(hW,{placeholder:`支付宝应用AppID`,size:`large`,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_private_key`,label:`应用私钥`,extra:`支付宝应用私钥(PKCS8格式),不需要添加头部和尾部标记`,children:(0,Q.jsx)(hW.TextArea,{rows:4,placeholder:`\r + `,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_cert_serial_no`,label:`商户证书序列号`,extra:`从 apiclient_cert.pem 中提取的证书序列号`,children:(0,Q.jsx)(hW,{placeholder:`商户证书序列号`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_api_v3_key`,label:`API v3 密钥`,children:(0,Q.jsx)(hW.Password,{placeholder:`API v3 密钥`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_notify_url`,label:`回调地址`,children:(0,Q.jsx)(hW,{placeholder:`https://yourdomain.com/api/payments/wechat/callback`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_public_key`,label:`微信平台公钥(可选)`,children:(0,Q.jsx)(hW.TextArea,{rows:3,placeholder:`微信支付平台公钥内容`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_public_key_id`,label:`微信平台公钥ID(可选)`,children:(0,Q.jsx)(hW,{placeholder:`平台公钥ID`,size:`large`,disabled:!n})})]})]})}),(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(0,122,255,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:22,color:`#007aff`},children:(0,Q.jsx)(R1,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:5,style:{margin:0},children:`支付宝`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:`支付宝应用支付配置`})]})]}),(0,Q.jsx)(Mq,{checked:i,onChange:a,checkedChildren:`已启用`,unCheckedChildren:`未启用`})]}),(0,Q.jsxs)(X,{form:u,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`alipay_app_id`,label:`AppID`,children:(0,Q.jsx)(hW,{placeholder:`支付宝应用AppID`,size:`large`,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_private_key`,label:`应用私钥`,extra:`支付宝应用私钥(PKCS8格式),不需要添加头部和尾部标记`,children:(0,Q.jsx)(hW.TextArea,{rows:4,placeholder:`\r MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC...\r `,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_public_key`,label:`支付宝公钥`,extra:`从支付宝开放平台获取的支付宝公钥`,children:(0,Q.jsx)(hW.TextArea,{rows:4,placeholder:`\r MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...\r - `,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_gateway`,label:`网关地址`,children:(0,Q.jsx)(hW,{placeholder:`https://openapi.alipay.com/gateway.do`,size:`large`,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_notify_url`,label:`回调地址`,children:(0,Q.jsx)(hW,{placeholder:`https://yourdomain.com/api/payments/alipay/callback`,size:`large`,disabled:!i})})]})]})})]}),(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,marginTop:24},children:(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(v3,{}),onClick:async()=>{try{let e=await u.validateFields();t(!0),await I8({payment_mock:String(o),payment_wechat_enabled:String(n),payment_wechat_appid:e.wechat_appid||``,payment_wechat_mch_id:e.wechat_mch_id||``,payment_wechat_private_key:e.wechat_private_key||``,payment_wechat_cert_serial_no:e.wechat_cert_serial_no||``,payment_wechat_api_v3_key:e.wechat_api_v3_key||``,payment_wechat_notify_url:e.wechat_notify_url||``,payment_wechat_public_key:e.wechat_public_key||``,payment_wechat_public_key_id:e.wechat_public_key_id||``,payment_alipay_enabled:String(i),payment_alipay_app_id:e.alipay_app_id||``,payment_alipay_private_key:e.alipay_private_key||``,payment_alipay_public_key:e.alipay_public_key||``,payment_alipay_notify_url:e.alipay_notify_url||``,payment_alipay_gateway:e.alipay_gateway||``,payment_order_timeout:String(e.order_timeout||180)}),LG.success(`支付配置已保存`),d()}catch{LG.error(`保存失败`)}finally{t(!1)}},loading:e,size:`large`,style:{borderRadius:8,minWidth:160,height:44,fontSize:15},children:`保存配置`})})]})},{Option:v7}=RC,{RangePicker:vne}=YB,yne=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)(1),[o,s]=(0,S.useState)(10),[c,l]=(0,S.useState)(0),[u,d]=(0,S.useState)({startDate:(0,YE.default)().format(`YYYY-MM-DD`),endDate:(0,YE.default)().format(`YYYY-MM-DD`)}),f=async()=>{try{t(!0);let[e,n]=await Promise.all([L8(u),R8({...u,page:i,pageSize:o})]);r({...e,recent:n.items||[]}),l(n.total)}catch{LG.error(`加载支付统计失败`)}finally{t(!1)}};(0,S.useEffect)(()=>{f()},[u,i,o]);let p=(e,t)=>{a(e),s(t)},m=()=>{d({startDate:(0,YE.default)().format(`YYYY-MM-DD`),endDate:(0,YE.default)().format(`YYYY-MM-DD`)})},h=async e=>{try{t(!0),await z8(e),LG.success(`退款成功`),await f()}catch(e){LG.error(e?.response?.data?.detail||`退款失败`)}finally{t(!1)}},g=e=>{e&&e.length===2&&d(t=>({...t,startDate:e[0].format(`YYYY-MM-DD`),endDate:e[1].format(`YYYY-MM-DD`)}))},_={paid:{color:`green`,label:`已支付`,icon:(0,Q.jsx)(N0,{})},pending:{color:`gold`,label:`待支付`,icon:(0,Q.jsx)(HB,{})},cancelled:{color:`default`,label:`已取消`,icon:(0,Q.jsx)(I0,{})},refunded:{color:`red`,label:`已退款`,icon:(0,Q.jsx)(x6,{})}},v={alipay:{color:`blue`,label:`支付宝`},wechat:{color:`green`,label:`微信`}},y=[{title:`订单号`,dataIndex:`orderNo`,key:`orderNo`,width:200},{title:`用户`,dataIndex:`username`,key:`username`,width:120},{title:`支付方式`,dataIndex:`paymentMethod`,key:`paymentMethod`,width:100,render:e=>{let t=v[e]||{color:`default`,label:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.label})}},{title:`金额`,dataIndex:`amount`,key:`amount`,width:100,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:`#10b981`},children:[`¥`,e.toFixed(2)]})},{title:`积分`,dataIndex:`credits`,key:`credits`,width:80},{title:`状态`,dataIndex:`status`,key:`status`,width:100,render:e=>{let t=_[e]||{color:`default`,label:e,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.label})}},{title:`支付宝交易号`,dataIndex:`tradeNo`,key:`tradeNo`,width:200,render:e=>e||`-`},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,Q.jsx)(`span`,{className:`date-display`,style:{color:`#94a3b8`},children:e?Z5(e):`-`})},{title:`支付时间`,dataIndex:`paidAt`,key:`paidAt`,width:160,render:e=>(0,Q.jsx)(`span`,{className:`date-display`,style:{color:`#94a3b8`},children:e?Z5(e):`-`})},{title:`操作`,key:`action`,width:120,render:(e,t)=>t.status===`paid`?(0,Q.jsx)(WG,{title:`确认要退款该订单吗?`,description:`退款后积分会扣除,金额会原路返回`,onConfirm:()=>h(t.orderNo),okText:`确认`,cancelText:`取消`,children:(0,Q.jsx)(qE,{type:`link`,danger:!0,size:`small`,icon:(0,Q.jsx)(x6,{}),children:`退款`})}):null}];if(!n)return(0,Q.jsx)(`div`,{style:{padding:24,color:`#94a3b8`},children:`加载中…`});let b=n.byStatus?.paid||{count:0,amount:0},x=n.byStatus?.pending||{count:0,amount:0},C=n.byStatus?.cancelled||{count:0,amount:0},w=n.byStatus?.refunded||{count:0,amount:0},T=b.count+x.count+C.count+w.count,E=n.month||{count:0,amount:0};return(0,Q.jsx)(am,{locale:U6.default,children:(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(DK,{gutter:[16,16],style:{marginBottom:24},children:[(0,Q.jsx)(pz,{xs:24,sm:12,lg:12,children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsx)(zK,{title:`今日收入`,value:n.today.paidAmount,precision:2,prefix:(0,Q.jsx)(l2,{style:{color:`#10b981`}}),suffix:`元`,valueStyle:{color:`#10b981`,fontWeight:700}}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[n.today.paidCount,` 笔订单`]})]})}),(0,Q.jsx)(pz,{xs:24,sm:12,lg:12,children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsx)(zK,{title:`本月累计`,value:E.paidAmount,precision:2,prefix:(0,Q.jsx)(l2,{style:{color:`#6366f1`}}),suffix:`元`,valueStyle:{color:`#6366f1`,fontWeight:700}}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[E.paidCount,` 笔订单`]})]})})]}),(0,Q.jsx)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,marginBottom:16},title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(l2,{}),`订单状态分布`]}),children:(0,Q.jsx)(DK,{gutter:16,children:[`paid`,`pending`,`cancelled`,`refunded`].map(e=>{let t=n.byStatus?.[e]||{count:0,amount:0},r=_[e],i=T>0?(t.count/T*100).toFixed(1):`0.0`;return(0,Q.jsx)(pz,{span:6,children:(0,Q.jsxs)(`div`,{style:{padding:16,borderRadius:10,background:`#fafbff`,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(NQ,{color:r.color,icon:r.icon,children:r.label}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[i,`%`]})]}),(0,Q.jsxs)(`div`,{style:{marginTop:8,fontSize:20,fontWeight:700},children:[t.count,` `,(0,Q.jsx)(`span`,{style:{fontSize:13,color:`#94a3b8`,fontWeight:400},children:`笔`})]}),(0,Q.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`,marginTop:4},children:[`¥`,t.amount.toFixed(2)]})]})},e)})})}),(0,Q.jsxs)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(l2,{}),`订单列表`]}),children:[(0,Q.jsxs)(DK,{gutter:[16,16],align:`middle`,style:{marginBottom:24},children:[(0,Q.jsxs)(pz,{xs:24,sm:12,md:6,children:[(0,Q.jsx)(`span`,{style:{marginRight:8},children:`支付方式:`}),(0,Q.jsxs)(RC,{placeholder:`全部`,allowClear:!0,style:{width:150},value:u.paymentMethod,onChange:e=>d(t=>({...t,paymentMethod:e})),children:[(0,Q.jsx)(v7,{value:`alipay`,children:`支付宝`}),(0,Q.jsx)(v7,{value:`wechat`,children:`微信`})]})]}),(0,Q.jsxs)(pz,{xs:24,sm:12,md:6,children:[(0,Q.jsx)(`span`,{style:{marginRight:8},children:`状态:`}),(0,Q.jsxs)(RC,{placeholder:`全部`,allowClear:!0,style:{width:150},value:u.status,onChange:e=>d(t=>({...t,status:e})),children:[(0,Q.jsx)(v7,{value:`paid`,children:`已支付`}),(0,Q.jsx)(v7,{value:`pending`,children:`待支付`}),(0,Q.jsx)(v7,{value:`cancelled`,children:`已取消`}),(0,Q.jsx)(v7,{value:`refunded`,children:`已退款`})]})]}),(0,Q.jsxs)(pz,{xs:24,sm:12,md:8,children:[(0,Q.jsx)(`span`,{style:{marginRight:8},children:`日期范围:`}),(0,Q.jsx)(vne,{value:[(0,YE.default)(u.startDate),(0,YE.default)(u.endDate)],onChange:g})]}),(0,Q.jsx)(pz,{xs:24,sm:12,md:4,children:(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:m,children:`重置`})})]}),(0,Q.jsx)(bQ,{columns:y,dataSource:n.recent||[],rowKey:`id`,loading:e,pagination:{current:i,pageSize:o,total:c,onChange:p,showSizeChanger:!0,showTotal:e=>`共 ${e} 条`},scroll:{x:1e3},size:`middle`})]})]})})},y7=[{name:`ShoppingCartOutlined`,label:`购物`,component:(0,Q.jsx)(A3,{})},{name:`BookOutlined`,label:`书籍`,component:(0,Q.jsx)(h0,{})},{name:`HomeOutlined`,label:`房产`,component:(0,Q.jsx)(Z2,{})},{name:`FireOutlined`,label:`火`,component:(0,Q.jsx)(D2,{})},{name:`RocketOutlined`,label:`科技`,component:(0,Q.jsx)(l3,{})},{name:`SkinOutlined`,label:`时尚`,component:(0,Q.jsx)(z3,{})},{name:`CompassOutlined`,label:`指南`,component:(0,Q.jsx)(Z0,{})},{name:`HeartOutlined`,label:`健康`,component:(0,Q.jsx)(H2,{})},{name:`CarOutlined`,label:`汽车`,component:(0,Q.jsx)(A0,{})},{name:`CameraOutlined`,label:`相机`,component:(0,Q.jsx)(D0,{})},{name:`CloudOutlined`,label:`云`,component:(0,Q.jsx)(z0,{})},{name:`StarOutlined`,label:`星`,component:(0,Q.jsx)(Z3,{})},{name:`TrophyOutlined`,label:`奖杯`,component:(0,Q.jsx)(h6,{})},{name:`ThunderboltOutlined`,label:`闪电`,component:(0,Q.jsx)(l6,{})},{name:`BulbOutlined`,label:`灯泡`,component:(0,Q.jsx)(x0,{})},{name:`CoffeeOutlined`,label:`咖啡`,component:(0,Q.jsx)(J0,{})},{name:`CrownOutlined`,label:`皇冠`,component:(0,Q.jsx)(e2,{})},{name:`DashboardOutlined`,label:`仪表`,component:(0,Q.jsx)(r2,{})},{name:`FlagOutlined`,label:`旗帜`,component:(0,Q.jsx)(A2,{})},{name:`GlobalOutlined`,label:`全球`,component:(0,Q.jsx)(z2,{})},{name:`GiftOutlined`,label:`礼物`,component:(0,Q.jsx)(I2,{})},{name:`LaptopOutlined`,label:`笔记本`,component:(0,Q.jsx)(r4,{})},{name:`MobileOutlined`,label:`手机`,component:(0,Q.jsx)(A4,{})},{name:`MonitorOutlined`,label:`显示器`,component:(0,Q.jsx)(N4,{})},{name:`PayCircleOutlined`,label:`支付`,component:(0,Q.jsx)(I4,{})},{name:`PictureOutlined`,label:`图片`,component:(0,Q.jsx)(H4,{})},{name:`PlayCircleOutlined`,label:`播放`,component:(0,Q.jsx)(J4,{})},{name:`SafetyOutlined`,label:`安全`,component:(0,Q.jsx)(h3,{})},{name:`ShoppingOutlined`,label:`商店`,component:(0,Q.jsx)(N3,{})},{name:`SmileOutlined`,label:`笑脸`,component:(0,Q.jsx)(H3,{})},{name:`SoundOutlined`,label:`声音`,component:(0,Q.jsx)(J3,{})},{name:`TagOutlined`,label:`标签`,component:(0,Q.jsx)(r6,{})},{name:`TeamOutlined`,label:`团队`,component:(0,Q.jsx)(o6,{})},{name:`ToolOutlined`,label:`工具`,component:(0,Q.jsx)(f6,{})},{name:`TruckOutlined`,label:`物流`,component:(0,Q.jsx)(v6,{})},{name:`VideoCameraOutlined`,label:`视频`,component:(0,Q.jsx)(A6,{})},{name:`WalletOutlined`,label:`钱包`,component:(0,Q.jsx)(N6,{})},{name:`BankOutlined`,label:`银行`,component:(0,Q.jsx)(o0,{})},{name:`BuildOutlined`,label:`建筑`,component:(0,Q.jsx)(v0,{})},{name:`ExperimentOutlined`,label:`实验`,component:(0,Q.jsx)(h2,{})},{name:`HighlightOutlined`,label:`高亮`,component:(0,Q.jsx)(G2,{})},{name:`IdcardOutlined`,label:`名片`,component:(0,Q.jsx)(e4,{})},{name:`MedicineBoxOutlined`,label:`医药`,component:(0,Q.jsx)(x4,{})},{name:`ReadOutlined`,label:`阅读`,component:(0,Q.jsx)(e3,{})},{name:`RestOutlined`,label:`休息`,component:(0,Q.jsx)(r3,{})},{name:`SketchOutlined`,label:`钻石`,component:(0,Q.jsx)(I3,{})},{name:`SolutionOutlined`,label:`方案`,component:(0,Q.jsx)(G3,{})}],bne=Object.fromEntries(y7.map(e=>[e.name,e.component]));function b7(e){return bne[e]||(0,Q.jsx)(G1,{})}function xne(e){try{let t=typeof e==`string`?JSON.parse(e):e;if(!Array.isArray(t))return{skillItems:[],optionGroups:[]};let n=[],r=[];for(let e of t)e&&e.type===`option_group`&&e.name&&Array.isArray(e.options)?r.push({name:e.name,options:e.options}):e&&e.key&&e.label&&n.push({key:e.key,label:e.label});return{skillItems:n,optionGroups:r}}catch{return{skillItems:[],optionGroups:[]}}}var Sne=({value:e,onChange:t})=>{let n=y7.find(t=>t.name===e);return(0,Q.jsx)(UV,{trigger:[`click`],dropdownRender:()=>(0,Q.jsx)(`div`,{style:{background:`#fff`,borderRadius:12,padding:12,width:360,boxShadow:`0 12px 40px rgba(0,0,0,0.15)`,border:`1px solid #f0f0f5`},children:(0,Q.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(8, 1fr)`,gap:4},children:y7.map(n=>(0,Q.jsx)(`div`,{onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),t?.(n.name)},title:n.label,style:{width:40,height:40,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,fontSize:18,transition:`all 0.15s`,background:e===n.name?`#6366f1`:`transparent`,color:e===n.name?`#fff`:`#64748b`,border:e===n.name?`none`:`1px solid transparent`},onMouseEnter:t=>{e!==n.name&&(t.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:t=>{e!==n.name&&(t.currentTarget.style.background=`transparent`)},children:n.component},n.name))})}),children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`8px 12px`,borderRadius:8,border:`1px solid #d9d9d9`,cursor:`pointer`,height:40},children:[e?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{style:{fontSize:18,color:`#6366f1`},children:b7(e)}),(0,Q.jsx)(`span`,{style:{color:`#64748b`,fontSize:13},children:n?.label||e})]}):(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`,fontSize:13},children:`选择图标`}),(0,Q.jsx)(AC,{style:{fontSize:10,color:`#bfbfbf`,marginLeft:`auto`}})]})})},Cne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)({open:!1,item:null}),[c]=X.useForm(),l=async()=>{r(!0);try{t((await C8()).map(e=>{let{skillItems:t,optionGroups:n}=xne(e.skills);return{id:e.id,key:e.key,label:e.label,icon:e.icon||``,description:e.description||``,skills:JSON.stringify(t),optionGroups:n,isActive:e.is_active??e.isActive??!0,sortOrder:e.sort_order??e.sortOrder??0}}))}catch{LG.error(`加载行业配置失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{l()},[]);let u=async()=>{try{let e=await c.validateFields();a(!0);let t=[];e.skills_wentutujie?.trim()&&t.push({type:`skill`,key:`文图理解生成视频提示词`,label:e.skills_wentutujie.trim()}),e.skills_wentutujie_image?.trim()&&t.push({type:`skill`,key:`文图理解生成图片提示词`,label:e.skills_wentutujie_image.trim()});let n=(e.optionGroups||[]).filter(e=>e?.name?.trim()).map(e=>({name:e.name.trim(),options:(e.options||[]).filter(e=>e?.trim())})).filter(e=>e.options.length>0);for(let e of n)t.push({type:`option_group`,name:e.name,options:e.options});let r={key:e.key,label:e.label,icon:e.icon||``,description:e.description||``,skills:t,is_active:e.is_active??!0,sort_order:e.sort_order??0};o.item?.id?(await w8({id:o.item.id,...r}),LG.success(`已更新`)):(await w8(r),LG.success(`已添加`)),s({open:!1,item:null}),c.resetFields(),l()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}finally{a(!1)}},d=async e=>{try{await T8(e),LG.success(`已删除`),l()}catch(e){LG.error(e?.message||`删除失败`)}},f=e=>{s({open:!0,item:e||null});let t=``,n=``,r=[];if(e){try{let r=JSON.parse(e.skills);if(Array.isArray(r))for(let e of r)(e.key===`文图理解生成视频提示词`||e.key===`文图理解`)&&(t=e.label||``),e.key===`文图理解生成图片提示词`&&(n=e.label||``)}catch{}r=e.optionGroups.length>0?e.optionGroups:[{name:``,options:[]}]}e?c.setFieldsValue({key:e.key,label:e.label,icon:e.icon||``,description:e.description,skills_wentutujie:t,skills_wentutujie_image:n,optionGroups:r,is_active:e.isActive,sort_order:e.sortOrder}):(c.resetFields(),c.setFieldsValue({is_active:!0,sort_order:0,optionGroups:[{name:``,options:[]}]}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(G1,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`行业与技能配置`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 个行业`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>f(),style:{borderRadius:8},children:`添加行业`})]}),(0,Q.jsx)(bQ,{columns:[{title:`行业`,key:`industry`,width:180,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsx)(`div`,{style:{width:36,height:36,borderRadius:10,background:`#f1f5f9`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:18,color:`#6366f1`,flexShrink:0},children:b7(t.icon)}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.label}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.key})]})]})},{title:`描述`,dataIndex:`description`,ellipsis:!0},{title:`选项配置`,key:`optionGroups`,width:260,render:(e,t)=>!t.optionGroups||t.optionGroups.length===0?(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#cbd5e1`},children:`未配置`}):(0,Q.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:t.optionGroups.map((e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,Q.jsx)(NQ,{color:`blue`,style:{margin:0,fontSize:11},children:e.name}),(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#64748b`},children:[e.options.slice(0,3).join(`、`),e.options.length>3?`...${e.options.length}项`:``]})]},t))})},{title:`文图理解生成视频提示词`,dataIndex:`skills`,ellipsis:!0,render:e=>{try{let t=JSON.parse(e);if(Array.isArray(t)){let e=t.find(e=>e.key===`文图理解生成视频提示词`||e.key===`文图理解`);if(e)return(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{fontSize:12},children:e.label})}}catch{}return(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`})}},{title:`文图理解生成图片提示词`,dataIndex:`skills`,ellipsis:!0,render:e=>{try{let t=JSON.parse(e);if(Array.isArray(t)){let e=t.find(e=>e.key===`文图理解生成图片提示词`);if(e)return(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{fontSize:12},children:e.label})}}catch{}return(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`})}},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>f(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除该行业?`,onConfirm:()=>d(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(G1,{}),o.item?`编辑行业`:`添加行业`]}),open:o.open,onOk:u,onCancel:()=>{s({open:!1,item:null}),c.resetFields()},okText:`保存`,cancelText:`取消`,width:640,confirmLoading:i,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`key`,label:`行业标识`,style:{flex:1},rules:[{required:!0,message:`请输入标识`}],children:(0,Q.jsx)(hW,{placeholder:`例如:ecommerce`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`label`,label:`行业名称`,style:{flex:1},rules:[{required:!0,message:`请输入名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:电商`,size:`large`})})]}),(0,Q.jsx)(X.Item,{name:`icon`,label:`行业图标`,children:(0,Q.jsx)(Sne,{})}),(0,Q.jsx)(X.Item,{name:`description`,label:`行业描述`,children:(0,Q.jsx)(hW.TextArea,{rows:2,placeholder:`行业描述`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`skills_wentutujie`,label:`文图理解生成视频提示词`,extra:`用于LLM优化视频提示词的系统指令,根据行业特点引导AI理解文案与画面的关系`,children:(0,Q.jsx)(hW.TextArea,{rows:3,placeholder:`请输入文图理解生成视频提示词,例如: + `,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_gateway`,label:`网关地址`,children:(0,Q.jsx)(hW,{placeholder:`https://openapi.alipay.com/gateway.do`,size:`large`,disabled:!i})}),(0,Q.jsx)(X.Item,{name:`alipay_notify_url`,label:`回调地址`,children:(0,Q.jsx)(hW,{placeholder:`https://yourdomain.com/api/payments/alipay/callback`,size:`large`,disabled:!i})})]})]})})]}),(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,marginTop:24},children:(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(b3,{}),onClick:async()=>{try{let e=await u.validateFields();t(!0),await R8({payment_mock:String(o),payment_wechat_enabled:String(n),payment_wechat_appid:e.wechat_appid||``,payment_wechat_mch_id:e.wechat_mch_id||``,payment_wechat_private_key:e.wechat_private_key||``,payment_wechat_cert_serial_no:e.wechat_cert_serial_no||``,payment_wechat_api_v3_key:e.wechat_api_v3_key||``,payment_wechat_notify_url:e.wechat_notify_url||``,payment_wechat_public_key:e.wechat_public_key||``,payment_wechat_public_key_id:e.wechat_public_key_id||``,payment_alipay_enabled:String(i),payment_alipay_app_id:e.alipay_app_id||``,payment_alipay_private_key:e.alipay_private_key||``,payment_alipay_public_key:e.alipay_public_key||``,payment_alipay_notify_url:e.alipay_notify_url||``,payment_alipay_gateway:e.alipay_gateway||``,payment_order_timeout:String(e.order_timeout||180)}),LG.success(`支付配置已保存`),d()}catch{LG.error(`保存失败`)}finally{t(!1)}},loading:e,size:`large`,style:{borderRadius:8,minWidth:160,height:44,fontSize:15},children:`保存配置`})})]})},{Option:v7}=RC,{RangePicker:xne}=YB,Sne=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)(1),[o,s]=(0,S.useState)(10),[c,l]=(0,S.useState)(0),[u,d]=(0,S.useState)({startDate:(0,YE.default)().format(`YYYY-MM-DD`),endDate:(0,YE.default)().format(`YYYY-MM-DD`)}),f=async()=>{try{t(!0);let[e,n]=await Promise.all([z8(u),B8({...u,page:i,pageSize:o})]);r({...e,recent:n.items||[]}),l(n.total)}catch{LG.error(`加载支付统计失败`)}finally{t(!1)}};(0,S.useEffect)(()=>{f()},[u,i,o]);let p=(e,t)=>{a(e),s(t)},m=()=>{d({startDate:(0,YE.default)().format(`YYYY-MM-DD`),endDate:(0,YE.default)().format(`YYYY-MM-DD`)})},h=async e=>{try{t(!0),await V8(e),LG.success(`退款成功`),await f()}catch(e){LG.error(e?.response?.data?.detail||`退款失败`)}finally{t(!1)}},g=e=>{e&&e.length===2&&d(t=>({...t,startDate:e[0].format(`YYYY-MM-DD`),endDate:e[1].format(`YYYY-MM-DD`)}))},_={paid:{color:`green`,label:`已支付`,icon:(0,Q.jsx)(M0,{})},pending:{color:`gold`,label:`待支付`,icon:(0,Q.jsx)(HB,{})},cancelled:{color:`default`,label:`已取消`,icon:(0,Q.jsx)(F0,{})},refunded:{color:`red`,label:`已退款`,icon:(0,Q.jsx)(C6,{})}},v={alipay:{color:`blue`,label:`支付宝`},wechat:{color:`green`,label:`微信`}},y=[{title:`订单号`,dataIndex:`orderNo`,key:`orderNo`,width:200},{title:`用户`,dataIndex:`username`,key:`username`,width:120},{title:`支付方式`,dataIndex:`paymentMethod`,key:`paymentMethod`,width:100,render:e=>{let t=v[e]||{color:`default`,label:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.label})}},{title:`金额`,dataIndex:`amount`,key:`amount`,width:100,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:`#10b981`},children:[`¥`,e.toFixed(2)]})},{title:`积分`,dataIndex:`credits`,key:`credits`,width:80},{title:`状态`,dataIndex:`status`,key:`status`,width:100,render:e=>{let t=_[e]||{color:`default`,label:e,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.label})}},{title:`支付宝交易号`,dataIndex:`tradeNo`,key:`tradeNo`,width:200,render:e=>e||`-`},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,Q.jsx)(`span`,{className:`date-display`,style:{color:`#94a3b8`},children:e?$5(e):`-`})},{title:`支付时间`,dataIndex:`paidAt`,key:`paidAt`,width:160,render:e=>(0,Q.jsx)(`span`,{className:`date-display`,style:{color:`#94a3b8`},children:e?$5(e):`-`})},{title:`操作`,key:`action`,width:120,render:(e,t)=>t.status===`paid`?(0,Q.jsx)(WG,{title:`确认要退款该订单吗?`,description:`退款后积分会扣除,金额会原路返回`,onConfirm:()=>h(t.orderNo),okText:`确认`,cancelText:`取消`,children:(0,Q.jsx)(qE,{type:`link`,danger:!0,size:`small`,icon:(0,Q.jsx)(C6,{}),children:`退款`})}):null}];if(!n)return(0,Q.jsx)(`div`,{style:{padding:24,color:`#94a3b8`},children:`加载中…`});let b=n.byStatus?.paid||{count:0,amount:0},x=n.byStatus?.pending||{count:0,amount:0},C=n.byStatus?.cancelled||{count:0,amount:0},w=n.byStatus?.refunded||{count:0,amount:0},T=b.count+x.count+C.count+w.count,E=n.month||{count:0,amount:0};return(0,Q.jsx)(am,{locale:G6.default,children:(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(DK,{gutter:[16,16],style:{marginBottom:24},children:[(0,Q.jsx)(pz,{xs:24,sm:12,lg:12,children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsx)(zK,{title:`今日收入`,value:n.today.paidAmount,precision:2,prefix:(0,Q.jsx)(c2,{style:{color:`#10b981`}}),suffix:`元`,valueStyle:{color:`#10b981`,fontWeight:700}}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[n.today.paidCount,` 笔订单`]})]})}),(0,Q.jsx)(pz,{xs:24,sm:12,lg:12,children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsx)(zK,{title:`本月累计`,value:E.paidAmount,precision:2,prefix:(0,Q.jsx)(c2,{style:{color:`#6366f1`}}),suffix:`元`,valueStyle:{color:`#6366f1`,fontWeight:700}}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[E.paidCount,` 笔订单`]})]})})]}),(0,Q.jsx)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,marginBottom:16},title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(c2,{}),`订单状态分布`]}),children:(0,Q.jsx)(DK,{gutter:16,children:[`paid`,`pending`,`cancelled`,`refunded`].map(e=>{let t=n.byStatus?.[e]||{count:0,amount:0},r=_[e],i=T>0?(t.count/T*100).toFixed(1):`0.0`;return(0,Q.jsx)(pz,{span:6,children:(0,Q.jsxs)(`div`,{style:{padding:16,borderRadius:10,background:`#fafbff`,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(NQ,{color:r.color,icon:r.icon,children:r.label}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[i,`%`]})]}),(0,Q.jsxs)(`div`,{style:{marginTop:8,fontSize:20,fontWeight:700},children:[t.count,` `,(0,Q.jsx)(`span`,{style:{fontSize:13,color:`#94a3b8`,fontWeight:400},children:`笔`})]}),(0,Q.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`,marginTop:4},children:[`¥`,t.amount.toFixed(2)]})]})},e)})})}),(0,Q.jsxs)(PR,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(c2,{}),`订单列表`]}),children:[(0,Q.jsxs)(DK,{gutter:[16,16],align:`middle`,style:{marginBottom:24},children:[(0,Q.jsxs)(pz,{xs:24,sm:12,md:6,children:[(0,Q.jsx)(`span`,{style:{marginRight:8},children:`支付方式:`}),(0,Q.jsxs)(RC,{placeholder:`全部`,allowClear:!0,style:{width:150},value:u.paymentMethod,onChange:e=>d(t=>({...t,paymentMethod:e})),children:[(0,Q.jsx)(v7,{value:`alipay`,children:`支付宝`}),(0,Q.jsx)(v7,{value:`wechat`,children:`微信`})]})]}),(0,Q.jsxs)(pz,{xs:24,sm:12,md:6,children:[(0,Q.jsx)(`span`,{style:{marginRight:8},children:`状态:`}),(0,Q.jsxs)(RC,{placeholder:`全部`,allowClear:!0,style:{width:150},value:u.status,onChange:e=>d(t=>({...t,status:e})),children:[(0,Q.jsx)(v7,{value:`paid`,children:`已支付`}),(0,Q.jsx)(v7,{value:`pending`,children:`待支付`}),(0,Q.jsx)(v7,{value:`cancelled`,children:`已取消`}),(0,Q.jsx)(v7,{value:`refunded`,children:`已退款`})]})]}),(0,Q.jsxs)(pz,{xs:24,sm:12,md:8,children:[(0,Q.jsx)(`span`,{style:{marginRight:8},children:`日期范围:`}),(0,Q.jsx)(xne,{value:[(0,YE.default)(u.startDate),(0,YE.default)(u.endDate)],onChange:g})]}),(0,Q.jsx)(pz,{xs:24,sm:12,md:4,children:(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:m,children:`重置`})})]}),(0,Q.jsx)(bQ,{columns:y,dataSource:n.recent||[],rowKey:`id`,loading:e,pagination:{current:i,pageSize:o,total:c,onChange:p,showSizeChanger:!0,showTotal:e=>`共 ${e} 条`},scroll:{x:1e3},size:`middle`})]})]})})},y7=[{name:`ShoppingCartOutlined`,label:`购物`,component:(0,Q.jsx)(M3,{})},{name:`BookOutlined`,label:`书籍`,component:(0,Q.jsx)(m0,{})},{name:`HomeOutlined`,label:`房产`,component:(0,Q.jsx)(X2,{})},{name:`FireOutlined`,label:`火`,component:(0,Q.jsx)(E2,{})},{name:`RocketOutlined`,label:`科技`,component:(0,Q.jsx)(d3,{})},{name:`SkinOutlined`,label:`时尚`,component:(0,Q.jsx)(V3,{})},{name:`CompassOutlined`,label:`指南`,component:(0,Q.jsx)(X0,{})},{name:`HeartOutlined`,label:`健康`,component:(0,Q.jsx)(V2,{})},{name:`CarOutlined`,label:`汽车`,component:(0,Q.jsx)(k0,{})},{name:`CameraOutlined`,label:`相机`,component:(0,Q.jsx)(E0,{})},{name:`CloudOutlined`,label:`云`,component:(0,Q.jsx)(R0,{})},{name:`StarOutlined`,label:`星`,component:(0,Q.jsx)($3,{})},{name:`TrophyOutlined`,label:`奖杯`,component:(0,Q.jsx)(_6,{})},{name:`ThunderboltOutlined`,label:`闪电`,component:(0,Q.jsx)(d6,{})},{name:`BulbOutlined`,label:`灯泡`,component:(0,Q.jsx)(b0,{})},{name:`CoffeeOutlined`,label:`咖啡`,component:(0,Q.jsx)(q0,{})},{name:`CrownOutlined`,label:`皇冠`,component:(0,Q.jsx)($0,{})},{name:`DashboardOutlined`,label:`仪表`,component:(0,Q.jsx)(n2,{})},{name:`FlagOutlined`,label:`旗帜`,component:(0,Q.jsx)(k2,{})},{name:`GlobalOutlined`,label:`全球`,component:(0,Q.jsx)(R2,{})},{name:`GiftOutlined`,label:`礼物`,component:(0,Q.jsx)(F2,{})},{name:`LaptopOutlined`,label:`笔记本`,component:(0,Q.jsx)(n4,{})},{name:`MobileOutlined`,label:`手机`,component:(0,Q.jsx)(M4,{})},{name:`MonitorOutlined`,label:`显示器`,component:(0,Q.jsx)(F4,{})},{name:`PayCircleOutlined`,label:`支付`,component:(0,Q.jsx)(R4,{})},{name:`PictureOutlined`,label:`图片`,component:(0,Q.jsx)(W4,{})},{name:`PlayCircleOutlined`,label:`播放`,component:(0,Q.jsx)(X4,{})},{name:`SafetyOutlined`,label:`安全`,component:(0,Q.jsx)(_3,{})},{name:`ShoppingOutlined`,label:`商店`,component:(0,Q.jsx)(F3,{})},{name:`SmileOutlined`,label:`笑脸`,component:(0,Q.jsx)(W3,{})},{name:`SoundOutlined`,label:`声音`,component:(0,Q.jsx)(X3,{})},{name:`TagOutlined`,label:`标签`,component:(0,Q.jsx)(a6,{})},{name:`TeamOutlined`,label:`团队`,component:(0,Q.jsx)(c6,{})},{name:`ToolOutlined`,label:`工具`,component:(0,Q.jsx)(m6,{})},{name:`TruckOutlined`,label:`物流`,component:(0,Q.jsx)(b6,{})},{name:`VideoCameraOutlined`,label:`视频`,component:(0,Q.jsx)(M6,{})},{name:`WalletOutlined`,label:`钱包`,component:(0,Q.jsx)(F6,{})},{name:`BankOutlined`,label:`银行`,component:(0,Q.jsx)(a0,{})},{name:`BuildOutlined`,label:`建筑`,component:(0,Q.jsx)(_0,{})},{name:`ExperimentOutlined`,label:`实验`,component:(0,Q.jsx)(m2,{})},{name:`HighlightOutlined`,label:`高亮`,component:(0,Q.jsx)(W2,{})},{name:`IdcardOutlined`,label:`名片`,component:(0,Q.jsx)($2,{})},{name:`MedicineBoxOutlined`,label:`医药`,component:(0,Q.jsx)(b4,{})},{name:`ReadOutlined`,label:`阅读`,component:(0,Q.jsx)(n3,{})},{name:`RestOutlined`,label:`休息`,component:(0,Q.jsx)(a3,{})},{name:`SketchOutlined`,label:`钻石`,component:(0,Q.jsx)(R3,{})},{name:`SolutionOutlined`,label:`方案`,component:(0,Q.jsx)(q3,{})}],Cne=Object.fromEntries(y7.map(e=>[e.name,e.component]));function b7(e){return Cne[e]||(0,Q.jsx)(W1,{})}function wne(e){try{let t=typeof e==`string`?JSON.parse(e):e;if(!Array.isArray(t))return{skillItems:[],optionGroups:[]};let n=[],r=[];for(let e of t)e&&e.type===`option_group`&&e.name&&Array.isArray(e.options)?r.push({name:e.name,options:e.options}):e&&e.key&&e.label&&n.push({key:e.key,label:e.label});return{skillItems:n,optionGroups:r}}catch{return{skillItems:[],optionGroups:[]}}}var Tne=({value:e,onChange:t})=>{let n=y7.find(t=>t.name===e);return(0,Q.jsx)(UV,{trigger:[`click`],dropdownRender:()=>(0,Q.jsx)(`div`,{style:{background:`#fff`,borderRadius:12,padding:12,width:360,boxShadow:`0 12px 40px rgba(0,0,0,0.15)`,border:`1px solid #f0f0f5`},children:(0,Q.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(8, 1fr)`,gap:4},children:y7.map(n=>(0,Q.jsx)(`div`,{onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),t?.(n.name)},title:n.label,style:{width:40,height:40,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,fontSize:18,transition:`all 0.15s`,background:e===n.name?`#6366f1`:`transparent`,color:e===n.name?`#fff`:`#64748b`,border:e===n.name?`none`:`1px solid transparent`},onMouseEnter:t=>{e!==n.name&&(t.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:t=>{e!==n.name&&(t.currentTarget.style.background=`transparent`)},children:n.component},n.name))})}),children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`8px 12px`,borderRadius:8,border:`1px solid #d9d9d9`,cursor:`pointer`,height:40},children:[e?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{style:{fontSize:18,color:`#6366f1`},children:b7(e)}),(0,Q.jsx)(`span`,{style:{color:`#64748b`,fontSize:13},children:n?.label||e})]}):(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`,fontSize:13},children:`选择图标`}),(0,Q.jsx)(AC,{style:{fontSize:10,color:`#bfbfbf`,marginLeft:`auto`}})]})})},Ene=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)({open:!1,item:null}),[c]=X.useForm(),l=async()=>{r(!0);try{t((await T8()).map(e=>{let{skillItems:t,optionGroups:n}=wne(e.skills);return{id:e.id,key:e.key,label:e.label,icon:e.icon||``,description:e.description||``,skills:JSON.stringify(t),optionGroups:n,isActive:e.is_active??e.isActive??!0,sortOrder:e.sort_order??e.sortOrder??0}}))}catch{LG.error(`加载行业配置失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{l()},[]);let u=async()=>{try{let e=await c.validateFields();a(!0);let t=[];e.skills_wentutujie?.trim()&&t.push({type:`skill`,key:`文图理解生成视频提示词`,label:e.skills_wentutujie.trim()}),e.skills_wentutujie_image?.trim()&&t.push({type:`skill`,key:`文图理解生成图片提示词`,label:e.skills_wentutujie_image.trim()});let n=(e.optionGroups||[]).filter(e=>e?.name?.trim()).map(e=>({name:e.name.trim(),options:(e.options||[]).filter(e=>e?.trim())})).filter(e=>e.options.length>0);for(let e of n)t.push({type:`option_group`,name:e.name,options:e.options});let r={key:e.key,label:e.label,icon:e.icon||``,description:e.description||``,skills:t,is_active:e.is_active??!0,sort_order:e.sort_order??0};o.item?.id?(await E8({id:o.item.id,...r}),LG.success(`已更新`)):(await E8(r),LG.success(`已添加`)),s({open:!1,item:null}),c.resetFields(),l()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}finally{a(!1)}},d=async e=>{try{await D8(e),LG.success(`已删除`),l()}catch(e){LG.error(e?.message||`删除失败`)}},f=e=>{s({open:!0,item:e||null});let t=``,n=``,r=[];if(e){try{let r=JSON.parse(e.skills);if(Array.isArray(r))for(let e of r)(e.key===`文图理解生成视频提示词`||e.key===`文图理解`)&&(t=e.label||``),e.key===`文图理解生成图片提示词`&&(n=e.label||``)}catch{}r=e.optionGroups.length>0?e.optionGroups:[{name:``,options:[]}]}e?c.setFieldsValue({key:e.key,label:e.label,icon:e.icon||``,description:e.description,skills_wentutujie:t,skills_wentutujie_image:n,optionGroups:r,is_active:e.isActive,sort_order:e.sortOrder}):(c.resetFields(),c.setFieldsValue({is_active:!0,sort_order:0,optionGroups:[{name:``,options:[]}]}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(W1,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`行业与技能配置`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 个行业`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>f(),style:{borderRadius:8},children:`添加行业`})]}),(0,Q.jsx)(bQ,{columns:[{title:`行业`,key:`industry`,width:180,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsx)(`div`,{style:{width:36,height:36,borderRadius:10,background:`#f1f5f9`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:18,color:`#6366f1`,flexShrink:0},children:b7(t.icon)}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.label}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.key})]})]})},{title:`描述`,dataIndex:`description`,ellipsis:!0},{title:`选项配置`,key:`optionGroups`,width:260,render:(e,t)=>!t.optionGroups||t.optionGroups.length===0?(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#cbd5e1`},children:`未配置`}):(0,Q.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:t.optionGroups.map((e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,Q.jsx)(NQ,{color:`blue`,style:{margin:0,fontSize:11},children:e.name}),(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#64748b`},children:[e.options.slice(0,3).join(`、`),e.options.length>3?`...${e.options.length}项`:``]})]},t))})},{title:`文图理解生成视频提示词`,dataIndex:`skills`,ellipsis:!0,render:e=>{try{let t=JSON.parse(e);if(Array.isArray(t)){let e=t.find(e=>e.key===`文图理解生成视频提示词`||e.key===`文图理解`);if(e)return(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{fontSize:12},children:e.label})}}catch{}return(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`})}},{title:`文图理解生成图片提示词`,dataIndex:`skills`,ellipsis:!0,render:e=>{try{let t=JSON.parse(e);if(Array.isArray(t)){let e=t.find(e=>e.key===`文图理解生成图片提示词`);if(e)return(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{fontSize:12},children:e.label})}}catch{}return(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`})}},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>f(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除该行业?`,onConfirm:()=>d(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(W1,{}),o.item?`编辑行业`:`添加行业`]}),open:o.open,onOk:u,onCancel:()=>{s({open:!1,item:null}),c.resetFields()},okText:`保存`,cancelText:`取消`,width:640,confirmLoading:i,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`key`,label:`行业标识`,style:{flex:1},rules:[{required:!0,message:`请输入标识`}],children:(0,Q.jsx)(hW,{placeholder:`例如:ecommerce`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`label`,label:`行业名称`,style:{flex:1},rules:[{required:!0,message:`请输入名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:电商`,size:`large`})})]}),(0,Q.jsx)(X.Item,{name:`icon`,label:`行业图标`,children:(0,Q.jsx)(Tne,{})}),(0,Q.jsx)(X.Item,{name:`description`,label:`行业描述`,children:(0,Q.jsx)(hW.TextArea,{rows:2,placeholder:`行业描述`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`skills_wentutujie`,label:`文图理解生成视频提示词`,extra:`用于LLM优化视频提示词的系统指令,根据行业特点引导AI理解文案与画面的关系`,children:(0,Q.jsx)(hW.TextArea,{rows:3,placeholder:`请输入文图理解生成视频提示词,例如: 你是一位专业的电商视频文案专家,擅长将产品卖点转化为视觉语言`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`skills_wentutujie_image`,label:`文图理解生成图片提示词`,extra:`用于LLM优化图片提示词的系统指令,根据行业特点引导AI理解文案与画面的关系`,children:(0,Q.jsx)(hW.TextArea,{rows:3,placeholder:`请输入文图理解生成图片提示词,例如: -你是一位专业的电商图片文案专家,擅长将产品卖点转化为图片生成提示词`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{marginBottom:8},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:`行业选项配置`}),(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`添加选项组,每组包含名称和多个选项,前台将显示为下拉选择`})]}),(0,Q.jsx)(X.List,{name:`optionGroups`,children:(e,{add:t,remove:n})=>(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8,marginBottom:16},children:[e.map(({key:e,name:t,...r})=>(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`flex-start`,padding:`10px 12px`,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,gap:8},children:[(0,Q.jsx)(X.Item,{...r,name:[t,`name`],label:`选项名称`,style:{marginBottom:0},rules:[{required:!0,message:`请输入选项名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:视频风格`,size:`middle`,style:{borderRadius:8}})}),(0,Q.jsx)(X.Item,{...r,name:[t,`options`],label:`选项内容`,style:{marginBottom:0},children:(0,Q.jsx)(RC,{mode:`tags`,size:`middle`,placeholder:`输入选项后回车添加`,style:{borderRadius:8},tokenSeparators:[`,`,`,`,`、`]})})]}),(0,Q.jsx)(D4,{onClick:()=>n(t),style:{color:`#ef4444`,fontSize:16,marginTop:34,cursor:`pointer`,flexShrink:0}})]},e)),(0,Q.jsx)(qE,{type:`dashed`,onClick:()=>t(),block:!0,icon:(0,Q.jsx)(TL,{}),style:{borderRadius:8,height:36},children:`添加选项组`})]})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`is_active`,label:`启用状态`,valuePropName:`checked`,initialValue:!0,style:{flex:1},children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{name:`sort_order`,label:`排序`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(hW,{type:`number`,size:`large`})})]})]})})]})};function x7(e){if(Array.isArray(e))return e;if(typeof e==`string`)try{return JSON.parse(e)}catch{return[]}return[]}var wne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,engine:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await E8()).map(e=>({...e,supportedRatios:x7(e.supportedRatios),supportedResolutions:x7(e.supportedResolutions),supportedDurations:x7(e.supportedDurations)})))}catch{LG.error(`加载视频引擎失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={name:e.name,provider:e.provider,api_base:e.apiBase,api_key:e.apiKey,model_name:e.modelName,supported_ratios:JSON.stringify(e.supportedRatios||[]),supported_resolutions:JSON.stringify(e.supportedResolutions||[]),supported_durations:JSON.stringify(e.supportedDurations||[]),is_active:e.isActive??!0,priority:e.priority??0};i.engine?(await D8({id:i.engine.id,...t}),LG.success(`已更新`)):(await D8(t),LG.success(`已添加`)),a({open:!1,engine:null}),o.resetFields(),s()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},l=async e=>{try{await O8(e),LG.success(`已删除`),s()}catch{LG.error(`删除失败`)}},u=e=>{a({open:!0,engine:e||null}),e?o.setFieldsValue(e):(o.resetFields(),o.setFieldsValue({isActive:!0,priority:0,supportedRatios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],supportedResolutions:[`480p`,`720p`,`1080p`],supportedDurations:[4,5,6,7,8,9,10,11,12,13,14,15]}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`视频引擎配置`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 个引擎`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加引擎`})]}),(0,Q.jsx)(bQ,{columns:[{title:`引擎名称`,key:`name`,width:180,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsx)(`div`,{style:{width:36,height:36,borderRadius:8,background:t.isActive?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`linear-gradient(135deg, #94a3b8, #cbd5e1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:16},children:(0,Q.jsx)(J4,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.provider})]})]})},{title:`支持比例`,dataIndex:`supportedRatios`,width:200,render:e=>(0,Q.jsx)(VV,{size:2,wrap:!0,children:e.map(e=>(0,Q.jsx)(NQ,{children:e},e))})},{title:`支持分辨率`,dataIndex:`supportedResolutions`,width:150,render:e=>(0,Q.jsx)(VV,{size:2,wrap:!0,children:e.map(e=>(0,Q.jsx)(NQ,{color:`blue`,children:e},e))})},{title:`支持时长`,dataIndex:`supportedDurations`,width:120,render:e=>(0,Q.jsx)(NQ,{color:`orange`,children:e?.length?`${Math.min(...e)}-${Math.max(...e)}s`:`-`})},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J4,{}),i.engine?`编辑引擎`:`添加引擎`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,engine:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:620,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`引擎名称`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`Seedance 2.0`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`provider`,label:`提供商`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`ark`,label:`火山引擎 (Ark)`}]})})]}),(0,Q.jsx)(X.Item,{name:`apiBase`,label:`API基础地址`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`apiKey`,label:`API Key`,children:(0,Q.jsx)(hW.Password,{placeholder:`sk-****`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`modelName`,label:`模型名称`,children:(0,Q.jsx)(hW,{placeholder:`doubao-seedance-2-0-260128`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`supportedRatios`,label:`支持比例`,children:(0,Q.jsx)(RC,{mode:`multiple`,size:`large`,options:[{value:`16:9`,label:`16:9 (横屏)`},{value:`4:3`,label:`4:3 (标准)`},{value:`1:1`,label:`1:1 (方形)`},{value:`3:4`,label:`3:4 (竖版)`},{value:`9:16`,label:`9:16 (竖屏)`},{value:`21:9`,label:`21:9 (超宽)`}]})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`supportedResolutions`,label:`支持分辨率`,style:{flex:1},children:(0,Q.jsx)(RC,{mode:`multiple`,size:`large`,options:[{value:`480p`},{value:`720p`},{value:`1080p`}]})}),(0,Q.jsx)(X.Item,{name:`supportedDurations`,label:`支持时长(秒)`,style:{flex:1},children:(0,Q.jsx)(RC,{mode:`multiple`,size:`large`,options:Array.from({length:12},(e,t)=>({value:t+4,label:`${t+4}秒`}))})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`priority`,label:`优先级`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:0,label:`0 (默认)`},{value:1,label:`1`},{value:2,label:`2`},{value:3,label:`3`},{value:5,label:`5`},{value:10,label:`10 (最高)`}]})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,style:{paddingTop:30},children:(0,Q.jsx)(Mq,{})})]})]})})]})};function Tne(e){if(Array.isArray(e))return e;if(typeof e==`string`)try{return JSON.parse(e)}catch{return[]}return[]}function Ene(e){if(e&&typeof e==`object`&&!Array.isArray(e))return e;if(typeof e==`string`)try{let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:{}}catch{return{}}return{}}var S7={"2K":{"1:1":`2048×2048`,"4:3":`2304×1728`,"3:4":`1728×2304`,"16:9":`2560×1440`,"9:16":`1600×2848`,"3:2":`2496×1664`,"2:3":`1664×2496`,"21:9":`3024×1296`},"4K":{"1:1":`4096×4096`,"4:3":`4608×3456`,"3:4":`3520×4704`,"16:9":`5404×3040`,"9:16":`3040×5504`,"3:2":`4992×3328`,"2:3":`3328×4992`,"21:9":`6197×2656`}},C7=[`1:1`,`4:3`,`3:4`,`16:9`,`9:16`,`3:2`,`2:3`,`21:9`],Dne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,engine:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await k8()).map(e=>({...e,supportedModels:Tne(e.supportedModels),supportedSizes:Ene(e.supportedSizes)})))}catch{LG.error(`加载图片引擎失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={};for(let n of[`2K`,`4K`]){let r=e[`size_${n}`]||[];if(r.length>0){t[n]={};for(let e of r)t[n][e]=S7[n]?.[e]||e}}let n={name:e.name,provider:e.provider,api_base:e.apiBase,api_key:e.apiKey,model_name:e.modelName,supported_models:JSON.stringify(e.supportedModels||[]),supported_sizes:JSON.stringify(t),default_size:e.defaultSize||`2K`,generate_url:e.generateUrl||``,is_active:e.isActive??!0,priority:e.priority??0};i.engine?(await A8({id:i.engine.id,...n}),LG.success(`已更新`)):(await A8(n),LG.success(`已添加`)),a({open:!1,engine:null}),o.resetFields(),s()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},l=async e=>{try{await j8(e),LG.success(`已删除`),s()}catch{LG.error(`删除失败`)}},u=e=>{if(a({open:!0,engine:e||null}),e){let t={};for(let n of[`2K`,`4K`])t[`size_${n}`]=Object.keys(e.supportedSizes?.[n]||{});o.setFieldsValue({...e,...t})}else o.resetFields(),o.setFieldsValue({isActive:!0,priority:0,supportedModels:[`doubao-seedream-5-0-260128`],defaultSize:`2K`,size_2K:C7,size_4K:C7})};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(H4,{style:{fontSize:18,color:`#10b981`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`图片引擎配置`}),(0,Q.jsxs)(NQ,{color:`green`,children:[e.length,` 个引擎`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加引擎`})]}),(0,Q.jsx)(bQ,{columns:[{title:`引擎名称`,key:`name`,width:180,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsx)(`div`,{style:{width:36,height:36,borderRadius:8,background:t.isActive?`linear-gradient(135deg, #10b981, #059669)`:`linear-gradient(135deg, #94a3b8, #cbd5e1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:16},children:(0,Q.jsx)(H4,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.modelName})]})]})},{title:`2K 支持比例`,key:`sizes_2k`,width:260,render:(e,t)=>{let n=Object.keys(t.supportedSizes?.[`2K`]||{});return n.length===0?(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`}):(0,Q.jsx)(VV,{size:2,wrap:!0,children:n.map(e=>(0,Q.jsxs)(NQ,{color:`blue`,children:[e,` `,t.supportedSizes[`2K`][e]]},e))})}},{title:`4K 支持比例`,key:`sizes_4k`,width:260,render:(e,t)=>{let n=Object.keys(t.supportedSizes?.[`4K`]||{});return n.length===0?(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`}):(0,Q.jsx)(VV,{size:2,wrap:!0,children:n.map(e=>(0,Q.jsxs)(NQ,{color:`purple`,children:[e,` `,t.supportedSizes[`4K`][e]]},e))})}},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:1e3}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(H4,{}),i.engine?`编辑引擎`:`添加引擎`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,engine:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:680,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`引擎名称`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`豆包文生图`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`provider`,label:`提供商`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`ark`,label:`火山引擎 (Ark)`}]})})]}),(0,Q.jsx)(X.Item,{name:`apiBase`,label:`API基础地址`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`apiKey`,label:`API Key`,children:(0,Q.jsx)(hW.Password,{placeholder:`sk-****`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`modelName`,label:`默认模型`,children:(0,Q.jsx)(hW,{placeholder:`doubao-seedream-5-0-260128`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`supportedModels`,label:`支持模型列表`,children:(0,Q.jsx)(RC,{mode:`tags`,size:`large`,placeholder:`输入模型ID后回车添加`,tokenSeparators:[`,`,`,`],options:[{value:`doubao-seedream-5-0-260128`}]})}),(0,Q.jsxs)(`div`,{style:{background:`#f8f9fc`,borderRadius:10,padding:16,marginBottom:8},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`尺寸配置`}),(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`勾选每个档位支持的比例,前台选择后传对应像素值给SDK`})]}),[`2K`,`4K`].map(e=>(0,Q.jsxs)(`div`,{style:{background:`#fafbfc`,borderRadius:10,padding:`12px 16px`,marginBottom:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13,color:e===`2K`?`#3b82f6`:`#8b5cf6`},children:e}),(0,Q.jsx)(X.Item,{name:`size_${e}`,style:{marginTop:8,marginBottom:0},children:(0,Q.jsx)(oz.Group,{style:{width:`100%`},children:(0,Q.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, 1fr)`,gap:`6px 0`},children:C7.map(t=>(0,Q.jsxs)(oz,{value:t,style:{fontSize:12},children:[t,` `,(0,Q.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:11},children:S7[e]?.[t]})]},t))})})})]},e)),(0,Q.jsx)(X.Item,{name:`defaultSize`,label:`默认尺寸档位`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`2K`,label:`2K`},{value:`4K`,label:`4K`}]})}),(0,Q.jsx)(X.Item,{name:`generateUrl`,label:`生成接口地址`,children:(0,Q.jsx)(hW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3/images/generations`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`priority`,label:`优先级`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:0,label:`0 (默认)`},{value:1,label:`1`},{value:2,label:`2`},{value:3,label:`3`},{value:5,label:`5`},{value:10,label:`10 (最高)`}]})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,style:{paddingTop:30},children:(0,Q.jsx)(Mq,{})})]})]})})]})},One=[`2K`,`4K`],kne=[`480p`,`720p`,`1080p`],Ane=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)({open:!1,ratio:null}),[c]=X.useForm(),[l,u]=(0,S.useState)(10),[d,f]=(0,S.useState)(null),[p,m]=(0,S.useState)(!1),h=X.useWatch(`genType`,c)||`video`,g=X.useWatch(`modelConfigId`,c),_=async()=>{a(!0);try{let[e,n,i]=await Promise.all([M8(),_8(),h5()]),a=(i?.engine?.image||[]).map(e=>({...e,genType:`image`})),o=(i?.engine?.video||[]).map(e=>({...e,genType:`video`}));t(e),r([...o,...a]);let s=n.find(e=>e.key===`text_credits_per_1000_tokens`);s&&(u(Number(s.value)||10),f({id:s.id}))}catch{LG.error(`加载积分比例失败`)}finally{a(!1)}};(0,S.useEffect)(()=>{_()},[]);let v=(0,S.useMemo)(()=>n.filter(e=>e.genType===h).map(e=>({value:e.id,label:`${e.name}${e.modelName?`(${e.modelName})`:``}`})),[n,h]),y=(0,S.useMemo)(()=>n.find(e=>e.id===g&&e.genType===h),[n,h,g]),b=(0,S.useMemo)(()=>{if(h===`image`){let e=y?.supportedSizes?Object.keys(y.supportedSizes):[];return(e.length?e:One).map(e=>({value:e,label:e}))}let e=y?.supportedResolutions||[];return(e.length?e:kne).map(e=>({value:e,label:e}))},[h,y]),x=(e,t)=>n.find(n=>n.id===e&&(!t||n.genType===t))?.name||e,C=async()=>{try{let e=await c.validateFields(),t={model_config_id:e.modelConfigId,gen_type:e.genType,resolution:e.resolution,ratio:e.ratio,base_credits:e.baseCredits,per_second_credits:e.genType===`image`?0:e.perSecondCredits||0};o.ratio?(await N8({id:o.ratio.id,...t}),LG.success(`已更新`)):(await N8(t),LG.success(`已添加`)),s({open:!1,ratio:null}),c.resetFields(),_()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},w=async e=>{try{await P8(e),LG.success(`已删除`),_()}catch{LG.error(`删除失败`)}},T=async()=>{if(d){m(!0);try{await v8(d.id,String(l)),LG.success(`文字积分费率已更新`)}catch(e){LG.error(e?.message||`保存失败`)}finally{m(!1)}}},E=e=>{s({open:!0,ratio:e||null}),e?c.setFieldsValue({modelConfigId:e.modelConfigId,genType:e.genType===`image`?`image`:`video`,resolution:e.resolution,ratio:e.ratio,baseCredits:e.baseCredits,perSecondCredits:e.perSecondCredits}):(c.resetFields(),c.setFieldsValue({genType:`video`,ratio:1,baseCredits:60,perSecondCredits:2}))};return(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(N2,{style:{fontSize:18,color:`#f59e0b`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`文字积分费率`})]}),(0,Q.jsx)(qE,{type:`primary`,loading:p,onClick:T,style:{borderRadius:8},children:`保存`})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{display:`block`,marginBottom:16,fontSize:13},children:`文字积分计算公式:ceil(总token数 x 费率 / 1000),最低1积分`}),(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,Q.jsx)(Z.Text,{children:`每1000 token消耗积分:`}),(0,Q.jsxs)(VV.Compact,{style:{width:160},children:[(0,Q.jsx)(oB,{min:0,max:1e3,step:.01,value:l,onChange:e=>u(e||0),size:`large`,style:{width:`100%`}}),(0,Q.jsx)(Z.Text,{children:`积分`})]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[`示例:1000 token = `,l,` 积分,500 token = `,(500*l/1e3).toFixed(4),` 积分`]})]})]}),(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w0,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`积分比例配置`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 条规则`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>E(),style:{borderRadius:8},children:`添加比例`})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{display:`block`,marginBottom:16,fontSize:13},children:`视频积分公式:(基础积分 + 每秒积分 x 视频时长) x 模型倍率;图片积分公式:基础积分 x 模型倍率`}),(0,Q.jsx)(bQ,{columns:[{title:`类型`,dataIndex:`genType`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e===`image`?`cyan`:`orange`,children:e===`image`?`图片`:`视频`})},{title:`引擎`,dataIndex:`modelConfigId`,width:180,render:(e,t)=>(0,Q.jsx)(NQ,{color:t.genType===`image`?`cyan`:`purple`,children:x(e,t.genType)})},{title:`分辨率/尺寸`,dataIndex:`resolution`,width:110,render:e=>(0,Q.jsx)(NQ,{color:{"480p":`blue`,"720p":`blue`,"1080p":`blue`,"4K":`green`,"2K":`green`}[e]||`default`,children:e})},{title:`倍率`,dataIndex:`ratio`,width:100,sorter:(e,t)=>e.ratio-t.ratio,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:e>=2?`#ef4444`:e>=1.5?`#f59e0b`:`#10b981`},children:[`x`,e]})},{title:`基础积分`,dataIndex:`baseCredits`,width:100,render:e=>(0,Q.jsxs)(Z.Text,{children:[e,` 积分`]})},{title:`每秒积分`,dataIndex:`perSecondCredits`,width:100,render:(e,t)=>(0,Q.jsx)(Z.Text,{children:t.genType===`image`?`-`:`${e} 积分/秒`})},{title:`示例计算`,key:`example`,width:120,render:(e,t)=>{let n;return n=t.genType===`image`?Math.round(t.baseCredits*t.ratio):Math.round((t.baseCredits+t.perSecondCredits*15)*t.ratio),(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:[n,` 积分`]})}},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>E(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>w(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:!1,scroll:{x:860}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w0,{}),o.ratio?`编辑比例`:`添加比例`]}),open:o.open,onOk:C,onCancel:()=>{s({open:!1,ratio:null}),c.resetFields()},okText:`保存`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`genType`,label:`生成类型`,rules:[{required:!0,message:`请选择生成类型`}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`video`,label:`视频`},{value:`image`,label:`图片`}],onChange:()=>{c.setFieldsValue({modelConfigId:void 0,resolution:void 0})}})}),(0,Q.jsx)(X.Item,{name:`modelConfigId`,label:`引擎`,rules:[{required:!0,message:`请选择引擎`}],children:(0,Q.jsx)(RC,{size:`large`,placeholder:`请选择引擎`,options:v,showSearch:!0,optionFilterProp:`label`,onChange:()=>c.setFieldsValue({resolution:void 0})})}),(0,Q.jsx)(X.Item,{name:`resolution`,label:h===`image`?`图片尺寸`:`分辨率`,rules:[{required:!0,message:h===`image`?`请选择图片尺寸`:`请选择分辨率`}],children:(0,Q.jsx)(RC,{size:`large`,placeholder:h===`image`?`请选择图片尺寸`:`请选择分辨率`,options:b})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`ratio`,label:`倍率`,style:{flex:1},rules:[{required:!0,message:`请输入倍率`}],children:(0,Q.jsx)(oB,{min:.1,max:10,step:.1,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`baseCredits`,label:`基础积分`,style:{flex:1},rules:[{required:!0,message:`请输入基础积分`}],children:(0,Q.jsx)(oB,{min:0,max:1e3,style:{width:`100%`},size:`large`})}),h!==`image`&&(0,Q.jsx)(X.Item,{name:`perSecondCredits`,label:`每秒积分`,style:{flex:1},rules:[{required:!0,message:`请输入每秒积分`}],children:(0,Q.jsx)(oB,{min:0,max:100,style:{width:`100%`},size:`large`})})]})]})})]})},w7={HomeOutlined:(0,Q.jsx)(Z2,{}),PlayCircleOutlined:(0,Q.jsx)(J4,{}),WalletOutlined:(0,Q.jsx)(N6,{}),RobotOutlined:(0,Q.jsx)(o3,{}),SettingOutlined:(0,Q.jsx)(D3,{}),BellOutlined:(0,Q.jsx)(f0,{}),UserOutlined:(0,Q.jsx)(D6,{}),AppstoreOutlined:(0,Q.jsx)(G1,{}),FileTextOutlined:(0,Q.jsx)(KV,{}),StarOutlined:(0,Q.jsx)(Z3,{}),HeartOutlined:(0,Q.jsx)(H2,{}),CameraOutlined:(0,Q.jsx)(D0,{}),DashboardOutlined:(0,Q.jsx)(r2,{}),CalculatorOutlined:(0,Q.jsx)(w0,{}),DollarOutlined:(0,Q.jsx)(l2,{}),GiftOutlined:(0,Q.jsx)(I2,{}),ThunderboltOutlined:(0,Q.jsx)(l6,{}),FireOutlined:(0,Q.jsx)(D2,{}),CloudOutlined:(0,Q.jsx)(z0,{}),SmileOutlined:(0,Q.jsx)(H3,{}),TrophyOutlined:(0,Q.jsx)(h6,{}),RocketOutlined:(0,Q.jsx)(l3,{}),BulbOutlined:(0,Q.jsx)(x0,{}),CodeOutlined:(0,Q.jsx)(G0,{}),PictureOutlined:(0,Q.jsx)(H4,{}),VideoCameraOutlined:(0,Q.jsx)(A6,{}),AudioOutlined:(0,Q.jsx)(r0,{}),MailOutlined:(0,Q.jsx)(v4,{}),PhoneOutlined:(0,Q.jsx)(z4,{}),GlobalOutlined:(0,Q.jsx)(z2,{}),ShoppingCartOutlined:(0,Q.jsx)(A3,{}),TeamOutlined:(0,Q.jsx)(o6,{}),BarChartOutlined:(0,Q.jsx)(l0,{}),PieChartOutlined:(0,Q.jsx)(G4,{}),LineChartOutlined:(0,Q.jsx)(o4,{}),SecurityScanOutlined:(0,Q.jsx)(x3,{}),ApiOutlined:(0,Q.jsx)(H1,{}),DatabaseOutlined:(0,Q.jsx)(o2,{}),CloudServerOutlined:(0,Q.jsx)(H0,{}),MenuOutlined:(0,Q.jsx)(w4,{})},jne=Object.keys(w7).map(e=>({value:e,label:(0,Q.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[w7[e],` `,e.replace(`Outlined`,``)]})})),Mne={page:`blue`,group:`purple`},Nne={page:`页面`,group:`分组`},Pne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)(`frontend`),[o,s]=(0,S.useState)({open:!1,menu:null}),[c]=X.useForm(),l=async()=>{r(!0);try{t(await W8())}catch{}r(!1)};(0,S.useEffect)(()=>{l()},[]);let u=async()=>{try{let e=await c.validateFields(),t={label:e.label,path:e.path||``,icon:e.icon||``,sort_order:e.sortOrder??0,is_active:e.isActive??!0,parent_id:e.parentId||null,menu_type:e.menuType||`page`,menu_target:e.menuTarget||`frontend`,is_default:e.isDefault??!1};o.menu?.id?await G8({...t,id:o.menu.id}):await G8(t),LG.success(o.menu?.id?`菜单已更新`:`菜单已添加`),s({open:!1,menu:null}),c.resetFields(),l()}catch{}},d=async e=>{try{await K8(e),LG.success(`菜单已删除`),l()}catch(e){LG.error(e?.message||`删除失败`)}},f=t=>{s({open:!0,menu:t||null}),t?c.setFieldsValue({label:t.label,path:t.path,icon:t.icon,sortOrder:t.sortOrder??0,isActive:t.isActive??!0,parentId:t.parentId??``,menuType:t.menuType??`page`,menuTarget:t.menuTarget??`frontend`,isDefault:t.isDefault??!1}):(c.resetFields(),c.setFieldsValue({icon:`HomeOutlined`,sortOrder:e.length,isActive:!0,menuType:`page`,menuTarget:i,isDefault:!1}))},p=e.filter(e=>{let t=e.menuTarget??`frontend`;return t===i||t===`both`}),m=[{value:``,label:`顶级菜单`},...p.filter(e=>e.menuType===`group`).map(e=>({value:e.id,label:e.label}))],h=[],g=p.filter(e=>!e.parentId),_={};p.filter(e=>e.parentId).forEach(e=>{let t=e.parentId;_[t]||(_[t]=[]),_[t].push(e)}),g.sort((e,t)=>(e.sortOrder??0)-(t.sortOrder??0)).forEach(e=>{h.push({...e,_depth:0}),(_[e.id]||[]).sort((e,t)=>(e.sortOrder??0)-(t.sortOrder??0)).forEach(e=>{h.push({...e,_depth:1})})});let v=[{title:`排序`,dataIndex:`sortOrder`,width:60},{title:`菜单名称`,key:`label`,width:180,render:(e,t)=>(0,Q.jsxs)(`span`,{style:{paddingLeft:t._depth*20,fontWeight:t._depth===0?600:400},children:[t._depth===1&&(0,Q.jsx)(`span`,{style:{color:`#cbd5e1`,marginRight:4},children:`└`}),t.label]})},{title:`路由路径`,dataIndex:`path`,width:160,render:e=>e||(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})},{title:`图标`,dataIndex:`icon`,width:100,render:e=>e&&w7[e]?(0,Q.jsx)(`span`,{style:{fontSize:16,color:`#6366f1`},children:w7[e]}):`-`},{title:`类型`,dataIndex:`menuType`,width:80,render:e=>(0,Q.jsx)(NQ,{color:Mne[e]||`default`,children:Nne[e]||e})},{title:`状态`,dataIndex:`isActive`,width:70,render:e=>(0,Q.jsx)(`span`,{style:{color:e?`#22c55e`:`#94a3b8`},children:e?`启用`:`停用`})},...i===`frontend`?[{title:`默认显示`,dataIndex:`isDefault`,width:80,render:e=>e?(0,Q.jsx)(NQ,{color:`green`,children:`默认`}):(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})}]:[],{title:`操作`,key:`action`,width:150,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>f(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除该菜单?`,onConfirm:()=>d(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}];return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`菜单配置`})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>f(),style:{borderRadius:8},children:`添加菜单`})]}),(0,Q.jsx)(bR,{activeKey:i,onChange:a,items:[{key:`frontend`,label:`前台菜单`},{key:`admin`,label:`后台菜单`}]}),(0,Q.jsx)(bQ,{columns:v,dataSource:h,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w4,{}),o.menu?.id?`编辑菜单`:`添加菜单`]}),open:o.open,onOk:u,onCancel:()=>{s({open:!1,menu:null}),c.resetFields()},okText:`确认`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`label`,label:`菜单名称`,rules:[{required:!0,message:`请输入菜单名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:我的项目`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`path`,label:`路由路径`,tooltip:`分组类型可留空`,children:(0,Q.jsx)(hW,{placeholder:`例如:/projects(分组可留空)`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`menuType`,label:`菜单类型`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`page`,label:`页面`},{value:`group`,label:`分组`}]})}),(0,Q.jsx)(X.Item,{name:`menuTarget`,label:`适用端`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`frontend`,label:`前台`},{value:`admin`,label:`后台`},{value:`both`,label:`两者`}]})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`icon`,label:`图标`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:jne})}),(0,Q.jsx)(X.Item,{name:`sortOrder`,label:`排序`,style:{flex:1},children:(0,Q.jsx)(oB,{min:0,max:100,style:{width:`100%`},size:`large`,placeholder:`默认0`})})]}),(0,Q.jsx)(X.Item,{name:`parentId`,label:`上级菜单`,children:(0,Q.jsx)(RC,{size:`large`,options:m,allowClear:!0,placeholder:`顶级菜单`})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用`,valuePropName:`checked`,children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.menuTarget!==t.menuTarget,children:({getFieldValue:e})=>e(`menuTarget`)===`admin`?null:(0,Q.jsx)(X.Item,{name:`isDefault`,label:`新用户默认显示`,valuePropName:`checked`,tooltip:`开启后,新注册用户默认显示此菜单`,children:(0,Q.jsx)(Mq,{})})})]})})]})},Fne={normal:`blue`,gift:`green`,promo:`purple`},Ine={normal:`常规`,gift:`赠送`,promo:`促销`},Lne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,item:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await Q8()).map(e=>({id:e.id,name:e.name,credits:e.credits,price:e.price,bonusCredits:e.bonus_credits??e.bonusCredits??0,totalCredits:e.total_credits??e.totalCredits??e.credits,description:e.description,packageType:e.package_type??e.packageType??`normal`,isGift:e.is_gift??e.isGift??!1,isActive:e.is_active??e.isActive??!0,sortOrder:e.sort_order??e.sortOrder??0})))}catch{LG.error(`加载充值套餐失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={name:e.name,credits:e.credits,price:e.price,bonus_credits:e.bonusCredits||0,description:e.description||null,package_type:e.packageType||`normal`,is_gift:e.isGift||!1,is_active:e.isActive??!0,sort_order:e.sortOrder??0};i.item?.id?(await $8({id:i.item.id,...t}),LG.success(`已更新`)):(await $8(t),LG.success(`已添加`)),a({open:!1,item:null}),o.resetFields(),s()}catch{}},l=async e=>{try{await e5(e),LG.success(`已删除`),s()}catch(e){LG.error(e?.message||`删除失败`)}},u=e=>{a({open:!0,item:e||null}),e?o.setFieldsValue({name:e.name,credits:e.credits,price:e.price,bonusCredits:e.bonusCredits,description:e.description,packageType:e.packageType,isGift:e.isGift,isActive:e.isActive,sortOrder:e.sortOrder}):(o.resetFields(),o.setFieldsValue({isActive:!0,sortOrder:0,packageType:`normal`,bonusCredits:0,isGift:!1}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(I2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`充值套餐管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 个套餐`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加套餐`})]}),(0,Q.jsx)(bQ,{columns:[{title:`套餐名称`,key:`name`,width:160,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),t.description&&(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.description})]})},{title:`基础积分`,dataIndex:`credits`,width:100,render:e=>(0,Q.jsx)(Z.Text,{children:e.toLocaleString()})},{title:`赠送积分`,dataIndex:`bonusCredits`,width:100,render:e=>e>0?(0,Q.jsxs)(NQ,{color:`green`,children:[`+`,e.toLocaleString()]}):(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})},{title:`总积分`,key:`total`,width:100,render:(e,t)=>(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:(t.credits+t.bonusCredits).toLocaleString()})},{title:`价格(元)`,dataIndex:`price`,width:100,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,children:[`¥`,e]})},{title:`类型`,dataIndex:`packageType`,width:80,render:e=>(0,Q.jsx)(NQ,{color:Fne[e]||`default`,children:Ine[e]||e})},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(I2,{}),i.item?`编辑套餐`:`添加套餐`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,item:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`套餐名称`,rules:[{required:!0,message:`请输入套餐名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:进阶包`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`credits`,label:`基础积分`,rules:[{required:!0,message:`请输入积分`}],style:{flex:1},children:(0,Q.jsx)(oB,{min:1,placeholder:`2000`,size:`large`,style:{width:`100%`}})}),(0,Q.jsx)(X.Item,{name:`price`,label:`价格(元)`,rules:[{required:!0,message:`请输入价格`}],style:{flex:1},children:(0,Q.jsx)(oB,{min:.01,step:1,placeholder:`168`,size:`large`,style:{width:`100%`}})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`bonusCredits`,label:`赠送积分`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(oB,{min:0,placeholder:`0`,size:`large`,style:{width:`100%`}})}),(0,Q.jsx)(X.Item,{name:`packageType`,label:`套餐类型`,initialValue:`normal`,style:{flex:1},children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`normal`,label:`常规`},{value:`gift`,label:`赠送`},{value:`promo`,label:`促销`}]})})]}),(0,Q.jsx)(X.Item,{name:`description`,label:`描述`,children:(0,Q.jsx)(hW,{placeholder:`套餐描述(可选)`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,initialValue:!0,style:{flex:1},children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{name:`isGift`,label:`是否赠送`,valuePropName:`checked`,initialValue:!1,style:{flex:1},children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{name:`sortOrder`,label:`排序`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(oB,{size:`large`,style:{width:`100%`}})})]})]})})]})},Rne={POST:`green`,PUT:`blue`,DELETE:`red`},zne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),c=async e=>{a(!0);try{let n=await t5(e||o);t(n.items||[]),r(n.total||0)}catch{LG.error(`加载操作日志失败`)}finally{a(!1)}};return(0,S.useEffect)(()=>{c()},[]),(0,Q.jsx)(`div`,{children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`操作日志`})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>c(),children:`刷新`})]}),(0,Q.jsx)(bQ,{columns:[{title:`操作人`,dataIndex:`username`,width:120,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`操作`,dataIndex:`action`,width:160,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`方法`,dataIndex:`method`,width:80,render:e=>(0,Q.jsx)(NQ,{color:Rne[e]||`default`,children:e})},{title:`路径`,dataIndex:`path`,width:220,ellipsis:!0,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:e})},{title:`时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:Z5(e)})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:20,total:n,showTotal:e=>`共 ${e} 条记录`,onChange:e=>{s(e),c(e)}},scroll:{x:800}})]})})},Bne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(null),[g]=X.useForm(),[_]=X.useForm(),v=async e=>{a(!0);try{let n=await n5(e||o);t(n.items||[]),r(n.total||0)}catch{LG.error(`加载应用管理列表失败`)}finally{a(!1)}},y=async()=>{try{let e=await g.validateFields();await r5({app_id:e.app_id,secret:e.secret,open_type:e.open_type,count:e.count,auth_url:e.auth_url,company:e.company}),LG.success(`创建成功`),l(!1),g.resetFields(),v()}catch(e){LG.error(e?.message||`创建失败`)}},b=async e=>{try{h(await i5(e)),d(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},x=async e=>{try{let t=await i5(e);h(t),_.setFieldsValue({app_id:t.appId,secret:t.secret,open_type:t.openType,count:t.count,auth_url:t.authUrl,company:t.company}),p(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},C=async()=>{if(m)try{let e=await _.validateFields();await a5(m.id,{app_id:e.app_id,secret:e.secret,open_type:e.open_type,count:e.count,auth_url:e.auth_url,company:e.company}),LG.success(`更新成功`),p(!1),_.resetFields(),v()}catch(e){LG.error(e?.message||`更新失败`)}},w=e=>{BG.confirm({title:`确认删除`,content:`确定要删除这个应用管理吗?`,okText:`删除`,okType:`danger`,cancelText:`取消`,onOk:async()=>{try{await o5(e),LG.success(`删除成功`),v()}catch(e){LG.error(e?.message||`删除失败`)}}})};return(0,S.useEffect)(()=>{v()},[]),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(w4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`应用管理列表`})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>v(),children:`刷新`}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>l(!0),children:`创建`})]})]}),(0,Q.jsx)(bQ,{columns:[{title:`ID`,dataIndex:`id`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`应用ID`,dataIndex:`appId`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`应用密钥`,dataIndex:`secret`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`开户方式`,dataIndex:`openType`,render:e=>(0,Q.jsx)(Z.Text,{children:{1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`}[e]||e})},{title:`归属公司`,dataIndex:`company`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`授权次数`,dataIndex:`count`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`状态`,dataIndex:`status`,render:e=>(0,Q.jsx)(NQ,{color:e===1?`green`:`red`,children:e===1?`正常`:`禁用`})},{title:`授权URL`,dataIndex:`authUrl`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`创建人`,dataIndex:`createBy`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`创建时间`,dataIndex:`createdAt`,render:e=>(0,Q.jsx)(Z.Text,{children:Z5(e)})},{title:`更新时间`,dataIndex:`updatedAt`,render:e=>(0,Q.jsx)(Z.Text,{children:Z5(e)})},{title:`操作`,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(qU,{}),size:`small`,onClick:()=>b(t.id),children:`详情`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(zQ,{}),size:`small`,onClick:()=>x(t.id),children:`更新`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(IQ,{}),size:`small`,danger:!0,onClick:()=>w(t.id),children:`删除`})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:20,total:n,showTotal:e=>`共 ${e} 条记录`,onChange:e=>{s(e),v(e)}},scroll:{x:800}})]}),(0,Q.jsx)(BG,{title:`创建应用管理`,open:c,onOk:y,onCancel:()=>{l(!1),g.resetFields()},okText:`创建`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:g,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`app_id`,label:`应用ID`,rules:[{required:!0,message:`请输入应用ID`},{max:64,message:`应用ID不能超过64个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用ID`})}),(0,Q.jsx)(X.Item,{name:`secret`,label:`应用密钥`,rules:[{required:!0,message:`请输入应用密钥`},{max:256,message:`应用密钥不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用密钥`})}),(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户方式`,rules:[{required:!0,message:`请选择开户方式`}],children:(0,Q.jsxs)(RC,{placeholder:`请选择开户方式`,children:[(0,Q.jsx)(RC.Option,{value:1,children:`千川`}),(0,Q.jsx)(RC.Option,{value:2,children:`广告`}),(0,Q.jsx)(RC.Option,{value:3,children:`本地推`}),(0,Q.jsx)(RC.Option,{value:4,children:`星图`}),(0,Q.jsx)(RC.Option,{value:5,children:`快手代理商`}),(0,Q.jsx)(RC.Option,{value:6,children:`巨量星图`}),(0,Q.jsx)(RC.Option,{value:7,children:`巨量服务单`}),(0,Q.jsx)(RC.Option,{value:8,children:`腾讯服务单`}),(0,Q.jsx)(RC.Option,{value:9,children:`腾讯营销K2`}),(0,Q.jsx)(RC.Option,{value:10,children:`腾讯营销K3`})]})}),(0,Q.jsx)(X.Item,{name:`count`,label:`最大授权用户数`,initialValue:100,children:(0,Q.jsx)(oB,{min:1,placeholder:`应用最大可以授权多少个用户`})}),(0,Q.jsx)(X.Item,{name:`auth_url`,label:`应用授权链接`,children:(0,Q.jsx)(hW,{placeholder:`请输入应用授权链接`})}),(0,Q.jsx)(X.Item,{name:`company`,label:`应用归属公司名称`,rules:[{max:256,message:`公司名称不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用归属公司名称`})})]})}),(0,Q.jsx)(BG,{title:`应用管理详情`,open:u,onCancel:()=>{d(!1),h(null)},okText:`关闭`,cancelText:`取消`,width:600,children:m&&(0,Q.jsxs)(`div`,{style:{lineHeight:`2`},children:[(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`ID:`}),` `,m.id]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`应用ID:`}),` `,m.appId]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`应用密钥:`}),` `,m.secret]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`开户方式:`}),` `,{1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`}[m.openType]||m.openType]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`归属公司:`}),` `,m.company||`-`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`授权次数:`}),` `,m.count]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`状态:`}),` `,m.status===1?`正常`:`禁用`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`授权URL:`}),` `,m.authUrl||`-`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`创建人:`}),` `,m.createBy]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`创建时间:`}),` `,Z5(m.createdAt)]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`更新时间:`}),` `,Z5(m.updatedAt)]})]})}),(0,Q.jsx)(BG,{title:`更新应用管理`,open:f,onOk:C,onCancel:()=>{p(!1),_.resetFields(),h(null)},okText:`更新`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:_,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`app_id`,label:`应用ID`,rules:[{required:!0,message:`请输入应用ID`},{max:64,message:`应用ID不能超过64个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用ID`})}),(0,Q.jsx)(X.Item,{name:`secret`,label:`应用密钥`,rules:[{required:!0,message:`请输入应用密钥`},{max:256,message:`应用密钥不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用密钥`})}),(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户方式`,rules:[{required:!0,message:`请选择开户方式`}],children:(0,Q.jsxs)(RC,{placeholder:`请选择开户方式`,children:[(0,Q.jsx)(RC.Option,{value:1,children:`千川`}),(0,Q.jsx)(RC.Option,{value:2,children:`广告`}),(0,Q.jsx)(RC.Option,{value:3,children:`本地推`}),(0,Q.jsx)(RC.Option,{value:4,children:`星图`}),(0,Q.jsx)(RC.Option,{value:5,children:`快手代理商`}),(0,Q.jsx)(RC.Option,{value:6,children:`巨量星图`}),(0,Q.jsx)(RC.Option,{value:7,children:`巨量服务单`}),(0,Q.jsx)(RC.Option,{value:8,children:`腾讯服务单`}),(0,Q.jsx)(RC.Option,{value:9,children:`腾讯营销K2`}),(0,Q.jsx)(RC.Option,{value:10,children:`腾讯营销K3`})]})}),(0,Q.jsx)(X.Item,{name:`count`,label:`最大授权用户数`,children:(0,Q.jsx)(oB,{min:1,placeholder:`应用最大可以授权多少个用户`})}),(0,Q.jsx)(X.Item,{name:`auth_url`,label:`应用授权链接`,children:(0,Q.jsx)(hW,{placeholder:`请输入应用授权链接`})}),(0,Q.jsx)(X.Item,{name:`company`,label:`应用归属公司名称`,rules:[{max:256,message:`公司名称不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用归属公司名称`})})]})})]})},T7=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),E7={image:`empty`,video:`empty`,videoCover:`empty`,references:{}},D7={optimizing:{color:`processing`,text:`优化中`,icon:(0,Q.jsx)(xm,{spin:!0})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,Q.jsx)(HB,{})},generating:{color:`warning`,text:`生成中`,icon:(0,Q.jsx)(xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,Q.jsx)(N0,{})},failed:{color:`error`,text:`失败`,icon:(0,Q.jsx)(I0,{})}},O7={image:{text:`图片`,color:`purple`,icon:(0,Q.jsx)(v2,{})},video:{text:`视频`,color:`geekblue`,icon:(0,Q.jsx)(A6,{})}},Vne=e=>/^(https?:)?\/\//i.test(e)||/^(blob|data):/i.test(e),k7=e=>!!e&&/^blob:/i.test(e.trim()),A7=e=>{if(!e)return``;let t=String(e).trim();return t?Vne(t)?t:T7?`${T7}${t.startsWith(`/`)?t:`/${t}`}`:t.startsWith(`/`)?t:`/${t}`:``},j7=e=>e?e.length>12?`${e.slice(0,8)}...`:e:`-`,M7=e=>e?Z5(e):`-`,Hne=e=>e==null||e===``,N7=e=>{if(!e||k7(e))return!1;try{let t=new URL(A7(e),window.location.origin),n=t.searchParams.get(`exp`)||t.searchParams.get(`expires`)||t.searchParams.get(`expire`)||t.searchParams.get(`expires_at`)||t.searchParams.get(`x-expires`);if(!n)return!1;let r=Number(n);if(!Number.isFinite(r))return!1;let i=r>1e10?r:r*1e3;return Date.now()>=i}catch{return!1}},P7=e=>e?k7(e)||N7(e)?`invalid`:`checking`:`empty`,F7=e=>{let t=e.url||e.mediaUrl||e.fileUrl;return typeof t==`string`&&t.trim()?t.trim():void 0},Une=e=>{let t=String(e.type||e.mediaType||e.mimeType||``).toLowerCase(),n=F7(e)?.toLowerCase()||``;return t.includes(`video`)||/\.(mp4|mov|webm|m4v)(\?|$)/i.test(n)?`video`:t.includes(`image`)||/\.(png|jpe?g|webp|gif|bmp|svg)(\?|$)/i.test(n)?`image`:t||`unknown`},I7=(e,t)=>`${t}-${F7(e)||`empty`}`,L7=(e,t=`资源`)=>k7(e)?`本地临时素材已失效`:N7(e)?`${t}链接已超时,请刷新列表或重新搜索后再查看`:`${t}加载失败,请刷新列表或重新搜索后再查看`,R7=({text:e,minHeight:t=240,compact:n=!1,action:r})=>(0,Q.jsxs)(`div`,{style:{width:`100%`,minHeight:n?void 0:t,height:n?`100%`:void 0,borderRadius:n?10:12,background:`#f8f9fc`,border:`1px dashed #cbd5e1`,color:`#64748b`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:n?4:10,textAlign:`center`},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`,fontSize:n?11:13},children:e}),r]}),z7=({label:e,value:t})=>(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:120},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:Hne(t)?`-`:t})]}),Wne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c]=(0,S.useState)(20),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(0),[h,g]=(0,S.useState)(null),[_,v]=(0,S.useState)(E7),[y,b]=(0,S.useState)(!1),x=(0,S.useRef)(null),[C,w]=(0,S.useState)(null),[T,E]=(0,S.useState)(null),D=(0,S.useCallback)(async()=>{a(!0);try{let e=await f5({userId:d.trim()||void 0,status:l||void 0,page:o,pageSize:c});t((e.items||[]).map(e=>({id:e.id,userId:e.userId,username:e.username,projectId:e.projectId,projectName:e.projectName,originalPrompt:e.originalPrompt,optimizedPrompt:e.optimizedPrompt,duration:e.duration,aspectRatio:e.aspectRatio,resolution:e.resolution,status:e.status,videoUrl:e.videoUrl,videoCoverUrl:e.videoCoverUrl,references:e.references,creditsCost:e.creditsCost||0,textCreditsCost:e.textCreditsCost||0,textTokensUsed:e.textTokensUsed||0,videoTokensUsed:e.videoTokensUsed||0,errorMessage:e.errorMessage,createdAt:e.createdAt,generatedAt:e.generatedAt,genType:e.genType,imageSize:e.imageSize,imageUrl:e.imageUrl,imageTokensUsed:e.imageTokensUsed||0,imageProportion:e.imageProportion,imagePx:e.imagePx}))),r(e.total||0)}catch{LG.error(`加载记录失败`)}finally{a(!1)}},[l,d,o,c]);(0,S.useEffect)(()=>{D()},[D,p]),(0,S.useEffect)(()=>{if(!h){v(E7);return}let e=(h.references||[]).reduce((e,t,n)=>{let r=F7(t);return e[I7(t,n)]=P7(r),e},{});x.current&&(x.current.pause(),x.current.currentTime=0),b(!1),v({image:P7(h.imageUrl),video:P7(h.videoUrl),videoCover:P7(h.videoCoverUrl),references:e})},[h]);let O=()=>{s(1),m(e=>e+1)},k=(0,S.useCallback)(e=>{g(e)},[]),A=()=>{x.current&&x.current.pause(),b(!1),g(null)},j=e=>{v(t=>({...t,...e}))},M=(e,t)=>{v(n=>({...n,references:{...n.references,[e]:t}}))},N=(e,t=`素材`)=>{if(!e){LG.warning(`${t}链接为空,暂无法查看`);return}if(k7(e)){LG.warning(`本地临时素材已失效,暂无法查看`);return}if(N7(e)){LG.warning(`${t}链接已超时,请刷新列表或重新搜索后再查看`);return}window.open(A7(e),`_blank`,`noopener,noreferrer`)},P=()=>{if(h?.videoUrl){if(N7(h.videoUrl)){j({video:`invalid`}),LG.warning(`视频链接已超时,请刷新列表或重新搜索后再查看`);return}b(!0),window.setTimeout(()=>{x.current?.play().catch(()=>{b(!1),j({video:`invalid`}),LG.warning(`视频播放失败,请确认资源链接是否仍然有效`)})},0)}},F=async(e,t,n)=>{w(e);try{await p5(e,t,n),LG.success(`状态已更新`),D()}catch(e){LG.error(e?.message||`更新失败`)}finally{w(null)}},I=async()=>{if(T){w(T.record.id);try{await m5(T.record.id,T.ratio,T.resolution,T.image_size),LG.success(`已提交${T.record.genType===`video`?`视频`:`图片`}生成`),E(null),D()}catch(e){LG.error(e?.message||`生成失败`)}finally{w(null)}}},L=(0,S.useMemo)(()=>[{title:`用户`,key:`user`,width:120,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:t.username||`未知用户`}),(0,Q.jsx)(`div`,{style:{fontSize:11,color:`#94a3b8`},children:j7(t.userId)})]})},{title:`项目`,dataIndex:`projectName`,width:120,ellipsis:!0,render:e=>(0,Q.jsx)(Z.Text,{style:{fontSize:13},children:e||`-`})},{title:`类型`,dataIndex:`genType`,width:90,ellipsis:!0,render:e=>{let t=O7[e]||{text:e||`-`,color:`default`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`提示词`,key:`prompt`,ellipsis:!0,render:(e,t)=>(0,Q.jsx)(Ow,{title:t.originalPrompt,placement:`topLeft`,children:(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#475569`},ellipsis:!0,children:t.originalPrompt||`-`})})},{title:`参数`,key:`params`,width:160,render:(e,t)=>t.genType===`video`?t.duration||t.aspectRatio||t.resolution?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.duration?(0,Q.jsxs)(NQ,{children:[t.duration,`s`]}):null,t.aspectRatio?(0,Q.jsx)(NQ,{children:t.aspectRatio}):null,t.resolution?(0,Q.jsx)(NQ,{children:t.resolution}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`待配置`}):t.imageSize||t.imageProportion||t.imagePx?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.imageSize?(0,Q.jsx)(NQ,{children:t.imageSize}):null,t.imageProportion?(0,Q.jsx)(NQ,{children:t.imageProportion}):null,t.imagePx?(0,Q.jsx)(NQ,{children:t.imagePx}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`待配置`})},{title:`积分`,key:`credits`,width:120,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12},children:[t.textCreditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#f59e0b`},children:[`文字: `,t.textCreditsCost]}):null,t.creditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#6366f1`},children:[t.genType===`video`?`视频`:`图片`,`: `,t.creditsCost]}):null,t.textCreditsCost===0&&t.creditsCost===0?(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`},children:`0`}):null]})},{title:`状态`,dataIndex:`status`,width:90,render:e=>{let t=D7[e]||{color:`default`,text:e||`-`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`时间`,key:`time`,width:150,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[(0,Q.jsx)(`div`,{children:M7(t.createdAt)}),t.generatedAt?(0,Q.jsxs)(`div`,{style:{color:`#10b981`},children:[`生成: `,M7(t.generatedAt)]}):null]})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>k(t),children:`详情`}),t.status===`generating`?(0,Q.jsx)(qE,{size:`small`,danger:!0,loading:C===t.id,onClick:()=>{BG.confirm({title:`确认操作`,icon:(0,Q.jsx)(f2,{}),content:`确定将此记录标记为失败?`,onOk:()=>F(t.id,`failed`)})},children:`标记失败`}):null,t.status===`failed`?(0,Q.jsx)(qE,{size:`small`,type:`primary`,danger:!0,loading:C===t.id,onClick:()=>E({record:t,ratio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`,image_size:t.imageSize||`2K`}),children:`重试生成`}):null,t.status===`prompt_optimized`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(qE,{size:`small`,type:`primary`,loading:C===t.id,onClick:()=>E({record:t,ratio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`,image_size:t.imageSize||`2K`}),style:{background:`#6366f1`,border:`none`},children:[`生成`,t.genType===`video`?`视频`:`图片`]}),(0,Q.jsx)(qE,{size:`small`,danger:!0,loading:C===t.id,onClick:()=>{BG.confirm({title:`确认操作`,icon:(0,Q.jsx)(f2,{}),content:`确定将此记录标记为失败?`,onOk:()=>F(t.id,`failed`)})},children:`标记失败`})]}):null]})}],[k,C]),R=h?O7[h.genType||``]||{text:h.genType||`-`,color:`default`,icon:null}:null,z=h?D7[h.status]||{color:`default`,text:h.status||`-`,icon:null}:null,B=()=>{if(!h||h.genType!==`image`||h.status!==`completed`)return null;if(!h.imageUrl)return(0,Q.jsx)(R7,{text:`此图片任务暂无结果图片`,minHeight:260});if(_.image===`invalid`)return(0,Q.jsx)(R7,{text:L7(h.imageUrl,`图片`),minHeight:260});let e=A7(h.imageUrl);return(0,Q.jsxs)(`div`,{title:`点击新页面查看图片`,onClick:()=>N(h.imageUrl,`生成图片`),style:{position:`relative`,width:`100%`,minHeight:260,borderRadius:12,background:`#f8f9fc`,border:`1px solid #e2e8f0`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[(0,Q.jsx)(`img`,{src:e,alt:`生成图片`,onLoad:()=>j({image:`valid`}),onError:()=>j({image:`invalid`}),style:{display:_.image===`valid`?`block`:`none`,width:`100%`,maxHeight:560,objectFit:`contain`,background:`#fff`}},`${h.id}-${e}`),_.image===`checking`?(0,Q.jsx)(R7,{text:`图片加载检测中...`,minHeight:260}):null]})},V=()=>{if(!h||y||_.video===`invalid`)return null;let e=h.videoUrl?(0,Q.jsx)(qE,{type:`primary`,shape:`circle`,size:`large`,icon:(0,Q.jsx)(J4,{}),onClick:P,style:{boxShadow:`0 8px 20px rgba(15,23,42,0.25)`}}):null;if(!h.videoCoverUrl)return(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,Q.jsx)(R7,{text:`此视频无封面`,minHeight:340,action:e})});if(_.videoCover===`invalid`)return(0,Q.jsx)(R7,{text:L7(h.videoCoverUrl,`视频封面`),minHeight:340,action:e});let t=A7(h.videoCoverUrl);return(0,Q.jsxs)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,border:`1px solid #e2e8f0`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:t,alt:`视频封面`,onLoad:()=>j({videoCover:`valid`}),onError:()=>j({videoCover:`invalid`}),style:{display:_.videoCover===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`}},`${h.id}-cover-${t}`),_.videoCover===`checking`?(0,Q.jsx)(R7,{text:`视频封面加载检测中...`,minHeight:340,action:e}):null,_.videoCover===`valid`?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(15,23,42,0.18)`},children:e}):null]})},H=()=>{if(!h||h.genType!==`video`||h.status!==`completed`)return null;if(!h.videoUrl)return(0,Q.jsx)(R7,{text:`此视频任务暂无结果视频`,minHeight:340});if(_.video===`invalid`)return(0,Q.jsx)(R7,{text:L7(h.videoUrl,`视频`),minHeight:340});let e=A7(h.videoUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:340,borderRadius:12,background:`#000`,overflow:`hidden`,border:`1px solid #e2e8f0`},children:[(0,Q.jsx)(`video`,{ref:x,src:e,preload:`metadata`,controls:y,onLoadedMetadata:()=>j({video:`valid`}),onCanPlay:()=>j({video:`valid`}),onPlaying:()=>{b(!0),j({video:`valid`})},onPause:()=>b(!1),onEnded:()=>b(!1),onError:()=>{b(!1),j({video:`invalid`})},style:{width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`,opacity:+!!y,pointerEvents:y?`auto`:`none`}},`${h.id}-${e}`),V()]})},U=(e,t)=>{let n=F7(e),r=Une(e),i=I7(e,t),a=_.references[i]||P7(n),o=r===`image`,s=r===`video`,c=typeof e.name==`string`&&e.name?e.name:`参考素材 ${t+1}`;if(!n)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(R7,{text:`无链接`,compact:!0})}),(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})]},i);if(a===`invalid`)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(R7,{text:k7(n)?`本地临时素材已失效`:`素材不可访问`,compact:!0})}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i);let l=A7(n);return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsxs)(`div`,{role:`button`,tabIndex:0,title:`点击新页面查看素材`,onClick:()=>N(n,s?`视频素材`:o?`图片素材`:`素材`),onKeyDown:e=>{e.key===`Enter`&&N(n,s?`视频素材`:o?`图片素材`:`素材`)},style:{width:94,height:94,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,background:`#f8f9fc`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[o?(0,Q.jsx)(`img`,{src:l,alt:c,onLoad:()=>M(i,`valid`),onError:()=>M(i,`invalid`),style:{display:a===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`cover`}}):null,s?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`video`,{src:l,preload:`metadata`,onLoadedMetadata:()=>M(i,`valid`),onError:()=>M(i,`invalid`),style:{display:`none`}}),(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[(0,Q.jsx)(J4,{style:{fontSize:18}}),(0,Q.jsx)(`div`,{children:`视频素材`}),(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]})]}):null,!o&&!s?(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[`文件素材`,(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]}):null,a===`checking`&&o?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8f9fc`},children:(0,Q.jsx)(xm,{style:{color:`#6366f1`}})}):null]}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i)};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(A6,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`生成记录管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[n,` 条记录`]})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(RC,{placeholder:`状态筛选`,allowClear:!0,style:{width:120},value:l||void 0,onChange:e=>{u(e||``),s(1)},options:[{value:`optimizing`,label:`优化中`},{value:`prompt_optimized`,label:`待生成`},{value:`generating`,label:`生成中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`}]}),(0,Q.jsx)(hW,{placeholder:`用户ID搜索`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),style:{width:200},value:d,onChange:e=>f(e.target.value),onPressEnter:O,allowClear:!0}),(0,Q.jsx)(qE,{type:`primary`,onClick:O,style:{borderRadius:8},children:`搜索`})]})]}),(0,Q.jsx)(bQ,{columns:L,dataSource:e,rowKey:`id`,loading:i,scroll:{x:1120},pagination:{current:o,pageSize:c,total:n,onChange:s,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[h?.genType===`video`?(0,Q.jsx)(A6,{}):(0,Q.jsx)(v2,{}),(0,Q.jsx)(`span`,{children:`生成记录详情`})]}),open:!!h,onCancel:A,footer:null,width:900,destroyOnClose:!0,children:h?(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,flexWrap:`wrap`},children:[(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`用户`}),(0,Q.jsx)(Z.Text,{strong:!0,children:h.username||`-`})]}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`项目`}),(0,Q.jsx)(Z.Text,{strong:!0,children:h.projectName||`-`})]}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`类型 / 状态`}),(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[R?(0,Q.jsx)(NQ,{color:R.color,icon:R.icon,children:R.text}):null,z?(0,Q.jsx)(NQ,{color:z.color,icon:z.icon,children:z.text}):null]})]})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,Q.jsx)(Z.Text,{style:{fontSize:13,color:`#475569`,lineHeight:1.7},children:h.originalPrompt||`-`})})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`优化后提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`},children:(0,Q.jsx)(Z.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:h.optimizedPrompt||`-`})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(z7,{label:`文字积分`,value:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#f59e0b`},children:h.textCreditsCost||0}),(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.textTokensUsed||0,` tokens)`]})]})}),(0,Q.jsx)(z7,{label:`${h.genType===`image`?`图片`:`视频`}积分`,value:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:h.creditsCost||0}),h.genType===`video`&&h.videoTokensUsed?(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.videoTokensUsed,` tokens)`]}):null,h.genType===`image`&&h.imageTokensUsed?(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.imageTokensUsed,` tokens)`]}):null]})}),(0,Q.jsx)(z7,{label:`总积分`,value:(h.textCreditsCost||0)+(h.creditsCost||0)})]}),h.genType===`video`?h.duration||h.aspectRatio||h.resolution?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(z7,{label:`时长`,value:h.duration?`${h.duration}秒`:`-`}),(0,Q.jsx)(z7,{label:`比例`,value:h.aspectRatio||`-`}),(0,Q.jsx)(z7,{label:`分辨率`,value:h.resolution||`-`})]}):(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,textAlign:`center`},children:(0,Q.jsx)(NQ,{color:`default`,children:`视频参数待用户配置`})}):null,h.genType===`image`?h.imageSize||h.imageProportion||h.imagePx?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(z7,{label:`尺寸`,value:h.imagePx||`-`}),(0,Q.jsx)(z7,{label:`比例`,value:h.imageProportion||`-`}),(0,Q.jsx)(z7,{label:`分辨率`,value:h.imageSize||`-`})]}):(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,textAlign:`center`},children:(0,Q.jsx)(NQ,{color:`default`,children:`图片参数待用户配置`})}):null,!h?.references||h.references.length===0?null:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`参考内容`}),(0,Q.jsx)(`div`,{style:{display:`flex`,gap:10,flexWrap:`wrap`},children:h.references.map((e,t)=>U(e,t))})]}),h.status===`completed`?(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:h.genType===`video`?`生成视频`:`生成图片`}),h.genType===`video`?H():B()]}):null,h.status===`failed`&&h.errorMessage?(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(239,68,68,0.04)`,border:`1px solid rgba(239,68,68,0.15)`},children:(0,Q.jsxs)(Z.Text,{style:{fontSize:12,color:`#ef4444`},children:[`错误信息: `,h.errorMessage]})}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,fontSize:12,color:`#94a3b8`,flexWrap:`wrap`},children:[(0,Q.jsxs)(`span`,{children:[`创建: `,M7(h.createdAt)]}),(0,Q.jsxs)(`span`,{children:[`生成: `,M7(h.generatedAt)]})]})]}):(0,Q.jsx)(pC,{description:`暂无详情`})}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[T&&(T.record.genType===`video`?(0,Q.jsx)(J4,{}):(0,Q.jsx)(v2,{})),T&&(T.record.genType===`video`?`生成视频`:`生成图片`)]}),open:!!T,onCancel:()=>E(null),onOk:I,okText:`提交生成`,cancelText:`取消`,confirmLoading:T?C===T.record.id:!1,width:420,children:T?(0,Q.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:T.record.genType===`video`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`时长`}),(0,Q.jsxs)(Z.Text,{strong:!0,children:[T.record.duration||5,`s`]})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`画面比例`}),(0,Q.jsx)(RC,{value:T.ratio,onChange:e=>E(t=>t?{...t,ratio:e}:null),style:{width:`100%`},options:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`].map(e=>({value:e,label:e}))})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`分辨率`}),(0,Q.jsx)(RC,{value:T.resolution,onChange:e=>E(t=>t?{...t,resolution:e}:null),style:{width:`100%`},options:[`480p`,`720p`,`1080p`].map(e=>({value:e,label:e}))})]})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`尺寸`}),(0,Q.jsx)(Z.Text,{strong:!0,children:T.record.imagePx||`-`})]}),(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`比例`}),(0,Q.jsx)(Z.Text,{strong:!0,children:T.record.imageProportion||`-`})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`分辨率`}),(0,Q.jsx)(RC,{value:T.image_size,onChange:e=>E(t=>t?{...t,image_size:e}:null),style:{width:`100%`},options:[`2K`,`4K`].map(e=>({value:e,label:e}))})]})]})}):null})]})},B7=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),V7=20,H7={image:`empty`,video:`empty`,videoCover:`empty`,references:{}},U7={pending:{color:`default`,text:`待处理`,icon:(0,Q.jsx)(HB,{})},generating:{color:`warning`,text:`生成中`,icon:(0,Q.jsx)(xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,Q.jsx)(N0,{})},failed:{color:`error`,text:`失败`,icon:(0,Q.jsx)(I0,{})}},W7={timeout:`任务超时`,queued:`已入队`,preparing:`准备中`,creating_provider_task:`创建任务中`,waiting_remote:`等待生成`,result_ready:`结果就绪`,downloading:`下载中`,done:`完成`,download_failed:`下载失败`,polling:`轮询中`,failed:`失败`},G7={image:{text:`图片`,color:`purple`,icon:(0,Q.jsx)(v2,{})},video:{text:`视频`,color:`geekblue`,icon:(0,Q.jsx)(A6,{})}},Gne=e=>/^(https?:)?\/\//i.test(e)||/^(blob|data):/i.test(e),K7=e=>!!e&&/^blob:/i.test(e.trim()),q7=e=>{if(!e)return``;let t=String(e).trim();return t?Gne(t)?t:B7?`${B7}${t.startsWith(`/`)?t:`/${t}`}`:t.startsWith(`/`)?t:`/${t}`:``},Kne=e=>e?e.length>12?`${e.slice(0,8)}...`:e:`-`,J7=e=>e?Z5(e):`-`,qne=e=>e==null||e===``,Y7=e=>{if(!e||K7(e))return!1;try{let t=new URL(q7(e),window.location.origin),n=t.searchParams.get(`exp`)||t.searchParams.get(`expires`)||t.searchParams.get(`expire`)||t.searchParams.get(`expires_at`)||t.searchParams.get(`x-expires`);if(!n)return!1;let r=Number(n);if(!Number.isFinite(r))return!1;let i=r>1e10?r:r*1e3;return Date.now()>=i}catch{return!1}},X7=e=>e?K7(e)||Y7(e)?`invalid`:`checking`:`empty`,Z7=e=>{let t=e.url||e.mediaUrl||e.fileUrl;return typeof t==`string`&&t.trim()?t.trim():void 0},Jne=e=>{let t=String(e.type||e.mediaType||e.mimeType||``).toLowerCase(),n=Z7(e)?.toLowerCase()||``;return t.includes(`video`)||/\.(mp4|mov|webm|m4v)(\?|$)/i.test(n)?`video`:t.includes(`image`)||/\.(png|jpe?g|webp|gif|bmp|svg)(\?|$)/i.test(n)?`image`:t||`unknown`},Q7=(e,t)=>`${t}-${Z7(e)||`empty`}`,$7=(e,t=`资源`)=>K7(e)?`本地临时素材已失效`:Y7(e)?`${t}链接已超时,请刷新列表或重新搜索后再查看`:`${t}加载失败,请刷新列表或重新搜索后再查看`,e9=({text:e,minHeight:t=240,compact:n=!1,action:r})=>(0,Q.jsxs)(`div`,{style:{width:`100%`,minHeight:n?void 0:t,height:n?`100%`:void 0,borderRadius:n?10:12,background:`#f8f9fc`,border:`1px dashed #cbd5e1`,color:`#64748b`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:n?4:10,textAlign:`center`},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`,fontSize:n?11:13},children:e}),r]}),t9=({label:e,value:t})=>(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:120},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:qne(t)?`-`:t})]}),Yne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(``),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)(``),[m,h]=(0,S.useState)(``),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(0),[C,w]=(0,S.useState)(null),[T,E]=(0,S.useState)(H7),[D,O]=(0,S.useState)(!1),k=(0,S.useRef)(null),A=(0,S.useCallback)(async()=>{a(!0);try{let e=await g5({genType:u||void 0,status:c||void 0,userId:g||void 0,userName:v||void 0,page:o,pageSize:V7});t(e.items||[]),r(e.total||0)}catch(e){LG.error(e?.message||`加载创作记录失败`)}finally{a(!1)}},[u,c,o,g,v]);(0,S.useEffect)(()=>{A()},[A,b]),(0,S.useEffect)(()=>{if(!C){E(H7);return}let e=(C.mediaReferences||[]).reduce((e,t,n)=>{let r=Z7(t);return e[Q7(t,n)]=X7(r),e},{});k.current&&(k.current.pause(),k.current.currentTime=0),O(!1),E({image:X7(C.imageUrl),video:X7(C.videoUrl),videoCover:X7(C.videoCoverUrl),references:e})},[C]);let j=()=>{s(1),_(f.trim()),y(m.trim()),x(e=>e+1)},M=(0,S.useCallback)(e=>{w(e)},[]),N=()=>{k.current&&k.current.pause(),O(!1),w(null)},P=e=>{E(t=>({...t,...e}))},F=(e,t)=>{E(n=>({...n,references:{...n.references,[e]:t}}))},I=()=>{if(C?.videoUrl){if(Y7(C.videoUrl)){P({video:`invalid`}),LG.warning(`视频链接已超时,请刷新列表或重新搜索后再查看`);return}O(!0),window.setTimeout(()=>{k.current?.play().catch(()=>{O(!1),P({video:`invalid`}),LG.warning(`视频播放失败,请确认资源链接是否仍然有效`)})},0)}},L=(e,t=`素材`)=>{if(!e){LG.warning(`${t}链接为空,暂无法查看`);return}if(K7(e)){LG.warning(`本地临时素材已失效,暂无法查看`);return}if(Y7(e)){LG.warning(`${t}链接已超时,请刷新列表或重新搜索后再查看`);return}window.open(q7(e),`_blank`,`noopener,noreferrer`)},R=(0,S.useMemo)(()=>[{title:`用户`,key:`user`,width:150,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:t.userName||`未知用户`}),(0,Q.jsx)(`div`,{style:{fontSize:11,color:`#94a3b8`},children:Kne(t.userId)})]})},{title:`类型`,dataIndex:`genType`,width:90,render:e=>{let t=G7[e]||{text:e||`-`,color:`default`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`提示词`,key:`prompt`,ellipsis:!0,render:(e,t)=>(0,Q.jsx)(Ow,{title:t.originalPrompt,placement:`topLeft`,children:(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#475569`},ellipsis:!0,children:t.originalPrompt||`-`})})},{title:`参数`,key:`params`,width:180,render:(e,t)=>t.genType===`video`?t.duration||t.aspectRatio||t.resolution?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.duration?(0,Q.jsxs)(NQ,{children:[t.duration,`s`]}):null,t.aspectRatio?(0,Q.jsx)(NQ,{children:t.aspectRatio}):null,t.resolution?(0,Q.jsx)(NQ,{children:t.resolution}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`无参数`}):t.imageSize||t.imageProportion||t.imagePx?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.imageSize?(0,Q.jsx)(NQ,{children:t.imageSize}):null,t.imageProportion?(0,Q.jsx)(NQ,{children:t.imageProportion}):null,t.imagePx?(0,Q.jsx)(NQ,{children:t.imagePx}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`无参数`})},{title:`积分`,key:`credits`,width:130,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12},children:[(0,Q.jsxs)(`div`,{style:{color:`#6366f1`},children:[`总: `,t.creditsCost||0]}),t.textCreditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#f59e0b`},children:[`文字: `,t.textCreditsCost]}):null]})},{title:`状态`,dataIndex:`status`,width:100,render:e=>{let t=U7[e]||{color:`default`,text:e||`-`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`阶段`,dataIndex:`pipelineStage`,width:120,render:e=>(0,Q.jsx)(NQ,{color:`blue`,children:W7[e]||e||`-`})},{title:`时间`,key:`time`,width:170,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[(0,Q.jsx)(`div`,{children:J7(t.createdAt)}),t.generatedAt?(0,Q.jsxs)(`div`,{style:{color:`#10b981`},children:[`生成: `,J7(t.generatedAt)]}):null]})},{title:`操作`,key:`action`,width:90,fixed:`right`,render:(e,t)=>(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>M(t),children:`详情`})}],[M]),z=C?G7[C.genType]||{text:C.genType||`-`,color:`default`,icon:null}:null,B=C?U7[C.status]||{color:`default`,text:C.status||`-`,icon:null}:null,V=()=>{if(!C||C.genType!==`image`||C.status!==`completed`)return null;if(!C.imageUrl)return(0,Q.jsx)(e9,{text:`此图片任务暂无结果图片`,minHeight:260});if(T.image===`invalid`)return(0,Q.jsx)(e9,{text:$7(C.imageUrl,`图片`),minHeight:260});let e=q7(C.imageUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,minHeight:260,borderRadius:12,background:`#f8f9fc`,border:`1px solid #e2e8f0`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:e,alt:`生成图片`,onLoad:()=>P({image:`valid`}),onError:()=>P({image:`invalid`}),style:{display:T.image===`valid`?`block`:`none`,width:`100%`,maxHeight:560,objectFit:`contain`,background:`#fff`}},`${C.id}-${e}`),T.image===`checking`?(0,Q.jsx)(e9,{text:`图片加载检测中...`,minHeight:260}):null]})},H=()=>{if(!C||D||T.video===`invalid`)return null;let e=C.videoUrl?(0,Q.jsx)(qE,{type:`primary`,shape:`circle`,size:`large`,icon:(0,Q.jsx)(J4,{}),onClick:I,style:{boxShadow:`0 8px 20px rgba(15,23,42,0.25)`}}):null;if(!C.videoCoverUrl)return(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,Q.jsx)(e9,{text:`此视频无封面`,minHeight:340,action:e})});if(T.videoCover===`invalid`)return(0,Q.jsx)(e9,{text:$7(C.videoCoverUrl,`视频封面`),minHeight:340,action:e});let t=q7(C.videoCoverUrl);return(0,Q.jsxs)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,border:`1px solid #e2e8f0`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:t,alt:`视频封面`,onLoad:()=>P({videoCover:`valid`}),onError:()=>P({videoCover:`invalid`}),style:{display:T.videoCover===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`}},`${C.id}-cover-${t}`),T.videoCover===`checking`?(0,Q.jsx)(e9,{text:`视频封面加载检测中...`,minHeight:340,action:e}):null,T.videoCover===`valid`?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(15,23,42,0.18)`},children:e}):null]})},U=()=>{if(!C||C.genType!==`video`||C.status!==`completed`)return null;if(!C.videoUrl)return(0,Q.jsx)(e9,{text:`此视频任务暂无结果视频`,minHeight:340});if(T.video===`invalid`)return(0,Q.jsx)(e9,{text:$7(C.videoUrl,`视频`),minHeight:340});let e=q7(C.videoUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:340,borderRadius:12,background:`#000`,overflow:`hidden`,border:`1px solid #e2e8f0`},children:[(0,Q.jsx)(`video`,{ref:k,src:e,preload:`metadata`,controls:D,onLoadedMetadata:()=>P({video:`valid`}),onCanPlay:()=>P({video:`valid`}),onPlaying:()=>{O(!0),P({video:`valid`})},onPause:()=>O(!1),onEnded:()=>O(!1),onError:()=>{O(!1),P({video:`invalid`})},style:{width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`,opacity:+!!D,pointerEvents:D?`auto`:`none`}},`${C.id}-${e}`),H()]})},W=(e,t)=>{let n=Z7(e),r=Jne(e),i=Q7(e,t),a=T.references[i]||X7(n),o=r===`image`,s=r===`video`,c=typeof e.name==`string`&&e.name?e.name:`参考素材 ${t+1}`;if(!n)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(e9,{text:`无链接`,compact:!0})}),(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})]},i);if(a===`invalid`)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(e9,{text:K7(n)?`本地临时素材已失效`:`素材不可访问`,compact:!0})}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i);let l=q7(n);return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsxs)(`div`,{role:`button`,tabIndex:0,title:`点击新页面查看素材`,onClick:()=>L(n,s?`视频素材`:o?`图片素材`:`素材`),onKeyDown:e=>{e.key===`Enter`&&L(n,s?`视频素材`:o?`图片素材`:`素材`)},style:{width:94,height:94,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,background:`#f8f9fc`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[o?(0,Q.jsx)(`img`,{src:l,alt:c,onLoad:()=>F(i,`valid`),onError:()=>F(i,`invalid`),style:{display:a===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`cover`}}):null,s?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`video`,{src:l,preload:`metadata`,onLoadedMetadata:()=>F(i,`valid`),onError:()=>F(i,`invalid`),style:{display:`none`}}),(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[(0,Q.jsx)(J4,{style:{fontSize:18}}),(0,Q.jsx)(`div`,{children:`视频素材`}),(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]})]}):null,!o&&!s?(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[`文件素材`,(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]}):null,a===`checking`&&o?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8f9fc`},children:(0,Q.jsx)(xm,{style:{color:`#6366f1`}})}):null]}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i)};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`创作记录管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[n,` 条记录`]})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`状态筛选`,value:c||void 0,style:{width:140},onChange:e=>{l(e||``),s(1)},options:[{value:`generating`,label:`生成中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`}]}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`类型筛选`,value:u||void 0,style:{width:120},onChange:e=>{d(e||``),s(1)},options:[{value:`image`,label:`图片`},{value:`video`,label:`视频`}]}),(0,Q.jsx)(hW,{placeholder:`用户ID搜索`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),style:{width:180},value:f,onChange:e=>p(e.target.value),onPressEnter:j,allowClear:!0}),(0,Q.jsx)(hW,{placeholder:`用户名搜索`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),style:{width:160},value:m,onChange:e=>h(e.target.value),onPressEnter:j,allowClear:!0}),(0,Q.jsx)(qE,{type:`primary`,onClick:j,style:{borderRadius:8},children:`搜索`})]})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:i,columns:R,dataSource:e,scroll:{x:1180},pagination:{current:o,pageSize:V7,total:n,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:e=>s(e)}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[C?.genType===`video`?(0,Q.jsx)(A6,{}):(0,Q.jsx)(v2,{}),(0,Q.jsx)(`span`,{children:`创作记录详情`})]}),open:!!C,onCancel:N,footer:null,width:900,destroyOnClose:!0,children:C?(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:12},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12,flexWrap:`wrap`},children:[z?(0,Q.jsx)(NQ,{color:z.color,icon:z.icon,children:z.text}):null,B?(0,Q.jsx)(NQ,{color:B.color,icon:B.icon,children:B.text}):null,C.pipelineStage?(0,Q.jsx)(NQ,{color:`blue`,children:W7[C.pipelineStage]||C.pipelineStage}):null]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`用户名称`,value:C.userName||`未知用户`}),(0,Q.jsx)(t9,{label:`用户ID`,value:C.userId||`-`}),(0,Q.jsx)(t9,{label:`任务ID`,value:C.id})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,lineHeight:1.6},children:C.originalPrompt||`-`})]}),C.genType===`video`?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`时长`,value:C.duration?`${C.duration}秒`:`-`}),(0,Q.jsx)(t9,{label:`画面比例`,value:C.aspectRatio||`-`}),(0,Q.jsx)(t9,{label:`分辨率`,value:C.resolution||`-`})]}):(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`图片档位`,value:C.imageSize||`-`}),(0,Q.jsx)(t9,{label:`图片比例`,value:C.imageProportion||`-`}),(0,Q.jsx)(t9,{label:`像素尺寸`,value:C.imagePx||`-`})]}),C.engineSnapshot?(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`引擎快照`}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`引擎名称`,value:C.engineSnapshot.name||`-`}),(0,Q.jsx)(t9,{label:`服务商`,value:C.engineSnapshot.provider||`-`}),(0,Q.jsx)(t9,{label:`模型`,value:C.engineSnapshot.modelName||`-`}),(0,Q.jsx)(t9,{label:`引擎ID`,value:C.engineSnapshot.id||C.engineId||`-`})]})]}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`总积分`,value:(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:C.creditsCost||0})}),(0,Q.jsx)(t9,{label:`文字积分`,value:`${C.textCreditsCost||0} (${C.textTokensUsed||0} tokens)`}),(0,Q.jsx)(t9,{label:`图片 tokens`,value:C.imageTokensUsed??0}),(0,Q.jsx)(t9,{label:`视频 tokens`,value:C.videoTokensUsed??0})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`第三方任务ID`,value:C.providerTaskId||C.seedanceTaskId||`-`}),(0,Q.jsx)(t9,{label:`轮询次数`,value:C.pollCount??0}),(0,Q.jsx)(t9,{label:`重试次数`,value:C.retryCount??0})]}),!C?.mediaReferences||C.mediaReferences.length===0?null:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`参考内容`}),(0,Q.jsx)(`div`,{style:{display:`flex`,gap:10,flexWrap:`wrap`},children:C.mediaReferences.map((e,t)=>W(e,t))})]}),C.status===`completed`?(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:C.genType===`video`?`生成视频`:`生成图片`}),C.genType===`video`?U():V()]}):null,C.status===`failed`&&C.errorMessage?(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(239,68,68,0.04)`,border:`1px solid rgba(239,68,68,0.15)`},children:(0,Q.jsxs)(Z.Text,{style:{fontSize:12,color:`#ef4444`},children:[`错误信息: `,C.errorMessage]})}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,fontSize:12,color:`#94a3b8`,flexWrap:`wrap`},children:[(0,Q.jsxs)(`span`,{children:[`创建: `,J7(C.createdAt)]}),(0,Q.jsxs)(`span`,{children:[`生成: `,J7(C.generatedAt)]})]})]}):(0,Q.jsx)(pC,{description:`暂无详情`})})]})},n9=20,Xne=[{value:`pending`,label:`已创建`},{value:`waiting_user`,label:`等待用户操作`},{value:`processing`,label:`处理中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`},{value:`cancelled`,label:`已取消`}],Zne={pending:{color:`default`,text:`已创建`},waiting_user:{color:`processing`,text:`等待用户操作`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`已完成`},failed:{color:`error`,text:`失败`},cancelled:{color:`default`,text:`已取消`}},Qne={material_input:`素材输入`,image_prompt_optimize:`图片 AI 提词`,image_generate:`图片生成`,video_prompt_optimize:`视频 AI 提词`,video_generate:`视频生成`},r9=e=>e?Z5(e):`-`,i9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,$ne=({status:e})=>{if(!e)return(0,Q.jsx)(NQ,{children:`-`});let t=Zne[e]||{color:`blue`,text:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.text})},ere=()=>{let e=Ye(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(1),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(``),[h,g]=(0,S.useState)(``),[_,v]=(0,S.useState)(null),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(``),[w,T]=(0,S.useState)(``),[E,D]=(0,S.useState)(null),[O,k]=(0,S.useState)(0),A=(0,S.useCallback)(async()=>{o(!0);try{let e=await v5({status:l||void 0,keyword:y||void 0,userId:x||void 0,userName:w||void 0,createdStart:E?.[0]?.toISOString?.(),createdEnd:E?.[1]?.toISOString?.(),page:s,pageSize:n9});n(e.items||[]),i(e.total||0)}catch(e){LG.error(e?.message||`加载爆款开头复刻任务失败`)}finally{o(!1)}},[s,E,y,x,w,l]);(0,S.useEffect)(()=>{A()},[A,O]);let j=()=>{b(d.trim()),C(p.trim()),T(h.trim()),D(_),c(1)};return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsx)(PR,{children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{align:`center`,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:3,style:{marginBottom:4},children:`爆款开头复刻`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`只读排查页面:查看任务列表、素材、步骤详情和生成结果。`})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>k(e=>e+1),children:`刷新`})]}),(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`任务状态`,style:{width:160},value:l||void 0,onChange:e=>{u(e||``),c(1)},options:Xne}),(0,Q.jsx)(hW,{allowClear:!0,prefix:(0,Q.jsx)(NC,{}),placeholder:`关键词:标题/项目名/核心点`,style:{width:260},value:d,onChange:e=>f(e.target.value),onPressEnter:j}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户ID(管理员)`,style:{width:190},value:p,onChange:e=>m(e.target.value),onPressEnter:j}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户名(管理员)`,style:{width:230},value:h,onChange:e=>g(e.target.value),onPressEnter:j}),(0,Q.jsx)(YB.RangePicker,{showTime:!0,value:_,onChange:v,placeholder:[`创建开始`,`创建结束`]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(NC,{}),onClick:j,children:`搜索`}),(0,Q.jsx)(qE,{onClick:()=>{u(``),f(``),m(``),g(``),v(null),b(``),C(``),T(``),D(null),c(1),k(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:a,dataSource:t,pagination:{current:s,pageSize:n9,total:r,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:c},scroll:{x:1380},columns:[{title:`项目ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Ow,{title:e,children:i9(e)})},{title:`用户`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(Z.Text,{children:t.userName||`-`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:i9(t.userId)})]})},{title:`项目信息`,width:260,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:2,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.title||t.targetProjectName||`-`}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:240},children:[`素材:`,t.sourceProjectName||`-`]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:240},children:[`核心:`,t.coreContentPoint||`-`]})]})},{title:`状态`,dataIndex:`status`,width:130,render:e=>(0,Q.jsx)($ne,{status:e})},{title:`当前步骤`,dataIndex:`currentStepCode`,width:140,render:e=>Qne[e]||e||`-`},{title:`图片结果`,dataIndex:`finalImageUrl`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`success`,children:`有`}):(0,Q.jsx)(NQ,{children:`无`})},{title:`视频结果`,dataIndex:`finalVideoUrl`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`success`,children:`有`}):(0,Q.jsx)(NQ,{children:`无`})},{title:`错误信息`,dataIndex:`errorMessage`,width:220,ellipsis:!0,render:e=>e||`-`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:r9},{title:`更新时间`,dataIndex:`updatedAt`,width:170,render:r9},{title:`操作`,fixed:`right`,width:110,render:(t,n)=>(0,Q.jsx)(qE,{type:`link`,icon:(0,Q.jsx)(qU,{}),onClick:()=>e(`/hot-opening-replications/${n.id}`),children:`详情`})}]})]})})})},a9=({value:e,maxHeight:t=420})=>e==null||e===``?(0,Q.jsx)(pC,{image:pC.PRESENTED_IMAGE_SIMPLE,description:`暂无 JSON 数据`}):(0,Q.jsx)(`pre`,{style:{margin:0,padding:12,maxHeight:t,overflow:`auto`,background:`#0f172a`,color:`#e2e8f0`,borderRadius:8,fontSize:12,lineHeight:1.6},children:JSON.stringify(e,null,2)}),tre=({input:e,output:t,raw:n,inputLabel:r=`查看 input_json`,outputLabel:i=`查看 output_json`,rawLabel:a=`查看原始 JSON`})=>{let o=[];return e!==void 0&&o.push({key:`input`,label:r,children:(0,Q.jsx)(a9,{value:e})}),t!==void 0&&o.push({key:`output`,label:i,children:(0,Q.jsx)(a9,{value:t})}),n!==void 0&&o.push({key:`raw`,label:a,children:(0,Q.jsx)(a9,{value:n})}),o.length?(0,Q.jsx)(Ng,{size:`small`,style:{marginTop:12},items:o}):null},nre=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``);function rre(e){if(!e)return``;let t=String(e).trim();return t?/^(https?:)?\/\//i.test(t)||/^(blob|data):/i.test(t)?t:`${nre}${t.startsWith(`/`)?t:`/${t}`}`:``}var o9=({url:e,type:t,height:n=260,emptyDescription:r=`暂无资源`,errorDescription:i=`资源加载失败,可能文件不存在、签名过期或访问权限受限。`})=>{let a=(0,S.useMemo)(()=>rre(e),[e]),[o,s]=(0,S.useState)(!1);(0,S.useEffect)(()=>{s(!1)},[a]);let c=a?(0,Q.jsxs)(VV,{wrap:!0,style:{marginTop:8},children:[(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(c$,{}),onClick:async()=>{if(a)try{await navigator.clipboard.writeText(a),LG.success(`资源地址已复制`)}catch{LG.error(`复制失败,请手动复制`)}},children:`复制地址`}),(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(l4,{}),onClick:()=>window.open(a,`_blank`,`noopener,noreferrer`),children:`新窗口打开`}),(0,Q.jsx)(Z.Text,{copyable:{text:a},type:`secondary`,style:{maxWidth:460},ellipsis:!0,children:a})]}):null;return a?(0,Q.jsxs)(`div`,{children:[o?(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`资源预览失败`,description:i,style:{marginBottom:8}}):null,t===`image`?(0,Q.jsx)(PU,{src:a,onError:()=>s(!0),style:{width:`100%`,maxHeight:n,objectFit:`contain`,borderRadius:12,background:`#f8fafc`,border:`1px solid #f1f5f9`},fallback:``,preview:!o}):(0,Q.jsx)(`video`,{src:a,controls:!0,preload:`metadata`,onError:()=>s(!0),style:{width:`100%`,maxHeight:n,borderRadius:12,background:`#0f172a`,border:`1px solid #f1f5f9`}}),c]}):(0,Q.jsx)(`div`,{children:(0,Q.jsx)(`div`,{style:{height:n,borderRadius:12,border:`1px dashed #cbd5e1`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8fafc`},children:(0,Q.jsx)(pC,{image:pC.PRESENTED_IMAGE_SIMPLE,description:r})})})},s9={pending:{text:`待处理`,color:`default`},waiting_user:{text:`等待用户操作`,color:`processing`},processing:{text:`处理中`,color:`warning`},completed:{text:`已完成`,color:`success`},failed:{text:`失败`,color:`error`},cancelled:{text:`已取消`,color:`default`},canceled:{text:`已取消`,color:`default`},timeout:{text:`已超时`,color:`error`},queued:{text:`已入队`,color:`processing`},preparing:{text:`准备中`,color:`processing`},creating_provider_task:{text:`创建远端任务`,color:`processing`},waiting_remote:{text:`等待远端结果`,color:`processing`},polling:{text:`轮询远端结果`,color:`processing`},result_ready:{text:`结果已就绪`,color:`success`},downloading:{text:`下载中`,color:`processing`},done:{text:`已完成`,color:`success`},download_failed:{text:`下载失败`,color:`error`},retry_waiting:{text:`等待重试`,color:`orange`},pending_analysis:{text:`等待分析`,color:`default`},analyzing:{text:`分析中`,color:`processing`},analysis_completed:{text:`分析完成`,color:`success`},analysis_failed:{text:`分析失败`,color:`error`},splitting:{text:`拆镜中`,color:`warning`},split_completed:{text:`拆镜完成`,color:`success`},partial_failed:{text:`部分失败`,color:`orange`},none:{text:`未拆镜`,color:`default`},not_required:{text:`无需处理`,color:`default`},not_started:{text:`未开始`,color:`default`},project_created:{text:`已创建项目`,color:`processing`},true:{text:`是`,color:`success`},false:{text:`否`,color:`default`}},c9={material_input:`素材输入`,image_prompt_optimize:`图片 AI 提词`,image_generate:`图片生成`,video_prompt_optimize:`视频 AI 提词`,video_generate:`视频生成`},l9={hot_opening_replicate:`爆款开头复刻`,shot_replicate:`拆镜复刻`},u9={ai_suggestion:{text:`AI 建议`,color:`purple`},custom:{text:`自定义`,color:`cyan`},original:{text:`原视频`,color:`blue`}};function d9(e){return e?l9[e]||e:`-`}function f9(e){return e?c9[e]||e:`-`}function ire(e){return e?s9[e]?.text||c9[e]||l9[e]||u9[e]?.text||e:`-`}function are(e){return e?s9[e]?.color||u9[e]?.color||`blue`:`default`}var p9=({status:e,tooltipRaw:t=!0})=>{if(e==null||e===``)return(0,Q.jsx)(NQ,{children:`-`});let n=String(e),r=ire(n),i=(0,Q.jsx)(NQ,{color:are(n),children:r});return!t||r===n?i:(0,Q.jsx)(Ow,{title:n,children:i})};function m9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function h9(e,...t){for(let n of t){let t=e[n];if(t!=null&&String(t).trim()!==``)return String(t)}return``}function g9(e,t,...n){for(let t of n){let n=e[t];if(n===!0||n===!1)return n;if(n===`true`)return!0;if(n===`false`)return!1}return t}function ore(e,...t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t)&&t>0)return t;if(typeof t==`string`&&t.trim()){let e=Number(t);if(Number.isFinite(e)&&e>0)return e}}}function _9(e){if(!m9(e))return null;let t=h9(e,`key`);return t?{key:t,label:h9(e,`label`)||t,type:h9(e,`type`)||void 0,enabled:g9(e,!0,`enabled`),editable:g9(e,!0,`editable`),maxLength:ore(e,`maxLength`,`max_length`)}:null}function v9(e){if(!m9(e))return null;let t=e.data;return m9(t)?t:Array.isArray(e.sections)?e:null}function sre(e){return!!v9(e)}function cre(e){let t=v9(e);return(Array.isArray(t?.sections)?t.sections:[]).map(e=>{let t=_9(e);if(!t||!m9(e))return null;let n=Array.isArray(e.children)?e.children.map(_9).filter(Boolean):[],r=Array.isArray(e.itemFields)?e.itemFields.map(_9).filter(Boolean):Array.isArray(e.item_fields)?e.item_fields.map(_9).filter(Boolean):[];return{...t,contentKey:h9(e,`contentKey`,`content_key`)||void 0,children:n,itemFields:r}}).filter(e=>!!e&&e.enabled)}function lre(e){return m9(e)?Object.entries(e).filter(([e])=>![`schemaVersion`,`schemaUsage`,`schema_version`,`schema_usage`].includes(e)).map(([e,t])=>Array.isArray(t)&&t.every(m9)?{key:e,label:e,type:`flow`,enabled:!0,editable:!1,itemFields:Array.from(new Set(t.flatMap(e=>Object.keys(e)))).filter(e=>e!==`时间段`).map(e=>({key:e,label:e,enabled:!0,editable:!1})),children:[]}:m9(t)?{key:e,label:e,type:`object`,enabled:!0,editable:!1,children:Object.keys(t).map(e=>({key:e,label:e,enabled:!0,editable:!1})),itemFields:[]}:{key:e,label:e,type:`text`,enabled:!0,editable:!1,children:[],itemFields:[]}):[]}var y9=e=>!!e&&typeof e==`object`&&!Array.isArray(e),b9=e=>typeof e==`string`&&e.length>80,x9=e=>e==null||e===``?(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`}):typeof e==`boolean`?e?`是`:`否`:typeof e==`number`?e:typeof e==`string`?(0,Q.jsx)(Z.Paragraph,{style:{marginBottom:0,whiteSpace:`pre-wrap`},children:e}):(0,Q.jsx)(a9,{value:e,maxHeight:220}),S9=e=>e?(0,Q.jsx)(NQ,{color:`processing`,children:`可编辑`}):(0,Q.jsx)(NQ,{color:`default`,children:`只读`}),C9=(e,t)=>e[t],ure=(e,t)=>{let n=C9(e,t.key);if(!y9(n))return(0,Q.jsx)(a9,{value:n??{},maxHeight:220});let r=t.children.filter(e=>e.enabled);return r.length?(0,Q.jsx)(lV,{size:`small`,column:2,bordered:!0,children:r.map(e=>(0,Q.jsx)(lV.Item,{label:(0,Q.jsxs)(VV,{size:4,children:[e.label,S9(e.editable)]}),span:b9(n[e.key])||y9(n[e.key])||Array.isArray(n[e.key])?2:1,children:x9(n[e.key])},e.key))}):(0,Q.jsx)(a9,{value:n,maxHeight:220})},dre=(e,t)=>{let n=e.itemFields.filter(e=>e.enabled);return n.length?[{key:`时间段`,label:`时间段`,enabled:!0,editable:!1},...n]:Array.from(new Set(t.flatMap(e=>Object.keys(e)))).map(e=>({key:e,label:e,enabled:!0,editable:!1}))},fre=(e,t)=>{let n=C9(e,t.key);if(!Array.isArray(n)||!n.every(y9))return(0,Q.jsx)(a9,{value:n??[],maxHeight:260});let r=n,i=dre(t,r);return(0,Q.jsx)(bQ,{size:`small`,rowKey:(e,n)=>`${t.key}-${n}`,columns:i.map(e=>({title:(0,Q.jsxs)(VV,{size:4,children:[e.label,S9(e.editable)]}),dataIndex:e.key,key:e.key,width:b9(r.find(t=>t[e.key])?.[e.key])?320:160,render:e=>x9(e)})),dataSource:r,pagination:!1,scroll:{x:Math.max(900,i.length*180)},tableLayout:`fixed`})},pre=(e,t)=>x9(C9(e,t.key)),mre=({schema:e,finalPrompt:t,schemaConfigSnapshot:n,schemaConfigSource:r,schemaConfigVersion:i,schemaConfigIsFallback:a})=>{let o=!!e&&Object.keys(e).length>0;if(!o&&!t)return(0,Q.jsx)(pC,{description:`暂无视频提词 schema`});let s=o?e:{},c=sre(n),l=(c?cre(n):lre(s)).filter(e=>e.key in s).map(e=>({key:e.key,label:(0,Q.jsxs)(VV,{size:8,wrap:!0,children:[(0,Q.jsx)(`span`,{children:e.label}),S9(e.editable),c?null:(0,Q.jsx)(NQ,{color:`warning`,children:`管理后台兜底展示`})]}),children:e.type===`object`?ure(s,e):e.type===`flow`?fre(s,e):pre(s,e)}));return(0,Q.jsxs)(VV,{direction:`vertical`,size:12,style:{width:`100%`},children:[(0,Q.jsx)(PR,{size:`small`,title:`Schema 配置来源`,children:(0,Q.jsxs)(lV,{size:`small`,column:3,bordered:!0,children:[(0,Q.jsx)(lV.Item,{label:`来源`,children:r||n?.source||(c?`-`:`viewer_fallback`)}),(0,Q.jsx)(lV.Item,{label:`版本`,children:i||n?.version||`-`}),(0,Q.jsx)(lV.Item,{label:`历史兜底`,children:a||!c?(0,Q.jsx)(NQ,{color:`warning`,children:`是`}):(0,Q.jsx)(NQ,{color:`success`,children:`否`})})]})}),t?(0,Q.jsx)(PR,{size:`small`,title:`最终视频提示词`,children:(0,Q.jsx)(Z.Paragraph,{style:{whiteSpace:`pre-wrap`,marginBottom:0},children:t})}):null,l.length?(0,Q.jsx)(Ng,{size:`small`,items:l}):o?(0,Q.jsx)(PR,{size:`small`,title:`视频提词 Schema`,children:(0,Q.jsx)(a9,{value:s,maxHeight:360})}):null,o?(0,Q.jsx)(Ng,{size:`small`,items:[{key:`raw_schema`,label:`原始 JSON / 历史脏字段排查`,children:(0,Q.jsx)(a9,{value:s,maxHeight:420})}]}):null]})},hre=[`material_input`,`image_prompt_optimize`,`image_generate`,`video_prompt_optimize`,`video_generate`],gre={material_input:`参考素材、项目名称和核心内容点`,image_prompt_optimize:`图片 AI 提词优化结果`,image_generate:`图片引擎、生成参数和结果图`,video_prompt_optimize:`视频 JSON schema、动作流程和最终提词`,video_generate:`视频引擎、生成参数、封面和结果视频`},w9=e=>e?Z5(e):`-`,T9=e=>e?e.length>18?`${e.slice(0,10)}...${e.slice(-4)}`:e:`-`,_re=({text:e=`-`})=>(0,Q.jsx)(Z.Text,{type:`secondary`,children:e}),E9=({step:e})=>e?(0,Q.jsx)(tre,{input:e.input,output:e.output}):null,D9=({index:e,stepCode:t,step:n,current:r})=>(0,Q.jsxs)(VV,{wrap:!0,size:8,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:`第${e}步:${f9(t)}`}),(0,Q.jsx)(p9,{status:n?.status||`not_started`}),r?(0,Q.jsx)(NQ,{color:`blue`,children:`当前步骤`}):null,(0,Q.jsx)(Z.Text,{type:`secondary`,children:gre[t]||t}),n?.updatedAt?(0,Q.jsxs)(Z.Text,{type:`secondary`,children:[`更新时间:`,w9(n.updatedAt)]}):null,n?.chatTaskId?(0,Q.jsx)(Ow,{title:n.chatTaskId,children:(0,Q.jsxs)(NQ,{children:[`Chat:`,T9(n.chatTaskId)]})}):null]}),vre=(e,t)=>{if(!e)return[];let n=new Set;return n.add(`material_input`),e.currentStepCode&&n.add(e.currentStepCode),Object.values(t).forEach(e=>{(e.status===`failed`||e.errorMessage)&&n.add(e.stepCode)}),e.errorMessage&&n.add(e.currentStepCode||`material_input`),Array.from(n)},O9=(e,t=`错误信息`)=>e?(0,Q.jsx)(sf,{type:`error`,showIcon:!0,message:t,description:e,style:{marginTop:12,marginBottom:12}}):null,yre=(e,t=`暂无提词`)=>e?(0,Q.jsx)(Z.Paragraph,{style:{whiteSpace:`pre-wrap`,marginBottom:0},children:e}):(0,Q.jsx)(_re,{text:t}),k9=({moduleType:e=`shot_replicate`})=>{let{projectId:t}=$e(),n=Ye(),[r,i]=(0,S.useState)(null),[a,o]=(0,S.useState)(!1),s=(0,S.useCallback)(async()=>{if(t){o(!0);try{i(e===`hot_opening_replicate`?await y5(t):await w5(t))}catch(e){LG.error(e?.message||`加载复刻项目详情失败`)}finally{o(!1)}}},[e,t]);(0,S.useEffect)(()=>{s()},[s]);let c=(0,S.useMemo)(()=>{let e={};return(r?.steps||[]).forEach(t=>{e[t.stepCode]=t}),e},[r]),l=r?.module||e,u=d9(l),d=(0,S.useMemo)(()=>hre.map(e=>{let t=c[e],n=`wait`;return t?.status===`completed`?n=`finish`:t?.status===`processing`?n=`process`:t?.status===`failed`&&(n=`error`),{title:f9(e),description:t?(0,Q.jsx)(p9,{status:t.status}):`未创建`,status:n}}),[c]),f=(0,S.useMemo)(()=>vre(r,c),[r,c]);if(a&&!r)return(0,Q.jsx)(`div`,{style:{padding:64,textAlign:`center`},children:(0,Q.jsx)(SG,{size:`large`})});if(!r)return(0,Q.jsx)(PR,{style:{margin:24},children:(0,Q.jsx)(pC,{description:`未找到复刻项目详情`})});let p=c.material_input,m=c.image_prompt_optimize,h=c.image_generate,g=c.video_prompt_optimize,_=c.video_generate,v=r.imageGeneration?.resultImageUrl||r.finalImageUrl,y=r.videoGeneration?.resultVideoCoverUrl||r.finalVideoCoverUrl,b=r.videoGeneration?.resultVideoUrl||r.finalVideoUrl,x=[{key:`material_input`,label:(0,Q.jsx)(D9,{index:1,stepCode:`material_input`,step:p,current:r.currentStepCode===`material_input`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`模块类型`,children:(0,Q.jsx)(p9,{status:l})}),(0,Q.jsx)(lV.Item,{label:`素材步骤ID`,children:r.material?.materialStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`参考素材项目名`,children:r.material?.sourceProjectName||`-`}),(0,Q.jsx)(lV.Item,{label:`生成项目名称`,children:r.material?.targetProjectName||`-`}),(0,Q.jsx)(lV.Item,{label:`核心内容点`,span:2,children:r.material?.coreContentPoint||`-`})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(320px, 1fr))`,gap:16},children:[(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J4,{}),`素材视频`]}),children:(0,Q.jsx)(o9,{type:`video`,url:r.material?.materialVideoUrl,emptyDescription:`暂无素材视频`})}),(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(v2,{}),`素材图片`]}),children:(0,Q.jsx)(o9,{type:`image`,url:r.material?.materialImageUrl,emptyDescription:`暂无素材图片`})})]}),O9(p?.errorMessage),(0,Q.jsx)(E9,{step:p})]})},{key:`image_prompt_optimize`,label:(0,Q.jsx)(D9,{index:2,stepCode:`image_prompt_optimize`,step:m,current:r.currentStepCode===`image_prompt_optimize`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`提词步骤ID`,children:r.imageGeneration?.promptStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`步骤状态`,children:(0,Q.jsx)(p9,{status:m?.status||r.imageGeneration?.status})}),(0,Q.jsx)(lV.Item,{label:`图片提示词`,span:2,children:yre(r.imageGeneration?.prompt,`暂无图片提示词`)})]}),O9(m?.errorMessage||r.imageGeneration?.errorMessage),(0,Q.jsx)(E9,{step:m})]})},{key:`image_generate`,label:(0,Q.jsx)(D9,{index:3,stepCode:`image_generate`,step:h,current:r.currentStepCode===`image_generate`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`生成步骤ID`,children:r.imageGeneration?.generateStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`Chat任务ID`,children:r.imageGeneration?.chatTaskId||`-`}),(0,Q.jsx)(lV.Item,{label:`状态`,children:(0,Q.jsx)(p9,{status:r.imageGeneration?.status||h?.status})}),(0,Q.jsx)(lV.Item,{label:`图片引擎ID`,children:r.imageGeneration?.engineId||`-`}),(0,Q.jsx)(lV.Item,{label:`图片引擎名称`,children:r.imageGeneration?.engineName||`-`}),(0,Q.jsx)(lV.Item,{label:`生成参数`,span:3,children:(0,Q.jsx)(a9,{value:r.imageGeneration?.params||{},maxHeight:160})})]}),O9(r.imageGeneration?.errorMessage||h?.errorMessage),(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(v2,{}),`图片结果`]}),children:(0,Q.jsx)(o9,{type:`image`,url:v,height:360,emptyDescription:h?.status===`failed`||r.imageGeneration?.errorMessage?`图片生成失败,未返回图片地址`:`暂无图片结果`,errorDescription:`图片资源加载失败,可能图片文件不存在、签名过期或访问权限受限。`})}),(0,Q.jsx)(E9,{step:h})]})},{key:`video_prompt_optimize`,label:(0,Q.jsx)(D9,{index:4,stepCode:`video_prompt_optimize`,step:g,current:r.currentStepCode===`video_prompt_optimize`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`提词步骤ID`,children:r.videoGeneration?.promptStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`步骤状态`,children:(0,Q.jsx)(p9,{status:g?.status})}),(0,Q.jsx)(lV.Item,{label:`提词参数`,span:3,children:(0,Q.jsx)(a9,{value:r.videoGeneration?.promptParams||{},maxHeight:160})})]}),O9(g?.errorMessage||r.videoGeneration?.errorMessage),(0,Q.jsx)(mre,{schema:r.videoGeneration?.promptSchema,finalPrompt:r.videoGeneration?.finalPrompt,schemaConfigSnapshot:r.videoGeneration?.schemaConfigSnapshot,schemaConfigSource:r.videoGeneration?.schemaConfigSource,schemaConfigVersion:r.videoGeneration?.schemaConfigVersion,schemaConfigIsFallback:r.videoGeneration?.schemaConfigIsFallback}),(0,Q.jsx)(E9,{step:g})]})},{key:`video_generate`,label:(0,Q.jsx)(D9,{index:5,stepCode:`video_generate`,step:_,current:r.currentStepCode===`video_generate`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`生成步骤ID`,children:r.videoGeneration?.generateStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`Chat任务ID`,children:r.videoGeneration?.chatTaskId||`-`}),(0,Q.jsx)(lV.Item,{label:`状态`,children:(0,Q.jsx)(p9,{status:r.videoGeneration?.status||_?.status})}),(0,Q.jsx)(lV.Item,{label:`视频引擎ID`,children:r.videoGeneration?.engineId||`-`}),(0,Q.jsx)(lV.Item,{label:`视频引擎名称`,children:r.videoGeneration?.engineName||`-`}),(0,Q.jsx)(lV.Item,{label:`生成参数`,span:3,children:(0,Q.jsx)(a9,{value:r.videoGeneration?.params||{},maxHeight:160})})]}),O9(r.videoGeneration?.errorMessage||_?.errorMessage),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(320px, 1fr))`,gap:16},children:[(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(v2,{}),`视频封面`]}),children:(0,Q.jsx)(o9,{type:`image`,url:y,emptyDescription:_?.status===`failed`||r.videoGeneration?.errorMessage?`视频生成失败,未返回封面`:`暂无视频封面`,errorDescription:`视频封面加载失败,可能文件不存在、签名过期或访问权限受限。`})}),(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(A6,{}),`最终视频`]}),children:(0,Q.jsx)(o9,{type:`video`,url:b,emptyDescription:_?.status===`failed`||r.videoGeneration?.errorMessage?`视频生成失败,未返回视频地址`:`暂无最终视频`,errorDescription:`视频资源加载失败,可能文件不存在、签名过期或访问权限受限。`})})]}),(0,Q.jsx)(E9,{step:_})]})}];return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{wrap:!0,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(Z1,{}),onClick:()=>n(-1),children:`返回`}),(0,Q.jsxs)(Z.Title,{level:3,style:{margin:0},children:[u,`项目详情`]}),(0,Q.jsx)(p9,{status:r.status}),r.module&&r.module!==e?(0,Q.jsxs)(NQ,{color:`gold`,children:[`接口模块:`,d9(r.module)]}):null]}),(0,Q.jsx)(qE,{onClick:s,loading:a,children:`刷新`})]}),(0,Q.jsx)(PR,{children:(0,Q.jsxs)(lV,{title:`基础信息`,column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`项目ID`,children:r.id}),(0,Q.jsx)(lV.Item,{label:`模块类型`,children:(0,Q.jsx)(p9,{status:l})}),(0,Q.jsx)(lV.Item,{label:`用户ID`,children:r.userId||`-`}),(0,Q.jsx)(lV.Item,{label:`用户名`,children:r.userName||`-`}),(0,Q.jsx)(lV.Item,{label:`标题`,children:r.title||`-`}),(0,Q.jsx)(lV.Item,{label:`当前步骤`,children:(0,Q.jsx)(Ow,{title:r.currentStepCode||``,children:f9(r.currentStepCode)})}),(0,Q.jsx)(lV.Item,{label:`状态`,children:(0,Q.jsx)(p9,{status:r.status})}),(0,Q.jsx)(lV.Item,{label:`创建时间`,children:w9(r.createdAt)}),(0,Q.jsx)(lV.Item,{label:`更新时间`,children:w9(r.updatedAt)}),(0,Q.jsx)(lV.Item,{label:`完成时间`,children:w9(r.completedAt)}),r.errorMessage?(0,Q.jsx)(lV.Item,{label:`错误信息`,span:3,children:(0,Q.jsx)(sf,{type:`error`,showIcon:!0,message:r.errorMessage})}):null]})}),(0,Q.jsx)(PR,{title:`步骤进度`,children:(0,Q.jsx)(Cq,{items:d})}),(0,Q.jsx)(PR,{title:`最终结果预览`,children:(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(280px, 1fr))`,gap:16},children:[(0,Q.jsx)(PR,{size:`small`,title:`最终图片`,children:(0,Q.jsx)(o9,{type:`image`,url:r.finalImageUrl||r.imageGeneration?.resultImageUrl,height:220,emptyDescription:`暂无最终图片`})}),(0,Q.jsx)(PR,{size:`small`,title:`最终视频封面`,children:(0,Q.jsx)(o9,{type:`image`,url:r.finalVideoCoverUrl||r.videoGeneration?.resultVideoCoverUrl,height:220,emptyDescription:`暂无最终视频封面`})}),(0,Q.jsx)(PR,{size:`small`,title:`最终视频`,children:(0,Q.jsx)(o9,{type:`video`,url:r.finalVideoUrl||r.videoGeneration?.resultVideoUrl,height:220,emptyDescription:`暂无最终视频`})})]})}),(0,Q.jsx)(Ng,{defaultActiveKey:f,items:x}),(0,Q.jsx)(Ng,{items:[{key:`steps-table`,label:`完整步骤列表`,children:(0,Q.jsx)(bQ,{rowKey:`id`,size:`small`,pagination:!1,dataSource:r.steps||[],scroll:{x:1100},columns:[{title:`序号`,dataIndex:`stepIndex`,width:70},{title:`步骤`,dataIndex:`stepCode`,width:160,render:e=>(0,Q.jsx)(Ow,{title:e,children:f9(e)})},{title:`状态`,dataIndex:`status`,width:120,render:e=>(0,Q.jsx)(p9,{status:e})},{title:`版本`,dataIndex:`version`,width:70},{title:`当前有效`,dataIndex:`isCurrent`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`success`,children:`是`}):(0,Q.jsx)(NQ,{children:`否`})},{title:`Chat任务`,dataIndex:`chatTaskId`,width:160,render:e=>(0,Q.jsx)(Ow,{title:e||``,children:T9(e)})},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:w9},{title:`完成时间`,dataIndex:`completedAt`,width:170,render:w9},{title:`错误`,dataIndex:`errorMessage`,ellipsis:!0,render:e=>e||`-`}]})},{key:`raw-detail`,label:`完整详情原始 JSON`,children:(0,Q.jsx)(a9,{value:r,maxHeight:520})}]})]})})},bre=()=>(0,Q.jsx)(k9,{moduleType:`hot_opening_replicate`}),A9=20,xre=[{value:`pending_analysis`,label:`等待分析`},{value:`analyzing`,label:`分析中`},{value:`analysis_completed`,label:`分析完成`},{value:`analysis_failed`,label:`分析失败`},{value:`splitting`,label:`拆镜中`},{value:`split_completed`,label:`拆镜完成`},{value:`partial_failed`,label:`部分失败`},{value:`failed`,label:`失败`}],Sre=[{value:`pending`,label:`待分析`},{value:`processing`,label:`分析中`},{value:`completed`,label:`分析完成`},{value:`failed`,label:`分析失败`}],Cre=[{value:`none`,label:`未拆镜`},{value:`pending`,label:`待拆镜`},{value:`processing`,label:`拆镜中`},{value:`completed`,label:`拆镜完成`},{value:`failed`,label:`拆镜失败`},{value:`retry_waiting`,label:`等待重试`}],wre={pending_analysis:{color:`default`,text:`等待分析`},analyzing:{color:`processing`,text:`分析中`},analysis_completed:{color:`success`,text:`分析完成`},analysis_failed:{color:`error`,text:`分析失败`},splitting:{color:`warning`,text:`拆镜中`},split_completed:{color:`success`,text:`拆镜完成`},partial_failed:{color:`orange`,text:`部分失败`},failed:{color:`error`,text:`失败`},none:{color:`default`,text:`未拆镜`},pending:{color:`default`,text:`待处理`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`完成`},retry_waiting:{color:`orange`,text:`等待重试`}},j9=e=>e?Z5(e):`-`,M9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,N9=({status:e})=>{if(!e)return(0,Q.jsx)(NQ,{children:`-`});let t=wre[e]||{color:`blue`,text:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.text})},Tre=()=>{let e=Ye(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(1),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(``),[h,g]=(0,S.useState)(``),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(null),[w,T]=(0,S.useState)(``),[E,D]=(0,S.useState)(``),[O,k]=(0,S.useState)(``),[A,j]=(0,S.useState)(null),[M,N]=(0,S.useState)(0),P=(0,S.useCallback)(async()=>{o(!0);try{let e=await b5({status:l||void 0,analysisStatus:d||void 0,splitStatus:p||void 0,keyword:w||void 0,userId:E||void 0,userName:O||void 0,createdStart:A?.[0]?.toISOString?.(),createdEnd:A?.[1]?.toISOString?.(),page:s,pageSize:A9});n(e.items||[]),i(e.total||0)}catch(e){LG.error(e?.message||`加载拆镜复刻任务失败`)}finally{o(!1)}},[d,s,A,w,E,O,p,l]);(0,S.useEffect)(()=>{P()},[P,M]);let F=()=>{T(h.trim()),D(_.trim()),k(y.trim()),j(x),c(1)};return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsx)(PR,{children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{align:`center`,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:3,style:{marginBottom:4},children:`拆镜复刻`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`只读排查页面:查看拆镜总任务、AI 分析结果、切片列表和关联复刻项目。`})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>N(e=>e+1),children:`刷新`})]}),(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`总任务状态`,style:{width:150},value:l||void 0,onChange:e=>{u(e||``),c(1)},options:xre}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`分析状态`,style:{width:140},value:d||void 0,onChange:e=>{f(e||``),c(1)},options:Sre}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`拆镜状态`,style:{width:140},value:p||void 0,onChange:e=>{m(e||``),c(1)},options:Cre}),(0,Q.jsx)(hW,{allowClear:!0,prefix:(0,Q.jsx)(NC,{}),placeholder:`关键词:标题/内容/分类/受众`,style:{width:260},value:h,onChange:e=>g(e.target.value),onPressEnter:F}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户ID(管理员)`,style:{width:190},value:_,onChange:e=>v(e.target.value),onPressEnter:F}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户名(管理员)`,style:{width:230},value:y,onChange:e=>b(e.target.value),onPressEnter:F}),(0,Q.jsx)(YB.RangePicker,{showTime:!0,value:x,onChange:C,placeholder:[`创建开始`,`创建结束`]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(NC,{}),onClick:F,children:`搜索`}),(0,Q.jsx)(qE,{onClick:()=>{u(``),f(``),m(``),g(``),v(``),b(``),C(null),T(``),D(``),k(``),j(null),c(1),N(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:a,dataSource:t,pagination:{current:s,pageSize:A9,total:r,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:c},scroll:{x:1500},columns:[{title:`任务集ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Ow,{title:e,children:M9(e)})},{title:`用户`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(Z.Text,{children:t.userName||`-`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:M9(t.userId)})]})},{title:`任务信息`,width:300,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:2,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.title||`-`}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:280},children:[`分类:`,t.originalVideoCategory||`-`]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:280},children:[`受众:`,t.originalVideoAudience||`-`]})]})},{title:`总状态`,dataIndex:`status`,width:120,render:e=>(0,Q.jsx)(N9,{status:e})},{title:`分析状态`,dataIndex:`analysisStatus`,width:110,render:e=>(0,Q.jsx)(N9,{status:e})},{title:`拆镜状态`,dataIndex:`splitStatus`,width:110,render:e=>(0,Q.jsx)(N9,{status:e})},{title:`切片进度`,width:180,render:(e,t)=>{let n=t.segmentCount||0,r=t.completedSegmentCount||0;return(0,Q.jsx)(CK,{size:`small`,percent:n?Math.round(r/n*100):0,format:()=>`${r}/${n}`})}},{title:`失败片段`,dataIndex:`failedSegmentCount`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`error`,children:e}):(0,Q.jsx)(NQ,{children:`0`})},{title:`视频时长`,dataIndex:`videoDurationSeconds`,width:100,render:e=>`${Number(e||0).toFixed(1)}s`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:j9},{title:`更新时间`,dataIndex:`updatedAt`,width:170,render:j9},{title:`操作`,fixed:`right`,width:120,render:(t,n)=>(0,Q.jsx)(qE,{type:`link`,icon:(0,Q.jsx)(qU,{}),onClick:()=>e(`/shot-replications/task-sets/${n.id}`),children:`查看切片`})}]})]})})})},Ere=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),P9=20,Dre=[{value:`ai_suggestion`,label:`AI 建议`},{value:`custom`,label:`自定义`}],Ore=[{value:`none`,label:`未拆镜`},{value:`pending`,label:`待拆镜`},{value:`processing`,label:`拆镜中`},{value:`completed`,label:`拆镜完成`},{value:`failed`,label:`拆镜失败`},{value:`retry_waiting`,label:`等待重试`}],kre=[{value:`not_required`,label:`无需分析`},{value:`pending`,label:`待分析`},{value:`processing`,label:`分析中`},{value:`completed`,label:`分析完成`},{value:`failed`,label:`分析失败`}],Are=[{value:`not_started`,label:`未复刻`},{value:`project_created`,label:`已创建项目`},{value:`processing`,label:`复刻中`},{value:`completed`,label:`复刻完成`},{value:`failed`,label:`复刻失败`}],jre={pending_analysis:{color:`default`,text:`等待分析`},analyzing:{color:`processing`,text:`分析中`},analysis_completed:{color:`success`,text:`分析完成`},analysis_failed:{color:`error`,text:`分析失败`},splitting:{color:`warning`,text:`拆镜中`},split_completed:{color:`success`,text:`拆镜完成`},partial_failed:{color:`orange`,text:`部分失败`},failed:{color:`error`,text:`失败`},none:{color:`default`,text:`未拆镜`},pending:{color:`default`,text:`待处理`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`完成`},retry_waiting:{color:`orange`,text:`等待重试`},not_required:{color:`default`,text:`无需分析`},not_started:{color:`default`,text:`未复刻`},project_created:{color:`processing`,text:`已创建项目`}},Mre=e=>{if(!e)return``;let t=String(e).trim();return t?/^(https?:)?\/\//i.test(t)||/^(blob|data):/i.test(t)?t:`${Ere}${t.startsWith(`/`)?t:`/${t}`}`:``},F9=e=>e?Z5(e):`-`,I9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,L9=({status:e})=>{if(!e)return(0,Q.jsx)(NQ,{children:`-`});let t=jre[e]||{color:`blue`,text:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.text})},R9=({value:e,maxHeight:t=420})=>(0,Q.jsx)(`pre`,{style:{margin:0,padding:12,maxHeight:t,overflow:`auto`,background:`#0f172a`,color:`#e2e8f0`,borderRadius:8,fontSize:12,lineHeight:1.6},children:JSON.stringify(e??{},null,2)}),z9=({url:e,height:t=280})=>e?(0,Q.jsx)(`video`,{src:Mre(e),controls:!0,preload:`metadata`,style:{width:`100%`,maxHeight:t,borderRadius:12,background:`#0f172a`}}):(0,Q.jsx)(pC,{description:`暂无视频`,image:pC.PRESENTED_IMAGE_SIMPLE}),Nre=({items:e=[]})=>(0,Q.jsx)(bQ,{rowKey:`index`,size:`small`,pagination:!1,dataSource:e,scroll:{x:!0},columns:[{title:`序号`,dataIndex:`index`,width:70},{title:`时间节点`,dataIndex:`timeNode`,width:120},{title:`开始`,dataIndex:`startSecond`,width:80,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`结束`,dataIndex:`endSecond`,width:80,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`内容`,dataIndex:`content`,ellipsis:!0},{title:`分类`,dataIndex:`category`,width:140},{title:`受众`,dataIndex:`audience`,ellipsis:!0}]}),Pre=()=>{let{taskSetId:e}=$e(),t=Ye(),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(0),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(null),k=(0,S.useCallback)(async()=>{if(e){d(!0);try{r(await x5(e))}catch(e){LG.error(e?.message||`加载拆镜任务详情失败`)}finally{d(!1)}}},[e]),A=(0,S.useCallback)(async()=>{if(e){p(!0);try{let t=await S5(e,{sourceMode:g||void 0,splitStatus:v||void 0,analysisStatus:b||void 0,replicateStatus:C||void 0,page:c,pageSize:P9});a(t.items||[]),s(t.total||0)}catch(e){LG.error(e?.message||`加载拆镜片段失败`)}finally{p(!1)}}},[b,c,C,g,v,e]);(0,S.useEffect)(()=>{k()},[k,m]),(0,S.useEffect)(()=>{A()},[A,m]);let j=async e=>{E(!0),O(null);try{O(await C5(e))}catch(e){LG.error(e?.message||`加载片段详情失败`)}};return u&&!n?(0,Q.jsx)(`div`,{style:{padding:64,textAlign:`center`},children:(0,Q.jsx)(SG,{size:`large`})}):n?(0,Q.jsxs)(`div`,{style:{padding:24},children:[(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(Z1,{}),onClick:()=>t(`/shot-replications`),children:`返回列表`}),(0,Q.jsx)(Z.Title,{level:3,style:{margin:0},children:`拆镜任务详情`}),(0,Q.jsx)(L9,{status:n.status})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>h(e=>e+1),children:`刷新`})]}),(0,Q.jsx)(PR,{children:(0,Q.jsxs)(lV,{title:`总任务信息`,column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`任务集ID`,children:n.id}),(0,Q.jsx)(lV.Item,{label:`用户ID`,children:n.userId||`-`}),(0,Q.jsx)(lV.Item,{label:`用户名`,children:n.userName||`-`}),(0,Q.jsx)(lV.Item,{label:`标题`,children:n.title||`-`}),(0,Q.jsxs)(lV.Item,{label:`视频时长`,children:[Number(n.videoDurationSeconds||0).toFixed(2),`s`]}),(0,Q.jsx)(lV.Item,{label:`总状态`,children:(0,Q.jsx)(L9,{status:n.status})}),(0,Q.jsx)(lV.Item,{label:`分析状态`,children:(0,Q.jsx)(L9,{status:n.analysisStatus})}),(0,Q.jsx)(lV.Item,{label:`拆镜状态`,children:(0,Q.jsx)(L9,{status:n.splitStatus})}),(0,Q.jsxs)(lV.Item,{label:`片段数量`,children:[n.completedSegmentCount,`/`,n.segmentCount,`,失败 `,n.failedSegmentCount]}),(0,Q.jsx)(lV.Item,{label:`原视频分类`,children:n.originalVideoCategory||`-`}),(0,Q.jsx)(lV.Item,{label:`创建时间`,children:F9(n.createdAt)}),(0,Q.jsx)(lV.Item,{label:`更新时间`,children:F9(n.updatedAt)}),(0,Q.jsx)(lV.Item,{label:`原视频内容`,span:3,children:n.originalVideoContent||`-`}),(0,Q.jsx)(lV.Item,{label:`原视频受众`,span:3,children:n.originalVideoAudience||`-`}),n.analysisErrorMessage?(0,Q.jsx)(lV.Item,{label:`分析错误`,span:3,children:(0,Q.jsx)(sf,{type:`error`,message:n.analysisErrorMessage})}):null,n.splitErrorMessage?(0,Q.jsx)(lV.Item,{label:`拆镜错误`,span:3,children:(0,Q.jsx)(sf,{type:`error`,message:n.splitErrorMessage})}):null]})}),(0,Q.jsx)(PR,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(J4,{}),`原视频预览`]}),children:(0,Q.jsx)(z9,{url:n.videoUrl,height:360})}),(0,Q.jsxs)(PR,{title:`AI 建议拆镜列表`,children:[n.aiSuggestions?.length?(0,Q.jsx)(Nre,{items:n.aiSuggestions}):(0,Q.jsx)(pC,{description:`暂无 AI 建议拆镜`}),(0,Q.jsx)(Ng,{size:`small`,ghost:!0,style:{marginTop:12},items:[{key:`raw`,label:`查看原视频分析完整 JSON`,children:(0,Q.jsx)(R9,{value:n.analysisResultJson})}]})]}),(0,Q.jsxs)(PR,{title:`片段列表`,children:[(0,Q.jsxs)(VV,{wrap:!0,style:{marginBottom:16},children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`片段来源`,style:{width:140},value:g||void 0,options:Dre,onChange:e=>{_(e||``),l(1)}}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`切割状态`,style:{width:140},value:v||void 0,options:Ore,onChange:e=>{y(e||``),l(1)}}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`分析状态`,style:{width:140},value:b||void 0,options:kre,onChange:e=>{x(e||``),l(1)}}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`复刻状态`,style:{width:150},value:C||void 0,options:Are,onChange:e=>{w(e||``),l(1)}}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(NC,{}),onClick:()=>h(e=>e+1),children:`筛选`}),(0,Q.jsx)(qE,{onClick:()=>{_(``),y(``),x(``),w(``),l(1),h(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:f,dataSource:i,pagination:{current:c,pageSize:P9,total:o,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:l},scroll:{x:1550},columns:[{title:`片段ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Ow,{title:e,children:I9(e)})},{title:`序号`,dataIndex:`segmentIndex`,width:70},{title:`来源`,dataIndex:`sourceMode`,width:100,render:e=>e===`ai_suggestion`?(0,Q.jsx)(NQ,{color:`purple`,children:`AI建议`}):(0,Q.jsx)(NQ,{color:`cyan`,children:`自定义`})},{title:`时间节点`,dataIndex:`timeNode`,width:130},{title:`时长`,dataIndex:`durationSeconds`,width:90,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`切割`,dataIndex:`splitStatus`,width:100,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`分析`,dataIndex:`analysisStatus`,width:100,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`复刻`,dataIndex:`replicateStatus`,width:110,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`片段内容`,dataIndex:`segmentContent`,width:260,ellipsis:!0,render:e=>e||`-`},{title:`分类`,dataIndex:`segmentCategory`,width:120,render:e=>e||`-`},{title:`关联项目`,width:220,render:(e,n)=>n.moduleProjectId?(0,Q.jsxs)(VV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(qE,{type:`link`,style:{padding:0},onClick:()=>t(`/shot-replications/projects/${n.moduleProjectId}`),children:I9(n.moduleProjectId)}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:n.moduleProjectTitle||f9(n.moduleProjectCurrentStepCode)}),(0,Q.jsx)(L9,{status:n.moduleProjectStatus})]}):(0,Q.jsx)(NQ,{children:`未创建`})},{title:`错误`,dataIndex:`splitLastError`,width:220,ellipsis:!0,render:(e,t)=>e||t.analysisErrorMessage||`-`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:F9},{title:`操作`,fixed:`right`,width:100,render:(e,t)=>(0,Q.jsx)(qE,{type:`link`,icon:(0,Q.jsx)(qU,{}),onClick:()=>j(t.id),children:`详情`})}]})]})]}),(0,Q.jsx)(MV,{title:`片段详情`,width:720,open:T,onClose:()=>E(!1),destroyOnClose:!0,children:D?(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`片段ID`,span:2,children:D.id}),(0,Q.jsx)(lV.Item,{label:`时间节点`,children:D.timeNode}),(0,Q.jsxs)(lV.Item,{label:`时长`,children:[Number(D.durationSeconds||0).toFixed(2),`s`]}),(0,Q.jsx)(lV.Item,{label:`切割状态`,children:(0,Q.jsx)(L9,{status:D.splitStatus})}),(0,Q.jsx)(lV.Item,{label:`分析状态`,children:(0,Q.jsx)(L9,{status:D.analysisStatus})}),(0,Q.jsx)(lV.Item,{label:`复刻状态`,children:(0,Q.jsx)(L9,{status:D.replicateStatus})}),(0,Q.jsx)(lV.Item,{label:`关联项目`,children:D.moduleProjectId?(0,Q.jsx)(qE,{type:`link`,onClick:()=>t(`/shot-replications/projects/${D.moduleProjectId}`),children:D.moduleProjectId}):`-`}),(0,Q.jsx)(lV.Item,{label:`片段内容`,span:2,children:D.segmentContent||`-`}),(0,Q.jsx)(lV.Item,{label:`片段分类`,children:D.segmentCategory||`-`}),(0,Q.jsx)(lV.Item,{label:`片段受众`,children:D.segmentAudience||`-`})]}),(0,Q.jsx)(PR,{size:`small`,title:`片段视频`,children:(0,Q.jsx)(z9,{url:D.segmentVideoUrl,height:300})}),D.splitLastError?(0,Q.jsx)(sf,{type:`error`,message:`切割错误`,description:D.splitLastError}):null,D.analysisErrorMessage?(0,Q.jsx)(sf,{type:`error`,message:`分析错误`,description:D.analysisErrorMessage}):null,(0,Q.jsx)(Ng,{size:`small`,items:[{key:`analysis`,label:`片段分析 JSON`,children:(0,Q.jsx)(R9,{value:D.analysisJson})},{key:`suggestion`,label:`AI 建议原始 JSON`,children:(0,Q.jsx)(R9,{value:D.aiSuggestionJson})}]})]}):(0,Q.jsx)(SG,{})})]}):(0,Q.jsx)(PR,{style:{margin:24},children:(0,Q.jsx)(pC,{description:`未找到拆镜任务详情`})})},{Title:Fre,Text:B9,Paragraph:Ire}=Z,{TextArea:V9}=hW,H9=[{label:`对象`,value:`object`},{label:`数组`,value:`array`},{label:`字符串`,value:`string`},{label:`数字`,value:`number`},{label:`布尔`,value:`boolean`},{label:`流程数组`,value:`flow`}],U9=`画面属性`,Lre=new Set([`视频时长`,`视频比例`,`清晰度`,`帧率`,`推荐分辨率`]);function W9(e,t){return e===U9&&!!t&&Lre.has(t)}function G9(e){return e===U9}function Rre(e){return JSON.parse(JSON.stringify(e??null))}function K9(e,t,n,r){return!e||typeof e!=`object`?r:e[t]===void 0?e[n]===void 0?r:e[n]:e[t]}function zre(e){return{key:String(e?.key||e?.label||`新流程字段`),label:String(e?.label||e?.key||`新流程字段`),enabled:e?.enabled??!0,editable:e?.editable??!0,maxLength:Number(K9(e,`maxLength`,`max_length`,800)||800),value:e?.value??``}}function q9(e){let t=String(e?.type||`string`),n={key:String(e?.key||e?.label||`新字段`),label:String(e?.label||e?.key||`新字段`),type:t,enabled:e?.enabled??!0,editable:e?.editable??!0,maxLength:Number(K9(e,`maxLength`,`max_length`,t===`flow`?800:1e3)||(t===`flow`?800:1e3))};if(t===`object`)n.children=Array.isArray(e?.children)?e.children.map(q9):[];else if(t===`flow`){n.contentKey=String(K9(e,`contentKey`,`content_key`,e?.key===`镜头流程`?`镜头内容`:`动作内容`));let t=K9(e,`contentAliases`,`content_aliases`,[]);n.contentAliases=Array.isArray(t)?t.map(e=>String(e)).filter(Boolean):[];let r=K9(e,`itemFields`,`item_fields`,[]);n.itemFields=Array.isArray(r)&&r.length>0?r.map(zre):[{key:n.contentKey,label:n.contentKey,enabled:!0,editable:!0,maxLength:n.maxLength||800,value:``}]}else n.value=e?.value??(t===`array`?[]:t===`boolean`?!1:t===`number`?0:`无`);return n}function Bre(e){let t=Array.isArray(e?.segments)?e.segments:[],n=Array.isArray(e?.ratios)?e.ratios:[];return{minDuration:Number(K9(e,`minDuration`,`min_duration`,1)||1),maxDuration:Number(K9(e,`maxDuration`,`max_duration`,5)||5),ratios:n.map(e=>Number(e||0)),segments:t.map(e=>({stage:String(e?.stage||`新阶段`),description:String(e?.description||e?.desc||`阶段说明`)}))}}function J9(e){let t=Array.isArray(e?.sections)?e.sections:[],n=Array.isArray(e?.timePlanRules)?e.timePlanRules:Array.isArray(e?.time_plan_rules)?e.time_plan_rules:[];return{version:e?.version||`video_prompt_schema_config_v1`,enabled:e?.enabled??!0,sections:t.map(q9),timePlanRules:n.map(Bre)}}function Y9(e,t){let n=G9(e.key),r=W9(t,e.key),i={key:e.key,label:e.label,type:r?`string`:e.type,enabled:n||r?!0:!!e.enabled,editable:r?!1:!!e.editable,max_length:e.maxLength};return e.type===`object`?i.children=(e.children||[]).map(t=>Y9(t,e.key)):e.type===`flow`?(i.content_key=e.contentKey,i.content_aliases=e.contentAliases||[],i.item_fields=(e.itemFields||[]).map(e=>({key:e.key,label:e.label,enabled:!!e.enabled,editable:!!e.editable,max_length:e.maxLength,value:e.value??``}))):i.value=e.value,i}function X9(e,t){return{version:e.version,enabled:t,sections:(e.sections||[]).map(e=>Y9(e)),time_plan_rules:(e.timePlanRules||[]).map(e=>({min_duration:e.minDuration,max_duration:e.maxDuration,ratios:e.ratios||[],segments:(e.segments||[]).map(e=>({stage:e.stage,description:e.description}))}))}}function Z9(e){return e?.runtimeSchema||e?.runtime_schema||{}}function Q9(e){let t=e?.timePlan||e?.time_plan||Z9(e)?.动态时间规划||[];return Array.isArray(t)?t:[]}function Vre(e){return e?.schemaConfigSnapshot||e?.schema_config_snapshot||{}}function Hre(e,t){let n=new Blob([JSON.stringify(t,null,2)],{type:`application/json;charset=utf-8`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=e,i.click(),URL.revokeObjectURL(r)}var $9=(e=`string`)=>({key:`新字段`,label:`新字段`,type:e,enabled:!0,editable:!0,maxLength:e===`flow`?800:1e3,value:e===`array`?[]:e===`boolean`?!1:e===`number`?0:`无`,children:e===`object`?[]:void 0,contentKey:e===`flow`?`动作内容`:void 0,contentAliases:e===`flow`?[`动作内容`,`动作`,`动作说明`,`内容`,`说明`]:void 0,itemFields:e===`flow`?[{key:`动作内容`,label:`动作内容`,enabled:!0,editable:!0,maxLength:800,value:``}]:void 0}),Ure=()=>({minDuration:1,maxDuration:5,ratios:[.2,.4,.4],segments:[{stage:`开场吸引`,description:`快速吸引注意力`},{stage:`核心展示`,description:`展示主体动作、核心卖点或主要视觉内容`},{stage:`收尾引导`,description:`给出行动引导并稳定落版`}]}),Wre=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!0),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(null),[g]=X.useForm(),_=(0,S.useRef)(null),v=c?.sections||[],y=c?.timePlanRules||[],b=async()=>{t(!0);try{let e=await T5();a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),l(J9(e.data)),d(J9(e.defaultData??e.default_data))}catch(e){LG.error(e?.message||`加载失败`)}finally{t(!1)}};(0,S.useEffect)(()=>{b()},[]);let x=e=>{l(t=>{let n=J9(Rre(t));return e(n),n})},C=async()=>{if(c){r(!0);try{let e=await E5({is_enabled:i,data:X9(c,i)});l(J9(e.data)),a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),LG.success(`保存成功`)}catch(e){LG.error(e?.message||`保存失败`)}finally{r(!1)}}},w=async()=>{r(!0);try{let e=await D5();l(J9(e.data)),d(J9(e.defaultData??e.default_data)),a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),LG.success(`已恢复默认配置`)}catch(e){LG.error(e?.message||`恢复默认失败`)}finally{r(!1)}},T=async()=>{try{Hre(`video_prompt_schema_config.json`,await O5())}catch(e){LG.error(e?.message||`导出失败`)}},E=async e=>{let t=e.target.files?.[0];if(e.target.value=``,t)try{let e=await t.text(),n=JSON.parse(e),r=n.data||n,o=await k5({is_enabled:!!(n.isEnabled??n.is_enabled??i),data:r});l(J9(o.data)),a(!!(o.isEnabled??o.is_enabled??o.data?.enabled??!1)),s(!!(o.usingDefault??o.using_default??!1)),LG.success(`导入成功`)}catch(e){LG.error(e?.message||`导入失败,请检查 JSON 格式`)}},D=()=>{g.setFieldsValue({duration:8,aspectRatio:`9:16`,resolution:`1080p`,frameRate:`30fps`}),h(null),p(!0)},O=async()=>{if(!c)return;let e=await g.validateFields();try{h(await A5({is_enabled:i,data:X9(c,i),duration:Number(e.duration||8),aspect_ratio:e.aspectRatio,resolution:e.resolution,frame_rate:e.frameRate}))}catch(e){LG.error(e?.message||`预览失败`)}},k=()=>{x(e=>{e.sections.push($9(`object`))})},A=(e,t)=>{x(n=>{let r=n.sections[e];G9(r?.key)&&(delete t.key,delete t.type,delete t.enabled),n.sections[e]={...n.sections[e],...t},t.type===`object`&&(n.sections[e].children=n.sections[e].children||[]),t.type===`flow`&&(n.sections[e].contentKey=n.sections[e].contentKey||`动作内容`,n.sections[e].contentAliases=n.sections[e].contentAliases||[`动作内容`,`动作`,`动作说明`,`内容`,`说明`],n.sections[e].itemFields=n.sections[e].itemFields||[{key:`动作内容`,label:`动作内容`,enabled:!0,editable:!0,maxLength:800,value:``}])})},j=e=>{x(t=>{t.sections.splice(e,1)})},M=e=>{x(t=>{let n=t.sections[e];n.children=n.children||[],n.children.push($9(`string`))})},N=(e,t,n)=>{x(r=>{let i=r.sections[e],a=i.children||[],o=a[t];W9(i?.key,o?.key)&&(delete n.key,delete n.type,delete n.enabled,n.editable=!1),a[t]={...a[t],...n},r.sections[e].children=a})},P=(e,t)=>{x(n=>{n.sections[e].children?.splice(t,1)})},F=e=>{x(t=>{let n=t.sections[e];n.itemFields=n.itemFields||[],n.itemFields.push({key:`新流程字段`,label:`新流程字段`,enabled:!0,editable:!0,maxLength:800,value:``})})},I=(e,t,n)=>{x(r=>{let i=r.sections[e].itemFields||[];i[t]={...i[t],...n},r.sections[e].itemFields=i})},L=(e,t)=>{x(n=>{n.sections[e].itemFields?.splice(t,1)})},R=()=>{x(e=>{e.timePlanRules.push(Ure())})},z=(e,t)=>{x(n=>{n.timePlanRules[e]={...n.timePlanRules[e],...t}})},B=e=>{x(t=>{t.timePlanRules.splice(e,1)})},V=(e,t,n)=>{x(r=>{let i=r.timePlanRules[e];n.ratio!==void 0&&(i.ratios[t]=Number(n.ratio||0)),n.stage!==void 0&&(i.segments[t].stage=n.stage),n.description!==void 0&&(i.segments[t].description=n.description)})},H=e=>{x(t=>{let n=t.timePlanRules[e];n.ratios.push(1),n.segments.push({stage:`新阶段`,description:`阶段说明`})})},U=(e,t)=>{x(n=>{let r=n.timePlanRules[e];r.ratios.splice(t,1),r.segments.splice(t,1)})},W=(0,S.useMemo)(()=>v.map((e,t)=>({key:`section-${t}`,label:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(B9,{strong:!0,children:e.label||e.key||`未命名分组`}),e.key&&e.key!==e.label&&(0,Q.jsxs)(NQ,{color:`blue`,children:[`key: `,e.key]}),(0,Q.jsx)(NQ,{children:e.type}),G9(e.key)&&(0,Q.jsx)(NQ,{color:`red`,children:`系统锁定`}),!e.enabled&&!G9(e.key)&&(0,Q.jsx)(NQ,{color:`default`,children:`已禁用`})]}),children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsxs)(DK,{gutter:12,align:`middle`,children:[(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`key`,value:e.key,maxLength:64,placeholder:`传给 AI 的字段名`,disabled:G9(e.key),onChange:e=>A(t,{key:e.target.value})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`label`,value:e.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>A(t,{label:e.target.value})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(RC,{value:e.type,options:H9,style:{width:`100%`},disabled:G9(e.key),onChange:e=>A(t,{type:e})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`启用`,(0,Q.jsx)(Mq,{checked:G9(e.key)?!0:e.enabled,disabled:G9(e.key),onChange:e=>A(t,{enabled:e})})]})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`可编辑`,(0,Q.jsx)(Mq,{checked:e.editable,onChange:e=>A(t,{editable:e})})]})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,max:2e4,value:e.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>A(t,{maxLength:Number(e||1e3)})})}),(0,Q.jsx)(pz,{span:2,style:{textAlign:`right`},children:(0,Q.jsx)(WG,{title:`确认删除该分组?`,disabled:G9(e.key),onConfirm:()=>j(t),children:(0,Q.jsx)(qE,{danger:!0,icon:(0,Q.jsx)(IQ,{}),disabled:G9(e.key)})})})]}),e.type===`object`&&(0,Q.jsx)(PR,{size:`small`,title:`对象字段`,extra:(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(TL,{}),onClick:()=>M(t),children:`新增字段`}),children:(0,Q.jsx)(VV,{direction:`vertical`,style:{width:`100%`},children:(e.children||[]).map((n,r)=>(0,Q.jsxs)(DK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`key`,value:n.key,maxLength:64,placeholder:`传给 AI 的字段名`,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{key:e.target.value})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`label`,value:n.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>N(t,r,{label:e.target.value})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(RC,{value:n.type,options:H9.filter(e=>e.value!==`object`&&e.value!==`flow`),style:{width:`100%`},disabled:W9(e.key,n.key),onChange:e=>N(t,r,{type:e})})}),(0,Q.jsx)(pz,{span:2,children:(0,Q.jsxs)(VV,{children:[`启用`,(0,Q.jsx)(Mq,{checked:W9(e.key,n.key)?!0:n.enabled,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{enabled:e})})]})}),(0,Q.jsx)(pz,{span:2,children:(0,Q.jsxs)(VV,{children:[`编辑`,(0,Q.jsx)(Mq,{checked:W9(e.key,n.key)?!1:n.editable,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{editable:e})})]})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(oB,{min:1,max:2e4,value:n.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>N(t,r,{maxLength:Number(e||1e3)})})}),(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{value:Array.isArray(n.value)?n.value.join(`/`):String(n.value??``),maxLength:n.maxLength||1e3,placeholder:`默认值`,onChange:e=>N(t,r,{value:n.type===`array`?e.target.value.split(`/`).filter(Boolean):e.target.value})})}),(0,Q.jsx)(pz,{span:1,style:{textAlign:`right`},children:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),disabled:W9(e.key,n.key),onClick:()=>P(t,r)})})]},`child-${t}-${r}`))})}),e.type===`flow`&&(0,Q.jsxs)(PR,{size:`small`,title:`流程数组对象字段`,extra:(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(TL,{}),onClick:()=>F(t),children:`新增流程字段`}),children:[(0,Q.jsxs)(DK,{gutter:12,style:{marginBottom:12},children:[(0,Q.jsx)(pz,{span:6,children:(0,Q.jsx)(hW,{addonBefore:`内容字段`,value:e.contentKey,maxLength:64,onChange:e=>A(t,{contentKey:e.target.value})})}),(0,Q.jsx)(pz,{span:18,children:(0,Q.jsx)(hW,{addonBefore:`别名 / 分隔`,value:(e.contentAliases||[]).join(`/`),onChange:e=>A(t,{contentAliases:e.target.value.split(`/`).map(e=>e.trim()).filter(Boolean)})})})]}),(0,Q.jsx)(VV,{direction:`vertical`,style:{width:`100%`},children:(e.itemFields||[]).map((e,n)=>(0,Q.jsxs)(DK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{addonBefore:`key`,value:e.key,maxLength:64,placeholder:`流程对象字段名`,onChange:e=>I(t,n,{key:e.target.value})})}),(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{addonBefore:`label`,value:e.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>I(t,n,{label:e.target.value})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`启用`,(0,Q.jsx)(Mq,{checked:e.enabled,onChange:e=>I(t,n,{enabled:e})})]})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`编辑`,(0,Q.jsx)(Mq,{checked:e.editable,onChange:e=>I(t,n,{editable:e})})]})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,max:2e4,value:e.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>I(t,n,{maxLength:Number(e||800)})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(hW,{value:String(e.value??``),maxLength:e.maxLength||800,placeholder:`默认值`,onChange:e=>I(t,n,{value:e.target.value})})}),(0,Q.jsx)(pz,{span:1,style:{textAlign:`right`},children:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),onClick:()=>L(t,n)})})]},`flow-${t}-${n}`))})]}),e.type!==`object`&&e.type!==`flow`&&(0,Q.jsx)(PR,{size:`small`,title:`默认值`,children:(0,Q.jsx)(V9,{rows:3,value:Array.isArray(e.value)?e.value.join(` +你是一位专业的电商图片文案专家,擅长将产品卖点转化为图片生成提示词`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{marginBottom:8},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:`行业选项配置`}),(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`添加选项组,每组包含名称和多个选项,前台将显示为下拉选择`})]}),(0,Q.jsx)(X.List,{name:`optionGroups`,children:(e,{add:t,remove:n})=>(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8,marginBottom:16},children:[e.map(({key:e,name:t,...r})=>(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`flex-start`,padding:`10px 12px`,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,gap:8},children:[(0,Q.jsx)(X.Item,{...r,name:[t,`name`],label:`选项名称`,style:{marginBottom:0},rules:[{required:!0,message:`请输入选项名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:视频风格`,size:`middle`,style:{borderRadius:8}})}),(0,Q.jsx)(X.Item,{...r,name:[t,`options`],label:`选项内容`,style:{marginBottom:0},children:(0,Q.jsx)(RC,{mode:`tags`,size:`middle`,placeholder:`输入选项后回车添加`,style:{borderRadius:8},tokenSeparators:[`,`,`,`,`、`]})})]}),(0,Q.jsx)(k4,{onClick:()=>n(t),style:{color:`#ef4444`,fontSize:16,marginTop:34,cursor:`pointer`,flexShrink:0}})]},e)),(0,Q.jsx)(qE,{type:`dashed`,onClick:()=>t(),block:!0,icon:(0,Q.jsx)(TL,{}),style:{borderRadius:8,height:36},children:`添加选项组`})]})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`is_active`,label:`启用状态`,valuePropName:`checked`,initialValue:!0,style:{flex:1},children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{name:`sort_order`,label:`排序`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(hW,{type:`number`,size:`large`})})]})]})})]})};function x7(e){if(Array.isArray(e))return e;if(typeof e==`string`)try{return JSON.parse(e)}catch{return[]}return[]}var Dne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,engine:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await O8()).map(e=>({...e,supportedRatios:x7(e.supportedRatios),supportedResolutions:x7(e.supportedResolutions),supportedDurations:x7(e.supportedDurations)})))}catch{LG.error(`加载视频引擎失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={name:e.name,provider:e.provider,api_base:e.apiBase,api_key:e.apiKey,model_name:e.modelName,supported_ratios:JSON.stringify(e.supportedRatios||[]),supported_resolutions:JSON.stringify(e.supportedResolutions||[]),supported_durations:JSON.stringify(e.supportedDurations||[]),is_active:e.isActive??!0,priority:e.priority??0};i.engine?(await k8({id:i.engine.id,...t}),LG.success(`已更新`)):(await k8(t),LG.success(`已添加`)),a({open:!1,engine:null}),o.resetFields(),s()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},l=async e=>{try{await A8(e),LG.success(`已删除`),s()}catch{LG.error(`删除失败`)}},u=e=>{a({open:!0,engine:e||null}),e?o.setFieldsValue(e):(o.resetFields(),o.setFieldsValue({isActive:!0,priority:0,supportedRatios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],supportedResolutions:[`480p`,`720p`,`1080p`],supportedDurations:[4,5,6,7,8,9,10,11,12,13,14,15]}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(X4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`视频引擎配置`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 个引擎`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加引擎`})]}),(0,Q.jsx)(bQ,{columns:[{title:`引擎名称`,key:`name`,width:180,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsx)(`div`,{style:{width:36,height:36,borderRadius:8,background:t.isActive?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`linear-gradient(135deg, #94a3b8, #cbd5e1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:16},children:(0,Q.jsx)(X4,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.provider})]})]})},{title:`支持比例`,dataIndex:`supportedRatios`,width:200,render:e=>(0,Q.jsx)(VV,{size:2,wrap:!0,children:e.map(e=>(0,Q.jsx)(NQ,{children:e},e))})},{title:`支持分辨率`,dataIndex:`supportedResolutions`,width:150,render:e=>(0,Q.jsx)(VV,{size:2,wrap:!0,children:e.map(e=>(0,Q.jsx)(NQ,{color:`blue`,children:e},e))})},{title:`支持时长`,dataIndex:`supportedDurations`,width:120,render:e=>(0,Q.jsx)(NQ,{color:`orange`,children:e?.length?`${Math.min(...e)}-${Math.max(...e)}s`:`-`})},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(X4,{}),i.engine?`编辑引擎`:`添加引擎`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,engine:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:620,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`引擎名称`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`Seedance 2.0`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`provider`,label:`提供商`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`ark`,label:`火山引擎 (Ark)`}]})})]}),(0,Q.jsx)(X.Item,{name:`apiBase`,label:`API基础地址`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`apiKey`,label:`API Key`,children:(0,Q.jsx)(hW.Password,{placeholder:`sk-****`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`modelName`,label:`模型名称`,children:(0,Q.jsx)(hW,{placeholder:`doubao-seedance-2-0-260128`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`supportedRatios`,label:`支持比例`,children:(0,Q.jsx)(RC,{mode:`multiple`,size:`large`,options:[{value:`16:9`,label:`16:9 (横屏)`},{value:`4:3`,label:`4:3 (标准)`},{value:`1:1`,label:`1:1 (方形)`},{value:`3:4`,label:`3:4 (竖版)`},{value:`9:16`,label:`9:16 (竖屏)`},{value:`21:9`,label:`21:9 (超宽)`}]})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`supportedResolutions`,label:`支持分辨率`,style:{flex:1},children:(0,Q.jsx)(RC,{mode:`multiple`,size:`large`,options:[{value:`480p`},{value:`720p`},{value:`1080p`}]})}),(0,Q.jsx)(X.Item,{name:`supportedDurations`,label:`支持时长(秒)`,style:{flex:1},children:(0,Q.jsx)(RC,{mode:`multiple`,size:`large`,options:Array.from({length:12},(e,t)=>({value:t+4,label:`${t+4}秒`}))})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`priority`,label:`优先级`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:0,label:`0 (默认)`},{value:1,label:`1`},{value:2,label:`2`},{value:3,label:`3`},{value:5,label:`5`},{value:10,label:`10 (最高)`}]})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,style:{paddingTop:30},children:(0,Q.jsx)(Mq,{})})]})]})})]})};function One(e){if(Array.isArray(e))return e;if(typeof e==`string`)try{return JSON.parse(e)}catch{return[]}return[]}function kne(e){if(e&&typeof e==`object`&&!Array.isArray(e))return e;if(typeof e==`string`)try{let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:{}}catch{return{}}return{}}var S7={"2K":{"1:1":`2048×2048`,"4:3":`2304×1728`,"3:4":`1728×2304`,"16:9":`2560×1440`,"9:16":`1600×2848`,"3:2":`2496×1664`,"2:3":`1664×2496`,"21:9":`3024×1296`},"4K":{"1:1":`4096×4096`,"4:3":`4608×3456`,"3:4":`3520×4704`,"16:9":`5404×3040`,"9:16":`3040×5504`,"3:2":`4992×3328`,"2:3":`3328×4992`,"21:9":`6197×2656`}},C7=[`1:1`,`4:3`,`3:4`,`16:9`,`9:16`,`3:2`,`2:3`,`21:9`],Ane=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,engine:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await j8()).map(e=>({...e,supportedModels:One(e.supportedModels),supportedSizes:kne(e.supportedSizes)})))}catch{LG.error(`加载图片引擎失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={};for(let n of[`2K`,`4K`]){let r=e[`size_${n}`]||[];if(r.length>0){t[n]={};for(let e of r)t[n][e]=S7[n]?.[e]||e}}let n={name:e.name,provider:e.provider,api_base:e.apiBase,api_key:e.apiKey,model_name:e.modelName,supported_models:JSON.stringify(e.supportedModels||[]),supported_sizes:JSON.stringify(t),default_size:e.defaultSize||`2K`,generate_url:e.generateUrl||``,is_active:e.isActive??!0,priority:e.priority??0};i.engine?(await M8({id:i.engine.id,...n}),LG.success(`已更新`)):(await M8(n),LG.success(`已添加`)),a({open:!1,engine:null}),o.resetFields(),s()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},l=async e=>{try{await N8(e),LG.success(`已删除`),s()}catch{LG.error(`删除失败`)}},u=e=>{if(a({open:!0,engine:e||null}),e){let t={};for(let n of[`2K`,`4K`])t[`size_${n}`]=Object.keys(e.supportedSizes?.[n]||{});o.setFieldsValue({...e,...t})}else o.resetFields(),o.setFieldsValue({isActive:!0,priority:0,supportedModels:[`doubao-seedream-5-0-260128`],defaultSize:`2K`,size_2K:C7,size_4K:C7})};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(W4,{style:{fontSize:18,color:`#10b981`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`图片引擎配置`}),(0,Q.jsxs)(NQ,{color:`green`,children:[e.length,` 个引擎`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加引擎`})]}),(0,Q.jsx)(bQ,{columns:[{title:`引擎名称`,key:`name`,width:180,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsx)(`div`,{style:{width:36,height:36,borderRadius:8,background:t.isActive?`linear-gradient(135deg, #10b981, #059669)`:`linear-gradient(135deg, #94a3b8, #cbd5e1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:16},children:(0,Q.jsx)(W4,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.modelName})]})]})},{title:`2K 支持比例`,key:`sizes_2k`,width:260,render:(e,t)=>{let n=Object.keys(t.supportedSizes?.[`2K`]||{});return n.length===0?(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`}):(0,Q.jsx)(VV,{size:2,wrap:!0,children:n.map(e=>(0,Q.jsxs)(NQ,{color:`blue`,children:[e,` `,t.supportedSizes[`2K`][e]]},e))})}},{title:`4K 支持比例`,key:`sizes_4k`,width:260,render:(e,t)=>{let n=Object.keys(t.supportedSizes?.[`4K`]||{});return n.length===0?(0,Q.jsx)(`span`,{style:{color:`#bfbfbf`},children:`-`}):(0,Q.jsx)(VV,{size:2,wrap:!0,children:n.map(e=>(0,Q.jsxs)(NQ,{color:`purple`,children:[e,` `,t.supportedSizes[`4K`][e]]},e))})}},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:1e3}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(W4,{}),i.engine?`编辑引擎`:`添加引擎`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,engine:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:680,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`引擎名称`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`豆包文生图`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`provider`,label:`提供商`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`ark`,label:`火山引擎 (Ark)`}]})})]}),(0,Q.jsx)(X.Item,{name:`apiBase`,label:`API基础地址`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`apiKey`,label:`API Key`,children:(0,Q.jsx)(hW.Password,{placeholder:`sk-****`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`modelName`,label:`默认模型`,children:(0,Q.jsx)(hW,{placeholder:`doubao-seedream-5-0-260128`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`supportedModels`,label:`支持模型列表`,children:(0,Q.jsx)(RC,{mode:`tags`,size:`large`,placeholder:`输入模型ID后回车添加`,tokenSeparators:[`,`,`,`],options:[{value:`doubao-seedream-5-0-260128`}]})}),(0,Q.jsxs)(`div`,{style:{background:`#f8f9fc`,borderRadius:10,padding:16,marginBottom:8},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`尺寸配置`}),(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`勾选每个档位支持的比例,前台选择后传对应像素值给SDK`})]}),[`2K`,`4K`].map(e=>(0,Q.jsxs)(`div`,{style:{background:`#fafbfc`,borderRadius:10,padding:`12px 16px`,marginBottom:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13,color:e===`2K`?`#3b82f6`:`#8b5cf6`},children:e}),(0,Q.jsx)(X.Item,{name:`size_${e}`,style:{marginTop:8,marginBottom:0},children:(0,Q.jsx)(oz.Group,{style:{width:`100%`},children:(0,Q.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, 1fr)`,gap:`6px 0`},children:C7.map(t=>(0,Q.jsxs)(oz,{value:t,style:{fontSize:12},children:[t,` `,(0,Q.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:11},children:S7[e]?.[t]})]},t))})})})]},e)),(0,Q.jsx)(X.Item,{name:`defaultSize`,label:`默认尺寸档位`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`2K`,label:`2K`},{value:`4K`,label:`4K`}]})}),(0,Q.jsx)(X.Item,{name:`generateUrl`,label:`生成接口地址`,children:(0,Q.jsx)(hW,{placeholder:`https://ark.cn-beijing.volces.com/api/v3/images/generations`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`priority`,label:`优先级`,children:(0,Q.jsx)(RC,{size:`large`,options:[{value:0,label:`0 (默认)`},{value:1,label:`1`},{value:2,label:`2`},{value:3,label:`3`},{value:5,label:`5`},{value:10,label:`10 (最高)`}]})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,style:{paddingTop:30},children:(0,Q.jsx)(Mq,{})})]})]})})]})},jne=[`2K`,`4K`],Mne=[`480p`,`720p`,`1080p`],Nne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)({open:!1,ratio:null}),[c]=X.useForm(),[l,u]=(0,S.useState)(10),[d,f]=(0,S.useState)(null),[p,m]=(0,S.useState)(!1),h=X.useWatch(`genType`,c)||`video`,g=X.useWatch(`modelConfigId`,c),_=async()=>{a(!0);try{let[e,n,i]=await Promise.all([P8(),y8(),_5()]),a=(i?.engine?.image||[]).map(e=>({...e,genType:`image`})),o=(i?.engine?.video||[]).map(e=>({...e,genType:`video`}));t(e),r([...o,...a]);let s=n.find(e=>e.key===`text_credits_per_1000_tokens`);s&&(u(Number(s.value)||10),f({id:s.id}))}catch{LG.error(`加载积分比例失败`)}finally{a(!1)}};(0,S.useEffect)(()=>{_()},[]);let v=(0,S.useMemo)(()=>n.filter(e=>e.genType===h).map(e=>({value:e.id,label:`${e.name}${e.modelName?`(${e.modelName})`:``}`})),[n,h]),y=(0,S.useMemo)(()=>n.find(e=>e.id===g&&e.genType===h),[n,h,g]),b=(0,S.useMemo)(()=>{if(h===`image`){let e=y?.supportedSizes?Object.keys(y.supportedSizes):[];return(e.length?e:jne).map(e=>({value:e,label:e}))}let e=y?.supportedResolutions||[];return(e.length?e:Mne).map(e=>({value:e,label:e}))},[h,y]),x=(e,t)=>n.find(n=>n.id===e&&(!t||n.genType===t))?.name||e,C=async()=>{try{let e=await c.validateFields(),t={model_config_id:e.modelConfigId,gen_type:e.genType,resolution:e.resolution,ratio:e.ratio,base_credits:e.baseCredits,per_second_credits:e.genType===`image`?0:e.perSecondCredits||0};o.ratio?(await F8({id:o.ratio.id,...t}),LG.success(`已更新`)):(await F8(t),LG.success(`已添加`)),s({open:!1,ratio:null}),c.resetFields(),_()}catch(e){if(e?.errorFields)return;LG.error(e?.message||`保存失败`)}},w=async e=>{try{await I8(e),LG.success(`已删除`),_()}catch{LG.error(`删除失败`)}},T=async()=>{if(d){m(!0);try{await b8(d.id,String(l)),LG.success(`文字积分费率已更新`)}catch(e){LG.error(e?.message||`保存失败`)}finally{m(!1)}}},E=e=>{s({open:!0,ratio:e||null}),e?c.setFieldsValue({modelConfigId:e.modelConfigId,genType:e.genType===`image`?`image`:`video`,resolution:e.resolution,ratio:e.ratio,baseCredits:e.baseCredits,perSecondCredits:e.perSecondCredits}):(c.resetFields(),c.setFieldsValue({genType:`video`,ratio:1,baseCredits:60,perSecondCredits:2}))};return(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16},children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(M2,{style:{fontSize:18,color:`#f59e0b`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`文字积分费率`})]}),(0,Q.jsx)(qE,{type:`primary`,loading:p,onClick:T,style:{borderRadius:8},children:`保存`})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{display:`block`,marginBottom:16,fontSize:13},children:`文字积分计算公式:ceil(总token数 x 费率 / 1000),最低1积分`}),(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,Q.jsx)(Z.Text,{children:`每1000 token消耗积分:`}),(0,Q.jsxs)(VV.Compact,{style:{width:160},children:[(0,Q.jsx)(oB,{min:0,max:1e3,step:.01,value:l,onChange:e=>u(e||0),size:`large`,style:{width:`100%`}}),(0,Q.jsx)(Z.Text,{children:`积分`})]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,style:{fontSize:12},children:[`示例:1000 token = `,l,` 积分,500 token = `,(500*l/1e3).toFixed(4),` 积分`]})]})]}),(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(C0,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`积分比例配置`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 条规则`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>E(),style:{borderRadius:8},children:`添加比例`})]}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{display:`block`,marginBottom:16,fontSize:13},children:`视频积分公式:(基础积分 + 每秒积分 x 视频时长) x 模型倍率;图片积分公式:基础积分 x 模型倍率`}),(0,Q.jsx)(bQ,{columns:[{title:`类型`,dataIndex:`genType`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e===`image`?`cyan`:`orange`,children:e===`image`?`图片`:`视频`})},{title:`引擎`,dataIndex:`modelConfigId`,width:180,render:(e,t)=>(0,Q.jsx)(NQ,{color:t.genType===`image`?`cyan`:`purple`,children:x(e,t.genType)})},{title:`分辨率/尺寸`,dataIndex:`resolution`,width:110,render:e=>(0,Q.jsx)(NQ,{color:{"480p":`blue`,"720p":`blue`,"1080p":`blue`,"4K":`green`,"2K":`green`}[e]||`default`,children:e})},{title:`倍率`,dataIndex:`ratio`,width:100,sorter:(e,t)=>e.ratio-t.ratio,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:e>=2?`#ef4444`:e>=1.5?`#f59e0b`:`#10b981`},children:[`x`,e]})},{title:`基础积分`,dataIndex:`baseCredits`,width:100,render:e=>(0,Q.jsxs)(Z.Text,{children:[e,` 积分`]})},{title:`每秒积分`,dataIndex:`perSecondCredits`,width:100,render:(e,t)=>(0,Q.jsx)(Z.Text,{children:t.genType===`image`?`-`:`${e} 积分/秒`})},{title:`示例计算`,key:`example`,width:120,render:(e,t)=>{let n;return n=t.genType===`image`?Math.round(t.baseCredits*t.ratio):Math.round((t.baseCredits+t.perSecondCredits*15)*t.ratio),(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:[n,` 积分`]})}},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>E(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>w(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:!1,scroll:{x:860}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(C0,{}),o.ratio?`编辑比例`:`添加比例`]}),open:o.open,onOk:C,onCancel:()=>{s({open:!1,ratio:null}),c.resetFields()},okText:`保存`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`genType`,label:`生成类型`,rules:[{required:!0,message:`请选择生成类型`}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`video`,label:`视频`},{value:`image`,label:`图片`}],onChange:()=>{c.setFieldsValue({modelConfigId:void 0,resolution:void 0})}})}),(0,Q.jsx)(X.Item,{name:`modelConfigId`,label:`引擎`,rules:[{required:!0,message:`请选择引擎`}],children:(0,Q.jsx)(RC,{size:`large`,placeholder:`请选择引擎`,options:v,showSearch:!0,optionFilterProp:`label`,onChange:()=>c.setFieldsValue({resolution:void 0})})}),(0,Q.jsx)(X.Item,{name:`resolution`,label:h===`image`?`图片尺寸`:`分辨率`,rules:[{required:!0,message:h===`image`?`请选择图片尺寸`:`请选择分辨率`}],children:(0,Q.jsx)(RC,{size:`large`,placeholder:h===`image`?`请选择图片尺寸`:`请选择分辨率`,options:b})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`ratio`,label:`倍率`,style:{flex:1},rules:[{required:!0,message:`请输入倍率`}],children:(0,Q.jsx)(oB,{min:.1,max:10,step:.1,style:{width:`100%`},size:`large`})}),(0,Q.jsx)(X.Item,{name:`baseCredits`,label:`基础积分`,style:{flex:1},rules:[{required:!0,message:`请输入基础积分`}],children:(0,Q.jsx)(oB,{min:0,max:1e3,style:{width:`100%`},size:`large`})}),h!==`image`&&(0,Q.jsx)(X.Item,{name:`perSecondCredits`,label:`每秒积分`,style:{flex:1},rules:[{required:!0,message:`请输入每秒积分`}],children:(0,Q.jsx)(oB,{min:0,max:100,style:{width:`100%`},size:`large`})})]})]})})]})},w7={HomeOutlined:(0,Q.jsx)(X2,{}),PlayCircleOutlined:(0,Q.jsx)(X4,{}),WalletOutlined:(0,Q.jsx)(F6,{}),RobotOutlined:(0,Q.jsx)(c3,{}),SettingOutlined:(0,Q.jsx)(k3,{}),BellOutlined:(0,Q.jsx)(d0,{}),UserOutlined:(0,Q.jsx)(k6,{}),AppstoreOutlined:(0,Q.jsx)(W1,{}),FileTextOutlined:(0,Q.jsx)(KV,{}),StarOutlined:(0,Q.jsx)($3,{}),HeartOutlined:(0,Q.jsx)(V2,{}),CameraOutlined:(0,Q.jsx)(E0,{}),DashboardOutlined:(0,Q.jsx)(n2,{}),CalculatorOutlined:(0,Q.jsx)(C0,{}),DollarOutlined:(0,Q.jsx)(c2,{}),GiftOutlined:(0,Q.jsx)(F2,{}),ThunderboltOutlined:(0,Q.jsx)(d6,{}),FireOutlined:(0,Q.jsx)(E2,{}),CloudOutlined:(0,Q.jsx)(R0,{}),SmileOutlined:(0,Q.jsx)(W3,{}),TrophyOutlined:(0,Q.jsx)(_6,{}),RocketOutlined:(0,Q.jsx)(d3,{}),BulbOutlined:(0,Q.jsx)(b0,{}),CodeOutlined:(0,Q.jsx)(W0,{}),PictureOutlined:(0,Q.jsx)(W4,{}),VideoCameraOutlined:(0,Q.jsx)(M6,{}),AudioOutlined:(0,Q.jsx)(n0,{}),MailOutlined:(0,Q.jsx)(_4,{}),PhoneOutlined:(0,Q.jsx)(V4,{}),GlobalOutlined:(0,Q.jsx)(R2,{}),ShoppingCartOutlined:(0,Q.jsx)(M3,{}),TeamOutlined:(0,Q.jsx)(c6,{}),BarChartOutlined:(0,Q.jsx)(c0,{}),PieChartOutlined:(0,Q.jsx)(q4,{}),LineChartOutlined:(0,Q.jsx)(a4,{}),SecurityScanOutlined:(0,Q.jsx)(C3,{}),ApiOutlined:(0,Q.jsx)(V1,{}),DatabaseOutlined:(0,Q.jsx)(a2,{}),CloudServerOutlined:(0,Q.jsx)(V0,{}),MenuOutlined:(0,Q.jsx)(C4,{})},Pne=Object.keys(w7).map(e=>({value:e,label:(0,Q.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[w7[e],` `,e.replace(`Outlined`,``)]})})),Fne={page:`blue`,group:`purple`},T7={page:`页面`,group:`分组`},Ine=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)(`frontend`),[o,s]=(0,S.useState)({open:!1,menu:null}),[c]=X.useForm(),l=async()=>{r(!0);try{t(await K8())}catch{}r(!1)};(0,S.useEffect)(()=>{l()},[]);let u=async()=>{try{let e=await c.validateFields(),t={label:e.label,path:e.path||``,icon:e.icon||``,sort_order:e.sortOrder??0,is_active:e.isActive??!0,parent_id:e.parentId||null,menu_type:e.menuType||`page`,menu_target:e.menuTarget||`frontend`,is_default:e.isDefault??!1};o.menu?.id?await q8({...t,id:o.menu.id}):await q8(t),LG.success(o.menu?.id?`菜单已更新`:`菜单已添加`),s({open:!1,menu:null}),c.resetFields(),l()}catch{}},d=async e=>{try{await J8(e),LG.success(`菜单已删除`),l()}catch(e){LG.error(e?.message||`删除失败`)}},f=t=>{s({open:!0,menu:t||null}),t?c.setFieldsValue({label:t.label,path:t.path,icon:t.icon,sortOrder:t.sortOrder??0,isActive:t.isActive??!0,parentId:t.parentId??``,menuType:t.menuType??`page`,menuTarget:t.menuTarget??`frontend`,isDefault:t.isDefault??!1}):(c.resetFields(),c.setFieldsValue({icon:`HomeOutlined`,sortOrder:e.length,isActive:!0,menuType:`page`,menuTarget:i,isDefault:!1}))},p=e.filter(e=>{let t=e.menuTarget??`frontend`;return t===i||t===`both`}),m=[{value:``,label:`顶级菜单`},...p.filter(e=>e.menuType===`group`).map(e=>({value:e.id,label:e.label}))],h=[],g=p.filter(e=>!e.parentId),_={};p.filter(e=>e.parentId).forEach(e=>{let t=e.parentId;_[t]||(_[t]=[]),_[t].push(e)}),g.sort((e,t)=>(e.sortOrder??0)-(t.sortOrder??0)).forEach(e=>{h.push({...e,_depth:0}),(_[e.id]||[]).sort((e,t)=>(e.sortOrder??0)-(t.sortOrder??0)).forEach(e=>{h.push({...e,_depth:1})})});let v=[{title:`排序`,dataIndex:`sortOrder`,width:60},{title:`菜单名称`,key:`label`,width:180,render:(e,t)=>(0,Q.jsxs)(`span`,{style:{paddingLeft:t._depth*20,fontWeight:t._depth===0?600:400},children:[t._depth===1&&(0,Q.jsx)(`span`,{style:{color:`#cbd5e1`,marginRight:4},children:`└`}),t.label]})},{title:`路由路径`,dataIndex:`path`,width:160,render:e=>e||(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})},{title:`图标`,dataIndex:`icon`,width:100,render:e=>e&&w7[e]?(0,Q.jsx)(`span`,{style:{fontSize:16,color:`#6366f1`},children:w7[e]}):`-`},{title:`类型`,dataIndex:`menuType`,width:80,render:e=>(0,Q.jsx)(NQ,{color:Fne[e]||`default`,children:T7[e]||e})},{title:`状态`,dataIndex:`isActive`,width:70,render:e=>(0,Q.jsx)(`span`,{style:{color:e?`#22c55e`:`#94a3b8`},children:e?`启用`:`停用`})},...i===`frontend`?[{title:`默认显示`,dataIndex:`isDefault`,width:80,render:e=>e?(0,Q.jsx)(NQ,{color:`green`,children:`默认`}):(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})}]:[],{title:`操作`,key:`action`,width:150,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>f(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除该菜单?`,onConfirm:()=>d(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}];return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(C4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`菜单配置`})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>f(),style:{borderRadius:8},children:`添加菜单`})]}),(0,Q.jsx)(bR,{activeKey:i,onChange:a,items:[{key:`frontend`,label:`前台菜单`},{key:`admin`,label:`后台菜单`}]}),(0,Q.jsx)(bQ,{columns:v,dataSource:h,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(C4,{}),o.menu?.id?`编辑菜单`:`添加菜单`]}),open:o.open,onOk:u,onCancel:()=>{s({open:!1,menu:null}),c.resetFields()},okText:`确认`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:c,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`label`,label:`菜单名称`,rules:[{required:!0,message:`请输入菜单名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:我的项目`,size:`large`})}),(0,Q.jsx)(X.Item,{name:`path`,label:`路由路径`,tooltip:`分组类型可留空`,children:(0,Q.jsx)(hW,{placeholder:`例如:/projects(分组可留空)`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`menuType`,label:`菜单类型`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`page`,label:`页面`},{value:`group`,label:`分组`}]})}),(0,Q.jsx)(X.Item,{name:`menuTarget`,label:`适用端`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`frontend`,label:`前台`},{value:`admin`,label:`后台`},{value:`both`,label:`两者`}]})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`icon`,label:`图标`,style:{flex:1},rules:[{required:!0}],children:(0,Q.jsx)(RC,{size:`large`,options:Pne})}),(0,Q.jsx)(X.Item,{name:`sortOrder`,label:`排序`,style:{flex:1},children:(0,Q.jsx)(oB,{min:0,max:100,style:{width:`100%`},size:`large`,placeholder:`默认0`})})]}),(0,Q.jsx)(X.Item,{name:`parentId`,label:`上级菜单`,children:(0,Q.jsx)(RC,{size:`large`,options:m,allowClear:!0,placeholder:`顶级菜单`})}),(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用`,valuePropName:`checked`,children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.menuTarget!==t.menuTarget,children:({getFieldValue:e})=>e(`menuTarget`)===`admin`?null:(0,Q.jsx)(X.Item,{name:`isDefault`,label:`新用户默认显示`,valuePropName:`checked`,tooltip:`开启后,新注册用户默认显示此菜单`,children:(0,Q.jsx)(Mq,{})})})]})})]})},Lne={normal:`blue`,gift:`green`,promo:`purple`},Rne={normal:`常规`,gift:`赠送`,promo:`促销`},zne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)({open:!1,item:null}),[o]=X.useForm(),s=async()=>{r(!0);try{t((await e5()).map(e=>({id:e.id,name:e.name,credits:e.credits,price:e.price,bonusCredits:e.bonus_credits??e.bonusCredits??0,totalCredits:e.total_credits??e.totalCredits??e.credits,description:e.description,packageType:e.package_type??e.packageType??`normal`,isGift:e.is_gift??e.isGift??!1,isActive:e.is_active??e.isActive??!0,sortOrder:e.sort_order??e.sortOrder??0})))}catch{LG.error(`加载充值套餐失败`)}finally{r(!1)}};(0,S.useEffect)(()=>{s()},[]);let c=async()=>{try{let e=await o.validateFields(),t={name:e.name,credits:e.credits,price:e.price,bonus_credits:e.bonusCredits||0,description:e.description||null,package_type:e.packageType||`normal`,is_gift:e.isGift||!1,is_active:e.isActive??!0,sort_order:e.sortOrder??0};i.item?.id?(await t5({id:i.item.id,...t}),LG.success(`已更新`)):(await t5(t),LG.success(`已添加`)),a({open:!1,item:null}),o.resetFields(),s()}catch{}},l=async e=>{try{await n5(e),LG.success(`已删除`),s()}catch(e){LG.error(e?.message||`删除失败`)}},u=e=>{a({open:!0,item:e||null}),e?o.setFieldsValue({name:e.name,credits:e.credits,price:e.price,bonusCredits:e.bonusCredits,description:e.description,packageType:e.packageType,isGift:e.isGift,isActive:e.isActive,sortOrder:e.sortOrder}):(o.resetFields(),o.setFieldsValue({isActive:!0,sortOrder:0,packageType:`normal`,bonusCredits:0,isGift:!1}))};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(F2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`充值套餐管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[e.length,` 个套餐`]})]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>u(),style:{borderRadius:8},children:`添加套餐`})]}),(0,Q.jsx)(bQ,{columns:[{title:`套餐名称`,key:`name`,width:160,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.name}),t.description&&(0,Q.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12},children:t.description})]})},{title:`基础积分`,dataIndex:`credits`,width:100,render:e=>(0,Q.jsx)(Z.Text,{children:e.toLocaleString()})},{title:`赠送积分`,dataIndex:`bonusCredits`,width:100,render:e=>e>0?(0,Q.jsxs)(NQ,{color:`green`,children:[`+`,e.toLocaleString()]}):(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`})},{title:`总积分`,key:`total`,width:100,render:(e,t)=>(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:(t.credits+t.bonusCredits).toLocaleString()})},{title:`价格(元)`,dataIndex:`price`,width:100,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,children:[`¥`,e]})},{title:`类型`,dataIndex:`packageType`,width:80,render:e=>(0,Q.jsx)(NQ,{color:Lne[e]||`default`,children:Rne[e]||e})},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`default`,children:e?`启用`:`停用`})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(zQ,{}),onClick:()=>u(t),children:`编辑`}),(0,Q.jsx)(WG,{title:`确定删除?`,onConfirm:()=>l(t.id),children:(0,Q.jsx)(qE,{type:`link`,size:`small`,danger:!0,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:n,pagination:!1,scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(F2,{}),i.item?`编辑套餐`:`添加套餐`]}),open:i.open,onOk:c,onCancel:()=>{a({open:!1,item:null}),o.resetFields()},okText:`保存`,cancelText:`取消`,width:520,children:(0,Q.jsxs)(X,{form:o,layout:`vertical`,style:{marginTop:16},children:[(0,Q.jsx)(X.Item,{name:`name`,label:`套餐名称`,rules:[{required:!0,message:`请输入套餐名称`}],children:(0,Q.jsx)(hW,{placeholder:`例如:进阶包`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`credits`,label:`基础积分`,rules:[{required:!0,message:`请输入积分`}],style:{flex:1},children:(0,Q.jsx)(oB,{min:1,placeholder:`2000`,size:`large`,style:{width:`100%`}})}),(0,Q.jsx)(X.Item,{name:`price`,label:`价格(元)`,rules:[{required:!0,message:`请输入价格`}],style:{flex:1},children:(0,Q.jsx)(oB,{min:.01,step:1,placeholder:`168`,size:`large`,style:{width:`100%`}})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`bonusCredits`,label:`赠送积分`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(oB,{min:0,placeholder:`0`,size:`large`,style:{width:`100%`}})}),(0,Q.jsx)(X.Item,{name:`packageType`,label:`套餐类型`,initialValue:`normal`,style:{flex:1},children:(0,Q.jsx)(RC,{size:`large`,options:[{value:`normal`,label:`常规`},{value:`gift`,label:`赠送`},{value:`promo`,label:`促销`}]})})]}),(0,Q.jsx)(X.Item,{name:`description`,label:`描述`,children:(0,Q.jsx)(hW,{placeholder:`套餐描述(可选)`,size:`large`})}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,Q.jsx)(X.Item,{name:`isActive`,label:`启用状态`,valuePropName:`checked`,initialValue:!0,style:{flex:1},children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{name:`isGift`,label:`是否赠送`,valuePropName:`checked`,initialValue:!1,style:{flex:1},children:(0,Q.jsx)(Mq,{})}),(0,Q.jsx)(X.Item,{name:`sortOrder`,label:`排序`,initialValue:0,style:{flex:1},children:(0,Q.jsx)(oB,{size:`large`,style:{width:`100%`}})})]})]})})]})},Bne={POST:`green`,PUT:`blue`,DELETE:`red`},Vne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),c=async e=>{a(!0);try{let n=await r5(e||o);t(n.items||[]),r(n.total||0)}catch{LG.error(`加载操作日志失败`)}finally{a(!1)}};return(0,S.useEffect)(()=>{c()},[]),(0,Q.jsx)(`div`,{children:(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(q2,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`操作日志`})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>c(),children:`刷新`})]}),(0,Q.jsx)(bQ,{columns:[{title:`操作人`,dataIndex:`username`,width:120,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`操作`,dataIndex:`action`,width:160,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`方法`,dataIndex:`method`,width:80,render:e=>(0,Q.jsx)(NQ,{color:Bne[e]||`default`,children:e})},{title:`路径`,dataIndex:`path`,width:220,ellipsis:!0,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:e})},{title:`时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:$5(e)})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:20,total:n,showTotal:e=>`共 ${e} 条记录`,onChange:e=>{s(e),c(e)}},scroll:{x:800}})]})})},Hne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(null),[g]=X.useForm(),[_]=X.useForm(),v=async e=>{a(!0);try{let n=await i5(e||o);t(n.items||[]),r(n.total||0)}catch{LG.error(`加载应用管理列表失败`)}finally{a(!1)}},y=async()=>{try{let e=await g.validateFields();await a5({app_id:e.app_id,secret:e.secret,open_type:e.open_type,count:e.count,auth_url:e.auth_url,company:e.company}),LG.success(`创建成功`),l(!1),g.resetFields(),v()}catch(e){LG.error(e?.message||`创建失败`)}},b=async e=>{try{h(await o5(e)),d(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},x=async e=>{try{let t=await o5(e);h(t),_.setFieldsValue({app_id:t.appId,secret:t.secret,open_type:t.openType,count:t.count,auth_url:t.authUrl,company:t.company}),p(!0)}catch(e){LG.error(e?.message||`获取详情失败`)}},C=async()=>{if(m)try{let e=await _.validateFields();await s5(m.id,{app_id:e.app_id,secret:e.secret,open_type:e.open_type,count:e.count,auth_url:e.auth_url,company:e.company}),LG.success(`更新成功`),p(!1),_.resetFields(),v()}catch(e){LG.error(e?.message||`更新失败`)}},w=e=>{BG.confirm({title:`确认删除`,content:`确定要删除这个应用管理吗?`,okText:`删除`,okType:`danger`,cancelText:`取消`,onOk:async()=>{try{await c5(e),LG.success(`删除成功`),v()}catch(e){LG.error(e?.message||`删除失败`)}}})};return(0,S.useEffect)(()=>{v()},[]),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(C4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`应用管理列表`})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>v(),children:`刷新`}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(TL,{}),onClick:()=>l(!0),children:`创建`})]})]}),(0,Q.jsx)(bQ,{columns:[{title:`ID`,dataIndex:`id`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`应用ID`,dataIndex:`appId`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`应用密钥`,dataIndex:`secret`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`开户方式`,dataIndex:`openType`,render:e=>(0,Q.jsx)(Z.Text,{children:{1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`}[e]||e})},{title:`归属公司`,dataIndex:`company`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`授权次数`,dataIndex:`count`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`状态`,dataIndex:`status`,render:e=>(0,Q.jsx)(NQ,{color:e===1?`green`:`red`,children:e===1?`正常`:`禁用`})},{title:`授权URL`,dataIndex:`authUrl`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`创建人`,dataIndex:`createBy`,render:e=>(0,Q.jsx)(Z.Text,{children:e})},{title:`创建时间`,dataIndex:`createdAt`,render:e=>(0,Q.jsx)(Z.Text,{children:$5(e)})},{title:`更新时间`,dataIndex:`updatedAt`,render:e=>(0,Q.jsx)(Z.Text,{children:$5(e)})},{title:`操作`,render:(e,t)=>(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(qU,{}),size:`small`,onClick:()=>b(t.id),children:`详情`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(zQ,{}),size:`small`,onClick:()=>x(t.id),children:`更新`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(IQ,{}),size:`small`,danger:!0,onClick:()=>w(t.id),children:`删除`})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:20,total:n,showTotal:e=>`共 ${e} 条记录`,onChange:e=>{s(e),v(e)}},scroll:{x:800}})]}),(0,Q.jsx)(BG,{title:`创建应用管理`,open:c,onOk:y,onCancel:()=>{l(!1),g.resetFields()},okText:`创建`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:g,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`app_id`,label:`应用ID`,rules:[{required:!0,message:`请输入应用ID`},{max:64,message:`应用ID不能超过64个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用ID`})}),(0,Q.jsx)(X.Item,{name:`secret`,label:`应用密钥`,rules:[{required:!0,message:`请输入应用密钥`},{max:256,message:`应用密钥不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用密钥`})}),(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户方式`,rules:[{required:!0,message:`请选择开户方式`}],children:(0,Q.jsxs)(RC,{placeholder:`请选择开户方式`,children:[(0,Q.jsx)(RC.Option,{value:1,children:`千川`}),(0,Q.jsx)(RC.Option,{value:2,children:`广告`}),(0,Q.jsx)(RC.Option,{value:3,children:`本地推`}),(0,Q.jsx)(RC.Option,{value:4,children:`星图`}),(0,Q.jsx)(RC.Option,{value:5,children:`快手代理商`}),(0,Q.jsx)(RC.Option,{value:6,children:`巨量星图`}),(0,Q.jsx)(RC.Option,{value:7,children:`巨量服务单`}),(0,Q.jsx)(RC.Option,{value:8,children:`腾讯服务单`}),(0,Q.jsx)(RC.Option,{value:9,children:`腾讯营销K2`}),(0,Q.jsx)(RC.Option,{value:10,children:`腾讯营销K3`})]})}),(0,Q.jsx)(X.Item,{name:`count`,label:`最大授权用户数`,initialValue:100,children:(0,Q.jsx)(oB,{min:1,placeholder:`应用最大可以授权多少个用户`})}),(0,Q.jsx)(X.Item,{name:`auth_url`,label:`应用授权链接`,children:(0,Q.jsx)(hW,{placeholder:`请输入应用授权链接`})}),(0,Q.jsx)(X.Item,{name:`company`,label:`应用归属公司名称`,rules:[{max:256,message:`公司名称不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用归属公司名称`})})]})}),(0,Q.jsx)(BG,{title:`应用管理详情`,open:u,onCancel:()=>{d(!1),h(null)},okText:`关闭`,cancelText:`取消`,width:600,children:m&&(0,Q.jsxs)(`div`,{style:{lineHeight:`2`},children:[(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`ID:`}),` `,m.id]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`应用ID:`}),` `,m.appId]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`应用密钥:`}),` `,m.secret]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`开户方式:`}),` `,{1:`千川`,2:`广告`,3:`本地推`,4:`星图`,5:`快手代理商`,6:`巨量星图`,7:`巨量服务单`,8:`腾讯服务单`,9:`腾讯营销K2`,10:`腾讯营销K3`}[m.openType]||m.openType]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`归属公司:`}),` `,m.company||`-`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`授权次数:`}),` `,m.count]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`状态:`}),` `,m.status===1?`正常`:`禁用`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`授权URL:`}),` `,m.authUrl||`-`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`创建人:`}),` `,m.createBy]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`创建时间:`}),` `,$5(m.createdAt)]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`更新时间:`}),` `,$5(m.updatedAt)]})]})}),(0,Q.jsx)(BG,{title:`更新应用管理`,open:f,onOk:C,onCancel:()=>{p(!1),_.resetFields(),h(null)},okText:`更新`,cancelText:`取消`,width:600,children:(0,Q.jsxs)(X,{form:_,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`app_id`,label:`应用ID`,rules:[{required:!0,message:`请输入应用ID`},{max:64,message:`应用ID不能超过64个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用ID`})}),(0,Q.jsx)(X.Item,{name:`secret`,label:`应用密钥`,rules:[{required:!0,message:`请输入应用密钥`},{max:256,message:`应用密钥不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用密钥`})}),(0,Q.jsx)(X.Item,{name:`open_type`,label:`开户方式`,rules:[{required:!0,message:`请选择开户方式`}],children:(0,Q.jsxs)(RC,{placeholder:`请选择开户方式`,children:[(0,Q.jsx)(RC.Option,{value:1,children:`千川`}),(0,Q.jsx)(RC.Option,{value:2,children:`广告`}),(0,Q.jsx)(RC.Option,{value:3,children:`本地推`}),(0,Q.jsx)(RC.Option,{value:4,children:`星图`}),(0,Q.jsx)(RC.Option,{value:5,children:`快手代理商`}),(0,Q.jsx)(RC.Option,{value:6,children:`巨量星图`}),(0,Q.jsx)(RC.Option,{value:7,children:`巨量服务单`}),(0,Q.jsx)(RC.Option,{value:8,children:`腾讯服务单`}),(0,Q.jsx)(RC.Option,{value:9,children:`腾讯营销K2`}),(0,Q.jsx)(RC.Option,{value:10,children:`腾讯营销K3`})]})}),(0,Q.jsx)(X.Item,{name:`count`,label:`最大授权用户数`,children:(0,Q.jsx)(oB,{min:1,placeholder:`应用最大可以授权多少个用户`})}),(0,Q.jsx)(X.Item,{name:`auth_url`,label:`应用授权链接`,children:(0,Q.jsx)(hW,{placeholder:`请输入应用授权链接`})}),(0,Q.jsx)(X.Item,{name:`company`,label:`应用归属公司名称`,rules:[{max:256,message:`公司名称不能超过256个字符`}],children:(0,Q.jsx)(hW,{placeholder:`请输入应用归属公司名称`})})]})})]})},E7=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),D7={image:`empty`,video:`empty`,videoCover:`empty`,references:{}},O7={optimizing:{color:`processing`,text:`优化中`,icon:(0,Q.jsx)(xm,{spin:!0})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,Q.jsx)(HB,{})},generating:{color:`warning`,text:`生成中`,icon:(0,Q.jsx)(xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,Q.jsx)(M0,{})},failed:{color:`error`,text:`失败`,icon:(0,Q.jsx)(F0,{})}},k7={image:{text:`图片`,color:`purple`,icon:(0,Q.jsx)(_2,{})},video:{text:`视频`,color:`geekblue`,icon:(0,Q.jsx)(M6,{})}},Une=e=>/^(https?:)?\/\//i.test(e)||/^(blob|data):/i.test(e),A7=e=>!!e&&/^blob:/i.test(e.trim()),j7=e=>{if(!e)return``;let t=String(e).trim();return t?Une(t)?t:E7?`${E7}${t.startsWith(`/`)?t:`/${t}`}`:t.startsWith(`/`)?t:`/${t}`:``},Wne=e=>e?e.length>12?`${e.slice(0,8)}...`:e:`-`,M7=e=>e?$5(e):`-`,Gne=e=>e==null||e===``,N7=e=>{if(!e||A7(e))return!1;try{let t=new URL(j7(e),window.location.origin),n=t.searchParams.get(`exp`)||t.searchParams.get(`expires`)||t.searchParams.get(`expire`)||t.searchParams.get(`expires_at`)||t.searchParams.get(`x-expires`);if(!n)return!1;let r=Number(n);if(!Number.isFinite(r))return!1;let i=r>1e10?r:r*1e3;return Date.now()>=i}catch{return!1}},P7=e=>e?A7(e)||N7(e)?`invalid`:`checking`:`empty`,F7=e=>{let t=e.url||e.mediaUrl||e.fileUrl;return typeof t==`string`&&t.trim()?t.trim():void 0},Kne=e=>{let t=String(e.type||e.mediaType||e.mimeType||``).toLowerCase(),n=F7(e)?.toLowerCase()||``;return t.includes(`video`)||/\.(mp4|mov|webm|m4v)(\?|$)/i.test(n)?`video`:t.includes(`image`)||/\.(png|jpe?g|webp|gif|bmp|svg)(\?|$)/i.test(n)?`image`:t||`unknown`},I7=(e,t)=>`${t}-${F7(e)||`empty`}`,L7=(e,t=`资源`)=>A7(e)?`本地临时素材已失效`:N7(e)?`${t}链接已超时,请刷新列表或重新搜索后再查看`:`${t}加载失败,请刷新列表或重新搜索后再查看`,R7=({text:e,minHeight:t=240,compact:n=!1,action:r})=>(0,Q.jsxs)(`div`,{style:{width:`100%`,minHeight:n?void 0:t,height:n?`100%`:void 0,borderRadius:n?10:12,background:`#f8f9fc`,border:`1px dashed #cbd5e1`,color:`#64748b`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:n?4:10,textAlign:`center`},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`,fontSize:n?11:13},children:e}),r]}),z7=({label:e,value:t})=>(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:120},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:Gne(t)?`-`:t})]}),qne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c]=(0,S.useState)(20),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(0),[h,g]=(0,S.useState)(null),[_,v]=(0,S.useState)(D7),[y,b]=(0,S.useState)(!1),x=(0,S.useRef)(null),[C,w]=(0,S.useState)(null),[T,E]=(0,S.useState)(null),D=(0,S.useCallback)(async()=>{a(!0);try{let e=await m5({userId:d.trim()||void 0,status:l||void 0,page:o,pageSize:c});t((e.items||[]).map(e=>({id:e.id,userId:e.userId,username:e.username,projectId:e.projectId,projectName:e.projectName,originalPrompt:e.originalPrompt,optimizedPrompt:e.optimizedPrompt,duration:e.duration,aspectRatio:e.aspectRatio,resolution:e.resolution,status:e.status,videoUrl:e.videoUrl,videoCoverUrl:e.videoCoverUrl,references:e.references,creditsCost:e.creditsCost||0,textCreditsCost:e.textCreditsCost||0,textTokensUsed:e.textTokensUsed||0,videoTokensUsed:e.videoTokensUsed||0,errorMessage:e.errorMessage,createdAt:e.createdAt,generatedAt:e.generatedAt,genType:e.genType,imageSize:e.imageSize,imageUrl:e.imageUrl,imageTokensUsed:e.imageTokensUsed||0,imageProportion:e.imageProportion,imagePx:e.imagePx}))),r(e.total||0)}catch{LG.error(`加载记录失败`)}finally{a(!1)}},[l,d,o,c]);(0,S.useEffect)(()=>{D()},[D,p]),(0,S.useEffect)(()=>{if(!h){v(D7);return}let e=(h.references||[]).reduce((e,t,n)=>{let r=F7(t);return e[I7(t,n)]=P7(r),e},{});x.current&&(x.current.pause(),x.current.currentTime=0),b(!1),v({image:P7(h.imageUrl),video:P7(h.videoUrl),videoCover:P7(h.videoCoverUrl),references:e})},[h]);let O=()=>{s(1),m(e=>e+1)},k=(0,S.useCallback)(e=>{g(e)},[]),A=()=>{x.current&&x.current.pause(),b(!1),g(null)},j=e=>{v(t=>({...t,...e}))},M=(e,t)=>{v(n=>({...n,references:{...n.references,[e]:t}}))},N=(e,t=`素材`)=>{if(!e){LG.warning(`${t}链接为空,暂无法查看`);return}if(A7(e)){LG.warning(`本地临时素材已失效,暂无法查看`);return}if(N7(e)){LG.warning(`${t}链接已超时,请刷新列表或重新搜索后再查看`);return}window.open(j7(e),`_blank`,`noopener,noreferrer`)},P=()=>{if(h?.videoUrl){if(N7(h.videoUrl)){j({video:`invalid`}),LG.warning(`视频链接已超时,请刷新列表或重新搜索后再查看`);return}b(!0),window.setTimeout(()=>{x.current?.play().catch(()=>{b(!1),j({video:`invalid`}),LG.warning(`视频播放失败,请确认资源链接是否仍然有效`)})},0)}},F=async(e,t,n)=>{w(e);try{await h5(e,t,n),LG.success(`状态已更新`),D()}catch(e){LG.error(e?.message||`更新失败`)}finally{w(null)}},I=async()=>{if(T){w(T.record.id);try{await g5(T.record.id,T.ratio,T.resolution,T.image_size),LG.success(`已提交${T.record.genType===`video`?`视频`:`图片`}生成`),E(null),D()}catch(e){LG.error(e?.message||`生成失败`)}finally{w(null)}}},L=(0,S.useMemo)(()=>[{title:`用户`,key:`user`,width:120,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:t.username||`未知用户`}),(0,Q.jsx)(`div`,{style:{fontSize:11,color:`#94a3b8`},children:Wne(t.userId)})]})},{title:`项目`,dataIndex:`projectName`,width:120,ellipsis:!0,render:e=>(0,Q.jsx)(Z.Text,{style:{fontSize:13},children:e||`-`})},{title:`类型`,dataIndex:`genType`,width:90,ellipsis:!0,render:e=>{let t=k7[e]||{text:e||`-`,color:`default`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`提示词`,key:`prompt`,ellipsis:!0,render:(e,t)=>(0,Q.jsx)(Ow,{title:t.originalPrompt,placement:`topLeft`,children:(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#475569`},ellipsis:!0,children:t.originalPrompt||`-`})})},{title:`参数`,key:`params`,width:160,render:(e,t)=>t.genType===`video`?t.duration||t.aspectRatio||t.resolution?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.duration?(0,Q.jsxs)(NQ,{children:[t.duration,`s`]}):null,t.aspectRatio?(0,Q.jsx)(NQ,{children:t.aspectRatio}):null,t.resolution?(0,Q.jsx)(NQ,{children:t.resolution}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`待配置`}):t.imageSize||t.imageProportion||t.imagePx?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.imageSize?(0,Q.jsx)(NQ,{children:t.imageSize}):null,t.imageProportion?(0,Q.jsx)(NQ,{children:t.imageProportion}):null,t.imagePx?(0,Q.jsx)(NQ,{children:t.imagePx}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`待配置`})},{title:`积分`,key:`credits`,width:120,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12},children:[t.textCreditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#f59e0b`},children:[`文字: `,t.textCreditsCost]}):null,t.creditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#6366f1`},children:[t.genType===`video`?`视频`:`图片`,`: `,t.creditsCost]}):null,t.textCreditsCost===0&&t.creditsCost===0?(0,Q.jsx)(Z.Text,{style:{color:`#94a3b8`},children:`0`}):null]})},{title:`状态`,dataIndex:`status`,width:90,render:e=>{let t=O7[e]||{color:`default`,text:e||`-`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`时间`,key:`time`,width:150,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[(0,Q.jsx)(`div`,{children:M7(t.createdAt)}),t.generatedAt?(0,Q.jsxs)(`div`,{style:{color:`#10b981`},children:[`生成: `,M7(t.generatedAt)]}):null]})},{title:`操作`,key:`action`,width:150,fixed:`right`,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>k(t),children:`详情`}),t.status===`generating`?(0,Q.jsx)(qE,{size:`small`,danger:!0,loading:C===t.id,onClick:()=>{BG.confirm({title:`确认操作`,icon:(0,Q.jsx)(d2,{}),content:`确定将此记录标记为失败?`,onOk:()=>F(t.id,`failed`)})},children:`标记失败`}):null,t.status===`failed`?(0,Q.jsx)(qE,{size:`small`,type:`primary`,danger:!0,loading:C===t.id,onClick:()=>E({record:t,ratio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`,image_size:t.imageSize||`2K`}),children:`重试生成`}):null,t.status===`prompt_optimized`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(qE,{size:`small`,type:`primary`,loading:C===t.id,onClick:()=>E({record:t,ratio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`,image_size:t.imageSize||`2K`}),style:{background:`#6366f1`,border:`none`},children:[`生成`,t.genType===`video`?`视频`:`图片`]}),(0,Q.jsx)(qE,{size:`small`,danger:!0,loading:C===t.id,onClick:()=>{BG.confirm({title:`确认操作`,icon:(0,Q.jsx)(d2,{}),content:`确定将此记录标记为失败?`,onOk:()=>F(t.id,`failed`)})},children:`标记失败`})]}):null]})}],[k,C]),R=h?k7[h.genType||``]||{text:h.genType||`-`,color:`default`,icon:null}:null,z=h?O7[h.status]||{color:`default`,text:h.status||`-`,icon:null}:null,B=()=>{if(!h||h.genType!==`image`||h.status!==`completed`)return null;if(!h.imageUrl)return(0,Q.jsx)(R7,{text:`此图片任务暂无结果图片`,minHeight:260});if(_.image===`invalid`)return(0,Q.jsx)(R7,{text:L7(h.imageUrl,`图片`),minHeight:260});let e=j7(h.imageUrl);return(0,Q.jsxs)(`div`,{title:`点击新页面查看图片`,onClick:()=>N(h.imageUrl,`生成图片`),style:{position:`relative`,width:`100%`,minHeight:260,borderRadius:12,background:`#f8f9fc`,border:`1px solid #e2e8f0`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[(0,Q.jsx)(`img`,{src:e,alt:`生成图片`,onLoad:()=>j({image:`valid`}),onError:()=>j({image:`invalid`}),style:{display:_.image===`valid`?`block`:`none`,width:`100%`,maxHeight:560,objectFit:`contain`,background:`#fff`}},`${h.id}-${e}`),_.image===`checking`?(0,Q.jsx)(R7,{text:`图片加载检测中...`,minHeight:260}):null]})},V=()=>{if(!h||y||_.video===`invalid`)return null;let e=h.videoUrl?(0,Q.jsx)(qE,{type:`primary`,shape:`circle`,size:`large`,icon:(0,Q.jsx)(X4,{}),onClick:P,style:{boxShadow:`0 8px 20px rgba(15,23,42,0.25)`}}):null;if(!h.videoCoverUrl)return(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,Q.jsx)(R7,{text:`此视频无封面`,minHeight:340,action:e})});if(_.videoCover===`invalid`)return(0,Q.jsx)(R7,{text:L7(h.videoCoverUrl,`视频封面`),minHeight:340,action:e});let t=j7(h.videoCoverUrl);return(0,Q.jsxs)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,border:`1px solid #e2e8f0`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:t,alt:`视频封面`,onLoad:()=>j({videoCover:`valid`}),onError:()=>j({videoCover:`invalid`}),style:{display:_.videoCover===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`}},`${h.id}-cover-${t}`),_.videoCover===`checking`?(0,Q.jsx)(R7,{text:`视频封面加载检测中...`,minHeight:340,action:e}):null,_.videoCover===`valid`?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(15,23,42,0.18)`},children:e}):null]})},H=()=>{if(!h||h.genType!==`video`||h.status!==`completed`)return null;if(!h.videoUrl)return(0,Q.jsx)(R7,{text:`此视频任务暂无结果视频`,minHeight:340});if(_.video===`invalid`)return(0,Q.jsx)(R7,{text:L7(h.videoUrl,`视频`),minHeight:340});let e=j7(h.videoUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:340,borderRadius:12,background:`#000`,overflow:`hidden`,border:`1px solid #e2e8f0`},children:[(0,Q.jsx)(`video`,{ref:x,src:e,preload:`metadata`,controls:y,onLoadedMetadata:()=>j({video:`valid`}),onCanPlay:()=>j({video:`valid`}),onPlaying:()=>{b(!0),j({video:`valid`})},onPause:()=>b(!1),onEnded:()=>b(!1),onError:()=>{b(!1),j({video:`invalid`})},style:{width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`,opacity:+!!y,pointerEvents:y?`auto`:`none`}},`${h.id}-${e}`),V()]})},U=(e,t)=>{let n=F7(e),r=Kne(e),i=I7(e,t),a=_.references[i]||P7(n),o=r===`image`,s=r===`video`,c=typeof e.name==`string`&&e.name?e.name:`参考素材 ${t+1}`;if(!n)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(R7,{text:`无链接`,compact:!0})}),(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})]},i);if(a===`invalid`)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(R7,{text:A7(n)?`本地临时素材已失效`:`素材不可访问`,compact:!0})}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i);let l=j7(n);return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsxs)(`div`,{role:`button`,tabIndex:0,title:`点击新页面查看素材`,onClick:()=>N(n,s?`视频素材`:o?`图片素材`:`素材`),onKeyDown:e=>{e.key===`Enter`&&N(n,s?`视频素材`:o?`图片素材`:`素材`)},style:{width:94,height:94,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,background:`#f8f9fc`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[o?(0,Q.jsx)(`img`,{src:l,alt:c,onLoad:()=>M(i,`valid`),onError:()=>M(i,`invalid`),style:{display:a===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`cover`}}):null,s?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`video`,{src:l,preload:`metadata`,onLoadedMetadata:()=>M(i,`valid`),onError:()=>M(i,`invalid`),style:{display:`none`}}),(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[(0,Q.jsx)(X4,{style:{fontSize:18}}),(0,Q.jsx)(`div`,{children:`视频素材`}),(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]})]}):null,!o&&!s?(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[`文件素材`,(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]}):null,a===`checking`&&o?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8f9fc`},children:(0,Q.jsx)(xm,{style:{color:`#6366f1`}})}):null]}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i)};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(M6,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`生成记录管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[n,` 条记录`]})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(RC,{placeholder:`状态筛选`,allowClear:!0,style:{width:120},value:l||void 0,onChange:e=>{u(e||``),s(1)},options:[{value:`optimizing`,label:`优化中`},{value:`prompt_optimized`,label:`待生成`},{value:`generating`,label:`生成中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`}]}),(0,Q.jsx)(hW,{placeholder:`用户ID搜索`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),style:{width:200},value:d,onChange:e=>f(e.target.value),onPressEnter:O,allowClear:!0}),(0,Q.jsx)(qE,{type:`primary`,onClick:O,style:{borderRadius:8},children:`搜索`})]})]}),(0,Q.jsx)(bQ,{columns:L,dataSource:e,rowKey:`id`,loading:i,scroll:{x:1120},pagination:{current:o,pageSize:c,total:n,onChange:s,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[h?.genType===`video`?(0,Q.jsx)(M6,{}):(0,Q.jsx)(_2,{}),(0,Q.jsx)(`span`,{children:`生成记录详情`})]}),open:!!h,onCancel:A,footer:null,width:900,destroyOnClose:!0,children:h?(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,flexWrap:`wrap`},children:[(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`用户`}),(0,Q.jsx)(Z.Text,{strong:!0,children:h.username||`-`})]}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`项目`}),(0,Q.jsx)(Z.Text,{strong:!0,children:h.projectName||`-`})]}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:150,padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`类型 / 状态`}),(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[R?(0,Q.jsx)(NQ,{color:R.color,icon:R.icon,children:R.text}):null,z?(0,Q.jsx)(NQ,{color:z.color,icon:z.icon,children:z.text}):null]})]})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,Q.jsx)(Z.Text,{style:{fontSize:13,color:`#475569`,lineHeight:1.7},children:h.originalPrompt||`-`})})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`优化后提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`},children:(0,Q.jsx)(Z.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:h.optimizedPrompt||`-`})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(z7,{label:`文字积分`,value:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#f59e0b`},children:h.textCreditsCost||0}),(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.textTokensUsed||0,` tokens)`]})]})}),(0,Q.jsx)(z7,{label:`${h.genType===`image`?`图片`:`视频`}积分`,value:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:h.creditsCost||0}),h.genType===`video`&&h.videoTokensUsed?(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.videoTokensUsed,` tokens)`]}):null,h.genType===`image`&&h.imageTokensUsed?(0,Q.jsxs)(Z.Text,{style:{fontSize:11,color:`#94a3b8`},children:[` (`,h.imageTokensUsed,` tokens)`]}):null]})}),(0,Q.jsx)(z7,{label:`总积分`,value:(h.textCreditsCost||0)+(h.creditsCost||0)})]}),h.genType===`video`?h.duration||h.aspectRatio||h.resolution?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(z7,{label:`时长`,value:h.duration?`${h.duration}秒`:`-`}),(0,Q.jsx)(z7,{label:`比例`,value:h.aspectRatio||`-`}),(0,Q.jsx)(z7,{label:`分辨率`,value:h.resolution||`-`})]}):(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,textAlign:`center`},children:(0,Q.jsx)(NQ,{color:`default`,children:`视频参数待用户配置`})}):null,h.genType===`image`?h.imageSize||h.imageProportion||h.imagePx?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(z7,{label:`尺寸`,value:h.imagePx||`-`}),(0,Q.jsx)(z7,{label:`比例`,value:h.imageProportion||`-`}),(0,Q.jsx)(z7,{label:`分辨率`,value:h.imageSize||`-`})]}):(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,textAlign:`center`},children:(0,Q.jsx)(NQ,{color:`default`,children:`图片参数待用户配置`})}):null,!h?.references||h.references.length===0?null:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`参考内容`}),(0,Q.jsx)(`div`,{style:{display:`flex`,gap:10,flexWrap:`wrap`},children:h.references.map((e,t)=>U(e,t))})]}),h.status===`completed`?(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:h.genType===`video`?`生成视频`:`生成图片`}),h.genType===`video`?H():B()]}):null,h.status===`failed`&&h.errorMessage?(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(239,68,68,0.04)`,border:`1px solid rgba(239,68,68,0.15)`},children:(0,Q.jsxs)(Z.Text,{style:{fontSize:12,color:`#ef4444`},children:[`错误信息: `,h.errorMessage]})}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,fontSize:12,color:`#94a3b8`,flexWrap:`wrap`},children:[(0,Q.jsxs)(`span`,{children:[`创建: `,M7(h.createdAt)]}),(0,Q.jsxs)(`span`,{children:[`生成: `,M7(h.generatedAt)]})]})]}):(0,Q.jsx)(pC,{description:`暂无详情`})}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[T&&(T.record.genType===`video`?(0,Q.jsx)(X4,{}):(0,Q.jsx)(_2,{})),T&&(T.record.genType===`video`?`生成视频`:`生成图片`)]}),open:!!T,onCancel:()=>E(null),onOk:I,okText:`提交生成`,cancelText:`取消`,confirmLoading:T?C===T.record.id:!1,width:420,children:T?(0,Q.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:T.record.genType===`video`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`时长`}),(0,Q.jsxs)(Z.Text,{strong:!0,children:[T.record.duration||5,`s`]})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`画面比例`}),(0,Q.jsx)(RC,{value:T.ratio,onChange:e=>E(t=>t?{...t,ratio:e}:null),style:{width:`100%`},options:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`].map(e=>({value:e,label:e}))})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`分辨率`}),(0,Q.jsx)(RC,{value:T.resolution,onChange:e=>E(t=>t?{...t,resolution:e}:null),style:{width:`100%`},options:[`480p`,`720p`,`1080p`].map(e=>({value:e,label:e}))})]})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`尺寸`}),(0,Q.jsx)(Z.Text,{strong:!0,children:T.record.imagePx||`-`})]}),(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`比例`}),(0,Q.jsx)(Z.Text,{strong:!0,children:T.record.imageProportion||`-`})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`分辨率`}),(0,Q.jsx)(RC,{value:T.image_size,onChange:e=>E(t=>t?{...t,image_size:e}:null),style:{width:`100%`},options:[`2K`,`4K`].map(e=>({value:e,label:e}))})]})]})}):null})]})},B7=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),V7=20,H7={image:`empty`,video:`empty`,videoCover:`empty`,references:{}},U7={pending:{color:`default`,text:`待处理`,icon:(0,Q.jsx)(HB,{})},generating:{color:`warning`,text:`生成中`,icon:(0,Q.jsx)(xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,Q.jsx)(M0,{})},failed:{color:`error`,text:`失败`,icon:(0,Q.jsx)(F0,{})}},W7={timeout:`任务超时`,queued:`已入队`,preparing:`准备中`,creating_provider_task:`创建任务中`,waiting_remote:`等待生成`,result_ready:`结果就绪`,downloading:`下载中`,done:`完成`,download_failed:`下载失败`,polling:`轮询中`,failed:`失败`},G7={image:{text:`图片`,color:`purple`,icon:(0,Q.jsx)(_2,{})},video:{text:`视频`,color:`geekblue`,icon:(0,Q.jsx)(M6,{})}},Jne=e=>/^(https?:)?\/\//i.test(e)||/^(blob|data):/i.test(e),K7=e=>!!e&&/^blob:/i.test(e.trim()),q7=e=>{if(!e)return``;let t=String(e).trim();return t?Jne(t)?t:B7?`${B7}${t.startsWith(`/`)?t:`/${t}`}`:t.startsWith(`/`)?t:`/${t}`:``},Yne=e=>e?e.length>12?`${e.slice(0,8)}...`:e:`-`,J7=e=>e?$5(e):`-`,Xne=e=>e==null||e===``,Y7=e=>{if(!e||K7(e))return!1;try{let t=new URL(q7(e),window.location.origin),n=t.searchParams.get(`exp`)||t.searchParams.get(`expires`)||t.searchParams.get(`expire`)||t.searchParams.get(`expires_at`)||t.searchParams.get(`x-expires`);if(!n)return!1;let r=Number(n);if(!Number.isFinite(r))return!1;let i=r>1e10?r:r*1e3;return Date.now()>=i}catch{return!1}},X7=e=>e?K7(e)||Y7(e)?`invalid`:`checking`:`empty`,Z7=e=>{let t=e.url||e.mediaUrl||e.fileUrl;return typeof t==`string`&&t.trim()?t.trim():void 0},Zne=e=>{let t=String(e.type||e.mediaType||e.mimeType||``).toLowerCase(),n=Z7(e)?.toLowerCase()||``;return t.includes(`video`)||/\.(mp4|mov|webm|m4v)(\?|$)/i.test(n)?`video`:t.includes(`image`)||/\.(png|jpe?g|webp|gif|bmp|svg)(\?|$)/i.test(n)?`image`:t||`unknown`},Q7=(e,t)=>`${t}-${Z7(e)||`empty`}`,$7=(e,t=`资源`)=>K7(e)?`本地临时素材已失效`:Y7(e)?`${t}链接已超时,请刷新列表或重新搜索后再查看`:`${t}加载失败,请刷新列表或重新搜索后再查看`,e9=({text:e,minHeight:t=240,compact:n=!1,action:r})=>(0,Q.jsxs)(`div`,{style:{width:`100%`,minHeight:n?void 0:t,height:n?`100%`:void 0,borderRadius:n?10:12,background:`#f8f9fc`,border:`1px dashed #cbd5e1`,color:`#64748b`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:n?4:10,textAlign:`center`},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`,fontSize:n?11:13},children:e}),r]}),t9=({label:e,value:t})=>(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:120},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:Xne(t)?`-`:t})]}),Qne=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(``),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)(``),[m,h]=(0,S.useState)(``),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(0),[C,w]=(0,S.useState)(null),[T,E]=(0,S.useState)(H7),[D,O]=(0,S.useState)(!1),k=(0,S.useRef)(null),A=(0,S.useCallback)(async()=>{a(!0);try{let e=await v5({genType:u||void 0,status:c||void 0,userId:g||void 0,userName:v||void 0,page:o,pageSize:V7});t(e.items||[]),r(e.total||0)}catch(e){LG.error(e?.message||`加载创作记录失败`)}finally{a(!1)}},[u,c,o,g,v]);(0,S.useEffect)(()=>{A()},[A,b]),(0,S.useEffect)(()=>{if(!C){E(H7);return}let e=(C.mediaReferences||[]).reduce((e,t,n)=>{let r=Z7(t);return e[Q7(t,n)]=X7(r),e},{});k.current&&(k.current.pause(),k.current.currentTime=0),O(!1),E({image:X7(C.imageUrl),video:X7(C.videoUrl),videoCover:X7(C.videoCoverUrl),references:e})},[C]);let j=()=>{s(1),_(f.trim()),y(m.trim()),x(e=>e+1)},M=(0,S.useCallback)(e=>{w(e)},[]),N=()=>{k.current&&k.current.pause(),O(!1),w(null)},P=e=>{E(t=>({...t,...e}))},F=(e,t)=>{E(n=>({...n,references:{...n.references,[e]:t}}))},I=()=>{if(C?.videoUrl){if(Y7(C.videoUrl)){P({video:`invalid`}),LG.warning(`视频链接已超时,请刷新列表或重新搜索后再查看`);return}O(!0),window.setTimeout(()=>{k.current?.play().catch(()=>{O(!1),P({video:`invalid`}),LG.warning(`视频播放失败,请确认资源链接是否仍然有效`)})},0)}},L=(e,t=`素材`)=>{if(!e){LG.warning(`${t}链接为空,暂无法查看`);return}if(K7(e)){LG.warning(`本地临时素材已失效,暂无法查看`);return}if(Y7(e)){LG.warning(`${t}链接已超时,请刷新列表或重新搜索后再查看`);return}window.open(q7(e),`_blank`,`noopener,noreferrer`)},R=(0,S.useMemo)(()=>[{title:`用户`,key:`user`,width:150,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:13},children:t.userName||`未知用户`}),(0,Q.jsx)(`div`,{style:{fontSize:11,color:`#94a3b8`},children:Yne(t.userId)})]})},{title:`类型`,dataIndex:`genType`,width:90,render:e=>{let t=G7[e]||{text:e||`-`,color:`default`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`提示词`,key:`prompt`,ellipsis:!0,render:(e,t)=>(0,Q.jsx)(Ow,{title:t.originalPrompt,placement:`topLeft`,children:(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#475569`},ellipsis:!0,children:t.originalPrompt||`-`})})},{title:`参数`,key:`params`,width:180,render:(e,t)=>t.genType===`video`?t.duration||t.aspectRatio||t.resolution?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.duration?(0,Q.jsxs)(NQ,{children:[t.duration,`s`]}):null,t.aspectRatio?(0,Q.jsx)(NQ,{children:t.aspectRatio}):null,t.resolution?(0,Q.jsx)(NQ,{children:t.resolution}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`无参数`}):t.imageSize||t.imageProportion||t.imagePx?(0,Q.jsxs)(VV,{size:4,wrap:!0,children:[t.imageSize?(0,Q.jsx)(NQ,{children:t.imageSize}):null,t.imageProportion?(0,Q.jsx)(NQ,{children:t.imageProportion}):null,t.imagePx?(0,Q.jsx)(NQ,{children:t.imagePx}):null]}):(0,Q.jsx)(NQ,{color:`default`,children:`无参数`})},{title:`积分`,key:`credits`,width:130,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12},children:[(0,Q.jsxs)(`div`,{style:{color:`#6366f1`},children:[`总: `,t.creditsCost||0]}),t.textCreditsCost>0?(0,Q.jsxs)(`div`,{style:{color:`#f59e0b`},children:[`文字: `,t.textCreditsCost]}):null]})},{title:`状态`,dataIndex:`status`,width:100,render:e=>{let t=U7[e]||{color:`default`,text:e||`-`,icon:null};return(0,Q.jsx)(NQ,{color:t.color,icon:t.icon,children:t.text})}},{title:`阶段`,dataIndex:`pipelineStage`,width:120,render:e=>(0,Q.jsx)(NQ,{color:`blue`,children:W7[e]||e||`-`})},{title:`时间`,key:`time`,width:170,render:(e,t)=>(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[(0,Q.jsx)(`div`,{children:J7(t.createdAt)}),t.generatedAt?(0,Q.jsxs)(`div`,{style:{color:`#10b981`},children:[`生成: `,J7(t.generatedAt)]}):null]})},{title:`操作`,key:`action`,width:90,fixed:`right`,render:(e,t)=>(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>M(t),children:`详情`})}],[M]),z=C?G7[C.genType]||{text:C.genType||`-`,color:`default`,icon:null}:null,B=C?U7[C.status]||{color:`default`,text:C.status||`-`,icon:null}:null,V=()=>{if(!C||C.genType!==`image`||C.status!==`completed`)return null;if(!C.imageUrl)return(0,Q.jsx)(e9,{text:`此图片任务暂无结果图片`,minHeight:260});if(T.image===`invalid`)return(0,Q.jsx)(e9,{text:$7(C.imageUrl,`图片`),minHeight:260});let e=q7(C.imageUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,minHeight:260,borderRadius:12,background:`#f8f9fc`,border:`1px solid #e2e8f0`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:e,alt:`生成图片`,onLoad:()=>P({image:`valid`}),onError:()=>P({image:`invalid`}),style:{display:T.image===`valid`?`block`:`none`,width:`100%`,maxHeight:560,objectFit:`contain`,background:`#fff`}},`${C.id}-${e}`),T.image===`checking`?(0,Q.jsx)(e9,{text:`图片加载检测中...`,minHeight:260}):null]})},H=()=>{if(!C||D||T.video===`invalid`)return null;let e=C.videoUrl?(0,Q.jsx)(qE,{type:`primary`,shape:`circle`,size:`large`,icon:(0,Q.jsx)(X4,{}),onClick:I,style:{boxShadow:`0 8px 20px rgba(15,23,42,0.25)`}}):null;if(!C.videoCoverUrl)return(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,Q.jsx)(e9,{text:`此视频无封面`,minHeight:340,action:e})});if(T.videoCover===`invalid`)return(0,Q.jsx)(e9,{text:$7(C.videoCoverUrl,`视频封面`),minHeight:340,action:e});let t=q7(C.videoCoverUrl);return(0,Q.jsxs)(`div`,{style:{position:`absolute`,inset:0,borderRadius:12,overflow:`hidden`,background:`#f8f9fc`,border:`1px solid #e2e8f0`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,Q.jsx)(`img`,{src:t,alt:`视频封面`,onLoad:()=>P({videoCover:`valid`}),onError:()=>P({videoCover:`invalid`}),style:{display:T.videoCover===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`}},`${C.id}-cover-${t}`),T.videoCover===`checking`?(0,Q.jsx)(e9,{text:`视频封面加载检测中...`,minHeight:340,action:e}):null,T.videoCover===`valid`?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(15,23,42,0.18)`},children:e}):null]})},U=()=>{if(!C||C.genType!==`video`||C.status!==`completed`)return null;if(!C.videoUrl)return(0,Q.jsx)(e9,{text:`此视频任务暂无结果视频`,minHeight:340});if(T.video===`invalid`)return(0,Q.jsx)(e9,{text:$7(C.videoUrl,`视频`),minHeight:340});let e=q7(C.videoUrl);return(0,Q.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:340,borderRadius:12,background:`#000`,overflow:`hidden`,border:`1px solid #e2e8f0`},children:[(0,Q.jsx)(`video`,{ref:k,src:e,preload:`metadata`,controls:D,onLoadedMetadata:()=>P({video:`valid`}),onCanPlay:()=>P({video:`valid`}),onPlaying:()=>{O(!0),P({video:`valid`})},onPause:()=>O(!1),onEnded:()=>O(!1),onError:()=>{O(!1),P({video:`invalid`})},style:{width:`100%`,height:`100%`,objectFit:`contain`,background:`#000`,opacity:+!!D,pointerEvents:D?`auto`:`none`}},`${C.id}-${e}`),H()]})},W=(e,t)=>{let n=Z7(e),r=Zne(e),i=Q7(e,t),a=T.references[i]||X7(n),o=r===`image`,s=r===`video`,c=typeof e.name==`string`&&e.name?e.name:`参考素材 ${t+1}`;if(!n)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(e9,{text:`无链接`,compact:!0})}),(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})]},i);if(a===`invalid`)return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsx)(`div`,{style:{width:94,height:94},children:(0,Q.jsx)(e9,{text:K7(n)?`本地临时素材已失效`:`素材不可访问`,compact:!0})}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i);let l=q7(n);return(0,Q.jsxs)(`div`,{style:{width:94},children:[(0,Q.jsxs)(`div`,{role:`button`,tabIndex:0,title:`点击新页面查看素材`,onClick:()=>L(n,s?`视频素材`:o?`图片素材`:`素材`),onKeyDown:e=>{e.key===`Enter`&&L(n,s?`视频素材`:o?`图片素材`:`素材`)},style:{width:94,height:94,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,background:`#f8f9fc`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:[o?(0,Q.jsx)(`img`,{src:l,alt:c,onLoad:()=>F(i,`valid`),onError:()=>F(i,`invalid`),style:{display:a===`valid`?`block`:`none`,width:`100%`,height:`100%`,objectFit:`cover`}}):null,s?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`video`,{src:l,preload:`metadata`,onLoadedMetadata:()=>F(i,`valid`),onError:()=>F(i,`invalid`),style:{display:`none`}}),(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[(0,Q.jsx)(X4,{style:{fontSize:18}}),(0,Q.jsx)(`div`,{children:`视频素材`}),(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]})]}):null,!o&&!s?(0,Q.jsxs)(`div`,{style:{color:`#64748b`,fontSize:12,textAlign:`center`},children:[`文件素材`,(0,Q.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:2},children:`点击查看`})]}):null,a===`checking`&&o?(0,Q.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8f9fc`},children:(0,Q.jsx)(xm,{style:{color:`#6366f1`}})}):null]}),(0,Q.jsx)(Ow,{title:c,children:(0,Q.jsx)(Z.Text,{ellipsis:!0,style:{display:`block`,marginTop:4,fontSize:11,color:`#94a3b8`},children:c})})]},i)};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(X4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`创作记录管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[n,` 条记录`]})]}),(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`状态筛选`,value:c||void 0,style:{width:140},onChange:e=>{l(e||``),s(1)},options:[{value:`generating`,label:`生成中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`}]}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`类型筛选`,value:u||void 0,style:{width:120},onChange:e=>{d(e||``),s(1)},options:[{value:`image`,label:`图片`},{value:`video`,label:`视频`}]}),(0,Q.jsx)(hW,{placeholder:`用户ID搜索`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),style:{width:180},value:f,onChange:e=>p(e.target.value),onPressEnter:j,allowClear:!0}),(0,Q.jsx)(hW,{placeholder:`用户名搜索`,prefix:(0,Q.jsx)(NC,{style:{color:`#94a3b8`}}),style:{width:160},value:m,onChange:e=>h(e.target.value),onPressEnter:j,allowClear:!0}),(0,Q.jsx)(qE,{type:`primary`,onClick:j,style:{borderRadius:8},children:`搜索`})]})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:i,columns:R,dataSource:e,scroll:{x:1180},pagination:{current:o,pageSize:V7,total:n,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:e=>s(e)}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[C?.genType===`video`?(0,Q.jsx)(M6,{}):(0,Q.jsx)(_2,{}),(0,Q.jsx)(`span`,{children:`创作记录详情`})]}),open:!!C,onCancel:N,footer:null,width:900,destroyOnClose:!0,children:C?(0,Q.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:12},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12,flexWrap:`wrap`},children:[z?(0,Q.jsx)(NQ,{color:z.color,icon:z.icon,children:z.text}):null,B?(0,Q.jsx)(NQ,{color:B.color,icon:B.icon,children:B.text}):null,C.pipelineStage?(0,Q.jsx)(NQ,{color:`blue`,children:W7[C.pipelineStage]||C.pipelineStage}):null]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`用户名称`,value:C.userName||`未知用户`}),(0,Q.jsx)(t9,{label:`用户ID`,value:C.userId||`-`}),(0,Q.jsx)(t9,{label:`任务ID`,value:C.id})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,lineHeight:1.6},children:C.originalPrompt||`-`})]}),C.genType===`video`?(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`时长`,value:C.duration?`${C.duration}秒`:`-`}),(0,Q.jsx)(t9,{label:`画面比例`,value:C.aspectRatio||`-`}),(0,Q.jsx)(t9,{label:`分辨率`,value:C.resolution||`-`})]}):(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`图片档位`,value:C.imageSize||`-`}),(0,Q.jsx)(t9,{label:`图片比例`,value:C.imageProportion||`-`}),(0,Q.jsx)(t9,{label:`像素尺寸`,value:C.imagePx||`-`})]}),C.engineSnapshot?(0,Q.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`引擎快照`}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`引擎名称`,value:C.engineSnapshot.name||`-`}),(0,Q.jsx)(t9,{label:`服务商`,value:C.engineSnapshot.provider||`-`}),(0,Q.jsx)(t9,{label:`模型`,value:C.engineSnapshot.modelName||`-`}),(0,Q.jsx)(t9,{label:`引擎ID`,value:C.engineSnapshot.id||C.engineId||`-`})]})]}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`总积分`,value:(0,Q.jsx)(Z.Text,{strong:!0,style:{color:`#6366f1`},children:C.creditsCost||0})}),(0,Q.jsx)(t9,{label:`文字积分`,value:`${C.textCreditsCost||0} (${C.textTokensUsed||0} tokens)`}),(0,Q.jsx)(t9,{label:`图片 tokens`,value:C.imageTokensUsed??0}),(0,Q.jsx)(t9,{label:`视频 tokens`,value:C.videoTokensUsed??0})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,padding:12,borderRadius:10,background:`#f8f9fc`,flexWrap:`wrap`},children:[(0,Q.jsx)(t9,{label:`第三方任务ID`,value:C.providerTaskId||C.seedanceTaskId||`-`}),(0,Q.jsx)(t9,{label:`轮询次数`,value:C.pollCount??0}),(0,Q.jsx)(t9,{label:`重试次数`,value:C.retryCount??0})]}),!C?.mediaReferences||C.mediaReferences.length===0?null:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`参考内容`}),(0,Q.jsx)(`div`,{style:{display:`flex`,gap:10,flexWrap:`wrap`},children:C.mediaReferences.map((e,t)=>W(e,t))})]}),C.status===`completed`?(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:C.genType===`video`?`生成视频`:`生成图片`}),C.genType===`video`?U():V()]}):null,C.status===`failed`&&C.errorMessage?(0,Q.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(239,68,68,0.04)`,border:`1px solid rgba(239,68,68,0.15)`},children:(0,Q.jsxs)(Z.Text,{style:{fontSize:12,color:`#ef4444`},children:[`错误信息: `,C.errorMessage]})}):null,(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:16,fontSize:12,color:`#94a3b8`,flexWrap:`wrap`},children:[(0,Q.jsxs)(`span`,{children:[`创建: `,J7(C.createdAt)]}),(0,Q.jsxs)(`span`,{children:[`生成: `,J7(C.generatedAt)]})]})]}):(0,Q.jsx)(pC,{description:`暂无详情`})})]})},n9=20,$ne=[{value:`pending`,label:`已创建`},{value:`waiting_user`,label:`等待用户操作`},{value:`processing`,label:`处理中`},{value:`completed`,label:`已完成`},{value:`failed`,label:`失败`},{value:`cancelled`,label:`已取消`}],ere={pending:{color:`default`,text:`已创建`},waiting_user:{color:`processing`,text:`等待用户操作`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`已完成`},failed:{color:`error`,text:`失败`},cancelled:{color:`default`,text:`已取消`}},tre={material_input:`素材输入`,image_prompt_optimize:`图片 AI 提词`,image_generate:`图片生成`,video_prompt_optimize:`视频 AI 提词`,video_generate:`视频生成`},r9=e=>e?$5(e):`-`,i9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,nre=({status:e})=>{if(!e)return(0,Q.jsx)(NQ,{children:`-`});let t=ere[e]||{color:`blue`,text:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.text})},rre=()=>{let e=Ye(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(1),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(``),[h,g]=(0,S.useState)(``),[_,v]=(0,S.useState)(null),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(``),[w,T]=(0,S.useState)(``),[E,D]=(0,S.useState)(null),[O,k]=(0,S.useState)(0),A=(0,S.useCallback)(async()=>{o(!0);try{let e=await b5({status:l||void 0,keyword:y||void 0,userId:x||void 0,userName:w||void 0,createdStart:E?.[0]?.toISOString?.(),createdEnd:E?.[1]?.toISOString?.(),page:s,pageSize:n9});n(e.items||[]),i(e.total||0)}catch(e){LG.error(e?.message||`加载爆款开头复刻任务失败`)}finally{o(!1)}},[s,E,y,x,w,l]);(0,S.useEffect)(()=>{A()},[A,O]);let j=()=>{b(d.trim()),C(p.trim()),T(h.trim()),D(_),c(1)};return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsx)(PR,{children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{align:`center`,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:3,style:{marginBottom:4},children:`爆款开头复刻`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`只读排查页面:查看任务列表、素材、步骤详情和生成结果。`})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>k(e=>e+1),children:`刷新`})]}),(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`任务状态`,style:{width:160},value:l||void 0,onChange:e=>{u(e||``),c(1)},options:$ne}),(0,Q.jsx)(hW,{allowClear:!0,prefix:(0,Q.jsx)(NC,{}),placeholder:`关键词:标题/项目名/核心点`,style:{width:260},value:d,onChange:e=>f(e.target.value),onPressEnter:j}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户ID(管理员)`,style:{width:190},value:p,onChange:e=>m(e.target.value),onPressEnter:j}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户名(管理员)`,style:{width:230},value:h,onChange:e=>g(e.target.value),onPressEnter:j}),(0,Q.jsx)(YB.RangePicker,{showTime:!0,value:_,onChange:v,placeholder:[`创建开始`,`创建结束`]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(NC,{}),onClick:j,children:`搜索`}),(0,Q.jsx)(qE,{onClick:()=>{u(``),f(``),m(``),g(``),v(null),b(``),C(``),T(``),D(null),c(1),k(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:a,dataSource:t,pagination:{current:s,pageSize:n9,total:r,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:c},scroll:{x:1380},columns:[{title:`项目ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Ow,{title:e,children:i9(e)})},{title:`用户`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(Z.Text,{children:t.userName||`-`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:i9(t.userId)})]})},{title:`项目信息`,width:260,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:2,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.title||t.targetProjectName||`-`}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:240},children:[`素材:`,t.sourceProjectName||`-`]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:240},children:[`核心:`,t.coreContentPoint||`-`]})]})},{title:`状态`,dataIndex:`status`,width:130,render:e=>(0,Q.jsx)(nre,{status:e})},{title:`当前步骤`,dataIndex:`currentStepCode`,width:140,render:e=>tre[e]||e||`-`},{title:`图片结果`,dataIndex:`finalImageUrl`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`success`,children:`有`}):(0,Q.jsx)(NQ,{children:`无`})},{title:`视频结果`,dataIndex:`finalVideoUrl`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`success`,children:`有`}):(0,Q.jsx)(NQ,{children:`无`})},{title:`错误信息`,dataIndex:`errorMessage`,width:220,ellipsis:!0,render:e=>e||`-`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:r9},{title:`更新时间`,dataIndex:`updatedAt`,width:170,render:r9},{title:`操作`,fixed:`right`,width:110,render:(t,n)=>(0,Q.jsx)(qE,{type:`link`,icon:(0,Q.jsx)(qU,{}),onClick:()=>e(`/hot-opening-replications/${n.id}`),children:`详情`})}]})]})})})},a9=({value:e,maxHeight:t=420})=>e==null||e===``?(0,Q.jsx)(pC,{image:pC.PRESENTED_IMAGE_SIMPLE,description:`暂无 JSON 数据`}):(0,Q.jsx)(`pre`,{style:{margin:0,padding:12,maxHeight:t,overflow:`auto`,background:`#0f172a`,color:`#e2e8f0`,borderRadius:8,fontSize:12,lineHeight:1.6},children:JSON.stringify(e,null,2)}),ire=({input:e,output:t,raw:n,inputLabel:r=`查看 input_json`,outputLabel:i=`查看 output_json`,rawLabel:a=`查看原始 JSON`})=>{let o=[];return e!==void 0&&o.push({key:`input`,label:r,children:(0,Q.jsx)(a9,{value:e})}),t!==void 0&&o.push({key:`output`,label:i,children:(0,Q.jsx)(a9,{value:t})}),n!==void 0&&o.push({key:`raw`,label:a,children:(0,Q.jsx)(a9,{value:n})}),o.length?(0,Q.jsx)(Ng,{size:`small`,style:{marginTop:12},items:o}):null},are=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``);function ore(e){if(!e)return``;let t=String(e).trim();return t?/^(https?:)?\/\//i.test(t)||/^(blob|data):/i.test(t)?t:`${are}${t.startsWith(`/`)?t:`/${t}`}`:``}var o9=({url:e,type:t,height:n=260,emptyDescription:r=`暂无资源`,errorDescription:i=`资源加载失败,可能文件不存在、签名过期或访问权限受限。`})=>{let a=(0,S.useMemo)(()=>ore(e),[e]),[o,s]=(0,S.useState)(!1);(0,S.useEffect)(()=>{s(!1)},[a]);let c=a?(0,Q.jsxs)(VV,{wrap:!0,style:{marginTop:8},children:[(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(c$,{}),onClick:async()=>{if(a)try{await navigator.clipboard.writeText(a),LG.success(`资源地址已复制`)}catch{LG.error(`复制失败,请手动复制`)}},children:`复制地址`}),(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(c4,{}),onClick:()=>window.open(a,`_blank`,`noopener,noreferrer`),children:`新窗口打开`}),(0,Q.jsx)(Z.Text,{copyable:{text:a},type:`secondary`,style:{maxWidth:460},ellipsis:!0,children:a})]}):null;return a?(0,Q.jsxs)(`div`,{children:[o?(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`资源预览失败`,description:i,style:{marginBottom:8}}):null,t===`image`?(0,Q.jsx)(PU,{src:a,onError:()=>s(!0),style:{width:`100%`,maxHeight:n,objectFit:`contain`,borderRadius:12,background:`#f8fafc`,border:`1px solid #f1f5f9`},fallback:``,preview:!o}):(0,Q.jsx)(`video`,{src:a,controls:!0,preload:`metadata`,onError:()=>s(!0),style:{width:`100%`,maxHeight:n,borderRadius:12,background:`#0f172a`,border:`1px solid #f1f5f9`}}),c]}):(0,Q.jsx)(`div`,{children:(0,Q.jsx)(`div`,{style:{height:n,borderRadius:12,border:`1px dashed #cbd5e1`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8fafc`},children:(0,Q.jsx)(pC,{image:pC.PRESENTED_IMAGE_SIMPLE,description:r})})})},s9={pending:{text:`待处理`,color:`default`},waiting_user:{text:`等待用户操作`,color:`processing`},processing:{text:`处理中`,color:`warning`},completed:{text:`已完成`,color:`success`},failed:{text:`失败`,color:`error`},cancelled:{text:`已取消`,color:`default`},canceled:{text:`已取消`,color:`default`},timeout:{text:`已超时`,color:`error`},queued:{text:`已入队`,color:`processing`},preparing:{text:`准备中`,color:`processing`},creating_provider_task:{text:`创建远端任务`,color:`processing`},waiting_remote:{text:`等待远端结果`,color:`processing`},polling:{text:`轮询远端结果`,color:`processing`},result_ready:{text:`结果已就绪`,color:`success`},downloading:{text:`下载中`,color:`processing`},done:{text:`已完成`,color:`success`},download_failed:{text:`下载失败`,color:`error`},retry_waiting:{text:`等待重试`,color:`orange`},pending_analysis:{text:`等待分析`,color:`default`},analyzing:{text:`分析中`,color:`processing`},analysis_completed:{text:`分析完成`,color:`success`},analysis_failed:{text:`分析失败`,color:`error`},splitting:{text:`拆镜中`,color:`warning`},split_completed:{text:`拆镜完成`,color:`success`},partial_failed:{text:`部分失败`,color:`orange`},none:{text:`未拆镜`,color:`default`},not_required:{text:`无需处理`,color:`default`},not_started:{text:`未开始`,color:`default`},project_created:{text:`已创建项目`,color:`processing`},true:{text:`是`,color:`success`},false:{text:`否`,color:`default`}},c9={material_input:`素材输入`,image_prompt_optimize:`图片 AI 提词`,image_generate:`图片生成`,video_prompt_optimize:`视频 AI 提词`,video_generate:`视频生成`},l9={hot_opening_replicate:`爆款开头复刻`,shot_replicate:`拆镜复刻`},u9={ai_suggestion:{text:`AI 建议`,color:`purple`},custom:{text:`自定义`,color:`cyan`},original:{text:`原视频`,color:`blue`}};function d9(e){return e?l9[e]||e:`-`}function f9(e){return e?c9[e]||e:`-`}function sre(e){return e?s9[e]?.text||c9[e]||l9[e]||u9[e]?.text||e:`-`}function cre(e){return e?s9[e]?.color||u9[e]?.color||`blue`:`default`}var p9=({status:e,tooltipRaw:t=!0})=>{if(e==null||e===``)return(0,Q.jsx)(NQ,{children:`-`});let n=String(e),r=sre(n),i=(0,Q.jsx)(NQ,{color:cre(n),children:r});return!t||r===n?i:(0,Q.jsx)(Ow,{title:n,children:i})};function m9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function h9(e,...t){for(let n of t){let t=e[n];if(t!=null&&String(t).trim()!==``)return String(t)}return``}function g9(e,t,...n){for(let t of n){let n=e[t];if(n===!0||n===!1)return n;if(n===`true`)return!0;if(n===`false`)return!1}return t}function lre(e,...t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t)&&t>0)return t;if(typeof t==`string`&&t.trim()){let e=Number(t);if(Number.isFinite(e)&&e>0)return e}}}function _9(e){if(!m9(e))return null;let t=h9(e,`key`);return t?{key:t,label:h9(e,`label`)||t,type:h9(e,`type`)||void 0,enabled:g9(e,!0,`enabled`),editable:g9(e,!0,`editable`),maxLength:lre(e,`maxLength`,`max_length`)}:null}function v9(e){if(!m9(e))return null;let t=e.data;return m9(t)?t:Array.isArray(e.sections)?e:null}function ure(e){return!!v9(e)}function dre(e){let t=v9(e);return(Array.isArray(t?.sections)?t.sections:[]).map(e=>{let t=_9(e);if(!t||!m9(e))return null;let n=Array.isArray(e.children)?e.children.map(_9).filter(Boolean):[],r=Array.isArray(e.itemFields)?e.itemFields.map(_9).filter(Boolean):Array.isArray(e.item_fields)?e.item_fields.map(_9).filter(Boolean):[];return{...t,contentKey:h9(e,`contentKey`,`content_key`)||void 0,children:n,itemFields:r}}).filter(e=>!!e&&e.enabled)}function fre(e){return m9(e)?Object.entries(e).filter(([e])=>![`schemaVersion`,`schemaUsage`,`schema_version`,`schema_usage`].includes(e)).map(([e,t])=>Array.isArray(t)&&t.every(m9)?{key:e,label:e,type:`flow`,enabled:!0,editable:!1,itemFields:Array.from(new Set(t.flatMap(e=>Object.keys(e)))).filter(e=>e!==`时间段`).map(e=>({key:e,label:e,enabled:!0,editable:!1})),children:[]}:m9(t)?{key:e,label:e,type:`object`,enabled:!0,editable:!1,children:Object.keys(t).map(e=>({key:e,label:e,enabled:!0,editable:!1})),itemFields:[]}:{key:e,label:e,type:`text`,enabled:!0,editable:!1,children:[],itemFields:[]}):[]}var y9=e=>!!e&&typeof e==`object`&&!Array.isArray(e),b9=e=>typeof e==`string`&&e.length>80,x9=e=>e==null||e===``?(0,Q.jsx)(Z.Text,{type:`secondary`,children:`-`}):typeof e==`boolean`?e?`是`:`否`:typeof e==`number`?e:typeof e==`string`?(0,Q.jsx)(Z.Paragraph,{style:{marginBottom:0,whiteSpace:`pre-wrap`},children:e}):(0,Q.jsx)(a9,{value:e,maxHeight:220}),S9=e=>e?(0,Q.jsx)(NQ,{color:`processing`,children:`可编辑`}):(0,Q.jsx)(NQ,{color:`default`,children:`只读`}),C9=(e,t)=>e[t],pre=(e,t)=>{let n=C9(e,t.key);if(!y9(n))return(0,Q.jsx)(a9,{value:n??{},maxHeight:220});let r=t.children.filter(e=>e.enabled);return r.length?(0,Q.jsx)(lV,{size:`small`,column:2,bordered:!0,children:r.map(e=>(0,Q.jsx)(lV.Item,{label:(0,Q.jsxs)(VV,{size:4,children:[e.label,S9(e.editable)]}),span:b9(n[e.key])||y9(n[e.key])||Array.isArray(n[e.key])?2:1,children:x9(n[e.key])},e.key))}):(0,Q.jsx)(a9,{value:n,maxHeight:220})},mre=(e,t)=>{let n=e.itemFields.filter(e=>e.enabled);return n.length?[{key:`时间段`,label:`时间段`,enabled:!0,editable:!1},...n]:Array.from(new Set(t.flatMap(e=>Object.keys(e)))).map(e=>({key:e,label:e,enabled:!0,editable:!1}))},hre=(e,t)=>{let n=C9(e,t.key);if(!Array.isArray(n)||!n.every(y9))return(0,Q.jsx)(a9,{value:n??[],maxHeight:260});let r=n,i=mre(t,r);return(0,Q.jsx)(bQ,{size:`small`,rowKey:(e,n)=>`${t.key}-${n}`,columns:i.map(e=>({title:(0,Q.jsxs)(VV,{size:4,children:[e.label,S9(e.editable)]}),dataIndex:e.key,key:e.key,width:b9(r.find(t=>t[e.key])?.[e.key])?320:160,render:e=>x9(e)})),dataSource:r,pagination:!1,scroll:{x:Math.max(900,i.length*180)},tableLayout:`fixed`})},gre=(e,t)=>x9(C9(e,t.key)),_re=({schema:e,finalPrompt:t,schemaConfigSnapshot:n,schemaConfigSource:r,schemaConfigVersion:i,schemaConfigIsFallback:a})=>{let o=!!e&&Object.keys(e).length>0;if(!o&&!t)return(0,Q.jsx)(pC,{description:`暂无视频提词 schema`});let s=o?e:{},c=ure(n),l=(c?dre(n):fre(s)).filter(e=>e.key in s).map(e=>({key:e.key,label:(0,Q.jsxs)(VV,{size:8,wrap:!0,children:[(0,Q.jsx)(`span`,{children:e.label}),S9(e.editable),c?null:(0,Q.jsx)(NQ,{color:`warning`,children:`管理后台兜底展示`})]}),children:e.type===`object`?pre(s,e):e.type===`flow`?hre(s,e):gre(s,e)}));return(0,Q.jsxs)(VV,{direction:`vertical`,size:12,style:{width:`100%`},children:[(0,Q.jsx)(PR,{size:`small`,title:`Schema 配置来源`,children:(0,Q.jsxs)(lV,{size:`small`,column:3,bordered:!0,children:[(0,Q.jsx)(lV.Item,{label:`来源`,children:r||n?.source||(c?`-`:`viewer_fallback`)}),(0,Q.jsx)(lV.Item,{label:`版本`,children:i||n?.version||`-`}),(0,Q.jsx)(lV.Item,{label:`历史兜底`,children:a||!c?(0,Q.jsx)(NQ,{color:`warning`,children:`是`}):(0,Q.jsx)(NQ,{color:`success`,children:`否`})})]})}),t?(0,Q.jsx)(PR,{size:`small`,title:`最终视频提示词`,children:(0,Q.jsx)(Z.Paragraph,{style:{whiteSpace:`pre-wrap`,marginBottom:0},children:t})}):null,l.length?(0,Q.jsx)(Ng,{size:`small`,items:l}):o?(0,Q.jsx)(PR,{size:`small`,title:`视频提词 Schema`,children:(0,Q.jsx)(a9,{value:s,maxHeight:360})}):null,o?(0,Q.jsx)(Ng,{size:`small`,items:[{key:`raw_schema`,label:`原始 JSON / 历史脏字段排查`,children:(0,Q.jsx)(a9,{value:s,maxHeight:420})}]}):null]})},vre=[`material_input`,`image_prompt_optimize`,`image_generate`,`video_prompt_optimize`,`video_generate`],yre={material_input:`参考素材、项目名称和核心内容点`,image_prompt_optimize:`图片 AI 提词优化结果`,image_generate:`图片引擎、生成参数和结果图`,video_prompt_optimize:`视频 JSON schema、动作流程和最终提词`,video_generate:`视频引擎、生成参数、封面和结果视频`},w9=e=>e?$5(e):`-`,T9=e=>e?e.length>18?`${e.slice(0,10)}...${e.slice(-4)}`:e:`-`,bre=({text:e=`-`})=>(0,Q.jsx)(Z.Text,{type:`secondary`,children:e}),E9=({step:e})=>e?(0,Q.jsx)(ire,{input:e.input,output:e.output}):null,D9=({index:e,stepCode:t,step:n,current:r})=>(0,Q.jsxs)(VV,{wrap:!0,size:8,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:`第${e}步:${f9(t)}`}),(0,Q.jsx)(p9,{status:n?.status||`not_started`}),r?(0,Q.jsx)(NQ,{color:`blue`,children:`当前步骤`}):null,(0,Q.jsx)(Z.Text,{type:`secondary`,children:yre[t]||t}),n?.updatedAt?(0,Q.jsxs)(Z.Text,{type:`secondary`,children:[`更新时间:`,w9(n.updatedAt)]}):null,n?.chatTaskId?(0,Q.jsx)(Ow,{title:n.chatTaskId,children:(0,Q.jsxs)(NQ,{children:[`Chat:`,T9(n.chatTaskId)]})}):null]}),xre=(e,t)=>{if(!e)return[];let n=new Set;return n.add(`material_input`),e.currentStepCode&&n.add(e.currentStepCode),Object.values(t).forEach(e=>{(e.status===`failed`||e.errorMessage)&&n.add(e.stepCode)}),e.errorMessage&&n.add(e.currentStepCode||`material_input`),Array.from(n)},O9=(e,t=`错误信息`)=>e?(0,Q.jsx)(sf,{type:`error`,showIcon:!0,message:t,description:e,style:{marginTop:12,marginBottom:12}}):null,Sre=(e,t=`暂无提词`)=>e?(0,Q.jsx)(Z.Paragraph,{style:{whiteSpace:`pre-wrap`,marginBottom:0},children:e}):(0,Q.jsx)(bre,{text:t}),k9=({moduleType:e=`shot_replicate`})=>{let{projectId:t}=$e(),n=Ye(),[r,i]=(0,S.useState)(null),[a,o]=(0,S.useState)(!1),s=(0,S.useCallback)(async()=>{if(t){o(!0);try{i(e===`hot_opening_replicate`?await x5(t):await E5(t))}catch(e){LG.error(e?.message||`加载复刻项目详情失败`)}finally{o(!1)}}},[e,t]);(0,S.useEffect)(()=>{s()},[s]);let c=(0,S.useMemo)(()=>{let e={};return(r?.steps||[]).forEach(t=>{e[t.stepCode]=t}),e},[r]),l=r?.module||e,u=d9(l),d=(0,S.useMemo)(()=>vre.map(e=>{let t=c[e],n=`wait`;return t?.status===`completed`?n=`finish`:t?.status===`processing`?n=`process`:t?.status===`failed`&&(n=`error`),{title:f9(e),description:t?(0,Q.jsx)(p9,{status:t.status}):`未创建`,status:n}}),[c]),f=(0,S.useMemo)(()=>xre(r,c),[r,c]);if(a&&!r)return(0,Q.jsx)(`div`,{style:{padding:64,textAlign:`center`},children:(0,Q.jsx)(SG,{size:`large`})});if(!r)return(0,Q.jsx)(PR,{style:{margin:24},children:(0,Q.jsx)(pC,{description:`未找到复刻项目详情`})});let p=c.material_input,m=c.image_prompt_optimize,h=c.image_generate,g=c.video_prompt_optimize,_=c.video_generate,v=r.imageGeneration?.resultImageUrl||r.finalImageUrl,y=r.videoGeneration?.resultVideoCoverUrl||r.finalVideoCoverUrl,b=r.videoGeneration?.resultVideoUrl||r.finalVideoUrl,x=[{key:`material_input`,label:(0,Q.jsx)(D9,{index:1,stepCode:`material_input`,step:p,current:r.currentStepCode===`material_input`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`模块类型`,children:(0,Q.jsx)(p9,{status:l})}),(0,Q.jsx)(lV.Item,{label:`素材步骤ID`,children:r.material?.materialStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`参考素材项目名`,children:r.material?.sourceProjectName||`-`}),(0,Q.jsx)(lV.Item,{label:`生成项目名称`,children:r.material?.targetProjectName||`-`}),(0,Q.jsx)(lV.Item,{label:`核心内容点`,span:2,children:r.material?.coreContentPoint||`-`})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(320px, 1fr))`,gap:16},children:[(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(X4,{}),`素材视频`]}),children:(0,Q.jsx)(o9,{type:`video`,url:r.material?.materialVideoUrl,emptyDescription:`暂无素材视频`})}),(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(_2,{}),`素材图片`]}),children:(0,Q.jsx)(o9,{type:`image`,url:r.material?.materialImageUrl,emptyDescription:`暂无素材图片`})})]}),O9(p?.errorMessage),(0,Q.jsx)(E9,{step:p})]})},{key:`image_prompt_optimize`,label:(0,Q.jsx)(D9,{index:2,stepCode:`image_prompt_optimize`,step:m,current:r.currentStepCode===`image_prompt_optimize`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`提词步骤ID`,children:r.imageGeneration?.promptStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`步骤状态`,children:(0,Q.jsx)(p9,{status:m?.status||r.imageGeneration?.status})}),(0,Q.jsx)(lV.Item,{label:`图片提示词`,span:2,children:Sre(r.imageGeneration?.prompt,`暂无图片提示词`)})]}),O9(m?.errorMessage||r.imageGeneration?.errorMessage),(0,Q.jsx)(E9,{step:m})]})},{key:`image_generate`,label:(0,Q.jsx)(D9,{index:3,stepCode:`image_generate`,step:h,current:r.currentStepCode===`image_generate`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`生成步骤ID`,children:r.imageGeneration?.generateStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`Chat任务ID`,children:r.imageGeneration?.chatTaskId||`-`}),(0,Q.jsx)(lV.Item,{label:`状态`,children:(0,Q.jsx)(p9,{status:r.imageGeneration?.status||h?.status})}),(0,Q.jsx)(lV.Item,{label:`图片引擎ID`,children:r.imageGeneration?.engineId||`-`}),(0,Q.jsx)(lV.Item,{label:`图片引擎名称`,children:r.imageGeneration?.engineName||`-`}),(0,Q.jsx)(lV.Item,{label:`生成参数`,span:3,children:(0,Q.jsx)(a9,{value:r.imageGeneration?.params||{},maxHeight:160})})]}),O9(r.imageGeneration?.errorMessage||h?.errorMessage),(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(_2,{}),`图片结果`]}),children:(0,Q.jsx)(o9,{type:`image`,url:v,height:360,emptyDescription:h?.status===`failed`||r.imageGeneration?.errorMessage?`图片生成失败,未返回图片地址`:`暂无图片结果`,errorDescription:`图片资源加载失败,可能图片文件不存在、签名过期或访问权限受限。`})}),(0,Q.jsx)(E9,{step:h})]})},{key:`video_prompt_optimize`,label:(0,Q.jsx)(D9,{index:4,stepCode:`video_prompt_optimize`,step:g,current:r.currentStepCode===`video_prompt_optimize`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`提词步骤ID`,children:r.videoGeneration?.promptStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`步骤状态`,children:(0,Q.jsx)(p9,{status:g?.status})}),(0,Q.jsx)(lV.Item,{label:`提词参数`,span:3,children:(0,Q.jsx)(a9,{value:r.videoGeneration?.promptParams||{},maxHeight:160})})]}),O9(g?.errorMessage||r.videoGeneration?.errorMessage),(0,Q.jsx)(_re,{schema:r.videoGeneration?.promptSchema,finalPrompt:r.videoGeneration?.finalPrompt,schemaConfigSnapshot:r.videoGeneration?.schemaConfigSnapshot,schemaConfigSource:r.videoGeneration?.schemaConfigSource,schemaConfigVersion:r.videoGeneration?.schemaConfigVersion,schemaConfigIsFallback:r.videoGeneration?.schemaConfigIsFallback}),(0,Q.jsx)(E9,{step:g})]})},{key:`video_generate`,label:(0,Q.jsx)(D9,{index:5,stepCode:`video_generate`,step:_,current:r.currentStepCode===`video_generate`}),children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`生成步骤ID`,children:r.videoGeneration?.generateStepId||`-`}),(0,Q.jsx)(lV.Item,{label:`Chat任务ID`,children:r.videoGeneration?.chatTaskId||`-`}),(0,Q.jsx)(lV.Item,{label:`状态`,children:(0,Q.jsx)(p9,{status:r.videoGeneration?.status||_?.status})}),(0,Q.jsx)(lV.Item,{label:`视频引擎ID`,children:r.videoGeneration?.engineId||`-`}),(0,Q.jsx)(lV.Item,{label:`视频引擎名称`,children:r.videoGeneration?.engineName||`-`}),(0,Q.jsx)(lV.Item,{label:`生成参数`,span:3,children:(0,Q.jsx)(a9,{value:r.videoGeneration?.params||{},maxHeight:160})})]}),O9(r.videoGeneration?.errorMessage||_?.errorMessage),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(320px, 1fr))`,gap:16},children:[(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(_2,{}),`视频封面`]}),children:(0,Q.jsx)(o9,{type:`image`,url:y,emptyDescription:_?.status===`failed`||r.videoGeneration?.errorMessage?`视频生成失败,未返回封面`:`暂无视频封面`,errorDescription:`视频封面加载失败,可能文件不存在、签名过期或访问权限受限。`})}),(0,Q.jsx)(PR,{size:`small`,title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(M6,{}),`最终视频`]}),children:(0,Q.jsx)(o9,{type:`video`,url:b,emptyDescription:_?.status===`failed`||r.videoGeneration?.errorMessage?`视频生成失败,未返回视频地址`:`暂无最终视频`,errorDescription:`视频资源加载失败,可能文件不存在、签名过期或访问权限受限。`})})]}),(0,Q.jsx)(E9,{step:_})]})}];return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{wrap:!0,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(X1,{}),onClick:()=>n(-1),children:`返回`}),(0,Q.jsxs)(Z.Title,{level:3,style:{margin:0},children:[u,`项目详情`]}),(0,Q.jsx)(p9,{status:r.status}),r.module&&r.module!==e?(0,Q.jsxs)(NQ,{color:`gold`,children:[`接口模块:`,d9(r.module)]}):null]}),(0,Q.jsx)(qE,{onClick:s,loading:a,children:`刷新`})]}),(0,Q.jsx)(PR,{children:(0,Q.jsxs)(lV,{title:`基础信息`,column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`项目ID`,children:r.id}),(0,Q.jsx)(lV.Item,{label:`模块类型`,children:(0,Q.jsx)(p9,{status:l})}),(0,Q.jsx)(lV.Item,{label:`用户ID`,children:r.userId||`-`}),(0,Q.jsx)(lV.Item,{label:`用户名`,children:r.userName||`-`}),(0,Q.jsx)(lV.Item,{label:`标题`,children:r.title||`-`}),(0,Q.jsx)(lV.Item,{label:`当前步骤`,children:(0,Q.jsx)(Ow,{title:r.currentStepCode||``,children:f9(r.currentStepCode)})}),(0,Q.jsx)(lV.Item,{label:`状态`,children:(0,Q.jsx)(p9,{status:r.status})}),(0,Q.jsx)(lV.Item,{label:`创建时间`,children:w9(r.createdAt)}),(0,Q.jsx)(lV.Item,{label:`更新时间`,children:w9(r.updatedAt)}),(0,Q.jsx)(lV.Item,{label:`完成时间`,children:w9(r.completedAt)}),r.errorMessage?(0,Q.jsx)(lV.Item,{label:`错误信息`,span:3,children:(0,Q.jsx)(sf,{type:`error`,showIcon:!0,message:r.errorMessage})}):null]})}),(0,Q.jsx)(PR,{title:`步骤进度`,children:(0,Q.jsx)(Cq,{items:d})}),(0,Q.jsx)(PR,{title:`最终结果预览`,children:(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(280px, 1fr))`,gap:16},children:[(0,Q.jsx)(PR,{size:`small`,title:`最终图片`,children:(0,Q.jsx)(o9,{type:`image`,url:r.finalImageUrl||r.imageGeneration?.resultImageUrl,height:220,emptyDescription:`暂无最终图片`})}),(0,Q.jsx)(PR,{size:`small`,title:`最终视频封面`,children:(0,Q.jsx)(o9,{type:`image`,url:r.finalVideoCoverUrl||r.videoGeneration?.resultVideoCoverUrl,height:220,emptyDescription:`暂无最终视频封面`})}),(0,Q.jsx)(PR,{size:`small`,title:`最终视频`,children:(0,Q.jsx)(o9,{type:`video`,url:r.finalVideoUrl||r.videoGeneration?.resultVideoUrl,height:220,emptyDescription:`暂无最终视频`})})]})}),(0,Q.jsx)(Ng,{defaultActiveKey:f,items:x}),(0,Q.jsx)(Ng,{items:[{key:`steps-table`,label:`完整步骤列表`,children:(0,Q.jsx)(bQ,{rowKey:`id`,size:`small`,pagination:!1,dataSource:r.steps||[],scroll:{x:1100},columns:[{title:`序号`,dataIndex:`stepIndex`,width:70},{title:`步骤`,dataIndex:`stepCode`,width:160,render:e=>(0,Q.jsx)(Ow,{title:e,children:f9(e)})},{title:`状态`,dataIndex:`status`,width:120,render:e=>(0,Q.jsx)(p9,{status:e})},{title:`版本`,dataIndex:`version`,width:70},{title:`当前有效`,dataIndex:`isCurrent`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`success`,children:`是`}):(0,Q.jsx)(NQ,{children:`否`})},{title:`Chat任务`,dataIndex:`chatTaskId`,width:160,render:e=>(0,Q.jsx)(Ow,{title:e||``,children:T9(e)})},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:w9},{title:`完成时间`,dataIndex:`completedAt`,width:170,render:w9},{title:`错误`,dataIndex:`errorMessage`,ellipsis:!0,render:e=>e||`-`}]})},{key:`raw-detail`,label:`完整详情原始 JSON`,children:(0,Q.jsx)(a9,{value:r,maxHeight:520})}]})]})})},Cre=()=>(0,Q.jsx)(k9,{moduleType:`hot_opening_replicate`}),A9=20,wre=[{value:`pending_analysis`,label:`等待分析`},{value:`analyzing`,label:`分析中`},{value:`analysis_completed`,label:`分析完成`},{value:`analysis_failed`,label:`分析失败`},{value:`splitting`,label:`拆镜中`},{value:`split_completed`,label:`拆镜完成`},{value:`partial_failed`,label:`部分失败`},{value:`failed`,label:`失败`}],Tre=[{value:`pending`,label:`待分析`},{value:`processing`,label:`分析中`},{value:`completed`,label:`分析完成`},{value:`failed`,label:`分析失败`}],Ere=[{value:`none`,label:`未拆镜`},{value:`pending`,label:`待拆镜`},{value:`processing`,label:`拆镜中`},{value:`completed`,label:`拆镜完成`},{value:`failed`,label:`拆镜失败`},{value:`retry_waiting`,label:`等待重试`}],Dre={pending_analysis:{color:`default`,text:`等待分析`},analyzing:{color:`processing`,text:`分析中`},analysis_completed:{color:`success`,text:`分析完成`},analysis_failed:{color:`error`,text:`分析失败`},splitting:{color:`warning`,text:`拆镜中`},split_completed:{color:`success`,text:`拆镜完成`},partial_failed:{color:`orange`,text:`部分失败`},failed:{color:`error`,text:`失败`},none:{color:`default`,text:`未拆镜`},pending:{color:`default`,text:`待处理`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`完成`},retry_waiting:{color:`orange`,text:`等待重试`}},j9=e=>e?$5(e):`-`,M9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,N9=({status:e})=>{if(!e)return(0,Q.jsx)(NQ,{children:`-`});let t=Dre[e]||{color:`blue`,text:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.text})},Ore=()=>{let e=Ye(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(1),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(``),[h,g]=(0,S.useState)(``),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(null),[w,T]=(0,S.useState)(``),[E,D]=(0,S.useState)(``),[O,k]=(0,S.useState)(``),[A,j]=(0,S.useState)(null),[M,N]=(0,S.useState)(0),P=(0,S.useCallback)(async()=>{o(!0);try{let e=await S5({status:l||void 0,analysisStatus:d||void 0,splitStatus:p||void 0,keyword:w||void 0,userId:E||void 0,userName:O||void 0,createdStart:A?.[0]?.toISOString?.(),createdEnd:A?.[1]?.toISOString?.(),page:s,pageSize:A9});n(e.items||[]),i(e.total||0)}catch(e){LG.error(e?.message||`加载拆镜复刻任务失败`)}finally{o(!1)}},[d,s,A,w,E,O,p,l]);(0,S.useEffect)(()=>{P()},[P,M]);let F=()=>{T(h.trim()),D(_.trim()),k(y.trim()),j(x),c(1)};return(0,Q.jsx)(`div`,{style:{padding:24},children:(0,Q.jsx)(PR,{children:(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{align:`center`,style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:3,style:{marginBottom:4},children:`拆镜复刻`}),(0,Q.jsx)(Z.Text,{type:`secondary`,children:`只读排查页面:查看拆镜总任务、AI 分析结果、切片列表和关联复刻项目。`})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>N(e=>e+1),children:`刷新`})]}),(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`总任务状态`,style:{width:150},value:l||void 0,onChange:e=>{u(e||``),c(1)},options:wre}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`分析状态`,style:{width:140},value:d||void 0,onChange:e=>{f(e||``),c(1)},options:Tre}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`拆镜状态`,style:{width:140},value:p||void 0,onChange:e=>{m(e||``),c(1)},options:Ere}),(0,Q.jsx)(hW,{allowClear:!0,prefix:(0,Q.jsx)(NC,{}),placeholder:`关键词:标题/内容/分类/受众`,style:{width:260},value:h,onChange:e=>g(e.target.value),onPressEnter:F}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户ID(管理员)`,style:{width:190},value:_,onChange:e=>v(e.target.value),onPressEnter:F}),(0,Q.jsx)(hW,{allowClear:!0,placeholder:`用户名(管理员)`,style:{width:230},value:y,onChange:e=>b(e.target.value),onPressEnter:F}),(0,Q.jsx)(YB.RangePicker,{showTime:!0,value:x,onChange:C,placeholder:[`创建开始`,`创建结束`]}),(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(NC,{}),onClick:F,children:`搜索`}),(0,Q.jsx)(qE,{onClick:()=>{u(``),f(``),m(``),g(``),v(``),b(``),C(null),T(``),D(``),k(``),j(null),c(1),N(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:a,dataSource:t,pagination:{current:s,pageSize:A9,total:r,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:c},scroll:{x:1500},columns:[{title:`任务集ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Ow,{title:e,children:M9(e)})},{title:`用户`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(Z.Text,{children:t.userName||`-`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:M9(t.userId)})]})},{title:`任务信息`,width:300,render:(e,t)=>(0,Q.jsxs)(VV,{direction:`vertical`,size:2,children:[(0,Q.jsx)(Z.Text,{strong:!0,children:t.title||`-`}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:280},children:[`分类:`,t.originalVideoCategory||`-`]}),(0,Q.jsxs)(Z.Text,{type:`secondary`,ellipsis:!0,style:{maxWidth:280},children:[`受众:`,t.originalVideoAudience||`-`]})]})},{title:`总状态`,dataIndex:`status`,width:120,render:e=>(0,Q.jsx)(N9,{status:e})},{title:`分析状态`,dataIndex:`analysisStatus`,width:110,render:e=>(0,Q.jsx)(N9,{status:e})},{title:`拆镜状态`,dataIndex:`splitStatus`,width:110,render:e=>(0,Q.jsx)(N9,{status:e})},{title:`切片进度`,width:180,render:(e,t)=>{let n=t.segmentCount||0,r=t.completedSegmentCount||0;return(0,Q.jsx)(CK,{size:`small`,percent:n?Math.round(r/n*100):0,format:()=>`${r}/${n}`})}},{title:`失败片段`,dataIndex:`failedSegmentCount`,width:90,render:e=>e?(0,Q.jsx)(NQ,{color:`error`,children:e}):(0,Q.jsx)(NQ,{children:`0`})},{title:`视频时长`,dataIndex:`videoDurationSeconds`,width:100,render:e=>`${Number(e||0).toFixed(1)}s`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:j9},{title:`更新时间`,dataIndex:`updatedAt`,width:170,render:j9},{title:`操作`,fixed:`right`,width:120,render:(t,n)=>(0,Q.jsx)(qE,{type:`link`,icon:(0,Q.jsx)(qU,{}),onClick:()=>e(`/shot-replications/task-sets/${n.id}`),children:`查看切片`})}]})]})})})},kre=`http://ceshi.apiforeign.minzhong.cn`.replace(/\/api\/?$/i,``).replace(/\/$/,``),P9=20,Are=[{value:`ai_suggestion`,label:`AI 建议`},{value:`custom`,label:`自定义`}],jre=[{value:`none`,label:`未拆镜`},{value:`pending`,label:`待拆镜`},{value:`processing`,label:`拆镜中`},{value:`completed`,label:`拆镜完成`},{value:`failed`,label:`拆镜失败`},{value:`retry_waiting`,label:`等待重试`}],Mre=[{value:`not_required`,label:`无需分析`},{value:`pending`,label:`待分析`},{value:`processing`,label:`分析中`},{value:`completed`,label:`分析完成`},{value:`failed`,label:`分析失败`}],Nre=[{value:`not_started`,label:`未复刻`},{value:`project_created`,label:`已创建项目`},{value:`processing`,label:`复刻中`},{value:`completed`,label:`复刻完成`},{value:`failed`,label:`复刻失败`}],Pre={pending_analysis:{color:`default`,text:`等待分析`},analyzing:{color:`processing`,text:`分析中`},analysis_completed:{color:`success`,text:`分析完成`},analysis_failed:{color:`error`,text:`分析失败`},splitting:{color:`warning`,text:`拆镜中`},split_completed:{color:`success`,text:`拆镜完成`},partial_failed:{color:`orange`,text:`部分失败`},failed:{color:`error`,text:`失败`},none:{color:`default`,text:`未拆镜`},pending:{color:`default`,text:`待处理`},processing:{color:`warning`,text:`处理中`},completed:{color:`success`,text:`完成`},retry_waiting:{color:`orange`,text:`等待重试`},not_required:{color:`default`,text:`无需分析`},not_started:{color:`default`,text:`未复刻`},project_created:{color:`processing`,text:`已创建项目`}},Fre=e=>{if(!e)return``;let t=String(e).trim();return t?/^(https?:)?\/\//i.test(t)||/^(blob|data):/i.test(t)?t:`${kre}${t.startsWith(`/`)?t:`/${t}`}`:``},F9=e=>e?$5(e):`-`,I9=e=>e?e.length>16?`${e.slice(0,10)}...`:e:`-`,L9=({status:e})=>{if(!e)return(0,Q.jsx)(NQ,{children:`-`});let t=Pre[e]||{color:`blue`,text:e};return(0,Q.jsx)(NQ,{color:t.color,children:t.text})},R9=({value:e,maxHeight:t=420})=>(0,Q.jsx)(`pre`,{style:{margin:0,padding:12,maxHeight:t,overflow:`auto`,background:`#0f172a`,color:`#e2e8f0`,borderRadius:8,fontSize:12,lineHeight:1.6},children:JSON.stringify(e??{},null,2)}),z9=({url:e,height:t=280})=>e?(0,Q.jsx)(`video`,{src:Fre(e),controls:!0,preload:`metadata`,style:{width:`100%`,maxHeight:t,borderRadius:12,background:`#0f172a`}}):(0,Q.jsx)(pC,{description:`暂无视频`,image:pC.PRESENTED_IMAGE_SIMPLE}),Ire=({items:e=[]})=>(0,Q.jsx)(bQ,{rowKey:`index`,size:`small`,pagination:!1,dataSource:e,scroll:{x:!0},columns:[{title:`序号`,dataIndex:`index`,width:70},{title:`时间节点`,dataIndex:`timeNode`,width:120},{title:`开始`,dataIndex:`startSecond`,width:80,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`结束`,dataIndex:`endSecond`,width:80,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`内容`,dataIndex:`content`,ellipsis:!0},{title:`分类`,dataIndex:`category`,width:140},{title:`受众`,dataIndex:`audience`,ellipsis:!0}]}),Lre=()=>{let{taskSetId:e}=$e(),t=Ye(),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(0),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(null),k=(0,S.useCallback)(async()=>{if(e){d(!0);try{r(await C5(e))}catch(e){LG.error(e?.message||`加载拆镜任务详情失败`)}finally{d(!1)}}},[e]),A=(0,S.useCallback)(async()=>{if(e){p(!0);try{let t=await w5(e,{sourceMode:g||void 0,splitStatus:v||void 0,analysisStatus:b||void 0,replicateStatus:C||void 0,page:c,pageSize:P9});a(t.items||[]),s(t.total||0)}catch(e){LG.error(e?.message||`加载拆镜片段失败`)}finally{p(!1)}}},[b,c,C,g,v,e]);(0,S.useEffect)(()=>{k()},[k,m]),(0,S.useEffect)(()=>{A()},[A,m]);let j=async e=>{E(!0),O(null);try{O(await T5(e))}catch(e){LG.error(e?.message||`加载片段详情失败`)}};return u&&!n?(0,Q.jsx)(`div`,{style:{padding:64,textAlign:`center`},children:(0,Q.jsx)(SG,{size:`large`})}):n?(0,Q.jsxs)(`div`,{style:{padding:24},children:[(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(VV,{style:{justifyContent:`space-between`,width:`100%`},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{icon:(0,Q.jsx)(X1,{}),onClick:()=>t(`/shot-replications`),children:`返回列表`}),(0,Q.jsx)(Z.Title,{level:3,style:{margin:0},children:`拆镜任务详情`}),(0,Q.jsx)(L9,{status:n.status})]}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),onClick:()=>h(e=>e+1),children:`刷新`})]}),(0,Q.jsx)(PR,{children:(0,Q.jsxs)(lV,{title:`总任务信息`,column:3,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`任务集ID`,children:n.id}),(0,Q.jsx)(lV.Item,{label:`用户ID`,children:n.userId||`-`}),(0,Q.jsx)(lV.Item,{label:`用户名`,children:n.userName||`-`}),(0,Q.jsx)(lV.Item,{label:`标题`,children:n.title||`-`}),(0,Q.jsxs)(lV.Item,{label:`视频时长`,children:[Number(n.videoDurationSeconds||0).toFixed(2),`s`]}),(0,Q.jsx)(lV.Item,{label:`总状态`,children:(0,Q.jsx)(L9,{status:n.status})}),(0,Q.jsx)(lV.Item,{label:`分析状态`,children:(0,Q.jsx)(L9,{status:n.analysisStatus})}),(0,Q.jsx)(lV.Item,{label:`拆镜状态`,children:(0,Q.jsx)(L9,{status:n.splitStatus})}),(0,Q.jsxs)(lV.Item,{label:`片段数量`,children:[n.completedSegmentCount,`/`,n.segmentCount,`,失败 `,n.failedSegmentCount]}),(0,Q.jsx)(lV.Item,{label:`原视频分类`,children:n.originalVideoCategory||`-`}),(0,Q.jsx)(lV.Item,{label:`创建时间`,children:F9(n.createdAt)}),(0,Q.jsx)(lV.Item,{label:`更新时间`,children:F9(n.updatedAt)}),(0,Q.jsx)(lV.Item,{label:`原视频内容`,span:3,children:n.originalVideoContent||`-`}),(0,Q.jsx)(lV.Item,{label:`原视频受众`,span:3,children:n.originalVideoAudience||`-`}),n.analysisErrorMessage?(0,Q.jsx)(lV.Item,{label:`分析错误`,span:3,children:(0,Q.jsx)(sf,{type:`error`,message:n.analysisErrorMessage})}):null,n.splitErrorMessage?(0,Q.jsx)(lV.Item,{label:`拆镜错误`,span:3,children:(0,Q.jsx)(sf,{type:`error`,message:n.splitErrorMessage})}):null]})}),(0,Q.jsx)(PR,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(X4,{}),`原视频预览`]}),children:(0,Q.jsx)(z9,{url:n.videoUrl,height:360})}),(0,Q.jsxs)(PR,{title:`AI 建议拆镜列表`,children:[n.aiSuggestions?.length?(0,Q.jsx)(Ire,{items:n.aiSuggestions}):(0,Q.jsx)(pC,{description:`暂无 AI 建议拆镜`}),(0,Q.jsx)(Ng,{size:`small`,ghost:!0,style:{marginTop:12},items:[{key:`raw`,label:`查看原视频分析完整 JSON`,children:(0,Q.jsx)(R9,{value:n.analysisResultJson})}]})]}),(0,Q.jsxs)(PR,{title:`片段列表`,children:[(0,Q.jsxs)(VV,{wrap:!0,style:{marginBottom:16},children:[(0,Q.jsx)(RC,{allowClear:!0,placeholder:`片段来源`,style:{width:140},value:g||void 0,options:Are,onChange:e=>{_(e||``),l(1)}}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`切割状态`,style:{width:140},value:v||void 0,options:jre,onChange:e=>{y(e||``),l(1)}}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`分析状态`,style:{width:140},value:b||void 0,options:Mre,onChange:e=>{x(e||``),l(1)}}),(0,Q.jsx)(RC,{allowClear:!0,placeholder:`复刻状态`,style:{width:150},value:C||void 0,options:Nre,onChange:e=>{w(e||``),l(1)}}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(NC,{}),onClick:()=>h(e=>e+1),children:`筛选`}),(0,Q.jsx)(qE,{onClick:()=>{_(``),y(``),x(``),w(``),l(1),h(e=>e+1)},children:`重置`})]}),(0,Q.jsx)(bQ,{rowKey:`id`,loading:f,dataSource:i,pagination:{current:c,pageSize:P9,total:o,showSizeChanger:!1,showTotal:e=>`共 ${e} 条`,onChange:l},scroll:{x:1550},columns:[{title:`片段ID`,dataIndex:`id`,width:150,render:e=>(0,Q.jsx)(Ow,{title:e,children:I9(e)})},{title:`序号`,dataIndex:`segmentIndex`,width:70},{title:`来源`,dataIndex:`sourceMode`,width:100,render:e=>e===`ai_suggestion`?(0,Q.jsx)(NQ,{color:`purple`,children:`AI建议`}):(0,Q.jsx)(NQ,{color:`cyan`,children:`自定义`})},{title:`时间节点`,dataIndex:`timeNode`,width:130},{title:`时长`,dataIndex:`durationSeconds`,width:90,render:e=>`${Number(e||0).toFixed(2)}s`},{title:`切割`,dataIndex:`splitStatus`,width:100,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`分析`,dataIndex:`analysisStatus`,width:100,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`复刻`,dataIndex:`replicateStatus`,width:110,render:e=>(0,Q.jsx)(L9,{status:e})},{title:`片段内容`,dataIndex:`segmentContent`,width:260,ellipsis:!0,render:e=>e||`-`},{title:`分类`,dataIndex:`segmentCategory`,width:120,render:e=>e||`-`},{title:`关联项目`,width:220,render:(e,n)=>n.moduleProjectId?(0,Q.jsxs)(VV,{direction:`vertical`,size:0,children:[(0,Q.jsx)(qE,{type:`link`,style:{padding:0},onClick:()=>t(`/shot-replications/projects/${n.moduleProjectId}`),children:I9(n.moduleProjectId)}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:n.moduleProjectTitle||f9(n.moduleProjectCurrentStepCode)}),(0,Q.jsx)(L9,{status:n.moduleProjectStatus})]}):(0,Q.jsx)(NQ,{children:`未创建`})},{title:`错误`,dataIndex:`splitLastError`,width:220,ellipsis:!0,render:(e,t)=>e||t.analysisErrorMessage||`-`},{title:`创建时间`,dataIndex:`createdAt`,width:170,render:F9},{title:`操作`,fixed:`right`,width:100,render:(e,t)=>(0,Q.jsx)(qE,{type:`link`,icon:(0,Q.jsx)(qU,{}),onClick:()=>j(t.id),children:`详情`})}]})]})]}),(0,Q.jsx)(MV,{title:`片段详情`,width:720,open:T,onClose:()=>E(!1),destroyOnClose:!0,children:D?(0,Q.jsxs)(VV,{direction:`vertical`,size:16,style:{width:`100%`},children:[(0,Q.jsxs)(lV,{column:2,bordered:!0,size:`small`,children:[(0,Q.jsx)(lV.Item,{label:`片段ID`,span:2,children:D.id}),(0,Q.jsx)(lV.Item,{label:`时间节点`,children:D.timeNode}),(0,Q.jsxs)(lV.Item,{label:`时长`,children:[Number(D.durationSeconds||0).toFixed(2),`s`]}),(0,Q.jsx)(lV.Item,{label:`切割状态`,children:(0,Q.jsx)(L9,{status:D.splitStatus})}),(0,Q.jsx)(lV.Item,{label:`分析状态`,children:(0,Q.jsx)(L9,{status:D.analysisStatus})}),(0,Q.jsx)(lV.Item,{label:`复刻状态`,children:(0,Q.jsx)(L9,{status:D.replicateStatus})}),(0,Q.jsx)(lV.Item,{label:`关联项目`,children:D.moduleProjectId?(0,Q.jsx)(qE,{type:`link`,onClick:()=>t(`/shot-replications/projects/${D.moduleProjectId}`),children:D.moduleProjectId}):`-`}),(0,Q.jsx)(lV.Item,{label:`片段内容`,span:2,children:D.segmentContent||`-`}),(0,Q.jsx)(lV.Item,{label:`片段分类`,children:D.segmentCategory||`-`}),(0,Q.jsx)(lV.Item,{label:`片段受众`,children:D.segmentAudience||`-`})]}),(0,Q.jsx)(PR,{size:`small`,title:`片段视频`,children:(0,Q.jsx)(z9,{url:D.segmentVideoUrl,height:300})}),D.splitLastError?(0,Q.jsx)(sf,{type:`error`,message:`切割错误`,description:D.splitLastError}):null,D.analysisErrorMessage?(0,Q.jsx)(sf,{type:`error`,message:`分析错误`,description:D.analysisErrorMessage}):null,(0,Q.jsx)(Ng,{size:`small`,items:[{key:`analysis`,label:`片段分析 JSON`,children:(0,Q.jsx)(R9,{value:D.analysisJson})},{key:`suggestion`,label:`AI 建议原始 JSON`,children:(0,Q.jsx)(R9,{value:D.aiSuggestionJson})}]})]}):(0,Q.jsx)(SG,{})})]}):(0,Q.jsx)(PR,{style:{margin:24},children:(0,Q.jsx)(pC,{description:`未找到拆镜任务详情`})})},{Title:Rre,Text:B9,Paragraph:zre}=Z,{TextArea:V9}=hW,H9=[{label:`对象`,value:`object`},{label:`数组`,value:`array`},{label:`字符串`,value:`string`},{label:`数字`,value:`number`},{label:`布尔`,value:`boolean`},{label:`流程数组`,value:`flow`}],U9=`画面属性`,Bre=new Set([`视频时长`,`视频比例`,`清晰度`,`帧率`,`推荐分辨率`]);function W9(e,t){return e===U9&&!!t&&Bre.has(t)}function G9(e){return e===U9}function Vre(e){return JSON.parse(JSON.stringify(e??null))}function K9(e,t,n,r){return!e||typeof e!=`object`?r:e[t]===void 0?e[n]===void 0?r:e[n]:e[t]}function Hre(e){return{key:String(e?.key||e?.label||`新流程字段`),label:String(e?.label||e?.key||`新流程字段`),enabled:e?.enabled??!0,editable:e?.editable??!0,maxLength:Number(K9(e,`maxLength`,`max_length`,800)||800),value:e?.value??``}}function q9(e){let t=String(e?.type||`string`),n={key:String(e?.key||e?.label||`新字段`),label:String(e?.label||e?.key||`新字段`),type:t,enabled:e?.enabled??!0,editable:e?.editable??!0,maxLength:Number(K9(e,`maxLength`,`max_length`,t===`flow`?800:1e3)||(t===`flow`?800:1e3))};if(t===`object`)n.children=Array.isArray(e?.children)?e.children.map(q9):[];else if(t===`flow`){n.contentKey=String(K9(e,`contentKey`,`content_key`,e?.key===`镜头流程`?`镜头内容`:`动作内容`));let t=K9(e,`contentAliases`,`content_aliases`,[]);n.contentAliases=Array.isArray(t)?t.map(e=>String(e)).filter(Boolean):[];let r=K9(e,`itemFields`,`item_fields`,[]);n.itemFields=Array.isArray(r)&&r.length>0?r.map(Hre):[{key:n.contentKey,label:n.contentKey,enabled:!0,editable:!0,maxLength:n.maxLength||800,value:``}]}else n.value=e?.value??(t===`array`?[]:t===`boolean`?!1:t===`number`?0:`无`);return n}function Ure(e){let t=Array.isArray(e?.segments)?e.segments:[],n=Array.isArray(e?.ratios)?e.ratios:[];return{minDuration:Number(K9(e,`minDuration`,`min_duration`,1)||1),maxDuration:Number(K9(e,`maxDuration`,`max_duration`,5)||5),ratios:n.map(e=>Number(e||0)),segments:t.map(e=>({stage:String(e?.stage||`新阶段`),description:String(e?.description||e?.desc||`阶段说明`)}))}}function J9(e){let t=Array.isArray(e?.sections)?e.sections:[],n=Array.isArray(e?.timePlanRules)?e.timePlanRules:Array.isArray(e?.time_plan_rules)?e.time_plan_rules:[];return{version:e?.version||`video_prompt_schema_config_v1`,enabled:e?.enabled??!0,sections:t.map(q9),timePlanRules:n.map(Ure)}}function Y9(e,t){let n=G9(e.key),r=W9(t,e.key),i={key:e.key,label:e.label,type:r?`string`:e.type,enabled:n||r?!0:!!e.enabled,editable:r?!1:!!e.editable,max_length:e.maxLength};return e.type===`object`?i.children=(e.children||[]).map(t=>Y9(t,e.key)):e.type===`flow`?(i.content_key=e.contentKey,i.content_aliases=e.contentAliases||[],i.item_fields=(e.itemFields||[]).map(e=>({key:e.key,label:e.label,enabled:!!e.enabled,editable:!!e.editable,max_length:e.maxLength,value:e.value??``}))):i.value=e.value,i}function X9(e,t){return{version:e.version,enabled:t,sections:(e.sections||[]).map(e=>Y9(e)),time_plan_rules:(e.timePlanRules||[]).map(e=>({min_duration:e.minDuration,max_duration:e.maxDuration,ratios:e.ratios||[],segments:(e.segments||[]).map(e=>({stage:e.stage,description:e.description}))}))}}function Z9(e){return e?.runtimeSchema||e?.runtime_schema||{}}function Q9(e){let t=e?.timePlan||e?.time_plan||Z9(e)?.动态时间规划||[];return Array.isArray(t)?t:[]}function Wre(e){return e?.schemaConfigSnapshot||e?.schema_config_snapshot||{}}function Gre(e,t){let n=new Blob([JSON.stringify(t,null,2)],{type:`application/json;charset=utf-8`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=e,i.click(),URL.revokeObjectURL(r)}var $9=(e=`string`)=>({key:`新字段`,label:`新字段`,type:e,enabled:!0,editable:!0,maxLength:e===`flow`?800:1e3,value:e===`array`?[]:e===`boolean`?!1:e===`number`?0:`无`,children:e===`object`?[]:void 0,contentKey:e===`flow`?`动作内容`:void 0,contentAliases:e===`flow`?[`动作内容`,`动作`,`动作说明`,`内容`,`说明`]:void 0,itemFields:e===`flow`?[{key:`动作内容`,label:`动作内容`,enabled:!0,editable:!0,maxLength:800,value:``}]:void 0}),Kre=()=>({minDuration:1,maxDuration:5,ratios:[.2,.4,.4],segments:[{stage:`开场吸引`,description:`快速吸引注意力`},{stage:`核心展示`,description:`展示主体动作、核心卖点或主要视觉内容`},{stage:`收尾引导`,description:`给出行动引导并稳定落版`}]}),qre=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!0),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(null),[g]=X.useForm(),_=(0,S.useRef)(null),v=c?.sections||[],y=c?.timePlanRules||[],b=async()=>{t(!0);try{let e=await D5();a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),l(J9(e.data)),d(J9(e.defaultData??e.default_data))}catch(e){LG.error(e?.message||`加载失败`)}finally{t(!1)}};(0,S.useEffect)(()=>{b()},[]);let x=e=>{l(t=>{let n=J9(Vre(t));return e(n),n})},C=async()=>{if(c){r(!0);try{let e=await O5({is_enabled:i,data:X9(c,i)});l(J9(e.data)),a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),LG.success(`保存成功`)}catch(e){LG.error(e?.message||`保存失败`)}finally{r(!1)}}},w=async()=>{r(!0);try{let e=await k5();l(J9(e.data)),d(J9(e.defaultData??e.default_data)),a(!!(e.isEnabled??e.is_enabled??e.data?.enabled??!1)),s(!!(e.usingDefault??e.using_default??!1)),LG.success(`已恢复默认配置`)}catch(e){LG.error(e?.message||`恢复默认失败`)}finally{r(!1)}},T=async()=>{try{Gre(`video_prompt_schema_config.json`,await A5())}catch(e){LG.error(e?.message||`导出失败`)}},E=async e=>{let t=e.target.files?.[0];if(e.target.value=``,t)try{let e=await t.text(),n=JSON.parse(e),r=n.data||n,o=await j5({is_enabled:!!(n.isEnabled??n.is_enabled??i),data:r});l(J9(o.data)),a(!!(o.isEnabled??o.is_enabled??o.data?.enabled??!1)),s(!!(o.usingDefault??o.using_default??!1)),LG.success(`导入成功`)}catch(e){LG.error(e?.message||`导入失败,请检查 JSON 格式`)}},D=()=>{g.setFieldsValue({duration:8,aspectRatio:`9:16`,resolution:`1080p`,frameRate:`30fps`}),h(null),p(!0)},O=async()=>{if(!c)return;let e=await g.validateFields();try{h(await M5({is_enabled:i,data:X9(c,i),duration:Number(e.duration||8),aspect_ratio:e.aspectRatio,resolution:e.resolution,frame_rate:e.frameRate}))}catch(e){LG.error(e?.message||`预览失败`)}},k=()=>{x(e=>{e.sections.push($9(`object`))})},A=(e,t)=>{x(n=>{let r=n.sections[e];G9(r?.key)&&(delete t.key,delete t.type,delete t.enabled),n.sections[e]={...n.sections[e],...t},t.type===`object`&&(n.sections[e].children=n.sections[e].children||[]),t.type===`flow`&&(n.sections[e].contentKey=n.sections[e].contentKey||`动作内容`,n.sections[e].contentAliases=n.sections[e].contentAliases||[`动作内容`,`动作`,`动作说明`,`内容`,`说明`],n.sections[e].itemFields=n.sections[e].itemFields||[{key:`动作内容`,label:`动作内容`,enabled:!0,editable:!0,maxLength:800,value:``}])})},j=e=>{x(t=>{t.sections.splice(e,1)})},M=e=>{x(t=>{let n=t.sections[e];n.children=n.children||[],n.children.push($9(`string`))})},N=(e,t,n)=>{x(r=>{let i=r.sections[e],a=i.children||[],o=a[t];W9(i?.key,o?.key)&&(delete n.key,delete n.type,delete n.enabled,n.editable=!1),a[t]={...a[t],...n},r.sections[e].children=a})},P=(e,t)=>{x(n=>{n.sections[e].children?.splice(t,1)})},F=e=>{x(t=>{let n=t.sections[e];n.itemFields=n.itemFields||[],n.itemFields.push({key:`新流程字段`,label:`新流程字段`,enabled:!0,editable:!0,maxLength:800,value:``})})},I=(e,t,n)=>{x(r=>{let i=r.sections[e].itemFields||[];i[t]={...i[t],...n},r.sections[e].itemFields=i})},L=(e,t)=>{x(n=>{n.sections[e].itemFields?.splice(t,1)})},R=()=>{x(e=>{e.timePlanRules.push(Kre())})},z=(e,t)=>{x(n=>{n.timePlanRules[e]={...n.timePlanRules[e],...t}})},B=e=>{x(t=>{t.timePlanRules.splice(e,1)})},V=(e,t,n)=>{x(r=>{let i=r.timePlanRules[e];n.ratio!==void 0&&(i.ratios[t]=Number(n.ratio||0)),n.stage!==void 0&&(i.segments[t].stage=n.stage),n.description!==void 0&&(i.segments[t].description=n.description)})},H=e=>{x(t=>{let n=t.timePlanRules[e];n.ratios.push(1),n.segments.push({stage:`新阶段`,description:`阶段说明`})})},U=(e,t)=>{x(n=>{let r=n.timePlanRules[e];r.ratios.splice(t,1),r.segments.splice(t,1)})},W=(0,S.useMemo)(()=>v.map((e,t)=>({key:`section-${t}`,label:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(B9,{strong:!0,children:e.label||e.key||`未命名分组`}),e.key&&e.key!==e.label&&(0,Q.jsxs)(NQ,{color:`blue`,children:[`key: `,e.key]}),(0,Q.jsx)(NQ,{children:e.type}),G9(e.key)&&(0,Q.jsx)(NQ,{color:`red`,children:`系统锁定`}),!e.enabled&&!G9(e.key)&&(0,Q.jsx)(NQ,{color:`default`,children:`已禁用`})]}),children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsxs)(DK,{gutter:12,align:`middle`,children:[(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`key`,value:e.key,maxLength:64,placeholder:`传给 AI 的字段名`,disabled:G9(e.key),onChange:e=>A(t,{key:e.target.value})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`label`,value:e.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>A(t,{label:e.target.value})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(RC,{value:e.type,options:H9,style:{width:`100%`},disabled:G9(e.key),onChange:e=>A(t,{type:e})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`启用`,(0,Q.jsx)(Mq,{checked:G9(e.key)?!0:e.enabled,disabled:G9(e.key),onChange:e=>A(t,{enabled:e})})]})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`可编辑`,(0,Q.jsx)(Mq,{checked:e.editable,onChange:e=>A(t,{editable:e})})]})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,max:2e4,value:e.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>A(t,{maxLength:Number(e||1e3)})})}),(0,Q.jsx)(pz,{span:2,style:{textAlign:`right`},children:(0,Q.jsx)(WG,{title:`确认删除该分组?`,disabled:G9(e.key),onConfirm:()=>j(t),children:(0,Q.jsx)(qE,{danger:!0,icon:(0,Q.jsx)(IQ,{}),disabled:G9(e.key)})})})]}),e.type===`object`&&(0,Q.jsx)(PR,{size:`small`,title:`对象字段`,extra:(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(TL,{}),onClick:()=>M(t),children:`新增字段`}),children:(0,Q.jsx)(VV,{direction:`vertical`,style:{width:`100%`},children:(e.children||[]).map((n,r)=>(0,Q.jsxs)(DK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`key`,value:n.key,maxLength:64,placeholder:`传给 AI 的字段名`,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{key:e.target.value})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(hW,{addonBefore:`label`,value:n.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>N(t,r,{label:e.target.value})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(RC,{value:n.type,options:H9.filter(e=>e.value!==`object`&&e.value!==`flow`),style:{width:`100%`},disabled:W9(e.key,n.key),onChange:e=>N(t,r,{type:e})})}),(0,Q.jsx)(pz,{span:2,children:(0,Q.jsxs)(VV,{children:[`启用`,(0,Q.jsx)(Mq,{checked:W9(e.key,n.key)?!0:n.enabled,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{enabled:e})})]})}),(0,Q.jsx)(pz,{span:2,children:(0,Q.jsxs)(VV,{children:[`编辑`,(0,Q.jsx)(Mq,{checked:W9(e.key,n.key)?!1:n.editable,disabled:W9(e.key,n.key),onChange:e=>N(t,r,{editable:e})})]})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(oB,{min:1,max:2e4,value:n.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>N(t,r,{maxLength:Number(e||1e3)})})}),(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{value:Array.isArray(n.value)?n.value.join(`/`):String(n.value??``),maxLength:n.maxLength||1e3,placeholder:`默认值`,onChange:e=>N(t,r,{value:n.type===`array`?e.target.value.split(`/`).filter(Boolean):e.target.value})})}),(0,Q.jsx)(pz,{span:1,style:{textAlign:`right`},children:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),disabled:W9(e.key,n.key),onClick:()=>P(t,r)})})]},`child-${t}-${r}`))})}),e.type===`flow`&&(0,Q.jsxs)(PR,{size:`small`,title:`流程数组对象字段`,extra:(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(TL,{}),onClick:()=>F(t),children:`新增流程字段`}),children:[(0,Q.jsxs)(DK,{gutter:12,style:{marginBottom:12},children:[(0,Q.jsx)(pz,{span:6,children:(0,Q.jsx)(hW,{addonBefore:`内容字段`,value:e.contentKey,maxLength:64,onChange:e=>A(t,{contentKey:e.target.value})})}),(0,Q.jsx)(pz,{span:18,children:(0,Q.jsx)(hW,{addonBefore:`别名 / 分隔`,value:(e.contentAliases||[]).join(`/`),onChange:e=>A(t,{contentAliases:e.target.value.split(`/`).map(e=>e.trim()).filter(Boolean)})})})]}),(0,Q.jsx)(VV,{direction:`vertical`,style:{width:`100%`},children:(e.itemFields||[]).map((e,n)=>(0,Q.jsxs)(DK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{addonBefore:`key`,value:e.key,maxLength:64,placeholder:`流程对象字段名`,onChange:e=>I(t,n,{key:e.target.value})})}),(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{addonBefore:`label`,value:e.label,maxLength:64,placeholder:`后台显示名称`,onChange:e=>I(t,n,{label:e.target.value})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`启用`,(0,Q.jsx)(Mq,{checked:e.enabled,onChange:e=>I(t,n,{enabled:e})})]})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsxs)(VV,{children:[`编辑`,(0,Q.jsx)(Mq,{checked:e.editable,onChange:e=>I(t,n,{editable:e})})]})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,max:2e4,value:e.maxLength,addonBefore:`长度`,style:{width:`100%`},onChange:e=>I(t,n,{maxLength:Number(e||800)})})}),(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(hW,{value:String(e.value??``),maxLength:e.maxLength||800,placeholder:`默认值`,onChange:e=>I(t,n,{value:e.target.value})})}),(0,Q.jsx)(pz,{span:1,style:{textAlign:`right`},children:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),onClick:()=>L(t,n)})})]},`flow-${t}-${n}`))})]}),e.type!==`object`&&e.type!==`flow`&&(0,Q.jsx)(PR,{size:`small`,title:`默认值`,children:(0,Q.jsx)(V9,{rows:3,value:Array.isArray(e.value)?e.value.join(` `):String(e.value??``),maxLength:e.maxLength||1e3,showCount:!0,onChange:n=>A(t,{value:e.type===`array`?n.target.value.split(` -`).filter(Boolean):n.target.value})})})]})})),[v]);return e||!c?(0,Q.jsx)(SG,{}):(0,Q.jsxs)(`div`,{style:{padding:24},children:[(0,Q.jsx)(PR,{children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`large`,children:[(0,Q.jsxs)(DK,{justify:`space-between`,align:`middle`,children:[(0,Q.jsxs)(pz,{children:[(0,Q.jsx)(Fre,{level:3,style:{margin:0},children:`视频提词 Schema 配置`}),(0,Q.jsx)(Ire,{type:`secondary`,style:{marginBottom:0},children:`配置会被爆款开头复刻和拆镜复刻第 4 步视频 AI 提词共同复用。传给 AI 时只保留纯键值 schema,不携带显示名、启用、可编辑等管理字段。`})]}),(0,Q.jsx)(pz,{children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(B9,{children:`启用自定义配置`}),(0,Q.jsx)(Mq,{checked:i,onChange:a}),o&&(0,Q.jsx)(NQ,{color:`orange`,children:`当前使用默认配置兜底`}),u&&(0,Q.jsxs)(NQ,{children:[`默认分组 `,u.sections.length]})]})})]}),(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`长度限制策略`,description:`只对管理后台字段和用户可编辑字段做长度校验,不会自动裁剪 AI 生成结果或第 5 步最终视频 prompt。若供应商因为 prompt 过长拒绝,会按真实失败进入现有日志/退款/重试流程。`}),(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`预览说明`,description:`预览会跟随右上角「启用自定义配置」开关。关闭时会按默认 CLIENT_SCHEMA_V1 兜底预览;打开后才会按当前页面编辑的 sections 和秒数切片规则预览。`}),(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(v3,{}),loading:n,onClick:C,children:`保存配置`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(qU,{}),onClick:D,children:`预览运行时 Schema`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(x1,{}),onClick:T,children:`导出 JSON`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(w6,{}),onClick:()=>_.current?.click(),children:`导入 JSON`}),(0,Q.jsx)(WG,{title:`确认恢复默认配置?`,description:`会用 CLIENT_SCHEMA_V1 生成的默认配置覆盖当前配置。`,onConfirm:w,children:(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),children:`恢复默认`})}),(0,Q.jsx)(`input`,{ref:_,type:`file`,accept:`application/json,.json`,style:{display:`none`},onChange:E})]}),(0,Q.jsx)(bR,{items:[{key:`fields`,label:`Schema 字段配置`,children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`字段说明`,description:`key 是最终传给 AI 和保存到 prompt_schema 的真实字段名,例如「素材理解」「动作流程」;label 只用于管理后台显示,帮助运营/管理员理解这个字段,不会传给 AI;启用关闭后该字段不会进入运行时 schema;可编辑关闭后用户在第 4 步修改时不能改这个字段。「画面属性」里的视频时长、视频比例、清晰度、帧率、推荐分辨率属于系统锁定参数,不能改 key、不能禁用、不能开放用户编辑。`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(TL,{}),onClick:k,children:`新增一级分组`}),(0,Q.jsx)(Ng,{items:W})]})},{key:`time`,label:`秒数切片规则`,children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`切片规则说明`,description:`这里决定指定视频时长会被拆成几段,以及每段的阶段名称和说明。运行时会同步生成「动态时间规划」「动作流程」「镜头流程」三个数组,三者时间段保持一致。`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(TL,{}),onClick:R,children:`新增秒数规则`}),y.map((e,t)=>(0,Q.jsxs)(PR,{size:`small`,title:`${e.minDuration}-${e.maxDuration} 秒:${e.segments.length} 段`,extra:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),onClick:()=>B(t),children:`删除规则`}),children:[(0,Q.jsxs)(DK,{gutter:12,style:{marginBottom:12},children:[(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,value:e.minDuration,addonBefore:`最小秒`,style:{width:`100%`},onChange:e=>z(t,{minDuration:Number(e||1)})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,value:e.maxDuration,addonBefore:`最大秒`,style:{width:`100%`},onChange:e=>z(t,{maxDuration:Number(e||1)})})}),(0,Q.jsx)(pz,{span:16,children:(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(TL,{}),onClick:()=>H(t),children:`新增片段`})})]}),(0,Q.jsx)(VV,{direction:`vertical`,style:{width:`100%`},children:e.segments.map((n,r)=>(0,Q.jsxs)(DK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(oB,{min:.01,step:.01,value:e.ratios[r],addonBefore:`比例`,style:{width:`100%`},onChange:e=>V(t,r,{ratio:Number(e||.01)})})}),(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{value:n.stage,maxLength:64,placeholder:`阶段`,onChange:e=>V(t,r,{stage:e.target.value})})}),(0,Q.jsx)(pz,{span:15,children:(0,Q.jsx)(hW,{value:n.description,maxLength:300,placeholder:`说明`,onChange:e=>V(t,r,{description:e.target.value})})}),(0,Q.jsx)(pz,{span:1,children:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),onClick:()=>U(t,r)})})]},r))})]},t))]})},{key:`json`,label:`JSON 高级查看`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(X9(c,i),null,2),readOnly:!0})}]})]})}),(0,Q.jsxs)(BG,{title:`预览运行时 Schema`,open:f,onCancel:()=>p(!1),width:980,footer:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{onClick:()=>p(!1),children:`关闭`}),(0,Q.jsx)(qE,{type:`primary`,onClick:O,children:`生成预览`})]}),children:[(0,Q.jsxs)(X,{form:g,layout:`inline`,style:{marginBottom:16},children:[(0,Q.jsx)(X.Item,{name:`duration`,label:`时长`,rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:1,max:3600})}),(0,Q.jsx)(X.Item,{name:`aspectRatio`,label:`比例`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})}),(0,Q.jsx)(X.Item,{name:`resolution`,label:`清晰度`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})}),(0,Q.jsx)(X.Item,{name:`frameRate`,label:`帧率`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})})]}),(0,Q.jsx)(vz,{}),m?(0,Q.jsx)(bR,{items:[{key:`runtime`,label:`运行时 Schema`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Z9(m),null,2),readOnly:!0})},{key:`timePlan`,label:`动态时间规划(${Q9(m).length} 段)`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Q9(m),null,2),readOnly:!0})},{key:`snapshot`,label:`配置快照`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Vre(m),null,2),readOnly:!0})}]}):(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`点击生成预览后,可以看到传给 AI 的纯 schema、动态时间规划和本次配置快照。`})]})]})},Gre=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(20),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(!1),{user:g}=I5(),_=async()=>{if(g?.isAdmin){a(!0);try{let e=new URLSearchParams;e.set(`page`,String(o)),e.set(`page_size`,String(c)),u!==null&&e.set(`is_handled`,String(u));let n=await a8.get(`/contact/requests?${e.toString()}`);t(n.items),r(n.total)}catch(e){LG.error(e?.message||`获取失败`)}finally{a(!1)}}};(0,S.useEffect)(()=>{_()},[o,c,u]);let v=async e=>{try{await a8.put(`/contact/requests/${e}/handle`),LG.success(`已标记为处理`),_()}catch(e){LG.error(e?.message||`操作失败`)}},y=async e=>{BG.confirm({title:`确认删除`,content:`确定要删除这条联系请求吗?`,onOk:async()=>{try{await a8.delete(`/contact/requests/${e}`),LG.success(`删除成功`),_()}catch(e){LG.error(e?.message||`删除失败`)}}})},b=e=>{p(e),h(!0)};return(0,Q.jsxs)(`div`,{style:{padding:24},children:[(0,Q.jsx)(Z.Title,{level:2,style:{marginBottom:24},children:`联系请求管理`}),(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,Q.jsx)(qE,{type:u===null?`primary`:`default`,onClick:()=>d(null),icon:(0,Q.jsx)(w2,{}),children:`全部`}),(0,Q.jsx)(qE,{type:u===!1?`primary`:`default`,onClick:()=>d(!1),children:`待处理`}),(0,Q.jsx)(qE,{type:u===!0?`primary`:`default`,onClick:()=>d(!0),children:`已处理`})]}),(0,Q.jsxs)(Z.Text,{style:{color:`#64748b`},children:[`共 `,n,` 条记录`]})]}),(0,Q.jsx)(bQ,{columns:[{title:`姓名`,dataIndex:`name`,key:`name`,width:100},{title:`手机号`,dataIndex:`phone`,key:`phone`,width:120},{title:`公司名称`,dataIndex:`company_name`,key:`company_name`,width:150,ellipsis:!0},{title:`行业`,dataIndex:`industry`,key:`industry`,width:120},{title:`状态`,dataIndex:`is_handled`,key:`is_handled`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`orange`,children:e?`已处理`:`待处理`})},{title:`提交时间`,dataIndex:`created_at`,key:`created_at`,width:160,render:e=>new Date(e).toLocaleString(`zh-CN`)},{title:`操作`,key:`actions`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{size:`middle`,children:[(0,Q.jsx)(qE,{type:`text`,icon:(0,Q.jsx)(qU,{}),onClick:()=>b(t),children:`查看`}),!t.is_handled&&(0,Q.jsx)(qE,{type:`text`,icon:(0,Q.jsx)(DC,{}),onClick:()=>v(t.id),children:`标记处理`}),(0,Q.jsx)(qE,{type:`text`,danger:!0,icon:(0,Q.jsx)(IQ,{}),onClick:()=>y(t.id),children:`删除`})]})}],dataSource:e,loading:i,pagination:{current:o,pageSize:c,total:n,onChange:(e,t)=>{s(e),l(t)}},rowKey:`id`,bordered:!1,style:{background:`#ffffff`,borderRadius:12}}),(0,Q.jsx)(BG,{title:`联系请求详情`,open:m,onCancel:()=>h(!1),footer:null,width:500,children:f&&(0,Q.jsxs)(`div`,{style:{padding:8},children:[(0,Q.jsxs)(`div`,{style:{marginBottom:16},children:[(0,Q.jsxs)(Z.Title,{level:4,style:{marginBottom:16},children:[f.name,(0,Q.jsx)(NQ,{color:f.is_handled?`green`:`orange`,style:{marginLeft:12},children:f.is_handled?`已处理`:`待处理`})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`120px 1fr`,gap:12},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`手机号:`}),(0,Q.jsx)(Z.Text,{children:f.phone}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`公司名称:`}),(0,Q.jsx)(Z.Text,{children:f.company_name}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`行业:`}),(0,Q.jsx)(Z.Text,{children:f.industry}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`提交时间:`}),(0,Q.jsx)(Z.Text,{children:new Date(f.created_at).toLocaleString(`zh-CN`)}),f.message&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`留言:`}),(0,Q.jsx)(Z.Text,{children:f.message})]})]})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[!f.is_handled&&(0,Q.jsx)(qE,{type:`primary`,onClick:()=>{v(f.id),h(!1)},icon:(0,Q.jsx)(DC,{}),children:`标记为已处理`}),(0,Q.jsx)(qE,{onClick:()=>h(!1),children:`关闭`})]})]})})]})},Kre=({children:e})=>{let{user:t,loading:n,checkAuth:r}=I5();return(0,S.useEffect)(()=>{!localStorage.getItem(`auth_token`)&&!n&&!t&&(window.location.href=`/login`)},[t,n]),n?(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,Q.jsx)(SG,{size:`large`})}):t?(0,Q.jsx)(Q.Fragment,{children:e}):(window.location.href=`/login`,null)};(0,_.createRoot)(document.getElementById(`root`)).render((0,Q.jsx)(()=>{let{checkAuth:e}=I5();return(0,S.useEffect)(()=>{e()},[]),(0,Q.jsx)(am,{locale:U6.default,theme:{token:{colorPrimary:`#6366f1`,borderRadius:8},components:{Button:{controlHeight:36,controlHeightLG:44},Card:{boxShadow:`0 1px 3px rgba(0,0,0,0.04)`},Table:{headerBg:`#fafbfc`}}},children:(0,Q.jsx)(ox,{children:(0,Q.jsx)(hn,{children:(0,Q.jsxs)(Dt,{children:[(0,Q.jsx)(Tt,{path:`/login`,element:(0,Q.jsx)(Y5,{})}),(0,Q.jsxs)(Tt,{path:`/`,element:(0,Q.jsx)(Kre,{children:(0,Q.jsx)(V5,{})}),children:[(0,Q.jsx)(Tt,{index:!0,element:(0,Q.jsx)(X5,{})}),(0,Q.jsx)(Tt,{path:`users`,element:(0,Q.jsx)(t7,{})}),(0,Q.jsx)(Tt,{path:`credit-records`,element:(0,Q.jsx)(gne,{})}),(0,Q.jsx)(Tt,{path:`models`,element:(0,Q.jsx)(n7,{})}),(0,Q.jsx)(Tt,{path:`credit-ratios`,element:(0,Q.jsx)(Ane,{})}),(0,Q.jsx)(Tt,{path:`video-engines`,element:(0,Q.jsx)(wne,{})}),(0,Q.jsx)(Tt,{path:`image-engines`,element:(0,Q.jsx)(Dne,{})}),(0,Q.jsx)(Tt,{path:`industries`,element:(0,Q.jsx)(Cne,{})}),(0,Q.jsx)(Tt,{path:`menu-configs`,element:(0,Q.jsx)(Pne,{})}),(0,Q.jsx)(Tt,{path:`recharge-packages`,element:(0,Q.jsx)(Lne,{})}),(0,Q.jsx)(Tt,{path:`payment`,element:(0,Q.jsx)(_ne,{})}),(0,Q.jsx)(Tt,{path:`payment-stats`,element:(0,Q.jsx)(yne,{})}),(0,Q.jsx)(Tt,{path:`settings`,element:(0,Q.jsx)(r7,{})}),(0,Q.jsx)(Tt,{path:`video-prompt-schema-config`,element:(0,Q.jsx)(Wre,{})}),(0,Q.jsx)(Tt,{path:`notifications`,element:(0,Q.jsx)(i7,{})}),(0,Q.jsx)(Tt,{path:`oauthapp-list`,element:(0,Q.jsx)(Bne,{})}),(0,Q.jsx)(Tt,{path:`operation-logs`,element:(0,Q.jsx)(zne,{})}),(0,Q.jsx)(Tt,{path:`generation-records`,element:(0,Q.jsx)(Wne,{})}),(0,Q.jsx)(Tt,{path:`generation-ai`,element:(0,Q.jsx)(Yne,{})}),(0,Q.jsx)(Tt,{path:`hot-opening-replications`,element:(0,Q.jsx)(ere,{})}),(0,Q.jsx)(Tt,{path:`hot-opening-replications/:projectId`,element:(0,Q.jsx)(bre,{})}),(0,Q.jsx)(Tt,{path:`shot-replications`,element:(0,Q.jsx)(Tre,{})}),(0,Q.jsx)(Tt,{path:`shot-replications/task-sets/:taskSetId`,element:(0,Q.jsx)(Pre,{})}),(0,Q.jsx)(Tt,{path:`shot-replications/projects/:projectId`,element:(0,Q.jsx)(k9,{moduleType:`shot_replicate`})}),(0,Q.jsx)(Tt,{path:`authoriza`,element:(0,Q.jsx)(G5,{})}),(0,Q.jsx)(Tt,{path:`consume`,element:(0,Q.jsx)(J5,{})}),(0,Q.jsx)(Tt,{path:`platform`,element:(0,Q.jsx)(e7,{})}),(0,Q.jsx)(Tt,{path:`contact-requests`,element:(0,Q.jsx)(Gre,{})})]}),(0,Q.jsx)(Tt,{path:`*`,element:(0,Q.jsx)(Ct,{to:`/`,replace:!0})})]})})})})},{})); \ No newline at end of file +`).filter(Boolean):n.target.value})})})]})})),[v]);return e||!c?(0,Q.jsx)(SG,{}):(0,Q.jsxs)(`div`,{style:{padding:24},children:[(0,Q.jsx)(PR,{children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`large`,children:[(0,Q.jsxs)(DK,{justify:`space-between`,align:`middle`,children:[(0,Q.jsxs)(pz,{children:[(0,Q.jsx)(Rre,{level:3,style:{margin:0},children:`视频提词 Schema 配置`}),(0,Q.jsx)(zre,{type:`secondary`,style:{marginBottom:0},children:`配置会被爆款开头复刻和拆镜复刻第 4 步视频 AI 提词共同复用。传给 AI 时只保留纯键值 schema,不携带显示名、启用、可编辑等管理字段。`})]}),(0,Q.jsx)(pz,{children:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(B9,{children:`启用自定义配置`}),(0,Q.jsx)(Mq,{checked:i,onChange:a}),o&&(0,Q.jsx)(NQ,{color:`orange`,children:`当前使用默认配置兜底`}),u&&(0,Q.jsxs)(NQ,{children:[`默认分组 `,u.sections.length]})]})})]}),(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`长度限制策略`,description:`只对管理后台字段和用户可编辑字段做长度校验,不会自动裁剪 AI 生成结果或第 5 步最终视频 prompt。若供应商因为 prompt 过长拒绝,会按真实失败进入现有日志/退款/重试流程。`}),(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`预览说明`,description:`预览会跟随右上角「启用自定义配置」开关。关闭时会按默认 CLIENT_SCHEMA_V1 兜底预览;打开后才会按当前页面编辑的 sections 和秒数切片规则预览。`}),(0,Q.jsxs)(VV,{wrap:!0,children:[(0,Q.jsx)(qE,{type:`primary`,icon:(0,Q.jsx)(b3,{}),loading:n,onClick:C,children:`保存配置`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(qU,{}),onClick:D,children:`预览运行时 Schema`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(b1,{}),onClick:T,children:`导出 JSON`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(E6,{}),onClick:()=>_.current?.click(),children:`导入 JSON`}),(0,Q.jsx)(WG,{title:`确认恢复默认配置?`,description:`会用 CLIENT_SCHEMA_V1 生成的默认配置覆盖当前配置。`,onConfirm:w,children:(0,Q.jsx)(qE,{icon:(0,Q.jsx)(EK,{}),children:`恢复默认`})}),(0,Q.jsx)(`input`,{ref:_,type:`file`,accept:`application/json,.json`,style:{display:`none`},onChange:E})]}),(0,Q.jsx)(bR,{items:[{key:`fields`,label:`Schema 字段配置`,children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsx)(sf,{type:`warning`,showIcon:!0,message:`字段说明`,description:`key 是最终传给 AI 和保存到 prompt_schema 的真实字段名,例如「素材理解」「动作流程」;label 只用于管理后台显示,帮助运营/管理员理解这个字段,不会传给 AI;启用关闭后该字段不会进入运行时 schema;可编辑关闭后用户在第 4 步修改时不能改这个字段。「画面属性」里的视频时长、视频比例、清晰度、帧率、推荐分辨率属于系统锁定参数,不能改 key、不能禁用、不能开放用户编辑。`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(TL,{}),onClick:k,children:`新增一级分组`}),(0,Q.jsx)(Ng,{items:W})]})},{key:`time`,label:`秒数切片规则`,children:(0,Q.jsxs)(VV,{direction:`vertical`,style:{width:`100%`},size:`middle`,children:[(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`切片规则说明`,description:`这里决定指定视频时长会被拆成几段,以及每段的阶段名称和说明。运行时会同步生成「动态时间规划」「动作流程」「镜头流程」三个数组,三者时间段保持一致。`}),(0,Q.jsx)(qE,{icon:(0,Q.jsx)(TL,{}),onClick:R,children:`新增秒数规则`}),y.map((e,t)=>(0,Q.jsxs)(PR,{size:`small`,title:`${e.minDuration}-${e.maxDuration} 秒:${e.segments.length} 段`,extra:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),onClick:()=>B(t),children:`删除规则`}),children:[(0,Q.jsxs)(DK,{gutter:12,style:{marginBottom:12},children:[(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,value:e.minDuration,addonBefore:`最小秒`,style:{width:`100%`},onChange:e=>z(t,{minDuration:Number(e||1)})})}),(0,Q.jsx)(pz,{span:4,children:(0,Q.jsx)(oB,{min:1,value:e.maxDuration,addonBefore:`最大秒`,style:{width:`100%`},onChange:e=>z(t,{maxDuration:Number(e||1)})})}),(0,Q.jsx)(pz,{span:16,children:(0,Q.jsx)(qE,{size:`small`,icon:(0,Q.jsx)(TL,{}),onClick:()=>H(t),children:`新增片段`})})]}),(0,Q.jsx)(VV,{direction:`vertical`,style:{width:`100%`},children:e.segments.map((n,r)=>(0,Q.jsxs)(DK,{gutter:8,align:`middle`,children:[(0,Q.jsx)(pz,{span:3,children:(0,Q.jsx)(oB,{min:.01,step:.01,value:e.ratios[r],addonBefore:`比例`,style:{width:`100%`},onChange:e=>V(t,r,{ratio:Number(e||.01)})})}),(0,Q.jsx)(pz,{span:5,children:(0,Q.jsx)(hW,{value:n.stage,maxLength:64,placeholder:`阶段`,onChange:e=>V(t,r,{stage:e.target.value})})}),(0,Q.jsx)(pz,{span:15,children:(0,Q.jsx)(hW,{value:n.description,maxLength:300,placeholder:`说明`,onChange:e=>V(t,r,{description:e.target.value})})}),(0,Q.jsx)(pz,{span:1,children:(0,Q.jsx)(qE,{danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),onClick:()=>U(t,r)})})]},r))})]},t))]})},{key:`json`,label:`JSON 高级查看`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(X9(c,i),null,2),readOnly:!0})}]})]})}),(0,Q.jsxs)(BG,{title:`预览运行时 Schema`,open:f,onCancel:()=>p(!1),width:980,footer:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qE,{onClick:()=>p(!1),children:`关闭`}),(0,Q.jsx)(qE,{type:`primary`,onClick:O,children:`生成预览`})]}),children:[(0,Q.jsxs)(X,{form:g,layout:`inline`,style:{marginBottom:16},children:[(0,Q.jsx)(X.Item,{name:`duration`,label:`时长`,rules:[{required:!0}],children:(0,Q.jsx)(oB,{min:1,max:3600})}),(0,Q.jsx)(X.Item,{name:`aspectRatio`,label:`比例`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})}),(0,Q.jsx)(X.Item,{name:`resolution`,label:`清晰度`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})}),(0,Q.jsx)(X.Item,{name:`frameRate`,label:`帧率`,rules:[{required:!0}],children:(0,Q.jsx)(hW,{})})]}),(0,Q.jsx)(vz,{}),m?(0,Q.jsx)(bR,{items:[{key:`runtime`,label:`运行时 Schema`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Z9(m),null,2),readOnly:!0})},{key:`timePlan`,label:`动态时间规划(${Q9(m).length} 段)`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Q9(m),null,2),readOnly:!0})},{key:`snapshot`,label:`配置快照`,children:(0,Q.jsx)(V9,{rows:24,value:JSON.stringify(Wre(m),null,2),readOnly:!0})}]}):(0,Q.jsx)(sf,{type:`info`,showIcon:!0,message:`点击生成预览后,可以看到传给 AI 的纯 schema、动态时间规划和本次配置快照。`})]})]})},Jre=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(0),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(10),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(!1),{user:g}=R5(),_=async()=>{if(g?.isAdmin){a(!0);try{let e=new URLSearchParams;e.set(`page`,String(o)),e.set(`page_size`,String(c)),u!==null&&e.set(`is_handled`,String(u));let n=await s8.get(`/contact/requests?${e.toString()}`);t(n.items),r(n.total)}catch(e){LG.error(e?.message||`获取失败`)}finally{a(!1)}}};(0,S.useEffect)(()=>{_()},[o,c,u]);let v=async e=>{try{await s8.put(`/contact/requests/${e}/handle`),LG.success(`已标记为处理`),_()}catch(e){LG.error(e?.message||`操作失败`)}},y=async e=>{try{await s8.delete(`/contact/requests/${e}`),LG.success(`已删除`),_()}catch(e){LG.error(e?.message||`删除失败`)}},b=e=>{p(e),h(!0)};return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(PR,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(E4,{style:{fontSize:18,color:`#6366f1`}}),(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:16},children:`联系请求管理`}),(0,Q.jsxs)(NQ,{color:`purple`,children:[`共 `,n,` 条记录`]})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,Q.jsx)(qE,{type:u===null?`primary`:`default`,onClick:()=>d(null),icon:(0,Q.jsx)(C2,{}),size:`small`,children:`全部`}),(0,Q.jsx)(qE,{type:u===!1?`primary`:`default`,onClick:()=>d(!1),size:`small`,children:`待处理`}),(0,Q.jsx)(qE,{type:u===!0?`primary`:`default`,onClick:()=>d(!0),size:`small`,children:`已处理`})]})]}),i?(0,Q.jsx)(`div`,{style:{textAlign:`center`,padding:40},children:`加载中...`}):e.length===0?(0,Q.jsx)(pC,{description:`暂无联系请求`,style:{padding:`40px 0`}}):(0,Q.jsx)(bQ,{columns:[{title:`姓名`,dataIndex:`name`,key:`name`,width:100,render:e=>(0,Q.jsx)(Z.Text,{strong:!0,children:e})},{title:`手机号`,dataIndex:`phone`,key:`phone`,width:120},{title:`公司名称`,dataIndex:`company_name`,key:`company_name`,width:150,ellipsis:!0},{title:`行业`,dataIndex:`industry`,key:`industry`,width:120},{title:`状态`,dataIndex:`is_handled`,key:`is_handled`,width:80,render:e=>(0,Q.jsx)(NQ,{color:e?`green`:`orange`,children:e?`已处理`:`待处理`})},{title:`提交时间`,dataIndex:`created_at`,key:`created_at`,width:160,render:e=>$5(e)},{title:`操作`,key:`actions`,width:180,render:(e,t)=>(0,Q.jsxs)(VV,{size:4,children:[(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(qU,{}),onClick:()=>b(t),children:`查看`}),!t.is_handled&&(0,Q.jsx)(qE,{type:`link`,size:`small`,icon:(0,Q.jsx)(DC,{}),onClick:()=>v(t.id),children:`标记处理`}),(0,Q.jsx)(WG,{title:`确定删除该记录?`,onConfirm:()=>y(t.id),children:(0,Q.jsx)(qE,{type:`link`,danger:!0,size:`small`,icon:(0,Q.jsx)(IQ,{}),children:`删除`})})]})}],dataSource:e,rowKey:`id`,loading:i,pagination:{current:o,pageSize:c,total:n,onChange:(e,t)=>{s(e),l(t)},showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`},scroll:{x:900}})]}),(0,Q.jsx)(BG,{title:(0,Q.jsxs)(VV,{children:[(0,Q.jsx)(qU,{}),`联系请求详情`]}),open:m,onCancel:()=>h(!1),footer:null,width:500,children:f&&(0,Q.jsxs)(`div`,{style:{padding:8},children:[(0,Q.jsxs)(`div`,{style:{marginBottom:16},children:[(0,Q.jsxs)(Z.Title,{level:4,style:{marginBottom:16},children:[f.name,(0,Q.jsx)(NQ,{color:f.is_handled?`green`:`orange`,style:{marginLeft:12},children:f.is_handled?`已处理`:`待处理`})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`120px 1fr`,gap:12},children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`手机号:`}),(0,Q.jsx)(Z.Text,{children:f.phone}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`公司名称:`}),(0,Q.jsx)(Z.Text,{children:f.company_name}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`行业:`}),(0,Q.jsx)(Z.Text,{children:f.industry}),(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`提交时间:`}),(0,Q.jsx)(Z.Text,{children:$5(f.created_at)}),f.message&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Z.Text,{style:{color:`#64748b`},children:`留言:`}),(0,Q.jsx)(Z.Text,{children:f.message})]})]})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[!f.is_handled&&(0,Q.jsx)(qE,{type:`primary`,onClick:()=>{v(f.id),h(!1)},icon:(0,Q.jsx)(DC,{}),children:`标记为已处理`}),(0,Q.jsx)(qE,{onClick:()=>h(!1),children:`关闭`})]})]})})]})},Yre=({children:e})=>{let{user:t,loading:n,checkAuth:r}=R5();return(0,S.useEffect)(()=>{!localStorage.getItem(`auth_token`)&&!n&&!t&&(window.location.href=`/login`)},[t,n]),n?(0,Q.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,Q.jsx)(SG,{size:`large`})}):t?(0,Q.jsx)(Q.Fragment,{children:e}):(window.location.href=`/login`,null)};(0,_.createRoot)(document.getElementById(`root`)).render((0,Q.jsx)(()=>{let{checkAuth:e}=R5();return(0,S.useEffect)(()=>{e()},[]),(0,Q.jsx)(am,{locale:G6.default,theme:{token:{colorPrimary:`#6366f1`,borderRadius:8},components:{Button:{controlHeight:36,controlHeightLG:44},Card:{boxShadow:`0 1px 3px rgba(0,0,0,0.04)`},Table:{headerBg:`#fafbfc`}}},children:(0,Q.jsx)(ox,{children:(0,Q.jsx)(hn,{children:(0,Q.jsxs)(Dt,{children:[(0,Q.jsx)(Tt,{path:`/login`,element:(0,Q.jsx)(Z5,{})}),(0,Q.jsxs)(Tt,{path:`/`,element:(0,Q.jsx)(Yre,{children:(0,Q.jsx)(U5,{})}),children:[(0,Q.jsx)(Tt,{index:!0,element:(0,Q.jsx)(Q5,{})}),(0,Q.jsx)(Tt,{path:`users`,element:(0,Q.jsx)(r7,{})}),(0,Q.jsx)(Tt,{path:`credit-records`,element:(0,Q.jsx)(yne,{})}),(0,Q.jsx)(Tt,{path:`models`,element:(0,Q.jsx)(i7,{})}),(0,Q.jsx)(Tt,{path:`credit-ratios`,element:(0,Q.jsx)(Nne,{})}),(0,Q.jsx)(Tt,{path:`video-engines`,element:(0,Q.jsx)(Dne,{})}),(0,Q.jsx)(Tt,{path:`image-engines`,element:(0,Q.jsx)(Ane,{})}),(0,Q.jsx)(Tt,{path:`industries`,element:(0,Q.jsx)(Ene,{})}),(0,Q.jsx)(Tt,{path:`menu-configs`,element:(0,Q.jsx)(Ine,{})}),(0,Q.jsx)(Tt,{path:`recharge-packages`,element:(0,Q.jsx)(zne,{})}),(0,Q.jsx)(Tt,{path:`payment`,element:(0,Q.jsx)(bne,{})}),(0,Q.jsx)(Tt,{path:`payment-stats`,element:(0,Q.jsx)(Sne,{})}),(0,Q.jsx)(Tt,{path:`settings`,element:(0,Q.jsx)(a7,{})}),(0,Q.jsx)(Tt,{path:`video-prompt-schema-config`,element:(0,Q.jsx)(qre,{})}),(0,Q.jsx)(Tt,{path:`notifications`,element:(0,Q.jsx)($te,{})}),(0,Q.jsx)(Tt,{path:`oauthapp-list`,element:(0,Q.jsx)(Hne,{})}),(0,Q.jsx)(Tt,{path:`operation-logs`,element:(0,Q.jsx)(Vne,{})}),(0,Q.jsx)(Tt,{path:`generation-records`,element:(0,Q.jsx)(qne,{})}),(0,Q.jsx)(Tt,{path:`generation-ai`,element:(0,Q.jsx)(Qne,{})}),(0,Q.jsx)(Tt,{path:`hot-opening-replications`,element:(0,Q.jsx)(rre,{})}),(0,Q.jsx)(Tt,{path:`hot-opening-replications/:projectId`,element:(0,Q.jsx)(Cre,{})}),(0,Q.jsx)(Tt,{path:`shot-replications`,element:(0,Q.jsx)(Ore,{})}),(0,Q.jsx)(Tt,{path:`shot-replications/task-sets/:taskSetId`,element:(0,Q.jsx)(Lre,{})}),(0,Q.jsx)(Tt,{path:`shot-replications/projects/:projectId`,element:(0,Q.jsx)(k9,{moduleType:`shot_replicate`})}),(0,Q.jsx)(Tt,{path:`authoriza`,element:(0,Q.jsx)(q5,{})}),(0,Q.jsx)(Tt,{path:`consume`,element:(0,Q.jsx)(X5,{})}),(0,Q.jsx)(Tt,{path:`platform`,element:(0,Q.jsx)(n7,{})}),(0,Q.jsx)(Tt,{path:`contact-requests`,element:(0,Q.jsx)(Jre,{})})]}),(0,Q.jsx)(Tt,{path:`*`,element:(0,Q.jsx)(Ct,{to:`/`,replace:!0})})]})})})})},{})); \ No newline at end of file diff --git a/video-gen-admin/dist/index.html b/video-gen-admin/dist/index.html index 4ac1f6da..e79dac34 100644 --- a/video-gen-admin/dist/index.html +++ b/video-gen-admin/dist/index.html @@ -28,7 +28,7 @@ } })(); - + diff --git a/video-gen-admin/src/pages/AdminContactRequests.tsx b/video-gen-admin/src/pages/AdminContactRequests.tsx index 741b50f4..b70ffd0b 100644 --- a/video-gen-admin/src/pages/AdminContactRequests.tsx +++ b/video-gen-admin/src/pages/AdminContactRequests.tsx @@ -1,8 +1,9 @@ import React, { useState, useEffect } from 'react'; -import { Table, Button, Tag, Space, Typography, message, Modal } from 'antd'; -import { CheckOutlined, DeleteOutlined, EyeOutlined, FilterOutlined } from '@ant-design/icons'; +import { Table, Button, Tag, Space, Typography, message, Modal, Card, Popconfirm, Empty } from 'antd'; +import { CheckOutlined, DeleteOutlined, EyeOutlined, FilterOutlined, MessageOutlined } from '@ant-design/icons'; import { useAdminStore } from '../store'; import { api } from '../api/client'; +import { formatDate } from '../utils/formatDate'; interface ContactRequest { id: string; @@ -21,7 +22,7 @@ const AdminContactRequests: React.FC = () => { const [total, setTotal] = useState(0); const [loading, setLoading] = useState(false); const [page, setPage] = useState(1); - const [pageSize, setPageSize] = useState(20); + const [pageSize, setPageSize] = useState(10); const [isHandledFilter, setIsHandledFilter] = useState(null); const [selectedItem, setSelectedItem] = useState(null); const [detailModalOpen, setDetailModalOpen] = useState(false); @@ -63,19 +64,13 @@ const AdminContactRequests: React.FC = () => { }; const handleDelete = async (id: string) => { - Modal.confirm({ - title: '确认删除', - content: '确定要删除这条联系请求吗?', - onOk: async () => { - try { - await api.delete(`/contact/requests/${id}`); - message.success('删除成功'); - fetchData(); - } catch (err: any) { - message.error(err?.message || '删除失败'); - } - }, - }); + try { + await api.delete(`/contact/requests/${id}`); + message.success('已删除'); + fetchData(); + } catch (err: any) { + message.error(err?.message || '删除失败'); + } }; const handleViewDetail = (item: ContactRequest) => { @@ -83,12 +78,18 @@ const AdminContactRequests: React.FC = () => { setDetailModalOpen(true); }; + const handlePageChange = (p: number, ps: number) => { + setPage(p); + setPageSize(ps); + }; + const columns = [ { title: '姓名', dataIndex: 'name', key: 'name', width: 100, + render: (v: string) => {v}, }, { title: '手机号', @@ -125,95 +126,90 @@ const AdminContactRequests: React.FC = () => { dataIndex: 'created_at', key: 'created_at', width: 160, - render: (date: string) => { - return new Date(date).toLocaleString('zh-CN'); - }, + render: (date: string) => formatDate(date), }, { title: '操作', key: 'actions', width: 180, render: (_: unknown, record: ContactRequest) => ( - - {!record.is_handled && ( - )} - + handleDelete(record.id)}> + + ), }, ]; return ( -
- - 联系请求管理 - - -
-
- - - +
+ +
+ + + 联系请求管理 + 共 {total} 条记录 + +
+ + + +
- - 共 {total} 条记录 - -
- { setPage(p); setPageSize(s); }, - }} - rowKey="id" - bordered={false} - style={{ background: '#ffffff', borderRadius: 12 }} - /> + {loading ? ( +
加载中...
+ ) : data.length === 0 ? ( + + ) : ( +
`共 ${t} 条记录`, + }} + scroll={{ x: 900 }} + /> + )} + 联系请求详情} open={detailModalOpen} onCancel={() => setDetailModalOpen(false)} footer={null} @@ -236,7 +232,7 @@ const AdminContactRequests: React.FC = () => { 行业: {selectedItem.industry} 提交时间: - {new Date(selectedItem.created_at).toLocaleString('zh-CN')} + {formatDate(selectedItem.created_at)} {selectedItem.message && ( <> 留言: diff --git a/video-gen-app/dist/assets/index-Di-nQw13.js b/video-gen-app/dist/assets/index-B5mkO6qz.js similarity index 97% rename from video-gen-app/dist/assets/index-Di-nQw13.js rename to video-gen-app/dist/assets/index-B5mkO6qz.js index faa32749..b51c6319 100644 --- a/video-gen-app/dist/assets/index-Di-nQw13.js +++ b/video-gen-app/dist/assets/index-B5mkO6qz.js @@ -402,7 +402,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } } - `})]})},t9={HomeOutlined:(0,$.jsx)(y3,{}),DashboardOutlined:(0,$.jsx)(P4,{}),CodeOutlined:(0,$.jsx)(y4,{}),PlayCircleOutlined:(0,$.jsx)(S6,{}),WalletOutlined:(0,$.jsx)(Q8,{}),SettingOutlined:(0,$.jsx)(Y6,{}),BellOutlined:(0,$.jsx)(P2,{}),UserOutlined:(0,$.jsx)(K8,{}),AppstoreOutlined:(0,$.jsx)(u2,{}),FileTextOutlined:(0,$.jsx)(MU,{}),StarOutlined:(0,$.jsx)(y8,{}),HeartOutlined:(0,$.jsx)(u3,{}),CameraOutlined:(0,$.jsx)(Y2,{}),RobotOutlined:(0,$.jsx)(S6,{}),CalculatorOutlined:(0,$.jsx)(K2,{}),DollarOutlined:(0,$.jsx)(B4,{}),GiftOutlined:(0,$.jsx)(i3,{}),ThunderboltOutlined:(0,$.jsx)(j8,{}),FireOutlined:(0,$.jsx)(Q4,{}),CloudOutlined:(0,$.jsx)(u4,{}),SmileOutlined:(0,$.jsx)(u8,{}),TrophyOutlined:(0,$.jsx)(L8,{}),RocketOutlined:(0,$.jsx)(L6,{}),BulbOutlined:(0,$.jsx)(U2,{}),PictureOutlined:(0,$.jsx)(p6,{}),VideoCameraOutlined:(0,$.jsx)(Y8,{}),AudioOutlined:(0,$.jsx)(S2,{}),MailOutlined:(0,$.jsx)(U3,{}),PhoneOutlined:(0,$.jsx)(u6,{}),GlobalOutlined:(0,$.jsx)(s3,{}),ShoppingCartOutlined:(0,$.jsx)(Q6,{}),TeamOutlined:(0,$.jsx)(O8,{}),BarChartOutlined:(0,$.jsx)(j2,{}),PieChartOutlined:(0,$.jsx)(g6,{}),LineChartOutlined:(0,$.jsx)(P3,{}),SecurityScanOutlined:(0,$.jsx)(U6,{}),ApiOutlined:(0,$.jsx)(s2,{}),DatabaseOutlined:(0,$.jsx)(L4,{}),CloudServerOutlined:(0,$.jsx)(p4,{})},lte=240,n9=[{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(CJ,{})},{gradient:`linear-gradient(135deg, #4a5568, #2d3748)`,shadow:`rgba(74,85,104,0.25)`,icon:(0,$.jsx)(Y4,{})},{gradient:`linear-gradient(135deg, #718096, #4a5568)`,shadow:`rgba(113,128,150,0.25)`,icon:(0,$.jsx)(O4,{})},{gradient:`linear-gradient(135deg, #5a67d8, #434190)`,shadow:`rgba(90,103,216,0.25)`,icon:(0,$.jsx)(T2,{})}],ute=()=>{let e=Je(),t=Ge(),{user:n,logout:r}=$7(),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c]=xW.useForm(),[l,u]=(0,S.useState)(null),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)({}),[_,v]=(0,S.useState)(0),[y,b]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteName||``;return t&&(document.title=t),t}),[x,C]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteLogo||``;if(t){let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=t,e.type=`image/png`}return t}),[w,T]=(0,S.useState)(!localStorage.getItem(`siteInfo`)),[E,D]=(0,S.useState)(!1),[O,k]=(0,S.useState)(null),[A,j]=(0,S.useState)(`alipay`),[M,N]=(0,S.useState)(!1),[P,F]=(0,S.useState)(180),I=(0,S.useRef)(null),L=(0,S.useRef)(null),R=(0,S.useRef)(null),[z,B]=(0,S.useState)({alipay:!1,wechat:!1}),[V,H]=(0,S.useState)(!1),[U]=xW.useForm(),[ee,te]=(0,S.useState)(!0),[ne,W]=(0,S.useState)(!1),re=`pending_payment_order`;(0,S.useEffect)(()=>{q5().then(e=>{let t=e.siteName||`民众智创`,n=e.siteLogo||``;if(t!==y&&(b(t),document.title=t),n&&n!==x){C(n);let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=n,e.type=`image/png`}localStorage.setItem(`siteInfo`,JSON.stringify({siteName:t,siteLogo:n}))}).catch(()=>{})},[]);let G=()=>{Q5().then(e=>{v(e)}).catch(()=>{})};(0,S.useEffect)(()=>{(async()=>{let e=localStorage.getItem(re);if(e)try{let t=JSON.parse(e),n=await o7(t.orderNo);if(n.status===`pending`){k({price:t.price,credits:t.credits,qrCode:t.qrCode,method:t.method}),R.current=t.orderNo;let e=Date.now(),n=new Date(t.createdAt).getTime(),r=t.timeoutSeconds||180,i=Math.floor((e-n)/1e3),a=Math.max(0,r-i);a>0?(D(!0),ue(t.orderNo,a)):localStorage.removeItem(re)}else n.status===`paid`?(Z.success(`支付成功!积分已到账`),$7.getState().refreshUser(),localStorage.removeItem(re)):localStorage.removeItem(re)}catch{localStorage.removeItem(re)}})()},[]),(0,S.useEffect)(()=>{t7().then(e=>{f(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),n7().then(e=>{m(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),r7().then(e=>{B(e),e.alipay?j(`alipay`):e.wechat&&j(`wechat`)}).catch(()=>{}),G()},[n]);let K=t.pathname.startsWith(`/records`)?`/records`:t.pathname,q=lte,ie=[{key:`profile`,icon:(0,$.jsx)(K8,{}),label:`账号: ${n?.username}`,disabled:!0},{key:`credits`,icon:(0,$.jsx)(Q8,{style:{color:`#c9a96e`}}),label:`积分: ${n?.credits??0}`,disabled:!0},{type:`divider`},{key:`myCredits`,icon:(0,$.jsx)(Q8,{}),label:`积分明细`},{key:`orderRecords`,icon:(0,$.jsx)(MU,{}),label:`订单记录`},{key:`messages`,icon:(0,$.jsx)(P2,{}),label:`消息中心${_>0?`(${_})`:``}`},{type:`divider`},{key:`changePwd`,icon:(0,$.jsx)(L3,{}),label:`修改密码`},{type:`divider`},{key:`logout`,icon:(0,$.jsx)(B3,{}),label:`退出登录`,danger:!0}],J=({key:t})=>{t===`logout`?(r(),e(`/login`)):t===`changePwd`?a(!0):t===`messages`?e(`/messages`):t===`recharge`?s(!0):t===`myCredits`?e(`/user-center?tab=credits`):t===`orderRecords`&&e(`/user-center?tab=orders`)},ae=async()=>{try{await c.validateFields(),Z.success(`密码修改成功(演示)`),a(!1),c.resetFields()}catch{}},oe=()=>{r(),e(`/login`)},se=()=>{s(!0)},ce=async()=>{if(!n){Z.warning(`请先登录`);return}try{let e=await U.validateFields();W(!0),await Z7({phone:e.phone,company_name:e.companyName,industry:e.industry,name:e.name,message:e.message}),Z.success(`提交成功,我们会尽快与您联系`),H(!1),U.resetFields()}catch(e){Z.error(e?.message||`提交失败`)}finally{W(!1)}},le=(0,S.useCallback)(()=>{I.current&&=(clearInterval(I.current),null),L.current&&=(clearInterval(L.current),null)},[]),ue=(0,S.useCallback)((e,t=180)=>{le(),F(t),I.current=setInterval(async()=>{try{let t=await o7(e);t.status===`paid`?(le(),R.current=null,localStorage.removeItem(re),Z.success(`支付成功!积分已到账`),$7.getState().refreshUser(),D(!1),k(null),u(null)):t.status===`cancelled`&&(le(),R.current=null,localStorage.removeItem(re))}catch{}},2e3),L.current=setInterval(()=>{F(e=>e<=1?(le(),R.current&&=(s7(R.current).catch(()=>{}),null),localStorage.removeItem(re),Z.warning(`订单已超时,请重新充值`),D(!1),k(null),u(null),0):e-1)},1e3)},[le]);return(0,$.jsxs)(dK,{style:{minHeight:`100vh`},children:[(0,$.jsxs)(`div`,{className:`desktop-sidebar`,style:{width:q,position:`fixed`,left:16,top:16,bottom:16,zIndex:100,background:`linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,display:`flex`,flexDirection:`column`,transition:`width 0.25s ease, left 0.25s ease`,overflow:`hidden`,border:`1px solid rgba(0, 0, 0, 0.06)`},children:[(0,$.jsx)(`div`,{style:{height:80,display:`flex`,alignItems:`center`,justifyContent:`flex-start`,padding:`0 20px`,flexShrink:0,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14},children:[(0,$.jsx)(`div`,{style:{width:42,height:42,borderRadius:14,flexShrink:0,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,overflow:`hidden`},children:x?(0,$.jsx)(`img`,{src:x,alt:`logo`,style:{width:28,height:28,objectFit:`contain`}}):(0,$.jsx)(j8,{style:{fontSize:20,color:`#ffffff`}})}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:17,fontWeight:700,letterSpacing:-.02,whiteSpace:`nowrap`,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:y})]})}),(0,$.jsx)(`div`,{style:{flex:1,padding:`8px 8px`,overflow:`auto`},children:(()=>{let t={};d.forEach(e=>{let n=e.parent_id??e.parentId;n&&(t[n]||(t[n]=[]),t[n].push(e))});let n=d.filter(e=>!(e.parent_id??e.parentId));n.sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0));let r=[],i=(t,n=0)=>{let r=t.path===K,i=t9[t.icon]||(0,$.jsx)(y3,{});return(0,$.jsxs)(`div`,{onClick:()=>t.path&&e(t.path),style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:10,padding:n>0?`6px 12px 6px 32px`:`6px 14px`,borderRadius:12,margin:`1px 4px`,cursor:`pointer`,fontSize:n>0?13:14,fontWeight:r?600:400,color:r?`#4f46e5`:`#475569`,background:r?`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%)`:`transparent`,transition:`all 0.2s ease`},children:[(0,$.jsx)(`span`,{style:{fontSize:n>0?14:16,flexShrink:0,color:r?`#6366f1`:`#64748b`},children:i}),(0,$.jsx)(`span`,{style:{whiteSpace:`nowrap`},children:t.label})]},t.id)};return n.forEach(e=>{if((e.menu_type??e.menuType)===`group`){let n=(t[e.id]||[]).sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0));r.push((0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12,fontWeight:600,padding:`10px 14px 4px`,letterSpacing:.5,textTransform:`uppercase`},children:e.label}),n.map(e=>i(e,1))]},e.id))}else r.push(i(e))}),r})()}),(0,$.jsxs)(`div`,{onClick:()=>s(!0),style:{margin:`8px 12px`,padding:`12px 20px`,borderRadius:14,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8,color:`#ffffff`,fontSize:14,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%)`,e.currentTarget.style.transform=`translateY(-1px)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.5)`},onMouseLeave:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(99, 102, 241, 0.4)`},children:[(0,$.jsx)(gR,{style:{fontSize:16}}),(0,$.jsx)(`span`,{children:`充值积分`})]}),(0,$.jsx)(`div`,{style:{padding:`16px 16px`,flexShrink:0},children:(0,$.jsx)(kU,{menu:{items:ie,onClick:J},placement:`topRight`,arrow:!0,children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:12,padding:`10px 14px`,borderRadius:14,cursor:`pointer`,transition:`all 0.25s ease`,background:`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,boxShadow:`0 2px 12px rgba(0, 0, 0, 0.04)`},onMouseEnter:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #ffffff 0%, #f8fafc 100%)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0, 0, 0, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.background=`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,e.currentTarget.style.boxShadow=`0 2px 12px rgba(0, 0, 0, 0.04)`},children:[(0,$.jsx)(uT,{size:36,icon:(0,$.jsx)(K8,{}),style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,flexShrink:0,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`}}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsx)(`div`,{style:{color:`#1e293b`,fontSize:14,fontWeight:600,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,letterSpacing:-.01},children:n?.username}),(0,$.jsxs)(`div`,{style:{color:`#6366f1`,fontSize:12,fontWeight:500,letterSpacing:0,background:`rgba(99, 102, 241, 0.08)`,padding:`2px 8px`,borderRadius:6,display:`inline-block`},children:[`积分: `,n?.credits||0]})]})]})})})]}),(0,$.jsx)(`div`,{className:`desktop-content`,style:{marginLeft:q+28,marginRight:12,marginTop:16,marginBottom:16,flex:1,minHeight:`calc(100vh - 32px)`,background:`transparent`,padding:0,transition:`margin-left 0.25s ease`},children:(0,$.jsx)(`div`,{style:{boxSizing:`border-box`,height:`100%`,background:`#ffffffff`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,minHeight:`100%`,padding:`24px 32px 32px`,border:`1px solid rgba(0, 0, 0, 0.06)`},children:(0,$.jsx)(Ct,{})})}),(0,$.jsxs)(`div`,{className:`mobile-bottom-nav`,children:[d.filter(e=>(e.menu_type??e.menuType)!==`group`).map(t=>t.path?(0,$.jsxs)(`div`,{className:`nav-item ${t.path===K?`active`:``}`,onClick:()=>e(t.path),children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:t9[t.icon]||(0,$.jsx)(y3,{})}),(0,$.jsx)(`span`,{children:t.label})]},t.id):null),(0,$.jsxs)(`div`,{className:`nav-item`,onClick:se,children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:(0,$.jsx)(T6,{})}),(0,$.jsx)(`span`,{children:`充值`})]}),(0,$.jsxs)(`div`,{className:`nav-item`,onClick:oe,children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:(0,$.jsx)(B3,{})}),(0,$.jsx)(`span`,{children:`退出`})]})]}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(L3,{}),`修改密码`]}),open:i,onOk:ae,onCancel:()=>{a(!1),c.resetFields()},okText:`确认修改`,cancelText:`取消`,width:440,children:(0,$.jsxs)(xW,{form:c,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(xW.Item,{name:`oldPwd`,label:`原密码`,rules:[{required:!0,message:`请输入原密码`}],children:(0,$.jsx)(nK.Password,{placeholder:`请输入原密码`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(xW.Item,{name:`newPwd`,label:`新密码`,rules:[{required:!0,message:`请输入新密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(nK.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(xW.Item,{name:`confirmPwd`,label:`确认新密码`,rules:[{required:!0,message:`请再次输入新密码`},({getFieldValue:e})=>({validator(t,n){return!n||e(`newPwd`)===n?Promise.resolve():Promise.reject(Error(`两次密码不一致`))}})],children:(0,$.jsx)(nK.Password,{placeholder:`请再次输入新密码`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})})]})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(i3,{}),`积分充值`]}),open:o,onCancel:()=>{s(!1),u(null)},footer:null,width:680,children:(0,$.jsxs)(`div`,{style:{marginTop:16},children:[(0,$.jsxs)(DU,{style:{marginBottom:16},children:[(0,$.jsx)(Q8,{style:{color:`#6366f1`}}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,letterSpacing:0},children:`当前积分余额`}),(0,$.jsx)(Q.Text,{strong:!0,style:{color:`#6366f1`,fontSize:20,fontWeight:600},children:n?.credits??0})]}),(0,$.jsxs)(`div`,{style:{padding:`12px 16px`,background:`rgba(99, 102, 241, 0.06)`,borderRadius:10,marginBottom:16,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(T3,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13},children:`当前后台仅支持支付宝/微信扫码充值,如需转账支付请联系我们`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12,flexWrap:`wrap`},children:p.map((e,t)=>{let n=n9[t%n9.length],r=(e.credits||0)+(e.bonus_credits||e.bonusCredits||0);return(0,$.jsxs)(`div`,{onClick:()=>u(e.id),style:{flex:`1 1 45%`,minWidth:200,borderRadius:16,padding:`20px 16px`,background:l===e.id?`rgba(99,102,241,0.04)`:`#fafbff`,border:l===e.id?`2px solid #6366f1`:`1px solid #f0f0f5`,cursor:`pointer`,position:`relative`,transition:`all 0.2s`},children:[e.description&&(0,$.jsx)(T$,{color:`purple`,style:{position:`absolute`,top:-10,left:`50%`,transform:`translateX(-50%)`,borderRadius:8,fontSize:11},children:e.description}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:44,height:44,borderRadius:12,flexShrink:0,background:n.gradient,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:18,color:`#fff`,boxShadow:`0 6px 16px ${n.shadow}`},children:n.icon}),(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:6},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15},children:e.name}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[r.toLocaleString(),` 积分`]})]}),(0,$.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,marginTop:4,background:n.gradient,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:[`¥`,e.price]})]})]})]},e.id)})}),!z.alipay&&!z.wechat?(0,$.jsx)(`div`,{style:{marginTop:20,marginBottom:8,padding:16,background:`#fef2f2`,borderRadius:12,border:`1px solid #fecaca`},children:(0,$.jsx)(Q.Text,{style:{color:`#dc2626`,fontSize:13},children:`⚠️ 暂无可用的支付方式,请联系管理员开启支付功能`})}):(0,$.jsxs)(`div`,{style:{marginTop:20,marginBottom:8},children:[(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13,marginBottom:8,display:`block`},children:`选择支付方式`}),(0,$.jsxs)(LL.Group,{value:A,onChange:e=>j(e.target.value),style:{display:`flex`,gap:12},children:[z.alipay&&(0,$.jsxs)(LL.Button,{value:`alipay`,style:{flex:1,textAlign:`center`,borderRadius:10,height:44,lineHeight:`42px`,borderColor:A===`alipay`?`#1677ff`:void 0,color:A===`alipay`?`#1677ff`:void 0},children:[(0,$.jsx)(i2,{style:{fontSize:16,marginRight:6}}),`支付宝`]}),z.wechat&&(0,$.jsxs)(LL.Button,{value:`wechat`,style:{flex:1,textAlign:`center`,borderRadius:10,height:44,lineHeight:`42px`,borderColor:A===`wechat`?`#07c160`:void 0,color:A===`wechat`?`#07c160`:void 0},children:[(0,$.jsx)(i5,{style:{fontSize:16,marginRight:6}}),`微信支付`]})]})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:[(0,$.jsx)(vD,{size:`large`,onClick:()=>{s(!1),u(null)},style:{borderRadius:10,marginRight:12},children:`取消`}),(0,$.jsx)(vD,{type:`primary`,size:`large`,disabled:!l||!z.alipay&&!z.wechat,loading:M,onClick:async()=>{let e=p.find(e=>e.id===l);if(!e)return;let t=(e.credits||0)+(e.bonus_credits||e.bonusCredits||0);try{N(!0);let n=await i7(e.id,A),r=n.qrUrl||n.codeUrl||n.qr_code||n.code_url;(n.paymentMethod===`alipay`||n.paymentMethod===`wechat`)&&r?(k({price:e.price,credits:t,qrCode:r,method:n.paymentMethod}),s(!1),D(!0),R.current=n.orderNo,localStorage.setItem(re,JSON.stringify({orderNo:n.orderNo,price:e.price,credits:t,qrCode:r,method:n.paymentMethod,createdAt:n.createdAt||new Date().toISOString(),timeoutSeconds:180})),ue(n.orderNo)):(Z.success(`充值成功!积分已到账`),$7.getState().refreshUser(),s(!1),u(null))}catch(e){Z.error(e?.message||`创建订单失败,请重试`)}finally{N(!1)}},style:{borderRadius:10,fontWeight:600,background:l?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#d1d5db`,border:`none`,boxShadow:l?`0 8px 24px rgba(99,102,241,0.3)`:`none`},children:`确认充值`})]})]})}),(0,$.jsx)(Pq,{open:E,onCancel:async()=>{if(le(),R.current){try{await s7(R.current)}catch{}R.current=null}localStorage.removeItem(re),D(!1),k(null)},footer:null,width:400,closable:!1,styles:{body:{padding:0,borderRadius:16,overflow:`hidden`}},children:(0,$.jsxs)(`div`,{style:{padding:`24px`},children:[(0,$.jsxs)(`div`,{style:{textAlign:`center`,marginBottom:24},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,background:O?.method===`alipay`?`linear-gradient(135deg, #1677ff, #0958d9)`:`linear-gradient(135deg, #07c160, #06ae56)`,borderRadius:16,display:`flex`,alignItems:`center`,justifyContent:`center`,margin:`0 auto 12px`},children:O?.method===`alipay`?(0,$.jsx)(i2,{style:{fontSize:24,color:`#fff`}}):(0,$.jsx)(i5,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:O?.method===`alipay`?`支付宝支付`:`微信支付`}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:O?.method===`alipay`?`请使用支付宝扫描二维码完成支付`:`请使用微信扫描二维码完成支付`})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:16,padding:20,display:`flex`,flexDirection:`column`,alignItems:`center`,boxShadow:`0 4px 20px rgba(0,0,0,0.08)`},children:[(0,$.jsx)(`div`,{style:{width:180,height:180,borderRadius:12,overflow:`hidden`,background:`#fff`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:O&&(0,$.jsx)(t2,{value:O.qrCode,size:160,level:`M`,includeMargin:!1})}),(0,$.jsxs)(`div`,{style:{marginTop:16,textAlign:`center`},children:[(0,$.jsxs)(`div`,{style:{fontSize:28,fontWeight:700,color:`#1a1a2e`},children:[`¥`,O?.price||0]}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`,marginTop:4},children:[`购买 `,O?.credits||0,` 积分`]}),(0,$.jsx)(`div`,{style:{marginTop:12,padding:`8px 16px`,background:P<=30?`#fef2f2`:`#f0f9ff`,borderRadius:8,border:P<=30?`1px solid #fecaca`:`1px solid #bae6fd`,display:`inline-block`},children:(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:P<=30?`#dc2626`:`#0284c7`},children:[`订单将在 `,(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:800},children:P}),` 秒后关闭`]})})]})]}),(0,$.jsx)(`div`,{style:{marginTop:20,padding:16,background:`#fef3c7`,borderRadius:12},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:8},children:[(0,$.jsx)(`div`,{style:{fontSize:16,marginTop:-2},children:`💡`}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#92400e`},children:[(0,$.jsx)(`div`,{style:{fontWeight:500,marginBottom:4},children:`支付提示`}),(0,$.jsxs)(`ul`,{style:{margin:0,paddingLeft:16},children:[(0,$.jsx)(`li`,{style:{marginBottom:2},children:`请在支付后等待页面自动跳转`}),(0,$.jsx)(`li`,{children:`如支付成功但未到账,请联系客服`})]})]})]})}),(0,$.jsx)(`div`,{style:{marginTop:20},children:(0,$.jsx)(vD,{size:`large`,block:!0,onClick:async()=>{if(le(),R.current){try{await s7(R.current)}catch{}R.current=null}localStorage.removeItem(re),D(!1),k(null),u(null)},style:{borderRadius:10},children:`取消支付`})})]})}),(0,$.jsx)(cte,{}),(0,$.jsx)(`div`,{style:{position:`fixed`,right:24,bottom:ee?100:24,zIndex:1e3,transition:`bottom 0.3s ease`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`flex-end`,gap:12},children:[ee&&(0,$.jsxs)(`div`,{style:{padding:`16px 20px`,background:`#ffffff`,borderRadius:16,boxShadow:`0 8px 32px rgba(0,0,0,0.12)`,minWidth:280,animation:`slideUp 0.3s ease`},children:[(0,$.jsxs)(`div`,{style:{color:`#1e293b`,fontSize:16,fontWeight:600,marginBottom:12,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(Y3,{style:{color:`#6366f1`}}),`联系我们`]}),(0,$.jsxs)(`div`,{style:{padding:`12px 16px`,background:`rgba(99, 102, 241, 0.06)`,borderRadius:12,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{color:`#64748b`,fontSize:13,marginBottom:4},children:`商务咨询`}),(0,$.jsx)(`div`,{style:{color:`#1e293b`,fontSize:14,fontWeight:600},children:`400-888-8888`})]}),(0,$.jsx)(vD,{type:`primary`,block:!0,onClick:()=>H(!0),style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`在线咨询`})]}),(0,$.jsx)(`button`,{onClick:()=>te(!ee),style:{width:56,height:56,borderRadius:`50%`,border:`none`,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,color:`#ffffff`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.05)`,e.currentTarget.style.boxShadow=`0 6px 24px rgba(99, 102, 241, 0.5)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.4)`},children:ee?(0,$.jsx)(tw,{style:{fontSize:20}}):(0,$.jsx)(Y3,{style:{fontSize:20}})})]})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(Y3,{}),`联系我们`]}),open:V,onCancel:()=>{H(!1),U.resetFields()},footer:null,width:480,children:(0,$.jsxs)(`div`,{style:{marginTop:8},children:[(0,$.jsxs)(xW,{form:U,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`name`,label:`姓名`,rules:[{required:!0,message:`请输入姓名`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的姓名`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`phone`,label:`手机号`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1[3-9]\d{9}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的手机号`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`companyName`,label:`公司名称`,rules:[{required:!0,message:`请输入公司名称`}],children:(0,$.jsx)(nK,{placeholder:`请输入公司名称`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`industry`,label:`您的行业`,rules:[{required:!0,message:`请输入您的行业`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的行业`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`message`,label:`留言(选填)`,children:(0,$.jsx)(nK.TextArea,{placeholder:`请输入您的需求或问题`,rows:3,style:{borderRadius:10}})})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,display:`flex`,gap:12},children:[(0,$.jsx)(vD,{size:`large`,onClick:()=>{H(!1),U.resetFields()},style:{borderRadius:10,flex:1},children:`取消`}),(0,$.jsx)(vD,{type:`primary`,size:`large`,onClick:ce,loading:ne,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,flex:1},children:`提交`})]})]})})]})},dte=`http://localhost:8000/api`,fte=()=>{let{checkAuth:e}=$7(),[t,n]=(0,S.useState)(!1),[r,i]=(0,S.useState)(`password`),[a,o]=(0,S.useState)(`password`),[s,c]=(0,S.useState)(0),[l,u]=(0,S.useState)(0),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(!1),[_,v]=(0,S.useState)(!1),[y,b]=(0,S.useState)(0),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),E=(()=>{try{let e=localStorage.getItem(`siteInfo`);if(e){let t=JSON.parse(e);return{siteName:t.siteName||`VideoGen.AI`,siteLogo:t.siteLogo||``}}}catch{}return{siteName:`VideoGen.AI`,siteLogo:``}})(),[D,O]=(0,S.useState)(E.siteName),[k,A]=(0,S.useState)(E.siteLogo),[j,M]=(0,S.useState)(``),[N,P]=(0,S.useState)(``),F=Je(),{login:I}=$7(),[L]=xW.useForm(),[R]=xW.useForm(),[z]=xW.useForm();(0,S.useEffect)(()=>{q5().then(e=>{O(e.siteName),A(e.siteLogo),M(e.userAgreementUrl),P(e.privacyPolicyUrl)}).catch(()=>{})},[]);let B=()=>d?!0:(Z.warning(`请先阅读并同意用户协议和隐私政策`),!1),V=async()=>{if(B())try{let t=await L.validateFields();await I(t.phone,t.password,void 0,t.rememberMe),Z.success(`登录成功,欢迎回来`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}},H=async()=>{if(B())try{let t=R.getFieldsValue();if(!t.phone||!t.code){Z.error(`请填写手机号和验证码`);return}n(!0),await j5(t.phone,t.code),Z.success(`登录成功,欢迎回来`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}finally{n(!1)}},U=async()=>{if(B())try{let t=await z.validateFields();n(!0),await M5(t.phone,t.regCode,t.password),Z.success(`注册成功`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`注册失败`;Z.error(t)}finally{n(!1)}},ee=(e,t)=>{e(60);let n=setInterval(()=>{e(e=>e<=1?(clearInterval(n),m(!1),t?C(!0):T(!0),0):e-1)},1e3)};(0,S.useEffect)(()=>{s===0&&r===`phone`&&v(!1)},[s,r]);let te=async(e,t)=>{try{if(!e||!/^1\d{10}$/.test(e)){Z.error(`请输入正确的手机号`);return}if(t){m(!0),g(!1);return}if(!_){m(!0),v(!1);return}let n=``;n=r===`register`?`register`:`login`,await X5(e,n),ee(t?u:c),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(g(!1),u(0)):(v(!1),c(0)),b(e=>e+1)}},ne=async(e=!1)=>{let t=r===`register`?z.getFieldValue(`phone`):R.getFieldValue(`phone`);try{let e=``;e=r===`register`?`register`:`login`,await X5(t,e),r===`register`?(g(!0),ee(u,!0)):(v(!0),ee(c,!1)),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(g(!1),u(0),C(!0)):(v(!1),c(0),T(!0)),b(e=>e+1)}},W=e=>{o(e),i(e),c(0),u(0),v(!1),g(!1),m(!1),C(!1),T(!1),b(e=>e+1),e===`password`?L.resetFields():R.resetFields()},re=[{icon:(0,$.jsx)(U2,{}),title:`AI 智能优化`,desc:`输入原始提示词,AI 自动为您生成专业级视频、图片描述`},{icon:(0,$.jsx)(S6,{}),title:`一键生成视频、图片`,desc:`支持多种规格生成视频、图片`},{icon:(0,$.jsx)(g3,{}),title:`项目维度管理`,desc:`按项目行业分类视频、图片,支持多种行业`}],G={background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,height:48,borderRadius:10,fontSize:14},K=e=>{e&&window.open(`${dte.replace(/\/api$/,``)}${e}`,`_blank`)};return(0,$.jsxs)(`div`,{style:{minHeight:`100vh`,display:`flex`,backgroundImage:`url(/backimage.png)`,backgroundSize:`cover`,backgroundPosition:`center`,backgroundRepeat:`no-repeat`,backgroundAttachment:`fixed`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(135deg, rgba(240,244,255,0.9) 0%, rgba(232,236,248,0.85) 40%, rgba(240,240,255,0.9) 70%, rgba(248,249,255,0.95) 100%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,width:500,height:500,borderRadius:`50%`,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,top:-150,right:-100,filter:`blur(40px)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,width:400,height:400,borderRadius:`50%`,background:`radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%)`,bottom:-100,left:-80,filter:`blur(50px)`}}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`center`,padding:`0 80px`,zIndex:1},children:(0,$.jsxs)(DU,{direction:`vertical`,size:36,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:20},children:[k?(0,$.jsx)(`img`,{src:k,alt:`logo`,style:{width:52,height:52,borderRadius:14,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:(0,$.jsx)(j8,{style:{fontSize:26,color:`#fff`}})}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:28,fontWeight:800,letterSpacing:-.5},children:D})]}),(0,$.jsx)(`div`,{className:`shiny-text-container`,children:(0,$.jsx)(`span`,{className:`shiny-text`,children:`AI赋能创意,素材触手可及`})}),(0,$.jsxs)(Q.Paragraph,{style:{color:`#64748b`,fontSize:17,maxWidth:480,lineHeight:1.8},children:[`专业的 AI 素材生成平台,通过智能提示词优化,`,(0,$.jsx)(`br`,{}),`让您的创意快速转化为精美视频、图片`]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:20},children:re.map((e,t)=>(0,$.jsxs)(`div`,{className:`electric-border-card`,style:{position:`relative`,display:`flex`,gap:16,alignItems:`flex-start`,padding:`18px 22px`,borderRadius:14,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(12px)`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{className:`electric-border`}),(0,$.jsx)(`div`,{className:`electric-border-inner`}),(0,$.jsx)(`div`,{style:{position:`relative`,zIndex:1},children:(0,$.jsx)(`div`,{style:{width:44,height:44,borderRadius:12,flexShrink:0,background:`linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15))`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#6366f1`,fontSize:20},children:e.icon})}),(0,$.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,$.jsx)(Q.Text,{style:{color:`#1e293b`,fontSize:15,fontWeight:600,display:`block`,marginBottom:4},children:e.title}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13,lineHeight:1.6},children:e.desc})]})]},t))})]})}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1,padding:`40px 24px`},children:(0,$.jsxs)(Oz,{style:{width:440,maxWidth:`100%`,borderRadius:20,boxShadow:`0 20px 60px rgba(0,0,0,0.08)`,border:`1px solid #e2e8f0`,background:`#fff`},styles:{body:{padding:`36px 28px`}},children:[(0,$.jsx)(Q.Title,{level:3,style:{textAlign:`center`,marginBottom:6,color:`#1e293b`,fontWeight:700},children:r===`register`?`创建账号`:`欢迎回来`}),(0,$.jsx)(Q.Text,{style:{display:`block`,textAlign:`center`,marginBottom:28,color:`#94a3b8`,fontSize:14},children:r===`register`?`注册新账号,开始创作视频`:`登录您的账号,开始创作视频`}),r!==`register`&&(0,$.jsx)(`div`,{style:{display:`flex`,gap:0,marginBottom:24,background:`#f1f5f9`,borderRadius:10,padding:4,border:`1px solid #e2e8f0`},children:[`password`,`phone`].map(e=>(0,$.jsx)(`div`,{onClick:()=>W(e),style:{flex:1,textAlign:`center`,padding:`10px 0`,borderRadius:8,cursor:`pointer`,fontSize:14,fontWeight:a===e?600:400,color:a===e?`#6366f1`:`#64748b`,background:a===e?`#fff`:`transparent`,border:a===e?`1px solid rgba(99,102,241,0.2)`:`1px solid transparent`,boxShadow:a===e?`0 2px 8px rgba(99,102,241,0.1)`:`none`,transition:`all 0.3s ease`},children:e===`password`?`密码登录`:`验证码登录`},e))}),r===`password`&&(0,$.jsxs)(xW,{form:L,size:`large`,layout:`vertical`,onFinish:V,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,style:G})}),(0,$.jsx)(xW.Item,{name:`password`,rules:[{required:!0,message:`请输入密码`}],children:(0,$.jsx)(nK.Password,{prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入密码`,style:G})}),(0,$.jsx)(xW.Item,{name:`rememberMe`,valuePropName:`checked`,style:{marginBottom:12},children:(0,$.jsx)(aV,{children:`记住我的登录状态`})}),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,htmlType:`submit`,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登 录`})})]}),r===`phone`&&(0,$.jsxs)(xW,{form:R,size:`large`,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:G})}),(0,$.jsx)(xW.Item,{name:`code`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(DU.Compact,{style:{width:`100%`},children:[(0,$.jsx)(nK,{prefix:(0,$.jsx)(B6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!_,style:{...G,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(vD,{disabled:s>0,onClick:()=>{w?(v(!1),m(!0),b(e=>e+1)):te(R.getFieldValue(`phone`))},style:{height:48,borderRadius:`0 10px 10px 0`,background:s>0||_?`#f1f5f9`:`rgba(99,102,241,0.1)`,border:`1.5px solid #e2e8f0`,borderLeft:`none`,color:s>0?`#94a3b8`:`#6366f1`,fontWeight:600,minWidth:100},children:s>0?`${s}s`:w?`重新发送`:`获取验证码`})]})}),p&&(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(r9,{onSuccess:ne,isVerified:_})},y),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,onClick:H,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登 录`})})]}),r===`register`&&(0,$.jsxs)(xW,{form:z,size:`large`,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:G})}),(0,$.jsx)(xW.Item,{name:`regCode`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(DU.Compact,{style:{width:`100%`},children:[(0,$.jsx)(nK,{prefix:(0,$.jsx)(B6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!h,style:{...G,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(vD,{disabled:l>0,onClick:()=>{x?(g(!1),m(!0),b(e=>e+1)):te(z.getFieldValue(`phone`),!0)},style:{height:48,borderRadius:`0 10px 10px 0`,background:l>0||h?`#f1f5f9`:`rgba(99,102,241,0.1)`,border:`1.5px solid #e2e8f0`,borderLeft:`none`,color:l>0?`#94a3b8`:`#6366f1`,fontWeight:600,minWidth:100},children:l>0?`${l}s`:x?`重新发送`:`获取验证码`})]})}),p&&(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(r9,{onSuccess:ne,isVerified:h})},y),(0,$.jsx)(xW.Item,{name:`password`,rules:[{required:!0,message:`请设置密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(nK.Password,{prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请设置密码(至少6位)`,style:G})}),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,onClick:U,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`注 册`})})]}),(0,$.jsx)(`div`,{style:{marginBottom:16},children:(0,$.jsx)(aV,{checked:d,onChange:e=>f(e.target.checked),children:(0,$.jsxs)(`span`,{style:{fontSize:13,color:`#64748b`},children:[`我已阅读并同意`,(0,$.jsx)(`span`,{onClick:e=>{e.stopPropagation(),K(j)},style:{color:`#6366f1`,cursor:`pointer`},children:`《用户协议》`}),`和`,(0,$.jsx)(`span`,{onClick:e=>{e.stopPropagation(),K(N)},style:{color:`#6366f1`,cursor:`pointer`},children:`《隐私政策》`})]})})}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:r===`register`?(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#6366f1`,cursor:`pointer`},onClick:()=>{i(`password`),o(`password`),C(!1),T(!1),g(!1),m(!1),b(e=>e+1),z.resetFields()},children:`已有账号?去登录`}):(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#6366f1`,cursor:`pointer`},onClick:()=>{i(`register`),C(!1),T(!1),g(!1),m(!1),b(e=>e+1)},children:`没有账号?立即注册`})})]})})]})},r9=({onSuccess:e,isVerified:t})=>{let n=S.useRef(null),r=S.useRef(null),i=S.useRef(null),a=S.useRef(0),o=S.useRef(!1),[s,c]=S.useState(360),l=s-50;S.useEffect(()=>{let e=()=>{if(n.current){let e=n.current.offsetWidth;e>0&&c(e)}};e();let t=new ResizeObserver(e);return n.current&&t.observe(n.current),window.addEventListener(`resize`,e),()=>{t.disconnect(),window.removeEventListener(`resize`,e)}},[]);let u=n=>{if(o.current||t)return;let c=Math.max(0,Math.min(n,l));a.current=c,r.current&&(r.current.style.left=`${c}px`),i.current&&(i.current.style.width=`${c+50}px`),c>=l-5&&(o.current=!0,r.current&&(r.current.style.background=`#22c55e`,r.current.innerHTML=``),i.current&&(i.current.style.width=`${s}px`,i.current.style.background=`#dcfce7`),e())};return(0,$.jsxs)(`div`,{ref:n,onMouseDown:e=>{if(e.preventDefault(),o.current||t)return;let s=n.current;if(!s)return;let c=s.getBoundingClientRect(),d=e=>{u(e.clientX-c.left-50/2)},f=()=>{document.removeEventListener(`mousemove`,d),document.removeEventListener(`mouseup`,f),!o.current&&a.current({page:1,pageSize:10,total:0,items:[]}),i9=p5((e,t)=>({projects:[],records:pte(),loading:!1,mediaType:`image`,countType:`请选择`,selectedRatio:`1:1`,selectedResolution:`2K`,width:2048,height:2048,videoDuration:5,videoAspectRatio:`16:9`,videoResolution:`720p`,engineOptions:{ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]},enginesele:[],fetchProjects:async()=>{e({loading:!0});try{e({projects:await I5(),loading:!1})}catch{e({loading:!1})}},createProject:async(n,r)=>{let i=await L5(n,r);return e({projects:[i,...t().projects]}),i},deleteProject:async n=>{await R5(n),e({projects:t().projects.filter(e=>e.id!==n)})},fetchRecords:async(t={})=>{e({loading:!0});try{e({records:await z5(t),loading:!1})}catch{e({loading:!1})}},optimizePrompt:async(n,r)=>{let i=await B5(n,r);try{await $7.getState().checkAuth()}catch{}let a=t().records;return e({records:{...a,total:a.total+1,items:[i.record,...a.items]}}),i},generateVideo:async(n,r)=>{let i=await G5(n,r);try{await $7.getState().checkAuth()}catch{}let a=t().records;return e({records:{...a,items:a.items.map(e=>e.id===n?i:e)}}),i},updateRecordReferences:(n,r)=>{let i=t().records;e({records:{...i,items:i.items.map(e=>e.id===n?{...e,references:r}:e)}})},setMediaType:t=>e({mediaType:t}),setCountType:t=>e({countType:t}),setImageSettings:(t,n,r,i)=>e({selectedRatio:t,selectedResolution:n,width:r,height:i}),setVideoSettings:(t,n,r)=>e({videoDuration:t,videoAspectRatio:n,videoResolution:r}),setEngineOptions:t=>e({engineOptions:t}),setSelectedRatio:t=>e({selectedRatio:t}),setSelectedResolution:t=>e({selectedResolution:t}),setWidth:t=>e({width:t}),setHeight:t=>e({height:t}),setVideoDuration:t=>e({videoDuration:t}),setVideoAspectRatio:t=>e({videoAspectRatio:t}),setVideoResolution:t=>e({videoResolution:t}),setEnginesele:t=>e({enginesele:t}),resetGenerationConfig:()=>e({mediaType:`image`,countType:`请选择`,selectedRatio:`1:1`,selectedResolution:`2K`,width:2048,height:2048,videoDuration:5,videoAspectRatio:`16:9`,videoResolution:`720p`,engineOptions:{ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]},enginesele:[]})}));function a9(e){if(!e)return`-`;let t=e.trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);return n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``),t.replace(`T`,` `).slice(0,16)}var o9=[`#f97316`,`#3b82f6`,`#8b5cf6`,`#10b981`,`#eab308`,`#6366f1`,`#ef4444`,`#06b6d4`,`#64748b`,`#78716c`],s9={ShoppingCartOutlined:(0,$.jsx)(Q6,{}),BookOutlined:(0,$.jsx)(L2,{}),HomeOutlined:(0,$.jsx)(y3,{}),FireOutlined:(0,$.jsx)(Q4,{}),RocketOutlined:(0,$.jsx)(L6,{}),SkinOutlined:(0,$.jsx)(s8,{}),CompassOutlined:(0,$.jsx)(T4,{}),HeartOutlined:(0,$.jsx)(u3,{}),CarOutlined:(0,$.jsx)(Q2,{}),CameraOutlined:(0,$.jsx)(Y2,{}),CloudOutlined:(0,$.jsx)(u4,{}),StarOutlined:(0,$.jsx)(y8,{}),TrophyOutlined:(0,$.jsx)(L8,{}),ThunderboltOutlined:(0,$.jsx)(j8,{}),BulbOutlined:(0,$.jsx)(U2,{}),CoffeeOutlined:(0,$.jsx)(S4,{}),CrownOutlined:(0,$.jsx)(j4,{}),DashboardOutlined:(0,$.jsx)(P4,{}),FlagOutlined:(0,$.jsx)(t3,{}),GlobalOutlined:(0,$.jsx)(s3,{}),GiftOutlined:(0,$.jsx)(i3,{}),LaptopOutlined:(0,$.jsx)(O3,{}),MobileOutlined:(0,$.jsx)(Q3,{}),MonitorOutlined:(0,$.jsx)(t6,{}),PayCircleOutlined:(0,$.jsx)(s6,{}),PictureOutlined:(0,$.jsx)(p6,{}),PlayCircleOutlined:(0,$.jsx)(S6,{}),SafetyOutlined:(0,$.jsx)(B6,{}),ShoppingOutlined:(0,$.jsx)(t8,{}),SmileOutlined:(0,$.jsx)(u8,{}),SoundOutlined:(0,$.jsx)(g8,{}),TagOutlined:(0,$.jsx)(T8,{}),TeamOutlined:(0,$.jsx)(O8,{}),ToolOutlined:(0,$.jsx)(P8,{}),TruckOutlined:(0,$.jsx)(B8,{}),VideoCameraOutlined:(0,$.jsx)(Y8,{}),WalletOutlined:(0,$.jsx)(Q8,{}),BankOutlined:(0,$.jsx)(O2,{}),BuildOutlined:(0,$.jsx)(B2,{}),ExperimentOutlined:(0,$.jsx)(U4,{}),HighlightOutlined:(0,$.jsx)(p3,{}),IdcardOutlined:(0,$.jsx)(S3,{}),MedicineBoxOutlined:(0,$.jsx)(K3,{}),ReadOutlined:(0,$.jsx)(O6,{}),RestOutlined:(0,$.jsx)(j6,{}),SketchOutlined:(0,$.jsx)(i8,{}),SolutionOutlined:(0,$.jsx)(p8,{})},mte=()=>{let[e,t]=(0,S.useState)(!1),[n]=xW.useForm(),r=Je(),{projects:i,fetchProjects:a,createProject:o,deleteProject:s}=i9(),[c,l]=(0,S.useState)([]);(0,S.useEffect)(()=>{a(),e7().then(l).catch(()=>{})},[]);let u=Object.fromEntries(c.map((e,t)=>[e.key,{label:e.label,color:o9[t%o9.length],icon:e.icon||`AppstoreOutlined`}]));return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`22px 24px`,borderRadius:16,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-20,top:-20,width:200,height:200,borderRadius:`50%`,background:`rgba(255,255,255,0.08)`}}),(0,$.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,$.jsx)(Q.Title,{level:3,style:{margin:`0 0 4px`,color:`#fff`,fontWeight:700},children:`我的项目`}),(0,$.jsxs)(Q.Text,{style:{color:`rgba(255,255,255,0.7)`,fontSize:14},children:[`共 `,i.length,` 个项目 · 按行业分类管理`]})]}),(0,$.jsx)(vD,{icon:(0,$.jsx)(gR,{}),onClick:()=>t(!0),size:`large`,style:{background:`rgba(255,255,255,0.15)`,border:`1px solid rgba(255,255,255,0.3)`,color:`#fff`,fontWeight:600,backdropFilter:`blur(10px)`,borderRadius:10,height:42},children:`新建项目`})]}),i.length===0?(0,$.jsx)(NC,{image:NC.PRESENTED_IMAGE_SIMPLE,description:`还没有项目,创建您的第一个视频项目`,style:{padding:`60px 0`},children:(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(gR,{}),onClick:()=>t(!0),size:`large`,children:`创建第一个项目`})}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},className:`stagger-children`,children:i.map((e,t)=>(0,$.jsxs)(`div`,{className:`project-card project-item animate-slideInCard`,onClick:()=>r(`/projects/${e.id}/generate`),style:{display:`flex`,alignItems:`center`,padding:`18px 22px`,borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,animationDelay:`${t*.06}s`},children:[(0,$.jsx)(`div`,{style:{width:50,height:50,borderRadius:14,flexShrink:0,background:`${u[e.industry]?.color||`#64748b`}12`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:24,marginRight:16,color:u[e.industry]?.color||`#64748b`},children:s9[u[e.industry]?.icon]||(0,$.jsx)(u2,{})}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4,flexWrap:`wrap`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1a1a2e`},children:e.name}),(0,$.jsx)(T$,{color:u[e.industry]?.color||`#64748b`,style:{borderRadius:6,margin:0},children:u[e.industry]?.label||e.industry})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(TH,{style:{fontSize:12,color:`#94a3b8`}}),(0,$.jsxs)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:12,color:`#94a3b8`},children:[`创建于 `,a9(e.createdAt)]})]})]}),(0,$.jsxs)(`div`,{className:`project-actions`,style:{display:`flex`,alignItems:`center`,gap:8,marginLeft:16},children:[(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(S6,{}),onClick:t=>{t.stopPropagation(),r(`/projects/${e.id}/generate`)},style:{background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,borderRadius:10,fontWeight:600,height:36,boxShadow:`0 4px 12px rgba(99,102,241,0.25)`},children:`生成`}),(0,$.jsx)(Rq,{title:`确定删除该项目?`,description:`项目下的生成记录将一并删除`,onConfirm:async t=>{t?.stopPropagation(),await s(e.id),Z.success(`项目已删除`)},onCancel:e=>e?.stopPropagation(),children:(0,$.jsx)(vD,{danger:!0,icon:(0,$.jsx)(O$,{}),onClick:e=>e.stopPropagation(),style:{borderRadius:10,height:36,background:`rgba(239,68,68,0.06)`,border:`1px solid rgba(239,68,68,0.15)`,color:`#ef4444`}})}),(0,$.jsx)(Ug,{className:`mobile-hide`,style:{color:`#cbd5e1`,fontSize:12}})]})]},e.id))}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(u2,{}),`新建项目`]}),open:e,onOk:async()=>{try{let e=await n.validateFields(),i=await o(e.name,e.industry);Z.success(`项目创建成功`),t(!1),n.resetFields(),r(`/projects/${i.id}/generate`)}catch{}},onCancel:()=>{t(!1),n.resetFields()},okText:`创建`,cancelText:`取消`,width:480,children:(0,$.jsxs)(xW,{form:n,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(xW.Item,{name:`name`,label:`项目名称`,rules:[{required:!0,message:`请输入项目名称`}],children:(0,$.jsx)(nK,{placeholder:`例如:618电商大促宣传片`,prefix:(0,$.jsx)(xZ,{}),size:`large`})}),(0,$.jsx)(xW.Item,{name:`industry`,label:`所属行业`,rules:[{required:!0,message:`请选择行业`}],children:(0,$.jsx)(lw,{placeholder:`选择项目所属行业`,size:`large`,children:c.map((e,t)=>(0,$.jsx)(lw.Option,{value:e.key,children:(0,$.jsxs)(DU,{children:[s9[e.icon]||(0,$.jsx)(u2,{}),` `,e.label]})},e.key))})})]})})]})};function hte(){if(typeof crypto<`u`&&typeof crypto.randomUUID==`function`)return crypto.randomUUID();if(typeof crypto<`u`&&typeof crypto.getRandomValues==`function`){let e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}return`${Date.now().toString(16).padStart(12,`0`)}-${Math.random().toString(16).slice(2,10).padStart(8,`0`)}-4xxx-yxxx-${Math.random().toString(16).slice(2,12)}`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}var c9=({src:e,width:t=48,height:n=48})=>{let[r,i]=(0,S.useState)(null),[a,o]=(0,S.useState)(null);return(0,S.useEffect)(()=>{let r=document.createElement(`video`);r.muted=!0,r.preload=`metadata`,r.crossOrigin=`anonymous`;let a=()=>{o(r.duration),r.currentTime=Math.min(1,r.duration*.1)},s=()=>{try{let e=document.createElement(`canvas`);e.width=t*2,e.height=n*2;let a=e.getContext(`2d`);a&&(a.drawImage(r,0,0,e.width,e.height),i(e.toDataURL(`image/jpeg`,.7)))}catch{}};return r.addEventListener(`loadedmetadata`,a),r.addEventListener(`seeked`,s),r.src=e,()=>{r.removeEventListener(`loadedmetadata`,a),r.removeEventListener(`seeked`,s)}},[e,t,n]),(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`,background:`#1a1a2e`},children:[r?(0,$.jsx)(`img`,{src:r,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(S6,{style:{color:`#fff`,fontSize:18}})}),a!=null&&(0,$.jsx)(`span`,{style:{position:`absolute`,bottom:2,right:2,fontSize:9,color:`#fff`,background:`rgba(0,0,0,0.6)`,borderRadius:4,padding:`1px 4px`,lineHeight:1.3},children:(e=>`${Math.round(e)}s`)(a)})]})},gte=()=>{let{projectId:e}=Qe(),t=Je(),[n]=xW.useForm(),{projects:r,records:i,fetchProjects:a,fetchRecords:o,optimizePrompt:s,generateVideo:c}=i9(),l=i.items,{user:u}=$7(),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(null),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(!1),[x,C]=(0,S.useState)({}),[w,T]=(0,S.useState)({}),[E,D]=(0,S.useState)({}),[O,k]=(0,S.useState)(null),[A,j]=(0,S.useState)(null),[M,N]=(0,S.useState)([]),[P,F]=(0,S.useState)(!1),[I,L]=(0,S.useState)(``),[R,z]=(0,S.useState)(!1),[B,V]=(0,S.useState)(``),H=(0,S.useRef)(null),[U,ee]=(0,S.useState)({}),[te,ne]=(0,S.useState)({}),[W,re]=(0,S.useState)({}),[G,K]=(0,S.useState)(null),[q,ie]=(0,S.useState)({}),[J,ae]=(0,S.useState)(null),[oe,se]=(0,S.useState)(5),[ce,le]=(0,S.useState)(`16:9`),[ue,de]=(0,S.useState)(`720p`),[fe,pe]=(0,S.useState)(null),[me,he]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`720p`,`1080p`],durations:[5,8,10,12,15]}),[ge,_e]=(0,S.useState)(0),[ve,ye]=(0,S.useState)(0),[be,xe]=(0,S.useState)(`image`),[Se,Ce]=(0,S.useState)(`1:1`),[we,Te]=(0,S.useState)(`2K`),[Ee,De]=(0,S.useState)(2048),[Oe,ke]=(0,S.useState)(2048),[Ae,je]=(0,S.useState)(!1),[Me,Ne]=(0,S.useState)([]),[Pe,Fe]=(0,S.useState)([]);(0,S.useEffect)(()=>{if(c7().then(e=>{Ne(e.video),Fe(e.image)}),!Ae)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&je(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[Ae]);let Ie=(e,t)=>{for(let n=0;n{let t=e===`2k`?`2048`:e===`4k`?`4096`:e;for(let e=0;e{qe(e)},ze=e=>{Xe(parseInt(e))},[Be,Ve]=(0,S.useState)([]),[He,Ue]=(0,S.useState)([]),[We,Ge]=(0,S.useState)([]),[Ke,qe]=(0,S.useState)(0),[Ye,Xe]=(0,S.useState)(0);(0,S.useEffect)(()=>{We[Ye]&&We[Ye][Ke]!==void 0&&(De(We[Ye][Ke].substring(0,4)),ke(We[Ye][Ke].substring(5)))},[Ke]),(0,S.useEffect)(()=>{We[Ye]&&We[Ye][Ke]!==void 0&&(De(We[Ye][Ke].substring(0,4)),ke(We[Ye][Ke].substring(5)))},[Ye]);let Ze=()=>{De(Oe),ke(Ee)},$e=e=>{xe(e.target.value===`image`?`image`:`video`)};(0,S.useEffect)(()=>{e7().then(e=>{ee(Object.fromEntries(e.map(e=>[e.key,e.label]))),ne(Object.fromEntries(e.map(e=>[e.key,e.optionGroups||[]])))}).catch(()=>{}),Y5().then(e=>{let t=e.items?.[0]?.supportedSizes||{},n=[],r=[],i=[];for(let e in t[`2K`])n.push(e),r.push(t[`2K`][e]);n.forEach((e,t)=>{Ve(n=>[...n,{value:e,label:String(t)}])});for(let e in t[`4K`])i.push(t[`4K`][e]);Ge([r,i]);let a=[];for(let e in t)a.push(e);a.forEach((e,t)=>{Ue(n=>[...n,{value:e,label:String(t)}])})}).catch(()=>{}),J5().then(e=>{if(e.items?.length){let t=e.items[0];he({ratios:t.supportedRatios?.length?t.supportedRatios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions?.length?t.supportedResolutions:[`720p`,`1080p`],durations:t.supportedDurations?.length?t.supportedDurations:[5,8,10,12,15]})}}).catch(()=>{})},[]),(0,S.useEffect)(()=>{a(),o({projectId:e,page:1,pageSize:100})},[e,a,o]);let et=(0,S.useRef)(!1);(0,S.useEffect)(()=>{et.current||l.length===0||(et.current=!0,console.log(`aaaa`,l),l.forEach(t=>{t.projectId===e&&t.status===`generating`&&(T(e=>({...e,[t.id]:`generating`})),Dt(t.id)),t.projectId===e&&t.status===`optimizing`&&ct(t.id)}))},[l,e]);let tt=(0,S.useRef)(new Set),nt=(0,S.useRef)(null),rt=(0,S.useRef)(null),it=e=>{tt.current.add(e),st()},at=e=>{tt.current.delete(e),tt.current.size===0&&ot()},ot=()=>{nt.current&&=(clearInterval(nt.current),null),rt.current&&=(rt.current.abort(),null)},st=()=>{nt.current||=setInterval(async()=>{try{rt.current&&rt.current.abort();let t=new AbortController;rt.current=t;let n=await z5({projectId:e,page:1,pageSize:100,signal:t.signal});rt.current=null;let r=Array.from(tt.current),i=[];if(r.length>0){let e=i9.getState().records,t=e.items.map(e=>{if(r.includes(e.id)){let t=n.items.find(t=>t.id===e.id);if(t)return t.status!==`optimizing`&&i.push(e.id),t}return e});i9.setState({records:{...e,items:t}}),i.forEach(e=>{at(e)})}}catch(e){e.name!==`AbortError`&&console.error(`Optimizing polling error:`,e)}},3e3)},ct=e=>{it(e)},lt=(0,S.useRef)(!1),ut=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(lt.current||l.length===0)return;let t=localStorage.getItem(`pending_optimize`);if(t)try{let{key:n,projectId:r,prompt:i,duration:a,ts:o}=JSON.parse(t);if(Date.now()-o>300*1e3||r!==e){localStorage.removeItem(`pending_optimize`);return}if(ut.current===n)return;let s=l.find(e=>e.projectId===r&&e.originalPrompt===i&&e.duration===a&&e.status===`prompt_optimized`&&new Date(e.createdAt).getTime()>o-1e4);s?(lt.current=!0,localStorage.removeItem(`pending_optimize`),g(s),v(s.optimizedPrompt||``),_e(s.textCreditsCost),ye(s.textTokensUsed),m(!0),Z.success({content:`优化请求已恢复,消耗 ${s.textCreditsCost} 积分`,key:`recovery`})):Date.now()-o>3e4&&localStorage.removeItem(`pending_optimize`)}catch{localStorage.removeItem(`pending_optimize`)}},[l,e]);let dt=r.find(t=>t.id===e),ft=l.filter(t=>t.projectId===e),pt=dt?.name??`项目`,mt=dt&&te[dt.industry]||[],ht=u?.credits??0,gt=e=>{let t=e===`2k`?`2048`:e===`4k`?`4096`:e;for(let e=0;e=_t,yt=async()=>{try{if(!e){Z.error(`项目ID为空,请先选择项目`);return}let t=await n.validateFields();if(!t.prompt||!t.prompt.trim()){Z.error(`请输入视频/图片描述`);return}f(!0);let r=Object.entries(W).map(([e,t])=>`@${e}:${t}`),i=r.length>0?`${t.prompt}\n\n${r.join(`;`)}`:t.prompt,a=hte();localStorage.setItem(`pending_optimize`,JSON.stringify({key:a,projectId:e,prompt:i,duration:oe,ts:Date.now()})),ut.current=a;let o=await s(e,{prompt:i,duration:oe,genType:be,resolution:we,references:M.length>0?M:void 0,idempotencyKey:a,image_size:we,image_proportion:Se,image_px:Ee+`x`+Oe});localStorage.removeItem(`pending_optimize`),ut.current=null,g(o.record),v(o.record.optimizedPrompt||``),_e(o.textCreditsCost),ye(o.textTokensUsed),m(!0),Z.success({content:`「${pt}」提示词优化完成,消耗 ${o.textCreditsCost} 积分`,key:`optimize`})}catch(e){console.error(`优化提示词失败:`,e);let t=e?.response?.data?.message||e?.message||`操作失败,请稍后重试`;Z.error(t)}finally{f(!1),localStorage.removeItem(`pending_optimize`),ut.current=null}},bt=(0,S.useRef)(new Set),xt=(0,S.useRef)(null),St=(0,S.useRef)(null),Ct=e=>{bt.current.add(e),Et()},wt=e=>{bt.current.delete(e),bt.current.size===0&&Tt()},Tt=()=>{xt.current&&=(clearInterval(xt.current),null),St.current&&=(St.current.abort(),null)},Et=()=>{xt.current||=setInterval(async()=>{try{St.current&&St.current.abort();let t=new AbortController;St.current=t;let n=await z5({projectId:e,page:1,pageSize:100,signal:t.signal});St.current=null;let r=Array.from(bt.current),i=[];if(r.length>0){let e=i9.getState().records,t=e.items.map(e=>{if(r.includes(e.id)){let t=n.items.find(t=>t.id===e.id);if(t)return t.status!==`generating`&&i.push(e.id),t}return e});i9.setState({records:{...e,items:t}}),i.forEach(e=>{let t=n.items.find(t=>t.id===e);wt(e),t?.status===`completed`?(T(t=>({...t,[e]:`done`})),g(n=>n?.id===e?t:n),Z.success({content:`「${pt}」视频生成完成!`,key:e,duration:5})):t?.status===`failed`&&(T(t=>({...t,[e]:`failed`})),g(n=>n?.id===e?t:n),Z.error({content:`「${pt}」视频生成失败: ${t.errorMessage||`未知错误`}`,key:e,duration:5}))})}}catch(e){e.name!==`AbortError`&&console.error(`Global polling error:`,e)}},5e3)},Dt=e=>{Ct(e)};(0,S.useEffect)(()=>()=>{Tt(),ot()},[]);let Ot=async e=>{if(!vt){Z.error(`积分不足,请先充值`);return}C(t=>({...t,[e]:!0})),T(t=>({...t,[e]:`generating`})),Z.loading({content:`「${pt}」正在提交视频生成...`,duration:0,key:e});try{(await c(e,{aspectRatio:ce,resolution:ue})).status===`failed`?(T(t=>({...t,[e]:`failed`})),Z.error({content:`「${pt}」提交失败`,key:e,duration:3})):(Z.success({content:`「${pt}」已提交,正在生成中...`,key:e,duration:3}),Dt(e))}catch(t){T(t=>({...t,[e]:`failed`}));let n=`提交失败`;t?.response?.data?.detail?n=t.response.data.detail:t?.data?.detail?n=t.data.detail:t?.detail?n=t.detail:t?.message&&(n=t.message),Z.error({content:`${n}`,key:e,duration:3})}finally{C(t=>({...t,[e]:!1}))}},kt=async e=>{let t=ft.find(t=>t.id===e);if(t){C(t=>({...t,[e]:!0})),T(t=>({...t,[e]:`generating`})),Z.loading({content:`「${pt}」正在重新提交...`,duration:0,key:e});try{let n=E[e];n&&n!==t.optimizedPrompt&&await W5(e,n);let r=await c(e,{aspectRatio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`});console.log(`重新提交视频生成结果:`,r),r.status===`failed`?(T(t=>({...t,[e]:`failed`})),console.log(`12312`),Z.error({content:`「${pt}」提交失败`,key:e,duration:3})):(Z.success({content:`「${pt}」已提交,正在生成中...`,key:e,duration:3}),Dt(e))}catch(t){T(t=>({...t,[e]:`failed`})),console.log(`1231`,t);let n=`提交失败`;t?.response?.data?.detail?n=t.response.data.detail:t?.data?.detail?n=t.data.detail:t?.detail?n=t.detail:t?.message&&(n=t.message),Z.error({content:`${n}`,key:e,duration:3})}finally{C(t=>({...t,[e]:!1}))}}},At=e=>{let t=w[e.id];return t===`generating`?`generating`:t===`done`?`completed`:t===`failed`?`failed`:e.status},jt={optimizing:{color:`processing`,text:`优化中`,icon:(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,$.jsx)(OH,{})},generating:{color:`warning`,text:`生成中`,icon:(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}})},completed:{color:`success`,text:`已完成`,icon:(0,$.jsx)(i4,{})},failed:{color:`error`,text:`失败`,icon:(0,$.jsx)(s4,{})}},Mt=({label:e,value:t,options:n,suffix:r,expanded:i,onToggle:a,onSelect:o,onClose:s})=>{let c=(0,S.useRef)(null),l=(0,S.useRef)(null),u=(0,S.useRef)(i),[d,f]=(0,S.useState)(null);return u.current=i,(0,S.useEffect)(()=>{if(i&&c.current){let e=c.current.getBoundingClientRect();f({bottom:window.innerHeight-e.top+4,left:e.left,width:Math.max(e.width,100)})}else f(null)},[i]),(0,S.useEffect)(()=>{if(!i)return;let e=e=>{c.current?.contains(e.target)||l.current?.contains(e.target)||u.current&&s()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[i,s]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{ref:c,onClick:a,translate:`no`,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,cursor:`pointer`,userSelect:`none`,transition:`background 0.2s, border-color 0.2s`,background:i?`rgba(99,102,241,0.08)`:`#f8f9fc`,border:i?`1px solid #6366f1`:`1px solid #e2e8f0`,minWidth:70,whiteSpace:`nowrap`,flexShrink:0},children:[(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#6366f1`,fontWeight:500,lineHeight:`18px`},children:[t,r]}),(0,$.jsx)(wQ,{style:{fontSize:9,color:`#94a3b8`,transition:`transform 0.2s`,transform:i?`rotate(180deg)`:`rotate(0deg)`}})]}),d&&(0,zi.createPortal)((0,$.jsxs)(`div`,{ref:l,style:{position:`fixed`,bottom:d.bottom,left:d.left,minWidth:d.width,background:`#fff`,borderRadius:12,padding:6,zIndex:99999,boxShadow:`0 8px 30px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:10,color:`#94a3b8`,display:`block`,padding:`2px 6px 4px`},children:e}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:n.map((e,n)=>{let r=t===e;return(0,$.jsx)(`div`,{onClick:()=>{o(e),s()},style:{padding:`6px 10px`,borderRadius:8,fontSize:13,cursor:`pointer`,transition:`all 0.15s`,background:r?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`transparent`,color:r?`#fff`:`#1a1a2e`,fontWeight:r?600:400},onMouseEnter:e=>{r||(e.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:e},n)})})]}),document.body)]})},Nt=({group:e,selected:t,expanded:n,onToggle:r,onSelect:i,onClose:a})=>{let o=(0,S.useRef)(null),s=(0,S.useRef)(null),c=(0,S.useRef)(n),[l,u]=(0,S.useState)(null);return c.current=n,(0,S.useEffect)(()=>{if(n&&o.current){let e=o.current.getBoundingClientRect();u({bottom:window.innerHeight-e.top+4,left:e.left})}else u(null)},[n]),(0,S.useEffect)(()=>{if(!n)return;let e=e=>{o.current?.contains(e.target)||s.current?.contains(e.target)||c.current&&a()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[n,a]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{ref:o,onClick:r,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,cursor:`pointer`,userSelect:`none`,transition:`all 0.2s`,background:t?`rgba(99,102,241,0.08)`:`#f8f9fc`,border:n?`1px solid #6366f1`:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:t?`#6366f1`:`#64748b`,fontWeight:t?600:400},children:t||e.name}),(0,$.jsx)(wQ,{style:{fontSize:9,color:t?`#6366f1`:`#94a3b8`,transition:`transform 0.2s`,transform:n?`rotate(180deg)`:`rotate(0deg)`}})]}),l&&(0,zi.createPortal)((0,$.jsxs)(`div`,{ref:s,style:{position:`fixed`,bottom:l.bottom,left:l.left,background:`#fff`,borderRadius:12,padding:8,minWidth:160,zIndex:99999,boxShadow:`0 8px 30px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:10,color:`#94a3b8`,display:`block`,padding:`2px 6px 4px`},children:e.name}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:e.options.map((e,n)=>{let r=t===e;return(0,$.jsx)(`div`,{onClick:()=>{i(e),a()},style:{padding:`6px 10px`,borderRadius:8,fontSize:13,cursor:`pointer`,transition:`all 0.15s`,background:r?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`transparent`,color:r?`#fff`:`#1a1a2e`,fontWeight:r?600:400},onMouseEnter:e=>{r||(e.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:e},n)})})]}),document.body)]})};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`gen-header animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`20px 28px`,borderRadius:16,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 100%)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-30,bottom:-30,width:160,height:160,borderRadius:`50%`,background:`rgba(255,255,255,0.05)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,position:`relative`},children:[(0,$.jsx)(vD,{icon:(0,$.jsx)(g2,{}),onClick:()=>t(`/projects`),style:{background:`rgba(255,255,255,0.1)`,border:`1px solid rgba(255,255,255,0.2)`,color:`#fff`,borderRadius:10}}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0,color:`#fff`,fontWeight:700},children:pt}),dt&&(0,$.jsx)(T$,{style:{background:`rgba(255,255,255,0.12)`,border:`1px solid rgba(255,255,255,0.2)`,color:`rgba(255,255,255,0.8)`,borderRadius:6},children:U[dt.industry]||dt.industry})]}),(0,$.jsx)(Q.Text,{style:{color:`rgba(255,255,255,0.5)`,fontSize:13},children:`描述视频 → AI优化 → 生成视频`})]})]}),(0,$.jsxs)(T$,{style:{background:`rgba(255,255,255,0.1)`,border:`1px solid rgba(255,255,255,0.2)`,color:`#fff`,borderRadius:20,fontSize:13,padding:`4px 14px`},children:[`剩余 `,ht,` 积分`]})]}),!p&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{className:`animate-fadeInUp`,style:{marginBottom:24,padding:`16px 20px`,borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,boxShadow:`0 2px 12px rgba(0,0,0,0.03)`},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{marginRight:70,position:`relative`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,fontWeight:500,color:`#475569`,marginRight:16},children:`生成类型:`}),(0,$.jsxs)(LL.Group,{defaultValue:`image`,buttonStyle:`solid`,onChange:$e,children:[(0,$.jsxs)(LL.Button,{value:`image`,style:{zIndex:0},children:[(0,$.jsx)(p6,{style:{marginRight:6,fontSize:14}}),` `,`图片`]}),(0,$.jsxs)(LL.Button,{value:`video`,children:[(0,$.jsx)(Y8,{style:{marginRight:6,fontSize:14}}),` `,`视频`]})]})]}),be===`video`&&[{icon:(0,$.jsx)(j$,{}),label:`描述视频+时长`,color:`#6366f1`},{icon:(0,$.jsx)(j8,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(L6,{}),label:`选择参数生成`,color:`#10b981`}].map((e,t)=>(0,$.jsxs)(S.Fragment,{children:[t>0&&(0,$.jsx)(`div`,{style:{width:40,height:1,background:`linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0)`,margin:`0 12px`,flexShrink:0}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:10,background:`${e.color}12`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:e.color,fontSize:15},children:e.icon})}),(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:500,color:`#1a1a2e`},children:e.label})]})]},t)),be===`image`&&[{icon:(0,$.jsx)(j$,{}),label:`描述图片+尺寸`,color:`#6366f1`},{icon:(0,$.jsx)(j8,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(L6,{}),label:`图片生成`,color:`#10b981`}].map((e,t)=>(0,$.jsxs)(S.Fragment,{children:[t>0&&(0,$.jsx)(`div`,{style:{width:40,height:1,background:`linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0)`,margin:`0 12px`,flexShrink:0}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:10,background:`${e.color}12`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:e.color,fontSize:15},children:e.icon})}),(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:500,color:`#1a1a2e`},children:e.label})]})]},t))]})}),(0,$.jsxs)(xW,{form:n,initialValues:{},children:[(0,$.jsx)(xW.Item,{name:`prompt`,noStyle:!0,rules:[{required:!0,message:`请输入视频描述`}],style:{display:`none`}}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:20,background:`#fff`,border:`1px solid #f0f0f5`,boxShadow:`0 4px 24px rgba(0,0,0,0.04)`,overflow:`visible`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`12px 16px 0`,minHeight:60},children:[M.map((e,t)=>(0,$.jsxs)(`div`,{className:`ref-thumb`,style:{position:`relative`,width:48,height:48,borderRadius:12,overflow:`visible`,flexShrink:0},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,overflow:`hidden`,border:`1px solid #e2e8f0`,cursor:`pointer`},onClick:()=>{e.type===`video`&&ae(`http://ceshi.apiforeign.minzhong.cn${e.url}`)},children:e.type===`image`?(0,$.jsx)(xG,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(c9,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`})}),(0,$.jsx)(`div`,{className:`ref-delete`,onClick:n=>{n.stopPropagation(),U5(e.url).catch(()=>{}),N(e=>e.filter((e,n)=>n!==t))},style:{position:`absolute`,top:-4,right:-4,width:16,height:16,borderRadius:`50%`,background:`rgba(0,0,0,0.55)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,opacity:0,transition:`opacity 0.15s`,backdropFilter:`blur(4px)`},children:(0,$.jsx)(s4,{style:{color:`#fff`,fontSize:10}})})]},t)),(0,$.jsx)(y0,{accept:`image/*,video/*`,showUploadList:!1,multiple:!0,beforeUpload:e=>{let t=e.type.startsWith(`image/`),n=e.type.startsWith(`video/`);if(!t&&!n)return Z.error(`仅支持图片或视频文件`),!1;let r=n?100:10;if(e.size/1024/1024>r)return Z.error(`${n?`视频`:`图片`}大小不能超过${r}MB`),!1;let i=M.filter(e=>e.type===`image`).length,a=M.filter(e=>e.type===`video`).length;return t&&i>=10?(Z.error(`最多上传10张图片`),!1):n&&a>=3?(Z.error(`最多上传3个视频`),!1):(F(!0),(t?V5:H5)(e).then(e=>{let n=t?`图片`:`视频`,r=t?i+1:a+1;N(i=>[...i,{url:e.url,type:t?`image`:`video`,name:`${n}${r}`}]),Z.success(`${n}上传成功`)}).catch(()=>Z.error(`上传失败`)).finally(()=>F(!1)),!1)},children:(0,$.jsx)($w,{title:`参考内容(${M.length}/10)`,children:(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,border:`1.5px dashed #d9d9d9`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s`,flexShrink:0},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99,102,241,0.04)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#d9d9d9`,e.currentTarget.style.background=`transparent`},children:P?(0,$.jsx)(Xm,{style:{fontSize:18,color:`#6366f1`}}):(0,$.jsx)(gR,{style:{fontSize:18,color:`#94a3b8`}})})})})]}),(0,$.jsx)(`div`,{style:{padding:`8px 16px 4px`},children:(0,$.jsx)(nK.TextArea,{ref:H,value:I,onChange:e=>{let t=e.target.value;L(t),n.setFieldsValue({prompt:t});let r=t.lastIndexOf(`@`);if(r>=0){let e=t.slice(r+1);if(!e.includes(` `)&&!e.includes(` + `})]})},t9={HomeOutlined:(0,$.jsx)(y3,{}),DashboardOutlined:(0,$.jsx)(P4,{}),CodeOutlined:(0,$.jsx)(y4,{}),PlayCircleOutlined:(0,$.jsx)(S6,{}),WalletOutlined:(0,$.jsx)(Q8,{}),SettingOutlined:(0,$.jsx)(Y6,{}),BellOutlined:(0,$.jsx)(P2,{}),UserOutlined:(0,$.jsx)(K8,{}),AppstoreOutlined:(0,$.jsx)(u2,{}),FileTextOutlined:(0,$.jsx)(MU,{}),StarOutlined:(0,$.jsx)(y8,{}),HeartOutlined:(0,$.jsx)(u3,{}),CameraOutlined:(0,$.jsx)(Y2,{}),RobotOutlined:(0,$.jsx)(S6,{}),CalculatorOutlined:(0,$.jsx)(K2,{}),DollarOutlined:(0,$.jsx)(B4,{}),GiftOutlined:(0,$.jsx)(i3,{}),ThunderboltOutlined:(0,$.jsx)(j8,{}),FireOutlined:(0,$.jsx)(Q4,{}),CloudOutlined:(0,$.jsx)(u4,{}),SmileOutlined:(0,$.jsx)(u8,{}),TrophyOutlined:(0,$.jsx)(L8,{}),RocketOutlined:(0,$.jsx)(L6,{}),BulbOutlined:(0,$.jsx)(U2,{}),PictureOutlined:(0,$.jsx)(p6,{}),VideoCameraOutlined:(0,$.jsx)(Y8,{}),AudioOutlined:(0,$.jsx)(S2,{}),MailOutlined:(0,$.jsx)(U3,{}),PhoneOutlined:(0,$.jsx)(u6,{}),GlobalOutlined:(0,$.jsx)(s3,{}),ShoppingCartOutlined:(0,$.jsx)(Q6,{}),TeamOutlined:(0,$.jsx)(O8,{}),BarChartOutlined:(0,$.jsx)(j2,{}),PieChartOutlined:(0,$.jsx)(g6,{}),LineChartOutlined:(0,$.jsx)(P3,{}),SecurityScanOutlined:(0,$.jsx)(U6,{}),ApiOutlined:(0,$.jsx)(s2,{}),DatabaseOutlined:(0,$.jsx)(L4,{}),CloudServerOutlined:(0,$.jsx)(p4,{})},lte=240,n9=[{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(CJ,{})},{gradient:`linear-gradient(135deg, #4a5568, #2d3748)`,shadow:`rgba(74,85,104,0.25)`,icon:(0,$.jsx)(Y4,{})},{gradient:`linear-gradient(135deg, #718096, #4a5568)`,shadow:`rgba(113,128,150,0.25)`,icon:(0,$.jsx)(O4,{})},{gradient:`linear-gradient(135deg, #5a67d8, #434190)`,shadow:`rgba(90,103,216,0.25)`,icon:(0,$.jsx)(T2,{})}],ute=()=>{let e=Je(),t=Ge(),{user:n,logout:r}=$7(),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c]=xW.useForm(),[l,u]=(0,S.useState)(null),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)({}),[_,v]=(0,S.useState)(0),[y,b]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteName||``;return t&&(document.title=t),t}),[x,C]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteLogo||``;if(t){let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=t,e.type=`image/png`}return t}),[w,T]=(0,S.useState)(!localStorage.getItem(`siteInfo`)),[E,D]=(0,S.useState)(!1),[O,k]=(0,S.useState)(null),[A,j]=(0,S.useState)(`alipay`),[M,N]=(0,S.useState)(!1),[P,F]=(0,S.useState)(180),I=(0,S.useRef)(null),L=(0,S.useRef)(null),R=(0,S.useRef)(null),[z,B]=(0,S.useState)({alipay:!1,wechat:!1}),[V,H]=(0,S.useState)(!1),[U]=xW.useForm(),[ee,te]=(0,S.useState)(!1),[ne,W]=(0,S.useState)(!1),re=`pending_payment_order`;(0,S.useEffect)(()=>{q5().then(e=>{let t=e.siteName||`民众智创`,n=e.siteLogo||``;if(t!==y&&(b(t),document.title=t),n&&n!==x){C(n);let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=n,e.type=`image/png`}localStorage.setItem(`siteInfo`,JSON.stringify({siteName:t,siteLogo:n}))}).catch(()=>{})},[]);let G=()=>{Q5().then(e=>{v(e)}).catch(()=>{})};(0,S.useEffect)(()=>{(async()=>{let e=localStorage.getItem(re);if(e)try{let t=JSON.parse(e),n=await o7(t.orderNo);if(n.status===`pending`){k({price:t.price,credits:t.credits,qrCode:t.qrCode,method:t.method}),R.current=t.orderNo;let e=Date.now(),n=new Date(t.createdAt).getTime(),r=t.timeoutSeconds||180,i=Math.floor((e-n)/1e3),a=Math.max(0,r-i);a>0?(D(!0),ue(t.orderNo,a)):localStorage.removeItem(re)}else n.status===`paid`?(Z.success(`支付成功!积分已到账`),$7.getState().refreshUser(),localStorage.removeItem(re)):localStorage.removeItem(re)}catch{localStorage.removeItem(re)}})()},[]),(0,S.useEffect)(()=>{t7().then(e=>{f(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),n7().then(e=>{m(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),r7().then(e=>{B(e),e.alipay?j(`alipay`):e.wechat&&j(`wechat`)}).catch(()=>{}),G()},[n]);let K=t.pathname.startsWith(`/records`)?`/records`:t.pathname,q=lte,ie=[{key:`profile`,icon:(0,$.jsx)(K8,{}),label:`账号: ${n?.username}`,disabled:!0},{key:`credits`,icon:(0,$.jsx)(Q8,{style:{color:`#c9a96e`}}),label:`积分: ${n?.credits??0}`,disabled:!0},{type:`divider`},{key:`myCredits`,icon:(0,$.jsx)(Q8,{}),label:`积分明细`},{key:`orderRecords`,icon:(0,$.jsx)(MU,{}),label:`订单记录`},{key:`messages`,icon:(0,$.jsx)(P2,{}),label:`消息中心${_>0?`(${_})`:``}`},{type:`divider`},{key:`changePwd`,icon:(0,$.jsx)(L3,{}),label:`修改密码`},{type:`divider`},{key:`logout`,icon:(0,$.jsx)(B3,{}),label:`退出登录`,danger:!0}],J=({key:t})=>{t===`logout`?(r(),e(`/login`)):t===`changePwd`?a(!0):t===`messages`?e(`/messages`):t===`recharge`?s(!0):t===`myCredits`?e(`/user-center?tab=credits`):t===`orderRecords`&&e(`/user-center?tab=orders`)},ae=async()=>{try{await c.validateFields(),Z.success(`密码修改成功(演示)`),a(!1),c.resetFields()}catch{}},oe=()=>{r(),e(`/login`)},se=()=>{s(!0)},ce=async()=>{if(!n){Z.warning(`请先登录`);return}try{let e=await U.validateFields();W(!0),await Z7({phone:e.phone,company_name:e.companyName,industry:e.industry,name:e.name,message:e.message}),Z.success(`提交成功,我们会尽快与您联系`),H(!1),U.resetFields()}catch(e){Z.error(e?.message||`提交失败`)}finally{W(!1)}},le=(0,S.useCallback)(()=>{I.current&&=(clearInterval(I.current),null),L.current&&=(clearInterval(L.current),null)},[]),ue=(0,S.useCallback)((e,t=180)=>{le(),F(t),I.current=setInterval(async()=>{try{let t=await o7(e);t.status===`paid`?(le(),R.current=null,localStorage.removeItem(re),Z.success(`支付成功!积分已到账`),$7.getState().refreshUser(),D(!1),k(null),u(null)):t.status===`cancelled`&&(le(),R.current=null,localStorage.removeItem(re))}catch{}},2e3),L.current=setInterval(()=>{F(e=>e<=1?(le(),R.current&&=(s7(R.current).catch(()=>{}),null),localStorage.removeItem(re),Z.warning(`订单已超时,请重新充值`),D(!1),k(null),u(null),0):e-1)},1e3)},[le]);return(0,$.jsxs)(dK,{style:{minHeight:`100vh`},children:[(0,$.jsxs)(`div`,{className:`desktop-sidebar`,style:{width:q,position:`fixed`,left:16,top:16,bottom:16,zIndex:100,background:`linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,display:`flex`,flexDirection:`column`,transition:`width 0.25s ease, left 0.25s ease`,overflow:`hidden`,border:`1px solid rgba(0, 0, 0, 0.06)`},children:[(0,$.jsx)(`div`,{style:{height:80,display:`flex`,alignItems:`center`,justifyContent:`flex-start`,padding:`0 20px`,flexShrink:0,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14},children:[(0,$.jsx)(`div`,{style:{width:42,height:42,borderRadius:14,flexShrink:0,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,overflow:`hidden`},children:x?(0,$.jsx)(`img`,{src:x,alt:`logo`,style:{width:28,height:28,objectFit:`contain`}}):(0,$.jsx)(j8,{style:{fontSize:20,color:`#ffffff`}})}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:17,fontWeight:700,letterSpacing:-.02,whiteSpace:`nowrap`,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:y})]})}),(0,$.jsx)(`div`,{style:{flex:1,padding:`8px 8px`,overflow:`auto`},children:(()=>{let t={};d.forEach(e=>{let n=e.parent_id??e.parentId;n&&(t[n]||(t[n]=[]),t[n].push(e))});let n=d.filter(e=>!(e.parent_id??e.parentId));n.sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0));let r=[],i=(t,n=0)=>{let r=t.path===K,i=t9[t.icon]||(0,$.jsx)(y3,{});return(0,$.jsxs)(`div`,{onClick:()=>t.path&&e(t.path),style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:10,padding:n>0?`6px 12px 6px 32px`:`6px 14px`,borderRadius:12,margin:`1px 4px`,cursor:`pointer`,fontSize:n>0?13:14,fontWeight:r?600:400,color:r?`#4f46e5`:`#475569`,background:r?`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%)`:`transparent`,transition:`all 0.2s ease`},children:[(0,$.jsx)(`span`,{style:{fontSize:n>0?14:16,flexShrink:0,color:r?`#6366f1`:`#64748b`},children:i}),(0,$.jsx)(`span`,{style:{whiteSpace:`nowrap`},children:t.label})]},t.id)};return n.forEach(e=>{if((e.menu_type??e.menuType)===`group`){let n=(t[e.id]||[]).sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0));r.push((0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{color:`#94a3b8`,fontSize:12,fontWeight:600,padding:`10px 14px 4px`,letterSpacing:.5,textTransform:`uppercase`},children:e.label}),n.map(e=>i(e,1))]},e.id))}else r.push(i(e))}),r})()}),(0,$.jsxs)(`div`,{onClick:()=>s(!0),style:{margin:`8px 12px`,padding:`12px 20px`,borderRadius:14,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8,color:`#ffffff`,fontSize:14,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%)`,e.currentTarget.style.transform=`translateY(-1px)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.5)`},onMouseLeave:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(99, 102, 241, 0.4)`},children:[(0,$.jsx)(gR,{style:{fontSize:16}}),(0,$.jsx)(`span`,{children:`充值积分`})]}),(0,$.jsx)(`div`,{style:{padding:`16px 16px`,flexShrink:0},children:(0,$.jsx)(kU,{menu:{items:ie,onClick:J},placement:`topRight`,arrow:!0,children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:12,padding:`10px 14px`,borderRadius:14,cursor:`pointer`,transition:`all 0.25s ease`,background:`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,boxShadow:`0 2px 12px rgba(0, 0, 0, 0.04)`},onMouseEnter:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #ffffff 0%, #f8fafc 100%)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0, 0, 0, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.background=`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,e.currentTarget.style.boxShadow=`0 2px 12px rgba(0, 0, 0, 0.04)`},children:[(0,$.jsx)(uT,{size:36,icon:(0,$.jsx)(K8,{}),style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,flexShrink:0,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`}}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsx)(`div`,{style:{color:`#1e293b`,fontSize:14,fontWeight:600,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,letterSpacing:-.01},children:n?.username}),(0,$.jsxs)(`div`,{style:{color:`#6366f1`,fontSize:12,fontWeight:500,letterSpacing:0,background:`rgba(99, 102, 241, 0.08)`,padding:`2px 8px`,borderRadius:6,display:`inline-block`},children:[`积分: `,n?.credits||0]})]})]})})})]}),(0,$.jsx)(`div`,{className:`desktop-content`,style:{marginLeft:q+28,marginRight:12,marginTop:16,marginBottom:16,flex:1,minHeight:`calc(100vh - 32px)`,background:`transparent`,padding:0,transition:`margin-left 0.25s ease`},children:(0,$.jsx)(`div`,{style:{boxSizing:`border-box`,height:`100%`,background:`#ffffffff`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,minHeight:`100%`,padding:`24px 32px 32px`,border:`1px solid rgba(0, 0, 0, 0.06)`},children:(0,$.jsx)(Ct,{})})}),(0,$.jsxs)(`div`,{className:`mobile-bottom-nav`,children:[d.filter(e=>(e.menu_type??e.menuType)!==`group`).map(t=>t.path?(0,$.jsxs)(`div`,{className:`nav-item ${t.path===K?`active`:``}`,onClick:()=>e(t.path),children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:t9[t.icon]||(0,$.jsx)(y3,{})}),(0,$.jsx)(`span`,{children:t.label})]},t.id):null),(0,$.jsxs)(`div`,{className:`nav-item`,onClick:se,children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:(0,$.jsx)(T6,{})}),(0,$.jsx)(`span`,{children:`充值`})]}),(0,$.jsxs)(`div`,{className:`nav-item`,onClick:oe,children:[(0,$.jsx)(`span`,{className:`nav-icon`,children:(0,$.jsx)(B3,{})}),(0,$.jsx)(`span`,{children:`退出`})]})]}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(L3,{}),`修改密码`]}),open:i,onOk:ae,onCancel:()=>{a(!1),c.resetFields()},okText:`确认修改`,cancelText:`取消`,width:440,children:(0,$.jsxs)(xW,{form:c,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(xW.Item,{name:`oldPwd`,label:`原密码`,rules:[{required:!0,message:`请输入原密码`}],children:(0,$.jsx)(nK.Password,{placeholder:`请输入原密码`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(xW.Item,{name:`newPwd`,label:`新密码`,rules:[{required:!0,message:`请输入新密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(nK.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(xW.Item,{name:`confirmPwd`,label:`确认新密码`,rules:[{required:!0,message:`请再次输入新密码`},({getFieldValue:e})=>({validator(t,n){return!n||e(`newPwd`)===n?Promise.resolve():Promise.reject(Error(`两次密码不一致`))}})],children:(0,$.jsx)(nK.Password,{placeholder:`请再次输入新密码`,size:`large`,prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}})})})]})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(i3,{}),`积分充值`]}),open:o,onCancel:()=>{s(!1),u(null)},footer:null,width:680,children:(0,$.jsxs)(`div`,{style:{marginTop:16},children:[(0,$.jsxs)(DU,{style:{marginBottom:16},children:[(0,$.jsx)(Q8,{style:{color:`#6366f1`}}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,letterSpacing:0},children:`当前积分余额`}),(0,$.jsx)(Q.Text,{strong:!0,style:{color:`#6366f1`,fontSize:20,fontWeight:600},children:n?.credits??0})]}),(0,$.jsxs)(`div`,{style:{padding:`12px 16px`,background:`rgba(99, 102, 241, 0.06)`,borderRadius:10,marginBottom:16,display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(T3,{style:{color:`#6366f1`,fontSize:14}}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13},children:`当前后台仅支持支付宝/微信扫码充值,如需转账支付请联系我们`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12,flexWrap:`wrap`},children:p.map((e,t)=>{let n=n9[t%n9.length],r=(e.credits||0)+(e.bonus_credits||e.bonusCredits||0);return(0,$.jsxs)(`div`,{onClick:()=>u(e.id),style:{flex:`1 1 45%`,minWidth:200,borderRadius:16,padding:`20px 16px`,background:l===e.id?`rgba(99,102,241,0.04)`:`#fafbff`,border:l===e.id?`2px solid #6366f1`:`1px solid #f0f0f5`,cursor:`pointer`,position:`relative`,transition:`all 0.2s`},children:[e.description&&(0,$.jsx)(T$,{color:`purple`,style:{position:`absolute`,top:-10,left:`50%`,transform:`translateX(-50%)`,borderRadius:8,fontSize:11},children:e.description}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:44,height:44,borderRadius:12,flexShrink:0,background:n.gradient,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:18,color:`#fff`,boxShadow:`0 6px 16px ${n.shadow}`},children:n.icon}),(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:6},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15},children:e.name}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[r.toLocaleString(),` 积分`]})]}),(0,$.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,marginTop:4,background:n.gradient,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:[`¥`,e.price]})]})]})]},e.id)})}),!z.alipay&&!z.wechat?(0,$.jsx)(`div`,{style:{marginTop:20,marginBottom:8,padding:16,background:`#fef2f2`,borderRadius:12,border:`1px solid #fecaca`},children:(0,$.jsx)(Q.Text,{style:{color:`#dc2626`,fontSize:13},children:`⚠️ 暂无可用的支付方式,请联系管理员开启支付功能`})}):(0,$.jsxs)(`div`,{style:{marginTop:20,marginBottom:8},children:[(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13,marginBottom:8,display:`block`},children:`选择支付方式`}),(0,$.jsxs)(LL.Group,{value:A,onChange:e=>j(e.target.value),style:{display:`flex`,gap:12},children:[z.alipay&&(0,$.jsxs)(LL.Button,{value:`alipay`,style:{flex:1,textAlign:`center`,borderRadius:10,height:44,lineHeight:`42px`,borderColor:A===`alipay`?`#1677ff`:void 0,color:A===`alipay`?`#1677ff`:void 0},children:[(0,$.jsx)(i2,{style:{fontSize:16,marginRight:6}}),`支付宝`]}),z.wechat&&(0,$.jsxs)(LL.Button,{value:`wechat`,style:{flex:1,textAlign:`center`,borderRadius:10,height:44,lineHeight:`42px`,borderColor:A===`wechat`?`#07c160`:void 0,color:A===`wechat`?`#07c160`:void 0},children:[(0,$.jsx)(i5,{style:{fontSize:16,marginRight:6}}),`微信支付`]})]})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:[(0,$.jsx)(vD,{size:`large`,onClick:()=>{s(!1),u(null)},style:{borderRadius:10,marginRight:12},children:`取消`}),(0,$.jsx)(vD,{type:`primary`,size:`large`,disabled:!l||!z.alipay&&!z.wechat,loading:M,onClick:async()=>{let e=p.find(e=>e.id===l);if(!e)return;let t=(e.credits||0)+(e.bonus_credits||e.bonusCredits||0);try{N(!0);let n=await i7(e.id,A),r=n.qrUrl||n.codeUrl||n.qr_code||n.code_url;(n.paymentMethod===`alipay`||n.paymentMethod===`wechat`)&&r?(k({price:e.price,credits:t,qrCode:r,method:n.paymentMethod}),s(!1),D(!0),R.current=n.orderNo,localStorage.setItem(re,JSON.stringify({orderNo:n.orderNo,price:e.price,credits:t,qrCode:r,method:n.paymentMethod,createdAt:n.createdAt||new Date().toISOString(),timeoutSeconds:180})),ue(n.orderNo)):(Z.success(`充值成功!积分已到账`),$7.getState().refreshUser(),s(!1),u(null))}catch(e){Z.error(e?.message||`创建订单失败,请重试`)}finally{N(!1)}},style:{borderRadius:10,fontWeight:600,background:l?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#d1d5db`,border:`none`,boxShadow:l?`0 8px 24px rgba(99,102,241,0.3)`:`none`},children:`确认充值`})]})]})}),(0,$.jsx)(Pq,{open:E,onCancel:async()=>{if(le(),R.current){try{await s7(R.current)}catch{}R.current=null}localStorage.removeItem(re),D(!1),k(null)},footer:null,width:400,closable:!1,styles:{body:{padding:0,borderRadius:16,overflow:`hidden`}},children:(0,$.jsxs)(`div`,{style:{padding:`24px`},children:[(0,$.jsxs)(`div`,{style:{textAlign:`center`,marginBottom:24},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,background:O?.method===`alipay`?`linear-gradient(135deg, #1677ff, #0958d9)`:`linear-gradient(135deg, #07c160, #06ae56)`,borderRadius:16,display:`flex`,alignItems:`center`,justifyContent:`center`,margin:`0 auto 12px`},children:O?.method===`alipay`?(0,$.jsx)(i2,{style:{fontSize:24,color:`#fff`}}):(0,$.jsx)(i5,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:O?.method===`alipay`?`支付宝支付`:`微信支付`}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:O?.method===`alipay`?`请使用支付宝扫描二维码完成支付`:`请使用微信扫描二维码完成支付`})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:16,padding:20,display:`flex`,flexDirection:`column`,alignItems:`center`,boxShadow:`0 4px 20px rgba(0,0,0,0.08)`},children:[(0,$.jsx)(`div`,{style:{width:180,height:180,borderRadius:12,overflow:`hidden`,background:`#fff`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:O&&(0,$.jsx)(t2,{value:O.qrCode,size:160,level:`M`,includeMargin:!1})}),(0,$.jsxs)(`div`,{style:{marginTop:16,textAlign:`center`},children:[(0,$.jsxs)(`div`,{style:{fontSize:28,fontWeight:700,color:`#1a1a2e`},children:[`¥`,O?.price||0]}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`,marginTop:4},children:[`购买 `,O?.credits||0,` 积分`]}),(0,$.jsx)(`div`,{style:{marginTop:12,padding:`8px 16px`,background:P<=30?`#fef2f2`:`#f0f9ff`,borderRadius:8,border:P<=30?`1px solid #fecaca`:`1px solid #bae6fd`,display:`inline-block`},children:(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:P<=30?`#dc2626`:`#0284c7`},children:[`订单将在 `,(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:800},children:P}),` 秒后关闭`]})})]})]}),(0,$.jsx)(`div`,{style:{marginTop:20,padding:16,background:`#fef3c7`,borderRadius:12},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:8},children:[(0,$.jsx)(`div`,{style:{fontSize:16,marginTop:-2},children:`💡`}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#92400e`},children:[(0,$.jsx)(`div`,{style:{fontWeight:500,marginBottom:4},children:`支付提示`}),(0,$.jsxs)(`ul`,{style:{margin:0,paddingLeft:16},children:[(0,$.jsx)(`li`,{style:{marginBottom:2},children:`请在支付后等待页面自动跳转`}),(0,$.jsx)(`li`,{children:`如支付成功但未到账,请联系客服`})]})]})]})}),(0,$.jsx)(`div`,{style:{marginTop:20},children:(0,$.jsx)(vD,{size:`large`,block:!0,onClick:async()=>{if(le(),R.current){try{await s7(R.current)}catch{}R.current=null}localStorage.removeItem(re),D(!1),k(null),u(null)},style:{borderRadius:10},children:`取消支付`})})]})}),(0,$.jsx)(cte,{}),(0,$.jsx)(`div`,{style:{position:`fixed`,right:24,bottom:24,zIndex:1e3},children:(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:64,bottom:8,padding:`8px 16px`,background:`#1e293b`,color:`#ffffff`,borderRadius:8,fontSize:13,whiteSpace:`nowrap`,opacity:+!!ee,transition:`opacity 0.2s ease`,pointerEvents:`none`},children:`联系我们`}),(0,$.jsx)(`button`,{onClick:()=>H(!0),style:{width:56,height:56,borderRadius:`50%`,border:`none`,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,color:`#ffffff`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.05)`,e.currentTarget.style.boxShadow=`0 6px 24px rgba(99, 102, 241, 0.5)`,te(!0)},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.4)`,te(!1)},children:(0,$.jsx)(Y3,{style:{fontSize:20}})})]})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(Y3,{}),`联系我们`]}),open:V,onCancel:()=>{H(!1),U.resetFields()},footer:null,width:480,children:(0,$.jsxs)(`div`,{style:{marginTop:8},children:[(0,$.jsxs)(xW,{form:U,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`name`,label:`姓名`,rules:[{required:!0,message:`请输入姓名`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的姓名`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`phone`,label:`手机号`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1[3-9]\d{9}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的手机号`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`companyName`,label:`公司名称`,rules:[{required:!0,message:`请输入公司名称`}],children:(0,$.jsx)(nK,{placeholder:`请输入公司名称`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`industry`,label:`您的行业`,rules:[{required:!0,message:`请输入您的行业`}],children:(0,$.jsx)(nK,{placeholder:`请输入您的行业`,size:`large`})}),(0,$.jsx)(xW.Item,{name:`message`,label:`留言(选填)`,children:(0,$.jsx)(nK.TextArea,{placeholder:`请输入您的需求或问题`,rows:3,style:{borderRadius:10}})})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,display:`flex`,gap:12},children:[(0,$.jsx)(vD,{size:`large`,onClick:()=>{H(!1),U.resetFields()},style:{borderRadius:10,flex:1},children:`取消`}),(0,$.jsx)(vD,{type:`primary`,size:`large`,onClick:ce,loading:ne,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,flex:1},children:`提交`})]})]})})]})},dte=`http://localhost:8000/api`,fte=()=>{let{checkAuth:e}=$7(),[t,n]=(0,S.useState)(!1),[r,i]=(0,S.useState)(`password`),[a,o]=(0,S.useState)(`password`),[s,c]=(0,S.useState)(0),[l,u]=(0,S.useState)(0),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(!1),[_,v]=(0,S.useState)(!1),[y,b]=(0,S.useState)(0),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),E=(()=>{try{let e=localStorage.getItem(`siteInfo`);if(e){let t=JSON.parse(e);return{siteName:t.siteName||`VideoGen.AI`,siteLogo:t.siteLogo||``}}}catch{}return{siteName:`VideoGen.AI`,siteLogo:``}})(),[D,O]=(0,S.useState)(E.siteName),[k,A]=(0,S.useState)(E.siteLogo),[j,M]=(0,S.useState)(``),[N,P]=(0,S.useState)(``),F=Je(),{login:I}=$7(),[L]=xW.useForm(),[R]=xW.useForm(),[z]=xW.useForm();(0,S.useEffect)(()=>{q5().then(e=>{O(e.siteName),A(e.siteLogo),M(e.userAgreementUrl),P(e.privacyPolicyUrl)}).catch(()=>{})},[]);let B=()=>d?!0:(Z.warning(`请先阅读并同意用户协议和隐私政策`),!1),V=async()=>{if(B())try{let t=await L.validateFields();await I(t.phone,t.password,void 0,t.rememberMe),Z.success(`登录成功,欢迎回来`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}},H=async()=>{if(B())try{let t=R.getFieldsValue();if(!t.phone||!t.code){Z.error(`请填写手机号和验证码`);return}n(!0),await j5(t.phone,t.code),Z.success(`登录成功,欢迎回来`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}finally{n(!1)}},U=async()=>{if(B())try{let t=await z.validateFields();n(!0),await M5(t.phone,t.regCode,t.password),Z.success(`注册成功`),await e(),F(`/projects`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`注册失败`;Z.error(t)}finally{n(!1)}},ee=(e,t)=>{e(60);let n=setInterval(()=>{e(e=>e<=1?(clearInterval(n),m(!1),t?C(!0):T(!0),0):e-1)},1e3)};(0,S.useEffect)(()=>{s===0&&r===`phone`&&v(!1)},[s,r]);let te=async(e,t)=>{try{if(!e||!/^1\d{10}$/.test(e)){Z.error(`请输入正确的手机号`);return}if(t){m(!0),g(!1);return}if(!_){m(!0),v(!1);return}let n=``;n=r===`register`?`register`:`login`,await X5(e,n),ee(t?u:c),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(g(!1),u(0)):(v(!1),c(0)),b(e=>e+1)}},ne=async(e=!1)=>{let t=r===`register`?z.getFieldValue(`phone`):R.getFieldValue(`phone`);try{let e=``;e=r===`register`?`register`:`login`,await X5(t,e),r===`register`?(g(!0),ee(u,!0)):(v(!0),ee(c,!1)),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(g(!1),u(0),C(!0)):(v(!1),c(0),T(!0)),b(e=>e+1)}},W=e=>{o(e),i(e),c(0),u(0),v(!1),g(!1),m(!1),C(!1),T(!1),b(e=>e+1),e===`password`?L.resetFields():R.resetFields()},re=[{icon:(0,$.jsx)(U2,{}),title:`AI 智能优化`,desc:`输入原始提示词,AI 自动为您生成专业级视频、图片描述`},{icon:(0,$.jsx)(S6,{}),title:`一键生成视频、图片`,desc:`支持多种规格生成视频、图片`},{icon:(0,$.jsx)(g3,{}),title:`项目维度管理`,desc:`按项目行业分类视频、图片,支持多种行业`}],G={background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,height:48,borderRadius:10,fontSize:14},K=e=>{e&&window.open(`${dte.replace(/\/api$/,``)}${e}`,`_blank`)};return(0,$.jsxs)(`div`,{style:{minHeight:`100vh`,display:`flex`,backgroundImage:`url(/backimage.png)`,backgroundSize:`cover`,backgroundPosition:`center`,backgroundRepeat:`no-repeat`,backgroundAttachment:`fixed`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(135deg, rgba(240,244,255,0.9) 0%, rgba(232,236,248,0.85) 40%, rgba(240,240,255,0.9) 70%, rgba(248,249,255,0.95) 100%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,width:500,height:500,borderRadius:`50%`,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,top:-150,right:-100,filter:`blur(40px)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,width:400,height:400,borderRadius:`50%`,background:`radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%)`,bottom:-100,left:-80,filter:`blur(50px)`}}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`center`,padding:`0 80px`,zIndex:1},children:(0,$.jsxs)(DU,{direction:`vertical`,size:36,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:20},children:[k?(0,$.jsx)(`img`,{src:k,alt:`logo`,style:{width:52,height:52,borderRadius:14,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:(0,$.jsx)(j8,{style:{fontSize:26,color:`#fff`}})}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:28,fontWeight:800,letterSpacing:-.5},children:D})]}),(0,$.jsx)(`div`,{className:`shiny-text-container`,children:(0,$.jsx)(`span`,{className:`shiny-text`,children:`AI赋能创意,素材触手可及`})}),(0,$.jsxs)(Q.Paragraph,{style:{color:`#64748b`,fontSize:17,maxWidth:480,lineHeight:1.8},children:[`专业的 AI 素材生成平台,通过智能提示词优化,`,(0,$.jsx)(`br`,{}),`让您的创意快速转化为精美视频、图片`]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:20},children:re.map((e,t)=>(0,$.jsxs)(`div`,{className:`electric-border-card`,style:{position:`relative`,display:`flex`,gap:16,alignItems:`flex-start`,padding:`18px 22px`,borderRadius:14,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(12px)`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{className:`electric-border`}),(0,$.jsx)(`div`,{className:`electric-border-inner`}),(0,$.jsx)(`div`,{style:{position:`relative`,zIndex:1},children:(0,$.jsx)(`div`,{style:{width:44,height:44,borderRadius:12,flexShrink:0,background:`linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15))`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#6366f1`,fontSize:20},children:e.icon})}),(0,$.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,$.jsx)(Q.Text,{style:{color:`#1e293b`,fontSize:15,fontWeight:600,display:`block`,marginBottom:4},children:e.title}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13,lineHeight:1.6},children:e.desc})]})]},t))})]})}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1,padding:`40px 24px`},children:(0,$.jsxs)(Oz,{style:{width:440,maxWidth:`100%`,borderRadius:20,boxShadow:`0 20px 60px rgba(0,0,0,0.08)`,border:`1px solid #e2e8f0`,background:`#fff`},styles:{body:{padding:`36px 28px`}},children:[(0,$.jsx)(Q.Title,{level:3,style:{textAlign:`center`,marginBottom:6,color:`#1e293b`,fontWeight:700},children:r===`register`?`创建账号`:`欢迎回来`}),(0,$.jsx)(Q.Text,{style:{display:`block`,textAlign:`center`,marginBottom:28,color:`#94a3b8`,fontSize:14},children:r===`register`?`注册新账号,开始创作视频`:`登录您的账号,开始创作视频`}),r!==`register`&&(0,$.jsx)(`div`,{style:{display:`flex`,gap:0,marginBottom:24,background:`#f1f5f9`,borderRadius:10,padding:4,border:`1px solid #e2e8f0`},children:[`password`,`phone`].map(e=>(0,$.jsx)(`div`,{onClick:()=>W(e),style:{flex:1,textAlign:`center`,padding:`10px 0`,borderRadius:8,cursor:`pointer`,fontSize:14,fontWeight:a===e?600:400,color:a===e?`#6366f1`:`#64748b`,background:a===e?`#fff`:`transparent`,border:a===e?`1px solid rgba(99,102,241,0.2)`:`1px solid transparent`,boxShadow:a===e?`0 2px 8px rgba(99,102,241,0.1)`:`none`,transition:`all 0.3s ease`},children:e===`password`?`密码登录`:`验证码登录`},e))}),r===`password`&&(0,$.jsxs)(xW,{form:L,size:`large`,layout:`vertical`,onFinish:V,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,style:G})}),(0,$.jsx)(xW.Item,{name:`password`,rules:[{required:!0,message:`请输入密码`}],children:(0,$.jsx)(nK.Password,{prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入密码`,style:G})}),(0,$.jsx)(xW.Item,{name:`rememberMe`,valuePropName:`checked`,style:{marginBottom:12},children:(0,$.jsx)(aV,{children:`记住我的登录状态`})}),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,htmlType:`submit`,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登 录`})})]}),r===`phone`&&(0,$.jsxs)(xW,{form:R,size:`large`,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:G})}),(0,$.jsx)(xW.Item,{name:`code`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(DU.Compact,{style:{width:`100%`},children:[(0,$.jsx)(nK,{prefix:(0,$.jsx)(B6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!_,style:{...G,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(vD,{disabled:s>0,onClick:()=>{w?(v(!1),m(!0),b(e=>e+1)):te(R.getFieldValue(`phone`))},style:{height:48,borderRadius:`0 10px 10px 0`,background:s>0||_?`#f1f5f9`:`rgba(99,102,241,0.1)`,border:`1.5px solid #e2e8f0`,borderLeft:`none`,color:s>0?`#94a3b8`:`#6366f1`,fontWeight:600,minWidth:100},children:s>0?`${s}s`:w?`重新发送`:`获取验证码`})]})}),p&&(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(r9,{onSuccess:ne,isVerified:_})},y),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,onClick:H,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`登 录`})})]}),r===`register`&&(0,$.jsxs)(xW,{form:z,size:`large`,layout:`vertical`,children:[(0,$.jsx)(xW.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(nK,{prefix:(0,$.jsx)(Q3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:G})}),(0,$.jsx)(xW.Item,{name:`regCode`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(DU.Compact,{style:{width:`100%`},children:[(0,$.jsx)(nK,{prefix:(0,$.jsx)(B6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!h,style:{...G,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(vD,{disabled:l>0,onClick:()=>{x?(g(!1),m(!0),b(e=>e+1)):te(z.getFieldValue(`phone`),!0)},style:{height:48,borderRadius:`0 10px 10px 0`,background:l>0||h?`#f1f5f9`:`rgba(99,102,241,0.1)`,border:`1.5px solid #e2e8f0`,borderLeft:`none`,color:l>0?`#94a3b8`:`#6366f1`,fontWeight:600,minWidth:100},children:l>0?`${l}s`:x?`重新发送`:`获取验证码`})]})}),p&&(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(r9,{onSuccess:ne,isVerified:h})},y),(0,$.jsx)(xW.Item,{name:`password`,rules:[{required:!0,message:`请设置密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(nK.Password,{prefix:(0,$.jsx)(L3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请设置密码(至少6位)`,style:G})}),(0,$.jsx)(xW.Item,{style:{marginBottom:12},children:(0,$.jsx)(vD,{type:`primary`,onClick:U,loading:t,block:!0,style:{height:48,borderRadius:10,fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.25)`},children:`注 册`})})]}),(0,$.jsx)(`div`,{style:{marginBottom:16},children:(0,$.jsx)(aV,{checked:d,onChange:e=>f(e.target.checked),children:(0,$.jsxs)(`span`,{style:{fontSize:13,color:`#64748b`},children:[`我已阅读并同意`,(0,$.jsx)(`span`,{onClick:e=>{e.stopPropagation(),K(j)},style:{color:`#6366f1`,cursor:`pointer`},children:`《用户协议》`}),`和`,(0,$.jsx)(`span`,{onClick:e=>{e.stopPropagation(),K(N)},style:{color:`#6366f1`,cursor:`pointer`},children:`《隐私政策》`})]})})}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:r===`register`?(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#6366f1`,cursor:`pointer`},onClick:()=>{i(`password`),o(`password`),C(!1),T(!1),g(!1),m(!1),b(e=>e+1),z.resetFields()},children:`已有账号?去登录`}):(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#6366f1`,cursor:`pointer`},onClick:()=>{i(`register`),C(!1),T(!1),g(!1),m(!1),b(e=>e+1)},children:`没有账号?立即注册`})})]})})]})},r9=({onSuccess:e,isVerified:t})=>{let n=S.useRef(null),r=S.useRef(null),i=S.useRef(null),a=S.useRef(0),o=S.useRef(!1),[s,c]=S.useState(360),l=s-50;S.useEffect(()=>{let e=()=>{if(n.current){let e=n.current.offsetWidth;e>0&&c(e)}};e();let t=new ResizeObserver(e);return n.current&&t.observe(n.current),window.addEventListener(`resize`,e),()=>{t.disconnect(),window.removeEventListener(`resize`,e)}},[]);let u=n=>{if(o.current||t)return;let c=Math.max(0,Math.min(n,l));a.current=c,r.current&&(r.current.style.left=`${c}px`),i.current&&(i.current.style.width=`${c+50}px`),c>=l-5&&(o.current=!0,r.current&&(r.current.style.background=`#22c55e`,r.current.innerHTML=``),i.current&&(i.current.style.width=`${s}px`,i.current.style.background=`#dcfce7`),e())};return(0,$.jsxs)(`div`,{ref:n,onMouseDown:e=>{if(e.preventDefault(),o.current||t)return;let s=n.current;if(!s)return;let c=s.getBoundingClientRect(),d=e=>{u(e.clientX-c.left-50/2)},f=()=>{document.removeEventListener(`mousemove`,d),document.removeEventListener(`mouseup`,f),!o.current&&a.current({page:1,pageSize:10,total:0,items:[]}),i9=p5((e,t)=>({projects:[],records:pte(),loading:!1,mediaType:`image`,countType:`请选择`,selectedRatio:`1:1`,selectedResolution:`2K`,width:2048,height:2048,videoDuration:5,videoAspectRatio:`16:9`,videoResolution:`720p`,engineOptions:{ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]},enginesele:[],fetchProjects:async()=>{e({loading:!0});try{e({projects:await I5(),loading:!1})}catch{e({loading:!1})}},createProject:async(n,r)=>{let i=await L5(n,r);return e({projects:[i,...t().projects]}),i},deleteProject:async n=>{await R5(n),e({projects:t().projects.filter(e=>e.id!==n)})},fetchRecords:async(t={})=>{e({loading:!0});try{e({records:await z5(t),loading:!1})}catch{e({loading:!1})}},optimizePrompt:async(n,r)=>{let i=await B5(n,r);try{await $7.getState().checkAuth()}catch{}let a=t().records;return e({records:{...a,total:a.total+1,items:[i.record,...a.items]}}),i},generateVideo:async(n,r)=>{let i=await G5(n,r);try{await $7.getState().checkAuth()}catch{}let a=t().records;return e({records:{...a,items:a.items.map(e=>e.id===n?i:e)}}),i},updateRecordReferences:(n,r)=>{let i=t().records;e({records:{...i,items:i.items.map(e=>e.id===n?{...e,references:r}:e)}})},setMediaType:t=>e({mediaType:t}),setCountType:t=>e({countType:t}),setImageSettings:(t,n,r,i)=>e({selectedRatio:t,selectedResolution:n,width:r,height:i}),setVideoSettings:(t,n,r)=>e({videoDuration:t,videoAspectRatio:n,videoResolution:r}),setEngineOptions:t=>e({engineOptions:t}),setSelectedRatio:t=>e({selectedRatio:t}),setSelectedResolution:t=>e({selectedResolution:t}),setWidth:t=>e({width:t}),setHeight:t=>e({height:t}),setVideoDuration:t=>e({videoDuration:t}),setVideoAspectRatio:t=>e({videoAspectRatio:t}),setVideoResolution:t=>e({videoResolution:t}),setEnginesele:t=>e({enginesele:t}),resetGenerationConfig:()=>e({mediaType:`image`,countType:`请选择`,selectedRatio:`1:1`,selectedResolution:`2K`,width:2048,height:2048,videoDuration:5,videoAspectRatio:`16:9`,videoResolution:`720p`,engineOptions:{ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]},enginesele:[]})}));function a9(e){if(!e)return`-`;let t=e.trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);return n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``),t.replace(`T`,` `).slice(0,16)}var o9=[`#f97316`,`#3b82f6`,`#8b5cf6`,`#10b981`,`#eab308`,`#6366f1`,`#ef4444`,`#06b6d4`,`#64748b`,`#78716c`],s9={ShoppingCartOutlined:(0,$.jsx)(Q6,{}),BookOutlined:(0,$.jsx)(L2,{}),HomeOutlined:(0,$.jsx)(y3,{}),FireOutlined:(0,$.jsx)(Q4,{}),RocketOutlined:(0,$.jsx)(L6,{}),SkinOutlined:(0,$.jsx)(s8,{}),CompassOutlined:(0,$.jsx)(T4,{}),HeartOutlined:(0,$.jsx)(u3,{}),CarOutlined:(0,$.jsx)(Q2,{}),CameraOutlined:(0,$.jsx)(Y2,{}),CloudOutlined:(0,$.jsx)(u4,{}),StarOutlined:(0,$.jsx)(y8,{}),TrophyOutlined:(0,$.jsx)(L8,{}),ThunderboltOutlined:(0,$.jsx)(j8,{}),BulbOutlined:(0,$.jsx)(U2,{}),CoffeeOutlined:(0,$.jsx)(S4,{}),CrownOutlined:(0,$.jsx)(j4,{}),DashboardOutlined:(0,$.jsx)(P4,{}),FlagOutlined:(0,$.jsx)(t3,{}),GlobalOutlined:(0,$.jsx)(s3,{}),GiftOutlined:(0,$.jsx)(i3,{}),LaptopOutlined:(0,$.jsx)(O3,{}),MobileOutlined:(0,$.jsx)(Q3,{}),MonitorOutlined:(0,$.jsx)(t6,{}),PayCircleOutlined:(0,$.jsx)(s6,{}),PictureOutlined:(0,$.jsx)(p6,{}),PlayCircleOutlined:(0,$.jsx)(S6,{}),SafetyOutlined:(0,$.jsx)(B6,{}),ShoppingOutlined:(0,$.jsx)(t8,{}),SmileOutlined:(0,$.jsx)(u8,{}),SoundOutlined:(0,$.jsx)(g8,{}),TagOutlined:(0,$.jsx)(T8,{}),TeamOutlined:(0,$.jsx)(O8,{}),ToolOutlined:(0,$.jsx)(P8,{}),TruckOutlined:(0,$.jsx)(B8,{}),VideoCameraOutlined:(0,$.jsx)(Y8,{}),WalletOutlined:(0,$.jsx)(Q8,{}),BankOutlined:(0,$.jsx)(O2,{}),BuildOutlined:(0,$.jsx)(B2,{}),ExperimentOutlined:(0,$.jsx)(U4,{}),HighlightOutlined:(0,$.jsx)(p3,{}),IdcardOutlined:(0,$.jsx)(S3,{}),MedicineBoxOutlined:(0,$.jsx)(K3,{}),ReadOutlined:(0,$.jsx)(O6,{}),RestOutlined:(0,$.jsx)(j6,{}),SketchOutlined:(0,$.jsx)(i8,{}),SolutionOutlined:(0,$.jsx)(p8,{})},mte=()=>{let[e,t]=(0,S.useState)(!1),[n]=xW.useForm(),r=Je(),{projects:i,fetchProjects:a,createProject:o,deleteProject:s}=i9(),[c,l]=(0,S.useState)([]);(0,S.useEffect)(()=>{a(),e7().then(l).catch(()=>{})},[]);let u=Object.fromEntries(c.map((e,t)=>[e.key,{label:e.label,color:o9[t%o9.length],icon:e.icon||`AppstoreOutlined`}]));return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`22px 24px`,borderRadius:16,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-20,top:-20,width:200,height:200,borderRadius:`50%`,background:`rgba(255,255,255,0.08)`}}),(0,$.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,$.jsx)(Q.Title,{level:3,style:{margin:`0 0 4px`,color:`#fff`,fontWeight:700},children:`我的项目`}),(0,$.jsxs)(Q.Text,{style:{color:`rgba(255,255,255,0.7)`,fontSize:14},children:[`共 `,i.length,` 个项目 · 按行业分类管理`]})]}),(0,$.jsx)(vD,{icon:(0,$.jsx)(gR,{}),onClick:()=>t(!0),size:`large`,style:{background:`rgba(255,255,255,0.15)`,border:`1px solid rgba(255,255,255,0.3)`,color:`#fff`,fontWeight:600,backdropFilter:`blur(10px)`,borderRadius:10,height:42},children:`新建项目`})]}),i.length===0?(0,$.jsx)(NC,{image:NC.PRESENTED_IMAGE_SIMPLE,description:`还没有项目,创建您的第一个视频项目`,style:{padding:`60px 0`},children:(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(gR,{}),onClick:()=>t(!0),size:`large`,children:`创建第一个项目`})}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},className:`stagger-children`,children:i.map((e,t)=>(0,$.jsxs)(`div`,{className:`project-card project-item animate-slideInCard`,onClick:()=>r(`/projects/${e.id}/generate`),style:{display:`flex`,alignItems:`center`,padding:`18px 22px`,borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,animationDelay:`${t*.06}s`},children:[(0,$.jsx)(`div`,{style:{width:50,height:50,borderRadius:14,flexShrink:0,background:`${u[e.industry]?.color||`#64748b`}12`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:24,marginRight:16,color:u[e.industry]?.color||`#64748b`},children:s9[u[e.industry]?.icon]||(0,$.jsx)(u2,{})}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4,flexWrap:`wrap`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1a1a2e`},children:e.name}),(0,$.jsx)(T$,{color:u[e.industry]?.color||`#64748b`,style:{borderRadius:6,margin:0},children:u[e.industry]?.label||e.industry})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(TH,{style:{fontSize:12,color:`#94a3b8`}}),(0,$.jsxs)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:12,color:`#94a3b8`},children:[`创建于 `,a9(e.createdAt)]})]})]}),(0,$.jsxs)(`div`,{className:`project-actions`,style:{display:`flex`,alignItems:`center`,gap:8,marginLeft:16},children:[(0,$.jsx)(vD,{type:`primary`,icon:(0,$.jsx)(S6,{}),onClick:t=>{t.stopPropagation(),r(`/projects/${e.id}/generate`)},style:{background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,borderRadius:10,fontWeight:600,height:36,boxShadow:`0 4px 12px rgba(99,102,241,0.25)`},children:`生成`}),(0,$.jsx)(Rq,{title:`确定删除该项目?`,description:`项目下的生成记录将一并删除`,onConfirm:async t=>{t?.stopPropagation(),await s(e.id),Z.success(`项目已删除`)},onCancel:e=>e?.stopPropagation(),children:(0,$.jsx)(vD,{danger:!0,icon:(0,$.jsx)(O$,{}),onClick:e=>e.stopPropagation(),style:{borderRadius:10,height:36,background:`rgba(239,68,68,0.06)`,border:`1px solid rgba(239,68,68,0.15)`,color:`#ef4444`}})}),(0,$.jsx)(Ug,{className:`mobile-hide`,style:{color:`#cbd5e1`,fontSize:12}})]})]},e.id))}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(u2,{}),`新建项目`]}),open:e,onOk:async()=>{try{let e=await n.validateFields(),i=await o(e.name,e.industry);Z.success(`项目创建成功`),t(!1),n.resetFields(),r(`/projects/${i.id}/generate`)}catch{}},onCancel:()=>{t(!1),n.resetFields()},okText:`创建`,cancelText:`取消`,width:480,children:(0,$.jsxs)(xW,{form:n,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(xW.Item,{name:`name`,label:`项目名称`,rules:[{required:!0,message:`请输入项目名称`}],children:(0,$.jsx)(nK,{placeholder:`例如:618电商大促宣传片`,prefix:(0,$.jsx)(xZ,{}),size:`large`})}),(0,$.jsx)(xW.Item,{name:`industry`,label:`所属行业`,rules:[{required:!0,message:`请选择行业`}],children:(0,$.jsx)(lw,{placeholder:`选择项目所属行业`,size:`large`,children:c.map((e,t)=>(0,$.jsx)(lw.Option,{value:e.key,children:(0,$.jsxs)(DU,{children:[s9[e.icon]||(0,$.jsx)(u2,{}),` `,e.label]})},e.key))})})]})})]})};function hte(){if(typeof crypto<`u`&&typeof crypto.randomUUID==`function`)return crypto.randomUUID();if(typeof crypto<`u`&&typeof crypto.getRandomValues==`function`){let e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}return`${Date.now().toString(16).padStart(12,`0`)}-${Math.random().toString(16).slice(2,10).padStart(8,`0`)}-4xxx-yxxx-${Math.random().toString(16).slice(2,12)}`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}var c9=({src:e,width:t=48,height:n=48})=>{let[r,i]=(0,S.useState)(null),[a,o]=(0,S.useState)(null);return(0,S.useEffect)(()=>{let r=document.createElement(`video`);r.muted=!0,r.preload=`metadata`,r.crossOrigin=`anonymous`;let a=()=>{o(r.duration),r.currentTime=Math.min(1,r.duration*.1)},s=()=>{try{let e=document.createElement(`canvas`);e.width=t*2,e.height=n*2;let a=e.getContext(`2d`);a&&(a.drawImage(r,0,0,e.width,e.height),i(e.toDataURL(`image/jpeg`,.7)))}catch{}};return r.addEventListener(`loadedmetadata`,a),r.addEventListener(`seeked`,s),r.src=e,()=>{r.removeEventListener(`loadedmetadata`,a),r.removeEventListener(`seeked`,s)}},[e,t,n]),(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`,background:`#1a1a2e`},children:[r?(0,$.jsx)(`img`,{src:r,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(S6,{style:{color:`#fff`,fontSize:18}})}),a!=null&&(0,$.jsx)(`span`,{style:{position:`absolute`,bottom:2,right:2,fontSize:9,color:`#fff`,background:`rgba(0,0,0,0.6)`,borderRadius:4,padding:`1px 4px`,lineHeight:1.3},children:(e=>`${Math.round(e)}s`)(a)})]})},gte=()=>{let{projectId:e}=Qe(),t=Je(),[n]=xW.useForm(),{projects:r,records:i,fetchProjects:a,fetchRecords:o,optimizePrompt:s,generateVideo:c}=i9(),l=i.items,{user:u}=$7(),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(null),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(!1),[x,C]=(0,S.useState)({}),[w,T]=(0,S.useState)({}),[E,D]=(0,S.useState)({}),[O,k]=(0,S.useState)(null),[A,j]=(0,S.useState)(null),[M,N]=(0,S.useState)([]),[P,F]=(0,S.useState)(!1),[I,L]=(0,S.useState)(``),[R,z]=(0,S.useState)(!1),[B,V]=(0,S.useState)(``),H=(0,S.useRef)(null),[U,ee]=(0,S.useState)({}),[te,ne]=(0,S.useState)({}),[W,re]=(0,S.useState)({}),[G,K]=(0,S.useState)(null),[q,ie]=(0,S.useState)({}),[J,ae]=(0,S.useState)(null),[oe,se]=(0,S.useState)(5),[ce,le]=(0,S.useState)(`16:9`),[ue,de]=(0,S.useState)(`720p`),[fe,pe]=(0,S.useState)(null),[me,he]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`720p`,`1080p`],durations:[5,8,10,12,15]}),[ge,_e]=(0,S.useState)(0),[ve,ye]=(0,S.useState)(0),[be,xe]=(0,S.useState)(`image`),[Se,Ce]=(0,S.useState)(`1:1`),[we,Te]=(0,S.useState)(`2K`),[Ee,De]=(0,S.useState)(2048),[Oe,ke]=(0,S.useState)(2048),[Ae,je]=(0,S.useState)(!1),[Me,Ne]=(0,S.useState)([]),[Pe,Fe]=(0,S.useState)([]);(0,S.useEffect)(()=>{if(c7().then(e=>{Ne(e.video),Fe(e.image)}),!Ae)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&je(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[Ae]);let Ie=(e,t)=>{for(let n=0;n{let t=e===`2k`?`2048`:e===`4k`?`4096`:e;for(let e=0;e{qe(e)},ze=e=>{Xe(parseInt(e))},[Be,Ve]=(0,S.useState)([]),[He,Ue]=(0,S.useState)([]),[We,Ge]=(0,S.useState)([]),[Ke,qe]=(0,S.useState)(0),[Ye,Xe]=(0,S.useState)(0);(0,S.useEffect)(()=>{We[Ye]&&We[Ye][Ke]!==void 0&&(De(We[Ye][Ke].substring(0,4)),ke(We[Ye][Ke].substring(5)))},[Ke]),(0,S.useEffect)(()=>{We[Ye]&&We[Ye][Ke]!==void 0&&(De(We[Ye][Ke].substring(0,4)),ke(We[Ye][Ke].substring(5)))},[Ye]);let Ze=()=>{De(Oe),ke(Ee)},$e=e=>{xe(e.target.value===`image`?`image`:`video`)};(0,S.useEffect)(()=>{e7().then(e=>{ee(Object.fromEntries(e.map(e=>[e.key,e.label]))),ne(Object.fromEntries(e.map(e=>[e.key,e.optionGroups||[]])))}).catch(()=>{}),Y5().then(e=>{let t=e.items?.[0]?.supportedSizes||{},n=[],r=[],i=[];for(let e in t[`2K`])n.push(e),r.push(t[`2K`][e]);n.forEach((e,t)=>{Ve(n=>[...n,{value:e,label:String(t)}])});for(let e in t[`4K`])i.push(t[`4K`][e]);Ge([r,i]);let a=[];for(let e in t)a.push(e);a.forEach((e,t)=>{Ue(n=>[...n,{value:e,label:String(t)}])})}).catch(()=>{}),J5().then(e=>{if(e.items?.length){let t=e.items[0];he({ratios:t.supportedRatios?.length?t.supportedRatios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions?.length?t.supportedResolutions:[`720p`,`1080p`],durations:t.supportedDurations?.length?t.supportedDurations:[5,8,10,12,15]})}}).catch(()=>{})},[]),(0,S.useEffect)(()=>{a(),o({projectId:e,page:1,pageSize:100})},[e,a,o]);let et=(0,S.useRef)(!1);(0,S.useEffect)(()=>{et.current||l.length===0||(et.current=!0,console.log(`aaaa`,l),l.forEach(t=>{t.projectId===e&&t.status===`generating`&&(T(e=>({...e,[t.id]:`generating`})),Dt(t.id)),t.projectId===e&&t.status===`optimizing`&&ct(t.id)}))},[l,e]);let tt=(0,S.useRef)(new Set),nt=(0,S.useRef)(null),rt=(0,S.useRef)(null),it=e=>{tt.current.add(e),st()},at=e=>{tt.current.delete(e),tt.current.size===0&&ot()},ot=()=>{nt.current&&=(clearInterval(nt.current),null),rt.current&&=(rt.current.abort(),null)},st=()=>{nt.current||=setInterval(async()=>{try{rt.current&&rt.current.abort();let t=new AbortController;rt.current=t;let n=await z5({projectId:e,page:1,pageSize:100,signal:t.signal});rt.current=null;let r=Array.from(tt.current),i=[];if(r.length>0){let e=i9.getState().records,t=e.items.map(e=>{if(r.includes(e.id)){let t=n.items.find(t=>t.id===e.id);if(t)return t.status!==`optimizing`&&i.push(e.id),t}return e});i9.setState({records:{...e,items:t}}),i.forEach(e=>{at(e)})}}catch(e){e.name!==`AbortError`&&console.error(`Optimizing polling error:`,e)}},3e3)},ct=e=>{it(e)},lt=(0,S.useRef)(!1),ut=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(lt.current||l.length===0)return;let t=localStorage.getItem(`pending_optimize`);if(t)try{let{key:n,projectId:r,prompt:i,duration:a,ts:o}=JSON.parse(t);if(Date.now()-o>300*1e3||r!==e){localStorage.removeItem(`pending_optimize`);return}if(ut.current===n)return;let s=l.find(e=>e.projectId===r&&e.originalPrompt===i&&e.duration===a&&e.status===`prompt_optimized`&&new Date(e.createdAt).getTime()>o-1e4);s?(lt.current=!0,localStorage.removeItem(`pending_optimize`),g(s),v(s.optimizedPrompt||``),_e(s.textCreditsCost),ye(s.textTokensUsed),m(!0),Z.success({content:`优化请求已恢复,消耗 ${s.textCreditsCost} 积分`,key:`recovery`})):Date.now()-o>3e4&&localStorage.removeItem(`pending_optimize`)}catch{localStorage.removeItem(`pending_optimize`)}},[l,e]);let dt=r.find(t=>t.id===e),ft=l.filter(t=>t.projectId===e),pt=dt?.name??`项目`,mt=dt&&te[dt.industry]||[],ht=u?.credits??0,gt=e=>{let t=e===`2k`?`2048`:e===`4k`?`4096`:e;for(let e=0;e=_t,yt=async()=>{try{if(!e){Z.error(`项目ID为空,请先选择项目`);return}let t=await n.validateFields();if(!t.prompt||!t.prompt.trim()){Z.error(`请输入视频/图片描述`);return}f(!0);let r=Object.entries(W).map(([e,t])=>`@${e}:${t}`),i=r.length>0?`${t.prompt}\n\n${r.join(`;`)}`:t.prompt,a=hte();localStorage.setItem(`pending_optimize`,JSON.stringify({key:a,projectId:e,prompt:i,duration:oe,ts:Date.now()})),ut.current=a;let o=await s(e,{prompt:i,duration:oe,genType:be,resolution:we,references:M.length>0?M:void 0,idempotencyKey:a,image_size:we,image_proportion:Se,image_px:Ee+`x`+Oe});localStorage.removeItem(`pending_optimize`),ut.current=null,g(o.record),v(o.record.optimizedPrompt||``),_e(o.textCreditsCost),ye(o.textTokensUsed),m(!0),Z.success({content:`「${pt}」提示词优化完成,消耗 ${o.textCreditsCost} 积分`,key:`optimize`})}catch(e){console.error(`优化提示词失败:`,e);let t=e?.response?.data?.message||e?.message||`操作失败,请稍后重试`;Z.error(t)}finally{f(!1),localStorage.removeItem(`pending_optimize`),ut.current=null}},bt=(0,S.useRef)(new Set),xt=(0,S.useRef)(null),St=(0,S.useRef)(null),Ct=e=>{bt.current.add(e),Et()},wt=e=>{bt.current.delete(e),bt.current.size===0&&Tt()},Tt=()=>{xt.current&&=(clearInterval(xt.current),null),St.current&&=(St.current.abort(),null)},Et=()=>{xt.current||=setInterval(async()=>{try{St.current&&St.current.abort();let t=new AbortController;St.current=t;let n=await z5({projectId:e,page:1,pageSize:100,signal:t.signal});St.current=null;let r=Array.from(bt.current),i=[];if(r.length>0){let e=i9.getState().records,t=e.items.map(e=>{if(r.includes(e.id)){let t=n.items.find(t=>t.id===e.id);if(t)return t.status!==`generating`&&i.push(e.id),t}return e});i9.setState({records:{...e,items:t}}),i.forEach(e=>{let t=n.items.find(t=>t.id===e);wt(e),t?.status===`completed`?(T(t=>({...t,[e]:`done`})),g(n=>n?.id===e?t:n),Z.success({content:`「${pt}」视频生成完成!`,key:e,duration:5})):t?.status===`failed`&&(T(t=>({...t,[e]:`failed`})),g(n=>n?.id===e?t:n),Z.error({content:`「${pt}」视频生成失败: ${t.errorMessage||`未知错误`}`,key:e,duration:5}))})}}catch(e){e.name!==`AbortError`&&console.error(`Global polling error:`,e)}},5e3)},Dt=e=>{Ct(e)};(0,S.useEffect)(()=>()=>{Tt(),ot()},[]);let Ot=async e=>{if(!vt){Z.error(`积分不足,请先充值`);return}C(t=>({...t,[e]:!0})),T(t=>({...t,[e]:`generating`})),Z.loading({content:`「${pt}」正在提交视频生成...`,duration:0,key:e});try{(await c(e,{aspectRatio:ce,resolution:ue})).status===`failed`?(T(t=>({...t,[e]:`failed`})),Z.error({content:`「${pt}」提交失败`,key:e,duration:3})):(Z.success({content:`「${pt}」已提交,正在生成中...`,key:e,duration:3}),Dt(e))}catch(t){T(t=>({...t,[e]:`failed`}));let n=`提交失败`;t?.response?.data?.detail?n=t.response.data.detail:t?.data?.detail?n=t.data.detail:t?.detail?n=t.detail:t?.message&&(n=t.message),Z.error({content:`${n}`,key:e,duration:3})}finally{C(t=>({...t,[e]:!1}))}},kt=async e=>{let t=ft.find(t=>t.id===e);if(t){C(t=>({...t,[e]:!0})),T(t=>({...t,[e]:`generating`})),Z.loading({content:`「${pt}」正在重新提交...`,duration:0,key:e});try{let n=E[e];n&&n!==t.optimizedPrompt&&await W5(e,n);let r=await c(e,{aspectRatio:t.aspectRatio||`16:9`,resolution:t.resolution||`720p`});console.log(`重新提交视频生成结果:`,r),r.status===`failed`?(T(t=>({...t,[e]:`failed`})),console.log(`12312`),Z.error({content:`「${pt}」提交失败`,key:e,duration:3})):(Z.success({content:`「${pt}」已提交,正在生成中...`,key:e,duration:3}),Dt(e))}catch(t){T(t=>({...t,[e]:`failed`})),console.log(`1231`,t);let n=`提交失败`;t?.response?.data?.detail?n=t.response.data.detail:t?.data?.detail?n=t.data.detail:t?.detail?n=t.detail:t?.message&&(n=t.message),Z.error({content:`${n}`,key:e,duration:3})}finally{C(t=>({...t,[e]:!1}))}}},At=e=>{let t=w[e.id];return t===`generating`?`generating`:t===`done`?`completed`:t===`failed`?`failed`:e.status},jt={optimizing:{color:`processing`,text:`优化中`,icon:(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,$.jsx)(OH,{})},generating:{color:`warning`,text:`生成中`,icon:(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}})},completed:{color:`success`,text:`已完成`,icon:(0,$.jsx)(i4,{})},failed:{color:`error`,text:`失败`,icon:(0,$.jsx)(s4,{})}},Mt=({label:e,value:t,options:n,suffix:r,expanded:i,onToggle:a,onSelect:o,onClose:s})=>{let c=(0,S.useRef)(null),l=(0,S.useRef)(null),u=(0,S.useRef)(i),[d,f]=(0,S.useState)(null);return u.current=i,(0,S.useEffect)(()=>{if(i&&c.current){let e=c.current.getBoundingClientRect();f({bottom:window.innerHeight-e.top+4,left:e.left,width:Math.max(e.width,100)})}else f(null)},[i]),(0,S.useEffect)(()=>{if(!i)return;let e=e=>{c.current?.contains(e.target)||l.current?.contains(e.target)||u.current&&s()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[i,s]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{ref:c,onClick:a,translate:`no`,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,cursor:`pointer`,userSelect:`none`,transition:`background 0.2s, border-color 0.2s`,background:i?`rgba(99,102,241,0.08)`:`#f8f9fc`,border:i?`1px solid #6366f1`:`1px solid #e2e8f0`,minWidth:70,whiteSpace:`nowrap`,flexShrink:0},children:[(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#6366f1`,fontWeight:500,lineHeight:`18px`},children:[t,r]}),(0,$.jsx)(wQ,{style:{fontSize:9,color:`#94a3b8`,transition:`transform 0.2s`,transform:i?`rotate(180deg)`:`rotate(0deg)`}})]}),d&&(0,zi.createPortal)((0,$.jsxs)(`div`,{ref:l,style:{position:`fixed`,bottom:d.bottom,left:d.left,minWidth:d.width,background:`#fff`,borderRadius:12,padding:6,zIndex:99999,boxShadow:`0 8px 30px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:10,color:`#94a3b8`,display:`block`,padding:`2px 6px 4px`},children:e}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:n.map((e,n)=>{let r=t===e;return(0,$.jsx)(`div`,{onClick:()=>{o(e),s()},style:{padding:`6px 10px`,borderRadius:8,fontSize:13,cursor:`pointer`,transition:`all 0.15s`,background:r?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`transparent`,color:r?`#fff`:`#1a1a2e`,fontWeight:r?600:400},onMouseEnter:e=>{r||(e.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:e},n)})})]}),document.body)]})},Nt=({group:e,selected:t,expanded:n,onToggle:r,onSelect:i,onClose:a})=>{let o=(0,S.useRef)(null),s=(0,S.useRef)(null),c=(0,S.useRef)(n),[l,u]=(0,S.useState)(null);return c.current=n,(0,S.useEffect)(()=>{if(n&&o.current){let e=o.current.getBoundingClientRect();u({bottom:window.innerHeight-e.top+4,left:e.left})}else u(null)},[n]),(0,S.useEffect)(()=>{if(!n)return;let e=e=>{o.current?.contains(e.target)||s.current?.contains(e.target)||c.current&&a()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[n,a]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{ref:o,onClick:r,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,cursor:`pointer`,userSelect:`none`,transition:`all 0.2s`,background:t?`rgba(99,102,241,0.08)`:`#f8f9fc`,border:n?`1px solid #6366f1`:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:t?`#6366f1`:`#64748b`,fontWeight:t?600:400},children:t||e.name}),(0,$.jsx)(wQ,{style:{fontSize:9,color:t?`#6366f1`:`#94a3b8`,transition:`transform 0.2s`,transform:n?`rotate(180deg)`:`rotate(0deg)`}})]}),l&&(0,zi.createPortal)((0,$.jsxs)(`div`,{ref:s,style:{position:`fixed`,bottom:l.bottom,left:l.left,background:`#fff`,borderRadius:12,padding:8,minWidth:160,zIndex:99999,boxShadow:`0 8px 30px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:10,color:`#94a3b8`,display:`block`,padding:`2px 6px 4px`},children:e.name}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:e.options.map((e,n)=>{let r=t===e;return(0,$.jsx)(`div`,{onClick:()=>{i(e),a()},style:{padding:`6px 10px`,borderRadius:8,fontSize:13,cursor:`pointer`,transition:`all 0.15s`,background:r?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`transparent`,color:r?`#fff`:`#1a1a2e`,fontWeight:r?600:400},onMouseEnter:e=>{r||(e.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:e},n)})})]}),document.body)]})};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`gen-header animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`20px 28px`,borderRadius:16,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 100%)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-30,bottom:-30,width:160,height:160,borderRadius:`50%`,background:`rgba(255,255,255,0.05)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,position:`relative`},children:[(0,$.jsx)(vD,{icon:(0,$.jsx)(g2,{}),onClick:()=>t(`/projects`),style:{background:`rgba(255,255,255,0.1)`,border:`1px solid rgba(255,255,255,0.2)`,color:`#fff`,borderRadius:10}}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0,color:`#fff`,fontWeight:700},children:pt}),dt&&(0,$.jsx)(T$,{style:{background:`rgba(255,255,255,0.12)`,border:`1px solid rgba(255,255,255,0.2)`,color:`rgba(255,255,255,0.8)`,borderRadius:6},children:U[dt.industry]||dt.industry})]}),(0,$.jsx)(Q.Text,{style:{color:`rgba(255,255,255,0.5)`,fontSize:13},children:`描述视频 → AI优化 → 生成视频`})]})]}),(0,$.jsxs)(T$,{style:{background:`rgba(255,255,255,0.1)`,border:`1px solid rgba(255,255,255,0.2)`,color:`#fff`,borderRadius:20,fontSize:13,padding:`4px 14px`},children:[`剩余 `,ht,` 积分`]})]}),!p&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{className:`animate-fadeInUp`,style:{marginBottom:24,padding:`16px 20px`,borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,boxShadow:`0 2px 12px rgba(0,0,0,0.03)`},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{marginRight:70,position:`relative`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,fontWeight:500,color:`#475569`,marginRight:16},children:`生成类型:`}),(0,$.jsxs)(LL.Group,{defaultValue:`image`,buttonStyle:`solid`,onChange:$e,children:[(0,$.jsxs)(LL.Button,{value:`image`,style:{zIndex:0},children:[(0,$.jsx)(p6,{style:{marginRight:6,fontSize:14}}),` `,`图片`]}),(0,$.jsxs)(LL.Button,{value:`video`,children:[(0,$.jsx)(Y8,{style:{marginRight:6,fontSize:14}}),` `,`视频`]})]})]}),be===`video`&&[{icon:(0,$.jsx)(j$,{}),label:`描述视频+时长`,color:`#6366f1`},{icon:(0,$.jsx)(j8,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(L6,{}),label:`选择参数生成`,color:`#10b981`}].map((e,t)=>(0,$.jsxs)(S.Fragment,{children:[t>0&&(0,$.jsx)(`div`,{style:{width:40,height:1,background:`linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0)`,margin:`0 12px`,flexShrink:0}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:10,background:`${e.color}12`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:e.color,fontSize:15},children:e.icon})}),(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:500,color:`#1a1a2e`},children:e.label})]})]},t)),be===`image`&&[{icon:(0,$.jsx)(j$,{}),label:`描述图片+尺寸`,color:`#6366f1`},{icon:(0,$.jsx)(j8,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(L6,{}),label:`图片生成`,color:`#10b981`}].map((e,t)=>(0,$.jsxs)(S.Fragment,{children:[t>0&&(0,$.jsx)(`div`,{style:{width:40,height:1,background:`linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0)`,margin:`0 12px`,flexShrink:0}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:10,background:`${e.color}12`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:e.color,fontSize:15},children:e.icon})}),(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:500,color:`#1a1a2e`},children:e.label})]})]},t))]})}),(0,$.jsxs)(xW,{form:n,initialValues:{},children:[(0,$.jsx)(xW.Item,{name:`prompt`,noStyle:!0,rules:[{required:!0,message:`请输入视频描述`}],style:{display:`none`}}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:20,background:`#fff`,border:`1px solid #f0f0f5`,boxShadow:`0 4px 24px rgba(0,0,0,0.04)`,overflow:`visible`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`12px 16px 0`,minHeight:60},children:[M.map((e,t)=>(0,$.jsxs)(`div`,{className:`ref-thumb`,style:{position:`relative`,width:48,height:48,borderRadius:12,overflow:`visible`,flexShrink:0},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,overflow:`hidden`,border:`1px solid #e2e8f0`,cursor:`pointer`},onClick:()=>{e.type===`video`&&ae(`http://ceshi.apiforeign.minzhong.cn${e.url}`)},children:e.type===`image`?(0,$.jsx)(xG,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(c9,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`})}),(0,$.jsx)(`div`,{className:`ref-delete`,onClick:n=>{n.stopPropagation(),U5(e.url).catch(()=>{}),N(e=>e.filter((e,n)=>n!==t))},style:{position:`absolute`,top:-4,right:-4,width:16,height:16,borderRadius:`50%`,background:`rgba(0,0,0,0.55)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,opacity:0,transition:`opacity 0.15s`,backdropFilter:`blur(4px)`},children:(0,$.jsx)(s4,{style:{color:`#fff`,fontSize:10}})})]},t)),(0,$.jsx)(y0,{accept:`image/*,video/*`,showUploadList:!1,multiple:!0,beforeUpload:e=>{let t=e.type.startsWith(`image/`),n=e.type.startsWith(`video/`);if(!t&&!n)return Z.error(`仅支持图片或视频文件`),!1;let r=n?100:10;if(e.size/1024/1024>r)return Z.error(`${n?`视频`:`图片`}大小不能超过${r}MB`),!1;let i=M.filter(e=>e.type===`image`).length,a=M.filter(e=>e.type===`video`).length;return t&&i>=10?(Z.error(`最多上传10张图片`),!1):n&&a>=3?(Z.error(`最多上传3个视频`),!1):(F(!0),(t?V5:H5)(e).then(e=>{let n=t?`图片`:`视频`,r=t?i+1:a+1;N(i=>[...i,{url:e.url,type:t?`image`:`video`,name:`${n}${r}`}]),Z.success(`${n}上传成功`)}).catch(()=>Z.error(`上传失败`)).finally(()=>F(!1)),!1)},children:(0,$.jsx)($w,{title:`参考内容(${M.length}/10)`,children:(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,border:`1.5px dashed #d9d9d9`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s`,flexShrink:0},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99,102,241,0.04)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#d9d9d9`,e.currentTarget.style.background=`transparent`},children:P?(0,$.jsx)(Xm,{style:{fontSize:18,color:`#6366f1`}}):(0,$.jsx)(gR,{style:{fontSize:18,color:`#94a3b8`}})})})})]}),(0,$.jsx)(`div`,{style:{padding:`8px 16px 4px`},children:(0,$.jsx)(nK.TextArea,{ref:H,value:I,onChange:e=>{let t=e.target.value;L(t),n.setFieldsValue({prompt:t});let r=t.lastIndexOf(`@`);if(r>=0){let e=t.slice(r+1);if(!e.includes(` `)&&!e.includes(` `)){z(!0),V(e);return}}z(!1)},rows:3,placeholder:`上传参考素材、输入文字,自由组合图、文多元素。输入 @ 可引用参考内容...`,maxLength:500,bordered:!1,autoSize:{minRows:2,maxRows:6},style:{padding:`6px 2px`,fontSize:15,lineHeight:1.7,resize:`none`,caretColor:`#6366f1`}})}),R&&M.length>0&&(0,$.jsx)(`div`,{style:{margin:`0 16px 8px`,background:`#fff`,borderRadius:10,boxShadow:`0 6px 24px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`,padding:6,maxHeight:180,overflowY:`auto`},children:M.filter(e=>!B||e.name.includes(B)).map((e,t)=>(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,padding:`8px 10px`,borderRadius:8,cursor:`pointer`,transition:`background 0.15s`},onMouseEnter:e=>e.currentTarget.style.background=`#f1f5f9`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,onMouseDown:t=>{t.preventDefault();let r=H.current?.resizableTextArea?.textArea||H.current?.nativeElement?.querySelector(`textarea`)||H.current;if(!r||!r.value)return;let i=r.value,a=i.lastIndexOf(`@`),o=i.slice(0,a)+`@${e.name} `;L(o),n.setFieldValue(`prompt`,o),z(!1),setTimeout(()=>{r.focus(),r.selectionStart=o.length,r.selectionEnd=o.length},50)},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,overflow:`hidden`,background:e.type===`image`?`#f1f5f9`:`#1a1a2e`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:e.type===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(S6,{style:{color:`#fff`,fontSize:14}})}),(0,$.jsx)(Q.Text,{style:{fontSize:13},children:e.name}),(0,$.jsx)(T$,{style:{marginLeft:`auto`,fontSize:11},children:e.type===`image`?`图片`:`视频`})]},t))}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`8px 12px 12px`,gap:8,flexWrap:`wrap`,position:`relative`,zIndex:50,minHeight:48},children:[be!==`image`&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,flex:1,flexWrap:`wrap`},children:[(0,$.jsx)(Mt,{label:`时长`,value:`${oe}`,options:me.durations.map(e=>`${e}`),suffix:`秒`,expanded:fe===`duration`,onToggle:()=>pe(fe===`duration`?null:`duration`),onSelect:e=>se(parseInt(e)),onClose:()=>pe(null)}),mt.map((e,t)=>{let n=G===e.name,r=W[e.name];return(0,$.jsx)(Nt,{group:e,selected:r,expanded:n,onToggle:()=>K(n?null:e.name),onSelect:t=>{re(n=>{let r={...n};return r[e.name]===t?delete r[e.name]:r[e.name]=t,r})},onClose:()=>K(null)},`og-${t}`)})]}),be==`image`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>je(!Ae),className:`image-settings-trigger`,style:{minWidth:220,padding:`0px 16px`,height:30,borderRadius:10,border:`1px solid #e2e8f0`,backgroundColor:`#f8f9fc`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:12,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:(0,$.jsxs)(`div`,{style:{textAlign:`left`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:600,color:`#374151`,marginRight:10},children:Se===`auto`?`智能`:Se}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#9ca3af`},children:[we==`2K`?`高清 2K`:`超清 4K`,`| `,Ee,`×`,Oe]})]})}),(0,$.jsx)(wQ,{style:{fontSize:14,color:`#9ca3af`}})]}),Ae&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:520,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:20,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:10,fontSize:13,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:6},children:Be.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{Ce(e.value),Re(e.label)},style:{flex:`0 0 calc(11.11% - 5px)`,minWidth:48,height:56,borderRadius:8,border:Se===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:Se===e.value?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:e.value===`auto`?16:20,height:e.value===`auto`?16:20,border:`2px solid ${Se===e.value?`#6366f1`:`#9ca3af`}`,borderRadius:(e.value,3),marginBottom:3,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e.value===`auto`&&(0,$.jsx)(`span`,{style:{fontSize:8,color:Se===e.value?`#6366f1`:`#9ca3af`},children:`智`})}),(0,$.jsx)(`span`,{style:{fontSize:10,color:Se===e.value?`#6366f1`:`#6b7280`,fontWeight:Se===e.value?600:400},children:e.value})]},e.value))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:10,fontSize:13,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:8},children:He.map(e=>(0,$.jsx)(`button`,{onClick:()=>{Te(e.value),ze(e.label)},style:{flex:1,height:48,borderRadius:8,border:we===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:we===e.value?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsxs)(`span`,{style:{fontSize:13,fontWeight:600,color:we===e.value?`#fff`:`#4b5563`},children:[e.value,e.value===`4k`&&(0,$.jsx)(`span`,{style:{marginLeft:3},children:`✨`})]})},e.value))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:10,fontSize:13,fontWeight:500,color:`#666666`},children:`尺寸`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:140},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12,marginRight:6},children:`W`}),(0,$.jsx)(nK,{value:Ee,onChange:e=>De(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:6,height:40,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:14,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`button`,{onClick:Ze,style:{width:28,height:28,borderRadius:6,border:`1px solid #e5e7eb`,backgroundColor:`#fff`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:`#6366f1`},children:(0,$.jsx)(oG,{style:{fontSize:12}})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:140},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12,marginRight:6},children:`H`}),(0,$.jsx)(nK,{value:Oe,onChange:e=>ke(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:6,height:40,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:14,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12},children:`PX`})]})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,flexShrink:0},children:[be===`image`&&(0,$.jsx)(`span`,{style:{color:`#7c7c7c`,fontSize:14},children:`(请在左侧选择图片比例和尺寸)`}),(0,$.jsx)(vD,{type:`primary`,size:`large`,onClick:yt,loading:d,style:{borderRadius:10,fontWeight:600,minWidth:140,height:40,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 16px rgba(99,102,241,0.35)`},children:`AI优化提示词`})]})]})]})]})]}),p&&h&&(0,$.jsxs)(Oz,{className:`animate-fadeInUp`,style:{borderRadius:16},styles:{body:{padding:`24px 28px`}},children:[!w[h.id]||w[h.id]===`idle`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:24,padding:`14px 18px`,borderRadius:12,background:`linear-gradient(135deg, rgba(16,185,129,0.06), rgba(5,150,105,0.06))`,border:`1px solid rgba(16,185,129,0.15)`},children:[(0,$.jsx)(i4,{style:{color:`#10b981`,fontSize:22}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,display:`block`},children:`提示词优化完成`}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`文本优化消耗 `,ge,` 积分· 您可以编辑提示词后选择参数生成视频`]})]})]}):(0,$.jsxs)(`div`,{style:{marginBottom:24,padding:`16px 18px`,borderRadius:12,display:`flex`,alignItems:`center`,gap:12,background:w[h.id]===`failed`?`rgba(239,68,68,0.04)`:w[h.id]===`done`?`rgba(16,185,129,0.04)`:`rgba(99,102,241,0.04)`,border:`1px solid ${w[h.id]===`failed`?`rgba(239,68,68,0.12)`:w[h.id]===`done`?`rgba(16,185,129,0.12)`:`rgba(99,102,241,0.12)`}`},children:[w[h.id]===`generating`&&(0,$.jsx)(Xm,{style:{color:`#6366f1`,fontSize:18},spin:!0}),w[h.id]===`done`&&(0,$.jsx)(i4,{style:{color:`#10b981`,fontSize:18}}),w[h.id]===`failed`&&(0,$.jsx)(s4,{style:{color:`#ef4444`,fontSize:18}}),(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:w[h.id]===`failed`?`#ef4444`:w[h.id]===`done`?`#10b981`:`#6366f1`},children:[w[h.id]===`generating`&&`${be===`image`?`图片`:`视频`}生成中,请稍候...`,w[h.id]===`done`&&`${be===`image`?`图片`:`视频`}生成成功`,w[h.id]===`failed`&&`${be===`image`?`图片`:`视频`}生成失败,请重试`]})]}),!w[h.id]||w[h.id]===`idle`||w[h.id]===`failed`?(0,$.jsxs)(`div`,{className:`gen-prompt-row`,style:{display:`flex`,gap:20,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 45%`,minWidth:240},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`,minHeight:100},children:(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#64748b`,lineHeight:1.7},children:h.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 45%`,minWidth:240},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,!y&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!y&&(0,$.jsxs)(DU,{size:4,children:[(0,$.jsx)($w,{title:`复制`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(e1,{}),onClick:()=>{navigator.clipboard.writeText(_),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(0,$.jsx)($w,{title:`编辑`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(j$,{}),onClick:()=>b(!0),style:{color:`#6366f1`}})})]})]}),y?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(nK.TextArea,{value:_,onChange:e=>v(e.target.value),rows:5,style:{borderRadius:12,fontSize:14,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(vD,{size:`small`,onClick:()=>{v(h.optimizedPrompt||``),b(!1)},children:`取消`}),(0,$.jsx)(vD,{size:`small`,type:`primary`,onClick:()=>{b(!1),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`,minHeight:100},children:(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#1a1a2e`,lineHeight:1.7},children:_})})]})]}):(0,$.jsxs)(`div`,{className:`gen-prompt-row`,style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 55%`,minWidth:280},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`,minHeight:80},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.6},children:h.originalPrompt})})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,!y&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!y&&(0,$.jsxs)(DU,{size:4,children:[(0,$.jsx)($w,{title:`复制`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(e1,{}),onClick:()=>{navigator.clipboard.writeText(_),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(0,$.jsx)($w,{title:`编辑`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(j$,{}),onClick:()=>b(!0),style:{color:`#6366f1`}})})]})]}),y?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(nK.TextArea,{value:_,onChange:e=>v(e.target.value),rows:5,style:{borderRadius:12,fontSize:13,lineHeight:1.6,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(vD,{size:`small`,onClick:()=>{v(h.optimizedPrompt||``),b(!1)},children:`取消`}),(0,$.jsx)(vD,{size:`small`,type:`primary`,onClick:()=>{b(!1),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`,minHeight:120},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.6},children:_})})]})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 40%`,minWidth:280},children:[h.videoUrl&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`生成视频`}),(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`,border:`1px solid #f0f0f5`,background:`#000`},children:(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${h.videoUrl}`,controls:!0,style:{width:`100%`,maxHeight:350,display:`block`}})})]}),h.imageUrl&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`生成图片`}),(0,$.jsx)(xG,{src:`http://ceshi.apiforeign.minzhong.cn${h.imageUrl}`,style:{width:`100%`,maxHeight:350,objectFit:`contain`,borderRadius:12,border:`1px solid #f0f0f5`},preview:!0})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginTop:20,padding:`14px 18px`,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:[be!==`image`&&(0,$.jsxs)(`div`,{style:{marginTop:24,borderRadius:12,background:`#f8f9fc`,width:`25%`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,fontWeight:600,display:`block`,marginBottom:12},children:`选择视频参数`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`时长`}),(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:13,color:`#6366f1`},children:[oe,`s`]})]}),(0,$.jsx)(Mt,{label:`比例`,value:ce,options:me.ratios,expanded:fe===`ratio`,onToggle:()=>pe(fe===`ratio`?null:`ratio`),onSelect:e=>le(e),onClose:()=>pe(null)}),(0,$.jsx)(Mt,{label:`分辨率`,value:ue,options:me.resolutions,expanded:fe===`resolution`,onToggle:()=>pe(fe===`resolution`?null:`resolution`),onSelect:e=>de(e),onClose:()=>pe(null)})]})]}),be==`image`&&h&&(0,$.jsx)(`div`,{style:{marginTop:24,borderRadius:12,background:`#f8f9fc`,width:`25%`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-around`},children:[(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`分辨率`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:h.imageSize||`-`})]}),(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`画面比例`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:h.imageProportion||`-`})]}),(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`画面尺寸`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:h.imagePx||`-`})]})]})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`文字积分`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#6366f1`},children:ge})]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:18},children:`+`}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:[`预估`,be===`image`?`图片`:`视频`,`积分`]}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#10b981`},children:be===`image`&&h.imageSize?gt(h.imageSize)||_t:Ie(oe,ue)})]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:18},children:`=`}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`总计`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16,color:`#1a1a2e`},children:(ge+(be===`image`?gt(h.imageSize):Ie(oe,ue))).toFixed(2)})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsxs)(vD,{size:`large`,onClick:()=>{m(!1),g(null),v(``),L(``),N([]),re({}),K(null),pe(null),n.resetFields()},style:{borderRadius:12,minWidth:120,height:44,fontWeight:500},children:[`配置新`,be===`image`?`图片`:`视频`]}),(0,$.jsx)($w,{title:vt?``:`积分不足`,children:(0,$.jsx)(vD,{type:`primary`,size:`large`,icon:(0,$.jsx)(L6,{}),onClick:()=>Ot(h.id),loading:w[h.id]===`generating`,disabled:!vt||w[h.id]===`generating`||w[h.id]===`done`,style:{borderRadius:12,minWidth:180,height:44,fontWeight:600,background:w[h.id]===`done`?`#10b981`:vt?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`:`#d1d5db`,border:`none`,boxShadow:vt?`0 8px 24px rgba(99,102,241,0.3)`:`none`},children:w[h.id]===`done`?`生成完成`:w[h.id]===`generating`?`生成中...`:`生成${be===`image`?`图片`:`视频`} (${be===`image`?gt(h.imageSize):Ie(oe,ue)}积分)`})})]})]}),h.references&&h.references.length>0&&(0,$.jsxs)(`div`,{style:{marginTop:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`参考内容`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:h.references.map((e,t)=>(0,$.jsxs)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,position:`relative`,cursor:`pointer`},onClick:()=>{e.type===`video`&&ae(`http://ceshi.apiforeign.minzhong.cn${e.url}`)},children:[e.type===`image`?(0,$.jsx)(xG,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},preview:!0}):(0,$.jsx)(c9,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,width:64,height:64}),(0,$.jsx)(T$,{style:{position:`absolute`,bottom:0,left:0,right:0,margin:0,fontSize:9,textAlign:`center`,borderRadius:`0 0 8px 8px`,background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,padding:`0 2px`},children:e.name})]},t))})]})]}),ft.length>0&&(0,$.jsxs)(`div`,{style:{marginTop:24},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,display:`block`,marginBottom:12},children:`本项目生成记录`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},className:`stagger-children`,children:ft.map((e,t)=>{let n=At(e),r=E[e.id]??(e.optimizedPrompt||e.originalPrompt),i=A===e.id,a=e.genType||`image`;return(0,$.jsxs)(`div`,{className:`animate-slideInCard`,style:{animationDelay:`${t*.05}s`},children:[(0,$.jsxs)(`div`,{className:`record-item`,onClick:()=>j(i?null:e.id),style:{padding:`12px 16px`,borderRadius:i?`12px 12px 0 0`:12,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,transition:`all 0.2s`,display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,background:a===`image`?`#fef3c7`:`#dbeafe`},children:a===`image`?(0,$.jsx)(p6,{style:{color:`#d97706`,fontSize:12}}):(0,$.jsx)(Y8,{style:{color:`#2563eb`,fontSize:12}})}),i?(0,$.jsx)(wQ,{style:{color:`#6366f1`,fontSize:11,flexShrink:0}}):(0,$.jsx)(t4,{style:{color:`#cbd5e1`,fontSize:11,flexShrink:0}}),(0,$.jsx)(T$,{color:jt[n]?.color,icon:jt[n]?.icon,style:{margin:0},children:jt[n]?.text}),(0,$.jsx)(Q.Text,{style:{flex:1,fontSize:13,color:`#475569`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:r}),n===`prompt_optimized`&&(0,$.jsx)(T$,{color:`processing`,style:{padding:`3px 10px`,fontSize:12,margin:0,flexShrink:0},children:`待配置`}),a===`image`?(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.imageSize}`:`-`,` ·`,` `,e.imageProportion||`-`,` ·`,` `,e.imagePx||`-`,` ·`,` `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:a9(e.createdAt)})]}):(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.duration}秒`:`-`,` ·`,` `,e.aspectRatio||`-`,` · `,e.resolution||`-`,` `,`·`,` `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:a9(e.createdAt)})]}),(0,$.jsx)(`div`,{className:`record-actions`,onClick:e=>e.stopPropagation(),children:(0,$.jsx)(DU,{children:n===`failed`&&(0,$.jsx)(vD,{type:`primary`,danger:!0,size:`small`,icon:(0,$.jsx)(S6,{}),loading:x[e.id],onClick:()=>kt(e.id),style:{borderRadius:8},children:`重试`})})})]}),i&&(0,$.jsx)(`div`,{style:{background:`#fff`,border:`1px solid #f0f0f5`,borderTop:`none`,borderRadius:`0 0 12px 12px`,padding:`18px 20px`,animation:`fadeInUp 0.25s ease both`},children:(0,$.jsxs)(`div`,{className:`gen-detail-row`,style:{display:`flex`,gap:20,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 50%`,minWidth:260},children:[(0,$.jsxs)(`div`,{style:{marginBottom:14},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.7},children:e.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:14},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,(n===`prompt_optimized`||n===`failed`)&&O!==e.id&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),O!==e.id&&(0,$.jsxs)(DU,{size:4,children:[(0,$.jsx)($w,{title:`复制`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(e1,{}),onClick:()=>{navigator.clipboard.writeText(r),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),(n===`prompt_optimized`||n===`failed`)&&(0,$.jsx)($w,{title:`编辑`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(j$,{}),onClick:()=>{k(e.id),D(t=>({...t,[e.id]:t[e.id]??e.optimizedPrompt??``}))},style:{color:`#6366f1`}})})]})]}),O===e.id?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(nK.TextArea,{value:r,onChange:t=>D(n=>({...n,[e.id]:t.target.value})),rows:4,style:{borderRadius:10,fontSize:13,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(vD,{size:`small`,onClick:()=>k(null),children:`取消`}),(0,$.jsx)(vD,{size:`small`,type:`primary`,onClick:()=>{D(t=>({...t,[e.id]:r})),k(null),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:n===`prompt_optimized`?`rgba(99,102,241,0.02)`:`#f8f9fc`,border:n===`prompt_optimized`?`1px solid rgba(99,102,241,0.1)`:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:r})})]}),a===`image`?(0,$.jsx)(`div`,{style:{display:`flex`,gap:14,padding:`10px 14px`,borderRadius:10,background:`#f8f9fc`},children:[{label:`文字积分`,value:`${e.textCreditsCost||0}`},{label:`图片积分`,value:`${e.creditsCost||0}`},{label:`分辨率`,value:e.imageSize?`${e.imageSize}`:`-`},{label:`比例`,value:e.imageProportion||`-`},{label:`尺寸`,value:e.imagePx||`-`}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:13,color:`#1a1a2e`},children:e.value})]},t))}):(0,$.jsx)(`div`,{style:{display:`flex`,gap:14,padding:`10px 14px`,borderRadius:10,background:`#f8f9fc`},children:[{label:`文字积分`,value:`${e.textCreditsCost||0}`},{label:`视频积分`,value:`${e.creditsCost||0}`},{label:`时长`,value:e.duration?`${e.duration}秒`:`-`},{label:`比例`,value:e.aspectRatio||`-`},{label:`分辨率`,value:e.resolution||`-`}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:13,color:`#1a1a2e`},children:e.value})]},t))}),(e.references&&e.references.length>0||n===`failed`)&&(0,$.jsxs)(`div`,{style:{marginTop:14},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:[`参考素材`,` `,n===`failed`&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可删除/添加后重试)`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:[e.references?.map((t,r)=>(0,$.jsxs)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`visible`,border:`1px solid #e2e8f0`,position:`relative`,cursor:`pointer`},onClick:()=>{t.type===`video`&&ae(`http://ceshi.apiforeign.minzhong.cn${t.url}`)},children:[(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`hidden`},children:t.type===`image`?(0,$.jsx)(xG,{src:`http://ceshi.apiforeign.minzhong.cn${t.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},preview:!0}):(0,$.jsx)(c9,{src:`http://ceshi.apiforeign.minzhong.cn${t.url}`,width:64,height:64})}),(0,$.jsx)(T$,{style:{position:`absolute`,bottom:0,left:0,right:0,margin:0,fontSize:9,textAlign:`center`,borderRadius:`0 0 8px 8px`,background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,padding:`0 2px`},children:t.name}),n===`failed`&&(0,$.jsx)(`div`,{className:`ref-delete`,onClick:n=>{n.stopPropagation(),U5(t.url).catch(()=>{});let i=e.references.filter((e,t)=>t!==r);i9.getState().updateRecordReferences(e.id,i)},style:{position:`absolute`,top:-4,right:-4,width:16,height:16,borderRadius:`50%`,background:`rgba(239,68,68,0.8)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,opacity:0,transition:`opacity 0.15s`},children:(0,$.jsx)(s4,{style:{color:`#fff`,fontSize:10}})})]},r)),n===`failed`&&(0,$.jsx)(y0,{accept:`image/*,video/*`,showUploadList:!1,multiple:!0,beforeUpload:t=>{let n=t.type.startsWith(`image/`),r=t.type.startsWith(`video/`);return!n&&!r?(Z.error(`仅支持图片或视频文件`),!1):((n?V5:H5)(t).then(r=>{let i={url:r.url,type:n?`image`:`video`,name:t.name||(n?`图片`:`视频`)},a=e.references||[];i9.getState().updateRecordReferences(e.id,[...a,i]),Z.success(`上传成功`)}).catch(()=>Z.error(`上传失败`)),!1)},children:(0,$.jsx)($w,{title:`添加参考素材`,children:(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:10,border:`1.5px dashed #d9d9d9`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#d9d9d9`},children:(0,$.jsx)(gR,{style:{fontSize:18,color:`#94a3b8`}})})})})]})]})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 40%`,minWidth:220,position:`relative`},children:[n===`prompt_optimized`&&(0,$.jsxs)(`div`,{style:{marginTop:16,position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,backgroundColor:`transparent`},children:[a===`video`&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,flexWrap:`wrap`,marginBottom:12},children:[(0,$.jsxs)(`div`,{translate:`no`,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,marginLeft:12},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`时长`}),(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:13,color:`#6366f1`},children:[e.duration,`秒`]})]}),(0,$.jsx)(Mt,{label:`比例`,value:q[e.id]?.aspectRatio||`选择比例`,options:me.ratios,expanded:fe===`ratio-${e.id}`,onToggle:()=>pe(fe===`ratio-${e.id}`?null:`ratio-${e.id}`),onSelect:t=>ie(n=>({...n,[e.id]:{...n[e.id],aspectRatio:t,resolution:n[e.id]?.resolution||``}})),onClose:()=>pe(null)}),(0,$.jsx)(Mt,{label:`分辨率`,value:q[e.id]?.resolution||`选择分辨率`,options:me.resolutions,expanded:fe===`res-${e.id}`,onToggle:()=>pe(fe===`res-${e.id}`?null:`res-${e.id}`),onSelect:t=>ie(n=>({...n,[e.id]:{...n[e.id],aspectRatio:n[e.id]?.aspectRatio||``,resolution:t}})),onClose:()=>pe(null)})]}),(0,$.jsxs)(vD,{type:`primary`,size:`large`,icon:(0,$.jsx)(L6,{}),block:!0,loading:x[e.id],disabled:a===`video`&&(!q[e.id]?.aspectRatio||!q[e.id]?.resolution),onClick:async()=>{let t=q[e.id];if(a===`video`){if(!t?.aspectRatio||!t?.resolution){Z.error(`请选择比例和分辨率`);return}if(ht({...t,[e.id]:!0})),T(t=>({...t,[e.id]:`generating`}));let n=a===`video`?`视频`:`图片`;Z.loading({content:`「${pt}」正在生成${n}...`,duration:0,key:e.id});try{await c(e.id,{aspectRatio:t?.aspectRatio,resolution:t?.resolution}),T(t=>({...t,[e.id]:`done`})),Z.success({content:`「${pt}」${n}生成成功!`,key:e.id,duration:3})}catch{T(t=>({...t,[e.id]:`failed`})),Z.error({content:`「${pt}」${n}生成失败`,key:e.id,duration:3})}finally{C(t=>({...t,[e.id]:!1}))}},style:{borderRadius:12,fontWeight:600,color:`#fff`,height:48,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,position:`absolute`,bottom:18,left:0},children:[`生成`,a===`video`?`视频`:`图片`,a===`video`?(0,$.jsx)(`span`,{style:{color:`#d2d2d2`,fontSize:`14px`,marginLeft:`6px`},children:`(请选择上方的比例分辨率)`}):``,` `,a===`video`&&q[e.id]?.resolution?`(${Ie(e.duration||5,q[e.id].resolution)}积分)`:``,a===`image`&&e.imageSize?`(${Le(e.imageSize)}积分)`:a===`image`?`(积分)`:``]})]}),n===`failed`&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:18,right:20},children:(0,$.jsxs)(vD,{type:`primary`,danger:!0,size:`large`,icon:(0,$.jsx)(S6,{}),block:!0,loading:x[e.id],onClick:()=>kt(e.id),style:{borderRadius:12,fontWeight:600,height:48},children:[`重新生成`,a===`video`?`视频`:`图片`]})}),n===`generating`?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`linear-gradient(135deg, rgba(99,102,241,0.04), rgba(139,92,246,0.04))`,border:`1px dashed rgba(99,102,241,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10},children:[(0,$.jsx)(Xm,{style:{color:`#6366f1`,fontSize:28},spin:!0}),(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:[a===`video`?`视频`:`图片`,`生成中...`]})]}):n===`completed`&&e.videoUrl||e.imageUrl?(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,border:`1px solid #f0f0f5`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:10,right:10,zIndex:10},children:(0,$.jsx)($w,{title:`下载${a===`video`?`视频`:`图片`}`,children:(0,$.jsx)(vD,{size:`small`,icon:(0,$.jsx)(p0,{}),onClick:()=>{let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${a===`video`?e.videoUrl:e.imageUrl}&download=1`,t.download=`${e.projectName}${a===`video`?`.mp4`:`.png`}`,t.click()},style:{background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,backdropFilter:`blur(4px)`,borderRadius:8},children:`下载`})})}),(0,$.jsx)(`div`,{style:{minHeight:180,overflow:`hidden`},children:a===`video`?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.videoUrl}`,controls:!0,preload:`metadata`,style:{width:`100%`,height:`400px`,borderRadius:0}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.imageUrl}`,alt:e.projectName,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`,borderRadius:0}})}),(0,$.jsxs)(`div`,{style:{padding:`8px 12px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:`#fafbff`},children:[(0,$.jsxs)(DU,{children:[a===`video`?(0,$.jsx)(Y8,{style:{color:`#6366f1`,fontSize:13}}):(0,$.jsx)(p6,{style:{color:`#6366f1`,fontSize:13}}),(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#475569`},children:e.projectName})]}),e.generatedAt&&(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:11,color:`#94a3b8`},children:a9(e.generatedAt)})]})]}):n===`failed`?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`rgba(239,68,68,0.03)`,border:`1px dashed rgba(239,68,68,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10,padding:16},children:[(0,$.jsx)(s4,{style:{color:`#ef4444`,fontSize:28}}),(0,$.jsxs)(Q.Text,{style:{color:`#ef4444`,fontSize:14,fontWeight:600},children:[a===`video`?`视频`:`图片`,`生成失败`]}),e.errorMessage&&(0,$.jsx)(Q.Text,{style:{color:`#ef4444`,fontSize:12,textAlign:`center`,lineHeight:1.6},children:e.errorMessage})]}):(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`#f8f9fc`,border:`1px dashed #e2e8f0`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10},children:[(0,$.jsx)(OH,{style:{color:`#94a3b8`,fontSize:28}}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:a===`image`?`待生成图片`:n===`prompt_optimized`?`待配置视频参数`:`待生成视频`})]})]})]})})]},e.id)})})]}),(0,$.jsx)(Pq,{open:!!J,onCancel:()=>ae(null),footer:null,width:480,centered:!0,destroyOnClose:!0,closable:!1,title:null,styles:{body:{padding:0,background:`#000`,position:`relative`}},children:J&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:J,controls:!0,autoPlay:!0,style:{width:`100%`,display:`block`,maxHeight:`70vh`}}),(0,$.jsx)(`div`,{onClick:()=>ae(null),style:{position:`absolute`,top:8,right:8,width:28,height:28,borderRadius:`50%`,background:`rgba(0,0,0,0.6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,transition:`background 0.15s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(0,0,0,0.85)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(0,0,0,0.6)`},children:(0,$.jsx)(s4,{style:{color:`#fff`,fontSize:16}})})]})})]})},l9={optimizing:{color:`processing`,text:`优化中`,icon:(0,$.jsx)(Xm,{spin:!0})},prompt_optimized:{color:`processing`,text:`待生成`,icon:(0,$.jsx)(OH,{})},generating:{color:`warning`,text:`生成中`,icon:(0,$.jsx)(Xm,{spin:!0})},completed:{color:`success`,text:`已完成`,icon:(0,$.jsx)(i4,{})},failed:{color:`error`,text:`失败`,icon:(0,$.jsx)(s4,{})}},_te=()=>{let{records:e,projects:t,fetchRecords:n,fetchProjects:r,generateVideo:i}=i9(),a=e.items,[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(10),[u,d]=(0,S.useState)({}),[f,p]=(0,S.useState)(void 0),[m,h]=(0,S.useState)(void 0),[g,_]=(0,S.useState)({}),[v,y]=(0,S.useState)(null),[b,x]=(0,S.useState)(null),[C,w]=(0,S.useState)(null);(0,S.useEffect)(()=>{r()},[r]),(0,S.useEffect)(()=>{n({projectId:f,status:m,page:o,pageSize:c})},[n,f,m,o,c]);let T=async()=>{if(!C)return;let{recordId:e,projectName:t,ratio:n,resolution:r}=C;d(t=>({...t,[e]:!0})),w(null),Z.loading({content:`「${t}」正在生成视频...`,duration:0,key:e});try{await i(e,{aspectRatio:n,resolution:r}),Z.success({content:`「${t}」视频生成成功!`,key:e,duration:3})}catch{Z.error({content:`「${t}」视频生成失败`,key:e,duration:3})}finally{d(t=>({...t,[e]:!1}))}},E=e=>{if((e.genType||`image`)===`image`){d(t=>({...t,[e.id]:!0})),Z.loading({content:`「${e.projectName}」正在生成图片...`,duration:0,key:e.id}),i(e.id,{}).then(()=>{Z.success({content:`「${e.projectName}」图片生成成功!`,key:e.id,duration:3})}).catch(()=>{Z.error({content:`「${e.projectName}」图片生成失败`,key:e.id,duration:3})}).finally(()=>{d(t=>({...t,[e.id]:!1}))});return}w({recordId:e.id,projectName:e.projectName,ratio:e.aspectRatio||`16:9`,resolution:e.resolution||`720p`})},D=a;return(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#94a3b8`},children:`查看所有视频生成记录,点击记录查看完整内容和视频`})}),(0,$.jsxs)(`div`,{className:`record-filter-bar animate-fadeInUp`,style:{display:`flex`,gap:12,marginBottom:20,padding:`14px 20px`,borderRadius:14,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(DU,{children:[(0,$.jsx)(K4,{style:{color:`#94a3b8`}}),(0,$.jsx)(lw,{placeholder:`全部项目`,allowClear:!0,style:{width:200},onChange:e=>{p(e),s(1)},children:t.map(e=>(0,$.jsx)(lw.Option,{value:e.id,children:e.name},e.id))}),(0,$.jsxs)(lw,{placeholder:`全部状态`,allowClear:!0,style:{width:140},onChange:e=>{h(e),s(1)},children:[(0,$.jsx)(lw.Option,{value:`prompt_optimized`,children:`待生成`}),(0,$.jsx)(lw.Option,{value:`generating`,children:`生成中`}),(0,$.jsx)(lw.Option,{value:`completed`,children:`已完成`}),(0,$.jsx)(lw.Option,{value:`failed`,children:`失败`})]})]}),(0,$.jsxs)(Q.Text,{style:{marginLeft:`auto`,lineHeight:`32px`,color:`#94a3b8`,fontSize:13},children:[`共 `,e.total,` 条记录`]})]}),D.length===0?(0,$.jsx)(NC,{image:NC.PRESENTED_IMAGE_SIMPLE,description:`暂无生成记录`,style:{padding:60}}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},className:`stagger-children`,children:D.map((e,t)=>{let n=v===e.id,r=g[e.id]??e.optimizedPrompt,i=u[e.id],a=b===e.id,o=e.genType||`image`;return(0,$.jsxs)(`div`,{className:`animate-slideInCard`,style:{animationDelay:`${t*.04}s`},children:[(0,$.jsxs)(`div`,{className:`record-item`,onClick:()=>x(a?null:e.id),style:{padding:`14px 20px`,borderRadius:a?`14px 14px 0 0`:14,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,transition:`all 0.2s`,display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,background:o===`image`?`#fef3c7`:`#dbeafe`},children:o===`image`?(0,$.jsx)(p6,{style:{color:`#d97706`,fontSize:12}}):(0,$.jsx)(Y8,{style:{color:`#2563eb`,fontSize:12}})}),a?(0,$.jsx)(wQ,{style:{color:`#6366f1`,fontSize:12,flexShrink:0}}):(0,$.jsx)(t4,{style:{color:`#cbd5e1`,fontSize:12,flexShrink:0}}),(0,$.jsx)(T$,{color:l9[e.status].color,icon:l9[e.status].icon,style:{margin:0},children:l9[e.status].text}),(0,$.jsx)(T$,{style:{background:`#f0f0ff`,border:`none`,color:`#6366f1`,margin:0},children:e.projectName}),(0,$.jsx)(Q.Text,{style:{flex:1,fontSize:13,color:`#475569`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:r}),o===`image`?(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.imageSize}`:`-`,` · `,e.imageProportion||`-`,` · `,e.imagePx||`-`,` · `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:a9(e.createdAt)})]}):(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.duration}秒`:`-`,` · `,e.aspectRatio||`-`,` · `,e.resolution||`-`,` · `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:a9(e.createdAt)})]}),(0,$.jsx)(`div`,{className:`record-actions`,onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(DU,{children:[e.status===`prompt_optimized`&&(0,$.jsx)(vD,{type:`primary`,size:`small`,icon:(0,$.jsx)(S6,{}),loading:i,onClick:()=>E(e),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`生成`}),e.status===`generating`&&(0,$.jsx)(T$,{color:`processing`,icon:(0,$.jsx)(Xm,{spin:!0}),style:{padding:`4px 12px`,fontSize:12},children:`生成中...`}),e.status===`failed`&&(0,$.jsx)(vD,{type:`primary`,danger:!0,size:`small`,icon:(0,$.jsx)(S6,{}),loading:i,onClick:()=>E(e),style:{borderRadius:8},children:`重试`})]})})]}),a&&(0,$.jsx)(`div`,{style:{background:`#fff`,border:`1px solid #f0f0f5`,borderTop:`none`,borderRadius:`0 0 14px 14px`,padding:`20px 24px`,animation:`fadeInUp 0.25s ease both`},children:(0,$.jsxs)(`div`,{className:`gen-detail-row`,style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 50%`,minWidth:280},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.7},children:e.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词 `,e.status===`prompt_optimized`&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!n&&(0,$.jsxs)(DU,{size:4,children:[(0,$.jsx)($w,{title:`复制`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(e1,{}),onClick:()=>{navigator.clipboard.writeText(r),Z.success(`已复制`)},style:{color:`#94a3b8`}})}),e.status===`prompt_optimized`&&(0,$.jsx)($w,{title:`编辑`,children:(0,$.jsx)(vD,{type:`text`,size:`small`,icon:(0,$.jsx)(j$,{}),onClick:()=>{y(e.id),_(t=>({...t,[e.id]:t[e.id]??e.optimizedPrompt}))},style:{color:`#6366f1`}})})]})]}),n?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(nK.TextArea,{value:r,onChange:t=>_(n=>({...n,[e.id]:t.target.value})),rows:4,style:{borderRadius:10,fontSize:13,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(vD,{size:`small`,onClick:()=>y(null),children:`取消`}),(0,$.jsx)(vD,{size:`small`,type:`primary`,onClick:()=>{_(t=>({...t,[e.id]:r})),y(null),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:r})})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:16,padding:`12px 16px`,borderRadius:10,background:`#f8f9fc`},children:o===`image`?[{label:`分辨率`,value:e.imageSize?`${e.imageSize} `:`-`},{label:`画面比例`,value:e.imageProportion?`${e.imageProportion} `:`-`},{label:`画面尺寸`,value:e.imageProportion?`${e.imageProportion} `:`-`},{label:`消耗积分`,value:e.creditsCost?`${e.creditsCost} `:`-`,highlight:!!e.creditsCost}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:e.highlight?`#6366f1`:`#1a1a2e`},children:e.value})]},t)):[{label:`时长`,value:e.duration?`${e.duration} 秒`:`-`},{label:`画面比例`,value:e.aspectRatio||(e.status===`prompt_optimized`?`待选择`:`-`)},{label:`分辨率`,value:e.resolution||(e.status===`prompt_optimized`?`待选择`:`-`)},{label:`消耗积分`,value:e.creditsCost?`${e.creditsCost}`:`-`,highlight:!!e.creditsCost}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:e.highlight?`#6366f1`:`#1a1a2e`},children:e.value})]},t))}),e.status===`prompt_optimized`&&(0,$.jsx)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:(0,$.jsx)(vD,{type:`primary`,size:`large`,icon:(0,$.jsx)(L6,{}),loading:i,onClick:()=>E(e),style:{borderRadius:12,fontWeight:600,height:44,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.3)`},children:o===`video`?`选择参数生成视频`:`生成图片`})}),e.status===`failed`&&(0,$.jsx)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:(0,$.jsxs)(vD,{type:`primary`,danger:!0,size:`large`,icon:(0,$.jsx)(S6,{}),loading:i,onClick:()=>E(e),style:{borderRadius:12,fontWeight:600,height:44},children:[`重新生成`,o===`video`?`视频`:`图片`]})})]}),(0,$.jsx)(`div`,{style:{flex:`1 1 40%`,minWidth:240},children:e.status===`generating`?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`linear-gradient(135deg, rgba(99,102,241,0.04), rgba(139,92,246,0.04))`,border:`1px dashed rgba(99,102,241,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(Xm,{style:{color:`#6366f1`,fontSize:32},spin:!0}),(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:[o===`video`?`视频`:`图片`,`生成中...`]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:12},children:`请耐心等待,生成完成后将自动展示`})]}):e.status===`completed`&&(e.videoUrl||e.imageUrl)?(0,$.jsxs)(`div`,{style:{borderRadius:14,overflow:`hidden`,border:`1px solid #f0f0f5`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:10,right:10,zIndex:10},children:(0,$.jsx)($w,{title:`下载${o===`video`?`视频`:`图片`}`,children:(0,$.jsx)(vD,{size:`small`,icon:(0,$.jsx)(p0,{}),onClick:()=>{let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${o===`video`?e.videoUrl:e.imageUrl}&download=1`,t.download=`${e.projectName}${o===`video`?`.mp4`:`.png`}`,t.click()},style:{background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,backdropFilter:`blur(4px)`,borderRadius:8},children:`下载`})})}),(0,$.jsx)(`div`,{style:{minHeight:280,overflow:`hidden`},children:o===`video`?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.videoUrl}`,controls:!0,preload:`metadata`,style:{width:`100%`,height:`400px`,display:`block`}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.imageUrl}`,alt:e.projectName,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`,display:`block`}})}),(0,$.jsxs)(`div`,{style:{padding:`10px 14px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:`#fafbff`},children:[(0,$.jsxs)(DU,{children:[o===`video`?(0,$.jsx)(Y8,{style:{color:`#6366f1`}}):(0,$.jsx)(p6,{style:{color:`#6366f1`}}),(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#475569`},children:e.projectName})]}),e.generatedAt&&(0,$.jsxs)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:12,color:`#94a3b8`},children:[`生成于 `,a9(e.generatedAt)]})]})]}):e.status===`failed`?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`rgba(239,68,68,0.03)`,border:`1px dashed rgba(239,68,68,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(s4,{style:{color:`#ef4444`,fontSize:32}}),(0,$.jsxs)(Q.Text,{style:{color:`#ef4444`,fontSize:14},children:[o===`video`?`视频`:`图片`,`生成失败`]}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:12},children:`请在左侧点击重新生成`})]}):(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`#f8f9fc`,border:`1px dashed #e2e8f0`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(OH,{style:{color:`#94a3b8`,fontSize:32}}),(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:[`待生成`,o===`video`?`视频`:`图片`]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:12},children:`点击左侧生成按钮开始生成`})]})})]})})]},e.id)})}),e.total>0&&(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:18},children:(0,$.jsx)(HK,{current:e.page||o,pageSize:e.pageSize||c,total:e.total,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{s(e),l(t)}})}),(0,$.jsx)(Pq,{title:(0,$.jsxs)(DU,{children:[(0,$.jsx)(L6,{}),`生成视频`]}),open:!!C,onCancel:()=>w(null),onOk:T,okText:`提交生成`,cancelText:`取消`,width:420,children:C&&(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16,marginTop:16},children:(()=>{let e=a.find(e=>e.id===C.recordId);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:`时长`}),(0,$.jsxs)(Q.Text,{strong:!0,children:[e?.duration||5,`秒`]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`画面比例`}),(0,$.jsx)(lw,{value:C.ratio,onChange:e=>w(t=>t?{...t,ratio:e}:null),style:{width:`100%`},options:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`].map(e=>({value:e,label:e}))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:6},children:`分辨率`}),(0,$.jsx)(lw,{value:C.resolution,onChange:e=>w(t=>t?{...t,resolution:e}:null),style:{width:`100%`},options:[`480p`,`720p`,`1080p`].map(e=>({value:e,label:e}))})]})]})})()})})]})},u9=({value:e,duration:t=1200})=>{let[n,r]=(0,S.useState)(0),i=(0,S.useRef)(0);return(0,S.useEffect)(()=>{let a=n,o=e-a;if(o===0)return;let s=performance.now(),c=e=>{let n=e-s,l=Math.min(n/t,1);r(a+o*(1-(1-l)**3)),l<1&&(i.current=requestAnimationFrame(c))};return i.current=requestAnimationFrame(c),()=>cancelAnimationFrame(i.current)},[e]),(0,$.jsx)($.Fragment,{children:n.toLocaleString()})},vte=()=>{let{user:e}=$7(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(1),[s,c]=(0,S.useState)(10),[l,u]=(0,S.useState)(0);(0,S.useEffect)(()=>{(async()=>{i(!0);let e=await K5(a,s);n(e.records),u(e.total),i(!1)})()},[a,s]);let d=(e,t)=>{o(e),c(t)},f=t.filter(e=>e.type===`recharge`).reduce((e,t)=>e+t.amount,0),p=t.filter(e=>e.type===`consume`).reduce((e,t)=>e+Math.abs(t.amount),0);return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(wJ,{gutter:[16,16],style:{marginBottom:24},children:[(0,$.jsx)(fV,{xs:24,sm:8,children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:16,padding:24,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-20,top:-20,width:120,height:120,borderRadius:`50%`,background:`rgba(255,255,255,0.1)`}}),(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsxs)(DU,{style:{marginBottom:10},children:[(0,$.jsx)(Q8,{style:{color:`rgba(255,255,255,0.8)`,fontSize:16}}),(0,$.jsx)(`span`,{style:{color:`rgba(255,255,255,0.8)`,fontSize:14},children:`当前可用积分`})]}),(0,$.jsx)(`div`,{style:{color:`#fff`,fontSize:38,fontWeight:800,lineHeight:1},children:(0,$.jsx)(u9,{value:e?.credits??0})})]})]})}),(0,$.jsx)(fV,{xs:12,sm:8,children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:16,padding:24,background:`#fff`,border:`1px solid #f0f0f5`,animationDelay:`0.06s`},children:[(0,$.jsxs)(DU,{style:{marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:`rgba(16,185,129,0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(y2,{style:{color:`#10b981`,fontSize:14}})}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:14},children:`累计获得`})]}),(0,$.jsx)(`div`,{style:{color:`#10b981`,fontSize:28,fontWeight:800},children:(0,$.jsx)(u9,{value:f})})]})}),(0,$.jsx)(fV,{xs:12,sm:8,children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:16,padding:24,background:`#fff`,border:`1px solid #f0f0f5`,animationDelay:`0.12s`},children:[(0,$.jsxs)(DU,{style:{marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:`rgba(239,68,68,0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(p2,{style:{color:`#ef4444`,fontSize:14}})}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:14},children:`累计消耗`})]}),(0,$.jsx)(`div`,{style:{color:`#ef4444`,fontSize:28,fontWeight:800},children:(0,$.jsx)(u9,{value:p})})]})})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{animationDelay:`0.15s`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(j8,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`积分明细`})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(f$,{columns:[{title:`类型`,dataIndex:`type`,key:`type`,width:100,render:e=>(0,$.jsx)(T$,{color:e===`recharge`?`green`:`orange`,icon:e===`recharge`?(0,$.jsx)(y2,{}):(0,$.jsx)(p2,{}),children:e===`recharge`?`充值`:`消费`})},{title:`积分变动`,dataIndex:`amount`,key:`amount`,width:120,render:e=>(0,$.jsxs)(Q.Text,{strong:!0,style:{color:e>0?`#10b981`:`#ef4444`,fontSize:15},children:[e>0?`+`:``,e]})},{title:`说明`,dataIndex:`description`,key:`description`},{title:`时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,style:{color:`#94a3b8`},children:a9(e)})}],dataSource:t,rowKey:`id`,loading:r,pagination:{current:a,pageSize:s,total:l,onChange:d,showSizeChanger:!0,showTotal:e=>`共 ${e} 条`},scroll:{x:500}})})]})]})},yte=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(1),[u]=(0,S.useState)(10);(0,S.useEffect)(()=>{d()},[c]);let d=async()=>{t(!0);try{let e=await K5(c,u);r(e.records||[]),a(e.credits||0),s(e.total||0)}catch{r([])}t(!1)};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(wJ,{gutter:[16,16],style:{marginBottom:24},children:[(0,$.jsx)(fV,{xs:24,sm:8,children:(0,$.jsxs)(`div`,{style:{borderRadius:16,padding:24,background:`linear-gradient(135deg, #f59e0b 0%, #ea580c 100%)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,right:-20,top:-20,width:120,height:120,borderRadius:`50%`,background:`rgba(255,255,255,0.1)`}}),(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:10},children:[(0,$.jsx)(Q8,{style:{color:`rgba(255,255,255,0.8)`,fontSize:16}}),(0,$.jsx)(`span`,{style:{color:`rgba(255,255,255,0.8)`,fontSize:14},children:`可用积分`})]}),(0,$.jsx)(`div`,{style:{color:`#fff`,fontSize:38,fontWeight:800,lineHeight:1},children:i.toLocaleString()})]})]})}),(0,$.jsx)(fV,{xs:12,sm:8,children:(0,$.jsxs)(`div`,{style:{borderRadius:16,padding:24,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:`rgba(16,185,129,0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(T6,{style:{color:`#10b981`,fontSize:14}})}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:14},children:`累计获得`})]}),(0,$.jsx)(`div`,{style:{color:`#10b981`,fontSize:28,fontWeight:800},children:n.filter(e=>e.amount>0).reduce((e,t)=>e+t.amount,0).toLocaleString()})]})}),(0,$.jsx)(fV,{xs:12,sm:8,children:(0,$.jsxs)(`div`,{style:{borderRadius:16,padding:24,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:`rgba(239,68,68,0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(j8,{style:{color:`#ef4444`,fontSize:14}})}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:14},children:`累计消耗`})]}),(0,$.jsx)(`div`,{style:{color:`#ef4444`,fontSize:28,fontWeight:800},children:n.filter(e=>e.amount<0).reduce((e,t)=>e+Math.abs(t.amount),0).toLocaleString()})]})})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(j8,{style:{color:`#f59e0b`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`积分明细`})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(lq,{spinning:e,children:n.length===0?(0,$.jsx)(NC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无积分变动记录`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(f$,{dataSource:n,columns:[{title:`变动类型`,dataIndex:`type`,key:`type`,width:120,render:e=>{let t={recharge:{color:`#10b981`,label:`充值`,bg:`rgba(16,185,129,0.1)`},consume:{color:`#ef4444`,label:`消费`,bg:`rgba(239,68,68,0.1)`},admin:{color:`#f59e0b`,label:`管理员调整`,bg:`rgba(245,158,11,0.1)`},refund:{color:`#8b5cf6`,label:`退款`,bg:`rgba(139,92,246,0.1)`}}[e]||{color:`#64748b`,label:e,bg:`rgba(100,116,139,0.1)`};return(0,$.jsx)(T$,{color:t.color,style:{background:t.bg,fontWeight:500,padding:`4px 12px`},children:t.label})}},{title:`描述`,dataIndex:`description`,key:`description`,ellipsis:!0},{title:`变动积分`,dataIndex:`amount`,key:`amount`,width:120,align:`right`,render:e=>(0,$.jsxs)(Q.Text,{strong:!0,style:{fontWeight:700,color:e>0?`#10b981`:`#ef4444`,fontSize:15},children:[e>0?`+`:``,e]})},{title:`创建时间`,key:`createdAt`,width:180,render:(e,t)=>{let n=t.created_at||t.createdAt||t.create_time||t.createTime;return n?new Date(n).toLocaleString(`zh-CN`):`-`}}],rowKey:`id`,pagination:!1,bordered:!1}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(HK,{current:c,pageSize:u,total:o,onChange:e=>{l(e)},size:`small`})})]})})})]})]})},bte=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(1),[c]=(0,S.useState)(10);(0,S.useEffect)(()=>{l()},[o]);let l=async()=>{t(!0);try{let e=await a7(o,c);r(e.items||[]),a(e.total||0)}catch{r([])}t(!1)};return(0,$.jsx)(`div`,{children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(MU,{style:{color:`#0ea5e9`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`订单记录`}),(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:[`共 `,n.length,` 条记录`]})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(lq,{spinning:e,children:n.length===0?(0,$.jsx)(NC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无订单记录`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(f$,{dataSource:n,columns:[{title:`订单号`,key:`orderNo`,width:200,render:(e,t)=>(0,$.jsx)(`span`,{style:{fontFamily:`monospace`,fontSize:13,color:`#64748b`},children:t.order_no||t.orderNo||t.id})},{title:`支付方式`,key:`paymentMethod`,width:100,render:(e,t)=>{let n=t.payment_method||t.paymentMethod||`wechat`,r={alipay:{icon:(0,$.jsx)(i2,{style:{fontSize:16}}),label:`支付宝`,color:`#1677ff`},wechat:{icon:(0,$.jsx)(i5,{style:{fontSize:16}}),label:`微信支付`,color:`#07c160`}},i=r[n]||r.wechat;return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{color:i.color},children:i.icon}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#374151`},children:i.label})]})}},{title:`金额`,key:`amount`,width:100,align:`right`,render:(e,t)=>{let n=t.amount||t.total_amount||0;return(0,$.jsxs)(Q.Text,{strong:!0,style:{fontWeight:700,fontSize:14,color:`#1e293b`},children:[`¥`,n]})}},{title:`获得积分`,key:`credits`,width:100,align:`center`,render:(e,t)=>{let n=t.credits||t.credit_amount||0;return(0,$.jsx)(Q.Text,{strong:!0,style:{fontWeight:600,fontSize:14,color:`#f59e0b`},children:n})}},{title:`状态`,key:`status`,width:100,render:(e,t)=>{let n=t.status||`pending`,r={pending:{color:`#f59e0b`,label:`待支付`,bg:`rgba(245,158,11,0.1)`},paid:{color:`#10b981`,label:`已支付`,bg:`rgba(16,185,129,0.1)`},refunded:{color:`#94a3b8`,label:`已退款`,bg:`rgba(148,163,184,0.1)`},failed:{color:`#ef4444`,label:`支付失败`,bg:`rgba(239,68,68,0.1)`},cancelled:{color:`#64748b`,label:`已取消`,bg:`rgba(100,116,139,0.1)`},processing:{color:`#0ea5e9`,label:`处理中`,bg:`rgba(14,165,233,0.1)`}}[n]||{color:`#64748b`,label:n,bg:`rgba(100,116,139,0.1)`};return(0,$.jsx)(T$,{color:r.color,style:{background:r.bg,fontWeight:500,padding:`4px 12px`},children:r.label})}},{title:`创建时间`,key:`createdAt`,width:180,render:(e,t)=>{let n=t.created_at||t.createdAt;return n?new Date(n).toLocaleString(`zh-CN`):`-`}},{title:`支付时间`,key:`paidAt`,width:180,render:(e,t)=>{let n=t.paid_at||t.paidAt;return n?new Date(n).toLocaleString(`zh-CN`):`-`}}],rowKey:`order_no`,pagination:!1,bordered:!1}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(HK,{current:o,pageSize:c,total:i,onChange:e=>{s(e)},size:`small`})})]})})})]})})},xte=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(1),[u]=(0,S.useState)(10);(0,S.useEffect)(()=>{d(),f()},[c]);let d=async()=>{t(!0);try{let e=await Z5(c,u);r(e.items||[]),s(e.total||0)}catch{r([])}t(!1)},f=async()=>{try{a(await Q5())}catch{a(0)}},p=async e=>{try{await $5(e),d(),f()}catch{}};return(0,$.jsx)(`div`,{children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(P2,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`消息中心`}),(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:[`未读 `,i,` 条`]})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(lq,{spinning:e,children:n.length===0?(0,$.jsx)(NC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无消息`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(f$,{dataSource:n,columns:[{title:`类型`,dataIndex:`type`,key:`type`,width:100,render:e=>{let t={system:{color:`#6366f1`,label:`系统`,bg:`rgba(99,102,241,0.1)`,icon:(0,$.jsx)(Y6,{style:{fontSize:14}})},credit:{color:`#f59e0b`,label:`积分`,bg:`rgba(245,158,11,0.1)`,icon:(0,$.jsx)(Q8,{style:{fontSize:14}})},promo:{color:`#8b5cf6`,label:`活动`,bg:`rgba(139,92,246,0.1)`,icon:(0,$.jsx)(i3,{style:{fontSize:14}})}},n=t[e]||t.system;return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{color:n.color},children:n.icon}),(0,$.jsx)(`span`,{style:{fontSize:13,color:n.color,fontWeight:500},children:n.label})]})}},{title:`标题`,dataIndex:`title`,key:`title`,ellipsis:!0},{title:`内容`,dataIndex:`content`,key:`content`,ellipsis:!0},{title:`状态`,dataIndex:`isRead`,key:`isRead`,width:80,render:(e,t)=>e??t.is_read?(0,$.jsx)(T$,{color:`gray`,style:{background:`rgba(148,163,184,0.1)`},children:`已读`}):(0,$.jsx)(T$,{color:`purple`,style:{background:`rgba(139,92,246,0.1)`},children:`未读`})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>{if(!e)return`-`;let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/(1e3*60*60));if(r<1)return`刚刚`;if(r<24)return`${r}小时前`;let i=Math.floor(r/24);return i<7?`${i}天前`:t.toLocaleDateString(`zh-CN`)}},{title:`操作`,key:`action`,width:100,render:(e,t)=>t.isRead??t.is_read?null:(0,$.jsx)(vD,{type:`text`,size:`small`,onClick:()=>p(t.id),style:{color:`#6366f1`},children:`标记已读`})}],rowKey:`id`,pagination:!1,bordered:!1}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(HK,{current:c,pageSize:u,total:o,onChange:e=>{l(e)},size:`small`})})]})})})]})})},d9=()=>{let[e]=Dn(),[t,n]=(0,S.useState)(`credits`);return(0,S.useEffect)(()=>{(e.get(`tab`)||`credits`)===`orders`?n(`orders`):n(`credits`)},[e]),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(mz,{activeKey:t,onChange:n,items:[{key:`credits`,label:`积分明细`},{key:`orders`,label:`订单记录`}],style:{marginBottom:24},size:`large`}),t===`credits`&&(0,$.jsx)(yte,{}),t===`orders`&&(0,$.jsx)(bte,{})]})},Ste=`/assets/bg1-CQh9PRPW.png`,Cte=`/assets/bg2-CNoKndHs.png`,{Header:wte,Sider:Tte,Content:Ete}=dK,{TextArea:Dte}=nK,{Option:f9}=lw,{Text:p9}=Q,Ote=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(`1`),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(``),{mediaType:c,countType:l,selectedRatio:u,selectedResolution:d,width:f,height:p,videoDuration:m,videoAspectRatio:h,videoResolution:g,engineOptions:_,enginesele:v,setMediaType:y,setCountType:b,setSelectedRatio:x,setSelectedResolution:C,setWidth:w,setHeight:T,setVideoDuration:E,setVideoAspectRatio:D,setVideoResolution:O,setEngineOptions:k,setEnginesele:A}=i9(),[j,M]=(0,S.useState)(!1),[N,P]=(0,S.useState)(!1),[F,I]=(0,S.useState)([]),[L,R]=(0,S.useState)(!1),[z,B]=(0,S.useState)(``),[V,H]=(0,S.useState)(`image`),U=(0,S.useRef)(null),[ee,te]=(0,S.useState)(new Set),ne=e=>{if(!e)return null;try{let t=new URL(e).searchParams.get(`exp`);return t?parseInt(t,10):null}catch{try{let t=e.indexOf(`?`);if(t!==-1){let n=e.substring(t+1),r=new URLSearchParams(n).get(`exp`);if(r)return parseInt(r,10)}return null}catch{return null}}},W=e=>{let t=ne(e);return t?Math.floor(Date.now()/1e3)>t:!1},[re,G]=(0,S.useState)(!1),[K,q]=(0,S.useState)(``),[ie,J]=(0,S.useState)(`image`),[ae,oe]=(0,S.useState)(``),[se,ce]=(0,S.useState)(!1),[le,ue]=(0,S.useState)(null),[de,fe]=(0,S.useState)({x:0,y:0}),[pe,me]=(0,S.useState)(!1),[he,ge]=(0,S.useState)(!1),[_e,ve]=(0,S.useState)([]),[ye,be]=(0,S.useState)([]),[xe,Se]=(0,S.useState)([]),[Ce,we]=(0,S.useState)(0),[Te,Ee]=(0,S.useState)(0),[De,Oe]=(0,S.useState)(!1),[ke,Ae]=(0,S.useState)([]),[je,Me]=(0,S.useState)([]),[Ne,Pe]=(0,S.useState)([]),Fe=()=>{let e={};return e=Ne.find(e=>e.modelConfigId===l&&e.genType===c&&e.resolution===(c===`video`?g:d)),e||(c===`video`?(e={perSecondCredits:2,baseCredits:60,ratio:1},g===`1080p`?e.ratio=2:g===`720p`?e.ratio=1.5:g===`480p`&&(e.ratio=1)):(e={perSecondCredits:.1,baseCredits:4,ratio:1},d===`2K`?e.ratio=1:d===`4K`&&(e.ratio=2))),c===`video`?Math.round((m*e.perSecondCredits+e.baseCredits)*e.ratio):e.baseCredits*e.ratio},Ie=(0,S.useRef)(null),Le=(0,S.useRef)(null),Re=(0,S.useRef)(null);(0,S.useRef)(!0),i.find(e=>e.id===n);let[ze,Be]=(0,S.useState)([]),[Ve,He]=(0,S.useState)({page:1,pageSize:20}),[Ue,We]=(0,S.useState)(0),[Ge,Ke]=(0,S.useState)(!1),qe=(0,S.useRef)(!1),Je=(0,S.useCallback)((e=`instant`)=>{let t=Le.current;t&&requestAnimationFrame(()=>{t.scrollTo({top:t.scrollHeight,behavior:e})})},[]);(0,S.useEffect)(()=>{if(ze.length>0&&!qe.current){let e=setTimeout(()=>{Je(`smooth`),qe.current=!0},300);return()=>clearTimeout(e)}},[ze.length,Je]),(0,S.useEffect)(()=>{let e=c===`image`?v.image:v.video;e&&e.length>0&&(e.some(e=>e.id===l)||b(e[0].id))},[c,v]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;De&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&Oe(!1),pe&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&me(!1),he&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&ge(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[De,pe,he]),(0,S.useEffect)(()=>{l7().then(e=>{if(A(e.engine),e.engine.video&&e.engine.video.length>0){let t=e.engine.video[0],n=e.engine.video.find(e=>e.id===l)||t;k({ratios:n.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:n.supportedResolutions||[`480p`,`720p`,`1080p`],durations:n.supportedDurations||[5,8,10,12,15]}),n.supportedRatios?.includes(h)||D(n.supportedRatios?.[0]||`16:9`),n.supportedResolutions?.includes(g)||O(n.supportedResolutions?.[0]||`720p`),n.supportedDurations?.includes(m)||E(n.supportedDurations?.[0]||5),l===`请选择`&&b(n.id)}}).catch(()=>{}),c7().then(e=>{Ae(e.video||[]),Me(e.image||[])}).catch(e=>{}),h7().then(e=>{Pe(e)}),d7(Ve).then(e=>{let t=e.items,n=e.total;Be(t),We(n)}),Y5().then(e=>{let t=e.items?.[0]?.supportedSizes||{},n=[],r=[],i=[];for(let e in t[`2K`])n.push(e),r.push(t[`2K`][e]);ve(n.map((e,t)=>({value:e,label:String(t)})));for(let e in t[`4K`])i.push(t[`4K`][e]);Se([r,i]),be([{value:`2K`,label:`高清 2K`},{value:`4K`,label:`超清 4K`}])}).catch(()=>{})},[]),(0,S.useEffect)(()=>{if(Re.current&&=(clearInterval(Re.current),null),ze.some(e=>e.status===`generating`))return Re.current=window.setInterval(()=>{d7(Ve).then(e=>{Be(t=>t.map(t=>t.status===`generating`&&e.items.find(e=>e.id===t.id)||t)),We(e.total)}).catch(e=>{})},1e4),()=>{Re.current&&=(clearInterval(Re.current),null)}},[ze,Ve]),(0,S.useEffect)(()=>{if(!pe)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&me(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[pe]),(0,S.useEffect)(()=>{if(!he)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&ge(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[he]),(0,S.useEffect)(()=>{xe[Te]&&xe[Te][Ce]!==void 0&&(w(Number(xe[Te][Ce].substring(0,4))),T(Number(xe[Te][Ce].substring(5))))},[Ce]),(0,S.useEffect)(()=>{xe[Te]&&xe[Te][Ce]!==void 0&&(w(Number(xe[Te][Ce].substring(0,4))),T(Number(xe[Te][Ce].substring(5))))},[Te]);let Ye=e=>{we(e)},Xe=e=>{Ee(parseInt(e===`2K`?`0`:`1`))},Ze=()=>{w(p),T(f)},Qe=async()=>{if(!o.trim()&&F.length===0){Z.warning(`请输入内容或上传图片/视频`);return}let e={id:``,gen_type:c,original_prompt:o.trim(),engine_id:l,idempotency_key:new Date().toLocaleString(`zh-CN`),media_references:F.length>0?[...F]:void 0,...c===`image`&&{image_size:d,image_proportion:u,image_px:f+`x`+p},...c===`video`&&{duration:m,aspect_ratio:h,resolution:g}};P(!0),u7(e).then(()=>{s(``),I([]);let e={...Ve,page:1};He(e),d7(e).then(e=>{Be(t=>[...t,e.items[e.items.length-1]]),We(e.total),setTimeout(()=>{Ie.current?.scrollIntoView({behavior:`smooth`})},100)}).catch(e=>{})}).catch(e=>{let t=`创建任务失败`;e?.response?.data?.detail?t=e.response.data.detail:e?.data?.detail?t=e.data.detail:e?.detail?t=e.detail:e?.message&&(t=e.message),Z.error({content:t,duration:3})}).finally(()=>{P(!1)}),setTimeout(()=>{P(!1)},3e3)},$e=async()=>{if(ze.length>=Ue)return;let e=Le.current;if(!e)return;let t=e.scrollTop,n=e.scrollHeight;Ke(!0);try{let r=Ve.page+1,i=await d7({...Ve,page:r}),a=Array.isArray(i)?{items:i,total:i.length}:i;a.total&&We(a.total),He(e=>({...e,page:r})),Be(e=>{let t=new Set(e.map(e=>e.id));return[...a.items.filter(e=>!e.id||t.has(e.id)?!1:(t.add(e.id),!0)),...e]}),setTimeout(()=>{e.scrollTop=t+(e.scrollHeight-n)},200)}catch{}finally{Ke(!1)}},et=async e=>{let t=e.type.startsWith(`image/`),n=e.type.startsWith(`video/`);if(!t&&!n)return Z.error(`仅支持图片或视频文件`),!1;let r=n?100:10;if(e.size/1024/1024>r)return Z.error(`${n?`视频`:`图片`}大小不能超过${r}MB`),!1;let i=F.filter(e=>e.type===`image`).length;if(t&&i>=4)return Z.error(`最多上传4张图片`),!1;let a=F.filter(e=>e.type===`video`).length;if(n&&a>=1)return Z.error(`最多上传1个视频`),!1;M(!0);try{let n=await(t?V5:H5)(e);I(r=>[...r,{name:e.name,type:t?`image`:`video`,url:n.url}]),Z.success(`${t?`图片`:`视频`}上传成功`)}catch{Z.error(`上传失败`)}finally{M(!1)}return!1},tt=e=>{I(t=>t.filter((t,n)=>n!==e))},nt=e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),Qe())},rt=()=>{R(!1),B(``),U.current&&U.current.pause()},it=e=>{if(e.preventDefault(),e.stopPropagation(),!z)return;let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${z}&download=1`,t.download=V===`image`?`image.png`:`video.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)};return(0,$.jsxs)(dK,{style:{margin:`-24px -32px -32px`,borderRadius:20,height:`calc(100vh - 34px)`,background:`linear-gradient(135deg, #f8fafc 0%, #f0f4ff 50%, #faf5ff 100%)`,backgroundImage:`url(${Cte})`,backgroundRepeat:`no-repeat`,backgroundSize:`100% 100%`,backgroundPosition:`center`},children:[!1,(0,$.jsxs)(dK,{style:{display:`flex`,flex:1,background:`transparent`},children:[(0,$.jsx)(wte,{style:{borderRadius:`20px 20px 0 0`,background:`rgba(255,255,255,0.1)`,backdropFilter:`blur(20px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`0 24px`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:36,height:36,borderRadius:12,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(P6,{style:{fontSize:18,color:`#fff`}})}),(0,$.jsx)(`div`,{children:(0,$.jsx)(p9,{strong:!0,style:{fontSize:16,background:`linear-gradient(90deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`开启创作`})})]})}),(0,$.jsxs)(Ete,{style:{flex:1,margin:0,padding:24,boxSizing:`border-box`,display:`flex`,flexDirection:`column`,overflow:`hidden`,minHeight:0},children:[ze.length===0&&(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,borderRadius:50,background:`linear-gradient(135deg, #6366f1 0%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,marginBottom:16},children:(0,$.jsx)(P6,{style:{fontSize:40,color:`#fff`}})}),(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:500,color:`#333`},children:`你好,想创作什么?`}),(0,$.jsx)(`p`,{style:{margin:8,fontSize:13,color:`#999`},children:`输入想法、剧本或上传参考,开始你的创作之旅`})]}),ze.length>0&&(0,$.jsxs)(`div`,{ref:Le,style:{flex:1,overflowY:`auto`,paddingRight:8},children:[(0,$.jsx)(`div`,{style:{padding:`8px 0`,textAlign:`center`,marginBottom:16},children:ze.length>=Ue?(0,$.jsx)(`span`,{style:{fontSize:12,color:`#999`},children:`消息全部加载`}):(0,$.jsx)(`button`,{onClick:$e,disabled:Ge,style:{fontSize:12,color:`#6366f1`,background:`none`,border:`none`,cursor:Ge?`not-allowed`:`pointer`},children:Ge?`加载中...`:`加载更多`})}),(()=>{let e=Z;return ze.map(t=>(0,$.jsx)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`flex-start`,marginBottom:16},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:36,height:36,borderRadius:12,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},children:(0,$.jsx)(P6,{style:{color:`#fff`,fontSize:16}})}),(0,$.jsx)(`div`,{style:{flex:1},children:(0,$.jsxs)(`div`,{style:{background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:`16px 16px 16px 4px`,padding:`12px 16px`,width:`70%`,minWidth:500,boxSizing:`border-box`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.08), 0 1px 3px rgba(0,0,0,0.04)`,position:`relative`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:[(0,$.jsxs)(`div`,{style:{margin:4,fontSize:11,color:`#999`,textAlign:`left`,display:`flex`,flexWrap:`wrap`,gap:8,alignItems:`center`},children:[(0,$.jsx)(`span`,{children:t.createdAt?.replace(`T`,` `).split(`.`)[0]}),(0,$.jsx)(`span`,{style:{background:t.genType===`image`?`rgba(34, 197, 94, 0.12)`:`rgba(249, 115, 22, 0.12)`,color:t.genType===`image`?`#22c55e`:`#f97316`,padding:`2px 8px`,borderRadius:12,fontWeight:500,fontSize:11,marginLeft:8},children:t.genType===`image`?`图片生成`:`视频生成`})]}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,zIndex:100},children:(0,$.jsx)(Rq,{title:`确定要删除吗?`,onConfirm:async()=>{try{await m7(t.id),e.success(`删除成功`),Be(e=>e.filter(e=>e.id!==t.id)),We(e=>e-1)}catch(t){let n=t?.response?.data?.message||t?.message||`删除失败`;e.error(n)}},okText:`确定`,cancelText:`取消`,children:(0,$.jsx)(`button`,{onClick:e=>e.stopPropagation(),style:{width:28,height:28,borderRadius:8,border:`none`,background:`rgba(99, 102, 241, 0.08)`,color:`#6366f1`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s ease`,padding:0},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`,e.currentTarget.style.color=`#ef4444`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.08)`,e.currentTarget.style.color=`#6366f1`},children:(0,$.jsx)(O$,{style:{fontSize:12}})})})}),(t.status===`generating`||t.status===`failed`||t.status===`completed`)&&(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:16,marginTop:16,width:`100%`,alignItems:`flex-start`},children:[(0,$.jsx)(`div`,{style:{width:`50%`,overflow:`hidden`,borderRadius:12,position:`relative`,height:220,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%)`},children:t.status===`generating`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:12,left:12,display:`flex`,alignItems:`center`,gap:8,zIndex:2}}),(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%)`,animation:`shimmer 2s infinite`}}),(0,$.jsxs)(`div`,{style:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,display:`flex`,flexDirection:`column`,alignItems:`center`,gap:16},children:[(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:`50%`,background:`rgba(99, 102, 241, 0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 0 30px rgba(99, 102, 241, 0.2)`},children:(0,$.jsx)(`div`,{style:{width:48,height:48,border:`3px solid #c7d2fe`,borderTopColor:`#6366f1`,borderRadius:`50%`,animation:`spin 1s linear infinite`}})}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`,fontWeight:500},children:`生成中...`})]})]}):t.status===`failed`?(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:`50%`,background:`rgba(254, 226, 226, 0.8)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(t5,{style:{color:`#ef4444`,fontSize:22}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#94a3b8`},children:`生成失败`})]}):(0,$.jsx)($.Fragment,{children:t.genType===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${t.imageUrl}&w=300&p=50`,alt:t.name,style:{width:`100%`,height:`100%`,borderRadius:12,objectFit:`contain`,cursor:`pointer`,transition:`transform 0.3s ease`},onClick:()=>{B(t.imageUrl),H(`image`),R(!0)},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.05)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn/static${t.videoCoverUrl}&w=300&p=50`,alt:t.name,style:{width:`100%`,height:`100%`,borderRadius:12,objectFit:`contain`,cursor:`pointer`,transition:`transform 0.3s ease`},onClick:()=>{B(t.videoUrl),H(`video`),R(!0)},onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.05)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,width:56,height:56,background:`rgba(99, 102, 241, 0.85)`,borderRadius:`50%`,display:`flex`,alignItems:`center`,justifyContent:`center`,pointerEvents:`none`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.4)`},children:(0,$.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`#fff`,children:(0,$.jsx)(`path`,{d:`M8 5v14l11-7z`})})})]})})}),(0,$.jsxs)(`div`,{style:{width:`50%`,display:`flex`,flexDirection:`column`,gap:12},children:[(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:12,padding:12,border:`1px solid rgba(99, 102, 241, 0.08)`,flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`p`,{style:{width:`100%`,height:150,overflow:`auto`,padding:0,marginTop:0,marginBottom:0,lineHeight:2,color:`#475569`,fontSize:13},children:t.originalPrompt})}),(0,$.jsxs)(`div`,{style:{fontSize:12,color:`#64748b`,textAlign:`left`,display:`flex`,flexWrap:`wrap`,gap:12,alignItems:`center`,justifyContent:`space-between`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{borderRadius:16,color:`#6366f1`,fontWeight:500},children:t.engineSnapshot.name}),(0,$.jsx)(`span`,{style:{borderRadius:16,color:`#64748b`},children:t.genType===`image`?`${t.imageProportion||``} · ${t.imagePx||``} · ${t.imageSize||``}`:`${t.duration||``}s · ${t.aspectRatio||``} · ${t.resolution||``}`}),(0,$.jsxs)(`span`,{style:{borderRadius:16,color:`#ef4444`,fontWeight:500},children:[`消耗积分:`,t.creditsCost]})]})]})]}),(0,$.jsx)(`div`,{style:{textAlign:`right`},children:t.mediaReferences&&t.mediaReferences.length>0&&(0,$.jsx)(`span`,{style:{padding:`4px 12px`,borderRadius:16,color:`#6366f1`,cursor:`pointer`,fontWeight:500,border:`1px solid rgba(99, 102, 241, 0.2)`,background:`rgba(99, 102, 241, 0.04)`},onClick:e=>{e.stopPropagation();let n=e.currentTarget.getBoundingClientRect();fe({x:n.left,y:n.top-10}),ue(t.id),ce(!0)},children:`附件详情`})})]})})]})},t.id))})(),(0,$.jsx)(`div`,{ref:Ie})]}),se&&le&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`transparent`,zIndex:9998},onClick:()=>{ce(!1),ue(null)}}),(0,$.jsxs)(`div`,{style:{position:`fixed`,top:de.y-100,left:de.x,background:`#fff`,borderRadius:12,boxShadow:`0 4px 20px rgba(0,0,0,0.15)`,padding:16,minWidth:200,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500},children:`附件列表`}),(0,$.jsx)(`button`,{onClick:()=>{ce(!1),ue(null)},style:{width:24,height:24,borderRadius:`50%`,border:`none`,background:`#ff4d4f`,cursor:`pointer`,fontSize:14,color:`#fff`,fontWeight:`bold`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s`},onMouseEnter:e=>{e.currentTarget.style.background=`#ff7875`,e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.background=`#ff4d4f`,e.currentTarget.style.transform=`scale(1)`},children:`×`})]}),ze.find(e=>e.id===le)?.mediaReferences?.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>{q(e.url),J(e.url.includes(`.mp4`)||e.url.includes(`.mov`)||e.url.includes(`.avi`)||e.url.includes(`.video`)?`video`:`image`),oe(e.name),G(!0),ce(!1),ue(null)},style:{display:`flex`,alignItems:`center`,gap:8,padding:`8px 12px`,borderRadius:6,cursor:`pointer`,fontSize:13,color:`#333`,transition:`background 0.2s`},onMouseEnter:e=>e.currentTarget.style.background=`#f5f5f5`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,children:[e.type===`image`?(0,$.jsx)(p6,{style:{color:`#3b82f6`,fontSize:14}}):(0,$.jsx)(Y8,{style:{color:`#f59e0b`,fontSize:14}}),e.name]},t))]})]}),(0,$.jsxs)(`div`,{style:{background:`rgba(255,255,255,0.1)`,backdropFilter:`blur(20px)`,borderRadius:24,padding:16,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.1), 0 2px 8px rgba(0,0,0,0.04)`,transition:`all 0.3s ease`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:[F.length>0&&(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,marginBottom:12,overflowX:`auto`},children:F.map((e,t)=>(0,$.jsxs)(`div`,{style:{position:`relative`,width:e.type===`video`?120:80,flexShrink:0},children:[e.type===`image`?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,alt:e.name,style:{width:`100%`,height:80,objectFit:`cover`,borderRadius:8}}):(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:80,objectFit:`cover`,borderRadius:8}}),(0,$.jsx)(`button`,{onClick:()=>tt(t),style:{position:`absolute`,top:0,right:0,width:20,height:20,border:`none`,background:`#ff4d4f`,borderRadius:50,cursor:`pointer`,color:`#fff`,fontSize:12,display:`flex`,alignItems:`center`,justifyContent:`center`},children:`×`})]},`media-${t}`))}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:`12px 16px`,backgroundColor:`rgba(248,250,252,0.6)`,borderRadius:16,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`,transition:`all 0.2s ease`},children:[(0,$.jsx)(y0,{accept:`image/*,video/*`,showUploadList:!1,beforeUpload:et,children:(0,$.jsx)($w,{title:`图片${F.filter(e=>e.type===`image`).length}/4,视频${F.filter(e=>e.type===`video`).length}/1`,children:(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:14,border:`2px dashed rgba(99, 102, 241, 0.2)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.25s ease`,flexShrink:0,backgroundColor:`rgba(255,255,255,0.7)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.backgroundColor=`rgba(99, 102, 241, 0.06)`,e.currentTarget.style.transform=`scale(1.05)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.2)`,e.currentTarget.style.backgroundColor=`rgba(255,255,255,0.7)`,e.currentTarget.style.transform=`scale(1)`},children:j?(0,$.jsx)(Xm,{style:{fontSize:18,color:`#6366f1`}}):(0,$.jsx)(gR,{style:{fontSize:18,color:`#64748b`}})})})}),(0,$.jsx)(Dte,{value:o,onChange:e=>s(e.target.value),onKeyPress:nt,placeholder:`上传最多4张参考图,输入提示词描述您想生成的画面...`,autoSize:{minRows:1,maxRows:4},style:{flex:1,height:`100%`,borderRadius:12,border:`none`,outline:`none`,boxShadow:`none`,fontSize:14,lineHeight:1.5,color:`#1e293b`},disabled:N}),(0,$.jsx)(vD,{type:`primary`,shape:`circle`,icon:(0,$.jsx)(K6,{}),onClick:Qe,disabled:!o.trim()&&F.length===0,loading:N,style:{flexShrink:0,width:48,height:48,borderRadius:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.4)`,transition:`all 0.2s ease`,border:`none`}})]}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginTop:12,paddingTop:12,borderTop:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsxs)(DU,{size:`middle`,children:[(0,$.jsxs)(lw,{value:c,onChange:e=>y(e),style:{width:100,height:34,outline:`none`,border:`none`,backgroundColor:`#f1f5f9`,borderRadius:10},size:`middle`,children:[(0,$.jsxs)(f9,{value:`image`,children:[(0,$.jsx)(p6,{style:{marginRight:6,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:`图片`})]}),(0,$.jsxs)(f9,{value:`video`,children:[(0,$.jsx)(Y8,{style:{marginRight:6,fontSize:14}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:`视频`})]})]}),(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>Oe(!0),className:`image-settings-trigger`,style:{minWidth:200,padding:`6px 14px`,height:34,borderRadius:10,border:`none`,backgroundColor:`#f1f5f9`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.boxShadow=`0 4px 12px rgba(99, 102, 241, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.15)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(99, 102, 241, 0.04)`},children:[(0,$.jsx)(Y6,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(p9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:c===`image`?v.image?.find(e=>e.id===l)?.name:v.video?.find(e=>e.id===l)?.name||`选择引擎`})]}),De&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:360,backgroundColor:`rgba(255,255,255,0.95)`,backdropFilter:`blur(20px)`,borderRadius:14,boxShadow:`0 12px 48px rgba(99, 102, 241, 0.15)`,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475569`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:(c===`image`?v.image:v.video)?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{b(e.id),c===`video`&&(k({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(h)||D(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(g)||O(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(m)||E(e.supportedDurations?.[0]||5)),Oe(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:l===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:l===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:l===e.id?600:500,color:l===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),c===`image`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>me(!pe),className:`image-settings-trigger`,style:{minWidth:220,padding:`4px 12px`,height:34,borderRadius:8,border:`none`,backgroundColor:`#f1f5f9`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(j3,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsxs)(p9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[u===`auto`?`智能`:u,` · `,d==`2K`?`2K高清`:`4K超清`,` · `,f,`×`,p]})]}),pe&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:480,backgroundColor:`rgba(255,255,255,0.95)`,backdropFilter:`blur(20px)`,borderRadius:14,boxShadow:`0 12px 48px rgba(99, 102, 241, 0.15)`,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:_e.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{x(e.value),Ye(e.label)},style:{flex:`0 0 calc(11.11% - 4px)`,minWidth:44,height:52,borderRadius:6,border:u===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:u===e.value?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:e.value===`auto`?14:18,height:e.value===`auto`?14:18,border:`2px solid ${u===e.value?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e.value===`auto`&&(0,$.jsx)(`span`,{style:{fontSize:7,color:u===e.value?`#6366f1`:`#9ca3af`},children:`智`})}),(0,$.jsx)(`span`,{style:{fontSize:9,color:u===e.value?`#6366f1`:`#6b7280`,fontWeight:u===e.value?600:400},children:e.value})]},e.value))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:ye.map(e=>(0,$.jsx)(`button`,{onClick:()=>{C(e.value),Xe(e.value)},style:{flex:1,height:42,borderRadius:6,border:d===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:d===e.value?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsxs)(`span`,{style:{fontSize:12,fontWeight:600,color:d===e.value?`#fff`:`#4b5563`},children:[e.value,e.value===`4K`&&(0,$.jsx)(`span`,{style:{marginLeft:2},children:`✨`})]})},e.value))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`尺寸`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:120},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:11,marginRight:4},children:`W`}),(0,$.jsx)(nK,{value:f,onChange:e=>w(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:12,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`button`,{onClick:Ze,style:{width:24,height:24,borderRadius:4,border:`1px solid #e5e7eb`,backgroundColor:`#fff`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:`#6366f1`},children:(0,$.jsx)(oG,{style:{fontSize:10}})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:120},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:11,marginRight:4},children:`H`}),(0,$.jsx)(nK,{value:p,onChange:e=>T(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:12,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:11},children:`PX`})]})]})]})]}),c===`video`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>ge(!he),className:`image-settings-trigger`,style:{minWidth:220,padding:`4px 12px`,height:34,borderRadius:8,border:`none`,backgroundColor:`#f1f5f9`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(j3,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsxs)(p9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[h,` · `,m,`s · `,g]})]}),he&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:400,backgroundColor:`rgba(255,255,255,0.95)`,backdropFilter:`blur(20px)`,borderRadius:14,boxShadow:`0 12px 48px rgba(99, 102, 241, 0.15)`,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:_.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>D(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:h===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:h===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${h===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:h===e?`#6366f1`:`#6b7280`,fontWeight:h===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(m-Math.min(..._.durations))/(Math.max(..._.durations)-Math.min(..._.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(..._.durations),max:Math.max(..._.durations),value:m,onChange:e=>E(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:m}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(p9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:_.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>O(e),style:{flex:1,height:42,borderRadius:6,border:g===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:g===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:g===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`6px 14px`,backgroundColor:`rgba(99, 102, 241, 0.06)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsx)(p9,{style:{fontSize:13,color:`#6366f1`,fontWeight:500},children:`预估积分`}),(0,$.jsx)(p9,{style:{fontSize:14,color:`#6366f1`,fontWeight:600},children:Fe()})]})]})})]})]})]}),(0,$.jsx)(`style`,{children:` @keyframes blink { 0%, 50% { opacity: 1; } diff --git a/video-gen-app/dist/index.html b/video-gen-app/dist/index.html index 29166543..9422e821 100644 --- a/video-gen-app/dist/index.html +++ b/video-gen-app/dist/index.html @@ -28,7 +28,7 @@ } })(); - + diff --git a/video-gen-app/src/components/Layout/AppLayout.tsx b/video-gen-app/src/components/Layout/AppLayout.tsx index 19aaeb4b..e2c9166a 100644 --- a/video-gen-app/src/components/Layout/AppLayout.tsx +++ b/video-gen-app/src/components/Layout/AppLayout.tsx @@ -172,7 +172,7 @@ const AppLayout: React.FC = () => { const [enabledMethods, setEnabledMethods] = useState<{ alipay: boolean; wechat: boolean }>({ alipay: false, wechat: false }); const [contactModalOpen, setContactModalOpen] = useState(false); const [contactForm] = Form.useForm(); - const [contactExpanded, setContactExpanded] = useState(true); + const [contactHovered, setContactHovered] = useState(false); const [submittingContact, setSubmittingContact] = useState(false); // LocalStorage keys @@ -1009,61 +1009,32 @@ const AppLayout: React.FC = () => {
- {contactExpanded && ( -
-
- - 联系我们 -
-
-
商务咨询
-
400-888-8888
-
- -
- )} +
+ 联系我们 +