1import{_ as be}from"./B0k-RDOm.js";import{d as Ie,s as Ae,ae as De,aF as B,aa as xe,T as Ee,f as P,a9 as ke,bb as we,e as M,w as ee,h as Ve,bc as Ce,bd as Se,L as Te,P as Pe,c as p,u as e,o as s,a as n,b as c,Q as te,x as i,M as u,ay as x,F as oe,r as ae,N as _,S as Me,t as R,be as Re,U as Oe,a5 as se,aj as le,aL as Fe,bf as Le,aw as H,bg as ie,bh as Be,bi as He,aA as Ne,_ as Ue}from"./CGjp591L.js";import{_ as Ge}from"./DLn3yw3K.js";import{u as Ke,g as ne}from"./IDRLcZm8.js";import{u as ze}from"./BUOS2Wyt.js";import{b as Xe,c as qe}from"./47Ubl-O8.js";import{P as N,U as V,M as d}from"./Brr45L3F.js";import{P as $e,_ as re}from"./B92tUtjG.js";import{A as je,H as de,a as Ye}from"./CRe6mRHp.js";import{u as Qe,_ as pe,H as me,I as Je,i as We}from"./DwiPi7uH.js";import{T as Ze}from"./kpemRMrJ.js";import{u as et}from"./B9bV1Dfa.js";import"./DAqAVYpA.js";import"./nYMKb1oN.js";import"./CoV9D8Rn.js";import"./DtvWVJda.js";import"./C6Qhm4Mr.js";import"./CZbNhc0R.js";import"./DeUaqWZ4.js";import"./BRWYmVJE.js";import"./BbpfinIo.js";import"./DMokxVce.js";import"./DsLEWnfh.js";import"./DmdWFNOQ.js";import"./B1lScb6C.js";import"./Ce4vQ3MV.js";import"./D8nGy5xr.js";import"./CVQOLZ9k.js";import"./B6DBoEpy.js";import"./CD5VMPd-.js";const tt={key:0,class:"video-editor notranslate flex pr-4",translate:"no"},ot={class:"flex h-full w-full"},at={class:"relative mr-10 w-115 shrink-0"},st={ref:"formScrollRef",class:"h-full overflow-auto border-r border-[#28282e] pt-7.5 pr-6 pb-30 [scrollbar-width:none]"},lt={class:"component-list mb-7.5 flex flex-col items-start justify-between"},it={class:"ml-2 text-[12px] line-through"},nt={class:"relative ml-2.5 h-5.5 w-auto overflow-hidden rounded-[10px] bg-[linear-gradient(270deg,#fff1b2_0%,#ffe33c_22.6%,rgba(115,93,0,0.31)_100%)] p-px text-xs font-bold"},rt={class:"relative h-full w-fit rounded-[10px] bg-gradient-to-r from-[#1b1504] to-[#9f8a30] px-2.5 text-xs leading-5 font-bold text-[#F5DD4E]"},dt={key:0,class:"flex flex-1 flex-col pt-6.5"},pt={key:1,class:"flex h-full flex-1 flex-col"},mt={key:1,class:"video-generate notranslate relative box-border flex h-fit flex-col items-center p-3.75 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",translate:"no"},ct={class:"flex h-full w-full"},ut={class:"model-warpper relative w-115"},_t={class:"model-warpper-container"},ft={class:"component-list mb-7.5 flex flex-col items-start justify-between"},yt={class:"text-[12px] line-through"},gt={class:"relative ml-2.5 h-5.5 w-auto overflow-hidden rounded-[10px] bg-[linear-gradient(270deg,#fff1b2_0%,#ffe33c_22.6%,rgba(115,93,0,0.31)_100%)] p-px text-xs font-bold"},vt={class:"relative h-full w-fit rounded-[10px] bg-gradient-to-r from-[#1b1504] to-[#9f8a30] px-2.5 text-xs leading-5 font-bold text-[#F5DD4E]"},ht=Ie({__name:"index",async setup(bt){let r,f;const{$gt:y}=Ae(),E=De(),{seoHead:ce}=([r,f]=B(()=>ze("/app/product-video/")),r=await r,f(),r),{setState:U}=et(6e4);xe(ce);const l=Ke(),{data:k,createDisable:G,useBase:g,videoOpeart:K,createVideo:ue,getCoinsValue:O,syncParamsToForm:_e,onPromptOptimize:fe}=Qe({genrateType:15}),v=Ee("histroyRef"),w=P(!1),C=P(!1),h=P(!1);let m=ke(we()?"History":"Inspiration");const b=M({get(){const t=l.allData;return{productId:t.product_id,productImage:t.image,avatarImage:t.image_tail,poster:t.image}},set(t){const o=l.allData;o.product_id=t.productId??0,o.image=t.poster||t.productImage||"",o.image_tail=t.avatarImage??""}}),F=([r,f]=B(()=>g.ssrFetch()),r=await r,f(),r),L=M(()=>F.status.value==="pending"&&!g.state.list.length);ee(F.data,t=>{F.apply(t)},{immediate:!0}),ee(()=>L.value,t=>{t||(g.state.list.length?(m.value="History",Ve(()=>{g.initAllScrollScaling(l.pageType.type)})):m.value="Inspiration",_e())},{immediate:!0}),l.setPageType(N.AI_COMMERCIAL_AD_VIDEO);const z=Ce(),ye=V.some(t=>String(t.key)===String(z)),ge=P(ye?z??d.AI_AD_SEEDANCE_2_0:d.AI_AD_SEEDANCE_2_0);l.setActiveId(ge.value);const I=M(()=>V.find(t=>t.key===l.activeId)),S=M(()=>l.activeModelInstance.getFormConfig()),X=t=>{const o=V.find(T=>T.value===t);o&&(l.switchModel(o.key),ie(String(o.key)),O())},q=(t,o)=>{switch(l.allData[t]=o,t){case"outputs":case"resolution":case"duration":case"is_switch_audio":O();break}},$=async()=>{U("optimize","optimize",!0);const t=await fe();Fe("old_prompt",l.allData.prompt),t&&l.setModelParam("prompt",t),U("optimize","optimize",!1)},j=()=>{Le({templateId:E.query.inspirationId,featureType:H.AD_VIDEO})},Y=t=>{C.value=t,v.value&&v.value.scrollToTop()};if(E.query.inspirationId){const t=([r,f]=B(()=>qe({id:E.query.inspirationId,path:""}
1)),r=await r,f(),r);t.code===200&&(l.setModelParam("image",t.data.origin_image),t.data.presets_prompt&&l.setModelParam("prompt",t.data.presets_prompt))}const Q=()=>{w.value||(Be({templateId:E.query.inspirationId,featureType:H.AD_VIDEO,outputNum:1}),He({gold_coins:k.coins,gaAction:"ad_video",templateId:E.query.inspirationId,featureType:H.AD_VIDEO},async()=>{w.value=!0;const t={...l.allData};ue(t,()=>{w.value=!1,Ne(),O(),(D||A)&&Y(!0),m.value="History",v.value&&v.value.handleCallback()},()=>{w.value=!1})}))},ve=()=>{m.value="Inspiration"},he=t=>{l.setModelParam("product_id",0),l.setModelParam("image",t.origin_image),t.prompt&&l.setModelParam("prompt",t.prompt)};Se((t,o)=>{t.path===o.path||We(t.path)||(ie(String(d.AI_AD_SEEDANCE_2_0)),l.resetAllData())});const{isMobile:A,isTablet:D}=Te();return(t,o)=>{const T=be,J=Me,W=Ge,Z=Pe("scroll-lock");return e(D)||e(A)?(s(),p("div",mt,[n("div",ct,[n("div",ut,[te((s(),p("div",_t,[u(T,{model:e(I),modelList:e(V),type:"video",onChange:X},null,8,["model","modelList"]),u(pe,{modelValue:e(b),"onUpdate:modelValue":o[3]||(o[3]=a=>x(b)?b.value=a:null),"avatar-enabled":e(h),"onUpdate:avatarEnabled":o[4]||(o[4]=a=>x(h)?h.value=a:null),genrateType:13,class:"mb-7.5"},null,8,["modelValue","avatar-enabled"]),(s(!0),p(oe,null,ae(e(S),a=>(s(),p("div",ft,[a.label?(s(),i(re,{key:0,item:a},null,8,["item"])):c("",!0),(s(),i(le(e(ne)(a.componentName)),se({formValue:e(l).allData[a.formKey],formKey:a.formKey},{ref_for:!0},{...a.props??{}},{onChange:q,onPromptOptimize:$,onPromptBlur:j}),null,16,["formValue","formKey"]))]))),256))])),[[Z]])])]),e(S).length&&(e(D)||e(A))?(s(),i(Ye,{key:0,coins:e(k).coins,disable:e(G),tooltip:!1,styleTailwindcss:{coins:[e(d).AI_AD_PIXVERSE_V6,e(d).AI_AD_PIXVERSE_ADS].includes(e(I)?.key)?"text-[#FFB731]! font-bold text-[14px]":""},onOnHistory:o[5]||(o[5]=a=>Y(!0)),onOnCreate:Q},{discount:_(()=>[[e(d).AI_AD_PIXVERSE_V6,e(d).AI_AD_PIXVERSE_ADS].includes(e(I)?.key)?(s(),i(J,{key:0},{default:_(()=>[n("span",yt,R(Math.ceil(e(k).coins/.8)),1),n("div",gt,[n("div",vt,[n("span",null,R(e(y)("videoToVideo.components.limitedTimeNewAD")),1)])])]),_:1})):c("",!0)]),_:1},8,["coins","disable","styleTailwindcss"])):c("",!0),e(D)||e(A)?(s(),i($e,{key:1,modelValue:e(C),"onUpdate:modelValue":o[7]||(o[7]=a=>x(C)?C.value=a:null)},{default:_(()=>[n("div",{class:"history-list1 h-full w-full",onClick:o[6]||(o[6]=Oe(()=>{},["stop"]))},[e(L)?(s(),i(W,{key:0,actions:4,class:"px-4 pb-4"})):(s(),i(de,{key:1,ref_key:"histroyRef",ref:v,pageType:e(N).AI_COMMERCIAL_AD_VIDEO,list:e(g).state.list,successButton:["Reprompt","Regenerate","Download","Enhance","Delete"],showThumbnail:!1,onChange:e(K)},{empty:_(()=>[u(me,{title:e(y)("marketingStudio.adGeneratorTitle"),description:e(y)("marketingStudio.adGeneratorIntro")},null,8,["title","description"])]),_:1},8,["pageType","list","onChange"]))])]),_:1},8,["modelValue"])):c("",!0)])):(s(),p("div",tt,[n("div",ot,[n("div",at,[te((s(),p("div",st,[u(T,{model:e(I),modelList:e(V),onChange:X},null,8,["model","modelList"]),u(pe,{modelValue:e(b),"onUpdate:modelValue":o[0]||(o[0]=a=>x(b)?b.value=a:null),"avatar-enabled":e(h),"onUpdate:avatarEnabled":o[1]||(o[1]=a=>x(h)?h.value=a:null),genrateType:13,class:"mb-7.5"},null,8,["modelValue","avatar-enabled"]),(s(!0),p(oe,null,ae(e(S),a=>(s(),p("div",lt,[a.label?(s(),i(re,{key:0,item:a},null,8,["item"])):c("",!0),(s(),i(le(e(ne)(a.componentName)),se({formValue:e(l).allData[a.formKey],formKey:a.formKey,activeId:e(l).activeId},{ref_for:!0},{...a.props??{}},{onChange:q,onPromptOptimize:$,onPromptBlur:j}),null,16,["formValue","formKey","activeId"]))]))),256))])),[[Z]]),e(S).length&&!(e(D)||e(A))?(s(),i(je,{key:0,coins:e(k).coins,disable:e(G),loading:e(w),tooltip:!1,styleTailwindcss:{coins:[e(d).AI_AD_PIXVERSE_V6,e(d).AI_AD_PIXVERSE_ADS].includes(e(I)?.key)?"text-[#FFB731] font-bold text-[14px]":""},onOnCreate:Q},{discount:_(()=>[[e(d).AI_AD_PIXVERSE_V6,e(d).AI_AD_PIXVERSE_ADS].includes(e(I)?.key)?(s(),i(J,{key:0},{default:_(()=>[n("span",it,R(Math.ceil(e(k).coins/.8)),1),n("div",nt,[n("div",rt,[n("span",null,R(e(y)("videoToVideo.components.limitedTimeNewAD")),1
1)])])]),_:1})):c("",!0)]),_:1},8,["coins","disable","loading","styleTailwindcss"])):c("",!0)]),e(D)||e(A)?c("",!0):(s(),p("div",dt,[e(L)?(s(),i(W,{key:0,class:"pt-5"})):(s(),p("div",pt,[n("div",null,[u(Ze,{class:"tab-container",modelValue:e(m),"onUpdate:modelValue":o[2]||(o[2]=a=>x(m)?m.value=a:m=a),list:[{label:"BaseNav.history",value:"History",icon:"video-to-video:history"},{label:"BaseNav.ins",value:"Inspiration",icon:"menu:inspiration"}]},null,8,["modelValue"])]),(s(),i(Re,{max:3},[e(m)==="History"?(s(),i(de,{key:0,ref_key:"histroyRef",ref:v,pageType:e(N).AI_COMMERCIAL_AD_VIDEO,list:e(g).state.list,successButton:["Reprompt","Regenerate","Download","Enhance","Delete"],onChange:e(K),onEmptyCallback:ve},{empty:_(()=>[u(me,{title:e(y)("marketingStudio.adGeneratorTitle"),description:e(y)("marketingStudio.adGeneratorIntro")},null,8,["title","description"])]),_:1},8,["pageType","list","onChange"])):(s(),i(Je,{key:1,getInspirationList:e(Xe),onInspirationReprompt:he},null,8,["getInspirationList"]))],1024))]))]))])]))}}}),Jt=Ue(ht,[["__scopeId","data-v-a9d9b6a8"]]);export{Jt as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.